]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
Merge branch 'for-rmk' of git://source.mvista.com/git/linux-davinci-2.6.git
authorRussell King <rmk@dyn-67.arm.linux.org.uk>
Thu, 9 Oct 2008 20:33:05 +0000 (21:33 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Thu, 9 Oct 2008 20:33:05 +0000 (21:33 +0100)
Merge branch 'davinci' into devel

695 files changed:
Documentation/sound/alsa/soc/dapm.txt
MAINTAINERS
arch/arm/Kconfig
arch/arm/Makefile
arch/arm/boot/compressed/Makefile
arch/arm/boot/compressed/head.S
arch/arm/common/Kconfig
arch/arm/common/dmabounce.c
arch/arm/common/gic.c
arch/arm/common/it8152.c
arch/arm/common/locomo.c
arch/arm/common/sa1111.c
arch/arm/common/scoop.c
arch/arm/common/sharpsl_param.c
arch/arm/common/time-acorn.c
arch/arm/common/uengine.c
arch/arm/common/via82c505.c
arch/arm/common/vic.c
arch/arm/configs/afeb9260_defconfig [new file with mode: 0644]
arch/arm/configs/at91sam9rlek_defconfig
arch/arm/configs/cm_x300_defconfig [new file with mode: 0644]
arch/arm/configs/jornada720_defconfig
arch/arm/configs/palmz72_defconfig [new file with mode: 0644]
arch/arm/configs/viper_defconfig [new file with mode: 0644]
arch/arm/configs/xm_x2xx_defconfig [moved from arch/arm/configs/xm_x270_defconfig with 91% similarity]
arch/arm/include/asm/bug.h
arch/arm/include/asm/cacheflush.h
arch/arm/include/asm/cachetype.h [new file with mode: 0644]
arch/arm/include/asm/cputype.h [new file with mode: 0644]
arch/arm/include/asm/dma-mapping.h
arch/arm/include/asm/elf.h
arch/arm/include/asm/futex.h
arch/arm/include/asm/io.h
arch/arm/include/asm/irq.h
arch/arm/include/asm/kprobes.h
arch/arm/include/asm/mach/map.h
arch/arm/include/asm/mach/udc_pxa2xx.h
arch/arm/include/asm/mc146818rtc.h
arch/arm/include/asm/memory.h
arch/arm/include/asm/mmu_context.h
arch/arm/include/asm/page.h
arch/arm/include/asm/pgtable.h
arch/arm/include/asm/ptrace.h
arch/arm/include/asm/setup.h
arch/arm/include/asm/sparsemem.h
arch/arm/include/asm/system.h
arch/arm/include/asm/thread_info.h
arch/arm/include/asm/uaccess.h
arch/arm/include/asm/vga.h
arch/arm/kernel/Makefile
arch/arm/kernel/armksyms.c
arch/arm/kernel/bios32.c
arch/arm/kernel/crunch.c
arch/arm/kernel/debug.S
arch/arm/kernel/dma-isa.c
arch/arm/kernel/ecard.c
arch/arm/kernel/elf.c [new file with mode: 0644]
arch/arm/kernel/entry-armv.S
arch/arm/kernel/entry-common.S
arch/arm/kernel/fiq.c
arch/arm/kernel/head-common.S
arch/arm/kernel/head-nommu.S
arch/arm/kernel/head.S
arch/arm/kernel/init_task.c
arch/arm/kernel/io.c
arch/arm/kernel/irq.c
arch/arm/kernel/kprobes-decode.c
arch/arm/kernel/kprobes.c
arch/arm/kernel/machine_kexec.c
arch/arm/kernel/module.c
arch/arm/kernel/process.c
arch/arm/kernel/ptrace.c
arch/arm/kernel/setup.c
arch/arm/kernel/signal.c
arch/arm/kernel/sys_arm.c
arch/arm/kernel/sys_oabi-compat.c
arch/arm/kernel/time.c
arch/arm/kernel/traps.c
arch/arm/kernel/xscale-cp0.c
arch/arm/lib/ashldi3.S
arch/arm/lib/ashrdi3.S
arch/arm/lib/backtrace.S
arch/arm/lib/changebit.S
arch/arm/lib/clear_user.S
arch/arm/lib/clearbit.S
arch/arm/lib/copy_from_user.S
arch/arm/lib/copy_page.S
arch/arm/lib/copy_to_user.S
arch/arm/lib/csumipv6.S
arch/arm/lib/csumpartial.S
arch/arm/lib/csumpartialcopy.S
arch/arm/lib/csumpartialcopygeneric.S
arch/arm/lib/csumpartialcopyuser.S
arch/arm/lib/delay.S
arch/arm/lib/div64.S
arch/arm/lib/findbit.S
arch/arm/lib/getuser.S
arch/arm/lib/io-readsb.S
arch/arm/lib/io-readsl.S
arch/arm/lib/io-readsw-armv4.S
arch/arm/lib/io-writesb.S
arch/arm/lib/io-writesl.S
arch/arm/lib/io-writesw-armv4.S
arch/arm/lib/lib1funcs.S
arch/arm/lib/lshrdi3.S
arch/arm/lib/memchr.S
arch/arm/lib/memcpy.S
arch/arm/lib/memmove.S
arch/arm/lib/memset.S
arch/arm/lib/memzero.S
arch/arm/lib/muldi3.S
arch/arm/lib/putuser.S
arch/arm/lib/setbit.S
arch/arm/lib/sha1.S
arch/arm/lib/strchr.S
arch/arm/lib/strncpy_from_user.S
arch/arm/lib/strnlen_user.S
arch/arm/lib/strrchr.S
arch/arm/lib/testchangebit.S
arch/arm/lib/testclearbit.S
arch/arm/lib/testsetbit.S
arch/arm/lib/uaccess.S
arch/arm/lib/ucmpdi2.S
arch/arm/mach-at91/Kconfig
arch/arm/mach-at91/Makefile
arch/arm/mach-at91/at91cap9.c
arch/arm/mach-at91/at91cap9_devices.c
arch/arm/mach-at91/at91sam9263.c
arch/arm/mach-at91/at91sam9263_devices.c
arch/arm/mach-at91/at91sam9rl.c
arch/arm/mach-at91/at91sam9rl_devices.c
arch/arm/mach-at91/at91x40_time.c
arch/arm/mach-at91/board-afeb-9260v1.c [new file with mode: 0644]
arch/arm/mach-at91/board-cap9adk.c
arch/arm/mach-at91/board-carmeva.c
arch/arm/mach-at91/board-csb337.c
arch/arm/mach-at91/board-csb637.c
arch/arm/mach-at91/board-dk.c
arch/arm/mach-at91/board-ecbat91.c
arch/arm/mach-at91/board-ek.c
arch/arm/mach-at91/board-picotux200.c
arch/arm/mach-at91/board-qil-a9260.c
arch/arm/mach-at91/board-sam9-l9260.c
arch/arm/mach-at91/board-sam9260ek.c
arch/arm/mach-at91/board-sam9261ek.c
arch/arm/mach-at91/board-sam9263ek.c
arch/arm/mach-at91/board-sam9g20ek.c
arch/arm/mach-at91/board-sam9rlek.c
arch/arm/mach-at91/board-usb-a9260.c
arch/arm/mach-at91/board-usb-a9263.c
arch/arm/mach-at91/board-yl-9200.c
arch/arm/mach-at91/clock.c
arch/arm/mach-at91/gpio.c
arch/arm/mach-at91/include/mach/at91_pit.h
arch/arm/mach-at91/include/mach/at91_rstc.h
arch/arm/mach-at91/include/mach/at91_rtt.h
arch/arm/mach-at91/include/mach/at91_shdwc.h
arch/arm/mach-at91/include/mach/at91_wdt.h
arch/arm/mach-at91/include/mach/at91cap9_ddrsdr.h
arch/arm/mach-at91/include/mach/at91sam9260_matrix.h
arch/arm/mach-at91/include/mach/at91sam9261_matrix.h
arch/arm/mach-at91/include/mach/at91sam9_sdramc.h
arch/arm/mach-at91/include/mach/at91sam9_smc.h
arch/arm/mach-at91/include/mach/board.h
arch/arm/mach-at91/include/mach/irqs.h
arch/arm/mach-at91/include/mach/uncompress.h
arch/arm/mach-at91/leds.c
arch/arm/mach-at91/pm.c
arch/arm/mach-at91/pm_slowclock.S [new file with mode: 0644]
arch/arm/mach-clps711x/autcpu12.c
arch/arm/mach-clps711x/cdb89712.c
arch/arm/mach-clps711x/include/mach/system.h
arch/arm/mach-clps711x/irq.c
arch/arm/mach-clps711x/p720t-leds.c
arch/arm/mach-clps711x/p720t.c
arch/arm/mach-clps711x/time.c
arch/arm/mach-clps7500/core.c
arch/arm/mach-clps7500/include/mach/irq.h
arch/arm/mach-clps7500/include/mach/memory.h
arch/arm/mach-clps7500/include/mach/system.h
arch/arm/mach-davinci/board-evm.c
arch/arm/mach-davinci/clock.c
arch/arm/mach-davinci/gpio.c
arch/arm/mach-davinci/id.c
arch/arm/mach-davinci/include/mach/system.h
arch/arm/mach-davinci/io.c
arch/arm/mach-davinci/irq.c
arch/arm/mach-davinci/psc.c
arch/arm/mach-davinci/serial.c
arch/arm/mach-davinci/time.c
arch/arm/mach-ebsa110/core.c
arch/arm/mach-ebsa110/io.c
arch/arm/mach-ep93xx/Kconfig
arch/arm/mach-ep93xx/adssphere.c
arch/arm/mach-ep93xx/clock.c
arch/arm/mach-ep93xx/core.c
arch/arm/mach-ep93xx/edb9302.c
arch/arm/mach-ep93xx/edb9302a.c
arch/arm/mach-ep93xx/edb9307.c
arch/arm/mach-ep93xx/edb9312.c
arch/arm/mach-ep93xx/edb9315.c
arch/arm/mach-ep93xx/edb9315a.c
arch/arm/mach-ep93xx/gesbc9312.c
arch/arm/mach-ep93xx/gpio.c
arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h
arch/arm/mach-ep93xx/include/mach/platform.h
arch/arm/mach-ep93xx/include/mach/ts72xx.h
arch/arm/mach-ep93xx/include/mach/uncompress.h
arch/arm/mach-ep93xx/micro9.c
arch/arm/mach-ep93xx/ts72xx.c
arch/arm/mach-footbridge/cats-hw.c
arch/arm/mach-footbridge/common.c
arch/arm/mach-footbridge/dc21285.c
arch/arm/mach-footbridge/dma.c
arch/arm/mach-footbridge/include/mach/memory.h
arch/arm/mach-footbridge/include/mach/system.h
arch/arm/mach-footbridge/isa-irq.c
arch/arm/mach-footbridge/isa-timer.c
arch/arm/mach-footbridge/netwinder-hw.c
arch/arm/mach-footbridge/time.c
arch/arm/mach-h720x/common.c
arch/arm/mach-h720x/cpu-h7202.c
arch/arm/mach-imx/clock.c
arch/arm/mach-imx/include/mach/irqs.h
arch/arm/mach-imx/irq.c
arch/arm/mach-imx/leds-mx1ads.c
arch/arm/mach-imx/time.c
arch/arm/mach-integrator/core.c
arch/arm/mach-integrator/cpu.c
arch/arm/mach-integrator/impd1.c
arch/arm/mach-integrator/integrator_ap.c
arch/arm/mach-integrator/integrator_cp.c
arch/arm/mach-integrator/leds.c
arch/arm/mach-integrator/pci_v3.c
arch/arm/mach-iop13xx/include/mach/memory.h
arch/arm/mach-iop13xx/include/mach/pci.h
arch/arm/mach-iop13xx/io.c
arch/arm/mach-iop13xx/msi.c
arch/arm/mach-iop13xx/setup.c
arch/arm/mach-iop13xx/tpmi.c
arch/arm/mach-iop32x/glantank.c
arch/arm/mach-iop32x/iq31244.c
arch/arm/mach-iop32x/iq80321.c
arch/arm/mach-iop32x/n2100.c
arch/arm/mach-iop33x/iq80331.c
arch/arm/mach-iop33x/iq80332.c
arch/arm/mach-iop33x/uart.c
arch/arm/mach-ixp2000/core.c
arch/arm/mach-ixp2000/enp2611.c
arch/arm/mach-ixp2000/include/mach/ixp2000-regs.h
arch/arm/mach-ixp2000/ixdp2400.c
arch/arm/mach-ixp2000/ixdp2800.c
arch/arm/mach-ixp2000/ixdp2x00.c
arch/arm/mach-ixp2000/ixdp2x01.c
arch/arm/mach-ixp2000/pci.c
arch/arm/mach-ixp23xx/core.c
arch/arm/mach-ixp23xx/ixdp2351.c
arch/arm/mach-ixp23xx/pci.c
arch/arm/mach-ixp4xx/common-pci.c
arch/arm/mach-ixp4xx/common.c
arch/arm/mach-ixp4xx/fsg-setup.c
arch/arm/mach-ixp4xx/include/mach/cpu.h
arch/arm/mach-ixp4xx/ixdp425-setup.c
arch/arm/mach-ixp4xx/nas100d-setup.c
arch/arm/mach-ixp4xx/nslu2-setup.c
arch/arm/mach-ks8695/cpu.c
arch/arm/mach-ks8695/gpio.c
arch/arm/mach-ks8695/include/mach/memory.h
arch/arm/mach-ks8695/include/mach/regs-gpio.h
arch/arm/mach-ks8695/include/mach/regs-lan.h
arch/arm/mach-ks8695/include/mach/regs-wan.h
arch/arm/mach-ks8695/include/mach/system.h
arch/arm/mach-ks8695/include/mach/uncompress.h
arch/arm/mach-ks8695/irq.c
arch/arm/mach-ks8695/pci.c
arch/arm/mach-ks8695/time.c
arch/arm/mach-lh7a40x/Kconfig
arch/arm/mach-lh7a40x/arch-kev7a400.c
arch/arm/mach-lh7a40x/arch-lpd7a40x.c
arch/arm/mach-lh7a40x/common.h
arch/arm/mach-lh7a40x/include/mach/memory.h
arch/arm/mach-lh7a40x/irq-lpd7a40x.c
arch/arm/mach-lh7a40x/ssp-cpld.c
arch/arm/mach-lh7a40x/time.c
arch/arm/mach-loki/addr-map.c
arch/arm/mach-loki/irq.c
arch/arm/mach-msm/board-halibut.c
arch/arm/mach-msm/common.c
arch/arm/mach-msm/dma.c
arch/arm/mach-msm/io.c
arch/arm/mach-msm/irq.c
arch/arm/mach-msm/timer.c
arch/arm/mach-mv78xx0/addr-map.c
arch/arm/mach-mx2/devices.h [new file with mode: 0644]
arch/arm/mach-mx2/mx27ads.c
arch/arm/mach-mx2/pcm038.c
arch/arm/mach-mx2/serial.c
arch/arm/mach-mx3/devices.c
arch/arm/mach-mx3/devices.h [new file with mode: 0644]
arch/arm/mach-mx3/iomux.c
arch/arm/mach-mx3/mm.c
arch/arm/mach-mx3/mx31ads.c
arch/arm/mach-mx3/mx31lite.c
arch/arm/mach-mx3/pcm037.c
arch/arm/mach-netx/generic.c
arch/arm/mach-netx/include/mach/system.h
arch/arm/mach-netx/pfifo.c
arch/arm/mach-netx/time.c
arch/arm/mach-netx/xc.c
arch/arm/mach-ns9xxx/board-a9m9750dev.c
arch/arm/mach-ns9xxx/gpio.c
arch/arm/mach-ns9xxx/include/mach/uncompress.h
arch/arm/mach-ns9xxx/irq.c
arch/arm/mach-omap1/board-voiceblue.c
arch/arm/mach-omap1/clock.c
arch/arm/mach-omap1/devices.c
arch/arm/mach-omap1/fpga.c
arch/arm/mach-omap1/id.c
arch/arm/mach-omap1/io.c
arch/arm/mach-omap1/irq.c
arch/arm/mach-omap1/leds-h2p2-debug.c
arch/arm/mach-omap1/mailbox.c
arch/arm/mach-omap1/mux.c
arch/arm/mach-omap1/pm.c
arch/arm/mach-omap1/serial.c
arch/arm/mach-omap1/time.c
arch/arm/mach-omap1/timer32k.c
arch/arm/mach-omap2/board-2430sdp.c
arch/arm/mach-omap2/board-h4.c
arch/arm/mach-omap2/clock.c
arch/arm/mach-omap2/clock24xx.c
arch/arm/mach-omap2/clock34xx.c
arch/arm/mach-omap2/devices.c
arch/arm/mach-omap2/gpmc.c
arch/arm/mach-omap2/id.c
arch/arm/mach-omap2/io.c
arch/arm/mach-omap2/irq.c
arch/arm/mach-omap2/mailbox.c
arch/arm/mach-omap2/memory.c
arch/arm/mach-omap2/mux.c
arch/arm/mach-omap2/pm.c
arch/arm/mach-omap2/serial.c
arch/arm/mach-orion5x/addr-map.c
arch/arm/mach-orion5x/gpio.c
arch/arm/mach-orion5x/irq.c
arch/arm/mach-orion5x/mpp.c
arch/arm/mach-pnx4008/clock.c
arch/arm/mach-pnx4008/core.c
arch/arm/mach-pnx4008/dma.c
arch/arm/mach-pnx4008/gpio.c
arch/arm/mach-pnx4008/include/mach/system.h
arch/arm/mach-pnx4008/include/mach/timex.h
arch/arm/mach-pnx4008/irq.c
arch/arm/mach-pnx4008/pm.c
arch/arm/mach-pnx4008/serial.c
arch/arm/mach-pnx4008/time.c
arch/arm/mach-pxa/Kconfig
arch/arm/mach-pxa/Makefile
arch/arm/mach-pxa/akita-ioexp.c [deleted file]
arch/arm/mach-pxa/am200epd.c [new file with mode: 0644]
arch/arm/mach-pxa/cm-x255.c [new file with mode: 0644]
arch/arm/mach-pxa/cm-x270-pci.h [deleted file]
arch/arm/mach-pxa/cm-x270.c
arch/arm/mach-pxa/cm-x2xx-pci.c [moved from arch/arm/mach-pxa/cm-x270-pci.c with 77% similarity]
arch/arm/mach-pxa/cm-x2xx-pci.h [new file with mode: 0644]
arch/arm/mach-pxa/cm-x2xx.c [new file with mode: 0644]
arch/arm/mach-pxa/cm-x300.c [new file with mode: 0644]
arch/arm/mach-pxa/colibri.c
arch/arm/mach-pxa/corgi.c
arch/arm/mach-pxa/corgi_lcd.c [deleted file]
arch/arm/mach-pxa/corgi_pm.c
arch/arm/mach-pxa/corgi_ssp.c [deleted file]
arch/arm/mach-pxa/cpufreq-pxa2xx.c [moved from arch/arm/mach-pxa/cpu-pxa.c with 99% similarity]
arch/arm/mach-pxa/cpufreq-pxa3xx.c [new file with mode: 0644]
arch/arm/mach-pxa/devices.h
arch/arm/mach-pxa/e330.c [new file with mode: 0644]
arch/arm/mach-pxa/e350.c [new file with mode: 0644]
arch/arm/mach-pxa/e400.c [new file with mode: 0644]
arch/arm/mach-pxa/e400_lcd.c [deleted file]
arch/arm/mach-pxa/e740.c [new file with mode: 0644]
arch/arm/mach-pxa/e740_lcd.c [deleted file]
arch/arm/mach-pxa/e750.c [moved from arch/arm/mach-pxa/e750_lcd.c with 61% similarity]
arch/arm/mach-pxa/e800.c [moved from arch/arm/mach-pxa/e800_lcd.c with 65% similarity]
arch/arm/mach-pxa/em-x270.c
arch/arm/mach-pxa/eseries.c
arch/arm/mach-pxa/eseries.h [new file with mode: 0644]
arch/arm/mach-pxa/eseries_udc.c [deleted file]
arch/arm/mach-pxa/generic.c
arch/arm/mach-pxa/generic.h
arch/arm/mach-pxa/gpio.c
arch/arm/mach-pxa/gumstix.c
arch/arm/mach-pxa/idp.c
arch/arm/mach-pxa/include/mach/akita.h [deleted file]
arch/arm/mach-pxa/include/mach/corgi.h
arch/arm/mach-pxa/include/mach/entry-macro.S
arch/arm/mach-pxa/include/mach/hardware.h
arch/arm/mach-pxa/include/mach/i2c.h
arch/arm/mach-pxa/include/mach/irqs.h
arch/arm/mach-pxa/include/mach/littleton.h
arch/arm/mach-pxa/include/mach/memory.h
arch/arm/mach-pxa/include/mach/mfp-pxa25x.h
arch/arm/mach-pxa/include/mach/mfp-pxa320.h
arch/arm/mach-pxa/include/mach/mfp.h
arch/arm/mach-pxa/include/mach/mioa701.h [new file with mode: 0644]
arch/arm/mach-pxa/include/mach/ohci.h
arch/arm/mach-pxa/include/mach/palmz72.h [new file with mode: 0644]
arch/arm/mach-pxa/include/mach/pm.h
arch/arm/mach-pxa/include/mach/poodle.h
arch/arm/mach-pxa/include/mach/pxa-regs.h
arch/arm/mach-pxa/include/mach/pxa3xx-regs.h
arch/arm/mach-pxa/include/mach/spitz.h
arch/arm/mach-pxa/include/mach/ssp.h
arch/arm/mach-pxa/include/mach/trizeps4.h
arch/arm/mach-pxa/include/mach/viper.h [new file with mode: 0644]
arch/arm/mach-pxa/irq.c
arch/arm/mach-pxa/leds-trizeps4.c [deleted file]
arch/arm/mach-pxa/leds.c
arch/arm/mach-pxa/littleton.c
arch/arm/mach-pxa/lpd270.c
arch/arm/mach-pxa/lubbock.c
arch/arm/mach-pxa/magician.c
arch/arm/mach-pxa/mainstone.c
arch/arm/mach-pxa/mfp-pxa2xx.c
arch/arm/mach-pxa/mioa701.c [new file with mode: 0644]
arch/arm/mach-pxa/mioa701_bootresume.S [new file with mode: 0644]
arch/arm/mach-pxa/mp900.c [new file with mode: 0644]
arch/arm/mach-pxa/palmtx.c
arch/arm/mach-pxa/palmz72.c [new file with mode: 0644]
arch/arm/mach-pxa/pcm027.c
arch/arm/mach-pxa/pcm990-baseboard.c
arch/arm/mach-pxa/pm.c
arch/arm/mach-pxa/poodle.c
arch/arm/mach-pxa/pxa25x.c
arch/arm/mach-pxa/pxa27x.c
arch/arm/mach-pxa/pxa3xx.c
arch/arm/mach-pxa/reset.c
arch/arm/mach-pxa/sharpsl_pm.c
arch/arm/mach-pxa/spitz.c
arch/arm/mach-pxa/spitz_pm.c
arch/arm/mach-pxa/ssp.c
arch/arm/mach-pxa/time.c
arch/arm/mach-pxa/trizeps4.c
arch/arm/mach-pxa/viper.c [new file with mode: 0644]
arch/arm/mach-pxa/zylonite.c
arch/arm/mach-pxa/zylonite_pxa300.c
arch/arm/mach-pxa/zylonite_pxa320.c
arch/arm/mach-realview/core.c
arch/arm/mach-realview/core.h
arch/arm/mach-realview/include/mach/system.h
arch/arm/mach-realview/localtimer.c
arch/arm/mach-realview/platsmp.c
arch/arm/mach-realview/realview_eb.c
arch/arm/mach-realview/realview_pb1176.c
arch/arm/mach-realview/realview_pb11mp.c
arch/arm/mach-rpc/dma.c
arch/arm/mach-rpc/include/mach/memory.h
arch/arm/mach-rpc/include/mach/system.h
arch/arm/mach-rpc/include/mach/uncompress.h
arch/arm/mach-rpc/irq.c
arch/arm/mach-rpc/riscpc.c
arch/arm/mach-s3c2400/gpio.c
arch/arm/mach-s3c2410/bast-irq.c
arch/arm/mach-s3c2410/clock.c
arch/arm/mach-s3c2410/gpio.c
arch/arm/mach-s3c2410/include/mach/system-reset.h
arch/arm/mach-s3c2410/include/mach/system.h
arch/arm/mach-s3c2410/mach-amlm5900.c
arch/arm/mach-s3c2410/mach-bast.c
arch/arm/mach-s3c2410/mach-h1940.c
arch/arm/mach-s3c2410/mach-n30.c
arch/arm/mach-s3c2410/mach-otom.c
arch/arm/mach-s3c2410/mach-qt2410.c
arch/arm/mach-s3c2410/mach-smdk2410.c
arch/arm/mach-s3c2410/mach-tct_hammer.c
arch/arm/mach-s3c2410/mach-vr1000.c
arch/arm/mach-s3c2410/pm.c
arch/arm/mach-s3c2410/s3c2410.c
arch/arm/mach-s3c2410/usb-simtec.c
arch/arm/mach-s3c2412/clock.c
arch/arm/mach-s3c2412/dma.c
arch/arm/mach-s3c2412/irq.c
arch/arm/mach-s3c2412/mach-smdk2413.c
arch/arm/mach-s3c2412/mach-vstms.c
arch/arm/mach-s3c2412/pm.c
arch/arm/mach-s3c2412/s3c2412.c
arch/arm/mach-s3c2440/clock.c
arch/arm/mach-s3c2440/dsc.c
arch/arm/mach-s3c2440/irq.c
arch/arm/mach-s3c2440/mach-anubis.c
arch/arm/mach-s3c2440/mach-nexcoder.c
arch/arm/mach-s3c2440/mach-osiris.c
arch/arm/mach-s3c2440/mach-rx3715.c
arch/arm/mach-s3c2440/mach-smdk2440.c
arch/arm/mach-s3c2440/s3c2440.c
arch/arm/mach-s3c2442/clock.c
arch/arm/mach-s3c2443/clock.c
arch/arm/mach-s3c2443/dma.c
arch/arm/mach-s3c2443/irq.c
arch/arm/mach-s3c2443/mach-smdk2443.c
arch/arm/mach-s3c2443/s3c2443.c
arch/arm/mach-sa1100/badge4.c
arch/arm/mach-sa1100/cpu-sa1100.c
arch/arm/mach-sa1100/cpu-sa1110.c
arch/arm/mach-sa1100/generic.c
arch/arm/mach-sa1100/include/mach/SA-1100.h
arch/arm/mach-sa1100/include/mach/hardware.h
arch/arm/mach-sa1100/include/mach/memory.h
arch/arm/mach-sa1100/irq.c
arch/arm/mach-sa1100/neponset.c
arch/arm/mach-sa1100/pleb.c
arch/arm/mach-sa1100/simpad.c
arch/arm/mach-sa1100/ssp.c
arch/arm/mach-shark/core.c
arch/arm/mach-shark/include/mach/system.h
arch/arm/mach-shark/irq.c
arch/arm/mach-shark/leds.c
arch/arm/mach-versatile/core.c
arch/arm/mach-versatile/include/mach/system.h
arch/arm/mach-versatile/pci.c
arch/arm/mach-versatile/versatile_ab.c
arch/arm/mach-versatile/versatile_pb.c
arch/arm/mm/Makefile
arch/arm/mm/abort-ev7.S
arch/arm/mm/abort-nommu.S
arch/arm/mm/alignment.c
arch/arm/mm/cache-l2x0.c
arch/arm/mm/cache-v7.S
arch/arm/mm/cache-xsc3l2.c
arch/arm/mm/copypage-v4mc.c
arch/arm/mm/copypage-v6.c
arch/arm/mm/copypage-xscale.c
arch/arm/mm/dma-mapping.c [moved from arch/arm/mm/consistent.c with 79% similarity]
arch/arm/mm/extable.c
arch/arm/mm/fault-armv.c
arch/arm/mm/fault.c
arch/arm/mm/flush.c
arch/arm/mm/init.c
arch/arm/mm/iomap.c
arch/arm/mm/ioremap.c
arch/arm/mm/mm.h
arch/arm/mm/mmap.c
arch/arm/mm/mmu.c
arch/arm/mm/nommu.c
arch/arm/mm/proc-arm1020.S
arch/arm/mm/proc-arm1020e.S
arch/arm/mm/proc-arm1022.S
arch/arm/mm/proc-arm1026.S
arch/arm/mm/proc-arm6_7.S
arch/arm/mm/proc-arm720.S
arch/arm/mm/proc-arm740.S
arch/arm/mm/proc-arm7tdmi.S
arch/arm/mm/proc-arm920.S
arch/arm/mm/proc-arm922.S
arch/arm/mm/proc-arm925.S
arch/arm/mm/proc-arm926.S
arch/arm/mm/proc-arm940.S
arch/arm/mm/proc-arm946.S
arch/arm/mm/proc-arm9tdmi.S
arch/arm/mm/proc-feroceon.S
arch/arm/mm/proc-macros.S
arch/arm/mm/proc-sa110.S
arch/arm/mm/proc-sa1100.S
arch/arm/mm/proc-v6.S
arch/arm/mm/proc-v7.S
arch/arm/mm/proc-xsc3.S
arch/arm/mm/proc-xscale.S
arch/arm/mm/tlb-v7.S
arch/arm/nwfpe/fpa11_cpdt.c
arch/arm/oprofile/Makefile
arch/arm/oprofile/backtrace.c
arch/arm/oprofile/common.c
arch/arm/oprofile/op_arm_model.h
arch/arm/oprofile/op_model_mpcore.c
arch/arm/oprofile/op_model_v7.c [new file with mode: 0644]
arch/arm/oprofile/op_model_v7.h [new file with mode: 0644]
arch/arm/oprofile/op_model_xscale.c
arch/arm/plat-iop/i2c.c
arch/arm/plat-iop/io.c
arch/arm/plat-iop/pci.c
arch/arm/plat-iop/time.c
arch/arm/plat-mxc/Kconfig
arch/arm/plat-mxc/Makefile
arch/arm/plat-mxc/devices.c [new file with mode: 0644]
arch/arm/plat-mxc/dma-mx1-mx2.c [new file with mode: 0644]
arch/arm/plat-mxc/include/mach/board-mx31ads.h
arch/arm/plat-mxc/include/mach/clock.h
arch/arm/plat-mxc/include/mach/common.h
arch/arm/plat-mxc/include/mach/dma-mx1-mx2.h [new file with mode: 0644]
arch/arm/plat-mxc/include/mach/entry-macro.S
arch/arm/plat-mxc/include/mach/iomux-mx1-mx2.h
arch/arm/plat-mxc/include/mach/iomux-mx3.h
arch/arm/plat-mxc/include/mach/irqs.h
arch/arm/plat-mxc/include/mach/mx27.h
arch/arm/plat-mxc/include/mach/mx31.h
arch/arm/plat-mxc/include/mach/mxc.h
arch/arm/plat-mxc/irq.c
arch/arm/plat-omap/clock.c
arch/arm/plat-omap/common.c
arch/arm/plat-omap/cpu-omap.c
arch/arm/plat-omap/debug-devices.c
arch/arm/plat-omap/debug-leds.c
arch/arm/plat-omap/devices.c
arch/arm/plat-omap/dmtimer.c
arch/arm/plat-omap/fb.c
arch/arm/plat-omap/gpio.c
arch/arm/plat-omap/include/mach/gpio.h
arch/arm/plat-omap/include/mach/irqs.h
arch/arm/plat-omap/mailbox.c
arch/arm/plat-omap/mux.c
arch/arm/plat-omap/ocpi.c
arch/arm/plat-omap/sram.c
arch/arm/plat-omap/usb.c
arch/arm/plat-s3c24xx/clock.c
arch/arm/plat-s3c24xx/common-smdk.c
arch/arm/plat-s3c24xx/cpu.c
arch/arm/plat-s3c24xx/devs.c
arch/arm/plat-s3c24xx/dma.c
arch/arm/plat-s3c24xx/gpio.c
arch/arm/plat-s3c24xx/irq.c
arch/arm/plat-s3c24xx/pm-simtec.c
arch/arm/plat-s3c24xx/pm.c
arch/arm/plat-s3c24xx/s3c244x-clock.c
arch/arm/plat-s3c24xx/s3c244x-irq.c
arch/arm/plat-s3c24xx/s3c244x.c
arch/arm/plat-s3c24xx/time.c
arch/arm/tools/mach-types
arch/arm/vfp/entry.S
arch/arm/vfp/vfphw.S
drivers/hwmon/Kconfig
drivers/hwmon/Makefile
drivers/hwmon/max1111.c [new file with mode: 0644]
drivers/i2c/busses/i2c-pxa.c
drivers/input/keyboard/corgikbd.c
drivers/input/keyboard/spitzkbd.c
drivers/input/keyboard/tosakbd.c
drivers/input/touchscreen/Kconfig
drivers/input/touchscreen/ads7846.c
drivers/input/touchscreen/ucb1400_ts.c
drivers/leds/Kconfig
drivers/leds/Makefile
drivers/leds/leds-corgi.c [deleted file]
drivers/leds/leds-spitz.c [deleted file]
drivers/media/video/pxa_camera.c
drivers/mfd/Kconfig
drivers/mfd/Makefile
drivers/mfd/ucb1400_core.c [new file with mode: 0644]
drivers/mmc/host/pxamci.c
drivers/mtd/nand/atmel_nand_ecc.h
drivers/mtd/nand/cmx270_nand.c
drivers/net/Kconfig
drivers/net/cs89x0.c
drivers/net/irda/pxaficp_ir.c
drivers/net/smc91x.c
drivers/net/smc91x.h
drivers/pcmcia/Kconfig
drivers/pcmcia/Makefile
drivers/pcmcia/pxa2xx_base.c
drivers/pcmcia/pxa2xx_cm_x255.c [new file with mode: 0644]
drivers/pcmcia/pxa2xx_cm_x270.c
drivers/pcmcia/pxa2xx_cm_x2xx.c [new file with mode: 0644]
drivers/pcmcia/pxa2xx_palmld.c [new file with mode: 0644]
drivers/pcmcia/pxa2xx_trizeps4.c [new file with mode: 0644]
drivers/pcmcia/pxa2xx_viper.c [new file with mode: 0644]
drivers/power/Kconfig
drivers/power/Makefile
drivers/power/palmtx_battery.c [deleted file]
drivers/power/wm97xx_battery.c [new file with mode: 0644]
drivers/serial/pxa.c
drivers/serial/serial_ks8695.c
drivers/usb/host/ohci-pxa27x.c
drivers/video/Kconfig
drivers/video/Makefile
drivers/video/am200epd.c [deleted file]
drivers/video/atmel_lcdfb.c
drivers/video/backlight/Kconfig
drivers/video/backlight/Makefile
drivers/video/backlight/corgi_lcd.c [new file with mode: 0644]
drivers/video/backlight/lcd.c
drivers/video/backlight/tdo24m.c [new file with mode: 0644]
drivers/video/fbmem.c
drivers/video/metronomefb.c
drivers/watchdog/ixp4xx_wdt.c
include/linux/lcd.h
include/linux/smc91x.h
include/linux/spi/ads7846.h
include/linux/spi/corgi_lcd.h [new file with mode: 0644]
include/linux/ucb1400.h [new file with mode: 0644]
include/linux/wm97xx_batt.h [new file with mode: 0644]
include/video/atmel_lcdc.h
include/video/metronomefb.h
sound/arm/pxa2xx-ac97.c
sound/soc/pxa/corgi.c
sound/soc/pxa/pxa2xx-ac97.c
sound/soc/pxa/pxa2xx-i2s.c
sound/soc/pxa/spitz.c

index b2ed6983f40d21483cfcbbd1e634533ca64e4115..46f9684d0b29d8550824073f0ddf925035b5c327 100644 (file)
@@ -135,11 +135,7 @@ when the Mic is inserted:-
 
 static int spitz_mic_bias(struct snd_soc_dapm_widget* w, int event)
 {
-       if(SND_SOC_DAPM_EVENT_ON(event))
-               set_scoop_gpio(&spitzscoop2_device.dev, SPITZ_SCP2_MIC_BIAS);
-       else
-               reset_scoop_gpio(&spitzscoop2_device.dev, SPITZ_SCP2_MIC_BIAS);
-
+       gpio_set_value(SPITZ_GPIO_MIC_BIAS, SND_SOC_DAPM_EVENT_ON(event));
        return 0;
 }
 
@@ -269,11 +265,7 @@ powered only when the spk is in use.
 /* turn speaker amplifier on/off depending on use */
 static int corgi_amp_event(struct snd_soc_dapm_widget *w, int event)
 {
-       if (SND_SOC_DAPM_EVENT_ON(event))
-               set_scoop_gpio(&corgiscoop_device.dev, CORGI_SCP_APM_ON);
-       else
-               reset_scoop_gpio(&corgiscoop_device.dev, CORGI_SCP_APM_ON);
-
+       gpio_set_value(CORGI_GPIO_APM_ON, SND_SOC_DAPM_EVENT_ON(event));
        return 0;
 }
 
index 0a613cb926c613e373138efd884e8fadd18f0382..c77df0f449de81d0b44127288c37b41d5b5de0c5 100644 (file)
@@ -466,6 +466,12 @@ M: kernel@wantstofly.org
 L:     linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only)
 S:     Maintained
 
+ARM/AFEB9260 MACHINE SUPPORT
+P:     Sergey Lapin
+M:     slapin@ossfans.org
+L:     linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only)
+S:     Maintained
+
 ARM/AJECO 1ARM MACHINE SUPPORT
 P:     Lennert Buytenhek
 M:     kernel@wantstofly.org
@@ -491,7 +497,7 @@ M:  kernel@wantstofly.org
 L:     linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only)
 S:     Maintained
 
-ARM/COMPULAB CM-X270/EM-X270 MACHINE SUPPORT
+ARM/COMPULAB CM-X270/EM-X270 and CM-X300 MACHINE SUPPORT
 P:     Mike Rapoport
 M:     mike@compulab.co.il
 L:     linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only)
@@ -623,6 +629,12 @@ M: marek.vasut@gmail.com
 W:     http://hackndev.com
 S:     Maintained
 
+ARM/PALMZ72 SUPPORT
+P:     Sergey Lapin
+M:     slapin@ossfans.org
+W:     http://hackndev.com
+S:     Maintained
+
 ARM/PLEB SUPPORT
 P:     Peter Chubb
 M:     pleb@gelato.unsw.edu.au
index ea3c858d7536785a670389ce536ae3da45f04c9c..5f6e34925a329ed10da0a59d498e218ea957562c 100644 (file)
@@ -148,7 +148,6 @@ config ARCH_MAY_HAVE_PC_FDC
 
 config ZONE_DMA
        bool
-       default y
 
 config GENERIC_ISA_DMA
        bool
@@ -178,6 +177,11 @@ config OPROFILE_MPCORE
 config OPROFILE_ARM11_CORE
        bool
 
+config OPROFILE_ARMV7
+       def_bool y
+       depends on CPU_V7 && !SMP
+       bool
+
 endif
 
 config VECTORS_BASE
@@ -245,6 +249,7 @@ config ARCH_CLPS7500
        select TIMER_ACORN
        select ISA
        select NO_IOPORT
+       select ARCH_SPARSEMEM_ENABLE
        help
          Support for the Cirrus Logic PS7500FE system-on-a-chip.
 
@@ -306,6 +311,7 @@ config ARCH_IOP13XX
        select PLAT_IOP
        select PCI
        select ARCH_SUPPORTS_MSI
+       select VMSPLIT_1G
        help
          Support for Intel's IOP13XX (XScale) family of processors.
 
@@ -350,6 +356,7 @@ config ARCH_IXP4XX
        select GENERIC_GPIO
        select GENERIC_TIME
        select GENERIC_CLOCKEVENTS
+       select ZONE_DMA if PCI
        help
          Support for Intel's IXP4XX (XScale) family of processors.
 
@@ -464,6 +471,7 @@ config ARCH_RPC
        select HAVE_PATA_PLATFORM
        select ISA_DMA_API
        select NO_IOPORT
+       select ARCH_SPARSEMEM_ENABLE
        help
          On the Acorn Risc-PC, Linux can support the internal IDE disk and
          CD-ROM interface, serial and parallel port, and the floppy drive.
@@ -471,9 +479,7 @@ config ARCH_RPC
 config ARCH_SA1100
        bool "SA1100-based"
        select ISA
-       select ARCH_DISCONTIGMEM_ENABLE
        select ARCH_SPARSEMEM_ENABLE
-       select ARCH_SELECT_MEMORY_MODEL
        select ARCH_MTD_XIP
        select GENERIC_GPIO
        select GENERIC_TIME
@@ -497,6 +503,7 @@ config ARCH_SHARK
        bool "Shark"
        select ISA
        select ISA_DMA
+       select ZONE_DMA
        select PCI
        help
          Support for the StrongARM based Digital DNARD machine, also known
@@ -504,6 +511,8 @@ config ARCH_SHARK
 
 config ARCH_LH7A40X
        bool "Sharp LH7A40X"
+       select ARCH_DISCONTIGMEM_ENABLE if !LH7A40X_CONTIGMEM
+       select ARCH_SPARSEMEM_ENABLE if !LH7A40X_CONTIGMEM
        help
          Say Y here for systems based on one of the Sharp LH7A40X
          System on a Chip processors.  These CPUs include an ARM922T
@@ -517,6 +526,7 @@ config ARCH_DAVINCI
        select GENERIC_GPIO
        select ARCH_REQUIRE_GPIOLIB
        select HAVE_CLK
+       select ZONE_DMA
        help
          Support for TI's DaVinci platform.
 
@@ -735,6 +745,29 @@ config SMP
 
          If you don't know what to do here, say N.
 
+choice
+       prompt "Memory split"
+       default VMSPLIT_3G
+       help
+         Select the desired split between kernel and user memory.
+
+         If you are not absolutely sure what you are doing, leave this
+         option alone!
+
+       config VMSPLIT_3G
+               bool "3G/1G user/kernel split"
+       config VMSPLIT_2G
+               bool "2G/2G user/kernel split"
+       config VMSPLIT_1G
+               bool "1G/3G user/kernel split"
+endchoice
+
+config PAGE_OFFSET
+       hex
+       default 0x40000000 if VMSPLIT_1G
+       default 0x80000000 if VMSPLIT_2G
+       default 0xC0000000
+
 config NR_CPUS
        int "Maximum number of CPUs (2-32)"
        range 2 32
@@ -816,20 +849,18 @@ config ARCH_FLATMEM_HAS_HOLES
        default y
        depends on FLATMEM
 
+# Discontigmem is deprecated
 config ARCH_DISCONTIGMEM_ENABLE
        bool
-       default (ARCH_LH7A40X && !LH7A40X_CONTIGMEM)
-       help
-         Say Y to support efficient handling of discontiguous physical memory,
-         for architectures which are either NUMA (Non-Uniform Memory Access)
-         or have huge holes in the physical address space for other reasons.
-         See <file:Documentation/vm/numa> for more.
 
 config ARCH_SPARSEMEM_ENABLE
        bool
 
+config ARCH_SPARSEMEM_DEFAULT
+       def_bool ARCH_SPARSEMEM_ENABLE
+
 config ARCH_SELECT_MEMORY_MODEL
-       bool
+       def_bool ARCH_DISCONTIGMEM_ENABLE && ARCH_SPARSEMEM_ENABLE
 
 config NODES_SHIFT
        int
@@ -846,7 +877,7 @@ config LEDS
                   ARCH_LUBBOCK || MACH_MAINSTONE || ARCH_NETWINDER || \
                   ARCH_OMAP || ARCH_P720T || ARCH_PXA_IDP || \
                   ARCH_SA1100 || ARCH_SHARK || ARCH_VERSATILE || \
-                  ARCH_AT91 || MACH_TRIZEPS4 || ARCH_DAVINCI || \
+                  ARCH_AT91 || ARCH_DAVINCI || \
                   ARCH_KS8695 || MACH_RD88F5182
        help
          If you say Y here, the LEDs on your machine will be used
@@ -1006,9 +1037,9 @@ config ATAGS_PROC
 
 endmenu
 
-if (ARCH_SA1100 || ARCH_INTEGRATOR || ARCH_OMAP || ARCH_IMX || ARCH_PXA)
+menu "CPU Power Management"
 
-menu "CPU Frequency scaling"
+if (ARCH_SA1100 || ARCH_INTEGRATOR || ARCH_OMAP || ARCH_IMX || ARCH_PXA)
 
 source "drivers/cpufreq/Kconfig"
 
@@ -1048,10 +1079,12 @@ config CPU_FREQ_PXA
        default y
        select CPU_FREQ_DEFAULT_GOV_USERSPACE
 
-endmenu
-
 endif
 
+source "drivers/cpuidle/Kconfig"
+
+endmenu
+
 menu "Floating point emulation"
 
 comment "At least one emulation must be selected"
@@ -1203,6 +1236,8 @@ source "drivers/power/Kconfig"
 
 source "drivers/hwmon/Kconfig"
 
+source "drivers/thermal/Kconfig"
+
 source "drivers/watchdog/Kconfig"
 
 source "drivers/ssb/Kconfig"
@@ -1223,6 +1258,10 @@ source "drivers/usb/Kconfig"
 
 source "drivers/mmc/Kconfig"
 
+source "drivers/memstick/Kconfig"
+
+source "drivers/accessibility/Kconfig"
+
 source "drivers/leds/Kconfig"
 
 source "drivers/rtc/Kconfig"
@@ -1231,6 +1270,8 @@ source "drivers/dma/Kconfig"
 
 source "drivers/dca/Kconfig"
 
+source "drivers/auxdisplay/Kconfig"
+
 source "drivers/regulator/Kconfig"
 
 source "drivers/uio/Kconfig"
index 703a44fa0f9b7c70814c17ab21e613eafcf4655a..e2274bc0b5441d249c225a0a49eb5474b490e14e 100644 (file)
@@ -47,7 +47,7 @@ comma = ,
 # Note that GCC does not numerically define an architecture version
 # macro, but instead defines a whole series of macros which makes
 # testing for a specific architecture or later rather impossible.
-arch-$(CONFIG_CPU_32v7)                :=-D__LINUX_ARM_ARCH__=7 $(call cc-option,-march=armv7a,-march=armv5t -Wa$(comma)-march=armv7a)
+arch-$(CONFIG_CPU_32v7)                :=-D__LINUX_ARM_ARCH__=7 $(call cc-option,-march=armv7-a,-march=armv5t -Wa$(comma)-march=armv7-a)
 arch-$(CONFIG_CPU_32v6)                :=-D__LINUX_ARM_ARCH__=6 $(call cc-option,-march=armv6,-march=armv5t -Wa$(comma)-march=armv6)
 # Only override the compiler option if ARMv6. The ARMv6K extensions are
 # always available in ARMv7
index 94462a097f86697ce51558bd9389a4886b904318..7a03f200788255924f225c807b967fdb09d01eae 100644 (file)
@@ -76,7 +76,7 @@ KBUILD_CFLAGS = $(subst -pg, , $(ORIG_CFLAGS))
 endif
 
 EXTRA_CFLAGS  := -fpic -fno-builtin
-EXTRA_AFLAGS  :=
+EXTRA_AFLAGS  := -Wa,-march=all
 
 # Supply ZRELADDR, INITRD_PHYS and PARAMS_PHYS to the decompressor via
 # linker symbols.  We only define initrd_phys and params_phys if the
index d42f89b7760bf2c537d3f4769bbc53715af7b6b5..84a1e0496a3c6ffb7b1adbfa38182341ca943c27 100644 (file)
@@ -421,6 +421,7 @@ __setup_mmu:        sub     r3, r4, #16384          @ Page directory size
                add     r1, r1, #1048576
                str     r1, [r0]
                mov     pc, lr
+ENDPROC(__setup_mmu)
 
 __armv4_mmu_cache_on:
                mov     r12, lr
@@ -801,7 +802,7 @@ loop1:
                add     r2, r2, #4              @ add 4 (line length offset)
                ldr     r4, =0x3ff
                ands    r4, r4, r1, lsr #3      @ find maximum number on the way size
-               .word   0xe16f5f14              @ clz r5, r4 - find bit position of way size increment
+               clz     r5, r4                  @ find bit position of way size increment
                ldr     r7, =0x7fff
                ands    r7, r7, r1, lsr #13     @ extract max number of the index size
 loop2:
index 3e073467caca6b63a5515b2bd9afb543ca233e2e..2e32acca02fbb83374c74f67e1fba340cfaa9a2c 100644 (file)
@@ -12,7 +12,8 @@ config ICST307
 
 config SA1111
        bool
-       select DMABOUNCE
+       select DMABOUNCE if !ARCH_PXA
+       select ZONE_DMA if !ARCH_PXA
 
 config DMABOUNCE
        bool
index aecc6c3f908fd2dd5a79e31a847d1c9cd1cc2568..f030f0775be7d11016d14ed4add82c16be38d254 100644 (file)
@@ -154,9 +154,7 @@ alloc_safe_buffer(struct dmabounce_device_info *device_info, void *ptr,
 #endif
 
        write_lock_irqsave(&device_info->lock, flags);
-
        list_add(&buf->node, &device_info->safe_buffers);
-
        write_unlock_irqrestore(&device_info->lock, flags);
 
        return buf;
@@ -205,8 +203,22 @@ free_safe_buffer(struct dmabounce_device_info *device_info, struct safe_buffer *
 
 /* ************************************************** */
 
-static inline dma_addr_t
-map_single(struct device *dev, void *ptr, size_t size,
+static struct safe_buffer *find_safe_buffer_dev(struct device *dev,
+               dma_addr_t dma_addr, const char *where)
+{
+       if (!dev || !dev->archdata.dmabounce)
+               return NULL;
+       if (dma_mapping_error(dev, dma_addr)) {
+               if (dev)
+                       dev_err(dev, "Trying to %s invalid mapping\n", where);
+               else
+                       pr_err("unknown device: Trying to %s invalid mapping\n", where);
+               return NULL;
+       }
+       return find_safe_buffer(dev->archdata.dmabounce, dma_addr);
+}
+
+static inline dma_addr_t map_single(struct device *dev, void *ptr, size_t size,
                enum dma_data_direction dir)
 {
        struct dmabounce_device_info *device_info = dev->archdata.dmabounce;
@@ -270,33 +282,21 @@ map_single(struct device *dev, void *ptr, size_t size,
        return dma_addr;
 }
 
-static inline void
-unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size,
-               enum dma_data_direction dir)
+static inline void unmap_single(struct device *dev, dma_addr_t dma_addr,
+               size_t size, enum dma_data_direction dir)
 {
-       struct dmabounce_device_info *device_info = dev->archdata.dmabounce;
-       struct safe_buffer *buf = NULL;
-
-       /*
-        * Trying to unmap an invalid mapping
-        */
-       if (dma_mapping_error(dev, dma_addr)) {
-               dev_err(dev, "Trying to unmap invalid mapping\n");
-               return;
-       }
-
-       if (device_info)
-               buf = find_safe_buffer(device_info, dma_addr);
+       struct safe_buffer *buf = find_safe_buffer_dev(dev, dma_addr, "unmap");
 
        if (buf) {
                BUG_ON(buf->size != size);
+               BUG_ON(buf->direction != dir);
 
                dev_dbg(dev,
                        "%s: unsafe buffer %p (dma=%#x) mapped to %p (dma=%#x)\n",
                        __func__, buf->ptr, virt_to_dma(dev, buf->ptr),
                        buf->safe, buf->safe_dma_addr);
 
-               DO_STATS ( device_info->bounce_count++ );
+               DO_STATS(dev->archdata.dmabounce->bounce_count++);
 
                if (dir == DMA_FROM_DEVICE || dir == DMA_BIDIRECTIONAL) {
                        void *ptr = buf->ptr;
@@ -317,74 +317,7 @@ unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size,
                        dmac_clean_range(ptr, ptr + size);
                        outer_clean_range(__pa(ptr), __pa(ptr) + size);
                }
-               free_safe_buffer(device_info, buf);
-       }
-}
-
-static int sync_single(struct device *dev, dma_addr_t dma_addr, size_t size,
-                       enum dma_data_direction dir)
-{
-       struct dmabounce_device_info *device_info = dev->archdata.dmabounce;
-       struct safe_buffer *buf = NULL;
-
-       if (device_info)
-               buf = find_safe_buffer(device_info, dma_addr);
-
-       if (buf) {
-               /*
-                * Both of these checks from original code need to be
-                * commented out b/c some drivers rely on the following:
-                *
-                * 1) Drivers may map a large chunk of memory into DMA space
-                *    but only sync a small portion of it. Good example is
-                *    allocating a large buffer, mapping it, and then
-                *    breaking it up into small descriptors. No point
-                *    in syncing the whole buffer if you only have to
-                *    touch one descriptor.
-                *
-                * 2) Buffers that are mapped as DMA_BIDIRECTIONAL are
-                *    usually only synced in one dir at a time.
-                *
-                * See drivers/net/eepro100.c for examples of both cases.
-                *
-                * -ds
-                *
-                * BUG_ON(buf->size != size);
-                * BUG_ON(buf->direction != dir);
-                */
-
-               dev_dbg(dev,
-                       "%s: unsafe buffer %p (dma=%#x) mapped to %p (dma=%#x)\n",
-                       __func__, buf->ptr, virt_to_dma(dev, buf->ptr),
-                       buf->safe, buf->safe_dma_addr);
-
-               DO_STATS ( device_info->bounce_count++ );
-
-               switch (dir) {
-               case DMA_FROM_DEVICE:
-                       dev_dbg(dev,
-                               "%s: copy back safe %p to unsafe %p size %d\n",
-                               __func__, buf->safe, buf->ptr, size);
-                       memcpy(buf->ptr, buf->safe, size);
-                       break;
-               case DMA_TO_DEVICE:
-                       dev_dbg(dev,
-                               "%s: copy out unsafe %p to safe %p, size %d\n",
-                               __func__,buf->ptr, buf->safe, size);
-                       memcpy(buf->safe, buf->ptr, size);
-                       break;
-               case DMA_BIDIRECTIONAL:
-                       BUG();  /* is this allowed?  what does it mean? */
-               default:
-                       BUG();
-               }
-               /*
-                * No need to sync the safe buffer - it was allocated
-                * via the coherent allocators.
-                */
-               return 0;
-       } else {
-               return 1;
+               free_safe_buffer(dev->archdata.dmabounce, buf);
        }
 }
 
@@ -396,21 +329,29 @@ static int sync_single(struct device *dev, dma_addr_t dma_addr, size_t size,
  * substitute the safe buffer for the unsafe one.
  * (basically move the buffer from an unsafe area to a safe one)
  */
-dma_addr_t
-dma_map_single(struct device *dev, void *ptr, size_t size,
+dma_addr_t dma_map_single(struct device *dev, void *ptr, size_t size,
                enum dma_data_direction dir)
 {
-       dma_addr_t dma_addr;
-
        dev_dbg(dev, "%s(ptr=%p,size=%d,dir=%x)\n",
                __func__, ptr, size, dir);
 
-       BUG_ON(dir == DMA_NONE);
+       BUG_ON(!valid_dma_direction(dir));
 
-       dma_addr = map_single(dev, ptr, size, dir);
+       return map_single(dev, ptr, size, dir);
+}
+EXPORT_SYMBOL(dma_map_single);
 
-       return dma_addr;
+dma_addr_t dma_map_page(struct device *dev, struct page *page,
+               unsigned long offset, size_t size, enum dma_data_direction dir)
+{
+       dev_dbg(dev, "%s(page=%p,off=%#lx,size=%zx,dir=%x)\n",
+               __func__, page, offset, size, dir);
+
+       BUG_ON(!valid_dma_direction(dir));
+
+       return map_single(dev, page_address(page) + offset, size, dir);
 }
+EXPORT_SYMBOL(dma_map_page);
 
 /*
  * see if a mapped address was really a "safe" buffer and if so, copy
@@ -419,126 +360,76 @@ dma_map_single(struct device *dev, void *ptr, size_t size,
  * should be)
  */
 
-void
-dma_unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size,
-                       enum dma_data_direction dir)
+void dma_unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size,
+               enum dma_data_direction dir)
 {
        dev_dbg(dev, "%s(ptr=%p,size=%d,dir=%x)\n",
                __func__, (void *) dma_addr, size, dir);
 
-       BUG_ON(dir == DMA_NONE);
-
        unmap_single(dev, dma_addr, size, dir);
 }
+EXPORT_SYMBOL(dma_unmap_single);
 
-int
-dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
-               enum dma_data_direction dir)
+int dmabounce_sync_for_cpu(struct device *dev, dma_addr_t addr,
+               unsigned long off, size_t sz, enum dma_data_direction dir)
 {
-       int i;
-
-       dev_dbg(dev, "%s(sg=%p,nents=%d,dir=%x)\n",
-               __func__, sg, nents, dir);
-
-       BUG_ON(dir == DMA_NONE);
-
-       for (i = 0; i < nents; i++, sg++) {
-               struct page *page = sg_page(sg);
-               unsigned int offset = sg->offset;
-               unsigned int length = sg->length;
-               void *ptr = page_address(page) + offset;
+       struct safe_buffer *buf;
 
-               sg->dma_address =
-                       map_single(dev, ptr, length, dir);
-       }
+       dev_dbg(dev, "%s(dma=%#x,off=%#lx,sz=%zx,dir=%x)\n",
+               __func__, addr, off, sz, dir);
 
-       return nents;
-}
-
-void
-dma_unmap_sg(struct device *dev, struct scatterlist *sg, int nents,
-               enum dma_data_direction dir)
-{
-       int i;
+       buf = find_safe_buffer_dev(dev, addr, __func__);
+       if (!buf)
+               return 1;
 
-       dev_dbg(dev, "%s(sg=%p,nents=%d,dir=%x)\n",
-               __func__, sg, nents, dir);
+       BUG_ON(buf->direction != dir);
 
-       BUG_ON(dir == DMA_NONE);
+       dev_dbg(dev, "%s: unsafe buffer %p (dma=%#x) mapped to %p (dma=%#x)\n",
+               __func__, buf->ptr, virt_to_dma(dev, buf->ptr),
+               buf->safe, buf->safe_dma_addr);
 
-       for (i = 0; i < nents; i++, sg++) {
-               dma_addr_t dma_addr = sg->dma_address;
-               unsigned int length = sg->length;
+       DO_STATS(dev->archdata.dmabounce->bounce_count++);
 
-               unmap_single(dev, dma_addr, length, dir);
+       if (dir == DMA_FROM_DEVICE || dir == DMA_BIDIRECTIONAL) {
+               dev_dbg(dev, "%s: copy back safe %p to unsafe %p size %d\n",
+                       __func__, buf->safe + off, buf->ptr + off, sz);
+               memcpy(buf->ptr + off, buf->safe + off, sz);
        }
+       return 0;
 }
+EXPORT_SYMBOL(dmabounce_sync_for_cpu);
 
-void dma_sync_single_range_for_cpu(struct device *dev, dma_addr_t dma_addr,
-                                  unsigned long offset, size_t size,
-                                  enum dma_data_direction dir)
-{
-       dev_dbg(dev, "%s(dma=%#x,off=%#lx,size=%zx,dir=%x)\n",
-               __func__, dma_addr, offset, size, dir);
-
-       if (sync_single(dev, dma_addr, offset + size, dir))
-               dma_cache_maint(dma_to_virt(dev, dma_addr) + offset, size, dir);
-}
-EXPORT_SYMBOL(dma_sync_single_range_for_cpu);
-
-void dma_sync_single_range_for_device(struct device *dev, dma_addr_t dma_addr,
-                                     unsigned long offset, size_t size,
-                                     enum dma_data_direction dir)
-{
-       dev_dbg(dev, "%s(dma=%#x,off=%#lx,size=%zx,dir=%x)\n",
-               __func__, dma_addr, offset, size, dir);
-
-       if (sync_single(dev, dma_addr, offset + size, dir))
-               dma_cache_maint(dma_to_virt(dev, dma_addr) + offset, size, dir);
-}
-EXPORT_SYMBOL(dma_sync_single_range_for_device);
-
-void
-dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, int nents,
-                       enum dma_data_direction dir)
+int dmabounce_sync_for_device(struct device *dev, dma_addr_t addr,
+               unsigned long off, size_t sz, enum dma_data_direction dir)
 {
-       int i;
-
-       dev_dbg(dev, "%s(sg=%p,nents=%d,dir=%x)\n",
-               __func__, sg, nents, dir);
-
-       BUG_ON(dir == DMA_NONE);
+       struct safe_buffer *buf;
 
-       for (i = 0; i < nents; i++, sg++) {
-               dma_addr_t dma_addr = sg->dma_address;
-               unsigned int length = sg->length;
+       dev_dbg(dev, "%s(dma=%#x,off=%#lx,sz=%zx,dir=%x)\n",
+               __func__, addr, off, sz, dir);
 
-               sync_single(dev, dma_addr, length, dir);
-       }
-}
-
-void
-dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, int nents,
-                       enum dma_data_direction dir)
-{
-       int i;
+       buf = find_safe_buffer_dev(dev, addr, __func__);
+       if (!buf)
+               return 1;
 
-       dev_dbg(dev, "%s(sg=%p,nents=%d,dir=%x)\n",
-               __func__, sg, nents, dir);
+       BUG_ON(buf->direction != dir);
 
-       BUG_ON(dir == DMA_NONE);
+       dev_dbg(dev, "%s: unsafe buffer %p (dma=%#x) mapped to %p (dma=%#x)\n",
+               __func__, buf->ptr, virt_to_dma(dev, buf->ptr),
+               buf->safe, buf->safe_dma_addr);
 
-       for (i = 0; i < nents; i++, sg++) {
-               dma_addr_t dma_addr = sg->dma_address;
-               unsigned int length = sg->length;
+       DO_STATS(dev->archdata.dmabounce->bounce_count++);
 
-               sync_single(dev, dma_addr, length, dir);
+       if (dir == DMA_TO_DEVICE || dir == DMA_BIDIRECTIONAL) {
+               dev_dbg(dev, "%s: copy out unsafe %p to safe %p, size %d\n",
+                       __func__,buf->ptr + off, buf->safe + off, sz);
+               memcpy(buf->safe + off, buf->ptr + off, sz);
        }
+       return 0;
 }
+EXPORT_SYMBOL(dmabounce_sync_for_device);
 
-static int
-dmabounce_init_pool(struct dmabounce_pool *pool, struct device *dev, const char *name,
-                   unsigned long size)
+static int dmabounce_init_pool(struct dmabounce_pool *pool, struct device *dev,
+               const char *name, unsigned long size)
 {
        pool->size = size;
        DO_STATS(pool->allocs = 0);
@@ -549,9 +440,8 @@ dmabounce_init_pool(struct dmabounce_pool *pool, struct device *dev, const char
        return pool->pool ? 0 : -ENOMEM;
 }
 
-int
-dmabounce_register_dev(struct device *dev, unsigned long small_buffer_size,
-                       unsigned long large_buffer_size)
+int dmabounce_register_dev(struct device *dev, unsigned long small_buffer_size,
+               unsigned long large_buffer_size)
 {
        struct dmabounce_device_info *device_info;
        int ret;
@@ -607,9 +497,9 @@ dmabounce_register_dev(struct device *dev, unsigned long small_buffer_size,
        kfree(device_info);
        return ret;
 }
+EXPORT_SYMBOL(dmabounce_register_dev);
 
-void
-dmabounce_unregister_dev(struct device *dev)
+void dmabounce_unregister_dev(struct device *dev)
 {
        struct dmabounce_device_info *device_info = dev->archdata.dmabounce;
 
@@ -642,15 +532,6 @@ dmabounce_unregister_dev(struct device *dev)
 
        dev_info(dev, "dmabounce: device unregistered\n");
 }
-
-
-EXPORT_SYMBOL(dma_map_single);
-EXPORT_SYMBOL(dma_unmap_single);
-EXPORT_SYMBOL(dma_map_sg);
-EXPORT_SYMBOL(dma_unmap_sg);
-EXPORT_SYMBOL(dma_sync_sg_for_cpu);
-EXPORT_SYMBOL(dma_sync_sg_for_device);
-EXPORT_SYMBOL(dmabounce_register_dev);
 EXPORT_SYMBOL(dmabounce_unregister_dev);
 
 MODULE_AUTHOR("Christopher Hoover <ch@hpl.hp.com>, Deepak Saxena <dsaxena@plexity.net>");
index 0c89bd35e06fb495dbaddfe2796c6d88a28cea87..7fc9860a97d79b5dcf73cb97c6d3de9ca9530af3 100644 (file)
@@ -27,9 +27,9 @@
 #include <linux/list.h>
 #include <linux/smp.h>
 #include <linux/cpumask.h>
+#include <linux/io.h>
 
 #include <asm/irq.h>
-#include <asm/io.h>
 #include <asm/mach/irq.h>
 #include <asm/hardware/gic.h>
 
index 5fe9588db077be52b1cebc1c11484e843e11a6d7..2793447621c300a34d6266ddd2b2b3dffefbe7d9 100644 (file)
@@ -66,14 +66,6 @@ static void it8152_unmask_irq(unsigned int irq)
        }
 }
 
-static inline void it8152_irq(int irq)
-{
-       struct irq_desc *desc;
-
-       desc = irq_desc + irq;
-       desc_handle_irq(irq, desc);
-}
-
 static struct irq_chip it8152_irq_chip = {
        .name           = "it8152",
        .ack            = it8152_mask_irq,
@@ -128,21 +120,21 @@ void it8152_irq_demux(unsigned int irq, struct irq_desc *desc)
               bits_pd &= ((1 << IT8152_PD_IRQ_COUNT) - 1);
               while (bits_pd) {
                       i = __ffs(bits_pd);
-                      it8152_irq(IT8152_PD_IRQ(i));
+                      generic_handle_irq(IT8152_PD_IRQ(i));
                       bits_pd &= ~(1 << i);
               }
 
               bits_lp &= ((1 << IT8152_LP_IRQ_COUNT) - 1);
               while (bits_lp) {
                       i = __ffs(bits_lp);
-                      it8152_irq(IT8152_LP_IRQ(i));
+                      generic_handle_irq(IT8152_LP_IRQ(i));
                       bits_lp &= ~(1 << i);
               }
 
               bits_ld &= ((1 << IT8152_LD_IRQ_COUNT) - 1);
               while (bits_ld) {
                       i = __ffs(bits_ld);
-                      it8152_irq(IT8152_LD_IRQ(i));
+                      generic_handle_irq(IT8152_LD_IRQ(i));
                       bits_ld &= ~(1 << i);
               }
        }
index 283051eaf931c7b1f02b58690ec7239d25eed9d7..7c6b4b99a2df1c98027a6adaee4a87dbe6371554 100644 (file)
@@ -24,9 +24,9 @@
 #include <linux/platform_device.h>
 #include <linux/slab.h>
 #include <linux/spinlock.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/mach/irq.h>
 
@@ -169,7 +169,6 @@ static struct locomo_dev_info locomo_devices[] = {
 static void locomo_handler(unsigned int irq, struct irq_desc *desc)
 {
        int req, i;
-       struct irq_desc *d;
        void __iomem *mapbase = get_irq_chip_data(irq);
 
        /* Acknowledge the parent IRQ */
@@ -181,10 +180,9 @@ static void locomo_handler(unsigned int irq, struct irq_desc *desc)
        if (req) {
                /* generate the next interrupt(s) */
                irq = LOCOMO_IRQ_START;
-               d = irq_desc + irq;
-               for (i = 0; i <= 3; i++, d++, irq++) {
+               for (i = 0; i <= 3; i++, irq++) {
                        if (req & (0x0100 << i)) {
-                               desc_handle_irq(irq, d);
+                               generic_handle_irq(irq);
                        }
 
                }
@@ -222,12 +220,10 @@ static struct irq_chip locomo_chip = {
 
 static void locomo_key_handler(unsigned int irq, struct irq_desc *desc)
 {
-       struct irq_desc *d;
        void __iomem *mapbase = get_irq_chip_data(irq);
 
        if (locomo_readl(mapbase + LOCOMO_KEYBOARD + LOCOMO_KIC) & 0x0001) {
-               d = irq_desc + LOCOMO_IRQ_KEY_START;
-               desc_handle_irq(LOCOMO_IRQ_KEY_START, d);
+               generic_handle_irq(LOCOMO_IRQ_KEY_START);
        }
 }
 
@@ -268,7 +264,6 @@ static struct irq_chip locomo_key_chip = {
 static void locomo_gpio_handler(unsigned int irq, struct irq_desc *desc)
 {
        int req, i;
-       struct irq_desc *d;
        void __iomem *mapbase = get_irq_chip_data(irq);
 
        req =   locomo_readl(mapbase + LOCOMO_GIR) &
@@ -277,10 +272,9 @@ static void locomo_gpio_handler(unsigned int irq, struct irq_desc *desc)
 
        if (req) {
                irq = LOCOMO_IRQ_GPIO_START;
-               d = irq_desc + LOCOMO_IRQ_GPIO_START;
-               for (i = 0; i <= 15; i++, irq++, d++) {
+               for (i = 0; i <= 15; i++, irq++) {
                        if (req & (0x0001 << i)) {
-                               desc_handle_irq(irq, d);
+                               generic_handle_irq(irq);
                        }
                }
        }
@@ -361,12 +355,10 @@ static struct irq_chip locomo_gpio_chip = {
 
 static void locomo_lt_handler(unsigned int irq, struct irq_desc *desc)
 {
-       struct irq_desc *d;
        void __iomem *mapbase = get_irq_chip_data(irq);
 
        if (locomo_readl(mapbase + LOCOMO_LTINT) & 0x0001) {
-               d = irq_desc + LOCOMO_IRQ_LT_START;
-               desc_handle_irq(LOCOMO_IRQ_LT_START, d);
+               generic_handle_irq(LOCOMO_IRQ_LT_START);
        }
 }
 
@@ -407,17 +399,15 @@ static struct irq_chip locomo_lt_chip = {
 static void locomo_spi_handler(unsigned int irq, struct irq_desc *desc)
 {
        int req, i;
-       struct irq_desc *d;
        void __iomem *mapbase = get_irq_chip_data(irq);
 
        req = locomo_readl(mapbase + LOCOMO_SPI + LOCOMO_SPIIR) & 0x000F;
        if (req) {
                irq = LOCOMO_IRQ_SPI_START;
-               d = irq_desc + irq;
 
-               for (i = 0; i <= 3; i++, irq++, d++) {
+               for (i = 0; i <= 3; i++, irq++) {
                        if (req & (0x0001 << i)) {
-                               desc_handle_irq(irq, d);
+                               generic_handle_irq(irq);
                        }
                }
        }
index ec8a5471bf06df84b2c54441619724631fc54b4c..fb86f248aab84c2aa73f5d8c383f745c2d5e3e15 100644 (file)
 #include <linux/spinlock.h>
 #include <linux/dma-mapping.h>
 #include <linux/clk.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
 #include <asm/mach-types.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/mach/irq.h>
 #include <asm/sizes.h>
index ae39553589ddbf34b37f37e0d2c3c3d67a1b4e9c..697c64913990f8682362bc325a795ca752afce4c 100644 (file)
@@ -15,7 +15,7 @@
 #include <linux/string.h>
 #include <linux/slab.h>
 #include <linux/platform_device.h>
-#include <asm/io.h>
+#include <linux/io.h>
 #include <asm/gpio.h>
 #include <asm/hardware/scoop.h>
 
index aad4d94ba8f50611c21c59fcd3d9f1be287fc422..d56c932580eb201439c8a63aa401abddd157cbbf 100644 (file)
@@ -12,6 +12,7 @@
  */
 
 #include <linux/kernel.h>
+#include <linux/module.h>
 #include <linux/string.h>
 #include <asm/mach/sharpsl_param.h>
 
@@ -36,6 +37,7 @@
 #define PHAD_MAGIC     MAGIC_CHG('P','H','A','D')
 
 struct sharpsl_param_info sharpsl_param;
+EXPORT_SYMBOL(sharpsl_param);
 
 void sharpsl_save_param(void)
 {
index df0983aafe694b6e58cab75da60e2eeff5ddb673..deeed561b168267564ffa41309e230678156a3c4 100644 (file)
@@ -17,9 +17,9 @@
 #include <linux/init.h>
 #include <linux/interrupt.h>
 #include <linux/irq.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/hardware/ioc.h>
 
 #include <asm/mach/time.h>
index 7ecd3c0ab011a2c1196c9c61bdd0c34296c4b659..b520e56216a9517d520b4da35d71ff88525d114a 100644 (file)
@@ -16,9 +16,9 @@
 #include <linux/slab.h>
 #include <linux/module.h>
 #include <linux/string.h>
+#include <linux/io.h>
 #include <mach/hardware.h>
 #include <asm/hardware/uengine.h>
-#include <asm/io.h>
 
 #if defined(CONFIG_ARCH_IXP2000)
 #define IXP_UENGINE_CSR_VIRT_BASE      IXP2000_UENGINE_CSR_VIRT_BASE
index 79a8206e62ac3f01a214a242036dc5ebadd9dc36..8421d39109b3a6ba28c16b3ccbd4efa4af4fb44a 100644 (file)
@@ -4,8 +4,8 @@
 #include <linux/mm.h>
 #include <linux/init.h>
 #include <linux/ioport.h>
+#include <linux/io.h>
 
-#include <asm/io.h>
 #include <asm/system.h>
 
 #include <asm/mach/pci.h>
index c026fa2214a3f5000b28eaf206e2275d001f5c5f..f1e4b8f60cab026e773514e61d3ee682f478fc01 100644 (file)
@@ -20,8 +20,8 @@
  */
 #include <linux/init.h>
 #include <linux/list.h>
+#include <linux/io.h>
 
-#include <asm/io.h>
 #include <asm/mach/irq.h>
 #include <asm/hardware/vic.h>
 
diff --git a/arch/arm/configs/afeb9260_defconfig b/arch/arm/configs/afeb9260_defconfig
new file mode 100644 (file)
index 0000000..ce90958
--- /dev/null
@@ -0,0 +1,1259 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.27-rc2
+# Tue Aug 12 22:30:16 2008
+#
+CONFIG_ARM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_GENERIC_GPIO=y
+CONFIG_GENERIC_TIME=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_MMU=y
+# CONFIG_NO_IOPORT is not set
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_STACKTRACE_SUPPORT=y
+CONFIG_HAVE_LATENCYTOP_SUPPORT=y
+CONFIG_LOCKDEP_SUPPORT=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_ARCH_SUPPORTS_AOUT=y
+CONFIG_ZONE_DMA=y
+CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
+CONFIG_VECTORS_BASE=0xffff0000
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# General setup
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_LOCK_KERNEL=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+CONFIG_LOCALVERSION=""
+# CONFIG_LOCALVERSION_AUTO is not set
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+CONFIG_SYSVIPC_SYSCTL=y
+# CONFIG_POSIX_MQUEUE is not set
+# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_TASKSTATS is not set
+# CONFIG_AUDIT is not set
+# CONFIG_IKCONFIG is not set
+CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_CGROUPS is not set
+# CONFIG_GROUP_SCHED is not set
+CONFIG_SYSFS_DEPRECATED=y
+CONFIG_SYSFS_DEPRECATED_V2=y
+# CONFIG_RELAY is not set
+CONFIG_NAMESPACES=y
+# CONFIG_UTS_NS is not set
+# CONFIG_IPC_NS is not set
+# CONFIG_USER_NS is not set
+# CONFIG_PID_NS is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+# CONFIG_EMBEDDED is not set
+CONFIG_UID16=y
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_SYSCTL_SYSCALL_CHECK=y
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_ALL is not set
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_COMPAT_BRK=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_ANON_INODES=y
+CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_TIMERFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_SLAB=y
+# CONFIG_SLUB is not set
+# CONFIG_SLOB is not set
+# CONFIG_PROFILING is not set
+# CONFIG_MARKERS is not set
+CONFIG_HAVE_OPROFILE=y
+# CONFIG_KPROBES is not set
+# CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS is not set
+# CONFIG_HAVE_IOREMAP_PROT is not set
+CONFIG_HAVE_KPROBES=y
+CONFIG_HAVE_KRETPROBES=y
+# CONFIG_HAVE_ARCH_TRACEHOOK is not set
+# CONFIG_HAVE_DMA_ATTRS is not set
+# CONFIG_USE_GENERIC_SMP_HELPERS is not set
+CONFIG_HAVE_CLK=y
+CONFIG_PROC_PAGE_MONITOR=y
+CONFIG_HAVE_GENERIC_DMA_COHERENT=y
+CONFIG_SLABINFO=y
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+CONFIG_MODULES=y
+# CONFIG_MODULE_FORCE_LOAD is not set
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_KMOD=y
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF is not set
+# CONFIG_BLK_DEV_BSG is not set
+# CONFIG_BLK_DEV_INTEGRITY is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+# CONFIG_IOSCHED_DEADLINE is not set
+# CONFIG_IOSCHED_CFQ is not set
+CONFIG_DEFAULT_AS=y
+# CONFIG_DEFAULT_DEADLINE is not set
+# CONFIG_DEFAULT_CFQ is not set
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="anticipatory"
+CONFIG_CLASSIC_RCU=y
+
+#
+# System Type
+#
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+CONFIG_ARCH_AT91=y
+# CONFIG_ARCH_CLPS7500 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_IOP13XX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IXP23XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_KIRKWOOD is not set
+# CONFIG_ARCH_KS8695 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_LOKI is not set
+# CONFIG_ARCH_MV78XX0 is not set
+# CONFIG_ARCH_MXC is not set
+# CONFIG_ARCH_ORION5X is not set
+# CONFIG_ARCH_PNX4008 is not set
+# CONFIG_ARCH_PXA is not set
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 is not set
+# CONFIG_ARCH_S3C2410 is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_DAVINCI is not set
+# CONFIG_ARCH_OMAP is not set
+# CONFIG_ARCH_MSM7X00A is not set
+
+#
+# Boot options
+#
+
+#
+# Power management
+#
+
+#
+# Atmel AT91 System-on-Chip
+#
+# CONFIG_ARCH_AT91RM9200 is not set
+CONFIG_ARCH_AT91SAM9260=y
+# CONFIG_ARCH_AT91SAM9261 is not set
+# CONFIG_ARCH_AT91SAM9263 is not set
+# CONFIG_ARCH_AT91SAM9RL is not set
+# CONFIG_ARCH_AT91SAM9G20 is not set
+# CONFIG_ARCH_AT91CAP9 is not set
+# CONFIG_ARCH_AT91X40 is not set
+CONFIG_AT91_PMC_UNIT=y
+
+#
+# AT91SAM9260 Variants
+#
+# CONFIG_ARCH_AT91SAM9260_SAM9XE is not set
+
+#
+# AT91SAM9260 / AT91SAM9XE Board Type
+#
+# CONFIG_MACH_AT91SAM9260EK is not set
+# CONFIG_MACH_CAM60 is not set
+# CONFIG_MACH_SAM9_L9260 is not set
+CONFIG_MACH_AFEB9260=y
+# CONFIG_MACH_USB_A9260 is not set
+# CONFIG_MACH_QIL_A9260 is not set
+
+#
+# AT91 Board Options
+#
+
+#
+# AT91 Feature Selections
+#
+CONFIG_AT91_PROGRAMMABLE_CLOCKS=y
+CONFIG_AT91_TIMER_HZ=100
+CONFIG_AT91_EARLY_DBGU=y
+# CONFIG_AT91_EARLY_USART0 is not set
+# CONFIG_AT91_EARLY_USART1 is not set
+# CONFIG_AT91_EARLY_USART2 is not set
+# CONFIG_AT91_EARLY_USART3 is not set
+# CONFIG_AT91_EARLY_USART4 is not set
+# CONFIG_AT91_EARLY_USART5 is not set
+
+#
+# Processor Type
+#
+CONFIG_CPU_32=y
+CONFIG_CPU_ARM926T=y
+CONFIG_CPU_32v5=y
+CONFIG_CPU_ABRT_EV5TJ=y
+CONFIG_CPU_PABRT_NOIFAR=y
+CONFIG_CPU_CACHE_VIVT=y
+CONFIG_CPU_COPY_V4WB=y
+CONFIG_CPU_TLB_V4WBI=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+
+#
+# Processor Features
+#
+CONFIG_ARM_THUMB=y
+# CONFIG_CPU_ICACHE_DISABLE is not set
+# CONFIG_CPU_DCACHE_DISABLE is not set
+# CONFIG_CPU_DCACHE_WRITETHROUGH is not set
+# CONFIG_CPU_CACHE_ROUND_ROBIN is not set
+# CONFIG_OUTER_CACHE is not set
+
+#
+# Bus support
+#
+# CONFIG_PCI_SYSCALL is not set
+# CONFIG_ARCH_SUPPORTS_MSI is not set
+# CONFIG_PCCARD is not set
+
+#
+# Kernel Features
+#
+# CONFIG_TICK_ONESHOT is not set
+# CONFIG_NO_HZ is not set
+# CONFIG_HIGH_RES_TIMERS is not set
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
+CONFIG_PREEMPT=y
+CONFIG_HZ=100
+CONFIG_AEABI=y
+CONFIG_OABI_COMPAT=y
+# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+# CONFIG_SPARSEMEM_STATIC is not set
+# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
+CONFIG_PAGEFLAGS_EXTENDED=y
+CONFIG_SPLIT_PTLOCK_CPUS=4096
+# CONFIG_RESOURCES_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=1
+CONFIG_BOUNCE=y
+CONFIG_VIRT_TO_BUS=y
+# CONFIG_LEDS is not set
+CONFIG_ALIGNMENT_TRAP=y
+
+#
+# Boot options
+#
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_CMDLINE="mem=64M console=ttyS0,115200 initrd=0x21100000,3145728 root=/dev/ram0 rw"
+# CONFIG_XIP_KERNEL is not set
+# CONFIG_KEXEC is not set
+
+#
+# Floating point emulation
+#
+
+#
+# At least one emulation must be selected
+#
+CONFIG_FPE_NWFPE=y
+# CONFIG_FPE_NWFPE_XP is not set
+# CONFIG_FPE_FASTFPE is not set
+# CONFIG_VFP is not set
+
+#
+# Userspace binary formats
+#
+CONFIG_BINFMT_ELF=y
+# CONFIG_BINFMT_AOUT is not set
+# CONFIG_BINFMT_MISC is not set
+
+#
+# Power management options
+#
+# CONFIG_PM is not set
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=y
+# CONFIG_PACKET_MMAP is not set
+CONFIG_UNIX=y
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+# CONFIG_IP_MULTICAST is not set
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_PNP=y
+# CONFIG_IP_PNP_DHCP is not set
+CONFIG_IP_PNP_BOOTP=y
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_ARPD is not set
+# CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
+# CONFIG_INET_TUNNEL is not set
+# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
+# CONFIG_INET_XFRM_MODE_TUNNEL is not set
+# CONFIG_INET_XFRM_MODE_BEET is not set
+# CONFIG_INET_LRO is not set
+CONFIG_INET_DIAG=y
+CONFIG_INET_TCP_DIAG=y
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
+# CONFIG_IPV6 is not set
+# CONFIG_NETWORK_SECMARK is not set
+# CONFIG_NETFILTER is not set
+# CONFIG_IP_DCCP is not set
+# CONFIG_IP_SCTP is not set
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_CAN is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
+# CONFIG_AF_RXRPC is not set
+
+#
+# Wireless
+#
+# CONFIG_CFG80211 is not set
+# CONFIG_WIRELESS_EXT is not set
+# CONFIG_MAC80211 is not set
+# CONFIG_IEEE80211 is not set
+# CONFIG_RFKILL is not set
+# CONFIG_NET_9P is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=y
+CONFIG_FIRMWARE_IN_KERNEL=y
+CONFIG_EXTRA_FIRMWARE=""
+# CONFIG_DEBUG_DRIVER is not set
+# CONFIG_DEBUG_DEVRES is not set
+# CONFIG_SYS_HYPERVISOR is not set
+# CONFIG_CONNECTOR is not set
+CONFIG_MTD=y
+# CONFIG_MTD_DEBUG is not set
+# CONFIG_MTD_CONCAT is not set
+CONFIG_MTD_PARTITIONS=y
+# CONFIG_MTD_REDBOOT_PARTS is not set
+# CONFIG_MTD_CMDLINE_PARTS is not set
+# CONFIG_MTD_AFS_PARTS is not set
+# CONFIG_MTD_AR7_PARTS is not set
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=y
+CONFIG_MTD_BLKDEVS=y
+CONFIG_MTD_BLOCK=y
+# CONFIG_FTL is not set
+# CONFIG_NFTL is not set
+# CONFIG_INFTL is not set
+# CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
+# CONFIG_MTD_OOPS is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+# CONFIG_MTD_CFI is not set
+# CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+# CONFIG_MTD_RAM is not set
+# CONFIG_MTD_ROM is not set
+# CONFIG_MTD_ABSENT is not set
+
+#
+# Mapping drivers for chip access
+#
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+# CONFIG_MTD_PLATRAM is not set
+
+#
+# Self-contained MTD device drivers
+#
+CONFIG_MTD_DATAFLASH=y
+# CONFIG_MTD_M25P80 is not set
+# CONFIG_MTD_SLRAM is not set
+# CONFIG_MTD_PHRAM is not set
+# CONFIG_MTD_MTDRAM is not set
+# CONFIG_MTD_BLOCK2MTD is not set
+
+#
+# Disk-On-Chip Device Drivers
+#
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+# CONFIG_MTD_DOC2001PLUS is not set
+CONFIG_MTD_NAND=y
+# CONFIG_MTD_NAND_VERIFY_WRITE is not set
+# CONFIG_MTD_NAND_ECC_SMC is not set
+# CONFIG_MTD_NAND_MUSEUM_IDS is not set
+CONFIG_MTD_NAND_IDS=y
+# CONFIG_MTD_NAND_DISKONCHIP is not set
+CONFIG_MTD_NAND_ATMEL=y
+# CONFIG_MTD_NAND_ATMEL_ECC_HW is not set
+CONFIG_MTD_NAND_ATMEL_ECC_SOFT=y
+# CONFIG_MTD_NAND_ATMEL_ECC_NONE is not set
+# CONFIG_MTD_NAND_NANDSIM is not set
+# CONFIG_MTD_NAND_PLATFORM is not set
+# CONFIG_MTD_ALAUDA is not set
+# CONFIG_MTD_ONENAND is not set
+
+#
+# UBI - Unsorted block images
+#
+# CONFIG_MTD_UBI is not set
+# CONFIG_PARPORT is not set
+CONFIG_BLK_DEV=y
+# CONFIG_BLK_DEV_COW_COMMON is not set
+# CONFIG_BLK_DEV_LOOP is not set
+# CONFIG_BLK_DEV_NBD is not set
+# CONFIG_BLK_DEV_UB is not set
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_COUNT=16
+CONFIG_BLK_DEV_RAM_SIZE=8192
+# CONFIG_BLK_DEV_XIP is not set
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+CONFIG_MISC_DEVICES=y
+# CONFIG_ATMEL_PWM is not set
+# CONFIG_ATMEL_TCLIB is not set
+# CONFIG_EEPROM_93CX6 is not set
+CONFIG_ATMEL_SSC=y
+# CONFIG_ENCLOSURE_SERVICES is not set
+CONFIG_HAVE_IDE=y
+# CONFIG_IDE is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+CONFIG_SCSI=y
+CONFIG_SCSI_DMA=y
+# CONFIG_SCSI_TGT is not set
+# CONFIG_SCSI_NETLINK is not set
+CONFIG_SCSI_PROC_FS=y
+
+#
+# SCSI support type (disk, tape, CD-ROM)
+#
+CONFIG_BLK_DEV_SD=y
+# CONFIG_CHR_DEV_ST is not set
+# CONFIG_CHR_DEV_OSST is not set
+# CONFIG_BLK_DEV_SR is not set
+# CONFIG_CHR_DEV_SG is not set
+# CONFIG_CHR_DEV_SCH is not set
+
+#
+# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
+#
+CONFIG_SCSI_MULTI_LUN=y
+# CONFIG_SCSI_CONSTANTS is not set
+# CONFIG_SCSI_LOGGING is not set
+# CONFIG_SCSI_SCAN_ASYNC is not set
+CONFIG_SCSI_WAIT_SCAN=m
+
+#
+# SCSI Transports
+#
+# CONFIG_SCSI_SPI_ATTRS is not set
+# CONFIG_SCSI_FC_ATTRS is not set
+# CONFIG_SCSI_ISCSI_ATTRS is not set
+# CONFIG_SCSI_SAS_LIBSAS is not set
+# CONFIG_SCSI_SRP_ATTRS is not set
+CONFIG_SCSI_LOWLEVEL=y
+# CONFIG_ISCSI_TCP is not set
+# CONFIG_SCSI_DEBUG is not set
+# CONFIG_SCSI_DH is not set
+# CONFIG_ATA is not set
+# CONFIG_MD is not set
+CONFIG_NETDEVICES=y
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_MACVLAN is not set
+# CONFIG_EQUALIZER is not set
+# CONFIG_TUN is not set
+# CONFIG_VETH is not set
+CONFIG_PHYLIB=y
+
+#
+# MII PHY device drivers
+#
+# CONFIG_MARVELL_PHY is not set
+# CONFIG_DAVICOM_PHY is not set
+# CONFIG_QSEMI_PHY is not set
+# CONFIG_LXT_PHY is not set
+# CONFIG_CICADA_PHY is not set
+# CONFIG_VITESSE_PHY is not set
+# CONFIG_SMSC_PHY is not set
+# CONFIG_BROADCOM_PHY is not set
+# CONFIG_ICPLUS_PHY is not set
+# CONFIG_REALTEK_PHY is not set
+# CONFIG_FIXED_PHY is not set
+# CONFIG_MDIO_BITBANG is not set
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=y
+CONFIG_MACB=y
+# CONFIG_AX88796 is not set
+# CONFIG_SMC91X is not set
+# CONFIG_DM9000 is not set
+# CONFIG_ENC28J60 is not set
+# CONFIG_IBM_NEW_EMAC_ZMII is not set
+# CONFIG_IBM_NEW_EMAC_RGMII is not set
+# CONFIG_IBM_NEW_EMAC_TAH is not set
+# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+# CONFIG_B44 is not set
+# CONFIG_NETDEV_1000 is not set
+# CONFIG_NETDEV_10000 is not set
+
+#
+# Wireless LAN
+#
+# CONFIG_WLAN_PRE80211 is not set
+# CONFIG_WLAN_80211 is not set
+# CONFIG_IWLWIFI_LEDS is not set
+
+#
+# USB Network Adapters
+#
+# CONFIG_USB_CATC is not set
+# CONFIG_USB_KAWETH is not set
+# CONFIG_USB_PEGASUS is not set
+# CONFIG_USB_RTL8150 is not set
+# CONFIG_USB_USBNET is not set
+# CONFIG_WAN is not set
+# CONFIG_PPP is not set
+# CONFIG_SLIP is not set
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+# CONFIG_ISDN is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+# CONFIG_INPUT_POLLDEV is not set
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=y
+# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
+# CONFIG_INPUT_JOYDEV is not set
+# CONFIG_INPUT_EVDEV is not set
+# CONFIG_INPUT_EVBUG is not set
+
+#
+# Input Device Drivers
+#
+# CONFIG_INPUT_KEYBOARD is not set
+# CONFIG_INPUT_MOUSE is not set
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TABLET is not set
+# CONFIG_INPUT_TOUCHSCREEN is not set
+# CONFIG_INPUT_MISC is not set
+
+#
+# Hardware I/O ports
+#
+# CONFIG_SERIO is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_CONSOLE_TRANSLATIONS=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+# CONFIG_VT_HW_CONSOLE_BINDING is not set
+CONFIG_DEVKMEM=y
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+# CONFIG_SERIAL_8250 is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_ATMEL=y
+CONFIG_SERIAL_ATMEL_CONSOLE=y
+CONFIG_SERIAL_ATMEL_PDC=y
+# CONFIG_SERIAL_ATMEL_TTYAT is not set
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+CONFIG_UNIX98_PTYS=y
+CONFIG_LEGACY_PTYS=y
+CONFIG_LEGACY_PTY_COUNT=256
+# CONFIG_IPMI_HANDLER is not set
+# CONFIG_HW_RANDOM is not set
+# CONFIG_NVRAM is not set
+# CONFIG_R3964 is not set
+# CONFIG_RAW_DRIVER is not set
+# CONFIG_TCG_TPM is not set
+CONFIG_I2C=y
+CONFIG_I2C_BOARDINFO=y
+CONFIG_I2C_CHARDEV=y
+CONFIG_I2C_HELPER_AUTO=y
+CONFIG_I2C_ALGOBIT=y
+
+#
+# I2C Hardware Bus support
+#
+
+#
+# I2C system bus drivers (mostly embedded / system-on-chip)
+#
+CONFIG_I2C_GPIO=y
+# CONFIG_I2C_OCORES is not set
+# CONFIG_I2C_SIMTEC is not set
+
+#
+# External I2C/SMBus adapter drivers
+#
+# CONFIG_I2C_PARPORT_LIGHT is not set
+# CONFIG_I2C_TAOS_EVM is not set
+# CONFIG_I2C_TINY_USB is not set
+
+#
+# Other I2C/SMBus bus drivers
+#
+# CONFIG_I2C_PCA_PLATFORM is not set
+# CONFIG_I2C_STUB is not set
+
+#
+# Miscellaneous I2C Chip support
+#
+# CONFIG_DS1682 is not set
+CONFIG_AT24=y
+# CONFIG_SENSORS_EEPROM is not set
+# CONFIG_SENSORS_PCF8574 is not set
+# CONFIG_PCF8575 is not set
+# CONFIG_SENSORS_PCA9539 is not set
+# CONFIG_SENSORS_PCF8591 is not set
+# CONFIG_SENSORS_MAX6875 is not set
+# CONFIG_SENSORS_TSL2550 is not set
+# CONFIG_I2C_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+# CONFIG_I2C_DEBUG_CHIP is not set
+CONFIG_SPI=y
+CONFIG_SPI_DEBUG=y
+CONFIG_SPI_MASTER=y
+
+#
+# SPI Master Controller Drivers
+#
+CONFIG_SPI_ATMEL=y
+# CONFIG_SPI_BITBANG is not set
+
+#
+# SPI Protocol Masters
+#
+# CONFIG_SPI_AT25 is not set
+CONFIG_SPI_SPIDEV=y
+# CONFIG_SPI_TLE62X0 is not set
+# CONFIG_W1 is not set
+# CONFIG_POWER_SUPPLY is not set
+# CONFIG_HWMON is not set
+CONFIG_WATCHDOG=y
+CONFIG_WATCHDOG_NOWAYOUT=y
+
+#
+# Watchdog Device Drivers
+#
+# CONFIG_SOFT_WATCHDOG is not set
+
+#
+# USB-based Watchdog Cards
+#
+# CONFIG_USBPCWATCHDOG is not set
+
+#
+# Sonics Silicon Backplane
+#
+CONFIG_SSB_POSSIBLE=y
+# CONFIG_SSB is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_CORE is not set
+# CONFIG_MFD_SM501 is not set
+# CONFIG_HTC_PASIC3 is not set
+# CONFIG_MFD_TMIO is not set
+# CONFIG_MFD_T7L66XB is not set
+# CONFIG_MFD_TC6387XB is not set
+
+#
+# Multimedia devices
+#
+
+#
+# Multimedia core support
+#
+# CONFIG_VIDEO_DEV is not set
+# CONFIG_DVB_CORE is not set
+# CONFIG_VIDEO_MEDIA is not set
+
+#
+# Multimedia drivers
+#
+# CONFIG_DAB is not set
+
+#
+# Graphics support
+#
+# CONFIG_VGASTATE is not set
+# CONFIG_VIDEO_OUTPUT_CONTROL is not set
+# CONFIG_FB is not set
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
+
+#
+# Display device support
+#
+# CONFIG_DISPLAY_SUPPORT is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+# CONFIG_SOUND is not set
+CONFIG_HID_SUPPORT=y
+CONFIG_HID=y
+# CONFIG_HID_DEBUG is not set
+# CONFIG_HIDRAW is not set
+
+#
+# USB Input Devices
+#
+# CONFIG_USB_HID is not set
+
+#
+# USB HID Boot Protocol drivers
+#
+# CONFIG_USB_KBD is not set
+# CONFIG_USB_MOUSE is not set
+CONFIG_USB_SUPPORT=y
+CONFIG_USB_ARCH_HAS_HCD=y
+CONFIG_USB_ARCH_HAS_OHCI=y
+# CONFIG_USB_ARCH_HAS_EHCI is not set
+CONFIG_USB=y
+# CONFIG_USB_DEBUG is not set
+# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set
+
+#
+# Miscellaneous USB options
+#
+CONFIG_USB_DEVICEFS=y
+CONFIG_USB_DEVICE_CLASS=y
+# CONFIG_USB_DYNAMIC_MINORS is not set
+# CONFIG_USB_OTG is not set
+
+#
+# USB Host Controller Drivers
+#
+# CONFIG_USB_C67X00_HCD is not set
+# CONFIG_USB_ISP116X_HCD is not set
+# CONFIG_USB_ISP1760_HCD is not set
+CONFIG_USB_OHCI_HCD=y
+# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
+# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
+CONFIG_USB_OHCI_LITTLE_ENDIAN=y
+# CONFIG_USB_SL811_HCD is not set
+# CONFIG_USB_R8A66597_HCD is not set
+
+#
+# USB Device Class drivers
+#
+# CONFIG_USB_ACM is not set
+# CONFIG_USB_PRINTER is not set
+# CONFIG_USB_WDM is not set
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
+
+#
+# may also be needed; see USB_STORAGE Help for more information
+#
+CONFIG_USB_STORAGE=y
+# CONFIG_USB_STORAGE_DEBUG is not set
+# CONFIG_USB_STORAGE_DATAFAB is not set
+# CONFIG_USB_STORAGE_FREECOM is not set
+# CONFIG_USB_STORAGE_ISD200 is not set
+# CONFIG_USB_STORAGE_DPCM is not set
+# CONFIG_USB_STORAGE_USBAT is not set
+# CONFIG_USB_STORAGE_SDDR09 is not set
+# CONFIG_USB_STORAGE_SDDR55 is not set
+# CONFIG_USB_STORAGE_JUMPSHOT is not set
+# CONFIG_USB_STORAGE_ALAUDA is not set
+# CONFIG_USB_STORAGE_ONETOUCH is not set
+# CONFIG_USB_STORAGE_KARMA is not set
+# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
+# CONFIG_USB_LIBUSUAL is not set
+
+#
+# USB Imaging devices
+#
+# CONFIG_USB_MDC800 is not set
+# CONFIG_USB_MICROTEK is not set
+CONFIG_USB_MON=y
+
+#
+# USB port drivers
+#
+# CONFIG_USB_SERIAL is not set
+
+#
+# USB Miscellaneous drivers
+#
+# CONFIG_USB_EMI62 is not set
+# CONFIG_USB_EMI26 is not set
+# CONFIG_USB_ADUTUX is not set
+# CONFIG_USB_AUERSWALD is not set
+# CONFIG_USB_RIO500 is not set
+# CONFIG_USB_LEGOTOWER is not set
+# CONFIG_USB_LCD is not set
+# CONFIG_USB_BERRY_CHARGE is not set
+# CONFIG_USB_LED is not set
+# CONFIG_USB_CYPRESS_CY7C63 is not set
+# CONFIG_USB_CYTHERM is not set
+# CONFIG_USB_PHIDGET is not set
+# CONFIG_USB_IDMOUSE is not set
+# CONFIG_USB_FTDI_ELAN is not set
+# CONFIG_USB_APPLEDISPLAY is not set
+# CONFIG_USB_LD is not set
+# CONFIG_USB_TRANCEVIBRATOR is not set
+# CONFIG_USB_IOWARRIOR is not set
+# CONFIG_USB_TEST is not set
+# CONFIG_USB_ISIGHTFW is not set
+CONFIG_USB_GADGET=y
+# CONFIG_USB_GADGET_DEBUG is not set
+# CONFIG_USB_GADGET_DEBUG_FILES is not set
+CONFIG_USB_GADGET_SELECTED=y
+# CONFIG_USB_GADGET_AMD5536UDC is not set
+# CONFIG_USB_GADGET_ATMEL_USBA is not set
+# CONFIG_USB_GADGET_FSL_USB2 is not set
+# CONFIG_USB_GADGET_NET2280 is not set
+# CONFIG_USB_GADGET_PXA25X is not set
+# CONFIG_USB_GADGET_M66592 is not set
+# CONFIG_USB_GADGET_PXA27X is not set
+# CONFIG_USB_GADGET_GOKU is not set
+# CONFIG_USB_GADGET_LH7A40X is not set
+# CONFIG_USB_GADGET_OMAP is not set
+# CONFIG_USB_GADGET_S3C2410 is not set
+CONFIG_USB_GADGET_AT91=y
+CONFIG_USB_AT91=y
+# CONFIG_USB_GADGET_DUMMY_HCD is not set
+# CONFIG_USB_GADGET_DUALSPEED is not set
+CONFIG_USB_ZERO=m
+# CONFIG_USB_ETH is not set
+CONFIG_USB_GADGETFS=m
+CONFIG_USB_FILE_STORAGE=m
+# CONFIG_USB_FILE_STORAGE_TEST is not set
+CONFIG_USB_G_SERIAL=m
+# CONFIG_USB_MIDI_GADGET is not set
+# CONFIG_USB_G_PRINTER is not set
+# CONFIG_USB_CDC_COMPOSITE is not set
+# CONFIG_MMC is not set
+# CONFIG_NEW_LEDS is not set
+CONFIG_RTC_LIB=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_HCTOSYS=y
+CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
+CONFIG_RTC_DEBUG=y
+
+#
+# RTC interfaces
+#
+CONFIG_RTC_INTF_SYSFS=y
+CONFIG_RTC_INTF_PROC=y
+CONFIG_RTC_INTF_DEV=y
+# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
+# CONFIG_RTC_DRV_TEST is not set
+
+#
+# I2C RTC drivers
+#
+# CONFIG_RTC_DRV_DS1307 is not set
+# CONFIG_RTC_DRV_DS1374 is not set
+# CONFIG_RTC_DRV_DS1672 is not set
+# CONFIG_RTC_DRV_MAX6900 is not set
+# CONFIG_RTC_DRV_RS5C372 is not set
+# CONFIG_RTC_DRV_ISL1208 is not set
+# CONFIG_RTC_DRV_X1205 is not set
+# CONFIG_RTC_DRV_PCF8563 is not set
+# CONFIG_RTC_DRV_PCF8583 is not set
+# CONFIG_RTC_DRV_M41T80 is not set
+# CONFIG_RTC_DRV_S35390A is not set
+CONFIG_RTC_DRV_FM3130=y
+
+#
+# SPI RTC drivers
+#
+# CONFIG_RTC_DRV_M41T94 is not set
+# CONFIG_RTC_DRV_DS1305 is not set
+# CONFIG_RTC_DRV_MAX6902 is not set
+# CONFIG_RTC_DRV_R9701 is not set
+# CONFIG_RTC_DRV_RS5C348 is not set
+
+#
+# Platform RTC drivers
+#
+# CONFIG_RTC_DRV_CMOS is not set
+# CONFIG_RTC_DRV_DS1511 is not set
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+# CONFIG_RTC_DRV_STK17TA8 is not set
+# CONFIG_RTC_DRV_M48T86 is not set
+# CONFIG_RTC_DRV_M48T59 is not set
+# CONFIG_RTC_DRV_V3020 is not set
+
+#
+# on-CPU RTC drivers
+#
+# CONFIG_RTC_DRV_AT91SAM9 is not set
+# CONFIG_DMADEVICES is not set
+
+#
+# Voltage and Current regulators
+#
+# CONFIG_REGULATOR is not set
+# CONFIG_REGULATOR_FIXED_VOLTAGE is not set
+# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set
+# CONFIG_REGULATOR_BQ24022 is not set
+# CONFIG_UIO is not set
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
+# CONFIG_EXT2_FS_XIP is not set
+CONFIG_EXT3_FS=y
+CONFIG_EXT3_FS_XATTR=y
+# CONFIG_EXT3_FS_POSIX_ACL is not set
+# CONFIG_EXT3_FS_SECURITY is not set
+# CONFIG_EXT4DEV_FS is not set
+CONFIG_JBD=y
+CONFIG_FS_MBCACHE=y
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
+# CONFIG_XFS_FS is not set
+# CONFIG_OCFS2_FS is not set
+CONFIG_DNOTIFY=y
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+# CONFIG_QUOTA is not set
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_AUTOFS4_FS is not set
+# CONFIG_FUSE_FS is not set
+
+#
+# CD-ROM/DVD Filesystems
+#
+# CONFIG_ISO9660_FS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=y
+# CONFIG_MSDOS_FS is not set
+CONFIG_VFAT_FS=y
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLB_PAGE is not set
+# CONFIG_CONFIGFS_FS is not set
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+CONFIG_JFFS2_FS=y
+CONFIG_JFFS2_FS_DEBUG=0
+CONFIG_JFFS2_FS_WRITEBUFFER=y
+# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
+# CONFIG_JFFS2_SUMMARY is not set
+# CONFIG_JFFS2_FS_XATTR is not set
+# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
+CONFIG_JFFS2_ZLIB=y
+# CONFIG_JFFS2_LZO is not set
+CONFIG_JFFS2_RTIME=y
+# CONFIG_JFFS2_RUBIN is not set
+CONFIG_CRAMFS=y
+# CONFIG_VXFS_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_OMFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_ROMFS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+CONFIG_NETWORK_FILESYSTEMS=y
+CONFIG_NFS_FS=y
+CONFIG_NFS_V3=y
+# CONFIG_NFS_V3_ACL is not set
+# CONFIG_NFS_V4 is not set
+CONFIG_ROOT_NFS=y
+# CONFIG_NFSD is not set
+CONFIG_LOCKD=y
+CONFIG_LOCKD_V4=y
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=y
+# CONFIG_RPCSEC_GSS_KRB5 is not set
+# CONFIG_RPCSEC_GSS_SPKM3 is not set
+# CONFIG_SMB_FS is not set
+# CONFIG_CIFS is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+
+#
+# Partition Types
+#
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_MSDOS_PARTITION=y
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="iso8859-1"
+CONFIG_NLS_CODEPAGE_437=y
+# CONFIG_NLS_CODEPAGE_737 is not set
+# CONFIG_NLS_CODEPAGE_775 is not set
+CONFIG_NLS_CODEPAGE_850=y
+# CONFIG_NLS_CODEPAGE_852 is not set
+# CONFIG_NLS_CODEPAGE_855 is not set
+# CONFIG_NLS_CODEPAGE_857 is not set
+# CONFIG_NLS_CODEPAGE_860 is not set
+# CONFIG_NLS_CODEPAGE_861 is not set
+# CONFIG_NLS_CODEPAGE_862 is not set
+# CONFIG_NLS_CODEPAGE_863 is not set
+# CONFIG_NLS_CODEPAGE_864 is not set
+# CONFIG_NLS_CODEPAGE_865 is not set
+# CONFIG_NLS_CODEPAGE_866 is not set
+# CONFIG_NLS_CODEPAGE_869 is not set
+# CONFIG_NLS_CODEPAGE_936 is not set
+# CONFIG_NLS_CODEPAGE_950 is not set
+# CONFIG_NLS_CODEPAGE_932 is not set
+# CONFIG_NLS_CODEPAGE_949 is not set
+# CONFIG_NLS_CODEPAGE_874 is not set
+# CONFIG_NLS_ISO8859_8 is not set
+# CONFIG_NLS_CODEPAGE_1250 is not set
+# CONFIG_NLS_CODEPAGE_1251 is not set
+# CONFIG_NLS_ASCII is not set
+CONFIG_NLS_ISO8859_1=y
+# CONFIG_NLS_ISO8859_2 is not set
+# CONFIG_NLS_ISO8859_3 is not set
+# CONFIG_NLS_ISO8859_4 is not set
+# CONFIG_NLS_ISO8859_5 is not set
+# CONFIG_NLS_ISO8859_6 is not set
+# CONFIG_NLS_ISO8859_7 is not set
+# CONFIG_NLS_ISO8859_9 is not set
+# CONFIG_NLS_ISO8859_13 is not set
+# CONFIG_NLS_ISO8859_14 is not set
+# CONFIG_NLS_ISO8859_15 is not set
+# CONFIG_NLS_KOI8_R is not set
+# CONFIG_NLS_KOI8_U is not set
+# CONFIG_NLS_UTF8 is not set
+# CONFIG_DLM is not set
+
+#
+# Kernel hacking
+#
+# CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_WARN_DEPRECATED=y
+CONFIG_ENABLE_MUST_CHECK=y
+CONFIG_FRAME_WARN=1024
+# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
+# CONFIG_DEBUG_FS is not set
+# CONFIG_HEADERS_CHECK is not set
+CONFIG_DEBUG_KERNEL=y
+# CONFIG_DEBUG_SHIRQ is not set
+CONFIG_DETECT_SOFTLOCKUP=y
+# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
+CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
+CONFIG_SCHED_DEBUG=y
+# CONFIG_SCHEDSTATS is not set
+# CONFIG_TIMER_STATS is not set
+# CONFIG_DEBUG_OBJECTS is not set
+# CONFIG_DEBUG_SLAB is not set
+CONFIG_DEBUG_PREEMPT=y
+# CONFIG_DEBUG_RT_MUTEXES is not set
+# CONFIG_RT_MUTEX_TESTER is not set
+# CONFIG_DEBUG_SPINLOCK is not set
+# CONFIG_DEBUG_MUTEXES is not set
+# CONFIG_DEBUG_LOCK_ALLOC is not set
+# CONFIG_PROVE_LOCKING is not set
+# CONFIG_LOCK_STAT is not set
+# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+# CONFIG_DEBUG_KOBJECT is not set
+CONFIG_DEBUG_BUGVERBOSE=y
+CONFIG_DEBUG_INFO=y
+# CONFIG_DEBUG_VM is not set
+# CONFIG_DEBUG_WRITECOUNT is not set
+CONFIG_DEBUG_MEMORY_INIT=y
+# CONFIG_DEBUG_LIST is not set
+# CONFIG_DEBUG_SG is not set
+CONFIG_FRAME_POINTER=y
+# CONFIG_BOOT_PRINTK_DELAY is not set
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_BACKTRACE_SELF_TEST is not set
+# CONFIG_FAULT_INJECTION is not set
+# CONFIG_LATENCYTOP is not set
+CONFIG_HAVE_FTRACE=y
+CONFIG_HAVE_DYNAMIC_FTRACE=y
+# CONFIG_FTRACE is not set
+# CONFIG_IRQSOFF_TRACER is not set
+# CONFIG_PREEMPT_TRACER is not set
+# CONFIG_SCHED_TRACER is not set
+# CONFIG_CONTEXT_SWITCH_TRACER is not set
+# CONFIG_SAMPLES is not set
+CONFIG_HAVE_ARCH_KGDB=y
+# CONFIG_KGDB is not set
+CONFIG_DEBUG_USER=y
+# CONFIG_DEBUG_ERRORS is not set
+# CONFIG_DEBUG_STACK_USAGE is not set
+CONFIG_DEBUG_LL=y
+# CONFIG_DEBUG_ICEDCC is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+# CONFIG_SECURITY_FILE_CAPABILITIES is not set
+# CONFIG_CRYPTO is not set
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+# CONFIG_GENERIC_FIND_FIRST_BIT is not set
+# CONFIG_GENERIC_FIND_NEXT_BIT is not set
+# CONFIG_CRC_CCITT is not set
+# CONFIG_CRC16 is not set
+CONFIG_CRC_T10DIF=y
+# CONFIG_CRC_ITU_T is not set
+CONFIG_CRC32=y
+# CONFIG_CRC7 is not set
+# CONFIG_LIBCRC32C is not set
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_DEFLATE=y
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
index 1c76642272a1bde973eabeb7a4f0164bded8b36a..811bebbdc7845adc837ee62597660c76b55a1aca 100644 (file)
@@ -496,6 +496,7 @@ CONFIG_INPUT_TOUCHSCREEN=y
 # CONFIG_TOUCHSCREEN_PENMOUNT is not set
 # CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
 # CONFIG_TOUCHSCREEN_TOUCHWIN is not set
+CONFIG_TOUCHSCREEN_ATMEL_TSADCC=y
 # CONFIG_TOUCHSCREEN_UCB1400 is not set
 # CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set
 # CONFIG_INPUT_MISC is not set
diff --git a/arch/arm/configs/cm_x300_defconfig b/arch/arm/configs/cm_x300_defconfig
new file mode 100644 (file)
index 0000000..46f1c9d
--- /dev/null
@@ -0,0 +1,1466 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.27-rc3
+# Tue Aug 19 11:26:54 2008
+#
+CONFIG_ARM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_GENERIC_GPIO=y
+CONFIG_GENERIC_TIME=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_MMU=y
+# CONFIG_NO_IOPORT is not set
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_STACKTRACE_SUPPORT=y
+CONFIG_HAVE_LATENCYTOP_SUPPORT=y
+CONFIG_LOCKDEP_SUPPORT=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_ARCH_SUPPORTS_AOUT=y
+CONFIG_ZONE_DMA=y
+CONFIG_ARCH_MTD_XIP=y
+CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
+CONFIG_VECTORS_BASE=0xffff0000
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# General setup
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+CONFIG_LOCALVERSION="-cm-x300"
+# CONFIG_LOCALVERSION_AUTO is not set
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+CONFIG_SYSVIPC_SYSCTL=y
+# CONFIG_POSIX_MQUEUE is not set
+# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_TASKSTATS is not set
+# CONFIG_AUDIT is not set
+CONFIG_IKCONFIG=y
+CONFIG_IKCONFIG_PROC=y
+CONFIG_LOG_BUF_SHIFT=18
+# CONFIG_CGROUPS is not set
+CONFIG_GROUP_SCHED=y
+CONFIG_FAIR_GROUP_SCHED=y
+# CONFIG_RT_GROUP_SCHED is not set
+CONFIG_USER_SCHED=y
+# CONFIG_CGROUP_SCHED is not set
+CONFIG_SYSFS_DEPRECATED=y
+CONFIG_SYSFS_DEPRECATED_V2=y
+# CONFIG_RELAY is not set
+CONFIG_NAMESPACES=y
+# CONFIG_UTS_NS is not set
+# CONFIG_IPC_NS is not set
+# CONFIG_USER_NS is not set
+# CONFIG_PID_NS is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=""
+# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
+CONFIG_SYSCTL=y
+# CONFIG_EMBEDDED is not set
+CONFIG_UID16=y
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_ALL is not set
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_COMPAT_BRK=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_ANON_INODES=y
+CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_TIMERFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_SLUB_DEBUG=y
+# CONFIG_SLAB is not set
+CONFIG_SLUB=y
+# CONFIG_SLOB is not set
+# CONFIG_PROFILING is not set
+# CONFIG_MARKERS is not set
+CONFIG_HAVE_OPROFILE=y
+# CONFIG_KPROBES is not set
+# CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS is not set
+# CONFIG_HAVE_IOREMAP_PROT is not set
+CONFIG_HAVE_KPROBES=y
+CONFIG_HAVE_KRETPROBES=y
+# CONFIG_HAVE_ARCH_TRACEHOOK is not set
+# CONFIG_HAVE_DMA_ATTRS is not set
+# CONFIG_USE_GENERIC_SMP_HELPERS is not set
+CONFIG_HAVE_CLK=y
+CONFIG_PROC_PAGE_MONITOR=y
+CONFIG_HAVE_GENERIC_DMA_COHERENT=y
+CONFIG_SLABINFO=y
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+CONFIG_MODULES=y
+# CONFIG_MODULE_FORCE_LOAD is not set
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_KMOD=y
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF is not set
+# CONFIG_BLK_DEV_BSG is not set
+# CONFIG_BLK_DEV_INTEGRITY is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+# CONFIG_DEFAULT_AS is not set
+# CONFIG_DEFAULT_DEADLINE is not set
+CONFIG_DEFAULT_CFQ=y
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="cfq"
+CONFIG_CLASSIC_RCU=y
+
+#
+# System Type
+#
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_AT91 is not set
+# CONFIG_ARCH_CLPS7500 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_IOP13XX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IXP23XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_KIRKWOOD is not set
+# CONFIG_ARCH_KS8695 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_LOKI is not set
+# CONFIG_ARCH_MV78XX0 is not set
+# CONFIG_ARCH_MXC is not set
+# CONFIG_ARCH_ORION5X is not set
+# CONFIG_ARCH_PNX4008 is not set
+CONFIG_ARCH_PXA=y
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 is not set
+# CONFIG_ARCH_S3C2410 is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_DAVINCI is not set
+# CONFIG_ARCH_OMAP is not set
+# CONFIG_ARCH_MSM7X00A is not set
+
+#
+# Intel PXA2xx/PXA3xx Implementations
+#
+
+#
+# Supported PXA3xx Processor Variants
+#
+CONFIG_CPU_PXA300=y
+# CONFIG_CPU_PXA310 is not set
+# CONFIG_CPU_PXA320 is not set
+# CONFIG_CPU_PXA930 is not set
+# CONFIG_ARCH_GUMSTIX is not set
+# CONFIG_ARCH_LUBBOCK is not set
+# CONFIG_MACH_LOGICPD_PXA270 is not set
+# CONFIG_MACH_MAINSTONE is not set
+# CONFIG_ARCH_PXA_IDP is not set
+# CONFIG_PXA_SHARPSL is not set
+# CONFIG_ARCH_PXA_ESERIES is not set
+# CONFIG_MACH_TRIZEPS4 is not set
+# CONFIG_MACH_EM_X270 is not set
+# CONFIG_MACH_COLIBRI is not set
+# CONFIG_MACH_ZYLONITE is not set
+# CONFIG_MACH_LITTLETON is not set
+# CONFIG_MACH_TAVOREVB is not set
+# CONFIG_MACH_SAAR is not set
+# CONFIG_MACH_ARMCORE is not set
+CONFIG_MACH_CM_X300=y
+# CONFIG_MACH_MAGICIAN is not set
+# CONFIG_MACH_PCM027 is not set
+# CONFIG_ARCH_PXA_PALM is not set
+# CONFIG_PXA_EZX is not set
+CONFIG_PXA3xx=y
+# CONFIG_PXA_PWM is not set
+
+#
+# Boot options
+#
+
+#
+# Power management
+#
+
+#
+# Processor Type
+#
+CONFIG_CPU_32=y
+CONFIG_CPU_XSC3=y
+CONFIG_CPU_32v5=y
+CONFIG_CPU_ABRT_EV5T=y
+CONFIG_CPU_PABRT_NOIFAR=y
+CONFIG_CPU_CACHE_VIVT=y
+CONFIG_CPU_TLB_V4WBI=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+CONFIG_IO_36=y
+
+#
+# Processor Features
+#
+# CONFIG_ARM_THUMB is not set
+# CONFIG_CPU_DCACHE_DISABLE is not set
+# CONFIG_CPU_BPREDICT_DISABLE is not set
+CONFIG_OUTER_CACHE=y
+CONFIG_CACHE_XSC3L2=y
+CONFIG_IWMMXT=y
+
+#
+# Bus support
+#
+# CONFIG_PCI_SYSCALL is not set
+# CONFIG_ARCH_SUPPORTS_MSI is not set
+# CONFIG_PCCARD is not set
+
+#
+# Kernel Features
+#
+CONFIG_TICK_ONESHOT=y
+CONFIG_NO_HZ=y
+# CONFIG_HIGH_RES_TIMERS is not set
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
+# CONFIG_PREEMPT is not set
+CONFIG_HZ=100
+CONFIG_AEABI=y
+CONFIG_OABI_COMPAT=y
+# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+# CONFIG_SPARSEMEM_STATIC is not set
+# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
+CONFIG_PAGEFLAGS_EXTENDED=y
+CONFIG_SPLIT_PTLOCK_CPUS=4096
+# CONFIG_RESOURCES_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=1
+CONFIG_BOUNCE=y
+CONFIG_VIRT_TO_BUS=y
+CONFIG_ALIGNMENT_TRAP=y
+
+#
+# Boot options
+#
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_CMDLINE="root=/dev/mtdblock5 rootfstype=jffs2 console=ttyS2,38400"
+# CONFIG_XIP_KERNEL is not set
+# CONFIG_KEXEC is not set
+
+#
+# CPU Frequency scaling
+#
+CONFIG_CPU_FREQ=y
+CONFIG_CPU_FREQ_TABLE=y
+# CONFIG_CPU_FREQ_DEBUG is not set
+CONFIG_CPU_FREQ_STAT=y
+# CONFIG_CPU_FREQ_STAT_DETAILS is not set
+CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
+# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set
+# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
+# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set
+# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
+CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
+# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set
+CONFIG_CPU_FREQ_GOV_USERSPACE=y
+# CONFIG_CPU_FREQ_GOV_ONDEMAND is not set
+# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set
+
+#
+# Floating point emulation
+#
+
+#
+# At least one emulation must be selected
+#
+CONFIG_FPE_NWFPE=y
+# CONFIG_FPE_NWFPE_XP is not set
+# CONFIG_FPE_FASTFPE is not set
+
+#
+# Userspace binary formats
+#
+CONFIG_BINFMT_ELF=y
+# CONFIG_BINFMT_AOUT is not set
+# CONFIG_BINFMT_MISC is not set
+
+#
+# Power management options
+#
+CONFIG_PM=y
+# CONFIG_PM_DEBUG is not set
+CONFIG_PM_SLEEP=y
+CONFIG_SUSPEND=y
+CONFIG_SUSPEND_FREEZER=y
+CONFIG_APM_EMULATION=y
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=y
+# CONFIG_PACKET_MMAP is not set
+CONFIG_UNIX=y
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+# CONFIG_IP_MULTICAST is not set
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+CONFIG_IP_PNP_BOOTP=y
+CONFIG_IP_PNP_RARP=y
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_ARPD is not set
+# CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
+# CONFIG_INET_TUNNEL is not set
+# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
+# CONFIG_INET_XFRM_MODE_TUNNEL is not set
+# CONFIG_INET_XFRM_MODE_BEET is not set
+# CONFIG_INET_LRO is not set
+# CONFIG_INET_DIAG is not set
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
+# CONFIG_IPV6 is not set
+# CONFIG_NETWORK_SECMARK is not set
+# CONFIG_NETFILTER is not set
+# CONFIG_IP_DCCP is not set
+# CONFIG_IP_SCTP is not set
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_CAN is not set
+# CONFIG_IRDA is not set
+CONFIG_BT=m
+CONFIG_BT_L2CAP=m
+CONFIG_BT_SCO=m
+CONFIG_BT_RFCOMM=m
+CONFIG_BT_RFCOMM_TTY=y
+CONFIG_BT_BNEP=m
+CONFIG_BT_BNEP_MC_FILTER=y
+CONFIG_BT_BNEP_PROTO_FILTER=y
+CONFIG_BT_HIDP=m
+
+#
+# Bluetooth device drivers
+#
+CONFIG_BT_HCIUSB=m
+CONFIG_BT_HCIUSB_SCO=y
+# CONFIG_BT_HCIBTSDIO is not set
+# CONFIG_BT_HCIUART is not set
+# CONFIG_BT_HCIBCM203X is not set
+# CONFIG_BT_HCIBPA10X is not set
+# CONFIG_BT_HCIBFUSB is not set
+# CONFIG_BT_HCIVHCI is not set
+# CONFIG_AF_RXRPC is not set
+
+#
+# Wireless
+#
+# CONFIG_CFG80211 is not set
+CONFIG_WIRELESS_EXT=y
+CONFIG_WIRELESS_EXT_SYSFS=y
+# CONFIG_MAC80211 is not set
+CONFIG_IEEE80211=m
+# CONFIG_IEEE80211_DEBUG is not set
+CONFIG_IEEE80211_CRYPT_WEP=m
+CONFIG_IEEE80211_CRYPT_CCMP=m
+CONFIG_IEEE80211_CRYPT_TKIP=m
+# CONFIG_RFKILL is not set
+# CONFIG_NET_9P is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=y
+CONFIG_FIRMWARE_IN_KERNEL=y
+CONFIG_EXTRA_FIRMWARE=""
+# CONFIG_DEBUG_DRIVER is not set
+# CONFIG_DEBUG_DEVRES is not set
+# CONFIG_SYS_HYPERVISOR is not set
+# CONFIG_CONNECTOR is not set
+CONFIG_MTD=y
+# CONFIG_MTD_DEBUG is not set
+# CONFIG_MTD_CONCAT is not set
+CONFIG_MTD_PARTITIONS=y
+# CONFIG_MTD_REDBOOT_PARTS is not set
+# CONFIG_MTD_CMDLINE_PARTS is not set
+# CONFIG_MTD_AFS_PARTS is not set
+# CONFIG_MTD_AR7_PARTS is not set
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=y
+CONFIG_MTD_BLKDEVS=y
+CONFIG_MTD_BLOCK=y
+# CONFIG_FTL is not set
+# CONFIG_NFTL is not set
+# CONFIG_INFTL is not set
+# CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
+# CONFIG_MTD_OOPS is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+# CONFIG_MTD_CFI is not set
+# CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+# CONFIG_MTD_RAM is not set
+# CONFIG_MTD_ROM is not set
+# CONFIG_MTD_ABSENT is not set
+
+#
+# Mapping drivers for chip access
+#
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+# CONFIG_MTD_SHARP_SL is not set
+# CONFIG_MTD_PLATRAM is not set
+
+#
+# Self-contained MTD device drivers
+#
+# CONFIG_MTD_SLRAM is not set
+# CONFIG_MTD_PHRAM is not set
+# CONFIG_MTD_MTDRAM is not set
+# CONFIG_MTD_BLOCK2MTD is not set
+
+#
+# Disk-On-Chip Device Drivers
+#
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+# CONFIG_MTD_DOC2001PLUS is not set
+CONFIG_MTD_NAND=y
+# CONFIG_MTD_NAND_VERIFY_WRITE is not set
+# CONFIG_MTD_NAND_ECC_SMC is not set
+# CONFIG_MTD_NAND_MUSEUM_IDS is not set
+# CONFIG_MTD_NAND_H1900 is not set
+CONFIG_MTD_NAND_IDS=y
+# CONFIG_MTD_NAND_DISKONCHIP is not set
+# CONFIG_MTD_NAND_SHARPSL is not set
+CONFIG_MTD_NAND_PXA3xx=y
+# CONFIG_MTD_NAND_NANDSIM is not set
+# CONFIG_MTD_NAND_PLATFORM is not set
+# CONFIG_MTD_ALAUDA is not set
+# CONFIG_MTD_ONENAND is not set
+
+#
+# UBI - Unsorted block images
+#
+# CONFIG_MTD_UBI is not set
+# CONFIG_PARPORT is not set
+CONFIG_BLK_DEV=y
+# CONFIG_BLK_DEV_COW_COMMON is not set
+CONFIG_BLK_DEV_LOOP=y
+# CONFIG_BLK_DEV_CRYPTOLOOP is not set
+# CONFIG_BLK_DEV_NBD is not set
+# CONFIG_BLK_DEV_UB is not set
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_COUNT=16
+CONFIG_BLK_DEV_RAM_SIZE=4096
+# CONFIG_BLK_DEV_XIP is not set
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+# CONFIG_MISC_DEVICES is not set
+CONFIG_HAVE_IDE=y
+# CONFIG_IDE is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+CONFIG_SCSI=y
+CONFIG_SCSI_DMA=y
+# CONFIG_SCSI_TGT is not set
+# CONFIG_SCSI_NETLINK is not set
+CONFIG_SCSI_PROC_FS=y
+
+#
+# SCSI support type (disk, tape, CD-ROM)
+#
+CONFIG_BLK_DEV_SD=y
+# CONFIG_CHR_DEV_ST is not set
+# CONFIG_CHR_DEV_OSST is not set
+# CONFIG_BLK_DEV_SR is not set
+# CONFIG_CHR_DEV_SG is not set
+# CONFIG_CHR_DEV_SCH is not set
+
+#
+# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
+#
+# CONFIG_SCSI_MULTI_LUN is not set
+# CONFIG_SCSI_CONSTANTS is not set
+# CONFIG_SCSI_LOGGING is not set
+# CONFIG_SCSI_SCAN_ASYNC is not set
+CONFIG_SCSI_WAIT_SCAN=m
+
+#
+# SCSI Transports
+#
+# CONFIG_SCSI_SPI_ATTRS is not set
+# CONFIG_SCSI_FC_ATTRS is not set
+# CONFIG_SCSI_ISCSI_ATTRS is not set
+# CONFIG_SCSI_SAS_LIBSAS is not set
+# CONFIG_SCSI_SRP_ATTRS is not set
+CONFIG_SCSI_LOWLEVEL=y
+# CONFIG_ISCSI_TCP is not set
+# CONFIG_SCSI_DEBUG is not set
+# CONFIG_SCSI_DH is not set
+# CONFIG_ATA is not set
+# CONFIG_MD is not set
+CONFIG_NETDEVICES=y
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_MACVLAN is not set
+# CONFIG_EQUALIZER is not set
+# CONFIG_TUN is not set
+# CONFIG_VETH is not set
+# CONFIG_PHYLIB is not set
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=y
+# CONFIG_AX88796 is not set
+# CONFIG_SMC91X is not set
+CONFIG_DM9000=y
+CONFIG_DM9000_DEBUGLEVEL=0
+CONFIG_DM9000_FORCE_SIMPLE_PHY_POLL=y
+# CONFIG_SMC911X is not set
+# CONFIG_IBM_NEW_EMAC_ZMII is not set
+# CONFIG_IBM_NEW_EMAC_RGMII is not set
+# CONFIG_IBM_NEW_EMAC_TAH is not set
+# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+# CONFIG_B44 is not set
+# CONFIG_NETDEV_1000 is not set
+# CONFIG_NETDEV_10000 is not set
+
+#
+# Wireless LAN
+#
+# CONFIG_WLAN_PRE80211 is not set
+CONFIG_WLAN_80211=y
+CONFIG_LIBERTAS=m
+# CONFIG_LIBERTAS_USB is not set
+CONFIG_LIBERTAS_SDIO=m
+# CONFIG_LIBERTAS_DEBUG is not set
+# CONFIG_USB_ZD1201 is not set
+# CONFIG_USB_NET_RNDIS_WLAN is not set
+# CONFIG_IWLWIFI_LEDS is not set
+# CONFIG_HOSTAP is not set
+
+#
+# USB Network Adapters
+#
+# CONFIG_USB_CATC is not set
+# CONFIG_USB_KAWETH is not set
+# CONFIG_USB_PEGASUS is not set
+# CONFIG_USB_RTL8150 is not set
+# CONFIG_USB_USBNET is not set
+# CONFIG_WAN is not set
+# CONFIG_PPP is not set
+# CONFIG_SLIP is not set
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+# CONFIG_ISDN is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+# CONFIG_INPUT_POLLDEV is not set
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=y
+# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
+# CONFIG_INPUT_JOYDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_EVBUG is not set
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+# CONFIG_KEYBOARD_ATKBD is not set
+# CONFIG_KEYBOARD_SUNKBD is not set
+# CONFIG_KEYBOARD_LKKBD is not set
+# CONFIG_KEYBOARD_XTKBD is not set
+# CONFIG_KEYBOARD_NEWTON is not set
+# CONFIG_KEYBOARD_STOWAWAY is not set
+CONFIG_KEYBOARD_PXA27x=m
+# CONFIG_KEYBOARD_GPIO is not set
+# CONFIG_INPUT_MOUSE is not set
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TABLET is not set
+CONFIG_INPUT_TOUCHSCREEN=y
+# CONFIG_TOUCHSCREEN_FUJITSU is not set
+# CONFIG_TOUCHSCREEN_GUNZE is not set
+# CONFIG_TOUCHSCREEN_ELO is not set
+# CONFIG_TOUCHSCREEN_MTOUCH is not set
+# CONFIG_TOUCHSCREEN_INEXIO is not set
+# CONFIG_TOUCHSCREEN_MK712 is not set
+# CONFIG_TOUCHSCREEN_PENMOUNT is not set
+# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
+# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
+# CONFIG_TOUCHSCREEN_UCB1400 is not set
+# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set
+# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set
+# CONFIG_INPUT_MISC is not set
+
+#
+# Hardware I/O ports
+#
+# CONFIG_SERIO is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_CONSOLE_TRANSLATIONS=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+# CONFIG_VT_HW_CONSOLE_BINDING is not set
+CONFIG_DEVKMEM=y
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+# CONFIG_SERIAL_8250 is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_PXA=y
+CONFIG_SERIAL_PXA_CONSOLE=y
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+CONFIG_UNIX98_PTYS=y
+# CONFIG_LEGACY_PTYS is not set
+# CONFIG_IPMI_HANDLER is not set
+# CONFIG_HW_RANDOM is not set
+# CONFIG_NVRAM is not set
+# CONFIG_R3964 is not set
+# CONFIG_RAW_DRIVER is not set
+# CONFIG_TCG_TPM is not set
+CONFIG_I2C=y
+CONFIG_I2C_BOARDINFO=y
+# CONFIG_I2C_CHARDEV is not set
+CONFIG_I2C_HELPER_AUTO=y
+
+#
+# I2C Hardware Bus support
+#
+
+#
+# I2C system bus drivers (mostly embedded / system-on-chip)
+#
+# CONFIG_I2C_GPIO is not set
+# CONFIG_I2C_OCORES is not set
+CONFIG_I2C_PXA=y
+# CONFIG_I2C_PXA_SLAVE is not set
+# CONFIG_I2C_SIMTEC is not set
+
+#
+# External I2C/SMBus adapter drivers
+#
+# CONFIG_I2C_PARPORT_LIGHT is not set
+# CONFIG_I2C_TAOS_EVM is not set
+# CONFIG_I2C_TINY_USB is not set
+
+#
+# Other I2C/SMBus bus drivers
+#
+# CONFIG_I2C_PCA_PLATFORM is not set
+# CONFIG_I2C_STUB is not set
+
+#
+# Miscellaneous I2C Chip support
+#
+# CONFIG_DS1682 is not set
+# CONFIG_AT24 is not set
+# CONFIG_SENSORS_EEPROM is not set
+# CONFIG_SENSORS_PCF8574 is not set
+# CONFIG_PCF8575 is not set
+# CONFIG_SENSORS_PCF8591 is not set
+# CONFIG_TPS65010 is not set
+# CONFIG_SENSORS_MAX6875 is not set
+# CONFIG_SENSORS_TSL2550 is not set
+# CONFIG_I2C_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+# CONFIG_I2C_DEBUG_CHIP is not set
+# CONFIG_SPI is not set
+CONFIG_ARCH_REQUIRE_GPIOLIB=y
+CONFIG_GPIOLIB=y
+# CONFIG_DEBUG_GPIO is not set
+# CONFIG_GPIO_SYSFS is not set
+
+#
+# I2C GPIO expanders:
+#
+# CONFIG_GPIO_MAX732X is not set
+CONFIG_GPIO_PCA953X=y
+# CONFIG_GPIO_PCF857X is not set
+
+#
+# PCI GPIO expanders:
+#
+
+#
+# SPI GPIO expanders:
+#
+# CONFIG_W1 is not set
+# CONFIG_POWER_SUPPLY is not set
+# CONFIG_HWMON is not set
+# CONFIG_WATCHDOG is not set
+
+#
+# Sonics Silicon Backplane
+#
+CONFIG_SSB_POSSIBLE=y
+# CONFIG_SSB is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_CORE is not set
+# CONFIG_MFD_SM501 is not set
+# CONFIG_HTC_EGPIO is not set
+# CONFIG_HTC_PASIC3 is not set
+# CONFIG_MFD_TMIO is not set
+# CONFIG_MFD_T7L66XB is not set
+# CONFIG_MFD_TC6387XB is not set
+# CONFIG_MFD_TC6393XB is not set
+
+#
+# Multimedia devices
+#
+
+#
+# Multimedia core support
+#
+# CONFIG_VIDEO_DEV is not set
+# CONFIG_DVB_CORE is not set
+# CONFIG_VIDEO_MEDIA is not set
+
+#
+# Multimedia drivers
+#
+# CONFIG_DAB is not set
+
+#
+# Graphics support
+#
+# CONFIG_VGASTATE is not set
+# CONFIG_VIDEO_OUTPUT_CONTROL is not set
+CONFIG_FB=y
+# CONFIG_FIRMWARE_EDID is not set
+# CONFIG_FB_DDC is not set
+CONFIG_FB_CFB_FILLRECT=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
+# CONFIG_FB_SYS_FILLRECT is not set
+# CONFIG_FB_SYS_COPYAREA is not set
+# CONFIG_FB_SYS_IMAGEBLIT is not set
+# CONFIG_FB_FOREIGN_ENDIAN is not set
+# CONFIG_FB_SYS_FOPS is not set
+# CONFIG_FB_SVGALIB is not set
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+# CONFIG_FB_MODE_HELPERS is not set
+# CONFIG_FB_TILEBLITTING is not set
+
+#
+# Frame buffer hardware drivers
+#
+# CONFIG_FB_S1D13XXX is not set
+CONFIG_FB_PXA=y
+# CONFIG_FB_PXA_SMARTPANEL is not set
+# CONFIG_FB_PXA_PARAMETERS is not set
+# CONFIG_FB_MBX is not set
+# CONFIG_FB_W100 is not set
+# CONFIG_FB_AM200EPD is not set
+# CONFIG_FB_VIRTUAL is not set
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
+
+#
+# Display device support
+#
+# CONFIG_DISPLAY_SUPPORT is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
+# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
+CONFIG_FONTS=y
+# CONFIG_FONT_8x8 is not set
+# CONFIG_FONT_8x16 is not set
+CONFIG_FONT_6x11=y
+# CONFIG_FONT_7x14 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
+# CONFIG_FONT_MINI_4x6 is not set
+# CONFIG_FONT_SUN8x16 is not set
+# CONFIG_FONT_SUN12x22 is not set
+# CONFIG_FONT_10x18 is not set
+CONFIG_LOGO=y
+CONFIG_LOGO_LINUX_MONO=y
+CONFIG_LOGO_LINUX_VGA16=y
+CONFIG_LOGO_LINUX_CLUT224=y
+CONFIG_SOUND=m
+CONFIG_SND=m
+CONFIG_SND_TIMER=m
+CONFIG_SND_PCM=m
+# CONFIG_SND_SEQUENCER is not set
+# CONFIG_SND_MIXER_OSS is not set
+# CONFIG_SND_PCM_OSS is not set
+# CONFIG_SND_DYNAMIC_MINORS is not set
+CONFIG_SND_SUPPORT_OLD_API=y
+CONFIG_SND_VERBOSE_PROCFS=y
+# CONFIG_SND_VERBOSE_PRINTK is not set
+# CONFIG_SND_DEBUG is not set
+CONFIG_SND_DRIVERS=y
+# CONFIG_SND_DUMMY is not set
+# CONFIG_SND_MTPAV is not set
+# CONFIG_SND_SERIAL_U16550 is not set
+# CONFIG_SND_MPU401 is not set
+CONFIG_SND_ARM=y
+# CONFIG_SND_PXA2XX_AC97 is not set
+CONFIG_SND_USB=y
+# CONFIG_SND_USB_AUDIO is not set
+# CONFIG_SND_USB_CAIAQ is not set
+CONFIG_SND_SOC=m
+CONFIG_SND_PXA2XX_SOC=m
+# CONFIG_SOUND_PRIME is not set
+CONFIG_HID_SUPPORT=y
+CONFIG_HID=y
+CONFIG_HID_DEBUG=y
+# CONFIG_HIDRAW is not set
+
+#
+# USB Input Devices
+#
+CONFIG_USB_HID=y
+# CONFIG_USB_HIDINPUT_POWERBOOK is not set
+# CONFIG_HID_FF is not set
+# CONFIG_USB_HIDDEV is not set
+CONFIG_USB_SUPPORT=y
+CONFIG_USB_ARCH_HAS_HCD=y
+CONFIG_USB_ARCH_HAS_OHCI=y
+# CONFIG_USB_ARCH_HAS_EHCI is not set
+CONFIG_USB=y
+# CONFIG_USB_DEBUG is not set
+# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set
+
+#
+# Miscellaneous USB options
+#
+CONFIG_USB_DEVICEFS=y
+# CONFIG_USB_DEVICE_CLASS is not set
+# CONFIG_USB_DYNAMIC_MINORS is not set
+# CONFIG_USB_SUSPEND is not set
+# CONFIG_USB_OTG is not set
+CONFIG_USB_MON=y
+
+#
+# USB Host Controller Drivers
+#
+# CONFIG_USB_C67X00_HCD is not set
+# CONFIG_USB_ISP116X_HCD is not set
+# CONFIG_USB_ISP1760_HCD is not set
+CONFIG_USB_OHCI_HCD=y
+# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
+# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
+CONFIG_USB_OHCI_LITTLE_ENDIAN=y
+# CONFIG_USB_SL811_HCD is not set
+# CONFIG_USB_R8A66597_HCD is not set
+# CONFIG_USB_MUSB_HDRC is not set
+
+#
+# USB Device Class drivers
+#
+# CONFIG_USB_ACM is not set
+# CONFIG_USB_PRINTER is not set
+# CONFIG_USB_WDM is not set
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
+
+#
+# may also be needed; see USB_STORAGE Help for more information
+#
+CONFIG_USB_STORAGE=y
+# CONFIG_USB_STORAGE_DEBUG is not set
+# CONFIG_USB_STORAGE_DATAFAB is not set
+# CONFIG_USB_STORAGE_FREECOM is not set
+# CONFIG_USB_STORAGE_ISD200 is not set
+# CONFIG_USB_STORAGE_DPCM is not set
+# CONFIG_USB_STORAGE_USBAT is not set
+# CONFIG_USB_STORAGE_SDDR09 is not set
+# CONFIG_USB_STORAGE_SDDR55 is not set
+# CONFIG_USB_STORAGE_JUMPSHOT is not set
+# CONFIG_USB_STORAGE_ALAUDA is not set
+# CONFIG_USB_STORAGE_ONETOUCH is not set
+# CONFIG_USB_STORAGE_KARMA is not set
+# CONFIG_USB_STORAGE_SIERRA is not set
+# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
+# CONFIG_USB_LIBUSUAL is not set
+
+#
+# USB Imaging devices
+#
+# CONFIG_USB_MDC800 is not set
+# CONFIG_USB_MICROTEK is not set
+
+#
+# USB port drivers
+#
+# CONFIG_USB_SERIAL is not set
+
+#
+# USB Miscellaneous drivers
+#
+# CONFIG_USB_EMI62 is not set
+# CONFIG_USB_EMI26 is not set
+# CONFIG_USB_ADUTUX is not set
+# CONFIG_USB_RIO500 is not set
+# CONFIG_USB_LEGOTOWER is not set
+# CONFIG_USB_LCD is not set
+# CONFIG_USB_BERRY_CHARGE is not set
+# CONFIG_USB_LED is not set
+# CONFIG_USB_CYPRESS_CY7C63 is not set
+# CONFIG_USB_CYTHERM is not set
+# CONFIG_USB_PHIDGET is not set
+# CONFIG_USB_IDMOUSE is not set
+# CONFIG_USB_FTDI_ELAN is not set
+# CONFIG_USB_APPLEDISPLAY is not set
+# CONFIG_USB_LD is not set
+# CONFIG_USB_TRANCEVIBRATOR is not set
+# CONFIG_USB_IOWARRIOR is not set
+# CONFIG_USB_TEST is not set
+# CONFIG_USB_ISIGHTFW is not set
+# CONFIG_USB_GADGET is not set
+CONFIG_MMC=m
+# CONFIG_MMC_DEBUG is not set
+# CONFIG_MMC_UNSAFE_RESUME is not set
+
+#
+# MMC/SD Card Drivers
+#
+CONFIG_MMC_BLOCK=m
+CONFIG_MMC_BLOCK_BOUNCE=y
+# CONFIG_SDIO_UART is not set
+# CONFIG_MMC_TEST is not set
+
+#
+# MMC/SD Host Controller Drivers
+#
+CONFIG_MMC_PXA=m
+# CONFIG_MMC_SDHCI is not set
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+
+#
+# LED drivers
+#
+# CONFIG_LEDS_PCA9532 is not set
+CONFIG_LEDS_GPIO=y
+# CONFIG_LEDS_PCA955X is not set
+
+#
+# LED Triggers
+#
+CONFIG_LEDS_TRIGGERS=y
+# CONFIG_LEDS_TRIGGER_TIMER is not set
+CONFIG_LEDS_TRIGGER_HEARTBEAT=y
+# CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set
+CONFIG_RTC_LIB=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_HCTOSYS=y
+CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
+# CONFIG_RTC_DEBUG is not set
+
+#
+# RTC interfaces
+#
+CONFIG_RTC_INTF_SYSFS=y
+CONFIG_RTC_INTF_PROC=y
+CONFIG_RTC_INTF_DEV=y
+# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
+# CONFIG_RTC_DRV_TEST is not set
+
+#
+# I2C RTC drivers
+#
+# CONFIG_RTC_DRV_DS1307 is not set
+# CONFIG_RTC_DRV_DS1374 is not set
+# CONFIG_RTC_DRV_DS1672 is not set
+# CONFIG_RTC_DRV_MAX6900 is not set
+# CONFIG_RTC_DRV_RS5C372 is not set
+# CONFIG_RTC_DRV_ISL1208 is not set
+# CONFIG_RTC_DRV_X1205 is not set
+# CONFIG_RTC_DRV_PCF8563 is not set
+# CONFIG_RTC_DRV_PCF8583 is not set
+# CONFIG_RTC_DRV_M41T80 is not set
+# CONFIG_RTC_DRV_S35390A is not set
+# CONFIG_RTC_DRV_FM3130 is not set
+
+#
+# SPI RTC drivers
+#
+
+#
+# Platform RTC drivers
+#
+# CONFIG_RTC_DRV_CMOS is not set
+# CONFIG_RTC_DRV_DS1511 is not set
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+# CONFIG_RTC_DRV_STK17TA8 is not set
+# CONFIG_RTC_DRV_M48T86 is not set
+# CONFIG_RTC_DRV_M48T59 is not set
+# CONFIG_RTC_DRV_V3020 is not set
+
+#
+# on-CPU RTC drivers
+#
+CONFIG_RTC_DRV_SA1100=y
+# CONFIG_DMADEVICES is not set
+
+#
+# Voltage and Current regulators
+#
+# CONFIG_REGULATOR is not set
+# CONFIG_REGULATOR_FIXED_VOLTAGE is not set
+# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set
+# CONFIG_REGULATOR_BQ24022 is not set
+# CONFIG_UIO is not set
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
+# CONFIG_EXT2_FS_XIP is not set
+CONFIG_EXT3_FS=y
+# CONFIG_EXT3_FS_XATTR is not set
+# CONFIG_EXT4DEV_FS is not set
+CONFIG_JBD=y
+# CONFIG_JBD_DEBUG is not set
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+CONFIG_FS_POSIX_ACL=y
+# CONFIG_XFS_FS is not set
+# CONFIG_OCFS2_FS is not set
+CONFIG_DNOTIFY=y
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+# CONFIG_QUOTA is not set
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_AUTOFS4_FS is not set
+# CONFIG_FUSE_FS is not set
+
+#
+# CD-ROM/DVD Filesystems
+#
+# CONFIG_ISO9660_FS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=m
+CONFIG_MSDOS_FS=m
+CONFIG_VFAT_FS=m
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLB_PAGE is not set
+# CONFIG_CONFIGFS_FS is not set
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+CONFIG_JFFS2_FS=y
+CONFIG_JFFS2_FS_DEBUG=0
+CONFIG_JFFS2_FS_WRITEBUFFER=y
+# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
+CONFIG_JFFS2_SUMMARY=y
+# CONFIG_JFFS2_FS_XATTR is not set
+# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
+CONFIG_JFFS2_ZLIB=y
+# CONFIG_JFFS2_LZO is not set
+CONFIG_JFFS2_RTIME=y
+# CONFIG_JFFS2_RUBIN is not set
+# CONFIG_CRAMFS is not set
+# CONFIG_VXFS_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_OMFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_ROMFS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+CONFIG_NETWORK_FILESYSTEMS=y
+CONFIG_NFS_FS=y
+CONFIG_NFS_V3=y
+CONFIG_NFS_V3_ACL=y
+CONFIG_NFS_V4=y
+CONFIG_ROOT_NFS=y
+# CONFIG_NFSD is not set
+CONFIG_LOCKD=y
+CONFIG_LOCKD_V4=y
+CONFIG_NFS_ACL_SUPPORT=y
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=y
+CONFIG_SUNRPC_GSS=y
+CONFIG_RPCSEC_GSS_KRB5=y
+# CONFIG_RPCSEC_GSS_SPKM3 is not set
+CONFIG_SMB_FS=m
+# CONFIG_SMB_NLS_DEFAULT is not set
+CONFIG_CIFS=m
+# CONFIG_CIFS_STATS is not set
+CONFIG_CIFS_WEAK_PW_HASH=y
+# CONFIG_CIFS_XATTR is not set
+# CONFIG_CIFS_DEBUG2 is not set
+# CONFIG_CIFS_EXPERIMENTAL is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+
+#
+# Partition Types
+#
+CONFIG_PARTITION_ADVANCED=y
+# CONFIG_ACORN_PARTITION is not set
+# CONFIG_OSF_PARTITION is not set
+# CONFIG_AMIGA_PARTITION is not set
+# CONFIG_ATARI_PARTITION is not set
+# CONFIG_MAC_PARTITION is not set
+CONFIG_MSDOS_PARTITION=y
+# CONFIG_BSD_DISKLABEL is not set
+# CONFIG_MINIX_SUBPARTITION is not set
+# CONFIG_SOLARIS_X86_PARTITION is not set
+# CONFIG_UNIXWARE_DISKLABEL is not set
+# CONFIG_LDM_PARTITION is not set
+# CONFIG_SGI_PARTITION is not set
+# CONFIG_ULTRIX_PARTITION is not set
+# CONFIG_SUN_PARTITION is not set
+# CONFIG_KARMA_PARTITION is not set
+# CONFIG_EFI_PARTITION is not set
+# CONFIG_SYSV68_PARTITION is not set
+CONFIG_NLS=m
+CONFIG_NLS_DEFAULT="iso8859-1"
+CONFIG_NLS_CODEPAGE_437=m
+# CONFIG_NLS_CODEPAGE_737 is not set
+# CONFIG_NLS_CODEPAGE_775 is not set
+# CONFIG_NLS_CODEPAGE_850 is not set
+# CONFIG_NLS_CODEPAGE_852 is not set
+# CONFIG_NLS_CODEPAGE_855 is not set
+# CONFIG_NLS_CODEPAGE_857 is not set
+# CONFIG_NLS_CODEPAGE_860 is not set
+# CONFIG_NLS_CODEPAGE_861 is not set
+# CONFIG_NLS_CODEPAGE_862 is not set
+# CONFIG_NLS_CODEPAGE_863 is not set
+# CONFIG_NLS_CODEPAGE_864 is not set
+# CONFIG_NLS_CODEPAGE_865 is not set
+# CONFIG_NLS_CODEPAGE_866 is not set
+# CONFIG_NLS_CODEPAGE_869 is not set
+# CONFIG_NLS_CODEPAGE_936 is not set
+# CONFIG_NLS_CODEPAGE_950 is not set
+# CONFIG_NLS_CODEPAGE_932 is not set
+# CONFIG_NLS_CODEPAGE_949 is not set
+# CONFIG_NLS_CODEPAGE_874 is not set
+# CONFIG_NLS_ISO8859_8 is not set
+# CONFIG_NLS_CODEPAGE_1250 is not set
+# CONFIG_NLS_CODEPAGE_1251 is not set
+# CONFIG_NLS_ASCII is not set
+CONFIG_NLS_ISO8859_1=m
+# CONFIG_NLS_ISO8859_2 is not set
+# CONFIG_NLS_ISO8859_3 is not set
+# CONFIG_NLS_ISO8859_4 is not set
+# CONFIG_NLS_ISO8859_5 is not set
+# CONFIG_NLS_ISO8859_6 is not set
+# CONFIG_NLS_ISO8859_7 is not set
+# CONFIG_NLS_ISO8859_9 is not set
+# CONFIG_NLS_ISO8859_13 is not set
+# CONFIG_NLS_ISO8859_14 is not set
+# CONFIG_NLS_ISO8859_15 is not set
+# CONFIG_NLS_KOI8_R is not set
+# CONFIG_NLS_KOI8_U is not set
+# CONFIG_NLS_UTF8 is not set
+# CONFIG_DLM is not set
+
+#
+# Kernel hacking
+#
+# CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_WARN_DEPRECATED=y
+CONFIG_ENABLE_MUST_CHECK=y
+CONFIG_FRAME_WARN=1024
+# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
+CONFIG_DEBUG_FS=y
+# CONFIG_HEADERS_CHECK is not set
+CONFIG_DEBUG_KERNEL=y
+# CONFIG_DEBUG_SHIRQ is not set
+# CONFIG_DETECT_SOFTLOCKUP is not set
+# CONFIG_SCHED_DEBUG is not set
+# CONFIG_SCHEDSTATS is not set
+# CONFIG_TIMER_STATS is not set
+# CONFIG_DEBUG_OBJECTS is not set
+# CONFIG_SLUB_DEBUG_ON is not set
+# CONFIG_SLUB_STATS is not set
+# CONFIG_DEBUG_RT_MUTEXES is not set
+# CONFIG_RT_MUTEX_TESTER is not set
+# CONFIG_DEBUG_SPINLOCK is not set
+# CONFIG_DEBUG_MUTEXES is not set
+# CONFIG_DEBUG_LOCK_ALLOC is not set
+# CONFIG_PROVE_LOCKING is not set
+# CONFIG_LOCK_STAT is not set
+# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+# CONFIG_DEBUG_KOBJECT is not set
+CONFIG_DEBUG_BUGVERBOSE=y
+# CONFIG_DEBUG_INFO is not set
+# CONFIG_DEBUG_VM is not set
+# CONFIG_DEBUG_WRITECOUNT is not set
+CONFIG_DEBUG_MEMORY_INIT=y
+# CONFIG_DEBUG_LIST is not set
+# CONFIG_DEBUG_SG is not set
+CONFIG_FRAME_POINTER=y
+# CONFIG_BOOT_PRINTK_DELAY is not set
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_BACKTRACE_SELF_TEST is not set
+# CONFIG_FAULT_INJECTION is not set
+# CONFIG_LATENCYTOP is not set
+CONFIG_SYSCTL_SYSCALL_CHECK=y
+CONFIG_HAVE_FTRACE=y
+CONFIG_HAVE_DYNAMIC_FTRACE=y
+# CONFIG_FTRACE is not set
+# CONFIG_IRQSOFF_TRACER is not set
+# CONFIG_SCHED_TRACER is not set
+# CONFIG_CONTEXT_SWITCH_TRACER is not set
+# CONFIG_SAMPLES is not set
+CONFIG_HAVE_ARCH_KGDB=y
+# CONFIG_KGDB is not set
+CONFIG_DEBUG_USER=y
+# CONFIG_DEBUG_ERRORS is not set
+# CONFIG_DEBUG_STACK_USAGE is not set
+CONFIG_DEBUG_LL=y
+# CONFIG_DEBUG_ICEDCC is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+# CONFIG_SECURITY_FILE_CAPABILITIES is not set
+CONFIG_CRYPTO=y
+
+#
+# Crypto core or helper
+#
+CONFIG_CRYPTO_ALGAPI=y
+CONFIG_CRYPTO_BLKCIPHER=y
+CONFIG_CRYPTO_MANAGER=y
+# CONFIG_CRYPTO_GF128MUL is not set
+# CONFIG_CRYPTO_NULL is not set
+# CONFIG_CRYPTO_CRYPTD is not set
+# CONFIG_CRYPTO_AUTHENC is not set
+# CONFIG_CRYPTO_TEST is not set
+
+#
+# Authenticated Encryption with Associated Data
+#
+# CONFIG_CRYPTO_CCM is not set
+# CONFIG_CRYPTO_GCM is not set
+# CONFIG_CRYPTO_SEQIV is not set
+
+#
+# Block modes
+#
+CONFIG_CRYPTO_CBC=y
+# CONFIG_CRYPTO_CTR is not set
+# CONFIG_CRYPTO_CTS is not set
+CONFIG_CRYPTO_ECB=m
+# CONFIG_CRYPTO_LRW is not set
+# CONFIG_CRYPTO_PCBC is not set
+# CONFIG_CRYPTO_XTS is not set
+
+#
+# Hash modes
+#
+# CONFIG_CRYPTO_HMAC is not set
+# CONFIG_CRYPTO_XCBC is not set
+
+#
+# Digest
+#
+# CONFIG_CRYPTO_CRC32C is not set
+# CONFIG_CRYPTO_MD4 is not set
+CONFIG_CRYPTO_MD5=y
+CONFIG_CRYPTO_MICHAEL_MIC=m
+# CONFIG_CRYPTO_RMD128 is not set
+# CONFIG_CRYPTO_RMD160 is not set
+# CONFIG_CRYPTO_RMD256 is not set
+# CONFIG_CRYPTO_RMD320 is not set
+# CONFIG_CRYPTO_SHA1 is not set
+# CONFIG_CRYPTO_SHA256 is not set
+# CONFIG_CRYPTO_SHA512 is not set
+# CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_WP512 is not set
+
+#
+# Ciphers
+#
+CONFIG_CRYPTO_AES=m
+# CONFIG_CRYPTO_ANUBIS is not set
+CONFIG_CRYPTO_ARC4=m
+# CONFIG_CRYPTO_BLOWFISH is not set
+# CONFIG_CRYPTO_CAMELLIA is not set
+# CONFIG_CRYPTO_CAST5 is not set
+# CONFIG_CRYPTO_CAST6 is not set
+CONFIG_CRYPTO_DES=y
+# CONFIG_CRYPTO_FCRYPT is not set
+# CONFIG_CRYPTO_KHAZAD is not set
+# CONFIG_CRYPTO_SALSA20 is not set
+# CONFIG_CRYPTO_SEED is not set
+# CONFIG_CRYPTO_SERPENT is not set
+# CONFIG_CRYPTO_TEA is not set
+# CONFIG_CRYPTO_TWOFISH is not set
+
+#
+# Compression
+#
+# CONFIG_CRYPTO_DEFLATE is not set
+# CONFIG_CRYPTO_LZO is not set
+# CONFIG_CRYPTO_HW is not set
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+# CONFIG_GENERIC_FIND_FIRST_BIT is not set
+# CONFIG_GENERIC_FIND_NEXT_BIT is not set
+# CONFIG_CRC_CCITT is not set
+# CONFIG_CRC16 is not set
+CONFIG_CRC_T10DIF=y
+# CONFIG_CRC_ITU_T is not set
+CONFIG_CRC32=y
+# CONFIG_CRC7 is not set
+# CONFIG_LIBCRC32C is not set
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_DEFLATE=y
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
index 0c556289a3f4e6318f262e9f7e16d69f51728b99..81fadafae02dcfab20e7f9518ade49c72be5c55b 100644 (file)
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.12-rc1-bk2
-# Sun Mar 27 23:10:35 2005
+# Linux kernel version: 2.6.27-rc6
+# Tue Sep 16 18:56:58 2008
 #
 CONFIG_ARM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_GENERIC_GPIO=y
+CONFIG_GENERIC_TIME=y
+CONFIG_GENERIC_CLOCKEVENTS=y
 CONFIG_MMU=y
-CONFIG_UID16=y
+# CONFIG_NO_IOPORT is not set
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_STACKTRACE_SUPPORT=y
+CONFIG_HAVE_LATENCYTOP_SUPPORT=y
+CONFIG_LOCKDEP_SUPPORT=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
 CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
-CONFIG_GENERIC_IOMAP=y
+CONFIG_ARCH_SUPPORTS_AOUT=y
+CONFIG_ZONE_DMA=y
+CONFIG_ARCH_MTD_XIP=y
+CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
+CONFIG_VECTORS_BASE=0xffff0000
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
 #
-# Code maturity level options
+# General setup
 #
 CONFIG_EXPERIMENTAL=y
-CONFIG_CLEAN_COMPILE=y
 CONFIG_BROKEN_ON_SMP=y
-
-#
-# General setup
-#
+CONFIG_INIT_ENV_ARG_LIMIT=32
 CONFIG_LOCALVERSION=""
+CONFIG_LOCALVERSION_AUTO=y
 CONFIG_SWAP=y
 CONFIG_SYSVIPC=y
+CONFIG_SYSVIPC_SYSCTL=y
 # CONFIG_POSIX_MQUEUE is not set
 # CONFIG_BSD_PROCESS_ACCT is not set
-CONFIG_SYSCTL=y
+# CONFIG_TASKSTATS is not set
 # CONFIG_AUDIT is not set
-CONFIG_HOTPLUG=y
-CONFIG_KOBJECT_UEVENT=y
 # CONFIG_IKCONFIG is not set
+CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_CGROUPS is not set
+# CONFIG_GROUP_SCHED is not set
+CONFIG_SYSFS_DEPRECATED=y
+CONFIG_SYSFS_DEPRECATED_V2=y
+# CONFIG_RELAY is not set
+CONFIG_NAMESPACES=y
+# CONFIG_UTS_NS is not set
+# CONFIG_IPC_NS is not set
+# CONFIG_USER_NS is not set
+# CONFIG_PID_NS is not set
+# CONFIG_BLK_DEV_INITRD is not set
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
 # CONFIG_EMBEDDED is not set
+CONFIG_UID16=y
+CONFIG_SYSCTL_SYSCALL=y
 CONFIG_KALLSYMS=y
 # CONFIG_KALLSYMS_ALL is not set
 # CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_COMPAT_BRK=y
 CONFIG_BASE_FULL=y
 CONFIG_FUTEX=y
+CONFIG_ANON_INODES=y
 CONFIG_EPOLL=y
-CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SIGNALFD=y
+CONFIG_TIMERFD=y
+CONFIG_EVENTFD=y
 CONFIG_SHMEM=y
-CONFIG_CC_ALIGN_FUNCTIONS=0
-CONFIG_CC_ALIGN_LABELS=0
-CONFIG_CC_ALIGN_LOOPS=0
-CONFIG_CC_ALIGN_JUMPS=0
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_SLUB_DEBUG=y
+# CONFIG_SLAB is not set
+CONFIG_SLUB=y
+# CONFIG_SLOB is not set
+# CONFIG_PROFILING is not set
+# CONFIG_MARKERS is not set
+CONFIG_HAVE_OPROFILE=y
+# CONFIG_KPROBES is not set
+# CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS is not set
+# CONFIG_HAVE_IOREMAP_PROT is not set
+CONFIG_HAVE_KPROBES=y
+CONFIG_HAVE_KRETPROBES=y
+# CONFIG_HAVE_ARCH_TRACEHOOK is not set
+# CONFIG_HAVE_DMA_ATTRS is not set
+# CONFIG_USE_GENERIC_SMP_HELPERS is not set
+CONFIG_HAVE_CLK=y
+CONFIG_PROC_PAGE_MONITOR=y
+CONFIG_HAVE_GENERIC_DMA_COHERENT=y
+CONFIG_SLABINFO=y
+CONFIG_RT_MUTEXES=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
-
-#
-# Loadable module support
-#
 CONFIG_MODULES=y
+# CONFIG_MODULE_FORCE_LOAD is not set
 # CONFIG_MODULE_UNLOAD is not set
-CONFIG_OBSOLETE_MODPARM=y
 # CONFIG_MODVERSIONS is not set
 # CONFIG_MODULE_SRCVERSION_ALL is not set
 CONFIG_KMOD=y
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF is not set
+# CONFIG_BLK_DEV_BSG is not set
+# CONFIG_BLK_DEV_INTEGRITY is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+# CONFIG_DEFAULT_AS is not set
+# CONFIG_DEFAULT_DEADLINE is not set
+CONFIG_DEFAULT_CFQ=y
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="cfq"
+CONFIG_CLASSIC_RCU=y
 
 #
 # System Type
 #
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_AT91 is not set
 # CONFIG_ARCH_CLPS7500 is not set
 # CONFIG_ARCH_CLPS711X is not set
-# CONFIG_ARCH_CO285 is not set
 # CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
 # CONFIG_ARCH_FOOTBRIDGE is not set
-# CONFIG_ARCH_INTEGRATOR is not set
-# CONFIG_ARCH_IOP3XX is not set
-# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_IOP13XX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IXP23XX is not set
 # CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP4XX is not set
 # CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_KIRKWOOD is not set
+# CONFIG_ARCH_KS8695 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_LOKI is not set
+# CONFIG_ARCH_MV78XX0 is not set
+# CONFIG_ARCH_MXC is not set
+# CONFIG_ARCH_ORION5X is not set
+# CONFIG_ARCH_PNX4008 is not set
 # CONFIG_ARCH_PXA is not set
 # CONFIG_ARCH_RPC is not set
 CONFIG_ARCH_SA1100=y
 # CONFIG_ARCH_S3C2410 is not set
 # CONFIG_ARCH_SHARK is not set
 # CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_DAVINCI is not set
 # CONFIG_ARCH_OMAP is not set
-# CONFIG_ARCH_VERSATILE is not set
-# CONFIG_ARCH_IMX is not set
-# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_MSM7X00A is not set
+CONFIG_DMABOUNCE=y
 
 #
 # SA11x0 Implementations
@@ -91,12 +181,21 @@ CONFIG_ARCH_SA1100=y
 # CONFIG_SA1100_H3800 is not set
 # CONFIG_SA1100_BADGE4 is not set
 CONFIG_SA1100_JORNADA720=y
+CONFIG_SA1100_JORNADA720_SSP=y
 # CONFIG_SA1100_HACKKIT is not set
 # CONFIG_SA1100_LART is not set
 # CONFIG_SA1100_PLEB is not set
 # CONFIG_SA1100_SHANNON is not set
 # CONFIG_SA1100_SIMPAD is not set
-# CONFIG_SA1100_SSP is not set
+CONFIG_SA1100_SSP=y
+
+#
+# Boot options
+#
+
+#
+# Power management
+#
 
 #
 # Processor Type
@@ -105,44 +204,71 @@ CONFIG_CPU_32=y
 CONFIG_CPU_SA1100=y
 CONFIG_CPU_32v4=y
 CONFIG_CPU_ABRT_EV4=y
+CONFIG_CPU_PABRT_NOIFAR=y
 CONFIG_CPU_CACHE_V4WB=y
 CONFIG_CPU_CACHE_VIVT=y
 CONFIG_CPU_TLB_V4WB=y
-CONFIG_CPU_MINICACHE=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
 
 #
 # Processor Features
 #
+# CONFIG_CPU_ICACHE_DISABLE is not set
+# CONFIG_CPU_DCACHE_DISABLE is not set
+# CONFIG_OUTER_CACHE is not set
 CONFIG_SA1111=y
-CONFIG_DMABOUNCE=y
 CONFIG_FORCE_MAX_ZONEORDER=9
 
 #
 # Bus support
 #
 CONFIG_ISA=y
-
-#
-# PCCARD (PCMCIA/CardBus) support
-#
+# CONFIG_PCI_SYSCALL is not set
+# CONFIG_ARCH_SUPPORTS_MSI is not set
 CONFIG_PCCARD=y
 # CONFIG_PCMCIA_DEBUG is not set
 CONFIG_PCMCIA=y
+CONFIG_PCMCIA_LOAD_CIS=y
+CONFIG_PCMCIA_IOCTL=y
 
 #
 # PC-card bridges
 #
-CONFIG_I82365=y
+# CONFIG_I82365 is not set
 # CONFIG_TCIC is not set
 CONFIG_PCMCIA_SA1100=y
 # CONFIG_PCMCIA_SA1111 is not set
-CONFIG_PCCARD_NONSTATIC=y
 
 #
 # Kernel Features
 #
+CONFIG_TICK_ONESHOT=y
+# CONFIG_NO_HZ is not set
+# CONFIG_HIGH_RES_TIMERS is not set
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
 # CONFIG_PREEMPT is not set
+CONFIG_HZ=100
+# CONFIG_AEABI is not set
+CONFIG_ARCH_DISCONTIGMEM_ENABLE=y
+CONFIG_ARCH_SPARSEMEM_ENABLE=y
+CONFIG_ARCH_SELECT_MEMORY_MODEL=y
+CONFIG_NODES_SHIFT=2
+CONFIG_SELECT_MEMORY_MODEL=y
+# CONFIG_FLATMEM_MANUAL is not set
+CONFIG_DISCONTIGMEM_MANUAL=y
+# CONFIG_SPARSEMEM_MANUAL is not set
 CONFIG_DISCONTIGMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+CONFIG_NEED_MULTIPLE_NODES=y
+# CONFIG_SPARSEMEM_STATIC is not set
+# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
+CONFIG_PAGEFLAGS_EXTENDED=y
+CONFIG_SPLIT_PTLOCK_CPUS=4096
+# CONFIG_RESOURCES_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=1
+CONFIG_BOUNCE=y
+CONFIG_VIRT_TO_BUS=y
 # CONFIG_LEDS is not set
 CONFIG_ALIGNMENT_TRAP=y
 
@@ -151,8 +277,9 @@ CONFIG_ALIGNMENT_TRAP=y
 #
 CONFIG_ZBOOT_ROM_TEXT=0x0
 CONFIG_ZBOOT_ROM_BSS=0x0
-CONFIG_CMDLINE="keepinitrd mem=32M"
+CONFIG_CMDLINE=""
 # CONFIG_XIP_KERNEL is not set
+# CONFIG_KEXEC is not set
 
 #
 # CPU Frequency scaling
@@ -174,7 +301,7 @@ CONFIG_FPE_FASTFPE=y
 # Userspace binary formats
 #
 CONFIG_BINFMT_ELF=y
-CONFIG_BINFMT_AOUT=m
+CONFIG_BINFMT_AOUT=y
 # CONFIG_BINFMT_MISC is not set
 # CONFIG_ARTHUR is not set
 
@@ -182,188 +309,12 @@ CONFIG_BINFMT_AOUT=m
 # Power management options
 #
 CONFIG_PM=y
-# CONFIG_PM_LEGACY is not set
-# CONFIG_APM is not set
-
-#
-# Device Drivers
-#
-
-#
-# Generic Driver Options
-#
-CONFIG_STANDALONE=y
-CONFIG_PREVENT_FIRMWARE_BUILD=y
-# CONFIG_FW_LOADER is not set
-# CONFIG_DEBUG_DRIVER is not set
-
-#
-# Memory Technology Devices (MTD)
-#
-CONFIG_MTD=y
-CONFIG_MTD_DEBUG=y
-CONFIG_MTD_DEBUG_VERBOSE=1
-# CONFIG_MTD_CONCAT is not set
-CONFIG_MTD_PARTITIONS=y
-# CONFIG_MTD_REDBOOT_PARTS is not set
-# CONFIG_MTD_CMDLINE_PARTS is not set
-# CONFIG_MTD_AFS_PARTS is not set
-
-#
-# User Modules And Translation Layers
-#
-CONFIG_MTD_CHAR=m
-CONFIG_MTD_BLOCK=y
-# CONFIG_FTL is not set
-# CONFIG_NFTL is not set
-# CONFIG_INFTL is not set
-
-#
-# RAM/ROM/Flash chip drivers
-#
-CONFIG_MTD_CFI=y
-# CONFIG_MTD_JEDECPROBE is not set
-CONFIG_MTD_GEN_PROBE=y
-CONFIG_MTD_CFI_ADV_OPTIONS=y
-CONFIG_MTD_CFI_NOSWAP=y
-# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set
-# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set
-CONFIG_MTD_CFI_GEOMETRY=y
-CONFIG_MTD_MAP_BANK_WIDTH_1=y
-CONFIG_MTD_MAP_BANK_WIDTH_2=y
-CONFIG_MTD_MAP_BANK_WIDTH_4=y
-# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
-# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
-# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
-CONFIG_MTD_CFI_I1=y
-CONFIG_MTD_CFI_I2=y
-# CONFIG_MTD_CFI_I4 is not set
-# CONFIG_MTD_CFI_I8 is not set
-CONFIG_MTD_CFI_INTELEXT=y
-# CONFIG_MTD_CFI_AMDSTD is not set
-# CONFIG_MTD_CFI_STAA is not set
-CONFIG_MTD_CFI_UTIL=y
-# CONFIG_MTD_RAM is not set
-# CONFIG_MTD_ROM is not set
-# CONFIG_MTD_ABSENT is not set
-# CONFIG_MTD_XIP is not set
-
-#
-# Mapping drivers for chip access
-#
-# CONFIG_MTD_COMPLEX_MAPPINGS is not set
-# CONFIG_MTD_PHYSMAP is not set
-# CONFIG_MTD_ARM_INTEGRATOR is not set
-CONFIG_MTD_SA1100=y
-# CONFIG_MTD_EDB7312 is not set
-
-#
-# Self-contained MTD device drivers
-#
-# CONFIG_MTD_SLRAM is not set
-# CONFIG_MTD_PHRAM is not set
-# CONFIG_MTD_MTDRAM is not set
-# CONFIG_MTD_BLKMTD is not set
-# CONFIG_MTD_BLOCK2MTD is not set
-
-#
-# Disk-On-Chip Device Drivers
-#
-# CONFIG_MTD_DOC2000 is not set
-# CONFIG_MTD_DOC2001 is not set
-# CONFIG_MTD_DOC2001PLUS is not set
-
-#
-# NAND Flash Device Drivers
-#
-# CONFIG_MTD_NAND is not set
-
-#
-# Parallel port support
-#
-# CONFIG_PARPORT is not set
-
-#
-# Plug and Play support
-#
-# CONFIG_PNP is not set
-
-#
-# Block devices
-#
-# CONFIG_BLK_DEV_FD is not set
-# CONFIG_BLK_DEV_XD is not set
-# CONFIG_BLK_DEV_COW_COMMON is not set
-CONFIG_BLK_DEV_LOOP=m
-# CONFIG_BLK_DEV_CRYPTOLOOP is not set
-CONFIG_BLK_DEV_NBD=m
-# CONFIG_BLK_DEV_RAM is not set
-CONFIG_BLK_DEV_RAM_COUNT=16
-CONFIG_INITRAMFS_SOURCE=""
-# CONFIG_CDROM_PKTCDVD is not set
-
-#
-# IO Schedulers
-#
-CONFIG_IOSCHED_NOOP=y
-CONFIG_IOSCHED_AS=y
-CONFIG_IOSCHED_DEADLINE=y
-CONFIG_IOSCHED_CFQ=y
-# CONFIG_ATA_OVER_ETH is not set
-
-#
-# ATA/ATAPI/MFM/RLL support
-#
-CONFIG_IDE=m
-CONFIG_BLK_DEV_IDE=m
-
-#
-# Please see Documentation/ide.txt for help/info on IDE drives
-#
-# CONFIG_BLK_DEV_IDE_SATA is not set
-CONFIG_BLK_DEV_IDEDISK=m
-# CONFIG_IDEDISK_MULTI_MODE is not set
-# CONFIG_BLK_DEV_IDECS is not set
-CONFIG_BLK_DEV_IDECD=m
-# CONFIG_BLK_DEV_IDETAPE is not set
-# CONFIG_BLK_DEV_IDEFLOPPY is not set
-# CONFIG_IDE_TASK_IOCTL is not set
-
-#
-# IDE chipset support/bugfixes
-#
-CONFIG_IDE_GENERIC=m
-# CONFIG_IDE_ARM is not set
-# CONFIG_IDE_CHIPSETS is not set
-# CONFIG_BLK_DEV_IDEDMA is not set
-# CONFIG_IDEDMA_AUTO is not set
-# CONFIG_BLK_DEV_HD is not set
-
-#
-# SCSI device support
-#
-# CONFIG_SCSI is not set
-
-#
-# Multi-device support (RAID and LVM)
-#
-# CONFIG_MD is not set
-
-#
-# Fusion MPT device support
-#
-
-#
-# IEEE 1394 (FireWire) support
-#
-
-#
-# I2O device support
-#
-
-#
-# Networking support
-#
+# CONFIG_PM_DEBUG is not set
+CONFIG_PM_SLEEP=y
+CONFIG_SUSPEND=y
+CONFIG_SUSPEND_FREEZER=y
+# CONFIG_APM_EMULATION is not set
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
 CONFIG_NET=y
 
 #
@@ -371,12 +322,17 @@ CONFIG_NET=y
 #
 CONFIG_PACKET=y
 CONFIG_PACKET_MMAP=y
-# CONFIG_NETLINK_DEV is not set
 CONFIG_UNIX=y
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER is not set
+# CONFIG_XFRM_SUB_POLICY is not set
+# CONFIG_XFRM_MIGRATE is not set
+# CONFIG_XFRM_STATISTICS is not set
 # CONFIG_NET_KEY is not set
 CONFIG_INET=y
 CONFIG_IP_MULTICAST=y
 # CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
 # CONFIG_IP_PNP is not set
 # CONFIG_NET_IPIP is not set
 # CONFIG_NET_IPGRE is not set
@@ -386,31 +342,42 @@ CONFIG_IP_MULTICAST=y
 # CONFIG_INET_AH is not set
 # CONFIG_INET_ESP is not set
 # CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
 # CONFIG_INET_TUNNEL is not set
-# CONFIG_IP_TCPDIAG is not set
-# CONFIG_IP_TCPDIAG_IPV6 is not set
-
-#
-# IP: Virtual Server Configuration
-#
+CONFIG_INET_XFRM_MODE_TRANSPORT=y
+CONFIG_INET_XFRM_MODE_TUNNEL=y
+CONFIG_INET_XFRM_MODE_BEET=y
+# CONFIG_INET_LRO is not set
+CONFIG_INET_DIAG=y
+CONFIG_INET_TCP_DIAG=y
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
 # CONFIG_IP_VS is not set
 # CONFIG_IPV6 is not set
+# CONFIG_NETWORK_SECMARK is not set
 CONFIG_NETFILTER=y
 # CONFIG_NETFILTER_DEBUG is not set
+CONFIG_NETFILTER_ADVANCED=y
+
+#
+# Core Netfilter Configuration
+#
+# CONFIG_NETFILTER_NETLINK_QUEUE is not set
+# CONFIG_NETFILTER_NETLINK_LOG is not set
+# CONFIG_NF_CONNTRACK is not set
+# CONFIG_NETFILTER_XTABLES is not set
 
 #
 # IP: Netfilter Configuration
 #
-# CONFIG_IP_NF_CONNTRACK is not set
-# CONFIG_IP_NF_CONNTRACK_MARK is not set
 # CONFIG_IP_NF_QUEUE is not set
 # CONFIG_IP_NF_IPTABLES is not set
 # CONFIG_IP_NF_ARPTABLES is not set
-
-#
-# SCTP Configuration (EXPERIMENTAL)
-#
+# CONFIG_IP_DCCP is not set
 # CONFIG_IP_SCTP is not set
+# CONFIG_TIPC is not set
 # CONFIG_ATM is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_VLAN_8021Q is not set
@@ -420,30 +387,22 @@ CONFIG_NETFILTER=y
 # CONFIG_ATALK is not set
 # CONFIG_X25 is not set
 # CONFIG_LAPB is not set
-# CONFIG_NET_DIVERT is not set
 # CONFIG_ECONET is not set
 # CONFIG_WAN_ROUTER is not set
-
-#
-# QoS and/or fair queueing
-#
 # CONFIG_NET_SCHED is not set
-# CONFIG_NET_CLS_ROUTE is not set
 
 #
 # Network testing
 #
 # CONFIG_NET_PKTGEN is not set
-# CONFIG_NETPOLL is not set
-# CONFIG_NET_POLL_CONTROLLER is not set
 # CONFIG_HAMRADIO is not set
+# CONFIG_CAN is not set
 CONFIG_IRDA=m
 
 #
 # IrDA protocols
 #
 CONFIG_IRLAN=m
-# CONFIG_IRNET is not set
 CONFIG_IRCOMM=m
 # CONFIG_IRDA_ULTRA is not set
 
@@ -467,90 +426,106 @@ CONFIG_IRCOMM=m
 # Dongle support
 #
 
-#
-# Old SIR device drivers
-#
-# CONFIG_IRPORT_SIR is not set
-
-#
-# Old Serial dongle support
-#
-
 #
 # FIR device drivers
 #
-# CONFIG_NSC_FIR is not set
-# CONFIG_WINBOND_FIR is not set
-# CONFIG_SMC_IRCC_FIR is not set
-# CONFIG_ALI_FIR is not set
 CONFIG_SA1100_FIR=m
 # CONFIG_BT is not set
-CONFIG_NETDEVICES=y
-# CONFIG_DUMMY is not set
-# CONFIG_BONDING is not set
-# CONFIG_EQUALIZER is not set
-# CONFIG_TUN is not set
-
-#
-# ARCnet devices
-#
-# CONFIG_ARCNET is not set
-
-#
-# Ethernet (10 or 100Mbit)
-#
-# CONFIG_NET_ETHERNET is not set
-CONFIG_MII=m
+# CONFIG_AF_RXRPC is not set
 
 #
-# Ethernet (1000 Mbit)
+# Wireless
 #
+# CONFIG_CFG80211 is not set
+# CONFIG_WIRELESS_EXT is not set
+# CONFIG_MAC80211 is not set
+# CONFIG_IEEE80211 is not set
+# CONFIG_RFKILL is not set
+# CONFIG_NET_9P is not set
 
 #
-# Ethernet (10000 Mbit)
-#
-
-#
-# Token Ring devices
-#
-# CONFIG_TR is not set
-
-#
-# Wireless LAN (non-hamradio)
+# Device Drivers
 #
-CONFIG_NET_RADIO=y
 
 #
-# Obsolete Wireless cards support (pre-802.11)
+# Generic Driver Options
 #
-# CONFIG_STRIP is not set
-CONFIG_ARLAN=m
-CONFIG_WAVELAN=m
-CONFIG_PCMCIA_WAVELAN=m
-# CONFIG_PCMCIA_NETWAVE is not set
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=y
+CONFIG_FIRMWARE_IN_KERNEL=y
+CONFIG_EXTRA_FIRMWARE=""
+# CONFIG_DEBUG_DRIVER is not set
+# CONFIG_DEBUG_DEVRES is not set
+# CONFIG_SYS_HYPERVISOR is not set
+# CONFIG_CONNECTOR is not set
+# CONFIG_MTD is not set
+# CONFIG_PARPORT is not set
+# CONFIG_PNP is not set
+CONFIG_BLK_DEV=y
+# CONFIG_BLK_DEV_COW_COMMON is not set
+CONFIG_BLK_DEV_LOOP=m
+# CONFIG_BLK_DEV_CRYPTOLOOP is not set
+CONFIG_BLK_DEV_NBD=m
+# CONFIG_BLK_DEV_RAM is not set
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+CONFIG_MISC_DEVICES=y
+# CONFIG_EEPROM_93CX6 is not set
+# CONFIG_ENCLOSURE_SERVICES is not set
+CONFIG_HAVE_IDE=y
+CONFIG_IDE=y
+CONFIG_BLK_DEV_IDE=y
 
 #
-# Wireless 802.11 Frequency Hopping cards support
+# Please see Documentation/ide/ide.txt for help/info on IDE drives
 #
-# CONFIG_PCMCIA_RAYCS is not set
+# CONFIG_BLK_DEV_IDE_SATA is not set
+CONFIG_BLK_DEV_IDEDISK=y
+# CONFIG_IDEDISK_MULTI_MODE is not set
+CONFIG_BLK_DEV_IDECS=y
+# CONFIG_BLK_DEV_IDECD is not set
+# CONFIG_BLK_DEV_IDETAPE is not set
+# CONFIG_BLK_DEV_IDEFLOPPY is not set
+# CONFIG_IDE_TASK_IOCTL is not set
+CONFIG_IDE_PROC_FS=y
 
 #
-# Wireless 802.11b ISA/PCI cards support
+# IDE chipset support/bugfixes
 #
-CONFIG_HERMES=m
-# CONFIG_ATMEL is not set
+# CONFIG_BLK_DEV_PLATFORM is not set
+# CONFIG_BLK_DEV_IDEDMA is not set
 
 #
-# Wireless 802.11b Pcmcia/Cardbus cards support
+# SCSI device support
 #
-CONFIG_PCMCIA_HERMES=m
-CONFIG_AIRO_CS=m
-# CONFIG_PCMCIA_WL3501 is not set
-CONFIG_NET_WIRELESS=y
+# CONFIG_RAID_ATTRS is not set
+# CONFIG_SCSI is not set
+# CONFIG_SCSI_DMA is not set
+# CONFIG_SCSI_NETLINK is not set
+# CONFIG_ATA is not set
+# CONFIG_MD is not set
+CONFIG_NETDEVICES=y
+CONFIG_DUMMY=y
+# CONFIG_BONDING is not set
+# CONFIG_MACVLAN is not set
+# CONFIG_EQUALIZER is not set
+# CONFIG_TUN is not set
+# CONFIG_VETH is not set
+# CONFIG_ARCNET is not set
+# CONFIG_NET_ETHERNET is not set
+CONFIG_MII=m
+# CONFIG_NETDEV_1000 is not set
+# CONFIG_NETDEV_10000 is not set
+# CONFIG_TR is not set
 
 #
-# PCMCIA network device support
+# Wireless LAN
 #
+# CONFIG_WLAN_PRE80211 is not set
+# CONFIG_WLAN_80211 is not set
+# CONFIG_IWLWIFI_LEDS is not set
 CONFIG_NET_PCMCIA=y
 CONFIG_PCMCIA_3C589=m
 CONFIG_PCMCIA_3C574=m
@@ -560,32 +535,20 @@ CONFIG_PCMCIA_NMCLAN=m
 CONFIG_PCMCIA_SMC91C92=m
 CONFIG_PCMCIA_XIRC2PS=m
 CONFIG_PCMCIA_AXNET=m
-
-#
-# Wan interfaces
-#
 # CONFIG_WAN is not set
-CONFIG_PPP=m
-# CONFIG_PPP_MULTILINK is not set
-# CONFIG_PPP_FILTER is not set
-CONFIG_PPP_ASYNC=m
-# CONFIG_PPP_SYNC_TTY is not set
-CONFIG_PPP_DEFLATE=m
-CONFIG_PPP_BSDCOMP=m
-# CONFIG_PPPOE is not set
+# CONFIG_PPP is not set
 # CONFIG_SLIP is not set
-# CONFIG_SHAPER is not set
 # CONFIG_NETCONSOLE is not set
-
-#
-# ISDN subsystem
-#
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
 # CONFIG_ISDN is not set
 
 #
 # Input device support
 #
 CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+# CONFIG_INPUT_POLLDEV is not set
 
 #
 # Userland interfaces
@@ -595,7 +558,6 @@ CONFIG_INPUT_MOUSEDEV_PSAUX=y
 CONFIG_INPUT_MOUSEDEV_SCREEN_X=640
 CONFIG_INPUT_MOUSEDEV_SCREEN_Y=240
 # CONFIG_INPUT_JOYDEV is not set
-# CONFIG_INPUT_TSDEV is not set
 # CONFIG_INPUT_EVDEV is not set
 # CONFIG_INPUT_EVBUG is not set
 
@@ -603,20 +565,31 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=240
 # Input Device Drivers
 #
 CONFIG_INPUT_KEYBOARD=y
-CONFIG_KEYBOARD_ATKBD=y
+# CONFIG_KEYBOARD_ATKBD is not set
 # CONFIG_KEYBOARD_SUNKBD is not set
 # CONFIG_KEYBOARD_LKKBD is not set
 # CONFIG_KEYBOARD_XTKBD is not set
 # CONFIG_KEYBOARD_NEWTON is not set
-CONFIG_INPUT_MOUSE=y
-CONFIG_MOUSE_PS2=y
-# CONFIG_MOUSE_SERIAL is not set
-# CONFIG_MOUSE_INPORT is not set
-# CONFIG_MOUSE_LOGIBM is not set
-# CONFIG_MOUSE_PC110PAD is not set
-# CONFIG_MOUSE_VSXXXAA is not set
+# CONFIG_KEYBOARD_STOWAWAY is not set
+CONFIG_KEYBOARD_HP7XX=y
+# CONFIG_KEYBOARD_GPIO is not set
+# CONFIG_INPUT_MOUSE is not set
 # CONFIG_INPUT_JOYSTICK is not set
-# CONFIG_INPUT_TOUCHSCREEN is not set
+# CONFIG_INPUT_TABLET is not set
+CONFIG_INPUT_TOUCHSCREEN=y
+# CONFIG_TOUCHSCREEN_FUJITSU is not set
+# CONFIG_TOUCHSCREEN_GUNZE is not set
+# CONFIG_TOUCHSCREEN_ELO is not set
+# CONFIG_TOUCHSCREEN_MTOUCH is not set
+# CONFIG_TOUCHSCREEN_INEXIO is not set
+# CONFIG_TOUCHSCREEN_MK712 is not set
+CONFIG_TOUCHSCREEN_HP7XX=y
+# CONFIG_TOUCHSCREEN_HTCPEN is not set
+# CONFIG_TOUCHSCREEN_PENMOUNT is not set
+# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
+# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
+# CONFIG_TOUCHSCREEN_UCB1400 is not set
+# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set
 # CONFIG_INPUT_MISC is not set
 
 #
@@ -625,17 +598,18 @@ CONFIG_MOUSE_PS2=y
 CONFIG_SERIO=y
 CONFIG_SERIO_SERPORT=y
 # CONFIG_SERIO_SA1111 is not set
-CONFIG_SERIO_LIBPS2=y
 # CONFIG_SERIO_RAW is not set
 # CONFIG_GAMEPORT is not set
-CONFIG_SOUND_GAMEPORT=y
 
 #
 # Character devices
 #
 CONFIG_VT=y
+CONFIG_CONSOLE_TRANSLATIONS=y
 CONFIG_VT_CONSOLE=y
 CONFIG_HW_CONSOLE=y
+# CONFIG_VT_HW_CONSOLE_BINDING is not set
+CONFIG_DEVKMEM=y
 # CONFIG_SERIAL_NONSTANDARD is not set
 
 #
@@ -652,69 +626,120 @@ CONFIG_SERIAL_CORE=y
 CONFIG_SERIAL_CORE_CONSOLE=y
 CONFIG_UNIX98_PTYS=y
 CONFIG_LEGACY_PTYS=y
-CONFIG_LEGACY_PTY_COUNT=256
+CONFIG_LEGACY_PTY_COUNT=32
+# CONFIG_IPMI_HANDLER is not set
+CONFIG_HW_RANDOM=m
+# CONFIG_NVRAM is not set
+# CONFIG_DTLK is not set
+# CONFIG_R3964 is not set
 
 #
-# IPMI
+# PCMCIA character devices
 #
-# CONFIG_IPMI_HANDLER is not set
+# CONFIG_SYNCLINK_CS is not set
+# CONFIG_CARDMAN_4000 is not set
+# CONFIG_CARDMAN_4040 is not set
+# CONFIG_IPWIRELESS is not set
+# CONFIG_RAW_DRIVER is not set
+# CONFIG_TCG_TPM is not set
+CONFIG_DEVPORT=y
+# CONFIG_I2C is not set
+# CONFIG_SPI is not set
+CONFIG_ARCH_REQUIRE_GPIOLIB=y
+CONFIG_GPIOLIB=y
+# CONFIG_DEBUG_GPIO is not set
+# CONFIG_GPIO_SYSFS is not set
 
 #
-# Watchdog Cards
+# I2C GPIO expanders:
 #
-# CONFIG_WATCHDOG is not set
-# CONFIG_NVRAM is not set
-# CONFIG_RTC is not set
-# CONFIG_DTLK is not set
-# CONFIG_R3964 is not set
 
 #
-# Ftape, the floppy tape device driver
+# PCI GPIO expanders:
 #
-# CONFIG_DRM is not set
 
 #
-# PCMCIA character devices
+# SPI GPIO expanders:
 #
-# CONFIG_SYNCLINK_CS is not set
-# CONFIG_RAW_DRIVER is not set
+# CONFIG_W1 is not set
+# CONFIG_POWER_SUPPLY is not set
+# CONFIG_HWMON is not set
+# CONFIG_WATCHDOG is not set
 
 #
-# TPM devices
+# Sonics Silicon Backplane
 #
-# CONFIG_TCG_TPM is not set
+CONFIG_SSB_POSSIBLE=y
+# CONFIG_SSB is not set
 
 #
-# I2C support
+# Multifunction device drivers
 #
-# CONFIG_I2C is not set
+# CONFIG_MFD_CORE is not set
+# CONFIG_MFD_SM501 is not set
+# CONFIG_HTC_EGPIO is not set
+# CONFIG_HTC_PASIC3 is not set
+# CONFIG_MFD_TMIO is not set
+# CONFIG_MFD_T7L66XB is not set
+# CONFIG_MFD_TC6387XB is not set
+# CONFIG_MFD_TC6393XB is not set
 
 #
-# Misc devices
+# Multimedia Capabilities Port drivers
 #
+# CONFIG_MCP_SA11X0 is not set
 
 #
 # Multimedia devices
 #
+
+#
+# Multimedia core support
+#
 # CONFIG_VIDEO_DEV is not set
+# CONFIG_DVB_CORE is not set
+# CONFIG_VIDEO_MEDIA is not set
 
 #
-# Digital Video Broadcasting Devices
+# Multimedia drivers
 #
-# CONFIG_DVB is not set
+# CONFIG_DAB is not set
 
 #
 # Graphics support
 #
+# CONFIG_VGASTATE is not set
+# CONFIG_VIDEO_OUTPUT_CONTROL is not set
 CONFIG_FB=y
-# CONFIG_FB_CFB_FILLRECT is not set
-# CONFIG_FB_CFB_COPYAREA is not set
-# CONFIG_FB_CFB_IMAGEBLIT is not set
-# CONFIG_FB_SOFT_CURSOR is not set
+# CONFIG_FIRMWARE_EDID is not set
+# CONFIG_FB_DDC is not set
+CONFIG_FB_CFB_FILLRECT=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
+# CONFIG_FB_SYS_FILLRECT is not set
+# CONFIG_FB_SYS_COPYAREA is not set
+# CONFIG_FB_SYS_IMAGEBLIT is not set
+# CONFIG_FB_FOREIGN_ENDIAN is not set
+# CONFIG_FB_SYS_FOPS is not set
+# CONFIG_FB_SVGALIB is not set
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
 # CONFIG_FB_MODE_HELPERS is not set
 # CONFIG_FB_TILEBLITTING is not set
+
+#
+# Frame buffer hardware drivers
+#
 # CONFIG_FB_SA1100 is not set
+CONFIG_FB_S1D13XXX=y
 # CONFIG_FB_VIRTUAL is not set
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
+
+#
+# Display device support
+#
+# CONFIG_DISPLAY_SUPPORT is not set
 
 #
 # Console display driver support
@@ -722,94 +747,110 @@ CONFIG_FB=y
 # CONFIG_VGA_CONSOLE is not set
 # CONFIG_MDA_CONSOLE is not set
 CONFIG_DUMMY_CONSOLE=y
-# CONFIG_FRAMEBUFFER_CONSOLE is not set
-
-#
-# Logo configuration
-#
+CONFIG_FRAMEBUFFER_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
+# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
+# CONFIG_FONTS is not set
+CONFIG_FONT_8x8=y
+CONFIG_FONT_8x16=y
 # CONFIG_LOGO is not set
-# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
-
-#
-# Sound
-#
-CONFIG_SOUND=m
+# CONFIG_SOUND is not set
+# CONFIG_HID_SUPPORT is not set
+# CONFIG_USB_SUPPORT is not set
+# CONFIG_MMC is not set
+# CONFIG_NEW_LEDS is not set
+CONFIG_RTC_LIB=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_HCTOSYS=y
+CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
+# CONFIG_RTC_DEBUG is not set
 
 #
-# Advanced Linux Sound Architecture
+# RTC interfaces
 #
-# CONFIG_SND is not set
+CONFIG_RTC_INTF_SYSFS=y
+CONFIG_RTC_INTF_PROC=y
+CONFIG_RTC_INTF_DEV=y
+# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
+# CONFIG_RTC_DRV_TEST is not set
 
 #
-# Open Sound System
+# SPI RTC drivers
 #
-# CONFIG_SOUND_PRIME is not set
 
 #
-# USB support
+# Platform RTC drivers
 #
-CONFIG_USB_ARCH_HAS_HCD=y
-CONFIG_USB_ARCH_HAS_OHCI=y
-# CONFIG_USB is not set
+# CONFIG_RTC_DRV_CMOS is not set
+# CONFIG_RTC_DRV_DS1511 is not set
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+# CONFIG_RTC_DRV_STK17TA8 is not set
+# CONFIG_RTC_DRV_M48T86 is not set
+# CONFIG_RTC_DRV_M48T59 is not set
+# CONFIG_RTC_DRV_V3020 is not set
 
 #
-# USB Gadget Support
+# on-CPU RTC drivers
 #
-# CONFIG_USB_GADGET is not set
+CONFIG_RTC_DRV_SA1100=y
+# CONFIG_DMADEVICES is not set
 
 #
-# MMC/SD Card support
+# Voltage and Current regulators
 #
-# CONFIG_MMC is not set
+# CONFIG_REGULATOR is not set
+# CONFIG_REGULATOR_FIXED_VOLTAGE is not set
+# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set
+# CONFIG_REGULATOR_BQ24022 is not set
+# CONFIG_UIO is not set
 
 #
 # File systems
 #
 CONFIG_EXT2_FS=y
 # CONFIG_EXT2_FS_XATTR is not set
+# CONFIG_EXT2_FS_XIP is not set
 # CONFIG_EXT3_FS is not set
-# CONFIG_JBD is not set
+# CONFIG_EXT4DEV_FS is not set
 # CONFIG_REISERFS_FS is not set
 # CONFIG_JFS_FS is not set
-
-#
-# XFS support
-#
+# CONFIG_FS_POSIX_ACL is not set
 # CONFIG_XFS_FS is not set
-# CONFIG_MINIX_FS is not set
-# CONFIG_ROMFS_FS is not set
-# CONFIG_QUOTA is not set
+# CONFIG_OCFS2_FS is not set
 CONFIG_DNOTIFY=y
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+# CONFIG_QUOTA is not set
 # CONFIG_AUTOFS_FS is not set
 # CONFIG_AUTOFS4_FS is not set
+# CONFIG_FUSE_FS is not set
 
 #
 # CD-ROM/DVD Filesystems
 #
-CONFIG_ISO9660_FS=m
-# CONFIG_JOLIET is not set
-# CONFIG_ZISOFS is not set
+# CONFIG_ISO9660_FS is not set
 # CONFIG_UDF_FS is not set
 
 #
 # DOS/FAT/NT Filesystems
 #
-# CONFIG_MSDOS_FS is not set
-# CONFIG_VFAT_FS is not set
+CONFIG_FAT_FS=y
+CONFIG_MSDOS_FS=y
+CONFIG_VFAT_FS=y
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
 # CONFIG_NTFS_FS is not set
 
 #
 # Pseudo filesystems
 #
 CONFIG_PROC_FS=y
+CONFIG_PROC_SYSCTL=y
 CONFIG_SYSFS=y
-CONFIG_DEVFS_FS=y
-CONFIG_DEVFS_MOUNT=y
-CONFIG_DEVFS_DEBUG=y
-# CONFIG_DEVPTS_FS_XATTR is not set
 # CONFIG_TMPFS is not set
 # CONFIG_HUGETLB_PAGE is not set
-CONFIG_RAMFS=y
+# CONFIG_CONFIGFS_FS is not set
 
 #
 # Miscellaneous filesystems
@@ -821,75 +862,122 @@ CONFIG_RAMFS=y
 # CONFIG_BEFS_FS is not set
 # CONFIG_BFS_FS is not set
 # CONFIG_EFS_FS is not set
-# CONFIG_JFFS_FS is not set
-CONFIG_JFFS2_FS=y
-CONFIG_JFFS2_FS_DEBUG=2
-# CONFIG_JFFS2_FS_NAND is not set
-# CONFIG_JFFS2_FS_NOR_ECC is not set
-# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
-CONFIG_JFFS2_ZLIB=y
-CONFIG_JFFS2_RTIME=y
-# CONFIG_JFFS2_RUBIN is not set
 # CONFIG_CRAMFS is not set
 # CONFIG_VXFS_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_OMFS_FS is not set
 # CONFIG_HPFS_FS is not set
 # CONFIG_QNX4FS_FS is not set
+# CONFIG_ROMFS_FS is not set
 # CONFIG_SYSV_FS is not set
 # CONFIG_UFS_FS is not set
-
-#
-# Network File Systems
-#
-CONFIG_NFS_FS=m
-CONFIG_NFS_V3=y
-# CONFIG_NFS_V4 is not set
-# CONFIG_NFS_DIRECTIO is not set
-# CONFIG_NFSD is not set
-CONFIG_LOCKD=m
-CONFIG_LOCKD_V4=y
-CONFIG_SUNRPC=m
-# CONFIG_RPCSEC_GSS_KRB5 is not set
-# CONFIG_RPCSEC_GSS_SPKM3 is not set
-# CONFIG_SMB_FS is not set
-# CONFIG_CIFS is not set
-# CONFIG_NCP_FS is not set
-# CONFIG_CODA_FS is not set
-# CONFIG_AFS_FS is not set
+# CONFIG_NETWORK_FILESYSTEMS is not set
 
 #
 # Partition Types
 #
 # CONFIG_PARTITION_ADVANCED is not set
 CONFIG_MSDOS_PARTITION=y
-
-#
-# Native Language Support
-#
-# CONFIG_NLS is not set
-
-#
-# Profiling support
-#
-# CONFIG_PROFILING is not set
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="iso8859-1"
+CONFIG_NLS_CODEPAGE_437=m
+CONFIG_NLS_CODEPAGE_737=m
+CONFIG_NLS_CODEPAGE_775=m
+CONFIG_NLS_CODEPAGE_850=m
+CONFIG_NLS_CODEPAGE_852=m
+CONFIG_NLS_CODEPAGE_855=m
+CONFIG_NLS_CODEPAGE_857=m
+CONFIG_NLS_CODEPAGE_860=m
+CONFIG_NLS_CODEPAGE_861=m
+CONFIG_NLS_CODEPAGE_862=m
+CONFIG_NLS_CODEPAGE_863=m
+CONFIG_NLS_CODEPAGE_864=m
+CONFIG_NLS_CODEPAGE_865=m
+CONFIG_NLS_CODEPAGE_866=m
+CONFIG_NLS_CODEPAGE_869=m
+CONFIG_NLS_CODEPAGE_936=m
+CONFIG_NLS_CODEPAGE_950=m
+CONFIG_NLS_CODEPAGE_932=m
+CONFIG_NLS_CODEPAGE_949=m
+CONFIG_NLS_CODEPAGE_874=m
+CONFIG_NLS_ISO8859_8=m
+CONFIG_NLS_CODEPAGE_1250=m
+CONFIG_NLS_CODEPAGE_1251=m
+CONFIG_NLS_ASCII=m
+CONFIG_NLS_ISO8859_1=m
+CONFIG_NLS_ISO8859_2=m
+CONFIG_NLS_ISO8859_3=m
+CONFIG_NLS_ISO8859_4=m
+CONFIG_NLS_ISO8859_5=m
+CONFIG_NLS_ISO8859_6=m
+CONFIG_NLS_ISO8859_7=m
+CONFIG_NLS_ISO8859_9=m
+CONFIG_NLS_ISO8859_13=m
+CONFIG_NLS_ISO8859_14=m
+CONFIG_NLS_ISO8859_15=m
+CONFIG_NLS_KOI8_R=m
+CONFIG_NLS_KOI8_U=m
+CONFIG_NLS_UTF8=m
+# CONFIG_DLM is not set
 
 #
 # Kernel hacking
 #
 # CONFIG_PRINTK_TIME is not set
-CONFIG_DEBUG_KERNEL=y
+CONFIG_ENABLE_WARN_DEPRECATED=y
+CONFIG_ENABLE_MUST_CHECK=y
+CONFIG_FRAME_WARN=1024
 # CONFIG_MAGIC_SYSRQ is not set
-CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_UNUSED_SYMBOLS is not set
+# CONFIG_DEBUG_FS is not set
+# CONFIG_HEADERS_CHECK is not set
+CONFIG_DEBUG_KERNEL=y
+# CONFIG_DEBUG_SHIRQ is not set
+CONFIG_DETECT_SOFTLOCKUP=y
+# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
+CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
+CONFIG_SCHED_DEBUG=y
 # CONFIG_SCHEDSTATS is not set
-CONFIG_DEBUG_SLAB=y
+# CONFIG_TIMER_STATS is not set
+# CONFIG_DEBUG_OBJECTS is not set
+# CONFIG_SLUB_DEBUG_ON is not set
+# CONFIG_SLUB_STATS is not set
+# CONFIG_DEBUG_RT_MUTEXES is not set
+# CONFIG_RT_MUTEX_TESTER is not set
 # CONFIG_DEBUG_SPINLOCK is not set
+# CONFIG_DEBUG_MUTEXES is not set
+# CONFIG_DEBUG_LOCK_ALLOC is not set
+# CONFIG_PROVE_LOCKING is not set
+# CONFIG_LOCK_STAT is not set
 # CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
 # CONFIG_DEBUG_KOBJECT is not set
 CONFIG_DEBUG_BUGVERBOSE=y
 # CONFIG_DEBUG_INFO is not set
-# CONFIG_DEBUG_FS is not set
+# CONFIG_DEBUG_VM is not set
+# CONFIG_DEBUG_WRITECOUNT is not set
+CONFIG_DEBUG_MEMORY_INIT=y
+# CONFIG_DEBUG_LIST is not set
+# CONFIG_DEBUG_SG is not set
 CONFIG_FRAME_POINTER=y
+# CONFIG_BOOT_PRINTK_DELAY is not set
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_BACKTRACE_SELF_TEST is not set
+# CONFIG_FAULT_INJECTION is not set
+# CONFIG_LATENCYTOP is not set
+# CONFIG_SYSCTL_SYSCALL_CHECK is not set
+CONFIG_HAVE_FTRACE=y
+CONFIG_HAVE_DYNAMIC_FTRACE=y
+# CONFIG_FTRACE is not set
+# CONFIG_IRQSOFF_TRACER is not set
+# CONFIG_SCHED_TRACER is not set
+# CONFIG_CONTEXT_SWITCH_TRACER is not set
+# CONFIG_SAMPLES is not set
+CONFIG_HAVE_ARCH_KGDB=y
+# CONFIG_KGDB is not set
 # CONFIG_DEBUG_USER is not set
 CONFIG_DEBUG_ERRORS=y
+# CONFIG_DEBUG_STACK_USAGE is not set
 CONFIG_DEBUG_LL=y
 # CONFIG_DEBUG_ICEDCC is not set
 
@@ -898,21 +986,100 @@ CONFIG_DEBUG_LL=y
 #
 # CONFIG_KEYS is not set
 # CONFIG_SECURITY is not set
+# CONFIG_SECURITY_FILE_CAPABILITIES is not set
+CONFIG_CRYPTO=y
+
+#
+# Crypto core or helper
+#
+# CONFIG_CRYPTO_MANAGER is not set
+# CONFIG_CRYPTO_GF128MUL is not set
+# CONFIG_CRYPTO_NULL is not set
+# CONFIG_CRYPTO_CRYPTD is not set
+# CONFIG_CRYPTO_AUTHENC is not set
+# CONFIG_CRYPTO_TEST is not set
+
+#
+# Authenticated Encryption with Associated Data
+#
+# CONFIG_CRYPTO_CCM is not set
+# CONFIG_CRYPTO_GCM is not set
+# CONFIG_CRYPTO_SEQIV is not set
+
+#
+# Block modes
+#
+# CONFIG_CRYPTO_CBC is not set
+# CONFIG_CRYPTO_CTR is not set
+# CONFIG_CRYPTO_CTS is not set
+# CONFIG_CRYPTO_ECB is not set
+# CONFIG_CRYPTO_LRW is not set
+# CONFIG_CRYPTO_PCBC is not set
+# CONFIG_CRYPTO_XTS is not set
+
+#
+# Hash modes
+#
+# CONFIG_CRYPTO_HMAC is not set
+# CONFIG_CRYPTO_XCBC is not set
+
+#
+# Digest
+#
+# CONFIG_CRYPTO_CRC32C is not set
+# CONFIG_CRYPTO_MD4 is not set
+# CONFIG_CRYPTO_MD5 is not set
+# CONFIG_CRYPTO_MICHAEL_MIC is not set
+# CONFIG_CRYPTO_RMD128 is not set
+# CONFIG_CRYPTO_RMD160 is not set
+# CONFIG_CRYPTO_RMD256 is not set
+# CONFIG_CRYPTO_RMD320 is not set
+# CONFIG_CRYPTO_SHA1 is not set
+# CONFIG_CRYPTO_SHA256 is not set
+# CONFIG_CRYPTO_SHA512 is not set
+# CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_WP512 is not set
 
 #
-# Cryptographic options
+# Ciphers
 #
-# CONFIG_CRYPTO is not set
+# CONFIG_CRYPTO_AES is not set
+# CONFIG_CRYPTO_ANUBIS is not set
+# CONFIG_CRYPTO_ARC4 is not set
+# CONFIG_CRYPTO_BLOWFISH is not set
+# CONFIG_CRYPTO_CAMELLIA is not set
+# CONFIG_CRYPTO_CAST5 is not set
+# CONFIG_CRYPTO_CAST6 is not set
+# CONFIG_CRYPTO_DES is not set
+# CONFIG_CRYPTO_FCRYPT is not set
+# CONFIG_CRYPTO_KHAZAD is not set
+# CONFIG_CRYPTO_SALSA20 is not set
+# CONFIG_CRYPTO_SEED is not set
+# CONFIG_CRYPTO_SERPENT is not set
+# CONFIG_CRYPTO_TEA is not set
+# CONFIG_CRYPTO_TWOFISH is not set
 
 #
-# Hardware crypto devices
+# Compression
 #
+# CONFIG_CRYPTO_DEFLATE is not set
+# CONFIG_CRYPTO_LZO is not set
+CONFIG_CRYPTO_HW=y
 
 #
 # Library routines
 #
+CONFIG_BITREVERSE=y
+# CONFIG_GENERIC_FIND_FIRST_BIT is not set
+# CONFIG_GENERIC_FIND_NEXT_BIT is not set
 CONFIG_CRC_CCITT=m
+# CONFIG_CRC16 is not set
+# CONFIG_CRC_T10DIF is not set
+# CONFIG_CRC_ITU_T is not set
 CONFIG_CRC32=y
+# CONFIG_CRC7 is not set
 # CONFIG_LIBCRC32C is not set
-CONFIG_ZLIB_INFLATE=y
-CONFIG_ZLIB_DEFLATE=y
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
diff --git a/arch/arm/configs/palmz72_defconfig b/arch/arm/configs/palmz72_defconfig
new file mode 100644 (file)
index 0000000..3245f8f
--- /dev/null
@@ -0,0 +1,951 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.27-rc4
+# Sun Aug 24 02:29:27 2008
+#
+CONFIG_ARM=y
+CONFIG_HAVE_PWM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_GENERIC_GPIO=y
+CONFIG_GENERIC_TIME=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_MMU=y
+# CONFIG_NO_IOPORT is not set
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_STACKTRACE_SUPPORT=y
+CONFIG_HAVE_LATENCYTOP_SUPPORT=y
+CONFIG_LOCKDEP_SUPPORT=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_ARCH_SUPPORTS_AOUT=y
+CONFIG_ZONE_DMA=y
+CONFIG_ARCH_MTD_XIP=y
+CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
+CONFIG_VECTORS_BASE=0xffff0000
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# General setup
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_LOCK_KERNEL=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+CONFIG_LOCALVERSION=""
+# CONFIG_LOCALVERSION_AUTO is not set
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+CONFIG_SYSVIPC_SYSCTL=y
+# CONFIG_POSIX_MQUEUE is not set
+# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_TASKSTATS is not set
+# CONFIG_AUDIT is not set
+# CONFIG_IKCONFIG is not set
+CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_CGROUPS is not set
+# CONFIG_GROUP_SCHED is not set
+CONFIG_SYSFS_DEPRECATED=y
+CONFIG_SYSFS_DEPRECATED_V2=y
+# CONFIG_RELAY is not set
+CONFIG_NAMESPACES=y
+# CONFIG_UTS_NS is not set
+# CONFIG_IPC_NS is not set
+# CONFIG_USER_NS is not set
+# CONFIG_PID_NS is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+# CONFIG_EMBEDDED is not set
+CONFIG_UID16=y
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_COMPAT_BRK=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_ANON_INODES=y
+CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_TIMERFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_SLAB=y
+# CONFIG_SLUB is not set
+# CONFIG_SLOB is not set
+# CONFIG_PROFILING is not set
+# CONFIG_MARKERS is not set
+CONFIG_HAVE_OPROFILE=y
+# CONFIG_KPROBES is not set
+# CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS is not set
+# CONFIG_HAVE_IOREMAP_PROT is not set
+CONFIG_HAVE_KPROBES=y
+CONFIG_HAVE_KRETPROBES=y
+# CONFIG_HAVE_ARCH_TRACEHOOK is not set
+# CONFIG_HAVE_DMA_ATTRS is not set
+# CONFIG_USE_GENERIC_SMP_HELPERS is not set
+CONFIG_HAVE_CLK=y
+CONFIG_PROC_PAGE_MONITOR=y
+CONFIG_HAVE_GENERIC_DMA_COHERENT=y
+CONFIG_SLABINFO=y
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+CONFIG_MODULES=y
+# CONFIG_MODULE_FORCE_LOAD is not set
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_KMOD=y
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF is not set
+# CONFIG_BLK_DEV_BSG is not set
+# CONFIG_BLK_DEV_INTEGRITY is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+# CONFIG_IOSCHED_DEADLINE is not set
+# CONFIG_IOSCHED_CFQ is not set
+CONFIG_DEFAULT_AS=y
+# CONFIG_DEFAULT_DEADLINE is not set
+# CONFIG_DEFAULT_CFQ is not set
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="anticipatory"
+CONFIG_CLASSIC_RCU=y
+
+#
+# System Type
+#
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_AT91 is not set
+# CONFIG_ARCH_CLPS7500 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_IOP13XX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IXP23XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_KIRKWOOD is not set
+# CONFIG_ARCH_KS8695 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_LOKI is not set
+# CONFIG_ARCH_MV78XX0 is not set
+# CONFIG_ARCH_MXC is not set
+# CONFIG_ARCH_ORION5X is not set
+# CONFIG_ARCH_PNX4008 is not set
+CONFIG_ARCH_PXA=y
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 is not set
+# CONFIG_ARCH_S3C2410 is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_DAVINCI is not set
+# CONFIG_ARCH_OMAP is not set
+# CONFIG_ARCH_MSM7X00A is not set
+
+#
+# Intel PXA2xx/PXA3xx Implementations
+#
+# CONFIG_ARCH_GUMSTIX is not set
+# CONFIG_ARCH_LUBBOCK is not set
+# CONFIG_MACH_LOGICPD_PXA270 is not set
+# CONFIG_MACH_MAINSTONE is not set
+# CONFIG_ARCH_PXA_IDP is not set
+# CONFIG_PXA_SHARPSL is not set
+# CONFIG_ARCH_PXA_ESERIES is not set
+# CONFIG_MACH_TRIZEPS4 is not set
+# CONFIG_MACH_EM_X270 is not set
+# CONFIG_MACH_COLIBRI is not set
+# CONFIG_MACH_ZYLONITE is not set
+# CONFIG_MACH_LITTLETON is not set
+# CONFIG_MACH_TAVOREVB is not set
+# CONFIG_MACH_SAAR is not set
+# CONFIG_MACH_ARMCORE is not set
+# CONFIG_MACH_MAGICIAN is not set
+# CONFIG_MACH_PCM027 is not set
+CONFIG_ARCH_PXA_PALM=y
+# CONFIG_MACH_PALMTX is not set
+CONFIG_MACH_PALMZ72=y
+# CONFIG_PXA_EZX is not set
+CONFIG_PXA27x=y
+CONFIG_PXA_PWM=y
+
+#
+# Boot options
+#
+
+#
+# Power management
+#
+
+#
+# Processor Type
+#
+CONFIG_CPU_32=y
+CONFIG_CPU_XSCALE=y
+CONFIG_CPU_32v5=y
+CONFIG_CPU_ABRT_EV5T=y
+CONFIG_CPU_PABRT_NOIFAR=y
+CONFIG_CPU_CACHE_VIVT=y
+CONFIG_CPU_TLB_V4WBI=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+
+#
+# Processor Features
+#
+CONFIG_ARM_THUMB=y
+# CONFIG_CPU_DCACHE_DISABLE is not set
+# CONFIG_OUTER_CACHE is not set
+CONFIG_IWMMXT=y
+CONFIG_XSCALE_PMU=y
+
+#
+# Bus support
+#
+# CONFIG_PCI_SYSCALL is not set
+# CONFIG_ARCH_SUPPORTS_MSI is not set
+# CONFIG_PCCARD is not set
+
+#
+# Kernel Features
+#
+CONFIG_TICK_ONESHOT=y
+# CONFIG_NO_HZ is not set
+# CONFIG_HIGH_RES_TIMERS is not set
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
+CONFIG_PREEMPT=y
+CONFIG_HZ=100
+CONFIG_AEABI=y
+CONFIG_OABI_COMPAT=y
+# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+# CONFIG_SPARSEMEM_STATIC is not set
+# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
+CONFIG_PAGEFLAGS_EXTENDED=y
+CONFIG_SPLIT_PTLOCK_CPUS=4096
+# CONFIG_RESOURCES_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=1
+CONFIG_BOUNCE=y
+CONFIG_VIRT_TO_BUS=y
+CONFIG_ALIGNMENT_TRAP=y
+
+#
+# Boot options
+#
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_CMDLINE="mem=32M console=tty root=/dev/mmcblk0"
+# CONFIG_XIP_KERNEL is not set
+# CONFIG_KEXEC is not set
+
+#
+# CPU Frequency scaling
+#
+# CONFIG_CPU_FREQ is not set
+
+#
+# Floating point emulation
+#
+
+#
+# At least one emulation must be selected
+#
+CONFIG_FPE_NWFPE=y
+# CONFIG_FPE_NWFPE_XP is not set
+# CONFIG_FPE_FASTFPE is not set
+
+#
+# Userspace binary formats
+#
+CONFIG_BINFMT_ELF=y
+# CONFIG_BINFMT_AOUT is not set
+# CONFIG_BINFMT_MISC is not set
+
+#
+# Power management options
+#
+CONFIG_PM=y
+# CONFIG_PM_DEBUG is not set
+CONFIG_PM_SLEEP=y
+CONFIG_SUSPEND=y
+CONFIG_SUSPEND_FREEZER=y
+CONFIG_APM_EMULATION=y
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=y
+# CONFIG_PACKET_MMAP is not set
+CONFIG_UNIX=y
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+# CONFIG_IP_MULTICAST is not set
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_PNP=y
+# CONFIG_IP_PNP_DHCP is not set
+CONFIG_IP_PNP_BOOTP=y
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_ARPD is not set
+# CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
+# CONFIG_INET_TUNNEL is not set
+# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
+# CONFIG_INET_XFRM_MODE_TUNNEL is not set
+# CONFIG_INET_XFRM_MODE_BEET is not set
+# CONFIG_INET_LRO is not set
+CONFIG_INET_DIAG=y
+CONFIG_INET_TCP_DIAG=y
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
+# CONFIG_IPV6 is not set
+# CONFIG_NETWORK_SECMARK is not set
+# CONFIG_NETFILTER is not set
+# CONFIG_IP_DCCP is not set
+# CONFIG_IP_SCTP is not set
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_CAN is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
+# CONFIG_AF_RXRPC is not set
+
+#
+# Wireless
+#
+# CONFIG_CFG80211 is not set
+# CONFIG_WIRELESS_EXT is not set
+# CONFIG_MAC80211 is not set
+# CONFIG_IEEE80211 is not set
+# CONFIG_RFKILL is not set
+# CONFIG_NET_9P is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=y
+CONFIG_FIRMWARE_IN_KERNEL=y
+CONFIG_EXTRA_FIRMWARE=""
+# CONFIG_SYS_HYPERVISOR is not set
+# CONFIG_CONNECTOR is not set
+# CONFIG_MTD is not set
+# CONFIG_PARPORT is not set
+CONFIG_BLK_DEV=y
+# CONFIG_BLK_DEV_COW_COMMON is not set
+CONFIG_BLK_DEV_LOOP=y
+# CONFIG_BLK_DEV_CRYPTOLOOP is not set
+# CONFIG_BLK_DEV_NBD is not set
+# CONFIG_BLK_DEV_RAM is not set
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+# CONFIG_MISC_DEVICES is not set
+CONFIG_HAVE_IDE=y
+# CONFIG_IDE is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+# CONFIG_SCSI is not set
+# CONFIG_SCSI_DMA is not set
+# CONFIG_SCSI_NETLINK is not set
+# CONFIG_ATA is not set
+# CONFIG_MD is not set
+# CONFIG_NETDEVICES is not set
+# CONFIG_ISDN is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+# CONFIG_INPUT_POLLDEV is not set
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=y
+# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
+# CONFIG_INPUT_JOYDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_EVBUG is not set
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+# CONFIG_KEYBOARD_ATKBD is not set
+# CONFIG_KEYBOARD_SUNKBD is not set
+# CONFIG_KEYBOARD_LKKBD is not set
+# CONFIG_KEYBOARD_XTKBD is not set
+# CONFIG_KEYBOARD_NEWTON is not set
+# CONFIG_KEYBOARD_STOWAWAY is not set
+CONFIG_KEYBOARD_PXA27x=y
+# CONFIG_KEYBOARD_GPIO is not set
+# CONFIG_KEYBOARD_MATRIX is not set
+# CONFIG_INPUT_MOUSE is not set
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TABLET is not set
+# CONFIG_INPUT_TOUCHSCREEN is not set
+# CONFIG_INPUT_MISC is not set
+
+#
+# Hardware I/O ports
+#
+# CONFIG_SERIO is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_CONSOLE_TRANSLATIONS=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+# CONFIG_VT_HW_CONSOLE_BINDING is not set
+CONFIG_DEVKMEM=y
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+# CONFIG_SERIAL_8250 is not set
+
+#
+# Non-8250 serial port support
+#
+# CONFIG_SERIAL_PXA is not set
+CONFIG_UNIX98_PTYS=y
+CONFIG_LEGACY_PTYS=y
+CONFIG_LEGACY_PTY_COUNT=256
+# CONFIG_IPMI_HANDLER is not set
+# CONFIG_HW_RANDOM is not set
+# CONFIG_NVRAM is not set
+# CONFIG_R3964 is not set
+# CONFIG_RAW_DRIVER is not set
+# CONFIG_TCG_TPM is not set
+CONFIG_I2C=y
+CONFIG_I2C_BOARDINFO=y
+# CONFIG_I2C_CHARDEV is not set
+CONFIG_I2C_HELPER_AUTO=y
+
+#
+# I2C Hardware Bus support
+#
+
+#
+# I2C system bus drivers (mostly embedded / system-on-chip)
+#
+# CONFIG_I2C_GPIO is not set
+# CONFIG_I2C_OCORES is not set
+CONFIG_I2C_PXA=y
+# CONFIG_I2C_PXA_SLAVE is not set
+# CONFIG_I2C_SIMTEC is not set
+
+#
+# External I2C/SMBus adapter drivers
+#
+# CONFIG_I2C_PARPORT_LIGHT is not set
+# CONFIG_I2C_TAOS_EVM is not set
+
+#
+# Other I2C/SMBus bus drivers
+#
+# CONFIG_I2C_PCA_PLATFORM is not set
+# CONFIG_I2C_STUB is not set
+
+#
+# Miscellaneous I2C Chip support
+#
+# CONFIG_DS1682 is not set
+# CONFIG_AT24 is not set
+# CONFIG_SENSORS_EEPROM is not set
+# CONFIG_SENSORS_PCF8574 is not set
+# CONFIG_PCF8575 is not set
+# CONFIG_SENSORS_PCA9539 is not set
+# CONFIG_SENSORS_PCF8591 is not set
+# CONFIG_TPS65010 is not set
+# CONFIG_SENSORS_MAX6875 is not set
+# CONFIG_SENSORS_TSL2550 is not set
+# CONFIG_I2C_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+# CONFIG_I2C_DEBUG_CHIP is not set
+CONFIG_SPI=y
+CONFIG_SPI_MASTER=y
+
+#
+# SPI Master Controller Drivers
+#
+# CONFIG_SPI_BITBANG is not set
+# CONFIG_SPI_PXA2XX is not set
+
+#
+# SPI Protocol Masters
+#
+# CONFIG_SPI_AT25 is not set
+CONFIG_SPI_SPIDEV=y
+# CONFIG_SPI_TLE62X0 is not set
+CONFIG_ARCH_REQUIRE_GPIOLIB=y
+CONFIG_GPIOLIB=y
+CONFIG_GPIO_SYSFS=y
+
+#
+# I2C GPIO expanders:
+#
+# CONFIG_GPIO_MAX732X is not set
+# CONFIG_GPIO_PCA953X is not set
+# CONFIG_GPIO_PCF857X is not set
+
+#
+# PCI GPIO expanders:
+#
+
+#
+# SPI GPIO expanders:
+#
+# CONFIG_GPIO_MAX7301 is not set
+# CONFIG_GPIO_MCP23S08 is not set
+# CONFIG_W1 is not set
+CONFIG_POWER_SUPPLY=y
+# CONFIG_POWER_SUPPLY_DEBUG is not set
+CONFIG_PDA_POWER=y
+# CONFIG_APM_POWER is not set
+# CONFIG_BATTERY_DS2760 is not set
+# CONFIG_HWMON is not set
+# CONFIG_WATCHDOG is not set
+
+#
+# Sonics Silicon Backplane
+#
+CONFIG_SSB_POSSIBLE=y
+# CONFIG_SSB is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_CORE is not set
+# CONFIG_MFD_SM501 is not set
+# CONFIG_HTC_EGPIO is not set
+# CONFIG_HTC_PASIC3 is not set
+# CONFIG_MFD_TMIO is not set
+# CONFIG_MFD_T7L66XB is not set
+# CONFIG_MFD_TC6387XB is not set
+# CONFIG_MFD_TC6393XB is not set
+
+#
+# Multimedia devices
+#
+
+#
+# Multimedia core support
+#
+# CONFIG_VIDEO_DEV is not set
+# CONFIG_DVB_CORE is not set
+# CONFIG_VIDEO_MEDIA is not set
+
+#
+# Multimedia drivers
+#
+# CONFIG_DAB is not set
+
+#
+# Graphics support
+#
+# CONFIG_VGASTATE is not set
+# CONFIG_VIDEO_OUTPUT_CONTROL is not set
+CONFIG_FB=y
+# CONFIG_FIRMWARE_EDID is not set
+# CONFIG_FB_DDC is not set
+CONFIG_FB_CFB_FILLRECT=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
+# CONFIG_FB_SYS_FILLRECT is not set
+# CONFIG_FB_SYS_COPYAREA is not set
+# CONFIG_FB_SYS_IMAGEBLIT is not set
+# CONFIG_FB_FOREIGN_ENDIAN is not set
+# CONFIG_FB_SYS_FOPS is not set
+# CONFIG_FB_SVGALIB is not set
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+# CONFIG_FB_MODE_HELPERS is not set
+# CONFIG_FB_TILEBLITTING is not set
+
+#
+# Frame buffer hardware drivers
+#
+# CONFIG_FB_S1D13XXX is not set
+CONFIG_FB_PXA=y
+# CONFIG_FB_PXA_SMARTPANEL is not set
+# CONFIG_FB_PXA_PARAMETERS is not set
+# CONFIG_FB_MBX is not set
+# CONFIG_FB_W100 is not set
+# CONFIG_FB_AM200EPD is not set
+# CONFIG_FB_VIRTUAL is not set
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+# CONFIG_LCD_CLASS_DEVICE is not set
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+# CONFIG_BACKLIGHT_CORGI is not set
+CONFIG_BACKLIGHT_PWM=y
+
+#
+# Display device support
+#
+CONFIG_DISPLAY_SUPPORT=y
+
+#
+# Display hardware drivers
+#
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
+# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
+CONFIG_FONTS=y
+CONFIG_FONT_8x8=y
+# CONFIG_FONT_8x16 is not set
+# CONFIG_FONT_6x11 is not set
+# CONFIG_FONT_7x14 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
+# CONFIG_FONT_MINI_4x6 is not set
+# CONFIG_FONT_SUN8x16 is not set
+# CONFIG_FONT_SUN12x22 is not set
+# CONFIG_FONT_10x18 is not set
+# CONFIG_LOGO is not set
+# CONFIG_SOUND is not set
+# CONFIG_HID_SUPPORT is not set
+# CONFIG_USB_SUPPORT is not set
+CONFIG_MMC=y
+CONFIG_MMC_DEBUG=y
+# CONFIG_MMC_UNSAFE_RESUME is not set
+
+#
+# MMC/SD Card Drivers
+#
+CONFIG_MMC_BLOCK=y
+CONFIG_MMC_BLOCK_BOUNCE=y
+# CONFIG_SDIO_UART is not set
+# CONFIG_MMC_TEST is not set
+
+#
+# MMC/SD Host Controller Drivers
+#
+CONFIG_MMC_PXA=y
+# CONFIG_MMC_SDHCI is not set
+# CONFIG_MMC_SPI is not set
+# CONFIG_NEW_LEDS is not set
+CONFIG_RTC_LIB=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_HCTOSYS=y
+CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
+# CONFIG_RTC_DEBUG is not set
+
+#
+# RTC interfaces
+#
+CONFIG_RTC_INTF_SYSFS=y
+CONFIG_RTC_INTF_PROC=y
+CONFIG_RTC_INTF_DEV=y
+# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
+# CONFIG_RTC_DRV_TEST is not set
+
+#
+# I2C RTC drivers
+#
+# CONFIG_RTC_DRV_DS1307 is not set
+# CONFIG_RTC_DRV_DS1374 is not set
+# CONFIG_RTC_DRV_DS1672 is not set
+# CONFIG_RTC_DRV_MAX6900 is not set
+# CONFIG_RTC_DRV_RS5C372 is not set
+# CONFIG_RTC_DRV_ISL1208 is not set
+# CONFIG_RTC_DRV_X1205 is not set
+# CONFIG_RTC_DRV_PCF8563 is not set
+# CONFIG_RTC_DRV_PCF8583 is not set
+# CONFIG_RTC_DRV_M41T80 is not set
+# CONFIG_RTC_DRV_S35390A is not set
+# CONFIG_RTC_DRV_FM3130 is not set
+
+#
+# SPI RTC drivers
+#
+# CONFIG_RTC_DRV_M41T94 is not set
+# CONFIG_RTC_DRV_DS1305 is not set
+# CONFIG_RTC_DRV_MAX6902 is not set
+# CONFIG_RTC_DRV_R9701 is not set
+# CONFIG_RTC_DRV_RS5C348 is not set
+
+#
+# Platform RTC drivers
+#
+# CONFIG_RTC_DRV_CMOS is not set
+# CONFIG_RTC_DRV_DS1511 is not set
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+# CONFIG_RTC_DRV_STK17TA8 is not set
+# CONFIG_RTC_DRV_M48T86 is not set
+# CONFIG_RTC_DRV_M48T59 is not set
+# CONFIG_RTC_DRV_V3020 is not set
+
+#
+# on-CPU RTC drivers
+#
+CONFIG_RTC_DRV_SA1100=y
+# CONFIG_DMADEVICES is not set
+
+#
+# Voltage and Current regulators
+#
+# CONFIG_REGULATOR is not set
+# CONFIG_REGULATOR_FIXED_VOLTAGE is not set
+# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set
+# CONFIG_REGULATOR_BQ24022 is not set
+# CONFIG_UIO is not set
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
+# CONFIG_EXT2_FS_XIP is not set
+CONFIG_EXT3_FS=y
+CONFIG_EXT3_FS_XATTR=y
+# CONFIG_EXT3_FS_POSIX_ACL is not set
+# CONFIG_EXT3_FS_SECURITY is not set
+# CONFIG_EXT4DEV_FS is not set
+CONFIG_JBD=y
+CONFIG_FS_MBCACHE=y
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
+# CONFIG_XFS_FS is not set
+# CONFIG_OCFS2_FS is not set
+# CONFIG_DNOTIFY is not set
+# CONFIG_INOTIFY is not set
+# CONFIG_QUOTA is not set
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_AUTOFS4_FS is not set
+# CONFIG_FUSE_FS is not set
+
+#
+# CD-ROM/DVD Filesystems
+#
+# CONFIG_ISO9660_FS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=y
+CONFIG_MSDOS_FS=y
+CONFIG_VFAT_FS=y
+CONFIG_FAT_DEFAULT_CODEPAGE=866
+CONFIG_FAT_DEFAULT_IOCHARSET="utf8"
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLB_PAGE is not set
+# CONFIG_CONFIGFS_FS is not set
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+# CONFIG_CRAMFS is not set
+# CONFIG_VXFS_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_OMFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_ROMFS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+# CONFIG_NETWORK_FILESYSTEMS is not set
+
+#
+# Partition Types
+#
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_MSDOS_PARTITION=y
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="utf8"
+# CONFIG_NLS_CODEPAGE_437 is not set
+# CONFIG_NLS_CODEPAGE_737 is not set
+# CONFIG_NLS_CODEPAGE_775 is not set
+# CONFIG_NLS_CODEPAGE_850 is not set
+# CONFIG_NLS_CODEPAGE_852 is not set
+# CONFIG_NLS_CODEPAGE_855 is not set
+# CONFIG_NLS_CODEPAGE_857 is not set
+# CONFIG_NLS_CODEPAGE_860 is not set
+# CONFIG_NLS_CODEPAGE_861 is not set
+# CONFIG_NLS_CODEPAGE_862 is not set
+# CONFIG_NLS_CODEPAGE_863 is not set
+# CONFIG_NLS_CODEPAGE_864 is not set
+# CONFIG_NLS_CODEPAGE_865 is not set
+CONFIG_NLS_CODEPAGE_866=y
+# CONFIG_NLS_CODEPAGE_869 is not set
+# CONFIG_NLS_CODEPAGE_936 is not set
+# CONFIG_NLS_CODEPAGE_950 is not set
+# CONFIG_NLS_CODEPAGE_932 is not set
+# CONFIG_NLS_CODEPAGE_949 is not set
+# CONFIG_NLS_CODEPAGE_874 is not set
+# CONFIG_NLS_ISO8859_8 is not set
+# CONFIG_NLS_CODEPAGE_1250 is not set
+# CONFIG_NLS_CODEPAGE_1251 is not set
+# CONFIG_NLS_ASCII is not set
+# CONFIG_NLS_ISO8859_1 is not set
+# CONFIG_NLS_ISO8859_2 is not set
+# CONFIG_NLS_ISO8859_3 is not set
+# CONFIG_NLS_ISO8859_4 is not set
+# CONFIG_NLS_ISO8859_5 is not set
+# CONFIG_NLS_ISO8859_6 is not set
+# CONFIG_NLS_ISO8859_7 is not set
+# CONFIG_NLS_ISO8859_9 is not set
+# CONFIG_NLS_ISO8859_13 is not set
+# CONFIG_NLS_ISO8859_14 is not set
+# CONFIG_NLS_ISO8859_15 is not set
+# CONFIG_NLS_KOI8_R is not set
+# CONFIG_NLS_KOI8_U is not set
+CONFIG_NLS_UTF8=y
+# CONFIG_DLM is not set
+
+#
+# Kernel hacking
+#
+# CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_WARN_DEPRECATED=y
+CONFIG_ENABLE_MUST_CHECK=y
+CONFIG_FRAME_WARN=1024
+# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
+# CONFIG_DEBUG_FS is not set
+# CONFIG_HEADERS_CHECK is not set
+# CONFIG_DEBUG_KERNEL is not set
+CONFIG_DEBUG_BUGVERBOSE=y
+CONFIG_DEBUG_MEMORY_INIT=y
+CONFIG_FRAME_POINTER=y
+# CONFIG_LATENCYTOP is not set
+CONFIG_SYSCTL_SYSCALL_CHECK=y
+CONFIG_HAVE_FTRACE=y
+CONFIG_HAVE_DYNAMIC_FTRACE=y
+# CONFIG_FTRACE is not set
+# CONFIG_IRQSOFF_TRACER is not set
+# CONFIG_PREEMPT_TRACER is not set
+# CONFIG_SCHED_TRACER is not set
+# CONFIG_CONTEXT_SWITCH_TRACER is not set
+# CONFIG_SAMPLES is not set
+CONFIG_HAVE_ARCH_KGDB=y
+CONFIG_DEBUG_USER=y
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+# CONFIG_SECURITY_FILE_CAPABILITIES is not set
+# CONFIG_CRYPTO is not set
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+# CONFIG_GENERIC_FIND_FIRST_BIT is not set
+# CONFIG_GENERIC_FIND_NEXT_BIT is not set
+# CONFIG_CRC_CCITT is not set
+# CONFIG_CRC16 is not set
+CONFIG_CRC_T10DIF=y
+# CONFIG_CRC_ITU_T is not set
+CONFIG_CRC32=y
+# CONFIG_CRC7 is not set
+# CONFIG_LIBCRC32C is not set
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
diff --git a/arch/arm/configs/viper_defconfig b/arch/arm/configs/viper_defconfig
new file mode 100644 (file)
index 0000000..d01fecb
--- /dev/null
@@ -0,0 +1,1678 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.27-rc4
+# Thu Aug 21 17:12:07 2008
+#
+CONFIG_ARM=y
+CONFIG_HAVE_PWM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_GENERIC_GPIO=y
+CONFIG_GENERIC_TIME=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_MMU=y
+# CONFIG_NO_IOPORT is not set
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_STACKTRACE_SUPPORT=y
+CONFIG_HAVE_LATENCYTOP_SUPPORT=y
+CONFIG_LOCKDEP_SUPPORT=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_ARCH_SUPPORTS_AOUT=y
+CONFIG_ZONE_DMA=y
+CONFIG_ARCH_MTD_XIP=y
+CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
+CONFIG_VECTORS_BASE=0xffff0000
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# General setup
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+CONFIG_LOCALVERSION=""
+CONFIG_LOCALVERSION_AUTO=y
+# CONFIG_SWAP is not set
+CONFIG_SYSVIPC=y
+CONFIG_SYSVIPC_SYSCTL=y
+# CONFIG_POSIX_MQUEUE is not set
+# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_TASKSTATS is not set
+# CONFIG_AUDIT is not set
+# CONFIG_IKCONFIG is not set
+CONFIG_LOG_BUF_SHIFT=13
+# CONFIG_CGROUPS is not set
+# CONFIG_GROUP_SCHED is not set
+CONFIG_SYSFS_DEPRECATED=y
+CONFIG_SYSFS_DEPRECATED_V2=y
+# CONFIG_RELAY is not set
+# CONFIG_NAMESPACES is not set
+# CONFIG_BLK_DEV_INITRD is not set
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_EMBEDDED=y
+CONFIG_UID16=y
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_ALL is not set
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+# CONFIG_ELF_CORE is not set
+CONFIG_COMPAT_BRK=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_ANON_INODES=y
+CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_TIMERFD=y
+CONFIG_EVENTFD=y
+# CONFIG_SHMEM is not set
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_SLAB=y
+# CONFIG_SLUB is not set
+# CONFIG_SLOB is not set
+# CONFIG_PROFILING is not set
+# CONFIG_MARKERS is not set
+CONFIG_HAVE_OPROFILE=y
+# CONFIG_KPROBES is not set
+# CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS is not set
+# CONFIG_HAVE_IOREMAP_PROT is not set
+CONFIG_HAVE_KPROBES=y
+CONFIG_HAVE_KRETPROBES=y
+# CONFIG_HAVE_ARCH_TRACEHOOK is not set
+# CONFIG_HAVE_DMA_ATTRS is not set
+# CONFIG_USE_GENERIC_SMP_HELPERS is not set
+CONFIG_HAVE_CLK=y
+CONFIG_PROC_PAGE_MONITOR=y
+CONFIG_HAVE_GENERIC_DMA_COHERENT=y
+CONFIG_SLABINFO=y
+CONFIG_RT_MUTEXES=y
+CONFIG_TINY_SHMEM=y
+CONFIG_BASE_SMALL=0
+CONFIG_MODULES=y
+# CONFIG_MODULE_FORCE_LOAD is not set
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_KMOD=y
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF is not set
+# CONFIG_BLK_DEV_BSG is not set
+# CONFIG_BLK_DEV_INTEGRITY is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+# CONFIG_IOSCHED_AS is not set
+CONFIG_IOSCHED_DEADLINE=y
+# CONFIG_IOSCHED_CFQ is not set
+# CONFIG_DEFAULT_AS is not set
+CONFIG_DEFAULT_DEADLINE=y
+# CONFIG_DEFAULT_CFQ is not set
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="deadline"
+CONFIG_CLASSIC_RCU=y
+
+#
+# System Type
+#
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_AT91 is not set
+# CONFIG_ARCH_CLPS7500 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_IOP13XX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IXP23XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_KIRKWOOD is not set
+# CONFIG_ARCH_KS8695 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_LOKI is not set
+# CONFIG_ARCH_MV78XX0 is not set
+# CONFIG_ARCH_MXC is not set
+# CONFIG_ARCH_ORION5X is not set
+# CONFIG_ARCH_PNX4008 is not set
+CONFIG_ARCH_PXA=y
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 is not set
+# CONFIG_ARCH_S3C2410 is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_DAVINCI is not set
+# CONFIG_ARCH_OMAP is not set
+# CONFIG_ARCH_MSM7X00A is not set
+
+#
+# Intel PXA2xx/PXA3xx Implementations
+#
+# CONFIG_ARCH_GUMSTIX is not set
+# CONFIG_ARCH_LUBBOCK is not set
+# CONFIG_MACH_LOGICPD_PXA270 is not set
+# CONFIG_MACH_MAINSTONE is not set
+# CONFIG_ARCH_PXA_IDP is not set
+# CONFIG_PXA_SHARPSL is not set
+CONFIG_ARCH_VIPER=y
+# CONFIG_ARCH_PXA_ESERIES is not set
+# CONFIG_MACH_TRIZEPS4 is not set
+# CONFIG_MACH_EM_X270 is not set
+# CONFIG_MACH_COLIBRI is not set
+# CONFIG_MACH_ZYLONITE is not set
+# CONFIG_MACH_LITTLETON is not set
+# CONFIG_MACH_TAVOREVB is not set
+# CONFIG_MACH_SAAR is not set
+# CONFIG_MACH_ARMCORE is not set
+# CONFIG_MACH_MAGICIAN is not set
+# CONFIG_MACH_PCM027 is not set
+# CONFIG_ARCH_PXA_PALM is not set
+# CONFIG_PXA_EZX is not set
+CONFIG_PXA25x=y
+CONFIG_PXA_PWM=m
+CONFIG_PXA_HAVE_ISA_IRQS=y
+
+#
+# Boot options
+#
+
+#
+# Power management
+#
+
+#
+# Processor Type
+#
+CONFIG_CPU_32=y
+CONFIG_CPU_XSCALE=y
+CONFIG_CPU_32v5=y
+CONFIG_CPU_ABRT_EV5T=y
+CONFIG_CPU_PABRT_NOIFAR=y
+CONFIG_CPU_CACHE_VIVT=y
+CONFIG_CPU_TLB_V4WBI=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+
+#
+# Processor Features
+#
+CONFIG_ARM_THUMB=y
+# CONFIG_CPU_DCACHE_DISABLE is not set
+# CONFIG_OUTER_CACHE is not set
+CONFIG_IWMMXT=y
+CONFIG_XSCALE_PMU=y
+
+#
+# Bus support
+#
+CONFIG_ISA=y
+# CONFIG_PCI_SYSCALL is not set
+# CONFIG_ARCH_SUPPORTS_MSI is not set
+CONFIG_PCCARD=m
+# CONFIG_PCMCIA_DEBUG is not set
+CONFIG_PCMCIA=m
+CONFIG_PCMCIA_LOAD_CIS=y
+CONFIG_PCMCIA_IOCTL=y
+
+#
+# PC-card bridges
+#
+# CONFIG_I82365 is not set
+# CONFIG_TCIC is not set
+CONFIG_PCMCIA_PXA2XX=m
+CONFIG_PCMCIA_PROBE=y
+
+#
+# Kernel Features
+#
+CONFIG_TICK_ONESHOT=y
+# CONFIG_NO_HZ is not set
+# CONFIG_HIGH_RES_TIMERS is not set
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
+# CONFIG_PREEMPT is not set
+CONFIG_HZ=100
+CONFIG_AEABI=y
+CONFIG_OABI_COMPAT=y
+# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+# CONFIG_SPARSEMEM_STATIC is not set
+# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
+CONFIG_PAGEFLAGS_EXTENDED=y
+CONFIG_SPLIT_PTLOCK_CPUS=4096
+# CONFIG_RESOURCES_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=1
+CONFIG_BOUNCE=y
+CONFIG_VIRT_TO_BUS=y
+CONFIG_ALIGNMENT_TRAP=y
+
+#
+# Boot options
+#
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_CMDLINE="root=31:02 rootfstype=jffs2 ro console=ttyS0,115200"
+# CONFIG_XIP_KERNEL is not set
+# CONFIG_KEXEC is not set
+
+#
+# CPU Frequency scaling
+#
+CONFIG_CPU_FREQ=y
+CONFIG_CPU_FREQ_TABLE=y
+# CONFIG_CPU_FREQ_DEBUG is not set
+CONFIG_CPU_FREQ_STAT=y
+# CONFIG_CPU_FREQ_STAT_DETAILS is not set
+CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
+# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set
+# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
+# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set
+# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
+CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
+CONFIG_CPU_FREQ_GOV_POWERSAVE=m
+CONFIG_CPU_FREQ_GOV_USERSPACE=m
+CONFIG_CPU_FREQ_GOV_ONDEMAND=m
+CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m
+CONFIG_CPU_FREQ_PXA=y
+
+#
+# Floating point emulation
+#
+
+#
+# At least one emulation must be selected
+#
+# CONFIG_FPE_NWFPE is not set
+CONFIG_FPE_FASTFPE=y
+
+#
+# Userspace binary formats
+#
+CONFIG_BINFMT_ELF=y
+# CONFIG_BINFMT_AOUT is not set
+# CONFIG_BINFMT_MISC is not set
+
+#
+# Power management options
+#
+CONFIG_PM=y
+# CONFIG_PM_DEBUG is not set
+CONFIG_PM_SLEEP=y
+CONFIG_SUSPEND=y
+CONFIG_SUSPEND_FREEZER=y
+# CONFIG_APM_EMULATION is not set
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=y
+# CONFIG_PACKET_MMAP is not set
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER is not set
+# CONFIG_XFRM_SUB_POLICY is not set
+# CONFIG_XFRM_MIGRATE is not set
+# CONFIG_XFRM_STATISTICS is not set
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+# CONFIG_IP_MULTICAST is not set
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+# CONFIG_IP_PNP_BOOTP is not set
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_ARPD is not set
+CONFIG_SYN_COOKIES=y
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
+# CONFIG_INET_TUNNEL is not set
+CONFIG_INET_XFRM_MODE_TRANSPORT=y
+CONFIG_INET_XFRM_MODE_TUNNEL=y
+CONFIG_INET_XFRM_MODE_BEET=y
+# CONFIG_INET_LRO is not set
+CONFIG_INET_DIAG=y
+CONFIG_INET_TCP_DIAG=y
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
+# CONFIG_IPV6 is not set
+# CONFIG_NETWORK_SECMARK is not set
+# CONFIG_NETFILTER is not set
+# CONFIG_IP_DCCP is not set
+# CONFIG_IP_SCTP is not set
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_CAN is not set
+# CONFIG_IRDA is not set
+CONFIG_BT=m
+CONFIG_BT_L2CAP=m
+# CONFIG_BT_SCO is not set
+CONFIG_BT_RFCOMM=m
+CONFIG_BT_RFCOMM_TTY=y
+CONFIG_BT_BNEP=m
+# CONFIG_BT_BNEP_MC_FILTER is not set
+# CONFIG_BT_BNEP_PROTO_FILTER is not set
+# CONFIG_BT_HIDP is not set
+
+#
+# Bluetooth device drivers
+#
+CONFIG_BT_HCIUSB=m
+# CONFIG_BT_HCIUSB_SCO is not set
+# CONFIG_BT_HCIBTUSB is not set
+CONFIG_BT_HCIUART=m
+CONFIG_BT_HCIUART_H4=y
+CONFIG_BT_HCIUART_BCSP=y
+# CONFIG_BT_HCIUART_LL is not set
+# CONFIG_BT_HCIBCM203X is not set
+# CONFIG_BT_HCIBPA10X is not set
+# CONFIG_BT_HCIBFUSB is not set
+# CONFIG_BT_HCIDTL1 is not set
+# CONFIG_BT_HCIBT3C is not set
+# CONFIG_BT_HCIBLUECARD is not set
+# CONFIG_BT_HCIBTUART is not set
+# CONFIG_BT_HCIVHCI is not set
+# CONFIG_AF_RXRPC is not set
+
+#
+# Wireless
+#
+# CONFIG_CFG80211 is not set
+# CONFIG_WIRELESS_EXT is not set
+# CONFIG_MAC80211 is not set
+CONFIG_IEEE80211=m
+# CONFIG_IEEE80211_DEBUG is not set
+CONFIG_IEEE80211_CRYPT_WEP=m
+# CONFIG_IEEE80211_CRYPT_CCMP is not set
+# CONFIG_IEEE80211_CRYPT_TKIP is not set
+# CONFIG_RFKILL is not set
+# CONFIG_NET_9P is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=m
+CONFIG_FIRMWARE_IN_KERNEL=y
+CONFIG_EXTRA_FIRMWARE=""
+# CONFIG_DEBUG_DRIVER is not set
+# CONFIG_DEBUG_DEVRES is not set
+# CONFIG_SYS_HYPERVISOR is not set
+# CONFIG_CONNECTOR is not set
+CONFIG_MTD=y
+# CONFIG_MTD_DEBUG is not set
+# CONFIG_MTD_CONCAT is not set
+CONFIG_MTD_PARTITIONS=y
+CONFIG_MTD_REDBOOT_PARTS=y
+CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=0
+# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set
+# CONFIG_MTD_REDBOOT_PARTS_READONLY is not set
+# CONFIG_MTD_CMDLINE_PARTS is not set
+# CONFIG_MTD_AFS_PARTS is not set
+# CONFIG_MTD_AR7_PARTS is not set
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=m
+CONFIG_MTD_BLKDEVS=y
+CONFIG_MTD_BLOCK=y
+# CONFIG_FTL is not set
+# CONFIG_NFTL is not set
+# CONFIG_INFTL is not set
+# CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
+# CONFIG_MTD_OOPS is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+CONFIG_MTD_CFI=y
+CONFIG_MTD_JEDECPROBE=y
+CONFIG_MTD_GEN_PROBE=y
+CONFIG_MTD_CFI_ADV_OPTIONS=y
+CONFIG_MTD_CFI_NOSWAP=y
+# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set
+# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set
+CONFIG_MTD_CFI_GEOMETRY=y
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+# CONFIG_MTD_MAP_BANK_WIDTH_4 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+# CONFIG_MTD_CFI_I2 is not set
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+# CONFIG_MTD_OTP is not set
+CONFIG_MTD_CFI_INTELEXT=y
+CONFIG_MTD_CFI_AMDSTD=y
+# CONFIG_MTD_CFI_STAA is not set
+CONFIG_MTD_CFI_UTIL=y
+CONFIG_MTD_RAM=y
+# CONFIG_MTD_ROM is not set
+# CONFIG_MTD_ABSENT is not set
+# CONFIG_MTD_XIP is not set
+
+#
+# Mapping drivers for chip access
+#
+CONFIG_MTD_COMPLEX_MAPPINGS=y
+CONFIG_MTD_PHYSMAP=y
+CONFIG_MTD_PHYSMAP_START=0x8000000
+CONFIG_MTD_PHYSMAP_LEN=0
+CONFIG_MTD_PHYSMAP_BANKWIDTH=2
+CONFIG_MTD_PXA2XX=y
+# CONFIG_MTD_ARM_INTEGRATOR is not set
+# CONFIG_MTD_IMPA7 is not set
+# CONFIG_MTD_SHARP_SL is not set
+# CONFIG_MTD_PLATRAM is not set
+CONFIG_MTD_SPARSE_RAM=y
+
+#
+# Self-contained MTD device drivers
+#
+# CONFIG_MTD_SLRAM is not set
+# CONFIG_MTD_PHRAM is not set
+# CONFIG_MTD_MTDRAM is not set
+# CONFIG_MTD_BLOCK2MTD is not set
+
+#
+# Disk-On-Chip Device Drivers
+#
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+# CONFIG_MTD_DOC2001PLUS is not set
+# CONFIG_MTD_NAND is not set
+# CONFIG_MTD_ONENAND is not set
+
+#
+# UBI - Unsorted block images
+#
+# CONFIG_MTD_UBI is not set
+# CONFIG_PARPORT is not set
+# CONFIG_PNP is not set
+CONFIG_BLK_DEV=y
+# CONFIG_BLK_DEV_COW_COMMON is not set
+CONFIG_BLK_DEV_LOOP=m
+# CONFIG_BLK_DEV_CRYPTOLOOP is not set
+# CONFIG_BLK_DEV_NBD is not set
+# CONFIG_BLK_DEV_UB is not set
+# CONFIG_BLK_DEV_RAM is not set
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+CONFIG_MISC_DEVICES=y
+# CONFIG_EEPROM_93CX6 is not set
+# CONFIG_ENCLOSURE_SERVICES is not set
+CONFIG_HAVE_IDE=y
+# CONFIG_IDE is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+CONFIG_SCSI=m
+CONFIG_SCSI_DMA=y
+# CONFIG_SCSI_TGT is not set
+# CONFIG_SCSI_NETLINK is not set
+# CONFIG_SCSI_PROC_FS is not set
+
+#
+# SCSI support type (disk, tape, CD-ROM)
+#
+CONFIG_BLK_DEV_SD=m
+# CONFIG_CHR_DEV_ST is not set
+# CONFIG_CHR_DEV_OSST is not set
+# CONFIG_BLK_DEV_SR is not set
+# CONFIG_CHR_DEV_SG is not set
+# CONFIG_CHR_DEV_SCH is not set
+
+#
+# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
+#
+# CONFIG_SCSI_MULTI_LUN is not set
+# CONFIG_SCSI_CONSTANTS is not set
+# CONFIG_SCSI_LOGGING is not set
+# CONFIG_SCSI_SCAN_ASYNC is not set
+CONFIG_SCSI_WAIT_SCAN=m
+
+#
+# SCSI Transports
+#
+# CONFIG_SCSI_SPI_ATTRS is not set
+# CONFIG_SCSI_FC_ATTRS is not set
+# CONFIG_SCSI_ISCSI_ATTRS is not set
+# CONFIG_SCSI_SAS_LIBSAS is not set
+# CONFIG_SCSI_SRP_ATTRS is not set
+CONFIG_SCSI_LOWLEVEL=y
+# CONFIG_ISCSI_TCP is not set
+# CONFIG_SCSI_AHA152X is not set
+# CONFIG_SCSI_AIC7XXX_OLD is not set
+# CONFIG_SCSI_ADVANSYS is not set
+# CONFIG_SCSI_IN2000 is not set
+# CONFIG_SCSI_DTC3280 is not set
+# CONFIG_SCSI_FUTURE_DOMAIN is not set
+# CONFIG_SCSI_GENERIC_NCR5380 is not set
+# CONFIG_SCSI_GENERIC_NCR5380_MMIO is not set
+# CONFIG_SCSI_NCR53C406A is not set
+# CONFIG_SCSI_PAS16 is not set
+# CONFIG_SCSI_QLOGIC_FAS is not set
+# CONFIG_SCSI_SYM53C416 is not set
+# CONFIG_SCSI_T128 is not set
+# CONFIG_SCSI_DEBUG is not set
+# CONFIG_SCSI_LOWLEVEL_PCMCIA is not set
+# CONFIG_SCSI_DH is not set
+CONFIG_ATA=m
+# CONFIG_ATA_NONSTANDARD is not set
+# CONFIG_SATA_PMP is not set
+CONFIG_ATA_SFF=y
+# CONFIG_SATA_MV is not set
+# CONFIG_PATA_LEGACY is not set
+CONFIG_PATA_PCMCIA=m
+# CONFIG_PATA_QDI is not set
+# CONFIG_PATA_WINBOND_VLB is not set
+# CONFIG_PATA_PLATFORM is not set
+# CONFIG_MD is not set
+CONFIG_NETDEVICES=y
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_MACVLAN is not set
+# CONFIG_EQUALIZER is not set
+# CONFIG_TUN is not set
+# CONFIG_VETH is not set
+# CONFIG_ARCNET is not set
+# CONFIG_PHYLIB is not set
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=y
+# CONFIG_AX88796 is not set
+# CONFIG_NET_VENDOR_3COM is not set
+# CONFIG_NET_VENDOR_SMC is not set
+CONFIG_SMC91X=y
+# CONFIG_DM9000 is not set
+# CONFIG_SMC911X is not set
+# CONFIG_NET_VENDOR_RACAL is not set
+# CONFIG_AT1700 is not set
+# CONFIG_DEPCA is not set
+# CONFIG_HP100 is not set
+# CONFIG_NET_ISA is not set
+# CONFIG_IBM_NEW_EMAC_ZMII is not set
+# CONFIG_IBM_NEW_EMAC_RGMII is not set
+# CONFIG_IBM_NEW_EMAC_TAH is not set
+# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+# CONFIG_NET_PCI is not set
+# CONFIG_B44 is not set
+# CONFIG_NETDEV_1000 is not set
+# CONFIG_NETDEV_10000 is not set
+# CONFIG_TR is not set
+
+#
+# Wireless LAN
+#
+# CONFIG_WLAN_PRE80211 is not set
+# CONFIG_WLAN_80211 is not set
+# CONFIG_IWLWIFI_LEDS is not set
+
+#
+# USB Network Adapters
+#
+# CONFIG_USB_CATC is not set
+# CONFIG_USB_KAWETH is not set
+CONFIG_USB_PEGASUS=m
+# CONFIG_USB_RTL8150 is not set
+CONFIG_USB_USBNET=m
+CONFIG_USB_NET_AX8817X=m
+CONFIG_USB_NET_CDCETHER=m
+# CONFIG_USB_NET_DM9601 is not set
+# CONFIG_USB_NET_GL620A is not set
+CONFIG_USB_NET_NET1080=m
+# CONFIG_USB_NET_PLUSB is not set
+# CONFIG_USB_NET_MCS7830 is not set
+# CONFIG_USB_NET_RNDIS_HOST is not set
+# CONFIG_USB_NET_CDC_SUBSET is not set
+CONFIG_USB_NET_ZAURUS=m
+CONFIG_NET_PCMCIA=y
+# CONFIG_PCMCIA_3C589 is not set
+# CONFIG_PCMCIA_3C574 is not set
+# CONFIG_PCMCIA_FMVJ18X is not set
+# CONFIG_PCMCIA_PCNET is not set
+# CONFIG_PCMCIA_NMCLAN is not set
+# CONFIG_PCMCIA_SMC91C92 is not set
+# CONFIG_PCMCIA_XIRC2PS is not set
+# CONFIG_PCMCIA_AXNET is not set
+# CONFIG_WAN is not set
+CONFIG_PPP=m
+# CONFIG_PPP_MULTILINK is not set
+# CONFIG_PPP_FILTER is not set
+CONFIG_PPP_ASYNC=m
+# CONFIG_PPP_SYNC_TTY is not set
+CONFIG_PPP_DEFLATE=m
+CONFIG_PPP_BSDCOMP=m
+# CONFIG_PPP_MPPE is not set
+# CONFIG_PPPOE is not set
+# CONFIG_PPPOL2TP is not set
+# CONFIG_SLIP is not set
+CONFIG_SLHC=m
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+# CONFIG_ISDN is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+# CONFIG_INPUT_POLLDEV is not set
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=m
+# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
+# CONFIG_INPUT_JOYDEV is not set
+CONFIG_INPUT_EVDEV=m
+# CONFIG_INPUT_EVBUG is not set
+
+#
+# Input Device Drivers
+#
+# CONFIG_INPUT_KEYBOARD is not set
+# CONFIG_INPUT_MOUSE is not set
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TABLET is not set
+CONFIG_INPUT_TOUCHSCREEN=y
+CONFIG_TOUCHSCREEN_FUJITSU=m
+# CONFIG_TOUCHSCREEN_GUNZE is not set
+CONFIG_TOUCHSCREEN_ELO=m
+CONFIG_TOUCHSCREEN_MTOUCH=m
+CONFIG_TOUCHSCREEN_INEXIO=m
+# CONFIG_TOUCHSCREEN_MK712 is not set
+CONFIG_TOUCHSCREEN_HTCPEN=m
+CONFIG_TOUCHSCREEN_PENMOUNT=m
+CONFIG_TOUCHSCREEN_TOUCHRIGHT=m
+CONFIG_TOUCHSCREEN_TOUCHWIN=m
+# CONFIG_TOUCHSCREEN_UCB1400 is not set
+# CONFIG_TOUCHSCREEN_WM97XX is not set
+# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set
+CONFIG_TOUCHSCREEN_TOUCHIT213=m
+CONFIG_INPUT_MISC=y
+# CONFIG_INPUT_ATI_REMOTE is not set
+# CONFIG_INPUT_ATI_REMOTE2 is not set
+# CONFIG_INPUT_KEYSPAN_REMOTE is not set
+# CONFIG_INPUT_POWERMATE is not set
+# CONFIG_INPUT_YEALINK is not set
+CONFIG_INPUT_UINPUT=m
+
+#
+# Hardware I/O ports
+#
+CONFIG_SERIO=y
+CONFIG_SERIO_SERPORT=y
+# CONFIG_SERIO_LIBPS2 is not set
+# CONFIG_SERIO_RAW is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+# CONFIG_CONSOLE_TRANSLATIONS is not set
+# CONFIG_VT_CONSOLE is not set
+CONFIG_HW_CONSOLE=y
+# CONFIG_VT_HW_CONSOLE_BINDING is not set
+CONFIG_DEVKMEM=y
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=m
+# CONFIG_SERIAL_8250_CS is not set
+CONFIG_SERIAL_8250_NR_UARTS=5
+CONFIG_SERIAL_8250_RUNTIME_UARTS=5
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_PXA=y
+CONFIG_SERIAL_PXA_CONSOLE=y
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+CONFIG_UNIX98_PTYS=y
+# CONFIG_LEGACY_PTYS is not set
+# CONFIG_IPMI_HANDLER is not set
+CONFIG_HW_RANDOM=m
+# CONFIG_NVRAM is not set
+# CONFIG_DTLK is not set
+# CONFIG_R3964 is not set
+
+#
+# PCMCIA character devices
+#
+# CONFIG_SYNCLINK_CS is not set
+# CONFIG_CARDMAN_4000 is not set
+# CONFIG_CARDMAN_4040 is not set
+# CONFIG_IPWIRELESS is not set
+# CONFIG_RAW_DRIVER is not set
+# CONFIG_TCG_TPM is not set
+CONFIG_DEVPORT=y
+CONFIG_I2C=y
+CONFIG_I2C_BOARDINFO=y
+CONFIG_I2C_CHARDEV=y
+# CONFIG_I2C_HELPER_AUTO is not set
+
+#
+# I2C Algorithms
+#
+CONFIG_I2C_ALGOBIT=y
+# CONFIG_I2C_ALGOPCF is not set
+# CONFIG_I2C_ALGOPCA is not set
+
+#
+# I2C Hardware Bus support
+#
+
+#
+# I2C system bus drivers (mostly embedded / system-on-chip)
+#
+CONFIG_I2C_GPIO=y
+# CONFIG_I2C_OCORES is not set
+CONFIG_I2C_PXA=y
+# CONFIG_I2C_PXA_SLAVE is not set
+# CONFIG_I2C_SIMTEC is not set
+
+#
+# External I2C/SMBus adapter drivers
+#
+# CONFIG_I2C_PARPORT_LIGHT is not set
+# CONFIG_I2C_TAOS_EVM is not set
+# CONFIG_I2C_TINY_USB is not set
+
+#
+# Other I2C/SMBus bus drivers
+#
+# CONFIG_I2C_ELEKTOR is not set
+# CONFIG_I2C_PCA_ISA is not set
+# CONFIG_I2C_PCA_PLATFORM is not set
+# CONFIG_I2C_STUB is not set
+
+#
+# Miscellaneous I2C Chip support
+#
+# CONFIG_DS1682 is not set
+# CONFIG_AT24 is not set
+# CONFIG_SENSORS_EEPROM is not set
+# CONFIG_SENSORS_PCF8574 is not set
+# CONFIG_PCF8575 is not set
+# CONFIG_SENSORS_PCA9539 is not set
+# CONFIG_SENSORS_PCF8591 is not set
+# CONFIG_TPS65010 is not set
+# CONFIG_SENSORS_MAX6875 is not set
+# CONFIG_SENSORS_TSL2550 is not set
+# CONFIG_I2C_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+# CONFIG_I2C_DEBUG_CHIP is not set
+# CONFIG_SPI is not set
+CONFIG_ARCH_REQUIRE_GPIOLIB=y
+CONFIG_GPIOLIB=y
+# CONFIG_DEBUG_GPIO is not set
+CONFIG_GPIO_SYSFS=y
+
+#
+# I2C GPIO expanders:
+#
+# CONFIG_GPIO_MAX732X is not set
+# CONFIG_GPIO_PCA953X is not set
+# CONFIG_GPIO_PCF857X is not set
+
+#
+# PCI GPIO expanders:
+#
+
+#
+# SPI GPIO expanders:
+#
+# CONFIG_W1 is not set
+# CONFIG_POWER_SUPPLY is not set
+CONFIG_HWMON=y
+# CONFIG_HWMON_VID is not set
+# CONFIG_SENSORS_AD7414 is not set
+# CONFIG_SENSORS_AD7418 is not set
+# CONFIG_SENSORS_ADM1021 is not set
+# CONFIG_SENSORS_ADM1025 is not set
+# CONFIG_SENSORS_ADM1026 is not set
+# CONFIG_SENSORS_ADM1029 is not set
+# CONFIG_SENSORS_ADM1031 is not set
+# CONFIG_SENSORS_ADM9240 is not set
+# CONFIG_SENSORS_ADT7470 is not set
+# CONFIG_SENSORS_ADT7473 is not set
+# CONFIG_SENSORS_ATXP1 is not set
+# CONFIG_SENSORS_DS1621 is not set
+# CONFIG_SENSORS_F71805F is not set
+# CONFIG_SENSORS_F71882FG is not set
+# CONFIG_SENSORS_F75375S is not set
+# CONFIG_SENSORS_GL518SM is not set
+# CONFIG_SENSORS_GL520SM is not set
+# CONFIG_SENSORS_IT87 is not set
+# CONFIG_SENSORS_LM63 is not set
+# CONFIG_SENSORS_LM75 is not set
+# CONFIG_SENSORS_LM77 is not set
+# CONFIG_SENSORS_LM78 is not set
+# CONFIG_SENSORS_LM80 is not set
+# CONFIG_SENSORS_LM83 is not set
+# CONFIG_SENSORS_LM85 is not set
+# CONFIG_SENSORS_LM87 is not set
+# CONFIG_SENSORS_LM90 is not set
+# CONFIG_SENSORS_LM92 is not set
+# CONFIG_SENSORS_LM93 is not set
+# CONFIG_SENSORS_MAX1619 is not set
+# CONFIG_SENSORS_MAX6650 is not set
+# CONFIG_SENSORS_PC87360 is not set
+# CONFIG_SENSORS_PC87427 is not set
+# CONFIG_SENSORS_DME1737 is not set
+# CONFIG_SENSORS_SMSC47M1 is not set
+# CONFIG_SENSORS_SMSC47M192 is not set
+# CONFIG_SENSORS_SMSC47B397 is not set
+# CONFIG_SENSORS_ADS7828 is not set
+# CONFIG_SENSORS_THMC50 is not set
+# CONFIG_SENSORS_VT1211 is not set
+# CONFIG_SENSORS_W83781D is not set
+# CONFIG_SENSORS_W83791D is not set
+# CONFIG_SENSORS_W83792D is not set
+# CONFIG_SENSORS_W83793 is not set
+# CONFIG_SENSORS_W83L785TS is not set
+# CONFIG_SENSORS_W83L786NG is not set
+# CONFIG_SENSORS_W83627HF is not set
+# CONFIG_SENSORS_W83627EHF is not set
+# CONFIG_HWMON_DEBUG_CHIP is not set
+CONFIG_WATCHDOG=y
+# CONFIG_WATCHDOG_NOWAYOUT is not set
+
+#
+# Watchdog Device Drivers
+#
+# CONFIG_SOFT_WATCHDOG is not set
+# CONFIG_SA1100_WATCHDOG is not set
+
+#
+# ISA-based Watchdog Cards
+#
+# CONFIG_PCWATCHDOG is not set
+# CONFIG_MIXCOMWD is not set
+# CONFIG_WDT is not set
+
+#
+# USB-based Watchdog Cards
+#
+# CONFIG_USBPCWATCHDOG is not set
+
+#
+# Sonics Silicon Backplane
+#
+CONFIG_SSB_POSSIBLE=y
+# CONFIG_SSB is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_CORE is not set
+# CONFIG_MFD_SM501 is not set
+# CONFIG_HTC_EGPIO is not set
+# CONFIG_HTC_PASIC3 is not set
+# CONFIG_MFD_TMIO is not set
+# CONFIG_MFD_T7L66XB is not set
+# CONFIG_MFD_TC6387XB is not set
+# CONFIG_MFD_TC6393XB is not set
+
+#
+# Multimedia devices
+#
+
+#
+# Multimedia core support
+#
+# CONFIG_VIDEO_DEV is not set
+# CONFIG_DVB_CORE is not set
+# CONFIG_VIDEO_MEDIA is not set
+
+#
+# Multimedia drivers
+#
+# CONFIG_DAB is not set
+
+#
+# Graphics support
+#
+# CONFIG_VGASTATE is not set
+# CONFIG_VIDEO_OUTPUT_CONTROL is not set
+CONFIG_FB=y
+# CONFIG_FIRMWARE_EDID is not set
+# CONFIG_FB_DDC is not set
+CONFIG_FB_CFB_FILLRECT=m
+CONFIG_FB_CFB_COPYAREA=m
+CONFIG_FB_CFB_IMAGEBLIT=m
+# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
+# CONFIG_FB_SYS_FILLRECT is not set
+# CONFIG_FB_SYS_COPYAREA is not set
+# CONFIG_FB_SYS_IMAGEBLIT is not set
+# CONFIG_FB_FOREIGN_ENDIAN is not set
+# CONFIG_FB_SYS_FOPS is not set
+# CONFIG_FB_SVGALIB is not set
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+# CONFIG_FB_MODE_HELPERS is not set
+# CONFIG_FB_TILEBLITTING is not set
+
+#
+# Frame buffer hardware drivers
+#
+# CONFIG_FB_S1D13XXX is not set
+CONFIG_FB_PXA=m
+# CONFIG_FB_PXA_SMARTPANEL is not set
+CONFIG_FB_PXA_PARAMETERS=y
+# CONFIG_FB_MBX is not set
+# CONFIG_FB_W100 is not set
+# CONFIG_FB_AM200EPD is not set
+# CONFIG_FB_VIRTUAL is not set
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+CONFIG_LCD_CLASS_DEVICE=m
+# CONFIG_LCD_ILI9320 is not set
+# CONFIG_LCD_PLATFORM is not set
+CONFIG_BACKLIGHT_CLASS_DEVICE=m
+# CONFIG_BACKLIGHT_CORGI is not set
+CONFIG_BACKLIGHT_PWM=m
+
+#
+# Display device support
+#
+# CONFIG_DISPLAY_SUPPORT is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+# CONFIG_MDA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=m
+# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
+# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
+# CONFIG_FONTS is not set
+CONFIG_FONT_8x8=y
+CONFIG_FONT_8x16=y
+CONFIG_LOGO=y
+CONFIG_LOGO_LINUX_MONO=y
+CONFIG_LOGO_LINUX_VGA16=y
+CONFIG_LOGO_LINUX_CLUT224=y
+CONFIG_SOUND=m
+CONFIG_SND=m
+CONFIG_SND_TIMER=m
+CONFIG_SND_PCM=m
+# CONFIG_SND_SEQUENCER is not set
+CONFIG_SND_OSSEMUL=y
+CONFIG_SND_MIXER_OSS=m
+CONFIG_SND_PCM_OSS=m
+CONFIG_SND_PCM_OSS_PLUGINS=y
+# CONFIG_SND_DYNAMIC_MINORS is not set
+CONFIG_SND_SUPPORT_OLD_API=y
+CONFIG_SND_VERBOSE_PROCFS=y
+# CONFIG_SND_VERBOSE_PRINTK is not set
+# CONFIG_SND_DEBUG is not set
+CONFIG_SND_VMASTER=y
+CONFIG_SND_AC97_CODEC=m
+CONFIG_SND_DRIVERS=y
+# CONFIG_SND_DUMMY is not set
+# CONFIG_SND_MTPAV is not set
+# CONFIG_SND_SERIAL_U16550 is not set
+# CONFIG_SND_MPU401 is not set
+# CONFIG_SND_AC97_POWER_SAVE is not set
+CONFIG_SND_ARM=y
+CONFIG_SND_PXA2XX_PCM=m
+CONFIG_SND_PXA2XX_AC97=m
+CONFIG_SND_USB=y
+# CONFIG_SND_USB_AUDIO is not set
+# CONFIG_SND_USB_CAIAQ is not set
+CONFIG_SND_PCMCIA=y
+# CONFIG_SND_VXPOCKET is not set
+# CONFIG_SND_PDAUDIOCF is not set
+# CONFIG_SND_SOC is not set
+# CONFIG_SOUND_PRIME is not set
+CONFIG_AC97_BUS=m
+CONFIG_HID_SUPPORT=y
+CONFIG_HID=y
+# CONFIG_HID_DEBUG is not set
+# CONFIG_HIDRAW is not set
+
+#
+# USB Input Devices
+#
+CONFIG_USB_HID=m
+# CONFIG_USB_HIDINPUT_POWERBOOK is not set
+# CONFIG_HID_FF is not set
+# CONFIG_USB_HIDDEV is not set
+
+#
+# USB HID Boot Protocol drivers
+#
+# CONFIG_USB_KBD is not set
+# CONFIG_USB_MOUSE is not set
+CONFIG_USB_SUPPORT=y
+CONFIG_USB_ARCH_HAS_HCD=y
+# CONFIG_USB_ARCH_HAS_OHCI is not set
+# CONFIG_USB_ARCH_HAS_EHCI is not set
+CONFIG_USB=m
+# CONFIG_USB_DEBUG is not set
+# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set
+
+#
+# Miscellaneous USB options
+#
+CONFIG_USB_DEVICEFS=y
+CONFIG_USB_DEVICE_CLASS=y
+# CONFIG_USB_DYNAMIC_MINORS is not set
+CONFIG_USB_SUSPEND=y
+# CONFIG_USB_OTG is not set
+# CONFIG_USB_OTG_WHITELIST is not set
+# CONFIG_USB_OTG_BLACKLIST_HUB is not set
+# CONFIG_USB_MON is not set
+
+#
+# USB Host Controller Drivers
+#
+# CONFIG_USB_C67X00_HCD is not set
+CONFIG_USB_ISP116X_HCD=m
+# CONFIG_USB_ISP1760_HCD is not set
+CONFIG_USB_SL811_HCD=m
+# CONFIG_USB_SL811_CS is not set
+CONFIG_USB_R8A66597_HCD=m
+# CONFIG_USB_MUSB_HDRC is not set
+# CONFIG_USB_GADGET_MUSB_HDRC is not set
+
+#
+# USB Device Class drivers
+#
+CONFIG_USB_ACM=m
+# CONFIG_USB_PRINTER is not set
+# CONFIG_USB_WDM is not set
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
+
+#
+# may also be needed; see USB_STORAGE Help for more information
+#
+CONFIG_USB_STORAGE=m
+# CONFIG_USB_STORAGE_DEBUG is not set
+# CONFIG_USB_STORAGE_DATAFAB is not set
+# CONFIG_USB_STORAGE_FREECOM is not set
+# CONFIG_USB_STORAGE_ISD200 is not set
+# CONFIG_USB_STORAGE_DPCM is not set
+# CONFIG_USB_STORAGE_USBAT is not set
+# CONFIG_USB_STORAGE_SDDR09 is not set
+# CONFIG_USB_STORAGE_SDDR55 is not set
+# CONFIG_USB_STORAGE_JUMPSHOT is not set
+# CONFIG_USB_STORAGE_ALAUDA is not set
+# CONFIG_USB_STORAGE_ONETOUCH is not set
+# CONFIG_USB_STORAGE_KARMA is not set
+# CONFIG_USB_STORAGE_SIERRA is not set
+# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
+# CONFIG_USB_LIBUSUAL is not set
+
+#
+# USB Imaging devices
+#
+# CONFIG_USB_MDC800 is not set
+# CONFIG_USB_MICROTEK is not set
+
+#
+# USB port drivers
+#
+CONFIG_USB_SERIAL=m
+# CONFIG_USB_EZUSB is not set
+CONFIG_USB_SERIAL_GENERIC=y
+# CONFIG_USB_SERIAL_AIRCABLE is not set
+# CONFIG_USB_SERIAL_ARK3116 is not set
+# CONFIG_USB_SERIAL_BELKIN is not set
+# CONFIG_USB_SERIAL_CH341 is not set
+# CONFIG_USB_SERIAL_WHITEHEAT is not set
+# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set
+# CONFIG_USB_SERIAL_CP2101 is not set
+# CONFIG_USB_SERIAL_CYPRESS_M8 is not set
+# CONFIG_USB_SERIAL_EMPEG is not set
+# CONFIG_USB_SERIAL_FTDI_SIO is not set
+# CONFIG_USB_SERIAL_FUNSOFT is not set
+# CONFIG_USB_SERIAL_VISOR is not set
+# CONFIG_USB_SERIAL_IPAQ is not set
+# CONFIG_USB_SERIAL_IR is not set
+# CONFIG_USB_SERIAL_EDGEPORT is not set
+# CONFIG_USB_SERIAL_EDGEPORT_TI is not set
+# CONFIG_USB_SERIAL_GARMIN is not set
+# CONFIG_USB_SERIAL_IPW is not set
+# CONFIG_USB_SERIAL_IUU is not set
+# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set
+# CONFIG_USB_SERIAL_KEYSPAN is not set
+# CONFIG_USB_SERIAL_KLSI is not set
+# CONFIG_USB_SERIAL_KOBIL_SCT is not set
+CONFIG_USB_SERIAL_MCT_U232=m
+# CONFIG_USB_SERIAL_MOS7720 is not set
+# CONFIG_USB_SERIAL_MOS7840 is not set
+# CONFIG_USB_SERIAL_MOTOROLA is not set
+# CONFIG_USB_SERIAL_NAVMAN is not set
+# CONFIG_USB_SERIAL_PL2303 is not set
+# CONFIG_USB_SERIAL_OTI6858 is not set
+# CONFIG_USB_SERIAL_SPCP8X5 is not set
+# CONFIG_USB_SERIAL_HP4X is not set
+# CONFIG_USB_SERIAL_SAFE is not set
+# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set
+# CONFIG_USB_SERIAL_TI is not set
+# CONFIG_USB_SERIAL_CYBERJACK is not set
+# CONFIG_USB_SERIAL_XIRCOM is not set
+# CONFIG_USB_SERIAL_OPTION is not set
+# CONFIG_USB_SERIAL_OMNINET is not set
+# CONFIG_USB_SERIAL_DEBUG is not set
+
+#
+# USB Miscellaneous drivers
+#
+# CONFIG_USB_EMI62 is not set
+# CONFIG_USB_EMI26 is not set
+# CONFIG_USB_ADUTUX is not set
+# CONFIG_USB_RIO500 is not set
+# CONFIG_USB_LEGOTOWER is not set
+# CONFIG_USB_LCD is not set
+# CONFIG_USB_BERRY_CHARGE is not set
+# CONFIG_USB_LED is not set
+# CONFIG_USB_CYPRESS_CY7C63 is not set
+# CONFIG_USB_CYTHERM is not set
+# CONFIG_USB_PHIDGET is not set
+# CONFIG_USB_IDMOUSE is not set
+# CONFIG_USB_FTDI_ELAN is not set
+# CONFIG_USB_APPLEDISPLAY is not set
+# CONFIG_USB_LD is not set
+# CONFIG_USB_TRANCEVIBRATOR is not set
+# CONFIG_USB_IOWARRIOR is not set
+# CONFIG_USB_TEST is not set
+# CONFIG_USB_ISIGHTFW is not set
+CONFIG_USB_GADGET=m
+# CONFIG_USB_GADGET_DEBUG is not set
+# CONFIG_USB_GADGET_DEBUG_FILES is not set
+CONFIG_USB_GADGET_SELECTED=y
+# CONFIG_USB_GADGET_AMD5536UDC is not set
+# CONFIG_USB_GADGET_ATMEL_USBA is not set
+# CONFIG_USB_GADGET_FSL_USB2 is not set
+# CONFIG_USB_GADGET_NET2280 is not set
+CONFIG_USB_GADGET_PXA25X=y
+CONFIG_USB_PXA25X=m
+# CONFIG_USB_PXA25X_SMALL is not set
+# CONFIG_USB_GADGET_M66592 is not set
+# CONFIG_USB_GADGET_PXA27X is not set
+# CONFIG_USB_GADGET_GOKU is not set
+# CONFIG_USB_GADGET_LH7A40X is not set
+# CONFIG_USB_GADGET_OMAP is not set
+# CONFIG_USB_GADGET_S3C2410 is not set
+# CONFIG_USB_GADGET_AT91 is not set
+# CONFIG_USB_GADGET_DUMMY_HCD is not set
+# CONFIG_USB_GADGET_DUALSPEED is not set
+# CONFIG_USB_ZERO is not set
+CONFIG_USB_ETH=m
+CONFIG_USB_ETH_RNDIS=y
+CONFIG_USB_GADGETFS=m
+CONFIG_USB_FILE_STORAGE=m
+# CONFIG_USB_FILE_STORAGE_TEST is not set
+CONFIG_USB_G_SERIAL=m
+# CONFIG_USB_MIDI_GADGET is not set
+CONFIG_USB_G_PRINTER=m
+# CONFIG_USB_CDC_COMPOSITE is not set
+# CONFIG_MMC is not set
+# CONFIG_NEW_LEDS is not set
+CONFIG_RTC_LIB=y
+CONFIG_RTC_CLASS=m
+
+#
+# RTC interfaces
+#
+CONFIG_RTC_INTF_SYSFS=y
+CONFIG_RTC_INTF_PROC=y
+CONFIG_RTC_INTF_DEV=y
+# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
+# CONFIG_RTC_DRV_TEST is not set
+
+#
+# I2C RTC drivers
+#
+CONFIG_RTC_DRV_DS1307=m
+# CONFIG_RTC_DRV_DS1374 is not set
+# CONFIG_RTC_DRV_DS1672 is not set
+# CONFIG_RTC_DRV_MAX6900 is not set
+# CONFIG_RTC_DRV_RS5C372 is not set
+# CONFIG_RTC_DRV_ISL1208 is not set
+# CONFIG_RTC_DRV_X1205 is not set
+# CONFIG_RTC_DRV_PCF8563 is not set
+# CONFIG_RTC_DRV_PCF8583 is not set
+# CONFIG_RTC_DRV_M41T80 is not set
+# CONFIG_RTC_DRV_S35390A is not set
+# CONFIG_RTC_DRV_FM3130 is not set
+
+#
+# SPI RTC drivers
+#
+
+#
+# Platform RTC drivers
+#
+# CONFIG_RTC_DRV_CMOS is not set
+# CONFIG_RTC_DRV_DS1511 is not set
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+# CONFIG_RTC_DRV_STK17TA8 is not set
+# CONFIG_RTC_DRV_M48T86 is not set
+# CONFIG_RTC_DRV_M48T59 is not set
+# CONFIG_RTC_DRV_V3020 is not set
+
+#
+# on-CPU RTC drivers
+#
+CONFIG_RTC_DRV_SA1100=m
+# CONFIG_DMADEVICES is not set
+
+#
+# Voltage and Current regulators
+#
+# CONFIG_REGULATOR is not set
+# CONFIG_REGULATOR_FIXED_VOLTAGE is not set
+# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set
+# CONFIG_REGULATOR_BQ24022 is not set
+# CONFIG_UIO is not set
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=m
+# CONFIG_EXT2_FS_XATTR is not set
+# CONFIG_EXT2_FS_XIP is not set
+CONFIG_EXT3_FS=m
+# CONFIG_EXT3_FS_XATTR is not set
+# CONFIG_EXT4DEV_FS is not set
+CONFIG_JBD=m
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
+# CONFIG_XFS_FS is not set
+# CONFIG_OCFS2_FS is not set
+# CONFIG_DNOTIFY is not set
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+# CONFIG_QUOTA is not set
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_AUTOFS4_FS is not set
+# CONFIG_FUSE_FS is not set
+
+#
+# CD-ROM/DVD Filesystems
+#
+# CONFIG_ISO9660_FS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=m
+# CONFIG_MSDOS_FS is not set
+CONFIG_VFAT_FS=m
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLB_PAGE is not set
+# CONFIG_CONFIGFS_FS is not set
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+CONFIG_JFFS2_FS=y
+CONFIG_JFFS2_FS_DEBUG=0
+CONFIG_JFFS2_FS_WRITEBUFFER=y
+# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
+# CONFIG_JFFS2_SUMMARY is not set
+# CONFIG_JFFS2_FS_XATTR is not set
+# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
+CONFIG_JFFS2_ZLIB=y
+# CONFIG_JFFS2_LZO is not set
+CONFIG_JFFS2_RTIME=y
+# CONFIG_JFFS2_RUBIN is not set
+# CONFIG_CRAMFS is not set
+# CONFIG_VXFS_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_OMFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_ROMFS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+CONFIG_NETWORK_FILESYSTEMS=y
+CONFIG_NFS_FS=y
+CONFIG_NFS_V3=y
+# CONFIG_NFS_V3_ACL is not set
+# CONFIG_NFS_V4 is not set
+CONFIG_ROOT_NFS=y
+CONFIG_NFSD=m
+CONFIG_NFSD_V3=y
+# CONFIG_NFSD_V3_ACL is not set
+# CONFIG_NFSD_V4 is not set
+CONFIG_LOCKD=y
+CONFIG_LOCKD_V4=y
+CONFIG_EXPORTFS=m
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=y
+# CONFIG_RPCSEC_GSS_KRB5 is not set
+# CONFIG_RPCSEC_GSS_SPKM3 is not set
+# CONFIG_SMB_FS is not set
+# CONFIG_CIFS is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+
+#
+# Partition Types
+#
+CONFIG_PARTITION_ADVANCED=y
+# CONFIG_ACORN_PARTITION is not set
+# CONFIG_OSF_PARTITION is not set
+# CONFIG_AMIGA_PARTITION is not set
+# CONFIG_ATARI_PARTITION is not set
+# CONFIG_MAC_PARTITION is not set
+CONFIG_MSDOS_PARTITION=y
+# CONFIG_BSD_DISKLABEL is not set
+# CONFIG_MINIX_SUBPARTITION is not set
+# CONFIG_SOLARIS_X86_PARTITION is not set
+# CONFIG_UNIXWARE_DISKLABEL is not set
+# CONFIG_LDM_PARTITION is not set
+# CONFIG_SGI_PARTITION is not set
+# CONFIG_ULTRIX_PARTITION is not set
+# CONFIG_SUN_PARTITION is not set
+# CONFIG_KARMA_PARTITION is not set
+# CONFIG_EFI_PARTITION is not set
+# CONFIG_SYSV68_PARTITION is not set
+CONFIG_NLS=m
+CONFIG_NLS_DEFAULT="iso8859-1"
+CONFIG_NLS_CODEPAGE_437=m
+# CONFIG_NLS_CODEPAGE_737 is not set
+# CONFIG_NLS_CODEPAGE_775 is not set
+CONFIG_NLS_CODEPAGE_850=m
+# CONFIG_NLS_CODEPAGE_852 is not set
+# CONFIG_NLS_CODEPAGE_855 is not set
+# CONFIG_NLS_CODEPAGE_857 is not set
+# CONFIG_NLS_CODEPAGE_860 is not set
+# CONFIG_NLS_CODEPAGE_861 is not set
+# CONFIG_NLS_CODEPAGE_862 is not set
+# CONFIG_NLS_CODEPAGE_863 is not set
+# CONFIG_NLS_CODEPAGE_864 is not set
+# CONFIG_NLS_CODEPAGE_865 is not set
+# CONFIG_NLS_CODEPAGE_866 is not set
+# CONFIG_NLS_CODEPAGE_869 is not set
+# CONFIG_NLS_CODEPAGE_936 is not set
+# CONFIG_NLS_CODEPAGE_950 is not set
+# CONFIG_NLS_CODEPAGE_932 is not set
+# CONFIG_NLS_CODEPAGE_949 is not set
+# CONFIG_NLS_CODEPAGE_874 is not set
+# CONFIG_NLS_ISO8859_8 is not set
+# CONFIG_NLS_CODEPAGE_1250 is not set
+# CONFIG_NLS_CODEPAGE_1251 is not set
+# CONFIG_NLS_ASCII is not set
+CONFIG_NLS_ISO8859_1=m
+# CONFIG_NLS_ISO8859_2 is not set
+# CONFIG_NLS_ISO8859_3 is not set
+# CONFIG_NLS_ISO8859_4 is not set
+# CONFIG_NLS_ISO8859_5 is not set
+# CONFIG_NLS_ISO8859_6 is not set
+# CONFIG_NLS_ISO8859_7 is not set
+# CONFIG_NLS_ISO8859_9 is not set
+# CONFIG_NLS_ISO8859_13 is not set
+# CONFIG_NLS_ISO8859_14 is not set
+CONFIG_NLS_ISO8859_15=m
+# CONFIG_NLS_KOI8_R is not set
+# CONFIG_NLS_KOI8_U is not set
+CONFIG_NLS_UTF8=m
+# CONFIG_DLM is not set
+
+#
+# Kernel hacking
+#
+# CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_WARN_DEPRECATED=y
+CONFIG_ENABLE_MUST_CHECK=y
+CONFIG_FRAME_WARN=1024
+CONFIG_MAGIC_SYSRQ=y
+# CONFIG_UNUSED_SYMBOLS is not set
+# CONFIG_DEBUG_FS is not set
+# CONFIG_HEADERS_CHECK is not set
+CONFIG_DEBUG_KERNEL=y
+# CONFIG_DEBUG_SHIRQ is not set
+CONFIG_DETECT_SOFTLOCKUP=y
+# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
+CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
+CONFIG_SCHED_DEBUG=y
+# CONFIG_SCHEDSTATS is not set
+# CONFIG_TIMER_STATS is not set
+# CONFIG_DEBUG_OBJECTS is not set
+# CONFIG_DEBUG_SLAB is not set
+# CONFIG_DEBUG_RT_MUTEXES is not set
+# CONFIG_RT_MUTEX_TESTER is not set
+# CONFIG_DEBUG_SPINLOCK is not set
+CONFIG_DEBUG_MUTEXES=y
+# CONFIG_DEBUG_LOCK_ALLOC is not set
+# CONFIG_PROVE_LOCKING is not set
+# CONFIG_LOCK_STAT is not set
+# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+# CONFIG_DEBUG_KOBJECT is not set
+CONFIG_DEBUG_BUGVERBOSE=y
+# CONFIG_DEBUG_INFO is not set
+# CONFIG_DEBUG_VM is not set
+# CONFIG_DEBUG_WRITECOUNT is not set
+# CONFIG_DEBUG_MEMORY_INIT is not set
+# CONFIG_DEBUG_LIST is not set
+# CONFIG_DEBUG_SG is not set
+CONFIG_FRAME_POINTER=y
+# CONFIG_BOOT_PRINTK_DELAY is not set
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_BACKTRACE_SELF_TEST is not set
+# CONFIG_FAULT_INJECTION is not set
+# CONFIG_LATENCYTOP is not set
+CONFIG_SYSCTL_SYSCALL_CHECK=y
+CONFIG_HAVE_FTRACE=y
+CONFIG_HAVE_DYNAMIC_FTRACE=y
+# CONFIG_FTRACE is not set
+# CONFIG_IRQSOFF_TRACER is not set
+# CONFIG_SCHED_TRACER is not set
+# CONFIG_CONTEXT_SWITCH_TRACER is not set
+# CONFIG_SAMPLES is not set
+CONFIG_HAVE_ARCH_KGDB=y
+# CONFIG_KGDB is not set
+# CONFIG_DEBUG_USER is not set
+CONFIG_DEBUG_ERRORS=y
+# CONFIG_DEBUG_STACK_USAGE is not set
+# CONFIG_DEBUG_LL is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+# CONFIG_SECURITY_FILE_CAPABILITIES is not set
+CONFIG_CRYPTO=y
+
+#
+# Crypto core or helper
+#
+CONFIG_CRYPTO_ALGAPI=m
+CONFIG_CRYPTO_BLKCIPHER=m
+CONFIG_CRYPTO_MANAGER=m
+# CONFIG_CRYPTO_GF128MUL is not set
+# CONFIG_CRYPTO_NULL is not set
+# CONFIG_CRYPTO_CRYPTD is not set
+# CONFIG_CRYPTO_AUTHENC is not set
+# CONFIG_CRYPTO_TEST is not set
+
+#
+# Authenticated Encryption with Associated Data
+#
+# CONFIG_CRYPTO_CCM is not set
+# CONFIG_CRYPTO_GCM is not set
+# CONFIG_CRYPTO_SEQIV is not set
+
+#
+# Block modes
+#
+# CONFIG_CRYPTO_CBC is not set
+# CONFIG_CRYPTO_CTR is not set
+# CONFIG_CRYPTO_CTS is not set
+CONFIG_CRYPTO_ECB=m
+# CONFIG_CRYPTO_LRW is not set
+# CONFIG_CRYPTO_PCBC is not set
+# CONFIG_CRYPTO_XTS is not set
+
+#
+# Hash modes
+#
+# CONFIG_CRYPTO_HMAC is not set
+# CONFIG_CRYPTO_XCBC is not set
+
+#
+# Digest
+#
+# CONFIG_CRYPTO_CRC32C is not set
+# CONFIG_CRYPTO_MD4 is not set
+# CONFIG_CRYPTO_MD5 is not set
+# CONFIG_CRYPTO_MICHAEL_MIC is not set
+# CONFIG_CRYPTO_RMD128 is not set
+# CONFIG_CRYPTO_RMD160 is not set
+# CONFIG_CRYPTO_RMD256 is not set
+# CONFIG_CRYPTO_RMD320 is not set
+# CONFIG_CRYPTO_SHA1 is not set
+# CONFIG_CRYPTO_SHA256 is not set
+# CONFIG_CRYPTO_SHA512 is not set
+# CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_WP512 is not set
+
+#
+# Ciphers
+#
+# CONFIG_CRYPTO_AES is not set
+# CONFIG_CRYPTO_ANUBIS is not set
+CONFIG_CRYPTO_ARC4=m
+# CONFIG_CRYPTO_BLOWFISH is not set
+# CONFIG_CRYPTO_CAMELLIA is not set
+# CONFIG_CRYPTO_CAST5 is not set
+# CONFIG_CRYPTO_CAST6 is not set
+# CONFIG_CRYPTO_DES is not set
+# CONFIG_CRYPTO_FCRYPT is not set
+# CONFIG_CRYPTO_KHAZAD is not set
+# CONFIG_CRYPTO_SALSA20 is not set
+# CONFIG_CRYPTO_SEED is not set
+# CONFIG_CRYPTO_SERPENT is not set
+# CONFIG_CRYPTO_TEA is not set
+# CONFIG_CRYPTO_TWOFISH is not set
+
+#
+# Compression
+#
+# CONFIG_CRYPTO_DEFLATE is not set
+# CONFIG_CRYPTO_LZO is not set
+CONFIG_CRYPTO_HW=y
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+# CONFIG_GENERIC_FIND_FIRST_BIT is not set
+# CONFIG_GENERIC_FIND_NEXT_BIT is not set
+CONFIG_CRC_CCITT=m
+# CONFIG_CRC16 is not set
+CONFIG_CRC_T10DIF=m
+# CONFIG_CRC_ITU_T is not set
+CONFIG_CRC32=y
+# CONFIG_CRC7 is not set
+# CONFIG_LIBCRC32C is not set
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_DEFLATE=y
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
similarity index 91%
rename from arch/arm/configs/xm_x270_defconfig
rename to arch/arm/configs/xm_x2xx_defconfig
index aa40d91ce5994adf39b1656661cad922c5706bf7..f891364deceb431b33b976d5b88c38842148d255 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.25
-# Sun May 11 15:12:52 2008
+# Linux kernel version: 2.6.27-rc8
+# Sun Oct  5 11:05:36 2008
 #
 CONFIG_ARM=y
 CONFIG_SYS_SUPPORTS_APM_EMULATION=y
@@ -12,6 +12,7 @@ CONFIG_MMU=y
 # CONFIG_NO_IOPORT is not set
 CONFIG_GENERIC_HARDIRQS=y
 CONFIG_STACKTRACE_SUPPORT=y
+CONFIG_HAVE_LATENCYTOP_SUPPORT=y
 CONFIG_LOCKDEP_SUPPORT=y
 CONFIG_TRACE_IRQFLAGS_SUPPORT=y
 CONFIG_HARDIRQS_SW_RESEND=y
@@ -24,6 +25,7 @@ CONFIG_GENERIC_CALIBRATE_DELAY=y
 CONFIG_ARCH_SUPPORTS_AOUT=y
 CONFIG_ZONE_DMA=y
 CONFIG_ARCH_MTD_XIP=y
+CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
 CONFIG_VECTORS_BASE=0xffff0000
 CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
@@ -62,7 +64,6 @@ CONFIG_SYSCTL=y
 CONFIG_EMBEDDED=y
 CONFIG_UID16=y
 CONFIG_SYSCTL_SYSCALL=y
-CONFIG_SYSCTL_SYSCALL_CHECK=y
 CONFIG_KALLSYMS=y
 # CONFIG_KALLSYMS_ALL is not set
 # CONFIG_KALLSYMS_EXTRA_PASS is not set
@@ -88,14 +89,21 @@ CONFIG_SLUB=y
 # CONFIG_MARKERS is not set
 CONFIG_HAVE_OPROFILE=y
 # CONFIG_KPROBES is not set
+# CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS is not set
+# CONFIG_HAVE_IOREMAP_PROT is not set
 CONFIG_HAVE_KPROBES=y
 CONFIG_HAVE_KRETPROBES=y
+# CONFIG_HAVE_ARCH_TRACEHOOK is not set
 # CONFIG_HAVE_DMA_ATTRS is not set
+# CONFIG_USE_GENERIC_SMP_HELPERS is not set
+CONFIG_HAVE_CLK=y
 # CONFIG_PROC_PAGE_MONITOR is not set
+CONFIG_HAVE_GENERIC_DMA_COHERENT=y
 CONFIG_RT_MUTEXES=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
 CONFIG_MODULES=y
+# CONFIG_MODULE_FORCE_LOAD is not set
 CONFIG_MODULE_UNLOAD=y
 # CONFIG_MODULE_FORCE_UNLOAD is not set
 # CONFIG_MODVERSIONS is not set
@@ -106,6 +114,7 @@ CONFIG_BLOCK=y
 # CONFIG_BLK_DEV_IO_TRACE is not set
 # CONFIG_LSF is not set
 # CONFIG_BLK_DEV_BSG is not set
+# CONFIG_BLK_DEV_INTEGRITY is not set
 
 #
 # IO Schedulers
@@ -131,7 +140,6 @@ CONFIG_CLASSIC_RCU=y
 # CONFIG_ARCH_AT91 is not set
 # CONFIG_ARCH_CLPS7500 is not set
 # CONFIG_ARCH_CLPS711X is not set
-# CONFIG_ARCH_CO285 is not set
 # CONFIG_ARCH_EBSA110 is not set
 # CONFIG_ARCH_EP93XX is not set
 # CONFIG_ARCH_FOOTBRIDGE is not set
@@ -145,8 +153,11 @@ CONFIG_CLASSIC_RCU=y
 # CONFIG_ARCH_IXP2000 is not set
 # CONFIG_ARCH_IXP4XX is not set
 # CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_KIRKWOOD is not set
 # CONFIG_ARCH_KS8695 is not set
 # CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_LOKI is not set
+# CONFIG_ARCH_MV78XX0 is not set
 # CONFIG_ARCH_MXC is not set
 # CONFIG_ARCH_ORION5X is not set
 # CONFIG_ARCH_PNX4008 is not set
@@ -164,26 +175,32 @@ CONFIG_DMABOUNCE=y
 #
 # Intel PXA2xx/PXA3xx Implementations
 #
-
-#
-# Select target boards
-#
 # CONFIG_ARCH_GUMSTIX is not set
 # CONFIG_ARCH_LUBBOCK is not set
 # CONFIG_MACH_LOGICPD_PXA270 is not set
 # CONFIG_MACH_MAINSTONE is not set
+# CONFIG_MACH_MP900C is not set
 # CONFIG_ARCH_PXA_IDP is not set
 # CONFIG_PXA_SHARPSL is not set
+# CONFIG_ARCH_VIPER is not set
 # CONFIG_ARCH_PXA_ESERIES is not set
-# CONFIG_MACH_TRIZEPS4 is not set
+# CONFIG_TRIZEPS_PXA is not set
 CONFIG_MACH_EM_X270=y
 # CONFIG_MACH_COLIBRI is not set
 # CONFIG_MACH_ZYLONITE is not set
 # CONFIG_MACH_LITTLETON is not set
+# CONFIG_MACH_TAVOREVB is not set
+# CONFIG_MACH_SAAR is not set
 CONFIG_MACH_ARMCORE=y
+# CONFIG_MACH_CM_X300 is not set
 # CONFIG_MACH_MAGICIAN is not set
+# CONFIG_MACH_MIOA701 is not set
 # CONFIG_MACH_PCM027 is not set
+# CONFIG_ARCH_PXA_PALM is not set
+# CONFIG_PXA_EZX is not set
+CONFIG_PXA25x=y
 CONFIG_PXA27x=y
+CONFIG_PXA_SSP=y
 # CONFIG_PXA_PWM is not set
 
 #
@@ -253,11 +270,17 @@ CONFIG_TICK_ONESHOT=y
 CONFIG_NO_HZ=y
 # CONFIG_HIGH_RES_TIMERS is not set
 CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
+CONFIG_VMSPLIT_3G=y
+# CONFIG_VMSPLIT_2G is not set
+# CONFIG_VMSPLIT_1G is not set
+CONFIG_PAGE_OFFSET=0xC0000000
 # CONFIG_PREEMPT is not set
 CONFIG_HZ=100
 CONFIG_AEABI=y
 CONFIG_OABI_COMPAT=y
-# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
+CONFIG_ARCH_FLATMEM_HAS_HOLES=y
+# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set
+# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set
 CONFIG_SELECT_MEMORY_MODEL=y
 CONFIG_FLATMEM_MANUAL=y
 # CONFIG_DISCONTIGMEM_MANUAL is not set
@@ -284,9 +307,10 @@ CONFIG_CMDLINE="root=1f03 mem=32M"
 # CONFIG_KEXEC is not set
 
 #
-# CPU Frequency scaling
+# CPU Power Management
 #
 # CONFIG_CPU_FREQ is not set
+# CONFIG_CPU_IDLE is not set
 
 #
 # Floating point emulation
@@ -316,10 +340,6 @@ CONFIG_SUSPEND=y
 CONFIG_SUSPEND_FREEZER=y
 CONFIG_APM_EMULATION=m
 CONFIG_ARCH_SUSPEND_POSSIBLE=y
-
-#
-# Networking
-#
 CONFIG_NET=y
 
 #
@@ -402,6 +422,7 @@ CONFIG_BT_HIDP=m
 #
 CONFIG_BT_HCIUSB=m
 CONFIG_BT_HCIUSB_SCO=y
+# CONFIG_BT_HCIBTUSB is not set
 # CONFIG_BT_HCIBTSDIO is not set
 # CONFIG_BT_HCIUART is not set
 # CONFIG_BT_HCIBCM203X is not set
@@ -419,6 +440,7 @@ CONFIG_BT_HCIUSB_SCO=y
 #
 # CONFIG_CFG80211 is not set
 CONFIG_WIRELESS_EXT=y
+CONFIG_WIRELESS_EXT_SYSFS=y
 # CONFIG_MAC80211 is not set
 # CONFIG_IEEE80211 is not set
 # CONFIG_RFKILL is not set
@@ -435,6 +457,8 @@ CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
 CONFIG_STANDALONE=y
 CONFIG_PREVENT_FIRMWARE_BUILD=y
 CONFIG_FW_LOADER=m
+CONFIG_FIRMWARE_IN_KERNEL=y
+CONFIG_EXTRA_FIRMWARE=""
 # CONFIG_DEBUG_DRIVER is not set
 # CONFIG_DEBUG_DEVRES is not set
 # CONFIG_SYS_HYPERVISOR is not set
@@ -527,6 +551,7 @@ CONFIG_MTD_NAND=y
 # CONFIG_MTD_NAND_ECC_SMC is not set
 # CONFIG_MTD_NAND_MUSEUM_IDS is not set
 # CONFIG_MTD_NAND_H1900 is not set
+CONFIG_MTD_NAND_GPIO=m
 CONFIG_MTD_NAND_IDS=y
 # CONFIG_MTD_NAND_DISKONCHIP is not set
 # CONFIG_MTD_NAND_SHARPSL is not set
@@ -636,6 +661,7 @@ CONFIG_SCSI_LOWLEVEL=y
 # CONFIG_SCSI_DEBUG is not set
 # CONFIG_SCSI_SRP is not set
 # CONFIG_SCSI_LOWLEVEL_PCMCIA is not set
+# CONFIG_SCSI_DH is not set
 CONFIG_ATA=m
 # CONFIG_ATA_NONSTANDARD is not set
 # CONFIG_SATA_PMP is not set
@@ -696,17 +722,21 @@ CONFIG_PATA_PCMCIA=m
 # CONFIG_PATA_VIA is not set
 # CONFIG_PATA_WINBOND is not set
 # CONFIG_PATA_PLATFORM is not set
+# CONFIG_PATA_SCH is not set
 # CONFIG_MD is not set
 # CONFIG_FUSION is not set
 
 #
 # IEEE 1394 (FireWire) support
 #
+
+#
+# Enable only one of the two stacks, unless you know what you are doing
+#
 # CONFIG_FIREWIRE is not set
 # CONFIG_IEEE1394 is not set
 # CONFIG_I2O is not set
 CONFIG_NETDEVICES=y
-# CONFIG_NETDEVICES_MULTIQUEUE is not set
 # CONFIG_DUMMY is not set
 # CONFIG_BONDING is not set
 # CONFIG_MACVLAN is not set
@@ -725,6 +755,7 @@ CONFIG_MII=y
 # CONFIG_SMC91X is not set
 CONFIG_DM9000=y
 CONFIG_DM9000_DEBUGLEVEL=1
+# CONFIG_DM9000_FORCE_SIMPLE_PHY_POLL is not set
 # CONFIG_SMC911X is not set
 # CONFIG_NET_TULIP is not set
 # CONFIG_HP100 is not set
@@ -780,7 +811,6 @@ CONFIG_LIBERTAS_SDIO=m
 # CONFIG_PRISM54 is not set
 # CONFIG_USB_ZD1201 is not set
 # CONFIG_USB_NET_RNDIS_WLAN is not set
-# CONFIG_IWLWIFI is not set
 # CONFIG_IWLWIFI_LEDS is not set
 # CONFIG_HOSTAP is not set
 
@@ -853,17 +883,18 @@ CONFIG_INPUT_TOUCHSCREEN=y
 # CONFIG_TOUCHSCREEN_GUNZE is not set
 # CONFIG_TOUCHSCREEN_ELO is not set
 # CONFIG_TOUCHSCREEN_MTOUCH is not set
+# CONFIG_TOUCHSCREEN_INEXIO is not set
 # CONFIG_TOUCHSCREEN_MK712 is not set
 # CONFIG_TOUCHSCREEN_PENMOUNT is not set
 # CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
 # CONFIG_TOUCHSCREEN_TOUCHWIN is not set
-CONFIG_TOUCHSCREEN_UCB1400=m
 CONFIG_TOUCHSCREEN_WM97XX=m
 # CONFIG_TOUCHSCREEN_WM9705 is not set
 CONFIG_TOUCHSCREEN_WM9712=y
 # CONFIG_TOUCHSCREEN_WM9713 is not set
 # CONFIG_TOUCHSCREEN_WM97XX_MAINSTONE is not set
 # CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set
+# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set
 # CONFIG_INPUT_MISC is not set
 
 #
@@ -880,6 +911,7 @@ CONFIG_SERIO_LIBPS2=y
 # Character devices
 #
 CONFIG_VT=y
+CONFIG_CONSOLE_TRANSLATIONS=y
 CONFIG_VT_CONSOLE=y
 CONFIG_HW_CONSOLE=y
 # CONFIG_VT_HW_CONSOLE_BINDING is not set
@@ -922,45 +954,66 @@ CONFIG_DEVPORT=y
 CONFIG_I2C=y
 CONFIG_I2C_BOARDINFO=y
 CONFIG_I2C_CHARDEV=m
+CONFIG_I2C_HELPER_AUTO=y
 
 #
 # I2C Hardware Bus support
 #
+
+#
+# PC SMBus host controller drivers
+#
 # CONFIG_I2C_ALI1535 is not set
 # CONFIG_I2C_ALI1563 is not set
 # CONFIG_I2C_ALI15X3 is not set
 # CONFIG_I2C_AMD756 is not set
 # CONFIG_I2C_AMD8111 is not set
-# CONFIG_I2C_GPIO is not set
 # CONFIG_I2C_I801 is not set
-# CONFIG_I2C_I810 is not set
-CONFIG_I2C_PXA=y
-# CONFIG_I2C_PXA_SLAVE is not set
+# CONFIG_I2C_ISCH is not set
 # CONFIG_I2C_PIIX4 is not set
 # CONFIG_I2C_NFORCE2 is not set
-# CONFIG_I2C_OCORES is not set
-# CONFIG_I2C_PARPORT_LIGHT is not set
-# CONFIG_I2C_PROSAVAGE is not set
-# CONFIG_I2C_SAVAGE4 is not set
-# CONFIG_I2C_SIMTEC is not set
 # CONFIG_I2C_SIS5595 is not set
 # CONFIG_I2C_SIS630 is not set
 # CONFIG_I2C_SIS96X is not set
-# CONFIG_I2C_TAOS_EVM is not set
-# CONFIG_I2C_STUB is not set
-# CONFIG_I2C_TINY_USB is not set
 # CONFIG_I2C_VIA is not set
 # CONFIG_I2C_VIAPRO is not set
+
+#
+# I2C system bus drivers (mostly embedded / system-on-chip)
+#
+# CONFIG_I2C_GPIO is not set
+# CONFIG_I2C_OCORES is not set
+CONFIG_I2C_PXA=y
+# CONFIG_I2C_PXA_SLAVE is not set
+# CONFIG_I2C_SIMTEC is not set
+
+#
+# External I2C/SMBus adapter drivers
+#
+# CONFIG_I2C_PARPORT_LIGHT is not set
+# CONFIG_I2C_TAOS_EVM is not set
+# CONFIG_I2C_TINY_USB is not set
+
+#
+# Graphics adapter I2C/DDC channel drivers
+#
 # CONFIG_I2C_VOODOO3 is not set
+
+#
+# Other I2C/SMBus bus drivers
+#
 # CONFIG_I2C_PCA_PLATFORM is not set
+# CONFIG_I2C_STUB is not set
 
 #
 # Miscellaneous I2C Chip support
 #
 # CONFIG_DS1682 is not set
+# CONFIG_AT24 is not set
 # CONFIG_SENSORS_EEPROM is not set
 # CONFIG_SENSORS_PCF8574 is not set
 # CONFIG_PCF8575 is not set
+# CONFIG_SENSORS_PCA9539 is not set
 # CONFIG_SENSORS_PCF8591 is not set
 # CONFIG_TPS65010 is not set
 # CONFIG_SENSORS_MAX6875 is not set
@@ -970,25 +1023,31 @@ CONFIG_I2C_PXA=y
 # CONFIG_I2C_DEBUG_BUS is not set
 # CONFIG_I2C_DEBUG_CHIP is not set
 # CONFIG_SPI is not set
-CONFIG_HAVE_GPIO_LIB=y
-
-#
-# GPIO Support
-#
+CONFIG_ARCH_REQUIRE_GPIOLIB=y
+CONFIG_GPIOLIB=y
 # CONFIG_DEBUG_GPIO is not set
+# CONFIG_GPIO_SYSFS is not set
 
 #
 # I2C GPIO expanders:
 #
+# CONFIG_GPIO_MAX732X is not set
 # CONFIG_GPIO_PCA953X is not set
 # CONFIG_GPIO_PCF857X is not set
 
+#
+# PCI GPIO expanders:
+#
+# CONFIG_GPIO_BT8XX is not set
+
 #
 # SPI GPIO expanders:
 #
 # CONFIG_W1 is not set
 # CONFIG_POWER_SUPPLY is not set
 # CONFIG_HWMON is not set
+# CONFIG_THERMAL is not set
+# CONFIG_THERMAL_HWMON is not set
 # CONFIG_WATCHDOG is not set
 
 #
@@ -1000,10 +1059,16 @@ CONFIG_SSB_POSSIBLE=y
 #
 # Multifunction device drivers
 #
+# CONFIG_MFD_CORE is not set
 # CONFIG_MFD_SM501 is not set
 # CONFIG_MFD_ASIC3 is not set
 # CONFIG_HTC_EGPIO is not set
 # CONFIG_HTC_PASIC3 is not set
+# CONFIG_UCB1400_CORE is not set
+# CONFIG_MFD_TMIO is not set
+# CONFIG_MFD_T7L66XB is not set
+# CONFIG_MFD_TC6387XB is not set
+# CONFIG_MFD_TC6393XB is not set
 
 #
 # Multimedia devices
@@ -1014,6 +1079,7 @@ CONFIG_SSB_POSSIBLE=y
 #
 # CONFIG_VIDEO_DEV is not set
 # CONFIG_DVB_CORE is not set
+# CONFIG_VIDEO_MEDIA is not set
 
 #
 # Multimedia drivers
@@ -1038,7 +1104,6 @@ CONFIG_FB_CFB_IMAGEBLIT=y
 # CONFIG_FB_SYS_IMAGEBLIT is not set
 # CONFIG_FB_FOREIGN_ENDIAN is not set
 # CONFIG_FB_SYS_FOPS is not set
-CONFIG_FB_DEFERRED_IO=y
 # CONFIG_FB_SVGALIB is not set
 # CONFIG_FB_MACMODES is not set
 # CONFIG_FB_BACKLIGHT is not set
@@ -1071,12 +1136,14 @@ CONFIG_FB_DEFERRED_IO=y
 # CONFIG_FB_TRIDENT is not set
 # CONFIG_FB_ARK is not set
 # CONFIG_FB_PM3 is not set
+# CONFIG_FB_CARMINE is not set
 CONFIG_FB_PXA=y
 # CONFIG_FB_PXA_SMARTPANEL is not set
 CONFIG_FB_PXA_PARAMETERS=y
 CONFIG_FB_MBX=m
-# CONFIG_FB_AM200EPD is not set
+# CONFIG_FB_W100 is not set
 # CONFIG_FB_VIRTUAL is not set
+# CONFIG_FB_METRONOME is not set
 # CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
@@ -1099,15 +1166,7 @@ CONFIG_LOGO=y
 CONFIG_LOGO_LINUX_MONO=y
 CONFIG_LOGO_LINUX_VGA16=y
 CONFIG_LOGO_LINUX_CLUT224=y
-
-#
-# Sound
-#
 CONFIG_SOUND=m
-
-#
-# Advanced Linux Sound Architecture
-#
 CONFIG_SND=m
 CONFIG_SND_TIMER=m
 CONFIG_SND_PCM=m
@@ -1121,19 +1180,15 @@ CONFIG_SND_SUPPORT_OLD_API=y
 CONFIG_SND_VERBOSE_PROCFS=y
 # CONFIG_SND_VERBOSE_PRINTK is not set
 # CONFIG_SND_DEBUG is not set
-
-#
-# Generic devices
-#
+CONFIG_SND_VMASTER=y
 CONFIG_SND_AC97_CODEC=m
+CONFIG_SND_DRIVERS=y
 # CONFIG_SND_DUMMY is not set
 # CONFIG_SND_MTPAV is not set
 # CONFIG_SND_SERIAL_U16550 is not set
 # CONFIG_SND_MPU401 is not set
-
-#
-# PCI devices
-#
+# CONFIG_SND_AC97_POWER_SAVE is not set
+CONFIG_SND_PCI=y
 # CONFIG_SND_AD1889 is not set
 # CONFIG_SND_ALS300 is not set
 # CONFIG_SND_ALI5451 is not set
@@ -1193,42 +1248,16 @@ CONFIG_SND_AC97_CODEC=m
 # CONFIG_SND_VIRTUOSO is not set
 # CONFIG_SND_VX222 is not set
 # CONFIG_SND_YMFPCI is not set
-# CONFIG_SND_AC97_POWER_SAVE is not set
-
-#
-# ALSA ARM devices
-#
+CONFIG_SND_ARM=y
 CONFIG_SND_PXA2XX_PCM=m
 CONFIG_SND_PXA2XX_AC97=m
-
-#
-# USB devices
-#
+CONFIG_SND_USB=y
 # CONFIG_SND_USB_AUDIO is not set
 # CONFIG_SND_USB_CAIAQ is not set
-
-#
-# PCMCIA devices
-#
+CONFIG_SND_PCMCIA=y
 # CONFIG_SND_VXPOCKET is not set
 # CONFIG_SND_PDAUDIOCF is not set
-
-#
-# System on Chip audio support
-#
 # CONFIG_SND_SOC is not set
-
-#
-# ALSA SoC audio for Freescale SOCs
-#
-
-#
-# SoC Audio for the Texas Instruments OMAP
-#
-
-#
-# Open Sound System
-#
 # CONFIG_SOUND_PRIME is not set
 CONFIG_AC97_BUS=m
 CONFIG_HID_SUPPORT=y
@@ -1261,12 +1290,15 @@ CONFIG_USB_DEVICEFS=y
 # CONFIG_USB_OTG is not set
 # CONFIG_USB_OTG_WHITELIST is not set
 # CONFIG_USB_OTG_BLACKLIST_HUB is not set
+CONFIG_USB_MON=y
 
 #
 # USB Host Controller Drivers
 #
+# CONFIG_USB_C67X00_HCD is not set
 # CONFIG_USB_EHCI_HCD is not set
 # CONFIG_USB_ISP116X_HCD is not set
+# CONFIG_USB_ISP1760_HCD is not set
 CONFIG_USB_OHCI_HCD=y
 # CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
 # CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
@@ -1274,12 +1306,14 @@ CONFIG_USB_OHCI_LITTLE_ENDIAN=y
 # CONFIG_USB_UHCI_HCD is not set
 # CONFIG_USB_SL811_HCD is not set
 # CONFIG_USB_R8A66597_HCD is not set
+# CONFIG_USB_MUSB_HDRC is not set
 
 #
 # USB Device Class drivers
 #
 # CONFIG_USB_ACM is not set
 # CONFIG_USB_PRINTER is not set
+# CONFIG_USB_WDM is not set
 
 #
 # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
@@ -1309,7 +1343,6 @@ CONFIG_USB_STORAGE=y
 #
 # CONFIG_USB_MDC800 is not set
 # CONFIG_USB_MICROTEK is not set
-CONFIG_USB_MON=y
 
 #
 # USB port drivers
@@ -1322,7 +1355,6 @@ CONFIG_USB_MON=y
 # CONFIG_USB_EMI62 is not set
 # CONFIG_USB_EMI26 is not set
 # CONFIG_USB_ADUTUX is not set
-# CONFIG_USB_AUERSWALD is not set
 # CONFIG_USB_RIO500 is not set
 # CONFIG_USB_LEGOTOWER is not set
 # CONFIG_USB_LCD is not set
@@ -1338,6 +1370,7 @@ CONFIG_USB_MON=y
 # CONFIG_USB_TRANCEVIBRATOR is not set
 # CONFIG_USB_IOWARRIOR is not set
 # CONFIG_USB_TEST is not set
+# CONFIG_USB_ISIGHTFW is not set
 # CONFIG_USB_GADGET is not set
 CONFIG_MMC=m
 # CONFIG_MMC_DEBUG is not set
@@ -1349,6 +1382,7 @@ CONFIG_MMC=m
 CONFIG_MMC_BLOCK=m
 CONFIG_MMC_BLOCK_BOUNCE=y
 # CONFIG_SDIO_UART is not set
+# CONFIG_MMC_TEST is not set
 
 #
 # MMC/SD Host Controller Drivers
@@ -1356,14 +1390,19 @@ CONFIG_MMC_BLOCK_BOUNCE=y
 CONFIG_MMC_PXA=m
 # CONFIG_MMC_SDHCI is not set
 # CONFIG_MMC_TIFM_SD is not set
+# CONFIG_MMC_SDRICOH_CS is not set
+# CONFIG_MEMSTICK is not set
+# CONFIG_ACCESSIBILITY is not set
 CONFIG_NEW_LEDS=y
 CONFIG_LEDS_CLASS=y
 
 #
 # LED drivers
 #
+# CONFIG_LEDS_PCA9532 is not set
 # CONFIG_LEDS_GPIO is not set
 CONFIG_LEDS_CM_X270=y
+# CONFIG_LEDS_PCA955X is not set
 
 #
 # LED Triggers
@@ -1401,6 +1440,7 @@ CONFIG_RTC_INTF_DEV=y
 # CONFIG_RTC_DRV_PCF8583 is not set
 # CONFIG_RTC_DRV_M41T80 is not set
 # CONFIG_RTC_DRV_S35390A is not set
+# CONFIG_RTC_DRV_FM3130 is not set
 
 #
 # SPI RTC drivers
@@ -1422,6 +1462,15 @@ CONFIG_RTC_DRV_V3020=y
 # on-CPU RTC drivers
 #
 CONFIG_RTC_DRV_SA1100=y
+# CONFIG_DMADEVICES is not set
+
+#
+# Voltage and Current regulators
+#
+# CONFIG_REGULATOR is not set
+# CONFIG_REGULATOR_FIXED_VOLTAGE is not set
+# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set
+# CONFIG_REGULATOR_BQ24022 is not set
 # CONFIG_UIO is not set
 
 #
@@ -1501,6 +1550,7 @@ CONFIG_JFFS2_RTIME=y
 # CONFIG_CRAMFS is not set
 # CONFIG_VXFS_FS is not set
 # CONFIG_MINIX_FS is not set
+# CONFIG_OMFS_FS is not set
 # CONFIG_HPFS_FS is not set
 # CONFIG_QNX4FS_FS is not set
 # CONFIG_ROMFS_FS is not set
@@ -1511,13 +1561,12 @@ CONFIG_NFS_FS=y
 CONFIG_NFS_V3=y
 # CONFIG_NFS_V3_ACL is not set
 # CONFIG_NFS_V4 is not set
-# CONFIG_NFSD is not set
 CONFIG_ROOT_NFS=y
+# CONFIG_NFSD is not set
 CONFIG_LOCKD=y
 CONFIG_LOCKD_V4=y
 CONFIG_NFS_COMMON=y
 CONFIG_SUNRPC=y
-# CONFIG_SUNRPC_BIND34 is not set
 # CONFIG_RPCSEC_GSS_KRB5 is not set
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
 # CONFIG_SMB_FS is not set
@@ -1626,6 +1675,7 @@ CONFIG_DEBUG_KERNEL=y
 # CONFIG_DEBUG_INFO is not set
 # CONFIG_DEBUG_VM is not set
 # CONFIG_DEBUG_WRITECOUNT is not set
+# CONFIG_DEBUG_MEMORY_INIT is not set
 # CONFIG_DEBUG_LIST is not set
 # CONFIG_DEBUG_SG is not set
 CONFIG_FRAME_POINTER=y
@@ -1633,7 +1683,17 @@ CONFIG_FRAME_POINTER=y
 # CONFIG_RCU_TORTURE_TEST is not set
 # CONFIG_BACKTRACE_SELF_TEST is not set
 # CONFIG_FAULT_INJECTION is not set
+# CONFIG_LATENCYTOP is not set
+CONFIG_SYSCTL_SYSCALL_CHECK=y
+CONFIG_HAVE_FTRACE=y
+CONFIG_HAVE_DYNAMIC_FTRACE=y
+# CONFIG_FTRACE is not set
+# CONFIG_IRQSOFF_TRACER is not set
+# CONFIG_SCHED_TRACER is not set
+# CONFIG_CONTEXT_SWITCH_TRACER is not set
 # CONFIG_SAMPLES is not set
+CONFIG_HAVE_ARCH_KGDB=y
+# CONFIG_KGDB is not set
 CONFIG_DEBUG_USER=y
 CONFIG_DEBUG_ERRORS=y
 # CONFIG_DEBUG_STACK_USAGE is not set
@@ -1689,6 +1749,10 @@ CONFIG_CRYPTO=y
 # CONFIG_CRYPTO_MD4 is not set
 # CONFIG_CRYPTO_MD5 is not set
 # CONFIG_CRYPTO_MICHAEL_MIC is not set
+# CONFIG_CRYPTO_RMD128 is not set
+# CONFIG_CRYPTO_RMD160 is not set
+# CONFIG_CRYPTO_RMD256 is not set
+# CONFIG_CRYPTO_RMD320 is not set
 # CONFIG_CRYPTO_SHA1 is not set
 # CONFIG_CRYPTO_SHA256 is not set
 # CONFIG_CRYPTO_SHA512 is not set
@@ -1729,6 +1793,7 @@ CONFIG_BITREVERSE=y
 # CONFIG_GENERIC_FIND_NEXT_BIT is not set
 CONFIG_CRC_CCITT=m
 # CONFIG_CRC16 is not set
+# CONFIG_CRC_T10DIF is not set
 # CONFIG_CRC_ITU_T is not set
 CONFIG_CRC32=y
 # CONFIG_CRC7 is not set
index 7b62351f097d2f49ff6fcfb7ea0e0c43e11d012f..4d88425a41693e3778a62250bf09eac6446b1d3d 100644 (file)
@@ -12,7 +12,7 @@ extern void __bug(const char *file, int line) __attribute__((noreturn));
 #else
 
 /* this just causes an oops */
-#define BUG()          (*(int *)0 = 0)
+#define BUG()          do { *(int *)0 = 0; } while (1)
 
 #endif
 
index 9073d9c6567e7c8b8065534563bee01ce83c9e37..de6c59f814a1f4511457d548dc268702a3a1b94c 100644 (file)
@@ -444,94 +444,4 @@ static inline void flush_ioremap_region(unsigned long phys, void __iomem *virt,
        dmac_inv_range(start, start + size);
 }
 
-#define __cacheid_present(val)                 (val != read_cpuid(CPUID_ID))
-#define __cacheid_type_v7(val)                 ((val & (7 << 29)) == (4 << 29))
-
-#define __cacheid_vivt_prev7(val)              ((val & (15 << 25)) != (14 << 25))
-#define __cacheid_vipt_prev7(val)              ((val & (15 << 25)) == (14 << 25))
-#define __cacheid_vipt_nonaliasing_prev7(val)  ((val & (15 << 25 | 1 << 23)) == (14 << 25))
-#define __cacheid_vipt_aliasing_prev7(val)     ((val & (15 << 25 | 1 << 23)) == (14 << 25 | 1 << 23))
-
-#define __cacheid_vivt(val)                    (__cacheid_type_v7(val) ? 0 : __cacheid_vivt_prev7(val))
-#define __cacheid_vipt(val)                    (__cacheid_type_v7(val) ? 1 : __cacheid_vipt_prev7(val))
-#define __cacheid_vipt_nonaliasing(val)                (__cacheid_type_v7(val) ? 1 : __cacheid_vipt_nonaliasing_prev7(val))
-#define __cacheid_vipt_aliasing(val)           (__cacheid_type_v7(val) ? 0 : __cacheid_vipt_aliasing_prev7(val))
-#define __cacheid_vivt_asid_tagged_instr(val)  (__cacheid_type_v7(val) ? ((val & (3 << 14)) == (1 << 14)) : 0)
-
-#if defined(CONFIG_CPU_CACHE_VIVT) && !defined(CONFIG_CPU_CACHE_VIPT)
-/*
- * VIVT caches only
- */
-#define cache_is_vivt()                        1
-#define cache_is_vipt()                        0
-#define cache_is_vipt_nonaliasing()    0
-#define cache_is_vipt_aliasing()       0
-#define icache_is_vivt_asid_tagged()   0
-
-#elif !defined(CONFIG_CPU_CACHE_VIVT) && defined(CONFIG_CPU_CACHE_VIPT)
-/*
- * VIPT caches only
- */
-#define cache_is_vivt()                        0
-#define cache_is_vipt()                        1
-#define cache_is_vipt_nonaliasing()                                    \
-       ({                                                              \
-               unsigned int __val = read_cpuid(CPUID_CACHETYPE);       \
-               __cacheid_vipt_nonaliasing(__val);                      \
-       })
-
-#define cache_is_vipt_aliasing()                                       \
-       ({                                                              \
-               unsigned int __val = read_cpuid(CPUID_CACHETYPE);       \
-               __cacheid_vipt_aliasing(__val);                         \
-       })
-
-#define icache_is_vivt_asid_tagged()                                   \
-       ({                                                              \
-               unsigned int __val = read_cpuid(CPUID_CACHETYPE);       \
-               __cacheid_vivt_asid_tagged_instr(__val);                \
-       })
-
-#else
-/*
- * VIVT or VIPT caches.  Note that this is unreliable since ARM926
- * and V6 CPUs satisfy the "(val & (15 << 25)) == (14 << 25)" test.
- * There's no way to tell from the CacheType register what type (!)
- * the cache is.
- */
-#define cache_is_vivt()                                                        \
-       ({                                                              \
-               unsigned int __val = read_cpuid(CPUID_CACHETYPE);       \
-               (!__cacheid_present(__val)) || __cacheid_vivt(__val);   \
-       })
-               
-#define cache_is_vipt()                                                        \
-       ({                                                              \
-               unsigned int __val = read_cpuid(CPUID_CACHETYPE);       \
-               __cacheid_present(__val) && __cacheid_vipt(__val);      \
-       })
-
-#define cache_is_vipt_nonaliasing()                                    \
-       ({                                                              \
-               unsigned int __val = read_cpuid(CPUID_CACHETYPE);       \
-               __cacheid_present(__val) &&                             \
-                __cacheid_vipt_nonaliasing(__val);                     \
-       })
-
-#define cache_is_vipt_aliasing()                                       \
-       ({                                                              \
-               unsigned int __val = read_cpuid(CPUID_CACHETYPE);       \
-               __cacheid_present(__val) &&                             \
-                __cacheid_vipt_aliasing(__val);                        \
-       })
-
-#define icache_is_vivt_asid_tagged()                                   \
-       ({                                                              \
-               unsigned int __val = read_cpuid(CPUID_CACHETYPE);       \
-               __cacheid_present(__val) &&                             \
-                __cacheid_vivt_asid_tagged_instr(__val);               \
-       })
-
-#endif
-
 #endif
diff --git a/arch/arm/include/asm/cachetype.h b/arch/arm/include/asm/cachetype.h
new file mode 100644 (file)
index 0000000..d3a4c2c
--- /dev/null
@@ -0,0 +1,52 @@
+#ifndef __ASM_ARM_CACHETYPE_H
+#define __ASM_ARM_CACHETYPE_H
+
+#define CACHEID_VIVT                   (1 << 0)
+#define CACHEID_VIPT_NONALIASING       (1 << 1)
+#define CACHEID_VIPT_ALIASING          (1 << 2)
+#define CACHEID_VIPT                   (CACHEID_VIPT_ALIASING|CACHEID_VIPT_NONALIASING)
+#define CACHEID_ASID_TAGGED            (1 << 3)
+
+extern unsigned int cacheid;
+
+#define cache_is_vivt()                        cacheid_is(CACHEID_VIVT)
+#define cache_is_vipt()                        cacheid_is(CACHEID_VIPT)
+#define cache_is_vipt_nonaliasing()    cacheid_is(CACHEID_VIPT_NONALIASING)
+#define cache_is_vipt_aliasing()       cacheid_is(CACHEID_VIPT_ALIASING)
+#define icache_is_vivt_asid_tagged()   cacheid_is(CACHEID_ASID_TAGGED)
+
+/*
+ * __LINUX_ARM_ARCH__ is the minimum supported CPU architecture
+ * Mask out support which will never be present on newer CPUs.
+ * - v6+ is never VIVT
+ * - v7+ VIPT never aliases
+ */
+#if __LINUX_ARM_ARCH__ >= 7
+#define __CACHEID_ARCH_MIN     (CACHEID_VIPT_NONALIASING | CACHEID_ASID_TAGGED)
+#elif __LINUX_ARM_ARCH__ >= 6
+#define        __CACHEID_ARCH_MIN      (~CACHEID_VIVT)
+#else
+#define __CACHEID_ARCH_MIN     (~0)
+#endif
+
+/*
+ * Mask out support which isn't configured
+ */
+#if defined(CONFIG_CPU_CACHE_VIVT) && !defined(CONFIG_CPU_CACHE_VIPT)
+#define __CACHEID_ALWAYS       (CACHEID_VIVT)
+#define __CACHEID_NEVER                (~CACHEID_VIVT)
+#elif !defined(CONFIG_CPU_CACHE_VIVT) && defined(CONFIG_CPU_CACHE_VIPT)
+#define __CACHEID_ALWAYS       (0)
+#define __CACHEID_NEVER                (CACHEID_VIVT)
+#else
+#define __CACHEID_ALWAYS       (0)
+#define __CACHEID_NEVER                (0)
+#endif
+
+static inline unsigned int __attribute__((pure)) cacheid_is(unsigned int mask)
+{
+       return (__CACHEID_ALWAYS & mask) |
+              (~__CACHEID_NEVER & __CACHEID_ARCH_MIN & mask & cacheid);
+}
+
+#endif
diff --git a/arch/arm/include/asm/cputype.h b/arch/arm/include/asm/cputype.h
new file mode 100644 (file)
index 0000000..7b9d27e
--- /dev/null
@@ -0,0 +1,64 @@
+#ifndef __ASM_ARM_CPUTYPE_H
+#define __ASM_ARM_CPUTYPE_H
+
+#include <linux/stringify.h>
+
+#define CPUID_ID       0
+#define CPUID_CACHETYPE        1
+#define CPUID_TCM      2
+#define CPUID_TLBTYPE  3
+
+#ifdef CONFIG_CPU_CP15
+#define read_cpuid(reg)                                                        \
+       ({                                                              \
+               unsigned int __val;                                     \
+               asm("mrc        p15, 0, %0, c0, c0, " __stringify(reg)  \
+                   : "=r" (__val)                                      \
+                   :                                                   \
+                   : "cc");                                            \
+               __val;                                                  \
+       })
+#else
+extern unsigned int processor_id;
+#define read_cpuid(reg) (processor_id)
+#endif
+
+/*
+ * The CPU ID never changes at run time, so we might as well tell the
+ * compiler that it's constant.  Use this function to read the CPU ID
+ * rather than directly reading processor_id or read_cpuid() directly.
+ */
+static inline unsigned int __attribute_const__ read_cpuid_id(void)
+{
+       return read_cpuid(CPUID_ID);
+}
+
+static inline unsigned int __attribute_const__ read_cpuid_cachetype(void)
+{
+       return read_cpuid(CPUID_CACHETYPE);
+}
+
+/*
+ * Intel's XScale3 core supports some v6 features (supersections, L2)
+ * but advertises itself as v5 as it does not support the v6 ISA.  For
+ * this reason, we need a way to explicitly test for this type of CPU.
+ */
+#ifndef CONFIG_CPU_XSC3
+#define cpu_is_xsc3()  0
+#else
+static inline int cpu_is_xsc3(void)
+{
+       if ((read_cpuid_id() & 0xffffe000) == 0x69056000)
+               return 1;
+
+       return 0;
+}
+#endif
+
+#if !defined(CONFIG_CPU_XSCALE) && !defined(CONFIG_CPU_XSC3)
+#define        cpu_is_xscale() 0
+#else
+#define        cpu_is_xscale() 1
+#endif
+
+#endif
index 7b95d205839588a4afa6ba9e1783fede3cb27b7a..1cb8602dd9d5f5b0a29c56b3c8ac80c35f874e85 100644 (file)
@@ -104,15 +104,14 @@ static inline int dma_mapping_error(struct device *dev, dma_addr_t dma_addr)
  * Dummy noncoherent implementation.  We don't provide a dma_cache_sync
  * function so drivers using this API are highlighted with build warnings.
  */
-static inline void *
-dma_alloc_noncoherent(struct device *dev, size_t size, dma_addr_t *handle, gfp_t gfp)
+static inline void *dma_alloc_noncoherent(struct device *dev, size_t size,
+               dma_addr_t *handle, gfp_t gfp)
 {
        return NULL;
 }
 
-static inline void
-dma_free_noncoherent(struct device *dev, size_t size, void *cpu_addr,
-                    dma_addr_t handle)
+static inline void dma_free_noncoherent(struct device *dev, size_t size,
+               void *cpu_addr, dma_addr_t handle)
 {
 }
 
@@ -127,8 +126,7 @@ dma_free_noncoherent(struct device *dev, size_t size, void *cpu_addr,
  * return the CPU-viewed address, and sets @handle to be the
  * device-viewed address.
  */
-extern void *
-dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *handle, gfp_t gfp);
+extern void *dma_alloc_coherent(struct device *, size_t, dma_addr_t *, gfp_t);
 
 /**
  * dma_free_coherent - free memory allocated by dma_alloc_coherent
@@ -143,9 +141,7 @@ dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *handle, gfp_t gf
  * References to memory and mappings associated with cpu_addr/handle
  * during and after this call executing are illegal.
  */
-extern void
-dma_free_coherent(struct device *dev, size_t size, void *cpu_addr,
-                 dma_addr_t handle);
+extern void dma_free_coherent(struct device *, size_t, void *, dma_addr_t);
 
 /**
  * dma_mmap_coherent - map a coherent DMA allocation into user space
@@ -159,8 +155,8 @@ dma_free_coherent(struct device *dev, size_t size, void *cpu_addr,
  * into user space.  The coherent DMA buffer must not be freed by the
  * driver until the user space mapping has been released.
  */
-int dma_mmap_coherent(struct device *dev, struct vm_area_struct *vma,
-                     void *cpu_addr, dma_addr_t handle, size_t size);
+int dma_mmap_coherent(struct device *, struct vm_area_struct *,
+               void *, dma_addr_t, size_t);
 
 
 /**
@@ -174,14 +170,94 @@ int dma_mmap_coherent(struct device *dev, struct vm_area_struct *vma,
  * return the CPU-viewed address, and sets @handle to be the
  * device-viewed address.
  */
-extern void *
-dma_alloc_writecombine(struct device *dev, size_t size, dma_addr_t *handle, gfp_t gfp);
+extern void *dma_alloc_writecombine(struct device *, size_t, dma_addr_t *,
+               gfp_t);
 
 #define dma_free_writecombine(dev,size,cpu_addr,handle) \
        dma_free_coherent(dev,size,cpu_addr,handle)
 
-int dma_mmap_writecombine(struct device *dev, struct vm_area_struct *vma,
-                         void *cpu_addr, dma_addr_t handle, size_t size);
+int dma_mmap_writecombine(struct device *, struct vm_area_struct *,
+               void *, dma_addr_t, size_t);
+
+
+#ifdef CONFIG_DMABOUNCE
+/*
+ * For SA-1111, IXP425, and ADI systems  the dma-mapping functions are "magic"
+ * and utilize bounce buffers as needed to work around limited DMA windows.
+ *
+ * On the SA-1111, a bug limits DMA to only certain regions of RAM.
+ * On the IXP425, the PCI inbound window is 64MB (256MB total RAM)
+ * On some ADI engineering systems, PCI inbound window is 32MB (12MB total RAM)
+ *
+ * The following are helper functions used by the dmabounce subystem
+ *
+ */
+
+/**
+ * dmabounce_register_dev
+ *
+ * @dev: valid struct device pointer
+ * @small_buf_size: size of buffers to use with small buffer pool
+ * @large_buf_size: size of buffers to use with large buffer pool (can be 0)
+ *
+ * This function should be called by low-level platform code to register
+ * a device as requireing DMA buffer bouncing. The function will allocate
+ * appropriate DMA pools for the device.
+ *
+ */
+extern int dmabounce_register_dev(struct device *, unsigned long,
+               unsigned long);
+
+/**
+ * dmabounce_unregister_dev
+ *
+ * @dev: valid struct device pointer
+ *
+ * This function should be called by low-level platform code when device
+ * that was previously registered with dmabounce_register_dev is removed
+ * from the system.
+ *
+ */
+extern void dmabounce_unregister_dev(struct device *);
+
+/**
+ * dma_needs_bounce
+ *
+ * @dev: valid struct device pointer
+ * @dma_handle: dma_handle of unbounced buffer
+ * @size: size of region being mapped
+ *
+ * Platforms that utilize the dmabounce mechanism must implement
+ * this function.
+ *
+ * The dmabounce routines call this function whenever a dma-mapping
+ * is requested to determine whether a given buffer needs to be bounced
+ * or not. The function must return 0 if the buffer is OK for
+ * DMA access and 1 if the buffer needs to be bounced.
+ *
+ */
+extern int dma_needs_bounce(struct device*, dma_addr_t, size_t);
+
+/*
+ * The DMA API, implemented by dmabounce.c.  See below for descriptions.
+ */
+extern dma_addr_t dma_map_single(struct device *, void *, size_t,
+               enum dma_data_direction);
+extern dma_addr_t dma_map_page(struct device *, struct page *,
+               unsigned long, size_t, enum dma_data_direction);
+extern void dma_unmap_single(struct device *, dma_addr_t, size_t,
+               enum dma_data_direction);
+
+/*
+ * Private functions
+ */
+int dmabounce_sync_for_cpu(struct device *, dma_addr_t, unsigned long,
+               size_t, enum dma_data_direction);
+int dmabounce_sync_for_device(struct device *, dma_addr_t, unsigned long,
+               size_t, enum dma_data_direction);
+#else
+#define dmabounce_sync_for_cpu(dev,dma,off,sz,dir)     (1)
+#define dmabounce_sync_for_device(dev,dma,off,sz,dir)  (1)
 
 
 /**
@@ -198,19 +274,16 @@ int dma_mmap_writecombine(struct device *dev, struct vm_area_struct *vma,
  * can regain ownership by calling dma_unmap_single() or
  * dma_sync_single_for_cpu().
  */
-#ifndef CONFIG_DMABOUNCE
-static inline dma_addr_t
-dma_map_single(struct device *dev, void *cpu_addr, size_t size,
-              enum dma_data_direction dir)
+static inline dma_addr_t dma_map_single(struct device *dev, void *cpu_addr,
+               size_t size, enum dma_data_direction dir)
 {
+       BUG_ON(!valid_dma_direction(dir));
+
        if (!arch_is_coherent())
                dma_cache_maint(cpu_addr, size, dir);
 
        return virt_to_dma(dev, cpu_addr);
 }
-#else
-extern dma_addr_t dma_map_single(struct device *,void *, size_t, enum dma_data_direction);
-#endif
 
 /**
  * dma_map_page - map a portion of a page for streaming DMA
@@ -224,23 +297,25 @@ extern dma_addr_t dma_map_single(struct device *,void *, size_t, enum dma_data_d
  * or written back.
  *
  * The device owns this memory once this call has completed.  The CPU
- * can regain ownership by calling dma_unmap_page() or
- * dma_sync_single_for_cpu().
+ * can regain ownership by calling dma_unmap_page().
  */
-static inline dma_addr_t
-dma_map_page(struct device *dev, struct page *page,
-            unsigned long offset, size_t size,
-            enum dma_data_direction dir)
+static inline dma_addr_t dma_map_page(struct device *dev, struct page *page,
+            unsigned long offset, size_t size, enum dma_data_direction dir)
 {
-       return dma_map_single(dev, page_address(page) + offset, size, dir);
+       BUG_ON(!valid_dma_direction(dir));
+
+       if (!arch_is_coherent())
+               dma_cache_maint(page_address(page) + offset, size, dir);
+
+       return page_to_dma(dev, page) + offset;
 }
 
 /**
  * dma_unmap_single - unmap a single buffer previously mapped
  * @dev: valid struct device pointer, or NULL for ISA and EISA-like devices
  * @handle: DMA address of buffer
- * @size: size of buffer to map
- * @dir: DMA transfer direction
+ * @size: size of buffer (same as passed to dma_map_single)
+ * @dir: DMA transfer direction (same as passed to dma_map_single)
  *
  * Unmap a single streaming mode DMA translation.  The handle and size
  * must match what was provided in the previous dma_map_single() call.
@@ -249,107 +324,33 @@ dma_map_page(struct device *dev, struct page *page,
  * After this call, reads by the CPU to the buffer are guaranteed to see
  * whatever the device wrote there.
  */
-#ifndef CONFIG_DMABOUNCE
-static inline void
-dma_unmap_single(struct device *dev, dma_addr_t handle, size_t size,
-                enum dma_data_direction dir)
+static inline void dma_unmap_single(struct device *dev, dma_addr_t handle,
+               size_t size, enum dma_data_direction dir)
 {
        /* nothing to do */
 }
-#else
-extern void dma_unmap_single(struct device *, dma_addr_t, size_t, enum dma_data_direction);
-#endif
+#endif /* CONFIG_DMABOUNCE */
 
 /**
  * dma_unmap_page - unmap a buffer previously mapped through dma_map_page()
  * @dev: valid struct device pointer, or NULL for ISA and EISA-like devices
  * @handle: DMA address of buffer
- * @size: size of buffer to map
- * @dir: DMA transfer direction
+ * @size: size of buffer (same as passed to dma_map_page)
+ * @dir: DMA transfer direction (same as passed to dma_map_page)
  *
- * Unmap a single streaming mode DMA translation.  The handle and size
- * must match what was provided in the previous dma_map_single() call.
+ * Unmap a page streaming mode DMA translation.  The handle and size
+ * must match what was provided in the previous dma_map_page() call.
  * All other usages are undefined.
  *
  * After this call, reads by the CPU to the buffer are guaranteed to see
  * whatever the device wrote there.
  */
-static inline void
-dma_unmap_page(struct device *dev, dma_addr_t handle, size_t size,
-              enum dma_data_direction dir)
+static inline void dma_unmap_page(struct device *dev, dma_addr_t handle,
+               size_t size, enum dma_data_direction dir)
 {
        dma_unmap_single(dev, handle, size, dir);
 }
 
-/**
- * dma_map_sg - map a set of SG buffers for streaming mode DMA
- * @dev: valid struct device pointer, or NULL for ISA and EISA-like devices
- * @sg: list of buffers
- * @nents: number of buffers to map
- * @dir: DMA transfer direction
- *
- * Map a set of buffers described by scatterlist in streaming
- * mode for DMA.  This is the scatter-gather version of the
- * above dma_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 dma_map_single are
- * the same here.
- */
-#ifndef CONFIG_DMABOUNCE
-static inline int
-dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
-          enum dma_data_direction dir)
-{
-       int i;
-
-       for (i = 0; i < nents; i++, sg++) {
-               char *virt;
-
-               sg->dma_address = page_to_dma(dev, sg_page(sg)) + sg->offset;
-               virt = sg_virt(sg);
-
-               if (!arch_is_coherent())
-                       dma_cache_maint(virt, sg->length, dir);
-       }
-
-       return nents;
-}
-#else
-extern int dma_map_sg(struct device *, struct scatterlist *, int, enum dma_data_direction);
-#endif
-
-/**
- * dma_unmap_sg - unmap a set of SG buffers mapped by dma_map_sg
- * @dev: valid struct device pointer, or NULL for ISA and EISA-like devices
- * @sg: list of buffers
- * @nents: number of buffers to map
- * @dir: DMA transfer direction
- *
- * Unmap a set of streaming mode DMA translations.
- * Again, CPU read rules concerning calls here are the same as for
- * dma_unmap_single() above.
- */
-#ifndef CONFIG_DMABOUNCE
-static inline void
-dma_unmap_sg(struct device *dev, struct scatterlist *sg, int nents,
-            enum dma_data_direction dir)
-{
-
-       /* nothing to do */
-}
-#else
-extern void dma_unmap_sg(struct device *, struct scatterlist *, int, enum dma_data_direction);
-#endif
-
-
 /**
  * dma_sync_single_range_for_cpu
  * @dev: valid struct device pointer, or NULL for ISA and EISA-like devices
@@ -368,145 +369,52 @@ extern void dma_unmap_sg(struct device *, struct scatterlist *, int, enum dma_da
  * must first the perform a dma_sync_for_device, and then the
  * device again owns the buffer.
  */
-#ifndef CONFIG_DMABOUNCE
-static inline void
-dma_sync_single_range_for_cpu(struct device *dev, dma_addr_t handle,
-                             unsigned long offset, size_t size,
-                             enum dma_data_direction dir)
+static inline void dma_sync_single_range_for_cpu(struct device *dev,
+               dma_addr_t handle, unsigned long offset, size_t size,
+               enum dma_data_direction dir)
 {
-       if (!arch_is_coherent())
-               dma_cache_maint(dma_to_virt(dev, handle) + offset, size, dir);
+       BUG_ON(!valid_dma_direction(dir));
+
+       dmabounce_sync_for_cpu(dev, handle, offset, size, dir);
 }
 
-static inline void
-dma_sync_single_range_for_device(struct device *dev, dma_addr_t handle,
-                                unsigned long offset, size_t size,
-                                enum dma_data_direction dir)
+static inline void dma_sync_single_range_for_device(struct device *dev,
+               dma_addr_t handle, unsigned long offset, size_t size,
+               enum dma_data_direction dir)
 {
+       BUG_ON(!valid_dma_direction(dir));
+
+       if (!dmabounce_sync_for_device(dev, handle, offset, size, dir))
+               return;
+
        if (!arch_is_coherent())
                dma_cache_maint(dma_to_virt(dev, handle) + offset, size, dir);
 }
-#else
-extern void dma_sync_single_range_for_cpu(struct device *, dma_addr_t, unsigned long, size_t, enum dma_data_direction);
-extern void dma_sync_single_range_for_device(struct device *, dma_addr_t, unsigned long, size_t, enum dma_data_direction);
-#endif
 
-static inline void
-dma_sync_single_for_cpu(struct device *dev, dma_addr_t handle, size_t size,
-                       enum dma_data_direction dir)
+static inline void dma_sync_single_for_cpu(struct device *dev,
+               dma_addr_t handle, size_t size, enum dma_data_direction dir)
 {
        dma_sync_single_range_for_cpu(dev, handle, 0, size, dir);
 }
 
-static inline void
-dma_sync_single_for_device(struct device *dev, dma_addr_t handle, size_t size,
-                          enum dma_data_direction dir)
+static inline void dma_sync_single_for_device(struct device *dev,
+               dma_addr_t handle, size_t size, enum dma_data_direction dir)
 {
        dma_sync_single_range_for_device(dev, handle, 0, size, dir);
 }
 
-
-/**
- * dma_sync_sg_for_cpu
- * @dev: valid struct device pointer, or NULL for ISA and EISA-like devices
- * @sg: list of buffers
- * @nents: number of buffers to map
- * @dir: DMA transfer direction
- *
- * Make physical memory consistent for a set of streaming
- * mode DMA translations after a transfer.
- *
- * The same as dma_sync_single_for_* but for a scatter-gather list,
- * same rules and usage.
- */
-#ifndef CONFIG_DMABOUNCE
-static inline void
-dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, int nents,
-                   enum dma_data_direction dir)
-{
-       int i;
-
-       for (i = 0; i < nents; i++, sg++) {
-               char *virt = sg_virt(sg);
-               if (!arch_is_coherent())
-                       dma_cache_maint(virt, sg->length, dir);
-       }
-}
-
-static inline void
-dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, int nents,
-                      enum dma_data_direction dir)
-{
-       int i;
-
-       for (i = 0; i < nents; i++, sg++) {
-               char *virt = sg_virt(sg);
-               if (!arch_is_coherent())
-                       dma_cache_maint(virt, sg->length, dir);
-       }
-}
-#else
-extern void dma_sync_sg_for_cpu(struct device*, struct scatterlist*, int, enum dma_data_direction);
-extern void dma_sync_sg_for_device(struct device*, struct scatterlist*, int, enum dma_data_direction);
-#endif
-
-#ifdef CONFIG_DMABOUNCE
 /*
- * For SA-1111, IXP425, and ADI systems  the dma-mapping functions are "magic"
- * and utilize bounce buffers as needed to work around limited DMA windows.
- *
- * On the SA-1111, a bug limits DMA to only certain regions of RAM.
- * On the IXP425, the PCI inbound window is 64MB (256MB total RAM)
- * On some ADI engineering systems, PCI inbound window is 32MB (12MB total RAM)
- *
- * The following are helper functions used by the dmabounce subystem
- *
- */
-
-/**
- * dmabounce_register_dev
- *
- * @dev: valid struct device pointer
- * @small_buf_size: size of buffers to use with small buffer pool
- * @large_buf_size: size of buffers to use with large buffer pool (can be 0)
- *
- * This function should be called by low-level platform code to register
- * a device as requireing DMA buffer bouncing. The function will allocate
- * appropriate DMA pools for the device.
- *
- */
-extern int dmabounce_register_dev(struct device *, unsigned long, unsigned long);
-
-/**
- * dmabounce_unregister_dev
- *
- * @dev: valid struct device pointer
- *
- * This function should be called by low-level platform code when device
- * that was previously registered with dmabounce_register_dev is removed
- * from the system.
- *
+ * The scatter list versions of the above methods.
  */
-extern void dmabounce_unregister_dev(struct device *);
+extern int dma_map_sg(struct device *, struct scatterlist *, int,
+               enum dma_data_direction);
+extern void dma_unmap_sg(struct device *, struct scatterlist *, int,
+               enum dma_data_direction);
+extern void dma_sync_sg_for_cpu(struct device *, struct scatterlist *, int,
+               enum dma_data_direction);
+extern void dma_sync_sg_for_device(struct device *, struct scatterlist *, int,
+               enum dma_data_direction);
 
-/**
- * dma_needs_bounce
- *
- * @dev: valid struct device pointer
- * @dma_handle: dma_handle of unbounced buffer
- * @size: size of region being mapped
- *
- * Platforms that utilize the dmabounce mechanism must implement
- * this function.
- *
- * The dmabounce routines call this function whenever a dma-mapping
- * is requested to determine whether a given buffer needs to be bounced
- * or not. The function must return 0 if the buffer is OK for
- * DMA access and 1 if the buffer needs to be bounced.
- *
- */
-extern int dma_needs_bounce(struct device*, dma_addr_t, size_t);
-#endif /* CONFIG_DMABOUNCE */
 
 #endif /* __KERNEL__ */
 #endif
index 4ca7516274898dafae96518f76a4f6656a352264..5be016980c193ddef8b7cdcb5ffa0be32d55d1fe 100644 (file)
@@ -3,7 +3,6 @@
 
 #include <asm/hwcap.h>
 
-#ifndef __ASSEMBLY__
 /*
  * ELF register definitions..
  */
@@ -17,12 +16,34 @@ typedef unsigned long elf_freg_t[3];
 typedef elf_greg_t elf_gregset_t[ELF_NGREG];
 
 typedef struct user_fp elf_fpregset_t;
-#endif
 
 #define EM_ARM 40
-#define EF_ARM_APCS26 0x08
-#define EF_ARM_SOFT_FLOAT 0x200
-#define EF_ARM_EABI_MASK 0xFF000000
+
+#define EF_ARM_EABI_MASK       0xff000000
+#define EF_ARM_EABI_UNKNOWN    0x00000000
+#define EF_ARM_EABI_VER1       0x01000000
+#define EF_ARM_EABI_VER2       0x02000000
+#define EF_ARM_EABI_VER3       0x03000000
+#define EF_ARM_EABI_VER4       0x04000000
+#define EF_ARM_EABI_VER5       0x05000000
+
+#define EF_ARM_BE8             0x00800000      /* ABI 4,5 */
+#define EF_ARM_LE8             0x00400000      /* ABI 4,5 */
+#define EF_ARM_MAVERICK_FLOAT  0x00000800      /* ABI 0 */
+#define EF_ARM_VFP_FLOAT       0x00000400      /* ABI 0 */
+#define EF_ARM_SOFT_FLOAT      0x00000200      /* ABI 0 */
+#define EF_ARM_OLD_ABI         0x00000100      /* ABI 0 */
+#define EF_ARM_NEW_ABI         0x00000080      /* ABI 0 */
+#define EF_ARM_ALIGN8          0x00000040      /* ABI 0 */
+#define EF_ARM_PIC             0x00000020      /* ABI 0 */
+#define EF_ARM_MAPSYMSFIRST    0x00000010      /* ABI 2 */
+#define EF_ARM_APCS_FLOAT      0x00000010      /* ABI 0, floats in fp regs */
+#define EF_ARM_DYNSYMSUSESEGIDX        0x00000008      /* ABI 2 */
+#define EF_ARM_APCS_26         0x00000008      /* ABI 0 */
+#define EF_ARM_SYMSARESORTED   0x00000004      /* ABI 1,2 */
+#define EF_ARM_INTERWORK       0x00000004      /* ABI 0 */
+#define EF_ARM_HASENTRY                0x00000002      /* All */
+#define EF_ARM_RELEXEC         0x00000001      /* All */
 
 #define R_ARM_NONE     0
 #define R_ARM_PC24     1
@@ -41,7 +62,6 @@ typedef struct user_fp elf_fpregset_t;
 #endif
 #define ELF_ARCH       EM_ARM
 
-#ifndef __ASSEMBLY__
 /*
  * This yields a string that ld.so will use to load implementation
  * specific libraries for optimization.  This is more specific in
@@ -59,25 +79,17 @@ typedef struct user_fp elf_fpregset_t;
 #define ELF_PLATFORM   (elf_platform)
 
 extern char elf_platform[];
-#endif
 
-/*
- * This is used to ensure we don't load something for the wrong architecture.
- */
-#define elf_check_arch(x) ((x)->e_machine == EM_ARM && ELF_PROC_OK(x))
+struct elf32_hdr;
 
 /*
- * 32-bit code is always OK.  Some cpus can do 26-bit, some can't.
+ * This is used to ensure we don't load something for the wrong architecture.
  */
-#define ELF_PROC_OK(x) (ELF_THUMB_OK(x) && ELF_26BIT_OK(x))
-
-#define ELF_THUMB_OK(x) \
-       ((elf_hwcap & HWCAP_THUMB && ((x)->e_entry & 1) == 1) || \
-        ((x)->e_entry & 3) == 0)
+extern int elf_check_arch(const struct elf32_hdr *);
+#define elf_check_arch elf_check_arch
 
-#define ELF_26BIT_OK(x) \
-       ((elf_hwcap & HWCAP_26BIT && (x)->e_flags & EF_ARM_APCS26) || \
-         ((x)->e_flags & EF_ARM_APCS26) == 0)
+extern int arm_elf_read_implies_exec(const struct elf32_hdr *, int);
+#define elf_read_implies_exec(ex,stk) arm_elf_read_implies_exec(&(ex), stk)
 
 #define USE_ELF_CORE_DUMP
 #define ELF_EXEC_PAGESIZE      4096
@@ -94,23 +106,7 @@ extern char elf_platform[];
    have no such handler.  */
 #define ELF_PLAT_INIT(_r, load_addr)   (_r)->ARM_r0 = 0
 
-/*
- * Since the FPA coprocessor uses CP1 and CP2, and iWMMXt uses CP0
- * and CP1, we only enable access to the iWMMXt coprocessor if the
- * binary is EABI or softfloat (and thus, guaranteed not to use
- * FPA instructions.)
- */
-#define SET_PERSONALITY(ex, ibcs2)                                     \
-       do {                                                            \
-               if ((ex).e_flags & EF_ARM_APCS26) {                     \
-                       set_personality(PER_LINUX);                     \
-               } else {                                                \
-                       set_personality(PER_LINUX_32BIT);               \
-                       if (elf_hwcap & HWCAP_IWMMXT && (ex).e_flags & (EF_ARM_EABI_MASK | EF_ARM_SOFT_FLOAT)) \
-                               set_thread_flag(TIF_USING_IWMMXT);      \
-                       else                                            \
-                               clear_thread_flag(TIF_USING_IWMMXT);    \
-               }                                                       \
-       } while (0)
+extern void elf_set_personality(const struct elf32_hdr *);
+#define SET_PERSONALITY(ex, ibcs2)     elf_set_personality(&(ex))
 
 #endif
index 6a332a9f099c2eafbf78ee5f79056a349d41a775..9ee743b95de830e4db2d364e0209d0e282a97c9c 100644 (file)
@@ -1,6 +1,124 @@
-#ifndef _ASM_FUTEX_H
-#define _ASM_FUTEX_H
+#ifndef _ASM_ARM_FUTEX_H
+#define _ASM_ARM_FUTEX_H
+
+#ifdef __KERNEL__
+
+#ifdef CONFIG_SMP
 
 #include <asm-generic/futex.h>
 
-#endif
+#else /* !SMP, we can work around lack of atomic ops by disabling preemption */
+
+#include <linux/futex.h>
+#include <linux/preempt.h>
+#include <linux/uaccess.h>
+#include <asm/errno.h>
+
+#define __futex_atomic_op(insn, ret, oldval, uaddr, oparg)     \
+       __asm__ __volatile__(                                   \
+       "1:     ldrt    %1, [%2]\n"                             \
+       "       " insn "\n"                                     \
+       "2:     strt    %0, [%2]\n"                             \
+       "       mov     %0, #0\n"                               \
+       "3:\n"                                                  \
+       "       .section __ex_table,\"a\"\n"                    \
+       "       .align  3\n"                                    \
+       "       .long   1b, 4f, 2b, 4f\n"                       \
+       "       .previous\n"                                    \
+       "       .section .fixup,\"ax\"\n"                       \
+       "4:     mov     %0, %4\n"                               \
+       "       b       3b\n"                                   \
+       "       .previous"                                      \
+       : "=&r" (ret), "=&r" (oldval)                           \
+       : "r" (uaddr), "r" (oparg), "Ir" (-EFAULT)              \
+       : "cc", "memory")
+
+static inline int
+futex_atomic_op_inuser (int encoded_op, int __user *uaddr)
+{
+       int op = (encoded_op >> 28) & 7;
+       int cmp = (encoded_op >> 24) & 15;
+       int oparg = (encoded_op << 8) >> 20;
+       int cmparg = (encoded_op << 20) >> 20;
+       int oldval = 0, ret;
+
+       if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28))
+               oparg = 1 << oparg;
+
+       if (!access_ok(VERIFY_WRITE, uaddr, sizeof(int)))
+               return -EFAULT;
+
+       pagefault_disable();    /* implies preempt_disable() */
+
+       switch (op) {
+       case FUTEX_OP_SET:
+               __futex_atomic_op("mov  %0, %3", ret, oldval, uaddr, oparg);
+               break;
+       case FUTEX_OP_ADD:
+               __futex_atomic_op("add  %0, %1, %3", ret, oldval, uaddr, oparg);
+               break;
+       case FUTEX_OP_OR:
+               __futex_atomic_op("orr  %0, %1, %3", ret, oldval, uaddr, oparg);
+               break;
+       case FUTEX_OP_ANDN:
+               __futex_atomic_op("and  %0, %1, %3", ret, oldval, uaddr, ~oparg);
+               break;
+       case FUTEX_OP_XOR:
+               __futex_atomic_op("eor  %0, %1, %3", ret, oldval, uaddr, oparg);
+               break;
+       default:
+               ret = -ENOSYS;
+       }
+
+       pagefault_enable();     /* subsumes preempt_enable() */
+
+       if (!ret) {
+               switch (cmp) {
+               case FUTEX_OP_CMP_EQ: ret = (oldval == cmparg); break;
+               case FUTEX_OP_CMP_NE: ret = (oldval != cmparg); break;
+               case FUTEX_OP_CMP_LT: ret = (oldval < cmparg); break;
+               case FUTEX_OP_CMP_GE: ret = (oldval >= cmparg); break;
+               case FUTEX_OP_CMP_LE: ret = (oldval <= cmparg); break;
+               case FUTEX_OP_CMP_GT: ret = (oldval > cmparg); break;
+               default: ret = -ENOSYS;
+               }
+       }
+       return ret;
+}
+
+static inline int
+futex_atomic_cmpxchg_inatomic(int __user *uaddr, int oldval, int newval)
+{
+       int val;
+
+       if (!access_ok(VERIFY_WRITE, uaddr, sizeof(int)))
+               return -EFAULT;
+
+       pagefault_disable();    /* implies preempt_disable() */
+
+       __asm__ __volatile__("@futex_atomic_cmpxchg_inatomic\n"
+       "1:     ldrt    %0, [%3]\n"
+       "       teq     %0, %1\n"
+       "2:     streqt  %2, [%3]\n"
+       "3:\n"
+       "       .section __ex_table,\"a\"\n"
+       "       .align  3\n"
+       "       .long   1b, 4f, 2b, 4f\n"
+       "       .previous\n"
+       "       .section .fixup,\"ax\"\n"
+       "4:     mov     %0, %4\n"
+       "       b       3b\n"
+       "       .previous"
+       : "=&r" (val)
+       : "r" (oldval), "r" (newval), "r" (uaddr), "Ir" (-EFAULT)
+       : "cc", "memory");
+
+       pagefault_enable();     /* subsumes preempt_enable() */
+
+       return val;
+}
+
+#endif /* !SMP */
+
+#endif /* __KERNEL__ */
+#endif /* _ASM_ARM_FUTEX_H */
index 71934856fc22c38ede7ab9f4a6c1380d9e1dad5d..a8094451be57285cca1b802e93860b0c9c860774 100644 (file)
@@ -60,10 +60,9 @@ extern void __raw_readsl(const void __iomem *addr, void *data, int longlen);
 #define MT_DEVICE              0
 #define MT_DEVICE_NONSHARED    1
 #define MT_DEVICE_CACHED       2
-#define MT_DEVICE_IXP2000      3
-#define MT_DEVICE_WC           4
+#define MT_DEVICE_WC           3
 /*
- * types 5 onwards can be found in asm/mach/map.h and are undefined
+ * types 4 onwards can be found in asm/mach/map.h and are undefined
  * for ioremap
  */
 
index d6786090d02caf5e4d7f0ab8b2c59121d86d46b7..a0009aa5d157686f151bbc726ae59da1ddafd4e0 100644 (file)
 #ifndef __ASSEMBLY__
 struct irqaction;
 extern void migrate_irqs(void);
+
+extern void asm_do_IRQ(unsigned int, struct pt_regs *);
+void init_IRQ(void);
+
 #endif
 
 #endif
index a5d0d99ad38705b42e24735e5835de9c33663746..bb8a19bd58225a3ce39bf39443cfd5b74b6409fd 100644 (file)
@@ -61,7 +61,6 @@ struct kprobe_ctlblk {
 void arch_remove_kprobe(struct kprobe *);
 void kretprobe_trampoline(void);
 
-int kprobe_trap_handler(struct pt_regs *regs, unsigned int instr);
 int kprobe_fault_handler(struct pt_regs *regs, unsigned int fsr);
 int kprobe_exceptions_notify(struct notifier_block *self,
                             unsigned long val, void *data);
index 9eb936e49cc349564f651ea973f71e6cdd273ee9..cb1139ac19432f555b32ccc188b12f838f1ee9d4 100644 (file)
@@ -18,16 +18,13 @@ struct map_desc {
        unsigned int type;
 };
 
-/* types 0-4 are defined in asm/io.h */
-#define MT_CACHECLEAN          5
-#define MT_MINICLEAN           6
-#define MT_LOW_VECTORS         7
-#define MT_HIGH_VECTORS                8
-#define MT_MEMORY              9
-#define MT_ROM                 10
-
-#define MT_NONSHARED_DEVICE    MT_DEVICE_NONSHARED
-#define MT_IXP2000_DEVICE      MT_DEVICE_IXP2000
+/* types 0-3 are defined in asm/io.h */
+#define MT_CACHECLEAN          4
+#define MT_MINICLEAN           5
+#define MT_LOW_VECTORS         6
+#define MT_HIGH_VECTORS                7
+#define MT_MEMORY              8
+#define MT_ROM                 9
 
 #ifdef CONFIG_MMU
 extern void iotable_init(struct map_desc *, int);
index 270902c353fde579c62f9fd53e83d8cc28ddbefa..f3eabf1ecec333643273d9f797a7afd70cc4894d 100644 (file)
@@ -18,8 +18,7 @@ struct pxa2xx_udc_mach_info {
        /* Boards following the design guidelines in the developer's manual,
         * with on-chip GPIOs not Lubbock's weird hardware, can have a sane
         * VBUS IRQ and omit the methods above.  Store the GPIO number
-        * here; for GPIO 0, also mask in one of the pxa_gpio_mode() bits.
-        * Note that sometimes the signals go through inverters...
+        * here.  Note that sometimes the signals go through inverters...
         */
        bool    gpio_vbus_inverted;
        u16     gpio_vbus;                      /* high == vbus present */
index e1ca48a9e973442aaeff9333990a457c155be394..6b884d2b0b69eaf0395040d9d440b93cf0f274d1 100644 (file)
@@ -4,8 +4,8 @@
 #ifndef _ASM_MC146818RTC_H
 #define _ASM_MC146818RTC_H
 
+#include <linux/io.h>
 #include <mach/irqs.h>
-#include <asm/io.h>
 
 #ifndef RTC_PORT
 #define RTC_PORT(x)    (0x70 + (x))
index bf7c737c92267c7de8b38c0b6347816a0bdb3328..809ff9ab853a5979c0da8fc35a30c6208533d07b 100644 (file)
 #ifndef __ASM_ARM_MEMORY_H
 #define __ASM_ARM_MEMORY_H
 
+#include <linux/compiler.h>
+#include <linux/const.h>
+#include <mach/memory.h>
+#include <asm/sizes.h>
+
 /*
  * Allow for constants defined here to be used from assembly code
  * by prepending the UL suffix only with actual C code compilation.
  */
-#ifndef __ASSEMBLY__
-#define UL(x) (x##UL)
-#else
-#define UL(x) (x)
-#endif
-
-#include <linux/compiler.h>
-#include <mach/memory.h>
-#include <asm/sizes.h>
+#define UL(x) _AC(x, UL)
 
 #ifdef CONFIG_MMU
 
-#ifndef TASK_SIZE
 /*
+ * PAGE_OFFSET - the virtual address of the start of the kernel image
  * TASK_SIZE - the maximum size of a user space task.
  * TASK_UNMAPPED_BASE - the lower boundary of the mmap VM area
  */
-#define TASK_SIZE              UL(0xbf000000)
-#define TASK_UNMAPPED_BASE     UL(0x40000000)
-#endif
+#define PAGE_OFFSET            UL(CONFIG_PAGE_OFFSET)
+#define TASK_SIZE              (UL(CONFIG_PAGE_OFFSET) - UL(0x01000000))
+#define TASK_UNMAPPED_BASE     (UL(CONFIG_PAGE_OFFSET) / 3)
 
 /*
  * The maximum size of a 26-bit user space task.
  */
 #define TASK_SIZE_26           UL(0x04000000)
 
-/*
- * Page offset: 3GB
- */
-#ifndef PAGE_OFFSET
-#define PAGE_OFFSET            UL(0xc0000000)
-#endif
-
 /*
  * The module space lives between the addresses given by TASK_SIZE
  * and PAGE_OFFSET - it must be within 32MB of the kernel text.
 
 #ifndef arch_adjust_zones
 #define arch_adjust_zones(node,size,holes) do { } while (0)
+#elif !defined(CONFIG_ZONE_DMA)
+#error "custom arch_adjust_zones() requires CONFIG_ZONE_DMA"
 #endif
 
-/*
- * Amount of memory reserved for the vmalloc() area, and minimum
- * address for vmalloc mappings.
- */
-extern unsigned long vmalloc_reserve;
-
-#define VMALLOC_MIN            (void *)(VMALLOC_END - vmalloc_reserve)
-
 /*
  * PFNs are used to describe any physical page; this means
  * PFN 0 == physical address 0.
index a301e446007f541826a33d6f45d330f365222bec..0559f37c2a27c09d11a378b2c8a2527ad2895d71 100644 (file)
@@ -15,6 +15,7 @@
 
 #include <linux/compiler.h>
 #include <asm/cacheflush.h>
+#include <asm/cachetype.h>
 #include <asm/proc-fns.h>
 #include <asm-generic/mm_hooks.h>
 
index cf2e2680daaa1c03ede70035d4497414f917d88a..bed1c0a0036865c40aab88e95b8500e701e940ce 100644 (file)
@@ -184,8 +184,9 @@ typedef struct page *pgtable_t;
 
 #endif /* !__ASSEMBLY__ */
 
-#define VM_DATA_DEFAULT_FLAGS  (VM_READ | VM_WRITE | VM_EXEC | \
-                                VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
+#define VM_DATA_DEFAULT_FLAGS \
+       (((current->personality & READ_IMPLIES_EXEC) ? VM_EXEC : 0) | \
+        VM_READ | VM_WRITE | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
 
 /*
  * With EABI on ARMv5 and above we must have 64-bit aligned slab pointers.
index 8e21ef15bd743b9fb3b019bd7c9cc559c3c2ab61..110295c5461dc2dd471f7172b31daf7eb589b244 100644 (file)
@@ -164,14 +164,30 @@ extern void __pgd_error(const char *file, int line, unsigned long val);
 #define L_PTE_PRESENT          (1 << 0)
 #define L_PTE_FILE             (1 << 1)        /* only when !PRESENT */
 #define L_PTE_YOUNG            (1 << 1)
-#define L_PTE_BUFFERABLE       (1 << 2)        /* matches PTE */
-#define L_PTE_CACHEABLE                (1 << 3)        /* matches PTE */
-#define L_PTE_USER             (1 << 4)
-#define L_PTE_WRITE            (1 << 5)
-#define L_PTE_EXEC             (1 << 6)
-#define L_PTE_DIRTY            (1 << 7)
+#define L_PTE_BUFFERABLE       (1 << 2)        /* obsolete, matches PTE */
+#define L_PTE_CACHEABLE                (1 << 3)        /* obsolete, matches PTE */
+#define L_PTE_DIRTY            (1 << 6)
+#define L_PTE_WRITE            (1 << 7)
+#define L_PTE_USER             (1 << 8)
+#define L_PTE_EXEC             (1 << 9)
 #define L_PTE_SHARED           (1 << 10)       /* shared(v6), coherent(xsc3) */
 
+/*
+ * These are the memory types, defined to be compatible with
+ * pre-ARMv6 CPUs cacheable and bufferable bits:   XXCB
+ */
+#define L_PTE_MT_UNCACHED      (0x00 << 2)     /* 0000 */
+#define L_PTE_MT_BUFFERABLE    (0x01 << 2)     /* 0001 */
+#define L_PTE_MT_WRITETHROUGH  (0x02 << 2)     /* 0010 */
+#define L_PTE_MT_WRITEBACK     (0x03 << 2)     /* 0011 */
+#define L_PTE_MT_MINICACHE     (0x06 << 2)     /* 0110 (sa1100, xscale) */
+#define L_PTE_MT_WRITEALLOC    (0x07 << 2)     /* 0111 */
+#define L_PTE_MT_DEV_SHARED    (0x04 << 2)     /* 0100 */
+#define L_PTE_MT_DEV_NONSHARED (0x0c << 2)     /* 1100 */
+#define L_PTE_MT_DEV_WC                (0x09 << 2)     /* 1001 */
+#define L_PTE_MT_DEV_CACHED    (0x0b << 2)     /* 1011 */
+#define L_PTE_MT_MASK          (0x0f << 2)
+
 #ifndef __ASSEMBLY__
 
 /*
@@ -180,23 +196,30 @@ extern void __pgd_error(const char *file, int line, unsigned long val);
  * as well as any architecture dependent bits like global/ASID and SMP
  * shared mapping bits.
  */
-#define _L_PTE_DEFAULT L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_CACHEABLE | L_PTE_BUFFERABLE
-#define _L_PTE_READ    L_PTE_USER | L_PTE_EXEC
+#define _L_PTE_DEFAULT L_PTE_PRESENT | L_PTE_YOUNG
 
 extern pgprot_t                pgprot_user;
 extern pgprot_t                pgprot_kernel;
 
-#define PAGE_NONE      pgprot_user
-#define PAGE_COPY      __pgprot(pgprot_val(pgprot_user) | _L_PTE_READ)
-#define PAGE_SHARED    __pgprot(pgprot_val(pgprot_user) | _L_PTE_READ | \
-                                L_PTE_WRITE)
-#define PAGE_READONLY  __pgprot(pgprot_val(pgprot_user) | _L_PTE_READ)
-#define PAGE_KERNEL    pgprot_kernel
-
-#define __PAGE_NONE    __pgprot(_L_PTE_DEFAULT)
-#define __PAGE_COPY    __pgprot(_L_PTE_DEFAULT | _L_PTE_READ)
-#define __PAGE_SHARED  __pgprot(_L_PTE_DEFAULT | _L_PTE_READ | L_PTE_WRITE)
-#define __PAGE_READONLY        __pgprot(_L_PTE_DEFAULT | _L_PTE_READ)
+#define _MOD_PROT(p, b)        __pgprot(pgprot_val(p) | (b))
+
+#define PAGE_NONE              pgprot_user
+#define PAGE_SHARED            _MOD_PROT(pgprot_user, L_PTE_USER | L_PTE_WRITE)
+#define PAGE_SHARED_EXEC       _MOD_PROT(pgprot_user, L_PTE_USER | L_PTE_WRITE | L_PTE_EXEC)
+#define PAGE_COPY              _MOD_PROT(pgprot_user, L_PTE_USER)
+#define PAGE_COPY_EXEC         _MOD_PROT(pgprot_user, L_PTE_USER | L_PTE_EXEC)
+#define PAGE_READONLY          _MOD_PROT(pgprot_user, L_PTE_USER)
+#define PAGE_READONLY_EXEC     _MOD_PROT(pgprot_user, L_PTE_USER | L_PTE_EXEC)
+#define PAGE_KERNEL            pgprot_kernel
+#define PAGE_KERNEL_EXEC       _MOD_PROT(pgprot_kernel, L_PTE_EXEC)
+
+#define __PAGE_NONE            __pgprot(_L_PTE_DEFAULT)
+#define __PAGE_SHARED          __pgprot(_L_PTE_DEFAULT | L_PTE_USER | L_PTE_WRITE)
+#define __PAGE_SHARED_EXEC     __pgprot(_L_PTE_DEFAULT | L_PTE_USER | L_PTE_WRITE | L_PTE_EXEC)
+#define __PAGE_COPY            __pgprot(_L_PTE_DEFAULT | L_PTE_USER)
+#define __PAGE_COPY_EXEC       __pgprot(_L_PTE_DEFAULT | L_PTE_USER | L_PTE_EXEC)
+#define __PAGE_READONLY                __pgprot(_L_PTE_DEFAULT | L_PTE_USER)
+#define __PAGE_READONLY_EXEC   __pgprot(_L_PTE_DEFAULT | L_PTE_USER | L_PTE_EXEC)
 
 #endif /* __ASSEMBLY__ */
 
@@ -212,19 +235,19 @@ extern pgprot_t           pgprot_kernel;
 #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 __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
 #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 __S100  __PAGE_READONLY_EXEC
+#define __S101  __PAGE_READONLY_EXEC
+#define __S110  __PAGE_SHARED_EXEC
+#define __S111  __PAGE_SHARED_EXEC
 
 #ifndef __ASSEMBLY__
 /*
@@ -286,8 +309,10 @@ static inline pte_t pte_mkspecial(pte_t pte) { return pte; }
 /*
  * Mark the prot value as uncacheable and unbufferable.
  */
-#define pgprot_noncached(prot) __pgprot(pgprot_val(prot) & ~(L_PTE_CACHEABLE | L_PTE_BUFFERABLE))
-#define pgprot_writecombine(prot) __pgprot(pgprot_val(prot) & ~L_PTE_CACHEABLE)
+#define pgprot_noncached(prot) \
+       __pgprot((pgprot_val(prot) & ~L_PTE_MT_MASK) | L_PTE_MT_UNCACHED)
+#define pgprot_writecombine(prot) \
+       __pgprot((pgprot_val(prot) & ~L_PTE_MT_MASK) | L_PTE_MT_BUFFERABLE)
 
 #define pmd_none(pmd)          (!pmd_val(pmd))
 #define pmd_present(pmd)       (pmd_val(pmd))
@@ -319,11 +344,6 @@ static inline pte_t *pmd_page_vaddr(pmd_t pmd)
 
 #define pmd_page(pmd) virt_to_page(__va(pmd_val(pmd)))
 
-/*
- * Permanent address of a page. We never have highmem, so this is trivial.
- */
-#define pages_to_mb(x)         ((x) >> (20 - PAGE_SHIFT))
-
 /*
  * Conversion functions: convert a page and protection to a page entry,
  * and a page entry and page directory to the page they refer to.
index b415c0e85458952899b2ba910aeccfd053952584..73192618f1c2d8d0816f274a71cb626ee26d8223 100644 (file)
@@ -54,7 +54,6 @@
 #define PSR_C_BIT      0x20000000
 #define PSR_Z_BIT      0x40000000
 #define PSR_N_BIT      0x80000000
-#define PCMASK         0
 
 /*
  * Groups of PSR bits
@@ -139,11 +138,7 @@ static inline int valid_user_regs(struct pt_regs *regs)
        return 0;
 }
 
-#define pc_pointer(v) \
-       ((v) & ~PCMASK)
-
-#define instruction_pointer(regs) \
-       (pc_pointer((regs)->ARM_pc))
+#define instruction_pointer(regs)      (regs)->ARM_pc
 
 #ifdef CONFIG_SMP
 extern unsigned long profile_pc(struct pt_regs *regs);
index 7bbf105463f1adf8fd9cdaf68283cc87f3cb8c97..a65413ba121de131eca860b555cab65071b83a61 100644 (file)
@@ -209,6 +209,17 @@ struct meminfo {
        struct membank bank[NR_BANKS];
 };
 
+#define for_each_nodebank(iter,mi,no)                  \
+       for (iter = 0; iter < mi->nr_banks; iter++)     \
+               if (mi->bank[iter].node == no)
+
+#define bank_pfn_start(bank)   __phys_to_pfn((bank)->start)
+#define bank_pfn_end(bank)     __phys_to_pfn((bank)->start + (bank)->size)
+#define bank_pfn_size(bank)    ((bank)->size >> PAGE_SHIFT)
+#define bank_phys_start(bank)  (bank)->start
+#define bank_phys_end(bank)    ((bank)->start + (bank)->size)
+#define bank_phys_size(bank)   (bank)->size
+
 /*
  * Early command line parameters.
  */
index 277158191a0d2c0a5a0fc3858d6ba54a7d8539c5..00098615c6f0c35506f9628bb08dc81c39dca7a7 100644 (file)
@@ -3,8 +3,22 @@
 
 #include <asm/memory.h>
 
-#define MAX_PHYSADDR_BITS      32
-#define MAX_PHYSMEM_BITS       32
-#define SECTION_SIZE_BITS      NODE_MEM_SIZE_BITS
+/*
+ * Two definitions are required for sparsemem:
+ *
+ * MAX_PHYSMEM_BITS: The number of physical address bits required
+ *   to address the last byte of memory.
+ *
+ * SECTION_SIZE_BITS: The number of physical address bits to cover
+ *   the maximum amount of memory in a section.
+ *
+ * Eg, if you have 2 banks of up to 64MB at 0x80000000, 0x84000000,
+ * then MAX_PHYSMEM_BITS is 32, SECTION_SIZE_BITS is 26.
+ *
+ * Define these in your mach/memory.h.
+ */
+#if !defined(SECTION_SIZE_BITS) || !defined(MAX_PHYSMEM_BITS)
+#error Sparsemem is not supported on this platform
+#endif
 
 #endif
index 514af792a5980bd384dc158124df7e9036bdc926..7aad78420f18df6b9e375d2023a8ccb998d528e0 100644 (file)
 #define CR_XP  (1 << 23)       /* Extended page tables                 */
 #define CR_VE  (1 << 24)       /* Vectored interrupts                  */
 
-#define CPUID_ID       0
-#define CPUID_CACHETYPE        1
-#define CPUID_TCM      2
-#define CPUID_TLBTYPE  3
-
 /*
  * This is used to ensure the compiler did actually allocate the register we
  * asked it for some inline assembly sequences.  Apparently we can't trust
 #ifndef __ASSEMBLY__
 
 #include <linux/linkage.h>
-#include <linux/stringify.h>
 #include <linux/irqflags.h>
 
-#ifdef CONFIG_CPU_CP15
-#define read_cpuid(reg)                                                        \
-       ({                                                              \
-               unsigned int __val;                                     \
-               asm("mrc        p15, 0, %0, c0, c0, " __stringify(reg)  \
-                   : "=r" (__val)                                      \
-                   :                                                   \
-                   : "cc");                                            \
-               __val;                                                  \
-       })
-#else
-extern unsigned int processor_id;
-#define read_cpuid(reg) (processor_id)
-#endif
-
-/*
- * The CPU ID never changes at run time, so we might as well tell the
- * compiler that it's constant.  Use this function to read the CPU ID
- * rather than directly reading processor_id or read_cpuid() directly.
- */
-static inline unsigned int read_cpuid_id(void) __attribute_const__;
-
-static inline unsigned int read_cpuid_id(void)
-{
-       return read_cpuid(CPUID_ID);
-}
-
 #define __exception    __attribute__((section(".exception.text")))
 
 struct thread_info;
@@ -131,31 +98,6 @@ extern void cpu_init(void);
 void arm_machine_restart(char mode);
 extern void (*arm_pm_restart)(char str);
 
-/*
- * Intel's XScale3 core supports some v6 features (supersections, L2)
- * but advertises itself as v5 as it does not support the v6 ISA.  For
- * this reason, we need a way to explicitly test for this type of CPU.
- */
-#ifndef CONFIG_CPU_XSC3
-#define cpu_is_xsc3()  0
-#else
-static inline int cpu_is_xsc3(void)
-{
-       extern unsigned int processor_id;
-
-       if ((processor_id & 0xffffe000) == 0x69056000)
-               return 1;
-
-       return 0;
-}
-#endif
-
-#if !defined(CONFIG_CPU_XSCALE) && !defined(CONFIG_CPU_XSC3)
-#define        cpu_is_xscale() 0
-#else
-#define        cpu_is_xscale() 1
-#endif
-
 #define UDBG_UNDEFINED (1 << 0)
 #define UDBG_SYSCALL   (1 << 1)
 #define UDBG_BADABORT  (1 << 2)
index e56fa48e4ae7843436021e19fb067233c67e6a02..68b9ec82a37ffa1e77e2836e955663ff83b675fc 100644 (file)
@@ -98,7 +98,7 @@ static inline struct thread_info *current_thread_info(void)
 }
 
 #define thread_saved_pc(tsk)   \
-       ((unsigned long)(pc_pointer(task_thread_info(tsk)->cpu_context.pc)))
+       ((unsigned long)(task_thread_info(tsk)->cpu_context.pc))
 #define thread_saved_fp(tsk)   \
        ((unsigned long)(task_thread_info(tsk)->cpu_context.fp))
 
index d0f51ff900b5d029e278b9b9480c6b90cd6226b7..e98ec60b34002b4f2457982c8312600efd7216be 100644 (file)
@@ -225,7 +225,7 @@ do {                                                                        \
 
 #define __get_user_asm_byte(x,addr,err)                                \
        __asm__ __volatile__(                                   \
-       "1:     ldrbt   %1,[%2],#0\n"                           \
+       "1:     ldrbt   %1,[%2]\n"                              \
        "2:\n"                                                  \
        "       .section .fixup,\"ax\"\n"                       \
        "       .align  2\n"                                    \
@@ -261,7 +261,7 @@ do {                                                                        \
 
 #define __get_user_asm_word(x,addr,err)                                \
        __asm__ __volatile__(                                   \
-       "1:     ldrt    %1,[%2],#0\n"                           \
+       "1:     ldrt    %1,[%2]\n"                              \
        "2:\n"                                                  \
        "       .section .fixup,\"ax\"\n"                       \
        "       .align  2\n"                                    \
@@ -306,7 +306,7 @@ do {                                                                        \
 
 #define __put_user_asm_byte(x,__pu_addr,err)                   \
        __asm__ __volatile__(                                   \
-       "1:     strbt   %1,[%2],#0\n"                           \
+       "1:     strbt   %1,[%2]\n"                              \
        "2:\n"                                                  \
        "       .section .fixup,\"ax\"\n"                       \
        "       .align  2\n"                                    \
@@ -339,7 +339,7 @@ do {                                                                        \
 
 #define __put_user_asm_word(x,__pu_addr,err)                   \
        __asm__ __volatile__(                                   \
-       "1:     strt    %1,[%2],#0\n"                           \
+       "1:     strt    %1,[%2]\n"                              \
        "2:\n"                                                  \
        "       .section .fixup,\"ax\"\n"                       \
        "       .align  2\n"                                    \
@@ -365,7 +365,7 @@ do {                                                                        \
 #define __put_user_asm_dword(x,__pu_addr,err)                  \
        __asm__ __volatile__(                                   \
        "1:     strt    " __reg_oper1 ", [%1], #4\n"            \
-       "2:     strt    " __reg_oper0 ", [%1], #0\n"            \
+       "2:     strt    " __reg_oper0 ", [%1]\n"                \
        "3:\n"                                                  \
        "       .section .fixup,\"ax\"\n"                       \
        "       .align  2\n"                                    \
index 6a3cd2a2f6700d386a5cc82921eb9e6b6f76258e..250a4dd00630f135c09e3fb474092ed4b9ba1b04 100644 (file)
@@ -1,8 +1,8 @@
 #ifndef ASMARM_VGA_H
 #define ASMARM_VGA_H
 
+#include <linux/io.h>
 #include <mach/hardware.h>
-#include <asm/io.h>
 
 #define VGA_MAP_MEM(x,s)       (PCIMEM_BASE + (x))
 
index 1d296fc8494e01f7f33a8cac97855506727f3e46..4305345987d3d1c45a018d8ca089b8ab182bd895 100644 (file)
@@ -10,7 +10,7 @@ endif
 
 # Object file lists.
 
-obj-y          := compat.o entry-armv.o entry-common.o irq.o \
+obj-y          := compat.o elf.o entry-armv.o entry-common.o irq.o \
                   process.o ptrace.o setup.o signal.o \
                   sys_arm.o stacktrace.o time.o traps.o
 
index cc7b246e9652033d9593006f2821f99aad102fe3..2357b1cf1cf9381c0e368ddd92725b749ae7f355 100644 (file)
 #include <linux/delay.h>
 #include <linux/in6.h>
 #include <linux/syscalls.h>
+#include <linux/uaccess.h>
+#include <linux/io.h>
 
 #include <asm/checksum.h>
-#include <asm/io.h>
 #include <asm/system.h>
-#include <asm/uaccess.h>
 #include <asm/ftrace.h>
 
 /*
index e5747547b44c1cfc8213aed6f8c0c72f149b0bfd..17a59b6e521f84ec983ab90918952409389d5eaf 100644 (file)
@@ -10,8 +10,8 @@
 #include <linux/pci.h>
 #include <linux/slab.h>
 #include <linux/init.h>
+#include <linux/io.h>
 
-#include <asm/io.h>
 #include <asm/mach-types.h>
 #include <asm/mach/pci.h>
 
index 3b6a1c293ee49cb03825a860a5edc0866133cf17..99995c2b2312551917f19492194f0b2966425425 100644 (file)
@@ -15,9 +15,9 @@
 #include <linux/signal.h>
 #include <linux/sched.h>
 #include <linux/init.h>
+#include <linux/io.h>
 #include <mach/ep93xx-regs.h>
 #include <asm/thread_notify.h>
-#include <asm/io.h>
 
 struct crunch_state *crunch_owner;
 
index 9550ff0ddde4f57393a3ccf1350c032e5115db2b..f53c582905430af58b91341e952e1fe180a022c8 100644 (file)
 ENTRY(printhex8)
                mov     r1, #8
                b       printhex
+ENDPROC(printhex8)
 
 ENTRY(printhex4)
                mov     r1, #4
                b       printhex
+ENDPROC(printhex4)
 
 ENTRY(printhex2)
                mov     r1, #2
@@ -110,6 +112,7 @@ printhex:   adr     r2, hexbuf
                bne     1b
                mov     r0, r2
                b       printascii
+ENDPROC(printhex2)
 
                .ltorg
 
@@ -127,11 +130,13 @@ ENTRY(printascii)
                teqne   r1, #0
                bne     1b
                mov     pc, lr
+ENDPROC(printascii)
 
 ENTRY(printch)
                addruart r3
                mov     r1, r0
                mov     r0, #0
                b       1b
+ENDPROC(printch)
 
 hexbuf:                .space 16
index 2f080a35a2d9240181a6edd745394e0942a128e2..4a3a50495c60778c813acbf192b1fa16475a995d 100644 (file)
 #include <linux/ioport.h>
 #include <linux/init.h>
 #include <linux/dma-mapping.h>
+#include <linux/io.h>
 
 #include <asm/dma.h>
-#include <asm/io.h>
-
 #include <asm/mach/dma.h>
 
 #define ISA_DMA_MODE_READ      0x44
index 7a50575a8d4dbfe153c6d786ed5c3ba6138fa1f8..60c079d8535528d6aa755b6d8fd488a13eaad560 100644 (file)
@@ -587,8 +587,7 @@ ecard_irq_handler(unsigned int irq, struct irq_desc *desc)
                        pending = ecard_default_ops.irqpending(ec);
 
                if (pending) {
-                       struct irq_desc *d = irq_desc + ec->irq;
-                       desc_handle_irq(ec->irq, d);
+                       generic_handle_irq(ec->irq);
                        called ++;
                }
        }
@@ -622,7 +621,6 @@ ecard_irqexp_handler(unsigned int irq, struct irq_desc *desc)
                ecard_t *ec = slot_to_ecard(slot);
 
                if (ec->claimed) {
-                       struct irq_desc *d = irq_desc + ec->irq;
                        /*
                         * this ugly code is so that we can operate a
                         * prioritorising system:
@@ -635,7 +633,7 @@ ecard_irqexp_handler(unsigned int irq, struct irq_desc *desc)
                         * Serial cards should go in 0/1, ethernet/scsi in 2/3
                         * otherwise you will lose serial data at high speeds!
                         */
-                       desc_handle_irq(ec->irq, d);
+                       generic_handle_irq(ec->irq);
                } else {
                        printk(KERN_WARNING "card%d: interrupt from unclaimed "
                               "card???\n", slot);
diff --git a/arch/arm/kernel/elf.c b/arch/arm/kernel/elf.c
new file mode 100644 (file)
index 0000000..513f332
--- /dev/null
@@ -0,0 +1,79 @@
+#include <linux/module.h>
+#include <linux/sched.h>
+#include <linux/personality.h>
+#include <linux/binfmts.h>
+#include <linux/elf.h>
+
+int elf_check_arch(const struct elf32_hdr *x)
+{
+       unsigned int eflags;
+
+       /* Make sure it's an ARM executable */
+       if (x->e_machine != EM_ARM)
+               return 0;
+
+       /* Make sure the entry address is reasonable */
+       if (x->e_entry & 1) {
+               if (!(elf_hwcap & HWCAP_THUMB))
+                       return 0;
+       } else if (x->e_entry & 3)
+               return 0;
+
+       eflags = x->e_flags;
+       if ((eflags & EF_ARM_EABI_MASK) == EF_ARM_EABI_UNKNOWN) {
+               /* APCS26 is only allowed if the CPU supports it */
+               if ((eflags & EF_ARM_APCS_26) && !(elf_hwcap & HWCAP_26BIT))
+                       return 0;
+
+               /* VFP requires the supporting code */
+               if ((eflags & EF_ARM_VFP_FLOAT) && !(elf_hwcap & HWCAP_VFP))
+                       return 0;
+       }
+       return 1;
+}
+EXPORT_SYMBOL(elf_check_arch);
+
+void elf_set_personality(const struct elf32_hdr *x)
+{
+       unsigned int eflags = x->e_flags;
+       unsigned int personality = PER_LINUX_32BIT;
+
+       /*
+        * APCS-26 is only valid for OABI executables
+        */
+       if ((eflags & EF_ARM_EABI_MASK) == EF_ARM_EABI_UNKNOWN) {
+               if (eflags & EF_ARM_APCS_26)
+                       personality = PER_LINUX;
+       }
+
+       set_personality(personality);
+
+       /*
+        * Since the FPA coprocessor uses CP1 and CP2, and iWMMXt uses CP0
+        * and CP1, we only enable access to the iWMMXt coprocessor if the
+        * binary is EABI or softfloat (and thus, guaranteed not to use
+        * FPA instructions.)
+        */
+       if (elf_hwcap & HWCAP_IWMMXT &&
+           eflags & (EF_ARM_EABI_MASK | EF_ARM_SOFT_FLOAT)) {
+               set_thread_flag(TIF_USING_IWMMXT);
+       } else {
+               clear_thread_flag(TIF_USING_IWMMXT);
+       }
+}
+EXPORT_SYMBOL(elf_set_personality);
+
+/*
+ * Set READ_IMPLIES_EXEC if:
+ *  - the binary requires an executable stack
+ *  - we're running on a CPU which doesn't support NX.
+ */
+int arm_elf_read_implies_exec(const struct elf32_hdr *x, int executable_stack)
+{
+       if (executable_stack != EXSTACK_ENABLE_X)
+               return 1;
+       if (cpu_architecture() <= CPU_ARCH_ARMv6)
+               return 1;
+       return 0;
+}
+EXPORT_SYMBOL(arm_elf_read_implies_exec);
index 617e509d60dfd1bdc148467d473e3c8596b2bb89..77b047475539b9683ef9671caf738adf8ad22a9a 100644 (file)
 __pabt_invalid:
        inv_entry BAD_PREFETCH
        b       common_invalid
+ENDPROC(__pabt_invalid)
 
 __dabt_invalid:
        inv_entry BAD_DATA
        b       common_invalid
+ENDPROC(__dabt_invalid)
 
 __irq_invalid:
        inv_entry BAD_IRQ
        b       common_invalid
+ENDPROC(__irq_invalid)
 
 __und_invalid:
        inv_entry BAD_UNDEFINSTR
@@ -107,6 +110,7 @@ common_invalid:
 
        mov     r0, sp
        b       bad_mode
+ENDPROC(__und_invalid)
 
 /*
  * SVC mode handlers
@@ -192,6 +196,7 @@ __dabt_svc:
        ldr     r0, [sp, #S_PSR]
        msr     spsr_cxsf, r0
        ldmia   sp, {r0 - pc}^                  @ load r0 - pc, cpsr
+ENDPROC(__dabt_svc)
 
        .align  5
 __irq_svc:
@@ -223,6 +228,7 @@ __irq_svc:
        bleq    trace_hardirqs_on
 #endif
        ldmia   sp, {r0 - pc}^                  @ load r0 - pc, cpsr
+ENDPROC(__irq_svc)
 
        .ltorg
 
@@ -272,6 +278,7 @@ __und_svc:
        ldr     lr, [sp, #S_PSR]                @ Get SVC cpsr
        msr     spsr_cxsf, lr
        ldmia   sp, {r0 - pc}^                  @ Restore SVC registers
+ENDPROC(__und_svc)
 
        .align  5
 __pabt_svc:
@@ -313,6 +320,7 @@ __pabt_svc:
        ldr     r0, [sp, #S_PSR]
        msr     spsr_cxsf, r0
        ldmia   sp, {r0 - pc}^                  @ load r0 - pc, cpsr
+ENDPROC(__pabt_svc)
 
        .align  5
 .LCcralign:
@@ -412,6 +420,7 @@ __dabt_usr:
        mov     r2, sp
        adr     lr, ret_from_exception
        b       do_DataAbort
+ENDPROC(__dabt_usr)
 
        .align  5
 __irq_usr:
@@ -441,6 +450,7 @@ __irq_usr:
 
        mov     why, #0
        b       ret_to_user
+ENDPROC(__irq_usr)
 
        .ltorg
 
@@ -474,6 +484,7 @@ __und_usr:
 #else
        b       __und_usr_unknown
 #endif
+ENDPROC(__und_usr)
 
        @
        @ fallthrough to call_fpe
@@ -642,6 +653,7 @@ __und_usr_unknown:
        mov     r0, sp
        adr     lr, ret_from_exception
        b       do_undefinstr
+ENDPROC(__und_usr_unknown)
 
        .align  5
 __pabt_usr:
@@ -666,6 +678,8 @@ ENTRY(ret_from_exception)
        get_thread_info tsk
        mov     why, #0
        b       ret_to_user
+ENDPROC(__pabt_usr)
+ENDPROC(ret_from_exception)
 
 /*
  * Register switch for ARMv3 and ARMv4 processors
@@ -702,6 +716,7 @@ ENTRY(__switch_to)
        bl      atomic_notifier_call_chain
        mov     r0, r5
        ldmia   r4, {r4 - sl, fp, sp, pc}       @ Load all regs saved previously
+ENDPROC(__switch_to)
 
        __INIT
 
@@ -1029,6 +1044,7 @@ vector_\name:
        mov     r0, sp
        ldr     lr, [pc, lr, lsl #2]
        movs    pc, lr                  @ branch to handler in SVC mode
+ENDPROC(vector_\name)
        .endm
 
        .globl  __stubs_start
index 060d7e2e9f6408c1aaf647af4eba7b5858a8aa31..3aa14dcc5babd0a1cec85996fa9bc271e4eae51a 100644 (file)
@@ -77,6 +77,7 @@ no_work_pending:
        mov     r0, r0
        add     sp, sp, #S_FRAME_SIZE - S_PC
        movs    pc, lr                          @ return & move spsr_svc into cpsr
+ENDPROC(ret_to_user)
 
 /*
  * This is how we return from a fork.
@@ -92,7 +93,7 @@ ENTRY(ret_from_fork)
        mov     r0, #1                          @ trace exit [IP = 1]
        bl      syscall_trace
        b       ret_slow_syscall
-       
+ENDPROC(ret_from_fork)
 
        .equ NR_syscalls,0
 #define CALL(x) .equ NR_syscalls,NR_syscalls+1
@@ -269,6 +270,7 @@ ENTRY(vector_swi)
        eor     r0, scno, #__NR_SYSCALL_BASE    @ put OS number back
        bcs     arm_syscall     
        b       sys_ni_syscall                  @ not private func
+ENDPROC(vector_swi)
 
        /*
         * This is the really slow path.  We're going to be doing
@@ -326,7 +328,6 @@ ENTRY(sys_call_table)
  */
 @ r0 = syscall number
 @ r8 = syscall table
-               .type   sys_syscall, #function
 sys_syscall:
                bic     scno, r0, #__NR_OABI_SYSCALL_BASE
                cmp     scno, #__NR_syscall - __NR_SYSCALL_BASE
@@ -338,53 +339,65 @@ sys_syscall:
                movlo   r3, r4
                ldrlo   pc, [tbl, scno, lsl #2]
                b       sys_ni_syscall
+ENDPROC(sys_syscall)
 
 sys_fork_wrapper:
                add     r0, sp, #S_OFF
                b       sys_fork
+ENDPROC(sys_fork_wrapper)
 
 sys_vfork_wrapper:
                add     r0, sp, #S_OFF
                b       sys_vfork
+ENDPROC(sys_vfork_wrapper)
 
 sys_execve_wrapper:
                add     r3, sp, #S_OFF
                b       sys_execve
+ENDPROC(sys_execve_wrapper)
 
 sys_clone_wrapper:
                add     ip, sp, #S_OFF
                str     ip, [sp, #4]
                b       sys_clone
+ENDPROC(sys_clone_wrapper)
 
 sys_sigsuspend_wrapper:
                add     r3, sp, #S_OFF
                b       sys_sigsuspend
+ENDPROC(sys_sigsuspend_wrapper)
 
 sys_rt_sigsuspend_wrapper:
                add     r2, sp, #S_OFF
                b       sys_rt_sigsuspend
+ENDPROC(sys_rt_sigsuspend_wrapper)
 
 sys_sigreturn_wrapper:
                add     r0, sp, #S_OFF
                b       sys_sigreturn
+ENDPROC(sys_sigreturn_wrapper)
 
 sys_rt_sigreturn_wrapper:
                add     r0, sp, #S_OFF
                b       sys_rt_sigreturn
+ENDPROC(sys_rt_sigreturn_wrapper)
 
 sys_sigaltstack_wrapper:
                ldr     r2, [sp, #S_OFF + S_SP]
                b       do_sigaltstack
+ENDPROC(sys_sigaltstack_wrapper)
 
 sys_statfs64_wrapper:
                teq     r1, #88
                moveq   r1, #84
                b       sys_statfs64
+ENDPROC(sys_statfs64_wrapper)
 
 sys_fstatfs64_wrapper:
                teq     r1, #88
                moveq   r1, #84
                b       sys_fstatfs64
+ENDPROC(sys_fstatfs64_wrapper)
 
 /*
  * Note: off_4k (r5) is always units of 4K.  If we can't do the requested
@@ -402,11 +415,14 @@ sys_mmap2:
                str     r5, [sp, #4]
                b       do_mmap2
 #endif
+ENDPROC(sys_mmap2)
 
 ENTRY(pabort_ifar)
                mrc     p15, 0, r0, cr6, cr0, 2
 ENTRY(pabort_noifar)
                mov     pc, lr
+ENDPROC(pabort_ifar)
+ENDPROC(pabort_noifar)
 
 #ifdef CONFIG_OABI_COMPAT
 
@@ -417,26 +433,31 @@ ENTRY(pabort_noifar)
 sys_oabi_pread64:
                stmia   sp, {r3, r4}
                b       sys_pread64
+ENDPROC(sys_oabi_pread64)
 
 sys_oabi_pwrite64:
                stmia   sp, {r3, r4}
                b       sys_pwrite64
+ENDPROC(sys_oabi_pwrite64)
 
 sys_oabi_truncate64:
                mov     r3, r2
                mov     r2, r1
                b       sys_truncate64
+ENDPROC(sys_oabi_truncate64)
 
 sys_oabi_ftruncate64:
                mov     r3, r2
                mov     r2, r1
                b       sys_ftruncate64
+ENDPROC(sys_oabi_ftruncate64)
 
 sys_oabi_readahead:
                str     r3, [sp]
                mov     r3, r2
                mov     r2, r1
                b       sys_readahead
+ENDPROC(sys_oabi_readahead)
 
 /*
  * Let's declare a second syscall table for old ABI binaries
index e8e90346f11c10702857a04adeb4fd2f935e1336..36f81d967979c0ce62b78912e7d6e3874d9fc06d 100644 (file)
@@ -45,7 +45,6 @@
 #include <asm/fiq.h>
 #include <asm/irq.h>
 #include <asm/system.h>
-#include <asm/uaccess.h>
 
 static unsigned long no_fiq_insn;
 
index 1c3c6ea5f9e7e3bb7b7ce5a880a039489200d200..bde52df1c668e994c3d8c4d6c53ff01f01cacad3 100644 (file)
@@ -36,7 +36,6 @@ __switch_data:
  *  r2  = atags pointer
  *  r9  = processor ID
  */
-       .type   __mmap_switched, %function
 __mmap_switched:
        adr     r3, __switch_data + 4
 
@@ -59,6 +58,7 @@ __mmap_switched:
        bic     r4, r0, #CR_A                   @ Clear 'A' bit
        stmia   r7, {r0, r4}                    @ Save control register values
        b       start_kernel
+ENDPROC(__mmap_switched)
 
 /*
  * Exception handling.  Something went wrong and we can't proceed.  We
@@ -69,8 +69,6 @@ __mmap_switched:
  * and hope for the best (useful if bootloader fails to pass a proper
  * machine ID for example).
  */
-
-       .type   __error_p, %function
 __error_p:
 #ifdef CONFIG_DEBUG_LL
        adr     r0, str_p1
@@ -84,8 +82,8 @@ str_p1:       .asciz  "\nError: unrecognized/unsupported processor variant (0x"
 str_p2:        .asciz  ").\n"
        .align
 #endif
+ENDPROC(__error_p)
 
-       .type   __error_a, %function
 __error_a:
 #ifdef CONFIG_DEBUG_LL
        mov     r4, r1                          @ preserve machine ID
@@ -115,13 +113,14 @@ __error_a:
        adr     r0, str_a3
        bl      printascii
        b       __error
+ENDPROC(__error_a)
+
 str_a1:        .asciz  "\nError: unrecognized/unsupported machine ID (r1 = 0x"
 str_a2:        .asciz  ").\n\nAvailable machine support:\n\nID (hex)\tNAME\n"
 str_a3:        .asciz  "\nPlease check your kernel config and/or bootloader.\n"
        .align
 #endif
 
-       .type   __error, %function
 __error:
 #ifdef CONFIG_ARCH_RPC
 /*
@@ -138,6 +137,7 @@ __error:
 #endif
 1:     mov     r0, r0
        b       1b
+ENDPROC(__error)
 
 
 /*
@@ -153,7 +153,6 @@ __error:
  *     r5 = proc_info pointer in physical address space
  *     r9 = cpuid (preserved)
  */
-       .type   __lookup_processor_type, %function
 __lookup_processor_type:
        adr     r3, 3f
        ldmda   r3, {r5 - r7}
@@ -169,6 +168,7 @@ __lookup_processor_type:
        blo     1b
        mov     r5, #0                          @ unknown processor
 2:     mov     pc, lr
+ENDPROC(__lookup_processor_type)
 
 /*
  * This provides a C-API version of the above function.
@@ -179,6 +179,7 @@ ENTRY(lookup_processor_type)
        bl      __lookup_processor_type
        mov     r0, r5
        ldmfd   sp!, {r4 - r7, r9, pc}
+ENDPROC(lookup_processor_type)
 
 /*
  * Look in <asm/procinfo.h> and arch/arm/kernel/arch.[ch] for
@@ -201,7 +202,6 @@ ENTRY(lookup_processor_type)
  *  r3, r4, r6 corrupted
  *  r5 = mach_info pointer in physical address space
  */
-       .type   __lookup_machine_type, %function
 __lookup_machine_type:
        adr     r3, 3b
        ldmia   r3, {r4, r5, r6}
@@ -216,6 +216,7 @@ __lookup_machine_type:
        blo     1b
        mov     r5, #0                          @ unknown machine
 2:     mov     pc, lr
+ENDPROC(__lookup_machine_type)
 
 /*
  * This provides a C-API version of the above function.
@@ -226,6 +227,7 @@ ENTRY(lookup_machine_type)
        bl      __lookup_machine_type
        mov     r0, r5
        ldmfd   sp!, {r4 - r6, pc}
+ENDPROC(lookup_machine_type)
 
 /* Determine validity of the r2 atags pointer.  The heuristic requires
  * that the pointer be aligned, in the first 16k of physical RAM and
@@ -239,8 +241,6 @@ ENTRY(lookup_machine_type)
  *  r2 either valid atags pointer, or zero
  *  r5, r6 corrupted
  */
-
-       .type   __vet_atags, %function
 __vet_atags:
        tst     r2, #0x3                        @ aligned?
        bne     1f
@@ -257,3 +257,4 @@ __vet_atags:
 
 1:     mov     r2, #0
        mov     pc, lr
+ENDPROC(__vet_atags)
index 27329bd32037a714070535ae1677e30271881ee1..cc87e1765ed24183f9e77d6ce2172d3828e5996b 100644 (file)
@@ -33,7 +33,6 @@
  *
  */
        .section ".text.head", "ax"
-       .type   stext, %function
 ENTRY(stext)
        msr     cpsr_c, #PSR_F_BIT | PSR_I_BIT | SVC_MODE @ ensure svc mode
                                                @ and irqs disabled
@@ -53,11 +52,11 @@ ENTRY(stext)
                                                @ the initialization is done
        adr     lr, __after_proc_init           @ return (PIC) address
        add     pc, r10, #PROCINFO_INITFUNC
+ENDPROC(stext)
 
 /*
  * Set the Control Register and Read the process ID.
  */
-       .type   __after_proc_init, %function
 __after_proc_init:
 #ifdef CONFIG_CPU_CP15
        mrc     p15, 0, r0, c1, c0, 0           @ read control reg
@@ -85,6 +84,7 @@ __after_proc_init:
 
        mov     pc, r13                         @ clear the BSS and jump
                                                @ to start_kernel
+ENDPROC(__after_proc_init)
        .ltorg
 
 #include "head-common.S"
index bff4c6e90dd5458f1f71d2d70a5703ea394017c5..21e17dc94cb56757f6f25f05b61ba4c2d6e095ca 100644 (file)
@@ -75,7 +75,6 @@
  * circumstances, zImage) is for.
  */
        .section ".text.head", "ax"
-       .type   stext, %function
 ENTRY(stext)
        msr     cpsr_c, #PSR_F_BIT | PSR_I_BIT | SVC_MODE @ ensure svc mode
                                                @ and irqs disabled
@@ -100,9 +99,9 @@ ENTRY(stext)
                                                @ mmu has been enabled
        adr     lr, __enable_mmu                @ return (PIC) address
        add     pc, r10, #PROCINFO_INITFUNC
+ENDPROC(stext)
 
 #if defined(CONFIG_SMP)
-       .type   secondary_startup, #function
 ENTRY(secondary_startup)
        /*
         * Common entry point for secondary CPUs.
@@ -128,6 +127,7 @@ ENTRY(secondary_startup)
        adr     lr, __enable_mmu                @ return address
        add     pc, r10, #PROCINFO_INITFUNC     @ initialise processor
                                                @ (return control reg)
+ENDPROC(secondary_startup)
 
        /*
         * r6  = &secondary_data
@@ -136,6 +136,7 @@ ENTRY(__secondary_switched)
        ldr     sp, [r7, #4]                    @ get secondary_data.stack
        mov     fp, #0
        b       secondary_start_kernel
+ENDPROC(__secondary_switched)
 
        .type   __secondary_data, %object
 __secondary_data:
@@ -151,7 +152,6 @@ __secondary_data:
  * this is just loading the page table pointer and domain access
  * registers.
  */
-       .type   __enable_mmu, %function
 __enable_mmu:
 #ifdef CONFIG_ALIGNMENT_TRAP
        orr     r0, r0, #CR_A
@@ -174,6 +174,7 @@ __enable_mmu:
        mcr     p15, 0, r5, c3, c0, 0           @ load domain access register
        mcr     p15, 0, r4, c2, c0, 0           @ load page table pointer
        b       __turn_mmu_on
+ENDPROC(__enable_mmu)
 
 /*
  * Enable the MMU.  This completely changes the structure of the visible
@@ -187,7 +188,6 @@ __enable_mmu:
  * other registers depend on the function called upon completion
  */
        .align  5
-       .type   __turn_mmu_on, %function
 __turn_mmu_on:
        mov     r0, r0
        mcr     p15, 0, r0, c1, c0, 0           @ write control reg
@@ -195,7 +195,7 @@ __turn_mmu_on:
        mov     r3, r3
        mov     r3, r3
        mov     pc, r13
-
+ENDPROC(__turn_mmu_on)
 
 
 /*
@@ -211,7 +211,6 @@ __turn_mmu_on:
  *  r0, r3, r6, r7 corrupted
  *  r4 = physical page table address
  */
-       .type   __create_page_tables, %function
 __create_page_tables:
        pgtbl   r4                              @ page table address
 
@@ -325,6 +324,7 @@ __create_page_tables:
 #endif
 #endif
        mov     pc, lr
+ENDPROC(__create_page_tables)
        .ltorg
 
 #include "head-common.S"
index 8b8c9d38a7611daaad9ddd2af7de18ec2176e374..0bbf806253954c1ac42c9f8fd634f1b7e5cfe63c 100644 (file)
@@ -8,8 +8,8 @@
 #include <linux/init.h>
 #include <linux/init_task.h>
 #include <linux/mqueue.h>
+#include <linux/uaccess.h>
 
-#include <asm/uaccess.h>
 #include <asm/pgtable.h>
 
 static struct fs_struct init_fs = INIT_FS;
index 1f6822dfae7404fd57218537f1d67e1252351ffe..f4470307edb8f4a9a3327e700d620de1f9124616 100644 (file)
@@ -1,7 +1,6 @@
 #include <linux/module.h>
 #include <linux/types.h>
-
-#include <asm/io.h>
+#include <linux/io.h>
 
 /*
  * Copy data from IO memory space to "real" memory space.
index f88efb135b702b2e4e9610dd9df490331df71c5c..2f3eb795fa6e99a4fd1cde9911ab99070f233aad 100644 (file)
@@ -112,18 +112,17 @@ static struct irq_desc bad_irq_desc = {
 asmlinkage void __exception asm_do_IRQ(unsigned int irq, struct pt_regs *regs)
 {
        struct pt_regs *old_regs = set_irq_regs(regs);
-       struct irq_desc *desc = irq_desc + irq;
+
+       irq_enter();
 
        /*
         * Some hardware gives randomly wrong interrupts.  Rather
         * than crashing, do something sensible.
         */
        if (irq >= NR_IRQS)
-               desc = &bad_irq_desc;
-
-       irq_enter();
-
-       desc_handle_irq(irq, desc);
+               handle_bad_irq(irq, &bad_irq_desc);
+       else
+               generic_handle_irq(irq);
 
        /* AT91 specific workaround */
        irq_finish(irq);
index b4565bb133c1ebeadd6c3a8d3b3a1afdd9015a7e..da1f94906a4e2a35881bde99510760180bdba9e2 100644 (file)
@@ -488,7 +488,7 @@ static void __kprobes simulate_ldm1stm1(struct kprobe *p, struct pt_regs *regs)
 
        if (!ubit)
                addr -= reg_count;
-       addr += (!pbit ^ !ubit);
+       addr += (!pbit == !ubit);
 
        reg_bit_vector = insn & 0xffff;
        while (reg_bit_vector) {
@@ -503,7 +503,7 @@ static void __kprobes simulate_ldm1stm1(struct kprobe *p, struct pt_regs *regs)
        if (wbit) {
                if (!ubit)
                        addr -= reg_count;
-               addr -= (!pbit ^ !ubit);
+               addr -= (!pbit == !ubit);
                regs->uregs[rn] = (long)addr;
        }
 }
index d28513f14d05906cec08a849128f76edaaf5ad16..3f9abe0e9aff7e124fd399ce4fd9c4a47380c044 100644 (file)
@@ -200,9 +200,12 @@ void __kprobes kprobe_handler(struct pt_regs *regs)
        }
 }
 
-int kprobe_trap_handler(struct pt_regs *regs, unsigned int instr)
+static int __kprobes kprobe_trap_handler(struct pt_regs *regs, unsigned int instr)
 {
+       unsigned long flags;
+       local_irq_save(flags);
        kprobe_handler(regs);
+       local_irq_restore(flags);
        return 0;
 }
 
index fae5beb3c3d607086c4cffa48b34e825bc9a5664..440dc62cdc3a137ef0cdf554918c7a348d63511d 100644 (file)
@@ -6,10 +6,10 @@
 #include <linux/kexec.h>
 #include <linux/delay.h>
 #include <linux/reboot.h>
+#include <linux/io.h>
 #include <asm/pgtable.h>
 #include <asm/pgalloc.h>
 #include <asm/mmu_context.h>
-#include <asm/io.h>
 #include <asm/cacheflush.h>
 #include <asm/mach-types.h>
 
index a68259a0cccdb54ac3dd06cb3e5248b9b0904cd8..9203ba7d58eeaf7ce2ce05d8975c5bc9d3bd0793 100644 (file)
@@ -47,7 +47,7 @@ void *module_alloc(unsigned long size)
        if (!area)
                return NULL;
 
-       return __vmalloc_area(area, GFP_KERNEL, PAGE_KERNEL);
+       return __vmalloc_area(area, GFP_KERNEL, PAGE_KERNEL_EXEC);
 }
 #else /* CONFIG_MMU */
 void *module_alloc(unsigned long size)
index 3fd88233706413d09198bb6a69780415a9b5eb5e..d3ea6fa895212fae625b2c5982ededbd896340fc 100644 (file)
 #include <linux/pm.h>
 #include <linux/tick.h>
 #include <linux/utsname.h>
+#include <linux/uaccess.h>
 
 #include <asm/leds.h>
 #include <asm/processor.h>
 #include <asm/system.h>
 #include <asm/thread_notify.h>
-#include <asm/uaccess.h>
 #include <asm/mach/time.h>
 
 static const char *processor_modes[] = {
@@ -267,35 +267,6 @@ void show_regs(struct pt_regs * regs)
        __backtrace();
 }
 
-void show_fpregs(struct user_fp *regs)
-{
-       int i;
-
-       for (i = 0; i < 8; i++) {
-               unsigned long *p;
-               char type;
-
-               p = (unsigned long *)(regs->fpregs + i);
-
-               switch (regs->ftype[i]) {
-                       case 1: type = 'f'; break;
-                       case 2: type = 'd'; break;
-                       case 3: type = 'e'; break;
-                       default: type = '?'; break;
-               }
-               if (regs->init_flag)
-                       type = '?';
-
-               printk("  f%d(%c): %08lx %08lx %08lx%c",
-                       i, type, p[0], p[1], p[2], i & 1 ? '\n' : ' ');
-       }
-                       
-
-       printk("FPSR: %08lx FPCR: %08lx\n",
-               (unsigned long)regs->fpsr,
-               (unsigned long)regs->fpcr);
-}
-
 /*
  * Free current thread data structures etc..
  */
@@ -414,7 +385,7 @@ unsigned long get_wchan(struct task_struct *p)
        do {
                if (fp < stack_start || fp > stack_end)
                        return 0;
-               lr = pc_pointer (((unsigned long *)fp)[-1]);
+               lr = ((unsigned long *)fp)[-1];
                if (!in_sched_functions(lr))
                        return lr;
                fp = *(unsigned long *) (fp - 12);
index 4b05dc5c1023666ce6efaa1c684776de98587875..df653ea59250a3152a5e16f4634d10e93251a9dd 100644 (file)
@@ -18,8 +18,8 @@
 #include <linux/security.h>
 #include <linux/init.h>
 #include <linux/signal.h>
+#include <linux/uaccess.h>
 
-#include <asm/uaccess.h>
 #include <asm/pgtable.h>
 #include <asm/system.h>
 #include <asm/traps.h>
@@ -126,7 +126,7 @@ ptrace_getrn(struct task_struct *child, unsigned long insn)
 
        val = get_user_reg(child, reg);
        if (reg == 15)
-               val = pc_pointer(val + 8);
+               val += 8;
 
        return val;
 }
@@ -278,8 +278,7 @@ get_branch_address(struct task_struct *child, unsigned long pc, unsigned long in
                                else
                                        base -= aluop2;
                        }
-                       if (read_u32(child, base, &alt) == 0)
-                               alt = pc_pointer(alt);
+                       read_u32(child, base, &alt);
                }
                break;
 
@@ -305,8 +304,7 @@ get_branch_address(struct task_struct *child, unsigned long pc, unsigned long in
 
                        base = ptrace_getrn(child, insn);
 
-                       if (read_u32(child, base + nr_regs, &alt) == 0)
-                               alt = pc_pointer(alt);
+                       read_u32(child, base + nr_regs, &alt);
                        break;
                }
                break;
index 2ca7038b67a7bf105df3529491e0f9858220ca76..1f1eecca7f55a4ef2ff3b502c360309da00d3010 100644 (file)
 #include <linux/fs.h>
 
 #include <asm/cpu.h>
+#include <asm/cputype.h>
 #include <asm/elf.h>
 #include <asm/procinfo.h>
 #include <asm/setup.h>
 #include <asm/mach-types.h>
 #include <asm/cacheflush.h>
+#include <asm/cachetype.h>
 #include <asm/tlbflush.h>
 
 #include <asm/mach/arch.h>
@@ -59,13 +61,14 @@ __setup("fpe=", fpe_setup);
 
 extern void paging_init(struct meminfo *, struct machine_desc *desc);
 extern void reboot_setup(char *str);
-extern int root_mountflags;
-extern void _stext, _text, _etext, __data_start, _edata, _end;
+extern void _text, _etext, __data_start, _edata, _end;
 
 unsigned int processor_id;
 EXPORT_SYMBOL(processor_id);
 unsigned int __machine_arch_type;
 EXPORT_SYMBOL(__machine_arch_type);
+unsigned int cacheid;
+EXPORT_SYMBOL(cacheid);
 
 unsigned int __atags_pointer __initdata;
 
@@ -81,8 +84,6 @@ EXPORT_SYMBOL(system_serial_high);
 unsigned int elf_hwcap;
 EXPORT_SYMBOL(elf_hwcap);
 
-unsigned long __initdata vmalloc_reserve = 128 << 20;
-
 
 #ifdef MULTI_CPU
 struct processor processor;
@@ -111,9 +112,6 @@ static struct stack stacks[NR_CPUS];
 char elf_platform[ELF_PLATFORM_SIZE];
 EXPORT_SYMBOL(elf_platform);
 
-unsigned long phys_initrd_start __initdata = 0;
-unsigned long phys_initrd_size __initdata = 0;
-
 static struct meminfo meminfo __initdata = { 0, };
 static const char *cpu_name;
 static const char *machine_name;
@@ -178,63 +176,6 @@ static struct resource io_res[] = {
 #define lp1 io_res[1]
 #define lp2 io_res[2]
 
-static const char *cache_types[16] = {
-       "write-through",
-       "write-back",
-       "write-back",
-       "undefined 3",
-       "undefined 4",
-       "undefined 5",
-       "write-back",
-       "write-back",
-       "undefined 8",
-       "undefined 9",
-       "undefined 10",
-       "undefined 11",
-       "undefined 12",
-       "undefined 13",
-       "write-back",
-       "undefined 15",
-};
-
-static const char *cache_clean[16] = {
-       "not required",
-       "read-block",
-       "cp15 c7 ops",
-       "undefined 3",
-       "undefined 4",
-       "undefined 5",
-       "cp15 c7 ops",
-       "cp15 c7 ops",
-       "undefined 8",
-       "undefined 9",
-       "undefined 10",
-       "undefined 11",
-       "undefined 12",
-       "undefined 13",
-       "cp15 c7 ops",
-       "undefined 15",
-};
-
-static const char *cache_lockdown[16] = {
-       "not supported",
-       "not supported",
-       "not supported",
-       "undefined 3",
-       "undefined 4",
-       "undefined 5",
-       "format A",
-       "format B",
-       "undefined 8",
-       "undefined 9",
-       "undefined 10",
-       "undefined 11",
-       "undefined 12",
-       "undefined 13",
-       "format C",
-       "undefined 15",
-};
-
 static const char *proc_arch[] = {
        "undefined/unknown",
        "3",
@@ -255,61 +196,19 @@ static const char *proc_arch[] = {
        "?(17)",
 };
 
-#define CACHE_TYPE(x)  (((x) >> 25) & 15)
-#define CACHE_S(x)     ((x) & (1 << 24))
-#define CACHE_DSIZE(x) (((x) >> 12) & 4095)    /* only if S=1 */
-#define CACHE_ISIZE(x) ((x) & 4095)
-
-#define CACHE_SIZE(y)  (((y) >> 6) & 7)
-#define CACHE_ASSOC(y) (((y) >> 3) & 7)
-#define CACHE_M(y)     ((y) & (1 << 2))
-#define CACHE_LINE(y)  ((y) & 3)
-
-static inline void dump_cache(const char *prefix, int cpu, unsigned int cache)
-{
-       unsigned int mult = 2 + (CACHE_M(cache) ? 1 : 0);
-
-       printk("CPU%u: %s: %d bytes, associativity %d, %d byte lines, %d sets\n",
-               cpu, prefix,
-               mult << (8 + CACHE_SIZE(cache)),
-               (mult << CACHE_ASSOC(cache)) >> 1,
-               8 << CACHE_LINE(cache),
-               1 << (6 + CACHE_SIZE(cache) - CACHE_ASSOC(cache) -
-                       CACHE_LINE(cache)));
-}
-
-static void __init dump_cpu_info(int cpu)
-{
-       unsigned int info = read_cpuid(CPUID_CACHETYPE);
-
-       if (info != processor_id) {
-               printk("CPU%u: D %s %s cache\n", cpu, cache_is_vivt() ? "VIVT" : "VIPT",
-                      cache_types[CACHE_TYPE(info)]);
-               if (CACHE_S(info)) {
-                       dump_cache("I cache", cpu, CACHE_ISIZE(info));
-                       dump_cache("D cache", cpu, CACHE_DSIZE(info));
-               } else {
-                       dump_cache("cache", cpu, CACHE_ISIZE(info));
-               }
-       }
-
-       if (arch_is_coherent())
-               printk("Cache coherency enabled\n");
-}
-
 int cpu_architecture(void)
 {
        int cpu_arch;
 
-       if ((processor_id & 0x0008f000) == 0) {
+       if ((read_cpuid_id() & 0x0008f000) == 0) {
                cpu_arch = CPU_ARCH_UNKNOWN;
-       } else if ((processor_id & 0x0008f000) == 0x00007000) {
-               cpu_arch = (processor_id & (1 << 23)) ? CPU_ARCH_ARMv4T : CPU_ARCH_ARMv3;
-       } else if ((processor_id & 0x00080000) == 0x00000000) {
-               cpu_arch = (processor_id >> 16) & 7;
+       } else if ((read_cpuid_id() & 0x0008f000) == 0x00007000) {
+               cpu_arch = (read_cpuid_id() & (1 << 23)) ? CPU_ARCH_ARMv4T : CPU_ARCH_ARMv3;
+       } else if ((read_cpuid_id() & 0x00080000) == 0x00000000) {
+               cpu_arch = (read_cpuid_id() >> 16) & 7;
                if (cpu_arch)
                        cpu_arch += CPU_ARCH_ARMv3;
-       } else if ((processor_id & 0x000f0000) == 0x000f0000) {
+       } else if ((read_cpuid_id() & 0x000f0000) == 0x000f0000) {
                unsigned int mmfr0;
 
                /* Revised CPUID format. Read the Memory Model Feature
@@ -330,6 +229,34 @@ int cpu_architecture(void)
        return cpu_arch;
 }
 
+static void __init cacheid_init(void)
+{
+       unsigned int cachetype = read_cpuid_cachetype();
+       unsigned int arch = cpu_architecture();
+
+       if (arch >= CPU_ARCH_ARMv7) {
+               cacheid = CACHEID_VIPT_NONALIASING;
+               if ((cachetype & (3 << 14)) == 1 << 14)
+                       cacheid |= CACHEID_ASID_TAGGED;
+       } else if (arch >= CPU_ARCH_ARMv6) {
+               if (cachetype & (1 << 23))
+                       cacheid = CACHEID_VIPT_ALIASING;
+               else
+                       cacheid = CACHEID_VIPT_NONALIASING;
+       } else {
+               cacheid = CACHEID_VIVT;
+       }
+
+       printk("CPU: %s data cache, %s instruction cache\n",
+               cache_is_vivt() ? "VIVT" :
+               cache_is_vipt_aliasing() ? "VIPT aliasing" :
+               cache_is_vipt_nonaliasing() ? "VIPT nonaliasing" : "unknown",
+               cache_is_vivt() ? "VIVT" :
+               icache_is_vivt_asid_tagged() ? "VIVT ASID tagged" :
+               cache_is_vipt_aliasing() ? "VIPT aliasing" :
+               cache_is_vipt_nonaliasing() ? "VIPT nonaliasing" : "unknown");
+}
+
 /*
  * These functions re-use the assembly code in head.S, which
  * already provide the required functionality.
@@ -346,10 +273,10 @@ static void __init setup_processor(void)
         * types.  The linker builds this table for us from the
         * entries in arch/arm/mm/proc-*.S
         */
-       list = lookup_processor_type(processor_id);
+       list = lookup_processor_type(read_cpuid_id());
        if (!list) {
                printk("CPU configuration botched (ID %08x), unable "
-                      "to continue.\n", processor_id);
+                      "to continue.\n", read_cpuid_id());
                while (1);
        }
 
@@ -369,7 +296,7 @@ static void __init setup_processor(void)
 #endif
 
        printk("CPU: %s [%08x] revision %d (ARMv%s), cr=%08lx\n",
-              cpu_name, processor_id, (int)processor_id & 15,
+              cpu_name, read_cpuid_id(), read_cpuid_id() & 15,
               proc_arch[cpu_architecture()], cr_alignment);
 
        sprintf(init_utsname()->machine, "%s%c", list->arch_name, ENDIANNESS);
@@ -379,14 +306,14 @@ static void __init setup_processor(void)
        elf_hwcap &= ~HWCAP_THUMB;
 #endif
 
+       cacheid_init();
        cpu_proc_init();
 }
 
 /*
  * cpu_init - initialise one CPU.
  *
- * cpu_init dumps the cache information, initialises SMP specific
- * information, and sets up the per-CPU stacks.
+ * cpu_init sets up the per-CPU stacks.
  */
 void cpu_init(void)
 {
@@ -398,9 +325,6 @@ void cpu_init(void)
                BUG();
        }
 
-       if (system_state == SYSTEM_BOOTING)
-               dump_cpu_info(cpu);
-
        /*
         * setup stacks for re-entrant exception handlers
         */
@@ -443,20 +367,6 @@ static struct machine_desc * __init setup_machine(unsigned int nr)
        return list;
 }
 
-static void __init early_initrd(char **p)
-{
-       unsigned long start, size;
-
-       start = memparse(*p, p);
-       if (**p == ',') {
-               size = memparse((*p) + 1, p);
-
-               phys_initrd_start = start;
-               phys_initrd_size = size;
-       }
-}
-__early_param("initrd=", early_initrd);
-
 static void __init arm_add_memory(unsigned long start, unsigned long size)
 {
        struct membank *bank;
@@ -502,17 +412,6 @@ static void __init early_mem(char **p)
 }
 __early_param("mem=", early_mem);
 
-/*
- * vmalloc=size forces the vmalloc area to be exactly 'size'
- * bytes. This can be used to increase (or decrease) the vmalloc
- * area - the default is 128m.
- */
-static void __init early_vmalloc(char **arg)
-{
-       vmalloc_reserve = memparse(*arg, arg);
-}
-__early_param("vmalloc=", early_vmalloc);
-
 /*
  * Initial parsing of the command line.
  */
@@ -527,12 +426,12 @@ static void __init parse_cmdline(char **cmdline_p, char *from)
                        struct early_params *p;
 
                        for (p = &__early_begin; p < &__early_end; p++) {
-                               int len = strlen(p->arg);
+                               int arglen = strlen(p->arg);
 
-                               if (memcmp(from, p->arg, len) == 0) {
+                               if (memcmp(from, p->arg, arglen) == 0) {
                                        if (to != command_line)
                                                to -= 1;
-                                       from += len;
+                                       from += arglen;
                                        p->fn(&from);
 
                                        while (*from != ' ' && *from != '\0')
@@ -579,18 +478,13 @@ request_standard_resources(struct meminfo *mi, struct machine_desc *mdesc)
        kernel_data.end     = virt_to_phys(&_end - 1);
 
        for (i = 0; i < mi->nr_banks; i++) {
-               unsigned long virt_start, virt_end;
-
                if (mi->bank[i].size == 0)
                        continue;
 
-               virt_start = __phys_to_virt(mi->bank[i].start);
-               virt_end   = virt_start + mi->bank[i].size - 1;
-
                res = alloc_bootmem_low(sizeof(*res));
                res->name  = "System RAM";
-               res->start = __virt_to_phys(virt_start);
-               res->end   = __virt_to_phys(virt_end);
+               res->start = mi->bank[i].start;
+               res->end   = mi->bank[i].start + mi->bank[i].size - 1;
                res->flags = IORESOURCE_MEM | IORESOURCE_BUSY;
 
                request_resource(&iomem_resource, res);
@@ -694,26 +588,6 @@ static int __init parse_tag_ramdisk(const struct tag *tag)
 
 __tagtable(ATAG_RAMDISK, parse_tag_ramdisk);
 
-static int __init parse_tag_initrd(const struct tag *tag)
-{
-       printk(KERN_WARNING "ATAG_INITRD is deprecated; "
-               "please update your bootloader.\n");
-       phys_initrd_start = __virt_to_phys(tag->u.initrd.start);
-       phys_initrd_size = tag->u.initrd.size;
-       return 0;
-}
-
-__tagtable(ATAG_INITRD, parse_tag_initrd);
-
-static int __init parse_tag_initrd2(const struct tag *tag)
-{
-       phys_initrd_start = tag->u.initrd.start;
-       phys_initrd_size = tag->u.initrd.size;
-       return 0;
-}
-
-__tagtable(ATAG_INITRD2, parse_tag_initrd2);
-
 static int __init parse_tag_serialnr(const struct tag *tag)
 {
        system_serial_low = tag->u.serialnr.low;
@@ -901,28 +775,12 @@ static const char *hwcap_str[] = {
        NULL
 };
 
-static void
-c_show_cache(struct seq_file *m, const char *type, unsigned int cache)
-{
-       unsigned int mult = 2 + (CACHE_M(cache) ? 1 : 0);
-
-       seq_printf(m, "%s size\t\t: %d\n"
-                     "%s assoc\t\t: %d\n"
-                     "%s line length\t: %d\n"
-                     "%s sets\t\t: %d\n",
-               type, mult << (8 + CACHE_SIZE(cache)),
-               type, (mult << CACHE_ASSOC(cache)) >> 1,
-               type, 8 << CACHE_LINE(cache),
-               type, 1 << (6 + CACHE_SIZE(cache) - CACHE_ASSOC(cache) -
-                           CACHE_LINE(cache)));
-}
-
 static int c_show(struct seq_file *m, void *v)
 {
        int i;
 
        seq_printf(m, "Processor\t: %s rev %d (%s)\n",
-                  cpu_name, (int)processor_id & 15, elf_platform);
+                  cpu_name, read_cpuid_id() & 15, elf_platform);
 
 #if defined(CONFIG_SMP)
        for_each_online_cpu(i) {
@@ -949,47 +807,26 @@ static int c_show(struct seq_file *m, void *v)
                if (elf_hwcap & (1 << i))
                        seq_printf(m, "%s ", hwcap_str[i]);
 
-       seq_printf(m, "\nCPU implementer\t: 0x%02x\n", processor_id >> 24);
+       seq_printf(m, "\nCPU implementer\t: 0x%02x\n", read_cpuid_id() >> 24);
        seq_printf(m, "CPU architecture: %s\n", proc_arch[cpu_architecture()]);
 
-       if ((processor_id & 0x0008f000) == 0x00000000) {
+       if ((read_cpuid_id() & 0x0008f000) == 0x00000000) {
                /* pre-ARM7 */
-               seq_printf(m, "CPU part\t: %07x\n", processor_id >> 4);
+               seq_printf(m, "CPU part\t: %07x\n", read_cpuid_id() >> 4);
        } else {
-               if ((processor_id & 0x0008f000) == 0x00007000) {
+               if ((read_cpuid_id() & 0x0008f000) == 0x00007000) {
                        /* ARM7 */
                        seq_printf(m, "CPU variant\t: 0x%02x\n",
-                                  (processor_id >> 16) & 127);
+                                  (read_cpuid_id() >> 16) & 127);
                } else {
                        /* post-ARM7 */
                        seq_printf(m, "CPU variant\t: 0x%x\n",
-                                  (processor_id >> 20) & 15);
+                                  (read_cpuid_id() >> 20) & 15);
                }
                seq_printf(m, "CPU part\t: 0x%03x\n",
-                          (processor_id >> 4) & 0xfff);
-       }
-       seq_printf(m, "CPU revision\t: %d\n", processor_id & 15);
-
-       {
-               unsigned int cache_info = read_cpuid(CPUID_CACHETYPE);
-               if (cache_info != processor_id) {
-                       seq_printf(m, "Cache type\t: %s\n"
-                                     "Cache clean\t: %s\n"
-                                     "Cache lockdown\t: %s\n"
-                                     "Cache format\t: %s\n",
-                                  cache_types[CACHE_TYPE(cache_info)],
-                                  cache_clean[CACHE_TYPE(cache_info)],
-                                  cache_lockdown[CACHE_TYPE(cache_info)],
-                                  CACHE_S(cache_info) ? "Harvard" : "Unified");
-
-                       if (CACHE_S(cache_info)) {
-                               c_show_cache(m, "I", CACHE_ISIZE(cache_info));
-                               c_show_cache(m, "D", CACHE_DSIZE(cache_info));
-                       } else {
-                               c_show_cache(m, "Cache", CACHE_ISIZE(cache_info));
-                       }
-               }
+                          (read_cpuid_id() >> 4) & 0xfff);
        }
+       seq_printf(m, "CPU revision\t: %d\n", read_cpuid_id() & 15);
 
        seq_puts(m, "\n");
 
index ef2f86a5e78a2965e0de4c9b9815c23a8e0baf63..80b8b5c7e07a1a472b1b18458c41d32412e642e6 100644 (file)
 #include <linux/signal.h>
 #include <linux/personality.h>
 #include <linux/freezer.h>
+#include <linux/uaccess.h>
 
 #include <asm/elf.h>
 #include <asm/cacheflush.h>
 #include <asm/ucontext.h>
-#include <asm/uaccess.h>
 #include <asm/unistd.h>
 
 #include "ptrace.h"
index 0128687ba0f71ac8c65598a108bc6278f6e60c68..b3ec641b5cf8a1b8cf7cce2d932315e42235e03d 100644 (file)
@@ -27,8 +27,7 @@
 #include <linux/file.h>
 #include <linux/utsname.h>
 #include <linux/ipc.h>
-
-#include <asm/uaccess.h>
+#include <linux/uaccess.h>
 
 extern unsigned long do_mremap(unsigned long addr, unsigned long old_len,
                               unsigned long new_len, unsigned long flags,
index 96ab5f52949c99d145aea4be30f077e5ea34ef9f..42623db7f8706ae1528ec666976685b15764845c 100644 (file)
@@ -82,7 +82,7 @@
 #include <linux/socket.h>
 #include <linux/net.h>
 #include <linux/ipc.h>
-#include <asm/uaccess.h>
+#include <linux/uaccess.h>
 
 struct oldabi_stat64 {
        unsigned long long st_dev;
index 368d171754cf309acfabb1714f4b4dd915790086..c68b44aa88d27247a8e78685349e3535d96c21c7 100644 (file)
@@ -59,7 +59,7 @@ unsigned long profile_pc(struct pt_regs *regs)
 
        if (in_lock_functions(pc)) {
                fp = regs->ARM_fp;
-               pc = pc_pointer(((unsigned long *)fp)[-1]);
+               pc = ((unsigned long *)fp)[-1];
        }
 
        return pc;
index 872f1f8fbb57841c08a5f4755599c8e761081d64..57e6874d0b809a21a27afe21d436fa8dca9046e9 100644 (file)
 #include <linux/kallsyms.h>
 #include <linux/delay.h>
 #include <linux/init.h>
-#include <linux/kprobes.h>
+#include <linux/uaccess.h>
 
 #include <asm/atomic.h>
 #include <asm/cacheflush.h>
 #include <asm/system.h>
-#include <asm/uaccess.h>
 #include <asm/unistd.h>
 #include <asm/traps.h>
-#include <asm/io.h>
 
 #include "ptrace.h"
 #include "signal.h"
@@ -69,7 +67,8 @@ void dump_backtrace_entry(unsigned long where, unsigned long from, unsigned long
  */
 static int verify_stack(unsigned long sp)
 {
-       if (sp < PAGE_OFFSET || (sp > (unsigned long)high_memory && high_memory != 0))
+       if (sp < PAGE_OFFSET ||
+           (sp > (unsigned long)high_memory && high_memory != NULL))
                return -EFAULT;
 
        return 0;
@@ -328,17 +327,6 @@ asmlinkage void __exception do_undefinstr(struct pt_regs *regs)
                get_user(instr, (u32 __user *)pc);
        }
 
-#ifdef CONFIG_KPROBES
-       /*
-        * It is possible to have recursive kprobes, so we can't call
-        * the kprobe trap handler with the undef_lock held.
-        */
-       if (instr == KPROBE_BREAKPOINT_INSTRUCTION && !user_mode(regs)) {
-               kprobe_trap_handler(regs, instr);
-               return;
-       }
-#endif
-
        if (call_undef_hook(regs, instr) == 0)
                return;
 
index 180000bfdc8fcd0e5f1ec6c54a2995e8126f3b6e..17127db906faf331cd21bd6d33c47dceaa8a6e65 100644 (file)
@@ -14,8 +14,8 @@
 #include <linux/signal.h>
 #include <linux/sched.h>
 #include <linux/init.h>
+#include <linux/io.h>
 #include <asm/thread_notify.h>
-#include <asm/io.h>
 
 static inline void dsp_save_state(u32 *state)
 {
index 55e57a1c2e6ddb756e2e73ba7098f7f5d6fa74e8..1154d924080ba8353ef0eb1caee8c748125b7ffc 100644 (file)
@@ -47,3 +47,5 @@ ENTRY(__aeabi_llsl)
        mov     al, al, lsl r2
        mov     pc, lr
 
+ENDPROC(__ashldi3)
+ENDPROC(__aeabi_llsl)
index 0b31398f89b2ebf7b61549daa9b3befa10cc35cd..9f8b35572f8c6f34da74ca793319756cf743e77a 100644 (file)
@@ -47,3 +47,5 @@ ENTRY(__aeabi_lasr)
        mov     ah, ah, asr r2
        mov     pc, lr
 
+ENDPROC(__ashrdi3)
+ENDPROC(__aeabi_lasr)
index 84dc890d2bf380cf248d8d9bd90acd02fdc91c56..b0951d0e8b2ca61e68b9ff976a5bc96b5eca696c 100644 (file)
@@ -30,6 +30,8 @@ ENTRY(c_backtrace)
 
 #if !defined(CONFIG_FRAME_POINTER) || !defined(CONFIG_PRINTK)
                mov     pc, lr
+ENDPROC(__backtrace)
+ENDPROC(c_backtrace)
 #else
                stmfd   sp!, {r4 - r8, lr}      @ Save an extra register so we have a location...
                movs    frame, r0               @ if frame pointer is zero
@@ -103,6 +105,8 @@ for_each_frame:     tst     frame, mask             @ Check for address exceptions
                mov     r1, frame
                bl      printk
 no_frame:      ldmfd   sp!, {r4 - r8, pc}
+ENDPROC(__backtrace)
+ENDPROC(c_backtrace)
                
                .section __ex_table,"a"
                .align  3
index 389567c2409026d7d1096e4edf53229241203cb2..80f3115cbee2db546efd6bb7238264943278caf4 100644 (file)
@@ -19,3 +19,5 @@ ENTRY(_change_bit_be)
                eor     r0, r0, #0x18           @ big endian byte ordering
 ENTRY(_change_bit_le)
        bitop   eor
+ENDPROC(_change_bit_be)
+ENDPROC(_change_bit_le)
index ecb28dcdaf7b00704533a9241d64e3d65b9bde49..4d6bc71231f3a2da61bc2f88a6860ba18e074e59 100644 (file)
@@ -41,9 +41,10 @@ USER(                strplt  r2, [r0], #4)
 USER(          strnebt r2, [r0], #1)
 USER(          strnebt r2, [r0], #1)
                tst     r1, #1                  @ x1 x0 x1 x0 x1 x0 x1
-USER(          strnebt r2, [r0], #1)
+USER(          strnebt r2, [r0])
                mov     r0, #0
                ldmfd   sp!, {r1, pc}
+ENDPROC(__clear_user)
 
                .section .fixup,"ax"
                .align  0
index 34751653302559abba02cd82290a2c2f255322d9..1a63e43a1df0a52e2e6c723e7e0ac4191238b7b3 100644 (file)
@@ -20,3 +20,5 @@ ENTRY(_clear_bit_be)
                eor     r0, r0, #0x18           @ big endian byte ordering
 ENTRY(_clear_bit_le)
        bitop   bic
+ENDPROC(_clear_bit_be)
+ENDPROC(_clear_bit_le)
index 6b7363ce749cd80a451315e3ba8b7e94e53f9eee..56799a165cc4f4cd7c3cfe4cfe15bd6db8922b7d 100644 (file)
@@ -87,6 +87,8 @@ ENTRY(__copy_from_user)
 
 #include "copy_template.S"
 
+ENDPROC(__copy_from_user)
+
        .section .fixup,"ax"
        .align 0
        copy_abort_preamble
index 666c99cc0744709ec48c68aca472d7559faf2b50..6ae04db1ca4f2eb6b65732fd560798c3c8b63417 100644 (file)
@@ -44,3 +44,4 @@ ENTRY(copy_page)
        PLD(    ldmeqia r1!, {r3, r4, ip, lr}   )
        PLD(    beq     2b                      )
                ldmfd   sp!, {r4, pc}                   @       3
+ENDPROC(copy_page)
index 5224d94688d907caca22efec0794a9daee2a2211..22f968bbdffda4172b783ea7cf4c91899b2f02b6 100644 (file)
@@ -90,6 +90,8 @@ ENTRY(__copy_to_user)
 
 #include "copy_template.S"
 
+ENDPROC(__copy_to_user)
+
        .section .fixup,"ax"
        .align 0
        copy_abort_preamble
index 9621469beec1d59011fd8c438173e54a664e27d5..3ac6ef01bc43a4cc13465822ead08f18eb88ea0c 100644 (file)
@@ -29,4 +29,5 @@ ENTRY(__csum_ipv6_magic)
                adcs    r0, r0, r2
                adcs    r0, r0, #0
                ldmfd   sp!, {pc}
+ENDPROC(__csum_ipv6_magic)
 
index a78dae5a7b28d2b55fd9acb6c5347beb4675b6e8..31d3cb34740d6a135506a723980be083f103dbc7 100644 (file)
@@ -139,3 +139,4 @@ ENTRY(csum_partial)
                tst     len, #0x1c
                bne     4b
                b       .Lless4
+ENDPROC(csum_partial)
index 21effe0dbf97e2b2f15ad1c3f6a2ab96a0ed9d43..d03fc71fc88c9d5167290ee0d2228f5efca820ec 100644 (file)
  */
 
                .macro  save_regs
-               mov     ip, sp
-               stmfd   sp!, {r1, r4 - r8, fp, ip, lr, pc}
-               sub     fp, ip, #4
+               stmfd   sp!, {r1, r4 - r8, lr}
                .endm
 
                .macro  load_regs
-               ldmfd   sp, {r1, r4 - r8, fp, sp, pc}
+               ldmfd   sp!, {r1, r4 - r8, pc}
                .endm
 
                .macro  load1b, reg1
@@ -50,5 +48,6 @@
                .endm
 
 #define FN_ENTRY       ENTRY(csum_partial_copy_nocheck)
+#define FN_EXIT                ENDPROC(csum_partial_copy_nocheck)
 
 #include "csumpartialcopygeneric.S"
index c50e8f5285d17e7851de9d03c5c7e7e25f3b86cd..d620a5f22a09d4a683b884d9d6836171ded4d5f1 100644 (file)
@@ -329,3 +329,4 @@ FN_ENTRY
                adcs    sum, sum, r4, push #24
                mov     r5, r4, get_byte_1
                b       .Lexit
+FN_EXIT
index c3b93e22ea25a05d80654016bb13e1c4f27879f5..14677fb4b0c4f504bc09ba19e2dcc5acd3362393 100644 (file)
                .text
 
                .macro  save_regs
-               mov     ip, sp
-               stmfd   sp!, {r1 - r2, r4 - r8, fp, ip, lr, pc}
-               sub     fp, ip, #4
+               stmfd   sp!, {r1, r2, r4 - r8, lr}
                .endm
 
                .macro  load_regs
-               ldmfd   sp, {r1, r2, r4-r8, fp, sp, pc}
+               ldmfd   sp!, {r1, r2, r4 - r8, pc}
                .endm
 
                .macro  load1b, reg1
@@ -82,6 +80,7 @@
  */
 
 #define FN_ENTRY       ENTRY(csum_partial_copy_from_user)
+#define FN_EXIT                ENDPROC(csum_partial_copy_from_user)
 
 #include "csumpartialcopygeneric.S"
 
index 930a7025922077a0b1da5cb048bdc4041bbceed0..8d6a8762ab889fdc1d2ef165c9733a92393e7c9a 100644 (file)
@@ -60,3 +60,6 @@ ENTRY(__delay)
 #endif
                bhi     __delay
                mov     pc, lr
+ENDPROC(__udelay)
+ENDPROC(__const_udelay)
+ENDPROC(__delay)
index 58eef66076293a923d00a81e03370bcc1c734f83..1425e789ba86168b87858ad36474c3c6588c3905 100644 (file)
@@ -198,3 +198,4 @@ ENTRY(__do_div64)
        mov     xh, #0
        ldr     pc, [sp], #8
 
+ENDPROC(__do_div64)
index a5ca0248aa4e01a1e11ec1de7a935dba9f5a64ec..8c4defc4f3c482bf598f7dad0c519798b80f66ef 100644 (file)
@@ -33,6 +33,7 @@ ENTRY(_find_first_zero_bit_le)
                blo     1b
 3:             mov     r0, r1                  @ no free bits
                mov     pc, lr
+ENDPROC(_find_first_zero_bit_le)
 
 /*
  * Purpose  : Find next 'zero' bit
@@ -50,6 +51,7 @@ ENTRY(_find_next_zero_bit_le)
                orr     r2, r2, #7              @ if zero, then no bits here
                add     r2, r2, #1              @ align bit pointer
                b       2b                      @ loop for next bit
+ENDPROC(_find_next_zero_bit_le)
 
 /*
  * Purpose  : Find a 'one' bit
@@ -67,6 +69,7 @@ ENTRY(_find_first_bit_le)
                blo     1b
 3:             mov     r0, r1                  @ no free bits
                mov     pc, lr
+ENDPROC(_find_first_bit_le)
 
 /*
  * Purpose  : Find next 'one' bit
@@ -83,6 +86,7 @@ ENTRY(_find_next_bit_le)
                orr     r2, r2, #7              @ if zero, then no bits here
                add     r2, r2, #1              @ align bit pointer
                b       2b                      @ loop for next bit
+ENDPROC(_find_next_bit_le)
 
 #ifdef __ARMEB__
 
@@ -99,6 +103,7 @@ ENTRY(_find_first_zero_bit_be)
                blo     1b
 3:             mov     r0, r1                  @ no free bits
                mov     pc, lr
+ENDPROC(_find_first_zero_bit_be)
 
 ENTRY(_find_next_zero_bit_be)
                teq     r1, #0
@@ -113,6 +118,7 @@ ENTRY(_find_next_zero_bit_be)
                orr     r2, r2, #7              @ if zero, then no bits here
                add     r2, r2, #1              @ align bit pointer
                b       2b                      @ loop for next bit
+ENDPROC(_find_next_zero_bit_be)
 
 ENTRY(_find_first_bit_be)
                teq     r1, #0
@@ -127,6 +133,7 @@ ENTRY(_find_first_bit_be)
                blo     1b
 3:             mov     r0, r1                  @ no free bits
                mov     pc, lr
+ENDPROC(_find_first_bit_be)
 
 ENTRY(_find_next_bit_be)
                teq     r1, #0
@@ -140,6 +147,7 @@ ENTRY(_find_next_bit_be)
                orr     r2, r2, #7              @ if zero, then no bits here
                add     r2, r2, #1              @ align bit pointer
                b       2b                      @ loop for next bit
+ENDPROC(_find_next_bit_be)
 
 #endif
 
index 2034d4dbe6ad3a3cddf20c8e9f75516021e93c92..6763088b7607c13ea4609108416ce2e8f3aedaec 100644 (file)
  * Note that ADDR_LIMIT is either 0 or 0xc0000000.
  * Note also that it is intended that __get_user_bad is not global.
  */
+#include <linux/linkage.h>
 #include <asm/errno.h>
 
-       .global __get_user_1
-__get_user_1:
+ENTRY(__get_user_1)
 1:     ldrbt   r2, [r0]
        mov     r0, #0
        mov     pc, lr
+ENDPROC(__get_user_1)
 
-       .global __get_user_2
-__get_user_2:
+ENTRY(__get_user_2)
 2:     ldrbt   r2, [r0], #1
 3:     ldrbt   r3, [r0]
 #ifndef __ARMEB__
@@ -45,17 +45,19 @@ __get_user_2:
 #endif
        mov     r0, #0
        mov     pc, lr
+ENDPROC(__get_user_2)
 
-       .global __get_user_4
-__get_user_4:
+ENTRY(__get_user_4)
 4:     ldrt    r2, [r0]
        mov     r0, #0
        mov     pc, lr
+ENDPROC(__get_user_4)
 
 __get_user_bad:
        mov     r2, #0
        mov     r0, #-EFAULT
        mov     pc, lr
+ENDPROC(__get_user_bad)
 
 .section __ex_table, "a"
        .long   1b, __get_user_bad
index fb966ad0276f48ab7a24db8edcaf1e978eb89cf0..9f4238987fe9050dba88c94c4c0eb4b730c62c6d 100644 (file)
@@ -120,3 +120,4 @@ ENTRY(__raw_readsb)
                strgtb  r3, [r1]
 
                ldmfd   sp!, {r4 - r6, pc}
+ENDPROC(__raw_readsb)
index 75a9121cb23f69f13d5cb1a389daa46d511c5ee3..5fb97e7f9f4bd9a8cbc2e40ee6ebaea3d273e732 100644 (file)
@@ -76,3 +76,4 @@ ENTRY(__raw_readsl)
 8:             mov     r3, ip, get_byte_0
                strb    r3, [r1, #0]
                mov     pc, lr
+ENDPROC(__raw_readsl)
index 4db1c5f0b219c7b85022971a701b4fa7d7d1f04e..1f393d42593d21c1beb13eff254acd60eaa0bd95 100644 (file)
@@ -128,3 +128,4 @@ ENTRY(__raw_readsw)
    _BE_ONLY_(  movne   ip, ip, lsr #24         )
                strneb  ip, [r1]
                ldmfd   sp!, {r4, pc}
+ENDPROC(__raw_readsw)
index 7eba2b6cc69f951ffeb54013e1108ed08346ac77..68b92f4acaeb3e6f2dbfce4285a8cc9a91deac10 100644 (file)
@@ -91,3 +91,4 @@ ENTRY(__raw_writesb)
                strgtb  r3, [r0]
 
                ldmfd   sp!, {r4, r5, pc}
+ENDPROC(__raw_writesb)
index f8f14dd227ca7c1ac26fc9ffeaa9d514f7b9370e..8d3b7813725cde5b877a896f4ad4780fff663781 100644 (file)
@@ -64,3 +64,4 @@ ENTRY(__raw_writesl)
                str     ip, [r0]
                bne     6b
                mov     pc, lr
+ENDPROC(__raw_writesl)
index c8e85bd653b7aaa7b7cb8c30b0a90615390fd1ea..d6585612c86b5676d8fc9213426ab2a348e467c3 100644 (file)
@@ -94,3 +94,4 @@ ENTRY(__raw_writesw)
 3:             movne   ip, r3, lsr #8
                strneh  ip, [r0]
                mov     pc, lr
+ENDPROC(__raw_writesw)
index 4e492f4b3f0e48cf1ca14229fc318627a6edc8c2..67964bcfc854fde5fc46ed33294a189c4bb1f371 100644 (file)
@@ -230,6 +230,8 @@ ENTRY(__aeabi_uidiv)
        mov     r0, r0, lsr r2
        mov     pc, lr
 
+ENDPROC(__udivsi3)
+ENDPROC(__aeabi_uidiv)
 
 ENTRY(__umodsi3)
 
@@ -245,6 +247,7 @@ ENTRY(__umodsi3)
 
        mov     pc, lr
 
+ENDPROC(__umodsi3)
 
 ENTRY(__divsi3)
 ENTRY(__aeabi_idiv)
@@ -284,6 +287,8 @@ ENTRY(__aeabi_idiv)
        rsbmi   r0, r0, #0
        mov     pc, lr
 
+ENDPROC(__divsi3)
+ENDPROC(__aeabi_idiv)
 
 ENTRY(__modsi3)
 
@@ -305,6 +310,8 @@ ENTRY(__modsi3)
        rsbmi   r0, r0, #0
        mov     pc, lr
 
+ENDPROC(__modsi3)
+
 #ifdef CONFIG_AEABI
 
 ENTRY(__aeabi_uidivmod)
@@ -316,6 +323,8 @@ ENTRY(__aeabi_uidivmod)
        sub     r1, r1, r3
        mov     pc, lr
 
+ENDPROC(__aeabi_uidivmod)
+
 ENTRY(__aeabi_idivmod)
 
        stmfd   sp!, {r0, r1, ip, lr}
@@ -325,6 +334,8 @@ ENTRY(__aeabi_idivmod)
        sub     r1, r1, r3
        mov     pc, lr
 
+ENDPROC(__aeabi_idivmod)
+
 #endif
 
 Ldiv0:
index a86dbdd59cc4414bbd2a8abaf1f4eab7c3a58237..99ea338bf87ce9cbd51a134a585e4ee15dc30507 100644 (file)
@@ -47,3 +47,5 @@ ENTRY(__aeabi_llsr)
        mov     ah, ah, lsr r2
        mov     pc, lr
 
+ENDPROC(__lshrdi3)
+ENDPROC(__aeabi_llsr)
index e7ab1ea8ebaa5aa5bf5a213c2cefedfe3410b5b1..1da86991d7003ad958b843a0508aa10dd334e8e6 100644 (file)
@@ -23,3 +23,4 @@ ENTRY(memchr)
        sub     r0, r0, #1
 2:     movne   r0, #0
        mov     pc, lr
+ENDPROC(memchr)
index 7e71d6708a8d668142fba5f12b932eb5cb1ac626..e0d002641d3f785944aaf787fa9ac85a37cabce3 100644 (file)
@@ -57,3 +57,4 @@ ENTRY(memcpy)
 
 #include "copy_template.S"
 
+ENDPROC(memcpy)
index 2e301b7bd8f13d13243761049353be4ef8f72e10..12549187088c03de84a77c4150bcc001ffe31793 100644 (file)
@@ -196,3 +196,4 @@ ENTRY(memmove)
 
 18:            backward_copy_shift     push=24 pull=8
 
+ENDPROC(memmove)
index b477d4ac88eff4aadab356766dafb83c2c20fe47..761eefa762437de156387da70fbe006004c950cb 100644 (file)
@@ -124,3 +124,4 @@ ENTRY(memset)
        tst     r2, #1
        strneb  r1, [r0], #1
        mov     pc, lr
+ENDPROC(memset)
index b8f79d80ee9bf703d7554c15d2a22ceb1fe9ef1e..3fbdef5f802aa8a251a1eeb756aee910bb9d471e 100644 (file)
@@ -122,3 +122,4 @@ ENTRY(__memzero)
        tst     r1, #1                  @ 1 a byte left over
        strneb  r2, [r0], #1            @ 1
        mov     pc, lr                  @ 1
+ENDPROC(__memzero)
index d89c60615794e7a72c4f5614837939ed0735d62d..36c91b4957e2da0d9bdc006bcf3644dbab001d72 100644 (file)
@@ -43,3 +43,5 @@ ENTRY(__aeabi_lmul)
        adc     xh, xh, ip, lsr #16
        mov     pc, lr
 
+ENDPROC(__muldi3)
+ENDPROC(__aeabi_lmul)
index 08ec7dffa52e44cf5d15b720891b0717547ad7f7..864f3c1c4f185fb54352d2659c83abb42cc5e79d 100644 (file)
  * Note that ADDR_LIMIT is either 0 or 0xc0000000
  * Note also that it is intended that __put_user_bad is not global.
  */
+#include <linux/linkage.h>
 #include <asm/errno.h>
 
-       .global __put_user_1
-__put_user_1:
+ENTRY(__put_user_1)
 1:     strbt   r2, [r0]
        mov     r0, #0
        mov     pc, lr
+ENDPROC(__put_user_1)
 
-       .global __put_user_2
-__put_user_2:
+ENTRY(__put_user_2)
        mov     ip, r2, lsr #8
 #ifndef __ARMEB__
 2:     strbt   r2, [r0], #1
@@ -46,23 +46,25 @@ __put_user_2:
 #endif
        mov     r0, #0
        mov     pc, lr
+ENDPROC(__put_user_2)
 
-       .global __put_user_4
-__put_user_4:
+ENTRY(__put_user_4)
 4:     strt    r2, [r0]
        mov     r0, #0
        mov     pc, lr
+ENDPROC(__put_user_4)
 
-       .global __put_user_8
-__put_user_8:
+ENTRY(__put_user_8)
 5:     strt    r2, [r0], #4
 6:     strt    r3, [r0]
        mov     r0, #0
        mov     pc, lr
+ENDPROC(__put_user_8)
 
 __put_user_bad:
        mov     r0, #-EFAULT
        mov     pc, lr
+ENDPROC(__put_user_bad)
 
 .section __ex_table, "a"
        .long   1b, __put_user_bad
index 83bc23d5b0374dd377772aefee4b47cf7841cc85..1dd7176c4b2bf7827decef898f503c302ec3af91 100644 (file)
@@ -20,3 +20,5 @@ ENTRY(_set_bit_be)
                eor     r0, r0, #0x18           @ big endian byte ordering
 ENTRY(_set_bit_le)
        bitop   orr
+ENDPROC(_set_bit_be)
+ENDPROC(_set_bit_le)
index 67c2bf4774b70619f1b2652b665024871452f901..a16fb208c8418591bd0ab01d8db0c95dca08ea16 100644 (file)
@@ -185,6 +185,8 @@ ENTRY(sha_transform)
 
        ldmfd   sp!, {r4 - r8, pc}
 
+ENDPROC(sha_transform)
+
 .L_sha_K:
        .word   0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6
 
@@ -204,3 +206,4 @@ ENTRY(sha_init)
        stmia   r0, {r1, r2, r3, ip, lr}
        ldr     pc, [sp], #4
 
+ENDPROC(sha_init)
index 9f18d6fdee6a9fddfd376e2637c82541747539ec..d8f2a1c1aea4bf15372595ab57e0a9abcacb2b4b 100644 (file)
@@ -24,3 +24,4 @@ ENTRY(strchr)
                movne   r0, #0
                subeq   r0, r0, #1
                mov     pc, lr
+ENDPROC(strchr)
index 36e3741a37729a59f8eb30e5d66ba3ab5e67fcbc..330373c26dd94ce4c1a31c822f05d39dce63627c 100644 (file)
@@ -31,6 +31,7 @@ USER( ldrplbt r3, [r1], #1)
        sub     r1, r1, #1      @ take NUL character out of count
 2:     sub     r0, r1, ip
        mov     pc, lr
+ENDPROC(__strncpy_from_user)
 
        .section .fixup,"ax"
        .align  0
index 18d8fa4f925a92c397006d7105d9fa8b7bc8c4d0..90bb9d020836428050db83a2a614528a428f31d6 100644 (file)
@@ -31,6 +31,7 @@ USER( ldrbt   r3, [r0], #1)
        add     r0, r0, #1
 2:     sub     r0, r0, r2
        mov     pc, lr
+ENDPROC(__strnlen_user)
 
        .section .fixup,"ax"
        .align  0
index 538df220aa48e5b827263b68034f433f7cd970d1..302f20cd24237634889ff86218f531d2b30394b1 100644 (file)
@@ -23,3 +23,4 @@ ENTRY(strrchr)
                bne     1b
                mov     r0, r3
                mov     pc, lr
+ENDPROC(strrchr)
index b25dcd2be53ec6fc2cba40329890899d35c5a051..5c98dc567f0fc7b3ecad15acefd58538d983c124 100644 (file)
@@ -16,3 +16,5 @@ ENTRY(_test_and_change_bit_be)
                eor     r0, r0, #0x18           @ big endian byte ordering
 ENTRY(_test_and_change_bit_le)
        testop  eor, strb
+ENDPROC(_test_and_change_bit_be)
+ENDPROC(_test_and_change_bit_le)
index 2dcc4b16b68ea734da457145ab0718998759d441..543d7094d18e4eb236fef7b15d9108e55e2e3935 100644 (file)
@@ -16,3 +16,5 @@ ENTRY(_test_and_clear_bit_be)
                eor     r0, r0, #0x18           @ big endian byte ordering
 ENTRY(_test_and_clear_bit_le)
        testop  bicne, strneb
+ENDPROC(_test_and_clear_bit_be)
+ENDPROC(_test_and_clear_bit_le)
index 9011c969761aa61fec07ccf5298909c85345664c..0b3f390401ce0b86c796a83f3ae8914b8bc4137b 100644 (file)
@@ -16,3 +16,5 @@ ENTRY(_test_and_set_bit_be)
                eor     r0, r0, #0x18           @ big endian byte ordering
 ENTRY(_test_and_set_bit_le)
        testop  orreq, streqb
+ENDPROC(_test_and_set_bit_be)
+ENDPROC(_test_and_set_bit_le)
index b48bd6d5fd83144ca4705becef558faadb33f725..ffdd27498ceef69471f230317725ecea1951f111 100644 (file)
@@ -277,6 +277,7 @@ USER(               strgebt r3, [r0], #1)                   @ May fault
                ldrgtb  r3, [r1], #0
 USER(          strgtbt r3, [r0], #1)                   @ May fault
                b       .Lc2u_finished
+ENDPROC(__copy_to_user)
 
                .section .fixup,"ax"
                .align  0
@@ -542,6 +543,7 @@ USER(               ldrgebt r3, [r1], #1)                   @ May fault
 USER(          ldrgtbt r3, [r1], #1)                   @ May fault
                strgtb  r3, [r0], #1
                b       .Lcfu_finished
+ENDPROC(__copy_from_user)
 
                .section .fixup,"ax"
                .align  0
index f76de07ac1825f77ec045ff6c01c1179bd3c2378..f0df6a91db041b7d73c2583e4441af121e898143 100644 (file)
@@ -33,6 +33,8 @@ ENTRY(__ucmpdi2)
        movhi   r0, #2
        mov     pc, lr
 
+ENDPROC(__ucmpdi2)
+
 #ifdef CONFIG_AEABI
 
 ENTRY(__aeabi_ulcmp)
@@ -44,5 +46,7 @@ ENTRY(__aeabi_ulcmp)
        movhi   r0, #1
        mov     pc, lr
 
+ENDPROC(__aeabi_ulcmp)
+
 #endif
 
index a048b92cb4079a660866bdac3a25fa74a12b81e6..5aafb2e2ca7a538335957df1508009f5784f0230 100644 (file)
@@ -175,6 +175,15 @@ config MACH_SAM9_L9260
          Select this if you are using Olimex's SAM9-L9260 board based on the Atmel AT91SAM9260.
          <http://www.olimex.com/dev/sam9-L9260.html>
 
+config MACH_AFEB9260
+       bool "Custom afeb9260 board v1"
+       depends on ARCH_AT91SAM9260
+       help
+         Select this if you are using custom afeb9260 board based on
+         open hardware design. Select this for revision 1 of the board.
+         <svn://194.85.238.22/home/users/george/svn/arm9eb>
+         <http://groups.google.com/group/arm9fpga-evolution-board>
+
 config MACH_USB_A9260
        bool "CALAO USB-A9260"
        depends on ARCH_AT91SAM9260
@@ -314,6 +323,19 @@ config AT91_PROGRAMMABLE_CLOCKS
          Select this if you need to program one or more of the PCK0..PCK3
          programmable clock outputs.
 
+config AT91_SLOW_CLOCK
+       bool "Suspend-to-RAM disables main oscillator"
+       depends on SUSPEND
+       help
+         Select this if you want Suspend-to-RAM to save the most power
+         possible (without powering off the CPU) by disabling the PLLs
+         and main oscillator so that only the 32 KiHz clock is available.
+
+         When only that slow-clock is available, some peripherals lose
+         functionality.  Many can't issue wakeup events unless faster
+         clocks are available.  Some lose their operating state and
+         need to be completely re-initialized.
+
 config AT91_TIMER_HZ
        int "Kernel HZ (jiffies per second)"
        range 32 1024
index 7d641f97516bff56c90caefd32909db90c203783..cca612d97ca2f895321b61e1d0d6ce7a97462af5 100644 (file)
@@ -39,6 +39,7 @@ obj-$(CONFIG_MACH_CAM60)      += board-cam60.o
 obj-$(CONFIG_MACH_SAM9_L9260)  += board-sam9-l9260.o
 obj-$(CONFIG_MACH_USB_A9260)   += board-usb-a9260.o
 obj-$(CONFIG_MACH_QIL_A9260)   += board-qil-a9260.o
+obj-$(CONFIG_MACH_AFEB9260)    += board-afeb-9260v1.o
 
 # AT91SAM9261 board-specific support
 obj-$(CONFIG_MACH_AT91SAM9261EK) += board-sam9261ek.o
@@ -64,6 +65,7 @@ obj-y                         += leds.o
 
 # Power Management
 obj-$(CONFIG_PM)               += pm.o
+obj-$(CONFIG_AT91_SLOW_CLOCK)  += pm_slowclock.o
 
 ifeq ($(CONFIG_PM_DEBUG),y)
 CFLAGS_pm.o += -DDEBUG
index 638948c16770e50ce21cba285f0b7d65d6ca2fcd..0fc0adaebd583ed0718366f354fb970078d35c2d 100644 (file)
@@ -141,8 +141,8 @@ static struct clk tcb_clk = {
        .pmc_mask       = 1 << AT91CAP9_ID_TCB,
        .type           = CLK_TYPE_PERIPHERAL,
 };
-static struct clk pwmc_clk = {
-       .name           = "pwmc_clk",
+static struct clk pwm_clk = {
+       .name           = "pwm_clk",
        .pmc_mask       = 1 << AT91CAP9_ID_PWMC,
        .type           = CLK_TYPE_PERIPHERAL,
 };
@@ -207,7 +207,7 @@ static struct clk *periph_clocks[] __initdata = {
        &ssc1_clk,
        &ac97_clk,
        &tcb_clk,
-       &pwmc_clk,
+       &pwm_clk,
        &macb_clk,
        &aestdes_clk,
        &adc_clk,
index abb4aac8fa983a6c90742d86cd12e460c36b8cf7..5ebd4273d353d5f71ac27b9d519c283c319d0874 100644 (file)
@@ -718,6 +718,60 @@ static void __init at91_add_device_watchdog(void) {}
 #endif
 
 
+/* --------------------------------------------------------------------
+ *  PWM
+ * --------------------------------------------------------------------*/
+
+#if defined(CONFIG_ATMEL_PWM)
+static u32 pwm_mask;
+
+static struct resource pwm_resources[] = {
+       [0] = {
+               .start  = AT91CAP9_BASE_PWMC,
+               .end    = AT91CAP9_BASE_PWMC + SZ_16K - 1,
+               .flags  = IORESOURCE_MEM,
+       },
+       [1] = {
+               .start  = AT91CAP9_ID_PWMC,
+               .end    = AT91CAP9_ID_PWMC,
+               .flags  = IORESOURCE_IRQ,
+       },
+};
+
+static struct platform_device at91cap9_pwm0_device = {
+       .name   = "atmel_pwm",
+       .id     = -1,
+       .dev    = {
+               .platform_data          = &pwm_mask,
+       },
+       .resource       = pwm_resources,
+       .num_resources  = ARRAY_SIZE(pwm_resources),
+};
+
+void __init at91_add_device_pwm(u32 mask)
+{
+       if (mask & (1 << AT91_PWM0))
+               at91_set_A_periph(AT91_PIN_PB19, 1);    /* enable PWM0 */
+
+       if (mask & (1 << AT91_PWM1))
+               at91_set_B_periph(AT91_PIN_PB8, 1);     /* enable PWM1 */
+
+       if (mask & (1 << AT91_PWM2))
+               at91_set_B_periph(AT91_PIN_PC29, 1);    /* enable PWM2 */
+
+       if (mask & (1 << AT91_PWM3))
+               at91_set_B_periph(AT91_PIN_PA11, 1);    /* enable PWM3 */
+
+       pwm_mask = mask;
+
+       platform_device_register(&at91cap9_pwm0_device);
+}
+#else
+void __init at91_add_device_pwm(u32 mask) {}
+#endif
+
+
+
 /* --------------------------------------------------------------------
  *  AC97
  * -------------------------------------------------------------------- */
index 80bfab5680e2a56ce0853398b7bed311b5b9e33b..ada4b6769107569318f9c6e21009a90728f7e79e 100644 (file)
@@ -129,8 +129,8 @@ static struct clk tcb_clk = {
        .pmc_mask       = 1 << AT91SAM9263_ID_TCB,
        .type           = CLK_TYPE_PERIPHERAL,
 };
-static struct clk pwmc_clk = {
-       .name           = "pwmc_clk",
+static struct clk pwm_clk = {
+       .name           = "pwm_clk",
        .pmc_mask       = 1 << AT91SAM9263_ID_PWMC,
        .type           = CLK_TYPE_PERIPHERAL,
 };
@@ -187,7 +187,7 @@ static struct clk *periph_clocks[] __initdata = {
        &ssc1_clk,
        &ac97_clk,
        &tcb_clk,
-       &pwmc_clk,
+       &pwm_clk,
        &macb_clk,
        &twodge_clk,
        &udc_clk,
index c93992f55dc906c6c2035aacf6b3e67b156c8670..8b884083f76d8e08b1abbd14e0df8a56aaa8ee1b 100644 (file)
@@ -885,6 +885,59 @@ static void __init at91_add_device_watchdog(void) {}
 #endif
 
 
+/* --------------------------------------------------------------------
+ *  PWM
+ * --------------------------------------------------------------------*/
+
+#if defined(CONFIG_ATMEL_PWM)
+static u32 pwm_mask;
+
+static struct resource pwm_resources[] = {
+       [0] = {
+               .start  = AT91SAM9263_BASE_PWMC,
+               .end    = AT91SAM9263_BASE_PWMC + SZ_16K - 1,
+               .flags  = IORESOURCE_MEM,
+       },
+       [1] = {
+               .start  = AT91SAM9263_ID_PWMC,
+               .end    = AT91SAM9263_ID_PWMC,
+               .flags  = IORESOURCE_IRQ,
+       },
+};
+
+static struct platform_device at91sam9263_pwm0_device = {
+       .name   = "atmel_pwm",
+       .id     = -1,
+       .dev    = {
+               .platform_data          = &pwm_mask,
+       },
+       .resource       = pwm_resources,
+       .num_resources  = ARRAY_SIZE(pwm_resources),
+};
+
+void __init at91_add_device_pwm(u32 mask)
+{
+       if (mask & (1 << AT91_PWM0))
+               at91_set_B_periph(AT91_PIN_PB7, 1);     /* enable PWM0 */
+
+       if (mask & (1 << AT91_PWM1))
+               at91_set_B_periph(AT91_PIN_PB8, 1);     /* enable PWM1 */
+
+       if (mask & (1 << AT91_PWM2))
+               at91_set_B_periph(AT91_PIN_PC29, 1);    /* enable PWM2 */
+
+       if (mask & (1 << AT91_PWM3))
+               at91_set_B_periph(AT91_PIN_PB29, 1);    /* enable PWM3 */
+
+       pwm_mask = mask;
+
+       platform_device_register(&at91sam9263_pwm0_device);
+}
+#else
+void __init at91_add_device_pwm(u32 mask) {}
+#endif
+
+
 /* --------------------------------------------------------------------
  *  SSC -- Synchronous Serial Controller
  * -------------------------------------------------------------------- */
index 556bddf35b45401facda3863284aae1998e483d3..252e954b49fda7d1325a9eaffb697c9bf2c181bf 100644 (file)
@@ -131,8 +131,8 @@ static struct clk tc2_clk = {
        .pmc_mask       = 1 << AT91SAM9RL_ID_TC2,
        .type           = CLK_TYPE_PERIPHERAL,
 };
-static struct clk pwmc_clk = {
-       .name           = "pwmc_clk",
+static struct clk pwm_clk = {
+       .name           = "pwm_clk",
        .pmc_mask       = 1 << AT91SAM9RL_ID_PWMC,
        .type           = CLK_TYPE_PERIPHERAL,
 };
@@ -180,7 +180,7 @@ static struct clk *periph_clocks[] __initdata = {
        &tc0_clk,
        &tc1_clk,
        &tc2_clk,
-       &pwmc_clk,
+       &pwm_clk,
        &tsc_clk,
        &dma_clk,
        &udphs_clk,
index 620886341fb598f30dbe450ea43a72c4e0ab6f0e..87deb1e1b529854fd74c330adce5f02daa5f5599 100644 (file)
@@ -526,6 +526,51 @@ static void __init at91_add_device_tc(void) { }
 #endif
 
 
+/* --------------------------------------------------------------------
+ *  Touchscreen
+ * -------------------------------------------------------------------- */
+
+#if defined(CONFIG_TOUCHSCREEN_ATMEL_TSADCC) || defined(CONFIG_TOUCHSCREEN_ATMEL_TSADCC_MODULE)
+static u64 tsadcc_dmamask = DMA_BIT_MASK(32);
+
+static struct resource tsadcc_resources[] = {
+       [0] = {
+               .start  = AT91SAM9RL_BASE_TSC,
+               .end    = AT91SAM9RL_BASE_TSC + SZ_16K - 1,
+               .flags  = IORESOURCE_MEM,
+       },
+       [1] = {
+               .start  = AT91SAM9RL_ID_TSC,
+               .end    = AT91SAM9RL_ID_TSC,
+               .flags  = IORESOURCE_IRQ,
+       }
+};
+
+static struct platform_device at91sam9rl_tsadcc_device = {
+       .name           = "atmel_tsadcc",
+       .id             = -1,
+       .dev            = {
+                               .dma_mask               = &tsadcc_dmamask,
+                               .coherent_dma_mask      = DMA_BIT_MASK(32),
+       },
+       .resource       = tsadcc_resources,
+       .num_resources  = ARRAY_SIZE(tsadcc_resources),
+};
+
+void __init at91_add_device_tsadcc(void)
+{
+       at91_set_A_periph(AT91_PIN_PA17, 0);    /* AD0_XR */
+       at91_set_A_periph(AT91_PIN_PA18, 0);    /* AD1_XL */
+       at91_set_A_periph(AT91_PIN_PA19, 0);    /* AD2_YT */
+       at91_set_A_periph(AT91_PIN_PA20, 0);    /* AD3_TB */
+
+       platform_device_register(&at91sam9rl_tsadcc_device);
+}
+#else
+void __init at91_add_device_tsadcc(void) {}
+#endif
+
+
 /* --------------------------------------------------------------------
  *  RTC
  * -------------------------------------------------------------------- */
@@ -591,6 +636,59 @@ static void __init at91_add_device_watchdog(void) {}
 #endif
 
 
+/* --------------------------------------------------------------------
+ *  PWM
+ * --------------------------------------------------------------------*/
+
+#if defined(CONFIG_ATMEL_PWM)
+static u32 pwm_mask;
+
+static struct resource pwm_resources[] = {
+       [0] = {
+               .start  = AT91SAM9RL_BASE_PWMC,
+               .end    = AT91SAM9RL_BASE_PWMC + SZ_16K - 1,
+               .flags  = IORESOURCE_MEM,
+       },
+       [1] = {
+               .start  = AT91SAM9RL_ID_PWMC,
+               .end    = AT91SAM9RL_ID_PWMC,
+               .flags  = IORESOURCE_IRQ,
+       },
+};
+
+static struct platform_device at91sam9rl_pwm0_device = {
+       .name   = "atmel_pwm",
+       .id     = -1,
+       .dev    = {
+               .platform_data          = &pwm_mask,
+       },
+       .resource       = pwm_resources,
+       .num_resources  = ARRAY_SIZE(pwm_resources),
+};
+
+void __init at91_add_device_pwm(u32 mask)
+{
+       if (mask & (1 << AT91_PWM0))
+               at91_set_B_periph(AT91_PIN_PB8, 1);     /* enable PWM0 */
+
+       if (mask & (1 << AT91_PWM1))
+               at91_set_B_periph(AT91_PIN_PB9, 1);     /* enable PWM1 */
+
+       if (mask & (1 << AT91_PWM2))
+               at91_set_B_periph(AT91_PIN_PD5, 1);     /* enable PWM2 */
+
+       if (mask & (1 << AT91_PWM3))
+               at91_set_B_periph(AT91_PIN_PD8, 1);     /* enable PWM3 */
+
+       pwm_mask = mask;
+
+       platform_device_register(&at91sam9rl_pwm0_device);
+}
+#else
+void __init at91_add_device_pwm(u32 mask) {}
+#endif
+
+
 /* --------------------------------------------------------------------
  *  SSC -- Synchronous Serial Controller
  * -------------------------------------------------------------------- */
index 869b5e28d1959395332f139874d5ab7cb97b2062..dfff2895f4b286c4134a2a9f6425c90ce27e76ca 100644 (file)
@@ -23,8 +23,8 @@
 #include <linux/interrupt.h>
 #include <linux/irq.h>
 #include <linux/time.h>
+#include <linux/io.h>
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/mach/time.h>
 #include <mach/at91_tc.h>
 
diff --git a/arch/arm/mach-at91/board-afeb-9260v1.c b/arch/arm/mach-at91/board-afeb-9260v1.c
new file mode 100644 (file)
index 0000000..9c040c7
--- /dev/null
@@ -0,0 +1,210 @@
+/*
+ * linux/arch/arm/mach-at91/board-afeb-9260v1.c
+ *
+ *  Copyright (C) 2005 SAN People
+ *  Copyright (C) 2006 Atmel
+ *  Copyright (C) 2008 Sergey Lapin
+ *
+ * A custom board designed as open hardware; PCBs and various information
+ * is available at http://groups.google.com/group/arm9fpga-evolution-board/
+ * Subversion repository: svn://194.85.238.22/home/users/george/svn/arm9eb
+ *
+ * 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/init.h>
+#include <linux/mm.h>
+#include <linux/module.h>
+#include <linux/platform_device.h>
+#include <linux/spi/spi.h>
+#include <linux/clk.h>
+#include <linux/dma-mapping.h>
+
+#include <mach/hardware.h>
+#include <asm/setup.h>
+#include <asm/mach-types.h>
+#include <asm/irq.h>
+
+#include <asm/mach/arch.h>
+#include <asm/mach/map.h>
+#include <asm/mach/irq.h>
+
+#include <mach/board.h>
+#include <mach/gpio.h>
+
+#include "generic.h"
+
+
+static void __init afeb9260_map_io(void)
+{
+       /* Initialize processor: 18.432 MHz crystal */
+       at91sam9260_initialize(18432000);
+
+       /* DGBU on ttyS0. (Rx & Tx only) */
+       at91_register_uart(0, 0, 0);
+
+       /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
+       at91_register_uart(AT91SAM9260_ID_US0, 1,
+                            ATMEL_UART_CTS | ATMEL_UART_RTS
+                          | ATMEL_UART_DTR | ATMEL_UART_DSR
+                          | ATMEL_UART_DCD | ATMEL_UART_RI);
+
+       /* USART1 on ttyS2. (Rx, Tx, RTS, CTS) */
+       at91_register_uart(AT91SAM9260_ID_US1, 2,
+                       ATMEL_UART_CTS | ATMEL_UART_RTS);
+
+       /* set serial console to ttyS0 (ie, DBGU) */
+       at91_set_serial_console(0);
+}
+
+static void __init afeb9260_init_irq(void)
+{
+       at91sam9260_init_interrupts(NULL);
+}
+
+
+/*
+ * USB Host port
+ */
+static struct at91_usbh_data __initdata afeb9260_usbh_data = {
+       .ports          = 1,
+};
+
+/*
+ * USB Device port
+ */
+static struct at91_udc_data __initdata afeb9260_udc_data = {
+       .vbus_pin       = AT91_PIN_PC5,
+       .pullup_pin     = 0,            /* pull-up driven by UDC */
+};
+
+
+
+/*
+ * SPI devices.
+ */
+static struct spi_board_info afeb9260_spi_devices[] = {
+       {       /* DataFlash chip */
+               .modalias       = "mtd_dataflash",
+               .chip_select    = 1,
+               .max_speed_hz   = 15 * 1000 * 1000,
+               .bus_num        = 0,
+       },
+};
+
+
+/*
+ * MACB Ethernet device
+ */
+static struct at91_eth_data __initdata afeb9260_macb_data = {
+       .phy_irq_pin    = AT91_PIN_PA9,
+       .is_rmii        = 0,
+};
+
+
+/*
+ * NAND flash
+ */
+static struct mtd_partition __initdata afeb9260_nand_partition[] = {
+       {
+               .name   = "bootloader",
+               .offset = 0,
+               .size   = (640 * SZ_1K),
+       },
+       {
+               .name   = "kernel",
+               .offset = MTDPART_OFS_NXTBLK,
+               .size   = SZ_2M,
+       },
+       {
+               .name   = "rootfs",
+               .offset = MTDPART_OFS_NXTBLK,
+               .size   = MTDPART_SIZ_FULL,
+       },
+};
+
+static struct mtd_partition * __init nand_partitions(int size, int *num_partitions)
+{
+       *num_partitions = ARRAY_SIZE(afeb9260_nand_partition);
+       return afeb9260_nand_partition;
+}
+
+static struct atmel_nand_data __initdata afeb9260_nand_data = {
+       .ale            = 21,
+       .cle            = 22,
+       .rdy_pin        = AT91_PIN_PC13,
+       .enable_pin     = AT91_PIN_PC14,
+       .partition_info = nand_partitions,
+       .bus_width_16   = 0,
+};
+
+
+/*
+ * MCI (SD/MMC)
+ */
+static struct at91_mmc_data __initdata afeb9260_mmc_data = {
+       .slot_b         = 1,
+       .wire4          = 1,
+};
+
+
+
+static struct i2c_board_info __initdata afeb9260_i2c_devices[] = {
+       {
+               I2C_BOARD_INFO("fm3130", 0x68),
+               I2C_BOARD_INFO("24c64", 0x50),
+       },
+};
+
+static void __init afeb9260_board_init(void)
+{
+       /* Serial */
+       at91_add_device_serial();
+       /* USB Host */
+       at91_add_device_usbh(&afeb9260_usbh_data);
+       /* USB Device */
+       at91_add_device_udc(&afeb9260_udc_data);
+       /* SPI */
+       at91_add_device_spi(afeb9260_spi_devices,
+                       ARRAY_SIZE(afeb9260_spi_devices));
+       /* NAND */
+       at91_add_device_nand(&afeb9260_nand_data);
+       /* Ethernet */
+       at91_add_device_eth(&afeb9260_macb_data);
+
+       /* Standard function's pin assignments are not
+        * appropriate for us and generic code provide
+        * no API to configure these pins any other way */
+       at91_set_B_periph(AT91_PIN_PA10, 0);    /* ETX2 */
+       at91_set_B_periph(AT91_PIN_PA11, 0);    /* ETX3 */
+       /* MMC */
+       at91_add_device_mmc(0, &afeb9260_mmc_data);
+       /* I2C */
+       at91_add_device_i2c(afeb9260_i2c_devices,
+                       ARRAY_SIZE(afeb9260_i2c_devices));
+}
+
+MACHINE_START(AFEB9260, "Custom afeb9260 board")
+       /* Maintainer: Sergey Lapin <slapin@ossfans.org> */
+       .phys_io        = AT91_BASE_SYS,
+       .io_pg_offst    = (AT91_VA_BASE_SYS >> 18) & 0xfffc,
+       .boot_params    = AT91_SDRAM_BASE + 0x100,
+       .timer          = &at91sam926x_timer,
+       .map_io         = afeb9260_map_io,
+       .init_irq       = afeb9260_init_irq,
+       .init_machine   = afeb9260_board_init,
+MACHINE_END
+
index 196199552eb6dbe18d079840994decf522fa37a5..201b89392dcc4ec91555b9d139ee87757b8a1004 100644 (file)
@@ -214,7 +214,7 @@ static struct physmap_flash_data cap9adk_nor_data = {
 };
 
 #define NOR_BASE       AT91_CHIPSELECT_0
-#define NOR_SIZE       0x800000
+#define NOR_SIZE       SZ_8M
 
 static struct resource nor_flash_resources[] = {
        {
index afa1ff0e9577813967ff03706a00c65aa66e0234..db1f9544d2e0f9af8cb9ef46b8a3d2a126408c27 100644 (file)
@@ -25,7 +25,6 @@
 #include <linux/module.h>
 #include <linux/platform_device.h>
 
-#include <mach/hardware.h>
 #include <asm/setup.h>
 #include <asm/mach-types.h>
 #include <asm/irq.h>
@@ -34,6 +33,7 @@
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
+#include <mach/hardware.h>
 #include <mach/board.h>
 #include <mach/gpio.h>
 
@@ -114,6 +114,30 @@ static struct spi_board_info carmeva_spi_devices[] = {
        },
 };
 
+static struct gpio_led carmeva_leds[] = {
+       { /* "user led 1", LED9 */
+               .name                   = "led9",
+               .gpio                   = AT91_PIN_PA21,
+               .active_low             = 1,
+               .default_trigger        = "heartbeat",
+       },
+       { /* "user led 2", LED10 */
+               .name                   = "led10",
+               .gpio                   = AT91_PIN_PA25,
+               .active_low             = 1,
+       },
+       { /* "user led 3", LED11 */
+               .name                   = "led11",
+               .gpio                   = AT91_PIN_PA26,
+               .active_low             = 1,
+       },
+       { /* "user led 4", LED12 */
+               .name                   = "led12",
+               .gpio                   = AT91_PIN_PA18,
+               .active_low             = 1,
+       }
+};
+
 static void __init carmeva_board_init(void)
 {
        /* Serial */
@@ -132,6 +156,8 @@ static void __init carmeva_board_init(void)
 //     at91_add_device_cf(&carmeva_cf_data);
        /* MMC */
        at91_add_device_mmc(0, &carmeva_mmc_data);
+       /* LEDs */
+       at91_gpio_leds(carmeva_leds, ARRAY_SIZE(carmeva_leds));
 }
 
 MACHINE_START(CARMEVA, "Carmeva")
index cb7c9a8fa487e09c123203743ade3d9441afea8a..fea2529ebcf9c781acb131aa7a1517bfc20ca772 100644 (file)
@@ -28,7 +28,6 @@
 #include <linux/input.h>
 #include <linux/gpio_keys.h>
 
-#include <mach/hardware.h>
 #include <asm/setup.h>
 #include <asm/mach-types.h>
 #include <asm/irq.h>
@@ -37,6 +36,7 @@
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
+#include <mach/hardware.h>
 #include <mach/board.h>
 #include <mach/gpio.h>
 
@@ -114,7 +114,7 @@ static struct spi_board_info csb337_spi_devices[] = {
 };
 
 #define CSB_FLASH_BASE AT91_CHIPSELECT_0
-#define CSB_FLASH_SIZE 0x800000
+#define CSB_FLASH_SIZE SZ_8M
 
 static struct mtd_partition csb_flash_partitions[] = {
        {
@@ -193,11 +193,11 @@ static struct platform_device csb300_button_device = {
 
 static void __init csb300_add_device_buttons(void)
 {
-       at91_set_gpio_input(AT91_PIN_PB29, 0);  /* sw0 */
+       at91_set_gpio_input(AT91_PIN_PB29, 1);  /* sw0 */
        at91_set_deglitch(AT91_PIN_PB29, 1);
-       at91_set_gpio_input(AT91_PIN_PB28, 0);  /* sw1 */
+       at91_set_gpio_input(AT91_PIN_PB28, 1);  /* sw1 */
        at91_set_deglitch(AT91_PIN_PB28, 1);
-       at91_set_gpio_input(AT91_PIN_PA21, 0);  /* sw2 */
+       at91_set_gpio_input(AT91_PIN_PA21, 1);  /* sw2 */
        at91_set_deglitch(AT91_PIN_PA21, 1);
 
        platform_device_register(&csb300_button_device);
@@ -224,7 +224,7 @@ static struct gpio_led csb_leds[] = {
                .gpio                   = AT91_PIN_PB0,
                .active_low             = 1,
                .default_trigger        = "ide-disk",
-       },
+       }
 };
 
 
index 8db8bd8babd96fd31de8d46d7e8eb8e5b8dd6d68..cfa3f04b22053e7d8d69d7f80fddbaf24a812ae7 100644 (file)
@@ -25,7 +25,6 @@
 #include <linux/platform_device.h>
 #include <linux/mtd/physmap.h>
 
-#include <mach/hardware.h>
 #include <asm/setup.h>
 #include <asm/mach-types.h>
 #include <asm/irq.h>
@@ -34,6 +33,7 @@
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
+#include <mach/hardware.h>
 #include <mach/board.h>
 #include <mach/gpio.h>
 
@@ -72,7 +72,7 @@ static struct at91_udc_data __initdata csb637_udc_data = {
 };
 
 #define CSB_FLASH_BASE AT91_CHIPSELECT_0
-#define CSB_FLASH_SIZE 0x1000000
+#define CSB_FLASH_SIZE SZ_16M
 
 static struct mtd_partition csb_flash_partitions[] = {
        {
index 43e1aa7ecef78cb27c98a9c9d0b7c100f904abde..0fd0f5bc77ea56623e83a37440da77e33f683af2 100644 (file)
@@ -29,7 +29,6 @@
 #include <linux/spi/spi.h>
 #include <linux/mtd/physmap.h>
 
-#include <mach/hardware.h>
 #include <asm/setup.h>
 #include <asm/mach-types.h>
 #include <asm/irq.h>
@@ -38,6 +37,7 @@
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
+#include <mach/hardware.h>
 #include <mach/board.h>
 #include <mach/gpio.h>
 #include <mach/at91rm9200_mc.h>
@@ -157,7 +157,7 @@ static struct atmel_nand_data __initdata dk_nand_data = {
 };
 
 #define DK_FLASH_BASE  AT91_CHIPSELECT_0
-#define DK_FLASH_SIZE  0x200000
+#define DK_FLASH_SIZE  SZ_2M
 
 static struct physmap_flash_data dk_flash_data = {
        .width          = 2,
index bfeee8a2af285a4e307be42c94a922de0626d007..1d69908617f07cdb18e58322f9c59fe61069da44 100644 (file)
@@ -86,7 +86,7 @@ static struct mtd_partition __initdata my_flash0_partitions[] =
        {       /* 0x8400 */
                .name   = "Darrell-loader",
                .offset = 0,
-               .size   = 12* 1056,
+               .size   = 12 * 1056,
        },
        {
                .name   = "U-boot",
index 60626e7a3490d4c3e1424a5e2da4a8781c473d45..4cdfaac8e590fe2397204d231c1091dde3571a85 100644 (file)
@@ -29,7 +29,6 @@
 #include <linux/spi/spi.h>
 #include <linux/mtd/physmap.h>
 
-#include <mach/hardware.h>
 #include <asm/setup.h>
 #include <asm/mach-types.h>
 #include <asm/irq.h>
@@ -38,6 +37,7 @@
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
+#include <mach/hardware.h>
 #include <mach/board.h>
 #include <mach/gpio.h>
 #include <mach/at91rm9200_mc.h>
@@ -116,7 +116,7 @@ static struct i2c_board_info __initdata ek_i2c_devices[] = {
 };
 
 #define EK_FLASH_BASE  AT91_CHIPSELECT_0
-#define EK_FLASH_SIZE  0x200000
+#define EK_FLASH_SIZE  SZ_2M
 
 static struct physmap_flash_data ek_flash_data = {
        .width          = 2,
index dbc912d633c76b4e52bba9374b55cb77a2e4a9c2..859727e7ea301adeb807246c98bb7d2df812f51b 100644 (file)
@@ -105,7 +105,7 @@ static struct at91_mmc_data __initdata picotux200_mmc_data = {
 // };
 
 #define PICOTUX200_FLASH_BASE  AT91_CHIPSELECT_0
-#define PICOTUX200_FLASH_SIZE  0x400000
+#define PICOTUX200_FLASH_SIZE  SZ_4M
 
 static struct physmap_flash_data picotux200_flash_data = {
        .width  = 2,
index 4c28413426c216f738d59ad0485fecb94875e691..cfb4571a2e275d00c52a587a8ed21d71d9d7b59a 100644 (file)
@@ -30,7 +30,6 @@
 #include <linux/input.h>
 #include <linux/clk.h>
 
-#include <mach/hardware.h>
 #include <asm/setup.h>
 #include <asm/mach-types.h>
 #include <asm/irq.h>
@@ -39,6 +38,7 @@
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
+#include <mach/hardware.h>
 #include <mach/board.h>
 #include <mach/gpio.h>
 #include <mach/at91_shdwc.h>
@@ -119,18 +119,18 @@ static struct at91_eth_data __initdata ek_macb_data = {
 static struct mtd_partition __initdata ek_nand_partition[] = {
        {
                .name   = "Uboot & Kernel",
-               .offset = 0x00000000,
-               .size   = 16 * 1024 * 1024,
+               .offset = 0,
+               .size   = SZ_16M,
        },
        {
                .name   = "Root FS",
-               .offset = 0x01000000,
-               .size   = 120 * 1024 * 1024,
+               .offset = MTDPART_OFS_NXTBLK,
+               .size   = 120 * SZ_1M,
        },
        {
                .name   = "FS",
-               .offset = 0x08800000,
-               .size   = 120 * 1024 * 1024,
+               .offset = MTDPART_OFS_NXTBLK,
+               .size   = 120 * SZ_1M,
        },
 };
 
index e4910cb26c16876cb63e8d3acac1704ff6ba01f5..99bb4cc23a0950af07d18712b077696c2f6842c9 100644 (file)
@@ -126,11 +126,11 @@ static struct mtd_partition __initdata ek_nand_partition[] = {
        {
                .name   = "Bootloader Area",
                .offset = 0,
-               .size   = 10 * 1024 * 1024,
+               .size   = 10 * SZ_1M,
        },
        {
                .name   = "User Area",
-               .offset = 10 * 1024 * 1024,
+               .offset = MTDPART_OFS_NXTBLK,
                .size   = MTDPART_SIZ_FULL,
        },
 };
index cb20e70b3b06293b405172fc82c575b957de3ccf..b49eb6e4918acc52ba87fe400634fd3ec2ed1f80 100644 (file)
 #include <linux/spi/spi.h>
 #include <linux/spi/at73c213.h>
 #include <linux/clk.h>
+#include <linux/i2c/at24.h>
+#include <linux/gpio_keys.h>
+#include <linux/input.h>
 
-#include <mach/hardware.h>
 #include <asm/setup.h>
 #include <asm/mach-types.h>
 #include <asm/irq.h>
@@ -37,6 +39,7 @@
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
+#include <mach/hardware.h>
 #include <mach/board.h>
 #include <mach/gpio.h>
 
@@ -163,11 +166,11 @@ static struct mtd_partition __initdata ek_nand_partition[] = {
        {
                .name   = "Partition 1",
                .offset = 0,
-               .size   = 256 * 1024,
+               .size   = SZ_256K,
        },
        {
                .name   = "Partition 2",
-               .offset = 256 * 1024,
+               .offset = MTDPART_OFS_NXTBLK,
                .size   = MTDPART_SIZ_FULL,
        },
 };
@@ -222,6 +225,73 @@ static struct gpio_led ek_leds[] = {
        }
 };
 
+/*
+ * I2C devices
+ */
+static struct at24_platform_data at24c512 = {
+       .byte_len       = SZ_512K / 8,
+       .page_size      = 128,
+       .flags          = AT24_FLAG_ADDR16,
+};
+
+static struct i2c_board_info __initdata ek_i2c_devices[] = {
+       {
+               I2C_BOARD_INFO("24c512", 0x50),
+               .platform_data = &at24c512,
+       },
+       /* more devices can be added using expansion connectors */
+};
+
+
+/*
+ * GPIO Buttons
+ */
+#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
+static struct gpio_keys_button ek_buttons[] = {
+       {
+               .gpio           = AT91_PIN_PA30,
+               .code           = BTN_3,
+               .desc           = "Button 3",
+               .active_low     = 1,
+               .wakeup         = 1,
+       },
+       {
+               .gpio           = AT91_PIN_PA31,
+               .code           = BTN_4,
+               .desc           = "Button 4",
+               .active_low     = 1,
+               .wakeup         = 1,
+       }
+};
+
+static struct gpio_keys_platform_data ek_button_data = {
+       .buttons        = ek_buttons,
+       .nbuttons       = ARRAY_SIZE(ek_buttons),
+};
+
+static struct platform_device ek_button_device = {
+       .name           = "gpio-keys",
+       .id             = -1,
+       .num_resources  = 0,
+       .dev            = {
+               .platform_data  = &ek_button_data,
+       }
+};
+
+static void __init ek_add_device_buttons(void)
+{
+       at91_set_gpio_input(AT91_PIN_PA30, 1);  /* btn3 */
+       at91_set_deglitch(AT91_PIN_PA30, 1);
+       at91_set_gpio_input(AT91_PIN_PA31, 1);  /* btn4 */
+       at91_set_deglitch(AT91_PIN_PA31, 1);
+
+       platform_device_register(&ek_button_device);
+}
+#else
+static void __init ek_add_device_buttons(void) {}
+#endif
+
+
 static void __init ek_board_init(void)
 {
        /* Serial */
@@ -239,12 +309,14 @@ static void __init ek_board_init(void)
        /* MMC */
        at91_add_device_mmc(0, &ek_mmc_data);
        /* I2C */
-       at91_add_device_i2c(NULL, 0);
+       at91_add_device_i2c(ek_i2c_devices, ARRAY_SIZE(ek_i2c_devices));
        /* SSC (to AT73C213) */
        at73c213_set_clk(&at73c213_data);
        at91_add_device_ssc(AT91SAM9260_ID_SSC, ATMEL_SSC_TX);
        /* LEDs */
        at91_gpio_leds(ek_leds, ARRAY_SIZE(ek_leds));
+       /* Push Buttons */
+       ek_add_device_buttons();
 }
 
 MACHINE_START(AT91SAM9260EK, "Atmel AT91SAM9260-EK")
index 1a9963b811c790e061fe490b4521b86db7fedf72..4977409d4fc6bcb72e3f17fa8a5646526040b9e5 100644 (file)
@@ -35,7 +35,6 @@
 
 #include <video/atmel_lcdc.h>
 
-#include <mach/hardware.h>
 #include <asm/setup.h>
 #include <asm/mach-types.h>
 #include <asm/irq.h>
@@ -44,6 +43,7 @@
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
+#include <mach/hardware.h>
 #include <mach/board.h>
 #include <mach/gpio.h>
 #include <mach/at91sam9_smc.h>
@@ -168,11 +168,11 @@ static struct mtd_partition __initdata ek_nand_partition[] = {
        {
                .name   = "Partition 1",
                .offset = 0,
-               .size   = 256 * 1024,
+               .size   = SZ_256K,
        },
        {
                .name   = "Partition 2",
-               .offset = 256 * 1024 ,
+               .offset = MTDPART_OFS_NXTBLK,
                .size   = MTDPART_SIZ_FULL,
        },
 };
@@ -435,24 +435,28 @@ static struct gpio_keys_button ek_buttons[] = {
                .code           = BTN_0,
                .desc           = "Button 0",
                .active_low     = 1,
+               .wakeup         = 1,
        },
        {
                .gpio           = AT91_PIN_PA26,
                .code           = BTN_1,
                .desc           = "Button 1",
                .active_low     = 1,
+               .wakeup         = 1,
        },
        {
                .gpio           = AT91_PIN_PA25,
                .code           = BTN_2,
                .desc           = "Button 2",
                .active_low     = 1,
+               .wakeup         = 1,
        },
        {
                .gpio           = AT91_PIN_PA24,
                .code           = BTN_3,
                .desc           = "Button 3",
                .active_low     = 1,
+               .wakeup         = 1,
        }
 };
 
@@ -472,13 +476,13 @@ static struct platform_device ek_button_device = {
 
 static void __init ek_add_device_buttons(void)
 {
-       at91_set_gpio_input(AT91_PIN_PA27, 0);  /* btn0 */
+       at91_set_gpio_input(AT91_PIN_PA27, 1);  /* btn0 */
        at91_set_deglitch(AT91_PIN_PA27, 1);
-       at91_set_gpio_input(AT91_PIN_PA26, 0);  /* btn1 */
+       at91_set_gpio_input(AT91_PIN_PA26, 1);  /* btn1 */
        at91_set_deglitch(AT91_PIN_PA26, 1);
-       at91_set_gpio_input(AT91_PIN_PA25, 0);  /* btn2 */
+       at91_set_gpio_input(AT91_PIN_PA25, 1);  /* btn2 */
        at91_set_deglitch(AT91_PIN_PA25, 1);
-       at91_set_gpio_input(AT91_PIN_PA24, 0);  /* btn3 */
+       at91_set_gpio_input(AT91_PIN_PA24, 1);  /* btn3 */
        at91_set_deglitch(AT91_PIN_PA24, 1);
 
        platform_device_register(&ek_button_device);
index b1d11960a735f75dee6b4d982b4023e390088bf0..8354015c6a23268817caeccfe58f26646d8a7c60 100644 (file)
 #include <linux/platform_device.h>
 #include <linux/spi/spi.h>
 #include <linux/spi/ads7846.h>
+#include <linux/i2c/at24.h>
 #include <linux/fb.h>
 #include <linux/gpio_keys.h>
 #include <linux/input.h>
+#include <linux/leds.h>
 
 #include <video/atmel_lcdc.h>
 
-#include <mach/hardware.h>
 #include <asm/setup.h>
 #include <asm/mach-types.h>
 #include <asm/irq.h>
@@ -41,6 +42,7 @@
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
+#include <mach/hardware.h>
 #include <mach/board.h>
 #include <mach/gpio.h>
 #include <mach/at91sam9_smc.h>
@@ -172,11 +174,11 @@ static struct mtd_partition __initdata ek_nand_partition[] = {
        {
                .name   = "Partition 1",
                .offset = 0,
-               .size   = 64 * 1024 * 1024,
+               .size   = SZ_64M,
        },
        {
                .name   = "Partition 2",
-               .offset = 64 * 1024 * 1024,
+               .offset = MTDPART_OFS_NXTBLK,
                .size   = MTDPART_SIZ_FULL,
        },
 };
@@ -202,13 +204,31 @@ static struct atmel_nand_data __initdata ek_nand_data = {
 };
 
 
+/*
+ * I2C devices
+ */
+static struct at24_platform_data at24c512 = {
+       .byte_len       = SZ_512K / 8,
+       .page_size      = 128,
+       .flags          = AT24_FLAG_ADDR16,
+};
+
+
+static struct i2c_board_info __initdata ek_i2c_devices[] = {
+       {
+               I2C_BOARD_INFO("24c512", 0x50),
+               .platform_data = &at24c512,
+       },
+       /* more devices can be added using expansion connectors */
+};
+
 /*
  * LCD Controller
  */
 #if defined(CONFIG_FB_ATMEL) || defined(CONFIG_FB_ATMEL_MODULE)
 static struct fb_videomode at91_tft_vga_modes[] = {
        {
-               .name           = "TX09D50VM1CCA @ 60",
+               .name           = "TX09D50VM1CCA @ 60",
                .refresh        = 60,
                .xres           = 240,          .yres           = 320,
                .pixclock       = KHZ2PICOS(4965),
@@ -224,7 +244,7 @@ static struct fb_videomode at91_tft_vga_modes[] = {
 
 static struct fb_monspecs at91fb_default_monspecs = {
        .manufacturer   = "HIT",
-       .monitor        = "TX09D70VM1CCA",
+       .monitor        = "TX09D70VM1CCA",
 
        .modedb         = at91_tft_vga_modes,
        .modedb_len     = ARRAY_SIZE(at91_tft_vga_modes),
@@ -235,7 +255,7 @@ static struct fb_monspecs at91fb_default_monspecs = {
 };
 
 #define AT91SAM9263_DEFAULT_LCDCON2    (ATMEL_LCDC_MEMOR_LITTLE \
-                                       | ATMEL_LCDC_DISTYPE_TFT    \
+                                       | ATMEL_LCDC_DISTYPE_TFT \
                                        | ATMEL_LCDC_CLKMOD_ALWAYSACTIVE)
 
 static void at91_lcdc_power_control(int on)
@@ -277,7 +297,7 @@ static struct gpio_keys_button ek_buttons[] = {
                .active_low     = 1,
                .desc           = "right_click",
                .wakeup         = 1,
-       },
+       }
 };
 
 static struct gpio_keys_platform_data ek_button_data = {
@@ -296,9 +316,9 @@ static struct platform_device ek_button_device = {
 
 static void __init ek_add_device_buttons(void)
 {
-       at91_set_GPIO_periph(AT91_PIN_PC5, 0);  /* left button */
+       at91_set_GPIO_periph(AT91_PIN_PC5, 1);  /* left button */
        at91_set_deglitch(AT91_PIN_PC5, 1);
-       at91_set_GPIO_periph(AT91_PIN_PC4, 0);  /* right button */
+       at91_set_GPIO_periph(AT91_PIN_PC4, 1);  /* right button */
        at91_set_deglitch(AT91_PIN_PC4, 1);
 
        platform_device_register(&ek_button_device);
@@ -320,25 +340,32 @@ static struct atmel_ac97_data ek_ac97_data = {
  * LEDs ... these could all be PWM-driven, for variable brightness
  */
 static struct gpio_led ek_leds[] = {
-       {       /* "left" led, green, userled1, pwm1 */
-               .name                   = "ds1",
-               .gpio                   = AT91_PIN_PB8,
-               .active_low             = 1,
-               .default_trigger        = "mmc0",
-       },
-       {       /* "right" led, green, userled2, pwm2 */
+       {       /* "right" led, green, userled2 (could be driven by pwm2) */
                .name                   = "ds2",
                .gpio                   = AT91_PIN_PC29,
                .active_low             = 1,
                .default_trigger        = "nand-disk",
        },
-       {       /* "power" led, yellow, pwm0 */
+       {       /* "power" led, yellow (could be driven by pwm0) */
                .name                   = "ds3",
                .gpio                   = AT91_PIN_PB7,
                .default_trigger        = "heartbeat",
        }
 };
 
+/*
+ * PWM Leds
+ */
+static struct gpio_led ek_pwm_led[] = {
+       /* For now only DS1 is PWM-driven (by pwm1) */
+       {
+               .name                   = "ds1",
+               .gpio                   = 1,    /* is PWM channel number */
+               .active_low             = 1,
+               .default_trigger        = "none",
+       }
+};
+
 
 static void __init ek_board_init(void)
 {
@@ -360,7 +387,7 @@ static void __init ek_board_init(void)
        /* NAND */
        at91_add_device_nand(&ek_nand_data);
        /* I2C */
-       at91_add_device_i2c(NULL, 0);
+       at91_add_device_i2c(ek_i2c_devices, ARRAY_SIZE(ek_i2c_devices));
        /* LCD Controller */
        at91_add_device_lcdc(&ek_lcdc_data);
        /* Push Buttons */
@@ -369,6 +396,7 @@ static void __init ek_board_init(void)
        at91_add_device_ac97(&ek_ac97_data);
        /* LEDs */
        at91_gpio_leds(ek_leds, ARRAY_SIZE(ek_leds));
+       at91_pwm_leds(ek_pwm_led, ARRAY_SIZE(ek_pwm_led));
 }
 
 MACHINE_START(AT91SAM9263EK, "Atmel AT91SAM9263-EK")
index d4eba5c0ce0262ae2b5885d7022ddb3cc38e6e87..b588ead14d68a4cb569f1ca8384c166a32bffb33 100644 (file)
@@ -122,16 +122,16 @@ static struct mtd_partition __initdata ek_nand_partition[] = {
        {
                .name   = "Bootstrap",
                .offset = 0,
-               .size   = 4 * 1024 * 1024,
+               .size   = 4 * SZ_1M,
        },
        {
                .name   = "Partition 1",
-               .offset = 4 * 1024 * 1024,
-               .size   = 60 * 1024 * 1024,
+               .offset = MTDPART_OFS_NXTBLK,
+               .size   = 60 * SZ_1M,
        },
        {
                .name   = "Partition 2",
-               .offset = 64 * 1024 * 1024,
+               .offset = MTDPART_OFS_NXTBLK,
                .size   = MTDPART_SIZ_FULL,
        },
 };
index c6dce49c388c92b70a35b807dcfe9bbde907b567..2708518643084f78d6eacd5d1e04c3a214ec53b9 100644 (file)
@@ -18,7 +18,6 @@
 
 #include <video/atmel_lcdc.h>
 
-#include <mach/hardware.h>
 #include <asm/setup.h>
 #include <asm/mach-types.h>
 #include <asm/irq.h>
@@ -27,6 +26,7 @@
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
+#include <mach/hardware.h>
 #include <mach/board.h>
 #include <mach/gpio.h>
 #include <mach/at91sam9_smc.h>
@@ -81,11 +81,11 @@ static struct mtd_partition __initdata ek_nand_partition[] = {
        {
                .name   = "Partition 1",
                .offset = 0,
-               .size   = 256 * 1024,
+               .size   = SZ_256K,
        },
        {
                .name   = "Partition 2",
-               .offset = 256 * 1024 ,
+               .offset = MTDPART_OFS_NXTBLK,
                .size   = MTDPART_SIZ_FULL,
        },
 };
@@ -195,6 +195,8 @@ static void __init ek_board_init(void)
        at91_add_device_mmc(0, &ek_mmc_data);
        /* LCD Controller */
        at91_add_device_lcdc(&ek_lcdc_data);
+       /* Touch Screen Controller */
+       at91_add_device_tsadcc();
 }
 
 MACHINE_START(AT91SAM9RLEK, "Atmel AT91SAM9RL-EK")
index f9d0b65da40b1bbfaf3472c0eb52070b7f9d7549..7c350357333a0b708cc143d1efcb3df01ee61f05 100644 (file)
@@ -30,7 +30,6 @@
 #include <linux/input.h>
 #include <linux/clk.h>
 
-#include <mach/hardware.h>
 #include <asm/setup.h>
 #include <asm/mach-types.h>
 #include <asm/irq.h>
@@ -39,6 +38,7 @@
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
+#include <mach/hardware.h>
 #include <mach/board.h>
 #include <mach/gpio.h>
 #include <mach/at91_shdwc.h>
@@ -93,18 +93,18 @@ static struct at91_eth_data __initdata ek_macb_data = {
 static struct mtd_partition __initdata ek_nand_partition[] = {
        {
                .name   = "Uboot & Kernel",
-               .offset = 0x00000000,
-               .size   = 16 * 1024 * 1024,
+               .offset = 0,
+               .size   = SZ_16M,
        },
        {
                .name   = "Root FS",
-               .offset = 0x01000000,
-               .size   = 120 * 1024 * 1024,
+               .offset = MTDPART_OFS_NXTBLK,
+               .size   = 120 * SZ_1M,
        },
        {
                .name   = "FS",
-               .offset = 0x08800000,
-               .size   = 120 * 1024 * 1024,
+               .offset = MTDPART_OFS_NXTBLK,
+               .size   = 120 * SZ_1M,
        }
 };
 
index 673e5c27214d93f8833357bee27fc91265c6e425..391b566c4571153ad345b67c1e6b903ab008df0e 100644 (file)
@@ -29,7 +29,6 @@
 #include <linux/gpio_keys.h>
 #include <linux/input.h>
 
-#include <mach/hardware.h>
 #include <asm/setup.h>
 #include <asm/mach-types.h>
 #include <asm/irq.h>
@@ -38,6 +37,7 @@
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
+#include <mach/hardware.h>
 #include <mach/board.h>
 #include <mach/gpio.h>
 #include <mach/at91_shdwc.h>
@@ -106,18 +106,18 @@ static struct at91_eth_data __initdata ek_macb_data = {
 static struct mtd_partition __initdata ek_nand_partition[] = {
        {
                .name   = "Linux Kernel",
-               .offset = 0x00000000,
-               .size   = 16 * 1024 * 1024,
+               .offset = 0,
+               .size   = SZ_16M,
        },
        {
                .name   = "Root FS",
-               .offset = 0x01000000,
-               .size   = 120 * 1024 * 1024,
+               .offset = MTDPART_OFS_NXTBLK,
+               .size   = 120 * SZ_1M,
        },
        {
                .name   = "FS",
-               .offset = 0x08800000,
-               .size   = 120 * 1024 * 1024,
+               .offset = MTDPART_OFS_NXTBLK,
+               .size   = 120 * SZ_1M,
        }
 };
 
index 36b380aad006d9c5fd32a9a986c58b6b47abaf81..e22bf051f835a1485453c7e8dea1102160dc416a 100644 (file)
@@ -33,7 +33,6 @@
 #include <linux/gpio_keys.h>
 #include <linux/input.h>
 
-#include <mach/hardware.h>
 #include <asm/setup.h>
 #include <asm/mach-types.h>
 #include <asm/irq.h>
@@ -42,6 +41,7 @@
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
+#include <mach/hardware.h>
 #include <mach/board.h>
 #include <mach/gpio.h>
 #include <mach/at91rm9200_mc.h>
@@ -150,27 +150,27 @@ static struct mtd_partition __initdata yl9200_nand_partition[] = {
        {
                .name   = "AT91 NAND partition 1, boot",
                .offset = 0,
-               .size   = 1 * SZ_256K
+               .size   = SZ_256K
        },
        {
                .name   = "AT91 NAND partition 2, kernel",
-               .offset = 1 * SZ_256K,
-               .size   = 2 * SZ_1M - 1 * SZ_256K
+               .offset = MTDPART_OFS_NXTBLK,
+               .size   = (2 * SZ_1M) - SZ_256K
        },
        {
                .name   = "AT91 NAND partition 3, filesystem",
-               .offset = 2 * SZ_1M,
+               .offset = MTDPART_OFS_NXTBLK,
                .size   = 14 * SZ_1M
        },
        {
                .name   = "AT91 NAND partition 4, storage",
-               .offset = 16 * SZ_1M,
-               .size   = 16 * SZ_1M
+               .offset = MTDPART_OFS_NXTBLK,
+               .size   = SZ_16M
        },
        {
                .name   = "AT91 NAND partition 5, ext-fs",
-               .offset = 32 * SZ_1M,
-               .size   = 32 * SZ_1M
+               .offset = MTDPART_OFS_NXTBLK,
+               .size   = SZ_32M
        }
 };
 
@@ -193,24 +193,24 @@ static struct atmel_nand_data __initdata yl9200_nand_data = {
  * NOR Flash
  */
 #define YL9200_FLASH_BASE      AT91_CHIPSELECT_0
-#define YL9200_FLASH_SIZE      0x1000000
+#define YL9200_FLASH_SIZE      SZ_16M
 
 static struct mtd_partition yl9200_flash_partitions[] = {
        {
                .name           = "Bootloader",
-               .size           = 0x00040000,
                .offset         = 0,
+               .size           = SZ_256K,
                .mask_flags     = MTD_WRITEABLE,        /* force read-only */
        },
        {
                .name           = "Kernel",
-               .size           = 0x001C0000,
-               .offset         = 0x00040000,
+               .offset         = MTDPART_OFS_NXTBLK,
+               .size           = (2 * SZ_1M) - SZ_256K
        },
        {
                .name           = "Filesystem",
-               .size           = MTDPART_SIZ_FULL,
-               .offset         = 0x00200000
+               .offset         = MTDPART_OFS_NXTBLK,
+               .size           = MTDPART_SIZ_FULL
        }
 };
 
@@ -390,10 +390,6 @@ static struct spi_board_info yl9200_spi_devices[] = {
 #if defined(CONFIG_FB_S1D135XX) || defined(CONFIG_FB_S1D13XXX_MODULE)
 #include <video/s1d13xxxfb.h>
 
-#define AT91_FB_REG_BASE       0x80000000L
-#define AT91_FB_REG_SIZE       0x200
-#define AT91_FB_VMEM_BASE      0x80200000L
-#define AT91_FB_VMEM_SIZE      0x200000L
 
 static void __init yl9200_init_video(void)
 {
@@ -516,29 +512,33 @@ static struct s1d13xxxfb_regval yl9200_s1dfb_initregs[] =
        {S1DREG_COM_DISP_MODE,          0x01},  /* Display Mode Register, LCD only*/
 };
 
-static u64 s1dfb_dmamask = DMA_BIT_MASK(32);
-
 static struct s1d13xxxfb_pdata yl9200_s1dfb_pdata = {
        .initregs               = yl9200_s1dfb_initregs,
        .initregssize           = ARRAY_SIZE(yl9200_s1dfb_initregs),
        .platform_init_video    = yl9200_init_video,
 };
 
+#define YL9200_FB_REG_BASE     AT91_CHIPSELECT_7
+#define YL9200_FB_VMEM_BASE    YL9200_FB_REG_BASE + SZ_2M
+#define YL9200_FB_VMEM_SIZE    SZ_2M
+
 static struct resource yl9200_s1dfb_resource[] = {
        [0] = { /* video mem */
                .name   = "s1d13xxxfb memory",
-               .start  = AT91_FB_VMEM_BASE,
-               .end    = AT91_FB_VMEM_BASE + AT91_FB_VMEM_SIZE -1,
+               .start  = YL9200_FB_VMEM_BASE,
+               .end    = YL9200_FB_VMEM_BASE + YL9200_FB_VMEM_SIZE -1,
                .flags  = IORESOURCE_MEM,
        },
        [1] = { /* video registers */
                .name   = "s1d13xxxfb registers",
-               .start  = AT91_FB_REG_BASE,
-               .end    = AT91_FB_REG_BASE + AT91_FB_REG_SIZE -1,
+               .start  = YL9200_FB_REG_BASE,
+               .end    = YL9200_FB_REG_BASE + SZ_512 -1,
                .flags  = IORESOURCE_MEM,
        },
 };
 
+static u64 s1dfb_dmamask = DMA_BIT_MASK(32);
+
 static struct platform_device yl9200_s1dfb_device = {
        .name           = "s1d13806fb",
        .id             = -1,
index f5c2847161f582906f21bd686e03da07ed9bff0c..e4345106ee57ea1da11416c1a6abbc9a1baed94a 100644 (file)
@@ -22,8 +22,7 @@
 #include <linux/spinlock.h>
 #include <linux/delay.h>
 #include <linux/clk.h>
-
-#include <asm/io.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
 #include <mach/at91_pmc.h>
index 8392d5b517f15bc5dad300565188e4dafcccfe46..7e5ebb5bdd17c8e43fb2f25ccf93e5e824e17c3e 100644 (file)
@@ -18,8 +18,8 @@
 #include <linux/kernel.h>
 #include <linux/list.h>
 #include <linux/module.h>
+#include <linux/io.h>
 
-#include <asm/io.h>
 #include <mach/hardware.h>
 #include <mach/at91_pio.h>
 #include <mach/gpio.h>
@@ -404,7 +404,6 @@ static void gpio_irq_handler(unsigned irq, struct irq_desc *desc)
                }
 
                pin = bank->chipbase;
-               gpio = &irq_desc[pin];
 
                while (isr) {
                        if (isr & 1) {
@@ -417,7 +416,7 @@ static void gpio_irq_handler(unsigned irq, struct irq_desc *desc)
                                        gpio_irq_mask(pin);
                                }
                                else
-                                       desc_handle_irq(pin, gpio);
+                                       generic_handle_irq(pin);
                        }
                        pin++;
                        gpio++;
index 0448ac36eadb29d5bbc7194484ea80a2639cf125..974d0bd05b5bd07dde5defd2a4df1ddcf60151a0 100644 (file)
@@ -1,6 +1,9 @@
 /*
  * arch/arm/mach-at91/include/mach/at91_pit.h
  *
+ * Copyright (C) 2007 Andrew Victor
+ * Copyright (C) 2007 Atmel Corporation.
+ *
  * Periodic Interval Timer (PIT) - System peripherals regsters.
  * Based on AT91SAM9261 datasheet revision D.
  *
index 7cd1b39aaa43a4ffcbef66ce5c3e13521fe8d458..cbd2bf052c1f0e64937146e48ed5521f321d0c75 100644 (file)
@@ -1,6 +1,9 @@
 /*
  * arch/arm/mach-at91/include/mach/at91_rstc.h
  *
+ * Copyright (C) 2007 Andrew Victor
+ * Copyright (C) 2007 Atmel Corporation.
+ *
  * Reset Controller (RSTC) - System peripherals regsters.
  * Based on AT91SAM9261 datasheet revision D.
  *
index 71782e5d21591233f1394d8b02cac439b1143ece..7ec75de8bbb6d9d3b6fa11cc6a30c67c2fee6c87 100644 (file)
@@ -1,6 +1,9 @@
 /*
  * arch/arm/mach-at91/include/mach/at91_rtt.h
  *
+ * Copyright (C) 2007 Andrew Victor
+ * Copyright (C) 2007 Atmel Corporation.
+ *
  * Real-time Timer (RTT) - System peripherals regsters.
  * Based on AT91SAM9261 datasheet revision D.
  *
index 60be5ae624f1089520c2cc43692108cd4a726fba..c4ce07e8a8faa5a1b639d278436a95455804785f 100644 (file)
@@ -1,6 +1,9 @@
 /*
  * arch/arm/mach-at91/include/mach/at91_shdwc.h
  *
+ * Copyright (C) 2007 Andrew Victor
+ * Copyright (C) 2007 Atmel Corporation.
+ *
  * Shutdown Controller (SHDWC) - System peripherals regsters.
  * Based on AT91SAM9261 datasheet revision D.
  *
index 973b4526a98eec11a6e1defc3b3f4ada3e42f446..fecc2e9f0ca8254d51e932f77efeac07cc204119 100644 (file)
@@ -1,6 +1,9 @@
 /*
  * arch/arm/mach-at91/include/mach/at91_wdt.h
  *
+ * Copyright (C) 2007 Andrew Victor
+ * Copyright (C) 2007 Atmel Corporation.
+ *
  * Watchdog Timer (WDT) - System peripherals regsters.
  * Based on AT91SAM9261 datasheet revision D.
  *
index bca878f3bd877ae9c731847459a31af734c0f4c4..1499b1cbffddbe6c3f0ff3d70617d2314d574ab4 100644 (file)
@@ -1,6 +1,8 @@
 /*
  * arch/arm/mach-at91/include/mach/at91cap9_ddrsdr.h
  *
+ *  (C) 2008 Andrew Victor
+ *
  * DDR/SDR Controller (DDRSDRC) - System peripherals registers.
  * Based on AT91CAP9 datasheet revision B.
  *
index f027de5df956441d02280fecfc1acdd33509bf9a..020f02ed921a85590b03bb8a9c27552992354096 100644 (file)
@@ -1,6 +1,8 @@
 /*
  * arch/arm/mach-at91/include/mach/at91sam9260_matrix.h
  *
+ *  Copyright (C) 2007 Atmel Corporation.
+ *
  * Memory Controllers (MATRIX, EBI) - System peripherals registers.
  * Based on AT91SAM9260 datasheet revision B.
  *
index db62b1f18300075be68ca16fd83a212e26ad94aa..69c6501915d90af928427a0d58da6fe5cb8c6c1a 100644 (file)
@@ -1,6 +1,8 @@
 /*
  * arch/arm/mach-at91/include/mach/at91sam9261_matrix.h
  *
+ *  Copyright (C) 2007 Atmel Corporation.
+ *
  * Memory Controllers (MATRIX, EBI) - System peripherals registers.
  * Based on AT91SAM9261 datasheet revision D.
  *
index 1921181c63ca8991c72bc6ee4abfd15eba572815..b7260389f7cac2a51937143c10e55e3e75ee8aa9 100644 (file)
@@ -1,6 +1,9 @@
 /*
  * arch/arm/mach-at91/include/mach/at91sam9_sdramc.h
  *
+ * Copyright (C) 2007 Andrew Victor
+ * Copyright (C) 2007 Atmel Corporation.
+ *
  * SDRAM Controllers (SDRAMC) - System peripherals registers.
  * Based on AT91SAM9261 datasheet revision D.
  *
index ec6ad1338b5a5eba7900db99ab39bf9cdf2b38b8..57de6207e57e566842ea53cb2113b27796ce3c47 100644 (file)
@@ -1,6 +1,9 @@
 /*
  * arch/arm/mach-at91/include/mach/at91sam9_smc.h
  *
+ * Copyright (C) 2007 Andrew Victor
+ * Copyright (C) 2007 Atmel Corporation.
+ *
  * Static Memory Controllers (SMC) - System peripherals registers.
  * Based on AT91SAM9261 datasheet revision D.
  *
index acd60f2a0724ad6c67f29f77eb0df7f4ed1d7988..fb51f0e0a83fb933b718c80960a46cd60b831ce8 100644 (file)
@@ -132,6 +132,16 @@ struct atmel_uart_data {
 };
 extern void __init at91_add_device_serial(void);
 
+/*
+ * PWM
+ */
+#define AT91_PWM0      0
+#define AT91_PWM1      1
+#define AT91_PWM2      2
+#define AT91_PWM3      3
+
+extern void __init at91_add_device_pwm(u32 mask);
+
 /*
  * SSC -- accessed through ssc_request(id).  Drivers don't bind to SSC
  * platform devices.  Their SSC ID is part of their configuration data,
@@ -162,9 +172,13 @@ extern void __init at91_add_device_ac97(struct atmel_ac97_data *data);
  /* ISI */
 extern void __init at91_add_device_isi(void);
 
+ /* Touchscreen Controller */
+extern void __init at91_add_device_tsadcc(void);
+
  /* LEDs */
 extern void __init at91_init_leds(u8 cpu_led, u8 timer_led);
 extern void __init at91_gpio_leds(struct gpio_led *leds, int nr);
+extern void __init at91_pwm_leds(struct gpio_led *leds, int nr);
 
 /* FIXME: this needs a better location, but gets stuff building again */
 extern int at91_suspend_entering_slow_clock(void);
index bda29ccbcd9484a11c6b15210856beae2ff1ee80..36bd55f3fc6ef1957f444431cdd5edbc44032717 100644 (file)
@@ -21,7 +21,7 @@
 #ifndef __ASM_ARCH_IRQS_H
 #define __ASM_ARCH_IRQS_H
 
-#include <asm/io.h>
+#include <linux/io.h>
 #include <mach/at91_aic.h>
 
 #define NR_AIC_IRQS 32
index 0410d548e9b1fa4426f6cfb192d5fbf08e1fc0a4..18bdcdeb474fb74713d9bcb7bd6a75bd6a2dd7c9 100644 (file)
@@ -21,7 +21,7 @@
 #ifndef __ASM_ARCH_UNCOMPRESS_H
 #define __ASM_ARCH_UNCOMPRESS_H
 
-#include <asm/io.h>
+#include <linux/io.h>
 #include <linux/atmel_serial.h>
 
 #if defined(CONFIG_AT91_EARLY_DBGU)
index fec03c59ff94f382a9026bf699a95b00bd7804e0..0415a839e1ad9319944a662b409799015f9fde3d 100644 (file)
@@ -12,6 +12,7 @@
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/init.h>
+#include <linux/platform_device.h>
 
 #include <mach/board.h>
 #include <mach/gpio.h>
 
 #if defined(CONFIG_NEW_LEDS)
 
-#include <linux/platform_device.h>
-
 /*
  * New cross-platform LED support.
  */
 
 static struct gpio_led_platform_data led_data;
 
-static struct platform_device at91_leds = {
+static struct platform_device at91_gpio_leds_device = {
        .name                   = "leds-gpio",
        .id                     = -1,
        .dev.platform_data      = &led_data,
@@ -47,7 +46,7 @@ void __init at91_gpio_leds(struct gpio_led *leds, int nr)
 
        led_data.leds = leds;
        led_data.num_leds = nr;
-       platform_device_register(&at91_leds);
+       platform_device_register(&at91_gpio_leds_device);
 }
 
 #else
@@ -55,6 +54,44 @@ void __init at91_gpio_leds(struct gpio_led *leds, int nr) {}
 #endif
 
 
+/* ------------------------------------------------------------------------- */
+
+#if defined (CONFIG_LEDS_ATMEL_PWM)
+
+/*
+ * PWM Leds
+ */
+
+static struct gpio_led_platform_data pwm_led_data;
+
+static struct platform_device at91_pwm_leds_device = {
+       .name                   = "leds-atmel-pwm",
+       .id                     = -1,
+       .dev.platform_data      = &pwm_led_data,
+};
+
+void __init at91_pwm_leds(struct gpio_led *leds, int nr)
+{
+       int i;
+       u32 pwm_mask = 0;
+
+       if (!nr)
+               return;
+
+       for (i = 0; i < nr; i++)
+               pwm_mask |= (1 << leds[i].gpio);
+
+       pwm_led_data.leds = leds;
+       pwm_led_data.num_leds = nr;
+
+       at91_add_device_pwm(pwm_mask);
+       platform_device_register(&at91_pwm_leds_device);
+}
+#else
+void __init at91_pwm_leds(struct gpio_led *leds, int nr){}
+#endif
+
+
 /* ------------------------------------------------------------------------- */
 
 #if defined(CONFIG_LEDS)
index ec2fe4ca1e270e3aec4fddd84b5f71019ee7117a..9bb4f043aa22beb3fd08d0750cb75c155097b113 100644 (file)
@@ -17,8 +17,8 @@
 #include <linux/sysfs.h>
 #include <linux/module.h>
 #include <linux/platform_device.h>
+#include <linux/io.h>
 
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/atomic.h>
 #include <asm/mach/time.h>
diff --git a/arch/arm/mach-at91/pm_slowclock.S b/arch/arm/mach-at91/pm_slowclock.S
new file mode 100644 (file)
index 0000000..987fab3
--- /dev/null
@@ -0,0 +1,283 @@
+/*
+ * arch/arm/mach-at91/pm_slow_clock.S
+ *
+ *  Copyright (C) 2006 Savin Zlobec
+ *
+ * AT91SAM9 support:
+ *  Copyright (C) 2007 Anti Sullin <anti.sullin@artecdesign.ee
+ *
+ * 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 <mach/hardware.h>
+#include <mach/at91_pmc.h>
+
+#ifdef CONFIG_ARCH_AT91RM9200
+#include <mach/at91rm9200_mc.h>
+#elif defined(CONFIG_ARCH_AT91CAP9)
+#include <mach/at91cap9_ddrsdr.h>
+#else
+#include <mach/at91sam9_sdramc.h>
+#endif
+
+
+#ifdef CONFIG_ARCH_AT91SAM9263
+/*
+ * FIXME either or both the SDRAM controllers (EB0, EB1) might be in use;
+ * handle those cases both here and in the Suspend-To-RAM support.
+ */
+#define AT91_SDRAMC    AT91_SDRAMC0
+#warning Assuming EB1 SDRAM controller is *NOT* used
+#endif
+
+/*
+ * When SLOWDOWN_MASTER_CLOCK is defined we will also slow down the Master
+ * clock during suspend by adjusting its prescalar and divisor.
+ * NOTE: This hasn't been shown to be stable on SAM9s; and on the RM9200 there
+ *       are errata regarding adjusting the prescalar and divisor.
+ */
+#undef SLOWDOWN_MASTER_CLOCK
+
+#define MCKRDY_TIMEOUT         1000
+#define MOSCRDY_TIMEOUT        1000
+#define PLLALOCK_TIMEOUT       1000
+#define PLLBLOCK_TIMEOUT       1000
+
+
+/*
+ * Wait until master clock is ready (after switching master clock source)
+ */
+       .macro wait_mckrdy
+       mov     r4, #MCKRDY_TIMEOUT
+1:     sub     r4, r4, #1
+       cmp     r4, #0
+       beq     2f
+       ldr     r3, [r1, #(AT91_PMC_SR - AT91_PMC)]
+       tst     r3, #AT91_PMC_MCKRDY
+       beq     1b
+2:
+       .endm
+
+/*
+ * Wait until master oscillator has stabilized.
+ */
+       .macro wait_moscrdy
+       mov     r4, #MOSCRDY_TIMEOUT
+1:     sub     r4, r4, #1
+       cmp     r4, #0
+       beq     2f
+       ldr     r3, [r1, #(AT91_PMC_SR - AT91_PMC)]
+       tst     r3, #AT91_PMC_MOSCS
+       beq     1b
+2:
+       .endm
+
+/*
+ * Wait until PLLA has locked.
+ */
+       .macro wait_pllalock
+       mov     r4, #PLLALOCK_TIMEOUT
+1:     sub     r4, r4, #1
+       cmp     r4, #0
+       beq     2f
+       ldr     r3, [r1, #(AT91_PMC_SR - AT91_PMC)]
+       tst     r3, #AT91_PMC_LOCKA
+       beq     1b
+2:
+       .endm
+
+/*
+ * Wait until PLLB has locked.
+ */
+       .macro wait_pllblock
+       mov     r4, #PLLBLOCK_TIMEOUT
+1:     sub     r4, r4, #1
+       cmp     r4, #0
+       beq     2f
+       ldr     r3, [r1, #(AT91_PMC_SR - AT91_PMC)]
+       tst     r3, #AT91_PMC_LOCKB
+       beq     1b
+2:
+       .endm
+
+       .text
+
+ENTRY(at91_slow_clock)
+       /* Save registers on stack */
+       stmfd   sp!, {r0 - r12, lr}
+
+       /*
+        * Register usage:
+        *  R1 = Base address of AT91_PMC
+        *  R2 = Base address of AT91_SDRAMC (or AT91_SYS on AT91RM9200)
+        *  R3 = temporary register
+        *  R4 = temporary register
+        */
+       ldr     r1, .at91_va_base_pmc
+       ldr     r2, .at91_va_base_sdramc
+
+       /* Drain write buffer */
+       mcr     p15, 0, r0, c7, c10, 4
+
+#ifdef CONFIG_ARCH_AT91RM9200
+       /* Put SDRAM in self-refresh mode */
+       mov     r3, #1
+       str     r3, [r2, #AT91_SDRAMC_SRR]
+#elif defined(CONFIG_ARCH_AT91CAP9)
+       /* Enable SDRAM self-refresh mode */
+       ldr     r3, [r2, #AT91_DDRSDRC_LPR - AT91_DDRSDRC]
+       str     r3, .saved_sam9_lpr
+
+       mov     r3, #AT91_DDRSDRC_LPCB_SELF_REFRESH
+       str     r3, [r2, #AT91_DDRSDRC_LPR - AT91_DDRSDRC]
+#else
+       /* Enable SDRAM self-refresh mode */
+       ldr     r3, [r2, #AT91_SDRAMC_LPR - AT91_SDRAMC]
+       str     r3, .saved_sam9_lpr
+
+       mov     r3, #AT91_SDRAMC_LPCB_SELF_REFRESH
+       str     r3, [r2, #AT91_SDRAMC_LPR - AT91_SDRAMC]
+#endif
+
+       /* Save Master clock setting */
+       ldr     r3, [r1, #(AT91_PMC_MCKR - AT91_PMC)]
+       str     r3, .saved_mckr
+
+       /*
+        * Set the Master clock source to slow clock
+        */
+       bic     r3, r3, #AT91_PMC_CSS
+       str     r3, [r1, #(AT91_PMC_MCKR - AT91_PMC)]
+
+       wait_mckrdy
+
+#ifdef SLOWDOWN_MASTER_CLOCK
+       /*
+        * Set the Master Clock PRES and MDIV fields.
+        *
+        * See AT91RM9200 errata #27 and #28 for details.
+        */
+       mov     r3, #0
+       str     r3, [r1, #(AT91_PMC_MCKR - AT91_PMC)]
+
+       wait_mckrdy
+#endif
+
+       /* Save PLLA setting and disable it */
+       ldr     r3, [r1, #(AT91_CKGR_PLLAR - AT91_PMC)]
+       str     r3, .saved_pllar
+
+       mov     r3, #AT91_PMC_PLLCOUNT
+       orr     r3, r3, #(1 << 29)              /* bit 29 always set */
+       str     r3, [r1, #(AT91_CKGR_PLLAR - AT91_PMC)]
+
+       wait_pllalock
+
+       /* Save PLLB setting and disable it */
+       ldr     r3, [r1, #(AT91_CKGR_PLLBR - AT91_PMC)]
+       str     r3, .saved_pllbr
+
+       mov     r3, #AT91_PMC_PLLCOUNT
+       str     r3, [r1, #(AT91_CKGR_PLLBR - AT91_PMC)]
+
+       wait_pllblock
+
+       /* Turn off the main oscillator */
+       ldr     r3, [r1, #(AT91_CKGR_MOR - AT91_PMC)]
+       bic     r3, r3, #AT91_PMC_MOSCEN
+       str     r3, [r1, #(AT91_CKGR_MOR - AT91_PMC)]
+
+       /* Wait for interrupt */
+       mcr     p15, 0, r0, c7, c0, 4
+
+       /* Turn on the main oscillator */
+       ldr     r3, [r1, #(AT91_CKGR_MOR - AT91_PMC)]
+       orr     r3, r3, #AT91_PMC_MOSCEN
+       str     r3, [r1, #(AT91_CKGR_MOR - AT91_PMC)]
+
+       wait_moscrdy
+
+       /* Restore PLLB setting */
+       ldr     r3, .saved_pllbr
+       str     r3, [r1, #(AT91_CKGR_PLLBR - AT91_PMC)]
+
+       wait_pllblock
+
+       /* Restore PLLA setting */
+       ldr     r3, .saved_pllar
+       str     r3, [r1, #(AT91_CKGR_PLLAR - AT91_PMC)]
+
+       wait_pllalock
+
+#ifdef SLOWDOWN_MASTER_CLOCK
+       /*
+        * First set PRES if it was not 0,
+        * than set CSS and MDIV fields.
+        *
+        * See AT91RM9200 errata #27 and #28 for details.
+        */
+       ldr     r3, .saved_mckr
+       tst     r3, #AT91_PMC_PRES
+       beq     2f
+       and     r3, r3, #AT91_PMC_PRES
+       str     r3, [r1, #(AT91_PMC_MCKR - AT91_PMC)]
+
+       wait_mckrdy
+#endif
+
+       /*
+        * Restore master clock setting
+        */
+2:     ldr     r3, .saved_mckr
+       str     r3, [r1, #(AT91_PMC_MCKR - AT91_PMC)]
+
+       wait_mckrdy
+
+#ifdef CONFIG_ARCH_AT91RM9200
+       /* Do nothing - self-refresh is automatically disabled. */
+#elif defined(CONFIG_ARCH_AT91CAP9)
+       /* Restore LPR on AT91CAP9 */
+       ldr     r3, .saved_sam9_lpr
+       str     r3, [r2, #AT91_DDRSDRC_LPR - AT91_DDRSDRC]
+#else
+       /* Restore LPR on AT91SAM9 */
+       ldr     r3, .saved_sam9_lpr
+       str     r3, [r2, #AT91_SDRAMC_LPR - AT91_SDRAMC]
+#endif
+
+       /* Restore registers, and return */
+       ldmfd   sp!, {r0 - r12, pc}
+
+
+.saved_mckr:
+       .word 0
+
+.saved_pllar:
+       .word 0
+
+.saved_pllbr:
+       .word 0
+
+.saved_sam9_lpr:
+       .word 0
+
+.at91_va_base_pmc:
+       .word AT91_VA_BASE_SYS + AT91_PMC
+
+#ifdef CONFIG_ARCH_AT91RM9200
+.at91_va_base_sdramc:
+       .word AT91_VA_BASE_SYS
+#elif defined(CONFIG_ARCH_AT91CAP9)
+.at91_va_base_sdramc:
+       .word AT91_VA_BASE_SYS + AT91_DDRSDRC
+#else
+.at91_va_base_sdramc:
+       .word AT91_VA_BASE_SYS + AT91_SDRAMC
+#endif
+
+ENTRY(at91_slow_clock_sz)
+       .word .-at91_slow_clock
index 474616dcd7a688a92cb39b813b58d822f5eb2041..5f18eccdc7252a767c2c4e0bcf4a6167a8b0775a 100644 (file)
 #include <linux/types.h>
 #include <linux/string.h>
 #include <linux/mm.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
 #include <asm/sizes.h>
-#include <asm/io.h>
 #include <asm/setup.h>
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
index aa02aa5a01f4a61c42ae3bf5832da36cf446d509..71a80b5b8ad6135eba4821251138c5e730c5ecf8 100644 (file)
@@ -22,9 +22,9 @@
 #include <linux/types.h>
 #include <linux/string.h>
 #include <linux/mm.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/pgtable.h>
 #include <asm/page.h>
 #include <asm/setup.h>
index a8eade40317f007e932aed39320fa90e3b844e1e..24e96159e3e7590a008ab8cfbcdda830d3eb782b 100644 (file)
@@ -20,9 +20,9 @@
 #ifndef __ASM_ARCH_SYSTEM_H
 #define __ASM_ARCH_SYSTEM_H
 
+#include <linux/io.h>
 #include <mach/hardware.h>
 #include <asm/hardware/clps7111.h>
-#include <asm/io.h>
 
 static inline void arch_idle(void)
 {
index 38623cfcac5a0a0d43094b9d09bc09533c2fb06e..9a12d8562284968a7ffe2b33a40806ce4a4f2a2b 100644 (file)
  */
 #include <linux/init.h>
 #include <linux/list.h>
+#include <linux/io.h>
 
 #include <asm/mach/irq.h>
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 
 #include <asm/hardware/clps7111.h>
index 262c3c361453adaa74dbd7b9dddbce6292a614f0..15121446efc870ad2e083e14ba2862a948421492 100644 (file)
@@ -21,9 +21,9 @@
  */
 #include <linux/kernel.h>
 #include <linux/init.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/leds.h>
 #include <asm/system.h>
 #include <asm/mach-types.h>
index f51f97d4f212b9c0b1e628da53cbd83a9603c396..0d94a30fd6fc84745555fc4daabdb5617db728a0 100644 (file)
@@ -22,9 +22,9 @@
 #include <linux/types.h>
 #include <linux/string.h>
 #include <linux/mm.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/pgtable.h>
 #include <asm/page.h>
 #include <asm/setup.h>
index ef1fcd17189e16bd43538da60e53ea0103d351b0..d581ef0bcd24d68626f55e44cb7a6b5191ff1d5d 100644 (file)
 #include <linux/interrupt.h>
 #include <linux/irq.h>
 #include <linux/sched.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
 #include <asm/irq.h>
 #include <asm/leds.h>
-#include <asm/io.h>
 #include <asm/hardware/clps7111.h>
 
 #include <asm/mach/time.h>
index cc1b82179e83c03c3a8a46bc29127dc201829c28..c3a33b8a5aacc8406d3bcb7279e824cc7500513f 100644 (file)
@@ -15,6 +15,7 @@
 #include <linux/init.h>
 #include <linux/device.h>
 #include <linux/serial_8250.h>
+#include <linux/io.h>
 
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
@@ -23,7 +24,6 @@
 
 #include <mach/hardware.h>
 #include <asm/hardware/iomd.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
index e8da3c58df76074da487c1fbc6c49a4fb6ac78ad..d02fcf28ee05358077132678bd12b397d4a2e824 100644 (file)
@@ -10,8 +10,8 @@
  *   11-08-1999        PJB     Created ARM7500 version, derived from RiscPC code
  */
 
+#include <linux/io.h>
 #include <asm/hardware/iomd.h>
-#include <asm/io.h>
 
 static inline int fixup_irq(unsigned int irq)
 {
index 3326aa99d3eceda08e3ca78288e11ca110da6e82..87b32db470c812a10bd48563bb3c2cd71263cfa0 100644 (file)
 #define FLUSH_BASE_PHYS                0x00000000
 #define FLUSH_BASE             0xdf000000
 
+/*
+ * Sparsemem support.  Each section is a maximum of 64MB.  The sections
+ * are offset by 128MB and can cover 128MB, so that gives us a maximum
+ * of 29 physmem bits.
+ */
+#define MAX_PHYSMEM_BITS       29
+#define SECTION_SIZE_BITS      26
+
 #endif
index 624fc2830ae0b34ec7ae576bd417b81985ede221..6d325fbe8b08a63dde1c8d70445737b5cab5a2a9 100644 (file)
@@ -6,8 +6,8 @@
 #ifndef __ASM_ARCH_SYSTEM_H
 #define __ASM_ARCH_SYSTEM_H
 
+#include <linux/io.h>
 #include <asm/hardware/iomd.h>
-#include <asm/io.h>
 
 static inline void arch_idle(void)
 {
index 9581675f6586d6aa3d8a1d20f556ad2f2a8478f6..a957d239a6838f20458525a2710fa094073f674e 100644 (file)
@@ -23,9 +23,9 @@
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/partitions.h>
 #include <linux/mtd/physmap.h>
+#include <linux/io.h>
 
 #include <asm/setup.h>
-#include <asm/io.h>
 #include <asm/mach-types.h>
 
 #include <asm/mach/arch.h>
index d46c69b55aaab73f6afffcd282bcecae74e1510e..28f6dbc95bd7afe8303abf89d4efb479a71c488f 100644 (file)
@@ -16,9 +16,9 @@
 #include <linux/err.h>
 #include <linux/mutex.h>
 #include <linux/platform_device.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 
 #include <mach/psc.h>
 #include "clock.h"
index 3ebbacdd6dba05383c0819b1caded248e209006d..b49e9d092aabf26f053d9c16a9eeae5509719e97 100644 (file)
@@ -210,7 +210,6 @@ gpio_irq_handler(unsigned irq, struct irq_desc *desc)
        desc->chip->ack(irq);
        while (1) {
                u32             status;
-               struct irq_desc *gpio;
                int             n;
                int             res;
 
@@ -224,12 +223,10 @@ gpio_irq_handler(unsigned irq, struct irq_desc *desc)
 
                /* now demux them to the right lowlevel handler */
                n = (int)get_irq_data(irq);
-               gpio = &irq_desc[n];
                while (status) {
                        res = ffs(status);
                        n += res;
-                       gpio += res;
-                       desc_handle_irq(n - 1, gpio - 1);
+                       generic_handle_irq(n - 1);
                        status >>= res;
                }
        }
index 70608f76aed85c519b9ffa8d9a6f98b730300b3e..bf067d60491819735f0c8cdbe5c9b8e141f190f7 100644 (file)
@@ -13,8 +13,7 @@
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
-
-#include <asm/io.h>
+#include <linux/io.h>
 
 #define JTAG_ID_BASE           0x01c40028
 
index 84ff77aeb7383b4284a8bd61e02ea26d0925e2da..17ca41dc2c5363b2ae8bf9fb625688b437aa718f 100644 (file)
@@ -11,7 +11,7 @@
 #ifndef __ASM_ARCH_SYSTEM_H
 #define __ASM_ARCH_SYSTEM_H
 
-#include <asm/io.h>
+#include <linux/io.h>
 #include <mach/hardware.h>
 
 extern void davinci_watchdog_reset(void);
index 5bb66b61c1a32214d7dee09102ee1cad203f9996..299515f70b8b05611e920404773a533dfb54ed4d 100644 (file)
@@ -11,9 +11,9 @@
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
+#include <linux/io.h>
 
 #include <asm/tlb.h>
-#include <asm/io.h>
 #include <asm/memory.h>
 
 #include <asm/mach/map.h>
index 12ca9f29f84735267a478abd7b8baa7a6c621f7f..38021af8359aaf2d9bc3f5623ac679fc5c568d1c 100644 (file)
@@ -22,9 +22,9 @@
 #include <linux/init.h>
 #include <linux/interrupt.h>
 #include <linux/irq.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/mach/irq.h>
 
 #define IRQ_BIT(irq)           ((irq) & 0x1f)
index 720c48b9ee0404257cd218a3fe26b66a035a653d..42b976e8a7e991d664ba4ffd4052aeb0c6a1d665 100644 (file)
@@ -21,8 +21,8 @@
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/init.h>
+#include <linux/io.h>
 
-#include <asm/io.h>
 #include <mach/hardware.h>
 #include <mach/psc.h>
 #include <mach/mux.h>
index caf101e2cc62ba027715b8f37f03384e08da227a..3010f9971255da6fc0480e9b9b106b1f5246a995 100644 (file)
@@ -26,8 +26,8 @@
 #include <linux/platform_device.h>
 #include <linux/delay.h>
 #include <linux/clk.h>
+#include <linux/io.h>
 
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <mach/hardware.h>
 #include <mach/serial.h>
index 206e80d41717b79fb6c647e14e463c1217c0f16e..3b9a296b5c4ba43ee703b7ccafce24fdd6067d44 100644 (file)
@@ -15,8 +15,8 @@
 #include <linux/clocksource.h>
 #include <linux/clockchips.h>
 #include <linux/spinlock.h>
+#include <linux/io.h>
 
-#include <asm/io.h>
 #include <mach/hardware.h>
 #include <asm/system.h>
 #include <asm/irq.h>
index 65cc7c2719175e3eec4a948f5f52e8a3e771179f..c7bc7fbb11a647800ee6b4fa032c14539eb3f70c 100644 (file)
 #include <linux/interrupt.h>
 #include <linux/serial_8250.h>
 #include <linux/init.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
 #include <asm/irq.h>
-#include <asm/io.h>
 #include <asm/setup.h>
 #include <asm/mach-types.h>
 #include <asm/pgtable.h>
index 53748f5462e9844250638af78a094a557fc07fb6..c52e3047a7eb7ccc32a4094c1a1de8498ad37cbd 100644 (file)
@@ -23,9 +23,9 @@
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/types.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/page.h>
 
 static void __iomem *__isamem_convert_addr(const volatile void __iomem *addr)
index ea8549bfbef2fa69b9f94fc54428671df988fdeb..5a1b8c05c9584af2850076060d387ee18682b4db 100644 (file)
@@ -88,6 +88,20 @@ config MACH_TS72XX
          Say 'Y' here if you want your kernel to support the
          Technologic Systems TS-72xx board.
 
+choice
+       prompt "Select a UART for early kernel messages"
+
+config EP93XX_EARLY_UART1
+       bool "UART1"
+
+config EP93XX_EARLY_UART2
+       bool "UART2"
+
+config EP93XX_EARLY_UART3
+       bool "UART3"
+
+endchoice
+
 endmenu
 
 endif
index aa1fb352fb8f6fb1c64cc0f216e3d3e62568f90c..561db73ec1ae1c559fc0c2c2528c308f495b5c5f 100644 (file)
@@ -18,7 +18,7 @@
 #include <linux/ioport.h>
 #include <linux/mtd/physmap.h>
 #include <linux/platform_device.h>
-#include <asm/io.h>
+#include <linux/io.h>
 #include <mach/hardware.h>
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
@@ -47,36 +47,12 @@ static struct ep93xx_eth_data adssphere_eth_data = {
        .phy_id         = 1,
 };
 
-static struct resource adssphere_eth_resource[] = {
-       {
-               .start  = EP93XX_ETHERNET_PHYS_BASE,
-               .end    = EP93XX_ETHERNET_PHYS_BASE + 0xffff,
-               .flags  = IORESOURCE_MEM,
-       }, {
-               .start  = IRQ_EP93XX_ETHERNET,
-               .end    = IRQ_EP93XX_ETHERNET,
-               .flags  = IORESOURCE_IRQ,
-       }
-};
-
-static struct platform_device adssphere_eth_device = {
-       .name           = "ep93xx-eth",
-       .id             = -1,
-       .dev            = {
-               .platform_data  = &adssphere_eth_data,
-       },
-       .num_resources  = 2,
-       .resource       = adssphere_eth_resource,
-};
-
 static void __init adssphere_init_machine(void)
 {
        ep93xx_init_devices();
        platform_device_register(&adssphere_flash);
 
-       memcpy(adssphere_eth_data.dev_addr,
-               (void *)(EP93XX_ETHERNET_BASE + 0x50), 6);
-       platform_device_register(&adssphere_eth_device);
+       ep93xx_register_eth(&adssphere_eth_data, 1);
 }
 
 MACHINE_START(ADSSPHERE, "ADS Sphere board")
index 6062e47f204322b211ad6a0080294c1a32532f2a..8c9f2491dccc545f5abb614663c1c34aa1d5098e 100644 (file)
@@ -15,9 +15,9 @@
 #include <linux/err.h>
 #include <linux/module.h>
 #include <linux/string.h>
+#include <linux/io.h>
 #include <asm/div64.h>
 #include <mach/hardware.h>
-#include <asm/io.h>
 
 struct clk {
        char            *name;
index f99f436693928d36adf25aad1cbac3a9e7e35e60..de53f0be71b9bce70b34941eb51ba263f4cbc3ff 100644 (file)
@@ -32,6 +32,7 @@
 #include <linux/termios.h>
 #include <linux/amba/bus.h>
 #include <linux/amba/serial.h>
+#include <linux/io.h>
 
 #include <asm/types.h>
 #include <asm/setup.h>
@@ -41,7 +42,6 @@
 #include <asm/system.h>
 #include <asm/tlbflush.h>
 #include <asm/pgtable.h>
-#include <asm/io.h>
 
 #include <asm/mach/map.h>
 #include <asm/mach/time.h>
@@ -157,7 +157,7 @@ static unsigned char gpio_int_type2[3];
 static const u8 int_type1_register_offset[3]   = { 0x90, 0xac, 0x4c };
 static const u8 int_type2_register_offset[3]   = { 0x94, 0xb0, 0x50 };
 static const u8 eoi_register_offset[3]         = { 0x98, 0xb4, 0x54 };
-static const u8 int_en_register_offset[3]      = { 0x9c, 0xb8, 0x5c };
+static const u8 int_en_register_offset[3]      = { 0x9c, 0xb8, 0x58 };
 
 void ep93xx_gpio_update_int_params(unsigned port)
 {
@@ -192,8 +192,7 @@ static void ep93xx_gpio_ab_irq_handler(unsigned int irq, struct irq_desc *desc)
        for (i = 0; i < 8; i++) {
                if (status & (1 << i)) {
                        int gpio_irq = gpio_to_irq(EP93XX_GPIO_LINE_A(0)) + i;
-                       desc = irq_desc + gpio_irq;
-                       desc_handle_irq(gpio_irq, desc);
+                       generic_handle_irq(gpio_irq);
                }
        }
 
@@ -202,7 +201,7 @@ static void ep93xx_gpio_ab_irq_handler(unsigned int irq, struct irq_desc *desc)
                if (status & (1 << i)) {
                        int gpio_irq = gpio_to_irq(EP93XX_GPIO_LINE_B(0)) + i;
                        desc = irq_desc + gpio_irq;
-                       desc_handle_irq(gpio_irq, desc);
+                       generic_handle_irq(gpio_irq);
                }
        }
 }
@@ -217,7 +216,7 @@ static void ep93xx_gpio_f_irq_handler(unsigned int irq, struct irq_desc *desc)
        int port_f_idx = ((irq + 1) & 7) ^ 4; /* {19..22,47..50} -> {0..7} */
        int gpio_irq = gpio_to_irq(EP93XX_GPIO_LINE_F(0)) + port_f_idx;
 
-       desc_handle_irq(gpio_irq, irq_desc + gpio_irq);
+       generic_handle_irq(gpio_irq);
 }
 
 static void ep93xx_gpio_irq_ack(unsigned int irq)
@@ -461,6 +460,41 @@ static struct platform_device ep93xx_ohci_device = {
        .resource       = ep93xx_ohci_resources,
 };
 
+static struct ep93xx_eth_data ep93xx_eth_data;
+
+static struct resource ep93xx_eth_resource[] = {
+       {
+               .start  = EP93XX_ETHERNET_PHYS_BASE,
+               .end    = EP93XX_ETHERNET_PHYS_BASE + 0xffff,
+               .flags  = IORESOURCE_MEM,
+       }, {
+               .start  = IRQ_EP93XX_ETHERNET,
+               .end    = IRQ_EP93XX_ETHERNET,
+               .flags  = IORESOURCE_IRQ,
+       }
+};
+
+static struct platform_device ep93xx_eth_device = {
+       .name           = "ep93xx-eth",
+       .id             = -1,
+       .dev            = {
+               .platform_data  = &ep93xx_eth_data,
+       },
+       .num_resources  = ARRAY_SIZE(ep93xx_eth_resource),
+       .resource       = ep93xx_eth_resource,
+};
+
+void __init ep93xx_register_eth(struct ep93xx_eth_data *data, int copy_addr)
+{
+       if (copy_addr) {
+               memcpy(data->dev_addr,
+                       (void *)(EP93XX_ETHERNET_BASE + 0x50), 6);
+       }
+
+       ep93xx_eth_data = *data;
+       platform_device_register(&ep93xx_eth_device);
+}
+
 extern void ep93xx_gpio_init(void);
 
 void __init ep93xx_init_devices(void)
index 97550c0ad7b045adc41a513895687a590d0d75a2..e4add5bdccfd71532c1c5b26b2a02fd09aca3d06 100644 (file)
@@ -18,7 +18,7 @@
 #include <linux/ioport.h>
 #include <linux/mtd/physmap.h>
 #include <linux/platform_device.h>
-#include <asm/io.h>
+#include <linux/io.h>
 #include <mach/hardware.h>
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
@@ -43,10 +43,16 @@ static struct platform_device edb9302_flash = {
        .resource       = &edb9302_flash_resource,
 };
 
+static struct ep93xx_eth_data edb9302_eth_data = {
+       .phy_id         = 1,
+};
+
 static void __init edb9302_init_machine(void)
 {
        ep93xx_init_devices();
        platform_device_register(&edb9302_flash);
+
+       ep93xx_register_eth(&edb9302_eth_data, 1);
 }
 
 MACHINE_START(EDB9302, "Cirrus Logic EDB9302 Evaluation Board")
index 99b01d44bf1cf09fe1577f1d577025301e7e813c..02c4405afed7969fbf372f2be5d83f3788f7e61e 100644 (file)
@@ -18,7 +18,7 @@
 #include <linux/ioport.h>
 #include <linux/mtd/physmap.h>
 #include <linux/platform_device.h>
-#include <asm/io.h>
+#include <linux/io.h>
 #include <mach/hardware.h>
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
@@ -47,36 +47,12 @@ static struct ep93xx_eth_data edb9302a_eth_data = {
        .phy_id                 = 1,
 };
 
-static struct resource edb9302a_eth_resource[] = {
-       {
-               .start  = EP93XX_ETHERNET_PHYS_BASE,
-               .end    = EP93XX_ETHERNET_PHYS_BASE + 0xffff,
-               .flags  = IORESOURCE_MEM,
-       }, {
-               .start  = IRQ_EP93XX_ETHERNET,
-               .end    = IRQ_EP93XX_ETHERNET,
-               .flags  = IORESOURCE_IRQ,
-       }
-};
-
-static struct platform_device edb9302a_eth_device = {
-       .name           = "ep93xx-eth",
-       .id             = -1,
-       .dev            = {
-               .platform_data  = &edb9302a_eth_data,
-       },
-       .num_resources  = 2,
-       .resource       = edb9302a_eth_resource,
-};
-
 static void __init edb9302a_init_machine(void)
 {
        ep93xx_init_devices();
        platform_device_register(&edb9302a_flash);
 
-       memcpy(edb9302a_eth_data.dev_addr,
-               (void *)(EP93XX_ETHERNET_BASE + 0x50), 6);
-       platform_device_register(&edb9302a_eth_device);
+       ep93xx_register_eth(&edb9302a_eth_data, 1);
 }
 
 MACHINE_START(EDB9302A, "Cirrus Logic EDB9302A Evaluation Board")
index 9fb72d01a36c2a9dd868f06536fb962491e9b0a9..040edbd2ea053d92437e42129bcea91b9b684123 100644 (file)
@@ -18,7 +18,7 @@
 #include <linux/ioport.h>
 #include <linux/mtd/physmap.h>
 #include <linux/platform_device.h>
-#include <asm/io.h>
+#include <linux/io.h>
 #include <mach/hardware.h>
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
@@ -47,36 +47,12 @@ static struct ep93xx_eth_data edb9307_eth_data = {
        .phy_id                 = 1,
 };
 
-static struct resource edb9307_eth_resource[] = {
-       {
-               .start  = EP93XX_ETHERNET_PHYS_BASE,
-               .end    = EP93XX_ETHERNET_PHYS_BASE + 0xffff,
-               .flags  = IORESOURCE_MEM,
-       }, {
-               .start  = IRQ_EP93XX_ETHERNET,
-               .end    = IRQ_EP93XX_ETHERNET,
-               .flags  = IORESOURCE_IRQ,
-       }
-};
-
-static struct platform_device edb9307_eth_device = {
-       .name           = "ep93xx-eth",
-       .id             = -1,
-       .dev            = {
-               .platform_data  = &edb9307_eth_data,
-       },
-       .num_resources  = 2,
-       .resource       = edb9307_eth_resource,
-};
-
 static void __init edb9307_init_machine(void)
 {
        ep93xx_init_devices();
        platform_device_register(&edb9307_flash);
 
-       memcpy(edb9307_eth_data.dev_addr,
-               (void *)(EP93XX_ETHERNET_BASE + 0x50), 6);
-       platform_device_register(&edb9307_eth_device);
+       ep93xx_register_eth(&edb9307_eth_data, 1);
 }
 
 MACHINE_START(EDB9307, "Cirrus Logic EDB9307 Evaluation Board")
index 87267a574f5ea5f5813943f4408cfca5823a5fb1..6853e302bc3a8f8bad7362a94b8ac0ebd07a1e86 100644 (file)
@@ -19,7 +19,7 @@
 #include <linux/ioport.h>
 #include <linux/mtd/physmap.h>
 #include <linux/platform_device.h>
-#include <asm/io.h>
+#include <linux/io.h>
 #include <mach/hardware.h>
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
@@ -44,10 +44,16 @@ static struct platform_device edb9312_flash = {
        .resource       = &edb9312_flash_resource,
 };
 
+static struct ep93xx_eth_data edb9312_eth_data = {
+       .phy_id                 = 1,
+};
+
 static void __init edb9312_init_machine(void)
 {
        ep93xx_init_devices();
        platform_device_register(&edb9312_flash);
+
+       ep93xx_register_eth(&edb9312_eth_data, 1);
 }
 
 MACHINE_START(EDB9312, "Cirrus Logic EDB9312 Evaluation Board")
index 7e373950be4d386fe3cdfe33fce1e8d47413b55a..9469b350d253ba6c291b3b7cc15c1c847e8e8e76 100644 (file)
@@ -18,7 +18,7 @@
 #include <linux/ioport.h>
 #include <linux/mtd/physmap.h>
 #include <linux/platform_device.h>
-#include <asm/io.h>
+#include <linux/io.h>
 #include <mach/hardware.h>
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
@@ -43,10 +43,16 @@ static struct platform_device edb9315_flash = {
        .resource       = &edb9315_flash_resource,
 };
 
+static struct ep93xx_eth_data edb9315_eth_data = {
+       .phy_id                 = 1,
+};
+
 static void __init edb9315_init_machine(void)
 {
        ep93xx_init_devices();
        platform_device_register(&edb9315_flash);
+
+       ep93xx_register_eth(&edb9315_eth_data, 1);
 }
 
 MACHINE_START(EDB9315, "Cirrus Logic EDB9315 Evaluation Board")
index 08a7c9bfb689bc6473052e21b0aeaee9df9b33d2..584457ce7c80f410e71b8323de5a94d668722569 100644 (file)
@@ -18,7 +18,7 @@
 #include <linux/ioport.h>
 #include <linux/mtd/physmap.h>
 #include <linux/platform_device.h>
-#include <asm/io.h>
+#include <linux/io.h>
 #include <mach/hardware.h>
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
@@ -47,36 +47,12 @@ static struct ep93xx_eth_data edb9315a_eth_data = {
        .phy_id                 = 1,
 };
 
-static struct resource edb9315a_eth_resource[] = {
-       {
-               .start  = EP93XX_ETHERNET_PHYS_BASE,
-               .end    = EP93XX_ETHERNET_PHYS_BASE + 0xffff,
-               .flags  = IORESOURCE_MEM,
-       }, {
-               .start  = IRQ_EP93XX_ETHERNET,
-               .end    = IRQ_EP93XX_ETHERNET,
-               .flags  = IORESOURCE_IRQ,
-       }
-};
-
-static struct platform_device edb9315a_eth_device = {
-       .name           = "ep93xx-eth",
-       .id             = -1,
-       .dev            = {
-               .platform_data  = &edb9315a_eth_data,
-       },
-       .num_resources  = 2,
-       .resource       = edb9315a_eth_resource,
-};
-
 static void __init edb9315a_init_machine(void)
 {
        ep93xx_init_devices();
        platform_device_register(&edb9315a_flash);
 
-       memcpy(edb9315a_eth_data.dev_addr,
-               (void *)(EP93XX_ETHERNET_BASE + 0x50), 6);
-       platform_device_register(&edb9315a_eth_device);
+       ep93xx_register_eth(&edb9315a_eth_data, 1);
 }
 
 MACHINE_START(EDB9315A, "Cirrus Logic EDB9315A Evaluation Board")
index 9b41ec1f089e78201f05191f94dc1389ec9f06a9..035b24e31b64a99f0264a7c3ab460299a89f8976 100644 (file)
@@ -18,7 +18,7 @@
 #include <linux/ioport.h>
 #include <linux/mtd/physmap.h>
 #include <linux/platform_device.h>
-#include <asm/io.h>
+#include <linux/io.h>
 #include <mach/hardware.h>
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
@@ -44,36 +44,15 @@ static struct platform_device gesbc9312_flash = {
 };
 
 static struct ep93xx_eth_data gesbc9312_eth_data = {
-       .phy_id                 = 1,
-};
-
-static struct resource gesbc9312_eth_resource[] = {
-       {
-               .start  = EP93XX_ETHERNET_PHYS_BASE,
-               .end    = EP93XX_ETHERNET_PHYS_BASE + 0xffff,
-               .flags  = IORESOURCE_MEM,
-       }, {
-               .start  = IRQ_EP93XX_ETHERNET,
-               .end    = IRQ_EP93XX_ETHERNET,
-               .flags  = IORESOURCE_IRQ,
-       }
-};
-
-static struct platform_device gesbc9312_eth_device = {
-       .name           = "ep93xx-eth",
-       .id             = -1,
-       .dev            = {
-               .platform_data  = &gesbc9312_eth_data,
-       },
-       .num_resources  = 2,
-       .resource       = gesbc9312_eth_resource,
+       .phy_id         = 1,
 };
 
 static void __init gesbc9312_init_machine(void)
 {
        ep93xx_init_devices();
        platform_device_register(&gesbc9312_flash);
-       platform_device_register(&gesbc9312_eth_device);
+
+       ep93xx_register_eth(&gesbc9312_eth_data, 0);
 }
 
 MACHINE_START(GESBC9312, "Glomation GESBC-9312-sx")
index 0f3fb87ca4be778f33b2b8e48848c6761b0ecd92..482cf3d2fbcd5de4c6e841590c200bb4d5d9df8c 100644 (file)
@@ -16,9 +16,9 @@
 #include <linux/init.h>
 #include <linux/module.h>
 #include <linux/seq_file.h>
+#include <linux/io.h>
 
 #include <mach/ep93xx-regs.h>
-#include <asm/io.h>
 #include <asm/gpio.h>
 
 struct ep93xx_gpio_chip {
@@ -141,10 +141,10 @@ static void ep93xx_gpio_dbg_show(struct seq_file *s, struct gpio_chip *chip)
 static struct ep93xx_gpio_chip ep93xx_gpio_banks[] = {
        EP93XX_GPIO_BANK("A", 0x00, 0x10, 0),
        EP93XX_GPIO_BANK("B", 0x04, 0x14, 8),
-       EP93XX_GPIO_BANK("C", 0x30, 0x34, 40),
+       EP93XX_GPIO_BANK("C", 0x08, 0x18, 40),
        EP93XX_GPIO_BANK("D", 0x0c, 0x1c, 24),
        EP93XX_GPIO_BANK("E", 0x20, 0x24, 32),
-       EP93XX_GPIO_BANK("F", 0x08, 0x18, 16),
+       EP93XX_GPIO_BANK("F", 0x30, 0x34, 16),
        EP93XX_GPIO_BANK("G", 0x38, 0x3c, 48),
        EP93XX_GPIO_BANK("H", 0x40, 0x44, 56),
 };
index 9f4458c8e07041658c0d6a9452b435104572cdd3..22d6c9a6e4cadc565f1adba45503b54451b59386 100644 (file)
@@ -5,6 +5,40 @@
 #ifndef __ASM_ARCH_EP93XX_REGS_H
 #define __ASM_ARCH_EP93XX_REGS_H
 
+/*
+ * EP93xx Physical Memory Map:
+ *
+ * The ASDO pin is sampled at system reset to select a synchronous or
+ * asynchronous boot configuration.  When ASDO is "1" (i.e. pulled-up)
+ * the synchronous boot mode is selected.  When ASDO is "0" (i.e
+ * pulled-down) the asynchronous boot mode is selected.
+ *
+ * In synchronous boot mode nSDCE3 is decoded starting at physical address
+ * 0x00000000 and nCS0 is decoded starting at 0xf0000000.  For asynchronous
+ * boot mode they are swapped with nCS0 decoded at 0x00000000 ann nSDCE3
+ * decoded at 0xf0000000.
+ *
+ * There is known errata for the EP93xx dealing with External Memory
+ * Configurations.  Please refer to "AN273: EP93xx Silicon Rev E Design
+ * Guidelines" for more information.  This document can be found at:
+ *
+ *     http://www.cirrus.com/en/pubs/appNote/AN273REV4.pdf
+ */
+
+#define EP93XX_CS0_PHYS_BASE_ASYNC     0x00000000      /* ASDO Pin = 0 */
+#define EP93XX_SDCE3_PHYS_BASE_SYNC    0x00000000      /* ASDO Pin = 1 */
+#define EP93XX_CS1_PHYS_BASE           0x10000000
+#define EP93XX_CS2_PHYS_BASE           0x20000000
+#define EP93XX_CS3_PHYS_BASE           0x30000000
+#define EP93XX_PCMCIA_PHYS_BASE                0x40000000
+#define EP93XX_CS6_PHYS_BASE           0x60000000
+#define EP93XX_CS7_PHYS_BASE           0x70000000
+#define EP93XX_SDCE0_PHYS_BASE         0xc0000000
+#define EP93XX_SDCE1_PHYS_BASE         0xd0000000
+#define EP93XX_SDCE2_PHYS_BASE         0xe0000000
+#define EP93XX_SDCE3_PHYS_BASE_ASYNC   0xf0000000      /* ASDO Pin = 0 */
+#define EP93XX_CS0_PHYS_BASE_SYNC      0xf0000000      /* ASDO Pin = 1 */
+
 /*
  * EP93xx linux memory map:
  *
index b5c182473f5db271fa9a9abbe32a2ae5f38c7580..db2489d3bda74abe02b6af72223e8b9042ffc7b1 100644 (file)
@@ -4,17 +4,17 @@
 
 #ifndef __ASSEMBLY__
 
-void ep93xx_map_io(void);
-void ep93xx_init_irq(void);
-void ep93xx_init_time(unsigned long);
-void ep93xx_init_devices(void);
-extern struct sys_timer ep93xx_timer;
-
 struct ep93xx_eth_data
 {
        unsigned char   dev_addr[6];
        unsigned char   phy_id;
 };
 
+void ep93xx_map_io(void);
+void ep93xx_init_irq(void);
+void ep93xx_init_time(unsigned long);
+void ep93xx_register_eth(struct ep93xx_eth_data *data, int copy_addr);
+void ep93xx_init_devices(void);
+extern struct sys_timer ep93xx_timer;
 
 #endif
index 30b318aa1a1f09627f69ec63a7d8c99d20507b93..34ddec081c40dd817b6ca4741a020e0f3880cab4 100644 (file)
@@ -70,7 +70,7 @@
 
 
 #ifndef __ASSEMBLY__
-#include <asm/io.h>
+#include <linux/io.h>
 
 static inline int board_is_ts7200(void)
 {
index 1fd2f17de3255b21ed8eec3f45db7298a38f2819..16026c2b1c8c0f36843baf6378e0114a22b0fa03 100644 (file)
@@ -31,10 +31,19 @@ static void __raw_writel(unsigned int value, unsigned int ptr)
        *((volatile unsigned int *)ptr) = value;
 }
 
-
-#define PHYS_UART1_DATA                0x808c0000
-#define PHYS_UART1_FLAG                0x808c0018
-#define UART1_FLAG_TXFF                0x20
+#if defined(CONFIG_EP93XX_EARLY_UART1)
+#define UART_BASE              EP93XX_UART1_PHYS_BASE
+#elif defined(CONFIG_EP93XX_EARLY_UART2)
+#define UART_BASE              EP93XX_UART2_PHYS_BASE
+#elif defined(CONFIG_EP93XX_EARLY_UART3)
+#define UART_BASE              EP93XX_UART3_PHYS_BASE
+#else
+#define UART_BASE              EP93XX_UART1_PHYS_BASE
+#endif
+
+#define PHYS_UART_DATA         (UART_BASE + 0x00)
+#define PHYS_UART_FLAG         (UART_BASE + 0x18)
+#define UART_FLAG_TXFF         0x20
 
 static inline void putc(int c)
 {
@@ -42,11 +51,11 @@ static inline void putc(int c)
 
        for (i = 0; i < 1000; i++) {
                /* Transmit fifo not full?  */
-               if (!(__raw_readb(PHYS_UART1_FLAG) & UART1_FLAG_TXFF))
+               if (!(__raw_readb(PHYS_UART_FLAG) & UART_FLAG_TXFF))
                        break;
        }
 
-       __raw_writeb(c, PHYS_UART1_DATA);
+       __raw_writeb(c, PHYS_UART_DATA);
 }
 
 static inline void flush(void)
index de047a5c811256a4b50835cc7ab06220cfece58a..c2197236b63285190d99bcd0fa80225b84e67eac 100644 (file)
 #include <linux/mm.h>
 #include <linux/platform_device.h>
 #include <linux/sched.h>
-
+#include <linux/io.h>
 #include <linux/mtd/physmap.h>
 
-#include <asm/io.h>
 #include <mach/hardware.h>
 
 #include <asm/mach/arch.h>
@@ -29,38 +28,9 @@ static struct ep93xx_eth_data micro9_eth_data = {
        .phy_id                 = 0x1f,
 };
 
-static struct resource micro9_eth_resource[] = {
-       {
-               .start  = EP93XX_ETHERNET_PHYS_BASE,
-               .end    = EP93XX_ETHERNET_PHYS_BASE + 0xffff,
-               .flags  = IORESOURCE_MEM,
-       }, {
-               .start  = IRQ_EP93XX_ETHERNET,
-               .end    = IRQ_EP93XX_ETHERNET,
-               .flags  = IORESOURCE_IRQ,
-       }
-};
-
-static struct platform_device micro9_eth_device = {
-       .name           = "ep93xx-eth",
-       .id             = -1,
-       .dev            = {
-               .platform_data  = &micro9_eth_data,
-       },
-       .num_resources = ARRAY_SIZE(micro9_eth_resource),
-       .resource       = micro9_eth_resource,
-};
-
-static void __init micro9_eth_init(void)
-{
-       memcpy(micro9_eth_data.dev_addr,
-               (void *)(EP93XX_ETHERNET_BASE + 0x50), 6);
-       platform_device_register(&micro9_eth_device);
-}
-
 static void __init micro9_init(void)
 {
-       micro9_eth_init();
+       ep93xx_register_eth(&micro9_eth_data, 1);
 }
 
 /*
index c3cbff126d0caa0e32b519fb30de5c0923d0140f..b4aa4c0542769ebe4fd4409a938c98c315f7cc58 100644 (file)
@@ -19,7 +19,7 @@
 #include <linux/mtd/physmap.h>
 #include <linux/platform_device.h>
 #include <linux/m48t86.h>
-#include <asm/io.h>
+#include <linux/io.h>
 #include <mach/hardware.h>
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
@@ -161,28 +161,6 @@ static struct ep93xx_eth_data ts72xx_eth_data = {
        .phy_id                 = 1,
 };
 
-static struct resource ts72xx_eth_resource[] = {
-       {
-               .start  = EP93XX_ETHERNET_PHYS_BASE,
-               .end    = EP93XX_ETHERNET_PHYS_BASE + 0xffff,
-               .flags  = IORESOURCE_MEM,
-       }, {
-               .start  = IRQ_EP93XX_ETHERNET,
-               .end    = IRQ_EP93XX_ETHERNET,
-               .flags  = IORESOURCE_IRQ,
-       }
-};
-
-static struct platform_device ts72xx_eth_device = {
-       .name           = "ep93xx-eth",
-       .id             = -1,
-       .dev            = {
-               .platform_data  = &ts72xx_eth_data,
-       },
-       .num_resources  = 2,
-       .resource       = ts72xx_eth_resource,
-};
-
 static void __init ts72xx_init_machine(void)
 {
        ep93xx_init_devices();
@@ -190,9 +168,7 @@ static void __init ts72xx_init_machine(void)
                platform_device_register(&ts72xx_flash);
        platform_device_register(&ts72xx_rtc_device);
 
-       memcpy(ts72xx_eth_data.dev_addr,
-               (void *)(EP93XX_ETHERNET_BASE + 0x50), 6);
-       platform_device_register(&ts72xx_eth_device);
+       ep93xx_register_eth(&ts72xx_eth_data, 1);
 }
 
 MACHINE_START(TS72XX, "Technologic Systems TS-72xx SBC")
index c261472208cb17b1cc5bce8c0fd8c14556dae2f4..6a5b437ab86ffdfd03c66527ea2331bfa4f4c7d9 100644 (file)
@@ -9,9 +9,9 @@
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/screen_info.h>
+#include <linux/io.h>
 
 #include <asm/hardware/dec21285.h>
-#include <asm/io.h>
 #include <asm/mach-types.h>
 #include <asm/setup.h>
 
index b08ab507c0524630bf412f214632e3f9a119ddf6..818014e09f4a6e8cb0b679a9ea5aef4fd4928ea9 100644 (file)
 #include <linux/ioport.h>
 #include <linux/list.h>
 #include <linux/init.h>
+#include <linux/io.h>
  
 #include <asm/pgtable.h>
 #include <asm/page.h>
 #include <asm/irq.h>
-#include <asm/io.h>
 #include <asm/mach-types.h>
 #include <asm/setup.h>
 #include <asm/hardware/dec21285.h>
index d0dc51e813384f7ba02312efd249b49637ecfbb6..d4c1e526f59c4cd8071f78e17e06258f42e4cd79 100644 (file)
@@ -16,8 +16,8 @@
 #include <linux/init.h>
 #include <linux/ioport.h>
 #include <linux/irq.h>
+#include <linux/io.h>
 
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/system.h>
 #include <asm/mach/pci.h>
index 1f9b09b8ed88478746155d2291981e49a4f481d3..b653e9cfa3f7761ee9d988a213223c71470eb706 100644 (file)
@@ -11,9 +11,9 @@
  *                     ISA DMA controllers.
  */
 #include <linux/init.h>
+#include <linux/io.h>
 
 #include <asm/dma.h>
-#include <asm/io.h>
 #include <asm/scatterlist.h>
 
 #include <asm/mach/dma.h>
index e9cae99dd1f9881e1acdc5913ed2495efb49131a..6ae2f1a07ab90b585e122ee8596cbd4f3f7b4b6a 100644 (file)
@@ -42,10 +42,6 @@ extern unsigned long __bus_to_virt(unsigned long);
 
 #endif
 
-/* Task size and page offset at 3GB */
-#define TASK_SIZE              UL(0xbf000000)
-#define PAGE_OFFSET            UL(0xc0000000)
-
 /*
  * Cache flushing area.
  */
@@ -56,12 +52,6 @@ extern unsigned long __bus_to_virt(unsigned long);
  */
 #define PHYS_OFFSET            UL(0x00000000)
 
-/*
- * This decides where the kernel will search for a free chunk of vm
- * space during mmap's.
- */
-#define TASK_UNMAPPED_BASE ((TASK_SIZE + 0x01000000) / 3)
-
 #define FLUSH_BASE_PHYS                0x50000000
 
 #endif
index 01c9f407f49833934b7dc11a95302bccee1d5840..2db7f36bd6ca44ed09381f0fddd932fc224afa9c 100644 (file)
@@ -7,8 +7,8 @@
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  */
+#include <linux/io.h>
 #include <asm/hardware/dec21285.h>
-#include <asm/io.h>
 #include <mach/hardware.h>
 #include <asm/leds.h>
 #include <asm/mach-types.h>
index 7132e522c3663ecd2e505a4f1c1ce410c093ba37..54fec9ae28b949b36a17c79de56f9b558f118ee6 100644 (file)
 #include <linux/interrupt.h>
 #include <linux/list.h>
 #include <linux/init.h>
+#include <linux/io.h>
 
 #include <asm/mach/irq.h>
 
 #include <mach/hardware.h>
 #include <asm/hardware/dec21285.h>
 #include <asm/irq.h>
-#include <asm/io.h>
 #include <asm/mach-types.h>
 
 static void isa_mask_pic_lo_irq(unsigned int irq)
@@ -94,8 +94,7 @@ isa_irq_handler(unsigned int irq, struct irq_desc *desc)
                return;
        }
 
-       desc = irq_desc + isa_irq;
-       desc_handle_irq(isa_irq, desc);
+       generic_handle_irq(isa_irq);
 }
 
 static struct irqaction irq_cascade = {
index a764e01d3573991010db8e629e03b7952d0d67ad..0c8390082fa8a49ef23c02071d7373c3d299c7d0 100644 (file)
@@ -7,8 +7,8 @@
 #include <linux/init.h>
 #include <linux/interrupt.h>
 #include <linux/irq.h>
+#include <linux/io.h>
 
-#include <asm/io.h>
 #include <asm/irq.h>
 
 #include <asm/mach/time.h>
index a1f381c64a30e108d1077a843ad4afb90c1b371d..00b0ddcac28347107cb932f18b0e7d4bb03236af 100644 (file)
@@ -10,9 +10,9 @@
 #include <linux/kernel.h>
 #include <linux/delay.h>
 #include <linux/init.h>
+#include <linux/io.h>
 
 #include <asm/hardware/dec21285.h>
-#include <asm/io.h>
 #include <asm/leds.h>
 #include <asm/mach-types.h>
 #include <asm/setup.h>
index 004819ea85c8338cc126f449091621bd06379b02..cd1b54ff9fe2bc91dd81a9d258a4c5bafdaa8af7 100644 (file)
@@ -22,9 +22,9 @@
 #include <linux/sched.h>
 #include <linux/mc146818rtc.h>
 #include <linux/bcd.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 
 #include <asm/mach/time.h>
 #include "common.h"
index b5f9741ae13cd66220f28742924e2bd15b29502b..7a26148282176a68003467efe52f3609997e0f6d 100644 (file)
 #include <linux/mman.h>
 #include <linux/init.h>
 #include <linux/interrupt.h>
+#include <linux/io.h>
 
 #include <asm/page.h>
 #include <asm/pgtable.h>
 #include <asm/dma.h>
-#include <asm/io.h>
 #include <mach/hardware.h>
 #include <asm/irq.h>
 #include <asm/mach/irq.h>
@@ -104,14 +104,12 @@ h720x_gpio_handler(unsigned int mask, unsigned int irq,
                  struct irq_desc *desc)
 {
        IRQDBG("%s irq: %d\n", __func__, irq);
-       desc = irq_desc + irq;
        while (mask) {
                if (mask & 1) {
                        IRQDBG("handling irq %d\n", irq);
-                       desc_handle_irq(irq, desc);
+                       generic_handle_irq(irq);
                }
                irq++;
-               desc++;
                mask >>= 1;
        }
 }
index 53e1f62f2e7916ffacd533f149b79aa868d6dfdf..fd33a19c813a57e0f062d20d0783013569c37985 100644 (file)
@@ -120,12 +120,10 @@ h7202_timerx_demux_handler(unsigned int irq_unused, struct irq_desc *desc)
 
        mask >>= 1;
        irq = IRQ_TIMER1;
-       desc = irq_desc + irq;
        while (mask) {
                if (mask & 1)
-                       desc_handle_irq(irq, desc);
+                       generic_handle_irq(irq);
                irq++;
-               desc++;
                mask >>= 1;
        }
 }
index 4b4230db37653ab3e1d6c3368490ee2014de48cd..7ec60fc91565f481e207d368421eef00354d6b00 100644 (file)
@@ -21,8 +21,8 @@
 #include <linux/list.h>
 #include <linux/math64.h>
 #include <linux/err.h>
+#include <linux/io.h>
 
-#include <asm/io.h>
 #include <mach/imx-regs.h>
 
 /*
index eb8d5bd05d56d1dafea077a21be6f77d38dd80be..67812c5ac1f980a0ab9f94f1cc08ac5ebeca6321 100644 (file)
 /* decode irq number to use with IMR(x), ISR(x) and friends */
 #define IRQ_TO_REG(irq) ((irq - IMX_IRQS) >> 5)
 
+/* all normal IRQs can be FIQs */
+#define FIQ_START      0
+/* switch betwean IRQ and FIQ */
+extern int imx_set_irq_fiq(unsigned int irq, unsigned int type);
+
 #define NR_IRQS (IRQ_GPIOD(32) + 1)
 #define IRQ_GPIO(x)
 #endif
index 798f221eb3b7033e4f2aab147e8797fe270e944f..531b95deadc003ba5e08f0b85a38b21b7af62441 100644 (file)
 #include <linux/init.h>
 #include <linux/list.h>
 #include <linux/timer.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
 #include <asm/irq.h>
-#include <asm/io.h>
 
 #include <asm/mach/irq.h>
 
 /*
  *
  * We simply use the ENABLE DISABLE registers inside of the IMX
- * to turn on/off specific interrupts.  FIXME- We should
- * also add support for the accelerated interrupt controller
- * by putting offets to irq jump code in the appropriate
- * places.
+ * to turn on/off specific interrupts.
  *
  */
 
@@ -102,6 +99,28 @@ imx_unmask_irq(unsigned int irq)
        __raw_writel(irq, IMX_AITC_INTENNUM);
 }
 
+#ifdef CONFIG_FIQ
+int imx_set_irq_fiq(unsigned int irq, unsigned int type)
+{
+       unsigned int irqt;
+
+       if (irq >= IMX_IRQS)
+               return -EINVAL;
+
+       if (irq < IMX_IRQS / 2) {
+               irqt = __raw_readl(IMX_AITC_INTTYPEL) & ~(1 << irq);
+               __raw_writel(irqt | (!!type << irq), IMX_AITC_INTTYPEL);
+       } else {
+               irq -= IMX_IRQS / 2;
+               irqt = __raw_readl(IMX_AITC_INTTYPEH) & ~(1 << irq);
+               __raw_writel(irqt | (!!type << irq), IMX_AITC_INTTYPEH);
+       }
+
+       return 0;
+}
+EXPORT_SYMBOL(imx_set_irq_fiq);
+#endif /* CONFIG_FIQ */
+
 static int
 imx_gpio_irq_type(unsigned int _irq, unsigned int type)
 {
@@ -182,14 +201,12 @@ static void
 imx_gpio_handler(unsigned int mask, unsigned int irq,
                  struct irq_desc *desc)
 {
-       desc = irq_desc + irq;
        while (mask) {
                if (mask & 1) {
                        DEBUG_IRQ("handling irq %d\n", irq);
-                       desc_handle_irq(irq, desc);
+                       generic_handle_irq(irq);
                }
                irq++;
-               desc++;
                mask >>= 1;
        }
 }
@@ -286,4 +303,9 @@ imx_init_irq(void)
 
        /* Release masking of interrupts according to priority */
        __raw_writel(-1, IMX_AITC_NIMASK);
+
+#ifdef CONFIG_FIQ
+       /* Initialize FIQ */
+       init_FIQ();
+#endif
 }
index af81621f689bbe5992ba0e7ce77b9cbc1fd27cdc..1d48f2762cbc5e9967cef755530c9fbdf341adc9 100644 (file)
@@ -13,9 +13,9 @@
 
 #include <linux/kernel.h>
 #include <linux/init.h>
+#include <linux/io.h>
 #include <mach/hardware.h>
 #include <asm/system.h>
-#include <asm/io.h>
 #include <asm/leds.h>
 #include "leds.h"
 
index 08be3875c59ea8d741ddf072169a2ec8444f58f2..a11765f5f23b111c1f21a1a4edb3f498462c1a16 100644 (file)
@@ -18,9 +18,9 @@
 #include <linux/clocksource.h>
 #include <linux/clockchips.h>
 #include <linux/clk.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/leds.h>
 #include <asm/irq.h>
 #include <asm/mach/time.h>
index 8bacf6d4d0974eb4a3265e8ebab0ee11529d3022..595b7392ee4eb9bfdad41ba8b9cc69243d49cf6c 100644 (file)
 #include <linux/termios.h>
 #include <linux/amba/bus.h>
 #include <linux/amba/serial.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
 #include <asm/irq.h>
-#include <asm/io.h>
 #include <asm/hardware/arm_timer.h>
 #include <mach/cm.h>
 #include <asm/system.h>
index 7c49d55e6b27d61d8d76e1682e96c00799f3cc5d..e4f72d202cc04acc6b9e3e60261457052434871f 100644 (file)
@@ -17,9 +17,9 @@
 #include <linux/sched.h>
 #include <linux/smp.h>
 #include <linux/init.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/mach-types.h>
 #include <asm/hardware/icst525.h>
 
index 3c8383dbe9e6fac52652215dba190667a610ad4b..172299a783021395f778c9a46eb771f7a152dafb 100644 (file)
@@ -20,8 +20,8 @@
 #include <linux/mm.h>
 #include <linux/amba/bus.h>
 #include <linux/amba/clcd.h>
+#include <linux/io.h>
 
-#include <asm/io.h>
 #include <asm/hardware/icst525.h>
 #include <mach/lm.h>
 #include <mach/impd1.h>
index 6e472b5f8f26b73a38837c0d31134d29b48b3d19..8138a7e245623cf352909bf080c98d31d315f475 100644 (file)
@@ -27,9 +27,9 @@
 #include <linux/sysdev.h>
 #include <linux/amba/bus.h>
 #include <linux/amba/kmi.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/setup.h>
 #include <asm/param.h>         /* HZ */
index 6b99e9c258bdcc71ae47d9b928d6ff83c1bccfa8..88026ccd5ac9b9b81074b12b17f48e6629c8e5b9 100644 (file)
@@ -19,9 +19,9 @@
 #include <linux/amba/bus.h>
 #include <linux/amba/kmi.h>
 #include <linux/amba/clcd.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/setup.h>
 #include <asm/mach-types.h>
@@ -217,8 +217,7 @@ sic_handle_irq(unsigned int irq, struct irq_desc *desc)
 
                irq += IRQ_SIC_START;
 
-               desc = irq_desc + irq;
-               desc_handle_irq(irq, desc);
+               generic_handle_irq(irq);
        } while (status);
 }
 
index 7bc6881434ecf4bfd9d21c35db216a9fef548ed8..8dcc823f41353baa1c1a27db44f86ee4a819bc49 100644 (file)
@@ -24,9 +24,9 @@
 #include <linux/init.h>
 #include <linux/smp.h>
 #include <linux/spinlock.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/leds.h>
 #include <asm/system.h>
 #include <asm/mach-types.h>
index 9f2b1ea8fb209f27ce6058f4d005fef1db14d983..f1d72b225450951022aada4f49a50a46fb13d6cc 100644 (file)
@@ -27,9 +27,9 @@
 #include <linux/interrupt.h>
 #include <linux/spinlock.h>
 #include <linux/init.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/system.h>
 #include <asm/mach/pci.h>
index e8b59d8f1bb985f1e4fde351e677f48e4688f679..b82602d529bfb4e76ec26fee1800517f0efe36dc 100644 (file)
@@ -7,9 +7,6 @@
  * Physical DRAM offset.
  */
 #define PHYS_OFFSET    UL(0x00000000)
-#define TASK_SIZE      UL(0x3f000000)
-#define PAGE_OFFSET    UL(0x40000000)
-#define TASK_UNMAPPED_BASE ((TASK_SIZE + 0x01000000) / 3)
 
 #ifndef __ASSEMBLY__
 
 
 /* RAM has 1:1 mapping on the PCIe/x Busses */
 #define __virt_to_bus(x)       (__virt_to_phys(x))
-#define __bus_to_virt(x)    (__phys_to_virt(x))
+#define __bus_to_virt(x)       (__phys_to_virt(x))
 
-#define virt_to_lbus(x)                                           \
-(( ((void*)(x) >= (void*)IOP13XX_PMMR_V_START) &&                 \
-((void*)(x) < (void*)IOP13XX_PMMR_V_END) ) ?                      \
-((x) - IOP13XX_PMMR_VIRT_MEM_BASE + IOP13XX_PMMR_PHYS_MEM_BASE) : \
-((x) - PAGE_OFFSET + PHYS_OFFSET))
+static inline dma_addr_t __virt_to_lbus(unsigned long x)
+{
+       return x + IOP13XX_PMMR_PHYS_MEM_BASE - IOP13XX_PMMR_VIRT_MEM_BASE;
+}
 
-#define lbus_to_virt(x)                                            \
-(( ((x) >= IOP13XX_PMMR_P_START) && ((x) < IOP13XX_PMMR_P_END) ) ? \
-((x) - IOP13XX_PMMR_PHYS_MEM_BASE + IOP13XX_PMMR_VIRT_MEM_BASE ) : \
-((x) - PHYS_OFFSET + PAGE_OFFSET))
+static inline unsigned long __lbus_to_virt(dma_addr_t x)
+{
+       return x + IOP13XX_PMMR_VIRT_MEM_BASE - IOP13XX_PMMR_PHYS_MEM_BASE;
+}
+
+#define __is_lbus_dma(a)                               \
+       ((a) >= IOP13XX_PMMR_P_START && (a) < IOP13XX_PMMR_P_END)
+
+#define __is_lbus_virt(a)                              \
+       ((a) >= IOP13XX_PMMR_V_START && (a) < IOP13XX_PMMR_V_END)
 
 /* Device is an lbus device if it is on the platform bus of the IOP13XX */
-#define is_lbus_device(dev) (dev &&\
-                            (strncmp(dev->bus->name, "platform", 8) == 0))
+#define is_lbus_device(dev)                            \
+       (dev && strncmp(dev->bus->name, "platform", 8) == 0)
 
-#define __arch_page_to_dma(dev, page)                                  \
-({is_lbus_device(dev) ? (dma_addr_t)virt_to_lbus(page_address(page)) : \
-(dma_addr_t)__virt_to_bus(page_address(page));})
+#define __arch_dma_to_virt(dev, addr)                                  \
+       ({                                                              \
+               unsigned long __virt;                                   \
+               dma_addr_t __dma = addr;                                \
+               if (is_lbus_device(dev) && __is_lbus_dma(__dma))        \
+                       __virt = __lbus_to_virt(__dma);                 \
+               else                                                    \
+                       __virt = __bus_to_virt(__dma);                  \
+               (void *)__virt;                                         \
+       })
 
-#define __arch_dma_to_virt(dev, addr) \
-({is_lbus_device(dev) ? lbus_to_virt(addr) : __bus_to_virt(addr);})
+#define __arch_virt_to_dma(dev, addr)                                  \
+       ({                                                              \
+               unsigned long __virt = (unsigned long)addr;             \
+               dma_addr_t __dma;                                       \
+               if (is_lbus_device(dev) && __is_lbus_virt(__virt))      \
+                       __dma = __virt_to_lbus(__virt);                 \
+               else                                                    \
+                       __dma = __virt_to_bus(__virt);                  \
+               __dma;                                                  \
+       })
 
-#define __arch_virt_to_dma(dev, addr) \
-({is_lbus_device(dev) ? virt_to_lbus(addr) : __virt_to_bus(addr);})
+#define __arch_page_to_dma(dev, page)                                  \
+       __arch_virt_to_dma(dev, page_address(page))
 
 #endif /* CONFIG_ARCH_IOP13XX */
 #endif /* !ASSEMBLY */
index 17b5515af8b1c6a73f064aef27b6fdd83fd794a3..59f42b535572d5cc0612e671ba9dd5bdee4d7b5d 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef _IOP13XX_PCI_H_
 #define _IOP13XX_PCI_H_
+#include <linux/io.h>
 #include <mach/irqs.h>
-#include <asm/io.h>
 
 struct pci_sys_data;
 struct hw_pci;
index 26cfa318142cdefe5d0bb5a529041eddaef075cb..52958099781400702fa380324148c842eefaa823 100644 (file)
@@ -18,8 +18,8 @@
  */
 #include <linux/kernel.h>
 #include <linux/module.h>
+#include <linux/io.h>
 #include <mach/hardware.h>
-#include <asm/io.h>
 
 void * __iomem __iop13xx_io(unsigned long io_addr)
 {
index 63ef1124ca5cfa5596242de8e88d2d779b83189e..f34b0ed806305474221051fa2b000199330b9e73 100644 (file)
@@ -110,8 +110,7 @@ static void iop13xx_msi_handler(unsigned int irq, struct irq_desc *desc)
                do {
                        j = find_first_bit(&status, 32);
                        (write_imipr[i])(1 << j); /* write back to clear bit */
-                       desc = irq_desc + IRQ_IOP13XX_MSI_0 + j + (32*i);
-                       desc_handle_irq(IRQ_IOP13XX_MSI_0 + j + (32*i), desc);
+                       generic_handle_irq(IRQ_IOP13XX_MSI_0 + j + (32*i));
                        status = (read_imipr[i])();
                } while (status);
        }
index b17ccc8cb471f206ac8044f614d5df8be19e3c71..cfd4d2e6dacd6d1f7fb235c84c98552c99347a0e 100644 (file)
  */
 
 #include <linux/serial_8250.h>
+#include <linux/io.h>
 #ifdef CONFIG_MTD_PHYSMAP
 #include <linux/mtd/physmap.h>
 #endif
 #include <asm/mach/map.h>
 #include <mach/hardware.h>
 #include <asm/irq.h>
-#include <asm/io.h>
 #include <asm/hardware/iop_adma.h>
 
 #define IOP13XX_UART_XTAL 33334000
index 2476347ea62f13b5119a28e1fd6f185d76a8ad8f..c6af1e1bee32e5a844d13686eabf02ade6f10c57 100644 (file)
@@ -21,7 +21,7 @@
 #include <linux/init.h>
 #include <linux/platform_device.h>
 #include <linux/dma-mapping.h>
-#include <asm/io.h>
+#include <linux/io.h>
 #include <asm/irq.h>
 #include <asm/sizes.h>
 
index 45d61276d2332acb6b312157a07248e69afac0a8..a9c2dfdb2507c0648e611b8fdbff0b0b83dae5fc 100644 (file)
@@ -25,8 +25,8 @@
 #include <linux/mtd/physmap.h>
 #include <linux/i2c.h>
 #include <linux/platform_device.h>
+#include <linux/io.h>
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
index 082818aaa2056fe8cd0ee452d0f75f03ca4d2965..dd1cd990451820ffde2bef6cd1ca4aa77b3d3f2f 100644 (file)
@@ -26,8 +26,9 @@
 #include <linux/serial_8250.h>
 #include <linux/mtd/physmap.h>
 #include <linux/platform_device.h>
+#include <linux/io.h>
 #include <mach/hardware.h>
-#include <asm/io.h>
+#include <asm/cputype.h>
 #include <asm/irq.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
@@ -49,8 +50,7 @@ static int force_ep80219;
 
 static int is_80219(void)
 {
-       extern int processor_id;
-       return !!((processor_id & 0xffffffe0) == 0x69052e20);
+       return !!((read_cpuid_id() & 0xffffffe0) == 0x69052e20);
 }
 
 static int is_ep80219(void)
index d735539808b4ab2f891bb909e98f3ee0a35059f8..fbe27798759d8449c60a1d245db2375d06c352e1 100644 (file)
@@ -23,8 +23,8 @@
 #include <linux/serial_8250.h>
 #include <linux/mtd/physmap.h>
 #include <linux/platform_device.h>
+#include <linux/io.h>
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
index 3173f9c5835d948ff884e7ae0ff2362579d35036..d2e427899729d19531d7236d1151d6b040f68730 100644 (file)
@@ -30,8 +30,8 @@
 #include <linux/i2c.h>
 #include <linux/platform_device.h>
 #include <linux/reboot.h>
+#include <linux/io.h>
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
index c7d99f9fafed254c9e3d640375dbbeccf2cad246..d51e10cddf20773f3d2bc5ed87c0106cbbeecd03 100644 (file)
@@ -22,8 +22,8 @@
 #include <linux/serial_8250.h>
 #include <linux/mtd/physmap.h>
 #include <linux/platform_device.h>
+#include <linux/io.h>
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
index af616c5f4fb26f6e476799fc37c0d2b4c7cba987..92fb44cdbcadf440bdd30048765eee11dd176e71 100644 (file)
@@ -22,8 +22,8 @@
 #include <linux/serial_8250.h>
 #include <linux/mtd/physmap.h>
 #include <linux/platform_device.h>
+#include <linux/io.h>
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
index 8c21870fa8082c2f0ebd60bc551110758dd6855d..cdae24e46eeae784398f3674973157ece4b6a434 100644 (file)
@@ -17,7 +17,7 @@
 #include <linux/serial.h>
 #include <linux/tty.h>
 #include <linux/serial_8250.h>
-#include <asm/io.h>
+#include <linux/io.h>
 #include <asm/pgtable.h>
 #include <asm/page.h>
 #include <asm/mach/map.h>
index a6a4f93085fd8041017b34e5da2c309e3b87a66c..babb22597163b5d2296983dccfc6bfba49a2ba77 100644 (file)
@@ -84,64 +84,57 @@ static struct map_desc ixp2000_io_desc[] __initdata = {
                .virtual        = IXP2000_CAP_VIRT_BASE,
                .pfn            = __phys_to_pfn(IXP2000_CAP_PHYS_BASE),
                .length         = IXP2000_CAP_SIZE,
-               .type           = MT_DEVICE_IXP2000,
+               .type           = MT_DEVICE,
        }, {
                .virtual        = IXP2000_INTCTL_VIRT_BASE,
                .pfn            = __phys_to_pfn(IXP2000_INTCTL_PHYS_BASE),
                .length         = IXP2000_INTCTL_SIZE,
-               .type           = MT_DEVICE_IXP2000,
+               .type           = MT_DEVICE,
        }, {
                .virtual        = IXP2000_PCI_CREG_VIRT_BASE,
                .pfn            = __phys_to_pfn(IXP2000_PCI_CREG_PHYS_BASE),
                .length         = IXP2000_PCI_CREG_SIZE,
-               .type           = MT_DEVICE_IXP2000,
+               .type           = MT_DEVICE,
        }, {
                .virtual        = IXP2000_PCI_CSR_VIRT_BASE,
                .pfn            = __phys_to_pfn(IXP2000_PCI_CSR_PHYS_BASE),
                .length         = IXP2000_PCI_CSR_SIZE,
-               .type           = MT_DEVICE_IXP2000,
+               .type           = MT_DEVICE,
        }, {
                .virtual        = IXP2000_MSF_VIRT_BASE,
                .pfn            = __phys_to_pfn(IXP2000_MSF_PHYS_BASE),
                .length         = IXP2000_MSF_SIZE,
-               .type           = MT_DEVICE_IXP2000,
+               .type           = MT_DEVICE,
        }, {
                .virtual        = IXP2000_SCRATCH_RING_VIRT_BASE,
                .pfn            = __phys_to_pfn(IXP2000_SCRATCH_RING_PHYS_BASE),
                .length         = IXP2000_SCRATCH_RING_SIZE,
-               .type           = MT_DEVICE_IXP2000,
+               .type           = MT_DEVICE,
        }, {
                .virtual        = IXP2000_SRAM0_VIRT_BASE,
                .pfn            = __phys_to_pfn(IXP2000_SRAM0_PHYS_BASE),
                .length         = IXP2000_SRAM0_SIZE,
-               .type           = MT_DEVICE_IXP2000,
+               .type           = MT_DEVICE,
        }, {
                .virtual        = IXP2000_PCI_IO_VIRT_BASE,
                .pfn            = __phys_to_pfn(IXP2000_PCI_IO_PHYS_BASE),
                .length         = IXP2000_PCI_IO_SIZE,
-               .type           = MT_DEVICE_IXP2000,
+               .type           = MT_DEVICE,
        }, {
                .virtual        = IXP2000_PCI_CFG0_VIRT_BASE,
                .pfn            = __phys_to_pfn(IXP2000_PCI_CFG0_PHYS_BASE),
                .length         = IXP2000_PCI_CFG0_SIZE,
-               .type           = MT_DEVICE_IXP2000,
+               .type           = MT_DEVICE,
        }, {
                .virtual        = IXP2000_PCI_CFG1_VIRT_BASE,
                .pfn            = __phys_to_pfn(IXP2000_PCI_CFG1_PHYS_BASE),
                .length         = IXP2000_PCI_CFG1_SIZE,
-               .type           = MT_DEVICE_IXP2000,
+               .type           = MT_DEVICE,
        }
 };
 
 void __init ixp2000_map_io(void)
 {
-       /*
-        * On IXP2400 CPUs we need to use MT_DEVICE_IXP2000 so that
-        * XCB=101 (to avoid triggering erratum #66), and given that
-        * this mode speeds up I/O accesses and we have write buffer
-        * flushes in the right places anyway, it doesn't hurt to use
-        * XCB=101 for all IXP2000s.
-        */
        iotable_init(ixp2000_io_desc, ARRAY_SIZE(ixp2000_io_desc));
 
        /* Set slowport to 8-bit mode.  */
@@ -311,8 +304,7 @@ static void ixp2000_GPIO_irq_handler(unsigned int irq, struct irq_desc *desc)
                   
        for (i = 0; i <= 7; i++) {
                if (status & (1<<i)) {
-                       desc = irq_desc + i + IRQ_IXP2000_GPIO0;
-                       desc_handle_irq(i + IRQ_IXP2000_GPIO0, desc);
+                       generic_handle_irq(i + IRQ_IXP2000_GPIO0);
                }
        }
 }
@@ -404,8 +396,7 @@ static void ixp2000_err_irq_handler(unsigned int irq, struct irq_desc *desc)
 
        for(i = 31; i >= 0; i--) {
                if(status & (1 << i)) {
-                       desc = irq_desc + IRQ_IXP2000_DRAM0_MIN_ERR + i;
-                       desc_handle_irq(IRQ_IXP2000_DRAM0_MIN_ERR + i, desc);
+                       generic_handle_irq(IRQ_IXP2000_DRAM0_MIN_ERR + i);
                }
        }
 }
index c62ed655c1a781dc2e6e40c17a2737644bb8ccb5..c84dfac13882a3b2838ba7b684a1531fa4e19fac 100644 (file)
@@ -32,8 +32,8 @@
 #include <linux/tty.h>
 #include <linux/serial_core.h>
 #include <linux/platform_device.h>
+#include <linux/io.h>
 
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/pgtable.h>
 #include <asm/page.h>
@@ -70,17 +70,17 @@ static struct map_desc enp2611_io_desc[] __initdata = {
                .virtual        = ENP2611_CALEB_VIRT_BASE,
                .pfn            = __phys_to_pfn(ENP2611_CALEB_PHYS_BASE),
                .length         = ENP2611_CALEB_SIZE,
-               .type           = MT_DEVICE_IXP2000,
+               .type           = MT_DEVICE,
        }, {
                .virtual        = ENP2611_PM3386_0_VIRT_BASE,
                .pfn            = __phys_to_pfn(ENP2611_PM3386_0_PHYS_BASE),
                .length         = ENP2611_PM3386_0_SIZE,
-               .type           = MT_DEVICE_IXP2000,
+               .type           = MT_DEVICE,
        }, {
                .virtual        = ENP2611_PM3386_1_VIRT_BASE,
                .pfn            = __phys_to_pfn(ENP2611_PM3386_1_PHYS_BASE),
                .length         = ENP2611_PM3386_1_SIZE,
-               .type           = MT_DEVICE_IXP2000,
+               .type           = MT_DEVICE,
        }
 };
 
index 19d80379a3e308d4d154028800f0501084aad37a..822f63f2f4a208063755e7dcc1eda5df3859991d 100644 (file)
  * Most of the registers are clumped in 4K regions spread throughout
  * the 0xc0000000 -> 0xc0100000 address range, but we just map in
  * the whole range using a single 1 MB section instead of small
- * 4K pages.  This has two advantages for us:
- *
- * 1) We use only one TLB entry for large number of on-chip I/O devices.
- *
- * 2) We can easily set the Section attributes to XCB=101 on the IXP2400
- *    as required per erratum #66.  We accomplish this by using a
- *    new MT_IXP2000_DEVICE memory type with the bits set as required.
+ * 4K pages.
  *
  * CAP stands for CSR Access Proxy.
  *
index c673b9ef9f69e071beebf04fa089325d035f1428..4467c4224d73f23723d9e43530ae822f663b7a13 100644 (file)
@@ -25,8 +25,8 @@
 #include <linux/ioport.h>
 #include <linux/slab.h>
 #include <linux/delay.h>
+#include <linux/io.h>
 
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/pgtable.h>
 #include <asm/page.h>
index 6715b50829a605c7f1ca09830ace1e75c9705538..94f68ba9ea50905ba0023f52fd35bbb3b1b9ad79 100644 (file)
@@ -25,8 +25,8 @@
 #include <linux/ioport.h>
 #include <linux/slab.h>
 #include <linux/delay.h>
+#include <linux/io.h>
 
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/pgtable.h>
 #include <asm/page.h>
index 5a781fd9757a1089c829cad9b1c5da3300de15fc..b0653a87159a89b36b67da7674b8163e80439f0e 100644 (file)
@@ -25,8 +25,8 @@
 #include <linux/ioport.h>
 #include <linux/slab.h>
 #include <linux/delay.h>
+#include <linux/io.h>
 
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/pgtable.h>
 #include <asm/page.h>
@@ -129,10 +129,8 @@ static void ixdp2x00_irq_handler(unsigned int irq, struct irq_desc *desc)
 
        for(i = 0; i < board_irq_count; i++) {
                if(ex_interrupt & (1 << i))  {
-                       struct irq_desc *cpld_desc;
                        int cpld_irq = IXP2000_BOARD_IRQ(0) + i;
-                       cpld_desc = irq_desc + cpld_irq;
-                       desc_handle_irq(cpld_irq, cpld_desc);
+                       generic_handle_irq(cpld_irq);
                }
        }
 
index 78a2341dee2c31fff2495d7dd7b1e1f361b22af9..4a12327a09a3a5052caf71e3531ae1c4ba22fea6 100644 (file)
@@ -30,8 +30,8 @@
 #include <linux/serial_core.h>
 #include <linux/platform_device.h>
 #include <linux/serial_8250.h>
+#include <linux/io.h>
 
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/pgtable.h>
 #include <asm/page.h>
@@ -79,10 +79,8 @@ static void ixdp2x01_irq_handler(unsigned int irq, struct irq_desc *desc)
 
        for (i = 0; i < IXP2000_BOARD_IRQS; i++) {
                if (ex_interrupt & (1 << i)) {
-                       struct irq_desc *cpld_desc;
                        int cpld_irq = IXP2000_BOARD_IRQ(0) + i;
-                       cpld_desc = irq_desc + cpld_irq;
-                       desc_handle_irq(cpld_irq, cpld_desc);
+                       generic_handle_irq(cpld_irq);
                }
        }
 
index 03d916fbe531efbdbe613736f9b1620f04d4f112..60e9fd08ab803036c6655d6153a8c4b20aadf197 100644 (file)
@@ -24,8 +24,8 @@
 #include <linux/ioport.h>
 #include <linux/slab.h>
 #include <linux/delay.h>
+#include <linux/io.h>
 
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/system.h>
 #include <mach/hardware.h>
index 68b4ac5b24815ec5767c98bf9f93b42cd2e6110e..aa4c4420ff3d9d5b9462fa914734eb4a493790ed 100644 (file)
@@ -253,7 +253,6 @@ static void pci_handler(unsigned int irq, struct irq_desc *desc)
 {
        u32 pci_interrupt;
        unsigned int irqno;
-       struct irq_desc *int_desc;
 
        pci_interrupt = *IXP23XX_PCI_XSCALE_INT_STATUS;
 
@@ -268,8 +267,7 @@ static void pci_handler(unsigned int irq, struct irq_desc *desc)
                BUG();
        }
 
-       int_desc = irq_desc + irqno;
-       desc_handle_irq(irqno, int_desc);
+       generic_handle_irq(irqno);
 
        desc->chip->unmask(irq);
 }
index b6e0bfa44df93416223b90b1d6bd52112858fa5c..f1b124a709abd232b63625f6ddc143fd4b17730a 100644 (file)
@@ -68,11 +68,9 @@ static void ixdp2351_inta_handler(unsigned int irq, struct irq_desc *desc)
 
        for (i = 0; i < IXDP2351_INTA_IRQ_NUM; i++) {
                if (ex_interrupt & (1 << i)) {
-                       struct irq_desc *cpld_desc;
                        int cpld_irq =
                                IXP23XX_MACH_IRQ(IXDP2351_INTA_IRQ_BASE + i);
-                       cpld_desc = irq_desc + cpld_irq;
-                       desc_handle_irq(cpld_irq, cpld_desc);
+                       generic_handle_irq(cpld_irq);
                }
        }
 
@@ -105,11 +103,9 @@ static void ixdp2351_intb_handler(unsigned int irq, struct irq_desc *desc)
 
        for (i = 0; i < IXDP2351_INTB_IRQ_NUM; i++) {
                if (ex_interrupt & (1 << i)) {
-                       struct irq_desc *cpld_desc;
                        int cpld_irq =
                                IXP23XX_MACH_IRQ(IXDP2351_INTB_IRQ_BASE + i);
-                       cpld_desc = irq_desc + cpld_irq;
-                       desc_handle_irq(cpld_irq, cpld_desc);
+                       generic_handle_irq(cpld_irq);
                }
        }
 
index 701d60aa0efd42c6ea88c37bb363d2dab65507da..59022becb134c93526eab0c350ffef3efdcc4ff4 100644 (file)
@@ -25,8 +25,8 @@
 #include <linux/ioport.h>
 #include <linux/slab.h>
 #include <linux/delay.h>
+#include <linux/io.h>
 
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/sizes.h>
 #include <asm/system.h>
index 192538a045753e437df60c3054dd8212ab3257ed..d816c51320c7c3206c7734adfce4f1bab3fadae8 100644 (file)
 #include <linux/slab.h>
 #include <linux/delay.h>
 #include <linux/device.h>
+#include <linux/io.h>
 #include <asm/dma-mapping.h>
 
-#include <asm/io.h>
+#include <asm/cputype.h>
 #include <asm/irq.h>
 #include <asm/sizes.h>
 #include <asm/system.h>
@@ -366,15 +367,13 @@ void __init ixp4xx_adjust_zones(int node, unsigned long *zone_size,
 
 void __init ixp4xx_pci_preinit(void)
 {  
-       unsigned long processor_id;
-
-       asm("mrc p15, 0, %0, cr0, cr0, 0;" : "=r"(processor_id) :);
+       unsigned long cpuid = read_cpuid_id();
 
        /*
         * Determine which PCI read method to use.
         * Rev 0 IXP425 requires workaround.
         */
-       if (!(processor_id & 0xf) && cpu_is_ixp42x()) {
+       if (!(cpuid & 0xf) && cpu_is_ixp42x()) {
                printk("PCI: IXP42x A0 silicon detected - "
                        "PCI Non-Prefetch Workaround Enabled\n");
                ixp4xx_pci_read = ixp4xx_pci_read_errata;
index 58bd2842a6f12f516ec9b5e340335a2620e342b3..7766f469456be0025ea8bc353dd45ad61c530e31 100644 (file)
 #include <linux/timex.h>
 #include <linux/clocksource.h>
 #include <linux/clockchips.h>
+#include <linux/io.h>
 
 #include <mach/udc.h>
 #include <mach/hardware.h>
 #include <asm/uaccess.h>
-#include <asm/io.h>
 #include <asm/pgtable.h>
 #include <asm/page.h>
 #include <asm/irq.h>
index 501dfdcc39fe996c86bc87ffb2289c3ae14f4925..e7c6386782ede189976cb4cb6b59fa2b7af97497 100644 (file)
 #include <linux/reboot.h>
 #include <linux/i2c.h>
 #include <linux/i2c-gpio.h>
+#include <linux/io.h>
 
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/flash.h>
-#include <asm/io.h>
 #include <asm/gpio.h>
 
 static struct flash_platform_data fsg_flash_data = {
index ff8aa2393bf94abd41bef12956686bedeecaa4de..51bd69c46d9433971932ce4244eb4e42d1fa7ce3 100644 (file)
 #ifndef __ASM_ARCH_CPU_H__
 #define __ASM_ARCH_CPU_H__
 
-extern unsigned int processor_id;
+#include <asm/cputype.h>
+
 /* Processor id value in CP15 Register 0 */
 #define IXP425_PROCESSOR_ID_VALUE      0x690541c0
 #define IXP435_PROCESSOR_ID_VALUE      0x69054040
 #define IXP465_PROCESSOR_ID_VALUE      0x69054200
 #define IXP4XX_PROCESSOR_ID_MASK       0xfffffff0
 
-#define cpu_is_ixp42x()        ((processor_id & IXP4XX_PROCESSOR_ID_MASK) == \
+#define cpu_is_ixp42x()        ((read_cpuid_id() & IXP4XX_PROCESSOR_ID_MASK) == \
                          IXP425_PROCESSOR_ID_VALUE)
-#define cpu_is_ixp43x()        ((processor_id & IXP4XX_PROCESSOR_ID_MASK) == \
+#define cpu_is_ixp43x()        ((read_cpuid_id() & IXP4XX_PROCESSOR_ID_MASK) == \
                          IXP435_PROCESSOR_ID_VALUE)
-#define cpu_is_ixp46x()        ((processor_id & IXP4XX_PROCESSOR_ID_MASK) == \
+#define cpu_is_ixp46x()        ((read_cpuid_id() & IXP4XX_PROCESSOR_ID_MASK) == \
                          IXP465_PROCESSOR_ID_VALUE)
 
 static inline u32 ixp4xx_read_feature_bits(void)
index 9b2d2ec14c8067153ae7e2741f8af05cf590e42c..f4a0c1bc133111e7674f240546734803085a2d99 100644 (file)
@@ -20,6 +20,7 @@
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/nand.h>
 #include <linux/mtd/partitions.h>
+#include <linux/delay.h>
 
 #include <asm/types.h>
 #include <asm/setup.h>
@@ -29,7 +30,6 @@
 #include <asm/irq.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/flash.h>
-#include <asm/delay.h>
 
 static struct flash_platform_data ixdp425_flash_data = {
        .map_name       = "cfi_probe",
index 84b5e62a9c0ab8a6f9defe0d9c59f0c9e8f4bc6b..0acd95ecf27ef39e716a2c27cf470e30c666c640 100644 (file)
 #include <linux/reboot.h>
 #include <linux/i2c.h>
 #include <linux/i2c-gpio.h>
+#include <linux/io.h>
 
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/flash.h>
-#include <asm/io.h>
 #include <asm/gpio.h>
 
 static struct flash_platform_data nas100d_flash_data = {
index a48a6655b887ef7fe535db996f08617a8b27e9af..bc9d920ae54f0f28a58597682abcc0e9c0c99c5e 100644 (file)
 #include <linux/reboot.h>
 #include <linux/i2c.h>
 #include <linux/i2c-gpio.h>
+#include <linux/io.h>
 
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/flash.h>
 #include <asm/mach/time.h>
-#include <asm/io.h>
 #include <asm/gpio.h>
 
 static struct flash_platform_data nslu2_flash_data = {
index c6c08e800233c90f0d85010e54e54a18840c51a5..7f3f24053a00978b06014e3592a4685f33bbfc0d 100644 (file)
@@ -24,9 +24,9 @@
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/init.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 
index 3624e65cd89b8752622802799e2fc343324cb303..9aecf0c4b8b1e47b8c65e0655c3eaa0774e38554 100644 (file)
@@ -23,8 +23,8 @@
 #include <linux/debugfs.h>
 #include <linux/seq_file.h>
 #include <linux/module.h>
+#include <linux/io.h>
 
-#include <asm/io.h>
 #include <mach/hardware.h>
 #include <asm/mach/irq.h>
 
@@ -72,7 +72,7 @@ int __init_or_module ks8695_gpio_interrupt(unsigned int pin, unsigned int type)
 
        /* set pin as input */
        x = __raw_readl(KS8695_GPIO_VA + KS8695_IOPM);
-       x &= ~IOPM_(pin);
+       x &= ~IOPM(pin);
        __raw_writel(x, KS8695_GPIO_VA + KS8695_IOPM);
 
        local_irq_restore(flags);
@@ -108,7 +108,7 @@ int __init_or_module gpio_direction_input(unsigned int pin)
 
        /* set pin as input */
        x = __raw_readl(KS8695_GPIO_VA + KS8695_IOPM);
-       x &= ~IOPM_(pin);
+       x &= ~IOPM(pin);
        __raw_writel(x, KS8695_GPIO_VA + KS8695_IOPM);
 
        local_irq_restore(flags);
@@ -136,14 +136,14 @@ int __init_or_module gpio_direction_output(unsigned int pin, unsigned int state)
        /* set line state */
        x = __raw_readl(KS8695_GPIO_VA + KS8695_IOPD);
        if (state)
-               x |= (1 << pin);
+               x |= IOPD(pin);
        else
-               x &= ~(1 << pin);
+               x &= ~IOPD(pin);
        __raw_writel(x, KS8695_GPIO_VA + KS8695_IOPD);
 
        /* set pin as output */
        x = __raw_readl(KS8695_GPIO_VA + KS8695_IOPM);
-       x |= IOPM_(pin);
+       x |= IOPM(pin);
        __raw_writel(x, KS8695_GPIO_VA + KS8695_IOPM);
 
        local_irq_restore(flags);
@@ -168,9 +168,9 @@ void gpio_set_value(unsigned int pin, unsigned int state)
        /* set output line state */
        x = __raw_readl(KS8695_GPIO_VA + KS8695_IOPD);
        if (state)
-               x |= (1 << pin);
+               x |= IOPD(pin);
        else
-               x &= ~(1 << pin);
+               x &= ~IOPD(pin);
        __raw_writel(x, KS8695_GPIO_VA + KS8695_IOPD);
 
        local_irq_restore(flags);
@@ -189,7 +189,7 @@ int gpio_get_value(unsigned int pin)
                return -EINVAL;
 
        x = __raw_readl(KS8695_GPIO_VA + KS8695_IOPD);
-       return (x & (1 << pin)) != 0;
+       return (x & IOPD(pin)) != 0;
 }
 EXPORT_SYMBOL(gpio_get_value);
 
@@ -240,7 +240,7 @@ static int ks8695_gpio_show(struct seq_file *s, void *unused)
        for (i = KS8695_GPIO_0; i <= KS8695_GPIO_15 ; i++) {
                seq_printf(s, "%i:\t", i);
 
-               seq_printf(s, "%s\t", (mode & IOPM_(i)) ? "Output" : "Input");
+               seq_printf(s, "%s\t", (mode & IOPM(i)) ? "Output" : "Input");
 
                if (i <= KS8695_GPIO_3) {
                        if (ctrl & enable[i]) {
@@ -273,7 +273,7 @@ static int ks8695_gpio_show(struct seq_file *s, void *unused)
 
                seq_printf(s, "\t");
 
-               seq_printf(s, "%i\n", (data & IOPD_(i)) ? 1 : 0);
+               seq_printf(s, "%i\n", (data & IOPD(i)) ? 1 : 0);
        }
        return 0;
 }
index dadbe66cb75c42b2364436ba2bc8736096d7c28a..8fbc4c76c38b6485000476d8809154e01f009873 100644 (file)
@@ -31,8 +31,8 @@
 /* Platform-bus mapping */
 extern struct bus_type platform_bus_type;
 #define is_lbus_device(dev)            (dev && dev->bus == &platform_bus_type)
-#define __arch_dma_to_virt(dev, x)     ({ is_lbus_device(dev) ? \
-                                       __phys_to_virt(x) : __bus_to_virt(x); })
+#define __arch_dma_to_virt(dev, x)     ({ (void *) (is_lbus_device(dev) ? \
+                                       __phys_to_virt(x) : __bus_to_virt(x)); })
 #define __arch_virt_to_dma(dev, x)     ({ is_lbus_device(dev) ? \
                                        (dma_addr_t)__virt_to_phys(x) : (dma_addr_t)__virt_to_bus(x); })
 #define __arch_page_to_dma(dev, x)     __arch_virt_to_dma(dev, page_address(x))
index 0df6fe61d1ce59afe761183b5c073551f5c71bd3..90614a7d05486a1e7fb785c5622041a24147446c 100644 (file)
@@ -24,7 +24,7 @@
 
 
 /* Port Mode Register */
-#define IOPM_(x)               (1 << (x))      /* Mode for GPIO Pin x */
+#define IOPM(x)                        (1 << (x))      /* Mode for GPIO Pin x */
 
 /* Port Control Register */
 #define IOPC_IOTIM1EN          (1 << 17)       /* GPIO Pin for Timer1 Enable */
@@ -50,6 +50,6 @@
 #define IOPC_TM_EDGE           (6)             /* Both Edge Detection */
 
 /* Port Data Register */
-#define IOPD_(x)               (1 << (x))      /* Signal Level of GPIO Pin x */
+#define IOPD(x)                        (1 << (x))      /* Signal Level of GPIO Pin x */
 
 #endif
index 9ef409901e764247f88efbe7041b01250b093d20..82c5f3791afbc38dca37ce46056c1358ee2055d5 100644 (file)
@@ -29,8 +29,8 @@
 #define KS8695_LRDLB           (0x14)          /* Receive Descriptor List Base Address */
 #define KS8695_LMAL            (0x18)          /* MAC Station Address Low */
 #define KS8695_LMAH            (0x1c)          /* MAC Station Address High */
-#define KS8695_LMAAL_(n)       (0x80 + ((n)*8))        /* MAC Additional Station Address (0..15) Low */
-#define KS8695_LMAAH_(n)       (0x84 + ((n)*8))        /* MAC Additional Station Address (0..15) High */
+#define KS8695_LMAAL(n)                (0x80 + ((n)*8))        /* MAC Additional Station Address (0..15) Low */
+#define KS8695_LMAAH(n)                (0x84 + ((n)*8))        /* MAC Additional Station Address (0..15) High */
 
 
 /* DMA Transmit Control Register */
index eb494ec6e95690fb28f8c3fb44559d29c983a8ce..c475bed22b8ebceeaad05ebaf0de41cbf6547924 100644 (file)
@@ -29,8 +29,8 @@
 #define KS8695_WRDLB           (0x14)          /* Receive Descriptor List Base Address */
 #define KS8695_WMAL            (0x18)          /* MAC Station Address Low */
 #define KS8695_WMAH            (0x1c)          /* MAC Station Address High */
-#define KS8695_WMAAL_(n)       (0x80 + ((n)*8))        /* MAC Additional Station Address (0..15) Low */
-#define KS8695_WMAAH_(n)       (0x84 + ((n)*8))        /* MAC Additional Station Address (0..15) High */
+#define KS8695_WMAAL(n)                (0x80 + ((n)*8))        /* MAC Additional Station Address (0..15) Low */
+#define KS8695_WMAAH(n)                (0x84 + ((n)*8))        /* MAC Additional Station Address (0..15) High */
 
 
 /* DMA Transmit Control Register */
index 2a6f91869056357607f7bc81eceda2ace4077378..5a9b032bdbeb5a95318291faa426f9f12aeb42ed 100644 (file)
@@ -14,7 +14,7 @@
 #ifndef __ASM_ARCH_SYSTEM_H
 #define __ASM_ARCH_SYSTEM_H
 
-#include <asm/io.h>
+#include <linux/io.h>
 #include <mach/regs-timer.h>
 
 static void arch_idle(void)
index 0eee37a690756b6c3ce2acdc0a032db35e42d408..9495cb4d701a074e81a1194b8dbe63e315c4222d 100644 (file)
@@ -14,7 +14,7 @@
 #ifndef __ASM_ARCH_UNCOMPRESS_H
 #define __ASM_ARCH_UNCOMPRESS_H
 
-#include <asm/io.h>
+#include <linux/io.h>
 #include <mach/regs-uart.h>
 
 static void putc(char c)
index e5e71f4dbb8481aa6bdd959c62883cb223c751f7..e375c1d53f8149e8a56bc532d7789ef2a09f89e7 100644 (file)
 #include <linux/interrupt.h>
 #include <linux/ioport.h>
 #include <linux/sysdev.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
 #include <asm/irq.h>
-#include <asm/io.h>
 
 #include <asm/mach/irq.h>
 
index 1746c67af1762f71ba42045088784fdc778cc68c..f5ebcc0fcab9f9c36eaaf5dcbcc6b350393fbb2a 100644 (file)
@@ -27,8 +27,8 @@
 #include <linux/init.h>
 #include <linux/irq.h>
 #include <linux/delay.h>
+#include <linux/io.h>
 
-#include <asm/io.h>
 #include <asm/signal.h>
 #include <asm/mach/pci.h>
 #include <mach/hardware.h>
@@ -141,7 +141,7 @@ static struct pci_ops ks8695_pci_ops = {
        .write  = ks8695_pci_writeconfig,
 };
 
-static struct pci_bus *ks8695_pci_scan_bus(int nr, struct pci_sys_data *sys)
+static struct pci_bus* __init ks8695_pci_scan_bus(int nr, struct pci_sys_data *sys)
 {
        return pci_scan_bus(sys->busnr, &ks8695_pci_ops, sys);
 }
index 940888dffc16898f7177e4a1957016bed85062eb..69c072c2c0f9a28c1fc466a786216f4ad62b24e8 100644 (file)
@@ -24,8 +24,8 @@
 #include <linux/irq.h>
 #include <linux/kernel.h>
 #include <linux/sched.h>
+#include <linux/io.h>
 
-#include <asm/io.h>
 #include <asm/mach/time.h>
 
 #include <mach/regs-timer.h>
index 6f4c6a1798c13ace0388cdef77df2427a17134c6..9be7466e346cdf152e13767242023e8a53c4c0c1 100644 (file)
@@ -40,23 +40,22 @@ config LPD7A40X_CPLD_SSP
        bool
 
 config LH7A40X_CONTIGMEM
-       bool "Disable NUMA Support"
-       depends on ARCH_LH7A40X
+       bool "Disable NUMA/SparseMEM Support"
        help
          Say Y here if your bootloader sets the SROMLL bit(s) in
          the SDRAM controller, organizing memory as a contiguous
-         array.  This option will disable CONFIG_DISCONTIGMEM and
-          force the kernel to manage all memory in one node.
+         array.  This option will disable sparse memory support
+          and force the kernel to manage all memory in one node.
 
-         Setting this option incorrectly may prevent the kernel from
-         booting.  It is OK to leave it N.
+         Setting this option incorrectly may prevent the kernel
+         from booting.  It is OK to leave it N.
 
          For more information, consult
            <file:Documentation/arm/Sharp-LH/SDRAM>.
 
 config LH7A40X_ONE_BANK_PER_NODE
        bool "Optimize NUMA Node Tables for Size"
-       depends on ARCH_LH7A40X && !LH7A40X_CONTIGMEM
+       depends on !LH7A40X_CONTIGMEM
        help
          Say Y here to produce compact memory node tables.  By
          default pairs of adjacent physical RAM banks are managed
index 551b972618268d1cee0aef6286ba8c9aebee236e..3d7bd50b9095ba30abc98130c86a0efd9ae86bfd 100644 (file)
@@ -77,7 +77,7 @@ static void kev7a400_cpld_handler (unsigned int irq, struct irq_desc *desc)
        irq = IRQ_KEV7A400_CPLD;
        for (; mask; mask >>= 1, ++irq)
                if (mask & 1)
-                       desc_handle_irq(irq, desc);
+                       generic_handle_irq(irq);
 }
 
 void __init lh7a40x_init_board_irq (void)
index e373fb8e26999911b3ce8e2575d02369019390b9..cb15e5d321202690912bf33b184bfa5f9e2f7717 100644 (file)
@@ -214,11 +214,11 @@ static void lpd7a40x_cpld_handler (unsigned int irq, struct irq_desc *desc)
        desc->chip->ack (irq);
 
        if ((mask & (1<<0)) == 0)       /* WLAN */
-               IRQ_DISPATCH (IRQ_LPD7A40X_ETH_INT);
+               generic_handle_irq(IRQ_LPD7A40X_ETH_INT);
 
 #if defined (IRQ_TOUCH)
        if ((mask & (1<<1)) == 0)       /* Touch */
-               IRQ_DISPATCH (IRQ_TOUCH);
+               generic_handle_irq(IRQ_TOUCH);
 #endif
 
        desc->chip->unmask (irq); /* Level-triggered need this */
index 0ca20c6c83b7be253e4ae897f6ba2b01af90f496..6ed3f6b6db766477c23c19e959dda22a11a5c251 100644 (file)
@@ -15,4 +15,3 @@ extern void lh7a404_init_irq (void);
 extern void lh7a40x_clcd_init (void);
 extern void lh7a40x_init_board_irq (void);
 
-#define IRQ_DISPATCH(irq) desc_handle_irq((irq),(irq_desc + irq))
index f7107b4c197a7ad4d143730138eea1d831f47371..1da14ff66c93e035dc448997d2d280104af5ebfc 100644 (file)
 
 #endif
 
+/*
+ * Sparsemem version of the above
+ */
+#define MAX_PHYSMEM_BITS       32
+#define SECTION_SIZE_BITS      24
+
 #endif
index 0d5063ebda10f51caf9641660575ee238a7d2852..fd033bb4342fc37f928bece12fcfb969fead5610 100644 (file)
@@ -63,10 +63,10 @@ static void lh7a40x_cpld_handler (unsigned int irq, struct irq_desc *desc)
        desc->chip->ack (irq);
 
        if ((mask & 0x1) == 0)  /* WLAN */
-               IRQ_DISPATCH (IRQ_LPD7A40X_ETH_INT);
+               generic_handle_irq(IRQ_LPD7A40X_ETH_INT);
 
        if ((mask & 0x2) == 0)  /* Touch */
-               IRQ_DISPATCH (IRQ_LPD7A400_TS);
+               generic_handle_irq(IRQ_LPD7A400_TS);
 
        desc->chip->unmask (irq); /* Level-triggered need this */
 }
index 51fbef9601b954dd512fed71bc7b83bcde3bc4bf..2901d49d14847a43b3368dac8a7140c61568e420 100644 (file)
@@ -43,8 +43,8 @@
 #include <linux/init.h>
 #include <linux/delay.h>
 #include <linux/spinlock.h>
+#include <linux/io.h>
 
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <mach/hardware.h>
 
index 7fe9e06cf662f31113b5dd40bde63052f8675933..4601e425bae3484f0caa87a7445a44121867853d 100644 (file)
@@ -13,9 +13,9 @@
 #include <linux/interrupt.h>
 #include <linux/irq.h>
 #include <linux/time.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/leds.h>
 
index 70ca56bb6f330bc0eb85da19f0a46abdc454962b..0332d8f5c18cf86036ffff55562790930832ea18 100644 (file)
@@ -11,8 +11,8 @@
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/mbus.h>
+#include <linux/io.h>
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include "common.h"
 
 /*
index 5a487930cb2f92427946ea09f8f3a9bba0e1b4a3..e1f97338d5b77b7eea1855aa0da6d7926148282b 100644 (file)
@@ -11,7 +11,7 @@
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/irq.h>
-#include <asm/io.h>
+#include <linux/io.h>
 #include <plat/irq.h>
 #include "common.h"
 
index 995afc4ade4be14c70577ec82b793c1b7f2de154..a24259133e070258de7aa83236159d681fc4e276 100644 (file)
@@ -18,6 +18,8 @@
 #include <linux/init.h>
 #include <linux/platform_device.h>
 #include <linux/input.h>
+#include <linux/io.h>
+#include <linux/delay.h>
 
 #include <mach/hardware.h>
 #include <asm/mach-types.h>
@@ -28,9 +30,6 @@
 #include <mach/board.h>
 #include <mach/msm_iomap.h>
 
-#include <asm/io.h>
-#include <asm/delay.h>
-
 #include <linux/mtd/nand.h>
 #include <linux/mtd/partitions.h>
 
index 3a511368a5d8b25d5e8a9a257f21f9f3382da71d..604f8ade9587948244a7390da3a8263c0c2f5859 100644 (file)
@@ -19,9 +19,9 @@
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/platform_device.h>
+#include <linux/io.h>
 
 #include <asm/mach/flash.h>
-#include <asm/io.h>
 
 #include <asm/setup.h>
 
index 9de08265d97411d492fc16dc3d59ed1ac9fe1a29..0c8f252637e15a31486887c15dd28818829691eb 100644 (file)
@@ -13,7 +13,7 @@
  *
  */
 
-#include <asm/io.h>
+#include <linux/io.h>
 #include <linux/interrupt.h>
 #include <mach/dma.h>
 
index 5976200de99b7df1e963c9983c57501aeceec78b..7999e4ba8e200c4325f4df99d296262453aa1eaf 100644 (file)
@@ -18,9 +18,9 @@
 
 #include <linux/kernel.h>
 #include <linux/init.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/page.h>
 #include <mach/msm_iomap.h>
 #include <asm/mach/map.h>
index 66901baf8c8e33d240c32d43af23fd485a1f5110..04b8d182ff8aa72a33af684d79bc1f9ba7094f86 100644 (file)
 #include <linux/interrupt.h>
 #include <linux/ptrace.h>
 #include <linux/timer.h>
-
 #include <linux/irq.h>
-#include <mach/hardware.h>
+#include <linux/io.h>
 
-#include <asm/io.h>
+#include <mach/hardware.h>
 
 #include <mach/msm_iomap.h>
 
index 9f02d7dca9851f1bc2902d455706e4a6e46cc4b8..2bffe9b7e9fe4e726b1b2814675390a03de4629c 100644 (file)
 #include <linux/clk.h>
 #include <linux/clockchips.h>
 #include <linux/delay.h>
+#include <linux/io.h>
 
 #include <asm/mach/time.h>
 #include <mach/msm_iomap.h>
 
-#include <asm/io.h>
-
 #define MSM_DGT_BASE (MSM_GPT_BASE + 0x10)
 #define MSM_DGT_SHIFT (5)
 
index 4004b672a2eb780894492afe632766d9b431577b..311d5b0e9bc7b20cb691dcaa417400472fc088b3 100644 (file)
@@ -11,7 +11,7 @@
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/mbus.h>
-#include <asm/io.h>
+#include <linux/io.h>
 #include "common.h"
 
 /*
diff --git a/arch/arm/mach-mx2/devices.h b/arch/arm/mach-mx2/devices.h
new file mode 100644 (file)
index 0000000..c77a4b8
--- /dev/null
@@ -0,0 +1,15 @@
+
+extern struct platform_device mxc_gpt1;
+extern struct platform_device mxc_gpt2;
+extern struct platform_device mxc_gpt3;
+extern struct platform_device mxc_gpt4;
+extern struct platform_device mxc_gpt5;
+extern struct platform_device mxc_wdt;
+extern struct platform_device mxc_irda_device;
+extern struct platform_device mxc_uart_device0;
+extern struct platform_device mxc_uart_device1;
+extern struct platform_device mxc_uart_device2;
+extern struct platform_device mxc_uart_device3;
+extern struct platform_device mxc_uart_device4;
+extern struct platform_device mxc_uart_device5;
+
index 4ce56ef4d8d34927ac32bff257489023c46bf59b..56e22d3ca075a7e6ae886b206a29bc6bcb507ebd 100644 (file)
@@ -34,6 +34,8 @@
 #include <mach/iomux-mx1-mx2.h>
 #include <mach/board-mx27ads.h>
 
+#include "devices.h"
+
 /* ADS's NOR flash */
 static struct physmap_flash_data mx27ads_flash_data = {
        .width = 2,
@@ -251,12 +253,14 @@ static struct imxuart_platform_data uart_pdata[] = {
 
 static void __init mx27ads_board_init(void)
 {
-       int i;
-
        gpio_fec_active();
 
-       for (i = 0; i < 6; i++)
-               imx_init_uart(i, &uart_pdata[i]);
+       mxc_register_device(&mxc_uart_device0, &uart_pdata[0]);
+       mxc_register_device(&mxc_uart_device1, &uart_pdata[1]);
+       mxc_register_device(&mxc_uart_device2, &uart_pdata[2]);
+       mxc_register_device(&mxc_uart_device3, &uart_pdata[3]);
+       mxc_register_device(&mxc_uart_device4, &uart_pdata[4]);
+       mxc_register_device(&mxc_uart_device5, &uart_pdata[5]);
 
        platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices));
 }
index 1028f453cfc8d6354ce7359afb5da2de4a0670c6..7f55746e259156181442e4c682d7162541a85e9e 100644 (file)
@@ -28,6 +28,8 @@
 #include <mach/imx-uart.h>
 #include <mach/board-pcm038.h>
 
+#include "devices.h"
+
 /*
  * Phytec's phyCORE-i.MX27 comes with 32MiB flash,
  * 16 bit width
@@ -170,11 +172,11 @@ static struct platform_device *platform_devices[] __initdata = {
 
 static void __init pcm038_init(void)
 {
-       int i;
        gpio_fec_active();
 
-       for (i = 0; i < 3; i++)
-               imx_init_uart(i, &uart_pdata[i]);
+       mxc_register_device(&mxc_uart_device0, &uart_pdata[0]);
+       mxc_register_device(&mxc_uart_device1, &uart_pdata[1]);
+       mxc_register_device(&mxc_uart_device2, &uart_pdata[2]);
 
        platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices));
 
index e31fd44f7941fcdda79eafe3da9bd28a24232336..16debc296dad53ff3f440169d0dbed6383e61dfe 100644 (file)
@@ -35,7 +35,7 @@ static struct resource uart0[] = {
        },
 };
 
-static struct platform_device mxc_uart_device0 = {
+struct platform_device mxc_uart_device0 = {
        .name = "imx-uart",
        .id = 0,
        .resource = uart0,
@@ -54,7 +54,7 @@ static struct resource uart1[] = {
        },
 };
 
-static struct platform_device mxc_uart_device1 = {
+struct platform_device mxc_uart_device1 = {
        .name = "imx-uart",
        .id = 1,
        .resource = uart1,
@@ -73,7 +73,7 @@ static struct resource uart2[] = {
        },
 };
 
-static struct platform_device mxc_uart_device2 = {
+struct platform_device mxc_uart_device2 = {
        .name = "imx-uart",
        .id = 2,
        .resource = uart2,
@@ -92,7 +92,7 @@ static struct resource uart3[] = {
        },
 };
 
-static struct platform_device mxc_uart_device3 = {
+struct platform_device mxc_uart_device3 = {
        .name = "imx-uart",
        .id = 3,
        .resource = uart3,
@@ -111,7 +111,7 @@ static struct resource uart4[] = {
        },
 };
 
-static struct platform_device mxc_uart_device4 = {
+struct platform_device mxc_uart_device4 = {
        .name = "imx-uart",
        .id = 4,
        .resource = uart4,
@@ -130,48 +130,9 @@ static struct resource uart5[] = {
        },
 };
 
-static struct platform_device mxc_uart_device5 = {
+struct platform_device mxc_uart_device5 = {
        .name = "imx-uart",
        .id = 5,
        .resource = uart5,
        .num_resources = ARRAY_SIZE(uart5),
 };
-
-/*
- * Register only those UARTs that physically exists
- */
-int __init imx_init_uart(int uart_no, struct imxuart_platform_data *pdata)
-{
-       switch (uart_no) {
-       case 0:
-               mxc_uart_device0.dev.platform_data = pdata;
-               platform_device_register(&mxc_uart_device0);
-               break;
-       case 1:
-               mxc_uart_device1.dev.platform_data = pdata;
-               platform_device_register(&mxc_uart_device1);
-               break;
-#ifndef CONFIG_MXC_IRDA
-       case 2:
-               mxc_uart_device2.dev.platform_data = pdata;
-               platform_device_register(&mxc_uart_device2);
-               break;
-#endif
-       case 3:
-               mxc_uart_device3.dev.platform_data = pdata;
-               platform_device_register(&mxc_uart_device3);
-               break;
-       case 4:
-               mxc_uart_device4.dev.platform_data = pdata;
-               platform_device_register(&mxc_uart_device4);
-               break;
-       case 5:
-               mxc_uart_device5.dev.platform_data = pdata;
-               platform_device_register(&mxc_uart_device5);
-               break;
-       default:
-               return -ENODEV;
-       }
-
-       return 0;
-}
index e08c6a8ac56be1e56d7d521364ade09ffbe88fac..a6bdcc07f3c964ea7ed3437fefbe39bb20994262 100644 (file)
@@ -36,7 +36,7 @@ static struct resource uart0[] = {
        },
 };
 
-static struct platform_device mxc_uart_device0 = {
+struct platform_device mxc_uart_device0 = {
        .name = "imx-uart",
        .id = 0,
        .resource = uart0,
@@ -55,7 +55,7 @@ static struct resource uart1[] = {
        },
 };
 
-static struct platform_device mxc_uart_device1 = {
+struct platform_device mxc_uart_device1 = {
        .name = "imx-uart",
        .id = 1,
        .resource = uart1,
@@ -74,7 +74,7 @@ static struct resource uart2[] = {
        },
 };
 
-static struct platform_device mxc_uart_device2 = {
+struct platform_device mxc_uart_device2 = {
        .name = "imx-uart",
        .id = 2,
        .resource = uart2,
@@ -93,7 +93,7 @@ static struct resource uart3[] = {
        },
 };
 
-static struct platform_device mxc_uart_device3 = {
+struct platform_device mxc_uart_device3 = {
        .name = "imx-uart",
        .id = 3,
        .resource = uart3,
@@ -112,46 +112,13 @@ static struct resource uart4[] = {
        },
 };
 
-static struct platform_device mxc_uart_device4 = {
+struct platform_device mxc_uart_device4 = {
        .name = "imx-uart",
        .id = 4,
        .resource = uart4,
        .num_resources = ARRAY_SIZE(uart4),
 };
 
-/*
- * Register only those UARTs that physically exist
- */
-int __init imx_init_uart(int uart_no, struct imxuart_platform_data *pdata)
-{
-       switch (uart_no) {
-       case 0:
-               mxc_uart_device0.dev.platform_data = pdata;
-               platform_device_register(&mxc_uart_device0);
-               break;
-       case 1:
-               mxc_uart_device1.dev.platform_data = pdata;
-               platform_device_register(&mxc_uart_device1);
-               break;
-       case 2:
-               mxc_uart_device2.dev.platform_data = pdata;
-               platform_device_register(&mxc_uart_device2);
-               break;
-       case 3:
-               mxc_uart_device3.dev.platform_data = pdata;
-               platform_device_register(&mxc_uart_device3);
-               break;
-       case 4:
-               mxc_uart_device4.dev.platform_data = pdata;
-               platform_device_register(&mxc_uart_device4);
-               break;
-       default:
-               return -ENODEV;
-       }
-
-       return 0;
-}
-
 /* GPIO port description */
 static struct mxc_gpio_port imx_gpio_ports[] = {
        [0] = {
diff --git a/arch/arm/mach-mx3/devices.h b/arch/arm/mach-mx3/devices.h
new file mode 100644 (file)
index 0000000..4dc03f9
--- /dev/null
@@ -0,0 +1,6 @@
+
+extern struct platform_device mxc_uart_device0;
+extern struct platform_device mxc_uart_device1;
+extern struct platform_device mxc_uart_device2;
+extern struct platform_device mxc_uart_device3;
+extern struct platform_device mxc_uart_device4;
index 3dda1fe23cbf13ee2346523b9f54f439498aa534..6e664be8cc13ed187ba28159cec8283ccd1e3c1a 100644 (file)
@@ -43,7 +43,8 @@ static DEFINE_SPINLOCK(gpio_mux_lock);
  */
 int mxc_iomux_mode(unsigned int pin_mode)
 {
-       u32 reg, field, l, mode, ret = 0;
+       u32 field, l, mode, ret = 0;
+       void __iomem *reg;
 
        reg = IOMUXSW_MUX_CTL + (pin_mode & IOMUX_REG_MASK);
        field = pin_mode & 0x3;
@@ -70,7 +71,8 @@ EXPORT_SYMBOL(mxc_iomux_mode);
  */
 void mxc_iomux_set_pad(enum iomux_pins pin, u32 config)
 {
-       u32 reg, field, l;
+       u32 field, l;
+       void __iomem *reg;
 
        reg = IOMUXSW_PAD_CTL + (pin + 2) / 3;
        field = (pin + 2) % 3;
index 30d842bd4d64b10b39cca200d47775afa7a89c20..0589b5cd33c7be5fd08a5a59013ada0f85ce457f 100644 (file)
@@ -49,7 +49,7 @@ static struct map_desc mxc_io_desc[] __initdata = {
                .virtual        = AVIC_BASE_ADDR_VIRT,
                .pfn            = __phys_to_pfn(AVIC_BASE_ADDR),
                .length         = AVIC_SIZE,
-               .type           = MT_NONSHARED_DEVICE
+               .type           = MT_DEVICE_NONSHARED
        },
 };
 
index 60fb4e0d5acd18c20a946e4f4c6ed9a8d837c027..1be4a390c63f1ae64ed84415ffed60bfec0be646 100644 (file)
@@ -22,6 +22,7 @@
 #include <linux/init.h>
 #include <linux/clk.h>
 #include <linux/serial_8250.h>
+#include <linux/irq.h>
 
 #include <mach/hardware.h>
 #include <asm/mach-types.h>
@@ -31,6 +32,8 @@
 #include <asm/mach/map.h>
 #include <mach/common.h>
 #include <mach/board-mx31ads.h>
+#include <mach/imx-uart.h>
+#include <mach/iomux-mx3.h>
 
 /*!
  * @file mx31ads.c
@@ -84,6 +87,108 @@ static inline int mxc_init_extuart(void)
 }
 #endif
 
+#if defined(CONFIG_SERIAL_IMX) || defined(CONFIG_SERIAL_IMX_MODULE)
+static struct imxuart_platform_data uart_pdata = {
+       .flags = IMXUART_HAVE_RTSCTS,
+};
+
+static inline void mxc_init_imx_uart(void)
+{
+       mxc_iomux_mode(MX31_PIN_CTS1__CTS1);
+       mxc_iomux_mode(MX31_PIN_RTS1__RTS1);
+       mxc_iomux_mode(MX31_PIN_TXD1__TXD1);
+       mxc_iomux_mode(MX31_PIN_RXD1__RXD1);
+
+       mxc_register_device(&mxc_uart_device0, &uart_pdata);
+}
+#else /* !SERIAL_IMX */
+static inline void mxc_init_imx_uart(void)
+{
+}
+#endif /* !SERIAL_IMX */
+
+static void mx31ads_expio_irq_handler(u32 irq, struct irq_desc *desc)
+{
+       u32 imr_val;
+       u32 int_valid;
+       u32 expio_irq;
+
+       imr_val = __raw_readw(PBC_INTMASK_SET_REG);
+       int_valid = __raw_readw(PBC_INTSTATUS_REG) & imr_val;
+
+       expio_irq = MXC_EXP_IO_BASE;
+       for (; int_valid != 0; int_valid >>= 1, expio_irq++) {
+               if ((int_valid & 1) == 0)
+                       continue;
+
+               generic_handle_irq(expio_irq);
+       }
+}
+
+/*
+ * Disable an expio pin's interrupt by setting the bit in the imr.
+ * @param irq           an expio virtual irq number
+ */
+static void expio_mask_irq(u32 irq)
+{
+       u32 expio = MXC_IRQ_TO_EXPIO(irq);
+       /* mask the interrupt */
+       __raw_writew(1 << expio, PBC_INTMASK_CLEAR_REG);
+       __raw_readw(PBC_INTMASK_CLEAR_REG);
+}
+
+/*
+ * Acknowledge an expanded io pin's interrupt by clearing the bit in the isr.
+ * @param irq           an expanded io virtual irq number
+ */
+static void expio_ack_irq(u32 irq)
+{
+       u32 expio = MXC_IRQ_TO_EXPIO(irq);
+       /* clear the interrupt status */
+       __raw_writew(1 << expio, PBC_INTSTATUS_REG);
+}
+
+/*
+ * Enable a expio pin's interrupt by clearing the bit in the imr.
+ * @param irq           a expio virtual irq number
+ */
+static void expio_unmask_irq(u32 irq)
+{
+       u32 expio = MXC_IRQ_TO_EXPIO(irq);
+       /* unmask the interrupt */
+       __raw_writew(1 << expio, PBC_INTMASK_SET_REG);
+}
+
+static struct irq_chip expio_irq_chip = {
+       .ack = expio_ack_irq,
+       .mask = expio_mask_irq,
+       .unmask = expio_unmask_irq,
+};
+
+static void __init mx31ads_init_expio(void)
+{
+       int i;
+
+       printk(KERN_INFO "MX31ADS EXPIO(CPLD) hardware\n");
+
+       /*
+        * Configure INT line as GPIO input
+        */
+       mxc_iomux_mode(IOMUX_MODE(MX31_PIN_GPIO1_4, IOMUX_CONFIG_GPIO));
+
+       /* disable the interrupt and clear the status */
+       __raw_writew(0xFFFF, PBC_INTMASK_CLEAR_REG);
+       __raw_writew(0xFFFF, PBC_INTSTATUS_REG);
+       for (i = MXC_EXP_IO_BASE; i < (MXC_EXP_IO_BASE + MXC_MAX_EXP_IO_LINES);
+            i++) {
+               set_irq_chip(i, &expio_irq_chip);
+               set_irq_handler(i, handle_level_irq);
+               set_irq_flags(i, IRQF_VALID);
+       }
+       set_irq_type(EXPIO_PARENT_INT, IRQ_TYPE_LEVEL_HIGH);
+       set_irq_chained_handler(EXPIO_PARENT_INT, mx31ads_expio_irq_handler);
+}
+
 /*!
  * This structure defines static mappings for the i.MX31ADS board.
  */
@@ -92,17 +197,17 @@ static struct map_desc mx31ads_io_desc[] __initdata = {
                .virtual        = AIPS1_BASE_ADDR_VIRT,
                .pfn            = __phys_to_pfn(AIPS1_BASE_ADDR),
                .length         = AIPS1_SIZE,
-               .type           = MT_NONSHARED_DEVICE
+               .type           = MT_DEVICE_NONSHARED
        }, {
                .virtual        = SPBA0_BASE_ADDR_VIRT,
                .pfn            = __phys_to_pfn(SPBA0_BASE_ADDR),
                .length         = SPBA0_SIZE,
-               .type           = MT_NONSHARED_DEVICE
+               .type           = MT_DEVICE_NONSHARED
        }, {
                .virtual        = AIPS2_BASE_ADDR_VIRT,
                .pfn            = __phys_to_pfn(AIPS2_BASE_ADDR),
                .length         = AIPS2_SIZE,
-               .type           = MT_NONSHARED_DEVICE
+               .type           = MT_DEVICE_NONSHARED
        }, {
                .virtual        = CS4_BASE_ADDR_VIRT,
                .pfn            = __phys_to_pfn(CS4_BASE_ADDR),
@@ -120,12 +225,19 @@ void __init mx31ads_map_io(void)
        iotable_init(mx31ads_io_desc, ARRAY_SIZE(mx31ads_io_desc));
 }
 
+void __init mx31ads_init_irq(void)
+{
+       mxc_init_irq();
+       mx31ads_init_expio();
+}
+
 /*!
  * Board specific initialization.
  */
 static void __init mxc_board_init(void)
 {
        mxc_init_extuart();
+       mxc_init_imx_uart();
 }
 
 static void __init mx31ads_timer_init(void)
@@ -148,7 +260,7 @@ MACHINE_START(MX31ADS, "Freescale MX31ADS")
        .io_pg_offst    = ((AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc,
        .boot_params    = PHYS_OFFSET + 0x100,
        .map_io         = mx31ads_map_io,
-       .init_irq       = mxc_init_irq,
+       .init_irq       = mx31ads_init_irq,
        .init_machine   = mxc_board_init,
        .timer          = &mx31ads_timer,
 MACHINE_END
index d363a6e79f8054296ecd7a90e3ddfc8f9c689bd9..c434400701430ca1603eaecbec32071be2ce22fa 100644 (file)
@@ -45,17 +45,17 @@ static struct map_desc mx31lite_io_desc[] __initdata = {
                .virtual = AIPS1_BASE_ADDR_VIRT,
                .pfn = __phys_to_pfn(AIPS1_BASE_ADDR),
                .length = AIPS1_SIZE,
-               .type = MT_NONSHARED_DEVICE
+               .type = MT_DEVICE_NONSHARED
        }, {
                .virtual = SPBA0_BASE_ADDR_VIRT,
                .pfn = __phys_to_pfn(SPBA0_BASE_ADDR),
                .length = SPBA0_SIZE,
-               .type = MT_NONSHARED_DEVICE
+               .type = MT_DEVICE_NONSHARED
        }, {
                .virtual = AIPS2_BASE_ADDR_VIRT,
                .pfn = __phys_to_pfn(AIPS2_BASE_ADDR),
                .length = AIPS2_SIZE,
-               .type = MT_NONSHARED_DEVICE
+               .type = MT_DEVICE_NONSHARED
        }, {
                .virtual = CS4_BASE_ADDR_VIRT,
                .pfn = __phys_to_pfn(CS4_BASE_ADDR),
index df8582a6231b3a9ee7ce940b660ed891400bc30d..11fda95c86a5ca2911bdb8aaf97b6711171d8bf3 100644 (file)
@@ -33,6 +33,8 @@
 #include <mach/iomux-mx3.h>
 #include <mach/board-pcm037.h>
 
+#include "devices.h"
+
 static struct physmap_flash_data pcm037_flash_data = {
        .width  = 2,
 };
@@ -73,12 +75,12 @@ static void __init mxc_board_init(void)
        mxc_iomux_mode(MX31_PIN_TXD1__TXD1);
        mxc_iomux_mode(MX31_PIN_RXD1__RXD1);
 
-       imx_init_uart(0, &uart_pdata);
+       mxc_register_device(&mxc_uart_device0, &uart_pdata);
 
        mxc_iomux_mode(MX31_PIN_CSPI3_MOSI__RXD3);
        mxc_iomux_mode(MX31_PIN_CSPI3_MISO__TXD3);
 
-       imx_init_uart(2, &uart_pdata);
+       mxc_register_device(&mxc_uart_device2, &uart_pdata);
 }
 
 /*
index 1b40483ea753a5af55ff8ec94d5572b004fcddab..79df60c20e709cb82472589448b8554d20031e13 100644 (file)
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/platform_device.h>
+#include <linux/io.h>
 #include <mach/hardware.h>
 #include <asm/mach/map.h>
 #include <asm/hardware/vic.h>
-#include <asm/io.h>
 #include <mach/netx-regs.h>
 #include <asm/mach/irq.h>
 
@@ -77,15 +77,12 @@ netx_hif_demux_handler(unsigned int irq_unused, struct irq_desc *desc)
        stat = ((readl(NETX_DPMAS_INT_EN) &
                readl(NETX_DPMAS_INT_STAT)) >> 24) & 0x1f;
 
-       desc = irq_desc + NETX_IRQ_HIF_CHAINED(0);
-
        while (stat) {
                if (stat & 1) {
                        DEBUG_IRQ("handling irq %d\n", irq);
-                       desc_handle_irq(irq, desc);
+                       generic_handle_irq(irq);
                }
                irq++;
-               desc++;
                stat >>= 1;
        }
 }
index 27d8ef8e8e29f0d8f091b467da91f6322cd7c087..6c1023b8a9ab73a63848b684809a4e4ccebcad37 100644 (file)
@@ -19,7 +19,7 @@
 #ifndef __ASM_ARCH_SYSTEM_H
 #define __ASM_ARCH_SYSTEM_H
 
-#include <asm/io.h>
+#include <linux/io.h>
 #include <mach/hardware.h>
 #include "netx-regs.h"
 
index 19ae0a72bea391cd22c9d7689a7832dc4e4351da..03984943e16d4d15771a6248d3f3176ca72afc8a 100644 (file)
@@ -20,8 +20,8 @@
 #include <linux/init.h>
 #include <linux/module.h>
 #include <linux/mutex.h>
+#include <linux/io.h>
 
-#include <asm/io.h>
 #include <mach/hardware.h>
 #include <mach/netx-regs.h>
 #include <mach/pfifo.h>
index ac8e5bfed691e0fa43cceb4620567ec99f946cf6..7c540c1f01fab84a1fb797522649ca14427c1b4c 100644 (file)
@@ -21,9 +21,9 @@
 #include <linux/interrupt.h>
 #include <linux/irq.h>
 #include <linux/clocksource.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/mach/time.h>
 #include <mach/netx-regs.h>
 
index 04c34e82fe6d7d172fdfb8754204932fc6cc8fbe..32eabf5dfa4fcd736ec332087963b6a1be6552eb 100644 (file)
@@ -21,8 +21,8 @@
 #include <linux/device.h>
 #include <linux/firmware.h>
 #include <linux/mutex.h>
+#include <linux/io.h>
 
-#include <asm/io.h>
 #include <mach/hardware.h>
 #include <mach/netx-regs.h>
 
index a22a608a7abaa8a84b1f34e0e5f23981e13bb7cb..b45bb3b802f137859bec70fd4732481f65008a0f 100644 (file)
@@ -86,13 +86,10 @@ static void a9m9750dev_fpga_demux_handler(unsigned int irq,
 
        while (stat != 0) {
                int irqno = fls(stat) - 1;
-               struct irq_desc *fpgadesc;
 
                stat &= ~(1 << irqno);
 
-               fpgadesc = irq_desc + FPGA_IRQ(irqno);
-
-               desc_handle_irq(FPGA_IRQ(irqno), fpgadesc);
+               generic_handle_irq(FPGA_IRQ(irqno));
        }
 
        desc->chip->unmask(irq);
index 804c300759604db5dacfacf5ab4f17c9d12be330..5241e6a286cc83fc70a7281c82712137ac9e747c 100644 (file)
 #include <linux/init.h>
 #include <linux/spinlock.h>
 #include <linux/module.h>
+#include <linux/bitops.h>
 
 #include <mach/gpio.h>
 #include <mach/processor.h>
 #include <mach/processor-ns9360.h>
 #include <asm/bug.h>
 #include <asm/types.h>
-#include <asm/bitops.h>
 
 #include "gpio-ns9360.h"
 
index 5dbc3c5167c89e1539a4f2b44672a9a0d9279f1e..1b12d324b087d1528c87d828bebec3308be1dbaa 100644 (file)
@@ -11,7 +11,7 @@
 #ifndef __ASM_ARCH_UNCOMPRESS_H
 #define __ASM_ARCH_UNCOMPRESS_H
 
-#include <asm/io.h>
+#include <linux/io.h>
 
 #define __REG(x)       ((void __iomem __force *)(x))
 
index 38260d5f849b3e482935e27e615d7364c909ff22..22e0eb6e9ec405416dd88d18ba0787794c2619fc 100644 (file)
@@ -10,7 +10,7 @@
  */
 #include <linux/interrupt.h>
 #include <linux/kernel_stat.h>
-#include <asm/io.h>
+#include <linux/io.h>
 #include <asm/mach/irq.h>
 #include <mach/regs-sys-common.h>
 #include <mach/irqs.h>
index 213b48787102bf461ae30134907cd2fab0089127..45a01311669aecf643a02273db3000268d6e8af7 100644 (file)
@@ -21,6 +21,7 @@
 #include <linux/reboot.h>
 #include <linux/serial_8250.h>
 #include <linux/serial_reg.h>
+#include <linux/irq.h>
 
 #include <mach/hardware.h>
 #include <asm/mach-types.h>
index 5965cf09f8c4ab57b875fec102752c1779cad1b1..478c2c9a22cb02cfda5bb3472f6b911f0790483b 100644 (file)
@@ -17,8 +17,8 @@
 #include <linux/errno.h>
 #include <linux/err.h>
 #include <linux/clk.h>
+#include <linux/io.h>
 
-#include <asm/io.h>
 #include <asm/mach-types.h>
 
 #include <mach/cpu.h>
index ab708d4c597e85e3aa0e1ac844995ac1c7d87bc8..99982d3380c96d27f522a7b970d463e6cc53f454 100644 (file)
@@ -13,9 +13,9 @@
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/platform_device.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/mach/map.h>
 
 #include <mach/tc.h>
index 4449d86095f673f554749cd22da2ccc876ded894..04995381aa5c9965890b74704b628b6ee7d00da5 100644 (file)
@@ -21,9 +21,9 @@
 #include <linux/kernel.h>
 #include <linux/device.h>
 #include <linux/errno.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/mach/irq.h>
 
@@ -86,7 +86,6 @@ static void fpga_mask_ack_irq(unsigned int irq)
 
 void innovator_fpga_IRQ_demux(unsigned int irq, struct irq_desc *desc)
 {
-       struct irq_desc *d;
        u32 stat;
        int fpga_irq;
 
@@ -99,8 +98,7 @@ void innovator_fpga_IRQ_demux(unsigned int irq, struct irq_desc *desc)
             (fpga_irq < OMAP_FPGA_IRQ_END) && stat;
             fpga_irq++, stat >>= 1) {
                if (stat & 1) {
-                       d = irq_desc + fpga_irq;
-                       desc_handle_irq(fpga_irq, d);
+                       generic_handle_irq(fpga_irq);
                }
        }
 }
index da13c3e82850e46e274a78acc4e0d3aed803ddc1..13083d7e692d5b32bd3d36c5bedea570aace62df 100644 (file)
@@ -14,8 +14,7 @@
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
-
-#include <asm/io.h>
+#include <linux/io.h>
 
 #define OMAP_DIE_ID_0          0xfffe1800
 #define OMAP_DIE_ID_1          0xfffe1804
index 2b9750b200ce9068a1fa069cc677da9284e2f78b..b3bd8ca85118babd632c353c20cfec92fa811108 100644 (file)
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
+#include <linux/io.h>
 
 #include <asm/tlb.h>
 #include <asm/mach/map.h>
-#include <asm/io.h>
 #include <mach/mux.h>
 #include <mach/tc.h>
 
index 0ec6c1ec42507300166b158bcafba69f6d6dd0a7..9ad5197075ffbaa20ce8158efa90a484c6709b85 100644 (file)
@@ -40,6 +40,7 @@
 #include <linux/module.h>
 #include <linux/sched.h>
 #include <linux/interrupt.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
 #include <asm/irq.h>
@@ -47,8 +48,6 @@
 #include <mach/gpio.h>
 #include <mach/cpu.h>
 
-#include <asm/io.h>
-
 #define IRQ_BANK(irq) ((irq) >> 5)
 #define IRQ_BIT(irq)  ((irq) & 0x1f)
 
index 610f51f18741935598ef5aa7a92e7c8415c0ee01..71fe2cc7f7cf536e28725214c979339369086c9c 100644 (file)
@@ -12,8 +12,8 @@
 #include <linux/init.h>
 #include <linux/kernel_stat.h>
 #include <linux/sched.h>
+#include <linux/io.h>
 
-#include <asm/io.h>
 #include <mach/hardware.h>
 #include <asm/leds.h>
 #include <asm/system.h>
index af44eab1ed24ac1e77791d85d387485cfe5db7d9..59abbf331a96b886ab8b4bbde9b84386dbe210b0 100644 (file)
@@ -13,9 +13,9 @@
 #include <linux/resource.h>
 #include <linux/interrupt.h>
 #include <linux/platform_device.h>
+#include <linux/io.h>
 #include <mach/mailbox.h>
 #include <mach/irqs.h>
-#include <asm/io.h>
 
 #define MAILBOX_ARM2DSP1               0x00
 #define MAILBOX_ARM2DSP1b              0x04
index 898516e362e7716e5a15f3a8d669812de294225b..062c905c2ba6704eda8e5248b58318e525acc975 100644 (file)
  */
 #include <linux/module.h>
 #include <linux/init.h>
-#include <asm/system.h>
-#include <asm/io.h>
+#include <linux/io.h>
 #include <linux/spinlock.h>
 
+#include <asm/system.h>
+
 #include <mach/mux.h>
 
 #ifdef CONFIG_OMAP_MUX
index 63c4ea18b1ca20de07559cd5370120da72cc5fc6..770d256c790b337f169d32d0dd6d512b2a3e849c 100644 (file)
@@ -41,8 +41,8 @@
 #include <linux/interrupt.h>
 #include <linux/sysfs.h>
 #include <linux/module.h>
+#include <linux/io.h>
 
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/atomic.h>
 #include <asm/mach/time.h>
index 0e25a996bb4c17d65d02231bdb996647e56634f1..aefc967fc003fe2e19e1244fb9fb40ef70589ae0 100644 (file)
@@ -18,8 +18,8 @@
 #include <linux/serial_8250.h>
 #include <linux/serial_reg.h>
 #include <linux/clk.h>
+#include <linux/io.h>
 
-#include <asm/io.h>
 #include <asm/mach-types.h>
 
 #include <mach/board.h>
index e54708595ecf4db14187579560a2b5476c9866ce..2cf7e32bd293796e216a81794c2ecc785bba1297 100644 (file)
 #include <linux/err.h>
 #include <linux/clocksource.h>
 #include <linux/clockchips.h>
+#include <linux/io.h>
 
 #include <asm/system.h>
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/leds.h>
 #include <asm/irq.h>
 #include <asm/mach/irq.h>
index e67760189d14c10120f693f0fb341dfb28b7bdab..705367ece1741b539f6838454d9cf2d14aa61bad 100644 (file)
 #include <linux/clk.h>
 #include <linux/clocksource.h>
 #include <linux/clockchips.h>
+#include <linux/io.h>
 
 #include <asm/system.h>
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/leds.h>
 #include <asm/irq.h>
 #include <asm/mach/irq.h>
index b72ca13b3acb7038e472ac83e01e369b4bfa9a68..24688efaa445f08939fc4fbafa4b2ab0f0aee51c 100644 (file)
@@ -21,6 +21,7 @@
 #include <linux/delay.h>
 #include <linux/err.h>
 #include <linux/clk.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
 #include <asm/mach-types.h>
@@ -34,8 +35,6 @@
 #include <mach/common.h>
 #include <mach/gpmc.h>
 
-#include <asm/io.h>
-
 
 #define        SDP2430_FLASH_CS        0
 #define        SDP2430_SMC91X_CS       5
index 9e2624ca70a2493cb0320d0373d446e91d1526da..d4e3b6fc4705fe9335835911a13828ecc5fbfae7 100644 (file)
@@ -21,6 +21,7 @@
 #include <linux/input.h>
 #include <linux/err.h>
 #include <linux/clk.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
 #include <asm/mach-types.h>
@@ -41,8 +42,6 @@
 #include <mach/dma.h>
 #include <mach/gpmc.h>
 
-#include <asm/io.h>
-
 #define H4_FLASH_CS    0
 #define H4_SMC91X_CS   1
 
index 1d891e4a69337d76aba8a75cb931e58477935161..97cde3d3611dede6c2f67b0091f8a0c4ce76db55 100644 (file)
@@ -21,9 +21,8 @@
 #include <linux/errno.h>
 #include <linux/delay.h>
 #include <linux/clk.h>
-#include <asm/bitops.h>
-
-#include <asm/io.h>
+#include <linux/io.h>
+#include <linux/bitops.h>
 
 #include <mach/clock.h>
 #include <mach/sram.h>
index 295e671e9cfdbcb397560cac97d881960077c07c..d382eb0184ac445dab16b835cca3d80eda0a66fc 100644 (file)
 #include <linux/errno.h>
 #include <linux/delay.h>
 #include <linux/clk.h>
-
 #include <linux/io.h>
 #include <linux/cpufreq.h>
+#include <linux/bitops.h>
 
 #include <mach/clock.h>
 #include <mach/sram.h>
 #include <asm/div64.h>
-#include <asm/bitops.h>
 
 #include "memory.h"
 #include "clock.h"
index 3ff74952f8354658d310654fa32c894f3e6c2475..e5b475f21081d8848741114a61200a177787e6d7 100644 (file)
 #include <linux/clk.h>
 #include <linux/io.h>
 #include <linux/limits.h>
+#include <linux/bitops.h>
 
 #include <mach/clock.h>
 #include <mach/sram.h>
 #include <asm/div64.h>
-#include <asm/bitops.h>
 
 #include "memory.h"
 #include "clock.h"
index 7a7f02559075fc9ce8538c5f64d26c538ef03bc3..2ee954a0bc7c23733fc186b27ece2dc8e755e64d 100644 (file)
@@ -13,9 +13,9 @@
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/platform_device.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/mach-types.h>
 #include <asm/mach/map.h>
 
index f51d69bc457dac2be97ff36c81ed4e037155c67c..af1081a0b27c9549b0dedecaac107991afb553b2 100644 (file)
@@ -15,8 +15,8 @@
 #include <linux/clk.h>
 #include <linux/ioport.h>
 #include <linux/spinlock.h>
+#include <linux/io.h>
 
-#include <asm/io.h>
 #include <asm/mach-types.h>
 #include <mach/gpmc.h>
 
index a5d4526ac4d6debdb1f0a0e0393bc37443e00bac..209177c7f22fe434a442359dd8f54f68d243348e 100644 (file)
@@ -14,8 +14,9 @@
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
+#include <linux/io.h>
 
-#include <asm/io.h>
+#include <asm/cputype.h>
 
 #include <mach/control.h>
 #include <mach/cpu.h>
index 987351f07d7b618bb0a10ea12a2d18001a9415e4..7c3d6289c05ff50412b2e4ad75b50ba1ff8c4212 100644 (file)
@@ -15,9 +15,9 @@
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
+#include <linux/io.h>
 
 #include <asm/tlb.h>
-#include <asm/io.h>
 
 #include <asm/mach/map.h>
 
index 9ef15b31d8fcc4f8c0b62167ef889685905fcbd1..196a9565a8dc206ddcbd567673ba1a5323244b42 100644 (file)
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/interrupt.h>
+#include <linux/io.h>
 #include <mach/hardware.h>
 #include <asm/mach/irq.h>
 #include <asm/irq.h>
-#include <asm/io.h>
 
 #define INTC_REVISION  0x0000
 #define INTC_SYSCONFIG 0x0010
index a480b96948e48ad66b50a1ba6798983c2890d2eb..32b7af3c610b6bad518bccc2caae5b4a9d647afb 100644 (file)
@@ -14,9 +14,9 @@
 #include <linux/clk.h>
 #include <linux/err.h>
 #include <linux/platform_device.h>
+#include <linux/io.h>
 #include <mach/mailbox.h>
 #include <mach/irqs.h>
-#include <asm/io.h>
 
 #define MAILBOX_REVISION               0x00
 #define MAILBOX_SYSCONFIG              0x10
index 6b49cc9cbdcbcb31a03e674524cd27eb26e4139e..ab1462b02e6e97f9ce306bc878a5b7782ebf38f0 100644 (file)
@@ -21,8 +21,7 @@
 #include <linux/errno.h>
 #include <linux/delay.h>
 #include <linux/clk.h>
-
-#include <asm/io.h>
+#include <linux/io.h>
 
 #include <mach/common.h>
 #include <mach/clock.h>
index 443d07fef7f3155ee06b9e877d17d7286cd3b43c..6b7d672058b9b360ff1b4034c070f3ab64091e00 100644 (file)
  */
 #include <linux/module.h>
 #include <linux/init.h>
-#include <asm/system.h>
-#include <asm/io.h>
+#include <linux/io.h>
 #include <linux/spinlock.h>
 
+#include <asm/system.h>
+
 #include <mach/control.h>
 #include <mach/mux.h>
 
index 8671e1079ab54c7764adfe729294e793e9504d17..55361c16c9d9e3a0451c11f89a9eb7bfcdfba118 100644 (file)
@@ -24,8 +24,8 @@
 #include <linux/module.h>
 #include <linux/delay.h>
 #include <linux/clk.h>
+#include <linux/io.h>
 
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/atomic.h>
 #include <asm/mach/time.h>
index adc8a26a8fb01757ee6f18ced5104ac9db1edaa8..7d9444adc5df6c94deb0189cb35fbba2d74d9512 100644 (file)
@@ -17,8 +17,7 @@
 #include <linux/serial_8250.h>
 #include <linux/serial_reg.h>
 #include <linux/clk.h>
-
-#include <asm/io.h>
+#include <linux/io.h>
 
 #include <mach/common.h>
 #include <mach/board.h>
index bea37972120a9187a61d93bd5c29b94bd5e584e6..719957e05d9e6ed7f7d39364ac8c97419fe1f235 100644 (file)
@@ -13,8 +13,8 @@
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/mbus.h>
+#include <linux/io.h>
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include "common.h"
 
 /*
index cd8a16f67d2be6540daac0e2cc86206ad229791b..fc419868e39fae9670401c652e5d86b4191ae5e0 100644 (file)
@@ -15,8 +15,8 @@
 #include <linux/module.h>
 #include <linux/spinlock.h>
 #include <linux/bitops.h>
+#include <linux/io.h>
 #include <asm/gpio.h>
-#include <asm/io.h>
 #include <mach/orion5x.h>
 #include "common.h"
 
index 2545ff9e5830fc3f888c30b8ca2e28ee5c343371..632a36f5cf1492473ae1409522457a83dc23981a 100644 (file)
@@ -13,8 +13,8 @@
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/irq.h>
+#include <linux/io.h>
 #include <asm/gpio.h>
-#include <asm/io.h>
 #include <mach/orion5x.h>
 #include <plat/irq.h>
 #include "common.h"
@@ -162,7 +162,7 @@ static void orion5x_gpio_irq_handler(unsigned int irq, struct irq_desc *desc)
                                polarity ^= 1 << pin;
                                writel(polarity, GPIO_IN_POL);
                        }
-                       desc_handle_irq(irq, desc);
+                       generic_handle_irq(irq);
                }
        }
 }
index c04ab0e16ea1e8b66d1a3678de2e7a200fbdb194..640ea2a3fc6cf758b774877b639e64c12853fec1 100644 (file)
@@ -11,8 +11,8 @@
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/mbus.h>
+#include <linux/io.h>
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include "common.h"
 #include "mpp.h"
 
index 24d036a24a72b7f8c9ce37749d4434881497c6ea..898c0e88acbc30ade69d561e5493e936e23bebdb 100644 (file)
@@ -20,9 +20,9 @@
 #include <linux/device.h>
 #include <linux/err.h>
 #include <linux/delay.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 
 #include <mach/clock.h>
 #include "clock.h"
index 3ba46ede9bbd45eec322bc5d7ddae8798638e85e..45734bb880a88477d7221760291f4c6f399883f8 100644 (file)
@@ -25,9 +25,9 @@
 #include <linux/serial_8250.h>
 #include <linux/device.h>
 #include <linux/spi/spi.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/setup.h>
 #include <asm/mach-types.h>
 #include <asm/pgtable.h>
index 833c56be73449766b601e541a893d12af28f0de3..ac2f70eddb9e8e49034bf53257893e63be3de5f1 100644 (file)
 #include <linux/err.h>
 #include <linux/dma-mapping.h>
 #include <linux/clk.h>
+#include <linux/io.h>
 
 #include <asm/system.h>
 #include <mach/hardware.h>
 #include <asm/dma.h>
 #include <asm/dma-mapping.h>
-#include <asm/io.h>
 #include <asm/mach/dma.h>
 #include <mach/clock.h>
 
index fb51f7279e951ae3f5ff5b6cfeb5ba6c113876eb..015cc21d5f55ff382e3f28cf58afda8e04851529 100644 (file)
@@ -17,7 +17,7 @@
 #include <linux/types.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
-#include <asm/io.h>
+#include <linux/io.h>
 #include <mach/platform.h>
 #include <mach/gpio.h>
 
index 8985a4622b8c45d8cc7ba61db56946555469027a..e12e7abfcbcf34a7316a3d41808475a51769e600 100644 (file)
@@ -21,8 +21,8 @@
 #ifndef __ASM_ARCH_SYSTEM_H
 #define __ASM_ARCH_SYSTEM_H
 
+#include <linux/io.h>
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <mach/platform.h>
 
 static void arch_idle(void)
index 956fbd8e977cb4a849b28e5e2ec17f8804bebb99..5ff0196c0f167dd8a72c9443b0353e926123ed83 100644 (file)
@@ -14,8 +14,8 @@
 #ifndef __PNX4008_TIMEX_H
 #define __PNX4008_TIMEX_H
 
+#include <linux/io.h>
 #include <mach/hardware.h>
-#include <asm/io.h>
 
 #define CLOCK_TICK_RATE                1000000
 
index 5c4f55af5d4bd55bbac3eb49629665c3c89ce2d9..a9ce02b4bf17fcd2a770070198532a8d6be61458 100644 (file)
@@ -23,8 +23,8 @@
 #include <linux/ioport.h>
 #include <linux/device.h>
 #include <linux/irq.h>
+#include <linux/io.h>
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/setup.h>
 #include <asm/pgtable.h>
 #include <asm/page.h>
index f970906d884881ad64b6f59454d158d1ff39dc24..b3d8d53e32ef8cd5733d0de3dac98bfffe9a9aef 100644 (file)
@@ -18,8 +18,8 @@
 #include <linux/suspend.h>
 #include <linux/delay.h>
 #include <linux/clk.h>
+#include <linux/io.h>
 
-#include <asm/io.h>
 #include <asm/cacheflush.h>
 #include <mach/pm.h>
 #include <mach/clock.h>
index 9be84bbb30e8d0692b985265d0ec8f174057f79a..f40961e519146d88ea39f92ca352dd9799a97211 100644 (file)
@@ -12,8 +12,7 @@
 
 #include <linux/kernel.h>
 #include <linux/types.h>
-
-#include <asm/io.h>
+#include <linux/io.h>
 
 #include <mach/platform.h>
 #include <mach/hardware.h>
index 180975244f96ece792c2f21ffc21ecc13da5fe39..fc0ba183fe1233dcd9165502281928e98b56775e 100644 (file)
 #include <linux/time.h>
 #include <linux/timex.h>
 #include <linux/irq.h>
+#include <linux/io.h>
 
 #include <asm/system.h>
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/leds.h>
 #include <asm/mach/time.h>
 #include <asm/errno.h>
index e8ee7ec9ff6dda45d0a0793c9887b37b2592769a..f27f6b3d6e6f61be1b350c883dcd09cc383501a8 100644 (file)
@@ -38,16 +38,23 @@ config ARCH_LUBBOCK
        bool "Intel DBPXA250 Development Platform"
        select PXA25x
        select SA1111
+       select PXA_HAVE_BOARD_IRQS
 
 config MACH_LOGICPD_PXA270
        bool "LogicPD PXA270 Card Engine Development Platform"
        select PXA27x
        select HAVE_PWM
+       select PXA_HAVE_BOARD_IRQS
 
 config MACH_MAINSTONE
        bool "Intel HCDDBBVA0 Development Platform"
        select PXA27x
        select HAVE_PWM
+       select PXA_HAVE_BOARD_IRQS
+
+config MACH_MP900C
+       bool "Nec Mobilepro 900/c"
+       select PXA25x
 
 config ARCH_PXA_IDP
        bool "Accelent Xscale IDP"
@@ -114,10 +121,21 @@ config MACH_TOSA
        bool "Enable Sharp SL-6000x (Tosa) Support"
        depends on PXA_SHARPSL
        select PXA25x
+       select PXA_HAVE_BOARD_IRQS
+
+config ARCH_VIPER
+       bool "Arcom/Eurotech VIPER SBC"
+       select PXA25x
+       select ISA
+       select I2C_GPIO
+       select HAVE_PWM
+       select PXA_HAVE_BOARD_IRQS
+       select PXA_HAVE_ISA_IRQS
 
 config ARCH_PXA_ESERIES
        bool "PXA based Toshiba e-series PDAs"
        select PXA25x
+       select PXA_HAVE_BOARD_IRQS
 
 config MACH_E330
        bool "Toshiba e330"
@@ -170,13 +188,41 @@ config MACH_E800
          Say Y here if you intend to run this kernel on a Toshiba
          e800 family PDA.
 
+config TRIZEPS_PXA
+       bool "PXA based Keith und Koep Trizeps DIMM-Modules"
+
 config MACH_TRIZEPS4
        bool "Keith und Koep Trizeps4 DIMM-Module"
+       depends on TRIZEPS_PXA
+       select TRIZEPS_PCMCIA
        select PXA27x
 
-config MACH_TRIZEPS4_CONXS
+config MACH_TRIZEPS4WL
+       bool "Keith und Koep Trizeps4-WL DIMM-Module"
+       depends on TRIZEPS_PXA
+       select TRIZEPS_PCMCIA
+       select PXA27x
+       select PXA_SSP
+
+choice
+       prompt "Select base board for Trizeps module"
+       depends on TRIZEPS_PXA
+
+config MACH_TRIZEPS_CONXS
        bool "ConXS Eval Board"
-       depends on MACH_TRIZEPS4
+
+config MACH_TRIZEPS_UCONXS
+       bool "uConXS Eval Board"
+
+config MACH_TRIZEPS_ANY
+       bool "another Board"
+
+endchoice
+
+config TRIZEPS_PCMCIA
+       bool
+       help
+         Enable PCMCIA support for Trizeps modules
 
 config MACH_EM_X270
        bool "CompuLab EM-x270 platform"
@@ -189,6 +235,7 @@ config MACH_COLIBRI
 config MACH_ZYLONITE
        bool "PXA3xx Development Platform (aka Zylonite)"
        select PXA3xx
+       select PXA_SSP
        select HAVE_PWM
 
 config MACH_LITTLETON
@@ -207,20 +254,42 @@ config MACH_SAAR
        select PXA930
 
 config MACH_ARMCORE
-       bool "CompuLab CM-X270 modules"
+       bool "CompuLab CM-X255/CM-X270 modules"
        select PXA27x
        select IWMMXT
+       select ZONE_DMA if PCI
+       select PXA25x
+       select PXA_SSP
+
+config MACH_CM_X300
+       bool "CompuLab CM-X300 modules"
+       select PXA3xx
+       select CPU_PXA300
 
 config MACH_MAGICIAN
        bool "Enable HTC Magician Support"
        select PXA27x
        select IWMMXT
+       select PXA_HAVE_BOARD_IRQS
+
+config MACH_MIOA701
+       bool "Mitac Mio A701 Support"
+       select PXA27x
+       select IWMMXT
+       select LEDS_GPIO
+       select HAVE_PWM
+       select GPIO_SYSFS
+       help
+         Say Y here if you intend to run this kernel on a
+         MIO A701. Currently there is only basic support
+         for this PDA.
 
 config MACH_PCM027
        bool "Phytec phyCORE-PXA270 CPU module (PCM-027)"
        select PXA27x
        select IWMMXT
        select PXA_SSP
+       select PXA_HAVE_BOARD_IRQS
 
 config ARCH_PXA_PALM
        bool "PXA based Palm PDAs"
@@ -236,6 +305,16 @@ config MACH_PALMTX
          Say Y here if you intend to run this kernel on a Palm T|X
          handheld computer.
 
+config MACH_PALMZ72
+       bool "Palm Zire 72"
+       default y
+       depends on ARCH_PXA_PALM
+       select PXA27x
+       select IWMMXT
+       help
+         Say Y here if you intend to run this kernel on Palm Zire 72
+         handheld computer.
+
 config MACH_PCM990_BASEBOARD
        bool "PHYTEC PCM-990 development board"
        select HAVE_PWM
@@ -256,6 +335,9 @@ config PCM990_DISPLAY_NONE
 
 endchoice
 
+config MACH_AM200EPD
+       depends on MACH_GUMSTIX_F
+       bool "Enable AM200EPD board support"
 
 config PXA_EZX
        bool "Motorola EZX Platform"
@@ -343,4 +425,10 @@ config TOSA_BT
          This is a simple driver that is able to control
          the state of built in bluetooth chip on tosa.
 
+config PXA_HAVE_BOARD_IRQS
+       bool
+
+config PXA_HAVE_ISA_IRQS
+       bool
+
 endif
index 99ecbe7f85062a343db152dec067f7889c629a3b..d31c9979cfa35f34aef2e1afcf81723c7e506924 100644 (file)
@@ -6,7 +6,12 @@
 obj-y                          += clock.o devices.o generic.o irq.o dma.o \
                                   time.o gpio.o reset.o
 obj-$(CONFIG_PM)               += pm.o sleep.o standby.o
-obj-$(CONFIG_CPU_FREQ)         += cpu-pxa.o
+
+ifeq ($(CONFIG_CPU_FREQ),y)
+obj-$(CONFIG_PXA25x)           += cpufreq-pxa2xx.o
+obj-$(CONFIG_PXA27x)           += cpufreq-pxa2xx.o
+obj-$(CONFIG_PXA3xx)           += cpufreq-pxa3xx.o
+endif
 
 # Generic drivers that other drivers may depend upon
 obj-$(CONFIG_PXA_SSP)          += ssp.o
@@ -22,27 +27,33 @@ obj-$(CONFIG_CPU_PXA930)    += pxa930.o
 
 # Specific board support
 obj-$(CONFIG_ARCH_GUMSTIX)     += gumstix.o
+obj-$(CONFIG_MACH_AM200EPD)    += am200epd.o
 obj-$(CONFIG_ARCH_LUBBOCK)     += lubbock.o
 obj-$(CONFIG_MACH_LOGICPD_PXA270) += lpd270.o
 obj-$(CONFIG_MACH_MAINSTONE)   += mainstone.o
+obj-$(CONFIG_MACH_MP900C)      += mp900.o
 obj-$(CONFIG_ARCH_PXA_IDP)     += idp.o
 obj-$(CONFIG_MACH_TRIZEPS4)    += trizeps4.o
 obj-$(CONFIG_MACH_COLIBRI)     += colibri.o
-obj-$(CONFIG_PXA_SHARP_C7xx)   += corgi.o corgi_ssp.o corgi_lcd.o sharpsl_pm.o corgi_pm.o
-obj-$(CONFIG_PXA_SHARP_Cxx00)  += spitz.o corgi_ssp.o corgi_lcd.o sharpsl_pm.o spitz_pm.o
-obj-$(CONFIG_MACH_AKITA)       += akita-ioexp.o
-obj-$(CONFIG_MACH_POODLE)      += poodle.o corgi_ssp.o
+obj-$(CONFIG_PXA_SHARP_C7xx)   += corgi.o sharpsl_pm.o corgi_pm.o
+obj-$(CONFIG_PXA_SHARP_Cxx00)  += spitz.o sharpsl_pm.o spitz_pm.o
+obj-$(CONFIG_MACH_POODLE)      += poodle.o
 obj-$(CONFIG_MACH_PCM027)      += pcm027.o
 obj-$(CONFIG_MACH_PCM990_BASEBOARD)    += pcm990-baseboard.o
 obj-$(CONFIG_MACH_TOSA)                += tosa.o
 obj-$(CONFIG_MACH_EM_X270)     += em-x270.o
 obj-$(CONFIG_MACH_MAGICIAN)    += magician.o
-obj-$(CONFIG_ARCH_PXA_ESERIES) += eseries.o eseries_udc.o
-obj-$(CONFIG_MACH_E740)                += e740_lcd.o
-obj-$(CONFIG_MACH_E750)                += e750_lcd.o
-obj-$(CONFIG_MACH_E400)                += e400_lcd.o
-obj-$(CONFIG_MACH_E800)                += e800_lcd.o
+obj-$(CONFIG_MACH_MIOA701)     += mioa701.o mioa701_bootresume.o
+obj-$(CONFIG_ARCH_PXA_ESERIES) += eseries.o
+obj-$(CONFIG_MACH_E330)                += e330.o
+obj-$(CONFIG_MACH_E350)                += e350.o
+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_PALMTX)      += palmtx.o
+obj-$(CONFIG_MACH_PALMZ72)     += palmz72.o
+obj-$(CONFIG_ARCH_VIPER)       += viper.o
 
 ifeq ($(CONFIG_MACH_ZYLONITE),y)
   obj-y                                += zylonite.o
@@ -53,7 +64,8 @@ obj-$(CONFIG_MACH_LITTLETON)  += littleton.o
 obj-$(CONFIG_MACH_TAVOREVB)    += tavorevb.o
 obj-$(CONFIG_MACH_SAAR)                += saar.o
 
-obj-$(CONFIG_MACH_ARMCORE)      += cm-x270.o
+obj-$(CONFIG_MACH_ARMCORE)      += cm-x2xx.o cm-x255.o cm-x270.o
+obj-$(CONFIG_MACH_CM_X300)      += cm-x300.o
 obj-$(CONFIG_PXA_EZX)           += ezx.o
 
 # Support for blinky lights
@@ -61,12 +73,11 @@ led-y := leds.o
 led-$(CONFIG_ARCH_LUBBOCK)     += leds-lubbock.o
 led-$(CONFIG_MACH_MAINSTONE)   += leds-mainstone.o
 led-$(CONFIG_ARCH_PXA_IDP)     += leds-idp.o
-led-$(CONFIG_MACH_TRIZEPS4)    += leds-trizeps4.o
 
 obj-$(CONFIG_LEDS)             += $(led-y)
 
 ifeq ($(CONFIG_PCI),y)
-obj-$(CONFIG_MACH_ARMCORE) += cm-x270-pci.o
+obj-$(CONFIG_MACH_ARMCORE) += cm-x2xx-pci.o
 endif
 
 obj-$(CONFIG_TOSA_BT)          += tosa-bt.o
diff --git a/arch/arm/mach-pxa/akita-ioexp.c b/arch/arm/mach-pxa/akita-ioexp.c
deleted file mode 100644 (file)
index 5c67b18..0000000
+++ /dev/null
@@ -1,222 +0,0 @@
-/*
- * Support for the Extra GPIOs on the Sharp SL-C1000 (Akita)
- * (uses a Maxim MAX7310 8 Port IO Expander)
- *
- * Copyright 2005 Openedhand Ltd.
- *
- * Author: 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 version 2 as
- * published by the Free Software Foundation.
- *
- */
-
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <linux/platform_device.h>
-#include <linux/module.h>
-#include <linux/i2c.h>
-#include <linux/slab.h>
-#include <linux/workqueue.h>
-#include <mach/akita.h>
-
-/* MAX7310 Regiser Map */
-#define MAX7310_INPUT    0x00
-#define MAX7310_OUTPUT   0x01
-#define MAX7310_POLINV   0x02
-#define MAX7310_IODIR    0x03 /* 1 = Input, 0 = Output */
-#define MAX7310_TIMEOUT  0x04
-
-/* Addresses to scan */
-static const unsigned short normal_i2c[] = { 0x18, I2C_CLIENT_END };
-
-/* I2C Magic */
-I2C_CLIENT_INSMOD;
-
-static int max7310_write(struct i2c_client *client, int address, int data);
-static struct i2c_client max7310_template;
-static void akita_ioexp_work(struct work_struct *private_);
-
-static struct device *akita_ioexp_device;
-static unsigned char ioexp_output_value = AKITA_IOEXP_IO_OUT;
-DECLARE_WORK(akita_ioexp, akita_ioexp_work);
-
-
-/*
- * MAX7310 Access
- */
-static int max7310_config(struct device *dev, int iomode, int polarity)
-{
-       int ret;
-       struct i2c_client *client = to_i2c_client(dev);
-
-       ret = max7310_write(client, MAX7310_POLINV, polarity);
-       if (ret < 0)
-               return ret;
-       ret = max7310_write(client, MAX7310_IODIR, iomode);
-       return ret;
-}
-
-static int max7310_set_ouputs(struct device *dev, int outputs)
-{
-       struct i2c_client *client = to_i2c_client(dev);
-
-       return max7310_write(client, MAX7310_OUTPUT, outputs);
-}
-
-/*
- * I2C Functions
- */
-static int max7310_write(struct i2c_client *client, int address, int value)
-{
-       u8 data[2];
-
-       data[0] = address & 0xff;
-       data[1] = value & 0xff;
-
-       if (i2c_master_send(client, data, 2) == 2)
-               return 0;
-       return -1;
-}
-
-static int max7310_detect(struct i2c_adapter *adapter, int address, int kind)
-{
-       struct i2c_client *new_client;
-       int err;
-
-       if (!(new_client = kmalloc(sizeof(struct i2c_client), GFP_KERNEL)))
-               return -ENOMEM;
-
-       max7310_template.adapter = adapter;
-       max7310_template.addr = address;
-
-       memcpy(new_client, &max7310_template, sizeof(struct i2c_client));
-
-       if ((err = i2c_attach_client(new_client))) {
-               kfree(new_client);
-               return err;
-       }
-
-       max7310_config(&new_client->dev, AKITA_IOEXP_IO_DIR, 0);
-       akita_ioexp_device = &new_client->dev;
-       schedule_work(&akita_ioexp);
-
-       return 0;
-}
-
-static int max7310_attach_adapter(struct i2c_adapter *adapter)
-{
-       return i2c_probe(adapter, &addr_data, max7310_detect);
-}
-
-static int max7310_detach_client(struct i2c_client *client)
-{
-       int err;
-
-       akita_ioexp_device = NULL;
-
-       if ((err = i2c_detach_client(client)))
-               return err;
-
-       kfree(client);
-       return 0;
-}
-
-static struct i2c_driver max7310_i2c_driver = {
-       .driver = {
-               .name   = "akita-max7310",
-       },
-       .id             = I2C_DRIVERID_AKITAIOEXP,
-       .attach_adapter = max7310_attach_adapter,
-       .detach_client  = max7310_detach_client,
-};
-
-static struct i2c_client max7310_template = {
-       name:   "akita-max7310",
-       driver: &max7310_i2c_driver,
-};
-
-void akita_set_ioexp(struct device *dev, unsigned char bit)
-{
-       ioexp_output_value |= bit;
-
-       if (akita_ioexp_device)
-               schedule_work(&akita_ioexp);
-       return;
-}
-
-void akita_reset_ioexp(struct device *dev, unsigned char bit)
-{
-       ioexp_output_value &= ~bit;
-
-       if (akita_ioexp_device)
-               schedule_work(&akita_ioexp);
-       return;
-}
-
-EXPORT_SYMBOL(akita_set_ioexp);
-EXPORT_SYMBOL(akita_reset_ioexp);
-
-static void akita_ioexp_work(struct work_struct *private_)
-{
-       if (akita_ioexp_device)
-               max7310_set_ouputs(akita_ioexp_device, ioexp_output_value);
-}
-
-
-#ifdef CONFIG_PM
-static int akita_ioexp_suspend(struct platform_device *pdev, pm_message_t state)
-{
-       flush_scheduled_work();
-       return 0;
-}
-
-static int akita_ioexp_resume(struct platform_device *pdev)
-{
-       schedule_work(&akita_ioexp);
-       return 0;
-}
-#else
-#define akita_ioexp_suspend NULL
-#define akita_ioexp_resume NULL
-#endif
-
-static int __init akita_ioexp_probe(struct platform_device *pdev)
-{
-       return i2c_add_driver(&max7310_i2c_driver);
-}
-
-static int akita_ioexp_remove(struct platform_device *pdev)
-{
-       i2c_del_driver(&max7310_i2c_driver);
-       return 0;
-}
-
-static struct platform_driver akita_ioexp_driver = {
-       .probe          = akita_ioexp_probe,
-       .remove         = akita_ioexp_remove,
-       .suspend        = akita_ioexp_suspend,
-       .resume         = akita_ioexp_resume,
-       .driver         = {
-               .name   = "akita-ioexp",
-       },
-};
-
-static int __init akita_ioexp_init(void)
-{
-       return platform_driver_register(&akita_ioexp_driver);
-}
-
-static void __exit akita_ioexp_exit(void)
-{
-       platform_driver_unregister(&akita_ioexp_driver);
-}
-
-MODULE_AUTHOR("Richard Purdie <rpurdie@openedhand.com>");
-MODULE_DESCRIPTION("Akita IO-Expander driver");
-MODULE_LICENSE("GPL");
-
-fs_initcall(akita_ioexp_init);
-module_exit(akita_ioexp_exit);
-
diff --git a/arch/arm/mach-pxa/am200epd.c b/arch/arm/mach-pxa/am200epd.c
new file mode 100644 (file)
index 0000000..b965085
--- /dev/null
@@ -0,0 +1,374 @@
+/*
+ * am200epd.c -- Platform device for AM200 EPD kit
+ *
+ * Copyright (C) 2008, Jaya Kumar
+ *
+ * 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.
+ *
+ * Layout is based on skeletonfb.c by James Simmons and Geert Uytterhoeven.
+ *
+ * This work was made possible by help and equipment support from E-Ink
+ * Corporation. http://support.eink.com/community
+ *
+ * This driver is written to be used with the Metronome display controller.
+ * on the AM200 EPD prototype kit/development kit with an E-Ink 800x600
+ * Vizplex EPD on a Gumstix board using the Lyre interface board.
+ *
+ */
+
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/errno.h>
+#include <linux/string.h>
+#include <linux/delay.h>
+#include <linux/interrupt.h>
+#include <linux/fb.h>
+#include <linux/init.h>
+#include <linux/platform_device.h>
+#include <linux/irq.h>
+#include <linux/gpio.h>
+
+#include <mach/pxafb.h>
+
+#include <video/metronomefb.h>
+
+static unsigned int panel_type = 6;
+static struct platform_device *am200_device;
+static struct metronome_board am200_board;
+
+static struct pxafb_mode_info am200_fb_mode_9inch7 = {
+       .pixclock       = 40000,
+       .xres           = 1200,
+       .yres           = 842,
+       .bpp            = 16,
+       .hsync_len      = 2,
+       .left_margin    = 2,
+       .right_margin   = 2,
+       .vsync_len      = 1,
+       .upper_margin   = 2,
+       .lower_margin   = 25,
+       .sync           = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
+};
+
+static struct pxafb_mode_info am200_fb_mode_8inch = {
+       .pixclock       = 40000,
+       .xres           = 1088,
+       .yres           = 791,
+       .bpp            = 16,
+       .hsync_len      = 28,
+       .left_margin    = 8,
+       .right_margin   = 30,
+       .vsync_len      = 8,
+       .upper_margin   = 10,
+       .lower_margin   = 8,
+       .sync           = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
+};
+
+static struct pxafb_mode_info am200_fb_mode_6inch = {
+       .pixclock       = 40189,
+       .xres           = 832,
+       .yres           = 622,
+       .bpp            = 16,
+       .hsync_len      = 28,
+       .left_margin    = 34,
+       .right_margin   = 34,
+       .vsync_len      = 25,
+       .upper_margin   = 0,
+       .lower_margin   = 2,
+       .sync           = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
+};
+
+static struct pxafb_mach_info am200_fb_info = {
+       .modes          = &am200_fb_mode_6inch,
+       .num_modes      = 1,
+       .lcd_conn       = LCD_TYPE_COLOR_TFT | LCD_PCLK_EDGE_FALL |
+                         LCD_AC_BIAS_FREQ(24),
+};
+
+/* register offsets for gpio control */
+#define LED_GPIO_PIN 51
+#define STDBY_GPIO_PIN 48
+#define RST_GPIO_PIN 49
+#define RDY_GPIO_PIN 32
+#define ERR_GPIO_PIN 17
+#define PCBPWR_GPIO_PIN 16
+static int gpios[] = { LED_GPIO_PIN , STDBY_GPIO_PIN , RST_GPIO_PIN,
+                       RDY_GPIO_PIN, ERR_GPIO_PIN, PCBPWR_GPIO_PIN };
+static char *gpio_names[] = { "LED" , "STDBY" , "RST", "RDY", "ERR", "PCBPWR" };
+
+static int am200_init_gpio_regs(struct metronomefb_par *par)
+{
+       int i;
+       int err;
+
+       for (i = 0; i < ARRAY_SIZE(gpios); i++) {
+               err = gpio_request(gpios[i], gpio_names[i]);
+               if (err) {
+                       dev_err(&am200_device->dev, "failed requesting "
+                               "gpio %s, err=%d\n", gpio_names[i], err);
+                       goto err_req_gpio;
+               }
+       }
+
+       gpio_direction_output(LED_GPIO_PIN, 0);
+       gpio_direction_output(STDBY_GPIO_PIN, 0);
+       gpio_direction_output(RST_GPIO_PIN, 0);
+
+       gpio_direction_input(RDY_GPIO_PIN);
+       gpio_direction_input(ERR_GPIO_PIN);
+
+       gpio_direction_output(PCBPWR_GPIO_PIN, 0);
+
+       return 0;
+
+err_req_gpio:
+       while (i > 0)
+               gpio_free(gpios[i--]);
+
+       return err;
+}
+
+static void am200_cleanup(struct metronomefb_par *par)
+{
+       int i;
+
+       free_irq(IRQ_GPIO(RDY_GPIO_PIN), par);
+
+       for (i = 0; i < ARRAY_SIZE(gpios); i++)
+               gpio_free(gpios[i]);
+}
+
+static int am200_share_video_mem(struct fb_info *info)
+{
+       /* rough check if this is our desired fb and not something else */
+       if ((info->var.xres != am200_fb_info.modes->xres)
+               || (info->var.yres != am200_fb_info.modes->yres))
+               return 0;
+
+       /* we've now been notified that we have our new fb */
+       am200_board.metromem = info->screen_base;
+       am200_board.host_fbinfo = info;
+
+       /* try to refcount host drv since we are the consumer after this */
+       if (!try_module_get(info->fbops->owner))
+               return -ENODEV;
+
+       return 0;
+}
+
+static int am200_unshare_video_mem(struct fb_info *info)
+{
+       dev_dbg(&am200_device->dev, "ENTER %s\n", __func__);
+
+       if (info != am200_board.host_fbinfo)
+               return 0;
+
+       module_put(am200_board.host_fbinfo->fbops->owner);
+       return 0;
+}
+
+static int am200_fb_notifier_callback(struct notifier_block *self,
+                                unsigned long event, void *data)
+{
+       struct fb_event *evdata = data;
+       struct fb_info *info = evdata->info;
+
+       dev_dbg(&am200_device->dev, "ENTER %s\n", __func__);
+
+       if (event == FB_EVENT_FB_REGISTERED)
+               return am200_share_video_mem(info);
+       else if (event == FB_EVENT_FB_UNREGISTERED)
+               return am200_unshare_video_mem(info);
+
+       return 0;
+}
+
+static struct notifier_block am200_fb_notif = {
+       .notifier_call = am200_fb_notifier_callback,
+};
+
+/* this gets called as part of our init. these steps must be done now so
+ * that we can use set_pxa_fb_info */
+static void __init am200_presetup_fb(void)
+{
+       int fw;
+       int fh;
+       int padding_size;
+       int totalsize;
+
+       switch (panel_type) {
+       case 6:
+               am200_fb_info.modes = &am200_fb_mode_6inch;
+               break;
+       case 8:
+               am200_fb_info.modes = &am200_fb_mode_8inch;
+               break;
+       case 97:
+               am200_fb_info.modes = &am200_fb_mode_9inch7;
+               break;
+       default:
+               dev_err(&am200_device->dev, "invalid panel_type selection,"
+                                               " setting to 6\n");
+               am200_fb_info.modes = &am200_fb_mode_6inch;
+               break;
+       }
+
+       /* the frame buffer is divided as follows:
+       command | CRC | padding
+       16kb waveform data | CRC | padding
+       image data | CRC
+       */
+
+       fw = am200_fb_info.modes->xres;
+       fh = am200_fb_info.modes->yres;
+
+       /* waveform must be 16k + 2 for checksum */
+       am200_board.wfm_size = roundup(16*1024 + 2, fw);
+
+       padding_size = PAGE_SIZE + (4 * fw);
+
+       /* total is 1 cmd , 1 wfm, padding and image */
+       totalsize = fw + am200_board.wfm_size + padding_size + (fw*fh);
+
+       /* save this off because we're manipulating fw after this and
+        * we'll need it when we're ready to setup the framebuffer */
+       am200_board.fw = fw;
+       am200_board.fh = fh;
+
+       /* the reason we do this adjustment is because we want to acquire
+        * more framebuffer memory without imposing custom awareness on the
+        * underlying pxafb driver */
+       am200_fb_info.modes->yres = DIV_ROUND_UP(totalsize, fw);
+
+       /* we divide since we told the LCD controller we're 16bpp */
+       am200_fb_info.modes->xres /= 2;
+
+       set_pxa_fb_info(&am200_fb_info);
+
+}
+
+/* this gets called by metronomefb as part of its init, in our case, we
+ * have already completed initial framebuffer init in presetup_fb so we
+ * can just setup the fb access pointers */
+static int am200_setup_fb(struct metronomefb_par *par)
+{
+       int fw;
+       int fh;
+
+       fw = am200_board.fw;
+       fh = am200_board.fh;
+
+       /* metromem was set up by the notifier in share_video_mem so now
+        * we can use its value to calculate the other entries */
+       par->metromem_cmd = (struct metromem_cmd *) am200_board.metromem;
+       par->metromem_wfm = am200_board.metromem + fw;
+       par->metromem_img = par->metromem_wfm + am200_board.wfm_size;
+       par->metromem_img_csum = (u16 *) (par->metromem_img + (fw * fh));
+       par->metromem_dma = am200_board.host_fbinfo->fix.smem_start;
+
+       return 0;
+}
+
+static int am200_get_panel_type(void)
+{
+       return panel_type;
+}
+
+static irqreturn_t am200_handle_irq(int irq, void *dev_id)
+{
+       struct metronomefb_par *par = dev_id;
+
+       wake_up_interruptible(&par->waitq);
+       return IRQ_HANDLED;
+}
+
+static int am200_setup_irq(struct fb_info *info)
+{
+       int ret;
+
+       ret = request_irq(IRQ_GPIO(RDY_GPIO_PIN), am200_handle_irq,
+                               IRQF_DISABLED|IRQF_TRIGGER_FALLING,
+                               "AM200", info->par);
+       if (ret)
+               dev_err(&am200_device->dev, "request_irq failed: %d\n", ret);
+
+       return ret;
+}
+
+static void am200_set_rst(struct metronomefb_par *par, int state)
+{
+       gpio_set_value(RST_GPIO_PIN, state);
+}
+
+static void am200_set_stdby(struct metronomefb_par *par, int state)
+{
+       gpio_set_value(STDBY_GPIO_PIN, state);
+}
+
+static int am200_wait_event(struct metronomefb_par *par)
+{
+       return wait_event_timeout(par->waitq, gpio_get_value(RDY_GPIO_PIN), HZ);
+}
+
+static int am200_wait_event_intr(struct metronomefb_par *par)
+{
+       return wait_event_interruptible_timeout(par->waitq,
+                                       gpio_get_value(RDY_GPIO_PIN), HZ);
+}
+
+static struct metronome_board am200_board = {
+       .owner                  = THIS_MODULE,
+       .setup_irq              = am200_setup_irq,
+       .setup_io               = am200_init_gpio_regs,
+       .setup_fb               = am200_setup_fb,
+       .set_rst                = am200_set_rst,
+       .set_stdby              = am200_set_stdby,
+       .met_wait_event         = am200_wait_event,
+       .met_wait_event_intr    = am200_wait_event_intr,
+       .get_panel_type         = am200_get_panel_type,
+       .cleanup                = am200_cleanup,
+};
+
+static int __init am200_init(void)
+{
+       int ret;
+
+       /* before anything else, we request notification for any fb
+        * creation events */
+       fb_register_client(&am200_fb_notif);
+
+       /* request our platform independent driver */
+       request_module("metronomefb");
+
+       am200_device = platform_device_alloc("metronomefb", -1);
+       if (!am200_device)
+               return -ENOMEM;
+
+       /* the am200_board that will be seen by metronomefb is a copy */
+       platform_device_add_data(am200_device, &am200_board,
+                                       sizeof(am200_board));
+
+       /* this _add binds metronomefb to am200. metronomefb refcounts am200 */
+       ret = platform_device_add(am200_device);
+
+       if (ret) {
+               platform_device_put(am200_device);
+               fb_unregister_client(&am200_fb_notif);
+               return ret;
+       }
+
+       am200_presetup_fb();
+
+       return 0;
+}
+
+module_param(panel_type, uint, 0);
+MODULE_PARM_DESC(panel_type, "Select the panel type: 6, 8, 97");
+
+module_init(am200_init);
+
+MODULE_DESCRIPTION("board driver for am200 metronome epd kit");
+MODULE_AUTHOR("Jaya Kumar");
+MODULE_LICENSE("GPL");
diff --git a/arch/arm/mach-pxa/cm-x255.c b/arch/arm/mach-pxa/cm-x255.c
new file mode 100644 (file)
index 0000000..83a4cdf
--- /dev/null
@@ -0,0 +1,258 @@
+/*
+ * linux/arch/arm/mach-pxa/cm-x255.c
+ *
+ * Copyright (C) 2007, 2008 CompuLab, Ltd.
+ * Mike Rapoport <mike@compulab.co.il>
+ *
+ * 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/irq.h>
+#include <linux/gpio.h>
+#include <linux/mtd/partitions.h>
+#include <linux/mtd/physmap.h>
+#include <linux/mtd/nand-gpio.h>
+
+#include <linux/spi/spi.h>
+
+#include <asm/mach/arch.h>
+#include <asm/mach-types.h>
+#include <asm/mach/map.h>
+
+#include <mach/pxa2xx-regs.h>
+#include <mach/mfp-pxa25x.h>
+#include <mach/pxa2xx_spi.h>
+#include <mach/bitfield.h>
+
+#include "generic.h"
+
+#define GPIO_NAND_CS   (5)
+#define GPIO_NAND_ALE  (4)
+#define GPIO_NAND_CLE  (3)
+#define GPIO_NAND_RB   (10)
+
+static unsigned long cmx255_pin_config[] = {
+       /* AC'97 */
+       GPIO28_AC97_BITCLK,
+       GPIO29_AC97_SDATA_IN_0,
+       GPIO30_AC97_SDATA_OUT,
+       GPIO31_AC97_SYNC,
+
+       /* BTUART */
+       GPIO42_BTUART_RXD,
+       GPIO43_BTUART_TXD,
+       GPIO44_BTUART_CTS,
+       GPIO45_BTUART_RTS,
+
+       /* STUART */
+       GPIO46_STUART_RXD,
+       GPIO47_STUART_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,
+
+       /* SSP1 */
+       GPIO23_SSP1_SCLK,
+       GPIO24_SSP1_SFRM,
+       GPIO25_SSP1_TXD,
+       GPIO26_SSP1_RXD,
+
+       /* SSP2 */
+       GPIO81_SSP2_CLK_OUT,
+       GPIO82_SSP2_FRM_OUT,
+       GPIO83_SSP2_TXD,
+       GPIO84_SSP2_RXD,
+
+       /* PC Card */
+       GPIO48_nPOE,
+       GPIO49_nPWE,
+       GPIO50_nPIOR,
+       GPIO51_nPIOW,
+       GPIO52_nPCE_1,
+       GPIO53_nPCE_2,
+       GPIO54_nPSKTSEL,
+       GPIO55_nPREG,
+       GPIO56_nPWAIT,
+       GPIO57_nIOIS16,
+
+       /* SDRAM and local bus */
+       GPIO15_nCS_1,
+       GPIO78_nCS_2,
+       GPIO79_nCS_3,
+       GPIO80_nCS_4,
+       GPIO33_nCS_5,
+       GPIO18_RDY,
+
+       /* GPIO */
+       GPIO0_GPIO      | WAKEUP_ON_EDGE_BOTH,
+       GPIO9_GPIO,                             /* PC card reset */
+
+       /* NAND controls */
+       GPIO5_GPIO      | MFP_LPM_DRIVE_HIGH,   /* NAND CE# */
+       GPIO4_GPIO      | MFP_LPM_DRIVE_LOW,    /* NAND ALE */
+       GPIO3_GPIO      | MFP_LPM_DRIVE_LOW,    /* NAND CLE */
+       GPIO10_GPIO,                            /* NAND Ready/Busy */
+
+       /* interrupts */
+       GPIO22_GPIO,    /* DM9000 interrupt */
+};
+
+#if defined(CONFIG_SPI_PXA2XX)
+static struct pxa2xx_spi_master pxa_ssp_master_info = {
+       .num_chipselect = 1,
+};
+
+static struct spi_board_info spi_board_info[] __initdata = {
+       [0] = {
+               .modalias       = "rtc-max6902",
+               .max_speed_hz   = 1000000,
+               .bus_num        = 1,
+               .chip_select    = 0,
+       },
+};
+
+static void __init cmx255_init_rtc(void)
+{
+       pxa2xx_set_spi_info(1, &pxa_ssp_master_info);
+       spi_register_board_info(ARRAY_AND_SIZE(spi_board_info));
+}
+#else
+static inline void cmx255_init_rtc(void) {}
+#endif
+
+#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE)
+static struct mtd_partition cmx255_nor_partitions[] = {
+       {
+               .name           = "ARMmon",
+               .size           = 0x00030000,
+               .offset         = 0,
+               .mask_flags     = MTD_WRITEABLE  /* force read-only */
+       } , {
+               .name           = "ARMmon setup block",
+               .size           = 0x00010000,
+               .offset         = MTDPART_OFS_APPEND,
+               .mask_flags     = MTD_WRITEABLE  /* force read-only */
+       } , {
+               .name           = "kernel",
+               .size           = 0x00160000,
+               .offset         = MTDPART_OFS_APPEND,
+       } , {
+               .name           = "ramdisk",
+               .size           = MTDPART_SIZ_FULL,
+               .offset         = MTDPART_OFS_APPEND
+       }
+};
+
+static struct physmap_flash_data cmx255_nor_flash_data[] = {
+       {
+               .width          = 2,    /* bankwidth in bytes */
+               .parts          = cmx255_nor_partitions,
+               .nr_parts       = ARRAY_SIZE(cmx255_nor_partitions)
+       }
+};
+
+static struct resource cmx255_nor_resource = {
+       .start  = PXA_CS0_PHYS,
+       .end    = PXA_CS0_PHYS + SZ_8M - 1,
+       .flags  = IORESOURCE_MEM,
+};
+
+static struct platform_device cmx255_nor = {
+       .name   = "physmap-flash",
+       .id     = -1,
+       .dev    = {
+               .platform_data = cmx255_nor_flash_data,
+       },
+       .resource = &cmx255_nor_resource,
+       .num_resources = 1,
+};
+
+static void __init cmx255_init_nor(void)
+{
+       platform_device_register(&cmx255_nor);
+}
+#else
+static inline void cmx255_init_nor(void) {}
+#endif
+
+#if defined(CONFIG_MTD_NAND_GPIO) || defined(CONFIG_MTD_NAND_GPIO_MODULE)
+static struct resource cmx255_nand_resource[] = {
+       [0] = {
+               .start = PXA_CS1_PHYS,
+               .end   = PXA_CS1_PHYS + 11,
+               .flags = IORESOURCE_MEM,
+       },
+       [1] = {
+               .start = PXA_CS5_PHYS,
+               .end   = PXA_CS5_PHYS + 3,
+               .flags = IORESOURCE_MEM,
+       },
+};
+
+static struct mtd_partition cmx255_nand_parts[] = {
+       [0] = {
+               .name   = "cmx255-nand",
+               .size   = MTDPART_SIZ_FULL,
+               .offset = 0,
+       },
+};
+
+static struct gpio_nand_platdata cmx255_nand_platdata = {
+       .gpio_nce = GPIO_NAND_CS,
+       .gpio_cle = GPIO_NAND_CLE,
+       .gpio_ale = GPIO_NAND_ALE,
+       .gpio_rdy = GPIO_NAND_RB,
+       .gpio_nwp = -1,
+       .parts = cmx255_nand_parts,
+       .num_parts = ARRAY_SIZE(cmx255_nand_parts),
+       .chip_delay = 25,
+};
+
+static struct platform_device cmx255_nand = {
+       .name           = "gpio-nand",
+       .num_resources  = ARRAY_SIZE(cmx255_nand_resource),
+       .resource       = cmx255_nand_resource,
+       .id             = -1,
+       .dev            = {
+               .platform_data = &cmx255_nand_platdata,
+       }
+};
+
+static void __init cmx255_init_nand(void)
+{
+       platform_device_register(&cmx255_nand);
+}
+#else
+static inline void cmx255_init_nand(void) {}
+#endif
+
+void __init cmx255_init(void)
+{
+       pxa2xx_mfp_config(ARRAY_AND_SIZE(cmx255_pin_config));
+
+       cmx255_init_rtc();
+       cmx255_init_nor();
+       cmx255_init_nand();
+}
diff --git a/arch/arm/mach-pxa/cm-x270-pci.h b/arch/arm/mach-pxa/cm-x270-pci.h
deleted file mode 100644 (file)
index 48f532f..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-extern void __cmx270_pci_init_irq(int irq_gpio);
-extern void __cmx270_pci_suspend(void);
-extern void __cmx270_pci_resume(void);
-
-#ifdef CONFIG_PCI
-#define cmx270_pci_init_irq(x) __cmx270_pci_init_irq(x)
-#define cmx270_pci_suspend(x) __cmx270_pci_suspend(x)
-#define cmx270_pci_resume(x) __cmx270_pci_resume(x)
-#else
-#define cmx270_pci_init_irq(x) do {} while (0)
-#define cmx270_pci_suspend(x) do {} while (0)
-#define cmx270_pci_resume(x) do {} while (0)
-#endif
index af003a2695341707490747be9f719f2b11615e19..a82dad1a8cc86c76cef9fa50619695903b03d138 100644 (file)
 #include <linux/irq.h>
 #include <linux/gpio.h>
 
-#include <linux/dm9000.h>
 #include <linux/rtc-v3020.h>
 #include <video/mbxfb.h>
-#include <linux/leds.h>
 
-#include <asm/mach/arch.h>
-#include <asm/mach-types.h>
-#include <asm/mach/map.h>
-
-#include <mach/pxa2xx-regs.h>
 #include <mach/mfp-pxa27x.h>
-#include <mach/pxa-regs.h>
-#include <mach/audio.h>
-#include <mach/pxafb.h>
 #include <mach/ohci.h>
 #include <mach/mmc.h>
-#include <mach/bitfield.h>
-
-#include <asm/hardware/it8152.h>
 
 #include "generic.h"
-#include "cm-x270-pci.h"
-
-/* virtual addresses for statically mapped regions */
-#define CMX270_VIRT_BASE       (0xe8000000)
-#define CMX270_IT8152_VIRT     (CMX270_VIRT_BASE)
 
+/* physical address if local-bus attached devices */
 #define RTC_PHYS_BASE          (PXA_CS1_PHYS + (5 << 22))
-#define DM9000_PHYS_BASE       (PXA_CS1_PHYS + (6 << 22))
 
 /* GPIO IRQ usage */
-#define GPIO10_ETHIRQ          (10)
-#define GPIO22_IT8152_IRQ      (22)
 #define GPIO83_MMC_IRQ         (83)
-#define GPIO95_GFXIRQ          (95)
 
-#define CMX270_ETHIRQ          IRQ_GPIO(GPIO10_ETHIRQ)
-#define CMX270_IT8152_IRQ      IRQ_GPIO(GPIO22_IT8152_IRQ)
 #define CMX270_MMC_IRQ         IRQ_GPIO(GPIO83_MMC_IRQ)
-#define CMX270_GFXIRQ          IRQ_GPIO(GPIO95_GFXIRQ)
 
 /* MMC power enable */
 #define GPIO105_MMC_POWER      (105)
@@ -157,62 +133,6 @@ static unsigned long cmx270_pin_config[] = {
        GPIO83_GPIO,    /* MMC card detect */
 };
 
-#if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE)
-static struct resource cmx270_dm9000_resource[] = {
-       [0] = {
-               .start = DM9000_PHYS_BASE,
-               .end   = DM9000_PHYS_BASE + 4,
-               .flags = IORESOURCE_MEM,
-       },
-       [1] = {
-               .start = DM9000_PHYS_BASE + 8,
-               .end   = DM9000_PHYS_BASE + 8 + 500,
-               .flags = IORESOURCE_MEM,
-       },
-       [2] = {
-               .start = CMX270_ETHIRQ,
-               .end   = CMX270_ETHIRQ,
-               .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE,
-       }
-};
-
-static struct dm9000_plat_data cmx270_dm9000_platdata = {
-       .flags          = DM9000_PLATF_32BITONLY,
-};
-
-static struct platform_device cmx270_dm9000_device = {
-       .name           = "dm9000",
-       .id             = 0,
-       .num_resources  = ARRAY_SIZE(cmx270_dm9000_resource),
-       .resource       = cmx270_dm9000_resource,
-       .dev            = {
-               .platform_data = &cmx270_dm9000_platdata,
-       }
-};
-
-static void __init cmx270_init_dm9000(void)
-{
-       platform_device_register(&cmx270_dm9000_device);
-}
-#else
-static inline void cmx270_init_dm9000(void) {}
-#endif
-
-/* UCB1400 touchscreen controller */
-#if defined(CONFIG_TOUCHSCREEN_UCB1400) || defined(CONFIG_TOUCHSCREEN_UCB1400_MODULE)
-static struct platform_device cmx270_ts_device = {
-       .name           = "ucb1400_ts",
-       .id             = -1,
-};
-
-static void __init cmx270_init_touchscreen(void)
-{
-       platform_device_register(&cmx270_ts_device);
-}
-#else
-static inline void cmx270_init_touchscreen(void) {}
-#endif
-
 /* V3020 RTC */
 #if defined(CONFIG_RTC_DRV_V3020) || defined(CONFIG_RTC_DRV_V3020_MODULE)
 static struct resource cmx270_v3020_resource[] = {
@@ -242,45 +162,7 @@ static void __init cmx270_init_rtc(void)
        platform_device_register(&cmx270_rtc_device);
 }
 #else
-static inline void cmx270_init_rtc(void) {}
-#endif
-
-/* CM-X270 LEDs */
-#if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE)
-static struct gpio_led cmx270_leds[] = {
-       [0] = {
-               .name = "cm-x270:red",
-               .default_trigger = "nand-disk",
-               .gpio = 93,
-               .active_low = 1,
-       },
-       [1] = {
-               .name = "cm-x270:green",
-               .default_trigger = "heartbeat",
-               .gpio = 94,
-               .active_low = 1,
-       },
-};
-
-static struct gpio_led_platform_data cmx270_gpio_led_pdata = {
-       .num_leds = ARRAY_SIZE(cmx270_leds),
-       .leds = cmx270_leds,
-};
-
-static struct platform_device cmx270_led_device = {
-       .name           = "leds-gpio",
-       .id             = -1,
-       .dev            = {
-               .platform_data = &cmx270_gpio_led_pdata,
-       },
-};
-
-static void __init cmx270_init_leds(void)
-{
-       platform_device_register(&cmx270_led_device);
-}
-#else
-static inline void cmx270_init_leds(void) {}
+static inline void cmx2xx_init_rtc(void) {}
 #endif
 
 /* 2700G graphics */
@@ -373,238 +255,11 @@ static void __init cmx270_init_2700G(void)
 static inline void cmx270_init_2700G(void) {}
 #endif
 
-#if defined(CONFIG_FB_PXA) || defined(CONFIG_FB_PXA_MODULE)
-/*
-  Display definitions
-  keep these for backwards compatibility, although symbolic names (as
-  e.g. in lpd270.c) looks better
-*/
-#define MTYPE_STN320x240       0
-#define MTYPE_TFT640x480       1
-#define MTYPE_CRT640x480       2
-#define MTYPE_CRT800x600       3
-#define MTYPE_TFT320x240       6
-#define MTYPE_STN640x480       7
-
-static struct pxafb_mode_info generic_stn_320x240_mode = {
-       .pixclock       = 76923,
-       .bpp            = 8,
-       .xres           = 320,
-       .yres           = 240,
-       .hsync_len      = 3,
-       .vsync_len      = 2,
-       .left_margin    = 3,
-       .upper_margin   = 0,
-       .right_margin   = 3,
-       .lower_margin   = 0,
-       .sync           = (FB_SYNC_HOR_HIGH_ACT |
-                          FB_SYNC_VERT_HIGH_ACT),
-       .cmap_greyscale = 0,
-};
-
-static struct pxafb_mach_info generic_stn_320x240 = {
-       .modes          = &generic_stn_320x240_mode,
-       .num_modes      = 1,
-       .lccr0          = 0,
-       .lccr3          = (LCCR3_PixClkDiv(0x03) |
-                          LCCR3_Acb(0xff) |
-                          LCCR3_PCP),
-       .cmap_inverse   = 0,
-       .cmap_static    = 0,
-};
-
-static struct pxafb_mode_info generic_tft_640x480_mode = {
-       .pixclock       = 38461,
-       .bpp            = 8,
-       .xres           = 640,
-       .yres           = 480,
-       .hsync_len      = 60,
-       .vsync_len      = 2,
-       .left_margin    = 70,
-       .upper_margin   = 10,
-       .right_margin   = 70,
-       .lower_margin   = 5,
-       .sync           = 0,
-       .cmap_greyscale = 0,
-};
-
-static struct pxafb_mach_info generic_tft_640x480 = {
-       .modes          = &generic_tft_640x480_mode,
-       .num_modes      = 1,
-       .lccr0          = (LCCR0_PAS),
-       .lccr3          = (LCCR3_PixClkDiv(0x01) |
-                          LCCR3_Acb(0xff) |
-                          LCCR3_PCP),
-       .cmap_inverse   = 0,
-       .cmap_static    = 0,
-};
-
-static struct pxafb_mode_info generic_crt_640x480_mode = {
-       .pixclock       = 38461,
-       .bpp            = 8,
-       .xres           = 640,
-       .yres           = 480,
-       .hsync_len      = 63,
-       .vsync_len      = 2,
-       .left_margin    = 81,
-       .upper_margin   = 33,
-       .right_margin   = 16,
-       .lower_margin   = 10,
-       .sync           = (FB_SYNC_HOR_HIGH_ACT |
-                          FB_SYNC_VERT_HIGH_ACT),
-       .cmap_greyscale = 0,
-};
-
-static struct pxafb_mach_info generic_crt_640x480 = {
-       .modes          = &generic_crt_640x480_mode,
-       .num_modes      = 1,
-       .lccr0          = (LCCR0_PAS),
-       .lccr3          = (LCCR3_PixClkDiv(0x01) |
-                          LCCR3_Acb(0xff)),
-       .cmap_inverse   = 0,
-       .cmap_static    = 0,
-};
-
-static struct pxafb_mode_info generic_crt_800x600_mode = {
-       .pixclock       = 28846,
-       .bpp            = 8,
-       .xres           = 800,
-       .yres           = 600,
-       .hsync_len      = 63,
-       .vsync_len      = 2,
-       .left_margin    = 26,
-       .upper_margin   = 21,
-       .right_margin   = 26,
-       .lower_margin   = 11,
-       .sync           = (FB_SYNC_HOR_HIGH_ACT |
-                          FB_SYNC_VERT_HIGH_ACT),
-       .cmap_greyscale = 0,
-};
-
-static struct pxafb_mach_info generic_crt_800x600 = {
-       .modes          = &generic_crt_800x600_mode,
-       .num_modes      = 1,
-       .lccr0          = (LCCR0_PAS),
-       .lccr3          = (LCCR3_PixClkDiv(0x02) |
-                          LCCR3_Acb(0xff)),
-       .cmap_inverse   = 0,
-       .cmap_static    = 0,
-};
-
-static struct pxafb_mode_info generic_tft_320x240_mode = {
-       .pixclock       = 134615,
-       .bpp            = 16,
-       .xres           = 320,
-       .yres           = 240,
-       .hsync_len      = 63,
-       .vsync_len      = 7,
-       .left_margin    = 75,
-       .upper_margin   = 0,
-       .right_margin   = 15,
-       .lower_margin   = 15,
-       .sync           = 0,
-       .cmap_greyscale = 0,
-};
-
-static struct pxafb_mach_info generic_tft_320x240 = {
-       .modes          = &generic_tft_320x240_mode,
-       .num_modes      = 1,
-       .lccr0          = (LCCR0_PAS),
-       .lccr3          = (LCCR3_PixClkDiv(0x06) |
-                          LCCR3_Acb(0xff) |
-                          LCCR3_PCP),
-       .cmap_inverse   = 0,
-       .cmap_static    = 0,
-};
-
-static struct pxafb_mode_info generic_stn_640x480_mode = {
-       .pixclock       = 57692,
-       .bpp            = 8,
-       .xres           = 640,
-       .yres           = 480,
-       .hsync_len      = 4,
-       .vsync_len      = 2,
-       .left_margin    = 10,
-       .upper_margin   = 5,
-       .right_margin   = 10,
-       .lower_margin   = 5,
-       .sync           = (FB_SYNC_HOR_HIGH_ACT |
-                          FB_SYNC_VERT_HIGH_ACT),
-       .cmap_greyscale = 0,
-};
-
-static struct pxafb_mach_info generic_stn_640x480 = {
-       .modes          = &generic_stn_640x480_mode,
-       .num_modes      = 1,
-       .lccr0          = 0,
-       .lccr3          = (LCCR3_PixClkDiv(0x02) |
-                          LCCR3_Acb(0xff)),
-       .cmap_inverse   = 0,
-       .cmap_static    = 0,
-};
-
-static struct pxafb_mach_info *cmx270_display = &generic_crt_640x480;
-
-static int __init cmx270_set_display(char *str)
-{
-       int disp_type = simple_strtol(str, NULL, 0);
-       switch (disp_type) {
-       case MTYPE_STN320x240:
-               cmx270_display = &generic_stn_320x240;
-               break;
-       case MTYPE_TFT640x480:
-               cmx270_display = &generic_tft_640x480;
-               break;
-       case MTYPE_CRT640x480:
-               cmx270_display = &generic_crt_640x480;
-               break;
-       case MTYPE_CRT800x600:
-               cmx270_display = &generic_crt_800x600;
-               break;
-       case MTYPE_TFT320x240:
-               cmx270_display = &generic_tft_320x240;
-               break;
-       case MTYPE_STN640x480:
-               cmx270_display = &generic_stn_640x480;
-               break;
-       default: /* fallback to CRT 640x480 */
-               cmx270_display = &generic_crt_640x480;
-               break;
-       }
-       return 1;
-}
-
-/*
-   This should be done really early to get proper configuration for
-   frame buffer.
-   Indeed, pxafb parameters can be used istead, but CM-X270 bootloader
-   has limitied line length for kernel command line, and also it will
-   break compatibitlty with proprietary releases already in field.
-*/
-__setup("monitor=", cmx270_set_display);
-
-static void __init cmx270_init_display(void)
-{
-       set_pxa_fb_info(cmx270_display);
-}
-#else
-static inline void cmx270_init_display(void) {}
-#endif
-
 /* PXA27x OHCI controller setup */
 #if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)
-static int cmx270_ohci_init(struct device *dev)
-{
-       /* Set the Power Control Polarity Low */
-       UHCHR = (UHCHR | UHCHR_PCPL) &
-               ~(UHCHR_SSEP1 | UHCHR_SSEP2 | UHCHR_SSE);
-
-       return 0;
-}
-
 static struct pxaohci_platform_data cmx270_ohci_platform_data = {
        .port_mode      = PMM_PERPORT_MODE,
-       .init           = cmx270_ohci_init,
+       .flags          = ENABLE_PORT1 | ENABLE_PORT2 | POWER_CONTROL_LOW,
 };
 
 static void __init cmx270_init_ohci(void)
@@ -676,131 +331,12 @@ static void __init cmx270_init_mmc(void)
 static inline void cmx270_init_mmc(void) {}
 #endif
 
-#ifdef CONFIG_PM
-static unsigned long sleep_save_msc[10];
-
-static int cmx270_suspend(struct sys_device *dev, pm_message_t state)
-{
-       cmx270_pci_suspend();
-
-       /* save MSC registers */
-       sleep_save_msc[0] = MSC0;
-       sleep_save_msc[1] = MSC1;
-       sleep_save_msc[2] = MSC2;
-
-       /* setup power saving mode registers */
-       PCFR = 0x0;
-       PSLR = 0xff400000;
-       PMCR  = 0x00000005;
-       PWER  = 0x80000000;
-       PFER  = 0x00000000;
-       PRER  = 0x00000000;
-       PGSR0 = 0xC0018800;
-       PGSR1 = 0x004F0002;
-       PGSR2 = 0x6021C000;
-       PGSR3 = 0x00020000;
-
-       return 0;
-}
-
-static int cmx270_resume(struct sys_device *dev)
-{
-       cmx270_pci_resume();
-
-       /* restore MSC registers */
-       MSC0 = sleep_save_msc[0];
-       MSC1 = sleep_save_msc[1];
-       MSC2 = sleep_save_msc[2];
-
-       return 0;
-}
-
-static struct sysdev_class cmx270_pm_sysclass = {
-       .name = "pm",
-       .resume = cmx270_resume,
-       .suspend = cmx270_suspend,
-};
-
-static struct sys_device cmx270_pm_device = {
-       .cls = &cmx270_pm_sysclass,
-};
-
-static int __init cmx270_pm_init(void)
-{
-       int error;
-       error = sysdev_class_register(&cmx270_pm_sysclass);
-       if (error == 0)
-               error = sysdev_register(&cmx270_pm_device);
-       return error;
-}
-#else
-static int __init cmx270_pm_init(void) { return 0; }
-#endif
-
-#if defined(CONFIG_SND_PXA2XX_AC97) || defined(CONFIG_SND_PXA2XX_AC97_MODULE)
-static void __init cmx270_init_ac97(void)
-{
-       pxa_set_ac97_info(NULL);
-}
-#else
-static inline void cmx270_init_ac97(void) {}
-#endif
-
-static void __init cmx270_init(void)
+void __init cmx270_init(void)
 {
-       cmx270_pm_init();
-
        pxa2xx_mfp_config(ARRAY_AND_SIZE(cmx270_pin_config));
 
-       cmx270_init_dm9000();
        cmx270_init_rtc();
-       cmx270_init_display();
        cmx270_init_mmc();
        cmx270_init_ohci();
-       cmx270_init_ac97();
-       cmx270_init_touchscreen();
-       cmx270_init_leds();
        cmx270_init_2700G();
 }
-
-static void __init cmx270_init_irq(void)
-{
-       pxa27x_init_irq();
-
-       cmx270_pci_init_irq(GPIO22_IT8152_IRQ);
-}
-
-#ifdef CONFIG_PCI
-/* Map PCI companion statically */
-static struct map_desc cmx270_io_desc[] __initdata = {
-       [0] = { /* PCI bridge */
-               .virtual        = CMX270_IT8152_VIRT,
-               .pfn            = __phys_to_pfn(PXA_CS4_PHYS),
-               .length         = SZ_64M,
-               .type           = MT_DEVICE
-       },
-};
-
-static void __init cmx270_map_io(void)
-{
-       pxa_map_io();
-       iotable_init(cmx270_io_desc, ARRAY_SIZE(cmx270_io_desc));
-
-       it8152_base_address = CMX270_IT8152_VIRT;
-}
-#else
-static void __init cmx270_map_io(void)
-{
-       pxa_map_io();
-}
-#endif
-
-MACHINE_START(ARMCORE, "Compulab CM-x270")
-       .boot_params    = 0xa0000100,
-       .phys_io        = 0x40000000,
-       .io_pg_offst    = (io_p2v(0x40000000) >> 18) & 0xfffc,
-       .map_io         = cmx270_map_io,
-       .init_irq       = cmx270_init_irq,
-       .timer          = &pxa_timer,
-       .init_machine   = cmx270_init,
-MACHINE_END
similarity index 77%
rename from arch/arm/mach-pxa/cm-x270-pci.c
rename to arch/arm/mach-pxa/cm-x2xx-pci.c
index 2d5bcea1e52077b9601253ad6ea403eae7f6558c..3156b25f6e9dce438b93a2cac629ceb67ae0d610 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * linux/arch/arm/mach-pxa/cm-x270-pci.c
+ * linux/arch/arm/mach-pxa/cm-x2xx-pci.c
  *
  * PCI bios-type initialisation for PCI machines
  *
@@ -28,7 +28,7 @@
 #include <asm/hardware/it8152.h>
 
 unsigned long it8152_base_address;
-static int cmx270_it8152_irq_gpio;
+static int cmx2xx_it8152_irq_gpio;
 
 /*
  * Only first 64MB of memory can be accessed via PCI.
@@ -36,13 +36,13 @@ static int cmx270_it8152_irq_gpio;
  * This is really ugly and we need a better way of specifying
  * DMA-capable regions of memory.
  */
-void __init cmx270_pci_adjust_zones(int node, unsigned long *zone_size,
+void __init cmx2xx_pci_adjust_zones(int node, unsigned long *zone_size,
        unsigned long *zhole_size)
 {
        unsigned int sz = SZ_64M >> PAGE_SHIFT;
 
        if (machine_is_armcore()) {
-               pr_info("Adjusting zones for CM-X270\n");
+               pr_info("Adjusting zones for CM-X2XX\n");
 
                /*
                 * Only adjust if > 64M on current system
@@ -57,29 +57,29 @@ void __init cmx270_pci_adjust_zones(int node, unsigned long *zone_size,
        }
 }
 
-static void cmx270_it8152_irq_demux(unsigned int irq, struct irq_desc *desc)
+static void cmx2xx_it8152_irq_demux(unsigned int irq, struct irq_desc *desc)
 {
        /* clear our parent irq */
-       GEDR(cmx270_it8152_irq_gpio) = GPIO_bit(cmx270_it8152_irq_gpio);
+       GEDR(cmx2xx_it8152_irq_gpio) = GPIO_bit(cmx2xx_it8152_irq_gpio);
 
        it8152_irq_demux(irq, desc);
 }
 
-void __cmx270_pci_init_irq(int irq_gpio)
+void __cmx2xx_pci_init_irq(int irq_gpio)
 {
        it8152_init_irq();
 
-       cmx270_it8152_irq_gpio = irq_gpio;
+       cmx2xx_it8152_irq_gpio = irq_gpio;
 
        set_irq_type(gpio_to_irq(irq_gpio), IRQ_TYPE_EDGE_RISING);
 
-       set_irq_chained_handler(gpio_to_irq(irq_gpio), cmx270_it8152_irq_demux);
+       set_irq_chained_handler(gpio_to_irq(irq_gpio), cmx2xx_it8152_irq_demux);
 }
 
 #ifdef CONFIG_PM
 static unsigned long sleep_save_ite[10];
 
-void __cmx270_pci_suspend(void)
+void __cmx2xx_pci_suspend(void)
 {
        /* save ITE state */
        sleep_save_ite[0] = __raw_readl(IT8152_INTC_PDCNIMR);
@@ -91,7 +91,7 @@ void __cmx270_pci_suspend(void)
        __raw_writel((0), IT8152_INTC_LPCNIRR);
 }
 
-void __cmx270_pci_resume(void)
+void __cmx2xx_pci_resume(void)
 {
        /* restore IT8152 state */
        __raw_writel((sleep_save_ite[0]), IT8152_INTC_PDCNIMR);
@@ -99,12 +99,12 @@ void __cmx270_pci_resume(void)
        __raw_writel((sleep_save_ite[2]), IT8152_INTC_LPNIAR);
 }
 #else
-void cmx270_pci_suspend(void) {}
-void cmx270_pci_resume(void) {}
+void cmx2xx_pci_suspend(void) {}
+void cmx2xx_pci_resume(void) {}
 #endif
 
 /* PCI IRQ mapping*/
-static int __init cmx270_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
+static int __init cmx2xx_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
 {
        int irq;
 
@@ -116,14 +116,14 @@ static int __init cmx270_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
 
        /*
          Here comes the ugly part. The routing is baseboard specific,
-         but defining a platform for each possible base of CM-X270 is
-         unrealistic. Here we keep mapping for ATXBase and SB-X270.
+         but defining a platform for each possible base of CM-X2XX is
+         unrealistic. Here we keep mapping for ATXBase and SB-X2XX.
        */
        /* ATXBASE PCI slot */
        if (slot == 7)
                return IT8152_PCI_INTA;
 
-       /* ATXBase/SB-x270 CardBus */
+       /* ATXBase/SB-X2XX CardBus */
        if (slot == 8 || slot == 0)
                return IT8152_PCI_INTB;
 
@@ -131,7 +131,11 @@ static int __init cmx270_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
        if (slot == 9)
                return IT8152_PCI_INTA;
 
-       /* SB-x270 Ethernet */
+       /* CM-x255 Onboard Ethernet */
+       if (slot == 15)
+               return IT8152_PCI_INTC;
+
+       /* SB-x2xx Ethernet */
        if (slot == 16)
                return IT8152_PCI_INTA;
 
@@ -144,9 +148,9 @@ static int __init cmx270_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
        return(0);
 }
 
-static void cmx270_pci_preinit(void)
+static void cmx2xx_pci_preinit(void)
 {
-       pr_info("Initializing CM-X270 PCI subsystem\n");
+       pr_info("Initializing CM-X2XX PCI subsystem\n");
 
        __raw_writel(0x800, IT8152_PCI_CFG_ADDR);
        if (__raw_readl(IT8152_PCI_CFG_DATA) == 0x81521283) {
@@ -200,21 +204,21 @@ static void cmx270_pci_preinit(void)
        }
 }
 
-static struct hw_pci cmx270_pci __initdata = {
+static struct hw_pci cmx2xx_pci __initdata = {
        .swizzle        = pci_std_swizzle,
-       .map_irq        = cmx270_pci_map_irq,
+       .map_irq        = cmx2xx_pci_map_irq,
        .nr_controllers = 1,
        .setup          = it8152_pci_setup,
        .scan           = it8152_pci_scan_bus,
-       .preinit        = cmx270_pci_preinit,
+       .preinit        = cmx2xx_pci_preinit,
 };
 
-static int __init cmx270_init_pci(void)
+static int __init cmx2xx_init_pci(void)
 {
        if (machine_is_armcore())
-               pci_common_init(&cmx270_pci);
+               pci_common_init(&cmx2xx_pci);
 
        return 0;
 }
 
-subsys_initcall(cmx270_init_pci);
+subsys_initcall(cmx2xx_init_pci);
diff --git a/arch/arm/mach-pxa/cm-x2xx-pci.h b/arch/arm/mach-pxa/cm-x2xx-pci.h
new file mode 100644 (file)
index 0000000..e24aad2
--- /dev/null
@@ -0,0 +1,13 @@
+extern void __cmx2xx_pci_init_irq(int irq_gpio);
+extern void __cmx2xx_pci_suspend(void);
+extern void __cmx2xx_pci_resume(void);
+
+#ifdef CONFIG_PCI
+#define cmx2xx_pci_init_irq(x) __cmx2xx_pci_init_irq(x)
+#define cmx2xx_pci_suspend(x) __cmx2xx_pci_suspend(x)
+#define cmx2xx_pci_resume(x) __cmx2xx_pci_resume(x)
+#else
+#define cmx2xx_pci_init_irq(x) do {} while (0)
+#define cmx2xx_pci_suspend(x) do {} while (0)
+#define cmx2xx_pci_resume(x) do {} while (0)
+#endif
diff --git a/arch/arm/mach-pxa/cm-x2xx.c b/arch/arm/mach-pxa/cm-x2xx.c
new file mode 100644 (file)
index 0000000..0b3ce3b
--- /dev/null
@@ -0,0 +1,531 @@
+/*
+ * linux/arch/arm/mach-pxa/cm-x2xx.c
+ *
+ * Copyright (C) 2008 CompuLab, Ltd.
+ * Mike Rapoport <mike@compulab.co.il>
+ *
+ * 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/sysdev.h>
+#include <linux/irq.h>
+#include <linux/gpio.h>
+
+#include <linux/dm9000.h>
+#include <linux/leds.h>
+
+#include <asm/mach/arch.h>
+#include <asm/mach-types.h>
+#include <asm/mach/map.h>
+
+#include <mach/pxa2xx-regs.h>
+#include <mach/mfp-pxa27x.h>
+#include <mach/pxa-regs.h>
+#include <mach/audio.h>
+#include <mach/pxafb.h>
+
+#include <asm/hardware/it8152.h>
+
+#include "generic.h"
+#include "cm-x2xx-pci.h"
+
+extern void cmx255_init(void);
+extern void cmx270_init(void);
+
+/* virtual addresses for statically mapped regions */
+#define CMX2XX_VIRT_BASE       (0xe8000000)
+#define CMX2XX_IT8152_VIRT     (CMX2XX_VIRT_BASE)
+
+/* physical address if local-bus attached devices */
+#define CMX255_DM9000_PHYS_BASE (PXA_CS1_PHYS + (8 << 22))
+#define CMX270_DM9000_PHYS_BASE        (PXA_CS1_PHYS + (6 << 22))
+
+/* leds */
+#define CMX255_GPIO_RED                (27)
+#define CMX255_GPIO_GREEN      (32)
+#define CMX270_GPIO_RED                (93)
+#define CMX270_GPIO_GREEN      (94)
+
+/* GPIO IRQ usage */
+#define GPIO22_ETHIRQ          (22)
+#define GPIO10_ETHIRQ          (10)
+#define CMX255_GPIO_IT8152_IRQ (0)
+#define CMX270_GPIO_IT8152_IRQ (22)
+
+#define CMX255_ETHIRQ          IRQ_GPIO(GPIO22_ETHIRQ)
+#define CMX270_ETHIRQ          IRQ_GPIO(GPIO10_ETHIRQ)
+
+#if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE)
+static struct resource cmx255_dm9000_resource[] = {
+       [0] = {
+               .start = CMX255_DM9000_PHYS_BASE,
+               .end   = CMX255_DM9000_PHYS_BASE + 3,
+               .flags = IORESOURCE_MEM,
+       },
+       [1] = {
+               .start = CMX255_DM9000_PHYS_BASE + 4,
+               .end   = CMX255_DM9000_PHYS_BASE + 4 + 500,
+               .flags = IORESOURCE_MEM,
+       },
+       [2] = {
+               .start = CMX255_ETHIRQ,
+               .end   = CMX255_ETHIRQ,
+               .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE,
+       }
+};
+
+static struct resource cmx270_dm9000_resource[] = {
+       [0] = {
+               .start = CMX270_DM9000_PHYS_BASE,
+               .end   = CMX270_DM9000_PHYS_BASE + 3,
+               .flags = IORESOURCE_MEM,
+       },
+       [1] = {
+               .start = CMX270_DM9000_PHYS_BASE + 8,
+               .end   = CMX270_DM9000_PHYS_BASE + 8 + 500,
+               .flags = IORESOURCE_MEM,
+       },
+       [2] = {
+               .start = CMX270_ETHIRQ,
+               .end   = CMX270_ETHIRQ,
+               .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE,
+       }
+};
+
+static struct dm9000_plat_data cmx270_dm9000_platdata = {
+       .flags          = DM9000_PLATF_32BITONLY,
+};
+
+static struct platform_device cmx2xx_dm9000_device = {
+       .name           = "dm9000",
+       .id             = 0,
+       .num_resources  = ARRAY_SIZE(cmx270_dm9000_resource),
+       .dev            = {
+               .platform_data = &cmx270_dm9000_platdata,
+       }
+};
+
+static void __init cmx2xx_init_dm9000(void)
+{
+       if (cpu_is_pxa25x())
+               cmx2xx_dm9000_device.resource = cmx255_dm9000_resource;
+       else
+               cmx2xx_dm9000_device.resource = cmx270_dm9000_resource;
+       platform_device_register(&cmx2xx_dm9000_device);
+}
+#else
+static inline void cmx2xx_init_dm9000(void) {}
+#endif
+
+/* UCB1400 touchscreen controller */
+#if defined(CONFIG_TOUCHSCREEN_UCB1400) || defined(CONFIG_TOUCHSCREEN_UCB1400_MODULE)
+static struct platform_device cmx2xx_ts_device = {
+       .name           = "ucb1400_ts",
+       .id             = -1,
+};
+
+static void __init cmx2xx_init_touchscreen(void)
+{
+       platform_device_register(&cmx2xx_ts_device);
+}
+#else
+static inline void cmx2xx_init_touchscreen(void) {}
+#endif
+
+/* CM-X270 LEDs */
+#if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE)
+static struct gpio_led cmx2xx_leds[] = {
+       [0] = {
+               .name = "cm-x2xx:red",
+               .default_trigger = "nand-disk",
+               .active_low = 1,
+       },
+       [1] = {
+               .name = "cm-x2xx:green",
+               .default_trigger = "heartbeat",
+               .active_low = 1,
+       },
+};
+
+static struct gpio_led_platform_data cmx2xx_gpio_led_pdata = {
+       .num_leds = ARRAY_SIZE(cmx2xx_leds),
+       .leds = cmx2xx_leds,
+};
+
+static struct platform_device cmx2xx_led_device = {
+       .name           = "leds-gpio",
+       .id             = -1,
+       .dev            = {
+               .platform_data = &cmx2xx_gpio_led_pdata,
+       },
+};
+
+static void __init cmx2xx_init_leds(void)
+{
+       if (cpu_is_pxa25x()) {
+               cmx2xx_leds[0].gpio = CMX255_GPIO_RED;
+               cmx2xx_leds[1].gpio = CMX255_GPIO_GREEN;
+       } else {
+               cmx2xx_leds[0].gpio = CMX270_GPIO_RED;
+               cmx2xx_leds[1].gpio = CMX270_GPIO_GREEN;
+       }
+       platform_device_register(&cmx2xx_led_device);
+}
+#else
+static inline void cmx2xx_init_leds(void) {}
+#endif
+
+#if defined(CONFIG_FB_PXA) || defined(CONFIG_FB_PXA_MODULE)
+/*
+  Display definitions
+  keep these for backwards compatibility, although symbolic names (as
+  e.g. in lpd270.c) looks better
+*/
+#define MTYPE_STN320x240       0
+#define MTYPE_TFT640x480       1
+#define MTYPE_CRT640x480       2
+#define MTYPE_CRT800x600       3
+#define MTYPE_TFT320x240       6
+#define MTYPE_STN640x480       7
+
+static struct pxafb_mode_info generic_stn_320x240_mode = {
+       .pixclock       = 76923,
+       .bpp            = 8,
+       .xres           = 320,
+       .yres           = 240,
+       .hsync_len      = 3,
+       .vsync_len      = 2,
+       .left_margin    = 3,
+       .upper_margin   = 0,
+       .right_margin   = 3,
+       .lower_margin   = 0,
+       .sync           = (FB_SYNC_HOR_HIGH_ACT |
+                          FB_SYNC_VERT_HIGH_ACT),
+       .cmap_greyscale = 0,
+};
+
+static struct pxafb_mach_info generic_stn_320x240 = {
+       .modes          = &generic_stn_320x240_mode,
+       .num_modes      = 1,
+       .lccr0          = 0,
+       .lccr3          = (LCCR3_PixClkDiv(0x03) |
+                          LCCR3_Acb(0xff) |
+                          LCCR3_PCP),
+       .cmap_inverse   = 0,
+       .cmap_static    = 0,
+};
+
+static struct pxafb_mode_info generic_tft_640x480_mode = {
+       .pixclock       = 38461,
+       .bpp            = 8,
+       .xres           = 640,
+       .yres           = 480,
+       .hsync_len      = 60,
+       .vsync_len      = 2,
+       .left_margin    = 70,
+       .upper_margin   = 10,
+       .right_margin   = 70,
+       .lower_margin   = 5,
+       .sync           = 0,
+       .cmap_greyscale = 0,
+};
+
+static struct pxafb_mach_info generic_tft_640x480 = {
+       .modes          = &generic_tft_640x480_mode,
+       .num_modes      = 1,
+       .lccr0          = (LCCR0_PAS),
+       .lccr3          = (LCCR3_PixClkDiv(0x01) |
+                          LCCR3_Acb(0xff) |
+                          LCCR3_PCP),
+       .cmap_inverse   = 0,
+       .cmap_static    = 0,
+};
+
+static struct pxafb_mode_info generic_crt_640x480_mode = {
+       .pixclock       = 38461,
+       .bpp            = 8,
+       .xres           = 640,
+       .yres           = 480,
+       .hsync_len      = 63,
+       .vsync_len      = 2,
+       .left_margin    = 81,
+       .upper_margin   = 33,
+       .right_margin   = 16,
+       .lower_margin   = 10,
+       .sync           = (FB_SYNC_HOR_HIGH_ACT |
+                          FB_SYNC_VERT_HIGH_ACT),
+       .cmap_greyscale = 0,
+};
+
+static struct pxafb_mach_info generic_crt_640x480 = {
+       .modes          = &generic_crt_640x480_mode,
+       .num_modes      = 1,
+       .lccr0          = (LCCR0_PAS),
+       .lccr3          = (LCCR3_PixClkDiv(0x01) |
+                          LCCR3_Acb(0xff)),
+       .cmap_inverse   = 0,
+       .cmap_static    = 0,
+};
+
+static struct pxafb_mode_info generic_crt_800x600_mode = {
+       .pixclock       = 28846,
+       .bpp            = 8,
+       .xres           = 800,
+       .yres           = 600,
+       .hsync_len      = 63,
+       .vsync_len      = 2,
+       .left_margin    = 26,
+       .upper_margin   = 21,
+       .right_margin   = 26,
+       .lower_margin   = 11,
+       .sync           = (FB_SYNC_HOR_HIGH_ACT |
+                          FB_SYNC_VERT_HIGH_ACT),
+       .cmap_greyscale = 0,
+};
+
+static struct pxafb_mach_info generic_crt_800x600 = {
+       .modes          = &generic_crt_800x600_mode,
+       .num_modes      = 1,
+       .lccr0          = (LCCR0_PAS),
+       .lccr3          = (LCCR3_PixClkDiv(0x02) |
+                          LCCR3_Acb(0xff)),
+       .cmap_inverse   = 0,
+       .cmap_static    = 0,
+};
+
+static struct pxafb_mode_info generic_tft_320x240_mode = {
+       .pixclock       = 134615,
+       .bpp            = 16,
+       .xres           = 320,
+       .yres           = 240,
+       .hsync_len      = 63,
+       .vsync_len      = 7,
+       .left_margin    = 75,
+       .upper_margin   = 0,
+       .right_margin   = 15,
+       .lower_margin   = 15,
+       .sync           = 0,
+       .cmap_greyscale = 0,
+};
+
+static struct pxafb_mach_info generic_tft_320x240 = {
+       .modes          = &generic_tft_320x240_mode,
+       .num_modes      = 1,
+       .lccr0          = (LCCR0_PAS),
+       .lccr3          = (LCCR3_PixClkDiv(0x06) |
+                          LCCR3_Acb(0xff) |
+                          LCCR3_PCP),
+       .cmap_inverse   = 0,
+       .cmap_static    = 0,
+};
+
+static struct pxafb_mode_info generic_stn_640x480_mode = {
+       .pixclock       = 57692,
+       .bpp            = 8,
+       .xres           = 640,
+       .yres           = 480,
+       .hsync_len      = 4,
+       .vsync_len      = 2,
+       .left_margin    = 10,
+       .upper_margin   = 5,
+       .right_margin   = 10,
+       .lower_margin   = 5,
+       .sync           = (FB_SYNC_HOR_HIGH_ACT |
+                          FB_SYNC_VERT_HIGH_ACT),
+       .cmap_greyscale = 0,
+};
+
+static struct pxafb_mach_info generic_stn_640x480 = {
+       .modes          = &generic_stn_640x480_mode,
+       .num_modes      = 1,
+       .lccr0          = 0,
+       .lccr3          = (LCCR3_PixClkDiv(0x02) |
+                          LCCR3_Acb(0xff)),
+       .cmap_inverse   = 0,
+       .cmap_static    = 0,
+};
+
+static struct pxafb_mach_info *cmx2xx_display = &generic_crt_640x480;
+
+static int __init cmx2xx_set_display(char *str)
+{
+       int disp_type = simple_strtol(str, NULL, 0);
+       switch (disp_type) {
+       case MTYPE_STN320x240:
+               cmx2xx_display = &generic_stn_320x240;
+               break;
+       case MTYPE_TFT640x480:
+               cmx2xx_display = &generic_tft_640x480;
+               break;
+       case MTYPE_CRT640x480:
+               cmx2xx_display = &generic_crt_640x480;
+               break;
+       case MTYPE_CRT800x600:
+               cmx2xx_display = &generic_crt_800x600;
+               break;
+       case MTYPE_TFT320x240:
+               cmx2xx_display = &generic_tft_320x240;
+               break;
+       case MTYPE_STN640x480:
+               cmx2xx_display = &generic_stn_640x480;
+               break;
+       default: /* fallback to CRT 640x480 */
+               cmx2xx_display = &generic_crt_640x480;
+               break;
+       }
+       return 1;
+}
+
+/*
+   This should be done really early to get proper configuration for
+   frame buffer.
+   Indeed, pxafb parameters can be used istead, but CM-X2XX bootloader
+   has limitied line length for kernel command line, and also it will
+   break compatibitlty with proprietary releases already in field.
+*/
+__setup("monitor=", cmx2xx_set_display);
+
+static void __init cmx2xx_init_display(void)
+{
+       set_pxa_fb_info(cmx2xx_display);
+}
+#else
+static inline void cmx2xx_init_display(void) {}
+#endif
+
+#ifdef CONFIG_PM
+static unsigned long sleep_save_msc[10];
+
+static int cmx2xx_suspend(struct sys_device *dev, pm_message_t state)
+{
+       cmx2xx_pci_suspend();
+
+       /* save MSC registers */
+       sleep_save_msc[0] = MSC0;
+       sleep_save_msc[1] = MSC1;
+       sleep_save_msc[2] = MSC2;
+
+       /* setup power saving mode registers */
+       PCFR = 0x0;
+       PSLR = 0xff400000;
+       PMCR  = 0x00000005;
+       PWER  = 0x80000000;
+       PFER  = 0x00000000;
+       PRER  = 0x00000000;
+       PGSR0 = 0xC0018800;
+       PGSR1 = 0x004F0002;
+       PGSR2 = 0x6021C000;
+       PGSR3 = 0x00020000;
+
+       return 0;
+}
+
+static int cmx2xx_resume(struct sys_device *dev)
+{
+       cmx2xx_pci_resume();
+
+       /* restore MSC registers */
+       MSC0 = sleep_save_msc[0];
+       MSC1 = sleep_save_msc[1];
+       MSC2 = sleep_save_msc[2];
+
+       return 0;
+}
+
+static struct sysdev_class cmx2xx_pm_sysclass = {
+       .name = "pm",
+       .resume = cmx2xx_resume,
+       .suspend = cmx2xx_suspend,
+};
+
+static struct sys_device cmx2xx_pm_device = {
+       .cls = &cmx2xx_pm_sysclass,
+};
+
+static int __init cmx2xx_pm_init(void)
+{
+       int error;
+       error = sysdev_class_register(&cmx2xx_pm_sysclass);
+       if (error == 0)
+               error = sysdev_register(&cmx2xx_pm_device);
+       return error;
+}
+#else
+static int __init cmx2xx_pm_init(void) { return 0; }
+#endif
+
+#if defined(CONFIG_SND_PXA2XX_AC97) || defined(CONFIG_SND_PXA2XX_AC97_MODULE)
+static void __init cmx2xx_init_ac97(void)
+{
+       pxa_set_ac97_info(NULL);
+}
+#else
+static inline void cmx2xx_init_ac97(void) {}
+#endif
+
+static void __init cmx2xx_init(void)
+{
+       cmx2xx_pm_init();
+
+       if (cpu_is_pxa25x())
+               cmx255_init();
+       else
+               cmx270_init();
+
+       cmx2xx_init_dm9000();
+       cmx2xx_init_display();
+       cmx2xx_init_ac97();
+       cmx2xx_init_touchscreen();
+       cmx2xx_init_leds();
+}
+
+static void __init cmx2xx_init_irq(void)
+{
+       pxa27x_init_irq();
+
+       if (cpu_is_pxa25x()) {
+               pxa25x_init_irq();
+               cmx2xx_pci_init_irq(CMX255_GPIO_IT8152_IRQ);
+       } else {
+               pxa27x_init_irq();
+               cmx2xx_pci_init_irq(CMX270_GPIO_IT8152_IRQ);
+       }
+}
+
+#ifdef CONFIG_PCI
+/* Map PCI companion statically */
+static struct map_desc cmx2xx_io_desc[] __initdata = {
+       [0] = { /* PCI bridge */
+               .virtual        = CMX2XX_IT8152_VIRT,
+               .pfn            = __phys_to_pfn(PXA_CS4_PHYS),
+               .length         = SZ_64M,
+               .type           = MT_DEVICE
+       },
+};
+
+static void __init cmx2xx_map_io(void)
+{
+       pxa_map_io();
+       iotable_init(cmx2xx_io_desc, ARRAY_SIZE(cmx2xx_io_desc));
+
+       it8152_base_address = CMX2XX_IT8152_VIRT;
+}
+#else
+static void __init cmx2xx_map_io(void)
+{
+       pxa_map_io();
+}
+#endif
+
+MACHINE_START(ARMCORE, "Compulab CM-X2XX")
+       .boot_params    = 0xa0000100,
+       .phys_io        = 0x40000000,
+       .io_pg_offst    = (io_p2v(0x40000000) >> 18) & 0xfffc,
+       .map_io         = cmx2xx_map_io,
+       .init_irq       = cmx2xx_init_irq,
+       .timer          = &pxa_timer,
+       .init_machine   = cmx2xx_init,
+MACHINE_END
diff --git a/arch/arm/mach-pxa/cm-x300.c b/arch/arm/mach-pxa/cm-x300.c
new file mode 100644 (file)
index 0000000..deb46cd
--- /dev/null
@@ -0,0 +1,465 @@
+/*
+ * linux/arch/arm/mach-pxa/cm-x300.c
+ *
+ * Support for the CompuLab CM-X300 modules
+ *
+ * Copyright (C) 2008 CompuLab Ltd.
+ *
+ * Mike Rapoport <mike@compulab.co.il>
+ *
+ * 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/module.h>
+#include <linux/kernel.h>
+#include <linux/interrupt.h>
+#include <linux/init.h>
+#include <linux/platform_device.h>
+
+#include <linux/gpio.h>
+#include <linux/dm9000.h>
+#include <linux/leds.h>
+
+#include <linux/i2c.h>
+#include <linux/i2c/pca953x.h>
+
+#include <asm/mach-types.h>
+#include <asm/mach/arch.h>
+
+#include <mach/mfp-pxa300.h>
+
+#include <mach/hardware.h>
+#include <mach/gpio.h>
+#include <mach/pxafb.h>
+#include <mach/mmc.h>
+#include <mach/ohci.h>
+#include <mach/i2c.h>
+#include <mach/pxa3xx_nand.h>
+
+#include <asm/mach/map.h>
+
+#include "generic.h"
+
+#define CM_X300_ETH_PHYS       0x08000010
+
+#define GPIO82_MMC2_IRQ                (82)
+#define GPIO85_MMC2_WP         (85)
+
+#define        CM_X300_MMC2_IRQ        IRQ_GPIO(GPIO82_MMC2_IRQ)
+
+static mfp_cfg_t cm_x300_mfp_cfg[] __initdata = {
+       /* LCD */
+       GPIO54_LCD_LDD_0,
+       GPIO55_LCD_LDD_1,
+       GPIO56_LCD_LDD_2,
+       GPIO57_LCD_LDD_3,
+       GPIO58_LCD_LDD_4,
+       GPIO59_LCD_LDD_5,
+       GPIO60_LCD_LDD_6,
+       GPIO61_LCD_LDD_7,
+       GPIO62_LCD_LDD_8,
+       GPIO63_LCD_LDD_9,
+       GPIO64_LCD_LDD_10,
+       GPIO65_LCD_LDD_11,
+       GPIO66_LCD_LDD_12,
+       GPIO67_LCD_LDD_13,
+       GPIO68_LCD_LDD_14,
+       GPIO69_LCD_LDD_15,
+       GPIO72_LCD_FCLK,
+       GPIO73_LCD_LCLK,
+       GPIO74_LCD_PCLK,
+       GPIO75_LCD_BIAS,
+
+       /* BTUART */
+       GPIO111_UART2_RTS,
+       GPIO112_UART2_RXD | MFP_LPM_EDGE_FALL,
+       GPIO113_UART2_TXD,
+       GPIO114_UART2_CTS | MFP_LPM_EDGE_BOTH,
+
+       /* STUART */
+       GPIO109_UART3_TXD,
+       GPIO110_UART3_RXD | MFP_LPM_EDGE_FALL,
+
+       /* AC97 */
+       GPIO23_AC97_nACRESET,
+       GPIO24_AC97_SYSCLK,
+       GPIO29_AC97_BITCLK,
+       GPIO25_AC97_SDATA_IN_0,
+       GPIO27_AC97_SDATA_OUT,
+       GPIO28_AC97_SYNC,
+
+       /* Keypad */
+       GPIO115_KP_MKIN_0 | MFP_LPM_EDGE_BOTH,
+       GPIO116_KP_MKIN_1 | MFP_LPM_EDGE_BOTH,
+       GPIO117_KP_MKIN_2 | MFP_LPM_EDGE_BOTH,
+       GPIO118_KP_MKIN_3 | MFP_LPM_EDGE_BOTH,
+       GPIO119_KP_MKIN_4 | MFP_LPM_EDGE_BOTH,
+       GPIO120_KP_MKIN_5 | MFP_LPM_EDGE_BOTH,
+       GPIO2_2_KP_MKIN_6 | MFP_LPM_EDGE_BOTH,
+       GPIO3_2_KP_MKIN_7 | MFP_LPM_EDGE_BOTH,
+       GPIO121_KP_MKOUT_0,
+       GPIO122_KP_MKOUT_1,
+       GPIO123_KP_MKOUT_2,
+       GPIO124_KP_MKOUT_3,
+       GPIO125_KP_MKOUT_4,
+       GPIO4_2_KP_MKOUT_5,
+
+       /* MMC1 */
+       GPIO3_MMC1_DAT0,
+       GPIO4_MMC1_DAT1 | MFP_LPM_EDGE_BOTH,
+       GPIO5_MMC1_DAT2,
+       GPIO6_MMC1_DAT3,
+       GPIO7_MMC1_CLK,
+       GPIO8_MMC1_CMD, /* CMD0 for slot 0 */
+
+       /* MMC2 */
+       GPIO9_MMC2_DAT0,
+       GPIO10_MMC2_DAT1 | MFP_LPM_EDGE_BOTH,
+       GPIO11_MMC2_DAT2,
+       GPIO12_MMC2_DAT3,
+       GPIO13_MMC2_CLK,
+       GPIO14_MMC2_CMD,
+
+       /* FFUART */
+       GPIO30_UART1_RXD | MFP_LPM_EDGE_FALL,
+       GPIO31_UART1_TXD,
+       GPIO32_UART1_CTS,
+       GPIO37_UART1_RTS,
+       GPIO33_UART1_DCD,
+       GPIO34_UART1_DSR | MFP_LPM_EDGE_FALL,
+       GPIO35_UART1_RI,
+       GPIO36_UART1_DTR,
+
+       /* GPIOs */
+       GPIO79_GPIO,                    /* LED */
+       GPIO82_GPIO | MFP_PULL_HIGH,    /* MMC CD */
+       GPIO85_GPIO,                    /* MMC WP */
+       GPIO99_GPIO,                    /* Ethernet IRQ */
+};
+
+#if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE)
+static struct resource dm9000_resources[] = {
+       [0] = {
+               .start  = CM_X300_ETH_PHYS,
+               .end    = CM_X300_ETH_PHYS + 0x3,
+               .flags  = IORESOURCE_MEM,
+       },
+       [1] = {
+               .start  = CM_X300_ETH_PHYS + 0x4,
+               .end    = CM_X300_ETH_PHYS + 0x4 + 500,
+               .flags  = IORESOURCE_MEM,
+       },
+       [2] = {
+               .start  = IRQ_GPIO(mfp_to_gpio(MFP_PIN_GPIO99)),
+               .end    = IRQ_GPIO(mfp_to_gpio(MFP_PIN_GPIO99)),
+               .flags  = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE,
+       }
+};
+
+static struct dm9000_plat_data cm_x300_dm9000_platdata = {
+       .flags          = DM9000_PLATF_16BITONLY,
+};
+
+static struct platform_device dm9000_device = {
+       .name           = "dm9000",
+       .id             = 0,
+       .num_resources  = ARRAY_SIZE(dm9000_resources),
+       .resource       = dm9000_resources,
+       .dev            = {
+               .platform_data = &cm_x300_dm9000_platdata,
+       }
+
+};
+
+static void __init cm_x300_init_dm9000(void)
+{
+       platform_device_register(&dm9000_device);
+}
+#else
+static inline void cm_x300_init_dm9000(void) {}
+#endif
+
+#if defined(CONFIG_FB_PXA) || defined(CONFIG_FB_PXA_MODULE)
+static struct pxafb_mode_info cm_x300_lcd_modes[] = {
+       [0] = {
+               .pixclock       = 38000,
+               .bpp            = 16,
+               .xres           = 480,
+               .yres           = 640,
+               .hsync_len      = 8,
+               .vsync_len      = 2,
+               .left_margin    = 8,
+               .upper_margin   = 0,
+               .right_margin   = 24,
+               .lower_margin   = 4,
+               .cmap_greyscale = 0,
+       },
+       [1] = {
+               .pixclock       = 153800,
+               .bpp            = 16,
+               .xres           = 240,
+               .yres           = 320,
+               .hsync_len      = 8,
+               .vsync_len      = 2,
+               .left_margin    = 8,
+               .upper_margin   = 2,
+               .right_margin   = 88,
+               .lower_margin   = 2,
+               .cmap_greyscale = 0,
+       },
+};
+
+static struct pxafb_mach_info cm_x300_lcd = {
+       .modes                  = cm_x300_lcd_modes,
+       .num_modes              = 2,
+       .lcd_conn               = LCD_COLOR_TFT_16BPP | LCD_PCLK_EDGE_FALL,
+};
+
+static void __init cm_x300_init_lcd(void)
+{
+       set_pxa_fb_info(&cm_x300_lcd);
+}
+#else
+static inline void cm_x300_init_lcd(void) {}
+#endif
+
+#if defined(CONFIG_MTD_NAND_PXA3xx) || defined(CONFIG_MTD_NAND_PXA3xx_MODULE)
+static struct mtd_partition cm_x300_nand_partitions[] = {
+       [0] = {
+               .name        = "OBM",
+               .offset      = 0,
+               .size        = SZ_256K,
+               .mask_flags  = MTD_WRITEABLE, /* force read-only */
+       },
+       [1] = {
+               .name        = "U-Boot",
+               .offset      = MTDPART_OFS_APPEND,
+               .size        = SZ_256K,
+               .mask_flags  = MTD_WRITEABLE, /* force read-only */
+       },
+       [2] = {
+               .name        = "Environment",
+               .offset      = MTDPART_OFS_APPEND,
+               .size        = SZ_256K,
+       },
+       [3] = {
+               .name        = "reserved",
+               .offset      = MTDPART_OFS_APPEND,
+               .size        = SZ_256K + SZ_1M,
+               .mask_flags  = MTD_WRITEABLE, /* force read-only */
+       },
+       [4] = {
+               .name        = "kernel",
+               .offset      = MTDPART_OFS_APPEND,
+               .size        = SZ_4M,
+       },
+       [5] = {
+               .name        = "fs",
+               .offset      = MTDPART_OFS_APPEND,
+               .size        = MTDPART_SIZ_FULL,
+       },
+};
+
+static struct pxa3xx_nand_platform_data cm_x300_nand_info = {
+       .enable_arbiter = 1,
+       .parts          = cm_x300_nand_partitions,
+       .nr_parts       = ARRAY_SIZE(cm_x300_nand_partitions),
+};
+
+static void __init cm_x300_init_nand(void)
+{
+       pxa3xx_set_nand_info(&cm_x300_nand_info);
+}
+#else
+static inline void cm_x300_init_nand(void) {}
+#endif
+
+#if defined(CONFIG_MMC) || defined(CONFIG_MMC_MODULE)
+/* The first MMC slot of CM-X300 is hardwired to Libertas card and has
+   no detection/ro pins */
+static int cm_x300_mci_init(struct device *dev,
+                           irq_handler_t cm_x300_detect_int,
+                           void *data)
+{
+       return 0;
+}
+
+static void cm_x300_mci_exit(struct device *dev, void *data)
+{
+}
+
+static struct pxamci_platform_data cm_x300_mci_platform_data = {
+       .detect_delay   = 20,
+       .ocr_mask       = MMC_VDD_32_33|MMC_VDD_33_34,
+       .init           = cm_x300_mci_init,
+       .exit           = cm_x300_mci_exit,
+};
+
+static int cm_x300_mci2_ro(struct device *dev)
+{
+       return gpio_get_value(GPIO85_MMC2_WP);
+}
+
+static int cm_x300_mci2_init(struct device *dev,
+                            irq_handler_t cm_x300_detect_int,
+                            void *data)
+{
+       int err;
+
+       /*
+        * setup GPIO for CM-X300 MMC controller
+        */
+       err = gpio_request(GPIO82_MMC2_IRQ, "mmc card detect");
+       if (err)
+               goto err_request_cd;
+       gpio_direction_input(GPIO82_MMC2_IRQ);
+
+       err = gpio_request(GPIO85_MMC2_WP, "mmc write protect");
+       if (err)
+               goto err_request_wp;
+       gpio_direction_input(GPIO85_MMC2_WP);
+
+       err = request_irq(CM_X300_MMC2_IRQ, cm_x300_detect_int,
+                         IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
+                         "MMC card detect", data);
+       if (err) {
+               printk(KERN_ERR "%s: MMC/SD/SDIO: "
+                               "can't request card detect IRQ\n", __func__);
+               goto err_request_irq;
+       }
+
+       return 0;
+
+err_request_irq:
+       gpio_free(GPIO85_MMC2_WP);
+err_request_wp:
+       gpio_free(GPIO82_MMC2_IRQ);
+err_request_cd:
+       return err;
+}
+
+static void cm_x300_mci2_exit(struct device *dev, void *data)
+{
+       free_irq(CM_X300_MMC2_IRQ, data);
+       gpio_free(GPIO82_MMC2_IRQ);
+       gpio_free(GPIO85_MMC2_WP);
+}
+
+static struct pxamci_platform_data cm_x300_mci2_platform_data = {
+       .detect_delay   = 20,
+       .ocr_mask       = MMC_VDD_32_33|MMC_VDD_33_34,
+       .init           = cm_x300_mci2_init,
+       .exit           = cm_x300_mci2_exit,
+       .get_ro         = cm_x300_mci2_ro,
+};
+
+static void __init cm_x300_init_mmc(void)
+{
+       pxa_set_mci_info(&cm_x300_mci_platform_data);
+       pxa3xx_set_mci2_info(&cm_x300_mci2_platform_data);
+}
+#else
+static inline void cm_x300_init_mmc(void) {}
+#endif
+
+#if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)
+static struct pxaohci_platform_data cm_x300_ohci_platform_data = {
+       .port_mode      = PMM_PERPORT_MODE,
+       .flags          = ENABLE_PORT1 | ENABLE_PORT2 | POWER_CONTROL_LOW,
+};
+
+static void __init cm_x300_init_ohci(void)
+{
+       pxa_set_ohci_info(&cm_x300_ohci_platform_data);
+}
+#else
+static inline void cm_x300_init_ohci(void) {}
+#endif
+
+#if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE)
+static struct gpio_led cm_x300_leds[] = {
+       [0] = {
+               .name = "cm-x300:green",
+               .default_trigger = "heartbeat",
+               .gpio = 79,
+               .active_low = 1,
+       },
+};
+
+static struct gpio_led_platform_data cm_x300_gpio_led_pdata = {
+       .num_leds = ARRAY_SIZE(cm_x300_leds),
+       .leds = cm_x300_leds,
+};
+
+static struct platform_device cm_x300_led_device = {
+       .name           = "leds-gpio",
+       .id             = -1,
+       .dev            = {
+               .platform_data = &cm_x300_gpio_led_pdata,
+       },
+};
+
+static void __init cm_x300_init_leds(void)
+{
+       platform_device_register(&cm_x300_led_device);
+}
+#else
+static inline void cm_x300_init_leds(void) {}
+#endif
+
+#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
+/* PCA9555 */
+static struct pca953x_platform_data cm_x300_gpio_ext_pdata_0 = {
+       .gpio_base = 128,
+};
+
+static struct pca953x_platform_data cm_x300_gpio_ext_pdata_1 = {
+       .gpio_base = 144,
+};
+
+static struct i2c_board_info cm_x300_gpio_ext_info[] = {
+       [0] = {
+               I2C_BOARD_INFO("pca9555", 0x24),
+               .platform_data = &cm_x300_gpio_ext_pdata_0,
+       },
+       [1] = {
+               I2C_BOARD_INFO("pca9555", 0x25),
+               .platform_data = &cm_x300_gpio_ext_pdata_1,
+       },
+};
+
+static void __init cm_x300_init_i2c(void)
+{
+       pxa_set_i2c_info(NULL);
+       i2c_register_board_info(0, cm_x300_gpio_ext_info,
+                               ARRAY_SIZE(cm_x300_gpio_ext_info));
+}
+#else
+static inline void cm_x300_init_i2c(void) {}
+#endif
+
+static void __init cm_x300_init(void)
+{
+       /* board-processor specific GPIO initialization */
+       pxa3xx_mfp_config(ARRAY_AND_SIZE(cm_x300_mfp_cfg));
+
+       cm_x300_init_dm9000();
+       cm_x300_init_lcd();
+       cm_x300_init_ohci();
+       cm_x300_init_mmc();
+       cm_x300_init_nand();
+       cm_x300_init_leds();
+       cm_x300_init_i2c();
+}
+
+MACHINE_START(CM_X300, "CM-X300 module")
+       .phys_io        = 0x40000000,
+       .boot_params    = 0xa0000100,
+       .io_pg_offst    = (io_p2v(0x40000000) >> 18) & 0xfffc,
+       .map_io         = pxa_map_io,
+       .init_irq       = pxa3xx_init_irq,
+       .timer          = &pxa_timer,
+       .init_machine   = cm_x300_init,
+MACHINE_END
index abce13c846c5e4c8315a830df7aa05681d598323..e8473624427eed4ad613466b20398c14fcf062a0 100644 (file)
 #include <asm/mach/irq.h>
 #include <asm/mach/flash.h>
 #include <mach/pxa-regs.h>
-#include <mach/pxa2xx-gpio.h>
+#include <mach/mfp-pxa27x.h>
 #include <mach/colibri.h>
 
 #include "generic.h"
 #include "devices.h"
 
+static unsigned long colibri_pin_config[] __initdata = {
+       GPIO78_nCS_2,   /* Ethernet CS */
+       GPIO114_GPIO,   /* Ethernet IRQ */
+};
+
 /*
  * Flash
  */
@@ -116,9 +121,7 @@ static struct platform_device *colibri_devices[] __initdata = {
 
 static void __init colibri_init(void)
 {
-       /* DM9000 LAN */
-       pxa_gpio_mode(GPIO78_nCS_2_MD);
-       pxa_gpio_mode(GPIO_DM9000 | GPIO_IN);
+       pxa2xx_mfp_config(ARRAY_AND_SIZE(colibri_pin_config));
 
        platform_add_devices(colibri_devices, ARRAY_SIZE(colibri_devices));
 }
index e703a8d209e243d87410b2bde4f520ac5bd75769..65558d6aa220d396e1e10c350ae5ebbc679f53bf 100644 (file)
 #include <linux/interrupt.h>
 #include <linux/mmc/host.h>
 #include <linux/pm.h>
+#include <linux/gpio.h>
 #include <linux/backlight.h>
+#include <linux/io.h>
+#include <linux/spi/spi.h>
+#include <linux/spi/ads7846.h>
+#include <linux/spi/corgi_lcd.h>
 #include <video/w100fb.h>
 
 #include <asm/setup.h>
@@ -28,7 +33,6 @@
 #include <asm/mach-types.h>
 #include <mach/hardware.h>
 #include <asm/irq.h>
-#include <asm/io.h>
 #include <asm/system.h>
 
 #include <asm/mach/arch.h>
 
 #include <mach/pxa-regs.h>
 #include <mach/pxa2xx-regs.h>
-#include <mach/pxa2xx-gpio.h>
+#include <mach/mfp-pxa25x.h>
 #include <mach/i2c.h>
 #include <mach/irda.h>
 #include <mach/mmc.h>
 #include <mach/udc.h>
+#include <mach/pxa2xx_spi.h>
 #include <mach/corgi.h>
 #include <mach/sharpsl.h>
 
 #include "devices.h"
 #include "sharpsl.h"
 
+static unsigned long corgi_pin_config[] __initdata = {
+       /* Static Memory I/O */
+       GPIO78_nCS_2,   /* w100fb */
+       GPIO80_nCS_4,   /* scoop */
+
+       /* SSP1 */
+       GPIO23_SSP1_SCLK,
+       GPIO25_SSP1_TXD,
+       GPIO26_SSP1_RXD,
+       GPIO24_GPIO,    /* CORGI_GPIO_ADS7846_CS - SFRM as chip select */
+
+       /* I2S */
+       GPIO28_I2S_BITCLK_OUT,
+       GPIO29_I2S_SDATA_IN,
+       GPIO30_I2S_SDATA_OUT,
+       GPIO31_I2S_SYNC,
+       GPIO32_I2S_SYSCLK,
+
+       /* Infra-Red */
+       GPIO47_FICP_TXD,
+       GPIO46_FICP_RXD,
+
+       /* FFUART */
+       GPIO40_FFUART_DTR,
+       GPIO41_FFUART_RTS,
+       GPIO39_FFUART_TXD,
+       GPIO37_FFUART_DSR,
+       GPIO34_FFUART_RXD,
+       GPIO35_FFUART_CTS,
+
+       /* PC Card */
+       GPIO48_nPOE,
+       GPIO49_nPWE,
+       GPIO50_nPIOR,
+       GPIO51_nPIOW,
+       GPIO52_nPCE_1,
+       GPIO53_nPCE_2,
+       GPIO54_nPSKTSEL,
+       GPIO55_nPREG,
+       GPIO56_nPWAIT,
+       GPIO57_nIOIS16,
+
+       /* MMC */
+       GPIO6_MMC_CLK,
+       GPIO8_MMC_CS0,
+
+       /* GPIO */
+       GPIO9_GPIO,     /* CORGI_GPIO_nSD_DETECT */
+       GPIO7_GPIO,     /* CORGI_GPIO_nSD_WP */
+       GPIO33_GPIO,    /* CORGI_GPIO_SD_PWR */
+       GPIO22_GPIO,    /* CORGI_GPIO_IR_ON */
+       GPIO44_GPIO,    /* CORGI_GPIO_HSYNC */
+
+       GPIO1_GPIO | WAKEUP_ON_EDGE_RISE,
+};
 
 /*
  * Corgi SCOOP Device
@@ -67,6 +127,7 @@ static struct resource corgi_scoop_resources[] = {
 static struct scoop_config corgi_scoop_setup = {
        .io_dir         = CORGI_SCOOP_IO_DIR,
        .io_out         = CORGI_SCOOP_IO_OUT,
+       .gpio_base      = CORGI_SCOOP_GPIO_BASE,
 };
 
 struct platform_device corgiscoop_device = {
@@ -79,27 +140,6 @@ struct platform_device corgiscoop_device = {
        .resource       = corgi_scoop_resources,
 };
 
-static void corgi_pcmcia_init(void)
-{
-       /* Setup default state of GPIO outputs
-          before we enable them as outputs. */
-       GPSR(GPIO48_nPOE) = GPIO_bit(GPIO48_nPOE) |
-               GPIO_bit(GPIO49_nPWE) | GPIO_bit(GPIO50_nPIOR) |
-               GPIO_bit(GPIO51_nPIOW) | GPIO_bit(GPIO52_nPCE_1) |
-               GPIO_bit(GPIO53_nPCE_2);
-
-       pxa_gpio_mode(GPIO48_nPOE_MD);
-       pxa_gpio_mode(GPIO49_nPWE_MD);
-       pxa_gpio_mode(GPIO50_nPIOR_MD);
-       pxa_gpio_mode(GPIO51_nPIOW_MD);
-       pxa_gpio_mode(GPIO55_nPREG_MD);
-       pxa_gpio_mode(GPIO56_nPWAIT_MD);
-       pxa_gpio_mode(GPIO57_nIOIS16_MD);
-       pxa_gpio_mode(GPIO52_nPCE_1_MD);
-       pxa_gpio_mode(GPIO53_nPCE_2_MD);
-       pxa_gpio_mode(GPIO54_pSKTSEL_MD);
-}
-
 static struct scoop_pcmcia_dev corgi_pcmcia_scoop[] = {
 {
        .dev        = &corgiscoop_device.dev,
@@ -112,58 +152,10 @@ static struct scoop_pcmcia_dev corgi_pcmcia_scoop[] = {
 static struct scoop_pcmcia_config corgi_pcmcia_config = {
        .devs         = &corgi_pcmcia_scoop[0],
        .num_devs     = 1,
-       .pcmcia_init  = corgi_pcmcia_init,
 };
 
 EXPORT_SYMBOL(corgiscoop_device);
 
-
-/*
- * Corgi SSP Device
- *
- * Set the parent as the scoop device because a lot of SSP devices
- * also use scoop functions and this makes the power up/down order
- * work correctly.
- */
-struct platform_device corgissp_device = {
-       .name           = "corgi-ssp",
-       .dev            = {
-               .parent = &corgiscoop_device.dev,
-       },
-       .id             = -1,
-};
-
-struct corgissp_machinfo corgi_ssp_machinfo = {
-       .port           = 1,
-       .cs_lcdcon      = CORGI_GPIO_LCDCON_CS,
-       .cs_ads7846     = CORGI_GPIO_ADS7846_CS,
-       .cs_max1111     = CORGI_GPIO_MAX1111_CS,
-       .clk_lcdcon     = 76,
-       .clk_ads7846    = 2,
-       .clk_max1111    = 8,
-};
-
-
-/*
- * LCD/Framebuffer
- */
-static void w100_lcdtg_suspend(struct w100fb_par *par)
-{
-       corgi_lcdtg_suspend();
-}
-
-static void w100_lcdtg_init(struct w100fb_par *par)
-{
-       corgi_lcdtg_hw_init(par->xres);
-}
-
-
-static struct w100_tg_info corgi_lcdtg_info = {
-       .change  = w100_lcdtg_init,
-       .suspend = w100_lcdtg_suspend,
-       .resume  = w100_lcdtg_init,
-};
-
 static struct w100_mem_info corgi_fb_mem = {
        .ext_cntl          = 0x00040003,
        .sdram_mode_reg    = 0x00650021,
@@ -242,7 +234,6 @@ static struct w100_mode corgi_fb_modes[] = {
 };
 
 static struct w100fb_mach_info corgi_fb_info = {
-       .tg         = &corgi_lcdtg_info,
        .init_mode  = INIT_MODE_ROTATED,
        .mem        = &corgi_fb_mem,
        .regs       = &corgi_fb_regs,
@@ -268,60 +259,10 @@ static struct platform_device corgifb_device = {
        .resource       = corgi_fb_resources,
        .dev            = {
                .platform_data = &corgi_fb_info,
-               .parent = &corgissp_device.dev,
        },
 
 };
 
-
-/*
- * Corgi Backlight Device
- */
-static void corgi_bl_kick_battery(void)
-{
-       void (*kick_batt)(void);
-
-       kick_batt = symbol_get(sharpsl_battery_kick);
-       if (kick_batt) {
-               kick_batt();
-               symbol_put(sharpsl_battery_kick);
-       }
-}
-
-static void corgi_bl_set_intensity(int intensity)
-{
-       if (intensity > 0x10)
-               intensity += 0x10;
-
-       /* Bits 0-4 are accessed via the SSP interface */
-       corgi_ssp_blduty_set(intensity & 0x1f);
-
-       /* Bit 5 is via SCOOP */
-       if (intensity & 0x0020)
-               set_scoop_gpio(&corgiscoop_device.dev, CORGI_SCP_BACKLIGHT_CONT);
-       else
-               reset_scoop_gpio(&corgiscoop_device.dev, CORGI_SCP_BACKLIGHT_CONT);
-}
-
-static struct generic_bl_info corgi_bl_machinfo = {
-       .name = "corgi-bl",
-       .max_intensity = 0x2f,
-       .default_intensity = 0x1f,
-       .limit_mask = 0x0b,
-       .set_bl_intensity = corgi_bl_set_intensity,
-       .kick_battery = corgi_bl_kick_battery,
-};
-
-static struct platform_device corgibl_device = {
-       .name           = "generic-bl",
-       .dev            = {
-               .parent = &corgifb_device.dev,
-               .platform_data  = &corgi_bl_machinfo,
-       },
-       .id             = -1,
-};
-
-
 /*
  * Corgi Keyboard Device
  */
@@ -330,75 +271,35 @@ static struct platform_device corgikbd_device = {
        .id             = -1,
 };
 
-
 /*
  * Corgi LEDs
  */
-static struct platform_device corgiled_device = {
-       .name           = "corgi-led",
-       .id             = -1,
-};
-
-
-/*
- * Corgi Touch Screen Device
- */
-static unsigned long (*get_hsync_invperiod)(struct device *dev);
-
-static void inline sharpsl_wait_sync(int gpio)
-{
-       while((GPLR(gpio) & GPIO_bit(gpio)) == 0);
-       while((GPLR(gpio) & GPIO_bit(gpio)) != 0);
-}
-
-static unsigned long corgi_get_hsync_invperiod(void)
-{
-       if (!get_hsync_invperiod)
-               get_hsync_invperiod = symbol_get(w100fb_get_hsynclen);
-       if (!get_hsync_invperiod)
-               return 0;
-
-       return get_hsync_invperiod(&corgifb_device.dev);
-}
-
-static void corgi_put_hsync(void)
-{
-       if (get_hsync_invperiod)
-               symbol_put(w100fb_get_hsynclen);
-       get_hsync_invperiod = NULL;
-}
-
-static void corgi_wait_hsync(void)
-{
-       sharpsl_wait_sync(CORGI_GPIO_HSYNC);
-}
-
-static struct resource corgits_resources[] = {
-       [0] = {
-               .start          = CORGI_IRQ_GPIO_TP_INT,
-               .end            = CORGI_IRQ_GPIO_TP_INT,
-               .flags          = IORESOURCE_IRQ,
+static struct gpio_led corgi_gpio_leds[] = {
+       {
+               .name                   = "corgi:amber:charge",
+               .default_trigger        = "sharpsl-charge",
+               .gpio                   = CORGI_GPIO_LED_ORANGE,
+       },
+       {
+               .name                   = "corgi:green:mail",
+               .default_trigger        = "nand-disk",
+               .gpio                   = CORGI_GPIO_LED_GREEN,
        },
 };
 
-static struct corgits_machinfo  corgi_ts_machinfo = {
-       .get_hsync_invperiod = corgi_get_hsync_invperiod,
-       .put_hsync           = corgi_put_hsync,
-       .wait_hsync          = corgi_wait_hsync,
+static struct gpio_led_platform_data corgi_gpio_leds_info = {
+       .leds           = corgi_gpio_leds,
+       .num_leds       = ARRAY_SIZE(corgi_gpio_leds),
 };
 
-static struct platform_device corgits_device = {
-       .name           = "corgi-ts",
+static struct platform_device corgiled_device = {
+       .name           = "leds-gpio",
+       .id             = -1,
        .dev            = {
-               .parent = &corgissp_device.dev,
-               .platform_data  = &corgi_ts_machinfo,
+               .platform_data = &corgi_gpio_leds_info,
        },
-       .id             = -1,
-       .num_resources  = ARRAY_SIZE(corgits_resources),
-       .resource       = corgits_resources,
 };
 
-
 /*
  * MMC/SD Device
  *
@@ -411,20 +312,42 @@ static int corgi_mci_init(struct device *dev, irq_handler_t corgi_detect_int, vo
 {
        int err;
 
-       /* setup GPIO for PXA25x MMC controller */
-       pxa_gpio_mode(GPIO6_MMCCLK_MD);
-       pxa_gpio_mode(GPIO8_MMCCS0_MD);
-       pxa_gpio_mode(CORGI_GPIO_nSD_DETECT | GPIO_IN);
-       pxa_gpio_mode(CORGI_GPIO_SD_PWR | GPIO_OUT);
+       err = gpio_request(CORGI_GPIO_nSD_DETECT, "nSD_DETECT");
+       if (err)
+               goto err_out;
 
-       corgi_mci_platform_data.detect_delay = msecs_to_jiffies(250);
+       err = gpio_request(CORGI_GPIO_nSD_WP, "nSD_WP");
+       if (err)
+               goto err_free_1;
 
-       err = request_irq(CORGI_IRQ_GPIO_nSD_DETECT, corgi_detect_int,
-                         IRQF_DISABLED | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
-                         "MMC card detect", data);
+       err = gpio_request(CORGI_GPIO_SD_PWR, "SD_PWR");
        if (err)
-               printk(KERN_ERR "corgi_mci_init: MMC/SD: can't request MMC card detect IRQ\n");
+               goto err_free_2;
 
+       gpio_direction_input(CORGI_GPIO_nSD_DETECT);
+       gpio_direction_input(CORGI_GPIO_nSD_WP);
+       gpio_direction_output(CORGI_GPIO_SD_PWR, 0);
+
+       corgi_mci_platform_data.detect_delay = msecs_to_jiffies(250);
+
+       err = request_irq(CORGI_IRQ_GPIO_nSD_DETECT, corgi_detect_int,
+                               IRQF_DISABLED | IRQF_TRIGGER_RISING |
+                               IRQF_TRIGGER_FALLING,
+                               "MMC card detect", data);
+       if (err) {
+               pr_err("%s: MMC/SD: can't request MMC card detect IRQ\n",
+                               __func__);
+               goto err_free_3;
+       }
+       return 0;
+
+err_free_3:
+       gpio_free(CORGI_GPIO_SD_PWR);
+err_free_2:
+       gpio_free(CORGI_GPIO_nSD_WP);
+err_free_1:
+       gpio_free(CORGI_GPIO_nSD_DETECT);
+err_out:
        return err;
 }
 
@@ -432,20 +355,20 @@ static void corgi_mci_setpower(struct device *dev, unsigned int vdd)
 {
        struct pxamci_platform_data* p_d = dev->platform_data;
 
-       if (( 1 << vdd) & p_d->ocr_mask)
-               GPSR1 = GPIO_bit(CORGI_GPIO_SD_PWR);
-       else
-               GPCR1 = GPIO_bit(CORGI_GPIO_SD_PWR);
+       gpio_set_value(CORGI_GPIO_SD_PWR, ((1 << vdd) & p_d->ocr_mask));
 }
 
 static int corgi_mci_get_ro(struct device *dev)
 {
-       return GPLR(CORGI_GPIO_nSD_WP) & GPIO_bit(CORGI_GPIO_nSD_WP);
+       return gpio_get_value(CORGI_GPIO_nSD_WP);
 }
 
 static void corgi_mci_exit(struct device *dev, void *data)
 {
        free_irq(CORGI_IRQ_GPIO_nSD_DETECT, data);
+       gpio_free(CORGI_GPIO_SD_PWR);
+       gpio_free(CORGI_GPIO_nSD_WP);
+       gpio_free(CORGI_GPIO_nSD_DETECT);
 }
 
 static struct pxamci_platform_data corgi_mci_platform_data = {
@@ -462,16 +385,32 @@ static struct pxamci_platform_data corgi_mci_platform_data = {
  */
 static void corgi_irda_transceiver_mode(struct device *dev, int mode)
 {
-       if (mode & IR_OFF)
-               GPSR(CORGI_GPIO_IR_ON) = GPIO_bit(CORGI_GPIO_IR_ON);
-       else
-               GPCR(CORGI_GPIO_IR_ON) = GPIO_bit(CORGI_GPIO_IR_ON);
+       gpio_set_value(CORGI_GPIO_IR_ON, mode & IR_OFF);
        pxa2xx_transceiver_mode(dev, mode);
 }
 
+static int corgi_irda_startup(struct device *dev)
+{
+       int err;
+
+       err = gpio_request(CORGI_GPIO_IR_ON, "IR_ON");
+       if (err)
+               return err;
+
+       gpio_direction_output(CORGI_GPIO_IR_ON, 1);
+       return 0;
+}
+
+static void corgi_irda_shutdown(struct device *dev)
+{
+       gpio_free(CORGI_GPIO_IR_ON);
+}
+
 static struct pxaficp_platform_data corgi_ficp_platform_data = {
-       .transceiver_cap  = IR_SIRMODE | IR_OFF,
-       .transceiver_mode = corgi_irda_transceiver_mode,
+       .transceiver_cap        = IR_SIRMODE | IR_OFF,
+       .transceiver_mode       = corgi_irda_transceiver_mode,
+       .startup                = corgi_irda_startup,
+       .shutdown               = corgi_irda_shutdown,
 };
 
 
@@ -483,14 +422,129 @@ static struct pxa2xx_udc_mach_info udc_info __initdata = {
        .gpio_pullup            = CORGI_GPIO_USB_PULLUP,
 };
 
+#if defined(CONFIG_SPI_PXA2XX) || defined(CONFIG_SPI_PXA2XX_MASTER)
+static struct pxa2xx_spi_master corgi_spi_info = {
+       .num_chipselect = 3,
+};
+
+static struct ads7846_platform_data corgi_ads7846_info = {
+       .model                  = 7846,
+       .vref_delay_usecs       = 100,
+       .x_plate_ohms           = 419,
+       .y_plate_ohms           = 486,
+       .gpio_pendown           = CORGI_GPIO_TP_INT,
+};
+
+static void corgi_ads7846_cs(u32 command)
+{
+       gpio_set_value(CORGI_GPIO_ADS7846_CS, !(command == PXA2XX_CS_ASSERT));
+}
+
+static struct pxa2xx_spi_chip corgi_ads7846_chip = {
+       .cs_control     = corgi_ads7846_cs,
+};
+
+static void corgi_bl_kick_battery(void)
+{
+       void (*kick_batt)(void);
+
+       kick_batt = symbol_get(sharpsl_battery_kick);
+       if (kick_batt) {
+               kick_batt();
+               symbol_put(sharpsl_battery_kick);
+       }
+}
+
+static struct corgi_lcd_platform_data corgi_lcdcon_info = {
+       .init_mode              = CORGI_LCD_MODE_VGA,
+       .max_intensity          = 0x2f,
+       .default_intensity      = 0x1f,
+       .limit_mask             = 0x0b,
+       .gpio_backlight_cont    = CORGI_GPIO_BACKLIGHT_CONT,
+       .gpio_backlight_on      = -1,
+       .kick_battery           = corgi_bl_kick_battery,
+};
+
+static void corgi_lcdcon_cs(u32 command)
+{
+       gpio_set_value(CORGI_GPIO_LCDCON_CS, !(command == PXA2XX_CS_ASSERT));
+}
+
+static struct pxa2xx_spi_chip corgi_lcdcon_chip = {
+       .cs_control     = corgi_lcdcon_cs,
+};
+
+static void corgi_max1111_cs(u32 command)
+{
+       gpio_set_value(CORGI_GPIO_MAX1111_CS, !(command == PXA2XX_CS_ASSERT));
+}
+
+static struct pxa2xx_spi_chip corgi_max1111_chip = {
+       .cs_control     = corgi_max1111_cs,
+};
+
+static struct spi_board_info corgi_spi_devices[] = {
+       {
+               .modalias       = "ads7846",
+               .max_speed_hz   = 1200000,
+               .bus_num        = 1,
+               .chip_select    = 0,
+               .platform_data  = &corgi_ads7846_info,
+               .controller_data= &corgi_ads7846_chip,
+               .irq            = gpio_to_irq(CORGI_GPIO_TP_INT),
+       }, {
+               .modalias       = "corgi-lcd",
+               .max_speed_hz   = 50000,
+               .bus_num        = 1,
+               .chip_select    = 1,
+               .platform_data  = &corgi_lcdcon_info,
+               .controller_data= &corgi_lcdcon_chip,
+       }, {
+               .modalias       = "max1111",
+               .max_speed_hz   = 450000,
+               .bus_num        = 1,
+               .chip_select    = 2,
+               .controller_data= &corgi_max1111_chip,
+       },
+};
+
+static void __init corgi_init_spi(void)
+{
+       int err;
+
+       err = gpio_request(CORGI_GPIO_ADS7846_CS, "ADS7846_CS");
+       if (err)
+               return;
+
+       err = gpio_request(CORGI_GPIO_LCDCON_CS, "LCDCON_CS");
+       if (err)
+               goto err_free_1;
+
+       err = gpio_request(CORGI_GPIO_MAX1111_CS, "MAX1111_CS");
+       if (err)
+               goto err_free_2;
+
+       gpio_direction_output(CORGI_GPIO_ADS7846_CS, 1);
+       gpio_direction_output(CORGI_GPIO_LCDCON_CS, 1);
+       gpio_direction_output(CORGI_GPIO_MAX1111_CS, 1);
+
+       pxa2xx_set_spi_info(1, &corgi_spi_info);
+       spi_register_board_info(ARRAY_AND_SIZE(corgi_spi_devices));
+       return;
+
+err_free_2:
+       gpio_free(CORGI_GPIO_LCDCON_CS);
+err_free_1:
+       gpio_free(CORGI_GPIO_ADS7846_CS);
+}
+#else
+static inline void corgi_init_spi(void) {}
+#endif
 
 static struct platform_device *devices[] __initdata = {
        &corgiscoop_device,
-       &corgissp_device,
        &corgifb_device,
        &corgikbd_device,
-       &corgibl_device,
-       &corgits_device,
        &corgiled_device,
 };
 
@@ -498,7 +552,8 @@ static void corgi_poweroff(void)
 {
        if (!machine_is_corgi())
                /* Green LED off tells the bootloader to halt */
-               reset_scoop_gpio(&corgiscoop_device.dev, CORGI_SCP_LED_GREEN);
+               gpio_set_value(CORGI_GPIO_LED_GREEN, 0);
+
        arm_machine_restart('h');
 }
 
@@ -506,7 +561,8 @@ static void corgi_restart(char mode)
 {
        if (!machine_is_corgi())
                /* Green LED on tells the bootloader to reboot */
-               set_scoop_gpio(&corgiscoop_device.dev, CORGI_SCP_LED_GREEN);
+               gpio_set_value(CORGI_GPIO_LED_GREEN, 1);
+
        arm_machine_restart('h');
 }
 
@@ -515,20 +571,12 @@ static void __init corgi_init(void)
        pm_power_off = corgi_poweroff;
        arm_pm_restart = corgi_restart;
 
-       /* setup sleep mode values */
-       PWER  = 0x00000002;
-       PFER  = 0x00000000;
-       PRER  = 0x00000002;
-       PGSR0 = 0x0158C000;
-       PGSR1 = 0x00FF0080;
-       PGSR2 = 0x0001C004;
        /* Stop 3.6MHz and drive HIGH to PCMCIA and CS */
        PCFR |= PCFR_OPDE;
 
-       corgi_ssp_set_machinfo(&corgi_ssp_machinfo);
+       pxa2xx_mfp_config(ARRAY_AND_SIZE(corgi_pin_config));
 
-       pxa_gpio_mode(CORGI_GPIO_IR_ON | GPIO_OUT);
-       pxa_gpio_mode(CORGI_GPIO_HSYNC | GPIO_IN);
+       corgi_init_spi();
 
        pxa_set_udc_info(&udc_info);
        pxa_set_mci_info(&corgi_mci_platform_data);
diff --git a/arch/arm/mach-pxa/corgi_lcd.c b/arch/arm/mach-pxa/corgi_lcd.c
deleted file mode 100644 (file)
index 311baf1..0000000
+++ /dev/null
@@ -1,290 +0,0 @@
-/*
- * linux/arch/arm/mach-pxa/corgi_lcd.c
- *
- * Corgi/Spitz LCD Specific Code
- *
- * Copyright (C) 2005 Richard Purdie
- *
- * Connectivity:
- *   Corgi - LCD to ATI Imageon w100 (Wallaby)
- *   Spitz - LCD to PXA Framebuffer
- *
- * 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/delay.h>
-#include <linux/kernel.h>
-#include <linux/platform_device.h>
-#include <linux/module.h>
-#include <linux/string.h>
-#include <mach/akita.h>
-#include <mach/corgi.h>
-#include <mach/hardware.h>
-#include <mach/pxa-regs.h>
-#include <mach/sharpsl.h>
-#include <mach/spitz.h>
-#include <asm/hardware/scoop.h>
-#include <asm/mach/sharpsl_param.h>
-#include "generic.h"
-
-/* Register Addresses */
-#define RESCTL_ADRS     0x00
-#define PHACTRL_ADRS    0x01
-#define DUTYCTRL_ADRS   0x02
-#define POWERREG0_ADRS  0x03
-#define POWERREG1_ADRS  0x04
-#define GPOR3_ADRS      0x05
-#define PICTRL_ADRS     0x06
-#define POLCTRL_ADRS    0x07
-
-/* Register Bit Definitions */
-#define RESCTL_QVGA     0x01
-#define RESCTL_VGA      0x00
-
-#define POWER1_VW_ON    0x01  /* VW Supply FET ON */
-#define POWER1_GVSS_ON  0x02  /* GVSS(-8V) Power Supply ON */
-#define POWER1_VDD_ON   0x04  /* VDD(8V),SVSS(-4V) Power Supply ON */
-
-#define POWER1_VW_OFF   0x00  /* VW Supply FET OFF */
-#define POWER1_GVSS_OFF 0x00  /* GVSS(-8V) Power Supply OFF */
-#define POWER1_VDD_OFF  0x00  /* VDD(8V),SVSS(-4V) Power Supply OFF */
-
-#define POWER0_COM_DCLK 0x01  /* COM Voltage DC Bias DAC Serial Data Clock */
-#define POWER0_COM_DOUT 0x02  /* COM Voltage DC Bias DAC Serial Data Out */
-#define POWER0_DAC_ON   0x04  /* DAC Power Supply ON */
-#define POWER0_COM_ON   0x08  /* COM Power Supply ON */
-#define POWER0_VCC5_ON  0x10  /* VCC5 Power Supply ON */
-
-#define POWER0_DAC_OFF  0x00  /* DAC Power Supply OFF */
-#define POWER0_COM_OFF  0x00  /* COM Power Supply OFF */
-#define POWER0_VCC5_OFF 0x00  /* VCC5 Power Supply OFF */
-
-#define PICTRL_INIT_STATE      0x01
-#define PICTRL_INIOFF          0x02
-#define PICTRL_POWER_DOWN      0x04
-#define PICTRL_COM_SIGNAL_OFF  0x08
-#define PICTRL_DAC_SIGNAL_OFF  0x10
-
-#define POLCTRL_SYNC_POL_FALL  0x01
-#define POLCTRL_EN_POL_FALL    0x02
-#define POLCTRL_DATA_POL_FALL  0x04
-#define POLCTRL_SYNC_ACT_H     0x08
-#define POLCTRL_EN_ACT_L       0x10
-
-#define POLCTRL_SYNC_POL_RISE  0x00
-#define POLCTRL_EN_POL_RISE    0x00
-#define POLCTRL_DATA_POL_RISE  0x00
-#define POLCTRL_SYNC_ACT_L     0x00
-#define POLCTRL_EN_ACT_H       0x00
-
-#define PHACTRL_PHASE_MANUAL   0x01
-#define DEFAULT_PHAD_QVGA     (9)
-#define DEFAULT_COMADJ        (125)
-
-/*
- * This is only a psuedo I2C interface. We can't use the standard kernel
- * routines as the interface is write only. We just assume the data is acked...
- */
-static void lcdtg_ssp_i2c_send(u8 data)
-{
-       corgi_ssp_lcdtg_send(POWERREG0_ADRS, data);
-       udelay(10);
-}
-
-static void lcdtg_i2c_send_bit(u8 data)
-{
-       lcdtg_ssp_i2c_send(data);
-       lcdtg_ssp_i2c_send(data | POWER0_COM_DCLK);
-       lcdtg_ssp_i2c_send(data);
-}
-
-static void lcdtg_i2c_send_start(u8 base)
-{
-       lcdtg_ssp_i2c_send(base | POWER0_COM_DCLK | POWER0_COM_DOUT);
-       lcdtg_ssp_i2c_send(base | POWER0_COM_DCLK);
-       lcdtg_ssp_i2c_send(base);
-}
-
-static void lcdtg_i2c_send_stop(u8 base)
-{
-       lcdtg_ssp_i2c_send(base);
-       lcdtg_ssp_i2c_send(base | POWER0_COM_DCLK);
-       lcdtg_ssp_i2c_send(base | POWER0_COM_DCLK | POWER0_COM_DOUT);
-}
-
-static void lcdtg_i2c_send_byte(u8 base, u8 data)
-{
-       int i;
-       for (i = 0; i < 8; i++) {
-               if (data & 0x80)
-                       lcdtg_i2c_send_bit(base | POWER0_COM_DOUT);
-               else
-                       lcdtg_i2c_send_bit(base);
-               data <<= 1;
-       }
-}
-
-static void lcdtg_i2c_wait_ack(u8 base)
-{
-       lcdtg_i2c_send_bit(base);
-}
-
-static void lcdtg_set_common_voltage(u8 base_data, u8 data)
-{
-       /* Set Common Voltage to M62332FP via I2C */
-       lcdtg_i2c_send_start(base_data);
-       lcdtg_i2c_send_byte(base_data, 0x9c);
-       lcdtg_i2c_wait_ack(base_data);
-       lcdtg_i2c_send_byte(base_data, 0x00);
-       lcdtg_i2c_wait_ack(base_data);
-       lcdtg_i2c_send_byte(base_data, data);
-       lcdtg_i2c_wait_ack(base_data);
-       lcdtg_i2c_send_stop(base_data);
-}
-
-/* Set Phase Adjust */
-static void lcdtg_set_phadadj(int mode)
-{
-       int adj;
-       switch(mode) {
-               case 480:
-               case 640:
-                       /* Setting for VGA */
-                       adj = sharpsl_param.phadadj;
-                       if (adj < 0) {
-                               adj = PHACTRL_PHASE_MANUAL;
-                       } else {
-                               adj = ((adj & 0x0f) << 1) | PHACTRL_PHASE_MANUAL;
-                       }
-                       break;
-               case 240:
-               case 320:
-               default:
-                       /* Setting for QVGA */
-                       adj = (DEFAULT_PHAD_QVGA << 1) | PHACTRL_PHASE_MANUAL;
-                       break;
-       }
-
-       corgi_ssp_lcdtg_send(PHACTRL_ADRS, adj);
-}
-
-static int lcd_inited;
-
-void corgi_lcdtg_hw_init(int mode)
-{
-       if (!lcd_inited) {
-               int comadj;
-
-               /* Initialize Internal Logic & Port */
-               corgi_ssp_lcdtg_send(PICTRL_ADRS, PICTRL_POWER_DOWN | PICTRL_INIOFF | PICTRL_INIT_STATE
-                               | PICTRL_COM_SIGNAL_OFF | PICTRL_DAC_SIGNAL_OFF);
-
-               corgi_ssp_lcdtg_send(POWERREG0_ADRS, POWER0_COM_DCLK | POWER0_COM_DOUT | POWER0_DAC_OFF
-                               | POWER0_COM_OFF | POWER0_VCC5_OFF);
-
-               corgi_ssp_lcdtg_send(POWERREG1_ADRS, POWER1_VW_OFF | POWER1_GVSS_OFF | POWER1_VDD_OFF);
-
-               /* VDD(+8V), SVSS(-4V) ON */
-               corgi_ssp_lcdtg_send(POWERREG1_ADRS, POWER1_VW_OFF | POWER1_GVSS_OFF | POWER1_VDD_ON);
-               mdelay(3);
-
-               /* DAC ON */
-               corgi_ssp_lcdtg_send(POWERREG0_ADRS, POWER0_COM_DCLK | POWER0_COM_DOUT | POWER0_DAC_ON
-                               | POWER0_COM_OFF | POWER0_VCC5_OFF);
-
-               /* INIB = H, INI = L  */
-               /* PICTL[0] = H , PICTL[1] = PICTL[2] = PICTL[4] = L */
-               corgi_ssp_lcdtg_send(PICTRL_ADRS, PICTRL_INIT_STATE | PICTRL_COM_SIGNAL_OFF);
-
-               /* Set Common Voltage */
-               comadj = sharpsl_param.comadj;
-               if (comadj < 0)
-                       comadj = DEFAULT_COMADJ;
-               lcdtg_set_common_voltage((POWER0_DAC_ON | POWER0_COM_OFF | POWER0_VCC5_OFF), comadj);
-
-               /* VCC5 ON, DAC ON */
-               corgi_ssp_lcdtg_send(POWERREG0_ADRS, POWER0_COM_DCLK | POWER0_COM_DOUT | POWER0_DAC_ON |
-                               POWER0_COM_OFF | POWER0_VCC5_ON);
-
-               /* GVSS(-8V) ON, VDD ON */
-               corgi_ssp_lcdtg_send(POWERREG1_ADRS, POWER1_VW_OFF | POWER1_GVSS_ON | POWER1_VDD_ON);
-               mdelay(2);
-
-               /* COM SIGNAL ON (PICTL[3] = L) */
-               corgi_ssp_lcdtg_send(PICTRL_ADRS, PICTRL_INIT_STATE);
-
-               /* COM ON, DAC ON, VCC5_ON */
-               corgi_ssp_lcdtg_send(POWERREG0_ADRS, POWER0_COM_DCLK | POWER0_COM_DOUT | POWER0_DAC_ON
-                               | POWER0_COM_ON | POWER0_VCC5_ON);
-
-               /* VW ON, GVSS ON, VDD ON */
-               corgi_ssp_lcdtg_send(POWERREG1_ADRS, POWER1_VW_ON | POWER1_GVSS_ON | POWER1_VDD_ON);
-
-               /* Signals output enable */
-               corgi_ssp_lcdtg_send(PICTRL_ADRS, 0);
-
-               /* Set Phase Adjust */
-               lcdtg_set_phadadj(mode);
-
-               /* Initialize for Input Signals from ATI */
-               corgi_ssp_lcdtg_send(POLCTRL_ADRS, POLCTRL_SYNC_POL_RISE | POLCTRL_EN_POL_RISE
-                               | POLCTRL_DATA_POL_RISE | POLCTRL_SYNC_ACT_L | POLCTRL_EN_ACT_H);
-               udelay(1000);
-
-               lcd_inited=1;
-       } else {
-               lcdtg_set_phadadj(mode);
-       }
-
-       switch(mode) {
-               case 480:
-               case 640:
-                       /* Set Lcd Resolution (VGA) */
-                       corgi_ssp_lcdtg_send(RESCTL_ADRS, RESCTL_VGA);
-                       break;
-               case 240:
-               case 320:
-               default:
-                       /* Set Lcd Resolution (QVGA) */
-                       corgi_ssp_lcdtg_send(RESCTL_ADRS, RESCTL_QVGA);
-                       break;
-       }
-}
-
-void corgi_lcdtg_suspend(void)
-{
-       /* 60Hz x 2 frame = 16.7msec x 2 = 33.4 msec */
-       mdelay(34);
-
-       /* (1)VW OFF */
-       corgi_ssp_lcdtg_send(POWERREG1_ADRS, POWER1_VW_OFF | POWER1_GVSS_ON | POWER1_VDD_ON);
-
-       /* (2)COM OFF */
-       corgi_ssp_lcdtg_send(PICTRL_ADRS, PICTRL_COM_SIGNAL_OFF);
-       corgi_ssp_lcdtg_send(POWERREG0_ADRS, POWER0_DAC_ON | POWER0_COM_OFF | POWER0_VCC5_ON);
-
-       /* (3)Set Common Voltage Bias 0V */
-       lcdtg_set_common_voltage(POWER0_DAC_ON | POWER0_COM_OFF | POWER0_VCC5_ON, 0);
-
-       /* (4)GVSS OFF */
-       corgi_ssp_lcdtg_send(POWERREG1_ADRS, POWER1_VW_OFF | POWER1_GVSS_OFF | POWER1_VDD_ON);
-
-       /* (5)VCC5 OFF */
-       corgi_ssp_lcdtg_send(POWERREG0_ADRS, POWER0_DAC_ON | POWER0_COM_OFF | POWER0_VCC5_OFF);
-
-       /* (6)Set PDWN, INIOFF, DACOFF */
-       corgi_ssp_lcdtg_send(PICTRL_ADRS, PICTRL_INIOFF | PICTRL_DAC_SIGNAL_OFF |
-                       PICTRL_POWER_DOWN | PICTRL_COM_SIGNAL_OFF);
-
-       /* (7)DAC OFF */
-       corgi_ssp_lcdtg_send(POWERREG0_ADRS, POWER0_DAC_OFF | POWER0_COM_OFF | POWER0_VCC5_OFF);
-
-       /* (8)VDD OFF */
-       corgi_ssp_lcdtg_send(POWERREG1_ADRS, POWER1_VW_OFF | POWER1_GVSS_OFF | POWER1_VDD_OFF);
-
-       lcd_inited = 0;
-}
-
index 35bbfccd2df30fb1c4217a940839f26dad272279..eb7d6c94aa425bf23778efd92293dfa1737fd6df 100644 (file)
@@ -21,7 +21,6 @@
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 #include <mach/hardware.h>
-#include <asm/hardware/scoop.h>
 
 #include <mach/sharpsl.h>
 #include <mach/corgi.h>
diff --git a/arch/arm/mach-pxa/corgi_ssp.c b/arch/arm/mach-pxa/corgi_ssp.c
deleted file mode 100644 (file)
index 8e2f221..0000000
+++ /dev/null
@@ -1,276 +0,0 @@
-/*
- *  SSP control code for Sharp Corgi devices
- *
- *  Copyright (c) 2004-2005 Richard Purdie
- *
- *  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/module.h>
-#include <linux/init.h>
-#include <linux/kernel.h>
-#include <linux/sched.h>
-#include <linux/slab.h>
-#include <linux/delay.h>
-#include <linux/platform_device.h>
-#include <mach/hardware.h>
-#include <asm/mach-types.h>
-
-#include <mach/ssp.h>
-#include <mach/pxa-regs.h>
-#include <mach/pxa2xx-gpio.h>
-#include <mach/regs-ssp.h>
-#include "sharpsl.h"
-
-static DEFINE_SPINLOCK(corgi_ssp_lock);
-static struct ssp_dev corgi_ssp_dev;
-static struct ssp_state corgi_ssp_state;
-static struct corgissp_machinfo *ssp_machinfo;
-
-/*
- * There are three devices connected to the SSP interface:
- *   1. A touchscreen controller (TI ADS7846 compatible)
- *   2. An LCD controller (with some Backlight functionality)
- *   3. A battery monitoring IC (Maxim MAX1111)
- *
- * Each device uses a different speed/mode of communication.
- *
- * The touchscreen is very sensitive and the most frequently used
- * so the port is left configured for this.
- *
- * Devices are selected using Chip Selects on GPIOs.
- */
-
-/*
- *  ADS7846 Routines
- */
-unsigned long corgi_ssp_ads7846_putget(ulong data)
-{
-       unsigned long flag;
-       u32 ret = 0;
-
-       spin_lock_irqsave(&corgi_ssp_lock, flag);
-       if (ssp_machinfo->cs_ads7846 >= 0)
-               GPCR(ssp_machinfo->cs_ads7846) = GPIO_bit(ssp_machinfo->cs_ads7846);
-
-       ssp_write_word(&corgi_ssp_dev,data);
-       ssp_read_word(&corgi_ssp_dev, &ret);
-
-       if (ssp_machinfo->cs_ads7846 >= 0)
-               GPSR(ssp_machinfo->cs_ads7846) = GPIO_bit(ssp_machinfo->cs_ads7846);
-       spin_unlock_irqrestore(&corgi_ssp_lock, flag);
-
-       return ret;
-}
-
-/*
- * NOTE: These functions should always be called in interrupt context
- * and use the _lock and _unlock functions. They are very time sensitive.
- */
-void corgi_ssp_ads7846_lock(void)
-{
-       spin_lock(&corgi_ssp_lock);
-       if (ssp_machinfo->cs_ads7846 >= 0)
-               GPCR(ssp_machinfo->cs_ads7846) = GPIO_bit(ssp_machinfo->cs_ads7846);
-}
-
-void corgi_ssp_ads7846_unlock(void)
-{
-       if (ssp_machinfo->cs_ads7846 >= 0)
-               GPSR(ssp_machinfo->cs_ads7846) = GPIO_bit(ssp_machinfo->cs_ads7846);
-       spin_unlock(&corgi_ssp_lock);
-}
-
-void corgi_ssp_ads7846_put(ulong data)
-{
-       ssp_write_word(&corgi_ssp_dev,data);
-}
-
-unsigned long corgi_ssp_ads7846_get(void)
-{
-       u32 ret = 0;
-       ssp_read_word(&corgi_ssp_dev, &ret);
-       return ret;
-}
-
-EXPORT_SYMBOL(corgi_ssp_ads7846_putget);
-EXPORT_SYMBOL(corgi_ssp_ads7846_lock);
-EXPORT_SYMBOL(corgi_ssp_ads7846_unlock);
-EXPORT_SYMBOL(corgi_ssp_ads7846_put);
-EXPORT_SYMBOL(corgi_ssp_ads7846_get);
-
-
-/*
- *  LCD/Backlight Routines
- */
-unsigned long corgi_ssp_dac_put(ulong data)
-{
-       unsigned long flag, sscr1 = SSCR1_SPH;
-       u32 tmp;
-
-       spin_lock_irqsave(&corgi_ssp_lock, flag);
-
-       if (machine_is_spitz() || machine_is_akita() || machine_is_borzoi())
-               sscr1 = 0;
-
-       ssp_disable(&corgi_ssp_dev);
-       ssp_config(&corgi_ssp_dev, (SSCR0_Motorola | (SSCR0_DSS & 0x07 )), sscr1, 0, SSCR0_SerClkDiv(ssp_machinfo->clk_lcdcon));
-       ssp_enable(&corgi_ssp_dev);
-
-       if (ssp_machinfo->cs_lcdcon >= 0)
-               GPCR(ssp_machinfo->cs_lcdcon) = GPIO_bit(ssp_machinfo->cs_lcdcon);
-       ssp_write_word(&corgi_ssp_dev,data);
-       /* Read null data back from device to prevent SSP overflow */
-       ssp_read_word(&corgi_ssp_dev, &tmp);
-       if (ssp_machinfo->cs_lcdcon >= 0)
-               GPSR(ssp_machinfo->cs_lcdcon) = GPIO_bit(ssp_machinfo->cs_lcdcon);
-
-       ssp_disable(&corgi_ssp_dev);
-       ssp_config(&corgi_ssp_dev, (SSCR0_National | (SSCR0_DSS & 0x0b )), 0, 0, SSCR0_SerClkDiv(ssp_machinfo->clk_ads7846));
-       ssp_enable(&corgi_ssp_dev);
-
-       spin_unlock_irqrestore(&corgi_ssp_lock, flag);
-
-       return 0;
-}
-
-void corgi_ssp_lcdtg_send(u8 adrs, u8 data)
-{
-       corgi_ssp_dac_put(((adrs & 0x07) << 5) | (data & 0x1f));
-}
-
-void corgi_ssp_blduty_set(int duty)
-{
-       corgi_ssp_lcdtg_send(0x02,duty);
-}
-
-EXPORT_SYMBOL(corgi_ssp_lcdtg_send);
-EXPORT_SYMBOL(corgi_ssp_blduty_set);
-
-/*
- *  Max1111 Routines
- */
-int corgi_ssp_max1111_get(ulong data)
-{
-       unsigned long flag;
-       long voltage = 0, voltage1 = 0, voltage2 = 0;
-
-       spin_lock_irqsave(&corgi_ssp_lock, flag);
-       if (ssp_machinfo->cs_max1111 >= 0)
-               GPCR(ssp_machinfo->cs_max1111) = GPIO_bit(ssp_machinfo->cs_max1111);
-       ssp_disable(&corgi_ssp_dev);
-       ssp_config(&corgi_ssp_dev, (SSCR0_Motorola | (SSCR0_DSS & 0x07 )), 0, 0, SSCR0_SerClkDiv(ssp_machinfo->clk_max1111));
-       ssp_enable(&corgi_ssp_dev);
-
-       udelay(1);
-
-       /* TB1/RB1 */
-       ssp_write_word(&corgi_ssp_dev,data);
-       ssp_read_word(&corgi_ssp_dev, (u32*)&voltage1); /* null read */
-
-       /* TB12/RB2 */
-       ssp_write_word(&corgi_ssp_dev,0);
-       ssp_read_word(&corgi_ssp_dev, (u32*)&voltage1);
-
-       /* TB13/RB3*/
-       ssp_write_word(&corgi_ssp_dev,0);
-       ssp_read_word(&corgi_ssp_dev, (u32*)&voltage2);
-
-       ssp_disable(&corgi_ssp_dev);
-       ssp_config(&corgi_ssp_dev, (SSCR0_National | (SSCR0_DSS & 0x0b )), 0, 0, SSCR0_SerClkDiv(ssp_machinfo->clk_ads7846));
-       ssp_enable(&corgi_ssp_dev);
-       if (ssp_machinfo->cs_max1111 >= 0)
-               GPSR(ssp_machinfo->cs_max1111) = GPIO_bit(ssp_machinfo->cs_max1111);
-       spin_unlock_irqrestore(&corgi_ssp_lock, flag);
-
-       if (voltage1 & 0xc0 || voltage2 & 0x3f)
-               voltage = -1;
-       else
-               voltage = ((voltage1 << 2) & 0xfc) | ((voltage2 >> 6) & 0x03);
-
-       return voltage;
-}
-
-EXPORT_SYMBOL(corgi_ssp_max1111_get);
-
-/*
- *  Support Routines
- */
-
-void __init corgi_ssp_set_machinfo(struct corgissp_machinfo *machinfo)
-{
-       ssp_machinfo = machinfo;
-}
-
-static int __init corgi_ssp_probe(struct platform_device *dev)
-{
-       int ret;
-
-       /* Chip Select - Disable All */
-       if (ssp_machinfo->cs_lcdcon >= 0)
-               pxa_gpio_mode(ssp_machinfo->cs_lcdcon  | GPIO_OUT | GPIO_DFLT_HIGH);
-       if (ssp_machinfo->cs_max1111 >= 0)
-               pxa_gpio_mode(ssp_machinfo->cs_max1111 | GPIO_OUT | GPIO_DFLT_HIGH);
-       if (ssp_machinfo->cs_ads7846 >= 0)
-               pxa_gpio_mode(ssp_machinfo->cs_ads7846 | GPIO_OUT | GPIO_DFLT_HIGH);
-
-       ret = ssp_init(&corgi_ssp_dev, ssp_machinfo->port, 0);
-
-       if (ret)
-               printk(KERN_ERR "Unable to register SSP handler!\n");
-       else {
-               ssp_disable(&corgi_ssp_dev);
-               ssp_config(&corgi_ssp_dev, (SSCR0_National | (SSCR0_DSS & 0x0b )), 0, 0, SSCR0_SerClkDiv(ssp_machinfo->clk_ads7846));
-               ssp_enable(&corgi_ssp_dev);
-       }
-
-       return ret;
-}
-
-static int corgi_ssp_remove(struct platform_device *dev)
-{
-       ssp_exit(&corgi_ssp_dev);
-       return 0;
-}
-
-static int corgi_ssp_suspend(struct platform_device *dev, pm_message_t state)
-{
-       ssp_flush(&corgi_ssp_dev);
-       ssp_save_state(&corgi_ssp_dev,&corgi_ssp_state);
-
-       return 0;
-}
-
-static int corgi_ssp_resume(struct platform_device *dev)
-{
-       if (ssp_machinfo->cs_lcdcon >= 0)
-               GPSR(ssp_machinfo->cs_lcdcon) = GPIO_bit(ssp_machinfo->cs_lcdcon);  /* High - Disable LCD Control/Timing Gen */
-       if (ssp_machinfo->cs_max1111 >= 0)
-               GPSR(ssp_machinfo->cs_max1111) = GPIO_bit(ssp_machinfo->cs_max1111); /* High - Disable MAX1111*/
-       if (ssp_machinfo->cs_ads7846 >= 0)
-               GPSR(ssp_machinfo->cs_ads7846) = GPIO_bit(ssp_machinfo->cs_ads7846); /* High - Disable ADS7846*/
-       ssp_restore_state(&corgi_ssp_dev,&corgi_ssp_state);
-       ssp_enable(&corgi_ssp_dev);
-
-       return 0;
-}
-
-static struct platform_driver corgissp_driver = {
-       .probe          = corgi_ssp_probe,
-       .remove         = corgi_ssp_remove,
-       .suspend        = corgi_ssp_suspend,
-       .resume         = corgi_ssp_resume,
-       .driver         = {
-               .name   = "corgi-ssp",
-       },
-};
-
-int __init corgi_ssp_init(void)
-{
-       return platform_driver_register(&corgissp_driver);
-}
-
-arch_initcall(corgi_ssp_init);
similarity index 99%
rename from arch/arm/mach-pxa/cpu-pxa.c
rename to arch/arm/mach-pxa/cpufreq-pxa2xx.c
index 6f5569bac131e3bb5b3d860ede43f6746a37cf48..d82528e74bd0e3d27359169246da5e14e56828c9 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/arm/mach-pxa/cpu-pxa.c
+ *  linux/arch/arm/mach-pxa/cpufreq-pxa2xx.c
  *
  *  Copyright (C) 2002,2003 Intrinsyc Software
  *
diff --git a/arch/arm/mach-pxa/cpufreq-pxa3xx.c b/arch/arm/mach-pxa/cpufreq-pxa3xx.c
new file mode 100644 (file)
index 0000000..1ea0c9c
--- /dev/null
@@ -0,0 +1,258 @@
+/*
+ * linux/arch/arm/mach-pxa/cpufreq-pxa3xx.c
+ *
+ * Copyright (C) 2008 Marvell International Ltd.
+ *
+ * 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/kernel.h>
+#include <linux/module.h>
+#include <linux/sched.h>
+#include <linux/init.h>
+#include <linux/cpufreq.h>
+
+#include <mach/hardware.h>
+#include <mach/pxa-regs.h>
+#include <mach/pxa3xx-regs.h>
+
+#include "generic.h"
+
+#define HSS_104M       (0)
+#define HSS_156M       (1)
+#define HSS_208M       (2)
+#define HSS_312M       (3)
+
+#define SMCFS_78M      (0)
+#define SMCFS_104M     (2)
+#define SMCFS_208M     (5)
+
+#define SFLFS_104M     (0)
+#define SFLFS_156M     (1)
+#define SFLFS_208M     (2)
+#define SFLFS_312M     (3)
+
+#define XSPCLK_156M    (0)
+#define XSPCLK_NONE    (3)
+
+#define DMCFS_26M      (0)
+#define DMCFS_260M     (3)
+
+struct pxa3xx_freq_info {
+       unsigned int cpufreq_mhz;
+       unsigned int core_xl : 5;
+       unsigned int core_xn : 3;
+       unsigned int hss : 2;
+       unsigned int dmcfs : 2;
+       unsigned int smcfs : 3;
+       unsigned int sflfs : 2;
+       unsigned int df_clkdiv : 3;
+
+       int     vcc_core;       /* in mV */
+       int     vcc_sram;       /* in mV */
+};
+
+#define OP(cpufreq, _xl, _xn, _hss, _dmc, _smc, _sfl, _dfi, vcore, vsram) \
+{                                                                      \
+       .cpufreq_mhz    = cpufreq,                                      \
+       .core_xl        = _xl,                                          \
+       .core_xn        = _xn,                                          \
+       .hss            = HSS_##_hss##M,                                \
+       .dmcfs          = DMCFS_##_dmc##M,                              \
+       .smcfs          = SMCFS_##_smc##M,                              \
+       .sflfs          = SFLFS_##_sfl##M,                              \
+       .df_clkdiv      = _dfi,                                         \
+       .vcc_core       = vcore,                                        \
+       .vcc_sram       = vsram,                                        \
+}
+
+static struct pxa3xx_freq_info pxa300_freqs[] = {
+       /*  CPU XL XN  HSS DMEM SMEM SRAM DFI VCC_CORE VCC_SRAM */
+       OP(104,  8, 1, 104, 260,  78, 104, 3, 1000, 1100), /* 104MHz */
+       OP(208, 16, 1, 104, 260, 104, 156, 2, 1000, 1100), /* 208MHz */
+       OP(416, 16, 2, 156, 260, 104, 208, 2, 1100, 1200), /* 416MHz */
+       OP(624, 24, 2, 208, 260, 208, 312, 3, 1375, 1400), /* 624MHz */
+};
+
+static struct pxa3xx_freq_info pxa320_freqs[] = {
+       /*  CPU XL XN  HSS DMEM SMEM SRAM DFI VCC_CORE VCC_SRAM */
+       OP(104,  8, 1, 104, 260,  78, 104, 3, 1000, 1100), /* 104MHz */
+       OP(208, 16, 1, 104, 260, 104, 156, 2, 1000, 1100), /* 208MHz */
+       OP(416, 16, 2, 156, 260, 104, 208, 2, 1100, 1200), /* 416MHz */
+       OP(624, 24, 2, 208, 260, 208, 312, 3, 1375, 1400), /* 624MHz */
+       OP(806, 31, 2, 208, 260, 208, 312, 3, 1400, 1400), /* 806MHz */
+};
+
+static unsigned int pxa3xx_freqs_num;
+static struct pxa3xx_freq_info *pxa3xx_freqs;
+static struct cpufreq_frequency_table *pxa3xx_freqs_table;
+
+static int setup_freqs_table(struct cpufreq_policy *policy,
+                            struct pxa3xx_freq_info *freqs, int num)
+{
+       struct cpufreq_frequency_table *table;
+       int i;
+
+       table = kzalloc((num + 1) * sizeof(*table), GFP_KERNEL);
+       if (table == NULL)
+               return -ENOMEM;
+
+       for (i = 0; i < num; i++) {
+               table[i].index = i;
+               table[i].frequency = freqs[i].cpufreq_mhz * 1000;
+       }
+       table[num].frequency = i;
+       table[num].frequency = CPUFREQ_TABLE_END;
+
+       pxa3xx_freqs = freqs;
+       pxa3xx_freqs_num = num;
+       pxa3xx_freqs_table = table;
+
+       return cpufreq_frequency_table_cpuinfo(policy, table);
+}
+
+static void __update_core_freq(struct pxa3xx_freq_info *info)
+{
+       uint32_t mask = ACCR_XN_MASK | ACCR_XL_MASK;
+       uint32_t accr = ACCR;
+       uint32_t xclkcfg;
+
+       accr &= ~(ACCR_XN_MASK | ACCR_XL_MASK | ACCR_XSPCLK_MASK);
+       accr |= ACCR_XN(info->core_xn) | ACCR_XL(info->core_xl);
+
+       /* No clock until core PLL is re-locked */
+       accr |= ACCR_XSPCLK(XSPCLK_NONE);
+
+       xclkcfg = (info->core_xn == 2) ? 0x3 : 0x2;     /* turbo bit */
+
+       ACCR = accr;
+       __asm__("mcr p14, 0, %0, c6, c0, 0\n" : : "r"(xclkcfg));
+
+       while ((ACSR & mask) != (accr & mask))
+               cpu_relax();
+}
+
+static void __update_bus_freq(struct pxa3xx_freq_info *info)
+{
+       uint32_t mask;
+       uint32_t accr = ACCR;
+
+       mask = ACCR_SMCFS_MASK | ACCR_SFLFS_MASK | ACCR_HSS_MASK |
+               ACCR_DMCFS_MASK;
+
+       accr &= ~mask;
+       accr |= ACCR_SMCFS(info->smcfs) | ACCR_SFLFS(info->sflfs) |
+               ACCR_HSS(info->hss) | ACCR_DMCFS(info->dmcfs);
+
+       ACCR = accr;
+
+       while ((ACSR & mask) != (accr & mask))
+               cpu_relax();
+}
+
+static int pxa3xx_cpufreq_verify(struct cpufreq_policy *policy)
+{
+       return cpufreq_frequency_table_verify(policy, pxa3xx_freqs_table);
+}
+
+static unsigned int pxa3xx_cpufreq_get(unsigned int cpu)
+{
+       return get_clk_frequency_khz(0);
+}
+
+static int pxa3xx_cpufreq_set(struct cpufreq_policy *policy,
+                             unsigned int target_freq,
+                             unsigned int relation)
+{
+       struct pxa3xx_freq_info *next;
+       struct cpufreq_freqs freqs;
+       unsigned long flags;
+       int idx;
+
+       if (policy->cpu != 0)
+               return -EINVAL;
+
+       /* Lookup the next frequency */
+       if (cpufreq_frequency_table_target(policy, pxa3xx_freqs_table,
+                               target_freq, relation, &idx))
+               return -EINVAL;
+
+       next = &pxa3xx_freqs[idx];
+
+       freqs.old = policy->cur;
+       freqs.new = next->cpufreq_mhz * 1000;
+       freqs.cpu = policy->cpu;
+
+       pr_debug("CPU frequency from %d MHz to %d MHz%s\n",
+                       freqs.old / 1000, freqs.new / 1000,
+                       (freqs.old == freqs.new) ? " (skipped)" : "");
+
+       if (freqs.old == target_freq)
+               return 0;
+
+       cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);
+
+       local_irq_save(flags);
+       __update_core_freq(next);
+       __update_bus_freq(next);
+       local_irq_restore(flags);
+
+       cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
+
+       return 0;
+}
+
+static __init int pxa3xx_cpufreq_init(struct cpufreq_policy *policy)
+{
+       int ret = -EINVAL;
+
+       /* set default policy and cpuinfo */
+       policy->governor = CPUFREQ_DEFAULT_GOVERNOR;
+       policy->cpuinfo.min_freq = 104000;
+       policy->cpuinfo.max_freq = (cpu_is_pxa320()) ? 806000 : 624000;
+       policy->cpuinfo.transition_latency = 1000; /* FIXME: 1 ms, assumed */
+       policy->cur = policy->min = policy->max = get_clk_frequency_khz(0);
+
+       if (cpu_is_pxa300() || cpu_is_pxa310())
+               ret = setup_freqs_table(policy, ARRAY_AND_SIZE(pxa300_freqs));
+
+       if (cpu_is_pxa320())
+               ret = setup_freqs_table(policy, ARRAY_AND_SIZE(pxa320_freqs));
+
+       if (ret) {
+               pr_err("failed to setup frequency table\n");
+               return ret;
+       }
+
+       pr_info("CPUFREQ support for PXA3xx initialized\n");
+       return 0;
+}
+
+static struct cpufreq_driver pxa3xx_cpufreq_driver = {
+       .verify         = pxa3xx_cpufreq_verify,
+       .target         = pxa3xx_cpufreq_set,
+       .init           = pxa3xx_cpufreq_init,
+       .get            = pxa3xx_cpufreq_get,
+       .name           = "pxa3xx-cpufreq",
+};
+
+static int __init cpufreq_init(void)
+{
+       if (cpu_is_pxa3xx())
+               return cpufreq_register_driver(&pxa3xx_cpufreq_driver);
+
+       return 0;
+}
+module_init(cpufreq_init);
+
+static void __exit cpufreq_exit(void)
+{
+       cpufreq_unregister_driver(&pxa3xx_cpufreq_driver);
+}
+module_exit(cpufreq_exit);
+
+MODULE_DESCRIPTION("CPU frequency scaling driver for PXA3xx");
+MODULE_LICENSE("GPL");
index 887c738f5911dd6d333959b489aa3dad5af35731..bb04af4b0aa3f7706b6124cd3ce1539e55d86288 100644 (file)
@@ -32,5 +32,6 @@ extern struct platform_device pxa27x_device_pwm0;
 extern struct platform_device pxa27x_device_pwm1;
 
 extern struct platform_device pxa3xx_device_nand;
+extern struct platform_device pxa3xx_device_i2c_power;
 
 void __init pxa_register_device(struct platform_device *dev, void *data);
diff --git a/arch/arm/mach-pxa/e330.c b/arch/arm/mach-pxa/e330.c
new file mode 100644 (file)
index 0000000..d488ede
--- /dev/null
@@ -0,0 +1,43 @@
+/*
+ * Hardware definitions for the Toshiba eseries PDAs
+ *
+ * Copyright (c) 2003 Ian Molton <spyro@f2s.com>
+ *
+ * This file is licensed under
+ * the terms of the GNU General Public License version 2. This program
+ * is licensed "as is" without any warranty of any kind, whether express
+ * or implied.
+ *
+ */
+
+#include <linux/kernel.h>
+#include <linux/init.h>
+
+#include <asm/setup.h>
+#include <asm/mach/arch.h>
+#include <asm/mach-types.h>
+
+#include <mach/mfp-pxa25x.h>
+#include <mach/hardware.h>
+#include <mach/udc.h>
+
+#include "generic.h"
+#include "eseries.h"
+
+static void __init e330_init(void)
+{
+       pxa_set_udc_info(&e7xx_udc_mach_info);
+}
+
+MACHINE_START(E330, "Toshiba e330")
+       /* Maintainer: Ian Molton (spyro@f2s.com) */
+       .phys_io        = 0x40000000,
+       .io_pg_offst    = (io_p2v(0x40000000) >> 18) & 0xfffc,
+       .boot_params    = 0xa0000100,
+       .map_io         = pxa_map_io,
+       .init_irq       = pxa25x_init_irq,
+       .fixup          = eseries_fixup,
+       .init_machine   = e330_init,
+       .timer          = &pxa_timer,
+MACHINE_END
+
diff --git a/arch/arm/mach-pxa/e350.c b/arch/arm/mach-pxa/e350.c
new file mode 100644 (file)
index 0000000..8ecbc54
--- /dev/null
@@ -0,0 +1,43 @@
+/*
+ * Hardware definitions for the Toshiba eseries PDAs
+ *
+ * Copyright (c) 2003 Ian Molton <spyro@f2s.com>
+ *
+ * This file is licensed under
+ * the terms of the GNU General Public License version 2. This program
+ * is licensed "as is" without any warranty of any kind, whether express
+ * or implied.
+ *
+ */
+
+#include <linux/kernel.h>
+#include <linux/init.h>
+
+#include <asm/setup.h>
+#include <asm/mach/arch.h>
+#include <asm/mach-types.h>
+
+#include <mach/mfp-pxa25x.h>
+#include <mach/hardware.h>
+#include <mach/udc.h>
+
+#include "generic.h"
+#include "eseries.h"
+
+static void __init e350_init(void)
+{
+       pxa_set_udc_info(&e7xx_udc_mach_info);
+}
+
+MACHINE_START(E350, "Toshiba e350")
+       /* Maintainer: Ian Molton (spyro@f2s.com) */
+       .phys_io        = 0x40000000,
+       .io_pg_offst    = (io_p2v(0x40000000) >> 18) & 0xfffc,
+       .boot_params    = 0xa0000100,
+       .map_io         = pxa_map_io,
+       .init_irq       = pxa25x_init_irq,
+       .fixup          = eseries_fixup,
+       .init_machine   = e350_init,
+       .timer          = &pxa_timer,
+MACHINE_END
+
diff --git a/arch/arm/mach-pxa/e400.c b/arch/arm/mach-pxa/e400.c
new file mode 100644 (file)
index 0000000..544bbaa
--- /dev/null
@@ -0,0 +1,94 @@
+/*
+ * Hardware definitions for the Toshiba eseries PDAs
+ *
+ * Copyright (c) 2003 Ian Molton <spyro@f2s.com>
+ *
+ * This file is licensed under
+ * the terms of the GNU General Public License version 2. This program
+ * is licensed "as is" without any warranty of any kind, whether express
+ * or implied.
+ *
+ */
+
+#include <linux/kernel.h>
+#include <linux/init.h>
+
+#include <asm/setup.h>
+#include <asm/mach/arch.h>
+#include <asm/mach-types.h>
+
+#include <mach/pxa-regs.h>
+#include <mach/mfp-pxa25x.h>
+#include <mach/hardware.h>
+
+#include <mach/pxafb.h>
+#include <mach/udc.h>
+
+#include "generic.h"
+#include "eseries.h"
+
+/* ------------------------ E400 LCD definitions ------------------------ */
+
+static struct pxafb_mode_info e400_pxafb_mode_info = {
+       .pixclock       = 140703,
+       .xres           = 240,
+       .yres           = 320,
+       .bpp            = 16,
+       .hsync_len      = 4,
+       .left_margin    = 28,
+       .right_margin   = 8,
+       .vsync_len      = 3,
+       .upper_margin   = 5,
+       .lower_margin   = 6,
+       .sync           = 0,
+};
+
+static struct pxafb_mach_info e400_pxafb_mach_info = {
+       .modes          = &e400_pxafb_mode_info,
+       .num_modes      = 1,
+       .lccr0          = LCCR0_Color | LCCR0_Sngl | LCCR0_Act,
+       .lccr3          = 0,
+       .pxafb_backlight_power  = NULL,
+};
+
+/* ------------------------ E400 MFP config ----------------------------- */
+
+static unsigned long e400_pin_config[] __initdata = {
+       /* Chip selects */
+       GPIO15_nCS_1,   /* CS1 - Flash */
+       GPIO80_nCS_4,   /* CS4 - TMIO */
+
+       /* Clocks */
+       GPIO12_32KHz,
+
+       /* BTUART */
+       GPIO42_BTUART_RXD,
+       GPIO43_BTUART_TXD,
+       GPIO44_BTUART_CTS,
+       GPIO45_GPIO, /* Used by TMIO for #SUSPEND */
+
+       /* wakeup */
+       GPIO0_GPIO | WAKEUP_ON_EDGE_RISE,
+};
+
+/* ---------------------------------------------------------------------- */
+
+static void __init e400_init(void)
+{
+       pxa2xx_mfp_config(ARRAY_AND_SIZE(e400_pin_config));
+       set_pxa_fb_info(&e400_pxafb_mach_info);
+       pxa_set_udc_info(&e7xx_udc_mach_info);
+}
+
+MACHINE_START(E400, "Toshiba e400")
+       /* Maintainer: Ian Molton (spyro@f2s.com) */
+       .phys_io        = 0x40000000,
+       .io_pg_offst    = (io_p2v(0x40000000) >> 18) & 0xfffc,
+       .boot_params    = 0xa0000100,
+       .map_io         = pxa_map_io,
+       .init_irq       = pxa25x_init_irq,
+       .fixup          = eseries_fixup,
+       .init_machine   = e400_init,
+       .timer          = &pxa_timer,
+MACHINE_END
+
diff --git a/arch/arm/mach-pxa/e400_lcd.c b/arch/arm/mach-pxa/e400_lcd.c
deleted file mode 100644 (file)
index 2638841..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * e400_lcd.c
- *
- * (c) 2005 Ian Molton <spyro@f2s.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/init.h>
-#include <linux/module.h>
-
-#include <asm/mach-types.h>
-#include <mach/pxa-regs.h>
-#include <mach/pxafb.h>
-
-static struct pxafb_mode_info e400_pxafb_mode_info = {
-       .pixclock       = 140703,
-       .xres           = 240,
-       .yres           = 320,
-       .bpp            = 16,
-       .hsync_len      = 4,
-       .left_margin    = 28,
-       .right_margin   = 8,
-       .vsync_len      = 3,
-       .upper_margin   = 5,
-       .lower_margin   = 6,
-       .sync           = 0,
-};
-
-static struct pxafb_mach_info e400_pxafb_mach_info = {
-       .modes          = &e400_pxafb_mode_info,
-       .num_modes      = 1,
-       .lccr0          = LCCR0_Color | LCCR0_Sngl | LCCR0_Act,
-       .lccr3          = 0,
-       .pxafb_backlight_power  = NULL,
-};
-
-static int __init e400_lcd_init(void)
-{
-       if (!machine_is_e400())
-               return -ENODEV;
-
-       set_pxa_fb_info(&e400_pxafb_mach_info);
-       return 0;
-}
-
-module_init(e400_lcd_init);
-
-MODULE_AUTHOR("Ian Molton <spyro@f2s.com>");
-MODULE_DESCRIPTION("e400 lcd driver");
-MODULE_LICENSE("GPLv2");
-
diff --git a/arch/arm/mach-pxa/e740.c b/arch/arm/mach-pxa/e740.c
new file mode 100644 (file)
index 0000000..c57a15b
--- /dev/null
@@ -0,0 +1,169 @@
+/*
+ * Hardware definitions for the Toshiba eseries PDAs
+ *
+ * Copyright (c) 2003 Ian Molton <spyro@f2s.com>
+ *
+ * This file is licensed under
+ * the terms of the GNU General Public License version 2. This program
+ * is licensed "as is" without any warranty of any kind, whether express
+ * or implied.
+ *
+ */
+
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/device.h>
+#include <linux/platform_device.h>
+#include <linux/fb.h>
+
+#include <video/w100fb.h>
+
+#include <asm/setup.h>
+#include <asm/mach/arch.h>
+#include <asm/mach-types.h>
+
+#include <mach/mfp-pxa25x.h>
+#include <mach/hardware.h>
+#include <mach/udc.h>
+
+#include "generic.h"
+#include "eseries.h"
+
+
+/* ------------------------ e740 video support --------------------------- */
+
+static struct w100_gen_regs e740_lcd_regs = {
+       .lcd_format =            0x00008023,
+       .lcdd_cntl1 =            0x0f000000,
+       .lcdd_cntl2 =            0x0003ffff,
+       .genlcd_cntl1 =          0x00ffff03,
+       .genlcd_cntl2 =          0x003c0f03,
+       .genlcd_cntl3 =          0x000143aa,
+};
+
+static struct w100_mode e740_lcd_mode = {
+       .xres            = 240,
+       .yres            = 320,
+       .left_margin     = 20,
+       .right_margin    = 28,
+       .upper_margin    = 9,
+       .lower_margin    = 8,
+       .crtc_ss         = 0x80140013,
+       .crtc_ls         = 0x81150110,
+       .crtc_gs         = 0x80050005,
+       .crtc_vpos_gs    = 0x000a0009,
+       .crtc_rev        = 0x0040010a,
+       .crtc_dclk       = 0xa906000a,
+       .crtc_gclk       = 0x80050108,
+       .crtc_goe        = 0x80050108,
+       .pll_freq        = 57,
+       .pixclk_divider         = 4,
+       .pixclk_divider_rotated = 4,
+       .pixclk_src     = CLK_SRC_XTAL,
+       .sysclk_divider  = 1,
+       .sysclk_src     = CLK_SRC_PLL,
+       .crtc_ps1_active =       0x41060010,
+};
+
+static struct w100_gpio_regs e740_w100_gpio_info = {
+       .init_data1 = 0x21002103,
+       .gpio_dir1  = 0xffffdeff,
+       .gpio_oe1   = 0x03c00643,
+       .init_data2 = 0x003f003f,
+       .gpio_dir2  = 0xffffffff,
+       .gpio_oe2   = 0x000000ff,
+};
+
+static struct w100fb_mach_info e740_fb_info = {
+       .modelist   = &e740_lcd_mode,
+       .num_modes  = 1,
+       .regs       = &e740_lcd_regs,
+       .gpio       = &e740_w100_gpio_info,
+       .xtal_freq = 14318000,
+       .xtal_dbl   = 1,
+};
+
+static struct resource e740_fb_resources[] = {
+       [0] = {
+               .start          = 0x0c000000,
+               .end            = 0x0cffffff,
+               .flags          = IORESOURCE_MEM,
+       },
+};
+
+static struct platform_device e740_fb_device = {
+       .name           = "w100fb",
+       .id             = -1,
+       .dev            = {
+               .platform_data  = &e740_fb_info,
+       },
+       .num_resources  = ARRAY_SIZE(e740_fb_resources),
+       .resource       = e740_fb_resources,
+};
+
+/* --------------------------- MFP Pin config -------------------------- */
+
+static unsigned long e740_pin_config[] __initdata = {
+       /* Chip selects */
+       GPIO15_nCS_1,   /* CS1 - Flash */
+       GPIO79_nCS_3,   /* CS3 - IMAGEON */
+       GPIO80_nCS_4,   /* CS4 - TMIO */
+
+       /* Clocks */
+       GPIO12_32KHz,
+
+       /* BTUART */
+       GPIO42_BTUART_RXD,
+       GPIO43_BTUART_TXD,
+       GPIO44_BTUART_CTS,
+       GPIO45_GPIO, /* Used by TMIO for #SUSPEND */
+
+       /* PC Card */
+       GPIO8_GPIO,   /* CD0 */
+       GPIO44_GPIO,  /* CD1 */
+       GPIO11_GPIO,  /* IRQ0 */
+       GPIO6_GPIO,   /* IRQ1 */
+       GPIO27_GPIO,  /* RST0 */
+       GPIO24_GPIO,  /* RST1 */
+       GPIO20_GPIO,  /* PWR0 */
+       GPIO23_GPIO,  /* PWR1 */
+       GPIO48_nPOE,
+       GPIO49_nPWE,
+       GPIO50_nPIOR,
+       GPIO51_nPIOW,
+       GPIO52_nPCE_1,
+       GPIO53_nPCE_2,
+       GPIO54_nPSKTSEL,
+       GPIO55_nPREG,
+       GPIO56_nPWAIT,
+       GPIO57_nIOIS16,
+
+       /* wakeup */
+       GPIO0_GPIO | WAKEUP_ON_EDGE_RISE,
+};
+
+/* ----------------------------------------------------------------------- */
+
+static struct platform_device *devices[] __initdata = {
+       &e740_fb_device,
+};
+
+static void __init e740_init(void)
+{
+       pxa2xx_mfp_config(ARRAY_AND_SIZE(e740_pin_config));
+       platform_add_devices(devices, ARRAY_SIZE(devices));
+       pxa_set_udc_info(&e7xx_udc_mach_info);
+}
+
+MACHINE_START(E740, "Toshiba e740")
+       /* Maintainer: Ian Molton (spyro@f2s.com) */
+       .phys_io        = 0x40000000,
+       .io_pg_offst    = (io_p2v(0x40000000) >> 18) & 0xfffc,
+       .boot_params    = 0xa0000100,
+       .map_io         = pxa_map_io,
+       .init_irq       = pxa25x_init_irq,
+       .fixup          = eseries_fixup,
+       .init_machine   = e740_init,
+       .timer          = &pxa_timer,
+MACHINE_END
+
diff --git a/arch/arm/mach-pxa/e740_lcd.c b/arch/arm/mach-pxa/e740_lcd.c
deleted file mode 100644 (file)
index 26bd599..0000000
+++ /dev/null
@@ -1,123 +0,0 @@
-/* e740_lcd.c
- *
- * This file contains the definitions for the LCD timings and functions
- * to control the LCD power / frontlighting via the w100fb driver.
- *
- * (c) 2005 Ian Molton <spyro@f2s.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/module.h>
-#include <linux/device.h>
-#include <linux/fb.h>
-#include <linux/err.h>
-#include <linux/platform_device.h>
-
-#include <asm/mach-types.h>
-
-#include <video/w100fb.h>
-
-/*
-**potential** shutdown routine - to be investigated
-devmem2 0x0c010528 w 0xff3fff00
-devmem2 0x0c010190 w 0x7FFF8000
-devmem2 0x0c0101b0 w 0x00FF0000
-devmem2 0x0c01008c w 0x00000000
-devmem2 0x0c010080 w 0x000000bf
-devmem2 0x0c010098 w 0x00000015
-devmem2 0x0c010088 w 0x4b000204
-devmem2 0x0c010098 w 0x0000001d
-*/
-
-static struct w100_gen_regs e740_lcd_regs = {
-       .lcd_format =            0x00008023,
-       .lcdd_cntl1 =            0x0f000000,
-       .lcdd_cntl2 =            0x0003ffff,
-       .genlcd_cntl1 =          0x00ffff03,
-       .genlcd_cntl2 =          0x003c0f03,
-       .genlcd_cntl3 =          0x000143aa,
-};
-
-static struct w100_mode e740_lcd_mode = {
-       .xres            = 240,
-       .yres            = 320,
-       .left_margin     = 20,
-       .right_margin    = 28,
-       .upper_margin    = 9,
-       .lower_margin    = 8,
-       .crtc_ss         = 0x80140013,
-       .crtc_ls         = 0x81150110,
-       .crtc_gs         = 0x80050005,
-       .crtc_vpos_gs    = 0x000a0009,
-       .crtc_rev        = 0x0040010a,
-       .crtc_dclk       = 0xa906000a,
-       .crtc_gclk       = 0x80050108,
-       .crtc_goe        = 0x80050108,
-       .pll_freq        = 57,
-       .pixclk_divider         = 4,
-       .pixclk_divider_rotated = 4,
-       .pixclk_src     = CLK_SRC_XTAL,
-       .sysclk_divider  = 1,
-       .sysclk_src     = CLK_SRC_PLL,
-       .crtc_ps1_active =       0x41060010,
-};
-
-
-static struct w100_gpio_regs e740_w100_gpio_info = {
-       .init_data1 = 0x21002103,
-       .gpio_dir1  = 0xffffdeff,
-       .gpio_oe1   = 0x03c00643,
-       .init_data2 = 0x003f003f,
-       .gpio_dir2  = 0xffffffff,
-       .gpio_oe2   = 0x000000ff,
-};
-
-static struct w100fb_mach_info e740_fb_info = {
-       .modelist   = &e740_lcd_mode,
-       .num_modes  = 1,
-       .regs       = &e740_lcd_regs,
-       .gpio       = &e740_w100_gpio_info,
-       .xtal_freq = 14318000,
-       .xtal_dbl   = 1,
-};
-
-static struct resource e740_fb_resources[] = {
-       [0] = {
-               .start          = 0x0c000000,
-               .end            = 0x0cffffff,
-               .flags          = IORESOURCE_MEM,
-       },
-};
-
-/* ----------------------- device declarations -------------------------- */
-
-
-static struct platform_device e740_fb_device = {
-       .name           = "w100fb",
-       .id             = -1,
-       .dev            = {
-               .platform_data  = &e740_fb_info,
-       },
-       .num_resources  = ARRAY_SIZE(e740_fb_resources),
-       .resource       = e740_fb_resources,
-};
-
-static int e740_lcd_init(void)
-{
-       int ret;
-
-       if (!machine_is_e740())
-               return -ENODEV;
-
-       return platform_device_register(&e740_fb_device);
-}
-
-module_init(e740_lcd_init);
-
-MODULE_AUTHOR("Ian Molton <spyro@f2s.com>");
-MODULE_DESCRIPTION("e740 lcd driver");
-MODULE_LICENSE("GPLv2");
similarity index 61%
rename from arch/arm/mach-pxa/e750_lcd.c
rename to arch/arm/mach-pxa/e750.c
index 75edc3b5390f2a71c286308de3123fde0e6e5805..640e738b85df44b96d9b7493ad5b0c5ada1f98b5 100644 (file)
@@ -1,25 +1,35 @@
-/* e750_lcd.c
+/*
+ * Hardware definitions for the Toshiba eseries PDAs
  *
- * This file contains the definitions for the LCD timings and functions
- * to control the LCD power / frontlighting via the w100fb driver.
+ * Copyright (c) 2003 Ian Molton <spyro@f2s.com>
  *
- * (c) 2005 Ian Molton <spyro@f2s.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.
+ * This file is licensed under
+ * the terms of the GNU General Public License version 2. This program
+ * is licensed "as is" without any warranty of any kind, whether express
+ * or implied.
  *
  */
 
-#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/init.h>
 #include <linux/device.h>
-#include <linux/fb.h>
-#include <linux/err.h>
 #include <linux/platform_device.h>
+#include <linux/fb.h>
+
+#include <video/w100fb.h>
 
+#include <asm/setup.h>
+#include <asm/mach/arch.h>
 #include <asm/mach-types.h>
 
-#include <video/w100fb.h>
+#include <mach/mfp-pxa25x.h>
+#include <mach/hardware.h>
+#include <mach/udc.h>
+
+#include "generic.h"
+#include "eseries.h"
+
+/* ---------------------- E750 LCD definitions -------------------- */
 
 static struct w100_gen_regs e750_lcd_regs = {
        .lcd_format =            0x00008003,
@@ -54,7 +64,6 @@ static struct w100_mode e750_lcd_mode = {
        .sysclk_src     = CLK_SRC_PLL,
 };
 
-
 static struct w100_gpio_regs e750_w100_gpio_info = {
        .init_data1 = 0x01192f1b,
        .gpio_dir1  = 0xd5ffdeff,
@@ -81,9 +90,6 @@ static struct resource e750_fb_resources[] = {
        },
 };
 
-/* ----------------------- device declarations -------------------------- */
-
-
 static struct platform_device e750_fb_device = {
        .name           = "w100fb",
        .id             = -1,
@@ -94,16 +100,27 @@ static struct platform_device e750_fb_device = {
        .resource       = e750_fb_resources,
 };
 
-static int e750_lcd_init(void)
-{
-       if (!machine_is_e750())
-               return -ENODEV;
+/* ----------------------------------------------------------------------- */
 
-       return platform_device_register(&e750_fb_device);
+static struct platform_device *devices[] __initdata = {
+       &e750_fb_device,
+};
+
+static void __init e750_init(void)
+{
+       platform_add_devices(devices, ARRAY_SIZE(devices));
+       pxa_set_udc_info(&e7xx_udc_mach_info);
 }
 
-module_init(e750_lcd_init);
+MACHINE_START(E750, "Toshiba e750")
+       /* Maintainer: Ian Molton (spyro@f2s.com) */
+       .phys_io        = 0x40000000,
+       .io_pg_offst    = (io_p2v(0x40000000) >> 18) & 0xfffc,
+       .boot_params    = 0xa0000100,
+       .map_io         = pxa_map_io,
+       .init_irq       = pxa25x_init_irq,
+       .fixup          = eseries_fixup,
+       .init_machine   = e750_init,
+       .timer          = &pxa_timer,
+MACHINE_END
 
-MODULE_AUTHOR("Ian Molton <spyro@f2s.com>");
-MODULE_DESCRIPTION("e750 lcd driver");
-MODULE_LICENSE("GPLv2");
similarity index 65%
rename from arch/arm/mach-pxa/e800_lcd.c
rename to arch/arm/mach-pxa/e800.c
index e6aeab0ebc22d5bfef43ca3da766d9c25ba3f2cf..a293e09bfe2530f38dfc7c01090244e9a9f70534 100644 (file)
@@ -1,25 +1,36 @@
-/* e800_lcd.c
+/*
+ * Hardware definitions for the Toshiba eseries PDAs
  *
- * This file contains the definitions for the LCD timings and functions
- * to control the LCD power / frontlighting via the w100fb driver.
+ * Copyright (c) 2003 Ian Molton <spyro@f2s.com>
  *
- * (c) 2005 Ian Molton <spyro@f2s.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.
+ * This file is licensed under
+ * the terms of the GNU General Public License version 2. This program
+ * is licensed "as is" without any warranty of any kind, whether express
+ * or implied.
  *
  */
 
-#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/init.h>
 #include <linux/device.h>
-#include <linux/fb.h>
-#include <linux/err.h>
 #include <linux/platform_device.h>
+#include <linux/fb.h>
+
+#include <video/w100fb.h>
 
+#include <asm/setup.h>
+#include <asm/mach/arch.h>
 #include <asm/mach-types.h>
 
-#include <video/w100fb.h>
+#include <mach/mfp-pxa25x.h>
+#include <mach/hardware.h>
+#include <mach/eseries-gpio.h>
+#include <mach/udc.h>
+
+#include "generic.h"
+#include "eseries.h"
+
+/* ------------------------ e800 LCD definitions ------------------------- */
 
 static struct w100_gen_regs e800_lcd_regs = {
        .lcd_format =            0x00008003,
@@ -71,8 +82,8 @@ static struct w100_mode e800_lcd_mode[2] = {
                .crtc_goe        = 0x80cc0015,
                .crtc_ps1_active = 0x00000000,
                .pll_freq        = 100,
-               .pixclk_divider         = 6, /* Wince uses 14 which gives a 7MHz pclk. */
-               .pixclk_divider_rotated = 6, /* we want a 14MHz one (much nicer to look at) */
+               .pixclk_divider         = 6, /* Wince uses 14 which gives a */
+               .pixclk_divider_rotated = 6, /* 7MHz Pclk. We use a 14MHz one */
                .pixclk_src     = CLK_SRC_PLL,
                .sysclk_divider  = 0,
                .sysclk_src     = CLK_SRC_PLL,
@@ -131,9 +142,6 @@ static struct resource e800_fb_resources[] = {
        },
 };
 
-/* ----------------------- device declarations -------------------------- */
-
-
 static struct platform_device e800_fb_device = {
        .name           = "w100fb",
        .id             = -1,
@@ -144,16 +152,35 @@ static struct platform_device e800_fb_device = {
        .resource       = e800_fb_resources,
 };
 
-static int e800_lcd_init(void)
-{
-       if (!machine_is_e800())
-               return -ENODEV;
+/* --------------------------- UDC definitions --------------------------- */
+
+static struct pxa2xx_udc_mach_info e800_udc_mach_info = {
+       .gpio_vbus   = GPIO_E800_USB_DISC,
+       .gpio_pullup = GPIO_E800_USB_PULLUP,
+       .gpio_pullup_inverted = 1
+};
 
-       return platform_device_register(&e800_fb_device);
+/* ----------------------------------------------------------------------- */
+
+static struct platform_device *devices[] __initdata = {
+       &e800_fb_device,
+};
+
+static void __init e800_init(void)
+{
+       platform_add_devices(devices, ARRAY_SIZE(devices));
+       pxa_set_udc_info(&e800_udc_mach_info);
 }
 
-module_init(e800_lcd_init);
+MACHINE_START(E800, "Toshiba e800")
+       /* Maintainer: Ian Molton (spyro@f2s.com) */
+       .phys_io        = 0x40000000,
+       .io_pg_offst    = (io_p2v(0x40000000) >> 18) & 0xfffc,
+       .boot_params    = 0xa0000100,
+       .map_io         = pxa_map_io,
+       .init_irq       = pxa25x_init_irq,
+       .fixup          = eseries_fixup,
+       .init_machine   = e800_init,
+       .timer          = &pxa_timer,
+MACHINE_END
 
-MODULE_AUTHOR("Ian Molton <spyro@f2s.com>");
-MODULE_DESCRIPTION("e800 lcd driver");
-MODULE_LICENSE("GPLv2");
index 7a0a681a58475d98c7449e0bcc0149e786b9acec..f5ed8038ede5bb5da55af602fdf2a98e02691746 100644 (file)
@@ -373,10 +373,6 @@ static inline void em_x270_init_nand(void) {}
 #if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)
 static int em_x270_ohci_init(struct device *dev)
 {
-       /* Set the Power Control Polarity Low */
-       UHCHR = (UHCHR | UHCHR_PCPL) &
-               ~(UHCHR_SSEP1 | UHCHR_SSEP2 | UHCHR_SSE);
-
        /* enable port 2 transiever */
        UP2OCR = UP2OCR_HXS | UP2OCR_HXOE;
 
@@ -385,6 +381,7 @@ static int em_x270_ohci_init(struct device *dev)
 
 static struct pxaohci_platform_data em_x270_ohci_platform_data = {
        .port_mode      = PMM_PERPORT_MODE,
+       .flags          = ENABLE_PORT1 | ENABLE_PORT2 | POWER_CONTROL_LOW,
        .init           = em_x270_ohci_init,
 };
 
index 001a252bd514379e677edb0d247b8ac542005b28..d28849b50a142f7a9bce40994c92e050d50fd34c 100644 (file)
 
 #include <mach/mfp-pxa25x.h>
 #include <mach/hardware.h>
+#include <mach/eseries-gpio.h>
+#include <mach/udc.h>
 
 #include "generic.h"
 
-static unsigned long e740_pin_config[] __initdata = {
-       /* Chip selects */
-       GPIO15_nCS_1,   /* CS1 - Flash */
-       GPIO79_nCS_3,   /* CS3 - IMAGEON */
-       GPIO80_nCS_4,   /* CS4 - TMIO */
-
-       /* Clocks */
-       GPIO12_32KHz,
-
-       /* BTUART */
-       GPIO42_BTUART_RXD,
-       GPIO43_BTUART_TXD,
-       GPIO44_BTUART_CTS,
-       GPIO45_GPIO, /* Used by TMIO for #SUSPEND */
-
-       /* PC Card */
-       GPIO8_GPIO,   /* CD0 */
-       GPIO44_GPIO,  /* CD1 */
-       GPIO11_GPIO,  /* IRQ0 */
-       GPIO6_GPIO,   /* IRQ1 */
-       GPIO27_GPIO,  /* RST0 */
-       GPIO24_GPIO,  /* RST1 */
-       GPIO20_GPIO,  /* PWR0 */
-       GPIO23_GPIO,  /* PWR1 */
-       GPIO48_nPOE,
-       GPIO49_nPWE,
-       GPIO50_nPIOR,
-       GPIO51_nPIOW,
-       GPIO52_nPCE_1,
-       GPIO53_nPCE_2,
-       GPIO54_nPSKTSEL,
-       GPIO55_nPREG,
-       GPIO56_nPWAIT,
-       GPIO57_nIOIS16,
-
-       /* wakeup */
-       GPIO0_GPIO | WAKEUP_ON_EDGE_RISE,
-};
-
-static unsigned long e400_pin_config[] __initdata = {
-       /* Chip selects */
-       GPIO15_nCS_1,   /* CS1 - Flash */
-       GPIO80_nCS_4,   /* CS4 - TMIO */
-
-       /* Clocks */
-       GPIO12_32KHz,
-
-       /* BTUART */
-       GPIO42_BTUART_RXD,
-       GPIO43_BTUART_TXD,
-       GPIO44_BTUART_CTS,
-       GPIO45_GPIO, /* Used by TMIO for #SUSPEND */
-
-       /* wakeup */
-       GPIO0_GPIO | WAKEUP_ON_EDGE_RISE,
-};
-
 /* Only e800 has 128MB RAM */
-static void __init eseries_fixup(struct machine_desc *desc,
+void __init eseries_fixup(struct machine_desc *desc,
        struct tag *tags, char **cmdline, struct meminfo *mi)
 {
        mi->nr_banks=1;
@@ -92,95 +37,9 @@ static void __init eseries_fixup(struct machine_desc *desc,
                mi->bank[0].size = (64*1024*1024);
 }
 
-static void __init e740_init(void)
-{
-       pxa2xx_mfp_config(ARRAY_AND_SIZE(e740_pin_config));
-}
-
-static void __init e400_init(void)
-{
-       pxa2xx_mfp_config(ARRAY_AND_SIZE(e400_pin_config));
-}
-
-/* e-series machine definitions */
-
-#ifdef CONFIG_MACH_E330
-MACHINE_START(E330, "Toshiba e330")
-       /* Maintainer: Ian Molton (spyro@f2s.com) */
-       .phys_io        = 0x40000000,
-       .io_pg_offst    = (io_p2v(0x40000000) >> 18) & 0xfffc,
-       .boot_params    = 0xa0000100,
-       .map_io         = pxa_map_io,
-       .init_irq       = pxa25x_init_irq,
-       .fixup          = eseries_fixup,
-       .timer          = &pxa_timer,
-MACHINE_END
-#endif
-
-#ifdef CONFIG_MACH_E350
-MACHINE_START(E350, "Toshiba e350")
-       /* Maintainer: Ian Molton (spyro@f2s.com) */
-       .phys_io        = 0x40000000,
-       .io_pg_offst    = (io_p2v(0x40000000) >> 18) & 0xfffc,
-       .boot_params    = 0xa0000100,
-       .map_io         = pxa_map_io,
-       .init_irq       = pxa25x_init_irq,
-       .fixup          = eseries_fixup,
-       .timer          = &pxa_timer,
-MACHINE_END
-#endif
-
-#ifdef CONFIG_MACH_E740
-MACHINE_START(E740, "Toshiba e740")
-       /* Maintainer: Ian Molton (spyro@f2s.com) */
-       .phys_io        = 0x40000000,
-       .io_pg_offst    = (io_p2v(0x40000000) >> 18) & 0xfffc,
-       .boot_params    = 0xa0000100,
-       .map_io         = pxa_map_io,
-       .init_irq       = pxa25x_init_irq,
-       .fixup          = eseries_fixup,
-       .init_machine   = e740_init,
-       .timer          = &pxa_timer,
-MACHINE_END
-#endif
-
-#ifdef CONFIG_MACH_E750
-MACHINE_START(E750, "Toshiba e750")
-       /* Maintainer: Ian Molton (spyro@f2s.com) */
-       .phys_io        = 0x40000000,
-       .io_pg_offst    = (io_p2v(0x40000000) >> 18) & 0xfffc,
-       .boot_params    = 0xa0000100,
-       .map_io         = pxa_map_io,
-       .init_irq       = pxa25x_init_irq,
-       .fixup          = eseries_fixup,
-       .timer          = &pxa_timer,
-MACHINE_END
-#endif
-
-#ifdef CONFIG_MACH_E400
-MACHINE_START(E400, "Toshiba e400")
-       /* Maintainer: Ian Molton (spyro@f2s.com) */
-       .phys_io        = 0x40000000,
-       .io_pg_offst    = (io_p2v(0x40000000) >> 18) & 0xfffc,
-       .boot_params    = 0xa0000100,
-       .map_io         = pxa_map_io,
-       .init_irq       = pxa25x_init_irq,
-       .fixup          = eseries_fixup,
-       .init_machine   = e400_init,
-       .timer          = &pxa_timer,
-MACHINE_END
-#endif
-
-#ifdef CONFIG_MACH_E800
-MACHINE_START(E800, "Toshiba e800")
-       /* Maintainer: Ian Molton (spyro@f2s.com) */
-       .phys_io        = 0x40000000,
-       .io_pg_offst    = (io_p2v(0x40000000) >> 18) & 0xfffc,
-       .boot_params    = 0xa0000100,
-       .map_io         = pxa_map_io,
-       .init_irq       = pxa25x_init_irq,
-       .fixup          = eseries_fixup,
-       .timer          = &pxa_timer,
-MACHINE_END
-#endif
+struct pxa2xx_udc_mach_info e7xx_udc_mach_info = {
+       .gpio_vbus   = GPIO_E7XX_USB_DISC,
+       .gpio_pullup = GPIO_E7XX_USB_PULLUP,
+       .gpio_pullup_inverted = 1
+};
 
diff --git a/arch/arm/mach-pxa/eseries.h b/arch/arm/mach-pxa/eseries.h
new file mode 100644 (file)
index 0000000..a83f88d
--- /dev/null
@@ -0,0 +1,4 @@
+void __init eseries_fixup(struct machine_desc *desc,
+       struct tag *tags, char **cmdline, struct meminfo *mi);
+
+extern struct pxa2xx_udc_mach_info e7xx_udc_mach_info;
diff --git a/arch/arm/mach-pxa/eseries_udc.c b/arch/arm/mach-pxa/eseries_udc.c
deleted file mode 100644 (file)
index d622c04..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * UDC functions for the Toshiba e-series PDAs
- *
- * Copyright (c) Ian Molton 2003
- *
- * This file is licensed under
- * the terms of the GNU General Public License version 2. This program
- * is licensed "as is" without any warranty of any kind, whether express
- * or implied.
- *
- */
-
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <linux/device.h>
-
-#include <mach/udc.h>
-#include <mach/eseries-gpio.h>
-#include <mach/hardware.h>
-#include <mach/pxa-regs.h>
-#include <asm/mach/arch.h>
-#include <asm/mach-types.h>
-#include <asm/mach/map.h>
-#include <asm/domain.h>
-
-/* local PXA generic code */
-#include "generic.h"
-
-static struct pxa2xx_udc_mach_info e7xx_udc_mach_info = {
-       .gpio_vbus   = GPIO_E7XX_USB_DISC,
-       .gpio_pullup = GPIO_E7XX_USB_PULLUP,
-       .gpio_pullup_inverted = 1
-};
-
-static struct pxa2xx_udc_mach_info e800_udc_mach_info = {
-       .gpio_vbus   = GPIO_E800_USB_DISC,
-       .gpio_pullup = GPIO_E800_USB_PULLUP,
-       .gpio_pullup_inverted = 1
-};
-
-static int __init eseries_udc_init(void)
-{
-       if (machine_is_e330() || machine_is_e350() ||
-           machine_is_e740() || machine_is_e750() ||
-           machine_is_e400())
-               pxa_set_udc_info(&e7xx_udc_mach_info);
-       else if (machine_is_e800())
-               pxa_set_udc_info(&e800_udc_mach_info);
-
-       return 0;
-}
-
-module_init(eseries_udc_init);
-
-MODULE_AUTHOR("Ian Molton <spyro@f2s.com>");
-MODULE_DESCRIPTION("eseries UDC support");
-MODULE_LICENSE("GPLv2");
index ceaed007636631f6aa5d471222dcde9b743010a6..85ed0b33331f93ec3887cb47d076a148f61037c7 100644 (file)
@@ -46,7 +46,7 @@ void clear_reset_status(unsigned int mask)
  */
 unsigned int get_clk_frequency_khz(int info)
 {
-       if (cpu_is_pxa21x() || cpu_is_pxa25x())
+       if (cpu_is_pxa25x())
                return pxa25x_get_clk_frequency_khz(info);
        else if (cpu_is_pxa27x())
                return pxa27x_get_clk_frequency_khz(info);
@@ -60,7 +60,7 @@ EXPORT_SYMBOL(get_clk_frequency_khz);
  */
 unsigned int get_memclk_frequency_10khz(void)
 {
-       if (cpu_is_pxa21x() || cpu_is_pxa25x())
+       if (cpu_is_pxa25x())
                return pxa25x_get_memclk_frequency_10khz();
        else if (cpu_is_pxa27x())
                return pxa27x_get_memclk_frequency_10khz();
@@ -88,11 +88,6 @@ static struct map_desc standard_io_desc[] __initdata = {
                .pfn            = __phys_to_pfn(0x48000000),
                .length         = 0x00200000,
                .type           = MT_DEVICE
-       }, {    /* USB host */
-               .virtual        =  0xf8000000,
-               .pfn            = __phys_to_pfn(0x4c000000),
-               .length         = 0x00100000,
-               .type           = MT_DEVICE
        }, {    /* Camera */
                .virtual        =  0xfa000000,
                .pfn            = __phys_to_pfn(0x50000000),
index 041c048320e471f07fb2e1cff0a453ea1255d5bd..dc876a8e6668a048b1176ede5e4378ce86bd67b4 100644 (file)
@@ -65,4 +65,5 @@ static inline void pxa3xx_clear_reset_status(unsigned int mask) {}
 
 extern struct sysdev_class pxa_irq_sysclass;
 extern struct sysdev_class pxa_gpio_sysclass;
+extern struct sysdev_class pxa2xx_mfp_sysclass;
 extern struct sysdev_class pxa3xx_mfp_sysclass;
index 07acc1b2385795e71aaae6d007482a499a044388..14930cf8be7b58d27d523310c02a7e6fe65f3ed4 100644 (file)
 #include <linux/module.h>
 #include <linux/irq.h>
 #include <linux/sysdev.h>
+#include <linux/io.h>
 
 #include <asm/gpio.h>
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <mach/pxa-regs.h>
 #include <mach/pxa2xx-gpio.h>
 
@@ -275,7 +275,7 @@ static void pxa_gpio_demux_handler(unsigned int irq, struct irq_desc *desc)
                        loop = 1;
 
                        n = PXA_GPIO_IRQ_BASE + bit;
-                       desc_handle_irq(n, irq_desc + n);
+                       generic_handle_irq(n);
 
                        bit = find_next_bit(gedr, GEDR_BITS, bit + 1);
                }
index c0092472fa589761d4d6afc281bf9b4c6c4abac7..d8962a0fb98d98d4a113db16b5f2e7ef41fc4537 100644 (file)
 #include <linux/init.h>
 #include <linux/platform_device.h>
 #include <linux/interrupt.h>
+#include <linux/delay.h>
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/partitions.h>
+#include <linux/gpio.h>
+#include <linux/err.h>
+#include <linux/clk.h>
 
 #include <asm/setup.h>
 #include <asm/memory.h>
@@ -40,7 +44,7 @@
 
 #include <mach/pxa-regs.h>
 #include <mach/pxa2xx-regs.h>
-#include <mach/pxa2xx-gpio.h>
+#include <mach/mfp-pxa25x.h>
 
 #include "generic.h"
 
@@ -85,21 +89,8 @@ static struct platform_device *devices[] __initdata = {
 };
 
 #ifdef CONFIG_MMC_PXA
-static struct pxamci_platform_data gumstix_mci_platform_data;
-
-static int gumstix_mci_init(struct device *dev, irq_handler_t detect_int,
-                               void *data)
-{
-       pxa_gpio_mode(GPIO6_MMCCLK_MD);
-       pxa_gpio_mode(GPIO53_MMCCLK_MD);
-       pxa_gpio_mode(GPIO8_MMCCS0_MD);
-
-       return 0;
-}
-
 static struct pxamci_platform_data gumstix_mci_platform_data = {
        .ocr_mask       = MMC_VDD_32_33|MMC_VDD_33_34,
-       .init           = gumstix_mci_init,
 };
 
 static void __init gumstix_mmc_init(void)
@@ -109,11 +100,11 @@ static void __init gumstix_mmc_init(void)
 #else
 static void __init gumstix_mmc_init(void)
 {
-       printk(KERN_INFO "Gumstix mmc disabled\n");
+       pr_debug("Gumstix mmc disabled\n");
 }
 #endif
 
-#ifdef CONFIG_USB_GADGET_PXA2XX
+#ifdef CONFIG_USB_GADGET_PXA25X
 static struct pxa2xx_udc_mach_info gumstix_udc_info __initdata = {
        .gpio_vbus              = GPIO_GUMSTIX_USB_GPIOn,
        .gpio_pullup            = GPIO_GUMSTIX_USB_GPIOx,
@@ -126,12 +117,87 @@ static void __init gumstix_udc_init(void)
 #else
 static void gumstix_udc_init(void)
 {
-       printk(KERN_INFO "Gumstix udc is disabled\n");
+       pr_debug("Gumstix udc is disabled\n");
 }
 #endif
 
+#ifdef CONFIG_BT
+/* Normally, the bootloader would have enabled this 32kHz clock but many
+** boards still have u-boot 1.1.4 so we check if it has been turned on and
+** if not, we turn it on with a warning message. */
+static void gumstix_setup_bt_clock(void)
+{
+       int timeout = 500;
+
+       if (!(OSCC & OSCC_OOK))
+               pr_warning("32kHz clock was not on. Bootloader may need to "
+                               "be updated\n");
+       else
+               return;
+
+       OSCC |= OSCC_OON;
+       do {
+               if (OSCC & OSCC_OOK)
+                       break;
+               udelay(1);
+       } while (--timeout);
+       if (!timeout)
+               pr_err("Failed to start 32kHz clock\n");
+}
+
+static void __init gumstix_bluetooth_init(void)
+{
+       int err;
+
+       gumstix_setup_bt_clock();
+
+       err = gpio_request(GPIO_GUMSTIX_BTRESET, "BTRST");
+       if (err) {
+               pr_err("gumstix: failed request gpio for bluetooth reset\n");
+               return;
+       }
+
+       err = gpio_direction_output(GPIO_GUMSTIX_BTRESET, 1);
+       if (err) {
+               pr_err("gumstix: can't reset bluetooth\n");
+               return;
+       }
+       gpio_set_value(GPIO_GUMSTIX_BTRESET, 0);
+       udelay(100);
+       gpio_set_value(GPIO_GUMSTIX_BTRESET, 1);
+}
+#else
+static void gumstix_bluetooth_init(void)
+{
+       pr_debug("Gumstix Bluetooth is disabled\n");
+}
+#endif
+
+static unsigned long gumstix_pin_config[] __initdata = {
+       GPIO12_32KHz,
+       /* BTUART */
+       GPIO42_HWUART_RXD,
+       GPIO43_HWUART_TXD,
+       GPIO44_HWUART_CTS,
+       GPIO45_HWUART_RTS,
+       /* MMC */
+       GPIO6_MMC_CLK,
+       GPIO53_MMC_CLK,
+       GPIO8_MMC_CS0,
+       /* these are used by AM200EPD */
+       GPIO51_GPIO,
+       GPIO49_GPIO,
+       GPIO48_GPIO,
+       GPIO32_GPIO,
+       GPIO17_GPIO,
+       GPIO16_GPIO,
+};
+
 static void __init gumstix_init(void)
 {
+       pxa2xx_mfp_config(ARRAY_AND_SIZE(gumstix_pin_config));
+
+       gumstix_bluetooth_init();
        gumstix_udc_init();
        gumstix_mmc_init();
        (void) platform_add_devices(devices, ARRAY_SIZE(devices));
index 5aa0270d5605fc9814a7c86197842e0a0391ccbe..013b15baa0343a9059fc558c4591e07e3975c5ea 100644 (file)
@@ -32,7 +32,7 @@
 #include <asm/mach/map.h>
 
 #include <mach/pxa-regs.h>
-#include <mach/pxa2xx-gpio.h>
+#include <mach/mfp-pxa25x.h>
 #include <mach/idp.h>
 #include <mach/pxafb.h>
 #include <mach/bitfield.h>
  * - Ethernet interrupt
  */
 
+static unsigned long idp_pin_config[] __initdata = {
+       /* 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,
+
+       /* BTUART */
+       GPIO42_BTUART_RXD,
+       GPIO43_BTUART_TXD,
+       GPIO44_BTUART_CTS,
+       GPIO45_BTUART_RTS,
+
+       /* STUART */
+       GPIO46_STUART_RXD,
+       GPIO47_STUART_TXD,
+
+       /* MMC */
+       GPIO6_MMC_CLK,
+       GPIO8_MMC_CS0,
+
+       /* Ethernet */
+       GPIO33_nCS_5,   /* Ethernet CS */
+       GPIO4_GPIO,     /* Ethernet IRQ */
+};
+
 static struct resource smc91x_resources[] = {
        [0] = {
                .start  = (IDP_ETH_PHYS + 0x300),
@@ -121,44 +162,28 @@ static struct pxafb_mach_info sharp_lm8v31 = {
        .num_modes      = 1,
        .cmap_inverse   = 0,
        .cmap_static    = 0,
-       .lccr0          = LCCR0_SDS,
-       .lccr3          = LCCR3_PCP | LCCR3_Acb(255),
+       .lcd_conn       = LCD_COLOR_DSTN_16BPP | LCD_PCLK_EDGE_FALL |
+                         LCD_AC_BIAS_FREQ(255),
        .pxafb_backlight_power = &idp_backlight_power,
        .pxafb_lcd_power = &idp_lcd_power
 };
 
-static int idp_mci_init(struct device *dev, irq_handler_t idp_detect_int, void *data)
-{
-       /* setup GPIO for PXA25x MMC controller */
-       pxa_gpio_mode(GPIO6_MMCCLK_MD);
-       pxa_gpio_mode(GPIO8_MMCCS0_MD);
-
-       return 0;
-}
-
 static struct pxamci_platform_data idp_mci_platform_data = {
        .ocr_mask       = MMC_VDD_32_33|MMC_VDD_33_34,
-       .init           = idp_mci_init,
 };
 
 static void __init idp_init(void)
 {
        printk("idp_init()\n");
 
+       pxa2xx_mfp_config(ARRAY_AND_SIZE(idp_pin_config));
+
        platform_device_register(&smc91x_device);
        //platform_device_register(&mst_audio_device);
        set_pxa_fb_info(&sharp_lm8v31);
        pxa_set_mci_info(&idp_mci_platform_data);
 }
 
-static void __init idp_init_irq(void)
-{
-
-       pxa25x_init_irq();
-
-       set_irq_type(TOUCH_PANEL_IRQ, TOUCH_PANEL_IRQ_EDGE);
-}
-
 static struct map_desc idp_io_desc[] __initdata = {
        {
                .virtual        =  IDP_COREVOLT_VIRT,
@@ -177,15 +202,6 @@ static void __init idp_map_io(void)
 {
        pxa_map_io();
        iotable_init(idp_io_desc, ARRAY_SIZE(idp_io_desc));
-
-       // serial ports 2 & 3
-       pxa_gpio_mode(GPIO42_BTRXD_MD);
-       pxa_gpio_mode(GPIO43_BTTXD_MD);
-       pxa_gpio_mode(GPIO44_BTCTS_MD);
-       pxa_gpio_mode(GPIO45_BTRTS_MD);
-       pxa_gpio_mode(GPIO46_STRXD_MD);
-       pxa_gpio_mode(GPIO47_STTXD_MD);
-
 }
 
 
@@ -194,7 +210,7 @@ MACHINE_START(PXA_IDP, "Vibren PXA255 IDP")
        .phys_io        = 0x40000000,
        .io_pg_offst    = (io_p2v(0x40000000) >> 18) & 0xfffc,
        .map_io         = idp_map_io,
-       .init_irq       = idp_init_irq,
+       .init_irq       = pxa25x_init_irq,
        .timer          = &pxa_timer,
        .init_machine   = idp_init,
 MACHINE_END
diff --git a/arch/arm/mach-pxa/include/mach/akita.h b/arch/arm/mach-pxa/include/mach/akita.h
deleted file mode 100644 (file)
index 5d8cc1d..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Hardware specific definitions for SL-C1000 (Akita)
- *
- * Copyright (c) 2005 Richard Purdie
- *
- * 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.
- *
- */
-
-/* Akita IO Expander GPIOs */
-
-#define AKITA_IOEXP_RESERVED_7      (1 << 7)
-#define AKITA_IOEXP_IR_ON           (1 << 6)
-#define AKITA_IOEXP_AKIN_PULLUP     (1 << 5)
-#define AKITA_IOEXP_BACKLIGHT_CONT  (1 << 4)
-#define AKITA_IOEXP_BACKLIGHT_ON    (1 << 3)
-#define AKITA_IOEXP_MIC_BIAS        (1 << 2)
-#define AKITA_IOEXP_RESERVED_1      (1 << 1)
-#define AKITA_IOEXP_RESERVED_0      (1 << 0)
-
-/* Direction Bitfield  0=output  1=input */
-#define AKITA_IOEXP_IO_DIR     0
-/* Default Values */
-#define AKITA_IOEXP_IO_OUT     (AKITA_IOEXP_IR_ON | AKITA_IOEXP_AKIN_PULLUP)
-
-extern struct platform_device akitaioexp_device;
-
-void akita_set_ioexp(struct device *dev, unsigned char bitmask);
-void akita_reset_ioexp(struct device *dev, unsigned char bitmask);
-
index bf856503baf69666d4956a417db24ace9cc1e5a1..585970ef08cec208b3f70779f87cb85001ea5859 100644 (file)
                        CORGI_SCP_MIC_BIAS )
 #define CORGI_SCOOP_IO_OUT     ( CORGI_SCP_MUTE_L | CORGI_SCP_MUTE_R )
 
+#define CORGI_SCOOP_GPIO_BASE          (NR_BUILTIN_GPIO)
+#define CORGI_GPIO_LED_GREEN           (CORGI_SCOOP_GPIO_BASE + 0)
+#define CORGI_GPIO_SWA                 (CORGI_SCOOP_GPIO_BASE + 1)  /* Hinge Switch A */
+#define CORGI_GPIO_SWB                 (CORGI_SCOOP_GPIO_BASE + 2)  /* Hinge Switch B */
+#define CORGI_GPIO_MUTE_L              (CORGI_SCOOP_GPIO_BASE + 3)
+#define CORGI_GPIO_MUTE_R              (CORGI_SCOOP_GPIO_BASE + 4)
+#define CORGI_GPIO_AKIN_PULLUP         (CORGI_SCOOP_GPIO_BASE + 5)
+#define CORGI_GPIO_APM_ON              (CORGI_SCOOP_GPIO_BASE + 6)
+#define CORGI_GPIO_BACKLIGHT_CONT      (CORGI_SCOOP_GPIO_BASE + 7)
+#define CORGI_GPIO_MIC_BIAS            (CORGI_SCOOP_GPIO_BASE + 8)
 
 /*
  * Shared data structures
  */
 extern struct platform_device corgiscoop_device;
-extern struct platform_device corgissp_device;
 
 #endif /* __ASM_ARCH_CORGI_H  */
 
index de16c12d5232209c33b432d96b880d44541b3ada..f6b4bf3e73d240a69700d951197c26c5717d6eee 100644 (file)
@@ -41,7 +41,7 @@
                and     \irqstat, \irqstat, \irqnr
                clz     \irqnr, \irqstat
                rsb     \irqnr, \irqnr, #31
-               add     \irqnr, \irqnr, #32
+               add     \irqnr, \irqnr, #(32 + PXA_IRQ(0))
                b       1001f
 1003:
                mrc     p6, 0, \irqstat, c0, c0, 0      @ ICIP
@@ -52,6 +52,6 @@
                rsb     \irqstat, \irqnr, #0
                and     \irqstat, \irqstat, \irqnr
                clz     \irqnr, \irqstat
-               rsb     \irqnr, \irqnr, #31
+               rsb     \irqnr, \irqnr, #(31 + PXA_IRQ(0))
 1001:
                .endm
index e89df4d0d23999278dfdab688ed76aa3ecfc07d9..a582a6d9b92b10c93d6ecae6d95128472b4ae9a3 100644 (file)
 
 #ifndef __ASSEMBLY__
 
+#include <asm/cputype.h>
+
+/*
+ *   CPU     Stepping     CPU_ID         JTAG_ID
+ *
+ *  PXA210     B0      0x69052922      0x2926C013
+ *  PXA210     B1      0x69052923      0x3926C013
+ *  PXA210     B2      0x69052924      0x4926C013
+ *  PXA210     C0      0x69052D25      0x5926C013
+ *
+ *  PXA250     A0      0x69052100      0x09264013
+ *  PXA250     A1      0x69052101      0x19264013
+ *  PXA250     B0      0x69052902      0x29264013
+ *  PXA250     B1      0x69052903      0x39264013
+ *  PXA250     B2      0x69052904      0x49264013
+ *  PXA250     C0      0x69052D05      0x59264013
+ *
+ *  PXA255     A0      0x69052D06      0x69264013
+ *
+ *  PXA26x     A0      0x69052903      0x39264013
+ *  PXA26x     B0      0x69052D05      0x59264013
+ *
+ *  PXA27x     A0      0x69054110      0x09265013
+ *  PXA27x     A1      0x69054111      0x19265013
+ *  PXA27x     B0      0x69054112      0x29265013
+ *  PXA27x     B1      0x69054113      0x39265013
+ *  PXA27x     C0      0x69054114      0x49265013
+ *  PXA27x     C5      0x69054117      0x79265013
+ *
+ *  PXA30x     A0      0x69056880      0x0E648013
+ *  PXA30x     A1      0x69056881      0x1E648013
+ *  PXA31x     A0      0x69056890      0x0E649013
+ *  PXA31x     A1      0x69056891      0x1E649013
+ *  PXA31x     A2      0x69056892      0x2E649013
+ *  PXA32x     B1      0x69056825      0x5E642013
+ *  PXA32x     B2      0x69056826      0x6E642013
+ *
+ *  PXA930     B0      0x69056835      0x5E643013
+ *  PXA930     B1      0x69056837      0x7E643013
+ *  PXA930     B2      0x69056838      0x8E643013
+ */
 #ifdef CONFIG_PXA25x
-#define __cpu_is_pxa21x(id)                            \
+#define __cpu_is_pxa210(id)                            \
        ({                                              \
-               unsigned int _id = (id) >> 4 & 0xf3f;   \
-               _id == 0x212                          \
+               unsigned int _id = (id) & 0xf3f0;       \
+               _id == 0x2120;                          \
        })
 
-#define __cpu_is_pxa255(id)                             \
-       ({                                              \
-               unsigned int _id = (id) >> 4 & 0xfff;   \
-               _id == 0x2d0;                           \
-        })
+#define __cpu_is_pxa250(id)                            \
+       ({                                              \
+               unsigned int _id = (id) & 0xf3ff;       \
+               _id <= 0x2105;                          \
+       })
+
+#define __cpu_is_pxa255(id)                            \
+       ({                                              \
+               unsigned int _id = (id) & 0xffff;       \
+               _id == 0x2d06;                          \
+       })
 
 #define __cpu_is_pxa25x(id)                            \
        ({                                              \
-               unsigned int _id = (id) >> 4 & 0xfff;   \
-               _id == 0x2d0 || _id == 0x290;           \
+               unsigned int _id = (id) & 0xf300;       \
+               _id == 0x2100;                          \
        })
 #else
-#define __cpu_is_pxa21x(id)    (0)
+#define __cpu_is_pxa210(id)    (0)
+#define __cpu_is_pxa250(id)    (0)
 #define __cpu_is_pxa255(id)    (0)
 #define __cpu_is_pxa25x(id)    (0)
 #endif
 #define __cpu_is_pxa930(id)    (0)
 #endif
 
-#define cpu_is_pxa21x()                                        \
+#define cpu_is_pxa210()                                        \
        ({                                              \
-               __cpu_is_pxa21x(read_cpuid_id());       \
+               __cpu_is_pxa210(read_cpuid_id());       \
+       })
+
+#define cpu_is_pxa250()                                        \
+       ({                                              \
+               __cpu_is_pxa250(read_cpuid_id());       \
        })
 
 #define cpu_is_pxa255()                                 \
                __cpu_is_pxa25x(read_cpuid_id());       \
        })
 
+extern int cpu_is_pxa26x(void);
+
 #define cpu_is_pxa27x()                                        \
        ({                                              \
                __cpu_is_pxa27x(read_cpuid_id());       \
index 80596b0134439412bc09c24472923bb7cfdc5cb0..1a9f65e6ec0f043a4e45ff58c0220db5194e737d 100644 (file)
@@ -65,13 +65,18 @@ struct i2c_pxa_platform_data {
        unsigned int            slave_addr;
        struct i2c_slave_client *slave;
        unsigned int            class;
-       int                     use_pio;
+       unsigned int            use_pio :1;
+       unsigned int            fast_mode :1;
 };
 
 extern void pxa_set_i2c_info(struct i2c_pxa_platform_data *info);
 
 #ifdef CONFIG_PXA27x
-extern void pxa_set_i2c_power_info(struct i2c_pxa_platform_data *info);
+extern void pxa27x_set_i2c_power_info(struct i2c_pxa_platform_data *info);
+#endif
+
+#ifdef CONFIG_PXA3xx
+extern void pxa3xx_set_i2c_power_info(struct i2c_pxa_platform_data *info);
 #endif
 
 #endif
index 108b5db9b2af67c3d96ef9810184410332bffda4..9c163e19ada939053f8b9366816d59c872d6369f 100644 (file)
  */
 
 
-#define PXA_IRQ(x)     (x)
+#ifdef CONFIG_PXA_HAVE_ISA_IRQS
+#define PXA_ISA_IRQ(x) (x)
+#define PXA_ISA_IRQ_NUM        (16)
+#else
+#define PXA_ISA_IRQ_NUM        (0)
+#endif
+
+#define PXA_IRQ(x)     (PXA_ISA_IRQ_NUM + (x))
 
 #if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx)
 #define IRQ_SSP3       PXA_IRQ(0)      /* SSP3 service request */
@@ -73,7 +80,7 @@
 #define IRQ_MMC3       PXA_IRQ(55)     /* MMC3 Controller (PXA310) */
 #endif
 
-#define PXA_GPIO_IRQ_BASE      (64)
+#define PXA_GPIO_IRQ_BASE      PXA_IRQ(64)
 #define PXA_GPIO_IRQ_NUM       (128)
 
 #define GPIO_2_x_TO_IRQ(x)     (PXA_GPIO_IRQ_BASE + (x))
 #define NR_IRQS                        (IRQ_S1_BVD1_STSCHG + 1)
 #elif defined(CONFIG_SHARP_LOCOMO)
 #define NR_IRQS                        (IRQ_LOCOMO_SPI_TEND + 1)
-#elif defined(CONFIG_ARCH_LUBBOCK) || \
-      defined(CONFIG_MACH_LOGICPD_PXA270) || \
-      defined(CONFIG_MACH_TOSA) || \
-      defined(CONFIG_MACH_MAINSTONE) || \
-      defined(CONFIG_MACH_PCM027) || \
-      defined(CONFIG_ARCH_PXA_ESERIES) || \
-      defined(CONFIG_MACH_MAGICIAN)
+#elif defined(CONFIG_PXA_HAVE_BOARD_IRQS)
 #define NR_IRQS                        (IRQ_BOARD_END)
 #elif defined(CONFIG_MACH_ZYLONITE)
 #define NR_IRQS                        (IRQ_BOARD_START + 32)
index 79d209b826f46779cb44a43cfcbf6d999a920c3e..5c4e320c1437f4e57d7fa2409183dd48be103692 100644 (file)
@@ -3,4 +3,6 @@
 
 #define LITTLETON_ETH_PHYS     0x30000000
 
+#define LITTLETON_GPIO_LCD_CS  (17)
+
 #endif /* __ASM_ARCH_ZYLONITE_H */
index 552eb7fa657925bb5b528226137dd6f0721e1637..59aef89808d6609cb371c4bf1d15b78fcd52dd19 100644 (file)
 #define NODE_MEM_SIZE_BITS     26
 
 #if !defined(__ASSEMBLY__) && defined(CONFIG_MACH_ARMCORE) && defined(CONFIG_PCI)
-void cmx270_pci_adjust_zones(int node, unsigned long *size,
+void cmx2xx_pci_adjust_zones(int node, unsigned long *size,
                             unsigned long *holes);
 
 #define arch_adjust_zones(node, size, holes) \
-       cmx270_pci_adjust_zones(node, size, holes)
+       cmx2xx_pci_adjust_zones(node, size, holes)
 
 #define ISA_DMA_THRESHOLD      (PHYS_OFFSET + SZ_64M - 1)
 #endif
index 6c8e72238bfd360cb2680d35cfd429301be3b0c2..617cab2cc8d0fcd7edb682134d3c10b6b1ca6389 100644 (file)
@@ -17,7 +17,7 @@
 
 /* Crystal and Clock Signals */
 #define GPIO10_RTCCLK          MFP_CFG_OUT(GPIO10, AF1, DRIVE_LOW)
-#define GPIO70_RTC_CLK         MFP_CFG_OUT(GPIO70, AF1, DRIVE_LOW)
+#define GPIO70_RTCCLK          MFP_CFG_OUT(GPIO70, AF1, DRIVE_LOW)
 #define GPIO7_48MHz            MFP_CFG_OUT(GPIO7,  AF1, DRIVE_LOW)
 #define GPIO11_3_6MHz          MFP_CFG_OUT(GPIO11, AF1, DRIVE_LOW)
 #define GPIO71_3_6MHz          MFP_CFG_OUT(GPIO71, AF1, DRIVE_LOW)
 #define GPIO74_LCD_FCLK                MFP_CFG_OUT(GPIO74, AF2, DRIVE_LOW)
 #define GPIO75_LCD_LCLK                MFP_CFG_OUT(GPIO75, AF2, DRIVE_LOW)
 #define GPIO76_LCD_PCLK                MFP_CFG_OUT(GPIO76, AF2, DRIVE_LOW)
-#define GPIO77_LCD_ACBIAS      MFP_CFG_OUT(GPIO77, AF2, DRIVE_LOW)
+#define GPIO77_LCD_BIAS                MFP_CFG_OUT(GPIO77, AF2, DRIVE_LOW)
 
 #endif /* __ASM_ARCH_MFP_PXA25X_H */
index 74990510cf34846c47d2f7db46e97d4cf3e6bf02..67f8385ea548994aa5ac345d4341028cd10cda70 100644 (file)
 #define GPIO38_SSP2_RXD                MFP_CFG(GPIO38, AF2)
 #define GPIO38_SSP2_TXD                MFP_CFG(GPIO38, AF5)
 
-#define GPIO69_SSP3_SCLK       MFP_CFG(GPIO69, AF2, DS08X, FLOAT)
-#define GPIO70_SSP3_FRM                MFP_CFG(GPIO70, AF2, DS08X, DRIVE_LOW)
-#define GPIO89_SSP3_SCLK       MFP_CFG(GPIO89, AF1, DS08X, FLOAT)
-#define GPIO90_SSP3_FRM                MFP_CFG(GPIO90, AF1, DS08X, DRIVE_LOW)
+#define GPIO69_SSP3_SCLK       MFP_CFG_X(GPIO69, AF2, DS08X, FLOAT)
+#define GPIO70_SSP3_FRM                MFP_CFG_X(GPIO70, AF2, DS08X, DRIVE_LOW)
+#define GPIO89_SSP3_SCLK       MFP_CFG_X(GPIO89, AF1, DS08X, FLOAT)
+#define GPIO90_SSP3_FRM                MFP_CFG_X(GPIO90, AF1, DS08X, DRIVE_LOW)
 #define GPIO71_SSP3_RXD                MFP_CFG_X(GPIO71, AF5, DS08X, FLOAT)
 #define GPIO71_SSP3_TXD                MFP_CFG_X(GPIO71, AF2, DS08X, DRIVE_LOW)
 #define GPIO72_SSP3_RXD                MFP_CFG_X(GPIO72, AF2, DS08X, FLOAT)
index 8769567b389b15d5178ddbc4dc997f68d83e88de..482185053a92297edc0e409899e13e8b3abd2751 100644 (file)
@@ -274,12 +274,13 @@ typedef unsigned long mfp_cfg_t;
 #define MFP_DS_MASK            (0x7 << 13)
 #define MFP_DS(x)              (((x) >> 13) & 0x7)
 
-#define MFP_LPM_INPUT          (0x0 << 16)
+#define MFP_LPM_DEFAULT                (0x0 << 16)
 #define MFP_LPM_DRIVE_LOW      (0x1 << 16)
 #define MFP_LPM_DRIVE_HIGH     (0x2 << 16)
 #define MFP_LPM_PULL_LOW       (0x3 << 16)
 #define MFP_LPM_PULL_HIGH      (0x4 << 16)
 #define MFP_LPM_FLOAT          (0x5 << 16)
+#define MFP_LPM_INPUT          (0x6 << 16)
 #define MFP_LPM_STATE_MASK     (0x7 << 16)
 #define MFP_LPM_STATE(x)       (((x) >> 16) & 0x7)
 
@@ -297,7 +298,7 @@ typedef unsigned long mfp_cfg_t;
 #define MFP_PULL_MASK          (0x3 << 21)
 #define MFP_PULL(x)            (((x) >> 21) & 0x3)
 
-#define MFP_CFG_DEFAULT                (MFP_AF0 | MFP_DS03X | MFP_LPM_INPUT |\
+#define MFP_CFG_DEFAULT                (MFP_AF0 | MFP_DS03X | MFP_LPM_DEFAULT |\
                                 MFP_LPM_EDGE_NONE | MFP_PULL_NONE)
 
 #define MFP_CFG(pin, af)               \
diff --git a/arch/arm/mach-pxa/include/mach/mioa701.h b/arch/arm/mach-pxa/include/mach/mioa701.h
new file mode 100644 (file)
index 0000000..8483cb5
--- /dev/null
@@ -0,0 +1,67 @@
+#ifndef _MIOA701_H_
+#define _MIOA701_H_
+
+#define MIO_CFG_IN(pin, af)            \
+       ((MFP_CFG_DEFAULT & ~(MFP_AF_MASK | MFP_DIR_MASK)) |\
+        (MFP_PIN(pin) | MFP_##af | MFP_DIR_IN))
+
+#define MIO_CFG_OUT(pin, af, state)    \
+       ((MFP_CFG_DEFAULT & ~(MFP_AF_MASK | MFP_DIR_MASK | MFP_LPM_STATE_MASK)) |\
+        (MFP_PIN(pin) | MFP_##af | MFP_DIR_OUT | MFP_LPM_##state))
+
+/* Global GPIOs */
+#define GPIO9_CHARGE_nEN                       9
+#define GPIO18_POWEROFF                                18
+#define GPIO87_LCD_POWER                       87
+
+/* USB */
+#define GPIO13_USB_DETECT                      13
+#define GPIO22_USB_ENABLE                      22
+
+/* SDIO bits */
+#define GPIO78_SDIO_RO                         78
+#define GPIO15_SDIO_INSERT                     15
+#define GPIO91_SDIO_EN                         91
+
+/* Bluetooth */
+#define GPIO83_BT_ON                           83
+
+/* GPS */
+#define GPIO23_GPS_UNKNOWN1                    23
+#define GPIO26_GPS_ON                          26
+#define GPIO27_GPS_RESET                       27
+#define GPIO106_GPS_UNKNOWN2                   106
+#define GPIO107_GPS_UNKNOWN3                   107
+
+/* GSM */
+#define GPIO24_GSM_MOD_RESET_CMD               24
+#define GPIO88_GSM_nMOD_ON_CMD                 88
+#define GPIO90_GSM_nMOD_OFF_CMD                        90
+#define GPIO114_GSM_nMOD_DTE_UART_STATE        114
+#define GPIO25_GSM_MOD_ON_STATE                        25
+#define GPIO113_GSM_EVENT                      113
+
+/* SOUND */
+#define GPIO12_HPJACK_INSERT                   12
+
+/* LEDS */
+#define GPIO10_LED_nCharging                   10
+#define GPIO97_LED_nBlue                       97
+#define GPIO98_LED_nOrange                     98
+#define GPIO82_LED_nVibra                      82
+#define GPIO115_LED_nKeyboard                  115
+
+/* Keyboard */
+#define GPIO0_KEY_POWER                                0
+#define GPIO93_KEY_VOLUME_UP                   93
+#define GPIO94_KEY_VOLUME_DOWN                 94
+
+extern struct input_dev *mioa701_evdev;
+extern void mioa701_gpio_lpm_set(unsigned long mfp_pin);
+
+/* Assembler externals mioa701_bootresume.S */
+extern u32 mioa701_bootstrap;
+extern u32 mioa701_jumpaddr;
+extern u32 mioa701_bootstrap_lg;
+
+#endif /* _MIOA701_H */
index e848a47128cdd42b3a9bed8b48b3fc316ff1d2d4..95b6e2a6e514723e716b8878a89866ec2c246566 100644 (file)
@@ -7,6 +7,22 @@ struct pxaohci_platform_data {
        int (*init)(struct device *);
        void (*exit)(struct device *);
 
+       unsigned long flags;
+#define ENABLE_PORT1           (1 << 0)
+#define ENABLE_PORT2           (1 << 1)
+#define ENABLE_PORT3           (1 << 2)
+#define ENABLE_PORT_ALL                (ENABLE_PORT1 | ENABLE_PORT2 | ENABLE_PORT3)
+
+#define POWER_SENSE_LOW                (1 << 3)
+#define POWER_CONTROL_LOW      (1 << 4)
+#define NO_OC_PROTECTION       (1 << 5)
+#define OC_MODE_GLOBAL         (0 << 6)
+#define OC_MODE_PERPORT                (1 << 6)
+
+       int power_on_delay;     /* Power On to Power Good time - in ms
+                                * HCD must wait for this duration before
+                                * accessing a powered on port
+                                */
        int port_mode;
 #define PMM_NPS_MODE           1
 #define PMM_GLOBAL_MODE        2
diff --git a/arch/arm/mach-pxa/include/mach/palmz72.h b/arch/arm/mach-pxa/include/mach/palmz72.h
new file mode 100644 (file)
index 0000000..5032307
--- /dev/null
@@ -0,0 +1,80 @@
+/*
+ * GPIOs and interrupts for Palm Zire72 Handheld Computer
+ *
+ * Authors:    Alex Osborne <bobofdoom@gmail.com>
+ *             Jan Herman <2hp@seznam.cz>
+ *             Sergey Lapin <slapin@ossfans.org>
+ *
+ * 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_PALMZ72_H_
+#define _INCLUDE_PALMZ72_H_
+
+/* Power and control */
+#define GPIO_NR_PALMZ72_GPIO_RESET             1
+#define GPIO_NR_PALMZ72_POWER_DETECT           0
+
+/* SD/MMC */
+#define GPIO_NR_PALMZ72_SD_DETECT_N            14
+#define GPIO_NR_PALMZ72_SD_POWER_N             98
+#define GPIO_NR_PALMZ72_SD_RO 115
+
+/* Touchscreen */
+#define GPIO_NR_PALMZ72_WM9712_IRQ             27
+
+/* IRDA -  disable GPIO connected to SD pin of tranceiver (TFBS4710?) ? */
+#define GPIO_NR_PALMZ72_IR_DISABLE             49
+
+/* USB */
+#define GPIO_NR_PALMZ72_USB_DETECT_N           15
+#define GPIO_NR_PALMZ72_USB_POWER              95
+#define GPIO_NR_PALMZ72_USB_PULLUP             12
+
+/* LCD/Backlight */
+#define GPIO_NR_PALMZ72_BL_POWER               20
+#define GPIO_NR_PALMZ72_LCD_POWER              96
+
+/* LED */
+#define GPIO_NR_PALMZ72_LED_GREEN              88
+
+/* Bluetooth */
+#define GPIO_NR_PALMZ72_BT_POWER               17
+#define GPIO_NR_PALMZ72_BT_RESET               83
+
+/** Initial values **/
+
+/* Battery */
+#define PALMZ72_BAT_MAX_VOLTAGE                4000    /* 4.00v current voltage */
+#define PALMZ72_BAT_MIN_VOLTAGE                3550    /* 3.55v critical voltage */
+#define PALMZ72_BAT_MAX_CURRENT                0       /* unknokn */
+#define PALMZ72_BAT_MIN_CURRENT                0       /* unknown */
+#define PALMZ72_BAT_MAX_CHARGE         1       /* unknown */
+#define PALMZ72_BAT_MIN_CHARGE         1       /* unknown */
+#define PALMZ72_MAX_LIFE_MINS          360     /* on-life in minutes */
+
+/* Backlight */
+#define PALMZ72_MAX_INTENSITY          0xFE
+#define PALMZ72_DEFAULT_INTENSITY      0x7E
+#define PALMZ72_LIMIT_MASK             0x7F
+#define PALMZ72_PRESCALER              0x3F
+#define PALMZ72_PERIOD_NS              3500
+
+#ifdef CONFIG_PM
+struct palmz72_resume_info {
+       u32 magic0;             /* 0x0 */
+       u32 magic1;             /* 0x4 */
+       u32 resume_addr;        /* 0x8 */
+       u32 pad[11];            /* 0xc..0x37 */
+       u32 arm_control;        /* 0x38 */
+       u32 aux_control;        /* 0x3c */
+       u32 ttb;                /* 0x40 */
+       u32 domain_access;      /* 0x44 */
+       u32 process_id;         /* 0x48 */
+};
+#endif
+#endif
+
index 261e5bc958db158739c6ad45bfcd8e36b1c8ae19..83342469acaca8faeb46f11ea81db7fe7ce34fb2 100644 (file)
@@ -15,6 +15,8 @@ struct pxa_cpu_pm_fns {
        void    (*restore)(unsigned long *);
        int     (*valid)(suspend_state_t state);
        void    (*enter)(suspend_state_t state);
+       int     (*prepare)(void);
+       void    (*finish)(void);
 };
 
 extern struct pxa_cpu_pm_fns *pxa_cpu_pm_fns;
index 67debc47e8c6ec6ff7008aab53997b73444dbe37..0b3e6d051c6425d86238473ab31f25702cd29c92 100644 (file)
@@ -23,6 +23,7 @@
 #define POODLE_GPIO_AC_IN              (1)
 #define POODLE_GPIO_CO                 16
 #define POODLE_GPIO_TP_INT             (5)
+#define POODLE_GPIO_TP_CS              (24)
 #define POODLE_GPIO_WAKEUP             (11)    /* change battery */
 #define POODLE_GPIO_GA_INT             (10)
 #define POODLE_GPIO_IR_ON              (22)
 #define POODLE_SCOOP_IO_DIR    ( POODLE_SCOOP_VPEN | POODLE_SCOOP_HS_OUT )
 #define POODLE_SCOOP_IO_OUT    ( 0 )
 
+#define POODLE_SCOOP_GPIO_BASE (NR_BUILTIN_GPIO)
+#define POODLE_GPIO_CHARGE_ON  (POODLE_SCOOP_GPIO_BASE + 0)
+#define POODLE_GPIO_CP401      (POODLE_SCOOP_GPIO_BASE + 2)
+#define POODLE_GPIO_VPEN       (POODLE_SCOOP_GPIO_BASE + 7)
+#define POODLE_GPIO_L_PCLK     (POODLE_SCOOP_GPIO_BASE + 9)
+#define POODLE_GPIO_L_LCLK     (POODLE_SCOOP_GPIO_BASE + 10)
+#define POODLE_GPIO_HS_OUT     (POODLE_SCOOP_GPIO_BASE + 11)
+
 #define POODLE_LOCOMO_GPIO_AMP_ON      LOCOMO_GPIO(8)
 #define POODLE_LOCOMO_GPIO_MUTE_L      LOCOMO_GPIO(10)
 #define POODLE_LOCOMO_GPIO_MUTE_R      LOCOMO_GPIO(11)
index 12288ca3cbb2022ee3dc2a45ee375a6be8096374..15295d96000025e4bb4bf0fadbd393dafcee3347 100644 (file)
 /*
  * DMA Controller
  */
-
-#define DCSR0          __REG(0x40000000)  /* DMA Control / Status Register for Channel 0 */
-#define DCSR1          __REG(0x40000004)  /* DMA Control / Status Register for Channel 1 */
-#define DCSR2          __REG(0x40000008)  /* DMA Control / Status Register for Channel 2 */
-#define DCSR3          __REG(0x4000000c)  /* DMA Control / Status Register for Channel 3 */
-#define DCSR4          __REG(0x40000010)  /* DMA Control / Status Register for Channel 4 */
-#define DCSR5          __REG(0x40000014)  /* DMA Control / Status Register for Channel 5 */
-#define DCSR6          __REG(0x40000018)  /* DMA Control / Status Register for Channel 6 */
-#define DCSR7          __REG(0x4000001c)  /* DMA Control / Status Register for Channel 7 */
-#define DCSR8          __REG(0x40000020)  /* DMA Control / Status Register for Channel 8 */
-#define DCSR9          __REG(0x40000024)  /* DMA Control / Status Register for Channel 9 */
-#define DCSR10         __REG(0x40000028)  /* DMA Control / Status Register for Channel 10 */
-#define DCSR11         __REG(0x4000002c)  /* DMA Control / Status Register for Channel 11 */
-#define DCSR12         __REG(0x40000030)  /* DMA Control / Status Register for Channel 12 */
-#define DCSR13         __REG(0x40000034)  /* DMA Control / Status Register for Channel 13 */
-#define DCSR14         __REG(0x40000038)  /* DMA Control / Status Register for Channel 14 */
-#define DCSR15         __REG(0x4000003c)  /* DMA Control / Status Register for Channel 15 */
-
 #define DCSR(x)                __REG2(0x40000000, (x) << 2)
 
 #define DCSR_RUN       (1 << 31)       /* Run Bit (read / write) */
 #define DCSR_NODESC    (1 << 30)       /* No-Descriptor Fetch (read / write) */
 #define DCSR_STOPIRQEN (1 << 29)       /* Stop Interrupt Enable (read / write) */
-#ifdef CONFIG_PXA27x
+#define DCSR_REQPEND   (1 << 8)        /* Request Pending (read-only) */
+#define DCSR_STOPSTATE (1 << 3)        /* Stop State (read-only) */
+#define DCSR_ENDINTR   (1 << 2)        /* End Interrupt (read / write) */
+#define DCSR_STARTINTR (1 << 1)        /* Start Interrupt (read / write) */
+#define DCSR_BUSERR    (1 << 0)        /* Bus Error Interrupt (read / write) */
+
+#if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx)
 #define DCSR_EORIRQEN  (1 << 28)       /* End of Receive Interrupt Enable (R/W) */
 #define DCSR_EORJMPEN  (1 << 27)       /* Jump to next descriptor on EOR */
 #define DCSR_EORSTOPEN (1 << 26)       /* STOP on an EOR */
 #define DCSR_CMPST     (1 << 10)       /* The Descriptor Compare Status */
 #define DCSR_EORINTR   (1 << 9)        /* The end of Receive */
 #endif
-#define DCSR_REQPEND   (1 << 8)        /* Request Pending (read-only) */
-#define DCSR_STOPSTATE (1 << 3)        /* Stop State (read-only) */
-#define DCSR_ENDINTR   (1 << 2)        /* End Interrupt (read / write) */
-#define DCSR_STARTINTR (1 << 1)        /* Start Interrupt (read / write) */
-#define DCSR_BUSERR    (1 << 0)        /* Bus Error Interrupt (read / write) */
 
 #define DALGN          __REG(0x400000a0)  /* DMA Alignment Register */
 #define DINT           __REG(0x400000f0)  /* DMA Interrupt Register */
                        &__REG2(0x40000100, ((n) & 0x3f) << 2) : \
                        &__REG2(0x40001100, ((n) & 0x3f) << 2)))
 
-#define DRCMR0         __REG(0x40000100)  /* Request to Channel Map Register for DREQ 0 */
-#define DRCMR1         __REG(0x40000104)  /* Request to Channel Map Register for DREQ 1 */
-#define DRCMR2         __REG(0x40000108)  /* Request to Channel Map Register for I2S receive Request */
-#define DRCMR3         __REG(0x4000010c)  /* Request to Channel Map Register for I2S transmit Request */
-#define DRCMR4         __REG(0x40000110)  /* Request to Channel Map Register for BTUART receive Request */
-#define DRCMR5         __REG(0x40000114)  /* Request to Channel Map Register for BTUART transmit Request. */
-#define DRCMR6         __REG(0x40000118)  /* Request to Channel Map Register for FFUART receive Request */
-#define DRCMR7         __REG(0x4000011c)  /* Request to Channel Map Register for FFUART transmit Request */
-#define DRCMR8         __REG(0x40000120)  /* Request to Channel Map Register for AC97 microphone Request */
-#define DRCMR9         __REG(0x40000124)  /* Request to Channel Map Register for AC97 modem receive Request */
-#define DRCMR10                __REG(0x40000128)  /* Request to Channel Map Register for AC97 modem transmit Request */
-#define DRCMR11                __REG(0x4000012c)  /* Request to Channel Map Register for AC97 audio receive Request */
-#define DRCMR12                __REG(0x40000130)  /* Request to Channel Map Register for AC97 audio transmit Request */
-#define DRCMR13                __REG(0x40000134)  /* Request to Channel Map Register for SSP receive Request */
-#define DRCMR14                __REG(0x40000138)  /* Request to Channel Map Register for SSP transmit Request */
-#define DRCMR15                __REG(0x4000013c)  /* Request to Channel Map Register for SSP2 receive Request */
-#define DRCMR16                __REG(0x40000140)  /* Request to Channel Map Register for SSP2 transmit Request */
-#define DRCMR17                __REG(0x40000144)  /* Request to Channel Map Register for ICP receive Request */
-#define DRCMR18                __REG(0x40000148)  /* Request to Channel Map Register for ICP transmit Request */
-#define DRCMR19                __REG(0x4000014c)  /* Request to Channel Map Register for STUART receive Request */
-#define DRCMR20                __REG(0x40000150)  /* Request to Channel Map Register for STUART transmit Request */
-#define DRCMR21                __REG(0x40000154)  /* Request to Channel Map Register for MMC receive Request */
-#define DRCMR22                __REG(0x40000158)  /* Request to Channel Map Register for MMC transmit Request */
-#define DRCMR23                __REG(0x4000015c)  /* Reserved */
-#define DRCMR24                __REG(0x40000160)  /* Reserved */
-#define DRCMR25                __REG(0x40000164)  /* Request to Channel Map Register for USB endpoint 1 Request */
-#define DRCMR26                __REG(0x40000168)  /* Request to Channel Map Register for USB endpoint 2 Request */
-#define DRCMR27                __REG(0x4000016C)  /* Request to Channel Map Register for USB endpoint 3 Request */
-#define DRCMR28                __REG(0x40000170)  /* Request to Channel Map Register for USB endpoint 4 Request */
-#define DRCMR29                __REG(0x40000174)  /* Reserved */
-#define DRCMR30                __REG(0x40000178)  /* Request to Channel Map Register for USB endpoint 6 Request */
-#define DRCMR31                __REG(0x4000017C)  /* Request to Channel Map Register for USB endpoint 7 Request */
-#define DRCMR32                __REG(0x40000180)  /* Request to Channel Map Register for USB endpoint 8 Request */
-#define DRCMR33                __REG(0x40000184)  /* Request to Channel Map Register for USB endpoint 9 Request */
-#define DRCMR34                __REG(0x40000188)  /* Reserved */
-#define DRCMR35                __REG(0x4000018C)  /* Request to Channel Map Register for USB endpoint 11 Request */
-#define DRCMR36                __REG(0x40000190)  /* Request to Channel Map Register for USB endpoint 12 Request */
-#define DRCMR37                __REG(0x40000194)  /* Request to Channel Map Register for USB endpoint 13 Request */
-#define DRCMR38                __REG(0x40000198)  /* Request to Channel Map Register for USB endpoint 14 Request */
-#define DRCMR39                __REG(0x4000019C)  /* Reserved */
-#define DRCMR66                __REG(0x40001108)  /* Request to Channel Map Register for SSP3 receive Request */
-#define DRCMR67                __REG(0x4000110C)  /* Request to Channel Map Register for SSP3 transmit Request */
-#define DRCMR68                __REG(0x40001110)  /* Request to Channel Map Register for Camera FIFO 0 Request */
-#define DRCMR69                __REG(0x40001114)  /* Request to Channel Map Register for Camera FIFO 1 Request */
-#define DRCMR70                __REG(0x40001118)  /* Request to Channel Map Register for Camera FIFO 2 Request */
-
-#define DRCMRRXSADR    DRCMR2
-#define DRCMRTXSADR    DRCMR3
-#define DRCMRRXBTRBR   DRCMR4
-#define DRCMRTXBTTHR   DRCMR5
-#define DRCMRRXFFRBR   DRCMR6
-#define DRCMRTXFFTHR   DRCMR7
-#define DRCMRRXMCDR    DRCMR8
-#define DRCMRRXMODR    DRCMR9
-#define DRCMRTXMODR    DRCMR10
-#define DRCMRRXPCDR    DRCMR11
-#define DRCMRTXPCDR    DRCMR12
-#define DRCMRRXSSDR    DRCMR13
-#define DRCMRTXSSDR    DRCMR14
-#define DRCMRRXSS2DR   DRCMR15
-#define DRCMRTXSS2DR   DRCMR16
-#define DRCMRRXICDR    DRCMR17
-#define DRCMRTXICDR    DRCMR18
-#define DRCMRRXSTRBR   DRCMR19
-#define DRCMRTXSTTHR   DRCMR20
-#define DRCMRRXMMC     DRCMR21
-#define DRCMRTXMMC     DRCMR22
-#define DRCMRRXSS3DR   DRCMR66
-#define DRCMRTXSS3DR   DRCMR67
-#define DRCMRUDC(x)    DRCMR((x) + 24)
-
 #define DRCMR_MAPVLD   (1 << 7)        /* Map Valid (read / write) */
 #define DRCMR_CHLNUM   0x1f            /* mask for Channel Number (read / write) */
 
-#define DDADR0         __REG(0x40000200)  /* DMA Descriptor Address Register Channel 0 */
-#define DSADR0         __REG(0x40000204)  /* DMA Source Address Register Channel 0 */
-#define DTADR0         __REG(0x40000208)  /* DMA Target Address Register Channel 0 */
-#define DCMD0          __REG(0x4000020c)  /* DMA Command Address Register Channel 0 */
-#define DDADR1         __REG(0x40000210)  /* DMA Descriptor Address Register Channel 1 */
-#define DSADR1         __REG(0x40000214)  /* DMA Source Address Register Channel 1 */
-#define DTADR1         __REG(0x40000218)  /* DMA Target Address Register Channel 1 */
-#define DCMD1          __REG(0x4000021c)  /* DMA Command Address Register Channel 1 */
-#define DDADR2         __REG(0x40000220)  /* DMA Descriptor Address Register Channel 2 */
-#define DSADR2         __REG(0x40000224)  /* DMA Source Address Register Channel 2 */
-#define DTADR2         __REG(0x40000228)  /* DMA Target Address Register Channel 2 */
-#define DCMD2          __REG(0x4000022c)  /* DMA Command Address Register Channel 2 */
-#define DDADR3         __REG(0x40000230)  /* DMA Descriptor Address Register Channel 3 */
-#define DSADR3         __REG(0x40000234)  /* DMA Source Address Register Channel 3 */
-#define DTADR3         __REG(0x40000238)  /* DMA Target Address Register Channel 3 */
-#define DCMD3          __REG(0x4000023c)  /* DMA Command Address Register Channel 3 */
-#define DDADR4         __REG(0x40000240)  /* DMA Descriptor Address Register Channel 4 */
-#define DSADR4         __REG(0x40000244)  /* DMA Source Address Register Channel 4 */
-#define DTADR4         __REG(0x40000248)  /* DMA Target Address Register Channel 4 */
-#define DCMD4          __REG(0x4000024c)  /* DMA Command Address Register Channel 4 */
-#define DDADR5         __REG(0x40000250)  /* DMA Descriptor Address Register Channel 5 */
-#define DSADR5         __REG(0x40000254)  /* DMA Source Address Register Channel 5 */
-#define DTADR5         __REG(0x40000258)  /* DMA Target Address Register Channel 5 */
-#define DCMD5          __REG(0x4000025c)  /* DMA Command Address Register Channel 5 */
-#define DDADR6         __REG(0x40000260)  /* DMA Descriptor Address Register Channel 6 */
-#define DSADR6         __REG(0x40000264)  /* DMA Source Address Register Channel 6 */
-#define DTADR6         __REG(0x40000268)  /* DMA Target Address Register Channel 6 */
-#define DCMD6          __REG(0x4000026c)  /* DMA Command Address Register Channel 6 */
-#define DDADR7         __REG(0x40000270)  /* DMA Descriptor Address Register Channel 7 */
-#define DSADR7         __REG(0x40000274)  /* DMA Source Address Register Channel 7 */
-#define DTADR7         __REG(0x40000278)  /* DMA Target Address Register Channel 7 */
-#define DCMD7          __REG(0x4000027c)  /* DMA Command Address Register Channel 7 */
-#define DDADR8         __REG(0x40000280)  /* DMA Descriptor Address Register Channel 8 */
-#define DSADR8         __REG(0x40000284)  /* DMA Source Address Register Channel 8 */
-#define DTADR8         __REG(0x40000288)  /* DMA Target Address Register Channel 8 */
-#define DCMD8          __REG(0x4000028c)  /* DMA Command Address Register Channel 8 */
-#define DDADR9         __REG(0x40000290)  /* DMA Descriptor Address Register Channel 9 */
-#define DSADR9         __REG(0x40000294)  /* DMA Source Address Register Channel 9 */
-#define DTADR9         __REG(0x40000298)  /* DMA Target Address Register Channel 9 */
-#define DCMD9          __REG(0x4000029c)  /* DMA Command Address Register Channel 9 */
-#define DDADR10                __REG(0x400002a0)  /* DMA Descriptor Address Register Channel 10 */
-#define DSADR10                __REG(0x400002a4)  /* DMA Source Address Register Channel 10 */
-#define DTADR10                __REG(0x400002a8)  /* DMA Target Address Register Channel 10 */
-#define DCMD10         __REG(0x400002ac)  /* DMA Command Address Register Channel 10 */
-#define DDADR11                __REG(0x400002b0)  /* DMA Descriptor Address Register Channel 11 */
-#define DSADR11                __REG(0x400002b4)  /* DMA Source Address Register Channel 11 */
-#define DTADR11                __REG(0x400002b8)  /* DMA Target Address Register Channel 11 */
-#define DCMD11         __REG(0x400002bc)  /* DMA Command Address Register Channel 11 */
-#define DDADR12                __REG(0x400002c0)  /* DMA Descriptor Address Register Channel 12 */
-#define DSADR12                __REG(0x400002c4)  /* DMA Source Address Register Channel 12 */
-#define DTADR12                __REG(0x400002c8)  /* DMA Target Address Register Channel 12 */
-#define DCMD12         __REG(0x400002cc)  /* DMA Command Address Register Channel 12 */
-#define DDADR13                __REG(0x400002d0)  /* DMA Descriptor Address Register Channel 13 */
-#define DSADR13                __REG(0x400002d4)  /* DMA Source Address Register Channel 13 */
-#define DTADR13                __REG(0x400002d8)  /* DMA Target Address Register Channel 13 */
-#define DCMD13         __REG(0x400002dc)  /* DMA Command Address Register Channel 13 */
-#define DDADR14                __REG(0x400002e0)  /* DMA Descriptor Address Register Channel 14 */
-#define DSADR14                __REG(0x400002e4)  /* DMA Source Address Register Channel 14 */
-#define DTADR14                __REG(0x400002e8)  /* DMA Target Address Register Channel 14 */
-#define DCMD14         __REG(0x400002ec)  /* DMA Command Address Register Channel 14 */
-#define DDADR15                __REG(0x400002f0)  /* DMA Descriptor Address Register Channel 15 */
-#define DSADR15                __REG(0x400002f4)  /* DMA Source Address Register Channel 15 */
-#define DTADR15                __REG(0x400002f8)  /* DMA Target Address Register Channel 15 */
-#define DCMD15         __REG(0x400002fc)  /* DMA Command Address Register Channel 15 */
-
 #define DDADR(x)       __REG2(0x40000200, (x) << 4)
 #define DSADR(x)       __REG2(0x40000204, (x) << 4)
 #define DTADR(x)       __REG2(0x40000208, (x) << 4)
 
 
 /*
- * I2C registers
+ * I2C registers - moved into drivers/i2c/busses/i2c-pxa.c
  */
 
-#define IBMR           __REG(0x40301680)  /* I2C Bus Monitor Register - IBMR */
-#define IDBR           __REG(0x40301688)  /* I2C Data Buffer Register - IDBR */
-#define ICR            __REG(0x40301690)  /* I2C Control Register - ICR */
-#define ISR            __REG(0x40301698)  /* I2C Status Register - ISR */
-#define ISAR           __REG(0x403016A0)  /* I2C Slave Address Register - ISAR */
-
-#define PWRIBMR    __REG(0x40f00180)  /* Power I2C Bus Monitor Register-IBMR */
-#define PWRIDBR    __REG(0x40f00188)  /* Power I2C Data Buffer Register-IDBR */
-#define PWRICR __REG(0x40f00190)  /* Power I2C Control Register - ICR */
-#define PWRISR __REG(0x40f00198)  /* Power I2C Status Register - ISR */
-#define PWRISAR    __REG(0x40f001A0)  /*Power I2C Slave Address Register-ISAR */
-
-#define ICR_START      (1 << 0)           /* start bit */
-#define ICR_STOP       (1 << 1)           /* stop bit */
-#define ICR_ACKNAK     (1 << 2)           /* send ACK(0) or NAK(1) */
-#define ICR_TB         (1 << 3)           /* transfer byte bit */
-#define ICR_MA         (1 << 4)           /* master abort */
-#define ICR_SCLE       (1 << 5)           /* master clock enable */
-#define ICR_IUE                (1 << 6)           /* unit enable */
-#define ICR_GCD                (1 << 7)           /* general call disable */
-#define ICR_ITEIE      (1 << 8)           /* enable tx interrupts */
-#define ICR_IRFIE      (1 << 9)           /* enable rx interrupts */
-#define ICR_BEIE       (1 << 10)          /* enable bus error ints */
-#define ICR_SSDIE      (1 << 11)          /* slave STOP detected int enable */
-#define ICR_ALDIE      (1 << 12)          /* enable arbitration interrupt */
-#define ICR_SADIE      (1 << 13)          /* slave address detected int enable */
-#define ICR_UR         (1 << 14)          /* unit reset */
-
-#define ISR_RWM                (1 << 0)           /* read/write mode */
-#define ISR_ACKNAK     (1 << 1)           /* ack/nak status */
-#define ISR_UB         (1 << 2)           /* unit busy */
-#define ISR_IBB                (1 << 3)           /* bus busy */
-#define ISR_SSD                (1 << 4)           /* slave stop detected */
-#define ISR_ALD                (1 << 5)           /* arbitration loss detected */
-#define ISR_ITE                (1 << 6)           /* tx buffer empty */
-#define ISR_IRF                (1 << 7)           /* rx buffer full */
-#define ISR_GCAD       (1 << 8)           /* general call address detected */
-#define ISR_SAD                (1 << 9)           /* slave address detected */
-#define ISR_BED                (1 << 10)          /* bus error no ACK/NAK */
-
-
 /*
- * Serial Audio Controller
+ * Serial Audio Controller - moved into sound/soc/pxa/pxa2xx-i2s.c
  */
 
-#define SACR0          __REG(0x40400000)  /* Global Control Register */
-#define SACR1          __REG(0x40400004)  /* Serial Audio I 2 S/MSB-Justified Control Register */
-#define SASR0          __REG(0x4040000C)  /* Serial Audio I 2 S/MSB-Justified Interface and FIFO Status Register */
-#define SAIMR          __REG(0x40400014)  /* Serial Audio Interrupt Mask Register */
-#define SAICR          __REG(0x40400018)  /* Serial Audio Interrupt Clear Register */
-#define SADIV          __REG(0x40400060)  /* Audio Clock Divider Register. */
-#define SADR           __REG(0x40400080)  /* Serial Audio Data Register (TX and RX FIFO access Register). */
-
-#define SACR0_RFTH(x)  ((x) << 12)     /* Rx FIFO Interrupt or DMA Trigger Threshold */
-#define SACR0_TFTH(x)  ((x) << 8)      /* Tx FIFO Interrupt or DMA Trigger Threshold */
-#define SACR0_STRF     (1 << 5)        /* FIFO Select for EFWR Special Function */
-#define SACR0_EFWR     (1 << 4)        /* Enable EFWR Function  */
-#define SACR0_RST      (1 << 3)        /* FIFO, i2s Register Reset */
-#define SACR0_BCKD     (1 << 2)        /* Bit Clock Direction */
-#define SACR0_ENB      (1 << 0)        /* Enable I2S Link */
-#define SACR1_ENLBF    (1 << 5)        /* Enable Loopback */
-#define SACR1_DRPL     (1 << 4)        /* Disable Replaying Function */
-#define SACR1_DREC     (1 << 3)        /* Disable Recording Function */
-#define SACR1_AMSL     (1 << 0)        /* Specify Alternate Mode */
-
-#define SASR0_I2SOFF   (1 << 7)        /* Controller Status */
-#define SASR0_ROR      (1 << 6)        /* Rx FIFO Overrun */
-#define SASR0_TUR      (1 << 5)        /* Tx FIFO Underrun */
-#define SASR0_RFS      (1 << 4)        /* Rx FIFO Service Request */
-#define SASR0_TFS      (1 << 3)        /* Tx FIFO Service Request */
-#define SASR0_BSY      (1 << 2)        /* I2S Busy */
-#define SASR0_RNE      (1 << 1)        /* Rx FIFO Not Empty */
-#define SASR0_TNF      (1 << 0)        /* Tx FIFO Not Empty */
-
-#define SAICR_ROR      (1 << 6)        /* Clear Rx FIFO Overrun Interrupt */
-#define SAICR_TUR      (1 << 5)        /* Clear Tx FIFO Underrun Interrupt */
-
-#define SAIMR_ROR      (1 << 6)        /* Enable Rx FIFO Overrun Condition Interrupt */
-#define SAIMR_TUR      (1 << 5)        /* Enable Tx FIFO Underrun Condition Interrupt */
-#define SAIMR_RFS      (1 << 4)        /* Enable Rx FIFO Service Interrupt */
-#define SAIMR_TFS      (1 << 3)        /* Enable Tx FIFO Service Interrupt */
-
 /*
  * AC97 Controller registers
  */
 
 #endif
 
-#if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx)
-/*
- * UHC: USB Host Controller (OHCI-like) register definitions
- */
-#define UHC_BASE_PHYS  (0x4C000000)
-#define UHCREV         __REG(0x4C000000) /* UHC HCI Spec Revision */
-#define UHCHCON                __REG(0x4C000004) /* UHC Host Control Register */
-#define UHCCOMS                __REG(0x4C000008) /* UHC Command Status Register */
-#define UHCINTS                __REG(0x4C00000C) /* UHC Interrupt Status Register */
-#define UHCINTE                __REG(0x4C000010) /* UHC Interrupt Enable */
-#define UHCINTD                __REG(0x4C000014) /* UHC Interrupt Disable */
-#define UHCHCCA                __REG(0x4C000018) /* UHC Host Controller Comm. Area */
-#define UHCPCED                __REG(0x4C00001C) /* UHC Period Current Endpt Descr */
-#define UHCCHED                __REG(0x4C000020) /* UHC Control Head Endpt Descr */
-#define UHCCCED                __REG(0x4C000024) /* UHC Control Current Endpt Descr */
-#define UHCBHED                __REG(0x4C000028) /* UHC Bulk Head Endpt Descr */
-#define UHCBCED                __REG(0x4C00002C) /* UHC Bulk Current Endpt Descr */
-#define UHCDHEAD       __REG(0x4C000030) /* UHC Done Head */
-#define UHCFMI         __REG(0x4C000034) /* UHC Frame Interval */
-#define UHCFMR         __REG(0x4C000038) /* UHC Frame Remaining */
-#define UHCFMN         __REG(0x4C00003C) /* UHC Frame Number */
-#define UHCPERS                __REG(0x4C000040) /* UHC Periodic Start */
-#define UHCLS          __REG(0x4C000044) /* UHC Low Speed Threshold */
-
-#define UHCRHDA                __REG(0x4C000048) /* UHC Root Hub Descriptor A */
-#define UHCRHDA_NOCP   (1 << 12)       /* No over current protection */
-
-#define UHCRHDB                __REG(0x4C00004C) /* UHC Root Hub Descriptor B */
-#define UHCRHS         __REG(0x4C000050) /* UHC Root Hub Status */
-#define UHCRHPS1       __REG(0x4C000054) /* UHC Root Hub Port 1 Status */
-#define UHCRHPS2       __REG(0x4C000058) /* UHC Root Hub Port 2 Status */
-#define UHCRHPS3       __REG(0x4C00005C) /* UHC Root Hub Port 3 Status */
-
-#define UHCSTAT                __REG(0x4C000060) /* UHC Status Register */
-#define UHCSTAT_UPS3   (1 << 16)       /* USB Power Sense Port3 */
-#define UHCSTAT_SBMAI  (1 << 15)       /* System Bus Master Abort Interrupt*/
-#define UHCSTAT_SBTAI  (1 << 14)       /* System Bus Target Abort Interrupt*/
-#define UHCSTAT_UPRI   (1 << 13)       /* USB Port Resume Interrupt */
-#define UHCSTAT_UPS2   (1 << 12)       /* USB Power Sense Port 2 */
-#define UHCSTAT_UPS1   (1 << 11)       /* USB Power Sense Port 1 */
-#define UHCSTAT_HTA    (1 << 10)       /* HCI Target Abort */
-#define UHCSTAT_HBA    (1 << 8)        /* HCI Buffer Active */
-#define UHCSTAT_RWUE   (1 << 7)        /* HCI Remote Wake Up Event */
-
-#define UHCHR           __REG(0x4C000064) /* UHC Reset Register */
-#define UHCHR_SSEP3    (1 << 11)       /* Sleep Standby Enable for Port3 */
-#define UHCHR_SSEP2    (1 << 10)       /* Sleep Standby Enable for Port2 */
-#define UHCHR_SSEP1    (1 << 9)        /* Sleep Standby Enable for Port1 */
-#define UHCHR_PCPL     (1 << 7)        /* Power control polarity low */
-#define UHCHR_PSPL     (1 << 6)        /* Power sense polarity low */
-#define UHCHR_SSE      (1 << 5)        /* Sleep Standby Enable */
-#define UHCHR_UIT      (1 << 4)        /* USB Interrupt Test */
-#define UHCHR_SSDC     (1 << 3)        /* Simulation Scale Down Clock */
-#define UHCHR_CGR      (1 << 2)        /* Clock Generation Reset */
-#define UHCHR_FHR      (1 << 1)        /* Force Host Controller Reset */
-#define UHCHR_FSBIR    (1 << 0)        /* Force System Bus Iface Reset */
-
-#define UHCHIE          __REG(0x4C000068) /* UHC Interrupt Enable Register*/
-#define UHCHIE_UPS3IE  (1 << 14)       /* Power Sense Port3 IntEn */
-#define UHCHIE_UPRIE   (1 << 13)       /* Port Resume IntEn */
-#define UHCHIE_UPS2IE  (1 << 12)       /* Power Sense Port2 IntEn */
-#define UHCHIE_UPS1IE  (1 << 11)       /* Power Sense Port1 IntEn */
-#define UHCHIE_TAIE    (1 << 10)       /* HCI Interface Transfer Abort
-                                          Interrupt Enable*/
-#define UHCHIE_HBAIE   (1 << 8)        /* HCI Buffer Active IntEn */
-#define UHCHIE_RWIE    (1 << 7)        /* Remote Wake-up IntEn */
-
-#define UHCHIT          __REG(0x4C00006C) /* UHC Interrupt Test register */
-
-#endif /* CONFIG_PXA27x || CONFIG_PXA3xx */
-
 /* PWRMODE register M field values */
 
 #define PWRMODE_IDLE           0x1
index 39eb68319e28dfb8815ddbabdbbbc3e9b3271c83..b1fcd10ab6c6bfeeba709a4efae8f1d878b194cc 100644 (file)
 #define CKENB          __REG(0x41340010)       /* B Clock Enable Register */
 #define AC97_DIV       __REG(0x41340014)       /* AC97 clock divisor value register */
 
+#define ACCR_XPDIS             (1 << 31)       /* Core PLL Output Disable */
+#define ACCR_SPDIS             (1 << 30)       /* System PLL Output Disable */
+#define ACCR_D0CS              (1 << 26)       /* D0 Mode Clock Select */
+#define ACCR_PCCE              (1 << 11)       /* Power Mode Change Clock Enable */
+#define ACCR_DDR_D0CS          (1 << 7)        /* DDR SDRAM clock frequency in D0CS (PXA31x only) */
+
+#define ACCR_SMCFS_MASK                (0x7 << 23)     /* Static Memory Controller Frequency Select */
+#define ACCR_SFLFS_MASK                (0x3 << 18)     /* Frequency Select for Internal Memory Controller */
+#define ACCR_XSPCLK_MASK       (0x3 << 16)     /* Core Frequency during Frequency Change */
+#define ACCR_HSS_MASK          (0x3 << 14)     /* System Bus-Clock Frequency Select */
+#define ACCR_DMCFS_MASK                (0x3 << 12)     /* Dynamic Memory Controller Clock Frequency Select */
+#define ACCR_XN_MASK           (0x7 << 8)      /* Core PLL Turbo-Mode-to-Run-Mode Ratio */
+#define ACCR_XL_MASK           (0x1f)          /* Core PLL Run-Mode-to-Oscillator Ratio */
+
+#define ACCR_SMCFS(x)          (((x) & 0x7) << 23)
+#define ACCR_SFLFS(x)          (((x) & 0x3) << 18)
+#define ACCR_XSPCLK(x)         (((x) & 0x3) << 16)
+#define ACCR_HSS(x)            (((x) & 0x3) << 14)
+#define ACCR_DMCFS(x)          (((x) & 0x3) << 12)
+#define ACCR_XN(x)             (((x) & 0x7) << 8)
+#define ACCR_XL(x)             ((x) & 0x1f)
+
 /*
  * Clock Enable Bit
  */
index bd14365f7ed58cba919b9f24b7f0ad54e08493ae..31ac26b55bc1e486687fbdeefa0567422ef7e116 100644 (file)
@@ -16,6 +16,7 @@
 #endif
 
 #include <linux/fb.h>
+#include <linux/gpio.h>
 
 /* Spitz/Akita GPIOs */
 
 #define SPITZ_SCP_JK_A          SCOOP_GPCR_PA18  /* Low */
 #define SPITZ_SCP_ADC_TEMP_ON   SCOOP_GPCR_PA19  /* Low */
 
-#define SPITZ_SCP_IO_DIR      (SPITZ_SCP_LED_GREEN | SPITZ_SCP_JK_B | SPITZ_SCP_CHRG_ON | \
-                               SPITZ_SCP_MUTE_L | SPITZ_SCP_MUTE_R | SPITZ_SCP_LED_ORANGE | \
+#define SPITZ_SCP_IO_DIR      (SPITZ_SCP_JK_B | SPITZ_SCP_CHRG_ON | \
+                               SPITZ_SCP_MUTE_L | SPITZ_SCP_MUTE_R | \
                                SPITZ_SCP_CF_POWER | SPITZ_SCP_JK_A | SPITZ_SCP_ADC_TEMP_ON)
 #define SPITZ_SCP_IO_OUT      (SPITZ_SCP_CHRG_ON | SPITZ_SCP_MUTE_L | SPITZ_SCP_MUTE_R)
 #define SPITZ_SCP_SUS_CLR     (SPITZ_SCP_MUTE_L | SPITZ_SCP_MUTE_R | SPITZ_SCP_JK_A | SPITZ_SCP_ADC_TEMP_ON)
 #define SPITZ_SCP_SUS_SET     0
 
+#define SPITZ_SCP_GPIO_BASE    (NR_BUILTIN_GPIO)
+#define SPITZ_GPIO_LED_GREEN   (SPITZ_SCP_GPIO_BASE + 0)
+#define SPITZ_GPIO_JK_B                (SPITZ_SCP_GPIO_BASE + 1)
+#define SPITZ_GPIO_CHRG_ON     (SPITZ_SCP_GPIO_BASE + 2)
+#define SPITZ_GPIO_MUTE_L      (SPITZ_SCP_GPIO_BASE + 3)
+#define SPITZ_GPIO_MUTE_R      (SPITZ_SCP_GPIO_BASE + 4)
+#define SPITZ_GPIO_CF_POWER    (SPITZ_SCP_GPIO_BASE + 5)
+#define SPITZ_GPIO_LED_ORANGE  (SPITZ_SCP_GPIO_BASE + 6)
+#define SPITZ_GPIO_JK_A                (SPITZ_SCP_GPIO_BASE + 7)
+#define SPITZ_GPIO_ADC_TEMP_ON (SPITZ_SCP_GPIO_BASE + 8)
+
 /* Spitz Scoop Device (No. 2) GPIOs */
 /* Suspend States in comments */
 #define SPITZ_SCP2_IR_ON           SCOOP_GPCR_PA11  /* High */
 #define SPITZ_SCP2_BACKLIGHT_ON    SCOOP_GPCR_PA18  /* Low */
 #define SPITZ_SCP2_MIC_BIAS        SCOOP_GPCR_PA19  /* Low */
 
-#define SPITZ_SCP2_IO_DIR (SPITZ_SCP2_IR_ON | SPITZ_SCP2_AKIN_PULLUP | SPITZ_SCP2_RESERVED_1 | \
+#define SPITZ_SCP2_IO_DIR (SPITZ_SCP2_AKIN_PULLUP | SPITZ_SCP2_RESERVED_1 | \
                            SPITZ_SCP2_RESERVED_2 | SPITZ_SCP2_RESERVED_3 | SPITZ_SCP2_RESERVED_4 | \
                            SPITZ_SCP2_BACKLIGHT_CONT | SPITZ_SCP2_BACKLIGHT_ON | SPITZ_SCP2_MIC_BIAS)
 
-#define SPITZ_SCP2_IO_OUT   (SPITZ_SCP2_IR_ON | SPITZ_SCP2_AKIN_PULLUP | SPITZ_SCP2_RESERVED_1)
+#define SPITZ_SCP2_IO_OUT   (SPITZ_SCP2_AKIN_PULLUP | SPITZ_SCP2_RESERVED_1)
 #define SPITZ_SCP2_SUS_CLR  (SPITZ_SCP2_RESERVED_2 | SPITZ_SCP2_RESERVED_3 | SPITZ_SCP2_RESERVED_4 | \
                              SPITZ_SCP2_BACKLIGHT_CONT | SPITZ_SCP2_BACKLIGHT_ON | SPITZ_SCP2_MIC_BIAS)
 #define SPITZ_SCP2_SUS_SET  (SPITZ_SCP2_IR_ON | SPITZ_SCP2_RESERVED_1)
 
+#define SPITZ_SCP2_GPIO_BASE           (NR_BUILTIN_GPIO + 12)
+#define SPITZ_GPIO_IR_ON               (SPITZ_SCP2_GPIO_BASE + 0)
+#define SPITZ_GPIO_AKIN_PULLUP         (SPITZ_SCP2_GPIO_BASE + 1
+#define SPITZ_GPIO_RESERVED_1          (SPITZ_SCP2_GPIO_BASE + 2)
+#define SPITZ_GPIO_RESERVED_2          (SPITZ_SCP2_GPIO_BASE + 3)
+#define SPITZ_GPIO_RESERVED_3          (SPITZ_SCP2_GPIO_BASE + 4)
+#define SPITZ_GPIO_RESERVED_4          (SPITZ_SCP2_GPIO_BASE + 5)
+#define SPITZ_GPIO_BACKLIGHT_CONT      (SPITZ_SCP2_GPIO_BASE + 6)
+#define SPITZ_GPIO_BACKLIGHT_ON                (SPITZ_SCP2_GPIO_BASE + 7)
+#define SPITZ_GPIO_MIC_BIAS            (SPITZ_SCP2_GPIO_BASE + 8)
+
+/* Akita IO Expander GPIOs */
+#define AKITA_IOEXP_GPIO_BASE          (NR_BUILTIN_GPIO + 12)
+#define AKITA_GPIO_RESERVED_0          (AKITA_IOEXP_GPIO_BASE + 0)
+#define AKITA_GPIO_RESERVED_1          (AKITA_IOEXP_GPIO_BASE + 1)
+#define AKITA_GPIO_MIC_BIAS            (AKITA_IOEXP_GPIO_BASE + 2)
+#define AKITA_GPIO_BACKLIGHT_ON                (AKITA_IOEXP_GPIO_BASE + 3)
+#define AKITA_GPIO_BACKLIGHT_CONT      (AKITA_IOEXP_GPIO_BASE + 4)
+#define AKITA_GPIO_AKIN_PULLUP         (AKITA_IOEXP_GPIO_BASE + 5)
+#define AKITA_GPIO_IR_ON               (AKITA_IOEXP_GPIO_BASE + 6)
+#define AKITA_GPIO_RESERVED_7          (AKITA_IOEXP_GPIO_BASE + 7)
 
 /* Spitz IRQ Definitions */
 
  */
 extern struct platform_device spitzscoop_device;
 extern struct platform_device spitzscoop2_device;
-extern struct platform_device spitzssp_device;
 extern struct sharpsl_charger_machinfo spitz_pm_machinfo;
index a012882c9ee601d1c4c5723c35e9663dfc14bbc2..cb5cb766f0f17658f5e1bceb10d4c2a785d1872d 100644 (file)
@@ -20,6 +20,7 @@
 #define __ASM_ARCH_SSP_H
 
 #include <linux/list.h>
+#include <linux/io.h>
 
 enum pxa_ssp_type {
        SSP_UNDEFINED = 0,
@@ -78,6 +79,29 @@ int ssp_init(struct ssp_dev *dev, u32 port, u32 init_flags);
 int ssp_config(struct ssp_dev *dev, u32 mode, u32 flags, u32 psp_flags, u32 speed);
 void ssp_exit(struct ssp_dev *dev);
 
+/**
+ * ssp_write_reg - Write to a SSP register
+ *
+ * @dev: SSP device to access
+ * @reg: Register to write to
+ * @val: Value to be written.
+ */
+static inline void ssp_write_reg(struct ssp_device *dev, u32 reg, u32 val)
+{
+       __raw_writel(val, dev->mmio_base + reg);
+}
+
+/**
+ * ssp_read_reg - Read from a SSP register
+ *
+ * @dev: SSP device to access
+ * @reg: Register to read from
+ */
+static inline u32 ssp_read_reg(struct ssp_device *dev, u32 reg)
+{
+       return __raw_readl(dev->mmio_base + reg);
+}
+
 struct ssp_device *ssp_request(int port, const char *label);
 void ssp_free(struct ssp_device *);
 #endif /* __ASM_ARCH_SSP_H */
index 641d0ec110bb2936c88606c51155d6e8d8d85650..903e1a2e6641409d8d9ffca8f03387cabf0474ea 100644 (file)
 #define TRIZEPS4_PIC_PHYS      (PXA_CS3_PHYS)  /* Logic chip on ConXS-Board */
 #define TRIZEPS4_SDRAM_BASE    0xa0000000      /* SDRAM region */
 
-#define TRIZEPS4_CFSR_PHYS     (PXA_CS3_PHYS)                  /* Logic chip on ConXS-Board CSFR register */
-#define TRIZEPS4_BOCR_PHYS     (PXA_CS3_PHYS+0x02000000)       /* Logic chip on ConXS-Board BOCR register */
-#define TRIZEPS4_IRCR_PHYS     (PXA_CS3_PHYS+0x02400000)       /* Logic chip on ConXS-Board IRCR register*/
-#define TRIZEPS4_UPSR_PHYS     (PXA_CS3_PHYS+0x02800000)       /* Logic chip on ConXS-Board UPSR register*/
-#define TRIZEPS4_DICR_PHYS     (PXA_CS3_PHYS+0x03800000)       /* Logic chip on ConXS-Board DICR register*/
+                               /* Logic on ConXS-board CSFR register*/
+#define TRIZEPS4_CFSR_PHYS     (PXA_CS3_PHYS)
+                               /* Logic on ConXS-board BOCR register*/
+#define TRIZEPS4_BOCR_PHYS     (PXA_CS3_PHYS+0x02000000)
+                               /* Logic on ConXS-board IRCR register*/
+#define TRIZEPS4_IRCR_PHYS     (PXA_CS3_PHYS+0x02400000)
+                               /* Logic on ConXS-board UPSR register*/
+#define TRIZEPS4_UPSR_PHYS     (PXA_CS3_PHYS+0x02800000)
+                               /* Logic on ConXS-board DICR register*/
+#define TRIZEPS4_DICR_PHYS     (PXA_CS3_PHYS+0x03800000)
 
 /* virtual memory regions */
 #define TRIZEPS4_DISK_VIRT     0xF0000000      /* Disk On Chip region */
 #define GPIO_MMC_DET           12
 #define TRIZEPS4_MMC_IRQ       IRQ_GPIO(GPIO_MMC_DET)
 
+/* DOC NAND chip */
+#define GPIO_DOC_LOCK           94
+#define GPIO_DOC_IRQ            93
+#define TRIZEPS4_DOC_IRQ        IRQ_GPIO(GPIO_DOC_IRQ)
+
+/* SPI interface */
+#define GPIO_SPI                53
+#define TRIZEPS4_SPI_IRQ        IRQ_GPIO(GPIO_SPI)
+
 /* LEDS using tx2 / rx2 */
 #define GPIO_SYS_BUSY_LED      46
 #define GPIO_HEARTBEAT_LED     47
 #define GPIO_PIC               0
 #define TRIZEPS4_PIC_IRQ       IRQ_GPIO(GPIO_PIC)
 
-#define CFSR_P2V(x)            ((x) - TRIZEPS4_CFSR_PHYS + TRIZEPS4_CFSR_VIRT)
-#define CFSR_V2P(x)            ((x) - TRIZEPS4_CFSR_VIRT + TRIZEPS4_CFSR_PHYS)
+#ifdef CONFIG_MACH_TRIZEPS_CONXS
+/* for CONXS base board define these registers */
+#define CFSR_P2V(x)    ((x) - TRIZEPS4_CFSR_PHYS + TRIZEPS4_CFSR_VIRT)
+#define CFSR_V2P(x)    ((x) - TRIZEPS4_CFSR_VIRT + TRIZEPS4_CFSR_PHYS)
 
-#define BCR_P2V(x)             ((x) - TRIZEPS4_BOCR_PHYS + TRIZEPS4_BOCR_VIRT)
-#define BCR_V2P(x)             ((x) - TRIZEPS4_BOCR_VIRT + TRIZEPS4_BOCR_PHYS)
+#define BCR_P2V(x)     ((x) - TRIZEPS4_BOCR_PHYS + TRIZEPS4_BOCR_VIRT)
+#define BCR_V2P(x)     ((x) - TRIZEPS4_BOCR_VIRT + TRIZEPS4_BOCR_PHYS)
 
-#define DCR_P2V(x)             ((x) - TRIZEPS4_DICR_PHYS + TRIZEPS4_DICR_VIRT)
-#define DCR_V2P(x)             ((x) - TRIZEPS4_DICR_VIRT + TRIZEPS4_DICR_PHYS)
+#define DCR_P2V(x)     ((x) - TRIZEPS4_DICR_PHYS + TRIZEPS4_DICR_VIRT)
+#define DCR_V2P(x)     ((x) - TRIZEPS4_DICR_VIRT + TRIZEPS4_DICR_PHYS)
+
+#define IRCR_P2V(x)    ((x) - TRIZEPS4_IRCR_PHYS + TRIZEPS4_IRCR_VIRT)
+#define IRCR_V2P(x)    ((x) - TRIZEPS4_IRCR_VIRT + TRIZEPS4_IRCR_PHYS)
 
 #ifndef __ASSEMBLY__
-#define ConXS_CFSR             (*((volatile unsigned short *)CFSR_P2V(0x0C000000)))
-#define ConXS_BCR              (*((volatile unsigned short *)BCR_P2V(0x0E000000)))
-#define ConXS_DCR              (*((volatile unsigned short *)DCR_P2V(0x0F800000)))
+static inline unsigned short CFSR_readw(void)
+{
+       /* [Compact Flash Status Register] is read only */
+       return *((unsigned short *)CFSR_P2V(0x0C000000));
+}
+static inline void BCR_writew(unsigned short value)
+{
+       /* [Board Control Regsiter] is write only */
+       *((unsigned short *)BCR_P2V(0x0E000000)) = value;
+}
+static inline void DCR_writew(unsigned short value)
+{
+       /* [Display Control Register] is write only */
+       *((unsigned short *)DCR_P2V(0x0E000000)) = value;
+}
+static inline void IRCR_writew(unsigned short value)
+{
+       /* [InfraRed data Control Register] is write only */
+       *((unsigned short *)IRCR_P2V(0x0E000000)) = value;
+}
 #else
 #define ConXS_CFSR             CFSR_P2V(0x0C000000)
 #define ConXS_BCR              BCR_P2V(0x0E000000)
 #define ConXS_DCR              DCR_P2V(0x0F800000)
+#define ConXS_IRCR             IRCR_P2V(0x0F800000)
 #endif
+#else
+/* for whatever baseboard define function registers */
+static inline unsigned short CFSR_readw(void)
+{
+       return 0;
+}
+static inline void BCR_writew(unsigned short value)
+{
+       ;
+}
+static inline void DCR_writew(unsigned short value)
+{
+       ;
+}
+static inline void IRCR_writew(unsigned short value)
+{
+       ;
+}
+#endif /* CONFIG_MACH_TRIZEPS_CONXS */
 
 #define ConXS_CFSR_BVD_MASK    0x0003
 #define ConXS_CFSR_BVD1                (1 << 0)
diff --git a/arch/arm/mach-pxa/include/mach/viper.h b/arch/arm/mach-pxa/include/mach/viper.h
new file mode 100644 (file)
index 0000000..10988c2
--- /dev/null
@@ -0,0 +1,96 @@
+/*
+ * arch/arm/mach-pxa/include/mach/viper.h
+ *
+ * Author:     Ian Campbell
+ * Created:    Feb 03, 2003
+ * Copyright:  Arcom Control Systems.
+ *
+ * Maintained by Marc Zyngier <maz@misterjones.org>
+ *                           <marc.zyngier@altran.com>
+ *
+ * Created based on lubbock.h:
+ *  Author:    Nicolas Pitre
+ *  Created:   Jun 15, 2001
+ *  Copyright: MontaVista Software Inc.
+ *
+ * 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 ARCH_VIPER_H
+#define ARCH_VIPER_H
+
+#define VIPER_BOOT_PHYS                PXA_CS0_PHYS
+#define VIPER_FLASH_PHYS       PXA_CS1_PHYS
+#define VIPER_ETH_PHYS         PXA_CS2_PHYS
+#define VIPER_USB_PHYS         PXA_CS3_PHYS
+#define VIPER_ETH_DATA_PHYS    PXA_CS4_PHYS
+#define VIPER_CPLD_PHYS                PXA_CS5_PHYS
+
+#define VIPER_CPLD_BASE                (0xf0000000)
+#define VIPER_PC104IO_BASE     (0xf1000000)
+#define VIPER_USB_BASE         (0xf1800000)
+
+#define VIPER_ETH_GPIO         (0)
+#define VIPER_CPLD_GPIO                (1)
+#define VIPER_USB_GPIO         (2)
+#define VIPER_UARTA_GPIO       (4)
+#define VIPER_UARTB_GPIO       (3)
+#define VIPER_CF_CD_GPIO       (32)
+#define VIPER_CF_RDY_GPIO      (8)
+#define VIPER_BCKLIGHT_EN_GPIO (9)
+#define VIPER_LCD_EN_GPIO      (10)
+#define VIPER_PSU_DATA_GPIO    (6)
+#define VIPER_PSU_CLK_GPIO     (11)
+#define VIPER_UART_SHDN_GPIO   (12)
+#define VIPER_BRIGHTNESS_GPIO  (16)
+#define VIPER_PSU_nCS_LD_GPIO  (19)
+#define VIPER_UPS_GPIO         (20)
+#define VIPER_CF_POWER_GPIO    (82)
+#define VIPER_TPM_I2C_SDA_GPIO (26)
+#define VIPER_TPM_I2C_SCL_GPIO (27)
+#define VIPER_RTC_I2C_SDA_GPIO (83)
+#define VIPER_RTC_I2C_SCL_GPIO (84)
+
+#define VIPER_CPLD_P2V(x)      ((x) - VIPER_CPLD_PHYS + VIPER_CPLD_BASE)
+#define VIPER_CPLD_V2P(x)      ((x) - VIPER_CPLD_BASE + VIPER_CPLD_PHYS)
+
+#ifndef __ASSEMBLY__
+#  define __VIPER_CPLD_REG(x)  (*((volatile u16 *)VIPER_CPLD_P2V(x)))
+#endif
+
+/* board level registers in the CPLD: (offsets from CPLD_BASE) ... */
+
+/* ... Physical addresses */
+#define _VIPER_LO_IRQ_STATUS   (VIPER_CPLD_PHYS + 0x100000)
+#define _VIPER_ICR_PHYS                (VIPER_CPLD_PHYS + 0x100002)
+#define _VIPER_HI_IRQ_STATUS   (VIPER_CPLD_PHYS + 0x100004)
+#define _VIPER_VERSION_PHYS    (VIPER_CPLD_PHYS + 0x100006)
+#define VIPER_UARTA_PHYS       (VIPER_CPLD_PHYS + 0x300010)
+#define VIPER_UARTB_PHYS       (VIPER_CPLD_PHYS + 0x300000)
+#define _VIPER_SRAM_BASE       (VIPER_CPLD_PHYS + 0x800000)
+
+/* ... Virtual addresses */
+#define VIPER_LO_IRQ_STATUS    __VIPER_CPLD_REG(_VIPER_LO_IRQ_STATUS)
+#define VIPER_HI_IRQ_STATUS    __VIPER_CPLD_REG(_VIPER_HI_IRQ_STATUS)
+#define VIPER_VERSION          __VIPER_CPLD_REG(_VIPER_VERSION_PHYS)
+#define VIPER_ICR              __VIPER_CPLD_REG(_VIPER_ICR_PHYS)
+
+/* Decode VIPER_VERSION register */
+#define VIPER_CPLD_REVISION(x) (((x) >> 5) & 0x7)
+#define VIPER_BOARD_VERSION(x) (((x) >> 3) & 0x3)
+#define VIPER_BOARD_ISSUE(x)   (((x) >> 0) & 0x7)
+
+/* Interrupt and Configuration Register (VIPER_ICR) */
+/* This is a write only register. Only CF_RST is used under Linux */
+
+extern void viper_cf_rst(int state);
+
+#define VIPER_ICR_RETRIG       (1 << 0)
+#define VIPER_ICR_AUTO_CLR     (1 << 1)
+#define VIPER_ICR_R_DIS                (1 << 2)
+#define VIPER_ICR_CF_RST       (1 << 3)
+
+#endif
+
index 5e95c5372fecde471b8767f2cc94d7a815377a7e..fa69c3a6a38e2f558ca2176fc271f5c031ad413f 100644 (file)
@@ -57,7 +57,7 @@ void __init pxa_init_irq(int irq_nr, set_wake_t fn)
 
        pxa_internal_irq_nr = irq_nr;
 
-       for (irq = 0; irq < irq_nr; irq += 32) {
+       for (irq = PXA_IRQ(0); irq < PXA_IRQ(irq_nr); irq += 32) {
                _ICMR(irq) = 0; /* disable all IRQs */
                _ICLR(irq) = 0; /* all IRQs are IRQ, not FIQ */
        }
diff --git a/arch/arm/mach-pxa/leds-trizeps4.c b/arch/arm/mach-pxa/leds-trizeps4.c
deleted file mode 100644 (file)
index 3bc2900..0000000
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- * linux/arch/arm/mach-pxa/leds-trizeps4.c
- *
- *  Author:    Jürgen Schindele
- *  Created:   20 02, 2006
- *  Copyright: Jürgen Schindele
- *
- * 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/init.h>
-
-#include <mach/hardware.h>
-#include <asm/system.h>
-#include <asm/types.h>
-#include <asm/leds.h>
-
-#include <mach/pxa-regs.h>
-#include <mach/pxa2xx-gpio.h>
-#include <mach/trizeps4.h>
-
-#include "leds.h"
-
-#define LED_STATE_ENABLED      1
-#define LED_STATE_CLAIMED      2
-
-#define SYS_BUSY               0x01
-#define HEARTBEAT              0x02
-#define BLINK                  0x04
-
-static unsigned int led_state;
-static unsigned int hw_led_state;
-
-void trizeps4_leds_event(led_event_t evt)
-{
-       unsigned long flags;
-
-       local_irq_save(flags);
-
-       switch (evt) {
-       case led_start:
-               hw_led_state = 0;
-               pxa_gpio_mode( GPIO_SYS_BUSY_LED  | GPIO_OUT);          /* LED1 */
-               pxa_gpio_mode( GPIO_HEARTBEAT_LED | GPIO_OUT);          /* LED2 */
-               led_state = LED_STATE_ENABLED;
-               break;
-
-       case led_stop:
-               led_state &= ~LED_STATE_ENABLED;
-               break;
-
-       case led_claim:
-               led_state |= LED_STATE_CLAIMED;
-               hw_led_state = 0;
-               break;
-
-       case led_release:
-               led_state &= ~LED_STATE_CLAIMED;
-               hw_led_state = 0;
-               break;
-
-#ifdef CONFIG_LEDS_TIMER
-       case led_timer:
-               hw_led_state ^= HEARTBEAT;
-               break;
-#endif
-
-#ifdef CONFIG_LEDS_CPU
-       case led_idle_start:
-               hw_led_state &= ~SYS_BUSY;
-               break;
-
-       case led_idle_end:
-               hw_led_state |= SYS_BUSY;
-               break;
-#endif
-
-       case led_halted:
-               break;
-
-       case led_green_on:
-               hw_led_state |= BLINK;
-               break;
-
-       case led_green_off:
-               hw_led_state &= ~BLINK;
-               break;
-
-       case led_amber_on:
-               break;
-
-       case led_amber_off:
-               break;
-
-       case led_red_on:
-               break;
-
-       case led_red_off:
-               break;
-
-       default:
-               break;
-       }
-
-       if  (led_state & LED_STATE_ENABLED) {
-               switch (hw_led_state) {
-                       case 0:
-                               GPSR(GPIO_SYS_BUSY_LED)  |= GPIO_bit(GPIO_SYS_BUSY_LED);
-                               GPSR(GPIO_HEARTBEAT_LED) |= GPIO_bit(GPIO_HEARTBEAT_LED);
-                               break;
-                       case 1:
-                               GPCR(GPIO_SYS_BUSY_LED)  |= GPIO_bit(GPIO_SYS_BUSY_LED);
-                               GPSR(GPIO_HEARTBEAT_LED) |= GPIO_bit(GPIO_HEARTBEAT_LED);
-                               break;
-                       case 2:
-                               GPSR(GPIO_SYS_BUSY_LED)  |= GPIO_bit(GPIO_SYS_BUSY_LED);
-                               GPCR(GPIO_HEARTBEAT_LED) |= GPIO_bit(GPIO_HEARTBEAT_LED);
-                               break;
-                       case 3:
-                               GPCR(GPIO_SYS_BUSY_LED)  |= GPIO_bit(GPIO_SYS_BUSY_LED);
-                               GPCR(GPIO_HEARTBEAT_LED) |= GPIO_bit(GPIO_HEARTBEAT_LED);
-                               break;
-               }
-       }
-       else {
-               /* turn all off */
-               GPSR(GPIO_SYS_BUSY_LED)  |= GPIO_bit(GPIO_SYS_BUSY_LED);
-               GPSR(GPIO_HEARTBEAT_LED) |= GPIO_bit(GPIO_HEARTBEAT_LED);
-       }
-
-       local_irq_restore(flags);
-}
index e13eb841e48d3b04f0981f3d0ad80be92558d494..bbe4d5f6afaa6f697075bf0422044d9b4915a504 100644 (file)
@@ -24,8 +24,6 @@ pxa_leds_init(void)
                leds_event = mainstone_leds_event;
        if (machine_is_pxa_idp())
                leds_event = idp_leds_event;
-       if (machine_is_trizeps4())
-               leds_event = trizeps4_leds_event;
 
        leds_event(led_start);
        return 0;
index 58f3402a0375561b2395532169a98058f1630a10..b4d00aba0e3121455f9ce3756df97022d3e6dbda 100644 (file)
@@ -20,6 +20,7 @@
 #include <linux/delay.h>
 #include <linux/platform_device.h>
 #include <linux/clk.h>
+#include <linux/spi/spi.h>
 #include <linux/smc91x.h>
 
 #include <asm/types.h>
@@ -38,6 +39,7 @@
 #include <mach/gpio.h>
 #include <mach/pxafb.h>
 #include <mach/ssp.h>
+#include <mach/pxa2xx_spi.h>
 #include <mach/pxa27x_keypad.h>
 #include <mach/pxa3xx_nand.h>
 #include <mach/littleton.h>
@@ -72,8 +74,8 @@ static mfp_cfg_t littleton_mfp_cfg[] __initdata = {
 
        /* SSP2 */
        GPIO25_SSP2_SCLK,
-       GPIO17_SSP2_FRM,
        GPIO27_SSP2_TXD,
+       GPIO17_GPIO,    /* SFRM as chip-select */
 
        /* Debug Ethernet */
        GPIO90_GPIO,
@@ -123,160 +125,6 @@ static struct platform_device smc91x_device = {
 };
 
 #if defined(CONFIG_FB_PXA) || defined(CONFIG_FB_PXA_MODULE)
-/* use bit 30, 31 as the indicator of command parameter number */
-#define CMD0(x)                ((0x00000000) | ((x) << 9))
-#define CMD1(x, x1)    ((0x40000000) | ((x) << 9) | 0x100 | (x1))
-#define CMD2(x, x1, x2)        ((0x80000000) | ((x) << 18) | 0x20000 |\
-                        ((x1) << 9) | 0x100 | (x2))
-
-static uint32_t lcd_panel_reset[] = {
-       CMD0(0x1), /* reset */
-       CMD0(0x0), /* nop */
-       CMD0(0x0), /* nop */
-       CMD0(0x0), /* nop */
-};
-
-static uint32_t lcd_panel_on[] = {
-       CMD0(0x29),             /* Display ON */
-       CMD2(0xB8, 0xFF, 0xF9), /* Output Control */
-       CMD0(0x11),             /* Sleep out */
-       CMD1(0xB0, 0x16),       /* Wake */
-};
-
-static uint32_t lcd_panel_off[] = {
-       CMD0(0x28),             /* Display OFF */
-       CMD2(0xB8, 0x80, 0x02), /* Output Control */
-       CMD0(0x10),             /* Sleep in */
-       CMD1(0xB0, 0x00),       /* Deep stand by in */
-};
-
-static uint32_t lcd_vga_pass_through[] = {
-       CMD1(0xB0, 0x16),
-       CMD1(0xBC, 0x80),
-       CMD1(0xE1, 0x00),
-       CMD1(0x36, 0x50),
-       CMD1(0x3B, 0x00),
-};
-
-static uint32_t lcd_qvga_pass_through[] = {
-       CMD1(0xB0, 0x16),
-       CMD1(0xBC, 0x81),
-       CMD1(0xE1, 0x00),
-       CMD1(0x36, 0x50),
-       CMD1(0x3B, 0x22),
-};
-
-static uint32_t lcd_vga_transfer[] = {
-       CMD1(0xcf, 0x02),       /* Blanking period control (1) */
-       CMD2(0xd0, 0x08, 0x04), /* Blanking period control (2) */
-       CMD1(0xd1, 0x01),       /* CKV timing control on/off */
-       CMD2(0xd2, 0x14, 0x00), /* CKV 1,2 timing control */
-       CMD2(0xd3, 0x1a, 0x0f), /* OEV timing control */
-       CMD2(0xd4, 0x1f, 0xaf), /* ASW timing control (1) */
-       CMD1(0xd5, 0x14),       /* ASW timing control (2) */
-       CMD0(0x21),             /* Invert for normally black display */
-       CMD0(0x29),             /* Display on */
-};
-
-static uint32_t lcd_qvga_transfer[] = {
-       CMD1(0xd6, 0x02),       /* Blanking period control (1) */
-       CMD2(0xd7, 0x08, 0x04), /* Blanking period control (2) */
-       CMD1(0xd8, 0x01),       /* CKV timing control on/off */
-       CMD2(0xd9, 0x00, 0x08), /* CKV 1,2 timing control */
-       CMD2(0xde, 0x05, 0x0a), /* OEV timing control */
-       CMD2(0xdf, 0x0a, 0x19), /* ASW timing control (1) */
-       CMD1(0xe0, 0x0a),       /* ASW timing control (2) */
-       CMD0(0x21),             /* Invert for normally black display */
-       CMD0(0x29),             /* Display on */
-};
-
-static uint32_t lcd_panel_config[] = {
-       CMD2(0xb8, 0xff, 0xf9), /* Output control */
-       CMD0(0x11),             /* sleep out */
-       CMD1(0xba, 0x01),       /* Display mode (1) */
-       CMD1(0xbb, 0x00),       /* Display mode (2) */
-       CMD1(0x3a, 0x60),       /* Display mode 18-bit RGB */
-       CMD1(0xbf, 0x10),       /* Drive system change control */
-       CMD1(0xb1, 0x56),       /* Booster operation setup */
-       CMD1(0xb2, 0x33),       /* Booster mode setup */
-       CMD1(0xb3, 0x11),       /* Booster frequency setup */
-       CMD1(0xb4, 0x02),       /* Op amp/system clock */
-       CMD1(0xb5, 0x35),       /* VCS voltage */
-       CMD1(0xb6, 0x40),       /* VCOM voltage */
-       CMD1(0xb7, 0x03),       /* External display signal */
-       CMD1(0xbd, 0x00),       /* ASW slew rate */
-       CMD1(0xbe, 0x00),       /* Dummy data for QuadData operation */
-       CMD1(0xc0, 0x11),       /* Sleep out FR count (A) */
-       CMD1(0xc1, 0x11),       /* Sleep out FR count (B) */
-       CMD1(0xc2, 0x11),       /* Sleep out FR count (C) */
-       CMD2(0xc3, 0x20, 0x40), /* Sleep out FR count (D) */
-       CMD2(0xc4, 0x60, 0xc0), /* Sleep out FR count (E) */
-       CMD2(0xc5, 0x10, 0x20), /* Sleep out FR count (F) */
-       CMD1(0xc6, 0xc0),       /* Sleep out FR count (G) */
-       CMD2(0xc7, 0x33, 0x43), /* Gamma 1 fine tuning (1) */
-       CMD1(0xc8, 0x44),       /* Gamma 1 fine tuning (2) */
-       CMD1(0xc9, 0x33),       /* Gamma 1 inclination adjustment */
-       CMD1(0xca, 0x00),       /* Gamma 1 blue offset adjustment */
-       CMD2(0xec, 0x01, 0xf0), /* Horizontal clock cycles */
-};
-
-static void ssp_reconfig(struct ssp_dev *dev, int nparam)
-{
-       static int last_nparam = -1;
-
-       /* check if it is necessary to re-config SSP */
-       if (nparam == last_nparam)
-               return;
-
-       ssp_disable(dev);
-       ssp_config(dev, (nparam == 2) ? 0x0010058a : 0x00100581, 0x18, 0, 0);
-
-       last_nparam = nparam;
-}
-
-static void ssp_send_cmd(uint32_t *cmd, int num)
-{
-       static int ssp_initialized;
-       static struct ssp_dev ssp2;
-
-       int i;
-
-       if (!ssp_initialized) {
-               ssp_init(&ssp2, 2, SSP_NO_IRQ);
-               ssp_initialized = 1;
-       }
-
-       clk_enable(ssp2.ssp->clk);
-       for (i = 0; i < num; i++, cmd++) {
-               ssp_reconfig(&ssp2, (*cmd >> 30) & 0x3);
-               ssp_write_word(&ssp2, *cmd & 0x3fffffff);
-
-               /* FIXME: ssp_flush() is mandatory here to work */
-               ssp_flush(&ssp2);
-       }
-       clk_disable(ssp2.ssp->clk);
-}
-
-static void littleton_lcd_power(int on, struct fb_var_screeninfo *var)
-{
-       if (on) {
-               ssp_send_cmd(ARRAY_AND_SIZE(lcd_panel_on));
-               ssp_send_cmd(ARRAY_AND_SIZE(lcd_panel_reset));
-               if (var->xres > 240) {
-                       /* VGA */
-                       ssp_send_cmd(ARRAY_AND_SIZE(lcd_vga_pass_through));
-                       ssp_send_cmd(ARRAY_AND_SIZE(lcd_panel_config));
-                       ssp_send_cmd(ARRAY_AND_SIZE(lcd_vga_transfer));
-               } else {
-                       /* QVGA */
-                       ssp_send_cmd(ARRAY_AND_SIZE(lcd_qvga_pass_through));
-                       ssp_send_cmd(ARRAY_AND_SIZE(lcd_panel_config));
-                       ssp_send_cmd(ARRAY_AND_SIZE(lcd_qvga_transfer));
-               }
-       } else
-               ssp_send_cmd(ARRAY_AND_SIZE(lcd_panel_off));
-}
-
 static struct pxafb_mode_info tpo_tdo24mtea1_modes[] = {
        [0] = {
                /* VGA */
@@ -312,7 +160,6 @@ static struct pxafb_mach_info littleton_lcd_info = {
        .modes                  = tpo_tdo24mtea1_modes,
        .num_modes              = 2,
        .lcd_conn               = LCD_COLOR_TFT_16BPP,
-       .pxafb_lcd_power        = littleton_lcd_power,
 };
 
 static void littleton_init_lcd(void)
@@ -323,6 +170,51 @@ static void littleton_init_lcd(void)
 static inline void littleton_init_lcd(void) {};
 #endif /* CONFIG_FB_PXA || CONFIG_FB_PXA_MODULE */
 
+#if defined(CONFIG_SPI_PXA2XX) || defined(CONFIG_SPI_PXA2XX_MODULE)
+static struct pxa2xx_spi_master littleton_spi_info = {
+       .num_chipselect         = 1,
+};
+
+static void littleton_tdo24m_cs(u32 cmd)
+{
+       gpio_set_value(LITTLETON_GPIO_LCD_CS, !(cmd == PXA2XX_CS_ASSERT));
+}
+
+static struct pxa2xx_spi_chip littleton_tdo24m_chip = {
+       .rx_threshold   = 1,
+       .tx_threshold   = 1,
+       .cs_control     = littleton_tdo24m_cs,
+};
+
+static struct spi_board_info littleton_spi_devices[] __initdata = {
+       {
+               .modalias       = "tdo24m",
+               .max_speed_hz   = 1000000,
+               .bus_num        = 2,
+               .chip_select    = 0,
+               .controller_data= &littleton_tdo24m_chip,
+       },
+};
+
+static void __init littleton_init_spi(void)
+{
+       int err;
+
+       err = gpio_request(LITTLETON_GPIO_LCD_CS, "LCD_CS");
+       if (err) {
+               pr_warning("failed to request GPIO for LCS CS\n");
+               return;
+       }
+
+       gpio_direction_output(LITTLETON_GPIO_LCD_CS, 1);
+
+       pxa2xx_set_spi_info(2, &littleton_spi_info);
+       spi_register_board_info(ARRAY_AND_SIZE(littleton_spi_devices));
+}
+#else
+static inline void littleton_init_spi(void) {}
+#endif
+
 #if defined(CONFIG_KEYBOARD_PXA27x) || defined(CONFIG_KEYBOARD_PXA27x_MODULE)
 static unsigned int littleton_matrix_key_map[] = {
        /* KEY(row, col, key_code) */
@@ -433,6 +325,7 @@ static void __init littleton_init(void)
         */
        platform_device_register(&smc91x_device);
 
+       littleton_init_spi();
        littleton_init_lcd();
        littleton_init_keypad();
        littleton_init_nand();
index b7038948d1d442db1e732f987a9875bb554405f9..de3f67daaacf14c7378fe2c35449b27a8ed71909 100644 (file)
@@ -40,7 +40,7 @@
 
 #include <mach/pxa-regs.h>
 #include <mach/pxa2xx-regs.h>
-#include <mach/pxa2xx-gpio.h>
+#include <mach/mfp-pxa27x.h>
 #include <mach/lpd270.h>
 #include <mach/audio.h>
 #include <mach/pxafb.h>
 #include "generic.h"
 #include "devices.h"
 
+static unsigned long lpd270_pin_config[] __initdata = {
+       /* Chip Selects */
+       GPIO15_nCS_1,   /* Mainboard Flash */
+       GPIO78_nCS_2,   /* CPLD + Ethernet */
+
+       /* LCD - 16bpp Active TFT */
+       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,
+       GPIO16_PWM0_OUT,        /* Backlight */
+
+       /* USB Host */
+       GPIO88_USBH1_PWR,
+       GPIO89_USBH1_PEN,
+
+       /* AC97 */
+       GPIO45_AC97_SYSCLK,
+
+       GPIO1_GPIO | WAKEUP_ON_EDGE_BOTH,
+};
 
 static unsigned int lpd270_irq_enabled;
 
@@ -88,8 +125,7 @@ static void lpd270_irq_handler(unsigned int irq, struct irq_desc *desc)
                GEDR(0) = GPIO_bit(0);  /* clear useless edge notification */
                if (likely(pending)) {
                        irq = LPD270_IRQ(0) + __ffs(pending);
-                       desc = irq_desc + irq;
-                       desc_handle_irq(irq, desc);
+                       generic_handle_irq(irq);
 
                        pending = __raw_readw(LPD270_INT_STATUS) &
                                                lpd270_irq_enabled;
@@ -265,8 +301,8 @@ static struct pxafb_mode_info sharp_lq057q3dc02_mode = {
 static struct pxafb_mach_info sharp_lq057q3dc02 = {
        .modes                  = &sharp_lq057q3dc02_mode,
        .num_modes              = 1,
-       .lccr0                  = 0x07800080,
-       .lccr3                  = 0x00400000,
+       .lcd_conn               = LCD_COLOR_TFT_16BPP | LCD_PCLK_EDGE_FALL |
+                                 LCD_ALTERNATE_MAPPING,
 };
 
 /* 12.1" TFT SVGA (LoLo display number 2) */
@@ -287,8 +323,8 @@ static struct pxafb_mode_info sharp_lq121s1dg31_mode = {
 static struct pxafb_mach_info sharp_lq121s1dg31 = {
        .modes                  = &sharp_lq121s1dg31_mode,
        .num_modes              = 1,
-       .lccr0                  = 0x07800080,
-       .lccr3                  = 0x00400000,
+       .lcd_conn               = LCD_COLOR_TFT_16BPP | LCD_PCLK_EDGE_FALL |
+                                 LCD_ALTERNATE_MAPPING,
 };
 
 /* 3.6" TFT QVGA (LoLo display number 3) */
@@ -309,8 +345,8 @@ static struct pxafb_mode_info sharp_lq036q1da01_mode = {
 static struct pxafb_mach_info sharp_lq036q1da01 = {
        .modes                  = &sharp_lq036q1da01_mode,
        .num_modes              = 1,
-       .lccr0                  = 0x07800080,
-       .lccr3                  = 0x00400000,
+       .lcd_conn               = LCD_COLOR_TFT_16BPP | LCD_PCLK_EDGE_FALL |
+                                 LCD_ALTERNATE_MAPPING,
 };
 
 /* 6.4" TFT VGA (LoLo display number 5) */
@@ -331,8 +367,8 @@ static struct pxafb_mode_info sharp_lq64d343_mode = {
 static struct pxafb_mach_info sharp_lq64d343 = {
        .modes                  = &sharp_lq64d343_mode,
        .num_modes              = 1,
-       .lccr0                  = 0x07800080,
-       .lccr3                  = 0x00400000,
+       .lcd_conn               = LCD_COLOR_TFT_16BPP | LCD_PCLK_EDGE_FALL |
+                                 LCD_ALTERNATE_MAPPING,
 };
 
 /* 10.4" TFT VGA (LoLo display number 7) */
@@ -353,8 +389,8 @@ static struct pxafb_mode_info sharp_lq10d368_mode = {
 static struct pxafb_mach_info sharp_lq10d368 = {
        .modes                  = &sharp_lq10d368_mode,
        .num_modes              = 1,
-       .lccr0                  = 0x07800080,
-       .lccr3                  = 0x00400000,
+       .lcd_conn               = LCD_COLOR_TFT_16BPP | LCD_PCLK_EDGE_FALL |
+                                 LCD_ALTERNATE_MAPPING,
 };
 
 /* 3.5" TFT QVGA (LoLo display number 8) */
@@ -375,8 +411,8 @@ static struct pxafb_mode_info sharp_lq035q7db02_20_mode = {
 static struct pxafb_mach_info sharp_lq035q7db02_20 = {
        .modes                  = &sharp_lq035q7db02_20_mode,
        .num_modes              = 1,
-       .lccr0                  = 0x07800080,
-       .lccr3                  = 0x00400000,
+       .lcd_conn               = LCD_COLOR_TFT_16BPP | LCD_PCLK_EDGE_FALL |
+                                 LCD_ALTERNATE_MAPPING,
 };
 
 static struct pxafb_mach_info *lpd270_lcd_to_use;
@@ -411,27 +447,15 @@ static struct platform_device *platform_devices[] __initdata = {
        &lpd270_flash_device[1],
 };
 
-static int lpd270_ohci_init(struct device *dev)
-{
-       /* setup Port1 GPIO pin. */
-       pxa_gpio_mode(88 | GPIO_ALT_FN_1_IN);   /* USBHPWR1 */
-       pxa_gpio_mode(89 | GPIO_ALT_FN_2_OUT);  /* USBHPEN1 */
-
-       /* Set the Power Control Polarity Low and Power Sense
-          Polarity Low to active low. */
-       UHCHR = (UHCHR | UHCHR_PCPL | UHCHR_PSPL) &
-               ~(UHCHR_SSEP1 | UHCHR_SSEP2 | UHCHR_SSEP3 | UHCHR_SSE);
-
-       return 0;
-}
-
 static struct pxaohci_platform_data lpd270_ohci_platform_data = {
        .port_mode      = PMM_PERPORT_MODE,
-       .init           = lpd270_ohci_init,
+       .flags          = ENABLE_PORT_ALL | POWER_CONTROL_LOW | POWER_SENSE_LOW,
 };
 
 static void __init lpd270_init(void)
 {
+       pxa2xx_mfp_config(ARRAY_AND_SIZE(lpd270_pin_config));
+
        lpd270_flash_data[0].width = (BOOT_DEF & 1) ? 2 : 4;
        lpd270_flash_data[1].width = 4;
 
@@ -442,12 +466,6 @@ static void __init lpd270_init(void)
         */
        ARB_CNTRL = ARB_CORE_PARK | 0x234;
 
-       /*
-        * On LogicPD PXA270, we route AC97_SYSCLK via GPIO45.
-        */
-       pxa_gpio_mode(GPIO45_SYSCLK_AC97_MD);
-       pxa_gpio_mode(GPIO16_PWM0_MD);
-
        platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices));
 
        pxa_set_ac97_info(NULL);
@@ -473,15 +491,6 @@ static void __init lpd270_map_io(void)
        pxa_map_io();
        iotable_init(lpd270_io_desc, ARRAY_SIZE(lpd270_io_desc));
 
-       /* initialize sleep mode regs (wake-up sources, etc) */
-       PGSR0 = 0x00008800;
-       PGSR1 = 0x00000002;
-       PGSR2 = 0x0001FC00;
-       PGSR3 = 0x00001F81;
-       PWER  = 0xC0000002;
-       PRER  = 0x00000002;
-       PFER  = 0x00000002;
-
        /* for use I SRAM as framebuffer.  */
        PSLR |= 0x00000F04;
        PCFR  = 0x00000066;
index 4ffdff2d9ff1e188b142816a6f87cd5ee0ffda1c..bff704354c1aaf5b7168290fec3bdc5635ae0659 100644 (file)
 
 static unsigned long lubbock_pin_config[] __initdata = {
        GPIO15_nCS_1,   /* CS1 - Flash */
+       GPIO78_nCS_2,   /* CS2 - Baseboard FGPA */
        GPIO79_nCS_3,   /* CS3 - SMC ethernet */
+       GPIO80_nCS_4,   /* CS4 - SA1111 */
 
        /* SSP data pins */
        GPIO23_SSP1_SCLK,
        GPIO25_SSP1_TXD,
        GPIO26_SSP1_RXD,
 
+       /* LCD - 16bpp DSTN */
+       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,
+
        /* BTUART */
        GPIO42_BTUART_RXD,
        GPIO43_BTUART_TXD,
@@ -132,8 +155,7 @@ static void lubbock_irq_handler(unsigned int irq, struct irq_desc *desc)
                GEDR(0) = GPIO_bit(0);  /* clear our parent irq */
                if (likely(pending)) {
                        irq = LUBBOCK_IRQ(0) + __ffs(pending);
-                       desc = irq_desc + irq;
-                       desc_handle_irq(irq, desc);
+                       generic_handle_irq(irq);
                }
                pending = LUB_IRQ_SET_CLR & lubbock_irq_enabled;
        } while (pending);
index 143f28adaf95bddf4c39639be747d797dd85af50..519138bc5f85ee6cff05318749f9a0437e79aa22 100644 (file)
@@ -409,7 +409,7 @@ static struct platform_device backlight = {
  * LEDs
  */
 
-struct gpio_led gpio_leds[] = {
+static struct gpio_led gpio_leds[] = {
        {
                .name = "magician::vibra",
                .default_trigger = "none",
@@ -669,18 +669,10 @@ static struct pxamci_platform_data magician_mci_info = {
  * USB OHCI
  */
 
-static int magician_ohci_init(struct device *dev)
-{
-       UHCHR = (UHCHR | UHCHR_SSEP2 | UHCHR_PCPL | UHCHR_CGR) &
-           ~(UHCHR_SSEP1 | UHCHR_SSEP3 | UHCHR_SSE);
-
-       return 0;
-}
-
 static struct pxaohci_platform_data magician_ohci_info = {
-       .port_mode    = PMM_PERPORT_MODE,
-       .init         = magician_ohci_init,
-       .power_budget = 0,
+       .port_mode      = PMM_PERPORT_MODE,
+       .flags          = ENABLE_PORT1 | ENABLE_PORT3 | POWER_CONTROL_LOW,
+       .power_budget   = 0,
 };
 
 
index d44af761564dde1db79fed919554adb47c8be3f1..f2c7ad8f2b6b1fff6643a0f874f9169fb703fe09 100644 (file)
@@ -162,8 +162,7 @@ static void mainstone_irq_handler(unsigned int irq, struct irq_desc *desc)
                GEDR(0) = GPIO_bit(0);  /* clear useless edge notification */
                if (likely(pending)) {
                        irq = MAINSTONE_IRQ(0) + __ffs(pending);
-                       desc = irq_desc + irq;
-                       desc_handle_irq(irq, desc);
+                       generic_handle_irq(irq);
                }
                pending = MST_INTSETCLR & mainstone_irq_enabled;
        } while (pending);
@@ -508,19 +507,9 @@ static struct platform_device *platform_devices[] __initdata = {
        &mst_gpio_keys_device,
 };
 
-static int mainstone_ohci_init(struct device *dev)
-{
-       /* Set the Power Control Polarity Low and Power Sense
-          Polarity Low to active low. */
-       UHCHR = (UHCHR | UHCHR_PCPL | UHCHR_PSPL) &
-               ~(UHCHR_SSEP1 | UHCHR_SSEP2 | UHCHR_SSEP3 | UHCHR_SSE);
-
-       return 0;
-}
-
 static struct pxaohci_platform_data mainstone_ohci_platform_data = {
        .port_mode      = PMM_PERPORT_MODE,
-       .init           = mainstone_ohci_init,
+       .flags          = ENABLE_PORT_ALL | POWER_CONTROL_LOW | POWER_SENSE_LOW,
 };
 
 #if defined(CONFIG_KEYBOARD_PXA27x) || defined(CONFIG_KEYBOARD_PXA27x_MODULE)
index 925575f10acfe9b00c5d6cf85d4558dc4de7d042..2061c00c8ead6afd35d276b2f64028b50577fa25 100644 (file)
 
 #include "generic.h"
 
-#define PGSR(x)                __REG2(0x40F00020, ((x) & 0x60) >> 3)
+#define gpio_to_bank(gpio)     ((gpio) >> 5)
+
+#define PGSR(x)                __REG2(0x40F00020, (x) << 2)
+#define __GAFR(u, x)   __REG2((u) ? 0x40E00058 : 0x40E00054, (x) << 3)
+#define GAFR_L(x)      __GAFR(0, x)
+#define GAFR_U(x)      __GAFR(1, x)
 
 #define PWER_WE35      (1 << 24)
 
@@ -38,49 +43,59 @@ struct gpio_desc {
 };
 
 static struct gpio_desc gpio_desc[MFP_PIN_GPIO127 + 1];
+static int gpio_nr;
 
-static int __mfp_config_lpm(unsigned gpio, unsigned long lpm)
-{
-       unsigned mask = GPIO_bit(gpio);
-
-       /* low power state */
-       switch (lpm) {
-       case MFP_LPM_DRIVE_HIGH:
-               PGSR(gpio) |= mask;
-               break;
-       case MFP_LPM_DRIVE_LOW:
-               PGSR(gpio) &= ~mask;
-               break;
-       case MFP_LPM_INPUT:
-               break;
-       default:
-               pr_warning("%s: invalid low power state for GPIO%d\n",
-                               __func__, gpio);
-               return -EINVAL;
-       }
-       return 0;
-}
+static unsigned long gpdr_lpm[4];
 
 static int __mfp_config_gpio(unsigned gpio, unsigned long c)
 {
        unsigned long gafr, mask = GPIO_bit(gpio);
-       int fn;
+       int bank = gpio_to_bank(gpio);
+       int uorl = !!(gpio & 0x10); /* GAFRx_U or GAFRx_L ? */
+       int shft = (gpio & 0xf) << 1;
+       int fn = MFP_AF(c);
+       int dir = c & MFP_DIR_OUT;
 
-       fn = MFP_AF(c);
        if (fn > 3)
                return -EINVAL;
 
-       /* alternate function and direction */
-       gafr = GAFR(gpio) & ~(0x3 << ((gpio & 0xf) * 2));
-       GAFR(gpio) = gafr |  (fn  << ((gpio & 0xf) * 2));
+       /* alternate function and direction at run-time */
+       gafr = (uorl == 0) ? GAFR_L(bank) : GAFR_U(bank);
+       gafr = (gafr & ~(0x3 << shft)) | (fn << shft);
 
-       if (c & MFP_DIR_OUT)
+       if (uorl == 0)
+               GAFR_L(bank) = gafr;
+       else
+               GAFR_U(bank) = gafr;
+
+       if (dir == MFP_DIR_OUT)
                GPDR(gpio) |= mask;
        else
                GPDR(gpio) &= ~mask;
 
-       if (__mfp_config_lpm(gpio, c & MFP_LPM_STATE_MASK))
-               return -EINVAL;
+       /* alternate function and direction at low power mode */
+       switch (c & MFP_LPM_STATE_MASK) {
+       case MFP_LPM_DRIVE_HIGH:
+               PGSR(bank) |= mask;
+               dir = MFP_DIR_OUT;
+               break;
+       case MFP_LPM_DRIVE_LOW:
+               PGSR(bank) &= ~mask;
+               dir = MFP_DIR_OUT;
+               break;
+       case MFP_LPM_DEFAULT:
+               break;
+       default:
+               /* warning and fall through, treat as MFP_LPM_DEFAULT */
+               pr_warning("%s: GPIO%d: unsupported low power mode\n",
+                               __func__, gpio);
+               break;
+       }
+
+       if (dir == MFP_DIR_OUT)
+               gpdr_lpm[bank] |= mask;
+       else
+               gpdr_lpm[bank] &= ~mask;
 
        /* give early warning if MFP_LPM_CAN_WAKEUP is set on the
         * configurations of those pins not able to wakeup
@@ -91,7 +106,7 @@ static int __mfp_config_gpio(unsigned gpio, unsigned long c)
                return -EINVAL;
        }
 
-       if ((c & MFP_LPM_CAN_WAKEUP) && (c & MFP_DIR_OUT)) {
+       if ((c & MFP_LPM_CAN_WAKEUP) && (dir == MFP_DIR_OUT)) {
                pr_warning("%s: output GPIO%d unable to wakeup\n",
                                __func__, gpio);
                return -EINVAL;
@@ -135,7 +150,7 @@ void pxa2xx_mfp_config(unsigned long *mfp_cfgs, int num)
 
 void pxa2xx_mfp_set_lpm(int mfp, unsigned long lpm)
 {
-       unsigned long flags;
+       unsigned long flags, c;
        int gpio;
 
        gpio = __mfp_validate(mfp);
@@ -143,7 +158,11 @@ void pxa2xx_mfp_set_lpm(int mfp, unsigned long lpm)
                return;
 
        local_irq_save(flags);
-       __mfp_config_lpm(gpio, lpm);
+
+       c = gpio_desc[gpio].config;
+       c = (c & ~MFP_LPM_STATE_MASK) | lpm;
+       __mfp_config_gpio(gpio, c);
+
        local_irq_restore(flags);
 }
 
@@ -187,23 +206,22 @@ int gpio_set_wake(unsigned int gpio, unsigned int on)
 }
 
 #ifdef CONFIG_PXA25x
-static int __init pxa25x_mfp_init(void)
+static void __init pxa25x_mfp_init(void)
 {
        int i;
 
-       if (cpu_is_pxa25x()) {
-               for (i = 0; i <= 84; i++)
-                       gpio_desc[i].valid = 1;
+       for (i = 0; i <= 84; i++)
+               gpio_desc[i].valid = 1;
 
-               for (i = 0; i <= 15; i++) {
-                       gpio_desc[i].can_wakeup = 1;
-                       gpio_desc[i].mask = GPIO_bit(i);
-               }
+       for (i = 0; i <= 15; i++) {
+               gpio_desc[i].can_wakeup = 1;
+               gpio_desc[i].mask = GPIO_bit(i);
        }
 
-       return 0;
+       gpio_nr = 85;
 }
-postcore_initcall(pxa25x_mfp_init);
+#else
+static inline void pxa25x_mfp_init(void) {}
 #endif /* CONFIG_PXA25x */
 
 #ifdef CONFIG_PXA27x
@@ -233,45 +251,106 @@ int keypad_set_wake(unsigned int on)
        return 0;
 }
 
-static int __init pxa27x_mfp_init(void)
+static void __init pxa27x_mfp_init(void)
 {
        int i, gpio;
 
-       if (cpu_is_pxa27x()) {
-               for (i = 0; i <= 120; i++) {
-                       /* skip GPIO2, 5, 6, 7, 8, they are not
-                        * valid pins allow configuration
-                        */
-                       if (i == 2 || i == 5 || i == 6 ||
-                           i == 7 || i == 8)
-                               continue;
+       for (i = 0; i <= 120; i++) {
+               /* skip GPIO2, 5, 6, 7, 8, they are not
+                * valid pins allow configuration
+                */
+               if (i == 2 || i == 5 || i == 6 || i == 7 || i == 8)
+                       continue;
 
-                       gpio_desc[i].valid = 1;
-               }
+               gpio_desc[i].valid = 1;
+       }
 
-               /* Keypad GPIOs */
-               for (i = 0; i < ARRAY_SIZE(pxa27x_pkwr_gpio); i++) {
-                       gpio = pxa27x_pkwr_gpio[i];
-                       gpio_desc[gpio].can_wakeup = 1;
-                       gpio_desc[gpio].keypad_gpio = 1;
-                       gpio_desc[gpio].mask = 1 << i;
-               }
+       /* Keypad GPIOs */
+       for (i = 0; i < ARRAY_SIZE(pxa27x_pkwr_gpio); i++) {
+               gpio = pxa27x_pkwr_gpio[i];
+               gpio_desc[gpio].can_wakeup = 1;
+               gpio_desc[gpio].keypad_gpio = 1;
+               gpio_desc[gpio].mask = 1 << i;
+       }
 
-               /* Overwrite GPIO13 as a PWER wakeup source */
-               for (i = 0; i <= 15; i++) {
-                       /* skip GPIO2, 5, 6, 7, 8 */
-                       if (GPIO_bit(i) & 0x1e4)
-                               continue;
+       /* Overwrite GPIO13 as a PWER wakeup source */
+       for (i = 0; i <= 15; i++) {
+               /* skip GPIO2, 5, 6, 7, 8 */
+               if (GPIO_bit(i) & 0x1e4)
+                       continue;
 
-                       gpio_desc[i].can_wakeup = 1;
-                       gpio_desc[i].mask = GPIO_bit(i);
-               }
+               gpio_desc[i].can_wakeup = 1;
+               gpio_desc[i].mask = GPIO_bit(i);
+       }
+
+       gpio_desc[35].can_wakeup = 1;
+       gpio_desc[35].mask = PWER_WE35;
+
+       gpio_nr = 121;
+}
+#else
+static inline void pxa27x_mfp_init(void) {}
+#endif /* CONFIG_PXA27x */
+
+#ifdef CONFIG_PM
+static unsigned long saved_gafr[2][4];
+static unsigned long saved_gpdr[4];
 
-               gpio_desc[35].can_wakeup = 1;
-               gpio_desc[35].mask = PWER_WE35;
+static int pxa2xx_mfp_suspend(struct sys_device *d, pm_message_t state)
+{
+       int i;
+
+       for (i = 0; i <= gpio_to_bank(gpio_nr); i++) {
+
+               saved_gafr[0][i] = GAFR_L(i);
+               saved_gafr[1][i] = GAFR_U(i);
+               saved_gpdr[i] = GPDR(i * 32);
+
+               GPDR(i * 32) = gpdr_lpm[i];
        }
+       return 0;
+}
 
+static int pxa2xx_mfp_resume(struct sys_device *d)
+{
+       int i;
+
+       for (i = 0; i <= gpio_to_bank(gpio_nr); i++) {
+               GAFR_L(i) = saved_gafr[0][i];
+               GAFR_U(i) = saved_gafr[1][i];
+               GPDR(i * 32) = saved_gpdr[i];
+       }
+       PSSR = PSSR_RDH | PSSR_PH;
        return 0;
 }
-postcore_initcall(pxa27x_mfp_init);
-#endif /* CONFIG_PXA27x */
+#else
+#define pxa2xx_mfp_suspend     NULL
+#define pxa2xx_mfp_resume      NULL
+#endif
+
+struct sysdev_class pxa2xx_mfp_sysclass = {
+       .name           = "mfp",
+       .suspend        = pxa2xx_mfp_suspend,
+       .resume         = pxa2xx_mfp_resume,
+};
+
+static int __init pxa2xx_mfp_init(void)
+{
+       int i;
+
+       if (!cpu_is_pxa2xx())
+               return 0;
+
+       if (cpu_is_pxa25x())
+               pxa25x_mfp_init();
+
+       if (cpu_is_pxa27x())
+               pxa27x_mfp_init();
+
+       /* initialize gafr_run[], pgsr_lpm[] from existing values */
+       for (i = 0; i <= gpio_to_bank(gpio_nr); i++)
+               gpdr_lpm[i] = GPDR(i * 32);
+
+       return sysdev_class_register(&pxa2xx_mfp_sysclass);
+}
+postcore_initcall(pxa2xx_mfp_init);
diff --git a/arch/arm/mach-pxa/mioa701.c b/arch/arm/mach-pxa/mioa701.c
new file mode 100644 (file)
index 0000000..0842c53
--- /dev/null
@@ -0,0 +1,905 @@
+/*
+ * Handles the Mitac Mio A701 Board
+ *
+ * Copyright (C) 2008 Robert Jarzmik
+ *
+ * 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/kernel.h>
+#include <linux/init.h>
+#include <linux/platform_device.h>
+#include <linux/sysdev.h>
+#include <linux/input.h>
+#include <linux/delay.h>
+#include <linux/gpio_keys.h>
+#include <linux/pwm_backlight.h>
+#include <linux/rtc.h>
+#include <linux/leds.h>
+#include <linux/gpio.h>
+#include <linux/interrupt.h>
+#include <linux/irq.h>
+#include <linux/pda_power.h>
+#include <linux/power_supply.h>
+#include <linux/wm97xx.h>
+#include <linux/mtd/physmap.h>
+
+#include <asm/mach-types.h>
+#include <asm/mach/arch.h>
+#include <mach/mfp-pxa27x.h>
+#include <mach/pxa27x_keypad.h>
+#include <mach/pxafb.h>
+#include <mach/pxa2xx-regs.h>
+#include <mach/mmc.h>
+#include <mach/udc.h>
+#include <mach/pxa27x-udc.h>
+
+#include <mach/mioa701.h>
+
+#include "generic.h"
+#include "devices.h"
+
+static unsigned long mioa701_pin_config[] = {
+       /* Mio global */
+       MIO_CFG_OUT(GPIO9_CHARGE_nEN, AF0, DRIVE_LOW),
+       MIO_CFG_OUT(GPIO18_POWEROFF, AF0, DRIVE_LOW),
+       MFP_CFG_OUT(GPIO3, AF0, DRIVE_HIGH),
+       MFP_CFG_OUT(GPIO4, AF0, DRIVE_HIGH),
+
+       /* Backlight PWM 0 */
+       GPIO16_PWM0_OUT,
+
+       /* MMC */
+       GPIO32_MMC_CLK,
+       GPIO92_MMC_DAT_0,
+       GPIO109_MMC_DAT_1,
+       GPIO110_MMC_DAT_2,
+       GPIO111_MMC_DAT_3,
+       GPIO112_MMC_CMD,
+       MIO_CFG_IN(GPIO78_SDIO_RO, AF0),
+       MIO_CFG_IN(GPIO15_SDIO_INSERT, AF0),
+       MIO_CFG_OUT(GPIO91_SDIO_EN, AF0, DRIVE_LOW),
+
+       /* USB */
+       MIO_CFG_IN(GPIO13_USB_DETECT, AF0),
+       MIO_CFG_OUT(GPIO22_USB_ENABLE, AF0, DRIVE_LOW),
+
+       /* 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,
+
+       /* Bluetooth */
+       GPIO44_BTUART_CTS,
+       GPIO42_BTUART_RXD,
+       GPIO45_BTUART_RTS,
+       GPIO43_BTUART_TXD,
+       MIO_CFG_OUT(GPIO83_BT_ON, AF0, DRIVE_LOW),
+
+       /* GPS */
+       MIO_CFG_OUT(GPIO23_GPS_UNKNOWN1, AF0, DRIVE_LOW),
+       MIO_CFG_OUT(GPIO26_GPS_ON, AF0, DRIVE_LOW),
+       MIO_CFG_OUT(GPIO27_GPS_RESET, AF0, DRIVE_LOW),
+       MIO_CFG_OUT(GPIO106_GPS_UNKNOWN2, AF0, DRIVE_LOW),
+       MIO_CFG_OUT(GPIO107_GPS_UNKNOWN3, AF0, DRIVE_LOW),
+       GPIO46_STUART_RXD,
+       GPIO47_STUART_TXD,
+
+       /* GSM */
+       MIO_CFG_OUT(GPIO24_GSM_MOD_RESET_CMD, AF0, DRIVE_LOW),
+       MIO_CFG_OUT(GPIO88_GSM_nMOD_ON_CMD, AF0, DRIVE_HIGH),
+       MIO_CFG_OUT(GPIO90_GSM_nMOD_OFF_CMD, AF0, DRIVE_HIGH),
+       MIO_CFG_OUT(GPIO114_GSM_nMOD_DTE_UART_STATE, AF0, DRIVE_HIGH),
+       MIO_CFG_IN(GPIO25_GSM_MOD_ON_STATE, AF0),
+       MIO_CFG_IN(GPIO113_GSM_EVENT, AF0) | WAKEUP_ON_EDGE_BOTH,
+       GPIO34_FFUART_RXD,
+       GPIO35_FFUART_CTS,
+       GPIO36_FFUART_DCD,
+       GPIO37_FFUART_DSR,
+       GPIO39_FFUART_TXD,
+       GPIO40_FFUART_DTR,
+       GPIO41_FFUART_RTS,
+
+       /* Sound */
+       GPIO89_AC97_SYSCLK,
+       MIO_CFG_IN(GPIO12_HPJACK_INSERT, AF0),
+
+       /* Leds */
+       MIO_CFG_OUT(GPIO10_LED_nCharging, AF0, DRIVE_HIGH),
+       MIO_CFG_OUT(GPIO97_LED_nBlue, AF0, DRIVE_HIGH),
+       MIO_CFG_OUT(GPIO98_LED_nOrange, AF0, DRIVE_HIGH),
+       MIO_CFG_OUT(GPIO82_LED_nVibra, AF0, DRIVE_HIGH),
+       MIO_CFG_OUT(GPIO115_LED_nKeyboard, AF0, DRIVE_HIGH),
+
+       /* Keyboard */
+       MIO_CFG_IN(GPIO0_KEY_POWER, AF0) | WAKEUP_ON_EDGE_BOTH,
+       MIO_CFG_IN(GPIO93_KEY_VOLUME_UP, AF0),
+       MIO_CFG_IN(GPIO94_KEY_VOLUME_DOWN, AF0),
+       GPIO100_KP_MKIN_0,
+       GPIO101_KP_MKIN_1,
+       GPIO102_KP_MKIN_2,
+       GPIO103_KP_MKOUT_0,
+       GPIO104_KP_MKOUT_1,
+       GPIO105_KP_MKOUT_2,
+
+       /* Unknown */
+       MFP_CFG_IN(GPIO14, AF0),
+       MFP_CFG_IN(GPIO20, AF0),
+       MFP_CFG_IN(GPIO21, AF0),
+       MFP_CFG_IN(GPIO33, AF0),
+       MFP_CFG_OUT(GPIO49, AF0, DRIVE_HIGH),
+       MFP_CFG_OUT(GPIO57, AF0, DRIVE_HIGH),
+       MFP_CFG_OUT(GPIO77, AF0, DRIVE_HIGH),
+       MFP_CFG_IN(GPIO80, AF0),
+       MFP_CFG_OUT(GPIO86, AF0, DRIVE_HIGH),
+       MFP_CFG_IN(GPIO96, AF0),
+       MFP_CFG_OUT(GPIO116, AF0, DRIVE_HIGH),
+};
+
+#define MIO_GPIO_IN(num, _desc) \
+       { .gpio = (num), .dir = 0, .desc = (_desc) }
+#define MIO_GPIO_OUT(num, _init, _desc) \
+       { .gpio = (num), .dir = 1, .init = (_init), .desc = (_desc) }
+struct gpio_ress {
+       unsigned gpio : 8;
+       unsigned dir : 1;
+       unsigned init : 1;
+       char *desc;
+};
+
+static int mio_gpio_request(struct gpio_ress *gpios, int size)
+{
+       int i, rc = 0;
+       int gpio;
+       int dir;
+
+       for (i = 0; (!rc) && (i < size); i++) {
+               gpio = gpios[i].gpio;
+               dir = gpios[i].dir;
+               rc = gpio_request(gpio, gpios[i].desc);
+               if (rc) {
+                       printk(KERN_ERR "Error requesting GPIO %d(%s) : %d\n",
+                              gpio, gpios[i].desc, rc);
+                       continue;
+               }
+               if (dir)
+                       gpio_direction_output(gpio, gpios[i].init);
+               else
+                       gpio_direction_input(gpio);
+       }
+       while ((rc) && (--i >= 0))
+               gpio_free(gpios[i].gpio);
+       return rc;
+}
+
+static void mio_gpio_free(struct gpio_ress *gpios, int size)
+{
+       int i;
+
+       for (i = 0; i < size; i++)
+               gpio_free(gpios[i].gpio);
+}
+
+/* LCD Screen and Backlight */
+static struct platform_pwm_backlight_data mioa701_backlight_data = {
+       .pwm_id         = 0,
+       .max_brightness = 100,
+       .dft_brightness = 50,
+       .pwm_period_ns  = 4000 * 1024,  /* Fl = 250kHz */
+};
+
+/*
+ * LTM0305A776C LCD panel timings
+ *
+ * see:
+ *  - the LTM0305A776C datasheet,
+ *  - and the PXA27x Programmers' manual
+ */
+static struct pxafb_mode_info mioa701_ltm0305a776c = {
+       .pixclock               = 220000,       /* CLK=4.545 MHz */
+       .xres                   = 240,
+       .yres                   = 320,
+       .bpp                    = 16,
+       .hsync_len              = 4,
+       .vsync_len              = 2,
+       .left_margin            = 6,
+       .right_margin           = 4,
+       .upper_margin           = 5,
+       .lower_margin           = 3,
+};
+
+static void mioa701_lcd_power(int on, struct fb_var_screeninfo *si)
+{
+       gpio_set_value(GPIO87_LCD_POWER, on);
+}
+
+static struct pxafb_mach_info mioa701_pxafb_info = {
+       .modes                  = &mioa701_ltm0305a776c,
+       .num_modes              = 1,
+       .lcd_conn               = LCD_COLOR_TFT_16BPP | LCD_PCLK_EDGE_FALL,
+       .pxafb_lcd_power        = mioa701_lcd_power,
+};
+
+/*
+ * Keyboard configuration
+ */
+static unsigned int mioa701_matrix_keys[] = {
+       KEY(0, 0, KEY_UP),
+       KEY(0, 1, KEY_RIGHT),
+       KEY(0, 2, KEY_MEDIA),
+       KEY(1, 0, KEY_DOWN),
+       KEY(1, 1, KEY_ENTER),
+       KEY(1, 2, KEY_CONNECT), /* GPS key */
+       KEY(2, 0, KEY_LEFT),
+       KEY(2, 1, KEY_PHONE),   /* Phone Green key */
+       KEY(2, 2, KEY_CAMERA)   /* Camera key */
+};
+static struct pxa27x_keypad_platform_data mioa701_keypad_info = {
+       .matrix_key_rows = 3,
+       .matrix_key_cols = 3,
+       .matrix_key_map = mioa701_matrix_keys,
+       .matrix_key_map_size = ARRAY_SIZE(mioa701_matrix_keys),
+};
+
+/*
+ * GPIO Key Configuration
+ */
+#define MIO_KEY(key, _gpio, _desc, _wakeup) \
+       { .code = (key), .gpio = (_gpio), .active_low = 0, \
+       .desc = (_desc), .type = EV_KEY, .wakeup = (_wakeup) }
+static struct gpio_keys_button mioa701_button_table[] = {
+       MIO_KEY(KEY_EXIT, GPIO0_KEY_POWER, "Power button", 1),
+       MIO_KEY(KEY_VOLUMEUP, GPIO93_KEY_VOLUME_UP, "Volume up", 0),
+       MIO_KEY(KEY_VOLUMEDOWN, GPIO94_KEY_VOLUME_DOWN, "Volume down", 0),
+       MIO_KEY(KEY_HP, GPIO12_HPJACK_INSERT, "HP jack detect", 0)
+};
+
+static struct gpio_keys_platform_data mioa701_gpio_keys_data = {
+       .buttons  = mioa701_button_table,
+       .nbuttons = ARRAY_SIZE(mioa701_button_table),
+};
+
+/*
+ * Leds and vibrator
+ */
+#define ONE_LED(_gpio, _name) \
+{ .gpio = (_gpio), .name = (_name), .active_low = true }
+static struct gpio_led gpio_leds[] = {
+       ONE_LED(GPIO10_LED_nCharging, "mioa701:charging"),
+       ONE_LED(GPIO97_LED_nBlue, "mioa701:blue"),
+       ONE_LED(GPIO98_LED_nOrange, "mioa701:orange"),
+       ONE_LED(GPIO82_LED_nVibra, "mioa701:vibra"),
+       ONE_LED(GPIO115_LED_nKeyboard, "mioa701:keyboard")
+};
+
+static struct gpio_led_platform_data gpio_led_info = {
+       .leds = gpio_leds,
+       .num_leds = ARRAY_SIZE(gpio_leds),
+};
+
+/*
+ * GSM Sagem XS200 chip
+ *
+ * GSM handling was purged from kernel. For history, this is the way to go :
+ *   - init : GPIO24_GSM_MOD_RESET_CMD = 0, GPIO114_GSM_nMOD_DTE_UART_STATE = 1
+ *            GPIO88_GSM_nMOD_ON_CMD = 1, GPIO90_GSM_nMOD_OFF_CMD = 1
+ *   - reset : GPIO24_GSM_MOD_RESET_CMD = 1, msleep(100),
+ *             GPIO24_GSM_MOD_RESET_CMD = 0
+ *   - turn on  : GPIO88_GSM_nMOD_ON_CMD = 0, msleep(1000),
+ *                GPIO88_GSM_nMOD_ON_CMD = 1
+ *   - turn off : GPIO90_GSM_nMOD_OFF_CMD = 0, msleep(1000),
+ *                GPIO90_GSM_nMOD_OFF_CMD = 1
+ */
+static int is_gsm_on(void)
+{
+       int is_on;
+
+       is_on = !!gpio_get_value(GPIO25_GSM_MOD_ON_STATE);
+       return is_on;
+}
+
+irqreturn_t gsm_on_irq(int irq, void *p)
+{
+       printk(KERN_DEBUG "Mioa701: GSM status changed to %s\n",
+              is_gsm_on() ? "on" : "off");
+       return IRQ_HANDLED;
+}
+
+struct gpio_ress gsm_gpios[] = {
+       MIO_GPIO_IN(GPIO25_GSM_MOD_ON_STATE, "GSM state"),
+       MIO_GPIO_IN(GPIO113_GSM_EVENT, "GSM event"),
+};
+
+static int __init gsm_init(void)
+{
+       int rc;
+
+       rc = mio_gpio_request(ARRAY_AND_SIZE(gsm_gpios));
+       if (rc)
+               goto err_gpio;
+       rc = request_irq(gpio_to_irq(GPIO25_GSM_MOD_ON_STATE), gsm_on_irq,
+                        IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
+                        "GSM XS200 Power Irq", NULL);
+       if (rc)
+               goto err_irq;
+
+       gpio_set_wake(GPIO113_GSM_EVENT, 1);
+       return 0;
+
+err_irq:
+       printk(KERN_ERR "Mioa701: Can't request GSM_ON irq\n");
+       mio_gpio_free(ARRAY_AND_SIZE(gsm_gpios));
+err_gpio:
+       printk(KERN_ERR "Mioa701: gsm not available\n");
+       return rc;
+}
+
+static void gsm_exit(void)
+{
+       free_irq(gpio_to_irq(GPIO25_GSM_MOD_ON_STATE), NULL);
+       mio_gpio_free(ARRAY_AND_SIZE(gsm_gpios));
+}
+
+/*
+ * Bluetooth BRF6150 chip
+ *
+ * BT handling was purged from kernel. For history, this is the way to go :
+ * - turn on  : GPIO83_BT_ON = 1
+ * - turn off : GPIO83_BT_ON = 0
+ */
+
+/*
+ * GPS Sirf Star III chip
+ *
+ * GPS handling was purged from kernel. For history, this is the way to go :
+ * - init : GPIO23_GPS_UNKNOWN1 = 1, GPIO26_GPS_ON = 0, GPIO27_GPS_RESET = 0
+ *          GPIO106_GPS_UNKNOWN2 = 0, GPIO107_GPS_UNKNOWN3 = 0
+ * - turn on  : GPIO27_GPS_RESET = 1, GPIO26_GPS_ON = 1
+ * - turn off : GPIO26_GPS_ON = 0, GPIO27_GPS_RESET = 0
+ */
+
+/*
+ * USB UDC
+ */
+static void udc_power_command(int cmd)
+{
+       switch (cmd) {
+       case PXA2XX_UDC_CMD_DISCONNECT:
+               gpio_set_value(GPIO22_USB_ENABLE, 0);
+               break;
+       case PXA2XX_UDC_CMD_CONNECT:
+               gpio_set_value(GPIO22_USB_ENABLE, 1);
+               break;
+       default:
+               printk(KERN_INFO "udc_control: unknown command (0x%x)!\n", cmd);
+               break;
+       }
+}
+
+static int is_usb_connected(void)
+{
+       return !!gpio_get_value(GPIO13_USB_DETECT);
+}
+
+static struct pxa2xx_udc_mach_info mioa701_udc_info = {
+       .udc_is_connected = is_usb_connected,
+       .udc_command      = udc_power_command,
+};
+
+struct gpio_ress udc_gpios[] = {
+       MIO_GPIO_OUT(GPIO22_USB_ENABLE, 0, "USB Vbus enable")
+};
+
+static int __init udc_init(void)
+{
+       pxa_set_udc_info(&mioa701_udc_info);
+       return mio_gpio_request(ARRAY_AND_SIZE(udc_gpios));
+}
+
+static void udc_exit(void)
+{
+       mio_gpio_free(ARRAY_AND_SIZE(udc_gpios));
+}
+
+/*
+ * SDIO/MMC Card controller
+ */
+static void mci_setpower(struct device *dev, unsigned int vdd)
+{
+       struct pxamci_platform_data *p_d = dev->platform_data;
+
+       if ((1 << vdd) & p_d->ocr_mask)
+               gpio_set_value(GPIO91_SDIO_EN, 1);      /* enable SDIO power */
+       else
+               gpio_set_value(GPIO91_SDIO_EN, 0);      /* disable SDIO power */
+}
+
+static int mci_get_ro(struct device *dev)
+{
+       return gpio_get_value(GPIO78_SDIO_RO);
+}
+
+struct gpio_ress mci_gpios[] = {
+       MIO_GPIO_IN(GPIO78_SDIO_RO,     "SDIO readonly detect"),
+       MIO_GPIO_IN(GPIO15_SDIO_INSERT, "SDIO insertion detect"),
+       MIO_GPIO_OUT(GPIO91_SDIO_EN, 0, "SDIO power enable")
+};
+
+static void mci_exit(struct device *dev, void *data)
+{
+       mio_gpio_free(ARRAY_AND_SIZE(mci_gpios));
+       free_irq(gpio_to_irq(GPIO15_SDIO_INSERT), data);
+}
+
+static struct pxamci_platform_data mioa701_mci_info;
+
+/**
+ * The card detect interrupt isn't debounced so we delay it by 250ms
+ * to give the card a chance to fully insert/eject.
+ */
+static int mci_init(struct device *dev, irq_handler_t detect_int, void *data)
+{
+       int rc;
+       int irq = gpio_to_irq(GPIO15_SDIO_INSERT);
+
+       rc = mio_gpio_request(ARRAY_AND_SIZE(mci_gpios));
+       if (rc)
+               goto err_gpio;
+       /* enable RE/FE interrupt on card insertion and removal */
+       rc = request_irq(irq, detect_int,
+                        IRQF_DISABLED | IRQF_TRIGGER_RISING |
+                        IRQF_TRIGGER_FALLING,
+                        "MMC card detect", data);
+       if (rc)
+               goto err_irq;
+
+       mioa701_mci_info.detect_delay = msecs_to_jiffies(250);
+       return 0;
+
+err_irq:
+       dev_err(dev, "mioa701_mci_init: MMC/SD:"
+               " can't request MMC card detect IRQ\n");
+       mio_gpio_free(ARRAY_AND_SIZE(mci_gpios));
+err_gpio:
+       return rc;
+}
+
+static struct pxamci_platform_data mioa701_mci_info = {
+       .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34,
+       .init     = mci_init,
+       .get_ro   = mci_get_ro,
+       .setpower = mci_setpower,
+       .exit     = mci_exit,
+};
+
+/* FlashRAM */
+static struct resource strataflash_resource = {
+       .start = PXA_CS0_PHYS,
+       .end   = PXA_CS0_PHYS + SZ_64M - 1,
+       .flags = IORESOURCE_MEM,
+};
+
+static struct physmap_flash_data strataflash_data = {
+       .width = 2,
+       /* .set_vpp = mioa701_set_vpp, */
+};
+
+static struct platform_device strataflash = {
+       .name          = "physmap-flash",
+       .id            = -1,
+       .resource      = &strataflash_resource,
+       .num_resources = 1,
+       .dev = {
+               .platform_data = &strataflash_data,
+       },
+};
+
+/*
+ * Suspend/Resume bootstrap management
+ *
+ * MIO A701 reboot sequence is highly ROM dependant. From the one dissassembled,
+ * this sequence is as follows :
+ *   - disables interrupts
+ *   - initialize SDRAM (self refresh RAM into active RAM)
+ *   - initialize GPIOs (depends on value at 0xa020b020)
+ *   - initialize coprossessors
+ *   - if edge detect on PWR_SCL(GPIO3), then proceed to cold start
+ *   - or if value at 0xa020b000 not equal to 0x0f0f0f0f, proceed to cold start
+ *   - else do a resume, ie. jump to addr 0xa0100000
+ */
+#define RESUME_ENABLE_ADDR     0xa020b000
+#define RESUME_ENABLE_VAL      0x0f0f0f0f
+#define RESUME_BT_ADDR         0xa020b020
+#define RESUME_UNKNOWN_ADDR    0xa020b024
+#define RESUME_VECTOR_ADDR     0xa0100000
+#define BOOTSTRAP_WORDS                mioa701_bootstrap_lg/4
+
+static u32 *save_buffer;
+
+static void install_bootstrap(void)
+{
+       int i;
+       u32 *rom_bootstrap  = phys_to_virt(RESUME_VECTOR_ADDR);
+       u32 *src = &mioa701_bootstrap;
+
+       for (i = 0; i < BOOTSTRAP_WORDS; i++)
+               rom_bootstrap[i] = src[i];
+}
+
+
+static int mioa701_sys_suspend(struct sys_device *sysdev, pm_message_t state)
+{
+       int i = 0, is_bt_on;
+       u32 *mem_resume_vector  = phys_to_virt(RESUME_VECTOR_ADDR);
+       u32 *mem_resume_enabler = phys_to_virt(RESUME_ENABLE_ADDR);
+       u32 *mem_resume_bt      = phys_to_virt(RESUME_BT_ADDR);
+       u32 *mem_resume_unknown = phys_to_virt(RESUME_UNKNOWN_ADDR);
+
+       /* Devices prepare suspend */
+       is_bt_on = gpio_get_value(GPIO83_BT_ON);
+       pxa2xx_mfp_set_lpm(GPIO83_BT_ON,
+                          is_bt_on ? MFP_LPM_DRIVE_HIGH : MFP_LPM_DRIVE_LOW);
+
+       for (i = 0; i < BOOTSTRAP_WORDS; i++)
+               save_buffer[i] = mem_resume_vector[i];
+       save_buffer[i++] = *mem_resume_enabler;
+       save_buffer[i++] = *mem_resume_bt;
+       save_buffer[i++] = *mem_resume_unknown;
+
+       *mem_resume_enabler = RESUME_ENABLE_VAL;
+       *mem_resume_bt      = is_bt_on;
+
+       install_bootstrap();
+       return 0;
+}
+
+static int mioa701_sys_resume(struct sys_device *sysdev)
+{
+       int i = 0;
+       u32 *mem_resume_vector  = phys_to_virt(RESUME_VECTOR_ADDR);
+       u32 *mem_resume_enabler = phys_to_virt(RESUME_ENABLE_ADDR);
+       u32 *mem_resume_bt      = phys_to_virt(RESUME_BT_ADDR);
+       u32 *mem_resume_unknown = phys_to_virt(RESUME_UNKNOWN_ADDR);
+
+       for (i = 0; i < BOOTSTRAP_WORDS; i++)
+               mem_resume_vector[i] = save_buffer[i];
+       *mem_resume_enabler = save_buffer[i++];
+       *mem_resume_bt      = save_buffer[i++];
+       *mem_resume_unknown = save_buffer[i++];
+
+       return 0;
+}
+
+static struct sysdev_class mioa701_sysclass = {
+       .name = "mioa701",
+};
+
+static struct sys_device sysdev_bootstrap = {
+       .cls            = &mioa701_sysclass,
+};
+
+static struct sysdev_driver driver_bootstrap = {
+       .suspend        = &mioa701_sys_suspend,
+       .resume         = &mioa701_sys_resume,
+};
+
+static int __init bootstrap_init(void)
+{
+       int rc;
+       int save_size = mioa701_bootstrap_lg + (sizeof(u32) * 3);
+
+       rc = sysdev_class_register(&mioa701_sysclass);
+       if (rc) {
+               printk(KERN_ERR "Failed registering mioa701 sys class\n");
+               return -ENODEV;
+       }
+       rc = sysdev_register(&sysdev_bootstrap);
+       if (rc) {
+               printk(KERN_ERR "Failed registering mioa701 sys device\n");
+               return -ENODEV;
+       }
+       rc = sysdev_driver_register(&mioa701_sysclass, &driver_bootstrap);
+       if (rc) {
+               printk(KERN_ERR "Failed registering PMU sys driver\n");
+               return -ENODEV;
+       }
+
+       save_buffer = kmalloc(save_size, GFP_KERNEL);
+       if (!save_buffer)
+               return -ENOMEM;
+       printk(KERN_INFO "MioA701: allocated %d bytes for bootstrap\n",
+              save_size);
+       return 0;
+}
+
+static void bootstrap_exit(void)
+{
+       kfree(save_buffer);
+       sysdev_driver_unregister(&mioa701_sysclass, &driver_bootstrap);
+       sysdev_unregister(&sysdev_bootstrap);
+       sysdev_class_unregister(&mioa701_sysclass);
+
+       printk(KERN_CRIT "Unregistering mioa701 suspend will hang next"
+              "resume !!!\n");
+}
+
+/*
+ * Power Supply
+ */
+static char *supplicants[] = {
+       "mioa701_battery"
+};
+
+static void mioa701_set_charge(int flags)
+{
+       gpio_set_value(GPIO9_CHARGE_nEN, !flags);
+}
+
+static struct pda_power_pdata power_pdata = {
+       .is_ac_online   = is_usb_connected,
+       .set_charge = mioa701_set_charge,
+       .supplied_to = supplicants,
+       .num_supplicants = ARRAY_SIZE(supplicants),
+};
+
+static struct resource power_resources[] = {
+       [0] = {
+               .name   = "ac",
+               .start  = gpio_to_irq(GPIO13_USB_DETECT),
+               .end    = gpio_to_irq(GPIO13_USB_DETECT),
+               .flags  = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE |
+               IORESOURCE_IRQ_LOWEDGE,
+       },
+};
+
+static struct platform_device power_dev = {
+       .name           = "pda-power",
+       .id             = -1,
+       .resource       = power_resources,
+       .num_resources  = ARRAY_SIZE(power_resources),
+       .dev = {
+               .platform_data  = &power_pdata,
+       },
+};
+
+#if defined(CONFIG_PDA_POWER) && defined(CONFIG_TOUCHSCREEN_WM97XX)
+static struct wm97xx *battery_wm;
+
+static enum power_supply_property battery_props[] = {
+       POWER_SUPPLY_PROP_STATUS,
+       POWER_SUPPLY_PROP_VOLTAGE_MAX_DESIGN,
+       POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN,
+       POWER_SUPPLY_PROP_VOLTAGE_NOW,
+       POWER_SUPPLY_PROP_CHARGE_FULL_DESIGN,   /* Necessary for apm */
+};
+
+static int get_battery_voltage(void)
+{
+       int adc = -1;
+
+       if (battery_wm)
+               adc = wm97xx_read_aux_adc(battery_wm, WM97XX_AUX_ID1);
+       return adc;
+}
+
+static int get_battery_status(struct power_supply *b)
+{
+       int status;
+
+       if (is_usb_connected())
+               status = POWER_SUPPLY_STATUS_CHARGING;
+       else
+               status = POWER_SUPPLY_STATUS_DISCHARGING;
+
+       return status;
+}
+
+static int get_property(struct power_supply *b,
+                       enum power_supply_property psp,
+                       union power_supply_propval *val)
+{
+       int rc = 0;
+
+       switch (psp) {
+       case POWER_SUPPLY_PROP_STATUS:
+               val->intval = get_battery_status(b);
+               break;
+       case POWER_SUPPLY_PROP_VOLTAGE_MAX_DESIGN:
+               val->intval = 0xfd0;
+               break;
+       case POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN:
+               val->intval = 0xc00;
+               break;
+       case POWER_SUPPLY_PROP_VOLTAGE_NOW:
+               val->intval = get_battery_voltage();
+               break;
+       case POWER_SUPPLY_PROP_CHARGE_FULL_DESIGN:
+               val->intval = 100;
+               break;
+       default:
+               val->intval = -1;
+               rc = -1;
+       }
+
+       return rc;
+};
+
+static struct power_supply battery_ps = {
+       .name = "mioa701_battery",
+       .type = POWER_SUPPLY_TYPE_BATTERY,
+       .get_property = get_property,
+       .properties = battery_props,
+       .num_properties = ARRAY_SIZE(battery_props),
+};
+
+static int battery_probe(struct platform_device *pdev)
+{
+       struct wm97xx *wm = platform_get_drvdata(pdev);
+       int rc;
+
+       battery_wm = wm;
+
+       rc = power_supply_register(NULL, &battery_ps);
+       if (rc)
+               dev_err(&pdev->dev,
+               "Could not register mioa701 battery -> %d\n", rc);
+       return rc;
+}
+
+static int battery_remove(struct platform_device *pdev)
+{
+       battery_wm = NULL;
+       return 0;
+}
+
+static struct platform_driver mioa701_battery_driver = {
+       .driver = {
+               .name = "wm97xx-battery",
+       },
+       .probe = battery_probe,
+       .remove = battery_remove
+};
+
+static int __init mioa701_battery_init(void)
+{
+       int rc;
+
+       rc = platform_driver_register(&mioa701_battery_driver);
+       if (rc)
+               printk(KERN_ERR "Could not register mioa701 battery driver\n");
+       return rc;
+}
+
+#else
+static int __init mioa701_battery_init(void)
+{
+       return 0;
+}
+#endif
+
+/*
+ * Mio global
+ */
+
+/* Devices */
+#define MIO_PARENT_DEV(var, strname, tparent, pdata)   \
+static struct platform_device var = {                  \
+       .name           = strname,                      \
+       .id             = -1,                           \
+       .dev            = {                             \
+               .platform_data = pdata,                 \
+               .parent = tparent,                      \
+       },                                              \
+};
+#define MIO_SIMPLE_DEV(var, strname, pdata)    \
+       MIO_PARENT_DEV(var, strname, NULL, pdata)
+
+MIO_SIMPLE_DEV(mioa701_gpio_keys, "gpio-keys",     &mioa701_gpio_keys_data)
+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)
+
+static struct platform_device *devices[] __initdata = {
+       &mioa701_gpio_keys,
+       &mioa701_backlight,
+       &mioa701_led,
+       &pxa2xx_pcm,
+       &pxa2xx_ac97,
+       &mio_wm9713_codec,
+       &mioa701_sound,
+       &power_dev,
+       &strataflash,
+       &mioa701_board
+};
+
+static void mioa701_machine_exit(void);
+
+static void mioa701_poweroff(void)
+{
+       mioa701_machine_exit();
+       gpio_set_value(GPIO18_POWEROFF, 1);
+}
+
+static void mioa701_restart(char c)
+{
+       mioa701_machine_exit();
+       arm_machine_restart(c);
+}
+
+struct gpio_ress global_gpios[] = {
+       MIO_GPIO_OUT(GPIO9_CHARGE_nEN, 1, "Charger enable"),
+       MIO_GPIO_OUT(GPIO18_POWEROFF, 0, "Power Off"),
+       MIO_GPIO_OUT(GPIO87_LCD_POWER, 0, "LCD Power")
+};
+
+static void __init mioa701_machine_init(void)
+{
+       PSLR  = 0xff100000; /* SYSDEL=125ms, PWRDEL=125ms, PSLR_SL_ROD=1 */
+       PCFR = PCFR_DC_EN | PCFR_GPR_EN | PCFR_OPDE;
+       RTTR = 32768 - 1; /* Reset crazy WinCE value */
+       UP2OCR = UP2OCR_HXOE;
+
+       pxa2xx_mfp_config(ARRAY_AND_SIZE(mioa701_pin_config));
+       mio_gpio_request(ARRAY_AND_SIZE(global_gpios));
+       bootstrap_init();
+       set_pxa_fb_info(&mioa701_pxafb_info);
+       pxa_set_mci_info(&mioa701_mci_info);
+       pxa_set_keypad_info(&mioa701_keypad_info);
+       udc_init();
+       pm_power_off = mioa701_poweroff;
+       arm_pm_restart = mioa701_restart;
+       platform_add_devices(devices, ARRAY_SIZE(devices));
+       gsm_init();
+       mioa701_battery_init();
+}
+
+static void mioa701_machine_exit(void)
+{
+       udc_exit();
+       bootstrap_exit();
+       gsm_exit();
+}
+
+MACHINE_START(MIOA701, "MIO A701")
+       .phys_io        = 0x40000000,
+       .io_pg_offst    = (io_p2v(0x40000000) >> 18) & 0xfffc,
+       .boot_params    = 0xa0000100,
+       .map_io         = &pxa_map_io,
+       .init_irq       = &pxa27x_init_irq,
+       .init_machine   = mioa701_machine_init,
+       .timer          = &pxa_timer,
+MACHINE_END
diff --git a/arch/arm/mach-pxa/mioa701_bootresume.S b/arch/arm/mach-pxa/mioa701_bootresume.S
new file mode 100644 (file)
index 0000000..a647693
--- /dev/null
@@ -0,0 +1,36 @@
+/* Bootloader to resume MIO A701
+ *
+ * 2007-1-12 Robert Jarzmik
+ *
+ * This code is licenced under the GPLv2.
+*/
+
+#include <linux/linkage.h>
+#include <asm/assembler.h>
+
+/*
+ * Note: Yes, part of the following code is located into the .data section.
+ *       This is to allow jumpaddr to be accessed with a relative load
+ *       while we can't rely on any MMU translation.  We could have put
+ *       sleep_save_sp in the .text section as well, but some setups might
+ *       insist on it to be truly read-only.
+ */
+       .data
+ENTRY(mioa701_bootstrap)
+0:
+       b       1f
+ENTRY(mioa701_jumpaddr)
+       .word   0x40f00008              @ PSPR in no-MMU mode
+1:
+       mov     r0,     #0xa0000000     @ Don't suppose memory access works
+       orr     r0, r0, #0x00200000     @ even if it's supposed to
+       mov     r1, #0
+       str     r1, [r0]                @ Early disable resume for next boot
+       ldr     r0, mioa701_jumpaddr    @ (Murphy's Law)
+       ldr     r0, [r0]
+       mov     pc, r0
+2:
+
+ENTRY(mioa701_bootstrap_lg)
+       .data
+       .word   2b-0b
diff --git a/arch/arm/mach-pxa/mp900.c b/arch/arm/mach-pxa/mp900.c
new file mode 100644 (file)
index 0000000..8a73814
--- /dev/null
@@ -0,0 +1,100 @@
+/*
+ *  linux/arch/arm/mach-pxa/mp900.c
+ *
+ *  Support for the NEC MobilePro900/C platform
+ *
+ *  Based on mach-pxa/gumstix.c
+ *
+ *  2007, 2008 Kristoffer Ericson <kristoffer.ericson@gmail.com>
+ *  2007, 2008 Michael Petchkovsky <mkpetch@internode.on.net>
+ *
+ *  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/init.h>
+#include <linux/device.h>
+#include <linux/platform_device.h>
+#include <linux/types.h>
+#include <linux/usb/isp116x.h>
+
+#include <mach/hardware.h>
+#include <mach/pxa-regs.h>
+#include <asm/mach-types.h>
+#include <asm/mach/arch.h>
+#include "generic.h"
+
+static void isp116x_pfm_delay(struct device *dev, int delay)
+{
+
+       /* 400Mhz PXA2 = 2.5ns / instruction */
+
+       int cyc = delay / 10;
+
+       /* 4 Instructions = 4 x 2.5ns = 10ns */
+       __asm__ volatile ("0:\n"
+               "subs %0, %1, #1\n"
+               "bge 0b\n"
+               :"=r" (cyc)
+               :"0"(cyc)
+       );
+}
+
+static struct isp116x_platform_data isp116x_pfm_data = {
+       .remote_wakeup_enable = 1,
+       .delay = isp116x_pfm_delay,
+};
+
+static struct resource isp116x_pfm_resources[] = {
+       [0] =   {
+               .start  = 0x0d000000,
+               .end    = 0x0d000000 + 1,
+               .flags  = IORESOURCE_MEM,
+               },
+       [1] =   {
+               .start  = 0x0d000000 + 4,
+               .end    = 0x0d000000 + 5,
+               .flags  = IORESOURCE_MEM,
+               },
+       [2] =   {
+               .start  = 61,
+               .end    = 61,
+               .flags  = IORESOURCE_IRQ,
+               },
+};
+
+static struct platform_device mp900c_dummy_device = {
+       .name           = "mp900c_dummy",
+       .id             = -1,
+};
+
+static struct platform_device mp900c_usb = {
+       .name           = "isp116x-hcd",
+       .num_resources  = ARRAY_SIZE(isp116x_pfm_resources),
+       .resource       = isp116x_pfm_resources,
+       .dev.platform_data = &isp116x_pfm_data,
+};
+
+static struct platform_device *devices[] __initdata = {
+       &mp900c_dummy_device,
+       &mp900c_usb,
+};
+
+static void __init mp900c_init(void)
+{
+       printk(KERN_INFO "MobilePro 900/C machine init\n");
+       platform_add_devices(devices, ARRAY_SIZE(devices));
+}
+
+/* Maintainer - Michael Petchkovsky <mkpetch@internode.on.net> */
+MACHINE_START(NEC_MP900, "MobilePro900/C")
+       .phys_io        = 0x40000000,
+       .boot_params    = 0xa0220100,
+       .io_pg_offst    = (io_p2v(0x40000000) >> 18) & 0xfffc,
+       .timer          = &pxa_timer,
+       .map_io         = pxa_map_io,
+       .init_irq       = pxa25x_init_irq,
+       .init_machine   = mp900c_init,
+MACHINE_END
+
index fe924a23debe316f632e0af740600db2f8a312b4..4447711c9fc61bc09267f355a82ac0195a3e5952 100644 (file)
@@ -25,6 +25,8 @@
 #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>
@@ -339,6 +341,23 @@ static struct platform_device power_supply = {
        },
 };
 
+/******************************************************************************
+ * 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    = PALMTX_BAT_MAX_VOLTAGE,
+       .min_voltage    = PALMTX_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
  ******************************************************************************/
@@ -401,6 +420,7 @@ static void __init palmtx_init(void)
        pxa_set_ac97_info(NULL);
        pxa_set_ficp_info(&palmtx_ficp_platform_data);
        pxa_set_keypad_info(&palmtx_keypad_platform_data);
+       wm97xx_bat_set_pdata(&wm97xx_batt_pdata);
 
        platform_add_devices(devices, ARRAY_SIZE(devices));
 }
diff --git a/arch/arm/mach-pxa/palmz72.c b/arch/arm/mach-pxa/palmz72.c
new file mode 100644 (file)
index 0000000..2f730da
--- /dev/null
@@ -0,0 +1,554 @@
+/*
+ * Hardware definitions for Palm Zire72
+ *
+ * Authors:
+ *     Vladimir "Farcaller" Pouzanov <farcaller@gmail.com>
+ *     Sergey Lapin <slapin@ossfans.org>
+ *     Alex Osborne <bobofdoom@gmail.com>
+ *     Jan Herman <2hp@seznam.cz>
+ *
+ * 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/sysdev.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/power_supply.h>
+
+#include <asm/mach-types.h>
+#include <asm/mach/arch.h>
+#include <asm/mach/map.h>
+
+#include <mach/audio.h>
+#include <mach/palmz72.h>
+#include <mach/mmc.h>
+#include <mach/pxafb.h>
+#include <mach/pxa-regs.h>
+#include <mach/pxa2xx-regs.h>
+#include <mach/mfp-pxa27x.h>
+#include <mach/irda.h>
+#include <mach/pxa27x_keypad.h>
+#include <mach/udc.h>
+#include <mach/pm.h>
+
+#include "generic.h"
+#include "devices.h"
+
+/******************************************************************************
+ * Pin configuration
+ ******************************************************************************/
+static unsigned long palmz72_pin_config[] __initdata = {
+       /* MMC */
+       GPIO32_MMC_CLK,
+       GPIO92_MMC_DAT_0,
+       GPIO109_MMC_DAT_1,
+       GPIO110_MMC_DAT_2,
+       GPIO111_MMC_DAT_3,
+       GPIO112_MMC_CMD,
+       GPIO14_GPIO,    /* SD detect */
+       GPIO115_GPIO,   /* SD RO */
+       GPIO98_GPIO,    /* SD power */
+
+       /* AC97 */
+       GPIO28_AC97_BITCLK,
+       GPIO29_AC97_SDATA_IN_0,
+       GPIO30_AC97_SDATA_OUT,
+       GPIO31_AC97_SYNC,
+
+       /* IrDA */
+       GPIO49_GPIO,    /* ir disable */
+       GPIO46_FICP_RXD,
+       GPIO47_FICP_TXD,
+
+       /* PWM */
+       GPIO16_PWM0_OUT,
+
+       /* USB */
+       GPIO15_GPIO,    /* usb detect */
+       GPIO12_GPIO,    /* usb pullup */
+       GPIO95_GPIO,    /* usb power */
+
+       /* Matrix keypad */
+       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,
+
+       /* 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,
+       GPIO20_GPIO,    /* bl power */
+       GPIO21_GPIO,    /* LCD border switch */
+       GPIO22_GPIO,    /* LCD border color */
+       GPIO96_GPIO,    /* lcd power */
+
+       /* Misc. */
+       GPIO0_GPIO      | WAKEUP_ON_LEVEL_HIGH, /* power detect */
+       GPIO88_GPIO,                            /* green led */
+       GPIO27_GPIO,                            /* WM9712 IRQ */
+};
+
+/******************************************************************************
+ * SD/MMC card controller
+ ******************************************************************************/
+static int palmz72_mci_init(struct device *dev,
+                               irq_handler_t palmz72_detect_int, void *data)
+{
+       int err = 0;
+
+       /* Setup an interrupt for detecting card insert/remove events */
+       err = gpio_request(GPIO_NR_PALMZ72_SD_DETECT_N, "SD IRQ");
+       if (err)
+               goto err;
+       err = gpio_direction_input(GPIO_NR_PALMZ72_SD_DETECT_N);
+       if (err)
+               goto err2;
+       err = request_irq(gpio_to_irq(GPIO_NR_PALMZ72_SD_DETECT_N),
+                       palmz72_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;
+       }
+
+       /* SD_POWER is not actually power, but it is more like chip
+        * select, i.e. it is inverted */
+
+       err = gpio_request(GPIO_NR_PALMZ72_SD_POWER_N, "SD_POWER");
+       if (err)
+               goto err3;
+       err = gpio_direction_output(GPIO_NR_PALMZ72_SD_POWER_N, 0);
+       if (err)
+               goto err4;
+       err = gpio_request(GPIO_NR_PALMZ72_SD_RO, "SD_RO");
+       if (err)
+               goto err4;
+       err = gpio_direction_input(GPIO_NR_PALMZ72_SD_RO);
+       if (err)
+               goto err5;
+
+       printk(KERN_DEBUG "%s: irq registered\n", __func__);
+
+       return 0;
+
+err5:
+       gpio_free(GPIO_NR_PALMZ72_SD_RO);
+err4:
+       gpio_free(GPIO_NR_PALMZ72_SD_POWER_N);
+err3:
+       free_irq(gpio_to_irq(GPIO_NR_PALMZ72_SD_DETECT_N), data);
+err2:
+       gpio_free(GPIO_NR_PALMZ72_SD_DETECT_N);
+err:
+       return err;
+}
+
+static void palmz72_mci_exit(struct device *dev, void *data)
+{
+       gpio_free(GPIO_NR_PALMZ72_SD_POWER_N);
+       free_irq(gpio_to_irq(GPIO_NR_PALMZ72_SD_DETECT_N), data);
+       gpio_free(GPIO_NR_PALMZ72_SD_DETECT_N);
+       gpio_free(GPIO_NR_PALMZ72_SD_RO);
+}
+
+static void palmz72_mci_power(struct device *dev, unsigned int vdd)
+{
+       struct pxamci_platform_data *p_d = dev->platform_data;
+       if (p_d->ocr_mask & (1 << vdd))
+               gpio_set_value(GPIO_NR_PALMZ72_SD_POWER_N, 0);
+       else
+               gpio_set_value(GPIO_NR_PALMZ72_SD_POWER_N, 1);
+}
+
+static int palmz72_mci_ro(struct device *dev)
+{
+       return gpio_get_value(GPIO_NR_PALMZ72_SD_RO);
+}
+
+static struct pxamci_platform_data palmz72_mci_platform_data = {
+       .ocr_mask       = MMC_VDD_32_33 | MMC_VDD_33_34,
+       .setpower       = palmz72_mci_power,
+       .get_ro         = palmz72_mci_ro,
+       .init           = palmz72_mci_init,
+       .exit           = palmz72_mci_exit,
+};
+
+/******************************************************************************
+ * GPIO keyboard
+ ******************************************************************************/
+static unsigned int palmz72_matrix_keys[] = {
+       KEY(0, 0, KEY_POWER),
+       KEY(0, 1, KEY_F1),
+       KEY(0, 2, KEY_ENTER),
+
+       KEY(1, 0, KEY_F2),
+       KEY(1, 1, KEY_F3),
+       KEY(1, 2, KEY_F4),
+
+       KEY(2, 0, KEY_UP),
+       KEY(2, 2, KEY_DOWN),
+
+       KEY(3, 0, KEY_RIGHT),
+       KEY(3, 2, KEY_LEFT),
+};
+
+static struct pxa27x_keypad_platform_data palmz72_keypad_platform_data = {
+       .matrix_key_rows        = 4,
+       .matrix_key_cols        = 3,
+       .matrix_key_map         = palmz72_matrix_keys,
+       .matrix_key_map_size    = ARRAY_SIZE(palmz72_matrix_keys),
+
+       .debounce_interval      = 30,
+};
+
+/******************************************************************************
+ * Backlight
+ ******************************************************************************/
+static int palmz72_backlight_init(struct device *dev)
+{
+       int ret;
+
+       ret = gpio_request(GPIO_NR_PALMZ72_BL_POWER, "BL POWER");
+       if (ret)
+               goto err;
+       ret = gpio_direction_output(GPIO_NR_PALMZ72_BL_POWER, 0);
+       if (ret)
+               goto err2;
+       ret = gpio_request(GPIO_NR_PALMZ72_LCD_POWER, "LCD POWER");
+       if (ret)
+               goto err2;
+       ret = gpio_direction_output(GPIO_NR_PALMZ72_LCD_POWER, 0);
+       if (ret)
+               goto err3;
+
+       return 0;
+err3:
+       gpio_free(GPIO_NR_PALMZ72_LCD_POWER);
+err2:
+       gpio_free(GPIO_NR_PALMZ72_BL_POWER);
+err:
+       return ret;
+}
+
+static int palmz72_backlight_notify(int brightness)
+{
+       gpio_set_value(GPIO_NR_PALMZ72_BL_POWER, brightness);
+       gpio_set_value(GPIO_NR_PALMZ72_LCD_POWER, brightness);
+       return brightness;
+}
+
+static void palmz72_backlight_exit(struct device *dev)
+{
+       gpio_free(GPIO_NR_PALMZ72_BL_POWER);
+       gpio_free(GPIO_NR_PALMZ72_LCD_POWER);
+}
+
+static struct platform_pwm_backlight_data palmz72_backlight_data = {
+       .pwm_id         = 0,
+       .max_brightness = PALMZ72_MAX_INTENSITY,
+       .dft_brightness = PALMZ72_MAX_INTENSITY,
+       .pwm_period_ns  = PALMZ72_PERIOD_NS,
+       .init           = palmz72_backlight_init,
+       .notify         = palmz72_backlight_notify,
+       .exit           = palmz72_backlight_exit,
+};
+
+static struct platform_device palmz72_backlight = {
+       .name   = "pwm-backlight",
+       .dev    = {
+               .parent         = &pxa27x_device_pwm0.dev,
+               .platform_data  = &palmz72_backlight_data,
+       },
+};
+
+/******************************************************************************
+ * IrDA
+ ******************************************************************************/
+static int palmz72_irda_startup(struct device *dev)
+{
+       int err;
+       err = gpio_request(GPIO_NR_PALMZ72_IR_DISABLE, "IR DISABLE");
+       if (err)
+               goto err;
+       err = gpio_direction_output(GPIO_NR_PALMZ72_IR_DISABLE, 1);
+       if (err)
+               gpio_free(GPIO_NR_PALMZ72_IR_DISABLE);
+err:
+       return err;
+}
+
+static void palmz72_irda_shutdown(struct device *dev)
+{
+       gpio_free(GPIO_NR_PALMZ72_IR_DISABLE);
+}
+
+static void palmz72_irda_transceiver_mode(struct device *dev, int mode)
+{
+       gpio_set_value(GPIO_NR_PALMZ72_IR_DISABLE, mode & IR_OFF);
+       pxa2xx_transceiver_mode(dev, mode);
+}
+
+static struct pxaficp_platform_data palmz72_ficp_platform_data = {
+       .startup                = palmz72_irda_startup,
+       .shutdown               = palmz72_irda_shutdown,
+       .transceiver_cap        = IR_SIRMODE | IR_OFF,
+       .transceiver_mode       = palmz72_irda_transceiver_mode,
+};
+
+/******************************************************************************
+ * LEDs
+ ******************************************************************************/
+static struct gpio_led gpio_leds[] = {
+       {
+               .name                   = "palmz72:green:led",
+               .default_trigger        = "none",
+               .gpio                   = GPIO_NR_PALMZ72_LED_GREEN,
+       },
+};
+
+static struct gpio_led_platform_data gpio_led_info = {
+       .leds           = gpio_leds,
+       .num_leds       = ARRAY_SIZE(gpio_leds),
+};
+
+static struct platform_device palmz72_leds = {
+       .name   = "leds-gpio",
+       .id     = -1,
+       .dev    = {
+               .platform_data  = &gpio_led_info,
+       }
+};
+
+/******************************************************************************
+ * Power supply
+ ******************************************************************************/
+static int power_supply_init(struct device *dev)
+{
+       int ret;
+
+       ret = gpio_request(GPIO_NR_PALMZ72_POWER_DETECT, "CABLE_STATE_AC");
+       if (ret)
+               goto err1;
+       ret = gpio_direction_input(GPIO_NR_PALMZ72_POWER_DETECT);
+       if (ret)
+               goto err2;
+
+       ret = gpio_request(GPIO_NR_PALMZ72_USB_DETECT_N, "CABLE_STATE_USB");
+       if (ret)
+               goto err2;
+       ret = gpio_direction_input(GPIO_NR_PALMZ72_USB_DETECT_N);
+       if (ret)
+               goto err3;
+
+       return 0;
+err3:
+       gpio_free(GPIO_NR_PALMZ72_USB_DETECT_N);
+err2:
+       gpio_free(GPIO_NR_PALMZ72_POWER_DETECT);
+err1:
+       return ret;
+}
+
+static int palmz72_is_ac_online(void)
+{
+       return gpio_get_value(GPIO_NR_PALMZ72_POWER_DETECT);
+}
+
+static int palmz72_is_usb_online(void)
+{
+       return !gpio_get_value(GPIO_NR_PALMZ72_USB_DETECT_N);
+}
+
+static void power_supply_exit(struct device *dev)
+{
+       gpio_free(GPIO_NR_PALMZ72_USB_DETECT_N);
+       gpio_free(GPIO_NR_PALMZ72_POWER_DETECT);
+}
+
+static char *palmz72_supplicants[] = {
+       "main-battery",
+};
+
+static struct pda_power_pdata power_supply_info = {
+       .init            = power_supply_init,
+       .is_ac_online    = palmz72_is_ac_online,
+       .is_usb_online   = palmz72_is_usb_online,
+       .exit            = power_supply_exit,
+       .supplied_to     = palmz72_supplicants,
+       .num_supplicants = ARRAY_SIZE(palmz72_supplicants),
+};
+
+static struct platform_device power_supply = {
+       .name = "pda-power",
+       .id   = -1,
+       .dev  = {
+               .platform_data = &power_supply_info,
+       },
+};
+
+/******************************************************************************
+ * Framebuffer
+ ******************************************************************************/
+static struct pxafb_mode_info palmz72_lcd_modes[] = {
+{
+       .pixclock       = 115384,
+       .xres           = 320,
+       .yres           = 320,
+       .bpp            = 16,
+
+       .left_margin    = 27,
+       .right_margin   = 7,
+       .upper_margin   = 7,
+       .lower_margin   = 8,
+
+       .hsync_len      = 6,
+       .vsync_len      = 1,
+},
+};
+
+static struct pxafb_mach_info palmz72_lcd_screen = {
+       .modes          = palmz72_lcd_modes,
+       .num_modes      = ARRAY_SIZE(palmz72_lcd_modes),
+       .lcd_conn       = LCD_COLOR_TFT_16BPP | LCD_PCLK_EDGE_FALL,
+};
+
+#ifdef CONFIG_PM
+
+/* We have some black magic here
+ * PalmOS ROM on recover expects special struct physical address
+ * to be transferred via PSPR. Using this struct PalmOS restores
+ * its state after sleep. As for Linux, we need to setup it the
+ * same way. More than that, PalmOS ROM changes some values in memory.
+ * For now only one location is found, which needs special treatment.
+ * Thanks to Alex Osborne, Andrzej Zaborowski, and lots of other people
+ * for reading backtraces for me :)
+ */
+
+#define PALMZ72_SAVE_DWORD ((unsigned long *)0xc0000050)
+
+static struct palmz72_resume_info palmz72_resume_info = {
+       .magic0 = 0xb4e6,
+       .magic1 = 1,
+
+       /* reset state, MMU off etc */
+       .arm_control = 0,
+       .aux_control = 0,
+       .ttb = 0,
+       .domain_access = 0,
+       .process_id = 0,
+};
+
+static unsigned long store_ptr;
+
+/* sys_device for Palm Zire 72 PM */
+
+static int palmz72_pm_suspend(struct sys_device *dev, pm_message_t msg)
+{
+       /* setup the resume_info struct for the original bootloader */
+       palmz72_resume_info.resume_addr = (u32) pxa_cpu_resume;
+
+       /* Storing memory touched by ROM */
+       store_ptr = *PALMZ72_SAVE_DWORD;
+
+       /* Setting PSPR to a proper value */
+       PSPR = virt_to_phys(&palmz72_resume_info);
+
+       return 0;
+}
+
+static int palmz72_pm_resume(struct sys_device *dev)
+{
+       *PALMZ72_SAVE_DWORD = store_ptr;
+       return 0;
+}
+
+static struct sysdev_class palmz72_pm_sysclass = {
+       .name = "palmz72_pm",
+       .suspend = palmz72_pm_suspend,
+       .resume = palmz72_pm_resume,
+};
+
+static struct sys_device palmz72_pm_device = {
+       .cls = &palmz72_pm_sysclass,
+};
+
+static int __init palmz72_pm_init(void)
+{
+       int ret = -ENODEV;
+       if (machine_is_palmz72()) {
+               ret = sysdev_class_register(&palmz72_pm_sysclass);
+               if (ret == 0)
+                       ret = sysdev_register(&palmz72_pm_device);
+       }
+       return ret;
+}
+
+device_initcall(palmz72_pm_init);
+#endif
+
+/******************************************************************************
+ * Machine init
+ ******************************************************************************/
+static struct platform_device *devices[] __initdata = {
+       &palmz72_backlight,
+       &palmz72_leds,
+       &power_supply,
+};
+
+static void __init palmz72_init(void)
+{
+       pxa2xx_mfp_config(ARRAY_AND_SIZE(palmz72_pin_config));
+       set_pxa_fb_info(&palmz72_lcd_screen);
+       pxa_set_mci_info(&palmz72_mci_platform_data);
+       pxa_set_ac97_info(NULL);
+       pxa_set_ficp_info(&palmz72_ficp_platform_data);
+       pxa_set_keypad_info(&palmz72_keypad_platform_data);
+       platform_add_devices(devices, ARRAY_SIZE(devices));
+}
+
+MACHINE_START(PALMZ72, "Palm Zire72")
+       .phys_io        = 0x40000000,
+       .io_pg_offst    = io_p2v(0x40000000),
+       .boot_params    = 0xa0000100,
+       .map_io         = pxa_map_io,
+       .init_irq       = pxa27x_init_irq,
+       .timer          = &pxa_timer,
+       .init_machine   = palmz72_init
+MACHINE_END
index 730b9f6ede1dcbc179b543602e1b4d6e197b8842..36135a02fdc7d4fc9a7ccc8cad4d980d70e8ea06 100644 (file)
@@ -31,7 +31,7 @@
 #include <asm/mach/arch.h>
 #include <mach/hardware.h>
 #include <mach/pxa-regs.h>
-#include <mach/pxa2xx-gpio.h>
+#include <mach/mfp-pxa27x.h>
 #include <mach/pxa2xx-regs.h>
 #include <mach/pxa2xx_spi.h>
 #include <mach/pcm027.h>
  * *) CPU internal use only
  */
 
+static unsigned long pcm027_pin_config[] __initdata = {
+       /* Chip Selects */
+       GPIO20_nSDCS_2,
+       GPIO21_nSDCS_3,
+       GPIO15_nCS_1,
+       GPIO78_nCS_2,
+       GPIO80_nCS_4,
+       GPIO33_nCS_5,   /* Ethernet */
+
+       /* I2C */
+       GPIO117_I2C_SCL,
+       GPIO118_I2C_SDA,
+
+       /* GPIO */
+       GPIO52_GPIO,    /* IRQ from network controller */
+#ifdef CONFIG_LEDS_GPIO
+       GPIO90_GPIO,    /* PCM027_LED_CPU */
+       GPIO91_GPIO,    /* PCM027_LED_HEART_BEAT */
+#endif
+       GPIO114_GPIO,   /* IRQ from CAN controller */
+};
+
 /*
  * SMC91x network controller specific stuff
  */
@@ -206,13 +228,9 @@ static void __init pcm027_init(void)
         */
        ARB_CNTRL = ARB_CORE_PARK | 0x234;
 
-       platform_add_devices(devices, ARRAY_SIZE(devices));
+       pxa2xx_mfp_config(pcm027_pin_config, ARRAY_SIZE(pcm027_pin_config));
 
-       /* LEDs (on demand only) */
-#ifdef CONFIG_LEDS_GPIO
-       pxa_gpio_mode(PCM027_LED_CPU | GPIO_OUT);
-       pxa_gpio_mode(PCM027_LED_HEARD_BEAT | GPIO_OUT);
-#endif /* CONFIG_LEDS_GPIO */
+       platform_add_devices(devices, ARRAY_SIZE(devices));
 
        /* at last call the baseboard to initialize itself */
 #ifdef CONFIG_MACH_PCM990_BASEBOARD
index 420c9b3813f6d42bc956f37e7fcf695605b81c82..f601425f1b1eaa31b3307c4fea3e36785f920244 100644 (file)
@@ -262,8 +262,7 @@ static void pcm990_irq_handler(unsigned int irq, struct irq_desc *desc)
                                        GPIO_bit(PCM990_CTRL_INT_IRQ_GPIO);
                if (likely(pending)) {
                        irq = PCM027_IRQ(0) + __ffs(pending);
-                       desc = irq_desc + irq;
-                       desc_handle_irq(irq, desc);
+                       generic_handle_irq(irq);
                }
                pending = (~PCM990_INTSETCLR) & pcm990_irq_enabled;
        } while (pending);
@@ -328,36 +327,10 @@ static struct pxamci_platform_data pcm990_mci_platform_data = {
        .exit           = pcm990_mci_exit,
 };
 
-/*
- * init OHCI hardware to work with
- *
- * Note: Only USB port 1 (host only) is connected
- *
- * GPIO88 (USBHPWR#1): overcurrent in, overcurrent when low
- * GPIO89 (USBHPEN#1): power-on out, on when low
- */
-static int pcm990_ohci_init(struct device *dev)
-{
-       /*
-        * disable USB port 2 and 3
-        * power sense is active low
-        */
-       UHCHR = ((UHCHR) | UHCHR_PCPL | UHCHR_PSPL | UHCHR_SSEP2 |
-                               UHCHR_SSEP3) & ~(UHCHR_SSEP1 | UHCHR_SSE);
-       /*
-        * wait 10ms after Power on
-        * overcurrent per port
-        * power switch per port
-        */
-       UHCRHDA = (5<<24) | (1<<11) | (1<<8);   /* FIXME: Required? */
-
-       return 0;
-}
-
 static struct pxaohci_platform_data pcm990_ohci_platform_data = {
        .port_mode      = PMM_PERPORT_MODE,
-       .init           = pcm990_ohci_init,
-       .exit           = NULL,
+       .flags          = ENABLE_PORT1 | POWER_CONTROL_LOW | POWER_SENSE_LOW,
+       .power_on_delay = 10,
 };
 
 /*
index 1b539e675579cc3388f72699e1c2aba12a148691..164eb0bb6321f5bf0bbd626b14587188cb629a4c 100644 (file)
@@ -86,9 +86,27 @@ static int pxa_pm_valid(suspend_state_t state)
        return -EINVAL;
 }
 
+static int pxa_pm_prepare(void)
+{
+       int ret = 0;
+
+       if (pxa_cpu_pm_fns && pxa_cpu_pm_fns->prepare)
+               ret = pxa_cpu_pm_fns->prepare();
+
+       return ret;
+}
+
+static void pxa_pm_finish(void)
+{
+       if (pxa_cpu_pm_fns && pxa_cpu_pm_fns->finish)
+               pxa_cpu_pm_fns->finish();
+}
+
 static struct platform_suspend_ops pxa_pm_ops = {
        .valid          = pxa_pm_valid,
        .enter          = pxa_pm_enter,
+       .prepare        = pxa_pm_prepare,
+       .finish         = pxa_pm_finish,
 };
 
 static int __init pxa_pm_init(void)
index 3f5f484549b394166681e43e45c43e584190823a..2e3bd8b1523b0e897acbc91b3e54cc91dd232b9c 100644 (file)
@@ -20,6 +20,9 @@
 #include <linux/fb.h>
 #include <linux/pm.h>
 #include <linux/delay.h>
+#include <linux/gpio.h>
+#include <linux/spi/spi.h>
+#include <linux/spi/ads7846.h>
 
 #include <mach/hardware.h>
 #include <asm/mach-types.h>
@@ -33,7 +36,7 @@
 
 #include <mach/pxa-regs.h>
 #include <mach/pxa2xx-regs.h>
-#include <mach/pxa2xx-gpio.h>
+#include <mach/mfp-pxa25x.h>
 #include <mach/mmc.h>
 #include <mach/udc.h>
 #include <mach/i2c.h>
@@ -42,6 +45,7 @@
 #include <mach/pxafb.h>
 #include <mach/sharpsl.h>
 #include <mach/ssp.h>
+#include <mach/pxa2xx_spi.h>
 
 #include <asm/hardware/scoop.h>
 #include <asm/hardware/locomo.h>
 #include "devices.h"
 #include "sharpsl.h"
 
+static unsigned long poodle_pin_config[] __initdata = {
+       /* I/O */
+       GPIO79_nCS_3,
+       GPIO80_nCS_4,
+       GPIO18_RDY,
+
+       /* Clock */
+       GPIO12_32KHz,
+
+       /* SSP1 */
+       GPIO23_SSP1_SCLK,
+       GPIO25_SSP1_TXD,
+       GPIO26_SSP1_RXD,
+       GPIO24_GPIO,    /* POODLE_GPIO_TP_CS - SFRM as chip select */
+
+       /* I2S */
+       GPIO28_I2S_BITCLK_OUT,
+       GPIO29_I2S_SDATA_IN,
+       GPIO30_I2S_SDATA_OUT,
+       GPIO31_I2S_SYNC,
+       GPIO32_I2S_SYSCLK,
+
+       /* Infra-Red */
+       GPIO47_FICP_TXD,
+       GPIO46_FICP_RXD,
+
+       /* FFUART */
+       GPIO40_FFUART_DTR,
+       GPIO41_FFUART_RTS,
+       GPIO39_FFUART_TXD,
+       GPIO37_FFUART_DSR,
+       GPIO34_FFUART_RXD,
+       GPIO35_FFUART_CTS,
+
+       /* 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,
+
+       /* PC Card */
+       GPIO48_nPOE,
+       GPIO49_nPWE,
+       GPIO50_nPIOR,
+       GPIO51_nPIOW,
+       GPIO52_nPCE_1,
+       GPIO53_nPCE_2,
+       GPIO54_nPSKTSEL,
+       GPIO55_nPREG,
+       GPIO56_nPWAIT,
+       GPIO57_nIOIS16,
+
+       /* MMC */
+       GPIO6_MMC_CLK,
+       GPIO8_MMC_CS0,
+
+       /* GPIO */
+       GPIO9_GPIO,     /* POODLE_GPIO_nSD_DETECT */
+       GPIO7_GPIO,     /* POODLE_GPIO_nSD_WP */
+       GPIO3_GPIO,     /* POODLE_GPIO_SD_PWR */
+       GPIO33_GPIO,    /* POODLE_GPIO_SD_PWR1 */
+
+       GPIO20_GPIO,    /* POODLE_GPIO_USB_PULLUP */
+       GPIO22_GPIO,    /* POODLE_GPIO_IR_ON */
+};
+
 static struct resource poodle_scoop_resources[] = {
        [0] = {
                .start          = 0x10800000,
@@ -62,6 +148,7 @@ static struct resource poodle_scoop_resources[] = {
 static struct scoop_config poodle_scoop_setup = {
        .io_dir         = POODLE_SCOOP_IO_DIR,
        .io_out         = POODLE_SCOOP_IO_OUT,
+       .gpio_base      = POODLE_SCOOP_GPIO_BASE,
 };
 
 struct platform_device poodle_scoop_device = {
@@ -74,27 +161,6 @@ struct platform_device poodle_scoop_device = {
        .resource       = poodle_scoop_resources,
 };
 
-static void poodle_pcmcia_init(void)
-{
-       /* Setup default state of GPIO outputs
-          before we enable them as outputs. */
-       GPSR(GPIO48_nPOE) = GPIO_bit(GPIO48_nPOE) |
-               GPIO_bit(GPIO49_nPWE) | GPIO_bit(GPIO50_nPIOR) |
-               GPIO_bit(GPIO51_nPIOW) | GPIO_bit(GPIO52_nPCE_1) |
-               GPIO_bit(GPIO53_nPCE_2);
-
-       pxa_gpio_mode(GPIO48_nPOE_MD);
-       pxa_gpio_mode(GPIO49_nPWE_MD);
-       pxa_gpio_mode(GPIO50_nPIOR_MD);
-       pxa_gpio_mode(GPIO51_nPIOW_MD);
-       pxa_gpio_mode(GPIO55_nPREG_MD);
-       pxa_gpio_mode(GPIO56_nPWAIT_MD);
-       pxa_gpio_mode(GPIO57_nIOIS16_MD);
-       pxa_gpio_mode(GPIO52_nPCE_1_MD);
-       pxa_gpio_mode(GPIO53_nPCE_2_MD);
-       pxa_gpio_mode(GPIO54_pSKTSEL_MD);
-}
-
 static struct scoop_pcmcia_dev poodle_pcmcia_scoop[] = {
 {
        .dev        = &poodle_scoop_device.dev,
@@ -107,7 +173,6 @@ static struct scoop_pcmcia_dev poodle_pcmcia_scoop[] = {
 static struct scoop_pcmcia_config poodle_pcmcia_config = {
        .devs         = &poodle_pcmcia_scoop[0],
        .num_devs     = 1,
-       .pcmcia_init  = poodle_pcmcia_init,
 };
 
 EXPORT_SYMBOL(poodle_scoop_device);
@@ -136,62 +201,55 @@ struct platform_device poodle_locomo_device = {
 
 EXPORT_SYMBOL(poodle_locomo_device);
 
-/*
- * Poodle SSP Device
- */
-
-struct platform_device poodle_ssp_device = {
-       .name           = "corgi-ssp",
-       .id             = -1,
-};
-
-struct corgissp_machinfo poodle_ssp_machinfo = {
-       .port           = 1,
-       .cs_lcdcon      = -1,
-       .cs_ads7846     = -1,
-       .cs_max1111     = -1,
-       .clk_lcdcon     = 2,
-       .clk_ads7846    = 36,
-       .clk_max1111    = 2,
+#if defined(CONFIG_SPI_PXA2XX) || defined(CONFIG_SPI_PXA2XX_MODULE)
+static struct pxa2xx_spi_master poodle_spi_info = {
+       .num_chipselect = 1,
 };
 
-
-/*
- * Poodle Touch Screen Device
- */
-static struct resource poodlets_resources[] = {
-       [0] = {
-               .start          = POODLE_IRQ_GPIO_TP_INT,
-               .end            = POODLE_IRQ_GPIO_TP_INT,
-               .flags          = IORESOURCE_IRQ,
-       },
+static struct ads7846_platform_data poodle_ads7846_info = {
+       .model                  = 7846,
+       .vref_delay_usecs       = 100,
+       .x_plate_ohms           = 419,
+       .y_plate_ohms           = 486,
+       .gpio_pendown           = POODLE_GPIO_TP_INT,
 };
 
-static unsigned long poodle_get_hsync_invperiod(void)
+static void ads7846_cs(u32 command)
 {
-       return 0;
+       gpio_set_value(POODLE_GPIO_TP_CS, !(command == PXA2XX_CS_ASSERT));
 }
 
-static void poodle_null_hsync(void)
-{
-}
-
-static struct corgits_machinfo  poodle_ts_machinfo = {
-       .get_hsync_invperiod    = poodle_get_hsync_invperiod,
-       .put_hsync              = poodle_null_hsync,
-       .wait_hsync             = poodle_null_hsync,
+static struct pxa2xx_spi_chip poodle_ads7846_chip = {
+       .cs_control             = ads7846_cs,
 };
 
-static struct platform_device poodle_ts_device = {
-       .name           = "corgi-ts",
-       .dev            = {
-               .platform_data  = &poodle_ts_machinfo,
+static struct spi_board_info poodle_spi_devices[] = {
+       {
+               .modalias       = "ads7846",
+               .max_speed_hz   = 10000,
+               .bus_num        = 1,
+               .platform_data  = &poodle_ads7846_info,
+               .controller_data= &poodle_ads7846_chip,
+               .irq            = gpio_to_irq(POODLE_GPIO_TP_INT),
        },
-       .id             = -1,
-       .num_resources  = ARRAY_SIZE(poodlets_resources),
-       .resource       = poodlets_resources,
 };
 
+static void __init poodle_init_spi(void)
+{
+       int err;
+
+       err = gpio_request(POODLE_GPIO_TP_CS, "ADS7846_CS");
+       if (err)
+               return;
+
+       gpio_direction_output(POODLE_GPIO_TP_CS, 1);
+
+       pxa2xx_set_spi_info(1, &poodle_spi_info);
+       spi_register_board_info(ARRAY_AND_SIZE(poodle_spi_devices));
+}
+#else
+static inline void poodle_init_spi(void) {}
+#endif
 
 /*
  * MMC/SD Device
@@ -205,22 +263,50 @@ static int poodle_mci_init(struct device *dev, irq_handler_t poodle_detect_int,
 {
        int err;
 
-       /* setup GPIO for PXA25x MMC controller */
-       pxa_gpio_mode(GPIO6_MMCCLK_MD);
-       pxa_gpio_mode(GPIO8_MMCCS0_MD);
-       pxa_gpio_mode(POODLE_GPIO_nSD_DETECT | GPIO_IN);
-       pxa_gpio_mode(POODLE_GPIO_nSD_WP | GPIO_IN);
-       pxa_gpio_mode(POODLE_GPIO_SD_PWR | GPIO_OUT);
-       pxa_gpio_mode(POODLE_GPIO_SD_PWR1 | GPIO_OUT);
+       err = gpio_request(POODLE_GPIO_nSD_DETECT, "nSD_DETECT");
+       if (err)
+               goto err_out;
+
+       err = gpio_request(POODLE_GPIO_nSD_WP, "nSD_WP");
+       if (err)
+               goto err_free_1;
+
+       err = gpio_request(POODLE_GPIO_SD_PWR, "SD_PWR");
+       if (err)
+               goto err_free_2;
+
+       err = gpio_request(POODLE_GPIO_SD_PWR1, "SD_PWR1");
+       if (err)
+               goto err_free_3;
+
+       gpio_direction_input(POODLE_GPIO_nSD_DETECT);
+       gpio_direction_input(POODLE_GPIO_nSD_WP);
+
+       gpio_direction_output(POODLE_GPIO_SD_PWR, 0);
+       gpio_direction_output(POODLE_GPIO_SD_PWR1, 0);
 
        poodle_mci_platform_data.detect_delay = msecs_to_jiffies(250);
 
        err = request_irq(POODLE_IRQ_GPIO_nSD_DETECT, poodle_detect_int,
                          IRQF_DISABLED | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
                          "MMC card detect", data);
-       if (err)
-               printk(KERN_ERR "poodle_mci_init: MMC/SD: can't request MMC card detect IRQ\n");
+       if (err) {
+               pr_err("%s: MMC/SD: can't request MMC card detect IRQ\n",
+                               __func__);
+               goto err_free_4;
+       }
+
+       return 0;
 
+err_free_4:
+       gpio_free(POODLE_GPIO_SD_PWR1);
+err_free_3:
+       gpio_free(POODLE_GPIO_SD_PWR);
+err_free_2:
+       gpio_free(POODLE_GPIO_nSD_WP);
+err_free_1:
+       gpio_free(POODLE_GPIO_nSD_DETECT);
+err_out:
        return err;
 }
 
@@ -228,18 +314,19 @@ static void poodle_mci_setpower(struct device *dev, unsigned int vdd)
 {
        struct pxamci_platform_data* p_d = dev->platform_data;
 
-       if (( 1 << vdd) & p_d->ocr_mask) {
-               GPSR(POODLE_GPIO_SD_PWR) = GPIO_bit(POODLE_GPIO_SD_PWR);
+       if ((1 << vdd) & p_d->ocr_mask) {
+               gpio_set_value(POODLE_GPIO_SD_PWR, 1);
                mdelay(2);
-               GPSR(POODLE_GPIO_SD_PWR1) = GPIO_bit(POODLE_GPIO_SD_PWR1);
+               gpio_set_value(POODLE_GPIO_SD_PWR1, 1);
        } else {
-               GPCR(POODLE_GPIO_SD_PWR1) = GPIO_bit(POODLE_GPIO_SD_PWR1);
-               GPCR(POODLE_GPIO_SD_PWR) = GPIO_bit(POODLE_GPIO_SD_PWR);
+               gpio_set_value(POODLE_GPIO_SD_PWR1, 0);
+               gpio_set_value(POODLE_GPIO_SD_PWR, 0);
        }
 }
 
 static int poodle_mci_get_ro(struct device *dev)
 {
+       return !!gpio_get_value(POODLE_GPIO_nSD_WP);
        return GPLR(POODLE_GPIO_nSD_WP) & GPIO_bit(POODLE_GPIO_nSD_WP);
 }
 
@@ -247,6 +334,10 @@ static int poodle_mci_get_ro(struct device *dev)
 static void poodle_mci_exit(struct device *dev, void *data)
 {
        free_irq(POODLE_IRQ_GPIO_nSD_DETECT, data);
+       gpio_free(POODLE_GPIO_SD_PWR1);
+       gpio_free(POODLE_GPIO_SD_PWR);
+       gpio_free(POODLE_GPIO_nSD_WP);
+       gpio_free(POODLE_GPIO_nSD_DETECT);
 }
 
 static struct pxamci_platform_data poodle_mci_platform_data = {
@@ -263,38 +354,41 @@ static struct pxamci_platform_data poodle_mci_platform_data = {
  */
 static void poodle_irda_transceiver_mode(struct device *dev, int mode)
 {
-       if (mode & IR_OFF) {
-               GPSR(POODLE_GPIO_IR_ON) = GPIO_bit(POODLE_GPIO_IR_ON);
-       } else {
-               GPCR(POODLE_GPIO_IR_ON) = GPIO_bit(POODLE_GPIO_IR_ON);
-       }
+       gpio_set_value(POODLE_GPIO_IR_ON, mode & IR_OFF);
        pxa2xx_transceiver_mode(dev, mode);
 }
 
+static int poodle_irda_startup(struct device *dev)
+{
+       int err;
+
+       err = gpio_request(POODLE_GPIO_IR_ON, "IR_ON");
+       if (err)
+               return err;
+
+       gpio_direction_output(POODLE_GPIO_IR_ON, 1);
+       return 0;
+}
+
+static void poodle_irda_shutdown(struct device *dev)
+{
+       gpio_free(POODLE_GPIO_IR_ON);
+}
+
 static struct pxaficp_platform_data poodle_ficp_platform_data = {
-       .transceiver_cap  = IR_SIRMODE | IR_OFF,
-       .transceiver_mode = poodle_irda_transceiver_mode,
+       .transceiver_cap        = IR_SIRMODE | IR_OFF,
+       .transceiver_mode       = poodle_irda_transceiver_mode,
+       .startup                = poodle_irda_startup,
+       .shutdown               = poodle_irda_shutdown,
 };
 
 
 /*
  * USB Device Controller
  */
-static void poodle_udc_command(int cmd)
-{
-       switch(cmd)     {
-       case PXA2XX_UDC_CMD_CONNECT:
-               GPSR(POODLE_GPIO_USB_PULLUP) = GPIO_bit(POODLE_GPIO_USB_PULLUP);
-               break;
-       case PXA2XX_UDC_CMD_DISCONNECT:
-               GPCR(POODLE_GPIO_USB_PULLUP) = GPIO_bit(POODLE_GPIO_USB_PULLUP);
-               break;
-       }
-}
-
 static struct pxa2xx_udc_mach_info udc_info __initdata = {
        /* no connect GPIO; poodle can't tell connection status */
-       .udc_command            = poodle_udc_command,
+       .gpio_pullup    = POODLE_GPIO_USB_PULLUP,
 };
 
 
@@ -316,15 +410,12 @@ static struct pxafb_mode_info poodle_fb_mode = {
 static struct pxafb_mach_info poodle_fb_info = {
        .modes          = &poodle_fb_mode,
        .num_modes      = 1,
-       .lccr0          = LCCR0_Act | LCCR0_Sngl | LCCR0_Color,
-       .lccr3          = 0,
+       .lcd_conn       = LCD_COLOR_TFT_16BPP,
 };
 
 static struct platform_device *devices[] __initdata = {
        &poodle_locomo_device,
        &poodle_scoop_device,
-       &poodle_ssp_device,
-       &poodle_ts_device,
 };
 
 static void poodle_poweroff(void)
@@ -344,59 +435,23 @@ static void __init poodle_init(void)
        pm_power_off = poodle_poweroff;
        arm_pm_restart = poodle_restart;
 
-       /* setup sleep mode values */
-       PWER  = 0x00000002;
-       PFER  = 0x00000000;
-       PRER  = 0x00000002;
-       PGSR0 = 0x00008000;
-       PGSR1 = 0x003F0202;
-       PGSR2 = 0x0001C000;
        PCFR |= PCFR_OPDE;
 
-       /* cpu initialize */
-       /* Pgsr Register */
-       PGSR0 = 0x0146dd80;
-       PGSR1 = 0x03bf0890;
-       PGSR2 = 0x0001c000;
-
-       /* Alternate Register */
-       GAFR0_L = 0x01001000;
-       GAFR0_U = 0x591a8010;
-       GAFR1_L = 0x900a8451;
-       GAFR1_U = 0xaaa5aaaa;
-       GAFR2_L = 0x8aaaaaaa;
-       GAFR2_U = 0x00000002;
-
-       /* Direction Register */
-       GPDR0 = 0xd3f0904c;
-       GPDR1 = 0xfcffb7d3;
-       GPDR2 = 0x0001ffff;
-
-       /* Output Register */
-       GPCR0 = 0x00000000;
-       GPCR1 = 0x00000000;
-       GPCR2 = 0x00000000;
-
-       GPSR0 = 0x00400000;
-       GPSR1 = 0x00000000;
-        GPSR2 = 0x00000000;
+       pxa2xx_mfp_config(ARRAY_AND_SIZE(poodle_pin_config));
+
+       platform_scoop_config = &poodle_pcmcia_config;
+
+       ret = platform_add_devices(devices, ARRAY_SIZE(devices));
+       if (ret)
+               pr_warning("poodle: Unable to register LoCoMo device\n");
 
        set_pxa_fb_parent(&poodle_locomo_device.dev);
        set_pxa_fb_info(&poodle_fb_info);
-       pxa_gpio_mode(POODLE_GPIO_USB_PULLUP | GPIO_OUT);
-       pxa_gpio_mode(POODLE_GPIO_IR_ON | GPIO_OUT);
        pxa_set_udc_info(&udc_info);
        pxa_set_mci_info(&poodle_mci_platform_data);
        pxa_set_ficp_info(&poodle_ficp_platform_data);
        pxa_set_i2c_info(NULL);
-
-       platform_scoop_config = &poodle_pcmcia_config;
-
-       ret = platform_add_devices(devices, ARRAY_SIZE(devices));
-       if (ret) {
-               printk(KERN_WARNING "poodle: Unable to register LoCoMo device\n");
-       }
-       corgi_ssp_set_machinfo(&poodle_ssp_machinfo);
+       poodle_init_spi();
 }
 
 static void __init fixup_poodle(struct machine_desc *desc,
index 305452b56e91dfcda49e81c5876c0ed0ca935583..25d17a1dab78bd68606224d233e6660960de0300 100644 (file)
 #include "devices.h"
 #include "clock.h"
 
+int cpu_is_pxa26x(void)
+{
+       return cpu_is_pxa250() && ((BOOT_DEF & 0x8) == 0);
+}
+EXPORT_SYMBOL_GPL(cpu_is_pxa26x);
+
 /*
  * Various clock factors driven by the CCCR register.
  */
@@ -203,48 +209,21 @@ static struct clk pxa25x_clks[] = {
  * More ones like CP and general purpose register values are preserved
  * with the stack pointer in sleep.S.
  */
-enum { SLEEP_SAVE_PGSR0, SLEEP_SAVE_PGSR1, SLEEP_SAVE_PGSR2,
-
-       SLEEP_SAVE_GAFR0_L, SLEEP_SAVE_GAFR0_U,
-       SLEEP_SAVE_GAFR1_L, SLEEP_SAVE_GAFR1_U,
-       SLEEP_SAVE_GAFR2_L, SLEEP_SAVE_GAFR2_U,
-
+enum {
        SLEEP_SAVE_PSTR,
-
        SLEEP_SAVE_CKEN,
-
        SLEEP_SAVE_COUNT
 };
 
 
 static void pxa25x_cpu_pm_save(unsigned long *sleep_save)
 {
-       SAVE(PGSR0); SAVE(PGSR1); SAVE(PGSR2);
-
-       SAVE(GAFR0_L); SAVE(GAFR0_U);
-       SAVE(GAFR1_L); SAVE(GAFR1_U);
-       SAVE(GAFR2_L); SAVE(GAFR2_U);
-
        SAVE(CKEN);
        SAVE(PSTR);
-
-       /* Clear GPIO transition detect bits */
-       GEDR0 = GEDR0; GEDR1 = GEDR1; GEDR2 = GEDR2;
 }
 
 static void pxa25x_cpu_pm_restore(unsigned long *sleep_save)
 {
-       /* ensure not to come back here if it wasn't intended */
-       PSPR = 0;
-
-       /* restore registers */
-       RESTORE(GAFR0_L); RESTORE(GAFR0_U);
-       RESTORE(GAFR1_L); RESTORE(GAFR1_U);
-       RESTORE(GAFR2_L); RESTORE(GAFR2_U);
-       RESTORE(PGSR0); RESTORE(PGSR1); RESTORE(PGSR2);
-
-       PSSR = PSSR_RDH | PSSR_PH;
-
        RESTORE(CKEN);
        RESTORE(PSTR);
 }
@@ -256,19 +235,32 @@ static void pxa25x_cpu_pm_enter(suspend_state_t state)
 
        switch (state) {
        case PM_SUSPEND_MEM:
-               /* set resume return address */
-               PSPR = virt_to_phys(pxa_cpu_resume);
                pxa25x_cpu_suspend(PWRMODE_SLEEP);
                break;
        }
 }
 
+static int pxa25x_cpu_pm_prepare(void)
+{
+       /* set resume return address */
+       PSPR = virt_to_phys(pxa_cpu_resume);
+       return 0;
+}
+
+static void pxa25x_cpu_pm_finish(void)
+{
+       /* ensure not to come back here if it wasn't intended */
+       PSPR = 0;
+}
+
 static struct pxa_cpu_pm_fns pxa25x_cpu_pm_fns = {
        .save_count     = SLEEP_SAVE_COUNT,
        .valid          = suspend_valid_only_mem,
        .save           = pxa25x_cpu_pm_save,
        .restore        = pxa25x_cpu_pm_restore,
        .enter          = pxa25x_cpu_pm_enter,
+       .prepare        = pxa25x_cpu_pm_prepare,
+       .finish         = pxa25x_cpu_pm_finish,
 };
 
 static void __init pxa25x_init_pm(void)
@@ -329,6 +321,8 @@ static struct platform_device *pxa25x_devices[] __initdata = {
 static struct sys_device pxa25x_sysdev[] = {
        {
                .cls    = &pxa_irq_sysclass,
+       }, {
+               .cls    = &pxa2xx_mfp_sysclass,
        }, {
                .cls    = &pxa_gpio_sysclass,
        },
@@ -338,11 +332,7 @@ static int __init pxa25x_init(void)
 {
        int i, ret = 0;
 
-       /* Only add HWUART for PXA255/26x; PXA210/250/27x do not have it. */
-       if (cpu_is_pxa255())
-               clks_register(&pxa25x_hwuart_clk, 1);
-
-       if (cpu_is_pxa21x() || cpu_is_pxa25x()) {
+       if (cpu_is_pxa25x()) {
 
                reset_status = RCSR;
 
@@ -365,9 +355,11 @@ static int __init pxa25x_init(void)
                        return ret;
        }
 
-       /* Only add HWUART for PXA255/26x; PXA210/250/27x do not have it. */
-       if (cpu_is_pxa255())
+       /* Only add HWUART for PXA255/26x; PXA210/250 do not have it. */
+       if (cpu_is_pxa255() || cpu_is_pxa26x()) {
+               clks_register(&pxa25x_hwuart_clk, 1);
                ret = platform_device_register(&pxa_device_hwuart);
+       }
 
        return ret;
 }
index f9f6a9c31f4b06237ab4751c66b9bfc68d55e254..3e4ab2279c99b31c0a9b1c009d55543dc4a93fff 100644 (file)
 #include "devices.h"
 #include "clock.h"
 
+void pxa27x_clear_otgph(void)
+{
+       if (cpu_is_pxa27x() && (PSSR & PSSR_OTGPH))
+               PSSR |= PSSR_OTGPH;
+}
+EXPORT_SYMBOL(pxa27x_clear_otgph);
+
 /* Crystal clock: 13MHz */
 #define BASE_CLK       13000000
 
@@ -183,36 +190,18 @@ static struct clk pxa27x_clks[] = {
  * More ones like CP and general purpose register values are preserved
  * with the stack pointer in sleep.S.
  */
-enum { SLEEP_SAVE_PGSR0, SLEEP_SAVE_PGSR1, SLEEP_SAVE_PGSR2, SLEEP_SAVE_PGSR3,
-
-       SLEEP_SAVE_GAFR0_L, SLEEP_SAVE_GAFR0_U,
-       SLEEP_SAVE_GAFR1_L, SLEEP_SAVE_GAFR1_U,
-       SLEEP_SAVE_GAFR2_L, SLEEP_SAVE_GAFR2_U,
-       SLEEP_SAVE_GAFR3_L, SLEEP_SAVE_GAFR3_U,
-
+enum {
        SLEEP_SAVE_PSTR,
-
        SLEEP_SAVE_CKEN,
-
        SLEEP_SAVE_MDREFR,
-       SLEEP_SAVE_PWER, SLEEP_SAVE_PCFR, SLEEP_SAVE_PRER,
-       SLEEP_SAVE_PFER, SLEEP_SAVE_PKWR,
-
+       SLEEP_SAVE_PCFR,
        SLEEP_SAVE_COUNT
 };
 
 void pxa27x_cpu_pm_save(unsigned long *sleep_save)
 {
-       SAVE(PGSR0); SAVE(PGSR1); SAVE(PGSR2); SAVE(PGSR3);
-
-       SAVE(GAFR0_L); SAVE(GAFR0_U);
-       SAVE(GAFR1_L); SAVE(GAFR1_U);
-       SAVE(GAFR2_L); SAVE(GAFR2_U);
-       SAVE(GAFR3_L); SAVE(GAFR3_U);
-
        SAVE(MDREFR);
-       SAVE(PWER); SAVE(PCFR); SAVE(PRER);
-       SAVE(PFER); SAVE(PKWR);
+       SAVE(PCFR);
 
        SAVE(CKEN);
        SAVE(PSTR);
@@ -220,24 +209,12 @@ void pxa27x_cpu_pm_save(unsigned long *sleep_save)
 
 void pxa27x_cpu_pm_restore(unsigned long *sleep_save)
 {
-       /* ensure not to come back here if it wasn't intended */
-       PSPR = 0;
-
-       /* restore registers */
-       RESTORE(GAFR0_L); RESTORE(GAFR0_U);
-       RESTORE(GAFR1_L); RESTORE(GAFR1_U);
-       RESTORE(GAFR2_L); RESTORE(GAFR2_U);
-       RESTORE(GAFR3_L); RESTORE(GAFR3_U);
-       RESTORE(PGSR0); RESTORE(PGSR1); RESTORE(PGSR2); RESTORE(PGSR3);
-
        RESTORE(MDREFR);
-       RESTORE(PWER); RESTORE(PCFR); RESTORE(PRER);
-       RESTORE(PFER); RESTORE(PKWR);
+       RESTORE(PCFR);
 
        PSSR = PSSR_RDH | PSSR_PH;
 
        RESTORE(CKEN);
-
        RESTORE(PSTR);
 }
 
@@ -259,8 +236,6 @@ void pxa27x_cpu_pm_enter(suspend_state_t state)
                pxa_cpu_standby();
                break;
        case PM_SUSPEND_MEM:
-               /* set resume return address */
-               PSPR = virt_to_phys(pxa_cpu_resume);
                pxa27x_cpu_suspend(PWRMODE_SLEEP);
                break;
        }
@@ -271,12 +246,27 @@ static int pxa27x_cpu_pm_valid(suspend_state_t state)
        return state == PM_SUSPEND_MEM || state == PM_SUSPEND_STANDBY;
 }
 
+static int pxa27x_cpu_pm_prepare(void)
+{
+       /* set resume return address */
+       PSPR = virt_to_phys(pxa_cpu_resume);
+       return 0;
+}
+
+static void pxa27x_cpu_pm_finish(void)
+{
+       /* ensure not to come back here if it wasn't intended */
+       PSPR = 0;
+}
+
 static struct pxa_cpu_pm_fns pxa27x_cpu_pm_fns = {
        .save_count     = SLEEP_SAVE_COUNT,
        .save           = pxa27x_cpu_pm_save,
        .restore        = pxa27x_cpu_pm_restore,
        .valid          = pxa27x_cpu_pm_valid,
        .enter          = pxa27x_cpu_pm_enter,
+       .prepare        = pxa27x_cpu_pm_prepare,
+       .finish         = pxa27x_cpu_pm_finish,
 };
 
 static void __init pxa27x_init_pm(void)
@@ -349,7 +339,7 @@ struct platform_device pxa27x_device_i2c_power = {
        .num_resources  = ARRAY_SIZE(i2c_power_resources),
 };
 
-void __init pxa_set_i2c_power_info(struct i2c_pxa_platform_data *info)
+void __init pxa27x_set_i2c_power_info(struct i2c_pxa_platform_data *info)
 {
        local_irq_disable();
        PCFR |= PCFR_PI2CEN;
@@ -375,6 +365,8 @@ static struct platform_device *devices[] __initdata = {
 static struct sys_device pxa27x_sysdev[] = {
        {
                .cls    = &pxa_irq_sysclass,
+       }, {
+               .cls    = &pxa2xx_mfp_sysclass,
        }, {
                .cls    = &pxa_gpio_sysclass,
        },
index 03cbc38103ed230d3bf4f1309b9d8b6a6d0fba99..b3cd5d0b0f353e970d58a9f02f49194b2c87529a 100644 (file)
@@ -203,6 +203,19 @@ static const struct clkops clk_pout_ops = {
        .disable        = clk_pout_disable,
 };
 
+static void clk_dummy_enable(struct clk *clk)
+{
+}
+
+static void clk_dummy_disable(struct clk *clk)
+{
+}
+
+static const struct clkops clk_dummy_ops = {
+       .enable         = clk_dummy_enable,
+       .disable        = clk_dummy_disable,
+};
+
 static struct clk pxa3xx_clks[] = {
        {
                .name           = "CLK_POUT",
@@ -211,6 +224,13 @@ static struct clk pxa3xx_clks[] = {
                .delay          = 70,
        },
 
+       /* Power I2C clock is always on */
+       {
+               .name           = "I2CCLK",
+               .ops            = &clk_dummy_ops,
+               .dev            = &pxa3xx_device_i2c_power.dev,
+       },
+
        PXA3xx_CK("LCDCLK",  LCD,    &clk_pxa3xx_hsio_ops, &pxa_device_fb.dev),
        PXA3xx_CK("CAMCLK",  CAMERA, &clk_pxa3xx_hsio_ops, NULL),
        PXA3xx_CK("AC97CLK", AC97,   &clk_pxa3xx_ac97_ops, NULL),
@@ -509,6 +529,30 @@ void __init pxa3xx_init_irq(void)
  * device registration specific to PXA3xx.
  */
 
+static struct resource i2c_power_resources[] = {
+       {
+               .start  = 0x40f500c0,
+               .end    = 0x40f500d3,
+               .flags  = IORESOURCE_MEM,
+       }, {
+               .start  = IRQ_PWRI2C,
+               .end    = IRQ_PWRI2C,
+               .flags  = IORESOURCE_IRQ,
+       },
+};
+
+struct platform_device pxa3xx_device_i2c_power = {
+       .name           = "pxa2xx-i2c",
+       .id             = 1,
+       .resource       = i2c_power_resources,
+       .num_resources  = ARRAY_SIZE(i2c_power_resources),
+};
+
+void __init pxa3xx_set_i2c_power_info(struct i2c_pxa_platform_data *info)
+{
+       pxa3xx_device_i2c_power.dev.platform_data = info;
+}
+
 static struct platform_device *devices[] __initdata = {
 /*     &pxa_device_udc,        The UDC driver is PXA25x only */
        &pxa_device_ffuart,
@@ -522,6 +566,7 @@ static struct platform_device *devices[] __initdata = {
        &pxa3xx_device_ssp4,
        &pxa27x_device_pwm0,
        &pxa27x_device_pwm1,
+       &pxa3xx_device_i2c_power,
 };
 
 static struct sys_device pxa3xx_sysdev[] = {
index 9996c612c3d685d2ed749578f118b93262bfb6cc..31d78855aac8824b637130a0e56248d08c4a50ec 100644 (file)
@@ -7,7 +7,7 @@
 #include <linux/module.h>
 #include <linux/delay.h>
 #include <linux/gpio.h>
-#include <asm/io.h>
+#include <linux/io.h>
 #include <asm/proc-fns.h>
 
 #include <mach/pxa-regs.h>
index e804ae09370c0bc756aa69e55a3ea81d1dead4d3..15c2f1a8623ba8b547dea59b9dcc6ab97e18adef 100644 (file)
@@ -116,24 +116,20 @@ struct battery_thresh  spitz_battery_levels_noac[] = {
        {   0,   0},
 };
 
-/* MAX1111 Commands */
-#define MAXCTRL_PD0      1u << 0
-#define MAXCTRL_PD1      1u << 1
-#define MAXCTRL_SGL      1u << 2
-#define MAXCTRL_UNI      1u << 3
-#define MAXCTRL_SEL_SH   4
-#define MAXCTRL_STR      1u << 7
-
 /*
  * Read MAX1111 ADC
  */
+extern int max1111_read_channel(int);
+
 int sharpsl_pm_pxa_read_max1111(int channel)
 {
        if (machine_is_tosa()) // Ugly, better move this function into another module
            return 0;
 
-       return corgi_ssp_max1111_get((channel << MAXCTRL_SEL_SH) | MAXCTRL_PD0 | MAXCTRL_PD1
-                       | MAXCTRL_SGL | MAXCTRL_UNI | MAXCTRL_STR);
+       /* max1111 accepts channels from 0-3, however,
+        * it is encoded from 0-7 here in the code.
+        */
+       return max1111_read_channel(channel >> 1);
 }
 
 void sharpsl_pm_pxa_init(void)
index b569f3b4cf3a68dfa629e201ab79da0e464e0908..9b4f24c7c055de37a2eedf97c2289e60a015f5a3 100644 (file)
 #include <linux/major.h>
 #include <linux/fs.h>
 #include <linux/interrupt.h>
+#include <linux/gpio.h>
+#include <linux/leds.h>
 #include <linux/mmc/host.h>
 #include <linux/pm.h>
 #include <linux/backlight.h>
+#include <linux/io.h>
+#include <linux/i2c.h>
+#include <linux/i2c/pca953x.h>
+#include <linux/spi/spi.h>
+#include <linux/spi/ads7846.h>
+#include <linux/spi/corgi_lcd.h>
 
 #include <asm/setup.h>
 #include <asm/memory.h>
 #include <asm/mach-types.h>
 #include <mach/hardware.h>
 #include <asm/irq.h>
-#include <asm/io.h>
 #include <asm/system.h>
 
 #include <asm/mach/arch.h>
@@ -37,7 +44,7 @@
 
 #include <mach/pxa-regs.h>
 #include <mach/pxa2xx-regs.h>
-#include <mach/pxa2xx-gpio.h>
+#include <mach/mfp-pxa27x.h>
 #include <mach/pxa27x-udc.h>
 #include <mach/reset.h>
 #include <mach/i2c.h>
@@ -46,7 +53,7 @@
 #include <mach/ohci.h>
 #include <mach/udc.h>
 #include <mach/pxafb.h>
-#include <mach/akita.h>
+#include <mach/pxa2xx_spi.h>
 #include <mach/spitz.h>
 #include <mach/sharpsl.h>
 
 #include "devices.h"
 #include "sharpsl.h"
 
+static unsigned long spitz_pin_config[] __initdata = {
+       /* Chip Selects */
+       GPIO78_nCS_2,   /* SCOOP #2 */
+       GPIO80_nCS_4,   /* SCOOP #1 */
+
+       /* LCD - 16bpp Active TFT */
+       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,
+
+       /* PC Card */
+       GPIO48_nPOE,
+       GPIO49_nPWE,
+       GPIO50_nPIOR,
+       GPIO51_nPIOW,
+       GPIO85_nPCE_1,
+       GPIO54_nPCE_2,
+       GPIO79_PSKTSEL,
+       GPIO55_nPREG,
+       GPIO56_nPWAIT,
+       GPIO57_nIOIS16,
+
+       /* MMC */
+       GPIO32_MMC_CLK,
+       GPIO112_MMC_CMD,
+       GPIO92_MMC_DAT_0,
+       GPIO109_MMC_DAT_1,
+       GPIO110_MMC_DAT_2,
+       GPIO111_MMC_DAT_3,
+
+       /* GPIOs */
+       GPIO9_GPIO,     /* SPITZ_GPIO_nSD_DETECT */
+       GPIO81_GPIO,    /* SPITZ_GPIO_nSD_WP */
+       GPIO41_GPIO,    /* SPITZ_GPIO_USB_CONNECT */
+       GPIO37_GPIO,    /* SPITZ_GPIO_USB_HOST */
+       GPIO35_GPIO,    /* SPITZ_GPIO_USB_DEVICE */
+       GPIO22_GPIO,    /* SPITZ_GPIO_HSYNC */
+       GPIO94_GPIO,    /* SPITZ_GPIO_CF_CD */
+       GPIO105_GPIO,   /* SPITZ_GPIO_CF_IRQ */
+       GPIO106_GPIO,   /* SPITZ_GPIO_CF2_IRQ */
+
+       GPIO1_GPIO | WAKEUP_ON_EDGE_RISE,
+};
+
 /*
  * Spitz SCOOP Device #1
  */
@@ -69,10 +136,11 @@ static struct resource spitz_scoop_resources[] = {
 };
 
 static struct scoop_config spitz_scoop_setup = {
-       .io_dir         = SPITZ_SCP_IO_DIR,
+       .io_dir         = SPITZ_SCP_IO_DIR,
        .io_out         = SPITZ_SCP_IO_OUT,
-       .suspend_clr = SPITZ_SCP_SUS_CLR,
-       .suspend_set = SPITZ_SCP_SUS_SET,
+       .suspend_clr    = SPITZ_SCP_SUS_CLR,
+       .suspend_set    = SPITZ_SCP_SUS_SET,
+       .gpio_base      = SPITZ_SCP_GPIO_BASE,
 };
 
 struct platform_device spitzscoop_device = {
@@ -97,10 +165,11 @@ static struct resource spitz_scoop2_resources[] = {
 };
 
 static struct scoop_config spitz_scoop2_setup = {
-       .io_dir         = SPITZ_SCP2_IO_DIR,
+       .io_dir         = SPITZ_SCP2_IO_DIR,
        .io_out         = SPITZ_SCP2_IO_OUT,
-       .suspend_clr = SPITZ_SCP2_SUS_CLR,
-       .suspend_set = SPITZ_SCP2_SUS_SET,
+       .suspend_clr    = SPITZ_SCP2_SUS_CLR,
+       .suspend_set    = SPITZ_SCP2_SUS_SET,
+       .gpio_base      = SPITZ_SCP2_GPIO_BASE,
 };
 
 struct platform_device spitzscoop2_device = {
@@ -122,7 +191,7 @@ static void spitz_card_pwr_ctrl(int device, unsigned short new_cpr)
        unsigned short cpr = read_scoop_reg(&spitzscoop_device.dev, SCOOP_CPR);
 
        if (new_cpr & 0x0007) {
-               set_scoop_gpio(&spitzscoop_device.dev, SPITZ_SCP_CF_POWER);
+               gpio_set_value(SPITZ_GPIO_CF_POWER, 1);
                if (!(cpr & 0x0002) && !(cpr & 0x0004))
                        mdelay(5);
                if (device == SPITZ_PWR_CF)
@@ -138,34 +207,13 @@ static void spitz_card_pwr_ctrl(int device, unsigned short new_cpr)
                if (!(cpr & 0x0002) && !(cpr & 0x0004)) {
                        write_scoop_reg(&spitzscoop_device.dev, SCOOP_CPR, 0x0000);
                        mdelay(1);
-                       reset_scoop_gpio(&spitzscoop_device.dev, SPITZ_SCP_CF_POWER);
+                       gpio_set_value(SPITZ_GPIO_CF_POWER, 0);
                } else {
                        write_scoop_reg(&spitzscoop_device.dev, SCOOP_CPR, cpr | new_cpr);
                }
        }
 }
 
-static void spitz_pcmcia_init(void)
-{
-       /* Setup default state of GPIO outputs
-          before we enable them as outputs. */
-       GPSR(GPIO48_nPOE) = GPIO_bit(GPIO48_nPOE) |
-               GPIO_bit(GPIO49_nPWE) | GPIO_bit(GPIO50_nPIOR) |
-               GPIO_bit(GPIO51_nPIOW) | GPIO_bit(GPIO54_nPCE_2);
-       GPSR(GPIO85_nPCE_1) = GPIO_bit(GPIO85_nPCE_1);
-
-       pxa_gpio_mode(GPIO48_nPOE_MD);
-       pxa_gpio_mode(GPIO49_nPWE_MD);
-       pxa_gpio_mode(GPIO50_nPIOR_MD);
-       pxa_gpio_mode(GPIO51_nPIOW_MD);
-       pxa_gpio_mode(GPIO55_nPREG_MD);
-       pxa_gpio_mode(GPIO56_nPWAIT_MD);
-       pxa_gpio_mode(GPIO57_nIOIS16_MD);
-       pxa_gpio_mode(GPIO85_nPCE_1_MD);
-       pxa_gpio_mode(GPIO54_nPCE_2_MD);
-       pxa_gpio_mode(GPIO104_pSKTSEL_MD);
-}
-
 static void spitz_pcmcia_pwr(struct device *scoop, unsigned short cpr, int nr)
 {
        /* Only need to override behaviour for slot 0 */
@@ -191,165 +239,169 @@ static struct scoop_pcmcia_dev spitz_pcmcia_scoop[] = {
 static struct scoop_pcmcia_config spitz_pcmcia_config = {
        .devs         = &spitz_pcmcia_scoop[0],
        .num_devs     = 2,
-       .pcmcia_init  = spitz_pcmcia_init,
        .power_ctrl   = spitz_pcmcia_pwr,
 };
 
 EXPORT_SYMBOL(spitzscoop_device);
 EXPORT_SYMBOL(spitzscoop2_device);
 
-
 /*
- * Spitz SSP Device
- *
- * Set the parent as the scoop device because a lot of SSP devices
- * also use scoop functions and this makes the power up/down order
- * work correctly.
+ * Spitz Keyboard Device
  */
-struct platform_device spitzssp_device = {
-       .name           = "corgi-ssp",
-       .dev            = {
-               .parent = &spitzscoop_device.dev,
-       },
+static struct platform_device spitzkbd_device = {
+       .name           = "spitz-keyboard",
        .id             = -1,
 };
 
-struct corgissp_machinfo spitz_ssp_machinfo = {
-       .port           = 2,
-       .cs_lcdcon      = SPITZ_GPIO_LCDCON_CS,
-       .cs_ads7846     = SPITZ_GPIO_ADS7846_CS,
-       .cs_max1111     = SPITZ_GPIO_MAX1111_CS,
-       .clk_lcdcon     = 520,
-       .clk_ads7846    = 14,
-       .clk_max1111    = 56,
-};
-
 
 /*
- * Spitz Backlight Device
+ * Spitz LEDs
  */
-static void spitz_bl_kick_battery(void)
-{
-       void (*kick_batt)(void);
-
-       kick_batt = symbol_get(sharpsl_battery_kick);
-       if (kick_batt) {
-               kick_batt();
-               symbol_put(sharpsl_battery_kick);
-       }
-}
-
-static struct generic_bl_info spitz_bl_machinfo = {
-       .name = "corgi-bl",
-       .default_intensity = 0x1f,
-       .limit_mask = 0x0b,
-       .max_intensity = 0x2f,
-       .kick_battery = spitz_bl_kick_battery,
-};
-
-static struct platform_device spitzbl_device = {
-       .name           = "generic-bl",
-       .dev            = {
-               .platform_data  = &spitz_bl_machinfo,
+static struct gpio_led spitz_gpio_leds[] = {
+       {
+               .name                   = "spitz:amber:charge",
+               .default_trigger        = "sharpsl-charge",
+               .gpio                   = SPITZ_GPIO_LED_ORANGE,
+       },
+       {
+               .name                   = "spitz:green:hddactivity",
+               .default_trigger        = "ide-disk",
+               .gpio                   = SPITZ_GPIO_LED_GREEN,
        },
-       .id             = -1,
 };
 
-
-/*
- * Spitz Keyboard Device
- */
-static struct platform_device spitzkbd_device = {
-       .name           = "spitz-keyboard",
-       .id             = -1,
+static struct gpio_led_platform_data spitz_gpio_leds_info = {
+       .leds           = spitz_gpio_leds,
+       .num_leds       = ARRAY_SIZE(spitz_gpio_leds),
 };
 
-
-/*
- * Spitz LEDs
- */
 static struct platform_device spitzled_device = {
-       .name           = "spitz-led",
+       .name           = "leds-gpio",
        .id             = -1,
+       .dev            = {
+               .platform_data = &spitz_gpio_leds_info,
+       },
 };
 
-/*
- * Spitz Touch Screen Device
- */
+#if defined(CONFIG_SPI_PXA2XX) || defined(CONFIG_SPI_PXA2XX_MODULE)
+static struct pxa2xx_spi_master spitz_spi_info = {
+       .num_chipselect = 3,
+};
 
-static unsigned long (*get_hsync_invperiod)(struct device *dev);
+static struct ads7846_platform_data spitz_ads7846_info = {
+       .model                  = 7846,
+       .vref_delay_usecs       = 100,
+       .x_plate_ohms           = 419,
+       .y_plate_ohms           = 486,
+       .gpio_pendown           = SPITZ_GPIO_TP_INT,
+};
 
-static void inline sharpsl_wait_sync(int gpio)
+static void spitz_ads7846_cs(u32 command)
 {
-       while((GPLR(gpio) & GPIO_bit(gpio)) == 0);
-       while((GPLR(gpio) & GPIO_bit(gpio)) != 0);
+       gpio_set_value(SPITZ_GPIO_ADS7846_CS, !(command == PXA2XX_CS_ASSERT));
 }
 
-static struct device *spitz_pxafb_dev;
+static struct pxa2xx_spi_chip spitz_ads7846_chip = {
+       .cs_control             = spitz_ads7846_cs,
+};
 
-static int is_pxafb_device(struct device * dev, void * data)
+static void spitz_bl_kick_battery(void)
 {
-       struct platform_device *pdev = container_of(dev, struct platform_device, dev);
-
-       return (strncmp(pdev->name, "pxa2xx-fb", 9) == 0);
-}
+       void (*kick_batt)(void);
 
-static unsigned long spitz_get_hsync_invperiod(void)
-{
-#ifdef CONFIG_FB_PXA
-       if (!spitz_pxafb_dev) {
-               spitz_pxafb_dev = bus_find_device(&platform_bus_type, NULL, NULL, is_pxafb_device);
-               if (!spitz_pxafb_dev)
-                       return 0;
+       kick_batt = symbol_get(sharpsl_battery_kick);
+       if (kick_batt) {
+               kick_batt();
+               symbol_put(sharpsl_battery_kick);
        }
-       if (!get_hsync_invperiod)
-               get_hsync_invperiod = symbol_get(pxafb_get_hsync_time);
-       if (!get_hsync_invperiod)
-#endif
-               return 0;
-
-       return get_hsync_invperiod(spitz_pxafb_dev);
 }
 
-static void spitz_put_hsync(void)
-{
-       put_device(spitz_pxafb_dev);
-       if (get_hsync_invperiod)
-               symbol_put(pxafb_get_hsync_time);
-       spitz_pxafb_dev = NULL;
-       get_hsync_invperiod = NULL;
-}
+static struct corgi_lcd_platform_data spitz_lcdcon_info = {
+       .init_mode              = CORGI_LCD_MODE_VGA,
+       .max_intensity          = 0x2f,
+       .default_intensity      = 0x1f,
+       .limit_mask             = 0x0b,
+       .gpio_backlight_cont    = SPITZ_GPIO_BACKLIGHT_CONT,
+       .gpio_backlight_on      = SPITZ_GPIO_BACKLIGHT_ON,
+       .kick_battery           = spitz_bl_kick_battery,
+};
 
-static void spitz_wait_hsync(void)
+static void spitz_lcdcon_cs(u32 command)
 {
-       sharpsl_wait_sync(SPITZ_GPIO_HSYNC);
+       gpio_set_value(SPITZ_GPIO_LCDCON_CS, !(command == PXA2XX_CS_ASSERT));
 }
 
-static struct resource spitzts_resources[] = {
-       [0] = {
-               .start          = SPITZ_IRQ_GPIO_TP_INT,
-               .end            = SPITZ_IRQ_GPIO_TP_INT,
-               .flags          = IORESOURCE_IRQ,
-       },
+static struct pxa2xx_spi_chip spitz_lcdcon_chip = {
+       .cs_control     = spitz_lcdcon_cs,
 };
 
-static struct corgits_machinfo  spitz_ts_machinfo = {
-       .get_hsync_invperiod = spitz_get_hsync_invperiod,
-       .put_hsync           = spitz_put_hsync,
-       .wait_hsync          = spitz_wait_hsync,
+static void spitz_max1111_cs(u32 command)
+{
+       gpio_set_value(SPITZ_GPIO_MAX1111_CS, !(command == PXA2XX_CS_ASSERT));
+}
+
+static struct pxa2xx_spi_chip spitz_max1111_chip = {
+       .cs_control     = spitz_max1111_cs,
 };
 
-static struct platform_device spitzts_device = {
-       .name           = "corgi-ts",
-       .dev            = {
-               .parent = &spitzssp_device.dev,
-               .platform_data  = &spitz_ts_machinfo,
+static struct spi_board_info spitz_spi_devices[] = {
+       {
+               .modalias       = "ads7846",
+               .max_speed_hz   = 1200000,
+               .bus_num        = 2,
+               .chip_select    = 0,
+               .platform_data  = &spitz_ads7846_info,
+               .controller_data= &spitz_ads7846_chip,
+               .irq            = gpio_to_irq(SPITZ_GPIO_TP_INT),
+       }, {
+               .modalias       = "corgi-lcd",
+               .max_speed_hz   = 50000,
+               .bus_num        = 2,
+               .chip_select    = 1,
+               .platform_data  = &spitz_lcdcon_info,
+               .controller_data= &spitz_lcdcon_chip,
+       }, {
+               .modalias       = "max1111",
+               .max_speed_hz   = 450000,
+               .bus_num        = 2,
+               .chip_select    = 2,
+               .controller_data= &spitz_max1111_chip,
        },
-       .id             = -1,
-       .num_resources  = ARRAY_SIZE(spitzts_resources),
-       .resource       = spitzts_resources,
 };
 
+static void __init spitz_init_spi(void)
+{
+       int err;
+
+       err = gpio_request(SPITZ_GPIO_ADS7846_CS, "ADS7846_CS");
+       if (err)
+               return;
+
+       err = gpio_request(SPITZ_GPIO_LCDCON_CS, "LCDCON_CS");
+       if (err)
+               goto err_free_1;
+
+       err = gpio_request(SPITZ_GPIO_MAX1111_CS, "MAX1111_CS");
+       if (err)
+               goto err_free_2;
+
+       if (machine_is_akita()) {
+               spitz_lcdcon_info.gpio_backlight_cont = AKITA_GPIO_BACKLIGHT_CONT;
+               spitz_lcdcon_info.gpio_backlight_on = AKITA_GPIO_BACKLIGHT_ON;
+       }
+
+       pxa2xx_set_spi_info(2, &spitz_spi_info);
+       spi_register_board_info(ARRAY_AND_SIZE(spitz_spi_devices));
+       return;
+
+err_free_2:
+       gpio_free(SPITZ_GPIO_LCDCON_CS);
+err_free_1:
+       gpio_free(SPITZ_GPIO_ADS7846_CS);
+}
+#else
+static inline void spitz_init_spi(void) {}
+#endif
 
 /*
  * MMC/SD Device
@@ -364,24 +416,35 @@ static int spitz_mci_init(struct device *dev, irq_handler_t spitz_detect_int, vo
 {
        int err;
 
-       /* setup GPIO for PXA27x MMC controller */
-       pxa_gpio_mode(GPIO32_MMCCLK_MD);
-       pxa_gpio_mode(GPIO112_MMCCMD_MD);
-       pxa_gpio_mode(GPIO92_MMCDAT0_MD);
-       pxa_gpio_mode(GPIO109_MMCDAT1_MD);
-       pxa_gpio_mode(GPIO110_MMCDAT2_MD);
-       pxa_gpio_mode(GPIO111_MMCDAT3_MD);
-       pxa_gpio_mode(SPITZ_GPIO_nSD_DETECT | GPIO_IN);
-       pxa_gpio_mode(SPITZ_GPIO_nSD_WP | GPIO_IN);
+       err = gpio_request(SPITZ_GPIO_nSD_DETECT, "nSD_DETECT");
+       if (err)
+               goto err_out;
+
+       err = gpio_request(SPITZ_GPIO_nSD_WP, "nSD_WP");
+       if (err)
+               goto err_free_1;
+
+       gpio_direction_input(SPITZ_GPIO_nSD_DETECT);
+       gpio_direction_input(SPITZ_GPIO_nSD_WP);
 
        spitz_mci_platform_data.detect_delay = msecs_to_jiffies(250);
 
        err = request_irq(SPITZ_IRQ_GPIO_nSD_DETECT, spitz_detect_int,
-                         IRQF_DISABLED | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
+                         IRQF_DISABLED | IRQF_TRIGGER_RISING |
+                         IRQF_TRIGGER_FALLING,
                          "MMC card detect", data);
-       if (err)
-               printk(KERN_ERR "spitz_mci_init: MMC/SD: can't request MMC card detect IRQ\n");
+       if (err) {
+               pr_err("%s: MMC/SD: can't request MMC card detect IRQ\n",
+                               __func__);
+               goto err_free_2;
+       }
+       return 0;
 
+err_free_2:
+       gpio_free(SPITZ_GPIO_nSD_WP);
+err_free_1:
+       gpio_free(SPITZ_GPIO_nSD_DETECT);
+err_out:
        return err;
 }
 
@@ -397,12 +460,14 @@ static void spitz_mci_setpower(struct device *dev, unsigned int vdd)
 
 static int spitz_mci_get_ro(struct device *dev)
 {
-       return GPLR(SPITZ_GPIO_nSD_WP) & GPIO_bit(SPITZ_GPIO_nSD_WP);
+       return gpio_get_value(SPITZ_GPIO_nSD_WP);
 }
 
 static void spitz_mci_exit(struct device *dev, void *data)
 {
        free_irq(SPITZ_IRQ_GPIO_nSD_DETECT, data);
+       gpio_free(SPITZ_GPIO_nSD_WP);
+       gpio_free(SPITZ_GPIO_nSD_DETECT);
 }
 
 static struct pxamci_platform_data spitz_mci_platform_data = {
@@ -419,27 +484,24 @@ static struct pxamci_platform_data spitz_mci_platform_data = {
  */
 static int spitz_ohci_init(struct device *dev)
 {
-       /* Only Port 2 is connected */
-       pxa_gpio_mode(SPITZ_GPIO_USB_CONNECT | GPIO_IN);
-       pxa_gpio_mode(SPITZ_GPIO_USB_HOST | GPIO_OUT);
-       pxa_gpio_mode(SPITZ_GPIO_USB_DEVICE | GPIO_IN);
-
-       /* Setup USB Port 2 Output Control Register */
-       UP2OCR = UP2OCR_HXS | UP2OCR_HXOE | UP2OCR_DPPDE | UP2OCR_DMPDE;
-
-       GPSR(SPITZ_GPIO_USB_HOST) = GPIO_bit(SPITZ_GPIO_USB_HOST);
+       int err;
 
-       UHCHR = (UHCHR) &
-               ~(UHCHR_SSEP1 | UHCHR_SSEP2 | UHCHR_SSEP3 | UHCHR_SSE);
+       err = gpio_request(SPITZ_GPIO_USB_HOST, "USB_HOST");
+       if (err)
+               return err;
 
-       UHCRHDA |= UHCRHDA_NOCP;
+       /* Only Port 2 is connected
+        * Setup USB Port 2 Output Control Register
+        */
+       UP2OCR = UP2OCR_HXS | UP2OCR_HXOE | UP2OCR_DPPDE | UP2OCR_DMPDE;
 
-       return 0;
+       return gpio_direction_output(SPITZ_GPIO_USB_HOST, 1);
 }
 
 static struct pxaohci_platform_data spitz_ohci_platform_data = {
        .port_mode      = PMM_NPS_MODE,
        .init           = spitz_ohci_init,
+       .flags          = ENABLE_PORT_ALL | NO_OC_PROTECTION,
        .power_budget   = 150,
 };
 
@@ -447,29 +509,50 @@ static struct pxaohci_platform_data spitz_ohci_platform_data = {
 /*
  * Irda
  */
+static int spitz_irda_startup(struct device *dev)
+{
+       int rc;
+
+       rc = gpio_request(SPITZ_GPIO_IR_ON, "IrDA on");
+       if (rc)
+               goto err;
+
+       rc = gpio_direction_output(SPITZ_GPIO_IR_ON, 1);
+       if (rc)
+               goto err_dir;
+
+       return 0;
+
+err_dir:
+       gpio_free(SPITZ_GPIO_IR_ON);
+err:
+       return rc;
+}
+
+static void spitz_irda_shutdown(struct device *dev)
+{
+       gpio_free(SPITZ_GPIO_IR_ON);
+}
+
 static void spitz_irda_transceiver_mode(struct device *dev, int mode)
 {
-       if (mode & IR_OFF)
-               set_scoop_gpio(&spitzscoop2_device.dev, SPITZ_SCP2_IR_ON);
-       else
-               reset_scoop_gpio(&spitzscoop2_device.dev, SPITZ_SCP2_IR_ON);
+       gpio_set_value(SPITZ_GPIO_IR_ON, mode & IR_OFF);
        pxa2xx_transceiver_mode(dev, mode);
 }
 
 #ifdef CONFIG_MACH_AKITA
 static void akita_irda_transceiver_mode(struct device *dev, int mode)
 {
-       if (mode & IR_OFF)
-               akita_set_ioexp(&akitaioexp_device.dev, AKITA_IOEXP_IR_ON);
-       else
-               akita_reset_ioexp(&akitaioexp_device.dev, AKITA_IOEXP_IR_ON);
+       gpio_set_value(AKITA_GPIO_IR_ON, mode & IR_OFF);
        pxa2xx_transceiver_mode(dev, mode);
 }
 #endif
 
 static struct pxaficp_platform_data spitz_ficp_platform_data = {
-       .transceiver_cap  = IR_SIRMODE | IR_OFF,
-       .transceiver_mode = spitz_irda_transceiver_mode,
+       .transceiver_cap        = IR_SIRMODE | IR_OFF,
+       .transceiver_mode       = spitz_irda_transceiver_mode,
+       .startup                = spitz_irda_startup,
+       .shutdown               = spitz_irda_shutdown,
 };
 
 
@@ -477,14 +560,6 @@ static struct pxaficp_platform_data spitz_ficp_platform_data = {
  * Spitz PXA Framebuffer
  */
 
-static void spitz_lcd_power(int on, struct fb_var_screeninfo *var)
-{
-       if (on)
-               corgi_lcdtg_hw_init(var->xres);
-       else
-               corgi_lcdtg_suspend();
-}
-
 static struct pxafb_mode_info spitz_pxafb_modes[] = {
 {
        .pixclock       = 19231,
@@ -517,18 +592,13 @@ static struct pxafb_mach_info spitz_pxafb_info = {
        .modes          = &spitz_pxafb_modes[0],
        .num_modes      = 2,
        .fixed_modes    = 1,
-       .lccr0          = LCCR0_Color | LCCR0_Sngl | LCCR0_Act | LCCR0_LDDALT | LCCR0_OUC | LCCR0_CMDIM | LCCR0_RDSTM,
-       .lccr3          = LCCR3_PixRsEdg | LCCR3_OutEnH,
-       .pxafb_lcd_power = spitz_lcd_power,
+       .lcd_conn       = LCD_COLOR_TFT_16BPP | LCD_ALTERNATE_MAPPING,
 };
 
 
 static struct platform_device *devices[] __initdata = {
        &spitzscoop_device,
-       &spitzssp_device,
        &spitzkbd_device,
-       &spitzts_device,
-       &spitzbl_device,
        &spitzled_device,
 };
 
@@ -554,57 +624,26 @@ static void __init common_init(void)
 
        PMCR = 0x00;
 
-       /* setup sleep mode values */
-       PWER  = 0x00000002;
-       PFER  = 0x00000000;
-       PRER  = 0x00000002;
-       PGSR0 = 0x0158C000;
-       PGSR1 = 0x00FF0080;
-       PGSR2 = 0x0001C004;
-
        /* Stop 3.6MHz and drive HIGH to PCMCIA and CS */
        PCFR |= PCFR_OPDE;
 
-       corgi_ssp_set_machinfo(&spitz_ssp_machinfo);
+       pxa2xx_mfp_config(ARRAY_AND_SIZE(spitz_pin_config));
 
-       pxa_gpio_mode(SPITZ_GPIO_HSYNC | GPIO_IN);
+       spitz_init_spi();
 
        platform_add_devices(devices, ARRAY_SIZE(devices));
        pxa_set_mci_info(&spitz_mci_platform_data);
        pxa_set_ohci_info(&spitz_ohci_platform_data);
        pxa_set_ficp_info(&spitz_ficp_platform_data);
-       set_pxa_fb_parent(&spitzssp_device.dev);
        set_pxa_fb_info(&spitz_pxafb_info);
        pxa_set_i2c_info(NULL);
 }
 
 #if defined(CONFIG_MACH_SPITZ) || defined(CONFIG_MACH_BORZOI)
-static void spitz_bl_set_intensity(int intensity)
-{
-       if (intensity > 0x10)
-               intensity += 0x10;
-
-       /* Bits 0-4 are accessed via the SSP interface */
-       corgi_ssp_blduty_set(intensity & 0x1f);
-
-       /* Bit 5 is via SCOOP */
-       if (intensity & 0x0020)
-               reset_scoop_gpio(&spitzscoop2_device.dev, SPITZ_SCP2_BACKLIGHT_CONT);
-       else
-               set_scoop_gpio(&spitzscoop2_device.dev, SPITZ_SCP2_BACKLIGHT_CONT);
-
-       if (intensity)
-               set_scoop_gpio(&spitzscoop2_device.dev, SPITZ_SCP2_BACKLIGHT_ON);
-       else
-               reset_scoop_gpio(&spitzscoop2_device.dev, SPITZ_SCP2_BACKLIGHT_ON);
-}
-
 static void __init spitz_init(void)
 {
        platform_scoop_config = &spitz_pcmcia_config;
 
-       spitz_bl_machinfo.set_bl_intensity = spitz_bl_set_intensity;
-
        common_init();
 
        platform_device_register(&spitzscoop2_device);
@@ -615,32 +654,17 @@ static void __init spitz_init(void)
 /*
  * Akita IO Expander
  */
-struct platform_device akitaioexp_device = {
-       .name           = "akita-ioexp",
-       .id             = -1,
+static struct pca953x_platform_data akita_ioexp = {
+       .gpio_base              = AKITA_IOEXP_GPIO_BASE,
 };
 
-EXPORT_SYMBOL_GPL(akitaioexp_device);
-
-static void akita_bl_set_intensity(int intensity)
-{
-       if (intensity > 0x10)
-               intensity += 0x10;
-
-       /* Bits 0-4 are accessed via the SSP interface */
-       corgi_ssp_blduty_set(intensity & 0x1f);
-
-       /* Bit 5 is via IO-Expander */
-       if (intensity & 0x0020)
-               akita_reset_ioexp(&akitaioexp_device.dev, AKITA_IOEXP_BACKLIGHT_CONT);
-       else
-               akita_set_ioexp(&akitaioexp_device.dev, AKITA_IOEXP_BACKLIGHT_CONT);
-
-       if (intensity)
-               akita_set_ioexp(&akitaioexp_device.dev, AKITA_IOEXP_BACKLIGHT_ON);
-       else
-               akita_reset_ioexp(&akitaioexp_device.dev, AKITA_IOEXP_BACKLIGHT_ON);
-}
+static struct i2c_board_info akita_i2c_board_info[] = {
+       {
+               .type           = "max7310",
+               .addr           = 0x18,
+               .platform_data  = &akita_ioexp,
+       },
+};
 
 static void __init akita_init(void)
 {
@@ -649,11 +673,10 @@ static void __init akita_init(void)
        /* We just pretend the second element of the array doesn't exist */
        spitz_pcmcia_config.num_devs = 1;
        platform_scoop_config = &spitz_pcmcia_config;
-       spitz_bl_machinfo.set_bl_intensity = akita_bl_set_intensity;
 
-       platform_device_register(&akitaioexp_device);
+       pxa_set_i2c_info(NULL);
+       i2c_register_board_info(0, ARRAY_AND_SIZE(akita_i2c_board_info));
 
-       spitzscoop_device.dev.parent = &akitaioexp_device.dev;
        common_init();
 }
 #endif
index 8a40505dfd28b8081da8199ff02c31a8d87186d4..53018db106ac278cc5a1d3f7c08ad8a4862967e6 100644 (file)
@@ -21,7 +21,6 @@
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 #include <mach/hardware.h>
-#include <asm/hardware/scoop.h>
 
 #include <mach/sharpsl.h>
 #include <mach/spitz.h>
@@ -48,44 +47,35 @@ static void spitz_charger_init(void)
 
 static void spitz_measure_temp(int on)
 {
-       if (on)
-               set_scoop_gpio(&spitzscoop_device.dev, SPITZ_SCP_ADC_TEMP_ON);
-       else
-               reset_scoop_gpio(&spitzscoop_device.dev, SPITZ_SCP_ADC_TEMP_ON);
+       gpio_set_value(SPITZ_GPIO_ADC_TEMP_ON, on);
 }
 
 static void spitz_charge(int on)
 {
        if (on) {
                if (sharpsl_pm.flags & SHARPSL_SUSPENDED) {
-                       set_scoop_gpio(&spitzscoop_device.dev, SPITZ_SCP_JK_B);
-                       reset_scoop_gpio(&spitzscoop_device.dev, SPITZ_SCP_CHRG_ON);
+                       gpio_set_value(SPITZ_GPIO_JK_B, 1);
+                       gpio_set_value(SPITZ_GPIO_CHRG_ON, 0);
                } else {
-                       reset_scoop_gpio(&spitzscoop_device.dev, SPITZ_SCP_JK_B);
-                       reset_scoop_gpio(&spitzscoop_device.dev, SPITZ_SCP_CHRG_ON);
+                       gpio_set_value(SPITZ_GPIO_JK_B, 0);
+                       gpio_set_value(SPITZ_GPIO_CHRG_ON, 0);
                }
        } else {
-               reset_scoop_gpio(&spitzscoop_device.dev, SPITZ_SCP_JK_B);
-               set_scoop_gpio(&spitzscoop_device.dev, SPITZ_SCP_CHRG_ON);
+               gpio_set_value(SPITZ_GPIO_JK_B, 0);
+               gpio_set_value(SPITZ_GPIO_CHRG_ON, 1);
        }
 }
 
 static void spitz_discharge(int on)
 {
-       if (on)
-               set_scoop_gpio(&spitzscoop_device.dev, SPITZ_SCP_JK_A);
-       else
-               reset_scoop_gpio(&spitzscoop_device.dev, SPITZ_SCP_JK_A);
+       gpio_set_value(SPITZ_GPIO_JK_A, on);
 }
 
 /* HACK - For unknown reasons, accurate voltage readings are only made with a load
    on the power bus which the green led on spitz provides */
 static void spitz_discharge1(int on)
 {
-       if (on)
-               set_scoop_gpio(&spitzscoop_device.dev, SPITZ_SCP_LED_GREEN);
-       else
-               reset_scoop_gpio(&spitzscoop_device.dev, SPITZ_SCP_LED_GREEN);
+       gpio_set_value(SPITZ_GPIO_LED_GREEN, on);
 }
 
 static void spitz_presuspend(void)
index 9bd93c5f28b2eb81d9947510c85f463a29c378b7..2c31ec72568856019be0482d9dc4fa2a730dcb01 100644 (file)
@@ -28,8 +28,8 @@
 #include <linux/clk.h>
 #include <linux/err.h>
 #include <linux/platform_device.h>
+#include <linux/io.h>
 
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <mach/hardware.h>
 #include <mach/ssp.h>
index 67e18509d7bfe6103b4d5062a307c0fe12c029e8..18d149745837af5df0ae1d882550921031169d46 100644 (file)
@@ -155,7 +155,7 @@ static void __init pxa_timer_init(void)
        OIER = 0;
        OSSR = OSSR_M0 | OSSR_M1 | OSSR_M2 | OSSR_M3;
 
-       if (cpu_is_pxa21x() || cpu_is_pxa25x())
+       if (cpu_is_pxa25x())
                clock_tick_rate = 3686400;
        else if (machine_is_mainstone())
                clock_tick_rate = 3249600;
index 3ed757e6bcc896b60be4d52f2f67a073bba80061..a13dbf3c2c05bf6c796e219a5e9134ddbb8d34f8 100644 (file)
@@ -22,8 +22,8 @@
 #include <linux/fb.h>
 #include <linux/ioport.h>
 #include <linux/delay.h>
-#include <linux/serial_8250.h>
-#include <linux/mtd/mtd.h>
+#include <linux/gpio.h>
+#include <linux/dm9000.h>
 #include <linux/mtd/physmap.h>
 #include <linux/mtd/partitions.h>
 
@@ -31,7 +31,6 @@
 #include <asm/setup.h>
 #include <asm/memory.h>
 #include <asm/mach-types.h>
-#include <mach/hardware.h>
 #include <asm/irq.h>
 #include <asm/sizes.h>
 
 #include <asm/mach/irq.h>
 #include <asm/mach/flash.h>
 
+#include <mach/hardware.h>
 #include <mach/pxa-regs.h>
 #include <mach/pxa2xx-regs.h>
-#include <mach/pxa2xx-gpio.h>
+#include <mach/mfp-pxa27x.h>
+#include <mach/pxa2xx_spi.h>
 #include <mach/trizeps4.h>
 #include <mach/audio.h>
 #include <mach/pxafb.h>
 #include <mach/mmc.h>
 #include <mach/irda.h>
 #include <mach/ohci.h>
+#include <mach/i2c.h>
 
 #include "generic.h"
 #include "devices.h"
 
-/********************************************************************************************
+/*     comment out the following line if you want to use the
+ *     Standard UART from PXA for serial / irda transmission
+ *     and acivate it if you have status leds connected */
+#define STATUS_LEDS_ON_STUART_PINS 1
+
+/*****************************************************************************
+ * MultiFunctionPins of CPU
+ *****************************************************************************/
+static unsigned long trizeps4_pin_config[] __initdata = {
+       /* Chip Selects */
+       GPIO15_nCS_1,           /* DiskOnChip CS */
+       GPIO93_GPIO,            /* TRIZEPS4_DOC_IRQ */
+       GPIO94_GPIO,            /* DOC lock */
+
+       GPIO78_nCS_2,           /* DM9000 CS */
+       GPIO101_GPIO,           /* TRIZEPS4_ETH_IRQ */
+
+       GPIO79_nCS_3,           /* Logic CS */
+       GPIO0_GPIO | WAKEUP_ON_EDGE_RISE,       /* Logic irq */
+
+       /* LCD - 16bpp Active TFT */
+       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,
+
+       /* UART */
+       GPIO9_FFUART_CTS,
+       GPIO10_FFUART_DCD,
+       GPIO16_FFUART_TXD,
+       GPIO33_FFUART_DSR,
+       GPIO38_FFUART_RI,
+       GPIO82_FFUART_DTR,
+       GPIO83_FFUART_RTS,
+       GPIO96_FFUART_RXD,
+
+       GPIO42_BTUART_RXD,
+       GPIO43_BTUART_TXD,
+       GPIO44_BTUART_CTS,
+       GPIO45_BTUART_RTS,
+#ifdef STATUS_LEDS_ON_STUART_PINS
+       GPIO46_GPIO,
+       GPIO47_GPIO,
+#else
+       GPIO46_STUART_RXD,
+       GPIO47_STUART_TXD,
+#endif
+       /* PCMCIA */
+       GPIO11_GPIO,                    /* TRIZEPS4_CD_IRQ */
+       GPIO13_GPIO,                    /* TRIZEPS4_READY_NINT */
+       GPIO48_nPOE,
+       GPIO49_nPWE,
+       GPIO50_nPIOR,
+       GPIO51_nPIOW,
+       GPIO54_nPCE_2,
+       GPIO55_nPREG,
+       GPIO56_nPWAIT,
+       GPIO57_nIOIS16,
+       GPIO102_nPCE_1,
+       GPIO104_PSKTSEL,
+
+       /* MultiMediaCard */
+       GPIO32_MMC_CLK,
+       GPIO92_MMC_DAT_0,
+       GPIO109_MMC_DAT_1,
+       GPIO110_MMC_DAT_2,
+       GPIO111_MMC_DAT_3,
+       GPIO112_MMC_CMD,
+       GPIO12_GPIO,                    /* TRIZEPS4_MMC_IRQ */
+
+       /* USB OHCI */
+       GPIO88_USBH1_PWR,               /* USBHPWR1 */
+       GPIO89_USBH1_PEN,               /* USBHPEN1 */
+
+       /* I2C */
+       GPIO117_I2C_SCL,
+       GPIO118_I2C_SDA,
+};
+
+static unsigned long trizeps4wl_pin_config[] __initdata = {
+       /* SSP 2 */
+       GPIO14_SSP2_SFRM,
+       GPIO19_SSP2_SCLK,
+       GPIO53_GPIO,                    /* TRIZEPS4_SPI_IRQ */
+       GPIO86_SSP2_RXD,
+       GPIO87_SSP2_TXD,
+};
+
+/****************************************************************************
  * ONBOARD FLASH
- ********************************************************************************************/
+ ****************************************************************************/
 static struct mtd_partition trizeps4_partitions[] = {
        {
                .name =         "Bootloader",
                .offset =       0x00000000,
                .size =         0x00040000,
                .mask_flags =   MTD_WRITEABLE  /* force read-only */
-       },{
+       }, {
                .name =         "Backup",
                .offset =       0x00040000,
                .size =         0x00040000,
-       },{
+       }, {
                .name =         "Image",
                .offset =       0x00080000,
                .size =         0x01080000,
-       },{
+       }, {
                .name =         "IPSM",
                .offset =       0x01100000,
                .size =         0x00e00000,
-       },{
+       }, {
                .name =         "Registry",
                .offset =       0x01f00000,
                .size =         MTDPART_SIZ_FULL,
@@ -105,9 +211,9 @@ static struct platform_device flash_device = {
        .num_resources = 1,
 };
 
-/********************************************************************************************
+/****************************************************************************
  * DAVICOM DM9000 Ethernet
- ********************************************************************************************/
+ ****************************************************************************/
 static struct resource dm9000_resources[] = {
        [0] = {
                .start  = TRIZEPS4_ETH_PHYS+0x300,
@@ -122,67 +228,68 @@ static struct resource dm9000_resources[] = {
        [2] = {
                .start  = TRIZEPS4_ETH_IRQ,
                .end    = TRIZEPS4_ETH_IRQ,
-               .flags  = (IORESOURCE_IRQ | IRQ_TYPE_EDGE_RISING),
+               .flags  = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE,
        },
 };
 
+static struct dm9000_plat_data tri_dm9000_platdata = {
+       .flags          = DM9000_PLATF_32BITONLY,
+};
+
 static struct platform_device dm9000_device = {
        .name           = "dm9000",
        .id             = -1,
        .num_resources  = ARRAY_SIZE(dm9000_resources),
        .resource       = dm9000_resources,
+       .dev            = {
+               .platform_data = &tri_dm9000_platdata,
+       }
 };
 
-/********************************************************************************************
- * PXA270 serial ports
- ********************************************************************************************/
-static struct plat_serial8250_port tri_serial_ports[] = {
-#ifdef CONFIG_SERIAL_PXA
-       /* this uses the own PXA driver */
+/****************************************************************************
+ * LED's on GPIO pins of PXA
+ ****************************************************************************/
+static struct gpio_led trizeps4_led[] = {
+#ifdef STATUS_LEDS_ON_STUART_PINS
        {
-               0,
-       },
-#else
-       /* this uses the generic 8520 driver */
-       [0] = {
-               .membase        = (void *)&FFUART,
-               .irq            = IRQ_FFUART,
-               .flags          = UPF_BOOT_AUTOCONF,
-               .iotype         = UPIO_MEM32,
-               .regshift       = 2,
-               .uartclk        = (921600*16),
-       },
-       [1] = {
-               .membase        = (void *)&BTUART,
-               .irq            = IRQ_BTUART,
-               .flags          = UPF_BOOT_AUTOCONF,
-               .iotype         = UPIO_MEM32,
-               .regshift       = 2,
-               .uartclk        = (921600*16),
+               .name = "led0:orange:heartbeat",        /* */
+               .default_trigger = "heartbeat",
+               .gpio = GPIO_HEARTBEAT_LED,
+               .active_low = 1,
        },
        {
-               0,
+               .name = "led1:yellow:cpubusy",          /* */
+               .default_trigger = "cpu-busy",
+               .gpio = GPIO_SYS_BUSY_LED,
+               .active_low = 1,
        },
 #endif
 };
 
-static struct platform_device uart_devices = {
-       .name           = "serial8250",
-       .id             = 0,
+static struct gpio_led_platform_data trizeps4_led_data = {
+       .leds           = trizeps4_led,
+       .num_leds       = ARRAY_SIZE(trizeps4_led),
+};
+
+static struct platform_device leds_devices = {
+       .name           = "leds-gpio",
+       .id             = -1,
        .dev            = {
-               .platform_data  = tri_serial_ports,
+               .platform_data  = &trizeps4_led_data,
        },
-       .num_resources  = 0,
-       .resource       = NULL,
 };
 
-static struct platform_device * trizeps4_devices[] __initdata = {
+static struct platform_device *trizeps4_devices[] __initdata = {
        &flash_device,
-       &uart_devices,
        &dm9000_device,
+       &leds_devices,
+};
+
+static struct platform_device *trizeps4wl_devices[] __initdata = {
+       &flash_device,
+       &leds_devices,
 };
 
-#ifdef CONFIG_MACH_TRIZEPS4_CONXS
 static short trizeps_conxs_bcr;
 
 /* PCCARD power switching supports only 3,3V */
@@ -192,108 +299,63 @@ void board_pcmcia_power(int power)
                /* switch power on, put in reset and enable buffers */
                trizeps_conxs_bcr |= power;
                trizeps_conxs_bcr |= ConXS_BCR_CF_RESET;
-               trizeps_conxs_bcr &= ~(ConXS_BCR_CF_BUF_EN);
-               ConXS_BCR = trizeps_conxs_bcr;
+               trizeps_conxs_bcr &= ~ConXS_BCR_CF_BUF_EN;
+               BCR_writew(trizeps_conxs_bcr);
                /* wait a little */
                udelay(2000);
                /* take reset away */
-               trizeps_conxs_bcr &= ~(ConXS_BCR_CF_RESET);
-               ConXS_BCR = trizeps_conxs_bcr;
+               trizeps_conxs_bcr &= ~ConXS_BCR_CF_RESET;
+               BCR_writew(trizeps_conxs_bcr);
                udelay(2000);
        } else {
                /* put in reset */
                trizeps_conxs_bcr |= ConXS_BCR_CF_RESET;
-               ConXS_BCR = trizeps_conxs_bcr;
+               BCR_writew(trizeps_conxs_bcr);
                udelay(1000);
                /* switch power off */
-               trizeps_conxs_bcr &= ~(0xf);
-               ConXS_BCR = trizeps_conxs_bcr;
-
+               trizeps_conxs_bcr &= ~0xf;
+               BCR_writew(trizeps_conxs_bcr);
        }
-       pr_debug("%s: o%s 0x%x\n", __func__, power ? "n": "ff", trizeps_conxs_bcr);
+       pr_debug("%s: o%s 0x%x\n", __func__, power ? "n" : "ff",
+                       trizeps_conxs_bcr);
 }
+EXPORT_SYMBOL(board_pcmcia_power);
 
 /* backlight power switching for LCD panel */
 static void board_backlight_power(int on)
 {
-       if (on) {
+       if (on)
                trizeps_conxs_bcr |= ConXS_BCR_L_DISP;
-       } else {
+       else
                trizeps_conxs_bcr &= ~ConXS_BCR_L_DISP;
-       }
-       pr_debug("%s: o%s 0x%x\n", __func__, on ? "n" : "ff", trizeps_conxs_bcr);
-       ConXS_BCR = trizeps_conxs_bcr;
-}
 
-/* Powersupply for MMC/SD cardslot */
-static void board_mci_power(struct device *dev, unsigned int vdd)
-{
-       struct pxamci_platform_data* p_d = dev->platform_data;
-
-       if (( 1 << vdd) & p_d->ocr_mask) {
-               pr_debug("%s: on\n", __func__);
-               /* FIXME fill in values here */
-       } else {
-               pr_debug("%s: off\n", __func__);
-               /* FIXME fill in values here */
-       }
-}
-
-static short trizeps_conxs_ircr;
-
-/* Switch modes and Power for IRDA receiver */
-static void board_irda_mode(struct device *dev, int mode)
-{
-       unsigned long flags;
-
-       local_irq_save(flags);
-       if (mode & IR_SIRMODE) {
-               /* Slow mode */
-               trizeps_conxs_ircr &= ~ConXS_IRCR_MODE;
-       } else if (mode & IR_FIRMODE) {
-               /* Fast mode */
-               trizeps_conxs_ircr |= ConXS_IRCR_MODE;
-       }
-       pxa2xx_transceiver_mode(dev, mode);
-       if (mode & IR_OFF) {
-               trizeps_conxs_ircr |= ConXS_IRCR_SD;
-       } else {
-               trizeps_conxs_ircr &= ~ConXS_IRCR_SD;
-       }
-       /* FIXME write values to register */
-       local_irq_restore(flags);
+       pr_debug("%s: o%s 0x%x\n", __func__, on ? "n" : "ff",
+                       trizeps_conxs_bcr);
+       BCR_writew(trizeps_conxs_bcr);
 }
 
-#else
-/* for other baseboards define dummies */
-void board_pcmcia_power(int power)     {;}
-#define board_backlight_power          NULL
-#define board_mci_power                        NULL
-#define board_irda_mode                        NULL
-
-#endif         /* CONFIG_MACH_TRIZEPS4_CONXS */
-EXPORT_SYMBOL(board_pcmcia_power);
+/* a I2C based RTC is known on CONXS board */
+static struct i2c_board_info trizeps4_i2c_devices[] __initdata = {
+       { I2C_BOARD_INFO("rtc-pcf8593", 0x51) }
+};
 
-static int trizeps4_mci_init(struct device *dev, irq_handler_t mci_detect_int, void *data)
+/****************************************************************************
+ * MMC card slot external to module
+ ****************************************************************************/
+static int trizeps4_mci_init(struct device *dev, irq_handler_t mci_detect_int,
+               void *data)
 {
        int err;
-       /* setup GPIO for PXA27x MMC controller */
-       pxa_gpio_mode(GPIO32_MMCCLK_MD);
-       pxa_gpio_mode(GPIO112_MMCCMD_MD);
-       pxa_gpio_mode(GPIO92_MMCDAT0_MD);
-       pxa_gpio_mode(GPIO109_MMCDAT1_MD);
-       pxa_gpio_mode(GPIO110_MMCDAT2_MD);
-       pxa_gpio_mode(GPIO111_MMCDAT3_MD);
-
-       pxa_gpio_mode(GPIO_MMC_DET | GPIO_IN);
 
        err = request_irq(TRIZEPS4_MMC_IRQ, mci_detect_int,
-                         IRQF_DISABLED | IRQF_TRIGGER_RISING,
-                         "MMC card detect", data);
-       if (err)
-               printk(KERN_ERR "trizeps4_mci_init: MMC/SD: can't request MMC card detect IRQ\n");
-
-       return err;
+               IRQF_DISABLED | IRQF_TRIGGER_RISING | IRQF_SAMPLE_RANDOM,
+               "MMC card detect", data);
+       if (err) {
+               printk(KERN_ERR "trizeps4_mci_init: MMC/SD: can't request"
+                                               "MMC card detect IRQ\n");
+               return -1;
+       }
+       return 0;
 }
 
 static void trizeps4_mci_exit(struct device *dev, void *data)
@@ -303,39 +365,69 @@ static void trizeps4_mci_exit(struct device *dev, void *data)
 
 static struct pxamci_platform_data trizeps4_mci_platform_data = {
        .ocr_mask       = MMC_VDD_32_33|MMC_VDD_33_34,
+       .detect_delay   = 1,
        .init           = trizeps4_mci_init,
        .exit           = trizeps4_mci_exit,
-       .setpower       = board_mci_power,
+       .get_ro         = NULL, /* write-protection not supported */
+       .setpower       = NULL, /* power-switching not supported */
 };
 
-static struct pxaficp_platform_data trizeps4_ficp_platform_data = {
-       .transceiver_cap  = IR_SIRMODE | IR_FIRMODE | IR_OFF,
-       .transceiver_mode = board_irda_mode,
-};
+/****************************************************************************
+ * IRDA mode switching on stuart
+ ****************************************************************************/
+#ifndef STATUS_LEDS_ON_STUART_PINS
+static short trizeps_conxs_ircr;
 
-static int trizeps4_ohci_init(struct device *dev)
+static int trizeps4_irda_startup(struct device *dev)
 {
-       /* setup Port1 GPIO pin. */
-       pxa_gpio_mode( 88 | GPIO_ALT_FN_1_IN);  /* USBHPWR1 */
-       pxa_gpio_mode( 89 | GPIO_ALT_FN_2_OUT); /* USBHPEN1 */
-
-       /* Set the Power Control Polarity Low and Power Sense
-          Polarity Low to active low. */
-       UHCHR = (UHCHR | UHCHR_PCPL | UHCHR_PSPL) &
-               ~(UHCHR_SSEP1 | UHCHR_SSEP2 | UHCHR_SSEP3 | UHCHR_SSE);
-
+       trizeps_conxs_ircr &= ~ConXS_IRCR_SD;
+       IRCR_writew(trizeps_conxs_ircr);
        return 0;
 }
 
-static void trizeps4_ohci_exit(struct device *dev)
+static void trizeps4_irda_shutdown(struct device *dev)
+{
+       trizeps_conxs_ircr |= ConXS_IRCR_SD;
+       IRCR_writew(trizeps_conxs_ircr);
+}
+
+static void trizeps4_irda_transceiver_mode(struct device *dev, int mode)
 {
-       ;
+       unsigned long flags;
+
+       local_irq_save(flags);
+       /* Switch mode */
+       if (mode & IR_SIRMODE)
+               trizeps_conxs_ircr &= ~ConXS_IRCR_MODE; /* Slow mode */
+       else if (mode & IR_FIRMODE) {
+               trizeps_conxs_ircr |= ConXS_IRCR_MODE;  /* Fast mode */
+
+       /* Switch power */
+       if (mode & IR_OFF)
+               trizeps_conxs_ircr |= ConXS_IRCR_SD;
+       else
+               trizeps_conxs_ircr &= ~ConXS_IRCR_SD;
+
+       IRCR_writew(trizeps_conxs_ircr);
+       local_irq_restore(flags);
+
+       pxa2xx_transceiver_mode(dev, mode);
 }
 
+static struct pxaficp_platform_data trizeps4_ficp_platform_data = {
+       .transceiver_cap        = IR_SIRMODE | IR_FIRMODE | IR_OFF,
+       .transceiver_mode       = trizeps4_irda_transceiver_mode,
+       .startup                = trizeps4_irda_startup,
+       .shutdown               = trizeps4_irda_shutdown,
+};
+#endif
+
+/****************************************************************************
+ * OHCI USB port
+ ****************************************************************************/
 static struct pxaohci_platform_data trizeps4_ohci_platform_data = {
        .port_mode      = PMM_PERPORT_MODE,
-       .init           = trizeps4_ohci_init,
-       .exit           = trizeps4_ohci_exit,
+       .flags          = ENABLE_PORT_ALL | POWER_CONTROL_LOW | POWER_SENSE_LOW,
 };
 
 static struct map_desc trizeps4_io_desc[] __initdata = {
@@ -372,105 +464,80 @@ static struct map_desc trizeps4_io_desc[] __initdata = {
 };
 
 static struct pxafb_mode_info sharp_lcd_mode = {
-    .pixclock          = 78000,
-    .xres              = 640,
-    .yres              = 480,
-    .bpp               = 8,
-    .hsync_len         = 4,
-    .left_margin       = 4,
-    .right_margin      = 4,
-    .vsync_len         = 2,
-    .upper_margin      = 0,
-    .lower_margin      = 0,
-    .sync              = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
-    .cmap_greyscale    = 0,
+       .pixclock       = 78000,
+       .xres           = 640,
+       .yres           = 480,
+       .bpp            = 8,
+       .hsync_len      = 4,
+       .left_margin    = 4,
+       .right_margin   = 4,
+       .vsync_len      = 2,
+       .upper_margin   = 0,
+       .lower_margin   = 0,
+       .sync           = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
+       .cmap_greyscale = 0,
 };
 
 static struct pxafb_mach_info sharp_lcd = {
-    .modes             = &sharp_lcd_mode,
-    .num_modes = 1,
-    .cmap_inverse      = 0,
-    .cmap_static       = 0,
-    .lccr0             = LCCR0_Color | LCCR0_Pas | LCCR0_Dual,
-    .lccr3             = 0x0340ff02,
-    .pxafb_backlight_power = board_backlight_power,
+       .modes          = &sharp_lcd_mode,
+       .num_modes      = 1,
+       .lcd_conn       = LCD_COLOR_DSTN_16BPP | LCD_PCLK_EDGE_FALL,
+       .cmap_inverse   = 0,
+       .cmap_static    = 0,
+       .pxafb_backlight_power = board_backlight_power,
 };
 
 static struct pxafb_mode_info toshiba_lcd_mode = {
-    .pixclock          = 39720,
-    .xres              = 640,
-    .yres              = 480,
-    .bpp               = 8,
-    .hsync_len         = 63,
-    .left_margin       = 12,
-    .right_margin      = 12,
-    .vsync_len         = 4,
-    .upper_margin      = 32,
-    .lower_margin      = 10,
-    .sync              = 0,
-    .cmap_greyscale    = 0,
+       .pixclock       = 39720,
+       .xres           = 640,
+       .yres           = 480,
+       .bpp            = 8,
+       .hsync_len      = 63,
+       .left_margin    = 12,
+       .right_margin   = 12,
+       .vsync_len      = 4,
+       .upper_margin   = 32,
+       .lower_margin   = 10,
+       .sync           = 0,
+       .cmap_greyscale = 0,
 };
 
 static struct pxafb_mach_info toshiba_lcd = {
-    .modes             = &toshiba_lcd_mode,
-    .num_modes = 1,
-    .cmap_inverse      = 0,
-    .cmap_static       = 0,
-    .lccr0             = LCCR0_Color | LCCR0_Act,
-    .lccr3             = 0x03400002,
-    .pxafb_backlight_power = board_backlight_power,
+       .modes          = &toshiba_lcd_mode,
+       .num_modes      = 1,
+       .lcd_conn       = (LCD_COLOR_TFT_16BPP | LCD_PCLK_EDGE_FALL),
+       .cmap_inverse   = 0,
+       .cmap_static    = 0,
+       .pxafb_backlight_power = board_backlight_power,
 };
 
 static void __init trizeps4_init(void)
 {
-       platform_add_devices(trizeps4_devices, ARRAY_SIZE(trizeps4_devices));
+       pxa2xx_mfp_config(ARRAY_AND_SIZE(trizeps4_pin_config));
+       if (machine_is_trizeps4wl()) {
+               pxa2xx_mfp_config(ARRAY_AND_SIZE(trizeps4wl_pin_config));
+               platform_add_devices(trizeps4wl_devices,
+                                       ARRAY_SIZE(trizeps4wl_devices));
+       } else {
+               platform_add_devices(trizeps4_devices,
+                                       ARRAY_SIZE(trizeps4_devices));
+       }
 
-/*     set_pxa_fb_info(&sharp_lcd); */
-       set_pxa_fb_info(&toshiba_lcd);
+       if (0)  /* dont know how to determine LCD */
+               set_pxa_fb_info(&sharp_lcd);
+       else
+               set_pxa_fb_info(&toshiba_lcd);
 
        pxa_set_mci_info(&trizeps4_mci_platform_data);
+#ifndef STATUS_LEDS_ON_STUART_PINS
        pxa_set_ficp_info(&trizeps4_ficp_platform_data);
+#endif
        pxa_set_ohci_info(&trizeps4_ohci_platform_data);
        pxa_set_ac97_info(NULL);
-}
-
-static void __init trizeps4_map_io(void)
-{
-       pxa_map_io();
-       iotable_init(trizeps4_io_desc, ARRAY_SIZE(trizeps4_io_desc));
-
-       /* for DiskOnChip */
-       pxa_gpio_mode(GPIO15_nCS_1_MD);
-
-       /* for off-module PIC on ConXS board */
-       pxa_gpio_mode(GPIO_PIC | GPIO_IN);
-
-       /* UCB1400 irq */
-       pxa_gpio_mode(GPIO_UCB1400 | GPIO_IN);
-
-       /* for DM9000 LAN */
-       pxa_gpio_mode(GPIO78_nCS_2_MD);
-       pxa_gpio_mode(GPIO_DM9000 | GPIO_IN);
-
-       /* for PCMCIA device */
-       pxa_gpio_mode(GPIO_PCD | GPIO_IN);
-       pxa_gpio_mode(GPIO_PRDY | GPIO_IN);
-
-       /* for I2C adapter */
-       pxa_gpio_mode(GPIO117_I2CSCL_MD);
-       pxa_gpio_mode(GPIO118_I2CSDA_MD);
+       pxa_set_i2c_info(NULL);
+       i2c_register_board_info(0, trizeps4_i2c_devices,
+                                       ARRAY_SIZE(trizeps4_i2c_devices));
 
-       /* MMC_DET s.o. */
-       pxa_gpio_mode(GPIO_MMC_DET | GPIO_IN);
-
-       /* whats that for ??? */
-       pxa_gpio_mode(GPIO79_nCS_3_MD);
-
-#ifdef CONFIG_LEDS
-       pxa_gpio_mode( GPIO_SYS_BUSY_LED  | GPIO_OUT);          /* LED1 */
-       pxa_gpio_mode( GPIO_HEARTBEAT_LED | GPIO_OUT);          /* LED2 */
-#endif
-#ifdef CONFIG_MACH_TRIZEPS4_CONXS
 #ifdef CONFIG_IDE_PXA_CF
        /* if boot direct from compact flash dont disable power */
        trizeps_conxs_bcr = 0x0009;
@@ -478,18 +545,24 @@ static void __init trizeps4_map_io(void)
        /* this is the reset value */
        trizeps_conxs_bcr = 0x00A0;
 #endif
-       ConXS_BCR = trizeps_conxs_bcr;
-#endif
+       BCR_writew(trizeps_conxs_bcr);
+       board_backlight_power(1);
+}
+
+static void __init trizeps4_map_io(void)
+{
+       pxa_map_io();
+       iotable_init(trizeps4_io_desc, ARRAY_SIZE(trizeps4_io_desc));
 
-#warning FIXME - accessing PM registers directly is deprecated
-       PWER  = 0x00000002;
-       PFER  = 0x00000000;
-       PRER  = 0x00000002;
-       PGSR0 = 0x0158C000;
-       PGSR1 = 0x00FF0080;
-       PGSR2 = 0x0001C004;
-       /* Stop 3.6MHz and drive HIGH to PCMCIA and CS */
-       PCFR |= PCFR_OPDE;
+       if ((MSC0 & 0x8) && (BOOT_DEF & 0x1)) {
+               /* if flash is 16 bit wide its a Trizeps4 WL */
+               __machine_arch_type = MACH_TYPE_TRIZEPS4WL;
+               trizeps4_flash_data[0].width = 2;
+       } else {
+               /* if flash is 32 bit wide its a Trizeps4 */
+               __machine_arch_type = MACH_TYPE_TRIZEPS4;
+               trizeps4_flash_data[0].width = 4;
+       }
 }
 
 MACHINE_START(TRIZEPS4, "Keith und Koep Trizeps IV module")
@@ -503,3 +576,13 @@ MACHINE_START(TRIZEPS4, "Keith und Koep Trizeps IV module")
        .timer          = &pxa_timer,
 MACHINE_END
 
+MACHINE_START(TRIZEPS4WL, "Keith und Koep Trizeps IV-WL module")
+       /* MAINTAINER("Jürgen Schindele") */
+       .phys_io        = 0x40000000,
+       .io_pg_offst    = (io_p2v(0x40000000) >> 18) & 0xfffc,
+       .boot_params    = TRIZEPS4_SDRAM_BASE + 0x100,
+       .init_machine   = trizeps4_init,
+       .map_io         = trizeps4_map_io,
+       .init_irq       = pxa27x_init_irq,
+       .timer          = &pxa_timer,
+MACHINE_END
diff --git a/arch/arm/mach-pxa/viper.c b/arch/arm/mach-pxa/viper.c
new file mode 100644 (file)
index 0000000..d7632f6
--- /dev/null
@@ -0,0 +1,951 @@
+/*
+ *  linux/arch/arm/mach-pxa/viper.c
+ *
+ *  Support for the Arcom VIPER SBC.
+ *
+ *  Author:    Ian Campbell
+ *  Created:    Feb 03, 2003
+ *  Copyright:  Arcom Control Systems
+ *
+ *  Maintained by Marc Zyngier <maz@misterjones.org>
+ *                             <marc.zyngier@altran.com>
+ *
+ * Based on lubbock.c:
+ *  Author:    Nicolas Pitre
+ *  Created:   Jun 15, 2001
+ *  Copyright: MontaVista Software Inc.
+ *
+ *  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/types.h>
+#include <linux/memory.h>
+#include <linux/cpu.h>
+#include <linux/cpufreq.h>
+#include <linux/delay.h>
+#include <linux/fs.h>
+#include <linux/init.h>
+#include <linux/interrupt.h>
+#include <linux/major.h>
+#include <linux/module.h>
+#include <linux/pm.h>
+#include <linux/sched.h>
+#include <linux/gpio.h>
+#include <linux/i2c-gpio.h>
+#include <linux/serial_8250.h>
+#include <linux/smc91x.h>
+#include <linux/pwm_backlight.h>
+#include <linux/usb/isp116x.h>
+#include <linux/mtd/mtd.h>
+#include <linux/mtd/partitions.h>
+#include <linux/mtd/physmap.h>
+
+#include <mach/pxa-regs.h>
+#include <mach/pxa2xx-regs.h>
+#include <mach/bitfield.h>
+#include <mach/audio.h>
+#include <mach/pxafb.h>
+#include <mach/mfp-pxa25x.h>
+#include <mach/i2c.h>
+#include <mach/viper.h>
+
+#include <asm/setup.h>
+#include <asm/mach-types.h>
+#include <asm/irq.h>
+#include <asm/sizes.h>
+
+#include <asm/mach/arch.h>
+#include <asm/mach/map.h>
+#include <asm/mach/irq.h>
+
+#include "generic.h"
+#include "devices.h"
+
+static unsigned int icr;
+
+static void viper_icr_set_bit(unsigned int bit)
+{
+       icr |= bit;
+       VIPER_ICR = icr;
+}
+
+static void viper_icr_clear_bit(unsigned int bit)
+{
+       icr &= ~bit;
+       VIPER_ICR = icr;
+}
+
+/* This function is used from the pcmcia module to reset the CF */
+void viper_cf_rst(int state)
+{
+       if (state)
+               viper_icr_set_bit(VIPER_ICR_CF_RST);
+       else
+               viper_icr_clear_bit(VIPER_ICR_CF_RST);
+}
+EXPORT_SYMBOL(viper_cf_rst);
+
+/*
+ * The CPLD version register was not present on VIPER boards prior to
+ * v2i1. On v1 boards where the version register is not present we
+ * will just read back the previous value from the databus.
+ *
+ * Therefore we do two reads. The first time we write 0 to the
+ * (read-only) register before reading and the second time we write
+ * 0xff first. If the two reads do not match or they read back as 0xff
+ * or 0x00 then we have version 1 hardware.
+ */
+static u8 viper_hw_version(void)
+{
+       u8 v1, v2;
+       unsigned long flags;
+
+       local_irq_save(flags);
+
+       VIPER_VERSION = 0;
+       v1 = VIPER_VERSION;
+       VIPER_VERSION = 0xff;
+       v2 = VIPER_VERSION;
+
+       v1 = (v1 != v2 || v1 == 0xff) ? 0 : v1;
+
+       local_irq_restore(flags);
+       return v1;
+}
+
+/* CPU sysdev */
+static int viper_cpu_suspend(struct sys_device *sysdev, pm_message_t state)
+{
+       viper_icr_set_bit(VIPER_ICR_R_DIS);
+       return 0;
+}
+
+static int viper_cpu_resume(struct sys_device *sysdev)
+{
+       viper_icr_clear_bit(VIPER_ICR_R_DIS);
+       return 0;
+}
+
+static struct sysdev_driver viper_cpu_sysdev_driver = {
+       .suspend        = viper_cpu_suspend,
+       .resume         = viper_cpu_resume,
+};
+
+static unsigned int current_voltage_divisor;
+
+/*
+ * If force is not true then step from existing to new divisor. If
+ * force is true then jump straight to the new divisor. Stepping is
+ * used because if the jump in voltage is too large, the VCC can dip
+ * too low and the regulator cuts out.
+ *
+ * force can be used to initialize the divisor to a know state by
+ * setting the value for the current clock speed, since we are already
+ * running at that speed we know the voltage should be pretty close so
+ * the jump won't be too large
+ */
+static void viper_set_core_cpu_voltage(unsigned long khz, int force)
+{
+       int i = 0;
+       unsigned int divisor = 0;
+       const char *v;
+
+       if (khz < 200000) {
+               v = "1.0"; divisor = 0xfff;
+       } else if (khz < 300000) {
+               v = "1.1"; divisor = 0xde5;
+       } else {
+               v = "1.3"; divisor = 0x325;
+       }
+
+       pr_debug("viper: setting CPU core voltage to %sV at %d.%03dMHz\n",
+                v, (int)khz / 1000, (int)khz % 1000);
+
+#define STEP 0x100
+       do {
+               int step;
+
+               if (force)
+                       step = divisor;
+               else if (current_voltage_divisor < divisor - STEP)
+                       step = current_voltage_divisor + STEP;
+               else if (current_voltage_divisor > divisor + STEP)
+                       step = current_voltage_divisor - STEP;
+               else
+                       step = divisor;
+               force = 0;
+
+               gpio_set_value(VIPER_PSU_CLK_GPIO, 0);
+               gpio_set_value(VIPER_PSU_nCS_LD_GPIO, 0);
+
+               for (i = 1 << 11 ; i > 0 ; i >>= 1) {
+                       udelay(1);
+
+                       gpio_set_value(VIPER_PSU_DATA_GPIO, step & i);
+                       udelay(1);
+
+                       gpio_set_value(VIPER_PSU_CLK_GPIO, 1);
+                       udelay(1);
+
+                       gpio_set_value(VIPER_PSU_CLK_GPIO, 0);
+               }
+               udelay(1);
+
+               gpio_set_value(VIPER_PSU_nCS_LD_GPIO, 1);
+               udelay(1);
+
+               gpio_set_value(VIPER_PSU_nCS_LD_GPIO, 0);
+
+               current_voltage_divisor = step;
+       } while (current_voltage_divisor != divisor);
+}
+
+/* Interrupt handling */
+static unsigned long viper_irq_enabled_mask;
+
+static void viper_ack_irq(unsigned int irq)
+{
+       int viper_irq = irq - PXA_ISA_IRQ(0);
+
+       if (viper_irq < 8)
+               VIPER_LO_IRQ_STATUS = 1 << viper_irq;
+       else
+               VIPER_HI_IRQ_STATUS = 1 << (viper_irq - 8);
+}
+
+static void viper_mask_irq(unsigned int irq)
+{
+       viper_irq_enabled_mask &= ~(1 << (irq - PXA_ISA_IRQ(0)));
+}
+
+static void viper_unmask_irq(unsigned int irq)
+{
+       viper_irq_enabled_mask |= (1 << (irq - PXA_ISA_IRQ(0)));
+}
+
+static inline unsigned long viper_irq_pending(void)
+{
+       return (VIPER_HI_IRQ_STATUS << 8 | VIPER_LO_IRQ_STATUS) &
+                       viper_irq_enabled_mask;
+}
+
+static void viper_irq_handler(unsigned int irq, struct irq_desc *desc)
+{
+       unsigned long pending;
+
+       pending = viper_irq_pending();
+       do {
+               if (likely(pending)) {
+                       irq = PXA_ISA_IRQ(0) + __ffs(pending);
+                       generic_handle_irq(irq);
+               }
+               pending = viper_irq_pending();
+       } while (pending);
+}
+
+static struct irq_chip viper_irq_chip = {
+       .name   = "ISA",
+       .ack    = viper_ack_irq,
+       .mask   = viper_mask_irq,
+       .unmask = viper_unmask_irq
+};
+
+static void __init viper_init_irq(void)
+{
+       const int isa_irqs[] = { 3, 4, 5, 6, 7, 10, 11, 12, 9, 14, 15 };
+       int irq;
+       int isa_irq;
+
+       pxa25x_init_irq();
+
+       /* setup ISA IRQs */
+       for (irq = 0; irq < ARRAY_SIZE(isa_irqs); irq++) {
+               isa_irq = isa_irqs[irq];
+               set_irq_chip(isa_irq, &viper_irq_chip);
+               set_irq_handler(isa_irq, handle_edge_irq);
+               set_irq_flags(isa_irq, IRQF_VALID | IRQF_PROBE);
+       }
+
+       set_irq_chained_handler(gpio_to_irq(VIPER_CPLD_GPIO),
+                               viper_irq_handler);
+       set_irq_type(gpio_to_irq(VIPER_CPLD_GPIO), IRQ_TYPE_EDGE_BOTH);
+
+#ifndef CONFIG_SERIAL_PXA
+       /*
+        * 8250 doesn't support IRQ_TYPE being passed as part
+        * of the plat_serial8250_port structure...
+        */
+       set_irq_type(gpio_to_irq(VIPER_UARTA_GPIO), IRQ_TYPE_EDGE_RISING);
+       set_irq_type(gpio_to_irq(VIPER_UARTB_GPIO), IRQ_TYPE_EDGE_RISING);
+#endif
+}
+
+/* Flat Panel */
+static struct pxafb_mode_info fb_mode_info[] = {
+       {
+               .pixclock       = 157500,
+
+               .xres           = 320,
+               .yres           = 240,
+
+               .bpp            = 16,
+
+               .hsync_len      = 63,
+               .left_margin    = 7,
+               .right_margin   = 13,
+
+               .vsync_len      = 20,
+               .upper_margin   = 0,
+               .lower_margin   = 0,
+
+               .sync           = 0,
+       },
+};
+
+static struct pxafb_mach_info fb_info = {
+       .modes                  = fb_mode_info,
+       .num_modes              = 1,
+       .lcd_conn               = LCD_COLOR_TFT_16BPP | LCD_PCLK_EDGE_FALL,
+};
+
+static int viper_backlight_init(struct device *dev)
+{
+       int ret;
+
+       /* GPIO9 and 10 control FB backlight. Initialise to off */
+       ret = gpio_request(VIPER_BCKLIGHT_EN_GPIO, "Backlight");
+       if (ret)
+               goto err_request_bckl;
+
+       ret = gpio_request(VIPER_LCD_EN_GPIO, "LCD");
+       if (ret)
+               goto err_request_lcd;
+
+       ret = gpio_direction_output(VIPER_BCKLIGHT_EN_GPIO, 0);
+       if (ret)
+               goto err_dir;
+
+       ret = gpio_direction_output(VIPER_LCD_EN_GPIO, 0);
+       if (ret)
+               goto err_dir;
+
+       return 0;
+
+err_dir:
+       gpio_free(VIPER_LCD_EN_GPIO);
+err_request_lcd:
+       gpio_free(VIPER_BCKLIGHT_EN_GPIO);
+err_request_bckl:
+       dev_err(dev, "Failed to setup LCD GPIOs\n");
+
+       return ret;
+}
+
+static int viper_backlight_notify(int brightness)
+{
+       gpio_set_value(VIPER_LCD_EN_GPIO, !!brightness);
+       gpio_set_value(VIPER_BCKLIGHT_EN_GPIO, !!brightness);
+
+       return brightness;
+}
+
+static void viper_backlight_exit(struct device *dev)
+{
+       gpio_free(VIPER_LCD_EN_GPIO);
+       gpio_free(VIPER_BCKLIGHT_EN_GPIO);
+}
+
+static struct platform_pwm_backlight_data viper_backlight_data = {
+       .pwm_id         = 0,
+       .max_brightness = 100,
+       .dft_brightness = 100,
+       .pwm_period_ns  = 1000000,
+       .init           = viper_backlight_init,
+       .notify         = viper_backlight_notify,
+       .exit           = viper_backlight_exit,
+};
+
+static struct platform_device viper_backlight_device = {
+       .name           = "pwm-backlight",
+       .dev            = {
+               .parent         = &pxa25x_device_pwm0.dev,
+               .platform_data  = &viper_backlight_data,
+       },
+};
+
+/* Ethernet */
+static struct resource smc91x_resources[] = {
+       [0] = {
+               .name   = "smc91x-regs",
+               .start  = VIPER_ETH_PHYS + 0x300,
+               .end    = VIPER_ETH_PHYS + 0x30f,
+               .flags  = IORESOURCE_MEM,
+       },
+       [1] = {
+               .start  = gpio_to_irq(VIPER_ETH_GPIO),
+               .end    = gpio_to_irq(VIPER_ETH_GPIO),
+               .flags  = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE,
+       },
+       [2] = {
+               .name   = "smc91x-data32",
+               .start  = VIPER_ETH_DATA_PHYS,
+               .end    = VIPER_ETH_DATA_PHYS + 3,
+               .flags  = IORESOURCE_MEM,
+       },
+};
+
+static struct smc91x_platdata viper_smc91x_info = {
+       .flags  = SMC91X_USE_16BIT | SMC91X_NOWAIT,
+       .leda   = RPC_LED_100_10,
+       .ledb   = RPC_LED_TX_RX,
+};
+
+static struct platform_device smc91x_device = {
+       .name           = "smc91x",
+       .id             = -1,
+       .num_resources  = ARRAY_SIZE(smc91x_resources),
+       .resource       = smc91x_resources,
+       .dev            = {
+               .platform_data  = &viper_smc91x_info,
+       },
+};
+
+/* i2c */
+static struct i2c_gpio_platform_data i2c_bus_data = {
+       .sda_pin = VIPER_RTC_I2C_SDA_GPIO,
+       .scl_pin = VIPER_RTC_I2C_SCL_GPIO,
+       .udelay  = 10,
+       .timeout = 100,
+};
+
+static struct platform_device i2c_bus_device = {
+       .name           = "i2c-gpio",
+       .id             = 1, /* pxa2xx-i2c is bus 0, so start at 1 */
+       .dev = {
+               .platform_data = &i2c_bus_data,
+       }
+};
+
+static struct i2c_board_info __initdata viper_i2c_devices[] = {
+       {
+               I2C_BOARD_INFO("ds1338", 0x68),
+       },
+};
+
+/*
+ * Serial configuration:
+ * You can either have the standard PXA ports driven by the PXA driver,
+ * or all the ports (PXA + 16850) driven by the 8250 driver.
+ * Choose your poison.
+ */
+
+static struct resource viper_serial_resources[] = {
+#ifndef CONFIG_SERIAL_PXA
+       {
+               .start  = 0x40100000,
+               .end    = 0x4010001f,
+               .flags  = IORESOURCE_MEM,
+       },
+       {
+               .start  = 0x40200000,
+               .end    = 0x4020001f,
+               .flags  = IORESOURCE_MEM,
+       },
+       {
+               .start  = 0x40700000,
+               .end    = 0x4070001f,
+               .flags  = IORESOURCE_MEM,
+       },
+       {
+               .start  = VIPER_UARTA_PHYS,
+               .end    = VIPER_UARTA_PHYS + 0xf,
+               .flags  = IORESOURCE_MEM,
+       },
+       {
+               .start  = VIPER_UARTB_PHYS,
+               .end    = VIPER_UARTB_PHYS + 0xf,
+               .flags  = IORESOURCE_MEM,
+       },
+#else
+       {
+               0,
+       },
+#endif
+};
+
+static struct plat_serial8250_port serial_platform_data[] = {
+#ifndef CONFIG_SERIAL_PXA
+       /* Internal UARTs */
+       {
+               .membase        = (void *)&FFUART,
+               .mapbase        = __PREG(FFUART),
+               .irq            = IRQ_FFUART,
+               .uartclk        = 921600 * 16,
+               .regshift       = 2,
+               .flags          = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
+               .iotype         = UPIO_MEM,
+       },
+       {
+               .membase        = (void *)&BTUART,
+               .mapbase        = __PREG(BTUART),
+               .irq            = IRQ_BTUART,
+               .uartclk        = 921600 * 16,
+               .regshift       = 2,
+               .flags          = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
+               .iotype         = UPIO_MEM,
+       },
+       {
+               .membase        = (void *)&STUART,
+               .mapbase        = __PREG(STUART),
+               .irq            = IRQ_STUART,
+               .uartclk        = 921600 * 16,
+               .regshift       = 2,
+               .flags          = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
+               .iotype         = UPIO_MEM,
+       },
+       /* External UARTs */
+       {
+               .mapbase        = VIPER_UARTA_PHYS,
+               .irq            = gpio_to_irq(VIPER_UARTA_GPIO),
+               .uartclk        = 1843200,
+               .regshift       = 1,
+               .iotype         = UPIO_MEM,
+               .flags          = UPF_BOOT_AUTOCONF | UPF_IOREMAP |
+                                 UPF_SKIP_TEST,
+       },
+       {
+               .mapbase        = VIPER_UARTB_PHYS,
+               .irq            = gpio_to_irq(VIPER_UARTB_GPIO),
+               .uartclk        = 1843200,
+               .regshift       = 1,
+               .iotype         = UPIO_MEM,
+               .flags          = UPF_BOOT_AUTOCONF | UPF_IOREMAP |
+                                 UPF_SKIP_TEST,
+       },
+#endif
+       { },
+};
+
+static struct platform_device serial_device = {
+       .name                   = "serial8250",
+       .id                     = 0,
+       .dev                    = {
+               .platform_data  = serial_platform_data,
+       },
+       .num_resources          = ARRAY_SIZE(viper_serial_resources),
+       .resource               = viper_serial_resources,
+};
+
+/* USB */
+static void isp116x_delay(struct device *dev, int delay)
+{
+       ndelay(delay);
+}
+
+static struct resource isp116x_resources[] = {
+       [0] = { /* DATA */
+               .start  = VIPER_USB_PHYS + 0,
+               .end    = VIPER_USB_PHYS + 1,
+               .flags  = IORESOURCE_MEM,
+       },
+       [1] = { /* ADDR */
+               .start  = VIPER_USB_PHYS + 2,
+               .end    = VIPER_USB_PHYS + 3,
+               .flags  = IORESOURCE_MEM,
+       },
+       [2] = {
+               .start  = gpio_to_irq(VIPER_USB_GPIO),
+               .end    = gpio_to_irq(VIPER_USB_GPIO),
+               .flags  = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE,
+       },
+};
+
+/* (DataBusWidth16|AnalogOCEnable|DREQOutputPolarity|DownstreamPort15KRSel ) */
+static struct isp116x_platform_data isp116x_platform_data = {
+       /* Enable internal resistors on downstream ports */
+       .sel15Kres              = 1,
+       /* On-chip overcurrent protection */
+       .oc_enable              = 1,
+       /* INT output polarity */
+       .int_act_high           = 1,
+       /* INT edge or level triggered */
+       .int_edge_triggered     = 0,
+
+       /* WAKEUP pin connected - NOT SUPPORTED  */
+       /* .remote_wakeup_connected = 0, */
+       /* Wakeup by devices on usb bus enabled */
+       .remote_wakeup_enable   = 0,
+       .delay                  = isp116x_delay,
+};
+
+static struct platform_device isp116x_device = {
+       .name                   = "isp116x-hcd",
+       .id                     = -1,
+       .num_resources          = ARRAY_SIZE(isp116x_resources),
+       .resource               = isp116x_resources,
+       .dev                    = {
+               .platform_data  = &isp116x_platform_data,
+       },
+
+};
+
+/* MTD */
+static struct resource mtd_resources[] = {
+       [0] = { /* RedBoot config + filesystem flash */
+               .start  = VIPER_FLASH_PHYS,
+               .end    = VIPER_FLASH_PHYS + SZ_32M - 1,
+               .flags  = IORESOURCE_MEM,
+       },
+       [1] = { /* Boot flash */
+               .start  = VIPER_BOOT_PHYS,
+               .end    = VIPER_BOOT_PHYS + SZ_1M - 1,
+               .flags  = IORESOURCE_MEM,
+       },
+       [2] = { /*
+                * SRAM size is actually 256KB, 8bits, with a sparse mapping
+                * (each byte is on a 16bit boundary).
+                */
+               .start  = _VIPER_SRAM_BASE,
+               .end    = _VIPER_SRAM_BASE + SZ_512K - 1,
+               .flags  = IORESOURCE_MEM,
+       },
+};
+
+static struct mtd_partition viper_boot_flash_partition = {
+       .name           = "RedBoot",
+       .size           = SZ_1M,
+       .offset         = 0,
+       .mask_flags     = MTD_WRITEABLE,        /* force R/O */
+};
+
+static struct physmap_flash_data viper_flash_data[] = {
+       [0] = {
+               .width          = 2,
+               .parts          = NULL,
+               .nr_parts       = 0,
+       },
+       [1] = {
+               .width          = 2,
+               .parts          = &viper_boot_flash_partition,
+               .nr_parts       = 1,
+       },
+};
+
+static struct platform_device viper_mtd_devices[] = {
+       [0] = {
+               .name           = "physmap-flash",
+               .id             = 0,
+               .dev            = {
+                       .platform_data  = &viper_flash_data[0],
+               },
+               .resource       = &mtd_resources[0],
+               .num_resources  = 1,
+       },
+       [1] = {
+               .name           = "physmap-flash",
+               .id             = 1,
+               .dev            = {
+                       .platform_data  = &viper_flash_data[1],
+               },
+               .resource       = &mtd_resources[1],
+               .num_resources  = 1,
+       },
+};
+
+static struct platform_device *viper_devs[] __initdata = {
+       &smc91x_device,
+       &i2c_bus_device,
+       &serial_device,
+       &isp116x_device,
+       &viper_mtd_devices[0],
+       &viper_mtd_devices[1],
+       &viper_backlight_device,
+};
+
+static mfp_cfg_t viper_pin_config[] __initdata = {
+       /* Chip selects */
+       GPIO15_nCS_1,
+       GPIO78_nCS_2,
+       GPIO79_nCS_3,
+       GPIO80_nCS_4,
+       GPIO33_nCS_5,
+
+       /* FP Backlight */
+       GPIO9_GPIO,                             /* VIPER_BCKLIGHT_EN_GPIO */
+       GPIO10_GPIO,                            /* VIPER_LCD_EN_GPIO */
+       GPIO16_PWM0_OUT,
+
+       /* Ethernet PHY Ready */
+       GPIO18_RDY,
+
+       /* Serial shutdown */
+       GPIO12_GPIO | MFP_LPM_DRIVE_HIGH,       /* VIPER_UART_SHDN_GPIO */
+
+       /* Compact-Flash / PC104 */
+       GPIO48_nPOE,
+       GPIO49_nPWE,
+       GPIO50_nPIOR,
+       GPIO51_nPIOW,
+       GPIO52_nPCE_1,
+       GPIO53_nPCE_2,
+       GPIO54_nPSKTSEL,
+       GPIO55_nPREG,
+       GPIO56_nPWAIT,
+       GPIO57_nIOIS16,
+       GPIO8_GPIO,                             /* VIPER_CF_RDY_GPIO */
+       GPIO32_GPIO,                            /* VIPER_CF_CD_GPIO */
+       GPIO82_GPIO,                            /* VIPER_CF_POWER_GPIO */
+
+       /* Integrated UPS control */
+       GPIO20_GPIO,                            /* VIPER_UPS_GPIO */
+
+       /* Vcc regulator control */
+       GPIO6_GPIO,                             /* VIPER_PSU_DATA_GPIO */
+       GPIO11_GPIO,                            /* VIPER_PSU_CLK_GPIO */
+       GPIO19_GPIO,                            /* VIPER_PSU_nCS_LD_GPIO */
+
+       /* i2c busses */
+       GPIO26_GPIO,                            /* VIPER_TPM_I2C_SDA_GPIO */
+       GPIO27_GPIO,                            /* VIPER_TPM_I2C_SCL_GPIO */
+       GPIO83_GPIO,                            /* VIPER_RTC_I2C_SDA_GPIO */
+       GPIO84_GPIO,                            /* VIPER_RTC_I2C_SCL_GPIO */
+
+       /* PC/104 Interrupt */
+       GPIO1_GPIO | WAKEUP_ON_EDGE_RISE,       /* VIPER_CPLD_GPIO */
+};
+
+static unsigned long viper_tpm;
+
+static int __init viper_tpm_setup(char *str)
+{
+       strict_strtoul(str, 10, &viper_tpm);
+       return 1;
+}
+
+__setup("tpm=", viper_tpm_setup);
+
+static void __init viper_tpm_init(void)
+{
+       struct platform_device *tpm_device;
+       struct i2c_gpio_platform_data i2c_tpm_data = {
+               .sda_pin = VIPER_TPM_I2C_SDA_GPIO,
+               .scl_pin = VIPER_TPM_I2C_SCL_GPIO,
+               .udelay  = 10,
+               .timeout = 100,
+       };
+       char *errstr;
+
+       /* Allocate TPM i2c bus if requested */
+       if (!viper_tpm)
+               return;
+
+       tpm_device = platform_device_alloc("i2c-gpio", 2);
+       if (tpm_device) {
+               if (!platform_device_add_data(tpm_device,
+                                             &i2c_tpm_data,
+                                             sizeof(i2c_tpm_data))) {
+                       if (platform_device_add(tpm_device)) {
+                               errstr = "register TPM i2c bus";
+                               goto error_free_tpm;
+                       }
+               } else {
+                       errstr = "allocate TPM i2c bus data";
+                       goto error_free_tpm;
+               }
+       } else {
+               errstr = "allocate TPM i2c device";
+               goto error_tpm;
+       }
+
+       return;
+
+error_free_tpm:
+       kfree(tpm_device);
+error_tpm:
+       pr_err("viper: Couldn't %s, giving up\n", errstr);
+}
+
+static void __init viper_init_vcore_gpios(void)
+{
+       if (gpio_request(VIPER_PSU_DATA_GPIO, "PSU data"))
+               goto err_request_data;
+
+       if (gpio_request(VIPER_PSU_CLK_GPIO, "PSU clock"))
+               goto err_request_clk;
+
+       if (gpio_request(VIPER_PSU_nCS_LD_GPIO, "PSU cs"))
+               goto err_request_cs;
+
+       if (gpio_direction_output(VIPER_PSU_DATA_GPIO, 0) ||
+           gpio_direction_output(VIPER_PSU_CLK_GPIO, 0) ||
+           gpio_direction_output(VIPER_PSU_nCS_LD_GPIO, 0))
+               goto err_dir;
+
+       /* c/should assume redboot set the correct level ??? */
+       viper_set_core_cpu_voltage(get_clk_frequency_khz(0), 1);
+
+       return;
+
+err_dir:
+       gpio_free(VIPER_PSU_nCS_LD_GPIO);
+err_request_cs:
+       gpio_free(VIPER_PSU_CLK_GPIO);
+err_request_clk:
+       gpio_free(VIPER_PSU_DATA_GPIO);
+err_request_data:
+       pr_err("viper: Failed to setup vcore control GPIOs\n");
+}
+
+static void __init viper_init_serial_gpio(void)
+{
+       if (gpio_request(VIPER_UART_SHDN_GPIO, "UARTs shutdown"))
+               goto err_request;
+
+       if (gpio_direction_output(VIPER_UART_SHDN_GPIO, 0))
+               goto err_dir;
+
+       return;
+
+err_dir:
+       gpio_free(VIPER_UART_SHDN_GPIO);
+err_request:
+       pr_err("viper: Failed to setup UART shutdown GPIO\n");
+}
+
+#ifdef CONFIG_CPU_FREQ
+static int viper_cpufreq_notifier(struct notifier_block *nb,
+                                 unsigned long val, void *data)
+{
+       struct cpufreq_freqs *freq = data;
+
+       /* TODO: Adjust timings??? */
+
+       switch (val) {
+       case CPUFREQ_PRECHANGE:
+               if (freq->old < freq->new) {
+                       /* we are getting faster so raise the voltage
+                        * before we change freq */
+                       viper_set_core_cpu_voltage(freq->new, 0);
+               }
+               break;
+       case CPUFREQ_POSTCHANGE:
+               if (freq->old > freq->new) {
+                       /* we are slowing down so drop the power
+                        * after we change freq */
+                       viper_set_core_cpu_voltage(freq->new, 0);
+               }
+               break;
+       case CPUFREQ_RESUMECHANGE:
+               viper_set_core_cpu_voltage(freq->new, 0);
+               break;
+       default:
+               /* ignore */
+               break;
+       }
+
+       return 0;
+}
+
+static struct notifier_block viper_cpufreq_notifier_block = {
+       .notifier_call  = viper_cpufreq_notifier
+};
+
+static void __init viper_init_cpufreq(void)
+{
+       if (cpufreq_register_notifier(&viper_cpufreq_notifier_block,
+                                     CPUFREQ_TRANSITION_NOTIFIER))
+               pr_err("viper: Failed to setup cpufreq notifier\n");
+}
+#else
+static inline void viper_init_cpufreq(void) {}
+#endif
+
+static void viper_power_off(void)
+{
+       pr_notice("Shutting off UPS\n");
+       gpio_set_value(VIPER_UPS_GPIO, 1);
+       /* Spin to death... */
+       while (1);
+}
+
+static void __init viper_init(void)
+{
+       u8 version;
+
+       pm_power_off = viper_power_off;
+
+       pxa2xx_mfp_config(ARRAY_AND_SIZE(viper_pin_config));
+
+       /* Wake-up serial console */
+       viper_init_serial_gpio();
+
+       set_pxa_fb_info(&fb_info);
+
+       /* v1 hardware cannot use the datacs line */
+       version = viper_hw_version();
+       if (version == 0)
+               smc91x_device.num_resources--;
+
+       pxa_set_i2c_info(NULL);
+       platform_add_devices(viper_devs, ARRAY_SIZE(viper_devs));
+
+       viper_init_vcore_gpios();
+       viper_init_cpufreq();
+
+       sysdev_driver_register(&cpu_sysdev_class, &viper_cpu_sysdev_driver);
+
+       if (version) {
+               pr_info("viper: hardware v%di%d detected. "
+                       "CPLD revision %d.\n",
+                       VIPER_BOARD_VERSION(version),
+                       VIPER_BOARD_ISSUE(version),
+                       VIPER_CPLD_REVISION(version));
+               system_rev = (VIPER_BOARD_VERSION(version) << 8) |
+                            (VIPER_BOARD_ISSUE(version) << 4) |
+                            VIPER_CPLD_REVISION(version);
+       } else {
+               pr_info("viper: No version register.\n");
+       }
+
+       i2c_register_board_info(1, ARRAY_AND_SIZE(viper_i2c_devices));
+
+       viper_tpm_init();
+       pxa_set_ac97_info(NULL);
+}
+
+static struct map_desc viper_io_desc[] __initdata = {
+       {
+               .virtual = VIPER_CPLD_BASE,
+               .pfn     = __phys_to_pfn(VIPER_CPLD_PHYS),
+               .length  = 0x00300000,
+               .type    = MT_DEVICE,
+       },
+       {
+               .virtual = VIPER_PC104IO_BASE,
+               .pfn     = __phys_to_pfn(_PCMCIA1IO),
+               .length  = 0x00800000,
+               .type    = MT_DEVICE,
+       },
+};
+
+static void __init viper_map_io(void)
+{
+       pxa_map_io();
+
+       iotable_init(viper_io_desc, ARRAY_SIZE(viper_io_desc));
+
+       PCFR |= PCFR_OPDE;
+}
+
+MACHINE_START(VIPER, "Arcom/Eurotech VIPER SBC")
+       /* Maintainer: Marc Zyngier <maz@misterjones.org> */
+       .phys_io        = 0x40000000,
+       .io_pg_offst    = (io_p2v(0x40000000) >> 18) & 0xfffc,
+       .boot_params    = 0xa0000100,
+       .map_io         = viper_map_io,
+       .init_irq       = viper_init_irq,
+       .timer          = &pxa_timer,
+       .init_machine   = viper_init,
+MACHINE_END
index 0cb65b5772fe8eb0045a8b2b0686477df6e9b511..8138044334668849506b15e299a4952b85c84901 100644 (file)
@@ -29,6 +29,7 @@
 #include <mach/pxafb.h>
 #include <mach/zylonite.h>
 #include <mach/mmc.h>
+#include <mach/ohci.h>
 #include <mach/pxa27x_keypad.h>
 #include <mach/pxa3xx_nand.h>
 
@@ -423,6 +424,21 @@ static void __init zylonite_init_nand(void)
 static inline void zylonite_init_nand(void) {}
 #endif /* CONFIG_MTD_NAND_PXA3xx || CONFIG_MTD_NAND_PXA3xx_MODULE */
 
+#if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)
+static struct pxaohci_platform_data zylonite_ohci_info = {
+       .port_mode      = PMM_PERPORT_MODE,
+       .flags          = ENABLE_PORT1 | ENABLE_PORT2 |
+                         POWER_CONTROL_LOW | POWER_SENSE_LOW,
+};
+
+static void __init zylonite_init_ohci(void)
+{
+       pxa_set_ohci_info(&zylonite_ohci_info);
+}
+#else
+static inline void zylonite_init_ohci(void) {}
+#endif /* CONFIG_USB_OHCI_HCD || CONFIG_USB_OHCI_HCD_MODULE */
+
 static void __init zylonite_init(void)
 {
        /* board-processor specific initialization */
@@ -443,6 +459,7 @@ static void __init zylonite_init(void)
        zylonite_init_keypad();
        zylonite_init_nand();
        zylonite_init_leds();
+       zylonite_init_ohci();
 }
 
 MACHINE_START(ZYLONITE, "PXA3xx Platform Development Kit (aka Zylonite)")
index 095f5c648236666467b983b894ae3a1d8771a562..46538885a58aad46e5a2d0543d582971eee89cf1 100644 (file)
@@ -73,6 +73,12 @@ static mfp_cfg_t common_mfp_cfg[] __initdata = {
        GPIO27_AC97_SDATA_OUT,
        GPIO28_AC97_SYNC,
 
+       /* SSP3 */
+       GPIO91_SSP3_SCLK,
+       GPIO92_SSP3_FRM,
+       GPIO93_SSP3_TXD,
+       GPIO94_SSP3_RXD,
+
        /* WM9713 IRQ */
        GPIO26_GPIO,
 
@@ -113,6 +119,10 @@ static mfp_cfg_t common_mfp_cfg[] __initdata = {
        GPIO13_MMC2_CLK,
        GPIO14_MMC2_CMD,
 
+       /* USB Host */
+       GPIO0_2_USBH_PEN,
+       GPIO1_2_USBH_PWR,
+
        /* Standard I2C */
        GPIO21_I2C_SCL,
        GPIO22_I2C_SDA,
@@ -209,7 +219,7 @@ static struct pca953x_platform_data gpio_exp[] = {
        },
 };
 
-struct i2c_board_info zylonite_i2c_board_info[] = {
+static struct i2c_board_info zylonite_i2c_board_info[] = {
        {
                .type           = "pca9539",
                .addr           = 0x74,
index 9879d7da2df52cbf47ccfbed67bf54702fbdaa77..0f244744daaeb3c7e776a0abb27c325f664e2ef9 100644 (file)
@@ -69,6 +69,12 @@ static mfp_cfg_t mfp_cfg[] __initdata = {
        GPIO39_AC97_BITCLK,
        GPIO40_AC97_nACRESET,
 
+       /* SSP3 */
+       GPIO89_SSP3_SCLK,
+       GPIO90_SSP3_FRM,
+       GPIO91_SSP3_TXD,
+       GPIO92_SSP3_RXD,
+
        /* WM9713 IRQ */
        GPIO15_GPIO,
 
@@ -117,6 +123,10 @@ static mfp_cfg_t mfp_cfg[] __initdata = {
        GPIO28_MMC2_CLK,
        GPIO29_MMC2_CMD,
 
+       /* USB Host */
+       GPIO2_2_USBH_PEN,
+       GPIO3_2_USBH_PWR,
+
        /* Debug LEDs */
        GPIO1_2_GPIO | MFP_LPM_DRIVE_HIGH,
        GPIO4_2_GPIO | MFP_LPM_DRIVE_HIGH,
index 4f9c84ab781c35ecf74fe5022ea5e1555fae4a80..2f04d54711e7b86ad204a0916ba012e5234d91fd 100644 (file)
 #include <linux/amba/clcd.h>
 #include <linux/clocksource.h>
 #include <linux/clockchips.h>
+#include <linux/io.h>
 
 #include <asm/system.h>
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/leds.h>
 #include <asm/hardware/arm_timer.h>
index 33dbbb41a6638b23c141fb4598c7b1a59bf0004f..3cea92c70d8f1df407e3b7f10da4d0470ab5ee0d 100644 (file)
@@ -23,9 +23,9 @@
 #define __ASM_ARCH_REALVIEW_H
 
 #include <linux/amba/bus.h>
+#include <linux/io.h>
 
 #include <asm/leds.h>
-#include <asm/io.h>
 
 #define AMBA_DEVICE(name,busid,base,plat)                      \
 static struct amba_device name##_device = {                    \
index 4d3c8f3f80537d99888f77660e9c7b32d7408743..a2f61c78adbf26cadb3ce184c4eb927edba53b32 100644 (file)
@@ -21,8 +21,8 @@
 #ifndef __ASM_ARCH_SYSTEM_H
 #define __ASM_ARCH_SYSTEM_H
 
+#include <linux/io.h>
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <mach/platform.h>
 
 static inline void arch_idle(void)
index 82fa1f26e026299d4c75c3365aeff9441c9955c9..44d178cd573342b5cc3578353c18b724e9b4f1e8 100644 (file)
 #include <linux/percpu.h>
 #include <linux/clockchips.h>
 #include <linux/irq.h>
+#include <linux/io.h>
 
 #include <asm/hardware/arm_twd.h>
 #include <asm/hardware/gic.h>
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 
 static DEFINE_PER_CPU(struct clock_event_device, local_clockevent);
index 1907d22f4fed55f069320c43b8624f72bb54d149..e102aeb0f76e8d6abdd69e8458b12a11d597a3ce 100644 (file)
 #include <linux/delay.h>
 #include <linux/device.h>
 #include <linux/smp.h>
+#include <linux/io.h>
 
 #include <asm/cacheflush.h>
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/mach-types.h>
 
 #include <mach/board-eb.h>
index 19a9968fc5b9bc5671035e71557e7aa324370ccf..eb829eb1ebe29dceb394952205fae68e52575c47 100644 (file)
@@ -23,9 +23,9 @@
 #include <linux/platform_device.h>
 #include <linux/sysdev.h>
 #include <linux/amba/bus.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/leds.h>
 #include <asm/mach-types.h>
index 0986cbd1594358cdfe5679c0bec93481d17c6d53..cccdb3eb90fe94e0a41ffb6e30171759a6a3fe53 100644 (file)
@@ -23,9 +23,9 @@
 #include <linux/platform_device.h>
 #include <linux/sysdev.h>
 #include <linux/amba/bus.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/leds.h>
 #include <asm/mach-types.h>
index f4e7135e3eb581d80a9f393074e16e39157e4761..8b863148ec18b2b55f3571aa713d3bb787630ed5 100644 (file)
@@ -23,9 +23,9 @@
 #include <linux/platform_device.h>
 #include <linux/sysdev.h>
 #include <linux/amba/bus.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/leds.h>
 #include <asm/mach-types.h>
index 4b19fe48419086c35584616b3af78459180d9500..7958a30f8932a5a418149ccd857f805b1f56af47 100644 (file)
 #include <linux/init.h>
 #include <linux/interrupt.h>
 #include <linux/dma-mapping.h>
+#include <linux/io.h>
 
 #include <asm/page.h>
 #include <asm/dma.h>
 #include <asm/fiq.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <mach/hardware.h>
 #include <asm/uaccess.h>
index 05425d558ee794518be2bc4508fd48fd20c59d84..9bf7e43e286337f8847a59c79c96303a022d9f45 100644 (file)
 #define FLUSH_BASE_PHYS                0x00000000
 #define FLUSH_BASE             0xdf000000
 
+/*
+ * Sparsemem support.  Each section is a maximum of 64MB.  The sections
+ * are offset by 128MB and can cover 128MB, so that gives us a maximum
+ * of 29 physmem bits.
+ */
+#define MAX_PHYSMEM_BITS       29
+#define SECTION_SIZE_BITS      26
+
 #endif
index 54d6e3f2d3193133616eb3b547a6647ecafb5a82..bd7268ba17e2345dc0cba728523f063810bff637 100644 (file)
@@ -7,9 +7,9 @@
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  */
+#include <linux/io.h>
 #include <mach/hardware.h>
 #include <asm/hardware/iomd.h>
-#include <asm/io.h>
 
 static inline void arch_idle(void)
 {
index baa9c866d7bf6cb137e7b249b84dcdabb88fa872..d5862368c4f20853a8b333d8ca1ab68bf2771ac0 100644 (file)
@@ -9,8 +9,8 @@
  */
 #define VIDMEM ((char *)SCREEN_START)
  
+#include <linux/io.h>
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/setup.h>
 #include <asm/page.h>
 
index 7a029621db433a8199a9ccb33513057aa4566505..9dd15d679c5dd8b1833aae625a7a3fd218870364 100644 (file)
@@ -1,10 +1,10 @@
 #include <linux/init.h>
 #include <linux/list.h>
+#include <linux/io.h>
 
 #include <asm/mach/irq.h>
 #include <asm/hardware/iomd.h>
 #include <asm/irq.h>
-#include <asm/io.h>
 
 static void iomd_ack_irq_a(unsigned int irq)
 {
index ce8470fea8873c4dd14fc262479779ff08b01a31..e88d417736af1225cdadca8825ff43e000958712 100644 (file)
@@ -18,9 +18,9 @@
 #include <linux/device.h>
 #include <linux/serial_8250.h>
 #include <linux/ata_platform.h>
+#include <linux/io.h>
 
 #include <asm/elf.h>
-#include <asm/io.h>
 #include <asm/mach-types.h>
 #include <mach/hardware.h>
 #include <asm/page.h>
index 148d0ddef3e87843134200e39d74fc6208f23619..7a7ed4174c8c8c3f65608c206b37974a4c87dbe4 100644 (file)
 #include <linux/module.h>
 #include <linux/interrupt.h>
 #include <linux/ioport.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
 #include <asm/irq.h>
-#include <asm/io.h>
 
 #include <mach/regs-gpio.h>
 
index c66021b5fa4d055a76ce2a7c5afb7960d0964a98..75738000272be89f69c3e4fd8b6c725a97e0644f 100644 (file)
 #include <linux/module.h>
 #include <linux/ioport.h>
 #include <linux/sysdev.h>
+#include <linux/io.h>
 
 #include <asm/mach-types.h>
 
 #include <mach/hardware.h>
 #include <asm/irq.h>
-#include <asm/io.h>
 
 #include <asm/mach/irq.h>
 
@@ -130,8 +130,7 @@ bast_irq_pc104_demux(unsigned int irq,
                for (i = 0; stat != 0; i++, stat >>= 1) {
                        if (stat & 1) {
                                irqno = bast_pc104_irqs[i];
-                               desc = irq_desc + irqno;
-                               desc_handle_irq(irqno, desc);
+                               generic_handle_irq(irqno);
                        }
                }
        }
index 1322851d1acb031bd441e2f4a433de6d68dad8db..fef646c36b540600576e83f4e982e2983302099b 100644 (file)
 #include <linux/mutex.h>
 #include <linux/delay.h>
 #include <linux/serial_core.h>
+#include <linux/io.h>
 
 #include <asm/mach/map.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 
 #include <asm/plat-s3c/regs-serial.h>
 #include <mach/regs-clock.h>
index c6eefb1d590c3028022bcecbf378cb0b3244f35f..36a3132f39e72367d7a372c0c11d642bc57b4e3f 100644 (file)
 #include <linux/module.h>
 #include <linux/interrupt.h>
 #include <linux/ioport.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
 #include <asm/irq.h>
-#include <asm/io.h>
 
 #include <mach/regs-gpio.h>
 
index ec2defebf0d51c63909e799ccf75fb85f7bb6086..43535a0e718699ca063b648ce37443fd68e6d5aa 100644 (file)
@@ -11,7 +11,7 @@
 */
 
 #include <mach/hardware.h>
-#include <asm/io.h>
+#include <linux/io.h>
 
 #include <asm/plat-s3c/regs-watchdog.h>
 #include <mach/regs-clock.h>
index e9f676bc01167c233e7c82688baf2a745519c4d8..a8cbca6701e54faf00e940b5db0c1ed1fbc8fd21 100644 (file)
@@ -10,8 +10,8 @@
  * published by the Free Software Foundation.
 */
 
+#include <linux/io.h>
 #include <mach/hardware.h>
-#include <asm/io.h>
 
 #include <mach/map.h>
 #include <mach/idle.h>
index f0de3c23ce782e2ac024880ebff29dd33a43cacc..527f88a288ec4ea094ffb4dc63e2a27e5c606b46 100644 (file)
@@ -36,6 +36,7 @@
 #include <linux/platform_device.h>
 #include <linux/proc_fs.h>
 #include <linux/serial_core.h>
+#include <linux/io.h>
 
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
@@ -43,7 +44,6 @@
 #include <asm/mach/flash.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 #include <mach/fb.h>
index 24c6334fac89f05118f2c7969a84921b0abb3c50..e4368e6e7e6c9ac6b70c735c770bb747b2f65b2b 100644 (file)
@@ -22,6 +22,7 @@
 #include <linux/dm9000.h>
 #include <linux/ata_platform.h>
 #include <linux/i2c.h>
+#include <linux/io.h>
 
 #include <net/ax88796.h>
 
@@ -34,7 +35,6 @@
 #include <mach/bast-cpld.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
index e35933a46d10690c1f8da015fdaba208bca2ea55..85e710f2863b37ec9a3edf21df100741f96c1f4a 100644 (file)
 #include <linux/sysdev.h>
 #include <linux/serial_core.h>
 #include <linux/platform_device.h>
+#include <linux/io.h>
 
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
index 80fe2ed0775c86513141af4ed8d2a5d953809beb..3ece2d04934e20ce90ec6c2b4ac7bc67846e03fa 100644 (file)
@@ -25,9 +25,9 @@
 #include <linux/platform_device.h>
 #include <linux/serial_core.h>
 #include <linux/timer.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
index 606ee15911b6e5d1cb20bff427fb19e58108e17c..c4dfe3eabe1d87a21e0bc741284a707e0495b031 100644 (file)
@@ -17,6 +17,7 @@
 #include <linux/init.h>
 #include <linux/serial_core.h>
 #include <linux/platform_device.h>
+#include <linux/io.h>
 
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
@@ -25,7 +26,6 @@
 #include <mach/otom-map.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
index 7d34844debded6fbc865b77bbb463a0d147b74dd..97c13192315ba8ae60140250e7648ab8b66ef0be 100644 (file)
@@ -32,7 +32,7 @@
 #include <linux/serial_core.h>
 #include <linux/spi/spi.h>
 #include <linux/spi/spi_bitbang.h>
-
+#include <linux/io.h>
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/nand.h>
 #include <linux/mtd/nand_ecc.h>
@@ -43,7 +43,6 @@
 #include <asm/mach/irq.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
index b88939d72282bfb6ed53ea89d397de096ef94e8d..d49e58acb03b033eaaacaf15accb8bd75c88ee14 100644 (file)
 #include <linux/init.h>
 #include <linux/serial_core.h>
 #include <linux/platform_device.h>
+#include <linux/io.h>
 
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
index ec87306a8c247b406dd74f7196eb06f5826cfa60..cc2e79fe4f9f6a3e7abca47fccd91f8ae6c6c4cb 100644 (file)
@@ -33,6 +33,7 @@
 #include <linux/device.h>
 #include <linux/platform_device.h>
 #include <linux/serial_core.h>
+#include <linux/io.h>
 
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
@@ -40,7 +41,6 @@
 #include <asm/mach/flash.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
index fbc0213d5485eb8cc9ce32f328a9647d639f82ec..ed3acb05c8553253a1598ef52c50c5907cb043a7 100644 (file)
@@ -25,6 +25,7 @@
 #include <linux/tty.h>
 #include <linux/serial_8250.h>
 #include <linux/serial_reg.h>
+#include <linux/io.h>
 
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
@@ -36,7 +37,6 @@
 #include <mach/vr1000-cpld.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
index ba43ff9e81646616acac13ce2de1e5a9d48e9414..733f8a22777536c43339cf9cb2d3ae2b0ccf42c9 100644 (file)
@@ -25,9 +25,9 @@
 #include <linux/errno.h>
 #include <linux/time.h>
 #include <linux/sysdev.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 
 #include <asm/mach-types.h>
 
index 5d977f9c88acf3cb462df6bdd0cac4bf3899653c..b1e658c917a07840171c85601a120a420bb0a941 100644 (file)
 #include <linux/sysdev.h>
 #include <linux/serial_core.h>
 #include <linux/platform_device.h>
+#include <linux/io.h>
 
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 
 #include <mach/regs-clock.h>
index 4dacf8a1750d3dd45acc503263b3ef1fa90f8efc..eb6fc0bfd47ecd8f1e28f7b4e49fc0d31dedcb86 100644 (file)
@@ -21,6 +21,7 @@
 #include <linux/timer.h>
 #include <linux/init.h>
 #include <linux/device.h>
+#include <linux/io.h>
 
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
@@ -32,7 +33,6 @@
 #include <mach/regs-gpio.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 
 #include <asm/plat-s3c24xx/devs.h>
index af4b2ce516f99777340f5fe70afd91692bac6a93..5fbaac6054f8a0ce3fb9f94163308a42074f9d4a 100644 (file)
 #include <linux/mutex.h>
 #include <linux/delay.h>
 #include <linux/serial_core.h>
+#include <linux/io.h>
 
 #include <asm/mach/map.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 
 #include <asm/plat-s3c/regs-serial.h>
 #include <mach/regs-clock.h>
index 22fc04a3b5339b4ffa9a06fb5820395663250697..dcfff6b8b95854c173211b70d2babfb740cc75ea 100644 (file)
 #include <linux/init.h>
 #include <linux/sysdev.h>
 #include <linux/serial_core.h>
+#include <linux/io.h>
 
 #include <asm/dma.h>
 #include <mach/dma.h>
-#include <asm/io.h>
 
 #include <asm/plat-s3c24xx/dma.h>
 #include <asm/plat-s3c24xx/cpu.h>
index ac62b79044f4a06b83a2ad115942c2dd54ed04d6..41720f2c1fea8eb3d1ccb52ac181a4540c76061d 100644 (file)
 #include <linux/interrupt.h>
 #include <linux/ioport.h>
 #include <linux/sysdev.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
 #include <asm/irq.h>
-#include <asm/io.h>
 
 #include <asm/mach/irq.h>
 
@@ -123,10 +123,10 @@ static void s3c2412_irq_demux_cfsdi(unsigned int irq, struct irq_desc *desc)
        subsrc  &= ~submsk;
 
        if (subsrc & INTBIT(IRQ_S3C2412_SDI))
-               desc_handle_irq(IRQ_S3C2412_SDI, irq_desc + IRQ_S3C2412_SDI);
+               generic_handle_irq(IRQ_S3C2412_SDI);
 
        if (subsrc & INTBIT(IRQ_S3C2412_CF))
-               desc_handle_irq(IRQ_S3C2412_CF, irq_desc + IRQ_S3C2412_CF);
+               generic_handle_irq(IRQ_S3C2412_CF);
 }
 
 #define INTMSK_CFSDI   (1UL << (IRQ_S3C2412_CFSDI - IRQ_EINT0))
index 80affb1ee4cd4c07471a29396dbed844b5c1fbe8..8f8d9117b968d0d77635da2e4a563783c001d5dc 100644 (file)
@@ -19,6 +19,7 @@
 #include <linux/init.h>
 #include <linux/serial_core.h>
 #include <linux/platform_device.h>
+#include <linux/io.h>
 
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
@@ -27,7 +28,6 @@
 #include <mach/hardware.h>
 #include <asm/hardware/iomd.h>
 #include <asm/setup.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
index 7a08b37899150d736d22d214b629ab6083b7e7cc..bb9bf63b2e02d0564fffbbe2cf86a15cb52ee60f 100644 (file)
@@ -17,7 +17,7 @@
 #include <linux/init.h>
 #include <linux/serial_core.h>
 #include <linux/platform_device.h>
-
+#include <linux/io.h>
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/nand.h>
 #include <linux/mtd/nand_ecc.h>
@@ -29,7 +29,6 @@
 
 #include <mach/hardware.h>
 #include <asm/setup.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
index 737523a4e037dba09ab6bebb6f2116c7b823158b..9540ef752f73c2da727a7b74b096981d4b450031 100644 (file)
@@ -18,9 +18,9 @@
 #include <linux/init.h>
 #include <linux/sysdev.h>
 #include <linux/platform_device.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 
 #include <mach/regs-power.h>
index d278010b9f60ffdbf5250e4a1dbf79665dd4ffb8..42440fc5568192e225a8a5aa46b8d7e6c260251a 100644 (file)
@@ -20,6 +20,7 @@
 #include <linux/sysdev.h>
 #include <linux/serial_core.h>
 #include <linux/platform_device.h>
+#include <linux/io.h>
 
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
@@ -27,7 +28,6 @@
 
 #include <mach/hardware.h>
 #include <asm/proc-fns.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 
 #include <mach/reset.h>
index 95567e6daea122be7af71b81624249e4750e576e..40503a65bacfffa51b5199a14eac13868f31ef9e 100644 (file)
 #include <linux/ioport.h>
 #include <linux/mutex.h>
 #include <linux/clk.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
 #include <asm/atomic.h>
 #include <asm/irq.h>
-#include <asm/io.h>
 
 #include <mach/regs-clock.h>
 
index c0c67438d0a432c72197477cf4d35b3eaacea4b5..4f7d06baf0d377a7c1427820c413c6cb574dc6e0 100644 (file)
 #include <linux/interrupt.h>
 #include <linux/init.h>
 #include <linux/module.h>
+#include <linux/io.h>
 
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 
 #include <mach/regs-gpio.h>
index 276b823f4e27f0130b3a141ec16f8e603fe46932..33e3ede0a2b32d3623c31ec06390b29e51c5b99c 100644 (file)
 #include <linux/interrupt.h>
 #include <linux/ioport.h>
 #include <linux/sysdev.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
 #include <asm/irq.h>
-#include <asm/io.h>
 
 #include <asm/mach/irq.h>
 
@@ -44,7 +44,6 @@ static void s3c_irq_demux_wdtac97(unsigned int irq,
                                  struct irq_desc *desc)
 {
        unsigned int subsrc, submsk;
-       struct irq_desc *mydesc;
 
        /* read the current pending interrupts, and the mask
         * for what it is available */
@@ -58,12 +57,10 @@ static void s3c_irq_demux_wdtac97(unsigned int irq,
 
        if (subsrc != 0) {
                if (subsrc & 1) {
-                       mydesc = irq_desc + IRQ_S3C2440_WDT;
-                       desc_handle_irq(IRQ_S3C2440_WDT, mydesc);
+                       generic_handle_irq(IRQ_S3C2440_WDT);
                }
                if (subsrc & 2) {
-                       mydesc = irq_desc + IRQ_S3C2440_AC97;
-                       desc_handle_irq(IRQ_S3C2440_AC97, mydesc);
+                       generic_handle_irq(IRQ_S3C2440_AC97);
                }
        }
 }
index 441f4bc094729a8a04d82cdf699a74007dec7163..19eb0e5269ac3bf7e458563a1fe92ae2decd3c02 100644 (file)
@@ -19,7 +19,7 @@
 #include <linux/platform_device.h>
 #include <linux/ata_platform.h>
 #include <linux/i2c.h>
-
+#include <linux/io.h>
 #include <linux/sm501.h>
 #include <linux/sm501-regs.h>
 
@@ -32,7 +32,6 @@
 #include <mach/anubis-cpld.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
index 1a5e7027b41b96b1cdd12fe0bda7721a6ccb3a28..49e828d1d4d852e33a425424481938e572b08975 100644 (file)
@@ -21,6 +21,7 @@
 #include <linux/string.h>
 #include <linux/serial_core.h>
 #include <linux/platform_device.h>
+#include <linux/io.h>
 
 #include <linux/mtd/map.h>
 
@@ -30,7 +31,6 @@
 
 #include <asm/setup.h>
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
index 8b83f93b6102ae7aa0cbe7b703a4096cd4ee3284..85144aa52c276e7449dee5266e48a4fc36170a27 100644 (file)
@@ -20,6 +20,7 @@
 #include <linux/serial_core.h>
 #include <linux/clk.h>
 #include <linux/i2c.h>
+#include <linux/io.h>
 
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
@@ -29,7 +30,6 @@
 #include <mach/osiris-cpld.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
index e0b07e6a0a18507d9df8768acdd9068966d816fd..a4c690456d19a40f3ffcb72a08905f2292cb429c 100644 (file)
@@ -23,7 +23,7 @@
 #include <linux/platform_device.h>
 #include <linux/serial_core.h>
 #include <linux/serial.h>
-
+#include <linux/io.h>
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/nand.h>
 #include <linux/mtd/nand_ecc.h>
@@ -34,7 +34,6 @@
 #include <asm/mach/irq.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
index 327c8f371984b8eedd9a0cdeee4e54543e380106..7ac60b869e7fde7dfe708b1972072102b9359ee6 100644 (file)
 #include <linux/init.h>
 #include <linux/serial_core.h>
 #include <linux/platform_device.h>
+#include <linux/io.h>
 
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
index d6b9a92d284ed09dbfdfae8475e75693ac9c2d05..c81cdb330712cdb3bc16ac708fe4fba4b6b255cd 100644 (file)
 #include <linux/serial_core.h>
 #include <linux/sysdev.h>
 #include <linux/clk.h>
+#include <linux/io.h>
 
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 
 #include <asm/plat-s3c24xx/s3c2440.h>
index 569b5c3d334aebf20c465b2139812433baf2b3d2..18f2ce4d7b23b7667b6748627fe0daa1cf25092a 100644 (file)
 #include <linux/ioport.h>
 #include <linux/mutex.h>
 #include <linux/clk.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
 #include <asm/atomic.h>
 #include <asm/irq.h>
-#include <asm/io.h>
 
 #include <mach/regs-clock.h>
 
index 6a8d7cced4a26c6244e62d45736996fc1c12af14..603b5ea1deab4b96b0a267a816ccfc7c89f6953a 100644 (file)
 #include <linux/mutex.h>
 #include <linux/delay.h>
 #include <linux/serial_core.h>
+#include <linux/io.h>
 
 #include <asm/mach/map.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 
 #include <mach/regs-s3c2443-clock.h>
 
index c1ff03aebfda5f4b6be68dab3bddc7daa43e699f..5d9ee772659bd73ca696415d205522e6a31fac1c 100644 (file)
 #include <linux/init.h>
 #include <linux/sysdev.h>
 #include <linux/serial_core.h>
+#include <linux/io.h>
 
 #include <asm/dma.h>
 #include <mach/dma.h>
-#include <asm/io.h>
 
 #include <asm/plat-s3c24xx/dma.h>
 #include <asm/plat-s3c24xx/cpu.h>
index 9674de7223fdba311aad83f499064f4f6575dc41..e44341d7dfef91189ad960cbcc8264357879eecd 100644 (file)
 #include <linux/interrupt.h>
 #include <linux/ioport.h>
 #include <linux/sysdev.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
 #include <asm/irq.h>
-#include <asm/io.h>
 
 #include <asm/mach/irq.h>
 
@@ -44,7 +44,6 @@ static inline void s3c2443_irq_demux(unsigned int irq, unsigned int len)
 {
        unsigned int subsrc, submsk;
        unsigned int end;
-       struct irq_desc *mydesc;
 
        /* read the current pending interrupts, and the mask
         * for what it is available */
@@ -57,13 +56,11 @@ static inline void s3c2443_irq_demux(unsigned int irq, unsigned int len)
        subsrc  &= (1 << len)-1;
 
        end = len + irq;
-       mydesc = irq_desc + irq;
 
        for (; irq < end && subsrc; irq++) {
                if (subsrc & 1)
-                       desc_handle_irq(irq, mydesc);
+                       generic_handle_irq(irq);
 
-               mydesc++;
                subsrc >>= 1;
        }
 }
index e3c0d587bd10c20eeee945094d96b28a5e918637..f0d119dc040906838fadedcc73d940e2946450da 100644 (file)
 #include <linux/init.h>
 #include <linux/serial_core.h>
 #include <linux/platform_device.h>
+#include <linux/io.h>
 
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
index 37793f924b5e34f8a6318a08c670225c2b9a3996..c973b68cc7358c4c01f57b18ad41bd063ae2947b 100644 (file)
 #include <linux/serial_core.h>
 #include <linux/sysdev.h>
 #include <linux/clk.h>
+#include <linux/io.h>
 
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 
 #include <mach/regs-s3c2443-clock.h>
index 3efefbdd2527ee966377020bb2add9a08828e09a..ab5883b39ddf3a75101bb2f5d15bc05f78e2d01f 100644 (file)
@@ -95,19 +95,19 @@ static int __init badge4_sa1111_init(void)
  *   One-hundred-twenty-seven 32 KiW Main Blocks (8128 Ki b)
  */
 static struct mtd_partition badge4_partitions[] = {
-        {
-                .name           = "BLOB boot loader",
-                .offset         = 0,
-                .size           = 0x0000A000
-        }, {
-                .name           = "params",
-                .offset         = MTDPART_OFS_APPEND,
-                .size           = 0x00006000
-        }, {
-                .name           = "root",
-                .offset         = MTDPART_OFS_APPEND,
-                .size           = MTDPART_SIZ_FULL
-        }
+       {
+               .name   = "BLOB boot loader",
+               .offset = 0,
+               .size   = 0x0000A000
+       }, {
+               .name   = "params",
+               .offset = MTDPART_OFS_APPEND,
+               .size   = 0x00006000
+       }, {
+               .name   = "root",
+               .offset = MTDPART_OFS_APPEND,
+               .size   = MTDPART_SIZ_FULL
+       }
 };
 
 static struct flash_platform_data badge4_flash_data = {
@@ -126,7 +126,7 @@ static int five_v_on __initdata = 0;
 
 static int __init five_v_on_setup(char *ignore)
 {
-        five_v_on = 1;
+       five_v_on = 1;
        return 1;
 }
 __setup("five_v_on", five_v_on_setup);
@@ -171,15 +171,15 @@ static int __init badge4_init(void)
        GPCR  = BADGE4_GPIO_TESTPT_J7;
        GPDR |= BADGE4_GPIO_TESTPT_J7;
 
-       /* 5V supply rail. */
-       GPCR  = BADGE4_GPIO_PCMEN5V;            /* initially off */
-       GPDR |= BADGE4_GPIO_PCMEN5V;
+       /* 5V supply rail. */
+       GPCR  = BADGE4_GPIO_PCMEN5V;            /* initially off */
+       GPDR |= BADGE4_GPIO_PCMEN5V;
 
        /* CPLD sdram type inputs; set up by blob */
        //GPDR |= (BADGE4_GPIO_SDTYP1 | BADGE4_GPIO_SDTYP0);
        printk(KERN_DEBUG __FILE__ ": SDRAM CPLD typ1=%d typ0=%d\n",
-              !!(GPLR & BADGE4_GPIO_SDTYP1),
-              !!(GPLR & BADGE4_GPIO_SDTYP0));
+               !!(GPLR & BADGE4_GPIO_SDTYP1),
+               !!(GPLR & BADGE4_GPIO_SDTYP0));
 
        /* SA1111 reset pin; set up by blob */
        //GPSR  = BADGE4_GPIO_SA1111_NRST;
@@ -205,8 +205,8 @@ static int __init badge4_init(void)
        ret = badge4_sa1111_init();
        if (ret < 0)
                printk(KERN_ERR
-                      "%s: SA-1111 initialization failed (%d)\n",
-                      __func__, ret);
+                       "%s: SA-1111 initialization failed (%d)\n",
+                       __func__, ret);
 
 
        /* maybe turn on 5v0 from the start */
@@ -254,7 +254,7 @@ EXPORT_SYMBOL(badge4_set_5V);
 
 
 static struct map_desc badge4_io_desc[] __initdata = {
-       {       /* SRAM  bank 1 */
+       {       /* SRAM  bank 1 */
                .virtual        = 0xf1000000,
                .pfn            = __phys_to_pfn(0x08000000),
                .length         = 0x00100000,
index da3a898a6d66e70c115a7e904efe7cede6ae8a39..f7fa03478efd9e7c203c72363696e8651209499d 100644 (file)
@@ -88,6 +88,8 @@
 #include <linux/init.h>
 #include <linux/cpufreq.h>
 
+#include <asm/cputype.h>
+
 #include <mach/hardware.h>
 
 #include "generic.h"
@@ -240,7 +242,7 @@ static struct cpufreq_driver sa1100_driver = {
 
 static int __init sa1100_dram_init(void)
 {
-       if ((processor_id & CPU_SA1100_MASK) == CPU_SA1100_ID)
+       if (cpu_is_sa1100())
                return cpufreq_register_driver(&sa1100_driver);
        else
                return -ENODEV;
index 029dbfbbafcf6e6d2ead0e6aa9ddb4b26a9ed22e..3e4fb214eada2d541cf148468f8951de2be457b5 100644 (file)
 #include <linux/cpufreq.h>
 #include <linux/delay.h>
 #include <linux/init.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
+#include <asm/cputype.h>
 #include <asm/mach-types.h>
-#include <asm/io.h>
 #include <asm/system.h>
 
 #include "generic.h"
index 1362994c78aa1ede98cdc4661cb1cb56623378e0..b9fae2a398517a143fa47d34f0c179e488be3ee1 100644 (file)
@@ -42,7 +42,7 @@ EXPORT_SYMBOL(reset_status);
 static const unsigned short cclk_frequency_100khz[NR_FREQS] = {
         590,   /*  59.0 MHz */
         737,   /*  73.7 MHz */
-        885,   /*  88.5 MHz */
+        885,   /*  88.5 MHz */
        1032,   /* 103.2 MHz */
        1180,   /* 118.0 MHz */
        1327,   /* 132.7 MHz */
@@ -52,10 +52,10 @@ static const unsigned short cclk_frequency_100khz[NR_FREQS] = {
        1917,   /* 191.7 MHz */
        2064,   /* 206.4 MHz */
        2212,   /* 221.2 MHz */
-       2359,   /* 235.9 MHz */
-       2507,   /* 250.7 MHz */
-       2654,   /* 265.4 MHz */
-       2802    /* 280.2 MHz */
+       2359,   /* 235.9 MHz */
+       2507,   /* 250.7 MHz */
+       2654,   /* 265.4 MHz */
+       2802    /* 280.2 MHz */
 };
 
 #if defined(CONFIG_CPU_FREQ_SA1100) || defined(CONFIG_CPU_FREQ_SA1110)
@@ -113,7 +113,7 @@ unsigned int sa11x0_getspeed(unsigned int cpu)
 #else
 /*
  * We still need to provide this so building without cpufreq works.
- */ 
+ */
 unsigned int cpufreq_get(unsigned int cpu)
 {
        return cclk_frequency_100khz[PPCR & 0xf] * 100;
@@ -389,7 +389,7 @@ EXPORT_SYMBOL(sa1100fb_lcd_power);
  */
 
 static struct map_desc standard_io_desc[] __initdata = {
-       {       /* PCM */
+       {       /* PCM */
                .virtual        =  0xf8000000,
                .pfn            = __phys_to_pfn(0x80000000),
                .length         = 0x00100000,
index 62aaf04a390674b477c6d063165641ef428d3c53..4f7ea012e1e57e3f676db5f832579d9ed98e3f81 100644 (file)
                                        /* active display mode)            */
 #define LCCR3_OutEnH   (LCCR3_OEP*0)   /*  Output Enable active High      */
 #define LCCR3_OutEnL   (LCCR3_OEP*1)   /*  Output Enable active Low       */
-
-#ifndef __ASSEMBLY__
-extern unsigned int processor_id;
-#endif
-
-#define CPU_REVISION   (processor_id & 15)
-#define CPU_SA1110_A0  (0)
-#define CPU_SA1110_B0  (4)
-#define CPU_SA1110_B1  (5)
-#define CPU_SA1110_B2  (6)
-#define CPU_SA1110_B4  (8)
-
-#define CPU_SA1100_ID  (0x4401a110)
-#define CPU_SA1100_MASK        (0xfffffff0)
-#define CPU_SA1110_ID  (0x6901b110)
-#define CPU_SA1110_MASK        (0xfffffff0)
index 5976435f42c294c008d25d10518577371476b55d..b70846c096aa0f1755290fa1b5cdb2b4f837e5e4 100644 (file)
 #define io_v2p( x )             \
    ( (((x)&0x00ffffff) | (((x)&(0x30000000>>VIO_SHIFT))<<VIO_SHIFT)) + PIO_START )
 
+#define CPU_SA1110_A0  (0)
+#define CPU_SA1110_B0  (4)
+#define CPU_SA1110_B1  (5)
+#define CPU_SA1110_B2  (6)
+#define CPU_SA1110_B4  (8)
+
+#define CPU_SA1100_ID  (0x4401a110)
+#define CPU_SA1100_MASK        (0xfffffff0)
+#define CPU_SA1110_ID  (0x6901b110)
+#define CPU_SA1110_MASK        (0xfffffff0)
+
 #ifndef __ASSEMBLY__
 
+#include <asm/cputype.h>
+
+#define CPU_REVISION   (read_cpuid_id() & 15)
+
+#define cpu_is_sa1100()        ((read_cpuid_id() & CPU_SA1100_MASK) == CPU_SA1100_ID)
+#define cpu_is_sa1110()        ((read_cpuid_id() & CPU_SA1110_MASK) == CPU_SA1110_ID)
+
 # define __REG(x)      (*((volatile unsigned long *)io_p2v(x)))
 # define __PREG(x)     (io_v2p((unsigned long)&(x)))
 
index 29f639e2afc6a1180004e115fd2e3eaa58170372..1c127b68581d6e2ef2ec2be79792d0f4e63a1785 100644 (file)
@@ -40,23 +40,21 @@ void sa1111_adjust_zones(int node, unsigned long *size, unsigned long *holes);
 #define __bus_to_virt(x)        __phys_to_virt(x)
 
 /*
- * Because of the wide memory address space between physical RAM banks on the 
- * SA1100, it's much convenient to use Linux's NUMA support to implement our 
- * memory map representation.  Assuming all memory nodes have equal access 
+ * Because of the wide memory address space between physical RAM banks on the
+ * SA1100, it's much convenient to use Linux's SparseMEM support to implement
+ * our memory map representation.  Assuming all memory nodes have equal access
  * characteristics, we then have generic discontiguous memory support.
  *
- * Of course, all this isn't mandatory for SA1100 implementations with only
- * one used memory bank.  For those, simply undefine CONFIG_DISCONTIGMEM.
- *
- * The nodes are matched with the physical memory bank addresses which are 
- * incidentally the same as virtual addresses.
+ * The sparsemem banks are matched with the physical memory bank addresses
+ * which are incidentally the same as virtual addresses.
  * 
  *     node 0:  0xc0000000 - 0xc7ffffff
  *     node 1:  0xc8000000 - 0xcfffffff
  *     node 2:  0xd0000000 - 0xd7ffffff
  *     node 3:  0xd8000000 - 0xdfffffff
  */
-#define NODE_MEM_SIZE_BITS     27
+#define MAX_PHYSMEM_BITS       32
+#define SECTION_SIZE_BITS      27
 
 /*
  * Cache flushing area - SA1100 zero bank
index 86369a8f0cea79696ddb2256401cf0be221f2ac2..3093d46a9c6fb1e66328b14430381e8395096c93 100644 (file)
@@ -122,14 +122,12 @@ sa1100_high_gpio_handler(unsigned int irq, struct irq_desc *desc)
                GEDR = mask;
 
                irq = IRQ_GPIO11;
-               desc = irq_desc + irq;
                mask >>= 11;
                do {
                        if (mask & 1)
-                               desc_handle_irq(irq, desc);
+                               generic_handle_irq(irq);
                        mask >>= 1;
                        irq++;
-                       desc++;
                } while (mask);
 
                mask = GEDR & 0xfffff800;
index 4856a6bd24824d75b09bd0d0bbbd7d2c3641f13e..6ccd175bc4cf2abffa832d2b626f1bebfbc821e2 100644 (file)
@@ -33,8 +33,6 @@ neponset_irq_handler(unsigned int irq, struct irq_desc *desc)
        unsigned int irr;
 
        while (1) {
-               struct irq_desc *d;
-
                /*
                 * Acknowledge the parent IRQ.
                 */
@@ -67,21 +65,18 @@ neponset_irq_handler(unsigned int irq, struct irq_desc *desc)
                        desc->chip->ack(irq);
 
                        if (irr & IRR_ETHERNET) {
-                               d = irq_desc + IRQ_NEPONSET_SMC9196;
-                               desc_handle_irq(IRQ_NEPONSET_SMC9196, d);
+                               generic_handle_irq(IRQ_NEPONSET_SMC9196);
                        }
 
                        if (irr & IRR_USAR) {
-                               d = irq_desc + IRQ_NEPONSET_USAR;
-                               desc_handle_irq(IRQ_NEPONSET_USAR, d);
+                               generic_handle_irq(IRQ_NEPONSET_USAR);
                        }
 
                        desc->chip->unmask(irq);
                }
 
                if (irr & IRR_SA1111) {
-                       d = irq_desc + IRQ_NEPONSET_SA1111;
-                       desc_handle_irq(IRQ_NEPONSET_SA1111, d);
+                       generic_handle_irq(IRQ_NEPONSET_SA1111);
                }
        }
 }
index 83be1c6c5f80a731f0996714f67da037c399c273..e45d3a1890bcee7faaf6d23f406aa055726e4c10 100644 (file)
@@ -8,11 +8,10 @@
 #include <linux/ioport.h>
 #include <linux/platform_device.h>
 #include <linux/irq.h>
-
+#include <linux/io.h>
 #include <linux/mtd/partitions.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/setup.h>
 #include <asm/mach-types.h>
 
@@ -39,8 +38,8 @@
 
 static struct resource smc91x_resources[] = {
        [0] = {
-               .start  =  PLEB_ETH0_P,
-               .end    =  PLEB_ETH0_P | 0x03ffffff,
+               .start  = PLEB_ETH0_P,
+               .end    = PLEB_ETH0_P | 0x03ffffff,
                .flags  = IORESOURCE_MEM,
        },
 #if 0 /* Autoprobe instead, to get rising/falling edge characteristic right */
@@ -87,15 +86,15 @@ static struct resource pleb_flash_resources[] = {
 static struct mtd_partition pleb_partitions[] = {
        {
                .name           = "blob",
-               .offset         = 0,
+               .offset         = 0,
                .size           = 0x00020000,
        }, {
                .name           = "kernel",
-               .offset         = MTDPART_OFS_APPEND,
+               .offset         = MTDPART_OFS_APPEND,
                .size           = 0x000e0000,
        }, {
                .name           = "rootfs",
-               .offset         = MTDPART_OFS_APPEND,
+               .offset         = MTDPART_OFS_APPEND,
                .size           = 0x00300000,
        }
 };
index 8dd63531795928d394db43f96fe24e004c983136..3c74534f7fee427221f38733d3aee96dcbddc134 100644 (file)
@@ -12,6 +12,7 @@
 #include <linux/platform_device.h>
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/partitions.h>
+#include <linux/io.h>
 
 #include <asm/irq.h>
 #include <mach/hardware.h>
@@ -27,7 +28,6 @@
 
 #include <linux/serial_core.h>
 #include <linux/ioport.h>
-#include <asm/io.h>
 
 #include "generic.h"
 
index 641f361c56f4858e15763a240e70909e80a08e7a..b20ff93b84a5a48d26e0e3cc858c803d23cdfdc1 100644 (file)
@@ -17,8 +17,8 @@
 #include <linux/interrupt.h>
 #include <linux/ioport.h>
 #include <linux/init.h>
+#include <linux/io.h>
 
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <mach/hardware.h>
 #include <asm/hardware/ssp.h>
index 09d9f33d4072fb591c8f4b1c2f2b90894ef86c70..a9400d98445160e9f6b61f9d6efd852373cfe404 100644 (file)
@@ -9,10 +9,10 @@
 #include <linux/irq.h>
 #include <linux/sched.h>
 #include <linux/serial_8250.h>
+#include <linux/io.h>
 
 #include <asm/setup.h>
 #include <asm/mach-types.h>
-#include <asm/io.h>
 #include <asm/leds.h>
 #include <asm/param.h>
 
index 85aceef6f87459bc7e75c7983bbe7c091f56b5ab..e45bd734a03e2e02475d1c9c29eb488e7c85b682 100644 (file)
@@ -6,7 +6,7 @@
 #ifndef __ASM_ARCH_SYSTEM_H
 #define __ASM_ARCH_SYSTEM_H
 
-#include <asm/io.h>
+#include <linux/io.h>
 
 static void arch_reset(char mode)
 {
index 44b0811b400cc2a89a3f6ad08e2534b137a1973f..c04eb6a1e2be1762c627d250c2ab6c8d3762ce70 100644 (file)
@@ -11,9 +11,9 @@
 #include <linux/init.h>
 #include <linux/fs.h>
 #include <linux/interrupt.h>
+#include <linux/io.h>
 
 #include <asm/irq.h>
-#include <asm/io.h>
 #include <asm/mach/irq.h>
 
 /*
index b1896471aa3c88f39887f7584ff98f00bd834679..8bd8d6bb4d922d77f7db4202cb9471c64b4131de 100644 (file)
 #include <linux/init.h>
 #include <linux/spinlock.h>
 #include <linux/ioport.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
 #include <asm/leds.h>
-#include <asm/io.h>
 #include <asm/system.h>
 
 #define LED_STATE_ENABLED      1
index d75e795c893e494b725f4ad177350651e32a60e6..824121d52b8d1d20fe2365c615345022c757fc2b 100644 (file)
 #include <linux/amba/clcd.h>
 #include <linux/clocksource.h>
 #include <linux/clockchips.h>
+#include <linux/io.h>
 
 #include <asm/cnt32_to_63.h>
 #include <asm/system.h>
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/leds.h>
 #include <asm/hardware/arm_timer.h>
@@ -95,8 +95,7 @@ sic_handle_irq(unsigned int irq, struct irq_desc *desc)
 
                irq += IRQ_SIC_START;
 
-               desc = irq_desc + irq;
-               desc_handle_irq(irq, desc);
+               generic_handle_irq(irq);
        } while (status);
 }
 
index 91fa559c7cca3e6097369a47391e4d276e5f9a6d..c59e6100c7e377744ede2095f67220a27ba84e90 100644 (file)
@@ -21,8 +21,8 @@
 #ifndef __ASM_ARCH_SYSTEM_H
 #define __ASM_ARCH_SYSTEM_H
 
+#include <linux/io.h>
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <mach/platform.h>
 
 static inline void arch_idle(void)
index 36f23f8965034a50ea3a4fd2de3c38c71f9fe13a..7161ba23b58a6e2776852abf7eb5a8b857993cd5 100644 (file)
@@ -21,9 +21,9 @@
 #include <linux/interrupt.h>
 #include <linux/spinlock.h>
 #include <linux/init.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/system.h>
 #include <asm/mach/pci.h>
index 76375c64413ac010175cbf43381055f775878752..bb8ec7724f79b3cc27a3dc40bf2b6efb5d11736c 100644 (file)
@@ -23,9 +23,9 @@
 #include <linux/device.h>
 #include <linux/sysdev.h>
 #include <linux/amba/bus.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
index 1725f019fc8581bec6332efecdc1d0933cdd5fa9..aa051c0884f8372f88c0a62fec88ef481032bfde 100644 (file)
@@ -23,9 +23,9 @@
 #include <linux/device.h>
 #include <linux/sysdev.h>
 #include <linux/amba/bus.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
index 2e27a8c8372b0ffb3227cb8a3ceb9a5f67514693..480f78a3611a0f96813cc0acf75a884c3c85caad 100644 (file)
@@ -2,7 +2,7 @@
 # Makefile for the linux arm-specific parts of the memory manager.
 #
 
-obj-y                          := consistent.o extable.o fault.o init.o \
+obj-y                          := dma-mapping.o extable.o fault.o init.o \
                                   iomap.o
 
 obj-$(CONFIG_MMU)              += fault-armv.o flush.o ioremap.o mmap.o \
index eb90bce38e1411fea3cf4034593b1931faf7f8e1..2e6dc040c6543aad4728d27cbd96a033afe80951 100644 (file)
@@ -30,3 +30,4 @@ ENTRY(v7_early_abort)
         * New designs should not need to patch up faults.
         */
        mov     pc, lr
+ENDPROC(v7_early_abort)
index a7cc7f9ee45df02c28caa48d64eb447f1f8eefd3..625e580945b51580af02a3663cd2666ff74893db 100644 (file)
@@ -17,3 +17,4 @@ ENTRY(nommu_early_abort)
        mov     r0, #0                          @ clear r0, r1 (no FSR/FAR)
        mov     r1, #0
        mov     pc, lr
+ENDPROC(nommu_early_abort)
index e162cca5917fb21c72e29ae127da355c36e7cd27..133e65d166b315b0e54aba959846a162643bc927 100644 (file)
@@ -17,8 +17,8 @@
 #include <linux/string.h>
 #include <linux/proc_fs.h>
 #include <linux/init.h>
+#include <linux/uaccess.h>
 
-#include <asm/uaccess.h>
 #include <asm/unaligned.h>
 
 #include "fault.h"
index 76b800a951917d96b7aad433c344562f484743df..b480f1d3591f9b2263a74d12e1aa4fafdd1c464e 100644 (file)
@@ -18,9 +18,9 @@
  */
 #include <linux/init.h>
 #include <linux/spinlock.h>
+#include <linux/io.h>
 
 #include <asm/cacheflush.h>
-#include <asm/io.h>
 #include <asm/hardware/cache-l2x0.h>
 
 #define CACHE_LINE_SIZE                32
index 35ffc4d95997114d0f61003ca8bb669648899f93..d19c2bec2b1fe55da9ea7b114a67a2e942a24fa4 100644 (file)
@@ -66,6 +66,7 @@ finished:
        mcr     p15, 2, r10, c0, c0, 0          @ select current cache level in cssr
        isb
        mov     pc, lr
+ENDPROC(v7_flush_dcache_all)
 
 /*
  *     v7_flush_cache_all()
@@ -85,6 +86,7 @@ ENTRY(v7_flush_kern_cache_all)
        mcr     p15, 0, r0, c7, c5, 0           @ I+BTB cache invalidate
        ldmfd   sp!, {r4-r5, r7, r9-r11, lr}
        mov     pc, lr
+ENDPROC(v7_flush_kern_cache_all)
 
 /*
  *     v7_flush_cache_all()
@@ -110,6 +112,8 @@ ENTRY(v7_flush_user_cache_all)
  */
 ENTRY(v7_flush_user_cache_range)
        mov     pc, lr
+ENDPROC(v7_flush_user_cache_all)
+ENDPROC(v7_flush_user_cache_range)
 
 /*
  *     v7_coherent_kern_range(start,end)
@@ -155,6 +159,8 @@ ENTRY(v7_coherent_user_range)
        dsb
        isb
        mov     pc, lr
+ENDPROC(v7_coherent_kern_range)
+ENDPROC(v7_coherent_user_range)
 
 /*
  *     v7_flush_kern_dcache_page(kaddr)
@@ -174,6 +180,7 @@ ENTRY(v7_flush_kern_dcache_page)
        blo     1b
        dsb
        mov     pc, lr
+ENDPROC(v7_flush_kern_dcache_page)
 
 /*
  *     v7_dma_inv_range(start,end)
@@ -202,6 +209,7 @@ ENTRY(v7_dma_inv_range)
        blo     1b
        dsb
        mov     pc, lr
+ENDPROC(v7_dma_inv_range)
 
 /*
  *     v7_dma_clean_range(start,end)
@@ -219,6 +227,7 @@ ENTRY(v7_dma_clean_range)
        blo     1b
        dsb
        mov     pc, lr
+ENDPROC(v7_dma_clean_range)
 
 /*
  *     v7_dma_flush_range(start,end)
@@ -236,6 +245,7 @@ ENTRY(v7_dma_flush_range)
        blo     1b
        dsb
        mov     pc, lr
+ENDPROC(v7_dma_flush_range)
 
        __INITDATA
 
index 158bd96763d31bb5fe07792c0288e7c3fb6378bf..10b1bae1a258f782f0aaf67e128f8a8aef514672 100644 (file)
  */
 #include <linux/init.h>
 #include <linux/spinlock.h>
+#include <linux/io.h>
 
 #include <asm/system.h>
+#include <asm/cputype.h>
 #include <asm/cacheflush.h>
-#include <asm/io.h>
 
 #define CR_L2  (1 << 26)
 
index ded0e96d069d01994786f0afa39fe6734f513b50..8d33e2549344a1393f16a095b9d3f98e5cbeaa05 100644 (file)
@@ -28,7 +28,7 @@
  * specific hacks for copying pages efficiently.
  */
 #define minicache_pgprot __pgprot(L_PTE_PRESENT | L_PTE_YOUNG | \
-                                 L_PTE_CACHEABLE)
+                                 L_PTE_MT_MINICACHE)
 
 static DEFINE_SPINLOCK(minicache_lock);
 
index 3adb79257f43527339b9c891974d3f2a58e84ece..0e21c07675806a8be16db392e7568686205ccb1f 100644 (file)
@@ -16,6 +16,7 @@
 #include <asm/shmparam.h>
 #include <asm/tlbflush.h>
 #include <asm/cacheflush.h>
+#include <asm/cachetype.h>
 
 #include "mm.h"
 
index 2e455f82a4d50fbdc390100f6cbcf77c11e1ac4b..bad49331bbf94a22ded76f9222a15da063bd7846 100644 (file)
@@ -30,7 +30,7 @@
 #define COPYPAGE_MINICACHE     0xffff8000
 
 #define minicache_pgprot __pgprot(L_PTE_PRESENT | L_PTE_YOUNG | \
-                                 L_PTE_CACHEABLE)
+                                 L_PTE_MT_MINICACHE)
 
 static DEFINE_SPINLOCK(minicache_lock);
 
similarity index 79%
rename from arch/arm/mm/consistent.c
rename to arch/arm/mm/dma-mapping.c
index db7b3e38ef1d1410287f8ca7a84cd435e73f5c2c..67960017dc8f1f79c40bd083205f3409cdf0fbd1 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/arm/mm/consistent.c
+ *  linux/arch/arm/mm/dma-mapping.c
  *
  *  Copyright (C) 2000-2004 Russell King
  *
@@ -512,3 +512,105 @@ void dma_cache_maint(const void *start, size_t size, int direction)
        }
 }
 EXPORT_SYMBOL(dma_cache_maint);
+
+/**
+ * dma_map_sg - map a set of SG buffers for streaming mode DMA
+ * @dev: valid struct device pointer, or NULL for ISA and EISA-like devices
+ * @sg: list of buffers
+ * @nents: number of buffers to map
+ * @dir: DMA transfer direction
+ *
+ * Map a set of buffers described by scatterlist in streaming mode for DMA.
+ * This is the scatter-gather version of the dma_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}.
+ *
+ * Device ownership issues as mentioned for dma_map_single are the same
+ * here.
+ */
+int dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
+               enum dma_data_direction dir)
+{
+       struct scatterlist *s;
+       int i, j;
+
+       for_each_sg(sg, s, nents, i) {
+               s->dma_address = dma_map_page(dev, sg_page(s), s->offset,
+                                               s->length, dir);
+               if (dma_mapping_error(dev, s->dma_address))
+                       goto bad_mapping;
+       }
+       return nents;
+
+ bad_mapping:
+       for_each_sg(sg, s, i, j)
+               dma_unmap_page(dev, sg_dma_address(s), sg_dma_len(s), dir);
+       return 0;
+}
+EXPORT_SYMBOL(dma_map_sg);
+
+/**
+ * dma_unmap_sg - unmap a set of SG buffers mapped by dma_map_sg
+ * @dev: valid struct device pointer, or NULL for ISA and EISA-like devices
+ * @sg: list of buffers
+ * @nents: number of buffers to unmap (returned from dma_map_sg)
+ * @dir: DMA transfer direction (same as was passed to dma_map_sg)
+ *
+ * Unmap a set of streaming mode DMA translations.  Again, CPU access
+ * rules concerning calls here are the same as for dma_unmap_single().
+ */
+void dma_unmap_sg(struct device *dev, struct scatterlist *sg, int nents,
+               enum dma_data_direction dir)
+{
+       struct scatterlist *s;
+       int i;
+
+       for_each_sg(sg, s, nents, i)
+               dma_unmap_page(dev, sg_dma_address(s), sg_dma_len(s), dir);
+}
+EXPORT_SYMBOL(dma_unmap_sg);
+
+/**
+ * dma_sync_sg_for_cpu
+ * @dev: valid struct device pointer, or NULL for ISA and EISA-like devices
+ * @sg: list of buffers
+ * @nents: number of buffers to map (returned from dma_map_sg)
+ * @dir: DMA transfer direction (same as was passed to dma_map_sg)
+ */
+void dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg,
+                       int nents, enum dma_data_direction dir)
+{
+       struct scatterlist *s;
+       int i;
+
+       for_each_sg(sg, s, nents, i) {
+               dmabounce_sync_for_cpu(dev, sg_dma_address(s), 0,
+                                       sg_dma_len(s), dir);
+       }
+}
+EXPORT_SYMBOL(dma_sync_sg_for_cpu);
+
+/**
+ * dma_sync_sg_for_device
+ * @dev: valid struct device pointer, or NULL for ISA and EISA-like devices
+ * @sg: list of buffers
+ * @nents: number of buffers to map (returned from dma_map_sg)
+ * @dir: DMA transfer direction (same as was passed to dma_map_sg)
+ */
+void dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg,
+                       int nents, enum dma_data_direction dir)
+{
+       struct scatterlist *s;
+       int i;
+
+       for_each_sg(sg, s, nents, i) {
+               if (!dmabounce_sync_for_device(dev, sg_dma_address(s), 0,
+                                       sg_dma_len(s), dir))
+                       continue;
+
+               if (!arch_is_coherent())
+                       dma_cache_maint(sg_virt(s), s->length, dir);
+       }
+}
+EXPORT_SYMBOL(dma_sync_sg_for_device);
index 9592c3ee4cb2543002eef58f3a3298fc3606dca6..9d285626bc7da4fe3e2be2e952c38923c05f5204 100644 (file)
@@ -2,7 +2,7 @@
  *  linux/arch/arm/mm/extable.c
  */
 #include <linux/module.h>
-#include <asm/uaccess.h>
+#include <linux/uaccess.h>
 
 int fixup_exception(struct pt_regs *regs)
 {
index a8ec97b4752e129afcecbded471388af85d6ccb8..81d0b8772de33c47b108a7246967adde0d380251 100644 (file)
 #include <linux/init.h>
 #include <linux/pagemap.h>
 
+#include <asm/bugs.h>
 #include <asm/cacheflush.h>
+#include <asm/cachetype.h>
 #include <asm/pgtable.h>
 #include <asm/tlbflush.h>
 
-static unsigned long shared_pte_mask = L_PTE_CACHEABLE;
+static unsigned long shared_pte_mask = L_PTE_MT_BUFFERABLE;
 
 /*
  * We take the easy way out of this problem - we make the
@@ -63,9 +65,10 @@ static int adjust_pte(struct vm_area_struct *vma, unsigned long address)
         * If this page isn't present, or is already setup to
         * fault (ie, is old), we can safely ignore any issues.
         */
-       if (ret && pte_val(entry) & shared_pte_mask) {
+       if (ret && (pte_val(entry) & L_PTE_MT_MASK) != shared_pte_mask) {
                flush_cache_page(vma, address, pte_pfn(entry));
-               pte_val(entry) &= ~shared_pte_mask;
+               pte_val(entry) &= ~L_PTE_MT_MASK;
+               pte_val(entry) |= shared_pte_mask;
                set_pte_at(vma->vm_mm, address, pte, entry);
                flush_tlb_page(vma, address);
        }
@@ -197,7 +200,7 @@ void __init check_writebuffer_bugs(void)
                unsigned long *p1, *p2;
                pgprot_t prot = __pgprot(L_PTE_PRESENT|L_PTE_YOUNG|
                                         L_PTE_DIRTY|L_PTE_WRITE|
-                                        L_PTE_BUFFERABLE);
+                                        L_PTE_MT_BUFFERABLE);
 
                p1 = vmap(&page, 1, VM_IOREMAP, prot);
                p2 = vmap(&page, 1, VM_IOREMAP, prot);
@@ -218,7 +221,7 @@ void __init check_writebuffer_bugs(void)
 
        if (v) {
                printk("failed, %s\n", reason);
-               shared_pte_mask |= L_PTE_BUFFERABLE;
+               shared_pte_mask = L_PTE_MT_UNCACHED;
        } else {
                printk("ok\n");
        }
index 28ad7ab1c0cd9cfc506623ec1dbcc91082bc9c14..2df8d9facf5741c060bb9f028c93b7c3bbe33a6e 100644 (file)
 #include <linux/mm.h>
 #include <linux/init.h>
 #include <linux/kprobes.h>
+#include <linux/uaccess.h>
 
 #include <asm/system.h>
 #include <asm/pgtable.h>
 #include <asm/tlbflush.h>
-#include <asm/uaccess.h>
 
 #include "fault.h"
 
@@ -72,9 +72,8 @@ void show_pte(struct mm_struct *mm, unsigned long addr)
                }
 
                pmd = pmd_offset(pgd, addr);
-#if PTRS_PER_PMD != 1
-               printk(", *pmd=%08lx", pmd_val(*pmd));
-#endif
+               if (PTRS_PER_PMD != 1)
+                       printk(", *pmd=%08lx", pmd_val(*pmd));
 
                if (pmd_none(*pmd))
                        break;
index 029ee65fda2b29ce832481fcadd36c83b475d344..0fa9bf388f0b07d504c1faaadbb9dc953e6a2e91 100644 (file)
@@ -12,6 +12,7 @@
 #include <linux/pagemap.h>
 
 #include <asm/cacheflush.h>
+#include <asm/cachetype.h>
 #include <asm/system.h>
 #include <asm/tlbflush.h>
 
index 30a69d67d673ed80f122900223249e94ec6a4890..82c4b4217989b1587a06a7acccd93ba5fc7b0c0e 100644 (file)
 
 #include "mm.h"
 
-extern void _text, _etext, __data_start, _end, __init_begin, __init_end;
-extern unsigned long phys_initrd_start;
-extern unsigned long phys_initrd_size;
+static unsigned long phys_initrd_start __initdata = 0;
+static unsigned long phys_initrd_size __initdata = 0;
+
+static void __init early_initrd(char **p)
+{
+       unsigned long start, size;
+
+       start = memparse(*p, p);
+       if (**p == ',') {
+               size = memparse((*p) + 1, p);
+
+               phys_initrd_start = start;
+               phys_initrd_size = size;
+       }
+}
+__early_param("initrd=", early_initrd);
+
+static int __init parse_tag_initrd(const struct tag *tag)
+{
+       printk(KERN_WARNING "ATAG_INITRD is deprecated; "
+               "please update your bootloader.\n");
+       phys_initrd_start = __virt_to_phys(tag->u.initrd.start);
+       phys_initrd_size = tag->u.initrd.size;
+       return 0;
+}
+
+__tagtable(ATAG_INITRD, parse_tag_initrd);
+
+static int __init parse_tag_initrd2(const struct tag *tag)
+{
+       phys_initrd_start = tag->u.initrd.start;
+       phys_initrd_size = tag->u.initrd.size;
+       return 0;
+}
+
+__tagtable(ATAG_INITRD2, parse_tag_initrd2);
 
 /*
  * This is used to pass memory configuration data from paging_init
@@ -36,10 +69,6 @@ extern unsigned long phys_initrd_size;
  */
 static struct meminfo meminfo = { 0, };
 
-#define for_each_nodebank(iter,mi,no)                  \
-       for (iter = 0; iter < mi->nr_banks; iter++)     \
-               if (mi->bank[iter].node == no)
-
 void show_mem(void)
 {
        int free = 0, total = 0, reserved = 0;
@@ -50,14 +79,15 @@ void show_mem(void)
        show_free_areas();
        for_each_online_node(node) {
                pg_data_t *n = NODE_DATA(node);
-               struct page *map = n->node_mem_map - n->node_start_pfn;
+               struct page *map = pgdat_page_nr(n, 0) - n->node_start_pfn;
 
                for_each_nodebank (i,mi,node) {
+                       struct membank *bank = &mi->bank[i];
                        unsigned int pfn1, pfn2;
                        struct page *page, *end;
 
-                       pfn1 = __phys_to_pfn(mi->bank[i].start);
-                       pfn2 = __phys_to_pfn(mi->bank[i].size + mi->bank[i].start);
+                       pfn1 = bank_pfn_start(bank);
+                       pfn2 = bank_pfn_end(bank);
 
                        page = map + pfn1;
                        end  = map + pfn2;
@@ -96,17 +126,17 @@ void show_mem(void)
 static unsigned int __init
 find_bootmap_pfn(int node, struct meminfo *mi, unsigned int bootmap_pages)
 {
-       unsigned int start_pfn, bank, bootmap_pfn;
+       unsigned int start_pfn, i, bootmap_pfn;
 
        start_pfn   = PAGE_ALIGN(__pa(&_end)) >> PAGE_SHIFT;
        bootmap_pfn = 0;
 
-       for_each_nodebank(bank, mi, node) {
+       for_each_nodebank(i, mi, node) {
+               struct membank *bank = &mi->bank[i];
                unsigned int start, end;
 
-               start = mi->bank[bank].start >> PAGE_SHIFT;
-               end   = (mi->bank[bank].size +
-                        mi->bank[bank].start) >> PAGE_SHIFT;
+               start = bank_pfn_start(bank);
+               end   = bank_pfn_end(bank);
 
                if (end < start_pfn)
                        continue;
@@ -145,13 +175,10 @@ static int __init check_initrd(struct meminfo *mi)
                initrd_node = -1;
 
                for (i = 0; i < mi->nr_banks; i++) {
-                       unsigned long bank_end;
-
-                       bank_end = mi->bank[i].start + mi->bank[i].size;
-
-                       if (mi->bank[i].start <= phys_initrd_start &&
-                           end <= bank_end)
-                               initrd_node = mi->bank[i].node;
+                       struct membank *bank = &mi->bank[i];
+                       if (bank_phys_start(bank) <= phys_initrd_start &&
+                           end <= bank_phys_end(bank))
+                               initrd_node = bank->node;
                }
        }
 
@@ -171,19 +198,17 @@ static inline void map_memory_bank(struct membank *bank)
 #ifdef CONFIG_MMU
        struct map_desc map;
 
-       map.pfn = __phys_to_pfn(bank->start);
-       map.virtual = __phys_to_virt(bank->start);
-       map.length = bank->size;
+       map.pfn = bank_pfn_start(bank);
+       map.virtual = __phys_to_virt(bank_phys_start(bank));
+       map.length = bank_phys_size(bank);
        map.type = MT_MEMORY;
 
        create_mapping(&map);
 #endif
 }
 
-static unsigned long __init
-bootmem_init_node(int node, int initrd_node, struct meminfo *mi)
+static unsigned long __init bootmem_init_node(int node, struct meminfo *mi)
 {
-       unsigned long zone_size[MAX_NR_ZONES], zhole_size[MAX_NR_ZONES];
        unsigned long start_pfn, end_pfn, boot_pfn;
        unsigned int boot_pages;
        pg_data_t *pgdat;
@@ -199,8 +224,8 @@ bootmem_init_node(int node, int initrd_node, struct meminfo *mi)
                struct membank *bank = &mi->bank[i];
                unsigned long start, end;
 
-               start = bank->start >> PAGE_SHIFT;
-               end = (bank->start + bank->size) >> PAGE_SHIFT;
+               start = bank_pfn_start(bank);
+               end = bank_pfn_end(bank);
 
                if (start_pfn > start)
                        start_pfn = start;
@@ -230,8 +255,11 @@ bootmem_init_node(int node, int initrd_node, struct meminfo *mi)
        pgdat = NODE_DATA(node);
        init_bootmem_node(pgdat, boot_pfn, start_pfn, end_pfn);
 
-       for_each_nodebank(i, mi, node)
-               free_bootmem_node(pgdat, mi->bank[i].start, mi->bank[i].size);
+       for_each_nodebank(i, mi, node) {
+               struct membank *bank = &mi->bank[i];
+               free_bootmem_node(pgdat, bank_phys_start(bank), bank_phys_size(bank));
+               memory_present(node, bank_pfn_start(bank), bank_pfn_end(bank));
+       }
 
        /*
         * Reserve the bootmem bitmap for this node.
@@ -239,31 +267,39 @@ bootmem_init_node(int node, int initrd_node, struct meminfo *mi)
        reserve_bootmem_node(pgdat, boot_pfn << PAGE_SHIFT,
                             boot_pages << PAGE_SHIFT, BOOTMEM_DEFAULT);
 
-       /*
-        * Reserve any special node zero regions.
-        */
-       if (node == 0)
-               reserve_node_zero(pgdat);
+       return end_pfn;
+}
 
+static void __init bootmem_reserve_initrd(int node)
+{
 #ifdef CONFIG_BLK_DEV_INITRD
-       /*
-        * If the initrd is in this node, reserve its memory.
-        */
-       if (node == initrd_node) {
-               int res = reserve_bootmem_node(pgdat, phys_initrd_start,
-                                    phys_initrd_size, BOOTMEM_EXCLUSIVE);
-
-               if (res == 0) {
-                       initrd_start = __phys_to_virt(phys_initrd_start);
-                       initrd_end = initrd_start + phys_initrd_size;
-               } else {
-                       printk(KERN_ERR
-                               "INITRD: 0x%08lx+0x%08lx overlaps in-use "
-                               "memory region - disabling initrd\n",
-                               phys_initrd_start, phys_initrd_size);
-               }
+       pg_data_t *pgdat = NODE_DATA(node);
+       int res;
+
+       res = reserve_bootmem_node(pgdat, phys_initrd_start,
+                            phys_initrd_size, BOOTMEM_EXCLUSIVE);
+
+       if (res == 0) {
+               initrd_start = __phys_to_virt(phys_initrd_start);
+               initrd_end = initrd_start + phys_initrd_size;
+       } else {
+               printk(KERN_ERR
+                       "INITRD: 0x%08lx+0x%08lx overlaps in-use "
+                       "memory region - disabling initrd\n",
+                       phys_initrd_start, phys_initrd_size);
        }
 #endif
+}
+
+static void __init bootmem_free_node(int node, struct meminfo *mi)
+{
+       unsigned long zone_size[MAX_NR_ZONES], zhole_size[MAX_NR_ZONES];
+       unsigned long start_pfn, end_pfn;
+       pg_data_t *pgdat = NODE_DATA(node);
+       int i;
+
+       start_pfn = pgdat->bdata->node_min_pfn;
+       end_pfn = pgdat->bdata->node_low_pfn;
 
        /*
         * initialise the zones within this node.
@@ -284,7 +320,7 @@ bootmem_init_node(int node, int initrd_node, struct meminfo *mi)
         */
        zhole_size[0] = zone_size[0];
        for_each_nodebank(i, mi, node)
-               zhole_size[0] -= mi->bank[i].size >> PAGE_SHIFT;
+               zhole_size[0] -= bank_pfn_size(&mi->bank[i]);
 
        /*
         * Adjust the sizes according to any special requirements for
@@ -293,21 +329,12 @@ bootmem_init_node(int node, int initrd_node, struct meminfo *mi)
        arch_adjust_zones(node, zone_size, zhole_size);
 
        free_area_init_node(node, zone_size, start_pfn, zhole_size);
-
-       return end_pfn;
 }
 
 void __init bootmem_init(struct meminfo *mi)
 {
        unsigned long memend_pfn = 0;
-       int node, initrd_node, i;
-
-       /*
-        * Invalidate the node number for empty or invalid memory banks
-        */
-       for (i = 0; i < mi->nr_banks; i++)
-               if (mi->bank[i].size == 0 || mi->bank[i].node >= MAX_NUMNODES)
-                       mi->bank[i].node = -1;
+       int node, initrd_node;
 
        memcpy(&meminfo, mi, sizeof(meminfo));
 
@@ -320,9 +347,19 @@ void __init bootmem_init(struct meminfo *mi)
         * Run through each node initialising the bootmem allocator.
         */
        for_each_node(node) {
-               unsigned long end_pfn;
+               unsigned long end_pfn = bootmem_init_node(node, mi);
 
-               end_pfn = bootmem_init_node(node, initrd_node, mi);
+               /*
+                * Reserve any special node zero regions.
+                */
+               if (node == 0)
+                       reserve_node_zero(NODE_DATA(node));
+
+               /*
+                * If the initrd is in this node, reserve its memory.
+                */
+               if (node == initrd_node)
+                       bootmem_reserve_initrd(node);
 
                /*
                 * Remember the highest memory PFN.
@@ -331,6 +368,19 @@ void __init bootmem_init(struct meminfo *mi)
                        memend_pfn = end_pfn;
        }
 
+       /*
+        * sparse_init() needs the bootmem allocator up and running.
+        */
+       sparse_init();
+
+       /*
+        * Now free memory in each node - free_area_init_node needs
+        * the sparse mem_map arrays initialized by sparse_init()
+        * for memmap_init_zone(), otherwise all PFNs are invalid.
+        */
+       for_each_node(node)
+               bootmem_free_node(node, mi);
+
        high_memory = __va(memend_pfn << PAGE_SHIFT);
 
        /*
@@ -401,7 +451,9 @@ static void __init free_unused_memmap_node(int node, struct meminfo *mi)
         * information on the command line.
         */
        for_each_nodebank(i, mi, node) {
-               bank_start = mi->bank[i].start >> PAGE_SHIFT;
+               struct membank *bank = &mi->bank[i];
+
+               bank_start = bank_pfn_start(bank);
                if (bank_start < prev_bank_end) {
                        printk(KERN_ERR "MEM: unordered memory banks.  "
                                "Not freeing memmap.\n");
@@ -415,8 +467,7 @@ static void __init free_unused_memmap_node(int node, struct meminfo *mi)
                if (prev_bank_end && prev_bank_end != bank_start)
                        free_memmap(node, prev_bank_end, bank_start);
 
-               prev_bank_end = (mi->bank[i].start +
-                                mi->bank[i].size) >> PAGE_SHIFT;
+               prev_bank_end = bank_pfn_end(bank);
        }
 }
 
@@ -461,8 +512,8 @@ void __init mem_init(void)
 
        num_physpages = 0;
        for (i = 0; i < meminfo.nr_banks; i++) {
-               num_physpages += meminfo.bank[i].size >> PAGE_SHIFT;
-               printk(" %ldMB", meminfo.bank[i].size >> 20);
+               num_physpages += bank_pfn_size(&meminfo.bank[i]);
+               printk(" %ldMB", bank_phys_size(&meminfo.bank[i]) >> 20);
        }
 
        printk(" = %luMB total\n", num_physpages >> (20 - PAGE_SHIFT));
index 7429f8c01015ffaff33372c67057f78aeba25e1d..ffad039cbb73fe69853a651e41ca3b7733a4256a 100644 (file)
@@ -7,8 +7,7 @@
 #include <linux/module.h>
 #include <linux/pci.h>
 #include <linux/ioport.h>
-
-#include <asm/io.h>
+#include <linux/io.h>
 
 #ifdef __io
 void __iomem *ioport_map(unsigned long port, unsigned int nr)
index b81dbf9ffb77b3f28a9b0ad872341fdad3656ca6..18373f73f2fc4a65c460db459cd061beea9c55b0 100644 (file)
 #include <linux/errno.h>
 #include <linux/mm.h>
 #include <linux/vmalloc.h>
+#include <linux/io.h>
 
+#include <asm/cputype.h>
 #include <asm/cacheflush.h>
-#include <asm/io.h>
 #include <asm/mmu_context.h>
 #include <asm/pgalloc.h>
 #include <asm/tlbflush.h>
@@ -55,8 +56,7 @@ static int remap_area_pte(pmd_t *pmd, unsigned long addr, unsigned long end,
                if (!pte_none(*pte))
                        goto bad;
 
-               set_pte_ext(pte, pfn_pte(phys_addr >> PAGE_SHIFT, prot),
-                           type->prot_pte_ext);
+               set_pte_ext(pte, pfn_pte(phys_addr >> PAGE_SHIFT, prot), 0);
                phys_addr += PAGE_SIZE;
        } while (pte++, addr += PAGE_SIZE, addr != end);
        return 0;
@@ -332,15 +332,14 @@ __arm_ioremap(unsigned long phys_addr, size_t size, unsigned int mtype)
 }
 EXPORT_SYMBOL(__arm_ioremap);
 
-void __iounmap(volatile void __iomem *addr)
+void __iounmap(volatile void __iomem *io_addr)
 {
+       void *addr = (void *)(PAGE_MASK & (unsigned long)io_addr);
 #ifndef CONFIG_SMP
        struct vm_struct **p, *tmp;
 #endif
        unsigned int section_mapping = 0;
 
-       addr = (volatile void __iomem *)(PAGE_MASK & (unsigned long)addr);
-
 #ifndef CONFIG_SMP
        /*
         * If this is a section based mapping we need to handle it
@@ -351,7 +350,7 @@ void __iounmap(volatile void __iomem *addr)
         */
        write_lock(&vmlist_lock);
        for (p = &vmlist ; (tmp = *p) ; p = &tmp->next) {
-               if((tmp->flags & VM_IOREMAP) && (tmp->addr == addr)) {
+               if ((tmp->flags & VM_IOREMAP) && (tmp->addr == addr)) {
                        if (tmp->flags & VM_ARM_SECTION_MAPPING) {
                                *p = tmp->next;
                                unmap_area_sections((unsigned long)tmp->addr,
@@ -366,6 +365,6 @@ void __iounmap(volatile void __iomem *addr)
 #endif
 
        if (!section_mapping)
-               vunmap((void __force *)addr);
+               vunmap(addr);
 }
 EXPORT_SYMBOL(__iounmap);
index 7647c597fc597ce82b5c08c587ca4b1f1c7b9724..5d9f53907b4eda5eb85741e2330926d96bd57c8f 100644 (file)
@@ -18,7 +18,6 @@ static inline pmd_t *pmd_off_k(unsigned long virt)
 
 struct mem_type {
        unsigned int prot_pte;
-       unsigned int prot_pte_ext;
        unsigned int prot_l1;
        unsigned int prot_sect;
        unsigned int domain;
@@ -35,3 +34,5 @@ struct pglist_data;
 void __init create_mapping(struct map_desc *md);
 void __init bootmem_init(struct meminfo *mi);
 void reserve_node_zero(struct pglist_data *pgdat);
+
+extern void _text, _stext, _etext, __data_start, _end, __init_begin, __init_end;
index 3f6dc40b835321fd469a23ce8ffa49089377e74b..5358fcc7f61ef8a112834fd839162a438df5ff22 100644 (file)
@@ -6,6 +6,8 @@
 #include <linux/mman.h>
 #include <linux/shm.h>
 #include <linux/sched.h>
+#include <linux/io.h>
+#include <asm/cputype.h>
 #include <asm/system.h>
 
 #define COLOUR_ALIGN(addr,pgoff)               \
@@ -37,8 +39,8 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr,
         * caches alias.  This is indicated by bits 9 and 21 of the
         * cache type register.
         */
-       cache_type = read_cpuid(CPUID_CACHETYPE);
-       if (cache_type != read_cpuid(CPUID_ID)) {
+       cache_type = read_cpuid_cachetype();
+       if (cache_type != read_cpuid_id()) {
                aliasing = (cache_type | cache_type >> 12) & (1 << 11);
                if (aliasing)
                        do_align = filp || flags & MAP_SHARED;
index a713e40e1f1a718549f333327c0f1a234e38a12c..8ba754064559305668dcf96aa9ca974db32ac7db 100644 (file)
@@ -15,6 +15,7 @@
 #include <linux/mman.h>
 #include <linux/nodemask.h>
 
+#include <asm/cputype.h>
 #include <asm/mach-types.h>
 #include <asm/setup.h>
 #include <asm/sizes.h>
@@ -27,9 +28,6 @@
 
 DEFINE_PER_CPU(struct mmu_gather, mmu_gathers);
 
-extern void _stext, _etext, __data_start, _end;
-extern pgd_t swapper_pg_dir[PTRS_PER_PGD];
-
 /*
  * empty_zero_page is a special page that is used for
  * zero-initialized data and COW.
@@ -68,27 +66,27 @@ static struct cachepolicy cache_policies[] __initdata = {
                .policy         = "uncached",
                .cr_mask        = CR_W|CR_C,
                .pmd            = PMD_SECT_UNCACHED,
-               .pte            = 0,
+               .pte            = L_PTE_MT_UNCACHED,
        }, {
                .policy         = "buffered",
                .cr_mask        = CR_C,
                .pmd            = PMD_SECT_BUFFERED,
-               .pte            = PTE_BUFFERABLE,
+               .pte            = L_PTE_MT_BUFFERABLE,
        }, {
                .policy         = "writethrough",
                .cr_mask        = 0,
                .pmd            = PMD_SECT_WT,
-               .pte            = PTE_CACHEABLE,
+               .pte            = L_PTE_MT_WRITETHROUGH,
        }, {
                .policy         = "writeback",
                .cr_mask        = 0,
                .pmd            = PMD_SECT_WB,
-               .pte            = PTE_BUFFERABLE|PTE_CACHEABLE,
+               .pte            = L_PTE_MT_WRITEBACK,
        }, {
                .policy         = "writealloc",
                .cr_mask        = 0,
                .pmd            = PMD_SECT_WBWA,
-               .pte            = PTE_BUFFERABLE|PTE_CACHEABLE,
+               .pte            = L_PTE_MT_WRITEALLOC,
        }
 };
 
@@ -186,35 +184,28 @@ void adjust_cr(unsigned long mask, unsigned long set)
 
 static struct mem_type mem_types[] = {
        [MT_DEVICE] = {           /* Strongly ordered / ARMv6 shared device */
-               .prot_pte       = PROT_PTE_DEVICE,
+               .prot_pte       = PROT_PTE_DEVICE | L_PTE_MT_DEV_SHARED |
+                                 L_PTE_SHARED,
                .prot_l1        = PMD_TYPE_TABLE,
                .prot_sect      = PROT_SECT_DEVICE | PMD_SECT_UNCACHED,
                .domain         = DOMAIN_IO,
        },
        [MT_DEVICE_NONSHARED] = { /* ARMv6 non-shared device */
-               .prot_pte       = PROT_PTE_DEVICE,
-               .prot_pte_ext   = PTE_EXT_TEX(2),
+               .prot_pte       = PROT_PTE_DEVICE | L_PTE_MT_DEV_NONSHARED,
                .prot_l1        = PMD_TYPE_TABLE,
                .prot_sect      = PROT_SECT_DEVICE | PMD_SECT_TEX(2),
                .domain         = DOMAIN_IO,
        },
        [MT_DEVICE_CACHED] = {    /* ioremap_cached */
-               .prot_pte       = PROT_PTE_DEVICE | L_PTE_CACHEABLE | L_PTE_BUFFERABLE,
+               .prot_pte       = PROT_PTE_DEVICE | L_PTE_MT_DEV_CACHED,
                .prot_l1        = PMD_TYPE_TABLE,
                .prot_sect      = PROT_SECT_DEVICE | PMD_SECT_WB,
                .domain         = DOMAIN_IO,
        },      
-       [MT_DEVICE_IXP2000] = {   /* IXP2400 requires XCB=101 for on-chip I/O */
-               .prot_pte       = PROT_PTE_DEVICE,
-               .prot_l1        = PMD_TYPE_TABLE,
-               .prot_sect      = PROT_SECT_DEVICE | PMD_SECT_BUFFERABLE |
-                                 PMD_SECT_TEX(1),
-               .domain         = DOMAIN_IO,
-       },
        [MT_DEVICE_WC] = {      /* ioremap_wc */
-               .prot_pte       = PROT_PTE_DEVICE,
+               .prot_pte       = PROT_PTE_DEVICE | L_PTE_MT_DEV_WC,
                .prot_l1        = PMD_TYPE_TABLE,
-               .prot_sect      = PROT_SECT_DEVICE,
+               .prot_sect      = PROT_SECT_DEVICE | PMD_SECT_BUFFERABLE,
                .domain         = DOMAIN_IO,
        },
        [MT_CACHECLEAN] = {
@@ -259,7 +250,7 @@ static void __init build_mem_type_table(void)
 {
        struct cachepolicy *cp;
        unsigned int cr = get_cr();
-       unsigned int user_pgprot, kern_pgprot;
+       unsigned int user_pgprot, kern_pgprot, vecs_pgprot;
        int cpu_arch = cpu_architecture();
        int i;
 
@@ -277,6 +268,9 @@ static void __init build_mem_type_table(void)
                        cachepolicy = CPOLICY_WRITEBACK;
                ecc_mask = 0;
        }
+#ifdef CONFIG_SMP
+       cachepolicy = CPOLICY_WRITEALLOC;
+#endif
 
        /*
         * On non-Xscale3 ARMv5-and-older systems, use CB=01
@@ -285,11 +279,8 @@ static void __init build_mem_type_table(void)
         * in xsc3 parlance, Uncached Normal in ARMv6 parlance).
         */
        if (cpu_is_xsc3() || cpu_arch >= CPU_ARCH_ARMv6) {
-               mem_types[MT_DEVICE_WC].prot_pte_ext |= PTE_EXT_TEX(1);
                mem_types[MT_DEVICE_WC].prot_sect |= PMD_SECT_TEX(1);
-       } else {
-               mem_types[MT_DEVICE_WC].prot_pte |= L_PTE_BUFFERABLE;
-               mem_types[MT_DEVICE_WC].prot_sect |= PMD_SECT_BUFFERABLE;
+               mem_types[MT_DEVICE_WC].prot_sect &= ~PMD_SECT_BUFFERABLE;
        }
 
        /*
@@ -312,7 +303,15 @@ static void __init build_mem_type_table(void)
        }
 
        cp = &cache_policies[cachepolicy];
-       kern_pgprot = user_pgprot = cp->pte;
+       vecs_pgprot = kern_pgprot = user_pgprot = cp->pte;
+
+#ifndef CONFIG_SMP
+       /*
+        * Only use write-through for non-SMP systems
+        */
+       if (cpu_arch >= CPU_ARCH_ARMv5 && cachepolicy > CPOLICY_WRITETHROUGH)
+               vecs_pgprot = cache_policies[CPOLICY_WRITETHROUGH].pte;
+#endif
 
        /*
         * Enable CPU-specific coherency if supported.
@@ -340,7 +339,6 @@ static void __init build_mem_type_table(void)
                /*
                 * Mark the device area as "shared device"
                 */
-               mem_types[MT_DEVICE].prot_pte |= L_PTE_BUFFERABLE;
                mem_types[MT_DEVICE].prot_sect |= PMD_SECT_BUFFERED;
 
 #ifdef CONFIG_SMP
@@ -349,30 +347,21 @@ static void __init build_mem_type_table(void)
                 */
                user_pgprot |= L_PTE_SHARED;
                kern_pgprot |= L_PTE_SHARED;
+               vecs_pgprot |= L_PTE_SHARED;
                mem_types[MT_MEMORY].prot_sect |= PMD_SECT_S;
 #endif
        }
 
        for (i = 0; i < 16; i++) {
                unsigned long v = pgprot_val(protection_map[i]);
-               v = (v & ~(L_PTE_BUFFERABLE|L_PTE_CACHEABLE)) | user_pgprot;
-               protection_map[i] = __pgprot(v);
+               protection_map[i] = __pgprot(v | user_pgprot);
        }
 
-       mem_types[MT_LOW_VECTORS].prot_pte |= kern_pgprot;
-       mem_types[MT_HIGH_VECTORS].prot_pte |= kern_pgprot;
+       mem_types[MT_LOW_VECTORS].prot_pte |= vecs_pgprot;
+       mem_types[MT_HIGH_VECTORS].prot_pte |= vecs_pgprot;
 
-       if (cpu_arch >= CPU_ARCH_ARMv5) {
-#ifndef CONFIG_SMP
-               /*
-                * Only use write-through for non-SMP systems
-                */
-               mem_types[MT_LOW_VECTORS].prot_pte &= ~L_PTE_BUFFERABLE;
-               mem_types[MT_HIGH_VECTORS].prot_pte &= ~L_PTE_BUFFERABLE;
-#endif
-       } else {
+       if (cpu_arch < CPU_ARCH_ARMv5)
                mem_types[MT_MINICLEAN].prot_sect &= ~PMD_SECT_TEX(1);
-       }
 
        pgprot_user   = __pgprot(L_PTE_PRESENT | L_PTE_YOUNG | user_pgprot);
        pgprot_kernel = __pgprot(L_PTE_PRESENT | L_PTE_YOUNG |
@@ -420,8 +409,7 @@ static void __init alloc_init_pte(pmd_t *pmd, unsigned long addr,
 
        pte = pte_offset_kernel(pmd, addr);
        do {
-               set_pte_ext(pte, pfn_pte(pfn, __pgprot(type->prot_pte)),
-                           type->prot_pte_ext);
+               set_pte_ext(pte, pfn_pte(pfn, __pgprot(type->prot_pte)), 0);
                pfn++;
        } while (pte++, addr += PAGE_SIZE, addr != end);
 }
@@ -588,12 +576,35 @@ void __init iotable_init(struct map_desc *io_desc, int nr)
                create_mapping(io_desc + i);
 }
 
+static unsigned long __initdata vmalloc_reserve = SZ_128M;
+
+/*
+ * vmalloc=size forces the vmalloc area to be exactly 'size'
+ * bytes. This can be used to increase (or decrease) the vmalloc
+ * area - the default is 128m.
+ */
+static void __init early_vmalloc(char **arg)
+{
+       vmalloc_reserve = memparse(*arg, arg);
+
+       if (vmalloc_reserve < SZ_16M) {
+               vmalloc_reserve = SZ_16M;
+               printk(KERN_WARNING
+                       "vmalloc area too small, limiting to %luMB\n",
+                       vmalloc_reserve >> 20);
+       }
+}
+__early_param("vmalloc=", early_vmalloc);
+
+#define VMALLOC_MIN    (void *)(VMALLOC_END - vmalloc_reserve)
+
 static int __init check_membank_valid(struct membank *mb)
 {
        /*
-        * Check whether this memory region has non-zero size.
+        * Check whether this memory region has non-zero size or
+        * invalid node number.
         */
-       if (mb->size == 0)
+       if (mb->size == 0 || mb->node >= MAX_NUMNODES)
                return 0;
 
        /*
@@ -627,8 +638,7 @@ static int __init check_membank_valid(struct membank *mb)
 
 static void __init sanity_check_meminfo(struct meminfo *mi)
 {
-       int i;
-       int j;
+       int i, j;
 
        for (i = 0, j = 0; i < mi->nr_banks; i++) {
                if (check_membank_valid(&mi->bank[i]))
index 63c62fdea52115e168751c5efa5eec96c7602341..07b62b23897909bca58218aec816e41e7608ab3f 100644 (file)
@@ -7,16 +7,14 @@
 #include <linux/mm.h>
 #include <linux/pagemap.h>
 #include <linux/bootmem.h>
+#include <linux/io.h>
 
 #include <asm/cacheflush.h>
-#include <asm/io.h>
 #include <asm/page.h>
 #include <asm/mach/arch.h>
 
 #include "mm.h"
 
-extern void _stext, __data_start, _end;
-
 /*
  * Reserve the various regions of node 0
  */
@@ -43,12 +41,26 @@ void __init reserve_node_zero(pg_data_t *pgdat)
                        BOOTMEM_DEFAULT);
 }
 
+static void __init sanity_check_meminfo(struct meminfo *mi)
+{
+       int i, j;
+
+       for (i = 0, j = 0; i < mi->nr_banks; i++) {
+               struct membank *mb = &mi->bank[i];
+
+               if (mb->size != 0 && mb->node < MAX_NUMNODES)
+                       mi->bank[j++] = mi->bank[i];
+       }
+       mi->nr_banks = j;
+}
+
 /*
  * paging_init() sets up the page tables, initialises the zone memory
  * maps, and sets up the zero page, bad page and bad page tables.
  */
 void __init paging_init(struct meminfo *mi, struct machine_desc *mdesc)
 {
+       sanity_check_meminfo(mi);
        bootmem_init(mi);
 }
 
index 5673f4d6113ba94e7f05954f790489428d4eec8c..b5551bf010aa33668d938e09d184d3df2bc1ec5d 100644 (file)
@@ -29,7 +29,7 @@
 #include <linux/init.h>
 #include <asm/assembler.h>
 #include <asm/asm-offsets.h>
-#include <asm/elf.h>
+#include <asm/hwcap.h>
 #include <asm/pgtable-hwdef.h>
 #include <asm/pgtable.h>
 #include <asm/ptrace.h>
@@ -399,29 +399,7 @@ ENTRY(cpu_arm1020_switch_mm)
        .align  5
 ENTRY(cpu_arm1020_set_pte_ext)
 #ifdef CONFIG_MMU
-       str     r1, [r0], #-2048                @ linux version
-
-       eor     r1, r1, #L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_WRITE | L_PTE_DIRTY
-
-       bic     r2, r1, #PTE_SMALL_AP_MASK
-       bic     r2, r2, #PTE_TYPE_MASK
-       orr     r2, r2, #PTE_TYPE_SMALL
-
-       tst     r1, #L_PTE_USER                 @ User?
-       orrne   r2, r2, #PTE_SMALL_AP_URO_SRW
-
-       tst     r1, #L_PTE_WRITE | L_PTE_DIRTY  @ Write and Dirty?
-       orreq   r2, r2, #PTE_SMALL_AP_UNO_SRW
-
-       tst     r1, #L_PTE_PRESENT | L_PTE_YOUNG        @ Present and Young?
-       movne   r2, #0
-
-#ifdef CONFIG_CPU_DCACHE_WRITETHROUGH
-       eor     r3, r1, #0x0a                   @ C & small page?
-       tst     r3, #0x0b
-       biceq   r2, r2, #4
-#endif
-       str     r2, [r0]                        @ hardware version
+       armv3_set_pte_ext
        mov     r0, r0
 #ifndef CONFIG_CPU_DCACHE_DISABLE
        mcr     p15, 0, r0, c7, c10, 4
index 4343fdb0e9e55f453129f24b37c41e7d29e56cf8..8bc6740c29eb68d8bcfdb97111281ecca87e0f41 100644 (file)
@@ -29,7 +29,7 @@
 #include <linux/init.h>
 #include <asm/assembler.h>
 #include <asm/asm-offsets.h>
-#include <asm/elf.h>
+#include <asm/hwcap.h>
 #include <asm/pgtable-hwdef.h>
 #include <asm/pgtable.h>
 #include <asm/ptrace.h>
@@ -383,29 +383,7 @@ ENTRY(cpu_arm1020e_switch_mm)
        .align  5
 ENTRY(cpu_arm1020e_set_pte_ext)
 #ifdef CONFIG_MMU
-       str     r1, [r0], #-2048                @ linux version
-
-       eor     r1, r1, #L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_WRITE | L_PTE_DIRTY
-
-       bic     r2, r1, #PTE_SMALL_AP_MASK
-       bic     r2, r2, #PTE_TYPE_MASK
-       orr     r2, r2, #PTE_TYPE_SMALL
-
-       tst     r1, #L_PTE_USER                 @ User?
-       orrne   r2, r2, #PTE_SMALL_AP_URO_SRW
-
-       tst     r1, #L_PTE_WRITE | L_PTE_DIRTY  @ Write and Dirty?
-       orreq   r2, r2, #PTE_SMALL_AP_UNO_SRW
-
-       tst     r1, #L_PTE_PRESENT | L_PTE_YOUNG        @ Present and Young?
-       movne   r2, #0
-
-#ifdef CONFIG_CPU_DCACHE_WRITETHROUGH
-       eor     r3, r1, #0x0a                   @ C & small page?
-       tst     r3, #0x0b
-       biceq   r2, r2, #4
-#endif
-       str     r2, [r0]                        @ hardware version
+       armv3_set_pte_ext
        mov     r0, r0
 #ifndef CONFIG_CPU_DCACHE_DISABLE
        mcr     p15, 0, r0, c7, c10, 1          @ clean D entry
index 2a4ea1659e963321cae90278949cf036c216ae17..2cd03e66c0a318f9b28c14bdf0749571604de303 100644 (file)
@@ -18,7 +18,7 @@
 #include <linux/init.h>
 #include <asm/assembler.h>
 #include <asm/asm-offsets.h>
-#include <asm/elf.h>
+#include <asm/hwcap.h>
 #include <asm/pgtable-hwdef.h>
 #include <asm/pgtable.h>
 #include <asm/ptrace.h>
@@ -365,29 +365,7 @@ ENTRY(cpu_arm1022_switch_mm)
        .align  5
 ENTRY(cpu_arm1022_set_pte_ext)
 #ifdef CONFIG_MMU
-       str     r1, [r0], #-2048                @ linux version
-
-       eor     r1, r1, #L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_WRITE | L_PTE_DIRTY
-
-       bic     r2, r1, #PTE_SMALL_AP_MASK
-       bic     r2, r2, #PTE_TYPE_MASK
-       orr     r2, r2, #PTE_TYPE_SMALL
-
-       tst     r1, #L_PTE_USER                 @ User?
-       orrne   r2, r2, #PTE_SMALL_AP_URO_SRW
-
-       tst     r1, #L_PTE_WRITE | L_PTE_DIRTY  @ Write and Dirty?
-       orreq   r2, r2, #PTE_SMALL_AP_UNO_SRW
-
-       tst     r1, #L_PTE_PRESENT | L_PTE_YOUNG        @ Present and Young?
-       movne   r2, #0
-
-#ifdef CONFIG_CPU_DCACHE_WRITETHROUGH
-       eor     r3, r1, #0x0a                   @ C & small page?
-       tst     r3, #0x0b
-       biceq   r2, r2, #4
-#endif
-       str     r2, [r0]                        @ hardware version
+       armv3_set_pte_ext
        mov     r0, r0
 #ifndef CONFIG_CPU_DCACHE_DISABLE
        mcr     p15, 0, r0, c7, c10, 1          @ clean D entry
index 77a1babd421c9d6f5c235299632ae57d5e0dc1cf..ad961a897f6eae5cfad3d3bee1fc6fcd0d8d865f 100644 (file)
@@ -18,7 +18,7 @@
 #include <linux/init.h>
 #include <asm/assembler.h>
 #include <asm/asm-offsets.h>
-#include <asm/elf.h>
+#include <asm/hwcap.h>
 #include <asm/pgtable-hwdef.h>
 #include <asm/pgtable.h>
 #include <asm/ptrace.h>
@@ -354,29 +354,7 @@ ENTRY(cpu_arm1026_switch_mm)
        .align  5
 ENTRY(cpu_arm1026_set_pte_ext)
 #ifdef CONFIG_MMU
-       str     r1, [r0], #-2048                @ linux version
-
-       eor     r1, r1, #L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_WRITE | L_PTE_DIRTY
-
-       bic     r2, r1, #PTE_SMALL_AP_MASK
-       bic     r2, r2, #PTE_TYPE_MASK
-       orr     r2, r2, #PTE_TYPE_SMALL
-
-       tst     r1, #L_PTE_USER                 @ User?
-       orrne   r2, r2, #PTE_SMALL_AP_URO_SRW
-
-       tst     r1, #L_PTE_WRITE | L_PTE_DIRTY  @ Write and Dirty?
-       orreq   r2, r2, #PTE_SMALL_AP_UNO_SRW
-
-       tst     r1, #L_PTE_PRESENT | L_PTE_YOUNG        @ Present and Young?
-       movne   r2, #0
-
-#ifdef CONFIG_CPU_DCACHE_WRITETHROUGH
-       eor     r3, r1, #0x0a                   @ C & small page?
-       tst     r3, #0x0b
-       biceq   r2, r2, #4
-#endif
-       str     r2, [r0]                        @ hardware version
+       armv3_set_pte_ext
        mov     r0, r0
 #ifndef CONFIG_CPU_DCACHE_DISABLE
        mcr     p15, 0, r0, c7, c10, 1          @ clean D entry
index c371fc87776ef0c6b7fffdf4f2d7a7f47a1d32d4..80d6e1de069ada45c74cf6b665b91292d5990019 100644 (file)
 #include <linux/init.h>
 #include <asm/assembler.h>
 #include <asm/asm-offsets.h>
-#include <asm/elf.h>
+#include <asm/hwcap.h>
 #include <asm/pgtable-hwdef.h>
 #include <asm/pgtable.h>
 #include <asm/ptrace.h>
 
+#include "proc-macros.S"
+
 ENTRY(cpu_arm6_dcache_clean_area)
 ENTRY(cpu_arm7_dcache_clean_area)
                mov     pc, lr
@@ -214,30 +216,13 @@ ENTRY(cpu_arm7_switch_mm)
  *        : r1 = value to set
  * Purpose : Set a PTE and flush it out of any WB cache
  */
-               .align  5
+       .align  5
 ENTRY(cpu_arm6_set_pte_ext)
 ENTRY(cpu_arm7_set_pte_ext)
 #ifdef CONFIG_MMU
-               str     r1, [r0], #-2048                @ linux version
-
-               eor     r1, r1, #L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_WRITE | L_PTE_DIRTY
-
-               bic     r2, r1, #PTE_SMALL_AP_MASK
-               bic     r2, r2, #PTE_TYPE_MASK
-               orr     r2, r2, #PTE_TYPE_SMALL
-
-               tst     r1, #L_PTE_USER                 @ User?
-               orrne   r2, r2, #PTE_SMALL_AP_URO_SRW
-
-               tst     r1, #L_PTE_WRITE | L_PTE_DIRTY  @ Write and Dirty?
-               orreq   r2, r2, #PTE_SMALL_AP_UNO_SRW
-
-               tst     r1, #L_PTE_PRESENT | L_PTE_YOUNG        @ Present and Young
-               movne   r2, #0
-
-               str     r2, [r0]                        @ hardware version
+       armv3_set_pte_ext wc_disable=0
 #endif /* CONFIG_MMU */
-               mov     pc, lr
+       mov     pc, lr
 
 /*
  * Function: _arm6_7_reset
index eda733d30455d18bd97bb565d2df8540cd1eb4a4..85ae18695f1021a4cf2299fbcad8f382b9f7c03d 100644 (file)
@@ -36,7 +36,7 @@
 #include <linux/init.h>
 #include <asm/assembler.h>
 #include <asm/asm-offsets.h>
-#include <asm/elf.h>
+#include <asm/hwcap.h>
 #include <asm/pgtable-hwdef.h>
 #include <asm/pgtable.h>
 #include <asm/ptrace.h>
@@ -93,29 +93,12 @@ ENTRY(cpu_arm720_switch_mm)
  *        : r1 = value to set
  * Purpose : Set a PTE and flush it out of any WB cache
  */
-               .align  5
+       .align  5
 ENTRY(cpu_arm720_set_pte_ext)
 #ifdef CONFIG_MMU
-               str     r1, [r0], #-2048                @ linux version
-
-               eor     r1, r1, #L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_WRITE | L_PTE_DIRTY
-
-               bic     r2, r1, #PTE_SMALL_AP_MASK
-               bic     r2, r2, #PTE_TYPE_MASK
-               orr     r2, r2, #PTE_TYPE_SMALL
-
-               tst     r1, #L_PTE_USER                 @ User?
-               orrne   r2, r2, #PTE_SMALL_AP_URO_SRW
-
-               tst     r1, #L_PTE_WRITE | L_PTE_DIRTY  @ Write and Dirty?
-               orreq   r2, r2, #PTE_SMALL_AP_UNO_SRW
-
-               tst     r1, #L_PTE_PRESENT | L_PTE_YOUNG        @ Present and Young
-               movne   r2, #0
-
-               str     r2, [r0]                        @ hardware version
+       armv3_set_pte_ext wc_disable=0
 #endif
-               mov     pc, lr
+       mov     pc, lr
 
 /*
  * Function: arm720_reset
index 3a57376c8bc970f71a1673dd636b8462d3724a79..4f95bee63e95c0454cc1fc9224a686316db37368 100644 (file)
@@ -12,7 +12,7 @@
 #include <linux/init.h>
 #include <asm/assembler.h>
 #include <asm/asm-offsets.h>
-#include <asm/elf.h>
+#include <asm/hwcap.h>
 #include <asm/pgtable-hwdef.h>
 #include <asm/pgtable.h>
 #include <asm/ptrace.h>
index 7b3ecdeb537003a9e2dd183f0f45f31b0e767b09..93e05fa7bed44933341d6d4c42db7655b6fafb15 100644 (file)
@@ -12,7 +12,7 @@
 #include <linux/init.h>
 #include <asm/assembler.h>
 #include <asm/asm-offsets.h>
-#include <asm/elf.h>
+#include <asm/hwcap.h>
 #include <asm/pgtable-hwdef.h>
 #include <asm/pgtable.h>
 #include <asm/ptrace.h>
index 28cdb060df454cf352ac9797092e9d0a8012e3f9..914d688394fc150f26c9e4987542dae74a24205a 100644 (file)
@@ -28,7 +28,7 @@
 #include <linux/linkage.h>
 #include <linux/init.h>
 #include <asm/assembler.h>
-#include <asm/elf.h>
+#include <asm/hwcap.h>
 #include <asm/pgtable-hwdef.h>
 #include <asm/pgtable.h>
 #include <asm/page.h>
@@ -351,33 +351,11 @@ ENTRY(cpu_arm920_switch_mm)
        .align  5
 ENTRY(cpu_arm920_set_pte_ext)
 #ifdef CONFIG_MMU
-       str     r1, [r0], #-2048                @ linux version
-
-       eor     r1, r1, #L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_WRITE | L_PTE_DIRTY
-
-       bic     r2, r1, #PTE_SMALL_AP_MASK
-       bic     r2, r2, #PTE_TYPE_MASK
-       orr     r2, r2, #PTE_TYPE_SMALL
-
-       tst     r1, #L_PTE_USER                 @ User?
-       orrne   r2, r2, #PTE_SMALL_AP_URO_SRW
-
-       tst     r1, #L_PTE_WRITE | L_PTE_DIRTY  @ Write and Dirty?
-       orreq   r2, r2, #PTE_SMALL_AP_UNO_SRW
-
-       tst     r1, #L_PTE_PRESENT | L_PTE_YOUNG        @ Present and Young?
-       movne   r2, #0
-
-#ifdef CONFIG_CPU_DCACHE_WRITETHROUGH
-       eor     r3, r2, #0x0a                   @ C & small page?
-       tst     r3, #0x0b
-       biceq   r2, r2, #4
-#endif
-       str     r2, [r0]                        @ hardware version
+       armv3_set_pte_ext
        mov     r0, r0
        mcr     p15, 0, r0, c7, c10, 1          @ clean D entry
        mcr     p15, 0, r0, c7, c10, 4          @ drain WB
-#endif /* CONFIG_MMU */
+#endif
        mov     pc, lr
 
        __INIT
index 94ddcb4a4b76d630f4e94d5048f27bdfb253c04a..51c9c9859e58475232851e89c7fa032af52d72ad 100644 (file)
@@ -29,7 +29,7 @@
 #include <linux/linkage.h>
 #include <linux/init.h>
 #include <asm/assembler.h>
-#include <asm/elf.h>
+#include <asm/hwcap.h>
 #include <asm/pgtable-hwdef.h>
 #include <asm/pgtable.h>
 #include <asm/page.h>
@@ -355,29 +355,7 @@ ENTRY(cpu_arm922_switch_mm)
        .align  5
 ENTRY(cpu_arm922_set_pte_ext)
 #ifdef CONFIG_MMU
-       str     r1, [r0], #-2048                @ linux version
-
-       eor     r1, r1, #L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_WRITE | L_PTE_DIRTY
-
-       bic     r2, r1, #PTE_SMALL_AP_MASK
-       bic     r2, r2, #PTE_TYPE_MASK
-       orr     r2, r2, #PTE_TYPE_SMALL
-
-       tst     r1, #L_PTE_USER                 @ User?
-       orrne   r2, r2, #PTE_SMALL_AP_URO_SRW
-
-       tst     r1, #L_PTE_WRITE | L_PTE_DIRTY  @ Write and Dirty?
-       orreq   r2, r2, #PTE_SMALL_AP_UNO_SRW
-
-       tst     r1, #L_PTE_PRESENT | L_PTE_YOUNG        @ Present and Young?
-       movne   r2, #0
-
-#ifdef CONFIG_CPU_DCACHE_WRITETHROUGH
-       eor     r3, r2, #0x0a                   @ C & small page?
-       tst     r3, #0x0b
-       biceq   r2, r2, #4
-#endif
-       str     r2, [r0]                        @ hardware version
+       armv3_set_pte_ext
        mov     r0, r0
        mcr     p15, 0, r0, c7, c10, 1          @ clean D entry
        mcr     p15, 0, r0, c7, c10, 4          @ drain WB
index d045812f33999cc0ef40d03ee95034499fd0cda1..2724526d89c1ccb302055ebf0ef52378497189bc 100644 (file)
@@ -52,7 +52,7 @@
 #include <linux/linkage.h>
 #include <linux/init.h>
 #include <asm/assembler.h>
-#include <asm/elf.h>
+#include <asm/hwcap.h>
 #include <asm/pgtable-hwdef.h>
 #include <asm/pgtable.h>
 #include <asm/page.h>
@@ -398,29 +398,7 @@ ENTRY(cpu_arm925_switch_mm)
        .align  5
 ENTRY(cpu_arm925_set_pte_ext)
 #ifdef CONFIG_MMU
-       str     r1, [r0], #-2048                @ linux version
-
-       eor     r1, r1, #L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_WRITE | L_PTE_DIRTY
-
-       bic     r2, r1, #PTE_SMALL_AP_MASK
-       bic     r2, r2, #PTE_TYPE_MASK
-       orr     r2, r2, #PTE_TYPE_SMALL
-
-       tst     r1, #L_PTE_USER                 @ User?
-       orrne   r2, r2, #PTE_SMALL_AP_URO_SRW
-
-       tst     r1, #L_PTE_WRITE | L_PTE_DIRTY  @ Write and Dirty?
-       orreq   r2, r2, #PTE_SMALL_AP_UNO_SRW
-
-       tst     r1, #L_PTE_PRESENT | L_PTE_YOUNG        @ Present and Young?
-       movne   r2, #0
-
-#ifdef CONFIG_CPU_DCACHE_WRITETHROUGH
-       eor     r3, r2, #0x0a                   @ C & small page?
-       tst     r3, #0x0b
-       biceq   r2, r2, #4
-#endif
-       str     r2, [r0]                        @ hardware version
+       armv3_set_pte_ext
        mov     r0, r0
 #ifndef CONFIG_CPU_DCACHE_WRITETHROUGH
        mcr     p15, 0, r0, c7, c10, 1          @ clean D entry
index 4cd33169a7c917235cd8d549d36a2666c0bc32a5..54466937bff994ea288ba5ece9c7c39ddacecbd8 100644 (file)
@@ -28,7 +28,7 @@
 #include <linux/linkage.h>
 #include <linux/init.h>
 #include <asm/assembler.h>
-#include <asm/elf.h>
+#include <asm/hwcap.h>
 #include <asm/pgtable-hwdef.h>
 #include <asm/pgtable.h>
 #include <asm/page.h>
@@ -359,29 +359,7 @@ ENTRY(cpu_arm926_switch_mm)
        .align  5
 ENTRY(cpu_arm926_set_pte_ext)
 #ifdef CONFIG_MMU
-       str     r1, [r0], #-2048                @ linux version
-
-       eor     r1, r1, #L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_WRITE | L_PTE_DIRTY
-
-       bic     r2, r1, #PTE_SMALL_AP_MASK
-       bic     r2, r2, #PTE_TYPE_MASK
-       orr     r2, r2, #PTE_TYPE_SMALL
-
-       tst     r1, #L_PTE_USER                 @ User?
-       orrne   r2, r2, #PTE_SMALL_AP_URO_SRW
-
-       tst     r1, #L_PTE_WRITE | L_PTE_DIRTY  @ Write and Dirty?
-       orreq   r2, r2, #PTE_SMALL_AP_UNO_SRW
-
-       tst     r1, #L_PTE_PRESENT | L_PTE_YOUNG        @ Present and Young?
-       movne   r2, #0
-
-#ifdef CONFIG_CPU_DCACHE_WRITETHROUGH
-       eor     r3, r2, #0x0a                   @ C & small page?
-       tst     r3, #0x0b
-       biceq   r2, r2, #4
-#endif
-       str     r2, [r0]                        @ hardware version
+       armv3_set_pte_ext
        mov     r0, r0
 #ifndef CONFIG_CPU_DCACHE_WRITETHROUGH
        mcr     p15, 0, r0, c7, c10, 1          @ clean D entry
index 551244d5ca19eb1a20bfde7a5661606aff9cfbec..f595117caf55bb7db716b29e477c7c0f9f49bb95 100644 (file)
@@ -11,7 +11,7 @@
 #include <linux/linkage.h>
 #include <linux/init.h>
 #include <asm/assembler.h>
-#include <asm/elf.h>
+#include <asm/hwcap.h>
 #include <asm/pgtable-hwdef.h>
 #include <asm/pgtable.h>
 #include <asm/ptrace.h>
index 6168c6160deef1d5ed2506e7cabe385d4b90c406..e03f6ff1fb2631284176fd5cc08c164f592a6f4d 100644 (file)
@@ -13,7 +13,7 @@
 #include <linux/linkage.h>
 #include <linux/init.h>
 #include <asm/assembler.h>
-#include <asm/elf.h>
+#include <asm/hwcap.h>
 #include <asm/pgtable-hwdef.h>
 #include <asm/pgtable.h>
 #include <asm/ptrace.h>
index c85c1f50e396ef1d82e6ba6f7ef736ddbd3f22d8..be6c11d2b3fbf10092be644df37aba7787387004 100644 (file)
@@ -12,7 +12,7 @@
 #include <linux/init.h>
 #include <asm/assembler.h>
 #include <asm/asm-offsets.h>
-#include <asm/elf.h>
+#include <asm/hwcap.h>
 #include <asm/pgtable-hwdef.h>
 #include <asm/pgtable.h>
 #include <asm/ptrace.h>
index f2e5884c513a05f0b0905a9f5c3ee023a8c702f7..2b8bb383755e66a6cfdbbabebcd1a7b757e6b7fe 100644 (file)
@@ -22,7 +22,7 @@
 #include <linux/linkage.h>
 #include <linux/init.h>
 #include <asm/assembler.h>
-#include <asm/elf.h>
+#include <asm/hwcap.h>
 #include <asm/pgtable-hwdef.h>
 #include <asm/pgtable.h>
 #include <asm/page.h>
@@ -446,24 +446,7 @@ ENTRY(cpu_feroceon_switch_mm)
        .align  5
 ENTRY(cpu_feroceon_set_pte_ext)
 #ifdef CONFIG_MMU
-       str     r1, [r0], #-2048                @ linux version
-
-       eor     r1, r1, #L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_WRITE | L_PTE_DIRTY
-
-       bic     r2, r1, #PTE_SMALL_AP_MASK
-       bic     r2, r2, #PTE_TYPE_MASK
-       orr     r2, r2, #PTE_TYPE_SMALL
-
-       tst     r1, #L_PTE_USER                 @ User?
-       orrne   r2, r2, #PTE_SMALL_AP_URO_SRW
-
-       tst     r1, #L_PTE_WRITE | L_PTE_DIRTY  @ Write and Dirty?
-       orreq   r2, r2, #PTE_SMALL_AP_UNO_SRW
-
-       tst     r1, #L_PTE_PRESENT | L_PTE_YOUNG        @ Present and Young?
-       movne   r2, #0
-
-       str     r2, [r0]                        @ hardware version
+       armv3_set_pte_ext wc_disable=0
        mov     r0, r0
        mcr     p15, 0, r0, c7, c10, 1          @ clean D entry
 #if defined(CONFIG_CACHE_FEROCEON_L2) && !defined(CONFIG_L2_CACHE_WRITETHROUGH)
index b13150052a76bd6c5d6cc16b17a48d05978c16f8..54b1f721dec883f99d0ac5c9cdc6d8dc75fa747a 100644 (file)
        mov     \reg, #16                       @ size offset
        mov     \reg, \reg, lsl \tmp            @ actual cache line size
        .endm
+
+
+/*
+ * Sanity check the PTE configuration for the code below - which makes
+ * certain assumptions about how these bits are layed out.
+ */
+#if L_PTE_SHARED != PTE_EXT_SHARED
+#error PTE shared bit mismatch
+#endif
+#if L_PTE_BUFFERABLE != PTE_BUFFERABLE
+#error PTE bufferable bit mismatch
+#endif
+#if L_PTE_CACHEABLE != PTE_CACHEABLE
+#error PTE cacheable bit mismatch
+#endif
+#if (L_PTE_EXEC+L_PTE_USER+L_PTE_WRITE+L_PTE_DIRTY+L_PTE_YOUNG+\
+     L_PTE_FILE+L_PTE_PRESENT) > L_PTE_SHARED
+#error Invalid Linux PTE bit settings
+#endif
+
+/*
+ * The ARMv6 and ARMv7 set_pte_ext translation function.
+ *
+ * Permission translation:
+ *  YUWD  APX AP1 AP0  SVC     User
+ *  0xxx   0   0   0   no acc  no acc
+ *  100x   1   0   1   r/o     no acc
+ *  10x0   1   0   1   r/o     no acc
+ *  1011   0   0   1   r/w     no acc
+ *  110x   0   1   0   r/w     r/o
+ *  11x0   0   1   0   r/w     r/o
+ *  1111   0   1   1   r/w     r/w
+ */
+       .macro  armv6_mt_table pfx
+\pfx\()_mt_table:
+       .long   0x00                                            @ L_PTE_MT_UNCACHED
+       .long   PTE_EXT_TEX(1)                                  @ L_PTE_MT_BUFFERABLE
+       .long   PTE_CACHEABLE                                   @ L_PTE_MT_WRITETHROUGH
+       .long   PTE_CACHEABLE | PTE_BUFFERABLE                  @ L_PTE_MT_WRITEBACK
+       .long   PTE_BUFFERABLE                                  @ L_PTE_MT_DEV_SHARED
+       .long   0x00                                            @ unused
+       .long   0x00                                            @ L_PTE_MT_MINICACHE (not present)
+       .long   PTE_EXT_TEX(1) | PTE_CACHEABLE | PTE_BUFFERABLE @ L_PTE_MT_WRITEALLOC
+       .long   0x00                                            @ unused
+       .long   PTE_EXT_TEX(1)                                  @ L_PTE_MT_DEV_WC
+       .long   0x00                                            @ unused
+       .long   PTE_CACHEABLE | PTE_BUFFERABLE                  @ L_PTE_MT_DEV_CACHED
+       .long   PTE_EXT_TEX(2)                                  @ L_PTE_MT_DEV_NONSHARED
+       .long   0x00                                            @ unused
+       .long   0x00                                            @ unused
+       .long   0x00                                            @ unused
+       .endm
+
+       .macro  armv6_set_pte_ext pfx
+       str     r1, [r0], #-2048                @ linux version
+
+       bic     r3, r1, #0x000003fc
+       bic     r3, r3, #PTE_TYPE_MASK
+       orr     r3, r3, r2
+       orr     r3, r3, #PTE_EXT_AP0 | 2
+
+       adr     ip, \pfx\()_mt_table
+       and     r2, r1, #L_PTE_MT_MASK
+       ldr     r2, [ip, r2]
+
+       tst     r1, #L_PTE_WRITE
+       tstne   r1, #L_PTE_DIRTY
+       orreq   r3, r3, #PTE_EXT_APX
+
+       tst     r1, #L_PTE_USER
+       orrne   r3, r3, #PTE_EXT_AP1
+       tstne   r3, #PTE_EXT_APX
+       bicne   r3, r3, #PTE_EXT_APX | PTE_EXT_AP0
+
+       tst     r1, #L_PTE_EXEC
+       orreq   r3, r3, #PTE_EXT_XN
+
+       orr     r3, r3, r2
+
+       tst     r1, #L_PTE_YOUNG
+       tstne   r1, #L_PTE_PRESENT
+       moveq   r3, #0
+
+       str     r3, [r0]
+       mcr     p15, 0, r0, c7, c10, 1          @ flush_pte
+       .endm
+
+
+/*
+ * The ARMv3, ARMv4 and ARMv5 set_pte_ext translation function,
+ * covering most CPUs except Xscale and Xscale 3.
+ *
+ * Permission translation:
+ *  YUWD   AP  SVC     User
+ *  0xxx  0x00 no acc  no acc
+ *  100x  0x00 r/o     no acc
+ *  10x0  0x00 r/o     no acc
+ *  1011  0x55 r/w     no acc
+ *  110x  0xaa r/w     r/o
+ *  11x0  0xaa r/w     r/o
+ *  1111  0xff r/w     r/w
+ */
+       .macro  armv3_set_pte_ext wc_disable=1
+       str     r1, [r0], #-2048                @ linux version
+
+       eor     r3, r1, #L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_WRITE | L_PTE_DIRTY
+
+       bic     r2, r1, #PTE_SMALL_AP_MASK      @ keep C, B bits
+       bic     r2, r2, #PTE_TYPE_MASK
+       orr     r2, r2, #PTE_TYPE_SMALL
+
+       tst     r3, #L_PTE_USER                 @ user?
+       orrne   r2, r2, #PTE_SMALL_AP_URO_SRW
+
+       tst     r3, #L_PTE_WRITE | L_PTE_DIRTY  @ write and dirty?
+       orreq   r2, r2, #PTE_SMALL_AP_UNO_SRW
+
+       tst     r3, #L_PTE_PRESENT | L_PTE_YOUNG        @ present and young?
+       movne   r2, #0
+
+       .if     \wc_disable
+#ifdef CONFIG_CPU_DCACHE_WRITETHROUGH
+       tst     r2, #PTE_CACHEABLE
+       bicne   r2, r2, #PTE_BUFFERABLE
+#endif
+       .endif
+       str     r2, [r0]                        @ hardware version
+       .endm
+
+
+/*
+ * Xscale set_pte_ext translation, split into two halves to cope
+ * with work-arounds.  r3 must be preserved by code between these
+ * two macros.
+ *
+ * Permission translation:
+ *  YUWD  AP   SVC     User
+ *  0xxx  00   no acc  no acc
+ *  100x  00   r/o     no acc
+ *  10x0  00   r/o     no acc
+ *  1011  01   r/w     no acc
+ *  110x  10   r/w     r/o
+ *  11x0  10   r/w     r/o
+ *  1111  11   r/w     r/w
+ */
+       .macro  xscale_set_pte_ext_prologue
+       str     r1, [r0], #-2048                @ linux version
+
+       eor     r3, r1, #L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_WRITE | L_PTE_DIRTY
+
+       bic     r2, r1, #PTE_SMALL_AP_MASK      @ keep C, B bits
+       orr     r2, r2, #PTE_TYPE_EXT           @ extended page
+
+       tst     r3, #L_PTE_USER                 @ user?
+       orrne   r2, r2, #PTE_EXT_AP_URO_SRW     @ yes -> user r/o, system r/w
+
+       tst     r3, #L_PTE_WRITE | L_PTE_DIRTY  @ write and dirty?
+       orreq   r2, r2, #PTE_EXT_AP_UNO_SRW     @ yes -> user n/a, system r/w
+                                               @ combined with user -> user r/w
+       .endm
+
+       .macro  xscale_set_pte_ext_epilogue
+       tst     r3, #L_PTE_PRESENT | L_PTE_YOUNG        @ present and young?
+       movne   r2, #0                          @ no -> fault
+
+       str     r2, [r0]                        @ hardware version
+       mov     ip, #0
+       mcr     p15, 0, r0, c7, c10, 1          @ clean L1 D line
+       mcr     p15, 0, ip, c7, c10, 4          @ data write barrier
+       .endm
index bbe10576c861d2c6f117fb79e2ae9d1a37fcab2a..90a7e5279f296c1193cc0a389c9b9d8b1f272186 100644 (file)
@@ -17,7 +17,7 @@
 #include <linux/init.h>
 #include <asm/assembler.h>
 #include <asm/asm-offsets.h>
-#include <asm/elf.h>
+#include <asm/hwcap.h>
 #include <mach/hardware.h>
 #include <asm/pgtable-hwdef.h>
 #include <asm/pgtable.h>
@@ -153,24 +153,7 @@ ENTRY(cpu_sa110_switch_mm)
        .align  5
 ENTRY(cpu_sa110_set_pte_ext)
 #ifdef CONFIG_MMU
-       str     r1, [r0], #-2048                @ linux version
-
-       eor     r1, r1, #L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_WRITE | L_PTE_DIRTY
-
-       bic     r2, r1, #PTE_SMALL_AP_MASK
-       bic     r2, r2, #PTE_TYPE_MASK
-       orr     r2, r2, #PTE_TYPE_SMALL
-
-       tst     r1, #L_PTE_USER                 @ User?
-       orrne   r2, r2, #PTE_SMALL_AP_URO_SRW
-
-       tst     r1, #L_PTE_WRITE | L_PTE_DIRTY  @ Write and Dirty?
-       orreq   r2, r2, #PTE_SMALL_AP_UNO_SRW
-
-       tst     r1, #L_PTE_PRESENT | L_PTE_YOUNG        @ Present and Young?
-       movne   r2, #0
-
-       str     r2, [r0]                        @ hardware version
+       armv3_set_pte_ext wc_disable=0
        mov     r0, r0
        mcr     p15, 0, r0, c7, c10, 1          @ clean D entry
        mcr     p15, 0, r0, c7, c10, 4          @ drain WB
index 871ba018252e4f5b67360c7722935f56b9f1ee83..451e2d953e2a0389ed462b253ca904053b2b24ff 100644 (file)
@@ -22,7 +22,7 @@
 #include <linux/init.h>
 #include <asm/assembler.h>
 #include <asm/asm-offsets.h>
-#include <asm/elf.h>
+#include <asm/hwcap.h>
 #include <mach/hardware.h>
 #include <asm/pgtable-hwdef.h>
 #include <asm/pgtable.h>
@@ -166,24 +166,7 @@ ENTRY(cpu_sa1100_switch_mm)
        .align  5
 ENTRY(cpu_sa1100_set_pte_ext)
 #ifdef CONFIG_MMU
-       str     r1, [r0], #-2048                @ linux version
-
-       eor     r1, r1, #L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_WRITE | L_PTE_DIRTY
-
-       bic     r2, r1, #PTE_SMALL_AP_MASK
-       bic     r2, r2, #PTE_TYPE_MASK
-       orr     r2, r2, #PTE_TYPE_SMALL
-
-       tst     r1, #L_PTE_USER                 @ User?
-       orrne   r2, r2, #PTE_SMALL_AP_URO_SRW
-
-       tst     r1, #L_PTE_WRITE | L_PTE_DIRTY  @ Write and Dirty?
-       orreq   r2, r2, #PTE_SMALL_AP_UNO_SRW
-
-       tst     r1, #L_PTE_PRESENT | L_PTE_YOUNG        @ Present and Young?
-       movne   r2, #0
-
-       str     r2, [r0]                        @ hardware version
+       armv3_set_pte_ext wc_disable=0
        mov     r0, r0
        mcr     p15, 0, r0, c7, c10, 1          @ clean D entry
        mcr     p15, 0, r0, c7, c10, 4          @ drain WB
index 5702ec58b2a2a9ae8f8e120ad59aabec0c65e049..294943b85973c3df54341885cba4d2470d1af2bc 100644 (file)
@@ -13,7 +13,7 @@
 #include <linux/linkage.h>
 #include <asm/assembler.h>
 #include <asm/asm-offsets.h>
-#include <asm/elf.h>
+#include <asm/hwcap.h>
 #include <asm/pgtable-hwdef.h>
 #include <asm/pgtable.h>
 
@@ -114,46 +114,12 @@ ENTRY(cpu_v6_switch_mm)
  *               (hardware version is stored at -1024 bytes)
  *     - pte   - PTE value to store
  *     - ext   - value for extended PTE bits
- *
- *     Permissions:
- *       YUWD  APX AP1 AP0     SVC     User
- *       0xxx   0   0   0      no acc  no acc
- *       100x   1   0   1      r/o     no acc
- *       10x0   1   0   1      r/o     no acc
- *       1011   0   0   1      r/w     no acc
- *       110x   0   1   0      r/w     r/o
- *       11x0   0   1   0      r/w     r/o
- *       1111   0   1   1      r/w     r/w
  */
+       armv6_mt_table cpu_v6
+
 ENTRY(cpu_v6_set_pte_ext)
 #ifdef CONFIG_MMU
-       str     r1, [r0], #-2048                @ linux version
-
-       bic     r3, r1, #0x000003f0
-       bic     r3, r3, #0x00000003
-       orr     r3, r3, r2
-       orr     r3, r3, #PTE_EXT_AP0 | 2
-
-       tst     r1, #L_PTE_WRITE
-       tstne   r1, #L_PTE_DIRTY
-       orreq   r3, r3, #PTE_EXT_APX
-
-       tst     r1, #L_PTE_USER
-       orrne   r3, r3, #PTE_EXT_AP1
-       tstne   r3, #PTE_EXT_APX
-       bicne   r3, r3, #PTE_EXT_APX | PTE_EXT_AP0
-
-       tst     r1, #L_PTE_YOUNG
-       biceq   r3, r3, #PTE_EXT_APX | PTE_EXT_AP_MASK
-
-       tst     r1, #L_PTE_EXEC
-       orreq   r3, r3, #PTE_EXT_XN
-
-       tst     r1, #L_PTE_PRESENT
-       moveq   r3, #0
-
-       str     r3, [r0]
-       mcr     p15, 0, r0, c7, c10, 1 @ flush_pte
+       armv6_set_pte_ext cpu_v6
 #endif
        mov     pc, lr
 
index b49f9a4c82c8e4375f8449bfed5f2527b36598c2..34e424041927fe57f464fa4612cd5e99b0c1ebe9 100644 (file)
@@ -12,7 +12,7 @@
 #include <linux/linkage.h>
 #include <asm/assembler.h>
 #include <asm/asm-offsets.h>
-#include <asm/elf.h>
+#include <asm/hwcap.h>
 #include <asm/pgtable-hwdef.h>
 #include <asm/pgtable.h>
 
 
 ENTRY(cpu_v7_proc_init)
        mov     pc, lr
+ENDPROC(cpu_v7_proc_init)
 
 ENTRY(cpu_v7_proc_fin)
        mov     pc, lr
+ENDPROC(cpu_v7_proc_fin)
 
 /*
  *     cpu_v7_reset(loc)
@@ -43,6 +45,7 @@ ENTRY(cpu_v7_proc_fin)
        .align  5
 ENTRY(cpu_v7_reset)
        mov     pc, r0
+ENDPROC(cpu_v7_reset)
 
 /*
  *     cpu_v7_do_idle()
@@ -52,8 +55,9 @@ ENTRY(cpu_v7_reset)
  *     IRQs are already disabled.
  */
 ENTRY(cpu_v7_do_idle)
-       .long   0xe320f003                      @ ARM V7 WFI instruction
+       wfi
        mov     pc, lr
+ENDPROC(cpu_v7_do_idle)
 
 ENTRY(cpu_v7_dcache_clean_area)
 #ifndef TLB_CAN_READ_FROM_L1_CACHE
@@ -65,6 +69,7 @@ ENTRY(cpu_v7_dcache_clean_area)
        dsb
 #endif
        mov     pc, lr
+ENDPROC(cpu_v7_dcache_clean_area)
 
 /*
  *     cpu_v7_switch_mm(pgd_phys, tsk)
@@ -89,6 +94,7 @@ ENTRY(cpu_v7_switch_mm)
        isb
 #endif
        mov     pc, lr
+ENDPROC(cpu_v7_switch_mm)
 
 /*
  *     cpu_v7_set_pte_ext(ptep, pte)
@@ -99,26 +105,19 @@ ENTRY(cpu_v7_switch_mm)
  *               (hardware version is stored at -1024 bytes)
  *     - pte   - PTE value to store
  *     - ext   - value for extended PTE bits
- *
- *     Permissions:
- *       YUWD  APX AP1 AP0     SVC     User
- *       0xxx   0   0   0      no acc  no acc
- *       100x   1   0   1      r/o     no acc
- *       10x0   1   0   1      r/o     no acc
- *       1011   0   0   1      r/w     no acc
- *       110x   0   1   0      r/w     r/o
- *       11x0   0   1   0      r/w     r/o
- *       1111   0   1   1      r/w     r/w
  */
 ENTRY(cpu_v7_set_pte_ext)
 #ifdef CONFIG_MMU
        str     r1, [r0], #-2048                @ linux version
 
        bic     r3, r1, #0x000003f0
-       bic     r3, r3, #0x00000003
+       bic     r3, r3, #PTE_TYPE_MASK
        orr     r3, r3, r2
        orr     r3, r3, #PTE_EXT_AP0 | 2
 
+       tst     r2, #1 << 4
+       orrne   r3, r3, #PTE_EXT_TEX(1)
+
        tst     r1, #L_PTE_WRITE
        tstne   r1, #L_PTE_DIRTY
        orreq   r3, r3, #PTE_EXT_APX
@@ -128,19 +127,18 @@ ENTRY(cpu_v7_set_pte_ext)
        tstne   r3, #PTE_EXT_APX
        bicne   r3, r3, #PTE_EXT_APX | PTE_EXT_AP0
 
-       tst     r1, #L_PTE_YOUNG
-       biceq   r3, r3, #PTE_EXT_APX | PTE_EXT_AP_MASK
-
        tst     r1, #L_PTE_EXEC
        orreq   r3, r3, #PTE_EXT_XN
 
-       tst     r1, #L_PTE_PRESENT
+       tst     r1, #L_PTE_YOUNG
+       tstne   r1, #L_PTE_PRESENT
        moveq   r3, #0
 
        str     r3, [r0]
        mcr     p15, 0, r0, c7, c10, 1          @ flush_pte
 #endif
        mov     pc, lr
+ENDPROC(cpu_v7_set_pte_ext)
 
 cpu_v7_name:
        .ascii  "ARMv7 Processor"
@@ -182,12 +180,17 @@ __v7_setup:
        mov     r10, #0x1f                      @ domains 0, 1 = manager
        mcr     p15, 0, r10, c3, c0, 0          @ load domain access register
 #endif
+       ldr     r5, =0x40e040e0
+       ldr     r6, =0xff0aa1a8
+       mcr     p15, 0, r5, c10, c2, 0          @ write PRRR
+       mcr     p15, 0, r6, c10, c2, 1          @ write NMRR
        adr     r5, v7_crval
        ldmia   r5, {r5, r6}
        mrc     p15, 0, r0, c1, c0, 0           @ read control register
        bic     r0, r0, r5                      @ clear bits them
        orr     r0, r0, r6                      @ set them
        mov     pc, lr                          @ return to head.S:__ret
+ENDPROC(__v7_setup)
 
        /*
         *         V X F   I D LR
@@ -197,7 +200,7 @@ __v7_setup:
         */
        .type   v7_crval, #object
 v7_crval:
-       crval   clear=0x0120c302, mmuset=0x00c0387d, ucset=0x00c0187c
+       crval   clear=0x0120c302, mmuset=0x10c0387d, ucset=0x00c0187c
 
 __v7_setup_stack:
        .space  4 * 11                          @ 11 registers
index 7bd9e7197f607773b5fa41bc0fb740f707f3e1b1..04dc8b65401b4890b6ebc67eaac43f2c11d09169 100644 (file)
@@ -27,7 +27,7 @@
 #include <linux/linkage.h>
 #include <linux/init.h>
 #include <asm/assembler.h>
-#include <asm/elf.h>
+#include <asm/hwcap.h>
 #include <mach/hardware.h>
 #include <asm/pgtable.h>
 #include <asm/pgtable-hwdef.h>
@@ -345,38 +345,38 @@ ENTRY(cpu_xsc3_switch_mm)
  * cpu_xsc3_set_pte_ext(ptep, pte, ext)
  *
  * Set a PTE and flush it out
- *
  */
+cpu_xsc3_mt_table:
+       .long   0x00                                            @ L_PTE_MT_UNCACHED
+       .long   PTE_EXT_TEX(1)                                  @ L_PTE_MT_BUFFERABLE
+       .long   PTE_CACHEABLE                                   @ L_PTE_MT_WRITETHROUGH
+       .long   PTE_CACHEABLE | PTE_BUFFERABLE                  @ L_PTE_MT_WRITEBACK
+       .long   PTE_EXT_TEX(1) | PTE_BUFFERABLE                 @ L_PTE_MT_DEV_SHARED
+       .long   0x00                                            @ unused
+       .long   0x00                                            @ L_PTE_MT_MINICACHE (not present)
+       .long   PTE_EXT_TEX(5) | PTE_CACHEABLE | PTE_BUFFERABLE @ L_PTE_MT_WRITEALLOC (not present?)
+       .long   0x00                                            @ unused
+       .long   PTE_EXT_TEX(1)                                  @ L_PTE_MT_DEV_WC
+       .long   0x00                                            @ unused
+       .long   PTE_CACHEABLE | PTE_BUFFERABLE                  @ L_PTE_MT_DEV_CACHED
+       .long   PTE_EXT_TEX(2)                                  @ L_PTE_MT_DEV_NONSHARED
+       .long   0x00                                            @ unused
+       .long   0x00                                            @ unused
+       .long   0x00                                            @ unused
+
        .align  5
 ENTRY(cpu_xsc3_set_pte_ext)
-       str     r1, [r0], #-2048                @ linux version
+       xscale_set_pte_ext_prologue
 
-       bic     r2, r1, #0xff0                  @ keep C, B bits
-       orr     r2, r2, #PTE_TYPE_EXT           @ extended page
        tst     r1, #L_PTE_SHARED               @ shared?
-       orrne   r2, r2, #0x200
-
-       eor     r3, r1, #L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_WRITE | L_PTE_DIRTY
-
-       tst     r3, #L_PTE_USER                 @ user?
-       orrne   r2, r2, #PTE_EXT_AP_URO_SRW     @ yes -> user r/o, system r/w
-
-       tst     r3, #L_PTE_WRITE | L_PTE_DIRTY  @ write and dirty?
-       orreq   r2, r2, #PTE_EXT_AP_UNO_SRW     @ yes -> user n/a, system r/w
-                                               @ combined with user -> user r/w
-
-       @ If it's cacheable, it needs to be in L2 also.
-       eor     ip, r1, #L_PTE_CACHEABLE
-       tst     ip, #L_PTE_CACHEABLE
-       orreq   r2, r2, #PTE_EXT_TEX(0x5)
-
-       tst     r3, #L_PTE_PRESENT | L_PTE_YOUNG        @ present and young?
-       movne   r2, #0                          @ no -> fault
-
-       str     r2, [r0]                        @ hardware version
-       mov     ip, #0
-       mcr     p15, 0, r0, c7, c10, 1          @ clean L1 D line
-       mcr     p15, 0, ip, c7, c10, 4          @ data write barrier
+       and     r1, r1, #L_PTE_MT_MASK
+       adr     ip, cpu_xsc3_mt_table
+       ldr     ip, [ip, r1]
+       orrne   r2, r2, #PTE_EXT_COHERENT       @ interlock: mask in coherent bit
+       bic     r2, r2, #0x0c                   @ clear old C,B bits
+       orr     r2, r2, ip
+
+       xscale_set_pte_ext_epilogue
        mov     pc, lr
 
        .ltorg
index 2dd85273976fcf4aa29e6066ad0975cd4de3582b..0cce37b9393730b43b8adcf2a37ed9e2ee2f5bcd 100644 (file)
@@ -23,7 +23,7 @@
 #include <linux/linkage.h>
 #include <linux/init.h>
 #include <asm/assembler.h>
-#include <asm/elf.h>
+#include <asm/hwcap.h>
 #include <asm/pgtable.h>
 #include <asm/pgtable-hwdef.h>
 #include <asm/page.h>
@@ -406,8 +406,6 @@ ENTRY(cpu_xscale_dcache_clean_area)
 
 /* =============================== PageTable ============================== */
 
-#define PTE_CACHE_WRITE_ALLOCATE 0
-
 /*
  * cpu_xscale_switch_mm(pgd)
  *
@@ -431,56 +429,42 @@ ENTRY(cpu_xscale_switch_mm)
  *
  * Errata 40: must set memory to write-through for user read-only pages.
  */
+cpu_xscale_mt_table:
+       .long   0x00                                            @ L_PTE_MT_UNCACHED
+       .long   PTE_BUFFERABLE                                  @ L_PTE_MT_BUFFERABLE
+       .long   PTE_CACHEABLE                                   @ L_PTE_MT_WRITETHROUGH
+       .long   PTE_CACHEABLE | PTE_BUFFERABLE                  @ L_PTE_MT_WRITEBACK
+       .long   PTE_EXT_TEX(1) | PTE_BUFFERABLE                 @ L_PTE_MT_DEV_SHARED
+       .long   0x00                                            @ unused
+       .long   PTE_EXT_TEX(1) | PTE_CACHEABLE                  @ L_PTE_MT_MINICACHE
+       .long   PTE_EXT_TEX(1) | PTE_CACHEABLE | PTE_BUFFERABLE @ L_PTE_MT_WRITEALLOC
+       .long   0x00                                            @ unused
+       .long   PTE_BUFFERABLE                                  @ L_PTE_MT_DEV_WC
+       .long   0x00                                            @ unused
+       .long   PTE_CACHEABLE | PTE_BUFFERABLE                  @ L_PTE_MT_DEV_CACHED
+       .long   0x00                                            @ L_PTE_MT_DEV_NONSHARED
+       .long   0x00                                            @ unused
+       .long   0x00                                            @ unused
+       .long   0x00                                            @ unused
+
        .align  5
 ENTRY(cpu_xscale_set_pte_ext)
-       str     r1, [r0], #-2048                @ linux version
-
-       bic     r2, r1, #0xff0
-       orr     r2, r2, #PTE_TYPE_EXT           @ extended page
-
-       eor     r3, r1, #L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_WRITE | L_PTE_DIRTY
-
-       tst     r3, #L_PTE_USER                 @ User?
-       orrne   r2, r2, #PTE_EXT_AP_URO_SRW     @ yes -> user r/o, system r/w
-
-       tst     r3, #L_PTE_WRITE | L_PTE_DIRTY  @ Write and Dirty?
-       orreq   r2, r2, #PTE_EXT_AP_UNO_SRW     @ yes -> user n/a, system r/w
-                                               @ combined with user -> user r/w
-
-       @
-       @ Handle the X bit.  We want to set this bit for the minicache
-       @ (U = E = B = W = 0, C = 1) or when write allocate is enabled,
-       @ and we have a writeable, cacheable region.  If we ignore the
-       @ U and E bits, we can allow user space to use the minicache as
-       @ well.
-       @
-       @  X = (C & ~W & ~B) | (C & W & B & write_allocate)
-       @
-       eor     ip, r1, #L_PTE_CACHEABLE
-       tst     ip, #L_PTE_CACHEABLE | L_PTE_WRITE | L_PTE_BUFFERABLE
-#if PTE_CACHE_WRITE_ALLOCATE
-       eorne   ip, r1, #L_PTE_CACHEABLE | L_PTE_WRITE | L_PTE_BUFFERABLE
-       tstne   ip, #L_PTE_CACHEABLE | L_PTE_WRITE | L_PTE_BUFFERABLE
-#endif
-       orreq   r2, r2, #PTE_EXT_TEX(1)
+       xscale_set_pte_ext_prologue
 
        @
-       @ Erratum 40: The B bit must be cleared for a user read-only
-       @ cacheable page.
-       @
-       @  B = B & ~(U & C & ~W)
+       @ Erratum 40: must set memory to write-through for user read-only pages
        @
-       and     ip, r1, #L_PTE_USER | L_PTE_WRITE | L_PTE_CACHEABLE
-       teq     ip, #L_PTE_USER | L_PTE_CACHEABLE
-       biceq   r2, r2, #PTE_BUFFERABLE
+       and     ip, r1, #(L_PTE_MT_MASK | L_PTE_USER | L_PTE_WRITE) & ~(4 << 2)
+       teq     ip, #L_PTE_MT_WRITEBACK | L_PTE_USER
 
-       tst     r3, #L_PTE_PRESENT | L_PTE_YOUNG        @ Present and Young?
-       movne   r2, #0                          @ no -> fault
+       moveq   r1, #L_PTE_MT_WRITETHROUGH
+       and     r1, r1, #L_PTE_MT_MASK
+       adr     ip, cpu_xscale_mt_table
+       ldr     ip, [ip, r1]
+       bic     r2, r2, #0x0c
+       orr     r2, r2, ip
 
-       str     r2, [r0]                        @ hardware version
-       mov     ip, #0
-       mcr     p15, 0, r0, c7, c10, 1          @ Clean D cache line
-       mcr     p15, 0, ip, c7, c10, 4          @ Drain Write (& Fill) Buffer
+       xscale_set_pte_ext_epilogue
        mov     pc, lr
 
 
index b56dda8052f78152d5b2a5a1ed6a69a46706c763..24ba5109f2e7000e773ed28fce82c2f8b9b49936 100644 (file)
@@ -51,6 +51,7 @@ ENTRY(v7wbi_flush_user_tlb_range)
        mcr     p15, 0, ip, c7, c5, 6           @ flush BTAC/BTB
        dsb
        mov     pc, lr
+ENDPROC(v7wbi_flush_user_tlb_range)
 
 /*
  *     v7wbi_flush_kern_tlb_range(start,end)
@@ -77,6 +78,7 @@ ENTRY(v7wbi_flush_kern_tlb_range)
        dsb
        isb
        mov     pc, lr
+ENDPROC(v7wbi_flush_kern_tlb_range)
 
        .section ".text.init", #alloc, #execinstr
 
index 79f8e67cc6c18a42a51ee7aff19695a6e1fc6bf2..d31c49f953b1c60b988579336a6e1734b12242a8 100644 (file)
@@ -26,7 +26,7 @@
 #include "fpmodule.h"
 #include "fpmodule.inl"
 
-#include <asm/uaccess.h>
+#include <linux/uaccess.h>
 
 static inline void loadSingle(const unsigned int Fn, const unsigned int __user *pMem)
 {
index e61d0cc520b76a72419a17244d4a970579bac210..88e31f549f50538a5af2af92df76935bf878cf25 100644 (file)
@@ -11,3 +11,4 @@ oprofile-$(CONFIG_CPU_XSCALE)         += op_model_xscale.o
 oprofile-$(CONFIG_OPROFILE_ARM11_CORE) += op_model_arm11_core.o
 oprofile-$(CONFIG_OPROFILE_ARMV6)      += op_model_v6.o
 oprofile-$(CONFIG_OPROFILE_MPCORE)     += op_model_mpcore.o
+oprofile-$(CONFIG_OPROFILE_ARMV7)      += op_model_v7.o
index f5ebf30151fa9f22b7311e59ed20b0773d8dda21..cefc21c2eee4967827f1f2e1becf80193a054c07 100644 (file)
@@ -16,8 +16,8 @@
 #include <linux/oprofile.h>
 #include <linux/sched.h>
 #include <linux/mm.h>
+#include <linux/uaccess.h>
 #include <asm/ptrace.h>
-#include <asm/uaccess.h>
 
 #include "../kernel/stacktrace.h"
 
index 0a5cf3a6438be268f792ae0cb1ec9d7c6a66692c..3fcd752d6146d205860e00464ff23ca8008a7cd0 100644 (file)
@@ -145,6 +145,10 @@ int __init oprofile_arch_init(struct oprofile_operations *ops)
        spec = &op_mpcore_spec;
 #endif
 
+#ifdef CONFIG_OPROFILE_ARMV7
+       spec = &op_armv7_spec;
+#endif
+
        if (spec) {
                ret = spec->init();
                if (ret < 0)
index 4899c629aa03473fe4a7d7fe1ad67b77b15ce9d2..8c4e4f6a1de3346037651c343f320be7e8481279 100644 (file)
@@ -26,6 +26,7 @@ extern struct op_arm_model_spec op_xscale_spec;
 
 extern struct op_arm_model_spec op_armv6_spec;
 extern struct op_arm_model_spec op_mpcore_spec;
+extern struct op_arm_model_spec op_armv7_spec;
 
 extern void arm_backtrace(struct pt_regs * const regs, unsigned int depth);
 
index 92db6e035c65ddaa1731a0f51ba1a39d10064b0e..4de366e8b4c5f7fdaa900343e218c6e2cd49fcc1 100644 (file)
@@ -36,8 +36,8 @@
 #include <linux/oprofile.h>
 #include <linux/interrupt.h>
 #include <linux/smp.h>
+#include <linux/io.h>
 
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/mach/irq.h>
 #include <mach/hardware.h>
diff --git a/arch/arm/oprofile/op_model_v7.c b/arch/arm/oprofile/op_model_v7.c
new file mode 100644 (file)
index 0000000..f20295f
--- /dev/null
@@ -0,0 +1,411 @@
+/**
+ * op_model_v7.c
+ * ARM V7 (Cortex A8) Event Monitor Driver
+ *
+ * Copyright 2008 Jean Pihet <jpihet@mvista.com>
+ * Copyright 2004 ARM SMP Development Team
+ *
+ * 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/types.h>
+#include <linux/errno.h>
+#include <linux/oprofile.h>
+#include <linux/interrupt.h>
+#include <linux/irq.h>
+#include <linux/smp.h>
+
+#include "op_counter.h"
+#include "op_arm_model.h"
+#include "op_model_v7.h"
+
+/* #define DEBUG */
+
+
+/*
+ * ARM V7 PMNC support
+ */
+
+static u32 cnt_en[CNTMAX];
+
+static inline void armv7_pmnc_write(u32 val)
+{
+       val &= PMNC_MASK;
+       asm volatile("mcr p15, 0, %0, c9, c12, 0" : : "r" (val));
+}
+
+static inline u32 armv7_pmnc_read(void)
+{
+       u32 val;
+
+       asm volatile("mrc p15, 0, %0, c9, c12, 0" : "=r" (val));
+       return val;
+}
+
+static inline u32 armv7_pmnc_enable_counter(unsigned int cnt)
+{
+       u32 val;
+
+       if (cnt >= CNTMAX) {
+               printk(KERN_ERR "oprofile: CPU%u enabling wrong PMNC counter"
+                       " %d\n", smp_processor_id(), cnt);
+               return -1;
+       }
+
+       if (cnt == CCNT)
+               val = CNTENS_C;
+       else
+               val = (1 << (cnt - CNT0));
+
+       val &= CNTENS_MASK;
+       asm volatile("mcr p15, 0, %0, c9, c12, 1" : : "r" (val));
+
+       return cnt;
+}
+
+static inline u32 armv7_pmnc_disable_counter(unsigned int cnt)
+{
+       u32 val;
+
+       if (cnt >= CNTMAX) {
+               printk(KERN_ERR "oprofile: CPU%u disabling wrong PMNC counter"
+                       " %d\n", smp_processor_id(), cnt);
+               return -1;
+       }
+
+       if (cnt == CCNT)
+               val = CNTENC_C;
+       else
+               val = (1 << (cnt - CNT0));
+
+       val &= CNTENC_MASK;
+       asm volatile("mcr p15, 0, %0, c9, c12, 2" : : "r" (val));
+
+       return cnt;
+}
+
+static inline u32 armv7_pmnc_enable_intens(unsigned int cnt)
+{
+       u32 val;
+
+       if (cnt >= CNTMAX) {
+               printk(KERN_ERR "oprofile: CPU%u enabling wrong PMNC counter"
+                       " interrupt enable %d\n", smp_processor_id(), cnt);
+               return -1;
+       }
+
+       if (cnt == CCNT)
+               val = INTENS_C;
+       else
+               val = (1 << (cnt - CNT0));
+
+       val &= INTENS_MASK;
+       asm volatile("mcr p15, 0, %0, c9, c14, 1" : : "r" (val));
+
+       return cnt;
+}
+
+static inline u32 armv7_pmnc_getreset_flags(void)
+{
+       u32 val;
+
+       /* Read */
+       asm volatile("mrc p15, 0, %0, c9, c12, 3" : "=r" (val));
+
+       /* Write to clear flags */
+       val &= FLAG_MASK;
+       asm volatile("mcr p15, 0, %0, c9, c12, 3" : : "r" (val));
+
+       return val;
+}
+
+static inline int armv7_pmnc_select_counter(unsigned int cnt)
+{
+       u32 val;
+
+       if ((cnt == CCNT) || (cnt >= CNTMAX)) {
+               printk(KERN_ERR "oprofile: CPU%u selecting wrong PMNC counteri"
+                       " %d\n", smp_processor_id(), cnt);
+               return -1;
+       }
+
+       val = (cnt - CNT0) & SELECT_MASK;
+       asm volatile("mcr p15, 0, %0, c9, c12, 5" : : "r" (val));
+
+       return cnt;
+}
+
+static inline void armv7_pmnc_write_evtsel(unsigned int cnt, u32 val)
+{
+       if (armv7_pmnc_select_counter(cnt) == cnt) {
+               val &= EVTSEL_MASK;
+               asm volatile("mcr p15, 0, %0, c9, c13, 1" : : "r" (val));
+       }
+}
+
+static void armv7_pmnc_reset_counter(unsigned int cnt)
+{
+       u32 cpu_cnt = CPU_COUNTER(smp_processor_id(), cnt);
+       u32 val = -(u32)counter_config[cpu_cnt].count;
+
+       switch (cnt) {
+       case CCNT:
+               armv7_pmnc_disable_counter(cnt);
+
+               asm volatile("mcr p15, 0, %0, c9, c13, 0" : : "r" (val));
+
+               if (cnt_en[cnt] != 0)
+                   armv7_pmnc_enable_counter(cnt);
+
+               break;
+
+       case CNT0:
+       case CNT1:
+       case CNT2:
+       case CNT3:
+               armv7_pmnc_disable_counter(cnt);
+
+               if (armv7_pmnc_select_counter(cnt) == cnt)
+                   asm volatile("mcr p15, 0, %0, c9, c13, 2" : : "r" (val));
+
+               if (cnt_en[cnt] != 0)
+                   armv7_pmnc_enable_counter(cnt);
+
+               break;
+
+       default:
+               printk(KERN_ERR "oprofile: CPU%u resetting wrong PMNC counter"
+                       " %d\n", smp_processor_id(), cnt);
+               break;
+       }
+}
+
+int armv7_setup_pmnc(void)
+{
+       unsigned int cnt;
+
+       if (armv7_pmnc_read() & PMNC_E) {
+               printk(KERN_ERR "oprofile: CPU%u PMNC still enabled when setup"
+                       " new event counter.\n", smp_processor_id());
+               return -EBUSY;
+       }
+
+       /*
+        * Initialize & Reset PMNC: C bit, D bit and P bit.
+        *  Note: Using a slower count for CCNT (D bit: divide by 64) results
+        *   in a more stable system
+        */
+       armv7_pmnc_write(PMNC_P | PMNC_C | PMNC_D);
+
+
+       for (cnt = CCNT; cnt < CNTMAX; cnt++) {
+               unsigned long event;
+               u32 cpu_cnt = CPU_COUNTER(smp_processor_id(), cnt);
+
+               /*
+                * Disable counter
+                */
+               armv7_pmnc_disable_counter(cnt);
+               cnt_en[cnt] = 0;
+
+               if (!counter_config[cpu_cnt].enabled)
+                       continue;
+
+               event = counter_config[cpu_cnt].event & 255;
+
+               /*
+                * Set event (if destined for PMNx counters)
+                * We don't need to set the event if it's a cycle count
+                */
+               if (cnt != CCNT)
+                       armv7_pmnc_write_evtsel(cnt, event);
+
+               /*
+                * Enable interrupt for this counter
+                */
+               armv7_pmnc_enable_intens(cnt);
+
+               /*
+                * Reset counter
+                */
+               armv7_pmnc_reset_counter(cnt);
+
+               /*
+                * Enable counter
+                */
+               armv7_pmnc_enable_counter(cnt);
+               cnt_en[cnt] = 1;
+       }
+
+       return 0;
+}
+
+static inline void armv7_start_pmnc(void)
+{
+       armv7_pmnc_write(armv7_pmnc_read() | PMNC_E);
+}
+
+static inline void armv7_stop_pmnc(void)
+{
+       armv7_pmnc_write(armv7_pmnc_read() & ~PMNC_E);
+}
+
+/*
+ * CPU counters' IRQ handler (one IRQ per CPU)
+ */
+static irqreturn_t armv7_pmnc_interrupt(int irq, void *arg)
+{
+       struct pt_regs *regs = get_irq_regs();
+       unsigned int cnt;
+       u32 flags;
+
+
+       /*
+        * Stop IRQ generation
+        */
+       armv7_stop_pmnc();
+
+       /*
+        * Get and reset overflow status flags
+        */
+       flags = armv7_pmnc_getreset_flags();
+
+       /*
+        * Cycle counter
+        */
+       if (flags & FLAG_C) {
+               u32 cpu_cnt = CPU_COUNTER(smp_processor_id(), CCNT);
+               armv7_pmnc_reset_counter(CCNT);
+               oprofile_add_sample(regs, cpu_cnt);
+       }
+
+       /*
+        * PMNC counters 0:3
+        */
+       for (cnt = CNT0; cnt < CNTMAX; cnt++) {
+               if (flags & (1 << (cnt - CNT0))) {
+                       u32 cpu_cnt = CPU_COUNTER(smp_processor_id(), cnt);
+                       armv7_pmnc_reset_counter(cnt);
+                       oprofile_add_sample(regs, cpu_cnt);
+               }
+       }
+
+       /*
+        * Allow IRQ generation
+        */
+       armv7_start_pmnc();
+
+       return IRQ_HANDLED;
+}
+
+int armv7_request_interrupts(int *irqs, int nr)
+{
+       unsigned int i;
+       int ret = 0;
+
+       for (i = 0; i < nr; i++) {
+               ret = request_irq(irqs[i], armv7_pmnc_interrupt,
+                               IRQF_DISABLED, "CP15 PMNC", NULL);
+               if (ret != 0) {
+                       printk(KERN_ERR "oprofile: unable to request IRQ%u"
+                               " for ARMv7\n",
+                              irqs[i]);
+                       break;
+               }
+       }
+
+       if (i != nr)
+               while (i-- != 0)
+                       free_irq(irqs[i], NULL);
+
+       return ret;
+}
+
+void armv7_release_interrupts(int *irqs, int nr)
+{
+       unsigned int i;
+
+       for (i = 0; i < nr; i++)
+               free_irq(irqs[i], NULL);
+}
+
+#ifdef DEBUG
+static void armv7_pmnc_dump_regs(void)
+{
+       u32 val;
+       unsigned int cnt;
+
+       printk(KERN_INFO "PMNC registers dump:\n");
+
+       asm volatile("mrc p15, 0, %0, c9, c12, 0" : "=r" (val));
+       printk(KERN_INFO "PMNC  =0x%08x\n", val);
+
+       asm volatile("mrc p15, 0, %0, c9, c12, 1" : "=r" (val));
+       printk(KERN_INFO "CNTENS=0x%08x\n", val);
+
+       asm volatile("mrc p15, 0, %0, c9, c14, 1" : "=r" (val));
+       printk(KERN_INFO "INTENS=0x%08x\n", val);
+
+       asm volatile("mrc p15, 0, %0, c9, c12, 3" : "=r" (val));
+       printk(KERN_INFO "FLAGS =0x%08x\n", val);
+
+       asm volatile("mrc p15, 0, %0, c9, c12, 5" : "=r" (val));
+       printk(KERN_INFO "SELECT=0x%08x\n", val);
+
+       asm volatile("mrc p15, 0, %0, c9, c13, 0" : "=r" (val));
+       printk(KERN_INFO "CCNT  =0x%08x\n", val);
+
+       for (cnt = CNT0; cnt < CNTMAX; cnt++) {
+               armv7_pmnc_select_counter(cnt);
+               asm volatile("mrc p15, 0, %0, c9, c13, 2" : "=r" (val));
+               printk(KERN_INFO "CNT[%d] count =0x%08x\n", cnt-CNT0, val);
+               asm volatile("mrc p15, 0, %0, c9, c13, 1" : "=r" (val));
+               printk(KERN_INFO "CNT[%d] evtsel=0x%08x\n", cnt-CNT0, val);
+       }
+}
+#endif
+
+
+static int irqs[] = {
+#ifdef CONFIG_ARCH_OMAP3
+       INT_34XX_BENCH_MPU_EMUL,
+#endif
+};
+
+static void armv7_pmnc_stop(void)
+{
+#ifdef DEBUG
+       armv7_pmnc_dump_regs();
+#endif
+       armv7_stop_pmnc();
+       armv7_release_interrupts(irqs, ARRAY_SIZE(irqs));
+}
+
+static int armv7_pmnc_start(void)
+{
+       int ret;
+
+#ifdef DEBUG
+       armv7_pmnc_dump_regs();
+#endif
+       ret = armv7_request_interrupts(irqs, ARRAY_SIZE(irqs));
+       if (ret >= 0)
+               armv7_start_pmnc();
+
+       return ret;
+}
+
+static int armv7_detect_pmnc(void)
+{
+       return 0;
+}
+
+struct op_arm_model_spec op_armv7_spec = {
+       .init           = armv7_detect_pmnc,
+       .num_counters   = 5,
+       .setup_ctrs     = armv7_setup_pmnc,
+       .start          = armv7_pmnc_start,
+       .stop           = armv7_pmnc_stop,
+       .name           = "arm/armv7",
+};
diff --git a/arch/arm/oprofile/op_model_v7.h b/arch/arm/oprofile/op_model_v7.h
new file mode 100644 (file)
index 0000000..0e19bcc
--- /dev/null
@@ -0,0 +1,103 @@
+/**
+ * op_model_v7.h
+ * ARM v7 (Cortex A8) Event Monitor Driver
+ *
+ * Copyright 2008 Jean Pihet <jpihet@mvista.com>
+ * Copyright 2004 ARM SMP Development Team
+ * Copyright 2000-2004 Deepak Saxena <dsaxena@mvista.com>
+ * Copyright 2000-2004 MontaVista Software Inc
+ * Copyright 2004 Dave Jiang <dave.jiang@intel.com>
+ * Copyright 2004 Intel Corporation
+ * Copyright 2004 Zwane Mwaikambo <zwane@arm.linux.org.uk>
+ * Copyright 2004 Oprofile Authors
+ *
+ * Read the file COPYING
+ *
+ * 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 OP_MODEL_V7_H
+#define OP_MODEL_V7_H
+
+/*
+ * Per-CPU PMNC: config reg
+ */
+#define PMNC_E         (1 << 0)        /* Enable all counters */
+#define PMNC_P         (1 << 1)        /* Reset all counters */
+#define PMNC_C         (1 << 2)        /* Cycle counter reset */
+#define PMNC_D         (1 << 3)        /* CCNT counts every 64th cpu cycle */
+#define PMNC_X         (1 << 4)        /* Export to ETM */
+#define PMNC_DP                (1 << 5)        /* Disable CCNT if non-invasive debug*/
+#define        PMNC_MASK       0x3f            /* Mask for writable bits */
+
+/*
+ * Available counters
+ */
+#define CCNT           0
+#define CNT0           1
+#define CNT1           2
+#define CNT2           3
+#define CNT3           4
+#define CNTMAX                 5
+
+#define CPU_COUNTER(cpu, counter)      ((cpu) * CNTMAX + (counter))
+
+/*
+ * CNTENS: counters enable reg
+ */
+#define CNTENS_P0      (1 << 0)
+#define CNTENS_P1      (1 << 1)
+#define CNTENS_P2      (1 << 2)
+#define CNTENS_P3      (1 << 3)
+#define CNTENS_C       (1 << 31)
+#define        CNTENS_MASK     0x8000000f      /* Mask for writable bits */
+
+/*
+ * CNTENC: counters disable reg
+ */
+#define CNTENC_P0      (1 << 0)
+#define CNTENC_P1      (1 << 1)
+#define CNTENC_P2      (1 << 2)
+#define CNTENC_P3      (1 << 3)
+#define CNTENC_C       (1 << 31)
+#define        CNTENC_MASK     0x8000000f      /* Mask for writable bits */
+
+/*
+ * INTENS: counters overflow interrupt enable reg
+ */
+#define INTENS_P0      (1 << 0)
+#define INTENS_P1      (1 << 1)
+#define INTENS_P2      (1 << 2)
+#define INTENS_P3      (1 << 3)
+#define INTENS_C       (1 << 31)
+#define        INTENS_MASK     0x8000000f      /* Mask for writable bits */
+
+/*
+ * EVTSEL: Event selection reg
+ */
+#define        EVTSEL_MASK     0x7f            /* Mask for writable bits */
+
+/*
+ * SELECT: Counter selection reg
+ */
+#define        SELECT_MASK     0x1f            /* Mask for writable bits */
+
+/*
+ * FLAG: counters overflow flag status reg
+ */
+#define FLAG_P0                (1 << 0)
+#define FLAG_P1                (1 << 1)
+#define FLAG_P2                (1 << 2)
+#define FLAG_P3                (1 << 3)
+#define FLAG_C         (1 << 31)
+#define        FLAG_MASK       0x8000000f      /* Mask for writable bits */
+
+
+int armv7_setup_pmu(void);
+int armv7_start_pmu(void);
+int armv7_stop_pmu(void);
+int armv7_request_interrupts(int *, int);
+void armv7_release_interrupts(int *, int);
+
+#endif
index 7c3289c2acd7d4b2add8364c502b368ac9e88d9e..724ab9ce252674ff02d0e319cc25cd2a7b22da01 100644 (file)
@@ -22,7 +22,7 @@
 #include <linux/interrupt.h>
 #include <linux/irq.h>
 
-#include <asm/system.h>
+#include <asm/cputype.h>
 
 #include "op_counter.h"
 #include "op_arm_model.h"
index 6dcbcc4ad4196068a85d81e4f6c140734c86f7f4..4efe392859ee943ba31f1ae0450fb9669a8cea47 100644 (file)
@@ -18,7 +18,7 @@
 #include <linux/serial.h>
 #include <linux/tty.h>
 #include <linux/serial_core.h>
-#include <asm/io.h>
+#include <linux/io.h>
 #include <asm/pgtable.h>
 #include <asm/page.h>
 #include <asm/mach/map.h>
index 39dcfb4bdc716f09e7fe70b180917991b93537d7..ed0bbece0d6164d7613a4908cd0f9972986990c5 100644 (file)
@@ -18,8 +18,8 @@
  */
 #include <linux/kernel.h>
 #include <linux/module.h>
+#include <linux/io.h>
 #include <mach/hardware.h>
-#include <asm/io.h>
 
 void * __iomem __iop3xx_ioremap(unsigned long cookie, size_t size,
        unsigned int mtype)
index 54708bf9cb155c2b4a2589f92387c6ea63185268..77fa7cc7d162dc28b903211ff5c3691e7e613e2e 100644 (file)
@@ -17,7 +17,7 @@
 #include <linux/mm.h>
 #include <linux/init.h>
 #include <linux/ioport.h>
-#include <asm/io.h>
+#include <linux/io.h>
 #include <asm/irq.h>
 #include <asm/signal.h>
 #include <asm/system.h>
index c53fefb6aac4c5cf521d4ba44c8210469204cdcc..3695bbe3ee280960599532b013b9c33c30d3bc69 100644 (file)
@@ -18,8 +18,8 @@
 #include <linux/time.h>
 #include <linux/init.h>
 #include <linux/timex.h>
+#include <linux/io.h>
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/uaccess.h>
 #include <asm/mach/irq.h>
index e14eaad11dd5aec3c330a0ac43d1e9d24b91bb41..b2a7e3fad117f44c97160c191ab8e34eff66dc0a 100644 (file)
@@ -23,4 +23,15 @@ source "arch/arm/mach-mx3/Kconfig"
 
 endmenu
 
+config MXC_IRQ_PRIOR
+       bool "Use IRQ priority"
+       depends on ARCH_MXC
+       help
+         Select this if you want to use prioritized IRQ handling.
+         This feature prevents higher priority ISR to be interrupted
+         by lower priority IRQ even IRQF_DISABLED flag is not set.
+         This may be useful in embedded applications, where are strong
+         requirements for timing.
+         Say N here, unless you have a specialized requirement.
+
 endif
index db66e9ae841429dc56ddf99a0554eb60823e45ab..067556f7c91f42f4cdd139c82acbbe34346fd7c7 100644 (file)
@@ -3,6 +3,6 @@
 #
 
 # Common support
-obj-y := irq.o clock.o gpio.o time.o
+obj-y := irq.o clock.o gpio.o time.o devices.o
 
-obj-$(CONFIG_ARCH_MX2) += iomux-mx1-mx2.o
+obj-$(CONFIG_ARCH_MX2) += iomux-mx1-mx2.o dma-mx1-mx2.o
diff --git a/arch/arm/plat-mxc/devices.c b/arch/arm/plat-mxc/devices.c
new file mode 100644 (file)
index 0000000..c667482
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+ * Copyright 2008 Sascha Hauer, 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
+ * 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 Street, Fifth Floor,
+ * Boston, MA  02110-1301, USA.
+ */
+
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/platform_device.h>
+
+int __init mxc_register_device(struct platform_device *pdev, void *data)
+{
+       int ret;
+
+       pdev->dev.platform_data = data;
+
+       ret = platform_device_register(pdev);
+       if (ret)
+               pr_debug("Unable to register platform device '%s': %d\n",
+                        pdev->name, ret);
+
+       return ret;
+}
+
diff --git a/arch/arm/plat-mxc/dma-mx1-mx2.c b/arch/arm/plat-mxc/dma-mx1-mx2.c
new file mode 100644 (file)
index 0000000..b296f19
--- /dev/null
@@ -0,0 +1,840 @@
+/*
+ *  linux/arch/arm/plat-mxc/dma-mx1-mx2.c
+ *
+ *  i.MX DMA registration and IRQ dispatching
+ *
+ * Copyright 2006 Pavel Pisa <pisa@cmp.felk.cvut.cz>
+ * Copyright 2008 Juergen Beisert, <kernel@pengutronix.de>
+ * Copyright 2008 Sascha Hauer, <s.hauer@pengutronix.de>
+ *
+ * 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 Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/kernel.h>
+#include <linux/interrupt.h>
+#include <linux/errno.h>
+#include <linux/clk.h>
+#include <linux/scatterlist.h>
+#include <linux/io.h>
+
+#include <asm/system.h>
+#include <asm/irq.h>
+#include <mach/hardware.h>
+#include <asm/dma.h>
+#include <mach/dma-mx1-mx2.h>
+
+#define DMA_DCR     0x00               /* Control Register */
+#define DMA_DISR    0x04               /* Interrupt status Register */
+#define DMA_DIMR    0x08               /* Interrupt mask Register */
+#define DMA_DBTOSR  0x0c               /* Burst timeout status Register */
+#define DMA_DRTOSR  0x10               /* Request timeout Register */
+#define DMA_DSESR   0x14               /* Transfer Error Status Register */
+#define DMA_DBOSR   0x18               /* Buffer overflow status Register */
+#define DMA_DBTOCR  0x1c               /* Burst timeout control Register */
+#define DMA_WSRA    0x40               /* W-Size Register A */
+#define DMA_XSRA    0x44               /* X-Size Register A */
+#define DMA_YSRA    0x48               /* Y-Size Register A */
+#define DMA_WSRB    0x4c               /* W-Size Register B */
+#define DMA_XSRB    0x50               /* X-Size Register B */
+#define DMA_YSRB    0x54               /* Y-Size Register B */
+#define DMA_SAR(x)  (0x80 + ((x) << 6))        /* Source Address Registers */
+#define DMA_DAR(x)  (0x84 + ((x) << 6))        /* Destination Address Registers */
+#define DMA_CNTR(x) (0x88 + ((x) << 6))        /* Count Registers */
+#define DMA_CCR(x)  (0x8c + ((x) << 6))        /* Control Registers */
+#define DMA_RSSR(x) (0x90 + ((x) << 6))        /* Request source select Registers */
+#define DMA_BLR(x)  (0x94 + ((x) << 6))        /* Burst length Registers */
+#define DMA_RTOR(x) (0x98 + ((x) << 6))        /* Request timeout Registers */
+#define DMA_BUCR(x) (0x98 + ((x) << 6))        /* Bus Utilization Registers */
+#define DMA_CCNR(x) (0x9C + ((x) << 6))        /* Channel counter Registers */
+
+#define DCR_DRST           (1<<1)
+#define DCR_DEN            (1<<0)
+#define DBTOCR_EN          (1<<15)
+#define DBTOCR_CNT(x)      ((x) & 0x7fff)
+#define CNTR_CNT(x)        ((x) & 0xffffff)
+#define CCR_ACRPT          (1<<14)
+#define CCR_DMOD_LINEAR    (0x0 << 12)
+#define CCR_DMOD_2D        (0x1 << 12)
+#define CCR_DMOD_FIFO      (0x2 << 12)
+#define CCR_DMOD_EOBFIFO   (0x3 << 12)
+#define CCR_SMOD_LINEAR    (0x0 << 10)
+#define CCR_SMOD_2D        (0x1 << 10)
+#define CCR_SMOD_FIFO      (0x2 << 10)
+#define CCR_SMOD_EOBFIFO   (0x3 << 10)
+#define CCR_MDIR_DEC       (1<<9)
+#define CCR_MSEL_B         (1<<8)
+#define CCR_DSIZ_32        (0x0 << 6)
+#define CCR_DSIZ_8         (0x1 << 6)
+#define CCR_DSIZ_16        (0x2 << 6)
+#define CCR_SSIZ_32        (0x0 << 4)
+#define CCR_SSIZ_8         (0x1 << 4)
+#define CCR_SSIZ_16        (0x2 << 4)
+#define CCR_REN            (1<<3)
+#define CCR_RPT            (1<<2)
+#define CCR_FRC            (1<<1)
+#define CCR_CEN            (1<<0)
+#define RTOR_EN            (1<<15)
+#define RTOR_CLK           (1<<14)
+#define RTOR_PSC           (1<<13)
+
+/*
+ * struct imx_dma_channel - i.MX specific DMA extension
+ * @name: name specified by DMA client
+ * @irq_handler: client callback for end of transfer
+ * @err_handler: client callback for error condition
+ * @data: clients context data for callbacks
+ * @dma_mode: direction of the transfer %DMA_MODE_READ or %DMA_MODE_WRITE
+ * @sg: pointer to the actual read/written chunk for scatter-gather emulation
+ * @resbytes: total residual number of bytes to transfer
+ *            (it can be lower or same as sum of SG mapped chunk sizes)
+ * @sgcount: number of chunks to be read/written
+ *
+ * Structure is used for IMX DMA processing. It would be probably good
+ * @struct dma_struct in the future for external interfacing and use
+ * @struct imx_dma_channel only as extension to it.
+ */
+
+struct imx_dma_channel {
+       const char *name;
+       void (*irq_handler) (int, void *);
+       void (*err_handler) (int, void *, int errcode);
+       void (*prog_handler) (int, void *, struct scatterlist *);
+       void *data;
+       dmamode_t  dma_mode;
+       struct scatterlist *sg;
+       unsigned int resbytes;
+       int dma_num;
+
+       int in_use;
+
+       u32 ccr_from_device;
+       u32 ccr_to_device;
+
+       struct timer_list watchdog;
+
+       int hw_chaining;
+};
+
+static struct imx_dma_channel imx_dma_channels[IMX_DMA_CHANNELS];
+
+static struct clk *dma_clk;
+
+static int imx_dma_hw_chain(struct imx_dma_channel *imxdma)
+{
+       if (cpu_is_mx27())
+               return imxdma->hw_chaining;
+       else
+               return 0;
+}
+
+
+/*
+ * imx_dma_sg_next - prepare next chunk for scatter-gather DMA emulation
+ */
+static inline int imx_dma_sg_next(int channel, struct scatterlist *sg)
+{
+       struct imx_dma_channel *imxdma = &imx_dma_channels[channel];
+       unsigned long now;
+
+       if (!imxdma->name) {
+               printk(KERN_CRIT "%s: called for  not allocated channel %d\n",
+                      __func__, channel);
+               return 0;
+       }
+
+       now = min(imxdma->resbytes, sg->length);
+       imxdma->resbytes -= now;
+
+       if ((imxdma->dma_mode & DMA_MODE_MASK) == DMA_MODE_READ)
+               __raw_writel(sg->dma_address, DMA_BASE + DMA_DAR(channel));
+       else
+               __raw_writel(sg->dma_address, DMA_BASE + DMA_SAR(channel));
+
+       __raw_writel(now, DMA_BASE + DMA_CNTR(channel));
+
+       pr_debug("imxdma%d: next sg chunk dst 0x%08x, src 0x%08x, "
+               "size 0x%08x\n", channel,
+                __raw_readl(DMA_BASE + DMA_DAR(channel)),
+                __raw_readl(DMA_BASE + DMA_SAR(channel)),
+                __raw_readl(DMA_BASE + DMA_CNTR(channel)));
+
+       return now;
+}
+
+/**
+ * imx_dma_setup_single - setup i.MX DMA channel for linear memory to/from
+ * device transfer
+ *
+ * @channel: i.MX DMA channel number
+ * @dma_address: the DMA/physical memory address of the linear data block
+ *             to transfer
+ * @dma_length: length of the data block in bytes
+ * @dev_addr: physical device port address
+ * @dmamode: DMA transfer mode, %DMA_MODE_READ from the device to the memory
+ *           or %DMA_MODE_WRITE from memory to the device
+ *
+ * Return value: if incorrect parameters are provided -%EINVAL.
+ *             Zero indicates success.
+ */
+int
+imx_dma_setup_single(int channel, dma_addr_t dma_address,
+                    unsigned int dma_length, unsigned int dev_addr,
+                    dmamode_t dmamode)
+{
+       struct imx_dma_channel *imxdma = &imx_dma_channels[channel];
+
+       imxdma->sg = NULL;
+       imxdma->dma_mode = dmamode;
+
+       if (!dma_address) {
+               printk(KERN_ERR "imxdma%d: imx_dma_setup_single null address\n",
+                      channel);
+               return -EINVAL;
+       }
+
+       if (!dma_length) {
+               printk(KERN_ERR "imxdma%d: imx_dma_setup_single zero length\n",
+                      channel);
+               return -EINVAL;
+       }
+
+       if ((dmamode & DMA_MODE_MASK) == DMA_MODE_READ) {
+               pr_debug("imxdma%d: %s dma_addressg=0x%08x dma_length=%d "
+                       "dev_addr=0x%08x for read\n",
+                       channel, __func__, (unsigned int)dma_address,
+                       dma_length, dev_addr);
+
+               __raw_writel(dev_addr, DMA_BASE + DMA_SAR(channel));
+               __raw_writel(dma_address, DMA_BASE + DMA_DAR(channel));
+               __raw_writel(imxdma->ccr_from_device,
+                               DMA_BASE + DMA_CCR(channel));
+       } else if ((dmamode & DMA_MODE_MASK) == DMA_MODE_WRITE) {
+               pr_debug("imxdma%d: %s dma_addressg=0x%08x dma_length=%d "
+                       "dev_addr=0x%08x for write\n",
+                       channel, __func__, (unsigned int)dma_address,
+                       dma_length, dev_addr);
+
+               __raw_writel(dma_address, DMA_BASE + DMA_SAR(channel));
+               __raw_writel(dev_addr, DMA_BASE + DMA_DAR(channel));
+               __raw_writel(imxdma->ccr_to_device,
+                               DMA_BASE + DMA_CCR(channel));
+       } else {
+               printk(KERN_ERR "imxdma%d: imx_dma_setup_single bad dmamode\n",
+                      channel);
+               return -EINVAL;
+       }
+
+       __raw_writel(dma_length, DMA_BASE + DMA_CNTR(channel));
+
+       return 0;
+}
+EXPORT_SYMBOL(imx_dma_setup_single);
+
+/**
+ * imx_dma_setup_sg - setup i.MX DMA channel SG list to/from device transfer
+ * @channel: i.MX DMA channel number
+ * @sg: pointer to the scatter-gather list/vector
+ * @sgcount: scatter-gather list hungs count
+ * @dma_length: total length of the transfer request in bytes
+ * @dev_addr: physical device port address
+ * @dmamode: DMA transfer mode, %DMA_MODE_READ from the device to the memory
+ *           or %DMA_MODE_WRITE from memory to the device
+ *
+ * The function sets up DMA channel state and registers to be ready for
+ * transfer specified by provided parameters. The scatter-gather emulation
+ * is set up according to the parameters.
+ *
+ * The full preparation of the transfer requires setup of more register
+ * by the caller before imx_dma_enable() can be called.
+ *
+ * %BLR(channel) holds transfer burst length in bytes, 0 means 64 bytes
+ *
+ * %RSSR(channel) has to be set to the DMA request line source %DMA_REQ_xxx
+ *
+ * %CCR(channel) has to specify transfer parameters, the next settings is
+ * typical for linear or simple scatter-gather transfers if %DMA_MODE_READ is
+ * specified
+ *
+ * %CCR_DMOD_LINEAR | %CCR_DSIZ_32 | %CCR_SMOD_FIFO | %CCR_SSIZ_x
+ *
+ * The typical setup for %DMA_MODE_WRITE is specified by next options
+ * combination
+ *
+ * %CCR_SMOD_LINEAR | %CCR_SSIZ_32 | %CCR_DMOD_FIFO | %CCR_DSIZ_x
+ *
+ * Be careful here and do not mistakenly mix source and target device
+ * port sizes constants, they are really different:
+ * %CCR_SSIZ_8, %CCR_SSIZ_16, %CCR_SSIZ_32,
+ * %CCR_DSIZ_8, %CCR_DSIZ_16, %CCR_DSIZ_32
+ *
+ * Return value: if incorrect parameters are provided -%EINVAL.
+ * Zero indicates success.
+ */
+int
+imx_dma_setup_sg(int channel,
+                struct scatterlist *sg, unsigned int sgcount,
+                unsigned int dma_length, unsigned int dev_addr,
+                dmamode_t dmamode)
+{
+       struct imx_dma_channel *imxdma = &imx_dma_channels[channel];
+
+       if (imxdma->in_use)
+               return -EBUSY;
+
+       imxdma->sg = sg;
+       imxdma->dma_mode = dmamode;
+       imxdma->resbytes = dma_length;
+
+       if (!sg || !sgcount) {
+               printk(KERN_ERR "imxdma%d: imx_dma_setup_sg epty sg list\n",
+                      channel);
+               return -EINVAL;
+       }
+
+       if (!sg->length) {
+               printk(KERN_ERR "imxdma%d: imx_dma_setup_sg zero length\n",
+                      channel);
+               return -EINVAL;
+       }
+
+       if ((dmamode & DMA_MODE_MASK) == DMA_MODE_READ) {
+               pr_debug("imxdma%d: %s sg=%p sgcount=%d total length=%d "
+                       "dev_addr=0x%08x for read\n",
+                       channel, __func__, sg, sgcount, dma_length, dev_addr);
+
+               __raw_writel(dev_addr, DMA_BASE + DMA_SAR(channel));
+               __raw_writel(imxdma->ccr_from_device,
+                               DMA_BASE + DMA_CCR(channel));
+       } else if ((dmamode & DMA_MODE_MASK) == DMA_MODE_WRITE) {
+               pr_debug("imxdma%d: %s sg=%p sgcount=%d total length=%d "
+                       "dev_addr=0x%08x for write\n",
+                       channel, __func__, sg, sgcount, dma_length, dev_addr);
+
+               __raw_writel(dev_addr, DMA_BASE + DMA_DAR(channel));
+               __raw_writel(imxdma->ccr_to_device,
+                               DMA_BASE + DMA_CCR(channel));
+       } else {
+               printk(KERN_ERR "imxdma%d: imx_dma_setup_sg bad dmamode\n",
+                      channel);
+               return -EINVAL;
+       }
+
+       imx_dma_sg_next(channel, sg);
+
+       return 0;
+}
+EXPORT_SYMBOL(imx_dma_setup_sg);
+
+int
+imx_dma_config_channel(int channel, unsigned int config_port,
+       unsigned int config_mem, unsigned int dmareq, int hw_chaining)
+{
+       struct imx_dma_channel *imxdma = &imx_dma_channels[channel];
+       u32 dreq = 0;
+
+       imxdma->hw_chaining = 0;
+
+       if (hw_chaining) {
+               imxdma->hw_chaining = 1;
+               if (!imx_dma_hw_chain(imxdma))
+                       return -EINVAL;
+       }
+
+       if (dmareq)
+               dreq = CCR_REN;
+
+       imxdma->ccr_from_device = config_port | (config_mem << 2) | dreq;
+       imxdma->ccr_to_device = config_mem | (config_port << 2) | dreq;
+
+       __raw_writel(dmareq, DMA_BASE + DMA_RSSR(channel));
+
+       return 0;
+}
+EXPORT_SYMBOL(imx_dma_config_channel);
+
+void imx_dma_config_burstlen(int channel, unsigned int burstlen)
+{
+       __raw_writel(burstlen, DMA_BASE + DMA_BLR(channel));
+}
+EXPORT_SYMBOL(imx_dma_config_burstlen);
+
+/**
+ * imx_dma_setup_handlers - setup i.MX DMA channel end and error notification
+ * handlers
+ * @channel: i.MX DMA channel number
+ * @irq_handler: the pointer to the function called if the transfer
+ *             ends successfully
+ * @err_handler: the pointer to the function called if the premature
+ *             end caused by error occurs
+ * @data: user specified value to be passed to the handlers
+ */
+int
+imx_dma_setup_handlers(int channel,
+                      void (*irq_handler) (int, void *),
+                      void (*err_handler) (int, void *, int),
+                      void *data)
+{
+       struct imx_dma_channel *imxdma = &imx_dma_channels[channel];
+       unsigned long flags;
+
+       if (!imxdma->name) {
+               printk(KERN_CRIT "%s: called for  not allocated channel %d\n",
+                      __func__, channel);
+               return -ENODEV;
+       }
+
+       local_irq_save(flags);
+       __raw_writel(1 << channel, DMA_BASE + DMA_DISR);
+       imxdma->irq_handler = irq_handler;
+       imxdma->err_handler = err_handler;
+       imxdma->data = data;
+       local_irq_restore(flags);
+       return 0;
+}
+EXPORT_SYMBOL(imx_dma_setup_handlers);
+
+/**
+ * imx_dma_setup_progression_handler - setup i.MX DMA channel progression
+ * handlers
+ * @channel: i.MX DMA channel number
+ * @prog_handler: the pointer to the function called if the transfer progresses
+ */
+int
+imx_dma_setup_progression_handler(int channel,
+                       void (*prog_handler) (int, void*, struct scatterlist*))
+{
+       struct imx_dma_channel *imxdma = &imx_dma_channels[channel];
+       unsigned long flags;
+
+       if (!imxdma->name) {
+               printk(KERN_CRIT "%s: called for  not allocated channel %d\n",
+                      __func__, channel);
+               return -ENODEV;
+       }
+
+       local_irq_save(flags);
+       imxdma->prog_handler = prog_handler;
+       local_irq_restore(flags);
+       return 0;
+}
+EXPORT_SYMBOL(imx_dma_setup_progression_handler);
+
+/**
+ * imx_dma_enable - function to start i.MX DMA channel operation
+ * @channel: i.MX DMA channel number
+ *
+ * The channel has to be allocated by driver through imx_dma_request()
+ * or imx_dma_request_by_prio() function.
+ * The transfer parameters has to be set to the channel registers through
+ * call of the imx_dma_setup_single() or imx_dma_setup_sg() function
+ * and registers %BLR(channel), %RSSR(channel) and %CCR(channel) has to
+ * be set prior this function call by the channel user.
+ */
+void imx_dma_enable(int channel)
+{
+       struct imx_dma_channel *imxdma = &imx_dma_channels[channel];
+       unsigned long flags;
+
+       pr_debug("imxdma%d: imx_dma_enable\n", channel);
+
+       if (!imxdma->name) {
+               printk(KERN_CRIT "%s: called for  not allocated channel %d\n",
+                      __func__, channel);
+               return;
+       }
+
+       if (imxdma->in_use)
+               return;
+
+       local_irq_save(flags);
+
+       __raw_writel(1 << channel, DMA_BASE + DMA_DISR);
+       __raw_writel(__raw_readl(DMA_BASE + DMA_DIMR) & ~(1 << channel),
+               DMA_BASE + DMA_DIMR);
+       __raw_writel(__raw_readl(DMA_BASE + DMA_CCR(channel)) | CCR_CEN |
+               CCR_ACRPT,
+               DMA_BASE + DMA_CCR(channel));
+
+#ifdef CONFIG_ARCH_MX2
+       if (imxdma->sg && imx_dma_hw_chain(imxdma)) {
+               imxdma->sg = sg_next(imxdma->sg);
+               if (imxdma->sg) {
+                       u32 tmp;
+                       imx_dma_sg_next(channel, imxdma->sg);
+                       tmp = __raw_readl(DMA_BASE + DMA_CCR(channel));
+                       __raw_writel(tmp | CCR_RPT | CCR_ACRPT,
+                               DMA_BASE + DMA_CCR(channel));
+               }
+       }
+#endif
+       imxdma->in_use = 1;
+
+       local_irq_restore(flags);
+}
+EXPORT_SYMBOL(imx_dma_enable);
+
+/**
+ * imx_dma_disable - stop, finish i.MX DMA channel operatin
+ * @channel: i.MX DMA channel number
+ */
+void imx_dma_disable(int channel)
+{
+       struct imx_dma_channel *imxdma = &imx_dma_channels[channel];
+       unsigned long flags;
+
+       pr_debug("imxdma%d: imx_dma_disable\n", channel);
+
+       if (imx_dma_hw_chain(imxdma))
+               del_timer(&imxdma->watchdog);
+
+       local_irq_save(flags);
+       __raw_writel(__raw_readl(DMA_BASE + DMA_DIMR) | (1 << channel),
+               DMA_BASE + DMA_DIMR);
+       __raw_writel(__raw_readl(DMA_BASE + DMA_CCR(channel)) & ~CCR_CEN,
+               DMA_BASE + DMA_CCR(channel));
+       __raw_writel(1 << channel, DMA_BASE + DMA_DISR);
+       imxdma->in_use = 0;
+       local_irq_restore(flags);
+}
+EXPORT_SYMBOL(imx_dma_disable);
+
+static void imx_dma_watchdog(unsigned long chno)
+{
+       struct imx_dma_channel *imxdma = &imx_dma_channels[chno];
+
+       __raw_writel(0, DMA_BASE + DMA_CCR(chno));
+       imxdma->in_use = 0;
+       imxdma->sg = NULL;
+
+       if (imxdma->err_handler)
+               imxdma->err_handler(chno, imxdma->data, IMX_DMA_ERR_TIMEOUT);
+}
+
+static irqreturn_t dma_err_handler(int irq, void *dev_id)
+{
+       int i, disr;
+       struct imx_dma_channel *imxdma;
+       unsigned int err_mask;
+       int errcode;
+
+       disr = __raw_readl(DMA_BASE + DMA_DISR);
+
+       err_mask = __raw_readl(DMA_BASE + DMA_DBTOSR) |
+                  __raw_readl(DMA_BASE + DMA_DRTOSR) |
+                  __raw_readl(DMA_BASE + DMA_DSESR)  |
+                  __raw_readl(DMA_BASE + DMA_DBOSR);
+
+       if (!err_mask)
+               return IRQ_HANDLED;
+
+       __raw_writel(disr & err_mask, DMA_BASE + DMA_DISR);
+
+       for (i = 0; i < IMX_DMA_CHANNELS; i++) {
+               if (!(err_mask & (1 << i)))
+                       continue;
+               imxdma = &imx_dma_channels[i];
+               errcode = 0;
+
+               if (__raw_readl(DMA_BASE + DMA_DBTOSR) & (1 << i)) {
+                       __raw_writel(1 << i, DMA_BASE + DMA_DBTOSR);
+                       errcode |= IMX_DMA_ERR_BURST;
+               }
+               if (__raw_readl(DMA_BASE + DMA_DRTOSR) & (1 << i)) {
+                       __raw_writel(1 << i, DMA_BASE + DMA_DRTOSR);
+                       errcode |= IMX_DMA_ERR_REQUEST;
+               }
+               if (__raw_readl(DMA_BASE + DMA_DSESR) & (1 << i)) {
+                       __raw_writel(1 << i, DMA_BASE + DMA_DSESR);
+                       errcode |= IMX_DMA_ERR_TRANSFER;
+               }
+               if (__raw_readl(DMA_BASE + DMA_DBOSR) & (1 << i)) {
+                       __raw_writel(1 << i, DMA_BASE + DMA_DBOSR);
+                       errcode |= IMX_DMA_ERR_BUFFER;
+               }
+               if (imxdma->name && imxdma->err_handler) {
+                       imxdma->err_handler(i, imxdma->data, errcode);
+                       continue;
+               }
+
+               imx_dma_channels[i].sg = NULL;
+
+               printk(KERN_WARNING
+                      "DMA timeout on channel %d (%s) -%s%s%s%s\n",
+                      i, imxdma->name,
+                      errcode & IMX_DMA_ERR_BURST ?    " burst" : "",
+                      errcode & IMX_DMA_ERR_REQUEST ?  " request" : "",
+                      errcode & IMX_DMA_ERR_TRANSFER ? " transfer" : "",
+                      errcode & IMX_DMA_ERR_BUFFER ?   " buffer" : "");
+       }
+       return IRQ_HANDLED;
+}
+
+static void dma_irq_handle_channel(int chno)
+{
+       struct imx_dma_channel *imxdma = &imx_dma_channels[chno];
+
+       if (!imxdma->name) {
+               /*
+                * IRQ for an unregistered DMA channel:
+                * let's clear the interrupts and disable it.
+                */
+               printk(KERN_WARNING
+                      "spurious IRQ for DMA channel %d\n", chno);
+               return;
+       }
+
+       if (imxdma->sg) {
+               u32 tmp;
+               struct scatterlist *current_sg = imxdma->sg;
+               imxdma->sg = sg_next(imxdma->sg);
+
+               if (imxdma->sg) {
+                       imx_dma_sg_next(chno, imxdma->sg);
+
+                       tmp = __raw_readl(DMA_BASE + DMA_CCR(chno));
+
+                       if (imx_dma_hw_chain(imxdma)) {
+                               /* FIXME: The timeout should probably be
+                                * configurable
+                                */
+                               mod_timer(&imxdma->watchdog,
+                                       jiffies + msecs_to_jiffies(500));
+
+                               tmp |= CCR_CEN | CCR_RPT | CCR_ACRPT;
+                               __raw_writel(tmp, DMA_BASE +
+                                               DMA_CCR(chno));
+                       } else {
+                               __raw_writel(tmp & ~CCR_CEN, DMA_BASE +
+                                               DMA_CCR(chno));
+                               tmp |= CCR_CEN;
+                       }
+
+                       __raw_writel(tmp, DMA_BASE + DMA_CCR(chno));
+
+                       if (imxdma->prog_handler)
+                               imxdma->prog_handler(chno, imxdma->data,
+                                               current_sg);
+
+                       return;
+               }
+
+               if (imx_dma_hw_chain(imxdma)) {
+                       del_timer(&imxdma->watchdog);
+                       return;
+               }
+       }
+
+       __raw_writel(0, DMA_BASE + DMA_CCR(chno));
+       imxdma->in_use = 0;
+       if (imxdma->irq_handler)
+               imxdma->irq_handler(chno, imxdma->data);
+}
+
+static irqreturn_t dma_irq_handler(int irq, void *dev_id)
+{
+       int i, disr;
+
+#ifdef CONFIG_ARCH_MX2
+       dma_err_handler(irq, dev_id);
+#endif
+
+       disr = __raw_readl(DMA_BASE + DMA_DISR);
+
+       pr_debug("imxdma: dma_irq_handler called, disr=0x%08x\n",
+                    disr);
+
+       __raw_writel(disr, DMA_BASE + DMA_DISR);
+       for (i = 0; i < IMX_DMA_CHANNELS; i++) {
+               if (disr & (1 << i))
+                       dma_irq_handle_channel(i);
+       }
+
+       return IRQ_HANDLED;
+}
+
+/**
+ * imx_dma_request - request/allocate specified channel number
+ * @channel: i.MX DMA channel number
+ * @name: the driver/caller own non-%NULL identification
+ */
+int imx_dma_request(int channel, const char *name)
+{
+       struct imx_dma_channel *imxdma = &imx_dma_channels[channel];
+       unsigned long flags;
+       int ret;
+
+       /* basic sanity checks */
+       if (!name)
+               return -EINVAL;
+
+       if (channel >= IMX_DMA_CHANNELS) {
+               printk(KERN_CRIT "%s: called for  non-existed channel %d\n",
+                      __func__, channel);
+               return -EINVAL;
+       }
+
+       local_irq_save(flags);
+       if (imxdma->name) {
+               local_irq_restore(flags);
+               return -EBUSY;
+       }
+
+#ifdef CONFIG_ARCH_MX2
+       ret = request_irq(MXC_INT_DMACH0 + channel, dma_irq_handler, 0, "DMA",
+                       NULL);
+       if (ret) {
+               printk(KERN_CRIT "Can't register IRQ %d for DMA channel %d\n",
+                               MXC_INT_DMACH0 + channel, channel);
+               return ret;
+       }
+       init_timer(&imxdma->watchdog);
+       imxdma->watchdog.function = &imx_dma_watchdog;
+       imxdma->watchdog.data = channel;
+#endif
+
+       imxdma->name = name;
+       imxdma->irq_handler = NULL;
+       imxdma->err_handler = NULL;
+       imxdma->data = NULL;
+       imxdma->sg = NULL;
+
+       local_irq_restore(flags);
+       return 0;
+}
+EXPORT_SYMBOL(imx_dma_request);
+
+/**
+ * imx_dma_free - release previously acquired channel
+ * @channel: i.MX DMA channel number
+ */
+void imx_dma_free(int channel)
+{
+       unsigned long flags;
+       struct imx_dma_channel *imxdma = &imx_dma_channels[channel];
+
+       if (!imxdma->name) {
+               printk(KERN_CRIT
+                      "%s: trying to free free channel %d\n",
+                      __func__, channel);
+               return;
+       }
+
+       local_irq_save(flags);
+       /* Disable interrupts */
+       __raw_writel(__raw_readl(DMA_BASE + DMA_DIMR) | (1 << channel),
+               DMA_BASE + DMA_DIMR);
+       __raw_writel(__raw_readl(DMA_BASE + DMA_CCR(channel)) & ~CCR_CEN,
+               DMA_BASE + DMA_CCR(channel));
+       imxdma->name = NULL;
+
+#ifdef CONFIG_ARCH_MX2
+       free_irq(MXC_INT_DMACH0 + channel, NULL);
+#endif
+
+       local_irq_restore(flags);
+}
+EXPORT_SYMBOL(imx_dma_free);
+
+/**
+ * imx_dma_request_by_prio - find and request some of free channels best
+ * suiting requested priority
+ * @channel: i.MX DMA channel number
+ * @name: the driver/caller own non-%NULL identification
+ *
+ * This function tries to find a free channel in the specified priority group
+ * This function tries to find a free channel in the specified priority group
+ * if the priority cannot be achieved it tries to look for free channel
+ * in the higher and then even lower priority groups.
+ *
+ * Return value: If there is no free channel to allocate, -%ENODEV is returned.
+ *               On successful allocation channel is returned.
+ */
+int imx_dma_request_by_prio(const char *name, enum imx_dma_prio prio)
+{
+       int i;
+       int best;
+
+       switch (prio) {
+       case (DMA_PRIO_HIGH):
+               best = 8;
+               break;
+       case (DMA_PRIO_MEDIUM):
+               best = 4;
+               break;
+       case (DMA_PRIO_LOW):
+       default:
+               best = 0;
+               break;
+       }
+
+       for (i = best; i < IMX_DMA_CHANNELS; i++)
+               if (!imx_dma_request(i, name))
+                       return i;
+
+       for (i = best - 1; i >= 0; i--)
+               if (!imx_dma_request(i, name))
+                       return i;
+
+       printk(KERN_ERR "%s: no free DMA channel found\n", __func__);
+
+       return -ENODEV;
+}
+EXPORT_SYMBOL(imx_dma_request_by_prio);
+
+static int __init imx_dma_init(void)
+{
+       int ret = 0;
+       int i;
+
+       dma_clk = clk_get(NULL, "dma_clk");
+       clk_enable(dma_clk);
+
+       /* reset DMA module */
+       __raw_writel(DCR_DRST, DMA_BASE + DMA_DCR);
+
+#ifdef CONFIG_ARCH_MX1
+       ret = request_irq(DMA_INT, dma_irq_handler, 0, "DMA", NULL);
+       if (ret) {
+               printk(KERN_CRIT "Wow!  Can't register IRQ for DMA\n");
+               return ret;
+       }
+
+       ret = request_irq(DMA_ERR, dma_err_handler, 0, "DMA", NULL);
+       if (ret) {
+               printk(KERN_CRIT "Wow!  Can't register ERRIRQ for DMA\n");
+               free_irq(DMA_INT, NULL);
+               return ret;
+       }
+#endif
+       /* enable DMA module */
+       __raw_writel(DCR_DEN, DMA_BASE + DMA_DCR);
+
+       /* clear all interrupts */
+       __raw_writel((1 << IMX_DMA_CHANNELS) - 1, DMA_BASE + DMA_DISR);
+
+       /* disable interrupts */
+       __raw_writel((1 << IMX_DMA_CHANNELS) - 1, DMA_BASE + DMA_DIMR);
+
+       for (i = 0; i < IMX_DMA_CHANNELS; i++) {
+               imx_dma_channels[i].sg = NULL;
+               imx_dma_channels[i].dma_num = i;
+       }
+
+       return ret;
+}
+
+arch_initcall(imx_dma_init);
index 1bc6fb0f9a8380d18e55535eab5c669ef6dddc2d..745b48864f930f95b268d1706132fd3cbfbfe0fb 100644 (file)
@@ -90,6 +90,9 @@
 #define PBC_INTMASK_CLEAR_REG  (PBC_INTMASK_CLEAR + PBC_BASE_ADDRESS)
 #define EXPIO_PARENT_INT       IOMUX_TO_IRQ(MX31_PIN_GPIO1_4)
 
+#define MXC_EXP_IO_BASE                (MXC_MAX_INT_LINES + MXC_MAX_GPIO_LINES)
+#define MXC_IRQ_TO_EXPIO(irq)  ((irq) - MXC_EXP_IO_BASE)
+
 #define EXPIO_INT_LOW_BAT      (MXC_EXP_IO_BASE + 0)
 #define EXPIO_INT_PB_IRQ       (MXC_EXP_IO_BASE + 1)
 #define EXPIO_INT_OTG_FS_OVR   (MXC_EXP_IO_BASE + 2)
index 24caa2b7c91d9f1b219fb431065013da15a22f65..d21f78e7881945e094be4953d461cd5986688ee9 100644 (file)
@@ -39,7 +39,7 @@ struct clk {
        /* Register bit position for clock's enable/disable control. */
        u8 enable_shift;
        /* Register address for clock's enable/disable control. */
-       u32 enable_reg;
+       void __iomem *enable_reg;
        u32 flags;
        /* get the current clock rate (always a fresh value) */
        unsigned long (*get_rate) (struct clk *);
index a6d2e24aab15ab1859416045f4d3eac7468b036f..6350287a59b9089acde56fe2cd535c1625773eea 100644 (file)
 #ifndef __ASM_ARCH_MXC_COMMON_H__
 #define __ASM_ARCH_MXC_COMMON_H__
 
+struct platform_device;
+
 extern void mxc_map_io(void);
 extern void mxc_init_irq(void);
 extern void mxc_timer_init(const char *clk_timer);
 extern int mxc_clocks_init(unsigned long fref);
 extern int mxc_register_gpios(void);
+extern int mxc_register_device(struct platform_device *pdev, void *data);
 
 #endif
diff --git a/arch/arm/plat-mxc/include/mach/dma-mx1-mx2.h b/arch/arm/plat-mxc/include/mach/dma-mx1-mx2.h
new file mode 100644 (file)
index 0000000..e85fd94
--- /dev/null
@@ -0,0 +1,89 @@
+/*
+ *  linux/arch/arm/plat-mxc/include/mach/dma-mx1-mx2.h
+ *
+ *  i.MX DMA registration and IRQ dispatching
+ *
+ * Copyright 2006 Pavel Pisa <pisa@cmp.felk.cvut.cz>
+ * Copyright 2008 Juergen Beisert, <kernel@pengutronix.de>
+ * Copyright 2008 Sascha Hauer, <s.hauer@pengutronix.de>
+ *
+ * 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 Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+
+#include <asm/dma.h>
+
+#ifndef __ASM_ARCH_MXC_DMA_H
+#define __ASM_ARCH_MXC_DMA_H
+
+#define IMX_DMA_CHANNELS  16
+
+#define DMA_BASE IO_ADDRESS(DMA_BASE_ADDR)
+
+#define IMX_DMA_MEMSIZE_32     (0 << 4)
+#define IMX_DMA_MEMSIZE_8      (1 << 4)
+#define IMX_DMA_MEMSIZE_16     (2 << 4)
+#define IMX_DMA_TYPE_LINEAR    (0 << 10)
+#define IMX_DMA_TYPE_2D                (1 << 10)
+#define IMX_DMA_TYPE_FIFO      (2 << 10)
+
+#define IMX_DMA_ERR_BURST     (1 << 0)
+#define IMX_DMA_ERR_REQUEST   (1 << 1)
+#define IMX_DMA_ERR_TRANSFER  (1 << 2)
+#define IMX_DMA_ERR_BUFFER    (1 << 3)
+#define IMX_DMA_ERR_TIMEOUT   (1 << 4)
+
+int
+imx_dma_config_channel(int channel, unsigned int config_port,
+       unsigned int config_mem, unsigned int dmareq, int hw_chaining);
+
+void
+imx_dma_config_burstlen(int channel, unsigned int burstlen);
+
+int
+imx_dma_setup_single(int channel, dma_addr_t dma_address,
+               unsigned int dma_length, unsigned int dev_addr,
+               dmamode_t dmamode);
+
+int
+imx_dma_setup_sg(int channel, struct scatterlist *sg,
+               unsigned int sgcount, unsigned int dma_length,
+               unsigned int dev_addr, dmamode_t dmamode);
+
+int
+imx_dma_setup_handlers(int channel,
+               void (*irq_handler) (int, void *),
+               void (*err_handler) (int, void *, int), void *data);
+
+int
+imx_dma_setup_progression_handler(int channel,
+               void (*prog_handler) (int, void*, struct scatterlist*));
+
+void imx_dma_enable(int channel);
+
+void imx_dma_disable(int channel);
+
+int imx_dma_request(int channel, const char *name);
+
+void imx_dma_free(int channel);
+
+enum imx_dma_prio {
+       DMA_PRIO_HIGH = 0,
+       DMA_PRIO_MEDIUM = 1,
+       DMA_PRIO_LOW = 2
+};
+
+int imx_dma_request_by_prio(const char *name, enum imx_dma_prio prio);
+
+#endif /* _ASM_ARCH_MXC_DMA_H */
index b542433afb1b45358de508e7bc09a91085aa2989..11632028f7d1ba6f44610c373b52b2721ea81cf4 100644 (file)
@@ -9,11 +9,17 @@
  * published by the Free Software Foundation.
  */
 
+#define AVIC_NIMASK    0x04
+
        @ this macro disables fast irq (not implemented)
        .macro  disable_fiq
        .endm
 
        .macro  get_irqnr_preamble, base, tmp
+       ldr     \base, =AVIC_IO_ADDRESS(AVIC_BASE_ADDR)
+#ifdef CONFIG_MXC_IRQ_PRIOR
+       ldr     r4, [\base, #AVIC_NIMASK]
+#endif
        .endm
 
        .macro  arch_ret_to_user, tmp1, tmp2
@@ -23,7 +29,6 @@
        @ and returns its number in irqnr
        @ and returns if an interrupt occured in irqstat
        .macro  get_irqnr_and_base, irqnr, irqstat, base, tmp
-       ldr     \base, =AVIC_IO_ADDRESS(AVIC_BASE_ADDR)
        @ Load offset & priority of the highest priority
        @ interrupt pending from AVIC_NIVECSR
        ldr     \irqstat, [\base, #0x40]
        mov     \irqnr, \irqstat, asr #16
        @ set zero flag if IRQ + 1 == 0
        adds    \tmp, \irqnr, #1
+#ifdef CONFIG_MXC_IRQ_PRIOR
+       bicne   \tmp, \irqstat, #0xFFFFFFE0
+       strne   \tmp, [\base, #AVIC_NIMASK]
+       streq   r4, [\base, #AVIC_NIMASK]
+#endif
        .endm
 
        @ irq priority table (not used)
index 076d37b38eb28488cc6715aaebdea1cf00e7ba07..3d09bfd6c53df8402a6c7033f2ba3b3805afcc3f 100644 (file)
@@ -247,6 +247,11 @@ extern int mxc_gpio_setup_multiple_pins(const int *pin_list, unsigned count,
 #endif
 
 #ifdef CONFIG_ARCH_MX2
+#define PA0_PF_USBH2_CLK       (GPIO_PORTA | GPIO_PF | 0)
+#define PA1_PF_USBH2_DIR       (GPIO_PORTA | GPIO_PF | 1)
+#define PA2_PF_USBH2_DATA7     (GPIO_PORTA | GPIO_PF | 2)
+#define PA3_PF_USBH2_NXT       (GPIO_PORTA | GPIO_PF | 3)
+#define PA4_PF_USBH2_STP       (GPIO_PORTA | GPIO_PF | 4)
 #define PA5_PF_LSCLK           (GPIO_PORTA | GPIO_OUT | GPIO_PF | 5)
 #define PA6_PF_LD0             (GPIO_PORTA | GPIO_OUT | GPIO_PF | 6)
 #define PA7_PF_LD1             (GPIO_PORTA | GPIO_OUT | GPIO_PF | 7)
@@ -294,6 +299,16 @@ extern int mxc_gpio_setup_multiple_pins(const int *pin_list, unsigned count,
 #define PB20_AF_UART5_CTS      (GPIO_PORTB | GPIO_OUT | GPIO_AF | 20)
 #define PB21_PF_CSI_HSYNC      (GPIO_PORTB | GPIO_OUT | GPIO_PF | 21)
 #define PB21_AF_UART5_RTS      (GPIO_PORTB | GPIO_IN  | GPIO_AF | 21)
+#define PB22_PF_USBH1_SUSP     (GPIO_PORTB | GPIO_PF | 22)
+#define PB23_PF_USB_PWR                (GPIO_PORTB | GPIO_PF | 23)
+#define PB24_PF_USB_OC_B       (GPIO_PORTB | GPIO_PF | 24)
+#define PB25_PF_USBH1_RCV      (GPIO_PORTB | GPIO_PF | 25)
+#define PB26_PF_USBH1_FS       (GPIO_PORTB | GPIO_PF | 26)
+#define PB27_PF_USBH1_OE_B     (GPIO_PORTB | GPIO_PF | 27)
+#define PB28_PF_USBH1_TXDM     (GPIO_PORTB | GPIO_PF | 28)
+#define PB29_PF_USBH1_TXDP     (GPIO_PORTB | GPIO_PF | 29)
+#define PB30_PF_USBH1_RXDM     (GPIO_PORTB | GPIO_PF | 30)
+#define PB31_PF_USBH1_RXDP     (GPIO_PORTB | GPIO_PF | 31)
 #define PB26_AF_UART4_RTS      (GPIO_PORTB | GPIO_IN  | GPIO_PF | 26)
 #define PB28_AF_UART4_TXD      (GPIO_PORTB | GPIO_OUT | GPIO_AF | 28)
 #define PB29_AF_UART4_CTS      (GPIO_PORTB | GPIO_OUT | GPIO_AF | 29)
@@ -335,8 +350,15 @@ extern int mxc_gpio_setup_multiple_pins(const int *pin_list, unsigned count,
 #define PD16_AIN_FEC_TX_ER     (GPIO_PORTD | GPIO_OUT | GPIO_AIN | 16)
 #define PD17_PF_I2C_DATA       (GPIO_PORTD | GPIO_OUT | GPIO_PF | 17)
 #define PD18_PF_I2C_CLK                (GPIO_PORTD | GPIO_OUT | GPIO_PF | 18)
+#define PD19_AF_USBH2_DATA4    (GPIO_PORTD | GPIO_AF | 19)
+#define PD20_AF_USBH2_DATA3    (GPIO_PORTD | GPIO_AF | 20)
+#define PD21_AF_USBH2_DATA6    (GPIO_PORTD | GPIO_AF | 21)
+#define PD22_AF_USBH2_DATA0    (GPIO_PORTD | GPIO_AF | 22)
+#define PD23_AF_USBH2_DATA2    (GPIO_PORTD | GPIO_AF | 23)
+#define PD24_AF_USBH2_DATA1    (GPIO_PORTD | GPIO_AF | 24)
 #define PD25_PF_CSPI1_RDY      (GPIO_PORTD | GPIO_OUT | GPIO_PF  | 25)
 #define PD26_PF_CSPI1_SS2      (GPIO_PORTD | GPIO_OUT | GPIO_PF  | 26)
+#define PD26_AF_USBH2_DATA5     (GPIO_PORTD | GPIO_AF | 26)
 #define PD27_PF_CSPI1_SS1      (GPIO_PORTD | GPIO_OUT | GPIO_PF  | 27)
 #define PD28_PF_CSPI1_SS0      (GPIO_PORTD | GPIO_OUT | GPIO_PF  | 28)
 #define PD29_PF_CSPI1_SCLK     (GPIO_PORTD | GPIO_OUT | GPIO_PF  | 29)
@@ -355,6 +377,8 @@ extern int mxc_gpio_setup_multiple_pins(const int *pin_list, unsigned count,
 #define PE13_PF_UART1_RXD      (GPIO_PORTE | GPIO_IN  | GPIO_PF | 13)
 #define PE14_PF_UART1_CTS      (GPIO_PORTE | GPIO_OUT | GPIO_PF | 14)
 #define PE15_PF_UART1_RTS      (GPIO_PORTE | GPIO_IN  | GPIO_PF | 15)
+#define PE16_AF_RTCK           (GPIO_PORTE | GPIO_OUT | GPIO_AF | 16)
+#define PE16_PF_RTCK           (GPIO_PORTE | GPIO_OUT | GPIO_PF | 16)
 #define PE18_AF_CSPI3_MISO     (GPIO_PORTE | GPIO_IN  | GPIO_AF | 18)
 #define PE21_AF_CSPI3_SS       (GPIO_PORTE | GPIO_OUT | GPIO_AF | 21)
 #define PE22_AF_CSPI3_MOSI     (GPIO_PORTE | GPIO_OUT | GPIO_AF | 22)
index 7509e7692f08e5ae00ba6423ce18c40332a282aa..c9f39c2fb8c64083e437fe91c85f6cbad686a77b 100644 (file)
@@ -491,6 +491,26 @@ enum iomux_pins {
 #define MX31_PIN_RTS1__RTS1            IOMUX_MODE(MX31_PIN_RTS1, IOMUX_CONFIG_FUNC)
 #define MX31_PIN_TXD1__TXD1            IOMUX_MODE(MX31_PIN_TXD1, IOMUX_CONFIG_FUNC)
 #define MX31_PIN_RXD1__RXD1            IOMUX_MODE(MX31_PIN_RXD1, IOMUX_CONFIG_FUNC)
+#define MX31_PIN_CSPI1_MOSI__MOSI      IOMUX_MODE(MX31_PIN_CSPI1_MOSI, IOMUX_CONFIG_FUNC)
+#define MX31_PIN_CSPI1_MISO__MISO      IOMUX_MODE(MX31_PIN_CSPI1_MISO, IOMUX_CONFIG_FUNC)
+#define MX31_PIN_CSPI1_SCLK__SCLK      IOMUX_MODE(MX31_PIN_CSPI1_SCLK, IOMUX_CONFIG_FUNC)
+#define MX31_PIN_CSPI1_SPI_RDY__SPI_RDY        IOMUX_MODE(MX31_PIN_CSPI1_SPI_RDY, IOMUX_CONFIG_FUNC)
+#define MX31_PIN_CSPI1_SS0__SS0                IOMUX_MODE(MX31_PIN_CSPI1_SS0, IOMUX_CONFIG_FUNC)
+#define MX31_PIN_CSPI1_SS1__SS1                IOMUX_MODE(MX31_PIN_CSPI1_SS1, IOMUX_CONFIG_FUNC)
+#define MX31_PIN_CSPI1_SS2__SS2                IOMUX_MODE(MX31_PIN_CSPI1_SS2, IOMUX_CONFIG_FUNC)
+#define MX31_PIN_CSPI2_MOSI__MOSI      IOMUX_MODE(MX31_PIN_CSPI2_MOSI, IOMUX_CONFIG_FUNC)
+#define MX31_PIN_CSPI2_MISO__MISO      IOMUX_MODE(MX31_PIN_CSPI2_MISO, IOMUX_CONFIG_FUNC)
+#define MX31_PIN_CSPI2_SCLK__SCLK      IOMUX_MODE(MX31_PIN_CSPI2_SCLK, IOMUX_CONFIG_FUNC)
+#define MX31_PIN_CSPI2_SPI_RDY__SPI_RDY        IOMUX_MODE(MX31_PIN_CSPI2_SPI_RDY, IOMUX_CONFIG_FUNC)
+#define MX31_PIN_CSPI2_SS0__SS0                IOMUX_MODE(MX31_PIN_CSPI2_SS0, IOMUX_CONFIG_FUNC)
+#define MX31_PIN_CSPI2_SS1__SS1                IOMUX_MODE(MX31_PIN_CSPI2_SS1, IOMUX_CONFIG_FUNC)
+#define MX31_PIN_CSPI2_SS2__SS2                IOMUX_MODE(MX31_PIN_CSPI2_SS2, IOMUX_CONFIG_FUNC)
+#define MX31_PIN_CSPI3_MOSI__MOSI      IOMUX_MODE(MX31_PIN_CSPI3_MOSI, IOMUX_CONFIG_FUNC)
+#define MX31_PIN_CSPI3_MISO__MISO      IOMUX_MODE(MX31_PIN_CSPI3_MISO, IOMUX_CONFIG_FUNC)
+#define MX31_PIN_CSPI3_SCLK__SCLK      IOMUX_MODE(MX31_PIN_CSPI3_SCLK, IOMUX_CONFIG_FUNC)
+#define MX31_PIN_CSPI3_SPI_RDY__SPI_RDY        IOMUX_MODE(MX31_PIN_CSPI3_SPI_RDY, IOMUX_CONFIG_FUNC)
+/*XXX: The SS0, SS1, SS2, SS3 lines of spi3 are multiplexed by cspi2_ss0, cspi2_ss1, cspi1_ss0
+ * cspi1_ss1*/
 
 /*
  * This function configures the pad value for a IOMUX pin.
index 228c4f68ccdf1bce6fcaa8a7a1f56bd4689bc716..b55bba35e18a83e002bceb3d45835b3aa8ee9f3c 100644 (file)
@@ -12,5 +12,6 @@
 #define __ASM_ARCH_MXC_IRQS_H__
 
 #include <mach/hardware.h>
+extern void imx_irq_set_priority(unsigned char irq, unsigned char prio);
 
 #endif /* __ASM_ARCH_MXC_IRQS_H__ */
index 212ecc246626f31b2355905ca62babf89f096fe6..a86db64744a1d56fbdefbf390110076da1b70fef 100644 (file)
  * it returns 0xDEADBEEF
  */
 #define IO_ADDRESS(x)   \
+       (void __iomem *) \
        (((x >= AIPI_BASE_ADDR) && (x < (AIPI_BASE_ADDR + AIPI_SIZE))) ? \
                AIPI_IO_ADDRESS(x) : \
        ((x >= SAHB1_BASE_ADDR) && (x < (SAHB1_BASE_ADDR + SAHB1_SIZE))) ? \
index a7373e4a56cba14a0109d4c60d24c7ca545fcffd..0536f8917bc0ee415bb4275ed87862133e67a069 100644 (file)
  * it returns 0xDEADBEEF
  */
 #define IO_ADDRESS(x)   \
+       (void __iomem *) \
        (((x >= IRAM_BASE_ADDR) && (x < (IRAM_BASE_ADDR + IRAM_SIZE))) ? IRAM_IO_ADDRESS(x):\
        ((x >= L2CC_BASE_ADDR) && (x < (L2CC_BASE_ADDR + L2CC_SIZE))) ? L2CC_IO_ADDRESS(x):\
        ((x >= AIPS1_BASE_ADDR) && (x < (AIPS1_BASE_ADDR + AIPS1_SIZE))) ? AIPS1_IO_ADDRESS(x):\
index 332eda4dbd3b43eaea008ede9aaf3ac004895723..f6caab0621316e3597e226c1a33fd63d22094be5 100644 (file)
 # define cpu_is_mx27() (0)
 #endif
 
+#if defined(CONFIG_ARCH_MX3) || defined(CONFIG_ARCH_MX2)
+#define CSCR_U(n) (IO_ADDRESS(WEIM_BASE_ADDR) + n * 0x10)
+#define CSCR_L(n) (IO_ADDRESS(WEIM_BASE_ADDR) + n * 0x10 + 0x4)
+#define CSCR_A(n) (IO_ADDRESS(WEIM_BASE_ADDR) + n * 0x10 + 0x8)
+#endif
+
 #endif /*  __ASM_ARCH_MXC_H__ */
index 1053b666c676fd5217226fd3301ca90d23ca6e3f..d862c9e5f8dbc935a7f89ba5576746186427eb86 100644 (file)
@@ -18,7 +18,7 @@
  */
 
 #include <linux/irq.h>
-#include <asm/io.h>
+#include <linux/io.h>
 #include <mach/common.h>
 
 #define AVIC_BASE              IO_ADDRESS(AVIC_BASE_ADDR)
 #define AVIC_INTENABLEL                (AVIC_BASE + 0x14)      /* int enable reg low */
 #define AVIC_INTTYPEH          (AVIC_BASE + 0x18)      /* int type reg high */
 #define AVIC_INTTYPEL          (AVIC_BASE + 0x1C)      /* int type reg low */
-#define AVIC_NIPRIORITY7       (AVIC_BASE + 0x20)      /* norm int priority lvl7 */
-#define AVIC_NIPRIORITY6       (AVIC_BASE + 0x24)      /* norm int priority lvl6 */
-#define AVIC_NIPRIORITY5       (AVIC_BASE + 0x28)      /* norm int priority lvl5 */
-#define AVIC_NIPRIORITY4       (AVIC_BASE + 0x2C)      /* norm int priority lvl4 */
-#define AVIC_NIPRIORITY3       (AVIC_BASE + 0x30)      /* norm int priority lvl3 */
-#define AVIC_NIPRIORITY2       (AVIC_BASE + 0x34)      /* norm int priority lvl2 */
-#define AVIC_NIPRIORITY1       (AVIC_BASE + 0x38)      /* norm int priority lvl1 */
-#define AVIC_NIPRIORITY0       (AVIC_BASE + 0x3C)      /* norm int priority lvl0 */
+#define AVIC_NIPRIORITY(x)     (AVIC_BASE + (0x20 + 4 * (7 - (x)))) /* int priority */
 #define AVIC_NIVECSR           (AVIC_BASE + 0x40)      /* norm int vector/status */
 #define AVIC_FIVECSR           (AVIC_BASE + 0x44)      /* fast int vector/status */
 #define AVIC_INTSRCH           (AVIC_BASE + 0x48)      /* int source reg high */
 #define IIM_PROD_REV_SH                3
 #define IIM_PROD_REV_LEN       5
 
+#ifdef CONFIG_MXC_IRQ_PRIOR
+void imx_irq_set_priority(unsigned char irq, unsigned char prio)
+{
+       unsigned int temp;
+       unsigned int mask = 0x0F << irq % 8 * 4;
+
+       if (irq > 63)
+               return;
+
+       temp = __raw_readl(AVIC_NIPRIORITY(irq / 8));
+       temp &= ~mask;
+       temp |= prio & mask;
+
+       __raw_writel(temp, AVIC_NIPRIORITY(irq / 8));
+}
+EXPORT_SYMBOL(imx_irq_set_priority);
+#endif
+
 /* Disable interrupt number "irq" in the AVIC */
 static void mxc_mask_irq(unsigned int irq)
 {
@@ -101,10 +112,9 @@ void __init mxc_init_irq(void)
                set_irq_flags(i, IRQF_VALID);
        }
 
-       /* Set WDOG2's interrupt the highest priority level (bit 28-31) */
-       reg = __raw_readl(AVIC_NIPRIORITY6);
-       reg |= (0xF << 28);
-       __raw_writel(reg, AVIC_NIPRIORITY6);
+       /* Set default priority value (0) for all IRQ's */
+       for (i = 0; i < 8; i++)
+               __raw_writel(0, AVIC_NIPRIORITY(i));
 
        /* init architectures chained interrupt handler */
        mxc_register_gpios();
index 197974defbe4f4b0e41ffebf2aae1f2c96dc6c00..bf6a10c5fc4ffdfd5f9abb74bec8da1c1140e57e 100644 (file)
@@ -22,8 +22,7 @@
 #include <linux/platform_device.h>
 #include <linux/cpufreq.h>
 #include <linux/debugfs.h>
-
-#include <asm/io.h>
+#include <linux/io.h>
 
 #include <mach/clock.h>
 
index f4dff423ae7c19569adf3302f7851a527b595360..8bdf0ead0cf36ec58316a5a49bc26813a92450ae 100644 (file)
 #include <linux/serial_8250.h>
 #include <linux/serial_reg.h>
 #include <linux/clk.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
 #include <asm/system.h>
 #include <asm/pgtable.h>
 #include <asm/mach/map.h>
-#include <asm/io.h>
 #include <asm/setup.h>
 
 #include <mach/common.h>
index ae1de308aaad2e5c9db136e8c9ed3d4841db976d..b2690242a3902c0ec43374c1837b2842c65c4e19 100644 (file)
@@ -20,9 +20,9 @@
 #include <linux/init.h>
 #include <linux/err.h>
 #include <linux/clk.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/system.h>
 
 #define VERY_HI_RATE   900000000
index 5b73bb274452b9b55b4567082bbd16a208044033..e31154b15d9ec1bfec395891709558694272fdeb 100644 (file)
@@ -12,9 +12,9 @@
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/platform_device.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 
 #include <mach/board.h>
 #include <mach/gpio.h>
index 9422dee7de84e778739d61fdb6dad2d2c984f847..2f4c0cabfd341fbaa2d54e0fba2673c8d0ec383b 100644 (file)
@@ -11,8 +11,8 @@
 #include <linux/init.h>
 #include <linux/platform_device.h>
 #include <linux/leds.h>
+#include <linux/io.h>
 
-#include <asm/io.h>
 #include <mach/hardware.h>
 #include <asm/leds.h>
 #include <asm/system.h>
index bc1cf30c83e0d36360eab2b64b19309f58c3c90f..b38410f262031a2f22e55bb2cbdf1265bec062ee 100644 (file)
@@ -13,9 +13,9 @@
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/platform_device.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/mach-types.h>
 #include <asm/mach/map.h>
 
index 743a4abcd85d99f6a23bb897be2315b57012fc6f..606fcffdcefcc98cd69f02c0f4f6225e72df8929 100644 (file)
@@ -32,9 +32,9 @@
 #include <linux/list.h>
 #include <linux/clk.h>
 #include <linux/delay.h>
+#include <linux/io.h>
 #include <mach/hardware.h>
 #include <mach/dmtimer.h>
-#include <asm/io.h>
 #include <mach/irqs.h>
 
 /* register offsets */
index 17a92a31e74670213ce0196d8e17107f2589f3bd..ce6b4baeedec416aa48d64f17872e799079cd328 100644 (file)
@@ -27,9 +27,9 @@
 #include <linux/init.h>
 #include <linux/platform_device.h>
 #include <linux/bootmem.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/mach/map.h>
 
 #include <mach/board.h>
index 9e1341ebc14e8842646ae8a53fb2aa9307031b69..5935ae4e550b4f5514a211d897827f933e592295 100644 (file)
@@ -17,6 +17,7 @@
 #include <linux/sysdev.h>
 #include <linux/err.h>
 #include <linux/clk.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
 #include <asm/irq.h>
@@ -24,8 +25,6 @@
 #include <mach/gpio.h>
 #include <asm/mach/irq.h>
 
-#include <asm/io.h>
-
 /*
  * OMAP1510 GPIO registers
  */
@@ -1051,13 +1050,10 @@ static void gpio_irq_handler(unsigned int irq, struct irq_desc *desc)
 
                gpio_irq = bank->virtual_irq_start;
                for (; isr != 0; isr >>= 1, gpio_irq++) {
-                       struct irq_desc *d;
-
                        if (!(isr & 1))
                                continue;
-                       d = irq_desc + gpio_irq;
 
-                       desc_handle_irq(gpio_irq, d);
+                       generic_handle_irq(gpio_irq);
                }
        }
        /* if bank has any level sensitive GPIO pin interrupt
index 94ce2780e8ee88090b23b62351498cdcb7c323c6..8c71e288860fcec75a16f98ff0d0bbcc3b8fde34 100644 (file)
@@ -26,8 +26,8 @@
 #ifndef __ASM_ARCH_OMAP_GPIO_H
 #define __ASM_ARCH_OMAP_GPIO_H
 
+#include <linux/io.h>
 #include <mach/irqs.h>
-#include <asm/io.h>
 
 #define OMAP_MPUIO_BASE                        (void __iomem *)0xfffb5000
 
index 17248bbf3f27e5bbfe3dfc0d54bf260183f80bfa..62aa7dfb9464c9ef375acc6d2ac1283413f4486e 100644 (file)
 #define INT_24XX_USB_IRQ_OTG   80
 #define INT_24XX_MMC_IRQ       83
 
+#define        INT_34XX_BENCH_MPU_EMUL 3
+
 /* Max. 128 level 2 IRQs (OMAP1610), 192 GPIOs (OMAP730) and
  * 16 MPUIO lines */
 #define OMAP_MAX_GPIO_LINES    192
index 1d7aec1a691a67b27d7b0f9a0875ada1da7c632f..b52ce053e6f25e5612f79efa442141fcf9e2c153 100644 (file)
@@ -30,7 +30,7 @@
 #include <linux/blkdev.h>
 #include <linux/err.h>
 #include <linux/delay.h>
-#include <asm/io.h>
+#include <linux/io.h>
 #include <mach/mailbox.h>
 #include "mailbox.h"
 
index 847df208c46ca78db749fd0aad8605ab53a9aa5d..80b040fd5ca79fc55cb8ba42111596be48ce10bc 100644 (file)
@@ -25,8 +25,8 @@
 #include <linux/module.h>
 #include <linux/init.h>
 #include <linux/kernel.h>
+#include <linux/io.h>
 #include <asm/system.h>
-#include <asm/io.h>
 #include <linux/spinlock.h>
 #include <mach/mux.h>
 
index 8bdbf979a2573fd17d587bed84435f1d79d61ff3..ebe0c73c89018b783cf8107892e27f1dfe3471de 100644 (file)
@@ -31,8 +31,8 @@
 #include <linux/spinlock.h>
 #include <linux/err.h>
 #include <linux/clk.h>
+#include <linux/io.h>
 
-#include <asm/io.h>
 #include <mach/hardware.h>
 
 #define OCPI_BASE              0xfffec320
index ac67eeb6ca6a6266428ad8c74a906af7df4469b9..e0003e0746e748076c47ca95e0bf9ec775b1d87d 100644 (file)
@@ -15,9 +15,9 @@
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
+#include <linux/io.h>
 
 #include <asm/tlb.h>
-#include <asm/io.h>
 #include <asm/cacheflush.h>
 
 #include <asm/mach/map.h>
index 777485e0636becdd9975f7c6045abce0eefe9492..67ca1e216df7a1e4cfdc5ef29bf520bc16ec760c 100644 (file)
@@ -27,8 +27,8 @@
 #include <linux/init.h>
 #include <linux/platform_device.h>
 #include <linux/usb/otg.h>
+#include <linux/io.h>
 
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/system.h>
 #include <mach/hardware.h>
index 54d4b8e2263cb9ab3e35dc0c5b696f2ae925d97f..400541359bfbc617d0b569c8197c6fdfc2e76b90 100644 (file)
 #include <linux/clk.h>
 #include <linux/mutex.h>
 #include <linux/delay.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
 #include <asm/irq.h>
-#include <asm/io.h>
 
 #include <mach/regs-clock.h>
 #include <mach/regs-gpio.h>
index 1863a1b1bc4995b05e7a0b46e2b7d3cdcedc0f47..d528f460f6bc48027a6155a4084adb9d079ff63e 100644 (file)
@@ -25,6 +25,7 @@
 #include <linux/mtd/nand.h>
 #include <linux/mtd/nand_ecc.h>
 #include <linux/mtd/partitions.h>
+#include <linux/io.h>
 
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
@@ -32,7 +33,6 @@
 
 #include <asm/mach-types.h>
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 
 #include <mach/regs-gpio.h>
index 89ce60eabd5bd6d68304608bdad6521b2a6acd6e..9c607bbc9343bc34712536a66cd2a30b9d4ce556 100644 (file)
 #include <linux/serial_core.h>
 #include <linux/platform_device.h>
 #include <linux/delay.h>
+#include <linux/io.h>
+#include <linux/delay.h>
 
 #include <mach/hardware.h>
 #include <asm/irq.h>
-#include <asm/io.h>
-#include <asm/delay.h>
 #include <asm/cacheflush.h>
 
 #include <asm/mach/arch.h>
index d6fb76578b112f392a5e840857b56cefb6633bd2..6b13b5455dfc6b32935da3d3bcac491a9e284f2e 100644 (file)
 #include <linux/init.h>
 #include <linux/serial_core.h>
 #include <linux/platform_device.h>
+#include <linux/io.h>
 
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 #include <mach/fb.h>
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 
 #include <asm/plat-s3c/regs-serial.h>
index 08c2aaf14c41d56e0438cefd6e493cefbafe3d7f..d6344461a83bb13494e41c72f9667de66ee3a47b 100644 (file)
 #include <linux/slab.h>
 #include <linux/errno.h>
 #include <linux/delay.h>
+#include <linux/io.h>
 
 #include <asm/system.h>
 #include <asm/irq.h>
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/dma.h>
 
 #include <asm/mach/dma.h>
index dd27334e3d7e384ed7afcac9ad5c9592b074d308..4a899c279eb547ca5578936b95df5b9ae5d5d910 100644 (file)
 #include <linux/module.h>
 #include <linux/interrupt.h>
 #include <linux/ioport.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
 #include <asm/irq.h>
-#include <asm/io.h>
 
 #include <mach/regs-gpio.h>
 
index 36cefe17683566e8a657a923f6261146aab5e473..590fc5a3ab06e8710b295a7cc5cdc80959654c98 100644 (file)
 #include <linux/interrupt.h>
 #include <linux/ioport.h>
 #include <linux/sysdev.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
 #include <asm/irq.h>
-#include <asm/io.h>
 
 #include <asm/mach/irq.h>
 
@@ -468,7 +468,6 @@ static void s3c_irq_demux_adc(unsigned int irq,
 {
        unsigned int subsrc, submsk;
        unsigned int offset = 9;
-       struct irq_desc *mydesc;
 
        /* read the current pending interrupts, and the mask
         * for what it is available */
@@ -482,12 +481,10 @@ static void s3c_irq_demux_adc(unsigned int irq,
 
        if (subsrc != 0) {
                if (subsrc & 1) {
-                       mydesc = irq_desc + IRQ_TC;
-                       desc_handle_irq(IRQ_TC, mydesc);
+                       generic_handle_irq(IRQ_TC);
                }
                if (subsrc & 2) {
-                       mydesc = irq_desc + IRQ_ADC;
-                       desc_handle_irq(IRQ_ADC, mydesc);
+                       generic_handle_irq(IRQ_ADC);
                }
        }
 }
@@ -496,7 +493,6 @@ static void s3c_irq_demux_uart(unsigned int start)
 {
        unsigned int subsrc, submsk;
        unsigned int offset = start - IRQ_S3CUART_RX0;
-       struct irq_desc *desc;
 
        /* read the current pending interrupts, and the mask
         * for what it is available */
@@ -512,20 +508,14 @@ static void s3c_irq_demux_uart(unsigned int start)
        subsrc &= 7;
 
        if (subsrc != 0) {
-               desc = irq_desc + start;
-
                if (subsrc & 1)
-                       desc_handle_irq(start, desc);
-
-               desc++;
+                       generic_handle_irq(start);
 
                if (subsrc & 2)
-                       desc_handle_irq(start+1, desc);
-
-               desc++;
+                       generic_handle_irq(start+1);
 
                if (subsrc & 4)
-                       desc_handle_irq(start+2, desc);
+                       generic_handle_irq(start+2);
        }
 }
 
@@ -572,7 +562,7 @@ s3c_irq_demux_extint8(unsigned int irq,
                eintpnd &= ~(1<<irq);
 
                irq += (IRQ_EINT4 - 4);
-               desc_handle_irq(irq, irq_desc + irq);
+               generic_handle_irq(irq);
        }
 
 }
@@ -595,7 +585,7 @@ s3c_irq_demux_extint4t7(unsigned int irq,
 
                irq += (IRQ_EINT4 - 4);
 
-               desc_handle_irq(irq, irq_desc + irq);
+               generic_handle_irq(irq);
        }
 }
 
index e6705014b2a0efd5a77e23b9c3da2c85c389af89..0a074d35890aa5eebc76eb9d1bf6fea4ef537700 100644 (file)
 #include <linux/init.h>
 #include <linux/sysdev.h>
 #include <linux/device.h>
+#include <linux/io.h>
 
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 
 #include <mach/map.h>
 #include <mach/regs-gpio.h>
index fc4b731a949cdd05907a8556384d7390ca9327c1..d3934b1119a9e0c855f3e16153c6bad696f26144 100644 (file)
 #include <linux/ioport.h>
 #include <linux/delay.h>
 #include <linux/serial_core.h>
+#include <linux/io.h>
 
 #include <asm/cacheflush.h>
 #include <mach/hardware.h>
-#include <asm/io.h>
 
 #include <asm/plat-s3c/regs-serial.h>
 #include <mach/regs-clock.h>
index 8a5fffde663194d9b2dc7c387ed2527f92fcb582..119647a5eaa63e8db78eff5c8f2a2dccf9ddd99d 100644 (file)
 #include <linux/ioport.h>
 #include <linux/mutex.h>
 #include <linux/clk.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
 #include <asm/atomic.h>
 #include <asm/irq.h>
-#include <asm/io.h>
 
 #include <mach/regs-clock.h>
 
index f3dc38cf1de4a66ea8f53dc8951481e321338153..0601c5f3230bdd84700aa3b4b4e93568afb71422 100644 (file)
 #include <linux/interrupt.h>
 #include <linux/ioport.h>
 #include <linux/sysdev.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
 #include <asm/irq.h>
-#include <asm/io.h>
 
 #include <asm/mach/irq.h>
 
@@ -44,7 +44,6 @@ static void s3c_irq_demux_cam(unsigned int irq,
                              struct irq_desc *desc)
 {
        unsigned int subsrc, submsk;
-       struct irq_desc *mydesc;
 
        /* read the current pending interrupts, and the mask
         * for what it is available */
@@ -58,12 +57,10 @@ static void s3c_irq_demux_cam(unsigned int irq,
 
        if (subsrc != 0) {
                if (subsrc & 1) {
-                       mydesc = irq_desc + IRQ_S3C2440_CAM_C;
-                       desc_handle_irq(IRQ_S3C2440_CAM_C, mydesc);
+                       generic_handle_irq(IRQ_S3C2440_CAM_C);
                }
                if (subsrc & 2) {
-                       mydesc = irq_desc + IRQ_S3C2440_CAM_P;
-                       desc_handle_irq(IRQ_S3C2440_CAM_P, mydesc);
+                       generic_handle_irq(IRQ_S3C2440_CAM_P);
                }
        }
 }
index 281b4804ed3865564a07e9ee3256f8649670bd98..146863a69aeb3fae4a611c2abbfc1ab6d43aa96d 100644 (file)
 #include <linux/platform_device.h>
 #include <linux/sysdev.h>
 #include <linux/clk.h>
+#include <linux/io.h>
 
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 
 #include <mach/regs-clock.h>
index b471a21ae2e4ee3e5f23341d7d0bd9420a881b69..64bfa19ae951c1444d8741835ef49d12f1f27432 100644 (file)
 #include <linux/irq.h>
 #include <linux/err.h>
 #include <linux/clk.h>
+#include <linux/io.h>
 
 #include <asm/system.h>
 #include <asm/leds.h>
 #include <asm/mach-types.h>
 
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <mach/map.h>
 #include <asm/plat-s3c/regs-timer.h>
index 56281c030a7bb4ab5eebef4d36dfc3cd440b0e41..43aa2020f85c9ac200c0db73a8c987e92051b56c 100644 (file)
@@ -12,7 +12,7 @@
 #
 #   http://www.arm.linux.org.uk/developer/machines/?action=new
 #
-# Last update: Wed Aug 13 21:56:02 2008
+# Last update: Thu Sep 25 10:10:50 2008
 #
 # machine_is_xxx       CONFIG_xxxx             MACH_TYPE_xxx           number
 #
@@ -1810,7 +1810,7 @@ kriss_sensor              MACH_KRISS_SENSOR       KRISS_SENSOR            1819
 pilz_pmi5              MACH_PILZ_PMI5          PILZ_PMI5               1820
 jade                   MACH_JADE               JADE                    1821
 ks8695_softplc         MACH_KS8695_SOFTPLC     KS8695_SOFTPLC          1822
-gprisc3                        MACH_GPRISC4            GPRISC4                 1823
+gprisc3                        MACH_GPRISC3            GPRISC3                 1823
 stamp9260              MACH_STAMP9260          STAMP9260               1824
 smdk6430               MACH_SMDK6430           SMDK6430                1825
 smdkc100               MACH_SMDKC100           SMDKC100                1826
@@ -1859,5 +1859,43 @@ kbio9260         MACH_KBIO9260           KBIO9260                1868
 ginza                  MACH_GINZA              GINZA                   1869
 a636n                  MACH_A636N              A636N                   1870
 imx27ipcam             MACH_IMX27IPCAM         IMX27IPCAM              1871
-nenoc                  MACH_NEMOC              NEMOC                   1872
+nemoc                  MACH_NEMOC              NEMOC                   1872
 geneva                 MACH_GENEVA             GENEVA                  1873
+htcpharos              MACH_HTCPHAROS          HTCPHAROS               1874
+neonc                  MACH_NEONC              NEONC                   1875
+nas7100                        MACH_NAS7100            NAS7100                 1876
+teuphone               MACH_TEUPHONE           TEUPHONE                1877
+annax_eth2             MACH_ANNAX_ETH2         ANNAX_ETH2              1878
+csb733                 MACH_CSB733             CSB733                  1879
+bk3                    MACH_BK3                BK3                     1880
+omap_em32              MACH_OMAP_EM32          OMAP_EM32               1881
+et9261cp               MACH_ET9261CP           ET9261CP                1882
+jasperc                        MACH_JASPERC            JASPERC                 1883
+issi_arm9              MACH_ISSI_ARM9          ISSI_ARM9               1884
+ued                    MACH_UED                UED                     1885
+esiblade               MACH_ESIBLADE           ESIBLADE                1886
+eye02                  MACH_EYE02              EYE02                   1887
+imx27kbd               MACH_IMX27KBD           IMX27KBD                1888
+sst61vc010_fpga                MACH_SST61VC010_FPGA    SST61VC010_FPGA         1889
+kixvp435               MACH_KIXVP435           KIXVP435                1890
+kixnp435               MACH_KIXNP435           KIXNP435                1891
+africa                 MACH_AFRICA             AFRICA                  1892
+nh233                  MACH_NH233              NH233                   1893
+rd88f6183ap_ge         MACH_RD88F6183AP_GE     RD88F6183AP_GE          1894
+bcm4760                        MACH_BCM4760            BCM4760                 1895
+eddy_v2                        MACH_EDDY_V2            EDDY_V2                 1896
+realview_pba8          MACH_REALVIEW_PBA8      REALVIEW_PBA8           1897
+hid_a7                 MACH_HID_A7             HID_A7                  1898
+hero                   MACH_HERO               HERO                    1899
+omap_poseidon          MACH_OMAP_POSEIDON      OMAP_POSEIDON           1900
+realview_pbx           MACH_REALVIEW_PBX       REALVIEW_PBX            1901
+micro9s                        MACH_MICRO9S            MICRO9S                 1902
+mako                   MACH_MAKO               MAKO                    1903
+xdaflame               MACH_XDAFLAME           XDAFLAME                1904
+phidget_sbc2           MACH_PHIDGET_SBC2       PHIDGET_SBC2            1905
+limestone              MACH_LIMESTONE          LIMESTONE               1906
+iprobe_c32             MACH_IPROBE_C32         IPROBE_C32              1907
+rut100                 MACH_RUT100             RUT100                  1908
+asusp535               MACH_ASUSP535           ASUSP535                1909
+htcraphael             MACH_HTCRAPHAEL         HTCRAPHAEL              1910
+sygdg1                 MACH_SYGDG1             SYGDG1                  1911
index 806ce26d524324dedd9c45d7ec1f5fcc8b35cc92..ba592a9e6fb36cfa868c2b4a8ade37248c0743b8 100644 (file)
 #include <asm/assembler.h>
 #include <asm/vfpmacros.h>
 
-       .globl  do_vfp
-do_vfp:
+ENTRY(do_vfp)
        enable_irq
        ldr     r4, .LCvfp
        ldr     r11, [r10, #TI_CPU]     @ CPU number
        add     r10, r10, #TI_VFPSTATE  @ r10 = workspace
        ldr     pc, [r4]                @ call VFP entry point
+ENDPROC(do_vfp)
 
 ENTRY(vfp_null_entry)
        mov     pc, lr
@@ -40,11 +40,11 @@ ENDPROC(vfp_null_entry)
 @ failure to the VFP initialisation code.
 
        __INIT
-       .globl  vfp_testing_entry
-vfp_testing_entry:
+ENTRY(vfp_testing_entry)
        ldr     r0, VFP_arch_address
        str     r5, [r0]                @ known non-zero value
        mov     pc, r9                  @ we have handled the fault
+ENDPROC(vfp_testing_entry)
 
 VFP_arch_address:
        .word   VFP_arch
index 353f9e5c7919196134e4323c86cb028c0b12eac4..a62dcf7098bad660ee65c22cbcf76a0a24677c05 100644 (file)
@@ -68,8 +68,7 @@
 @  r11 = CPU number
 @  lr  = failure return
 
-       .globl  vfp_support_entry
-vfp_support_entry:
+ENTRY(vfp_support_entry)
        DBGSTR3 "instr %08x pc %08x state %p", r0, r2, r10
 
        VFPFMRX r1, FPEXC               @ Is the VFP enabled?
@@ -165,11 +164,10 @@ process_exception:
                                        @ code will raise an exception if
                                        @ required. If not, the user code will
                                        @ retry the faulted instruction
+ENDPROC(vfp_support_entry)
 
 #ifdef CONFIG_SMP
-       .globl  vfp_save_state
-       .type   vfp_save_state, %function
-vfp_save_state:
+ENTRY(vfp_save_state)
        @ Save the current VFP state
        @ r0 - save location
        @ r1 - FPEXC
@@ -182,13 +180,13 @@ vfp_save_state:
        VFPFMRX r12, FPINST2, NE        @ FPINST2 if needed (and present)
        stmia   r0, {r1, r2, r3, r12}   @ save FPEXC, FPSCR, FPINST, FPINST2
        mov     pc, lr
+ENDPROC(vfp_save_state)
 #endif
 
 last_VFP_context_address:
        .word   last_VFP_context
 
-       .globl  vfp_get_float
-vfp_get_float:
+ENTRY(vfp_get_float)
        add     pc, pc, r0, lsl #3
        mov     r0, r0
        .irp    dr,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15
@@ -197,9 +195,9 @@ vfp_get_float:
        mrc     p10, 0, r0, c\dr, c0, 4 @ fmrs  r0, s1
        mov     pc, lr
        .endr
+ENDPROC(vfp_get_float)
 
-       .globl  vfp_put_float
-vfp_put_float:
+ENTRY(vfp_put_float)
        add     pc, pc, r1, lsl #3
        mov     r0, r0
        .irp    dr,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15
@@ -208,9 +206,9 @@ vfp_put_float:
        mcr     p10, 0, r0, c\dr, c0, 4 @ fmsr  r0, s1
        mov     pc, lr
        .endr
+ENDPROC(vfp_put_float)
 
-       .globl  vfp_get_double
-vfp_get_double:
+ENTRY(vfp_get_double)
        add     pc, pc, r0, lsl #3
        mov     r0, r0
        .irp    dr,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15
@@ -229,9 +227,9 @@ vfp_get_double:
        mov     r0, #0
        mov     r1, #0
        mov     pc, lr
+ENDPROC(vfp_get_double)
 
-       .globl  vfp_put_double
-vfp_put_double:
+ENTRY(vfp_put_double)
        add     pc, pc, r2, lsl #3
        mov     r0, r0
        .irp    dr,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15
@@ -245,3 +243,4 @@ vfp_put_double:
        mov     pc, lr
        .endr
 #endif
+ENDPROC(vfp_put_double)
index d402e8d813ce2628d0fa7f079267ad1cdfbada14..3309e862f31735e6e44ad61eeac1760f6e349fc0 100644 (file)
@@ -540,6 +540,15 @@ config SENSORS_LM93
          This driver can also be built as a module.  If so, the module
          will be called lm93.
 
+config SENSORS_MAX1111
+       tristate "Maxim MAX1111 Multichannel, Serial 8-bit ADC chip"
+       depends on SPI_MASTER
+       help
+         Say y here to support Maxim's MAX1111 ADC chips.
+
+         This driver can also be built as a module.  If so, the module
+         will be called max1111.
+
 config SENSORS_MAX1619
        tristate "Maxim MAX1619 sensor chip"
        depends on I2C
index 950134ab842666a1c4ccb7d2b224c2b62d8af0dd..6babc801b3484139eb68b32a23630ca54136c77d 100644 (file)
@@ -59,6 +59,7 @@ obj-$(CONFIG_SENSORS_LM87)    += lm87.o
 obj-$(CONFIG_SENSORS_LM90)     += lm90.o
 obj-$(CONFIG_SENSORS_LM92)     += lm92.o
 obj-$(CONFIG_SENSORS_LM93)     += lm93.o
+obj-$(CONFIG_SENSORS_MAX1111)  += max1111.o
 obj-$(CONFIG_SENSORS_MAX1619)  += max1619.o
 obj-$(CONFIG_SENSORS_MAX6650)  += max6650.o
 obj-$(CONFIG_SENSORS_PC87360)  += pc87360.o
diff --git a/drivers/hwmon/max1111.c b/drivers/hwmon/max1111.c
new file mode 100644 (file)
index 0000000..bfaa665
--- /dev/null
@@ -0,0 +1,244 @@
+/*
+ * max1111.c - +2.7V, Low-Power, Multichannel, Serial 8-bit ADCs
+ *
+ * Based on arch/arm/mach-pxa/corgi_ssp.c
+ *
+ * Copyright (C) 2004-2005 Richard Purdie
+ *
+ * Copyright (C) 2008 Marvell International Ltd.
+ *     Eric Miao <eric.miao@marvell.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
+ *  publishhed by the Free Software Foundation.
+ */
+
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/err.h>
+#include <linux/hwmon.h>
+#include <linux/hwmon-sysfs.h>
+#include <linux/spi/spi.h>
+
+#define MAX1111_TX_BUF_SIZE    1
+#define MAX1111_RX_BUF_SIZE    2
+
+/* MAX1111 Commands */
+#define MAX1111_CTRL_PD0      (1u << 0)
+#define MAX1111_CTRL_PD1      (1u << 1)
+#define MAX1111_CTRL_SGL      (1u << 2)
+#define MAX1111_CTRL_UNI      (1u << 3)
+#define MAX1111_CTRL_SEL_SH   (5)      /* NOTE: bit 4 is ignored */
+#define MAX1111_CTRL_STR      (1u << 7)
+
+struct max1111_data {
+       struct spi_device       *spi;
+       struct device           *hwmon_dev;
+       struct spi_message      msg;
+       struct spi_transfer     xfer[2];
+       uint8_t *tx_buf;
+       uint8_t *rx_buf;
+};
+
+static int max1111_read(struct device *dev, int channel)
+{
+       struct max1111_data *data = dev_get_drvdata(dev);
+       uint8_t v1, v2;
+       int err;
+
+       data->tx_buf[0] = (channel << MAX1111_CTRL_SEL_SH) |
+               MAX1111_CTRL_PD0 | MAX1111_CTRL_PD1 |
+               MAX1111_CTRL_SGL | MAX1111_CTRL_UNI | MAX1111_CTRL_STR;
+
+       err = spi_sync(data->spi, &data->msg);
+       if (err < 0) {
+               dev_err(dev, "spi_sync failed with %d\n", err);
+               return err;
+       }
+
+       v1 = data->rx_buf[0];
+       v2 = data->rx_buf[1];
+
+       if ((v1 & 0xc0) || (v2 & 0x3f))
+               return -EINVAL;
+
+       return (v1 << 2) | (v2 >> 6);
+}
+
+#ifdef CONFIG_SHARPSL_PM
+static struct max1111_data *the_max1111;
+
+int max1111_read_channel(int channel)
+{
+       return max1111_read(&the_max1111->spi->dev, channel);
+}
+EXPORT_SYMBOL(max1111_read_channel);
+#endif
+
+/*
+ * NOTE: SPI devices do not have a default 'name' attribute, which is
+ * likely to be used by hwmon applications to distinguish between
+ * different devices, explicitly add a name attribute here.
+ */
+static ssize_t show_name(struct device *dev,
+                        struct device_attribute *attr, char *buf)
+{
+       return sprintf(buf, "max1111\n");
+}
+
+static ssize_t show_adc(struct device *dev,
+                       struct device_attribute *attr, char *buf)
+{
+       int channel = to_sensor_dev_attr(attr)->index;
+       int ret;
+
+       ret = max1111_read(dev, channel);
+       if (ret < 0)
+               return ret;
+
+       return sprintf(buf, "%d\n", ret);
+}
+
+#define MAX1111_ADC_ATTR(_id)          \
+       SENSOR_DEVICE_ATTR(adc##_id##_in, S_IRUGO, show_adc, NULL, _id)
+
+static DEVICE_ATTR(name, S_IRUGO, show_name, NULL);
+static MAX1111_ADC_ATTR(0);
+static MAX1111_ADC_ATTR(1);
+static MAX1111_ADC_ATTR(2);
+static MAX1111_ADC_ATTR(3);
+
+static struct attribute *max1111_attributes[] = {
+       &dev_attr_name.attr,
+       &sensor_dev_attr_adc0_in.dev_attr.attr,
+       &sensor_dev_attr_adc1_in.dev_attr.attr,
+       &sensor_dev_attr_adc2_in.dev_attr.attr,
+       &sensor_dev_attr_adc3_in.dev_attr.attr,
+       NULL,
+};
+
+static const struct attribute_group max1111_attr_group = {
+       .attrs  = max1111_attributes,
+};
+
+static int setup_transfer(struct max1111_data *data)
+{
+       struct spi_message *m;
+       struct spi_transfer *x;
+
+       data->tx_buf = kmalloc(MAX1111_TX_BUF_SIZE, GFP_KERNEL);
+       if (!data->tx_buf)
+               return -ENOMEM;
+
+       data->rx_buf = kmalloc(MAX1111_RX_BUF_SIZE, GFP_KERNEL);
+       if (!data->rx_buf) {
+               kfree(data->tx_buf);
+               return -ENOMEM;
+       }
+
+       m = &data->msg;
+       x = &data->xfer[0];
+
+       spi_message_init(m);
+
+       x->tx_buf = &data->tx_buf[0];
+       x->len = 1;
+       spi_message_add_tail(x, m);
+
+       x++;
+       x->rx_buf = &data->rx_buf[0];
+       x->len = 2;
+       spi_message_add_tail(x, m);
+
+       return 0;
+}
+
+static int __devinit max1111_probe(struct spi_device *spi)
+{
+       struct max1111_data *data;
+       int err;
+
+       spi->bits_per_word = 8;
+       spi->mode = SPI_MODE_0;
+       err = spi_setup(spi);
+       if (err < 0)
+               return err;
+
+       data = kzalloc(sizeof(struct max1111_data), GFP_KERNEL);
+       if (data == NULL) {
+               dev_err(&spi->dev, "failed to allocate memory\n");
+               return -ENOMEM;
+       }
+
+       err = setup_transfer(data);
+       if (err)
+               goto err_free_data;
+
+       data->spi = spi;
+       spi_set_drvdata(spi, data);
+
+       err = sysfs_create_group(&spi->dev.kobj, &max1111_attr_group);
+       if (err) {
+               dev_err(&spi->dev, "failed to create attribute group\n");
+               goto err_free_all;
+       }
+
+       data->hwmon_dev = hwmon_device_register(&spi->dev);
+       if (IS_ERR(data->hwmon_dev)) {
+               dev_err(&spi->dev, "failed to create hwmon device\n");
+               err = PTR_ERR(data->hwmon_dev);
+               goto err_remove;
+       }
+
+#ifdef CONFIG_SHARPSL_PM
+       the_max1111 = data;
+#endif
+       return 0;
+
+err_remove:
+       sysfs_remove_group(&spi->dev.kobj, &max1111_attr_group);
+err_free_all:
+       kfree(data->rx_buf);
+       kfree(data->tx_buf);
+err_free_data:
+       kfree(data);
+       return err;
+}
+
+static int __devexit max1111_remove(struct spi_device *spi)
+{
+       struct max1111_data *data = spi_get_drvdata(spi);
+
+       hwmon_device_unregister(data->hwmon_dev);
+       sysfs_remove_group(&spi->dev.kobj, &max1111_attr_group);
+       kfree(data->rx_buf);
+       kfree(data->tx_buf);
+       kfree(data);
+       return 0;
+}
+
+static struct spi_driver max1111_driver = {
+       .driver         = {
+               .name   = "max1111",
+               .owner  = THIS_MODULE,
+       },
+       .probe          = max1111_probe,
+       .remove         = __devexit_p(max1111_remove),
+};
+
+static int __init max1111_init(void)
+{
+       return spi_register_driver(&max1111_driver);
+}
+module_init(max1111_init);
+
+static void __exit max1111_exit(void)
+{
+       spi_unregister_driver(&max1111_driver);
+}
+module_exit(max1111_exit);
+
+MODULE_AUTHOR("Eric Miao <eric.miao@marvell.com>");
+MODULE_DESCRIPTION("MAX1111 ADC Driver");
+MODULE_LICENSE("GPL");
index 44d838410f15830e45f749eef5d41fcde17a15ff..906f9b9d715d50af2c555424ae323effc74d05d9 100644 (file)
 #include <asm/irq.h>
 #include <asm/io.h>
 #include <mach/i2c.h>
-#include <mach/pxa-regs.h>
+
+/*
+ * I2C registers and bit definitions
+ */
+#define IBMR           (0x00)
+#define IDBR           (0x08)
+#define ICR            (0x10)
+#define ISR            (0x18)
+#define ISAR           (0x20)
+
+#define ICR_START      (1 << 0)           /* start bit */
+#define ICR_STOP       (1 << 1)           /* stop bit */
+#define ICR_ACKNAK     (1 << 2)           /* send ACK(0) or NAK(1) */
+#define ICR_TB         (1 << 3)           /* transfer byte bit */
+#define ICR_MA         (1 << 4)           /* master abort */
+#define ICR_SCLE       (1 << 5)           /* master clock enable */
+#define ICR_IUE                (1 << 6)           /* unit enable */
+#define ICR_GCD                (1 << 7)           /* general call disable */
+#define ICR_ITEIE      (1 << 8)           /* enable tx interrupts */
+#define ICR_IRFIE      (1 << 9)           /* enable rx interrupts */
+#define ICR_BEIE       (1 << 10)          /* enable bus error ints */
+#define ICR_SSDIE      (1 << 11)          /* slave STOP detected int enable */
+#define ICR_ALDIE      (1 << 12)          /* enable arbitration interrupt */
+#define ICR_SADIE      (1 << 13)          /* slave address detected int enable */
+#define ICR_UR         (1 << 14)          /* unit reset */
+#define ICR_FM         (1 << 15)          /* fast mode */
+
+#define ISR_RWM                (1 << 0)           /* read/write mode */
+#define ISR_ACKNAK     (1 << 1)           /* ack/nak status */
+#define ISR_UB         (1 << 2)           /* unit busy */
+#define ISR_IBB                (1 << 3)           /* bus busy */
+#define ISR_SSD                (1 << 4)           /* slave stop detected */
+#define ISR_ALD                (1 << 5)           /* arbitration loss detected */
+#define ISR_ITE                (1 << 6)           /* tx buffer empty */
+#define ISR_IRF                (1 << 7)           /* rx buffer full */
+#define ISR_GCAD       (1 << 8)           /* general call address detected */
+#define ISR_SAD                (1 << 9)           /* slave address detected */
+#define ISR_BED                (1 << 10)          /* bus error no ACK/NAK */
 
 struct pxa_i2c {
        spinlock_t              lock;
@@ -60,19 +97,21 @@ struct pxa_i2c {
        u32                     icrlog[32];
 
        void __iomem            *reg_base;
+       unsigned int            reg_shift;
 
        unsigned long           iobase;
        unsigned long           iosize;
 
        int                     irq;
-       int                     use_pio;
+       unsigned int            use_pio :1;
+       unsigned int            fast_mode :1;
 };
 
-#define _IBMR(i2c)     ((i2c)->reg_base + 0)
-#define _IDBR(i2c)     ((i2c)->reg_base + 8)
-#define _ICR(i2c)      ((i2c)->reg_base + 0x10)
-#define _ISR(i2c)      ((i2c)->reg_base + 0x18)
-#define _ISAR(i2c)     ((i2c)->reg_base + 0x20)
+#define _IBMR(i2c)     ((i2c)->reg_base + (0x0 << (i2c)->reg_shift))
+#define _IDBR(i2c)     ((i2c)->reg_base + (0x4 << (i2c)->reg_shift))
+#define _ICR(i2c)      ((i2c)->reg_base + (0x8 << (i2c)->reg_shift))
+#define _ISR(i2c)      ((i2c)->reg_base + (0xc << (i2c)->reg_shift))
+#define _ISAR(i2c)     ((i2c)->reg_base + (0x10 << (i2c)->reg_shift))
 
 /*
  * I2C Slave mode address
@@ -188,14 +227,14 @@ static inline int i2c_pxa_is_slavemode(struct pxa_i2c *i2c)
 
 static void i2c_pxa_abort(struct pxa_i2c *i2c)
 {
-       unsigned long timeout = jiffies + HZ/4;
+       int i = 250;
 
        if (i2c_pxa_is_slavemode(i2c)) {
                dev_dbg(&i2c->adap.dev, "%s: called in slave mode\n", __func__);
                return;
        }
 
-       while (time_before(jiffies, timeout) && (readl(_IBMR(i2c)) & 0x1) == 0) {
+       while ((i > 0) && (readl(_IBMR(i2c)) & 0x1) == 0) {
                unsigned long icr = readl(_ICR(i2c));
 
                icr &= ~ICR_START;
@@ -205,7 +244,8 @@ static void i2c_pxa_abort(struct pxa_i2c *i2c)
 
                show_state(i2c);
 
-               msleep(1);
+               mdelay(1);
+               i --;
        }
 
        writel(readl(_ICR(i2c)) & ~(ICR_MA | ICR_START | ICR_STOP),
@@ -364,7 +404,7 @@ static void i2c_pxa_reset(struct pxa_i2c *i2c)
        writel(i2c->slave_addr, _ISAR(i2c));
 
        /* set control register values */
-       writel(I2C_ICR_INIT, _ICR(i2c));
+       writel(I2C_ICR_INIT | (i2c->fast_mode ? ICR_FM : 0), _ICR(i2c));
 
 #ifdef CONFIG_I2C_PXA_SLAVE
        dev_info(&i2c->adap.dev, "Enabling slave mode\n");
@@ -907,12 +947,6 @@ static int i2c_pxa_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num
        struct pxa_i2c *i2c = adap->algo_data;
        int ret, i;
 
-       /* If the I2C controller is disabled we need to reset it (probably due
-          to a suspend/resume destroying state). We do this here as we can then
-          avoid worrying about resuming the controller before its users. */
-       if (!(readl(_ICR(i2c)) & ICR_IUE))
-               i2c_pxa_reset(i2c);
-
        for (i = adap->retries; i >= 0; i--) {
                ret = i2c_pxa_do_xfer(i2c, msgs, num);
                if (ret != I2C_RETRY)
@@ -993,6 +1027,7 @@ static int i2c_pxa_probe(struct platform_device *dev)
                ret = -EIO;
                goto eremap;
        }
+       i2c->reg_shift = (cpu_is_pxa3xx() && (dev->id == 1)) ? 0 : 1;
 
        i2c->iobase = res->start;
        i2c->iosize = res_len(res);
@@ -1013,6 +1048,7 @@ static int i2c_pxa_probe(struct platform_device *dev)
        if (plat) {
                i2c->adap.class = plat->class;
                i2c->use_pio = plat->use_pio;
+               i2c->fast_mode = plat->fast_mode;
        }
 
        if (i2c->use_pio) {
@@ -1082,9 +1118,33 @@ static int __exit i2c_pxa_remove(struct platform_device *dev)
        return 0;
 }
 
+#ifdef CONFIG_PM
+static int i2c_pxa_suspend_late(struct platform_device *dev, pm_message_t state)
+{
+       struct pxa_i2c *i2c = platform_get_drvdata(dev);
+       clk_disable(i2c->clk);
+       return 0;
+}
+
+static int i2c_pxa_resume_early(struct platform_device *dev)
+{
+       struct pxa_i2c *i2c = platform_get_drvdata(dev);
+
+       clk_enable(i2c->clk);
+       i2c_pxa_reset(i2c);
+
+       return 0;
+}
+#else
+#define i2c_pxa_suspend_late NULL
+#define i2c_pxa_resume_early NULL
+#endif
+
 static struct platform_driver i2c_pxa_driver = {
        .probe          = i2c_pxa_probe,
        .remove         = __exit_p(i2c_pxa_remove),
+       .suspend_late   = i2c_pxa_suspend_late,
+       .resume_early   = i2c_pxa_resume_early,
        .driver         = {
                .name   = "pxa2xx-i2c",
                .owner  = THIS_MODULE,
index 134e67bf6a90b80e4442ddcd3c8b6c22a138b061..c8ed065ea0cbd9f2d360331c101b2052bc8d2ebb 100644 (file)
@@ -80,9 +80,9 @@ struct corgikbd {
 #define KB_ACTIVATE_DELAY      10
 
 /* Helper functions for reading the keyboard matrix
- * Note: We should really be using pxa_gpio_mode to alter GPDR but it
- *       requires a function call per GPIO bit which is excessive
- *       when we need to access 12 bits at once multiple times.
+ * Note: We should really be using the generic gpio functions to alter
+ *       GPDR but it requires a function call per GPIO bit which is
+ *       excessive when we need to access 12 bits at once, multiple times.
  * These functions must be called within local_irq_save()/local_irq_restore()
  * or similar.
  */
index de67b8e0a799bfe4e2e2cb83c2008825d72ffe14..c48b76a46a58ef5adf68601171007db16cae1abb 100644 (file)
@@ -101,9 +101,9 @@ struct spitzkbd {
 #define KB_ACTIVATE_DELAY      10
 
 /* Helper functions for reading the keyboard matrix
- * Note: We should really be using pxa_gpio_mode to alter GPDR but it
- *       requires a function call per GPIO bit which is excessive
- *       when we need to access 11 bits at once, multiple times.
+ * Note: We should really be using the generic gpio functions to alter
+ *       GPDR but it requires a function call per GPIO bit which is
+ *       excessive when we need to access 11 bits at once, multiple times.
  * These functions must be called within local_irq_save()/local_irq_restore()
  * or similar.
  */
index 44cb50af3ce973616517d3aca4147ecdf16d4361..677276b1202029374eb283d202bba388d2ba9211 100644 (file)
@@ -59,9 +59,9 @@ struct tosakbd {
 
 
 /* Helper functions for reading the keyboard matrix
- * Note: We should really be using pxa_gpio_mode to alter GPDR but it
- *       requires a function call per GPIO bit which is excessive
- *       when we need to access 12 bits at once, multiple times.
+ * Note: We should really be using the generic gpio functions to alter
+ *       GPDR but it requires a function call per GPIO bit which is
+ *       excessive when we need to access 12 bits at once, multiple times.
  * These functions must be called within local_irq_save()/local_irq_restore()
  * or similar.
  */
index 25287e80e236727f70bffef85bc0a6d782c44543..6e1e8c624f9e73c0afda36b2eb603dcb77f5ac17 100644 (file)
@@ -220,6 +220,7 @@ config TOUCHSCREEN_ATMEL_TSADCC
 config TOUCHSCREEN_UCB1400
        tristate "Philips UCB1400 touchscreen"
        select AC97_BUS
+       depends on UCB1400_CORE
        help
          This enables support for the Philips UCB1400 touchscreen interface.
          The UCB1400 is an AC97 audio codec.  The touchscreen interface
index ce6f48c695f553a703a9c9af3c739996bc2c971c..8583c766d565201e224fb21abaedd6c9cb8cadb8 100644 (file)
@@ -24,6 +24,7 @@
 #include <linux/input.h>
 #include <linux/interrupt.h>
 #include <linux/slab.h>
+#include <linux/gpio.h>
 #include <linux/spi/spi.h>
 #include <linux/spi/ads7846.h>
 #include <asm/irq.h>
@@ -116,6 +117,7 @@ struct ads7846 {
        void                    *filter_data;
        void                    (*filter_cleanup)(void *data);
        int                     (*get_pendown_state)(void);
+       int                     gpio_pendown;
 };
 
 /* leave chip selected when we're done, for quicker re-select? */
@@ -491,6 +493,14 @@ static struct attribute_group ads784x_attr_group = {
 
 /*--------------------------------------------------------------------------*/
 
+static int get_pendown_state(struct ads7846 *ts)
+{
+       if (ts->get_pendown_state)
+               return ts->get_pendown_state();
+
+       return !gpio_get_value(ts->gpio_pendown);
+}
+
 /*
  * PENIRQ only kicks the timer.  The timer only reissues the SPI transfer,
  * to retrieve touchscreen status.
@@ -550,7 +560,7 @@ static void ads7846_rx(void *ads)
         */
        if (ts->penirq_recheck_delay_usecs) {
                udelay(ts->penirq_recheck_delay_usecs);
-               if (!ts->get_pendown_state())
+               if (!get_pendown_state(ts))
                        Rt = 0;
        }
 
@@ -677,7 +687,7 @@ static enum hrtimer_restart ads7846_timer(struct hrtimer *handle)
 
        spin_lock_irq(&ts->lock);
 
-       if (unlikely(!ts->get_pendown_state() ||
+       if (unlikely(!get_pendown_state(ts) ||
                     device_suspended(&ts->spi->dev))) {
                if (ts->pendown) {
                        struct input_dev *input = ts->input;
@@ -716,7 +726,7 @@ static irqreturn_t ads7846_irq(int irq, void *handle)
        unsigned long flags;
 
        spin_lock_irqsave(&ts->lock, flags);
-       if (likely(ts->get_pendown_state())) {
+       if (likely(get_pendown_state(ts))) {
                if (!ts->irq_disabled) {
                        /* The ARM do_simple_IRQ() dispatcher doesn't act
                         * like the other dispatchers:  it will report IRQs
@@ -806,6 +816,36 @@ static int ads7846_resume(struct spi_device *spi)
        return 0;
 }
 
+static int __devinit setup_pendown(struct spi_device *spi, struct ads7846 *ts)
+{
+       struct ads7846_platform_data *pdata = spi->dev.platform_data;
+       int err;
+
+       /* REVISIT when the irq can be triggered active-low, or if for some
+        * reason the touchscreen isn't hooked up, we don't need to access
+        * the pendown state.
+        */
+       if (!pdata->get_pendown_state && !gpio_is_valid(pdata->gpio_pendown)) {
+               dev_err(&spi->dev, "no get_pendown_state nor gpio_pendown?\n");
+               return -EINVAL;
+       }
+
+       if (pdata->get_pendown_state) {
+               ts->get_pendown_state = pdata->get_pendown_state;
+               return 0;
+       }
+
+       err = gpio_request(pdata->gpio_pendown, "ads7846_pendown");
+       if (err) {
+               dev_err(&spi->dev, "failed to request pendown GPIO%d\n",
+                               pdata->gpio_pendown);
+               return err;
+       }
+
+       ts->gpio_pendown = pdata->gpio_pendown;
+       return 0;
+}
+
 static int __devinit ads7846_probe(struct spi_device *spi)
 {
        struct ads7846                  *ts;
@@ -833,15 +873,6 @@ static int __devinit ads7846_probe(struct spi_device *spi)
                return -EINVAL;
        }
 
-       /* REVISIT when the irq can be triggered active-low, or if for some
-        * reason the touchscreen isn't hooked up, we don't need to access
-        * the pendown state.
-        */
-       if (pdata->get_pendown_state == NULL) {
-               dev_dbg(&spi->dev, "no get_pendown_state function?\n");
-               return -EINVAL;
-       }
-
        /* We'd set TX wordsize 8 bits and RX wordsize to 13 bits ... except
         * that even if the hardware can do that, the SPI controller driver
         * may not.  So we stick to very-portable 8 bit words, both RX and TX.
@@ -893,7 +924,10 @@ static int __devinit ads7846_probe(struct spi_device *spi)
                ts->filter_data = ts;
        } else
                ts->filter = ads7846_no_filter;
-       ts->get_pendown_state = pdata->get_pendown_state;
+
+       err = setup_pendown(spi, ts);
+       if (err)
+               goto err_cleanup_filter;
 
        if (pdata->penirq_recheck_delay_usecs)
                ts->penirq_recheck_delay_usecs =
@@ -1085,7 +1119,7 @@ static int __devinit ads7846_probe(struct spi_device *spi)
                        spi->dev.driver->name, ts)) {
                dev_dbg(&spi->dev, "irq %d busy?\n", spi->irq);
                err = -EBUSY;
-               goto err_cleanup_filter;
+               goto err_free_gpio;
        }
 
        err = ads784x_hwmon_register(spi, ts);
@@ -1116,6 +1150,9 @@ static int __devinit ads7846_probe(struct spi_device *spi)
        ads784x_hwmon_unregister(spi, ts);
  err_free_irq:
        free_irq(spi->irq, ts);
+ err_free_gpio:
+       if (ts->gpio_pendown != -1)
+               gpio_free(ts->gpio_pendown);
  err_cleanup_filter:
        if (ts->filter_cleanup)
                ts->filter_cleanup(ts->filter_data);
@@ -1140,6 +1177,9 @@ static int __devexit ads7846_remove(struct spi_device *spi)
        /* suspend left the IRQ disabled */
        enable_irq(ts->spi->irq);
 
+       if (ts->gpio_pendown != -1)
+               gpio_free(ts->gpio_pendown);
+
        if (ts->filter_cleanup)
                ts->filter_cleanup(ts->filter_data);
 
index bce018e45bce4781cb7b61519485502ff8c22171..54986627def03755bedacbca2824fb814df11edf 100644 (file)
@@ -5,6 +5,10 @@
  *  Created:   September 25, 2006
  *  Copyright: MontaVista Software, Inc.
  *
+ * Spliting done by: Marek Vasut <marek.vasut@gmail.com>
+ * If something doesnt work and it worked before spliting, e-mail me,
+ * dont bother Nicolas please ;-)
+ *
  * 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/kthread.h>
 #include <linux/freezer.h>
-
-#include <sound/core.h>
-#include <sound/ac97_codec.h>
-
-
-/*
- * Interesting UCB1400 AC-link registers
- */
-
-#define UCB_IE_RIS             0x5e
-#define UCB_IE_FAL             0x60
-#define UCB_IE_STATUS          0x62
-#define UCB_IE_CLEAR           0x62
-#define UCB_IE_ADC             (1 << 11)
-#define UCB_IE_TSPX            (1 << 12)
-
-#define UCB_TS_CR              0x64
-#define UCB_TS_CR_TSMX_POW     (1 << 0)
-#define UCB_TS_CR_TSPX_POW     (1 << 1)
-#define UCB_TS_CR_TSMY_POW     (1 << 2)
-#define UCB_TS_CR_TSPY_POW     (1 << 3)
-#define UCB_TS_CR_TSMX_GND     (1 << 4)
-#define UCB_TS_CR_TSPX_GND     (1 << 5)
-#define UCB_TS_CR_TSMY_GND     (1 << 6)
-#define UCB_TS_CR_TSPY_GND     (1 << 7)
-#define UCB_TS_CR_MODE_INT     (0 << 8)
-#define UCB_TS_CR_MODE_PRES    (1 << 8)
-#define UCB_TS_CR_MODE_POS     (2 << 8)
-#define UCB_TS_CR_BIAS_ENA     (1 << 11)
-#define UCB_TS_CR_TSPX_LOW     (1 << 12)
-#define UCB_TS_CR_TSMX_LOW     (1 << 13)
-
-#define UCB_ADC_CR             0x66
-#define UCB_ADC_SYNC_ENA       (1 << 0)
-#define UCB_ADC_VREFBYP_CON    (1 << 1)
-#define UCB_ADC_INP_TSPX       (0 << 2)
-#define UCB_ADC_INP_TSMX       (1 << 2)
-#define UCB_ADC_INP_TSPY       (2 << 2)
-#define UCB_ADC_INP_TSMY       (3 << 2)
-#define UCB_ADC_INP_AD0                (4 << 2)
-#define UCB_ADC_INP_AD1                (5 << 2)
-#define UCB_ADC_INP_AD2                (6 << 2)
-#define UCB_ADC_INP_AD3                (7 << 2)
-#define UCB_ADC_EXT_REF                (1 << 5)
-#define UCB_ADC_START          (1 << 7)
-#define UCB_ADC_ENA            (1 << 15)
-
-#define UCB_ADC_DATA           0x68
-#define UCB_ADC_DAT_VALID      (1 << 15)
-#define UCB_ADC_DAT_VALUE(x)   ((x) & 0x3ff)
-
-#define UCB_ID                 0x7e
-#define UCB_ID_1400             0x4304
-
-
-struct ucb1400 {
-       struct snd_ac97         *ac97;
-       struct input_dev        *ts_idev;
-
-       int                     irq;
-
-       wait_queue_head_t       ts_wait;
-       struct task_struct      *ts_task;
-
-       unsigned int            irq_pending;    /* not bit field shared */
-       unsigned int            ts_restart:1;
-       unsigned int            adcsync:1;
-};
+#include <linux/ucb1400.h>
 
 static int adcsync;
 static int ts_delay = 55; /* us */
 static int ts_delay_pressure;  /* us */
 
-static inline u16 ucb1400_reg_read(struct ucb1400 *ucb, u16 reg)
-{
-       return ucb->ac97->bus->ops->read(ucb->ac97, reg);
-}
-
-static inline void ucb1400_reg_write(struct ucb1400 *ucb, u16 reg, u16 val)
-{
-       ucb->ac97->bus->ops->write(ucb->ac97, reg, val);
-}
-
-static inline void ucb1400_adc_enable(struct ucb1400 *ucb)
-{
-       ucb1400_reg_write(ucb, UCB_ADC_CR, UCB_ADC_ENA);
-}
-
-static unsigned int ucb1400_adc_read(struct ucb1400 *ucb, u16 adc_channel)
-{
-       unsigned int val;
-
-       if (ucb->adcsync)
-               adc_channel |= UCB_ADC_SYNC_ENA;
-
-       ucb1400_reg_write(ucb, UCB_ADC_CR, UCB_ADC_ENA | adc_channel);
-       ucb1400_reg_write(ucb, UCB_ADC_CR, UCB_ADC_ENA | adc_channel | UCB_ADC_START);
-
-       for (;;) {
-               val = ucb1400_reg_read(ucb, UCB_ADC_DATA);
-               if (val & UCB_ADC_DAT_VALID)
-                       break;
-               /* yield to other processes */
-               schedule_timeout_uninterruptible(1);
-       }
-
-       return UCB_ADC_DAT_VALUE(val);
-}
-
-static inline void ucb1400_adc_disable(struct ucb1400 *ucb)
-{
-       ucb1400_reg_write(ucb, UCB_ADC_CR, 0);
-}
-
 /* Switch to interrupt mode. */
-static inline void ucb1400_ts_mode_int(struct ucb1400 *ucb)
+static inline void ucb1400_ts_mode_int(struct snd_ac97 *ac97)
 {
-       ucb1400_reg_write(ucb, UCB_TS_CR,
+       ucb1400_reg_write(ac97, UCB_TS_CR,
                        UCB_TS_CR_TSMX_POW | UCB_TS_CR_TSPX_POW |
                        UCB_TS_CR_TSMY_GND | UCB_TS_CR_TSPY_GND |
                        UCB_TS_CR_MODE_INT);
@@ -152,14 +48,14 @@ static inline void ucb1400_ts_mode_int(struct ucb1400 *ucb)
  * Switch to pressure mode, and read pressure.  We don't need to wait
  * here, since both plates are being driven.
  */
-static inline unsigned int ucb1400_ts_read_pressure(struct ucb1400 *ucb)
+static inline unsigned int ucb1400_ts_read_pressure(struct ucb1400_ts *ucb)
 {
-       ucb1400_reg_write(ucb, UCB_TS_CR,
+       ucb1400_reg_write(ucb->ac97, UCB_TS_CR,
                        UCB_TS_CR_TSMX_POW | UCB_TS_CR_TSPX_POW |
                        UCB_TS_CR_TSMY_GND | UCB_TS_CR_TSPY_GND |
                        UCB_TS_CR_MODE_PRES | UCB_TS_CR_BIAS_ENA);
        udelay(ts_delay_pressure);
-       return ucb1400_adc_read(ucb, UCB_ADC_INP_TSPY);
+       return ucb1400_adc_read(ucb->ac97, UCB_ADC_INP_TSPY, adcsync);
 }
 
 /*
@@ -168,21 +64,21 @@ static inline unsigned int ucb1400_ts_read_pressure(struct ucb1400 *ucb)
  * gives a faster response time.  Even so, we need to wait about 55us
  * for things to stabilise.
  */
-static inline unsigned int ucb1400_ts_read_xpos(struct ucb1400 *ucb)
+static inline unsigned int ucb1400_ts_read_xpos(struct ucb1400_ts *ucb)
 {
-       ucb1400_reg_write(ucb, UCB_TS_CR,
+       ucb1400_reg_write(ucb->ac97, UCB_TS_CR,
                        UCB_TS_CR_TSMX_GND | UCB_TS_CR_TSPX_POW |
                        UCB_TS_CR_MODE_PRES | UCB_TS_CR_BIAS_ENA);
-       ucb1400_reg_write(ucb, UCB_TS_CR,
+       ucb1400_reg_write(ucb->ac97, UCB_TS_CR,
                        UCB_TS_CR_TSMX_GND | UCB_TS_CR_TSPX_POW |
                        UCB_TS_CR_MODE_PRES | UCB_TS_CR_BIAS_ENA);
-       ucb1400_reg_write(ucb, UCB_TS_CR,
+       ucb1400_reg_write(ucb->ac97, UCB_TS_CR,
                        UCB_TS_CR_TSMX_GND | UCB_TS_CR_TSPX_POW |
                        UCB_TS_CR_MODE_POS | UCB_TS_CR_BIAS_ENA);
 
        udelay(ts_delay);
 
-       return ucb1400_adc_read(ucb, UCB_ADC_INP_TSPY);
+       return ucb1400_adc_read(ucb->ac97, UCB_ADC_INP_TSPY, adcsync);
 }
 
 /*
@@ -191,63 +87,63 @@ static inline unsigned int ucb1400_ts_read_xpos(struct ucb1400 *ucb)
  * gives a faster response time.  Even so, we need to wait about 55us
  * for things to stabilise.
  */
-static inline unsigned int ucb1400_ts_read_ypos(struct ucb1400 *ucb)
+static inline unsigned int ucb1400_ts_read_ypos(struct ucb1400_ts *ucb)
 {
-       ucb1400_reg_write(ucb, UCB_TS_CR,
+       ucb1400_reg_write(ucb->ac97, UCB_TS_CR,
                        UCB_TS_CR_TSMY_GND | UCB_TS_CR_TSPY_POW |
                        UCB_TS_CR_MODE_PRES | UCB_TS_CR_BIAS_ENA);
-       ucb1400_reg_write(ucb, UCB_TS_CR,
+       ucb1400_reg_write(ucb->ac97, UCB_TS_CR,
                        UCB_TS_CR_TSMY_GND | UCB_TS_CR_TSPY_POW |
                        UCB_TS_CR_MODE_PRES | UCB_TS_CR_BIAS_ENA);
-       ucb1400_reg_write(ucb, UCB_TS_CR,
+       ucb1400_reg_write(ucb->ac97, UCB_TS_CR,
                        UCB_TS_CR_TSMY_GND | UCB_TS_CR_TSPY_POW |
                        UCB_TS_CR_MODE_POS | UCB_TS_CR_BIAS_ENA);
 
        udelay(ts_delay);
 
-       return ucb1400_adc_read(ucb, UCB_ADC_INP_TSPX);
+       return ucb1400_adc_read(ucb->ac97, UCB_ADC_INP_TSPX, adcsync);
 }
 
 /*
  * Switch to X plate resistance mode.  Set MX to ground, PX to
  * supply.  Measure current.
  */
-static inline unsigned int ucb1400_ts_read_xres(struct ucb1400 *ucb)
+static inline unsigned int ucb1400_ts_read_xres(struct ucb1400_ts *ucb)
 {
-       ucb1400_reg_write(ucb, UCB_TS_CR,
+       ucb1400_reg_write(ucb->ac97, UCB_TS_CR,
                        UCB_TS_CR_TSMX_GND | UCB_TS_CR_TSPX_POW |
                        UCB_TS_CR_MODE_PRES | UCB_TS_CR_BIAS_ENA);
-       return ucb1400_adc_read(ucb, 0);
+       return ucb1400_adc_read(ucb->ac97, 0, adcsync);
 }
 
 /*
  * Switch to Y plate resistance mode.  Set MY to ground, PY to
  * supply.  Measure current.
  */
-static inline unsigned int ucb1400_ts_read_yres(struct ucb1400 *ucb)
+static inline unsigned int ucb1400_ts_read_yres(struct ucb1400_ts *ucb)
 {
-       ucb1400_reg_write(ucb, UCB_TS_CR,
+       ucb1400_reg_write(ucb->ac97, UCB_TS_CR,
                        UCB_TS_CR_TSMY_GND | UCB_TS_CR_TSPY_POW |
                        UCB_TS_CR_MODE_PRES | UCB_TS_CR_BIAS_ENA);
-       return ucb1400_adc_read(ucb, 0);
+       return ucb1400_adc_read(ucb->ac97, 0, adcsync);
 }
 
-static inline int ucb1400_ts_pen_down(struct ucb1400 *ucb)
+static inline int ucb1400_ts_pen_down(struct snd_ac97 *ac97)
 {
-       unsigned short val = ucb1400_reg_read(ucb, UCB_TS_CR);
-       return (val & (UCB_TS_CR_TSPX_LOW | UCB_TS_CR_TSMX_LOW));
+       unsigned short val = ucb1400_reg_read(ac97, UCB_TS_CR);
+       return val & (UCB_TS_CR_TSPX_LOW | UCB_TS_CR_TSMX_LOW);
 }
 
-static inline void ucb1400_ts_irq_enable(struct ucb1400 *ucb)
+static inline void ucb1400_ts_irq_enable(struct snd_ac97 *ac97)
 {
-       ucb1400_reg_write(ucb, UCB_IE_CLEAR, UCB_IE_TSPX);
-       ucb1400_reg_write(ucb, UCB_IE_CLEAR, 0);
-       ucb1400_reg_write(ucb, UCB_IE_FAL, UCB_IE_TSPX);
+       ucb1400_reg_write(ac97, UCB_IE_CLEAR, UCB_IE_TSPX);
+       ucb1400_reg_write(ac97, UCB_IE_CLEAR, 0);
+       ucb1400_reg_write(ac97, UCB_IE_FAL, UCB_IE_TSPX);
 }
 
-static inline void ucb1400_ts_irq_disable(struct ucb1400 *ucb)
+static inline void ucb1400_ts_irq_disable(struct snd_ac97 *ac97)
 {
-       ucb1400_reg_write(ucb, UCB_IE_FAL, 0);
+       ucb1400_reg_write(ac97, UCB_IE_FAL, 0);
 }
 
 static void ucb1400_ts_evt_add(struct input_dev *idev, u16 pressure, u16 x, u16 y)
@@ -264,25 +160,24 @@ static void ucb1400_ts_event_release(struct input_dev *idev)
        input_sync(idev);
 }
 
-static void ucb1400_handle_pending_irq(struct ucb1400 *ucb)
+static void ucb1400_handle_pending_irq(struct ucb1400_ts *ucb)
 {
        unsigned int isr;
 
-       isr = ucb1400_reg_read(ucb, UCB_IE_STATUS);
-       ucb1400_reg_write(ucb, UCB_IE_CLEAR, isr);
-       ucb1400_reg_write(ucb, UCB_IE_CLEAR, 0);
+       isr = ucb1400_reg_read(ucb->ac97, UCB_IE_STATUS);
+       ucb1400_reg_write(ucb->ac97, UCB_IE_CLEAR, isr);
+       ucb1400_reg_write(ucb->ac97, UCB_IE_CLEAR, 0);
 
-       if (isr & UCB_IE_TSPX)
-               ucb1400_ts_irq_disable(ucb);
-       else
+       if (isr & UCB_IE_TSPX) {
+               ucb1400_ts_irq_disable(ucb->ac97);
+               enable_irq(ucb->irq);
+       } else
                printk(KERN_ERR "ucb1400: unexpected IE_STATUS = %#x\n", isr);
-
-       enable_irq(ucb->irq);
 }
 
 static int ucb1400_ts_thread(void *_ucb)
 {
-       struct ucb1400 *ucb = _ucb;
+       struct ucb1400_ts *ucb = _ucb;
        struct task_struct *tsk = current;
        int valid = 0;
        struct sched_param param = { .sched_priority = 1 };
@@ -301,19 +196,19 @@ static int ucb1400_ts_thread(void *_ucb)
                        ucb1400_handle_pending_irq(ucb);
                }
 
-               ucb1400_adc_enable(ucb);
+               ucb1400_adc_enable(ucb->ac97);
                x = ucb1400_ts_read_xpos(ucb);
                y = ucb1400_ts_read_ypos(ucb);
                p = ucb1400_ts_read_pressure(ucb);
-               ucb1400_adc_disable(ucb);
+               ucb1400_adc_disable(ucb->ac97);
 
                /* Switch back to interrupt mode. */
-               ucb1400_ts_mode_int(ucb);
+               ucb1400_ts_mode_int(ucb->ac97);
 
                msleep(10);
 
-               if (ucb1400_ts_pen_down(ucb)) {
-                       ucb1400_ts_irq_enable(ucb);
+               if (ucb1400_ts_pen_down(ucb->ac97)) {
+                       ucb1400_ts_irq_enable(ucb->ac97);
 
                        /*
                         * If we spat out a valid sample set last time,
@@ -332,8 +227,8 @@ static int ucb1400_ts_thread(void *_ucb)
                }
 
                wait_event_freezable_timeout(ucb->ts_wait,
-                       ucb->irq_pending || ucb->ts_restart || kthread_should_stop(),
-                       timeout);
+                       ucb->irq_pending || ucb->ts_restart ||
+                       kthread_should_stop(), timeout);
        }
 
        /* Send the "pen off" if we are stopping with the pen still active */
@@ -356,7 +251,7 @@ static int ucb1400_ts_thread(void *_ucb)
  */
 static irqreturn_t ucb1400_hard_irq(int irqnr, void *devid)
 {
-       struct ucb1400 *ucb = devid;
+       struct ucb1400_ts *ucb = devid;
 
        if (irqnr == ucb->irq) {
                disable_irq(ucb->irq);
@@ -369,7 +264,7 @@ static irqreturn_t ucb1400_hard_irq(int irqnr, void *devid)
 
 static int ucb1400_ts_open(struct input_dev *idev)
 {
-       struct ucb1400 *ucb = input_get_drvdata(idev);
+       struct ucb1400_ts *ucb = input_get_drvdata(idev);
        int ret = 0;
 
        BUG_ON(ucb->ts_task);
@@ -385,34 +280,14 @@ static int ucb1400_ts_open(struct input_dev *idev)
 
 static void ucb1400_ts_close(struct input_dev *idev)
 {
-       struct ucb1400 *ucb = input_get_drvdata(idev);
+       struct ucb1400_ts *ucb = input_get_drvdata(idev);
 
        if (ucb->ts_task)
                kthread_stop(ucb->ts_task);
 
-       ucb1400_ts_irq_disable(ucb);
-       ucb1400_reg_write(ucb, UCB_TS_CR, 0);
-}
-
-#ifdef CONFIG_PM
-static int ucb1400_ts_resume(struct device *dev)
-{
-       struct ucb1400 *ucb = dev_get_drvdata(dev);
-
-       if (ucb->ts_task) {
-               /*
-                * Restart the TS thread to ensure the
-                * TS interrupt mode is set up again
-                * after sleep.
-                */
-               ucb->ts_restart = 1;
-               wake_up(&ucb->ts_wait);
-       }
-       return 0;
+       ucb1400_ts_irq_disable(ucb->ac97);
+       ucb1400_reg_write(ucb->ac97, UCB_TS_CR, 0);
 }
-#else
-#define ucb1400_ts_resume NULL
-#endif
 
 #ifndef NO_IRQ
 #define NO_IRQ 0
@@ -422,25 +297,26 @@ static int ucb1400_ts_resume(struct device *dev)
  * Try to probe our interrupt, rather than relying on lots of
  * hard-coded machine dependencies.
  */
-static int ucb1400_detect_irq(struct ucb1400 *ucb)
+static int ucb1400_ts_detect_irq(struct ucb1400_ts *ucb)
 {
        unsigned long mask, timeout;
 
        mask = probe_irq_on();
 
        /* Enable the ADC interrupt. */
-       ucb1400_reg_write(ucb, UCB_IE_RIS, UCB_IE_ADC);
-       ucb1400_reg_write(ucb, UCB_IE_FAL, UCB_IE_ADC);
-       ucb1400_reg_write(ucb, UCB_IE_CLEAR, 0xffff);
-       ucb1400_reg_write(ucb, UCB_IE_CLEAR, 0);
+       ucb1400_reg_write(ucb->ac97, UCB_IE_RIS, UCB_IE_ADC);
+       ucb1400_reg_write(ucb->ac97, UCB_IE_FAL, UCB_IE_ADC);
+       ucb1400_reg_write(ucb->ac97, UCB_IE_CLEAR, 0xffff);
+       ucb1400_reg_write(ucb->ac97, UCB_IE_CLEAR, 0);
 
        /* Cause an ADC interrupt. */
-       ucb1400_reg_write(ucb, UCB_ADC_CR, UCB_ADC_ENA);
-       ucb1400_reg_write(ucb, UCB_ADC_CR, UCB_ADC_ENA | UCB_ADC_START);
+       ucb1400_reg_write(ucb->ac97, UCB_ADC_CR, UCB_ADC_ENA);
+       ucb1400_reg_write(ucb->ac97, UCB_ADC_CR, UCB_ADC_ENA | UCB_ADC_START);
 
        /* Wait for the conversion to complete. */
        timeout = jiffies + HZ/2;
-       while (!(ucb1400_reg_read(ucb, UCB_ADC_DATA) & UCB_ADC_DAT_VALID)) {
+       while (!(ucb1400_reg_read(ucb->ac97, UCB_ADC_DATA) &
+                                               UCB_ADC_DAT_VALID)) {
                cpu_relax();
                if (time_after(jiffies, timeout)) {
                        printk(KERN_ERR "ucb1400: timed out in IRQ probe\n");
@@ -448,13 +324,13 @@ static int ucb1400_detect_irq(struct ucb1400 *ucb)
                        return -ENODEV;
                }
        }
-       ucb1400_reg_write(ucb, UCB_ADC_CR, 0);
+       ucb1400_reg_write(ucb->ac97, UCB_ADC_CR, 0);
 
        /* Disable and clear interrupt. */
-       ucb1400_reg_write(ucb, UCB_IE_RIS, 0);
-       ucb1400_reg_write(ucb, UCB_IE_FAL, 0);
-       ucb1400_reg_write(ucb, UCB_IE_CLEAR, 0xffff);
-       ucb1400_reg_write(ucb, UCB_IE_CLEAR, 0);
+       ucb1400_reg_write(ucb->ac97, UCB_IE_RIS, 0);
+       ucb1400_reg_write(ucb->ac97, UCB_IE_FAL, 0);
+       ucb1400_reg_write(ucb->ac97, UCB_IE_CLEAR, 0xffff);
+       ucb1400_reg_write(ucb->ac97, UCB_IE_CLEAR, 0);
 
        /* Read triggered interrupt. */
        ucb->irq = probe_irq_off(mask);
@@ -464,36 +340,25 @@ static int ucb1400_detect_irq(struct ucb1400 *ucb)
        return 0;
 }
 
-static int ucb1400_ts_probe(struct device *dev)
+static int ucb1400_ts_probe(struct platform_device *dev)
 {
-       struct ucb1400 *ucb;
-       struct input_dev *idev;
-       int error, id, x_res, y_res;
+       int error, x_res, y_res;
+       struct ucb1400_ts *ucb = dev->dev.platform_data;
 
-       ucb = kzalloc(sizeof(struct ucb1400), GFP_KERNEL);
-       idev = input_allocate_device();
-       if (!ucb || !idev) {
+       ucb->ts_idev = input_allocate_device();
+       if (!ucb->ts_idev) {
                error = -ENOMEM;
-               goto err_free_devs;
+               goto err;
        }
 
-       ucb->ts_idev = idev;
-       ucb->adcsync = adcsync;
-       ucb->ac97 = to_ac97_t(dev);
-       init_waitqueue_head(&ucb->ts_wait);
-
-       id = ucb1400_reg_read(ucb, UCB_ID);
-       if (id != UCB_ID_1400) {
-               error = -ENODEV;
-               goto err_free_devs;
-       }
-
-       error = ucb1400_detect_irq(ucb);
+       error = ucb1400_ts_detect_irq(ucb);
        if (error) {
                printk(KERN_ERR "UCB1400: IRQ probe failed\n");
                goto err_free_devs;
        }
 
+       init_waitqueue_head(&ucb->ts_wait);
+
        error = request_irq(ucb->irq, ucb1400_hard_irq, IRQF_TRIGGER_RISING,
                                "UCB1400", ucb);
        if (error) {
@@ -503,80 +368,101 @@ static int ucb1400_ts_probe(struct device *dev)
        }
        printk(KERN_DEBUG "UCB1400: found IRQ %d\n", ucb->irq);
 
-       input_set_drvdata(idev, ucb);
+       input_set_drvdata(ucb->ts_idev, ucb);
 
-       idev->dev.parent        = dev;
-       idev->name              = "UCB1400 touchscreen interface";
-       idev->id.vendor         = ucb1400_reg_read(ucb, AC97_VENDOR_ID1);
-       idev->id.product        = id;
-       idev->open              = ucb1400_ts_open;
-       idev->close             = ucb1400_ts_close;
-       idev->evbit[0]          = BIT_MASK(EV_ABS);
+       ucb->ts_idev->dev.parent        = &dev->dev;
+       ucb->ts_idev->name              = "UCB1400 touchscreen interface";
+       ucb->ts_idev->id.vendor         = ucb1400_reg_read(ucb->ac97,
+                                               AC97_VENDOR_ID1);
+       ucb->ts_idev->id.product        = ucb->id;
+       ucb->ts_idev->open              = ucb1400_ts_open;
+       ucb->ts_idev->close             = ucb1400_ts_close;
+       ucb->ts_idev->evbit[0]          = BIT_MASK(EV_ABS);
 
-       ucb1400_adc_enable(ucb);
+       ucb1400_adc_enable(ucb->ac97);
        x_res = ucb1400_ts_read_xres(ucb);
        y_res = ucb1400_ts_read_yres(ucb);
-       ucb1400_adc_disable(ucb);
+       ucb1400_adc_disable(ucb->ac97);
        printk(KERN_DEBUG "UCB1400: x/y = %d/%d\n", x_res, y_res);
 
-       input_set_abs_params(idev, ABS_X, 0, x_res, 0, 0);
-       input_set_abs_params(idev, ABS_Y, 0, y_res, 0, 0);
-       input_set_abs_params(idev, ABS_PRESSURE, 0, 0, 0, 0);
+       input_set_abs_params(ucb->ts_idev, ABS_X, 0, x_res, 0, 0);
+       input_set_abs_params(ucb->ts_idev, ABS_Y, 0, y_res, 0, 0);
+       input_set_abs_params(ucb->ts_idev, ABS_PRESSURE, 0, 0, 0, 0);
 
-       error = input_register_device(idev);
+       error = input_register_device(ucb->ts_idev);
        if (error)
                goto err_free_irq;
 
-       dev_set_drvdata(dev, ucb);
        return 0;
 
- err_free_irq:
+err_free_irq:
        free_irq(ucb->irq, ucb);
- err_free_devs:
-       input_free_device(idev);
-       kfree(ucb);
+err_free_devs:
+       input_free_device(ucb->ts_idev);
+err:
        return error;
+
 }
 
-static int ucb1400_ts_remove(struct device *dev)
+static int ucb1400_ts_remove(struct platform_device *dev)
 {
-       struct ucb1400 *ucb = dev_get_drvdata(dev);
+       struct ucb1400_ts *ucb = dev->dev.platform_data;
 
        free_irq(ucb->irq, ucb);
        input_unregister_device(ucb->ts_idev);
-       dev_set_drvdata(dev, NULL);
-       kfree(ucb);
        return 0;
 }
 
-static struct device_driver ucb1400_ts_driver = {
-       .name           = "ucb1400_ts",
-       .owner          = THIS_MODULE,
-       .bus            = &ac97_bus_type,
-       .probe          = ucb1400_ts_probe,
-       .remove         = ucb1400_ts_remove,
-       .resume         = ucb1400_ts_resume,
+#ifdef CONFIG_PM
+static int ucb1400_ts_resume(struct platform_device *dev)
+{
+       struct ucb1400_ts *ucb = platform_get_drvdata(dev);
+
+       if (ucb->ts_task) {
+               /*
+                * Restart the TS thread to ensure the
+                * TS interrupt mode is set up again
+                * after sleep.
+                */
+               ucb->ts_restart = 1;
+               wake_up(&ucb->ts_wait);
+       }
+       return 0;
+}
+#else
+#define ucb1400_ts_resume NULL
+#endif
+
+static struct platform_driver ucb1400_ts_driver = {
+       .probe  = ucb1400_ts_probe,
+       .remove = ucb1400_ts_remove,
+       .resume = ucb1400_ts_resume,
+       .driver = {
+               .name   = "ucb1400_ts",
+       },
 };
 
 static int __init ucb1400_ts_init(void)
 {
-       return driver_register(&ucb1400_ts_driver);
+       return platform_driver_register(&ucb1400_ts_driver);
 }
 
 static void __exit ucb1400_ts_exit(void)
 {
-       driver_unregister(&ucb1400_ts_driver);
+       platform_driver_unregister(&ucb1400_ts_driver);
 }
 
 module_param(adcsync, bool, 0444);
 MODULE_PARM_DESC(adcsync, "Synchronize touch readings with ADCSYNC pin.");
 
 module_param(ts_delay, int, 0444);
-MODULE_PARM_DESC(ts_delay, "Delay between panel setup and position read. Default = 55us.");
+MODULE_PARM_DESC(ts_delay, "Delay between panel setup and"
+                           " position read. Default = 55us.");
 
 module_param(ts_delay_pressure, int, 0444);
 MODULE_PARM_DESC(ts_delay_pressure,
-                 "delay between panel setup and pressure read.  Default = 0us.");
+               "delay between panel setup and pressure read."
+               "  Default = 0us.");
 
 module_init(ucb1400_ts_init);
 module_exit(ucb1400_ts_exit);
index 9556262dda5aabba7b6474eee2b4e2a3b1a31906..5b14262af0178797e174c7355680271d3ec04758 100644 (file)
@@ -24,13 +24,6 @@ config LEDS_ATMEL_PWM
          This option enables support for LEDs driven using outputs
          of the dedicated PWM controller found on newer Atmel SOCs.
 
-config LEDS_CORGI
-       tristate "LED Support for the Sharp SL-C7x0 series"
-       depends on LEDS_CLASS && PXA_SHARP_C7xx
-       help
-         This option enables support for the LEDs on Sharp Zaurus
-         SL-C7x0 series (C700, C750, C760, C860).
-
 config LEDS_LOCOMO
        tristate "LED Support for Locomo device"
        depends on LEDS_CLASS && SHARP_LOCOMO
@@ -38,13 +31,6 @@ config LEDS_LOCOMO
          This option enables support for the LEDs on Sharp Locomo.
          Zaurus models SL-5500 and SL-5600.
 
-config LEDS_SPITZ
-       tristate "LED Support for the Sharp SL-Cxx00 series"
-       depends on LEDS_CLASS && PXA_SHARP_Cxx00
-       help
-         This option enables support for the LEDs on Sharp Zaurus
-         SL-Cxx00 series (C1000, C3000, C3100).
-
 config LEDS_S3C24XX
        tristate "LED Support for Samsung S3C24XX GPIO LEDs"
        depends on LEDS_CLASS && ARCH_S3C2410
index ff7982b44565d7fe674b0846916a8acb2d221666..3a8e6a04363c501abc8217f894576ae519aea5d9 100644 (file)
@@ -6,9 +6,7 @@ obj-$(CONFIG_LEDS_TRIGGERS)             += led-triggers.o
 
 # LED Platform Drivers
 obj-$(CONFIG_LEDS_ATMEL_PWM)           += leds-atmel-pwm.o
-obj-$(CONFIG_LEDS_CORGI)               += leds-corgi.o
 obj-$(CONFIG_LEDS_LOCOMO)              += leds-locomo.o
-obj-$(CONFIG_LEDS_SPITZ)               += leds-spitz.o
 obj-$(CONFIG_LEDS_S3C24XX)             += leds-s3c24xx.o
 obj-$(CONFIG_LEDS_AMS_DELTA)           += leds-ams-delta.o
 obj-$(CONFIG_LEDS_NET48XX)             += leds-net48xx.o
diff --git a/drivers/leds/leds-corgi.c b/drivers/leds/leds-corgi.c
deleted file mode 100644 (file)
index bc2dcd8..0000000
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * LED Triggers Core
- *
- * Copyright 2005-2006 Openedhand Ltd.
- *
- * Author: Richard Purdie <rpurdie@openedhand.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/init.h>
-#include <linux/platform_device.h>
-#include <linux/leds.h>
-#include <mach/corgi.h>
-#include <mach/hardware.h>
-#include <mach/pxa-regs.h>
-#include <asm/hardware/scoop.h>
-
-static void corgiled_amber_set(struct led_classdev *led_cdev,
-                              enum led_brightness value)
-{
-       if (value)
-               GPSR0 = GPIO_bit(CORGI_GPIO_LED_ORANGE);
-       else
-               GPCR0 = GPIO_bit(CORGI_GPIO_LED_ORANGE);
-}
-
-static void corgiled_green_set(struct led_classdev *led_cdev,
-                              enum led_brightness value)
-{
-       if (value)
-               set_scoop_gpio(&corgiscoop_device.dev, CORGI_SCP_LED_GREEN);
-       else
-               reset_scoop_gpio(&corgiscoop_device.dev, CORGI_SCP_LED_GREEN);
-}
-
-static struct led_classdev corgi_amber_led = {
-       .name                   = "corgi:amber:charge",
-       .default_trigger        = "sharpsl-charge",
-       .brightness_set         = corgiled_amber_set,
-};
-
-static struct led_classdev corgi_green_led = {
-       .name                   = "corgi:green:mail",
-       .default_trigger        = "nand-disk",
-       .brightness_set         = corgiled_green_set,
-};
-
-#ifdef CONFIG_PM
-static int corgiled_suspend(struct platform_device *dev, pm_message_t state)
-{
-#ifdef CONFIG_LEDS_TRIGGERS
-       if (corgi_amber_led.trigger &&
-           strcmp(corgi_amber_led.trigger->name, "sharpsl-charge"))
-#endif
-               led_classdev_suspend(&corgi_amber_led);
-       led_classdev_suspend(&corgi_green_led);
-       return 0;
-}
-
-static int corgiled_resume(struct platform_device *dev)
-{
-       led_classdev_resume(&corgi_amber_led);
-       led_classdev_resume(&corgi_green_led);
-       return 0;
-}
-#endif
-
-static int corgiled_probe(struct platform_device *pdev)
-{
-       int ret;
-
-       ret = led_classdev_register(&pdev->dev, &corgi_amber_led);
-       if (ret < 0)
-               return ret;
-
-       ret = led_classdev_register(&pdev->dev, &corgi_green_led);
-       if (ret < 0)
-               led_classdev_unregister(&corgi_amber_led);
-
-       return ret;
-}
-
-static int corgiled_remove(struct platform_device *pdev)
-{
-       led_classdev_unregister(&corgi_amber_led);
-       led_classdev_unregister(&corgi_green_led);
-       return 0;
-}
-
-static struct platform_driver corgiled_driver = {
-       .probe          = corgiled_probe,
-       .remove         = corgiled_remove,
-#ifdef CONFIG_PM
-       .suspend        = corgiled_suspend,
-       .resume         = corgiled_resume,
-#endif
-       .driver         = {
-               .name           = "corgi-led",
-               .owner          = THIS_MODULE,
-       },
-};
-
-static int __init corgiled_init(void)
-{
-       return platform_driver_register(&corgiled_driver);
-}
-
-static void __exit corgiled_exit(void)
-{
-       platform_driver_unregister(&corgiled_driver);
-}
-
-module_init(corgiled_init);
-module_exit(corgiled_exit);
-
-MODULE_AUTHOR("Richard Purdie <rpurdie@openedhand.com>");
-MODULE_DESCRIPTION("Corgi LED driver");
-MODULE_LICENSE("GPL");
-MODULE_ALIAS("platform:corgi-led");
diff --git a/drivers/leds/leds-spitz.c b/drivers/leds/leds-spitz.c
deleted file mode 100644 (file)
index 178831c..0000000
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * LED Triggers Core
- *
- * Copyright 2005-2006 Openedhand Ltd.
- *
- * Author: Richard Purdie <rpurdie@openedhand.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/init.h>
-#include <linux/platform_device.h>
-#include <linux/leds.h>
-#include <asm/hardware/scoop.h>
-#include <asm/mach-types.h>
-#include <mach/hardware.h>
-#include <mach/pxa-regs.h>
-#include <mach/spitz.h>
-
-static void spitzled_amber_set(struct led_classdev *led_cdev,
-                              enum led_brightness value)
-{
-       if (value)
-               set_scoop_gpio(&spitzscoop_device.dev, SPITZ_SCP_LED_ORANGE);
-       else
-               reset_scoop_gpio(&spitzscoop_device.dev, SPITZ_SCP_LED_ORANGE);
-}
-
-static void spitzled_green_set(struct led_classdev *led_cdev,
-                              enum led_brightness value)
-{
-       if (value)
-               set_scoop_gpio(&spitzscoop_device.dev, SPITZ_SCP_LED_GREEN);
-       else
-               reset_scoop_gpio(&spitzscoop_device.dev, SPITZ_SCP_LED_GREEN);
-}
-
-static struct led_classdev spitz_amber_led = {
-       .name                   = "spitz:amber:charge",
-       .default_trigger        = "sharpsl-charge",
-       .brightness_set         = spitzled_amber_set,
-};
-
-static struct led_classdev spitz_green_led = {
-       .name                   = "spitz:green:hddactivity",
-       .default_trigger        = "ide-disk",
-       .brightness_set         = spitzled_green_set,
-};
-
-#ifdef CONFIG_PM
-static int spitzled_suspend(struct platform_device *dev, pm_message_t state)
-{
-#ifdef CONFIG_LEDS_TRIGGERS
-       if (spitz_amber_led.trigger &&
-           strcmp(spitz_amber_led.trigger->name, "sharpsl-charge"))
-#endif
-               led_classdev_suspend(&spitz_amber_led);
-       led_classdev_suspend(&spitz_green_led);
-       return 0;
-}
-
-static int spitzled_resume(struct platform_device *dev)
-{
-       led_classdev_resume(&spitz_amber_led);
-       led_classdev_resume(&spitz_green_led);
-       return 0;
-}
-#endif
-
-static int spitzled_probe(struct platform_device *pdev)
-{
-       int ret;
-
-       if (machine_is_akita()) {
-               spitz_green_led.name = "spitz:green:mail";
-               spitz_green_led.default_trigger = "nand-disk";
-       }
-
-       ret = led_classdev_register(&pdev->dev, &spitz_amber_led);
-       if (ret < 0)
-               return ret;
-
-       ret = led_classdev_register(&pdev->dev, &spitz_green_led);
-       if (ret < 0)
-               led_classdev_unregister(&spitz_amber_led);
-
-       return ret;
-}
-
-static int spitzled_remove(struct platform_device *pdev)
-{
-       led_classdev_unregister(&spitz_amber_led);
-       led_classdev_unregister(&spitz_green_led);
-
-       return 0;
-}
-
-static struct platform_driver spitzled_driver = {
-       .probe          = spitzled_probe,
-       .remove         = spitzled_remove,
-#ifdef CONFIG_PM
-       .suspend        = spitzled_suspend,
-       .resume         = spitzled_resume,
-#endif
-       .driver         = {
-               .name           = "spitz-led",
-               .owner          = THIS_MODULE,
-       },
-};
-
-static int __init spitzled_init(void)
-{
-       return platform_driver_register(&spitzled_driver);
-}
-
-static void __exit spitzled_exit(void)
-{
-       platform_driver_unregister(&spitzled_driver);
-}
-
-module_init(spitzled_init);
-module_exit(spitzled_exit);
-
-MODULE_AUTHOR("Richard Purdie <rpurdie@openedhand.com>");
-MODULE_DESCRIPTION("Spitz LED driver");
-MODULE_LICENSE("GPL");
-MODULE_ALIAS("platform:spitz-led");
index 388cf94055d35e13311569fb29494ce949d0e0c2..cf96b2cc4f1c4b70f59ef279ad8cfee8b4535f1a 100644 (file)
@@ -1025,9 +1025,9 @@ static int pxa_camera_resume(struct soc_camera_device *icd)
        struct pxa_camera_dev *pcdev = ici->priv;
        int i = 0, ret = 0;
 
-       DRCMR68 = pcdev->dma_chans[0] | DRCMR_MAPVLD;
-       DRCMR69 = pcdev->dma_chans[1] | DRCMR_MAPVLD;
-       DRCMR70 = pcdev->dma_chans[2] | DRCMR_MAPVLD;
+       DRCMR(68) = pcdev->dma_chans[0] | DRCMR_MAPVLD;
+       DRCMR(69) = pcdev->dma_chans[1] | DRCMR_MAPVLD;
+       DRCMR(70) = pcdev->dma_chans[2] | DRCMR_MAPVLD;
 
        CICR0 = pcdev->save_cicr[i++] & ~CICR0_ENB;
        CICR1 = pcdev->save_cicr[i++];
@@ -1171,9 +1171,9 @@ static int pxa_camera_probe(struct platform_device *pdev)
        }
        dev_dbg(pcdev->dev, "got DMA channel (V) %d\n", pcdev->dma_chans[2]);
 
-       DRCMR68 = pcdev->dma_chans[0] | DRCMR_MAPVLD;
-       DRCMR69 = pcdev->dma_chans[1] | DRCMR_MAPVLD;
-       DRCMR70 = pcdev->dma_chans[2] | DRCMR_MAPVLD;
+       DRCMR(68) = pcdev->dma_chans[0] | DRCMR_MAPVLD;
+       DRCMR(69) = pcdev->dma_chans[1] | DRCMR_MAPVLD;
+       DRCMR(70) = pcdev->dma_chans[2] | DRCMR_MAPVLD;
 
        /* request irq */
        err = request_irq(pcdev->irq, pxa_camera_irq, 0, PXA_CAM_DRV_NAME,
index 10c44d3fe01a429172855d2b76ea54e9255b6779..5dba1651f9cc1d40aef4bb3c2bd91e0e3c2686a5 100644 (file)
@@ -50,6 +50,15 @@ config HTC_PASIC3
          HTC Magician devices, respectively. Actual functionality is
          handled by the leds-pasic3 and ds1wm drivers.
 
+config UCB1400_CORE
+       tristate "Philips UCB1400 Core driver"
+       help
+         This enables support for the Philips UCB1400 core functions.
+         The UCB1400 is an AC97 audio codec.
+
+         To compile this driver as a module, choose M here: the
+         module will be called ucb1400_core.
+
 config MFD_TMIO
        bool
        default n
index 03ad239ecef0ba0fde5cc1dbebe579203953174f..6abebe364419ed9668f0e08ea68abf0c362a7733 100644 (file)
@@ -22,3 +22,4 @@ obj-$(CONFIG_MCP_UCB1200_TS)  += ucb1x00-ts.o
 ifeq ($(CONFIG_SA1100_ASSABET),y)
 obj-$(CONFIG_MCP_UCB1200)      += ucb1x00-assabet.o
 endif
+obj-$(CONFIG_UCB1400_CORE)     += ucb1400_core.o
diff --git a/drivers/mfd/ucb1400_core.c b/drivers/mfd/ucb1400_core.c
new file mode 100644 (file)
index 0000000..178159e
--- /dev/null
@@ -0,0 +1,106 @@
+/*
+ * Core functions for:
+ *  Philips UCB1400 multifunction chip
+ *
+ * Based on ucb1400_ts.c:
+ *  Author:    Nicolas Pitre
+ *  Created:   September 25, 2006
+ *  Copyright: MontaVista Software, Inc.
+ *
+ * Spliting done by: Marek Vasut <marek.vasut@gmail.com>
+ * If something doesnt work and it worked before spliting, e-mail me,
+ * dont bother Nicolas please ;-)
+ *
+ * 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.
+ *
+ * This code is heavily based on ucb1x00-*.c copyrighted by Russell King
+ * covering the UCB1100, UCB1200 and UCB1300..  Support for the UCB1400 has
+ * been made separate from ucb1x00-core/ucb1x00-ts on Russell's request.
+ */
+
+#include <linux/module.h>
+#include <linux/ucb1400.h>
+
+static int ucb1400_core_probe(struct device *dev)
+{
+       int err;
+       struct ucb1400 *ucb;
+       struct ucb1400_ts ucb_ts;
+       struct snd_ac97 *ac97;
+
+       memset(&ucb_ts, 0, sizeof(ucb_ts));
+
+       ucb = kzalloc(sizeof(struct ucb1400), GFP_KERNEL);
+       if (!ucb) {
+               err = -ENOMEM;
+               goto err;
+       }
+
+       dev_set_drvdata(dev, ucb);
+
+       ac97 = to_ac97_t(dev);
+
+       ucb_ts.id = ucb1400_reg_read(ac97, UCB_ID);
+       if (ucb_ts.id != UCB_ID_1400) {
+               err = -ENODEV;
+               goto err0;
+       }
+
+       /* TOUCHSCREEN */
+       ucb_ts.ac97 = ac97;
+       ucb->ucb1400_ts = platform_device_alloc("ucb1400_ts", -1);
+       if (!ucb->ucb1400_ts) {
+               err = -ENOMEM;
+               goto err0;
+       }
+       err = platform_device_add_data(ucb->ucb1400_ts, &ucb_ts,
+                                       sizeof(ucb_ts));
+       if (err)
+               goto err1;
+       err = platform_device_add(ucb->ucb1400_ts);
+       if (err)
+               goto err1;
+
+       return 0;
+
+err1:
+       platform_device_put(ucb->ucb1400_ts);
+err0:
+       kfree(ucb);
+err:
+       return err;
+}
+
+static int ucb1400_core_remove(struct device *dev)
+{
+       struct ucb1400 *ucb = dev_get_drvdata(dev);
+
+       platform_device_unregister(ucb->ucb1400_ts);
+       kfree(ucb);
+       return 0;
+}
+
+static struct device_driver ucb1400_core_driver = {
+       .name   = "ucb1400_core",
+       .bus    = &ac97_bus_type,
+       .probe  = ucb1400_core_probe,
+       .remove = ucb1400_core_remove,
+};
+
+static int __init ucb1400_core_init(void)
+{
+       return driver_register(&ucb1400_core_driver);
+}
+
+static void __exit ucb1400_core_exit(void)
+{
+       driver_unregister(&ucb1400_core_driver);
+}
+
+module_init(ucb1400_core_init);
+module_exit(ucb1400_core_exit);
+
+MODULE_DESCRIPTION("Philips UCB1400 driver");
+MODULE_LICENSE("GPL");
index 55093ad132ca62037a5dc0b4b1765353a70f0882..ebfaa99609394b14d47d3028cb5b6bc393608409 100644 (file)
@@ -520,7 +520,7 @@ static int pxamci_probe(struct platform_device *pdev)
        /*
         * Block length register is only 10 bits before PXA27x.
         */
-       mmc->max_blk_size = (cpu_is_pxa21x() || cpu_is_pxa25x()) ? 1023 : 2048;
+       mmc->max_blk_size = cpu_is_pxa25x() ? 1023 : 2048;
 
        /*
         * Block count register is 16 bits.
@@ -554,7 +554,7 @@ static int pxamci_probe(struct platform_device *pdev)
                         MMC_VDD_32_33|MMC_VDD_33_34;
        mmc->caps = 0;
        host->cmdat = 0;
-       if (!cpu_is_pxa21x() && !cpu_is_pxa25x()) {
+       if (!cpu_is_pxa25x()) {
                mmc->caps |= MMC_CAP_4_BIT_DATA | MMC_CAP_SDIO_IRQ;
                host->cmdat |= CMDAT_SDIO_INT_EN;
                if (cpu_is_pxa300() || cpu_is_pxa310())
index 1ee7f993db1c0cc2b0c0a227bf360615c9d24d8a..578c776e135632144c30fc20671c35becdb8b489 100644 (file)
@@ -2,6 +2,9 @@
  * Error Corrected Code Controller (ECC) - System peripherals regsters.
  * Based on AT91SAM9260 datasheet revision B.
  *
+ * Copyright (C) 2007 Andrew Victor
+ * Copyright (C) 2007 Atmel 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
index 9eba3f04783a90962071f6ad5676c151c031301a..fa129c09bca8b8fc8f7613176b0e255891dcb80d 100644 (file)
@@ -156,7 +156,7 @@ static int cmx270_init(void)
        int mtd_parts_nb = 0;
        int ret;
 
-       if (!machine_is_armcore())
+       if (!(machine_is_armcore() && cpu_is_pxa27x()))
                return -ENODEV;
 
        ret = gpio_request(GPIO_NAND_CS, "NAND CS");
index 4a11296a951438df0730456206473bc40b363059..9df7bb93edcae0c84885d763042faa1c844ae5e1 100644 (file)
@@ -1386,7 +1386,8 @@ config FORCEDETH_NAPI
 
 config CS89x0
        tristate "CS89x0 support"
-       depends on NET_PCI && (ISA || MACH_IXDP2351 || ARCH_IXDP2X01 || ARCH_PNX010X)
+       depends on NET_ETHERNET && (ISA || EISA || MACH_IXDP2351 \
+               || ARCH_IXDP2X01 || ARCH_PNX010X || MACH_MX31ADS)
        ---help---
          Support for CS89x0 chipset based Ethernet cards. If you have a
          network (Ethernet) card of this type, say Y and read the
@@ -1397,6 +1398,11 @@ config CS89x0
          To compile this driver as a module, choose M here. The module
          will be called cs89x0.
 
+config CS89x0_NONISA_IRQ
+       def_bool y
+       depends on CS89x0 != n
+       depends on MACH_IXDP2351 || ARCH_IXDP2X01 || ARCH_PNX010X || MACH_MX31ADS
+
 config TC35815
        tristate "TOSHIBA TC35815 Ethernet support"
        depends on NET_PCI && PCI && MIPS
index ea6144a9565e571665db792b7686a31ff991c823..5890a917a628b2155ff88e6ad44ed130a166b5fc 100644 (file)
@@ -194,6 +194,12 @@ static unsigned int cs8900_irq_map[] = {IRQ_IXDP2X01_CS8900, 0, 0, 0};
 #define CIRRUS_DEFAULT_IRQ     VH_INTC_INT_NUM_CASCADED_INTERRUPT_1 /* Event inputs bank 1 - ID 35/bit 3 */
 static unsigned int netcard_portlist[] __used __initdata = {CIRRUS_DEFAULT_BASE, 0};
 static unsigned int cs8900_irq_map[] = {CIRRUS_DEFAULT_IRQ, 0, 0, 0};
+#elif defined(CONFIG_MACH_MX31ADS)
+#include <mach/board-mx31ads.h>
+static unsigned int netcard_portlist[] __used __initdata = {
+       PBC_BASE_ADDRESS + PBC_CS8900A_IOBASE + 0x300, 0
+};
+static unsigned cs8900_irq_map[] = {EXPIO_INT_ENET_INT, 0, 0, 0};
 #else
 static unsigned int netcard_portlist[] __used __initdata =
    { 0x300, 0x320, 0x340, 0x360, 0x200, 0x220, 0x240, 0x260, 0x280, 0x2a0, 0x2c0, 0x2e0, 0};
@@ -802,7 +808,7 @@ cs89x0_probe1(struct net_device *dev, int ioaddr, int modular)
        } else {
                i = lp->isa_config & INT_NO_MASK;
                if (lp->chip_type == CS8900) {
-#if defined(CONFIG_MACH_IXDP2351) || defined(CONFIG_ARCH_IXDP2X01) || defined(CONFIG_ARCH_PNX010X)
+#ifdef CONFIG_CS89x0_NONISA_IRQ
                        i = cs8900_irq_map[0];
 #else
                        /* Translate the IRQ using the IRQ mapping table. */
@@ -1029,6 +1035,7 @@ skip_this_frame:
 
 void  __init reset_chip(struct net_device *dev)
 {
+#if !defined(CONFIG_MACH_MX31ADS)
 #if !defined(CONFIG_MACH_IXDP2351) && !defined(CONFIG_ARCH_IXDP2X01)
        struct net_local *lp = netdev_priv(dev);
        int ioaddr = dev->base_addr;
@@ -1057,6 +1064,7 @@ void  __init reset_chip(struct net_device *dev)
        reset_start_time = jiffies;
        while( (readreg(dev, PP_SelfST) & INIT_DONE) == 0 && jiffies - reset_start_time < 2)
                ;
+#endif /* !CONFIG_MACH_MX31ADS */
 }
 
 
@@ -1304,7 +1312,7 @@ net_open(struct net_device *dev)
        else
 #endif
        {
-#if !defined(CONFIG_MACH_IXDP2351) && !defined(CONFIG_ARCH_IXDP2X01) && !defined(CONFIG_ARCH_PNX010X)
+#ifndef CONFIG_CS89x0_NONISA_IRQ
                if (((1 << dev->irq) & lp->irq_map) == 0) {
                        printk(KERN_ERR "%s: IRQ %d is not in our map of allowable IRQs, which is %x\n",
                                dev->name, dev->irq, lp->irq_map);
index 4aa61a1a3d55f7cccc10003bc3a1bbc2f463a790..c5b02b66f7560a570210f075e6d72eda219e97df 100644 (file)
@@ -572,8 +572,8 @@ static void pxa_irda_startup(struct pxa_irda *si)
        ICCR2 = ICCR2_TXP | ICCR2_TRIG_32;
 
        /* configure DMAC */
-       DRCMR17 = si->rxdma | DRCMR_MAPVLD;
-       DRCMR18 = si->txdma | DRCMR_MAPVLD;
+       DRCMR(17) = si->rxdma | DRCMR_MAPVLD;
+       DRCMR(18) = si->txdma | DRCMR_MAPVLD;
 
        /* force SIR reinitialization */
        si->speed = 4000000;
@@ -602,8 +602,8 @@ static void pxa_irda_shutdown(struct pxa_irda *si)
        /* disable the STUART or FICP clocks */
        pxa_irda_disable_clk(si);
 
-       DRCMR17 = 0;
-       DRCMR18 = 0;
+       DRCMR(17) = 0;
+       DRCMR(18) = 0;
 
        local_irq_restore(flags);
 
index 24768c10cadb7d1e326b3651ce6819ec08021699..e332a518efe84de5a9b96c419546331c9b301b2c 100644 (file)
@@ -1520,7 +1520,9 @@ smc_open(struct net_device *dev)
        /* Setup the default Register Modes */
        lp->tcr_cur_mode = TCR_DEFAULT;
        lp->rcr_cur_mode = RCR_DEFAULT;
-       lp->rpc_cur_mode = RPC_DEFAULT;
+       lp->rpc_cur_mode = RPC_DEFAULT |
+                               lp->cfg.leda << RPC_LSXA_SHFT |
+                               lp->cfg.ledb << RPC_LSXB_SHFT;
 
        /*
         * If we are not using a MII interface, we need to
@@ -2157,6 +2159,11 @@ static int smc_drv_probe(struct platform_device *pdev)
                lp->cfg.flags |= (nowait) ? SMC91X_NOWAIT : 0;
        }
 
+       if (!lp->cfg.leda && !lp->cfg.ledb) {
+               lp->cfg.leda = RPC_LSA_DEFAULT;
+               lp->cfg.ledb = RPC_LSB_DEFAULT;
+       }
+
        ndev->dma = (unsigned char)-1;
 
        res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "smc91x-regs");
index 997e7f1d5c6e496b42bd602baf473f16acfd45e2..160873f0a817e9f81e0dce331c2c29a556a10daa 100644 (file)
@@ -43,7 +43,8 @@
 #if defined(CONFIG_ARCH_LUBBOCK) ||\
     defined(CONFIG_MACH_MAINSTONE) ||\
     defined(CONFIG_MACH_ZYLONITE) ||\
-    defined(CONFIG_MACH_LITTLETON)
+    defined(CONFIG_MACH_LITTLETON) ||\
+    defined(CONFIG_ARCH_VIPER)
 
 #include <asm/mach-types.h>
 
@@ -778,14 +779,6 @@ smc_pxa_dma_irq(int dma, void *dummy)
 #define RPC_ANEG       0x0800  // When 1 PHY is in Auto-Negotiate Mode
 #define RPC_LSXA_SHFT  5       // Bits to shift LS2A,LS1A,LS0A to lsb
 #define RPC_LSXB_SHFT  2       // Bits to get LS2B,LS1B,LS0B to lsb
-#define RPC_LED_100_10 (0x00)  // LED = 100Mbps OR's with 10Mbps link detect
-#define RPC_LED_RES    (0x01)  // LED = Reserved
-#define RPC_LED_10     (0x02)  // LED = 10Mbps link detect
-#define RPC_LED_FD     (0x03)  // LED = Full Duplex Mode
-#define RPC_LED_TX_RX  (0x04)  // LED = TX or RX packet occurred
-#define RPC_LED_100    (0x05)  // LED = 100Mbps link dectect
-#define RPC_LED_TX     (0x06)  // LED = TX packet occurred
-#define RPC_LED_RX     (0x07)  // LED = RX packet occurred
 
 #ifndef RPC_LSA_DEFAULT
 #define RPC_LSA_DEFAULT        RPC_LED_100
@@ -794,7 +787,7 @@ smc_pxa_dma_irq(int dma, void *dummy)
 #define RPC_LSB_DEFAULT RPC_LED_FD
 #endif
 
-#define RPC_DEFAULT (RPC_ANEG | (RPC_LSA_DEFAULT << RPC_LSXA_SHFT) | (RPC_LSB_DEFAULT << RPC_LSXB_SHFT) | RPC_SPEED | RPC_DPLX)
+#define RPC_DEFAULT (RPC_ANEG | RPC_SPEED | RPC_DPLX)
 
 
 /* Bank 0 0x0C is reserved */
index e0f884034c9f0c3fdfc3f1040506bbe2aac378fd..f57eeae3830aa13ed0eb19baefb1db729a10c142 100644 (file)
@@ -220,7 +220,8 @@ config PCMCIA_PXA2XX
        tristate "PXA2xx support"
        depends on ARM && ARCH_PXA && PCMCIA
        depends on (ARCH_LUBBOCK || MACH_MAINSTONE || PXA_SHARPSL \
-                   || MACH_ARMCORE || ARCH_PXA_PALM)
+                   || MACH_ARMCORE || ARCH_PXA_PALM || TRIZEPS_PCMCIA \
+                   || ARCH_VIPER)
        help
          Say Y here to include support for the PXA2xx PCMCIA controller
 
index 269a9e913ba2e9464e69494f618525de8b766b44..a87902de8d3b9ec187b66a69c9ea97931577c504 100644 (file)
@@ -29,7 +29,6 @@ obj-$(CONFIG_PCMCIA_M8XX)                     += m8xx_pcmcia.o
 obj-$(CONFIG_HD64465_PCMCIA)                   += hd64465_ss.o
 obj-$(CONFIG_PCMCIA_SA1100)                    += sa11xx_core.o sa1100_cs.o
 obj-$(CONFIG_PCMCIA_SA1111)                    += sa11xx_core.o sa1111_cs.o
-obj-$(CONFIG_PCMCIA_PXA2XX)                     += pxa2xx_core.o pxa2xx_cs.o
 obj-$(CONFIG_M32R_PCC)                         += m32r_pcc.o
 obj-$(CONFIG_M32R_CFC)                         += m32r_cfc.o
 obj-$(CONFIG_PCMCIA_AU1X00)                    += au1x00_ss.o
@@ -68,9 +67,14 @@ sa1100_cs-$(CONFIG_SA1100_H3600)             += sa1100_h3600.o
 sa1100_cs-$(CONFIG_SA1100_SHANNON)             += sa1100_shannon.o
 sa1100_cs-$(CONFIG_SA1100_SIMPAD)              += sa1100_simpad.o
 
-pxa2xx_cs-$(CONFIG_ARCH_LUBBOCK)               += pxa2xx_lubbock.o sa1111_generic.o
-pxa2xx_cs-$(CONFIG_MACH_MAINSTONE)             += pxa2xx_mainstone.o
-pxa2xx_cs-$(CONFIG_PXA_SHARPSL)                        += pxa2xx_sharpsl.o
-pxa2xx_cs-$(CONFIG_MACH_ARMCORE)               += pxa2xx_cm_x270.o
-pxa2xx_cs-$(CONFIG_MACH_PALMTX)                += pxa2xx_palmtx.o
+pxa2xx_lubbock_cs-y                            += pxa2xx_lubbock.o sa1111_generic.o
+pxa2xx-obj-$(CONFIG_ARCH_LUBBOCK)              += pxa2xx_lubbock_cs.o
+pxa2xx-obj-$(CONFIG_MACH_MAINSTONE)            += pxa2xx_mainstone.o
+pxa2xx-obj-$(CONFIG_PXA_SHARPSL)               += pxa2xx_sharpsl.o
+pxa2xx-obj-$(CONFIG_MACH_ARMCORE)              += pxa2xx_cm_x2xx.o pxa2xx_cm_x255.o pxa2xx_cm_x270.o
+pxa2xx-obj-$(CONFIG_ARCH_VIPER)                        += pxa2xx_viper.o
+pxa2xx-obj-$(CONFIG_TRIZEPS_PCMCIA)            += pxa2xx_trizeps.o
+pxa2xx-obj-$(CONFIG_MACH_PALMTX)               += pxa2xx_palmtx.o
+pxa2xx-obj-$(CONFIG_MACH_PALMLD)               += pxa2xx_palmld.o
 
+obj-$(CONFIG_PCMCIA_PXA2XX)                    += pxa2xx_core.o $(pxa2xx-obj-y)
index 1b07af5a2ed3c06924fab1652cb997cb873b52d5..13f1e0fd3f31cf096b5c07cf10392278e0308bdc 100644 (file)
@@ -30,6 +30,7 @@
 #include <asm/system.h>
 #include <mach/pxa-regs.h>
 #include <mach/pxa2xx-regs.h>
+#include <asm/mach-types.h>
 
 #include <pcmcia/cs_types.h>
 #include <pcmcia/ss.h>
@@ -166,18 +167,32 @@ pxa2xx_pcmcia_frequency_change(struct soc_pcmcia_socket *skt,
 }
 #endif
 
+static void pxa2xx_configure_sockets(struct device *dev)
+{
+       struct pcmcia_low_level *ops = dev->platform_data;
+
+       /*
+        * We have at least one socket, so set MECR:CIT
+        * (Card Is There)
+        */
+       MECR |= MECR_CIT;
+
+       /* Set MECR:NOS (Number Of Sockets) */
+       if (ops->nr > 1 || machine_is_viper())
+               MECR |= MECR_NOS;
+       else
+               MECR &= ~MECR_NOS;
+}
+
 int __pxa2xx_drv_pcmcia_probe(struct device *dev)
 {
        int ret;
        struct pcmcia_low_level *ops;
-       int first, nr;
 
        if (!dev || !dev->platform_data)
                return -ENODEV;
 
        ops = (struct pcmcia_low_level *)dev->platform_data;
-       first = ops->first;
-       nr = ops->nr;
 
        /* Provide our PXA2xx specific timing routines. */
        ops->set_timing  = pxa2xx_pcmcia_set_timing;
@@ -185,21 +200,10 @@ int __pxa2xx_drv_pcmcia_probe(struct device *dev)
        ops->frequency_change = pxa2xx_pcmcia_frequency_change;
 #endif
 
-       ret = soc_common_drv_pcmcia_probe(dev, ops, first, nr);
+       ret = soc_common_drv_pcmcia_probe(dev, ops, ops->first, ops->nr);
 
-       if (ret == 0) {
-               /*
-                * We have at least one socket, so set MECR:CIT
-                * (Card Is There)
-                */
-               MECR |= MECR_CIT;
-
-               /* Set MECR:NOS (Number Of Sockets) */
-               if (nr > 1)
-                       MECR |= MECR_NOS;
-               else
-                       MECR &= ~MECR_NOS;
-       }
+       if (!ret)
+               pxa2xx_configure_sockets(dev);
 
        return ret;
 }
@@ -223,11 +227,7 @@ static int pxa2xx_drv_pcmcia_suspend(struct platform_device *dev, pm_message_t s
 
 static int pxa2xx_drv_pcmcia_resume(struct platform_device *dev)
 {
-       struct pcmcia_low_level *ops = dev->dev.platform_data;
-       int nr = ops ? ops->nr : 0;
-
-       MECR = nr > 1 ? MECR_CIT | MECR_NOS : (nr > 0 ? MECR_CIT : 0);
-
+       pxa2xx_configure_sockets(&dev->dev);
        return pcmcia_socket_dev_resume(&dev->dev);
 }
 
diff --git a/drivers/pcmcia/pxa2xx_cm_x255.c b/drivers/pcmcia/pxa2xx_cm_x255.c
new file mode 100644 (file)
index 0000000..7c8bcb4
--- /dev/null
@@ -0,0 +1,154 @@
+/*
+ * linux/drivers/pcmcia/pxa/pxa_cm_x255.c
+ *
+ * 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.
+ *
+ * Compulab Ltd., 2003, 2007, 2008
+ * Mike Rapoport <mike@compulab.co.il>
+ *
+ */
+
+#include <linux/platform_device.h>
+#include <linux/irq.h>
+#include <linux/delay.h>
+#include <linux/gpio.h>
+
+#include <asm/mach-types.h>
+#include <mach/pxa-regs.h>
+
+#include "soc_common.h"
+
+#define GPIO_PCMCIA_SKTSEL     (54)
+#define GPIO_PCMCIA_S0_CD_VALID        (16)
+#define GPIO_PCMCIA_S1_CD_VALID        (17)
+#define GPIO_PCMCIA_S0_RDYINT  (6)
+#define GPIO_PCMCIA_S1_RDYINT  (8)
+#define GPIO_PCMCIA_RESET      (9)
+
+#define PCMCIA_S0_CD_VALID     IRQ_GPIO(GPIO_PCMCIA_S0_CD_VALID)
+#define PCMCIA_S1_CD_VALID     IRQ_GPIO(GPIO_PCMCIA_S1_CD_VALID)
+#define PCMCIA_S0_RDYINT       IRQ_GPIO(GPIO_PCMCIA_S0_RDYINT)
+#define PCMCIA_S1_RDYINT       IRQ_GPIO(GPIO_PCMCIA_S1_RDYINT)
+
+
+static struct pcmcia_irqs irqs[] = {
+       { 0, PCMCIA_S0_CD_VALID, "PCMCIA0 CD" },
+       { 1, PCMCIA_S1_CD_VALID, "PCMCIA1 CD" },
+};
+
+static int cmx255_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
+{
+       int ret = gpio_request(GPIO_PCMCIA_RESET, "PCCard reset");
+       if (ret)
+               return ret;
+       gpio_direction_output(GPIO_PCMCIA_RESET, 0);
+
+       skt->irq = skt->nr == 0 ? PCMCIA_S0_RDYINT : PCMCIA_S1_RDYINT;
+       ret = soc_pcmcia_request_irqs(skt, irqs, ARRAY_SIZE(irqs));
+       if (!ret)
+               gpio_free(GPIO_PCMCIA_RESET);
+
+       return ret;
+}
+
+static void cmx255_pcmcia_shutdown(struct soc_pcmcia_socket *skt)
+{
+       soc_pcmcia_free_irqs(skt, irqs, ARRAY_SIZE(irqs));
+       gpio_free(GPIO_PCMCIA_RESET);
+}
+
+
+static void cmx255_pcmcia_socket_state(struct soc_pcmcia_socket *skt,
+                                      struct pcmcia_state *state)
+{
+       int cd = skt->nr ? GPIO_PCMCIA_S1_CD_VALID : GPIO_PCMCIA_S0_CD_VALID;
+       int rdy = skt->nr ? GPIO_PCMCIA_S0_RDYINT : GPIO_PCMCIA_S1_RDYINT;
+
+       state->detect = !gpio_get_value(cd);
+       state->ready  = !!gpio_get_value(rdy);
+       state->bvd1   = 1;
+       state->bvd2   = 1;
+       state->vs_3v  = 0;
+       state->vs_Xv  = 0;
+       state->wrprot = 0;  /* not available */
+}
+
+
+static int cmx255_pcmcia_configure_socket(struct soc_pcmcia_socket *skt,
+                                         const socket_state_t *state)
+{
+       switch (skt->nr) {
+       case 0:
+               if (state->flags & SS_RESET) {
+                       gpio_set_value(GPIO_PCMCIA_SKTSEL, 0);
+                       udelay(1);
+                       gpio_set_value(GPIO_PCMCIA_RESET, 1);
+                       udelay(10);
+                       gpio_set_value(GPIO_PCMCIA_RESET, 0);
+               }
+               break;
+       case 1:
+               if (state->flags & SS_RESET) {
+                       gpio_set_value(GPIO_PCMCIA_SKTSEL, 1);
+                       udelay(1);
+                       gpio_set_value(GPIO_PCMCIA_RESET, 1);
+                       udelay(10);
+                       gpio_set_value(GPIO_PCMCIA_RESET, 0);
+               }
+               break;
+       }
+
+       return 0;
+}
+
+static void cmx255_pcmcia_socket_init(struct soc_pcmcia_socket *skt)
+{
+}
+
+static void cmx255_pcmcia_socket_suspend(struct soc_pcmcia_socket *skt)
+{
+}
+
+
+static struct pcmcia_low_level cmx255_pcmcia_ops __initdata = {
+       .owner                  = THIS_MODULE,
+       .hw_init                = cmx255_pcmcia_hw_init,
+       .hw_shutdown            = cmx255_pcmcia_shutdown,
+       .socket_state           = cmx255_pcmcia_socket_state,
+       .configure_socket       = cmx255_pcmcia_configure_socket,
+       .socket_init            = cmx255_pcmcia_socket_init,
+       .socket_suspend         = cmx255_pcmcia_socket_suspend,
+       .nr                     = 1,
+};
+
+static struct platform_device *cmx255_pcmcia_device;
+
+int __init cmx255_pcmcia_init(void)
+{
+       int ret;
+
+       cmx255_pcmcia_device = platform_device_alloc("pxa2xx-pcmcia", -1);
+
+       if (!cmx255_pcmcia_device)
+               return -ENOMEM;
+
+       ret = platform_device_add_data(cmx255_pcmcia_device, &cmx255_pcmcia_ops,
+                                      sizeof(cmx255_pcmcia_ops));
+
+       if (ret == 0) {
+               printk(KERN_INFO "Registering cm-x255 PCMCIA interface.\n");
+               ret = platform_device_add(cmx255_pcmcia_device);
+       }
+
+       if (ret)
+               platform_device_put(cmx255_pcmcia_device);
+
+       return ret;
+}
+
+void __exit cmx255_pcmcia_exit(void)
+{
+       platform_device_unregister(cmx255_pcmcia_device);
+}
index bcff5cfed051b19a8db8dc21669e31c31153a6fe..6c3aac3771260202e6c05325bc180ac9c64f32e4 100644 (file)
@@ -105,13 +105,10 @@ static struct pcmcia_low_level cmx270_pcmcia_ops __initdata = {
 
 static struct platform_device *cmx270_pcmcia_device;
 
-static int __init cmx270_pcmcia_init(void)
+int __init cmx270_pcmcia_init(void)
 {
        int ret;
 
-       if (!machine_is_armcore())
-               return -ENODEV;
-
        cmx270_pcmcia_device = platform_device_alloc("pxa2xx-pcmcia", -1);
 
        if (!cmx270_pcmcia_device)
@@ -131,14 +128,7 @@ static int __init cmx270_pcmcia_init(void)
        return ret;
 }
 
-static void __exit cmx270_pcmcia_exit(void)
+void __exit cmx270_pcmcia_exit(void)
 {
        platform_device_unregister(cmx270_pcmcia_device);
 }
-
-module_init(cmx270_pcmcia_init);
-module_exit(cmx270_pcmcia_exit);
-
-MODULE_LICENSE("GPL");
-MODULE_AUTHOR("Mike Rapoport <mike@compulab.co.il>");
-MODULE_DESCRIPTION("CM-x270 PCMCIA driver");
diff --git a/drivers/pcmcia/pxa2xx_cm_x2xx.c b/drivers/pcmcia/pxa2xx_cm_x2xx.c
new file mode 100644 (file)
index 0000000..4f09506
--- /dev/null
@@ -0,0 +1,49 @@
+/*
+ * linux/drivers/pcmcia/pxa/pxa_cm_x2xx.c
+ *
+ * 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.
+ *
+ * Compulab Ltd., 2003, 2007, 2008
+ * Mike Rapoport <mike@compulab.co.il>
+ *
+ */
+
+#include <linux/module.h>
+
+#include <asm/system.h>
+#include <asm/mach-types.h>
+#include <mach/system.h>
+
+int cmx255_pcmcia_init(void);
+int cmx270_pcmcia_init(void);
+void cmx255_pcmcia_exit(void);
+void cmx270_pcmcia_exit(void);
+
+static int __init cmx2xx_pcmcia_init(void)
+{
+       int ret = -ENODEV;
+
+       if (machine_is_armcore() && cpu_is_pxa25x())
+               ret = cmx255_pcmcia_init();
+       else if (machine_is_armcore() && cpu_is_pxa27x())
+               ret = cmx270_pcmcia_init();
+
+       return ret;
+}
+
+static void __exit cmx2xx_pcmcia_exit(void)
+{
+       if (machine_is_armcore() && cpu_is_pxa25x())
+               cmx255_pcmcia_exit();
+       else if (machine_is_armcore() && cpu_is_pxa27x())
+               cmx270_pcmcia_exit();
+}
+
+module_init(cmx2xx_pcmcia_init);
+module_exit(cmx2xx_pcmcia_exit);
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Mike Rapoport <mike@compulab.co.il>");
+MODULE_DESCRIPTION("CM-x2xx PCMCIA driver");
diff --git a/drivers/pcmcia/pxa2xx_palmld.c b/drivers/pcmcia/pxa2xx_palmld.c
new file mode 100644 (file)
index 0000000..1736c67
--- /dev/null
@@ -0,0 +1,151 @@
+/*
+ * linux/drivers/pcmcia/pxa2xx_palmld.c
+ *
+ * Driver for Palm LifeDrive PCMCIA
+ *
+ * Copyright (C) 2006 Alex Osborne <ato@meshy.org>
+ * Copyright (C) 2007-2008 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.
+ *
+ */
+
+#include <linux/module.h>
+#include <linux/platform_device.h>
+#include <linux/gpio.h>
+
+#include <asm/mach-types.h>
+#include <mach/palmld.h>
+#include "soc_common.h"
+
+static int palmld_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
+{
+       int ret;
+
+       ret = gpio_request(GPIO_NR_PALMLD_PCMCIA_POWER, "PCMCIA PWR");
+       if (ret)
+               goto err1;
+       ret = gpio_direction_output(GPIO_NR_PALMLD_PCMCIA_POWER, 0);
+       if (ret)
+               goto err2;
+
+       ret = gpio_request(GPIO_NR_PALMLD_PCMCIA_RESET, "PCMCIA RST");
+       if (ret)
+               goto err2;
+       ret = gpio_direction_output(GPIO_NR_PALMLD_PCMCIA_RESET, 1);
+       if (ret)
+               goto err3;
+
+       ret = gpio_request(GPIO_NR_PALMLD_PCMCIA_READY, "PCMCIA RDY");
+       if (ret)
+               goto err3;
+       ret = gpio_direction_input(GPIO_NR_PALMLD_PCMCIA_READY);
+       if (ret)
+               goto err4;
+
+       skt->irq = IRQ_GPIO(GPIO_NR_PALMLD_PCMCIA_READY);
+       return 0;
+
+err4:
+       gpio_free(GPIO_NR_PALMLD_PCMCIA_READY);
+err3:
+       gpio_free(GPIO_NR_PALMLD_PCMCIA_RESET);
+err2:
+       gpio_free(GPIO_NR_PALMLD_PCMCIA_POWER);
+err1:
+       return ret;
+}
+
+static void palmld_pcmcia_hw_shutdown(struct soc_pcmcia_socket *skt)
+{
+       gpio_free(GPIO_NR_PALMLD_PCMCIA_READY);
+       gpio_free(GPIO_NR_PALMLD_PCMCIA_RESET);
+       gpio_free(GPIO_NR_PALMLD_PCMCIA_POWER);
+}
+
+static void palmld_pcmcia_socket_state(struct soc_pcmcia_socket *skt,
+                                       struct pcmcia_state *state)
+{
+       state->detect = 1; /* always inserted */
+       state->ready  = !!gpio_get_value(GPIO_NR_PALMLD_PCMCIA_READY);
+       state->bvd1   = 1;
+       state->bvd2   = 1;
+       state->wrprot = 0;
+       state->vs_3v  = 1;
+       state->vs_Xv  = 0;
+}
+
+static int palmld_pcmcia_configure_socket(struct soc_pcmcia_socket *skt,
+                                       const socket_state_t *state)
+{
+       gpio_set_value(GPIO_NR_PALMLD_PCMCIA_POWER, 1);
+       gpio_set_value(GPIO_NR_PALMLD_PCMCIA_RESET,
+                       !!(state->flags & SS_RESET));
+
+       return 0;
+}
+
+static void palmld_pcmcia_socket_init(struct soc_pcmcia_socket *skt)
+{
+}
+
+static void palmld_pcmcia_socket_suspend(struct soc_pcmcia_socket *skt)
+{
+}
+
+static struct pcmcia_low_level palmld_pcmcia_ops = {
+       .owner                  = THIS_MODULE,
+
+       .first                  = 0,
+       .nr                     = 2,
+
+       .hw_init                = palmld_pcmcia_hw_init,
+       .hw_shutdown            = palmld_pcmcia_hw_shutdown,
+
+       .socket_state           = palmld_pcmcia_socket_state,
+       .configure_socket       = palmld_pcmcia_configure_socket,
+
+       .socket_init            = palmld_pcmcia_socket_init,
+       .socket_suspend         = palmld_pcmcia_socket_suspend,
+};
+
+static struct platform_device *palmld_pcmcia_device;
+
+static int __init palmld_pcmcia_init(void)
+{
+       int ret;
+
+       if (!machine_is_palmld())
+               return -ENODEV;
+
+       palmld_pcmcia_device = platform_device_alloc("pxa2xx-pcmcia", -1);
+       if (!palmld_pcmcia_device)
+               return -ENOMEM;
+
+       ret = platform_device_add_data(palmld_pcmcia_device, &palmld_pcmcia_ops,
+                                       sizeof(palmld_pcmcia_ops));
+
+       if (!ret)
+               ret = platform_device_add(palmld_pcmcia_device);
+
+       if (ret)
+               platform_device_put(palmld_pcmcia_device);
+
+       return ret;
+}
+
+static void __exit palmld_pcmcia_exit(void)
+{
+       platform_device_unregister(palmld_pcmcia_device);
+}
+
+module_init(palmld_pcmcia_init);
+module_exit(palmld_pcmcia_exit);
+
+MODULE_AUTHOR("Alex Osborne <ato@meshy.org>,"
+           " Marek Vasut <marek.vasut@gmail.com>");
+MODULE_DESCRIPTION("PCMCIA support for Palm LifeDrive");
+MODULE_ALIAS("platform:pxa2xx-pcmcia");
+MODULE_LICENSE("GPL");
diff --git a/drivers/pcmcia/pxa2xx_trizeps4.c b/drivers/pcmcia/pxa2xx_trizeps4.c
new file mode 100644 (file)
index 0000000..36c7a0b
--- /dev/null
@@ -0,0 +1,256 @@
+/*
+ * linux/drivers/pcmcia/pxa2xx_trizeps4.c
+ *
+ * TRIZEPS PCMCIA specific routines.
+ *
+ * Author:     Jürgen Schindele
+ * Created:    20 02, 2006
+ * Copyright:  Jürgen Schindele
+ *
+ * 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/module.h>
+#include <linux/init.h>
+#include <linux/kernel.h>
+#include <linux/gpio.h>
+#include <linux/interrupt.h>
+#include <linux/platform_device.h>
+
+#include <asm/mach-types.h>
+#include <asm/irq.h>
+
+#include <mach/hardware.h>
+#include <mach/pxa-regs.h>
+#include <mach/trizeps4.h>
+
+#include "soc_common.h"
+
+extern void board_pcmcia_power(int power);
+
+static struct pcmcia_irqs irqs[] = {
+       { 0, IRQ_GPIO(GPIO_PCD), "cs0_cd" }
+       /* on other baseboards we can have more inputs */
+};
+
+static int trizeps_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
+{
+       int ret, i;
+       /* we dont have voltage/card/ready detection
+        * so we dont need interrupts for it
+        */
+       switch (skt->nr) {
+       case 0:
+               if (gpio_request(GPIO_PRDY, "cf_irq") < 0) {
+                       pr_err("%s: sock %d unable to request gpio %d\n", __func__,
+                               skt->nr, GPIO_PRDY);
+                       return -EBUSY;
+               }
+               if (gpio_direction_input(GPIO_PRDY) < 0) {
+                       pr_err("%s: sock %d unable to set input gpio %d\n", __func__,
+                               skt->nr, GPIO_PRDY);
+                       gpio_free(GPIO_PRDY);
+                       return -EINVAL;
+               }
+               skt->irq = IRQ_GPIO(GPIO_PRDY);
+               break;
+
+#ifndef CONFIG_MACH_TRIZEPS_CONXS
+       case 1:
+#endif
+       default:
+               break;
+       }
+       /* release the reset of this card */
+       pr_debug("%s: sock %d irq %d\n", __func__, skt->nr, skt->irq);
+
+       /* supplementory irqs for the socket */
+       for (i = 0; i < ARRAY_SIZE(irqs); i++) {
+               if (irqs[i].sock != skt->nr)
+                       continue;
+               if (gpio_request(IRQ_TO_GPIO(irqs[i].irq), irqs[i].str) < 0) {
+                       pr_err("%s: sock %d unable to request gpio %d\n",
+                               __func__, skt->nr, IRQ_TO_GPIO(irqs[i].irq));
+                       ret = -EBUSY;
+                       goto error;
+               }
+               if (gpio_direction_input(IRQ_TO_GPIO(irqs[i].irq)) < 0) {
+                       pr_err("%s: sock %d unable to set input gpio %d\n",
+                               __func__, skt->nr, IRQ_TO_GPIO(irqs[i].irq));
+                       ret = -EINVAL;
+                       goto error;
+               }
+       }
+       return soc_pcmcia_request_irqs(skt, irqs, ARRAY_SIZE(irqs));
+
+error:
+       for (; i >= 0; i--) {
+               gpio_free(IRQ_TO_GPIO(irqs[i].irq));
+       }
+       return (ret);
+}
+
+static void trizeps_pcmcia_hw_shutdown(struct soc_pcmcia_socket *skt)
+{
+       int i;
+       /* free allocated gpio's */
+       gpio_free(GPIO_PRDY);
+       for (i = 0; i < ARRAY_SIZE(irqs); i++)
+               gpio_free(IRQ_TO_GPIO(irqs[i].irq));
+}
+
+static unsigned long trizeps_pcmcia_status[2];
+
+static void trizeps_pcmcia_socket_state(struct soc_pcmcia_socket *skt,
+                               struct pcmcia_state *state)
+{
+       unsigned short status = 0, change;
+       status = CFSR_readw();
+       change = (status ^ trizeps_pcmcia_status[skt->nr]) &
+                               ConXS_CFSR_BVD_MASK;
+       if (change) {
+               trizeps_pcmcia_status[skt->nr] = status;
+               if (status & ConXS_CFSR_BVD1) {
+                       /* enable_irq empty */
+               } else {
+                       /* disable_irq empty */
+               }
+       }
+
+       switch (skt->nr) {
+       case 0:
+               /* just fill in fix states */
+               state->detect = gpio_get_value(GPIO_PCD) ? 0 : 1;
+               state->ready  = gpio_get_value(GPIO_PRDY) ? 1 : 0;
+               state->bvd1   = (status & ConXS_CFSR_BVD1) ? 1 : 0;
+               state->bvd2   = (status & ConXS_CFSR_BVD2) ? 1 : 0;
+               state->vs_3v  = (status & ConXS_CFSR_VS1) ? 0 : 1;
+               state->vs_Xv  = (status & ConXS_CFSR_VS2) ? 0 : 1;
+               state->wrprot = 0;      /* not available */
+               break;
+
+#ifndef CONFIG_MACH_TRIZEPS_CONXS
+       /* on ConXS we only have one slot. Second is inactive */
+       case 1:
+               state->detect = 0;
+               state->ready  = 0;
+               state->bvd1   = 0;
+               state->bvd2   = 0;
+               state->vs_3v  = 0;
+               state->vs_Xv  = 0;
+               state->wrprot = 0;
+               break;
+
+#endif
+       }
+}
+
+static int trizeps_pcmcia_configure_socket(struct soc_pcmcia_socket *skt,
+                               const socket_state_t *state)
+{
+       int ret = 0;
+       unsigned short power = 0;
+
+       /* we do nothing here just check a bit */
+       switch (state->Vcc) {
+       case 0:  power &= 0xfc; break;
+       case 33: power |= ConXS_BCR_S0_VCC_3V3; break;
+       case 50:
+               pr_err("%s(): Vcc 5V not supported in socket\n", __func__);
+               break;
+       default:
+               pr_err("%s(): bad Vcc %u\n", __func__, state->Vcc);
+               ret = -1;
+       }
+
+       switch (state->Vpp) {
+       case 0:  power &= 0xf3; break;
+       case 33: power |= ConXS_BCR_S0_VPP_3V3; break;
+       case 120:
+               pr_err("%s(): Vpp 12V not supported in socket\n", __func__);
+               break;
+       default:
+               if (state->Vpp != state->Vcc) {
+                       pr_err("%s(): bad Vpp %u\n", __func__, state->Vpp);
+                       ret = -1;
+               }
+       }
+
+       switch (skt->nr) {
+       case 0:                  /* we only have 3.3V */
+               board_pcmcia_power(power);
+               break;
+
+#ifndef CONFIG_MACH_TRIZEPS_CONXS
+       /* on ConXS we only have one slot. Second is inactive */
+       case 1:
+#endif
+       default:
+               break;
+       }
+
+       return ret;
+}
+
+static void trizeps_pcmcia_socket_init(struct soc_pcmcia_socket *skt)
+{
+       /* default is on */
+       board_pcmcia_power(0x9);
+}
+
+static void trizeps_pcmcia_socket_suspend(struct soc_pcmcia_socket *skt)
+{
+       board_pcmcia_power(0x0);
+}
+
+static struct pcmcia_low_level trizeps_pcmcia_ops = {
+       .owner                  = THIS_MODULE,
+       .hw_init                = trizeps_pcmcia_hw_init,
+       .hw_shutdown            = trizeps_pcmcia_hw_shutdown,
+       .socket_state           = trizeps_pcmcia_socket_state,
+       .configure_socket       = trizeps_pcmcia_configure_socket,
+       .socket_init            = trizeps_pcmcia_socket_init,
+       .socket_suspend         = trizeps_pcmcia_socket_suspend,
+#ifdef CONFIG_MACH_TRIZEPS_CONXS
+       .nr                     = 1,
+#else
+       .nr                     = 2,
+#endif
+       .first                  = 0,
+};
+
+static struct platform_device *trizeps_pcmcia_device;
+
+static int __init trizeps_pcmcia_init(void)
+{
+       int ret;
+
+       trizeps_pcmcia_device = platform_device_alloc("pxa2xx-pcmcia", -1);
+       if (!trizeps_pcmcia_device)
+               return -ENOMEM;
+
+       ret = platform_device_add_data(trizeps_pcmcia_device,
+                       &trizeps_pcmcia_ops, sizeof(trizeps_pcmcia_ops));
+
+       if (ret == 0)
+               ret = platform_device_add(trizeps_pcmcia_device);
+
+       if (ret)
+               platform_device_put(trizeps_pcmcia_device);
+
+       return ret;
+}
+
+static void __exit trizeps_pcmcia_exit(void)
+{
+       platform_device_unregister(trizeps_pcmcia_device);
+}
+
+fs_initcall(trizeps_pcmcia_init);
+module_exit(trizeps_pcmcia_exit);
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Juergen Schindele");
+MODULE_ALIAS("platform:pxa2xx-pcmcia");
diff --git a/drivers/pcmcia/pxa2xx_viper.c b/drivers/pcmcia/pxa2xx_viper.c
new file mode 100644 (file)
index 0000000..dd10481
--- /dev/null
@@ -0,0 +1,179 @@
+/*
+ * VIPER PCMCIA support
+ *   Copyright 2004 Arcom Control Systems
+ *
+ * Maintained by Marc Zyngier <maz@misterjones.org>
+ *                           <marc.zyngier@altran.com>
+ *
+ * Based on:
+ *   iPAQ h2200 PCMCIA support
+ *   Copyright 2004 Koen Kooi <koen@vestingbar.nl>
+ *
+ * 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.
+ */
+
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/kernel.h>
+#include <linux/errno.h>
+#include <linux/interrupt.h>
+#include <linux/platform_device.h>
+#include <linux/gpio.h>
+
+#include <pcmcia/ss.h>
+
+#include <asm/irq.h>
+
+#include <mach/pxa-regs.h>
+#include <mach/viper.h>
+#include <asm/mach-types.h>
+
+#include "soc_common.h"
+#include "pxa2xx_base.h"
+
+static struct pcmcia_irqs irqs[] = {
+       { 0, gpio_to_irq(VIPER_CF_CD_GPIO),  "PCMCIA_CD" }
+};
+
+static int viper_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
+{
+       unsigned long flags;
+
+       skt->irq = gpio_to_irq(VIPER_CF_RDY_GPIO);
+
+       if (gpio_request(VIPER_CF_CD_GPIO, "CF detect"))
+               goto err_request_cd;
+
+       if (gpio_request(VIPER_CF_RDY_GPIO, "CF ready"))
+               goto err_request_rdy;
+
+       if (gpio_request(VIPER_CF_POWER_GPIO, "CF power"))
+               goto err_request_pwr;
+
+       local_irq_save(flags);
+
+       /* GPIO 82 is the CF power enable line. initially off */
+       if (gpio_direction_output(VIPER_CF_POWER_GPIO, 0) ||
+           gpio_direction_input(VIPER_CF_CD_GPIO) ||
+           gpio_direction_input(VIPER_CF_RDY_GPIO)) {
+               local_irq_restore(flags);
+               goto err_dir;
+       }
+
+       local_irq_restore(flags);
+
+       return soc_pcmcia_request_irqs(skt, irqs, ARRAY_SIZE(irqs));
+
+err_dir:
+       gpio_free(VIPER_CF_POWER_GPIO);
+err_request_pwr:
+       gpio_free(VIPER_CF_RDY_GPIO);
+err_request_rdy:
+       gpio_free(VIPER_CF_CD_GPIO);
+err_request_cd:
+       printk(KERN_ERR "viper: Failed to setup PCMCIA GPIOs\n");
+       return -1;
+}
+
+/*
+ * Release all resources.
+ */
+static void viper_pcmcia_hw_shutdown(struct soc_pcmcia_socket *skt)
+{
+       soc_pcmcia_free_irqs(skt, irqs, ARRAY_SIZE(irqs));
+       gpio_free(VIPER_CF_POWER_GPIO);
+       gpio_free(VIPER_CF_RDY_GPIO);
+       gpio_free(VIPER_CF_CD_GPIO);
+}
+
+static void viper_pcmcia_socket_state(struct soc_pcmcia_socket *skt,
+                                     struct pcmcia_state *state)
+{
+       state->detect = gpio_get_value(VIPER_CF_CD_GPIO) ? 0 : 1;
+       state->ready  = gpio_get_value(VIPER_CF_RDY_GPIO) ? 1 : 0;
+       state->bvd1   = 1;
+       state->bvd2   = 1;
+       state->wrprot = 0;
+       state->vs_3v  = 1; /* Can only apply 3.3V */
+       state->vs_Xv  = 0;
+}
+
+static int viper_pcmcia_configure_socket(struct soc_pcmcia_socket *skt,
+                                        const socket_state_t *state)
+{
+       /* Silently ignore Vpp, output enable, speaker enable. */
+       viper_cf_rst(state->flags & SS_RESET);
+
+       /* Apply socket voltage */
+       switch (state->Vcc) {
+       case 0:
+               gpio_set_value(VIPER_CF_POWER_GPIO, 0);
+               break;
+       case 33:
+               gpio_set_value(VIPER_CF_POWER_GPIO, 1);
+               break;
+       default:
+               printk(KERN_ERR "%s: Unsupported Vcc:%d\n",
+                      __func__, state->Vcc);
+               return -1;
+       }
+
+       return 0;
+}
+
+static void viper_pcmcia_socket_init(struct soc_pcmcia_socket *skt)
+{
+}
+
+static void viper_pcmcia_socket_suspend(struct soc_pcmcia_socket *skt)
+{
+}
+
+static struct pcmcia_low_level viper_pcmcia_ops __initdata = {
+       .owner                  = THIS_MODULE,
+       .hw_init                = viper_pcmcia_hw_init,
+       .hw_shutdown            = viper_pcmcia_hw_shutdown,
+       .socket_state           = viper_pcmcia_socket_state,
+       .configure_socket       = viper_pcmcia_configure_socket,
+       .socket_init            = viper_pcmcia_socket_init,
+       .socket_suspend         = viper_pcmcia_socket_suspend,
+       .nr                     = 1,
+};
+
+static struct platform_device *viper_pcmcia_device;
+
+static int __init viper_pcmcia_init(void)
+{
+       int ret;
+
+       if (!machine_is_viper())
+               return -ENODEV;
+
+       viper_pcmcia_device = platform_device_alloc("pxa2xx-pcmcia", -1);
+       if (!viper_pcmcia_device)
+               return -ENOMEM;
+
+       ret = platform_device_add_data(viper_pcmcia_device,
+                                      &viper_pcmcia_ops,
+                                      sizeof(viper_pcmcia_ops));
+
+       if (!ret)
+               ret = platform_device_add(viper_pcmcia_device);
+
+       if (ret)
+               platform_device_put(viper_pcmcia_device);
+
+       return ret;
+}
+
+static void __exit viper_pcmcia_exit(void)
+{
+       platform_device_unregister(viper_pcmcia_device);
+}
+
+module_init(viper_pcmcia_init);
+module_exit(viper_pcmcia_exit);
+
+MODULE_LICENSE("GPL");
index 9ce55850271a17c21365dee317f43219756eff53..1982f8b4278218997e3a73fb3724c2c86d36c3b6 100644 (file)
@@ -56,10 +56,10 @@ config BATTERY_TOSA
          Say Y to enable support for the battery on the Sharp Zaurus
          SL-6000 (tosa) models.
 
-config BATTERY_PALMTX
-       tristate "Palm T|X battery"
-       depends on MACH_PALMTX
+config BATTERY_WM97XX
+       bool "WM97xx generic battery driver"
+       depends on TOUCHSCREEN_WM97XX
        help
-         Say Y to enable support for the battery in Palm T|X.
+         Say Y to enable support for battery measured by WM97xx aux port.
 
 endif # POWER_SUPPLY
index 4706bf8ff4595814565ebac8ee4cbb764ab91f63..4e20026cc45aaa39550340526dc51ae66c35369e 100644 (file)
@@ -21,4 +21,4 @@ obj-$(CONFIG_BATTERY_DS2760)  += ds2760_battery.o
 obj-$(CONFIG_BATTERY_PMU)      += pmu_battery.o
 obj-$(CONFIG_BATTERY_OLPC)     += olpc_battery.o
 obj-$(CONFIG_BATTERY_TOSA)     += tosa_battery.o
-obj-$(CONFIG_BATTERY_PALMTX)   += palmtx_battery.o
+obj-$(CONFIG_BATTERY_WM97XX)   += wm97xx_battery.o
\ No newline at end of file
diff --git a/drivers/power/palmtx_battery.c b/drivers/power/palmtx_battery.c
deleted file mode 100644 (file)
index 7035bfa..0000000
+++ /dev/null
@@ -1,198 +0,0 @@
-/*
- * linux/drivers/power/palmtx_battery.c
- *
- * Battery measurement code for Palm T|X Handheld computer
- *
- * based on tosa_battery.c
- *
- * Copyright (C) 2008 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.
- *
- */
-#include <linux/kernel.h>
-#include <linux/module.h>
-#include <linux/power_supply.h>
-#include <linux/wm97xx.h>
-#include <linux/delay.h>
-#include <linux/spinlock.h>
-#include <linux/interrupt.h>
-#include <linux/gpio.h>
-
-#include <asm/mach-types.h>
-#include <mach/palmtx.h>
-
-static DEFINE_MUTEX(bat_lock);
-static struct work_struct bat_work;
-struct mutex work_lock;
-int bat_status = POWER_SUPPLY_STATUS_DISCHARGING;
-
-static unsigned long palmtx_read_bat(struct power_supply *bat_ps)
-{
-       return wm97xx_read_aux_adc(bat_ps->dev->parent->driver_data,
-                                   WM97XX_AUX_ID3) * 1000 / 414;
-}
-
-static unsigned long palmtx_read_temp(struct power_supply *bat_ps)
-{
-       return wm97xx_read_aux_adc(bat_ps->dev->parent->driver_data,
-                                   WM97XX_AUX_ID2);
-}
-
-static int palmtx_bat_get_property(struct power_supply *bat_ps,
-                           enum power_supply_property psp,
-                           union power_supply_propval *val)
-{
-       switch (psp) {
-       case POWER_SUPPLY_PROP_STATUS:
-               val->intval = bat_status;
-               break;
-       case POWER_SUPPLY_PROP_TECHNOLOGY:
-               val->intval = POWER_SUPPLY_TECHNOLOGY_LIPO;
-               break;
-       case POWER_SUPPLY_PROP_VOLTAGE_NOW:
-               val->intval = palmtx_read_bat(bat_ps);
-               break;
-       case POWER_SUPPLY_PROP_VOLTAGE_MAX:
-       case POWER_SUPPLY_PROP_VOLTAGE_MAX_DESIGN:
-               val->intval = PALMTX_BAT_MAX_VOLTAGE;
-               break;
-       case POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN:
-               val->intval = PALMTX_BAT_MIN_VOLTAGE;
-               break;
-       case POWER_SUPPLY_PROP_TEMP:
-               val->intval = palmtx_read_temp(bat_ps);
-               break;
-       case POWER_SUPPLY_PROP_PRESENT:
-               val->intval = 1;
-               break;
-       default:
-               return -EINVAL;
-       }
-       return 0;
-}
-
-static void palmtx_bat_external_power_changed(struct power_supply *bat_ps)
-{
-       schedule_work(&bat_work);
-}
-
-static char *status_text[] = {
-       [POWER_SUPPLY_STATUS_UNKNOWN] =         "Unknown",
-       [POWER_SUPPLY_STATUS_CHARGING] =        "Charging",
-       [POWER_SUPPLY_STATUS_DISCHARGING] =     "Discharging",
-};
-
-static void palmtx_bat_update(struct power_supply *bat_ps)
-{
-       int old_status = bat_status;
-
-       mutex_lock(&work_lock);
-
-       bat_status = gpio_get_value(GPIO_NR_PALMTX_POWER_DETECT) ?
-                                   POWER_SUPPLY_STATUS_CHARGING :
-                                   POWER_SUPPLY_STATUS_DISCHARGING;
-
-       if (old_status != bat_status) {
-               pr_debug("%s %s -> %s\n", bat_ps->name,
-                               status_text[old_status],
-                               status_text[bat_status]);
-               power_supply_changed(bat_ps);
-       }
-
-       mutex_unlock(&work_lock);
-}
-
-static enum power_supply_property palmtx_bat_main_props[] = {
-       POWER_SUPPLY_PROP_STATUS,
-       POWER_SUPPLY_PROP_TECHNOLOGY,
-       POWER_SUPPLY_PROP_VOLTAGE_NOW,
-       POWER_SUPPLY_PROP_VOLTAGE_MAX,
-       POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN,
-       POWER_SUPPLY_PROP_TEMP,
-       POWER_SUPPLY_PROP_PRESENT,
-};
-
-struct power_supply bat_ps = {
-       .name                   = "main-battery",
-       .type                   = POWER_SUPPLY_TYPE_BATTERY,
-       .properties             = palmtx_bat_main_props,
-       .num_properties         = ARRAY_SIZE(palmtx_bat_main_props),
-       .get_property           = palmtx_bat_get_property,
-       .external_power_changed = palmtx_bat_external_power_changed,
-       .use_for_apm            = 1,
-};
-
-static void palmtx_bat_work(struct work_struct *work)
-{
-       palmtx_bat_update(&bat_ps);
-}
-
-#ifdef CONFIG_PM
-static int palmtx_bat_suspend(struct platform_device *dev, pm_message_t state)
-{
-       flush_scheduled_work();
-       return 0;
-}
-
-static int palmtx_bat_resume(struct platform_device *dev)
-{
-       schedule_work(&bat_work);
-       return 0;
-}
-#else
-#define palmtx_bat_suspend NULL
-#define palmtx_bat_resume NULL
-#endif
-
-static int __devinit palmtx_bat_probe(struct platform_device *dev)
-{
-       int ret = 0;
-
-       if (!machine_is_palmtx())
-               return -ENODEV;
-
-       mutex_init(&work_lock);
-
-       INIT_WORK(&bat_work, palmtx_bat_work);
-
-       ret = power_supply_register(&dev->dev, &bat_ps);
-       if (!ret)
-               schedule_work(&bat_work);
-
-       return ret;
-}
-
-static int __devexit palmtx_bat_remove(struct platform_device *dev)
-{
-       power_supply_unregister(&bat_ps);
-       return 0;
-}
-
-static struct platform_driver palmtx_bat_driver = {
-       .driver.name    = "wm97xx-battery",
-       .driver.owner   = THIS_MODULE,
-       .probe          = palmtx_bat_probe,
-       .remove         = __devexit_p(palmtx_bat_remove),
-       .suspend        = palmtx_bat_suspend,
-       .resume         = palmtx_bat_resume,
-};
-
-static int __init palmtx_bat_init(void)
-{
-       return platform_driver_register(&palmtx_bat_driver);
-}
-
-static void __exit palmtx_bat_exit(void)
-{
-       platform_driver_unregister(&palmtx_bat_driver);
-}
-
-module_init(palmtx_bat_init);
-module_exit(palmtx_bat_exit);
-
-MODULE_LICENSE("GPL");
-MODULE_AUTHOR("Marek Vasut <marek.vasut@gmail.com>");
-MODULE_DESCRIPTION("Palm T|X battery driver");
diff --git a/drivers/power/wm97xx_battery.c b/drivers/power/wm97xx_battery.c
new file mode 100644 (file)
index 0000000..8bde921
--- /dev/null
@@ -0,0 +1,272 @@
+/*
+ * linux/drivers/power/wm97xx_battery.c
+ *
+ * Battery measurement code for WM97xx
+ *
+ * based on tosa_battery.c
+ *
+ * Copyright (C) 2008 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.
+ *
+ */
+
+#include <linux/init.h>
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/platform_device.h>
+#include <linux/power_supply.h>
+#include <linux/wm97xx.h>
+#include <linux/spinlock.h>
+#include <linux/interrupt.h>
+#include <linux/gpio.h>
+#include <linux/wm97xx_batt.h>
+
+static DEFINE_MUTEX(bat_lock);
+static struct work_struct bat_work;
+struct mutex work_lock;
+static int bat_status = POWER_SUPPLY_STATUS_UNKNOWN;
+static struct wm97xx_batt_info *pdata;
+static enum power_supply_property *prop;
+
+static unsigned long wm97xx_read_bat(struct power_supply *bat_ps)
+{
+       return wm97xx_read_aux_adc(bat_ps->dev->parent->driver_data,
+                                       pdata->batt_aux) * pdata->batt_mult /
+                                       pdata->batt_div;
+}
+
+static unsigned long wm97xx_read_temp(struct power_supply *bat_ps)
+{
+       return wm97xx_read_aux_adc(bat_ps->dev->parent->driver_data,
+                                       pdata->temp_aux) * pdata->temp_mult /
+                                       pdata->temp_div;
+}
+
+static int wm97xx_bat_get_property(struct power_supply *bat_ps,
+                           enum power_supply_property psp,
+                           union power_supply_propval *val)
+{
+       switch (psp) {
+       case POWER_SUPPLY_PROP_STATUS:
+               val->intval = bat_status;
+               break;
+       case POWER_SUPPLY_PROP_TECHNOLOGY:
+               val->intval = pdata->batt_tech;
+               break;
+       case POWER_SUPPLY_PROP_VOLTAGE_NOW:
+               if (pdata->batt_aux >= 0)
+                       val->intval = wm97xx_read_bat(bat_ps);
+               else
+                       return -EINVAL;
+               break;
+       case POWER_SUPPLY_PROP_TEMP:
+               if (pdata->temp_aux >= 0)
+                       val->intval = wm97xx_read_temp(bat_ps);
+               else
+                       return -EINVAL;
+               break;
+       case POWER_SUPPLY_PROP_VOLTAGE_MAX:
+               if (pdata->max_voltage >= 0)
+                       val->intval = pdata->max_voltage;
+               else
+                       return -EINVAL;
+               break;
+       case POWER_SUPPLY_PROP_VOLTAGE_MIN:
+               if (pdata->min_voltage >= 0)
+                       val->intval = pdata->min_voltage;
+               else
+                       return -EINVAL;
+               break;
+       case POWER_SUPPLY_PROP_PRESENT:
+               val->intval = 1;
+               break;
+       default:
+               return -EINVAL;
+       }
+       return 0;
+}
+
+static void wm97xx_bat_external_power_changed(struct power_supply *bat_ps)
+{
+       schedule_work(&bat_work);
+}
+
+static void wm97xx_bat_update(struct power_supply *bat_ps)
+{
+       int old_status = bat_status;
+
+       mutex_lock(&work_lock);
+
+       bat_status = (pdata->charge_gpio >= 0) ?
+                       (gpio_get_value(pdata->charge_gpio) ?
+                       POWER_SUPPLY_STATUS_DISCHARGING :
+                       POWER_SUPPLY_STATUS_CHARGING) :
+                       POWER_SUPPLY_STATUS_UNKNOWN;
+
+       if (old_status != bat_status) {
+               pr_debug("%s: %i -> %i\n", bat_ps->name, old_status,
+                                       bat_status);
+               power_supply_changed(bat_ps);
+       }
+
+       mutex_unlock(&work_lock);
+}
+
+static struct power_supply bat_ps = {
+       .type                   = POWER_SUPPLY_TYPE_BATTERY,
+       .get_property           = wm97xx_bat_get_property,
+       .external_power_changed = wm97xx_bat_external_power_changed,
+       .use_for_apm            = 1,
+};
+
+static void wm97xx_bat_work(struct work_struct *work)
+{
+       wm97xx_bat_update(&bat_ps);
+}
+
+#ifdef CONFIG_PM
+static int wm97xx_bat_suspend(struct platform_device *dev, pm_message_t state)
+{
+       flush_scheduled_work();
+       return 0;
+}
+
+static int wm97xx_bat_resume(struct platform_device *dev)
+{
+       schedule_work(&bat_work);
+       return 0;
+}
+#else
+#define wm97xx_bat_suspend NULL
+#define wm97xx_bat_resume NULL
+#endif
+
+static int __devinit wm97xx_bat_probe(struct platform_device *dev)
+{
+       int ret = 0;
+       int props = 1;  /* POWER_SUPPLY_PROP_PRESENT */
+       int i = 0;
+
+       if (dev->id != -1)
+               return -EINVAL;
+
+       mutex_init(&work_lock);
+
+       if (!pdata) {
+               dev_err(&dev->dev, "Please use wm97xx_bat_set_pdata\n");
+               return -EINVAL;
+       }
+
+       if (pdata->charge_gpio >= 0 && gpio_is_valid(pdata->charge_gpio)) {
+               ret = gpio_request(pdata->charge_gpio, "BATT CHRG");
+               if (ret)
+                       goto err;
+               ret = gpio_direction_input(pdata->charge_gpio);
+               if (ret)
+                       goto err2;
+               props++;        /* POWER_SUPPLY_PROP_STATUS */
+       }
+
+       if (pdata->batt_tech >= 0)
+               props++;        /* POWER_SUPPLY_PROP_TECHNOLOGY */
+       if (pdata->temp_aux >= 0)
+               props++;        /* POWER_SUPPLY_PROP_TEMP */
+       if (pdata->batt_aux >= 0)
+               props++;        /* POWER_SUPPLY_PROP_VOLTAGE_NOW */
+       if (pdata->max_voltage >= 0)
+               props++;        /* POWER_SUPPLY_PROP_VOLTAGE_MAX */
+       if (pdata->min_voltage >= 0)
+               props++;        /* POWER_SUPPLY_PROP_VOLTAGE_MIN */
+
+       prop = kzalloc(props * sizeof(*prop), GFP_KERNEL);
+       if (!prop)
+               goto err2;
+
+       prop[i++] = POWER_SUPPLY_PROP_PRESENT;
+       if (pdata->charge_gpio >= 0)
+               prop[i++] = POWER_SUPPLY_PROP_STATUS;
+       if (pdata->batt_tech >= 0)
+               prop[i++] = POWER_SUPPLY_PROP_TECHNOLOGY;
+       if (pdata->temp_aux >= 0)
+               prop[i++] = POWER_SUPPLY_PROP_TEMP;
+       if (pdata->batt_aux >= 0)
+               prop[i++] = POWER_SUPPLY_PROP_VOLTAGE_NOW;
+       if (pdata->max_voltage >= 0)
+               prop[i++] = POWER_SUPPLY_PROP_VOLTAGE_MAX;
+       if (pdata->min_voltage >= 0)
+               prop[i++] = POWER_SUPPLY_PROP_VOLTAGE_MIN;
+
+       INIT_WORK(&bat_work, wm97xx_bat_work);
+
+       if (!pdata->batt_name) {
+               dev_info(&dev->dev, "Please consider setting proper battery "
+                               "name in platform definition file, falling "
+                               "back to name \"wm97xx-batt\"\n");
+               bat_ps.name = "wm97xx-batt";
+       } else
+               bat_ps.name = pdata->batt_name;
+
+       bat_ps.properties = prop;
+       bat_ps.num_properties = props;
+
+       ret = power_supply_register(&dev->dev, &bat_ps);
+       if (!ret)
+               schedule_work(&bat_work);
+       else
+               goto err3;
+
+       return 0;
+err3:
+       kfree(prop);
+err2:
+       gpio_free(pdata->charge_gpio);
+err:
+       return ret;
+}
+
+static int __devexit wm97xx_bat_remove(struct platform_device *dev)
+{
+       if (pdata && pdata->charge_gpio && pdata->charge_gpio >= 0)
+               gpio_free(pdata->charge_gpio);
+       flush_scheduled_work();
+       power_supply_unregister(&bat_ps);
+       kfree(prop);
+       return 0;
+}
+
+static struct platform_driver wm97xx_bat_driver = {
+       .driver = {
+               .name   = "wm97xx-battery",
+               .owner  = THIS_MODULE,
+       },
+       .probe          = wm97xx_bat_probe,
+       .remove         = __devexit_p(wm97xx_bat_remove),
+       .suspend        = wm97xx_bat_suspend,
+       .resume         = wm97xx_bat_resume,
+};
+
+static int __init wm97xx_bat_init(void)
+{
+       return platform_driver_register(&wm97xx_bat_driver);
+}
+
+static void __exit wm97xx_bat_exit(void)
+{
+       platform_driver_unregister(&wm97xx_bat_driver);
+}
+
+void __init wm97xx_bat_set_pdata(struct wm97xx_batt_info *data)
+{
+       pdata = data;
+}
+EXPORT_SYMBOL_GPL(wm97xx_bat_set_pdata);
+
+module_init(wm97xx_bat_init);
+module_exit(wm97xx_bat_exit);
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Marek Vasut <marek.vasut@gmail.com>");
+MODULE_DESCRIPTION("WM97xx battery driver");
index f7a0d37c42219678bf1d7c8d64bb79deced586ab..abc00be55433f428bba85a73bdb0e010d653d123 100644 (file)
@@ -534,6 +534,11 @@ serial_pxa_set_termios(struct uart_port *port, struct ktermios *termios,
 
        serial_out(up, UART_IER, up->ier);
 
+       if (termios->c_cflag & CRTSCTS)
+               up->mcr |= UART_MCR_AFE;
+       else
+               up->mcr &= ~UART_MCR_AFE;
+
        serial_out(up, UART_LCR, cval | UART_LCR_DLAB);/* set DLAB */
        serial_out(up, UART_DLL, quot & 0xff);          /* LS of divisor */
        serial_out(up, UART_DLM, quot >> 8);            /* MS of divisor */
index b9cbfc87f616adee61d6c687c69413bc386bb3e6..998e89dc5aaf2db56eda9f18c1060ea8c9189555 100644 (file)
 #define UART_DUMMY_LSR_RX      0x100
 #define UART_PORT_SIZE         (KS8695_USR - KS8695_URRB + 4)
 
-#define tx_enabled(port) ((port)->unused[0])
-#define rx_enabled(port) ((port)->unused[1])
+static inline int tx_enabled(struct uart_port *port)
+{
+       return port->unused[0] & 1;
+}
+
+static inline int rx_enabled(struct uart_port *port)
+{
+       return port->unused[0] & 2;
+}
+
+static inline int ms_enabled(struct uart_port *port)
+{
+       return port->unused[0] & 4;
+}
+
+static inline void ms_enable(struct uart_port *port, int enabled)
+{
+       if(enabled)
+               port->unused[0] |= 4;
+       else
+               port->unused[0] &= ~4;
+}
+
+static inline void rx_enable(struct uart_port *port, int enabled)
+{
+       if(enabled)
+               port->unused[0] |= 2;
+       else
+               port->unused[0] &= ~2;
+}
+
+static inline void tx_enable(struct uart_port *port, int enabled)
+{
+       if(enabled)
+               port->unused[0] |= 1;
+       else
+               port->unused[0] &= ~1;
+}
 
 
 #ifdef SUPPORT_SYSRQ
@@ -75,7 +111,7 @@ static void ks8695uart_stop_tx(struct uart_port *port)
 {
        if (tx_enabled(port)) {
                disable_irq(KS8695_IRQ_UART_TX);
-               tx_enabled(port) = 0;
+               tx_enable(port, 0);
        }
 }
 
@@ -83,7 +119,7 @@ static void ks8695uart_start_tx(struct uart_port *port)
 {
        if (!tx_enabled(port)) {
                enable_irq(KS8695_IRQ_UART_TX);
-               tx_enabled(port) = 1;
+               tx_enable(port, 1);
        }
 }
 
@@ -91,18 +127,24 @@ static void ks8695uart_stop_rx(struct uart_port *port)
 {
        if (rx_enabled(port)) {
                disable_irq(KS8695_IRQ_UART_RX);
-               rx_enabled(port) = 0;
+               rx_enable(port, 0);
        }
 }
 
 static void ks8695uart_enable_ms(struct uart_port *port)
 {
-       enable_irq(KS8695_IRQ_UART_MODEM_STATUS);
+       if (!ms_enabled(port)) {
+               enable_irq(KS8695_IRQ_UART_MODEM_STATUS);
+               ms_enable(port,1);
+       }
 }
 
 static void ks8695uart_disable_ms(struct uart_port *port)
 {
-       disable_irq(KS8695_IRQ_UART_MODEM_STATUS);
+       if (ms_enabled(port)) {
+               disable_irq(KS8695_IRQ_UART_MODEM_STATUS);
+               ms_enable(port,0);
+       }
 }
 
 static irqreturn_t ks8695uart_rx_chars(int irq, void *dev_id)
@@ -285,8 +327,9 @@ static int ks8695uart_startup(struct uart_port *port)
        int retval;
 
        set_irq_flags(KS8695_IRQ_UART_TX, IRQF_VALID | IRQF_NOAUTOEN);
-       tx_enabled(port) = 0;
-       rx_enabled(port) = 1;
+       tx_enable(port, 0);
+       rx_enable(port, 1);
+       ms_enable(port, 1);
 
        /*
         * Allocate the IRQ
index 7f0f35c781858628a995dc85df361c6cae56b264..e294d430733b1b5e92a05cdc6cb837b41b067f8b 100644 (file)
 #include <linux/signal.h>
 #include <linux/platform_device.h>
 #include <linux/clk.h>
-
-#include <mach/hardware.h>
-#include <mach/pxa-regs.h>
-#include <mach/pxa2xx-regs.h> /* FIXME: for PSSR */
 #include <mach/ohci.h>
 
+/*
+ * UHC: USB Host Controller (OHCI-like) register definitions
+ */
+#define UHCREV         (0x0000) /* UHC HCI Spec Revision */
+#define UHCHCON                (0x0004) /* UHC Host Control Register */
+#define UHCCOMS                (0x0008) /* UHC Command Status Register */
+#define UHCINTS                (0x000C) /* UHC Interrupt Status Register */
+#define UHCINTE                (0x0010) /* UHC Interrupt Enable */
+#define UHCINTD                (0x0014) /* UHC Interrupt Disable */
+#define UHCHCCA                (0x0018) /* UHC Host Controller Comm. Area */
+#define UHCPCED                (0x001C) /* UHC Period Current Endpt Descr */
+#define UHCCHED                (0x0020) /* UHC Control Head Endpt Descr */
+#define UHCCCED                (0x0024) /* UHC Control Current Endpt Descr */
+#define UHCBHED                (0x0028) /* UHC Bulk Head Endpt Descr */
+#define UHCBCED                (0x002C) /* UHC Bulk Current Endpt Descr */
+#define UHCDHEAD       (0x0030) /* UHC Done Head */
+#define UHCFMI         (0x0034) /* UHC Frame Interval */
+#define UHCFMR         (0x0038) /* UHC Frame Remaining */
+#define UHCFMN         (0x003C) /* UHC Frame Number */
+#define UHCPERS                (0x0040) /* UHC Periodic Start */
+#define UHCLS          (0x0044) /* UHC Low Speed Threshold */
+
+#define UHCRHDA                (0x0048) /* UHC Root Hub Descriptor A */
+#define UHCRHDA_NOCP   (1 << 12)       /* No over current protection */
+#define UHCRHDA_OCPM   (1 << 11)       /* Over Current Protection Mode */
+#define UHCRHDA_POTPGT(x) \
+                       (((x) & 0xff) << 24) /* Power On To Power Good Time */
+
+#define UHCRHDB                (0x004C) /* UHC Root Hub Descriptor B */
+#define UHCRHS         (0x0050) /* UHC Root Hub Status */
+#define UHCRHPS1       (0x0054) /* UHC Root Hub Port 1 Status */
+#define UHCRHPS2       (0x0058) /* UHC Root Hub Port 2 Status */
+#define UHCRHPS3       (0x005C) /* UHC Root Hub Port 3 Status */
+
+#define UHCSTAT                (0x0060) /* UHC Status Register */
+#define UHCSTAT_UPS3   (1 << 16)       /* USB Power Sense Port3 */
+#define UHCSTAT_SBMAI  (1 << 15)       /* System Bus Master Abort Interrupt*/
+#define UHCSTAT_SBTAI  (1 << 14)       /* System Bus Target Abort Interrupt*/
+#define UHCSTAT_UPRI   (1 << 13)       /* USB Port Resume Interrupt */
+#define UHCSTAT_UPS2   (1 << 12)       /* USB Power Sense Port 2 */
+#define UHCSTAT_UPS1   (1 << 11)       /* USB Power Sense Port 1 */
+#define UHCSTAT_HTA    (1 << 10)       /* HCI Target Abort */
+#define UHCSTAT_HBA    (1 << 8)        /* HCI Buffer Active */
+#define UHCSTAT_RWUE   (1 << 7)        /* HCI Remote Wake Up Event */
+
+#define UHCHR           (0x0064) /* UHC Reset Register */
+#define UHCHR_SSEP3    (1 << 11)       /* Sleep Standby Enable for Port3 */
+#define UHCHR_SSEP2    (1 << 10)       /* Sleep Standby Enable for Port2 */
+#define UHCHR_SSEP1    (1 << 9)        /* Sleep Standby Enable for Port1 */
+#define UHCHR_PCPL     (1 << 7)        /* Power control polarity low */
+#define UHCHR_PSPL     (1 << 6)        /* Power sense polarity low */
+#define UHCHR_SSE      (1 << 5)        /* Sleep Standby Enable */
+#define UHCHR_UIT      (1 << 4)        /* USB Interrupt Test */
+#define UHCHR_SSDC     (1 << 3)        /* Simulation Scale Down Clock */
+#define UHCHR_CGR      (1 << 2)        /* Clock Generation Reset */
+#define UHCHR_FHR      (1 << 1)        /* Force Host Controller Reset */
+#define UHCHR_FSBIR    (1 << 0)        /* Force System Bus Iface Reset */
+
+#define UHCHIE          (0x0068) /* UHC Interrupt Enable Register*/
+#define UHCHIE_UPS3IE  (1 << 14)       /* Power Sense Port3 IntEn */
+#define UHCHIE_UPRIE   (1 << 13)       /* Port Resume IntEn */
+#define UHCHIE_UPS2IE  (1 << 12)       /* Power Sense Port2 IntEn */
+#define UHCHIE_UPS1IE  (1 << 11)       /* Power Sense Port1 IntEn */
+#define UHCHIE_TAIE    (1 << 10)       /* HCI Interface Transfer Abort
+                                          Interrupt Enable*/
+#define UHCHIE_HBAIE   (1 << 8)        /* HCI Buffer Active IntEn */
+#define UHCHIE_RWIE    (1 << 7)        /* Remote Wake-up IntEn */
+
+#define UHCHIT          (0x006C) /* UHC Interrupt Test register */
+
 #define PXA_UHC_MAX_PORTNUM    3
 
-#define UHCRHPS(x)              __REG2( 0x4C000050, (x)<<2 )
+struct pxa27x_ohci {
+       /* must be 1st member here for hcd_to_ohci() to work */
+       struct ohci_hcd ohci;
+
+       struct device   *dev;
+       struct clk      *clk;
+       void __iomem    *mmio_base;
+};
 
-static struct clk *usb_clk;
+#define to_pxa27x_ohci(hcd)    (struct pxa27x_ohci *)hcd_to_ohci(hcd)
 
 /*
   PMM_NPS_MODE -- PMM Non-power switching mode
@@ -45,30 +118,35 @@ static struct clk *usb_clk;
   PMM_PERPORT_MODE -- PMM per port switching mode
       Ports are powered individually.
  */
-static int pxa27x_ohci_select_pmm( int mode )
+static int pxa27x_ohci_select_pmm(struct pxa27x_ohci *ohci, int mode)
 {
-       switch ( mode ) {
+       uint32_t uhcrhda = __raw_readl(ohci->mmio_base + UHCRHDA);
+       uint32_t uhcrhdb = __raw_readl(ohci->mmio_base + UHCRHDB);
+
+       switch (mode) {
        case PMM_NPS_MODE:
-               UHCRHDA |= RH_A_NPS;
+               uhcrhda |= RH_A_NPS;
                break;
        case PMM_GLOBAL_MODE:
-               UHCRHDA &= ~(RH_A_NPS & RH_A_PSM);
+               uhcrhda &= ~(RH_A_NPS & RH_A_PSM);
                break;
        case PMM_PERPORT_MODE:
-               UHCRHDA &= ~(RH_A_NPS);
-               UHCRHDA |= RH_A_PSM;
+               uhcrhda &= ~(RH_A_NPS);
+               uhcrhda |= RH_A_PSM;
 
                /* Set port power control mask bits, only 3 ports. */
-               UHCRHDB |= (0x7<<17);
+               uhcrhdb |= (0x7<<17);
                break;
        default:
                printk( KERN_ERR
                        "Invalid mode %d, set to non-power switch mode.\n",
                        mode );
 
-               UHCRHDA |= RH_A_NPS;
+               uhcrhda |= RH_A_NPS;
        }
 
+       __raw_writel(uhcrhda, ohci->mmio_base + UHCRHDA);
+       __raw_writel(uhcrhdb, ohci->mmio_base + UHCRHDB);
        return 0;
 }
 
@@ -76,57 +154,110 @@ extern int usb_disabled(void);
 
 /*-------------------------------------------------------------------------*/
 
-static int pxa27x_start_hc(struct device *dev)
+static inline void pxa27x_setup_hc(struct pxa27x_ohci *ohci,
+                                  struct pxaohci_platform_data *inf)
+{
+       uint32_t uhchr = __raw_readl(ohci->mmio_base + UHCHR);
+       uint32_t uhcrhda = __raw_readl(ohci->mmio_base + UHCRHDA);
+
+       if (inf->flags & ENABLE_PORT1)
+               uhchr &= ~UHCHR_SSEP1;
+
+       if (inf->flags & ENABLE_PORT2)
+               uhchr &= ~UHCHR_SSEP2;
+
+       if (inf->flags & ENABLE_PORT3)
+               uhchr &= ~UHCHR_SSEP3;
+
+       if (inf->flags & POWER_CONTROL_LOW)
+               uhchr |= UHCHR_PCPL;
+
+       if (inf->flags & POWER_SENSE_LOW)
+               uhchr |= UHCHR_PSPL;
+
+       if (inf->flags & NO_OC_PROTECTION)
+               uhcrhda |= UHCRHDA_NOCP;
+
+       if (inf->flags & OC_MODE_PERPORT)
+               uhcrhda |= UHCRHDA_OCPM;
+
+       if (inf->power_on_delay) {
+               uhcrhda &= ~UHCRHDA_POTPGT(0xff);
+               uhcrhda |= UHCRHDA_POTPGT(inf->power_on_delay / 2);
+       }
+
+       __raw_writel(uhchr, ohci->mmio_base + UHCHR);
+       __raw_writel(uhcrhda, ohci->mmio_base + UHCRHDA);
+}
+
+static inline void pxa27x_reset_hc(struct pxa27x_ohci *ohci)
+{
+       uint32_t uhchr = __raw_readl(ohci->mmio_base + UHCHR);
+
+       __raw_writel(uhchr | UHCHR_FHR, ohci->mmio_base + UHCHR);
+       udelay(11);
+       __raw_writel(uhchr & ~UHCHR_FHR, ohci->mmio_base + UHCHR);
+}
+
+#ifdef CONFIG_CPU_PXA27x
+extern void pxa27x_clear_otgph(void);
+#else
+#define pxa27x_clear_otgph()   do {} while (0)
+#endif
+
+static int pxa27x_start_hc(struct pxa27x_ohci *ohci, struct device *dev)
 {
        int retval = 0;
        struct pxaohci_platform_data *inf;
+       uint32_t uhchr;
 
        inf = dev->platform_data;
 
-       clk_enable(usb_clk);
+       clk_enable(ohci->clk);
 
-       UHCHR |= UHCHR_FHR;
-       udelay(11);
-       UHCHR &= ~UHCHR_FHR;
+       pxa27x_reset_hc(ohci);
+
+       uhchr = __raw_readl(ohci->mmio_base + UHCHR) | UHCHR_FSBIR;
+       __raw_writel(uhchr, ohci->mmio_base + UHCHR);
 
-       UHCHR |= UHCHR_FSBIR;
-       while (UHCHR & UHCHR_FSBIR)
+       while (__raw_readl(ohci->mmio_base + UHCHR) & UHCHR_FSBIR)
                cpu_relax();
 
+       pxa27x_setup_hc(ohci, inf);
+
        if (inf->init)
                retval = inf->init(dev);
 
        if (retval < 0)
                return retval;
 
-       UHCHR &= ~UHCHR_SSE;
-
-       UHCHIE = (UHCHIE_UPRIE | UHCHIE_RWIE);
+       uhchr = __raw_readl(ohci->mmio_base + UHCHR) & ~UHCHR_SSE;
+       __raw_writel(uhchr, ohci->mmio_base + UHCHR);
+       __raw_writel(UHCHIE_UPRIE | UHCHIE_RWIE, ohci->mmio_base + UHCHIE);
 
        /* Clear any OTG Pin Hold */
-       if (cpu_is_pxa27x() && (PSSR & PSSR_OTGPH))
-               PSSR |= PSSR_OTGPH;
-
+       pxa27x_clear_otgph();
        return 0;
 }
 
-static void pxa27x_stop_hc(struct device *dev)
+static void pxa27x_stop_hc(struct pxa27x_ohci *ohci, struct device *dev)
 {
        struct pxaohci_platform_data *inf;
+       uint32_t uhccoms;
 
        inf = dev->platform_data;
 
        if (inf->exit)
                inf->exit(dev);
 
-       UHCHR |= UHCHR_FHR;
-       udelay(11);
-       UHCHR &= ~UHCHR_FHR;
+       pxa27x_reset_hc(ohci);
 
-       UHCCOMS |= 1;
+       /* Host Controller Reset */
+       uhccoms = __raw_readl(ohci->mmio_base + UHCCOMS) | 0x01;
+       __raw_writel(uhccoms, ohci->mmio_base + UHCCOMS);
        udelay(10);
 
-       clk_disable(usb_clk);
+       clk_disable(ohci->clk);
 }
 
 
@@ -147,18 +278,22 @@ static void pxa27x_stop_hc(struct device *dev)
  */
 int usb_hcd_pxa27x_probe (const struct hc_driver *driver, struct platform_device *pdev)
 {
-       int retval;
+       int retval, irq;
        struct usb_hcd *hcd;
        struct pxaohci_platform_data *inf;
+       struct pxa27x_ohci *ohci;
+       struct resource *r;
+       struct clk *usb_clk;
 
        inf = pdev->dev.platform_data;
 
        if (!inf)
                return -ENODEV;
 
-       if (pdev->resource[1].flags != IORESOURCE_IRQ) {
-               pr_debug ("resource[1] is not IORESOURCE_IRQ");
-               return -ENOMEM;
+       irq = platform_get_irq(pdev, 0);
+       if (irq < 0) {
+               pr_err("no resource of IORESOURCE_IRQ");
+               return -ENXIO;
        }
 
        usb_clk = clk_get(&pdev->dev, "USBCLK");
@@ -168,8 +303,16 @@ int usb_hcd_pxa27x_probe (const struct hc_driver *driver, struct platform_device
        hcd = usb_create_hcd (driver, &pdev->dev, "pxa27x");
        if (!hcd)
                return -ENOMEM;
-       hcd->rsrc_start = pdev->resource[0].start;
-       hcd->rsrc_len = pdev->resource[0].end - pdev->resource[0].start + 1;
+
+       r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+       if (!r) {
+               pr_err("no resource of IORESOURCE_MEM");
+               retval = -ENXIO;
+               goto err1;
+       }
+
+       hcd->rsrc_start = r->start;
+       hcd->rsrc_len = resource_size(r);
 
        if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) {
                pr_debug("request_mem_region failed");
@@ -184,24 +327,30 @@ int usb_hcd_pxa27x_probe (const struct hc_driver *driver, struct platform_device
                goto err2;
        }
 
-       if ((retval = pxa27x_start_hc(&pdev->dev)) < 0) {
+       /* initialize "struct pxa27x_ohci" */
+       ohci = (struct pxa27x_ohci *)hcd_to_ohci(hcd);
+       ohci->dev = &pdev->dev;
+       ohci->clk = usb_clk;
+       ohci->mmio_base = (void __iomem *)hcd->regs;
+
+       if ((retval = pxa27x_start_hc(ohci, &pdev->dev)) < 0) {
                pr_debug("pxa27x_start_hc failed");
                goto err3;
        }
 
        /* Select Power Management Mode */
-       pxa27x_ohci_select_pmm(inf->port_mode);
+       pxa27x_ohci_select_pmm(ohci, inf->port_mode);
 
        if (inf->power_budget)
                hcd->power_budget = inf->power_budget;
 
        ohci_hcd_init(hcd_to_ohci(hcd));
 
-       retval = usb_add_hcd(hcd, pdev->resource[1].start, IRQF_DISABLED);
+       retval = usb_add_hcd(hcd, irq, IRQF_DISABLED);
        if (retval == 0)
                return retval;
 
-       pxa27x_stop_hc(&pdev->dev);
+       pxa27x_stop_hc(ohci, &pdev->dev);
  err3:
        iounmap(hcd->regs);
  err2:
@@ -228,12 +377,14 @@ int usb_hcd_pxa27x_probe (const struct hc_driver *driver, struct platform_device
  */
 void usb_hcd_pxa27x_remove (struct usb_hcd *hcd, struct platform_device *pdev)
 {
+       struct pxa27x_ohci *ohci = to_pxa27x_ohci(hcd);
+
        usb_remove_hcd(hcd);
-       pxa27x_stop_hc(&pdev->dev);
+       pxa27x_stop_hc(ohci, &pdev->dev);
        iounmap(hcd->regs);
        release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
        usb_put_hcd(hcd);
-       clk_put(usb_clk);
+       clk_put(ohci->clk);
 }
 
 /*-------------------------------------------------------------------------*/
@@ -266,7 +417,7 @@ ohci_pxa27x_start (struct usb_hcd *hcd)
 static const struct hc_driver ohci_pxa27x_hc_driver = {
        .description =          hcd_name,
        .product_desc =         "PXA27x OHCI",
-       .hcd_priv_size =        sizeof(struct ohci_hcd),
+       .hcd_priv_size =        sizeof(struct pxa27x_ohci),
 
        /*
         * generic hardware linkage
@@ -330,13 +481,13 @@ static int ohci_hcd_pxa27x_drv_remove(struct platform_device *pdev)
 static int ohci_hcd_pxa27x_drv_suspend(struct platform_device *pdev, pm_message_t state)
 {
        struct usb_hcd *hcd = platform_get_drvdata(pdev);
-       struct ohci_hcd *ohci = hcd_to_ohci(hcd);
+       struct pxa27x_ohci *ohci = to_pxa27x_ohci(hcd);
 
-       if (time_before(jiffies, ohci->next_statechange))
+       if (time_before(jiffies, ohci->ohci.next_statechange))
                msleep(5);
-       ohci->next_statechange = jiffies;
+       ohci->ohci.next_statechange = jiffies;
 
-       pxa27x_stop_hc(&pdev->dev);
+       pxa27x_stop_hc(ohci, &pdev->dev);
        hcd->state = HC_STATE_SUSPENDED;
 
        return 0;
@@ -345,14 +496,14 @@ static int ohci_hcd_pxa27x_drv_suspend(struct platform_device *pdev, pm_message_
 static int ohci_hcd_pxa27x_drv_resume(struct platform_device *pdev)
 {
        struct usb_hcd *hcd = platform_get_drvdata(pdev);
-       struct ohci_hcd *ohci = hcd_to_ohci(hcd);
+       struct pxa27x_ohci *ohci = to_pxa27x_ohci(hcd);
        int status;
 
-       if (time_before(jiffies, ohci->next_statechange))
+       if (time_before(jiffies, ohci->ohci.next_statechange))
                msleep(5);
-       ohci->next_statechange = jiffies;
+       ohci->ohci.next_statechange = jiffies;
 
-       if ((status = pxa27x_start_hc(&pdev->dev)) < 0)
+       if ((status = pxa27x_start_hc(ohci, &pdev->dev)) < 0)
                return status;
 
        ohci_finish_controller_resume(hcd);
index 70d135e0cc47c37d148eb97f7d97219cb33b1412..d85a74c64b54e3cffb70b262e0f1f40524e4ff6d 100644 (file)
@@ -172,11 +172,6 @@ config FB_DEFERRED_IO
        bool
        depends on FB
 
-config FB_METRONOME
-       tristate
-       depends on FB
-       depends on FB_DEFERRED_IO
-
 config FB_HECUBA
        tristate
        depends on FB
@@ -1974,19 +1969,6 @@ config FB_XILINX
          framebuffer. ML300 carries a 640*480 LCD display on the board,
          ML403 uses a standard DB15 VGA connector.
 
-config FB_AM200EPD
-       tristate "AM-200 E-Ink EPD devkit support"
-       depends on FB && ARCH_PXA && MMU
-       select FB_SYS_FILLRECT
-       select FB_SYS_COPYAREA
-       select FB_SYS_IMAGEBLIT
-       select FB_SYS_FOPS
-       select FB_DEFERRED_IO
-       select FB_METRONOME
-       help
-         This enables support for the Metronome display controller used on
-         the E-Ink AM-200 EPD devkit.
-
 config FB_COBALT
        tristate "Cobalt server LCD frame buffer support"
        depends on FB && MIPS_COBALT
@@ -2041,6 +2023,19 @@ config XEN_FBDEV_FRONTEND
          frame buffer driver.  It communicates with a back-end
          in another domain.
 
+config FB_METRONOME
+       tristate "E-Ink Metronome/8track controller support"
+       depends on FB
+       select FB_SYS_FILLRECT
+       select FB_SYS_COPYAREA
+       select FB_SYS_IMAGEBLIT
+       select FB_SYS_FOPS
+       select FB_DEFERRED_IO
+       help
+         This driver implements support for the E-Ink Metronome
+         controller. The pre-release name for this device was 8track
+         and could also have been called by some vendors as PVI-nnnn.
+
 source "drivers/video/omap/Kconfig"
 
 source "drivers/video/backlight/Kconfig"
index a6b55297a7fb5269662354e32a512d4b7c54589c..ad0330bf9be3a7fe6d26aa82869be16dae41856c 100644 (file)
@@ -29,7 +29,6 @@ obj-$(CONFIG_FB_DEFERRED_IO)   += fb_defio.o
 
 # Hardware specific drivers go first
 obj-$(CONFIG_FB_AMIGA)            += amifb.o c2p.o
-obj-$(CONFIG_FB_AM200EPD)         += am200epd.o
 obj-$(CONFIG_FB_ARC)              += arcfb.o
 obj-$(CONFIG_FB_CLPS711X)         += clps711xfb.o
 obj-$(CONFIG_FB_CYBER2000)        += cyber2000fb.o
diff --git a/drivers/video/am200epd.c b/drivers/video/am200epd.c
deleted file mode 100644 (file)
index 0c35b8b..0000000
+++ /dev/null
@@ -1,295 +0,0 @@
-/*
- * linux/drivers/video/am200epd.c -- Platform device for AM200 EPD kit
- *
- * Copyright (C) 2008, Jaya Kumar
- *
- * 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.
- *
- * Layout is based on skeletonfb.c by James Simmons and Geert Uytterhoeven.
- *
- * This work was made possible by help and equipment support from E-Ink
- * Corporation. http://support.eink.com/community
- *
- * This driver is written to be used with the Metronome display controller.
- * on the AM200 EPD prototype kit/development kit with an E-Ink 800x600
- * Vizplex EPD on a Gumstix board using the Lyre interface board.
- *
- */
-
-#include <linux/module.h>
-#include <linux/kernel.h>
-#include <linux/errno.h>
-#include <linux/string.h>
-#include <linux/delay.h>
-#include <linux/interrupt.h>
-#include <linux/fb.h>
-#include <linux/init.h>
-#include <linux/platform_device.h>
-#include <linux/list.h>
-#include <linux/uaccess.h>
-#include <linux/irq.h>
-
-#include <video/metronomefb.h>
-
-#include <mach/pxa-regs.h>
-
-/* register offsets for gpio control */
-#define LED_GPIO_PIN 51
-#define STDBY_GPIO_PIN 48
-#define RST_GPIO_PIN 49
-#define RDY_GPIO_PIN 32
-#define ERR_GPIO_PIN 17
-#define PCBPWR_GPIO_PIN 16
-
-#define AF_SEL_GPIO_N 0x3
-#define GAFR0_U_OFFSET(pin) ((pin - 16) * 2)
-#define GAFR1_L_OFFSET(pin) ((pin - 32) * 2)
-#define GAFR1_U_OFFSET(pin) ((pin - 48) * 2)
-#define GPDR1_OFFSET(pin) (pin - 32)
-#define GPCR1_OFFSET(pin) (pin - 32)
-#define GPSR1_OFFSET(pin) (pin - 32)
-#define GPCR0_OFFSET(pin) (pin)
-#define GPSR0_OFFSET(pin) (pin)
-
-static void am200_set_gpio_output(int pin, int val)
-{
-       u8 index;
-
-       index = pin >> 4;
-
-       switch (index) {
-       case 1:
-               if (val)
-                       GPSR0 |= (1 << GPSR0_OFFSET(pin));
-               else
-                       GPCR0 |= (1 << GPCR0_OFFSET(pin));
-               break;
-       case 2:
-               break;
-       case 3:
-               if (val)
-                       GPSR1 |= (1 << GPSR1_OFFSET(pin));
-               else
-                       GPCR1 |= (1 << GPCR1_OFFSET(pin));
-               break;
-       default:
-               printk(KERN_ERR "unimplemented\n");
-       }
-}
-
-static void __devinit am200_init_gpio_pin(int pin, int dir)
-{
-       u8 index;
-       /* dir 0 is output, 1 is input
-       - do 2 things here:
-       - set gpio alternate function to standard gpio
-       - set gpio direction to input or output  */
-
-       index = pin >> 4;
-       switch (index) {
-       case 1:
-               GAFR0_U &= ~(AF_SEL_GPIO_N << GAFR0_U_OFFSET(pin));
-
-               if (dir)
-                       GPDR0 &= ~(1 << pin);
-               else
-                       GPDR0 |= (1 << pin);
-               break;
-       case 2:
-               GAFR1_L &= ~(AF_SEL_GPIO_N << GAFR1_L_OFFSET(pin));
-
-               if (dir)
-                       GPDR1 &= ~(1 << GPDR1_OFFSET(pin));
-               else
-                       GPDR1 |= (1 << GPDR1_OFFSET(pin));
-               break;
-       case 3:
-               GAFR1_U &= ~(AF_SEL_GPIO_N << GAFR1_U_OFFSET(pin));
-
-               if (dir)
-                       GPDR1 &= ~(1 << GPDR1_OFFSET(pin));
-               else
-                       GPDR1 |= (1 << GPDR1_OFFSET(pin));
-               break;
-       default:
-               printk(KERN_ERR "unimplemented\n");
-       }
-}
-
-static void am200_init_gpio_regs(struct metronomefb_par *par)
-{
-       am200_init_gpio_pin(LED_GPIO_PIN, 0);
-       am200_set_gpio_output(LED_GPIO_PIN, 0);
-
-       am200_init_gpio_pin(STDBY_GPIO_PIN, 0);
-       am200_set_gpio_output(STDBY_GPIO_PIN, 0);
-
-       am200_init_gpio_pin(RST_GPIO_PIN, 0);
-       am200_set_gpio_output(RST_GPIO_PIN, 0);
-
-       am200_init_gpio_pin(RDY_GPIO_PIN, 1);
-
-       am200_init_gpio_pin(ERR_GPIO_PIN, 1);
-
-       am200_init_gpio_pin(PCBPWR_GPIO_PIN, 0);
-       am200_set_gpio_output(PCBPWR_GPIO_PIN, 0);
-}
-
-static void am200_disable_lcd_controller(struct metronomefb_par *par)
-{
-       LCSR = 0xffffffff;      /* Clear LCD Status Register */
-       LCCR0 |= LCCR0_DIS;     /* Disable LCD Controller */
-
-       /* we reset and just wait for things to settle */
-       msleep(200);
-}
-
-static void am200_enable_lcd_controller(struct metronomefb_par *par)
-{
-       LCSR = 0xffffffff;
-       FDADR0 = par->metromem_desc_dma;
-       LCCR0 |= LCCR0_ENB;
-}
-
-static void am200_init_lcdc_regs(struct metronomefb_par *par)
-{
-       /* here we do:
-       - disable the lcd controller
-       - setup lcd control registers
-       - setup dma descriptor
-       - reenable lcd controller
-       */
-
-       /* disable the lcd controller */
-       am200_disable_lcd_controller(par);
-
-       /* setup lcd control registers */
-       LCCR0 = LCCR0_LDM | LCCR0_SFM | LCCR0_IUM | LCCR0_EFM | LCCR0_PAS
-               | LCCR0_QDM | LCCR0_BM | LCCR0_OUM;
-
-       LCCR1 = (par->info->var.xres/2 - 1) /* pixels per line */
-               | (27 << 10) /* hsync pulse width - 1 */
-               | (33 << 16) /* eol pixel count */
-               | (33 << 24); /* bol pixel count */
-
-       LCCR2 = (par->info->var.yres - 1) /* lines per panel */
-               | (24 << 10) /* vsync pulse width - 1 */
-               | (2 << 16) /* eof pixel count */
-               | (0 << 24); /* bof pixel count */
-
-       LCCR3 = 2 /* pixel clock divisor */
-               | (24 << 8) /* AC Bias pin freq */
-               | LCCR3_16BPP /* BPP */
-               | LCCR3_PCP;  /* PCP falling edge */
-
-}
-
-static void am200_post_dma_setup(struct metronomefb_par *par)
-{
-       par->metromem_desc->mFDADR0 = par->metromem_desc_dma;
-       par->metromem_desc->mFSADR0 = par->metromem_dma;
-       par->metromem_desc->mFIDR0 = 0;
-       par->metromem_desc->mLDCMD0 = par->info->var.xres
-                                       * par->info->var.yres;
-       am200_enable_lcd_controller(par);
-}
-
-static void am200_free_irq(struct fb_info *info)
-{
-       free_irq(IRQ_GPIO(RDY_GPIO_PIN), info);
-}
-
-static irqreturn_t am200_handle_irq(int irq, void *dev_id)
-{
-       struct fb_info *info = dev_id;
-       struct metronomefb_par *par = info->par;
-
-       wake_up_interruptible(&par->waitq);
-       return IRQ_HANDLED;
-}
-
-static int am200_setup_irq(struct fb_info *info)
-{
-       int retval;
-
-       retval = request_irq(IRQ_GPIO(RDY_GPIO_PIN), am200_handle_irq,
-                               IRQF_DISABLED, "AM200", info);
-       if (retval) {
-               printk(KERN_ERR "am200epd: request_irq failed: %d\n", retval);
-               return retval;
-       }
-
-       return set_irq_type(IRQ_GPIO(RDY_GPIO_PIN), IRQ_TYPE_EDGE_FALLING);
-}
-
-static void am200_set_rst(struct metronomefb_par *par, int state)
-{
-       am200_set_gpio_output(RST_GPIO_PIN, state);
-}
-
-static void am200_set_stdby(struct metronomefb_par *par, int state)
-{
-       am200_set_gpio_output(STDBY_GPIO_PIN, state);
-}
-
-static int am200_wait_event(struct metronomefb_par *par)
-{
-       return wait_event_timeout(par->waitq, (GPLR1 & 0x01), HZ);
-}
-
-static int am200_wait_event_intr(struct metronomefb_par *par)
-{
-       return wait_event_interruptible_timeout(par->waitq, (GPLR1 & 0x01), HZ);
-}
-
-static struct metronome_board am200_board = {
-       .owner                  = THIS_MODULE,
-       .free_irq               = am200_free_irq,
-       .setup_irq              = am200_setup_irq,
-       .init_gpio_regs         = am200_init_gpio_regs,
-       .init_lcdc_regs         = am200_init_lcdc_regs,
-       .post_dma_setup         = am200_post_dma_setup,
-       .set_rst                = am200_set_rst,
-       .set_stdby              = am200_set_stdby,
-       .met_wait_event         = am200_wait_event,
-       .met_wait_event_intr    = am200_wait_event_intr,
-};
-
-static struct platform_device *am200_device;
-
-static int __init am200_init(void)
-{
-       int ret;
-
-       /* request our platform independent driver */
-       request_module("metronomefb");
-
-       am200_device = platform_device_alloc("metronomefb", -1);
-       if (!am200_device)
-               return -ENOMEM;
-
-       platform_device_add_data(am200_device, &am200_board,
-                                       sizeof(am200_board));
-
-       /* this _add binds metronomefb to am200. metronomefb refcounts am200 */
-       ret = platform_device_add(am200_device);
-
-       if (ret)
-               platform_device_put(am200_device);
-
-       return ret;
-}
-
-static void __exit am200_exit(void)
-{
-       platform_device_unregister(am200_device);
-}
-
-module_init(am200_init);
-module_exit(am200_exit);
-
-MODULE_DESCRIPTION("board driver for am200 metronome epd kit");
-MODULE_AUTHOR("Jaya Kumar");
-MODULE_LICENSE("GPL");
index 75dac578104f5e2808e8b4439c5a3abd4f004c66..d38fd5217422f8de3e3b97ecbd5cbd65056a0977 100644 (file)
@@ -408,6 +408,10 @@ static int atmel_lcdfb_check_var(struct fb_var_screeninfo *var,
                        var->red.offset = 11;
                        var->blue.offset = 0;
                        var->green.length = 6;
+               } else if (sinfo->lcd_wiring_mode == ATMEL_LCDC_WIRING_RGB555) {
+                       var->red.offset = 10;
+                       var->blue.offset = 0;
+                       var->green.length = 5;
                } else {
                        /* BGR:555 mode */
                        var->red.offset = 0;
index 452b770d8cc9a51f8c32261eb4247f14e515ab48..c72a13562954d2d404bea84f810fc1d1a590dd4d 100644 (file)
@@ -24,6 +24,13 @@ config LCD_CLASS_DEVICE
          To have support for your specific LCD panel you will have to
          select the proper drivers which depend on this option.
 
+config LCD_CORGI
+       tristate "LCD Panel support for SHARP corgi/spitz model"
+       depends on LCD_CLASS_DEVICE && SPI_MASTER && PXA_SHARPSL
+       help
+         Say y here to support the LCD panels usually found on SHARP
+         corgi (C7x0) and spitz (Cxx00) models.
+
 config LCD_LTV350QV
        tristate "Samsung LTV350QV LCD Panel"
        depends on LCD_CLASS_DEVICE && SPI_MASTER
@@ -44,6 +51,14 @@ config LCD_ILI9320
          If you have a panel based on the ILI9320 controller chip
          then say y to include a power driver for it.
 
+config LCD_TDO24M
+       tristate "Toppoly TDO24M LCD Panels support"
+       depends on LCD_CLASS_DEVICE && SPI_MASTER
+       default n
+       help
+         If you have a Toppoly TDO24M series LCD panel, say y here to
+         include the support for it.
+
 config LCD_VGG2432A4
        tristate "VGG2432A4 LCM device support"
        depends on BACKLIGHT_LCD_SUPPORT && LCD_CLASS_DEVICE && SPI_MASTER
index b405aace803fe829a1e82192215926b3a1733753..3ec551eb472ce6d46c0a446f22badd1eda586def 100644 (file)
@@ -1,10 +1,12 @@
 # Backlight & LCD drivers
 
 obj-$(CONFIG_LCD_CLASS_DEVICE)     += lcd.o
+obj-$(CONFIG_LCD_CORGI)                   += corgi_lcd.o
 obj-$(CONFIG_LCD_LTV350QV)        += ltv350qv.o
 obj-$(CONFIG_LCD_ILI9320)         += ili9320.o
 obj-$(CONFIG_LCD_PLATFORM)        += platform_lcd.o
 obj-$(CONFIG_LCD_VGG2432A4)       += vgg2432a4.o
+obj-$(CONFIG_LCD_TDO24M)          += tdo24m.o
 
 obj-$(CONFIG_BACKLIGHT_CLASS_DEVICE) += backlight.o
 obj-$(CONFIG_BACKLIGHT_ATMEL_PWM)    += atmel-pwm-bl.o
diff --git a/drivers/video/backlight/corgi_lcd.c b/drivers/video/backlight/corgi_lcd.c
new file mode 100644 (file)
index 0000000..2afd47e
--- /dev/null
@@ -0,0 +1,641 @@
+/*
+ *  LCD/Backlight Driver for Sharp Zaurus Handhelds (various models)
+ *
+ *  Copyright (c) 2004-2006 Richard Purdie
+ *
+ *  Based on Sharp's 2.4 Backlight Driver
+ *
+ *  Copyright (c) 2008 Marvell International Ltd.
+ *     Converted to SPI device based LCD/Backlight device driver
+ *     by Eric Miao <eric.miao@marvell.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/module.h>
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/delay.h>
+#include <linux/gpio.h>
+#include <linux/fb.h>
+#include <linux/lcd.h>
+#include <linux/spi/spi.h>
+#include <linux/spi/corgi_lcd.h>
+#include <asm/mach/sharpsl_param.h>
+
+#define POWER_IS_ON(pwr)       ((pwr) <= FB_BLANK_NORMAL)
+
+/* Register Addresses */
+#define RESCTL_ADRS     0x00
+#define PHACTRL_ADRS    0x01
+#define DUTYCTRL_ADRS   0x02
+#define POWERREG0_ADRS  0x03
+#define POWERREG1_ADRS  0x04
+#define GPOR3_ADRS      0x05
+#define PICTRL_ADRS     0x06
+#define POLCTRL_ADRS    0x07
+
+/* Register Bit Definitions */
+#define RESCTL_QVGA     0x01
+#define RESCTL_VGA      0x00
+
+#define POWER1_VW_ON    0x01  /* VW Supply FET ON */
+#define POWER1_GVSS_ON  0x02  /* GVSS(-8V) Power Supply ON */
+#define POWER1_VDD_ON   0x04  /* VDD(8V),SVSS(-4V) Power Supply ON */
+
+#define POWER1_VW_OFF   0x00  /* VW Supply FET OFF */
+#define POWER1_GVSS_OFF 0x00  /* GVSS(-8V) Power Supply OFF */
+#define POWER1_VDD_OFF  0x00  /* VDD(8V),SVSS(-4V) Power Supply OFF */
+
+#define POWER0_COM_DCLK 0x01  /* COM Voltage DC Bias DAC Serial Data Clock */
+#define POWER0_COM_DOUT 0x02  /* COM Voltage DC Bias DAC Serial Data Out */
+#define POWER0_DAC_ON   0x04  /* DAC Power Supply ON */
+#define POWER0_COM_ON   0x08  /* COM Power Supply ON */
+#define POWER0_VCC5_ON  0x10  /* VCC5 Power Supply ON */
+
+#define POWER0_DAC_OFF  0x00  /* DAC Power Supply OFF */
+#define POWER0_COM_OFF  0x00  /* COM Power Supply OFF */
+#define POWER0_VCC5_OFF 0x00  /* VCC5 Power Supply OFF */
+
+#define PICTRL_INIT_STATE      0x01
+#define PICTRL_INIOFF          0x02
+#define PICTRL_POWER_DOWN      0x04
+#define PICTRL_COM_SIGNAL_OFF  0x08
+#define PICTRL_DAC_SIGNAL_OFF  0x10
+
+#define POLCTRL_SYNC_POL_FALL  0x01
+#define POLCTRL_EN_POL_FALL    0x02
+#define POLCTRL_DATA_POL_FALL  0x04
+#define POLCTRL_SYNC_ACT_H     0x08
+#define POLCTRL_EN_ACT_L       0x10
+
+#define POLCTRL_SYNC_POL_RISE  0x00
+#define POLCTRL_EN_POL_RISE    0x00
+#define POLCTRL_DATA_POL_RISE  0x00
+#define POLCTRL_SYNC_ACT_L     0x00
+#define POLCTRL_EN_ACT_H       0x00
+
+#define PHACTRL_PHASE_MANUAL   0x01
+#define DEFAULT_PHAD_QVGA     (9)
+#define DEFAULT_COMADJ        (125)
+
+struct corgi_lcd {
+       struct spi_device       *spi_dev;
+       struct lcd_device       *lcd_dev;
+       struct backlight_device *bl_dev;
+
+       int     limit_mask;
+       int     intensity;
+       int     power;
+       int     mode;
+       char    buf[2];
+
+       int     gpio_backlight_on;
+       int     gpio_backlight_cont;
+       int     gpio_backlight_cont_inverted;
+
+       void (*kick_battery)(void);
+};
+
+static int corgi_ssp_lcdtg_send(struct corgi_lcd *lcd, int reg, uint8_t val);
+
+static struct corgi_lcd *the_corgi_lcd;
+static unsigned long corgibl_flags;
+#define CORGIBL_SUSPENDED     0x01
+#define CORGIBL_BATTLOW       0x02
+
+/*
+ * This is only a psuedo I2C interface. We can't use the standard kernel
+ * routines as the interface is write only. We just assume the data is acked...
+ */
+static void lcdtg_ssp_i2c_send(struct corgi_lcd *lcd, uint8_t data)
+{
+       corgi_ssp_lcdtg_send(lcd, POWERREG0_ADRS, data);
+       udelay(10);
+}
+
+static void lcdtg_i2c_send_bit(struct corgi_lcd *lcd, uint8_t data)
+{
+       lcdtg_ssp_i2c_send(lcd, data);
+       lcdtg_ssp_i2c_send(lcd, data | POWER0_COM_DCLK);
+       lcdtg_ssp_i2c_send(lcd, data);
+}
+
+static void lcdtg_i2c_send_start(struct corgi_lcd *lcd, uint8_t base)
+{
+       lcdtg_ssp_i2c_send(lcd, base | POWER0_COM_DCLK | POWER0_COM_DOUT);
+       lcdtg_ssp_i2c_send(lcd, base | POWER0_COM_DCLK);
+       lcdtg_ssp_i2c_send(lcd, base);
+}
+
+static void lcdtg_i2c_send_stop(struct corgi_lcd *lcd, uint8_t base)
+{
+       lcdtg_ssp_i2c_send(lcd, base);
+       lcdtg_ssp_i2c_send(lcd, base | POWER0_COM_DCLK);
+       lcdtg_ssp_i2c_send(lcd, base | POWER0_COM_DCLK | POWER0_COM_DOUT);
+}
+
+static void lcdtg_i2c_send_byte(struct corgi_lcd *lcd,
+                               uint8_t base, uint8_t data)
+{
+       int i;
+       for (i = 0; i < 8; i++) {
+               if (data & 0x80)
+                       lcdtg_i2c_send_bit(lcd, base | POWER0_COM_DOUT);
+               else
+                       lcdtg_i2c_send_bit(lcd, base);
+               data <<= 1;
+       }
+}
+
+static void lcdtg_i2c_wait_ack(struct corgi_lcd *lcd, uint8_t base)
+{
+       lcdtg_i2c_send_bit(lcd, base);
+}
+
+static void lcdtg_set_common_voltage(struct corgi_lcd *lcd,
+                                    uint8_t base_data, uint8_t data)
+{
+       /* Set Common Voltage to M62332FP via I2C */
+       lcdtg_i2c_send_start(lcd, base_data);
+       lcdtg_i2c_send_byte(lcd, base_data, 0x9c);
+       lcdtg_i2c_wait_ack(lcd, base_data);
+       lcdtg_i2c_send_byte(lcd, base_data, 0x00);
+       lcdtg_i2c_wait_ack(lcd, base_data);
+       lcdtg_i2c_send_byte(lcd, base_data, data);
+       lcdtg_i2c_wait_ack(lcd, base_data);
+       lcdtg_i2c_send_stop(lcd, base_data);
+}
+
+static int corgi_ssp_lcdtg_send(struct corgi_lcd *lcd, int adrs, uint8_t data)
+{
+       struct spi_message msg;
+       struct spi_transfer xfer = {
+               .len            = 1,
+               .cs_change      = 1,
+               .tx_buf         = lcd->buf,
+       };
+
+       lcd->buf[0] = ((adrs & 0x07) << 5) | (data & 0x1f);
+       spi_message_init(&msg);
+       spi_message_add_tail(&xfer, &msg);
+
+       return spi_sync(lcd->spi_dev, &msg);
+}
+
+/* Set Phase Adjust */
+static void lcdtg_set_phadadj(struct corgi_lcd *lcd, int mode)
+{
+       int adj;
+
+       switch(mode) {
+       case CORGI_LCD_MODE_VGA:
+               /* Setting for VGA */
+               adj = sharpsl_param.phadadj;
+               adj = (adj < 0) ? PHACTRL_PHASE_MANUAL :
+                                 PHACTRL_PHASE_MANUAL | ((adj & 0xf) << 1);
+               break;
+       case CORGI_LCD_MODE_QVGA:
+       default:
+               /* Setting for QVGA */
+               adj = (DEFAULT_PHAD_QVGA << 1) | PHACTRL_PHASE_MANUAL;
+               break;
+       }
+
+       corgi_ssp_lcdtg_send(lcd, PHACTRL_ADRS, adj);
+}
+
+static void corgi_lcd_power_on(struct corgi_lcd *lcd)
+{
+       int comadj;
+
+       /* Initialize Internal Logic & Port */
+       corgi_ssp_lcdtg_send(lcd, PICTRL_ADRS,
+                       PICTRL_POWER_DOWN | PICTRL_INIOFF |
+                       PICTRL_INIT_STATE | PICTRL_COM_SIGNAL_OFF |
+                       PICTRL_DAC_SIGNAL_OFF);
+
+       corgi_ssp_lcdtg_send(lcd, POWERREG0_ADRS,
+                       POWER0_COM_DCLK | POWER0_COM_DOUT | POWER0_DAC_OFF |
+                       POWER0_COM_OFF | POWER0_VCC5_OFF);
+
+       corgi_ssp_lcdtg_send(lcd, POWERREG1_ADRS,
+                       POWER1_VW_OFF | POWER1_GVSS_OFF | POWER1_VDD_OFF);
+
+       /* VDD(+8V), SVSS(-4V) ON */
+       corgi_ssp_lcdtg_send(lcd, POWERREG1_ADRS,
+                       POWER1_VW_OFF | POWER1_GVSS_OFF | POWER1_VDD_ON);
+       mdelay(3);
+
+       /* DAC ON */
+       corgi_ssp_lcdtg_send(lcd, POWERREG0_ADRS,
+                       POWER0_COM_DCLK | POWER0_COM_DOUT | POWER0_DAC_ON |
+                       POWER0_COM_OFF | POWER0_VCC5_OFF);
+
+       /* INIB = H, INI = L  */
+       /* PICTL[0] = H , PICTL[1] = PICTL[2] = PICTL[4] = L */
+       corgi_ssp_lcdtg_send(lcd, PICTRL_ADRS,
+                       PICTRL_INIT_STATE | PICTRL_COM_SIGNAL_OFF);
+
+       /* Set Common Voltage */
+       comadj = sharpsl_param.comadj;
+       if (comadj < 0)
+               comadj = DEFAULT_COMADJ;
+
+       lcdtg_set_common_voltage(lcd, POWER0_DAC_ON | POWER0_COM_OFF |
+                                POWER0_VCC5_OFF, comadj);
+
+       /* VCC5 ON, DAC ON */
+       corgi_ssp_lcdtg_send(lcd, POWERREG0_ADRS,
+                       POWER0_COM_DCLK | POWER0_COM_DOUT | POWER0_DAC_ON |
+                       POWER0_COM_OFF | POWER0_VCC5_ON);
+
+       /* GVSS(-8V) ON, VDD ON */
+       corgi_ssp_lcdtg_send(lcd, POWERREG1_ADRS,
+                       POWER1_VW_OFF | POWER1_GVSS_ON | POWER1_VDD_ON);
+       mdelay(2);
+
+       /* COM SIGNAL ON (PICTL[3] = L) */
+       corgi_ssp_lcdtg_send(lcd, PICTRL_ADRS, PICTRL_INIT_STATE);
+
+       /* COM ON, DAC ON, VCC5_ON */
+       corgi_ssp_lcdtg_send(lcd, POWERREG0_ADRS,
+                       POWER0_COM_DCLK | POWER0_COM_DOUT | POWER0_DAC_ON |
+                       POWER0_COM_ON | POWER0_VCC5_ON);
+
+       /* VW ON, GVSS ON, VDD ON */
+       corgi_ssp_lcdtg_send(lcd, POWERREG1_ADRS,
+                       POWER1_VW_ON | POWER1_GVSS_ON | POWER1_VDD_ON);
+
+       /* Signals output enable */
+       corgi_ssp_lcdtg_send(lcd, PICTRL_ADRS, 0);
+
+       /* Set Phase Adjust */
+       lcdtg_set_phadadj(lcd, lcd->mode);
+
+       /* Initialize for Input Signals from ATI */
+       corgi_ssp_lcdtg_send(lcd, POLCTRL_ADRS,
+                       POLCTRL_SYNC_POL_RISE | POLCTRL_EN_POL_RISE |
+                       POLCTRL_DATA_POL_RISE | POLCTRL_SYNC_ACT_L |
+                       POLCTRL_EN_ACT_H);
+       udelay(1000);
+
+       switch (lcd->mode) {
+       case CORGI_LCD_MODE_VGA:
+               corgi_ssp_lcdtg_send(lcd, RESCTL_ADRS, RESCTL_VGA);
+               break;
+       case CORGI_LCD_MODE_QVGA:
+       default:
+               corgi_ssp_lcdtg_send(lcd, RESCTL_ADRS, RESCTL_QVGA);
+               break;
+       }
+}
+
+static void corgi_lcd_power_off(struct corgi_lcd *lcd)
+{
+       /* 60Hz x 2 frame = 16.7msec x 2 = 33.4 msec */
+       msleep(34);
+
+       /* (1)VW OFF */
+       corgi_ssp_lcdtg_send(lcd, POWERREG1_ADRS,
+                       POWER1_VW_OFF | POWER1_GVSS_ON | POWER1_VDD_ON);
+
+       /* (2)COM OFF */
+       corgi_ssp_lcdtg_send(lcd, PICTRL_ADRS, PICTRL_COM_SIGNAL_OFF);
+       corgi_ssp_lcdtg_send(lcd, POWERREG0_ADRS,
+                       POWER0_DAC_ON | POWER0_COM_OFF | POWER0_VCC5_ON);
+
+       /* (3)Set Common Voltage Bias 0V */
+       lcdtg_set_common_voltage(lcd, POWER0_DAC_ON | POWER0_COM_OFF |
+                       POWER0_VCC5_ON, 0);
+
+       /* (4)GVSS OFF */
+       corgi_ssp_lcdtg_send(lcd, POWERREG1_ADRS,
+                       POWER1_VW_OFF | POWER1_GVSS_OFF | POWER1_VDD_ON);
+
+       /* (5)VCC5 OFF */
+       corgi_ssp_lcdtg_send(lcd, POWERREG0_ADRS,
+                       POWER0_DAC_ON | POWER0_COM_OFF | POWER0_VCC5_OFF);
+
+       /* (6)Set PDWN, INIOFF, DACOFF */
+       corgi_ssp_lcdtg_send(lcd, PICTRL_ADRS,
+                       PICTRL_INIOFF | PICTRL_DAC_SIGNAL_OFF |
+                       PICTRL_POWER_DOWN | PICTRL_COM_SIGNAL_OFF);
+
+       /* (7)DAC OFF */
+       corgi_ssp_lcdtg_send(lcd, POWERREG0_ADRS,
+                       POWER0_DAC_OFF | POWER0_COM_OFF | POWER0_VCC5_OFF);
+
+       /* (8)VDD OFF */
+       corgi_ssp_lcdtg_send(lcd, POWERREG1_ADRS,
+                       POWER1_VW_OFF | POWER1_GVSS_OFF | POWER1_VDD_OFF);
+}
+
+static int corgi_lcd_set_mode(struct lcd_device *ld, struct fb_videomode *m)
+{
+       struct corgi_lcd *lcd = dev_get_drvdata(&ld->dev);
+       int mode = CORGI_LCD_MODE_QVGA;
+
+       if (m->xres == 640 || m->xres == 480)
+               mode = CORGI_LCD_MODE_VGA;
+
+       if (lcd->mode == mode)
+               return 0;
+
+       lcdtg_set_phadadj(lcd, mode);
+
+       switch (mode) {
+       case CORGI_LCD_MODE_VGA:
+               corgi_ssp_lcdtg_send(lcd, RESCTL_ADRS, RESCTL_VGA);
+               break;
+       case CORGI_LCD_MODE_QVGA:
+       default:
+               corgi_ssp_lcdtg_send(lcd, RESCTL_ADRS, RESCTL_QVGA);
+               break;
+       }
+
+       lcd->mode = mode;
+       return 0;
+}
+
+static int corgi_lcd_set_power(struct lcd_device *ld, int power)
+{
+       struct corgi_lcd *lcd = dev_get_drvdata(&ld->dev);
+
+       if (POWER_IS_ON(power) && !POWER_IS_ON(lcd->power))
+               corgi_lcd_power_on(lcd);
+
+       if (!POWER_IS_ON(power) && POWER_IS_ON(lcd->power))
+               corgi_lcd_power_off(lcd);
+
+       lcd->power = power;
+       return 0;
+}
+
+static int corgi_lcd_get_power(struct lcd_device *ld)
+{
+       struct corgi_lcd *lcd = dev_get_drvdata(&ld->dev);
+
+       return lcd->power;
+}
+
+static struct lcd_ops corgi_lcd_ops = {
+       .get_power      = corgi_lcd_get_power,
+       .set_power      = corgi_lcd_set_power,
+       .set_mode       = corgi_lcd_set_mode,
+};
+
+static int corgi_bl_get_intensity(struct backlight_device *bd)
+{
+       struct corgi_lcd *lcd = dev_get_drvdata(&bd->dev);
+
+       return lcd->intensity;
+}
+
+static int corgi_bl_set_intensity(struct corgi_lcd *lcd, int intensity)
+{
+       int cont;
+
+       if (intensity > 0x10)
+               intensity += 0x10;
+
+       corgi_ssp_lcdtg_send(lcd, DUTYCTRL_ADRS, intensity);
+
+       /* Bit 5 via GPIO_BACKLIGHT_CONT */
+       cont = !!(intensity & 0x20) ^ lcd->gpio_backlight_cont_inverted;
+
+       if (gpio_is_valid(lcd->gpio_backlight_cont))
+               gpio_set_value(lcd->gpio_backlight_cont, cont);
+
+       if (gpio_is_valid(lcd->gpio_backlight_on))
+               gpio_set_value(lcd->gpio_backlight_on, intensity);
+
+       if (lcd->kick_battery)
+               lcd->kick_battery();
+
+       lcd->intensity = intensity;
+       return 0;
+}
+
+static int corgi_bl_update_status(struct backlight_device *bd)
+{
+       struct corgi_lcd *lcd = dev_get_drvdata(&bd->dev);
+       int intensity = bd->props.brightness;
+
+       if (bd->props.power != FB_BLANK_UNBLANK)
+               intensity = 0;
+
+       if (bd->props.fb_blank != FB_BLANK_UNBLANK)
+               intensity = 0;
+
+       if (corgibl_flags & CORGIBL_SUSPENDED)
+               intensity = 0;
+       if (corgibl_flags & CORGIBL_BATTLOW)
+               intensity &= lcd->limit_mask;
+
+       return corgi_bl_set_intensity(lcd, intensity);
+}
+
+void corgibl_limit_intensity(int limit)
+{
+       if (limit)
+               corgibl_flags |= CORGIBL_BATTLOW;
+       else
+               corgibl_flags &= ~CORGIBL_BATTLOW;
+
+       backlight_update_status(the_corgi_lcd->bl_dev);
+}
+EXPORT_SYMBOL(corgibl_limit_intensity);
+
+static struct backlight_ops corgi_bl_ops = {
+       .get_brightness = corgi_bl_get_intensity,
+       .update_status  = corgi_bl_update_status,
+};
+
+#ifdef CONFIG_PM
+static int corgi_lcd_suspend(struct spi_device *spi, pm_message_t state)
+{
+       struct corgi_lcd *lcd = dev_get_drvdata(&spi->dev);
+
+       corgibl_flags |= CORGIBL_SUSPENDED;
+       corgi_bl_set_intensity(lcd, 0);
+       corgi_lcd_set_power(lcd->lcd_dev, FB_BLANK_POWERDOWN);
+       return 0;
+}
+
+static int corgi_lcd_resume(struct spi_device *spi)
+{
+       struct corgi_lcd *lcd = dev_get_drvdata(&spi->dev);
+
+       corgibl_flags &= ~CORGIBL_SUSPENDED;
+       corgi_lcd_set_power(lcd->lcd_dev, FB_BLANK_UNBLANK);
+       backlight_update_status(lcd->bl_dev);
+       return 0;
+}
+#else
+#define corgi_lcd_suspend      NULL
+#define corgi_lcd_resume       NULL
+#endif
+
+static int setup_gpio_backlight(struct corgi_lcd *lcd,
+                               struct corgi_lcd_platform_data *pdata)
+{
+       struct spi_device *spi = lcd->spi_dev;
+       int err;
+
+       lcd->gpio_backlight_on = -1;
+       lcd->gpio_backlight_cont = -1;
+
+       if (gpio_is_valid(pdata->gpio_backlight_on)) {
+               err = gpio_request(pdata->gpio_backlight_on, "BL_ON");
+               if (err) {
+                       dev_err(&spi->dev, "failed to request GPIO%d for "
+                               "backlight_on\n", pdata->gpio_backlight_on);
+                       return err;
+               }
+
+               lcd->gpio_backlight_on = pdata->gpio_backlight_on;
+               gpio_direction_output(lcd->gpio_backlight_on, 0);
+       }
+
+       if (gpio_is_valid(pdata->gpio_backlight_cont)) {
+               err = gpio_request(pdata->gpio_backlight_cont, "BL_CONT");
+               if (err) {
+                       dev_err(&spi->dev, "failed to request GPIO%d for "
+                               "backlight_cont\n", pdata->gpio_backlight_cont);
+                       goto err_free_backlight_on;
+               }
+
+               lcd->gpio_backlight_cont = pdata->gpio_backlight_cont;
+
+               /* spitz and akita use both GPIOs for backlight, and
+                * have inverted polarity of GPIO_BACKLIGHT_CONT
+                */
+               if (gpio_is_valid(lcd->gpio_backlight_on)) {
+                       lcd->gpio_backlight_cont_inverted = 1;
+                       gpio_direction_output(lcd->gpio_backlight_cont, 1);
+               } else {
+                       lcd->gpio_backlight_cont_inverted = 0;
+                       gpio_direction_output(lcd->gpio_backlight_cont, 0);
+               }
+       }
+       return 0;
+
+err_free_backlight_on:
+       if (gpio_is_valid(lcd->gpio_backlight_on))
+               gpio_free(lcd->gpio_backlight_on);
+       return err;
+}
+
+static int __devinit corgi_lcd_probe(struct spi_device *spi)
+{
+       struct corgi_lcd_platform_data *pdata = spi->dev.platform_data;
+       struct corgi_lcd *lcd;
+       int ret = 0;
+
+       if (pdata == NULL) {
+               dev_err(&spi->dev, "platform data not available\n");
+               return -EINVAL;
+       }
+
+       lcd = kzalloc(sizeof(struct corgi_lcd), GFP_KERNEL);
+       if (!lcd) {
+               dev_err(&spi->dev, "failed to allocate memory\n");
+               return -ENOMEM;
+       }
+
+       lcd->spi_dev = spi;
+
+       lcd->lcd_dev = lcd_device_register("corgi_lcd", &spi->dev,
+                                       lcd, &corgi_lcd_ops);
+       if (IS_ERR(lcd->lcd_dev)) {
+               ret = PTR_ERR(lcd->lcd_dev);
+               goto err_free_lcd;
+       }
+       lcd->power = FB_BLANK_POWERDOWN;
+       lcd->mode = (pdata) ? pdata->init_mode : CORGI_LCD_MODE_VGA;
+
+       lcd->bl_dev = backlight_device_register("corgi_bl", &spi->dev,
+                                       lcd, &corgi_bl_ops);
+       if (IS_ERR(lcd->bl_dev)) {
+               ret = PTR_ERR(lcd->bl_dev);
+               goto err_unregister_lcd;
+       }
+       lcd->bl_dev->props.max_brightness = pdata->max_intensity;
+       lcd->bl_dev->props.brightness = pdata->default_intensity;
+       lcd->bl_dev->props.power = FB_BLANK_UNBLANK;
+
+       ret = setup_gpio_backlight(lcd, pdata);
+       if (ret)
+               goto err_unregister_bl;
+
+       lcd->kick_battery = pdata->kick_battery;
+
+       dev_set_drvdata(&spi->dev, lcd);
+       corgi_lcd_set_power(lcd->lcd_dev, FB_BLANK_UNBLANK);
+       backlight_update_status(lcd->bl_dev);
+
+       lcd->limit_mask = pdata->limit_mask;
+       the_corgi_lcd = lcd;
+       return 0;
+
+err_unregister_bl:
+       backlight_device_unregister(lcd->bl_dev);
+err_unregister_lcd:
+       lcd_device_unregister(lcd->lcd_dev);
+err_free_lcd:
+       kfree(lcd);
+       return ret;
+}
+
+static int __devexit corgi_lcd_remove(struct spi_device *spi)
+{
+       struct corgi_lcd *lcd = dev_get_drvdata(&spi->dev);
+
+       lcd->bl_dev->props.power = FB_BLANK_UNBLANK;
+       lcd->bl_dev->props.brightness = 0;
+       backlight_update_status(lcd->bl_dev);
+       backlight_device_unregister(lcd->bl_dev);
+
+       if (gpio_is_valid(lcd->gpio_backlight_on))
+               gpio_free(lcd->gpio_backlight_on);
+
+       if (gpio_is_valid(lcd->gpio_backlight_cont))
+               gpio_free(lcd->gpio_backlight_cont);
+
+       corgi_lcd_set_power(lcd->lcd_dev, FB_BLANK_POWERDOWN);
+       lcd_device_unregister(lcd->lcd_dev);
+       kfree(lcd);
+
+       return 0;
+}
+
+static struct spi_driver corgi_lcd_driver = {
+       .driver         = {
+               .name   = "corgi-lcd",
+               .owner  = THIS_MODULE,
+       },
+       .probe          = corgi_lcd_probe,
+       .remove         = __devexit_p(corgi_lcd_remove),
+       .suspend        = corgi_lcd_suspend,
+       .resume         = corgi_lcd_resume,
+};
+
+static int __init corgi_lcd_init(void)
+{
+       return spi_register_driver(&corgi_lcd_driver);
+}
+module_init(corgi_lcd_init);
+
+static void __exit corgi_lcd_exit(void)
+{
+       spi_unregister_driver(&corgi_lcd_driver);
+}
+module_exit(corgi_lcd_exit);
+
+MODULE_DESCRIPTION("LCD and backlight driver for SHARP C7x0/Cxx00");
+MODULE_AUTHOR("Eric Miao <eric.miao@marvell.com>");
+MODULE_LICENSE("GPL");
index b15b2b84a6f7c951e809391f1cae019a4584af1e..8e1731d3b2283e311bcad1d6f10475901467cda2 100644 (file)
@@ -27,14 +27,26 @@ static int fb_notifier_callback(struct notifier_block *self,
        struct fb_event *evdata = data;
 
        /* If we aren't interested in this event, skip it immediately ... */
-       if (event != FB_EVENT_BLANK)
+       switch (event) {
+       case FB_EVENT_BLANK:
+       case FB_EVENT_MODE_CHANGE:
+       case FB_EVENT_MODE_CHANGE_ALL:
+               break;
+       default:
                return 0;
+       }
 
        ld = container_of(self, struct lcd_device, fb_notif);
+       if (!ld->ops)
+               return 0;
+
        mutex_lock(&ld->ops_lock);
-       if (ld->ops)
-               if (!ld->ops->check_fb || ld->ops->check_fb(ld, evdata->info))
+       if (!ld->ops->check_fb || ld->ops->check_fb(ld, evdata->info)) {
+               if (event == FB_EVENT_BLANK)
                        ld->ops->set_power(ld, *(int *)evdata->data);
+               else
+                       ld->ops->set_mode(ld, evdata->data);
+       }
        mutex_unlock(&ld->ops_lock);
        return 0;
 }
diff --git a/drivers/video/backlight/tdo24m.c b/drivers/video/backlight/tdo24m.c
new file mode 100644 (file)
index 0000000..8427669
--- /dev/null
@@ -0,0 +1,396 @@
+/*
+ * tdo24m - SPI-based drivers for Toppoly TDO24M series LCD panels
+ *
+ * Copyright (C) 2008 Marvell International Ltd.
+ *     Eric Miao <eric.miao@marvell.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
+ *  publishhed by the Free Software Foundation.
+ */
+
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/device.h>
+#include <linux/spi/spi.h>
+#include <linux/fb.h>
+#include <linux/lcd.h>
+
+#define POWER_IS_ON(pwr)       ((pwr) <= FB_BLANK_NORMAL)
+
+#define TDO24M_SPI_BUFF_SIZE   (4)
+#define MODE_QVGA      0
+#define MODE_VGA       1
+
+struct tdo24m {
+       struct spi_device       *spi_dev;
+       struct lcd_device       *lcd_dev;
+
+       struct spi_message      msg;
+       struct spi_transfer     xfer;
+       uint8_t                 *buf;
+
+       int                     power;
+       int                     mode;
+};
+
+/* use bit 30, 31 as the indicator of command parameter number */
+#define CMD0(x)                ((0 << 30) | (x))
+#define CMD1(x, x1)    ((1 << 30) | ((x) << 9) | 0x100 | (x1))
+#define CMD2(x, x1, x2)        ((2 << 30) | ((x) << 18) | 0x20000 |\
+                       ((x1) << 9) | 0x100 | (x2))
+#define CMD_NULL       (-1)
+
+static uint32_t lcd_panel_reset[] = {
+       CMD0(0x1), /* reset */
+       CMD0(0x0), /* nop */
+       CMD0(0x0), /* nop */
+       CMD0(0x0), /* nop */
+       CMD_NULL,
+};
+
+static uint32_t lcd_panel_on[] = {
+       CMD0(0x29),             /* Display ON */
+       CMD2(0xB8, 0xFF, 0xF9), /* Output Control */
+       CMD0(0x11),             /* Sleep out */
+       CMD1(0xB0, 0x16),       /* Wake */
+       CMD_NULL,
+};
+
+static uint32_t lcd_panel_off[] = {
+       CMD0(0x28),             /* Display OFF */
+       CMD2(0xB8, 0x80, 0x02), /* Output Control */
+       CMD0(0x10),             /* Sleep in */
+       CMD1(0xB0, 0x00),       /* Deep stand by in */
+       CMD_NULL,
+};
+
+static uint32_t lcd_vga_pass_through[] = {
+       CMD1(0xB0, 0x16),
+       CMD1(0xBC, 0x80),
+       CMD1(0xE1, 0x00),
+       CMD1(0x36, 0x50),
+       CMD1(0x3B, 0x00),
+       CMD_NULL,
+};
+
+static uint32_t lcd_qvga_pass_through[] = {
+       CMD1(0xB0, 0x16),
+       CMD1(0xBC, 0x81),
+       CMD1(0xE1, 0x00),
+       CMD1(0x36, 0x50),
+       CMD1(0x3B, 0x22),
+       CMD_NULL,
+};
+
+static uint32_t lcd_vga_transfer[] = {
+       CMD1(0xcf, 0x02),       /* Blanking period control (1) */
+       CMD2(0xd0, 0x08, 0x04), /* Blanking period control (2) */
+       CMD1(0xd1, 0x01),       /* CKV timing control on/off */
+       CMD2(0xd2, 0x14, 0x00), /* CKV 1,2 timing control */
+       CMD2(0xd3, 0x1a, 0x0f), /* OEV timing control */
+       CMD2(0xd4, 0x1f, 0xaf), /* ASW timing control (1) */
+       CMD1(0xd5, 0x14),       /* ASW timing control (2) */
+       CMD0(0x21),             /* Invert for normally black display */
+       CMD0(0x29),             /* Display on */
+       CMD_NULL,
+};
+
+static uint32_t lcd_qvga_transfer[] = {
+       CMD1(0xd6, 0x02),       /* Blanking period control (1) */
+       CMD2(0xd7, 0x08, 0x04), /* Blanking period control (2) */
+       CMD1(0xd8, 0x01),       /* CKV timing control on/off */
+       CMD2(0xd9, 0x00, 0x08), /* CKV 1,2 timing control */
+       CMD2(0xde, 0x05, 0x0a), /* OEV timing control */
+       CMD2(0xdf, 0x0a, 0x19), /* ASW timing control (1) */
+       CMD1(0xe0, 0x0a),       /* ASW timing control (2) */
+       CMD0(0x21),             /* Invert for normally black display */
+       CMD0(0x29),             /* Display on */
+       CMD_NULL,
+};
+
+static uint32_t lcd_panel_config[] = {
+       CMD2(0xb8, 0xff, 0xf9), /* Output control */
+       CMD0(0x11),             /* sleep out */
+       CMD1(0xba, 0x01),       /* Display mode (1) */
+       CMD1(0xbb, 0x00),       /* Display mode (2) */
+       CMD1(0x3a, 0x60),       /* Display mode 18-bit RGB */
+       CMD1(0xbf, 0x10),       /* Drive system change control */
+       CMD1(0xb1, 0x56),       /* Booster operation setup */
+       CMD1(0xb2, 0x33),       /* Booster mode setup */
+       CMD1(0xb3, 0x11),       /* Booster frequency setup */
+       CMD1(0xb4, 0x02),       /* Op amp/system clock */
+       CMD1(0xb5, 0x35),       /* VCS voltage */
+       CMD1(0xb6, 0x40),       /* VCOM voltage */
+       CMD1(0xb7, 0x03),       /* External display signal */
+       CMD1(0xbd, 0x00),       /* ASW slew rate */
+       CMD1(0xbe, 0x00),       /* Dummy data for QuadData operation */
+       CMD1(0xc0, 0x11),       /* Sleep out FR count (A) */
+       CMD1(0xc1, 0x11),       /* Sleep out FR count (B) */
+       CMD1(0xc2, 0x11),       /* Sleep out FR count (C) */
+       CMD2(0xc3, 0x20, 0x40), /* Sleep out FR count (D) */
+       CMD2(0xc4, 0x60, 0xc0), /* Sleep out FR count (E) */
+       CMD2(0xc5, 0x10, 0x20), /* Sleep out FR count (F) */
+       CMD1(0xc6, 0xc0),       /* Sleep out FR count (G) */
+       CMD2(0xc7, 0x33, 0x43), /* Gamma 1 fine tuning (1) */
+       CMD1(0xc8, 0x44),       /* Gamma 1 fine tuning (2) */
+       CMD1(0xc9, 0x33),       /* Gamma 1 inclination adjustment */
+       CMD1(0xca, 0x00),       /* Gamma 1 blue offset adjustment */
+       CMD2(0xec, 0x01, 0xf0), /* Horizontal clock cycles */
+       CMD_NULL,
+};
+
+static int tdo24m_writes(struct tdo24m *lcd, uint32_t *array)
+{
+       struct spi_transfer *x = &lcd->xfer;
+       uint32_t data, *p = array;
+       int nparams, err = 0;
+
+       for (; *p != CMD_NULL; p++) {
+
+               nparams = (*p >> 30) & 0x3;
+
+               data = *p << (7 - nparams);
+               switch (nparams) {
+               case 0:
+                       lcd->buf[0] = (data >> 8) & 0xff;
+                       lcd->buf[1] = data & 0xff;
+                       break;
+               case 1:
+                       lcd->buf[0] = (data >> 16) & 0xff;
+                       lcd->buf[1] = (data >> 8) & 0xff;
+                       lcd->buf[2] = data & 0xff;
+                       break;
+               case 2:
+                       lcd->buf[0] = (data >> 24) & 0xff;
+                       lcd->buf[1] = (data >> 16) & 0xff;
+                       lcd->buf[2] = (data >> 8) & 0xff;
+                       lcd->buf[3] = data & 0xff;
+                       break;
+               default:
+                       continue;
+               }
+               x->len = nparams + 2;
+               err = spi_sync(lcd->spi_dev, &lcd->msg);
+               if (err)
+                       break;
+       }
+
+       return err;
+}
+
+static int tdo24m_adj_mode(struct tdo24m *lcd, int mode)
+{
+       switch (mode) {
+       case MODE_VGA:
+               tdo24m_writes(lcd, lcd_vga_pass_through);
+               tdo24m_writes(lcd, lcd_panel_config);
+               tdo24m_writes(lcd, lcd_vga_transfer);
+               break;
+       case MODE_QVGA:
+               tdo24m_writes(lcd, lcd_qvga_pass_through);
+               tdo24m_writes(lcd, lcd_panel_config);
+               tdo24m_writes(lcd, lcd_qvga_transfer);
+               break;
+       default:
+               return -EINVAL;
+       }
+
+       lcd->mode = mode;
+       return 0;
+}
+
+static int tdo24m_power_on(struct tdo24m *lcd)
+{
+       int err;
+
+       err = tdo24m_writes(lcd, lcd_panel_on);
+       if (err)
+               goto out;
+
+       err = tdo24m_writes(lcd, lcd_panel_reset);
+       if (err)
+               goto out;
+
+       err = tdo24m_adj_mode(lcd, lcd->mode);
+out:
+       return err;
+}
+
+static int tdo24m_power_off(struct tdo24m *lcd)
+{
+       return tdo24m_writes(lcd, lcd_panel_off);
+}
+
+static int tdo24m_power(struct tdo24m *lcd, int power)
+{
+       int ret = 0;
+
+       if (POWER_IS_ON(power) && !POWER_IS_ON(lcd->power))
+               ret = tdo24m_power_on(lcd);
+       else if (!POWER_IS_ON(power) && POWER_IS_ON(lcd->power))
+               ret = tdo24m_power_off(lcd);
+
+       if (!ret)
+               lcd->power = power;
+
+       return ret;
+}
+
+
+static int tdo24m_set_power(struct lcd_device *ld, int power)
+{
+       struct tdo24m *lcd = lcd_get_data(ld);
+       return tdo24m_power(lcd, power);
+}
+
+static int tdo24m_get_power(struct lcd_device *ld)
+{
+       struct tdo24m *lcd = lcd_get_data(ld);
+       return lcd->power;
+}
+
+static int tdo24m_set_mode(struct lcd_device *ld, struct fb_videomode *m)
+{
+       struct tdo24m *lcd = lcd_get_data(ld);
+       int mode = MODE_QVGA;
+
+       if (m->xres == 640 || m->xres == 480)
+               mode = MODE_VGA;
+
+       if (lcd->mode == mode)
+               return 0;
+
+       return tdo24m_adj_mode(lcd, mode);
+}
+
+static struct lcd_ops tdo24m_ops = {
+       .get_power      = tdo24m_get_power,
+       .set_power      = tdo24m_set_power,
+       .set_mode       = tdo24m_set_mode,
+};
+
+static int __devinit tdo24m_probe(struct spi_device *spi)
+{
+       struct tdo24m *lcd;
+       struct spi_message *m;
+       struct spi_transfer *x;
+       int err;
+
+       spi->bits_per_word = 8;
+       spi->mode = SPI_MODE_3;
+       err = spi_setup(spi);
+       if (err)
+               return err;
+
+       lcd = kzalloc(sizeof(struct tdo24m), GFP_KERNEL);
+       if (!lcd)
+               return -ENOMEM;
+
+       lcd->spi_dev = spi;
+       lcd->power = FB_BLANK_POWERDOWN;
+       lcd->mode = MODE_VGA;   /* default to VGA */
+
+       lcd->buf = kmalloc(TDO24M_SPI_BUFF_SIZE, sizeof(GFP_KERNEL));
+       if (lcd->buf == NULL) {
+               kfree(lcd);
+               return -ENOMEM;
+       }
+
+       m = &lcd->msg;
+       x = &lcd->xfer;
+
+       spi_message_init(m);
+
+       x->tx_buf = &lcd->buf[0];
+       spi_message_add_tail(x, m);
+
+       lcd->lcd_dev = lcd_device_register("tdo24m", &spi->dev,
+                                       lcd, &tdo24m_ops);
+       if (IS_ERR(lcd->lcd_dev)) {
+               err = PTR_ERR(lcd->lcd_dev);
+               goto out_free;
+       }
+
+       dev_set_drvdata(&spi->dev, lcd);
+       err = tdo24m_power(lcd, FB_BLANK_UNBLANK);
+       if (err)
+               goto out_unregister;
+
+       return 0;
+
+out_unregister:
+       lcd_device_unregister(lcd->lcd_dev);
+out_free:
+       kfree(lcd->buf);
+       kfree(lcd);
+       return err;
+}
+
+static int __devexit tdo24m_remove(struct spi_device *spi)
+{
+       struct tdo24m *lcd = dev_get_drvdata(&spi->dev);
+
+       tdo24m_power(lcd, FB_BLANK_POWERDOWN);
+       lcd_device_unregister(lcd->lcd_dev);
+       kfree(lcd->buf);
+       kfree(lcd);
+
+       return 0;
+}
+
+#ifdef CONFIG_PM
+static int tdo24m_suspend(struct spi_device *spi, pm_message_t state)
+{
+       struct tdo24m *lcd = dev_get_drvdata(&spi->dev);
+
+       return tdo24m_power(lcd, FB_BLANK_POWERDOWN);
+}
+
+static int tdo24m_resume(struct spi_device *spi)
+{
+       struct tdo24m *lcd = dev_get_drvdata(&spi->dev);
+
+       return tdo24m_power(lcd, FB_BLANK_UNBLANK);
+}
+#else
+#define tdo24m_suspend NULL
+#define tdo24m_resume  NULL
+#endif
+
+/* Power down all displays on reboot, poweroff or halt */
+static void tdo24m_shutdown(struct spi_device *spi)
+{
+       struct tdo24m *lcd = dev_get_drvdata(&spi->dev);
+
+       tdo24m_power(lcd, FB_BLANK_POWERDOWN);
+}
+
+static struct spi_driver tdo24m_driver = {
+       .driver = {
+               .name           = "tdo24m",
+               .owner          = THIS_MODULE,
+       },
+       .probe          = tdo24m_probe,
+       .remove         = __devexit_p(tdo24m_remove),
+       .shutdown       = tdo24m_shutdown,
+       .suspend        = tdo24m_suspend,
+       .resume         = tdo24m_resume,
+};
+
+static int __init tdo24m_init(void)
+{
+       return spi_register_driver(&tdo24m_driver);
+}
+module_init(tdo24m_init);
+
+static void __exit tdo24m_exit(void)
+{
+       spi_unregister_driver(&tdo24m_driver);
+}
+module_exit(tdo24m_exit);
+
+MODULE_AUTHOR("Eric Miao <eric.miao@marvell.com>");
+MODULE_DESCRIPTION("Driver for Toppoly TDO24M LCD Panel");
+MODULE_LICENSE("GPL");
index 98843c2ecf733a17e0742109fa63009d47c9b405..0737570030f5e85459b4f926e3a4e8a7aaa09b3d 100644 (file)
@@ -979,6 +979,7 @@ fb_set_var(struct fb_info *info, struct fb_var_screeninfo *var)
 
                                info->flags &= ~FBINFO_MISC_USEREVENT;
                                event.info = info;
+                               event.data = &mode;
                                fb_notifier_call_chain(evnt, &event);
                        }
                }
index cc4c038a1b3f3c8c22821aab37a54f564ba41d8b..afeed0611e3e0896cc28e05d355a9fdad73a6d08 100644 (file)
 
 #include <asm/unaligned.h>
 
-
-#define DEBUG 1
-#ifdef DEBUG
-#define DPRINTK(f, a...) printk(KERN_DEBUG "%s: " f, __func__ , ## a)
-#else
-#define DPRINTK(f, a...)
-#endif
-
-
 /* Display specific information */
 #define DPY_W 832
 #define DPY_H 622
 
+static int user_wfm_size;
+
 /* frame differs from image. frame includes non-visible pixels */
 struct epd_frame {
        int fw; /* frame width */
        int fh; /* frame height */
+       u16 config[4];
+       int wfm_size;
 };
 
 static struct epd_frame epd_frame_table[] = {
        {
-       .fw = 832,
-       .fh = 622
+               .fw = 832,
+               .fh = 622,
+               .config = {
+                       15 /* sdlew */
+                       | 2 << 8 /* sdosz */
+                       | 0 << 11 /* sdor */
+                       | 0 << 12 /* sdces */
+                       | 0 << 15, /* sdcer */
+                       42 /* gdspl */
+                       | 1 << 8 /* gdr1 */
+                       | 1 << 9 /* sdshr */
+                       | 0 << 15, /* gdspp */
+                       18 /* gdspw */
+                       | 0 << 15, /* dispc */
+                       599 /* vdlc */
+                       | 0 << 11 /* dsi */
+                       | 0 << 12, /* dsic */
+               },
+               .wfm_size = 47001,
+       },
+       {
+               .fw = 1088,
+               .fh = 791,
+               .config = {
+                       0x0104,
+                       0x031f,
+                       0x0088,
+                       0x02ff,
+               },
+               .wfm_size = 46770,
+       },
+       {
+               .fw = 1200,
+               .fh = 842,
+               .config = {
+                       0x0101,
+                       0x030e,
+                       0x0012,
+                       0x0280,
+               },
+               .wfm_size = 46770,
        },
 };
 
@@ -134,9 +168,8 @@ static u16 calc_img_cksum(u16 *start, int length)
 }
 
 /* here we decode the incoming waveform file and populate metromem */
-#define EXP_WFORM_SIZE 47001
-static int load_waveform(u8 *mem, size_t size, u8 *metromem, int m, int t,
-                               u8 *frame_count)
+static int __devinit load_waveform(u8 *mem, size_t size, int m, int t,
+                               struct metronomefb_par *par)
 {
        int tta;
        int wmta;
@@ -148,26 +181,31 @@ static int load_waveform(u8 *mem, size_t size, u8 *metromem, int m, int t,
        int wfm_idx, owfm_idx;
        int mem_idx = 0;
        struct waveform_hdr *wfm_hdr;
+       u8 *metromem = par->metromem_wfm;
+       struct device *dev = par->info->dev;
 
-       if (size != EXP_WFORM_SIZE) {
-               printk(KERN_ERR "Error: unexpected size %d != %d\n", size,
-                                       EXP_WFORM_SIZE);
+       if (user_wfm_size)
+               epd_frame_table[par->dt].wfm_size = user_wfm_size;
+
+       if (size != epd_frame_table[par->dt].wfm_size) {
+               dev_err(dev, "Error: unexpected size %d != %d\n", size,
+                                       epd_frame_table[par->dt].wfm_size);
                return -EINVAL;
        }
 
        wfm_hdr = (struct waveform_hdr *) mem;
 
        if (wfm_hdr->fvsn != 1) {
-               printk(KERN_ERR "Error: bad fvsn %x\n", wfm_hdr->fvsn);
+               dev_err(dev, "Error: bad fvsn %x\n", wfm_hdr->fvsn);
                return -EINVAL;
        }
        if (wfm_hdr->luts != 0) {
-               printk(KERN_ERR "Error: bad luts %x\n", wfm_hdr->luts);
+               dev_err(dev, "Error: bad luts %x\n", wfm_hdr->luts);
                return -EINVAL;
        }
        cksum = calc_cksum(32, 47, mem);
        if (cksum != wfm_hdr->wfm_cs) {
-               printk(KERN_ERR "Error: bad cksum %x != %x\n", cksum,
+               dev_err(dev, "Error: bad cksum %x != %x\n", cksum,
                                        wfm_hdr->wfm_cs);
                return -EINVAL;
        }
@@ -175,7 +213,7 @@ static int load_waveform(u8 *mem, size_t size, u8 *metromem, int m, int t,
        wfm_hdr->trc += 1;
        for (i = 0; i < 5; i++) {
                if (*(wfm_hdr->stuff2a + i) != 0) {
-                       printk(KERN_ERR "Error: unexpected value in padding\n");
+                       dev_err(dev, "Error: unexpected value in padding\n");
                        return -EINVAL;
                }
        }
@@ -200,7 +238,7 @@ static int load_waveform(u8 *mem, size_t size, u8 *metromem, int m, int t,
                return -EINVAL;
        cksum = calc_cksum(sizeof(*wfm_hdr), cksum_idx, mem);
        if (cksum != mem[cksum_idx]) {
-               printk(KERN_ERR "Error: bad temperature range table cksum"
+               dev_err(dev, "Error: bad temperature range table cksum"
                                " %x != %x\n", cksum, mem[cksum_idx]);
                return -EINVAL;
        }
@@ -212,7 +250,7 @@ static int load_waveform(u8 *mem, size_t size, u8 *metromem, int m, int t,
                return -EINVAL;
        cksum = calc_cksum(cksum_idx - 3, cksum_idx, mem);
        if (cksum != mem[cksum_idx]) {
-               printk(KERN_ERR "Error: bad mode table address cksum"
+               dev_err(dev, "Error: bad mode table address cksum"
                                " %x != %x\n", cksum, mem[cksum_idx]);
                return -EINVAL;
        }
@@ -224,7 +262,7 @@ static int load_waveform(u8 *mem, size_t size, u8 *metromem, int m, int t,
                return -EINVAL;
        cksum = calc_cksum(cksum_idx - 3, cksum_idx, mem);
        if (cksum != mem[cksum_idx]) {
-               printk(KERN_ERR "Error: bad temperature table address cksum"
+               dev_err(dev, "Error: bad temperature table address cksum"
                        " %x != %x\n", cksum, mem[cksum_idx]);
                return -EINVAL;
        }
@@ -259,11 +297,11 @@ static int load_waveform(u8 *mem, size_t size, u8 *metromem, int m, int t,
                return -EINVAL;
        cksum = calc_cksum(owfm_idx, cksum_idx, mem);
        if (cksum != mem[cksum_idx]) {
-               printk(KERN_ERR "Error: bad waveform data cksum"
+               dev_err(dev, "Error: bad waveform data cksum"
                                " %x != %x\n", cksum, mem[cksum_idx]);
                return -EINVAL;
        }
-       *frame_count = (mem_idx/64);
+       par->frame_count = (mem_idx/64);
 
        return 0;
 }
@@ -274,15 +312,12 @@ static int metronome_display_cmd(struct metronomefb_par *par)
        u16 cs;
        u16 opcode;
        static u8 borderval;
-       u8 *ptr;
 
        /* setup display command
        we can't immediately set the opcode since the controller
        will try parse the command before we've set it all up
        so we just set cs here and set the opcode at the end */
 
-       ptr = par->metromem;
-
        if (par->metromem_cmd->opcode == 0xCC40)
                opcode = cs = 0xCC41;
        else
@@ -335,44 +370,17 @@ static int __devinit metronome_powerup_cmd(struct metronomefb_par *par)
 
 static int __devinit metronome_config_cmd(struct metronomefb_par *par)
 {
-       int i;
-       u16 cs;
-
        /* setup config command
        we can't immediately set the opcode since the controller
-       will try parse the command before we've set it all up
-       so we just set cs here and set the opcode at the end */
-
-       cs = 0xCC10;
-
-       /* set the 12 args ( 8 bytes ) for config. see spec for meanings */
-       i = 0;
-       par->metromem_cmd->args[i] =    15 /* sdlew */
-                                       | 2 << 8 /* sdosz */
-                                       | 0 << 11 /* sdor */
-                                       | 0 << 12 /* sdces */
-                                       | 0 << 15; /* sdcer */
-       cs += par->metromem_cmd->args[i++];
-
-       par->metromem_cmd->args[i] =    42 /* gdspl */
-                                       | 1 << 8 /* gdr1 */
-                                       | 1 << 9 /* sdshr */
-                                       | 0 << 15; /* gdspp */
-       cs += par->metromem_cmd->args[i++];
-
-       par->metromem_cmd->args[i] =    18 /* gdspw */
-                                       | 0 << 15; /* dispc */
-       cs += par->metromem_cmd->args[i++];
-
-       par->metromem_cmd->args[i] =    599 /* vdlc */
-                                       | 0 << 11 /* dsi */
-                                       | 0 << 12; /* dsic */
-       cs += par->metromem_cmd->args[i++];
+       will try parse the command before we've set it all up */
 
+       memcpy(par->metromem_cmd->args, epd_frame_table[par->dt].config,
+               sizeof(epd_frame_table[par->dt].config));
        /* the rest are 0 */
-       memset((u8 *) (par->metromem_cmd->args + i), 0, (32-i)*2);
+       memset((u8 *) (par->metromem_cmd->args + 4), 0, (32-4)*2);
 
-       par->metromem_cmd->csum = cs;
+       par->metromem_cmd->csum = 0xCC10;
+       par->metromem_cmd->csum += calc_img_cksum(par->metromem_cmd->args, 4);
        par->metromem_cmd->opcode = 0xCC10; /* config cmd */
 
        return par->board->met_wait_event(par);
@@ -408,12 +416,9 @@ static int __devinit metronome_init_regs(struct metronomefb_par *par)
 {
        int res;
 
-       par->board->init_gpio_regs(par);
-
-       par->board->init_lcdc_regs(par);
-
-       /* now that lcd is setup, setup dma descriptor */
-       par->board->post_dma_setup(par);
+       res = par->board->setup_io(par);
+       if (res)
+               return res;
 
        res = metronome_powerup_cmd(par);
        if (res)
@@ -430,16 +435,16 @@ static int __devinit metronome_init_regs(struct metronomefb_par *par)
 
 static void metronomefb_dpy_update(struct metronomefb_par *par)
 {
+       int fbsize;
        u16 cksum;
        unsigned char *buf = (unsigned char __force *)par->info->screen_base;
 
+       fbsize = par->info->fix.smem_len;
        /* copy from vm to metromem */
-       memcpy(par->metromem_img, buf, DPY_W*DPY_H);
+       memcpy(par->metromem_img, buf, fbsize);
 
-       cksum = calc_img_cksum((u16 *) par->metromem_img,
-                               (epd_frame_table[0].fw * DPY_H)/2);
-       *((u16 *)(par->metromem_img) +
-                       (epd_frame_table[0].fw * DPY_H)/2) = cksum;
+       cksum = calc_img_cksum((u16 *) par->metromem_img, fbsize/2);
+       *((u16 *)(par->metromem_img) + fbsize/2) = cksum;
        metronome_display_cmd(par);
 }
 
@@ -574,8 +579,10 @@ static int __devinit metronomefb_probe(struct platform_device *dev)
        unsigned char *videomemory;
        struct metronomefb_par *par;
        const struct firmware *fw_entry;
-       int cmd_size, wfm_size, img_size, padding_size, totalsize;
        int i;
+       int panel_type;
+       int fw, fh;
+       int epd_dt_index;
 
        /* pick up board specific routines */
        board = dev->dev.platform_data;
@@ -586,96 +593,108 @@ static int __devinit metronomefb_probe(struct platform_device *dev)
        if (!try_module_get(board->owner))
                return -ENODEV;
 
+       info = framebuffer_alloc(sizeof(struct metronomefb_par), &dev->dev);
+       if (!info)
+               goto err;
+
        /* we have two blocks of memory.
        info->screen_base which is vm, and is the fb used by apps.
        par->metromem which is physically contiguous memory and
        contains the display controller commands, waveform,
        processed image data and padding. this is the data pulled
-       by the device's LCD controller and pushed to Metronome */
+       by the device's LCD controller and pushed to Metronome.
+       the metromem memory is allocated by the board driver and
+       is provided to us */
+
+       panel_type = board->get_panel_type();
+       switch (panel_type) {
+       case 6:
+               epd_dt_index = 0;
+               break;
+       case 8:
+               epd_dt_index = 1;
+               break;
+       case 97:
+               epd_dt_index = 2;
+               break;
+       default:
+               dev_err(&dev->dev, "Unexpected panel type. Defaulting to 6\n");
+               epd_dt_index = 0;
+               break;
+       }
+
+       fw = epd_frame_table[epd_dt_index].fw;
+       fh = epd_frame_table[epd_dt_index].fh;
 
-       videomemorysize = (DPY_W*DPY_H);
+       /* we need to add a spare page because our csum caching scheme walks
+        * to the end of the page */
+       videomemorysize = PAGE_SIZE + (fw * fh);
        videomemory = vmalloc(videomemorysize);
        if (!videomemory)
-               return -ENOMEM;
+               goto err_fb_rel;
 
        memset(videomemory, 0, videomemorysize);
 
-       info = framebuffer_alloc(sizeof(struct metronomefb_par), &dev->dev);
-       if (!info)
-               goto err_vfree;
-
        info->screen_base = (char __force __iomem *)videomemory;
        info->fbops = &metronomefb_ops;
 
+       metronomefb_fix.line_length = fw;
+       metronomefb_var.xres = fw;
+       metronomefb_var.yres = fh;
+       metronomefb_var.xres_virtual = fw;
+       metronomefb_var.yres_virtual = fh;
        info->var = metronomefb_var;
        info->fix = metronomefb_fix;
        info->fix.smem_len = videomemorysize;
        par = info->par;
        par->info = info;
        par->board = board;
+       par->dt = epd_dt_index;
        init_waitqueue_head(&par->waitq);
 
        /* this table caches per page csum values. */
        par->csum_table = vmalloc(videomemorysize/PAGE_SIZE);
        if (!par->csum_table)
+               goto err_vfree;
+
+       /* the physical framebuffer that we use is setup by
+        * the platform device driver. It will provide us
+        * with cmd, wfm and image memory in a contiguous area. */
+       retval = board->setup_fb(par);
+       if (retval) {
+               dev_err(&dev->dev, "Failed to setup fb\n");
                goto err_csum_table;
+       }
 
-       /* the metromem buffer is divided as follows:
-       command | CRC | padding
-       16kb waveform data | CRC | padding
-       image data | CRC
-       and an extra 256 bytes for dma descriptors
-       eg: IW=832 IH=622 WS=128
-       */
-
-       cmd_size = 1 * epd_frame_table[0].fw;
-       wfm_size = ((16*1024 + 2 + epd_frame_table[0].fw - 1)
-                       / epd_frame_table[0].fw) * epd_frame_table[0].fw;
-       img_size = epd_frame_table[0].fh * epd_frame_table[0].fw;
-       padding_size = 4 * epd_frame_table[0].fw;
-       totalsize = cmd_size + wfm_size + img_size + padding_size;
-       par->metromemsize = PAGE_ALIGN(totalsize + 256);
-       DPRINTK("desired memory size = %d\n", par->metromemsize);
-       dev->dev.coherent_dma_mask = 0xffffffffull;
-       par->metromem = dma_alloc_writecombine(&dev->dev, par->metromemsize,
-                                               &par->metromem_dma, GFP_KERNEL);
-       if (!par->metromem) {
-               printk(KERN_ERR
-                       "metronomefb: unable to allocate dma buffer\n");
-               goto err_vfree;
+       /* after this point we should have a framebuffer */
+       if ((!par->metromem_wfm) ||  (!par->metromem_img) ||
+               (!par->metromem_dma)) {
+               dev_err(&dev->dev, "fb access failure\n");
+               retval = -EINVAL;
+               goto err_csum_table;
        }
 
        info->fix.smem_start = par->metromem_dma;
-       par->metromem_cmd = (struct metromem_cmd *) par->metromem;
-       par->metromem_wfm = par->metromem + cmd_size;
-       par->metromem_img = par->metromem + cmd_size + wfm_size;
-       par->metromem_img_csum = (u16 *) (par->metromem_img +
-                                       (epd_frame_table[0].fw * DPY_H));
-       DPRINTK("img offset=0x%x\n", cmd_size + wfm_size);
-       par->metromem_desc = (struct metromem_desc *) (par->metromem + cmd_size
-                                       + wfm_size + img_size + padding_size);
-       par->metromem_desc_dma = par->metromem_dma + cmd_size + wfm_size
-                                + img_size + padding_size;
 
        /* load the waveform in. assume mode 3, temp 31 for now
                a) request the waveform file from userspace
                b) process waveform and decode into metromem */
        retval = request_firmware(&fw_entry, "metronome.wbf", &dev->dev);
        if (retval < 0) {
-               printk(KERN_ERR "metronomefb: couldn't get waveform\n");
-               goto err_dma_free;
+               dev_err(&dev->dev, "Failed to get waveform\n");
+               goto err_csum_table;
        }
 
-       retval = load_waveform((u8 *) fw_entry->data, fw_entry->size,
-                               par->metromem_wfm, 3, 31, &par->frame_count);
+       retval = load_waveform((u8 *) fw_entry->data, fw_entry->size, 3, 31,
+                               par);
        release_firmware(fw_entry);
        if (retval < 0) {
-               printk(KERN_ERR "metronomefb: couldn't process waveform\n");
-               goto err_dma_free;
+               dev_err(&dev->dev, "Failed processing waveform\n");
+               goto err_csum_table;
        }
 
        if (board->setup_irq(info))
-               goto err_dma_free;
+               goto err_csum_table;
 
        retval = metronome_init_regs(par);
        if (retval < 0)
@@ -688,8 +707,8 @@ static int __devinit metronomefb_probe(struct platform_device *dev)
 
        retval = fb_alloc_cmap(&info->cmap, 8, 0);
        if (retval < 0) {
-               printk(KERN_ERR "Failed to allocate colormap\n");
-               goto err_fb_rel;
+               dev_err(&dev->dev, "Failed to allocate colormap\n");
+               goto err_free_irq;
        }
 
        /* set cmap */
@@ -704,7 +723,7 @@ static int __devinit metronomefb_probe(struct platform_device *dev)
 
        platform_set_drvdata(dev, info);
 
-       printk(KERN_INFO
+       dev_dbg(&dev->dev,
                "fb%d: Metronome frame buffer device, using %dK of video"
                " memory\n", info->node, videomemorysize >> 10);
 
@@ -712,17 +731,15 @@ static int __devinit metronomefb_probe(struct platform_device *dev)
 
 err_cmap:
        fb_dealloc_cmap(&info->cmap);
-err_fb_rel:
-       framebuffer_release(info);
 err_free_irq:
-       board->free_irq(info);
-err_dma_free:
-       dma_free_writecombine(&dev->dev, par->metromemsize, par->metromem,
-                               par->metromem_dma);
+       board->cleanup(par);
 err_csum_table:
        vfree(par->csum_table);
 err_vfree:
        vfree(videomemory);
+err_fb_rel:
+       framebuffer_release(info);
+err:
        module_put(board->owner);
        return retval;
 }
@@ -733,15 +750,15 @@ static int __devexit metronomefb_remove(struct platform_device *dev)
 
        if (info) {
                struct metronomefb_par *par = info->par;
+
+               unregister_framebuffer(info);
                fb_deferred_io_cleanup(info);
-               dma_free_writecombine(&dev->dev, par->metromemsize,
-                                       par->metromem, par->metromem_dma);
                fb_dealloc_cmap(&info->cmap);
+               par->board->cleanup(par);
                vfree(par->csum_table);
-               unregister_framebuffer(info);
                vfree((void __force *)info->screen_base);
-               par->board->free_irq(info);
                module_put(par->board->owner);
+               dev_dbg(&dev->dev, "calling release\n");
                framebuffer_release(info);
        }
        return 0;
@@ -766,6 +783,9 @@ static void __exit metronomefb_exit(void)
        platform_driver_unregister(&metronomefb_driver);
 }
 
+module_param(user_wfm_size, uint, 0);
+MODULE_PARM_DESC(user_wfm_size, "Set custom waveform size");
+
 module_init(metronomefb_init);
 module_exit(metronomefb_exit);
 
index 8302ef005be7fac9d04814f3f572deb261031277..147b4d5c63b3bc85a1a5dbc08404bc62c96e8f6b 100644 (file)
@@ -174,10 +174,8 @@ static struct miscdevice ixp4xx_wdt_miscdev = {
 static int __init ixp4xx_wdt_init(void)
 {
        int ret;
-       unsigned long processor_id;
 
-       asm("mrc p15, 0, %0, cr0, cr0, 0;" : "=r"(processor_id) :);
-       if (!(processor_id & 0xf) && !cpu_is_ixp46x()) {
+       if (!(read_cpuid_id() & 0xf) && !cpu_is_ixp46x()) {
                printk(KERN_ERR "IXP4XXX Watchdog: Rev. A0 IXP42x CPU detected"
                        " - watchdog disabled\n");
 
index 173febac6656c20eaec69a8a03dc5fe53d9d9759..c67fecafff909ccb2c7dc1084de264d2192c845c 100644 (file)
@@ -11,6 +11,7 @@
 #include <linux/device.h>
 #include <linux/mutex.h>
 #include <linux/notifier.h>
+#include <linux/fb.h>
 
 /* Notes on locking:
  *
@@ -45,6 +46,8 @@ struct lcd_ops {
        int (*get_contrast)(struct lcd_device *);
        /* Set LCD panel contrast */
         int (*set_contrast)(struct lcd_device *, int contrast);
+       /* Set LCD panel mode (resolutions ...) */
+       int (*set_mode)(struct lcd_device *, struct fb_videomode *);
        /* Check if given framebuffer device is the one LCD is bound to;
           return 0 if not, !=0 if it is. If NULL, lcd always matches the fb. */
        int (*check_fb)(struct lcd_device *, struct fb_info *);
index 3827b922ba1f8b2d9f688cac0e3095c747793690..bc21db598c06f867bf63924d4d7dc1befeacbb53 100644 (file)
 
 #define SMC91X_USE_DMA         (1 << 6)
 
+#define RPC_LED_100_10 (0x00)  /* LED = 100Mbps OR's with 10Mbps link detect */
+#define RPC_LED_RES    (0x01)  /* LED = Reserved */
+#define RPC_LED_10     (0x02)  /* LED = 10Mbps link detect */
+#define RPC_LED_FD     (0x03)  /* LED = Full Duplex Mode */
+#define RPC_LED_TX_RX  (0x04)  /* LED = TX or RX packet occurred */
+#define RPC_LED_100    (0x05)  /* LED = 100Mbps link dectect */
+#define RPC_LED_TX     (0x06)  /* LED = TX packet occurred */
+#define RPC_LED_RX     (0x07)  /* LED = RX packet occurred */
+
 struct smc91x_platdata {
        unsigned long flags;
+       unsigned char leda;
+       unsigned char ledb;
 };
 
 #endif /* __SMC91X_H__ */
index daf744017a31c86bfaacf0a98ad1ebfdd27a4595..05eab2f11e6323b9817e24a53b9f2c7180184106 100644 (file)
@@ -43,6 +43,9 @@ struct ads7846_platform_data {
        u16     debounce_tol;           /* tolerance used for filtering */
        u16     debounce_rep;           /* additional consecutive good readings
                                         * required after the first two */
+       int     gpio_pendown;           /* the GPIO used to decide the pendown
+                                        * state if get_pendown_state == NULL
+                                        */
        int     (*get_pendown_state)(void);
        int     (*filter_init)  (struct ads7846_platform_data *pdata,
                                 void **filter_data);
diff --git a/include/linux/spi/corgi_lcd.h b/include/linux/spi/corgi_lcd.h
new file mode 100644 (file)
index 0000000..6692b34
--- /dev/null
@@ -0,0 +1,20 @@
+#ifndef __LINUX_SPI_CORGI_LCD_H
+#define __LINUX_SPI_CORGI_LCD_H
+
+#define CORGI_LCD_MODE_QVGA    1
+#define CORGI_LCD_MODE_VGA     2
+
+struct corgi_lcd_platform_data {
+       int     init_mode;
+       int     max_intensity;
+       int     default_intensity;
+       int     limit_mask;
+
+       int     gpio_backlight_on;      /* -1 if n/a */
+       int     gpio_backlight_cont;    /* -1 if n/a */
+
+       void (*notify)(int intensity);
+       void (*kick_battery)(void);
+};
+
+#endif /* __LINUX_SPI_CORGI_LCD_H */
diff --git a/include/linux/ucb1400.h b/include/linux/ucb1400.h
new file mode 100644 (file)
index 0000000..970473b
--- /dev/null
@@ -0,0 +1,161 @@
+/*
+ * Register definitions and functions for:
+ *  Philips UCB1400 driver
+ *
+ * Based on ucb1400_ts:
+ *  Author:    Nicolas Pitre
+ *  Created:   September 25, 2006
+ *  Copyright: MontaVista Software, Inc.
+ *
+ * Spliting done by: Marek Vasut <marek.vasut@gmail.com>
+ * If something doesnt work and it worked before spliting, e-mail me,
+ * dont bother Nicolas please ;-)
+ *
+ * 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.
+ *
+ * This code is heavily based on ucb1x00-*.c copyrighted by Russell King
+ * covering the UCB1100, UCB1200 and UCB1300..  Support for the UCB1400 has
+ * been made separate from ucb1x00-core/ucb1x00-ts on Russell's request.
+ */
+
+#ifndef _LINUX__UCB1400_H
+#define _LINUX__UCB1400_H
+
+#include <sound/ac97_codec.h>
+#include <linux/mutex.h>
+#include <linux/platform_device.h>
+
+/*
+ * UCB1400 AC-link registers
+ */
+
+#define UCB_IO_DATA            0x5a
+#define UCB_IO_DIR             0x5c
+#define UCB_IE_RIS             0x5e
+#define UCB_IE_FAL             0x60
+#define UCB_IE_STATUS          0x62
+#define UCB_IE_CLEAR           0x62
+#define UCB_IE_ADC             (1 << 11)
+#define UCB_IE_TSPX            (1 << 12)
+
+#define UCB_TS_CR              0x64
+#define UCB_TS_CR_TSMX_POW     (1 << 0)
+#define UCB_TS_CR_TSPX_POW     (1 << 1)
+#define UCB_TS_CR_TSMY_POW     (1 << 2)
+#define UCB_TS_CR_TSPY_POW     (1 << 3)
+#define UCB_TS_CR_TSMX_GND     (1 << 4)
+#define UCB_TS_CR_TSPX_GND     (1 << 5)
+#define UCB_TS_CR_TSMY_GND     (1 << 6)
+#define UCB_TS_CR_TSPY_GND     (1 << 7)
+#define UCB_TS_CR_MODE_INT     (0 << 8)
+#define UCB_TS_CR_MODE_PRES    (1 << 8)
+#define UCB_TS_CR_MODE_POS     (2 << 8)
+#define UCB_TS_CR_BIAS_ENA     (1 << 11)
+#define UCB_TS_CR_TSPX_LOW     (1 << 12)
+#define UCB_TS_CR_TSMX_LOW     (1 << 13)
+
+#define UCB_ADC_CR             0x66
+#define UCB_ADC_SYNC_ENA       (1 << 0)
+#define UCB_ADC_VREFBYP_CON    (1 << 1)
+#define UCB_ADC_INP_TSPX       (0 << 2)
+#define UCB_ADC_INP_TSMX       (1 << 2)
+#define UCB_ADC_INP_TSPY       (2 << 2)
+#define UCB_ADC_INP_TSMY       (3 << 2)
+#define UCB_ADC_INP_AD0                (4 << 2)
+#define UCB_ADC_INP_AD1                (5 << 2)
+#define UCB_ADC_INP_AD2                (6 << 2)
+#define UCB_ADC_INP_AD3                (7 << 2)
+#define UCB_ADC_EXT_REF                (1 << 5)
+#define UCB_ADC_START          (1 << 7)
+#define UCB_ADC_ENA            (1 << 15)
+
+#define UCB_ADC_DATA           0x68
+#define UCB_ADC_DAT_VALID      (1 << 15)
+#define UCB_ADC_DAT_MASK       0x3ff
+
+#define UCB_ID                 0x7e
+#define UCB_ID_1400             0x4304
+
+struct ucb1400_ts {
+       struct input_dev        *ts_idev;
+       struct task_struct      *ts_task;
+       int                     id;
+       wait_queue_head_t       ts_wait;
+       unsigned int            ts_restart:1;
+       int                     irq;
+       unsigned int            irq_pending;    /* not bit field shared */
+       struct snd_ac97         *ac97;
+};
+
+struct ucb1400 {
+       struct platform_device  *ucb1400_ts;
+};
+
+static inline u16 ucb1400_reg_read(struct snd_ac97 *ac97, u16 reg)
+{
+       return ac97->bus->ops->read(ac97, reg);
+}
+
+static inline void ucb1400_reg_write(struct snd_ac97 *ac97, u16 reg, u16 val)
+{
+       ac97->bus->ops->write(ac97, reg, val);
+}
+
+static inline u16 ucb1400_gpio_get_value(struct snd_ac97 *ac97, u16 gpio)
+{
+       return ucb1400_reg_read(ac97, UCB_IO_DATA) & (1 << gpio);
+}
+
+static inline void ucb1400_gpio_set_value(struct snd_ac97 *ac97, u16 gpio,
+                                               u16 val)
+{
+       ucb1400_reg_write(ac97, UCB_IO_DATA, val ?
+                       ucb1400_reg_read(ac97, UCB_IO_DATA) | (1 << gpio) :
+                       ucb1400_reg_read(ac97, UCB_IO_DATA) & ~(1 << gpio));
+}
+
+static inline u16 ucb1400_gpio_get_direction(struct snd_ac97 *ac97, u16 gpio)
+{
+       return ucb1400_reg_read(ac97, UCB_IO_DIR) & (1 << gpio);
+}
+
+static inline void ucb1400_gpio_set_direction(struct snd_ac97 *ac97, u16 gpio,
+                                               u16 dir)
+{
+       ucb1400_reg_write(ac97, UCB_IO_DIR, dir ?
+                       ucb1400_reg_read(ac97, UCB_IO_DIR) | (1 << gpio) :
+                       ucb1400_reg_read(ac97, UCB_IO_DIR) & ~(1 << gpio));
+}
+
+static inline void ucb1400_adc_enable(struct snd_ac97 *ac97)
+{
+       ucb1400_reg_write(ac97, UCB_ADC_CR, UCB_ADC_ENA);
+}
+
+static unsigned int ucb1400_adc_read(struct snd_ac97 *ac97, u16 adc_channel,
+                                       int adcsync)
+{
+       unsigned int val;
+
+       if (adcsync)
+               adc_channel |= UCB_ADC_SYNC_ENA;
+
+       ucb1400_reg_write(ac97, UCB_ADC_CR, UCB_ADC_ENA | adc_channel);
+       ucb1400_reg_write(ac97, UCB_ADC_CR, UCB_ADC_ENA | adc_channel |
+                               UCB_ADC_START);
+
+       while (!((val = ucb1400_reg_read(ac97, UCB_ADC_DATA))
+                       & UCB_ADC_DAT_VALID))
+               schedule_timeout_uninterruptible(1);
+
+       return val & UCB_ADC_DAT_MASK;
+}
+
+static inline void ucb1400_adc_disable(struct snd_ac97 *ac97)
+{
+       ucb1400_reg_write(ac97, UCB_ADC_CR, 0);
+}
+
+#endif
diff --git a/include/linux/wm97xx_batt.h b/include/linux/wm97xx_batt.h
new file mode 100644 (file)
index 0000000..9681d1a
--- /dev/null
@@ -0,0 +1,26 @@
+#ifndef _LINUX_WM97XX_BAT_H
+#define _LINUX_WM97XX_BAT_H
+
+#include <linux/wm97xx.h>
+
+struct wm97xx_batt_info {
+       int     batt_aux;
+       int     temp_aux;
+       int     charge_gpio;
+       int     min_voltage;
+       int     max_voltage;
+       int     batt_div;
+       int     batt_mult;
+       int     temp_div;
+       int     temp_mult;
+       int     batt_tech;
+       char    *batt_name;
+};
+
+#ifdef CONFIG_BATTERY_WM97XX
+void __init wm97xx_bat_set_pdata(struct wm97xx_batt_info *data);
+#else
+static inline void wm97xx_bat_set_pdata(struct wm97xx_batt_info *data) {}
+#endif
+
+#endif
index 920c4e9cb93dce0fb9929603121b4079ffc8ffeb..6ad87f48599284c809371c533f287b748268097f 100644 (file)
@@ -30,6 +30,7 @@
  */
 #define ATMEL_LCDC_WIRING_BGR  0
 #define ATMEL_LCDC_WIRING_RGB  1
+#define ATMEL_LCDC_WIRING_RGB555       2
 
 
  /* LCD Controller info data structure, stored in device platform_data */
index dab04b4fad7f590252a54fe2cf27cf73a9a2dd92..9863f4b6d418ecc7b618d5e4257323388142ac42 100644 (file)
 #ifndef _LINUX_METRONOMEFB_H_
 #define _LINUX_METRONOMEFB_H_
 
-/* address and control descriptors used by metronome controller */
-struct metromem_desc {
-       u32 mFDADR0;
-       u32 mFSADR0;
-       u32 mFIDR0;
-       u32 mLDCMD0;
-};
-
 /* command structure used by metronome controller */
 struct metromem_cmd {
        u16 opcode;
@@ -29,34 +21,37 @@ struct metromem_cmd {
 
 /* struct used by metronome. board specific stuff comes from *board */
 struct metronomefb_par {
-       unsigned char *metromem;
-       struct metromem_desc *metromem_desc;
        struct metromem_cmd *metromem_cmd;
        unsigned char *metromem_wfm;
        unsigned char *metromem_img;
        u16 *metromem_img_csum;
        u16 *csum_table;
-       int metromemsize;
        dma_addr_t metromem_dma;
-       dma_addr_t metromem_desc_dma;
        struct fb_info *info;
        struct metronome_board *board;
        wait_queue_head_t waitq;
        u8 frame_count;
+       int extra_size;
+       int dt;
 };
 
-/* board specific routines */
+/* board specific routines and data */
 struct metronome_board {
-       struct module *owner;
-       void (*free_irq)(struct fb_info *);
-       void (*init_gpio_regs)(struct metronomefb_par *);
-       void (*init_lcdc_regs)(struct metronomefb_par *);
-       void (*post_dma_setup)(struct metronomefb_par *);
+       struct module *owner; /* the platform device */
        void (*set_rst)(struct metronomefb_par *, int);
        void (*set_stdby)(struct metronomefb_par *, int);
+       void (*cleanup)(struct metronomefb_par *);
        int (*met_wait_event)(struct metronomefb_par *);
        int (*met_wait_event_intr)(struct metronomefb_par *);
        int (*setup_irq)(struct fb_info *);
+       int (*setup_fb)(struct metronomefb_par *);
+       int (*setup_io)(struct metronomefb_par *);
+       int (*get_panel_type)(void);
+       unsigned char *metromem;
+       int fw;
+       int fh;
+       int wfm_size;
+       struct fb_info *host_fbinfo; /* the host LCD controller's fbi */
 };
 
 #endif
index 199cca3366df244b4fd05c5125ac096a0ade0f73..714b3baa4be776ddcec323e4871cdbec0c6be44a 100644 (file)
@@ -215,7 +215,7 @@ static struct snd_ac97_bus_ops pxa2xx_ac97_ops = {
 static struct pxa2xx_pcm_dma_params pxa2xx_ac97_pcm_out = {
        .name                   = "AC97 PCM out",
        .dev_addr               = __PREG(PCDR),
-       .drcmr                  = &DRCMRTXPCDR,
+       .drcmr                  = &DRCMR(12),
        .dcmd                   = DCMD_INCSRCADDR | DCMD_FLOWTRG |
                                  DCMD_BURST32 | DCMD_WIDTH4,
 };
@@ -223,7 +223,7 @@ static struct pxa2xx_pcm_dma_params pxa2xx_ac97_pcm_out = {
 static struct pxa2xx_pcm_dma_params pxa2xx_ac97_pcm_in = {
        .name                   = "AC97 PCM in",
        .dev_addr               = __PREG(PCDR),
-       .drcmr                  = &DRCMRRXPCDR,
+       .drcmr                  = &DRCMR(11),
        .dcmd                   = DCMD_INCTRGADDR | DCMD_FLOWSRC |
                                  DCMD_BURST32 | DCMD_WIDTH4,
 };
index 0a53f72077fdc97b5797960dc84e8db9177d28ce..fa69faa886efaeb8409f0d6940cd0d702fe03b1e 100644 (file)
 #include <linux/timer.h>
 #include <linux/interrupt.h>
 #include <linux/platform_device.h>
+#include <linux/gpio.h>
 #include <sound/core.h>
 #include <sound/pcm.h>
 #include <sound/soc.h>
 #include <sound/soc-dapm.h>
 
 #include <asm/mach-types.h>
-#include <asm/hardware/scoop.h>
 #include <mach/pxa-regs.h>
 #include <mach/hardware.h>
 #include <mach/corgi.h>
@@ -54,8 +54,8 @@ static void corgi_ext_control(struct snd_soc_codec *codec)
        switch (corgi_jack_func) {
        case CORGI_HP:
                /* set = unmute headphone */
-               set_scoop_gpio(&corgiscoop_device.dev, CORGI_SCP_MUTE_L);
-               set_scoop_gpio(&corgiscoop_device.dev, CORGI_SCP_MUTE_R);
+               gpio_set_value(CORGI_GPIO_MUTE_L, 1);
+               gpio_set_value(CORGI_GPIO_MUTE_R, 1);
                snd_soc_dapm_disable_pin(codec, "Mic Jack");
                snd_soc_dapm_disable_pin(codec, "Line Jack");
                snd_soc_dapm_enable_pin(codec, "Headphone Jack");
@@ -63,24 +63,24 @@ static void corgi_ext_control(struct snd_soc_codec *codec)
                break;
        case CORGI_MIC:
                /* reset = mute headphone */
-               reset_scoop_gpio(&corgiscoop_device.dev, CORGI_SCP_MUTE_L);
-               reset_scoop_gpio(&corgiscoop_device.dev, CORGI_SCP_MUTE_R);
+               gpio_set_value(CORGI_GPIO_MUTE_L, 0);
+               gpio_set_value(CORGI_GPIO_MUTE_R, 0);
                snd_soc_dapm_enable_pin(codec, "Mic Jack");
                snd_soc_dapm_disable_pin(codec, "Line Jack");
                snd_soc_dapm_disable_pin(codec, "Headphone Jack");
                snd_soc_dapm_disable_pin(codec, "Headset Jack");
                break;
        case CORGI_LINE:
-               reset_scoop_gpio(&corgiscoop_device.dev, CORGI_SCP_MUTE_L);
-               reset_scoop_gpio(&corgiscoop_device.dev, CORGI_SCP_MUTE_R);
+               gpio_set_value(CORGI_GPIO_MUTE_L, 0);
+               gpio_set_value(CORGI_GPIO_MUTE_R, 0);
                snd_soc_dapm_disable_pin(codec, "Mic Jack");
                snd_soc_dapm_enable_pin(codec, "Line Jack");
                snd_soc_dapm_disable_pin(codec, "Headphone Jack");
                snd_soc_dapm_disable_pin(codec, "Headset Jack");
                break;
        case CORGI_HEADSET:
-               reset_scoop_gpio(&corgiscoop_device.dev, CORGI_SCP_MUTE_L);
-               set_scoop_gpio(&corgiscoop_device.dev, CORGI_SCP_MUTE_R);
+               gpio_set_value(CORGI_GPIO_MUTE_L, 0);
+               gpio_set_value(CORGI_GPIO_MUTE_R, 1);
                snd_soc_dapm_enable_pin(codec, "Mic Jack");
                snd_soc_dapm_disable_pin(codec, "Line Jack");
                snd_soc_dapm_disable_pin(codec, "Headphone Jack");
@@ -114,8 +114,8 @@ static int corgi_shutdown(struct snd_pcm_substream *substream)
        struct snd_soc_codec *codec = rtd->socdev->codec;
 
        /* set = unmute headphone */
-       set_scoop_gpio(&corgiscoop_device.dev, CORGI_SCP_MUTE_L);
-       set_scoop_gpio(&corgiscoop_device.dev, CORGI_SCP_MUTE_R);
+       gpio_set_value(CORGI_GPIO_MUTE_L, 1);
+       gpio_set_value(CORGI_GPIO_MUTE_R, 1);
        return 0;
 }
 
@@ -218,22 +218,14 @@ static int corgi_set_spk(struct snd_kcontrol *kcontrol,
 static int corgi_amp_event(struct snd_soc_dapm_widget *w,
        struct snd_kcontrol *k, int event)
 {
-       if (SND_SOC_DAPM_EVENT_ON(event))
-               set_scoop_gpio(&corgiscoop_device.dev, CORGI_SCP_APM_ON);
-       else
-               reset_scoop_gpio(&corgiscoop_device.dev, CORGI_SCP_APM_ON);
-
+       gpio_set_value(CORGI_GPIO_APM_ON, SND_SOC_DAPM_EVENT_ON(event));
        return 0;
 }
 
 static int corgi_mic_event(struct snd_soc_dapm_widget *w,
        struct snd_kcontrol *k, int event)
 {
-       if (SND_SOC_DAPM_EVENT_ON(event))
-               set_scoop_gpio(&corgiscoop_device.dev, CORGI_SCP_MIC_BIAS);
-       else
-               reset_scoop_gpio(&corgiscoop_device.dev, CORGI_SCP_MIC_BIAS);
-
+       gpio_set_value(CORGI_GPIO_MIC_BIAS, SND_SOC_DAPM_EVENT_ON(event));
        return 0;
 }
 
index d94a495bd6bdc3c84e716de3d60b30ca84620602..ac8f227bab0be806307b6cc0cbcaa22af6647f2b 100644 (file)
@@ -244,7 +244,7 @@ struct snd_ac97_bus_ops soc_ac97_ops = {
 static struct pxa2xx_pcm_dma_params pxa2xx_ac97_pcm_stereo_out = {
        .name                   = "AC97 PCM Stereo out",
        .dev_addr               = __PREG(PCDR),
-       .drcmr                  = &DRCMRTXPCDR,
+       .drcmr                  = &DRCMR(12),
        .dcmd                   = DCMD_INCSRCADDR | DCMD_FLOWTRG |
                                  DCMD_BURST32 | DCMD_WIDTH4,
 };
@@ -252,7 +252,7 @@ static struct pxa2xx_pcm_dma_params pxa2xx_ac97_pcm_stereo_out = {
 static struct pxa2xx_pcm_dma_params pxa2xx_ac97_pcm_stereo_in = {
        .name                   = "AC97 PCM Stereo in",
        .dev_addr               = __PREG(PCDR),
-       .drcmr                  = &DRCMRRXPCDR,
+       .drcmr                  = &DRCMR(11),
        .dcmd                   = DCMD_INCTRGADDR | DCMD_FLOWSRC |
                                  DCMD_BURST32 | DCMD_WIDTH4,
 };
@@ -260,7 +260,7 @@ static struct pxa2xx_pcm_dma_params pxa2xx_ac97_pcm_stereo_in = {
 static struct pxa2xx_pcm_dma_params pxa2xx_ac97_pcm_aux_mono_out = {
        .name                   = "AC97 Aux PCM (Slot 5) Mono out",
        .dev_addr               = __PREG(MODR),
-       .drcmr                  = &DRCMRTXMODR,
+       .drcmr                  = &DRCMR(10),
        .dcmd                   = DCMD_INCSRCADDR | DCMD_FLOWTRG |
                                  DCMD_BURST16 | DCMD_WIDTH2,
 };
@@ -268,7 +268,7 @@ static struct pxa2xx_pcm_dma_params pxa2xx_ac97_pcm_aux_mono_out = {
 static struct pxa2xx_pcm_dma_params pxa2xx_ac97_pcm_aux_mono_in = {
        .name                   = "AC97 Aux PCM (Slot 5) Mono in",
        .dev_addr               = __PREG(MODR),
-       .drcmr                  = &DRCMRRXMODR,
+       .drcmr                  = &DRCMR(9),
        .dcmd                   = DCMD_INCTRGADDR | DCMD_FLOWSRC |
                                  DCMD_BURST16 | DCMD_WIDTH2,
 };
@@ -276,7 +276,7 @@ static struct pxa2xx_pcm_dma_params pxa2xx_ac97_pcm_aux_mono_in = {
 static struct pxa2xx_pcm_dma_params pxa2xx_ac97_pcm_mic_mono_in = {
        .name                   = "AC97 Mic PCM (Slot 6) Mono in",
        .dev_addr               = __PREG(MCDR),
-       .drcmr                  = &DRCMRRXMCDR,
+       .drcmr                  = &DRCMR(8),
        .dcmd                   = DCMD_INCTRGADDR | DCMD_FLOWSRC |
                                  DCMD_BURST16 | DCMD_WIDTH2,
 };
@@ -293,14 +293,6 @@ static int pxa2xx_ac97_suspend(struct platform_device *pdev,
 static int pxa2xx_ac97_resume(struct platform_device *pdev,
        struct snd_soc_dai *dai)
 {
-       pxa_gpio_mode(GPIO31_SYNC_AC97_MD);
-       pxa_gpio_mode(GPIO30_SDATA_OUT_AC97_MD);
-       pxa_gpio_mode(GPIO28_BITCLK_AC97_MD);
-       pxa_gpio_mode(GPIO29_SDATA_IN_AC97_MD);
-#ifdef CONFIG_PXA27x
-       /* Use GPIO 113 as AC97 Reset on Bulverde */
-       pxa_gpio_mode(113 | GPIO_ALT_FN_2_OUT);
-#endif
        clk_enable(ac97_clk);
        return 0;
 }
index c796b1882776308390fa10e4225ff26820aaa9db..ad4c31ddb3d400cbdf7b58bcc75cf26ea53d3e6c 100644 (file)
 #include "pxa2xx-pcm.h"
 #include "pxa2xx-i2s.h"
 
+/*
+ * I2S Controller Register and Bit Definitions
+ */
+#define SACR0          __REG(0x40400000)  /* Global Control Register */
+#define SACR1          __REG(0x40400004)  /* Serial Audio I 2 S/MSB-Justified Control Register */
+#define SASR0          __REG(0x4040000C)  /* Serial Audio I 2 S/MSB-Justified Interface and FIFO Status Register */
+#define SAIMR          __REG(0x40400014)  /* Serial Audio Interrupt Mask Register */
+#define SAICR          __REG(0x40400018)  /* Serial Audio Interrupt Clear Register */
+#define SADIV          __REG(0x40400060)  /* Audio Clock Divider Register. */
+#define SADR           __REG(0x40400080)  /* Serial Audio Data Register (TX and RX FIFO access Register). */
+
+#define SACR0_RFTH(x)  ((x) << 12)     /* Rx FIFO Interrupt or DMA Trigger Threshold */
+#define SACR0_TFTH(x)  ((x) << 8)      /* Tx FIFO Interrupt or DMA Trigger Threshold */
+#define SACR0_STRF     (1 << 5)        /* FIFO Select for EFWR Special Function */
+#define SACR0_EFWR     (1 << 4)        /* Enable EFWR Function  */
+#define SACR0_RST      (1 << 3)        /* FIFO, i2s Register Reset */
+#define SACR0_BCKD     (1 << 2)        /* Bit Clock Direction */
+#define SACR0_ENB      (1 << 0)        /* Enable I2S Link */
+#define SACR1_ENLBF    (1 << 5)        /* Enable Loopback */
+#define SACR1_DRPL     (1 << 4)        /* Disable Replaying Function */
+#define SACR1_DREC     (1 << 3)        /* Disable Recording Function */
+#define SACR1_AMSL     (1 << 0)        /* Specify Alternate Mode */
+
+#define SASR0_I2SOFF   (1 << 7)        /* Controller Status */
+#define SASR0_ROR      (1 << 6)        /* Rx FIFO Overrun */
+#define SASR0_TUR      (1 << 5)        /* Tx FIFO Underrun */
+#define SASR0_RFS      (1 << 4)        /* Rx FIFO Service Request */
+#define SASR0_TFS      (1 << 3)        /* Tx FIFO Service Request */
+#define SASR0_BSY      (1 << 2)        /* I2S Busy */
+#define SASR0_RNE      (1 << 1)        /* Rx FIFO Not Empty */
+#define SASR0_TNF      (1 << 0)        /* Tx FIFO Not Empty */
+
+#define SAICR_ROR      (1 << 6)        /* Clear Rx FIFO Overrun Interrupt */
+#define SAICR_TUR      (1 << 5)        /* Clear Tx FIFO Underrun Interrupt */
+
+#define SAIMR_ROR      (1 << 6)        /* Enable Rx FIFO Overrun Condition Interrupt */
+#define SAIMR_TUR      (1 << 5)        /* Enable Tx FIFO Underrun Condition Interrupt */
+#define SAIMR_RFS      (1 << 4)        /* Enable Rx FIFO Service Interrupt */
+#define SAIMR_TFS      (1 << 3)        /* Enable Tx FIFO Service Interrupt */
+
 struct pxa_i2s_port {
        u32 sadiv;
        u32 sacr0;
@@ -44,7 +84,7 @@ static struct clk *clk_i2s;
 static struct pxa2xx_pcm_dma_params pxa2xx_i2s_pcm_stereo_out = {
        .name                   = "I2S PCM Stereo out",
        .dev_addr               = __PREG(SADR),
-       .drcmr                  = &DRCMRTXSADR,
+       .drcmr                  = &DRCMR(3),
        .dcmd                   = DCMD_INCSRCADDR | DCMD_FLOWTRG |
                                  DCMD_BURST32 | DCMD_WIDTH4,
 };
@@ -52,7 +92,7 @@ static struct pxa2xx_pcm_dma_params pxa2xx_i2s_pcm_stereo_out = {
 static struct pxa2xx_pcm_dma_params pxa2xx_i2s_pcm_stereo_in = {
        .name                   = "I2S PCM Stereo in",
        .dev_addr               = __PREG(SADR),
-       .drcmr                  = &DRCMRRXSADR,
+       .drcmr                  = &DRCMR(2),
        .dcmd                   = DCMD_INCTRGADDR | DCMD_FLOWSRC |
                                  DCMD_BURST32 | DCMD_WIDTH4,
 };
index 37cb768fc933d377647f89b92d8c999efeaf2393..b89a3edd218360c8dc9a2a9353b12e70feafe07e 100644 (file)
 #include <linux/timer.h>
 #include <linux/interrupt.h>
 #include <linux/platform_device.h>
+#include <linux/gpio.h>
 #include <sound/core.h>
 #include <sound/pcm.h>
 #include <sound/soc.h>
 #include <sound/soc-dapm.h>
 
 #include <asm/mach-types.h>
-#include <asm/hardware/scoop.h>
 #include <mach/pxa-regs.h>
 #include <mach/hardware.h>
-#include <mach/akita.h>
 #include <mach/spitz.h>
 #include "../codecs/wm8750.h"
 #include "pxa2xx-pcm.h"
@@ -63,8 +62,8 @@ static void spitz_ext_control(struct snd_soc_codec *codec)
                snd_soc_dapm_disable_pin(codec, "Mic Jack");
                snd_soc_dapm_disable_pin(codec, "Line Jack");
                snd_soc_dapm_enable_pin(codec, "Headphone Jack");
-               set_scoop_gpio(&spitzscoop_device.dev, SPITZ_SCP_MUTE_L);
-               set_scoop_gpio(&spitzscoop_device.dev, SPITZ_SCP_MUTE_R);
+               gpio_set_value(SPITZ_GPIO_MUTE_L, 1);
+               gpio_set_value(SPITZ_GPIO_MUTE_R, 1);
                break;
        case SPITZ_MIC:
                /* enable mic jack and bias, mute hp */
@@ -72,8 +71,8 @@ static void spitz_ext_control(struct snd_soc_codec *codec)
                snd_soc_dapm_disable_pin(codec, "Headset Jack");
                snd_soc_dapm_disable_pin(codec, "Line Jack");
                snd_soc_dapm_enable_pin(codec, "Mic Jack");
-               reset_scoop_gpio(&spitzscoop_device.dev, SPITZ_SCP_MUTE_L);
-               reset_scoop_gpio(&spitzscoop_device.dev, SPITZ_SCP_MUTE_R);
+               gpio_set_value(SPITZ_GPIO_MUTE_L, 0);
+               gpio_set_value(SPITZ_GPIO_MUTE_R, 0);
                break;
        case SPITZ_LINE:
                /* enable line jack, disable mic bias and mute hp */
@@ -81,8 +80,8 @@ static void spitz_ext_control(struct snd_soc_codec *codec)
                snd_soc_dapm_disable_pin(codec, "Headset Jack");
                snd_soc_dapm_disable_pin(codec, "Mic Jack");
                snd_soc_dapm_enable_pin(codec, "Line Jack");
-               reset_scoop_gpio(&spitzscoop_device.dev, SPITZ_SCP_MUTE_L);
-               reset_scoop_gpio(&spitzscoop_device.dev, SPITZ_SCP_MUTE_R);
+               gpio_set_value(SPITZ_GPIO_MUTE_L, 0);
+               gpio_set_value(SPITZ_GPIO_MUTE_R, 0);
                break;
        case SPITZ_HEADSET:
                /* enable and unmute headset jack enable mic bias, mute L hp */
@@ -90,8 +89,8 @@ static void spitz_ext_control(struct snd_soc_codec *codec)
                snd_soc_dapm_enable_pin(codec, "Mic Jack");
                snd_soc_dapm_disable_pin(codec, "Line Jack");
                snd_soc_dapm_enable_pin(codec, "Headset Jack");
-               reset_scoop_gpio(&spitzscoop_device.dev, SPITZ_SCP_MUTE_L);
-               set_scoop_gpio(&spitzscoop_device.dev, SPITZ_SCP_MUTE_R);
+               gpio_set_value(SPITZ_GPIO_MUTE_L, 0);
+               gpio_set_value(SPITZ_GPIO_MUTE_R, 1);
                break;
        case SPITZ_HP_OFF:
 
@@ -100,8 +99,8 @@ static void spitz_ext_control(struct snd_soc_codec *codec)
                snd_soc_dapm_disable_pin(codec, "Headset Jack");
                snd_soc_dapm_disable_pin(codec, "Mic Jack");
                snd_soc_dapm_disable_pin(codec, "Line Jack");
-               reset_scoop_gpio(&spitzscoop_device.dev, SPITZ_SCP_MUTE_L);
-               reset_scoop_gpio(&spitzscoop_device.dev, SPITZ_SCP_MUTE_R);
+               gpio_set_value(SPITZ_GPIO_MUTE_L, 0);
+               gpio_set_value(SPITZ_GPIO_MUTE_R, 0);
                break;
        }
        snd_soc_dapm_sync(codec);
@@ -215,23 +214,14 @@ static int spitz_set_spk(struct snd_kcontrol *kcontrol,
 static int spitz_mic_bias(struct snd_soc_dapm_widget *w,
        struct snd_kcontrol *k, int event)
 {
-       if (machine_is_borzoi() || machine_is_spitz()) {
-               if (SND_SOC_DAPM_EVENT_ON(event))
-                       set_scoop_gpio(&spitzscoop2_device.dev,
-                               SPITZ_SCP2_MIC_BIAS);
-               else
-                       reset_scoop_gpio(&spitzscoop2_device.dev,
-                               SPITZ_SCP2_MIC_BIAS);
-       }
+       if (machine_is_borzoi() || machine_is_spitz())
+               gpio_set_value(SPITZ_GPIO_MIC_BIAS,
+                               SND_SOC_DAPM_EVENT_ON(event));
+
+       if (machine_is_akita())
+               gpio_set_value(AKITA_GPIO_MIC_BIAS,
+                               SND_SOC_DAPM_EVENT_ON(event));
 
-       if (machine_is_akita()) {
-               if (SND_SOC_DAPM_EVENT_ON(event))
-                       akita_set_ioexp(&akitaioexp_device.dev,
-                               AKITA_IOEXP_MIC_BIAS);
-               else
-                       akita_reset_ioexp(&akitaioexp_device.dev,
-                               AKITA_IOEXP_MIC_BIAS);
-       }
        return 0;
 }