aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/DocBook/Makefile7
-rw-r--r--Documentation/DocBook/procfs_example.c4
-rw-r--r--Documentation/Makefile3
-rw-r--r--Documentation/accounting/Makefile10
-rw-r--r--Documentation/accounting/getdelays.c25
-rw-r--r--Documentation/arm/IXP4xx2
-rw-r--r--Documentation/arm/Interrupts2
-rw-r--r--Documentation/arm/README4
-rw-r--r--Documentation/arm/Samsung-S3C24XX/GPIO.txt8
-rw-r--r--Documentation/arm/Samsung-S3C24XX/Overview.txt2
-rw-r--r--Documentation/arm/Samsung-S3C24XX/USB-Host.txt2
-rw-r--r--Documentation/auxdisplay/Makefile10
-rw-r--r--Documentation/connector/Makefile11
-rw-r--r--Documentation/cpu-hotplug.txt5
-rw-r--r--Documentation/feature-removal-schedule.txt22
-rw-r--r--Documentation/filesystems/configfs/Makefile3
-rw-r--r--Documentation/filesystems/quota.txt22
-rw-r--r--Documentation/ia64/Makefile8
-rw-r--r--Documentation/lguest/lguest.c23
-rw-r--r--Documentation/networking/Makefile8
-rw-r--r--Documentation/networking/ifenslave.c2
-rw-r--r--Documentation/pcmcia/Makefile10
-rw-r--r--Documentation/pcmcia/crc32hash.c2
-rw-r--r--Documentation/spi/Makefile11
-rw-r--r--Documentation/spi/pxa2xx4
-rw-r--r--Documentation/spi/spi-summary4
-rw-r--r--Documentation/video4linux/Makefile8
-rw-r--r--Documentation/vm/Makefile8
-rw-r--r--Documentation/watchdog/src/Makefile8
-rw-r--r--MAINTAINERS13
-rw-r--r--Makefile5
-rw-r--r--arch/arm/Makefile54
-rw-r--r--arch/arm/boot/compressed/head-xscale.S1
-rw-r--r--arch/arm/boot/compressed/head.S2
-rw-r--r--arch/arm/boot/compressed/misc.c2
-rw-r--r--arch/arm/common/locomo.c2
-rw-r--r--arch/arm/common/sa1111.c2
-rw-r--r--arch/arm/common/sharpsl_pm.c11
-rw-r--r--arch/arm/common/time-acorn.c2
-rw-r--r--arch/arm/common/uengine.c3
-rw-r--r--arch/arm/include/asm/dma.h2
-rw-r--r--arch/arm/include/asm/floppy.h2
-rw-r--r--arch/arm/include/asm/gpio.h2
-rw-r--r--arch/arm/include/asm/hardware.h18
-rw-r--r--arch/arm/include/asm/hardware/dec21285.h2
-rw-r--r--arch/arm/include/asm/hardware/iop3xx-adma.h2
-rw-r--r--arch/arm/include/asm/hardware/iop3xx-gpio.h2
-rw-r--r--arch/arm/include/asm/hardware/sa1111.h2
-rw-r--r--arch/arm/include/asm/hw_irq.h20
-rw-r--r--arch/arm/include/asm/io.h2
-rw-r--r--arch/arm/include/asm/irq.h2
-rw-r--r--arch/arm/include/asm/mach/irq.h20
-rw-r--r--arch/arm/include/asm/mc146818rtc.h2
-rw-r--r--arch/arm/include/asm/memory.h2
-rw-r--r--arch/arm/include/asm/mmzone.h2
-rw-r--r--arch/arm/include/asm/mtd-xip.h4
-rw-r--r--arch/arm/include/asm/pci.h2
-rw-r--r--arch/arm/include/asm/pgtable.h2
-rw-r--r--arch/arm/include/asm/smp.h2
-rw-r--r--arch/arm/include/asm/timex.h2
-rw-r--r--arch/arm/include/asm/vga.h2
-rw-r--r--arch/arm/kernel/crunch-bits.S2
-rw-r--r--arch/arm/kernel/crunch.c2
-rw-r--r--arch/arm/kernel/debug.S2
-rw-r--r--arch/arm/kernel/ecard.c2
-rw-r--r--arch/arm/kernel/entry-armv.S2
-rw-r--r--arch/arm/kernel/entry-common.S2
-rw-r--r--arch/arm/kernel/head-nommu.S1
-rw-r--r--arch/arm/kernel/irq.c1
-rw-r--r--arch/arm/kernel/process.c2
-rw-r--r--arch/arm/kernel/smp.c4
-rw-r--r--arch/arm/lib/ecard.S2
-rw-r--r--arch/arm/lib/io-readsw-armv3.S2
-rw-r--r--arch/arm/lib/io-writesw-armv3.S2
-rw-r--r--arch/arm/mach-aaec2000/aaed2000.c4
-rw-r--r--arch/arm/mach-aaec2000/core.c2
-rw-r--r--arch/arm/mach-aaec2000/include/mach/aaec2000.h207
-rw-r--r--arch/arm/mach-aaec2000/include/mach/aaed2000.h40
-rw-r--r--arch/arm/mach-aaec2000/include/mach/debug-macro.S37
-rw-r--r--arch/arm/mach-aaec2000/include/mach/dma.h9
-rw-r--r--arch/arm/mach-aaec2000/include/mach/entry-macro.S40
-rw-r--r--arch/arm/mach-aaec2000/include/mach/hardware.h50
-rw-r--r--arch/arm/mach-aaec2000/include/mach/io.h20
-rw-r--r--arch/arm/mach-aaec2000/include/mach/irqs.h46
-rw-r--r--arch/arm/mach-aaec2000/include/mach/memory.h30
-rw-r--r--arch/arm/mach-aaec2000/include/mach/system.h24
-rw-r--r--arch/arm/mach-aaec2000/include/mach/timex.h18
-rw-r--r--arch/arm/mach-aaec2000/include/mach/uncompress.h46
-rw-r--r--arch/arm/mach-aaec2000/include/mach/vmalloc.h16
-rw-r--r--arch/arm/mach-at91/at91cap9.c8
-rw-r--r--arch/arm/mach-at91/at91cap9_devices.c10
-rw-r--r--arch/arm/mach-at91/at91rm9200.c6
-rw-r--r--arch/arm/mach-at91/at91rm9200_devices.c8
-rw-r--r--arch/arm/mach-at91/at91rm9200_time.c2
-rw-r--r--arch/arm/mach-at91/at91sam9260.c10
-rw-r--r--arch/arm/mach-at91/at91sam9260_devices.c12
-rw-r--r--arch/arm/mach-at91/at91sam9261.c8
-rw-r--r--arch/arm/mach-at91/at91sam9261_devices.c10
-rw-r--r--arch/arm/mach-at91/at91sam9263.c8
-rw-r--r--arch/arm/mach-at91/at91sam9263_devices.c10
-rw-r--r--arch/arm/mach-at91/at91sam926x_time.c2
-rw-r--r--arch/arm/mach-at91/at91sam9rl.c10
-rw-r--r--arch/arm/mach-at91/at91sam9rl_devices.c10
-rw-r--r--arch/arm/mach-at91/at91x40.c6
-rw-r--r--arch/arm/mach-at91/at91x40_time.c4
-rw-r--r--arch/arm/mach-at91/board-1arm.c6
-rw-r--r--arch/arm/mach-at91/board-cam60.c6
-rw-r--r--arch/arm/mach-at91/board-cap9adk.c10
-rw-r--r--arch/arm/mach-at91/board-carmeva.c6
-rw-r--r--arch/arm/mach-at91/board-csb337.c6
-rw-r--r--arch/arm/mach-at91/board-csb637.c6
-rw-r--r--arch/arm/mach-at91/board-dk.c8
-rw-r--r--arch/arm/mach-at91/board-eb01.c4
-rw-r--r--arch/arm/mach-at91/board-eb9200.c6
-rw-r--r--arch/arm/mach-at91/board-ecbat91.c6
-rw-r--r--arch/arm/mach-at91/board-ek.c8
-rw-r--r--arch/arm/mach-at91/board-kafa.c6
-rw-r--r--arch/arm/mach-at91/board-kb9202.c8
-rw-r--r--arch/arm/mach-at91/board-picotux200.c8
-rw-r--r--arch/arm/mach-at91/board-qil-a9260.c8
-rw-r--r--arch/arm/mach-at91/board-sam9-l9260.c6
-rw-r--r--arch/arm/mach-at91/board-sam9260ek.c6
-rw-r--r--arch/arm/mach-at91/board-sam9261ek.c8
-rw-r--r--arch/arm/mach-at91/board-sam9263ek.c8
-rw-r--r--arch/arm/mach-at91/board-sam9g20ek.c6
-rw-r--r--arch/arm/mach-at91/board-sam9rlek.c8
-rw-r--r--arch/arm/mach-at91/board-usb-a9260.c8
-rw-r--r--arch/arm/mach-at91/board-usb-a9263.c8
-rw-r--r--arch/arm/mach-at91/board-yl-9200.c8
-rw-r--r--arch/arm/mach-at91/clock.c7
-rw-r--r--arch/arm/mach-at91/gpio.c6
-rw-r--r--arch/arm/mach-at91/include/mach/at91_adc.h61
-rw-r--r--arch/arm/mach-at91/include/mach/at91_aic.h53
-rw-r--r--arch/arm/mach-at91/include/mach/at91_dbgu.h66
-rw-r--r--arch/arm/mach-at91/include/mach/at91_mci.h113
-rw-r--r--arch/arm/mach-at91/include/mach/at91_pio.h49
-rw-r--r--arch/arm/mach-at91/include/mach/at91_pit.h29
-rw-r--r--arch/arm/mach-at91/include/mach/at91_pmc.h111
-rw-r--r--arch/arm/mach-at91/include/mach/at91_rstc.h38
-rw-r--r--arch/arm/mach-at91/include/mach/at91_rtc.h75
-rw-r--r--arch/arm/mach-at91/include/mach/at91_rtt.h32
-rw-r--r--arch/arm/mach-at91/include/mach/at91_shdwc.h35
-rw-r--r--arch/arm/mach-at91/include/mach/at91_spi.h81
-rw-r--r--arch/arm/mach-at91/include/mach/at91_ssc.h106
-rw-r--r--arch/arm/mach-at91/include/mach/at91_st.h49
-rw-r--r--arch/arm/mach-at91/include/mach/at91_tc.h146
-rw-r--r--arch/arm/mach-at91/include/mach/at91_twi.h68
-rw-r--r--arch/arm/mach-at91/include/mach/at91_wdt.h34
-rw-r--r--arch/arm/mach-at91/include/mach/at91cap9.h126
-rw-r--r--arch/arm/mach-at91/include/mach/at91cap9_ddrsdr.h100
-rw-r--r--arch/arm/mach-at91/include/mach/at91cap9_matrix.h137
-rw-r--r--arch/arm/mach-at91/include/mach/at91rm9200.h115
-rw-r--r--arch/arm/mach-at91/include/mach/at91rm9200_emac.h138
-rw-r--r--arch/arm/mach-at91/include/mach/at91rm9200_mc.h160
-rw-r--r--arch/arm/mach-at91/include/mach/at91sam9260.h138
-rw-r--r--arch/arm/mach-at91/include/mach/at91sam9260_matrix.h78
-rw-r--r--arch/arm/mach-at91/include/mach/at91sam9261.h105
-rw-r--r--arch/arm/mach-at91/include/mach/at91sam9261_matrix.h62
-rw-r--r--arch/arm/mach-at91/include/mach/at91sam9263.h127
-rw-r--r--arch/arm/mach-at91/include/mach/at91sam9263_matrix.h129
-rw-r--r--arch/arm/mach-at91/include/mach/at91sam9_sdramc.h83
-rw-r--r--arch/arm/mach-at91/include/mach/at91sam9_smc.h73
-rw-r--r--arch/arm/mach-at91/include/mach/at91sam9rl.h115
-rw-r--r--arch/arm/mach-at91/include/mach/at91sam9rl_matrix.h96
-rw-r--r--arch/arm/mach-at91/include/mach/at91x40.h55
-rw-r--r--arch/arm/mach-at91/include/mach/board.h172
-rw-r--r--arch/arm/mach-at91/include/mach/cpu.h103
-rw-r--r--arch/arm/mach-at91/include/mach/debug-macro.S39
-rw-r--r--arch/arm/mach-at91/include/mach/dma.h19
-rw-r--r--arch/arm/mach-at91/include/mach/entry-macro.S32
-rw-r--r--arch/arm/mach-at91/include/mach/gpio.h252
-rw-r--r--arch/arm/mach-at91/include/mach/hardware.h92
-rw-r--r--arch/arm/mach-at91/include/mach/io.h48
-rw-r--r--arch/arm/mach-at91/include/mach/irqs.h48
-rw-r--r--arch/arm/mach-at91/include/mach/memory.h39
-rw-r--r--arch/arm/mach-at91/include/mach/system.h53
-rw-r--r--arch/arm/mach-at91/include/mach/timex.h77
-rw-r--r--arch/arm/mach-at91/include/mach/uncompress.h76
-rw-r--r--arch/arm/mach-at91/include/mach/vmalloc.h26
-rw-r--r--arch/arm/mach-at91/irq.c3
-rw-r--r--arch/arm/mach-at91/leds.c5
-rw-r--r--arch/arm/mach-at91/pm.c17
-rw-r--r--arch/arm/mach-clps711x/autcpu12.c4
-rw-r--r--arch/arm/mach-clps711x/cdb89712.c2
-rw-r--r--arch/arm/mach-clps711x/ceiva.c2
-rw-r--r--arch/arm/mach-clps711x/edb7211-mm.c2
-rw-r--r--arch/arm/mach-clps711x/fortunet.c2
-rw-r--r--arch/arm/mach-clps711x/include/mach/autcpu12.h (renamed from include/asm-arm/arch-clps711x/autcpu12.h)0
-rw-r--r--arch/arm/mach-clps711x/include/mach/debug-macro.S46
-rw-r--r--arch/arm/mach-clps711x/include/mach/dma.h19
-rw-r--r--arch/arm/mach-clps711x/include/mach/entry-macro.S58
-rw-r--r--arch/arm/mach-clps711x/include/mach/hardware.h237
-rw-r--r--arch/arm/mach-clps711x/include/mach/io.h38
-rw-r--r--arch/arm/mach-clps711x/include/mach/irqs.h53
-rw-r--r--arch/arm/mach-clps711x/include/mach/memory.h94
-rw-r--r--arch/arm/mach-clps711x/include/mach/syspld.h121
-rw-r--r--arch/arm/mach-clps711x/include/mach/system.h40
-rw-r--r--arch/arm/mach-clps711x/include/mach/time.h49
-rw-r--r--arch/arm/mach-clps711x/include/mach/timex.h23
-rw-r--r--arch/arm/mach-clps711x/include/mach/uncompress.h59
-rw-r--r--arch/arm/mach-clps711x/include/mach/vmalloc.h20
-rw-r--r--arch/arm/mach-clps711x/irq.c2
-rw-r--r--arch/arm/mach-clps711x/mm.c2
-rw-r--r--arch/arm/mach-clps711x/p720t-leds.c2
-rw-r--r--arch/arm/mach-clps711x/p720t.c4
-rw-r--r--arch/arm/mach-clps711x/time.c2
-rw-r--r--arch/arm/mach-clps7500/core.c2
-rw-r--r--arch/arm/mach-clps7500/include/mach/acornfb.h (renamed from include/asm-arm/arch-cl7500/acornfb.h)0
-rw-r--r--arch/arm/mach-clps7500/include/mach/debug-macro.S21
-rw-r--r--arch/arm/mach-clps7500/include/mach/dma.h21
-rw-r--r--arch/arm/mach-clps7500/include/mach/entry-macro.S16
-rw-r--r--arch/arm/mach-clps7500/include/mach/hardware.h67
-rw-r--r--arch/arm/mach-clps7500/include/mach/io.h255
-rw-r--r--arch/arm/mach-clps7500/include/mach/irq.h32
-rw-r--r--arch/arm/mach-clps7500/include/mach/irqs.h66
-rw-r--r--arch/arm/mach-clps7500/include/mach/memory.h35
-rw-r--r--arch/arm/mach-clps7500/include/mach/system.h23
-rw-r--r--arch/arm/mach-clps7500/include/mach/timex.h13
-rw-r--r--arch/arm/mach-clps7500/include/mach/uncompress.h35
-rw-r--r--arch/arm/mach-clps7500/include/mach/vmalloc.h4
-rw-r--r--arch/arm/mach-davinci/board-evm.c4
-rw-r--r--arch/arm/mach-davinci/clock.c4
-rw-r--r--arch/arm/mach-davinci/gpio.c6
-rw-r--r--arch/arm/mach-davinci/include/mach/clock.h22
-rw-r--r--arch/arm/mach-davinci/include/mach/common.h (renamed from include/asm-arm/arch-davinci/common.h)0
-rw-r--r--arch/arm/mach-davinci/include/mach/debug-macro.S (renamed from include/asm-arm/arch-davinci/debug-macro.S)0
-rw-r--r--arch/arm/mach-davinci/include/mach/dma.h (renamed from include/asm-arm/arch-davinci/dma.h)0
-rw-r--r--arch/arm/mach-davinci/include/mach/entry-macro.S32
-rw-r--r--arch/arm/mach-davinci/include/mach/gpio.h159
-rw-r--r--arch/arm/mach-davinci/include/mach/hardware.h (renamed from include/asm-arm/arch-davinci/hardware.h)0
-rw-r--r--arch/arm/mach-davinci/include/mach/i2c.h (renamed from include/asm-arm/arch-davinci/i2c.h)0
-rw-r--r--arch/arm/mach-davinci/include/mach/io.h (renamed from include/asm-arm/arch-davinci/io.h)0
-rw-r--r--arch/arm/mach-davinci/include/mach/irqs.h (renamed from include/asm-arm/arch-davinci/irqs.h)0
-rw-r--r--arch/arm/mach-davinci/include/mach/memory.h (renamed from include/asm-arm/arch-davinci/memory.h)0
-rw-r--r--arch/arm/mach-davinci/include/mach/mux.h (renamed from include/asm-arm/arch-davinci/mux.h)0
-rw-r--r--arch/arm/mach-davinci/include/mach/psc.h (renamed from include/asm-arm/arch-davinci/psc.h)0
-rw-r--r--arch/arm/mach-davinci/include/mach/serial.h20
-rw-r--r--arch/arm/mach-davinci/include/mach/system.h29
-rw-r--r--arch/arm/mach-davinci/include/mach/timex.h (renamed from include/asm-arm/arch-davinci/timex.h)0
-rw-r--r--arch/arm/mach-davinci/include/mach/uncompress.h35
-rw-r--r--arch/arm/mach-davinci/include/mach/vmalloc.h15
-rw-r--r--arch/arm/mach-davinci/io.c2
-rw-r--r--arch/arm/mach-davinci/irq.c2
-rw-r--r--arch/arm/mach-davinci/mux.c4
-rw-r--r--arch/arm/mach-davinci/psc.c6
-rw-r--r--arch/arm/mach-davinci/serial.c6
-rw-r--r--arch/arm/mach-davinci/time.c4
-rw-r--r--arch/arm/mach-ebsa110/core.c2
-rw-r--r--arch/arm/mach-ebsa110/include/mach/debug-macro.S21
-rw-r--r--arch/arm/mach-ebsa110/include/mach/dma.h11
-rw-r--r--arch/arm/mach-ebsa110/include/mach/entry-macro.S39
-rw-r--r--arch/arm/mach-ebsa110/include/mach/hardware.h63
-rw-r--r--arch/arm/mach-ebsa110/include/mach/io.h92
-rw-r--r--arch/arm/mach-ebsa110/include/mach/irqs.h20
-rw-r--r--arch/arm/mach-ebsa110/include/mach/memory.h37
-rw-r--r--arch/arm/mach-ebsa110/include/mach/system.h39
-rw-r--r--arch/arm/mach-ebsa110/include/mach/timex.h19
-rw-r--r--arch/arm/mach-ebsa110/include/mach/uncompress.h45
-rw-r--r--arch/arm/mach-ebsa110/include/mach/vmalloc.h10
-rw-r--r--arch/arm/mach-ebsa110/io.c2
-rw-r--r--arch/arm/mach-ebsa110/leds.c2
-rw-r--r--arch/arm/mach-ep93xx/adssphere.c2
-rw-r--r--arch/arm/mach-ep93xx/clock.c2
-rw-r--r--arch/arm/mach-ep93xx/core.c4
-rw-r--r--arch/arm/mach-ep93xx/edb9302.c2
-rw-r--r--arch/arm/mach-ep93xx/edb9302a.c2
-rw-r--r--arch/arm/mach-ep93xx/edb9307.c2
-rw-r--r--arch/arm/mach-ep93xx/edb9312.c2
-rw-r--r--arch/arm/mach-ep93xx/edb9315.c2
-rw-r--r--arch/arm/mach-ep93xx/edb9315a.c2
-rw-r--r--arch/arm/mach-ep93xx/gesbc9312.c2
-rw-r--r--arch/arm/mach-ep93xx/gpio.c2
-rw-r--r--arch/arm/mach-ep93xx/include/mach/debug-macro.S22
-rw-r--r--arch/arm/mach-ep93xx/include/mach/dma.h3
-rw-r--r--arch/arm/mach-ep93xx/include/mach/entry-macro.S59
-rw-r--r--arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h133
-rw-r--r--arch/arm/mach-ep93xx/include/mach/gesbc9312.h3
-rw-r--r--arch/arm/mach-ep93xx/include/mach/gpio.h128
-rw-r--r--arch/arm/mach-ep93xx/include/mach/hardware.h16
-rw-r--r--arch/arm/mach-ep93xx/include/mach/io.h8
-rw-r--r--arch/arm/mach-ep93xx/include/mach/irqs.h78
-rw-r--r--arch/arm/mach-ep93xx/include/mach/memory.h14
-rw-r--r--arch/arm/mach-ep93xx/include/mach/platform.h20
-rw-r--r--arch/arm/mach-ep93xx/include/mach/system.h26
-rw-r--r--arch/arm/mach-ep93xx/include/mach/timex.h5
-rw-r--r--arch/arm/mach-ep93xx/include/mach/ts72xx.h101
-rw-r--r--arch/arm/mach-ep93xx/include/mach/uncompress.h85
-rw-r--r--arch/arm/mach-ep93xx/include/mach/vmalloc.h5
-rw-r--r--arch/arm/mach-ep93xx/micro9.c2
-rw-r--r--arch/arm/mach-ep93xx/ts72xx.c2
-rw-r--r--arch/arm/mach-footbridge/ebsa285-leds.c2
-rw-r--r--arch/arm/mach-footbridge/include/mach/debug-macro.S57
-rw-r--r--arch/arm/mach-footbridge/include/mach/dma.h25
-rw-r--r--arch/arm/mach-footbridge/include/mach/entry-macro.S113
-rw-r--r--arch/arm/mach-footbridge/include/mach/hardware.h105
-rw-r--r--arch/arm/mach-footbridge/include/mach/io.h39
-rw-r--r--arch/arm/mach-footbridge/include/mach/irqs.h98
-rw-r--r--arch/arm/mach-footbridge/include/mach/memory.h67
-rw-r--r--arch/arm/mach-footbridge/include/mach/system.h69
-rw-r--r--arch/arm/mach-footbridge/include/mach/timex.h18
-rw-r--r--arch/arm/mach-footbridge/include/mach/uncompress.h38
-rw-r--r--arch/arm/mach-footbridge/include/mach/vmalloc.h10
-rw-r--r--arch/arm/mach-footbridge/isa-irq.c2
-rw-r--r--arch/arm/mach-footbridge/netwinder-leds.c2
-rw-r--r--arch/arm/mach-footbridge/time.c4
-rw-r--r--arch/arm/mach-h720x/common.c4
-rw-r--r--arch/arm/mach-h720x/cpu-h7201.c4
-rw-r--r--arch/arm/mach-h720x/cpu-h7202.c4
-rw-r--r--arch/arm/mach-h720x/h7201-eval.c2
-rw-r--r--arch/arm/mach-h720x/h7202-eval.c2
-rw-r--r--arch/arm/mach-h720x/include/mach/boards.h53
-rw-r--r--arch/arm/mach-h720x/include/mach/debug-macro.S40
-rw-r--r--arch/arm/mach-h720x/include/mach/dma.h26
-rw-r--r--arch/arm/mach-h720x/include/mach/entry-macro.S66
-rw-r--r--arch/arm/mach-h720x/include/mach/h7201-regs.h67
-rw-r--r--arch/arm/mach-h720x/include/mach/h7202-regs.h155
-rw-r--r--arch/arm/mach-h720x/include/mach/hardware.h192
-rw-r--r--arch/arm/mach-h720x/include/mach/io.h24
-rw-r--r--arch/arm/mach-h720x/include/mach/irqs.h116
-rw-r--r--arch/arm/mach-h720x/include/mach/memory.h29
-rw-r--r--arch/arm/mach-h720x/include/mach/system.h33
-rw-r--r--arch/arm/mach-h720x/include/mach/timex.h15
-rw-r--r--arch/arm/mach-h720x/include/mach/uncompress.h37
-rw-r--r--arch/arm/mach-h720x/include/mach/vmalloc.h10
-rw-r--r--arch/arm/mach-imx/clock.c2
-rw-r--r--arch/arm/mach-imx/cpufreq.c2
-rw-r--r--arch/arm/mach-imx/dma.c4
-rw-r--r--arch/arm/mach-imx/generic.c10
-rw-r--r--arch/arm/mach-imx/include/mach/debug-macro.S34
-rw-r--r--arch/arm/mach-imx/include/mach/dma.h (renamed from include/asm-arm/arch-imx/dma.h)0
-rw-r--r--arch/arm/mach-imx/include/mach/entry-macro.S32
-rw-r--r--arch/arm/mach-imx/include/mach/gpio.h102
-rw-r--r--arch/arm/mach-imx/include/mach/hardware.h91
-rw-r--r--arch/arm/mach-imx/include/mach/imx-dma.h (renamed from include/asm-arm/arch-imx/imx-dma.h)0
-rw-r--r--arch/arm/mach-imx/include/mach/imx-regs.h (renamed from include/asm-arm/arch-imx/imx-regs.h)0
-rw-r--r--arch/arm/mach-imx/include/mach/imx-uart.h (renamed from include/asm-arm/arch-imx/imx-uart.h)0
-rw-r--r--arch/arm/mach-imx/include/mach/imxfb.h (renamed from include/asm-arm/arch-imx/imxfb.h)0
-rw-r--r--arch/arm/mach-imx/include/mach/io.h30
-rw-r--r--arch/arm/mach-imx/include/mach/irqs.h116
-rw-r--r--arch/arm/mach-imx/include/mach/memory.h36
-rw-r--r--arch/arm/mach-imx/include/mach/mmc.h (renamed from include/asm-arm/arch-imx/mmc.h)0
-rw-r--r--arch/arm/mach-imx/include/mach/mx1ads.h36
-rw-r--r--arch/arm/mach-imx/include/mach/spi_imx.h72
-rw-r--r--arch/arm/mach-imx/include/mach/system.h40
-rw-r--r--arch/arm/mach-imx/include/mach/timex.h (renamed from include/asm-arm/arch-imx/timex.h)0
-rw-r--r--arch/arm/mach-imx/include/mach/uncompress.h71
-rw-r--r--arch/arm/mach-imx/include/mach/vmalloc.h20
-rw-r--r--arch/arm/mach-imx/irq.c2
-rw-r--r--arch/arm/mach-imx/leds-mx1ads.c2
-rw-r--r--arch/arm/mach-imx/mx1ads.c6
-rw-r--r--arch/arm/mach-imx/time.c2
-rw-r--r--arch/arm/mach-integrator/core.c4
-rw-r--r--arch/arm/mach-integrator/cpu.c2
-rw-r--r--arch/arm/mach-integrator/impd1.c4
-rw-r--r--arch/arm/mach-integrator/include/mach/bits.h (renamed from include/asm-arm/arch-integrator/bits.h)0
-rw-r--r--arch/arm/mach-integrator/include/mach/cm.h (renamed from include/asm-arm/arch-integrator/cm.h)0
-rw-r--r--arch/arm/mach-integrator/include/mach/debug-macro.S22
-rw-r--r--arch/arm/mach-integrator/include/mach/dma.h19
-rw-r--r--arch/arm/mach-integrator/include/mach/entry-macro.S44
-rw-r--r--arch/arm/mach-integrator/include/mach/hardware.h48
-rw-r--r--arch/arm/mach-integrator/include/mach/impd1.h (renamed from include/asm-arm/arch-integrator/impd1.h)0
-rw-r--r--arch/arm/mach-integrator/include/mach/io.h36
-rw-r--r--arch/arm/mach-integrator/include/mach/irqs.h82
-rw-r--r--arch/arm/mach-integrator/include/mach/lm.h (renamed from include/asm-arm/arch-integrator/lm.h)0
-rw-r--r--arch/arm/mach-integrator/include/mach/memory.h39
-rw-r--r--arch/arm/mach-integrator/include/mach/platform.h (renamed from include/asm-arm/arch-integrator/platform.h)0
-rw-r--r--arch/arm/mach-integrator/include/mach/system.h44
-rw-r--r--arch/arm/mach-integrator/include/mach/timex.h26
-rw-r--r--arch/arm/mach-integrator/include/mach/uncompress.h50
-rw-r--r--arch/arm/mach-integrator/include/mach/vmalloc.h20
-rw-r--r--arch/arm/mach-integrator/integrator_ap.c4
-rw-r--r--arch/arm/mach-integrator/integrator_cp.c6
-rw-r--r--arch/arm/mach-integrator/leds.c4
-rw-r--r--arch/arm/mach-integrator/lm.c2
-rw-r--r--arch/arm/mach-integrator/pci_v3.c2
-rw-r--r--arch/arm/mach-iop13xx/include/mach/adma.h537
-rw-r--r--arch/arm/mach-iop13xx/include/mach/debug-macro.S26
-rw-r--r--arch/arm/mach-iop13xx/include/mach/dma.h (renamed from include/asm-arm/arch-iop13xx/dma.h)0
-rw-r--r--arch/arm/mach-iop13xx/include/mach/entry-macro.S (renamed from include/asm-arm/arch-iop13xx/entry-macro.S)0
-rw-r--r--arch/arm/mach-iop13xx/include/mach/hardware.h (renamed from include/asm-arm/arch-iop13xx/hardware.h)0
-rw-r--r--arch/arm/mach-iop13xx/include/mach/io.h (renamed from include/asm-arm/arch-iop13xx/io.h)0
-rw-r--r--arch/arm/mach-iop13xx/include/mach/iop13xx.h (renamed from include/asm-arm/arch-iop13xx/iop13xx.h)0
-rw-r--r--arch/arm/mach-iop13xx/include/mach/iq81340.h (renamed from include/asm-arm/arch-iop13xx/iq81340.h)0
-rw-r--r--arch/arm/mach-iop13xx/include/mach/irqs.h (renamed from include/asm-arm/arch-iop13xx/irqs.h)0
-rw-r--r--arch/arm/mach-iop13xx/include/mach/memory.h64
-rw-r--r--arch/arm/mach-iop13xx/include/mach/msi.h (renamed from include/asm-arm/arch-iop13xx/msi.h)0
-rw-r--r--arch/arm/mach-iop13xx/include/mach/pci.h57
-rw-r--r--arch/arm/mach-iop13xx/include/mach/system.h27
-rw-r--r--arch/arm/mach-iop13xx/include/mach/time.h (renamed from include/asm-arm/arch-iop13xx/time.h)0
-rw-r--r--arch/arm/mach-iop13xx/include/mach/timex.h3
-rw-r--r--arch/arm/mach-iop13xx/include/mach/uncompress.h23
-rw-r--r--arch/arm/mach-iop13xx/include/mach/vmalloc.h (renamed from include/asm-arm/arch-iop13xx/vmalloc.h)0
-rw-r--r--arch/arm/mach-iop13xx/io.c2
-rw-r--r--arch/arm/mach-iop13xx/iq81340mc.c6
-rw-r--r--arch/arm/mach-iop13xx/iq81340sc.c6
-rw-r--r--arch/arm/mach-iop13xx/irq.c7
-rw-r--r--arch/arm/mach-iop13xx/pci.c4
-rw-r--r--arch/arm/mach-iop13xx/setup.c2
-rw-r--r--arch/arm/mach-iop32x/em7210.c4
-rw-r--r--arch/arm/mach-iop32x/glantank.c4
-rw-r--r--arch/arm/mach-iop32x/include/mach/adma.h (renamed from include/asm-arm/arch-iop32x/adma.h)0
-rw-r--r--arch/arm/mach-iop32x/include/mach/debug-macro.S20
-rw-r--r--arch/arm/mach-iop32x/include/mach/dma.h9
-rw-r--r--arch/arm/mach-iop32x/include/mach/entry-macro.S36
-rw-r--r--arch/arm/mach-iop32x/include/mach/glantank.h13
-rw-r--r--arch/arm/mach-iop32x/include/mach/gpio.h (renamed from include/asm-arm/arch-iop32x/gpio.h)0
-rw-r--r--arch/arm/mach-iop32x/include/mach/hardware.h44
-rw-r--r--arch/arm/mach-iop32x/include/mach/io.h27
-rw-r--r--arch/arm/mach-iop32x/include/mach/iop32x.h37
-rw-r--r--arch/arm/mach-iop32x/include/mach/iq31244.h17
-rw-r--r--arch/arm/mach-iop32x/include/mach/iq80321.h17
-rw-r--r--arch/arm/mach-iop32x/include/mach/irqs.h50
-rw-r--r--arch/arm/mach-iop32x/include/mach/memory.h26
-rw-r--r--arch/arm/mach-iop32x/include/mach/n2100.h19
-rw-r--r--arch/arm/mach-iop32x/include/mach/system.h33
-rw-r--r--arch/arm/mach-iop32x/include/mach/time.h (renamed from include/asm-arm/arch-iop32x/time.h)0
-rw-r--r--arch/arm/mach-iop32x/include/mach/timex.h9
-rw-r--r--arch/arm/mach-iop32x/include/mach/uncompress.h39
-rw-r--r--arch/arm/mach-iop32x/include/mach/vmalloc.h5
-rw-r--r--arch/arm/mach-iop32x/iq31244.c4
-rw-r--r--arch/arm/mach-iop32x/iq80321.c4
-rw-r--r--arch/arm/mach-iop32x/irq.c2
-rw-r--r--arch/arm/mach-iop32x/n2100.c4
-rw-r--r--arch/arm/mach-iop33x/include/mach/adma.h (renamed from include/asm-arm/arch-iop33x/adma.h)0
-rw-r--r--arch/arm/mach-iop33x/include/mach/debug-macro.S24
-rw-r--r--arch/arm/mach-iop33x/include/mach/dma.h9
-rw-r--r--arch/arm/mach-iop33x/include/mach/entry-macro.S37
-rw-r--r--arch/arm/mach-iop33x/include/mach/gpio.h (renamed from include/asm-arm/arch-iop33x/gpio.h)0
-rw-r--r--arch/arm/mach-iop33x/include/mach/hardware.h46
-rw-r--r--arch/arm/mach-iop33x/include/mach/io.h27
-rw-r--r--arch/arm/mach-iop33x/include/mach/iop33x.h43
-rw-r--r--arch/arm/mach-iop33x/include/mach/iq80331.h16
-rw-r--r--arch/arm/mach-iop33x/include/mach/iq80332.h16
-rw-r--r--arch/arm/mach-iop33x/include/mach/irqs.h60
-rw-r--r--arch/arm/mach-iop33x/include/mach/memory.h26
-rw-r--r--arch/arm/mach-iop33x/include/mach/system.h22
-rw-r--r--arch/arm/mach-iop33x/include/mach/time.h (renamed from include/asm-arm/arch-iop33x/time.h)0
-rw-r--r--arch/arm/mach-iop33x/include/mach/timex.h9
-rw-r--r--arch/arm/mach-iop33x/include/mach/uncompress.h37
-rw-r--r--arch/arm/mach-iop33x/include/mach/vmalloc.h5
-rw-r--r--arch/arm/mach-iop33x/iq80331.c4
-rw-r--r--arch/arm/mach-iop33x/iq80332.c4
-rw-r--r--arch/arm/mach-iop33x/irq.c2
-rw-r--r--arch/arm/mach-iop33x/uart.c3
-rw-r--r--arch/arm/mach-ixp2000/core.c4
-rw-r--r--arch/arm/mach-ixp2000/enp2611.c2
-rw-r--r--arch/arm/mach-ixp2000/include/mach/debug-macro.S27
-rw-r--r--arch/arm/mach-ixp2000/include/mach/dma.h9
-rw-r--r--arch/arm/mach-ixp2000/include/mach/enp2611.h46
-rw-r--r--arch/arm/mach-ixp2000/include/mach/entry-macro.S60
-rw-r--r--arch/arm/mach-ixp2000/include/mach/gpio.h48
-rw-r--r--arch/arm/mach-ixp2000/include/mach/hardware.h44
-rw-r--r--arch/arm/mach-ixp2000/include/mach/io.h134
-rw-r--r--arch/arm/mach-ixp2000/include/mach/irqs.h207
-rw-r--r--arch/arm/mach-ixp2000/include/mach/ixdp2x00.h92
-rw-r--r--arch/arm/mach-ixp2000/include/mach/ixdp2x01.h57
-rw-r--r--arch/arm/mach-ixp2000/include/mach/ixp2000-regs.h457
-rw-r--r--arch/arm/mach-ixp2000/include/mach/memory.h34
-rw-r--r--arch/arm/mach-ixp2000/include/mach/platform.h152
-rw-r--r--arch/arm/mach-ixp2000/include/mach/system.h49
-rw-r--r--arch/arm/mach-ixp2000/include/mach/timex.h13
-rw-r--r--arch/arm/mach-ixp2000/include/mach/uncompress.h47
-rw-r--r--arch/arm/mach-ixp2000/include/mach/vmalloc.h20
-rw-r--r--arch/arm/mach-ixp2000/ixdp2400.c2
-rw-r--r--arch/arm/mach-ixp2000/ixdp2800.c2
-rw-r--r--arch/arm/mach-ixp2000/ixdp2x00.c4
-rw-r--r--arch/arm/mach-ixp2000/ixdp2x01.c2
-rw-r--r--arch/arm/mach-ixp2000/pci.c2
-rw-r--r--arch/arm/mach-ixp23xx/core.c3
-rw-r--r--arch/arm/mach-ixp23xx/espresso.c2
-rw-r--r--arch/arm/mach-ixp23xx/include/mach/debug-macro.S26
-rw-r--r--arch/arm/mach-ixp23xx/include/mach/dma.h3
-rw-r--r--arch/arm/mach-ixp23xx/include/mach/entry-macro.S37
-rw-r--r--arch/arm/mach-ixp23xx/include/mach/hardware.h37
-rw-r--r--arch/arm/mach-ixp23xx/include/mach/io.h54
-rw-r--r--arch/arm/mach-ixp23xx/include/mach/irqs.h223
-rw-r--r--arch/arm/mach-ixp23xx/include/mach/ixdp2351.h89
-rw-r--r--arch/arm/mach-ixp23xx/include/mach/ixp23xx.h298
-rw-r--r--arch/arm/mach-ixp23xx/include/mach/memory.h48
-rw-r--r--arch/arm/mach-ixp23xx/include/mach/platform.h57
-rw-r--r--arch/arm/mach-ixp23xx/include/mach/system.h33
-rw-r--r--arch/arm/mach-ixp23xx/include/mach/time.h3
-rw-r--r--arch/arm/mach-ixp23xx/include/mach/timex.h7
-rw-r--r--arch/arm/mach-ixp23xx/include/mach/uncompress.h40
-rw-r--r--arch/arm/mach-ixp23xx/include/mach/vmalloc.h10
-rw-r--r--arch/arm/mach-ixp23xx/ixdp2351.c2
-rw-r--r--arch/arm/mach-ixp23xx/pci.c3
-rw-r--r--arch/arm/mach-ixp23xx/roadrunner.c2
-rw-r--r--arch/arm/mach-ixp4xx/avila-pci.c2
-rw-r--r--arch/arm/mach-ixp4xx/avila-setup.c2
-rw-r--r--arch/arm/mach-ixp4xx/common-pci.c2
-rw-r--r--arch/arm/mach-ixp4xx/common.c4
-rw-r--r--arch/arm/mach-ixp4xx/coyote-pci.c2
-rw-r--r--arch/arm/mach-ixp4xx/coyote-setup.c2
-rw-r--r--arch/arm/mach-ixp4xx/gateway7001-pci.c2
-rw-r--r--arch/arm/mach-ixp4xx/gateway7001-setup.c2
-rw-r--r--arch/arm/mach-ixp4xx/gtwx5715-pci.c4
-rw-r--r--arch/arm/mach-ixp4xx/gtwx5715-setup.c4
-rw-r--r--arch/arm/mach-ixp4xx/include/mach/avila.h39
-rw-r--r--arch/arm/mach-ixp4xx/include/mach/coyote.h33
-rw-r--r--arch/arm/mach-ixp4xx/include/mach/cpu.h46
-rw-r--r--arch/arm/mach-ixp4xx/include/mach/debug-macro.S24
-rw-r--r--arch/arm/mach-ixp4xx/include/mach/dma.h21
-rw-r--r--arch/arm/mach-ixp4xx/include/mach/dsmg600.h52
-rw-r--r--arch/arm/mach-ixp4xx/include/mach/entry-macro.S47
-rw-r--r--arch/arm/mach-ixp4xx/include/mach/fsg.h50
-rw-r--r--arch/arm/mach-ixp4xx/include/mach/gpio.h73
-rw-r--r--arch/arm/mach-ixp4xx/include/mach/gtwx5715.h116
-rw-r--r--arch/arm/mach-ixp4xx/include/mach/hardware.h50
-rw-r--r--arch/arm/mach-ixp4xx/include/mach/io.h569
-rw-r--r--arch/arm/mach-ixp4xx/include/mach/irqs.h138
-rw-r--r--arch/arm/mach-ixp4xx/include/mach/ixdp425.h39
-rw-r--r--arch/arm/mach-ixp4xx/include/mach/ixp4xx-regs.h638
-rw-r--r--arch/arm/mach-ixp4xx/include/mach/memory.h40
-rw-r--r--arch/arm/mach-ixp4xx/include/mach/nas100d.h52
-rw-r--r--arch/arm/mach-ixp4xx/include/mach/npe.h (renamed from include/asm-arm/arch-ixp4xx/npe.h)0
-rw-r--r--arch/arm/mach-ixp4xx/include/mach/nslu2.h55
-rw-r--r--arch/arm/mach-ixp4xx/include/mach/platform.h173
-rw-r--r--arch/arm/mach-ixp4xx/include/mach/prpmc1100.h33
-rw-r--r--arch/arm/mach-ixp4xx/include/mach/qmgr.h (renamed from include/asm-arm/arch-ixp4xx/qmgr.h)0
-rw-r--r--arch/arm/mach-ixp4xx/include/mach/system.h42
-rw-r--r--arch/arm/mach-ixp4xx/include/mach/timex.h15
-rw-r--r--arch/arm/mach-ixp4xx/include/mach/udc.h8
-rw-r--r--arch/arm/mach-ixp4xx/include/mach/uncompress.h57
-rw-r--r--arch/arm/mach-ixp4xx/include/mach/vmalloc.h5
-rw-r--r--arch/arm/mach-ixp4xx/ixdp425-pci.c2
-rw-r--r--arch/arm/mach-ixp4xx/ixdp425-setup.c2
-rw-r--r--arch/arm/mach-ixp4xx/ixdpg425-pci.c2
-rw-r--r--arch/arm/mach-ixp4xx/ixp4xx_npe.c2
-rw-r--r--arch/arm/mach-ixp4xx/ixp4xx_qmgr.c2
-rw-r--r--arch/arm/mach-ixp4xx/wg302v2-pci.c2
-rw-r--r--arch/arm/mach-ixp4xx/wg302v2-setup.c2
-rw-r--r--arch/arm/mach-kirkwood/addr-map.c2
-rw-r--r--arch/arm/mach-kirkwood/common.c2
-rw-r--r--arch/arm/mach-kirkwood/db88f6281-bp-setup.c2
-rw-r--r--arch/arm/mach-kirkwood/include/mach/debug-macro.S20
-rw-r--r--arch/arm/mach-kirkwood/include/mach/dma.h (renamed from include/asm-arm/arch-kirkwood/dma.h)0
-rw-r--r--arch/arm/mach-kirkwood/include/mach/entry-macro.S40
-rw-r--r--arch/arm/mach-kirkwood/include/mach/hardware.h21
-rw-r--r--arch/arm/mach-kirkwood/include/mach/io.h26
-rw-r--r--arch/arm/mach-kirkwood/include/mach/irqs.h63
-rw-r--r--arch/arm/mach-kirkwood/include/mach/kirkwood.h100
-rw-r--r--arch/arm/mach-kirkwood/include/mach/memory.h14
-rw-r--r--arch/arm/mach-kirkwood/include/mach/system.h37
-rw-r--r--arch/arm/mach-kirkwood/include/mach/timex.h11
-rw-r--r--arch/arm/mach-kirkwood/include/mach/uncompress.h47
-rw-r--r--arch/arm/mach-kirkwood/include/mach/vmalloc.h5
-rw-r--r--arch/arm/mach-kirkwood/rd88f6192-nas-setup.c2
-rw-r--r--arch/arm/mach-kirkwood/rd88f6281-setup.c2
-rw-r--r--arch/arm/mach-ks8695/board-micrel.c2
-rw-r--r--arch/arm/mach-ks8695/cpu.c6
-rw-r--r--arch/arm/mach-ks8695/devices.c6
-rw-r--r--arch/arm/mach-ks8695/gpio.c6
-rw-r--r--arch/arm/mach-ks8695/include/mach/debug-macro.S38
-rw-r--r--arch/arm/mach-ks8695/include/mach/devices.h37
-rw-r--r--arch/arm/mach-ks8695/include/mach/dma.h17
-rw-r--r--arch/arm/mach-ks8695/include/mach/entry-macro.S53
-rw-r--r--arch/arm/mach-ks8695/include/mach/gpio.h79
-rw-r--r--arch/arm/mach-ks8695/include/mach/hardware.h49
-rw-r--r--arch/arm/mach-ks8695/include/mach/io.h19
-rw-r--r--arch/arm/mach-ks8695/include/mach/irqs.h54
-rw-r--r--arch/arm/mach-ks8695/include/mach/memory.h49
-rw-r--r--arch/arm/mach-ks8695/include/mach/regs-gpio.h55
-rw-r--r--arch/arm/mach-ks8695/include/mach/regs-hpna.h25
-rw-r--r--arch/arm/mach-ks8695/include/mach/regs-irq.h41
-rw-r--r--arch/arm/mach-ks8695/include/mach/regs-lan.h65
-rw-r--r--arch/arm/mach-ks8695/include/mach/regs-mem.h89
-rw-r--r--arch/arm/mach-ks8695/include/mach/regs-misc.h97
-rw-r--r--arch/arm/mach-ks8695/include/mach/regs-pci.h53
-rw-r--r--arch/arm/mach-ks8695/include/mach/regs-switch.h66
-rw-r--r--arch/arm/mach-ks8695/include/mach/regs-sys.h34
-rw-r--r--arch/arm/mach-ks8695/include/mach/regs-timer.h40
-rw-r--r--arch/arm/mach-ks8695/include/mach/regs-uart.h92
-rw-r--r--arch/arm/mach-ks8695/include/mach/regs-wan.h65
-rw-r--r--arch/arm/mach-ks8695/include/mach/system.h48
-rw-r--r--arch/arm/mach-ks8695/include/mach/timex.h20
-rw-r--r--arch/arm/mach-ks8695/include/mach/uncompress.h37
-rw-r--r--arch/arm/mach-ks8695/include/mach/vmalloc.h19
-rw-r--r--arch/arm/mach-ks8695/irq.c6
-rw-r--r--arch/arm/mach-ks8695/leds.c5
-rw-r--r--arch/arm/mach-ks8695/pci.c6
-rw-r--r--arch/arm/mach-ks8695/time.c4
-rw-r--r--arch/arm/mach-l7200/core.c2
-rw-r--r--arch/arm/mach-l7200/include/mach/aux_reg.h28
-rw-r--r--arch/arm/mach-l7200/include/mach/debug-macro.S40
-rw-r--r--arch/arm/mach-l7200/include/mach/dma.h23
-rw-r--r--arch/arm/mach-l7200/include/mach/entry-macro.S35
-rw-r--r--arch/arm/mach-l7200/include/mach/gp_timers.h42
-rw-r--r--arch/arm/mach-l7200/include/mach/gpio.h105
-rw-r--r--arch/arm/mach-l7200/include/mach/hardware.h57
-rw-r--r--arch/arm/mach-l7200/include/mach/io.h27
-rw-r--r--arch/arm/mach-l7200/include/mach/irqs.h56
-rw-r--r--arch/arm/mach-l7200/include/mach/memory.h29
-rw-r--r--arch/arm/mach-l7200/include/mach/pmpcon.h46
-rw-r--r--arch/arm/mach-l7200/include/mach/pmu.h125
-rw-r--r--arch/arm/mach-l7200/include/mach/serial.h37
-rw-r--r--arch/arm/mach-l7200/include/mach/serial_l7200.h101
-rw-r--r--arch/arm/mach-l7200/include/mach/sib.h119
-rw-r--r--arch/arm/mach-l7200/include/mach/sys-clock.h67
-rw-r--r--arch/arm/mach-l7200/include/mach/system.h29
-rw-r--r--arch/arm/mach-l7200/include/mach/time.h73
-rw-r--r--arch/arm/mach-l7200/include/mach/timex.h20
-rw-r--r--arch/arm/mach-l7200/include/mach/uncompress.h39
-rw-r--r--arch/arm/mach-l7200/include/mach/vmalloc.h4
-rw-r--r--arch/arm/mach-lh7a40x/arch-kev7a400.c2
-rw-r--r--arch/arm/mach-lh7a40x/arch-lpd7a40x.c2
-rw-r--r--arch/arm/mach-lh7a40x/clcd.c3
-rw-r--r--arch/arm/mach-lh7a40x/clocks.c4
-rw-r--r--arch/arm/mach-lh7a40x/include/mach/clocks.h18
-rw-r--r--arch/arm/mach-lh7a40x/include/mach/constants.h91
-rw-r--r--arch/arm/mach-lh7a40x/include/mach/debug-macro.S39
-rw-r--r--arch/arm/mach-lh7a40x/include/mach/dma.h86
-rw-r--r--arch/arm/mach-lh7a40x/include/mach/entry-macro.S149
-rw-r--r--arch/arm/mach-lh7a40x/include/mach/hardware.h62
-rw-r--r--arch/arm/mach-lh7a40x/include/mach/io.h22
-rw-r--r--arch/arm/mach-lh7a40x/include/mach/irqs.h200
-rw-r--r--arch/arm/mach-lh7a40x/include/mach/memory.h76
-rw-r--r--arch/arm/mach-lh7a40x/include/mach/registers.h224
-rw-r--r--arch/arm/mach-lh7a40x/include/mach/ssp.h (renamed from include/asm-arm/arch-lh7a40x/ssp.h)0
-rw-r--r--arch/arm/mach-lh7a40x/include/mach/system.h19
-rw-r--r--arch/arm/mach-lh7a40x/include/mach/timex.h17
-rw-r--r--arch/arm/mach-lh7a40x/include/mach/uncompress.h38
-rw-r--r--arch/arm/mach-lh7a40x/include/mach/vmalloc.h10
-rw-r--r--arch/arm/mach-lh7a40x/irq-lh7a400.c4
-rw-r--r--arch/arm/mach-lh7a40x/irq-lh7a404.c4
-rw-r--r--arch/arm/mach-lh7a40x/irq-lpd7a40x.c4
-rw-r--r--arch/arm/mach-lh7a40x/ssp-cpld.c4
-rw-r--r--arch/arm/mach-lh7a40x/time.c2
-rw-r--r--arch/arm/mach-loki/addr-map.c2
-rw-r--r--arch/arm/mach-loki/common.c2
-rw-r--r--arch/arm/mach-loki/include/mach/debug-macro.S20
-rw-r--r--arch/arm/mach-loki/include/mach/dma.h (renamed from include/asm-arm/arch-loki/dma.h)0
-rw-r--r--arch/arm/mach-loki/include/mach/entry-macro.S30
-rw-r--r--arch/arm/mach-loki/include/mach/hardware.h15
-rw-r--r--arch/arm/mach-loki/include/mach/io.h26
-rw-r--r--arch/arm/mach-loki/include/mach/irqs.h58
-rw-r--r--arch/arm/mach-loki/include/mach/loki.h97
-rw-r--r--arch/arm/mach-loki/include/mach/memory.h14
-rw-r--r--arch/arm/mach-loki/include/mach/system.h37
-rw-r--r--arch/arm/mach-loki/include/mach/timex.h11
-rw-r--r--arch/arm/mach-loki/include/mach/uncompress.h47
-rw-r--r--arch/arm/mach-loki/include/mach/vmalloc.h5
-rw-r--r--arch/arm/mach-loki/lb88rc8480-setup.c2
-rw-r--r--arch/arm/mach-msm/board-halibut.c6
-rw-r--r--arch/arm/mach-msm/common.c4
-rw-r--r--arch/arm/mach-msm/dma.c2
-rw-r--r--arch/arm/mach-msm/idle.S2
-rw-r--r--arch/arm/mach-msm/include/mach/board.h37
-rw-r--r--arch/arm/mach-msm/include/mach/debug-macro.S40
-rw-r--r--arch/arm/mach-msm/include/mach/dma.h151
-rw-r--r--arch/arm/mach-msm/include/mach/entry-macro.S38
-rw-r--r--arch/arm/mach-msm/include/mach/hardware.h18
-rw-r--r--arch/arm/mach-msm/include/mach/io.h33
-rw-r--r--arch/arm/mach-msm/include/mach/irqs.h90
-rw-r--r--arch/arm/mach-msm/include/mach/memory.h27
-rw-r--r--arch/arm/mach-msm/include/mach/msm_iomap.h104
-rw-r--r--arch/arm/mach-msm/include/mach/system.h23
-rw-r--r--arch/arm/mach-msm/include/mach/timex.h21
-rw-r--r--arch/arm/mach-msm/include/mach/uncompress.h36
-rw-r--r--arch/arm/mach-msm/include/mach/vmalloc.h22
-rw-r--r--arch/arm/mach-msm/io.c6
-rw-r--r--arch/arm/mach-msm/irq.c4
-rw-r--r--arch/arm/mach-msm/timer.c2
-rw-r--r--arch/arm/mach-mv78xx0/common.c2
-rw-r--r--arch/arm/mach-mv78xx0/db78x00-bp-setup.c2
-rw-r--r--arch/arm/mach-mv78xx0/include/mach/debug-macro.S20
-rw-r--r--arch/arm/mach-mv78xx0/include/mach/dma.h (renamed from include/asm-arm/arch-mv78xx0/dma.h)0
-rw-r--r--arch/arm/mach-mv78xx0/include/mach/entry-macro.S39
-rw-r--r--arch/arm/mach-mv78xx0/include/mach/hardware.h21
-rw-r--r--arch/arm/mach-mv78xx0/include/mach/io.h26
-rw-r--r--arch/arm/mach-mv78xx0/include/mach/irqs.h91
-rw-r--r--arch/arm/mach-mv78xx0/include/mach/memory.h14
-rw-r--r--arch/arm/mach-mv78xx0/include/mach/mv78xx0.h126
-rw-r--r--arch/arm/mach-mv78xx0/include/mach/system.h37
-rw-r--r--arch/arm/mach-mv78xx0/include/mach/timex.h9
-rw-r--r--arch/arm/mach-mv78xx0/include/mach/uncompress.h47
-rw-r--r--arch/arm/mach-mv78xx0/include/mach/vmalloc.h5
-rw-r--r--arch/arm/mach-mv78xx0/irq.c2
-rw-r--r--arch/arm/mach-mx2/clock_imx27.c5
-rw-r--r--arch/arm/mach-mx2/cpu_imx27.c2
-rw-r--r--arch/arm/mach-mx2/crm_regs.h2
-rw-r--r--arch/arm/mach-mx2/devices.c2
-rw-r--r--arch/arm/mach-mx2/generic.c2
-rw-r--r--arch/arm/mach-mx2/mx27ads.c12
-rw-r--r--arch/arm/mach-mx2/pcm038.c10
-rw-r--r--arch/arm/mach-mx2/pcm970-baseboard.c3
-rw-r--r--arch/arm/mach-mx2/serial.c4
-rw-r--r--arch/arm/mach-mx2/system.c2
-rw-r--r--arch/arm/mach-mx3/clock.c2
-rw-r--r--arch/arm/mach-mx3/devices.c4
-rw-r--r--arch/arm/mach-mx3/iomux.c6
-rw-r--r--arch/arm/mach-mx3/mm.c4
-rw-r--r--arch/arm/mach-mx3/mx31ads.c6
-rw-r--r--arch/arm/mach-mx3/mx31lite.c6
-rw-r--r--arch/arm/mach-mx3/pcm037.c10
-rw-r--r--arch/arm/mach-netx/fb.c4
-rw-r--r--arch/arm/mach-netx/generic.c4
-rw-r--r--arch/arm/mach-netx/include/mach/debug-macro.S38
-rw-r--r--arch/arm/mach-netx/include/mach/dma.h21
-rw-r--r--arch/arm/mach-netx/include/mach/entry-macro.S41
-rw-r--r--arch/arm/mach-netx/include/mach/eth.h27
-rw-r--r--arch/arm/mach-netx/include/mach/hardware.h39
-rw-r--r--arch/arm/mach-netx/include/mach/io.h28
-rw-r--r--arch/arm/mach-netx/include/mach/irqs.h70
-rw-r--r--arch/arm/mach-netx/include/mach/memory.h36
-rw-r--r--arch/arm/mach-netx/include/mach/netx-regs.h410
-rw-r--r--arch/arm/mach-netx/include/mach/param.h18
-rw-r--r--arch/arm/mach-netx/include/mach/pfifo.h54
-rw-r--r--arch/arm/mach-netx/include/mach/system.h38
-rw-r--r--arch/arm/mach-netx/include/mach/timex.h20
-rw-r--r--arch/arm/mach-netx/include/mach/uncompress.h76
-rw-r--r--arch/arm/mach-netx/include/mach/vmalloc.h19
-rw-r--r--arch/arm/mach-netx/include/mach/xc.h42
-rw-r--r--arch/arm/mach-netx/nxdb500.c6
-rw-r--r--arch/arm/mach-netx/nxdkn.c6
-rw-r--r--arch/arm/mach-netx/nxeb500hmi.c6
-rw-r--r--arch/arm/mach-netx/pfifo.c6
-rw-r--r--arch/arm/mach-netx/time.c4
-rw-r--r--arch/arm/mach-netx/xc.c6
-rw-r--r--arch/arm/mach-ns9xxx/board-a9m9750dev.c12
-rw-r--r--arch/arm/mach-ns9xxx/gpio-ns9360.c4
-rw-r--r--arch/arm/mach-ns9xxx/gpio.c6
-rw-r--r--arch/arm/mach-ns9xxx/include/mach/board.h42
-rw-r--r--arch/arm/mach-ns9xxx/include/mach/debug-macro.S22
-rw-r--r--arch/arm/mach-ns9xxx/include/mach/dma.h14
-rw-r--r--arch/arm/mach-ns9xxx/include/mach/entry-macro.S28
-rw-r--r--arch/arm/mach-ns9xxx/include/mach/gpio.h47
-rw-r--r--arch/arm/mach-ns9xxx/include/mach/hardware.h79
-rw-r--r--arch/arm/mach-ns9xxx/include/mach/io.h20
-rw-r--r--arch/arm/mach-ns9xxx/include/mach/irqs.h86
-rw-r--r--arch/arm/mach-ns9xxx/include/mach/memory.h27
-rw-r--r--arch/arm/mach-ns9xxx/include/mach/module.h60
-rw-r--r--arch/arm/mach-ns9xxx/include/mach/processor-ns9360.h32
-rw-r--r--arch/arm/mach-ns9xxx/include/mach/processor.h42
-rw-r--r--arch/arm/mach-ns9xxx/include/mach/regs-bbu.h45
-rw-r--r--arch/arm/mach-ns9xxx/include/mach/regs-board-a9m9750dev.h24
-rw-r--r--arch/arm/mach-ns9xxx/include/mach/regs-mem.h135
-rw-r--r--arch/arm/mach-ns9xxx/include/mach/regs-sys-common.h31
-rw-r--r--arch/arm/mach-ns9xxx/include/mach/regs-sys-ns9360.h148
-rw-r--r--arch/arm/mach-ns9xxx/include/mach/system.h35
-rw-r--r--arch/arm/mach-ns9xxx/include/mach/timex.h20
-rw-r--r--arch/arm/mach-ns9xxx/include/mach/uncompress.h164
-rw-r--r--arch/arm/mach-ns9xxx/include/mach/vmalloc.h16
-rw-r--r--arch/arm/mach-ns9xxx/irq.c7
-rw-r--r--arch/arm/mach-ns9xxx/mach-cc9p9360dev.c2
-rw-r--r--arch/arm/mach-ns9xxx/mach-cc9p9360js.c2
-rw-r--r--arch/arm/mach-ns9xxx/plat-serial8250.c4
-rw-r--r--arch/arm/mach-ns9xxx/processor-ns9360.c4
-rw-r--r--arch/arm/mach-ns9xxx/time-ns9360.c8
-rw-r--r--arch/arm/mach-omap1/board-ams-delta.c16
-rw-r--r--arch/arm/mach-omap1/board-fsample.c20
-rw-r--r--arch/arm/mach-omap1/board-generic.c12
-rw-r--r--arch/arm/mach-omap1/board-h2-mmc.c4
-rw-r--r--arch/arm/mach-omap1/board-h2.c22
-rw-r--r--arch/arm/mach-omap1/board-h3-mmc.c4
-rw-r--r--arch/arm/mach-omap1/board-h3.c26
-rw-r--r--arch/arm/mach-omap1/board-innovator.c20
-rw-r--r--arch/arm/mach-omap1/board-nokia770.c22
-rw-r--r--arch/arm/mach-omap1/board-osk.c16
-rw-r--r--arch/arm/mach-omap1/board-palmte.c24
-rw-r--r--arch/arm/mach-omap1/board-palmtt.c26
-rw-r--r--arch/arm/mach-omap1/board-palmz71.c24
-rw-r--r--arch/arm/mach-omap1/board-perseus2.c18
-rw-r--r--arch/arm/mach-omap1/board-sx1-mmc.c6
-rw-r--r--arch/arm/mach-omap1/board-sx1.c22
-rw-r--r--arch/arm/mach-omap1/board-voiceblue.c12
-rw-r--r--arch/arm/mach-omap1/clock.c8
-rw-r--r--arch/arm/mach-omap1/devices.c11
-rw-r--r--arch/arm/mach-omap1/fpga.c6
-rw-r--r--arch/arm/mach-omap1/io.c4
-rw-r--r--arch/arm/mach-omap1/irq.c6
-rw-r--r--arch/arm/mach-omap1/leds-h2p2-debug.c6
-rw-r--r--arch/arm/mach-omap1/leds-innovator.c2
-rw-r--r--arch/arm/mach-omap1/leds-osk.c4
-rw-r--r--arch/arm/mach-omap1/leds.c4
-rw-r--r--arch/arm/mach-omap1/mailbox.c4
-rw-r--r--arch/arm/mach-omap1/mcbsp.c10
-rw-r--r--arch/arm/mach-omap1/mux.c2
-rw-r--r--arch/arm/mach-omap1/pm.c21
-rw-r--r--arch/arm/mach-omap1/serial.c10
-rw-r--r--arch/arm/mach-omap1/sleep.S4
-rw-r--r--arch/arm/mach-omap1/sram.S4
-rw-r--r--arch/arm/mach-omap1/time.c2
-rw-r--r--arch/arm/mach-omap1/timer32k.c4
-rw-r--r--arch/arm/mach-omap2/board-2430sdp.c12
-rw-r--r--arch/arm/mach-omap2/board-apollon.c18
-rw-r--r--arch/arm/mach-omap2/board-generic.c12
-rw-r--r--arch/arm/mach-omap2/board-h4.c26
-rw-r--r--arch/arm/mach-omap2/clock.c6
-rw-r--r--arch/arm/mach-omap2/clock.h2
-rw-r--r--arch/arm/mach-omap2/clock24xx.c4
-rw-r--r--arch/arm/mach-omap2/clock34xx.c4
-rw-r--r--arch/arm/mach-omap2/clock34xx.h2
-rw-r--r--arch/arm/mach-omap2/control.c4
-rw-r--r--arch/arm/mach-omap2/devices.c12
-rw-r--r--arch/arm/mach-omap2/gpmc.c2
-rw-r--r--arch/arm/mach-omap2/id.c4
-rw-r--r--arch/arm/mach-omap2/io.c4
-rw-r--r--arch/arm/mach-omap2/irq.c2
-rw-r--r--arch/arm/mach-omap2/mailbox.c4
-rw-r--r--arch/arm/mach-omap2/mcbsp.c8
-rw-r--r--arch/arm/mach-omap2/memory.c6
-rw-r--r--arch/arm/mach-omap2/mux.c4
-rw-r--r--arch/arm/mach-omap2/pm.c9
-rw-r--r--arch/arm/mach-omap2/prcm.c4
-rw-r--r--arch/arm/mach-omap2/sdrc.h2
-rw-r--r--arch/arm/mach-omap2/serial.c4
-rw-r--r--arch/arm/mach-omap2/sleep.S4
-rw-r--r--arch/arm/mach-omap2/sram242x.S4
-rw-r--r--arch/arm/mach-omap2/sram243x.S4
-rw-r--r--arch/arm/mach-omap2/timer-gp.c2
-rw-r--r--arch/arm/mach-omap2/usb-tusb6010.c6
-rw-r--r--arch/arm/mach-orion5x/addr-map.c2
-rw-r--r--arch/arm/mach-orion5x/common.c4
-rw-r--r--arch/arm/mach-orion5x/db88f5281-setup.c2
-rw-r--r--arch/arm/mach-orion5x/dns323-setup.c2
-rw-r--r--arch/arm/mach-orion5x/gpio.c2
-rw-r--r--arch/arm/mach-orion5x/include/mach/debug-macro.S22
-rw-r--r--arch/arm/mach-orion5x/include/mach/dma.h (renamed from include/asm-arm/arch-orion5x/dma.h)0
-rw-r--r--arch/arm/mach-orion5x/include/mach/entry-macro.S31
-rw-r--r--arch/arm/mach-orion5x/include/mach/gpio.h28
-rw-r--r--arch/arm/mach-orion5x/include/mach/hardware.h21
-rw-r--r--arch/arm/mach-orion5x/include/mach/io.h63
-rw-r--r--arch/arm/mach-orion5x/include/mach/irqs.h62
-rw-r--r--arch/arm/mach-orion5x/include/mach/memory.h16
-rw-r--r--arch/arm/mach-orion5x/include/mach/orion5x.h162
-rw-r--r--arch/arm/mach-orion5x/include/mach/system.h32
-rw-r--r--arch/arm/mach-orion5x/include/mach/timex.h13
-rw-r--r--arch/arm/mach-orion5x/include/mach/uncompress.h49
-rw-r--r--arch/arm/mach-orion5x/include/mach/vmalloc.h5
-rw-r--r--arch/arm/mach-orion5x/irq.c2
-rw-r--r--arch/arm/mach-orion5x/kurobox_pro-setup.c2
-rw-r--r--arch/arm/mach-orion5x/mpp.c2
-rw-r--r--arch/arm/mach-orion5x/mss2-setup.c2
-rw-r--r--arch/arm/mach-orion5x/mv2120-setup.c2
-rw-r--r--arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c2
-rw-r--r--arch/arm/mach-orion5x/rd88f5181l-ge-setup.c2
-rw-r--r--arch/arm/mach-orion5x/rd88f5182-setup.c2
-rw-r--r--arch/arm/mach-orion5x/ts209-setup.c2
-rw-r--r--arch/arm/mach-orion5x/ts409-setup.c2
-rw-r--r--arch/arm/mach-orion5x/ts78xx-setup.c2
-rw-r--r--arch/arm/mach-orion5x/wnr854t-setup.c2
-rw-r--r--arch/arm/mach-orion5x/wrt350n-v2-setup.c2
-rw-r--r--arch/arm/mach-pnx4008/clock.c4
-rw-r--r--arch/arm/mach-pnx4008/core.c8
-rw-r--r--arch/arm/mach-pnx4008/dma.c4
-rw-r--r--arch/arm/mach-pnx4008/gpio.c4
-rw-r--r--arch/arm/mach-pnx4008/i2c.c4
-rw-r--r--arch/arm/mach-pnx4008/include/mach/clock.h62
-rw-r--r--arch/arm/mach-pnx4008/include/mach/debug-macro.S23
-rw-r--r--arch/arm/mach-pnx4008/include/mach/dma.h162
-rw-r--r--arch/arm/mach-pnx4008/include/mach/entry-macro.S127
-rw-r--r--arch/arm/mach-pnx4008/include/mach/gpio.h241
-rw-r--r--arch/arm/mach-pnx4008/include/mach/hardware.h32
-rw-r--r--arch/arm/mach-pnx4008/include/mach/i2c.h64
-rw-r--r--arch/arm/mach-pnx4008/include/mach/io.h21
-rw-r--r--arch/arm/mach-pnx4008/include/mach/irq.h42
-rw-r--r--arch/arm/mach-pnx4008/include/mach/irqs.h215
-rw-r--r--arch/arm/mach-pnx4008/include/mach/memory.h24
-rw-r--r--arch/arm/mach-pnx4008/include/mach/param.h21
-rw-r--r--arch/arm/mach-pnx4008/include/mach/platform.h69
-rw-r--r--arch/arm/mach-pnx4008/include/mach/pm.h33
-rw-r--r--arch/arm/mach-pnx4008/include/mach/system.h38
-rw-r--r--arch/arm/mach-pnx4008/include/mach/timex.h73
-rw-r--r--arch/arm/mach-pnx4008/include/mach/uncompress.h46
-rw-r--r--arch/arm/mach-pnx4008/include/mach/vmalloc.h20
-rw-r--r--arch/arm/mach-pnx4008/irq.c5
-rw-r--r--arch/arm/mach-pnx4008/pm.c5
-rw-r--r--arch/arm/mach-pnx4008/serial.c8
-rw-r--r--arch/arm/mach-pnx4008/sleep.S2
-rw-r--r--arch/arm/mach-pnx4008/time.c2
-rw-r--r--arch/arm/mach-pxa/akita-ioexp.c2
-rw-r--r--arch/arm/mach-pxa/clock.c6
-rw-r--r--arch/arm/mach-pxa/cm-x270-pci.c2
-rw-r--r--arch/arm/mach-pxa/cm-x270.c16
-rw-r--r--arch/arm/mach-pxa/colibri.c8
-rw-r--r--arch/arm/mach-pxa/corgi.c18
-rw-r--r--arch/arm/mach-pxa/corgi_lcd.c12
-rw-r--r--arch/arm/mach-pxa/corgi_pm.c12
-rw-r--r--arch/arm/mach-pxa/corgi_ssp.c10
-rw-r--r--arch/arm/mach-pxa/cpu-pxa.c6
-rw-r--r--arch/arm/mach-pxa/devices.c26
-rw-r--r--arch/arm/mach-pxa/dma.c4
-rw-r--r--arch/arm/mach-pxa/e400_lcd.c4
-rw-r--r--arch/arm/mach-pxa/em-x270.c16
-rw-r--r--arch/arm/mach-pxa/eseries.c2
-rw-r--r--arch/arm/mach-pxa/eseries_udc.c8
-rw-r--r--arch/arm/mach-pxa/ezx.c12
-rw-r--r--arch/arm/mach-pxa/generic.c14
-rw-r--r--arch/arm/mach-pxa/generic.h8
-rw-r--r--arch/arm/mach-pxa/gpio.c6
-rw-r--r--arch/arm/mach-pxa/gumstix.c14
-rw-r--r--arch/arm/mach-pxa/idp.c14
-rw-r--r--arch/arm/mach-pxa/include/mach/akita.h (renamed from include/asm-arm/arch-pxa/akita.h)0
-rw-r--r--arch/arm/mach-pxa/include/mach/audio.h (renamed from include/asm-arm/arch-pxa/audio.h)0
-rw-r--r--arch/arm/mach-pxa/include/mach/bitfield.h (renamed from include/asm-arm/arch-pxa/bitfield.h)0
-rw-r--r--arch/arm/mach-pxa/include/mach/camera.h (renamed from include/asm-arm/arch-pxa/camera.h)0
-rw-r--r--arch/arm/mach-pxa/include/mach/colibri.h (renamed from include/asm-arm/arch-pxa/colibri.h)0
-rw-r--r--arch/arm/mach-pxa/include/mach/corgi.h (renamed from include/asm-arm/arch-pxa/corgi.h)0
-rw-r--r--arch/arm/mach-pxa/include/mach/debug-macro.S25
-rw-r--r--arch/arm/mach-pxa/include/mach/dma.h50
-rw-r--r--arch/arm/mach-pxa/include/mach/entry-macro.S57
-rw-r--r--arch/arm/mach-pxa/include/mach/eseries-gpio.h (renamed from include/asm-arm/arch-pxa/eseries-gpio.h)0
-rw-r--r--arch/arm/mach-pxa/include/mach/eseries-irq.h (renamed from include/asm-arm/arch-pxa/eseries-irq.h)0
-rw-r--r--arch/arm/mach-pxa/include/mach/gpio.h65
-rw-r--r--arch/arm/mach-pxa/include/mach/gumstix.h96
-rw-r--r--arch/arm/mach-pxa/include/mach/hardware.h235
-rw-r--r--arch/arm/mach-pxa/include/mach/i2c.h (renamed from include/asm-arm/arch-pxa/i2c.h)0
-rw-r--r--arch/arm/mach-pxa/include/mach/idp.h199
-rw-r--r--arch/arm/mach-pxa/include/mach/io.h20
-rw-r--r--arch/arm/mach-pxa/include/mach/irda.h (renamed from include/asm-arm/arch-pxa/irda.h)0
-rw-r--r--arch/arm/mach-pxa/include/mach/irqs.h264
-rw-r--r--arch/arm/mach-pxa/include/mach/littleton.h (renamed from include/asm-arm/arch-pxa/littleton.h)0
-rw-r--r--arch/arm/mach-pxa/include/mach/lpd270.h38
-rw-r--r--arch/arm/mach-pxa/include/mach/lubbock.h40
-rw-r--r--arch/arm/mach-pxa/include/mach/magician.h117
-rw-r--r--arch/arm/mach-pxa/include/mach/mainstone.h120
-rw-r--r--arch/arm/mach-pxa/include/mach/memory.h52
-rw-r--r--arch/arm/mach-pxa/include/mach/mfp-pxa25x.h161
-rw-r--r--arch/arm/mach-pxa/include/mach/mfp-pxa27x.h433
-rw-r--r--arch/arm/mach-pxa/include/mach/mfp-pxa2xx.h133
-rw-r--r--arch/arm/mach-pxa/include/mach/mfp-pxa300.h575
-rw-r--r--arch/arm/mach-pxa/include/mach/mfp-pxa320.h447
-rw-r--r--arch/arm/mach-pxa/include/mach/mfp-pxa3xx.h (renamed from include/asm-arm/arch-pxa/mfp-pxa3xx.h)0
-rw-r--r--arch/arm/mach-pxa/include/mach/mfp-pxa930.h491
-rw-r--r--arch/arm/mach-pxa/include/mach/mfp.h319
-rw-r--r--arch/arm/mach-pxa/include/mach/mmc.h (renamed from include/asm-arm/arch-pxa/mmc.h)0
-rw-r--r--arch/arm/mach-pxa/include/mach/mtd-xip.h37
-rw-r--r--arch/arm/mach-pxa/include/mach/ohci.h (renamed from include/asm-arm/arch-pxa/ohci.h)0
-rw-r--r--arch/arm/mach-pxa/include/mach/palmtx.h (renamed from include/asm-arm/arch-pxa/palmtx.h)0
-rw-r--r--arch/arm/mach-pxa/include/mach/pcm027.h75
-rw-r--r--arch/arm/mach-pxa/include/mach/pcm990_baseboard.h275
-rw-r--r--arch/arm/mach-pxa/include/mach/pm.h (renamed from include/asm-arm/arch-pxa/pm.h)0
-rw-r--r--arch/arm/mach-pxa/include/mach/poodle.h75
-rw-r--r--arch/arm/mach-pxa/include/mach/pxa-regs.h1070
-rw-r--r--arch/arm/mach-pxa/include/mach/pxa25x-udc.h (renamed from include/asm-arm/arch-pxa/pxa25x-udc.h)0
-rw-r--r--arch/arm/mach-pxa/include/mach/pxa27x-udc.h (renamed from include/asm-arm/arch-pxa/pxa27x-udc.h)0
-rw-r--r--arch/arm/mach-pxa/include/mach/pxa27x_keypad.h (renamed from include/asm-arm/arch-pxa/pxa27x_keypad.h)0
-rw-r--r--arch/arm/mach-pxa/include/mach/pxa2xx-gpio.h (renamed from include/asm-arm/arch-pxa/pxa2xx-gpio.h)0
-rw-r--r--arch/arm/mach-pxa/include/mach/pxa2xx-regs.h246
-rw-r--r--arch/arm/mach-pxa/include/mach/pxa2xx_spi.h (renamed from include/asm-arm/arch-pxa/pxa2xx_spi.h)0
-rw-r--r--arch/arm/mach-pxa/include/mach/pxa3xx-regs.h183
-rw-r--r--arch/arm/mach-pxa/include/mach/pxa3xx_nand.h (renamed from include/asm-arm/arch-pxa/pxa3xx_nand.h)0
-rw-r--r--arch/arm/mach-pxa/include/mach/pxafb.h151
-rw-r--r--arch/arm/mach-pxa/include/mach/regs-lcd.h180
-rw-r--r--arch/arm/mach-pxa/include/mach/regs-ssp.h (renamed from include/asm-arm/arch-pxa/regs-ssp.h)0
-rw-r--r--arch/arm/mach-pxa/include/mach/reset.h18
-rw-r--r--arch/arm/mach-pxa/include/mach/sharpsl.h (renamed from include/asm-arm/arch-pxa/sharpsl.h)0
-rw-r--r--arch/arm/mach-pxa/include/mach/spitz.h (renamed from include/asm-arm/arch-pxa/spitz.h)0
-rw-r--r--arch/arm/mach-pxa/include/mach/ssp.h (renamed from include/asm-arm/arch-pxa/ssp.h)0
-rw-r--r--arch/arm/mach-pxa/include/mach/system.h24
-rw-r--r--arch/arm/mach-pxa/include/mach/timex.h26
-rw-r--r--arch/arm/mach-pxa/include/mach/tosa.h (renamed from include/asm-arm/arch-pxa/tosa.h)0
-rw-r--r--arch/arm/mach-pxa/include/mach/tosa_bt.h (renamed from include/asm-arm/arch-pxa/tosa_bt.h)0
-rw-r--r--arch/arm/mach-pxa/include/mach/trizeps4.h (renamed from include/asm-arm/arch-pxa/trizeps4.h)0
-rw-r--r--arch/arm/mach-pxa/include/mach/udc.h8
-rw-r--r--arch/arm/mach-pxa/include/mach/uncompress.h45
-rw-r--r--arch/arm/mach-pxa/include/mach/vmalloc.h11
-rw-r--r--arch/arm/mach-pxa/include/mach/zylonite.h (renamed from include/asm-arm/arch-pxa/zylonite.h)0
-rw-r--r--arch/arm/mach-pxa/irq.c4
-rw-r--r--arch/arm/mach-pxa/leds-idp.c6
-rw-r--r--arch/arm/mach-pxa/leds-lubbock.c6
-rw-r--r--arch/arm/mach-pxa/leds-mainstone.c6
-rw-r--r--arch/arm/mach-pxa/leds-trizeps4.c8
-rw-r--r--arch/arm/mach-pxa/littleton.c18
-rw-r--r--arch/arm/mach-pxa/lpd270.c20
-rw-r--r--arch/arm/mach-pxa/lubbock.c24
-rw-r--r--arch/arm/mach-pxa/magician.c20
-rw-r--r--arch/arm/mach-pxa/mainstone.c24
-rw-r--r--arch/arm/mach-pxa/mfp-pxa2xx.c8
-rw-r--r--arch/arm/mach-pxa/mfp-pxa3xx.c8
-rw-r--r--arch/arm/mach-pxa/palmtx.c18
-rw-r--r--arch/arm/mach-pxa/pcm027.c12
-rw-r--r--arch/arm/mach-pxa/pcm990-baseboard.c18
-rw-r--r--arch/arm/mach-pxa/pm.c8
-rw-r--r--arch/arm/mach-pxa/poodle.c22
-rw-r--r--arch/arm/mach-pxa/pwm.c2
-rw-r--r--arch/arm/mach-pxa/pxa25x.c18
-rw-r--r--arch/arm/mach-pxa/pxa27x.c22
-rw-r--r--arch/arm/mach-pxa/pxa2xx.c15
-rw-r--r--arch/arm/mach-pxa/pxa300.c6
-rw-r--r--arch/arm/mach-pxa/pxa320.c8
-rw-r--r--arch/arm/mach-pxa/pxa3xx.c22
-rw-r--r--arch/arm/mach-pxa/pxa930.c4
-rw-r--r--arch/arm/mach-pxa/reset.c10
-rw-r--r--arch/arm/mach-pxa/saar.c6
-rw-r--r--arch/arm/mach-pxa/sharpsl_pm.c10
-rw-r--r--arch/arm/mach-pxa/sleep.S6
-rw-r--r--arch/arm/mach-pxa/spitz.c27
-rw-r--r--arch/arm/mach-pxa/spitz_pm.c12
-rw-r--r--arch/arm/mach-pxa/ssp.c8
-rw-r--r--arch/arm/mach-pxa/standby.S6
-rw-r--r--arch/arm/mach-pxa/tavorevb.c6
-rw-r--r--arch/arm/mach-pxa/time.c2
-rw-r--r--arch/arm/mach-pxa/tosa-bt.c2
-rw-r--r--arch/arm/mach-pxa/tosa.c17
-rw-r--r--arch/arm/mach-pxa/trizeps4.c20
-rw-r--r--arch/arm/mach-pxa/zylonite.c16
-rw-r--r--arch/arm/mach-pxa/zylonite_pxa300.c6
-rw-r--r--arch/arm/mach-pxa/zylonite_pxa320.c6
-rw-r--r--arch/arm/mach-realview/core.c2
-rw-r--r--arch/arm/mach-realview/include/mach/board-eb.h191
-rw-r--r--arch/arm/mach-realview/include/mach/board-pb1176.h152
-rw-r--r--arch/arm/mach-realview/include/mach/board-pb11mp.h186
-rw-r--r--arch/arm/mach-realview/include/mach/debug-macro.S22
-rw-r--r--arch/arm/mach-realview/include/mach/dma.h20
-rw-r--r--arch/arm/mach-realview/include/mach/entry-macro.S81
-rw-r--r--arch/arm/mach-realview/include/mach/hardware.h31
-rw-r--r--arch/arm/mach-realview/include/mach/io.h33
-rw-r--r--arch/arm/mach-realview/include/mach/irqs.h38
-rw-r--r--arch/arm/mach-realview/include/mach/memory.h38
-rw-r--r--arch/arm/mach-realview/include/mach/platform.h293
-rw-r--r--arch/arm/mach-realview/include/mach/scu.h (renamed from include/asm-arm/arch-realview/scu.h)0
-rw-r--r--arch/arm/mach-realview/include/mach/smp.h (renamed from include/asm-arm/arch-realview/smp.h)0
-rw-r--r--arch/arm/mach-realview/include/mach/system.h51
-rw-r--r--arch/arm/mach-realview/include/mach/timex.h23
-rw-r--r--arch/arm/mach-realview/include/mach/uncompress.h72
-rw-r--r--arch/arm/mach-realview/include/mach/vmalloc.h21
-rw-r--r--arch/arm/mach-realview/localtimer.c2
-rw-r--r--arch/arm/mach-realview/platsmp.c8
-rw-r--r--arch/arm/mach-realview/realview_eb.c6
-rw-r--r--arch/arm/mach-realview/realview_pb1176.c6
-rw-r--r--arch/arm/mach-realview/realview_pb11mp.c6
-rw-r--r--arch/arm/mach-rpc/dma.c2
-rw-r--r--arch/arm/mach-rpc/include/mach/acornfb.h140
-rw-r--r--arch/arm/mach-rpc/include/mach/debug-macro.S25
-rw-r--r--arch/arm/mach-rpc/include/mach/dma.h33
-rw-r--r--arch/arm/mach-rpc/include/mach/entry-macro.S16
-rw-r--r--arch/arm/mach-rpc/include/mach/hardware.h83
-rw-r--r--arch/arm/mach-rpc/include/mach/io.h258
-rw-r--r--arch/arm/mach-rpc/include/mach/irqs.h46
-rw-r--r--arch/arm/mach-rpc/include/mach/memory.h39
-rw-r--r--arch/arm/mach-rpc/include/mach/system.h27
-rw-r--r--arch/arm/mach-rpc/include/mach/timex.h17
-rw-r--r--arch/arm/mach-rpc/include/mach/uncompress.h198
-rw-r--r--arch/arm/mach-rpc/include/mach/vmalloc.h10
-rw-r--r--arch/arm/mach-rpc/riscpc.c2
-rw-r--r--arch/arm/mach-s3c2400/gpio.c4
-rw-r--r--arch/arm/mach-s3c2400/include/mach/map.h66
-rw-r--r--arch/arm/mach-s3c2400/include/mach/memory.h23
-rw-r--r--arch/arm/mach-s3c2410/bast-ide.c6
-rw-r--r--arch/arm/mach-s3c2410/bast-irq.c8
-rw-r--r--arch/arm/mach-s3c2410/clock.c6
-rw-r--r--arch/arm/mach-s3c2410/dma.c10
-rw-r--r--arch/arm/mach-s3c2410/gpio.c4
-rw-r--r--arch/arm/mach-s3c2410/h1940-bluetooth.c6
-rw-r--r--arch/arm/mach-s3c2410/include/mach/anubis-cpld.h25
-rw-r--r--arch/arm/mach-s3c2410/include/mach/anubis-irq.h21
-rw-r--r--arch/arm/mach-s3c2410/include/mach/anubis-map.h38
-rw-r--r--arch/arm/mach-s3c2410/include/mach/audio.h45
-rw-r--r--arch/arm/mach-s3c2410/include/mach/bast-cpld.h53
-rw-r--r--arch/arm/mach-s3c2410/include/mach/bast-irq.h29
-rw-r--r--arch/arm/mach-s3c2410/include/mach/bast-map.h146
-rw-r--r--arch/arm/mach-s3c2410/include/mach/bast-pmu.h40
-rw-r--r--arch/arm/mach-s3c2410/include/mach/debug-macro.S102
-rw-r--r--arch/arm/mach-s3c2410/include/mach/dma.h453
-rw-r--r--arch/arm/mach-s3c2410/include/mach/entry-macro.S78
-rw-r--r--arch/arm/mach-s3c2410/include/mach/fb.h74
-rw-r--r--arch/arm/mach-s3c2410/include/mach/gpio.h18
-rw-r--r--arch/arm/mach-s3c2410/include/mach/h1940-latch.h64
-rw-r--r--arch/arm/mach-s3c2410/include/mach/h1940.h21
-rw-r--r--arch/arm/mach-s3c2410/include/mach/hardware.h137
-rw-r--r--arch/arm/mach-s3c2410/include/mach/idle.h24
-rw-r--r--arch/arm/mach-s3c2410/include/mach/io.h218
-rw-r--r--arch/arm/mach-s3c2410/include/mach/irqs.h166
-rw-r--r--arch/arm/mach-s3c2410/include/mach/leds-gpio.h28
-rw-r--r--arch/arm/mach-s3c2410/include/mach/map.h178
-rw-r--r--arch/arm/mach-s3c2410/include/mach/memory.h19
-rw-r--r--arch/arm/mach-s3c2410/include/mach/osiris-cpld.h30
-rw-r--r--arch/arm/mach-s3c2410/include/mach/osiris-map.h42
-rw-r--r--arch/arm/mach-s3c2410/include/mach/otom-map.h30
-rw-r--r--arch/arm/mach-s3c2410/include/mach/regs-clock.h197
-rw-r--r--arch/arm/mach-s3c2410/include/mach/regs-dsc.h184
-rw-r--r--arch/arm/mach-s3c2410/include/mach/regs-gpio.h1163
-rw-r--r--arch/arm/mach-s3c2410/include/mach/regs-gpioj.h106
-rw-r--r--arch/arm/mach-s3c2410/include/mach/regs-irq.h43
-rw-r--r--arch/arm/mach-s3c2410/include/mach/regs-lcd.h162
-rw-r--r--arch/arm/mach-s3c2410/include/mach/regs-mem.h220
-rw-r--r--arch/arm/mach-s3c2410/include/mach/regs-power.h40
-rw-r--r--arch/arm/mach-s3c2410/include/mach/regs-s3c2412-mem.h29
-rw-r--r--arch/arm/mach-s3c2410/include/mach/regs-s3c2412.h23
-rw-r--r--arch/arm/mach-s3c2410/include/mach/regs-s3c2443-clock.h195
-rw-r--r--arch/arm/mach-s3c2410/include/mach/regs-sdi.h127
-rw-r--r--arch/arm/mach-s3c2410/include/mach/reset.h22
-rw-r--r--arch/arm/mach-s3c2410/include/mach/spi-gpio.h27
-rw-r--r--arch/arm/mach-s3c2410/include/mach/spi.h25
-rw-r--r--arch/arm/mach-s3c2410/include/mach/system-reset.h64
-rw-r--r--arch/arm/mach-s3c2410/include/mach/system.h58
-rw-r--r--arch/arm/mach-s3c2410/include/mach/timex.h26
-rw-r--r--arch/arm/mach-s3c2410/include/mach/uncompress.h52
-rw-r--r--arch/arm/mach-s3c2410/include/mach/usb-control.h41
-rw-r--r--arch/arm/mach-s3c2410/include/mach/vmalloc.h20
-rw-r--r--arch/arm/mach-s3c2410/include/mach/vr1000-cpld.h18
-rw-r--r--arch/arm/mach-s3c2410/include/mach/vr1000-irq.h26
-rw-r--r--arch/arm/mach-s3c2410/include/mach/vr1000-map.h110
-rw-r--r--arch/arm/mach-s3c2410/mach-amlm5900.c8
-rw-r--r--arch/arm/mach-s3c2410/mach-bast.c16
-rw-r--r--arch/arm/mach-s3c2410/mach-h1940.c14
-rw-r--r--arch/arm/mach-s3c2410/mach-n30.c10
-rw-r--r--arch/arm/mach-s3c2410/mach-otom.c6
-rw-r--r--arch/arm/mach-s3c2410/mach-qt2410.c12
-rw-r--r--arch/arm/mach-s3c2410/mach-smdk2410.c2
-rw-r--r--arch/arm/mach-s3c2410/mach-tct_hammer.c2
-rw-r--r--arch/arm/mach-s3c2410/mach-vr1000.c14
-rw-r--r--arch/arm/mach-s3c2410/nor-simtec.c6
-rw-r--r--arch/arm/mach-s3c2410/pm-h1940.S6
-rw-r--r--arch/arm/mach-s3c2410/pm.c6
-rw-r--r--arch/arm/mach-s3c2410/s3c2410.c4
-rw-r--r--arch/arm/mach-s3c2410/sleep.S10
-rw-r--r--arch/arm/mach-s3c2410/usb-simtec.c10
-rw-r--r--arch/arm/mach-s3c2412/clock.c6
-rw-r--r--arch/arm/mach-s3c2412/dma.c10
-rw-r--r--arch/arm/mach-s3c2412/gpio.c4
-rw-r--r--arch/arm/mach-s3c2412/irq.c8
-rw-r--r--arch/arm/mach-s3c2412/mach-jive.c12
-rw-r--r--arch/arm/mach-s3c2412/mach-smdk2413.c10
-rw-r--r--arch/arm/mach-s3c2412/mach-vstms.c10
-rw-r--r--arch/arm/mach-s3c2412/pm.c10
-rw-r--r--arch/arm/mach-s3c2412/s3c2412.c18
-rw-r--r--arch/arm/mach-s3c2412/sleep.S6
-rw-r--r--arch/arm/mach-s3c2440/clock.c4
-rw-r--r--arch/arm/mach-s3c2440/dma.c10
-rw-r--r--arch/arm/mach-s3c2440/dsc.c6
-rw-r--r--arch/arm/mach-s3c2440/irq.c6
-rw-r--r--arch/arm/mach-s3c2440/mach-anubis.c14
-rw-r--r--arch/arm/mach-s3c2440/mach-at2440evb.c8
-rw-r--r--arch/arm/mach-s3c2440/mach-nexcoder.c4
-rw-r--r--arch/arm/mach-s3c2440/mach-osiris.c12
-rw-r--r--arch/arm/mach-s3c2440/mach-rx3715.c10
-rw-r--r--arch/arm/mach-s3c2440/mach-smdk2440.c10
-rw-r--r--arch/arm/mach-s3c2440/s3c2440.c2
-rw-r--r--arch/arm/mach-s3c2442/clock.c4
-rw-r--r--arch/arm/mach-s3c2443/clock.c4
-rw-r--r--arch/arm/mach-s3c2443/dma.c10
-rw-r--r--arch/arm/mach-s3c2443/irq.c6
-rw-r--r--arch/arm/mach-s3c2443/mach-smdk2443.c10
-rw-r--r--arch/arm/mach-s3c2443/s3c2443.c6
-rw-r--r--arch/arm/mach-sa1100/Makefile3
-rw-r--r--arch/arm/mach-sa1100/assabet.c6
-rw-r--r--arch/arm/mach-sa1100/badge4.c6
-rw-r--r--arch/arm/mach-sa1100/cerf.c6
-rw-r--r--arch/arm/mach-sa1100/clock.c2
-rw-r--r--arch/arm/mach-sa1100/collie.c6
-rw-r--r--arch/arm/mach-sa1100/collie_pm.c5
-rw-r--r--arch/arm/mach-sa1100/cpu-sa1100.c2
-rw-r--r--arch/arm/mach-sa1100/cpu-sa1110.c2
-rw-r--r--arch/arm/mach-sa1100/dma.c4
-rw-r--r--arch/arm/mach-sa1100/generic.c5
-rw-r--r--arch/arm/mach-sa1100/gpio.c2
-rw-r--r--arch/arm/mach-sa1100/h3600.c10
-rw-r--r--arch/arm/mach-sa1100/hackkit.c2
-rw-r--r--arch/arm/mach-sa1100/include/mach/SA-1100.h (renamed from include/asm-arm/arch-sa1100/SA-1100.h)0
-rw-r--r--arch/arm/mach-sa1100/include/mach/SA-1101.h925
-rw-r--r--arch/arm/mach-sa1100/include/mach/SA-1111.h (renamed from include/asm-arm/arch-sa1100/SA-1111.h)0
-rw-r--r--arch/arm/mach-sa1100/include/mach/assabet.h105
-rw-r--r--arch/arm/mach-sa1100/include/mach/badge4.h75
-rw-r--r--arch/arm/mach-sa1100/include/mach/bitfield.h (renamed from include/asm-arm/arch-sa1100/bitfield.h)0
-rw-r--r--arch/arm/mach-sa1100/include/mach/cerf.h28
-rw-r--r--arch/arm/mach-sa1100/include/mach/collie.h88
-rw-r--r--arch/arm/mach-sa1100/include/mach/debug-macro.S58
-rw-r--r--arch/arm/mach-sa1100/include/mach/dma.h117
-rw-r--r--arch/arm/mach-sa1100/include/mach/entry-macro.S47
-rw-r--r--arch/arm/mach-sa1100/include/mach/gpio.h68
-rw-r--r--arch/arm/mach-sa1100/include/mach/h3600.h (renamed from include/asm-arm/arch-sa1100/h3600.h)0
-rw-r--r--arch/arm/mach-sa1100/include/mach/h3600_gpio.h (renamed from include/asm-arm/arch-sa1100/h3600_gpio.h)0
-rw-r--r--arch/arm/mach-sa1100/include/mach/hardware.h57
-rw-r--r--arch/arm/mach-sa1100/include/mach/ide.h75
-rw-r--r--arch/arm/mach-sa1100/include/mach/io.h26
-rw-r--r--arch/arm/mach-sa1100/include/mach/irqs.h197
-rw-r--r--arch/arm/mach-sa1100/include/mach/jornada720.h27
-rw-r--r--arch/arm/mach-sa1100/include/mach/lart.h (renamed from include/asm-arm/arch-sa1100/lart.h)0
-rw-r--r--arch/arm/mach-sa1100/include/mach/mcp.h21
-rw-r--r--arch/arm/mach-sa1100/include/mach/memory.h68
-rw-r--r--arch/arm/mach-sa1100/include/mach/mtd-xip.h (renamed from include/asm-arm/arch-sa1100/mtd-xip.h)0
-rw-r--r--arch/arm/mach-sa1100/include/mach/neponset.h74
-rw-r--r--arch/arm/mach-sa1100/include/mach/reset.h18
-rw-r--r--arch/arm/mach-sa1100/include/mach/shannon.h (renamed from include/asm-arm/arch-sa1100/shannon.h)0
-rw-r--r--arch/arm/mach-sa1100/include/mach/simpad.h112
-rw-r--r--arch/arm/mach-sa1100/include/mach/system.h22
-rw-r--r--arch/arm/mach-sa1100/include/mach/timex.h12
-rw-r--r--arch/arm/mach-sa1100/include/mach/uncompress.h50
-rw-r--r--arch/arm/mach-sa1100/include/mach/vmalloc.h4
-rw-r--r--arch/arm/mach-sa1100/irq.c2
-rw-r--r--arch/arm/mach-sa1100/jornada720.c2
-rw-r--r--arch/arm/mach-sa1100/jornada720_ssp.c4
-rw-r--r--arch/arm/mach-sa1100/lart.c4
-rw-r--r--arch/arm/mach-sa1100/leds-assabet.c4
-rw-r--r--arch/arm/mach-sa1100/leds-badge4.c2
-rw-r--r--arch/arm/mach-sa1100/leds-cerf.c2
-rw-r--r--arch/arm/mach-sa1100/leds-hackkit.c2
-rw-r--r--arch/arm/mach-sa1100/leds-lart.c2
-rw-r--r--arch/arm/mach-sa1100/leds-simpad.c4
-rw-r--r--arch/arm/mach-sa1100/neponset.c6
-rw-r--r--arch/arm/mach-sa1100/pleb.c4
-rw-r--r--arch/arm/mach-sa1100/pm.c2
-rw-r--r--arch/arm/mach-sa1100/shannon.c6
-rw-r--r--arch/arm/mach-sa1100/simpad.c6
-rw-r--r--arch/arm/mach-sa1100/sleep.S2
-rw-r--r--arch/arm/mach-sa1100/ssp.c2
-rw-r--r--arch/arm/mach-sa1100/time.c2
-rw-r--r--arch/arm/mach-shark/include/mach/debug-macro.S31
-rw-r--r--arch/arm/mach-shark/include/mach/dma.h18
-rw-r--r--arch/arm/mach-shark/include/mach/entry-macro.S41
-rw-r--r--arch/arm/mach-shark/include/mach/hardware.h51
-rw-r--r--arch/arm/mach-shark/include/mach/io.h56
-rw-r--r--arch/arm/mach-shark/include/mach/irqs.h13
-rw-r--r--arch/arm/mach-shark/include/mach/memory.h48
-rw-r--r--arch/arm/mach-shark/include/mach/system.h28
-rw-r--r--arch/arm/mach-shark/include/mach/timex.h7
-rw-r--r--arch/arm/mach-shark/include/mach/uncompress.h51
-rw-r--r--arch/arm/mach-shark/include/mach/vmalloc.h4
-rw-r--r--arch/arm/mach-shark/irq.c2
-rw-r--r--arch/arm/mach-shark/leds.c2
-rw-r--r--arch/arm/mach-versatile/core.c2
-rw-r--r--arch/arm/mach-versatile/include/mach/debug-macro.S23
-rw-r--r--arch/arm/mach-versatile/include/mach/dma.h20
-rw-r--r--arch/arm/mach-versatile/include/mach/entry-macro.S44
-rw-r--r--arch/arm/mach-versatile/include/mach/hardware.h52
-rw-r--r--arch/arm/mach-versatile/include/mach/io.h32
-rw-r--r--arch/arm/mach-versatile/include/mach/irqs.h211
-rw-r--r--arch/arm/mach-versatile/include/mach/memory.h38
-rw-r--r--arch/arm/mach-versatile/include/mach/platform.h510
-rw-r--r--arch/arm/mach-versatile/include/mach/system.h49
-rw-r--r--arch/arm/mach-versatile/include/mach/timex.h23
-rw-r--r--arch/arm/mach-versatile/include/mach/uncompress.h46
-rw-r--r--arch/arm/mach-versatile/include/mach/vmalloc.h21
-rw-r--r--arch/arm/mach-versatile/pci.c2
-rw-r--r--arch/arm/mach-versatile/versatile_ab.c2
-rw-r--r--arch/arm/mach-versatile/versatile_pb.c2
-rw-r--r--arch/arm/mm/cache-v3.S2
-rw-r--r--arch/arm/mm/cache-v4.S2
-rw-r--r--arch/arm/mm/cache-v4wt.S2
-rw-r--r--arch/arm/mm/proc-sa110.S2
-rw-r--r--arch/arm/mm/proc-sa1100.S2
-rw-r--r--arch/arm/mm/proc-xsc3.S2
-rw-r--r--arch/arm/oprofile/op_model_mpcore.c2
-rw-r--r--arch/arm/plat-iop/adma.c2
-rw-r--r--arch/arm/plat-iop/i2c.c3
-rw-r--r--arch/arm/plat-iop/io.c2
-rw-r--r--arch/arm/plat-iop/pci.c3
-rw-r--r--arch/arm/plat-iop/time.c4
-rw-r--r--arch/arm/plat-mxc/clock.c2
-rw-r--r--arch/arm/plat-mxc/gpio.c2
-rw-r--r--arch/arm/plat-mxc/include/mach/board-mx27ads.h (renamed from include/asm-arm/arch-mxc/board-mx27ads.h)0
-rw-r--r--arch/arm/plat-mxc/include/mach/board-mx31ads.h (renamed from include/asm-arm/arch-mxc/board-mx31ads.h)0
-rw-r--r--arch/arm/plat-mxc/include/mach/board-mx31lite.h (renamed from include/asm-arm/arch-mxc/board-mx31lite.h)0
-rw-r--r--arch/arm/plat-mxc/include/mach/board-pcm037.h (renamed from include/asm-arm/arch-mxc/board-pcm037.h)0
-rw-r--r--arch/arm/plat-mxc/include/mach/board-pcm038.h (renamed from include/asm-arm/arch-mxc/board-pcm038.h)0
-rw-r--r--arch/arm/plat-mxc/include/mach/clock.h (renamed from include/asm-arm/arch-mxc/clock.h)0
-rw-r--r--arch/arm/plat-mxc/include/mach/common.h (renamed from include/asm-arm/arch-mxc/common.h)0
-rw-r--r--arch/arm/plat-mxc/include/mach/debug-macro.S49
-rw-r--r--arch/arm/plat-mxc/include/mach/dma.h (renamed from include/asm-arm/arch-mxc/dma.h)0
-rw-r--r--arch/arm/plat-mxc/include/mach/entry-macro.S (renamed from include/asm-arm/arch-mxc/entry-macro.S)0
-rw-r--r--arch/arm/plat-mxc/include/mach/gpio.h42
-rw-r--r--arch/arm/plat-mxc/include/mach/hardware.h37
-rw-r--r--arch/arm/plat-mxc/include/mach/iim.h (renamed from include/asm-arm/arch-mxc/iim.h)0
-rw-r--r--arch/arm/plat-mxc/include/mach/imx-uart.h (renamed from include/asm-arm/arch-mxc/imx-uart.h)0
-rw-r--r--arch/arm/plat-mxc/include/mach/io.h (renamed from include/asm-arm/arch-mxc/io.h)0
-rw-r--r--arch/arm/plat-mxc/include/mach/iomux-mx1-mx2.h (renamed from include/asm-arm/arch-mxc/iomux-mx1-mx2.h)0
-rw-r--r--arch/arm/plat-mxc/include/mach/iomux-mx3.h (renamed from include/asm-arm/arch-mxc/iomux-mx3.h)0
-rw-r--r--arch/arm/plat-mxc/include/mach/irqs.h16
-rw-r--r--arch/arm/plat-mxc/include/mach/memory.h29
-rw-r--r--arch/arm/plat-mxc/include/mach/mx27.h (renamed from include/asm-arm/arch-mxc/mx27.h)0
-rw-r--r--arch/arm/plat-mxc/include/mach/mx31.h (renamed from include/asm-arm/arch-mxc/mx31.h)0
-rw-r--r--arch/arm/plat-mxc/include/mach/mxc.h (renamed from include/asm-arm/arch-mxc/mxc.h)0
-rw-r--r--arch/arm/plat-mxc/include/mach/mxc_timer.h158
-rw-r--r--arch/arm/plat-mxc/include/mach/system.h (renamed from include/asm-arm/arch-mxc/system.h)0
-rw-r--r--arch/arm/plat-mxc/include/mach/timex.h25
-rw-r--r--arch/arm/plat-mxc/include/mach/uncompress.h78
-rw-r--r--arch/arm/plat-mxc/include/mach/vmalloc.h (renamed from include/asm-arm/arch-mxc/vmalloc.h)0
-rw-r--r--arch/arm/plat-mxc/iomux-mx1-mx2.c4
-rw-r--r--arch/arm/plat-mxc/irq.c2
-rw-r--r--arch/arm/plat-mxc/time.c6
-rw-r--r--arch/arm/plat-omap/clock.c2
-rw-r--r--arch/arm/plat-omap/common.c14
-rw-r--r--arch/arm/plat-omap/cpu-omap.c2
-rw-r--r--arch/arm/plat-omap/debug-devices.c6
-rw-r--r--arch/arm/plat-omap/debug-leds.c6
-rw-r--r--arch/arm/plat-omap/devices.c14
-rw-r--r--arch/arm/plat-omap/dma.c4
-rw-r--r--arch/arm/plat-omap/dmtimer.c6
-rw-r--r--arch/arm/plat-omap/fb.c9
-rw-r--r--arch/arm/plat-omap/gpio.c6
-rw-r--r--arch/arm/plat-omap/i2c.c3
-rw-r--r--arch/arm/plat-omap/include/mach/aic23.h116
-rw-r--r--arch/arm/plat-omap/include/mach/blizzard.h (renamed from include/asm-arm/arch-omap/blizzard.h)0
-rw-r--r--arch/arm/plat-omap/include/mach/board-2430sdp.h39
-rw-r--r--arch/arm/plat-omap/include/mach/board-ams-delta.h76
-rw-r--r--arch/arm/plat-omap/include/mach/board-apollon.h38
-rw-r--r--arch/arm/plat-omap/include/mach/board-fsample.h51
-rw-r--r--arch/arm/plat-omap/include/mach/board-h2.h41
-rw-r--r--arch/arm/plat-omap/include/mach/board-h3.h36
-rw-r--r--arch/arm/plat-omap/include/mach/board-h4.h35
-rw-r--r--arch/arm/plat-omap/include/mach/board-innovator.h52
-rw-r--r--arch/arm/plat-omap/include/mach/board-nokia.h54
-rw-r--r--arch/arm/plat-omap/include/mach/board-osk.h47
-rw-r--r--arch/arm/plat-omap/include/mach/board-palmte.h32
-rw-r--r--arch/arm/plat-omap/include/mach/board-palmtt.h23
-rw-r--r--arch/arm/plat-omap/include/mach/board-palmz71.h26
-rw-r--r--arch/arm/plat-omap/include/mach/board-perseus2.h39
-rw-r--r--arch/arm/plat-omap/include/mach/board-sx1.h (renamed from include/asm-arm/arch-omap/board-sx1.h)0
-rw-r--r--arch/arm/plat-omap/include/mach/board-voiceblue.h (renamed from include/asm-arm/arch-omap/board-voiceblue.h)0
-rw-r--r--arch/arm/plat-omap/include/mach/board.h186
-rw-r--r--arch/arm/plat-omap/include/mach/clock.h162
-rw-r--r--arch/arm/plat-omap/include/mach/common.h69
-rw-r--r--arch/arm/plat-omap/include/mach/control.h189
-rw-r--r--arch/arm/plat-omap/include/mach/cpu.h402
-rw-r--r--arch/arm/plat-omap/include/mach/debug-macro.S58
-rw-r--r--arch/arm/plat-omap/include/mach/dma.h570
-rw-r--r--arch/arm/plat-omap/include/mach/dmtimer.h84
-rw-r--r--arch/arm/plat-omap/include/mach/dsp_common.h (renamed from include/asm-arm/arch-omap/dsp_common.h)0
-rw-r--r--arch/arm/plat-omap/include/mach/eac.h100
-rw-r--r--arch/arm/plat-omap/include/mach/entry-macro.S89
-rw-r--r--arch/arm/plat-omap/include/mach/fpga.h197
-rw-r--r--arch/arm/plat-omap/include/mach/gpio-switch.h (renamed from include/asm-arm/arch-omap/gpio-switch.h)0
-rw-r--r--arch/arm/plat-omap/include/mach/gpio.h122
-rw-r--r--arch/arm/plat-omap/include/mach/gpioexpander.h35
-rw-r--r--arch/arm/plat-omap/include/mach/gpmc.h (renamed from include/asm-arm/arch-omap/gpmc.h)0
-rw-r--r--arch/arm/plat-omap/include/mach/hardware.h355
-rw-r--r--arch/arm/plat-omap/include/mach/hwa742.h (renamed from include/asm-arm/arch-omap/hwa742.h)0
-rw-r--r--arch/arm/plat-omap/include/mach/io.h197
-rw-r--r--arch/arm/plat-omap/include/mach/irda.h37
-rw-r--r--arch/arm/plat-omap/include/mach/irqs.h332
-rw-r--r--arch/arm/plat-omap/include/mach/keypad.h39
-rw-r--r--arch/arm/plat-omap/include/mach/lcd_mipid.h (renamed from include/asm-arm/arch-omap/lcd_mipid.h)0
-rw-r--r--arch/arm/plat-omap/include/mach/led.h24
-rw-r--r--arch/arm/plat-omap/include/mach/mailbox.h (renamed from include/asm-arm/arch-omap/mailbox.h)0
-rw-r--r--arch/arm/plat-omap/include/mach/mcbsp.h380
-rw-r--r--arch/arm/plat-omap/include/mach/mcspi.h (renamed from include/asm-arm/arch-omap/mcspi.h)0
-rw-r--r--arch/arm/plat-omap/include/mach/memory.h103
-rw-r--r--arch/arm/plat-omap/include/mach/menelaus.h49
-rw-r--r--arch/arm/plat-omap/include/mach/mmc.h74
-rw-r--r--arch/arm/plat-omap/include/mach/mtd-xip.h61
-rw-r--r--arch/arm/plat-omap/include/mach/mux.h615
-rw-r--r--arch/arm/plat-omap/include/mach/nand.h24
-rw-r--r--arch/arm/plat-omap/include/mach/omap-alsa.h123
-rw-r--r--arch/arm/plat-omap/include/mach/omap1510.h48
-rw-r--r--arch/arm/plat-omap/include/mach/omap16xx.h197
-rw-r--r--arch/arm/plat-omap/include/mach/omap24xx.h107
-rw-r--r--arch/arm/plat-omap/include/mach/omap34xx.h72
-rw-r--r--arch/arm/plat-omap/include/mach/omap730.h102
-rw-r--r--arch/arm/plat-omap/include/mach/omapfb.h395
-rw-r--r--arch/arm/plat-omap/include/mach/onenand.h21
-rw-r--r--arch/arm/plat-omap/include/mach/param.h8
-rw-r--r--arch/arm/plat-omap/include/mach/pm.h356
-rw-r--r--arch/arm/plat-omap/include/mach/prcm.h33
-rw-r--r--arch/arm/plat-omap/include/mach/sdrc.h75
-rw-r--r--arch/arm/plat-omap/include/mach/serial.h37
-rw-r--r--arch/arm/plat-omap/include/mach/sram.h56
-rw-r--r--arch/arm/plat-omap/include/mach/system.h49
-rw-r--r--arch/arm/plat-omap/include/mach/tc.h106
-rw-r--r--arch/arm/plat-omap/include/mach/timex.h41
-rw-r--r--arch/arm/plat-omap/include/mach/uncompress.h83
-rw-r--r--arch/arm/plat-omap/include/mach/usb.h141
-rw-r--r--arch/arm/plat-omap/include/mach/vmalloc.h21
-rw-r--r--arch/arm/plat-omap/mailbox.c2
-rw-r--r--arch/arm/plat-omap/mcbsp.c4
-rw-r--r--arch/arm/plat-omap/mux.c2
-rw-r--r--arch/arm/plat-omap/ocpi.c2
-rw-r--r--arch/arm/plat-omap/sram.c6
-rw-r--r--arch/arm/plat-omap/usb.c10
-rw-r--r--arch/arm/plat-orion/time.c2
-rw-r--r--arch/arm/plat-s3c24xx/clock.c6
-rw-r--r--arch/arm/plat-s3c24xx/common-smdk.c6
-rw-r--r--arch/arm/plat-s3c24xx/cpu.c6
-rw-r--r--arch/arm/plat-s3c24xx/devs.c4
-rw-r--r--arch/arm/plat-s3c24xx/dma.c4
-rw-r--r--arch/arm/plat-s3c24xx/gpio.c4
-rw-r--r--arch/arm/plat-s3c24xx/gpiolib.c4
-rw-r--r--arch/arm/plat-s3c24xx/irq.c6
-rw-r--r--arch/arm/plat-s3c24xx/pm-simtec.c8
-rw-r--r--arch/arm/plat-s3c24xx/pm.c10
-rw-r--r--arch/arm/plat-s3c24xx/pwm-clock.c6
-rw-r--r--arch/arm/plat-s3c24xx/s3c244x-clock.c4
-rw-r--r--arch/arm/plat-s3c24xx/s3c244x-irq.c6
-rw-r--r--arch/arm/plat-s3c24xx/s3c244x.c10
-rw-r--r--arch/arm/plat-s3c24xx/sleep.S10
-rw-r--r--arch/arm/plat-s3c24xx/time.c4
-rw-r--r--arch/arm/tools/Makefile1
-rw-r--r--arch/avr32/Makefile21
-rw-r--r--arch/avr32/boards/atngw100/flash.c2
-rw-r--r--arch/avr32/boards/atngw100/setup.c10
-rw-r--r--arch/avr32/boards/atstk1000/atstk1002.c12
-rw-r--r--arch/avr32/boards/atstk1000/atstk1003.c8
-rw-r--r--arch/avr32/boards/atstk1000/atstk1004.c8
-rw-r--r--arch/avr32/boards/atstk1000/flash.c2
-rw-r--r--arch/avr32/boards/atstk1000/setup.c6
-rw-r--r--arch/avr32/configs/atngw100_defconfig106
-rw-r--r--arch/avr32/configs/atstk1002_defconfig153
-rw-r--r--arch/avr32/configs/atstk1003_defconfig140
-rw-r--r--arch/avr32/configs/atstk1004_defconfig46
-rw-r--r--arch/avr32/configs/atstk1006_defconfig1304
-rw-r--r--arch/avr32/include/asm/Kbuild (renamed from include/asm-avr32/Kbuild)0
-rw-r--r--arch/avr32/include/asm/a.out.h (renamed from include/asm-avr32/a.out.h)0
-rw-r--r--arch/avr32/include/asm/addrspace.h (renamed from include/asm-avr32/addrspace.h)0
-rw-r--r--arch/avr32/include/asm/asm.h (renamed from include/asm-avr32/asm.h)0
-rw-r--r--arch/avr32/include/asm/atmel-mci.h (renamed from include/asm-avr32/atmel-mci.h)0
-rw-r--r--arch/avr32/include/asm/atomic.h (renamed from include/asm-avr32/atomic.h)0
-rw-r--r--arch/avr32/include/asm/auxvec.h (renamed from include/asm-avr32/auxvec.h)0
-rw-r--r--arch/avr32/include/asm/bitops.h (renamed from include/asm-avr32/bitops.h)0
-rw-r--r--arch/avr32/include/asm/bug.h (renamed from include/asm-avr32/bug.h)0
-rw-r--r--arch/avr32/include/asm/bugs.h (renamed from include/asm-avr32/bugs.h)0
-rw-r--r--arch/avr32/include/asm/byteorder.h (renamed from include/asm-avr32/byteorder.h)0
-rw-r--r--arch/avr32/include/asm/cache.h (renamed from include/asm-avr32/cache.h)0
-rw-r--r--arch/avr32/include/asm/cachectl.h (renamed from include/asm-avr32/cachectl.h)0
-rw-r--r--arch/avr32/include/asm/cacheflush.h (renamed from include/asm-avr32/cacheflush.h)0
-rw-r--r--arch/avr32/include/asm/checksum.h (renamed from include/asm-avr32/checksum.h)0
-rw-r--r--arch/avr32/include/asm/cputime.h (renamed from include/asm-avr32/cputime.h)0
-rw-r--r--arch/avr32/include/asm/current.h (renamed from include/asm-avr32/current.h)0
-rw-r--r--arch/avr32/include/asm/delay.h (renamed from include/asm-avr32/delay.h)0
-rw-r--r--arch/avr32/include/asm/device.h (renamed from include/asm-avr32/device.h)0
-rw-r--r--arch/avr32/include/asm/div64.h (renamed from include/asm-avr32/div64.h)0
-rw-r--r--arch/avr32/include/asm/dma-mapping.h (renamed from include/asm-avr32/dma-mapping.h)0
-rw-r--r--arch/avr32/include/asm/dma.h (renamed from include/asm-avr32/dma.h)0
-rw-r--r--arch/avr32/include/asm/elf.h (renamed from include/asm-avr32/elf.h)0
-rw-r--r--arch/avr32/include/asm/emergency-restart.h (renamed from include/asm-avr32/emergency-restart.h)0
-rw-r--r--arch/avr32/include/asm/errno.h (renamed from include/asm-avr32/errno.h)0
-rw-r--r--arch/avr32/include/asm/fb.h (renamed from include/asm-avr32/fb.h)0
-rw-r--r--arch/avr32/include/asm/fcntl.h (renamed from include/asm-avr32/fcntl.h)0
-rw-r--r--arch/avr32/include/asm/futex.h (renamed from include/asm-avr32/futex.h)0
-rw-r--r--arch/avr32/include/asm/gpio.h6
-rw-r--r--arch/avr32/include/asm/hardirq.h (renamed from include/asm-avr32/hardirq.h)0
-rw-r--r--arch/avr32/include/asm/hw_irq.h (renamed from include/asm-avr32/hw_irq.h)0
-rw-r--r--arch/avr32/include/asm/io.h312
-rw-r--r--arch/avr32/include/asm/ioctl.h (renamed from include/asm-avr32/ioctl.h)0
-rw-r--r--arch/avr32/include/asm/ioctls.h (renamed from include/asm-avr32/ioctls.h)0
-rw-r--r--arch/avr32/include/asm/ipcbuf.h (renamed from include/asm-avr32/ipcbuf.h)0
-rw-r--r--arch/avr32/include/asm/irq.h24
-rw-r--r--arch/avr32/include/asm/irq_regs.h (renamed from include/asm-avr32/irq_regs.h)0
-rw-r--r--arch/avr32/include/asm/irqflags.h (renamed from include/asm-avr32/irqflags.h)0
-rw-r--r--arch/avr32/include/asm/kdebug.h (renamed from include/asm-avr32/kdebug.h)0
-rw-r--r--arch/avr32/include/asm/kmap_types.h (renamed from include/asm-avr32/kmap_types.h)0
-rw-r--r--arch/avr32/include/asm/kprobes.h (renamed from include/asm-avr32/kprobes.h)0
-rw-r--r--arch/avr32/include/asm/linkage.h (renamed from include/asm-avr32/linkage.h)0
-rw-r--r--arch/avr32/include/asm/local.h (renamed from include/asm-avr32/local.h)0
-rw-r--r--arch/avr32/include/asm/mach/serial_at91.h (renamed from include/asm-avr32/mach/serial_at91.h)0
-rw-r--r--arch/avr32/include/asm/mman.h (renamed from include/asm-avr32/mman.h)0
-rw-r--r--arch/avr32/include/asm/mmu.h (renamed from include/asm-avr32/mmu.h)0
-rw-r--r--arch/avr32/include/asm/mmu_context.h (renamed from include/asm-avr32/mmu_context.h)0
-rw-r--r--arch/avr32/include/asm/module.h (renamed from include/asm-avr32/module.h)0
-rw-r--r--arch/avr32/include/asm/msgbuf.h (renamed from include/asm-avr32/msgbuf.h)0
-rw-r--r--arch/avr32/include/asm/mutex.h (renamed from include/asm-avr32/mutex.h)0
-rw-r--r--arch/avr32/include/asm/numnodes.h (renamed from include/asm-avr32/numnodes.h)0
-rw-r--r--arch/avr32/include/asm/ocd.h (renamed from include/asm-avr32/ocd.h)0
-rw-r--r--arch/avr32/include/asm/page.h (renamed from include/asm-avr32/page.h)0
-rw-r--r--arch/avr32/include/asm/param.h (renamed from include/asm-avr32/param.h)0
-rw-r--r--arch/avr32/include/asm/pci.h (renamed from include/asm-avr32/pci.h)0
-rw-r--r--arch/avr32/include/asm/percpu.h (renamed from include/asm-avr32/percpu.h)0
-rw-r--r--arch/avr32/include/asm/pgalloc.h (renamed from include/asm-avr32/pgalloc.h)0
-rw-r--r--arch/avr32/include/asm/pgtable-2level.h (renamed from include/asm-avr32/pgtable-2level.h)0
-rw-r--r--arch/avr32/include/asm/pgtable.h (renamed from include/asm-avr32/pgtable.h)0
-rw-r--r--arch/avr32/include/asm/poll.h (renamed from include/asm-avr32/poll.h)0
-rw-r--r--arch/avr32/include/asm/posix_types.h (renamed from include/asm-avr32/posix_types.h)0
-rw-r--r--arch/avr32/include/asm/processor.h (renamed from include/asm-avr32/processor.h)0
-rw-r--r--arch/avr32/include/asm/ptrace.h (renamed from include/asm-avr32/ptrace.h)0
-rw-r--r--arch/avr32/include/asm/resource.h (renamed from include/asm-avr32/resource.h)0
-rw-r--r--arch/avr32/include/asm/scatterlist.h (renamed from include/asm-avr32/scatterlist.h)0
-rw-r--r--arch/avr32/include/asm/sections.h (renamed from include/asm-avr32/sections.h)0
-rw-r--r--arch/avr32/include/asm/sembuf.h (renamed from include/asm-avr32/sembuf.h)0
-rw-r--r--arch/avr32/include/asm/serial.h (renamed from include/asm-avr32/serial.h)0
-rw-r--r--arch/avr32/include/asm/setup.h (renamed from include/asm-avr32/setup.h)0
-rw-r--r--arch/avr32/include/asm/shmbuf.h (renamed from include/asm-avr32/shmbuf.h)0
-rw-r--r--arch/avr32/include/asm/shmparam.h (renamed from include/asm-avr32/shmparam.h)0
-rw-r--r--arch/avr32/include/asm/sigcontext.h (renamed from include/asm-avr32/sigcontext.h)0
-rw-r--r--arch/avr32/include/asm/siginfo.h (renamed from include/asm-avr32/siginfo.h)0
-rw-r--r--arch/avr32/include/asm/signal.h (renamed from include/asm-avr32/signal.h)0
-rw-r--r--arch/avr32/include/asm/socket.h (renamed from include/asm-avr32/socket.h)0
-rw-r--r--arch/avr32/include/asm/sockios.h (renamed from include/asm-avr32/sockios.h)0
-rw-r--r--arch/avr32/include/asm/stat.h (renamed from include/asm-avr32/stat.h)0
-rw-r--r--arch/avr32/include/asm/statfs.h (renamed from include/asm-avr32/statfs.h)0
-rw-r--r--arch/avr32/include/asm/string.h (renamed from include/asm-avr32/string.h)0
-rw-r--r--arch/avr32/include/asm/sysreg.h (renamed from include/asm-avr32/sysreg.h)0
-rw-r--r--arch/avr32/include/asm/system.h (renamed from include/asm-avr32/system.h)0
-rw-r--r--arch/avr32/include/asm/termbits.h (renamed from include/asm-avr32/termbits.h)0
-rw-r--r--arch/avr32/include/asm/termios.h (renamed from include/asm-avr32/termios.h)0
-rw-r--r--arch/avr32/include/asm/thread_info.h (renamed from include/asm-avr32/thread_info.h)0
-rw-r--r--arch/avr32/include/asm/timex.h (renamed from include/asm-avr32/timex.h)0
-rw-r--r--arch/avr32/include/asm/tlb.h (renamed from include/asm-avr32/tlb.h)0
-rw-r--r--arch/avr32/include/asm/tlbflush.h (renamed from include/asm-avr32/tlbflush.h)0
-rw-r--r--arch/avr32/include/asm/topology.h (renamed from include/asm-avr32/topology.h)0
-rw-r--r--arch/avr32/include/asm/traps.h (renamed from include/asm-avr32/traps.h)0
-rw-r--r--arch/avr32/include/asm/types.h (renamed from include/asm-avr32/types.h)0
-rw-r--r--arch/avr32/include/asm/uaccess.h (renamed from include/asm-avr32/uaccess.h)0
-rw-r--r--arch/avr32/include/asm/ucontext.h (renamed from include/asm-avr32/ucontext.h)0
-rw-r--r--arch/avr32/include/asm/unaligned.h (renamed from include/asm-avr32/unaligned.h)0
-rw-r--r--arch/avr32/include/asm/unistd.h (renamed from include/asm-avr32/unistd.h)0
-rw-r--r--arch/avr32/include/asm/user.h (renamed from include/asm-avr32/user.h)0
-rw-r--r--arch/avr32/include/asm/xor.h (renamed from include/asm-avr32/xor.h)0
-rw-r--r--arch/avr32/kernel/process.c2
-rw-r--r--arch/avr32/kernel/setup.c4
-rw-r--r--arch/avr32/kernel/time.c2
-rw-r--r--arch/avr32/mach-at32ap/Makefile1
-rw-r--r--arch/avr32/mach-at32ap/at32ap700x.c34
-rw-r--r--arch/avr32/mach-at32ap/clock.c2
-rw-r--r--arch/avr32/mach-at32ap/hmatrix.c88
-rw-r--r--arch/avr32/mach-at32ap/hmatrix.h182
-rw-r--r--arch/avr32/mach-at32ap/hsmc.c2
-rw-r--r--arch/avr32/mach-at32ap/include/mach/at32ap700x.h86
-rw-r--r--arch/avr32/mach-at32ap/include/mach/board.h (renamed from include/asm-avr32/arch-at32ap/board.h)0
-rw-r--r--arch/avr32/mach-at32ap/include/mach/chip.h19
-rw-r--r--arch/avr32/mach-at32ap/include/mach/cpu.h (renamed from include/asm-avr32/arch-at32ap/cpu.h)0
-rw-r--r--arch/avr32/mach-at32ap/include/mach/gpio.h (renamed from include/asm-avr32/arch-at32ap/gpio.h)0
-rw-r--r--arch/avr32/mach-at32ap/include/mach/hmatrix.h55
-rw-r--r--arch/avr32/mach-at32ap/include/mach/init.h (renamed from include/asm-avr32/arch-at32ap/init.h)0
-rw-r--r--arch/avr32/mach-at32ap/include/mach/io.h (renamed from include/asm-avr32/arch-at32ap/io.h)0
-rw-r--r--arch/avr32/mach-at32ap/include/mach/irq.h (renamed from include/asm-avr32/arch-at32ap/irq.h)0
-rw-r--r--arch/avr32/mach-at32ap/include/mach/pm.h (renamed from include/asm-avr32/arch-at32ap/pm.h)0
-rw-r--r--arch/avr32/mach-at32ap/include/mach/portmux.h (renamed from include/asm-avr32/arch-at32ap/portmux.h)0
-rw-r--r--arch/avr32/mach-at32ap/include/mach/smc.h (renamed from include/asm-avr32/arch-at32ap/smc.h)0
-rw-r--r--arch/avr32/mach-at32ap/include/mach/sram.h (renamed from include/asm-avr32/arch-at32ap/sram.h)0
-rw-r--r--arch/avr32/mach-at32ap/pio.c2
-rw-r--r--arch/avr32/mach-at32ap/pm-at32ap700x.S2
-rw-r--r--arch/avr32/mach-at32ap/pm.c8
-rw-r--r--arch/avr32/mach-at32ap/pm.h12
-rw-r--r--arch/h8300/mm/init.c9
-rw-r--r--arch/ia64/include/asm/sal.h2
-rw-r--r--arch/ia64/kernel/head.S26
-rw-r--r--arch/ia64/kernel/setup.c18
-rw-r--r--arch/ia64/kernel/smpboot.c2
-rw-r--r--arch/ia64/kernel/vmlinux.lds.S3
-rw-r--r--arch/ia64/mm/contig.c10
-rw-r--r--arch/ia64/mm/discontig.c6
-rw-r--r--arch/m68k/kernel/entry.S6
-rw-r--r--arch/m68knommu/include/asm/unistd.h8
-rw-r--r--arch/m68knommu/kernel/syscalltable.S6
-rw-r--r--arch/powerpc/Kconfig3
-rw-r--r--arch/powerpc/boot/dts/warp.dts22
-rw-r--r--arch/powerpc/configs/40x/ep405_defconfig207
-rw-r--r--arch/powerpc/configs/40x/kilauea_defconfig196
-rw-r--r--arch/powerpc/configs/40x/makalu_defconfig196
-rw-r--r--arch/powerpc/configs/40x/walnut_defconfig203
-rw-r--r--arch/powerpc/configs/44x/bamboo_defconfig206
-rw-r--r--arch/powerpc/configs/44x/canyonlands_defconfig116
-rw-r--r--arch/powerpc/configs/44x/ebony_defconfig207
-rw-r--r--arch/powerpc/configs/44x/katmai_defconfig259
-rw-r--r--arch/powerpc/configs/44x/rainier_defconfig207
-rw-r--r--arch/powerpc/configs/44x/sam440ep_defconfig109
-rw-r--r--arch/powerpc/configs/44x/sequoia_defconfig207
-rw-r--r--arch/powerpc/configs/44x/taishan_defconfig208
-rw-r--r--arch/powerpc/configs/44x/virtex5_defconfig100
-rw-r--r--arch/powerpc/configs/44x/warp_defconfig232
-rw-r--r--arch/powerpc/configs/ppc40x_defconfig374
-rw-r--r--arch/powerpc/configs/ppc44x_defconfig375
-rw-r--r--arch/powerpc/include/asm/mmu-hash64.h2
-rw-r--r--arch/powerpc/kernel/pci-common.c17
-rw-r--r--arch/powerpc/kernel/rtas.c5
-rw-r--r--arch/powerpc/mm/hash_utils_64.c63
-rw-r--r--arch/powerpc/mm/init_64.c9
-rw-r--r--arch/powerpc/platforms/44x/warp-nand.c2
-rw-r--r--arch/powerpc/platforms/44x/warp.c25
-rw-r--r--arch/x86/Kconfig1
-rw-r--r--arch/x86/kernel/apic_32.c14
-rw-r--r--arch/x86/kernel/cpu/bugs.c6
-rw-r--r--arch/x86/kernel/cpu/cpufreq/Kconfig4
-rw-r--r--arch/x86/kernel/cpu/cpufreq/elanfreq.c2
-rw-r--r--arch/x86/kernel/cpu/cpufreq/powernow-k8.c112
-rw-r--r--arch/x86/kernel/cpu/cpufreq/powernow-k8.h3
-rw-r--r--arch/x86/kernel/io_apic_32.c6
-rw-r--r--arch/x86/kernel/io_apic_64.c25
-rw-r--r--arch/x86/kernel/mpparse.c11
-rw-r--r--arch/x86/kernel/pci-calgary_64.c2
-rw-r--r--arch/x86/kernel/setup.c22
-rw-r--r--arch/x86/kernel/smpboot.c22
-rw-r--r--arch/x86/kernel/vmi_32.c3
-rw-r--r--arch/x86/mm/Makefile3
-rw-r--r--arch/x86/mm/pgtable.c3
-rw-r--r--drivers/ata/pata_at32.c4
-rw-r--r--drivers/char/agp/agp.h3
-rw-r--r--drivers/char/agp/ali-agp.c10
-rw-r--r--drivers/char/agp/amd-k7-agp.c10
-rw-r--r--drivers/char/agp/amd64-agp.c51
-rw-r--r--drivers/char/agp/ati-agp.c7
-rw-r--r--drivers/char/agp/backend.c28
-rw-r--r--drivers/char/agp/generic.c41
-rw-r--r--drivers/char/agp/intel-agp.c83
-rw-r--r--drivers/char/agp/isoch.c37
-rw-r--r--drivers/char/agp/sis-agp.c17
-rw-r--r--drivers/char/agp/sworks-agp.c25
-rw-r--r--drivers/char/agp/uninorth-agp.c32
-rw-r--r--drivers/char/ds1620.c2
-rw-r--r--drivers/char/hvc_console.c5
-rw-r--r--drivers/char/hw_random/ixp4xx-rng.c2
-rw-r--r--drivers/char/rtc.c1
-rw-r--r--drivers/char/tty_io.c2
-rw-r--r--drivers/cpufreq/cpufreq_conservative.c20
-rw-r--r--drivers/cpuidle/sysfs.c29
-rw-r--r--drivers/crypto/ixp4xx_crypto.c4
-rw-r--r--drivers/dma/iop-adma.c2
-rw-r--r--drivers/firmware/memmap.c61
-rw-r--r--drivers/hwmon/lm75.c114
-rw-r--r--drivers/i2c/Kconfig14
-rw-r--r--drivers/i2c/algos/Kconfig11
-rw-r--r--drivers/i2c/busses/i2c-acorn.c2
-rw-r--r--drivers/i2c/busses/i2c-amd756-s4882.c9
-rw-r--r--drivers/i2c/busses/i2c-at91.c6
-rw-r--r--drivers/i2c/busses/i2c-davinci.c5
-rw-r--r--drivers/i2c/busses/i2c-ixp2000.c4
-rw-r--r--drivers/i2c/busses/i2c-nforce2-s4985.c5
-rw-r--r--drivers/i2c/busses/i2c-pnx.c2
-rw-r--r--drivers/i2c/busses/i2c-pxa.c6
-rw-r--r--drivers/i2c/busses/i2c-s3c2410.c4
-rw-r--r--drivers/i2c/chips/at24.c8
-rw-r--r--drivers/i2c/chips/isp1301_omap.c4
-rw-r--r--drivers/i2c/chips/menelaus.c5
-rw-r--r--drivers/i2c/i2c-core.c11
-rw-r--r--drivers/i2c/i2c-dev.c4
-rw-r--r--drivers/ide/arm/ide_arm.c3
-rw-r--r--drivers/input/keyboard/aaed2000_kbd.c4
-rw-r--r--drivers/input/keyboard/corgikbd.c8
-rw-r--r--drivers/input/keyboard/jornada720_kbd.c4
-rw-r--r--drivers/input/keyboard/omap-keypad.c11
-rw-r--r--drivers/input/keyboard/pxa27x_keypad.c5
-rw-r--r--drivers/input/keyboard/spitzkbd.c8
-rw-r--r--drivers/input/keyboard/tosakbd.c4
-rw-r--r--drivers/input/misc/ixp4xx-beeper.c2
-rw-r--r--drivers/input/mouse/rpcmouse.c2
-rw-r--r--drivers/input/serio/rpckbd.c2
-rw-r--r--drivers/input/touchscreen/corgi_ts.c8
-rw-r--r--drivers/input/touchscreen/h3600_ts_input.c4
-rw-r--r--drivers/input/touchscreen/jornada720_ts.c4
-rw-r--r--drivers/input/touchscreen/mainstone-wm97xx.c2
-rw-r--r--drivers/leds/leds-ams-delta.c2
-rw-r--r--drivers/leds/leds-cm-x270.c4
-rw-r--r--drivers/leds/leds-corgi.c7
-rw-r--r--drivers/leds/leds-fsg.c2
-rw-r--r--drivers/leds/leds-h1940.c6
-rw-r--r--drivers/leds/leds-locomo.c2
-rw-r--r--drivers/leds/leds-s3c24xx.c6
-rw-r--r--drivers/leds/leds-spitz.c6
-rw-r--r--drivers/lguest/page_tables.c25
-rw-r--r--drivers/media/video/pxa_camera.c4
-rw-r--r--drivers/mfd/Kconfig21
-rw-r--r--drivers/mfd/Makefile2
-rw-r--r--drivers/mfd/mcp-sa11x0.c6
-rw-r--r--drivers/mfd/t7l66xb.c419
-rw-r--r--drivers/mfd/tc6387xb.c181
-rw-r--r--drivers/mfd/tc6393xb.c159
-rw-r--r--drivers/mfd/ucb1x00-core.c2
-rw-r--r--drivers/mfd/ucb1x00-ts.c2
-rw-r--r--drivers/misc/sgi-gru/grutables.h2
-rw-r--r--drivers/mmc/host/Kconfig6
-rw-r--r--drivers/mmc/host/Makefile1
-rw-r--r--drivers/mmc/host/at91_mci.c6
-rw-r--r--drivers/mmc/host/atmel-mci.c2
-rw-r--r--drivers/mmc/host/imxmmc.c4
-rw-r--r--drivers/mmc/host/omap.c15
-rw-r--r--drivers/mmc/host/pxamci.c4
-rw-r--r--drivers/mmc/host/s3cmci.c4
-rw-r--r--drivers/mmc/host/tmio_mmc.c691
-rw-r--r--drivers/mmc/host/tmio_mmc.h194
-rw-r--r--drivers/mtd/maps/autcpu12-nvram.c4
-rw-r--r--drivers/mtd/maps/cdb89712.c2
-rw-r--r--drivers/mtd/maps/ceiva.c2
-rw-r--r--drivers/mtd/maps/h720x-flash.c2
-rw-r--r--drivers/mtd/maps/integrator-flash.c2
-rw-r--r--drivers/mtd/maps/ipaq-flash.c4
-rw-r--r--drivers/mtd/maps/ixp2000.c2
-rw-r--r--drivers/mtd/maps/omap_nor.c4
-rw-r--r--drivers/mtd/maps/pxa2xx-flash.c2
-rw-r--r--drivers/mtd/maps/sa1100-flash.c2
-rw-r--r--drivers/mtd/nand/Kconfig7
-rw-r--r--drivers/mtd/nand/Makefile1
-rw-r--r--drivers/mtd/nand/ams-delta.c6
-rw-r--r--drivers/mtd/nand/atmel_nand.c4
-rw-r--r--drivers/mtd/nand/autcpu12.c4
-rw-r--r--drivers/mtd/nand/cmx270_nand.c4
-rw-r--r--drivers/mtd/nand/edb7312.c2
-rw-r--r--drivers/mtd/nand/h1910.c6
-rw-r--r--drivers/mtd/nand/orion_nand.c2
-rw-r--r--drivers/mtd/nand/pxa3xx_nand.c4
-rw-r--r--drivers/mtd/nand/sharpsl.c2
-rw-r--r--drivers/mtd/nand/tmio_nand.c556
-rw-r--r--drivers/mtd/nand/ts7250.c2
-rw-r--r--drivers/net/arm/am79c961a.c2
-rw-r--r--drivers/net/arm/at91_ether.c6
-rw-r--r--drivers/net/arm/ep93xx_eth.c4
-rw-r--r--drivers/net/arm/ixp4xx_eth.c4
-rw-r--r--drivers/net/atl1e/atl1e_main.c4
-rw-r--r--drivers/net/cs89x0.c2
-rw-r--r--drivers/net/irda/ep7211-sir.c2
-rw-r--r--drivers/net/irda/pxaficp_ir.c4
-rw-r--r--drivers/net/irda/sa1100_ir.c2
-rw-r--r--drivers/net/ixp2000/ixp2400-msf.c4
-rw-r--r--drivers/net/ixp2000/ixpdev.c1
-rw-r--r--drivers/net/macb.c4
-rw-r--r--drivers/net/netx-eth.c11
-rw-r--r--drivers/net/smc911x.h2
-rw-r--r--drivers/net/smc91x.h6
-rw-r--r--drivers/pci/msi.c5
-rw-r--r--drivers/pci/pci.c3
-rw-r--r--drivers/pci/probe.c54
-rw-r--r--drivers/pci/quirks.c7
-rw-r--r--drivers/pcmcia/at91_cf.c6
-rw-r--r--drivers/pcmcia/omap_cf.c6
-rw-r--r--drivers/pcmcia/pxa2xx_base.c6
-rw-r--r--drivers/pcmcia/pxa2xx_cm_x270.c2
-rw-r--r--drivers/pcmcia/pxa2xx_lubbock.c6
-rw-r--r--drivers/pcmcia/pxa2xx_mainstone.c6
-rw-r--r--drivers/pcmcia/pxa2xx_palmtx.c4
-rw-r--r--drivers/pcmcia/pxa2xx_sharpsl.c2
-rw-r--r--drivers/pcmcia/sa1100_assabet.c4
-rw-r--r--drivers/pcmcia/sa1100_badge4.c4
-rw-r--r--drivers/pcmcia/sa1100_cerf.c4
-rw-r--r--drivers/pcmcia/sa1100_h3600.c4
-rw-r--r--drivers/pcmcia/sa1100_jornada720.c2
-rw-r--r--drivers/pcmcia/sa1100_neponset.c4
-rw-r--r--drivers/pcmcia/sa1100_shannon.c4
-rw-r--r--drivers/pcmcia/sa1100_simpad.c4
-rw-r--r--drivers/pcmcia/sa1111_generic.c2
-rw-r--r--drivers/pcmcia/sa11xx_base.c2
-rw-r--r--drivers/pcmcia/soc_common.c4
-rw-r--r--drivers/power/palmtx_battery.c2
-rw-r--r--drivers/power/tosa_battery.c2
-rw-r--r--drivers/rtc/rtc-at91rm9200.c2
-rw-r--r--drivers/rtc/rtc-at91sam9.c4
-rw-r--r--drivers/rtc/rtc-dev.c12
-rw-r--r--drivers/rtc/rtc-ep93xx.c2
-rw-r--r--drivers/rtc/rtc-isl1208.c2
-rw-r--r--drivers/rtc/rtc-s3c.c2
-rw-r--r--drivers/rtc/rtc-sa1100.c4
-rw-r--r--drivers/scsi/arm/acornscsi-io.S2
-rw-r--r--drivers/scsi/device_handler/scsi_dh_alua.c2
-rw-r--r--drivers/scsi/device_handler/scsi_dh_emc.c2
-rw-r--r--drivers/scsi/device_handler/scsi_dh_hp_sw.c2
-rw-r--r--drivers/scsi/device_handler/scsi_dh_rdac.c2
-rw-r--r--drivers/serial/21285.c2
-rw-r--r--drivers/serial/atmel_serial.c6
-rw-r--r--drivers/serial/clps711x.c2
-rw-r--r--drivers/serial/imx.c4
-rw-r--r--drivers/serial/netx-serial.c4
-rw-r--r--drivers/serial/pxa.c4
-rw-r--r--drivers/serial/s3c2400.c4
-rw-r--r--drivers/serial/s3c2410.c4
-rw-r--r--drivers/serial/s3c2412.c4
-rw-r--r--drivers/serial/s3c2440.c4
-rw-r--r--drivers/serial/sa1100.c2
-rw-r--r--drivers/serial/samsung.c4
-rw-r--r--drivers/serial/serial_ks8695.c4
-rw-r--r--drivers/spi/atmel_spi.c6
-rw-r--r--drivers/spi/omap2_mcspi.c4
-rw-r--r--drivers/spi/omap_uwire.c6
-rw-r--r--drivers/spi/pxa2xx_spi.c11
-rw-r--r--drivers/spi/spi_imx.c7
-rw-r--r--drivers/spi/spi_s3c24xx.c6
-rw-r--r--drivers/spi/spi_s3c24xx_gpio.c6
-rw-r--r--drivers/usb/gadget/at91_udc.c9
-rw-r--r--drivers/usb/gadget/atmel_usba_udc.c4
-rw-r--r--drivers/usb/gadget/lh7a40x_udc.h2
-rw-r--r--drivers/usb/gadget/omap_udc.c4
-rw-r--r--drivers/usb/gadget/pxa25x_udc.c2
-rw-r--r--drivers/usb/gadget/pxa25x_udc.h2
-rw-r--r--drivers/usb/gadget/pxa27x_udc.c6
-rw-r--r--drivers/usb/gadget/s3c2410_udc.c9
-rw-r--r--drivers/usb/host/ohci-at91.c7
-rw-r--r--drivers/usb/host/ohci-ep93xx.c3
-rw-r--r--drivers/usb/host/ohci-lh7a404.c2
-rw-r--r--drivers/usb/host/ohci-omap.c12
-rw-r--r--drivers/usb/host/ohci-pnx4008.c9
-rw-r--r--drivers/usb/host/ohci-pxa27x.c9
-rw-r--r--drivers/usb/host/ohci-s3c2410.c4
-rw-r--r--drivers/usb/host/ohci-sa1111.c6
-rw-r--r--drivers/usb/misc/isight_firmware.c4
-rw-r--r--drivers/video/acornfb.c4
-rw-r--r--drivers/video/am200epd.c2
-rw-r--r--drivers/video/atmel_lcdfb.c19
-rw-r--r--drivers/video/aty/radeon_accel.c8
-rw-r--r--drivers/video/backlight/omap1_bl.c6
-rw-r--r--drivers/video/clps711xfb.c4
-rw-r--r--drivers/video/console/fbcon.c4
-rw-r--r--drivers/video/console/fbcon.h2
-rw-r--r--drivers/video/cyber2000fb.c2
-rw-r--r--drivers/video/epson1355fb.c2
-rw-r--r--drivers/video/imxfb.c4
-rw-r--r--drivers/video/matrox/i2c-matroxfb.c21
-rw-r--r--drivers/video/matrox/matroxfb_maven.c97
-rw-r--r--drivers/video/omap/blizzard.c6
-rw-r--r--drivers/video/omap/dispc.c6
-rw-r--r--drivers/video/omap/hwa742.c6
-rw-r--r--drivers/video/omap/lcd_h3.c4
-rw-r--r--drivers/video/omap/lcd_h4.c2
-rw-r--r--drivers/video/omap/lcd_inn1510.c4
-rw-r--r--drivers/video/omap/lcd_inn1610.c4
-rw-r--r--drivers/video/omap/lcd_osk.c6
-rw-r--r--drivers/video/omap/lcd_palmte.c4
-rw-r--r--drivers/video/omap/lcd_palmtt.c4
-rw-r--r--drivers/video/omap/lcd_palmz71.c2
-rw-r--r--drivers/video/omap/lcd_sx1.c8
-rw-r--r--drivers/video/omap/lcdc.c4
-rw-r--r--drivers/video/omap/omapfb_main.c5
-rw-r--r--drivers/video/omap/rfbi.c2
-rw-r--r--drivers/video/omap/sossi.c4
-rw-r--r--drivers/video/pnx4008/dum.h2
-rw-r--r--drivers/video/pnx4008/sdum.c2
-rw-r--r--drivers/video/pxafb.c10
-rw-r--r--drivers/video/s3c2410fb.c6
-rw-r--r--drivers/video/sa1100fb.c6
-rw-r--r--drivers/watchdog/Kconfig5
-rw-r--r--drivers/watchdog/Makefile5
-rw-r--r--drivers/watchdog/at91rm9200_wdt.c5
-rw-r--r--drivers/watchdog/davinci_wdt.c3
-rw-r--r--drivers/watchdog/ep93xx_wdt.c3
-rw-r--r--drivers/watchdog/iop_wdt.c2
-rw-r--r--drivers/watchdog/ixp2000_wdt.c3
-rw-r--r--drivers/watchdog/ixp4xx_wdt.c5
-rw-r--r--drivers/watchdog/ks8695_wdt.c3
-rw-r--r--drivers/watchdog/omap_wdt.c5
-rw-r--r--drivers/watchdog/pcwd.c2
-rw-r--r--drivers/watchdog/pnx4008_wdt.c3
-rw-r--r--drivers/watchdog/s3c2410_wdt.c2
-rw-r--r--drivers/watchdog/sa1100_wdt.c8
-rw-r--r--drivers/watchdog/shwdt.c24
-rw-r--r--drivers/watchdog/txx9wdt.c2
-rw-r--r--drivers/watchdog/wdt285.c4
-rw-r--r--fs/cifs/CHANGES8
-rw-r--r--fs/cifs/asn1.c258
-rw-r--r--fs/cifs/cifs_debug.c53
-rw-r--r--fs/cifs/cifs_spnego.c18
-rw-r--r--fs/cifs/cifsfs.c71
-rw-r--r--fs/cifs/cifsfs.h2
-rw-r--r--fs/cifs/cifspdu.h2
-rw-r--r--fs/cifs/cifsproto.h24
-rw-r--r--fs/cifs/cifssmb.c46
-rw-r--r--fs/cifs/connect.c173
-rw-r--r--fs/cifs/dir.c67
-rw-r--r--fs/cifs/file.c19
-rw-r--r--fs/cifs/inode.c419
-rw-r--r--fs/cifs/transport.c1
-rw-r--r--fs/eventpoll.c5
-rw-r--r--fs/jbd/transaction.c4
-rw-r--r--fs/jbd2/transaction.c4
-rw-r--r--fs/nfsd/nfs4proc.c5
-rw-r--r--fs/reiserfs/super.c1
-rw-r--r--fs/seq_file.c14
-rw-r--r--include/asm-arm/arch-aaec2000/aaec2000.h207
-rw-r--r--include/asm-arm/arch-aaec2000/aaed2000.h40
-rw-r--r--include/asm-arm/arch-aaec2000/debug-macro.S37
-rw-r--r--include/asm-arm/arch-aaec2000/dma.h9
-rw-r--r--include/asm-arm/arch-aaec2000/entry-macro.S40
-rw-r--r--include/asm-arm/arch-aaec2000/hardware.h50
-rw-r--r--include/asm-arm/arch-aaec2000/io.h20
-rw-r--r--include/asm-arm/arch-aaec2000/irqs.h46
-rw-r--r--include/asm-arm/arch-aaec2000/memory.h30
-rw-r--r--include/asm-arm/arch-aaec2000/system.h24
-rw-r--r--include/asm-arm/arch-aaec2000/timex.h18
-rw-r--r--include/asm-arm/arch-aaec2000/uncompress.h46
-rw-r--r--include/asm-arm/arch-aaec2000/vmalloc.h16
-rw-r--r--include/asm-arm/arch-at91/at91_adc.h61
-rw-r--r--include/asm-arm/arch-at91/at91_aic.h53
-rw-r--r--include/asm-arm/arch-at91/at91_dbgu.h66
-rw-r--r--include/asm-arm/arch-at91/at91_mci.h113
-rw-r--r--include/asm-arm/arch-at91/at91_pio.h49
-rw-r--r--include/asm-arm/arch-at91/at91_pit.h29
-rw-r--r--include/asm-arm/arch-at91/at91_pmc.h111
-rw-r--r--include/asm-arm/arch-at91/at91_rstc.h38
-rw-r--r--include/asm-arm/arch-at91/at91_rtc.h75
-rw-r--r--include/asm-arm/arch-at91/at91_rtt.h32
-rw-r--r--include/asm-arm/arch-at91/at91_shdwc.h35
-rw-r--r--include/asm-arm/arch-at91/at91_spi.h81
-rw-r--r--include/asm-arm/arch-at91/at91_ssc.h106
-rw-r--r--include/asm-arm/arch-at91/at91_st.h49
-rw-r--r--include/asm-arm/arch-at91/at91_tc.h146
-rw-r--r--include/asm-arm/arch-at91/at91_twi.h68
-rw-r--r--include/asm-arm/arch-at91/at91_wdt.h34
-rw-r--r--include/asm-arm/arch-at91/at91cap9.h126
-rw-r--r--include/asm-arm/arch-at91/at91cap9_ddrsdr.h100
-rw-r--r--include/asm-arm/arch-at91/at91cap9_matrix.h137
-rw-r--r--include/asm-arm/arch-at91/at91rm9200.h115
-rw-r--r--include/asm-arm/arch-at91/at91rm9200_emac.h138
-rw-r--r--include/asm-arm/arch-at91/at91rm9200_mc.h160
-rw-r--r--include/asm-arm/arch-at91/at91sam9260.h138
-rw-r--r--include/asm-arm/arch-at91/at91sam9260_matrix.h78
-rw-r--r--include/asm-arm/arch-at91/at91sam9261.h105
-rw-r--r--include/asm-arm/arch-at91/at91sam9261_matrix.h62
-rw-r--r--include/asm-arm/arch-at91/at91sam9263.h127
-rw-r--r--include/asm-arm/arch-at91/at91sam9263_matrix.h129
-rw-r--r--include/asm-arm/arch-at91/at91sam9_sdramc.h83
-rw-r--r--include/asm-arm/arch-at91/at91sam9_smc.h73
-rw-r--r--include/asm-arm/arch-at91/at91sam9rl.h115
-rw-r--r--include/asm-arm/arch-at91/at91sam9rl_matrix.h96
-rw-r--r--include/asm-arm/arch-at91/at91x40.h55
-rw-r--r--include/asm-arm/arch-at91/board.h172
-rw-r--r--include/asm-arm/arch-at91/cpu.h103
-rw-r--r--include/asm-arm/arch-at91/debug-macro.S39
-rw-r--r--include/asm-arm/arch-at91/dma.h19
-rw-r--r--include/asm-arm/arch-at91/entry-macro.S32
-rw-r--r--include/asm-arm/arch-at91/gpio.h252
-rw-r--r--include/asm-arm/arch-at91/hardware.h92
-rw-r--r--include/asm-arm/arch-at91/io.h48
-rw-r--r--include/asm-arm/arch-at91/irqs.h48
-rw-r--r--include/asm-arm/arch-at91/memory.h39
-rw-r--r--include/asm-arm/arch-at91/system.h53
-rw-r--r--include/asm-arm/arch-at91/timex.h77
-rw-r--r--include/asm-arm/arch-at91/uncompress.h76
-rw-r--r--include/asm-arm/arch-at91/vmalloc.h26
-rw-r--r--include/asm-arm/arch-cl7500/debug-macro.S21
-rw-r--r--include/asm-arm/arch-cl7500/dma.h21
-rw-r--r--include/asm-arm/arch-cl7500/entry-macro.S16
-rw-r--r--include/asm-arm/arch-cl7500/hardware.h67
-rw-r--r--include/asm-arm/arch-cl7500/io.h255
-rw-r--r--include/asm-arm/arch-cl7500/irq.h32
-rw-r--r--include/asm-arm/arch-cl7500/irqs.h66
-rw-r--r--include/asm-arm/arch-cl7500/memory.h35
-rw-r--r--include/asm-arm/arch-cl7500/system.h23
-rw-r--r--include/asm-arm/arch-cl7500/timex.h13
-rw-r--r--include/asm-arm/arch-cl7500/uncompress.h35
-rw-r--r--include/asm-arm/arch-cl7500/vmalloc.h4
-rw-r--r--include/asm-arm/arch-clps711x/debug-macro.S46
-rw-r--r--include/asm-arm/arch-clps711x/dma.h19
-rw-r--r--include/asm-arm/arch-clps711x/entry-macro.S58
-rw-r--r--include/asm-arm/arch-clps711x/hardware.h237
-rw-r--r--include/asm-arm/arch-clps711x/io.h38
-rw-r--r--include/asm-arm/arch-clps711x/irqs.h53
-rw-r--r--include/asm-arm/arch-clps711x/memory.h94
-rw-r--r--include/asm-arm/arch-clps711x/syspld.h121
-rw-r--r--include/asm-arm/arch-clps711x/system.h40
-rw-r--r--include/asm-arm/arch-clps711x/time.h49
-rw-r--r--include/asm-arm/arch-clps711x/timex.h23
-rw-r--r--include/asm-arm/arch-clps711x/uncompress.h59
-rw-r--r--include/asm-arm/arch-clps711x/vmalloc.h20
-rw-r--r--include/asm-arm/arch-davinci/clock.h22
-rw-r--r--include/asm-arm/arch-davinci/entry-macro.S32
-rw-r--r--include/asm-arm/arch-davinci/gpio.h159
-rw-r--r--include/asm-arm/arch-davinci/serial.h20
-rw-r--r--include/asm-arm/arch-davinci/system.h29
-rw-r--r--include/asm-arm/arch-davinci/uncompress.h35
-rw-r--r--include/asm-arm/arch-davinci/vmalloc.h15
-rw-r--r--include/asm-arm/arch-ebsa110/debug-macro.S21
-rw-r--r--include/asm-arm/arch-ebsa110/dma.h11
-rw-r--r--include/asm-arm/arch-ebsa110/entry-macro.S39
-rw-r--r--include/asm-arm/arch-ebsa110/hardware.h63
-rw-r--r--include/asm-arm/arch-ebsa110/io.h92
-rw-r--r--include/asm-arm/arch-ebsa110/irqs.h20
-rw-r--r--include/asm-arm/arch-ebsa110/memory.h37
-rw-r--r--include/asm-arm/arch-ebsa110/system.h39
-rw-r--r--include/asm-arm/arch-ebsa110/timex.h19
-rw-r--r--include/asm-arm/arch-ebsa110/uncompress.h45
-rw-r--r--include/asm-arm/arch-ebsa110/vmalloc.h10
-rw-r--r--include/asm-arm/arch-ebsa285/debug-macro.S57
-rw-r--r--include/asm-arm/arch-ebsa285/dma.h25
-rw-r--r--include/asm-arm/arch-ebsa285/entry-macro.S113
-rw-r--r--include/asm-arm/arch-ebsa285/hardware.h105
-rw-r--r--include/asm-arm/arch-ebsa285/io.h39
-rw-r--r--include/asm-arm/arch-ebsa285/irqs.h98
-rw-r--r--include/asm-arm/arch-ebsa285/memory.h67
-rw-r--r--include/asm-arm/arch-ebsa285/system.h69
-rw-r--r--include/asm-arm/arch-ebsa285/timex.h18
-rw-r--r--include/asm-arm/arch-ebsa285/uncompress.h38
-rw-r--r--include/asm-arm/arch-ebsa285/vmalloc.h10
-rw-r--r--include/asm-arm/arch-ep93xx/debug-macro.S22
-rw-r--r--include/asm-arm/arch-ep93xx/dma.h3
-rw-r--r--include/asm-arm/arch-ep93xx/entry-macro.S59
-rw-r--r--include/asm-arm/arch-ep93xx/ep93xx-regs.h133
-rw-r--r--include/asm-arm/arch-ep93xx/gesbc9312.h3
-rw-r--r--include/asm-arm/arch-ep93xx/gpio.h128
-rw-r--r--include/asm-arm/arch-ep93xx/hardware.h12
-rw-r--r--include/asm-arm/arch-ep93xx/io.h8
-rw-r--r--include/asm-arm/arch-ep93xx/irqs.h78
-rw-r--r--include/asm-arm/arch-ep93xx/memory.h14
-rw-r--r--include/asm-arm/arch-ep93xx/platform.h20
-rw-r--r--include/asm-arm/arch-ep93xx/system.h26
-rw-r--r--include/asm-arm/arch-ep93xx/timex.h5
-rw-r--r--include/asm-arm/arch-ep93xx/ts72xx.h101
-rw-r--r--include/asm-arm/arch-ep93xx/uncompress.h85
-rw-r--r--include/asm-arm/arch-ep93xx/vmalloc.h5
-rw-r--r--include/asm-arm/arch-h720x/boards.h53
-rw-r--r--include/asm-arm/arch-h720x/debug-macro.S40
-rw-r--r--include/asm-arm/arch-h720x/dma.h26
-rw-r--r--include/asm-arm/arch-h720x/entry-macro.S66
-rw-r--r--include/asm-arm/arch-h720x/h7201-regs.h67
-rw-r--r--include/asm-arm/arch-h720x/h7202-regs.h155
-rw-r--r--include/asm-arm/arch-h720x/hardware.h192
-rw-r--r--include/asm-arm/arch-h720x/io.h24
-rw-r--r--include/asm-arm/arch-h720x/irqs.h116
-rw-r--r--include/asm-arm/arch-h720x/memory.h29
-rw-r--r--include/asm-arm/arch-h720x/system.h33
-rw-r--r--include/asm-arm/arch-h720x/timex.h15
-rw-r--r--include/asm-arm/arch-h720x/uncompress.h37
-rw-r--r--include/asm-arm/arch-h720x/vmalloc.h10
-rw-r--r--include/asm-arm/arch-imx/debug-macro.S34
-rw-r--r--include/asm-arm/arch-imx/entry-macro.S32
-rw-r--r--include/asm-arm/arch-imx/gpio.h102
-rw-r--r--include/asm-arm/arch-imx/hardware.h91
-rw-r--r--include/asm-arm/arch-imx/io.h30
-rw-r--r--include/asm-arm/arch-imx/irqs.h116
-rw-r--r--include/asm-arm/arch-imx/memory.h36
-rw-r--r--include/asm-arm/arch-imx/mx1ads.h36
-rw-r--r--include/asm-arm/arch-imx/spi_imx.h72
-rw-r--r--include/asm-arm/arch-imx/system.h40
-rw-r--r--include/asm-arm/arch-imx/uncompress.h71
-rw-r--r--include/asm-arm/arch-imx/vmalloc.h20
-rw-r--r--include/asm-arm/arch-integrator/debug-macro.S22
-rw-r--r--include/asm-arm/arch-integrator/dma.h19
-rw-r--r--include/asm-arm/arch-integrator/entry-macro.S44
-rw-r--r--include/asm-arm/arch-integrator/hardware.h48
-rw-r--r--include/asm-arm/arch-integrator/io.h36
-rw-r--r--include/asm-arm/arch-integrator/irqs.h82
-rw-r--r--include/asm-arm/arch-integrator/memory.h39
-rw-r--r--include/asm-arm/arch-integrator/system.h44
-rw-r--r--include/asm-arm/arch-integrator/timex.h26
-rw-r--r--include/asm-arm/arch-integrator/uncompress.h50
-rw-r--r--include/asm-arm/arch-integrator/vmalloc.h20
-rw-r--r--include/asm-arm/arch-iop13xx/adma.h537
-rw-r--r--include/asm-arm/arch-iop13xx/debug-macro.S26
-rw-r--r--include/asm-arm/arch-iop13xx/memory.h64
-rw-r--r--include/asm-arm/arch-iop13xx/pci.h57
-rw-r--r--include/asm-arm/arch-iop13xx/system.h27
-rw-r--r--include/asm-arm/arch-iop13xx/timex.h3
-rw-r--r--include/asm-arm/arch-iop13xx/uncompress.h23
-rw-r--r--include/asm-arm/arch-iop32x/debug-macro.S20
-rw-r--r--include/asm-arm/arch-iop32x/dma.h9
-rw-r--r--include/asm-arm/arch-iop32x/entry-macro.S36
-rw-r--r--include/asm-arm/arch-iop32x/glantank.h13
-rw-r--r--include/asm-arm/arch-iop32x/hardware.h44
-rw-r--r--include/asm-arm/arch-iop32x/io.h27
-rw-r--r--include/asm-arm/arch-iop32x/iop32x.h37
-rw-r--r--include/asm-arm/arch-iop32x/iq31244.h17
-rw-r--r--include/asm-arm/arch-iop32x/iq80321.h17
-rw-r--r--include/asm-arm/arch-iop32x/irqs.h50
-rw-r--r--include/asm-arm/arch-iop32x/memory.h26
-rw-r--r--include/asm-arm/arch-iop32x/n2100.h19
-rw-r--r--include/asm-arm/arch-iop32x/system.h33
-rw-r--r--include/asm-arm/arch-iop32x/timex.h9
-rw-r--r--include/asm-arm/arch-iop32x/uncompress.h39
-rw-r--r--include/asm-arm/arch-iop32x/vmalloc.h5
-rw-r--r--include/asm-arm/arch-iop33x/debug-macro.S24
-rw-r--r--include/asm-arm/arch-iop33x/dma.h9
-rw-r--r--include/asm-arm/arch-iop33x/entry-macro.S37
-rw-r--r--include/asm-arm/arch-iop33x/hardware.h46
-rw-r--r--include/asm-arm/arch-iop33x/io.h27
-rw-r--r--include/asm-arm/arch-iop33x/iop33x.h43
-rw-r--r--include/asm-arm/arch-iop33x/iq80331.h16
-rw-r--r--include/asm-arm/arch-iop33x/iq80332.h16
-rw-r--r--include/asm-arm/arch-iop33x/irqs.h60
-rw-r--r--include/asm-arm/arch-iop33x/memory.h26
-rw-r--r--include/asm-arm/arch-iop33x/system.h22
-rw-r--r--include/asm-arm/arch-iop33x/timex.h9
-rw-r--r--include/asm-arm/arch-iop33x/uncompress.h37
-rw-r--r--include/asm-arm/arch-iop33x/vmalloc.h5
-rw-r--r--include/asm-arm/arch-ixp2000/debug-macro.S27
-rw-r--r--include/asm-arm/arch-ixp2000/dma.h9
-rw-r--r--include/asm-arm/arch-ixp2000/enp2611.h46
-rw-r--r--include/asm-arm/arch-ixp2000/entry-macro.S60
-rw-r--r--include/asm-arm/arch-ixp2000/gpio.h48
-rw-r--r--include/asm-arm/arch-ixp2000/hardware.h44
-rw-r--r--include/asm-arm/arch-ixp2000/io.h134
-rw-r--r--include/asm-arm/arch-ixp2000/irqs.h207
-rw-r--r--include/asm-arm/arch-ixp2000/ixdp2x00.h92
-rw-r--r--include/asm-arm/arch-ixp2000/ixdp2x01.h57
-rw-r--r--include/asm-arm/arch-ixp2000/ixp2000-regs.h457
-rw-r--r--include/asm-arm/arch-ixp2000/memory.h34
-rw-r--r--include/asm-arm/arch-ixp2000/platform.h152
-rw-r--r--include/asm-arm/arch-ixp2000/system.h49
-rw-r--r--include/asm-arm/arch-ixp2000/timex.h13
-rw-r--r--include/asm-arm/arch-ixp2000/uncompress.h47
-rw-r--r--include/asm-arm/arch-ixp2000/vmalloc.h20
-rw-r--r--include/asm-arm/arch-ixp23xx/debug-macro.S26
-rw-r--r--include/asm-arm/arch-ixp23xx/dma.h3
-rw-r--r--include/asm-arm/arch-ixp23xx/entry-macro.S37
-rw-r--r--include/asm-arm/arch-ixp23xx/hardware.h37
-rw-r--r--include/asm-arm/arch-ixp23xx/io.h54
-rw-r--r--include/asm-arm/arch-ixp23xx/irqs.h223
-rw-r--r--include/asm-arm/arch-ixp23xx/ixdp2351.h89
-rw-r--r--include/asm-arm/arch-ixp23xx/ixp23xx.h298
-rw-r--r--include/asm-arm/arch-ixp23xx/memory.h49
-rw-r--r--include/asm-arm/arch-ixp23xx/platform.h57
-rw-r--r--include/asm-arm/arch-ixp23xx/system.h33
-rw-r--r--include/asm-arm/arch-ixp23xx/time.h3
-rw-r--r--include/asm-arm/arch-ixp23xx/timex.h7
-rw-r--r--include/asm-arm/arch-ixp23xx/uncompress.h40
-rw-r--r--include/asm-arm/arch-ixp23xx/vmalloc.h10
-rw-r--r--include/asm-arm/arch-ixp4xx/avila.h39
-rw-r--r--include/asm-arm/arch-ixp4xx/coyote.h33
-rw-r--r--include/asm-arm/arch-ixp4xx/cpu.h46
-rw-r--r--include/asm-arm/arch-ixp4xx/debug-macro.S24
-rw-r--r--include/asm-arm/arch-ixp4xx/dma.h21
-rw-r--r--include/asm-arm/arch-ixp4xx/dsmg600.h52
-rw-r--r--include/asm-arm/arch-ixp4xx/entry-macro.S47
-rw-r--r--include/asm-arm/arch-ixp4xx/fsg.h50
-rw-r--r--include/asm-arm/arch-ixp4xx/gpio.h73
-rw-r--r--include/asm-arm/arch-ixp4xx/gtwx5715.h116
-rw-r--r--include/asm-arm/arch-ixp4xx/hardware.h50
-rw-r--r--include/asm-arm/arch-ixp4xx/io.h569
-rw-r--r--include/asm-arm/arch-ixp4xx/irqs.h138
-rw-r--r--include/asm-arm/arch-ixp4xx/ixdp425.h39
-rw-r--r--include/asm-arm/arch-ixp4xx/ixp4xx-regs.h638
-rw-r--r--include/asm-arm/arch-ixp4xx/memory.h40
-rw-r--r--include/asm-arm/arch-ixp4xx/nas100d.h52
-rw-r--r--include/asm-arm/arch-ixp4xx/nslu2.h55
-rw-r--r--include/asm-arm/arch-ixp4xx/platform.h173
-rw-r--r--include/asm-arm/arch-ixp4xx/prpmc1100.h33
-rw-r--r--include/asm-arm/arch-ixp4xx/system.h42
-rw-r--r--include/asm-arm/arch-ixp4xx/timex.h15
-rw-r--r--include/asm-arm/arch-ixp4xx/udc.h8
-rw-r--r--include/asm-arm/arch-ixp4xx/uncompress.h57
-rw-r--r--include/asm-arm/arch-ixp4xx/vmalloc.h5
-rw-r--r--include/asm-arm/arch-kirkwood/debug-macro.S20
-rw-r--r--include/asm-arm/arch-kirkwood/entry-macro.S40
-rw-r--r--include/asm-arm/arch-kirkwood/hardware.h21
-rw-r--r--include/asm-arm/arch-kirkwood/io.h26
-rw-r--r--include/asm-arm/arch-kirkwood/irqs.h63
-rw-r--r--include/asm-arm/arch-kirkwood/kirkwood.h100
-rw-r--r--include/asm-arm/arch-kirkwood/memory.h14
-rw-r--r--include/asm-arm/arch-kirkwood/system.h37
-rw-r--r--include/asm-arm/arch-kirkwood/timex.h11
-rw-r--r--include/asm-arm/arch-kirkwood/uncompress.h47
-rw-r--r--include/asm-arm/arch-kirkwood/vmalloc.h5
-rw-r--r--include/asm-arm/arch-ks8695/debug-macro.S38
-rw-r--r--include/asm-arm/arch-ks8695/devices.h37
-rw-r--r--include/asm-arm/arch-ks8695/dma.h17
-rw-r--r--include/asm-arm/arch-ks8695/entry-macro.S53
-rw-r--r--include/asm-arm/arch-ks8695/gpio.h79
-rw-r--r--include/asm-arm/arch-ks8695/hardware.h49
-rw-r--r--include/asm-arm/arch-ks8695/io.h19
-rw-r--r--include/asm-arm/arch-ks8695/irqs.h54
-rw-r--r--include/asm-arm/arch-ks8695/memory.h49
-rw-r--r--include/asm-arm/arch-ks8695/regs-gpio.h55
-rw-r--r--include/asm-arm/arch-ks8695/regs-hpna.h25
-rw-r--r--include/asm-arm/arch-ks8695/regs-irq.h41
-rw-r--r--include/asm-arm/arch-ks8695/regs-lan.h65
-rw-r--r--include/asm-arm/arch-ks8695/regs-mem.h89
-rw-r--r--include/asm-arm/arch-ks8695/regs-misc.h97
-rw-r--r--include/asm-arm/arch-ks8695/regs-pci.h53
-rw-r--r--include/asm-arm/arch-ks8695/regs-switch.h66
-rw-r--r--include/asm-arm/arch-ks8695/regs-sys.h34
-rw-r--r--include/asm-arm/arch-ks8695/regs-timer.h40
-rw-r--r--include/asm-arm/arch-ks8695/regs-uart.h92
-rw-r--r--include/asm-arm/arch-ks8695/regs-wan.h65
-rw-r--r--include/asm-arm/arch-ks8695/system.h48
-rw-r--r--include/asm-arm/arch-ks8695/timex.h20
-rw-r--r--include/asm-arm/arch-ks8695/uncompress.h37
-rw-r--r--include/asm-arm/arch-ks8695/vmalloc.h19
-rw-r--r--include/asm-arm/arch-l7200/aux_reg.h28
-rw-r--r--include/asm-arm/arch-l7200/debug-macro.S40
-rw-r--r--include/asm-arm/arch-l7200/dma.h23
-rw-r--r--include/asm-arm/arch-l7200/entry-macro.S35
-rw-r--r--include/asm-arm/arch-l7200/gp_timers.h42
-rw-r--r--include/asm-arm/arch-l7200/gpio.h105
-rw-r--r--include/asm-arm/arch-l7200/hardware.h57
-rw-r--r--include/asm-arm/arch-l7200/io.h27
-rw-r--r--include/asm-arm/arch-l7200/irqs.h56
-rw-r--r--include/asm-arm/arch-l7200/memory.h29
-rw-r--r--include/asm-arm/arch-l7200/pmpcon.h46
-rw-r--r--include/asm-arm/arch-l7200/pmu.h125
-rw-r--r--include/asm-arm/arch-l7200/serial.h37
-rw-r--r--include/asm-arm/arch-l7200/serial_l7200.h101
-rw-r--r--include/asm-arm/arch-l7200/sib.h119
-rw-r--r--include/asm-arm/arch-l7200/sys-clock.h67
-rw-r--r--include/asm-arm/arch-l7200/system.h29
-rw-r--r--include/asm-arm/arch-l7200/time.h73
-rw-r--r--include/asm-arm/arch-l7200/timex.h20
-rw-r--r--include/asm-arm/arch-l7200/uncompress.h39
-rw-r--r--include/asm-arm/arch-l7200/vmalloc.h4
-rw-r--r--include/asm-arm/arch-lh7a40x/clocks.h18
-rw-r--r--include/asm-arm/arch-lh7a40x/constants.h91
-rw-r--r--include/asm-arm/arch-lh7a40x/debug-macro.S39
-rw-r--r--include/asm-arm/arch-lh7a40x/dma.h86
-rw-r--r--include/asm-arm/arch-lh7a40x/entry-macro.S149
-rw-r--r--include/asm-arm/arch-lh7a40x/hardware.h62
-rw-r--r--include/asm-arm/arch-lh7a40x/io.h22
-rw-r--r--include/asm-arm/arch-lh7a40x/irqs.h200
-rw-r--r--include/asm-arm/arch-lh7a40x/memory.h76
-rw-r--r--include/asm-arm/arch-lh7a40x/registers.h224
-rw-r--r--include/asm-arm/arch-lh7a40x/system.h19
-rw-r--r--include/asm-arm/arch-lh7a40x/timex.h17
-rw-r--r--include/asm-arm/arch-lh7a40x/uncompress.h38
-rw-r--r--include/asm-arm/arch-lh7a40x/vmalloc.h10
-rw-r--r--include/asm-arm/arch-loki/debug-macro.S20
-rw-r--r--include/asm-arm/arch-loki/entry-macro.S30
-rw-r--r--include/asm-arm/arch-loki/hardware.h15
-rw-r--r--include/asm-arm/arch-loki/io.h26
-rw-r--r--include/asm-arm/arch-loki/irqs.h58
-rw-r--r--include/asm-arm/arch-loki/loki.h97
-rw-r--r--include/asm-arm/arch-loki/memory.h14
-rw-r--r--include/asm-arm/arch-loki/system.h37
-rw-r--r--include/asm-arm/arch-loki/timex.h11
-rw-r--r--include/asm-arm/arch-loki/uncompress.h47
-rw-r--r--include/asm-arm/arch-loki/vmalloc.h5
-rw-r--r--include/asm-arm/arch-msm/board.h37
-rw-r--r--include/asm-arm/arch-msm/debug-macro.S40
-rw-r--r--include/asm-arm/arch-msm/dma.h151
-rw-r--r--include/asm-arm/arch-msm/entry-macro.S38
-rw-r--r--include/asm-arm/arch-msm/hardware.h18
-rw-r--r--include/asm-arm/arch-msm/io.h33
-rw-r--r--include/asm-arm/arch-msm/irqs.h90
-rw-r--r--include/asm-arm/arch-msm/memory.h27
-rw-r--r--include/asm-arm/arch-msm/msm_iomap.h104
-rw-r--r--include/asm-arm/arch-msm/system.h23
-rw-r--r--include/asm-arm/arch-msm/timex.h21
-rw-r--r--include/asm-arm/arch-msm/uncompress.h36
-rw-r--r--include/asm-arm/arch-msm/vmalloc.h22
-rw-r--r--include/asm-arm/arch-mv78xx0/debug-macro.S20
-rw-r--r--include/asm-arm/arch-mv78xx0/entry-macro.S39
-rw-r--r--include/asm-arm/arch-mv78xx0/hardware.h21
-rw-r--r--include/asm-arm/arch-mv78xx0/io.h26
-rw-r--r--include/asm-arm/arch-mv78xx0/irqs.h91
-rw-r--r--include/asm-arm/arch-mv78xx0/memory.h14
-rw-r--r--include/asm-arm/arch-mv78xx0/mv78xx0.h126
-rw-r--r--include/asm-arm/arch-mv78xx0/system.h37
-rw-r--r--include/asm-arm/arch-mv78xx0/timex.h9
-rw-r--r--include/asm-arm/arch-mv78xx0/uncompress.h47
-rw-r--r--include/asm-arm/arch-mv78xx0/vmalloc.h5
-rw-r--r--include/asm-arm/arch-mxc/debug-macro.S49
-rw-r--r--include/asm-arm/arch-mxc/gpio.h42
-rw-r--r--include/asm-arm/arch-mxc/hardware.h37
-rw-r--r--include/asm-arm/arch-mxc/irqs.h16
-rw-r--r--include/asm-arm/arch-mxc/memory.h29
-rw-r--r--include/asm-arm/arch-mxc/mxc_timer.h158
-rw-r--r--include/asm-arm/arch-mxc/timex.h25
-rw-r--r--include/asm-arm/arch-mxc/uncompress.h78
-rw-r--r--include/asm-arm/arch-netx/debug-macro.S38
-rw-r--r--include/asm-arm/arch-netx/dma.h21
-rw-r--r--include/asm-arm/arch-netx/entry-macro.S41
-rw-r--r--include/asm-arm/arch-netx/eth.h27
-rw-r--r--include/asm-arm/arch-netx/hardware.h39
-rw-r--r--include/asm-arm/arch-netx/io.h28
-rw-r--r--include/asm-arm/arch-netx/irqs.h70
-rw-r--r--include/asm-arm/arch-netx/memory.h36
-rw-r--r--include/asm-arm/arch-netx/netx-regs.h410
-rw-r--r--include/asm-arm/arch-netx/param.h18
-rw-r--r--include/asm-arm/arch-netx/pfifo.h54
-rw-r--r--include/asm-arm/arch-netx/system.h38
-rw-r--r--include/asm-arm/arch-netx/timex.h20
-rw-r--r--include/asm-arm/arch-netx/uncompress.h76
-rw-r--r--include/asm-arm/arch-netx/vmalloc.h19
-rw-r--r--include/asm-arm/arch-netx/xc.h42
-rw-r--r--include/asm-arm/arch-ns9xxx/board.h42
-rw-r--r--include/asm-arm/arch-ns9xxx/debug-macro.S22
-rw-r--r--include/asm-arm/arch-ns9xxx/dma.h14
-rw-r--r--include/asm-arm/arch-ns9xxx/entry-macro.S28
-rw-r--r--include/asm-arm/arch-ns9xxx/gpio.h47
-rw-r--r--include/asm-arm/arch-ns9xxx/hardware.h79
-rw-r--r--include/asm-arm/arch-ns9xxx/io.h20
-rw-r--r--include/asm-arm/arch-ns9xxx/irqs.h86
-rw-r--r--include/asm-arm/arch-ns9xxx/memory.h27
-rw-r--r--include/asm-arm/arch-ns9xxx/module.h60
-rw-r--r--include/asm-arm/arch-ns9xxx/processor-ns9360.h32
-rw-r--r--include/asm-arm/arch-ns9xxx/processor.h42
-rw-r--r--include/asm-arm/arch-ns9xxx/regs-bbu.h45
-rw-r--r--include/asm-arm/arch-ns9xxx/regs-board-a9m9750dev.h24
-rw-r--r--include/asm-arm/arch-ns9xxx/regs-mem.h135
-rw-r--r--include/asm-arm/arch-ns9xxx/regs-sys-common.h31
-rw-r--r--include/asm-arm/arch-ns9xxx/regs-sys-ns9360.h148
-rw-r--r--include/asm-arm/arch-ns9xxx/system.h35
-rw-r--r--include/asm-arm/arch-ns9xxx/timex.h20
-rw-r--r--include/asm-arm/arch-ns9xxx/uncompress.h164
-rw-r--r--include/asm-arm/arch-ns9xxx/vmalloc.h16
-rw-r--r--include/asm-arm/arch-omap/aic23.h116
-rw-r--r--include/asm-arm/arch-omap/board-2430sdp.h39
-rw-r--r--include/asm-arm/arch-omap/board-ams-delta.h76
-rw-r--r--include/asm-arm/arch-omap/board-apollon.h38
-rw-r--r--include/asm-arm/arch-omap/board-fsample.h51
-rw-r--r--include/asm-arm/arch-omap/board-h2.h41
-rw-r--r--include/asm-arm/arch-omap/board-h3.h36
-rw-r--r--include/asm-arm/arch-omap/board-h4.h35
-rw-r--r--include/asm-arm/arch-omap/board-innovator.h52
-rw-r--r--include/asm-arm/arch-omap/board-nokia.h54
-rw-r--r--include/asm-arm/arch-omap/board-osk.h47
-rw-r--r--include/asm-arm/arch-omap/board-palmte.h32
-rw-r--r--include/asm-arm/arch-omap/board-palmtt.h23
-rw-r--r--include/asm-arm/arch-omap/board-palmz71.h26
-rw-r--r--include/asm-arm/arch-omap/board-perseus2.h39
-rw-r--r--include/asm-arm/arch-omap/board.h186
-rw-r--r--include/asm-arm/arch-omap/clock.h162
-rw-r--r--include/asm-arm/arch-omap/common.h69
-rw-r--r--include/asm-arm/arch-omap/control.h189
-rw-r--r--include/asm-arm/arch-omap/cpu.h402
-rw-r--r--include/asm-arm/arch-omap/debug-macro.S58
-rw-r--r--include/asm-arm/arch-omap/dma.h570
-rw-r--r--include/asm-arm/arch-omap/dmtimer.h84
-rw-r--r--include/asm-arm/arch-omap/eac.h100
-rw-r--r--include/asm-arm/arch-omap/entry-macro.S89
-rw-r--r--include/asm-arm/arch-omap/fpga.h197
-rw-r--r--include/asm-arm/arch-omap/gpio.h122
-rw-r--r--include/asm-arm/arch-omap/gpioexpander.h35
-rw-r--r--include/asm-arm/arch-omap/hardware.h355
-rw-r--r--include/asm-arm/arch-omap/io.h197
-rw-r--r--include/asm-arm/arch-omap/irda.h37
-rw-r--r--include/asm-arm/arch-omap/irqs.h332
-rw-r--r--include/asm-arm/arch-omap/keypad.h39
-rw-r--r--include/asm-arm/arch-omap/led.h24
-rw-r--r--include/asm-arm/arch-omap/mcbsp.h380
-rw-r--r--include/asm-arm/arch-omap/memory.h103
-rw-r--r--include/asm-arm/arch-omap/menelaus.h49
-rw-r--r--include/asm-arm/arch-omap/mmc.h74
-rw-r--r--include/asm-arm/arch-omap/mtd-xip.h61
-rw-r--r--include/asm-arm/arch-omap/mux.h615
-rw-r--r--include/asm-arm/arch-omap/nand.h24
-rw-r--r--include/asm-arm/arch-omap/omap-alsa.h123
-rw-r--r--include/asm-arm/arch-omap/omap1510.h48
-rw-r--r--include/asm-arm/arch-omap/omap16xx.h197
-rw-r--r--include/asm-arm/arch-omap/omap24xx.h107
-rw-r--r--include/asm-arm/arch-omap/omap34xx.h72
-rw-r--r--include/asm-arm/arch-omap/omap730.h102
-rw-r--r--include/asm-arm/arch-omap/omapfb.h395
-rw-r--r--include/asm-arm/arch-omap/onenand.h21
-rw-r--r--include/asm-arm/arch-omap/param.h8
-rw-r--r--include/asm-arm/arch-omap/pm.h356
-rw-r--r--include/asm-arm/arch-omap/prcm.h33
-rw-r--r--include/asm-arm/arch-omap/sdrc.h75
-rw-r--r--include/asm-arm/arch-omap/serial.h37
-rw-r--r--include/asm-arm/arch-omap/sram.h56
-rw-r--r--include/asm-arm/arch-omap/system.h49
-rw-r--r--include/asm-arm/arch-omap/tc.h106
-rw-r--r--include/asm-arm/arch-omap/timex.h41
-rw-r--r--include/asm-arm/arch-omap/uncompress.h83
-rw-r--r--include/asm-arm/arch-omap/usb.h141
-rw-r--r--include/asm-arm/arch-omap/vmalloc.h21
-rw-r--r--include/asm-arm/arch-orion5x/debug-macro.S22
-rw-r--r--include/asm-arm/arch-orion5x/entry-macro.S31
-rw-r--r--include/asm-arm/arch-orion5x/gpio.h28
-rw-r--r--include/asm-arm/arch-orion5x/hardware.h21
-rw-r--r--include/asm-arm/arch-orion5x/io.h63
-rw-r--r--include/asm-arm/arch-orion5x/irqs.h62
-rw-r--r--include/asm-arm/arch-orion5x/memory.h16
-rw-r--r--include/asm-arm/arch-orion5x/orion5x.h162
-rw-r--r--include/asm-arm/arch-orion5x/system.h32
-rw-r--r--include/asm-arm/arch-orion5x/timex.h13
-rw-r--r--include/asm-arm/arch-orion5x/uncompress.h49
-rw-r--r--include/asm-arm/arch-orion5x/vmalloc.h5
-rw-r--r--include/asm-arm/arch-pnx4008/clock.h62
-rw-r--r--include/asm-arm/arch-pnx4008/debug-macro.S23
-rw-r--r--include/asm-arm/arch-pnx4008/dma.h162
-rw-r--r--include/asm-arm/arch-pnx4008/entry-macro.S127
-rw-r--r--include/asm-arm/arch-pnx4008/gpio.h241
-rw-r--r--include/asm-arm/arch-pnx4008/hardware.h32
-rw-r--r--include/asm-arm/arch-pnx4008/i2c.h67
-rw-r--r--include/asm-arm/arch-pnx4008/io.h21
-rw-r--r--include/asm-arm/arch-pnx4008/irq.h42
-rw-r--r--include/asm-arm/arch-pnx4008/irqs.h215
-rw-r--r--include/asm-arm/arch-pnx4008/memory.h24
-rw-r--r--include/asm-arm/arch-pnx4008/param.h21
-rw-r--r--include/asm-arm/arch-pnx4008/platform.h69
-rw-r--r--include/asm-arm/arch-pnx4008/pm.h33
-rw-r--r--include/asm-arm/arch-pnx4008/system.h38
-rw-r--r--include/asm-arm/arch-pnx4008/timex.h73
-rw-r--r--include/asm-arm/arch-pnx4008/uncompress.h46
-rw-r--r--include/asm-arm/arch-pnx4008/vmalloc.h20
-rw-r--r--include/asm-arm/arch-pxa/debug-macro.S25
-rw-r--r--include/asm-arm/arch-pxa/dma.h50
-rw-r--r--include/asm-arm/arch-pxa/entry-macro.S57
-rw-r--r--include/asm-arm/arch-pxa/gpio.h65
-rw-r--r--include/asm-arm/arch-pxa/gumstix.h96
-rw-r--r--include/asm-arm/arch-pxa/hardware.h240
-rw-r--r--include/asm-arm/arch-pxa/idp.h199
-rw-r--r--include/asm-arm/arch-pxa/io.h20
-rw-r--r--include/asm-arm/arch-pxa/irqs.h264
-rw-r--r--include/asm-arm/arch-pxa/lpd270.h38
-rw-r--r--include/asm-arm/arch-pxa/lubbock.h40
-rw-r--r--include/asm-arm/arch-pxa/magician.h117
-rw-r--r--include/asm-arm/arch-pxa/mainstone.h120
-rw-r--r--include/asm-arm/arch-pxa/memory.h52
-rw-r--r--include/asm-arm/arch-pxa/mfp-pxa25x.h161
-rw-r--r--include/asm-arm/arch-pxa/mfp-pxa27x.h433
-rw-r--r--include/asm-arm/arch-pxa/mfp-pxa2xx.h133
-rw-r--r--include/asm-arm/arch-pxa/mfp-pxa300.h575
-rw-r--r--include/asm-arm/arch-pxa/mfp-pxa320.h447
-rw-r--r--include/asm-arm/arch-pxa/mfp-pxa930.h491
-rw-r--r--include/asm-arm/arch-pxa/mfp.h319
-rw-r--r--include/asm-arm/arch-pxa/mtd-xip.h37
-rw-r--r--include/asm-arm/arch-pxa/pcm027.h75
-rw-r--r--include/asm-arm/arch-pxa/pcm990_baseboard.h275
-rw-r--r--include/asm-arm/arch-pxa/poodle.h75
-rw-r--r--include/asm-arm/arch-pxa/pxa-regs.h1070
-rw-r--r--include/asm-arm/arch-pxa/pxa2xx-regs.h246
-rw-r--r--include/asm-arm/arch-pxa/pxa3xx-regs.h183
-rw-r--r--include/asm-arm/arch-pxa/pxafb.h151
-rw-r--r--include/asm-arm/arch-pxa/regs-lcd.h180
-rw-r--r--include/asm-arm/arch-pxa/system.h24
-rw-r--r--include/asm-arm/arch-pxa/timex.h26
-rw-r--r--include/asm-arm/arch-pxa/udc.h8
-rw-r--r--include/asm-arm/arch-pxa/uncompress.h45
-rw-r--r--include/asm-arm/arch-pxa/vmalloc.h11
-rw-r--r--include/asm-arm/arch-realview/board-eb.h191
-rw-r--r--include/asm-arm/arch-realview/board-pb1176.h152
-rw-r--r--include/asm-arm/arch-realview/board-pb11mp.h186
-rw-r--r--include/asm-arm/arch-realview/debug-macro.S22
-rw-r--r--include/asm-arm/arch-realview/dma.h20
-rw-r--r--include/asm-arm/arch-realview/entry-macro.S81
-rw-r--r--include/asm-arm/arch-realview/hardware.h31
-rw-r--r--include/asm-arm/arch-realview/io.h33
-rw-r--r--include/asm-arm/arch-realview/irqs.h38
-rw-r--r--include/asm-arm/arch-realview/memory.h38
-rw-r--r--include/asm-arm/arch-realview/platform.h293
-rw-r--r--include/asm-arm/arch-realview/system.h51
-rw-r--r--include/asm-arm/arch-realview/timex.h23
-rw-r--r--include/asm-arm/arch-realview/uncompress.h72
-rw-r--r--include/asm-arm/arch-realview/vmalloc.h21
-rw-r--r--include/asm-arm/arch-rpc/acornfb.h140
-rw-r--r--include/asm-arm/arch-rpc/debug-macro.S25
-rw-r--r--include/asm-arm/arch-rpc/dma.h33
-rw-r--r--include/asm-arm/arch-rpc/entry-macro.S16
-rw-r--r--include/asm-arm/arch-rpc/hardware.h83
-rw-r--r--include/asm-arm/arch-rpc/io.h258
-rw-r--r--include/asm-arm/arch-rpc/irqs.h46
-rw-r--r--include/asm-arm/arch-rpc/memory.h39
-rw-r--r--include/asm-arm/arch-rpc/system.h27
-rw-r--r--include/asm-arm/arch-rpc/timex.h17
-rw-r--r--include/asm-arm/arch-rpc/uncompress.h198
-rw-r--r--include/asm-arm/arch-rpc/vmalloc.h10
-rw-r--r--include/asm-arm/arch-s3c2400/map.h66
-rw-r--r--include/asm-arm/arch-s3c2400/memory.h23
-rw-r--r--include/asm-arm/arch-s3c2410/anubis-cpld.h25
-rw-r--r--include/asm-arm/arch-s3c2410/anubis-irq.h21
-rw-r--r--include/asm-arm/arch-s3c2410/anubis-map.h38
-rw-r--r--include/asm-arm/arch-s3c2410/audio.h45
-rw-r--r--include/asm-arm/arch-s3c2410/bast-cpld.h53
-rw-r--r--include/asm-arm/arch-s3c2410/bast-irq.h29
-rw-r--r--include/asm-arm/arch-s3c2410/bast-map.h146
-rw-r--r--include/asm-arm/arch-s3c2410/bast-pmu.h40
-rw-r--r--include/asm-arm/arch-s3c2410/debug-macro.S102
-rw-r--r--include/asm-arm/arch-s3c2410/dma.h453
-rw-r--r--include/asm-arm/arch-s3c2410/entry-macro.S78
-rw-r--r--include/asm-arm/arch-s3c2410/fb.h74
-rw-r--r--include/asm-arm/arch-s3c2410/gpio.h18
-rw-r--r--include/asm-arm/arch-s3c2410/h1940-latch.h64
-rw-r--r--include/asm-arm/arch-s3c2410/h1940.h21
-rw-r--r--include/asm-arm/arch-s3c2410/hardware.h141
-rw-r--r--include/asm-arm/arch-s3c2410/idle.h24
-rw-r--r--include/asm-arm/arch-s3c2410/io.h218
-rw-r--r--include/asm-arm/arch-s3c2410/irqs.h166
-rw-r--r--include/asm-arm/arch-s3c2410/leds-gpio.h28
-rw-r--r--include/asm-arm/arch-s3c2410/map.h178
-rw-r--r--include/asm-arm/arch-s3c2410/memory.h19
-rw-r--r--include/asm-arm/arch-s3c2410/osiris-cpld.h30
-rw-r--r--include/asm-arm/arch-s3c2410/osiris-map.h42
-rw-r--r--include/asm-arm/arch-s3c2410/otom-map.h30
-rw-r--r--include/asm-arm/arch-s3c2410/regs-clock.h197
-rw-r--r--include/asm-arm/arch-s3c2410/regs-dsc.h184
-rw-r--r--include/asm-arm/arch-s3c2410/regs-gpio.h1163
-rw-r--r--include/asm-arm/arch-s3c2410/regs-gpioj.h106
-rw-r--r--include/asm-arm/arch-s3c2410/regs-irq.h43
-rw-r--r--include/asm-arm/arch-s3c2410/regs-lcd.h162
-rw-r--r--include/asm-arm/arch-s3c2410/regs-mem.h220
-rw-r--r--include/asm-arm/arch-s3c2410/regs-power.h40
-rw-r--r--include/asm-arm/arch-s3c2410/regs-s3c2412-mem.h29
-rw-r--r--include/asm-arm/arch-s3c2410/regs-s3c2412.h23
-rw-r--r--include/asm-arm/arch-s3c2410/regs-s3c2443-clock.h195
-rw-r--r--include/asm-arm/arch-s3c2410/regs-sdi.h127
-rw-r--r--include/asm-arm/arch-s3c2410/reset.h22
-rw-r--r--include/asm-arm/arch-s3c2410/spi-gpio.h27
-rw-r--r--include/asm-arm/arch-s3c2410/spi.h25
-rw-r--r--include/asm-arm/arch-s3c2410/system-reset.h64
-rw-r--r--include/asm-arm/arch-s3c2410/system.h58
-rw-r--r--include/asm-arm/arch-s3c2410/timex.h26
-rw-r--r--include/asm-arm/arch-s3c2410/uncompress.h52
-rw-r--r--include/asm-arm/arch-s3c2410/usb-control.h41
-rw-r--r--include/asm-arm/arch-s3c2410/vmalloc.h20
-rw-r--r--include/asm-arm/arch-s3c2410/vr1000-cpld.h18
-rw-r--r--include/asm-arm/arch-s3c2410/vr1000-irq.h26
-rw-r--r--include/asm-arm/arch-s3c2410/vr1000-map.h110
-rw-r--r--include/asm-arm/arch-sa1100/SA-1101.h925
-rw-r--r--include/asm-arm/arch-sa1100/assabet.h105
-rw-r--r--include/asm-arm/arch-sa1100/badge4.h75
-rw-r--r--include/asm-arm/arch-sa1100/cerf.h28
-rw-r--r--include/asm-arm/arch-sa1100/collie.h88
-rw-r--r--include/asm-arm/arch-sa1100/debug-macro.S58
-rw-r--r--include/asm-arm/arch-sa1100/dma.h117
-rw-r--r--include/asm-arm/arch-sa1100/entry-macro.S47
-rw-r--r--include/asm-arm/arch-sa1100/gpio.h68
-rw-r--r--include/asm-arm/arch-sa1100/hardware.h57
-rw-r--r--include/asm-arm/arch-sa1100/ide.h75
-rw-r--r--include/asm-arm/arch-sa1100/io.h26
-rw-r--r--include/asm-arm/arch-sa1100/irqs.h197
-rw-r--r--include/asm-arm/arch-sa1100/jornada720.h27
-rw-r--r--include/asm-arm/arch-sa1100/mcp.h21
-rw-r--r--include/asm-arm/arch-sa1100/memory.h68
-rw-r--r--include/asm-arm/arch-sa1100/neponset.h74
-rw-r--r--include/asm-arm/arch-sa1100/simpad.h112
-rw-r--r--include/asm-arm/arch-sa1100/system.h22
-rw-r--r--include/asm-arm/arch-sa1100/timex.h12
-rw-r--r--include/asm-arm/arch-sa1100/uncompress.h50
-rw-r--r--include/asm-arm/arch-sa1100/vmalloc.h4
-rw-r--r--include/asm-arm/arch-shark/debug-macro.S31
-rw-r--r--include/asm-arm/arch-shark/dma.h18
-rw-r--r--include/asm-arm/arch-shark/entry-macro.S41
-rw-r--r--include/asm-arm/arch-shark/hardware.h51
-rw-r--r--include/asm-arm/arch-shark/io.h56
-rw-r--r--include/asm-arm/arch-shark/irqs.h13
-rw-r--r--include/asm-arm/arch-shark/memory.h48
-rw-r--r--include/asm-arm/arch-shark/system.h28
-rw-r--r--include/asm-arm/arch-shark/timex.h7
-rw-r--r--include/asm-arm/arch-shark/uncompress.h51
-rw-r--r--include/asm-arm/arch-shark/vmalloc.h4
-rw-r--r--include/asm-arm/arch-versatile/debug-macro.S23
-rw-r--r--include/asm-arm/arch-versatile/dma.h20
-rw-r--r--include/asm-arm/arch-versatile/entry-macro.S44
-rw-r--r--include/asm-arm/arch-versatile/hardware.h52
-rw-r--r--include/asm-arm/arch-versatile/io.h32
-rw-r--r--include/asm-arm/arch-versatile/irqs.h211
-rw-r--r--include/asm-arm/arch-versatile/memory.h38
-rw-r--r--include/asm-arm/arch-versatile/platform.h510
-rw-r--r--include/asm-arm/arch-versatile/system.h49
-rw-r--r--include/asm-arm/arch-versatile/timex.h23
-rw-r--r--include/asm-arm/arch-versatile/uncompress.h46
-rw-r--r--include/asm-arm/arch-versatile/vmalloc.h21
-rw-r--r--include/asm-arm/plat-s3c/iic.h2
-rw-r--r--include/asm-arm/plat-s3c/nand.h2
-rw-r--r--include/asm-arm/plat-s3c/regs-ac97.h2
-rw-r--r--include/asm-arm/plat-s3c/regs-adc.h2
-rw-r--r--include/asm-arm/plat-s3c/regs-iic.h2
-rw-r--r--include/asm-arm/plat-s3c/regs-nand.h2
-rw-r--r--include/asm-arm/plat-s3c/regs-rtc.h2
-rw-r--r--include/asm-arm/plat-s3c/regs-serial.h2
-rw-r--r--include/asm-arm/plat-s3c/regs-timer.h2
-rw-r--r--include/asm-arm/plat-s3c/regs-watchdog.h2
-rw-r--r--include/asm-arm/plat-s3c24xx/regs-iis.h2
-rw-r--r--include/asm-arm/plat-s3c24xx/regs-spi.h2
-rw-r--r--include/asm-arm/plat-s3c24xx/regs-udc.h2
-rw-r--r--include/asm-arm/plat-s3c24xx/udc.h2
-rw-r--r--include/asm-avr32/arch-at32ap/at32ap700x.h49
-rw-r--r--include/asm-avr32/gpio.h6
-rw-r--r--include/asm-avr32/io.h312
-rw-r--r--include/asm-avr32/irq.h24
-rw-r--r--include/asm-generic/ioctl.h4
-rw-r--r--include/asm-m68k/unistd.h8
-rw-r--r--include/asm-x86/efi.h2
-rw-r--r--include/asm-x86/hw_irq.h12
-rw-r--r--include/asm-x86/irq_vectors.h10
-rw-r--r--include/linux/Kbuild1
-rw-r--r--include/linux/agp_backend.h5
-rw-r--r--include/linux/bitmap.h1
-rw-r--r--include/linux/bootmem.h4
-rw-r--r--include/linux/byteorder.h372
-rw-r--r--include/linux/firmware-map.h26
-rw-r--r--include/linux/harrier_defs.h212
-rw-r--r--include/linux/i2c-id.h2
-rw-r--r--include/linux/i2c-pnx.h4
-rw-r--r--include/linux/init.h1
-rw-r--r--include/linux/kernel.h14
-rw-r--r--include/linux/list.h4
-rw-r--r--include/linux/lockdep.h70
-rw-r--r--include/linux/mfd/t7l66xb.h36
-rw-r--r--include/linux/mfd/tc6387xb.h23
-rw-r--r--include/linux/mfd/tc6393xb.h9
-rw-r--r--include/linux/mfd/tmio.h19
-rw-r--r--include/linux/mm.h20
-rw-r--r--include/linux/pci.h11
-rw-r--r--include/linux/pci_ids.h2
-rw-r--r--include/linux/rcuclassic.h2
-rw-r--r--include/linux/sched.h31
-rw-r--r--include/linux/seq_file.h12
-rw-r--r--include/linux/slub_def.h1
-rw-r--r--include/linux/spinlock.h6
-rw-r--r--include/linux/spinlock_api_smp.h2
-rw-r--r--include/linux/swab.h309
-rw-r--r--include/video/atmel_lcdc.h1
-rw-r--r--include/video/radeon.h4
-rw-r--r--init/main.c6
-rw-r--r--kernel/Kconfig.hz2
-rw-r--r--kernel/cpu.c7
-rw-r--r--kernel/dma-coherent.c10
-rw-r--r--kernel/irq/proc.c96
-rw-r--r--kernel/lockdep.c295
-rw-r--r--kernel/lockdep_internals.h6
-rw-r--r--kernel/lockdep_proc.c37
-rw-r--r--kernel/module.c2
-rw-r--r--kernel/posix-timers.c19
-rw-r--r--kernel/sched.c23
-rw-r--r--kernel/sched_clock.c178
-rw-r--r--kernel/sched_fair.c21
-rw-r--r--kernel/sched_rt.c8
-rw-r--r--kernel/signal.c1
-rw-r--r--kernel/smp.c58
-rw-r--r--kernel/spinlock.c11
-rw-r--r--kernel/stop_machine.c1
-rw-r--r--kernel/time/tick-sched.c2
-rw-r--r--kernel/workqueue.c24
-rw-r--r--lib/Kconfig.debug9
-rw-r--r--lib/bitmap.c11
-rw-r--r--lib/debug_locks.c2
-rw-r--r--lib/vsprintf.c2
-rw-r--r--mm/Kconfig3
-rw-r--r--mm/hugetlb.c62
-rw-r--r--mm/memcontrol.c2
-rw-r--r--mm/mempolicy.c1
-rw-r--r--mm/mmap.c20
-rw-r--r--mm/page_alloc.c2
-rw-r--r--mm/slab.c1
-rw-r--r--mm/slob.c1
-rw-r--r--mm/slub.c27
-rw-r--r--mm/sparse.c1
-rw-r--r--mm/util.c15
-rw-r--r--sound/arm/pxa2xx-ac97.c8
-rw-r--r--sound/arm/pxa2xx-pcm.c4
-rw-r--r--sound/arm/sa11xx-uda1341.c4
-rw-r--r--sound/oss/vidc.c2
-rw-r--r--sound/oss/vidc_fill.S2
-rw-r--r--sound/oss/waveartist.c2
-rw-r--r--sound/pci/hda/hda_intel.c4
-rw-r--r--sound/soc/at32/playpaq_wm8510.c4
-rw-r--r--sound/soc/at91/at91-pcm.c4
-rw-r--r--sound/soc/at91/at91-pcm.h2
-rw-r--r--sound/soc/at91/at91-ssc.c6
-rw-r--r--sound/soc/at91/eti_b1_wm8731.c4
-rw-r--r--sound/soc/codecs/wm8750.c3
-rw-r--r--sound/soc/davinci/davinci-evm.c3
-rw-r--r--sound/soc/omap/n810.c4
-rw-r--r--sound/soc/omap/omap-mcbsp.c6
-rw-r--r--sound/soc/omap/omap-pcm.c2
-rw-r--r--sound/soc/pxa/corgi.c8
-rw-r--r--sound/soc/pxa/e800_wm9712.c6
-rw-r--r--sound/soc/pxa/em-x270.c6
-rw-r--r--sound/soc/pxa/poodle.c8
-rw-r--r--sound/soc/pxa/pxa2xx-ac97.c8
-rw-r--r--sound/soc/pxa/pxa2xx-i2s.c8
-rw-r--r--sound/soc/pxa/pxa2xx-pcm.c6
-rw-r--r--sound/soc/pxa/spitz.c10
-rw-r--r--sound/soc/pxa/tosa.c8
-rw-r--r--sound/soc/s3c24xx/neo1973_wm8753.c11
-rw-r--r--sound/soc/s3c24xx/s3c2412-i2s.c8
-rw-r--r--sound/soc/s3c24xx/s3c2443-ac97.c10
-rw-r--r--sound/soc/s3c24xx/s3c24xx-i2s.c10
-rw-r--r--sound/soc/s3c24xx/s3c24xx-pcm.c6
2613 files changed, 62947 insertions, 56565 deletions
diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile
index 1d1b34500b69..1615350b7b53 100644
--- a/Documentation/DocBook/Makefile
+++ b/Documentation/DocBook/Makefile
@@ -102,6 +102,13 @@ C-procfs-example = procfs_example.xml
102C-procfs-example2 = $(addprefix $(obj)/,$(C-procfs-example)) 102C-procfs-example2 = $(addprefix $(obj)/,$(C-procfs-example))
103$(obj)/procfs-guide.xml: $(C-procfs-example2) 103$(obj)/procfs-guide.xml: $(C-procfs-example2)
104 104
105# List of programs to build
106##oops, this is a kernel module::hostprogs-y := procfs_example
107obj-m += procfs_example.o
108
109# Tell kbuild to always build the programs
110always := $(hostprogs-y)
111
105notfoundtemplate = echo "*** You have to install docbook-utils or xmlto ***"; \ 112notfoundtemplate = echo "*** You have to install docbook-utils or xmlto ***"; \
106 exit 1 113 exit 1
107db2xtemplate = db2TYPE -o $(dir $@) $< 114db2xtemplate = db2TYPE -o $(dir $@) $<
diff --git a/Documentation/DocBook/procfs_example.c b/Documentation/DocBook/procfs_example.c
index 7064084c1c5e..2f3de0fb8365 100644
--- a/Documentation/DocBook/procfs_example.c
+++ b/Documentation/DocBook/procfs_example.c
@@ -189,8 +189,6 @@ static int __init init_procfs_example(void)
189 return 0; 189 return 0;
190 190
191no_symlink: 191no_symlink:
192 remove_proc_entry("tty", example_dir);
193no_tty:
194 remove_proc_entry("bar", example_dir); 192 remove_proc_entry("bar", example_dir);
195no_bar: 193no_bar:
196 remove_proc_entry("foo", example_dir); 194 remove_proc_entry("foo", example_dir);
@@ -206,7 +204,6 @@ out:
206static void __exit cleanup_procfs_example(void) 204static void __exit cleanup_procfs_example(void)
207{ 205{
208 remove_proc_entry("jiffies_too", example_dir); 206 remove_proc_entry("jiffies_too", example_dir);
209 remove_proc_entry("tty", example_dir);
210 remove_proc_entry("bar", example_dir); 207 remove_proc_entry("bar", example_dir);
211 remove_proc_entry("foo", example_dir); 208 remove_proc_entry("foo", example_dir);
212 remove_proc_entry("jiffies", example_dir); 209 remove_proc_entry("jiffies", example_dir);
@@ -222,3 +219,4 @@ module_exit(cleanup_procfs_example);
222 219
223MODULE_AUTHOR("Erik Mouw"); 220MODULE_AUTHOR("Erik Mouw");
224MODULE_DESCRIPTION("procfs examples"); 221MODULE_DESCRIPTION("procfs examples");
222MODULE_LICENSE("GPL");
diff --git a/Documentation/Makefile b/Documentation/Makefile
new file mode 100644
index 000000000000..94b945733534
--- /dev/null
+++ b/Documentation/Makefile
@@ -0,0 +1,3 @@
1obj-m := DocBook/ accounting/ auxdisplay/ connector/ \
2 filesystems/configfs/ ia64/ networking/ \
3 pcmcia/ spi/ video4linux/ vm/ watchdog/src/
diff --git a/Documentation/accounting/Makefile b/Documentation/accounting/Makefile
new file mode 100644
index 000000000000..31929eb875b1
--- /dev/null
+++ b/Documentation/accounting/Makefile
@@ -0,0 +1,10 @@
1# kbuild trick to avoid linker error. Can be omitted if a module is built.
2obj- := dummy.o
3
4# List of programs to build
5hostprogs-y := getdelays
6
7# Tell kbuild to always build the programs
8always := $(hostprogs-y)
9
10HOSTCFLAGS_getdelays.o += -I$(objtree)/usr/include
diff --git a/Documentation/accounting/getdelays.c b/Documentation/accounting/getdelays.c
index 3f7755f3963f..cc49400b4af8 100644
--- a/Documentation/accounting/getdelays.c
+++ b/Documentation/accounting/getdelays.c
@@ -201,13 +201,19 @@ void print_delayacct(struct taskstats *t)
201 "RECLAIM %12s%15s\n" 201 "RECLAIM %12s%15s\n"
202 " %15llu%15llu\n", 202 " %15llu%15llu\n",
203 "count", "real total", "virtual total", "delay total", 203 "count", "real total", "virtual total", "delay total",
204 t->cpu_count, t->cpu_run_real_total, t->cpu_run_virtual_total, 204 (unsigned long long)t->cpu_count,
205 t->cpu_delay_total, 205 (unsigned long long)t->cpu_run_real_total,
206 (unsigned long long)t->cpu_run_virtual_total,
207 (unsigned long long)t->cpu_delay_total,
206 "count", "delay total", 208 "count", "delay total",
207 t->blkio_count, t->blkio_delay_total, 209 (unsigned long long)t->blkio_count,
208 "count", "delay total", t->swapin_count, t->swapin_delay_total, 210 (unsigned long long)t->blkio_delay_total,
209 "count", "delay total", 211 "count", "delay total",
210 t->freepages_count, t->freepages_delay_total); 212 (unsigned long long)t->swapin_count,
213 (unsigned long long)t->swapin_delay_total,
214 "count", "delay total",
215 (unsigned long long)t->freepages_count,
216 (unsigned long long)t->freepages_delay_total);
211} 217}
212 218
213void task_context_switch_counts(struct taskstats *t) 219void task_context_switch_counts(struct taskstats *t)
@@ -215,14 +221,17 @@ void task_context_switch_counts(struct taskstats *t)
215 printf("\n\nTask %15s%15s\n" 221 printf("\n\nTask %15s%15s\n"
216 " %15llu%15llu\n", 222 " %15llu%15llu\n",
217 "voluntary", "nonvoluntary", 223 "voluntary", "nonvoluntary",
218 t->nvcsw, t->nivcsw); 224 (unsigned long long)t->nvcsw, (unsigned long long)t->nivcsw);
219} 225}
220 226
221void print_cgroupstats(struct cgroupstats *c) 227void print_cgroupstats(struct cgroupstats *c)
222{ 228{
223 printf("sleeping %llu, blocked %llu, running %llu, stopped %llu, " 229 printf("sleeping %llu, blocked %llu, running %llu, stopped %llu, "
224 "uninterruptible %llu\n", c->nr_sleeping, c->nr_io_wait, 230 "uninterruptible %llu\n", (unsigned long long)c->nr_sleeping,
225 c->nr_running, c->nr_stopped, c->nr_uninterruptible); 231 (unsigned long long)c->nr_io_wait,
232 (unsigned long long)c->nr_running,
233 (unsigned long long)c->nr_stopped,
234 (unsigned long long)c->nr_uninterruptible);
226} 235}
227 236
228 237
diff --git a/Documentation/arm/IXP4xx b/Documentation/arm/IXP4xx
index 43edb4ecf27d..72fbcc4fcab0 100644
--- a/Documentation/arm/IXP4xx
+++ b/Documentation/arm/IXP4xx
@@ -32,7 +32,7 @@ Linux currently supports the following features on the IXP4xx chips:
32- Flash access (MTD/JFFS) 32- Flash access (MTD/JFFS)
33- I2C through GPIO on IXP42x 33- I2C through GPIO on IXP42x
34- GPIO for input/output/interrupts 34- GPIO for input/output/interrupts
35 See include/asm-arm/arch-ixp4xx/platform.h for access functions. 35 See arch/arm/mach-ixp4xx/include/mach/platform.h for access functions.
36- Timers (watchdog, OS) 36- Timers (watchdog, OS)
37 37
38The following components of the chips are not supported by Linux and 38The following components of the chips are not supported by Linux and
diff --git a/Documentation/arm/Interrupts b/Documentation/arm/Interrupts
index c202ed35d7d6..f09ab1b90ef1 100644
--- a/Documentation/arm/Interrupts
+++ b/Documentation/arm/Interrupts
@@ -158,7 +158,7 @@ So, what's changed?
158 be re-checked for pending events. (see the Neponset IRQ handler for 158 be re-checked for pending events. (see the Neponset IRQ handler for
159 details). 159 details).
160 160
1617. fixup_irq() is gone, as is include/asm-arm/arch-*/irq.h 1617. fixup_irq() is gone, as is arch/arm/mach-*/include/mach/irq.h
162 162
163Please note that this will not solve all problems - some of them are 163Please note that this will not solve all problems - some of them are
164hardware based. Mixing level-based and edge-based IRQs on the same 164hardware based. Mixing level-based and edge-based IRQs on the same
diff --git a/Documentation/arm/README b/Documentation/arm/README
index 9b9c8226fdc4..d98783fbe0c7 100644
--- a/Documentation/arm/README
+++ b/Documentation/arm/README
@@ -79,7 +79,7 @@ Machine/Platform support
79 To this end, we now have arch/arm/mach-$(MACHINE) directories which are 79 To this end, we now have arch/arm/mach-$(MACHINE) directories which are
80 designed to house the non-driver files for a particular machine (eg, PCI, 80 designed to house the non-driver files for a particular machine (eg, PCI,
81 memory management, architecture definitions etc). For all future 81 memory management, architecture definitions etc). For all future
82 machines, there should be a corresponding include/asm-arm/arch-$(MACHINE) 82 machines, there should be a corresponding arch/arm/mach-$(MACHINE)/include/mach
83 directory. 83 directory.
84 84
85 85
@@ -176,7 +176,7 @@ Kernel entry (head.S)
176 class typically based around one or more system on a chip devices, and 176 class typically based around one or more system on a chip devices, and
177 acts as a natural container around the actual implementations. These 177 acts as a natural container around the actual implementations. These
178 classes are given directories - arch/arm/mach-<class> and 178 classes are given directories - arch/arm/mach-<class> and
179 include/asm-arm/arch-<class> - which contain the source files to 179 arch/arm/mach-<class> - which contain the source files to/include/mach
180 support the machine class. This directories also contain any machine 180 support the machine class. This directories also contain any machine
181 specific supporting code. 181 specific supporting code.
182 182
diff --git a/Documentation/arm/Samsung-S3C24XX/GPIO.txt b/Documentation/arm/Samsung-S3C24XX/GPIO.txt
index 8caea8c237ee..b5d20c0b2ab4 100644
--- a/Documentation/arm/Samsung-S3C24XX/GPIO.txt
+++ b/Documentation/arm/Samsung-S3C24XX/GPIO.txt
@@ -16,13 +16,13 @@ Introduction
16Headers 16Headers
17------- 17-------
18 18
19 See include/asm-arm/arch-s3c2410/regs-gpio.h for the list 19 See arch/arm/mach-s3c2410/include/mach/regs-gpio.h for the list
20 of GPIO pins, and the configuration values for them. This 20 of GPIO pins, and the configuration values for them. This
21 is included by using #include <asm/arch/regs-gpio.h> 21 is included by using #include <mach/regs-gpio.h>
22 22
23 The GPIO management functions are defined in the hardware 23 The GPIO management functions are defined in the hardware
24 header include/asm-arm/arch-s3c2410/hardware.h which can be 24 header arch/arm/mach-s3c2410/include/mach/hardware.h which can be
25 included by #include <asm/arch/hardware.h> 25 included by #include <mach/hardware.h>
26 26
27 A useful amount of documentation can be found in the hardware 27 A useful amount of documentation can be found in the hardware
28 header on how the GPIO functions (and others) work. 28 header on how the GPIO functions (and others) work.
diff --git a/Documentation/arm/Samsung-S3C24XX/Overview.txt b/Documentation/arm/Samsung-S3C24XX/Overview.txt
index d04e1e30c47f..014a8ec4877d 100644
--- a/Documentation/arm/Samsung-S3C24XX/Overview.txt
+++ b/Documentation/arm/Samsung-S3C24XX/Overview.txt
@@ -36,7 +36,7 @@ Layout
36 in arch/arm/mach-s3c2410 and S3C2440 in arch/arm/mach-s3c2440 36 in arch/arm/mach-s3c2410 and S3C2440 in arch/arm/mach-s3c2440
37 37
38 Register, kernel and platform data definitions are held in the 38 Register, kernel and platform data definitions are held in the
39 include/asm-arm/arch-s3c2410 directory. 39 arch/arm/mach-s3c2410 directory./include/mach
40 40
41 41
42Machines 42Machines
diff --git a/Documentation/arm/Samsung-S3C24XX/USB-Host.txt b/Documentation/arm/Samsung-S3C24XX/USB-Host.txt
index b93b68e2b143..67671eba4231 100644
--- a/Documentation/arm/Samsung-S3C24XX/USB-Host.txt
+++ b/Documentation/arm/Samsung-S3C24XX/USB-Host.txt
@@ -49,7 +49,7 @@ Board Support
49Platform Data 49Platform Data
50------------- 50-------------
51 51
52 See linux/include/asm-arm/arch-s3c2410/usb-control.h for the 52 See arch/arm/mach-s3c2410/include/mach/usb-control.h for the
53 descriptions of the platform device data. An implementation 53 descriptions of the platform device data. An implementation
54 can be found in linux/arch/arm/mach-s3c2410/usb-simtec.c . 54 can be found in linux/arch/arm/mach-s3c2410/usb-simtec.c .
55 55
diff --git a/Documentation/auxdisplay/Makefile b/Documentation/auxdisplay/Makefile
new file mode 100644
index 000000000000..51fe23332c81
--- /dev/null
+++ b/Documentation/auxdisplay/Makefile
@@ -0,0 +1,10 @@
1# kbuild trick to avoid linker error. Can be omitted if a module is built.
2obj- := dummy.o
3
4# List of programs to build
5hostprogs-y := cfag12864b-example
6
7# Tell kbuild to always build the programs
8always := $(hostprogs-y)
9
10HOSTCFLAGS_cfag12864b-example.o += -I$(objtree)/usr/include
diff --git a/Documentation/connector/Makefile b/Documentation/connector/Makefile
new file mode 100644
index 000000000000..8df1a7285a06
--- /dev/null
+++ b/Documentation/connector/Makefile
@@ -0,0 +1,11 @@
1ifneq ($(CONFIG_CONNECTOR),)
2obj-m += cn_test.o
3endif
4
5# List of programs to build
6hostprogs-y := ucon
7
8# Tell kbuild to always build the programs
9always := $(hostprogs-y)
10
11HOSTCFLAGS_ucon.o += -I$(objtree)/usr/include
diff --git a/Documentation/cpu-hotplug.txt b/Documentation/cpu-hotplug.txt
index ba0aacde94fb..94bbc27ddd4f 100644
--- a/Documentation/cpu-hotplug.txt
+++ b/Documentation/cpu-hotplug.txt
@@ -59,15 +59,10 @@ apicid values in those tables for disabled apics. In the event BIOS doesn't
59mark such hot-pluggable cpus as disabled entries, one could use this 59mark such hot-pluggable cpus as disabled entries, one could use this
60parameter "additional_cpus=x" to represent those cpus in the cpu_possible_map. 60parameter "additional_cpus=x" to represent those cpus in the cpu_possible_map.
61 61
62s390 uses the number of cpus it detects at IPL time to also the number of bits
63in cpu_possible_map. If it is desired to add additional cpus at a later time
64the number should be specified using this option or the possible_cpus option.
65
66possible_cpus=n [s390 only] use this to set hotpluggable cpus. 62possible_cpus=n [s390 only] use this to set hotpluggable cpus.
67 This option sets possible_cpus bits in 63 This option sets possible_cpus bits in
68 cpu_possible_map. Thus keeping the numbers of bits set 64 cpu_possible_map. Thus keeping the numbers of bits set
69 constant even if the machine gets rebooted. 65 constant even if the machine gets rebooted.
70 This option overrides additional_cpus.
71 66
72CPU maps and such 67CPU maps and such
73----------------- 68-----------------
diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt
index c23955404bf5..eb1a47b97427 100644
--- a/Documentation/feature-removal-schedule.txt
+++ b/Documentation/feature-removal-schedule.txt
@@ -19,15 +19,6 @@ Who: Pavel Machek <pavel@suse.cz>
19 19
20--------------------------- 20---------------------------
21 21
22What: old NCR53C9x driver
23When: October 2007
24Why: Replaced by the much better esp_scsi driver. Actual low-level
25 driver can be ported over almost trivially.
26Who: David Miller <davem@davemloft.net>
27 Christoph Hellwig <hch@lst.de>
28
29---------------------------
30
31What: Video4Linux API 1 ioctls and video_decoder.h from Video devices. 22What: Video4Linux API 1 ioctls and video_decoder.h from Video devices.
32When: December 2008 23When: December 2008
33Files: include/linux/video_decoder.h include/linux/videodev.h 24Files: include/linux/video_decoder.h include/linux/videodev.h
@@ -205,19 +196,6 @@ Who: Tejun Heo <htejun@gmail.com>
205 196
206--------------------------- 197---------------------------
207 198
208What: The arch/ppc and include/asm-ppc directories
209When: Jun 2008
210Why: The arch/powerpc tree is the merged architecture for ppc32 and ppc64
211 platforms. Currently there are efforts underway to port the remaining
212 arch/ppc platforms to the merged tree. New submissions to the arch/ppc
213 tree have been frozen with the 2.6.22 kernel release and that tree will
214 remain in bug-fix only mode until its scheduled removal. Platforms
215 that are not ported by June 2008 will be removed due to the lack of an
216 interested maintainer.
217Who: linuxppc-dev@ozlabs.org
218
219---------------------------
220
221What: i386/x86_64 bzImage symlinks 199What: i386/x86_64 bzImage symlinks
222When: April 2010 200When: April 2010
223 201
diff --git a/Documentation/filesystems/configfs/Makefile b/Documentation/filesystems/configfs/Makefile
new file mode 100644
index 000000000000..be7ec5e67dbc
--- /dev/null
+++ b/Documentation/filesystems/configfs/Makefile
@@ -0,0 +1,3 @@
1ifneq ($(CONFIG_CONFIGFS_FS),)
2obj-m += configfs_example_explicit.o configfs_example_macros.o
3endif
diff --git a/Documentation/filesystems/quota.txt b/Documentation/filesystems/quota.txt
index a590c4093eff..5e8de25bf0f1 100644
--- a/Documentation/filesystems/quota.txt
+++ b/Documentation/filesystems/quota.txt
@@ -3,14 +3,14 @@ Quota subsystem
3=============== 3===============
4 4
5Quota subsystem allows system administrator to set limits on used space and 5Quota subsystem allows system administrator to set limits on used space and
6number of used inodes (inode is a filesystem structure which is associated 6number of used inodes (inode is a filesystem structure which is associated with
7with each file or directory) for users and/or groups. For both used space and 7each file or directory) for users and/or groups. For both used space and number
8number of used inodes there are actually two limits. The first one is called 8of used inodes there are actually two limits. The first one is called softlimit
9softlimit and the second one hardlimit. An user can never exceed a hardlimit 9and the second one hardlimit. An user can never exceed a hardlimit for any
10for any resource. User is allowed to exceed softlimit but only for limited 10resource (unless he has CAP_SYS_RESOURCE capability). User is allowed to exceed
11period of time. This period is called "grace period" or "grace time". When 11softlimit but only for limited period of time. This period is called "grace
12grace time is over, user is not able to allocate more space/inodes until he 12period" or "grace time". When grace time is over, user is not able to allocate
13frees enough of them to get below softlimit. 13more space/inodes until he frees enough of them to get below softlimit.
14 14
15Quota limits (and amount of grace time) are set independently for each 15Quota limits (and amount of grace time) are set independently for each
16filesystem. 16filesystem.
@@ -53,6 +53,12 @@ in parentheses):
53 QUOTA_NL_BSOFTLONGWARN - space (block) softlimit is exceeded 53 QUOTA_NL_BSOFTLONGWARN - space (block) softlimit is exceeded
54 longer than given grace period. 54 longer than given grace period.
55 QUOTA_NL_BSOFTWARN - space (block) softlimit 55 QUOTA_NL_BSOFTWARN - space (block) softlimit
56 - four warnings are also defined for the event when user stops
57 exceeding some limit:
58 QUOTA_NL_IHARDBELOW - inode hardlimit
59 QUOTA_NL_ISOFTBELOW - inode softlimit
60 QUOTA_NL_BHARDBELOW - space (block) hardlimit
61 QUOTA_NL_BSOFTBELOW - space (block) softlimit
56 QUOTA_NL_A_DEV_MAJOR (u32) 62 QUOTA_NL_A_DEV_MAJOR (u32)
57 - major number of a device with the affected filesystem 63 - major number of a device with the affected filesystem
58 QUOTA_NL_A_DEV_MINOR (u32) 64 QUOTA_NL_A_DEV_MINOR (u32)
diff --git a/Documentation/ia64/Makefile b/Documentation/ia64/Makefile
new file mode 100644
index 000000000000..b75db69ec483
--- /dev/null
+++ b/Documentation/ia64/Makefile
@@ -0,0 +1,8 @@
1# kbuild trick to avoid linker error. Can be omitted if a module is built.
2obj- := dummy.o
3
4# List of programs to build
5hostprogs-y := aliasing-test
6
7# Tell kbuild to always build the programs
8always := $(hostprogs-y)
diff --git a/Documentation/lguest/lguest.c b/Documentation/lguest/lguest.c
index b88b0ea54e90..655414821edc 100644
--- a/Documentation/lguest/lguest.c
+++ b/Documentation/lguest/lguest.c
@@ -1447,21 +1447,6 @@ static void configure_device(int fd, const char *tapif, u32 ipaddr)
1447 err(1, "Bringing interface %s up", tapif); 1447 err(1, "Bringing interface %s up", tapif);
1448} 1448}
1449 1449
1450static void get_mac(int fd, const char *tapif, unsigned char hwaddr[6])
1451{
1452 struct ifreq ifr;
1453
1454 memset(&ifr, 0, sizeof(ifr));
1455 strcpy(ifr.ifr_name, tapif);
1456
1457 /* SIOC stands for Socket I/O Control. G means Get (vs S for Set
1458 * above). IF means Interface, and HWADDR is hardware address.
1459 * Simple! */
1460 if (ioctl(fd, SIOCGIFHWADDR, &ifr) != 0)
1461 err(1, "getting hw address for %s", tapif);
1462 memcpy(hwaddr, ifr.ifr_hwaddr.sa_data, 6);
1463}
1464
1465static int get_tun_device(char tapif[IFNAMSIZ]) 1450static int get_tun_device(char tapif[IFNAMSIZ])
1466{ 1451{
1467 struct ifreq ifr; 1452 struct ifreq ifr;
@@ -1531,11 +1516,8 @@ static void setup_tun_net(char *arg)
1531 p = strchr(arg, ':'); 1516 p = strchr(arg, ':');
1532 if (p) { 1517 if (p) {
1533 str2mac(p+1, conf.mac); 1518 str2mac(p+1, conf.mac);
1519 add_feature(dev, VIRTIO_NET_F_MAC);
1534 *p = '\0'; 1520 *p = '\0';
1535 } else {
1536 p = arg + strlen(arg);
1537 /* None supplied; query the randomly assigned mac. */
1538 get_mac(ipfd, tapif, conf.mac);
1539 } 1521 }
1540 1522
1541 /* arg is now either an IP address or a bridge name */ 1523 /* arg is now either an IP address or a bridge name */
@@ -1547,13 +1529,10 @@ static void setup_tun_net(char *arg)
1547 /* Set up the tun device. */ 1529 /* Set up the tun device. */
1548 configure_device(ipfd, tapif, ip); 1530 configure_device(ipfd, tapif, ip);
1549 1531
1550 /* Tell Guest what MAC address to use. */
1551 add_feature(dev, VIRTIO_NET_F_MAC);
1552 add_feature(dev, VIRTIO_F_NOTIFY_ON_EMPTY); 1532 add_feature(dev, VIRTIO_F_NOTIFY_ON_EMPTY);
1553 /* Expect Guest to handle everything except UFO */ 1533 /* Expect Guest to handle everything except UFO */
1554 add_feature(dev, VIRTIO_NET_F_CSUM); 1534 add_feature(dev, VIRTIO_NET_F_CSUM);
1555 add_feature(dev, VIRTIO_NET_F_GUEST_CSUM); 1535 add_feature(dev, VIRTIO_NET_F_GUEST_CSUM);
1556 add_feature(dev, VIRTIO_NET_F_MAC);
1557 add_feature(dev, VIRTIO_NET_F_GUEST_TSO4); 1536 add_feature(dev, VIRTIO_NET_F_GUEST_TSO4);
1558 add_feature(dev, VIRTIO_NET_F_GUEST_TSO6); 1537 add_feature(dev, VIRTIO_NET_F_GUEST_TSO6);
1559 add_feature(dev, VIRTIO_NET_F_GUEST_ECN); 1538 add_feature(dev, VIRTIO_NET_F_GUEST_ECN);
diff --git a/Documentation/networking/Makefile b/Documentation/networking/Makefile
new file mode 100644
index 000000000000..6d8af1ac56c4
--- /dev/null
+++ b/Documentation/networking/Makefile
@@ -0,0 +1,8 @@
1# kbuild trick to avoid linker error. Can be omitted if a module is built.
2obj- := dummy.o
3
4# List of programs to build
5hostprogs-y := ifenslave
6
7# Tell kbuild to always build the programs
8always := $(hostprogs-y)
diff --git a/Documentation/networking/ifenslave.c b/Documentation/networking/ifenslave.c
index a12059886755..1b96ccda3836 100644
--- a/Documentation/networking/ifenslave.c
+++ b/Documentation/networking/ifenslave.c
@@ -1081,7 +1081,7 @@ static int set_if_addr(char *master_ifname, char *slave_ifname)
1081 1081
1082 } 1082 }
1083 1083
1084 ipaddr = ifr.ifr_addr.sa_data; 1084 ipaddr = (unsigned char *)ifr.ifr_addr.sa_data;
1085 v_print("Interface '%s': set IP %s to %d.%d.%d.%d\n", 1085 v_print("Interface '%s': set IP %s to %d.%d.%d.%d\n",
1086 slave_ifname, ifra[i].desc, 1086 slave_ifname, ifra[i].desc,
1087 ipaddr[0], ipaddr[1], ipaddr[2], ipaddr[3]); 1087 ipaddr[0], ipaddr[1], ipaddr[2], ipaddr[3]);
diff --git a/Documentation/pcmcia/Makefile b/Documentation/pcmcia/Makefile
new file mode 100644
index 000000000000..accde871ae77
--- /dev/null
+++ b/Documentation/pcmcia/Makefile
@@ -0,0 +1,10 @@
1# kbuild trick to avoid linker error. Can be omitted if a module is built.
2obj- := dummy.o
3
4# List of programs to build
5hostprogs-y := crc32hash
6
7# Tell kbuild to always build the programs
8always := $(hostprogs-y)
9
10HOSTCFLAGS_crc32hash.o += -I$(objtree)/usr/include
diff --git a/Documentation/pcmcia/crc32hash.c b/Documentation/pcmcia/crc32hash.c
index cbc36d299af8..4210e5abab8a 100644
--- a/Documentation/pcmcia/crc32hash.c
+++ b/Documentation/pcmcia/crc32hash.c
@@ -26,7 +26,7 @@ int main(int argc, char **argv) {
26 printf("no string passed as argument\n"); 26 printf("no string passed as argument\n");
27 return -1; 27 return -1;
28 } 28 }
29 result = crc32(argv[1], strlen(argv[1])); 29 result = crc32((unsigned char const *)argv[1], strlen(argv[1]));
30 printf("0x%x\n", result); 30 printf("0x%x\n", result);
31 return 0; 31 return 0;
32} 32}
diff --git a/Documentation/spi/Makefile b/Documentation/spi/Makefile
new file mode 100644
index 000000000000..a5b03c88beae
--- /dev/null
+++ b/Documentation/spi/Makefile
@@ -0,0 +1,11 @@
1# kbuild trick to avoid linker error. Can be omitted if a module is built.
2obj- := dummy.o
3
4# List of programs to build
5hostprogs-y := spidev_test spidev_fdx
6
7# Tell kbuild to always build the programs
8always := $(hostprogs-y)
9
10HOSTCFLAGS_spidev_test.o += -I$(objtree)/usr/include
11HOSTCFLAGS_spidev_fdx.o += -I$(objtree)/usr/include
diff --git a/Documentation/spi/pxa2xx b/Documentation/spi/pxa2xx
index f3853cc37bde..bbe8dee681a5 100644
--- a/Documentation/spi/pxa2xx
+++ b/Documentation/spi/pxa2xx
@@ -19,7 +19,7 @@ Declaring PXA2xx Master Controllers
19----------------------------------- 19-----------------------------------
20Typically a SPI master is defined in the arch/.../mach-*/board-*.c as a 20Typically a SPI master is defined in the arch/.../mach-*/board-*.c as a
21"platform device". The master configuration is passed to the driver via a table 21"platform device". The master configuration is passed to the driver via a table
22found in include/asm-arm/arch-pxa/pxa2xx_spi.h: 22found in arch/arm/mach-pxa/include/mach/pxa2xx_spi.h:
23 23
24struct pxa2xx_spi_master { 24struct pxa2xx_spi_master {
25 enum pxa_ssp_type ssp_type; 25 enum pxa_ssp_type ssp_type;
@@ -94,7 +94,7 @@ using the "spi_board_info" structure found in "linux/spi/spi.h". See
94 94
95Each slave device attached to the PXA must provide slave specific configuration 95Each slave device attached to the PXA must provide slave specific configuration
96information via the structure "pxa2xx_spi_chip" found in 96information via the structure "pxa2xx_spi_chip" found in
97"include/asm-arm/arch-pxa/pxa2xx_spi.h". The pxa2xx_spi master controller driver 97"arch/arm/mach-pxa/include/mach/pxa2xx_spi.h". The pxa2xx_spi master controller driver
98will uses the configuration whenever the driver communicates with the slave 98will uses the configuration whenever the driver communicates with the slave
99device. 99device.
100 100
diff --git a/Documentation/spi/spi-summary b/Documentation/spi/spi-summary
index 6d5f18143c50..8bae2f018d34 100644
--- a/Documentation/spi/spi-summary
+++ b/Documentation/spi/spi-summary
@@ -210,7 +210,7 @@ board should normally be set up and registered.
210 210
211So for example arch/.../mach-*/board-*.c files might have code like: 211So for example arch/.../mach-*/board-*.c files might have code like:
212 212
213 #include <asm/arch/spi.h> /* for mysoc_spi_data */ 213 #include <mach/spi.h> /* for mysoc_spi_data */
214 214
215 /* if your mach-* infrastructure doesn't support kernels that can 215 /* if your mach-* infrastructure doesn't support kernels that can
216 * run on multiple boards, pdata wouldn't benefit from "__init". 216 * run on multiple boards, pdata wouldn't benefit from "__init".
@@ -227,7 +227,7 @@ So for example arch/.../mach-*/board-*.c files might have code like:
227 227
228And SOC-specific utility code might look something like: 228And SOC-specific utility code might look something like:
229 229
230 #include <asm/arch/spi.h> 230 #include <mach/spi.h>
231 231
232 static struct platform_device spi2 = { ... }; 232 static struct platform_device spi2 = { ... };
233 233
diff --git a/Documentation/video4linux/Makefile b/Documentation/video4linux/Makefile
new file mode 100644
index 000000000000..1ed0e98d057d
--- /dev/null
+++ b/Documentation/video4linux/Makefile
@@ -0,0 +1,8 @@
1# kbuild trick to avoid linker error. Can be omitted if a module is built.
2obj- := dummy.o
3
4# List of programs to build
5hostprogs-y := v4lgrab
6
7# Tell kbuild to always build the programs
8always := $(hostprogs-y)
diff --git a/Documentation/vm/Makefile b/Documentation/vm/Makefile
new file mode 100644
index 000000000000..6f562f778b28
--- /dev/null
+++ b/Documentation/vm/Makefile
@@ -0,0 +1,8 @@
1# kbuild trick to avoid linker error. Can be omitted if a module is built.
2obj- := dummy.o
3
4# List of programs to build
5hostprogs-y := slabinfo
6
7# Tell kbuild to always build the programs
8always := $(hostprogs-y)
diff --git a/Documentation/watchdog/src/Makefile b/Documentation/watchdog/src/Makefile
new file mode 100644
index 000000000000..40e5f46e4740
--- /dev/null
+++ b/Documentation/watchdog/src/Makefile
@@ -0,0 +1,8 @@
1# kbuild trick to avoid linker error. Can be omitted if a module is built.
2obj- := dummy.o
3
4# List of programs to build
5hostprogs-y := watchdog-simple watchdog-test
6
7# Tell kbuild to always build the programs
8always := $(hostprogs-y)
diff --git a/MAINTAINERS b/MAINTAINERS
index c67a402a6857..b343814a1ace 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -594,6 +594,11 @@ M: kernel@wantstofly.org
594L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only) 594L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only)
595S: Maintained 595S: Maintained
596 596
597ARM/MAGICIAN MACHINE SUPPORT
598P: Philipp Zabel
599M: philipp.zabel@gmail.com
600S: Maintained
601
597ARM/TOSA MACHINE SUPPORT 602ARM/TOSA MACHINE SUPPORT
598P: Dmitry Baryshkov 603P: Dmitry Baryshkov
599M: dbaryshkov@gmail.com 604M: dbaryshkov@gmail.com
@@ -1244,7 +1249,7 @@ S: Maintained
1244CPU FREQUENCY DRIVERS 1249CPU FREQUENCY DRIVERS
1245P: Dave Jones 1250P: Dave Jones
1246M: davej@codemonkey.org.uk 1251M: davej@codemonkey.org.uk
1247L: cpufreq@lists.linux.org.uk 1252L: cpufreq@vger.kernel.org
1248W: http://www.codemonkey.org.uk/projects/cpufreq/ 1253W: http://www.codemonkey.org.uk/projects/cpufreq/
1249T: git kernel.org/pub/scm/linux/kernel/git/davej/cpufreq.git 1254T: git kernel.org/pub/scm/linux/kernel/git/davej/cpufreq.git
1250S: Maintained 1255S: Maintained
@@ -4678,12 +4683,6 @@ L: linux-wireless@vger.kernel.org
4678L: zd1211-devs@lists.sourceforge.net (subscribers-only) 4683L: zd1211-devs@lists.sourceforge.net (subscribers-only)
4679S: Maintained 4684S: Maintained
4680 4685
4681ZF MACHZ WATCHDOG
4682P: Fernando Fuganti
4683M: fuganti@netbank.com.br
4684W: http://cvs.conectiva.com.br/drivers/ZFL-watchdog/
4685S: Maintained
4686
4687ZR36067 VIDEO FOR LINUX DRIVER 4686ZR36067 VIDEO FOR LINUX DRIVER
4688P: Ronald Bultje 4687P: Ronald Bultje
4689M: rbultje@ronald.bitfreak.net 4688M: rbultje@ronald.bitfreak.net
diff --git a/Makefile b/Makefile
index f3e206509ee1..fd3ca6e8188a 100644
--- a/Makefile
+++ b/Makefile
@@ -822,6 +822,9 @@ endif
822ifdef CONFIG_SAMPLES 822ifdef CONFIG_SAMPLES
823 $(Q)$(MAKE) $(build)=samples 823 $(Q)$(MAKE) $(build)=samples
824endif 824endif
825ifdef CONFIG_BUILD_DOCSRC
826 $(Q)$(MAKE) $(build)=Documentation
827endif
825 $(call vmlinux-modpost) 828 $(call vmlinux-modpost)
826 $(call if_changed_rule,vmlinux__) 829 $(call if_changed_rule,vmlinux__)
827 $(Q)rm -f .old_version 830 $(Q)rm -f .old_version
@@ -1166,7 +1169,7 @@ MRPROPER_FILES += .config .config.old include/asm .version .old_version \
1166# 1169#
1167clean: rm-dirs := $(CLEAN_DIRS) 1170clean: rm-dirs := $(CLEAN_DIRS)
1168clean: rm-files := $(CLEAN_FILES) 1171clean: rm-files := $(CLEAN_FILES)
1169clean-dirs := $(addprefix _clean_,$(srctree) $(vmlinux-alldirs)) 1172clean-dirs := $(addprefix _clean_,$(srctree) $(vmlinux-alldirs) Documentation)
1170 1173
1171PHONY += $(clean-dirs) clean archclean 1174PHONY += $(clean-dirs) clean archclean
1172$(clean-dirs): 1175$(clean-dirs):
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index 2f0747744236..703a44fa0f9b 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -97,9 +97,7 @@ textofs-y := 0x00008000
97 machine-$(CONFIG_ARCH_RPC) := rpc 97 machine-$(CONFIG_ARCH_RPC) := rpc
98 machine-$(CONFIG_ARCH_EBSA110) := ebsa110 98 machine-$(CONFIG_ARCH_EBSA110) := ebsa110
99 machine-$(CONFIG_ARCH_CLPS7500) := clps7500 99 machine-$(CONFIG_ARCH_CLPS7500) := clps7500
100 incdir-$(CONFIG_ARCH_CLPS7500) := cl7500
101 machine-$(CONFIG_FOOTBRIDGE) := footbridge 100 machine-$(CONFIG_FOOTBRIDGE) := footbridge
102 incdir-$(CONFIG_FOOTBRIDGE) := ebsa285
103 machine-$(CONFIG_ARCH_SHARK) := shark 101 machine-$(CONFIG_ARCH_SHARK) := shark
104 machine-$(CONFIG_ARCH_SA1100) := sa1100 102 machine-$(CONFIG_ARCH_SA1100) := sa1100
105ifeq ($(CONFIG_ARCH_SA1100),y) 103ifeq ($(CONFIG_ARCH_SA1100),y)
@@ -114,13 +112,15 @@ endif
114 machine-$(CONFIG_ARCH_IOP32X) := iop32x 112 machine-$(CONFIG_ARCH_IOP32X) := iop32x
115 machine-$(CONFIG_ARCH_IOP33X) := iop33x 113 machine-$(CONFIG_ARCH_IOP33X) := iop33x
116 machine-$(CONFIG_ARCH_IOP13XX) := iop13xx 114 machine-$(CONFIG_ARCH_IOP13XX) := iop13xx
115 plat-$(CONFIG_PLAT_IOP) := iop
117 machine-$(CONFIG_ARCH_IXP4XX) := ixp4xx 116 machine-$(CONFIG_ARCH_IXP4XX) := ixp4xx
118 machine-$(CONFIG_ARCH_IXP2000) := ixp2000 117 machine-$(CONFIG_ARCH_IXP2000) := ixp2000
119 machine-$(CONFIG_ARCH_IXP23XX) := ixp23xx 118 machine-$(CONFIG_ARCH_IXP23XX) := ixp23xx
120 machine-$(CONFIG_ARCH_OMAP1) := omap1 119 machine-$(CONFIG_ARCH_OMAP1) := omap1
121 machine-$(CONFIG_ARCH_OMAP2) := omap2 120 machine-$(CONFIG_ARCH_OMAP2) := omap2
122 incdir-$(CONFIG_ARCH_OMAP) := omap 121 plat-$(CONFIG_ARCH_OMAP) := omap
123 machine-$(CONFIG_ARCH_S3C2410) := s3c2410 122 machine-$(CONFIG_ARCH_S3C2410) := s3c2410 s3c2400 s3c2412 s3c2440 s3c2442 s3c2443
123 plat-$(CONFIG_PLAT_S3C24XX) := s3c24xx
124 machine-$(CONFIG_ARCH_LH7A40X) := lh7a40x 124 machine-$(CONFIG_ARCH_LH7A40X) := lh7a40x
125 machine-$(CONFIG_ARCH_VERSATILE) := versatile 125 machine-$(CONFIG_ARCH_VERSATILE) := versatile
126 machine-$(CONFIG_ARCH_IMX) := imx 126 machine-$(CONFIG_ARCH_IMX) := imx
@@ -135,10 +135,11 @@ endif
135 machine-$(CONFIG_ARCH_DAVINCI) := davinci 135 machine-$(CONFIG_ARCH_DAVINCI) := davinci
136 machine-$(CONFIG_ARCH_KIRKWOOD) := kirkwood 136 machine-$(CONFIG_ARCH_KIRKWOOD) := kirkwood
137 machine-$(CONFIG_ARCH_KS8695) := ks8695 137 machine-$(CONFIG_ARCH_KS8695) := ks8695
138 incdir-$(CONFIG_ARCH_MXC) := mxc 138 plat-$(CONFIG_ARCH_MXC) := mxc
139 machine-$(CONFIG_ARCH_MX2) := mx2 139 machine-$(CONFIG_ARCH_MX2) := mx2
140 machine-$(CONFIG_ARCH_MX3) := mx3 140 machine-$(CONFIG_ARCH_MX3) := mx3
141 machine-$(CONFIG_ARCH_ORION5X) := orion5x 141 machine-$(CONFIG_ARCH_ORION5X) := orion5x
142 plat-$(CONFIG_PLAT_ORION) := orion
142 machine-$(CONFIG_ARCH_MSM7X00A) := msm 143 machine-$(CONFIG_ARCH_MSM7X00A) := msm
143 machine-$(CONFIG_ARCH_LOKI) := loki 144 machine-$(CONFIG_ARCH_LOKI) := loki
144 machine-$(CONFIG_ARCH_MV78XX0) := mv78xx0 145 machine-$(CONFIG_ARCH_MV78XX0) := mv78xx0
@@ -153,17 +154,22 @@ endif
153# The byte offset of the kernel image in RAM from the start of RAM. 154# The byte offset of the kernel image in RAM from the start of RAM.
154TEXT_OFFSET := $(textofs-y) 155TEXT_OFFSET := $(textofs-y)
155 156
156ifeq ($(incdir-y),) 157# The first directory contains additional information for the boot setup code
157incdir-y := $(machine-y)
158endif
159INCDIR := arch-$(incdir-y)
160
161ifneq ($(machine-y),) 158ifneq ($(machine-y),)
162MACHINE := arch/arm/mach-$(machine-y)/ 159MACHINE := arch/arm/mach-$(word 1,$(machine-y))/
163else 160else
164MACHINE := 161MACHINE :=
165endif 162endif
166 163
164machdirs := $(patsubst %,arch/arm/mach-%/,$(machine-y))
165platdirs := $(patsubst %,arch/arm/plat-%/,$(plat-y))
166
167ifeq ($(KBUILD_SRC),)
168KBUILD_CPPFLAGS += $(patsubst %,-I%include,$(machdirs) $(platdirs))
169else
170KBUILD_CPPFLAGS += $(patsubst %,-I$(srctree)/%include,$(machdirs) $(platdirs))
171endif
172
167export TEXT_OFFSET GZFLAGS MMUEXT 173export TEXT_OFFSET GZFLAGS MMUEXT
168 174
169# Do we have FASTFPE? 175# Do we have FASTFPE?
@@ -174,23 +180,11 @@ endif
174 180
175# If we have a machine-specific directory, then include it in the build. 181# If we have a machine-specific directory, then include it in the build.
176core-y += arch/arm/kernel/ arch/arm/mm/ arch/arm/common/ 182core-y += arch/arm/kernel/ arch/arm/mm/ arch/arm/common/
177core-y += $(MACHINE) 183core-y += $(machdirs) $(platdirs)
178core-$(CONFIG_ARCH_S3C2410) += arch/arm/mach-s3c2400/
179core-$(CONFIG_ARCH_S3C2410) += arch/arm/mach-s3c2412/
180core-$(CONFIG_ARCH_S3C2410) += arch/arm/mach-s3c2440/
181core-$(CONFIG_ARCH_S3C2410) += arch/arm/mach-s3c2442/
182core-$(CONFIG_ARCH_S3C2410) += arch/arm/mach-s3c2443/
183core-$(CONFIG_FPE_NWFPE) += arch/arm/nwfpe/ 184core-$(CONFIG_FPE_NWFPE) += arch/arm/nwfpe/
184core-$(CONFIG_FPE_FASTFPE) += $(FASTFPE_OBJ) 185core-$(CONFIG_FPE_FASTFPE) += $(FASTFPE_OBJ)
185core-$(CONFIG_VFP) += arch/arm/vfp/ 186core-$(CONFIG_VFP) += arch/arm/vfp/
186 187
187# If we have a common platform directory, then include it in the build.
188core-$(CONFIG_PLAT_IOP) += arch/arm/plat-iop/
189core-$(CONFIG_PLAT_ORION) += arch/arm/plat-orion/
190core-$(CONFIG_ARCH_OMAP) += arch/arm/plat-omap/
191core-$(CONFIG_PLAT_S3C24XX) += arch/arm/plat-s3c24xx/
192core-$(CONFIG_ARCH_MXC) += arch/arm/plat-mxc/
193
194drivers-$(CONFIG_OPROFILE) += arch/arm/oprofile/ 188drivers-$(CONFIG_OPROFILE) += arch/arm/oprofile/
195 189
196libs-y := arch/arm/lib/ $(libs-y) 190libs-y := arch/arm/lib/ $(libs-y)
@@ -210,20 +204,10 @@ boot := arch/arm/boot
210# them changed. We use .arch to indicate when they were updated 204# them changed. We use .arch to indicate when they were updated
211# last, otherwise make uses the target directory mtime. 205# last, otherwise make uses the target directory mtime.
212 206
213include/asm-arm/.arch: $(wildcard include/config/arch/*.h) include/config/auto.conf
214 @echo ' SYMLINK include/asm-arm/arch -> include/asm-arm/$(INCDIR)'
215ifneq ($(KBUILD_SRC),)
216 $(Q)mkdir -p include/asm-arm
217 $(Q)ln -fsn $(srctree)/include/asm-arm/$(INCDIR) include/asm-arm/arch
218else
219 $(Q)ln -fsn $(INCDIR) include/asm-arm/arch
220endif
221 @touch $@
222
223archprepare: maketools 207archprepare: maketools
224 208
225PHONY += maketools FORCE 209PHONY += maketools FORCE
226maketools: include/linux/version.h include/asm-arm/.arch FORCE 210maketools: include/linux/version.h FORCE
227 $(Q)$(MAKE) $(build)=arch/arm/tools include/asm-arm/mach-types.h 211 $(Q)$(MAKE) $(build)=arch/arm/tools include/asm-arm/mach-types.h
228 212
229# Convert bzImage to zImage 213# Convert bzImage to zImage
diff --git a/arch/arm/boot/compressed/head-xscale.S b/arch/arm/boot/compressed/head-xscale.S
index dd3fbd6766e1..aa5ee49c5c5a 100644
--- a/arch/arm/boot/compressed/head-xscale.S
+++ b/arch/arm/boot/compressed/head-xscale.S
@@ -6,7 +6,6 @@
6 */ 6 */
7 7
8#include <linux/linkage.h> 8#include <linux/linkage.h>
9#include <asm/mach-types.h>
10 9
11 .section ".start", "ax" 10 .section ".start", "ax"
12 11
diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S
index de41daeab5e9..d42f89b7760b 100644
--- a/arch/arm/boot/compressed/head.S
+++ b/arch/arm/boot/compressed/head.S
@@ -37,7 +37,7 @@
37 37
38#else 38#else
39 39
40#include <asm/arch/debug-macro.S> 40#include <mach/debug-macro.S>
41 41
42 .macro writeb, ch, rb 42 .macro writeb, ch, rb
43 senduart \ch, \rb 43 senduart \ch, \rb
diff --git a/arch/arm/boot/compressed/misc.c b/arch/arm/boot/compressed/misc.c
index 7145cc7c04f0..65ce8fff29db 100644
--- a/arch/arm/boot/compressed/misc.c
+++ b/arch/arm/boot/compressed/misc.c
@@ -27,7 +27,7 @@ unsigned int __machine_arch_type;
27static void putstr(const char *ptr); 27static void putstr(const char *ptr);
28 28
29#include <linux/compiler.h> 29#include <linux/compiler.h>
30#include <asm/arch/uncompress.h> 30#include <mach/uncompress.h>
31 31
32#ifdef CONFIG_DEBUG_ICEDCC 32#ifdef CONFIG_DEBUG_ICEDCC
33 33
diff --git a/arch/arm/common/locomo.c b/arch/arm/common/locomo.c
index 85579654d3b7..283051eaf931 100644
--- a/arch/arm/common/locomo.c
+++ b/arch/arm/common/locomo.c
@@ -25,7 +25,7 @@
25#include <linux/slab.h> 25#include <linux/slab.h>
26#include <linux/spinlock.h> 26#include <linux/spinlock.h>
27 27
28#include <asm/hardware.h> 28#include <mach/hardware.h>
29#include <asm/io.h> 29#include <asm/io.h>
30#include <asm/irq.h> 30#include <asm/irq.h>
31#include <asm/mach/irq.h> 31#include <asm/mach/irq.h>
diff --git a/arch/arm/common/sa1111.c b/arch/arm/common/sa1111.c
index f6d3fdda7067..ec8a5471bf06 100644
--- a/arch/arm/common/sa1111.c
+++ b/arch/arm/common/sa1111.c
@@ -26,7 +26,7 @@
26#include <linux/dma-mapping.h> 26#include <linux/dma-mapping.h>
27#include <linux/clk.h> 27#include <linux/clk.h>
28 28
29#include <asm/hardware.h> 29#include <mach/hardware.h>
30#include <asm/mach-types.h> 30#include <asm/mach-types.h>
31#include <asm/io.h> 31#include <asm/io.h>
32#include <asm/irq.h> 32#include <asm/irq.h>
diff --git a/arch/arm/common/sharpsl_pm.c b/arch/arm/common/sharpsl_pm.c
index 8822b684d474..db8309161408 100644
--- a/arch/arm/common/sharpsl_pm.c
+++ b/arch/arm/common/sharpsl_pm.c
@@ -26,13 +26,12 @@
26#include <linux/apm-emulation.h> 26#include <linux/apm-emulation.h>
27#include <linux/suspend.h> 27#include <linux/suspend.h>
28 28
29#include <asm/hardware.h> 29#include <mach/hardware.h>
30#include <asm/mach-types.h>
31#include <asm/irq.h> 30#include <asm/irq.h>
32#include <asm/arch/pm.h> 31#include <mach/pm.h>
33#include <asm/arch/pxa-regs.h> 32#include <mach/pxa-regs.h>
34#include <asm/arch/pxa2xx-regs.h> 33#include <mach/pxa2xx-regs.h>
35#include <asm/arch/sharpsl.h> 34#include <mach/sharpsl.h>
36#include <asm/hardware/sharpsl_pm.h> 35#include <asm/hardware/sharpsl_pm.h>
37 36
38/* 37/*
diff --git a/arch/arm/common/time-acorn.c b/arch/arm/common/time-acorn.c
index d544da414731..df0983aafe69 100644
--- a/arch/arm/common/time-acorn.c
+++ b/arch/arm/common/time-acorn.c
@@ -18,7 +18,7 @@
18#include <linux/interrupt.h> 18#include <linux/interrupt.h>
19#include <linux/irq.h> 19#include <linux/irq.h>
20 20
21#include <asm/hardware.h> 21#include <mach/hardware.h>
22#include <asm/io.h> 22#include <asm/io.h>
23#include <asm/hardware/ioc.h> 23#include <asm/hardware/ioc.h>
24 24
diff --git a/arch/arm/common/uengine.c b/arch/arm/common/uengine.c
index 117cab30bd36..7ecd3c0ab011 100644
--- a/arch/arm/common/uengine.c
+++ b/arch/arm/common/uengine.c
@@ -16,8 +16,7 @@
16#include <linux/slab.h> 16#include <linux/slab.h>
17#include <linux/module.h> 17#include <linux/module.h>
18#include <linux/string.h> 18#include <linux/string.h>
19#include <asm/hardware.h> 19#include <mach/hardware.h>
20#include <asm/arch/hardware.h>
21#include <asm/hardware/uengine.h> 20#include <asm/hardware/uengine.h>
22#include <asm/io.h> 21#include <asm/io.h>
23 22
diff --git a/arch/arm/include/asm/dma.h b/arch/arm/include/asm/dma.h
index 9f2c5305c260..75154b193117 100644
--- a/arch/arm/include/asm/dma.h
+++ b/arch/arm/include/asm/dma.h
@@ -6,7 +6,7 @@ typedef unsigned int dmach_t;
6#include <linux/spinlock.h> 6#include <linux/spinlock.h>
7#include <asm/system.h> 7#include <asm/system.h>
8#include <asm/scatterlist.h> 8#include <asm/scatterlist.h>
9#include <asm/arch/dma.h> 9#include <mach/dma.h>
10 10
11/* 11/*
12 * This is the maximum virtual address which can be DMA'd from. 12 * This is the maximum virtual address which can be DMA'd from.
diff --git a/arch/arm/include/asm/floppy.h b/arch/arm/include/asm/floppy.h
index dce20c25ab10..c9f03eccc9d8 100644
--- a/arch/arm/include/asm/floppy.h
+++ b/arch/arm/include/asm/floppy.h
@@ -12,7 +12,7 @@
12#ifndef __ASM_ARM_FLOPPY_H 12#ifndef __ASM_ARM_FLOPPY_H
13#define __ASM_ARM_FLOPPY_H 13#define __ASM_ARM_FLOPPY_H
14#if 0 14#if 0
15#include <asm/arch/floppy.h> 15#include <mach/floppy.h>
16#endif 16#endif
17 17
18#define fd_outb(val,port) \ 18#define fd_outb(val,port) \
diff --git a/arch/arm/include/asm/gpio.h b/arch/arm/include/asm/gpio.h
index fff4f800ee42..166a7a3e2840 100644
--- a/arch/arm/include/asm/gpio.h
+++ b/arch/arm/include/asm/gpio.h
@@ -2,6 +2,6 @@
2#define _ARCH_ARM_GPIO_H 2#define _ARCH_ARM_GPIO_H
3 3
4/* not all ARM platforms necessarily support this API ... */ 4/* not all ARM platforms necessarily support this API ... */
5#include <asm/arch/gpio.h> 5#include <mach/gpio.h>
6 6
7#endif /* _ARCH_ARM_GPIO_H */ 7#endif /* _ARCH_ARM_GPIO_H */
diff --git a/arch/arm/include/asm/hardware.h b/arch/arm/include/asm/hardware.h
deleted file mode 100644
index eb3b3abb7db7..000000000000
--- a/arch/arm/include/asm/hardware.h
+++ /dev/null
@@ -1,18 +0,0 @@
1/*
2 * arch/arm/include/asm/hardware.h
3 *
4 * Copyright (C) 1996 Russell King
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * Common hardware definitions
11 */
12
13#ifndef __ASM_HARDWARE_H
14#define __ASM_HARDWARE_H
15
16#include <asm/arch/hardware.h>
17
18#endif
diff --git a/arch/arm/include/asm/hardware/dec21285.h b/arch/arm/include/asm/hardware/dec21285.h
index 7068a1c1e4e4..0d7552751aaf 100644
--- a/arch/arm/include/asm/hardware/dec21285.h
+++ b/arch/arm/include/asm/hardware/dec21285.h
@@ -19,7 +19,7 @@
19#define DC21285_PCI_MEM 0x80000000 19#define DC21285_PCI_MEM 0x80000000
20 20
21#ifndef __ASSEMBLY__ 21#ifndef __ASSEMBLY__
22#include <asm/hardware.h> 22#include <mach/hardware.h>
23#define DC21285_IO(x) ((volatile unsigned long *)(ARMCSR_BASE+(x))) 23#define DC21285_IO(x) ((volatile unsigned long *)(ARMCSR_BASE+(x)))
24#else 24#else
25#define DC21285_IO(x) (x) 25#define DC21285_IO(x) (x)
diff --git a/arch/arm/include/asm/hardware/iop3xx-adma.h b/arch/arm/include/asm/hardware/iop3xx-adma.h
index af64676650a2..87bff09633aa 100644
--- a/arch/arm/include/asm/hardware/iop3xx-adma.h
+++ b/arch/arm/include/asm/hardware/iop3xx-adma.h
@@ -19,7 +19,7 @@
19#define _ADMA_H 19#define _ADMA_H
20#include <linux/types.h> 20#include <linux/types.h>
21#include <linux/io.h> 21#include <linux/io.h>
22#include <asm/hardware.h> 22#include <mach/hardware.h>
23#include <asm/hardware/iop_adma.h> 23#include <asm/hardware/iop_adma.h>
24 24
25/* Memory copy units */ 25/* Memory copy units */
diff --git a/arch/arm/include/asm/hardware/iop3xx-gpio.h b/arch/arm/include/asm/hardware/iop3xx-gpio.h
index 222e74b7c463..b69d972b1f7d 100644
--- a/arch/arm/include/asm/hardware/iop3xx-gpio.h
+++ b/arch/arm/include/asm/hardware/iop3xx-gpio.h
@@ -25,7 +25,7 @@
25#ifndef __ASM_ARM_HARDWARE_IOP3XX_GPIO_H 25#ifndef __ASM_ARM_HARDWARE_IOP3XX_GPIO_H
26#define __ASM_ARM_HARDWARE_IOP3XX_GPIO_H 26#define __ASM_ARM_HARDWARE_IOP3XX_GPIO_H
27 27
28#include <asm/hardware.h> 28#include <mach/hardware.h>
29#include <asm-generic/gpio.h> 29#include <asm-generic/gpio.h>
30 30
31#define IOP3XX_N_GPIOS 8 31#define IOP3XX_N_GPIOS 8
diff --git a/arch/arm/include/asm/hardware/sa1111.h b/arch/arm/include/asm/hardware/sa1111.h
index 6cf98d4f7dc3..5da2595759e5 100644
--- a/arch/arm/include/asm/hardware/sa1111.h
+++ b/arch/arm/include/asm/hardware/sa1111.h
@@ -12,7 +12,7 @@
12#ifndef _ASM_ARCH_SA1111 12#ifndef _ASM_ARCH_SA1111
13#define _ASM_ARCH_SA1111 13#define _ASM_ARCH_SA1111
14 14
15#include <asm/arch/bitfield.h> 15#include <mach/bitfield.h>
16 16
17/* 17/*
18 * The SA1111 is always located at virtual 0xf4000000, and is always 18 * The SA1111 is always located at virtual 0xf4000000, and is always
diff --git a/arch/arm/include/asm/hw_irq.h b/arch/arm/include/asm/hw_irq.h
index f1a08a500604..90831f6f5f5c 100644
--- a/arch/arm/include/asm/hw_irq.h
+++ b/arch/arm/include/asm/hw_irq.h
@@ -4,6 +4,24 @@
4#ifndef _ARCH_ARM_HW_IRQ_H 4#ifndef _ARCH_ARM_HW_IRQ_H
5#define _ARCH_ARM_HW_IRQ_H 5#define _ARCH_ARM_HW_IRQ_H
6 6
7#include <asm/mach/irq.h> 7static inline void ack_bad_irq(int irq)
8{
9 extern unsigned long irq_err_count;
10 irq_err_count++;
11}
12
13/*
14 * Obsolete inline function for calling irq descriptor handlers.
15 */
16static inline void desc_handle_irq(unsigned int irq, struct irq_desc *desc)
17{
18 desc->handle_irq(irq, desc);
19}
20
21void set_irq_flags(unsigned int irq, unsigned int flags);
22
23#define IRQF_VALID (1 << 0)
24#define IRQF_PROBE (1 << 1)
25#define IRQF_NOAUTOEN (1 << 2)
8 26
9#endif 27#endif
diff --git a/arch/arm/include/asm/io.h b/arch/arm/include/asm/io.h
index ffe07c0f46d8..94a95d7fafd6 100644
--- a/arch/arm/include/asm/io.h
+++ b/arch/arm/include/asm/io.h
@@ -82,7 +82,7 @@ extern void __readwrite_bug(const char *fn);
82/* 82/*
83 * Now, pick up the machine-defined IO definitions 83 * Now, pick up the machine-defined IO definitions
84 */ 84 */
85#include <asm/arch/io.h> 85#include <mach/io.h>
86 86
87/* 87/*
88 * IO port access primitives 88 * IO port access primitives
diff --git a/arch/arm/include/asm/irq.h b/arch/arm/include/asm/irq.h
index 9cb01907e43b..d6786090d02c 100644
--- a/arch/arm/include/asm/irq.h
+++ b/arch/arm/include/asm/irq.h
@@ -1,7 +1,7 @@
1#ifndef __ASM_ARM_IRQ_H 1#ifndef __ASM_ARM_IRQ_H
2#define __ASM_ARM_IRQ_H 2#define __ASM_ARM_IRQ_H
3 3
4#include <asm/arch/irqs.h> 4#include <mach/irqs.h>
5 5
6#ifndef irq_canonicalize 6#ifndef irq_canonicalize
7#define irq_canonicalize(i) (i) 7#define irq_canonicalize(i) (i)
diff --git a/arch/arm/include/asm/mach/irq.h b/arch/arm/include/asm/mach/irq.h
index c57b52ce574a..acac5302e4ea 100644
--- a/arch/arm/include/asm/mach/irq.h
+++ b/arch/arm/include/asm/mach/irq.h
@@ -22,20 +22,6 @@ extern void init_FIQ(void);
22extern int show_fiq_list(struct seq_file *, void *); 22extern int show_fiq_list(struct seq_file *, void *);
23 23
24/* 24/*
25 * Obsolete inline function for calling irq descriptor handlers.
26 */
27static inline void desc_handle_irq(unsigned int irq, struct irq_desc *desc)
28{
29 desc->handle_irq(irq, desc);
30}
31
32void set_irq_flags(unsigned int irq, unsigned int flags);
33
34#define IRQF_VALID (1 << 0)
35#define IRQF_PROBE (1 << 1)
36#define IRQF_NOAUTOEN (1 << 2)
37
38/*
39 * This is for easy migration, but should be changed in the source 25 * This is for easy migration, but should be changed in the source
40 */ 26 */
41#define do_bad_IRQ(irq,desc) \ 27#define do_bad_IRQ(irq,desc) \
@@ -45,10 +31,4 @@ do { \
45 spin_unlock(&desc->lock); \ 31 spin_unlock(&desc->lock); \
46} while(0) 32} while(0)
47 33
48extern unsigned long irq_err_count;
49static inline void ack_bad_irq(int irq)
50{
51 irq_err_count++;
52}
53
54#endif 34#endif
diff --git a/arch/arm/include/asm/mc146818rtc.h b/arch/arm/include/asm/mc146818rtc.h
index 7b81e0c42543..e1ca48a9e973 100644
--- a/arch/arm/include/asm/mc146818rtc.h
+++ b/arch/arm/include/asm/mc146818rtc.h
@@ -4,7 +4,7 @@
4#ifndef _ASM_MC146818RTC_H 4#ifndef _ASM_MC146818RTC_H
5#define _ASM_MC146818RTC_H 5#define _ASM_MC146818RTC_H
6 6
7#include <asm/arch/irqs.h> 7#include <mach/irqs.h>
8#include <asm/io.h> 8#include <asm/io.h>
9 9
10#ifndef RTC_PORT 10#ifndef RTC_PORT
diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h
index 92069221dca9..1e070a2b561a 100644
--- a/arch/arm/include/asm/memory.h
+++ b/arch/arm/include/asm/memory.h
@@ -24,7 +24,7 @@
24#endif 24#endif
25 25
26#include <linux/compiler.h> 26#include <linux/compiler.h>
27#include <asm/arch/memory.h> 27#include <mach/memory.h>
28#include <asm/sizes.h> 28#include <asm/sizes.h>
29 29
30#ifdef CONFIG_MMU 30#ifdef CONFIG_MMU
diff --git a/arch/arm/include/asm/mmzone.h b/arch/arm/include/asm/mmzone.h
index f2fbb5084901..ae63a4fd28c8 100644
--- a/arch/arm/include/asm/mmzone.h
+++ b/arch/arm/include/asm/mmzone.h
@@ -25,6 +25,6 @@ extern pg_data_t discontig_node_data[];
25 */ 25 */
26#define NODE_MEM_MAP(nid) (NODE_DATA(nid)->node_mem_map) 26#define NODE_MEM_MAP(nid) (NODE_DATA(nid)->node_mem_map)
27 27
28#include <asm/arch/memory.h> 28#include <mach/memory.h>
29 29
30#endif 30#endif
diff --git a/arch/arm/include/asm/mtd-xip.h b/arch/arm/include/asm/mtd-xip.h
index 9eb127cc7db2..4225372a26f3 100644
--- a/arch/arm/include/asm/mtd-xip.h
+++ b/arch/arm/include/asm/mtd-xip.h
@@ -17,8 +17,8 @@
17#ifndef __ARM_MTD_XIP_H__ 17#ifndef __ARM_MTD_XIP_H__
18#define __ARM_MTD_XIP_H__ 18#define __ARM_MTD_XIP_H__
19 19
20#include <asm/hardware.h> 20#include <mach/hardware.h>
21#include <asm/arch/mtd-xip.h> 21#include <mach/mtd-xip.h>
22 22
23/* fill instruction prefetch */ 23/* fill instruction prefetch */
24#define xip_iprefetch() do { asm volatile (".rep 8; nop; .endr"); } while (0) 24#define xip_iprefetch() do { asm volatile (".rep 8; nop; .endr"); } while (0)
diff --git a/arch/arm/include/asm/pci.h b/arch/arm/include/asm/pci.h
index 2d84792f2e12..721c03d53f4b 100644
--- a/arch/arm/include/asm/pci.h
+++ b/arch/arm/include/asm/pci.h
@@ -4,7 +4,7 @@
4#ifdef __KERNEL__ 4#ifdef __KERNEL__
5#include <asm-generic/pci-dma-compat.h> 5#include <asm-generic/pci-dma-compat.h>
6 6
7#include <asm/hardware.h> /* for PCIBIOS_MIN_* */ 7#include <mach/hardware.h> /* for PCIBIOS_MIN_* */
8 8
9#define pcibios_scan_all_fns(a, b) 0 9#define pcibios_scan_all_fns(a, b) 0
10 10
diff --git a/arch/arm/include/asm/pgtable.h b/arch/arm/include/asm/pgtable.h
index 8ab060a53ab0..8e21ef15bd74 100644
--- a/arch/arm/include/asm/pgtable.h
+++ b/arch/arm/include/asm/pgtable.h
@@ -20,7 +20,7 @@
20#else 20#else
21 21
22#include <asm/memory.h> 22#include <asm/memory.h>
23#include <asm/arch/vmalloc.h> 23#include <mach/vmalloc.h>
24#include <asm/pgtable-hwdef.h> 24#include <asm/pgtable-hwdef.h>
25 25
26/* 26/*
diff --git a/arch/arm/include/asm/smp.h b/arch/arm/include/asm/smp.h
index cc12a525a06a..727b5c042e52 100644
--- a/arch/arm/include/asm/smp.h
+++ b/arch/arm/include/asm/smp.h
@@ -14,7 +14,7 @@
14#include <linux/cpumask.h> 14#include <linux/cpumask.h>
15#include <linux/thread_info.h> 15#include <linux/thread_info.h>
16 16
17#include <asm/arch/smp.h> 17#include <mach/smp.h>
18 18
19#ifndef CONFIG_SMP 19#ifndef CONFIG_SMP
20# error "<asm/smp.h> included in non-SMP build" 20# error "<asm/smp.h> included in non-SMP build"
diff --git a/arch/arm/include/asm/timex.h b/arch/arm/include/asm/timex.h
index e50e2926cd6e..3be8de3adaba 100644
--- a/arch/arm/include/asm/timex.h
+++ b/arch/arm/include/asm/timex.h
@@ -12,7 +12,7 @@
12#ifndef _ASMARM_TIMEX_H 12#ifndef _ASMARM_TIMEX_H
13#define _ASMARM_TIMEX_H 13#define _ASMARM_TIMEX_H
14 14
15#include <asm/arch/timex.h> 15#include <mach/timex.h>
16 16
17typedef unsigned long cycles_t; 17typedef unsigned long cycles_t;
18 18
diff --git a/arch/arm/include/asm/vga.h b/arch/arm/include/asm/vga.h
index 1e0b913c3d71..6a3cd2a2f670 100644
--- a/arch/arm/include/asm/vga.h
+++ b/arch/arm/include/asm/vga.h
@@ -1,7 +1,7 @@
1#ifndef ASMARM_VGA_H 1#ifndef ASMARM_VGA_H
2#define ASMARM_VGA_H 2#define ASMARM_VGA_H
3 3
4#include <asm/hardware.h> 4#include <mach/hardware.h>
5#include <asm/io.h> 5#include <asm/io.h>
6 6
7#define VGA_MAP_MEM(x,s) (PCIMEM_BASE + (x)) 7#define VGA_MAP_MEM(x,s) (PCIMEM_BASE + (x))
diff --git a/arch/arm/kernel/crunch-bits.S b/arch/arm/kernel/crunch-bits.S
index a26886758c67..0ec9bb48fab9 100644
--- a/arch/arm/kernel/crunch-bits.S
+++ b/arch/arm/kernel/crunch-bits.S
@@ -16,7 +16,7 @@
16#include <asm/ptrace.h> 16#include <asm/ptrace.h>
17#include <asm/thread_info.h> 17#include <asm/thread_info.h>
18#include <asm/asm-offsets.h> 18#include <asm/asm-offsets.h>
19#include <asm/arch/ep93xx-regs.h> 19#include <mach/ep93xx-regs.h>
20 20
21/* 21/*
22 * We can't use hex constants here due to a bug in gas. 22 * We can't use hex constants here due to a bug in gas.
diff --git a/arch/arm/kernel/crunch.c b/arch/arm/kernel/crunch.c
index 627d79414c9d..3b6a1c293ee4 100644
--- a/arch/arm/kernel/crunch.c
+++ b/arch/arm/kernel/crunch.c
@@ -15,7 +15,7 @@
15#include <linux/signal.h> 15#include <linux/signal.h>
16#include <linux/sched.h> 16#include <linux/sched.h>
17#include <linux/init.h> 17#include <linux/init.h>
18#include <asm/arch/ep93xx-regs.h> 18#include <mach/ep93xx-regs.h>
19#include <asm/thread_notify.h> 19#include <asm/thread_notify.h>
20#include <asm/io.h> 20#include <asm/io.h>
21 21
diff --git a/arch/arm/kernel/debug.S b/arch/arm/kernel/debug.S
index 5617566477b4..9550ff0ddde4 100644
--- a/arch/arm/kernel/debug.S
+++ b/arch/arm/kernel/debug.S
@@ -80,7 +80,7 @@
80#endif /* CONFIG_CPU_V6 */ 80#endif /* CONFIG_CPU_V6 */
81 81
82#else 82#else
83#include <asm/arch/debug-macro.S> 83#include <mach/debug-macro.S>
84#endif /* CONFIG_DEBUG_ICEDCC */ 84#endif /* CONFIG_DEBUG_ICEDCC */
85 85
86/* 86/*
diff --git a/arch/arm/kernel/ecard.c b/arch/arm/kernel/ecard.c
index f5cfdabcb87d..7a50575a8d4d 100644
--- a/arch/arm/kernel/ecard.c
+++ b/arch/arm/kernel/ecard.c
@@ -46,7 +46,7 @@
46 46
47#include <asm/dma.h> 47#include <asm/dma.h>
48#include <asm/ecard.h> 48#include <asm/ecard.h>
49#include <asm/hardware.h> 49#include <mach/hardware.h>
50#include <asm/irq.h> 50#include <asm/irq.h>
51#include <asm/mmu_context.h> 51#include <asm/mmu_context.h>
52#include <asm/mach/irq.h> 52#include <asm/mach/irq.h>
diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S
index 7dca225752c1..617e509d60df 100644
--- a/arch/arm/kernel/entry-armv.S
+++ b/arch/arm/kernel/entry-armv.S
@@ -18,7 +18,7 @@
18#include <asm/memory.h> 18#include <asm/memory.h>
19#include <asm/glue.h> 19#include <asm/glue.h>
20#include <asm/vfpmacros.h> 20#include <asm/vfpmacros.h>
21#include <asm/arch/entry-macro.S> 21#include <mach/entry-macro.S>
22#include <asm/thread_notify.h> 22#include <asm/thread_notify.h>
23 23
24#include "entry-header.S" 24#include "entry-header.S"
diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S
index 84694e88b428..060d7e2e9f64 100644
--- a/arch/arm/kernel/entry-common.S
+++ b/arch/arm/kernel/entry-common.S
@@ -10,7 +10,7 @@
10 10
11#include <asm/unistd.h> 11#include <asm/unistd.h>
12#include <asm/ftrace.h> 12#include <asm/ftrace.h>
13#include <asm/arch/entry-macro.S> 13#include <mach/entry-macro.S>
14 14
15#include "entry-header.S" 15#include "entry-header.S"
16 16
diff --git a/arch/arm/kernel/head-nommu.S b/arch/arm/kernel/head-nommu.S
index 5d78ffb8a9a7..27329bd32037 100644
--- a/arch/arm/kernel/head-nommu.S
+++ b/arch/arm/kernel/head-nommu.S
@@ -15,7 +15,6 @@
15#include <linux/init.h> 15#include <linux/init.h>
16 16
17#include <asm/assembler.h> 17#include <asm/assembler.h>
18#include <asm/mach-types.h>
19#include <asm/ptrace.h> 18#include <asm/ptrace.h>
20#include <asm/asm-offsets.h> 19#include <asm/asm-offsets.h>
21#include <asm/thread_info.h> 20#include <asm/thread_info.h>
diff --git a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c
index 11dcd52e51be..f88efb135b70 100644
--- a/arch/arm/kernel/irq.c
+++ b/arch/arm/kernel/irq.c
@@ -38,6 +38,7 @@
38#include <linux/proc_fs.h> 38#include <linux/proc_fs.h>
39 39
40#include <asm/system.h> 40#include <asm/system.h>
41#include <asm/mach/irq.h>
41#include <asm/mach/time.h> 42#include <asm/mach/time.h>
42 43
43/* 44/*
diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c
index 89bfded70a1f..3fd882337064 100644
--- a/arch/arm/kernel/process.c
+++ b/arch/arm/kernel/process.c
@@ -51,7 +51,7 @@ extern void setup_mm_for_reboot(char mode);
51 51
52static volatile int hlt_counter; 52static volatile int hlt_counter;
53 53
54#include <asm/arch/system.h> 54#include <mach/system.h>
55 55
56void disable_hlt(void) 56void disable_hlt(void)
57{ 57{
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c
index 5a7c09564d13..e9842f6767f9 100644
--- a/arch/arm/kernel/smp.c
+++ b/arch/arm/kernel/smp.c
@@ -100,7 +100,7 @@ int __cpuinit __cpu_up(unsigned int cpu)
100 * a 1:1 mapping for the physical address of the kernel. 100 * a 1:1 mapping for the physical address of the kernel.
101 */ 101 */
102 pgd = pgd_alloc(&init_mm); 102 pgd = pgd_alloc(&init_mm);
103 pmd = pmd_offset(pgd, PHYS_OFFSET); 103 pmd = pmd_offset(pgd + pgd_index(PHYS_OFFSET), PHYS_OFFSET);
104 *pmd = __pmd((PHYS_OFFSET & PGDIR_MASK) | 104 *pmd = __pmd((PHYS_OFFSET & PGDIR_MASK) |
105 PMD_TYPE_SECT | PMD_SECT_AP_WRITE); 105 PMD_TYPE_SECT | PMD_SECT_AP_WRITE);
106 106
@@ -139,7 +139,7 @@ int __cpuinit __cpu_up(unsigned int cpu)
139 secondary_data.stack = NULL; 139 secondary_data.stack = NULL;
140 secondary_data.pgdir = 0; 140 secondary_data.pgdir = 0;
141 141
142 *pmd_offset(pgd, PHYS_OFFSET) = __pmd(0); 142 *pmd = __pmd(0);
143 pgd_free(&init_mm, pgd); 143 pgd_free(&init_mm, pgd);
144 144
145 if (ret) { 145 if (ret) {
diff --git a/arch/arm/lib/ecard.S b/arch/arm/lib/ecard.S
index c55aaa2a2088..8678eb2b7a60 100644
--- a/arch/arm/lib/ecard.S
+++ b/arch/arm/lib/ecard.S
@@ -12,7 +12,7 @@
12 */ 12 */
13#include <linux/linkage.h> 13#include <linux/linkage.h>
14#include <asm/assembler.h> 14#include <asm/assembler.h>
15#include <asm/hardware.h> 15#include <mach/hardware.h>
16 16
17#define CPSR2SPSR(rt) \ 17#define CPSR2SPSR(rt) \
18 mrs rt, cpsr; \ 18 mrs rt, cpsr; \
diff --git a/arch/arm/lib/io-readsw-armv3.S b/arch/arm/lib/io-readsw-armv3.S
index 4ef904185142..9aaf7c72065d 100644
--- a/arch/arm/lib/io-readsw-armv3.S
+++ b/arch/arm/lib/io-readsw-armv3.S
@@ -9,7 +9,7 @@
9 */ 9 */
10#include <linux/linkage.h> 10#include <linux/linkage.h>
11#include <asm/assembler.h> 11#include <asm/assembler.h>
12#include <asm/hardware.h> 12#include <mach/hardware.h>
13 13
14.Linsw_bad_alignment: 14.Linsw_bad_alignment:
15 adr r0, .Linsw_bad_align_msg 15 adr r0, .Linsw_bad_align_msg
diff --git a/arch/arm/lib/io-writesw-armv3.S b/arch/arm/lib/io-writesw-armv3.S
index 1607a29f49b7..cd34503e424d 100644
--- a/arch/arm/lib/io-writesw-armv3.S
+++ b/arch/arm/lib/io-writesw-armv3.S
@@ -9,7 +9,7 @@
9 */ 9 */
10#include <linux/linkage.h> 10#include <linux/linkage.h>
11#include <asm/assembler.h> 11#include <asm/assembler.h>
12#include <asm/hardware.h> 12#include <mach/hardware.h>
13 13
14.Loutsw_bad_alignment: 14.Loutsw_bad_alignment:
15 adr r0, .Loutsw_bad_align_msg 15 adr r0, .Loutsw_bad_align_msg
diff --git a/arch/arm/mach-aaec2000/aaed2000.c b/arch/arm/mach-aaec2000/aaed2000.c
index 83f57da3184c..81a3ecc0d104 100644
--- a/arch/arm/mach-aaec2000/aaed2000.c
+++ b/arch/arm/mach-aaec2000/aaed2000.c
@@ -20,14 +20,14 @@
20#include <asm/setup.h> 20#include <asm/setup.h>
21#include <asm/memory.h> 21#include <asm/memory.h>
22#include <asm/mach-types.h> 22#include <asm/mach-types.h>
23#include <asm/hardware.h> 23#include <mach/hardware.h>
24#include <asm/irq.h> 24#include <asm/irq.h>
25 25
26#include <asm/mach/arch.h> 26#include <asm/mach/arch.h>
27#include <asm/mach/map.h> 27#include <asm/mach/map.h>
28#include <asm/mach/irq.h> 28#include <asm/mach/irq.h>
29 29
30#include <asm/arch/aaed2000.h> 30#include <mach/aaed2000.h>
31 31
32#include "core.h" 32#include "core.h"
33 33
diff --git a/arch/arm/mach-aaec2000/core.c b/arch/arm/mach-aaec2000/core.c
index b016be2b0e35..dfb26bc23d1a 100644
--- a/arch/arm/mach-aaec2000/core.c
+++ b/arch/arm/mach-aaec2000/core.c
@@ -20,7 +20,7 @@
20#include <linux/timex.h> 20#include <linux/timex.h>
21#include <linux/signal.h> 21#include <linux/signal.h>
22 22
23#include <asm/hardware.h> 23#include <mach/hardware.h>
24#include <asm/irq.h> 24#include <asm/irq.h>
25#include <asm/sizes.h> 25#include <asm/sizes.h>
26 26
diff --git a/arch/arm/mach-aaec2000/include/mach/aaec2000.h b/arch/arm/mach-aaec2000/include/mach/aaec2000.h
new file mode 100644
index 000000000000..bc729c42f843
--- /dev/null
+++ b/arch/arm/mach-aaec2000/include/mach/aaec2000.h
@@ -0,0 +1,207 @@
1/*
2 * arch/arm/mach-aaec2000/include/mach/aaec2000.h
3 *
4 * AAEC-2000 registers definition
5 *
6 * Copyright (c) 2005 Nicolas Bellido Y Ortega
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 */
12
13#ifndef __ASM_ARCH_AAEC2000_H
14#define __ASM_ARCH_AAEC2000_H
15
16#ifndef __ASM_ARCH_HARDWARE_H
17#error You must include hardware.h not this file
18#endif /* __ASM_ARCH_HARDWARE_H */
19
20/* Chip selects */
21#define AAEC_CS0 0x00000000
22#define AAEC_CS1 0x10000000
23#define AAEC_CS2 0x20000000
24#define AAEC_CS3 0x30000000
25
26/* Flash */
27#define AAEC_FLASH_BASE AAEC_CS0
28#define AAEC_FLASH_SIZE SZ_64M
29
30/* Interrupt controller */
31#define IRQ_BASE __REG(0x80000500)
32#define IRQ_INTSR __REG(0x80000500) /* Int Status Register */
33#define IRQ_INTRSR __REG(0x80000504) /* Int Raw (unmasked) Status */
34#define IRQ_INTENS __REG(0x80000508) /* Int Enable Set */
35#define IRQ_INTENC __REG(0x8000050c) /* Int Enable Clear */
36
37/* UART 1 */
38#define UART1_BASE __REG(0x80000600)
39#define UART1_DR __REG(0x80000600) /* Data/FIFO Register */
40#define UART1_LCR __REG(0x80000604) /* Link Control Register */
41#define UART1_BRCR __REG(0x80000608) /* Baud Rate Control Register */
42#define UART1_CR __REG(0x8000060c) /* Control Register */
43#define UART1_SR __REG(0x80000610) /* Status Register */
44#define UART1_INT __REG(0x80000614) /* Interrupt Status Register */
45#define UART1_INTM __REG(0x80000618) /* Interrupt Mask Register */
46#define UART1_INTRES __REG(0x8000061c) /* Int Result (masked status) Register */
47
48/* UART 2 */
49#define UART2_BASE __REG(0x80000700)
50#define UART2_DR __REG(0x80000700) /* Data/FIFO Register */
51#define UART2_LCR __REG(0x80000704) /* Link Control Register */
52#define UART2_BRCR __REG(0x80000708) /* Baud Rate Control Register */
53#define UART2_CR __REG(0x8000070c) /* Control Register */
54#define UART2_SR __REG(0x80000710) /* Status Register */
55#define UART2_INT __REG(0x80000714) /* Interrupt Status Register */
56#define UART2_INTM __REG(0x80000718) /* Interrupt Mask Register */
57#define UART2_INTRES __REG(0x8000071c) /* Int Result (masked status) Register */
58
59/* UART 3 */
60#define UART3_BASE __REG(0x80000800)
61#define UART3_DR __REG(0x80000800) /* Data/FIFO Register */
62#define UART3_LCR __REG(0x80000804) /* Link Control Register */
63#define UART3_BRCR __REG(0x80000808) /* Baud Rate Control Register */
64#define UART3_CR __REG(0x8000080c) /* Control Register */
65#define UART3_SR __REG(0x80000810) /* Status Register */
66#define UART3_INT __REG(0x80000814) /* Interrupt Status Register */
67#define UART3_INTM __REG(0x80000818) /* Interrupt Mask Register */
68#define UART3_INTRES __REG(0x8000081c) /* Int Result (masked status) Register */
69
70/* These are used in some places */
71#define _UART1_BASE __PREG(UART1_BASE)
72#define _UART2_BASE __PREG(UART2_BASE)
73#define _UART3_BASE __PREG(UART3_BASE)
74
75/* UART Registers Offsets */
76#define UART_DR 0x00
77#define UART_LCR 0x04
78#define UART_BRCR 0x08
79#define UART_CR 0x0c
80#define UART_SR 0x10
81#define UART_INT 0x14
82#define UART_INTM 0x18
83#define UART_INTRES 0x1c
84
85/* UART_LCR Bitmask */
86#define UART_LCR_BRK (1 << 0) /* Send Break */
87#define UART_LCR_PEN (1 << 1) /* Parity Enable */
88#define UART_LCR_EP (1 << 2) /* Even/Odd Parity */
89#define UART_LCR_S2 (1 << 3) /* One/Two Stop bits */
90#define UART_LCR_FIFO (1 << 4) /* FIFO Enable */
91#define UART_LCR_WL5 (0 << 5) /* Word Length - 5 bits */
92#define UART_LCR_WL6 (1 << 5) /* Word Length - 6 bits */
93#define UART_LCR_WL7 (1 << 6) /* Word Length - 7 bits */
94#define UART_LCR_WL8 (1 << 7) /* Word Length - 8 bits */
95
96/* UART_CR Bitmask */
97#define UART_CR_EN (1 << 0) /* UART Enable */
98#define UART_CR_SIR (1 << 1) /* IrDA SIR Enable */
99#define UART_CR_SIRLP (1 << 2) /* Low Power IrDA Enable */
100#define UART_CR_RXP (1 << 3) /* Receive Pin Polarity */
101#define UART_CR_TXP (1 << 4) /* Transmit Pin Polarity */
102#define UART_CR_MXP (1 << 5) /* Modem Pin Polarity */
103#define UART_CR_LOOP (1 << 6) /* Loopback Mode */
104
105/* UART_SR Bitmask */
106#define UART_SR_CTS (1 << 0) /* Clear To Send Status */
107#define UART_SR_DSR (1 << 1) /* Data Set Ready Status */
108#define UART_SR_DCD (1 << 2) /* Data Carrier Detect Status */
109#define UART_SR_TxBSY (1 << 3) /* Transmitter Busy Status */
110#define UART_SR_RxFE (1 << 4) /* Receive FIFO Empty Status */
111#define UART_SR_TxFF (1 << 5) /* Transmit FIFO Full Status */
112#define UART_SR_RxFF (1 << 6) /* Receive FIFO Full Status */
113#define UART_SR_TxFE (1 << 7) /* Transmit FIFO Empty Status */
114
115/* UART_INT Bitmask */
116#define UART_INT_RIS (1 << 0) /* Rx Interrupt */
117#define UART_INT_TIS (1 << 1) /* Tx Interrupt */
118#define UART_INT_MIS (1 << 2) /* Modem Interrupt */
119#define UART_INT_RTIS (1 << 3) /* Receive Timeout Interrupt */
120
121/* Timer 1 */
122#define TIMER1_BASE __REG(0x80000c00)
123#define TIMER1_LOAD __REG(0x80000c00) /* Timer 1 Load Register */
124#define TIMER1_VAL __REG(0x80000c04) /* Timer 1 Value Register */
125#define TIMER1_CTRL __REG(0x80000c08) /* Timer 1 Control Register */
126#define TIMER1_CLEAR __REG(0x80000c0c) /* Timer 1 Clear Register */
127
128/* Timer 2 */
129#define TIMER2_BASE __REG(0x80000d00)
130#define TIMER2_LOAD __REG(0x80000d00) /* Timer 2 Load Register */
131#define TIMER2_VAL __REG(0x80000d04) /* Timer 2 Value Register */
132#define TIMER2_CTRL __REG(0x80000d08) /* Timer 2 Control Register */
133#define TIMER2_CLEAR __REG(0x80000d0c) /* Timer 2 Clear Register */
134
135/* Timer 3 */
136#define TIMER3_BASE __REG(0x80000e00)
137#define TIMER3_LOAD __REG(0x80000e00) /* Timer 3 Load Register */
138#define TIMER3_VAL __REG(0x80000e04) /* Timer 3 Value Register */
139#define TIMER3_CTRL __REG(0x80000e08) /* Timer 3 Control Register */
140#define TIMER3_CLEAR __REG(0x80000e0c) /* Timer 3 Clear Register */
141
142/* Timer Control register bits */
143#define TIMER_CTRL_ENABLE (1 << 7) /* Enable (Start Timer) */
144#define TIMER_CTRL_PERIODIC (1 << 6) /* Periodic Running Mode */
145#define TIMER_CTRL_FREE_RUNNING (0 << 6) /* Normal Running Mode */
146#define TIMER_CTRL_CLKSEL_508K (1 << 3) /* 508KHz Clock select (Timer 1, 2) */
147#define TIMER_CTRL_CLKSEL_2K (0 << 3) /* 2KHz Clock Select (Timer 1, 2) */
148
149/* Power and State Control */
150#define POWER_BASE __REG(0x80000400)
151#define POWER_PWRSR __REG(0x80000400) /* Power Status Register */
152#define POWER_PWRCNT __REG(0x80000404) /* Power/Clock control */
153#define POWER_HALT __REG(0x80000408) /* Power Idle Mode */
154#define POWER_STDBY __REG(0x8000040c) /* Power Standby Mode */
155#define POWER_BLEOI __REG(0x80000410) /* Battery Low End of Interrupt */
156#define POWER_MCEOI __REG(0x80000414) /* Media Changed EoI */
157#define POWER_TEOI __REG(0x80000418) /* Tick EoI */
158#define POWER_STFCLR __REG(0x8000041c) /* NbFlg, RSTFlg, PFFlg, CLDFlg Clear */
159#define POWER_CLKSET __REG(0x80000420) /* Clock Speed Control */
160
161/* GPIO Registers */
162#define AAEC_GPIO_PHYS 0x80000e00
163
164#define AAEC_GPIO_PADR __REG(AAEC_GPIO_PHYS + 0x00)
165#define AAEC_GPIO_PBDR __REG(AAEC_GPIO_PHYS + 0x04)
166#define AAEC_GPIO_PCDR __REG(AAEC_GPIO_PHYS + 0x08)
167#define AAEC_GPIO_PDDR __REG(AAEC_GPIO_PHYS + 0x0c)
168#define AAEC_GPIO_PADDR __REG(AAEC_GPIO_PHYS + 0x10)
169#define AAEC_GPIO_PBDDR __REG(AAEC_GPIO_PHYS + 0x14)
170#define AAEC_GPIO_PCDDR __REG(AAEC_GPIO_PHYS + 0x18)
171#define AAEC_GPIO_PDDDR __REG(AAEC_GPIO_PHYS + 0x1c)
172#define AAEC_GPIO_PEDR __REG(AAEC_GPIO_PHYS + 0x20)
173#define AAEC_GPIO_PEDDR __REG(AAEC_GPIO_PHYS + 0x24)
174#define AAEC_GPIO_KSCAN __REG(AAEC_GPIO_PHYS + 0x28)
175#define AAEC_GPIO_PINMUX __REG(AAEC_GPIO_PHYS + 0x2c)
176#define AAEC_GPIO_PFDR __REG(AAEC_GPIO_PHYS + 0x30)
177#define AAEC_GPIO_PFDDR __REG(AAEC_GPIO_PHYS + 0x34)
178#define AAEC_GPIO_PGDR __REG(AAEC_GPIO_PHYS + 0x38)
179#define AAEC_GPIO_PGDDR __REG(AAEC_GPIO_PHYS + 0x3c)
180#define AAEC_GPIO_PHDR __REG(AAEC_GPIO_PHYS + 0x40)
181#define AAEC_GPIO_PHDDR __REG(AAEC_GPIO_PHYS + 0x44)
182#define AAEC_GPIO_RAZ __REG(AAEC_GPIO_PHYS + 0x48)
183#define AAEC_GPIO_INTTYPE1 __REG(AAEC_GPIO_PHYS + 0x4c)
184#define AAEC_GPIO_INTTYPE2 __REG(AAEC_GPIO_PHYS + 0x50)
185#define AAEC_GPIO_FEOI __REG(AAEC_GPIO_PHYS + 0x54)
186#define AAEC_GPIO_INTEN __REG(AAEC_GPIO_PHYS + 0x58)
187#define AAEC_GPIO_INTSTATUS __REG(AAEC_GPIO_PHYS + 0x5c)
188#define AAEC_GPIO_RAWINTSTATUS __REG(AAEC_GPIO_PHYS + 0x60)
189#define AAEC_GPIO_DB __REG(AAEC_GPIO_PHYS + 0x64)
190#define AAEC_GPIO_PAPINDR __REG(AAEC_GPIO_PHYS + 0x68)
191#define AAEC_GPIO_PBPINDR __REG(AAEC_GPIO_PHYS + 0x6c)
192#define AAEC_GPIO_PCPINDR __REG(AAEC_GPIO_PHYS + 0x70)
193#define AAEC_GPIO_PDPINDR __REG(AAEC_GPIO_PHYS + 0x74)
194#define AAEC_GPIO_PEPINDR __REG(AAEC_GPIO_PHYS + 0x78)
195#define AAEC_GPIO_PFPINDR __REG(AAEC_GPIO_PHYS + 0x7c)
196#define AAEC_GPIO_PGPINDR __REG(AAEC_GPIO_PHYS + 0x80)
197#define AAEC_GPIO_PHPINDR __REG(AAEC_GPIO_PHYS + 0x84)
198
199#define AAEC_GPIO_PINMUX_PE0CON (1 << 0)
200#define AAEC_GPIO_PINMUX_PD0CON (1 << 1)
201#define AAEC_GPIO_PINMUX_CODECON (1 << 2)
202#define AAEC_GPIO_PINMUX_UART3CON (1 << 3)
203
204/* LCD Controller */
205#define AAEC_CLCD_PHYS 0x80003000
206
207#endif /* __ARM_ARCH_AAEC2000_H */
diff --git a/arch/arm/mach-aaec2000/include/mach/aaed2000.h b/arch/arm/mach-aaec2000/include/mach/aaed2000.h
new file mode 100644
index 000000000000..f821295ca71b
--- /dev/null
+++ b/arch/arm/mach-aaec2000/include/mach/aaed2000.h
@@ -0,0 +1,40 @@
1/*
2 * arch/arm/mach-aaec2000/include/mach/aaed2000.h
3 *
4 * AAED-2000 specific bits definition
5 *
6 * Copyright (c) 2005 Nicolas Bellido Y Ortega
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 */
12
13#ifndef __ASM_ARCH_AAED2000_H
14#define __ASM_ARCH_AAED2000_H
15
16/* External GPIOs. */
17
18#define EXT_GPIO_PBASE AAEC_CS3
19#define EXT_GPIO_VBASE 0xf8100000
20#define EXT_GPIO_LENGTH 0x00001000
21
22#define __ext_gpio_p2v(x) ((x) - EXT_GPIO_PBASE + EXT_GPIO_VBASE)
23#define __ext_gpio_v2p(x) ((x) + EXT_GPIO_PBASE - EXT_GPIO_VBASE)
24
25#define __EXT_GPIO_REG(x) (*((volatile u32 *)__ext_gpio_p2v(x)))
26#define __EXT_GPIO_PREG(x) (__ext_gpio_v2p((u32)&(x)))
27
28#define AAED_EXT_GPIO __EXT_GPIO_REG(EXT_GPIO_PBASE)
29
30#define AAED_EGPIO_KBD_SCAN 0x00003fff /* Keyboard scan data */
31#define AAED_EGPIO_PWR_INT 0x00008fff /* Smart battery charger interrupt */
32#define AAED_EGPIO_SWITCHED 0x000f0000 /* DIP Switches */
33#define AAED_EGPIO_USB_VBUS 0x00400000 /* USB Vbus sense */
34#define AAED_EGPIO_LCD_PWR_EN 0x02000000 /* LCD and backlight PWR enable */
35#define AAED_EGPIO_nLED0 0x20000000 /* LED 0 */
36#define AAED_EGPIO_nLED1 0x20000000 /* LED 1 */
37#define AAED_EGPIO_nLED2 0x20000000 /* LED 2 */
38
39
40#endif /* __ARM_ARCH_AAED2000_H */
diff --git a/arch/arm/mach-aaec2000/include/mach/debug-macro.S b/arch/arm/mach-aaec2000/include/mach/debug-macro.S
new file mode 100644
index 000000000000..0b6351d7c389
--- /dev/null
+++ b/arch/arm/mach-aaec2000/include/mach/debug-macro.S
@@ -0,0 +1,37 @@
1/* arch/arm/mach-aaec2000/include/mach/debug-macro.S
2 *
3 * Debugging macro include header
4 *
5 * Copyright (c) 2005 Nicolas Bellido Y Ortega
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 */
11
12#include "hardware.h"
13 .macro addruart,rx
14 mrc p15, 0, \rx, c1, c0
15 tst \rx, #1 @ MMU enabled?
16 moveq \rx, #0x80000000 @ physical
17 movne \rx, #io_p2v(0x80000000) @ virtual
18 orr \rx, \rx, #0x00000800
19 .endm
20
21 .macro senduart,rd,rx
22 str \rd, [\rx, #0]
23 .endm
24
25 .macro busyuart,rd,rx
261002: ldr \rd, [\rx, #0x10]
27 tst \rd, #(1 << 7)
28 beq 1002b
29 .endm
30
31 .macro waituart,rd,rx
32#if 0
331001: ldr \rd, [\rx, #0x10]
34 tst \rd, #(1 << 5)
35 beq 1001b
36#endif
37 .endm
diff --git a/arch/arm/mach-aaec2000/include/mach/dma.h b/arch/arm/mach-aaec2000/include/mach/dma.h
new file mode 100644
index 000000000000..2da846c72fe7
--- /dev/null
+++ b/arch/arm/mach-aaec2000/include/mach/dma.h
@@ -0,0 +1,9 @@
1/*
2 * arch/arm/mach-aaec2000/include/mach/dma.h
3 *
4 * Copyright (c) 2005 Nicolas Bellido Y Ortega
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
diff --git a/arch/arm/mach-aaec2000/include/mach/entry-macro.S b/arch/arm/mach-aaec2000/include/mach/entry-macro.S
new file mode 100644
index 000000000000..c8fb34469007
--- /dev/null
+++ b/arch/arm/mach-aaec2000/include/mach/entry-macro.S
@@ -0,0 +1,40 @@
1/*
2 * arch/arm/mach-aaec2000/include/mach/entry-macro.S
3 *
4 * Low-level IRQ helper for aaec-2000 based platforms
5 *
6 * Copyright (c) 2005 Nicolas Bellido Y Ortega
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 *
12 */
13#include <mach/irqs.h>
14
15 .macro disable_fiq
16 .endm
17
18 .macro get_irqnr_preamble, base, tmp
19 .endm
20
21 .macro arch_ret_to_user, tmp1, tmp2
22 .endm
23
24 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
25 mov r4, #0xf8000000
26 add r4, r4, #0x00000500
27 mov \base, r4
28 ldr \irqstat, [\base, #0]
29 cmp \irqstat, #0
30 bne 1001f
31 ldr \irqnr, =NR_IRQS+1
32 b 1003f
331001: mov \irqnr, #0
341002: ands \tmp, \irqstat, #1
35 mov \irqstat, \irqstat, LSR #1
36 add \irqnr, \irqnr, #1
37 beq 1002b
38 sub \irqnr, \irqnr, #1
391003:
40 .endm
diff --git a/arch/arm/mach-aaec2000/include/mach/hardware.h b/arch/arm/mach-aaec2000/include/mach/hardware.h
new file mode 100644
index 000000000000..965a6f6672d6
--- /dev/null
+++ b/arch/arm/mach-aaec2000/include/mach/hardware.h
@@ -0,0 +1,50 @@
1/*
2 * arch/arm/mach-aaec2000/include/mach/hardware.h
3 *
4 * Copyright (c) 2005 Nicolas Bellido Y Ortega
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10
11#ifndef __ASM_ARCH_HARDWARE_H
12#define __ASM_ARCH_HARDWARE_H
13
14#include <asm/sizes.h>
15#include <mach/aaec2000.h>
16
17/* The kernel is loaded at physical address 0xf8000000.
18 * We map the IO space a bit after
19 */
20#define PIO_APB_BASE 0x80000000
21#define VIO_APB_BASE 0xf8000000
22#define IO_APB_LENGTH 0x2000
23#define PIO_AHB_BASE 0x80002000
24#define VIO_AHB_BASE 0xf8002000
25#define IO_AHB_LENGTH 0x2000
26
27#define VIO_BASE VIO_APB_BASE
28#define PIO_BASE PIO_APB_BASE
29
30#define io_p2v(x) ( (x) - PIO_BASE + VIO_BASE )
31#define io_v2p(x) ( (x) + PIO_BASE - VIO_BASE )
32
33#ifndef __ASSEMBLY__
34
35#include <asm/types.h>
36
37/* FIXME: Is it needed to optimize this a la pxa ?? */
38#define __REG(x) (*((volatile u32 *)io_p2v(x)))
39#define __PREG(x) (io_v2p((u32)&(x)))
40
41#else /* __ASSEMBLY__ */
42
43#define __REG(x) io_p2v(x)
44#define __PREG(x) io_v2p(x)
45
46#endif
47
48#include "aaec2000.h"
49
50#endif /* __ASM_ARCH_HARDWARE_H */
diff --git a/arch/arm/mach-aaec2000/include/mach/io.h b/arch/arm/mach-aaec2000/include/mach/io.h
new file mode 100644
index 000000000000..c87c24de1110
--- /dev/null
+++ b/arch/arm/mach-aaec2000/include/mach/io.h
@@ -0,0 +1,20 @@
1/*
2 * arch/arm/mach-aaec2000/include/mach/io.h
3 *
4 * Copied from asm/arch/sa1100/io.h
5 */
6#ifndef __ASM_ARM_ARCH_IO_H
7#define __ASM_ARM_ARCH_IO_H
8
9#include <mach/hardware.h>
10
11#define IO_SPACE_LIMIT 0xffffffff
12
13/*
14 * We don't actually have real ISA nor PCI buses, but there is so many
15 * drivers out there that might just work if we fake them...
16 */
17#define __io(a) ((void __iomem *)(a))
18#define __mem_pci(a) (a)
19
20#endif
diff --git a/arch/arm/mach-aaec2000/include/mach/irqs.h b/arch/arm/mach-aaec2000/include/mach/irqs.h
new file mode 100644
index 000000000000..bf45c6d2f294
--- /dev/null
+++ b/arch/arm/mach-aaec2000/include/mach/irqs.h
@@ -0,0 +1,46 @@
1/*
2 * arch/arm/mach-aaec2000/include/mach/irqs.h
3 *
4 * Copyright (c) 2005 Nicolas Bellido Y Ortega
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10
11#ifndef __ASM_ARCH_IRQS_H
12#define __ASM_ARCH_IRQS_H
13
14
15#define INT_GPIOF0_FIQ 0 /* External GPIO Port F O Fast Interrupt Input */
16#define INT_BL_FIQ 1 /* Battery Low Fast Interrupt */
17#define INT_WE_FIQ 2 /* Watchdog Expired Fast Interrupt */
18#define INT_MV_FIQ 3 /* Media Changed Interrupt */
19#define INT_SC 4 /* Sound Codec Interrupt */
20#define INT_GPIO1 5 /* GPIO Port F Configurable Int 1 */
21#define INT_GPIO2 6 /* GPIO Port F Configurable Int 2 */
22#define INT_GPIO3 7 /* GPIO Port F Configurable Int 3 */
23#define INT_TMR1_OFL 8 /* Timer 1 Overflow Interrupt */
24#define INT_TMR2_OFL 9 /* Timer 2 Overflow Interrupt */
25#define INT_RTC_CM 10 /* RTC Compare Match Interrupt */
26#define INT_TICK 11 /* 64Hz Tick Interrupt */
27#define INT_UART1 12 /* UART1 Interrupt */
28#define INT_UART2 13 /* UART2 & Modem State Changed Interrupt */
29#define INT_LCD 14 /* LCD Interrupt */
30#define INT_SSI 15 /* SSI End of Transfer Interrupt */
31#define INT_UART3 16 /* UART3 Interrupt */
32#define INT_SCI 17 /* SCI Interrupt */
33#define INT_AAC 18 /* Advanced Audio Codec Interrupt */
34#define INT_MMC 19 /* MMC Interrupt */
35#define INT_USB 20 /* USB Interrupt */
36#define INT_DMA 21 /* DMA Interrupt */
37#define INT_TMR3_UOFL 22 /* Timer 3 Underflow Interrupt */
38#define INT_GPIO4 23 /* GPIO Port F Configurable Int 4 */
39#define INT_GPIO5 24 /* GPIO Port F Configurable Int 4 */
40#define INT_GPIO6 25 /* GPIO Port F Configurable Int 4 */
41#define INT_GPIO7 26 /* GPIO Port F Configurable Int 4 */
42#define INT_BMI 27 /* BMI Interrupt */
43
44#define NR_IRQS (INT_BMI + 1)
45
46#endif /* __ASM_ARCH_IRQS_H */
diff --git a/arch/arm/mach-aaec2000/include/mach/memory.h b/arch/arm/mach-aaec2000/include/mach/memory.h
new file mode 100644
index 000000000000..56ae900a482e
--- /dev/null
+++ b/arch/arm/mach-aaec2000/include/mach/memory.h
@@ -0,0 +1,30 @@
1/*
2 * arch/arm/mach-aaec2000/include/mach/memory.h
3 *
4 * Copyright (c) 2005 Nicolas Bellido Y Ortega
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10
11#ifndef __ASM_ARCH_MEMORY_H
12#define __ASM_ARCH_MEMORY_H
13
14
15#define PHYS_OFFSET UL(0xf0000000)
16
17#define __virt_to_bus(x) __virt_to_phys(x)
18#define __bus_to_virt(x) __phys_to_virt(x)
19
20/*
21 * The nodes are the followings:
22 *
23 * node 0: 0xf000.0000 - 0xf3ff.ffff
24 * node 1: 0xf400.0000 - 0xf7ff.ffff
25 * node 2: 0xf800.0000 - 0xfbff.ffff
26 * node 3: 0xfc00.0000 - 0xffff.ffff
27 */
28#define NODE_MEM_SIZE_BITS 26
29
30#endif /* __ASM_ARCH_MEMORY_H */
diff --git a/arch/arm/mach-aaec2000/include/mach/system.h b/arch/arm/mach-aaec2000/include/mach/system.h
new file mode 100644
index 000000000000..8f4115d734ce
--- /dev/null
+++ b/arch/arm/mach-aaec2000/include/mach/system.h
@@ -0,0 +1,24 @@
1/*
2 * arch/arm/mach-aaed2000/include/mach/system.h
3 *
4 * Copyright (c) 2005 Nicolas Bellido Y Ortega
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10
11#ifndef __ASM_ARCH_SYSTEM_H
12#define __ASM_ARCH_SYSTEM_H
13
14static inline void arch_idle(void)
15{
16 cpu_do_idle();
17}
18
19static inline void arch_reset(char mode)
20{
21 cpu_reset(0);
22}
23
24#endif /* __ASM_ARCH_SYSTEM_H */
diff --git a/arch/arm/mach-aaec2000/include/mach/timex.h b/arch/arm/mach-aaec2000/include/mach/timex.h
new file mode 100644
index 000000000000..6c8edf4a8828
--- /dev/null
+++ b/arch/arm/mach-aaec2000/include/mach/timex.h
@@ -0,0 +1,18 @@
1/*
2 * arch/arm/mach-aaec2000/include/mach/timex.h
3 *
4 * AAEC-2000 Architecture timex specification
5 *
6 * Copyright (c) 2005 Nicolas Bellido Y Ortega
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 */
12
13#ifndef __ASM_ARCH_TIMEX_H
14#define __ASM_ARCH_TIMEX_H
15
16#define CLOCK_TICK_RATE 508000
17
18#endif /* __ASM_ARCH_TIMEX_H */
diff --git a/arch/arm/mach-aaec2000/include/mach/uncompress.h b/arch/arm/mach-aaec2000/include/mach/uncompress.h
new file mode 100644
index 000000000000..381ecad1a1bb
--- /dev/null
+++ b/arch/arm/mach-aaec2000/include/mach/uncompress.h
@@ -0,0 +1,46 @@
1/*
2 * arch/arm/mach-aaec2000/include/mach/uncompress.h
3 *
4 * Copyright (c) 2005 Nicolas Bellido Y Ortega
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10
11#ifndef __ASM_ARCH_UNCOMPRESS_H
12#define __ASM_ARCH_UNCOMPRESS_H
13
14#include "hardware.h"
15
16#define UART(x) (*(volatile unsigned long *)(serial_port + (x)))
17
18static void putc(int c)
19{
20 unsigned long serial_port;
21 do {
22 serial_port = _UART3_BASE;
23 if (UART(UART_CR) & UART_CR_EN) break;
24 serial_port = _UART1_BASE;
25 if (UART(UART_CR) & UART_CR_EN) break;
26 serial_port = _UART2_BASE;
27 if (UART(UART_CR) & UART_CR_EN) break;
28 return;
29 } while (0);
30
31 /* wait for space in the UART's transmitter */
32 while ((UART(UART_SR) & UART_SR_TxFF))
33 barrier();
34
35 /* send the character out. */
36 UART(UART_DR) = c;
37}
38
39static inline void flush(void)
40{
41}
42
43#define arch_decomp_setup()
44#define arch_decomp_wdog()
45
46#endif /* __ASM_ARCH_UNCOMPRESS_H */
diff --git a/arch/arm/mach-aaec2000/include/mach/vmalloc.h b/arch/arm/mach-aaec2000/include/mach/vmalloc.h
new file mode 100644
index 000000000000..551f68f666bf
--- /dev/null
+++ b/arch/arm/mach-aaec2000/include/mach/vmalloc.h
@@ -0,0 +1,16 @@
1/*
2 * arch/arm/mach-aaec2000/include/mach/vmalloc.h
3 *
4 * Copyright (c) 2005 Nicolas Bellido Y Ortega
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10
11#ifndef __ASM_ARCH_VMALLOC_H
12#define __ASM_ARCH_VMALLOC_H
13
14#define VMALLOC_END (PAGE_OFFSET + 0x10000000)
15
16#endif /* __ASM_ARCH_VMALLOC_H */
diff --git a/arch/arm/mach-at91/at91cap9.c b/arch/arm/mach-at91/at91cap9.c
index 933fa8f55cbc..638948c16770 100644
--- a/arch/arm/mach-at91/at91cap9.c
+++ b/arch/arm/mach-at91/at91cap9.c
@@ -17,10 +17,10 @@
17 17
18#include <asm/mach/arch.h> 18#include <asm/mach/arch.h>
19#include <asm/mach/map.h> 19#include <asm/mach/map.h>
20#include <asm/arch/at91cap9.h> 20#include <mach/at91cap9.h>
21#include <asm/arch/at91_pmc.h> 21#include <mach/at91_pmc.h>
22#include <asm/arch/at91_rstc.h> 22#include <mach/at91_rstc.h>
23#include <asm/arch/at91_shdwc.h> 23#include <mach/at91_shdwc.h>
24 24
25#include "generic.h" 25#include "generic.h"
26#include "clock.h" 26#include "clock.h"
diff --git a/arch/arm/mach-at91/at91cap9_devices.c b/arch/arm/mach-at91/at91cap9_devices.c
index 25765f1afca9..abb4aac8fa98 100644
--- a/arch/arm/mach-at91/at91cap9_devices.c
+++ b/arch/arm/mach-at91/at91cap9_devices.c
@@ -20,11 +20,11 @@
20 20
21#include <video/atmel_lcdc.h> 21#include <video/atmel_lcdc.h>
22 22
23#include <asm/arch/board.h> 23#include <mach/board.h>
24#include <asm/arch/gpio.h> 24#include <mach/gpio.h>
25#include <asm/arch/at91cap9.h> 25#include <mach/at91cap9.h>
26#include <asm/arch/at91cap9_matrix.h> 26#include <mach/at91cap9_matrix.h>
27#include <asm/arch/at91sam9_smc.h> 27#include <mach/at91sam9_smc.h>
28 28
29#include "generic.h" 29#include "generic.h"
30 30
diff --git a/arch/arm/mach-at91/at91rm9200.c b/arch/arm/mach-at91/at91rm9200.c
index d688c1dbd925..28594fcc88e3 100644
--- a/arch/arm/mach-at91/at91rm9200.c
+++ b/arch/arm/mach-at91/at91rm9200.c
@@ -14,9 +14,9 @@
14 14
15#include <asm/mach/arch.h> 15#include <asm/mach/arch.h>
16#include <asm/mach/map.h> 16#include <asm/mach/map.h>
17#include <asm/arch/at91rm9200.h> 17#include <mach/at91rm9200.h>
18#include <asm/arch/at91_pmc.h> 18#include <mach/at91_pmc.h>
19#include <asm/arch/at91_st.h> 19#include <mach/at91_st.h>
20 20
21#include "generic.h" 21#include "generic.h"
22#include "clock.h" 22#include "clock.h"
diff --git a/arch/arm/mach-at91/at91rm9200_devices.c b/arch/arm/mach-at91/at91rm9200_devices.c
index d2c5c84bf6b8..9338825cfcd7 100644
--- a/arch/arm/mach-at91/at91rm9200_devices.c
+++ b/arch/arm/mach-at91/at91rm9200_devices.c
@@ -17,10 +17,10 @@
17#include <linux/platform_device.h> 17#include <linux/platform_device.h>
18#include <linux/i2c-gpio.h> 18#include <linux/i2c-gpio.h>
19 19
20#include <asm/arch/board.h> 20#include <mach/board.h>
21#include <asm/arch/gpio.h> 21#include <mach/gpio.h>
22#include <asm/arch/at91rm9200.h> 22#include <mach/at91rm9200.h>
23#include <asm/arch/at91rm9200_mc.h> 23#include <mach/at91rm9200_mc.h>
24 24
25#include "generic.h" 25#include "generic.h"
26 26
diff --git a/arch/arm/mach-at91/at91rm9200_time.c b/arch/arm/mach-at91/at91rm9200_time.c
index 50392ff71513..a72e798a2a40 100644
--- a/arch/arm/mach-at91/at91rm9200_time.c
+++ b/arch/arm/mach-at91/at91rm9200_time.c
@@ -26,7 +26,7 @@
26 26
27#include <asm/mach/time.h> 27#include <asm/mach/time.h>
28 28
29#include <asm/arch/at91_st.h> 29#include <mach/at91_st.h>
30 30
31static unsigned long last_crtr; 31static unsigned long last_crtr;
32static u32 irqmask; 32static u32 irqmask;
diff --git a/arch/arm/mach-at91/at91sam9260.c b/arch/arm/mach-at91/at91sam9260.c
index 380f12a12200..accb69ec478e 100644
--- a/arch/arm/mach-at91/at91sam9260.c
+++ b/arch/arm/mach-at91/at91sam9260.c
@@ -15,11 +15,11 @@
15 15
16#include <asm/mach/arch.h> 16#include <asm/mach/arch.h>
17#include <asm/mach/map.h> 17#include <asm/mach/map.h>
18#include <asm/arch/cpu.h> 18#include <mach/cpu.h>
19#include <asm/arch/at91sam9260.h> 19#include <mach/at91sam9260.h>
20#include <asm/arch/at91_pmc.h> 20#include <mach/at91_pmc.h>
21#include <asm/arch/at91_rstc.h> 21#include <mach/at91_rstc.h>
22#include <asm/arch/at91_shdwc.h> 22#include <mach/at91_shdwc.h>
23 23
24#include "generic.h" 24#include "generic.h"
25#include "clock.h" 25#include "clock.h"
diff --git a/arch/arm/mach-at91/at91sam9260_devices.c b/arch/arm/mach-at91/at91sam9260_devices.c
index f5fec0a9cf49..7774d17dde74 100644
--- a/arch/arm/mach-at91/at91sam9260_devices.c
+++ b/arch/arm/mach-at91/at91sam9260_devices.c
@@ -16,12 +16,12 @@
16#include <linux/platform_device.h> 16#include <linux/platform_device.h>
17#include <linux/i2c-gpio.h> 17#include <linux/i2c-gpio.h>
18 18
19#include <asm/arch/board.h> 19#include <mach/board.h>
20#include <asm/arch/gpio.h> 20#include <mach/gpio.h>
21#include <asm/arch/cpu.h> 21#include <mach/cpu.h>
22#include <asm/arch/at91sam9260.h> 22#include <mach/at91sam9260.h>
23#include <asm/arch/at91sam9260_matrix.h> 23#include <mach/at91sam9260_matrix.h>
24#include <asm/arch/at91sam9_smc.h> 24#include <mach/at91sam9_smc.h>
25 25
26#include "generic.h" 26#include "generic.h"
27 27
diff --git a/arch/arm/mach-at91/at91sam9261.c b/arch/arm/mach-at91/at91sam9261.c
index 35bf6fd52516..7b51a59ae8b3 100644
--- a/arch/arm/mach-at91/at91sam9261.c
+++ b/arch/arm/mach-at91/at91sam9261.c
@@ -15,10 +15,10 @@
15 15
16#include <asm/mach/arch.h> 16#include <asm/mach/arch.h>
17#include <asm/mach/map.h> 17#include <asm/mach/map.h>
18#include <asm/arch/at91sam9261.h> 18#include <mach/at91sam9261.h>
19#include <asm/arch/at91_pmc.h> 19#include <mach/at91_pmc.h>
20#include <asm/arch/at91_rstc.h> 20#include <mach/at91_rstc.h>
21#include <asm/arch/at91_shdwc.h> 21#include <mach/at91_shdwc.h>
22 22
23#include "generic.h" 23#include "generic.h"
24#include "clock.h" 24#include "clock.h"
diff --git a/arch/arm/mach-at91/at91sam9261_devices.c b/arch/arm/mach-at91/at91sam9261_devices.c
index b80860e31383..6b89172310c7 100644
--- a/arch/arm/mach-at91/at91sam9261_devices.c
+++ b/arch/arm/mach-at91/at91sam9261_devices.c
@@ -20,11 +20,11 @@
20#include <linux/fb.h> 20#include <linux/fb.h>
21#include <video/atmel_lcdc.h> 21#include <video/atmel_lcdc.h>
22 22
23#include <asm/arch/board.h> 23#include <mach/board.h>
24#include <asm/arch/gpio.h> 24#include <mach/gpio.h>
25#include <asm/arch/at91sam9261.h> 25#include <mach/at91sam9261.h>
26#include <asm/arch/at91sam9261_matrix.h> 26#include <mach/at91sam9261_matrix.h>
27#include <asm/arch/at91sam9_smc.h> 27#include <mach/at91sam9_smc.h>
28 28
29#include "generic.h" 29#include "generic.h"
30 30
diff --git a/arch/arm/mach-at91/at91sam9263.c b/arch/arm/mach-at91/at91sam9263.c
index 052074a9f2d3..80bfab5680e2 100644
--- a/arch/arm/mach-at91/at91sam9263.c
+++ b/arch/arm/mach-at91/at91sam9263.c
@@ -15,10 +15,10 @@
15 15
16#include <asm/mach/arch.h> 16#include <asm/mach/arch.h>
17#include <asm/mach/map.h> 17#include <asm/mach/map.h>
18#include <asm/arch/at91sam9263.h> 18#include <mach/at91sam9263.h>
19#include <asm/arch/at91_pmc.h> 19#include <mach/at91_pmc.h>
20#include <asm/arch/at91_rstc.h> 20#include <mach/at91_rstc.h>
21#include <asm/arch/at91_shdwc.h> 21#include <mach/at91_shdwc.h>
22 22
23#include "generic.h" 23#include "generic.h"
24#include "clock.h" 24#include "clock.h"
diff --git a/arch/arm/mach-at91/at91sam9263_devices.c b/arch/arm/mach-at91/at91sam9263_devices.c
index 42108d02f593..c93992f55dc9 100644
--- a/arch/arm/mach-at91/at91sam9263_devices.c
+++ b/arch/arm/mach-at91/at91sam9263_devices.c
@@ -19,11 +19,11 @@
19#include <linux/fb.h> 19#include <linux/fb.h>
20#include <video/atmel_lcdc.h> 20#include <video/atmel_lcdc.h>
21 21
22#include <asm/arch/board.h> 22#include <mach/board.h>
23#include <asm/arch/gpio.h> 23#include <mach/gpio.h>
24#include <asm/arch/at91sam9263.h> 24#include <mach/at91sam9263.h>
25#include <asm/arch/at91sam9263_matrix.h> 25#include <mach/at91sam9263_matrix.h>
26#include <asm/arch/at91sam9_smc.h> 26#include <mach/at91sam9_smc.h>
27 27
28#include "generic.h" 28#include "generic.h"
29 29
diff --git a/arch/arm/mach-at91/at91sam926x_time.c b/arch/arm/mach-at91/at91sam926x_time.c
index 5cecbd7de6a6..122fd77ed580 100644
--- a/arch/arm/mach-at91/at91sam926x_time.c
+++ b/arch/arm/mach-at91/at91sam926x_time.c
@@ -17,7 +17,7 @@
17 17
18#include <asm/mach/time.h> 18#include <asm/mach/time.h>
19 19
20#include <asm/arch/at91_pit.h> 20#include <mach/at91_pit.h>
21 21
22 22
23#define PIT_CPIV(x) ((x) & AT91_PIT_CPIV) 23#define PIT_CPIV(x) ((x) & AT91_PIT_CPIV)
diff --git a/arch/arm/mach-at91/at91sam9rl.c b/arch/arm/mach-at91/at91sam9rl.c
index 902c79893ec7..556bddf35b45 100644
--- a/arch/arm/mach-at91/at91sam9rl.c
+++ b/arch/arm/mach-at91/at91sam9rl.c
@@ -14,11 +14,11 @@
14 14
15#include <asm/mach/arch.h> 15#include <asm/mach/arch.h>
16#include <asm/mach/map.h> 16#include <asm/mach/map.h>
17#include <asm/arch/cpu.h> 17#include <mach/cpu.h>
18#include <asm/arch/at91sam9rl.h> 18#include <mach/at91sam9rl.h>
19#include <asm/arch/at91_pmc.h> 19#include <mach/at91_pmc.h>
20#include <asm/arch/at91_rstc.h> 20#include <mach/at91_rstc.h>
21#include <asm/arch/at91_shdwc.h> 21#include <mach/at91_shdwc.h>
22 22
23#include "generic.h" 23#include "generic.h"
24#include "clock.h" 24#include "clock.h"
diff --git a/arch/arm/mach-at91/at91sam9rl_devices.c b/arch/arm/mach-at91/at91sam9rl_devices.c
index 9c61576f1c8d..620886341fb5 100644
--- a/arch/arm/mach-at91/at91sam9rl_devices.c
+++ b/arch/arm/mach-at91/at91sam9rl_devices.c
@@ -16,11 +16,11 @@
16#include <linux/fb.h> 16#include <linux/fb.h>
17#include <video/atmel_lcdc.h> 17#include <video/atmel_lcdc.h>
18 18
19#include <asm/arch/board.h> 19#include <mach/board.h>
20#include <asm/arch/gpio.h> 20#include <mach/gpio.h>
21#include <asm/arch/at91sam9rl.h> 21#include <mach/at91sam9rl.h>
22#include <asm/arch/at91sam9rl_matrix.h> 22#include <mach/at91sam9rl_matrix.h>
23#include <asm/arch/at91sam9_smc.h> 23#include <mach/at91sam9_smc.h>
24 24
25#include "generic.h" 25#include "generic.h"
26 26
diff --git a/arch/arm/mach-at91/at91x40.c b/arch/arm/mach-at91/at91x40.c
index f44647738ee4..ad3ec85b2790 100644
--- a/arch/arm/mach-at91/at91x40.c
+++ b/arch/arm/mach-at91/at91x40.c
@@ -14,9 +14,9 @@
14#include <linux/init.h> 14#include <linux/init.h>
15#include <linux/irq.h> 15#include <linux/irq.h>
16#include <asm/mach/arch.h> 16#include <asm/mach/arch.h>
17#include <asm/arch/at91x40.h> 17#include <mach/at91x40.h>
18#include <asm/arch/at91_st.h> 18#include <mach/at91_st.h>
19#include <asm/arch/timex.h> 19#include <mach/timex.h>
20#include "generic.h" 20#include "generic.h"
21 21
22/* 22/*
diff --git a/arch/arm/mach-at91/at91x40_time.c b/arch/arm/mach-at91/at91x40_time.c
index eddc882f1b4a..869b5e28d195 100644
--- a/arch/arm/mach-at91/at91x40_time.c
+++ b/arch/arm/mach-at91/at91x40_time.c
@@ -23,10 +23,10 @@
23#include <linux/interrupt.h> 23#include <linux/interrupt.h>
24#include <linux/irq.h> 24#include <linux/irq.h>
25#include <linux/time.h> 25#include <linux/time.h>
26#include <asm/hardware.h> 26#include <mach/hardware.h>
27#include <asm/io.h> 27#include <asm/io.h>
28#include <asm/mach/time.h> 28#include <asm/mach/time.h>
29#include <asm/arch/at91_tc.h> 29#include <mach/at91_tc.h>
30 30
31/* 31/*
32 * 3 counter/timer units present. 32 * 3 counter/timer units present.
diff --git a/arch/arm/mach-at91/board-1arm.c b/arch/arm/mach-at91/board-1arm.c
index 2d3d4b6f7b02..9b27d167bff0 100644
--- a/arch/arm/mach-at91/board-1arm.c
+++ b/arch/arm/mach-at91/board-1arm.c
@@ -24,7 +24,7 @@
24#include <linux/module.h> 24#include <linux/module.h>
25#include <linux/platform_device.h> 25#include <linux/platform_device.h>
26 26
27#include <asm/hardware.h> 27#include <mach/hardware.h>
28#include <asm/setup.h> 28#include <asm/setup.h>
29#include <asm/mach-types.h> 29#include <asm/mach-types.h>
30#include <asm/irq.h> 30#include <asm/irq.h>
@@ -33,8 +33,8 @@
33#include <asm/mach/map.h> 33#include <asm/mach/map.h>
34#include <asm/mach/irq.h> 34#include <asm/mach/irq.h>
35 35
36#include <asm/arch/board.h> 36#include <mach/board.h>
37#include <asm/arch/gpio.h> 37#include <mach/gpio.h>
38 38
39#include "generic.h" 39#include "generic.h"
40 40
diff --git a/arch/arm/mach-at91/board-cam60.c b/arch/arm/mach-at91/board-cam60.c
index af2c33aff1a8..cdddca54b938 100644
--- a/arch/arm/mach-at91/board-cam60.c
+++ b/arch/arm/mach-at91/board-cam60.c
@@ -28,7 +28,7 @@
28#include <linux/spi/spi.h> 28#include <linux/spi/spi.h>
29#include <linux/spi/flash.h> 29#include <linux/spi/flash.h>
30 30
31#include <asm/hardware.h> 31#include <mach/hardware.h>
32#include <asm/setup.h> 32#include <asm/setup.h>
33#include <asm/mach-types.h> 33#include <asm/mach-types.h>
34#include <asm/irq.h> 34#include <asm/irq.h>
@@ -37,8 +37,8 @@
37#include <asm/mach/map.h> 37#include <asm/mach/map.h>
38#include <asm/mach/irq.h> 38#include <asm/mach/irq.h>
39 39
40#include <asm/arch/board.h> 40#include <mach/board.h>
41#include <asm/arch/gpio.h> 41#include <mach/gpio.h>
42 42
43#include "generic.h" 43#include "generic.h"
44 44
diff --git a/arch/arm/mach-at91/board-cap9adk.c b/arch/arm/mach-at91/board-cap9adk.c
index 1f4725972edc..196199552eb6 100644
--- a/arch/arm/mach-at91/board-cap9adk.c
+++ b/arch/arm/mach-at91/board-cap9adk.c
@@ -33,7 +33,7 @@
33 33
34#include <video/atmel_lcdc.h> 34#include <video/atmel_lcdc.h>
35 35
36#include <asm/hardware.h> 36#include <mach/hardware.h>
37#include <asm/setup.h> 37#include <asm/setup.h>
38#include <asm/mach-types.h> 38#include <asm/mach-types.h>
39#include <asm/irq.h> 39#include <asm/irq.h>
@@ -42,10 +42,10 @@
42#include <asm/mach/map.h> 42#include <asm/mach/map.h>
43#include <asm/mach/irq.h> 43#include <asm/mach/irq.h>
44 44
45#include <asm/arch/board.h> 45#include <mach/board.h>
46#include <asm/arch/gpio.h> 46#include <mach/gpio.h>
47#include <asm/arch/at91cap9_matrix.h> 47#include <mach/at91cap9_matrix.h>
48#include <asm/arch/at91sam9_smc.h> 48#include <mach/at91sam9_smc.h>
49 49
50#include "generic.h" 50#include "generic.h"
51 51
diff --git a/arch/arm/mach-at91/board-carmeva.c b/arch/arm/mach-at91/board-carmeva.c
index 9854fc3dd1f2..afa1ff0e9577 100644
--- a/arch/arm/mach-at91/board-carmeva.c
+++ b/arch/arm/mach-at91/board-carmeva.c
@@ -25,7 +25,7 @@
25#include <linux/module.h> 25#include <linux/module.h>
26#include <linux/platform_device.h> 26#include <linux/platform_device.h>
27 27
28#include <asm/hardware.h> 28#include <mach/hardware.h>
29#include <asm/setup.h> 29#include <asm/setup.h>
30#include <asm/mach-types.h> 30#include <asm/mach-types.h>
31#include <asm/irq.h> 31#include <asm/irq.h>
@@ -34,8 +34,8 @@
34#include <asm/mach/map.h> 34#include <asm/mach/map.h>
35#include <asm/mach/irq.h> 35#include <asm/mach/irq.h>
36 36
37#include <asm/arch/board.h> 37#include <mach/board.h>
38#include <asm/arch/gpio.h> 38#include <mach/gpio.h>
39 39
40#include "generic.h" 40#include "generic.h"
41 41
diff --git a/arch/arm/mach-at91/board-csb337.c b/arch/arm/mach-at91/board-csb337.c
index 81f1ebb4e964..cb7c9a8fa487 100644
--- a/arch/arm/mach-at91/board-csb337.c
+++ b/arch/arm/mach-at91/board-csb337.c
@@ -28,7 +28,7 @@
28#include <linux/input.h> 28#include <linux/input.h>
29#include <linux/gpio_keys.h> 29#include <linux/gpio_keys.h>
30 30
31#include <asm/hardware.h> 31#include <mach/hardware.h>
32#include <asm/setup.h> 32#include <asm/setup.h>
33#include <asm/mach-types.h> 33#include <asm/mach-types.h>
34#include <asm/irq.h> 34#include <asm/irq.h>
@@ -37,8 +37,8 @@
37#include <asm/mach/map.h> 37#include <asm/mach/map.h>
38#include <asm/mach/irq.h> 38#include <asm/mach/irq.h>
39 39
40#include <asm/arch/board.h> 40#include <mach/board.h>
41#include <asm/arch/gpio.h> 41#include <mach/gpio.h>
42 42
43#include "generic.h" 43#include "generic.h"
44 44
diff --git a/arch/arm/mach-at91/board-csb637.c b/arch/arm/mach-at91/board-csb637.c
index bb1a5474ddab..8db8bd8babd9 100644
--- a/arch/arm/mach-at91/board-csb637.c
+++ b/arch/arm/mach-at91/board-csb637.c
@@ -25,7 +25,7 @@
25#include <linux/platform_device.h> 25#include <linux/platform_device.h>
26#include <linux/mtd/physmap.h> 26#include <linux/mtd/physmap.h>
27 27
28#include <asm/hardware.h> 28#include <mach/hardware.h>
29#include <asm/setup.h> 29#include <asm/setup.h>
30#include <asm/mach-types.h> 30#include <asm/mach-types.h>
31#include <asm/irq.h> 31#include <asm/irq.h>
@@ -34,8 +34,8 @@
34#include <asm/mach/map.h> 34#include <asm/mach/map.h>
35#include <asm/mach/irq.h> 35#include <asm/mach/irq.h>
36 36
37#include <asm/arch/board.h> 37#include <mach/board.h>
38#include <asm/arch/gpio.h> 38#include <mach/gpio.h>
39 39
40#include "generic.h" 40#include "generic.h"
41 41
diff --git a/arch/arm/mach-at91/board-dk.c b/arch/arm/mach-at91/board-dk.c
index 02a70b2f355b..43e1aa7ecef7 100644
--- a/arch/arm/mach-at91/board-dk.c
+++ b/arch/arm/mach-at91/board-dk.c
@@ -29,7 +29,7 @@
29#include <linux/spi/spi.h> 29#include <linux/spi/spi.h>
30#include <linux/mtd/physmap.h> 30#include <linux/mtd/physmap.h>
31 31
32#include <asm/hardware.h> 32#include <mach/hardware.h>
33#include <asm/setup.h> 33#include <asm/setup.h>
34#include <asm/mach-types.h> 34#include <asm/mach-types.h>
35#include <asm/irq.h> 35#include <asm/irq.h>
@@ -38,9 +38,9 @@
38#include <asm/mach/map.h> 38#include <asm/mach/map.h>
39#include <asm/mach/irq.h> 39#include <asm/mach/irq.h>
40 40
41#include <asm/arch/board.h> 41#include <mach/board.h>
42#include <asm/arch/gpio.h> 42#include <mach/gpio.h>
43#include <asm/arch/at91rm9200_mc.h> 43#include <mach/at91rm9200_mc.h>
44 44
45#include "generic.h" 45#include "generic.h"
46 46
diff --git a/arch/arm/mach-at91/board-eb01.c b/arch/arm/mach-at91/board-eb01.c
index 0c1e3858e7df..1f9d3cb64c50 100644
--- a/arch/arm/mach-at91/board-eb01.c
+++ b/arch/arm/mach-at91/board-eb01.c
@@ -24,10 +24,10 @@
24#include <linux/platform_device.h> 24#include <linux/platform_device.h>
25#include <linux/irq.h> 25#include <linux/irq.h>
26#include <asm/mach-types.h> 26#include <asm/mach-types.h>
27#include <asm/hardware.h> 27#include <mach/hardware.h>
28#include <asm/mach/arch.h> 28#include <asm/mach/arch.h>
29#include <asm/mach/map.h> 29#include <asm/mach/map.h>
30#include <asm/arch/board.h> 30#include <mach/board.h>
31#include "generic.h" 31#include "generic.h"
32 32
33static void __init at91eb01_map_io(void) 33static void __init at91eb01_map_io(void)
diff --git a/arch/arm/mach-at91/board-eb9200.c b/arch/arm/mach-at91/board-eb9200.c
index 3fe054e0056b..528656761ff7 100644
--- a/arch/arm/mach-at91/board-eb9200.c
+++ b/arch/arm/mach-at91/board-eb9200.c
@@ -25,7 +25,7 @@
25#include <linux/module.h> 25#include <linux/module.h>
26#include <linux/device.h> 26#include <linux/device.h>
27 27
28#include <asm/hardware.h> 28#include <mach/hardware.h>
29#include <asm/setup.h> 29#include <asm/setup.h>
30#include <asm/mach-types.h> 30#include <asm/mach-types.h>
31#include <asm/irq.h> 31#include <asm/irq.h>
@@ -34,8 +34,8 @@
34#include <asm/mach/map.h> 34#include <asm/mach/map.h>
35#include <asm/mach/irq.h> 35#include <asm/mach/irq.h>
36 36
37#include <asm/arch/board.h> 37#include <mach/board.h>
38#include <asm/arch/gpio.h> 38#include <mach/gpio.h>
39 39
40#include "generic.h" 40#include "generic.h"
41 41
diff --git a/arch/arm/mach-at91/board-ecbat91.c b/arch/arm/mach-at91/board-ecbat91.c
index e77fad443835..bfeee8a2af28 100644
--- a/arch/arm/mach-at91/board-ecbat91.c
+++ b/arch/arm/mach-at91/board-ecbat91.c
@@ -27,7 +27,7 @@
27#include <linux/spi/spi.h> 27#include <linux/spi/spi.h>
28#include <linux/spi/flash.h> 28#include <linux/spi/flash.h>
29 29
30#include <asm/hardware.h> 30#include <mach/hardware.h>
31#include <asm/setup.h> 31#include <asm/setup.h>
32#include <asm/mach-types.h> 32#include <asm/mach-types.h>
33#include <asm/irq.h> 33#include <asm/irq.h>
@@ -36,8 +36,8 @@
36#include <asm/mach/map.h> 36#include <asm/mach/map.h>
37#include <asm/mach/irq.h> 37#include <asm/mach/irq.h>
38 38
39#include <asm/arch/board.h> 39#include <mach/board.h>
40#include <asm/arch/gpio.h> 40#include <mach/gpio.h>
41 41
42#include "generic.h" 42#include "generic.h"
43 43
diff --git a/arch/arm/mach-at91/board-ek.c b/arch/arm/mach-at91/board-ek.c
index 74aa4325eab3..60626e7a3490 100644
--- a/arch/arm/mach-at91/board-ek.c
+++ b/arch/arm/mach-at91/board-ek.c
@@ -29,7 +29,7 @@
29#include <linux/spi/spi.h> 29#include <linux/spi/spi.h>
30#include <linux/mtd/physmap.h> 30#include <linux/mtd/physmap.h>
31 31
32#include <asm/hardware.h> 32#include <mach/hardware.h>
33#include <asm/setup.h> 33#include <asm/setup.h>
34#include <asm/mach-types.h> 34#include <asm/mach-types.h>
35#include <asm/irq.h> 35#include <asm/irq.h>
@@ -38,9 +38,9 @@
38#include <asm/mach/map.h> 38#include <asm/mach/map.h>
39#include <asm/mach/irq.h> 39#include <asm/mach/irq.h>
40 40
41#include <asm/arch/board.h> 41#include <mach/board.h>
42#include <asm/arch/gpio.h> 42#include <mach/gpio.h>
43#include <asm/arch/at91rm9200_mc.h> 43#include <mach/at91rm9200_mc.h>
44 44
45#include "generic.h" 45#include "generic.h"
46 46
diff --git a/arch/arm/mach-at91/board-kafa.c b/arch/arm/mach-at91/board-kafa.c
index cf1b7b2f76fb..a87956c0a74f 100644
--- a/arch/arm/mach-at91/board-kafa.c
+++ b/arch/arm/mach-at91/board-kafa.c
@@ -24,7 +24,7 @@
24#include <linux/module.h> 24#include <linux/module.h>
25#include <linux/platform_device.h> 25#include <linux/platform_device.h>
26 26
27#include <asm/hardware.h> 27#include <mach/hardware.h>
28#include <asm/setup.h> 28#include <asm/setup.h>
29#include <asm/mach-types.h> 29#include <asm/mach-types.h>
30#include <asm/irq.h> 30#include <asm/irq.h>
@@ -33,8 +33,8 @@
33#include <asm/mach/map.h> 33#include <asm/mach/map.h>
34#include <asm/mach/irq.h> 34#include <asm/mach/irq.h>
35 35
36#include <asm/arch/board.h> 36#include <mach/board.h>
37#include <asm/arch/gpio.h> 37#include <mach/gpio.h>
38 38
39#include "generic.h" 39#include "generic.h"
40 40
diff --git a/arch/arm/mach-at91/board-kb9202.c b/arch/arm/mach-at91/board-kb9202.c
index 082ed59365a4..fe9b9913fa3c 100644
--- a/arch/arm/mach-at91/board-kb9202.c
+++ b/arch/arm/mach-at91/board-kb9202.c
@@ -25,7 +25,7 @@
25#include <linux/module.h> 25#include <linux/module.h>
26#include <linux/platform_device.h> 26#include <linux/platform_device.h>
27 27
28#include <asm/hardware.h> 28#include <mach/hardware.h>
29#include <asm/setup.h> 29#include <asm/setup.h>
30#include <asm/mach-types.h> 30#include <asm/mach-types.h>
31#include <asm/irq.h> 31#include <asm/irq.h>
@@ -34,10 +34,10 @@
34#include <asm/mach/map.h> 34#include <asm/mach/map.h>
35#include <asm/mach/irq.h> 35#include <asm/mach/irq.h>
36 36
37#include <asm/arch/board.h> 37#include <mach/board.h>
38#include <asm/arch/gpio.h> 38#include <mach/gpio.h>
39 39
40#include <asm/arch/at91rm9200_mc.h> 40#include <mach/at91rm9200_mc.h>
41 41
42#include "generic.h" 42#include "generic.h"
43 43
diff --git a/arch/arm/mach-at91/board-picotux200.c b/arch/arm/mach-at91/board-picotux200.c
index 6acb55c09ae5..dbc912d633c7 100644
--- a/arch/arm/mach-at91/board-picotux200.c
+++ b/arch/arm/mach-at91/board-picotux200.c
@@ -27,7 +27,7 @@
27#include <linux/spi/spi.h> 27#include <linux/spi/spi.h>
28#include <linux/mtd/physmap.h> 28#include <linux/mtd/physmap.h>
29 29
30#include <asm/hardware.h> 30#include <mach/hardware.h>
31#include <asm/setup.h> 31#include <asm/setup.h>
32#include <asm/mach-types.h> 32#include <asm/mach-types.h>
33#include <asm/irq.h> 33#include <asm/irq.h>
@@ -36,9 +36,9 @@
36#include <asm/mach/map.h> 36#include <asm/mach/map.h>
37#include <asm/mach/irq.h> 37#include <asm/mach/irq.h>
38 38
39#include <asm/arch/board.h> 39#include <mach/board.h>
40#include <asm/arch/gpio.h> 40#include <mach/gpio.h>
41#include <asm/arch/at91rm9200_mc.h> 41#include <mach/at91rm9200_mc.h>
42 42
43#include "generic.h" 43#include "generic.h"
44 44
diff --git a/arch/arm/mach-at91/board-qil-a9260.c b/arch/arm/mach-at91/board-qil-a9260.c
index 33b1ccdb516d..4c28413426c2 100644
--- a/arch/arm/mach-at91/board-qil-a9260.c
+++ b/arch/arm/mach-at91/board-qil-a9260.c
@@ -30,7 +30,7 @@
30#include <linux/input.h> 30#include <linux/input.h>
31#include <linux/clk.h> 31#include <linux/clk.h>
32 32
33#include <asm/hardware.h> 33#include <mach/hardware.h>
34#include <asm/setup.h> 34#include <asm/setup.h>
35#include <asm/mach-types.h> 35#include <asm/mach-types.h>
36#include <asm/irq.h> 36#include <asm/irq.h>
@@ -39,9 +39,9 @@
39#include <asm/mach/map.h> 39#include <asm/mach/map.h>
40#include <asm/mach/irq.h> 40#include <asm/mach/irq.h>
41 41
42#include <asm/arch/board.h> 42#include <mach/board.h>
43#include <asm/arch/gpio.h> 43#include <mach/gpio.h>
44#include <asm/arch/at91_shdwc.h> 44#include <mach/at91_shdwc.h>
45 45
46#include "generic.h" 46#include "generic.h"
47 47
diff --git a/arch/arm/mach-at91/board-sam9-l9260.c b/arch/arm/mach-at91/board-sam9-l9260.c
index 3cd5f8d0e2e2..e4910cb26c16 100644
--- a/arch/arm/mach-at91/board-sam9-l9260.c
+++ b/arch/arm/mach-at91/board-sam9-l9260.c
@@ -27,7 +27,7 @@
27#include <linux/platform_device.h> 27#include <linux/platform_device.h>
28#include <linux/spi/spi.h> 28#include <linux/spi/spi.h>
29 29
30#include <asm/hardware.h> 30#include <mach/hardware.h>
31#include <asm/setup.h> 31#include <asm/setup.h>
32#include <asm/mach-types.h> 32#include <asm/mach-types.h>
33#include <asm/irq.h> 33#include <asm/irq.h>
@@ -36,8 +36,8 @@
36#include <asm/mach/map.h> 36#include <asm/mach/map.h>
37#include <asm/mach/irq.h> 37#include <asm/mach/irq.h>
38 38
39#include <asm/arch/board.h> 39#include <mach/board.h>
40#include <asm/arch/gpio.h> 40#include <mach/gpio.h>
41 41
42#include "generic.h" 42#include "generic.h"
43 43
diff --git a/arch/arm/mach-at91/board-sam9260ek.c b/arch/arm/mach-at91/board-sam9260ek.c
index daf93a588068..cb20e70b3b06 100644
--- a/arch/arm/mach-at91/board-sam9260ek.c
+++ b/arch/arm/mach-at91/board-sam9260ek.c
@@ -28,7 +28,7 @@
28#include <linux/spi/at73c213.h> 28#include <linux/spi/at73c213.h>
29#include <linux/clk.h> 29#include <linux/clk.h>
30 30
31#include <asm/hardware.h> 31#include <mach/hardware.h>
32#include <asm/setup.h> 32#include <asm/setup.h>
33#include <asm/mach-types.h> 33#include <asm/mach-types.h>
34#include <asm/irq.h> 34#include <asm/irq.h>
@@ -37,8 +37,8 @@
37#include <asm/mach/map.h> 37#include <asm/mach/map.h>
38#include <asm/mach/irq.h> 38#include <asm/mach/irq.h>
39 39
40#include <asm/arch/board.h> 40#include <mach/board.h>
41#include <asm/arch/gpio.h> 41#include <mach/gpio.h>
42 42
43#include "generic.h" 43#include "generic.h"
44 44
diff --git a/arch/arm/mach-at91/board-sam9261ek.c b/arch/arm/mach-at91/board-sam9261ek.c
index 12bf527f93be..1a9963b811c7 100644
--- a/arch/arm/mach-at91/board-sam9261ek.c
+++ b/arch/arm/mach-at91/board-sam9261ek.c
@@ -35,7 +35,7 @@
35 35
36#include <video/atmel_lcdc.h> 36#include <video/atmel_lcdc.h>
37 37
38#include <asm/hardware.h> 38#include <mach/hardware.h>
39#include <asm/setup.h> 39#include <asm/setup.h>
40#include <asm/mach-types.h> 40#include <asm/mach-types.h>
41#include <asm/irq.h> 41#include <asm/irq.h>
@@ -44,9 +44,9 @@
44#include <asm/mach/map.h> 44#include <asm/mach/map.h>
45#include <asm/mach/irq.h> 45#include <asm/mach/irq.h>
46 46
47#include <asm/arch/board.h> 47#include <mach/board.h>
48#include <asm/arch/gpio.h> 48#include <mach/gpio.h>
49#include <asm/arch/at91sam9_smc.h> 49#include <mach/at91sam9_smc.h>
50 50
51#include "generic.h" 51#include "generic.h"
52 52
diff --git a/arch/arm/mach-at91/board-sam9263ek.c b/arch/arm/mach-at91/board-sam9263ek.c
index 63121197f8c9..b1d11960a735 100644
--- a/arch/arm/mach-at91/board-sam9263ek.c
+++ b/arch/arm/mach-at91/board-sam9263ek.c
@@ -32,7 +32,7 @@
32 32
33#include <video/atmel_lcdc.h> 33#include <video/atmel_lcdc.h>
34 34
35#include <asm/hardware.h> 35#include <mach/hardware.h>
36#include <asm/setup.h> 36#include <asm/setup.h>
37#include <asm/mach-types.h> 37#include <asm/mach-types.h>
38#include <asm/irq.h> 38#include <asm/irq.h>
@@ -41,9 +41,9 @@
41#include <asm/mach/map.h> 41#include <asm/mach/map.h>
42#include <asm/mach/irq.h> 42#include <asm/mach/irq.h>
43 43
44#include <asm/arch/board.h> 44#include <mach/board.h>
45#include <asm/arch/gpio.h> 45#include <mach/gpio.h>
46#include <asm/arch/at91sam9_smc.h> 46#include <mach/at91sam9_smc.h>
47 47
48#include "generic.h" 48#include "generic.h"
49 49
diff --git a/arch/arm/mach-at91/board-sam9g20ek.c b/arch/arm/mach-at91/board-sam9g20ek.c
index e0c07952cc34..d4eba5c0ce02 100644
--- a/arch/arm/mach-at91/board-sam9g20ek.c
+++ b/arch/arm/mach-at91/board-sam9g20ek.c
@@ -26,7 +26,7 @@
26#include <linux/spi/at73c213.h> 26#include <linux/spi/at73c213.h>
27#include <linux/clk.h> 27#include <linux/clk.h>
28 28
29#include <asm/hardware.h> 29#include <mach/hardware.h>
30#include <asm/setup.h> 30#include <asm/setup.h>
31#include <asm/mach-types.h> 31#include <asm/mach-types.h>
32#include <asm/irq.h> 32#include <asm/irq.h>
@@ -35,8 +35,8 @@
35#include <asm/mach/map.h> 35#include <asm/mach/map.h>
36#include <asm/mach/irq.h> 36#include <asm/mach/irq.h>
37 37
38#include <asm/arch/board.h> 38#include <mach/board.h>
39#include <asm/arch/gpio.h> 39#include <mach/gpio.h>
40 40
41#include "generic.h" 41#include "generic.h"
42 42
diff --git a/arch/arm/mach-at91/board-sam9rlek.c b/arch/arm/mach-at91/board-sam9rlek.c
index 66e77bb2e079..c6dce49c388c 100644
--- a/arch/arm/mach-at91/board-sam9rlek.c
+++ b/arch/arm/mach-at91/board-sam9rlek.c
@@ -18,7 +18,7 @@
18 18
19#include <video/atmel_lcdc.h> 19#include <video/atmel_lcdc.h>
20 20
21#include <asm/hardware.h> 21#include <mach/hardware.h>
22#include <asm/setup.h> 22#include <asm/setup.h>
23#include <asm/mach-types.h> 23#include <asm/mach-types.h>
24#include <asm/irq.h> 24#include <asm/irq.h>
@@ -27,9 +27,9 @@
27#include <asm/mach/map.h> 27#include <asm/mach/map.h>
28#include <asm/mach/irq.h> 28#include <asm/mach/irq.h>
29 29
30#include <asm/arch/board.h> 30#include <mach/board.h>
31#include <asm/arch/gpio.h> 31#include <mach/gpio.h>
32#include <asm/arch/at91sam9_smc.h> 32#include <mach/at91sam9_smc.h>
33 33
34#include "generic.h" 34#include "generic.h"
35 35
diff --git a/arch/arm/mach-at91/board-usb-a9260.c b/arch/arm/mach-at91/board-usb-a9260.c
index 2f4ecac150d9..f9d0b65da40b 100644
--- a/arch/arm/mach-at91/board-usb-a9260.c
+++ b/arch/arm/mach-at91/board-usb-a9260.c
@@ -30,7 +30,7 @@
30#include <linux/input.h> 30#include <linux/input.h>
31#include <linux/clk.h> 31#include <linux/clk.h>
32 32
33#include <asm/hardware.h> 33#include <mach/hardware.h>
34#include <asm/setup.h> 34#include <asm/setup.h>
35#include <asm/mach-types.h> 35#include <asm/mach-types.h>
36#include <asm/irq.h> 36#include <asm/irq.h>
@@ -39,9 +39,9 @@
39#include <asm/mach/map.h> 39#include <asm/mach/map.h>
40#include <asm/mach/irq.h> 40#include <asm/mach/irq.h>
41 41
42#include <asm/arch/board.h> 42#include <mach/board.h>
43#include <asm/arch/gpio.h> 43#include <mach/gpio.h>
44#include <asm/arch/at91_shdwc.h> 44#include <mach/at91_shdwc.h>
45 45
46#include "generic.h" 46#include "generic.h"
47 47
diff --git a/arch/arm/mach-at91/board-usb-a9263.c b/arch/arm/mach-at91/board-usb-a9263.c
index 0e9649d3eda1..673e5c27214d 100644
--- a/arch/arm/mach-at91/board-usb-a9263.c
+++ b/arch/arm/mach-at91/board-usb-a9263.c
@@ -29,7 +29,7 @@
29#include <linux/gpio_keys.h> 29#include <linux/gpio_keys.h>
30#include <linux/input.h> 30#include <linux/input.h>
31 31
32#include <asm/hardware.h> 32#include <mach/hardware.h>
33#include <asm/setup.h> 33#include <asm/setup.h>
34#include <asm/mach-types.h> 34#include <asm/mach-types.h>
35#include <asm/irq.h> 35#include <asm/irq.h>
@@ -38,9 +38,9 @@
38#include <asm/mach/map.h> 38#include <asm/mach/map.h>
39#include <asm/mach/irq.h> 39#include <asm/mach/irq.h>
40 40
41#include <asm/arch/board.h> 41#include <mach/board.h>
42#include <asm/arch/gpio.h> 42#include <mach/gpio.h>
43#include <asm/arch/at91_shdwc.h> 43#include <mach/at91_shdwc.h>
44 44
45#include "generic.h" 45#include "generic.h"
46 46
diff --git a/arch/arm/mach-at91/board-yl-9200.c b/arch/arm/mach-at91/board-yl-9200.c
index bbbfd06f5e0c..36b380aad006 100644
--- a/arch/arm/mach-at91/board-yl-9200.c
+++ b/arch/arm/mach-at91/board-yl-9200.c
@@ -33,7 +33,7 @@
33#include <linux/gpio_keys.h> 33#include <linux/gpio_keys.h>
34#include <linux/input.h> 34#include <linux/input.h>
35 35
36#include <asm/hardware.h> 36#include <mach/hardware.h>
37#include <asm/setup.h> 37#include <asm/setup.h>
38#include <asm/mach-types.h> 38#include <asm/mach-types.h>
39#include <asm/irq.h> 39#include <asm/irq.h>
@@ -42,9 +42,9 @@
42#include <asm/mach/map.h> 42#include <asm/mach/map.h>
43#include <asm/mach/irq.h> 43#include <asm/mach/irq.h>
44 44
45#include <asm/arch/board.h> 45#include <mach/board.h>
46#include <asm/arch/gpio.h> 46#include <mach/gpio.h>
47#include <asm/arch/at91rm9200_mc.h> 47#include <mach/at91rm9200_mc.h>
48 48
49#include "generic.h" 49#include "generic.h"
50 50
diff --git a/arch/arm/mach-at91/clock.c b/arch/arm/mach-at91/clock.c
index 464bdbbf74df..f5c2847161f5 100644
--- a/arch/arm/mach-at91/clock.c
+++ b/arch/arm/mach-at91/clock.c
@@ -24,11 +24,10 @@
24#include <linux/clk.h> 24#include <linux/clk.h>
25 25
26#include <asm/io.h> 26#include <asm/io.h>
27#include <asm/mach-types.h>
28 27
29#include <asm/hardware.h> 28#include <mach/hardware.h>
30#include <asm/arch/at91_pmc.h> 29#include <mach/at91_pmc.h>
31#include <asm/arch/cpu.h> 30#include <mach/cpu.h>
32 31
33#include "clock.h" 32#include "clock.h"
34 33
diff --git a/arch/arm/mach-at91/gpio.c b/arch/arm/mach-at91/gpio.c
index ee4964abcaf5..8392d5b517f1 100644
--- a/arch/arm/mach-at91/gpio.c
+++ b/arch/arm/mach-at91/gpio.c
@@ -20,9 +20,9 @@
20#include <linux/module.h> 20#include <linux/module.h>
21 21
22#include <asm/io.h> 22#include <asm/io.h>
23#include <asm/hardware.h> 23#include <mach/hardware.h>
24#include <asm/arch/at91_pio.h> 24#include <mach/at91_pio.h>
25#include <asm/arch/gpio.h> 25#include <mach/gpio.h>
26 26
27#include "generic.h" 27#include "generic.h"
28 28
diff --git a/arch/arm/mach-at91/include/mach/at91_adc.h b/arch/arm/mach-at91/include/mach/at91_adc.h
new file mode 100644
index 000000000000..8e7ed5c90817
--- /dev/null
+++ b/arch/arm/mach-at91/include/mach/at91_adc.h
@@ -0,0 +1,61 @@
1/*
2 * arch/arm/mach-at91/include/mach/at91_adc.h
3 *
4 * Copyright (C) SAN People
5 *
6 * Analog-to-Digital Converter (ADC) registers.
7 * Based on AT91SAM9260 datasheet revision D.
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 */
14
15#ifndef AT91_ADC_H
16#define AT91_ADC_H
17
18#define AT91_ADC_CR 0x00 /* Control Register */
19#define AT91_ADC_SWRST (1 << 0) /* Software Reset */
20#define AT91_ADC_START (1 << 1) /* Start Conversion */
21
22#define AT91_ADC_MR 0x04 /* Mode Register */
23#define AT91_ADC_TRGEN (1 << 0) /* Trigger Enable */
24#define AT91_ADC_TRGSEL (7 << 1) /* Trigger Selection */
25#define AT91_ADC_TRGSEL_TC0 (0 << 1)
26#define AT91_ADC_TRGSEL_TC1 (1 << 1)
27#define AT91_ADC_TRGSEL_TC2 (2 << 1)
28#define AT91_ADC_TRGSEL_EXTERNAL (6 << 1)
29#define AT91_ADC_LOWRES (1 << 4) /* Low Resolution */
30#define AT91_ADC_SLEEP (1 << 5) /* Sleep Mode */
31#define AT91_ADC_PRESCAL (0x3f << 8) /* Prescalar Rate Selection */
32#define AT91_ADC_PRESCAL_(x) ((x) << 8)
33#define AT91_ADC_STARTUP (0x1f << 16) /* Startup Up Time */
34#define AT91_ADC_STARTUP_(x) ((x) << 16)
35#define AT91_ADC_SHTIM (0xf << 24) /* Sample & Hold Time */
36#define AT91_ADC_SHTIM_(x) ((x) << 24)
37
38#define AT91_ADC_CHER 0x10 /* Channel Enable Register */
39#define AT91_ADC_CHDR 0x14 /* Channel Disable Register */
40#define AT91_ADC_CHSR 0x18 /* Channel Status Register */
41#define AT91_ADC_CH(n) (1 << (n)) /* Channel Number */
42
43#define AT91_ADC_SR 0x1C /* Status Register */
44#define AT91_ADC_EOC(n) (1 << (n)) /* End of Conversion on Channel N */
45#define AT91_ADC_OVRE(n) (1 << ((n) + 8))/* Overrun Error on Channel N */
46#define AT91_ADC_DRDY (1 << 16) /* Data Ready */
47#define AT91_ADC_GOVRE (1 << 17) /* General Overrun Error */
48#define AT91_ADC_ENDRX (1 << 18) /* End of RX Buffer */
49#define AT91_ADC_RXFUFF (1 << 19) /* RX Buffer Full */
50
51#define AT91_ADC_LCDR 0x20 /* Last Converted Data Register */
52#define AT91_ADC_LDATA (0x3ff)
53
54#define AT91_ADC_IER 0x24 /* Interrupt Enable Register */
55#define AT91_ADC_IDR 0x28 /* Interrupt Disable Register */
56#define AT91_ADC_IMR 0x2C /* Interrupt Mask Register */
57
58#define AT91_ADC_CHR(n) (0x30 + ((n) * 4)) /* Channel Data Register N */
59#define AT91_ADC_DATA (0x3ff)
60
61#endif
diff --git a/arch/arm/mach-at91/include/mach/at91_aic.h b/arch/arm/mach-at91/include/mach/at91_aic.h
new file mode 100644
index 000000000000..03566799d3be
--- /dev/null
+++ b/arch/arm/mach-at91/include/mach/at91_aic.h
@@ -0,0 +1,53 @@
1/*
2 * arch/arm/mach-at91/include/mach/at91_aic.h
3 *
4 * Copyright (C) 2005 Ivan Kokshaysky
5 * Copyright (C) SAN People
6 *
7 * Advanced Interrupt Controller (AIC) - System peripherals registers.
8 * Based on AT91RM9200 datasheet revision E.
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 */
15
16#ifndef AT91_AIC_H
17#define AT91_AIC_H
18
19#define AT91_AIC_SMR(n) (AT91_AIC + ((n) * 4)) /* Source Mode Registers 0-31 */
20#define AT91_AIC_PRIOR (7 << 0) /* Priority Level */
21#define AT91_AIC_SRCTYPE (3 << 5) /* Interrupt Source Type */
22#define AT91_AIC_SRCTYPE_LOW (0 << 5)
23#define AT91_AIC_SRCTYPE_FALLING (1 << 5)
24#define AT91_AIC_SRCTYPE_HIGH (2 << 5)
25#define AT91_AIC_SRCTYPE_RISING (3 << 5)
26
27#define AT91_AIC_SVR(n) (AT91_AIC + 0x80 + ((n) * 4)) /* Source Vector Registers 0-31 */
28#define AT91_AIC_IVR (AT91_AIC + 0x100) /* Interrupt Vector Register */
29#define AT91_AIC_FVR (AT91_AIC + 0x104) /* Fast Interrupt Vector Register */
30#define AT91_AIC_ISR (AT91_AIC + 0x108) /* Interrupt Status Register */
31#define AT91_AIC_IRQID (0x1f << 0) /* Current Interrupt Identifier */
32
33#define AT91_AIC_IPR (AT91_AIC + 0x10c) /* Interrupt Pending Register */
34#define AT91_AIC_IMR (AT91_AIC + 0x110) /* Interrupt Mask Register */
35#define AT91_AIC_CISR (AT91_AIC + 0x114) /* Core Interrupt Status Register */
36#define AT91_AIC_NFIQ (1 << 0) /* nFIQ Status */
37#define AT91_AIC_NIRQ (1 << 1) /* nIRQ Status */
38
39#define AT91_AIC_IECR (AT91_AIC + 0x120) /* Interrupt Enable Command Register */
40#define AT91_AIC_IDCR (AT91_AIC + 0x124) /* Interrupt Disable Command Register */
41#define AT91_AIC_ICCR (AT91_AIC + 0x128) /* Interrupt Clear Command Register */
42#define AT91_AIC_ISCR (AT91_AIC + 0x12c) /* Interrupt Set Command Register */
43#define AT91_AIC_EOICR (AT91_AIC + 0x130) /* End of Interrupt Command Register */
44#define AT91_AIC_SPU (AT91_AIC + 0x134) /* Spurious Interrupt Vector Register */
45#define AT91_AIC_DCR (AT91_AIC + 0x138) /* Debug Control Register */
46#define AT91_AIC_DCR_PROT (1 << 0) /* Protection Mode */
47#define AT91_AIC_DCR_GMSK (1 << 1) /* General Mask */
48
49#define AT91_AIC_FFER (AT91_AIC + 0x140) /* Fast Forcing Enable Register [SAM9 only] */
50#define AT91_AIC_FFDR (AT91_AIC + 0x144) /* Fast Forcing Disable Register [SAM9 only] */
51#define AT91_AIC_FFSR (AT91_AIC + 0x148) /* Fast Forcing Status Register [SAM9 only] */
52
53#endif
diff --git a/arch/arm/mach-at91/include/mach/at91_dbgu.h b/arch/arm/mach-at91/include/mach/at91_dbgu.h
new file mode 100644
index 000000000000..6dcaa7716871
--- /dev/null
+++ b/arch/arm/mach-at91/include/mach/at91_dbgu.h
@@ -0,0 +1,66 @@
1/*
2 * arch/arm/mach-at91/include/mach/at91_dbgu.h
3 *
4 * Copyright (C) 2005 Ivan Kokshaysky
5 * Copyright (C) SAN People
6 *
7 * Debug Unit (DBGU) - System peripherals registers.
8 * Based on AT91RM9200 datasheet revision E.
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 */
15
16#ifndef AT91_DBGU_H
17#define AT91_DBGU_H
18
19#ifdef AT91_DBGU
20#define AT91_DBGU_CR (AT91_DBGU + 0x00) /* Control Register */
21#define AT91_DBGU_MR (AT91_DBGU + 0x04) /* Mode Register */
22#define AT91_DBGU_IER (AT91_DBGU + 0x08) /* Interrupt Enable Register */
23#define AT91_DBGU_TXRDY (1 << 1) /* Transmitter Ready */
24#define AT91_DBGU_TXEMPTY (1 << 9) /* Transmitter Empty */
25#define AT91_DBGU_IDR (AT91_DBGU + 0x0c) /* Interrupt Disable Register */
26#define AT91_DBGU_IMR (AT91_DBGU + 0x10) /* Interrupt Mask Register */
27#define AT91_DBGU_SR (AT91_DBGU + 0x14) /* Status Register */
28#define AT91_DBGU_RHR (AT91_DBGU + 0x18) /* Receiver Holding Register */
29#define AT91_DBGU_THR (AT91_DBGU + 0x1c) /* Transmitter Holding Register */
30#define AT91_DBGU_BRGR (AT91_DBGU + 0x20) /* Baud Rate Generator Register */
31
32#define AT91_DBGU_CIDR (AT91_DBGU + 0x40) /* Chip ID Register */
33#define AT91_DBGU_EXID (AT91_DBGU + 0x44) /* Chip ID Extension Register */
34#define AT91_DBGU_FNR (AT91_DBGU + 0x48) /* Force NTRST Register [SAM9 only] */
35#define AT91_DBGU_FNTRST (1 << 0) /* Force NTRST */
36
37#endif /* AT91_DBGU */
38
39/*
40 * Some AT91 parts that don't have full DEBUG units still support the ID
41 * and extensions register.
42 */
43#define AT91_CIDR_VERSION (0x1f << 0) /* Version of the Device */
44#define AT91_CIDR_EPROC (7 << 5) /* Embedded Processor */
45#define AT91_CIDR_NVPSIZ (0xf << 8) /* Nonvolatile Program Memory Size */
46#define AT91_CIDR_NVPSIZ2 (0xf << 12) /* Second Nonvolatile Program Memory Size */
47#define AT91_CIDR_SRAMSIZ (0xf << 16) /* Internal SRAM Size */
48#define AT91_CIDR_SRAMSIZ_1K (1 << 16)
49#define AT91_CIDR_SRAMSIZ_2K (2 << 16)
50#define AT91_CIDR_SRAMSIZ_112K (4 << 16)
51#define AT91_CIDR_SRAMSIZ_4K (5 << 16)
52#define AT91_CIDR_SRAMSIZ_80K (6 << 16)
53#define AT91_CIDR_SRAMSIZ_160K (7 << 16)
54#define AT91_CIDR_SRAMSIZ_8K (8 << 16)
55#define AT91_CIDR_SRAMSIZ_16K (9 << 16)
56#define AT91_CIDR_SRAMSIZ_32K (10 << 16)
57#define AT91_CIDR_SRAMSIZ_64K (11 << 16)
58#define AT91_CIDR_SRAMSIZ_128K (12 << 16)
59#define AT91_CIDR_SRAMSIZ_256K (13 << 16)
60#define AT91_CIDR_SRAMSIZ_96K (14 << 16)
61#define AT91_CIDR_SRAMSIZ_512K (15 << 16)
62#define AT91_CIDR_ARCH (0xff << 20) /* Architecture Identifier */
63#define AT91_CIDR_NVPTYP (7 << 28) /* Nonvolatile Program Memory Type */
64#define AT91_CIDR_EXT (1 << 31) /* Extension Flag */
65
66#endif
diff --git a/arch/arm/mach-at91/include/mach/at91_mci.h b/arch/arm/mach-at91/include/mach/at91_mci.h
new file mode 100644
index 000000000000..550d503a1bca
--- /dev/null
+++ b/arch/arm/mach-at91/include/mach/at91_mci.h
@@ -0,0 +1,113 @@
1/*
2 * arch/arm/mach-at91/include/mach/at91_mci.h
3 *
4 * Copyright (C) 2005 Ivan Kokshaysky
5 * Copyright (C) SAN People
6 *
7 * MultiMedia Card Interface (MCI) registers.
8 * Based on AT91RM9200 datasheet revision F.
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 */
15
16#ifndef AT91_MCI_H
17#define AT91_MCI_H
18
19#define AT91_MCI_CR 0x00 /* Control Register */
20#define AT91_MCI_MCIEN (1 << 0) /* Multi-Media Interface Enable */
21#define AT91_MCI_MCIDIS (1 << 1) /* Multi-Media Interface Disable */
22#define AT91_MCI_PWSEN (1 << 2) /* Power Save Mode Enable */
23#define AT91_MCI_PWSDIS (1 << 3) /* Power Save Mode Disable */
24#define AT91_MCI_SWRST (1 << 7) /* Software Reset */
25
26#define AT91_MCI_MR 0x04 /* Mode Register */
27#define AT91_MCI_CLKDIV (0xff << 0) /* Clock Divider */
28#define AT91_MCI_PWSDIV (7 << 8) /* Power Saving Divider */
29#define AT91_MCI_RDPROOF (1 << 11) /* Read Proof Enable [SAM926[03] only] */
30#define AT91_MCI_WRPROOF (1 << 12) /* Write Proof Enable [SAM926[03] only] */
31#define AT91_MCI_PDCFBYTE (1 << 13) /* PDC Force Byte Transfer [SAM926[03] only] */
32#define AT91_MCI_PDCPADV (1 << 14) /* PDC Padding Value */
33#define AT91_MCI_PDCMODE (1 << 15) /* PDC-orientated Mode */
34#define AT91_MCI_BLKLEN (0xfff << 18) /* Data Block Length */
35
36#define AT91_MCI_DTOR 0x08 /* Data Timeout Register */
37#define AT91_MCI_DTOCYC (0xf << 0) /* Data Timeout Cycle Number */
38#define AT91_MCI_DTOMUL (7 << 4) /* Data Timeout Multiplier */
39#define AT91_MCI_DTOMUL_1 (0 << 4)
40#define AT91_MCI_DTOMUL_16 (1 << 4)
41#define AT91_MCI_DTOMUL_128 (2 << 4)
42#define AT91_MCI_DTOMUL_256 (3 << 4)
43#define AT91_MCI_DTOMUL_1K (4 << 4)
44#define AT91_MCI_DTOMUL_4K (5 << 4)
45#define AT91_MCI_DTOMUL_64K (6 << 4)
46#define AT91_MCI_DTOMUL_1M (7 << 4)
47
48#define AT91_MCI_SDCR 0x0c /* SD Card Register */
49#define AT91_MCI_SDCSEL (3 << 0) /* SD Card Selector */
50#define AT91_MCI_SDCBUS (1 << 7) /* 1-bit or 4-bit bus */
51
52#define AT91_MCI_ARGR 0x10 /* Argument Register */
53
54#define AT91_MCI_CMDR 0x14 /* Command Register */
55#define AT91_MCI_CMDNB (0x3f << 0) /* Command Number */
56#define AT91_MCI_RSPTYP (3 << 6) /* Response Type */
57#define AT91_MCI_RSPTYP_NONE (0 << 6)
58#define AT91_MCI_RSPTYP_48 (1 << 6)
59#define AT91_MCI_RSPTYP_136 (2 << 6)
60#define AT91_MCI_SPCMD (7 << 8) /* Special Command */
61#define AT91_MCI_SPCMD_NONE (0 << 8)
62#define AT91_MCI_SPCMD_INIT (1 << 8)
63#define AT91_MCI_SPCMD_SYNC (2 << 8)
64#define AT91_MCI_SPCMD_ICMD (4 << 8)
65#define AT91_MCI_SPCMD_IRESP (5 << 8)
66#define AT91_MCI_OPDCMD (1 << 11) /* Open Drain Command */
67#define AT91_MCI_MAXLAT (1 << 12) /* Max Latency for Command to Response */
68#define AT91_MCI_TRCMD (3 << 16) /* Transfer Command */
69#define AT91_MCI_TRCMD_NONE (0 << 16)
70#define AT91_MCI_TRCMD_START (1 << 16)
71#define AT91_MCI_TRCMD_STOP (2 << 16)
72#define AT91_MCI_TRDIR (1 << 18) /* Transfer Direction */
73#define AT91_MCI_TRTYP (3 << 19) /* Transfer Type */
74#define AT91_MCI_TRTYP_BLOCK (0 << 19)
75#define AT91_MCI_TRTYP_MULTIPLE (1 << 19)
76#define AT91_MCI_TRTYP_STREAM (2 << 19)
77
78#define AT91_MCI_BLKR 0x18 /* Block Register */
79#define AT91_MCI_BLKR_BCNT(n) ((0xffff & (n)) << 0) /* Block count */
80#define AT91_MCI_BLKR_BLKLEN(n) ((0xffff & (n)) << 16) /* Block lenght */
81
82#define AT91_MCI_RSPR(n) (0x20 + ((n) * 4)) /* Response Registers 0-3 */
83#define AT91_MCR_RDR 0x30 /* Receive Data Register */
84#define AT91_MCR_TDR 0x34 /* Transmit Data Register */
85
86#define AT91_MCI_SR 0x40 /* Status Register */
87#define AT91_MCI_CMDRDY (1 << 0) /* Command Ready */
88#define AT91_MCI_RXRDY (1 << 1) /* Receiver Ready */
89#define AT91_MCI_TXRDY (1 << 2) /* Transmit Ready */
90#define AT91_MCI_BLKE (1 << 3) /* Data Block Ended */
91#define AT91_MCI_DTIP (1 << 4) /* Data Transfer in Progress */
92#define AT91_MCI_NOTBUSY (1 << 5) /* Data Not Busy */
93#define AT91_MCI_ENDRX (1 << 6) /* End of RX Buffer */
94#define AT91_MCI_ENDTX (1 << 7) /* End fo TX Buffer */
95#define AT91_MCI_SDIOIRQA (1 << 8) /* SDIO Interrupt for Slot A */
96#define AT91_MCI_SDIOIRQB (1 << 9) /* SDIO Interrupt for Slot B */
97#define AT91_MCI_RXBUFF (1 << 14) /* RX Buffer Full */
98#define AT91_MCI_TXBUFE (1 << 15) /* TX Buffer Empty */
99#define AT91_MCI_RINDE (1 << 16) /* Response Index Error */
100#define AT91_MCI_RDIRE (1 << 17) /* Response Direction Error */
101#define AT91_MCI_RCRCE (1 << 18) /* Response CRC Error */
102#define AT91_MCI_RENDE (1 << 19) /* Response End Bit Error */
103#define AT91_MCI_RTOE (1 << 20) /* Reponse Time-out Error */
104#define AT91_MCI_DCRCE (1 << 21) /* Data CRC Error */
105#define AT91_MCI_DTOE (1 << 22) /* Data Time-out Error */
106#define AT91_MCI_OVRE (1 << 30) /* Overrun */
107#define AT91_MCI_UNRE (1 << 31) /* Underrun */
108
109#define AT91_MCI_IER 0x44 /* Interrupt Enable Register */
110#define AT91_MCI_IDR 0x48 /* Interrupt Disable Register */
111#define AT91_MCI_IMR 0x4c /* Interrupt Mask Register */
112
113#endif
diff --git a/arch/arm/mach-at91/include/mach/at91_pio.h b/arch/arm/mach-at91/include/mach/at91_pio.h
new file mode 100644
index 000000000000..c6a31bf8a5c6
--- /dev/null
+++ b/arch/arm/mach-at91/include/mach/at91_pio.h
@@ -0,0 +1,49 @@
1/*
2 * arch/arm/mach-at91/include/mach/at91_pio.h
3 *
4 * Copyright (C) 2005 Ivan Kokshaysky
5 * Copyright (C) SAN People
6 *
7 * Parallel I/O Controller (PIO) - System peripherals registers.
8 * Based on AT91RM9200 datasheet revision E.
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 */
15
16#ifndef AT91_PIO_H
17#define AT91_PIO_H
18
19#define PIO_PER 0x00 /* Enable Register */
20#define PIO_PDR 0x04 /* Disable Register */
21#define PIO_PSR 0x08 /* Status Register */
22#define PIO_OER 0x10 /* Output Enable Register */
23#define PIO_ODR 0x14 /* Output Disable Register */
24#define PIO_OSR 0x18 /* Output Status Register */
25#define PIO_IFER 0x20 /* Glitch Input Filter Enable */
26#define PIO_IFDR 0x24 /* Glitch Input Filter Disable */
27#define PIO_IFSR 0x28 /* Glitch Input Filter Status */
28#define PIO_SODR 0x30 /* Set Output Data Register */
29#define PIO_CODR 0x34 /* Clear Output Data Register */
30#define PIO_ODSR 0x38 /* Output Data Status Register */
31#define PIO_PDSR 0x3c /* Pin Data Status Register */
32#define PIO_IER 0x40 /* Interrupt Enable Register */
33#define PIO_IDR 0x44 /* Interrupt Disable Register */
34#define PIO_IMR 0x48 /* Interrupt Mask Register */
35#define PIO_ISR 0x4c /* Interrupt Status Register */
36#define PIO_MDER 0x50 /* Multi-driver Enable Register */
37#define PIO_MDDR 0x54 /* Multi-driver Disable Register */
38#define PIO_MDSR 0x58 /* Multi-driver Status Register */
39#define PIO_PUDR 0x60 /* Pull-up Disable Register */
40#define PIO_PUER 0x64 /* Pull-up Enable Register */
41#define PIO_PUSR 0x68 /* Pull-up Status Register */
42#define PIO_ASR 0x70 /* Peripheral A Select Register */
43#define PIO_BSR 0x74 /* Peripheral B Select Register */
44#define PIO_ABSR 0x78 /* AB Status Register */
45#define PIO_OWER 0xa0 /* Output Write Enable Register */
46#define PIO_OWDR 0xa4 /* Output Write Disable Register */
47#define PIO_OWSR 0xa8 /* Output Write Status Register */
48
49#endif
diff --git a/arch/arm/mach-at91/include/mach/at91_pit.h b/arch/arm/mach-at91/include/mach/at91_pit.h
new file mode 100644
index 000000000000..0448ac36eadb
--- /dev/null
+++ b/arch/arm/mach-at91/include/mach/at91_pit.h
@@ -0,0 +1,29 @@
1/*
2 * arch/arm/mach-at91/include/mach/at91_pit.h
3 *
4 * Periodic Interval Timer (PIT) - System peripherals regsters.
5 * Based on AT91SAM9261 datasheet revision D.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 */
12
13#ifndef AT91_PIT_H
14#define AT91_PIT_H
15
16#define AT91_PIT_MR (AT91_PIT + 0x00) /* Mode Register */
17#define AT91_PIT_PITIEN (1 << 25) /* Timer Interrupt Enable */
18#define AT91_PIT_PITEN (1 << 24) /* Timer Enabled */
19#define AT91_PIT_PIV (0xfffff) /* Periodic Interval Value */
20
21#define AT91_PIT_SR (AT91_PIT + 0x04) /* Status Register */
22#define AT91_PIT_PITS (1 << 0) /* Timer Status */
23
24#define AT91_PIT_PIVR (AT91_PIT + 0x08) /* Periodic Interval Value Register */
25#define AT91_PIT_PIIR (AT91_PIT + 0x0c) /* Periodic Interval Image Register */
26#define AT91_PIT_PICNT (0xfff << 20) /* Interval Counter */
27#define AT91_PIT_CPIV (0xfffff) /* Inverval Value */
28
29#endif
diff --git a/arch/arm/mach-at91/include/mach/at91_pmc.h b/arch/arm/mach-at91/include/mach/at91_pmc.h
new file mode 100644
index 000000000000..2e3f2894b704
--- /dev/null
+++ b/arch/arm/mach-at91/include/mach/at91_pmc.h
@@ -0,0 +1,111 @@
1/*
2 * arch/arm/mach-at91/include/mach/at91_pmc.h
3 *
4 * Copyright (C) 2005 Ivan Kokshaysky
5 * Copyright (C) SAN People
6 *
7 * Power Management Controller (PMC) - System peripherals registers.
8 * Based on AT91RM9200 datasheet revision E.
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 */
15
16#ifndef AT91_PMC_H
17#define AT91_PMC_H
18
19#define AT91_PMC_SCER (AT91_PMC + 0x00) /* System Clock Enable Register */
20#define AT91_PMC_SCDR (AT91_PMC + 0x04) /* System Clock Disable Register */
21
22#define AT91_PMC_SCSR (AT91_PMC + 0x08) /* System Clock Status Register */
23#define AT91_PMC_PCK (1 << 0) /* Processor Clock */
24#define AT91RM9200_PMC_UDP (1 << 1) /* USB Devcice Port Clock [AT91RM9200 only] */
25#define AT91RM9200_PMC_MCKUDP (1 << 2) /* USB Device Port Master Clock Automatic Disable on Suspend [AT91RM9200 only] */
26#define AT91RM9200_PMC_UHP (1 << 4) /* USB Host Port Clock [AT91RM9200 only] */
27#define AT91SAM926x_PMC_UHP (1 << 6) /* USB Host Port Clock [AT91SAM926x only] */
28#define AT91CAP9_PMC_UHP (1 << 6) /* USB Host Port Clock [AT91CAP9 only] */
29#define AT91SAM926x_PMC_UDP (1 << 7) /* USB Devcice Port Clock [AT91SAM926x only] */
30#define AT91_PMC_PCK0 (1 << 8) /* Programmable Clock 0 */
31#define AT91_PMC_PCK1 (1 << 9) /* Programmable Clock 1 */
32#define AT91_PMC_PCK2 (1 << 10) /* Programmable Clock 2 */
33#define AT91_PMC_PCK3 (1 << 11) /* Programmable Clock 3 */
34#define AT91_PMC_HCK0 (1 << 16) /* AHB Clock (USB host) [AT91SAM9261 only] */
35#define AT91_PMC_HCK1 (1 << 17) /* AHB Clock (LCD) [AT91SAM9261 only] */
36
37#define AT91_PMC_PCER (AT91_PMC + 0x10) /* Peripheral Clock Enable Register */
38#define AT91_PMC_PCDR (AT91_PMC + 0x14) /* Peripheral Clock Disable Register */
39#define AT91_PMC_PCSR (AT91_PMC + 0x18) /* Peripheral Clock Status Register */
40
41#define AT91_CKGR_UCKR (AT91_PMC + 0x1C) /* UTMI Clock Register [SAM9RL, CAP9] */
42#define AT91_PMC_UPLLEN (1 << 16) /* UTMI PLL Enable */
43#define AT91_PMC_UPLLCOUNT (0xf << 20) /* UTMI PLL Start-up Time */
44#define AT91_PMC_BIASEN (1 << 24) /* UTMI BIAS Enable */
45#define AT91_PMC_BIASCOUNT (0xf << 28) /* UTMI PLL Start-up Time */
46
47#define AT91_CKGR_MOR (AT91_PMC + 0x20) /* Main Oscillator Register [not on SAM9RL] */
48#define AT91_PMC_MOSCEN (1 << 0) /* Main Oscillator Enable */
49#define AT91_PMC_OSCBYPASS (1 << 1) /* Oscillator Bypass [SAM9x, CAP9] */
50#define AT91_PMC_OSCOUNT (0xff << 8) /* Main Oscillator Start-up Time */
51
52#define AT91_CKGR_MCFR (AT91_PMC + 0x24) /* Main Clock Frequency Register */
53#define AT91_PMC_MAINF (0xffff << 0) /* Main Clock Frequency */
54#define AT91_PMC_MAINRDY (1 << 16) /* Main Clock Ready */
55
56#define AT91_CKGR_PLLAR (AT91_PMC + 0x28) /* PLL A Register */
57#define AT91_CKGR_PLLBR (AT91_PMC + 0x2c) /* PLL B Register */
58#define AT91_PMC_DIV (0xff << 0) /* Divider */
59#define AT91_PMC_PLLCOUNT (0x3f << 8) /* PLL Counter */
60#define AT91_PMC_OUT (3 << 14) /* PLL Clock Frequency Range */
61#define AT91_PMC_MUL (0x7ff << 16) /* PLL Multiplier */
62#define AT91_PMC_USBDIV (3 << 28) /* USB Divisor (PLLB only) */
63#define AT91_PMC_USBDIV_1 (0 << 28)
64#define AT91_PMC_USBDIV_2 (1 << 28)
65#define AT91_PMC_USBDIV_4 (2 << 28)
66#define AT91_PMC_USB96M (1 << 28) /* Divider by 2 Enable (PLLB only) */
67
68#define AT91_PMC_MCKR (AT91_PMC + 0x30) /* Master Clock Register */
69#define AT91_PMC_CSS (3 << 0) /* Master Clock Selection */
70#define AT91_PMC_CSS_SLOW (0 << 0)
71#define AT91_PMC_CSS_MAIN (1 << 0)
72#define AT91_PMC_CSS_PLLA (2 << 0)
73#define AT91_PMC_CSS_PLLB (3 << 0)
74#define AT91_PMC_PRES (7 << 2) /* Master Clock Prescaler */
75#define AT91_PMC_PRES_1 (0 << 2)
76#define AT91_PMC_PRES_2 (1 << 2)
77#define AT91_PMC_PRES_4 (2 << 2)
78#define AT91_PMC_PRES_8 (3 << 2)
79#define AT91_PMC_PRES_16 (4 << 2)
80#define AT91_PMC_PRES_32 (5 << 2)
81#define AT91_PMC_PRES_64 (6 << 2)
82#define AT91_PMC_MDIV (3 << 8) /* Master Clock Division */
83#define AT91RM9200_PMC_MDIV_1 (0 << 8) /* [AT91RM9200 only] */
84#define AT91RM9200_PMC_MDIV_2 (1 << 8)
85#define AT91RM9200_PMC_MDIV_3 (2 << 8)
86#define AT91RM9200_PMC_MDIV_4 (3 << 8)
87#define AT91SAM9_PMC_MDIV_1 (0 << 8) /* [SAM9,CAP9 only] */
88#define AT91SAM9_PMC_MDIV_2 (1 << 8)
89#define AT91SAM9_PMC_MDIV_4 (2 << 8)
90#define AT91SAM9_PMC_MDIV_6 (3 << 8)
91#define AT91_PMC_PDIV (1 << 12) /* Processor Clock Division [some SAM9 only] */
92#define AT91_PMC_PDIV_1 (0 << 12)
93#define AT91_PMC_PDIV_2 (1 << 12)
94
95#define AT91_PMC_PCKR(n) (AT91_PMC + 0x40 + ((n) * 4)) /* Programmable Clock 0-3 Registers */
96
97#define AT91_PMC_IER (AT91_PMC + 0x60) /* Interrupt Enable Register */
98#define AT91_PMC_IDR (AT91_PMC + 0x64) /* Interrupt Disable Register */
99#define AT91_PMC_SR (AT91_PMC + 0x68) /* Status Register */
100#define AT91_PMC_MOSCS (1 << 0) /* MOSCS Flag */
101#define AT91_PMC_LOCKA (1 << 1) /* PLLA Lock */
102#define AT91_PMC_LOCKB (1 << 2) /* PLLB Lock */
103#define AT91_PMC_MCKRDY (1 << 3) /* Master Clock */
104#define AT91_PMC_LOCKU (1 << 6) /* UPLL Lock [AT91CAP9 only] */
105#define AT91_PMC_PCK0RDY (1 << 8) /* Programmable Clock 0 */
106#define AT91_PMC_PCK1RDY (1 << 9) /* Programmable Clock 1 */
107#define AT91_PMC_PCK2RDY (1 << 10) /* Programmable Clock 2 */
108#define AT91_PMC_PCK3RDY (1 << 11) /* Programmable Clock 3 */
109#define AT91_PMC_IMR (AT91_PMC + 0x6c) /* Interrupt Mask Register */
110
111#endif
diff --git a/arch/arm/mach-at91/include/mach/at91_rstc.h b/arch/arm/mach-at91/include/mach/at91_rstc.h
new file mode 100644
index 000000000000..7cd1b39aaa43
--- /dev/null
+++ b/arch/arm/mach-at91/include/mach/at91_rstc.h
@@ -0,0 +1,38 @@
1/*
2 * arch/arm/mach-at91/include/mach/at91_rstc.h
3 *
4 * Reset Controller (RSTC) - System peripherals regsters.
5 * Based on AT91SAM9261 datasheet revision D.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 */
12
13#ifndef AT91_RSTC_H
14#define AT91_RSTC_H
15
16#define AT91_RSTC_CR (AT91_RSTC + 0x00) /* Reset Controller Control Register */
17#define AT91_RSTC_PROCRST (1 << 0) /* Processor Reset */
18#define AT91_RSTC_PERRST (1 << 2) /* Peripheral Reset */
19#define AT91_RSTC_EXTRST (1 << 3) /* External Reset */
20#define AT91_RSTC_KEY (0xa5 << 24) /* KEY Password */
21
22#define AT91_RSTC_SR (AT91_RSTC + 0x04) /* Reset Controller Status Register */
23#define AT91_RSTC_URSTS (1 << 0) /* User Reset Status */
24#define AT91_RSTC_RSTTYP (7 << 8) /* Reset Type */
25#define AT91_RSTC_RSTTYP_GENERAL (0 << 8)
26#define AT91_RSTC_RSTTYP_WAKEUP (1 << 8)
27#define AT91_RSTC_RSTTYP_WATCHDOG (2 << 8)
28#define AT91_RSTC_RSTTYP_SOFTWARE (3 << 8)
29#define AT91_RSTC_RSTTYP_USER (4 << 8)
30#define AT91_RSTC_NRSTL (1 << 16) /* NRST Pin Level */
31#define AT91_RSTC_SRCMP (1 << 17) /* Software Reset Command in Progress */
32
33#define AT91_RSTC_MR (AT91_RSTC + 0x08) /* Reset Controller Mode Register */
34#define AT91_RSTC_URSTEN (1 << 0) /* User Reset Enable */
35#define AT91_RSTC_URSTIEN (1 << 4) /* User Reset Interrupt Enable */
36#define AT91_RSTC_ERSTL (0xf << 8) /* External Reset Length */
37
38#endif
diff --git a/arch/arm/mach-at91/include/mach/at91_rtc.h b/arch/arm/mach-at91/include/mach/at91_rtc.h
new file mode 100644
index 000000000000..e56f4701a3e5
--- /dev/null
+++ b/arch/arm/mach-at91/include/mach/at91_rtc.h
@@ -0,0 +1,75 @@
1/*
2 * arch/arm/mach-at91/include/mach/at91_rtc.h
3 *
4 * Copyright (C) 2005 Ivan Kokshaysky
5 * Copyright (C) SAN People
6 *
7 * Real Time Clock (RTC) - System peripheral registers.
8 * Based on AT91RM9200 datasheet revision E.
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 */
15
16#ifndef AT91_RTC_H
17#define AT91_RTC_H
18
19#define AT91_RTC_CR (AT91_RTC + 0x00) /* Control Register */
20#define AT91_RTC_UPDTIM (1 << 0) /* Update Request Time Register */
21#define AT91_RTC_UPDCAL (1 << 1) /* Update Request Calendar Register */
22#define AT91_RTC_TIMEVSEL (3 << 8) /* Time Event Selection */
23#define AT91_RTC_TIMEVSEL_MINUTE (0 << 8)
24#define AT91_RTC_TIMEVSEL_HOUR (1 << 8)
25#define AT91_RTC_TIMEVSEL_DAY24 (2 << 8)
26#define AT91_RTC_TIMEVSEL_DAY12 (3 << 8)
27#define AT91_RTC_CALEVSEL (3 << 16) /* Calendar Event Selection */
28#define AT91_RTC_CALEVSEL_WEEK (0 << 16)
29#define AT91_RTC_CALEVSEL_MONTH (1 << 16)
30#define AT91_RTC_CALEVSEL_YEAR (2 << 16)
31
32#define AT91_RTC_MR (AT91_RTC + 0x04) /* Mode Register */
33#define AT91_RTC_HRMOD (1 << 0) /* 12/24 Hour Mode */
34
35#define AT91_RTC_TIMR (AT91_RTC + 0x08) /* Time Register */
36#define AT91_RTC_SEC (0x7f << 0) /* Current Second */
37#define AT91_RTC_MIN (0x7f << 8) /* Current Minute */
38#define AT91_RTC_HOUR (0x3f << 16) /* Current Hour */
39#define AT91_RTC_AMPM (1 << 22) /* Ante Meridiem Post Meridiem Indicator */
40
41#define AT91_RTC_CALR (AT91_RTC + 0x0c) /* Calendar Register */
42#define AT91_RTC_CENT (0x7f << 0) /* Current Century */
43#define AT91_RTC_YEAR (0xff << 8) /* Current Year */
44#define AT91_RTC_MONTH (0x1f << 16) /* Current Month */
45#define AT91_RTC_DAY (7 << 21) /* Current Day */
46#define AT91_RTC_DATE (0x3f << 24) /* Current Date */
47
48#define AT91_RTC_TIMALR (AT91_RTC + 0x10) /* Time Alarm Register */
49#define AT91_RTC_SECEN (1 << 7) /* Second Alarm Enable */
50#define AT91_RTC_MINEN (1 << 15) /* Minute Alarm Enable */
51#define AT91_RTC_HOUREN (1 << 23) /* Hour Alarm Enable */
52
53#define AT91_RTC_CALALR (AT91_RTC + 0x14) /* Calendar Alarm Register */
54#define AT91_RTC_MTHEN (1 << 23) /* Month Alarm Enable */
55#define AT91_RTC_DATEEN (1 << 31) /* Date Alarm Enable */
56
57#define AT91_RTC_SR (AT91_RTC + 0x18) /* Status Register */
58#define AT91_RTC_ACKUPD (1 << 0) /* Acknowledge for Update */
59#define AT91_RTC_ALARM (1 << 1) /* Alarm Flag */
60#define AT91_RTC_SECEV (1 << 2) /* Second Event */
61#define AT91_RTC_TIMEV (1 << 3) /* Time Event */
62#define AT91_RTC_CALEV (1 << 4) /* Calendar Event */
63
64#define AT91_RTC_SCCR (AT91_RTC + 0x1c) /* Status Clear Command Register */
65#define AT91_RTC_IER (AT91_RTC + 0x20) /* Interrupt Enable Register */
66#define AT91_RTC_IDR (AT91_RTC + 0x24) /* Interrupt Disable Register */
67#define AT91_RTC_IMR (AT91_RTC + 0x28) /* Interrupt Mask Register */
68
69#define AT91_RTC_VER (AT91_RTC + 0x2c) /* Valid Entry Register */
70#define AT91_RTC_NVTIM (1 << 0) /* Non valid Time */
71#define AT91_RTC_NVCAL (1 << 1) /* Non valid Calendar */
72#define AT91_RTC_NVTIMALR (1 << 2) /* Non valid Time Alarm */
73#define AT91_RTC_NVCALALR (1 << 3) /* Non valid Calendar Alarm */
74
75#endif
diff --git a/arch/arm/mach-at91/include/mach/at91_rtt.h b/arch/arm/mach-at91/include/mach/at91_rtt.h
new file mode 100644
index 000000000000..71782e5d2159
--- /dev/null
+++ b/arch/arm/mach-at91/include/mach/at91_rtt.h
@@ -0,0 +1,32 @@
1/*
2 * arch/arm/mach-at91/include/mach/at91_rtt.h
3 *
4 * Real-time Timer (RTT) - System peripherals regsters.
5 * Based on AT91SAM9261 datasheet revision D.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 */
12
13#ifndef AT91_RTT_H
14#define AT91_RTT_H
15
16#define AT91_RTT_MR 0x00 /* Real-time Mode Register */
17#define AT91_RTT_RTPRES (0xffff << 0) /* Real-time Timer Prescaler Value */
18#define AT91_RTT_ALMIEN (1 << 16) /* Alarm Interrupt Enable */
19#define AT91_RTT_RTTINCIEN (1 << 17) /* Real Time Timer Increment Interrupt Enable */
20#define AT91_RTT_RTTRST (1 << 18) /* Real Time Timer Restart */
21
22#define AT91_RTT_AR 0x04 /* Real-time Alarm Register */
23#define AT91_RTT_ALMV (0xffffffff) /* Alarm Value */
24
25#define AT91_RTT_VR 0x08 /* Real-time Value Register */
26#define AT91_RTT_CRTV (0xffffffff) /* Current Real-time Value */
27
28#define AT91_RTT_SR 0x0c /* Real-time Status Register */
29#define AT91_RTT_ALMS (1 << 0) /* Real-time Alarm Status */
30#define AT91_RTT_RTTINC (1 << 1) /* Real-time Timer Increment */
31
32#endif
diff --git a/arch/arm/mach-at91/include/mach/at91_shdwc.h b/arch/arm/mach-at91/include/mach/at91_shdwc.h
new file mode 100644
index 000000000000..60be5ae624f1
--- /dev/null
+++ b/arch/arm/mach-at91/include/mach/at91_shdwc.h
@@ -0,0 +1,35 @@
1/*
2 * arch/arm/mach-at91/include/mach/at91_shdwc.h
3 *
4 * Shutdown Controller (SHDWC) - System peripherals regsters.
5 * Based on AT91SAM9261 datasheet revision D.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 */
12
13#ifndef AT91_SHDWC_H
14#define AT91_SHDWC_H
15
16#define AT91_SHDW_CR (AT91_SHDWC + 0x00) /* Shut Down Control Register */
17#define AT91_SHDW_SHDW (1 << 0) /* Shut Down command */
18#define AT91_SHDW_KEY (0xa5 << 24) /* KEY Password */
19
20#define AT91_SHDW_MR (AT91_SHDWC + 0x04) /* Shut Down Mode Register */
21#define AT91_SHDW_WKMODE0 (3 << 0) /* Wake-up 0 Mode Selection */
22#define AT91_SHDW_WKMODE0_NONE 0
23#define AT91_SHDW_WKMODE0_HIGH 1
24#define AT91_SHDW_WKMODE0_LOW 2
25#define AT91_SHDW_WKMODE0_ANYLEVEL 3
26#define AT91_SHDW_CPTWK0 (0xf << 4) /* Counter On Wake Up 0 */
27#define AT91_SHDW_CPTWK0_(x) ((x) << 4)
28#define AT91_SHDW_RTTWKEN (1 << 16) /* Real Time Timer Wake-up Enable */
29
30#define AT91_SHDW_SR (AT91_SHDWC + 0x08) /* Shut Down Status Register */
31#define AT91_SHDW_WAKEUP0 (1 << 0) /* Wake-up 0 Status */
32#define AT91_SHDW_RTTWK (1 << 16) /* Real-time Timer Wake-up */
33#define AT91_SHDW_RTCWK (1 << 17) /* Real-time Clock Wake-up [SAM9RL] */
34
35#endif
diff --git a/arch/arm/mach-at91/include/mach/at91_spi.h b/arch/arm/mach-at91/include/mach/at91_spi.h
new file mode 100644
index 000000000000..2f6ba0c5636e
--- /dev/null
+++ b/arch/arm/mach-at91/include/mach/at91_spi.h
@@ -0,0 +1,81 @@
1/*
2 * arch/arm/mach-at91/include/mach/at91_spi.h
3 *
4 * Copyright (C) 2005 Ivan Kokshaysky
5 * Copyright (C) SAN People
6 *
7 * Serial Peripheral Interface (SPI) registers.
8 * Based on AT91RM9200 datasheet revision E.
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 */
15
16#ifndef AT91_SPI_H
17#define AT91_SPI_H
18
19#define AT91_SPI_CR 0x00 /* Control Register */
20#define AT91_SPI_SPIEN (1 << 0) /* SPI Enable */
21#define AT91_SPI_SPIDIS (1 << 1) /* SPI Disable */
22#define AT91_SPI_SWRST (1 << 7) /* SPI Software Reset */
23#define AT91_SPI_LASTXFER (1 << 24) /* Last Transfer [SAM9261 only] */
24
25#define AT91_SPI_MR 0x04 /* Mode Register */
26#define AT91_SPI_MSTR (1 << 0) /* Master/Slave Mode */
27#define AT91_SPI_PS (1 << 1) /* Peripheral Select */
28#define AT91_SPI_PS_FIXED (0 << 1)
29#define AT91_SPI_PS_VARIABLE (1 << 1)
30#define AT91_SPI_PCSDEC (1 << 2) /* Chip Select Decode */
31#define AT91_SPI_DIV32 (1 << 3) /* Clock Selection [AT91RM9200 only] */
32#define AT91_SPI_MODFDIS (1 << 4) /* Mode Fault Detection */
33#define AT91_SPI_LLB (1 << 7) /* Local Loopback Enable */
34#define AT91_SPI_PCS (0xf << 16) /* Peripheral Chip Select */
35#define AT91_SPI_DLYBCS (0xff << 24) /* Delay Between Chip Selects */
36
37#define AT91_SPI_RDR 0x08 /* Receive Data Register */
38#define AT91_SPI_RD (0xffff << 0) /* Receive Data */
39#define AT91_SPI_PCS (0xf << 16) /* Peripheral Chip Select */
40
41#define AT91_SPI_TDR 0x0c /* Transmit Data Register */
42#define AT91_SPI_TD (0xffff << 0) /* Transmit Data */
43#define AT91_SPI_PCS (0xf << 16) /* Peripheral Chip Select */
44#define AT91_SPI_LASTXFER (1 << 24) /* Last Transfer [SAM9261 only] */
45
46#define AT91_SPI_SR 0x10 /* Status Register */
47#define AT91_SPI_RDRF (1 << 0) /* Receive Data Register Full */
48#define AT91_SPI_TDRE (1 << 1) /* Transmit Data Register Full */
49#define AT91_SPI_MODF (1 << 2) /* Mode Fault Error */
50#define AT91_SPI_OVRES (1 << 3) /* Overrun Error Status */
51#define AT91_SPI_ENDRX (1 << 4) /* End of RX buffer */
52#define AT91_SPI_ENDTX (1 << 5) /* End of TX buffer */
53#define AT91_SPI_RXBUFF (1 << 6) /* RX Buffer Full */
54#define AT91_SPI_TXBUFE (1 << 7) /* TX Buffer Empty */
55#define AT91_SPI_NSSR (1 << 8) /* NSS Rising [SAM9261 only] */
56#define AT91_SPI_TXEMPTY (1 << 9) /* Transmission Register Empty [SAM9261 only] */
57#define AT91_SPI_SPIENS (1 << 16) /* SPI Enable Status */
58
59#define AT91_SPI_IER 0x14 /* Interrupt Enable Register */
60#define AT91_SPI_IDR 0x18 /* Interrupt Disable Register */
61#define AT91_SPI_IMR 0x1c /* Interrupt Mask Register */
62
63#define AT91_SPI_CSR(n) (0x30 + ((n) * 4)) /* Chip Select Registers 0-3 */
64#define AT91_SPI_CPOL (1 << 0) /* Clock Polarity */
65#define AT91_SPI_NCPHA (1 << 1) /* Clock Phase */
66#define AT91_SPI_CSAAT (1 << 3) /* Chip Select Active After Transfer [SAM9261 only] */
67#define AT91_SPI_BITS (0xf << 4) /* Bits Per Transfer */
68#define AT91_SPI_BITS_8 (0 << 4)
69#define AT91_SPI_BITS_9 (1 << 4)
70#define AT91_SPI_BITS_10 (2 << 4)
71#define AT91_SPI_BITS_11 (3 << 4)
72#define AT91_SPI_BITS_12 (4 << 4)
73#define AT91_SPI_BITS_13 (5 << 4)
74#define AT91_SPI_BITS_14 (6 << 4)
75#define AT91_SPI_BITS_15 (7 << 4)
76#define AT91_SPI_BITS_16 (8 << 4)
77#define AT91_SPI_SCBR (0xff << 8) /* Serial Clock Baud Rate */
78#define AT91_SPI_DLYBS (0xff << 16) /* Delay before SPCK */
79#define AT91_SPI_DLYBCT (0xff << 24) /* Delay between Consecutive Transfers */
80
81#endif
diff --git a/arch/arm/mach-at91/include/mach/at91_ssc.h b/arch/arm/mach-at91/include/mach/at91_ssc.h
new file mode 100644
index 000000000000..a81114c11c74
--- /dev/null
+++ b/arch/arm/mach-at91/include/mach/at91_ssc.h
@@ -0,0 +1,106 @@
1/*
2 * arch/arm/mach-at91/include/mach/at91_ssc.h
3 *
4 * Copyright (C) SAN People
5 *
6 * Serial Synchronous Controller (SSC) registers.
7 * Based on AT91RM9200 datasheet revision E.
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 */
14
15#ifndef AT91_SSC_H
16#define AT91_SSC_H
17
18#define AT91_SSC_CR 0x00 /* Control Register */
19#define AT91_SSC_RXEN (1 << 0) /* Receive Enable */
20#define AT91_SSC_RXDIS (1 << 1) /* Receive Disable */
21#define AT91_SSC_TXEN (1 << 8) /* Transmit Enable */
22#define AT91_SSC_TXDIS (1 << 9) /* Transmit Disable */
23#define AT91_SSC_SWRST (1 << 15) /* Software Reset */
24
25#define AT91_SSC_CMR 0x04 /* Clock Mode Register */
26#define AT91_SSC_CMR_DIV (0xfff << 0) /* Clock Divider */
27
28#define AT91_SSC_RCMR 0x10 /* Receive Clock Mode Register */
29#define AT91_SSC_CKS (3 << 0) /* Clock Selection */
30#define AT91_SSC_CKS_DIV (0 << 0)
31#define AT91_SSC_CKS_CLOCK (1 << 0)
32#define AT91_SSC_CKS_PIN (2 << 0)
33#define AT91_SSC_CKO (7 << 2) /* Clock Output Mode Selection */
34#define AT91_SSC_CKO_NONE (0 << 2)
35#define AT91_SSC_CKO_CONTINUOUS (1 << 2)
36#define AT91_SSC_CKI (1 << 5) /* Clock Inversion */
37#define AT91_SSC_CKI_FALLING (0 << 5)
38#define AT91_SSC_CK_RISING (1 << 5)
39#define AT91_SSC_CKG (1 << 6) /* Receive Clock Gating Selection [AT91SAM9261 only] */
40#define AT91_SSC_CKG_NONE (0 << 6)
41#define AT91_SSC_CKG_RFLOW (1 << 6)
42#define AT91_SSC_CKG_RFHIGH (2 << 6)
43#define AT91_SSC_START (0xf << 8) /* Start Selection */
44#define AT91_SSC_START_CONTINUOUS (0 << 8)
45#define AT91_SSC_START_TX_RX (1 << 8)
46#define AT91_SSC_START_LOW_RF (2 << 8)
47#define AT91_SSC_START_HIGH_RF (3 << 8)
48#define AT91_SSC_START_FALLING_RF (4 << 8)
49#define AT91_SSC_START_RISING_RF (5 << 8)
50#define AT91_SSC_START_LEVEL_RF (6 << 8)
51#define AT91_SSC_START_EDGE_RF (7 << 8)
52#define AT91_SSC_STOP (1 << 12) /* Receive Stop Selection [AT91SAM9261 only] */
53#define AT91_SSC_STTDLY (0xff << 16) /* Start Delay */
54#define AT91_SSC_PERIOD (0xff << 24) /* Period Divider Selection */
55
56#define AT91_SSC_RFMR 0x14 /* Receive Frame Mode Register */
57#define AT91_SSC_DATALEN (0x1f << 0) /* Data Length */
58#define AT91_SSC_LOOP (1 << 5) /* Loop Mode */
59#define AT91_SSC_MSBF (1 << 7) /* Most Significant Bit First */
60#define AT91_SSC_DATNB (0xf << 8) /* Data Number per Frame */
61#define AT91_SSC_FSLEN (0xf << 16) /* Frame Sync Length */
62#define AT91_SSC_FSOS (7 << 20) /* Frame Sync Output Selection */
63#define AT91_SSC_FSOS_NONE (0 << 20)
64#define AT91_SSC_FSOS_NEGATIVE (1 << 20)
65#define AT91_SSC_FSOS_POSITIVE (2 << 20)
66#define AT91_SSC_FSOS_LOW (3 << 20)
67#define AT91_SSC_FSOS_HIGH (4 << 20)
68#define AT91_SSC_FSOS_TOGGLE (5 << 20)
69#define AT91_SSC_FSEDGE (1 << 24) /* Frame Sync Edge Detection */
70#define AT91_SSC_FSEDGE_POSITIVE (0 << 24)
71#define AT91_SSC_FSEDGE_NEGATIVE (1 << 24)
72
73#define AT91_SSC_TCMR 0x18 /* Transmit Clock Mode Register */
74#define AT91_SSC_TFMR 0x1c /* Transmit Fram Mode Register */
75#define AT91_SSC_DATDEF (1 << 5) /* Data Default Value */
76#define AT91_SSC_FSDEN (1 << 23) /* Frame Sync Data Enable */
77
78#define AT91_SSC_RHR 0x20 /* Receive Holding Register */
79#define AT91_SSC_THR 0x24 /* Transmit Holding Register */
80#define AT91_SSC_RSHR 0x30 /* Receive Sync Holding Register */
81#define AT91_SSC_TSHR 0x34 /* Transmit Sync Holding Register */
82
83#define AT91_SSC_RC0R 0x38 /* Receive Compare 0 Register [AT91SAM9261 only] */
84#define AT91_SSC_RC1R 0x3c /* Receive Compare 1 Register [AT91SAM9261 only] */
85
86#define AT91_SSC_SR 0x40 /* Status Register */
87#define AT91_SSC_TXRDY (1 << 0) /* Transmit Ready */
88#define AT91_SSC_TXEMPTY (1 << 1) /* Transmit Empty */
89#define AT91_SSC_ENDTX (1 << 2) /* End of Transmission */
90#define AT91_SSC_TXBUFE (1 << 3) /* Transmit Buffer Empty */
91#define AT91_SSC_RXRDY (1 << 4) /* Receive Ready */
92#define AT91_SSC_OVRUN (1 << 5) /* Receive Overrun */
93#define AT91_SSC_ENDRX (1 << 6) /* End of Reception */
94#define AT91_SSC_RXBUFF (1 << 7) /* Receive Buffer Full */
95#define AT91_SSC_CP0 (1 << 8) /* Compare 0 [AT91SAM9261 only] */
96#define AT91_SSC_CP1 (1 << 9) /* Compare 1 [AT91SAM9261 only] */
97#define AT91_SSC_TXSYN (1 << 10) /* Transmit Sync */
98#define AT91_SSC_RXSYN (1 << 11) /* Receive Sync */
99#define AT91_SSC_TXENA (1 << 16) /* Transmit Enable */
100#define AT91_SSC_RXENA (1 << 17) /* Receive Enable */
101
102#define AT91_SSC_IER 0x44 /* Interrupt Enable Register */
103#define AT91_SSC_IDR 0x48 /* Interrupt Disable Register */
104#define AT91_SSC_IMR 0x4c /* Interrupt Mask Register */
105
106#endif
diff --git a/arch/arm/mach-at91/include/mach/at91_st.h b/arch/arm/mach-at91/include/mach/at91_st.h
new file mode 100644
index 000000000000..8847173e4101
--- /dev/null
+++ b/arch/arm/mach-at91/include/mach/at91_st.h
@@ -0,0 +1,49 @@
1/*
2 * arch/arm/mach-at91/include/mach/at91_st.h
3 *
4 * Copyright (C) 2005 Ivan Kokshaysky
5 * Copyright (C) SAN People
6 *
7 * System Timer (ST) - System peripherals registers.
8 * Based on AT91RM9200 datasheet revision E.
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 */
15
16#ifndef AT91_ST_H
17#define AT91_ST_H
18
19#define AT91_ST_CR (AT91_ST + 0x00) /* Control Register */
20#define AT91_ST_WDRST (1 << 0) /* Watchdog Timer Restart */
21
22#define AT91_ST_PIMR (AT91_ST + 0x04) /* Period Interval Mode Register */
23#define AT91_ST_PIV (0xffff << 0) /* Period Interval Value */
24
25#define AT91_ST_WDMR (AT91_ST + 0x08) /* Watchdog Mode Register */
26#define AT91_ST_WDV (0xffff << 0) /* Watchdog Counter Value */
27#define AT91_ST_RSTEN (1 << 16) /* Reset Enable */
28#define AT91_ST_EXTEN (1 << 17) /* External Signal Assertion Enable */
29
30#define AT91_ST_RTMR (AT91_ST + 0x0c) /* Real-time Mode Register */
31#define AT91_ST_RTPRES (0xffff << 0) /* Real-time Prescalar Value */
32
33#define AT91_ST_SR (AT91_ST + 0x10) /* Status Register */
34#define AT91_ST_PITS (1 << 0) /* Period Interval Timer Status */
35#define AT91_ST_WDOVF (1 << 1) /* Watchdog Overflow */
36#define AT91_ST_RTTINC (1 << 2) /* Real-time Timer Increment */
37#define AT91_ST_ALMS (1 << 3) /* Alarm Status */
38
39#define AT91_ST_IER (AT91_ST + 0x14) /* Interrupt Enable Register */
40#define AT91_ST_IDR (AT91_ST + 0x18) /* Interrupt Disable Register */
41#define AT91_ST_IMR (AT91_ST + 0x1c) /* Interrupt Mask Register */
42
43#define AT91_ST_RTAR (AT91_ST + 0x20) /* Real-time Alarm Register */
44#define AT91_ST_ALMV (0xfffff << 0) /* Alarm Value */
45
46#define AT91_ST_CRTR (AT91_ST + 0x24) /* Current Real-time Register */
47#define AT91_ST_CRTV (0xfffff << 0) /* Current Real-Time Value */
48
49#endif
diff --git a/arch/arm/mach-at91/include/mach/at91_tc.h b/arch/arm/mach-at91/include/mach/at91_tc.h
new file mode 100644
index 000000000000..46a317fd7164
--- /dev/null
+++ b/arch/arm/mach-at91/include/mach/at91_tc.h
@@ -0,0 +1,146 @@
1/*
2 * arch/arm/mach-at91/include/mach/at91_tc.h
3 *
4 * Copyright (C) SAN People
5 *
6 * Timer/Counter Unit (TC) registers.
7 * Based on AT91RM9200 datasheet revision E.
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 */
14
15#ifndef AT91_TC_H
16#define AT91_TC_H
17
18#define AT91_TC_BCR 0xc0 /* TC Block Control Register */
19#define AT91_TC_SYNC (1 << 0) /* Synchro Command */
20
21#define AT91_TC_BMR 0xc4 /* TC Block Mode Register */
22#define AT91_TC_TC0XC0S (3 << 0) /* External Clock Signal 0 Selection */
23#define AT91_TC_TC0XC0S_TCLK0 (0 << 0)
24#define AT91_TC_TC0XC0S_NONE (1 << 0)
25#define AT91_TC_TC0XC0S_TIOA1 (2 << 0)
26#define AT91_TC_TC0XC0S_TIOA2 (3 << 0)
27#define AT91_TC_TC1XC1S (3 << 2) /* External Clock Signal 1 Selection */
28#define AT91_TC_TC1XC1S_TCLK1 (0 << 2)
29#define AT91_TC_TC1XC1S_NONE (1 << 2)
30#define AT91_TC_TC1XC1S_TIOA0 (2 << 2)
31#define AT91_TC_TC1XC1S_TIOA2 (3 << 2)
32#define AT91_TC_TC2XC2S (3 << 4) /* External Clock Signal 2 Selection */
33#define AT91_TC_TC2XC2S_TCLK2 (0 << 4)
34#define AT91_TC_TC2XC2S_NONE (1 << 4)
35#define AT91_TC_TC2XC2S_TIOA0 (2 << 4)
36#define AT91_TC_TC2XC2S_TIOA1 (3 << 4)
37
38
39#define AT91_TC_CCR 0x00 /* Channel Control Register */
40#define AT91_TC_CLKEN (1 << 0) /* Counter Clock Enable Command */
41#define AT91_TC_CLKDIS (1 << 1) /* Counter CLock Disable Command */
42#define AT91_TC_SWTRG (1 << 2) /* Software Trigger Command */
43
44#define AT91_TC_CMR 0x04 /* Channel Mode Register */
45#define AT91_TC_TCCLKS (7 << 0) /* Capture/Waveform Mode: Clock Selection */
46#define AT91_TC_TIMER_CLOCK1 (0 << 0)
47#define AT91_TC_TIMER_CLOCK2 (1 << 0)
48#define AT91_TC_TIMER_CLOCK3 (2 << 0)
49#define AT91_TC_TIMER_CLOCK4 (3 << 0)
50#define AT91_TC_TIMER_CLOCK5 (4 << 0)
51#define AT91_TC_XC0 (5 << 0)
52#define AT91_TC_XC1 (6 << 0)
53#define AT91_TC_XC2 (7 << 0)
54#define AT91_TC_CLKI (1 << 3) /* Capture/Waveform Mode: Clock Invert */
55#define AT91_TC_BURST (3 << 4) /* Capture/Waveform Mode: Burst Signal Selection */
56#define AT91_TC_LDBSTOP (1 << 6) /* Capture Mode: Counter Clock Stopped with TB Loading */
57#define AT91_TC_LDBDIS (1 << 7) /* Capture Mode: Counter Clock Disable with RB Loading */
58#define AT91_TC_ETRGEDG (3 << 8) /* Capture Mode: External Trigger Edge Selection */
59#define AT91_TC_ABETRG (1 << 10) /* Capture Mode: TIOA or TIOB External Trigger Selection */
60#define AT91_TC_CPCTRG (1 << 14) /* Capture Mode: RC Compare Trigger Enable */
61#define AT91_TC_WAVE (1 << 15) /* Capture/Waveform mode */
62#define AT91_TC_LDRA (3 << 16) /* Capture Mode: RA Loading Selection */
63#define AT91_TC_LDRB (3 << 18) /* Capture Mode: RB Loading Selection */
64
65#define AT91_TC_CPCSTOP (1 << 6) /* Waveform Mode: Counter Clock Stopped with RC Compare */
66#define AT91_TC_CPCDIS (1 << 7) /* Waveform Mode: Counter Clock Disable with RC Compare */
67#define AT91_TC_EEVTEDG (3 << 8) /* Waveform Mode: External Event Edge Selection */
68#define AT91_TC_EEVTEDG_NONE (0 << 8)
69#define AT91_TC_EEVTEDG_RISING (1 << 8)
70#define AT91_TC_EEVTEDG_FALLING (2 << 8)
71#define AT91_TC_EEVTEDG_BOTH (3 << 8)
72#define AT91_TC_EEVT (3 << 10) /* Waveform Mode: External Event Selection */
73#define AT91_TC_EEVT_TIOB (0 << 10)
74#define AT91_TC_EEVT_XC0 (1 << 10)
75#define AT91_TC_EEVT_XC1 (2 << 10)
76#define AT91_TC_EEVT_XC2 (3 << 10)
77#define AT91_TC_ENETRG (1 << 12) /* Waveform Mode: External Event Trigger Enable */
78#define AT91_TC_WAVESEL (3 << 13) /* Waveform Mode: Waveform Selection */
79#define AT91_TC_WAVESEL_UP (0 << 13)
80#define AT91_TC_WAVESEL_UP_AUTO (2 << 13)
81#define AT91_TC_WAVESEL_UPDOWN (1 << 13)
82#define AT91_TC_WAVESEL_UPDOWN_AUTO (3 << 13)
83#define AT91_TC_ACPA (3 << 16) /* Waveform Mode: RA Compare Effect on TIOA */
84#define AT91_TC_ACPA_NONE (0 << 16)
85#define AT91_TC_ACPA_SET (1 << 16)
86#define AT91_TC_ACPA_CLEAR (2 << 16)
87#define AT91_TC_ACPA_TOGGLE (3 << 16)
88#define AT91_TC_ACPC (3 << 18) /* Waveform Mode: RC Compre Effect on TIOA */
89#define AT91_TC_ACPC_NONE (0 << 18)
90#define AT91_TC_ACPC_SET (1 << 18)
91#define AT91_TC_ACPC_CLEAR (2 << 18)
92#define AT91_TC_ACPC_TOGGLE (3 << 18)
93#define AT91_TC_AEEVT (3 << 20) /* Waveform Mode: External Event Effect on TIOA */
94#define AT91_TC_AEEVT_NONE (0 << 20)
95#define AT91_TC_AEEVT_SET (1 << 20)
96#define AT91_TC_AEEVT_CLEAR (2 << 20)
97#define AT91_TC_AEEVT_TOGGLE (3 << 20)
98#define AT91_TC_ASWTRG (3 << 22) /* Waveform Mode: Software Trigger Effect on TIOA */
99#define AT91_TC_ASWTRG_NONE (0 << 22)
100#define AT91_TC_ASWTRG_SET (1 << 22)
101#define AT91_TC_ASWTRG_CLEAR (2 << 22)
102#define AT91_TC_ASWTRG_TOGGLE (3 << 22)
103#define AT91_TC_BCPB (3 << 24) /* Waveform Mode: RB Compare Effect on TIOB */
104#define AT91_TC_BCPB_NONE (0 << 24)
105#define AT91_TC_BCPB_SET (1 << 24)
106#define AT91_TC_BCPB_CLEAR (2 << 24)
107#define AT91_TC_BCPB_TOGGLE (3 << 24)
108#define AT91_TC_BCPC (3 << 26) /* Waveform Mode: RC Compare Effect on TIOB */
109#define AT91_TC_BCPC_NONE (0 << 26)
110#define AT91_TC_BCPC_SET (1 << 26)
111#define AT91_TC_BCPC_CLEAR (2 << 26)
112#define AT91_TC_BCPC_TOGGLE (3 << 26)
113#define AT91_TC_BEEVT (3 << 28) /* Waveform Mode: External Event Effect on TIOB */
114#define AT91_TC_BEEVT_NONE (0 << 28)
115#define AT91_TC_BEEVT_SET (1 << 28)
116#define AT91_TC_BEEVT_CLEAR (2 << 28)
117#define AT91_TC_BEEVT_TOGGLE (3 << 28)
118#define AT91_TC_BSWTRG (3 << 30) /* Waveform Mode: Software Trigger Effect on TIOB */
119#define AT91_TC_BSWTRG_NONE (0 << 30)
120#define AT91_TC_BSWTRG_SET (1 << 30)
121#define AT91_TC_BSWTRG_CLEAR (2 << 30)
122#define AT91_TC_BSWTRG_TOGGLE (3 << 30)
123
124#define AT91_TC_CV 0x10 /* Counter Value */
125#define AT91_TC_RA 0x14 /* Register A */
126#define AT91_TC_RB 0x18 /* Register B */
127#define AT91_TC_RC 0x1c /* Register C */
128
129#define AT91_TC_SR 0x20 /* Status Register */
130#define AT91_TC_COVFS (1 << 0) /* Counter Overflow Status */
131#define AT91_TC_LOVRS (1 << 1) /* Load Overrun Status */
132#define AT91_TC_CPAS (1 << 2) /* RA Compare Status */
133#define AT91_TC_CPBS (1 << 3) /* RB Compare Status */
134#define AT91_TC_CPCS (1 << 4) /* RC Compare Status */
135#define AT91_TC_LDRAS (1 << 5) /* RA Loading Status */
136#define AT91_TC_LDRBS (1 << 6) /* RB Loading Status */
137#define AT91_TC_ETRGS (1 << 7) /* External Trigger Status */
138#define AT91_TC_CLKSTA (1 << 16) /* Clock Enabling Status */
139#define AT91_TC_MTIOA (1 << 17) /* TIOA Mirror */
140#define AT91_TC_MTIOB (1 << 18) /* TIOB Mirror */
141
142#define AT91_TC_IER 0x24 /* Interrupt Enable Register */
143#define AT91_TC_IDR 0x28 /* Interrupt Disable Register */
144#define AT91_TC_IMR 0x2c /* Interrupt Mask Register */
145
146#endif
diff --git a/arch/arm/mach-at91/include/mach/at91_twi.h b/arch/arm/mach-at91/include/mach/at91_twi.h
new file mode 100644
index 000000000000..bb2880f6ba37
--- /dev/null
+++ b/arch/arm/mach-at91/include/mach/at91_twi.h
@@ -0,0 +1,68 @@
1/*
2 * arch/arm/mach-at91/include/mach/at91_twi.h
3 *
4 * Copyright (C) 2005 Ivan Kokshaysky
5 * Copyright (C) SAN People
6 *
7 * Two-wire Interface (TWI) registers.
8 * Based on AT91RM9200 datasheet revision E.
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 */
15
16#ifndef AT91_TWI_H
17#define AT91_TWI_H
18
19#define AT91_TWI_CR 0x00 /* Control Register */
20#define AT91_TWI_START (1 << 0) /* Send a Start Condition */
21#define AT91_TWI_STOP (1 << 1) /* Send a Stop Condition */
22#define AT91_TWI_MSEN (1 << 2) /* Master Transfer Enable */
23#define AT91_TWI_MSDIS (1 << 3) /* Master Transfer Disable */
24#define AT91_TWI_SVEN (1 << 4) /* Slave Transfer Enable [SAM9260 only] */
25#define AT91_TWI_SVDIS (1 << 5) /* Slave Transfer Disable [SAM9260 only] */
26#define AT91_TWI_SWRST (1 << 7) /* Software Reset */
27
28#define AT91_TWI_MMR 0x04 /* Master Mode Register */
29#define AT91_TWI_IADRSZ (3 << 8) /* Internal Device Address Size */
30#define AT91_TWI_IADRSZ_NO (0 << 8)
31#define AT91_TWI_IADRSZ_1 (1 << 8)
32#define AT91_TWI_IADRSZ_2 (2 << 8)
33#define AT91_TWI_IADRSZ_3 (3 << 8)
34#define AT91_TWI_MREAD (1 << 12) /* Master Read Direction */
35#define AT91_TWI_DADR (0x7f << 16) /* Device Address */
36
37#define AT91_TWI_SMR 0x08 /* Slave Mode Register [SAM9260 only] */
38#define AT91_TWI_SADR (0x7f << 16) /* Slave Address */
39
40#define AT91_TWI_IADR 0x0c /* Internal Address Register */
41
42#define AT91_TWI_CWGR 0x10 /* Clock Waveform Generator Register */
43#define AT91_TWI_CLDIV (0xff << 0) /* Clock Low Divisor */
44#define AT91_TWI_CHDIV (0xff << 8) /* Clock High Divisor */
45#define AT91_TWI_CKDIV (7 << 16) /* Clock Divider */
46
47#define AT91_TWI_SR 0x20 /* Status Register */
48#define AT91_TWI_TXCOMP (1 << 0) /* Transmission Complete */
49#define AT91_TWI_RXRDY (1 << 1) /* Receive Holding Register Ready */
50#define AT91_TWI_TXRDY (1 << 2) /* Transmit Holding Register Ready */
51#define AT91_TWI_SVREAD (1 << 3) /* Slave Read [SAM9260 only] */
52#define AT91_TWI_SVACC (1 << 4) /* Slave Access [SAM9260 only] */
53#define AT91_TWI_GACC (1 << 5) /* General Call Access [SAM9260 only] */
54#define AT91_TWI_OVRE (1 << 6) /* Overrun Error [AT91RM9200 only] */
55#define AT91_TWI_UNRE (1 << 7) /* Underrun Error [AT91RM9200 only] */
56#define AT91_TWI_NACK (1 << 8) /* Not Acknowledged */
57#define AT91_TWI_ARBLST (1 << 9) /* Arbitration Lost [SAM9260 only] */
58#define AT91_TWI_SCLWS (1 << 10) /* Clock Wait State [SAM9260 only] */
59#define AT91_TWI_EOSACC (1 << 11) /* End of Slave Address [SAM9260 only] */
60
61#define AT91_TWI_IER 0x24 /* Interrupt Enable Register */
62#define AT91_TWI_IDR 0x28 /* Interrupt Disable Register */
63#define AT91_TWI_IMR 0x2c /* Interrupt Mask Register */
64#define AT91_TWI_RHR 0x30 /* Receive Holding Register */
65#define AT91_TWI_THR 0x34 /* Transmit Holding Register */
66
67#endif
68
diff --git a/arch/arm/mach-at91/include/mach/at91_wdt.h b/arch/arm/mach-at91/include/mach/at91_wdt.h
new file mode 100644
index 000000000000..973b4526a98e
--- /dev/null
+++ b/arch/arm/mach-at91/include/mach/at91_wdt.h
@@ -0,0 +1,34 @@
1/*
2 * arch/arm/mach-at91/include/mach/at91_wdt.h
3 *
4 * Watchdog Timer (WDT) - System peripherals regsters.
5 * Based on AT91SAM9261 datasheet revision D.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 */
12
13#ifndef AT91_WDT_H
14#define AT91_WDT_H
15
16#define AT91_WDT_CR (AT91_WDT + 0x00) /* Watchdog Control Register */
17#define AT91_WDT_WDRSTT (1 << 0) /* Restart */
18#define AT91_WDT_KEY (0xa5 << 24) /* KEY Password */
19
20#define AT91_WDT_MR (AT91_WDT + 0x04) /* Watchdog Mode Register */
21#define AT91_WDT_WDV (0xfff << 0) /* Counter Value */
22#define AT91_WDT_WDFIEN (1 << 12) /* Fault Interrupt Enable */
23#define AT91_WDT_WDRSTEN (1 << 13) /* Reset Processor */
24#define AT91_WDT_WDRPROC (1 << 14) /* Timer Restart */
25#define AT91_WDT_WDDIS (1 << 15) /* Watchdog Disable */
26#define AT91_WDT_WDD (0xfff << 16) /* Delta Value */
27#define AT91_WDT_WDDBGHLT (1 << 28) /* Debug Halt */
28#define AT91_WDT_WDIDLEHLT (1 << 29) /* Idle Halt */
29
30#define AT91_WDT_SR (AT91_WDT + 0x08) /* Watchdog Status Register */
31#define AT91_WDT_WDUNF (1 << 0) /* Watchdog Underflow */
32#define AT91_WDT_WDERR (1 << 1) /* Watchdog Error */
33
34#endif
diff --git a/arch/arm/mach-at91/include/mach/at91cap9.h b/arch/arm/mach-at91/include/mach/at91cap9.h
new file mode 100644
index 000000000000..4a4b64135a92
--- /dev/null
+++ b/arch/arm/mach-at91/include/mach/at91cap9.h
@@ -0,0 +1,126 @@
1/*
2 * arch/arm/mach-at91/include/mach/at91cap9.h
3 *
4 * Copyright (C) 2007 Stelian Pop <stelian.pop@leadtechdesign.com>
5 * Copyright (C) 2007 Lead Tech Design <www.leadtechdesign.com>
6 * Copyright (C) 2007 Atmel Corporation.
7 *
8 * Common definitions.
9 * Based on AT91CAP9 datasheet revision B (Preliminary).
10 *
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
15 */
16
17#ifndef AT91CAP9_H
18#define AT91CAP9_H
19
20/*
21 * Peripheral identifiers/interrupts.
22 */
23#define AT91_ID_FIQ 0 /* Advanced Interrupt Controller (FIQ) */
24#define AT91_ID_SYS 1 /* System Peripherals */
25#define AT91CAP9_ID_PIOABCD 2 /* Parallel IO Controller A, B, C and D */
26#define AT91CAP9_ID_MPB0 3 /* MP Block Peripheral 0 */
27#define AT91CAP9_ID_MPB1 4 /* MP Block Peripheral 1 */
28#define AT91CAP9_ID_MPB2 5 /* MP Block Peripheral 2 */
29#define AT91CAP9_ID_MPB3 6 /* MP Block Peripheral 3 */
30#define AT91CAP9_ID_MPB4 7 /* MP Block Peripheral 4 */
31#define AT91CAP9_ID_US0 8 /* USART 0 */
32#define AT91CAP9_ID_US1 9 /* USART 1 */
33#define AT91CAP9_ID_US2 10 /* USART 2 */
34#define AT91CAP9_ID_MCI0 11 /* Multimedia Card Interface 0 */
35#define AT91CAP9_ID_MCI1 12 /* Multimedia Card Interface 1 */
36#define AT91CAP9_ID_CAN 13 /* CAN */
37#define AT91CAP9_ID_TWI 14 /* Two-Wire Interface */
38#define AT91CAP9_ID_SPI0 15 /* Serial Peripheral Interface 0 */
39#define AT91CAP9_ID_SPI1 16 /* Serial Peripheral Interface 0 */
40#define AT91CAP9_ID_SSC0 17 /* Serial Synchronous Controller 0 */
41#define AT91CAP9_ID_SSC1 18 /* Serial Synchronous Controller 1 */
42#define AT91CAP9_ID_AC97C 19 /* AC97 Controller */
43#define AT91CAP9_ID_TCB 20 /* Timer Counter 0, 1 and 2 */
44#define AT91CAP9_ID_PWMC 21 /* Pulse Width Modulation Controller */
45#define AT91CAP9_ID_EMAC 22 /* Ethernet */
46#define AT91CAP9_ID_AESTDES 23 /* Advanced Encryption Standard, Triple DES */
47#define AT91CAP9_ID_ADC 24 /* Analog-to-Digital Converter */
48#define AT91CAP9_ID_ISI 25 /* Image Sensor Interface */
49#define AT91CAP9_ID_LCDC 26 /* LCD Controller */
50#define AT91CAP9_ID_DMA 27 /* DMA Controller */
51#define AT91CAP9_ID_UDPHS 28 /* USB High Speed Device Port */
52#define AT91CAP9_ID_UHP 29 /* USB Host Port */
53#define AT91CAP9_ID_IRQ0 30 /* Advanced Interrupt Controller (IRQ0) */
54#define AT91CAP9_ID_IRQ1 31 /* Advanced Interrupt Controller (IRQ1) */
55
56/*
57 * User Peripheral physical base addresses.
58 */
59#define AT91CAP9_BASE_UDPHS 0xfff78000
60#define AT91CAP9_BASE_TCB0 0xfff7c000
61#define AT91CAP9_BASE_TC0 0xfff7c000
62#define AT91CAP9_BASE_TC1 0xfff7c040
63#define AT91CAP9_BASE_TC2 0xfff7c080
64#define AT91CAP9_BASE_MCI0 0xfff80000
65#define AT91CAP9_BASE_MCI1 0xfff84000
66#define AT91CAP9_BASE_TWI 0xfff88000
67#define AT91CAP9_BASE_US0 0xfff8c000
68#define AT91CAP9_BASE_US1 0xfff90000
69#define AT91CAP9_BASE_US2 0xfff94000
70#define AT91CAP9_BASE_SSC0 0xfff98000
71#define AT91CAP9_BASE_SSC1 0xfff9c000
72#define AT91CAP9_BASE_AC97C 0xfffa0000
73#define AT91CAP9_BASE_SPI0 0xfffa4000
74#define AT91CAP9_BASE_SPI1 0xfffa8000
75#define AT91CAP9_BASE_CAN 0xfffac000
76#define AT91CAP9_BASE_PWMC 0xfffb8000
77#define AT91CAP9_BASE_EMAC 0xfffbc000
78#define AT91CAP9_BASE_ADC 0xfffc0000
79#define AT91CAP9_BASE_ISI 0xfffc4000
80#define AT91_BASE_SYS 0xffffe200
81
82/*
83 * System Peripherals (offset from AT91_BASE_SYS)
84 */
85#define AT91_ECC (0xffffe200 - AT91_BASE_SYS)
86#define AT91_BCRAMC (0xffffe400 - AT91_BASE_SYS)
87#define AT91_DDRSDRC (0xffffe600 - AT91_BASE_SYS)
88#define AT91_SMC (0xffffe800 - AT91_BASE_SYS)
89#define AT91_MATRIX (0xffffea00 - AT91_BASE_SYS)
90#define AT91_CCFG (0xffffeb10 - AT91_BASE_SYS)
91#define AT91_DMA (0xffffec00 - AT91_BASE_SYS)
92#define AT91_DBGU (0xffffee00 - AT91_BASE_SYS)
93#define AT91_AIC (0xfffff000 - AT91_BASE_SYS)
94#define AT91_PIOA (0xfffff200 - AT91_BASE_SYS)
95#define AT91_PIOB (0xfffff400 - AT91_BASE_SYS)
96#define AT91_PIOC (0xfffff600 - AT91_BASE_SYS)
97#define AT91_PIOD (0xfffff800 - AT91_BASE_SYS)
98#define AT91_PMC (0xfffffc00 - AT91_BASE_SYS)
99#define AT91_RSTC (0xfffffd00 - AT91_BASE_SYS)
100#define AT91_SHDWC (0xfffffd10 - AT91_BASE_SYS)
101#define AT91_RTT (0xfffffd20 - AT91_BASE_SYS)
102#define AT91_PIT (0xfffffd30 - AT91_BASE_SYS)
103#define AT91_WDT (0xfffffd40 - AT91_BASE_SYS)
104#define AT91_GPBR (0xfffffd50 - AT91_BASE_SYS)
105
106#define AT91_USART0 AT91CAP9_BASE_US0
107#define AT91_USART1 AT91CAP9_BASE_US1
108#define AT91_USART2 AT91CAP9_BASE_US2
109
110
111/*
112 * Internal Memory.
113 */
114#define AT91CAP9_SRAM_BASE 0x00100000 /* Internal SRAM base address */
115#define AT91CAP9_SRAM_SIZE (32 * SZ_1K) /* Internal SRAM size (32Kb) */
116
117#define AT91CAP9_ROM_BASE 0x00400000 /* Internal ROM base address */
118#define AT91CAP9_ROM_SIZE (32 * SZ_1K) /* Internal ROM size (32Kb) */
119
120#define AT91CAP9_LCDC_BASE 0x00500000 /* LCD Controller */
121#define AT91CAP9_UDPHS_FIFO 0x00600000 /* USB High Speed Device Port */
122#define AT91CAP9_UHP_BASE 0x00700000 /* USB Host controller */
123
124#define CONFIG_DRAM_BASE AT91_CHIPSELECT_6
125
126#endif
diff --git a/arch/arm/mach-at91/include/mach/at91cap9_ddrsdr.h b/arch/arm/mach-at91/include/mach/at91cap9_ddrsdr.h
new file mode 100644
index 000000000000..bca878f3bd87
--- /dev/null
+++ b/arch/arm/mach-at91/include/mach/at91cap9_ddrsdr.h
@@ -0,0 +1,100 @@
1/*
2 * arch/arm/mach-at91/include/mach/at91cap9_ddrsdr.h
3 *
4 * DDR/SDR Controller (DDRSDRC) - System peripherals registers.
5 * Based on AT91CAP9 datasheet revision B.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 */
12
13#ifndef AT91CAP9_DDRSDR_H
14#define AT91CAP9_DDRSDR_H
15
16#define AT91_DDRSDRC_MR (AT91_DDRSDRC + 0x00) /* Mode Register */
17#define AT91_DDRSDRC_MODE (0xf << 0) /* Command Mode */
18#define AT91_DDRSDRC_MODE_NORMAL 0
19#define AT91_DDRSDRC_MODE_NOP 1
20#define AT91_DDRSDRC_MODE_PRECHARGE 2
21#define AT91_DDRSDRC_MODE_LMR 3
22#define AT91_DDRSDRC_MODE_REFRESH 4
23#define AT91_DDRSDRC_MODE_EXT_LMR 5
24#define AT91_DDRSDRC_MODE_DEEP 6
25
26#define AT91_DDRSDRC_RTR (AT91_DDRSDRC + 0x04) /* Refresh Timer Register */
27#define AT91_DDRSDRC_COUNT (0xfff << 0) /* Refresh Timer Counter */
28
29#define AT91_DDRSDRC_CR (AT91_DDRSDRC + 0x08) /* Configuration Register */
30#define AT91_DDRSDRC_NC (3 << 0) /* Number of Column Bits */
31#define AT91_DDRSDRC_NC_SDR8 (0 << 0)
32#define AT91_DDRSDRC_NC_SDR9 (1 << 0)
33#define AT91_DDRSDRC_NC_SDR10 (2 << 0)
34#define AT91_DDRSDRC_NC_SDR11 (3 << 0)
35#define AT91_DDRSDRC_NC_DDR9 (0 << 0)
36#define AT91_DDRSDRC_NC_DDR10 (1 << 0)
37#define AT91_DDRSDRC_NC_DDR11 (2 << 0)
38#define AT91_DDRSDRC_NC_DDR12 (3 << 0)
39#define AT91_DDRSDRC_NR (3 << 2) /* Number of Row Bits */
40#define AT91_DDRSDRC_NR_11 (0 << 2)
41#define AT91_DDRSDRC_NR_12 (1 << 2)
42#define AT91_DDRSDRC_NR_13 (2 << 2)
43#define AT91_DDRSDRC_CAS (7 << 4) /* CAS Latency */
44#define AT91_DDRSDRC_CAS_2 (2 << 4)
45#define AT91_DDRSDRC_CAS_3 (3 << 4)
46#define AT91_DDRSDRC_CAS_25 (6 << 4)
47#define AT91_DDRSDRC_DLL (1 << 7) /* Reset DLL */
48#define AT91_DDRSDRC_DICDS (1 << 8) /* Output impedance control */
49
50#define AT91_DDRSDRC_T0PR (AT91_DDRSDRC + 0x0C) /* Timing 0 Register */
51#define AT91_DDRSDRC_TRAS (0xf << 0) /* Active to Precharge delay */
52#define AT91_DDRSDRC_TRCD (0xf << 4) /* Row to Column delay */
53#define AT91_DDRSDRC_TWR (0xf << 8) /* Write recovery delay */
54#define AT91_DDRSDRC_TRC (0xf << 12) /* Row cycle delay */
55#define AT91_DDRSDRC_TRP (0xf << 16) /* Row precharge delay */
56#define AT91_DDRSDRC_TRRD (0xf << 20) /* Active BankA to BankB */
57#define AT91_DDRSDRC_TWTR (1 << 24) /* Internal Write to Read delay */
58#define AT91_DDRSDRC_TMRD (0xf << 28) /* Load mode to active/refresh delay */
59
60#define AT91_DDRSDRC_T1PR (AT91_DDRSDRC + 0x10) /* Timing 1 Register */
61#define AT91_DDRSDRC_TRFC (0x1f << 0) /* Row Cycle Delay */
62#define AT91_DDRSDRC_TXSNR (0xff << 8) /* Exit self-refresh to non-read */
63#define AT91_DDRSDRC_TXSRD (0xff << 16) /* Exit self-refresh to read */
64#define AT91_DDRSDRC_TXP (0xf << 24) /* Exit power-down delay */
65
66#define AT91_DDRSDRC_LPR (AT91_DDRSDRC + 0x18) /* Low Power Register */
67#define AT91_DDRSDRC_LPCB (3 << 0) /* Low-power Configurations */
68#define AT91_DDRSDRC_LPCB_DISABLE 0
69#define AT91_DDRSDRC_LPCB_SELF_REFRESH 1
70#define AT91_DDRSDRC_LPCB_POWER_DOWN 2
71#define AT91_DDRSDRC_LPCB_DEEP_POWER_DOWN 3
72#define AT91_DDRSDRC_CLKFR (1 << 2) /* Clock Frozen */
73#define AT91_DDRSDRC_PASR (7 << 4) /* Partial Array Self Refresh */
74#define AT91_DDRSDRC_TCSR (3 << 8) /* Temperature Compensated Self Refresh */
75#define AT91_DDRSDRC_DS (3 << 10) /* Drive Strength */
76#define AT91_DDRSDRC_TIMEOUT (3 << 12) /* Time to define when Low Power Mode is enabled */
77#define AT91_DDRSDRC_TIMEOUT_0_CLK_CYCLES (0 << 12)
78#define AT91_DDRSDRC_TIMEOUT_64_CLK_CYCLES (1 << 12)
79#define AT91_DDRSDRC_TIMEOUT_128_CLK_CYCLES (2 << 12)
80
81#define AT91_DDRSDRC_MDR (AT91_DDRSDRC + 0x1C) /* Memory Device Register */
82#define AT91_DDRSDRC_MD (3 << 0) /* Memory Device Type */
83#define AT91_DDRSDRC_MD_SDR 0
84#define AT91_DDRSDRC_MD_LOW_POWER_SDR 1
85#define AT91_DDRSDRC_MD_DDR 2
86#define AT91_DDRSDRC_MD_LOW_POWER_DDR 3
87
88#define AT91_DDRSDRC_DLLR (AT91_DDRSDRC + 0x20) /* DLL Information Register */
89#define AT91_DDRSDRC_MDINC (1 << 0) /* Master Delay increment */
90#define AT91_DDRSDRC_MDDEC (1 << 1) /* Master Delay decrement */
91#define AT91_DDRSDRC_MDOVF (1 << 2) /* Master Delay Overflow */
92#define AT91_DDRSDRC_SDCOVF (1 << 3) /* Slave Delay Correction Overflow */
93#define AT91_DDRSDRC_SDCUDF (1 << 4) /* Slave Delay Correction Underflow */
94#define AT91_DDRSDRC_SDERF (1 << 5) /* Slave Delay Correction error */
95#define AT91_DDRSDRC_MDVAL (0xff << 8) /* Master Delay value */
96#define AT91_DDRSDRC_SDVAL (0xff << 16) /* Slave Delay value */
97#define AT91_DDRSDRC_SDCVAL (0xff << 24) /* Slave Delay Correction value */
98
99
100#endif
diff --git a/arch/arm/mach-at91/include/mach/at91cap9_matrix.h b/arch/arm/mach-at91/include/mach/at91cap9_matrix.h
new file mode 100644
index 000000000000..4b9d4aff4b4f
--- /dev/null
+++ b/arch/arm/mach-at91/include/mach/at91cap9_matrix.h
@@ -0,0 +1,137 @@
1/*
2 * arch/arm/mach-at91/include/mach/at91cap9_matrix.h
3 *
4 * Copyright (C) 2007 Stelian Pop <stelian.pop@leadtechdesign.com>
5 * Copyright (C) 2007 Lead Tech Design <www.leadtechdesign.com>
6 * Copyright (C) 2006 Atmel Corporation.
7 *
8 * Memory Controllers (MATRIX, EBI) - System peripherals registers.
9 * Based on AT91CAP9 datasheet revision B (Preliminary).
10 *
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
15 */
16
17#ifndef AT91CAP9_MATRIX_H
18#define AT91CAP9_MATRIX_H
19
20#define AT91_MATRIX_MCFG0 (AT91_MATRIX + 0x00) /* Master Configuration Register 0 */
21#define AT91_MATRIX_MCFG1 (AT91_MATRIX + 0x04) /* Master Configuration Register 1 */
22#define AT91_MATRIX_MCFG2 (AT91_MATRIX + 0x08) /* Master Configuration Register 2 */
23#define AT91_MATRIX_MCFG3 (AT91_MATRIX + 0x0C) /* Master Configuration Register 3 */
24#define AT91_MATRIX_MCFG4 (AT91_MATRIX + 0x10) /* Master Configuration Register 4 */
25#define AT91_MATRIX_MCFG5 (AT91_MATRIX + 0x14) /* Master Configuration Register 5 */
26#define AT91_MATRIX_MCFG6 (AT91_MATRIX + 0x18) /* Master Configuration Register 6 */
27#define AT91_MATRIX_MCFG7 (AT91_MATRIX + 0x1C) /* Master Configuration Register 7 */
28#define AT91_MATRIX_MCFG8 (AT91_MATRIX + 0x20) /* Master Configuration Register 8 */
29#define AT91_MATRIX_MCFG9 (AT91_MATRIX + 0x24) /* Master Configuration Register 9 */
30#define AT91_MATRIX_MCFG10 (AT91_MATRIX + 0x28) /* Master Configuration Register 10 */
31#define AT91_MATRIX_MCFG11 (AT91_MATRIX + 0x2C) /* Master Configuration Register 11 */
32#define AT91_MATRIX_ULBT (7 << 0) /* Undefined Length Burst Type */
33#define AT91_MATRIX_ULBT_INFINITE (0 << 0)
34#define AT91_MATRIX_ULBT_SINGLE (1 << 0)
35#define AT91_MATRIX_ULBT_FOUR (2 << 0)
36#define AT91_MATRIX_ULBT_EIGHT (3 << 0)
37#define AT91_MATRIX_ULBT_SIXTEEN (4 << 0)
38
39#define AT91_MATRIX_SCFG0 (AT91_MATRIX + 0x40) /* Slave Configuration Register 0 */
40#define AT91_MATRIX_SCFG1 (AT91_MATRIX + 0x44) /* Slave Configuration Register 1 */
41#define AT91_MATRIX_SCFG2 (AT91_MATRIX + 0x48) /* Slave Configuration Register 2 */
42#define AT91_MATRIX_SCFG3 (AT91_MATRIX + 0x4C) /* Slave Configuration Register 3 */
43#define AT91_MATRIX_SCFG4 (AT91_MATRIX + 0x50) /* Slave Configuration Register 4 */
44#define AT91_MATRIX_SCFG5 (AT91_MATRIX + 0x54) /* Slave Configuration Register 5 */
45#define AT91_MATRIX_SCFG6 (AT91_MATRIX + 0x58) /* Slave Configuration Register 6 */
46#define AT91_MATRIX_SCFG7 (AT91_MATRIX + 0x5C) /* Slave Configuration Register 7 */
47#define AT91_MATRIX_SCFG8 (AT91_MATRIX + 0x60) /* Slave Configuration Register 8 */
48#define AT91_MATRIX_SCFG9 (AT91_MATRIX + 0x64) /* Slave Configuration Register 9 */
49#define AT91_MATRIX_SLOT_CYCLE (0xff << 0) /* Maximum Number of Allowed Cycles for a Burst */
50#define AT91_MATRIX_DEFMSTR_TYPE (3 << 16) /* Default Master Type */
51#define AT91_MATRIX_DEFMSTR_TYPE_NONE (0 << 16)
52#define AT91_MATRIX_DEFMSTR_TYPE_LAST (1 << 16)
53#define AT91_MATRIX_DEFMSTR_TYPE_FIXED (2 << 16)
54#define AT91_MATRIX_FIXED_DEFMSTR (0xf << 18) /* Fixed Index of Default Master */
55#define AT91_MATRIX_ARBT (3 << 24) /* Arbitration Type */
56#define AT91_MATRIX_ARBT_ROUND_ROBIN (0 << 24)
57#define AT91_MATRIX_ARBT_FIXED_PRIORITY (1 << 24)
58
59#define AT91_MATRIX_PRAS0 (AT91_MATRIX + 0x80) /* Priority Register A for Slave 0 */
60#define AT91_MATRIX_PRBS0 (AT91_MATRIX + 0x84) /* Priority Register B for Slave 0 */
61#define AT91_MATRIX_PRAS1 (AT91_MATRIX + 0x88) /* Priority Register A for Slave 1 */
62#define AT91_MATRIX_PRBS1 (AT91_MATRIX + 0x8C) /* Priority Register B for Slave 1 */
63#define AT91_MATRIX_PRAS2 (AT91_MATRIX + 0x90) /* Priority Register A for Slave 2 */
64#define AT91_MATRIX_PRBS2 (AT91_MATRIX + 0x94) /* Priority Register B for Slave 2 */
65#define AT91_MATRIX_PRAS3 (AT91_MATRIX + 0x98) /* Priority Register A for Slave 3 */
66#define AT91_MATRIX_PRBS3 (AT91_MATRIX + 0x9C) /* Priority Register B for Slave 3 */
67#define AT91_MATRIX_PRAS4 (AT91_MATRIX + 0xA0) /* Priority Register A for Slave 4 */
68#define AT91_MATRIX_PRBS4 (AT91_MATRIX + 0xA4) /* Priority Register B for Slave 4 */
69#define AT91_MATRIX_PRAS5 (AT91_MATRIX + 0xA8) /* Priority Register A for Slave 5 */
70#define AT91_MATRIX_PRBS5 (AT91_MATRIX + 0xAC) /* Priority Register B for Slave 5 */
71#define AT91_MATRIX_PRAS6 (AT91_MATRIX + 0xB0) /* Priority Register A for Slave 6 */
72#define AT91_MATRIX_PRBS6 (AT91_MATRIX + 0xB4) /* Priority Register B for Slave 6 */
73#define AT91_MATRIX_PRAS7 (AT91_MATRIX + 0xB8) /* Priority Register A for Slave 7 */
74#define AT91_MATRIX_PRBS7 (AT91_MATRIX + 0xBC) /* Priority Register B for Slave 7 */
75#define AT91_MATRIX_PRAS8 (AT91_MATRIX + 0xC0) /* Priority Register A for Slave 8 */
76#define AT91_MATRIX_PRBS8 (AT91_MATRIX + 0xC4) /* Priority Register B for Slave 8 */
77#define AT91_MATRIX_PRAS9 (AT91_MATRIX + 0xC8) /* Priority Register A for Slave 9 */
78#define AT91_MATRIX_PRBS9 (AT91_MATRIX + 0xCC) /* Priority Register B for Slave 9 */
79#define AT91_MATRIX_M0PR (3 << 0) /* Master 0 Priority */
80#define AT91_MATRIX_M1PR (3 << 4) /* Master 1 Priority */
81#define AT91_MATRIX_M2PR (3 << 8) /* Master 2 Priority */
82#define AT91_MATRIX_M3PR (3 << 12) /* Master 3 Priority */
83#define AT91_MATRIX_M4PR (3 << 16) /* Master 4 Priority */
84#define AT91_MATRIX_M5PR (3 << 20) /* Master 5 Priority */
85#define AT91_MATRIX_M6PR (3 << 24) /* Master 6 Priority */
86#define AT91_MATRIX_M7PR (3 << 28) /* Master 7 Priority */
87#define AT91_MATRIX_M8PR (3 << 0) /* Master 8 Priority (in Register B) */
88#define AT91_MATRIX_M9PR (3 << 4) /* Master 9 Priority (in Register B) */
89#define AT91_MATRIX_M10PR (3 << 8) /* Master 10 Priority (in Register B) */
90#define AT91_MATRIX_M11PR (3 << 12) /* Master 11 Priority (in Register B) */
91
92#define AT91_MATRIX_MRCR (AT91_MATRIX + 0x100) /* Master Remap Control Register */
93#define AT91_MATRIX_RCB0 (1 << 0) /* Remap Command for AHB Master 0 (ARM926EJ-S Instruction Master) */
94#define AT91_MATRIX_RCB1 (1 << 1) /* Remap Command for AHB Master 1 (ARM926EJ-S Data Master) */
95#define AT91_MATRIX_RCB2 (1 << 2)
96#define AT91_MATRIX_RCB3 (1 << 3)
97#define AT91_MATRIX_RCB4 (1 << 4)
98#define AT91_MATRIX_RCB5 (1 << 5)
99#define AT91_MATRIX_RCB6 (1 << 6)
100#define AT91_MATRIX_RCB7 (1 << 7)
101#define AT91_MATRIX_RCB8 (1 << 8)
102#define AT91_MATRIX_RCB9 (1 << 9)
103#define AT91_MATRIX_RCB10 (1 << 10)
104#define AT91_MATRIX_RCB11 (1 << 11)
105
106#define AT91_MPBS0_SFR (AT91_MATRIX + 0x114) /* MPBlock Slave 0 Special Function Register */
107#define AT91_MPBS1_SFR (AT91_MATRIX + 0x11C) /* MPBlock Slave 1 Special Function Register */
108
109#define AT91_MATRIX_UDPHS (AT91_MATRIX + 0x118) /* USBHS Special Function Register [AT91CAP9 only] */
110#define AT91_MATRIX_SELECT_UDPHS (0 << 31) /* select High Speed UDP */
111#define AT91_MATRIX_SELECT_UDP (1 << 31) /* select standard UDP */
112#define AT91_MATRIX_UDPHS_BYPASS_LOCK (1 << 30) /* bypass lock bit */
113
114#define AT91_MATRIX_EBICSA (AT91_MATRIX + 0x120) /* EBI Chip Select Assignment Register */
115#define AT91_MATRIX_EBI_CS1A (1 << 1) /* Chip Select 1 Assignment */
116#define AT91_MATRIX_EBI_CS1A_SMC (0 << 1)
117#define AT91_MATRIX_EBI_CS1A_BCRAMC (1 << 1)
118#define AT91_MATRIX_EBI_CS3A (1 << 3) /* Chip Select 3 Assignment */
119#define AT91_MATRIX_EBI_CS3A_SMC (0 << 3)
120#define AT91_MATRIX_EBI_CS3A_SMC_SMARTMEDIA (1 << 3)
121#define AT91_MATRIX_EBI_CS4A (1 << 4) /* Chip Select 4 Assignment */
122#define AT91_MATRIX_EBI_CS4A_SMC (0 << 4)
123#define AT91_MATRIX_EBI_CS4A_SMC_CF1 (1 << 4)
124#define AT91_MATRIX_EBI_CS5A (1 << 5) /* Chip Select 5 Assignment */
125#define AT91_MATRIX_EBI_CS5A_SMC (0 << 5)
126#define AT91_MATRIX_EBI_CS5A_SMC_CF2 (1 << 5)
127#define AT91_MATRIX_EBI_DBPUC (1 << 8) /* Data Bus Pull-up Configuration */
128#define AT91_MATRIX_EBI_DQSPDC (1 << 9) /* Data Qualifier Strobe Pull-Down Configuration */
129#define AT91_MATRIX_EBI_VDDIOMSEL (1 << 16) /* Memory voltage selection */
130#define AT91_MATRIX_EBI_VDDIOMSEL_1_8V (0 << 16)
131#define AT91_MATRIX_EBI_VDDIOMSEL_3_3V (1 << 16)
132
133#define AT91_MPBS2_SFR (AT91_MATRIX + 0x12C) /* MPBlock Slave 2 Special Function Register */
134#define AT91_MPBS3_SFR (AT91_MATRIX + 0x130) /* MPBlock Slave 3 Special Function Register */
135#define AT91_APB_SFR (AT91_MATRIX + 0x134) /* APB Bridge Special Function Register */
136
137#endif
diff --git a/arch/arm/mach-at91/include/mach/at91rm9200.h b/arch/arm/mach-at91/include/mach/at91rm9200.h
new file mode 100644
index 000000000000..78983155a074
--- /dev/null
+++ b/arch/arm/mach-at91/include/mach/at91rm9200.h
@@ -0,0 +1,115 @@
1/*
2 * arch/arm/mach-at91/include/mach/at91rm9200.h
3 *
4 * Copyright (C) 2005 Ivan Kokshaysky
5 * Copyright (C) SAN People
6 *
7 * Common definitions.
8 * Based on AT91RM9200 datasheet revision E.
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 */
15
16#ifndef AT91RM9200_H
17#define AT91RM9200_H
18
19/*
20 * Peripheral identifiers/interrupts.
21 */
22#define AT91_ID_FIQ 0 /* Advanced Interrupt Controller (FIQ) */
23#define AT91_ID_SYS 1 /* System Peripheral */
24#define AT91RM9200_ID_PIOA 2 /* Parallel IO Controller A */
25#define AT91RM9200_ID_PIOB 3 /* Parallel IO Controller B */
26#define AT91RM9200_ID_PIOC 4 /* Parallel IO Controller C */
27#define AT91RM9200_ID_PIOD 5 /* Parallel IO Controller D */
28#define AT91RM9200_ID_US0 6 /* USART 0 */
29#define AT91RM9200_ID_US1 7 /* USART 1 */
30#define AT91RM9200_ID_US2 8 /* USART 2 */
31#define AT91RM9200_ID_US3 9 /* USART 3 */
32#define AT91RM9200_ID_MCI 10 /* Multimedia Card Interface */
33#define AT91RM9200_ID_UDP 11 /* USB Device Port */
34#define AT91RM9200_ID_TWI 12 /* Two-Wire Interface */
35#define AT91RM9200_ID_SPI 13 /* Serial Peripheral Interface */
36#define AT91RM9200_ID_SSC0 14 /* Serial Synchronous Controller 0 */
37#define AT91RM9200_ID_SSC1 15 /* Serial Synchronous Controller 1 */
38#define AT91RM9200_ID_SSC2 16 /* Serial Synchronous Controller 2 */
39#define AT91RM9200_ID_TC0 17 /* Timer Counter 0 */
40#define AT91RM9200_ID_TC1 18 /* Timer Counter 1 */
41#define AT91RM9200_ID_TC2 19 /* Timer Counter 2 */
42#define AT91RM9200_ID_TC3 20 /* Timer Counter 3 */
43#define AT91RM9200_ID_TC4 21 /* Timer Counter 4 */
44#define AT91RM9200_ID_TC5 22 /* Timer Counter 5 */
45#define AT91RM9200_ID_UHP 23 /* USB Host port */
46#define AT91RM9200_ID_EMAC 24 /* Ethernet MAC */
47#define AT91RM9200_ID_IRQ0 25 /* Advanced Interrupt Controller (IRQ0) */
48#define AT91RM9200_ID_IRQ1 26 /* Advanced Interrupt Controller (IRQ1) */
49#define AT91RM9200_ID_IRQ2 27 /* Advanced Interrupt Controller (IRQ2) */
50#define AT91RM9200_ID_IRQ3 28 /* Advanced Interrupt Controller (IRQ3) */
51#define AT91RM9200_ID_IRQ4 29 /* Advanced Interrupt Controller (IRQ4) */
52#define AT91RM9200_ID_IRQ5 30 /* Advanced Interrupt Controller (IRQ5) */
53#define AT91RM9200_ID_IRQ6 31 /* Advanced Interrupt Controller (IRQ6) */
54
55
56/*
57 * Peripheral physical base addresses.
58 */
59#define AT91RM9200_BASE_TCB0 0xfffa0000
60#define AT91RM9200_BASE_TC0 0xfffa0000
61#define AT91RM9200_BASE_TC1 0xfffa0040
62#define AT91RM9200_BASE_TC2 0xfffa0080
63#define AT91RM9200_BASE_TCB1 0xfffa4000
64#define AT91RM9200_BASE_TC3 0xfffa4000
65#define AT91RM9200_BASE_TC4 0xfffa4040
66#define AT91RM9200_BASE_TC5 0xfffa4080
67#define AT91RM9200_BASE_UDP 0xfffb0000
68#define AT91RM9200_BASE_MCI 0xfffb4000
69#define AT91RM9200_BASE_TWI 0xfffb8000
70#define AT91RM9200_BASE_EMAC 0xfffbc000
71#define AT91RM9200_BASE_US0 0xfffc0000
72#define AT91RM9200_BASE_US1 0xfffc4000
73#define AT91RM9200_BASE_US2 0xfffc8000
74#define AT91RM9200_BASE_US3 0xfffcc000
75#define AT91RM9200_BASE_SSC0 0xfffd0000
76#define AT91RM9200_BASE_SSC1 0xfffd4000
77#define AT91RM9200_BASE_SSC2 0xfffd8000
78#define AT91RM9200_BASE_SPI 0xfffe0000
79#define AT91_BASE_SYS 0xfffff000
80
81
82/*
83 * System Peripherals (offset from AT91_BASE_SYS)
84 */
85#define AT91_AIC (0xfffff000 - AT91_BASE_SYS) /* Advanced Interrupt Controller */
86#define AT91_DBGU (0xfffff200 - AT91_BASE_SYS) /* Debug Unit */
87#define AT91_PIOA (0xfffff400 - AT91_BASE_SYS) /* PIO Controller A */
88#define AT91_PIOB (0xfffff600 - AT91_BASE_SYS) /* PIO Controller B */
89#define AT91_PIOC (0xfffff800 - AT91_BASE_SYS) /* PIO Controller C */
90#define AT91_PIOD (0xfffffa00 - AT91_BASE_SYS) /* PIO Controller D */
91#define AT91_PMC (0xfffffc00 - AT91_BASE_SYS) /* Power Management Controller */
92#define AT91_ST (0xfffffd00 - AT91_BASE_SYS) /* System Timer */
93#define AT91_RTC (0xfffffe00 - AT91_BASE_SYS) /* Real-Time Clock */
94#define AT91_MC (0xffffff00 - AT91_BASE_SYS) /* Memory Controllers */
95
96#define AT91_USART0 AT91RM9200_BASE_US0
97#define AT91_USART1 AT91RM9200_BASE_US1
98#define AT91_USART2 AT91RM9200_BASE_US2
99#define AT91_USART3 AT91RM9200_BASE_US3
100
101#define AT91_MATRIX 0 /* not supported */
102
103/*
104 * Internal Memory.
105 */
106#define AT91RM9200_ROM_BASE 0x00100000 /* Internal ROM base address */
107#define AT91RM9200_ROM_SIZE SZ_128K /* Internal ROM size (128Kb) */
108
109#define AT91RM9200_SRAM_BASE 0x00200000 /* Internal SRAM base address */
110#define AT91RM9200_SRAM_SIZE SZ_16K /* Internal SRAM size (16Kb) */
111
112#define AT91RM9200_UHP_BASE 0x00300000 /* USB Host controller */
113
114
115#endif
diff --git a/arch/arm/mach-at91/include/mach/at91rm9200_emac.h b/arch/arm/mach-at91/include/mach/at91rm9200_emac.h
new file mode 100644
index 000000000000..b8260cd8041c
--- /dev/null
+++ b/arch/arm/mach-at91/include/mach/at91rm9200_emac.h
@@ -0,0 +1,138 @@
1/*
2 * arch/arm/mach-at91/include/mach/at91rm9200_emac.h
3 *
4 * Copyright (C) 2005 Ivan Kokshaysky
5 * Copyright (C) SAN People
6 *
7 * Ethernet MAC registers.
8 * Based on AT91RM9200 datasheet revision E.
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 */
15
16#ifndef AT91RM9200_EMAC_H
17#define AT91RM9200_EMAC_H
18
19#define AT91_EMAC_CTL 0x00 /* Control Register */
20#define AT91_EMAC_LB (1 << 0) /* Loopback */
21#define AT91_EMAC_LBL (1 << 1) /* Loopback Local */
22#define AT91_EMAC_RE (1 << 2) /* Receive Enable */
23#define AT91_EMAC_TE (1 << 3) /* Transmit Enable */
24#define AT91_EMAC_MPE (1 << 4) /* Management Port Enable */
25#define AT91_EMAC_CSR (1 << 5) /* Clear Statistics Registers */
26#define AT91_EMAC_INCSTAT (1 << 6) /* Increment Statistics Registers */
27#define AT91_EMAC_WES (1 << 7) /* Write Enable for Statistics Registers */
28#define AT91_EMAC_BP (1 << 8) /* Back Pressure */
29
30#define AT91_EMAC_CFG 0x04 /* Configuration Register */
31#define AT91_EMAC_SPD (1 << 0) /* Speed */
32#define AT91_EMAC_FD (1 << 1) /* Full Duplex */
33#define AT91_EMAC_BR (1 << 2) /* Bit Rate */
34#define AT91_EMAC_CAF (1 << 4) /* Copy All Frames */
35#define AT91_EMAC_NBC (1 << 5) /* No Broadcast */
36#define AT91_EMAC_MTI (1 << 6) /* Multicast Hash Enable */
37#define AT91_EMAC_UNI (1 << 7) /* Unicast Hash Enable */
38#define AT91_EMAC_BIG (1 << 8) /* Receive 1522 Bytes */
39#define AT91_EMAC_EAE (1 << 9) /* External Address Match Enable */
40#define AT91_EMAC_CLK (3 << 10) /* MDC Clock Divisor */
41#define AT91_EMAC_CLK_DIV8 (0 << 10)
42#define AT91_EMAC_CLK_DIV16 (1 << 10)
43#define AT91_EMAC_CLK_DIV32 (2 << 10)
44#define AT91_EMAC_CLK_DIV64 (3 << 10)
45#define AT91_EMAC_RTY (1 << 12) /* Retry Test */
46#define AT91_EMAC_RMII (1 << 13) /* Reduce MII (RMII) */
47
48#define AT91_EMAC_SR 0x08 /* Status Register */
49#define AT91_EMAC_SR_LINK (1 << 0) /* Link */
50#define AT91_EMAC_SR_MDIO (1 << 1) /* MDIO pin */
51#define AT91_EMAC_SR_IDLE (1 << 2) /* PHY idle */
52
53#define AT91_EMAC_TAR 0x0c /* Transmit Address Register */
54
55#define AT91_EMAC_TCR 0x10 /* Transmit Control Register */
56#define AT91_EMAC_LEN (0x7ff << 0) /* Transmit Frame Length */
57#define AT91_EMAC_NCRC (1 << 15) /* No CRC */
58
59#define AT91_EMAC_TSR 0x14 /* Transmit Status Register */
60#define AT91_EMAC_TSR_OVR (1 << 0) /* Transmit Buffer Overrun */
61#define AT91_EMAC_TSR_COL (1 << 1) /* Collision Occurred */
62#define AT91_EMAC_TSR_RLE (1 << 2) /* Retry Limit Exceeded */
63#define AT91_EMAC_TSR_IDLE (1 << 3) /* Transmitter Idle */
64#define AT91_EMAC_TSR_BNQ (1 << 4) /* Transmit Buffer not Queued */
65#define AT91_EMAC_TSR_COMP (1 << 5) /* Transmit Complete */
66#define AT91_EMAC_TSR_UND (1 << 6) /* Transmit Underrun */
67
68#define AT91_EMAC_RBQP 0x18 /* Receive Buffer Queue Pointer */
69
70#define AT91_EMAC_RSR 0x20 /* Receive Status Register */
71#define AT91_EMAC_RSR_BNA (1 << 0) /* Buffer Not Available */
72#define AT91_EMAC_RSR_REC (1 << 1) /* Frame Received */
73#define AT91_EMAC_RSR_OVR (1 << 2) /* RX Overrun */
74
75#define AT91_EMAC_ISR 0x24 /* Interrupt Status Register */
76#define AT91_EMAC_DONE (1 << 0) /* Management Done */
77#define AT91_EMAC_RCOM (1 << 1) /* Receive Complete */
78#define AT91_EMAC_RBNA (1 << 2) /* Receive Buffer Not Available */
79#define AT91_EMAC_TOVR (1 << 3) /* Transmit Buffer Overrun */
80#define AT91_EMAC_TUND (1 << 4) /* Transmit Buffer Underrun */
81#define AT91_EMAC_RTRY (1 << 5) /* Retry Limit */
82#define AT91_EMAC_TBRE (1 << 6) /* Transmit Buffer Register Empty */
83#define AT91_EMAC_TCOM (1 << 7) /* Transmit Complete */
84#define AT91_EMAC_TIDLE (1 << 8) /* Transmit Idle */
85#define AT91_EMAC_LINK (1 << 9) /* Link */
86#define AT91_EMAC_ROVR (1 << 10) /* RX Overrun */
87#define AT91_EMAC_ABT (1 << 11) /* Abort */
88
89#define AT91_EMAC_IER 0x28 /* Interrupt Enable Register */
90#define AT91_EMAC_IDR 0x2c /* Interrupt Disable Register */
91#define AT91_EMAC_IMR 0x30 /* Interrupt Mask Register */
92
93#define AT91_EMAC_MAN 0x34 /* PHY Maintenance Register */
94#define AT91_EMAC_DATA (0xffff << 0) /* MDIO Data */
95#define AT91_EMAC_REGA (0x1f << 18) /* MDIO Register */
96#define AT91_EMAC_PHYA (0x1f << 23) /* MDIO PHY Address */
97#define AT91_EMAC_RW (3 << 28) /* Read/Write operation */
98#define AT91_EMAC_RW_W (1 << 28)
99#define AT91_EMAC_RW_R (2 << 28)
100#define AT91_EMAC_MAN_802_3 0x40020000 /* IEEE 802.3 value */
101
102/*
103 * Statistics Registers.
104 */
105#define AT91_EMAC_FRA 0x40 /* Frames Transmitted OK */
106#define AT91_EMAC_SCOL 0x44 /* Single Collision Frame */
107#define AT91_EMAC_MCOL 0x48 /* Multiple Collision Frame */
108#define AT91_EMAC_OK 0x4c /* Frames Received OK */
109#define AT91_EMAC_SEQE 0x50 /* Frame Check Sequence Error */
110#define AT91_EMAC_ALE 0x54 /* Alignmemt Error */
111#define AT91_EMAC_DTE 0x58 /* Deffered Transmission Frame */
112#define AT91_EMAC_LCOL 0x5c /* Late Collision */
113#define AT91_EMAC_ECOL 0x60 /* Excessive Collision */
114#define AT91_EMAC_TUE 0x64 /* Transmit Underrun Error */
115#define AT91_EMAC_CSE 0x68 /* Carrier Sense Error */
116#define AT91_EMAC_DRFC 0x6c /* Discard RX Frame */
117#define AT91_EMAC_ROV 0x70 /* Receive Overrun */
118#define AT91_EMAC_CDE 0x74 /* Code Error */
119#define AT91_EMAC_ELR 0x78 /* Excessive Length Error */
120#define AT91_EMAC_RJB 0x7c /* Receive Jabber */
121#define AT91_EMAC_USF 0x80 /* Undersize Frame */
122#define AT91_EMAC_SQEE 0x84 /* SQE Test Error */
123
124/*
125 * Address Registers.
126 */
127#define AT91_EMAC_HSL 0x90 /* Hash Address Low [31:0] */
128#define AT91_EMAC_HSH 0x94 /* Hash Address High [63:32] */
129#define AT91_EMAC_SA1L 0x98 /* Specific Address 1 Low, bytes 0-3 */
130#define AT91_EMAC_SA1H 0x9c /* Specific Address 1 High, bytes 4-5 */
131#define AT91_EMAC_SA2L 0xa0 /* Specific Address 2 Low, bytes 0-3 */
132#define AT91_EMAC_SA2H 0xa4 /* Specific Address 2 High, bytes 4-5 */
133#define AT91_EMAC_SA3L 0xa8 /* Specific Address 3 Low, bytes 0-3 */
134#define AT91_EMAC_SA3H 0xac /* Specific Address 3 High, bytes 4-5 */
135#define AT91_EMAC_SA4L 0xb0 /* Specific Address 4 Low, bytes 0-3 */
136#define AT91_EMAC_SA4H 0xb4 /* Specific Address 4 High, bytes 4-5 */
137
138#endif
diff --git a/arch/arm/mach-at91/include/mach/at91rm9200_mc.h b/arch/arm/mach-at91/include/mach/at91rm9200_mc.h
new file mode 100644
index 000000000000..d34e4ed89349
--- /dev/null
+++ b/arch/arm/mach-at91/include/mach/at91rm9200_mc.h
@@ -0,0 +1,160 @@
1/*
2 * arch/arm/mach-at91/include/mach/at91rm9200_mc.h
3 *
4 * Copyright (C) 2005 Ivan Kokshaysky
5 * Copyright (C) SAN People
6 *
7 * Memory Controllers (MC, EBI, SMC, SDRAMC, BFC) - System peripherals registers.
8 * Based on AT91RM9200 datasheet revision E.
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 */
15
16#ifndef AT91RM9200_MC_H
17#define AT91RM9200_MC_H
18
19/* Memory Controller */
20#define AT91_MC_RCR (AT91_MC + 0x00) /* MC Remap Control Register */
21#define AT91_MC_RCB (1 << 0) /* Remap Command Bit */
22
23#define AT91_MC_ASR (AT91_MC + 0x04) /* MC Abort Status Register */
24#define AT91_MC_UNADD (1 << 0) /* Undefined Address Abort Status */
25#define AT91_MC_MISADD (1 << 1) /* Misaligned Address Abort Status */
26#define AT91_MC_ABTSZ (3 << 8) /* Abort Size Status */
27#define AT91_MC_ABTSZ_BYTE (0 << 8)
28#define AT91_MC_ABTSZ_HALFWORD (1 << 8)
29#define AT91_MC_ABTSZ_WORD (2 << 8)
30#define AT91_MC_ABTTYP (3 << 10) /* Abort Type Status */
31#define AT91_MC_ABTTYP_DATAREAD (0 << 10)
32#define AT91_MC_ABTTYP_DATAWRITE (1 << 10)
33#define AT91_MC_ABTTYP_FETCH (2 << 10)
34#define AT91_MC_MST0 (1 << 16) /* ARM920T Abort Source */
35#define AT91_MC_MST1 (1 << 17) /* PDC Abort Source */
36#define AT91_MC_MST2 (1 << 18) /* UHP Abort Source */
37#define AT91_MC_MST3 (1 << 19) /* EMAC Abort Source */
38#define AT91_MC_SVMST0 (1 << 24) /* Saved ARM920T Abort Source */
39#define AT91_MC_SVMST1 (1 << 25) /* Saved PDC Abort Source */
40#define AT91_MC_SVMST2 (1 << 26) /* Saved UHP Abort Source */
41#define AT91_MC_SVMST3 (1 << 27) /* Saved EMAC Abort Source */
42
43#define AT91_MC_AASR (AT91_MC + 0x08) /* MC Abort Address Status Register */
44
45#define AT91_MC_MPR (AT91_MC + 0x0c) /* MC Master Priority Register */
46#define AT91_MPR_MSTP0 (7 << 0) /* ARM920T Priority */
47#define AT91_MPR_MSTP1 (7 << 4) /* PDC Priority */
48#define AT91_MPR_MSTP2 (7 << 8) /* UHP Priority */
49#define AT91_MPR_MSTP3 (7 << 12) /* EMAC Priority */
50
51/* External Bus Interface (EBI) registers */
52#define AT91_EBI_CSA (AT91_MC + 0x60) /* Chip Select Assignment Register */
53#define AT91_EBI_CS0A (1 << 0) /* Chip Select 0 Assignment */
54#define AT91_EBI_CS0A_SMC (0 << 0)
55#define AT91_EBI_CS0A_BFC (1 << 0)
56#define AT91_EBI_CS1A (1 << 1) /* Chip Select 1 Assignment */
57#define AT91_EBI_CS1A_SMC (0 << 1)
58#define AT91_EBI_CS1A_SDRAMC (1 << 1)
59#define AT91_EBI_CS3A (1 << 3) /* Chip Select 2 Assignment */
60#define AT91_EBI_CS3A_SMC (0 << 3)
61#define AT91_EBI_CS3A_SMC_SMARTMEDIA (1 << 3)
62#define AT91_EBI_CS4A (1 << 4) /* Chip Select 3 Assignment */
63#define AT91_EBI_CS4A_SMC (0 << 4)
64#define AT91_EBI_CS4A_SMC_COMPACTFLASH (1 << 4)
65#define AT91_EBI_CFGR (AT91_MC + 0x64) /* Configuration Register */
66#define AT91_EBI_DBPUC (1 << 0) /* Data Bus Pull-Up Configuration */
67
68/* Static Memory Controller (SMC) registers */
69#define AT91_SMC_CSR(n) (AT91_MC + 0x70 + ((n) * 4))/* SMC Chip Select Register */
70#define AT91_SMC_NWS (0x7f << 0) /* Number of Wait States */
71#define AT91_SMC_NWS_(x) ((x) << 0)
72#define AT91_SMC_WSEN (1 << 7) /* Wait State Enable */
73#define AT91_SMC_TDF (0xf << 8) /* Data Float Time */
74#define AT91_SMC_TDF_(x) ((x) << 8)
75#define AT91_SMC_BAT (1 << 12) /* Byte Access Type */
76#define AT91_SMC_DBW (3 << 13) /* Data Bus Width */
77#define AT91_SMC_DBW_16 (1 << 13)
78#define AT91_SMC_DBW_8 (2 << 13)
79#define AT91_SMC_DPR (1 << 15) /* Data Read Protocol */
80#define AT91_SMC_ACSS (3 << 16) /* Address to Chip Select Setup */
81#define AT91_SMC_ACSS_STD (0 << 16)
82#define AT91_SMC_ACSS_1 (1 << 16)
83#define AT91_SMC_ACSS_2 (2 << 16)
84#define AT91_SMC_ACSS_3 (3 << 16)
85#define AT91_SMC_RWSETUP (7 << 24) /* Read & Write Signal Time Setup */
86#define AT91_SMC_RWSETUP_(x) ((x) << 24)
87#define AT91_SMC_RWHOLD (7 << 28) /* Read & Write Signal Hold Time */
88#define AT91_SMC_RWHOLD_(x) ((x) << 28)
89
90/* SDRAM Controller registers */
91#define AT91_SDRAMC_MR (AT91_MC + 0x90) /* Mode Register */
92#define AT91_SDRAMC_MODE (0xf << 0) /* Command Mode */
93#define AT91_SDRAMC_MODE_NORMAL (0 << 0)
94#define AT91_SDRAMC_MODE_NOP (1 << 0)
95#define AT91_SDRAMC_MODE_PRECHARGE (2 << 0)
96#define AT91_SDRAMC_MODE_LMR (3 << 0)
97#define AT91_SDRAMC_MODE_REFRESH (4 << 0)
98#define AT91_SDRAMC_DBW (1 << 4) /* Data Bus Width */
99#define AT91_SDRAMC_DBW_32 (0 << 4)
100#define AT91_SDRAMC_DBW_16 (1 << 4)
101
102#define AT91_SDRAMC_TR (AT91_MC + 0x94) /* Refresh Timer Register */
103#define AT91_SDRAMC_COUNT (0xfff << 0) /* Refresh Timer Count */
104
105#define AT91_SDRAMC_CR (AT91_MC + 0x98) /* Configuration Register */
106#define AT91_SDRAMC_NC (3 << 0) /* Number of Column Bits */
107#define AT91_SDRAMC_NC_8 (0 << 0)
108#define AT91_SDRAMC_NC_9 (1 << 0)
109#define AT91_SDRAMC_NC_10 (2 << 0)
110#define AT91_SDRAMC_NC_11 (3 << 0)
111#define AT91_SDRAMC_NR (3 << 2) /* Number of Row Bits */
112#define AT91_SDRAMC_NR_11 (0 << 2)
113#define AT91_SDRAMC_NR_12 (1 << 2)
114#define AT91_SDRAMC_NR_13 (2 << 2)
115#define AT91_SDRAMC_NB (1 << 4) /* Number of Banks */
116#define AT91_SDRAMC_NB_2 (0 << 4)
117#define AT91_SDRAMC_NB_4 (1 << 4)
118#define AT91_SDRAMC_CAS (3 << 5) /* CAS Latency */
119#define AT91_SDRAMC_CAS_2 (2 << 5)
120#define AT91_SDRAMC_TWR (0xf << 7) /* Write Recovery Delay */
121#define AT91_SDRAMC_TRC (0xf << 11) /* Row Cycle Delay */
122#define AT91_SDRAMC_TRP (0xf << 15) /* Row Precharge Delay */
123#define AT91_SDRAMC_TRCD (0xf << 19) /* Row to Column Delay */
124#define AT91_SDRAMC_TRAS (0xf << 23) /* Active to Precharge Delay */
125#define AT91_SDRAMC_TXSR (0xf << 27) /* Exit Self Refresh to Active Delay */
126
127#define AT91_SDRAMC_SRR (AT91_MC + 0x9c) /* Self Refresh Register */
128#define AT91_SDRAMC_LPR (AT91_MC + 0xa0) /* Low Power Register */
129#define AT91_SDRAMC_IER (AT91_MC + 0xa4) /* Interrupt Enable Register */
130#define AT91_SDRAMC_IDR (AT91_MC + 0xa8) /* Interrupt Disable Register */
131#define AT91_SDRAMC_IMR (AT91_MC + 0xac) /* Interrupt Mask Register */
132#define AT91_SDRAMC_ISR (AT91_MC + 0xb0) /* Interrupt Status Register */
133
134/* Burst Flash Controller register */
135#define AT91_BFC_MR (AT91_MC + 0xc0) /* Mode Register */
136#define AT91_BFC_BFCOM (3 << 0) /* Burst Flash Controller Operating Mode */
137#define AT91_BFC_BFCOM_DISABLED (0 << 0)
138#define AT91_BFC_BFCOM_ASYNC (1 << 0)
139#define AT91_BFC_BFCOM_BURST (2 << 0)
140#define AT91_BFC_BFCC (3 << 2) /* Burst Flash Controller Clock */
141#define AT91_BFC_BFCC_MCK (1 << 2)
142#define AT91_BFC_BFCC_DIV2 (2 << 2)
143#define AT91_BFC_BFCC_DIV4 (3 << 2)
144#define AT91_BFC_AVL (0xf << 4) /* Address Valid Latency */
145#define AT91_BFC_PAGES (7 << 8) /* Page Size */
146#define AT91_BFC_PAGES_NO_PAGE (0 << 8)
147#define AT91_BFC_PAGES_16 (1 << 8)
148#define AT91_BFC_PAGES_32 (2 << 8)
149#define AT91_BFC_PAGES_64 (3 << 8)
150#define AT91_BFC_PAGES_128 (4 << 8)
151#define AT91_BFC_PAGES_256 (5 << 8)
152#define AT91_BFC_PAGES_512 (6 << 8)
153#define AT91_BFC_PAGES_1024 (7 << 8)
154#define AT91_BFC_OEL (3 << 12) /* Output Enable Latency */
155#define AT91_BFC_BAAEN (1 << 16) /* Burst Address Advance Enable */
156#define AT91_BFC_BFOEH (1 << 17) /* Burst Flash Output Enable Handling */
157#define AT91_BFC_MUXEN (1 << 18) /* Multiplexed Bus Enable */
158#define AT91_BFC_RDYEN (1 << 19) /* Ready Enable Mode */
159
160#endif
diff --git a/arch/arm/mach-at91/include/mach/at91sam9260.h b/arch/arm/mach-at91/include/mach/at91sam9260.h
new file mode 100644
index 000000000000..43c396b9b4cb
--- /dev/null
+++ b/arch/arm/mach-at91/include/mach/at91sam9260.h
@@ -0,0 +1,138 @@
1/*
2 * arch/arm/mach-at91/include/mach/at91sam9260.h
3 *
4 * (C) 2006 Andrew Victor
5 *
6 * Common definitions.
7 * Based on AT91SAM9260 datasheet revision A (Preliminary).
8 *
9 * Includes also definitions for AT91SAM9XE and AT91SAM9G families
10 *
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
15 */
16
17#ifndef AT91SAM9260_H
18#define AT91SAM9260_H
19
20/*
21 * Peripheral identifiers/interrupts.
22 */
23#define AT91_ID_FIQ 0 /* Advanced Interrupt Controller (FIQ) */
24#define AT91_ID_SYS 1 /* System Peripherals */
25#define AT91SAM9260_ID_PIOA 2 /* Parallel IO Controller A */
26#define AT91SAM9260_ID_PIOB 3 /* Parallel IO Controller B */
27#define AT91SAM9260_ID_PIOC 4 /* Parallel IO Controller C */
28#define AT91SAM9260_ID_ADC 5 /* Analog-to-Digital Converter */
29#define AT91SAM9260_ID_US0 6 /* USART 0 */
30#define AT91SAM9260_ID_US1 7 /* USART 1 */
31#define AT91SAM9260_ID_US2 8 /* USART 2 */
32#define AT91SAM9260_ID_MCI 9 /* Multimedia Card Interface */
33#define AT91SAM9260_ID_UDP 10 /* USB Device Port */
34#define AT91SAM9260_ID_TWI 11 /* Two-Wire Interface */
35#define AT91SAM9260_ID_SPI0 12 /* Serial Peripheral Interface 0 */
36#define AT91SAM9260_ID_SPI1 13 /* Serial Peripheral Interface 1 */
37#define AT91SAM9260_ID_SSC 14 /* Serial Synchronous Controller */
38#define AT91SAM9260_ID_TC0 17 /* Timer Counter 0 */
39#define AT91SAM9260_ID_TC1 18 /* Timer Counter 1 */
40#define AT91SAM9260_ID_TC2 19 /* Timer Counter 2 */
41#define AT91SAM9260_ID_UHP 20 /* USB Host port */
42#define AT91SAM9260_ID_EMAC 21 /* Ethernet */
43#define AT91SAM9260_ID_ISI 22 /* Image Sensor Interface */
44#define AT91SAM9260_ID_US3 23 /* USART 3 */
45#define AT91SAM9260_ID_US4 24 /* USART 4 */
46#define AT91SAM9260_ID_US5 25 /* USART 5 */
47#define AT91SAM9260_ID_TC3 26 /* Timer Counter 3 */
48#define AT91SAM9260_ID_TC4 27 /* Timer Counter 4 */
49#define AT91SAM9260_ID_TC5 28 /* Timer Counter 5 */
50#define AT91SAM9260_ID_IRQ0 29 /* Advanced Interrupt Controller (IRQ0) */
51#define AT91SAM9260_ID_IRQ1 30 /* Advanced Interrupt Controller (IRQ1) */
52#define AT91SAM9260_ID_IRQ2 31 /* Advanced Interrupt Controller (IRQ2) */
53
54
55/*
56 * User Peripheral physical base addresses.
57 */
58#define AT91SAM9260_BASE_TCB0 0xfffa0000
59#define AT91SAM9260_BASE_TC0 0xfffa0000
60#define AT91SAM9260_BASE_TC1 0xfffa0040
61#define AT91SAM9260_BASE_TC2 0xfffa0080
62#define AT91SAM9260_BASE_UDP 0xfffa4000
63#define AT91SAM9260_BASE_MCI 0xfffa8000
64#define AT91SAM9260_BASE_TWI 0xfffac000
65#define AT91SAM9260_BASE_US0 0xfffb0000
66#define AT91SAM9260_BASE_US1 0xfffb4000
67#define AT91SAM9260_BASE_US2 0xfffb8000
68#define AT91SAM9260_BASE_SSC 0xfffbc000
69#define AT91SAM9260_BASE_ISI 0xfffc0000
70#define AT91SAM9260_BASE_EMAC 0xfffc4000
71#define AT91SAM9260_BASE_SPI0 0xfffc8000
72#define AT91SAM9260_BASE_SPI1 0xfffcc000
73#define AT91SAM9260_BASE_US3 0xfffd0000
74#define AT91SAM9260_BASE_US4 0xfffd4000
75#define AT91SAM9260_BASE_US5 0xfffd8000
76#define AT91SAM9260_BASE_TCB1 0xfffdc000
77#define AT91SAM9260_BASE_TC3 0xfffdc000
78#define AT91SAM9260_BASE_TC4 0xfffdc040
79#define AT91SAM9260_BASE_TC5 0xfffdc080
80#define AT91SAM9260_BASE_ADC 0xfffe0000
81#define AT91_BASE_SYS 0xffffe800
82
83/*
84 * System Peripherals (offset from AT91_BASE_SYS)
85 */
86#define AT91_ECC (0xffffe800 - AT91_BASE_SYS)
87#define AT91_SDRAMC (0xffffea00 - AT91_BASE_SYS)
88#define AT91_SMC (0xffffec00 - AT91_BASE_SYS)
89#define AT91_MATRIX (0xffffee00 - AT91_BASE_SYS)
90#define AT91_CCFG (0xffffef10 - AT91_BASE_SYS)
91#define AT91_AIC (0xfffff000 - AT91_BASE_SYS)
92#define AT91_DBGU (0xfffff200 - AT91_BASE_SYS)
93#define AT91_PIOA (0xfffff400 - AT91_BASE_SYS)
94#define AT91_PIOB (0xfffff600 - AT91_BASE_SYS)
95#define AT91_PIOC (0xfffff800 - AT91_BASE_SYS)
96#define AT91_PMC (0xfffffc00 - AT91_BASE_SYS)
97#define AT91_RSTC (0xfffffd00 - AT91_BASE_SYS)
98#define AT91_SHDWC (0xfffffd10 - AT91_BASE_SYS)
99#define AT91_RTT (0xfffffd20 - AT91_BASE_SYS)
100#define AT91_PIT (0xfffffd30 - AT91_BASE_SYS)
101#define AT91_WDT (0xfffffd40 - AT91_BASE_SYS)
102#define AT91_GPBR (0xfffffd50 - AT91_BASE_SYS)
103
104#define AT91_USART0 AT91SAM9260_BASE_US0
105#define AT91_USART1 AT91SAM9260_BASE_US1
106#define AT91_USART2 AT91SAM9260_BASE_US2
107#define AT91_USART3 AT91SAM9260_BASE_US3
108#define AT91_USART4 AT91SAM9260_BASE_US4
109#define AT91_USART5 AT91SAM9260_BASE_US5
110
111
112/*
113 * Internal Memory.
114 */
115#define AT91SAM9260_ROM_BASE 0x00100000 /* Internal ROM base address */
116#define AT91SAM9260_ROM_SIZE SZ_32K /* Internal ROM size (32Kb) */
117
118#define AT91SAM9260_SRAM0_BASE 0x00200000 /* Internal SRAM 0 base address */
119#define AT91SAM9260_SRAM0_SIZE SZ_4K /* Internal SRAM 0 size (4Kb) */
120#define AT91SAM9260_SRAM1_BASE 0x00300000 /* Internal SRAM 1 base address */
121#define AT91SAM9260_SRAM1_SIZE SZ_4K /* Internal SRAM 1 size (4Kb) */
122
123#define AT91SAM9260_UHP_BASE 0x00500000 /* USB Host controller */
124
125#define AT91SAM9XE_FLASH_BASE 0x00200000 /* Internal FLASH base address */
126#define AT91SAM9XE_SRAM_BASE 0x00300000 /* Internal SRAM base address */
127
128#define AT91SAM9G20_ROM_BASE 0x00100000 /* Internal ROM base address */
129#define AT91SAM9G20_ROM_SIZE SZ_32K /* Internal ROM size (32Kb) */
130
131#define AT91SAM9G20_SRAM0_BASE 0x00200000 /* Internal SRAM 0 base address */
132#define AT91SAM9G20_SRAM0_SIZE SZ_16K /* Internal SRAM 0 size (16Kb) */
133#define AT91SAM9G20_SRAM1_BASE 0x00300000 /* Internal SRAM 1 base address */
134#define AT91SAM9G20_SRAM1_SIZE SZ_16K /* Internal SRAM 1 size (16Kb) */
135
136#define AT91SAM9G20_UHP_BASE 0x00500000 /* USB Host controller */
137
138#endif
diff --git a/arch/arm/mach-at91/include/mach/at91sam9260_matrix.h b/arch/arm/mach-at91/include/mach/at91sam9260_matrix.h
new file mode 100644
index 000000000000..f027de5df956
--- /dev/null
+++ b/arch/arm/mach-at91/include/mach/at91sam9260_matrix.h
@@ -0,0 +1,78 @@
1/*
2 * arch/arm/mach-at91/include/mach/at91sam9260_matrix.h
3 *
4 * Memory Controllers (MATRIX, EBI) - System peripherals registers.
5 * Based on AT91SAM9260 datasheet revision B.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 */
12
13#ifndef AT91SAM9260_MATRIX_H
14#define AT91SAM9260_MATRIX_H
15
16#define AT91_MATRIX_MCFG0 (AT91_MATRIX + 0x00) /* Master Configuration Register 0 */
17#define AT91_MATRIX_MCFG1 (AT91_MATRIX + 0x04) /* Master Configuration Register 1 */
18#define AT91_MATRIX_MCFG2 (AT91_MATRIX + 0x08) /* Master Configuration Register 2 */
19#define AT91_MATRIX_MCFG3 (AT91_MATRIX + 0x0C) /* Master Configuration Register 3 */
20#define AT91_MATRIX_MCFG4 (AT91_MATRIX + 0x10) /* Master Configuration Register 4 */
21#define AT91_MATRIX_MCFG5 (AT91_MATRIX + 0x14) /* Master Configuration Register 5 */
22#define AT91_MATRIX_ULBT (7 << 0) /* Undefined Length Burst Type */
23#define AT91_MATRIX_ULBT_INFINITE (0 << 0)
24#define AT91_MATRIX_ULBT_SINGLE (1 << 0)
25#define AT91_MATRIX_ULBT_FOUR (2 << 0)
26#define AT91_MATRIX_ULBT_EIGHT (3 << 0)
27#define AT91_MATRIX_ULBT_SIXTEEN (4 << 0)
28
29#define AT91_MATRIX_SCFG0 (AT91_MATRIX + 0x40) /* Slave Configuration Register 0 */
30#define AT91_MATRIX_SCFG1 (AT91_MATRIX + 0x44) /* Slave Configuration Register 1 */
31#define AT91_MATRIX_SCFG2 (AT91_MATRIX + 0x48) /* Slave Configuration Register 2 */
32#define AT91_MATRIX_SCFG3 (AT91_MATRIX + 0x4C) /* Slave Configuration Register 3 */
33#define AT91_MATRIX_SCFG4 (AT91_MATRIX + 0x50) /* Slave Configuration Register 4 */
34#define AT91_MATRIX_SLOT_CYCLE (0xff << 0) /* Maximum Number of Allowed Cycles for a Burst */
35#define AT91_MATRIX_DEFMSTR_TYPE (3 << 16) /* Default Master Type */
36#define AT91_MATRIX_DEFMSTR_TYPE_NONE (0 << 16)
37#define AT91_MATRIX_DEFMSTR_TYPE_LAST (1 << 16)
38#define AT91_MATRIX_DEFMSTR_TYPE_FIXED (2 << 16)
39#define AT91_MATRIX_FIXED_DEFMSTR (7 << 18) /* Fixed Index of Default Master */
40#define AT91_MATRIX_ARBT (3 << 24) /* Arbitration Type */
41#define AT91_MATRIX_ARBT_ROUND_ROBIN (0 << 24)
42#define AT91_MATRIX_ARBT_FIXED_PRIORITY (1 << 24)
43
44#define AT91_MATRIX_PRAS0 (AT91_MATRIX + 0x80) /* Priority Register A for Slave 0 */
45#define AT91_MATRIX_PRAS1 (AT91_MATRIX + 0x88) /* Priority Register A for Slave 1 */
46#define AT91_MATRIX_PRAS2 (AT91_MATRIX + 0x90) /* Priority Register A for Slave 2 */
47#define AT91_MATRIX_PRAS3 (AT91_MATRIX + 0x98) /* Priority Register A for Slave 3 */
48#define AT91_MATRIX_PRAS4 (AT91_MATRIX + 0xA0) /* Priority Register A for Slave 4 */
49#define AT91_MATRIX_M0PR (3 << 0) /* Master 0 Priority */
50#define AT91_MATRIX_M1PR (3 << 4) /* Master 1 Priority */
51#define AT91_MATRIX_M2PR (3 << 8) /* Master 2 Priority */
52#define AT91_MATRIX_M3PR (3 << 12) /* Master 3 Priority */
53#define AT91_MATRIX_M4PR (3 << 16) /* Master 4 Priority */
54#define AT91_MATRIX_M5PR (3 << 20) /* Master 5 Priority */
55
56#define AT91_MATRIX_MRCR (AT91_MATRIX + 0x100) /* Master Remap Control Register */
57#define AT91_MATRIX_RCB0 (1 << 0) /* Remap Command for AHB Master 0 (ARM926EJ-S Instruction Master) */
58#define AT91_MATRIX_RCB1 (1 << 1) /* Remap Command for AHB Master 1 (ARM926EJ-S Data Master) */
59
60#define AT91_MATRIX_EBICSA (AT91_MATRIX + 0x11C) /* EBI Chip Select Assignment Register */
61#define AT91_MATRIX_CS1A (1 << 1) /* Chip Select 1 Assignment */
62#define AT91_MATRIX_CS1A_SMC (0 << 1)
63#define AT91_MATRIX_CS1A_SDRAMC (1 << 1)
64#define AT91_MATRIX_CS3A (1 << 3) /* Chip Select 3 Assignment */
65#define AT91_MATRIX_CS3A_SMC (0 << 3)
66#define AT91_MATRIX_CS3A_SMC_SMARTMEDIA (1 << 3)
67#define AT91_MATRIX_CS4A (1 << 4) /* Chip Select 4 Assignment */
68#define AT91_MATRIX_CS4A_SMC (0 << 4)
69#define AT91_MATRIX_CS4A_SMC_CF1 (1 << 4)
70#define AT91_MATRIX_CS5A (1 << 5) /* Chip Select 5 Assignment */
71#define AT91_MATRIX_CS5A_SMC (0 << 5)
72#define AT91_MATRIX_CS5A_SMC_CF2 (1 << 5)
73#define AT91_MATRIX_DBPUC (1 << 8) /* Data Bus Pull-up Configuration */
74#define AT91_MATRIX_VDDIOMSEL (1 << 16) /* Memory voltage selection */
75#define AT91_MATRIX_VDDIOMSEL_1_8V (0 << 16)
76#define AT91_MATRIX_VDDIOMSEL_3_3V (1 << 16)
77
78#endif
diff --git a/arch/arm/mach-at91/include/mach/at91sam9261.h b/arch/arm/mach-at91/include/mach/at91sam9261.h
new file mode 100644
index 000000000000..3a348ca20773
--- /dev/null
+++ b/arch/arm/mach-at91/include/mach/at91sam9261.h
@@ -0,0 +1,105 @@
1/*
2 * arch/arm/mach-at91/include/mach/at91sam9261.h
3 *
4 * Copyright (C) SAN People
5 *
6 * Common definitions.
7 * Based on AT91SAM9261 datasheet revision E. (Preliminary)
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 */
14
15#ifndef AT91SAM9261_H
16#define AT91SAM9261_H
17
18/*
19 * Peripheral identifiers/interrupts.
20 */
21#define AT91_ID_FIQ 0 /* Advanced Interrupt Controller (FIQ) */
22#define AT91_ID_SYS 1 /* System Peripherals */
23#define AT91SAM9261_ID_PIOA 2 /* Parallel IO Controller A */
24#define AT91SAM9261_ID_PIOB 3 /* Parallel IO Controller B */
25#define AT91SAM9261_ID_PIOC 4 /* Parallel IO Controller C */
26#define AT91SAM9261_ID_US0 6 /* USART 0 */
27#define AT91SAM9261_ID_US1 7 /* USART 1 */
28#define AT91SAM9261_ID_US2 8 /* USART 2 */
29#define AT91SAM9261_ID_MCI 9 /* Multimedia Card Interface */
30#define AT91SAM9261_ID_UDP 10 /* USB Device Port */
31#define AT91SAM9261_ID_TWI 11 /* Two-Wire Interface */
32#define AT91SAM9261_ID_SPI0 12 /* Serial Peripheral Interface 0 */
33#define AT91SAM9261_ID_SPI1 13 /* Serial Peripheral Interface 1 */
34#define AT91SAM9261_ID_SSC0 14 /* Serial Synchronous Controller 0 */
35#define AT91SAM9261_ID_SSC1 15 /* Serial Synchronous Controller 1 */
36#define AT91SAM9261_ID_SSC2 16 /* Serial Synchronous Controller 2 */
37#define AT91SAM9261_ID_TC0 17 /* Timer Counter 0 */
38#define AT91SAM9261_ID_TC1 18 /* Timer Counter 1 */
39#define AT91SAM9261_ID_TC2 19 /* Timer Counter 2 */
40#define AT91SAM9261_ID_UHP 20 /* USB Host port */
41#define AT91SAM9261_ID_LCDC 21 /* LDC Controller */
42#define AT91SAM9261_ID_IRQ0 29 /* Advanced Interrupt Controller (IRQ0) */
43#define AT91SAM9261_ID_IRQ1 30 /* Advanced Interrupt Controller (IRQ1) */
44#define AT91SAM9261_ID_IRQ2 31 /* Advanced Interrupt Controller (IRQ2) */
45
46
47/*
48 * User Peripheral physical base addresses.
49 */
50#define AT91SAM9261_BASE_TCB0 0xfffa0000
51#define AT91SAM9261_BASE_TC0 0xfffa0000
52#define AT91SAM9261_BASE_TC1 0xfffa0040
53#define AT91SAM9261_BASE_TC2 0xfffa0080
54#define AT91SAM9261_BASE_UDP 0xfffa4000
55#define AT91SAM9261_BASE_MCI 0xfffa8000
56#define AT91SAM9261_BASE_TWI 0xfffac000
57#define AT91SAM9261_BASE_US0 0xfffb0000
58#define AT91SAM9261_BASE_US1 0xfffb4000
59#define AT91SAM9261_BASE_US2 0xfffb8000
60#define AT91SAM9261_BASE_SSC0 0xfffbc000
61#define AT91SAM9261_BASE_SSC1 0xfffc0000
62#define AT91SAM9261_BASE_SSC2 0xfffc4000
63#define AT91SAM9261_BASE_SPI0 0xfffc8000
64#define AT91SAM9261_BASE_SPI1 0xfffcc000
65#define AT91_BASE_SYS 0xffffea00
66
67
68/*
69 * System Peripherals (offset from AT91_BASE_SYS)
70 */
71#define AT91_SDRAMC (0xffffea00 - AT91_BASE_SYS)
72#define AT91_SMC (0xffffec00 - AT91_BASE_SYS)
73#define AT91_MATRIX (0xffffee00 - AT91_BASE_SYS)
74#define AT91_AIC (0xfffff000 - AT91_BASE_SYS)
75#define AT91_DBGU (0xfffff200 - AT91_BASE_SYS)
76#define AT91_PIOA (0xfffff400 - AT91_BASE_SYS)
77#define AT91_PIOB (0xfffff600 - AT91_BASE_SYS)
78#define AT91_PIOC (0xfffff800 - AT91_BASE_SYS)
79#define AT91_PMC (0xfffffc00 - AT91_BASE_SYS)
80#define AT91_RSTC (0xfffffd00 - AT91_BASE_SYS)
81#define AT91_SHDWC (0xfffffd10 - AT91_BASE_SYS)
82#define AT91_RTT (0xfffffd20 - AT91_BASE_SYS)
83#define AT91_PIT (0xfffffd30 - AT91_BASE_SYS)
84#define AT91_WDT (0xfffffd40 - AT91_BASE_SYS)
85#define AT91_GPBR (0xfffffd50 - AT91_BASE_SYS)
86
87#define AT91_USART0 AT91SAM9261_BASE_US0
88#define AT91_USART1 AT91SAM9261_BASE_US1
89#define AT91_USART2 AT91SAM9261_BASE_US2
90
91
92/*
93 * Internal Memory.
94 */
95#define AT91SAM9261_SRAM_BASE 0x00300000 /* Internal SRAM base address */
96#define AT91SAM9261_SRAM_SIZE 0x00028000 /* Internal SRAM size (160Kb) */
97
98#define AT91SAM9261_ROM_BASE 0x00400000 /* Internal ROM base address */
99#define AT91SAM9261_ROM_SIZE SZ_32K /* Internal ROM size (32Kb) */
100
101#define AT91SAM9261_UHP_BASE 0x00500000 /* USB Host controller */
102#define AT91SAM9261_LCDC_BASE 0x00600000 /* LDC controller */
103
104
105#endif
diff --git a/arch/arm/mach-at91/include/mach/at91sam9261_matrix.h b/arch/arm/mach-at91/include/mach/at91sam9261_matrix.h
new file mode 100644
index 000000000000..db62b1f18300
--- /dev/null
+++ b/arch/arm/mach-at91/include/mach/at91sam9261_matrix.h
@@ -0,0 +1,62 @@
1/*
2 * arch/arm/mach-at91/include/mach/at91sam9261_matrix.h
3 *
4 * Memory Controllers (MATRIX, EBI) - System peripherals registers.
5 * Based on AT91SAM9261 datasheet revision D.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 */
12
13#ifndef AT91SAM9261_MATRIX_H
14#define AT91SAM9261_MATRIX_H
15
16#define AT91_MATRIX_MCFG (AT91_MATRIX + 0x00) /* Master Configuration Register */
17#define AT91_MATRIX_RCB0 (1 << 0) /* Remap Command for AHB Master 0 (ARM926EJ-S Instruction Master) */
18#define AT91_MATRIX_RCB1 (1 << 1) /* Remap Command for AHB Master 1 (ARM926EJ-S Data Master) */
19
20#define AT91_MATRIX_SCFG0 (AT91_MATRIX + 0x04) /* Slave Configuration Register 0 */
21#define AT91_MATRIX_SCFG1 (AT91_MATRIX + 0x08) /* Slave Configuration Register 1 */
22#define AT91_MATRIX_SCFG2 (AT91_MATRIX + 0x0C) /* Slave Configuration Register 2 */
23#define AT91_MATRIX_SCFG3 (AT91_MATRIX + 0x10) /* Slave Configuration Register 3 */
24#define AT91_MATRIX_SCFG4 (AT91_MATRIX + 0x14) /* Slave Configuration Register 4 */
25#define AT91_MATRIX_SLOT_CYCLE (0xff << 0) /* Maximum Number of Allowed Cycles for a Burst */
26#define AT91_MATRIX_DEFMSTR_TYPE (3 << 16) /* Default Master Type */
27#define AT91_MATRIX_DEFMSTR_TYPE_NONE (0 << 16)
28#define AT91_MATRIX_DEFMSTR_TYPE_LAST (1 << 16)
29#define AT91_MATRIX_DEFMSTR_TYPE_FIXED (2 << 16)
30#define AT91_MATRIX_FIXED_DEFMSTR (7 << 18) /* Fixed Index of Default Master */
31
32#define AT91_MATRIX_TCR (AT91_MATRIX + 0x24) /* TCM Configuration Register */
33#define AT91_MATRIX_ITCM_SIZE (0xf << 0) /* Size of ITCM enabled memory block */
34#define AT91_MATRIX_ITCM_0 (0 << 0)
35#define AT91_MATRIX_ITCM_16 (5 << 0)
36#define AT91_MATRIX_ITCM_32 (6 << 0)
37#define AT91_MATRIX_ITCM_64 (7 << 0)
38#define AT91_MATRIX_DTCM_SIZE (0xf << 4) /* Size of DTCM enabled memory block */
39#define AT91_MATRIX_DTCM_0 (0 << 4)
40#define AT91_MATRIX_DTCM_16 (5 << 4)
41#define AT91_MATRIX_DTCM_32 (6 << 4)
42#define AT91_MATRIX_DTCM_64 (7 << 4)
43
44#define AT91_MATRIX_EBICSA (AT91_MATRIX + 0x30) /* EBI Chip Select Assignment Register */
45#define AT91_MATRIX_CS1A (1 << 1) /* Chip Select 1 Assignment */
46#define AT91_MATRIX_CS1A_SMC (0 << 1)
47#define AT91_MATRIX_CS1A_SDRAMC (1 << 1)
48#define AT91_MATRIX_CS3A (1 << 3) /* Chip Select 3 Assignment */
49#define AT91_MATRIX_CS3A_SMC (0 << 3)
50#define AT91_MATRIX_CS3A_SMC_SMARTMEDIA (1 << 3)
51#define AT91_MATRIX_CS4A (1 << 4) /* Chip Select 4 Assignment */
52#define AT91_MATRIX_CS4A_SMC (0 << 4)
53#define AT91_MATRIX_CS4A_SMC_CF1 (1 << 4)
54#define AT91_MATRIX_CS5A (1 << 5) /* Chip Select 5 Assignment */
55#define AT91_MATRIX_CS5A_SMC (0 << 5)
56#define AT91_MATRIX_CS5A_SMC_CF2 (1 << 5)
57#define AT91_MATRIX_DBPUC (1 << 8) /* Data Bus Pull-up Configuration */
58
59#define AT91_MATRIX_USBPUCR (AT91_MATRIX + 0x34) /* USB Pad Pull-Up Control Register */
60#define AT91_MATRIX_USBPUCR_PUON (1 << 30) /* USB Device PAD Pull-up Enable */
61
62#endif
diff --git a/arch/arm/mach-at91/include/mach/at91sam9263.h b/arch/arm/mach-at91/include/mach/at91sam9263.h
new file mode 100644
index 000000000000..2091f1e42d43
--- /dev/null
+++ b/arch/arm/mach-at91/include/mach/at91sam9263.h
@@ -0,0 +1,127 @@
1/*
2 * arch/arm/mach-at91/include/mach/at91sam9263.h
3 *
4 * (C) 2007 Atmel Corporation.
5 *
6 * Common definitions.
7 * Based on AT91SAM9263 datasheet revision B (Preliminary).
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 */
14
15#ifndef AT91SAM9263_H
16#define AT91SAM9263_H
17
18/*
19 * Peripheral identifiers/interrupts.
20 */
21#define AT91_ID_FIQ 0 /* Advanced Interrupt Controller (FIQ) */
22#define AT91_ID_SYS 1 /* System Peripherals */
23#define AT91SAM9263_ID_PIOA 2 /* Parallel IO Controller A */
24#define AT91SAM9263_ID_PIOB 3 /* Parallel IO Controller B */
25#define AT91SAM9263_ID_PIOCDE 4 /* Parallel IO Controller C, D and E */
26#define AT91SAM9263_ID_US0 7 /* USART 0 */
27#define AT91SAM9263_ID_US1 8 /* USART 1 */
28#define AT91SAM9263_ID_US2 9 /* USART 2 */
29#define AT91SAM9263_ID_MCI0 10 /* Multimedia Card Interface 0 */
30#define AT91SAM9263_ID_MCI1 11 /* Multimedia Card Interface 1 */
31#define AT91SAM9263_ID_CAN 12 /* CAN */
32#define AT91SAM9263_ID_TWI 13 /* Two-Wire Interface */
33#define AT91SAM9263_ID_SPI0 14 /* Serial Peripheral Interface 0 */
34#define AT91SAM9263_ID_SPI1 15 /* Serial Peripheral Interface 1 */
35#define AT91SAM9263_ID_SSC0 16 /* Serial Synchronous Controller 0 */
36#define AT91SAM9263_ID_SSC1 17 /* Serial Synchronous Controller 1 */
37#define AT91SAM9263_ID_AC97C 18 /* AC97 Controller */
38#define AT91SAM9263_ID_TCB 19 /* Timer Counter 0, 1 and 2 */
39#define AT91SAM9263_ID_PWMC 20 /* Pulse Width Modulation Controller */
40#define AT91SAM9263_ID_EMAC 21 /* Ethernet */
41#define AT91SAM9263_ID_2DGE 23 /* 2D Graphic Engine */
42#define AT91SAM9263_ID_UDP 24 /* USB Device Port */
43#define AT91SAM9263_ID_ISI 25 /* Image Sensor Interface */
44#define AT91SAM9263_ID_LCDC 26 /* LCD Controller */
45#define AT91SAM9263_ID_DMA 27 /* DMA Controller */
46#define AT91SAM9263_ID_UHP 29 /* USB Host port */
47#define AT91SAM9263_ID_IRQ0 30 /* Advanced Interrupt Controller (IRQ0) */
48#define AT91SAM9263_ID_IRQ1 31 /* Advanced Interrupt Controller (IRQ1) */
49
50
51/*
52 * User Peripheral physical base addresses.
53 */
54#define AT91SAM9263_BASE_UDP 0xfff78000
55#define AT91SAM9263_BASE_TCB0 0xfff7c000
56#define AT91SAM9263_BASE_TC0 0xfff7c000
57#define AT91SAM9263_BASE_TC1 0xfff7c040
58#define AT91SAM9263_BASE_TC2 0xfff7c080
59#define AT91SAM9263_BASE_MCI0 0xfff80000
60#define AT91SAM9263_BASE_MCI1 0xfff84000
61#define AT91SAM9263_BASE_TWI 0xfff88000
62#define AT91SAM9263_BASE_US0 0xfff8c000
63#define AT91SAM9263_BASE_US1 0xfff90000
64#define AT91SAM9263_BASE_US2 0xfff94000
65#define AT91SAM9263_BASE_SSC0 0xfff98000
66#define AT91SAM9263_BASE_SSC1 0xfff9c000
67#define AT91SAM9263_BASE_AC97C 0xfffa0000
68#define AT91SAM9263_BASE_SPI0 0xfffa4000
69#define AT91SAM9263_BASE_SPI1 0xfffa8000
70#define AT91SAM9263_BASE_CAN 0xfffac000
71#define AT91SAM9263_BASE_PWMC 0xfffb8000
72#define AT91SAM9263_BASE_EMAC 0xfffbc000
73#define AT91SAM9263_BASE_ISI 0xfffc4000
74#define AT91SAM9263_BASE_2DGE 0xfffc8000
75#define AT91_BASE_SYS 0xffffe000
76
77/*
78 * System Peripherals (offset from AT91_BASE_SYS)
79 */
80#define AT91_ECC0 (0xffffe000 - AT91_BASE_SYS)
81#define AT91_SDRAMC0 (0xffffe200 - AT91_BASE_SYS)
82#define AT91_SMC0 (0xffffe400 - AT91_BASE_SYS)
83#define AT91_ECC1 (0xffffe600 - AT91_BASE_SYS)
84#define AT91_SDRAMC1 (0xffffe800 - AT91_BASE_SYS)
85#define AT91_SMC1 (0xffffea00 - AT91_BASE_SYS)
86#define AT91_MATRIX (0xffffec00 - AT91_BASE_SYS)
87#define AT91_CCFG (0xffffed10 - AT91_BASE_SYS)
88#define AT91_DBGU (0xffffee00 - AT91_BASE_SYS)
89#define AT91_AIC (0xfffff000 - AT91_BASE_SYS)
90#define AT91_PIOA (0xfffff200 - AT91_BASE_SYS)
91#define AT91_PIOB (0xfffff400 - AT91_BASE_SYS)
92#define AT91_PIOC (0xfffff600 - AT91_BASE_SYS)
93#define AT91_PIOD (0xfffff800 - AT91_BASE_SYS)
94#define AT91_PIOE (0xfffffa00 - AT91_BASE_SYS)
95#define AT91_PMC (0xfffffc00 - AT91_BASE_SYS)
96#define AT91_RSTC (0xfffffd00 - AT91_BASE_SYS)
97#define AT91_SHDWC (0xfffffd10 - AT91_BASE_SYS)
98#define AT91_RTT0 (0xfffffd20 - AT91_BASE_SYS)
99#define AT91_PIT (0xfffffd30 - AT91_BASE_SYS)
100#define AT91_WDT (0xfffffd40 - AT91_BASE_SYS)
101#define AT91_RTT1 (0xfffffd50 - AT91_BASE_SYS)
102#define AT91_GPBR (0xfffffd60 - AT91_BASE_SYS)
103
104#define AT91_USART0 AT91SAM9263_BASE_US0
105#define AT91_USART1 AT91SAM9263_BASE_US1
106#define AT91_USART2 AT91SAM9263_BASE_US2
107
108#define AT91_SMC AT91_SMC0
109
110/*
111 * Internal Memory.
112 */
113#define AT91SAM9263_SRAM0_BASE 0x00300000 /* Internal SRAM 0 base address */
114#define AT91SAM9263_SRAM0_SIZE (80 * SZ_1K) /* Internal SRAM 0 size (80Kb) */
115
116#define AT91SAM9263_ROM_BASE 0x00400000 /* Internal ROM base address */
117#define AT91SAM9263_ROM_SIZE SZ_128K /* Internal ROM size (128Kb) */
118
119#define AT91SAM9263_SRAM1_BASE 0x00500000 /* Internal SRAM 1 base address */
120#define AT91SAM9263_SRAM1_SIZE SZ_16K /* Internal SRAM 1 size (16Kb) */
121
122#define AT91SAM9263_LCDC_BASE 0x00700000 /* LCD Controller */
123#define AT91SAM9263_DMAC_BASE 0x00800000 /* DMA Controller */
124#define AT91SAM9263_UHP_BASE 0x00a00000 /* USB Host controller */
125
126
127#endif
diff --git a/arch/arm/mach-at91/include/mach/at91sam9263_matrix.h b/arch/arm/mach-at91/include/mach/at91sam9263_matrix.h
new file mode 100644
index 000000000000..9b3efd3eb2f3
--- /dev/null
+++ b/arch/arm/mach-at91/include/mach/at91sam9263_matrix.h
@@ -0,0 +1,129 @@
1/*
2 * arch/arm/mach-at91/include/mach/at91sam9263_matrix.h
3 *
4 * Copyright (C) 2006 Atmel Corporation.
5 *
6 * Memory Controllers (MATRIX, EBI) - System peripherals registers.
7 * Based on AT91SAM9263 datasheet revision B (Preliminary).
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 */
14
15#ifndef AT91SAM9263_MATRIX_H
16#define AT91SAM9263_MATRIX_H
17
18#define AT91_MATRIX_MCFG0 (AT91_MATRIX + 0x00) /* Master Configuration Register 0 */
19#define AT91_MATRIX_MCFG1 (AT91_MATRIX + 0x04) /* Master Configuration Register 1 */
20#define AT91_MATRIX_MCFG2 (AT91_MATRIX + 0x08) /* Master Configuration Register 2 */
21#define AT91_MATRIX_MCFG3 (AT91_MATRIX + 0x0C) /* Master Configuration Register 3 */
22#define AT91_MATRIX_MCFG4 (AT91_MATRIX + 0x10) /* Master Configuration Register 4 */
23#define AT91_MATRIX_MCFG5 (AT91_MATRIX + 0x14) /* Master Configuration Register 5 */
24#define AT91_MATRIX_MCFG6 (AT91_MATRIX + 0x18) /* Master Configuration Register 6 */
25#define AT91_MATRIX_MCFG7 (AT91_MATRIX + 0x1C) /* Master Configuration Register 7 */
26#define AT91_MATRIX_MCFG8 (AT91_MATRIX + 0x20) /* Master Configuration Register 8 */
27#define AT91_MATRIX_ULBT (7 << 0) /* Undefined Length Burst Type */
28#define AT91_MATRIX_ULBT_INFINITE (0 << 0)
29#define AT91_MATRIX_ULBT_SINGLE (1 << 0)
30#define AT91_MATRIX_ULBT_FOUR (2 << 0)
31#define AT91_MATRIX_ULBT_EIGHT (3 << 0)
32#define AT91_MATRIX_ULBT_SIXTEEN (4 << 0)
33
34#define AT91_MATRIX_SCFG0 (AT91_MATRIX + 0x40) /* Slave Configuration Register 0 */
35#define AT91_MATRIX_SCFG1 (AT91_MATRIX + 0x44) /* Slave Configuration Register 1 */
36#define AT91_MATRIX_SCFG2 (AT91_MATRIX + 0x48) /* Slave Configuration Register 2 */
37#define AT91_MATRIX_SCFG3 (AT91_MATRIX + 0x4C) /* Slave Configuration Register 3 */
38#define AT91_MATRIX_SCFG4 (AT91_MATRIX + 0x50) /* Slave Configuration Register 4 */
39#define AT91_MATRIX_SCFG5 (AT91_MATRIX + 0x54) /* Slave Configuration Register 5 */
40#define AT91_MATRIX_SCFG6 (AT91_MATRIX + 0x58) /* Slave Configuration Register 6 */
41#define AT91_MATRIX_SCFG7 (AT91_MATRIX + 0x5C) /* Slave Configuration Register 7 */
42#define AT91_MATRIX_SLOT_CYCLE (0xff << 0) /* Maximum Number of Allowed Cycles for a Burst */
43#define AT91_MATRIX_DEFMSTR_TYPE (3 << 16) /* Default Master Type */
44#define AT91_MATRIX_DEFMSTR_TYPE_NONE (0 << 16)
45#define AT91_MATRIX_DEFMSTR_TYPE_LAST (1 << 16)
46#define AT91_MATRIX_DEFMSTR_TYPE_FIXED (2 << 16)
47#define AT91_MATRIX_FIXED_DEFMSTR (0xf << 18) /* Fixed Index of Default Master */
48#define AT91_MATRIX_ARBT (3 << 24) /* Arbitration Type */
49#define AT91_MATRIX_ARBT_ROUND_ROBIN (0 << 24)
50#define AT91_MATRIX_ARBT_FIXED_PRIORITY (1 << 24)
51
52#define AT91_MATRIX_PRAS0 (AT91_MATRIX + 0x80) /* Priority Register A for Slave 0 */
53#define AT91_MATRIX_PRBS0 (AT91_MATRIX + 0x84) /* Priority Register B for Slave 0 */
54#define AT91_MATRIX_PRAS1 (AT91_MATRIX + 0x88) /* Priority Register A for Slave 1 */
55#define AT91_MATRIX_PRBS1 (AT91_MATRIX + 0x8C) /* Priority Register B for Slave 1 */
56#define AT91_MATRIX_PRAS2 (AT91_MATRIX + 0x90) /* Priority Register A for Slave 2 */
57#define AT91_MATRIX_PRBS2 (AT91_MATRIX + 0x94) /* Priority Register B for Slave 2 */
58#define AT91_MATRIX_PRAS3 (AT91_MATRIX + 0x98) /* Priority Register A for Slave 3 */
59#define AT91_MATRIX_PRBS3 (AT91_MATRIX + 0x9C) /* Priority Register B for Slave 3 */
60#define AT91_MATRIX_PRAS4 (AT91_MATRIX + 0xA0) /* Priority Register A for Slave 4 */
61#define AT91_MATRIX_PRBS4 (AT91_MATRIX + 0xA4) /* Priority Register B for Slave 4 */
62#define AT91_MATRIX_PRAS5 (AT91_MATRIX + 0xA8) /* Priority Register A for Slave 5 */
63#define AT91_MATRIX_PRBS5 (AT91_MATRIX + 0xAC) /* Priority Register B for Slave 5 */
64#define AT91_MATRIX_PRAS6 (AT91_MATRIX + 0xB0) /* Priority Register A for Slave 6 */
65#define AT91_MATRIX_PRBS6 (AT91_MATRIX + 0xB4) /* Priority Register B for Slave 6 */
66#define AT91_MATRIX_PRAS7 (AT91_MATRIX + 0xB8) /* Priority Register A for Slave 7 */
67#define AT91_MATRIX_PRBS7 (AT91_MATRIX + 0xBC) /* Priority Register B for Slave 7 */
68#define AT91_MATRIX_M0PR (3 << 0) /* Master 0 Priority */
69#define AT91_MATRIX_M1PR (3 << 4) /* Master 1 Priority */
70#define AT91_MATRIX_M2PR (3 << 8) /* Master 2 Priority */
71#define AT91_MATRIX_M3PR (3 << 12) /* Master 3 Priority */
72#define AT91_MATRIX_M4PR (3 << 16) /* Master 4 Priority */
73#define AT91_MATRIX_M5PR (3 << 20) /* Master 5 Priority */
74#define AT91_MATRIX_M6PR (3 << 24) /* Master 6 Priority */
75#define AT91_MATRIX_M7PR (3 << 28) /* Master 7 Priority */
76#define AT91_MATRIX_M8PR (3 << 0) /* Master 8 Priority (in Register B) */
77
78#define AT91_MATRIX_MRCR (AT91_MATRIX + 0x100) /* Master Remap Control Register */
79#define AT91_MATRIX_RCB0 (1 << 0) /* Remap Command for AHB Master 0 (ARM926EJ-S Instruction Master) */
80#define AT91_MATRIX_RCB1 (1 << 1) /* Remap Command for AHB Master 1 (ARM926EJ-S Data Master) */
81#define AT91_MATRIX_RCB2 (1 << 2)
82#define AT91_MATRIX_RCB3 (1 << 3)
83#define AT91_MATRIX_RCB4 (1 << 4)
84#define AT91_MATRIX_RCB5 (1 << 5)
85#define AT91_MATRIX_RCB6 (1 << 6)
86#define AT91_MATRIX_RCB7 (1 << 7)
87#define AT91_MATRIX_RCB8 (1 << 8)
88
89#define AT91_MATRIX_TCMR (AT91_MATRIX + 0x114) /* TCM Configuration Register */
90#define AT91_MATRIX_ITCM_SIZE (0xf << 0) /* Size of ITCM enabled memory block */
91#define AT91_MATRIX_ITCM_0 (0 << 0)
92#define AT91_MATRIX_ITCM_16 (5 << 0)
93#define AT91_MATRIX_ITCM_32 (6 << 0)
94#define AT91_MATRIX_DTCM_SIZE (0xf << 4) /* Size of DTCM enabled memory block */
95#define AT91_MATRIX_DTCM_0 (0 << 4)
96#define AT91_MATRIX_DTCM_16 (5 << 4)
97#define AT91_MATRIX_DTCM_32 (6 << 4)
98
99#define AT91_MATRIX_EBI0CSA (AT91_MATRIX + 0x120) /* EBI0 Chip Select Assignment Register */
100#define AT91_MATRIX_EBI0_CS1A (1 << 1) /* Chip Select 1 Assignment */
101#define AT91_MATRIX_EBI0_CS1A_SMC (0 << 1)
102#define AT91_MATRIX_EBI0_CS1A_SDRAMC (1 << 1)
103#define AT91_MATRIX_EBI0_CS3A (1 << 3) /* Chip Select 3 Assignment */
104#define AT91_MATRIX_EBI0_CS3A_SMC (0 << 3)
105#define AT91_MATRIX_EBI0_CS3A_SMC_SMARTMEDIA (1 << 3)
106#define AT91_MATRIX_EBI0_CS4A (1 << 4) /* Chip Select 4 Assignment */
107#define AT91_MATRIX_EBI0_CS4A_SMC (0 << 4)
108#define AT91_MATRIX_EBI0_CS4A_SMC_CF1 (1 << 4)
109#define AT91_MATRIX_EBI0_CS5A (1 << 5) /* Chip Select 5 Assignment */
110#define AT91_MATRIX_EBI0_CS5A_SMC (0 << 5)
111#define AT91_MATRIX_EBI0_CS5A_SMC_CF2 (1 << 5)
112#define AT91_MATRIX_EBI0_DBPUC (1 << 8) /* Data Bus Pull-up Configuration */
113#define AT91_MATRIX_EBI0_VDDIOMSEL (1 << 16) /* Memory voltage selection */
114#define AT91_MATRIX_EBI0_VDDIOMSEL_1_8V (0 << 16)
115#define AT91_MATRIX_EBI0_VDDIOMSEL_3_3V (1 << 16)
116
117#define AT91_MATRIX_EBI1CSA (AT91_MATRIX + 0x124) /* EBI1 Chip Select Assignment Register */
118#define AT91_MATRIX_EBI1_CS1A (1 << 1) /* Chip Select 1 Assignment */
119#define AT91_MATRIX_EBI1_CS1A_SMC (0 << 1)
120#define AT91_MATRIX_EBI1_CS1A_SDRAMC (1 << 1)
121#define AT91_MATRIX_EBI1_CS2A (1 << 3) /* Chip Select 3 Assignment */
122#define AT91_MATRIX_EBI1_CS2A_SMC (0 << 3)
123#define AT91_MATRIX_EBI1_CS2A_SMC_SMARTMEDIA (1 << 3)
124#define AT91_MATRIX_EBI1_DBPUC (1 << 8) /* Data Bus Pull-up Configuration */
125#define AT91_MATRIX_EBI1_VDDIOMSEL (1 << 16) /* Memory voltage selection */
126#define AT91_MATRIX_EBI1_VDDIOMSEL_1_8V (0 << 16)
127#define AT91_MATRIX_EBI1_VDDIOMSEL_3_3V (1 << 16)
128
129#endif
diff --git a/arch/arm/mach-at91/include/mach/at91sam9_sdramc.h b/arch/arm/mach-at91/include/mach/at91sam9_sdramc.h
new file mode 100644
index 000000000000..1921181c63ca
--- /dev/null
+++ b/arch/arm/mach-at91/include/mach/at91sam9_sdramc.h
@@ -0,0 +1,83 @@
1/*
2 * arch/arm/mach-at91/include/mach/at91sam9_sdramc.h
3 *
4 * SDRAM Controllers (SDRAMC) - System peripherals registers.
5 * Based on AT91SAM9261 datasheet revision D.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 */
12
13#ifndef AT91SAM9_SDRAMC_H
14#define AT91SAM9_SDRAMC_H
15
16/* SDRAM Controller (SDRAMC) registers */
17#define AT91_SDRAMC_MR (AT91_SDRAMC + 0x00) /* SDRAM Controller Mode Register */
18#define AT91_SDRAMC_MODE (0xf << 0) /* Command Mode */
19#define AT91_SDRAMC_MODE_NORMAL 0
20#define AT91_SDRAMC_MODE_NOP 1
21#define AT91_SDRAMC_MODE_PRECHARGE 2
22#define AT91_SDRAMC_MODE_LMR 3
23#define AT91_SDRAMC_MODE_REFRESH 4
24#define AT91_SDRAMC_MODE_EXT_LMR 5
25#define AT91_SDRAMC_MODE_DEEP 6
26
27#define AT91_SDRAMC_TR (AT91_SDRAMC + 0x04) /* SDRAM Controller Refresh Timer Register */
28#define AT91_SDRAMC_COUNT (0xfff << 0) /* Refresh Timer Counter */
29
30#define AT91_SDRAMC_CR (AT91_SDRAMC + 0x08) /* SDRAM Controller Configuration Register */
31#define AT91_SDRAMC_NC (3 << 0) /* Number of Column Bits */
32#define AT91_SDRAMC_NC_8 (0 << 0)
33#define AT91_SDRAMC_NC_9 (1 << 0)
34#define AT91_SDRAMC_NC_10 (2 << 0)
35#define AT91_SDRAMC_NC_11 (3 << 0)
36#define AT91_SDRAMC_NR (3 << 2) /* Number of Row Bits */
37#define AT91_SDRAMC_NR_11 (0 << 2)
38#define AT91_SDRAMC_NR_12 (1 << 2)
39#define AT91_SDRAMC_NR_13 (2 << 2)
40#define AT91_SDRAMC_NB (1 << 4) /* Number of Banks */
41#define AT91_SDRAMC_NB_2 (0 << 4)
42#define AT91_SDRAMC_NB_4 (1 << 4)
43#define AT91_SDRAMC_CAS (3 << 5) /* CAS Latency */
44#define AT91_SDRAMC_CAS_1 (1 << 5)
45#define AT91_SDRAMC_CAS_2 (2 << 5)
46#define AT91_SDRAMC_CAS_3 (3 << 5)
47#define AT91_SDRAMC_DBW (1 << 7) /* Data Bus Width */
48#define AT91_SDRAMC_DBW_32 (0 << 7)
49#define AT91_SDRAMC_DBW_16 (1 << 7)
50#define AT91_SDRAMC_TWR (0xf << 8) /* Write Recovery Delay */
51#define AT91_SDRAMC_TRC (0xf << 12) /* Row Cycle Delay */
52#define AT91_SDRAMC_TRP (0xf << 16) /* Row Precharge Delay */
53#define AT91_SDRAMC_TRCD (0xf << 20) /* Row to Column Delay */
54#define AT91_SDRAMC_TRAS (0xf << 24) /* Active to Precharge Delay */
55#define AT91_SDRAMC_TXSR (0xf << 28) /* Exit Self Refresh to Active Delay */
56
57#define AT91_SDRAMC_LPR (AT91_SDRAMC + 0x10) /* SDRAM Controller Low Power Register */
58#define AT91_SDRAMC_LPCB (3 << 0) /* Low-power Configurations */
59#define AT91_SDRAMC_LPCB_DISABLE 0
60#define AT91_SDRAMC_LPCB_SELF_REFRESH 1
61#define AT91_SDRAMC_LPCB_POWER_DOWN 2
62#define AT91_SDRAMC_LPCB_DEEP_POWER_DOWN 3
63#define AT91_SDRAMC_PASR (7 << 4) /* Partial Array Self Refresh */
64#define AT91_SDRAMC_TCSR (3 << 8) /* Temperature Compensated Self Refresh */
65#define AT91_SDRAMC_DS (3 << 10) /* Drive Strength */
66#define AT91_SDRAMC_TIMEOUT (3 << 12) /* Time to define when Low Power Mode is enabled */
67#define AT91_SDRAMC_TIMEOUT_0_CLK_CYCLES (0 << 12)
68#define AT91_SDRAMC_TIMEOUT_64_CLK_CYCLES (1 << 12)
69#define AT91_SDRAMC_TIMEOUT_128_CLK_CYCLES (2 << 12)
70
71#define AT91_SDRAMC_IER (AT91_SDRAMC + 0x14) /* SDRAM Controller Interrupt Enable Register */
72#define AT91_SDRAMC_IDR (AT91_SDRAMC + 0x18) /* SDRAM Controller Interrupt Disable Register */
73#define AT91_SDRAMC_IMR (AT91_SDRAMC + 0x1C) /* SDRAM Controller Interrupt Mask Register */
74#define AT91_SDRAMC_ISR (AT91_SDRAMC + 0x20) /* SDRAM Controller Interrupt Status Register */
75#define AT91_SDRAMC_RES (1 << 0) /* Refresh Error Status */
76
77#define AT91_SDRAMC_MDR (AT91_SDRAMC + 0x24) /* SDRAM Memory Device Register */
78#define AT91_SDRAMC_MD (3 << 0) /* Memory Device Type */
79#define AT91_SDRAMC_MD_SDRAM 0
80#define AT91_SDRAMC_MD_LOW_POWER_SDRAM 1
81
82
83#endif
diff --git a/arch/arm/mach-at91/include/mach/at91sam9_smc.h b/arch/arm/mach-at91/include/mach/at91sam9_smc.h
new file mode 100644
index 000000000000..ec6ad1338b5a
--- /dev/null
+++ b/arch/arm/mach-at91/include/mach/at91sam9_smc.h
@@ -0,0 +1,73 @@
1/*
2 * arch/arm/mach-at91/include/mach/at91sam9_smc.h
3 *
4 * Static Memory Controllers (SMC) - System peripherals registers.
5 * Based on AT91SAM9261 datasheet revision D.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 */
12
13#ifndef AT91SAM9_SMC_H
14#define AT91SAM9_SMC_H
15
16#define AT91_SMC_SETUP(n) (AT91_SMC + 0x00 + ((n)*0x10)) /* Setup Register for CS n */
17#define AT91_SMC_NWESETUP (0x3f << 0) /* NWE Setup Length */
18#define AT91_SMC_NWESETUP_(x) ((x) << 0)
19#define AT91_SMC_NCS_WRSETUP (0x3f << 8) /* NCS Setup Length in Write Access */
20#define AT91_SMC_NCS_WRSETUP_(x) ((x) << 8)
21#define AT91_SMC_NRDSETUP (0x3f << 16) /* NRD Setup Length */
22#define AT91_SMC_NRDSETUP_(x) ((x) << 16)
23#define AT91_SMC_NCS_RDSETUP (0x3f << 24) /* NCS Setup Length in Read Access */
24#define AT91_SMC_NCS_RDSETUP_(x) ((x) << 24)
25
26#define AT91_SMC_PULSE(n) (AT91_SMC + 0x04 + ((n)*0x10)) /* Pulse Register for CS n */
27#define AT91_SMC_NWEPULSE (0x7f << 0) /* NWE Pulse Length */
28#define AT91_SMC_NWEPULSE_(x) ((x) << 0)
29#define AT91_SMC_NCS_WRPULSE (0x7f << 8) /* NCS Pulse Length in Write Access */
30#define AT91_SMC_NCS_WRPULSE_(x)((x) << 8)
31#define AT91_SMC_NRDPULSE (0x7f << 16) /* NRD Pulse Length */
32#define AT91_SMC_NRDPULSE_(x) ((x) << 16)
33#define AT91_SMC_NCS_RDPULSE (0x7f << 24) /* NCS Pulse Length in Read Access */
34#define AT91_SMC_NCS_RDPULSE_(x)((x) << 24)
35
36#define AT91_SMC_CYCLE(n) (AT91_SMC + 0x08 + ((n)*0x10)) /* Cycle Register for CS n */
37#define AT91_SMC_NWECYCLE (0x1ff << 0 ) /* Total Write Cycle Length */
38#define AT91_SMC_NWECYCLE_(x) ((x) << 0)
39#define AT91_SMC_NRDCYCLE (0x1ff << 16) /* Total Read Cycle Length */
40#define AT91_SMC_NRDCYCLE_(x) ((x) << 16)
41
42#define AT91_SMC_MODE(n) (AT91_SMC + 0x0c + ((n)*0x10)) /* Mode Register for CS n */
43#define AT91_SMC_READMODE (1 << 0) /* Read Mode */
44#define AT91_SMC_WRITEMODE (1 << 1) /* Write Mode */
45#define AT91_SMC_EXNWMODE (3 << 4) /* NWAIT Mode */
46#define AT91_SMC_EXNWMODE_DISABLE (0 << 4)
47#define AT91_SMC_EXNWMODE_FROZEN (2 << 4)
48#define AT91_SMC_EXNWMODE_READY (3 << 4)
49#define AT91_SMC_BAT (1 << 8) /* Byte Access Type */
50#define AT91_SMC_BAT_SELECT (0 << 8)
51#define AT91_SMC_BAT_WRITE (1 << 8)
52#define AT91_SMC_DBW (3 << 12) /* Data Bus Width */
53#define AT91_SMC_DBW_8 (0 << 12)
54#define AT91_SMC_DBW_16 (1 << 12)
55#define AT91_SMC_DBW_32 (2 << 12)
56#define AT91_SMC_TDF (0xf << 16) /* Data Float Time. */
57#define AT91_SMC_TDF_(x) ((x) << 16)
58#define AT91_SMC_TDFMODE (1 << 20) /* TDF Optimization - Enabled */
59#define AT91_SMC_PMEN (1 << 24) /* Page Mode Enabled */
60#define AT91_SMC_PS (3 << 28) /* Page Size */
61#define AT91_SMC_PS_4 (0 << 28)
62#define AT91_SMC_PS_8 (1 << 28)
63#define AT91_SMC_PS_16 (2 << 28)
64#define AT91_SMC_PS_32 (3 << 28)
65
66#if defined(AT91_SMC1) /* The AT91SAM9263 has 2 Static Memory contollers */
67#define AT91_SMC1_SETUP(n) (AT91_SMC1 + 0x00 + ((n)*0x10)) /* Setup Register for CS n */
68#define AT91_SMC1_PULSE(n) (AT91_SMC1 + 0x04 + ((n)*0x10)) /* Pulse Register for CS n */
69#define AT91_SMC1_CYCLE(n) (AT91_SMC1 + 0x08 + ((n)*0x10)) /* Cycle Register for CS n */
70#define AT91_SMC1_MODE(n) (AT91_SMC1 + 0x0c + ((n)*0x10)) /* Mode Register for CS n */
71#endif
72
73#endif
diff --git a/arch/arm/mach-at91/include/mach/at91sam9rl.h b/arch/arm/mach-at91/include/mach/at91sam9rl.h
new file mode 100644
index 000000000000..fc2de6c09c86
--- /dev/null
+++ b/arch/arm/mach-at91/include/mach/at91sam9rl.h
@@ -0,0 +1,115 @@
1/*
2 * arch/arm/mach-at91/include/mach/at91sam9260.h
3 *
4 * Copyright (C) 2007 Atmel Corporation
5 *
6 * Common definitions.
7 * Based on AT91SAM9RL datasheet revision A. (Preliminary)
8 *
9 * This file is subject to the terms and conditions of the GNU General Public
10 * License. See the file COPYING in the main directory of this archive for
11 * more details.
12 */
13
14#ifndef AT91SAM9RL_H
15#define AT91SAM9RL_H
16
17/*
18 * Peripheral identifiers/interrupts.
19 */
20#define AT91_ID_FIQ 0 /* Advanced Interrupt Controller (FIQ) */
21#define AT91_ID_SYS 1 /* System Controller */
22#define AT91SAM9RL_ID_PIOA 2 /* Parallel IO Controller A */
23#define AT91SAM9RL_ID_PIOB 3 /* Parallel IO Controller B */
24#define AT91SAM9RL_ID_PIOC 4 /* Parallel IO Controller C */
25#define AT91SAM9RL_ID_PIOD 5 /* Parallel IO Controller D */
26#define AT91SAM9RL_ID_US0 6 /* USART 0 */
27#define AT91SAM9RL_ID_US1 7 /* USART 1 */
28#define AT91SAM9RL_ID_US2 8 /* USART 2 */
29#define AT91SAM9RL_ID_US3 9 /* USART 3 */
30#define AT91SAM9RL_ID_MCI 10 /* Multimedia Card Interface */
31#define AT91SAM9RL_ID_TWI0 11 /* TWI 0 */
32#define AT91SAM9RL_ID_TWI1 12 /* TWI 1 */
33#define AT91SAM9RL_ID_SPI 13 /* Serial Peripheral Interface */
34#define AT91SAM9RL_ID_SSC0 14 /* Serial Synchronous Controller 0 */
35#define AT91SAM9RL_ID_SSC1 15 /* Serial Synchronous Controller 1 */
36#define AT91SAM9RL_ID_TC0 16 /* Timer Counter 0 */
37#define AT91SAM9RL_ID_TC1 17 /* Timer Counter 1 */
38#define AT91SAM9RL_ID_TC2 18 /* Timer Counter 2 */
39#define AT91SAM9RL_ID_PWMC 19 /* Pulse Width Modulation Controller */
40#define AT91SAM9RL_ID_TSC 20 /* Touch Screen Controller */
41#define AT91SAM9RL_ID_DMA 21 /* DMA Controller */
42#define AT91SAM9RL_ID_UDPHS 22 /* USB Device HS */
43#define AT91SAM9RL_ID_LCDC 23 /* LCD Controller */
44#define AT91SAM9RL_ID_AC97C 24 /* AC97 Controller */
45#define AT91SAM9RL_ID_IRQ0 31 /* Advanced Interrupt Controller (IRQ0) */
46
47
48/*
49 * User Peripheral physical base addresses.
50 */
51#define AT91SAM9RL_BASE_TCB0 0xfffa0000
52#define AT91SAM9RL_BASE_TC0 0xfffa0000
53#define AT91SAM9RL_BASE_TC1 0xfffa0040
54#define AT91SAM9RL_BASE_TC2 0xfffa0080
55#define AT91SAM9RL_BASE_MCI 0xfffa4000
56#define AT91SAM9RL_BASE_TWI0 0xfffa8000
57#define AT91SAM9RL_BASE_TWI1 0xfffac000
58#define AT91SAM9RL_BASE_US0 0xfffb0000
59#define AT91SAM9RL_BASE_US1 0xfffb4000
60#define AT91SAM9RL_BASE_US2 0xfffb8000
61#define AT91SAM9RL_BASE_US3 0xfffbc000
62#define AT91SAM9RL_BASE_SSC0 0xfffc0000
63#define AT91SAM9RL_BASE_SSC1 0xfffc4000
64#define AT91SAM9RL_BASE_PWMC 0xfffc8000
65#define AT91SAM9RL_BASE_SPI 0xfffcc000
66#define AT91SAM9RL_BASE_TSC 0xfffd0000
67#define AT91SAM9RL_BASE_UDPHS 0xfffd4000
68#define AT91SAM9RL_BASE_AC97C 0xfffd8000
69#define AT91_BASE_SYS 0xffffc000
70
71
72/*
73 * System Peripherals (offset from AT91_BASE_SYS)
74 */
75#define AT91_DMA (0xffffe600 - AT91_BASE_SYS)
76#define AT91_ECC (0xffffe800 - AT91_BASE_SYS)
77#define AT91_SDRAMC (0xffffea00 - AT91_BASE_SYS)
78#define AT91_SMC (0xffffec00 - AT91_BASE_SYS)
79#define AT91_MATRIX (0xffffee00 - AT91_BASE_SYS)
80#define AT91_CCFG (0xffffef10 - AT91_BASE_SYS)
81#define AT91_AIC (0xfffff000 - AT91_BASE_SYS)
82#define AT91_DBGU (0xfffff200 - AT91_BASE_SYS)
83#define AT91_PIOA (0xfffff400 - AT91_BASE_SYS)
84#define AT91_PIOB (0xfffff600 - AT91_BASE_SYS)
85#define AT91_PIOC (0xfffff800 - AT91_BASE_SYS)
86#define AT91_PIOD (0xfffffa00 - AT91_BASE_SYS)
87#define AT91_PMC (0xfffffc00 - AT91_BASE_SYS)
88#define AT91_RSTC (0xfffffd00 - AT91_BASE_SYS)
89#define AT91_SHDWC (0xfffffd10 - AT91_BASE_SYS)
90#define AT91_RTT (0xfffffd20 - AT91_BASE_SYS)
91#define AT91_PIT (0xfffffd30 - AT91_BASE_SYS)
92#define AT91_WDT (0xfffffd40 - AT91_BASE_SYS)
93#define AT91_SCKCR (0xfffffd50 - AT91_BASE_SYS)
94#define AT91_GPBR (0xfffffd60 - AT91_BASE_SYS)
95#define AT91_RTC (0xfffffe00 - AT91_BASE_SYS)
96
97#define AT91_USART0 AT91SAM9RL_BASE_US0
98#define AT91_USART1 AT91SAM9RL_BASE_US1
99#define AT91_USART2 AT91SAM9RL_BASE_US2
100#define AT91_USART3 AT91SAM9RL_BASE_US3
101
102
103/*
104 * Internal Memory.
105 */
106#define AT91SAM9RL_SRAM_BASE 0x00300000 /* Internal SRAM base address */
107#define AT91SAM9RL_SRAM_SIZE SZ_16K /* Internal SRAM size (16Kb) */
108
109#define AT91SAM9RL_ROM_BASE 0x00400000 /* Internal ROM base address */
110#define AT91SAM9RL_ROM_SIZE (2 * SZ_16K) /* Internal ROM size (32Kb) */
111
112#define AT91SAM9RL_LCDC_BASE 0x00500000 /* LCD Controller */
113#define AT91SAM9RL_UDPHS_FIFO 0x00600000 /* USB Device HS controller */
114
115#endif
diff --git a/arch/arm/mach-at91/include/mach/at91sam9rl_matrix.h b/arch/arm/mach-at91/include/mach/at91sam9rl_matrix.h
new file mode 100644
index 000000000000..5f9149071fe5
--- /dev/null
+++ b/arch/arm/mach-at91/include/mach/at91sam9rl_matrix.h
@@ -0,0 +1,96 @@
1/*
2 * arch/arm/mach-at91/include/mach/at91sam9rl_matrix.h
3 *
4 * Copyright (C) 2007 Atmel Corporation
5 *
6 * Memory Controllers (MATRIX, EBI) - System peripherals registers.
7 * Based on AT91SAM9RL datasheet revision A. (Preliminary)
8 *
9 * This file is subject to the terms and conditions of the GNU General Public
10 * License. See the file COPYING in the main directory of this archive for
11 * more details.
12 */
13
14#ifndef AT91SAM9RL_MATRIX_H
15#define AT91SAM9RL_MATRIX_H
16
17#define AT91_MATRIX_MCFG0 (AT91_MATRIX + 0x00) /* Master Configuration Register 0 */
18#define AT91_MATRIX_MCFG1 (AT91_MATRIX + 0x04) /* Master Configuration Register 1 */
19#define AT91_MATRIX_MCFG2 (AT91_MATRIX + 0x08) /* Master Configuration Register 2 */
20#define AT91_MATRIX_MCFG3 (AT91_MATRIX + 0x0C) /* Master Configuration Register 3 */
21#define AT91_MATRIX_MCFG4 (AT91_MATRIX + 0x10) /* Master Configuration Register 4 */
22#define AT91_MATRIX_MCFG5 (AT91_MATRIX + 0x14) /* Master Configuration Register 5 */
23#define AT91_MATRIX_ULBT (7 << 0) /* Undefined Length Burst Type */
24#define AT91_MATRIX_ULBT_INFINITE (0 << 0)
25#define AT91_MATRIX_ULBT_SINGLE (1 << 0)
26#define AT91_MATRIX_ULBT_FOUR (2 << 0)
27#define AT91_MATRIX_ULBT_EIGHT (3 << 0)
28#define AT91_MATRIX_ULBT_SIXTEEN (4 << 0)
29
30#define AT91_MATRIX_SCFG0 (AT91_MATRIX + 0x40) /* Slave Configuration Register 0 */
31#define AT91_MATRIX_SCFG1 (AT91_MATRIX + 0x44) /* Slave Configuration Register 1 */
32#define AT91_MATRIX_SCFG2 (AT91_MATRIX + 0x48) /* Slave Configuration Register 2 */
33#define AT91_MATRIX_SCFG3 (AT91_MATRIX + 0x4C) /* Slave Configuration Register 3 */
34#define AT91_MATRIX_SCFG4 (AT91_MATRIX + 0x50) /* Slave Configuration Register 4 */
35#define AT91_MATRIX_SCFG5 (AT91_MATRIX + 0x54) /* Slave Configuration Register 5 */
36#define AT91_MATRIX_SLOT_CYCLE (0xff << 0) /* Maximum Number of Allowed Cycles for a Burst */
37#define AT91_MATRIX_DEFMSTR_TYPE (3 << 16) /* Default Master Type */
38#define AT91_MATRIX_DEFMSTR_TYPE_NONE (0 << 16)
39#define AT91_MATRIX_DEFMSTR_TYPE_LAST (1 << 16)
40#define AT91_MATRIX_DEFMSTR_TYPE_FIXED (2 << 16)
41#define AT91_MATRIX_FIXED_DEFMSTR (0xf << 18) /* Fixed Index of Default Master */
42#define AT91_MATRIX_ARBT (3 << 24) /* Arbitration Type */
43#define AT91_MATRIX_ARBT_ROUND_ROBIN (0 << 24)
44#define AT91_MATRIX_ARBT_FIXED_PRIORITY (1 << 24)
45
46#define AT91_MATRIX_PRAS0 (AT91_MATRIX + 0x80) /* Priority Register A for Slave 0 */
47#define AT91_MATRIX_PRAS1 (AT91_MATRIX + 0x88) /* Priority Register A for Slave 1 */
48#define AT91_MATRIX_PRAS2 (AT91_MATRIX + 0x90) /* Priority Register A for Slave 2 */
49#define AT91_MATRIX_PRAS3 (AT91_MATRIX + 0x98) /* Priority Register A for Slave 3 */
50#define AT91_MATRIX_PRAS4 (AT91_MATRIX + 0xA0) /* Priority Register A for Slave 4 */
51#define AT91_MATRIX_PRAS5 (AT91_MATRIX + 0xA8) /* Priority Register A for Slave 5 */
52#define AT91_MATRIX_M0PR (3 << 0) /* Master 0 Priority */
53#define AT91_MATRIX_M1PR (3 << 4) /* Master 1 Priority */
54#define AT91_MATRIX_M2PR (3 << 8) /* Master 2 Priority */
55#define AT91_MATRIX_M3PR (3 << 12) /* Master 3 Priority */
56#define AT91_MATRIX_M4PR (3 << 16) /* Master 4 Priority */
57#define AT91_MATRIX_M5PR (3 << 20) /* Master 5 Priority */
58
59#define AT91_MATRIX_MRCR (AT91_MATRIX + 0x100) /* Master Remap Control Register */
60#define AT91_MATRIX_RCB0 (1 << 0) /* Remap Command for AHB Master 0 (ARM926EJ-S Instruction Master) */
61#define AT91_MATRIX_RCB1 (1 << 1) /* Remap Command for AHB Master 1 (ARM926EJ-S Data Master) */
62#define AT91_MATRIX_RCB2 (1 << 2)
63#define AT91_MATRIX_RCB3 (1 << 3)
64#define AT91_MATRIX_RCB4 (1 << 4)
65#define AT91_MATRIX_RCB5 (1 << 5)
66
67#define AT91_MATRIX_TCMR (AT91_MATRIX + 0x114) /* TCM Configuration Register */
68#define AT91_MATRIX_ITCM_SIZE (0xf << 0) /* Size of ITCM enabled memory block */
69#define AT91_MATRIX_ITCM_0 (0 << 0)
70#define AT91_MATRIX_ITCM_16 (5 << 0)
71#define AT91_MATRIX_ITCM_32 (6 << 0)
72#define AT91_MATRIX_DTCM_SIZE (0xf << 4) /* Size of DTCM enabled memory block */
73#define AT91_MATRIX_DTCM_0 (0 << 4)
74#define AT91_MATRIX_DTCM_16 (5 << 4)
75#define AT91_MATRIX_DTCM_32 (6 << 4)
76
77#define AT91_MATRIX_EBICSA (AT91_MATRIX + 0x120) /* EBI0 Chip Select Assignment Register */
78#define AT91_MATRIX_CS1A (1 << 1) /* Chip Select 1 Assignment */
79#define AT91_MATRIX_CS1A_SMC (0 << 1)
80#define AT91_MATRIX_CS1A_SDRAMC (1 << 1)
81#define AT91_MATRIX_CS3A (1 << 3) /* Chip Select 3 Assignment */
82#define AT91_MATRIX_CS3A_SMC (0 << 3)
83#define AT91_MATRIX_CS3A_SMC_SMARTMEDIA (1 << 3)
84#define AT91_MATRIX_CS4A (1 << 4) /* Chip Select 4 Assignment */
85#define AT91_MATRIX_CS4A_SMC (0 << 4)
86#define AT91_MATRIX_CS4A_SMC_CF1 (1 << 4)
87#define AT91_MATRIX_CS5A (1 << 5) /* Chip Select 5 Assignment */
88#define AT91_MATRIX_CS5A_SMC (0 << 5)
89#define AT91_MATRIX_CS5A_SMC_CF2 (1 << 5)
90#define AT91_MATRIX_DBPUC (1 << 8) /* Data Bus Pull-up Configuration */
91#define AT91_MATRIX_VDDIOMSEL (1 << 16) /* Memory voltage selection */
92#define AT91_MATRIX_VDDIOMSEL_1_8V (0 << 16)
93#define AT91_MATRIX_VDDIOMSEL_3_3V (1 << 16)
94
95
96#endif
diff --git a/arch/arm/mach-at91/include/mach/at91x40.h b/arch/arm/mach-at91/include/mach/at91x40.h
new file mode 100644
index 000000000000..d34cdb8abdca
--- /dev/null
+++ b/arch/arm/mach-at91/include/mach/at91x40.h
@@ -0,0 +1,55 @@
1/*
2 * arch/arm/mach-at91/include/mach/at91x40.h
3 *
4 * (C) Copyright 2007, Greg Ungerer <gerg@snapgear.com>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 */
11
12#ifndef AT91X40_H
13#define AT91X40_H
14
15/*
16 * IRQ list.
17 */
18#define AT91_ID_FIQ 0 /* FIQ */
19#define AT91_ID_SYS 1 /* System Peripheral */
20#define AT91X40_ID_USART0 2 /* USART port 0 */
21#define AT91X40_ID_USART1 3 /* USART port 1 */
22#define AT91X40_ID_TC0 4 /* Timer/Counter 0 */
23#define AT91X40_ID_TC1 5 /* Timer/Counter 1*/
24#define AT91X40_ID_TC2 6 /* Timer/Counter 2*/
25#define AT91X40_ID_WD 7 /* Watchdog? */
26#define AT91X40_ID_PIOA 8 /* Parallel IO Controller A */
27
28#define AT91X40_ID_IRQ0 16 /* External IRQ 0 */
29#define AT91X40_ID_IRQ1 17 /* External IRQ 1 */
30#define AT91X40_ID_IRQ2 18 /* External IRQ 2 */
31
32/*
33 * System Peripherals (offset from AT91_BASE_SYS)
34 */
35#define AT91_BASE_SYS 0xffc00000
36
37#define AT91_EBI (0xffe00000 - AT91_BASE_SYS) /* External Bus Interface */
38#define AT91_SF (0xfff00000 - AT91_BASE_SYS) /* Special Function */
39#define AT91_USART1 (0xfffcc000 - AT91_BASE_SYS) /* USART 1 */
40#define AT91_USART0 (0xfffd0000 - AT91_BASE_SYS) /* USART 0 */
41#define AT91_TC (0xfffe0000 - AT91_BASE_SYS) /* Timer Counter */
42#define AT91_PIOA (0xffff0000 - AT91_BASE_SYS) /* PIO Controller A */
43#define AT91_PS (0xffff4000 - AT91_BASE_SYS) /* Power Save */
44#define AT91_WD (0xffff8000 - AT91_BASE_SYS) /* Watchdog Timer */
45#define AT91_AIC (0xfffff000 - AT91_BASE_SYS) /* Advanced Interrupt Controller */
46
47/*
48 * The AT91x40 series doesn't have a debug unit like the other AT91 parts.
49 * But it does have a chip identify register and extension ID, so define at
50 * least these here.
51 */
52#define AT91_DBGU_CIDR (AT91_SF + 0) /* CIDR in PS segment */
53#define AT91_DBGU_EXID (AT91_SF + 4) /* EXID in PS segment */
54
55#endif /* AT91X40_H */
diff --git a/arch/arm/mach-at91/include/mach/board.h b/arch/arm/mach-at91/include/mach/board.h
new file mode 100644
index 000000000000..acd60f2a0724
--- /dev/null
+++ b/arch/arm/mach-at91/include/mach/board.h
@@ -0,0 +1,172 @@
1/*
2 * arch/arm/mach-at91/include/mach/board.h
3 *
4 * Copyright (C) 2005 HP Labs
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20
21/*
22 * These are data structures found in platform_device.dev.platform_data,
23 * and describing board-specific data needed by drivers. For example,
24 * which pin is used for a given GPIO role.
25 *
26 * In 2.6, drivers should strongly avoid board-specific knowledge so
27 * that supporting new boards normally won't require driver patches.
28 * Most board-specific knowledge should be in arch/.../board-*.c files.
29 */
30
31#ifndef __ASM_ARCH_BOARD_H
32#define __ASM_ARCH_BOARD_H
33
34#include <linux/mtd/partitions.h>
35#include <linux/device.h>
36#include <linux/i2c.h>
37#include <linux/leds.h>
38#include <linux/spi/spi.h>
39#include <linux/usb/atmel_usba_udc.h>
40
41 /* USB Device */
42struct at91_udc_data {
43 u8 vbus_pin; /* high == host powering us */
44 u8 pullup_pin; /* active == D+ pulled up */
45 u8 pullup_active_low; /* true == pullup_pin is active low */
46};
47extern void __init at91_add_device_udc(struct at91_udc_data *data);
48
49 /* USB High Speed Device */
50extern void __init at91_add_device_usba(struct usba_platform_data *data);
51
52 /* Compact Flash */
53struct at91_cf_data {
54 u8 irq_pin; /* I/O IRQ */
55 u8 det_pin; /* Card detect */
56 u8 vcc_pin; /* power switching */
57 u8 rst_pin; /* card reset */
58 u8 chipselect; /* EBI Chip Select number */
59};
60extern void __init at91_add_device_cf(struct at91_cf_data *data);
61
62 /* MMC / SD */
63struct at91_mmc_data {
64 u8 det_pin; /* card detect IRQ */
65 unsigned slot_b:1; /* uses Slot B */
66 unsigned wire4:1; /* (SD) supports DAT0..DAT3 */
67 u8 wp_pin; /* (SD) writeprotect detect */
68 u8 vcc_pin; /* power switching (high == on) */
69};
70extern void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data);
71
72 /* Ethernet (EMAC & MACB) */
73struct at91_eth_data {
74 u32 phy_mask;
75 u8 phy_irq_pin; /* PHY IRQ */
76 u8 is_rmii; /* using RMII interface? */
77};
78extern void __init at91_add_device_eth(struct at91_eth_data *data);
79
80#if defined(CONFIG_ARCH_AT91SAM9260) || defined(CONFIG_ARCH_AT91SAM9263) || defined(CONFIG_ARCH_AT91SAM9G20) || defined(CONFIG_ARCH_AT91CAP9)
81#define eth_platform_data at91_eth_data
82#endif
83
84 /* USB Host */
85struct at91_usbh_data {
86 u8 ports; /* number of ports on root hub */
87 u8 vbus_pin[]; /* port power-control pin */
88};
89extern void __init at91_add_device_usbh(struct at91_usbh_data *data);
90
91 /* NAND / SmartMedia */
92struct atmel_nand_data {
93 u8 enable_pin; /* chip enable */
94 u8 det_pin; /* card detect */
95 u8 rdy_pin; /* ready/busy */
96 u8 ale; /* address line number connected to ALE */
97 u8 cle; /* address line number connected to CLE */
98 u8 bus_width_16; /* buswidth is 16 bit */
99 struct mtd_partition* (*partition_info)(int, int*);
100};
101extern void __init at91_add_device_nand(struct atmel_nand_data *data);
102
103 /* I2C*/
104extern void __init at91_add_device_i2c(struct i2c_board_info *devices, int nr_devices);
105
106 /* SPI */
107extern void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices);
108
109 /* Serial */
110#define ATMEL_UART_CTS 0x01
111#define ATMEL_UART_RTS 0x02
112#define ATMEL_UART_DSR 0x04
113#define ATMEL_UART_DTR 0x08
114#define ATMEL_UART_DCD 0x10
115#define ATMEL_UART_RI 0x20
116
117extern void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins);
118extern void __init at91_set_serial_console(unsigned portnr);
119
120struct at91_uart_config {
121 unsigned short console_tty; /* tty number of serial console */
122 unsigned short nr_tty; /* number of serial tty's */
123 short tty_map[]; /* map UART to tty number */
124};
125extern struct platform_device *atmel_default_console_device;
126extern void __init __deprecated at91_init_serial(struct at91_uart_config *config);
127
128struct atmel_uart_data {
129 short use_dma_tx; /* use transmit DMA? */
130 short use_dma_rx; /* use receive DMA? */
131 void __iomem *regs; /* virtual base address, if any */
132};
133extern void __init at91_add_device_serial(void);
134
135/*
136 * SSC -- accessed through ssc_request(id). Drivers don't bind to SSC
137 * platform devices. Their SSC ID is part of their configuration data,
138 * along with information about which SSC signals they should use.
139 */
140#define ATMEL_SSC_TK 0x01
141#define ATMEL_SSC_TF 0x02
142#define ATMEL_SSC_TD 0x04
143#define ATMEL_SSC_TX (ATMEL_SSC_TK | ATMEL_SSC_TF | ATMEL_SSC_TD)
144
145#define ATMEL_SSC_RK 0x10
146#define ATMEL_SSC_RF 0x20
147#define ATMEL_SSC_RD 0x40
148#define ATMEL_SSC_RX (ATMEL_SSC_RK | ATMEL_SSC_RF | ATMEL_SSC_RD)
149
150extern void __init at91_add_device_ssc(unsigned id, unsigned pins);
151
152 /* LCD Controller */
153struct atmel_lcdfb_info;
154extern void __init at91_add_device_lcdc(struct atmel_lcdfb_info *data);
155
156 /* AC97 */
157struct atmel_ac97_data {
158 u8 reset_pin; /* reset */
159};
160extern void __init at91_add_device_ac97(struct atmel_ac97_data *data);
161
162 /* ISI */
163extern void __init at91_add_device_isi(void);
164
165 /* LEDs */
166extern void __init at91_init_leds(u8 cpu_led, u8 timer_led);
167extern void __init at91_gpio_leds(struct gpio_led *leds, int nr);
168
169/* FIXME: this needs a better location, but gets stuff building again */
170extern int at91_suspend_entering_slow_clock(void);
171
172#endif
diff --git a/arch/arm/mach-at91/include/mach/cpu.h b/arch/arm/mach-at91/include/mach/cpu.h
new file mode 100644
index 000000000000..dbfd9f73f80b
--- /dev/null
+++ b/arch/arm/mach-at91/include/mach/cpu.h
@@ -0,0 +1,103 @@
1/*
2 * arch/arm/mach-at91/include/mach/cpu.h
3 *
4 * Copyright (C) 2006 SAN People
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 */
12
13#ifndef __ASM_ARCH_CPU_H
14#define __ASM_ARCH_CPU_H
15
16#include <mach/hardware.h>
17#include <mach/at91_dbgu.h>
18
19
20#define ARCH_ID_AT91RM9200 0x09290780
21#define ARCH_ID_AT91SAM9260 0x019803a0
22#define ARCH_ID_AT91SAM9261 0x019703a0
23#define ARCH_ID_AT91SAM9263 0x019607a0
24#define ARCH_ID_AT91SAM9G20 0x019905a0
25#define ARCH_ID_AT91SAM9RL64 0x019b03a0
26#define ARCH_ID_AT91CAP9 0x039A03A0
27
28#define ARCH_ID_AT91SAM9XE128 0x329973a0
29#define ARCH_ID_AT91SAM9XE256 0x329a93a0
30#define ARCH_ID_AT91SAM9XE512 0x329aa3a0
31
32#define ARCH_ID_AT91M40800 0x14080044
33#define ARCH_ID_AT91R40807 0x44080746
34#define ARCH_ID_AT91M40807 0x14080745
35#define ARCH_ID_AT91R40008 0x44000840
36
37static inline unsigned long at91_cpu_identify(void)
38{
39 return (at91_sys_read(AT91_DBGU_CIDR) & ~AT91_CIDR_VERSION);
40}
41
42
43#define ARCH_FAMILY_AT91X92 0x09200000
44#define ARCH_FAMILY_AT91SAM9 0x01900000
45#define ARCH_FAMILY_AT91SAM9XE 0x02900000
46
47static inline unsigned long at91_arch_identify(void)
48{
49 return (at91_sys_read(AT91_DBGU_CIDR) & AT91_CIDR_ARCH);
50}
51
52
53#ifdef CONFIG_ARCH_AT91RM9200
54#define cpu_is_at91rm9200() (at91_cpu_identify() == ARCH_ID_AT91RM9200)
55#else
56#define cpu_is_at91rm9200() (0)
57#endif
58
59#ifdef CONFIG_ARCH_AT91SAM9260
60#define cpu_is_at91sam9xe() (at91_arch_identify() == ARCH_FAMILY_AT91SAM9XE)
61#define cpu_is_at91sam9260() ((at91_cpu_identify() == ARCH_ID_AT91SAM9260) || cpu_is_at91sam9xe())
62#else
63#define cpu_is_at91sam9xe() (0)
64#define cpu_is_at91sam9260() (0)
65#endif
66
67#ifdef CONFIG_ARCH_AT91SAM9G20
68#define cpu_is_at91sam9g20() (at91_cpu_identify() == ARCH_ID_AT91SAM9G20)
69#else
70#define cpu_is_at91sam9g20() (0)
71#endif
72
73#ifdef CONFIG_ARCH_AT91SAM9261
74#define cpu_is_at91sam9261() (at91_cpu_identify() == ARCH_ID_AT91SAM9261)
75#else
76#define cpu_is_at91sam9261() (0)
77#endif
78
79#ifdef CONFIG_ARCH_AT91SAM9263
80#define cpu_is_at91sam9263() (at91_cpu_identify() == ARCH_ID_AT91SAM9263)
81#else
82#define cpu_is_at91sam9263() (0)
83#endif
84
85#ifdef CONFIG_ARCH_AT91SAM9RL
86#define cpu_is_at91sam9rl() (at91_cpu_identify() == ARCH_ID_AT91SAM9RL64)
87#else
88#define cpu_is_at91sam9rl() (0)
89#endif
90
91#ifdef CONFIG_ARCH_AT91CAP9
92#define cpu_is_at91cap9() (at91_cpu_identify() == ARCH_ID_AT91CAP9)
93#else
94#define cpu_is_at91cap9() (0)
95#endif
96
97/*
98 * Since this is ARM, we will never run on any AVR32 CPU. But these
99 * definitions may reduce clutter in common drivers.
100 */
101#define cpu_is_at32ap7000() (0)
102
103#endif
diff --git a/arch/arm/mach-at91/include/mach/debug-macro.S b/arch/arm/mach-at91/include/mach/debug-macro.S
new file mode 100644
index 000000000000..29052ba66ada
--- /dev/null
+++ b/arch/arm/mach-at91/include/mach/debug-macro.S
@@ -0,0 +1,39 @@
1/*
2 * arch/arm/mach-at91/include/mach/debug-macro.S
3 *
4 * Copyright (C) 2003-2005 SAN People
5 *
6 * Debugging macro include header
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 *
12*/
13
14#include <mach/hardware.h>
15#include <mach/at91_dbgu.h>
16
17 .macro addruart,rx
18 mrc p15, 0, \rx, c1, c0
19 tst \rx, #1 @ MMU enabled?
20 ldreq \rx, =(AT91_BASE_SYS + AT91_DBGU) @ System peripherals (phys address)
21 ldrne \rx, =(AT91_VA_BASE_SYS + AT91_DBGU) @ System peripherals (virt address)
22 .endm
23
24 .macro senduart,rd,rx
25 strb \rd, [\rx, #(AT91_DBGU_THR - AT91_DBGU)] @ Write to Transmitter Holding Register
26 .endm
27
28 .macro waituart,rd,rx
291001: ldr \rd, [\rx, #(AT91_DBGU_SR - AT91_DBGU)] @ Read Status Register
30 tst \rd, #AT91_DBGU_TXRDY @ DBGU_TXRDY = 1 when ready to transmit
31 beq 1001b
32 .endm
33
34 .macro busyuart,rd,rx
351001: ldr \rd, [\rx, #(AT91_DBGU_SR - AT91_DBGU)] @ Read Status Register
36 tst \rd, #AT91_DBGU_TXEMPTY @ DBGU_TXEMPTY = 1 when transmission complete
37 beq 1001b
38 .endm
39
diff --git a/arch/arm/mach-at91/include/mach/dma.h b/arch/arm/mach-at91/include/mach/dma.h
new file mode 100644
index 000000000000..e4f90c177616
--- /dev/null
+++ b/arch/arm/mach-at91/include/mach/dma.h
@@ -0,0 +1,19 @@
1/*
2 * arch/arm/mach-at91/include/mach/dma.h
3 *
4 * Copyright (C) 2003 SAN People
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
diff --git a/arch/arm/mach-at91/include/mach/entry-macro.S b/arch/arm/mach-at91/include/mach/entry-macro.S
new file mode 100644
index 000000000000..7ab68f972227
--- /dev/null
+++ b/arch/arm/mach-at91/include/mach/entry-macro.S
@@ -0,0 +1,32 @@
1/*
2 * arch/arm/mach-at91/include/mach/entry-macro.S
3 *
4 * Copyright (C) 2003-2005 SAN People
5 *
6 * Low-level IRQ helper macros for AT91RM9200 platforms
7 *
8 * This file is licensed under the terms of the GNU General Public
9 * License version 2. This program is licensed "as is" without any
10 * warranty of any kind, whether express or implied.
11 */
12
13#include <mach/hardware.h>
14#include <mach/at91_aic.h>
15
16 .macro disable_fiq
17 .endm
18
19 .macro get_irqnr_preamble, base, tmp
20 ldr \base, =(AT91_VA_BASE_SYS + AT91_AIC) @ base virtual address of AIC peripheral
21 .endm
22
23 .macro arch_ret_to_user, tmp1, tmp2
24 .endm
25
26 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
27 ldr \irqnr, [\base, #(AT91_AIC_IVR - AT91_AIC)] @ read IRQ vector register: de-asserts nIRQ to processor (and clears interrupt)
28 ldr \irqstat, [\base, #(AT91_AIC_ISR - AT91_AIC)] @ read interrupt source number
29 teq \irqstat, #0 @ ISR is 0 when no current interrupt, or spurious interrupt
30 streq \tmp, [\base, #(AT91_AIC_EOICR - AT91_AIC)] @ not going to be handled further, then ACK it now.
31 .endm
32
diff --git a/arch/arm/mach-at91/include/mach/gpio.h b/arch/arm/mach-at91/include/mach/gpio.h
new file mode 100644
index 000000000000..76d76e2fa69e
--- /dev/null
+++ b/arch/arm/mach-at91/include/mach/gpio.h
@@ -0,0 +1,252 @@
1/*
2 * arch/arm/mach-at91/include/mach/gpio.h
3 *
4 * Copyright (C) 2005 HP Labs
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 */
12
13#ifndef __ASM_ARCH_AT91RM9200_GPIO_H
14#define __ASM_ARCH_AT91RM9200_GPIO_H
15
16#include <asm/irq.h>
17
18#define PIN_BASE NR_AIC_IRQS
19
20#define MAX_GPIO_BANKS 5
21
22/* these pin numbers double as IRQ numbers, like AT91xxx_ID_* values */
23
24#define AT91_PIN_PA0 (PIN_BASE + 0x00 + 0)
25#define AT91_PIN_PA1 (PIN_BASE + 0x00 + 1)
26#define AT91_PIN_PA2 (PIN_BASE + 0x00 + 2)
27#define AT91_PIN_PA3 (PIN_BASE + 0x00 + 3)
28#define AT91_PIN_PA4 (PIN_BASE + 0x00 + 4)
29#define AT91_PIN_PA5 (PIN_BASE + 0x00 + 5)
30#define AT91_PIN_PA6 (PIN_BASE + 0x00 + 6)
31#define AT91_PIN_PA7 (PIN_BASE + 0x00 + 7)
32#define AT91_PIN_PA8 (PIN_BASE + 0x00 + 8)
33#define AT91_PIN_PA9 (PIN_BASE + 0x00 + 9)
34#define AT91_PIN_PA10 (PIN_BASE + 0x00 + 10)
35#define AT91_PIN_PA11 (PIN_BASE + 0x00 + 11)
36#define AT91_PIN_PA12 (PIN_BASE + 0x00 + 12)
37#define AT91_PIN_PA13 (PIN_BASE + 0x00 + 13)
38#define AT91_PIN_PA14 (PIN_BASE + 0x00 + 14)
39#define AT91_PIN_PA15 (PIN_BASE + 0x00 + 15)
40#define AT91_PIN_PA16 (PIN_BASE + 0x00 + 16)
41#define AT91_PIN_PA17 (PIN_BASE + 0x00 + 17)
42#define AT91_PIN_PA18 (PIN_BASE + 0x00 + 18)
43#define AT91_PIN_PA19 (PIN_BASE + 0x00 + 19)
44#define AT91_PIN_PA20 (PIN_BASE + 0x00 + 20)
45#define AT91_PIN_PA21 (PIN_BASE + 0x00 + 21)
46#define AT91_PIN_PA22 (PIN_BASE + 0x00 + 22)
47#define AT91_PIN_PA23 (PIN_BASE + 0x00 + 23)
48#define AT91_PIN_PA24 (PIN_BASE + 0x00 + 24)
49#define AT91_PIN_PA25 (PIN_BASE + 0x00 + 25)
50#define AT91_PIN_PA26 (PIN_BASE + 0x00 + 26)
51#define AT91_PIN_PA27 (PIN_BASE + 0x00 + 27)
52#define AT91_PIN_PA28 (PIN_BASE + 0x00 + 28)
53#define AT91_PIN_PA29 (PIN_BASE + 0x00 + 29)
54#define AT91_PIN_PA30 (PIN_BASE + 0x00 + 30)
55#define AT91_PIN_PA31 (PIN_BASE + 0x00 + 31)
56
57#define AT91_PIN_PB0 (PIN_BASE + 0x20 + 0)
58#define AT91_PIN_PB1 (PIN_BASE + 0x20 + 1)
59#define AT91_PIN_PB2 (PIN_BASE + 0x20 + 2)
60#define AT91_PIN_PB3 (PIN_BASE + 0x20 + 3)
61#define AT91_PIN_PB4 (PIN_BASE + 0x20 + 4)
62#define AT91_PIN_PB5 (PIN_BASE + 0x20 + 5)
63#define AT91_PIN_PB6 (PIN_BASE + 0x20 + 6)
64#define AT91_PIN_PB7 (PIN_BASE + 0x20 + 7)
65#define AT91_PIN_PB8 (PIN_BASE + 0x20 + 8)
66#define AT91_PIN_PB9 (PIN_BASE + 0x20 + 9)
67#define AT91_PIN_PB10 (PIN_BASE + 0x20 + 10)
68#define AT91_PIN_PB11 (PIN_BASE + 0x20 + 11)
69#define AT91_PIN_PB12 (PIN_BASE + 0x20 + 12)
70#define AT91_PIN_PB13 (PIN_BASE + 0x20 + 13)
71#define AT91_PIN_PB14 (PIN_BASE + 0x20 + 14)
72#define AT91_PIN_PB15 (PIN_BASE + 0x20 + 15)
73#define AT91_PIN_PB16 (PIN_BASE + 0x20 + 16)
74#define AT91_PIN_PB17 (PIN_BASE + 0x20 + 17)
75#define AT91_PIN_PB18 (PIN_BASE + 0x20 + 18)
76#define AT91_PIN_PB19 (PIN_BASE + 0x20 + 19)
77#define AT91_PIN_PB20 (PIN_BASE + 0x20 + 20)
78#define AT91_PIN_PB21 (PIN_BASE + 0x20 + 21)
79#define AT91_PIN_PB22 (PIN_BASE + 0x20 + 22)
80#define AT91_PIN_PB23 (PIN_BASE + 0x20 + 23)
81#define AT91_PIN_PB24 (PIN_BASE + 0x20 + 24)
82#define AT91_PIN_PB25 (PIN_BASE + 0x20 + 25)
83#define AT91_PIN_PB26 (PIN_BASE + 0x20 + 26)
84#define AT91_PIN_PB27 (PIN_BASE + 0x20 + 27)
85#define AT91_PIN_PB28 (PIN_BASE + 0x20 + 28)
86#define AT91_PIN_PB29 (PIN_BASE + 0x20 + 29)
87#define AT91_PIN_PB30 (PIN_BASE + 0x20 + 30)
88#define AT91_PIN_PB31 (PIN_BASE + 0x20 + 31)
89
90#define AT91_PIN_PC0 (PIN_BASE + 0x40 + 0)
91#define AT91_PIN_PC1 (PIN_BASE + 0x40 + 1)
92#define AT91_PIN_PC2 (PIN_BASE + 0x40 + 2)
93#define AT91_PIN_PC3 (PIN_BASE + 0x40 + 3)
94#define AT91_PIN_PC4 (PIN_BASE + 0x40 + 4)
95#define AT91_PIN_PC5 (PIN_BASE + 0x40 + 5)
96#define AT91_PIN_PC6 (PIN_BASE + 0x40 + 6)
97#define AT91_PIN_PC7 (PIN_BASE + 0x40 + 7)
98#define AT91_PIN_PC8 (PIN_BASE + 0x40 + 8)
99#define AT91_PIN_PC9 (PIN_BASE + 0x40 + 9)
100#define AT91_PIN_PC10 (PIN_BASE + 0x40 + 10)
101#define AT91_PIN_PC11 (PIN_BASE + 0x40 + 11)
102#define AT91_PIN_PC12 (PIN_BASE + 0x40 + 12)
103#define AT91_PIN_PC13 (PIN_BASE + 0x40 + 13)
104#define AT91_PIN_PC14 (PIN_BASE + 0x40 + 14)
105#define AT91_PIN_PC15 (PIN_BASE + 0x40 + 15)
106#define AT91_PIN_PC16 (PIN_BASE + 0x40 + 16)
107#define AT91_PIN_PC17 (PIN_BASE + 0x40 + 17)
108#define AT91_PIN_PC18 (PIN_BASE + 0x40 + 18)
109#define AT91_PIN_PC19 (PIN_BASE + 0x40 + 19)
110#define AT91_PIN_PC20 (PIN_BASE + 0x40 + 20)
111#define AT91_PIN_PC21 (PIN_BASE + 0x40 + 21)
112#define AT91_PIN_PC22 (PIN_BASE + 0x40 + 22)
113#define AT91_PIN_PC23 (PIN_BASE + 0x40 + 23)
114#define AT91_PIN_PC24 (PIN_BASE + 0x40 + 24)
115#define AT91_PIN_PC25 (PIN_BASE + 0x40 + 25)
116#define AT91_PIN_PC26 (PIN_BASE + 0x40 + 26)
117#define AT91_PIN_PC27 (PIN_BASE + 0x40 + 27)
118#define AT91_PIN_PC28 (PIN_BASE + 0x40 + 28)
119#define AT91_PIN_PC29 (PIN_BASE + 0x40 + 29)
120#define AT91_PIN_PC30 (PIN_BASE + 0x40 + 30)
121#define AT91_PIN_PC31 (PIN_BASE + 0x40 + 31)
122
123#define AT91_PIN_PD0 (PIN_BASE + 0x60 + 0)
124#define AT91_PIN_PD1 (PIN_BASE + 0x60 + 1)
125#define AT91_PIN_PD2 (PIN_BASE + 0x60 + 2)
126#define AT91_PIN_PD3 (PIN_BASE + 0x60 + 3)
127#define AT91_PIN_PD4 (PIN_BASE + 0x60 + 4)
128#define AT91_PIN_PD5 (PIN_BASE + 0x60 + 5)
129#define AT91_PIN_PD6 (PIN_BASE + 0x60 + 6)
130#define AT91_PIN_PD7 (PIN_BASE + 0x60 + 7)
131#define AT91_PIN_PD8 (PIN_BASE + 0x60 + 8)
132#define AT91_PIN_PD9 (PIN_BASE + 0x60 + 9)
133#define AT91_PIN_PD10 (PIN_BASE + 0x60 + 10)
134#define AT91_PIN_PD11 (PIN_BASE + 0x60 + 11)
135#define AT91_PIN_PD12 (PIN_BASE + 0x60 + 12)
136#define AT91_PIN_PD13 (PIN_BASE + 0x60 + 13)
137#define AT91_PIN_PD14 (PIN_BASE + 0x60 + 14)
138#define AT91_PIN_PD15 (PIN_BASE + 0x60 + 15)
139#define AT91_PIN_PD16 (PIN_BASE + 0x60 + 16)
140#define AT91_PIN_PD17 (PIN_BASE + 0x60 + 17)
141#define AT91_PIN_PD18 (PIN_BASE + 0x60 + 18)
142#define AT91_PIN_PD19 (PIN_BASE + 0x60 + 19)
143#define AT91_PIN_PD20 (PIN_BASE + 0x60 + 20)
144#define AT91_PIN_PD21 (PIN_BASE + 0x60 + 21)
145#define AT91_PIN_PD22 (PIN_BASE + 0x60 + 22)
146#define AT91_PIN_PD23 (PIN_BASE + 0x60 + 23)
147#define AT91_PIN_PD24 (PIN_BASE + 0x60 + 24)
148#define AT91_PIN_PD25 (PIN_BASE + 0x60 + 25)
149#define AT91_PIN_PD26 (PIN_BASE + 0x60 + 26)
150#define AT91_PIN_PD27 (PIN_BASE + 0x60 + 27)
151#define AT91_PIN_PD28 (PIN_BASE + 0x60 + 28)
152#define AT91_PIN_PD29 (PIN_BASE + 0x60 + 29)
153#define AT91_PIN_PD30 (PIN_BASE + 0x60 + 30)
154#define AT91_PIN_PD31 (PIN_BASE + 0x60 + 31)
155
156#define AT91_PIN_PE0 (PIN_BASE + 0x80 + 0)
157#define AT91_PIN_PE1 (PIN_BASE + 0x80 + 1)
158#define AT91_PIN_PE2 (PIN_BASE + 0x80 + 2)
159#define AT91_PIN_PE3 (PIN_BASE + 0x80 + 3)
160#define AT91_PIN_PE4 (PIN_BASE + 0x80 + 4)
161#define AT91_PIN_PE5 (PIN_BASE + 0x80 + 5)
162#define AT91_PIN_PE6 (PIN_BASE + 0x80 + 6)
163#define AT91_PIN_PE7 (PIN_BASE + 0x80 + 7)
164#define AT91_PIN_PE8 (PIN_BASE + 0x80 + 8)
165#define AT91_PIN_PE9 (PIN_BASE + 0x80 + 9)
166#define AT91_PIN_PE10 (PIN_BASE + 0x80 + 10)
167#define AT91_PIN_PE11 (PIN_BASE + 0x80 + 11)
168#define AT91_PIN_PE12 (PIN_BASE + 0x80 + 12)
169#define AT91_PIN_PE13 (PIN_BASE + 0x80 + 13)
170#define AT91_PIN_PE14 (PIN_BASE + 0x80 + 14)
171#define AT91_PIN_PE15 (PIN_BASE + 0x80 + 15)
172#define AT91_PIN_PE16 (PIN_BASE + 0x80 + 16)
173#define AT91_PIN_PE17 (PIN_BASE + 0x80 + 17)
174#define AT91_PIN_PE18 (PIN_BASE + 0x80 + 18)
175#define AT91_PIN_PE19 (PIN_BASE + 0x80 + 19)
176#define AT91_PIN_PE20 (PIN_BASE + 0x80 + 20)
177#define AT91_PIN_PE21 (PIN_BASE + 0x80 + 21)
178#define AT91_PIN_PE22 (PIN_BASE + 0x80 + 22)
179#define AT91_PIN_PE23 (PIN_BASE + 0x80 + 23)
180#define AT91_PIN_PE24 (PIN_BASE + 0x80 + 24)
181#define AT91_PIN_PE25 (PIN_BASE + 0x80 + 25)
182#define AT91_PIN_PE26 (PIN_BASE + 0x80 + 26)
183#define AT91_PIN_PE27 (PIN_BASE + 0x80 + 27)
184#define AT91_PIN_PE28 (PIN_BASE + 0x80 + 28)
185#define AT91_PIN_PE29 (PIN_BASE + 0x80 + 29)
186#define AT91_PIN_PE30 (PIN_BASE + 0x80 + 30)
187#define AT91_PIN_PE31 (PIN_BASE + 0x80 + 31)
188
189#ifndef __ASSEMBLY__
190/* setup setup routines, called from board init or driver probe() */
191extern int __init_or_module at91_set_GPIO_periph(unsigned pin, int use_pullup);
192extern int __init_or_module at91_set_A_periph(unsigned pin, int use_pullup);
193extern int __init_or_module at91_set_B_periph(unsigned pin, int use_pullup);
194extern int __init_or_module at91_set_gpio_input(unsigned pin, int use_pullup);
195extern int __init_or_module at91_set_gpio_output(unsigned pin, int value);
196extern int __init_or_module at91_set_deglitch(unsigned pin, int is_on);
197extern int __init_or_module at91_set_multi_drive(unsigned pin, int is_on);
198
199/* callable at any time */
200extern int at91_set_gpio_value(unsigned pin, int value);
201extern int at91_get_gpio_value(unsigned pin);
202
203/* callable only from core power-management code */
204extern void at91_gpio_suspend(void);
205extern void at91_gpio_resume(void);
206
207/*-------------------------------------------------------------------------*/
208
209/* wrappers for "new style" GPIO calls. the old AT91-specfic ones should
210 * eventually be removed (along with this errno.h inclusion), and the
211 * gpio request/free calls should probably be implemented.
212 */
213
214#include <asm/errno.h>
215
216static inline int gpio_request(unsigned gpio, const char *label)
217{
218 return 0;
219}
220
221static inline void gpio_free(unsigned gpio)
222{
223}
224
225extern int gpio_direction_input(unsigned gpio);
226extern int gpio_direction_output(unsigned gpio, int value);
227
228static inline int gpio_get_value(unsigned gpio)
229{
230 return at91_get_gpio_value(gpio);
231}
232
233static inline void gpio_set_value(unsigned gpio, int value)
234{
235 at91_set_gpio_value(gpio, value);
236}
237
238#include <asm-generic/gpio.h> /* cansleep wrappers */
239
240static inline int gpio_to_irq(unsigned gpio)
241{
242 return gpio;
243}
244
245static inline int irq_to_gpio(unsigned irq)
246{
247 return irq;
248}
249
250#endif /* __ASSEMBLY__ */
251
252#endif
diff --git a/arch/arm/mach-at91/include/mach/hardware.h b/arch/arm/mach-at91/include/mach/hardware.h
new file mode 100644
index 000000000000..da0b681c652c
--- /dev/null
+++ b/arch/arm/mach-at91/include/mach/hardware.h
@@ -0,0 +1,92 @@
1/*
2 * arch/arm/mach-at91/include/mach/hardware.h
3 *
4 * Copyright (C) 2003 SAN People
5 * Copyright (C) 2003 ATMEL
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 */
13
14#ifndef __ASM_ARCH_HARDWARE_H
15#define __ASM_ARCH_HARDWARE_H
16
17#include <asm/sizes.h>
18
19#if defined(CONFIG_ARCH_AT91RM9200)
20#include <mach/at91rm9200.h>
21#elif defined(CONFIG_ARCH_AT91SAM9260) || defined(CONFIG_ARCH_AT91SAM9G20)
22#include <mach/at91sam9260.h>
23#elif defined(CONFIG_ARCH_AT91SAM9261)
24#include <mach/at91sam9261.h>
25#elif defined(CONFIG_ARCH_AT91SAM9263)
26#include <mach/at91sam9263.h>
27#elif defined(CONFIG_ARCH_AT91SAM9RL)
28#include <mach/at91sam9rl.h>
29#elif defined(CONFIG_ARCH_AT91CAP9)
30#include <mach/at91cap9.h>
31#elif defined(CONFIG_ARCH_AT91X40)
32#include <mach/at91x40.h>
33#else
34#error "Unsupported AT91 processor"
35#endif
36
37
38#ifdef CONFIG_MMU
39/*
40 * Remap the peripherals from address 0xFFF78000 .. 0xFFFFFFFF
41 * to 0xFEF78000 .. 0xFF000000. (544Kb)
42 */
43#define AT91_IO_PHYS_BASE 0xFFF78000
44#define AT91_IO_VIRT_BASE (0xFF000000 - AT91_IO_SIZE)
45#else
46/*
47 * Identity mapping for the non MMU case.
48 */
49#define AT91_IO_PHYS_BASE AT91_BASE_SYS
50#define AT91_IO_VIRT_BASE AT91_IO_PHYS_BASE
51#endif
52
53#define AT91_IO_SIZE (0xFFFFFFFF - AT91_IO_PHYS_BASE + 1)
54
55 /* Convert a physical IO address to virtual IO address */
56#define AT91_IO_P2V(x) ((x) - AT91_IO_PHYS_BASE + AT91_IO_VIRT_BASE)
57
58/*
59 * Virtual to Physical Address mapping for IO devices.
60 */
61#define AT91_VA_BASE_SYS AT91_IO_P2V(AT91_BASE_SYS)
62#define AT91_VA_BASE_EMAC AT91_IO_P2V(AT91RM9200_BASE_EMAC)
63
64 /* Internal SRAM is mapped below the IO devices */
65#define AT91_SRAM_MAX SZ_1M
66#define AT91_VIRT_BASE (AT91_IO_VIRT_BASE - AT91_SRAM_MAX)
67
68/* Serial ports */
69#define ATMEL_MAX_UART 7 /* 6 USART3's and one DBGU port (SAM9260) */
70
71/* External Memory Map */
72#define AT91_CHIPSELECT_0 0x10000000
73#define AT91_CHIPSELECT_1 0x20000000
74#define AT91_CHIPSELECT_2 0x30000000
75#define AT91_CHIPSELECT_3 0x40000000
76#define AT91_CHIPSELECT_4 0x50000000
77#define AT91_CHIPSELECT_5 0x60000000
78#define AT91_CHIPSELECT_6 0x70000000
79#define AT91_CHIPSELECT_7 0x80000000
80
81/* SDRAM */
82#ifdef CONFIG_DRAM_BASE
83#define AT91_SDRAM_BASE CONFIG_DRAM_BASE
84#else
85#define AT91_SDRAM_BASE AT91_CHIPSELECT_1
86#endif
87
88/* Clocks */
89#define AT91_SLOW_CLOCK 32768 /* slow clock */
90
91
92#endif
diff --git a/arch/arm/mach-at91/include/mach/io.h b/arch/arm/mach-at91/include/mach/io.h
new file mode 100644
index 000000000000..1611bd03f528
--- /dev/null
+++ b/arch/arm/mach-at91/include/mach/io.h
@@ -0,0 +1,48 @@
1/*
2 * arch/arm/mach-at91/include/mach/io.h
3 *
4 * Copyright (C) 2003 SAN People
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20
21#ifndef __ASM_ARCH_IO_H
22#define __ASM_ARCH_IO_H
23
24#define IO_SPACE_LIMIT 0xFFFFFFFF
25
26#define __io(a) ((void __iomem *)(a))
27#define __mem_pci(a) (a)
28
29
30#ifndef __ASSEMBLY__
31
32static inline unsigned int at91_sys_read(unsigned int reg_offset)
33{
34 void __iomem *addr = (void __iomem *)AT91_VA_BASE_SYS;
35
36 return __raw_readl(addr + reg_offset);
37}
38
39static inline void at91_sys_write(unsigned int reg_offset, unsigned long value)
40{
41 void __iomem *addr = (void __iomem *)AT91_VA_BASE_SYS;
42
43 __raw_writel(value, addr + reg_offset);
44}
45
46#endif
47
48#endif
diff --git a/arch/arm/mach-at91/include/mach/irqs.h b/arch/arm/mach-at91/include/mach/irqs.h
new file mode 100644
index 000000000000..bda29ccbcd94
--- /dev/null
+++ b/arch/arm/mach-at91/include/mach/irqs.h
@@ -0,0 +1,48 @@
1/*
2 * arch/arm/mach-at91/include/mach/irqs.h
3 *
4 * Copyright (C) 2004 SAN People
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20
21#ifndef __ASM_ARCH_IRQS_H
22#define __ASM_ARCH_IRQS_H
23
24#include <asm/io.h>
25#include <mach/at91_aic.h>
26
27#define NR_AIC_IRQS 32
28
29
30/*
31 * Acknowledge interrupt with AIC after interrupt has been handled.
32 * (by kernel/irq.c)
33 */
34#define irq_finish(irq) do { at91_sys_write(AT91_AIC_EOICR, 0); } while (0)
35
36
37/*
38 * IRQ interrupt symbols are the AT91xxx_ID_* symbols
39 * for IRQs handled directly through the AIC, or else the AT91_PIN_*
40 * symbols in gpio.h for ones handled indirectly as GPIOs.
41 * We make provision for 5 banks of GPIO.
42 */
43#define NR_IRQS (NR_AIC_IRQS + (5 * 32))
44
45/* FIQ is AIC source 0. */
46#define FIQ_START AT91_ID_FIQ
47
48#endif
diff --git a/arch/arm/mach-at91/include/mach/memory.h b/arch/arm/mach-at91/include/mach/memory.h
new file mode 100644
index 000000000000..9dd1b8c79b08
--- /dev/null
+++ b/arch/arm/mach-at91/include/mach/memory.h
@@ -0,0 +1,39 @@
1/*
2 * arch/arm/mach-at91/include/mach/memory.h
3 *
4 * Copyright (C) 2004 SAN People
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20
21#ifndef __ASM_ARCH_MEMORY_H
22#define __ASM_ARCH_MEMORY_H
23
24#include <mach/hardware.h>
25
26#define PHYS_OFFSET (AT91_SDRAM_BASE)
27
28
29/*
30 * Virtual view <-> DMA view memory address translations
31 * virt_to_bus: Used to translate the virtual address to an
32 * address suitable to be passed to set_dma_addr
33 * bus_to_virt: Used to convert an address for DMA operations
34 * to an address that the kernel can use.
35 */
36#define __virt_to_bus(x) __virt_to_phys(x)
37#define __bus_to_virt(x) __phys_to_virt(x)
38
39#endif
diff --git a/arch/arm/mach-at91/include/mach/system.h b/arch/arm/mach-at91/include/mach/system.h
new file mode 100644
index 000000000000..e712658d966c
--- /dev/null
+++ b/arch/arm/mach-at91/include/mach/system.h
@@ -0,0 +1,53 @@
1/*
2 * arch/arm/mach-at91/include/mach/system.h
3 *
4 * Copyright (C) 2003 SAN People
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20
21#ifndef __ASM_ARCH_SYSTEM_H
22#define __ASM_ARCH_SYSTEM_H
23
24#include <mach/hardware.h>
25#include <mach/at91_st.h>
26#include <mach/at91_dbgu.h>
27
28static inline void arch_idle(void)
29{
30 /*
31 * Disable the processor clock. The processor will be automatically
32 * re-enabled by an interrupt or by a reset.
33 */
34// at91_sys_write(AT91_PMC_SCDR, AT91_PMC_PCK);
35
36 /*
37 * Set the processor (CP15) into 'Wait for Interrupt' mode.
38 * Unlike disabling the processor clock via the PMC (above)
39 * this allows the processor to be woken via JTAG.
40 */
41 cpu_do_idle();
42}
43
44void (*at91_arch_reset)(void);
45
46static inline void arch_reset(char mode)
47{
48 /* call the CPU-specific reset function */
49 if (at91_arch_reset)
50 (at91_arch_reset)();
51}
52
53#endif
diff --git a/arch/arm/mach-at91/include/mach/timex.h b/arch/arm/mach-at91/include/mach/timex.h
new file mode 100644
index 000000000000..d84c9948becf
--- /dev/null
+++ b/arch/arm/mach-at91/include/mach/timex.h
@@ -0,0 +1,77 @@
1/*
2 * arch/arm/mach-at91/include/mach/timex.h
3 *
4 * Copyright (C) 2003 SAN People
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20
21#ifndef __ASM_ARCH_TIMEX_H
22#define __ASM_ARCH_TIMEX_H
23
24#include <mach/hardware.h>
25
26#if defined(CONFIG_ARCH_AT91RM9200)
27
28#define CLOCK_TICK_RATE (AT91_SLOW_CLOCK)
29
30#elif defined(CONFIG_ARCH_AT91SAM9260)
31
32#if defined(CONFIG_MACH_USB_A9260) || defined(CONFIG_MACH_QIL_A9260)
33#define AT91SAM9_MASTER_CLOCK 90000000
34#else
35#define AT91SAM9_MASTER_CLOCK 99300000
36#endif
37
38#define CLOCK_TICK_RATE (AT91SAM9_MASTER_CLOCK/16)
39
40#elif defined(CONFIG_ARCH_AT91SAM9261)
41
42#define AT91SAM9_MASTER_CLOCK 99300000
43#define CLOCK_TICK_RATE (AT91SAM9_MASTER_CLOCK/16)
44
45#elif defined(CONFIG_ARCH_AT91SAM9263)
46
47#if defined(CONFIG_MACH_USB_A9263)
48#define AT91SAM9_MASTER_CLOCK 90000000
49#else
50#define AT91SAM9_MASTER_CLOCK 99959500
51#endif
52
53#define CLOCK_TICK_RATE (AT91SAM9_MASTER_CLOCK/16)
54
55#elif defined(CONFIG_ARCH_AT91SAM9RL)
56
57#define AT91SAM9_MASTER_CLOCK 100000000
58#define CLOCK_TICK_RATE (AT91SAM9_MASTER_CLOCK/16)
59
60#elif defined(CONFIG_ARCH_AT91SAM9G20)
61
62#define AT91SAM9_MASTER_CLOCK 132096000
63#define CLOCK_TICK_RATE (AT91SAM9_MASTER_CLOCK/16)
64
65#elif defined(CONFIG_ARCH_AT91CAP9)
66
67#define AT91CAP9_MASTER_CLOCK 100000000
68#define CLOCK_TICK_RATE (AT91CAP9_MASTER_CLOCK/16)
69
70#elif defined(CONFIG_ARCH_AT91X40)
71
72#define AT91X40_MASTER_CLOCK 40000000
73#define CLOCK_TICK_RATE (AT91X40_MASTER_CLOCK)
74
75#endif
76
77#endif
diff --git a/arch/arm/mach-at91/include/mach/uncompress.h b/arch/arm/mach-at91/include/mach/uncompress.h
new file mode 100644
index 000000000000..0410d548e9b1
--- /dev/null
+++ b/arch/arm/mach-at91/include/mach/uncompress.h
@@ -0,0 +1,76 @@
1/*
2 * arch/arm/mach-at91/include/mach/uncompress.h
3 *
4 * Copyright (C) 2003 SAN People
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20
21#ifndef __ASM_ARCH_UNCOMPRESS_H
22#define __ASM_ARCH_UNCOMPRESS_H
23
24#include <asm/io.h>
25#include <linux/atmel_serial.h>
26
27#if defined(CONFIG_AT91_EARLY_DBGU)
28#define UART_OFFSET (AT91_DBGU + AT91_BASE_SYS)
29#elif defined(CONFIG_AT91_EARLY_USART0)
30#define UART_OFFSET AT91_USART0
31#elif defined(CONFIG_AT91_EARLY_USART1)
32#define UART_OFFSET AT91_USART1
33#elif defined(CONFIG_AT91_EARLY_USART2)
34#define UART_OFFSET AT91_USART2
35#elif defined(CONFIG_AT91_EARLY_USART3)
36#define UART_OFFSET AT91_USART3
37#elif defined(CONFIG_AT91_EARLY_USART4)
38#define UART_OFFSET AT91_USART4
39#elif defined(CONFIG_AT91_EARLY_USART5)
40#define UART_OFFSET AT91_USART5
41#endif
42
43/*
44 * The following code assumes the serial port has already been
45 * initialized by the bootloader. If you didn't setup a port in
46 * your bootloader then nothing will appear (which might be desired).
47 *
48 * This does not append a newline
49 */
50static void putc(int c)
51{
52#ifdef UART_OFFSET
53 void __iomem *sys = (void __iomem *) UART_OFFSET; /* physical address */
54
55 while (!(__raw_readl(sys + ATMEL_US_CSR) & ATMEL_US_TXRDY))
56 barrier();
57 __raw_writel(c, sys + ATMEL_US_THR);
58#endif
59}
60
61static inline void flush(void)
62{
63#ifdef UART_OFFSET
64 void __iomem *sys = (void __iomem *) UART_OFFSET; /* physical address */
65
66 /* wait for transmission to complete */
67 while (!(__raw_readl(sys + ATMEL_US_CSR) & ATMEL_US_TXEMPTY))
68 barrier();
69#endif
70}
71
72#define arch_decomp_setup()
73
74#define arch_decomp_wdog()
75
76#endif
diff --git a/arch/arm/mach-at91/include/mach/vmalloc.h b/arch/arm/mach-at91/include/mach/vmalloc.h
new file mode 100644
index 000000000000..8eb459f3f5b7
--- /dev/null
+++ b/arch/arm/mach-at91/include/mach/vmalloc.h
@@ -0,0 +1,26 @@
1/*
2 * arch/arm/mach-at91/include/mach/vmalloc.h
3 *
4 * Copyright (C) 2003 SAN People
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20
21#ifndef __ASM_ARCH_VMALLOC_H
22#define __ASM_ARCH_VMALLOC_H
23
24#define VMALLOC_END (AT91_VIRT_BASE & PGDIR_MASK)
25
26#endif
diff --git a/arch/arm/mach-at91/irq.c b/arch/arm/mach-at91/irq.c
index ca87587b2b4b..da3494a53423 100644
--- a/arch/arm/mach-at91/irq.c
+++ b/arch/arm/mach-at91/irq.c
@@ -25,9 +25,8 @@
25#include <linux/mm.h> 25#include <linux/mm.h>
26#include <linux/types.h> 26#include <linux/types.h>
27 27
28#include <asm/hardware.h> 28#include <mach/hardware.h>
29#include <asm/irq.h> 29#include <asm/irq.h>
30#include <asm/mach-types.h>
31#include <asm/setup.h> 30#include <asm/setup.h>
32 31
33#include <asm/mach/arch.h> 32#include <asm/mach/arch.h>
diff --git a/arch/arm/mach-at91/leds.c b/arch/arm/mach-at91/leds.c
index 9cdcda500fe8..fec03c59ff94 100644
--- a/arch/arm/mach-at91/leds.c
+++ b/arch/arm/mach-at91/leds.c
@@ -13,9 +13,8 @@
13#include <linux/module.h> 13#include <linux/module.h>
14#include <linux/init.h> 14#include <linux/init.h>
15 15
16#include <asm/mach-types.h> 16#include <mach/board.h>
17#include <asm/arch/board.h> 17#include <mach/gpio.h>
18#include <asm/arch/gpio.h>
19 18
20 19
21/* ------------------------------------------------------------------------- */ 20/* ------------------------------------------------------------------------- */
diff --git a/arch/arm/mach-at91/pm.c b/arch/arm/mach-at91/pm.c
index 8ab4feb1ec5b..ec2fe4ca1e27 100644
--- a/arch/arm/mach-at91/pm.c
+++ b/arch/arm/mach-at91/pm.c
@@ -23,16 +23,15 @@
23#include <asm/atomic.h> 23#include <asm/atomic.h>
24#include <asm/mach/time.h> 24#include <asm/mach/time.h>
25#include <asm/mach/irq.h> 25#include <asm/mach/irq.h>
26#include <asm/mach-types.h>
27 26
28#include <asm/arch/at91_pmc.h> 27#include <mach/at91_pmc.h>
29#include <asm/arch/gpio.h> 28#include <mach/gpio.h>
30#include <asm/arch/cpu.h> 29#include <mach/cpu.h>
31 30
32#include "generic.h" 31#include "generic.h"
33 32
34#ifdef CONFIG_ARCH_AT91RM9200 33#ifdef CONFIG_ARCH_AT91RM9200
35#include <asm/arch/at91rm9200_mc.h> 34#include <mach/at91rm9200_mc.h>
36 35
37/* 36/*
38 * The AT91RM9200 goes into self-refresh mode with this command, and will 37 * The AT91RM9200 goes into self-refresh mode with this command, and will
@@ -42,7 +41,7 @@
42#define sdram_selfrefresh_disable() do {} while (0) 41#define sdram_selfrefresh_disable() do {} while (0)
43 42
44#elif defined(CONFIG_ARCH_AT91CAP9) 43#elif defined(CONFIG_ARCH_AT91CAP9)
45#include <asm/arch/at91cap9_ddrsdr.h> 44#include <mach/at91cap9_ddrsdr.h>
46 45
47static u32 saved_lpr; 46static u32 saved_lpr;
48 47
@@ -59,7 +58,7 @@ static inline void sdram_selfrefresh_enable(void)
59#define sdram_selfrefresh_disable() at91_sys_write(AT91_DDRSDRC_LPR, saved_lpr) 58#define sdram_selfrefresh_disable() at91_sys_write(AT91_DDRSDRC_LPR, saved_lpr)
60 59
61#else 60#else
62#include <asm/arch/at91sam9_sdramc.h> 61#include <mach/at91sam9_sdramc.h>
63 62
64#ifdef CONFIG_ARCH_AT91SAM9263 63#ifdef CONFIG_ARCH_AT91SAM9263
65/* 64/*
@@ -92,8 +91,8 @@ static inline void sdram_selfrefresh_enable(void)
92 */ 91 */
93#if defined(AT91_SHDWC) 92#if defined(AT91_SHDWC)
94 93
95#include <asm/arch/at91_rstc.h> 94#include <mach/at91_rstc.h>
96#include <asm/arch/at91_shdwc.h> 95#include <mach/at91_shdwc.h>
97 96
98static void __init show_reset_status(void) 97static void __init show_reset_status(void)
99{ 98{
diff --git a/arch/arm/mach-clps711x/autcpu12.c b/arch/arm/mach-clps711x/autcpu12.c
index c13ca6c56baa..474616dcd7a6 100644
--- a/arch/arm/mach-clps711x/autcpu12.c
+++ b/arch/arm/mach-clps711x/autcpu12.c
@@ -23,7 +23,7 @@
23#include <linux/string.h> 23#include <linux/string.h>
24#include <linux/mm.h> 24#include <linux/mm.h>
25 25
26#include <asm/hardware.h> 26#include <mach/hardware.h>
27#include <asm/sizes.h> 27#include <asm/sizes.h>
28#include <asm/io.h> 28#include <asm/io.h>
29#include <asm/setup.h> 29#include <asm/setup.h>
@@ -33,7 +33,7 @@
33#include <asm/page.h> 33#include <asm/page.h>
34 34
35#include <asm/mach/map.h> 35#include <asm/mach/map.h>
36#include <asm/arch/autcpu12.h> 36#include <mach/autcpu12.h>
37 37
38#include "common.h" 38#include "common.h"
39 39
diff --git a/arch/arm/mach-clps711x/cdb89712.c b/arch/arm/mach-clps711x/cdb89712.c
index 831df007f6c7..aa02aa5a01f4 100644
--- a/arch/arm/mach-clps711x/cdb89712.c
+++ b/arch/arm/mach-clps711x/cdb89712.c
@@ -23,7 +23,7 @@
23#include <linux/string.h> 23#include <linux/string.h>
24#include <linux/mm.h> 24#include <linux/mm.h>
25 25
26#include <asm/hardware.h> 26#include <mach/hardware.h>
27#include <asm/io.h> 27#include <asm/io.h>
28#include <asm/pgtable.h> 28#include <asm/pgtable.h>
29#include <asm/page.h> 29#include <asm/page.h>
diff --git a/arch/arm/mach-clps711x/ceiva.c b/arch/arm/mach-clps711x/ceiva.c
index e2b2c5ac8a83..8ada20184978 100644
--- a/arch/arm/mach-clps711x/ceiva.c
+++ b/arch/arm/mach-clps711x/ceiva.c
@@ -27,7 +27,7 @@
27 27
28#include <linux/kernel.h> 28#include <linux/kernel.h>
29 29
30#include <asm/hardware.h> 30#include <mach/hardware.h>
31#include <asm/page.h> 31#include <asm/page.h>
32#include <asm/pgtable.h> 32#include <asm/pgtable.h>
33#include <asm/sizes.h> 33#include <asm/sizes.h>
diff --git a/arch/arm/mach-clps711x/edb7211-mm.c b/arch/arm/mach-clps711x/edb7211-mm.c
index 0d52e0851251..c58e32ec4c5d 100644
--- a/arch/arm/mach-clps711x/edb7211-mm.c
+++ b/arch/arm/mach-clps711x/edb7211-mm.c
@@ -22,7 +22,7 @@
22#include <linux/kernel.h> 22#include <linux/kernel.h>
23#include <linux/init.h> 23#include <linux/init.h>
24 24
25#include <asm/hardware.h> 25#include <mach/hardware.h>
26#include <asm/page.h> 26#include <asm/page.h>
27#include <asm/pgtable.h> 27#include <asm/pgtable.h>
28#include <asm/sizes.h> 28#include <asm/sizes.h>
diff --git a/arch/arm/mach-clps711x/fortunet.c b/arch/arm/mach-clps711x/fortunet.c
index 3792ab4f0996..7122b3d21043 100644
--- a/arch/arm/mach-clps711x/fortunet.c
+++ b/arch/arm/mach-clps711x/fortunet.c
@@ -23,7 +23,7 @@
23#include <linux/init.h> 23#include <linux/init.h>
24#include <linux/initrd.h> 24#include <linux/initrd.h>
25 25
26#include <asm/hardware.h> 26#include <mach/hardware.h>
27#include <asm/irq.h> 27#include <asm/irq.h>
28#include <asm/setup.h> 28#include <asm/setup.h>
29#include <asm/mach-types.h> 29#include <asm/mach-types.h>
diff --git a/include/asm-arm/arch-clps711x/autcpu12.h b/arch/arm/mach-clps711x/include/mach/autcpu12.h
index 1588a365f610..1588a365f610 100644
--- a/include/asm-arm/arch-clps711x/autcpu12.h
+++ b/arch/arm/mach-clps711x/include/mach/autcpu12.h
diff --git a/arch/arm/mach-clps711x/include/mach/debug-macro.S b/arch/arm/mach-clps711x/include/mach/debug-macro.S
new file mode 100644
index 000000000000..64baf9f87408
--- /dev/null
+++ b/arch/arm/mach-clps711x/include/mach/debug-macro.S
@@ -0,0 +1,46 @@
1/* arch/arm/mach-clps711x/include/mach/debug-macro.S
2 *
3 * Debugging macro include header
4 *
5 * Copyright (C) 1994-1999 Russell King
6 * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 *
12*/
13
14#include <asm/hardware/clps7111.h>
15
16 .macro addruart,rx
17 mrc p15, 0, \rx, c1, c0
18 tst \rx, #1 @ MMU enabled?
19 moveq \rx, #CLPS7111_PHYS_BASE
20 movne \rx, #CLPS7111_VIRT_BASE
21#ifndef CONFIG_DEBUG_CLPS711X_UART2
22 add \rx, \rx, #0x0000 @ UART1
23#else
24 add \rx, \rx, #0x1000 @ UART2
25#endif
26 .endm
27
28 .macro senduart,rd,rx
29 str \rd, [\rx, #0x0480] @ UARTDR
30 .endm
31
32 .macro waituart,rd,rx
331001: ldr \rd, [\rx, #0x0140] @ SYSFLGx
34 tst \rd, #1 << 11 @ UBUSYx
35 bne 1001b
36 .endm
37
38 .macro busyuart,rd,rx
39 tst \rx, #0x1000 @ UART2 does not have CTS here
40 bne 1002f
411001: ldr \rd, [\rx, #0x0140] @ SYSFLGx
42 tst \rd, #1 << 8 @ CTS
43 bne 1001b
441002:
45 .endm
46
diff --git a/arch/arm/mach-clps711x/include/mach/dma.h b/arch/arm/mach-clps711x/include/mach/dma.h
new file mode 100644
index 000000000000..0d620e869536
--- /dev/null
+++ b/arch/arm/mach-clps711x/include/mach/dma.h
@@ -0,0 +1,19 @@
1/*
2 * arch/arm/mach-clps711x/include/mach/dma.h
3 *
4 * Copyright (C) 1997,1998 Russell King
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
diff --git a/arch/arm/mach-clps711x/include/mach/entry-macro.S b/arch/arm/mach-clps711x/include/mach/entry-macro.S
new file mode 100644
index 000000000000..90fa2f70489f
--- /dev/null
+++ b/arch/arm/mach-clps711x/include/mach/entry-macro.S
@@ -0,0 +1,58 @@
1/*
2 * arch/arm/mach-clps711x/include/mach/entry-macro.S
3 *
4 * Low-level IRQ helper macros for CLPS711X-based platforms
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10#include <mach/hardware.h>
11#include <asm/hardware/clps7111.h>
12
13 .macro disable_fiq
14 .endm
15
16 .macro get_irqnr_preamble, base, tmp
17 .endm
18
19 .macro arch_ret_to_user, tmp1, tmp2
20 .endm
21
22#if (INTSR2 - INTSR1) != (INTMR2 - INTMR1)
23#error INTSR stride != INTMR stride
24#endif
25
26 .macro get_irqnr_and_base, irqnr, stat, base, mask
27 mov \base, #CLPS7111_BASE
28 ldr \stat, [\base, #INTSR1]
29 ldr \mask, [\base, #INTMR1]
30 mov \irqnr, #4
31 mov \mask, \mask, lsl #16
32 and \stat, \stat, \mask, lsr #16
33 movs \stat, \stat, lsr #4
34 bne 1001f
35
36 add \base, \base, #INTSR2 - INTSR1
37 ldr \stat, [\base, #INTSR1]
38 ldr \mask, [\base, #INTMR1]
39 mov \irqnr, #16
40 mov \mask, \mask, lsl #16
41 and \stat, \stat, \mask, lsr #16
42
431001: tst \stat, #255
44 addeq \irqnr, \irqnr, #8
45 moveq \stat, \stat, lsr #8
46 tst \stat, #15
47 addeq \irqnr, \irqnr, #4
48 moveq \stat, \stat, lsr #4
49 tst \stat, #3
50 addeq \irqnr, \irqnr, #2
51 moveq \stat, \stat, lsr #2
52 tst \stat, #1
53 addeq \irqnr, \irqnr, #1
54 moveq \stat, \stat, lsr #1
55 tst \stat, #1 @ bit 0 should be set
56 .endm
57
58
diff --git a/arch/arm/mach-clps711x/include/mach/hardware.h b/arch/arm/mach-clps711x/include/mach/hardware.h
new file mode 100644
index 000000000000..4c3e101b96c9
--- /dev/null
+++ b/arch/arm/mach-clps711x/include/mach/hardware.h
@@ -0,0 +1,237 @@
1/*
2 * arch/arm/mach-clps711x/include/mach/hardware.h
3 *
4 * This file contains the hardware definitions of the Prospector P720T.
5 *
6 * Copyright (C) 2000 Deep Blue Solutions Ltd.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 */
22#ifndef __ASM_ARCH_HARDWARE_H
23#define __ASM_ARCH_HARDWARE_H
24
25
26#define CLPS7111_VIRT_BASE 0xff000000
27#define CLPS7111_BASE CLPS7111_VIRT_BASE
28
29/*
30 * The physical addresses that the external chip select signals map to is
31 * dependent on the setting of the nMEDCHG signal on EP7211 and EP7212
32 * processors. CONFIG_EP72XX_BOOT_ROM is only available if these
33 * processors are in use.
34 */
35#ifndef CONFIG_EP72XX_ROM_BOOT
36#define CS0_PHYS_BASE (0x00000000)
37#define CS1_PHYS_BASE (0x10000000)
38#define CS2_PHYS_BASE (0x20000000)
39#define CS3_PHYS_BASE (0x30000000)
40#define CS4_PHYS_BASE (0x40000000)
41#define CS5_PHYS_BASE (0x50000000)
42#define CS6_PHYS_BASE (0x60000000)
43#define CS7_PHYS_BASE (0x70000000)
44#else
45#define CS0_PHYS_BASE (0x70000000)
46#define CS1_PHYS_BASE (0x60000000)
47#define CS2_PHYS_BASE (0x50000000)
48#define CS3_PHYS_BASE (0x40000000)
49#define CS4_PHYS_BASE (0x30000000)
50#define CS5_PHYS_BASE (0x20000000)
51#define CS6_PHYS_BASE (0x10000000)
52#define CS7_PHYS_BASE (0x00000000)
53#endif
54
55#if defined (CONFIG_ARCH_EP7211)
56
57#define EP7211_VIRT_BASE CLPS7111_VIRT_BASE
58#define EP7211_BASE CLPS7111_VIRT_BASE
59#include <asm/hardware/ep7211.h>
60
61#elif defined (CONFIG_ARCH_EP7212)
62
63#define EP7212_VIRT_BASE CLPS7111_VIRT_BASE
64#define EP7212_BASE CLPS7111_VIRT_BASE
65#include <asm/hardware/ep7212.h>
66
67#endif
68
69#define SYSPLD_VIRT_BASE 0xfe000000
70#define SYSPLD_BASE SYSPLD_VIRT_BASE
71
72#ifndef __ASSEMBLER__
73
74#define PCIO_BASE IO_BASE
75
76#endif
77
78
79#if defined (CONFIG_ARCH_AUTCPU12)
80
81#define CS89712_VIRT_BASE CLPS7111_VIRT_BASE
82#define CS89712_BASE CLPS7111_VIRT_BASE
83
84#include <asm/hardware/clps7111.h>
85#include <asm/hardware/ep7212.h>
86#include <asm/hardware/cs89712.h>
87
88#endif
89
90
91#if defined (CONFIG_ARCH_CDB89712)
92
93#include <asm/hardware/clps7111.h>
94#include <asm/hardware/ep7212.h>
95#include <asm/hardware/cs89712.h>
96
97/* dynamic ioremap() areas */
98#define FLASH_START 0x00000000
99#define FLASH_SIZE 0x800000
100#define FLASH_WIDTH 4
101
102#define SRAM_START 0x60000000
103#define SRAM_SIZE 0xc000
104#define SRAM_WIDTH 4
105
106#define BOOTROM_START 0x70000000
107#define BOOTROM_SIZE 0x80
108#define BOOTROM_WIDTH 4
109
110
111/* static cdb89712_map_io() areas */
112#define REGISTER_START 0x80000000
113#define REGISTER_SIZE 0x4000
114#define REGISTER_BASE 0xff000000
115
116#define ETHER_START 0x20000000
117#define ETHER_SIZE 0x1000
118#define ETHER_BASE 0xfe000000
119
120#endif
121
122
123#if defined (CONFIG_ARCH_EDB7211)
124
125/*
126 * The extra 8 lines of the keyboard matrix are wired to chip select 3 (nCS3)
127 * and repeat across it. This is the mapping for it.
128 *
129 * In jumpered boot mode, nCS3 is mapped to 0x4000000, not 0x3000000. This
130 * was cause for much consternation and headscratching. This should probably
131 * be made a compile/run time kernel option.
132 */
133#define EP7211_PHYS_EXTKBD CS3_PHYS_BASE /* physical */
134
135#define EP7211_VIRT_EXTKBD (0xfd000000) /* virtual */
136
137
138/*
139 * The CS8900A ethernet chip has its I/O registers wired to chip select 2
140 * (nCS2). This is the mapping for it.
141 *
142 * In jumpered boot mode, nCS2 is mapped to 0x5000000, not 0x2000000. This
143 * was cause for much consternation and headscratching. This should probably
144 * be made a compile/run time kernel option.
145 */
146#define EP7211_PHYS_CS8900A CS2_PHYS_BASE /* physical */
147
148#define EP7211_VIRT_CS8900A (0xfc000000) /* virtual */
149
150
151/*
152 * The two flash banks are wired to chip selects 0 and 1. This is the mapping
153 * for them.
154 *
155 * nCS0 and nCS1 are at 0x70000000 and 0x60000000, respectively, when running
156 * in jumpered boot mode.
157 */
158#define EP7211_PHYS_FLASH1 CS0_PHYS_BASE /* physical */
159#define EP7211_PHYS_FLASH2 CS1_PHYS_BASE /* physical */
160
161#define EP7211_VIRT_FLASH1 (0xfa000000) /* virtual */
162#define EP7211_VIRT_FLASH2 (0xfb000000) /* virtual */
163
164#endif /* CONFIG_ARCH_EDB7211 */
165
166
167/*
168 * Relevant bits in port D, which controls power to the various parts of
169 * the LCD on the EDB7211.
170 */
171#define EDB_PD1_LCD_DC_DC_EN (1<<1)
172#define EDB_PD2_LCDEN (1<<2)
173#define EDB_PD3_LCDBL (1<<3)
174
175
176#if defined (CONFIG_ARCH_CEIVA)
177
178#define CEIVA_VIRT_BASE CLPS7111_VIRT_BASE
179#define CEIVA_BASE CLPS7111_VIRT_BASE
180
181#include <asm/hardware/clps7111.h>
182#include <asm/hardware/ep7212.h>
183
184
185/*
186 * The two flash banks are wired to chip selects 0 and 1. This is the mapping
187 * for them.
188 *
189 * nCS0 and nCS1 are at 0x70000000 and 0x60000000, respectively, when running
190 * in jumpered boot mode.
191 */
192#define CEIVA_PHYS_FLASH1 CS0_PHYS_BASE /* physical */
193#define CEIVA_PHYS_FLASH2 CS1_PHYS_BASE /* physical */
194
195#define CEIVA_VIRT_FLASH1 (0xfa000000) /* virtual */
196#define CEIVA_VIRT_FLASH2 (0xfb000000) /* virtual */
197
198#define CEIVA_FLASH_SIZE 0x100000
199#define CEIVA_FLASH_WIDTH 2
200
201#define SRAM_START 0x60000000
202#define SRAM_SIZE 0xc000
203#define SRAM_WIDTH 4
204
205#define BOOTROM_START 0x70000000
206#define BOOTROM_SIZE 0x80
207#define BOOTROM_WIDTH 4
208
209/*
210 * SED1355 LCD controller
211 */
212#define CEIVA_PHYS_SED1355 CS2_PHYS_BASE
213#define CEIVA_VIRT_SED1355 (0xfc000000)
214
215/*
216 * Relevant bits in port D, which controls power to the various parts of
217 * the LCD on the Ceiva Photo Max, and reset to the LCD controller.
218 */
219
220// Reset line to SED1355 (must be high to operate)
221#define CEIVA_PD1_LCDRST (1<<1)
222// LCD panel enable (set to one, to enable LCD)
223#define CEIVA_PD4_LCDEN (1<<4)
224// Backlight (set to one, to turn on backlight
225#define CEIVA_PD5_LCDBL (1<<5)
226
227/*
228 * Relevant bits in port B, which report the status of the buttons.
229 */
230
231// White button
232#define CEIVA_PB4_WHT_BTN (1<<4)
233// Black button
234#define CEIVA_PB0_BLK_BTN (1<<0)
235#endif // #if defined (CONFIG_ARCH_CEIVA)
236
237#endif
diff --git a/arch/arm/mach-clps711x/include/mach/io.h b/arch/arm/mach-clps711x/include/mach/io.h
new file mode 100644
index 000000000000..4c8440087679
--- /dev/null
+++ b/arch/arm/mach-clps711x/include/mach/io.h
@@ -0,0 +1,38 @@
1/*
2 * arch/arm/mach-clps711x/include/mach/io.h
3 *
4 * Copyright (C) 1999 ARM Limited
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20#ifndef __ASM_ARM_ARCH_IO_H
21#define __ASM_ARM_ARCH_IO_H
22
23#include <mach/hardware.h>
24
25#define IO_SPACE_LIMIT 0xffffffff
26
27#define __io(a) ((void __iomem *)(a))
28#define __mem_pci(a) (a)
29
30/*
31 * We don't support ins[lb]/outs[lb]. Make them fault.
32 */
33#define __raw_readsb(p,d,l) do { *(int *)0 = 0; } while (0)
34#define __raw_readsl(p,d,l) do { *(int *)0 = 0; } while (0)
35#define __raw_writesb(p,d,l) do { *(int *)0 = 0; } while (0)
36#define __raw_writesl(p,d,l) do { *(int *)0 = 0; } while (0)
37
38#endif
diff --git a/arch/arm/mach-clps711x/include/mach/irqs.h b/arch/arm/mach-clps711x/include/mach/irqs.h
new file mode 100644
index 000000000000..30b7e97285a4
--- /dev/null
+++ b/arch/arm/mach-clps711x/include/mach/irqs.h
@@ -0,0 +1,53 @@
1/*
2 * arch/arm/mach-clps711x/include/mach/irqs.h
3 *
4 * Copyright (C) 2000 Deep Blue Solutions Ltd.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20
21/*
22 * Interrupts from INTSR1
23 */
24#define IRQ_CSINT 4
25#define IRQ_EINT1 5
26#define IRQ_EINT2 6
27#define IRQ_EINT3 7
28#define IRQ_TC1OI 8
29#define IRQ_TC2OI 9
30#define IRQ_RTCMI 10
31#define IRQ_TINT 11
32#define IRQ_UTXINT1 12
33#define IRQ_URXINT1 13
34#define IRQ_UMSINT 14
35#define IRQ_SSEOTI 15
36
37#define INT1_IRQS (0x0000fff0)
38#define INT1_ACK_IRQS (0x00004f10)
39
40/*
41 * Interrupts from INTSR2
42 */
43#define IRQ_KBDINT (16+0) /* bit 0 */
44#define IRQ_SS2RX (16+1) /* bit 1 */
45#define IRQ_SS2TX (16+2) /* bit 2 */
46#define IRQ_UTXINT2 (16+12) /* bit 12 */
47#define IRQ_URXINT2 (16+13) /* bit 13 */
48
49#define INT2_IRQS (0x30070000)
50#define INT2_ACK_IRQS (0x00010000)
51
52#define NR_IRQS 30
53
diff --git a/arch/arm/mach-clps711x/include/mach/memory.h b/arch/arm/mach-clps711x/include/mach/memory.h
new file mode 100644
index 000000000000..71c2fa70c8e8
--- /dev/null
+++ b/arch/arm/mach-clps711x/include/mach/memory.h
@@ -0,0 +1,94 @@
1/*
2 * arch/arm/mach-clps711x/include/mach/memory.h
3 *
4 * Copyright (C) 1999 ARM Limited
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20#ifndef __ASM_ARCH_MEMORY_H
21#define __ASM_ARCH_MEMORY_H
22
23
24/*
25 * Physical DRAM offset.
26 */
27#define PHYS_OFFSET UL(0xc0000000)
28
29/*
30 * Virtual view <-> DMA view memory address translations
31 * virt_to_bus: Used to translate the virtual address to an
32 * address suitable to be passed to set_dma_addr
33 * bus_to_virt: Used to convert an address for DMA operations
34 * to an address that the kernel can use.
35 */
36
37#if defined(CONFIG_ARCH_CDB89712)
38
39#define __virt_to_bus(x) (x)
40#define __bus_to_virt(x) (x)
41
42#elif defined (CONFIG_ARCH_AUTCPU12)
43
44#define __virt_to_bus(x) (x)
45#define __bus_to_virt(x) (x)
46
47#else
48
49#define __virt_to_bus(x) ((x) - PAGE_OFFSET)
50#define __bus_to_virt(x) ((x) + PAGE_OFFSET)
51
52#endif
53
54
55/*
56 * Like the SA1100, the EDB7211 has a large gap between physical RAM
57 * banks. In 2.2, the Psion (CL-PS7110) port added custom support for
58 * discontiguous physical memory. In 2.4, we can use the standard
59 * Linux NUMA support.
60 *
61 * This is not necessary for EP7211 implementations with only one used
62 * memory bank. For those systems, simply undefine CONFIG_DISCONTIGMEM.
63 */
64
65/*
66 * The PS7211 allows up to 256MB max per DRAM bank, but the EDB7211
67 * uses only one of the two banks (bank #1). However, even within
68 * bank #1, memory is discontiguous.
69 *
70 * The EDB7211 has two 8MB DRAM areas with 8MB of empty space between
71 * them, so we use 24 for the node max shift to get 16MB node sizes.
72 */
73
74/*
75 * Because of the wide memory address space between physical RAM banks on the
76 * SA1100, it's much more convenient to use Linux's NUMA support to implement
77 * our memory map representation. Assuming all memory nodes have equal access
78 * characteristics, we then have generic discontiguous memory support.
79 *
80 * Of course, all this isn't mandatory for SA1100 implementations with only
81 * one used memory bank. For those, simply undefine CONFIG_DISCONTIGMEM.
82 *
83 * The nodes are matched with the physical memory bank addresses which are
84 * incidentally the same as virtual addresses.
85 *
86 * node 0: 0xc0000000 - 0xc7ffffff
87 * node 1: 0xc8000000 - 0xcfffffff
88 * node 2: 0xd0000000 - 0xd7ffffff
89 * node 3: 0xd8000000 - 0xdfffffff
90 */
91#define NODE_MEM_SIZE_BITS 24
92
93#endif
94
diff --git a/arch/arm/mach-clps711x/include/mach/syspld.h b/arch/arm/mach-clps711x/include/mach/syspld.h
new file mode 100644
index 000000000000..f7f4c1201898
--- /dev/null
+++ b/arch/arm/mach-clps711x/include/mach/syspld.h
@@ -0,0 +1,121 @@
1/*
2 * arch/arm/mach-clps711x/include/mach/syspld.h
3 *
4 * System Control PLD register definitions.
5 *
6 * Copyright (C) 2000 Deep Blue Solutions Ltd.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 */
22#ifndef __ASM_ARCH_SYSPLD_H
23#define __ASM_ARCH_SYSPLD_H
24
25#define SYSPLD_PHYS_BASE (0x10000000)
26
27#ifndef __ASSEMBLY__
28#include <asm/types.h>
29
30#define SYSPLD_REG(type,off) (*(volatile type *)(SYSPLD_BASE + off))
31#else
32#define SYSPLD_REG(type,off) (off)
33#endif
34
35#define PLD_INT SYSPLD_REG(u32, 0x000000)
36#define PLD_INT_PENIRQ (1 << 5)
37#define PLD_INT_UCB_IRQ (1 << 1)
38#define PLD_INT_KBD_ATN (1 << 0) /* EINT1 */
39
40#define PLD_PWR SYSPLD_REG(u32, 0x000004)
41#define PLD_PWR_EXT (1 << 5)
42#define PLD_PWR_MODE (1 << 4) /* 1 = PWM, 0 = PFM */
43#define PLD_S4_ON (1 << 3) /* LCD bias voltage enable */
44#define PLD_S3_ON (1 << 2) /* LCD backlight enable */
45#define PLD_S2_ON (1 << 1) /* LCD 3V3 supply enable */
46#define PLD_S1_ON (1 << 0) /* LCD 3V supply enable */
47
48#define PLD_KBD SYSPLD_REG(u32, 0x000008)
49#define PLD_KBD_WAKE (1 << 1)
50#define PLD_KBD_EN (1 << 0)
51
52#define PLD_SPI SYSPLD_REG(u32, 0x00000c)
53#define PLD_SPI_EN (1 << 0)
54
55#define PLD_IO SYSPLD_REG(u32, 0x000010)
56#define PLD_IO_BOOTSEL (1 << 6) /* boot sel switch */
57#define PLD_IO_USER (1 << 5) /* user defined switch */
58#define PLD_IO_LED3 (1 << 4)
59#define PLD_IO_LED2 (1 << 3)
60#define PLD_IO_LED1 (1 << 2)
61#define PLD_IO_LED0 (1 << 1)
62#define PLD_IO_LEDEN (1 << 0)
63
64#define PLD_IRDA SYSPLD_REG(u32, 0x000014)
65#define PLD_IRDA_EN (1 << 0)
66
67#define PLD_COM2 SYSPLD_REG(u32, 0x000018)
68#define PLD_COM2_EN (1 << 0)
69
70#define PLD_COM1 SYSPLD_REG(u32, 0x00001c)
71#define PLD_COM1_EN (1 << 0)
72
73#define PLD_AUD SYSPLD_REG(u32, 0x000020)
74#define PLD_AUD_DIV1 (1 << 6)
75#define PLD_AUD_DIV0 (1 << 5)
76#define PLD_AUD_CLK_SEL1 (1 << 4)
77#define PLD_AUD_CLK_SEL0 (1 << 3)
78#define PLD_AUD_MIC_PWR (1 << 2)
79#define PLD_AUD_MIC_GAIN (1 << 1)
80#define PLD_AUD_CODEC_EN (1 << 0)
81
82#define PLD_CF SYSPLD_REG(u32, 0x000024)
83#define PLD_CF2_SLEEP (1 << 5)
84#define PLD_CF1_SLEEP (1 << 4)
85#define PLD_CF2_nPDREQ (1 << 3)
86#define PLD_CF1_nPDREQ (1 << 2)
87#define PLD_CF2_nIRQ (1 << 1)
88#define PLD_CF1_nIRQ (1 << 0)
89
90#define PLD_SDC SYSPLD_REG(u32, 0x000028)
91#define PLD_SDC_INT_EN (1 << 2)
92#define PLD_SDC_WP (1 << 1)
93#define PLD_SDC_CD (1 << 0)
94
95#define PLD_FPGA SYSPLD_REG(u32, 0x00002c)
96
97#define PLD_CODEC SYSPLD_REG(u32, 0x400000)
98#define PLD_CODEC_IRQ3 (1 << 4)
99#define PLD_CODEC_IRQ2 (1 << 3)
100#define PLD_CODEC_IRQ1 (1 << 2)
101#define PLD_CODEC_EN (1 << 0)
102
103#define PLD_BRITE SYSPLD_REG(u32, 0x400004)
104#define PLD_BRITE_UP (1 << 1)
105#define PLD_BRITE_DN (1 << 0)
106
107#define PLD_LCDEN SYSPLD_REG(u32, 0x400008)
108#define PLD_LCDEN_EN (1 << 0)
109
110#define PLD_ID SYSPLD_REG(u32, 0x40000c)
111
112#define PLD_TCH SYSPLD_REG(u32, 0x400010)
113#define PLD_TCH_PENIRQ (1 << 1)
114#define PLD_TCH_EN (1 << 0)
115
116#define PLD_GPIO SYSPLD_REG(u32, 0x400014)
117#define PLD_GPIO2 (1 << 2)
118#define PLD_GPIO1 (1 << 1)
119#define PLD_GPIO0 (1 << 0)
120
121#endif
diff --git a/arch/arm/mach-clps711x/include/mach/system.h b/arch/arm/mach-clps711x/include/mach/system.h
new file mode 100644
index 000000000000..a8eade40317f
--- /dev/null
+++ b/arch/arm/mach-clps711x/include/mach/system.h
@@ -0,0 +1,40 @@
1/*
2 * arch/arm/mach-clps711x/include/mach/system.h
3 *
4 * Copyright (C) 2000 Deep Blue Solutions Ltd
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20#ifndef __ASM_ARCH_SYSTEM_H
21#define __ASM_ARCH_SYSTEM_H
22
23#include <mach/hardware.h>
24#include <asm/hardware/clps7111.h>
25#include <asm/io.h>
26
27static inline void arch_idle(void)
28{
29 clps_writel(1, HALT);
30 __asm__ __volatile__(
31 "mov r0, r0\n\
32 mov r0, r0");
33}
34
35static inline void arch_reset(char mode)
36{
37 cpu_reset(0);
38}
39
40#endif
diff --git a/arch/arm/mach-clps711x/include/mach/time.h b/arch/arm/mach-clps711x/include/mach/time.h
new file mode 100644
index 000000000000..8fe283ccd1f3
--- /dev/null
+++ b/arch/arm/mach-clps711x/include/mach/time.h
@@ -0,0 +1,49 @@
1/*
2 * arch/arm/mach-clps711x/include/mach/time.h
3 *
4 * Copyright (C) 2000 Deep Blue Solutions Ltd.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20#include <asm/leds.h>
21#include <asm/hardware/clps7111.h>
22
23extern void clps711x_setup_timer(void);
24
25/*
26 * IRQ handler for the timer
27 */
28static irqreturn_t
29p720t_timer_interrupt(int irq, void *dev_id)
30{
31 struct pt_regs *regs = get_irq_regs();
32 do_leds();
33 do_timer(1);
34#ifndef CONFIG_SMP
35 update_process_times(user_mode(regs));
36#endif
37 do_profile(regs);
38 return IRQ_HANDLED;
39}
40
41/*
42 * Set up timer interrupt, and return the current time in seconds.
43 */
44void __init time_init(void)
45{
46 clps711x_setup_timer();
47 timer_irq.handler = p720t_timer_interrupt;
48 setup_irq(IRQ_TC2OI, &timer_irq);
49}
diff --git a/arch/arm/mach-clps711x/include/mach/timex.h b/arch/arm/mach-clps711x/include/mach/timex.h
new file mode 100644
index 000000000000..ac8823ccff93
--- /dev/null
+++ b/arch/arm/mach-clps711x/include/mach/timex.h
@@ -0,0 +1,23 @@
1/*
2 * arch/arm/mach-clps711x/include/mach/timex.h
3 *
4 * Prospector 720T architecture timex specifications
5 *
6 * Copyright (C) 2000 Deep Blue Solutions Ltd.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 */
22
23#define CLOCK_TICK_RATE 512000
diff --git a/arch/arm/mach-clps711x/include/mach/uncompress.h b/arch/arm/mach-clps711x/include/mach/uncompress.h
new file mode 100644
index 000000000000..7164310dea7c
--- /dev/null
+++ b/arch/arm/mach-clps711x/include/mach/uncompress.h
@@ -0,0 +1,59 @@
1/*
2 * arch/arm/mach-clps711x/include/mach/uncompress.h
3 *
4 * Copyright (C) 2000 Deep Blue Solutions Ltd
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20#include <mach/io.h>
21#include <mach/hardware.h>
22#include <asm/hardware/clps7111.h>
23
24#undef CLPS7111_BASE
25#define CLPS7111_BASE CLPS7111_PHYS_BASE
26
27#define __raw_readl(p) (*(unsigned long *)(p))
28#define __raw_writel(v,p) (*(unsigned long *)(p) = (v))
29
30#ifdef CONFIG_DEBUG_CLPS711X_UART2
31#define SYSFLGx SYSFLG2
32#define UARTDRx UARTDR2
33#else
34#define SYSFLGx SYSFLG1
35#define UARTDRx UARTDR1
36#endif
37
38/*
39 * This does not append a newline
40 */
41static inline void putc(int c)
42{
43 while (clps_readl(SYSFLGx) & SYSFLG_UTXFF)
44 barrier();
45 clps_writel(c, UARTDRx);
46}
47
48static inline void flush(void)
49{
50 while (clps_readl(SYSFLGx) & SYSFLG_UBUSY)
51 barrier();
52}
53
54/*
55 * nothing to do
56 */
57#define arch_decomp_setup()
58
59#define arch_decomp_wdog()
diff --git a/arch/arm/mach-clps711x/include/mach/vmalloc.h b/arch/arm/mach-clps711x/include/mach/vmalloc.h
new file mode 100644
index 000000000000..ea6cc7beff28
--- /dev/null
+++ b/arch/arm/mach-clps711x/include/mach/vmalloc.h
@@ -0,0 +1,20 @@
1/*
2 * arch/arm/mach-clps711x/include/mach/vmalloc.h
3 *
4 * Copyright (C) 2000 Deep Blue Solutions Ltd.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20#define VMALLOC_END (PAGE_OFFSET + 0x10000000)
diff --git a/arch/arm/mach-clps711x/irq.c b/arch/arm/mach-clps711x/irq.c
index ca102960f528..38623cfcac5a 100644
--- a/arch/arm/mach-clps711x/irq.c
+++ b/arch/arm/mach-clps711x/irq.c
@@ -21,7 +21,7 @@
21#include <linux/list.h> 21#include <linux/list.h>
22 22
23#include <asm/mach/irq.h> 23#include <asm/mach/irq.h>
24#include <asm/hardware.h> 24#include <mach/hardware.h>
25#include <asm/io.h> 25#include <asm/io.h>
26#include <asm/irq.h> 26#include <asm/irq.h>
27 27
diff --git a/arch/arm/mach-clps711x/mm.c b/arch/arm/mach-clps711x/mm.c
index a00f77ef8df8..a7b4591205a3 100644
--- a/arch/arm/mach-clps711x/mm.c
+++ b/arch/arm/mach-clps711x/mm.c
@@ -25,7 +25,7 @@
25#include <linux/bootmem.h> 25#include <linux/bootmem.h>
26 26
27#include <asm/sizes.h> 27#include <asm/sizes.h>
28#include <asm/hardware.h> 28#include <mach/hardware.h>
29#include <asm/pgtable.h> 29#include <asm/pgtable.h>
30#include <asm/page.h> 30#include <asm/page.h>
31#include <asm/mach/map.h> 31#include <asm/mach/map.h>
diff --git a/arch/arm/mach-clps711x/p720t-leds.c b/arch/arm/mach-clps711x/p720t-leds.c
index 4915b3524963..262c3c361453 100644
--- a/arch/arm/mach-clps711x/p720t-leds.c
+++ b/arch/arm/mach-clps711x/p720t-leds.c
@@ -22,7 +22,7 @@
22#include <linux/kernel.h> 22#include <linux/kernel.h>
23#include <linux/init.h> 23#include <linux/init.h>
24 24
25#include <asm/hardware.h> 25#include <mach/hardware.h>
26#include <asm/io.h> 26#include <asm/io.h>
27#include <asm/leds.h> 27#include <asm/leds.h>
28#include <asm/system.h> 28#include <asm/system.h>
diff --git a/arch/arm/mach-clps711x/p720t.c b/arch/arm/mach-clps711x/p720t.c
index c8ecd2480c27..f51f97d4f212 100644
--- a/arch/arm/mach-clps711x/p720t.c
+++ b/arch/arm/mach-clps711x/p720t.c
@@ -23,7 +23,7 @@
23#include <linux/string.h> 23#include <linux/string.h>
24#include <linux/mm.h> 24#include <linux/mm.h>
25 25
26#include <asm/hardware.h> 26#include <mach/hardware.h>
27#include <asm/io.h> 27#include <asm/io.h>
28#include <asm/pgtable.h> 28#include <asm/pgtable.h>
29#include <asm/page.h> 29#include <asm/page.h>
@@ -32,7 +32,7 @@
32#include <asm/mach-types.h> 32#include <asm/mach-types.h>
33#include <asm/mach/arch.h> 33#include <asm/mach/arch.h>
34#include <asm/mach/map.h> 34#include <asm/mach/map.h>
35#include <asm/arch/syspld.h> 35#include <mach/syspld.h>
36 36
37#include "common.h" 37#include "common.h"
38 38
diff --git a/arch/arm/mach-clps711x/time.c b/arch/arm/mach-clps711x/time.c
index e5dc33f1f95c..ef1fcd17189e 100644
--- a/arch/arm/mach-clps711x/time.c
+++ b/arch/arm/mach-clps711x/time.c
@@ -22,7 +22,7 @@
22#include <linux/irq.h> 22#include <linux/irq.h>
23#include <linux/sched.h> 23#include <linux/sched.h>
24 24
25#include <asm/hardware.h> 25#include <mach/hardware.h>
26#include <asm/irq.h> 26#include <asm/irq.h>
27#include <asm/leds.h> 27#include <asm/leds.h>
28#include <asm/io.h> 28#include <asm/io.h>
diff --git a/arch/arm/mach-clps7500/core.c b/arch/arm/mach-clps7500/core.c
index 2ac63671ea5f..cc1b82179e83 100644
--- a/arch/arm/mach-clps7500/core.c
+++ b/arch/arm/mach-clps7500/core.c
@@ -21,7 +21,7 @@
21#include <asm/mach/irq.h> 21#include <asm/mach/irq.h>
22#include <asm/mach/time.h> 22#include <asm/mach/time.h>
23 23
24#include <asm/hardware.h> 24#include <mach/hardware.h>
25#include <asm/hardware/iomd.h> 25#include <asm/hardware/iomd.h>
26#include <asm/io.h> 26#include <asm/io.h>
27#include <asm/irq.h> 27#include <asm/irq.h>
diff --git a/include/asm-arm/arch-cl7500/acornfb.h b/arch/arm/mach-clps7500/include/mach/acornfb.h
index aea6330c9745..aea6330c9745 100644
--- a/include/asm-arm/arch-cl7500/acornfb.h
+++ b/arch/arm/mach-clps7500/include/mach/acornfb.h
diff --git a/arch/arm/mach-clps7500/include/mach/debug-macro.S b/arch/arm/mach-clps7500/include/mach/debug-macro.S
new file mode 100644
index 000000000000..af4104e7e84a
--- /dev/null
+++ b/arch/arm/mach-clps7500/include/mach/debug-macro.S
@@ -0,0 +1,21 @@
1/* arch/arm/mach-clps7500/include/mach/debug-macro.S
2 *
3 * Debugging macro include header
4 *
5 * Copyright (C) 1994-1999 Russell King
6 * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 *
12*/
13
14 .macro addruart,rx
15 mov \rx, #0xe0000000
16 orr \rx, \rx, #0x00010000
17 orr \rx, \rx, #0x00000be0
18 .endm
19
20#define UART_SHIFT 2
21#include <asm/hardware/debug-8250.S>
diff --git a/arch/arm/mach-clps7500/include/mach/dma.h b/arch/arm/mach-clps7500/include/mach/dma.h
new file mode 100644
index 000000000000..63fcde505498
--- /dev/null
+++ b/arch/arm/mach-clps7500/include/mach/dma.h
@@ -0,0 +1,21 @@
1/*
2 * arch/arm/mach-clps7500/include/mach/dma.h
3 *
4 * Copyright (C) 1999 Nexus Electronics Ltd.
5 */
6
7#ifndef __ASM_ARCH_DMA_H
8#define __ASM_ARCH_DMA_H
9
10/* DMA is not yet implemented! It should be the same as acorn, copy over.. */
11
12/*
13 * This is the maximum DMA address that can be DMAd to.
14 * There should not be more than (0xd0000000 - 0xc0000000)
15 * bytes of RAM.
16 */
17#define MAX_DMA_ADDRESS 0xd0000000
18
19#define DMA_S0 0
20
21#endif /* _ASM_ARCH_DMA_H */
diff --git a/arch/arm/mach-clps7500/include/mach/entry-macro.S b/arch/arm/mach-clps7500/include/mach/entry-macro.S
new file mode 100644
index 000000000000..4e7e54144093
--- /dev/null
+++ b/arch/arm/mach-clps7500/include/mach/entry-macro.S
@@ -0,0 +1,16 @@
1#include <mach/hardware.h>
2#include <asm/hardware/entry-macro-iomd.S>
3
4 .equ ioc_base_high, IOC_BASE & 0xff000000
5 .equ ioc_base_low, IOC_BASE & 0x00ff0000
6
7 .macro get_irqnr_preamble, base, tmp
8 mov \base, #ioc_base_high @ point at IOC
9 .if ioc_base_low
10 orr \base, \base, #ioc_base_low
11 .endif
12 .endm
13
14 .macro arch_ret_to_user, tmp1, tmp2
15 .endm
16
diff --git a/arch/arm/mach-clps7500/include/mach/hardware.h b/arch/arm/mach-clps7500/include/mach/hardware.h
new file mode 100644
index 000000000000..d66578a3371c
--- /dev/null
+++ b/arch/arm/mach-clps7500/include/mach/hardware.h
@@ -0,0 +1,67 @@
1/*
2 * arch/arm/mach-clps7500/include/mach/hardware.h
3 *
4 * Copyright (C) 1996-1999 Russell King.
5 * Copyright (C) 1999 Nexus Electronics Ltd.
6 *
7 * This file contains the hardware definitions of the
8 * CL7500 evaluation board.
9 */
10#ifndef __ASM_ARCH_HARDWARE_H
11#define __ASM_ARCH_HARDWARE_H
12
13#include <mach/memory.h>
14#include <asm/hardware/iomd.h>
15
16#ifdef __ASSEMBLY__
17#define IOMEM(x) x
18#else
19#define IOMEM(x) ((void __iomem *)(x))
20#endif
21
22/*
23 * What hardware must be present
24 */
25#define HAS_IOMD
26#define HAS_VIDC20
27
28/* Hardware addresses of major areas.
29 * *_START is the physical address
30 * *_SIZE is the size of the region
31 * *_BASE is the virtual address
32 */
33
34#define IO_START 0x03000000 /* I/O */
35#define IO_SIZE 0x01000000
36#define IO_BASE IOMEM(0xe0000000)
37
38#define ISA_START 0x0c000000 /* ISA */
39#define ISA_SIZE 0x00010000
40#define ISA_BASE 0xe1000000
41
42#define FLASH_START 0x01000000 /* XXX */
43#define FLASH_SIZE 0x01000000
44#define FLASH_BASE 0xe2000000
45
46#define LED_START 0x0302B000
47#define LED_SIZE 0x00001000
48#define LED_BASE 0xe3000000
49#define LED_ADDRESS (LED_BASE + 0xa00)
50
51/* Let's define SCREEN_START for CL7500, even though it's a lie. */
52#define SCREEN_START 0x02000000 /* VRAM */
53#define SCREEN_END 0xdfc00000
54#define SCREEN_BASE 0xdf800000
55
56#define VIDC_BASE (void __iomem *)0xe0400000
57#define IOMD_BASE IOMEM(0xe0200000)
58#define IOC_BASE IOMEM(0xe0200000)
59#define FLOPPYDMA_BASE IOMEM(0xe002a000)
60#define PCIO_BASE IOMEM(0xe0010000)
61
62#define vidc_writel(val) __raw_writel(val, VIDC_BASE)
63
64/* in/out bias for the ISA slot region */
65#define ISASLOT_IO 0x80400000
66
67#endif
diff --git a/arch/arm/mach-clps7500/include/mach/io.h b/arch/arm/mach-clps7500/include/mach/io.h
new file mode 100644
index 000000000000..2ff2860889ed
--- /dev/null
+++ b/arch/arm/mach-clps7500/include/mach/io.h
@@ -0,0 +1,255 @@
1/*
2 * arch/arm/mach-clps7500/include/mach/io.h
3 * from arch/arm/mach-rpc/include/mach/io.h
4 *
5 * Copyright (C) 1997 Russell King
6 *
7 * Modifications:
8 * 06-Dec-1997 RMK Created.
9 */
10#ifndef __ASM_ARM_ARCH_IO_H
11#define __ASM_ARM_ARCH_IO_H
12
13#include <mach/hardware.h>
14
15#define IO_SPACE_LIMIT 0xffffffff
16
17/*
18 * GCC is totally crap at loading/storing data. We try to persuade it
19 * to do the right thing by using these whereever possible instead of
20 * the above.
21 */
22#define __arch_base_getb(b,o) \
23 ({ \
24 unsigned int v, r = (b); \
25 __asm__ __volatile__( \
26 "ldrb %0, [%1, %2]" \
27 : "=r" (v) \
28 : "r" (r), "Ir" (o)); \
29 v; \
30 })
31
32#define __arch_base_getl(b,o) \
33 ({ \
34 unsigned int v, r = (b); \
35 __asm__ __volatile__( \
36 "ldr %0, [%1, %2]" \
37 : "=r" (v) \
38 : "r" (r), "Ir" (o)); \
39 v; \
40 })
41
42#define __arch_base_putb(v,b,o) \
43 ({ \
44 unsigned int r = (b); \
45 __asm__ __volatile__( \
46 "strb %0, [%1, %2]" \
47 : \
48 : "r" (v), "r" (r), "Ir" (o)); \
49 })
50
51#define __arch_base_putl(v,b,o) \
52 ({ \
53 unsigned int r = (b); \
54 __asm__ __volatile__( \
55 "str %0, [%1, %2]" \
56 : \
57 : "r" (v), "r" (r), "Ir" (o)); \
58 })
59
60/*
61 * We use two different types of addressing - PC style addresses, and ARM
62 * addresses. PC style accesses the PC hardware with the normal PC IO
63 * addresses, eg 0x3f8 for serial#1. ARM addresses are 0x80000000+
64 * and are translated to the start of IO. Note that all addresses are
65 * shifted left!
66 */
67#define __PORT_PCIO(x) (!((x) & 0x80000000))
68
69/*
70 * Dynamic IO functions - let the compiler
71 * optimize the expressions
72 */
73static inline void __outb (unsigned int value, unsigned int port)
74{
75 unsigned long temp;
76 __asm__ __volatile__(
77 "tst %2, #0x80000000\n\t"
78 "mov %0, %4\n\t"
79 "addeq %0, %0, %3\n\t"
80 "strb %1, [%0, %2, lsl #2] @ outb"
81 : "=&r" (temp)
82 : "r" (value), "r" (port), "Ir" (PCIO_BASE - IO_BASE), "Ir" (IO_BASE)
83 : "cc");
84}
85
86static inline void __outw (unsigned int value, unsigned int port)
87{
88 unsigned long temp;
89 __asm__ __volatile__(
90 "tst %2, #0x80000000\n\t"
91 "mov %0, %4\n\t"
92 "addeq %0, %0, %3\n\t"
93 "str %1, [%0, %2, lsl #2] @ outw"
94 : "=&r" (temp)
95 : "r" (value|value<<16), "r" (port), "Ir" (PCIO_BASE - IO_BASE), "Ir" (IO_BASE)
96 : "cc");
97}
98
99static inline void __outl (unsigned int value, unsigned int port)
100{
101 unsigned long temp;
102 __asm__ __volatile__(
103 "tst %2, #0x80000000\n\t"
104 "mov %0, %4\n\t"
105 "addeq %0, %0, %3\n\t"
106 "str %1, [%0, %2, lsl #2] @ outl"
107 : "=&r" (temp)
108 : "r" (value), "r" (port), "Ir" (PCIO_BASE - IO_BASE), "Ir" (IO_BASE)
109 : "cc");
110}
111
112#define DECLARE_DYN_IN(sz,fnsuffix,instr) \
113static inline unsigned sz __in##fnsuffix (unsigned int port) \
114{ \
115 unsigned long temp, value; \
116 __asm__ __volatile__( \
117 "tst %2, #0x80000000\n\t" \
118 "mov %0, %4\n\t" \
119 "addeq %0, %0, %3\n\t" \
120 "ldr" instr " %1, [%0, %2, lsl #2] @ in" #fnsuffix \
121 : "=&r" (temp), "=r" (value) \
122 : "r" (port), "Ir" (PCIO_BASE - IO_BASE), "Ir" (IO_BASE) \
123 : "cc"); \
124 return (unsigned sz)value; \
125}
126
127static inline unsigned int __ioaddr (unsigned int port) \
128{ \
129 if (__PORT_PCIO(port)) \
130 return (unsigned int)(PCIO_BASE + (port << 2)); \
131 else \
132 return (unsigned int)(IO_BASE + (port << 2)); \
133}
134
135#define DECLARE_IO(sz,fnsuffix,instr) \
136 DECLARE_DYN_IN(sz,fnsuffix,instr)
137
138DECLARE_IO(char,b,"b")
139DECLARE_IO(short,w,"")
140DECLARE_IO(int,l,"")
141
142#undef DECLARE_IO
143#undef DECLARE_DYN_IN
144
145/*
146 * Constant address IO functions
147 *
148 * These have to be macros for the 'J' constraint to work -
149 * +/-4096 immediate operand.
150 */
151#define __outbc(value,port) \
152({ \
153 if (__PORT_PCIO((port))) \
154 __asm__ __volatile__( \
155 "strb %0, [%1, %2] @ outbc" \
156 : : "r" (value), "r" (PCIO_BASE), "Jr" ((port) << 2)); \
157 else \
158 __asm__ __volatile__( \
159 "strb %0, [%1, %2] @ outbc" \
160 : : "r" (value), "r" (IO_BASE), "r" ((port) << 2)); \
161})
162
163#define __inbc(port) \
164({ \
165 unsigned char result; \
166 if (__PORT_PCIO((port))) \
167 __asm__ __volatile__( \
168 "ldrb %0, [%1, %2] @ inbc" \
169 : "=r" (result) : "r" (PCIO_BASE), "Jr" ((port) << 2)); \
170 else \
171 __asm__ __volatile__( \
172 "ldrb %0, [%1, %2] @ inbc" \
173 : "=r" (result) : "r" (IO_BASE), "r" ((port) << 2)); \
174 result; \
175})
176
177#define __outwc(value,port) \
178({ \
179 unsigned long v = value; \
180 if (__PORT_PCIO((port))) \
181 __asm__ __volatile__( \
182 "str %0, [%1, %2] @ outwc" \
183 : : "r" (v|v<<16), "r" (PCIO_BASE), "Jr" ((port) << 2)); \
184 else \
185 __asm__ __volatile__( \
186 "str %0, [%1, %2] @ outwc" \
187 : : "r" (v|v<<16), "r" (IO_BASE), "r" ((port) << 2)); \
188})
189
190#define __inwc(port) \
191({ \
192 unsigned short result; \
193 if (__PORT_PCIO((port))) \
194 __asm__ __volatile__( \
195 "ldr %0, [%1, %2] @ inwc" \
196 : "=r" (result) : "r" (PCIO_BASE), "Jr" ((port) << 2)); \
197 else \
198 __asm__ __volatile__( \
199 "ldr %0, [%1, %2] @ inwc" \
200 : "=r" (result) : "r" (IO_BASE), "r" ((port) << 2)); \
201 result & 0xffff; \
202})
203
204#define __outlc(value,port) \
205({ \
206 unsigned long v = value; \
207 if (__PORT_PCIO((port))) \
208 __asm__ __volatile__( \
209 "str %0, [%1, %2] @ outlc" \
210 : : "r" (v), "r" (PCIO_BASE), "Jr" ((port) << 2)); \
211 else \
212 __asm__ __volatile__( \
213 "str %0, [%1, %2] @ outlc" \
214 : : "r" (v), "r" (IO_BASE), "r" ((port) << 2)); \
215})
216
217#define __inlc(port) \
218({ \
219 unsigned long result; \
220 if (__PORT_PCIO((port))) \
221 __asm__ __volatile__( \
222 "ldr %0, [%1, %2] @ inlc" \
223 : "=r" (result) : "r" (PCIO_BASE), "Jr" ((port) << 2)); \
224 else \
225 __asm__ __volatile__( \
226 "ldr %0, [%1, %2] @ inlc" \
227 : "=r" (result) : "r" (IO_BASE), "r" ((port) << 2)); \
228 result; \
229})
230
231#define __ioaddrc(port) \
232 (__PORT_PCIO((port)) ? PCIO_BASE + ((port) << 2) : IO_BASE + ((port) << 2))
233
234#define inb(p) (__builtin_constant_p((p)) ? __inbc(p) : __inb(p))
235#define inw(p) (__builtin_constant_p((p)) ? __inwc(p) : __inw(p))
236#define inl(p) (__builtin_constant_p((p)) ? __inlc(p) : __inl(p))
237#define outb(v,p) (__builtin_constant_p((p)) ? __outbc(v,p) : __outb(v,p))
238#define outw(v,p) (__builtin_constant_p((p)) ? __outwc(v,p) : __outw(v,p))
239#define outl(v,p) (__builtin_constant_p((p)) ? __outlc(v,p) : __outl(v,p))
240#define __ioaddr(p) (__builtin_constant_p((p)) ? __ioaddr(p) : __ioaddrc(p))
241/* the following macro is deprecated */
242#define ioaddr(port) __ioaddr((port))
243
244#define insb(p,d,l) __raw_readsb(__ioaddr(p),d,l)
245#define insw(p,d,l) __raw_readsw(__ioaddr(p),d,l)
246
247#define outsb(p,d,l) __raw_writesb(__ioaddr(p),d,l)
248#define outsw(p,d,l) __raw_writesw(__ioaddr(p),d,l)
249
250/*
251 * 1:1 mapping for ioremapped regions.
252 */
253#define __mem_pci(x) (x)
254
255#endif
diff --git a/arch/arm/mach-clps7500/include/mach/irq.h b/arch/arm/mach-clps7500/include/mach/irq.h
new file mode 100644
index 000000000000..e8da3c58df76
--- /dev/null
+++ b/arch/arm/mach-clps7500/include/mach/irq.h
@@ -0,0 +1,32 @@
1/*
2 * arch/arm/mach-clps7500/include/mach/irq.h
3 *
4 * Copyright (C) 1996 Russell King
5 * Copyright (C) 1999, 2001 Nexus Electronics Ltd.
6 *
7 * Changelog:
8 * 10-10-1996 RMK Brought up to date with arch-sa110eval
9 * 22-08-1998 RMK Restructured IRQ routines
10 * 11-08-1999 PJB Created ARM7500 version, derived from RiscPC code
11 */
12
13#include <asm/hardware/iomd.h>
14#include <asm/io.h>
15
16static inline int fixup_irq(unsigned int irq)
17{
18 if (irq == IRQ_ISA) {
19 int isabits = *((volatile unsigned int *)0xe002b700);
20 if (isabits == 0) {
21 printk("Spurious ISA IRQ!\n");
22 return irq;
23 }
24 irq = IRQ_ISA_BASE;
25 while (!(isabits & 1)) {
26 irq++;
27 isabits >>= 1;
28 }
29 }
30
31 return irq;
32}
diff --git a/arch/arm/mach-clps7500/include/mach/irqs.h b/arch/arm/mach-clps7500/include/mach/irqs.h
new file mode 100644
index 000000000000..bee66b487f59
--- /dev/null
+++ b/arch/arm/mach-clps7500/include/mach/irqs.h
@@ -0,0 +1,66 @@
1/*
2 * arch/arm/mach-clps7500/include/mach/irqs.h
3 *
4 * Copyright (C) 1999 Nexus Electronics Ltd
5 */
6
7#define IRQ_INT2 0
8#define IRQ_INT1 2
9#define IRQ_VSYNCPULSE 3
10#define IRQ_POWERON 4
11#define IRQ_TIMER0 5
12#define IRQ_TIMER1 6
13#define IRQ_FORCE 7
14#define IRQ_INT8 8
15#define IRQ_ISA 9
16#define IRQ_INT6 10
17#define IRQ_INT5 11
18#define IRQ_INT4 12
19#define IRQ_INT3 13
20#define IRQ_KEYBOARDTX 14
21#define IRQ_KEYBOARDRX 15
22
23#define IRQ_DMA0 16
24#define IRQ_DMA1 17
25#define IRQ_DMA2 18
26#define IRQ_DMA3 19
27#define IRQ_DMAS0 20
28#define IRQ_DMAS1 21
29
30#define IRQ_IOP0 24
31#define IRQ_IOP1 25
32#define IRQ_IOP2 26
33#define IRQ_IOP3 27
34#define IRQ_IOP4 28
35#define IRQ_IOP5 29
36#define IRQ_IOP6 30
37#define IRQ_IOP7 31
38
39#define IRQ_MOUSERX 40
40#define IRQ_MOUSETX 41
41#define IRQ_ADC 42
42#define IRQ_EVENT1 43
43#define IRQ_EVENT2 44
44
45#define IRQ_ISA_BASE 48
46#define IRQ_ISA_3 48
47#define IRQ_ISA_4 49
48#define IRQ_ISA_5 50
49#define IRQ_ISA_7 51
50#define IRQ_ISA_9 52
51#define IRQ_ISA_10 53
52#define IRQ_ISA_11 54
53#define IRQ_ISA_14 55
54
55#define FIQ_INT9 0
56#define FIQ_INT5 1
57#define FIQ_INT6 4
58#define FIQ_INT8 6
59#define FIQ_FORCE 7
60
61/*
62 * This is the offset of the FIQ "IRQ" numbers
63 */
64#define FIQ_START 64
65
66#define IRQ_TIMER IRQ_TIMER0
diff --git a/arch/arm/mach-clps7500/include/mach/memory.h b/arch/arm/mach-clps7500/include/mach/memory.h
new file mode 100644
index 000000000000..3326aa99d3ec
--- /dev/null
+++ b/arch/arm/mach-clps7500/include/mach/memory.h
@@ -0,0 +1,35 @@
1/*
2 * arch/arm/mach-clps7500/include/mach/memory.h
3 *
4 * Copyright (c) 1996,1997,1998 Russell King.
5 *
6 * Changelog:
7 * 20-Oct-1996 RMK Created
8 * 31-Dec-1997 RMK Fixed definitions to reduce warnings
9 * 11-Jan-1998 RMK Uninlined to reduce hits on cache
10 * 08-Feb-1998 RMK Added __virt_to_bus and __bus_to_virt
11 * 21-Mar-1999 RMK Renamed to memory.h
12 * RMK Added TASK_SIZE and PAGE_OFFSET
13 */
14#ifndef __ASM_ARCH_MEMORY_H
15#define __ASM_ARCH_MEMORY_H
16
17/*
18 * Physical DRAM offset.
19 */
20#define PHYS_OFFSET UL(0x10000000)
21
22/*
23 * These are exactly the same on the RiscPC as the
24 * physical memory view.
25 */
26#define __virt_to_bus(x) __virt_to_phys(x)
27#define __bus_to_virt(x) __phys_to_virt(x)
28
29/*
30 * Cache flushing area - ROM
31 */
32#define FLUSH_BASE_PHYS 0x00000000
33#define FLUSH_BASE 0xdf000000
34
35#endif
diff --git a/arch/arm/mach-clps7500/include/mach/system.h b/arch/arm/mach-clps7500/include/mach/system.h
new file mode 100644
index 000000000000..624fc2830ae0
--- /dev/null
+++ b/arch/arm/mach-clps7500/include/mach/system.h
@@ -0,0 +1,23 @@
1/*
2 * arch/arm/mach-clps7500/include/mach/system.h
3 *
4 * Copyright (c) 1999 Nexus Electronics Ltd.
5 */
6#ifndef __ASM_ARCH_SYSTEM_H
7#define __ASM_ARCH_SYSTEM_H
8
9#include <asm/hardware/iomd.h>
10#include <asm/io.h>
11
12static inline void arch_idle(void)
13{
14 iomd_writeb(0, IOMD_SUSMODE);
15}
16
17#define arch_reset(mode) \
18 do { \
19 iomd_writeb(0, IOMD_ROMCR0); \
20 cpu_reset(0); \
21 } while (0)
22
23#endif
diff --git a/arch/arm/mach-clps7500/include/mach/timex.h b/arch/arm/mach-clps7500/include/mach/timex.h
new file mode 100644
index 000000000000..dfaa9b425757
--- /dev/null
+++ b/arch/arm/mach-clps7500/include/mach/timex.h
@@ -0,0 +1,13 @@
1/*
2 * arch/arm/mach-clps7500/include/mach/timex.h
3 *
4 * CL7500 architecture timex specifications
5 *
6 * Copyright (C) 1999 Nexus Electronics Ltd
7 */
8
9/*
10 * On the ARM7500, the clock ticks at 2MHz.
11 */
12#define CLOCK_TICK_RATE 2000000
13
diff --git a/arch/arm/mach-clps7500/include/mach/uncompress.h b/arch/arm/mach-clps7500/include/mach/uncompress.h
new file mode 100644
index 000000000000..d7d0af4b49fc
--- /dev/null
+++ b/arch/arm/mach-clps7500/include/mach/uncompress.h
@@ -0,0 +1,35 @@
1/*
2 * arch/arm/mach-clps7500/include/mach/uncompress.h
3 *
4 * Copyright (C) 1999, 2000 Nexus Electronics Ltd.
5 */
6#define BASE 0x03010000
7#define SERBASE (BASE + (0x2f8 << 2))
8
9static inline void putc(char c)
10{
11 while (!(*((volatile unsigned int *)(SERBASE + 0x14)) & 0x20))
12 barrier();
13
14 *((volatile unsigned int *)(SERBASE)) = c;
15}
16
17static inline void flush(void)
18{
19}
20
21static __inline__ void arch_decomp_setup(void)
22{
23 int baud = 3686400 / (9600 * 32);
24
25 *((volatile unsigned int *)(SERBASE + 0xC)) = 0x80;
26 *((volatile unsigned int *)(SERBASE + 0x0)) = baud & 0xff;
27 *((volatile unsigned int *)(SERBASE + 0x4)) = (baud & 0xff00) >> 8;
28 *((volatile unsigned int *)(SERBASE + 0xC)) = 3; /* 8 bits */
29 *((volatile unsigned int *)(SERBASE + 0x10)) = 3; /* DTR, RTS */
30}
31
32/*
33 * nothing to do
34 */
35#define arch_decomp_wdog()
diff --git a/arch/arm/mach-clps7500/include/mach/vmalloc.h b/arch/arm/mach-clps7500/include/mach/vmalloc.h
new file mode 100644
index 000000000000..8fc5406d1b6d
--- /dev/null
+++ b/arch/arm/mach-clps7500/include/mach/vmalloc.h
@@ -0,0 +1,4 @@
1/*
2 * arch/arm/mach-clps7500/include/mach/vmalloc.h
3 */
4#define VMALLOC_END (PAGE_OFFSET + 0x1c000000)
diff --git a/arch/arm/mach-davinci/board-evm.c b/arch/arm/mach-davinci/board-evm.c
index 9e4024c4965f..134355787814 100644
--- a/arch/arm/mach-davinci/board-evm.c
+++ b/arch/arm/mach-davinci/board-evm.c
@@ -20,13 +20,13 @@
20#include <asm/setup.h> 20#include <asm/setup.h>
21#include <asm/io.h> 21#include <asm/io.h>
22#include <asm/mach-types.h> 22#include <asm/mach-types.h>
23#include <asm/hardware.h> 23#include <mach/hardware.h>
24 24
25#include <asm/mach/arch.h> 25#include <asm/mach/arch.h>
26#include <asm/mach/map.h> 26#include <asm/mach/map.h>
27#include <asm/mach/flash.h> 27#include <asm/mach/flash.h>
28 28
29#include <asm/arch/common.h> 29#include <mach/common.h>
30 30
31/* other misc. init functions */ 31/* other misc. init functions */
32void __init davinci_psc_init(void); 32void __init davinci_psc_init(void);
diff --git a/arch/arm/mach-davinci/clock.c b/arch/arm/mach-davinci/clock.c
index c6b94f60e0b2..d46c69b55aaa 100644
--- a/arch/arm/mach-davinci/clock.c
+++ b/arch/arm/mach-davinci/clock.c
@@ -17,10 +17,10 @@
17#include <linux/mutex.h> 17#include <linux/mutex.h>
18#include <linux/platform_device.h> 18#include <linux/platform_device.h>
19 19
20#include <asm/hardware.h> 20#include <mach/hardware.h>
21#include <asm/io.h> 21#include <asm/io.h>
22 22
23#include <asm/arch/psc.h> 23#include <mach/psc.h>
24#include "clock.h" 24#include "clock.h"
25 25
26/* PLL/Reset register offsets */ 26/* PLL/Reset register offsets */
diff --git a/arch/arm/mach-davinci/gpio.c b/arch/arm/mach-davinci/gpio.c
index 9c67886e7189..c9cb4f09b18f 100644
--- a/arch/arm/mach-davinci/gpio.c
+++ b/arch/arm/mach-davinci/gpio.c
@@ -20,9 +20,9 @@
20#include <linux/irq.h> 20#include <linux/irq.h>
21#include <linux/bitops.h> 21#include <linux/bitops.h>
22 22
23#include <asm/arch/irqs.h> 23#include <mach/irqs.h>
24#include <asm/arch/hardware.h> 24#include <mach/hardware.h>
25#include <asm/arch/gpio.h> 25#include <mach/gpio.h>
26 26
27#include <asm/mach/irq.h> 27#include <asm/mach/irq.h>
28 28
diff --git a/arch/arm/mach-davinci/include/mach/clock.h b/arch/arm/mach-davinci/include/mach/clock.h
new file mode 100644
index 000000000000..38bdd49bc181
--- /dev/null
+++ b/arch/arm/mach-davinci/include/mach/clock.h
@@ -0,0 +1,22 @@
1/*
2 * arch/arm/mach-davinci/include/mach/clock.h
3 *
4 * Clock control driver for DaVinci - header file
5 *
6 * Authors: Vladimir Barinov <source@mvista.com>
7 *
8 * 2007 (c) MontaVista Software, Inc. This file is licensed under
9 * the terms of the GNU General Public License version 2. This program
10 * is licensed "as is" without any warranty of any kind, whether express
11 * or implied.
12 */
13#ifndef __ASM_ARCH_DAVINCI_CLOCK_H
14#define __ASM_ARCH_DAVINCI_CLOCK_H
15
16struct clk;
17
18extern int clk_register(struct clk *clk);
19extern void clk_unregister(struct clk *clk);
20extern int davinci_clk_init(void);
21
22#endif
diff --git a/include/asm-arm/arch-davinci/common.h b/arch/arm/mach-davinci/include/mach/common.h
index a97dfbb15e57..a97dfbb15e57 100644
--- a/include/asm-arm/arch-davinci/common.h
+++ b/arch/arm/mach-davinci/include/mach/common.h
diff --git a/include/asm-arm/arch-davinci/debug-macro.S b/arch/arm/mach-davinci/include/mach/debug-macro.S
index e6c0f0d5d062..e6c0f0d5d062 100644
--- a/include/asm-arm/arch-davinci/debug-macro.S
+++ b/arch/arm/mach-davinci/include/mach/debug-macro.S
diff --git a/include/asm-arm/arch-davinci/dma.h b/arch/arm/mach-davinci/include/mach/dma.h
index 8e2f2d0ba667..8e2f2d0ba667 100644
--- a/include/asm-arm/arch-davinci/dma.h
+++ b/arch/arm/mach-davinci/include/mach/dma.h
diff --git a/arch/arm/mach-davinci/include/mach/entry-macro.S b/arch/arm/mach-davinci/include/mach/entry-macro.S
new file mode 100644
index 000000000000..039b84f933b3
--- /dev/null
+++ b/arch/arm/mach-davinci/include/mach/entry-macro.S
@@ -0,0 +1,32 @@
1/*
2 * Low-level IRQ helper macros for TI DaVinci-based platforms
3 *
4 * Author: Kevin Hilman, MontaVista Software, Inc. <source@mvista.com>
5 *
6 * 2007 (c) MontaVista Software, Inc. This file is licensed under
7 * the terms of the GNU General Public License version 2. This program
8 * is licensed "as is" without any warranty of any kind, whether express
9 * or implied.
10 */
11#include <mach/io.h>
12#include <mach/irqs.h>
13
14 .macro disable_fiq
15 .endm
16
17 .macro get_irqnr_preamble, base, tmp
18 ldr \base, =IO_ADDRESS(DAVINCI_ARM_INTC_BASE)
19 .endm
20
21 .macro arch_ret_to_user, tmp1, tmp2
22 .endm
23
24 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
25 ldr \tmp, [\base, #0x14]
26 mov \tmp, \tmp, lsr #2
27 sub \irqnr, \tmp, #1
28 cmp \tmp, #0
29 .endm
30
31 .macro irq_prio_table
32 .endm
diff --git a/arch/arm/mach-davinci/include/mach/gpio.h b/arch/arm/mach-davinci/include/mach/gpio.h
new file mode 100644
index 000000000000..ec151ccf1e8f
--- /dev/null
+++ b/arch/arm/mach-davinci/include/mach/gpio.h
@@ -0,0 +1,159 @@
1/*
2 * TI DaVinci GPIO Support
3 *
4 * Copyright (c) 2006 David Brownell
5 * Copyright (c) 2007, MontaVista Software, Inc. <source@mvista.com>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 */
12
13#ifndef __DAVINCI_GPIO_H
14#define __DAVINCI_GPIO_H
15
16#include <linux/io.h>
17#include <mach/hardware.h>
18
19/*
20 * basic gpio routines
21 *
22 * board-specific init should be done by arch/.../.../board-XXX.c (maybe
23 * initializing banks together) rather than boot loaders; kexec() won't
24 * go through boot loaders.
25 *
26 * the gpio clock will be turned on when gpios are used, and you may also
27 * need to pay attention to PINMUX0 and PINMUX1 to be sure those pins are
28 * used as gpios, not with other peripherals.
29 *
30 * GPIOs are numbered 0..(DAVINCI_N_GPIO-1). For documentation, and maybe
31 * for later updates, code should write GPIO(N) or:
32 * - GPIOV18(N) for 1.8V pins, N in 0..53; same as GPIO(0)..GPIO(53)
33 * - GPIOV33(N) for 3.3V pins, N in 0..17; same as GPIO(54)..GPIO(70)
34 *
35 * For GPIO IRQs use gpio_to_irq(GPIO(N)) or gpio_to_irq(GPIOV33(N)) etc
36 * for now, that's != GPIO(N)
37 */
38#define GPIO(X) (X) /* 0 <= X <= 70 */
39#define GPIOV18(X) (X) /* 1.8V i/o; 0 <= X <= 53 */
40#define GPIOV33(X) ((X)+54) /* 3.3V i/o; 0 <= X <= 17 */
41
42struct gpio_controller {
43 u32 dir;
44 u32 out_data;
45 u32 set_data;
46 u32 clr_data;
47 u32 in_data;
48 u32 set_rising;
49 u32 clr_rising;
50 u32 set_falling;
51 u32 clr_falling;
52 u32 intstat;
53};
54
55/* The __gpio_to_controller() and __gpio_mask() functions inline to constants
56 * with constant parameters; or in outlined code they execute at runtime.
57 *
58 * You'd access the controller directly when reading or writing more than
59 * one gpio value at a time, and to support wired logic where the value
60 * being driven by the cpu need not match the value read back.
61 *
62 * These are NOT part of the cross-platform GPIO interface
63 */
64static inline struct gpio_controller *__iomem
65__gpio_to_controller(unsigned gpio)
66{
67 void *__iomem ptr;
68
69 if (gpio < 32)
70 ptr = (void *__iomem)IO_ADDRESS(DAVINCI_GPIO_BASE + 0x10);
71 else if (gpio < 64)
72 ptr = (void *__iomem)IO_ADDRESS(DAVINCI_GPIO_BASE + 0x38);
73 else if (gpio < DAVINCI_N_GPIO)
74 ptr = (void *__iomem)IO_ADDRESS(DAVINCI_GPIO_BASE + 0x60);
75 else
76 ptr = NULL;
77 return ptr;
78}
79
80static inline u32 __gpio_mask(unsigned gpio)
81{
82 return 1 << (gpio % 32);
83}
84
85/* The get/set/clear functions will inline when called with constant
86 * parameters, for low-overhead bitbanging. Illegal constant parameters
87 * cause link-time errors.
88 *
89 * Otherwise, calls with variable parameters use outlined functions.
90 */
91extern int __error_inval_gpio(void);
92
93extern void __gpio_set(unsigned gpio, int value);
94extern int __gpio_get(unsigned gpio);
95
96static inline void gpio_set_value(unsigned gpio, int value)
97{
98 if (__builtin_constant_p(value)) {
99 struct gpio_controller *__iomem g;
100 u32 mask;
101
102 if (gpio >= DAVINCI_N_GPIO)
103 __error_inval_gpio();
104
105 g = __gpio_to_controller(gpio);
106 mask = __gpio_mask(gpio);
107 if (value)
108 __raw_writel(mask, &g->set_data);
109 else
110 __raw_writel(mask, &g->clr_data);
111 return;
112 }
113
114 __gpio_set(gpio, value);
115}
116
117/* Returns zero or nonzero; works for gpios configured as inputs OR
118 * as outputs.
119 *
120 * NOTE: changes in reported values are synchronized to the GPIO clock.
121 * This is most easily seen after calling gpio_set_value() and then immediatly
122 * gpio_get_value(), where the gpio_get_value() would return the old value
123 * until the GPIO clock ticks and the new value gets latched.
124 */
125
126static inline int gpio_get_value(unsigned gpio)
127{
128 struct gpio_controller *__iomem g;
129
130 if (!__builtin_constant_p(gpio))
131 return __gpio_get(gpio);
132
133 if (gpio >= DAVINCI_N_GPIO)
134 return __error_inval_gpio();
135
136 g = __gpio_to_controller(gpio);
137 return !!(__gpio_mask(gpio) & __raw_readl(&g->in_data));
138}
139
140/* powerup default direction is IN */
141extern int gpio_direction_input(unsigned gpio);
142extern int gpio_direction_output(unsigned gpio, int value);
143
144#include <asm-generic/gpio.h> /* cansleep wrappers */
145
146extern int gpio_request(unsigned gpio, const char *tag);
147extern void gpio_free(unsigned gpio);
148
149static inline int gpio_to_irq(unsigned gpio)
150{
151 return DAVINCI_N_AINTC_IRQ + gpio;
152}
153
154static inline int irq_to_gpio(unsigned irq)
155{
156 return irq - DAVINCI_N_AINTC_IRQ;
157}
158
159#endif /* __DAVINCI_GPIO_H */
diff --git a/include/asm-arm/arch-davinci/hardware.h b/arch/arm/mach-davinci/include/mach/hardware.h
index a2e8969afaca..a2e8969afaca 100644
--- a/include/asm-arm/arch-davinci/hardware.h
+++ b/arch/arm/mach-davinci/include/mach/hardware.h
diff --git a/include/asm-arm/arch-davinci/i2c.h b/arch/arm/mach-davinci/include/mach/i2c.h
index e2f54168abd1..e2f54168abd1 100644
--- a/include/asm-arm/arch-davinci/i2c.h
+++ b/arch/arm/mach-davinci/include/mach/i2c.h
diff --git a/include/asm-arm/arch-davinci/io.h b/arch/arm/mach-davinci/include/mach/io.h
index e7accb910864..e7accb910864 100644
--- a/include/asm-arm/arch-davinci/io.h
+++ b/arch/arm/mach-davinci/include/mach/io.h
diff --git a/include/asm-arm/arch-davinci/irqs.h b/arch/arm/mach-davinci/include/mach/irqs.h
index f4c5ca6da9f4..f4c5ca6da9f4 100644
--- a/include/asm-arm/arch-davinci/irqs.h
+++ b/arch/arm/mach-davinci/include/mach/irqs.h
diff --git a/include/asm-arm/arch-davinci/memory.h b/arch/arm/mach-davinci/include/mach/memory.h
index dd1625c23cf4..dd1625c23cf4 100644
--- a/include/asm-arm/arch-davinci/memory.h
+++ b/arch/arm/mach-davinci/include/mach/memory.h
diff --git a/include/asm-arm/arch-davinci/mux.h b/arch/arm/mach-davinci/include/mach/mux.h
index c24b6782804d..c24b6782804d 100644
--- a/include/asm-arm/arch-davinci/mux.h
+++ b/arch/arm/mach-davinci/include/mach/mux.h
diff --git a/include/asm-arm/arch-davinci/psc.h b/arch/arm/mach-davinci/include/mach/psc.h
index 4977aa071e1e..4977aa071e1e 100644
--- a/include/asm-arm/arch-davinci/psc.h
+++ b/arch/arm/mach-davinci/include/mach/psc.h
diff --git a/arch/arm/mach-davinci/include/mach/serial.h b/arch/arm/mach-davinci/include/mach/serial.h
new file mode 100644
index 000000000000..fb8cb229bfd2
--- /dev/null
+++ b/arch/arm/mach-davinci/include/mach/serial.h
@@ -0,0 +1,20 @@
1/*
2 * DaVinci serial device definitions
3 *
4 * Author: Kevin Hilman, MontaVista Software, Inc. <source@mvista.com>
5 *
6 * 2007 (c) MontaVista Software, Inc. This file is licensed under
7 * the terms of the GNU General Public License version 2. This program
8 * is licensed "as is" without any warranty of any kind, whether express
9 * or implied.
10 */
11#ifndef __ASM_ARCH_SERIAL_H
12#define __ASM_ARCH_SERIAL_H
13
14#include <mach/io.h>
15
16#define DAVINCI_UART0_BASE (IO_PHYS + 0x20000)
17#define DAVINCI_UART1_BASE (IO_PHYS + 0x20400)
18#define DAVINCI_UART2_BASE (IO_PHYS + 0x20800)
19
20#endif /* __ASM_ARCH_SERIAL_H */
diff --git a/arch/arm/mach-davinci/include/mach/system.h b/arch/arm/mach-davinci/include/mach/system.h
new file mode 100644
index 000000000000..84ff77aeb738
--- /dev/null
+++ b/arch/arm/mach-davinci/include/mach/system.h
@@ -0,0 +1,29 @@
1/*
2 * DaVinci system defines
3 *
4 * Author: Kevin Hilman, MontaVista Software, Inc. <source@mvista.com>
5 *
6 * 2007 (c) MontaVista Software, Inc. This file is licensed under
7 * the terms of the GNU General Public License version 2. This program
8 * is licensed "as is" without any warranty of any kind, whether express
9 * or implied.
10 */
11#ifndef __ASM_ARCH_SYSTEM_H
12#define __ASM_ARCH_SYSTEM_H
13
14#include <asm/io.h>
15#include <mach/hardware.h>
16
17extern void davinci_watchdog_reset(void);
18
19static void arch_idle(void)
20{
21 cpu_do_idle();
22}
23
24static void arch_reset(char mode)
25{
26 davinci_watchdog_reset();
27}
28
29#endif /* __ASM_ARCH_SYSTEM_H */
diff --git a/include/asm-arm/arch-davinci/timex.h b/arch/arm/mach-davinci/include/mach/timex.h
index 52827567841d..52827567841d 100644
--- a/include/asm-arm/arch-davinci/timex.h
+++ b/arch/arm/mach-davinci/include/mach/timex.h
diff --git a/arch/arm/mach-davinci/include/mach/uncompress.h b/arch/arm/mach-davinci/include/mach/uncompress.h
new file mode 100644
index 000000000000..8c165def37b6
--- /dev/null
+++ b/arch/arm/mach-davinci/include/mach/uncompress.h
@@ -0,0 +1,35 @@
1/*
2 * Serial port stubs for kernel decompress status messages
3 *
4 * Author: Anant Gole
5 * (C) Copyright (C) 2006, Texas Instruments, Inc
6 *
7 * This file is licensed under the terms of the GNU General Public License
8 * version 2. This program is licensed "as is" without any warranty of any
9 * kind, whether express or implied.
10 */
11
12#include <linux/types.h>
13#include <linux/serial_reg.h>
14#include <mach/serial.h>
15
16/* PORT_16C550A, in polled non-fifo mode */
17
18static void putc(char c)
19{
20 volatile u32 *uart = (volatile void *) DAVINCI_UART0_BASE;
21
22 while (!(uart[UART_LSR] & UART_LSR_THRE))
23 barrier();
24 uart[UART_TX] = c;
25}
26
27static inline void flush(void)
28{
29 volatile u32 *uart = (volatile void *) DAVINCI_UART0_BASE;
30 while (!(uart[UART_LSR] & UART_LSR_THRE))
31 barrier();
32}
33
34#define arch_decomp_setup()
35#define arch_decomp_wdog()
diff --git a/arch/arm/mach-davinci/include/mach/vmalloc.h b/arch/arm/mach-davinci/include/mach/vmalloc.h
new file mode 100644
index 000000000000..b98bd9e92fd6
--- /dev/null
+++ b/arch/arm/mach-davinci/include/mach/vmalloc.h
@@ -0,0 +1,15 @@
1/*
2 * DaVinci vmalloc definitions
3 *
4 * Author: Kevin Hilman, MontaVista Software, Inc. <source@mvista.com>
5 *
6 * 2007 (c) MontaVista Software, Inc. This file is licensed under
7 * the terms of the GNU General Public License version 2. This program
8 * is licensed "as is" without any warranty of any kind, whether express
9 * or implied.
10 */
11#include <asm/memory.h>
12#include <mach/io.h>
13
14/* Allow vmalloc range until the IO virtual range minus a 2M "hole" */
15#define VMALLOC_END (IO_VIRT - (2<<20))
diff --git a/arch/arm/mach-davinci/io.c b/arch/arm/mach-davinci/io.c
index 47787ff84a6a..5bb66b61c1a3 100644
--- a/arch/arm/mach-davinci/io.c
+++ b/arch/arm/mach-davinci/io.c
@@ -17,7 +17,7 @@
17#include <asm/memory.h> 17#include <asm/memory.h>
18 18
19#include <asm/mach/map.h> 19#include <asm/mach/map.h>
20#include <asm/arch/clock.h> 20#include <mach/clock.h>
21 21
22extern void davinci_check_revision(void); 22extern void davinci_check_revision(void);
23 23
diff --git a/arch/arm/mach-davinci/irq.c b/arch/arm/mach-davinci/irq.c
index 1333d84d2e45..12ca9f29f847 100644
--- a/arch/arm/mach-davinci/irq.c
+++ b/arch/arm/mach-davinci/irq.c
@@ -23,7 +23,7 @@
23#include <linux/interrupt.h> 23#include <linux/interrupt.h>
24#include <linux/irq.h> 24#include <linux/irq.h>
25 25
26#include <asm/hardware.h> 26#include <mach/hardware.h>
27#include <asm/io.h> 27#include <asm/io.h>
28#include <asm/mach/irq.h> 28#include <asm/mach/irq.h>
29 29
diff --git a/arch/arm/mach-davinci/mux.c b/arch/arm/mach-davinci/mux.c
index 92d26bd305b7..8ff9d8aca60b 100644
--- a/arch/arm/mach-davinci/mux.c
+++ b/arch/arm/mach-davinci/mux.c
@@ -11,9 +11,9 @@
11#include <linux/io.h> 11#include <linux/io.h>
12#include <linux/spinlock.h> 12#include <linux/spinlock.h>
13 13
14#include <asm/hardware.h> 14#include <mach/hardware.h>
15 15
16#include <asm/arch/mux.h> 16#include <mach/mux.h>
17 17
18/* System control register offsets */ 18/* System control register offsets */
19#define PINMUX0 0x00 19#define PINMUX0 0x00
diff --git a/arch/arm/mach-davinci/psc.c b/arch/arm/mach-davinci/psc.c
index 1334416559ad..720c48b9ee04 100644
--- a/arch/arm/mach-davinci/psc.c
+++ b/arch/arm/mach-davinci/psc.c
@@ -23,9 +23,9 @@
23#include <linux/init.h> 23#include <linux/init.h>
24 24
25#include <asm/io.h> 25#include <asm/io.h>
26#include <asm/hardware.h> 26#include <mach/hardware.h>
27#include <asm/arch/psc.h> 27#include <mach/psc.h>
28#include <asm/arch/mux.h> 28#include <mach/mux.h>
29 29
30/* PSC register offsets */ 30/* PSC register offsets */
31#define EPCPR 0x070 31#define EPCPR 0x070
diff --git a/arch/arm/mach-davinci/serial.c b/arch/arm/mach-davinci/serial.c
index 8368c93c788d..caf101e2cc62 100644
--- a/arch/arm/mach-davinci/serial.c
+++ b/arch/arm/mach-davinci/serial.c
@@ -29,9 +29,9 @@
29 29
30#include <asm/io.h> 30#include <asm/io.h>
31#include <asm/irq.h> 31#include <asm/irq.h>
32#include <asm/hardware.h> 32#include <mach/hardware.h>
33#include <asm/arch/serial.h> 33#include <mach/serial.h>
34#include <asm/arch/irqs.h> 34#include <mach/irqs.h>
35 35
36#define UART_DAVINCI_PWREMU 0x0c 36#define UART_DAVINCI_PWREMU 0x0c
37 37
diff --git a/arch/arm/mach-davinci/time.c b/arch/arm/mach-davinci/time.c
index e96a3dcdc1a7..206e80d41717 100644
--- a/arch/arm/mach-davinci/time.c
+++ b/arch/arm/mach-davinci/time.c
@@ -17,13 +17,13 @@
17#include <linux/spinlock.h> 17#include <linux/spinlock.h>
18 18
19#include <asm/io.h> 19#include <asm/io.h>
20#include <asm/hardware.h> 20#include <mach/hardware.h>
21#include <asm/system.h> 21#include <asm/system.h>
22#include <asm/irq.h> 22#include <asm/irq.h>
23#include <asm/mach/irq.h> 23#include <asm/mach/irq.h>
24#include <asm/mach/time.h> 24#include <asm/mach/time.h>
25#include <asm/errno.h> 25#include <asm/errno.h>
26#include <asm/arch/io.h> 26#include <mach/io.h>
27 27
28static struct clock_event_device clockevent_davinci; 28static struct clock_event_device clockevent_davinci;
29 29
diff --git a/arch/arm/mach-ebsa110/core.c b/arch/arm/mach-ebsa110/core.c
index 7710e14b5268..65cc7c271917 100644
--- a/arch/arm/mach-ebsa110/core.c
+++ b/arch/arm/mach-ebsa110/core.c
@@ -15,7 +15,7 @@
15#include <linux/serial_8250.h> 15#include <linux/serial_8250.h>
16#include <linux/init.h> 16#include <linux/init.h>
17 17
18#include <asm/hardware.h> 18#include <mach/hardware.h>
19#include <asm/irq.h> 19#include <asm/irq.h>
20#include <asm/io.h> 20#include <asm/io.h>
21#include <asm/setup.h> 21#include <asm/setup.h>
diff --git a/arch/arm/mach-ebsa110/include/mach/debug-macro.S b/arch/arm/mach-ebsa110/include/mach/debug-macro.S
new file mode 100644
index 000000000000..1dde8227f3a2
--- /dev/null
+++ b/arch/arm/mach-ebsa110/include/mach/debug-macro.S
@@ -0,0 +1,21 @@
1/* arch/arm/mach-ebsa110/include/mach/debug-macro.S
2 *
3 * Debugging macro include header
4 *
5 * Copyright (C) 1994-1999 Russell King
6 * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 *
12**/
13
14 .macro addruart,rx
15 mov \rx, #0xf0000000
16 orr \rx, \rx, #0x00000be0
17 .endm
18
19#define UART_SHIFT 2
20#define FLOW_CONTROL
21#include <asm/hardware/debug-8250.S>
diff --git a/arch/arm/mach-ebsa110/include/mach/dma.h b/arch/arm/mach-ebsa110/include/mach/dma.h
new file mode 100644
index 000000000000..780a04c8bbe9
--- /dev/null
+++ b/arch/arm/mach-ebsa110/include/mach/dma.h
@@ -0,0 +1,11 @@
1/*
2 * arch/arm/mach-ebsa110/include/mach/dma.h
3 *
4 * Copyright (C) 1997,1998 Russell King
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * EBSA110 DMA definitions
11 */
diff --git a/arch/arm/mach-ebsa110/include/mach/entry-macro.S b/arch/arm/mach-ebsa110/include/mach/entry-macro.S
new file mode 100644
index 000000000000..cc3e5992f6b3
--- /dev/null
+++ b/arch/arm/mach-ebsa110/include/mach/entry-macro.S
@@ -0,0 +1,39 @@
1/*
2 * arch/arm/mach-ebsa110/include/mach/entry-macro.S
3 *
4 * Low-level IRQ helper macros for ebsa110 platform.
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10
11
12
13#define IRQ_STAT 0xff000000 /* read */
14
15 .macro disable_fiq
16 .endm
17
18 .macro get_irqnr_preamble, base, tmp
19 mov \base, #IRQ_STAT
20 .endm
21
22 .macro arch_ret_to_user, tmp1, tmp2
23 .endm
24
25 .macro get_irqnr_and_base, irqnr, stat, base, tmp
26 ldrb \stat, [\base] @ get interrupts
27 mov \irqnr, #0
28 tst \stat, #15
29 addeq \irqnr, \irqnr, #4
30 moveq \stat, \stat, lsr #4
31 tst \stat, #3
32 addeq \irqnr, \irqnr, #2
33 moveq \stat, \stat, lsr #2
34 tst \stat, #1
35 addeq \irqnr, \irqnr, #1
36 moveq \stat, \stat, lsr #1
37 tst \stat, #1 @ bit 0 should be set
38 .endm
39
diff --git a/arch/arm/mach-ebsa110/include/mach/hardware.h b/arch/arm/mach-ebsa110/include/mach/hardware.h
new file mode 100644
index 000000000000..4b2fb7743909
--- /dev/null
+++ b/arch/arm/mach-ebsa110/include/mach/hardware.h
@@ -0,0 +1,63 @@
1/*
2 * arch/arm/mach-ebsa110/include/mach/hardware.h
3 *
4 * Copyright (C) 1996-2000 Russell King.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * This file contains the hardware definitions of the EBSA-110.
11 */
12#ifndef __ASM_ARCH_HARDWARE_H
13#define __ASM_ARCH_HARDWARE_H
14
15/*
16 * The EBSA110 has a weird "ISA IO" region:
17 *
18 * Region 0 (addr = 0xf0000000 + io << 2)
19 * --------------------------------------------------------
20 * Physical region IO region
21 * f0000fe0 - f0000ffc 3f8 - 3ff ttyS0
22 * f0000e60 - f0000e64 398 - 399
23 * f0000de0 - f0000dfc 378 - 37f lp0
24 * f0000be0 - f0000bfc 2f8 - 2ff ttyS1
25 *
26 * Region 1 (addr = 0xf0000000 + (io & ~1) << 1 + (io & 1))
27 * --------------------------------------------------------
28 * Physical region IO region
29 * f00014f1 a79 pnp write data
30 * f00007c0 - f00007c1 3e0 - 3e1 pcmcia
31 * f00004f1 279 pnp address
32 * f0000440 - f000046c 220 - 236 eth0
33 * f0000405 203 pnp read data
34 */
35
36#define ISAMEM_PHYS 0xe0000000
37#define ISAMEM_SIZE 0x10000000
38
39#define ISAIO_PHYS 0xf0000000
40#define ISAIO_SIZE PGDIR_SIZE
41
42#define TRICK0_PHYS 0xf2000000
43#define TRICK1_PHYS 0xf2400000
44#define TRICK2_PHYS 0xf2800000
45#define TRICK3_PHYS 0xf2c00000
46#define TRICK4_PHYS 0xf3000000
47#define TRICK5_PHYS 0xf3400000
48#define TRICK6_PHYS 0xf3800000
49#define TRICK7_PHYS 0xf3c00000
50
51#define ISAMEM_BASE 0xe0000000
52#define ISAIO_BASE 0xf0000000
53
54#define PIT_BASE 0xfc000000
55#define SOFT_BASE 0xfd000000
56
57/*
58 * RAM definitions
59 */
60#define UNCACHEABLE_ADDR 0xff000000 /* IRQ_STAT */
61
62#endif
63
diff --git a/arch/arm/mach-ebsa110/include/mach/io.h b/arch/arm/mach-ebsa110/include/mach/io.h
new file mode 100644
index 000000000000..f68daa632af0
--- /dev/null
+++ b/arch/arm/mach-ebsa110/include/mach/io.h
@@ -0,0 +1,92 @@
1/*
2 * arch/arm/mach-ebsa110/include/mach/io.h
3 *
4 * Copyright (C) 1997,1998 Russell King
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * Modifications:
11 * 06-Dec-1997 RMK Created.
12 */
13#ifndef __ASM_ARM_ARCH_IO_H
14#define __ASM_ARM_ARCH_IO_H
15
16#define IO_SPACE_LIMIT 0xffff
17
18u8 __inb8(unsigned int port);
19void __outb8(u8 val, unsigned int port);
20
21u8 __inb16(unsigned int port);
22void __outb16(u8 val, unsigned int port);
23
24u16 __inw(unsigned int port);
25void __outw(u16 val, unsigned int port);
26
27u32 __inl(unsigned int port);
28void __outl(u32 val, unsigned int port);
29
30u8 __readb(const volatile void __iomem *addr);
31u16 __readw(const volatile void __iomem *addr);
32u32 __readl(const volatile void __iomem *addr);
33
34void __writeb(u8 val, void __iomem *addr);
35void __writew(u16 val, void __iomem *addr);
36void __writel(u32 val, void __iomem *addr);
37
38/*
39 * Argh, someone forgot the IOCS16 line. We therefore have to handle
40 * the byte stearing by selecting the correct byte IO functions here.
41 */
42#ifdef ISA_SIXTEEN_BIT_PERIPHERAL
43#define inb(p) __inb16(p)
44#define outb(v,p) __outb16(v,p)
45#else
46#define inb(p) __inb8(p)
47#define outb(v,p) __outb8(v,p)
48#endif
49
50#define inw(p) __inw(p)
51#define outw(v,p) __outw(v,p)
52
53#define inl(p) __inl(p)
54#define outl(v,p) __outl(v,p)
55
56#define readb(b) __readb(b)
57#define readw(b) __readw(b)
58#define readl(b) __readl(b)
59#define readb_relaxed(addr) readb(addr)
60#define readw_relaxed(addr) readw(addr)
61#define readl_relaxed(addr) readl(addr)
62
63#define writeb(v,b) __writeb(v,b)
64#define writew(v,b) __writew(v,b)
65#define writel(v,b) __writel(v,b)
66
67static inline void __iomem *__arch_ioremap(unsigned long cookie, size_t size,
68 unsigned int flags)
69{
70 return (void __iomem *)cookie;
71}
72
73#define __arch_ioremap __arch_ioremap
74#define __arch_iounmap(cookie) do { } while (0)
75
76extern void insb(unsigned int port, void *buf, int sz);
77extern void insw(unsigned int port, void *buf, int sz);
78extern void insl(unsigned int port, void *buf, int sz);
79
80extern void outsb(unsigned int port, const void *buf, int sz);
81extern void outsw(unsigned int port, const void *buf, int sz);
82extern void outsl(unsigned int port, const void *buf, int sz);
83
84/* can't support writesb atm */
85extern void writesw(void __iomem *addr, const void *data, int wordlen);
86extern void writesl(void __iomem *addr, const void *data, int longlen);
87
88/* can't support readsb atm */
89extern void readsw(const void __iomem *addr, void *data, int wordlen);
90extern void readsl(const void __iomem *addr, void *data, int longlen);
91
92#endif
diff --git a/arch/arm/mach-ebsa110/include/mach/irqs.h b/arch/arm/mach-ebsa110/include/mach/irqs.h
new file mode 100644
index 000000000000..a8f3771bc060
--- /dev/null
+++ b/arch/arm/mach-ebsa110/include/mach/irqs.h
@@ -0,0 +1,20 @@
1/*
2 * arch/arm/mach-ebsa110/include/mach/irqs.h
3 *
4 * Copyright (C) 1996 Russell King
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10
11#define NR_IRQS 8
12
13#define IRQ_EBSA110_PRINTER 0
14#define IRQ_EBSA110_COM1 1
15#define IRQ_EBSA110_COM2 2
16#define IRQ_EBSA110_ETHERNET 3
17#define IRQ_EBSA110_TIMER0 4
18#define IRQ_EBSA110_TIMER1 5
19#define IRQ_EBSA110_PCMCIA 6
20#define IRQ_EBSA110_IMMEDIATE 7
diff --git a/arch/arm/mach-ebsa110/include/mach/memory.h b/arch/arm/mach-ebsa110/include/mach/memory.h
new file mode 100644
index 000000000000..eea4b75b657b
--- /dev/null
+++ b/arch/arm/mach-ebsa110/include/mach/memory.h
@@ -0,0 +1,37 @@
1/*
2 * arch/arm/mach-ebsa110/include/mach/memory.h
3 *
4 * Copyright (C) 1996-1999 Russell King.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * Changelog:
11 * 20-Oct-1996 RMK Created
12 * 31-Dec-1997 RMK Fixed definitions to reduce warnings
13 * 21-Mar-1999 RMK Renamed to memory.h
14 * RMK Moved TASK_SIZE and PAGE_OFFSET here
15 */
16#ifndef __ASM_ARCH_MEMORY_H
17#define __ASM_ARCH_MEMORY_H
18
19/*
20 * Physical DRAM offset.
21 */
22#define PHYS_OFFSET UL(0x00000000)
23
24/*
25 * We keep this 1:1 so that we don't interfere
26 * with the PCMCIA memory regions
27 */
28#define __virt_to_bus(x) (x)
29#define __bus_to_virt(x) (x)
30
31/*
32 * Cache flushing area - SRAM
33 */
34#define FLUSH_BASE_PHYS 0x40000000
35#define FLUSH_BASE 0xdf000000
36
37#endif
diff --git a/arch/arm/mach-ebsa110/include/mach/system.h b/arch/arm/mach-ebsa110/include/mach/system.h
new file mode 100644
index 000000000000..350a028997ef
--- /dev/null
+++ b/arch/arm/mach-ebsa110/include/mach/system.h
@@ -0,0 +1,39 @@
1/*
2 * arch/arm/mach-ebsa110/include/mach/system.h
3 *
4 * Copyright (C) 1996-2000 Russell King.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10#ifndef __ASM_ARCH_SYSTEM_H
11#define __ASM_ARCH_SYSTEM_H
12
13/*
14 * EBSA110 idling methodology:
15 *
16 * We can not execute the "wait for interrupt" instruction since that
17 * will stop our MCLK signal (which provides the clock for the glue
18 * logic, and therefore the timer interrupt).
19 *
20 * Instead, we spin, polling the IRQ_STAT register for the occurrence
21 * of any interrupt with core clock down to the memory clock.
22 */
23static inline void arch_idle(void)
24{
25 const char *irq_stat = (char *)0xff000000;
26
27 /* disable clock switching */
28 asm volatile ("mcr p15, 0, ip, c15, c2, 2" : : : "cc");
29
30 /* wait for an interrupt to occur */
31 while (!*irq_stat);
32
33 /* enable clock switching */
34 asm volatile ("mcr p15, 0, ip, c15, c1, 2" : : : "cc");
35}
36
37#define arch_reset(mode) cpu_reset(0x80000000)
38
39#endif
diff --git a/arch/arm/mach-ebsa110/include/mach/timex.h b/arch/arm/mach-ebsa110/include/mach/timex.h
new file mode 100644
index 000000000000..4fb43b22a102
--- /dev/null
+++ b/arch/arm/mach-ebsa110/include/mach/timex.h
@@ -0,0 +1,19 @@
1/*
2 * arch/arm/mach-ebsa110/include/mach/timex.h
3 *
4 * Copyright (C) 1997, 1998 Russell King
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * EBSA110 architecture timex specifications
11 */
12
13/*
14 * On the EBSA, the clock ticks at weird rates.
15 * This is therefore not used to calculate the
16 * divisor.
17 */
18#define CLOCK_TICK_RATE 47894000
19
diff --git a/arch/arm/mach-ebsa110/include/mach/uncompress.h b/arch/arm/mach-ebsa110/include/mach/uncompress.h
new file mode 100644
index 000000000000..32041509fbf8
--- /dev/null
+++ b/arch/arm/mach-ebsa110/include/mach/uncompress.h
@@ -0,0 +1,45 @@
1/*
2 * arch/arm/mach-ebsa110/include/mach/uncompress.h
3 *
4 * Copyright (C) 1996,1997,1998 Russell King
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10
11#include <linux/serial_reg.h>
12
13#define SERIAL_BASE ((unsigned char *)0xf0000be0)
14
15/*
16 * This does not append a newline
17 */
18static inline void putc(int c)
19{
20 unsigned char v, *base = SERIAL_BASE;
21
22 do {
23 v = base[UART_LSR << 2];
24 barrier();
25 } while (!(v & UART_LSR_THRE));
26
27 base[UART_TX << 2] = c;
28}
29
30static inline void flush(void)
31{
32 unsigned char v, *base = SERIAL_BASE;
33
34 do {
35 v = base[UART_LSR << 2];
36 barrier();
37 } while ((v & (UART_LSR_TEMT|UART_LSR_THRE)) !=
38 (UART_LSR_TEMT|UART_LSR_THRE));
39}
40
41/*
42 * nothing to do
43 */
44#define arch_decomp_setup()
45#define arch_decomp_wdog()
diff --git a/arch/arm/mach-ebsa110/include/mach/vmalloc.h b/arch/arm/mach-ebsa110/include/mach/vmalloc.h
new file mode 100644
index 000000000000..9b44c19e95ec
--- /dev/null
+++ b/arch/arm/mach-ebsa110/include/mach/vmalloc.h
@@ -0,0 +1,10 @@
1/*
2 * arch/arm/mach-ebsa110/include/mach/vmalloc.h
3 *
4 * Copyright (C) 1998 Russell King
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10#define VMALLOC_END (PAGE_OFFSET + 0x1f000000)
diff --git a/arch/arm/mach-ebsa110/io.c b/arch/arm/mach-ebsa110/io.c
index 6b2380e153ef..53748f5462e9 100644
--- a/arch/arm/mach-ebsa110/io.c
+++ b/arch/arm/mach-ebsa110/io.c
@@ -24,7 +24,7 @@
24#include <linux/kernel.h> 24#include <linux/kernel.h>
25#include <linux/types.h> 25#include <linux/types.h>
26 26
27#include <asm/hardware.h> 27#include <mach/hardware.h>
28#include <asm/io.h> 28#include <asm/io.h>
29#include <asm/page.h> 29#include <asm/page.h>
30 30
diff --git a/arch/arm/mach-ebsa110/leds.c b/arch/arm/mach-ebsa110/leds.c
index 3bc8c5e708e6..6a6ea57c2a4e 100644
--- a/arch/arm/mach-ebsa110/leds.c
+++ b/arch/arm/mach-ebsa110/leds.c
@@ -15,7 +15,7 @@
15#include <linux/spinlock.h> 15#include <linux/spinlock.h>
16#include <linux/init.h> 16#include <linux/init.h>
17 17
18#include <asm/hardware.h> 18#include <mach/hardware.h>
19#include <asm/leds.h> 19#include <asm/leds.h>
20#include <asm/system.h> 20#include <asm/system.h>
21#include <asm/mach-types.h> 21#include <asm/mach-types.h>
diff --git a/arch/arm/mach-ep93xx/adssphere.c b/arch/arm/mach-ep93xx/adssphere.c
index ac5d5818eb7b..aa1fb352fb8f 100644
--- a/arch/arm/mach-ep93xx/adssphere.c
+++ b/arch/arm/mach-ep93xx/adssphere.c
@@ -19,7 +19,7 @@
19#include <linux/mtd/physmap.h> 19#include <linux/mtd/physmap.h>
20#include <linux/platform_device.h> 20#include <linux/platform_device.h>
21#include <asm/io.h> 21#include <asm/io.h>
22#include <asm/hardware.h> 22#include <mach/hardware.h>
23#include <asm/mach-types.h> 23#include <asm/mach-types.h>
24#include <asm/mach/arch.h> 24#include <asm/mach/arch.h>
25 25
diff --git a/arch/arm/mach-ep93xx/clock.c b/arch/arm/mach-ep93xx/clock.c
index f62c35500bb7..6062e47f2043 100644
--- a/arch/arm/mach-ep93xx/clock.c
+++ b/arch/arm/mach-ep93xx/clock.c
@@ -16,7 +16,7 @@
16#include <linux/module.h> 16#include <linux/module.h>
17#include <linux/string.h> 17#include <linux/string.h>
18#include <asm/div64.h> 18#include <asm/div64.h>
19#include <asm/hardware.h> 19#include <mach/hardware.h>
20#include <asm/io.h> 20#include <asm/io.h>
21 21
22struct clk { 22struct clk {
diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c
index 5fed57608507..f99f43669392 100644
--- a/arch/arm/mach-ep93xx/core.c
+++ b/arch/arm/mach-ep93xx/core.c
@@ -36,7 +36,7 @@
36#include <asm/types.h> 36#include <asm/types.h>
37#include <asm/setup.h> 37#include <asm/setup.h>
38#include <asm/memory.h> 38#include <asm/memory.h>
39#include <asm/hardware.h> 39#include <mach/hardware.h>
40#include <asm/irq.h> 40#include <asm/irq.h>
41#include <asm/system.h> 41#include <asm/system.h>
42#include <asm/tlbflush.h> 42#include <asm/tlbflush.h>
@@ -46,7 +46,7 @@
46#include <asm/mach/map.h> 46#include <asm/mach/map.h>
47#include <asm/mach/time.h> 47#include <asm/mach/time.h>
48#include <asm/mach/irq.h> 48#include <asm/mach/irq.h>
49#include <asm/arch/gpio.h> 49#include <mach/gpio.h>
50 50
51#include <asm/hardware/vic.h> 51#include <asm/hardware/vic.h>
52 52
diff --git a/arch/arm/mach-ep93xx/edb9302.c b/arch/arm/mach-ep93xx/edb9302.c
index 0315615b74da..97550c0ad7b0 100644
--- a/arch/arm/mach-ep93xx/edb9302.c
+++ b/arch/arm/mach-ep93xx/edb9302.c
@@ -19,7 +19,7 @@
19#include <linux/mtd/physmap.h> 19#include <linux/mtd/physmap.h>
20#include <linux/platform_device.h> 20#include <linux/platform_device.h>
21#include <asm/io.h> 21#include <asm/io.h>
22#include <asm/hardware.h> 22#include <mach/hardware.h>
23#include <asm/mach-types.h> 23#include <asm/mach-types.h>
24#include <asm/mach/arch.h> 24#include <asm/mach/arch.h>
25 25
diff --git a/arch/arm/mach-ep93xx/edb9302a.c b/arch/arm/mach-ep93xx/edb9302a.c
index 62e064bab1d2..99b01d44bf1c 100644
--- a/arch/arm/mach-ep93xx/edb9302a.c
+++ b/arch/arm/mach-ep93xx/edb9302a.c
@@ -19,7 +19,7 @@
19#include <linux/mtd/physmap.h> 19#include <linux/mtd/physmap.h>
20#include <linux/platform_device.h> 20#include <linux/platform_device.h>
21#include <asm/io.h> 21#include <asm/io.h>
22#include <asm/hardware.h> 22#include <mach/hardware.h>
23#include <asm/mach-types.h> 23#include <asm/mach-types.h>
24#include <asm/mach/arch.h> 24#include <asm/mach/arch.h>
25 25
diff --git a/arch/arm/mach-ep93xx/edb9307.c b/arch/arm/mach-ep93xx/edb9307.c
index d6a5698da91f..9fb72d01a36c 100644
--- a/arch/arm/mach-ep93xx/edb9307.c
+++ b/arch/arm/mach-ep93xx/edb9307.c
@@ -19,7 +19,7 @@
19#include <linux/mtd/physmap.h> 19#include <linux/mtd/physmap.h>
20#include <linux/platform_device.h> 20#include <linux/platform_device.h>
21#include <asm/io.h> 21#include <asm/io.h>
22#include <asm/hardware.h> 22#include <mach/hardware.h>
23#include <asm/mach-types.h> 23#include <asm/mach-types.h>
24#include <asm/mach/arch.h> 24#include <asm/mach/arch.h>
25 25
diff --git a/arch/arm/mach-ep93xx/edb9312.c b/arch/arm/mach-ep93xx/edb9312.c
index e310e4d72990..87267a574f5e 100644
--- a/arch/arm/mach-ep93xx/edb9312.c
+++ b/arch/arm/mach-ep93xx/edb9312.c
@@ -20,7 +20,7 @@
20#include <linux/mtd/physmap.h> 20#include <linux/mtd/physmap.h>
21#include <linux/platform_device.h> 21#include <linux/platform_device.h>
22#include <asm/io.h> 22#include <asm/io.h>
23#include <asm/hardware.h> 23#include <mach/hardware.h>
24#include <asm/mach-types.h> 24#include <asm/mach-types.h>
25#include <asm/mach/arch.h> 25#include <asm/mach/arch.h>
26 26
diff --git a/arch/arm/mach-ep93xx/edb9315.c b/arch/arm/mach-ep93xx/edb9315.c
index 249ca9e57bc6..7e373950be4d 100644
--- a/arch/arm/mach-ep93xx/edb9315.c
+++ b/arch/arm/mach-ep93xx/edb9315.c
@@ -19,7 +19,7 @@
19#include <linux/mtd/physmap.h> 19#include <linux/mtd/physmap.h>
20#include <linux/platform_device.h> 20#include <linux/platform_device.h>
21#include <asm/io.h> 21#include <asm/io.h>
22#include <asm/hardware.h> 22#include <mach/hardware.h>
23#include <asm/mach-types.h> 23#include <asm/mach-types.h>
24#include <asm/mach/arch.h> 24#include <asm/mach/arch.h>
25 25
diff --git a/arch/arm/mach-ep93xx/edb9315a.c b/arch/arm/mach-ep93xx/edb9315a.c
index 7ca0e6170a41..08a7c9bfb689 100644
--- a/arch/arm/mach-ep93xx/edb9315a.c
+++ b/arch/arm/mach-ep93xx/edb9315a.c
@@ -19,7 +19,7 @@
19#include <linux/mtd/physmap.h> 19#include <linux/mtd/physmap.h>
20#include <linux/platform_device.h> 20#include <linux/platform_device.h>
21#include <asm/io.h> 21#include <asm/io.h>
22#include <asm/hardware.h> 22#include <mach/hardware.h>
23#include <asm/mach-types.h> 23#include <asm/mach-types.h>
24#include <asm/mach/arch.h> 24#include <asm/mach/arch.h>
25 25
diff --git a/arch/arm/mach-ep93xx/gesbc9312.c b/arch/arm/mach-ep93xx/gesbc9312.c
index 694590a451c1..9b41ec1f089e 100644
--- a/arch/arm/mach-ep93xx/gesbc9312.c
+++ b/arch/arm/mach-ep93xx/gesbc9312.c
@@ -19,7 +19,7 @@
19#include <linux/mtd/physmap.h> 19#include <linux/mtd/physmap.h>
20#include <linux/platform_device.h> 20#include <linux/platform_device.h>
21#include <asm/io.h> 21#include <asm/io.h>
22#include <asm/hardware.h> 22#include <mach/hardware.h>
23#include <asm/mach-types.h> 23#include <asm/mach-types.h>
24#include <asm/mach/arch.h> 24#include <asm/mach/arch.h>
25 25
diff --git a/arch/arm/mach-ep93xx/gpio.c b/arch/arm/mach-ep93xx/gpio.c
index dc2e4c00d989..0f3fb87ca4be 100644
--- a/arch/arm/mach-ep93xx/gpio.c
+++ b/arch/arm/mach-ep93xx/gpio.c
@@ -17,7 +17,7 @@
17#include <linux/module.h> 17#include <linux/module.h>
18#include <linux/seq_file.h> 18#include <linux/seq_file.h>
19 19
20#include <asm/arch/ep93xx-regs.h> 20#include <mach/ep93xx-regs.h>
21#include <asm/io.h> 21#include <asm/io.h>
22#include <asm/gpio.h> 22#include <asm/gpio.h>
23 23
diff --git a/arch/arm/mach-ep93xx/include/mach/debug-macro.S b/arch/arm/mach-ep93xx/include/mach/debug-macro.S
new file mode 100644
index 000000000000..802858bc8095
--- /dev/null
+++ b/arch/arm/mach-ep93xx/include/mach/debug-macro.S
@@ -0,0 +1,22 @@
1/*
2 * arch/arm/mach-ep93xx/include/mach/debug-macro.S
3 * Debugging macro include header
4 *
5 * Copyright (C) 2006 Lennert Buytenhek <buytenh@wantstofly.org>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or (at
10 * your option) any later version.
11 */
12#include <mach/ep93xx-regs.h>
13
14 .macro addruart,rx
15 mrc p15, 0, \rx, c1, c0
16 tst \rx, #1 @ MMU enabled?
17 ldreq \rx, =EP93XX_APB_PHYS_BASE @ Physical base
18 ldrne \rx, =EP93XX_APB_VIRT_BASE @ virtual base
19 orr \rx, \rx, #0x000c0000
20 .endm
21
22#include <asm/hardware/debug-pl01x.S>
diff --git a/arch/arm/mach-ep93xx/include/mach/dma.h b/arch/arm/mach-ep93xx/include/mach/dma.h
new file mode 100644
index 000000000000..d0fa9656e92f
--- /dev/null
+++ b/arch/arm/mach-ep93xx/include/mach/dma.h
@@ -0,0 +1,3 @@
1/*
2 * arch/arm/mach-ep93xx/include/mach/dma.h
3 */
diff --git a/arch/arm/mach-ep93xx/include/mach/entry-macro.S b/arch/arm/mach-ep93xx/include/mach/entry-macro.S
new file mode 100644
index 000000000000..96b85e2c2c0b
--- /dev/null
+++ b/arch/arm/mach-ep93xx/include/mach/entry-macro.S
@@ -0,0 +1,59 @@
1/*
2 * arch/arm/mach-ep93xx/include/mach/entry-macro.S
3 * IRQ demultiplexing for EP93xx
4 *
5 * Copyright (C) 2006 Lennert Buytenhek <buytenh@wantstofly.org>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or (at
10 * your option) any later version.
11 */
12#include <mach/ep93xx-regs.h>
13
14 .macro disable_fiq
15 .endm
16
17 .macro get_irqnr_preamble, base, tmp
18 .endm
19
20 .macro arch_ret_to_user, tmp1, tmp2
21 .endm
22
23 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
24 ldr \base, =(EP93XX_AHB_VIRT_BASE)
25 orr \base, \base, #0x000b0000
26 mov \irqnr, #0
27 ldr \irqstat, [\base] @ lower 32 interrupts
28 cmp \irqstat, #0
29 bne 1001f
30
31 eor \base, \base, #0x00070000
32 ldr \irqstat, [\base] @ upper 32 interrupts
33 cmp \irqstat, #0
34 beq 1002f
35 mov \irqnr, #0x20
36
371001:
38 movs \tmp, \irqstat, lsl #16
39 movne \irqstat, \tmp
40 addeq \irqnr, \irqnr, #16
41
42 movs \tmp, \irqstat, lsl #8
43 movne \irqstat, \tmp
44 addeq \irqnr, \irqnr, #8
45
46 movs \tmp, \irqstat, lsl #4
47 movne \irqstat, \tmp
48 addeq \irqnr, \irqnr, #4
49
50 movs \tmp, \irqstat, lsl #2
51 movne \irqstat, \tmp
52 addeq \irqnr, \irqnr, #2
53
54 movs \tmp, \irqstat, lsl #1
55 addeq \irqnr, \irqnr, #1
56 orrs \base, \base, #1
57
581002:
59 .endm
diff --git a/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h b/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h
new file mode 100644
index 000000000000..9f4458c8e070
--- /dev/null
+++ b/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h
@@ -0,0 +1,133 @@
1/*
2 * arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h
3 */
4
5#ifndef __ASM_ARCH_EP93XX_REGS_H
6#define __ASM_ARCH_EP93XX_REGS_H
7
8/*
9 * EP93xx linux memory map:
10 *
11 * virt phys size
12 * fe800000 5M per-platform mappings
13 * fed00000 80800000 2M APB
14 * fef00000 80000000 1M AHB
15 */
16
17#define EP93XX_AHB_PHYS_BASE 0x80000000
18#define EP93XX_AHB_VIRT_BASE 0xfef00000
19#define EP93XX_AHB_SIZE 0x00100000
20
21#define EP93XX_APB_PHYS_BASE 0x80800000
22#define EP93XX_APB_VIRT_BASE 0xfed00000
23#define EP93XX_APB_SIZE 0x00200000
24
25
26/* AHB peripherals */
27#define EP93XX_DMA_BASE (EP93XX_AHB_VIRT_BASE + 0x00000000)
28
29#define EP93XX_ETHERNET_BASE (EP93XX_AHB_VIRT_BASE + 0x00010000)
30#define EP93XX_ETHERNET_PHYS_BASE (EP93XX_AHB_PHYS_BASE + 0x00010000)
31
32#define EP93XX_USB_BASE (EP93XX_AHB_VIRT_BASE + 0x00020000)
33#define EP93XX_USB_PHYS_BASE (EP93XX_AHB_PHYS_BASE + 0x00020000)
34
35#define EP93XX_RASTER_BASE (EP93XX_AHB_VIRT_BASE + 0x00030000)
36
37#define EP93XX_GRAPHICS_ACCEL_BASE (EP93XX_AHB_VIRT_BASE + 0x00040000)
38
39#define EP93XX_SDRAM_CONTROLLER_BASE (EP93XX_AHB_VIRT_BASE + 0x00060000)
40
41#define EP93XX_PCMCIA_CONTROLLER_BASE (EP93XX_AHB_VIRT_BASE + 0x00080000)
42
43#define EP93XX_BOOT_ROM_BASE (EP93XX_AHB_VIRT_BASE + 0x00090000)
44
45#define EP93XX_IDE_BASE (EP93XX_AHB_VIRT_BASE + 0x000a0000)
46
47#define EP93XX_VIC1_BASE (EP93XX_AHB_VIRT_BASE + 0x000b0000)
48
49#define EP93XX_VIC2_BASE (EP93XX_AHB_VIRT_BASE + 0x000c0000)
50
51
52/* APB peripherals */
53#define EP93XX_TIMER_BASE (EP93XX_APB_VIRT_BASE + 0x00010000)
54#define EP93XX_TIMER_REG(x) (EP93XX_TIMER_BASE + (x))
55#define EP93XX_TIMER1_LOAD EP93XX_TIMER_REG(0x00)
56#define EP93XX_TIMER1_VALUE EP93XX_TIMER_REG(0x04)
57#define EP93XX_TIMER1_CONTROL EP93XX_TIMER_REG(0x08)
58#define EP93XX_TIMER1_CLEAR EP93XX_TIMER_REG(0x0c)
59#define EP93XX_TIMER2_LOAD EP93XX_TIMER_REG(0x20)
60#define EP93XX_TIMER2_VALUE EP93XX_TIMER_REG(0x24)
61#define EP93XX_TIMER2_CONTROL EP93XX_TIMER_REG(0x28)
62#define EP93XX_TIMER2_CLEAR EP93XX_TIMER_REG(0x2c)
63#define EP93XX_TIMER4_VALUE_LOW EP93XX_TIMER_REG(0x60)
64#define EP93XX_TIMER4_VALUE_HIGH EP93XX_TIMER_REG(0x64)
65#define EP93XX_TIMER3_LOAD EP93XX_TIMER_REG(0x80)
66#define EP93XX_TIMER3_VALUE EP93XX_TIMER_REG(0x84)
67#define EP93XX_TIMER3_CONTROL EP93XX_TIMER_REG(0x88)
68#define EP93XX_TIMER3_CLEAR EP93XX_TIMER_REG(0x8c)
69
70#define EP93XX_I2S_BASE (EP93XX_APB_VIRT_BASE + 0x00020000)
71
72#define EP93XX_SECURITY_BASE (EP93XX_APB_VIRT_BASE + 0x00030000)
73
74#define EP93XX_GPIO_BASE (EP93XX_APB_VIRT_BASE + 0x00040000)
75#define EP93XX_GPIO_REG(x) (EP93XX_GPIO_BASE + (x))
76#define EP93XX_GPIO_F_INT_TYPE1 EP93XX_GPIO_REG(0x4c)
77#define EP93XX_GPIO_F_INT_TYPE2 EP93XX_GPIO_REG(0x50)
78#define EP93XX_GPIO_F_INT_ACK EP93XX_GPIO_REG(0x54)
79#define EP93XX_GPIO_F_INT_ENABLE EP93XX_GPIO_REG(0x58)
80#define EP93XX_GPIO_F_INT_STATUS EP93XX_GPIO_REG(0x5c)
81#define EP93XX_GPIO_A_INT_TYPE1 EP93XX_GPIO_REG(0x90)
82#define EP93XX_GPIO_A_INT_TYPE2 EP93XX_GPIO_REG(0x94)
83#define EP93XX_GPIO_A_INT_ACK EP93XX_GPIO_REG(0x98)
84#define EP93XX_GPIO_A_INT_ENABLE EP93XX_GPIO_REG(0x9c)
85#define EP93XX_GPIO_A_INT_STATUS EP93XX_GPIO_REG(0xa0)
86#define EP93XX_GPIO_B_INT_TYPE1 EP93XX_GPIO_REG(0xac)
87#define EP93XX_GPIO_B_INT_TYPE2 EP93XX_GPIO_REG(0xb0)
88#define EP93XX_GPIO_B_INT_ACK EP93XX_GPIO_REG(0xb4)
89#define EP93XX_GPIO_B_INT_ENABLE EP93XX_GPIO_REG(0xb8)
90#define EP93XX_GPIO_B_INT_STATUS EP93XX_GPIO_REG(0xbc)
91
92#define EP93XX_AAC_BASE (EP93XX_APB_VIRT_BASE + 0x00080000)
93
94#define EP93XX_SPI_BASE (EP93XX_APB_VIRT_BASE + 0x000a0000)
95
96#define EP93XX_IRDA_BASE (EP93XX_APB_VIRT_BASE + 0x000b0000)
97
98#define EP93XX_UART1_BASE (EP93XX_APB_VIRT_BASE + 0x000c0000)
99#define EP93XX_UART1_PHYS_BASE (EP93XX_APB_PHYS_BASE + 0x000c0000)
100
101#define EP93XX_UART2_BASE (EP93XX_APB_VIRT_BASE + 0x000d0000)
102#define EP93XX_UART2_PHYS_BASE (EP93XX_APB_PHYS_BASE + 0x000d0000)
103
104#define EP93XX_UART3_BASE (EP93XX_APB_VIRT_BASE + 0x000e0000)
105#define EP93XX_UART3_PHYS_BASE (EP93XX_APB_PHYS_BASE + 0x000e0000)
106
107#define EP93XX_KEY_MATRIX_BASE (EP93XX_APB_VIRT_BASE + 0x000f0000)
108
109#define EP93XX_ADC_BASE (EP93XX_APB_VIRT_BASE + 0x00100000)
110#define EP93XX_TOUCHSCREEN_BASE (EP93XX_APB_VIRT_BASE + 0x00100000)
111
112#define EP93XX_PWM_BASE (EP93XX_APB_VIRT_BASE + 0x00110000)
113
114#define EP93XX_RTC_BASE (EP93XX_APB_VIRT_BASE + 0x00120000)
115
116#define EP93XX_SYSCON_BASE (EP93XX_APB_VIRT_BASE + 0x00130000)
117#define EP93XX_SYSCON_REG(x) (EP93XX_SYSCON_BASE + (x))
118#define EP93XX_SYSCON_POWER_STATE EP93XX_SYSCON_REG(0x00)
119#define EP93XX_SYSCON_CLOCK_CONTROL EP93XX_SYSCON_REG(0x04)
120#define EP93XX_SYSCON_CLOCK_UARTBAUD 0x20000000
121#define EP93XX_SYSCON_CLOCK_USH_EN 0x10000000
122#define EP93XX_SYSCON_HALT EP93XX_SYSCON_REG(0x08)
123#define EP93XX_SYSCON_STANDBY EP93XX_SYSCON_REG(0x0c)
124#define EP93XX_SYSCON_CLOCK_SET1 EP93XX_SYSCON_REG(0x20)
125#define EP93XX_SYSCON_CLOCK_SET2 EP93XX_SYSCON_REG(0x24)
126#define EP93XX_SYSCON_DEVICE_CONFIG EP93XX_SYSCON_REG(0x80)
127#define EP93XX_SYSCON_DEVICE_CONFIG_CRUNCH_ENABLE 0x00800000
128#define EP93XX_SYSCON_SWLOCK EP93XX_SYSCON_REG(0xc0)
129
130#define EP93XX_WATCHDOG_BASE (EP93XX_APB_VIRT_BASE + 0x00140000)
131
132
133#endif
diff --git a/arch/arm/mach-ep93xx/include/mach/gesbc9312.h b/arch/arm/mach-ep93xx/include/mach/gesbc9312.h
new file mode 100644
index 000000000000..21fe2b922aa5
--- /dev/null
+++ b/arch/arm/mach-ep93xx/include/mach/gesbc9312.h
@@ -0,0 +1,3 @@
1/*
2 * arch/arm/mach-ep93xx/include/mach/gesbc9312.h
3 */
diff --git a/arch/arm/mach-ep93xx/include/mach/gpio.h b/arch/arm/mach-ep93xx/include/mach/gpio.h
new file mode 100644
index 000000000000..f7020414c5df
--- /dev/null
+++ b/arch/arm/mach-ep93xx/include/mach/gpio.h
@@ -0,0 +1,128 @@
1/*
2 * arch/arm/mach-ep93xx/include/mach/gpio.h
3 */
4
5#ifndef __ASM_ARCH_GPIO_H
6#define __ASM_ARCH_GPIO_H
7
8/* GPIO port A. */
9#define EP93XX_GPIO_LINE_A(x) ((x) + 0)
10#define EP93XX_GPIO_LINE_EGPIO0 EP93XX_GPIO_LINE_A(0)
11#define EP93XX_GPIO_LINE_EGPIO1 EP93XX_GPIO_LINE_A(1)
12#define EP93XX_GPIO_LINE_EGPIO2 EP93XX_GPIO_LINE_A(2)
13#define EP93XX_GPIO_LINE_EGPIO3 EP93XX_GPIO_LINE_A(3)
14#define EP93XX_GPIO_LINE_EGPIO4 EP93XX_GPIO_LINE_A(4)
15#define EP93XX_GPIO_LINE_EGPIO5 EP93XX_GPIO_LINE_A(5)
16#define EP93XX_GPIO_LINE_EGPIO6 EP93XX_GPIO_LINE_A(6)
17#define EP93XX_GPIO_LINE_EGPIO7 EP93XX_GPIO_LINE_A(7)
18
19/* GPIO port B. */
20#define EP93XX_GPIO_LINE_B(x) ((x) + 8)
21#define EP93XX_GPIO_LINE_EGPIO8 EP93XX_GPIO_LINE_B(0)
22#define EP93XX_GPIO_LINE_EGPIO9 EP93XX_GPIO_LINE_B(1)
23#define EP93XX_GPIO_LINE_EGPIO10 EP93XX_GPIO_LINE_B(2)
24#define EP93XX_GPIO_LINE_EGPIO11 EP93XX_GPIO_LINE_B(3)
25#define EP93XX_GPIO_LINE_EGPIO12 EP93XX_GPIO_LINE_B(4)
26#define EP93XX_GPIO_LINE_EGPIO13 EP93XX_GPIO_LINE_B(5)
27#define EP93XX_GPIO_LINE_EGPIO14 EP93XX_GPIO_LINE_B(6)
28#define EP93XX_GPIO_LINE_EGPIO15 EP93XX_GPIO_LINE_B(7)
29
30/* GPIO port C. */
31#define EP93XX_GPIO_LINE_C(x) ((x) + 40)
32#define EP93XX_GPIO_LINE_ROW0 EP93XX_GPIO_LINE_C(0)
33#define EP93XX_GPIO_LINE_ROW1 EP93XX_GPIO_LINE_C(1)
34#define EP93XX_GPIO_LINE_ROW2 EP93XX_GPIO_LINE_C(2)
35#define EP93XX_GPIO_LINE_ROW3 EP93XX_GPIO_LINE_C(3)
36#define EP93XX_GPIO_LINE_ROW4 EP93XX_GPIO_LINE_C(4)
37#define EP93XX_GPIO_LINE_ROW5 EP93XX_GPIO_LINE_C(5)
38#define EP93XX_GPIO_LINE_ROW6 EP93XX_GPIO_LINE_C(6)
39#define EP93XX_GPIO_LINE_ROW7 EP93XX_GPIO_LINE_C(7)
40
41/* GPIO port D. */
42#define EP93XX_GPIO_LINE_D(x) ((x) + 24)
43#define EP93XX_GPIO_LINE_COL0 EP93XX_GPIO_LINE_D(0)
44#define EP93XX_GPIO_LINE_COL1 EP93XX_GPIO_LINE_D(1)
45#define EP93XX_GPIO_LINE_COL2 EP93XX_GPIO_LINE_D(2)
46#define EP93XX_GPIO_LINE_COL3 EP93XX_GPIO_LINE_D(3)
47#define EP93XX_GPIO_LINE_COL4 EP93XX_GPIO_LINE_D(4)
48#define EP93XX_GPIO_LINE_COL5 EP93XX_GPIO_LINE_D(5)
49#define EP93XX_GPIO_LINE_COL6 EP93XX_GPIO_LINE_D(6)
50#define EP93XX_GPIO_LINE_COL7 EP93XX_GPIO_LINE_D(7)
51
52/* GPIO port E. */
53#define EP93XX_GPIO_LINE_E(x) ((x) + 32)
54#define EP93XX_GPIO_LINE_GRLED EP93XX_GPIO_LINE_E(0)
55#define EP93XX_GPIO_LINE_RDLED EP93XX_GPIO_LINE_E(1)
56#define EP93XX_GPIO_LINE_DIORn EP93XX_GPIO_LINE_E(2)
57#define EP93XX_GPIO_LINE_IDECS1n EP93XX_GPIO_LINE_E(3)
58#define EP93XX_GPIO_LINE_IDECS2n EP93XX_GPIO_LINE_E(4)
59#define EP93XX_GPIO_LINE_IDEDA0 EP93XX_GPIO_LINE_E(5)
60#define EP93XX_GPIO_LINE_IDEDA1 EP93XX_GPIO_LINE_E(6)
61#define EP93XX_GPIO_LINE_IDEDA2 EP93XX_GPIO_LINE_E(7)
62
63/* GPIO port F. */
64#define EP93XX_GPIO_LINE_F(x) ((x) + 16)
65#define EP93XX_GPIO_LINE_WP EP93XX_GPIO_LINE_F(0)
66#define EP93XX_GPIO_LINE_MCCD1 EP93XX_GPIO_LINE_F(1)
67#define EP93XX_GPIO_LINE_MCCD2 EP93XX_GPIO_LINE_F(2)
68#define EP93XX_GPIO_LINE_MCBVD1 EP93XX_GPIO_LINE_F(3)
69#define EP93XX_GPIO_LINE_MCBVD2 EP93XX_GPIO_LINE_F(4)
70#define EP93XX_GPIO_LINE_VS1 EP93XX_GPIO_LINE_F(5)
71#define EP93XX_GPIO_LINE_READY EP93XX_GPIO_LINE_F(6)
72#define EP93XX_GPIO_LINE_VS2 EP93XX_GPIO_LINE_F(7)
73
74/* GPIO port G. */
75#define EP93XX_GPIO_LINE_G(x) ((x) + 48)
76#define EP93XX_GPIO_LINE_EECLK EP93XX_GPIO_LINE_G(0)
77#define EP93XX_GPIO_LINE_EEDAT EP93XX_GPIO_LINE_G(1)
78#define EP93XX_GPIO_LINE_SLA0 EP93XX_GPIO_LINE_G(2)
79#define EP93XX_GPIO_LINE_SLA1 EP93XX_GPIO_LINE_G(3)
80#define EP93XX_GPIO_LINE_DD12 EP93XX_GPIO_LINE_G(4)
81#define EP93XX_GPIO_LINE_DD13 EP93XX_GPIO_LINE_G(5)
82#define EP93XX_GPIO_LINE_DD14 EP93XX_GPIO_LINE_G(6)
83#define EP93XX_GPIO_LINE_DD15 EP93XX_GPIO_LINE_G(7)
84
85/* GPIO port H. */
86#define EP93XX_GPIO_LINE_H(x) ((x) + 56)
87#define EP93XX_GPIO_LINE_DD0 EP93XX_GPIO_LINE_H(0)
88#define EP93XX_GPIO_LINE_DD1 EP93XX_GPIO_LINE_H(1)
89#define EP93XX_GPIO_LINE_DD2 EP93XX_GPIO_LINE_H(2)
90#define EP93XX_GPIO_LINE_DD3 EP93XX_GPIO_LINE_H(3)
91#define EP93XX_GPIO_LINE_DD4 EP93XX_GPIO_LINE_H(4)
92#define EP93XX_GPIO_LINE_DD5 EP93XX_GPIO_LINE_H(5)
93#define EP93XX_GPIO_LINE_DD6 EP93XX_GPIO_LINE_H(6)
94#define EP93XX_GPIO_LINE_DD7 EP93XX_GPIO_LINE_H(7)
95
96/* maximum value for gpio line identifiers */
97#define EP93XX_GPIO_LINE_MAX EP93XX_GPIO_LINE_H(7)
98
99/* maximum value for irq capable line identifiers */
100#define EP93XX_GPIO_LINE_MAX_IRQ EP93XX_GPIO_LINE_F(7)
101
102/* new generic GPIO API - see Documentation/gpio.txt */
103
104#include <asm-generic/gpio.h>
105
106#define gpio_get_value __gpio_get_value
107#define gpio_set_value __gpio_set_value
108#define gpio_cansleep __gpio_cansleep
109
110/*
111 * Map GPIO A0..A7 (0..7) to irq 64..71,
112 * B0..B7 (7..15) to irq 72..79, and
113 * F0..F7 (16..24) to irq 80..87.
114 */
115static inline int gpio_to_irq(unsigned gpio)
116{
117 if (gpio <= EP93XX_GPIO_LINE_MAX_IRQ)
118 return 64 + gpio;
119
120 return -EINVAL;
121}
122
123static inline int irq_to_gpio(unsigned irq)
124{
125 return irq - gpio_to_irq(0);
126}
127
128#endif
diff --git a/arch/arm/mach-ep93xx/include/mach/hardware.h b/arch/arm/mach-ep93xx/include/mach/hardware.h
new file mode 100644
index 000000000000..529807d182bf
--- /dev/null
+++ b/arch/arm/mach-ep93xx/include/mach/hardware.h
@@ -0,0 +1,16 @@
1/*
2 * arch/arm/mach-ep93xx/include/mach/hardware.h
3 */
4#ifndef __ASM_ARCH_HARDWARE_H
5#define __ASM_ARCH_HARDWARE_H
6
7#include "ep93xx-regs.h"
8
9#define pcibios_assign_all_busses() 0
10
11#include "platform.h"
12
13#include "gesbc9312.h"
14#include "ts72xx.h"
15
16#endif
diff --git a/arch/arm/mach-ep93xx/include/mach/io.h b/arch/arm/mach-ep93xx/include/mach/io.h
new file mode 100644
index 000000000000..1ab9a90ad339
--- /dev/null
+++ b/arch/arm/mach-ep93xx/include/mach/io.h
@@ -0,0 +1,8 @@
1/*
2 * arch/arm/mach-ep93xx/include/mach/io.h
3 */
4
5#define IO_SPACE_LIMIT 0xffffffff
6
7#define __io(p) ((void __iomem *)(p))
8#define __mem_pci(p) (p)
diff --git a/arch/arm/mach-ep93xx/include/mach/irqs.h b/arch/arm/mach-ep93xx/include/mach/irqs.h
new file mode 100644
index 000000000000..ff98390bbf0f
--- /dev/null
+++ b/arch/arm/mach-ep93xx/include/mach/irqs.h
@@ -0,0 +1,78 @@
1/*
2 * arch/arm/mach-ep93xx/include/mach/irqs.h
3 */
4
5#ifndef __ASM_ARCH_IRQS_H
6#define __ASM_ARCH_IRQS_H
7
8#define IRQ_EP93XX_COMMRX 2
9#define IRQ_EP93XX_COMMTX 3
10#define IRQ_EP93XX_TIMER1 4
11#define IRQ_EP93XX_TIMER2 5
12#define IRQ_EP93XX_AACINTR 6
13#define IRQ_EP93XX_DMAM2P0 7
14#define IRQ_EP93XX_DMAM2P1 8
15#define IRQ_EP93XX_DMAM2P2 9
16#define IRQ_EP93XX_DMAM2P3 10
17#define IRQ_EP93XX_DMAM2P4 11
18#define IRQ_EP93XX_DMAM2P5 12
19#define IRQ_EP93XX_DMAM2P6 13
20#define IRQ_EP93XX_DMAM2P7 14
21#define IRQ_EP93XX_DMAM2P8 15
22#define IRQ_EP93XX_DMAM2P9 16
23#define IRQ_EP93XX_DMAM2M0 17
24#define IRQ_EP93XX_DMAM2M1 18
25#define IRQ_EP93XX_GPIO0MUX 19
26#define IRQ_EP93XX_GPIO1MUX 20
27#define IRQ_EP93XX_GPIO2MUX 21
28#define IRQ_EP93XX_GPIO3MUX 22
29#define IRQ_EP93XX_UART1RX 23
30#define IRQ_EP93XX_UART1TX 24
31#define IRQ_EP93XX_UART2RX 25
32#define IRQ_EP93XX_UART2TX 26
33#define IRQ_EP93XX_UART3RX 27
34#define IRQ_EP93XX_UART3TX 28
35#define IRQ_EP93XX_KEY 29
36#define IRQ_EP93XX_TOUCH 30
37#define EP93XX_VIC1_VALID_IRQ_MASK 0x7ffffffc
38
39#define IRQ_EP93XX_EXT0 32
40#define IRQ_EP93XX_EXT1 33
41#define IRQ_EP93XX_EXT2 34
42#define IRQ_EP93XX_64HZ 35
43#define IRQ_EP93XX_WATCHDOG 36
44#define IRQ_EP93XX_RTC 37
45#define IRQ_EP93XX_IRDA 38
46#define IRQ_EP93XX_ETHERNET 39
47#define IRQ_EP93XX_EXT3 40
48#define IRQ_EP93XX_PROG 41
49#define IRQ_EP93XX_1HZ 42
50#define IRQ_EP93XX_VSYNC 43
51#define IRQ_EP93XX_VIDEO_FIFO 44
52#define IRQ_EP93XX_SSP1RX 45
53#define IRQ_EP93XX_SSP1TX 46
54#define IRQ_EP93XX_GPIO4MUX 47
55#define IRQ_EP93XX_GPIO5MUX 48
56#define IRQ_EP93XX_GPIO6MUX 49
57#define IRQ_EP93XX_GPIO7MUX 50
58#define IRQ_EP93XX_TIMER3 51
59#define IRQ_EP93XX_UART1 52
60#define IRQ_EP93XX_SSP 53
61#define IRQ_EP93XX_UART2 54
62#define IRQ_EP93XX_UART3 55
63#define IRQ_EP93XX_USB 56
64#define IRQ_EP93XX_ETHERNET_PME 57
65#define IRQ_EP93XX_DSP 58
66#define IRQ_EP93XX_GPIO_AB 59
67#define IRQ_EP93XX_SAI 60
68#define EP93XX_VIC2_VALID_IRQ_MASK 0x1fffffff
69
70#define NR_EP93XX_IRQS (64 + 24)
71
72#define EP93XX_BOARD_IRQ(x) (NR_EP93XX_IRQS + (x))
73#define EP93XX_BOARD_IRQS 32
74
75#define NR_IRQS (NR_EP93XX_IRQS + EP93XX_BOARD_IRQS)
76
77
78#endif
diff --git a/arch/arm/mach-ep93xx/include/mach/memory.h b/arch/arm/mach-ep93xx/include/mach/memory.h
new file mode 100644
index 000000000000..f1b633590752
--- /dev/null
+++ b/arch/arm/mach-ep93xx/include/mach/memory.h
@@ -0,0 +1,14 @@
1/*
2 * arch/arm/mach-ep93xx/include/mach/memory.h
3 */
4
5#ifndef __ASM_ARCH_MEMORY_H
6#define __ASM_ARCH_MEMORY_H
7
8#define PHYS_OFFSET UL(0x00000000)
9
10#define __bus_to_virt(x) __phys_to_virt(x)
11#define __virt_to_bus(x) __virt_to_phys(x)
12
13
14#endif
diff --git a/arch/arm/mach-ep93xx/include/mach/platform.h b/arch/arm/mach-ep93xx/include/mach/platform.h
new file mode 100644
index 000000000000..b5c182473f5d
--- /dev/null
+++ b/arch/arm/mach-ep93xx/include/mach/platform.h
@@ -0,0 +1,20 @@
1/*
2 * arch/arm/mach-ep93xx/include/mach/platform.h
3 */
4
5#ifndef __ASSEMBLY__
6
7void ep93xx_map_io(void);
8void ep93xx_init_irq(void);
9void ep93xx_init_time(unsigned long);
10void ep93xx_init_devices(void);
11extern struct sys_timer ep93xx_timer;
12
13struct ep93xx_eth_data
14{
15 unsigned char dev_addr[6];
16 unsigned char phy_id;
17};
18
19
20#endif
diff --git a/arch/arm/mach-ep93xx/include/mach/system.h b/arch/arm/mach-ep93xx/include/mach/system.h
new file mode 100644
index 000000000000..67789d0f329e
--- /dev/null
+++ b/arch/arm/mach-ep93xx/include/mach/system.h
@@ -0,0 +1,26 @@
1/*
2 * arch/arm/mach-ep93xx/include/mach/system.h
3 */
4
5#include <mach/hardware.h>
6
7static inline void arch_idle(void)
8{
9 cpu_do_idle();
10}
11
12static inline void arch_reset(char mode)
13{
14 u32 devicecfg;
15
16 local_irq_disable();
17
18 devicecfg = __raw_readl(EP93XX_SYSCON_DEVICE_CONFIG);
19 __raw_writel(0xaa, EP93XX_SYSCON_SWLOCK);
20 __raw_writel(devicecfg | 0x80000000, EP93XX_SYSCON_DEVICE_CONFIG);
21 __raw_writel(0xaa, EP93XX_SYSCON_SWLOCK);
22 __raw_writel(devicecfg & ~0x80000000, EP93XX_SYSCON_DEVICE_CONFIG);
23
24 while (1)
25 ;
26}
diff --git a/arch/arm/mach-ep93xx/include/mach/timex.h b/arch/arm/mach-ep93xx/include/mach/timex.h
new file mode 100644
index 000000000000..6b3503b01fa6
--- /dev/null
+++ b/arch/arm/mach-ep93xx/include/mach/timex.h
@@ -0,0 +1,5 @@
1/*
2 * arch/arm/mach-ep93xx/include/mach/timex.h
3 */
4
5#define CLOCK_TICK_RATE 983040
diff --git a/arch/arm/mach-ep93xx/include/mach/ts72xx.h b/arch/arm/mach-ep93xx/include/mach/ts72xx.h
new file mode 100644
index 000000000000..30b318aa1a1f
--- /dev/null
+++ b/arch/arm/mach-ep93xx/include/mach/ts72xx.h
@@ -0,0 +1,101 @@
1/*
2 * arch/arm/mach-ep93xx/include/mach/ts72xx.h
3 */
4
5/*
6 * TS72xx memory map:
7 *
8 * virt phys size
9 * febff000 22000000 4K model number register
10 * febfe000 22400000 4K options register
11 * febfd000 22800000 4K options register #2
12 * febfc000 [67]0000000 4K NAND data register
13 * febfb000 [67]0400000 4K NAND control register
14 * febfa000 [67]0800000 4K NAND busy register
15 * febf9000 10800000 4K TS-5620 RTC index register
16 * febf8000 11700000 4K TS-5620 RTC data register
17 */
18
19#define TS72XX_MODEL_PHYS_BASE 0x22000000
20#define TS72XX_MODEL_VIRT_BASE 0xfebff000
21#define TS72XX_MODEL_SIZE 0x00001000
22
23#define TS72XX_MODEL_TS7200 0x00
24#define TS72XX_MODEL_TS7250 0x01
25#define TS72XX_MODEL_TS7260 0x02
26
27
28#define TS72XX_OPTIONS_PHYS_BASE 0x22400000
29#define TS72XX_OPTIONS_VIRT_BASE 0xfebfe000
30#define TS72XX_OPTIONS_SIZE 0x00001000
31
32#define TS72XX_OPTIONS_COM2_RS485 0x02
33#define TS72XX_OPTIONS_MAX197 0x01
34
35
36#define TS72XX_OPTIONS2_PHYS_BASE 0x22800000
37#define TS72XX_OPTIONS2_VIRT_BASE 0xfebfd000
38#define TS72XX_OPTIONS2_SIZE 0x00001000
39
40#define TS72XX_OPTIONS2_TS9420 0x04
41#define TS72XX_OPTIONS2_TS9420_BOOT 0x02
42
43
44#define TS72XX_NOR_PHYS_BASE 0x60000000
45#define TS72XX_NOR2_PHYS_BASE 0x62000000
46
47#define TS72XX_NAND1_DATA_PHYS_BASE 0x60000000
48#define TS72XX_NAND2_DATA_PHYS_BASE 0x70000000
49#define TS72XX_NAND_DATA_VIRT_BASE 0xfebfc000
50#define TS72XX_NAND_DATA_SIZE 0x00001000
51
52#define TS72XX_NAND1_CONTROL_PHYS_BASE 0x60400000
53#define TS72XX_NAND2_CONTROL_PHYS_BASE 0x70400000
54#define TS72XX_NAND_CONTROL_VIRT_BASE 0xfebfb000
55#define TS72XX_NAND_CONTROL_SIZE 0x00001000
56
57#define TS72XX_NAND1_BUSY_PHYS_BASE 0x60800000
58#define TS72XX_NAND2_BUSY_PHYS_BASE 0x70800000
59#define TS72XX_NAND_BUSY_VIRT_BASE 0xfebfa000
60#define TS72XX_NAND_BUSY_SIZE 0x00001000
61
62
63#define TS72XX_RTC_INDEX_VIRT_BASE 0xfebf9000
64#define TS72XX_RTC_INDEX_PHYS_BASE 0x10800000
65#define TS72XX_RTC_INDEX_SIZE 0x00001000
66
67#define TS72XX_RTC_DATA_VIRT_BASE 0xfebf8000
68#define TS72XX_RTC_DATA_PHYS_BASE 0x11700000
69#define TS72XX_RTC_DATA_SIZE 0x00001000
70
71
72#ifndef __ASSEMBLY__
73#include <asm/io.h>
74
75static inline int board_is_ts7200(void)
76{
77 return __raw_readb(TS72XX_MODEL_VIRT_BASE) == TS72XX_MODEL_TS7200;
78}
79
80static inline int board_is_ts7250(void)
81{
82 return __raw_readb(TS72XX_MODEL_VIRT_BASE) == TS72XX_MODEL_TS7250;
83}
84
85static inline int board_is_ts7260(void)
86{
87 return __raw_readb(TS72XX_MODEL_VIRT_BASE) == TS72XX_MODEL_TS7260;
88}
89
90static inline int is_max197_installed(void)
91{
92 return !!(__raw_readb(TS72XX_OPTIONS_VIRT_BASE) &
93 TS72XX_OPTIONS_MAX197);
94}
95
96static inline int is_ts9420_installed(void)
97{
98 return !!(__raw_readb(TS72XX_OPTIONS2_VIRT_BASE) &
99 TS72XX_OPTIONS2_TS9420);
100}
101#endif
diff --git a/arch/arm/mach-ep93xx/include/mach/uncompress.h b/arch/arm/mach-ep93xx/include/mach/uncompress.h
new file mode 100644
index 000000000000..1fd2f17de325
--- /dev/null
+++ b/arch/arm/mach-ep93xx/include/mach/uncompress.h
@@ -0,0 +1,85 @@
1/*
2 * arch/arm/mach-ep93xx/include/mach/uncompress.h
3 *
4 * Copyright (C) 2006 Lennert Buytenhek <buytenh@wantstofly.org>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or (at
9 * your option) any later version.
10 */
11
12#include <mach/ep93xx-regs.h>
13
14static unsigned char __raw_readb(unsigned int ptr)
15{
16 return *((volatile unsigned char *)ptr);
17}
18
19static unsigned int __raw_readl(unsigned int ptr)
20{
21 return *((volatile unsigned int *)ptr);
22}
23
24static void __raw_writeb(unsigned char value, unsigned int ptr)
25{
26 *((volatile unsigned char *)ptr) = value;
27}
28
29static void __raw_writel(unsigned int value, unsigned int ptr)
30{
31 *((volatile unsigned int *)ptr) = value;
32}
33
34
35#define PHYS_UART1_DATA 0x808c0000
36#define PHYS_UART1_FLAG 0x808c0018
37#define UART1_FLAG_TXFF 0x20
38
39static inline void putc(int c)
40{
41 int i;
42
43 for (i = 0; i < 1000; i++) {
44 /* Transmit fifo not full? */
45 if (!(__raw_readb(PHYS_UART1_FLAG) & UART1_FLAG_TXFF))
46 break;
47 }
48
49 __raw_writeb(c, PHYS_UART1_DATA);
50}
51
52static inline void flush(void)
53{
54}
55
56
57/*
58 * Some bootloaders don't turn off DMA from the ethernet MAC before
59 * jumping to linux, which means that we might end up with bits of RX
60 * status and packet data scribbled over the uncompressed kernel image.
61 * Work around this by resetting the ethernet MAC before we uncompress.
62 */
63#define PHYS_ETH_SELF_CTL 0x80010020
64#define ETH_SELF_CTL_RESET 0x00000001
65
66static void ethernet_reset(void)
67{
68 unsigned int v;
69
70 /* Reset the ethernet MAC. */
71 v = __raw_readl(PHYS_ETH_SELF_CTL);
72 __raw_writel(v | ETH_SELF_CTL_RESET, PHYS_ETH_SELF_CTL);
73
74 /* Wait for reset to finish. */
75 while (__raw_readl(PHYS_ETH_SELF_CTL) & ETH_SELF_CTL_RESET)
76 ;
77}
78
79
80static void arch_decomp_setup(void)
81{
82 ethernet_reset();
83}
84
85#define arch_decomp_wdog()
diff --git a/arch/arm/mach-ep93xx/include/mach/vmalloc.h b/arch/arm/mach-ep93xx/include/mach/vmalloc.h
new file mode 100644
index 000000000000..aed21cd3fe2d
--- /dev/null
+++ b/arch/arm/mach-ep93xx/include/mach/vmalloc.h
@@ -0,0 +1,5 @@
1/*
2 * arch/arm/mach-ep93xx/include/mach/vmalloc.h
3 */
4
5#define VMALLOC_END 0xfe800000
diff --git a/arch/arm/mach-ep93xx/micro9.c b/arch/arm/mach-ep93xx/micro9.c
index f28c1294cae1..de047a5c8112 100644
--- a/arch/arm/mach-ep93xx/micro9.c
+++ b/arch/arm/mach-ep93xx/micro9.c
@@ -20,7 +20,7 @@
20#include <linux/mtd/physmap.h> 20#include <linux/mtd/physmap.h>
21 21
22#include <asm/io.h> 22#include <asm/io.h>
23#include <asm/hardware.h> 23#include <mach/hardware.h>
24 24
25#include <asm/mach/arch.h> 25#include <asm/mach/arch.h>
26#include <asm/mach-types.h> 26#include <asm/mach-types.h>
diff --git a/arch/arm/mach-ep93xx/ts72xx.c b/arch/arm/mach-ep93xx/ts72xx.c
index 3a4bf90ba832..c3cbff126d0c 100644
--- a/arch/arm/mach-ep93xx/ts72xx.c
+++ b/arch/arm/mach-ep93xx/ts72xx.c
@@ -20,7 +20,7 @@
20#include <linux/platform_device.h> 20#include <linux/platform_device.h>
21#include <linux/m48t86.h> 21#include <linux/m48t86.h>
22#include <asm/io.h> 22#include <asm/io.h>
23#include <asm/hardware.h> 23#include <mach/hardware.h>
24#include <asm/mach-types.h> 24#include <asm/mach-types.h>
25#include <asm/mach/arch.h> 25#include <asm/mach/arch.h>
26#include <asm/mach/map.h> 26#include <asm/mach/map.h>
diff --git a/arch/arm/mach-footbridge/ebsa285-leds.c b/arch/arm/mach-footbridge/ebsa285-leds.c
index 09c1fbc51876..4e10090cd87f 100644
--- a/arch/arm/mach-footbridge/ebsa285-leds.c
+++ b/arch/arm/mach-footbridge/ebsa285-leds.c
@@ -21,7 +21,7 @@
21#include <linux/init.h> 21#include <linux/init.h>
22#include <linux/spinlock.h> 22#include <linux/spinlock.h>
23 23
24#include <asm/hardware.h> 24#include <mach/hardware.h>
25#include <asm/leds.h> 25#include <asm/leds.h>
26#include <asm/mach-types.h> 26#include <asm/mach-types.h>
27#include <asm/system.h> 27#include <asm/system.h>
diff --git a/arch/arm/mach-footbridge/include/mach/debug-macro.S b/arch/arm/mach-footbridge/include/mach/debug-macro.S
new file mode 100644
index 000000000000..4329b8123570
--- /dev/null
+++ b/arch/arm/mach-footbridge/include/mach/debug-macro.S
@@ -0,0 +1,57 @@
1/* arch/arm/mach-footbridge/include/mach/debug-macro.S
2 *
3 * Debugging macro include header
4 *
5 * Copyright (C) 1994-1999 Russell King
6 * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 *
12*/
13
14#include <asm/hardware/dec21285.h>
15
16#ifndef CONFIG_DEBUG_DC21285_PORT
17 /* For NetWinder debugging */
18 .macro addruart,rx
19 mrc p15, 0, \rx, c1, c0
20 tst \rx, #1 @ MMU enabled?
21 moveq \rx, #0x7c000000 @ physical
22 movne \rx, #0xff000000 @ virtual
23 orr \rx, \rx, #0x000003f8
24 .endm
25
26#define UART_SHIFT 0
27#define FLOW_CONTROL
28#include <asm/hardware/debug-8250.S>
29
30#else
31 /* For EBSA285 debugging */
32 .equ dc21285_high, ARMCSR_BASE & 0xff000000
33 .equ dc21285_low, ARMCSR_BASE & 0x00ffffff
34
35 .macro addruart,rx
36 mrc p15, 0, \rx, c1, c0
37 tst \rx, #1 @ MMU enabled?
38 moveq \rx, #0x42000000
39 movne \rx, #dc21285_high
40 .if dc21285_low
41 orrne \rx, \rx, #dc21285_low
42 .endif
43 .endm
44
45 .macro senduart,rd,rx
46 str \rd, [\rx, #0x160] @ UARTDR
47 .endm
48
49 .macro busyuart,rd,rx
501001: ldr \rd, [\rx, #0x178] @ UARTFLG
51 tst \rd, #1 << 3
52 bne 1001b
53 .endm
54
55 .macro waituart,rd,rx
56 .endm
57#endif
diff --git a/arch/arm/mach-footbridge/include/mach/dma.h b/arch/arm/mach-footbridge/include/mach/dma.h
new file mode 100644
index 000000000000..62afd213effb
--- /dev/null
+++ b/arch/arm/mach-footbridge/include/mach/dma.h
@@ -0,0 +1,25 @@
1/*
2 * arch/arm/mach-footbridge/include/mach/dma.h
3 *
4 * Architecture DMA routines
5 *
6 * Copyright (C) 1998,1999 Russell King
7 * Copyright (C) 1998,1999 Philip Blundell
8 */
9#ifndef __ASM_ARCH_DMA_H
10#define __ASM_ARCH_DMA_H
11
12/*
13 * The 21285 has two internal DMA channels; we call these 8 and 9.
14 * On CATS hardware we have an additional eight ISA dma channels
15 * numbered 0..7.
16 */
17#define _ISA_DMA(x) (0+(x))
18#define _DC21285_DMA(x) (8+(x))
19
20#define MAX_DMA_CHANNELS 10
21
22#define DMA_FLOPPY _ISA_DMA(2)
23#define DMA_ISA_CASCADE _ISA_DMA(4)
24
25#endif /* _ASM_ARCH_DMA_H */
diff --git a/arch/arm/mach-footbridge/include/mach/entry-macro.S b/arch/arm/mach-footbridge/include/mach/entry-macro.S
new file mode 100644
index 000000000000..d3847be0c667
--- /dev/null
+++ b/arch/arm/mach-footbridge/include/mach/entry-macro.S
@@ -0,0 +1,113 @@
1/*
2 * arch/arm/mach-footbridge/include/mach/entry-macro.S
3 *
4 * Low-level IRQ helper macros for footbridge-based platforms
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10#include <mach/hardware.h>
11#include <mach/irqs.h>
12#include <asm/hardware/dec21285.h>
13
14 .equ dc21285_high, ARMCSR_BASE & 0xff000000
15 .equ dc21285_low, ARMCSR_BASE & 0x00ffffff
16
17 .macro disable_fiq
18 .endm
19
20 .macro get_irqnr_preamble, base, tmp
21 mov \base, #dc21285_high
22 .if dc21285_low
23 orr \base, \base, #dc21285_low
24 .endif
25 .endm
26
27 .macro arch_ret_to_user, tmp1, tmp2
28 .endm
29
30 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
31 ldr \irqstat, [\base, #0x180] @ get interrupts
32
33 mov \irqnr, #IRQ_SDRAMPARITY
34 tst \irqstat, #IRQ_MASK_SDRAMPARITY
35 bne 1001f
36
37 tst \irqstat, #IRQ_MASK_UART_RX
38 movne \irqnr, #IRQ_CONRX
39 bne 1001f
40
41 tst \irqstat, #IRQ_MASK_DMA1
42 movne \irqnr, #IRQ_DMA1
43 bne 1001f
44
45 tst \irqstat, #IRQ_MASK_DMA2
46 movne \irqnr, #IRQ_DMA2
47 bne 1001f
48
49 tst \irqstat, #IRQ_MASK_IN0
50 movne \irqnr, #IRQ_IN0
51 bne 1001f
52
53 tst \irqstat, #IRQ_MASK_IN1
54 movne \irqnr, #IRQ_IN1
55 bne 1001f
56
57 tst \irqstat, #IRQ_MASK_IN2
58 movne \irqnr, #IRQ_IN2
59 bne 1001f
60
61 tst \irqstat, #IRQ_MASK_IN3
62 movne \irqnr, #IRQ_IN3
63 bne 1001f
64
65 tst \irqstat, #IRQ_MASK_PCI
66 movne \irqnr, #IRQ_PCI
67 bne 1001f
68
69 tst \irqstat, #IRQ_MASK_DOORBELLHOST
70 movne \irqnr, #IRQ_DOORBELLHOST
71 bne 1001f
72
73 tst \irqstat, #IRQ_MASK_I2OINPOST
74 movne \irqnr, #IRQ_I2OINPOST
75 bne 1001f
76
77 tst \irqstat, #IRQ_MASK_TIMER1
78 movne \irqnr, #IRQ_TIMER1
79 bne 1001f
80
81 tst \irqstat, #IRQ_MASK_TIMER2
82 movne \irqnr, #IRQ_TIMER2
83 bne 1001f
84
85 tst \irqstat, #IRQ_MASK_TIMER3
86 movne \irqnr, #IRQ_TIMER3
87 bne 1001f
88
89 tst \irqstat, #IRQ_MASK_UART_TX
90 movne \irqnr, #IRQ_CONTX
91 bne 1001f
92
93 tst \irqstat, #IRQ_MASK_PCI_ABORT
94 movne \irqnr, #IRQ_PCI_ABORT
95 bne 1001f
96
97 tst \irqstat, #IRQ_MASK_PCI_SERR
98 movne \irqnr, #IRQ_PCI_SERR
99 bne 1001f
100
101 tst \irqstat, #IRQ_MASK_DISCARD_TIMER
102 movne \irqnr, #IRQ_DISCARD_TIMER
103 bne 1001f
104
105 tst \irqstat, #IRQ_MASK_PCI_DPERR
106 movne \irqnr, #IRQ_PCI_DPERR
107 bne 1001f
108
109 tst \irqstat, #IRQ_MASK_PCI_PERR
110 movne \irqnr, #IRQ_PCI_PERR
1111001:
112 .endm
113
diff --git a/arch/arm/mach-footbridge/include/mach/hardware.h b/arch/arm/mach-footbridge/include/mach/hardware.h
new file mode 100644
index 000000000000..ffaea90486f9
--- /dev/null
+++ b/arch/arm/mach-footbridge/include/mach/hardware.h
@@ -0,0 +1,105 @@
1/*
2 * arch/arm/mach-footbridge/include/mach/hardware.h
3 *
4 * Copyright (C) 1998-1999 Russell King.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * This file contains the hardware definitions of the EBSA-285.
11 */
12#ifndef __ASM_ARCH_HARDWARE_H
13#define __ASM_ARCH_HARDWARE_H
14
15#include <mach/memory.h>
16
17/* Virtual Physical Size
18 * 0xff800000 0x40000000 1MB X-Bus
19 * 0xff000000 0x7c000000 1MB PCI I/O space
20 * 0xfe000000 0x42000000 1MB CSR
21 * 0xfd000000 0x78000000 1MB Outbound write flush (not supported)
22 * 0xfc000000 0x79000000 1MB PCI IACK/special space
23 * 0xfb000000 0x7a000000 16MB PCI Config type 1
24 * 0xfa000000 0x7b000000 16MB PCI Config type 0
25 * 0xf9000000 0x50000000 1MB Cache flush
26 * 0xf0000000 0x80000000 16MB ISA memory
27 */
28#define XBUS_SIZE 0x00100000
29#define XBUS_BASE 0xff800000
30
31#define PCIO_SIZE 0x00100000
32#define PCIO_BASE 0xff000000
33
34#define ARMCSR_SIZE 0x00100000
35#define ARMCSR_BASE 0xfe000000
36
37#define WFLUSH_SIZE 0x00100000
38#define WFLUSH_BASE 0xfd000000
39
40#define PCIIACK_SIZE 0x00100000
41#define PCIIACK_BASE 0xfc000000
42
43#define PCICFG1_SIZE 0x01000000
44#define PCICFG1_BASE 0xfb000000
45
46#define PCICFG0_SIZE 0x01000000
47#define PCICFG0_BASE 0xfa000000
48
49#define PCIMEM_SIZE 0x01000000
50#define PCIMEM_BASE 0xf0000000
51
52#define XBUS_LEDS ((volatile unsigned char *)(XBUS_BASE + 0x12000))
53#define XBUS_LED_AMBER (1 << 0)
54#define XBUS_LED_GREEN (1 << 1)
55#define XBUS_LED_RED (1 << 2)
56#define XBUS_LED_TOGGLE (1 << 8)
57
58#define XBUS_SWITCH ((volatile unsigned char *)(XBUS_BASE + 0x12000))
59#define XBUS_SWITCH_SWITCH ((*XBUS_SWITCH) & 15)
60#define XBUS_SWITCH_J17_13 ((*XBUS_SWITCH) & (1 << 4))
61#define XBUS_SWITCH_J17_11 ((*XBUS_SWITCH) & (1 << 5))
62#define XBUS_SWITCH_J17_9 ((*XBUS_SWITCH) & (1 << 6))
63
64#define UNCACHEABLE_ADDR (ARMCSR_BASE + 0x108)
65
66
67/* PIC irq control */
68#define PIC_LO 0x20
69#define PIC_MASK_LO 0x21
70#define PIC_HI 0xA0
71#define PIC_MASK_HI 0xA1
72
73/* GPIO pins */
74#define GPIO_CCLK 0x800
75#define GPIO_DSCLK 0x400
76#define GPIO_E2CLK 0x200
77#define GPIO_IOLOAD 0x100
78#define GPIO_RED_LED 0x080
79#define GPIO_WDTIMER 0x040
80#define GPIO_DATA 0x020
81#define GPIO_IOCLK 0x010
82#define GPIO_DONE 0x008
83#define GPIO_FAN 0x004
84#define GPIO_GREEN_LED 0x002
85#define GPIO_RESET 0x001
86
87/* CPLD pins */
88#define CPLD_DS_ENABLE 8
89#define CPLD_7111_DISABLE 4
90#define CPLD_UNMUTE 2
91#define CPLD_FLASH_WR_ENABLE 1
92
93#ifndef __ASSEMBLY__
94extern void gpio_modify_op(int mask, int set);
95extern void gpio_modify_io(int mask, int in);
96extern int gpio_read(void);
97extern void cpld_modify(int mask, int set);
98#endif
99
100#define pcibios_assign_all_busses() 1
101
102#define PCIBIOS_MIN_IO 0x1000
103#define PCIBIOS_MIN_MEM 0x81000000
104
105#endif
diff --git a/arch/arm/mach-footbridge/include/mach/io.h b/arch/arm/mach-footbridge/include/mach/io.h
new file mode 100644
index 000000000000..a7b066239996
--- /dev/null
+++ b/arch/arm/mach-footbridge/include/mach/io.h
@@ -0,0 +1,39 @@
1/*
2 * arch/arm/mach-footbridge/include/mach/io.h
3 *
4 * Copyright (C) 1997-1999 Russell King
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * Modifications:
11 * 06-12-1997 RMK Created.
12 * 07-04-1999 RMK Major cleanup
13 */
14#ifndef __ASM_ARM_ARCH_IO_H
15#define __ASM_ARM_ARCH_IO_H
16
17#include <mach/hardware.h>
18
19#define IO_SPACE_LIMIT 0xffff
20
21/*
22 * Translation of various region addresses to virtual addresses
23 */
24#define __io(a) ((void __iomem *)(PCIO_BASE + (a)))
25#if 1
26#define __mem_pci(a) (a)
27#else
28
29static inline void __iomem *___mem_pci(void __iomem *p)
30{
31 unsigned long a = (unsigned long)p;
32 BUG_ON(a <= 0xc0000000 || a >= 0xe0000000);
33 return p;
34}
35
36#define __mem_pci(a) ___mem_pci(a)
37#endif
38
39#endif
diff --git a/arch/arm/mach-footbridge/include/mach/irqs.h b/arch/arm/mach-footbridge/include/mach/irqs.h
new file mode 100644
index 000000000000..400551e43e4e
--- /dev/null
+++ b/arch/arm/mach-footbridge/include/mach/irqs.h
@@ -0,0 +1,98 @@
1/*
2 * arch/arm/mach-footbridge/include/mach/irqs.h
3 *
4 * Copyright (C) 1998 Russell King
5 * Copyright (C) 1998 Phil Blundell
6 *
7 * Changelog:
8 * 20-Jan-1998 RMK Started merge of EBSA286, CATS and NetWinder
9 * 01-Feb-1999 PJB ISA IRQs start at 0 not 16
10 */
11#include <asm/mach-types.h>
12
13#define NR_IRQS 36
14#define NR_DC21285_IRQS 16
15
16#define _ISA_IRQ(x) (0 + (x))
17#define _ISA_INR(x) ((x) - 0)
18#define _DC21285_IRQ(x) (16 + (x))
19#define _DC21285_INR(x) ((x) - 16)
20
21/*
22 * This is a list of all interrupts that the 21285
23 * can generate and we handle.
24 */
25#define IRQ_CONRX _DC21285_IRQ(0)
26#define IRQ_CONTX _DC21285_IRQ(1)
27#define IRQ_TIMER1 _DC21285_IRQ(2)
28#define IRQ_TIMER2 _DC21285_IRQ(3)
29#define IRQ_TIMER3 _DC21285_IRQ(4)
30#define IRQ_IN0 _DC21285_IRQ(5)
31#define IRQ_IN1 _DC21285_IRQ(6)
32#define IRQ_IN2 _DC21285_IRQ(7)
33#define IRQ_IN3 _DC21285_IRQ(8)
34#define IRQ_DOORBELLHOST _DC21285_IRQ(9)
35#define IRQ_DMA1 _DC21285_IRQ(10)
36#define IRQ_DMA2 _DC21285_IRQ(11)
37#define IRQ_PCI _DC21285_IRQ(12)
38#define IRQ_SDRAMPARITY _DC21285_IRQ(13)
39#define IRQ_I2OINPOST _DC21285_IRQ(14)
40#define IRQ_PCI_ABORT _DC21285_IRQ(15)
41#define IRQ_PCI_SERR _DC21285_IRQ(16)
42#define IRQ_DISCARD_TIMER _DC21285_IRQ(17)
43#define IRQ_PCI_DPERR _DC21285_IRQ(18)
44#define IRQ_PCI_PERR _DC21285_IRQ(19)
45
46#define IRQ_ISA_TIMER _ISA_IRQ(0)
47#define IRQ_ISA_KEYBOARD _ISA_IRQ(1)
48#define IRQ_ISA_CASCADE _ISA_IRQ(2)
49#define IRQ_ISA_UART2 _ISA_IRQ(3)
50#define IRQ_ISA_UART _ISA_IRQ(4)
51#define IRQ_ISA_FLOPPY _ISA_IRQ(6)
52#define IRQ_ISA_PRINTER _ISA_IRQ(7)
53#define IRQ_ISA_RTC_ALARM _ISA_IRQ(8)
54#define IRQ_ISA_2 _ISA_IRQ(9)
55#define IRQ_ISA_PS2MOUSE _ISA_IRQ(12)
56#define IRQ_ISA_HARDDISK1 _ISA_IRQ(14)
57#define IRQ_ISA_HARDDISK2 _ISA_IRQ(15)
58
59#define IRQ_MASK_UART_RX (1 << 2)
60#define IRQ_MASK_UART_TX (1 << 3)
61#define IRQ_MASK_TIMER1 (1 << 4)
62#define IRQ_MASK_TIMER2 (1 << 5)
63#define IRQ_MASK_TIMER3 (1 << 6)
64#define IRQ_MASK_IN0 (1 << 8)
65#define IRQ_MASK_IN1 (1 << 9)
66#define IRQ_MASK_IN2 (1 << 10)
67#define IRQ_MASK_IN3 (1 << 11)
68#define IRQ_MASK_DOORBELLHOST (1 << 15)
69#define IRQ_MASK_DMA1 (1 << 16)
70#define IRQ_MASK_DMA2 (1 << 17)
71#define IRQ_MASK_PCI (1 << 18)
72#define IRQ_MASK_SDRAMPARITY (1 << 24)
73#define IRQ_MASK_I2OINPOST (1 << 25)
74#define IRQ_MASK_PCI_ABORT ((1 << 29) | (1 << 30))
75#define IRQ_MASK_PCI_SERR (1 << 23)
76#define IRQ_MASK_DISCARD_TIMER (1 << 27)
77#define IRQ_MASK_PCI_DPERR (1 << 28)
78#define IRQ_MASK_PCI_PERR (1 << 31)
79
80/*
81 * Netwinder interrupt allocations
82 */
83#define IRQ_NETWINDER_ETHER10 IRQ_IN0
84#define IRQ_NETWINDER_ETHER100 IRQ_IN1
85#define IRQ_NETWINDER_VIDCOMP IRQ_IN2
86#define IRQ_NETWINDER_PS2MOUSE _ISA_IRQ(5)
87#define IRQ_NETWINDER_IR _ISA_IRQ(6)
88#define IRQ_NETWINDER_BUTTON _ISA_IRQ(10)
89#define IRQ_NETWINDER_VGA _ISA_IRQ(11)
90#define IRQ_NETWINDER_SOUND _ISA_IRQ(12)
91
92#undef RTC_IRQ
93#define RTC_IRQ IRQ_ISA_RTC_ALARM
94#define I8042_KBD_IRQ IRQ_ISA_KEYBOARD
95#define I8042_AUX_IRQ (machine_is_netwinder() ? IRQ_NETWINDER_PS2MOUSE : IRQ_ISA_PS2MOUSE)
96#define IRQ_FLOPPYDISK IRQ_ISA_FLOPPY
97
98#define irq_canonicalize(_i) (((_i) == IRQ_ISA_CASCADE) ? IRQ_ISA_2 : _i)
diff --git a/arch/arm/mach-footbridge/include/mach/memory.h b/arch/arm/mach-footbridge/include/mach/memory.h
new file mode 100644
index 000000000000..e9cae99dd1f9
--- /dev/null
+++ b/arch/arm/mach-footbridge/include/mach/memory.h
@@ -0,0 +1,67 @@
1/*
2 * arch/arm/mach-footbridge/include/mach/memory.h
3 *
4 * Copyright (C) 1996-1999 Russell King.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * Changelog:
11 * 20-Oct-1996 RMK Created
12 * 31-Dec-1997 RMK Fixed definitions to reduce warnings.
13 * 17-May-1998 DAG Added __virt_to_bus and __bus_to_virt functions.
14 * 21-Nov-1998 RMK Changed __virt_to_bus and __bus_to_virt to macros.
15 * 21-Mar-1999 RMK Added PAGE_OFFSET for co285 architecture.
16 * Renamed to memory.h
17 * Moved PAGE_OFFSET and TASK_SIZE here
18 */
19#ifndef __ASM_ARCH_MEMORY_H
20#define __ASM_ARCH_MEMORY_H
21
22
23#if defined(CONFIG_FOOTBRIDGE_ADDIN)
24/*
25 * If we may be using add-in footbridge mode, then we must
26 * use the out-of-line translation that makes use of the
27 * PCI BAR
28 */
29#ifndef __ASSEMBLY__
30extern unsigned long __virt_to_bus(unsigned long);
31extern unsigned long __bus_to_virt(unsigned long);
32#endif
33
34#elif defined(CONFIG_FOOTBRIDGE_HOST)
35
36#define __virt_to_bus(x) ((x) - 0xe0000000)
37#define __bus_to_virt(x) ((x) + 0xe0000000)
38
39#else
40
41#error "Undefined footbridge mode"
42
43#endif
44
45/* Task size and page offset at 3GB */
46#define TASK_SIZE UL(0xbf000000)
47#define PAGE_OFFSET UL(0xc0000000)
48
49/*
50 * Cache flushing area.
51 */
52#define FLUSH_BASE 0xf9000000
53
54/*
55 * Physical DRAM offset.
56 */
57#define PHYS_OFFSET UL(0x00000000)
58
59/*
60 * This decides where the kernel will search for a free chunk of vm
61 * space during mmap's.
62 */
63#define TASK_UNMAPPED_BASE ((TASK_SIZE + 0x01000000) / 3)
64
65#define FLUSH_BASE_PHYS 0x50000000
66
67#endif
diff --git a/arch/arm/mach-footbridge/include/mach/system.h b/arch/arm/mach-footbridge/include/mach/system.h
new file mode 100644
index 000000000000..01c9f407f498
--- /dev/null
+++ b/arch/arm/mach-footbridge/include/mach/system.h
@@ -0,0 +1,69 @@
1/*
2 * arch/arm/mach-footbridge/include/mach/system.h
3 *
4 * Copyright (C) 1996-1999 Russell King.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10#include <asm/hardware/dec21285.h>
11#include <asm/io.h>
12#include <mach/hardware.h>
13#include <asm/leds.h>
14#include <asm/mach-types.h>
15
16static inline void arch_idle(void)
17{
18 cpu_do_idle();
19}
20
21static inline void arch_reset(char mode)
22{
23 if (mode == 's') {
24 /*
25 * Jump into the ROM
26 */
27 cpu_reset(0x41000000);
28 } else {
29 if (machine_is_netwinder()) {
30 /* open up the SuperIO chip
31 */
32 outb(0x87, 0x370);
33 outb(0x87, 0x370);
34
35 /* aux function group 1 (logical device 7)
36 */
37 outb(0x07, 0x370);
38 outb(0x07, 0x371);
39
40 /* set GP16 for WD-TIMER output
41 */
42 outb(0xe6, 0x370);
43 outb(0x00, 0x371);
44
45 /* set a RED LED and toggle WD_TIMER for rebooting
46 */
47 outb(0xc4, 0x338);
48 } else {
49 /*
50 * Force the watchdog to do a CPU reset.
51 *
52 * After making sure that the watchdog is disabled
53 * (so we can change the timer registers) we first
54 * enable the timer to autoreload itself. Next, the
55 * timer interval is set really short and any
56 * current interrupt request is cleared (so we can
57 * see an edge transition). Finally, TIMER4 is
58 * enabled as the watchdog.
59 */
60 *CSR_SA110_CNTL &= ~(1 << 13);
61 *CSR_TIMER4_CNTL = TIMER_CNTL_ENABLE |
62 TIMER_CNTL_AUTORELOAD |
63 TIMER_CNTL_DIV16;
64 *CSR_TIMER4_LOAD = 0x2;
65 *CSR_TIMER4_CLR = 0;
66 *CSR_SA110_CNTL |= (1 << 13);
67 }
68 }
69}
diff --git a/arch/arm/mach-footbridge/include/mach/timex.h b/arch/arm/mach-footbridge/include/mach/timex.h
new file mode 100644
index 000000000000..d0fea9d6d4ab
--- /dev/null
+++ b/arch/arm/mach-footbridge/include/mach/timex.h
@@ -0,0 +1,18 @@
1/*
2 * arch/arm/mach-footbridge/include/mach/timex.h
3 *
4 * Copyright (C) 1998 Russell King
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * EBSA285 architecture timex specifications
11 */
12
13/*
14 * We assume a constant here; this satisfies the maths in linux/timex.h
15 * and linux/time.h. CLOCK_TICK_RATE is actually system dependent, but
16 * this must be a constant.
17 */
18#define CLOCK_TICK_RATE (50000000/16)
diff --git a/arch/arm/mach-footbridge/include/mach/uncompress.h b/arch/arm/mach-footbridge/include/mach/uncompress.h
new file mode 100644
index 000000000000..5dfa44287346
--- /dev/null
+++ b/arch/arm/mach-footbridge/include/mach/uncompress.h
@@ -0,0 +1,38 @@
1/*
2 * arch/arm/mach-footbridge/include/mach/uncompress.h
3 *
4 * Copyright (C) 1996-1999 Russell King
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10#include <asm/mach-types.h>
11
12/*
13 * Note! This could cause problems on the NetWinder
14 */
15#define DC21285_BASE ((volatile unsigned int *)0x42000160)
16#define SER0_BASE ((volatile unsigned char *)0x7c0003f8)
17
18static inline void putc(char c)
19{
20 if (machine_is_netwinder()) {
21 while ((SER0_BASE[5] & 0x60) != 0x60)
22 barrier();
23 SER0_BASE[0] = c;
24 } else {
25 while (DC21285_BASE[6] & 8);
26 DC21285_BASE[0] = c;
27 }
28}
29
30static inline void flush(void)
31{
32}
33
34/*
35 * nothing to do
36 */
37#define arch_decomp_setup()
38#define arch_decomp_wdog()
diff --git a/arch/arm/mach-footbridge/include/mach/vmalloc.h b/arch/arm/mach-footbridge/include/mach/vmalloc.h
new file mode 100644
index 000000000000..d0958d860a3c
--- /dev/null
+++ b/arch/arm/mach-footbridge/include/mach/vmalloc.h
@@ -0,0 +1,10 @@
1/*
2 * arch/arm/mach-footbridge/include/mach/vmalloc.h
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 */
8
9
10#define VMALLOC_END (PAGE_OFFSET + 0x30000000)
diff --git a/arch/arm/mach-footbridge/isa-irq.c b/arch/arm/mach-footbridge/isa-irq.c
index 79443ffc8916..7132e522c366 100644
--- a/arch/arm/mach-footbridge/isa-irq.c
+++ b/arch/arm/mach-footbridge/isa-irq.c
@@ -21,7 +21,7 @@
21 21
22#include <asm/mach/irq.h> 22#include <asm/mach/irq.h>
23 23
24#include <asm/hardware.h> 24#include <mach/hardware.h>
25#include <asm/hardware/dec21285.h> 25#include <asm/hardware/dec21285.h>
26#include <asm/irq.h> 26#include <asm/irq.h>
27#include <asm/io.h> 27#include <asm/io.h>
diff --git a/arch/arm/mach-footbridge/netwinder-leds.c b/arch/arm/mach-footbridge/netwinder-leds.c
index 8e9cac5a213b..d91a4f4a32dc 100644
--- a/arch/arm/mach-footbridge/netwinder-leds.c
+++ b/arch/arm/mach-footbridge/netwinder-leds.c
@@ -21,7 +21,7 @@
21#include <linux/init.h> 21#include <linux/init.h>
22#include <linux/spinlock.h> 22#include <linux/spinlock.h>
23 23
24#include <asm/hardware.h> 24#include <mach/hardware.h>
25#include <asm/leds.h> 25#include <asm/leds.h>
26#include <asm/mach-types.h> 26#include <asm/mach-types.h>
27#include <asm/system.h> 27#include <asm/system.h>
diff --git a/arch/arm/mach-footbridge/time.c b/arch/arm/mach-footbridge/time.c
index d5cfcda385d6..fd9a7c11d62d 100644
--- a/arch/arm/mach-footbridge/time.c
+++ b/arch/arm/mach-footbridge/time.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/include/asm-arm/arch-ebsa285/time.h 2 * arch/arm/mach-footbridge/include/mach/time.h
3 * 3 *
4 * Copyright (C) 1998 Russell King. 4 * Copyright (C) 1998 Russell King.
5 * Copyright (C) 1998 Phil Blundell 5 * Copyright (C) 1998 Phil Blundell
@@ -23,7 +23,7 @@
23#include <linux/mc146818rtc.h> 23#include <linux/mc146818rtc.h>
24#include <linux/bcd.h> 24#include <linux/bcd.h>
25 25
26#include <asm/hardware.h> 26#include <mach/hardware.h>
27#include <asm/io.h> 27#include <asm/io.h>
28 28
29#include <asm/mach/time.h> 29#include <asm/mach/time.h>
diff --git a/arch/arm/mach-h720x/common.c b/arch/arm/mach-h720x/common.c
index 45144ad2bed9..b5f9741ae13c 100644
--- a/arch/arm/mach-h720x/common.c
+++ b/arch/arm/mach-h720x/common.c
@@ -23,11 +23,11 @@
23#include <asm/pgtable.h> 23#include <asm/pgtable.h>
24#include <asm/dma.h> 24#include <asm/dma.h>
25#include <asm/io.h> 25#include <asm/io.h>
26#include <asm/hardware.h> 26#include <mach/hardware.h>
27#include <asm/irq.h> 27#include <asm/irq.h>
28#include <asm/mach/irq.h> 28#include <asm/mach/irq.h>
29#include <asm/mach/map.h> 29#include <asm/mach/map.h>
30#include <asm/arch/irqs.h> 30#include <mach/irqs.h>
31 31
32#include <asm/mach/dma.h> 32#include <asm/mach/dma.h>
33 33
diff --git a/arch/arm/mach-h720x/cpu-h7201.c b/arch/arm/mach-h720x/cpu-h7201.c
index c2a431f482f0..24df2a349a98 100644
--- a/arch/arm/mach-h720x/cpu-h7201.c
+++ b/arch/arm/mach-h720x/cpu-h7201.c
@@ -17,9 +17,9 @@
17#include <linux/interrupt.h> 17#include <linux/interrupt.h>
18#include <linux/module.h> 18#include <linux/module.h>
19#include <asm/types.h> 19#include <asm/types.h>
20#include <asm/hardware.h> 20#include <mach/hardware.h>
21#include <asm/irq.h> 21#include <asm/irq.h>
22#include <asm/arch/irqs.h> 22#include <mach/irqs.h>
23#include <asm/mach/irq.h> 23#include <asm/mach/irq.h>
24#include <asm/mach/time.h> 24#include <asm/mach/time.h>
25#include "common.h" 25#include "common.h"
diff --git a/arch/arm/mach-h720x/cpu-h7202.c b/arch/arm/mach-h720x/cpu-h7202.c
index c627fa124eb3..53e1f62f2e79 100644
--- a/arch/arm/mach-h720x/cpu-h7202.c
+++ b/arch/arm/mach-h720x/cpu-h7202.c
@@ -17,9 +17,9 @@
17#include <linux/interrupt.h> 17#include <linux/interrupt.h>
18#include <linux/module.h> 18#include <linux/module.h>
19#include <asm/types.h> 19#include <asm/types.h>
20#include <asm/hardware.h> 20#include <mach/hardware.h>
21#include <asm/irq.h> 21#include <asm/irq.h>
22#include <asm/arch/irqs.h> 22#include <mach/irqs.h>
23#include <asm/mach/irq.h> 23#include <asm/mach/irq.h>
24#include <asm/mach/time.h> 24#include <asm/mach/time.h>
25#include <linux/device.h> 25#include <linux/device.h>
diff --git a/arch/arm/mach-h720x/h7201-eval.c b/arch/arm/mach-h720x/h7201-eval.c
index 407cd4c0aa8a..78be457dc324 100644
--- a/arch/arm/mach-h720x/h7201-eval.c
+++ b/arch/arm/mach-h720x/h7201-eval.c
@@ -25,7 +25,7 @@
25#include <asm/page.h> 25#include <asm/page.h>
26#include <asm/pgtable.h> 26#include <asm/pgtable.h>
27#include <asm/mach/arch.h> 27#include <asm/mach/arch.h>
28#include <asm/hardware.h> 28#include <mach/hardware.h>
29#include "common.h" 29#include "common.h"
30 30
31MACHINE_START(H7201, "Hynix GMS30C7201") 31MACHINE_START(H7201, "Hynix GMS30C7201")
diff --git a/arch/arm/mach-h720x/h7202-eval.c b/arch/arm/mach-h720x/h7202-eval.c
index bf2acdce62e5..56161d55cf47 100644
--- a/arch/arm/mach-h720x/h7202-eval.c
+++ b/arch/arm/mach-h720x/h7202-eval.c
@@ -25,7 +25,7 @@
25#include <asm/page.h> 25#include <asm/page.h>
26#include <asm/pgtable.h> 26#include <asm/pgtable.h>
27#include <asm/mach/arch.h> 27#include <asm/mach/arch.h>
28#include <asm/hardware.h> 28#include <mach/hardware.h>
29#include "common.h" 29#include "common.h"
30 30
31static struct resource cirrus_resources[] = { 31static struct resource cirrus_resources[] = {
diff --git a/arch/arm/mach-h720x/include/mach/boards.h b/arch/arm/mach-h720x/include/mach/boards.h
new file mode 100644
index 000000000000..079b279e1242
--- /dev/null
+++ b/arch/arm/mach-h720x/include/mach/boards.h
@@ -0,0 +1,53 @@
1/*
2 * arch/arm/mach-h720x/include/mach/boards.h
3 *
4 * Copyright (C) 2003 Thomas Gleixner <tglx@linutronix.de>
5 * (C) 2003 Robert Schwebel <r.schwebel@pengutronix.de>
6 *
7 * This file contains the board specific defines for various devices
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12 */
13
14#ifndef __ASM_ARCH_HARDWARE_INCMACH_H
15#error Do not include this file directly. Include asm/hardware.h instead !
16#endif
17
18/* Hynix H7202 developer board specific device defines */
19#ifdef CONFIG_ARCH_H7202
20
21/* FLASH */
22#define FLASH_VIRT 0xd0000000
23#define FLASH_PHYS 0x00000000
24#define FLASH_SIZE 0x02000000
25
26/* onboard LAN controller */
27# define ETH0_PHYS 0x08000000
28
29/* Touch screen defines */
30/* GPIO Port */
31#define PEN_GPIO GPIO_B_VIRT
32/* Bitmask for pen down interrupt */
33#define PEN_INT_BIT (1<<7)
34/* Bitmask for pen up interrupt */
35#define PEN_ENA_BIT (1<<6)
36/* pen up interrupt */
37#define IRQ_PEN IRQ_MUX_GPIOB(7)
38
39#endif
40
41/* Hynix H7201 developer board specific device defines */
42#if defined (CONFIG_ARCH_H7201)
43/* ROM DISK SPACE */
44#define ROM_DISK_BASE 0xc1800000
45#define ROM_DISK_START 0x41800000
46#define ROM_DISK_SIZE 0x00700000
47
48/* SRAM DISK SPACE */
49#define SRAM_DISK_BASE 0xf1000000
50#define SRAM_DISK_START 0x04000000
51#define SRAM_DISK_SIZE 0x00400000
52#endif
53
diff --git a/arch/arm/mach-h720x/include/mach/debug-macro.S b/arch/arm/mach-h720x/include/mach/debug-macro.S
new file mode 100644
index 000000000000..6294a1344dda
--- /dev/null
+++ b/arch/arm/mach-h720x/include/mach/debug-macro.S
@@ -0,0 +1,40 @@
1/* arch/arm/mach-h720x/include/mach/debug-macro.S
2 *
3 * Debugging macro include header
4 *
5 * Copyright (C) 1994-1999 Russell King
6 * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 *
12*/
13
14 .equ io_virt, IO_BASE
15 .equ io_phys, IO_START
16
17 .macro addruart,rx
18 mrc p15, 0, \rx, c1, c0
19 tst \rx, #1 @ MMU enabled?
20 moveq \rx, #io_phys @ physical base address
21 movne \rx, #io_virt @ virtual address
22 add \rx, \rx, #0x00020000 @ UART1
23 .endm
24
25 .macro senduart,rd,rx
26 str \rd, [\rx, #0x0] @ UARTDR
27
28 .endm
29
30 .macro waituart,rd,rx
311001: ldr \rd, [\rx, #0x18] @ UARTFLG
32 tst \rd, #1 << 5 @ UARTFLGUTXFF - 1 when full
33 bne 1001b
34 .endm
35
36 .macro busyuart,rd,rx
371001: ldr \rd, [\rx, #0x18] @ UARTFLG
38 tst \rd, #1 << 3 @ UARTFLGUBUSY - 1 when busy
39 bne 1001b
40 .endm
diff --git a/arch/arm/mach-h720x/include/mach/dma.h b/arch/arm/mach-h720x/include/mach/dma.h
new file mode 100644
index 000000000000..0a9d86ee84fe
--- /dev/null
+++ b/arch/arm/mach-h720x/include/mach/dma.h
@@ -0,0 +1,26 @@
1/*
2 * arch/arm/mach-h720x/include/mach/dma.h
3 *
4 * Architecture DMA routes
5 *
6 * Copyright (C) 1997.1998 Russell King
7 */
8#ifndef __ASM_ARCH_DMA_H
9#define __ASM_ARCH_DMA_H
10
11/*
12 * This is the maximum DMA address that can be DMAd to.
13 * There should not be more than (0xd0000000 - 0xc0000000)
14 * bytes of RAM.
15 */
16#define MAX_DMA_ADDRESS 0xd0000000
17
18#if defined (CONFIG_CPU_H7201)
19#define MAX_DMA_CHANNELS 3
20#elif defined (CONFIG_CPU_H7202)
21#define MAX_DMA_CHANNELS 4
22#else
23#error processor definition missmatch
24#endif
25
26#endif /* __ASM_ARCH_DMA_H */
diff --git a/arch/arm/mach-h720x/include/mach/entry-macro.S b/arch/arm/mach-h720x/include/mach/entry-macro.S
new file mode 100644
index 000000000000..6d3b917c4a18
--- /dev/null
+++ b/arch/arm/mach-h720x/include/mach/entry-macro.S
@@ -0,0 +1,66 @@
1/*
2 * arch/arm/mach-h720x/include/mach/entry-macro.S
3 *
4 * Low-level IRQ helper macros for Hynix HMS720x based platforms
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10
11 .macro disable_fiq
12 .endm
13
14 .macro get_irqnr_preamble, base, tmp
15 .endm
16
17 .macro arch_ret_to_user, tmp1, tmp2
18 .endm
19
20 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
21#if defined (CONFIG_CPU_H7201) || defined (CONFIG_CPU_H7202)
22 @ we could use the id register on H7202, but this is not
23 @ properly updated when we come back from asm_do_irq
24 @ without a previous return from interrupt
25 @ (see loops below in irq_svc, irq_usr)
26 @ We see unmasked pending ints only, as the masked pending ints
27 @ are not visible here
28
29 mov \base, #0xf0000000 @ base register
30 orr \base, \base, #0x24000 @ irqbase
31 ldr \irqstat, [\base, #0x04] @ get interrupt status
32#if defined (CONFIG_CPU_H7201)
33 ldr \tmp, =0x001fffff
34#else
35 mvn \tmp, #0xc0000000
36#endif
37 and \irqstat, \irqstat, \tmp @ mask out unused ints
38 mov \irqnr, #0
39
40 mov \tmp, #0xff00
41 orr \tmp, \tmp, #0xff
42 tst \irqstat, \tmp
43 addeq \irqnr, \irqnr, #16
44 moveq \irqstat, \irqstat, lsr #16
45 tst \irqstat, #255
46 addeq \irqnr, \irqnr, #8
47 moveq \irqstat, \irqstat, lsr #8
48 tst \irqstat, #15
49 addeq \irqnr, \irqnr, #4
50 moveq \irqstat, \irqstat, lsr #4
51 tst \irqstat, #3
52 addeq \irqnr, \irqnr, #2
53 moveq \irqstat, \irqstat, lsr #2
54 tst \irqstat, #1
55 addeq \irqnr, \irqnr, #1
56 moveq \irqstat, \irqstat, lsr #1
57 tst \irqstat, #1 @ bit 0 should be set
58 .endm
59
60 .macro irq_prio_table
61 .endm
62
63#else
64#error hynix processor selection missmatch
65#endif
66
diff --git a/arch/arm/mach-h720x/include/mach/h7201-regs.h b/arch/arm/mach-h720x/include/mach/h7201-regs.h
new file mode 100644
index 000000000000..611b4947ccfc
--- /dev/null
+++ b/arch/arm/mach-h720x/include/mach/h7201-regs.h
@@ -0,0 +1,67 @@
1/*
2 * arch/arm/mach-h720x/include/mach/h7201-regs.h
3 *
4 * Copyright (C) 2000 Jungjun Kim, Hynix Semiconductor Inc.
5 * (C) 2003 Thomas Gleixner <tglx@linutronix.de>
6 * (C) 2003 Robert Schwebel <r.schwebel@pengutronix.de>
7 * (C) 2004 Sascha Hauer <s.hauer@pengutronix.de>
8 *
9 * This file contains the hardware definitions of the h720x processors
10 *
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License version 2 as
13 * published by the Free Software Foundation.
14 *
15 * Do not add implementations specific defines here. This files contains
16 * only defines of the onchip peripherals. Add those defines to boards.h,
17 * which is included by this file.
18 */
19
20#define SERIAL2_VIRT (IO_VIRT + 0x50100)
21#define SERIAL3_VIRT (IO_VIRT + 0x50200)
22
23/*
24 * PCMCIA
25 */
26#define PCMCIA0_ATT_BASE 0xe5000000
27#define PCMCIA0_ATT_SIZE 0x00200000
28#define PCMCIA0_ATT_START 0x20000000
29#define PCMCIA0_MEM_BASE 0xe5200000
30#define PCMCIA0_MEM_SIZE 0x00200000
31#define PCMCIA0_MEM_START 0x24000000
32#define PCMCIA0_IO_BASE 0xe5400000
33#define PCMCIA0_IO_SIZE 0x00200000
34#define PCMCIA0_IO_START 0x28000000
35
36#define PCMCIA1_ATT_BASE 0xe5600000
37#define PCMCIA1_ATT_SIZE 0x00200000
38#define PCMCIA1_ATT_START 0x30000000
39#define PCMCIA1_MEM_BASE 0xe5800000
40#define PCMCIA1_MEM_SIZE 0x00200000
41#define PCMCIA1_MEM_START 0x34000000
42#define PCMCIA1_IO_BASE 0xe5a00000
43#define PCMCIA1_IO_SIZE 0x00200000
44#define PCMCIA1_IO_START 0x38000000
45
46#define PRIME3C_BASE 0xf0050000
47#define PRIME3C_SIZE 0x00001000
48#define PRIME3C_START 0x10000000
49
50/* VGA Controller */
51#define VGA_RAMBASE 0x50
52#define VGA_TIMING0 0x60
53#define VGA_TIMING1 0x64
54#define VGA_TIMING2 0x68
55#define VGA_TIMING3 0x6c
56
57#define LCD_CTRL_VGA_ENABLE 0x00000100
58#define LCD_CTRL_VGA_BPP_MASK 0x00000600
59#define LCD_CTRL_VGA_4BPP 0x00000000
60#define LCD_CTRL_VGA_8BPP 0x00000200
61#define LCD_CTRL_VGA_16BPP 0x00000300
62#define LCD_CTRL_SHARE_DMA 0x00000800
63#define LCD_CTRL_VDE 0x00100000
64#define LCD_CTRL_LPE 0x00400000 /* LCD Power enable */
65#define LCD_CTRL_BLE 0x00800000 /* LCD backlight enable */
66
67#define VGA_PALETTE_BASE (IO_VIRT + 0x10800)
diff --git a/arch/arm/mach-h720x/include/mach/h7202-regs.h b/arch/arm/mach-h720x/include/mach/h7202-regs.h
new file mode 100644
index 000000000000..17c12eb34995
--- /dev/null
+++ b/arch/arm/mach-h720x/include/mach/h7202-regs.h
@@ -0,0 +1,155 @@
1/*
2 * arch/arm/mach-h720x/include/mach/h7202-regs.h
3 *
4 * Copyright (C) 2000 Jungjun Kim, Hynix Semiconductor Inc.
5 * (C) 2003 Thomas Gleixner <tglx@linutronix.de>
6 * (C) 2003 Robert Schwebel <r.schwebel@pengutronix.de>
7 * (C) 2004 Sascha Hauer <s.hauer@pengutronix.de>
8 *
9 * This file contains the hardware definitions of the h720x processors
10 *
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License version 2 as
13 * published by the Free Software Foundation.
14 *
15 * Do not add implementations specific defines here. This files contains
16 * only defines of the onchip peripherals. Add those defines to boards.h,
17 * which is included by this file.
18 */
19
20#define SERIAL2_OFS 0x2d000
21#define SERIAL2_BASE (IO_PHYS + SERIAL2_OFS)
22#define SERIAL2_VIRT (IO_VIRT + SERIAL2_OFS)
23#define SERIAL3_OFS 0x2e000
24#define SERIAL3_BASE (IO_PHYS + SERIAL3_OFS)
25#define SERIAL3_VIRT (IO_VIRT + SERIAL3_OFS)
26
27/* Matrix Keyboard Controller */
28#define KBD_VIRT (IO_VIRT + 0x22000)
29#define KBD_KBCR 0x00
30#define KBD_KBSC 0x04
31#define KBD_KBTR 0x08
32#define KBD_KBVR0 0x0C
33#define KBD_KBVR1 0x10
34#define KBD_KBSR 0x18
35
36#define KBD_KBCR_SCANENABLE (1 << 7)
37#define KBD_KBCR_NPOWERDOWN (1 << 2)
38#define KBD_KBCR_CLKSEL_MASK (3)
39#define KBD_KBCR_CLKSEL_PCLK2 0x0
40#define KBD_KBCR_CLKSEL_PCLK128 0x1
41#define KBD_KBCR_CLKSEL_PCLK256 0x2
42#define KBD_KBCR_CLKSEL_PCLK512 0x3
43
44#define KBD_KBSR_INTR (1 << 0)
45#define KBD_KBSR_WAKEUP (1 << 1)
46
47/* USB device controller */
48
49#define USBD_BASE (IO_VIRT + 0x12000)
50#define USBD_LENGTH 0x3C
51
52#define USBD_GCTRL 0x00
53#define USBD_EPCTRL 0x04
54#define USBD_INTMASK 0x08
55#define USBD_INTSTAT 0x0C
56#define USBD_PWR 0x10
57#define USBD_DMARXTX 0x14
58#define USBD_DEVID 0x18
59#define USBD_DEVCLASS 0x1C
60#define USBD_INTCLASS 0x20
61#define USBD_SETUP0 0x24
62#define USBD_SETUP1 0x28
63#define USBD_ENDP0RD 0x2C
64#define USBD_ENDP0WT 0x30
65#define USBD_ENDP1RD 0x34
66#define USBD_ENDP2WT 0x38
67
68/* PS/2 port */
69#define PSDATA 0x00
70#define PSSTAT 0x04
71#define PSSTAT_TXEMPTY (1<<0)
72#define PSSTAT_TXBUSY (1<<1)
73#define PSSTAT_RXFULL (1<<2)
74#define PSSTAT_RXBUSY (1<<3)
75#define PSSTAT_CLKIN (1<<4)
76#define PSSTAT_DATAIN (1<<5)
77#define PSSTAT_PARITY (1<<6)
78
79#define PSCONF 0x08
80#define PSCONF_ENABLE (1<<0)
81#define PSCONF_TXINTEN (1<<2)
82#define PSCONF_RXINTEN (1<<3)
83#define PSCONF_FORCECLKLOW (1<<4)
84#define PSCONF_FORCEDATLOW (1<<5)
85#define PSCONF_LCE (1<<6)
86
87#define PSINTR 0x0C
88#define PSINTR_TXINT (1<<0)
89#define PSINTR_RXINT (1<<1)
90#define PSINTR_PAR (1<<2)
91#define PSINTR_RXTO (1<<3)
92#define PSINTR_TXTO (1<<4)
93
94#define PSTDLO 0x10 /* clk low before start transmission */
95#define PSTPRI 0x14 /* PRI clock */
96#define PSTXMT 0x18 /* maximum transmission time */
97#define PSTREC 0x20 /* maximum receive time */
98#define PSPWDN 0x3c
99
100/* ADC converter */
101#define ADC_BASE (IO_VIRT + 0x29000)
102#define ADC_CR 0x00
103#define ADC_TSCTRL 0x04
104#define ADC_BT_CTRL 0x08
105#define ADC_MC_CTRL 0x0C
106#define ADC_STATUS 0x10
107
108/* ADC control register bits */
109#define ADC_CR_PW_CTRL 0x80
110#define ADC_CR_DIRECTC 0x04
111#define ADC_CR_CONTIME_NO 0x00
112#define ADC_CR_CONTIME_2 0x04
113#define ADC_CR_CONTIME_4 0x08
114#define ADC_CR_CONTIME_ADE 0x0c
115#define ADC_CR_LONGCALTIME 0x01
116
117/* ADC touch panel register bits */
118#define ADC_TSCTRL_ENABLE 0x80
119#define ADC_TSCTRL_INTR 0x40
120#define ADC_TSCTRL_SWBYPSS 0x20
121#define ADC_TSCTRL_SWINVT 0x10
122#define ADC_TSCTRL_S400 0x03
123#define ADC_TSCTRL_S200 0x02
124#define ADC_TSCTRL_S100 0x01
125#define ADC_TSCTRL_S50 0x00
126
127/* ADC Interrupt Status Register bits */
128#define ADC_STATUS_TS_BIT 0x80
129#define ADC_STATUS_MBT_BIT 0x40
130#define ADC_STATUS_BBT_BIT 0x20
131#define ADC_STATUS_MIC_BIT 0x10
132
133/* Touch data registers */
134#define ADC_TS_X0X1 0x30
135#define ADC_TS_X2X3 0x34
136#define ADC_TS_Y0Y1 0x38
137#define ADC_TS_Y2Y3 0x3c
138#define ADC_TS_X4X5 0x40
139#define ADC_TS_X6X7 0x44
140#define ADC_TS_Y4Y5 0x48
141#define ADC_TS_Y6Y7 0x50
142
143/* battery data */
144#define ADC_MB_DATA 0x54
145#define ADC_BB_DATA 0x58
146
147/* Sound data register */
148#define ADC_SD_DAT0 0x60
149#define ADC_SD_DAT1 0x64
150#define ADC_SD_DAT2 0x68
151#define ADC_SD_DAT3 0x6c
152#define ADC_SD_DAT4 0x70
153#define ADC_SD_DAT5 0x74
154#define ADC_SD_DAT6 0x78
155#define ADC_SD_DAT7 0x7c
diff --git a/arch/arm/mach-h720x/include/mach/hardware.h b/arch/arm/mach-h720x/include/mach/hardware.h
new file mode 100644
index 000000000000..6c19156e2a42
--- /dev/null
+++ b/arch/arm/mach-h720x/include/mach/hardware.h
@@ -0,0 +1,192 @@
1/*
2 * arch/arm/mach-h720x/include/mach/hardware.h
3 *
4 * Copyright (C) 2000 Jungjun Kim, Hynix Semiconductor Inc.
5 * (C) 2003 Thomas Gleixner <tglx@linutronix.de>
6 * (C) 2003 Robert Schwebel <r.schwebel@pengutronix.de>
7 *
8 * This file contains the hardware definitions of the h720x processors
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
13 *
14 * Do not add implementations specific defines here. This files contains
15 * only defines of the onchip peripherals. Add those defines to boards.h,
16 * which is included by this file.
17 */
18
19#ifndef __ASM_ARCH_HARDWARE_H
20#define __ASM_ARCH_HARDWARE_H
21
22#define IOCLK (3686400L)
23
24/* Onchip peripherals */
25
26#define IO_VIRT 0xf0000000 /* IO peripherals */
27#define IO_PHYS 0x80000000
28#define IO_SIZE 0x00050000
29
30#ifdef CONFIG_CPU_H7202
31#include "h7202-regs.h"
32#elif defined CONFIG_CPU_H7201
33#include "h7201-regs.h"
34#else
35#error machine definition mismatch
36#endif
37
38/* Macro to access the CPU IO */
39#define CPU_IO(x) (*(volatile u32*)(x))
40
41/* Macro to access general purpose regs (base, offset) */
42#define CPU_REG(x,y) CPU_IO(x+y)
43
44/* Macro to access irq related regs */
45#define IRQ_REG(x) CPU_REG(IRQC_VIRT,x)
46
47/* CPU registers */
48/* general purpose I/O */
49#define GPIO_VIRT(x) (IO_VIRT + 0x23000 + ((x)<<5))
50#define GPIO_A_VIRT (GPIO_VIRT(0))
51#define GPIO_B_VIRT (GPIO_VIRT(1))
52#define GPIO_C_VIRT (GPIO_VIRT(2))
53#define GPIO_D_VIRT (GPIO_VIRT(3))
54#define GPIO_E_VIRT (GPIO_VIRT(4))
55#define GPIO_AMULSEL (GPIO_VIRT(0) + 0xA4)
56
57#define AMULSEL_USIN2 (1<<5)
58#define AMULSEL_USOUT2 (1<<6)
59#define AMULSEL_USIN3 (1<<13)
60#define AMULSEL_USOUT3 (1<<14)
61#define AMULSEL_IRDIN (1<<15)
62#define AMULSEL_IRDOUT (1<<7)
63
64/* Register offsets general purpose I/O */
65#define GPIO_DATA 0x00
66#define GPIO_DIR 0x04
67#define GPIO_MASK 0x08
68#define GPIO_STAT 0x0C
69#define GPIO_EDGE 0x10
70#define GPIO_CLR 0x14
71#define GPIO_POL 0x18
72#define GPIO_EN 0x1C
73
74/*interrupt controller */
75#define IRQC_VIRT (IO_VIRT + 0x24000)
76/* register offset interrupt controller */
77#define IRQC_IER 0x00
78#define IRQC_ISR 0x04
79
80/* timer unit */
81#define TIMER_VIRT (IO_VIRT + 0x25000)
82/* Register offsets timer unit */
83#define TM0_PERIOD 0x00
84#define TM0_COUNT 0x08
85#define TM0_CTRL 0x10
86#define TM1_PERIOD 0x20
87#define TM1_COUNT 0x28
88#define TM1_CTRL 0x30
89#define TM2_PERIOD 0x40
90#define TM2_COUNT 0x48
91#define TM2_CTRL 0x50
92#define TIMER_TOPCTRL 0x60
93#define TIMER_TOPSTAT 0x64
94#define T64_COUNTL 0x80
95#define T64_COUNTH 0x84
96#define T64_CTRL 0x88
97#define T64_BASEL 0x94
98#define T64_BASEH 0x98
99/* Bitmaks timer unit TOPSTAT reg */
100#define TSTAT_T0INT 0x1
101#define TSTAT_T1INT 0x2
102#define TSTAT_T2INT 0x4
103#define TSTAT_T3INT 0x8
104/* Bit description of TMx_CTRL register */
105#define TM_START 0x1
106#define TM_REPEAT 0x2
107#define TM_RESET 0x4
108/* Bit description of TIMER_CTRL register */
109#define ENABLE_TM0_INTR 0x1
110#define ENABLE_TM1_INTR 0x2
111#define ENABLE_TM2_INTR 0x4
112#define TIMER_ENABLE_BIT 0x8
113#define ENABLE_TIMER64 0x10
114#define ENABLE_TIMER64_INT 0x20
115
116/* PMU & PLL */
117#define PMU_BASE (IO_VIRT + 0x1000)
118#define PMU_MODE 0x00
119#define PMU_STAT 0x20
120#define PMU_PLL_CTRL 0x28
121
122/* PMU Mode bits */
123#define PMU_MODE_SLOW 0x00
124#define PMU_MODE_RUN 0x01
125#define PMU_MODE_IDLE 0x02
126#define PMU_MODE_SLEEP 0x03
127#define PMU_MODE_INIT 0x04
128#define PMU_MODE_DEEPSLEEP 0x07
129#define PMU_MODE_WAKEUP 0x08
130
131/* PMU ... */
132#define PLL_2_EN 0x8000
133#define PLL_1_EN 0x4000
134#define PLL_3_MUTE 0x0080
135
136/* Control bits for PMU/ PLL */
137#define PMU_WARMRESET 0x00010000
138#define PLL_CTRL_MASK23 0x000080ff
139
140/* LCD Controller */
141#define LCD_BASE (IO_VIRT + 0x10000)
142#define LCD_CTRL 0x00
143#define LCD_STATUS 0x04
144#define LCD_STATUS_M 0x08
145#define LCD_INTERRUPT 0x0C
146#define LCD_DBAR 0x10
147#define LCD_DCAR 0x14
148#define LCD_TIMING0 0x20
149#define LCD_TIMING1 0x24
150#define LCD_TIMING2 0x28
151#define LCD_TEST 0x40
152
153/* LCD Control Bits */
154#define LCD_CTRL_LCD_ENABLE 0x00000001
155/* Bits per pixel */
156#define LCD_CTRL_LCD_BPP_MASK 0x00000006
157#define LCD_CTRL_LCD_4BPP 0x00000000
158#define LCD_CTRL_LCD_8BPP 0x00000002
159#define LCD_CTRL_LCD_16BPP 0x00000004
160#define LCD_CTRL_LCD_BW 0x00000008
161#define LCD_CTRL_LCD_TFT 0x00000010
162#define LCD_CTRL_BGR 0x00001000
163#define LCD_CTRL_LCD_VCOMP 0x00080000
164#define LCD_CTRL_LCD_MONO8 0x00200000
165#define LCD_CTRL_LCD_PWR 0x00400000
166#define LCD_CTRL_LCD_BLE 0x00800000
167#define LCD_CTRL_LDBUSEN 0x01000000
168
169/* Palette */
170#define LCD_PALETTE_BASE (IO_VIRT + 0x10400)
171
172/* Serial ports */
173#define SERIAL0_OFS 0x20000
174#define SERIAL0_VIRT (IO_VIRT + SERIAL0_OFS)
175#define SERIAL0_BASE (IO_PHYS + SERIAL0_OFS)
176
177#define SERIAL1_OFS 0x21000
178#define SERIAL1_VIRT (IO_VIRT + SERIAL1_OFS)
179#define SERIAL1_BASE (IO_PHYS + SERIAL1_OFS)
180
181#define SERIAL_ENABLE 0x30
182#define SERIAL_ENABLE_EN (1<<0)
183
184/* General defines to pacify gcc */
185#define PCIO_BASE (0) /* for inb, outb and friends */
186#define PCIO_VIRT PCIO_BASE
187
188#define __ASM_ARCH_HARDWARE_INCMACH_H
189#include "boards.h"
190#undef __ASM_ARCH_HARDWARE_INCMACH_H
191
192#endif /* __ASM_ARCH_HARDWARE_H */
diff --git a/arch/arm/mach-h720x/include/mach/io.h b/arch/arm/mach-h720x/include/mach/io.h
new file mode 100644
index 000000000000..1dab74ce88c6
--- /dev/null
+++ b/arch/arm/mach-h720x/include/mach/io.h
@@ -0,0 +1,24 @@
1/*
2 * arch/arm/mach-h720x/include/mach/io.h
3 *
4 * Copyright (C) 2000 Steve Hill (sjhill@cotw.com)
5 *
6 * Changelog:
7 *
8 * 09-19-2001 JJKIM
9 * Created from arch/arm/mach-l7200/include/mach/io.h
10 *
11 * 03-27-2003 Robert Schwebel <r.schwebel@pengutronix.de>:
12 * re-unified header files for h720x
13 */
14#ifndef __ASM_ARM_ARCH_IO_H
15#define __ASM_ARM_ARCH_IO_H
16
17#include <mach/hardware.h>
18
19#define IO_SPACE_LIMIT 0xffffffff
20
21#define __io(a) ((void __iomem *)(a))
22#define __mem_pci(a) (a)
23
24#endif
diff --git a/arch/arm/mach-h720x/include/mach/irqs.h b/arch/arm/mach-h720x/include/mach/irqs.h
new file mode 100644
index 000000000000..430a92b492f1
--- /dev/null
+++ b/arch/arm/mach-h720x/include/mach/irqs.h
@@ -0,0 +1,116 @@
1/*
2 * arch/arm/mach-h720x/include/mach/irqs.h
3 *
4 * Copyright (C) 2000 Jungjun Kim
5 * (C) 2003 Robert Schwebel <r.schwebel@pengutronix.de>
6 * (C) 2003 Thomas Gleixner <tglx@linutronix.de>
7 *
8 */
9
10#ifndef __ASM_ARCH_IRQS_H
11#define __ASM_ARCH_IRQS_H
12
13#if defined (CONFIG_CPU_H7201)
14
15#define IRQ_PMU 0 /* 0x000001 */
16#define IRQ_DMA 1 /* 0x000002 */
17#define IRQ_LCD 2 /* 0x000004 */
18#define IRQ_VGA 3 /* 0x000008 */
19#define IRQ_PCMCIA1 4 /* 0x000010 */
20#define IRQ_PCMCIA2 5 /* 0x000020 */
21#define IRQ_AFE 6 /* 0x000040 */
22#define IRQ_AIC 7 /* 0x000080 */
23#define IRQ_KEYBOARD 8 /* 0x000100 */
24#define IRQ_TIMER0 9 /* 0x000200 */
25#define IRQ_RTC 10 /* 0x000400 */
26#define IRQ_SOUND 11 /* 0x000800 */
27#define IRQ_USB 12 /* 0x001000 */
28#define IRQ_IrDA 13 /* 0x002000 */
29#define IRQ_UART0 14 /* 0x004000 */
30#define IRQ_UART1 15 /* 0x008000 */
31#define IRQ_SPI 16 /* 0x010000 */
32#define IRQ_GPIOA 17 /* 0x020000 */
33#define IRQ_GPIOB 18 /* 0x040000 */
34#define IRQ_GPIOC 19 /* 0x080000 */
35#define IRQ_GPIOD 20 /* 0x100000 */
36#define IRQ_CommRX 21 /* 0x200000 */
37#define IRQ_CommTX 22 /* 0x400000 */
38#define IRQ_Soft 23 /* 0x800000 */
39
40#define NR_GLBL_IRQS 24
41
42#define IRQ_CHAINED_GPIOA(x) (NR_GLBL_IRQS + x)
43#define IRQ_CHAINED_GPIOB(x) (IRQ_CHAINED_GPIOA(32) + x)
44#define IRQ_CHAINED_GPIOC(x) (IRQ_CHAINED_GPIOB(32) + x)
45#define IRQ_CHAINED_GPIOD(x) (IRQ_CHAINED_GPIOC(32) + x)
46#define NR_IRQS IRQ_CHAINED_GPIOD(32)
47
48/* Enable mask for multiplexed interrupts */
49#define IRQ_ENA_MUX (1<<IRQ_GPIOA) | (1<<IRQ_GPIOB) \
50 | (1<<IRQ_GPIOC) | (1<<IRQ_GPIOD)
51
52
53#elif defined (CONFIG_CPU_H7202)
54
55#define IRQ_PMU 0 /* 0x00000001 */
56#define IRQ_DMA 1 /* 0x00000002 */
57#define IRQ_LCD 2 /* 0x00000004 */
58#define IRQ_SOUND 3 /* 0x00000008 */
59#define IRQ_I2S 4 /* 0x00000010 */
60#define IRQ_USB 5 /* 0x00000020 */
61#define IRQ_MMC 6 /* 0x00000040 */
62#define IRQ_RTC 7 /* 0x00000080 */
63#define IRQ_UART0 8 /* 0x00000100 */
64#define IRQ_UART1 9 /* 0x00000200 */
65#define IRQ_UART2 10 /* 0x00000400 */
66#define IRQ_UART3 11 /* 0x00000800 */
67#define IRQ_KBD 12 /* 0x00001000 */
68#define IRQ_PS2 13 /* 0x00002000 */
69#define IRQ_AIC 14 /* 0x00004000 */
70#define IRQ_TIMER0 15 /* 0x00008000 */
71#define IRQ_TIMERX 16 /* 0x00010000 */
72#define IRQ_WDT 17 /* 0x00020000 */
73#define IRQ_CAN0 18 /* 0x00040000 */
74#define IRQ_CAN1 19 /* 0x00080000 */
75#define IRQ_EXT0 20 /* 0x00100000 */
76#define IRQ_EXT1 21 /* 0x00200000 */
77#define IRQ_GPIOA 22 /* 0x00400000 */
78#define IRQ_GPIOB 23 /* 0x00800000 */
79#define IRQ_GPIOC 24 /* 0x01000000 */
80#define IRQ_GPIOD 25 /* 0x02000000 */
81#define IRQ_GPIOE 26 /* 0x04000000 */
82#define IRQ_COMMRX 27 /* 0x08000000 */
83#define IRQ_COMMTX 28 /* 0x10000000 */
84#define IRQ_SMC 29 /* 0x20000000 */
85#define IRQ_Soft 30 /* 0x40000000 */
86#define IRQ_RESERVED1 31 /* 0x80000000 */
87#define NR_GLBL_IRQS 32
88
89#define NR_TIMERX_IRQS 3
90
91#define IRQ_CHAINED_GPIOA(x) (NR_GLBL_IRQS + x)
92#define IRQ_CHAINED_GPIOB(x) (IRQ_CHAINED_GPIOA(32) + x)
93#define IRQ_CHAINED_GPIOC(x) (IRQ_CHAINED_GPIOB(32) + x)
94#define IRQ_CHAINED_GPIOD(x) (IRQ_CHAINED_GPIOC(32) + x)
95#define IRQ_CHAINED_GPIOE(x) (IRQ_CHAINED_GPIOD(32) + x)
96#define IRQ_CHAINED_TIMERX(x) (IRQ_CHAINED_GPIOE(32) + x)
97#define IRQ_TIMER1 (IRQ_CHAINED_TIMERX(0))
98#define IRQ_TIMER2 (IRQ_CHAINED_TIMERX(1))
99#define IRQ_TIMER64B (IRQ_CHAINED_TIMERX(2))
100
101#define NR_IRQS (IRQ_CHAINED_TIMERX(NR_TIMERX_IRQS))
102
103/* Enable mask for multiplexed interrupts */
104#define IRQ_ENA_MUX (1<<IRQ_TIMERX) | (1<<IRQ_GPIOA) | (1<<IRQ_GPIOB) | \
105 (1<<IRQ_GPIOC) | (1<<IRQ_GPIOD) | (1<<IRQ_GPIOE) | \
106 (1<<IRQ_TIMERX)
107
108#else
109#error cpu definition mismatch
110#endif
111
112/* decode irq number to register number */
113#define IRQ_TO_REGNO(irq) ((irq - NR_GLBL_IRQS) >> 5)
114#define IRQ_TO_BIT(irq) (1 << ((irq - NR_GLBL_IRQS) % 32))
115
116#endif
diff --git a/arch/arm/mach-h720x/include/mach/memory.h b/arch/arm/mach-h720x/include/mach/memory.h
new file mode 100644
index 000000000000..cb26f49cc4e1
--- /dev/null
+++ b/arch/arm/mach-h720x/include/mach/memory.h
@@ -0,0 +1,29 @@
1/*
2 * arch/arm/mach-h720x/include/mach/memory.h
3 *
4 * Copyright (c) 2000 Jungjun Kim
5 *
6 */
7#ifndef __ASM_ARCH_MEMORY_H
8#define __ASM_ARCH_MEMORY_H
9
10/*
11 * Page offset:
12 * ( 0xc0000000UL )
13 */
14#define PHYS_OFFSET UL(0x40000000)
15
16/*
17 * Virtual view <-> DMA view memory address translations
18 * virt_to_bus: Used to translate the virtual address to an
19 * address suitable to be passed to set_dma_addr
20 * bus_to_virt: Used to convert an address for DMA operations
21 * to an address that the kernel can use.
22 *
23 * There is something to do here later !, Mar 2000, Jungjun Kim
24 */
25
26#define __virt_to_bus(x) __virt_to_phys(x)
27#define __bus_to_virt(x) __phys_to_virt(x)
28
29#endif
diff --git a/arch/arm/mach-h720x/include/mach/system.h b/arch/arm/mach-h720x/include/mach/system.h
new file mode 100644
index 000000000000..e4a7c760d52a
--- /dev/null
+++ b/arch/arm/mach-h720x/include/mach/system.h
@@ -0,0 +1,33 @@
1/*
2 * arch/arm/mach-h720x/include/mach/system.h
3 *
4 * Copyright (C) 2001-2002 Jungjun Kim, Hynix Semiconductor Inc.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 * arch/arm/mach-h720x/include/mach/system.h
10 *
11 */
12
13#ifndef __ASM_ARCH_SYSTEM_H
14#define __ASM_ARCH_SYSTEM_H
15#include <mach/hardware.h>
16
17static void arch_idle(void)
18{
19 CPU_REG (PMU_BASE, PMU_MODE) = PMU_MODE_IDLE;
20 nop();
21 nop();
22 CPU_REG (PMU_BASE, PMU_MODE) = PMU_MODE_RUN;
23 nop();
24 nop();
25}
26
27
28static __inline__ void arch_reset(char mode)
29{
30 CPU_REG (PMU_BASE, PMU_STAT) |= PMU_WARMRESET;
31}
32
33#endif
diff --git a/arch/arm/mach-h720x/include/mach/timex.h b/arch/arm/mach-h720x/include/mach/timex.h
new file mode 100644
index 000000000000..3f2f447ff36b
--- /dev/null
+++ b/arch/arm/mach-h720x/include/mach/timex.h
@@ -0,0 +1,15 @@
1/*
2 * arch/arm/mach-h720x/include/mach/timex.h
3 * Copyright (C) 2000 Jungjun Kim, Hynix Semiconductor Inc.
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
8 */
9
10#ifndef __ASM_ARCH_TIMEX
11#define __ASM_ARCH_TIMEX
12
13#define CLOCK_TICK_RATE 3686400
14
15#endif
diff --git a/arch/arm/mach-h720x/include/mach/uncompress.h b/arch/arm/mach-h720x/include/mach/uncompress.h
new file mode 100644
index 000000000000..d6623234f61e
--- /dev/null
+++ b/arch/arm/mach-h720x/include/mach/uncompress.h
@@ -0,0 +1,37 @@
1/*
2 * arch/arm/mach-h720x/include/mach/uncompress.h
3 *
4 * Copyright (C) 2001-2002 Jungjun Kim
5 */
6
7#ifndef __ASM_ARCH_UNCOMPRESS_H
8#define __ASM_ARCH_UNCOMPRESS_H
9
10#include <mach/hardware.h>
11
12#define LSR 0x14
13#define TEMPTY 0x40
14
15static inline void putc(int c)
16{
17 volatile unsigned char *p = (volatile unsigned char *)(IO_PHYS+0x20000);
18
19 /* wait until transmit buffer is empty */
20 while((p[LSR] & TEMPTY) == 0x0)
21 barrier();
22
23 /* write next character */
24 *p = c;
25}
26
27static inline void flush(void)
28{
29}
30
31/*
32 * nothing to do
33 */
34#define arch_decomp_setup()
35#define arch_decomp_wdog()
36
37#endif
diff --git a/arch/arm/mach-h720x/include/mach/vmalloc.h b/arch/arm/mach-h720x/include/mach/vmalloc.h
new file mode 100644
index 000000000000..ff1460d6841b
--- /dev/null
+++ b/arch/arm/mach-h720x/include/mach/vmalloc.h
@@ -0,0 +1,10 @@
1/*
2 * arch/arm/mach-h720x/include/mach/vmalloc.h
3 */
4
5#ifndef __ARCH_ARM_VMALLOC_H
6#define __ARCH_ARM_VMALLOC_H
7
8#define VMALLOC_END (PAGE_OFFSET + 0x10000000)
9
10#endif
diff --git a/arch/arm/mach-imx/clock.c b/arch/arm/mach-imx/clock.c
index 8915a5fc63cd..4b4230db3765 100644
--- a/arch/arm/mach-imx/clock.c
+++ b/arch/arm/mach-imx/clock.c
@@ -23,7 +23,7 @@
23#include <linux/err.h> 23#include <linux/err.h>
24 24
25#include <asm/io.h> 25#include <asm/io.h>
26#include <asm/arch/imx-regs.h> 26#include <mach/imx-regs.h>
27 27
28/* 28/*
29 * Very simple approach: We can't disable clocks, so we do 29 * Very simple approach: We can't disable clocks, so we do
diff --git a/arch/arm/mach-imx/cpufreq.c b/arch/arm/mach-imx/cpufreq.c
index be0809b33e08..434b4ca0af67 100644
--- a/arch/arm/mach-imx/cpufreq.c
+++ b/arch/arm/mach-imx/cpufreq.c
@@ -36,7 +36,7 @@
36#include <linux/err.h> 36#include <linux/err.h>
37#include <asm/system.h> 37#include <asm/system.h>
38 38
39#include <asm/hardware.h> 39#include <mach/hardware.h>
40 40
41#include "generic.h" 41#include "generic.h"
42 42
diff --git a/arch/arm/mach-imx/dma.c b/arch/arm/mach-imx/dma.c
index ee1c6f06ff64..c10810c936b3 100644
--- a/arch/arm/mach-imx/dma.c
+++ b/arch/arm/mach-imx/dma.c
@@ -30,9 +30,9 @@
30 30
31#include <asm/system.h> 31#include <asm/system.h>
32#include <asm/irq.h> 32#include <asm/irq.h>
33#include <asm/hardware.h> 33#include <mach/hardware.h>
34#include <asm/dma.h> 34#include <asm/dma.h>
35#include <asm/arch/imx-dma.h> 35#include <mach/imx-dma.h>
36 36
37struct imx_dma_channel imx_dma_channels[IMX_DMA_CHANNELS]; 37struct imx_dma_channel imx_dma_channels[IMX_DMA_CHANNELS];
38 38
diff --git a/arch/arm/mach-imx/generic.c b/arch/arm/mach-imx/generic.c
index c40650dcddf5..fa72174dd95c 100644
--- a/arch/arm/mach-imx/generic.c
+++ b/arch/arm/mach-imx/generic.c
@@ -29,13 +29,13 @@
29#include <linux/string.h> 29#include <linux/string.h>
30 30
31#include <asm/errno.h> 31#include <asm/errno.h>
32#include <asm/arch/imxfb.h> 32#include <mach/imxfb.h>
33#include <asm/hardware.h> 33#include <mach/hardware.h>
34#include <asm/arch/imx-regs.h> 34#include <mach/imx-regs.h>
35 35
36#include <asm/mach/map.h> 36#include <asm/mach/map.h>
37#include <asm/arch/mmc.h> 37#include <mach/mmc.h>
38#include <asm/arch/gpio.h> 38#include <mach/gpio.h>
39 39
40unsigned long imx_gpio_alloc_map[(GPIO_PORT_MAX + 1) * 32 / BITS_PER_LONG]; 40unsigned long imx_gpio_alloc_map[(GPIO_PORT_MAX + 1) * 32 / BITS_PER_LONG];
41 41
diff --git a/arch/arm/mach-imx/include/mach/debug-macro.S b/arch/arm/mach-imx/include/mach/debug-macro.S
new file mode 100644
index 000000000000..87802bbfe633
--- /dev/null
+++ b/arch/arm/mach-imx/include/mach/debug-macro.S
@@ -0,0 +1,34 @@
1/* arch/arm/mach-imx/include/mach/debug-macro.S
2 *
3 * Debugging macro include header
4 *
5 * Copyright (C) 1994-1999 Russell King
6 * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 *
12*/
13
14 .macro addruart,rx
15 mrc p15, 0, \rx, c1, c0
16 tst \rx, #1 @ MMU enabled?
17 moveq \rx, #0x00000000 @ physical
18 movne \rx, #0xe0000000 @ virtual
19 orreq \rx, \rx, #0x00200000 @ physical
20 orr \rx, \rx, #0x00006000 @ UART1 offset
21 .endm
22
23 .macro senduart,rd,rx
24 str \rd, [\rx, #0x40] @ TXDATA
25 .endm
26
27 .macro waituart,rd,rx
28 .endm
29
30 .macro busyuart,rd,rx
311002: ldr \rd, [\rx, #0x98] @ SR2
32 tst \rd, #1 << 3 @ TXDC
33 beq 1002b @ wait until transmit done
34 .endm
diff --git a/include/asm-arm/arch-imx/dma.h b/arch/arm/mach-imx/include/mach/dma.h
index 621ff2c730f2..621ff2c730f2 100644
--- a/include/asm-arm/arch-imx/dma.h
+++ b/arch/arm/mach-imx/include/mach/dma.h
diff --git a/arch/arm/mach-imx/include/mach/entry-macro.S b/arch/arm/mach-imx/include/mach/entry-macro.S
new file mode 100644
index 000000000000..e4db679f7766
--- /dev/null
+++ b/arch/arm/mach-imx/include/mach/entry-macro.S
@@ -0,0 +1,32 @@
1/*
2 * arch/arm/mach-imx/include/mach/entry-macro.S
3 *
4 * Low-level IRQ helper macros for iMX-based platforms
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10#include <mach/hardware.h>
11
12 .macro disable_fiq
13 .endm
14
15 .macro get_irqnr_preamble, base, tmp
16 .endm
17
18 .macro arch_ret_to_user, tmp1, tmp2
19 .endm
20
21#define AITC_NIVECSR 0x40
22 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
23 ldr \base, =IO_ADDRESS(IMX_AITC_BASE)
24 @ Load offset & priority of the highest priority
25 @ interrupt pending.
26 ldr \irqstat, [\base, #AITC_NIVECSR]
27 @ Shift off the priority leaving the offset or
28 @ "interrupt number", use arithmetic shift to
29 @ transform illegal source (0xffff) as -1
30 mov \irqnr, \irqstat, asr #16
31 adds \tmp, \irqnr, #1
32 .endm
diff --git a/arch/arm/mach-imx/include/mach/gpio.h b/arch/arm/mach-imx/include/mach/gpio.h
new file mode 100644
index 000000000000..6e3d795f2264
--- /dev/null
+++ b/arch/arm/mach-imx/include/mach/gpio.h
@@ -0,0 +1,102 @@
1#ifndef _IMX_GPIO_H
2
3#include <mach/imx-regs.h>
4
5#define IMX_GPIO_ALLOC_MODE_NORMAL 0
6#define IMX_GPIO_ALLOC_MODE_NO_ALLOC 1
7#define IMX_GPIO_ALLOC_MODE_TRY_ALLOC 2
8#define IMX_GPIO_ALLOC_MODE_ALLOC_ONLY 4
9#define IMX_GPIO_ALLOC_MODE_RELEASE 8
10
11extern int imx_gpio_request(unsigned gpio, const char *label);
12
13extern void imx_gpio_free(unsigned gpio);
14
15extern int imx_gpio_setup_multiple_pins(const int *pin_list, unsigned count,
16 int alloc_mode, const char *label);
17
18extern int imx_gpio_direction_input(unsigned gpio);
19
20extern int imx_gpio_direction_output(unsigned gpio, int value);
21
22extern void __imx_gpio_set_value(unsigned gpio, int value);
23
24static inline int imx_gpio_get_value(unsigned gpio)
25{
26 return SSR(gpio >> GPIO_PORT_SHIFT) & (1 << (gpio & GPIO_PIN_MASK));
27}
28
29static inline void imx_gpio_set_value_inline(unsigned gpio, int value)
30{
31 unsigned long flags;
32
33 raw_local_irq_save(flags);
34 if(value)
35 DR(gpio >> GPIO_PORT_SHIFT) |= (1 << (gpio & GPIO_PIN_MASK));
36 else
37 DR(gpio >> GPIO_PORT_SHIFT) &= ~(1 << (gpio & GPIO_PIN_MASK));
38 raw_local_irq_restore(flags);
39}
40
41static inline void imx_gpio_set_value(unsigned gpio, int value)
42{
43 if(__builtin_constant_p(gpio))
44 imx_gpio_set_value_inline(gpio, value);
45 else
46 __imx_gpio_set_value(gpio, value);
47}
48
49extern int imx_gpio_to_irq(unsigned gpio);
50
51extern int imx_irq_to_gpio(unsigned irq);
52
53/*-------------------------------------------------------------------------*/
54
55/* Wrappers for "new style" GPIO calls. These calls i.MX specific versions
56 * to allow future extension of GPIO logic.
57 */
58
59static inline int gpio_request(unsigned gpio, const char *label)
60{
61 return imx_gpio_request(gpio, label);
62}
63
64static inline void gpio_free(unsigned gpio)
65{
66 imx_gpio_free(gpio);
67}
68
69static inline int gpio_direction_input(unsigned gpio)
70{
71 return imx_gpio_direction_input(gpio);
72}
73
74static inline int gpio_direction_output(unsigned gpio, int value)
75{
76 return imx_gpio_direction_output(gpio, value);
77}
78
79static inline int gpio_get_value(unsigned gpio)
80{
81 return imx_gpio_get_value(gpio);
82}
83
84static inline void gpio_set_value(unsigned gpio, int value)
85{
86 imx_gpio_set_value(gpio, value);
87}
88
89#include <asm-generic/gpio.h> /* cansleep wrappers */
90
91static inline int gpio_to_irq(unsigned gpio)
92{
93 return imx_gpio_to_irq(gpio);
94}
95
96static inline int irq_to_gpio(unsigned irq)
97{
98 return imx_irq_to_gpio(irq);
99}
100
101
102#endif
diff --git a/arch/arm/mach-imx/include/mach/hardware.h b/arch/arm/mach-imx/include/mach/hardware.h
new file mode 100644
index 000000000000..c73e9e724c75
--- /dev/null
+++ b/arch/arm/mach-imx/include/mach/hardware.h
@@ -0,0 +1,91 @@
1/*
2 * arch/arm/mach-imx/include/mach/hardware.h
3 *
4 * Copyright (C) 1999 ARM Limited.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20#ifndef __ASM_ARCH_HARDWARE_H
21#define __ASM_ARCH_HARDWARE_H
22
23#include <asm/sizes.h>
24#include "imx-regs.h"
25
26#ifndef __ASSEMBLY__
27# define __REG(x) (*((volatile u32 *)IO_ADDRESS(x)))
28
29# define __REG2(x,y) (*(volatile u32 *)((u32)&__REG(x) + (y)))
30#endif
31
32/*
33 * Memory map
34 */
35
36#define IMX_IO_PHYS 0x00200000
37#define IMX_IO_SIZE 0x00100000
38#define IMX_IO_BASE 0xe0000000
39
40#define IMX_CS0_PHYS 0x10000000
41#define IMX_CS0_SIZE 0x02000000
42#define IMX_CS0_VIRT 0xe8000000
43
44#define IMX_CS1_PHYS 0x12000000
45#define IMX_CS1_SIZE 0x01000000
46#define IMX_CS1_VIRT 0xea000000
47
48#define IMX_CS2_PHYS 0x13000000
49#define IMX_CS2_SIZE 0x01000000
50#define IMX_CS2_VIRT 0xeb000000
51
52#define IMX_CS3_PHYS 0x14000000
53#define IMX_CS3_SIZE 0x01000000
54#define IMX_CS3_VIRT 0xec000000
55
56#define IMX_CS4_PHYS 0x15000000
57#define IMX_CS4_SIZE 0x01000000
58#define IMX_CS4_VIRT 0xed000000
59
60#define IMX_CS5_PHYS 0x16000000
61#define IMX_CS5_SIZE 0x01000000
62#define IMX_CS5_VIRT 0xee000000
63
64#define IMX_FB_VIRT 0xF1000000
65#define IMX_FB_SIZE (256*1024)
66
67/* macro to get at IO space when running virtually */
68#define IO_ADDRESS(x) ((x) | IMX_IO_BASE)
69
70#ifndef __ASSEMBLY__
71/*
72 * Handy routine to set GPIO functions
73 */
74extern void imx_gpio_mode( int gpio_mode );
75
76#endif
77
78#define MAXIRQNUM 62
79#define MAXFIQNUM 62
80#define MAXSWINUM 62
81
82/*
83 * Use SDRAM for memory
84 */
85#define MEM_SIZE 0x01000000
86
87#ifdef CONFIG_ARCH_MX1ADS
88#include "mx1ads.h"
89#endif
90
91#endif
diff --git a/include/asm-arm/arch-imx/imx-dma.h b/arch/arm/mach-imx/include/mach/imx-dma.h
index 44d89c35539a..44d89c35539a 100644
--- a/include/asm-arm/arch-imx/imx-dma.h
+++ b/arch/arm/mach-imx/include/mach/imx-dma.h
diff --git a/include/asm-arm/arch-imx/imx-regs.h b/arch/arm/mach-imx/include/mach/imx-regs.h
index fb9de2733879..fb9de2733879 100644
--- a/include/asm-arm/arch-imx/imx-regs.h
+++ b/arch/arm/mach-imx/include/mach/imx-regs.h
diff --git a/include/asm-arm/arch-imx/imx-uart.h b/arch/arm/mach-imx/include/mach/imx-uart.h
index d54eb1d48026..d54eb1d48026 100644
--- a/include/asm-arm/arch-imx/imx-uart.h
+++ b/arch/arm/mach-imx/include/mach/imx-uart.h
diff --git a/include/asm-arm/arch-imx/imxfb.h b/arch/arm/mach-imx/include/mach/imxfb.h
index 3ed9ec8b9f00..3ed9ec8b9f00 100644
--- a/include/asm-arm/arch-imx/imxfb.h
+++ b/arch/arm/mach-imx/include/mach/imxfb.h
diff --git a/arch/arm/mach-imx/include/mach/io.h b/arch/arm/mach-imx/include/mach/io.h
new file mode 100644
index 000000000000..c50c5fa6fb81
--- /dev/null
+++ b/arch/arm/mach-imx/include/mach/io.h
@@ -0,0 +1,30 @@
1/*
2 * arch/arm/mach-imxads/include/mach/io.h
3 *
4 * Copyright (C) 1999 ARM Limited
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20#ifndef __ASM_ARM_ARCH_IO_H
21#define __ASM_ARM_ARCH_IO_H
22
23#include <mach/hardware.h>
24
25#define IO_SPACE_LIMIT 0xffffffff
26
27#define __io(a) ((void __iomem *)(a))
28#define __mem_pci(a) (a)
29
30#endif
diff --git a/arch/arm/mach-imx/include/mach/irqs.h b/arch/arm/mach-imx/include/mach/irqs.h
new file mode 100644
index 000000000000..eb8d5bd05d56
--- /dev/null
+++ b/arch/arm/mach-imx/include/mach/irqs.h
@@ -0,0 +1,116 @@
1/*
2 * arch/arm/mach-imxads/include/mach/irqs.h
3 *
4 * Copyright (C) 1999 ARM Limited
5 * Copyright (C) 2000 Deep Blue Solutions Ltd.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
21
22#ifndef __ARM_IRQS_H__
23#define __ARM_IRQS_H__
24
25/* Use the imx definitions */
26#include <mach/hardware.h>
27
28/*
29 * IMX Interrupt numbers
30 *
31 */
32#define INT_SOFTINT 0
33#define CSI_INT 6
34#define DSPA_MAC_INT 7
35#define DSPA_INT 8
36#define COMP_INT 9
37#define MSHC_XINT 10
38#define GPIO_INT_PORTA 11
39#define GPIO_INT_PORTB 12
40#define GPIO_INT_PORTC 13
41#define LCDC_INT 14
42#define SIM_INT 15
43#define SIM_DATA_INT 16
44#define RTC_INT 17
45#define RTC_SAMINT 18
46#define UART2_MINT_PFERR 19
47#define UART2_MINT_RTS 20
48#define UART2_MINT_DTR 21
49#define UART2_MINT_UARTC 22
50#define UART2_MINT_TX 23
51#define UART2_MINT_RX 24
52#define UART1_MINT_PFERR 25
53#define UART1_MINT_RTS 26
54#define UART1_MINT_DTR 27
55#define UART1_MINT_UARTC 28
56#define UART1_MINT_TX 29
57#define UART1_MINT_RX 30
58#define VOICE_DAC_INT 31
59#define VOICE_ADC_INT 32
60#define PEN_DATA_INT 33
61#define PWM_INT 34
62#define SDHC_INT 35
63#define I2C_INT 39
64#define CSPI_INT 41
65#define SSI_TX_INT 42
66#define SSI_TX_ERR_INT 43
67#define SSI_RX_INT 44
68#define SSI_RX_ERR_INT 45
69#define TOUCH_INT 46
70#define USBD_INT0 47
71#define USBD_INT1 48
72#define USBD_INT2 49
73#define USBD_INT3 50
74#define USBD_INT4 51
75#define USBD_INT5 52
76#define USBD_INT6 53
77#define BTSYS_INT 55
78#define BTTIM_INT 56
79#define BTWUI_INT 57
80#define TIM2_INT 58
81#define TIM1_INT 59
82#define DMA_ERR 60
83#define DMA_INT 61
84#define GPIO_INT_PORTD 62
85
86#define IMX_IRQS (64)
87
88/* note: the IMX has four gpio ports (A-D), but only
89 * the following pins are connected to the outside
90 * world:
91 *
92 * PORT A: bits 0-31
93 * PORT B: bits 8-31
94 * PORT C: bits 3-17
95 * PORT D: bits 6-31
96 *
97 * We map these interrupts straight on. As a result we have
98 * several holes in the interrupt mapping. We do this for two
99 * reasons:
100 * - mapping the interrupts without holes would get
101 * far more complicated
102 * - Motorola could well decide to bring some processor
103 * with more pins connected
104 */
105
106#define IRQ_GPIOA(x) (IMX_IRQS + x)
107#define IRQ_GPIOB(x) (IRQ_GPIOA(32) + x)
108#define IRQ_GPIOC(x) (IRQ_GPIOB(32) + x)
109#define IRQ_GPIOD(x) (IRQ_GPIOC(32) + x)
110
111/* decode irq number to use with IMR(x), ISR(x) and friends */
112#define IRQ_TO_REG(irq) ((irq - IMX_IRQS) >> 5)
113
114#define NR_IRQS (IRQ_GPIOD(32) + 1)
115#define IRQ_GPIO(x)
116#endif
diff --git a/arch/arm/mach-imx/include/mach/memory.h b/arch/arm/mach-imx/include/mach/memory.h
new file mode 100644
index 000000000000..5c453063c0ed
--- /dev/null
+++ b/arch/arm/mach-imx/include/mach/memory.h
@@ -0,0 +1,36 @@
1/*
2 * arch/arm/mach-imx/include/mach/memory.h
3 *
4 * Copyright (C) 1999 ARM Limited
5 * Copyright (C) 2002 Shane Nay (shane@minirl.com)
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
21#ifndef __ASM_ARCH_MMU_H
22#define __ASM_ARCH_MMU_H
23
24#define PHYS_OFFSET UL(0x08000000)
25
26/*
27 * Virtual view <-> DMA view memory address translations
28 * virt_to_bus: Used to translate the virtual address to an
29 * address suitable to be passed to set_dma_addr
30 * bus_to_virt: Used to convert an address for DMA operations
31 * to an address that the kernel can use.
32 */
33#define __virt_to_bus(x) (x - PAGE_OFFSET + PHYS_OFFSET)
34#define __bus_to_virt(x) (x - PHYS_OFFSET + PAGE_OFFSET)
35
36#endif
diff --git a/include/asm-arm/arch-imx/mmc.h b/arch/arm/mach-imx/include/mach/mmc.h
index 4712f354dcca..4712f354dcca 100644
--- a/include/asm-arm/arch-imx/mmc.h
+++ b/arch/arm/mach-imx/include/mach/mmc.h
diff --git a/arch/arm/mach-imx/include/mach/mx1ads.h b/arch/arm/mach-imx/include/mach/mx1ads.h
new file mode 100644
index 000000000000..def05d510eb3
--- /dev/null
+++ b/arch/arm/mach-imx/include/mach/mx1ads.h
@@ -0,0 +1,36 @@
1/*
2 * arch/arm/mach-imx/include/mach/mx1ads.h
3 *
4 * Copyright (C) 2004 Robert Schwebel, Pengutronix
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 *
20 */
21
22#ifndef __ASM_ARCH_MX1ADS_H
23#define __ASM_ARCH_MX1ADS_H
24
25/* ------------------------------------------------------------------------ */
26/* Memory Map for the M9328MX1ADS (MX1ADS) Board */
27/* ------------------------------------------------------------------------ */
28
29#define MX1ADS_FLASH_PHYS 0x10000000
30#define MX1ADS_FLASH_SIZE (16*1024*1024)
31
32#define IMX_FB_PHYS (0x0C000000 - 0x40000)
33
34#define CLK32 32000
35
36#endif /* __ASM_ARCH_MX1ADS_H */
diff --git a/arch/arm/mach-imx/include/mach/spi_imx.h b/arch/arm/mach-imx/include/mach/spi_imx.h
new file mode 100644
index 000000000000..4186430feecf
--- /dev/null
+++ b/arch/arm/mach-imx/include/mach/spi_imx.h
@@ -0,0 +1,72 @@
1/*
2 * arch/arm/mach-imx/include/mach/spi_imx.h
3 *
4 * Copyright (C) 2006 SWAPP
5 * Andrea Paterniani <a.paterniani@swapp-eng.it>
6 *
7 * Initial version inspired by:
8 * linux-2.6.17-rc3-mm1/arch/arm/mach-pxa/include/mach/pxa2xx_spi.h
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23 */
24
25#ifndef SPI_IMX_H_
26#define SPI_IMX_H_
27
28
29/*-------------------------------------------------------------------------*/
30/**
31 * struct spi_imx_master - device.platform_data for SPI controller devices.
32 * @num_chipselect: chipselects are used to distinguish individual
33 * SPI slaves, and are numbered from zero to num_chipselects - 1.
34 * each slave has a chipselect signal, but it's common that not
35 * every chipselect is connected to a slave.
36 * @enable_dma: if true enables DMA driven transfers.
37*/
38struct spi_imx_master {
39 u8 num_chipselect;
40 u8 enable_dma:1;
41};
42/*-------------------------------------------------------------------------*/
43
44
45/*-------------------------------------------------------------------------*/
46/**
47 * struct spi_imx_chip - spi_board_info.controller_data for SPI
48 * slave devices, copied to spi_device.controller_data.
49 * @enable_loopback : used for test purpouse to internally connect RX and TX
50 * sections.
51 * @enable_dma : enables dma transfer (provided that controller driver has
52 * dma enabled too).
53 * @ins_ss_pulse : enable /SS pulse insertion between SPI burst.
54 * @bclk_wait : number of bclk waits between each bits_per_word SPI burst.
55 * @cs_control : function pointer to board-specific function to assert/deassert
56 * I/O port to control HW generation of devices chip-select.
57*/
58struct spi_imx_chip {
59 u8 enable_loopback:1;
60 u8 enable_dma:1;
61 u8 ins_ss_pulse:1;
62 u16 bclk_wait:15;
63 void (*cs_control)(u32 control);
64};
65
66/* Chip-select state */
67#define SPI_CS_ASSERT (1 << 0)
68#define SPI_CS_DEASSERT (1 << 1)
69/*-------------------------------------------------------------------------*/
70
71
72#endif /* SPI_IMX_H_*/
diff --git a/arch/arm/mach-imx/include/mach/system.h b/arch/arm/mach-imx/include/mach/system.h
new file mode 100644
index 000000000000..adee7e51bab2
--- /dev/null
+++ b/arch/arm/mach-imx/include/mach/system.h
@@ -0,0 +1,40 @@
1/*
2 * arch/arm/mach-imxads/include/mach/system.h
3 *
4 * Copyright (C) 1999 ARM Limited
5 * Copyright (C) 2000 Deep Blue Solutions Ltd
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
21#ifndef __ASM_ARCH_SYSTEM_H
22#define __ASM_ARCH_SYSTEM_H
23
24static void
25arch_idle(void)
26{
27 /*
28 * This should do all the clock switching
29 * and wait for interrupt tricks
30 */
31 cpu_do_idle();
32}
33
34static inline void
35arch_reset(char mode)
36{
37 cpu_reset(0);
38}
39
40#endif
diff --git a/include/asm-arm/arch-imx/timex.h b/arch/arm/mach-imx/include/mach/timex.h
index e22ba789546c..e22ba789546c 100644
--- a/include/asm-arm/arch-imx/timex.h
+++ b/arch/arm/mach-imx/include/mach/timex.h
diff --git a/arch/arm/mach-imx/include/mach/uncompress.h b/arch/arm/mach-imx/include/mach/uncompress.h
new file mode 100644
index 000000000000..70523e67a8f6
--- /dev/null
+++ b/arch/arm/mach-imx/include/mach/uncompress.h
@@ -0,0 +1,71 @@
1/*
2 * arch/arm/mach-imxads/include/mach/uncompress.h
3 *
4 *
5 *
6 * Copyright (C) 1999 ARM Limited
7 * Copyright (C) Shane Nay (shane@minirl.com)
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 */
23
24#define UART(x) (*(volatile unsigned long *)(serial_port + (x)))
25
26#define UART1_BASE 0x206000
27#define UART2_BASE 0x207000
28#define USR2 0x98
29#define USR2_TXFE (1<<14)
30#define TXR 0x40
31#define UCR1 0x80
32#define UCR1_UARTEN 1
33
34/*
35 * The following code assumes the serial port has already been
36 * initialized by the bootloader. We search for the first enabled
37 * port in the most probable order. If you didn't setup a port in
38 * your bootloader then nothing will appear (which might be desired).
39 *
40 * This does not append a newline
41 */
42static void putc(int c)
43{
44 unsigned long serial_port;
45
46 do {
47 serial_port = UART1_BASE;
48 if ( UART(UCR1) & UCR1_UARTEN )
49 break;
50 serial_port = UART2_BASE;
51 if ( UART(UCR1) & UCR1_UARTEN )
52 break;
53 return;
54 } while(0);
55
56 while (!(UART(USR2) & USR2_TXFE))
57 barrier();
58
59 UART(TXR) = c;
60}
61
62static inline void flush(void)
63{
64}
65
66/*
67 * nothing to do
68 */
69#define arch_decomp_setup()
70
71#define arch_decomp_wdog()
diff --git a/arch/arm/mach-imx/include/mach/vmalloc.h b/arch/arm/mach-imx/include/mach/vmalloc.h
new file mode 100644
index 000000000000..7d7cb0bde3e8
--- /dev/null
+++ b/arch/arm/mach-imx/include/mach/vmalloc.h
@@ -0,0 +1,20 @@
1/*
2 * arch/arm/mach-imx/include/mach/vmalloc.h
3 *
4 * Copyright (C) 2000 Russell King.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20#define VMALLOC_END (PAGE_OFFSET + 0x10000000)
diff --git a/arch/arm/mach-imx/irq.c b/arch/arm/mach-imx/irq.c
index e1b1f028b930..798f221eb3b7 100644
--- a/arch/arm/mach-imx/irq.c
+++ b/arch/arm/mach-imx/irq.c
@@ -27,7 +27,7 @@
27#include <linux/list.h> 27#include <linux/list.h>
28#include <linux/timer.h> 28#include <linux/timer.h>
29 29
30#include <asm/hardware.h> 30#include <mach/hardware.h>
31#include <asm/irq.h> 31#include <asm/irq.h>
32#include <asm/io.h> 32#include <asm/io.h>
33 33
diff --git a/arch/arm/mach-imx/leds-mx1ads.c b/arch/arm/mach-imx/leds-mx1ads.c
index 79236404aec2..af81621f689b 100644
--- a/arch/arm/mach-imx/leds-mx1ads.c
+++ b/arch/arm/mach-imx/leds-mx1ads.c
@@ -13,7 +13,7 @@
13 13
14#include <linux/kernel.h> 14#include <linux/kernel.h>
15#include <linux/init.h> 15#include <linux/init.h>
16#include <asm/hardware.h> 16#include <mach/hardware.h>
17#include <asm/system.h> 17#include <asm/system.h>
18#include <asm/io.h> 18#include <asm/io.h>
19#include <asm/leds.h> 19#include <asm/leds.h>
diff --git a/arch/arm/mach-imx/mx1ads.c b/arch/arm/mach-imx/mx1ads.c
index baeff24ff02d..87fa1ff43b0b 100644
--- a/arch/arm/mach-imx/mx1ads.c
+++ b/arch/arm/mach-imx/mx1ads.c
@@ -16,7 +16,7 @@
16#include <linux/init.h> 16#include <linux/init.h>
17#include <linux/platform_device.h> 17#include <linux/platform_device.h>
18#include <asm/system.h> 18#include <asm/system.h>
19#include <asm/hardware.h> 19#include <mach/hardware.h>
20#include <asm/irq.h> 20#include <asm/irq.h>
21#include <asm/pgtable.h> 21#include <asm/pgtable.h>
22#include <asm/page.h> 22#include <asm/page.h>
@@ -25,8 +25,8 @@
25#include <asm/mach-types.h> 25#include <asm/mach-types.h>
26 26
27#include <asm/mach/arch.h> 27#include <asm/mach/arch.h>
28#include <asm/arch/mmc.h> 28#include <mach/mmc.h>
29#include <asm/arch/imx-uart.h> 29#include <mach/imx-uart.h>
30#include <linux/interrupt.h> 30#include <linux/interrupt.h>
31#include "generic.h" 31#include "generic.h"
32 32
diff --git a/arch/arm/mach-imx/time.c b/arch/arm/mach-imx/time.c
index 5a41e96e8586..08be3875c59e 100644
--- a/arch/arm/mach-imx/time.c
+++ b/arch/arm/mach-imx/time.c
@@ -19,7 +19,7 @@
19#include <linux/clockchips.h> 19#include <linux/clockchips.h>
20#include <linux/clk.h> 20#include <linux/clk.h>
21 21
22#include <asm/hardware.h> 22#include <mach/hardware.h>
23#include <asm/io.h> 23#include <asm/io.h>
24#include <asm/leds.h> 24#include <asm/leds.h>
25#include <asm/irq.h> 25#include <asm/irq.h>
diff --git a/arch/arm/mach-integrator/core.c b/arch/arm/mach-integrator/core.c
index 7fbbc17f8e8b..8bacf6d4d097 100644
--- a/arch/arm/mach-integrator/core.c
+++ b/arch/arm/mach-integrator/core.c
@@ -20,11 +20,11 @@
20#include <linux/amba/bus.h> 20#include <linux/amba/bus.h>
21#include <linux/amba/serial.h> 21#include <linux/amba/serial.h>
22 22
23#include <asm/hardware.h> 23#include <mach/hardware.h>
24#include <asm/irq.h> 24#include <asm/irq.h>
25#include <asm/io.h> 25#include <asm/io.h>
26#include <asm/hardware/arm_timer.h> 26#include <asm/hardware/arm_timer.h>
27#include <asm/arch/cm.h> 27#include <mach/cm.h>
28#include <asm/system.h> 28#include <asm/system.h>
29#include <asm/leds.h> 29#include <asm/leds.h>
30#include <asm/mach/time.h> 30#include <asm/mach/time.h>
diff --git a/arch/arm/mach-integrator/cpu.c b/arch/arm/mach-integrator/cpu.c
index 71c58bff304c..ce5ea7c26675 100644
--- a/arch/arm/mach-integrator/cpu.c
+++ b/arch/arm/mach-integrator/cpu.c
@@ -20,7 +20,7 @@
20#include <linux/smp.h> 20#include <linux/smp.h>
21#include <linux/init.h> 21#include <linux/init.h>
22 22
23#include <asm/hardware.h> 23#include <mach/hardware.h>
24#include <asm/io.h> 24#include <asm/io.h>
25#include <asm/mach-types.h> 25#include <asm/mach-types.h>
26#include <asm/hardware/icst525.h> 26#include <asm/hardware/icst525.h>
diff --git a/arch/arm/mach-integrator/impd1.c b/arch/arm/mach-integrator/impd1.c
index 5a1588cf8242..0a7b3267c8d8 100644
--- a/arch/arm/mach-integrator/impd1.c
+++ b/arch/arm/mach-integrator/impd1.c
@@ -23,8 +23,8 @@
23 23
24#include <asm/io.h> 24#include <asm/io.h>
25#include <asm/hardware/icst525.h> 25#include <asm/hardware/icst525.h>
26#include <asm/arch/lm.h> 26#include <mach/lm.h>
27#include <asm/arch/impd1.h> 27#include <mach/impd1.h>
28#include <asm/sizes.h> 28#include <asm/sizes.h>
29 29
30#include "clock.h" 30#include "clock.h"
diff --git a/include/asm-arm/arch-integrator/bits.h b/arch/arm/mach-integrator/include/mach/bits.h
index 09b024e0496a..09b024e0496a 100644
--- a/include/asm-arm/arch-integrator/bits.h
+++ b/arch/arm/mach-integrator/include/mach/bits.h
diff --git a/include/asm-arm/arch-integrator/cm.h b/arch/arm/mach-integrator/include/mach/cm.h
index 1ab353e23595..1ab353e23595 100644
--- a/include/asm-arm/arch-integrator/cm.h
+++ b/arch/arm/mach-integrator/include/mach/cm.h
diff --git a/arch/arm/mach-integrator/include/mach/debug-macro.S b/arch/arm/mach-integrator/include/mach/debug-macro.S
new file mode 100644
index 000000000000..d347d659ea30
--- /dev/null
+++ b/arch/arm/mach-integrator/include/mach/debug-macro.S
@@ -0,0 +1,22 @@
1/* arch/arm/mach-integrator/include/mach/debug-macro.S
2 *
3 * Debugging macro include header
4 *
5 * Copyright (C) 1994-1999 Russell King
6 * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 *
12*/
13
14 .macro addruart,rx
15 mrc p15, 0, \rx, c1, c0
16 tst \rx, #1 @ MMU enabled?
17 moveq \rx, #0x16000000 @ physical base address
18 movne \rx, #0xf0000000 @ virtual base
19 addne \rx, \rx, #0x16000000 >> 4
20 .endm
21
22#include <asm/hardware/debug-pl01x.S>
diff --git a/arch/arm/mach-integrator/include/mach/dma.h b/arch/arm/mach-integrator/include/mach/dma.h
new file mode 100644
index 000000000000..fbebe85a2db7
--- /dev/null
+++ b/arch/arm/mach-integrator/include/mach/dma.h
@@ -0,0 +1,19 @@
1/*
2 * arch/arm/mach-integrator/include/mach/dma.h
3 *
4 * Copyright (C) 1997,1998 Russell King
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
diff --git a/arch/arm/mach-integrator/include/mach/entry-macro.S b/arch/arm/mach-integrator/include/mach/entry-macro.S
new file mode 100644
index 000000000000..7649c57acb53
--- /dev/null
+++ b/arch/arm/mach-integrator/include/mach/entry-macro.S
@@ -0,0 +1,44 @@
1/*
2 * arch/arm/mach-integrator/include/mach/entry-macro.S
3 *
4 * Low-level IRQ helper macros for Integrator platforms
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10#include <mach/hardware.h>
11#include <mach/irqs.h>
12
13 .macro disable_fiq
14 .endm
15
16 .macro get_irqnr_preamble, base, tmp
17 .endm
18
19 .macro arch_ret_to_user, tmp1, tmp2
20 .endm
21
22 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
23/* FIXME: should not be using soo many LDRs here */
24 ldr \base, =IO_ADDRESS(INTEGRATOR_IC_BASE)
25 mov \irqnr, #IRQ_PIC_START
26 ldr \irqstat, [\base, #IRQ_STATUS] @ get masked status
27 ldr \base, =IO_ADDRESS(INTEGRATOR_HDR_BASE)
28 teq \irqstat, #0
29 ldreq \irqstat, [\base, #(INTEGRATOR_HDR_IC_OFFSET+IRQ_STATUS)]
30 moveq \irqnr, #IRQ_CIC_START
31
321001: tst \irqstat, #15
33 bne 1002f
34 add \irqnr, \irqnr, #4
35 movs \irqstat, \irqstat, lsr #4
36 bne 1001b
371002: tst \irqstat, #1
38 bne 1003f
39 add \irqnr, \irqnr, #1
40 movs \irqstat, \irqstat, lsr #1
41 bne 1002b
421003: /* EQ will be set if no irqs pending */
43 .endm
44
diff --git a/arch/arm/mach-integrator/include/mach/hardware.h b/arch/arm/mach-integrator/include/mach/hardware.h
new file mode 100644
index 000000000000..1251319ef9ae
--- /dev/null
+++ b/arch/arm/mach-integrator/include/mach/hardware.h
@@ -0,0 +1,48 @@
1/*
2 * arch/arm/mach-integrator/include/mach/hardware.h
3 *
4 * This file contains the hardware definitions of the Integrator.
5 *
6 * Copyright (C) 1999 ARM Limited.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 */
22#ifndef __ASM_ARCH_HARDWARE_H
23#define __ASM_ARCH_HARDWARE_H
24
25#include <asm/sizes.h>
26#include <mach/platform.h>
27
28/*
29 * Where in virtual memory the IO devices (timers, system controllers
30 * and so on)
31 */
32#define IO_BASE 0xF0000000 // VA of IO
33#define IO_SIZE 0x0B000000 // How much?
34#define IO_START INTEGRATOR_HDR_BASE // PA of IO
35
36#define PCIO_BASE PCI_IO_VADDR
37#define PCIMEM_BASE PCI_MEMORY_VADDR
38
39/* macro to get at IO space when running virtually */
40#define IO_ADDRESS(x) (((x) >> 4) + IO_BASE)
41
42#define pcibios_assign_all_busses() 1
43
44#define PCIBIOS_MIN_IO 0x6000
45#define PCIBIOS_MIN_MEM 0x00100000
46
47#endif
48
diff --git a/include/asm-arm/arch-integrator/impd1.h b/arch/arm/mach-integrator/include/mach/impd1.h
index d75de4b14237..d75de4b14237 100644
--- a/include/asm-arm/arch-integrator/impd1.h
+++ b/arch/arm/mach-integrator/include/mach/impd1.h
diff --git a/arch/arm/mach-integrator/include/mach/io.h b/arch/arm/mach-integrator/include/mach/io.h
new file mode 100644
index 000000000000..f21bb5493dd9
--- /dev/null
+++ b/arch/arm/mach-integrator/include/mach/io.h
@@ -0,0 +1,36 @@
1/*
2 * arch/arm/mach-integrator/include/mach/io.h
3 *
4 * Copyright (C) 1999 ARM Limited
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20#ifndef __ASM_ARM_ARCH_IO_H
21#define __ASM_ARM_ARCH_IO_H
22
23#define IO_SPACE_LIMIT 0xffff
24
25/*
26 * WARNING: this has to mirror definitions in platform.h
27 */
28#define PCI_MEMORY_VADDR 0xe8000000
29#define PCI_CONFIG_VADDR 0xec000000
30#define PCI_V3_VADDR 0xed000000
31#define PCI_IO_VADDR 0xee000000
32
33#define __io(a) ((void __iomem *)(PCI_IO_VADDR + (a)))
34#define __mem_pci(a) (a)
35
36#endif
diff --git a/arch/arm/mach-integrator/include/mach/irqs.h b/arch/arm/mach-integrator/include/mach/irqs.h
new file mode 100644
index 000000000000..1fbe6d190222
--- /dev/null
+++ b/arch/arm/mach-integrator/include/mach/irqs.h
@@ -0,0 +1,82 @@
1/*
2 * arch/arm/mach-integrator/include/mach/irqs.h
3 *
4 * Copyright (C) 1999 ARM Limited
5 * Copyright (C) 2000 Deep Blue Solutions Ltd.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
21
22/*
23 * Interrupt numbers
24 */
25#define IRQ_PIC_START 0
26#define IRQ_SOFTINT 0
27#define IRQ_UARTINT0 1
28#define IRQ_UARTINT1 2
29#define IRQ_KMIINT0 3
30#define IRQ_KMIINT1 4
31#define IRQ_TIMERINT0 5
32#define IRQ_TIMERINT1 6
33#define IRQ_TIMERINT2 7
34#define IRQ_RTCINT 8
35#define IRQ_AP_EXPINT0 9
36#define IRQ_AP_EXPINT1 10
37#define IRQ_AP_EXPINT2 11
38#define IRQ_AP_EXPINT3 12
39#define IRQ_AP_PCIINT0 13
40#define IRQ_AP_PCIINT1 14
41#define IRQ_AP_PCIINT2 15
42#define IRQ_AP_PCIINT3 16
43#define IRQ_AP_V3INT 17
44#define IRQ_AP_CPINT0 18
45#define IRQ_AP_CPINT1 19
46#define IRQ_AP_LBUSTIMEOUT 20
47#define IRQ_AP_APCINT 21
48#define IRQ_CP_CLCDCINT 22
49#define IRQ_CP_MMCIINT0 23
50#define IRQ_CP_MMCIINT1 24
51#define IRQ_CP_AACIINT 25
52#define IRQ_CP_CPPLDINT 26
53#define IRQ_CP_ETHINT 27
54#define IRQ_CP_TSPENINT 28
55#define IRQ_PIC_END 31
56
57#define IRQ_CIC_START 32
58#define IRQ_CM_SOFTINT 32
59#define IRQ_CM_COMMRX 33
60#define IRQ_CM_COMMTX 34
61#define IRQ_CIC_END 34
62
63/*
64 * IntegratorCP only
65 */
66#define IRQ_SIC_START 35
67#define IRQ_SIC_CP_SOFTINT 35
68#define IRQ_SIC_CP_RI0 36
69#define IRQ_SIC_CP_RI1 37
70#define IRQ_SIC_CP_CARDIN 38
71#define IRQ_SIC_CP_LMINT0 39
72#define IRQ_SIC_CP_LMINT1 40
73#define IRQ_SIC_CP_LMINT2 41
74#define IRQ_SIC_CP_LMINT3 42
75#define IRQ_SIC_CP_LMINT4 43
76#define IRQ_SIC_CP_LMINT5 44
77#define IRQ_SIC_CP_LMINT6 45
78#define IRQ_SIC_CP_LMINT7 46
79#define IRQ_SIC_END 46
80
81#define NR_IRQS 47
82
diff --git a/include/asm-arm/arch-integrator/lm.h b/arch/arm/mach-integrator/include/mach/lm.h
index 28186b6f2c09..28186b6f2c09 100644
--- a/include/asm-arm/arch-integrator/lm.h
+++ b/arch/arm/mach-integrator/include/mach/lm.h
diff --git a/arch/arm/mach-integrator/include/mach/memory.h b/arch/arm/mach-integrator/include/mach/memory.h
new file mode 100644
index 000000000000..be7e63c21d25
--- /dev/null
+++ b/arch/arm/mach-integrator/include/mach/memory.h
@@ -0,0 +1,39 @@
1/*
2 * arch/arm/mach-integrator/include/mach/memory.h
3 *
4 * Copyright (C) 1999 ARM Limited
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20#ifndef __ASM_ARCH_MEMORY_H
21#define __ASM_ARCH_MEMORY_H
22
23/*
24 * Physical DRAM offset.
25 */
26#define PHYS_OFFSET UL(0x00000000)
27#define BUS_OFFSET UL(0x80000000)
28
29/*
30 * Virtual view <-> DMA view memory address translations
31 * virt_to_bus: Used to translate the virtual address to an
32 * address suitable to be passed to set_dma_addr
33 * bus_to_virt: Used to convert an address for DMA operations
34 * to an address that the kernel can use.
35 */
36#define __virt_to_bus(x) (x - PAGE_OFFSET + BUS_OFFSET)
37#define __bus_to_virt(x) (x - BUS_OFFSET + PAGE_OFFSET)
38
39#endif
diff --git a/include/asm-arm/arch-integrator/platform.h b/arch/arm/mach-integrator/include/mach/platform.h
index 83c4c1ceb411..83c4c1ceb411 100644
--- a/include/asm-arm/arch-integrator/platform.h
+++ b/arch/arm/mach-integrator/include/mach/platform.h
diff --git a/arch/arm/mach-integrator/include/mach/system.h b/arch/arm/mach-integrator/include/mach/system.h
new file mode 100644
index 000000000000..c485345c8c77
--- /dev/null
+++ b/arch/arm/mach-integrator/include/mach/system.h
@@ -0,0 +1,44 @@
1/*
2 * arch/arm/mach-integrator/include/mach/system.h
3 *
4 * Copyright (C) 1999 ARM Limited
5 * Copyright (C) 2000 Deep Blue Solutions Ltd
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
21#ifndef __ASM_ARCH_SYSTEM_H
22#define __ASM_ARCH_SYSTEM_H
23
24#include <mach/cm.h>
25
26static inline void arch_idle(void)
27{
28 /*
29 * This should do all the clock switching
30 * and wait for interrupt tricks
31 */
32 cpu_do_idle();
33}
34
35static inline void arch_reset(char mode)
36{
37 /*
38 * To reset, we hit the on-board reset register
39 * in the system FPGA
40 */
41 cm_control(CM_CTRL_RESET, CM_CTRL_RESET);
42}
43
44#endif
diff --git a/arch/arm/mach-integrator/include/mach/timex.h b/arch/arm/mach-integrator/include/mach/timex.h
new file mode 100644
index 000000000000..1dcb42028c82
--- /dev/null
+++ b/arch/arm/mach-integrator/include/mach/timex.h
@@ -0,0 +1,26 @@
1/*
2 * arch/arm/mach-integrator/include/mach/timex.h
3 *
4 * Integrator architecture timex specifications
5 *
6 * Copyright (C) 1999 ARM Limited
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 */
22
23/*
24 * ??
25 */
26#define CLOCK_TICK_RATE (50000000 / 16)
diff --git a/arch/arm/mach-integrator/include/mach/uncompress.h b/arch/arm/mach-integrator/include/mach/uncompress.h
new file mode 100644
index 000000000000..30452f00a164
--- /dev/null
+++ b/arch/arm/mach-integrator/include/mach/uncompress.h
@@ -0,0 +1,50 @@
1/*
2 * arch/arm/mach-integrator/include/mach/uncompress.h
3 *
4 * Copyright (C) 1999 ARM Limited
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20
21#define AMBA_UART_DR (*(volatile unsigned char *)0x16000000)
22#define AMBA_UART_LCRH (*(volatile unsigned char *)0x16000008)
23#define AMBA_UART_LCRM (*(volatile unsigned char *)0x1600000c)
24#define AMBA_UART_LCRL (*(volatile unsigned char *)0x16000010)
25#define AMBA_UART_CR (*(volatile unsigned char *)0x16000014)
26#define AMBA_UART_FR (*(volatile unsigned char *)0x16000018)
27
28/*
29 * This does not append a newline
30 */
31static void putc(int c)
32{
33 while (AMBA_UART_FR & (1 << 5))
34 barrier();
35
36 AMBA_UART_DR = c;
37}
38
39static inline void flush(void)
40{
41 while (AMBA_UART_FR & (1 << 3))
42 barrier();
43}
44
45/*
46 * nothing to do
47 */
48#define arch_decomp_setup()
49
50#define arch_decomp_wdog()
diff --git a/arch/arm/mach-integrator/include/mach/vmalloc.h b/arch/arm/mach-integrator/include/mach/vmalloc.h
new file mode 100644
index 000000000000..e87ab0b37bdd
--- /dev/null
+++ b/arch/arm/mach-integrator/include/mach/vmalloc.h
@@ -0,0 +1,20 @@
1/*
2 * arch/arm/mach-integrator/include/mach/vmalloc.h
3 *
4 * Copyright (C) 2000 Russell King.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20#define VMALLOC_END (PAGE_OFFSET + 0x10000000)
diff --git a/arch/arm/mach-integrator/integrator_ap.c b/arch/arm/mach-integrator/integrator_ap.c
index df37e93c6fc9..6e472b5f8f26 100644
--- a/arch/arm/mach-integrator/integrator_ap.c
+++ b/arch/arm/mach-integrator/integrator_ap.c
@@ -28,14 +28,14 @@
28#include <linux/amba/bus.h> 28#include <linux/amba/bus.h>
29#include <linux/amba/kmi.h> 29#include <linux/amba/kmi.h>
30 30
31#include <asm/hardware.h> 31#include <mach/hardware.h>
32#include <asm/io.h> 32#include <asm/io.h>
33#include <asm/irq.h> 33#include <asm/irq.h>
34#include <asm/setup.h> 34#include <asm/setup.h>
35#include <asm/param.h> /* HZ */ 35#include <asm/param.h> /* HZ */
36#include <asm/mach-types.h> 36#include <asm/mach-types.h>
37 37
38#include <asm/arch/lm.h> 38#include <mach/lm.h>
39 39
40#include <asm/mach/arch.h> 40#include <asm/mach/arch.h>
41#include <asm/mach/flash.h> 41#include <asm/mach/flash.h>
diff --git a/arch/arm/mach-integrator/integrator_cp.c b/arch/arm/mach-integrator/integrator_cp.c
index 913f64b22405..6b99e9c258bd 100644
--- a/arch/arm/mach-integrator/integrator_cp.c
+++ b/arch/arm/mach-integrator/integrator_cp.c
@@ -20,15 +20,15 @@
20#include <linux/amba/kmi.h> 20#include <linux/amba/kmi.h>
21#include <linux/amba/clcd.h> 21#include <linux/amba/clcd.h>
22 22
23#include <asm/hardware.h> 23#include <mach/hardware.h>
24#include <asm/io.h> 24#include <asm/io.h>
25#include <asm/irq.h> 25#include <asm/irq.h>
26#include <asm/setup.h> 26#include <asm/setup.h>
27#include <asm/mach-types.h> 27#include <asm/mach-types.h>
28#include <asm/hardware/icst525.h> 28#include <asm/hardware/icst525.h>
29 29
30#include <asm/arch/cm.h> 30#include <mach/cm.h>
31#include <asm/arch/lm.h> 31#include <mach/lm.h>
32 32
33#include <asm/mach/arch.h> 33#include <asm/mach/arch.h>
34#include <asm/mach/flash.h> 34#include <asm/mach/flash.h>
diff --git a/arch/arm/mach-integrator/leds.c b/arch/arm/mach-integrator/leds.c
index f1436e683b49..7bc6881434ec 100644
--- a/arch/arm/mach-integrator/leds.c
+++ b/arch/arm/mach-integrator/leds.c
@@ -25,12 +25,12 @@
25#include <linux/smp.h> 25#include <linux/smp.h>
26#include <linux/spinlock.h> 26#include <linux/spinlock.h>
27 27
28#include <asm/hardware.h> 28#include <mach/hardware.h>
29#include <asm/io.h> 29#include <asm/io.h>
30#include <asm/leds.h> 30#include <asm/leds.h>
31#include <asm/system.h> 31#include <asm/system.h>
32#include <asm/mach-types.h> 32#include <asm/mach-types.h>
33#include <asm/arch/cm.h> 33#include <mach/cm.h>
34 34
35static int saved_leds; 35static int saved_leds;
36 36
diff --git a/arch/arm/mach-integrator/lm.c b/arch/arm/mach-integrator/lm.c
index f939c5091405..f52c7af31eaa 100644
--- a/arch/arm/mach-integrator/lm.c
+++ b/arch/arm/mach-integrator/lm.c
@@ -12,7 +12,7 @@
12#include <linux/device.h> 12#include <linux/device.h>
13#include <linux/slab.h> 13#include <linux/slab.h>
14 14
15#include <asm/arch/lm.h> 15#include <mach/lm.h>
16 16
17#define to_lm_device(d) container_of(d, struct lm_device, dev) 17#define to_lm_device(d) container_of(d, struct lm_device, dev)
18#define to_lm_driver(d) container_of(d, struct lm_driver, drv) 18#define to_lm_driver(d) container_of(d, struct lm_driver, drv)
diff --git a/arch/arm/mach-integrator/pci_v3.c b/arch/arm/mach-integrator/pci_v3.c
index c07f497000ca..9f2b1ea8fb20 100644
--- a/arch/arm/mach-integrator/pci_v3.c
+++ b/arch/arm/mach-integrator/pci_v3.c
@@ -28,7 +28,7 @@
28#include <linux/spinlock.h> 28#include <linux/spinlock.h>
29#include <linux/init.h> 29#include <linux/init.h>
30 30
31#include <asm/hardware.h> 31#include <mach/hardware.h>
32#include <asm/io.h> 32#include <asm/io.h>
33#include <asm/irq.h> 33#include <asm/irq.h>
34#include <asm/system.h> 34#include <asm/system.h>
diff --git a/arch/arm/mach-iop13xx/include/mach/adma.h b/arch/arm/mach-iop13xx/include/mach/adma.h
new file mode 100644
index 000000000000..60019c8e6465
--- /dev/null
+++ b/arch/arm/mach-iop13xx/include/mach/adma.h
@@ -0,0 +1,537 @@
1/*
2 * Copyright(c) 2006, Intel Corporation.
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms and conditions of the GNU General Public License,
6 * version 2, as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
11 * more details.
12 *
13 * You should have received a copy of the GNU General Public License along with
14 * this program; if not, write to the Free Software Foundation, Inc.,
15 * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
16 *
17 */
18#ifndef _ADMA_H
19#define _ADMA_H
20#include <linux/types.h>
21#include <linux/io.h>
22#include <mach/hardware.h>
23#include <asm/hardware/iop_adma.h>
24
25#define ADMA_ACCR(chan) (chan->mmr_base + 0x0)
26#define ADMA_ACSR(chan) (chan->mmr_base + 0x4)
27#define ADMA_ADAR(chan) (chan->mmr_base + 0x8)
28#define ADMA_IIPCR(chan) (chan->mmr_base + 0x18)
29#define ADMA_IIPAR(chan) (chan->mmr_base + 0x1c)
30#define ADMA_IIPUAR(chan) (chan->mmr_base + 0x20)
31#define ADMA_ANDAR(chan) (chan->mmr_base + 0x24)
32#define ADMA_ADCR(chan) (chan->mmr_base + 0x28)
33#define ADMA_CARMD(chan) (chan->mmr_base + 0x2c)
34#define ADMA_ABCR(chan) (chan->mmr_base + 0x30)
35#define ADMA_DLADR(chan) (chan->mmr_base + 0x34)
36#define ADMA_DUADR(chan) (chan->mmr_base + 0x38)
37#define ADMA_SLAR(src, chan) (chan->mmr_base + (0x3c + (src << 3)))
38#define ADMA_SUAR(src, chan) (chan->mmr_base + (0x40 + (src << 3)))
39
40struct iop13xx_adma_src {
41 u32 src_addr;
42 union {
43 u32 upper_src_addr;
44 struct {
45 unsigned int pq_upper_src_addr:24;
46 unsigned int pq_dmlt:8;
47 };
48 };
49};
50
51struct iop13xx_adma_desc_ctrl {
52 unsigned int int_en:1;
53 unsigned int xfer_dir:2;
54 unsigned int src_select:4;
55 unsigned int zero_result:1;
56 unsigned int block_fill_en:1;
57 unsigned int crc_gen_en:1;
58 unsigned int crc_xfer_dis:1;
59 unsigned int crc_seed_fetch_dis:1;
60 unsigned int status_write_back_en:1;
61 unsigned int endian_swap_en:1;
62 unsigned int reserved0:2;
63 unsigned int pq_update_xfer_en:1;
64 unsigned int dual_xor_en:1;
65 unsigned int pq_xfer_en:1;
66 unsigned int p_xfer_dis:1;
67 unsigned int reserved1:10;
68 unsigned int relax_order_en:1;
69 unsigned int no_snoop_en:1;
70};
71
72struct iop13xx_adma_byte_count {
73 unsigned int byte_count:24;
74 unsigned int host_if:3;
75 unsigned int reserved:2;
76 unsigned int zero_result_err_q:1;
77 unsigned int zero_result_err:1;
78 unsigned int tx_complete:1;
79};
80
81struct iop13xx_adma_desc_hw {
82 u32 next_desc;
83 union {
84 u32 desc_ctrl;
85 struct iop13xx_adma_desc_ctrl desc_ctrl_field;
86 };
87 union {
88 u32 crc_addr;
89 u32 block_fill_data;
90 u32 q_dest_addr;
91 };
92 union {
93 u32 byte_count;
94 struct iop13xx_adma_byte_count byte_count_field;
95 };
96 union {
97 u32 dest_addr;
98 u32 p_dest_addr;
99 };
100 union {
101 u32 upper_dest_addr;
102 u32 pq_upper_dest_addr;
103 };
104 struct iop13xx_adma_src src[1];
105};
106
107struct iop13xx_adma_desc_dual_xor {
108 u32 next_desc;
109 u32 desc_ctrl;
110 u32 reserved;
111 u32 byte_count;
112 u32 h_dest_addr;
113 u32 h_upper_dest_addr;
114 u32 src0_addr;
115 u32 upper_src0_addr;
116 u32 src1_addr;
117 u32 upper_src1_addr;
118 u32 h_src_addr;
119 u32 h_upper_src_addr;
120 u32 d_src_addr;
121 u32 d_upper_src_addr;
122 u32 d_dest_addr;
123 u32 d_upper_dest_addr;
124};
125
126struct iop13xx_adma_desc_pq_update {
127 u32 next_desc;
128 u32 desc_ctrl;
129 u32 reserved;
130 u32 byte_count;
131 u32 p_dest_addr;
132 u32 p_upper_dest_addr;
133 u32 src0_addr;
134 u32 upper_src0_addr;
135 u32 src1_addr;
136 u32 upper_src1_addr;
137 u32 p_src_addr;
138 u32 p_upper_src_addr;
139 u32 q_src_addr;
140 struct {
141 unsigned int q_upper_src_addr:24;
142 unsigned int q_dmlt:8;
143 };
144 u32 q_dest_addr;
145 u32 q_upper_dest_addr;
146};
147
148static inline int iop_adma_get_max_xor(void)
149{
150 return 16;
151}
152
153static inline u32 iop_chan_get_current_descriptor(struct iop_adma_chan *chan)
154{
155 return __raw_readl(ADMA_ADAR(chan));
156}
157
158static inline void iop_chan_set_next_descriptor(struct iop_adma_chan *chan,
159 u32 next_desc_addr)
160{
161 __raw_writel(next_desc_addr, ADMA_ANDAR(chan));
162}
163
164#define ADMA_STATUS_BUSY (1 << 13)
165
166static inline char iop_chan_is_busy(struct iop_adma_chan *chan)
167{
168 if (__raw_readl(ADMA_ACSR(chan)) &
169 ADMA_STATUS_BUSY)
170 return 1;
171 else
172 return 0;
173}
174
175static inline int
176iop_chan_get_desc_align(struct iop_adma_chan *chan, int num_slots)
177{
178 return 1;
179}
180#define iop_desc_is_aligned(x, y) 1
181
182static inline int
183iop_chan_memcpy_slot_count(size_t len, int *slots_per_op)
184{
185 *slots_per_op = 1;
186 return 1;
187}
188
189#define iop_chan_interrupt_slot_count(s, c) iop_chan_memcpy_slot_count(0, s)
190
191static inline int
192iop_chan_memset_slot_count(size_t len, int *slots_per_op)
193{
194 *slots_per_op = 1;
195 return 1;
196}
197
198static inline int
199iop_chan_xor_slot_count(size_t len, int src_cnt, int *slots_per_op)
200{
201 static const char slot_count_table[] = { 1, 2, 2, 2,
202 2, 3, 3, 3,
203 3, 4, 4, 4,
204 4, 5, 5, 5,
205 };
206 *slots_per_op = slot_count_table[src_cnt - 1];
207 return *slots_per_op;
208}
209
210#define ADMA_MAX_BYTE_COUNT (16 * 1024 * 1024)
211#define IOP_ADMA_MAX_BYTE_COUNT ADMA_MAX_BYTE_COUNT
212#define IOP_ADMA_ZERO_SUM_MAX_BYTE_COUNT ADMA_MAX_BYTE_COUNT
213#define IOP_ADMA_XOR_MAX_BYTE_COUNT ADMA_MAX_BYTE_COUNT
214#define iop_chan_zero_sum_slot_count(l, s, o) iop_chan_xor_slot_count(l, s, o)
215
216static inline u32 iop_desc_get_dest_addr(struct iop_adma_desc_slot *desc,
217 struct iop_adma_chan *chan)
218{
219 struct iop13xx_adma_desc_hw *hw_desc = desc->hw_desc;
220 return hw_desc->dest_addr;
221}
222
223static inline u32 iop_desc_get_byte_count(struct iop_adma_desc_slot *desc,
224 struct iop_adma_chan *chan)
225{
226 struct iop13xx_adma_desc_hw *hw_desc = desc->hw_desc;
227 return hw_desc->byte_count_field.byte_count;
228}
229
230static inline u32 iop_desc_get_src_addr(struct iop_adma_desc_slot *desc,
231 struct iop_adma_chan *chan,
232 int src_idx)
233{
234 struct iop13xx_adma_desc_hw *hw_desc = desc->hw_desc;
235 return hw_desc->src[src_idx].src_addr;
236}
237
238static inline u32 iop_desc_get_src_count(struct iop_adma_desc_slot *desc,
239 struct iop_adma_chan *chan)
240{
241 struct iop13xx_adma_desc_hw *hw_desc = desc->hw_desc;
242 return hw_desc->desc_ctrl_field.src_select + 1;
243}
244
245static inline void
246iop_desc_init_memcpy(struct iop_adma_desc_slot *desc, unsigned long flags)
247{
248 struct iop13xx_adma_desc_hw *hw_desc = desc->hw_desc;
249 union {
250 u32 value;
251 struct iop13xx_adma_desc_ctrl field;
252 } u_desc_ctrl;
253
254 u_desc_ctrl.value = 0;
255 u_desc_ctrl.field.xfer_dir = 3; /* local to internal bus */
256 u_desc_ctrl.field.int_en = flags & DMA_PREP_INTERRUPT;
257 hw_desc->desc_ctrl = u_desc_ctrl.value;
258 hw_desc->crc_addr = 0;
259}
260
261static inline void
262iop_desc_init_memset(struct iop_adma_desc_slot *desc, unsigned long flags)
263{
264 struct iop13xx_adma_desc_hw *hw_desc = desc->hw_desc;
265 union {
266 u32 value;
267 struct iop13xx_adma_desc_ctrl field;
268 } u_desc_ctrl;
269
270 u_desc_ctrl.value = 0;
271 u_desc_ctrl.field.xfer_dir = 3; /* local to internal bus */
272 u_desc_ctrl.field.block_fill_en = 1;
273 u_desc_ctrl.field.int_en = flags & DMA_PREP_INTERRUPT;
274 hw_desc->desc_ctrl = u_desc_ctrl.value;
275 hw_desc->crc_addr = 0;
276}
277
278/* to do: support buffers larger than ADMA_MAX_BYTE_COUNT */
279static inline void
280iop_desc_init_xor(struct iop_adma_desc_slot *desc, int src_cnt,
281 unsigned long flags)
282{
283 struct iop13xx_adma_desc_hw *hw_desc = desc->hw_desc;
284 union {
285 u32 value;
286 struct iop13xx_adma_desc_ctrl field;
287 } u_desc_ctrl;
288
289 u_desc_ctrl.value = 0;
290 u_desc_ctrl.field.src_select = src_cnt - 1;
291 u_desc_ctrl.field.xfer_dir = 3; /* local to internal bus */
292 u_desc_ctrl.field.int_en = flags & DMA_PREP_INTERRUPT;
293 hw_desc->desc_ctrl = u_desc_ctrl.value;
294 hw_desc->crc_addr = 0;
295
296}
297#define iop_desc_init_null_xor(d, s, i) iop_desc_init_xor(d, s, i)
298
299/* to do: support buffers larger than ADMA_MAX_BYTE_COUNT */
300static inline int
301iop_desc_init_zero_sum(struct iop_adma_desc_slot *desc, int src_cnt,
302 unsigned long flags)
303{
304 struct iop13xx_adma_desc_hw *hw_desc = desc->hw_desc;
305 union {
306 u32 value;
307 struct iop13xx_adma_desc_ctrl field;
308 } u_desc_ctrl;
309
310 u_desc_ctrl.value = 0;
311 u_desc_ctrl.field.src_select = src_cnt - 1;
312 u_desc_ctrl.field.xfer_dir = 3; /* local to internal bus */
313 u_desc_ctrl.field.zero_result = 1;
314 u_desc_ctrl.field.status_write_back_en = 1;
315 u_desc_ctrl.field.int_en = flags & DMA_PREP_INTERRUPT;
316 hw_desc->desc_ctrl = u_desc_ctrl.value;
317 hw_desc->crc_addr = 0;
318
319 return 1;
320}
321
322static inline void iop_desc_set_byte_count(struct iop_adma_desc_slot *desc,
323 struct iop_adma_chan *chan,
324 u32 byte_count)
325{
326 struct iop13xx_adma_desc_hw *hw_desc = desc->hw_desc;
327 hw_desc->byte_count = byte_count;
328}
329
330static inline void
331iop_desc_set_zero_sum_byte_count(struct iop_adma_desc_slot *desc, u32 len)
332{
333 int slots_per_op = desc->slots_per_op;
334 struct iop13xx_adma_desc_hw *hw_desc = desc->hw_desc, *iter;
335 int i = 0;
336
337 if (len <= IOP_ADMA_ZERO_SUM_MAX_BYTE_COUNT) {
338 hw_desc->byte_count = len;
339 } else {
340 do {
341 iter = iop_hw_desc_slot_idx(hw_desc, i);
342 iter->byte_count = IOP_ADMA_ZERO_SUM_MAX_BYTE_COUNT;
343 len -= IOP_ADMA_ZERO_SUM_MAX_BYTE_COUNT;
344 i += slots_per_op;
345 } while (len > IOP_ADMA_ZERO_SUM_MAX_BYTE_COUNT);
346
347 if (len) {
348 iter = iop_hw_desc_slot_idx(hw_desc, i);
349 iter->byte_count = len;
350 }
351 }
352}
353
354
355static inline void iop_desc_set_dest_addr(struct iop_adma_desc_slot *desc,
356 struct iop_adma_chan *chan,
357 dma_addr_t addr)
358{
359 struct iop13xx_adma_desc_hw *hw_desc = desc->hw_desc;
360 hw_desc->dest_addr = addr;
361 hw_desc->upper_dest_addr = 0;
362}
363
364static inline void iop_desc_set_memcpy_src_addr(struct iop_adma_desc_slot *desc,
365 dma_addr_t addr)
366{
367 struct iop13xx_adma_desc_hw *hw_desc = desc->hw_desc;
368 hw_desc->src[0].src_addr = addr;
369 hw_desc->src[0].upper_src_addr = 0;
370}
371
372static inline void iop_desc_set_xor_src_addr(struct iop_adma_desc_slot *desc,
373 int src_idx, dma_addr_t addr)
374{
375 int slot_cnt = desc->slot_cnt, slots_per_op = desc->slots_per_op;
376 struct iop13xx_adma_desc_hw *hw_desc = desc->hw_desc, *iter;
377 int i = 0;
378
379 do {
380 iter = iop_hw_desc_slot_idx(hw_desc, i);
381 iter->src[src_idx].src_addr = addr;
382 iter->src[src_idx].upper_src_addr = 0;
383 slot_cnt -= slots_per_op;
384 if (slot_cnt) {
385 i += slots_per_op;
386 addr += IOP_ADMA_XOR_MAX_BYTE_COUNT;
387 }
388 } while (slot_cnt);
389}
390
391static inline void
392iop_desc_init_interrupt(struct iop_adma_desc_slot *desc,
393 struct iop_adma_chan *chan)
394{
395 iop_desc_init_memcpy(desc, 1);
396 iop_desc_set_byte_count(desc, chan, 0);
397 iop_desc_set_dest_addr(desc, chan, 0);
398 iop_desc_set_memcpy_src_addr(desc, 0);
399}
400
401#define iop_desc_set_zero_sum_src_addr iop_desc_set_xor_src_addr
402
403static inline void iop_desc_set_next_desc(struct iop_adma_desc_slot *desc,
404 u32 next_desc_addr)
405{
406 struct iop13xx_adma_desc_hw *hw_desc = desc->hw_desc;
407 BUG_ON(hw_desc->next_desc);
408 hw_desc->next_desc = next_desc_addr;
409}
410
411static inline u32 iop_desc_get_next_desc(struct iop_adma_desc_slot *desc)
412{
413 struct iop13xx_adma_desc_hw *hw_desc = desc->hw_desc;
414 return hw_desc->next_desc;
415}
416
417static inline void iop_desc_clear_next_desc(struct iop_adma_desc_slot *desc)
418{
419 struct iop13xx_adma_desc_hw *hw_desc = desc->hw_desc;
420 hw_desc->next_desc = 0;
421}
422
423static inline void iop_desc_set_block_fill_val(struct iop_adma_desc_slot *desc,
424 u32 val)
425{
426 struct iop13xx_adma_desc_hw *hw_desc = desc->hw_desc;
427 hw_desc->block_fill_data = val;
428}
429
430static inline int iop_desc_get_zero_result(struct iop_adma_desc_slot *desc)
431{
432 struct iop13xx_adma_desc_hw *hw_desc = desc->hw_desc;
433 struct iop13xx_adma_desc_ctrl desc_ctrl = hw_desc->desc_ctrl_field;
434 struct iop13xx_adma_byte_count byte_count = hw_desc->byte_count_field;
435
436 BUG_ON(!(byte_count.tx_complete && desc_ctrl.zero_result));
437
438 if (desc_ctrl.pq_xfer_en)
439 return byte_count.zero_result_err_q;
440 else
441 return byte_count.zero_result_err;
442}
443
444static inline void iop_chan_append(struct iop_adma_chan *chan)
445{
446 u32 adma_accr;
447
448 adma_accr = __raw_readl(ADMA_ACCR(chan));
449 adma_accr |= 0x2;
450 __raw_writel(adma_accr, ADMA_ACCR(chan));
451}
452
453static inline u32 iop_chan_get_status(struct iop_adma_chan *chan)
454{
455 return __raw_readl(ADMA_ACSR(chan));
456}
457
458static inline void iop_chan_disable(struct iop_adma_chan *chan)
459{
460 u32 adma_chan_ctrl = __raw_readl(ADMA_ACCR(chan));
461 adma_chan_ctrl &= ~0x1;
462 __raw_writel(adma_chan_ctrl, ADMA_ACCR(chan));
463}
464
465static inline void iop_chan_enable(struct iop_adma_chan *chan)
466{
467 u32 adma_chan_ctrl;
468
469 adma_chan_ctrl = __raw_readl(ADMA_ACCR(chan));
470 adma_chan_ctrl |= 0x1;
471 __raw_writel(adma_chan_ctrl, ADMA_ACCR(chan));
472}
473
474static inline void iop_adma_device_clear_eot_status(struct iop_adma_chan *chan)
475{
476 u32 status = __raw_readl(ADMA_ACSR(chan));
477 status &= (1 << 12);
478 __raw_writel(status, ADMA_ACSR(chan));
479}
480
481static inline void iop_adma_device_clear_eoc_status(struct iop_adma_chan *chan)
482{
483 u32 status = __raw_readl(ADMA_ACSR(chan));
484 status &= (1 << 11);
485 __raw_writel(status, ADMA_ACSR(chan));
486}
487
488static inline void iop_adma_device_clear_err_status(struct iop_adma_chan *chan)
489{
490 u32 status = __raw_readl(ADMA_ACSR(chan));
491 status &= (1 << 9) | (1 << 5) | (1 << 4) | (1 << 3);
492 __raw_writel(status, ADMA_ACSR(chan));
493}
494
495static inline int
496iop_is_err_int_parity(unsigned long status, struct iop_adma_chan *chan)
497{
498 return test_bit(9, &status);
499}
500
501static inline int
502iop_is_err_mcu_abort(unsigned long status, struct iop_adma_chan *chan)
503{
504 return test_bit(5, &status);
505}
506
507static inline int
508iop_is_err_int_tabort(unsigned long status, struct iop_adma_chan *chan)
509{
510 return test_bit(4, &status);
511}
512
513static inline int
514iop_is_err_int_mabort(unsigned long status, struct iop_adma_chan *chan)
515{
516 return test_bit(3, &status);
517}
518
519static inline int
520iop_is_err_pci_tabort(unsigned long status, struct iop_adma_chan *chan)
521{
522 return 0;
523}
524
525static inline int
526iop_is_err_pci_mabort(unsigned long status, struct iop_adma_chan *chan)
527{
528 return 0;
529}
530
531static inline int
532iop_is_err_split_tx(unsigned long status, struct iop_adma_chan *chan)
533{
534 return 0;
535}
536
537#endif /* _ADMA_H */
diff --git a/arch/arm/mach-iop13xx/include/mach/debug-macro.S b/arch/arm/mach-iop13xx/include/mach/debug-macro.S
new file mode 100644
index 000000000000..9037d2e8557c
--- /dev/null
+++ b/arch/arm/mach-iop13xx/include/mach/debug-macro.S
@@ -0,0 +1,26 @@
1/*
2 * arch/arm/mach-iop13xx/include/mach/debug-macro.S
3 *
4 * Debugging macro include header
5 *
6 * Copyright (C) 1994-1999 Russell King
7 * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12 */
13
14 .macro addruart, rx
15 mrc p15, 0, \rx, c1, c0
16 tst \rx, #1 @ mmu enabled?
17 moveq \rx, #0xff000000 @ physical
18 orreq \rx, \rx, #0x00d80000
19 movne \rx, #0xfe000000 @ virtual
20 orrne \rx, \rx, #0x00e80000
21 orr \rx, \rx, #0x00002300
22 orr \rx, \rx, #0x00000040
23 .endm
24
25#define UART_SHIFT 2
26#include <asm/hardware/debug-8250.S>
diff --git a/include/asm-arm/arch-iop13xx/dma.h b/arch/arm/mach-iop13xx/include/mach/dma.h
index d79846fbb394..d79846fbb394 100644
--- a/include/asm-arm/arch-iop13xx/dma.h
+++ b/arch/arm/mach-iop13xx/include/mach/dma.h
diff --git a/include/asm-arm/arch-iop13xx/entry-macro.S b/arch/arm/mach-iop13xx/include/mach/entry-macro.S
index a624a7870c64..a624a7870c64 100644
--- a/include/asm-arm/arch-iop13xx/entry-macro.S
+++ b/arch/arm/mach-iop13xx/include/mach/entry-macro.S
diff --git a/include/asm-arm/arch-iop13xx/hardware.h b/arch/arm/mach-iop13xx/include/mach/hardware.h
index 8e1d56289846..8e1d56289846 100644
--- a/include/asm-arm/arch-iop13xx/hardware.h
+++ b/arch/arm/mach-iop13xx/include/mach/hardware.h
diff --git a/include/asm-arm/arch-iop13xx/io.h b/arch/arm/mach-iop13xx/include/mach/io.h
index a6e0f9e6ddcf..a6e0f9e6ddcf 100644
--- a/include/asm-arm/arch-iop13xx/io.h
+++ b/arch/arm/mach-iop13xx/include/mach/io.h
diff --git a/include/asm-arm/arch-iop13xx/iop13xx.h b/arch/arm/mach-iop13xx/include/mach/iop13xx.h
index 52b7fab7ef60..52b7fab7ef60 100644
--- a/include/asm-arm/arch-iop13xx/iop13xx.h
+++ b/arch/arm/mach-iop13xx/include/mach/iop13xx.h
diff --git a/include/asm-arm/arch-iop13xx/iq81340.h b/arch/arm/mach-iop13xx/include/mach/iq81340.h
index ba2cf931e9ce..ba2cf931e9ce 100644
--- a/include/asm-arm/arch-iop13xx/iq81340.h
+++ b/arch/arm/mach-iop13xx/include/mach/iq81340.h
diff --git a/include/asm-arm/arch-iop13xx/irqs.h b/arch/arm/mach-iop13xx/include/mach/irqs.h
index 054e7acb5bfa..054e7acb5bfa 100644
--- a/include/asm-arm/arch-iop13xx/irqs.h
+++ b/arch/arm/mach-iop13xx/include/mach/irqs.h
diff --git a/arch/arm/mach-iop13xx/include/mach/memory.h b/arch/arm/mach-iop13xx/include/mach/memory.h
new file mode 100644
index 000000000000..e8b59d8f1bb9
--- /dev/null
+++ b/arch/arm/mach-iop13xx/include/mach/memory.h
@@ -0,0 +1,64 @@
1#ifndef __ASM_ARCH_MEMORY_H
2#define __ASM_ARCH_MEMORY_H
3
4#include <mach/hardware.h>
5
6/*
7 * Physical DRAM offset.
8 */
9#define PHYS_OFFSET UL(0x00000000)
10#define TASK_SIZE UL(0x3f000000)
11#define PAGE_OFFSET UL(0x40000000)
12#define TASK_UNMAPPED_BASE ((TASK_SIZE + 0x01000000) / 3)
13
14#ifndef __ASSEMBLY__
15
16#if defined(CONFIG_ARCH_IOP13XX)
17#define IOP13XX_PMMR_V_START (IOP13XX_PMMR_VIRT_MEM_BASE)
18#define IOP13XX_PMMR_V_END (IOP13XX_PMMR_VIRT_MEM_BASE + IOP13XX_PMMR_SIZE)
19#define IOP13XX_PMMR_P_START (IOP13XX_PMMR_PHYS_MEM_BASE)
20#define IOP13XX_PMMR_P_END (IOP13XX_PMMR_PHYS_MEM_BASE + IOP13XX_PMMR_SIZE)
21
22/*
23 * Virtual view <-> PCI DMA view memory address translations
24 * virt_to_bus: Used to translate the virtual address to an
25 * address suitable to be passed to set_dma_addr
26 * bus_to_virt: Used to convert an address for DMA operations
27 * to an address that the kernel can use.
28 */
29
30/* RAM has 1:1 mapping on the PCIe/x Busses */
31#define __virt_to_bus(x) (__virt_to_phys(x))
32#define __bus_to_virt(x) (__phys_to_virt(x))
33
34#define virt_to_lbus(x) \
35(( ((void*)(x) >= (void*)IOP13XX_PMMR_V_START) && \
36((void*)(x) < (void*)IOP13XX_PMMR_V_END) ) ? \
37((x) - IOP13XX_PMMR_VIRT_MEM_BASE + IOP13XX_PMMR_PHYS_MEM_BASE) : \
38((x) - PAGE_OFFSET + PHYS_OFFSET))
39
40#define lbus_to_virt(x) \
41(( ((x) >= IOP13XX_PMMR_P_START) && ((x) < IOP13XX_PMMR_P_END) ) ? \
42((x) - IOP13XX_PMMR_PHYS_MEM_BASE + IOP13XX_PMMR_VIRT_MEM_BASE ) : \
43((x) - PHYS_OFFSET + PAGE_OFFSET))
44
45/* Device is an lbus device if it is on the platform bus of the IOP13XX */
46#define is_lbus_device(dev) (dev &&\
47 (strncmp(dev->bus->name, "platform", 8) == 0))
48
49#define __arch_page_to_dma(dev, page) \
50({is_lbus_device(dev) ? (dma_addr_t)virt_to_lbus(page_address(page)) : \
51(dma_addr_t)__virt_to_bus(page_address(page));})
52
53#define __arch_dma_to_virt(dev, addr) \
54({is_lbus_device(dev) ? lbus_to_virt(addr) : __bus_to_virt(addr);})
55
56#define __arch_virt_to_dma(dev, addr) \
57({is_lbus_device(dev) ? virt_to_lbus(addr) : __virt_to_bus(addr);})
58
59#endif /* CONFIG_ARCH_IOP13XX */
60#endif /* !ASSEMBLY */
61
62#define PFN_TO_NID(addr) (0)
63
64#endif
diff --git a/include/asm-arm/arch-iop13xx/msi.h b/arch/arm/mach-iop13xx/include/mach/msi.h
index b80c5ae17e99..b80c5ae17e99 100644
--- a/include/asm-arm/arch-iop13xx/msi.h
+++ b/arch/arm/mach-iop13xx/include/mach/msi.h
diff --git a/arch/arm/mach-iop13xx/include/mach/pci.h b/arch/arm/mach-iop13xx/include/mach/pci.h
new file mode 100644
index 000000000000..17b5515af8b1
--- /dev/null
+++ b/arch/arm/mach-iop13xx/include/mach/pci.h
@@ -0,0 +1,57 @@
1#ifndef _IOP13XX_PCI_H_
2#define _IOP13XX_PCI_H_
3#include <mach/irqs.h>
4#include <asm/io.h>
5
6struct pci_sys_data;
7struct hw_pci;
8int iop13xx_pci_setup(int nr, struct pci_sys_data *sys);
9struct pci_bus *iop13xx_scan_bus(int nr, struct pci_sys_data *);
10void iop13xx_atu_select(struct hw_pci *plat_pci);
11void iop13xx_pci_init(void);
12void iop13xx_map_pci_memory(void);
13
14#define IOP_PCI_STATUS_ERROR (PCI_STATUS_PARITY | \
15 PCI_STATUS_SIG_TARGET_ABORT | \
16 PCI_STATUS_REC_TARGET_ABORT | \
17 PCI_STATUS_REC_TARGET_ABORT | \
18 PCI_STATUS_REC_MASTER_ABORT | \
19 PCI_STATUS_SIG_SYSTEM_ERROR | \
20 PCI_STATUS_DETECTED_PARITY)
21
22#define IOP13XX_ATUE_ATUISR_ERROR (IOP13XX_ATUE_STAT_HALT_ON_ERROR | \
23 IOP13XX_ATUE_STAT_ROOT_SYS_ERR | \
24 IOP13XX_ATUE_STAT_PCI_IFACE_ERR | \
25 IOP13XX_ATUE_STAT_ERR_COR | \
26 IOP13XX_ATUE_STAT_ERR_UNCOR | \
27 IOP13XX_ATUE_STAT_CRS | \
28 IOP13XX_ATUE_STAT_DET_PAR_ERR | \
29 IOP13XX_ATUE_STAT_EXT_REC_MABORT | \
30 IOP13XX_ATUE_STAT_SIG_TABORT | \
31 IOP13XX_ATUE_STAT_EXT_REC_TABORT | \
32 IOP13XX_ATUE_STAT_MASTER_DATA_PAR)
33
34#define IOP13XX_ATUX_ATUISR_ERROR (IOP13XX_ATUX_STAT_TX_SCEM | \
35 IOP13XX_ATUX_STAT_REC_SCEM | \
36 IOP13XX_ATUX_STAT_TX_SERR | \
37 IOP13XX_ATUX_STAT_DET_PAR_ERR | \
38 IOP13XX_ATUX_STAT_INT_REC_MABORT | \
39 IOP13XX_ATUX_STAT_REC_SERR | \
40 IOP13XX_ATUX_STAT_EXT_REC_MABORT | \
41 IOP13XX_ATUX_STAT_EXT_REC_TABORT | \
42 IOP13XX_ATUX_STAT_EXT_SIG_TABORT | \
43 IOP13XX_ATUX_STAT_MASTER_DATA_PAR)
44
45/* PCI interrupts
46 */
47#define ATUX_INTA IRQ_IOP13XX_XINT0
48#define ATUX_INTB IRQ_IOP13XX_XINT1
49#define ATUX_INTC IRQ_IOP13XX_XINT2
50#define ATUX_INTD IRQ_IOP13XX_XINT3
51
52#define ATUE_INTA IRQ_IOP13XX_ATUE_IMA
53#define ATUE_INTB IRQ_IOP13XX_ATUE_IMB
54#define ATUE_INTC IRQ_IOP13XX_ATUE_IMC
55#define ATUE_INTD IRQ_IOP13XX_ATUE_IMD
56
57#endif /* _IOP13XX_PCI_H_ */
diff --git a/arch/arm/mach-iop13xx/include/mach/system.h b/arch/arm/mach-iop13xx/include/mach/system.h
new file mode 100644
index 000000000000..c7127f416e1f
--- /dev/null
+++ b/arch/arm/mach-iop13xx/include/mach/system.h
@@ -0,0 +1,27 @@
1/*
2 * arch/arm/mach-iop13xx/include/mach/system.h
3 *
4 * Copyright (C) 2004 Intel Corp.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10#include <mach/iop13xx.h>
11static inline void arch_idle(void)
12{
13 cpu_do_idle();
14}
15
16static inline void arch_reset(char mode)
17{
18 /*
19 * Reset the internal bus (warning both cores are reset)
20 */
21 write_wdtcr(IOP_WDTCR_EN_ARM);
22 write_wdtcr(IOP_WDTCR_EN);
23 write_wdtsr(IOP13XX_WDTSR_WRITE_EN | IOP13XX_WDTCR_IB_RESET);
24 write_wdtcr(0x1000);
25
26 for(;;);
27}
diff --git a/include/asm-arm/arch-iop13xx/time.h b/arch/arm/mach-iop13xx/include/mach/time.h
index 49213d9d7cad..49213d9d7cad 100644
--- a/include/asm-arm/arch-iop13xx/time.h
+++ b/arch/arm/mach-iop13xx/include/mach/time.h
diff --git a/arch/arm/mach-iop13xx/include/mach/timex.h b/arch/arm/mach-iop13xx/include/mach/timex.h
new file mode 100644
index 000000000000..5b1f1c8a8270
--- /dev/null
+++ b/arch/arm/mach-iop13xx/include/mach/timex.h
@@ -0,0 +1,3 @@
1#include <mach/hardware.h>
2
3#define CLOCK_TICK_RATE (100 * HZ)
diff --git a/arch/arm/mach-iop13xx/include/mach/uncompress.h b/arch/arm/mach-iop13xx/include/mach/uncompress.h
new file mode 100644
index 000000000000..fa4f80522fad
--- /dev/null
+++ b/arch/arm/mach-iop13xx/include/mach/uncompress.h
@@ -0,0 +1,23 @@
1#include <asm/types.h>
2#include <linux/serial_reg.h>
3#include <mach/hardware.h>
4
5#define UART_BASE ((volatile u32 *)IOP13XX_UART1_PHYS)
6#define TX_DONE (UART_LSR_TEMT | UART_LSR_THRE)
7
8static inline void putc(char c)
9{
10 while ((UART_BASE[UART_LSR] & TX_DONE) != TX_DONE)
11 barrier();
12 UART_BASE[UART_TX] = c;
13}
14
15static inline void flush(void)
16{
17}
18
19/*
20 * nothing to do
21 */
22#define arch_decomp_setup()
23#define arch_decomp_wdog()
diff --git a/include/asm-arm/arch-iop13xx/vmalloc.h b/arch/arm/mach-iop13xx/include/mach/vmalloc.h
index c53456740345..c53456740345 100644
--- a/include/asm-arm/arch-iop13xx/vmalloc.h
+++ b/arch/arm/mach-iop13xx/include/mach/vmalloc.h
diff --git a/arch/arm/mach-iop13xx/io.c b/arch/arm/mach-iop13xx/io.c
index 5b22fdeca52c..26cfa318142c 100644
--- a/arch/arm/mach-iop13xx/io.c
+++ b/arch/arm/mach-iop13xx/io.c
@@ -18,7 +18,7 @@
18 */ 18 */
19#include <linux/kernel.h> 19#include <linux/kernel.h>
20#include <linux/module.h> 20#include <linux/module.h>
21#include <asm/hardware.h> 21#include <mach/hardware.h>
22#include <asm/io.h> 22#include <asm/io.h>
23 23
24void * __iomem __iop13xx_io(unsigned long io_addr) 24void * __iomem __iop13xx_io(unsigned long io_addr)
diff --git a/arch/arm/mach-iop13xx/iq81340mc.c b/arch/arm/mach-iop13xx/iq81340mc.c
index 77b24cd1d88d..5051c03d437c 100644
--- a/arch/arm/mach-iop13xx/iq81340mc.c
+++ b/arch/arm/mach-iop13xx/iq81340mc.c
@@ -18,14 +18,14 @@
18 */ 18 */
19#include <linux/pci.h> 19#include <linux/pci.h>
20 20
21#include <asm/hardware.h> 21#include <mach/hardware.h>
22#include <asm/irq.h> 22#include <asm/irq.h>
23#include <asm/mach/pci.h> 23#include <asm/mach/pci.h>
24#include <asm/mach-types.h> 24#include <asm/mach-types.h>
25#include <asm/mach/arch.h> 25#include <asm/mach/arch.h>
26#include <asm/arch/pci.h> 26#include <mach/pci.h>
27#include <asm/mach/time.h> 27#include <asm/mach/time.h>
28#include <asm/arch/time.h> 28#include <mach/time.h>
29 29
30extern int init_atu; /* Flag to select which ATU(s) to initialize / disable */ 30extern int init_atu; /* Flag to select which ATU(s) to initialize / disable */
31 31
diff --git a/arch/arm/mach-iop13xx/iq81340sc.c b/arch/arm/mach-iop13xx/iq81340sc.c
index e8522b3b8163..bc443073a8e3 100644
--- a/arch/arm/mach-iop13xx/iq81340sc.c
+++ b/arch/arm/mach-iop13xx/iq81340sc.c
@@ -18,14 +18,14 @@
18 */ 18 */
19#include <linux/pci.h> 19#include <linux/pci.h>
20 20
21#include <asm/hardware.h> 21#include <mach/hardware.h>
22#include <asm/irq.h> 22#include <asm/irq.h>
23#include <asm/mach/pci.h> 23#include <asm/mach/pci.h>
24#include <asm/mach-types.h> 24#include <asm/mach-types.h>
25#include <asm/mach/arch.h> 25#include <asm/mach/arch.h>
26#include <asm/arch/pci.h> 26#include <mach/pci.h>
27#include <asm/mach/time.h> 27#include <asm/mach/time.h>
28#include <asm/arch/time.h> 28#include <mach/time.h>
29 29
30extern int init_atu; 30extern int init_atu;
31 31
diff --git a/arch/arm/mach-iop13xx/irq.c b/arch/arm/mach-iop13xx/irq.c
index 69f07b25b3c9..0d099ca87bdf 100644
--- a/arch/arm/mach-iop13xx/irq.c
+++ b/arch/arm/mach-iop13xx/irq.c
@@ -23,10 +23,9 @@
23#include <asm/uaccess.h> 23#include <asm/uaccess.h>
24#include <asm/mach/irq.h> 24#include <asm/mach/irq.h>
25#include <asm/irq.h> 25#include <asm/irq.h>
26#include <asm/hardware.h> 26#include <mach/hardware.h>
27#include <asm/mach-types.h> 27#include <mach/irqs.h>
28#include <asm/arch/irqs.h> 28#include <mach/msi.h>
29#include <asm/arch/msi.h>
30 29
31/* INTCTL0 CP6 R0 Page 4 30/* INTCTL0 CP6 R0 Page 4
32 */ 31 */
diff --git a/arch/arm/mach-iop13xx/pci.c b/arch/arm/mach-iop13xx/pci.c
index 7825c1aaa27b..673b0db22034 100644
--- a/arch/arm/mach-iop13xx/pci.c
+++ b/arch/arm/mach-iop13xx/pci.c
@@ -21,11 +21,11 @@
21#include <linux/delay.h> 21#include <linux/delay.h>
22#include <linux/jiffies.h> 22#include <linux/jiffies.h>
23#include <asm/irq.h> 23#include <asm/irq.h>
24#include <asm/hardware.h> 24#include <mach/hardware.h>
25#include <asm/sizes.h> 25#include <asm/sizes.h>
26#include <asm/signal.h> 26#include <asm/signal.h>
27#include <asm/mach/pci.h> 27#include <asm/mach/pci.h>
28#include <asm/arch/pci.h> 28#include <mach/pci.h>
29 29
30#define IOP13XX_PCI_DEBUG 0 30#define IOP13XX_PCI_DEBUG 0
31#define PRINTK(x...) ((void)(IOP13XX_PCI_DEBUG && printk(x))) 31#define PRINTK(x...) ((void)(IOP13XX_PCI_DEBUG && printk(x)))
diff --git a/arch/arm/mach-iop13xx/setup.c b/arch/arm/mach-iop13xx/setup.c
index 246f6d478720..b17ccc8cb471 100644
--- a/arch/arm/mach-iop13xx/setup.c
+++ b/arch/arm/mach-iop13xx/setup.c
@@ -22,7 +22,7 @@
22#include <linux/mtd/physmap.h> 22#include <linux/mtd/physmap.h>
23#endif 23#endif
24#include <asm/mach/map.h> 24#include <asm/mach/map.h>
25#include <asm/hardware.h> 25#include <mach/hardware.h>
26#include <asm/irq.h> 26#include <asm/irq.h>
27#include <asm/io.h> 27#include <asm/io.h>
28#include <asm/hardware/iop_adma.h> 28#include <asm/hardware/iop_adma.h>
diff --git a/arch/arm/mach-iop32x/em7210.c b/arch/arm/mach-iop32x/em7210.c
index 4877597c8758..3ad4696ade42 100644
--- a/arch/arm/mach-iop32x/em7210.c
+++ b/arch/arm/mach-iop32x/em7210.c
@@ -23,7 +23,7 @@
23#include <linux/mtd/physmap.h> 23#include <linux/mtd/physmap.h>
24#include <linux/platform_device.h> 24#include <linux/platform_device.h>
25#include <linux/i2c.h> 25#include <linux/i2c.h>
26#include <asm/hardware.h> 26#include <mach/hardware.h>
27#include <linux/io.h> 27#include <linux/io.h>
28#include <linux/irq.h> 28#include <linux/irq.h>
29#include <asm/mach/arch.h> 29#include <asm/mach/arch.h>
@@ -31,7 +31,7 @@
31#include <asm/mach/pci.h> 31#include <asm/mach/pci.h>
32#include <asm/mach/time.h> 32#include <asm/mach/time.h>
33#include <asm/mach-types.h> 33#include <asm/mach-types.h>
34#include <asm/arch/time.h> 34#include <mach/time.h>
35 35
36static void __init em7210_timer_init(void) 36static void __init em7210_timer_init(void)
37{ 37{
diff --git a/arch/arm/mach-iop32x/glantank.c b/arch/arm/mach-iop32x/glantank.c
index d4fca75ce542..45d61276d233 100644
--- a/arch/arm/mach-iop32x/glantank.c
+++ b/arch/arm/mach-iop32x/glantank.c
@@ -25,7 +25,7 @@
25#include <linux/mtd/physmap.h> 25#include <linux/mtd/physmap.h>
26#include <linux/i2c.h> 26#include <linux/i2c.h>
27#include <linux/platform_device.h> 27#include <linux/platform_device.h>
28#include <asm/hardware.h> 28#include <mach/hardware.h>
29#include <asm/io.h> 29#include <asm/io.h>
30#include <asm/irq.h> 30#include <asm/irq.h>
31#include <asm/mach/arch.h> 31#include <asm/mach/arch.h>
@@ -34,7 +34,7 @@
34#include <asm/mach/time.h> 34#include <asm/mach/time.h>
35#include <asm/mach-types.h> 35#include <asm/mach-types.h>
36#include <asm/page.h> 36#include <asm/page.h>
37#include <asm/arch/time.h> 37#include <mach/time.h>
38 38
39/* 39/*
40 * GLAN Tank timer tick configuration. 40 * GLAN Tank timer tick configuration.
diff --git a/include/asm-arm/arch-iop32x/adma.h b/arch/arm/mach-iop32x/include/mach/adma.h
index 5ed92037dd10..5ed92037dd10 100644
--- a/include/asm-arm/arch-iop32x/adma.h
+++ b/arch/arm/mach-iop32x/include/mach/adma.h
diff --git a/arch/arm/mach-iop32x/include/mach/debug-macro.S b/arch/arm/mach-iop32x/include/mach/debug-macro.S
new file mode 100644
index 000000000000..58b01664ffba
--- /dev/null
+++ b/arch/arm/mach-iop32x/include/mach/debug-macro.S
@@ -0,0 +1,20 @@
1/*
2 * arch/arm/mach-iop32x/include/mach/debug-macro.S
3 *
4 * Debugging macro include header
5 *
6 * Copyright (C) 1994-1999 Russell King
7 * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12 */
13
14 .macro addruart, rx
15 mov \rx, #0xfe000000 @ physical as well as virtual
16 orr \rx, \rx, #0x00800000 @ location of the UART
17 .endm
18
19#define UART_SHIFT 0
20#include <asm/hardware/debug-8250.S>
diff --git a/arch/arm/mach-iop32x/include/mach/dma.h b/arch/arm/mach-iop32x/include/mach/dma.h
new file mode 100644
index 000000000000..f8bd817f205d
--- /dev/null
+++ b/arch/arm/mach-iop32x/include/mach/dma.h
@@ -0,0 +1,9 @@
1/*
2 * arch/arm/mach-iop32x/include/mach/dma.h
3 *
4 * Copyright (C) 2004 Intel Corp.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
diff --git a/arch/arm/mach-iop32x/include/mach/entry-macro.S b/arch/arm/mach-iop32x/include/mach/entry-macro.S
new file mode 100644
index 000000000000..b02fb56bafcc
--- /dev/null
+++ b/arch/arm/mach-iop32x/include/mach/entry-macro.S
@@ -0,0 +1,36 @@
1/*
2 * arch/arm/mach-iop32x/include/mach/entry-macro.S
3 *
4 * Low-level IRQ helper macros for IOP32x-based platforms
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10#include <mach/iop32x.h>
11
12 .macro disable_fiq
13 .endm
14
15 .macro get_irqnr_preamble, base, tmp
16 mrc p15, 0, \tmp, c15, c1, 0
17 orr \tmp, \tmp, #(1 << 6)
18 mcr p15, 0, \tmp, c15, c1, 0 @ Enable cp6 access
19 mrc p15, 0, \tmp, c15, c1, 0
20 mov \tmp, \tmp
21 sub pc, pc, #4 @ cp_wait
22 .endm
23
24 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
25 mrc p6, 0, \irqstat, c8, c0, 0 @ Read IINTSRC
26 cmp \irqstat, #0
27 clzne \irqnr, \irqstat
28 rsbne \irqnr, \irqnr, #31
29 .endm
30
31 .macro arch_ret_to_user, tmp1, tmp2
32 mrc p15, 0, \tmp1, c15, c1, 0
33 ands \tmp2, \tmp1, #(1 << 6)
34 bicne \tmp1, \tmp1, #(1 << 6)
35 mcrne p15, 0, \tmp1, c15, c1, 0 @ Disable cp6 access
36 .endm
diff --git a/arch/arm/mach-iop32x/include/mach/glantank.h b/arch/arm/mach-iop32x/include/mach/glantank.h
new file mode 100644
index 000000000000..958eb91c0913
--- /dev/null
+++ b/arch/arm/mach-iop32x/include/mach/glantank.h
@@ -0,0 +1,13 @@
1/*
2 * arch/arm/mach-iop32x/include/mach/glantank.h
3 *
4 * IO-Data GLAN Tank board registers
5 */
6
7#ifndef __GLANTANK_H
8#define __GLANTANK_H
9
10#define GLANTANK_UART 0xfe800000 /* UART */
11
12
13#endif
diff --git a/include/asm-arm/arch-iop32x/gpio.h b/arch/arm/mach-iop32x/include/mach/gpio.h
index 708f4ec9db1d..708f4ec9db1d 100644
--- a/include/asm-arm/arch-iop32x/gpio.h
+++ b/arch/arm/mach-iop32x/include/mach/gpio.h
diff --git a/arch/arm/mach-iop32x/include/mach/hardware.h b/arch/arm/mach-iop32x/include/mach/hardware.h
new file mode 100644
index 000000000000..d559c4e6095a
--- /dev/null
+++ b/arch/arm/mach-iop32x/include/mach/hardware.h
@@ -0,0 +1,44 @@
1/*
2 * arch/arm/mach-iop32x/include/mach/hardware.h
3 */
4
5#ifndef __HARDWARE_H
6#define __HARDWARE_H
7
8#include <asm/types.h>
9
10/*
11 * Note about PCI IO space mappings
12 *
13 * To make IO space accesses efficient, we store virtual addresses in
14 * the IO resources.
15 *
16 * The PCI IO space is located at virtual 0xfe000000 from physical
17 * 0x90000000. The PCI BARs must be programmed with physical addresses,
18 * but when we read them, we convert them to virtual addresses. See
19 * arch/arm/plat-iop/pci.c.
20 */
21#define pcibios_assign_all_busses() 1
22#define PCIBIOS_MIN_IO 0x00000000
23#define PCIBIOS_MIN_MEM 0x00000000
24
25#ifndef __ASSEMBLY__
26void iop32x_init_irq(void);
27#endif
28
29
30/*
31 * Generic chipset bits
32 */
33#include "iop32x.h"
34
35/*
36 * Board specific bits
37 */
38#include "glantank.h"
39#include "iq80321.h"
40#include "iq31244.h"
41#include "n2100.h"
42
43
44#endif
diff --git a/arch/arm/mach-iop32x/include/mach/io.h b/arch/arm/mach-iop32x/include/mach/io.h
new file mode 100644
index 000000000000..ce54705ba3d4
--- /dev/null
+++ b/arch/arm/mach-iop32x/include/mach/io.h
@@ -0,0 +1,27 @@
1/*
2 * arch/arm/mach-iop32x/include/mach/io.h
3 *
4 * Copyright (C) 2001 MontaVista Software, Inc.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10
11#ifndef __IO_H
12#define __IO_H
13
14#include <mach/hardware.h>
15
16extern void __iomem *__iop3xx_ioremap(unsigned long cookie, size_t size,
17 unsigned int mtype);
18extern void __iop3xx_iounmap(void __iomem *addr);
19
20#define IO_SPACE_LIMIT 0xffffffff
21#define __io(p) ((void __iomem *)IOP3XX_PCI_IO_PHYS_TO_VIRT(p))
22#define __mem_pci(a) (a)
23
24#define __arch_ioremap(a, s, f) __iop3xx_ioremap(a, s, f)
25#define __arch_iounmap(a) __iop3xx_iounmap(a)
26
27#endif
diff --git a/arch/arm/mach-iop32x/include/mach/iop32x.h b/arch/arm/mach-iop32x/include/mach/iop32x.h
new file mode 100644
index 000000000000..abd9eb49f103
--- /dev/null
+++ b/arch/arm/mach-iop32x/include/mach/iop32x.h
@@ -0,0 +1,37 @@
1/*
2 * arch/arm/mach-iop32x/include/mach/iop32x.h
3 *
4 * Intel IOP32X Chip definitions
5 *
6 * Author: Rory Bolt <rorybolt@pacbell.net>
7 * Copyright (C) 2002 Rory Bolt
8 * Copyright (C) 2004 Intel Corp.
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
13 */
14
15#ifndef __IOP32X_H
16#define __IOP32X_H
17
18/*
19 * Peripherals that are shared between the iop32x and iop33x but
20 * located at different addresses.
21 */
22#define IOP3XX_GPIO_REG(reg) (IOP3XX_PERIPHERAL_VIRT_BASE + 0x07c4 + (reg))
23#define IOP3XX_TIMER_REG(reg) (IOP3XX_PERIPHERAL_VIRT_BASE + 0x07e0 + (reg))
24
25#include <asm/hardware/iop3xx.h>
26
27/* ATU Parameters
28 * set up a 1:1 bus to physical ram relationship
29 * w/ physical ram on top of pci in the memory map
30 */
31#define IOP32X_MAX_RAM_SIZE 0x40000000UL
32#define IOP3XX_MAX_RAM_SIZE IOP32X_MAX_RAM_SIZE
33#define IOP3XX_PCI_LOWER_MEM_BA 0x80000000
34#define IOP32X_PCI_MEM_WINDOW_SIZE 0x04000000
35#define IOP3XX_PCI_MEM_WINDOW_SIZE IOP32X_PCI_MEM_WINDOW_SIZE
36
37#endif
diff --git a/arch/arm/mach-iop32x/include/mach/iq31244.h b/arch/arm/mach-iop32x/include/mach/iq31244.h
new file mode 100644
index 000000000000..6b6b369e781c
--- /dev/null
+++ b/arch/arm/mach-iop32x/include/mach/iq31244.h
@@ -0,0 +1,17 @@
1/*
2 * arch/arm/mach-iop32x/include/mach/iq31244.h
3 *
4 * Intel IQ31244 evaluation board registers
5 */
6
7#ifndef __IQ31244_H
8#define __IQ31244_H
9
10#define IQ31244_UART 0xfe800000 /* UART #1 */
11#define IQ31244_7SEG_1 0xfe840000 /* 7-Segment MSB */
12#define IQ31244_7SEG_0 0xfe850000 /* 7-Segment LSB (WO) */
13#define IQ31244_ROTARY_SW 0xfe8d0000 /* Rotary Switch */
14#define IQ31244_BATT_STAT 0xfe8f0000 /* Battery Status */
15
16
17#endif
diff --git a/arch/arm/mach-iop32x/include/mach/iq80321.h b/arch/arm/mach-iop32x/include/mach/iq80321.h
new file mode 100644
index 000000000000..498819b737e7
--- /dev/null
+++ b/arch/arm/mach-iop32x/include/mach/iq80321.h
@@ -0,0 +1,17 @@
1/*
2 * arch/arm/mach-iop32x/include/mach/iq80321.h
3 *
4 * Intel IQ80321 evaluation board registers
5 */
6
7#ifndef __IQ80321_H
8#define __IQ80321_H
9
10#define IQ80321_UART 0xfe800000 /* UART #1 */
11#define IQ80321_7SEG_1 0xfe840000 /* 7-Segment MSB */
12#define IQ80321_7SEG_0 0xfe850000 /* 7-Segment LSB (WO) */
13#define IQ80321_ROTARY_SW 0xfe8d0000 /* Rotary Switch */
14#define IQ80321_BATT_STAT 0xfe8f0000 /* Battery Status */
15
16
17#endif
diff --git a/arch/arm/mach-iop32x/include/mach/irqs.h b/arch/arm/mach-iop32x/include/mach/irqs.h
new file mode 100644
index 000000000000..33573e09914c
--- /dev/null
+++ b/arch/arm/mach-iop32x/include/mach/irqs.h
@@ -0,0 +1,50 @@
1/*
2 * arch/arm/mach-iop32x/include/mach/irqs.h
3 *
4 * Author: Rory Bolt <rorybolt@pacbell.net>
5 * Copyright: (C) 2002 Rory Bolt
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 */
11
12#ifndef __IRQS_H
13#define __IRQS_H
14
15/*
16 * IOP80321 chipset interrupts
17 */
18#define IRQ_IOP32X_DMA0_EOT 0
19#define IRQ_IOP32X_DMA0_EOC 1
20#define IRQ_IOP32X_DMA1_EOT 2
21#define IRQ_IOP32X_DMA1_EOC 3
22#define IRQ_IOP32X_AA_EOT 6
23#define IRQ_IOP32X_AA_EOC 7
24#define IRQ_IOP32X_CORE_PMON 8
25#define IRQ_IOP32X_TIMER0 9
26#define IRQ_IOP32X_TIMER1 10
27#define IRQ_IOP32X_I2C_0 11
28#define IRQ_IOP32X_I2C_1 12
29#define IRQ_IOP32X_MESSAGING 13
30#define IRQ_IOP32X_ATU_BIST 14
31#define IRQ_IOP32X_PERFMON 15
32#define IRQ_IOP32X_CORE_PMU 16
33#define IRQ_IOP32X_BIU_ERR 17
34#define IRQ_IOP32X_ATU_ERR 18
35#define IRQ_IOP32X_MCU_ERR 19
36#define IRQ_IOP32X_DMA0_ERR 20
37#define IRQ_IOP32X_DMA1_ERR 21
38#define IRQ_IOP32X_AA_ERR 23
39#define IRQ_IOP32X_MSG_ERR 24
40#define IRQ_IOP32X_SSP 25
41#define IRQ_IOP32X_XINT0 27
42#define IRQ_IOP32X_XINT1 28
43#define IRQ_IOP32X_XINT2 29
44#define IRQ_IOP32X_XINT3 30
45#define IRQ_IOP32X_HPI 31
46
47#define NR_IRQS 32
48
49
50#endif
diff --git a/arch/arm/mach-iop32x/include/mach/memory.h b/arch/arm/mach-iop32x/include/mach/memory.h
new file mode 100644
index 000000000000..42cd4bf3148c
--- /dev/null
+++ b/arch/arm/mach-iop32x/include/mach/memory.h
@@ -0,0 +1,26 @@
1/*
2 * arch/arm/mach-iop32x/include/mach/memory.h
3 */
4
5#ifndef __MEMORY_H
6#define __MEMORY_H
7
8#include <mach/hardware.h>
9
10/*
11 * Physical DRAM offset.
12 */
13#define PHYS_OFFSET UL(0xa0000000)
14
15/*
16 * Virtual view <-> PCI DMA view memory address translations
17 * virt_to_bus: Used to translate the virtual address to an
18 * address suitable to be passed to set_dma_addr
19 * bus_to_virt: Used to convert an address for DMA operations
20 * to an address that the kernel can use.
21 */
22#define __virt_to_bus(x) (__virt_to_phys(x))
23#define __bus_to_virt(x) (__phys_to_virt(x))
24
25
26#endif
diff --git a/arch/arm/mach-iop32x/include/mach/n2100.h b/arch/arm/mach-iop32x/include/mach/n2100.h
new file mode 100644
index 000000000000..40b8a532b064
--- /dev/null
+++ b/arch/arm/mach-iop32x/include/mach/n2100.h
@@ -0,0 +1,19 @@
1/*
2 * arch/arm/mach-iop32x/include/mach/n2100.h
3 *
4 * Thecus N2100 board registers
5 */
6
7#ifndef __N2100_H
8#define __N2100_H
9
10#define N2100_UART 0xfe800000 /* UART */
11
12#define N2100_COPY_BUTTON IOP3XX_GPIO_LINE(0)
13#define N2100_PCA9532_RESET IOP3XX_GPIO_LINE(2)
14#define N2100_RESET_BUTTON IOP3XX_GPIO_LINE(3)
15#define N2100_HARDWARE_RESET IOP3XX_GPIO_LINE(4)
16#define N2100_POWER_BUTTON IOP3XX_GPIO_LINE(5)
17
18
19#endif
diff --git a/arch/arm/mach-iop32x/include/mach/system.h b/arch/arm/mach-iop32x/include/mach/system.h
new file mode 100644
index 000000000000..20f923e54f46
--- /dev/null
+++ b/arch/arm/mach-iop32x/include/mach/system.h
@@ -0,0 +1,33 @@
1/*
2 * arch/arm/mach-iop32x/include/mach/system.h
3 *
4 * Copyright (C) 2001 MontaVista Software, Inc.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10
11#include <asm/mach-types.h>
12
13static inline void arch_idle(void)
14{
15 cpu_do_idle();
16}
17
18static inline void arch_reset(char mode)
19{
20 local_irq_disable();
21
22 if (machine_is_n2100()) {
23 gpio_line_set(N2100_HARDWARE_RESET, GPIO_LOW);
24 gpio_line_config(N2100_HARDWARE_RESET, GPIO_OUT);
25 while (1)
26 ;
27 }
28
29 *IOP3XX_PCSR = 0x30;
30
31 /* Jump into ROM at address 0 */
32 cpu_reset(0);
33}
diff --git a/include/asm-arm/arch-iop32x/time.h b/arch/arm/mach-iop32x/include/mach/time.h
index 0f28c9949623..0f28c9949623 100644
--- a/include/asm-arm/arch-iop32x/time.h
+++ b/arch/arm/mach-iop32x/include/mach/time.h
diff --git a/arch/arm/mach-iop32x/include/mach/timex.h b/arch/arm/mach-iop32x/include/mach/timex.h
new file mode 100644
index 000000000000..a541afced3cb
--- /dev/null
+++ b/arch/arm/mach-iop32x/include/mach/timex.h
@@ -0,0 +1,9 @@
1/*
2 * arch/arm/mach-iop32x/include/mach/timex.h
3 *
4 * IOP32x architecture timex specifications
5 */
6
7#include <mach/hardware.h>
8
9#define CLOCK_TICK_RATE (100 * HZ)
diff --git a/arch/arm/mach-iop32x/include/mach/uncompress.h b/arch/arm/mach-iop32x/include/mach/uncompress.h
new file mode 100644
index 000000000000..b247551b6f5a
--- /dev/null
+++ b/arch/arm/mach-iop32x/include/mach/uncompress.h
@@ -0,0 +1,39 @@
1/*
2 * arch/arm/mach-iop32x/include/mach/uncompress.h
3 */
4
5#include <asm/types.h>
6#include <asm/mach-types.h>
7#include <linux/serial_reg.h>
8#include <mach/hardware.h>
9
10static volatile u8 *uart_base;
11
12#define TX_DONE (UART_LSR_TEMT | UART_LSR_THRE)
13
14static inline void putc(char c)
15{
16 while ((uart_base[UART_LSR] & TX_DONE) != TX_DONE)
17 barrier();
18 uart_base[UART_TX] = c;
19}
20
21static inline void flush(void)
22{
23}
24
25static __inline__ void __arch_decomp_setup(unsigned long arch_id)
26{
27 if (machine_is_iq80321())
28 uart_base = (volatile u8 *)IQ80321_UART;
29 else if (machine_is_iq31244() || machine_is_em7210())
30 uart_base = (volatile u8 *)IQ31244_UART;
31 else
32 uart_base = (volatile u8 *)0xfe800000;
33}
34
35/*
36 * nothing to do
37 */
38#define arch_decomp_setup() __arch_decomp_setup(arch_id)
39#define arch_decomp_wdog()
diff --git a/arch/arm/mach-iop32x/include/mach/vmalloc.h b/arch/arm/mach-iop32x/include/mach/vmalloc.h
new file mode 100644
index 000000000000..85ceb09d85f0
--- /dev/null
+++ b/arch/arm/mach-iop32x/include/mach/vmalloc.h
@@ -0,0 +1,5 @@
1/*
2 * arch/arm/mach-iop32x/include/mach/vmalloc.h
3 */
4
5#define VMALLOC_END 0xfe000000
diff --git a/arch/arm/mach-iop32x/iq31244.c b/arch/arm/mach-iop32x/iq31244.c
index 4a89823bcebb..082818aaa205 100644
--- a/arch/arm/mach-iop32x/iq31244.c
+++ b/arch/arm/mach-iop32x/iq31244.c
@@ -26,7 +26,7 @@
26#include <linux/serial_8250.h> 26#include <linux/serial_8250.h>
27#include <linux/mtd/physmap.h> 27#include <linux/mtd/physmap.h>
28#include <linux/platform_device.h> 28#include <linux/platform_device.h>
29#include <asm/hardware.h> 29#include <mach/hardware.h>
30#include <asm/io.h> 30#include <asm/io.h>
31#include <asm/irq.h> 31#include <asm/irq.h>
32#include <asm/mach/arch.h> 32#include <asm/mach/arch.h>
@@ -36,7 +36,7 @@
36#include <asm/mach-types.h> 36#include <asm/mach-types.h>
37#include <asm/page.h> 37#include <asm/page.h>
38#include <asm/pgtable.h> 38#include <asm/pgtable.h>
39#include <asm/arch/time.h> 39#include <mach/time.h>
40 40
41/* 41/*
42 * Until March of 2007 iq31244 platforms and ep80219 platforms shared the 42 * Until March of 2007 iq31244 platforms and ep80219 platforms shared the
diff --git a/arch/arm/mach-iop32x/iq80321.c b/arch/arm/mach-iop32x/iq80321.c
index 1da3c911edd3..d735539808b4 100644
--- a/arch/arm/mach-iop32x/iq80321.c
+++ b/arch/arm/mach-iop32x/iq80321.c
@@ -23,7 +23,7 @@
23#include <linux/serial_8250.h> 23#include <linux/serial_8250.h>
24#include <linux/mtd/physmap.h> 24#include <linux/mtd/physmap.h>
25#include <linux/platform_device.h> 25#include <linux/platform_device.h>
26#include <asm/hardware.h> 26#include <mach/hardware.h>
27#include <asm/io.h> 27#include <asm/io.h>
28#include <asm/irq.h> 28#include <asm/irq.h>
29#include <asm/mach/arch.h> 29#include <asm/mach/arch.h>
@@ -33,7 +33,7 @@
33#include <asm/mach-types.h> 33#include <asm/mach-types.h>
34#include <asm/page.h> 34#include <asm/page.h>
35#include <asm/pgtable.h> 35#include <asm/pgtable.h>
36#include <asm/arch/time.h> 36#include <mach/time.h>
37 37
38/* 38/*
39 * IQ80321 timer tick configuration. 39 * IQ80321 timer tick configuration.
diff --git a/arch/arm/mach-iop32x/irq.c b/arch/arm/mach-iop32x/irq.c
index 55cf0162e8c1..ba59b2d17db1 100644
--- a/arch/arm/mach-iop32x/irq.c
+++ b/arch/arm/mach-iop32x/irq.c
@@ -16,7 +16,7 @@
16#include <linux/list.h> 16#include <linux/list.h>
17#include <asm/mach/irq.h> 17#include <asm/mach/irq.h>
18#include <asm/irq.h> 18#include <asm/irq.h>
19#include <asm/hardware.h> 19#include <mach/hardware.h>
20#include <asm/mach-types.h> 20#include <asm/mach-types.h>
21 21
22static u32 iop32x_mask; 22static u32 iop32x_mask;
diff --git a/arch/arm/mach-iop32x/n2100.c b/arch/arm/mach-iop32x/n2100.c
index 28f164ea4726..3173f9c5835d 100644
--- a/arch/arm/mach-iop32x/n2100.c
+++ b/arch/arm/mach-iop32x/n2100.c
@@ -30,7 +30,7 @@
30#include <linux/i2c.h> 30#include <linux/i2c.h>
31#include <linux/platform_device.h> 31#include <linux/platform_device.h>
32#include <linux/reboot.h> 32#include <linux/reboot.h>
33#include <asm/hardware.h> 33#include <mach/hardware.h>
34#include <asm/io.h> 34#include <asm/io.h>
35#include <asm/irq.h> 35#include <asm/irq.h>
36#include <asm/mach/arch.h> 36#include <asm/mach/arch.h>
@@ -40,7 +40,7 @@
40#include <asm/mach-types.h> 40#include <asm/mach-types.h>
41#include <asm/page.h> 41#include <asm/page.h>
42#include <asm/pgtable.h> 42#include <asm/pgtable.h>
43#include <asm/arch/time.h> 43#include <mach/time.h>
44 44
45/* 45/*
46 * N2100 timer tick configuration. 46 * N2100 timer tick configuration.
diff --git a/include/asm-arm/arch-iop33x/adma.h b/arch/arm/mach-iop33x/include/mach/adma.h
index 4b92f795f90e..4b92f795f90e 100644
--- a/include/asm-arm/arch-iop33x/adma.h
+++ b/arch/arm/mach-iop33x/include/mach/adma.h
diff --git a/arch/arm/mach-iop33x/include/mach/debug-macro.S b/arch/arm/mach-iop33x/include/mach/debug-macro.S
new file mode 100644
index 000000000000..a60c9ef05cc3
--- /dev/null
+++ b/arch/arm/mach-iop33x/include/mach/debug-macro.S
@@ -0,0 +1,24 @@
1/*
2 * arch/arm/mach-iop33x/include/mach/debug-macro.S
3 *
4 * Debugging macro include header
5 *
6 * Copyright (C) 1994-1999 Russell King
7 * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12 */
13
14 .macro addruart, rx
15 mrc p15, 0, \rx, c1, c0
16 tst \rx, #1 @ mmu enabled?
17 moveq \rx, #0xff000000 @ physical
18 movne \rx, #0xfe000000 @ virtual
19 orr \rx, \rx, #0x00ff0000
20 orr \rx, \rx, #0x0000f700
21 .endm
22
23#define UART_SHIFT 2
24#include <asm/hardware/debug-8250.S>
diff --git a/arch/arm/mach-iop33x/include/mach/dma.h b/arch/arm/mach-iop33x/include/mach/dma.h
new file mode 100644
index 000000000000..d8b42232931d
--- /dev/null
+++ b/arch/arm/mach-iop33x/include/mach/dma.h
@@ -0,0 +1,9 @@
1/*
2 * arch/arm/mach-iop33x/include/mach/dma.h
3 *
4 * Copyright (C) 2004 Intel Corp.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
diff --git a/arch/arm/mach-iop33x/include/mach/entry-macro.S b/arch/arm/mach-iop33x/include/mach/entry-macro.S
new file mode 100644
index 000000000000..4e1f7282b354
--- /dev/null
+++ b/arch/arm/mach-iop33x/include/mach/entry-macro.S
@@ -0,0 +1,37 @@
1/*
2 * arch/arm/mach-iop33x/include/mach/entry-macro.S
3 *
4 * Low-level IRQ helper macros for IOP33x-based platforms
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10#include <mach/iop33x.h>
11
12 .macro disable_fiq
13 .endm
14
15 .macro get_irqnr_preamble, base, tmp
16 mrc p15, 0, \tmp, c15, c1, 0
17 orr \tmp, \tmp, #(1 << 6)
18 mcr p15, 0, \tmp, c15, c1, 0 @ Enable cp6 access
19 mrc p15, 0, \tmp, c15, c1, 0
20 mov \tmp, \tmp
21 sub pc, pc, #4 @ cp_wait
22 .endm
23
24 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
25 mrc p6, 0, \irqstat, c14, c0, 0 @ Read IINTVEC
26 cmp \irqstat, #0
27 mrceq p6, 0, \irqstat, c14, c0, 0 @ erratum 63 workaround
28 adds \irqnr, \irqstat, #1
29 movne \irqnr, \irqstat, lsr #2
30 .endm
31
32 .macro arch_ret_to_user, tmp1, tmp2
33 mrc p15, 0, \tmp1, c15, c1, 0
34 ands \tmp2, \tmp1, #(1 << 6)
35 bicne \tmp1, \tmp1, #(1 << 6)
36 mcrne p15, 0, \tmp1, c15, c1, 0 @ Disable cp6 access
37 .endm
diff --git a/include/asm-arm/arch-iop33x/gpio.h b/arch/arm/mach-iop33x/include/mach/gpio.h
index ddd55bba9bb9..ddd55bba9bb9 100644
--- a/include/asm-arm/arch-iop33x/gpio.h
+++ b/arch/arm/mach-iop33x/include/mach/gpio.h
diff --git a/arch/arm/mach-iop33x/include/mach/hardware.h b/arch/arm/mach-iop33x/include/mach/hardware.h
new file mode 100644
index 000000000000..8c10e430655e
--- /dev/null
+++ b/arch/arm/mach-iop33x/include/mach/hardware.h
@@ -0,0 +1,46 @@
1/*
2 * arch/arm/mach-iop33x/include/mach/hardware.h
3 */
4
5#ifndef __HARDWARE_H
6#define __HARDWARE_H
7
8#include <asm/types.h>
9
10/*
11 * Note about PCI IO space mappings
12 *
13 * To make IO space accesses efficient, we store virtual addresses in
14 * the IO resources.
15 *
16 * The PCI IO space is located at virtual 0xfe000000 from physical
17 * 0x90000000. The PCI BARs must be programmed with physical addresses,
18 * but when we read them, we convert them to virtual addresses. See
19 * arch/arm/mach-iop3xx/iop3xx-pci.c
20 */
21#define pcibios_assign_all_busses() 1
22#define PCIBIOS_MIN_IO 0x00000000
23#define PCIBIOS_MIN_MEM 0x00000000
24
25#ifndef __ASSEMBLY__
26void iop33x_init_irq(void);
27
28extern struct platform_device iop33x_uart0_device;
29extern struct platform_device iop33x_uart1_device;
30#endif
31
32
33/*
34 * Generic chipset bits
35 *
36 */
37#include "iop33x.h"
38
39/*
40 * Board specific bits
41 */
42#include "iq80331.h"
43#include "iq80332.h"
44
45
46#endif
diff --git a/arch/arm/mach-iop33x/include/mach/io.h b/arch/arm/mach-iop33x/include/mach/io.h
new file mode 100644
index 000000000000..158874631217
--- /dev/null
+++ b/arch/arm/mach-iop33x/include/mach/io.h
@@ -0,0 +1,27 @@
1/*
2 * arch/arm/mach-iop33x/include/mach/io.h
3 *
4 * Copyright (C) 2001 MontaVista Software, Inc.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10
11#ifndef __IO_H
12#define __IO_H
13
14#include <mach/hardware.h>
15
16extern void __iomem *__iop3xx_ioremap(unsigned long cookie, size_t size,
17 unsigned int mtype);
18extern void __iop3xx_iounmap(void __iomem *addr);
19
20#define IO_SPACE_LIMIT 0xffffffff
21#define __io(p) ((void __iomem *)IOP3XX_PCI_IO_PHYS_TO_VIRT(p))
22#define __mem_pci(a) (a)
23
24#define __arch_ioremap(a, s, f) __iop3xx_ioremap(a, s, f)
25#define __arch_iounmap(a) __iop3xx_iounmap(a)
26
27#endif
diff --git a/arch/arm/mach-iop33x/include/mach/iop33x.h b/arch/arm/mach-iop33x/include/mach/iop33x.h
new file mode 100644
index 000000000000..24567316ec88
--- /dev/null
+++ b/arch/arm/mach-iop33x/include/mach/iop33x.h
@@ -0,0 +1,43 @@
1/*
2 * arch/arm/mach-iop33x/include/mach/iop33x.h
3 *
4 * Intel IOP33X Chip definitions
5 *
6 * Author: Dave Jiang (dave.jiang@intel.com)
7 * Copyright (C) 2003, 2004 Intel Corp.
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12 */
13
14#ifndef __IOP33X_H
15#define __IOP33X_H
16
17/*
18 * Peripherals that are shared between the iop32x and iop33x but
19 * located at different addresses.
20 */
21#define IOP3XX_GPIO_REG(reg) (IOP3XX_PERIPHERAL_VIRT_BASE + 0x1780 + (reg))
22#define IOP3XX_TIMER_REG(reg) (IOP3XX_PERIPHERAL_VIRT_BASE + 0x07d0 + (reg))
23
24#include <asm/hardware/iop3xx.h>
25
26/* UARTs */
27#define IOP33X_UART0_PHYS (IOP3XX_PERIPHERAL_PHYS_BASE + 0x1700)
28#define IOP33X_UART0_VIRT (IOP3XX_PERIPHERAL_VIRT_BASE + 0x1700)
29#define IOP33X_UART1_PHYS (IOP3XX_PERIPHERAL_PHYS_BASE + 0x1740)
30#define IOP33X_UART1_VIRT (IOP3XX_PERIPHERAL_VIRT_BASE + 0x1740)
31
32/* ATU Parameters
33 * set up a 1:1 bus to physical ram relationship
34 * w/ pci on top of physical ram in memory map
35 */
36#define IOP33X_MAX_RAM_SIZE 0x80000000UL
37#define IOP3XX_MAX_RAM_SIZE IOP33X_MAX_RAM_SIZE
38#define IOP3XX_PCI_LOWER_MEM_BA (PHYS_OFFSET + IOP33X_MAX_RAM_SIZE)
39#define IOP33X_PCI_MEM_WINDOW_SIZE 0x08000000
40#define IOP3XX_PCI_MEM_WINDOW_SIZE IOP33X_PCI_MEM_WINDOW_SIZE
41
42
43#endif
diff --git a/arch/arm/mach-iop33x/include/mach/iq80331.h b/arch/arm/mach-iop33x/include/mach/iq80331.h
new file mode 100644
index 000000000000..fe406b0127f7
--- /dev/null
+++ b/arch/arm/mach-iop33x/include/mach/iq80331.h
@@ -0,0 +1,16 @@
1/*
2 * arch/arm/mach-iop33x/include/mach/iq80331.h
3 *
4 * Intel IQ80331 evaluation board registers
5 */
6
7#ifndef __IQ80331_H
8#define __IQ80331_H
9
10#define IQ80331_7SEG_1 0xce840000 /* 7-Segment MSB */
11#define IQ80331_7SEG_0 0xce850000 /* 7-Segment LSB (WO) */
12#define IQ80331_ROTARY_SW 0xce8d0000 /* Rotary Switch */
13#define IQ80331_BATT_STAT 0xce8f0000 /* Battery Status */
14
15
16#endif
diff --git a/arch/arm/mach-iop33x/include/mach/iq80332.h b/arch/arm/mach-iop33x/include/mach/iq80332.h
new file mode 100644
index 000000000000..8325d71f2ed5
--- /dev/null
+++ b/arch/arm/mach-iop33x/include/mach/iq80332.h
@@ -0,0 +1,16 @@
1/*
2 * arch/arm/mach-iop33x/include/mach/iq80332.h
3 *
4 * Intel IQ80332 evaluation board registers
5 */
6
7#ifndef __IQ80332_H
8#define __IQ80332_H
9
10#define IQ80332_7SEG_1 0xce840000 /* 7-Segment MSB */
11#define IQ80332_7SEG_0 0xce850000 /* 7-Segment LSB (WO) */
12#define IQ80332_ROTARY_SW 0xce8d0000 /* Rotary Switch */
13#define IQ80332_BATT_STAT 0xce8f0000 /* Battery Status */
14
15
16#endif
diff --git a/arch/arm/mach-iop33x/include/mach/irqs.h b/arch/arm/mach-iop33x/include/mach/irqs.h
new file mode 100644
index 000000000000..707628a600ac
--- /dev/null
+++ b/arch/arm/mach-iop33x/include/mach/irqs.h
@@ -0,0 +1,60 @@
1/*
2 * arch/arm/mach-iop33x/include/mach/irqs.h
3 *
4 * Author: Dave Jiang (dave.jiang@intel.com)
5 * Copyright: (C) 2003 Intel Corp.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 */
11
12#ifndef __IRQS_H
13#define __IRQS_H
14
15/*
16 * IOP80331 chipset interrupts
17 */
18#define IRQ_IOP33X_DMA0_EOT 0
19#define IRQ_IOP33X_DMA0_EOC 1
20#define IRQ_IOP33X_DMA1_EOT 2
21#define IRQ_IOP33X_DMA1_EOC 3
22#define IRQ_IOP33X_AA_EOT 6
23#define IRQ_IOP33X_AA_EOC 7
24#define IRQ_IOP33X_TIMER0 8
25#define IRQ_IOP33X_TIMER1 9
26#define IRQ_IOP33X_I2C_0 10
27#define IRQ_IOP33X_I2C_1 11
28#define IRQ_IOP33X_MSG 12
29#define IRQ_IOP33X_MSGIBQ 13
30#define IRQ_IOP33X_ATU_BIST 14
31#define IRQ_IOP33X_PERFMON 15
32#define IRQ_IOP33X_CORE_PMU 16
33#define IRQ_IOP33X_XINT0 24
34#define IRQ_IOP33X_XINT1 25
35#define IRQ_IOP33X_XINT2 26
36#define IRQ_IOP33X_XINT3 27
37#define IRQ_IOP33X_XINT8 32
38#define IRQ_IOP33X_XINT9 33
39#define IRQ_IOP33X_XINT10 34
40#define IRQ_IOP33X_XINT11 35
41#define IRQ_IOP33X_XINT12 36
42#define IRQ_IOP33X_XINT13 37
43#define IRQ_IOP33X_XINT14 38
44#define IRQ_IOP33X_XINT15 39
45#define IRQ_IOP33X_UART0 51
46#define IRQ_IOP33X_UART1 52
47#define IRQ_IOP33X_PBIE 53
48#define IRQ_IOP33X_ATU_CRW 54
49#define IRQ_IOP33X_ATU_ERR 55
50#define IRQ_IOP33X_MCU_ERR 56
51#define IRQ_IOP33X_DMA0_ERR 57
52#define IRQ_IOP33X_DMA1_ERR 58
53#define IRQ_IOP33X_AA_ERR 60
54#define IRQ_IOP33X_MSG_ERR 62
55#define IRQ_IOP33X_HPI 63
56
57#define NR_IRQS 64
58
59
60#endif
diff --git a/arch/arm/mach-iop33x/include/mach/memory.h b/arch/arm/mach-iop33x/include/mach/memory.h
new file mode 100644
index 000000000000..2cef0bbb354f
--- /dev/null
+++ b/arch/arm/mach-iop33x/include/mach/memory.h
@@ -0,0 +1,26 @@
1/*
2 * arch/arm/mach-iop33x/include/mach/memory.h
3 */
4
5#ifndef __MEMORY_H
6#define __MEMORY_H
7
8#include <mach/hardware.h>
9
10/*
11 * Physical DRAM offset.
12 */
13#define PHYS_OFFSET UL(0x00000000)
14
15/*
16 * Virtual view <-> PCI DMA view memory address translations
17 * virt_to_bus: Used to translate the virtual address to an
18 * address suitable to be passed to set_dma_addr
19 * bus_to_virt: Used to convert an address for DMA operations
20 * to an address that the kernel can use.
21 */
22#define __virt_to_bus(x) (__virt_to_phys(x))
23#define __bus_to_virt(x) (__phys_to_virt(x))
24
25
26#endif
diff --git a/arch/arm/mach-iop33x/include/mach/system.h b/arch/arm/mach-iop33x/include/mach/system.h
new file mode 100644
index 000000000000..7bf3bfb49446
--- /dev/null
+++ b/arch/arm/mach-iop33x/include/mach/system.h
@@ -0,0 +1,22 @@
1/*
2 * arch/arm/mach-iop33x/include/mach/system.h
3 *
4 * Copyright (C) 2001 MontaVista Software, Inc.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10
11static inline void arch_idle(void)
12{
13 cpu_do_idle();
14}
15
16static inline void arch_reset(char mode)
17{
18 *IOP3XX_PCSR = 0x30;
19
20 /* Jump into ROM at address 0 */
21 cpu_reset(0);
22}
diff --git a/include/asm-arm/arch-iop33x/time.h b/arch/arm/mach-iop33x/include/mach/time.h
index 4ac4d7664f85..4ac4d7664f85 100644
--- a/include/asm-arm/arch-iop33x/time.h
+++ b/arch/arm/mach-iop33x/include/mach/time.h
diff --git a/arch/arm/mach-iop33x/include/mach/timex.h b/arch/arm/mach-iop33x/include/mach/timex.h
new file mode 100644
index 000000000000..c75760844d49
--- /dev/null
+++ b/arch/arm/mach-iop33x/include/mach/timex.h
@@ -0,0 +1,9 @@
1/*
2 * arch/arm/mach-iop33x/include/mach/timex.h
3 *
4 * IOP3xx architecture timex specifications
5 */
6
7#include <mach/hardware.h>
8
9#define CLOCK_TICK_RATE (100 * HZ)
diff --git a/arch/arm/mach-iop33x/include/mach/uncompress.h b/arch/arm/mach-iop33x/include/mach/uncompress.h
new file mode 100644
index 000000000000..b42423f63302
--- /dev/null
+++ b/arch/arm/mach-iop33x/include/mach/uncompress.h
@@ -0,0 +1,37 @@
1/*
2 * arch/arm/mach-iop33x/include/mach/uncompress.h
3 */
4
5#include <asm/types.h>
6#include <asm/mach-types.h>
7#include <linux/serial_reg.h>
8#include <mach/hardware.h>
9
10static volatile u32 *uart_base;
11
12#define TX_DONE (UART_LSR_TEMT | UART_LSR_THRE)
13
14static inline void putc(char c)
15{
16 while ((uart_base[UART_LSR] & TX_DONE) != TX_DONE)
17 barrier();
18 uart_base[UART_TX] = c;
19}
20
21static inline void flush(void)
22{
23}
24
25static __inline__ void __arch_decomp_setup(unsigned long arch_id)
26{
27 if (machine_is_iq80331() || machine_is_iq80332())
28 uart_base = (volatile u32 *)IOP33X_UART0_PHYS;
29 else
30 uart_base = (volatile u32 *)0xfe800000;
31}
32
33/*
34 * nothing to do
35 */
36#define arch_decomp_setup() __arch_decomp_setup(arch_id)
37#define arch_decomp_wdog()
diff --git a/arch/arm/mach-iop33x/include/mach/vmalloc.h b/arch/arm/mach-iop33x/include/mach/vmalloc.h
new file mode 100644
index 000000000000..f9f99dea9bc4
--- /dev/null
+++ b/arch/arm/mach-iop33x/include/mach/vmalloc.h
@@ -0,0 +1,5 @@
1/*
2 * arch/arm/mach-iop33x/include/mach/vmalloc.h
3 */
4
5#define VMALLOC_END 0xfe000000
diff --git a/arch/arm/mach-iop33x/iq80331.c b/arch/arm/mach-iop33x/iq80331.c
index de39fd778579..c7d99f9fafed 100644
--- a/arch/arm/mach-iop33x/iq80331.c
+++ b/arch/arm/mach-iop33x/iq80331.c
@@ -22,7 +22,7 @@
22#include <linux/serial_8250.h> 22#include <linux/serial_8250.h>
23#include <linux/mtd/physmap.h> 23#include <linux/mtd/physmap.h>
24#include <linux/platform_device.h> 24#include <linux/platform_device.h>
25#include <asm/hardware.h> 25#include <mach/hardware.h>
26#include <asm/io.h> 26#include <asm/io.h>
27#include <asm/irq.h> 27#include <asm/irq.h>
28#include <asm/mach/arch.h> 28#include <asm/mach/arch.h>
@@ -32,7 +32,7 @@
32#include <asm/mach-types.h> 32#include <asm/mach-types.h>
33#include <asm/page.h> 33#include <asm/page.h>
34#include <asm/pgtable.h> 34#include <asm/pgtable.h>
35#include <asm/arch/time.h> 35#include <mach/time.h>
36 36
37/* 37/*
38 * IQ80331 timer tick configuration. 38 * IQ80331 timer tick configuration.
diff --git a/arch/arm/mach-iop33x/iq80332.c b/arch/arm/mach-iop33x/iq80332.c
index 4904fd78445f..af616c5f4fb2 100644
--- a/arch/arm/mach-iop33x/iq80332.c
+++ b/arch/arm/mach-iop33x/iq80332.c
@@ -22,7 +22,7 @@
22#include <linux/serial_8250.h> 22#include <linux/serial_8250.h>
23#include <linux/mtd/physmap.h> 23#include <linux/mtd/physmap.h>
24#include <linux/platform_device.h> 24#include <linux/platform_device.h>
25#include <asm/hardware.h> 25#include <mach/hardware.h>
26#include <asm/io.h> 26#include <asm/io.h>
27#include <asm/irq.h> 27#include <asm/irq.h>
28#include <asm/mach/arch.h> 28#include <asm/mach/arch.h>
@@ -32,7 +32,7 @@
32#include <asm/mach-types.h> 32#include <asm/mach-types.h>
33#include <asm/page.h> 33#include <asm/page.h>
34#include <asm/pgtable.h> 34#include <asm/pgtable.h>
35#include <asm/arch/time.h> 35#include <mach/time.h>
36 36
37/* 37/*
38 * IQ80332 timer tick configuration. 38 * IQ80332 timer tick configuration.
diff --git a/arch/arm/mach-iop33x/irq.c b/arch/arm/mach-iop33x/irq.c
index f09dd054b9c0..abb4ea2ed4fd 100644
--- a/arch/arm/mach-iop33x/irq.c
+++ b/arch/arm/mach-iop33x/irq.c
@@ -16,7 +16,7 @@
16#include <linux/list.h> 16#include <linux/list.h>
17#include <asm/mach/irq.h> 17#include <asm/mach/irq.h>
18#include <asm/irq.h> 18#include <asm/irq.h>
19#include <asm/hardware.h> 19#include <mach/hardware.h>
20#include <asm/mach-types.h> 20#include <asm/mach-types.h>
21 21
22static u32 iop33x_mask0; 22static u32 iop33x_mask0;
diff --git a/arch/arm/mach-iop33x/uart.c b/arch/arm/mach-iop33x/uart.c
index ac297cd0276c..8c21870fa808 100644
--- a/arch/arm/mach-iop33x/uart.c
+++ b/arch/arm/mach-iop33x/uart.c
@@ -24,9 +24,8 @@
24#include <asm/setup.h> 24#include <asm/setup.h>
25#include <asm/system.h> 25#include <asm/system.h>
26#include <asm/memory.h> 26#include <asm/memory.h>
27#include <asm/hardware.h> 27#include <mach/hardware.h>
28#include <asm/hardware/iop3xx.h> 28#include <asm/hardware/iop3xx.h>
29#include <asm/mach-types.h>
30#include <asm/mach/arch.h> 29#include <asm/mach/arch.h>
31 30
32#define IOP33X_UART_XTAL 33334000 31#define IOP33X_UART_XTAL 33334000
diff --git a/arch/arm/mach-ixp2000/core.c b/arch/arm/mach-ixp2000/core.c
index daf28074134b..a6a4f93085fd 100644
--- a/arch/arm/mach-ixp2000/core.c
+++ b/arch/arm/mach-ixp2000/core.c
@@ -29,7 +29,7 @@
29#include <asm/types.h> 29#include <asm/types.h>
30#include <asm/setup.h> 30#include <asm/setup.h>
31#include <asm/memory.h> 31#include <asm/memory.h>
32#include <asm/hardware.h> 32#include <mach/hardware.h>
33#include <asm/irq.h> 33#include <asm/irq.h>
34#include <asm/system.h> 34#include <asm/system.h>
35#include <asm/tlbflush.h> 35#include <asm/tlbflush.h>
@@ -39,7 +39,7 @@
39#include <asm/mach/time.h> 39#include <asm/mach/time.h>
40#include <asm/mach/irq.h> 40#include <asm/mach/irq.h>
41 41
42#include <asm/arch/gpio.h> 42#include <mach/gpio.h>
43 43
44static DEFINE_SPINLOCK(ixp2000_slowport_lock); 44static DEFINE_SPINLOCK(ixp2000_slowport_lock);
45static unsigned long ixp2000_slowport_irq_flags; 45static unsigned long ixp2000_slowport_irq_flags;
diff --git a/arch/arm/mach-ixp2000/enp2611.c b/arch/arm/mach-ixp2000/enp2611.c
index 9c49435d42c3..c62ed655c1a7 100644
--- a/arch/arm/mach-ixp2000/enp2611.c
+++ b/arch/arm/mach-ixp2000/enp2611.c
@@ -38,7 +38,7 @@
38#include <asm/pgtable.h> 38#include <asm/pgtable.h>
39#include <asm/page.h> 39#include <asm/page.h>
40#include <asm/system.h> 40#include <asm/system.h>
41#include <asm/hardware.h> 41#include <mach/hardware.h>
42#include <asm/mach-types.h> 42#include <asm/mach-types.h>
43 43
44#include <asm/mach/pci.h> 44#include <asm/mach/pci.h>
diff --git a/arch/arm/mach-ixp2000/include/mach/debug-macro.S b/arch/arm/mach-ixp2000/include/mach/debug-macro.S
new file mode 100644
index 000000000000..904ff56d2246
--- /dev/null
+++ b/arch/arm/mach-ixp2000/include/mach/debug-macro.S
@@ -0,0 +1,27 @@
1/* arch/arm/mach-ixp2000/include/mach/debug-macro.S
2 *
3 * Debugging macro include header
4 *
5 * Copyright (C) 1994-1999 Russell King
6 * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 *
12*/
13
14 .macro addruart,rx
15 mrc p15, 0, \rx, c1, c0
16 tst \rx, #1 @ MMU enabled?
17 moveq \rx, #0xc0000000 @ Physical base
18 movne \rx, #0xfe000000 @ virtual base
19 orrne \rx, \rx, #0x00f00000
20 orr \rx, \rx, #0x00030000
21#ifdef __ARMEB__
22 orr \rx, \rx, #0x00000003
23#endif
24 .endm
25
26#define UART_SHIFT 2
27#include <asm/hardware/debug-8250.S>
diff --git a/arch/arm/mach-ixp2000/include/mach/dma.h b/arch/arm/mach-ixp2000/include/mach/dma.h
new file mode 100644
index 000000000000..26063d60f622
--- /dev/null
+++ b/arch/arm/mach-ixp2000/include/mach/dma.h
@@ -0,0 +1,9 @@
1/*
2 * arch/arm/mach-ixp2000/include/mach/dma.h
3 *
4 * Copyright (C) 2002 Intel Corp.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
diff --git a/arch/arm/mach-ixp2000/include/mach/enp2611.h b/arch/arm/mach-ixp2000/include/mach/enp2611.h
new file mode 100644
index 000000000000..9ce3690061d5
--- /dev/null
+++ b/arch/arm/mach-ixp2000/include/mach/enp2611.h
@@ -0,0 +1,46 @@
1/*
2 * arch/arm/mach-ixp2000/include/mach/enp2611.h
3 *
4 * Register and other defines for Radisys ENP-2611
5 *
6 * Created 2004 by Lennert Buytenhek from the ixdp2x01 code. The
7 * original version carries the following notices:
8 *
9 * Original Author: Naeem Afzal <naeem.m.afzal@intel.com>
10 * Maintainer: Deepak Saxena <dsaxena@plexity.net>
11 *
12 * Copyright (C) 2002 Intel Corp.
13 * Copyright (C) 2003-2004 MontaVista Software, Inc.
14 *
15 * This program is free software; you can redistribute it and/or modify it
16 * under the terms of the GNU General Public License as published by the
17 * Free Software Foundation; either version 2 of the License, or (at your
18 * option) any later version.
19 */
20
21#ifndef __ENP2611_H
22#define __ENP2611_H
23
24#define ENP2611_CALEB_PHYS_BASE 0xc5000000
25#define ENP2611_CALEB_VIRT_BASE 0xfe000000
26#define ENP2611_CALEB_SIZE 0x00100000
27
28#define ENP2611_PM3386_0_PHYS_BASE 0xc6000000
29#define ENP2611_PM3386_0_VIRT_BASE 0xfe100000
30#define ENP2611_PM3386_0_SIZE 0x00100000
31
32#define ENP2611_PM3386_1_PHYS_BASE 0xc6400000
33#define ENP2611_PM3386_1_VIRT_BASE 0xfe200000
34#define ENP2611_PM3386_1_SIZE 0x00100000
35
36#define ENP2611_GPIO_SCL 7
37#define ENP2611_GPIO_SDA 6
38
39#define IRQ_ENP2611_THERMAL IRQ_IXP2000_GPIO4
40#define IRQ_ENP2611_OPTION_BOARD IRQ_IXP2000_GPIO3
41#define IRQ_ENP2611_CALEB IRQ_IXP2000_GPIO2
42#define IRQ_ENP2611_PM3386_1 IRQ_IXP2000_GPIO1
43#define IRQ_ENP2611_PM3386_0 IRQ_IXP2000_GPIO0
44
45
46#endif
diff --git a/arch/arm/mach-ixp2000/include/mach/entry-macro.S b/arch/arm/mach-ixp2000/include/mach/entry-macro.S
new file mode 100644
index 000000000000..5850ffc8c751
--- /dev/null
+++ b/arch/arm/mach-ixp2000/include/mach/entry-macro.S
@@ -0,0 +1,60 @@
1/*
2 * arch/arm/mach-ixp2000/include/mach/entry-macro.S
3 *
4 * Low-level IRQ helper macros for IXP2000-based platforms
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10#include <mach/irqs.h>
11
12 .macro disable_fiq
13 .endm
14
15 .macro get_irqnr_preamble, base, tmp
16 .endm
17
18 .macro arch_ret_to_user, tmp1, tmp2
19 .endm
20
21 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
22
23 mov \irqnr, #0x0 @clear out irqnr as default
24 mov \base, #0xfe000000
25 orr \base, \base, #0x00e00000
26 orr \base, \base, #0x08
27 ldr \irqstat, [\base] @ get interrupts
28
29 cmp \irqstat, #0
30 beq 1001f
31
32 clz \irqnr, \irqstat
33 mov \base, #31
34 subs \irqnr, \base, \irqnr
35
36 /*
37 * We handle PCIA and PCIB here so we don't have an
38 * extra layer of code just to check these two bits.
39 */
40 cmp \irqnr, #IRQ_IXP2000_PCI
41 bne 1001f
42
43 mov \base, #0xfe000000
44 orr \base, \base, #0x00c00000
45 orr \base, \base, #0x00000100
46 orr \base, \base, #0x00000058
47 ldr \irqstat, [\base]
48
49 mov \tmp, #(1<<26)
50 tst \irqstat, \tmp
51 movne \irqnr, #IRQ_IXP2000_PCIA
52 bne 1001f
53
54 mov \tmp, #(1<<27)
55 tst \irqstat, \tmp
56 movne \irqnr, #IRQ_IXP2000_PCIB
57
581001:
59 .endm
60
diff --git a/arch/arm/mach-ixp2000/include/mach/gpio.h b/arch/arm/mach-ixp2000/include/mach/gpio.h
new file mode 100644
index 000000000000..4a88d2c33dac
--- /dev/null
+++ b/arch/arm/mach-ixp2000/include/mach/gpio.h
@@ -0,0 +1,48 @@
1/*
2 * arch/arm/mach-ixp2000/include/mach/gpio.h
3 *
4 * Copyright (C) 2002 Intel Corporation.
5 *
6 * This program is free software, you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10
11/*
12 * IXP2000 GPIO in/out, edge/level detection for IRQs:
13 * IRQs are generated on Falling-edge, Rising-Edge, Level-low, Level-High
14 * or both Falling-edge and Rising-edge.
15 * This must be called *before* the corresponding IRQ is registerd.
16 * Use this instead of directly setting the GPIO registers.
17 * GPIOs may also be used as GPIOs (e.g. for emulating i2c/smb)
18 */
19#ifndef __ASM_ARCH_GPIO_H
20#define __ASM_ARCH_GPIO_H
21
22#ifndef __ASSEMBLY__
23
24#define GPIO_IN 0
25#define GPIO_OUT 1
26
27#define IXP2000_GPIO_LOW 0
28#define IXP2000_GPIO_HIGH 1
29
30extern void gpio_line_config(int line, int direction);
31
32static inline int gpio_line_get(int line)
33{
34 return (((*IXP2000_GPIO_PLR) >> line) & 1);
35}
36
37static inline void gpio_line_set(int line, int value)
38{
39 if (value == IXP2000_GPIO_HIGH) {
40 ixp2000_reg_write(IXP2000_GPIO_POSR, 1 << line);
41 } else if (value == IXP2000_GPIO_LOW) {
42 ixp2000_reg_write(IXP2000_GPIO_POCR, 1 << line);
43 }
44}
45
46#endif /* !__ASSEMBLY__ */
47
48#endif /* ASM_ARCH_IXP2000_GPIO_H_ */
diff --git a/arch/arm/mach-ixp2000/include/mach/hardware.h b/arch/arm/mach-ixp2000/include/mach/hardware.h
new file mode 100644
index 000000000000..f033de4e7493
--- /dev/null
+++ b/arch/arm/mach-ixp2000/include/mach/hardware.h
@@ -0,0 +1,44 @@
1/*
2 * arch/arm/mach-ixp2000/include/mach/hardware.h
3 *
4 * Hardware definitions for IXP2400/2800 based systems
5 *
6 * Original Author: Naeem M Afzal <naeem.m.afzal@intel.com>
7 *
8 * Maintainer: Deepak Saxena <dsaxena@mvista.com>
9 *
10 * Copyright (C) 2001-2002 Intel Corp.
11 * Copyright (C) 2003-2004 MontaVista Software, Inc.
12 *
13 * This program is free software; you can redistribute it and/or modify it
14 * under the terms of the GNU General Public License as published by the
15 * Free Software Foundation; either version 2 of the License, or (at your
16 * option) any later version.
17 */
18
19#ifndef __ASM_ARCH_HARDWARE_H__
20#define __ASM_ARCH_HARDWARE_H__
21
22/*
23 * This needs to be platform-specific?
24 */
25#define PCIBIOS_MIN_IO 0x00000000
26#define PCIBIOS_MIN_MEM 0x00000000
27
28#include "ixp2000-regs.h" /* Chipset Registers */
29
30#define pcibios_assign_all_busses() 0
31
32/*
33 * Platform helper functions
34 */
35#include "platform.h"
36
37/*
38 * Platform-specific bits
39 */
40#include "enp2611.h" /* ENP-2611 */
41#include "ixdp2x00.h" /* IXDP2400/2800 */
42#include "ixdp2x01.h" /* IXDP2401/2801 */
43
44#endif /* _ASM_ARCH_HARDWARE_H__ */
diff --git a/arch/arm/mach-ixp2000/include/mach/io.h b/arch/arm/mach-ixp2000/include/mach/io.h
new file mode 100644
index 000000000000..859e584914d9
--- /dev/null
+++ b/arch/arm/mach-ixp2000/include/mach/io.h
@@ -0,0 +1,134 @@
1/*
2 * arch/arm/mach-ixp2000/include/mach/io.h
3 *
4 * Original Author: Naeem M Afzal <naeem.m.afzal@intel.com>
5 * Maintainer: Deepak Saxena <dsaxena@plexity.net>
6 *
7 * Copyright (C) 2002 Intel Corp.
8 * Copyrgiht (C) 2003-2004 MontaVista Software, Inc.
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
13 */
14
15#ifndef __ASM_ARM_ARCH_IO_H
16#define __ASM_ARM_ARCH_IO_H
17
18#include <mach/hardware.h>
19
20#define IO_SPACE_LIMIT 0xffffffff
21#define __mem_pci(a) (a)
22
23/*
24 * The A? revisions of the IXP2000s assert byte lanes for PCI I/O
25 * transactions the other way round (MEM transactions don't have this
26 * issue), so if we want to support those models, we need to override
27 * the standard I/O functions.
28 *
29 * B0 and later have a bit that can be set to 1 to get the proper
30 * behavior for I/O transactions, which then allows us to use the
31 * standard I/O functions. This is what we do if the user does not
32 * explicitly ask for support for pre-B0.
33 */
34#ifdef CONFIG_IXP2000_SUPPORT_BROKEN_PCI_IO
35#define ___io(p) ((void __iomem *)((p)+IXP2000_PCI_IO_VIRT_BASE))
36
37#define alignb(addr) (void __iomem *)((unsigned long)(addr) ^ 3)
38#define alignw(addr) (void __iomem *)((unsigned long)(addr) ^ 2)
39
40#define outb(v,p) __raw_writeb((v),alignb(___io(p)))
41#define outw(v,p) __raw_writew((v),alignw(___io(p)))
42#define outl(v,p) __raw_writel((v),___io(p))
43
44#define inb(p) ({ unsigned int __v = __raw_readb(alignb(___io(p))); __v; })
45#define inw(p) \
46 ({ unsigned int __v = (__raw_readw(alignw(___io(p)))); __v; })
47#define inl(p) \
48 ({ unsigned int __v = (__raw_readl(___io(p))); __v; })
49
50#define outsb(p,d,l) __raw_writesb(alignb(___io(p)),d,l)
51#define outsw(p,d,l) __raw_writesw(alignw(___io(p)),d,l)
52#define outsl(p,d,l) __raw_writesl(___io(p),d,l)
53
54#define insb(p,d,l) __raw_readsb(alignb(___io(p)),d,l)
55#define insw(p,d,l) __raw_readsw(alignw(___io(p)),d,l)
56#define insl(p,d,l) __raw_readsl(___io(p),d,l)
57
58#define __is_io_address(p) ((((unsigned long)(p)) & ~(IXP2000_PCI_IO_SIZE - 1)) == IXP2000_PCI_IO_VIRT_BASE)
59
60#define ioread8(p) \
61 ({ \
62 unsigned int __v; \
63 \
64 if (__is_io_address(p)) { \
65 __v = __raw_readb(alignb(p)); \
66 } else { \
67 __v = __raw_readb(p); \
68 } \
69 \
70 __v; \
71 }) \
72
73#define ioread16(p) \
74 ({ \
75 unsigned int __v; \
76 \
77 if (__is_io_address(p)) { \
78 __v = __raw_readw(alignw(p)); \
79 } else { \
80 __v = le16_to_cpu(__raw_readw(p)); \
81 } \
82 \
83 __v; \
84 })
85
86#define ioread32(p) \
87 ({ \
88 unsigned int __v; \
89 \
90 if (__is_io_address(p)) { \
91 __v = __raw_readl(p); \
92 } else { \
93 __v = le32_to_cpu(__raw_readl(p)); \
94 } \
95 \
96 __v; \
97 })
98
99#define iowrite8(v,p) \
100 ({ \
101 if (__is_io_address(p)) { \
102 __raw_writeb((v), alignb(p)); \
103 } else { \
104 __raw_writeb((v), p); \
105 } \
106 })
107
108#define iowrite16(v,p) \
109 ({ \
110 if (__is_io_address(p)) { \
111 __raw_writew((v), alignw(p)); \
112 } else { \
113 __raw_writew(cpu_to_le16(v), p); \
114 } \
115 })
116
117#define iowrite32(v,p) \
118 ({ \
119 if (__is_io_address(p)) { \
120 __raw_writel((v), p); \
121 } else { \
122 __raw_writel(cpu_to_le32(v), p); \
123 } \
124 })
125
126#define ioport_map(port, nr) ___io(port)
127
128#define ioport_unmap(addr)
129#else
130#define __io(p) ((void __iomem *)((p)+IXP2000_PCI_IO_VIRT_BASE))
131#endif
132
133
134#endif
diff --git a/arch/arm/mach-ixp2000/include/mach/irqs.h b/arch/arm/mach-ixp2000/include/mach/irqs.h
new file mode 100644
index 000000000000..bee96bcafdca
--- /dev/null
+++ b/arch/arm/mach-ixp2000/include/mach/irqs.h
@@ -0,0 +1,207 @@
1/*
2 * arch/arm/mach-ixp2000/include/mach/irqs.h
3 *
4 * Original Author: Naeem Afzal <naeem.m.afzal@intel.com>
5 * Maintainer: Deepak Saxena <dsaxena@plexity.net>
6 *
7 * Copyright (C) 2002 Intel Corp.
8 * Copyright (C) 2003-2004 MontaVista Software, Inc.
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
13 */
14
15#ifndef _IRQS_H
16#define _IRQS_H
17
18/*
19 * Do NOT add #ifdef MACHINE_FOO in here.
20 * Simpy add your machine IRQs here and increase NR_IRQS if needed to
21 * hold your machine's IRQ table.
22 */
23
24/*
25 * Some interrupt numbers go unused b/c the IRQ mask/ummask/status
26 * register has those bit reserved. We just mark those interrupts
27 * as invalid and this allows us to do mask/unmask with a single
28 * shift operation instead of having to map the IRQ number to
29 * a HW IRQ number.
30 */
31#define IRQ_IXP2000_SOFT_INT 0 /* soft interrupt */
32#define IRQ_IXP2000_ERRSUM 1 /* OR of all bits in ErrorStatus reg*/
33#define IRQ_IXP2000_UART 2
34#define IRQ_IXP2000_GPIO 3
35#define IRQ_IXP2000_TIMER1 4
36#define IRQ_IXP2000_TIMER2 5
37#define IRQ_IXP2000_TIMER3 6
38#define IRQ_IXP2000_TIMER4 7
39#define IRQ_IXP2000_PMU 8
40#define IRQ_IXP2000_SPF 9 /* Slow port framer IRQ */
41#define IRQ_IXP2000_DMA1 10
42#define IRQ_IXP2000_DMA2 11
43#define IRQ_IXP2000_DMA3 12
44#define IRQ_IXP2000_PCI_DOORBELL 13
45#define IRQ_IXP2000_ME_ATTN 14
46#define IRQ_IXP2000_PCI 15 /* PCI INTA or INTB */
47#define IRQ_IXP2000_THDA0 16 /* thread 0-31A */
48#define IRQ_IXP2000_THDA1 17 /* thread 32-63A, IXP2800 only */
49#define IRQ_IXP2000_THDA2 18 /* thread 64-95A */
50#define IRQ_IXP2000_THDA3 19 /* thread 96-127A, IXP2800 only */
51#define IRQ_IXP2000_THDB0 24 /* thread 0-31B */
52#define IRQ_IXP2000_THDB1 25 /* thread 32-63B, IXP2800 only */
53#define IRQ_IXP2000_THDB2 26 /* thread 64-95B */
54#define IRQ_IXP2000_THDB3 27 /* thread 96-127B, IXP2800 only */
55
56/* define generic GPIOs */
57#define IRQ_IXP2000_GPIO0 32
58#define IRQ_IXP2000_GPIO1 33
59#define IRQ_IXP2000_GPIO2 34
60#define IRQ_IXP2000_GPIO3 35
61#define IRQ_IXP2000_GPIO4 36
62#define IRQ_IXP2000_GPIO5 37
63#define IRQ_IXP2000_GPIO6 38
64#define IRQ_IXP2000_GPIO7 39
65
66/* split off the 2 PCI sources */
67#define IRQ_IXP2000_PCIA 40
68#define IRQ_IXP2000_PCIB 41
69
70/* Int sources from IRQ_ERROR_STATUS */
71#define IRQ_IXP2000_DRAM0_MIN_ERR 42
72#define IRQ_IXP2000_DRAM0_MAJ_ERR 43
73#define IRQ_IXP2000_DRAM1_MIN_ERR 44
74#define IRQ_IXP2000_DRAM1_MAJ_ERR 45
75#define IRQ_IXP2000_DRAM2_MIN_ERR 46
76#define IRQ_IXP2000_DRAM2_MAJ_ERR 47
77/* 48-57 reserved */
78#define IRQ_IXP2000_SRAM0_ERR 58
79#define IRQ_IXP2000_SRAM1_ERR 59
80#define IRQ_IXP2000_SRAM2_ERR 60
81#define IRQ_IXP2000_SRAM3_ERR 61
82/* 62-65 reserved */
83#define IRQ_IXP2000_MEDIA_ERR 66
84#define IRQ_IXP2000_PCI_ERR 67
85#define IRQ_IXP2000_SP_INT 68
86
87#define NR_IXP2000_IRQS 69
88
89#define IXP2000_BOARD_IRQ(x) (NR_IXP2000_IRQS + (x))
90
91#define IXP2000_BOARD_IRQ_MASK(irq) (1 << (irq - NR_IXP2000_IRQS))
92
93#define IXP2000_ERR_IRQ_MASK(irq) ( 1 << (irq - IRQ_IXP2000_DRAM0_MIN_ERR))
94#define IXP2000_VALID_ERR_IRQ_MASK (\
95 IXP2000_ERR_IRQ_MASK(IRQ_IXP2000_DRAM0_MIN_ERR) | \
96 IXP2000_ERR_IRQ_MASK(IRQ_IXP2000_DRAM0_MAJ_ERR) | \
97 IXP2000_ERR_IRQ_MASK(IRQ_IXP2000_DRAM1_MIN_ERR) | \
98 IXP2000_ERR_IRQ_MASK(IRQ_IXP2000_DRAM1_MAJ_ERR) | \
99 IXP2000_ERR_IRQ_MASK(IRQ_IXP2000_DRAM2_MIN_ERR) | \
100 IXP2000_ERR_IRQ_MASK(IRQ_IXP2000_DRAM2_MAJ_ERR) | \
101 IXP2000_ERR_IRQ_MASK(IRQ_IXP2000_SRAM0_ERR) | \
102 IXP2000_ERR_IRQ_MASK(IRQ_IXP2000_SRAM1_ERR) | \
103 IXP2000_ERR_IRQ_MASK(IRQ_IXP2000_SRAM2_ERR) | \
104 IXP2000_ERR_IRQ_MASK(IRQ_IXP2000_SRAM3_ERR) | \
105 IXP2000_ERR_IRQ_MASK(IRQ_IXP2000_MEDIA_ERR) | \
106 IXP2000_ERR_IRQ_MASK(IRQ_IXP2000_PCI_ERR) | \
107 IXP2000_ERR_IRQ_MASK(IRQ_IXP2000_SP_INT) )
108
109/*
110 * This allows for all the on-chip sources plus up to 32 CPLD based
111 * IRQs. Should be more than enough.
112 */
113#define IXP2000_BOARD_IRQS 32
114#define NR_IRQS (NR_IXP2000_IRQS + IXP2000_BOARD_IRQS)
115
116
117/*
118 * IXDP2400 specific IRQs
119 */
120#define IRQ_IXDP2400_INGRESS_NPU IXP2000_BOARD_IRQ(0)
121#define IRQ_IXDP2400_ENET IXP2000_BOARD_IRQ(1)
122#define IRQ_IXDP2400_MEDIA_PCI IXP2000_BOARD_IRQ(2)
123#define IRQ_IXDP2400_MEDIA_SP IXP2000_BOARD_IRQ(3)
124#define IRQ_IXDP2400_SF_PCI IXP2000_BOARD_IRQ(4)
125#define IRQ_IXDP2400_SF_SP IXP2000_BOARD_IRQ(5)
126#define IRQ_IXDP2400_PMC IXP2000_BOARD_IRQ(6)
127#define IRQ_IXDP2400_TVM IXP2000_BOARD_IRQ(7)
128
129#define NR_IXDP2400_IRQS ((IRQ_IXDP2400_TVM)+1)
130#define IXDP2400_NR_IRQS NR_IXDP2400_IRQS - NR_IXP2000_IRQS
131
132/* IXDP2800 specific IRQs */
133#define IRQ_IXDP2800_EGRESS_ENET IXP2000_BOARD_IRQ(0)
134#define IRQ_IXDP2800_INGRESS_NPU IXP2000_BOARD_IRQ(1)
135#define IRQ_IXDP2800_PMC IXP2000_BOARD_IRQ(2)
136#define IRQ_IXDP2800_FABRIC_PCI IXP2000_BOARD_IRQ(3)
137#define IRQ_IXDP2800_FABRIC IXP2000_BOARD_IRQ(4)
138#define IRQ_IXDP2800_MEDIA IXP2000_BOARD_IRQ(5)
139
140#define NR_IXDP2800_IRQS ((IRQ_IXDP2800_MEDIA)+1)
141#define IXDP2800_NR_IRQS NR_IXDP2800_IRQS - NR_IXP2000_IRQS
142
143/*
144 * IRQs on both IXDP2x01 boards
145 */
146#define IRQ_IXDP2X01_SPCI_DB_0 IXP2000_BOARD_IRQ(2)
147#define IRQ_IXDP2X01_SPCI_DB_1 IXP2000_BOARD_IRQ(3)
148#define IRQ_IXDP2X01_SPCI_PMC_INTA IXP2000_BOARD_IRQ(4)
149#define IRQ_IXDP2X01_SPCI_PMC_INTB IXP2000_BOARD_IRQ(5)
150#define IRQ_IXDP2X01_SPCI_PMC_INTC IXP2000_BOARD_IRQ(6)
151#define IRQ_IXDP2X01_SPCI_PMC_INTD IXP2000_BOARD_IRQ(7)
152#define IRQ_IXDP2X01_SPCI_FIC_INT IXP2000_BOARD_IRQ(8)
153#define IRQ_IXDP2X01_IPMI_FROM IXP2000_BOARD_IRQ(16)
154#define IRQ_IXDP2X01_125US IXP2000_BOARD_IRQ(17)
155#define IRQ_IXDP2X01_DB_0_ADD IXP2000_BOARD_IRQ(18)
156#define IRQ_IXDP2X01_DB_1_ADD IXP2000_BOARD_IRQ(19)
157#define IRQ_IXDP2X01_UART1 IXP2000_BOARD_IRQ(21)
158#define IRQ_IXDP2X01_UART2 IXP2000_BOARD_IRQ(22)
159#define IRQ_IXDP2X01_FIC_ADD_INT IXP2000_BOARD_IRQ(24)
160#define IRQ_IXDP2X01_CS8900 IXP2000_BOARD_IRQ(25)
161#define IRQ_IXDP2X01_BBSRAM IXP2000_BOARD_IRQ(26)
162
163#define IXDP2X01_VALID_IRQ_MASK ( \
164 IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_SPCI_DB_0) | \
165 IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_SPCI_DB_1) | \
166 IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_SPCI_PMC_INTA) | \
167 IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_SPCI_PMC_INTB) | \
168 IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_SPCI_PMC_INTC) | \
169 IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_SPCI_PMC_INTD) | \
170 IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_SPCI_FIC_INT) | \
171 IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_IPMI_FROM) | \
172 IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_125US) | \
173 IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_DB_0_ADD) | \
174 IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_DB_1_ADD) | \
175 IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_UART1) | \
176 IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_UART2) | \
177 IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_FIC_ADD_INT) | \
178 IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_CS8900) | \
179 IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_BBSRAM) )
180
181/*
182 * IXDP2401 specific IRQs
183 */
184#define IRQ_IXDP2401_INTA_82546 IXP2000_BOARD_IRQ(0)
185#define IRQ_IXDP2401_INTB_82546 IXP2000_BOARD_IRQ(1)
186
187#define IXDP2401_VALID_IRQ_MASK ( \
188 IXDP2X01_VALID_IRQ_MASK | \
189 IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2401_INTA_82546) |\
190 IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2401_INTB_82546))
191
192/*
193 * IXDP2801-specific IRQs
194 */
195#define IRQ_IXDP2801_RIV IXP2000_BOARD_IRQ(0)
196#define IRQ_IXDP2801_CNFG_MEDIA IXP2000_BOARD_IRQ(27)
197#define IRQ_IXDP2801_CLOCK_REF IXP2000_BOARD_IRQ(28)
198
199#define IXDP2801_VALID_IRQ_MASK ( \
200 IXDP2X01_VALID_IRQ_MASK | \
201 IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2801_RIV) |\
202 IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2801_CNFG_MEDIA) |\
203 IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2801_CLOCK_REF))
204
205#define NR_IXDP2X01_IRQS ((IRQ_IXDP2801_CLOCK_REF) + 1)
206
207#endif /*_IRQS_H*/
diff --git a/arch/arm/mach-ixp2000/include/mach/ixdp2x00.h b/arch/arm/mach-ixp2000/include/mach/ixdp2x00.h
new file mode 100644
index 000000000000..5df8479d9481
--- /dev/null
+++ b/arch/arm/mach-ixp2000/include/mach/ixdp2x00.h
@@ -0,0 +1,92 @@
1/*
2 * arch/arm/mach-ixp2000/include/mach/ixdp2x00.h
3 *
4 * Register and other defines for IXDP2[48]00 platforms
5 *
6 * Original Author: Naeem Afzal <naeem.m.afzal@intel.com>
7 * Maintainer: Deepak Saxena <dsaxena@plexity.net>
8 *
9 * Copyright (C) 2002 Intel Corp.
10 * Copyright (C) 2003-2004 MontaVista Software, Inc.
11 *
12 * This program is free software; you can redistribute it and/or modify it
13 * under the terms of the GNU General Public License as published by the
14 * Free Software Foundation; either version 2 of the License, or (at your
15 * option) any later version.
16 */
17#ifndef _IXDP2X00_H_
18#define _IXDP2X00_H_
19
20/*
21 * On board CPLD memory map
22 */
23#define IXDP2X00_PHYS_CPLD_BASE 0xc7000000
24#define IXDP2X00_VIRT_CPLD_BASE 0xfe000000
25#define IXDP2X00_CPLD_SIZE 0x00100000
26
27
28#define IXDP2X00_CPLD_REG(x) \
29 (volatile unsigned long *)(IXDP2X00_VIRT_CPLD_BASE | x)
30
31/*
32 * IXDP2400 CPLD registers
33 */
34#define IXDP2400_CPLD_SYSLED IXDP2X00_CPLD_REG(0x0)
35#define IXDP2400_CPLD_DISP_DATA IXDP2X00_CPLD_REG(0x4)
36#define IXDP2400_CPLD_CLOCK_SPEED IXDP2X00_CPLD_REG(0x8)
37#define IXDP2400_CPLD_INT_STAT IXDP2X00_CPLD_REG(0xc)
38#define IXDP2400_CPLD_REV IXDP2X00_CPLD_REG(0x10)
39#define IXDP2400_CPLD_SYS_CLK_M IXDP2X00_CPLD_REG(0x14)
40#define IXDP2400_CPLD_SYS_CLK_N IXDP2X00_CPLD_REG(0x18)
41#define IXDP2400_CPLD_INT_MASK IXDP2X00_CPLD_REG(0x48)
42
43/*
44 * IXDP2800 CPLD registers
45 */
46#define IXDP2800_CPLD_INT_STAT IXDP2X00_CPLD_REG(0x0)
47#define IXDP2800_CPLD_INT_MASK IXDP2X00_CPLD_REG(0x140)
48
49
50#define IXDP2X00_GPIO_I2C_ENABLE 0x02
51#define IXDP2X00_GPIO_SCL 0x07
52#define IXDP2X00_GPIO_SDA 0x06
53
54/*
55 * PCI devfns for on-board devices. We need these to be able to
56 * properly translate IRQs and for device removal.
57 */
58#define IXDP2400_SLAVE_ENET_DEVFN 0x18 /* Bus 1 */
59#define IXDP2400_MASTER_ENET_DEVFN 0x20 /* Bus 1 */
60#define IXDP2400_MEDIA_DEVFN 0x28 /* Bus 1 */
61#define IXDP2400_SWITCH_FABRIC_DEVFN 0x30 /* Bus 1 */
62
63#define IXDP2800_SLAVE_ENET_DEVFN 0x20 /* Bus 1 */
64#define IXDP2800_MASTER_ENET_DEVFN 0x18 /* Bus 1 */
65#define IXDP2800_SWITCH_FABRIC_DEVFN 0x30 /* Bus 1 */
66
67#define IXDP2X00_P2P_DEVFN 0x20 /* Bus 0 */
68#define IXDP2X00_21555_DEVFN 0x30 /* Bus 0 */
69#define IXDP2X00_SLAVE_NPU_DEVFN 0x28 /* Bus 1 */
70#define IXDP2X00_PMC_DEVFN 0x38 /* Bus 1 */
71#define IXDP2X00_MASTER_NPU_DEVFN 0x38 /* Bus 1 */
72
73#ifndef __ASSEMBLY__
74/*
75 * The master NPU is always PCI master.
76 */
77static inline unsigned int ixdp2x00_master_npu(void)
78{
79 return !!ixp2000_is_pcimaster();
80}
81
82/*
83 * Helper functions used by ixdp2400 and ixdp2800 specific code
84 */
85void ixdp2x00_init_irq(volatile unsigned long*, volatile unsigned long *, unsigned long);
86void ixdp2x00_slave_pci_postinit(void);
87void ixdp2x00_init_machine(void);
88void ixdp2x00_map_io(void);
89
90#endif
91
92#endif /*_IXDP2X00_H_ */
diff --git a/arch/arm/mach-ixp2000/include/mach/ixdp2x01.h b/arch/arm/mach-ixp2000/include/mach/ixdp2x01.h
new file mode 100644
index 000000000000..4c1f04083e54
--- /dev/null
+++ b/arch/arm/mach-ixp2000/include/mach/ixdp2x01.h
@@ -0,0 +1,57 @@
1/*
2 * arch/arm/mach-ixp2000/include/mach/ixdp2x01.h
3 *
4 * Platform definitions for IXDP2X01 && IXDP2801 systems
5 *
6 * Author: Deepak Saxena <dsaxena@plexity.net>
7 *
8 * Copyright 2004 (c) MontaVista Software, Inc.
9 *
10 * Based on original code Copyright (c) 2002-2003 Intel Corporation
11 *
12 * This file is licensed under the terms of the GNU General Public
13 * License version 2. This program is licensed "as is" without any
14 * warranty of any kind, whether express or implied.
15 */
16
17#ifndef __IXDP2X01_H__
18#define __IXDP2X01_H__
19
20#define IXDP2X01_PHYS_CPLD_BASE 0xc6024000
21#define IXDP2X01_VIRT_CPLD_BASE 0xfe000000
22#define IXDP2X01_CPLD_REGION_SIZE 0x00100000
23
24#define IXDP2X01_CPLD_VIRT_REG(reg) (volatile unsigned long*)(IXDP2X01_VIRT_CPLD_BASE | reg)
25#define IXDP2X01_CPLD_PHYS_REG(reg) (IXDP2X01_PHYS_CPLD_BASE | reg)
26
27#define IXDP2X01_UART1_VIRT_BASE IXDP2X01_CPLD_VIRT_REG(0x40)
28#define IXDP2X01_UART1_PHYS_BASE IXDP2X01_CPLD_PHYS_REG(0x40)
29
30#define IXDP2X01_UART2_VIRT_BASE IXDP2X01_CPLD_VIRT_REG(0x60)
31#define IXDP2X01_UART2_PHYS_BASE IXDP2X01_CPLD_PHYS_REG(0x60)
32
33#define IXDP2X01_CS8900_VIRT_BASE IXDP2X01_CPLD_VIRT_REG(0x80)
34#define IXDP2X01_CS8900_VIRT_END (IXDP2X01_CS8900_VIRT_BASE + 16)
35
36#define IXDP2X01_CPLD_RESET_REG IXDP2X01_CPLD_VIRT_REG(0x00)
37#define IXDP2X01_INT_MASK_SET_REG IXDP2X01_CPLD_VIRT_REG(0x08)
38#define IXDP2X01_INT_STAT_REG IXDP2X01_CPLD_VIRT_REG(0x0C)
39#define IXDP2X01_INT_RAW_REG IXDP2X01_CPLD_VIRT_REG(0x10)
40#define IXDP2X01_INT_MASK_CLR_REG IXDP2X01_INT_RAW_REG
41#define IXDP2X01_INT_SIM_REG IXDP2X01_CPLD_VIRT_REG(0x14)
42
43#define IXDP2X01_CPLD_FLASH_REG IXDP2X01_CPLD_VIRT_REG(0x20)
44
45#define IXDP2X01_CPLD_FLASH_INTERN 0x8000
46#define IXDP2X01_CPLD_FLASH_BANK_MASK 0xF
47#define IXDP2X01_FLASH_WINDOW_BITS 25
48#define IXDP2X01_FLASH_WINDOW_SIZE (1 << IXDP2X01_FLASH_WINDOW_BITS)
49#define IXDP2X01_FLASH_WINDOW_MASK (IXDP2X01_FLASH_WINDOW_SIZE - 1)
50
51#define IXDP2X01_UART_CLK 1843200
52
53#define IXDP2X01_GPIO_I2C_ENABLE 0x02
54#define IXDP2X01_GPIO_SCL 0x07
55#define IXDP2X01_GPIO_SDA 0x06
56
57#endif /* __IXDP2x01_H__ */
diff --git a/arch/arm/mach-ixp2000/include/mach/ixp2000-regs.h b/arch/arm/mach-ixp2000/include/mach/ixp2000-regs.h
new file mode 100644
index 000000000000..19d80379a3e3
--- /dev/null
+++ b/arch/arm/mach-ixp2000/include/mach/ixp2000-regs.h
@@ -0,0 +1,457 @@
1/*
2 * arch/arm/mach-ixp2000/include/mach/ixp2000-regs.h
3 *
4 * Chipset register definitions for IXP2400/2800 based systems.
5 *
6 * Original Author: Naeem Afzal <naeem.m.afzal@intel.com>
7 *
8 * Maintainer: Deepak Saxena <dsaxena@plexity.net>
9 *
10 * Copyright (C) 2002 Intel Corp.
11 * Copyright (C) 2003-2004 MontaVista Software, Inc.
12 *
13 * This program is free software; you can redistribute it and/or modify it
14 * under the terms of the GNU General Public License as published by the
15 * Free Software Foundation; either version 2 of the License, or (at your
16 * option) any later version.
17 */
18#ifndef _IXP2000_REGS_H_
19#define _IXP2000_REGS_H_
20
21/*
22 * IXP2000 linux memory map:
23 *
24 * virt phys size
25 * fb000000 db000000 16M PCI CFG1
26 * fc000000 da000000 16M PCI CFG0
27 * fd000000 d8000000 16M PCI I/O
28 * fe[0-7]00000 8M per-platform mappings
29 * fe900000 80000000 1M SRAM #0 (first MB)
30 * fea00000 cb400000 1M SCRATCH ring get/put
31 * feb00000 c8000000 1M MSF
32 * fec00000 df000000 1M PCI CSRs
33 * fed00000 de000000 1M PCI CREG
34 * fee00000 d6000000 1M INTCTL
35 * fef00000 c0000000 1M CAP
36 */
37
38/*
39 * Static I/O regions.
40 *
41 * Most of the registers are clumped in 4K regions spread throughout
42 * the 0xc0000000 -> 0xc0100000 address range, but we just map in
43 * the whole range using a single 1 MB section instead of small
44 * 4K pages. This has two advantages for us:
45 *
46 * 1) We use only one TLB entry for large number of on-chip I/O devices.
47 *
48 * 2) We can easily set the Section attributes to XCB=101 on the IXP2400
49 * as required per erratum #66. We accomplish this by using a
50 * new MT_IXP2000_DEVICE memory type with the bits set as required.
51 *
52 * CAP stands for CSR Access Proxy.
53 *
54 * If you change the virtual address of this mapping, please propagate
55 * the change to arch/arm/kernel/debug.S, which hardcodes the virtual
56 * address of the UART located in this region.
57 */
58
59#define IXP2000_CAP_PHYS_BASE 0xc0000000
60#define IXP2000_CAP_VIRT_BASE 0xfef00000
61#define IXP2000_CAP_SIZE 0x00100000
62
63/*
64 * Addresses for specific on-chip peripherals.
65 */
66#define IXP2000_SLOWPORT_CSR_VIRT_BASE 0xfef80000
67#define IXP2000_GLOBAL_REG_VIRT_BASE 0xfef04000
68#define IXP2000_UART_PHYS_BASE 0xc0030000
69#define IXP2000_UART_VIRT_BASE 0xfef30000
70#define IXP2000_TIMER_VIRT_BASE 0xfef20000
71#define IXP2000_UENGINE_CSR_VIRT_BASE 0xfef18000
72#define IXP2000_GPIO_VIRT_BASE 0xfef10000
73
74/*
75 * Devices outside of the 0xc0000000 -> 0xc0100000 range. The virtual
76 * addresses of the INTCTL and PCI_CSR mappings are hardcoded in
77 * entry-macro.S, so if you ever change these please propagate
78 * the change.
79 */
80#define IXP2000_INTCTL_PHYS_BASE 0xd6000000
81#define IXP2000_INTCTL_VIRT_BASE 0xfee00000
82#define IXP2000_INTCTL_SIZE 0x00100000
83
84#define IXP2000_PCI_CREG_PHYS_BASE 0xde000000
85#define IXP2000_PCI_CREG_VIRT_BASE 0xfed00000
86#define IXP2000_PCI_CREG_SIZE 0x00100000
87
88#define IXP2000_PCI_CSR_PHYS_BASE 0xdf000000
89#define IXP2000_PCI_CSR_VIRT_BASE 0xfec00000
90#define IXP2000_PCI_CSR_SIZE 0x00100000
91
92#define IXP2000_MSF_PHYS_BASE 0xc8000000
93#define IXP2000_MSF_VIRT_BASE 0xfeb00000
94#define IXP2000_MSF_SIZE 0x00100000
95
96#define IXP2000_SCRATCH_RING_PHYS_BASE 0xcb400000
97#define IXP2000_SCRATCH_RING_VIRT_BASE 0xfea00000
98#define IXP2000_SCRATCH_RING_SIZE 0x00100000
99
100#define IXP2000_SRAM0_PHYS_BASE 0x80000000
101#define IXP2000_SRAM0_VIRT_BASE 0xfe900000
102#define IXP2000_SRAM0_SIZE 0x00100000
103
104#define IXP2000_PCI_IO_PHYS_BASE 0xd8000000
105#define IXP2000_PCI_IO_VIRT_BASE 0xfd000000
106#define IXP2000_PCI_IO_SIZE 0x01000000
107
108#define IXP2000_PCI_CFG0_PHYS_BASE 0xda000000
109#define IXP2000_PCI_CFG0_VIRT_BASE 0xfc000000
110#define IXP2000_PCI_CFG0_SIZE 0x01000000
111
112#define IXP2000_PCI_CFG1_PHYS_BASE 0xdb000000
113#define IXP2000_PCI_CFG1_VIRT_BASE 0xfb000000
114#define IXP2000_PCI_CFG1_SIZE 0x01000000
115
116/*
117 * Timers
118 */
119#define IXP2000_TIMER_REG(x) ((volatile unsigned long*)(IXP2000_TIMER_VIRT_BASE | (x)))
120/* Timer control */
121#define IXP2000_T1_CTL IXP2000_TIMER_REG(0x00)
122#define IXP2000_T2_CTL IXP2000_TIMER_REG(0x04)
123#define IXP2000_T3_CTL IXP2000_TIMER_REG(0x08)
124#define IXP2000_T4_CTL IXP2000_TIMER_REG(0x0c)
125/* Store initial value */
126#define IXP2000_T1_CLD IXP2000_TIMER_REG(0x10)
127#define IXP2000_T2_CLD IXP2000_TIMER_REG(0x14)
128#define IXP2000_T3_CLD IXP2000_TIMER_REG(0x18)
129#define IXP2000_T4_CLD IXP2000_TIMER_REG(0x1c)
130/* Read current value */
131#define IXP2000_T1_CSR IXP2000_TIMER_REG(0x20)
132#define IXP2000_T2_CSR IXP2000_TIMER_REG(0x24)
133#define IXP2000_T3_CSR IXP2000_TIMER_REG(0x28)
134#define IXP2000_T4_CSR IXP2000_TIMER_REG(0x2c)
135/* Clear associated timer interrupt */
136#define IXP2000_T1_CLR IXP2000_TIMER_REG(0x30)
137#define IXP2000_T2_CLR IXP2000_TIMER_REG(0x34)
138#define IXP2000_T3_CLR IXP2000_TIMER_REG(0x38)
139#define IXP2000_T4_CLR IXP2000_TIMER_REG(0x3c)
140/* Timer watchdog enable for T4 */
141#define IXP2000_TWDE IXP2000_TIMER_REG(0x40)
142
143#define WDT_ENABLE 0x00000001
144#define TIMER_DIVIDER_256 0x00000008
145#define TIMER_ENABLE 0x00000080
146#define IRQ_MASK_TIMER1 (1 << 4)
147
148/*
149 * Interrupt controller registers
150 */
151#define IXP2000_INTCTL_REG(x) (volatile unsigned long*)(IXP2000_INTCTL_VIRT_BASE | (x))
152#define IXP2000_IRQ_STATUS IXP2000_INTCTL_REG(0x08)
153#define IXP2000_IRQ_ENABLE IXP2000_INTCTL_REG(0x10)
154#define IXP2000_IRQ_ENABLE_SET IXP2000_INTCTL_REG(0x10)
155#define IXP2000_IRQ_ENABLE_CLR IXP2000_INTCTL_REG(0x18)
156#define IXP2000_FIQ_ENABLE_CLR IXP2000_INTCTL_REG(0x14)
157#define IXP2000_IRQ_ERR_STATUS IXP2000_INTCTL_REG(0x24)
158#define IXP2000_IRQ_ERR_ENABLE_SET IXP2000_INTCTL_REG(0x2c)
159#define IXP2000_FIQ_ERR_ENABLE_CLR IXP2000_INTCTL_REG(0x30)
160#define IXP2000_IRQ_ERR_ENABLE_CLR IXP2000_INTCTL_REG(0x34)
161#define IXP2000_IRQ_THD_RAW_STATUS_A_0 IXP2000_INTCTL_REG(0x60)
162#define IXP2000_IRQ_THD_RAW_STATUS_A_1 IXP2000_INTCTL_REG(0x64)
163#define IXP2000_IRQ_THD_RAW_STATUS_A_2 IXP2000_INTCTL_REG(0x68)
164#define IXP2000_IRQ_THD_RAW_STATUS_A_3 IXP2000_INTCTL_REG(0x6c)
165#define IXP2000_IRQ_THD_RAW_STATUS_B_0 IXP2000_INTCTL_REG(0x80)
166#define IXP2000_IRQ_THD_RAW_STATUS_B_1 IXP2000_INTCTL_REG(0x84)
167#define IXP2000_IRQ_THD_RAW_STATUS_B_2 IXP2000_INTCTL_REG(0x88)
168#define IXP2000_IRQ_THD_RAW_STATUS_B_3 IXP2000_INTCTL_REG(0x8c)
169#define IXP2000_IRQ_THD_STATUS_A_0 IXP2000_INTCTL_REG(0xe0)
170#define IXP2000_IRQ_THD_STATUS_A_1 IXP2000_INTCTL_REG(0xe4)
171#define IXP2000_IRQ_THD_STATUS_A_2 IXP2000_INTCTL_REG(0xe8)
172#define IXP2000_IRQ_THD_STATUS_A_3 IXP2000_INTCTL_REG(0xec)
173#define IXP2000_IRQ_THD_STATUS_B_0 IXP2000_INTCTL_REG(0x100)
174#define IXP2000_IRQ_THD_STATUS_B_1 IXP2000_INTCTL_REG(0x104)
175#define IXP2000_IRQ_THD_STATUS_B_2 IXP2000_INTCTL_REG(0x108)
176#define IXP2000_IRQ_THD_STATUS_B_3 IXP2000_INTCTL_REG(0x10c)
177#define IXP2000_IRQ_THD_ENABLE_SET_A_0 IXP2000_INTCTL_REG(0x160)
178#define IXP2000_IRQ_THD_ENABLE_SET_A_1 IXP2000_INTCTL_REG(0x164)
179#define IXP2000_IRQ_THD_ENABLE_SET_A_2 IXP2000_INTCTL_REG(0x168)
180#define IXP2000_IRQ_THD_ENABLE_SET_A_3 IXP2000_INTCTL_REG(0x16c)
181#define IXP2000_IRQ_THD_ENABLE_SET_B_0 IXP2000_INTCTL_REG(0x180)
182#define IXP2000_IRQ_THD_ENABLE_SET_B_1 IXP2000_INTCTL_REG(0x184)
183#define IXP2000_IRQ_THD_ENABLE_SET_B_2 IXP2000_INTCTL_REG(0x188)
184#define IXP2000_IRQ_THD_ENABLE_SET_B_3 IXP2000_INTCTL_REG(0x18c)
185#define IXP2000_IRQ_THD_ENABLE_CLEAR_A_0 IXP2000_INTCTL_REG(0x1e0)
186#define IXP2000_IRQ_THD_ENABLE_CLEAR_A_1 IXP2000_INTCTL_REG(0x1e4)
187#define IXP2000_IRQ_THD_ENABLE_CLEAR_A_2 IXP2000_INTCTL_REG(0x1e8)
188#define IXP2000_IRQ_THD_ENABLE_CLEAR_A_3 IXP2000_INTCTL_REG(0x1ec)
189#define IXP2000_IRQ_THD_ENABLE_CLEAR_B_0 IXP2000_INTCTL_REG(0x200)
190#define IXP2000_IRQ_THD_ENABLE_CLEAR_B_1 IXP2000_INTCTL_REG(0x204)
191#define IXP2000_IRQ_THD_ENABLE_CLEAR_B_2 IXP2000_INTCTL_REG(0x208)
192#define IXP2000_IRQ_THD_ENABLE_CLEAR_B_3 IXP2000_INTCTL_REG(0x20c)
193
194/*
195 * Mask of valid IRQs in the 32-bit IRQ register. We use
196 * this to mark certain IRQs as being invalid.
197 */
198#define IXP2000_VALID_IRQ_MASK 0x0f0fffff
199
200/*
201 * PCI config register access from core
202 */
203#define IXP2000_PCI_CREG(x) (volatile unsigned long*)(IXP2000_PCI_CREG_VIRT_BASE | (x))
204#define IXP2000_PCI_CMDSTAT IXP2000_PCI_CREG(0x04)
205#define IXP2000_PCI_CSR_BAR IXP2000_PCI_CREG(0x10)
206#define IXP2000_PCI_SRAM_BAR IXP2000_PCI_CREG(0x14)
207#define IXP2000_PCI_SDRAM_BAR IXP2000_PCI_CREG(0x18)
208
209/*
210 * PCI CSRs
211 */
212#define IXP2000_PCI_CSR(x) (volatile unsigned long*)(IXP2000_PCI_CSR_VIRT_BASE | (x))
213
214/*
215 * PCI outbound interrupts
216 */
217#define IXP2000_PCI_OUT_INT_STATUS IXP2000_PCI_CSR(0x30)
218#define IXP2000_PCI_OUT_INT_MASK IXP2000_PCI_CSR(0x34)
219/*
220 * PCI communications
221 */
222#define IXP2000_PCI_MAILBOX0 IXP2000_PCI_CSR(0x50)
223#define IXP2000_PCI_MAILBOX1 IXP2000_PCI_CSR(0x54)
224#define IXP2000_PCI_MAILBOX2 IXP2000_PCI_CSR(0x58)
225#define IXP2000_PCI_MAILBOX3 IXP2000_PCI_CSR(0x5C)
226#define IXP2000_XSCALE_DOORBELL IXP2000_PCI_CSR(0x60)
227#define IXP2000_XSCALE_DOORBELL_SETUP IXP2000_PCI_CSR(0x64)
228#define IXP2000_PCI_DOORBELL IXP2000_PCI_CSR(0x70)
229#define IXP2000_PCI_DOORBELL_SETUP IXP2000_PCI_CSR(0x74)
230
231/*
232 * DMA engines
233 */
234#define IXP2000_PCI_CH1_BYTE_CNT IXP2000_PCI_CSR(0x80)
235#define IXP2000_PCI_CH1_ADDR IXP2000_PCI_CSR(0x84)
236#define IXP2000_PCI_CH1_DRAM_ADDR IXP2000_PCI_CSR(0x88)
237#define IXP2000_PCI_CH1_DESC_PTR IXP2000_PCI_CSR(0x8C)
238#define IXP2000_PCI_CH1_CNTRL IXP2000_PCI_CSR(0x90)
239#define IXP2000_PCI_CH1_ME_PARAM IXP2000_PCI_CSR(0x94)
240#define IXP2000_PCI_CH2_BYTE_CNT IXP2000_PCI_CSR(0xA0)
241#define IXP2000_PCI_CH2_ADDR IXP2000_PCI_CSR(0xA4)
242#define IXP2000_PCI_CH2_DRAM_ADDR IXP2000_PCI_CSR(0xA8)
243#define IXP2000_PCI_CH2_DESC_PTR IXP2000_PCI_CSR(0xAC)
244#define IXP2000_PCI_CH2_CNTRL IXP2000_PCI_CSR(0xB0)
245#define IXP2000_PCI_CH2_ME_PARAM IXP2000_PCI_CSR(0xB4)
246#define IXP2000_PCI_CH3_BYTE_CNT IXP2000_PCI_CSR(0xC0)
247#define IXP2000_PCI_CH3_ADDR IXP2000_PCI_CSR(0xC4)
248#define IXP2000_PCI_CH3_DRAM_ADDR IXP2000_PCI_CSR(0xC8)
249#define IXP2000_PCI_CH3_DESC_PTR IXP2000_PCI_CSR(0xCC)
250#define IXP2000_PCI_CH3_CNTRL IXP2000_PCI_CSR(0xD0)
251#define IXP2000_PCI_CH3_ME_PARAM IXP2000_PCI_CSR(0xD4)
252#define IXP2000_DMA_INF_MODE IXP2000_PCI_CSR(0xE0)
253/*
254 * Size masks for BARs
255 */
256#define IXP2000_PCI_SRAM_BASE_ADDR_MASK IXP2000_PCI_CSR(0xFC)
257#define IXP2000_PCI_DRAM_BASE_ADDR_MASK IXP2000_PCI_CSR(0x100)
258/*
259 * Control and uEngine related
260 */
261#define IXP2000_PCI_CONTROL IXP2000_PCI_CSR(0x13C)
262#define IXP2000_PCI_ADDR_EXT IXP2000_PCI_CSR(0x140)
263#define IXP2000_PCI_ME_PUSH_STATUS IXP2000_PCI_CSR(0x148)
264#define IXP2000_PCI_ME_PUSH_EN IXP2000_PCI_CSR(0x14C)
265#define IXP2000_PCI_ERR_STATUS IXP2000_PCI_CSR(0x150)
266#define IXP2000_PCI_ERR_ENABLE IXP2000_PCI_CSR(0x154)
267/*
268 * Inbound PCI interrupt control
269 */
270#define IXP2000_PCI_XSCALE_INT_STATUS IXP2000_PCI_CSR(0x158)
271#define IXP2000_PCI_XSCALE_INT_ENABLE IXP2000_PCI_CSR(0x15C)
272
273#define IXP2000_PCICNTL_PNR (1<<17) /* PCI not Reset bit of PCI_CONTROL */
274#define IXP2000_PCICNTL_PCF (1<<28) /* PCI Central function bit */
275#define IXP2000_XSCALE_INT (1<<1) /* Interrupt from XScale to PCI */
276
277/* These are from the IRQ register in the PCI ISR register */
278#define PCI_CONTROL_BE_DEO (1 << 22) /* Big Endian Data Enable Out */
279#define PCI_CONTROL_BE_DEI (1 << 21) /* Big Endian Data Enable In */
280#define PCI_CONTROL_BE_BEO (1 << 20) /* Big Endian Byte Enable Out */
281#define PCI_CONTROL_BE_BEI (1 << 19) /* Big Endian Byte Enable In */
282#define PCI_CONTROL_IEE (1 << 17) /* I/O cycle Endian swap Enable */
283
284#define IXP2000_PCI_RST_REL (1 << 2)
285#define CFG_RST_DIR (*IXP2000_PCI_CONTROL & IXP2000_PCICNTL_PCF)
286#define CFG_PCI_BOOT_HOST (1 << 2)
287#define CFG_BOOT_PROM (1 << 1)
288
289/*
290 * SlowPort CSRs
291 *
292 * The slowport is used to access things like flash, SONET framer control
293 * ports, slave microprocessors, CPLDs, and others of chip memory mapped
294 * peripherals.
295 */
296#define SLOWPORT_CSR(x) (volatile unsigned long*)(IXP2000_SLOWPORT_CSR_VIRT_BASE | (x))
297
298#define IXP2000_SLOWPORT_CCR SLOWPORT_CSR(0x00)
299#define IXP2000_SLOWPORT_WTC1 SLOWPORT_CSR(0x04)
300#define IXP2000_SLOWPORT_WTC2 SLOWPORT_CSR(0x08)
301#define IXP2000_SLOWPORT_RTC1 SLOWPORT_CSR(0x0c)
302#define IXP2000_SLOWPORT_RTC2 SLOWPORT_CSR(0x10)
303#define IXP2000_SLOWPORT_FSR SLOWPORT_CSR(0x14)
304#define IXP2000_SLOWPORT_PCR SLOWPORT_CSR(0x18)
305#define IXP2000_SLOWPORT_ADC SLOWPORT_CSR(0x1C)
306#define IXP2000_SLOWPORT_FAC SLOWPORT_CSR(0x20)
307#define IXP2000_SLOWPORT_FRM SLOWPORT_CSR(0x24)
308#define IXP2000_SLOWPORT_FIN SLOWPORT_CSR(0x28)
309
310/*
311 * CCR values.
312 * The CCR configures the clock division for the slowport interface.
313 */
314#define SLOWPORT_CCR_DIV_1 0x00
315#define SLOWPORT_CCR_DIV_2 0x01
316#define SLOWPORT_CCR_DIV_4 0x02
317#define SLOWPORT_CCR_DIV_6 0x03
318#define SLOWPORT_CCR_DIV_8 0x04
319#define SLOWPORT_CCR_DIV_10 0x05
320#define SLOWPORT_CCR_DIV_12 0x06
321#define SLOWPORT_CCR_DIV_14 0x07
322#define SLOWPORT_CCR_DIV_16 0x08
323#define SLOWPORT_CCR_DIV_18 0x09
324#define SLOWPORT_CCR_DIV_20 0x0a
325#define SLOWPORT_CCR_DIV_22 0x0b
326#define SLOWPORT_CCR_DIV_24 0x0c
327#define SLOWPORT_CCR_DIV_26 0x0d
328#define SLOWPORT_CCR_DIV_28 0x0e
329#define SLOWPORT_CCR_DIV_30 0x0f
330
331/*
332 * PCR values. PCR configure the mode of the interface.
333 */
334#define SLOWPORT_MODE_FLASH 0x00
335#define SLOWPORT_MODE_LUCENT 0x01
336#define SLOWPORT_MODE_PMC_SIERRA 0x02
337#define SLOWPORT_MODE_INTEL_UP 0x03
338#define SLOWPORT_MODE_MOTOROLA_UP 0x04
339
340/*
341 * ADC values. Defines data and address bus widths.
342 */
343#define SLOWPORT_ADDR_WIDTH_8 0x00
344#define SLOWPORT_ADDR_WIDTH_16 0x01
345#define SLOWPORT_ADDR_WIDTH_24 0x02
346#define SLOWPORT_ADDR_WIDTH_32 0x03
347#define SLOWPORT_DATA_WIDTH_8 0x00
348#define SLOWPORT_DATA_WIDTH_16 0x10
349#define SLOWPORT_DATA_WIDTH_24 0x20
350#define SLOWPORT_DATA_WIDTH_32 0x30
351
352/*
353 * Masks and shifts for various fields in the WTC and RTC registers.
354 */
355#define SLOWPORT_WRTC_MASK_HD 0x0003
356#define SLOWPORT_WRTC_MASK_PW 0x003c
357#define SLOWPORT_WRTC_MASK_SU 0x03c0
358
359#define SLOWPORT_WRTC_SHIFT_HD 0x00
360#define SLOWPORT_WRTC_SHIFT_SU 0x02
361#define SLOWPORT_WRTC_SHFIT_PW 0x06
362
363
364/*
365 * GPIO registers & GPIO interface.
366 */
367#define IXP2000_GPIO_REG(x) ((volatile unsigned long*)(IXP2000_GPIO_VIRT_BASE+(x)))
368#define IXP2000_GPIO_PLR IXP2000_GPIO_REG(0x00)
369#define IXP2000_GPIO_PDPR IXP2000_GPIO_REG(0x04)
370#define IXP2000_GPIO_PDSR IXP2000_GPIO_REG(0x08)
371#define IXP2000_GPIO_PDCR IXP2000_GPIO_REG(0x0c)
372#define IXP2000_GPIO_POPR IXP2000_GPIO_REG(0x10)
373#define IXP2000_GPIO_POSR IXP2000_GPIO_REG(0x14)
374#define IXP2000_GPIO_POCR IXP2000_GPIO_REG(0x18)
375#define IXP2000_GPIO_REDR IXP2000_GPIO_REG(0x1c)
376#define IXP2000_GPIO_FEDR IXP2000_GPIO_REG(0x20)
377#define IXP2000_GPIO_EDSR IXP2000_GPIO_REG(0x24)
378#define IXP2000_GPIO_LSHR IXP2000_GPIO_REG(0x28)
379#define IXP2000_GPIO_LSLR IXP2000_GPIO_REG(0x2c)
380#define IXP2000_GPIO_LDSR IXP2000_GPIO_REG(0x30)
381#define IXP2000_GPIO_INER IXP2000_GPIO_REG(0x34)
382#define IXP2000_GPIO_INSR IXP2000_GPIO_REG(0x38)
383#define IXP2000_GPIO_INCR IXP2000_GPIO_REG(0x3c)
384#define IXP2000_GPIO_INST IXP2000_GPIO_REG(0x40)
385
386/*
387 * "Global" registers...whatever that's supposed to mean.
388 */
389#define GLOBAL_REG_BASE (IXP2000_GLOBAL_REG_VIRT_BASE + 0x0a00)
390#define GLOBAL_REG(x) (volatile unsigned long*)(GLOBAL_REG_BASE | (x))
391
392#define IXP2000_MAJ_PROD_TYPE_MASK 0x001F0000
393#define IXP2000_MAJ_PROD_TYPE_IXP2000 0x00000000
394#define IXP2000_MIN_PROD_TYPE_MASK 0x0000FF00
395#define IXP2000_MIN_PROD_TYPE_IXP2400 0x00000200
396#define IXP2000_MIN_PROD_TYPE_IXP2850 0x00000100
397#define IXP2000_MIN_PROD_TYPE_IXP2800 0x00000000
398#define IXP2000_MAJ_REV_MASK 0x000000F0
399#define IXP2000_MIN_REV_MASK 0x0000000F
400#define IXP2000_PROD_ID_MASK 0xFFFFFFFF
401
402#define IXP2000_PRODUCT_ID GLOBAL_REG(0x00)
403#define IXP2000_MISC_CONTROL GLOBAL_REG(0x04)
404#define IXP2000_MSF_CLK_CNTRL GLOBAL_REG(0x08)
405#define IXP2000_RESET0 GLOBAL_REG(0x0c)
406#define IXP2000_RESET1 GLOBAL_REG(0x10)
407#define IXP2000_CCR GLOBAL_REG(0x14)
408#define IXP2000_STRAP_OPTIONS GLOBAL_REG(0x18)
409
410#define RSTALL (1 << 16)
411#define WDT_RESET_ENABLE 0x01000000
412
413
414/*
415 * MSF registers. The IXP2400 and IXP2800 have somewhat different MSF
416 * units, but the registers that differ between the two don't overlap,
417 * so we can have one register list for both.
418 */
419#define IXP2000_MSF_REG(x) ((volatile unsigned long*)(IXP2000_MSF_VIRT_BASE + (x)))
420#define IXP2000_MSF_RX_CONTROL IXP2000_MSF_REG(0x0000)
421#define IXP2000_MSF_TX_CONTROL IXP2000_MSF_REG(0x0004)
422#define IXP2000_MSF_INTERRUPT_STATUS IXP2000_MSF_REG(0x0008)
423#define IXP2000_MSF_INTERRUPT_ENABLE IXP2000_MSF_REG(0x000c)
424#define IXP2000_MSF_CSIX_TYPE_MAP IXP2000_MSF_REG(0x0010)
425#define IXP2000_MSF_FC_EGRESS_STATUS IXP2000_MSF_REG(0x0014)
426#define IXP2000_MSF_FC_INGRESS_STATUS IXP2000_MSF_REG(0x0018)
427#define IXP2000_MSF_HWM_CONTROL IXP2000_MSF_REG(0x0024)
428#define IXP2000_MSF_FC_STATUS_OVERRIDE IXP2000_MSF_REG(0x0028)
429#define IXP2000_MSF_CLOCK_CONTROL IXP2000_MSF_REG(0x002c)
430#define IXP2000_MSF_RX_PORT_MAP IXP2000_MSF_REG(0x0040)
431#define IXP2000_MSF_RBUF_ELEMENT_DONE IXP2000_MSF_REG(0x0044)
432#define IXP2000_MSF_RX_MPHY_POLL_LIMIT IXP2000_MSF_REG(0x0048)
433#define IXP2000_MSF_RX_CALENDAR_LENGTH IXP2000_MSF_REG(0x0048)
434#define IXP2000_MSF_RX_THREAD_FREELIST_TIMEOUT_0 IXP2000_MSF_REG(0x0050)
435#define IXP2000_MSF_RX_THREAD_FREELIST_TIMEOUT_1 IXP2000_MSF_REG(0x0054)
436#define IXP2000_MSF_RX_THREAD_FREELIST_TIMEOUT_2 IXP2000_MSF_REG(0x0058)
437#define IXP2000_MSF_TX_SEQUENCE_0 IXP2000_MSF_REG(0x0060)
438#define IXP2000_MSF_TX_SEQUENCE_1 IXP2000_MSF_REG(0x0064)
439#define IXP2000_MSF_TX_SEQUENCE_2 IXP2000_MSF_REG(0x0068)
440#define IXP2000_MSF_TX_MPHY_POLL_LIMIT IXP2000_MSF_REG(0x0070)
441#define IXP2000_MSF_TX_CALENDAR_LENGTH IXP2000_MSF_REG(0x0070)
442#define IXP2000_MSF_RX_UP_CONTROL_0 IXP2000_MSF_REG(0x0080)
443#define IXP2000_MSF_RX_UP_CONTROL_1 IXP2000_MSF_REG(0x0084)
444#define IXP2000_MSF_RX_UP_CONTROL_2 IXP2000_MSF_REG(0x0088)
445#define IXP2000_MSF_RX_UP_CONTROL_3 IXP2000_MSF_REG(0x008c)
446#define IXP2000_MSF_TX_UP_CONTROL_0 IXP2000_MSF_REG(0x0090)
447#define IXP2000_MSF_TX_UP_CONTROL_1 IXP2000_MSF_REG(0x0094)
448#define IXP2000_MSF_TX_UP_CONTROL_2 IXP2000_MSF_REG(0x0098)
449#define IXP2000_MSF_TX_UP_CONTROL_3 IXP2000_MSF_REG(0x009c)
450#define IXP2000_MSF_TRAIN_DATA IXP2000_MSF_REG(0x00a0)
451#define IXP2000_MSF_TRAIN_CALENDAR IXP2000_MSF_REG(0x00a4)
452#define IXP2000_MSF_TRAIN_FLOW_CONTROL IXP2000_MSF_REG(0x00a8)
453#define IXP2000_MSF_TX_CALENDAR_0 IXP2000_MSF_REG(0x1000)
454#define IXP2000_MSF_RX_PORT_CALENDAR_STATUS IXP2000_MSF_REG(0x1400)
455
456
457#endif /* _IXP2000_H_ */
diff --git a/arch/arm/mach-ixp2000/include/mach/memory.h b/arch/arm/mach-ixp2000/include/mach/memory.h
new file mode 100644
index 000000000000..241529a7c52d
--- /dev/null
+++ b/arch/arm/mach-ixp2000/include/mach/memory.h
@@ -0,0 +1,34 @@
1/*
2 * arch/arm/mach-ixp2000/include/mach/memory.h
3 *
4 * Copyright (c) 2002 Intel Corp.
5 * Copyright (c) 2003-2004 MontaVista Software, Inc.
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; either version 2 of the License, or (at your
10 * option) any later version.
11 */
12
13#ifndef __ASM_ARCH_MEMORY_H
14#define __ASM_ARCH_MEMORY_H
15
16#define PHYS_OFFSET UL(0x00000000)
17
18/*
19 * Virtual view <-> DMA view memory address translations
20 * virt_to_bus: Used to translate the virtual address to an
21 * address suitable to be passed to set_dma_addr
22 * bus_to_virt: Used to convert an address for DMA operations
23 * to an address that the kernel can use.
24 */
25#include <mach/ixp2000-regs.h>
26
27#define __virt_to_bus(v) \
28 (((__virt_to_phys(v) - 0x0) + (*IXP2000_PCI_SDRAM_BAR & 0xfffffff0)))
29
30#define __bus_to_virt(b) \
31 __phys_to_virt((((b - (*IXP2000_PCI_SDRAM_BAR & 0xfffffff0)) + 0x0)))
32
33#endif
34
diff --git a/arch/arm/mach-ixp2000/include/mach/platform.h b/arch/arm/mach-ixp2000/include/mach/platform.h
new file mode 100644
index 000000000000..42182c79ed90
--- /dev/null
+++ b/arch/arm/mach-ixp2000/include/mach/platform.h
@@ -0,0 +1,152 @@
1/*
2 * arch/arm/mach-ixp2000/include/mach/platform.h
3 *
4 * Various bits of code used by platform-level code.
5 *
6 * Author: Deepak Saxena <dsaxena@plexity.net>
7 *
8 * Copyright 2004 (c) MontaVista Software, Inc.
9 *
10 * This file is licensed under the terms of the GNU General Public
11 * License version 2. This program is licensed "as is" without any
12 * warranty of any kind, whether express or implied.
13 */
14
15
16#ifndef __ASSEMBLY__
17
18static inline unsigned long ixp2000_reg_read(volatile void *reg)
19{
20 return *((volatile unsigned long *)reg);
21}
22
23static inline void ixp2000_reg_write(volatile void *reg, unsigned long val)
24{
25 *((volatile unsigned long *)reg) = val;
26}
27
28/*
29 * On the IXP2400, we can't use XCB=000 due to chip bugs. We use
30 * XCB=101 instead, but that makes all I/O accesses bufferable. This
31 * is not a problem in general, but we do have to be slightly more
32 * careful because I/O writes are no longer automatically flushed out
33 * of the write buffer.
34 *
35 * In cases where we want to make sure that a write has been flushed
36 * out of the write buffer before we proceed, for example when masking
37 * a device interrupt before re-enabling IRQs in CPSR, we can use this
38 * function, ixp2000_reg_wrb, which performs a write, a readback, and
39 * issues a dummy instruction dependent on the value of the readback
40 * (mov rX, rX) to make sure that the readback has completed before we
41 * continue.
42 */
43static inline void ixp2000_reg_wrb(volatile void *reg, unsigned long val)
44{
45 unsigned long dummy;
46
47 *((volatile unsigned long *)reg) = val;
48
49 dummy = *((volatile unsigned long *)reg);
50 __asm__ __volatile__("mov %0, %0" : "+r" (dummy));
51}
52
53/*
54 * Boards may multiplex different devices on the 2nd channel of
55 * the slowport interface that each need different configuration
56 * settings. For example, the IXDP2400 uses channel 2 on the interface
57 * to access the CPLD, the switch fabric card, and the media card. Each
58 * one needs a different mode so drivers must save/restore the mode
59 * before and after each operation.
60 *
61 * acquire_slowport(&your_config);
62 * ...
63 * do slowport operations
64 * ...
65 * release_slowport();
66 *
67 * Note that while you have the slowport, you are holding a spinlock,
68 * so your code should be written as if you explicitly acquired a lock.
69 *
70 * The configuration only affects device 2 on the slowport, so the
71 * MTD map driver does not acquire/release the slowport.
72 */
73struct slowport_cfg {
74 unsigned long CCR; /* Clock divide */
75 unsigned long WTC; /* Write Timing Control */
76 unsigned long RTC; /* Read Timing Control */
77 unsigned long PCR; /* Protocol Control Register */
78 unsigned long ADC; /* Address/Data Width Control */
79};
80
81
82void ixp2000_acquire_slowport(struct slowport_cfg *, struct slowport_cfg *);
83void ixp2000_release_slowport(struct slowport_cfg *);
84
85/*
86 * IXP2400 A0/A1 and IXP2800 A0/A1/A2 have broken slowport that requires
87 * tweaking of addresses in the MTD driver.
88 */
89static inline unsigned ixp2000_has_broken_slowport(void)
90{
91 unsigned long id = *IXP2000_PRODUCT_ID;
92 unsigned long id_prod = id & (IXP2000_MAJ_PROD_TYPE_MASK |
93 IXP2000_MIN_PROD_TYPE_MASK);
94 return (((id_prod ==
95 /* fixed in IXP2400-B0 */
96 (IXP2000_MAJ_PROD_TYPE_IXP2000 |
97 IXP2000_MIN_PROD_TYPE_IXP2400)) &&
98 ((id & IXP2000_MAJ_REV_MASK) == 0)) ||
99 ((id_prod ==
100 /* fixed in IXP2800-B0 */
101 (IXP2000_MAJ_PROD_TYPE_IXP2000 |
102 IXP2000_MIN_PROD_TYPE_IXP2800)) &&
103 ((id & IXP2000_MAJ_REV_MASK) == 0)) ||
104 ((id_prod ==
105 /* fixed in IXP2850-B0 */
106 (IXP2000_MAJ_PROD_TYPE_IXP2000 |
107 IXP2000_MIN_PROD_TYPE_IXP2850)) &&
108 ((id & IXP2000_MAJ_REV_MASK) == 0)));
109}
110
111static inline unsigned int ixp2000_has_flash(void)
112{
113 return ((*IXP2000_STRAP_OPTIONS) & (CFG_BOOT_PROM));
114}
115
116static inline unsigned int ixp2000_is_pcimaster(void)
117{
118 return ((*IXP2000_STRAP_OPTIONS) & (CFG_PCI_BOOT_HOST));
119}
120
121void ixp2000_map_io(void);
122void ixp2000_uart_init(void);
123void ixp2000_init_irq(void);
124void ixp2000_init_time(unsigned long);
125unsigned long ixp2000_gettimeoffset(void);
126
127struct pci_sys_data;
128
129u32 *ixp2000_pci_config_addr(unsigned int bus, unsigned int devfn, int where);
130void ixp2000_pci_preinit(void);
131int ixp2000_pci_setup(int, struct pci_sys_data*);
132struct pci_bus* ixp2000_pci_scan_bus(int, struct pci_sys_data*);
133int ixp2000_pci_read_config(struct pci_bus*, unsigned int, int, int, u32 *);
134int ixp2000_pci_write_config(struct pci_bus*, unsigned int, int, int, u32);
135
136/*
137 * Several of the IXP2000 systems have banked flash so we need to extend the
138 * flash_platform_data structure with some private pointers
139 */
140struct ixp2000_flash_data {
141 struct flash_platform_data *platform_data;
142 int nr_banks;
143 unsigned long (*bank_setup)(unsigned long);
144};
145
146struct ixp2000_i2c_pins {
147 unsigned long sda_pin;
148 unsigned long scl_pin;
149};
150
151
152#endif /* !__ASSEMBLY__ */
diff --git a/arch/arm/mach-ixp2000/include/mach/system.h b/arch/arm/mach-ixp2000/include/mach/system.h
new file mode 100644
index 000000000000..2e9c68f95a24
--- /dev/null
+++ b/arch/arm/mach-ixp2000/include/mach/system.h
@@ -0,0 +1,49 @@
1/*
2 * arch/arm/mach-ixp2000/include/mach/system.h
3 *
4 * Copyright (C) 2002 Intel Corp.
5 * Copyricht (C) 2003-2005 MontaVista Software, Inc.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 */
11
12#include <mach/hardware.h>
13#include <asm/mach-types.h>
14
15static inline void arch_idle(void)
16{
17 cpu_do_idle();
18}
19
20static inline void arch_reset(char mode)
21{
22 local_irq_disable();
23
24 /*
25 * Reset flash banking register so that we are pointing at
26 * RedBoot bank.
27 */
28 if (machine_is_ixdp2401()) {
29 ixp2000_reg_write(IXDP2X01_CPLD_FLASH_REG,
30 ((0 >> IXDP2X01_FLASH_WINDOW_BITS)
31 | IXDP2X01_CPLD_FLASH_INTERN));
32 ixp2000_reg_wrb(IXDP2X01_CPLD_RESET_REG, 0xffffffff);
33 }
34
35 /*
36 * On IXDP2801 we need to write this magic sequence to the CPLD
37 * to cause a complete reset of the CPU and all external devices
38 * and move the flash bank register back to 0.
39 */
40 if (machine_is_ixdp2801() || machine_is_ixdp28x5()) {
41 unsigned long reset_reg = *IXDP2X01_CPLD_RESET_REG;
42
43 reset_reg = 0x55AA0000 | (reset_reg & 0x0000FFFF);
44 ixp2000_reg_write(IXDP2X01_CPLD_RESET_REG, reset_reg);
45 ixp2000_reg_wrb(IXDP2X01_CPLD_RESET_REG, 0x80000000);
46 }
47
48 ixp2000_reg_wrb(IXP2000_RESET0, RSTALL);
49}
diff --git a/arch/arm/mach-ixp2000/include/mach/timex.h b/arch/arm/mach-ixp2000/include/mach/timex.h
new file mode 100644
index 000000000000..835e659f93d4
--- /dev/null
+++ b/arch/arm/mach-ixp2000/include/mach/timex.h
@@ -0,0 +1,13 @@
1/*
2 * arch/arm/mach-ixp2000/include/mach/timex.h
3 *
4 * IXP2000 architecture timex specifications
5 */
6
7
8/*
9 * Default clock is 50MHz APB, but platform code can override this
10 */
11#define CLOCK_TICK_RATE 50000000
12
13
diff --git a/arch/arm/mach-ixp2000/include/mach/uncompress.h b/arch/arm/mach-ixp2000/include/mach/uncompress.h
new file mode 100644
index 000000000000..ce363087df78
--- /dev/null
+++ b/arch/arm/mach-ixp2000/include/mach/uncompress.h
@@ -0,0 +1,47 @@
1/*
2 * arch/arm/mach-ixp2000/include/mach/uncompress.h
3 *
4 *
5 * Original Author: Naeem Afzal <naeem.m.afzal@intel.com>
6 * Maintainer: Deepak Saxena <dsaxena@plexity.net>
7 *
8 * Copyright 2002 Intel Corp.
9 *
10 * This program is free software; you can redistribute it and/or modify it
11 * under the terms of the GNU General Public License as published by the
12 * Free Software Foundation; either version 2 of the License, or (at your
13 * option) any later version.
14 *
15 */
16
17#include <linux/serial_reg.h>
18
19#define UART_BASE 0xc0030000
20
21#define PHYS(x) ((volatile unsigned long *)(UART_BASE + x))
22
23#define UARTDR PHYS(0x00) /* Transmit reg dlab=0 */
24#define UARTDLL PHYS(0x00) /* Divisor Latch reg dlab=1*/
25#define UARTDLM PHYS(0x04) /* Divisor Latch reg dlab=1*/
26#define UARTIER PHYS(0x04) /* Interrupt enable reg */
27#define UARTFCR PHYS(0x08) /* FIFO control reg dlab =0*/
28#define UARTLCR PHYS(0x0c) /* Control reg */
29#define UARTSR PHYS(0x14) /* Status reg */
30
31
32static inline void putc(int c)
33{
34 int j = 0x1000;
35
36 while (--j && !(*UARTSR & UART_LSR_THRE))
37 barrier();
38
39 *UARTDR = c;
40}
41
42static inline void flush(void)
43{
44}
45
46#define arch_decomp_setup()
47#define arch_decomp_wdog()
diff --git a/arch/arm/mach-ixp2000/include/mach/vmalloc.h b/arch/arm/mach-ixp2000/include/mach/vmalloc.h
new file mode 100644
index 000000000000..d195e35aed3b
--- /dev/null
+++ b/arch/arm/mach-ixp2000/include/mach/vmalloc.h
@@ -0,0 +1,20 @@
1/*
2 * arch/arm/mach-ixp2000/include/mach/vmalloc.h
3 *
4 * Author: Naeem Afzal <naeem.m.afzal@intel.com>
5 *
6 * Copyright 2002 Intel Corp.
7 *
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License as published by the
10 * Free Software Foundation; either version 2 of the License, or (at your
11 * option) any later version.
12 *
13 * Just any arbitrary offset to the start of the vmalloc VM area: the
14 * current 8MB value just means that there will be a 8MB "hole" after the
15 * physical memory until the kernel virtual memory starts. That means that
16 * any out-of-bounds memory accesses will hopefully be caught.
17 * The vmalloc() routines leaves a hole of 4kB between each vmalloced
18 * area for the same reason. ;)
19 */
20#define VMALLOC_END 0xfb000000
diff --git a/arch/arm/mach-ixp2000/ixdp2400.c b/arch/arm/mach-ixp2000/ixdp2400.c
index ce7c15c73004..c673b9ef9f69 100644
--- a/arch/arm/mach-ixp2000/ixdp2400.c
+++ b/arch/arm/mach-ixp2000/ixdp2400.c
@@ -31,7 +31,7 @@
31#include <asm/pgtable.h> 31#include <asm/pgtable.h>
32#include <asm/page.h> 32#include <asm/page.h>
33#include <asm/system.h> 33#include <asm/system.h>
34#include <asm/hardware.h> 34#include <mach/hardware.h>
35#include <asm/mach-types.h> 35#include <asm/mach-types.h>
36 36
37#include <asm/mach/pci.h> 37#include <asm/mach/pci.h>
diff --git a/arch/arm/mach-ixp2000/ixdp2800.c b/arch/arm/mach-ixp2000/ixdp2800.c
index 14f09b80ab77..6715b50829a6 100644
--- a/arch/arm/mach-ixp2000/ixdp2800.c
+++ b/arch/arm/mach-ixp2000/ixdp2800.c
@@ -31,7 +31,7 @@
31#include <asm/pgtable.h> 31#include <asm/pgtable.h>
32#include <asm/page.h> 32#include <asm/page.h>
33#include <asm/system.h> 33#include <asm/system.h>
34#include <asm/hardware.h> 34#include <mach/hardware.h>
35#include <asm/mach-types.h> 35#include <asm/mach-types.h>
36 36
37#include <asm/mach/pci.h> 37#include <asm/mach/pci.h>
diff --git a/arch/arm/mach-ixp2000/ixdp2x00.c b/arch/arm/mach-ixp2000/ixdp2x00.c
index 73c651e83d92..5a781fd9757a 100644
--- a/arch/arm/mach-ixp2000/ixdp2x00.c
+++ b/arch/arm/mach-ixp2000/ixdp2x00.c
@@ -31,7 +31,7 @@
31#include <asm/pgtable.h> 31#include <asm/pgtable.h>
32#include <asm/page.h> 32#include <asm/page.h>
33#include <asm/system.h> 33#include <asm/system.h>
34#include <asm/hardware.h> 34#include <mach/hardware.h>
35#include <asm/mach-types.h> 35#include <asm/mach-types.h>
36 36
37#include <asm/mach/pci.h> 37#include <asm/mach/pci.h>
@@ -41,7 +41,7 @@
41#include <asm/mach/flash.h> 41#include <asm/mach/flash.h>
42#include <asm/mach/arch.h> 42#include <asm/mach/arch.h>
43 43
44#include <asm/arch/gpio.h> 44#include <mach/gpio.h>
45 45
46 46
47/************************************************************************* 47/*************************************************************************
diff --git a/arch/arm/mach-ixp2000/ixdp2x01.c b/arch/arm/mach-ixp2000/ixdp2x01.c
index d3d730d2fc2b..78a2341dee2c 100644
--- a/arch/arm/mach-ixp2000/ixdp2x01.c
+++ b/arch/arm/mach-ixp2000/ixdp2x01.c
@@ -36,7 +36,7 @@
36#include <asm/pgtable.h> 36#include <asm/pgtable.h>
37#include <asm/page.h> 37#include <asm/page.h>
38#include <asm/system.h> 38#include <asm/system.h>
39#include <asm/hardware.h> 39#include <mach/hardware.h>
40#include <asm/mach-types.h> 40#include <asm/mach-types.h>
41 41
42#include <asm/mach/pci.h> 42#include <asm/mach/pci.h>
diff --git a/arch/arm/mach-ixp2000/pci.c b/arch/arm/mach-ixp2000/pci.c
index 03f4cf7f9dec..03d916fbe531 100644
--- a/arch/arm/mach-ixp2000/pci.c
+++ b/arch/arm/mach-ixp2000/pci.c
@@ -28,7 +28,7 @@
28#include <asm/io.h> 28#include <asm/io.h>
29#include <asm/irq.h> 29#include <asm/irq.h>
30#include <asm/system.h> 30#include <asm/system.h>
31#include <asm/hardware.h> 31#include <mach/hardware.h>
32 32
33#include <asm/mach/pci.h> 33#include <asm/mach/pci.h>
34 34
diff --git a/arch/arm/mach-ixp23xx/core.c b/arch/arm/mach-ixp23xx/core.c
index df16a4eac490..68b4ac5b2481 100644
--- a/arch/arm/mach-ixp23xx/core.c
+++ b/arch/arm/mach-ixp23xx/core.c
@@ -32,8 +32,7 @@
32#include <asm/types.h> 32#include <asm/types.h>
33#include <asm/setup.h> 33#include <asm/setup.h>
34#include <asm/memory.h> 34#include <asm/memory.h>
35#include <asm/hardware.h> 35#include <mach/hardware.h>
36#include <asm/mach-types.h>
37#include <asm/irq.h> 36#include <asm/irq.h>
38#include <asm/system.h> 37#include <asm/system.h>
39#include <asm/tlbflush.h> 38#include <asm/tlbflush.h>
diff --git a/arch/arm/mach-ixp23xx/espresso.c b/arch/arm/mach-ixp23xx/espresso.c
index d3a779a7a35f..1c06bfc5a7ef 100644
--- a/arch/arm/mach-ixp23xx/espresso.c
+++ b/arch/arm/mach-ixp23xx/espresso.c
@@ -29,7 +29,7 @@
29#include <asm/types.h> 29#include <asm/types.h>
30#include <asm/setup.h> 30#include <asm/setup.h>
31#include <asm/memory.h> 31#include <asm/memory.h>
32#include <asm/hardware.h> 32#include <mach/hardware.h>
33#include <asm/mach-types.h> 33#include <asm/mach-types.h>
34#include <asm/irq.h> 34#include <asm/irq.h>
35#include <asm/system.h> 35#include <asm/system.h>
diff --git a/arch/arm/mach-ixp23xx/include/mach/debug-macro.S b/arch/arm/mach-ixp23xx/include/mach/debug-macro.S
new file mode 100644
index 000000000000..905db3188724
--- /dev/null
+++ b/arch/arm/mach-ixp23xx/include/mach/debug-macro.S
@@ -0,0 +1,26 @@
1/*
2 * arch/arm/mach-ixp23xx/include/mach/debug-macro.S
3 *
4 * Debugging macro include header
5 *
6 * Copyright (C) 1994-1999 Russell King
7 * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12 */
13#include <mach/ixp23xx.h>
14
15 .macro addruart,rx
16 mrc p15, 0, \rx, c1, c0
17 tst \rx, #1 @ mmu enabled?
18 ldreq \rx, =IXP23XX_PERIPHERAL_PHYS @ physical
19 ldrne \rx, =IXP23XX_PERIPHERAL_VIRT @ virtual
20#ifdef __ARMEB__
21 orr \rx, \rx, #0x00000003
22#endif
23 .endm
24
25#define UART_SHIFT 2
26#include <asm/hardware/debug-8250.S>
diff --git a/arch/arm/mach-ixp23xx/include/mach/dma.h b/arch/arm/mach-ixp23xx/include/mach/dma.h
new file mode 100644
index 000000000000..8886544b93f7
--- /dev/null
+++ b/arch/arm/mach-ixp23xx/include/mach/dma.h
@@ -0,0 +1,3 @@
1/*
2 * arch/arm/mach-ixp23xx/include/mach/dma.h
3 */
diff --git a/arch/arm/mach-ixp23xx/include/mach/entry-macro.S b/arch/arm/mach-ixp23xx/include/mach/entry-macro.S
new file mode 100644
index 000000000000..3f5338a7bbdd
--- /dev/null
+++ b/arch/arm/mach-ixp23xx/include/mach/entry-macro.S
@@ -0,0 +1,37 @@
1/*
2 * arch/arm/mach-ixp23xx/include/mach/entry-macro.S
3 */
4
5 .macro disable_fiq
6 .endm
7
8 .macro get_irqnr_preamble, base, tmp
9 .endm
10
11 .macro arch_ret_to_user, tmp1, tmp2
12 .endm
13
14 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
15 ldr \irqnr, =(IXP23XX_INTC_VIRT + IXP23XX_INTR_IRQ_ENC_ST_OFFSET)
16 ldr \irqnr, [\irqnr] @ get interrupt number
17 cmp \irqnr, #0x0 @ spurious interrupt ?
18 movne \irqnr, \irqnr, lsr #2 @ skip unwanted low order bits
19 subne \irqnr, \irqnr, #1 @ convert to 0 based
20
21#if 0
22 cmp \irqnr, #IRQ_IXP23XX_PCI_INT_RPH
23 bne 1001f
24 mov \irqnr, #IRQ_IXP23XX_INTA
25
26 ldr \irqnr, =0xf5000030
27
28 mov \tmp, #(1<<26)
29 tst \irqnr, \tmp
30 movne \irqnr, #IRQ_IXP23XX_INTB
31
32 mov \tmp, #(1<<27)
33 tst \irqnr, \tmp
34 movne \irqnr, #IRQ_IXP23XX_INTA
351001:
36#endif
37 .endm
diff --git a/arch/arm/mach-ixp23xx/include/mach/hardware.h b/arch/arm/mach-ixp23xx/include/mach/hardware.h
new file mode 100644
index 000000000000..c3192009a886
--- /dev/null
+++ b/arch/arm/mach-ixp23xx/include/mach/hardware.h
@@ -0,0 +1,37 @@
1/*
2 * arch/arm/mach-ixp23xx/include/mach/hardware.h
3 *
4 * Copyright (C) 2002-2004 Intel Corporation.
5 * Copyricht (C) 2005 MontaVista Software, Inc.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 *
11 * Hardware definitions for IXP23XX based systems
12 */
13
14#ifndef __ASM_ARCH_HARDWARE_H
15#define __ASM_ARCH_HARDWARE_H
16
17/* PCI IO info */
18#define PCIO_BASE IXP23XX_PCI_IO_VIRT
19#define PCIBIOS_MIN_IO 0x00000000
20#define PCIBIOS_MIN_MEM 0xe0000000
21
22#include "ixp23xx.h"
23
24#define pcibios_assign_all_busses() 0
25
26/*
27 * Platform helper functions
28 */
29#include "platform.h"
30
31/*
32 * Platform-specific headers
33 */
34#include "ixdp2351.h"
35
36
37#endif
diff --git a/arch/arm/mach-ixp23xx/include/mach/io.h b/arch/arm/mach-ixp23xx/include/mach/io.h
new file mode 100644
index 000000000000..305ea1808c71
--- /dev/null
+++ b/arch/arm/mach-ixp23xx/include/mach/io.h
@@ -0,0 +1,54 @@
1/*
2 * arch/arm/mach-ixp23xx/include/mach/io.h
3 *
4 * Original Author: Naeem M Afzal <naeem.m.afzal@intel.com>
5 * Maintainer: Deepak Saxena <dsaxena@plexity.net>
6 *
7 * Copyright (C) 2003-2005 Intel Corp.
8 * Copyright (C) 2005 MontaVista Software, Inc
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
13 */
14
15#ifndef __ASM_ARCH_IO_H
16#define __ASM_ARCH_IO_H
17
18#define IO_SPACE_LIMIT 0xffffffff
19
20#define __io(p) ((void __iomem*)((p) + IXP23XX_PCI_IO_VIRT))
21#define __mem_pci(a) (a)
22
23#include <linux/kernel.h> /* For BUG */
24
25static inline void __iomem *
26ixp23xx_ioremap(unsigned long addr, unsigned long size, unsigned int mtype)
27{
28 if (addr >= IXP23XX_PCI_MEM_START &&
29 addr <= IXP23XX_PCI_MEM_START + IXP23XX_PCI_MEM_SIZE) {
30 if (addr + size > IXP23XX_PCI_MEM_START + IXP23XX_PCI_MEM_SIZE)
31 return NULL;
32
33 return (void __iomem *)
34 ((addr - IXP23XX_PCI_MEM_START) + IXP23XX_PCI_MEM_VIRT);
35 }
36
37 return __arm_ioremap(addr, size, mtype);
38}
39
40static inline void
41ixp23xx_iounmap(void __iomem *addr)
42{
43 if ((((u32)addr) >= IXP23XX_PCI_MEM_VIRT) &&
44 (((u32)addr) < IXP23XX_PCI_MEM_VIRT + IXP23XX_PCI_MEM_SIZE))
45 return;
46
47 __iounmap(addr);
48}
49
50#define __arch_ioremap(a,s,f) ixp23xx_ioremap(a,s,f)
51#define __arch_iounmap(a) ixp23xx_iounmap(a)
52
53
54#endif
diff --git a/arch/arm/mach-ixp23xx/include/mach/irqs.h b/arch/arm/mach-ixp23xx/include/mach/irqs.h
new file mode 100644
index 000000000000..3af33a04b8a2
--- /dev/null
+++ b/arch/arm/mach-ixp23xx/include/mach/irqs.h
@@ -0,0 +1,223 @@
1/*
2 * arch/arm/mach-ixp23xx/include/mach/irqs.h
3 *
4 * IRQ definitions for IXP23XX based systems
5 *
6 * Author: Naeem Afzal <naeem.m.afzal@intel.com>
7 *
8 * Copyright (C) 2003-2004 Intel Corporation.
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
13 */
14
15#ifndef __ASM_ARCH_IRQS_H
16#define __ASM_ARCH_IRQS_H
17
18#define NR_IXP23XX_IRQS IRQ_IXP23XX_INTB+1
19#define IRQ_IXP23XX_EXTIRQS NR_IXP23XX_IRQS
20
21
22#define IRQ_IXP23XX_DBG0 0 /* Debug/Execution/MBox */
23#define IRQ_IXP23XX_DBG1 1 /* Debug/Execution/MBox */
24#define IRQ_IXP23XX_NPE_TRG 2 /* npe_trigger */
25#define IRQ_IXP23XX_TIMER1 3 /* Timer[0] */
26#define IRQ_IXP23XX_TIMER2 4 /* Timer[1] */
27#define IRQ_IXP23XX_TIMESTAMP 5 /* Timer[2], Time-stamp */
28#define IRQ_IXP23XX_WDOG 6 /* Time[3], Watchdog Timer */
29#define IRQ_IXP23XX_PCI_DBELL 7 /* PCI Doorbell */
30#define IRQ_IXP23XX_PCI_DMA1 8 /* PCI DMA Channel 1 */
31#define IRQ_IXP23XX_PCI_DMA2 9 /* PCI DMA Channel 2 */
32#define IRQ_IXP23XX_PCI_DMA3 10 /* PCI DMA Channel 3 */
33#define IRQ_IXP23XX_PCI_INT_RPH 11 /* pcxg_pci_int_rph */
34#define IRQ_IXP23XX_CPP_PMU 12 /* xpxg_pm_int_rpl */
35#define IRQ_IXP23XX_SWINT0 13 /* S/W Interrupt0 */
36#define IRQ_IXP23XX_SWINT1 14 /* S/W Interrupt1 */
37#define IRQ_IXP23XX_UART2 15 /* UART1 Interrupt */
38#define IRQ_IXP23XX_UART1 16 /* UART0 Interrupt */
39#define IRQ_IXP23XX_XSI_PMU_ROLLOVER 17 /* AHB Performance M. Unit counter rollover */
40#define IRQ_IXP23XX_XSI_AHB_PM0 18 /* intr_pm_o */
41#define IRQ_IXP23XX_XSI_AHB_ECE0 19 /* intr_ece_o */
42#define IRQ_IXP23XX_XSI_AHB_GASKET 20 /* gas_intr_o */
43#define IRQ_IXP23XX_XSI_CPP 21 /* xsi2cpp_int */
44#define IRQ_IXP23XX_CPP_XSI 22 /* cpp2xsi_int */
45#define IRQ_IXP23XX_ME_ATTN0 23 /* ME_ATTN */
46#define IRQ_IXP23XX_ME_ATTN1 24 /* ME_ATTN */
47#define IRQ_IXP23XX_ME_ATTN2 25 /* ME_ATTN */
48#define IRQ_IXP23XX_ME_ATTN3 26 /* ME_ATTN */
49#define IRQ_IXP23XX_PCI_ERR_RPH 27 /* PCXG_PCI_ERR_RPH */
50#define IRQ_IXP23XX_D0XG_ECC_CORR 28 /* D0XG_DRAM_ECC_CORR */
51#define IRQ_IXP23XX_D0XG_ECC_UNCORR 29 /* D0XG_DRAM_ECC_UNCORR */
52#define IRQ_IXP23XX_SRAM_ERR1 30 /* SRAM1_ERR */
53#define IRQ_IXP23XX_SRAM_ERR0 31 /* SRAM0_ERR */
54#define IRQ_IXP23XX_MEDIA_ERR 32 /* MEDIA_ERR */
55#define IRQ_IXP23XX_STH_DRAM_ECC_MAJ 33 /* STH_DRAM0_ECC_MAJ */
56#define IRQ_IXP23XX_GPIO6 34 /* GPIO0 interrupts */
57#define IRQ_IXP23XX_GPIO7 35 /* GPIO1 interrupts */
58#define IRQ_IXP23XX_GPIO8 36 /* GPIO2 interrupts */
59#define IRQ_IXP23XX_GPIO9 37 /* GPIO3 interrupts */
60#define IRQ_IXP23XX_GPIO10 38 /* GPIO4 interrupts */
61#define IRQ_IXP23XX_GPIO11 39 /* GPIO5 interrupts */
62#define IRQ_IXP23XX_GPIO12 40 /* GPIO6 interrupts */
63#define IRQ_IXP23XX_GPIO13 41 /* GPIO7 interrupts */
64#define IRQ_IXP23XX_GPIO14 42 /* GPIO8 interrupts */
65#define IRQ_IXP23XX_GPIO15 43 /* GPIO9 interrupts */
66#define IRQ_IXP23XX_SHAC_RING0 44 /* SHAC Ring Full */
67#define IRQ_IXP23XX_SHAC_RING1 45 /* SHAC Ring Full */
68#define IRQ_IXP23XX_SHAC_RING2 46 /* SHAC Ring Full */
69#define IRQ_IXP23XX_SHAC_RING3 47 /* SHAC Ring Full */
70#define IRQ_IXP23XX_SHAC_RING4 48 /* SHAC Ring Full */
71#define IRQ_IXP23XX_SHAC_RING5 49 /* SHAC Ring Full */
72#define IRQ_IXP23XX_SHAC_RING6 50 /* SHAC RING Full */
73#define IRQ_IXP23XX_SHAC_RING7 51 /* SHAC Ring Full */
74#define IRQ_IXP23XX_SHAC_RING8 52 /* SHAC Ring Full */
75#define IRQ_IXP23XX_SHAC_RING9 53 /* SHAC Ring Full */
76#define IRQ_IXP23XX_SHAC_RING10 54 /* SHAC Ring Full */
77#define IRQ_IXP23XX_SHAC_RING11 55 /* SHAC Ring Full */
78#define IRQ_IXP23XX_ME_THREAD_A0_ME0 56 /* ME_THREAD_A */
79#define IRQ_IXP23XX_ME_THREAD_A1_ME0 57 /* ME_THREAD_A */
80#define IRQ_IXP23XX_ME_THREAD_A2_ME0 58 /* ME_THREAD_A */
81#define IRQ_IXP23XX_ME_THREAD_A3_ME0 59 /* ME_THREAD_A */
82#define IRQ_IXP23XX_ME_THREAD_A4_ME0 60 /* ME_THREAD_A */
83#define IRQ_IXP23XX_ME_THREAD_A5_ME0 61 /* ME_THREAD_A */
84#define IRQ_IXP23XX_ME_THREAD_A6_ME0 62 /* ME_THREAD_A */
85#define IRQ_IXP23XX_ME_THREAD_A7_ME0 63 /* ME_THREAD_A */
86#define IRQ_IXP23XX_ME_THREAD_A8_ME1 64 /* ME_THREAD_A */
87#define IRQ_IXP23XX_ME_THREAD_A9_ME1 65 /* ME_THREAD_A */
88#define IRQ_IXP23XX_ME_THREAD_A10_ME1 66 /* ME_THREAD_A */
89#define IRQ_IXP23XX_ME_THREAD_A11_ME1 67 /* ME_THREAD_A */
90#define IRQ_IXP23XX_ME_THREAD_A12_ME1 68 /* ME_THREAD_A */
91#define IRQ_IXP23XX_ME_THREAD_A13_ME1 69 /* ME_THREAD_A */
92#define IRQ_IXP23XX_ME_THREAD_A14_ME1 70 /* ME_THREAD_A */
93#define IRQ_IXP23XX_ME_THREAD_A15_ME1 71 /* ME_THREAD_A */
94#define IRQ_IXP23XX_ME_THREAD_A16_ME2 72 /* ME_THREAD_A */
95#define IRQ_IXP23XX_ME_THREAD_A17_ME2 73 /* ME_THREAD_A */
96#define IRQ_IXP23XX_ME_THREAD_A18_ME2 74 /* ME_THREAD_A */
97#define IRQ_IXP23XX_ME_THREAD_A19_ME2 75 /* ME_THREAD_A */
98#define IRQ_IXP23XX_ME_THREAD_A20_ME2 76 /* ME_THREAD_A */
99#define IRQ_IXP23XX_ME_THREAD_A21_ME2 77 /* ME_THREAD_A */
100#define IRQ_IXP23XX_ME_THREAD_A22_ME2 78 /* ME_THREAD_A */
101#define IRQ_IXP23XX_ME_THREAD_A23_ME2 79 /* ME_THREAD_A */
102#define IRQ_IXP23XX_ME_THREAD_A24_ME3 80 /* ME_THREAD_A */
103#define IRQ_IXP23XX_ME_THREAD_A25_ME3 81 /* ME_THREAD_A */
104#define IRQ_IXP23XX_ME_THREAD_A26_ME3 82 /* ME_THREAD_A */
105#define IRQ_IXP23XX_ME_THREAD_A27_ME3 83 /* ME_THREAD_A */
106#define IRQ_IXP23XX_ME_THREAD_A28_ME3 84 /* ME_THREAD_A */
107#define IRQ_IXP23XX_ME_THREAD_A29_ME3 85 /* ME_THREAD_A */
108#define IRQ_IXP23XX_ME_THREAD_A30_ME3 86 /* ME_THREAD_A */
109#define IRQ_IXP23XX_ME_THREAD_A31_ME3 87 /* ME_THREAD_A */
110#define IRQ_IXP23XX_ME_THREAD_B0_ME0 88 /* ME_THREAD_B */
111#define IRQ_IXP23XX_ME_THREAD_B1_ME0 89 /* ME_THREAD_B */
112#define IRQ_IXP23XX_ME_THREAD_B2_ME0 90 /* ME_THREAD_B */
113#define IRQ_IXP23XX_ME_THREAD_B3_ME0 91 /* ME_THREAD_B */
114#define IRQ_IXP23XX_ME_THREAD_B4_ME0 92 /* ME_THREAD_B */
115#define IRQ_IXP23XX_ME_THREAD_B5_ME0 93 /* ME_THREAD_B */
116#define IRQ_IXP23XX_ME_THREAD_B6_ME0 94 /* ME_THREAD_B */
117#define IRQ_IXP23XX_ME_THREAD_B7_ME0 95 /* ME_THREAD_B */
118#define IRQ_IXP23XX_ME_THREAD_B8_ME1 96 /* ME_THREAD_B */
119#define IRQ_IXP23XX_ME_THREAD_B9_ME1 97 /* ME_THREAD_B */
120#define IRQ_IXP23XX_ME_THREAD_B10_ME1 98 /* ME_THREAD_B */
121#define IRQ_IXP23XX_ME_THREAD_B11_ME1 99 /* ME_THREAD_B */
122#define IRQ_IXP23XX_ME_THREAD_B12_ME1 100 /* ME_THREAD_B */
123#define IRQ_IXP23XX_ME_THREAD_B13_ME1 101 /* ME_THREAD_B */
124#define IRQ_IXP23XX_ME_THREAD_B14_ME1 102 /* ME_THREAD_B */
125#define IRQ_IXP23XX_ME_THREAD_B15_ME1 103 /* ME_THREAD_B */
126#define IRQ_IXP23XX_ME_THREAD_B16_ME2 104 /* ME_THREAD_B */
127#define IRQ_IXP23XX_ME_THREAD_B17_ME2 105 /* ME_THREAD_B */
128#define IRQ_IXP23XX_ME_THREAD_B18_ME2 106 /* ME_THREAD_B */
129#define IRQ_IXP23XX_ME_THREAD_B19_ME2 107 /* ME_THREAD_B */
130#define IRQ_IXP23XX_ME_THREAD_B20_ME2 108 /* ME_THREAD_B */
131#define IRQ_IXP23XX_ME_THREAD_B21_ME2 109 /* ME_THREAD_B */
132#define IRQ_IXP23XX_ME_THREAD_B22_ME2 110 /* ME_THREAD_B */
133#define IRQ_IXP23XX_ME_THREAD_B23_ME2 111 /* ME_THREAD_B */
134#define IRQ_IXP23XX_ME_THREAD_B24_ME3 112 /* ME_THREAD_B */
135#define IRQ_IXP23XX_ME_THREAD_B25_ME3 113 /* ME_THREAD_B */
136#define IRQ_IXP23XX_ME_THREAD_B26_ME3 114 /* ME_THREAD_B */
137#define IRQ_IXP23XX_ME_THREAD_B27_ME3 115 /* ME_THREAD_B */
138#define IRQ_IXP23XX_ME_THREAD_B28_ME3 116 /* ME_THREAD_B */
139#define IRQ_IXP23XX_ME_THREAD_B29_ME3 117 /* ME_THREAD_B */
140#define IRQ_IXP23XX_ME_THREAD_B30_ME3 118 /* ME_THREAD_B */
141#define IRQ_IXP23XX_ME_THREAD_B31_ME3 119 /* ME_THREAD_B */
142
143#define NUM_IXP23XX_RAW_IRQS 120
144
145#define IRQ_IXP23XX_INTA 120 /* Indirect pcxg_pci_int_rph */
146#define IRQ_IXP23XX_INTB 121 /* Indirect pcxg_pci_int_rph */
147
148#define NR_IXP23XX_IRQ (IRQ_IXP23XX_INTB + 1)
149
150/*
151 * We default to 32 per-board IRQs. Increase this number if you need
152 * more, but keep it realistic.
153 */
154#define NR_IXP23XX_MACH_IRQS 32
155
156#define NR_IRQS (NR_IXP23XX_IRQS + NR_IXP23XX_MACH_IRQS)
157
158#define IXP23XX_MACH_IRQ(irq) (NR_IXP23XX_IRQ + (irq))
159
160
161/*
162 * IXDP2351-specific interrupts
163 */
164
165/*
166 * External PCI interrupts signaled through INTB
167 *
168 */
169#define IXDP2351_INTB_IRQ_BASE 0
170#define IRQ_IXDP2351_INTA_82546 IXP23XX_MACH_IRQ(0)
171#define IRQ_IXDP2351_INTB_82546 IXP23XX_MACH_IRQ(1)
172#define IRQ_IXDP2351_SPCI_DB_0 IXP23XX_MACH_IRQ(2)
173#define IRQ_IXDP2351_SPCI_DB_1 IXP23XX_MACH_IRQ(3)
174#define IRQ_IXDP2351_SPCI_PMC_INTA IXP23XX_MACH_IRQ(4)
175#define IRQ_IXDP2351_SPCI_PMC_INTB IXP23XX_MACH_IRQ(5)
176#define IRQ_IXDP2351_SPCI_PMC_INTC IXP23XX_MACH_IRQ(6)
177#define IRQ_IXDP2351_SPCI_PMC_INTD IXP23XX_MACH_IRQ(7)
178#define IRQ_IXDP2351_SPCI_FIC IXP23XX_MACH_IRQ(8)
179
180#define IXDP2351_INTB_IRQ_BIT(irq) (irq - IXP23XX_MACH_IRQ(0))
181#define IXDP2351_INTB_IRQ_MASK(irq) (1 << IXDP2351_INTB_IRQ_BIT(irq))
182#define IXDP2351_INTB_IRQ_VALID 0x01FF
183#define IXDP2351_INTB_IRQ_NUM 16
184
185/*
186 * Other external interrupts signaled through INTA
187 */
188#define IXDP2351_INTA_IRQ_BASE 16
189#define IRQ_IXDP2351_IPMI_FROM IXP23XX_MACH_IRQ(16)
190#define IRQ_IXDP2351_125US IXP23XX_MACH_IRQ(17)
191#define IRQ_IXDP2351_DB_0_ADD IXP23XX_MACH_IRQ(18)
192#define IRQ_IXDP2351_DB_1_ADD IXP23XX_MACH_IRQ(19)
193#define IRQ_IXDP2351_DEBUG1 IXP23XX_MACH_IRQ(20)
194#define IRQ_IXDP2351_ADD_UART IXP23XX_MACH_IRQ(21)
195#define IRQ_IXDP2351_FIC_ADD IXP23XX_MACH_IRQ(24)
196#define IRQ_IXDP2351_CS8900 IXP23XX_MACH_IRQ(25)
197#define IRQ_IXDP2351_BBSRAM IXP23XX_MACH_IRQ(26)
198#define IRQ_IXDP2351_CONFIG_MEDIA IXP23XX_MACH_IRQ(27)
199#define IRQ_IXDP2351_CLOCK_REF IXP23XX_MACH_IRQ(28)
200#define IRQ_IXDP2351_A10_NP IXP23XX_MACH_IRQ(29)
201#define IRQ_IXDP2351_A11_NP IXP23XX_MACH_IRQ(30)
202#define IRQ_IXDP2351_DEBUG_NP IXP23XX_MACH_IRQ(31)
203
204#define IXDP2351_INTA_IRQ_BIT(irq) (irq - IXP23XX_MACH_IRQ(16))
205#define IXDP2351_INTA_IRQ_MASK(irq) (1 << IXDP2351_INTA_IRQ_BIT(irq))
206#define IXDP2351_INTA_IRQ_VALID 0xFF3F
207#define IXDP2351_INTA_IRQ_NUM 16
208
209
210/*
211 * ADI RoadRunner IRQs
212 */
213#define IRQ_ROADRUNNER_PCI_INTA IRQ_IXP23XX_INTA
214#define IRQ_ROADRUNNER_PCI_INTB IRQ_IXP23XX_INTB
215#define IRQ_ROADRUNNER_PCI_INTC IRQ_IXP23XX_GPIO11
216#define IRQ_ROADRUNNER_PCI_INTD IRQ_IXP23XX_GPIO12
217
218/*
219 * Put new board definitions here
220 */
221
222
223#endif
diff --git a/arch/arm/mach-ixp23xx/include/mach/ixdp2351.h b/arch/arm/mach-ixp23xx/include/mach/ixdp2351.h
new file mode 100644
index 000000000000..663951027de5
--- /dev/null
+++ b/arch/arm/mach-ixp23xx/include/mach/ixdp2351.h
@@ -0,0 +1,89 @@
1/*
2 * arch/arm/mach-ixp23xx/include/mach/ixdp2351.h
3 *
4 * Register and other defines for IXDP2351
5 *
6 * Copyright (c) 2002-2004 Intel Corp.
7 * Copytight (c) 2005 MontaVista Software, Inc.
8 *
9 * This program is free software; you can redistribute it and/or modify it
10 * under the terms of the GNU General Public License as published by the
11 * Free Software Foundation; either version 2 of the License, or (at your
12 * option) any later version.
13 */
14
15#ifndef __ASM_ARCH_IXDP2351_H
16#define __ASM_ARCH_IXDP2351_H
17
18/*
19 * NP module memory map
20 */
21#define IXDP2351_NP_PHYS_BASE (IXP23XX_EXP_BUS_CS4_BASE)
22#define IXDP2351_NP_PHYS_SIZE 0x00100000
23#define IXDP2351_NP_VIRT_BASE 0xeff00000
24
25#define IXDP2351_VIRT_CS8900_BASE (IXDP2351_NP_VIRT_BASE)
26#define IXDP2351_VIRT_CS8900_END (IXDP2351_VIRT_CS8900_BASE + 16)
27
28#define IXDP2351_VIRT_NP_CPLD_BASE (IXP23XX_EXP_BUS_CS4_BASE_VIRT + 0x00010000)
29
30#define IXDP2351_NP_CPLD_REG(reg) ((volatile u16 *)(IXDP2351_VIRT_NP_CPLD_BASE + reg))
31
32#define IXDP2351_NP_CPLD_RESET1_REG IXDP2351_NP_CPLD_REG(0x00)
33#define IXDP2351_NP_CPLD_LED_REG IXDP2351_NP_CPLD_REG(0x02)
34#define IXDP2351_NP_CPLD_VERSION_REG IXDP2351_NP_CPLD_REG(0x04)
35
36/*
37 * Base board module memory map
38 */
39
40#define IXDP2351_BB_BASE_PHYS (IXP23XX_EXP_BUS_CS5_BASE)
41#define IXDP2351_BB_SIZE 0x01000000
42#define IXDP2351_BB_BASE_VIRT (0xee000000)
43
44#define IXDP2351_BB_AREA_BASE(offset) (IXDP2351_BB_BASE_VIRT + offset)
45
46#define IXDP2351_VIRT_NVRAM_BASE IXDP2351_BB_AREA_BASE(0x0)
47#define IXDP2351_NVRAM_SIZE (0x20000)
48
49#define IXDP2351_VIRT_MB_IXF1104_BASE IXDP2351_BB_AREA_BASE(0x00020000)
50#define IXDP2351_VIRT_ADD_UART_BASE IXDP2351_BB_AREA_BASE(0x000240C0)
51#define IXDP2351_VIRT_FIC_BASE IXDP2351_BB_AREA_BASE(0x00200000)
52#define IXDP2351_VIRT_DB0_BASE IXDP2351_BB_AREA_BASE(0x00400000)
53#define IXDP2351_VIRT_DB1_BASE IXDP2351_BB_AREA_BASE(0x00600000)
54#define IXDP2351_VIRT_CPLD_BASE IXDP2351_BB_AREA_BASE(0x00024000)
55
56/*
57 * On board CPLD registers
58 */
59#define IXDP2351_CPLD_BB_REG(reg) ((volatile u16 *)(IXDP2351_VIRT_CPLD_BASE + reg))
60
61#define IXDP2351_CPLD_RESET0_REG IXDP2351_CPLD_BB_REG(0x00)
62#define IXDP2351_CPLD_RESET1_REG IXDP2351_CPLD_BB_REG(0x04)
63
64#define IXDP2351_CPLD_RESET1_MAGIC 0x55AA
65#define IXDP2351_CPLD_RESET1_ENABLE 0x8000
66
67#define IXDP2351_CPLD_FPGA_CONFIG_REG IXDP2351_CPLD_BB_REG(0x08)
68#define IXDP2351_CPLD_INTB_MASK_SET_REG IXDP2351_CPLD_BB_REG(0x10)
69#define IXDP2351_CPLD_INTA_MASK_SET_REG IXDP2351_CPLD_BB_REG(0x14)
70#define IXDP2351_CPLD_INTB_STAT_REG IXDP2351_CPLD_BB_REG(0x18)
71#define IXDP2351_CPLD_INTA_STAT_REG IXDP2351_CPLD_BB_REG(0x1C)
72#define IXDP2351_CPLD_INTB_RAW_REG IXDP2351_CPLD_BB_REG(0x20) /* read */
73#define IXDP2351_CPLD_INTA_RAW_REG IXDP2351_CPLD_BB_REG(0x24) /* read */
74#define IXDP2351_CPLD_INTB_MASK_CLR_REG IXDP2351_CPLD_INTB_RAW_REG /* write */
75#define IXDP2351_CPLD_INTA_MASK_CLR_REG IXDP2351_CPLD_INTA_RAW_REG /* write */
76#define IXDP2351_CPLD_INTB_SIM_REG IXDP2351_CPLD_BB_REG(0x28)
77#define IXDP2351_CPLD_INTA_SIM_REG IXDP2351_CPLD_BB_REG(0x2C)
78 /* Interrupt bits are defined in irqs.h */
79#define IXDP2351_CPLD_BB_GBE0_REG IXDP2351_CPLD_BB_REG(0x30)
80#define IXDP2351_CPLD_BB_GBE1_REG IXDP2351_CPLD_BB_REG(0x34)
81
82/* #define IXDP2351_CPLD_BB_MISC_REG IXDP2351_CPLD_REG(0x1C) */
83/* #define IXDP2351_CPLD_BB_MISC_REV_MASK 0xFF */
84/* #define IXDP2351_CPLD_BB_GDXCS0_REG IXDP2351_CPLD_REG(0x24) */
85/* #define IXDP2351_CPLD_BB_GDXCS1_REG IXDP2351_CPLD_REG(0x28) */
86/* #define IXDP2351_CPLD_BB_CLOCK_REG IXDP2351_CPLD_REG(0x04) */
87
88
89#endif
diff --git a/arch/arm/mach-ixp23xx/include/mach/ixp23xx.h b/arch/arm/mach-ixp23xx/include/mach/ixp23xx.h
new file mode 100644
index 000000000000..6d02481b1d6d
--- /dev/null
+++ b/arch/arm/mach-ixp23xx/include/mach/ixp23xx.h
@@ -0,0 +1,298 @@
1/*
2 * arch/arm/mach-ixp23xx/include/mach/ixp23xx.h
3 *
4 * Register definitions for IXP23XX
5 *
6 * Copyright (C) 2003-2005 Intel Corporation.
7 * Copyright (C) 2005 MontaVista Software, Inc.
8 *
9 * Maintainer: Deepak Saxena <dsaxena@plexity.net>
10 *
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License version 2 as
13 * published by the Free Software Foundation.
14 */
15
16#ifndef __ASM_ARCH_IXP23XX_H
17#define __ASM_ARCH_IXP23XX_H
18
19/*
20 * IXP2300 linux memory map:
21 *
22 * virt phys size
23 * fffd0000 a0000000 64K XSI2CPP_CSR
24 * fffc0000 c4000000 4K EXP_CFG
25 * fff00000 c8000000 64K PERIPHERAL
26 * fe000000 1c0000000 16M CAP_CSR
27 * fd000000 1c8000000 16M MSF_CSR
28 * fb000000 16M ---
29 * fa000000 1d8000000 32M PCI_IO
30 * f8000000 1da000000 32M PCI_CFG
31 * f6000000 1de000000 32M PCI_CREG
32 * f4000000 32M ---
33 * f0000000 1e0000000 64M PCI_MEM
34 * e[c-f]000000 per-platform mappings
35 */
36
37
38/****************************************************************************
39 * Static mappings.
40 ****************************************************************************/
41#define IXP23XX_XSI2CPP_CSR_PHYS 0xa0000000
42#define IXP23XX_XSI2CPP_CSR_VIRT 0xfffd0000
43#define IXP23XX_XSI2CPP_CSR_SIZE 0x00010000
44
45#define IXP23XX_EXP_CFG_PHYS 0xc4000000
46#define IXP23XX_EXP_CFG_VIRT 0xfffc0000
47#define IXP23XX_EXP_CFG_SIZE 0x00001000
48
49#define IXP23XX_PERIPHERAL_PHYS 0xc8000000
50#define IXP23XX_PERIPHERAL_VIRT 0xfff00000
51#define IXP23XX_PERIPHERAL_SIZE 0x00010000
52
53#define IXP23XX_CAP_CSR_PHYS 0x1c0000000ULL
54#define IXP23XX_CAP_CSR_VIRT 0xfe000000
55#define IXP23XX_CAP_CSR_SIZE 0x01000000
56
57#define IXP23XX_MSF_CSR_PHYS 0x1c8000000ULL
58#define IXP23XX_MSF_CSR_VIRT 0xfd000000
59#define IXP23XX_MSF_CSR_SIZE 0x01000000
60
61#define IXP23XX_PCI_IO_PHYS 0x1d8000000ULL
62#define IXP23XX_PCI_IO_VIRT 0xfa000000
63#define IXP23XX_PCI_IO_SIZE 0x02000000
64
65#define IXP23XX_PCI_CFG_PHYS 0x1da000000ULL
66#define IXP23XX_PCI_CFG_VIRT 0xf8000000
67#define IXP23XX_PCI_CFG_SIZE 0x02000000
68#define IXP23XX_PCI_CFG0_VIRT IXP23XX_PCI_CFG_VIRT
69#define IXP23XX_PCI_CFG1_VIRT (IXP23XX_PCI_CFG_VIRT + 0x01000000)
70
71#define IXP23XX_PCI_CREG_PHYS 0x1de000000ULL
72#define IXP23XX_PCI_CREG_VIRT 0xf6000000
73#define IXP23XX_PCI_CREG_SIZE 0x02000000
74#define IXP23XX_PCI_CSR_VIRT (IXP23XX_PCI_CREG_VIRT + 0x01000000)
75
76#define IXP23XX_PCI_MEM_START 0xe0000000
77#define IXP23XX_PCI_MEM_PHYS 0x1e0000000ULL
78#define IXP23XX_PCI_MEM_VIRT 0xf0000000
79#define IXP23XX_PCI_MEM_SIZE 0x04000000
80
81
82/****************************************************************************
83 * XSI2CPP CSRs.
84 ****************************************************************************/
85#define IXP23XX_XSI2CPP_REG(x) ((volatile unsigned long *)(IXP23XX_XSI2CPP_CSR_VIRT + (x)))
86#define IXP23XX_CPP2XSI_CURR_XFER_REG3 IXP23XX_XSI2CPP_REG(0xf8)
87#define IXP23XX_CPP2XSI_ADDR_31 (1 << 19)
88#define IXP23XX_CPP2XSI_PSH_OFF (1 << 20)
89#define IXP23XX_CPP2XSI_COH_OFF (1 << 21)
90
91
92/****************************************************************************
93 * Expansion Bus Config.
94 ****************************************************************************/
95#define IXP23XX_EXP_CFG_REG(x) ((volatile unsigned long *)(IXP23XX_EXP_CFG_VIRT + (x)))
96#define IXP23XX_EXP_CS0 IXP23XX_EXP_CFG_REG(0x00)
97#define IXP23XX_EXP_CS1 IXP23XX_EXP_CFG_REG(0x04)
98#define IXP23XX_EXP_CS2 IXP23XX_EXP_CFG_REG(0x08)
99#define IXP23XX_EXP_CS3 IXP23XX_EXP_CFG_REG(0x0c)
100#define IXP23XX_EXP_CS4 IXP23XX_EXP_CFG_REG(0x10)
101#define IXP23XX_EXP_CS5 IXP23XX_EXP_CFG_REG(0x14)
102#define IXP23XX_EXP_CS6 IXP23XX_EXP_CFG_REG(0x18)
103#define IXP23XX_EXP_CS7 IXP23XX_EXP_CFG_REG(0x1c)
104#define IXP23XX_FLASH_WRITABLE (0x2)
105#define IXP23XX_FLASH_BUS8 (0x1)
106
107#define IXP23XX_EXP_CFG0 IXP23XX_EXP_CFG_REG(0x20)
108#define IXP23XX_EXP_CFG1 IXP23XX_EXP_CFG_REG(0x24)
109#define IXP23XX_EXP_CFG0_MEM_MAP (1 << 31)
110#define IXP23XX_EXP_CFG0_XSCALE_SPEED_SEL (3 << 22)
111#define IXP23XX_EXP_CFG0_XSCALE_SPEED_EN (1 << 21)
112#define IXP23XX_EXP_CFG0_CPP_SPEED_SEL (3 << 19)
113#define IXP23XX_EXP_CFG0_CPP_SPEED_EN (1 << 18)
114#define IXP23XX_EXP_CFG0_PCI_SWIN (3 << 16)
115#define IXP23XX_EXP_CFG0_PCI_DWIN (3 << 14)
116#define IXP23XX_EXP_CFG0_PCI33_MODE (1 << 13)
117#define IXP23XX_EXP_CFG0_QDR_SPEED_SEL (1 << 12)
118#define IXP23XX_EXP_CFG0_CPP_DIV_SEL (1 << 5)
119#define IXP23XX_EXP_CFG0_XSI_NOT_PRES (1 << 4)
120#define IXP23XX_EXP_CFG0_PROM_BOOT (1 << 3)
121#define IXP23XX_EXP_CFG0_PCI_ARB (1 << 2)
122#define IXP23XX_EXP_CFG0_PCI_HOST (1 << 1)
123#define IXP23XX_EXP_CFG0_FLASH_WIDTH (1 << 0)
124
125#define IXP23XX_EXP_UNIT_FUSE IXP23XX_EXP_CFG_REG(0x28)
126#define IXP23XX_EXP_MSF_MUX IXP23XX_EXP_CFG_REG(0x30)
127#define IXP23XX_EXP_CFG_FUSE IXP23XX_EXP_CFG_REG(0x34)
128
129#define IXP23XX_EXP_BUS_PHYS 0x90000000
130#define IXP23XX_EXP_BUS_WINDOW_SIZE 0x01000000
131
132#define IXP23XX_EXP_BUS_CS0_BASE (IXP23XX_EXP_BUS_PHYS + 0x00000000)
133#define IXP23XX_EXP_BUS_CS1_BASE (IXP23XX_EXP_BUS_PHYS + 0x01000000)
134#define IXP23XX_EXP_BUS_CS2_BASE (IXP23XX_EXP_BUS_PHYS + 0x02000000)
135#define IXP23XX_EXP_BUS_CS3_BASE (IXP23XX_EXP_BUS_PHYS + 0x03000000)
136#define IXP23XX_EXP_BUS_CS4_BASE (IXP23XX_EXP_BUS_PHYS + 0x04000000)
137#define IXP23XX_EXP_BUS_CS5_BASE (IXP23XX_EXP_BUS_PHYS + 0x05000000)
138#define IXP23XX_EXP_BUS_CS6_BASE (IXP23XX_EXP_BUS_PHYS + 0x06000000)
139#define IXP23XX_EXP_BUS_CS7_BASE (IXP23XX_EXP_BUS_PHYS + 0x07000000)
140
141
142/****************************************************************************
143 * Peripherals.
144 ****************************************************************************/
145#define IXP23XX_UART1_VIRT (IXP23XX_PERIPHERAL_VIRT + 0x0000)
146#define IXP23XX_UART2_VIRT (IXP23XX_PERIPHERAL_VIRT + 0x1000)
147#define IXP23XX_PMU_VIRT (IXP23XX_PERIPHERAL_VIRT + 0x2000)
148#define IXP23XX_INTC_VIRT (IXP23XX_PERIPHERAL_VIRT + 0x3000)
149#define IXP23XX_GPIO_VIRT (IXP23XX_PERIPHERAL_VIRT + 0x4000)
150#define IXP23XX_TIMER_VIRT (IXP23XX_PERIPHERAL_VIRT + 0x5000)
151#define IXP23XX_NPE0_VIRT (IXP23XX_PERIPHERAL_VIRT + 0x6000)
152#define IXP23XX_DSR_VIRT (IXP23XX_PERIPHERAL_VIRT + 0x7000)
153#define IXP23XX_NPE1_VIRT (IXP23XX_PERIPHERAL_VIRT + 0x8000)
154#define IXP23XX_ETH0_VIRT (IXP23XX_PERIPHERAL_VIRT + 0x9000)
155#define IXP23XX_ETH1_VIRT (IXP23XX_PERIPHERAL_VIRT + 0xA000)
156#define IXP23XX_GIG0_VIRT (IXP23XX_PERIPHERAL_VIRT + 0xB000)
157#define IXP23XX_GIG1_VIRT (IXP23XX_PERIPHERAL_VIRT + 0xC000)
158#define IXP23XX_DDRS_VIRT (IXP23XX_PERIPHERAL_VIRT + 0xD000)
159
160#define IXP23XX_UART1_PHYS (IXP23XX_PERIPHERAL_PHYS + 0x0000)
161#define IXP23XX_UART2_PHYS (IXP23XX_PERIPHERAL_PHYS + 0x1000)
162#define IXP23XX_PMU_PHYS (IXP23XX_PERIPHERAL_PHYS + 0x2000)
163#define IXP23XX_INTC_PHYS (IXP23XX_PERIPHERAL_PHYS + 0x3000)
164#define IXP23XX_GPIO_PHYS (IXP23XX_PERIPHERAL_PHYS + 0x4000)
165#define IXP23XX_TIMER_PHYS (IXP23XX_PERIPHERAL_PHYS + 0x5000)
166#define IXP23XX_NPE0_PHYS (IXP23XX_PERIPHERAL_PHYS + 0x6000)
167#define IXP23XX_DSR_PHYS (IXP23XX_PERIPHERAL_PHYS + 0x7000)
168#define IXP23XX_NPE1_PHYS (IXP23XX_PERIPHERAL_PHYS + 0x8000)
169#define IXP23XX_ETH0_PHYS (IXP23XX_PERIPHERAL_PHYS + 0x9000)
170#define IXP23XX_ETH1_PHYS (IXP23XX_PERIPHERAL_PHYS + 0xA000)
171#define IXP23XX_GIG0_PHYS (IXP23XX_PERIPHERAL_PHYS + 0xB000)
172#define IXP23XX_GIG1_PHYS (IXP23XX_PERIPHERAL_PHYS + 0xC000)
173#define IXP23XX_DDRS_PHYS (IXP23XX_PERIPHERAL_PHYS + 0xD000)
174
175
176/****************************************************************************
177 * Interrupt controller.
178 ****************************************************************************/
179#define IXP23XX_INTC_REG(x) ((volatile unsigned long *)(IXP23XX_INTC_VIRT + (x)))
180#define IXP23XX_INTR_ST1 IXP23XX_INTC_REG(0x00)
181#define IXP23XX_INTR_ST2 IXP23XX_INTC_REG(0x04)
182#define IXP23XX_INTR_ST3 IXP23XX_INTC_REG(0x08)
183#define IXP23XX_INTR_ST4 IXP23XX_INTC_REG(0x0c)
184#define IXP23XX_INTR_EN1 IXP23XX_INTC_REG(0x10)
185#define IXP23XX_INTR_EN2 IXP23XX_INTC_REG(0x14)
186#define IXP23XX_INTR_EN3 IXP23XX_INTC_REG(0x18)
187#define IXP23XX_INTR_EN4 IXP23XX_INTC_REG(0x1c)
188#define IXP23XX_INTR_SEL1 IXP23XX_INTC_REG(0x20)
189#define IXP23XX_INTR_SEL2 IXP23XX_INTC_REG(0x24)
190#define IXP23XX_INTR_SEL3 IXP23XX_INTC_REG(0x28)
191#define IXP23XX_INTR_SEL4 IXP23XX_INTC_REG(0x2c)
192#define IXP23XX_INTR_IRQ_ST1 IXP23XX_INTC_REG(0x30)
193#define IXP23XX_INTR_IRQ_ST2 IXP23XX_INTC_REG(0x34)
194#define IXP23XX_INTR_IRQ_ST3 IXP23XX_INTC_REG(0x38)
195#define IXP23XX_INTR_IRQ_ST4 IXP23XX_INTC_REG(0x3c)
196#define IXP23XX_INTR_IRQ_ENC_ST_OFFSET 0x54
197
198
199/****************************************************************************
200 * GPIO.
201 ****************************************************************************/
202#define IXP23XX_GPIO_REG(x) ((volatile unsigned long *)(IXP23XX_GPIO_VIRT + (x)))
203#define IXP23XX_GPIO_GPOUTR IXP23XX_GPIO_REG(0x00)
204#define IXP23XX_GPIO_GPOER IXP23XX_GPIO_REG(0x04)
205#define IXP23XX_GPIO_GPINR IXP23XX_GPIO_REG(0x08)
206#define IXP23XX_GPIO_GPISR IXP23XX_GPIO_REG(0x0c)
207#define IXP23XX_GPIO_GPIT1R IXP23XX_GPIO_REG(0x10)
208#define IXP23XX_GPIO_GPIT2R IXP23XX_GPIO_REG(0x14)
209#define IXP23XX_GPIO_GPCLKR IXP23XX_GPIO_REG(0x18)
210#define IXP23XX_GPIO_GPDBSELR IXP23XX_GPIO_REG(0x1c)
211
212#define IXP23XX_GPIO_STYLE_MASK 0x7
213#define IXP23XX_GPIO_STYLE_ACTIVE_HIGH 0x0
214#define IXP23XX_GPIO_STYLE_ACTIVE_LOW 0x1
215#define IXP23XX_GPIO_STYLE_RISING_EDGE 0x2
216#define IXP23XX_GPIO_STYLE_FALLING_EDGE 0x3
217#define IXP23XX_GPIO_STYLE_TRANSITIONAL 0x4
218
219#define IXP23XX_GPIO_STYLE_SIZE 3
220
221
222/****************************************************************************
223 * Timer.
224 ****************************************************************************/
225#define IXP23XX_TIMER_REG(x) ((volatile unsigned long *)(IXP23XX_TIMER_VIRT + (x)))
226#define IXP23XX_TIMER_CONT IXP23XX_TIMER_REG(0x00)
227#define IXP23XX_TIMER1_TIMESTAMP IXP23XX_TIMER_REG(0x04)
228#define IXP23XX_TIMER1_RELOAD IXP23XX_TIMER_REG(0x08)
229#define IXP23XX_TIMER2_TIMESTAMP IXP23XX_TIMER_REG(0x0c)
230#define IXP23XX_TIMER2_RELOAD IXP23XX_TIMER_REG(0x10)
231#define IXP23XX_TIMER_WDOG IXP23XX_TIMER_REG(0x14)
232#define IXP23XX_TIMER_WDOG_EN IXP23XX_TIMER_REG(0x18)
233#define IXP23XX_TIMER_WDOG_KEY IXP23XX_TIMER_REG(0x1c)
234#define IXP23XX_TIMER_WDOG_KEY_MAGIC 0x482e
235#define IXP23XX_TIMER_STATUS IXP23XX_TIMER_REG(0x20)
236#define IXP23XX_TIMER_SOFT_RESET IXP23XX_TIMER_REG(0x24)
237#define IXP23XX_TIMER_SOFT_RESET_EN IXP23XX_TIMER_REG(0x28)
238
239#define IXP23XX_TIMER_ENABLE (1 << 0)
240#define IXP23XX_TIMER_ONE_SHOT (1 << 1)
241/* Low order bits of reload value ignored */
242#define IXP23XX_TIMER_RELOAD_MASK (0x3)
243#define IXP23XX_TIMER_DISABLED (0x0)
244#define IXP23XX_TIMER1_INT_PEND (1 << 0)
245#define IXP23XX_TIMER2_INT_PEND (1 << 1)
246#define IXP23XX_TIMER_STATUS_TS_PEND (1 << 2)
247#define IXP23XX_TIMER_STATUS_WDOG_PEND (1 << 3)
248#define IXP23XX_TIMER_STATUS_WARM_RESET (1 << 4)
249
250
251/****************************************************************************
252 * CAP CSRs.
253 ****************************************************************************/
254#define IXP23XX_GLOBAL_REG(x) ((volatile unsigned long *)(IXP23XX_CAP_CSR_VIRT + 0x4a00 + (x)))
255#define IXP23XX_PRODUCT_ID IXP23XX_GLOBAL_REG(0x00)
256#define IXP23XX_MISC_CONTROL IXP23XX_GLOBAL_REG(0x04)
257#define IXP23XX_MSF_CLK_CNTRL IXP23XX_GLOBAL_REG(0x08)
258#define IXP23XX_RESET0 IXP23XX_GLOBAL_REG(0x0c)
259#define IXP23XX_RESET1 IXP23XX_GLOBAL_REG(0x10)
260#define IXP23XX_STRAP_OPTIONS IXP23XX_GLOBAL_REG(0x18)
261
262#define IXP23XX_ENABLE_WATCHDOG (1 << 24)
263#define IXP23XX_SHPC_INIT_COMP (1 << 21)
264#define IXP23XX_RST_ALL (1 << 16)
265#define IXP23XX_RESET_PCI (1 << 2)
266#define IXP23XX_PCI_UNIT_RESET (1 << 1)
267#define IXP23XX_XSCALE_RESET (1 << 0)
268
269#define IXP23XX_UENGINE_CSR_VIRT_BASE (IXP23XX_CAP_CSR_VIRT + 0x18000)
270
271
272/****************************************************************************
273 * PCI CSRs.
274 ****************************************************************************/
275#define IXP23XX_PCI_CREG(x) ((volatile unsigned long *)(IXP23XX_PCI_CREG_VIRT + (x)))
276#define IXP23XX_PCI_CMDSTAT IXP23XX_PCI_CREG(0x04)
277#define IXP23XX_PCI_SRAM_BAR IXP23XX_PCI_CREG(0x14)
278#define IXP23XX_PCI_SDRAM_BAR IXP23XX_PCI_CREG(0x18)
279
280
281#define IXP23XX_PCI_CSR(x) ((volatile unsigned long *)(IXP23XX_PCI_CREG_VIRT + 0x01000000 + (x)))
282#define IXP23XX_PCI_OUT_INT_STATUS IXP23XX_PCI_CSR(0x0030)
283#define IXP23XX_PCI_OUT_INT_MASK IXP23XX_PCI_CSR(0x0034)
284#define IXP23XX_PCI_SRAM_BASE_ADDR_MASK IXP23XX_PCI_CSR(0x00fc)
285#define IXP23XX_PCI_DRAM_BASE_ADDR_MASK IXP23XX_PCI_CSR(0x0100)
286#define IXP23XX_PCI_CONTROL IXP23XX_PCI_CSR(0x013c)
287#define IXP23XX_PCI_ADDR_EXT IXP23XX_PCI_CSR(0x0140)
288#define IXP23XX_PCI_ME_PUSH_STATUS IXP23XX_PCI_CSR(0x0148)
289#define IXP23XX_PCI_ME_PUSH_EN IXP23XX_PCI_CSR(0x014c)
290#define IXP23XX_PCI_ERR_STATUS IXP23XX_PCI_CSR(0x0150)
291#define IXP23XX_PCI_ERROR_STATUS IXP23XX_PCI_CSR(0x0150)
292#define IXP23XX_PCI_ERR_ENABLE IXP23XX_PCI_CSR(0x0154)
293#define IXP23XX_PCI_XSCALE_INT_STATUS IXP23XX_PCI_CSR(0x0158)
294#define IXP23XX_PCI_XSCALE_INT_ENABLE IXP23XX_PCI_CSR(0x015c)
295#define IXP23XX_PCI_CPP_ADDR_BITS IXP23XX_PCI_CSR(0x0160)
296
297
298#endif
diff --git a/arch/arm/mach-ixp23xx/include/mach/memory.h b/arch/arm/mach-ixp23xx/include/mach/memory.h
new file mode 100644
index 000000000000..9d40115f7ebe
--- /dev/null
+++ b/arch/arm/mach-ixp23xx/include/mach/memory.h
@@ -0,0 +1,48 @@
1/*
2 * arch/arm/mach-ixp23xx/include/mach/memory.h
3 *
4 * Copyright (c) 2003-2004 Intel Corp.
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2 of the License, or (at your
9 * option) any later version.
10 */
11
12#ifndef __ASM_ARCH_MEMORY_H
13#define __ASM_ARCH_MEMORY_H
14
15#include <mach/hardware.h>
16
17/*
18 * Physical DRAM offset.
19 */
20#define PHYS_OFFSET (0x00000000)
21
22
23/*
24 * Virtual view <-> DMA view memory address translations
25 * virt_to_bus: Used to translate the virtual address to an
26 * address suitable to be passed to set_dma_addr
27 * bus_to_virt: Used to convert an address for DMA operations
28 * to an address that the kernel can use.
29 */
30#ifndef __ASSEMBLY__
31
32#define __virt_to_bus(v) \
33 ({ unsigned int ret; \
34 ret = ((__virt_to_phys(v) - 0x00000000) + \
35 (*((volatile int *)IXP23XX_PCI_SDRAM_BAR) & 0xfffffff0)); \
36 ret; })
37
38#define __bus_to_virt(b) \
39 ({ unsigned int data; \
40 data = *((volatile int *)IXP23XX_PCI_SDRAM_BAR); \
41 __phys_to_virt((((b - (data & 0xfffffff0)) + 0x00000000))); })
42
43#define arch_is_coherent() 1
44
45#endif
46
47
48#endif
diff --git a/arch/arm/mach-ixp23xx/include/mach/platform.h b/arch/arm/mach-ixp23xx/include/mach/platform.h
new file mode 100644
index 000000000000..db9d9416e5e4
--- /dev/null
+++ b/arch/arm/mach-ixp23xx/include/mach/platform.h
@@ -0,0 +1,57 @@
1/*
2 * arch/arm/mach-ixp23xx/include/mach/platform.h
3 *
4 * Various bits of code used by platform-level code.
5 *
6 * Author: Deepak Saxena <dsaxena@plexity.net>
7 *
8 * Copyright 2005 (c) MontaVista Software, Inc.
9 *
10 * This file is licensed under the terms of the GNU General Public
11 * License version 2. This program is licensed "as is" without any
12 * warranty of any kind, whether express or implied.
13 */
14
15#ifndef __ASSEMBLY__
16
17static inline unsigned long ixp2000_reg_read(volatile void *reg)
18{
19 return *((volatile unsigned long *)reg);
20}
21
22static inline void ixp2000_reg_write(volatile void *reg, unsigned long val)
23{
24 *((volatile unsigned long *)reg) = val;
25}
26
27static inline void ixp2000_reg_wrb(volatile void *reg, unsigned long val)
28{
29 *((volatile unsigned long *)reg) = val;
30}
31
32struct pci_sys_data;
33
34void ixp23xx_map_io(void);
35void ixp23xx_init_irq(void);
36void ixp23xx_sys_init(void);
37int ixp23xx_pci_setup(int, struct pci_sys_data *);
38void ixp23xx_pci_preinit(void);
39struct pci_bus *ixp23xx_pci_scan_bus(int, struct pci_sys_data*);
40void ixp23xx_pci_slave_init(void);
41
42extern struct sys_timer ixp23xx_timer;
43
44#define IXP23XX_UART_XTAL 14745600
45
46#ifndef __ASSEMBLY__
47/*
48 * Is system memory on the XSI or CPP bus?
49 */
50static inline unsigned ixp23xx_cpp_boot(void)
51{
52 return (*IXP23XX_EXP_CFG0 & IXP23XX_EXP_CFG0_XSI_NOT_PRES);
53}
54#endif
55
56
57#endif
diff --git a/arch/arm/mach-ixp23xx/include/mach/system.h b/arch/arm/mach-ixp23xx/include/mach/system.h
new file mode 100644
index 000000000000..d57c3fc10f1f
--- /dev/null
+++ b/arch/arm/mach-ixp23xx/include/mach/system.h
@@ -0,0 +1,33 @@
1/*
2 * arch/arm/mach-ixp23xx/include/mach/system.h
3 *
4 * Copyright (C) 2003 Intel Corporation.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10
11#include <mach/hardware.h>
12#include <asm/mach-types.h>
13
14static inline void arch_idle(void)
15{
16#if 0
17 if (!hlt_counter)
18 cpu_do_idle();
19#endif
20}
21
22static inline void arch_reset(char mode)
23{
24 /* First try machine specific support */
25 if (machine_is_ixdp2351()) {
26 *IXDP2351_CPLD_RESET1_REG = IXDP2351_CPLD_RESET1_MAGIC;
27 (void) *IXDP2351_CPLD_RESET1_REG;
28 *IXDP2351_CPLD_RESET1_REG = IXDP2351_CPLD_RESET1_ENABLE;
29 }
30
31 /* Use on-chip reset capability */
32 *IXP23XX_RESET0 |= IXP23XX_RST_ALL;
33}
diff --git a/arch/arm/mach-ixp23xx/include/mach/time.h b/arch/arm/mach-ixp23xx/include/mach/time.h
new file mode 100644
index 000000000000..b61dafc884ac
--- /dev/null
+++ b/arch/arm/mach-ixp23xx/include/mach/time.h
@@ -0,0 +1,3 @@
1/*
2 * arch/arm/mach-ixp23xx/include/mach/time.h
3 */
diff --git a/arch/arm/mach-ixp23xx/include/mach/timex.h b/arch/arm/mach-ixp23xx/include/mach/timex.h
new file mode 100644
index 000000000000..e341e9cf9c37
--- /dev/null
+++ b/arch/arm/mach-ixp23xx/include/mach/timex.h
@@ -0,0 +1,7 @@
1/*
2 * arch/arm/mach-ixp23xx/include/mach/timex.h
3 *
4 * XScale architecture timex specifications
5 */
6
7#define CLOCK_TICK_RATE 75000000
diff --git a/arch/arm/mach-ixp23xx/include/mach/uncompress.h b/arch/arm/mach-ixp23xx/include/mach/uncompress.h
new file mode 100644
index 000000000000..8b4c358d2c04
--- /dev/null
+++ b/arch/arm/mach-ixp23xx/include/mach/uncompress.h
@@ -0,0 +1,40 @@
1/*
2 * arch/arm/mach-ixp23xx/include/mach/uncompress.h
3 *
4 * Copyright (C) 2002-2004 Intel Corporation.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10
11#ifndef __ASM_ARCH_UNCOMPRESS_H
12#define __ASM_ARCH_UNCOMPRESS_H
13
14#include <mach/ixp23xx.h>
15#include <linux/serial_reg.h>
16
17#define UART_BASE ((volatile u32 *)IXP23XX_UART1_PHYS)
18
19static inline void putc(char c)
20{
21 int j;
22
23 for (j = 0; j < 0x1000; j++) {
24 if (UART_BASE[UART_LSR] & UART_LSR_THRE)
25 break;
26 barrier();
27 }
28
29 UART_BASE[UART_TX] = c;
30}
31
32static inline void flush(void)
33{
34}
35
36#define arch_decomp_setup()
37#define arch_decomp_wdog()
38
39
40#endif
diff --git a/arch/arm/mach-ixp23xx/include/mach/vmalloc.h b/arch/arm/mach-ixp23xx/include/mach/vmalloc.h
new file mode 100644
index 000000000000..dd519f678d10
--- /dev/null
+++ b/arch/arm/mach-ixp23xx/include/mach/vmalloc.h
@@ -0,0 +1,10 @@
1/*
2 * arch/arm/mach-ixp23xx/include/mach/vmalloc.h
3 *
4 * Copyright (c) 2005 MontaVista Software, Inc.
5 *
6 * NPU mappings end at 0xf0000000 and we allocate 64MB for board
7 * specific static I/O.
8 */
9
10#define VMALLOC_END (0xec000000)
diff --git a/arch/arm/mach-ixp23xx/ixdp2351.c b/arch/arm/mach-ixp23xx/ixdp2351.c
index 5c5d4d66dee8..b6e0bfa44df9 100644
--- a/arch/arm/mach-ixp23xx/ixdp2351.c
+++ b/arch/arm/mach-ixp23xx/ixdp2351.c
@@ -34,7 +34,7 @@
34#include <asm/types.h> 34#include <asm/types.h>
35#include <asm/setup.h> 35#include <asm/setup.h>
36#include <asm/memory.h> 36#include <asm/memory.h>
37#include <asm/hardware.h> 37#include <mach/hardware.h>
38#include <asm/mach-types.h> 38#include <asm/mach-types.h>
39#include <asm/system.h> 39#include <asm/system.h>
40#include <asm/tlbflush.h> 40#include <asm/tlbflush.h>
diff --git a/arch/arm/mach-ixp23xx/pci.c b/arch/arm/mach-ixp23xx/pci.c
index 227f808dc0ec..701d60aa0efd 100644
--- a/arch/arm/mach-ixp23xx/pci.c
+++ b/arch/arm/mach-ixp23xx/pci.c
@@ -31,8 +31,7 @@
31#include <asm/sizes.h> 31#include <asm/sizes.h>
32#include <asm/system.h> 32#include <asm/system.h>
33#include <asm/mach/pci.h> 33#include <asm/mach/pci.h>
34#include <asm/mach-types.h> 34#include <mach/hardware.h>
35#include <asm/hardware.h>
36 35
37extern int (*external_fault) (unsigned long, struct pt_regs *); 36extern int (*external_fault) (unsigned long, struct pt_regs *);
38 37
diff --git a/arch/arm/mach-ixp23xx/roadrunner.c b/arch/arm/mach-ixp23xx/roadrunner.c
index 896ff9f840d9..6d38d769761c 100644
--- a/arch/arm/mach-ixp23xx/roadrunner.c
+++ b/arch/arm/mach-ixp23xx/roadrunner.c
@@ -33,7 +33,7 @@
33#include <asm/types.h> 33#include <asm/types.h>
34#include <asm/setup.h> 34#include <asm/setup.h>
35#include <asm/memory.h> 35#include <asm/memory.h>
36#include <asm/hardware.h> 36#include <mach/hardware.h>
37#include <asm/mach-types.h> 37#include <asm/mach-types.h>
38#include <asm/irq.h> 38#include <asm/irq.h>
39#include <asm/system.h> 39#include <asm/system.h>
diff --git a/arch/arm/mach-ixp4xx/avila-pci.c b/arch/arm/mach-ixp4xx/avila-pci.c
index c6e044befccb..08d65dcdb5fe 100644
--- a/arch/arm/mach-ixp4xx/avila-pci.c
+++ b/arch/arm/mach-ixp4xx/avila-pci.c
@@ -25,7 +25,7 @@
25 25
26#include <asm/mach/pci.h> 26#include <asm/mach/pci.h>
27#include <asm/irq.h> 27#include <asm/irq.h>
28#include <asm/hardware.h> 28#include <mach/hardware.h>
29#include <asm/mach-types.h> 29#include <asm/mach-types.h>
30 30
31void __init avila_pci_preinit(void) 31void __init avila_pci_preinit(void)
diff --git a/arch/arm/mach-ixp4xx/avila-setup.c b/arch/arm/mach-ixp4xx/avila-setup.c
index e38f45fa58ae..797995ce18b9 100644
--- a/arch/arm/mach-ixp4xx/avila-setup.c
+++ b/arch/arm/mach-ixp4xx/avila-setup.c
@@ -23,7 +23,7 @@
23#include <asm/types.h> 23#include <asm/types.h>
24#include <asm/setup.h> 24#include <asm/setup.h>
25#include <asm/memory.h> 25#include <asm/memory.h>
26#include <asm/hardware.h> 26#include <mach/hardware.h>
27#include <asm/mach-types.h> 27#include <asm/mach-types.h>
28#include <asm/irq.h> 28#include <asm/irq.h>
29#include <asm/mach/arch.h> 29#include <asm/mach/arch.h>
diff --git a/arch/arm/mach-ixp4xx/common-pci.c b/arch/arm/mach-ixp4xx/common-pci.c
index 64be341109b3..192538a04575 100644
--- a/arch/arm/mach-ixp4xx/common-pci.c
+++ b/arch/arm/mach-ixp4xx/common-pci.c
@@ -32,7 +32,7 @@
32#include <asm/sizes.h> 32#include <asm/sizes.h>
33#include <asm/system.h> 33#include <asm/system.h>
34#include <asm/mach/pci.h> 34#include <asm/mach/pci.h>
35#include <asm/hardware.h> 35#include <mach/hardware.h>
36 36
37 37
38/* 38/*
diff --git a/arch/arm/mach-ixp4xx/common.c b/arch/arm/mach-ixp4xx/common.c
index 3947c506b4f3..58bd2842a6f1 100644
--- a/arch/arm/mach-ixp4xx/common.c
+++ b/arch/arm/mach-ixp4xx/common.c
@@ -29,8 +29,8 @@
29#include <linux/clocksource.h> 29#include <linux/clocksource.h>
30#include <linux/clockchips.h> 30#include <linux/clockchips.h>
31 31
32#include <asm/arch/udc.h> 32#include <mach/udc.h>
33#include <asm/hardware.h> 33#include <mach/hardware.h>
34#include <asm/uaccess.h> 34#include <asm/uaccess.h>
35#include <asm/io.h> 35#include <asm/io.h>
36#include <asm/pgtable.h> 36#include <asm/pgtable.h>
diff --git a/arch/arm/mach-ixp4xx/coyote-pci.c b/arch/arm/mach-ixp4xx/coyote-pci.c
index be4f4a208b90..efddf01ed17b 100644
--- a/arch/arm/mach-ixp4xx/coyote-pci.c
+++ b/arch/arm/mach-ixp4xx/coyote-pci.c
@@ -20,7 +20,7 @@
20#include <linux/irq.h> 20#include <linux/irq.h>
21 21
22#include <asm/mach-types.h> 22#include <asm/mach-types.h>
23#include <asm/hardware.h> 23#include <mach/hardware.h>
24#include <asm/irq.h> 24#include <asm/irq.h>
25 25
26#include <asm/mach/pci.h> 26#include <asm/mach/pci.h>
diff --git a/arch/arm/mach-ixp4xx/coyote-setup.c b/arch/arm/mach-ixp4xx/coyote-setup.c
index 13f8a7ac3ba9..aab1954e2747 100644
--- a/arch/arm/mach-ixp4xx/coyote-setup.c
+++ b/arch/arm/mach-ixp4xx/coyote-setup.c
@@ -19,7 +19,7 @@
19#include <asm/types.h> 19#include <asm/types.h>
20#include <asm/setup.h> 20#include <asm/setup.h>
21#include <asm/memory.h> 21#include <asm/memory.h>
22#include <asm/hardware.h> 22#include <mach/hardware.h>
23#include <asm/irq.h> 23#include <asm/irq.h>
24#include <asm/mach-types.h> 24#include <asm/mach-types.h>
25#include <asm/mach/arch.h> 25#include <asm/mach/arch.h>
diff --git a/arch/arm/mach-ixp4xx/gateway7001-pci.c b/arch/arm/mach-ixp4xx/gateway7001-pci.c
index afd1dc14e597..7e93a0975c4d 100644
--- a/arch/arm/mach-ixp4xx/gateway7001-pci.c
+++ b/arch/arm/mach-ixp4xx/gateway7001-pci.c
@@ -23,7 +23,7 @@
23#include <linux/irq.h> 23#include <linux/irq.h>
24 24
25#include <asm/mach-types.h> 25#include <asm/mach-types.h>
26#include <asm/hardware.h> 26#include <mach/hardware.h>
27 27
28#include <asm/mach/pci.h> 28#include <asm/mach/pci.h>
29 29
diff --git a/arch/arm/mach-ixp4xx/gateway7001-setup.c b/arch/arm/mach-ixp4xx/gateway7001-setup.c
index 37876832e141..59b73a0ddfa9 100644
--- a/arch/arm/mach-ixp4xx/gateway7001-setup.c
+++ b/arch/arm/mach-ixp4xx/gateway7001-setup.c
@@ -22,7 +22,7 @@
22#include <asm/types.h> 22#include <asm/types.h>
23#include <asm/setup.h> 23#include <asm/setup.h>
24#include <asm/memory.h> 24#include <asm/memory.h>
25#include <asm/hardware.h> 25#include <mach/hardware.h>
26#include <asm/irq.h> 26#include <asm/irq.h>
27#include <asm/mach-types.h> 27#include <asm/mach-types.h>
28#include <asm/mach/arch.h> 28#include <asm/mach/arch.h>
diff --git a/arch/arm/mach-ixp4xx/gtwx5715-pci.c b/arch/arm/mach-ixp4xx/gtwx5715-pci.c
index 20960704183b..7b8a2c323840 100644
--- a/arch/arm/mach-ixp4xx/gtwx5715-pci.c
+++ b/arch/arm/mach-ixp4xx/gtwx5715-pci.c
@@ -28,8 +28,8 @@
28#include <linux/irq.h> 28#include <linux/irq.h>
29 29
30#include <asm/mach-types.h> 30#include <asm/mach-types.h>
31#include <asm/hardware.h> 31#include <mach/hardware.h>
32#include <asm/arch/gtwx5715.h> 32#include <mach/gtwx5715.h>
33#include <asm/mach/pci.h> 33#include <asm/mach/pci.h>
34 34
35/* 35/*
diff --git a/arch/arm/mach-ixp4xx/gtwx5715-setup.c b/arch/arm/mach-ixp4xx/gtwx5715-setup.c
index dc6725bda3c4..25c21d6665ec 100644
--- a/arch/arm/mach-ixp4xx/gtwx5715-setup.c
+++ b/arch/arm/mach-ixp4xx/gtwx5715-setup.c
@@ -32,12 +32,12 @@
32#include <asm/types.h> 32#include <asm/types.h>
33#include <asm/setup.h> 33#include <asm/setup.h>
34#include <asm/memory.h> 34#include <asm/memory.h>
35#include <asm/hardware.h> 35#include <mach/hardware.h>
36#include <asm/irq.h> 36#include <asm/irq.h>
37#include <asm/mach-types.h> 37#include <asm/mach-types.h>
38#include <asm/mach/arch.h> 38#include <asm/mach/arch.h>
39#include <asm/mach/flash.h> 39#include <asm/mach/flash.h>
40#include <asm/arch/gtwx5715.h> 40#include <mach/gtwx5715.h>
41 41
42/* 42/*
43 * Xscale UART registers are 32 bits wide with only the least 43 * Xscale UART registers are 32 bits wide with only the least
diff --git a/arch/arm/mach-ixp4xx/include/mach/avila.h b/arch/arm/mach-ixp4xx/include/mach/avila.h
new file mode 100644
index 000000000000..1640cb61972b
--- /dev/null
+++ b/arch/arm/mach-ixp4xx/include/mach/avila.h
@@ -0,0 +1,39 @@
1/*
2 * arch/arm/mach-ixp4xx/include/mach/avila.h
3 *
4 * Gateworks Avila platform specific definitions
5 *
6 * Author: Michael-Luke Jones <mlj28@cam.ac.uk>
7 *
8 * Based on ixdp425.h
9 * Author: Deepak Saxena <dsaxena@plexity.net>
10 *
11 * Copyright 2004 (c) MontaVista, Software, Inc.
12 *
13 * This file is licensed under the terms of the GNU General Public
14 * License version 2. This program is licensed "as is" without any
15 * warranty of any kind, whether express or implied.
16 */
17
18#ifndef __ASM_ARCH_HARDWARE_H__
19#error "Do not include this directly, instead #include <mach/hardware.h>"
20#endif
21
22#define AVILA_SDA_PIN 7
23#define AVILA_SCL_PIN 6
24
25/*
26 * AVILA PCI IRQs
27 */
28#define AVILA_PCI_MAX_DEV 4
29#define LOFT_PCI_MAX_DEV 6
30#define AVILA_PCI_IRQ_LINES 4
31
32
33/* PCI controller GPIO to IRQ pin mappings */
34#define AVILA_PCI_INTA_PIN 11
35#define AVILA_PCI_INTB_PIN 10
36#define AVILA_PCI_INTC_PIN 9
37#define AVILA_PCI_INTD_PIN 8
38
39
diff --git a/arch/arm/mach-ixp4xx/include/mach/coyote.h b/arch/arm/mach-ixp4xx/include/mach/coyote.h
new file mode 100644
index 000000000000..717ac6d16f55
--- /dev/null
+++ b/arch/arm/mach-ixp4xx/include/mach/coyote.h
@@ -0,0 +1,33 @@
1/*
2 * arch/arm/mach-ixp4xx/include/mach/coyote.h
3 *
4 * ADI Engineering platform specific definitions
5 *
6 * Author: Deepak Saxena <dsaxena@plexity.net>
7 *
8 * Copyright 2004 (c) MontaVista, Software, Inc.
9 *
10 * This file is licensed under the terms of the GNU General Public
11 * License version 2. This program is licensed "as is" without any
12 * warranty of any kind, whether express or implied.
13 */
14
15#ifndef __ASM_ARCH_HARDWARE_H__
16#error "Do not include this directly, instead #include <mach/hardware.h>"
17#endif
18
19/* PCI controller GPIO to IRQ pin mappings */
20#define COYOTE_PCI_SLOT0_PIN 6
21#define COYOTE_PCI_SLOT1_PIN 11
22
23#define COYOTE_PCI_SLOT0_DEVID 14
24#define COYOTE_PCI_SLOT1_DEVID 15
25
26#define COYOTE_IDE_BASE_PHYS IXP4XX_EXP_BUS_BASE(3)
27#define COYOTE_IDE_BASE_VIRT 0xFFFE1000
28#define COYOTE_IDE_REGION_SIZE 0x1000
29
30#define COYOTE_IDE_DATA_PORT 0xFFFE10E0
31#define COYOTE_IDE_CTRL_PORT 0xFFFE10FC
32#define COYOTE_IDE_ERROR_PORT 0xFFFE10E2
33
diff --git a/arch/arm/mach-ixp4xx/include/mach/cpu.h b/arch/arm/mach-ixp4xx/include/mach/cpu.h
new file mode 100644
index 000000000000..ff8aa2393bf9
--- /dev/null
+++ b/arch/arm/mach-ixp4xx/include/mach/cpu.h
@@ -0,0 +1,46 @@
1/*
2 * arch/arm/mach-ixp4xx/include/mach/cpu.h
3 *
4 * IXP4XX cpu type detection
5 *
6 * Copyright (C) 2007 MontaVista Software, Inc.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 *
12 */
13
14#ifndef __ASM_ARCH_CPU_H__
15#define __ASM_ARCH_CPU_H__
16
17extern unsigned int processor_id;
18/* Processor id value in CP15 Register 0 */
19#define IXP425_PROCESSOR_ID_VALUE 0x690541c0
20#define IXP435_PROCESSOR_ID_VALUE 0x69054040
21#define IXP465_PROCESSOR_ID_VALUE 0x69054200
22#define IXP4XX_PROCESSOR_ID_MASK 0xfffffff0
23
24#define cpu_is_ixp42x() ((processor_id & IXP4XX_PROCESSOR_ID_MASK) == \
25 IXP425_PROCESSOR_ID_VALUE)
26#define cpu_is_ixp43x() ((processor_id & IXP4XX_PROCESSOR_ID_MASK) == \
27 IXP435_PROCESSOR_ID_VALUE)
28#define cpu_is_ixp46x() ((processor_id & IXP4XX_PROCESSOR_ID_MASK) == \
29 IXP465_PROCESSOR_ID_VALUE)
30
31static inline u32 ixp4xx_read_feature_bits(void)
32{
33 unsigned int val = ~*IXP4XX_EXP_CFG2;
34 val &= ~IXP4XX_FEATURE_RESERVED;
35 if (!cpu_is_ixp46x())
36 val &= ~IXP4XX_FEATURE_IXP46X_ONLY;
37
38 return val;
39}
40
41static inline void ixp4xx_write_feature_bits(u32 value)
42{
43 *IXP4XX_EXP_CFG2 = ~value;
44}
45
46#endif /* _ASM_ARCH_CPU_H */
diff --git a/arch/arm/mach-ixp4xx/include/mach/debug-macro.S b/arch/arm/mach-ixp4xx/include/mach/debug-macro.S
new file mode 100644
index 000000000000..7c6a6912acde
--- /dev/null
+++ b/arch/arm/mach-ixp4xx/include/mach/debug-macro.S
@@ -0,0 +1,24 @@
1/* arch/arm/mach-ixp4xx/include/mach/debug-macro.S
2 *
3 * Debugging macro include header
4 *
5 * Copyright (C) 1994-1999 Russell King
6 * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11*/
12
13 .macro addruart,rx
14 mrc p15, 0, \rx, c1, c0
15 tst \rx, #1 @ MMU enabled?
16 moveq \rx, #0xc8000000
17 movne \rx, #0xff000000
18 orrne \rx, \rx, #0x00b00000
19 add \rx,\rx,#3 @ Uart regs are at off set of 3 if
20 @ byte writes used - Big Endian.
21 .endm
22
23#define UART_SHIFT 2
24#include <asm/hardware/debug-8250.S>
diff --git a/arch/arm/mach-ixp4xx/include/mach/dma.h b/arch/arm/mach-ixp4xx/include/mach/dma.h
new file mode 100644
index 000000000000..00c5070c0201
--- /dev/null
+++ b/arch/arm/mach-ixp4xx/include/mach/dma.h
@@ -0,0 +1,21 @@
1/*
2 * arch/arm/mach-ixp4xx/include/mach/dma.h
3 *
4 * Copyright (C) 2001-2004 MontaVista Software, Inc.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 */
11#ifndef __ASM_ARCH_DMA_H
12#define __ASM_ARCH_DMA_H
13
14#include <linux/device.h>
15#include <asm/page.h>
16#include <asm/sizes.h>
17#include <mach/hardware.h>
18
19#define MAX_DMA_ADDRESS (PAGE_OFFSET + SZ_64M)
20
21#endif /* _ASM_ARCH_DMA_H */
diff --git a/arch/arm/mach-ixp4xx/include/mach/dsmg600.h b/arch/arm/mach-ixp4xx/include/mach/dsmg600.h
new file mode 100644
index 000000000000..dc087a34a268
--- /dev/null
+++ b/arch/arm/mach-ixp4xx/include/mach/dsmg600.h
@@ -0,0 +1,52 @@
1/*
2 * DSM-G600 platform specific definitions
3 *
4 * Copyright (C) 2006 Tower Technologies
5 * Author: Alessandro Zummo <a.zummo@towertech.it>
6 *
7 * based on ixdp425.h:
8 * Copyright 2004 (C) MontaVista, Software, Inc.
9 *
10 * This file is licensed under the terms of the GNU General Public
11 * License version 2. This program is licensed "as is" without any
12 * warranty of any kind, whether express or implied.
13 */
14
15#ifndef __ASM_ARCH_HARDWARE_H__
16#error "Do not include this directly, instead #include <mach/hardware.h>"
17#endif
18
19#define DSMG600_SDA_PIN 5
20#define DSMG600_SCL_PIN 4
21
22/*
23 * DSMG600 PCI IRQs
24 */
25#define DSMG600_PCI_MAX_DEV 4
26#define DSMG600_PCI_IRQ_LINES 3
27
28
29/* PCI controller GPIO to IRQ pin mappings */
30#define DSMG600_PCI_INTA_PIN 11
31#define DSMG600_PCI_INTB_PIN 10
32#define DSMG600_PCI_INTC_PIN 9
33#define DSMG600_PCI_INTD_PIN 8
34#define DSMG600_PCI_INTE_PIN 7
35#define DSMG600_PCI_INTF_PIN 6
36
37/* DSM-G600 Timer Setting */
38#define DSMG600_FREQ 66000000
39
40/* Buttons */
41
42#define DSMG600_PB_GPIO 15 /* power button */
43#define DSMG600_RB_GPIO 3 /* reset button */
44
45/* Power control */
46
47#define DSMG600_PO_GPIO 2 /* power off */
48
49/* LEDs */
50
51#define DSMG600_LED_PWR_GPIO 0
52#define DSMG600_LED_WLAN_GPIO 14
diff --git a/arch/arm/mach-ixp4xx/include/mach/entry-macro.S b/arch/arm/mach-ixp4xx/include/mach/entry-macro.S
new file mode 100644
index 000000000000..f2e14e94ed15
--- /dev/null
+++ b/arch/arm/mach-ixp4xx/include/mach/entry-macro.S
@@ -0,0 +1,47 @@
1/*
2 * arch/arm/mach-ixp4xx/include/mach/entry-macro.S
3 *
4 * Low-level IRQ helper macros for IXP4xx-based platforms
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10#include <mach/hardware.h>
11
12 .macro disable_fiq
13 .endm
14
15 .macro get_irqnr_preamble, base, tmp
16 .endm
17
18 .macro arch_ret_to_user, tmp1, tmp2
19 .endm
20
21 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
22 ldr \irqstat, =(IXP4XX_INTC_BASE_VIRT+IXP4XX_ICIP_OFFSET)
23 ldr \irqstat, [\irqstat] @ get interrupts
24 cmp \irqstat, #0
25 beq 1001f @ upper IRQ?
26 clz \irqnr, \irqstat
27 mov \base, #31
28 sub \irqnr, \base, \irqnr
29 b 1002f @ lower IRQ being
30 @ handled
31
321001:
33 /*
34 * IXP465/IXP435 has an upper IRQ status register
35 */
36#if defined(CONFIG_CPU_IXP46X) || defined(CONFIG_CPU_IXP43X)
37 ldr \irqstat, =(IXP4XX_INTC_BASE_VIRT+IXP4XX_ICIP2_OFFSET)
38 ldr \irqstat, [\irqstat] @ get upper interrupts
39 mov \irqnr, #63
40 clz \irqstat, \irqstat
41 cmp \irqstat, #32
42 subne \irqnr, \irqnr, \irqstat
43#endif
441002:
45 .endm
46
47
diff --git a/arch/arm/mach-ixp4xx/include/mach/fsg.h b/arch/arm/mach-ixp4xx/include/mach/fsg.h
new file mode 100644
index 000000000000..1f02b7e22a13
--- /dev/null
+++ b/arch/arm/mach-ixp4xx/include/mach/fsg.h
@@ -0,0 +1,50 @@
1/*
2 * arch/arm/mach-ixp4xx/include/mach/fsg.h
3 *
4 * Freecom FSG-3 platform specific definitions
5 *
6 * Author: Rod Whitby <rod@whitby.id.au>
7 * Author: Tomasz Chmielewski <mangoo@wpkg.org>
8 * Maintainers: http://www.nslu2-linux.org
9 *
10 * Based on coyote.h by
11 * Copyright 2004 (c) MontaVista, Software, Inc.
12 *
13 * This file is licensed under the terms of the GNU General Public
14 * License version 2. This program is licensed "as is" without any
15 * warranty of any kind, whether express or implied.
16 */
17
18#ifndef __ASM_ARCH_HARDWARE_H__
19#error "Do not include this directly, instead #include <mach/hardware.h>"
20#endif
21
22#define FSG_SDA_PIN 12
23#define FSG_SCL_PIN 13
24
25/*
26 * FSG PCI IRQs
27 */
28#define FSG_PCI_MAX_DEV 3
29#define FSG_PCI_IRQ_LINES 3
30
31
32/* PCI controller GPIO to IRQ pin mappings */
33#define FSG_PCI_INTA_PIN 6
34#define FSG_PCI_INTB_PIN 7
35#define FSG_PCI_INTC_PIN 5
36
37/* Buttons */
38
39#define FSG_SB_GPIO 4 /* sync button */
40#define FSG_RB_GPIO 9 /* reset button */
41#define FSG_UB_GPIO 10 /* usb button */
42
43/* LEDs */
44
45#define FSG_LED_WLAN_BIT 0
46#define FSG_LED_WAN_BIT 1
47#define FSG_LED_SATA_BIT 2
48#define FSG_LED_USB_BIT 4
49#define FSG_LED_RING_BIT 5
50#define FSG_LED_SYNC_BIT 7
diff --git a/arch/arm/mach-ixp4xx/include/mach/gpio.h b/arch/arm/mach-ixp4xx/include/mach/gpio.h
new file mode 100644
index 000000000000..9fbde177920f
--- /dev/null
+++ b/arch/arm/mach-ixp4xx/include/mach/gpio.h
@@ -0,0 +1,73 @@
1/*
2 * arch/arm/mach-ixp4xx/include/mach/gpio.h
3 *
4 * IXP4XX GPIO wrappers for arch-neutral GPIO calls
5 *
6 * Written by Milan Svoboda <msvoboda@ra.rockwell.com>
7 * Based on PXA implementation by Philipp Zabel <philipp.zabel@gmail.com>
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 *
23 */
24
25#ifndef __ASM_ARCH_IXP4XX_GPIO_H
26#define __ASM_ARCH_IXP4XX_GPIO_H
27
28#include <mach/hardware.h>
29
30static inline int gpio_request(unsigned gpio, const char *label)
31{
32 return 0;
33}
34
35static inline void gpio_free(unsigned gpio)
36{
37 return;
38}
39
40static inline int gpio_direction_input(unsigned gpio)
41{
42 gpio_line_config(gpio, IXP4XX_GPIO_IN);
43 return 0;
44}
45
46static inline int gpio_direction_output(unsigned gpio, int level)
47{
48 gpio_line_set(gpio, level);
49 gpio_line_config(gpio, IXP4XX_GPIO_OUT);
50 return 0;
51}
52
53static inline int gpio_get_value(unsigned gpio)
54{
55 int value;
56
57 gpio_line_get(gpio, &value);
58
59 return value;
60}
61
62static inline void gpio_set_value(unsigned gpio, int value)
63{
64 gpio_line_set(gpio, value);
65}
66
67#include <asm-generic/gpio.h> /* cansleep wrappers */
68
69extern int gpio_to_irq(int gpio);
70extern int irq_to_gpio(int gpio);
71
72#endif
73
diff --git a/arch/arm/mach-ixp4xx/include/mach/gtwx5715.h b/arch/arm/mach-ixp4xx/include/mach/gtwx5715.h
new file mode 100644
index 000000000000..5d5e201cac7e
--- /dev/null
+++ b/arch/arm/mach-ixp4xx/include/mach/gtwx5715.h
@@ -0,0 +1,116 @@
1/*
2 * arch/arm/mach-ixp4xx/include/mach/gtwx5715.h
3 *
4 * Gemtek GTWX5715 Gateway (Linksys WRV54G)
5 *
6 * Copyright 2004 (c) George T. Joseph
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21 */
22
23#ifndef __ASM_ARCH_HARDWARE_H__
24#error "Do not include this directly, instead #include <mach/hardware.h>"
25#endif
26#include "irqs.h"
27
28#define GTWX5715_GPIO0 0
29#define GTWX5715_GPIO1 1
30#define GTWX5715_GPIO2 2
31#define GTWX5715_GPIO3 3
32#define GTWX5715_GPIO4 4
33#define GTWX5715_GPIO5 5
34#define GTWX5715_GPIO6 6
35#define GTWX5715_GPIO7 7
36#define GTWX5715_GPIO8 8
37#define GTWX5715_GPIO9 9
38#define GTWX5715_GPIO10 10
39#define GTWX5715_GPIO11 11
40#define GTWX5715_GPIO12 12
41#define GTWX5715_GPIO13 13
42#define GTWX5715_GPIO14 14
43
44#define GTWX5715_GPIO0_IRQ IRQ_IXP4XX_GPIO0
45#define GTWX5715_GPIO1_IRQ IRQ_IXP4XX_GPIO1
46#define GTWX5715_GPIO2_IRQ IRQ_IXP4XX_GPIO2
47#define GTWX5715_GPIO3_IRQ IRQ_IXP4XX_GPIO3
48#define GTWX5715_GPIO4_IRQ IRQ_IXP4XX_GPIO4
49#define GTWX5715_GPIO5_IRQ IRQ_IXP4XX_GPIO5
50#define GTWX5715_GPIO6_IRQ IRQ_IXP4XX_GPIO6
51#define GTWX5715_GPIO7_IRQ IRQ_IXP4XX_GPIO7
52#define GTWX5715_GPIO8_IRQ IRQ_IXP4XX_GPIO8
53#define GTWX5715_GPIO9_IRQ IRQ_IXP4XX_GPIO9
54#define GTWX5715_GPIO10_IRQ IRQ_IXP4XX_GPIO10
55#define GTWX5715_GPIO11_IRQ IRQ_IXP4XX_GPIO11
56#define GTWX5715_GPIO12_IRQ IRQ_IXP4XX_GPIO12
57#define GTWX5715_GPIO13_IRQ IRQ_IXP4XX_SW_INT1
58#define GTWX5715_GPIO14_IRQ IRQ_IXP4XX_SW_INT2
59
60/* PCI controller GPIO to IRQ pin mappings
61
62 INTA INTB
63SLOT 0 10 11
64SLOT 1 11 10
65
66*/
67
68#define GTWX5715_PCI_SLOT0_DEVID 0
69#define GTWX5715_PCI_SLOT0_INTA_GPIO GTWX5715_GPIO10
70#define GTWX5715_PCI_SLOT0_INTB_GPIO GTWX5715_GPIO11
71#define GTWX5715_PCI_SLOT0_INTA_IRQ GTWX5715_GPIO10_IRQ
72#define GTWX5715_PCI_SLOT0_INTB_IRQ GTWX5715_GPIO11_IRQ
73
74#define GTWX5715_PCI_SLOT1_DEVID 1
75#define GTWX5715_PCI_SLOT1_INTA_GPIO GTWX5715_GPIO11
76#define GTWX5715_PCI_SLOT1_INTB_GPIO GTWX5715_GPIO10
77#define GTWX5715_PCI_SLOT1_INTA_IRQ GTWX5715_GPIO11_IRQ
78#define GTWX5715_PCI_SLOT1_INTB_IRQ GTWX5715_GPIO10_IRQ
79
80#define GTWX5715_PCI_SLOT_COUNT 2
81#define GTWX5715_PCI_INT_PIN_COUNT 2
82
83/*
84 * GPIO 5,6,7 and12 are hard wired to the Kendin KS8995M Switch
85 * and operate as an SPI type interface. The details of the interface
86 * are available on Kendin/Micrel's web site.
87 */
88
89#define GTWX5715_KSSPI_SELECT GTWX5715_GPIO5
90#define GTWX5715_KSSPI_TXD GTWX5715_GPIO6
91#define GTWX5715_KSSPI_CLOCK GTWX5715_GPIO7
92#define GTWX5715_KSSPI_RXD GTWX5715_GPIO12
93
94/*
95 * The "reset" button is wired to GPIO 3.
96 * The GPIO is brought "low" when the button is pushed.
97 */
98
99#define GTWX5715_BUTTON_GPIO GTWX5715_GPIO3
100#define GTWX5715_BUTTON_IRQ GTWX5715_GPIO3_IRQ
101
102/*
103 * Board Label Front Label
104 * LED1 Power
105 * LED2 Wireless-G
106 * LED3 not populated but could be
107 * LED4 Internet
108 * LED5 - LED8 Controlled by KS8995M Switch
109 * LED9 DMZ
110 */
111
112#define GTWX5715_LED1_GPIO GTWX5715_GPIO2
113#define GTWX5715_LED2_GPIO GTWX5715_GPIO9
114#define GTWX5715_LED3_GPIO GTWX5715_GPIO8
115#define GTWX5715_LED4_GPIO GTWX5715_GPIO1
116#define GTWX5715_LED9_GPIO GTWX5715_GPIO4
diff --git a/arch/arm/mach-ixp4xx/include/mach/hardware.h b/arch/arm/mach-ixp4xx/include/mach/hardware.h
new file mode 100644
index 000000000000..f58a43a23966
--- /dev/null
+++ b/arch/arm/mach-ixp4xx/include/mach/hardware.h
@@ -0,0 +1,50 @@
1/*
2 * arch/arm/mach-ixp4xx/include/mach/hardware.h
3 *
4 * Copyright (C) 2002 Intel Corporation.
5 * Copyright (C) 2003-2004 MontaVista Software, Inc.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 *
11 */
12
13/*
14 * Hardware definitions for IXP4xx based systems
15 */
16
17#ifndef __ASM_ARCH_HARDWARE_H__
18#define __ASM_ARCH_HARDWARE_H__
19
20#define PCIBIOS_MIN_IO 0x00001000
21#define PCIBIOS_MIN_MEM (cpu_is_ixp43x() ? 0x40000000 : 0x48000000)
22
23/*
24 * We override the standard dma-mask routines for bouncing.
25 */
26#define HAVE_ARCH_PCI_SET_DMA_MASK
27
28#define pcibios_assign_all_busses() 1
29
30/* Register locations and bits */
31#include "ixp4xx-regs.h"
32
33#ifndef __ASSEMBLER__
34#include <mach/cpu.h>
35#endif
36
37/* Platform helper functions and definitions */
38#include "platform.h"
39
40/* Platform specific details */
41#include "ixdp425.h"
42#include "avila.h"
43#include "coyote.h"
44#include "prpmc1100.h"
45#include "nslu2.h"
46#include "nas100d.h"
47#include "dsmg600.h"
48#include "fsg.h"
49
50#endif /* _ASM_ARCH_HARDWARE_H */
diff --git a/arch/arm/mach-ixp4xx/include/mach/io.h b/arch/arm/mach-ixp4xx/include/mach/io.h
new file mode 100644
index 000000000000..319948e31bec
--- /dev/null
+++ b/arch/arm/mach-ixp4xx/include/mach/io.h
@@ -0,0 +1,569 @@
1/*
2 * arch/arm/mach-ixp4xx/include/mach/io.h
3 *
4 * Author: Deepak Saxena <dsaxena@plexity.net>
5 *
6 * Copyright (C) 2002-2005 MontaVista Software, Inc.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 */
12
13#ifndef __ASM_ARM_ARCH_IO_H
14#define __ASM_ARM_ARCH_IO_H
15
16#include <linux/bitops.h>
17
18#include <mach/hardware.h>
19
20#define IO_SPACE_LIMIT 0xffff0000
21
22extern int (*ixp4xx_pci_read)(u32 addr, u32 cmd, u32* data);
23extern int ixp4xx_pci_write(u32 addr, u32 cmd, u32 data);
24
25
26/*
27 * IXP4xx provides two methods of accessing PCI memory space:
28 *
29 * 1) A direct mapped window from 0x48000000 to 0x4bffffff (64MB).
30 * To access PCI via this space, we simply ioremap() the BAR
31 * into the kernel and we can use the standard read[bwl]/write[bwl]
32 * macros. This is the preffered method due to speed but it
33 * limits the system to just 64MB of PCI memory. This can be
34 * problamatic if using video cards and other memory-heavy
35 * targets.
36 *
37 * 2) If > 64MB of memory space is required, the IXP4xx can be configured
38 * to use indirect registers to access PCI (as we do below for I/O
39 * transactions). This allows for up to 128MB (0x48000000 to 0x4fffffff)
40 * of memory on the bus. The disadvantage of this is that every
41 * PCI access requires three local register accesses plus a spinlock,
42 * but in some cases the performance hit is acceptable. In addition,
43 * you cannot mmap() PCI devices in this case.
44 *
45 */
46#ifndef CONFIG_IXP4XX_INDIRECT_PCI
47
48#define __mem_pci(a) (a)
49
50#else
51
52#include <linux/mm.h>
53
54/*
55 * In the case of using indirect PCI, we simply return the actual PCI
56 * address and our read/write implementation use that to drive the
57 * access registers. If something outside of PCI is ioremap'd, we
58 * fallback to the default.
59 */
60static inline void __iomem *
61__ixp4xx_ioremap(unsigned long addr, size_t size, unsigned int mtype)
62{
63 if((addr < PCIBIOS_MIN_MEM) || (addr > 0x4fffffff))
64 return __arm_ioremap(addr, size, mtype);
65
66 return (void __iomem *)addr;
67}
68
69static inline void
70__ixp4xx_iounmap(void __iomem *addr)
71{
72 if ((__force u32)addr >= VMALLOC_START)
73 __iounmap(addr);
74}
75
76#define __arch_ioremap(a, s, f) __ixp4xx_ioremap(a, s, f)
77#define __arch_iounmap(a) __ixp4xx_iounmap(a)
78
79#define writeb(v, p) __ixp4xx_writeb(v, p)
80#define writew(v, p) __ixp4xx_writew(v, p)
81#define writel(v, p) __ixp4xx_writel(v, p)
82
83#define writesb(p, v, l) __ixp4xx_writesb(p, v, l)
84#define writesw(p, v, l) __ixp4xx_writesw(p, v, l)
85#define writesl(p, v, l) __ixp4xx_writesl(p, v, l)
86
87#define readb(p) __ixp4xx_readb(p)
88#define readw(p) __ixp4xx_readw(p)
89#define readl(p) __ixp4xx_readl(p)
90
91#define readsb(p, v, l) __ixp4xx_readsb(p, v, l)
92#define readsw(p, v, l) __ixp4xx_readsw(p, v, l)
93#define readsl(p, v, l) __ixp4xx_readsl(p, v, l)
94
95static inline void
96__ixp4xx_writeb(u8 value, volatile void __iomem *p)
97{
98 u32 addr = (u32)p;
99 u32 n, byte_enables, data;
100
101 if (addr >= VMALLOC_START) {
102 __raw_writeb(value, addr);
103 return;
104 }
105
106 n = addr % 4;
107 byte_enables = (0xf & ~BIT(n)) << IXP4XX_PCI_NP_CBE_BESL;
108 data = value << (8*n);
109 ixp4xx_pci_write(addr, byte_enables | NP_CMD_MEMWRITE, data);
110}
111
112static inline void
113__ixp4xx_writesb(volatile void __iomem *bus_addr, const u8 *vaddr, int count)
114{
115 while (count--)
116 writeb(*vaddr++, bus_addr);
117}
118
119static inline void
120__ixp4xx_writew(u16 value, volatile void __iomem *p)
121{
122 u32 addr = (u32)p;
123 u32 n, byte_enables, data;
124
125 if (addr >= VMALLOC_START) {
126 __raw_writew(value, addr);
127 return;
128 }
129
130 n = addr % 4;
131 byte_enables = (0xf & ~(BIT(n) | BIT(n+1))) << IXP4XX_PCI_NP_CBE_BESL;
132 data = value << (8*n);
133 ixp4xx_pci_write(addr, byte_enables | NP_CMD_MEMWRITE, data);
134}
135
136static inline void
137__ixp4xx_writesw(volatile void __iomem *bus_addr, const u16 *vaddr, int count)
138{
139 while (count--)
140 writew(*vaddr++, bus_addr);
141}
142
143static inline void
144__ixp4xx_writel(u32 value, volatile void __iomem *p)
145{
146 u32 addr = (__force u32)p;
147 if (addr >= VMALLOC_START) {
148 __raw_writel(value, p);
149 return;
150 }
151
152 ixp4xx_pci_write(addr, NP_CMD_MEMWRITE, value);
153}
154
155static inline void
156__ixp4xx_writesl(volatile void __iomem *bus_addr, const u32 *vaddr, int count)
157{
158 while (count--)
159 writel(*vaddr++, bus_addr);
160}
161
162static inline unsigned char
163__ixp4xx_readb(const volatile void __iomem *p)
164{
165 u32 addr = (u32)p;
166 u32 n, byte_enables, data;
167
168 if (addr >= VMALLOC_START)
169 return __raw_readb(addr);
170
171 n = addr % 4;
172 byte_enables = (0xf & ~BIT(n)) << IXP4XX_PCI_NP_CBE_BESL;
173 if (ixp4xx_pci_read(addr, byte_enables | NP_CMD_MEMREAD, &data))
174 return 0xff;
175
176 return data >> (8*n);
177}
178
179static inline void
180__ixp4xx_readsb(const volatile void __iomem *bus_addr, u8 *vaddr, u32 count)
181{
182 while (count--)
183 *vaddr++ = readb(bus_addr);
184}
185
186static inline unsigned short
187__ixp4xx_readw(const volatile void __iomem *p)
188{
189 u32 addr = (u32)p;
190 u32 n, byte_enables, data;
191
192 if (addr >= VMALLOC_START)
193 return __raw_readw(addr);
194
195 n = addr % 4;
196 byte_enables = (0xf & ~(BIT(n) | BIT(n+1))) << IXP4XX_PCI_NP_CBE_BESL;
197 if (ixp4xx_pci_read(addr, byte_enables | NP_CMD_MEMREAD, &data))
198 return 0xffff;
199
200 return data>>(8*n);
201}
202
203static inline void
204__ixp4xx_readsw(const volatile void __iomem *bus_addr, u16 *vaddr, u32 count)
205{
206 while (count--)
207 *vaddr++ = readw(bus_addr);
208}
209
210static inline unsigned long
211__ixp4xx_readl(const volatile void __iomem *p)
212{
213 u32 addr = (__force u32)p;
214 u32 data;
215
216 if (addr >= VMALLOC_START)
217 return __raw_readl(p);
218
219 if (ixp4xx_pci_read(addr, NP_CMD_MEMREAD, &data))
220 return 0xffffffff;
221
222 return data;
223}
224
225static inline void
226__ixp4xx_readsl(const volatile void __iomem *bus_addr, u32 *vaddr, u32 count)
227{
228 while (count--)
229 *vaddr++ = readl(bus_addr);
230}
231
232
233/*
234 * We can use the built-in functions b/c they end up calling writeb/readb
235 */
236#define memset_io(c,v,l) _memset_io((c),(v),(l))
237#define memcpy_fromio(a,c,l) _memcpy_fromio((a),(c),(l))
238#define memcpy_toio(c,a,l) _memcpy_toio((c),(a),(l))
239
240#endif
241
242#ifndef CONFIG_PCI
243
244#define __io(v) v
245
246#else
247
248/*
249 * IXP4xx does not have a transparent cpu -> PCI I/O translation
250 * window. Instead, it has a set of registers that must be tweaked
251 * with the proper byte lanes, command types, and address for the
252 * transaction. This means that we need to override the default
253 * I/O functions.
254 */
255#define outb(p, v) __ixp4xx_outb(p, v)
256#define outw(p, v) __ixp4xx_outw(p, v)
257#define outl(p, v) __ixp4xx_outl(p, v)
258
259#define outsb(p, v, l) __ixp4xx_outsb(p, v, l)
260#define outsw(p, v, l) __ixp4xx_outsw(p, v, l)
261#define outsl(p, v, l) __ixp4xx_outsl(p, v, l)
262
263#define inb(p) __ixp4xx_inb(p)
264#define inw(p) __ixp4xx_inw(p)
265#define inl(p) __ixp4xx_inl(p)
266
267#define insb(p, v, l) __ixp4xx_insb(p, v, l)
268#define insw(p, v, l) __ixp4xx_insw(p, v, l)
269#define insl(p, v, l) __ixp4xx_insl(p, v, l)
270
271
272static inline void
273__ixp4xx_outb(u8 value, u32 addr)
274{
275 u32 n, byte_enables, data;
276 n = addr % 4;
277 byte_enables = (0xf & ~BIT(n)) << IXP4XX_PCI_NP_CBE_BESL;
278 data = value << (8*n);
279 ixp4xx_pci_write(addr, byte_enables | NP_CMD_IOWRITE, data);
280}
281
282static inline void
283__ixp4xx_outsb(u32 io_addr, const u8 *vaddr, u32 count)
284{
285 while (count--)
286 outb(*vaddr++, io_addr);
287}
288
289static inline void
290__ixp4xx_outw(u16 value, u32 addr)
291{
292 u32 n, byte_enables, data;
293 n = addr % 4;
294 byte_enables = (0xf & ~(BIT(n) | BIT(n+1))) << IXP4XX_PCI_NP_CBE_BESL;
295 data = value << (8*n);
296 ixp4xx_pci_write(addr, byte_enables | NP_CMD_IOWRITE, data);
297}
298
299static inline void
300__ixp4xx_outsw(u32 io_addr, const u16 *vaddr, u32 count)
301{
302 while (count--)
303 outw(cpu_to_le16(*vaddr++), io_addr);
304}
305
306static inline void
307__ixp4xx_outl(u32 value, u32 addr)
308{
309 ixp4xx_pci_write(addr, NP_CMD_IOWRITE, value);
310}
311
312static inline void
313__ixp4xx_outsl(u32 io_addr, const u32 *vaddr, u32 count)
314{
315 while (count--)
316 outl(*vaddr++, io_addr);
317}
318
319static inline u8
320__ixp4xx_inb(u32 addr)
321{
322 u32 n, byte_enables, data;
323 n = addr % 4;
324 byte_enables = (0xf & ~BIT(n)) << IXP4XX_PCI_NP_CBE_BESL;
325 if (ixp4xx_pci_read(addr, byte_enables | NP_CMD_IOREAD, &data))
326 return 0xff;
327
328 return data >> (8*n);
329}
330
331static inline void
332__ixp4xx_insb(u32 io_addr, u8 *vaddr, u32 count)
333{
334 while (count--)
335 *vaddr++ = inb(io_addr);
336}
337
338static inline u16
339__ixp4xx_inw(u32 addr)
340{
341 u32 n, byte_enables, data;
342 n = addr % 4;
343 byte_enables = (0xf & ~(BIT(n) | BIT(n+1))) << IXP4XX_PCI_NP_CBE_BESL;
344 if (ixp4xx_pci_read(addr, byte_enables | NP_CMD_IOREAD, &data))
345 return 0xffff;
346
347 return data>>(8*n);
348}
349
350static inline void
351__ixp4xx_insw(u32 io_addr, u16 *vaddr, u32 count)
352{
353 while (count--)
354 *vaddr++ = le16_to_cpu(inw(io_addr));
355}
356
357static inline u32
358__ixp4xx_inl(u32 addr)
359{
360 u32 data;
361 if (ixp4xx_pci_read(addr, NP_CMD_IOREAD, &data))
362 return 0xffffffff;
363
364 return data;
365}
366
367static inline void
368__ixp4xx_insl(u32 io_addr, u32 *vaddr, u32 count)
369{
370 while (count--)
371 *vaddr++ = inl(io_addr);
372}
373
374#define PIO_OFFSET 0x10000UL
375#define PIO_MASK 0x0ffffUL
376
377#define __is_io_address(p) (((unsigned long)p >= PIO_OFFSET) && \
378 ((unsigned long)p <= (PIO_MASK + PIO_OFFSET)))
379static inline unsigned int
380__ixp4xx_ioread8(const void __iomem *addr)
381{
382 unsigned long port = (unsigned long __force)addr;
383 if (__is_io_address(port))
384 return (unsigned int)__ixp4xx_inb(port & PIO_MASK);
385 else
386#ifndef CONFIG_IXP4XX_INDIRECT_PCI
387 return (unsigned int)__raw_readb(port);
388#else
389 return (unsigned int)__ixp4xx_readb(addr);
390#endif
391}
392
393static inline void
394__ixp4xx_ioread8_rep(const void __iomem *addr, void *vaddr, u32 count)
395{
396 unsigned long port = (unsigned long __force)addr;
397 if (__is_io_address(port))
398 __ixp4xx_insb(port & PIO_MASK, vaddr, count);
399 else
400#ifndef CONFIG_IXP4XX_INDIRECT_PCI
401 __raw_readsb(addr, vaddr, count);
402#else
403 __ixp4xx_readsb(addr, vaddr, count);
404#endif
405}
406
407static inline unsigned int
408__ixp4xx_ioread16(const void __iomem *addr)
409{
410 unsigned long port = (unsigned long __force)addr;
411 if (__is_io_address(port))
412 return (unsigned int)__ixp4xx_inw(port & PIO_MASK);
413 else
414#ifndef CONFIG_IXP4XX_INDIRECT_PCI
415 return le16_to_cpu(__raw_readw((u32)port));
416#else
417 return (unsigned int)__ixp4xx_readw(addr);
418#endif
419}
420
421static inline void
422__ixp4xx_ioread16_rep(const void __iomem *addr, void *vaddr, u32 count)
423{
424 unsigned long port = (unsigned long __force)addr;
425 if (__is_io_address(port))
426 __ixp4xx_insw(port & PIO_MASK, vaddr, count);
427 else
428#ifndef CONFIG_IXP4XX_INDIRECT_PCI
429 __raw_readsw(addr, vaddr, count);
430#else
431 __ixp4xx_readsw(addr, vaddr, count);
432#endif
433}
434
435static inline unsigned int
436__ixp4xx_ioread32(const void __iomem *addr)
437{
438 unsigned long port = (unsigned long __force)addr;
439 if (__is_io_address(port))
440 return (unsigned int)__ixp4xx_inl(port & PIO_MASK);
441 else {
442#ifndef CONFIG_IXP4XX_INDIRECT_PCI
443 return le32_to_cpu((__force __le32)__raw_readl(addr));
444#else
445 return (unsigned int)__ixp4xx_readl(addr);
446#endif
447 }
448}
449
450static inline void
451__ixp4xx_ioread32_rep(const void __iomem *addr, void *vaddr, u32 count)
452{
453 unsigned long port = (unsigned long __force)addr;
454 if (__is_io_address(port))
455 __ixp4xx_insl(port & PIO_MASK, vaddr, count);
456 else
457#ifndef CONFIG_IXP4XX_INDIRECT_PCI
458 __raw_readsl(addr, vaddr, count);
459#else
460 __ixp4xx_readsl(addr, vaddr, count);
461#endif
462}
463
464static inline void
465__ixp4xx_iowrite8(u8 value, void __iomem *addr)
466{
467 unsigned long port = (unsigned long __force)addr;
468 if (__is_io_address(port))
469 __ixp4xx_outb(value, port & PIO_MASK);
470 else
471#ifndef CONFIG_IXP4XX_INDIRECT_PCI
472 __raw_writeb(value, port);
473#else
474 __ixp4xx_writeb(value, addr);
475#endif
476}
477
478static inline void
479__ixp4xx_iowrite8_rep(void __iomem *addr, const void *vaddr, u32 count)
480{
481 unsigned long port = (unsigned long __force)addr;
482 if (__is_io_address(port))
483 __ixp4xx_outsb(port & PIO_MASK, vaddr, count);
484 else
485#ifndef CONFIG_IXP4XX_INDIRECT_PCI
486 __raw_writesb(addr, vaddr, count);
487#else
488 __ixp4xx_writesb(addr, vaddr, count);
489#endif
490}
491
492static inline void
493__ixp4xx_iowrite16(u16 value, void __iomem *addr)
494{
495 unsigned long port = (unsigned long __force)addr;
496 if (__is_io_address(port))
497 __ixp4xx_outw(value, port & PIO_MASK);
498 else
499#ifndef CONFIG_IXP4XX_INDIRECT_PCI
500 __raw_writew(cpu_to_le16(value), addr);
501#else
502 __ixp4xx_writew(value, addr);
503#endif
504}
505
506static inline void
507__ixp4xx_iowrite16_rep(void __iomem *addr, const void *vaddr, u32 count)
508{
509 unsigned long port = (unsigned long __force)addr;
510 if (__is_io_address(port))
511 __ixp4xx_outsw(port & PIO_MASK, vaddr, count);
512 else
513#ifndef CONFIG_IXP4XX_INDIRECT_PCI
514 __raw_writesw(addr, vaddr, count);
515#else
516 __ixp4xx_writesw(addr, vaddr, count);
517#endif
518}
519
520static inline void
521__ixp4xx_iowrite32(u32 value, void __iomem *addr)
522{
523 unsigned long port = (unsigned long __force)addr;
524 if (__is_io_address(port))
525 __ixp4xx_outl(value, port & PIO_MASK);
526 else
527#ifndef CONFIG_IXP4XX_INDIRECT_PCI
528 __raw_writel((u32 __force)cpu_to_le32(value), addr);
529#else
530 __ixp4xx_writel(value, addr);
531#endif
532}
533
534static inline void
535__ixp4xx_iowrite32_rep(void __iomem *addr, const void *vaddr, u32 count)
536{
537 unsigned long port = (unsigned long __force)addr;
538 if (__is_io_address(port))
539 __ixp4xx_outsl(port & PIO_MASK, vaddr, count);
540 else
541#ifndef CONFIG_IXP4XX_INDIRECT_PCI
542 __raw_writesl(addr, vaddr, count);
543#else
544 __ixp4xx_writesl(addr, vaddr, count);
545#endif
546}
547
548#define ioread8(p) __ixp4xx_ioread8(p)
549#define ioread16(p) __ixp4xx_ioread16(p)
550#define ioread32(p) __ixp4xx_ioread32(p)
551
552#define ioread8_rep(p, v, c) __ixp4xx_ioread8_rep(p, v, c)
553#define ioread16_rep(p, v, c) __ixp4xx_ioread16_rep(p, v, c)
554#define ioread32_rep(p, v, c) __ixp4xx_ioread32_rep(p, v, c)
555
556#define iowrite8(v,p) __ixp4xx_iowrite8(v,p)
557#define iowrite16(v,p) __ixp4xx_iowrite16(v,p)
558#define iowrite32(v,p) __ixp4xx_iowrite32(v,p)
559
560#define iowrite8_rep(p, v, c) __ixp4xx_iowrite8_rep(p, v, c)
561#define iowrite16_rep(p, v, c) __ixp4xx_iowrite16_rep(p, v, c)
562#define iowrite32_rep(p, v, c) __ixp4xx_iowrite32_rep(p, v, c)
563
564#define ioport_map(port, nr) ((void __iomem*)(port + PIO_OFFSET))
565#define ioport_unmap(addr)
566#endif // !CONFIG_PCI
567
568#endif // __ASM_ARM_ARCH_IO_H
569
diff --git a/arch/arm/mach-ixp4xx/include/mach/irqs.h b/arch/arm/mach-ixp4xx/include/mach/irqs.h
new file mode 100644
index 000000000000..f4d74de1566a
--- /dev/null
+++ b/arch/arm/mach-ixp4xx/include/mach/irqs.h
@@ -0,0 +1,138 @@
1/*
2 * arch/arm/mach-ixp4xx/include/mach/irqs.h
3 *
4 * IRQ definitions for IXP4XX based systems
5 *
6 * Copyright (C) 2002 Intel Corporation.
7 * Copyright (C) 2003 MontaVista Software, Inc.
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12 *
13 */
14
15#ifndef _ARCH_IXP4XX_IRQS_H_
16#define _ARCH_IXP4XX_IRQS_H_
17
18
19#define IRQ_IXP4XX_NPEA 0
20#define IRQ_IXP4XX_NPEB 1
21#define IRQ_IXP4XX_NPEC 2
22#define IRQ_IXP4XX_QM1 3
23#define IRQ_IXP4XX_QM2 4
24#define IRQ_IXP4XX_TIMER1 5
25#define IRQ_IXP4XX_GPIO0 6
26#define IRQ_IXP4XX_GPIO1 7
27#define IRQ_IXP4XX_PCI_INT 8
28#define IRQ_IXP4XX_PCI_DMA1 9
29#define IRQ_IXP4XX_PCI_DMA2 10
30#define IRQ_IXP4XX_TIMER2 11
31#define IRQ_IXP4XX_USB 12
32#define IRQ_IXP4XX_UART2 13
33#define IRQ_IXP4XX_TIMESTAMP 14
34#define IRQ_IXP4XX_UART1 15
35#define IRQ_IXP4XX_WDOG 16
36#define IRQ_IXP4XX_AHB_PMU 17
37#define IRQ_IXP4XX_XSCALE_PMU 18
38#define IRQ_IXP4XX_GPIO2 19
39#define IRQ_IXP4XX_GPIO3 20
40#define IRQ_IXP4XX_GPIO4 21
41#define IRQ_IXP4XX_GPIO5 22
42#define IRQ_IXP4XX_GPIO6 23
43#define IRQ_IXP4XX_GPIO7 24
44#define IRQ_IXP4XX_GPIO8 25
45#define IRQ_IXP4XX_GPIO9 26
46#define IRQ_IXP4XX_GPIO10 27
47#define IRQ_IXP4XX_GPIO11 28
48#define IRQ_IXP4XX_GPIO12 29
49#define IRQ_IXP4XX_SW_INT1 30
50#define IRQ_IXP4XX_SW_INT2 31
51#define IRQ_IXP4XX_USB_HOST 32
52#define IRQ_IXP4XX_I2C 33
53#define IRQ_IXP4XX_SSP 34
54#define IRQ_IXP4XX_TSYNC 35
55#define IRQ_IXP4XX_EAU_DONE 36
56#define IRQ_IXP4XX_SHA_DONE 37
57#define IRQ_IXP4XX_SWCP_PE 58
58#define IRQ_IXP4XX_QM_PE 60
59#define IRQ_IXP4XX_MCU_ECC 61
60#define IRQ_IXP4XX_EXP_PE 62
61
62/*
63 * Only first 32 sources are valid if running on IXP42x systems
64 */
65#if defined(CONFIG_CPU_IXP46X) || defined(CONFIG_CPU_IXP43X)
66#define NR_IRQS 64
67#else
68#define NR_IRQS 32
69#endif
70
71#define XSCALE_PMU_IRQ (IRQ_IXP4XX_XSCALE_PMU)
72
73/*
74 * IXDP425 board IRQs
75 */
76#define IRQ_IXDP425_PCI_INTA IRQ_IXP4XX_GPIO11
77#define IRQ_IXDP425_PCI_INTB IRQ_IXP4XX_GPIO10
78#define IRQ_IXDP425_PCI_INTC IRQ_IXP4XX_GPIO9
79#define IRQ_IXDP425_PCI_INTD IRQ_IXP4XX_GPIO8
80
81/*
82 * Gateworks Avila board IRQs
83 */
84#define IRQ_AVILA_PCI_INTA IRQ_IXP4XX_GPIO11
85#define IRQ_AVILA_PCI_INTB IRQ_IXP4XX_GPIO10
86#define IRQ_AVILA_PCI_INTC IRQ_IXP4XX_GPIO9
87#define IRQ_AVILA_PCI_INTD IRQ_IXP4XX_GPIO8
88
89
90/*
91 * PrPMC1100 Board IRQs
92 */
93#define IRQ_PRPMC1100_PCI_INTA IRQ_IXP4XX_GPIO11
94#define IRQ_PRPMC1100_PCI_INTB IRQ_IXP4XX_GPIO10
95#define IRQ_PRPMC1100_PCI_INTC IRQ_IXP4XX_GPIO9
96#define IRQ_PRPMC1100_PCI_INTD IRQ_IXP4XX_GPIO8
97
98/*
99 * ADI Coyote Board IRQs
100 */
101#define IRQ_COYOTE_PCI_SLOT0 IRQ_IXP4XX_GPIO6
102#define IRQ_COYOTE_PCI_SLOT1 IRQ_IXP4XX_GPIO11
103#define IRQ_COYOTE_IDE IRQ_IXP4XX_GPIO5
104
105/*
106 * NSLU2 board IRQs
107 */
108#define IRQ_NSLU2_PCI_INTA IRQ_IXP4XX_GPIO11
109#define IRQ_NSLU2_PCI_INTB IRQ_IXP4XX_GPIO10
110#define IRQ_NSLU2_PCI_INTC IRQ_IXP4XX_GPIO9
111
112/*
113 * NAS100D board IRQs
114 */
115#define IRQ_NAS100D_PCI_INTA IRQ_IXP4XX_GPIO11
116#define IRQ_NAS100D_PCI_INTB IRQ_IXP4XX_GPIO10
117#define IRQ_NAS100D_PCI_INTC IRQ_IXP4XX_GPIO9
118#define IRQ_NAS100D_PCI_INTD IRQ_IXP4XX_GPIO8
119#define IRQ_NAS100D_PCI_INTE IRQ_IXP4XX_GPIO7
120
121/*
122 * D-Link DSM-G600 RevA board IRQs
123 */
124#define IRQ_DSMG600_PCI_INTA IRQ_IXP4XX_GPIO11
125#define IRQ_DSMG600_PCI_INTB IRQ_IXP4XX_GPIO10
126#define IRQ_DSMG600_PCI_INTC IRQ_IXP4XX_GPIO9
127#define IRQ_DSMG600_PCI_INTD IRQ_IXP4XX_GPIO8
128#define IRQ_DSMG600_PCI_INTE IRQ_IXP4XX_GPIO7
129#define IRQ_DSMG600_PCI_INTF IRQ_IXP4XX_GPIO6
130
131/*
132 * Freecom FSG-3 Board IRQs
133 */
134#define IRQ_FSG_PCI_INTA IRQ_IXP4XX_GPIO6
135#define IRQ_FSG_PCI_INTB IRQ_IXP4XX_GPIO7
136#define IRQ_FSG_PCI_INTC IRQ_IXP4XX_GPIO5
137
138#endif
diff --git a/arch/arm/mach-ixp4xx/include/mach/ixdp425.h b/arch/arm/mach-ixp4xx/include/mach/ixdp425.h
new file mode 100644
index 000000000000..2cafe65ebfee
--- /dev/null
+++ b/arch/arm/mach-ixp4xx/include/mach/ixdp425.h
@@ -0,0 +1,39 @@
1/*
2 * arch/arm/mach-ixp4xx/include/mach/ixdp425.h
3 *
4 * IXDP425 platform specific definitions
5 *
6 * Author: Deepak Saxena <dsaxena@plexity.net>
7 *
8 * Copyright 2004 (c) MontaVista, Software, Inc.
9 *
10 * This file is licensed under the terms of the GNU General Public
11 * License version 2. This program is licensed "as is" without any
12 * warranty of any kind, whether express or implied.
13 */
14
15#ifndef __ASM_ARCH_HARDWARE_H__
16#error "Do not include this directly, instead #include <mach/hardware.h>"
17#endif
18
19#define IXDP425_SDA_PIN 7
20#define IXDP425_SCL_PIN 6
21
22/*
23 * IXDP425 PCI IRQs
24 */
25#define IXDP425_PCI_MAX_DEV 4
26#define IXDP425_PCI_IRQ_LINES 4
27
28
29/* PCI controller GPIO to IRQ pin mappings */
30#define IXDP425_PCI_INTA_PIN 11
31#define IXDP425_PCI_INTB_PIN 10
32#define IXDP425_PCI_INTC_PIN 9
33#define IXDP425_PCI_INTD_PIN 8
34
35/* NAND Flash pins */
36#define IXDP425_NAND_NCE_PIN 12
37
38#define IXDP425_NAND_CMD_BYTE 0x01
39#define IXDP425_NAND_ADDR_BYTE 0x02
diff --git a/arch/arm/mach-ixp4xx/include/mach/ixp4xx-regs.h b/arch/arm/mach-ixp4xx/include/mach/ixp4xx-regs.h
new file mode 100644
index 000000000000..ad9c888dd850
--- /dev/null
+++ b/arch/arm/mach-ixp4xx/include/mach/ixp4xx-regs.h
@@ -0,0 +1,638 @@
1/*
2 * arch/arm/mach-ixp4xx/include/mach/ixp4xx-regs.h
3 *
4 * Register definitions for IXP4xx chipset. This file contains
5 * register location and bit definitions only. Platform specific
6 * definitions and helper function declarations are in platform.h
7 * and machine-name.h.
8 *
9 * Copyright (C) 2002 Intel Corporation.
10 * Copyright (C) 2003-2004 MontaVista Software, Inc.
11 *
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License version 2 as
14 * published by the Free Software Foundation.
15 *
16 */
17
18#ifndef _ASM_ARM_IXP4XX_H_
19#define _ASM_ARM_IXP4XX_H_
20
21/*
22 * IXP4xx Linux Memory Map:
23 *
24 * Phy Size Virt Description
25 * =========================================================================
26 *
27 * 0x00000000 0x10000000(max) PAGE_OFFSET System RAM
28 *
29 * 0x48000000 0x04000000 ioremap'd PCI Memory Space
30 *
31 * 0x50000000 0x10000000 ioremap'd EXP BUS
32 *
33 * 0x6000000 0x00004000 ioremap'd QMgr
34 *
35 * 0xC0000000 0x00001000 0xffbff000 PCI CFG
36 *
37 * 0xC4000000 0x00001000 0xffbfe000 EXP CFG
38 *
39 * 0xC8000000 0x00013000 0xffbeb000 On-Chip Peripherals
40 */
41
42/*
43 * Queue Manager
44 */
45#define IXP4XX_QMGR_BASE_PHYS (0x60000000)
46#define IXP4XX_QMGR_REGION_SIZE (0x00004000)
47
48/*
49 * Expansion BUS Configuration registers
50 */
51#define IXP4XX_EXP_CFG_BASE_PHYS (0xC4000000)
52#define IXP4XX_EXP_CFG_BASE_VIRT (0xFFBFE000)
53#define IXP4XX_EXP_CFG_REGION_SIZE (0x00001000)
54
55/*
56 * PCI Config registers
57 */
58#define IXP4XX_PCI_CFG_BASE_PHYS (0xC0000000)
59#define IXP4XX_PCI_CFG_BASE_VIRT (0xFFBFF000)
60#define IXP4XX_PCI_CFG_REGION_SIZE (0x00001000)
61
62/*
63 * Peripheral space
64 */
65#define IXP4XX_PERIPHERAL_BASE_PHYS (0xC8000000)
66#define IXP4XX_PERIPHERAL_BASE_VIRT (0xFFBEB000)
67#define IXP4XX_PERIPHERAL_REGION_SIZE (0x00013000)
68
69/*
70 * Debug UART
71 *
72 * This is basically a remap of UART1 into a region that is section
73 * aligned so that it * can be used with the low-level debug code.
74 */
75#define IXP4XX_DEBUG_UART_BASE_PHYS (0xC8000000)
76#define IXP4XX_DEBUG_UART_BASE_VIRT (0xffb00000)
77#define IXP4XX_DEBUG_UART_REGION_SIZE (0x00001000)
78
79#define IXP4XX_EXP_CS0_OFFSET 0x00
80#define IXP4XX_EXP_CS1_OFFSET 0x04
81#define IXP4XX_EXP_CS2_OFFSET 0x08
82#define IXP4XX_EXP_CS3_OFFSET 0x0C
83#define IXP4XX_EXP_CS4_OFFSET 0x10
84#define IXP4XX_EXP_CS5_OFFSET 0x14
85#define IXP4XX_EXP_CS6_OFFSET 0x18
86#define IXP4XX_EXP_CS7_OFFSET 0x1C
87#define IXP4XX_EXP_CFG0_OFFSET 0x20
88#define IXP4XX_EXP_CFG1_OFFSET 0x24
89#define IXP4XX_EXP_CFG2_OFFSET 0x28
90#define IXP4XX_EXP_CFG3_OFFSET 0x2C
91
92/*
93 * Expansion Bus Controller registers.
94 */
95#define IXP4XX_EXP_REG(x) ((volatile u32 *)(IXP4XX_EXP_CFG_BASE_VIRT+(x)))
96
97#define IXP4XX_EXP_CS0 IXP4XX_EXP_REG(IXP4XX_EXP_CS0_OFFSET)
98#define IXP4XX_EXP_CS1 IXP4XX_EXP_REG(IXP4XX_EXP_CS1_OFFSET)
99#define IXP4XX_EXP_CS2 IXP4XX_EXP_REG(IXP4XX_EXP_CS2_OFFSET)
100#define IXP4XX_EXP_CS3 IXP4XX_EXP_REG(IXP4XX_EXP_CS3_OFFSET)
101#define IXP4XX_EXP_CS4 IXP4XX_EXP_REG(IXP4XX_EXP_CS4_OFFSET)
102#define IXP4XX_EXP_CS5 IXP4XX_EXP_REG(IXP4XX_EXP_CS5_OFFSET)
103#define IXP4XX_EXP_CS6 IXP4XX_EXP_REG(IXP4XX_EXP_CS6_OFFSET)
104#define IXP4XX_EXP_CS7 IXP4XX_EXP_REG(IXP4XX_EXP_CS7_OFFSET)
105
106#define IXP4XX_EXP_CFG0 IXP4XX_EXP_REG(IXP4XX_EXP_CFG0_OFFSET)
107#define IXP4XX_EXP_CFG1 IXP4XX_EXP_REG(IXP4XX_EXP_CFG1_OFFSET)
108#define IXP4XX_EXP_CFG2 IXP4XX_EXP_REG(IXP4XX_EXP_CFG2_OFFSET)
109#define IXP4XX_EXP_CFG3 IXP4XX_EXP_REG(IXP4XX_EXP_CFG3_OFFSET)
110
111
112/*
113 * Peripheral Space Register Region Base Addresses
114 */
115#define IXP4XX_UART1_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0x0000)
116#define IXP4XX_UART2_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0x1000)
117#define IXP4XX_PMU_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0x2000)
118#define IXP4XX_INTC_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0x3000)
119#define IXP4XX_GPIO_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0x4000)
120#define IXP4XX_TIMER_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0x5000)
121#define IXP4XX_NPEA_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0x6000)
122#define IXP4XX_NPEB_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0x7000)
123#define IXP4XX_NPEC_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0x8000)
124#define IXP4XX_EthB_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0x9000)
125#define IXP4XX_EthC_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0xA000)
126#define IXP4XX_USB_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0xB000)
127/* ixp46X only */
128#define IXP4XX_EthA_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0xC000)
129#define IXP4XX_EthB1_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0xD000)
130#define IXP4XX_EthB2_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0xE000)
131#define IXP4XX_EthB3_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0xF000)
132#define IXP4XX_TIMESYNC_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0x10000)
133#define IXP4XX_I2C_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0x11000)
134#define IXP4XX_SSP_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0x12000)
135
136
137#define IXP4XX_UART1_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x0000)
138#define IXP4XX_UART2_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x1000)
139#define IXP4XX_PMU_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x2000)
140#define IXP4XX_INTC_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x3000)
141#define IXP4XX_GPIO_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x4000)
142#define IXP4XX_TIMER_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x5000)
143#define IXP4XX_NPEA_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x6000)
144#define IXP4XX_NPEB_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x7000)
145#define IXP4XX_NPEC_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x8000)
146#define IXP4XX_EthB_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x9000)
147#define IXP4XX_EthC_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0xA000)
148#define IXP4XX_USB_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0xB000)
149/* ixp46X only */
150#define IXP4XX_EthA_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0xC000)
151#define IXP4XX_EthB1_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0xD000)
152#define IXP4XX_EthB2_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0xE000)
153#define IXP4XX_EthB3_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0xF000)
154#define IXP4XX_TIMESYNC_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x10000)
155#define IXP4XX_I2C_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x11000)
156#define IXP4XX_SSP_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x12000)
157
158/*
159 * Constants to make it easy to access Interrupt Controller registers
160 */
161#define IXP4XX_ICPR_OFFSET 0x00 /* Interrupt Status */
162#define IXP4XX_ICMR_OFFSET 0x04 /* Interrupt Enable */
163#define IXP4XX_ICLR_OFFSET 0x08 /* Interrupt IRQ/FIQ Select */
164#define IXP4XX_ICIP_OFFSET 0x0C /* IRQ Status */
165#define IXP4XX_ICFP_OFFSET 0x10 /* FIQ Status */
166#define IXP4XX_ICHR_OFFSET 0x14 /* Interrupt Priority */
167#define IXP4XX_ICIH_OFFSET 0x18 /* IRQ Highest Pri Int */
168#define IXP4XX_ICFH_OFFSET 0x1C /* FIQ Highest Pri Int */
169
170/*
171 * IXP465-only
172 */
173#define IXP4XX_ICPR2_OFFSET 0x20 /* Interrupt Status 2 */
174#define IXP4XX_ICMR2_OFFSET 0x24 /* Interrupt Enable 2 */
175#define IXP4XX_ICLR2_OFFSET 0x28 /* Interrupt IRQ/FIQ Select 2 */
176#define IXP4XX_ICIP2_OFFSET 0x2C /* IRQ Status */
177#define IXP4XX_ICFP2_OFFSET 0x30 /* FIQ Status */
178#define IXP4XX_ICEEN_OFFSET 0x34 /* Error High Pri Enable */
179
180
181/*
182 * Interrupt Controller Register Definitions.
183 */
184
185#define IXP4XX_INTC_REG(x) ((volatile u32 *)(IXP4XX_INTC_BASE_VIRT+(x)))
186
187#define IXP4XX_ICPR IXP4XX_INTC_REG(IXP4XX_ICPR_OFFSET)
188#define IXP4XX_ICMR IXP4XX_INTC_REG(IXP4XX_ICMR_OFFSET)
189#define IXP4XX_ICLR IXP4XX_INTC_REG(IXP4XX_ICLR_OFFSET)
190#define IXP4XX_ICIP IXP4XX_INTC_REG(IXP4XX_ICIP_OFFSET)
191#define IXP4XX_ICFP IXP4XX_INTC_REG(IXP4XX_ICFP_OFFSET)
192#define IXP4XX_ICHR IXP4XX_INTC_REG(IXP4XX_ICHR_OFFSET)
193#define IXP4XX_ICIH IXP4XX_INTC_REG(IXP4XX_ICIH_OFFSET)
194#define IXP4XX_ICFH IXP4XX_INTC_REG(IXP4XX_ICFH_OFFSET)
195#define IXP4XX_ICPR2 IXP4XX_INTC_REG(IXP4XX_ICPR2_OFFSET)
196#define IXP4XX_ICMR2 IXP4XX_INTC_REG(IXP4XX_ICMR2_OFFSET)
197#define IXP4XX_ICLR2 IXP4XX_INTC_REG(IXP4XX_ICLR2_OFFSET)
198#define IXP4XX_ICIP2 IXP4XX_INTC_REG(IXP4XX_ICIP2_OFFSET)
199#define IXP4XX_ICFP2 IXP4XX_INTC_REG(IXP4XX_ICFP2_OFFSET)
200#define IXP4XX_ICEEN IXP4XX_INTC_REG(IXP4XX_ICEEN_OFFSET)
201
202/*
203 * Constants to make it easy to access GPIO registers
204 */
205#define IXP4XX_GPIO_GPOUTR_OFFSET 0x00
206#define IXP4XX_GPIO_GPOER_OFFSET 0x04
207#define IXP4XX_GPIO_GPINR_OFFSET 0x08
208#define IXP4XX_GPIO_GPISR_OFFSET 0x0C
209#define IXP4XX_GPIO_GPIT1R_OFFSET 0x10
210#define IXP4XX_GPIO_GPIT2R_OFFSET 0x14
211#define IXP4XX_GPIO_GPCLKR_OFFSET 0x18
212#define IXP4XX_GPIO_GPDBSELR_OFFSET 0x1C
213
214/*
215 * GPIO Register Definitions.
216 * [Only perform 32bit reads/writes]
217 */
218#define IXP4XX_GPIO_REG(x) ((volatile u32 *)(IXP4XX_GPIO_BASE_VIRT+(x)))
219
220#define IXP4XX_GPIO_GPOUTR IXP4XX_GPIO_REG(IXP4XX_GPIO_GPOUTR_OFFSET)
221#define IXP4XX_GPIO_GPOER IXP4XX_GPIO_REG(IXP4XX_GPIO_GPOER_OFFSET)
222#define IXP4XX_GPIO_GPINR IXP4XX_GPIO_REG(IXP4XX_GPIO_GPINR_OFFSET)
223#define IXP4XX_GPIO_GPISR IXP4XX_GPIO_REG(IXP4XX_GPIO_GPISR_OFFSET)
224#define IXP4XX_GPIO_GPIT1R IXP4XX_GPIO_REG(IXP4XX_GPIO_GPIT1R_OFFSET)
225#define IXP4XX_GPIO_GPIT2R IXP4XX_GPIO_REG(IXP4XX_GPIO_GPIT2R_OFFSET)
226#define IXP4XX_GPIO_GPCLKR IXP4XX_GPIO_REG(IXP4XX_GPIO_GPCLKR_OFFSET)
227#define IXP4XX_GPIO_GPDBSELR IXP4XX_GPIO_REG(IXP4XX_GPIO_GPDBSELR_OFFSET)
228
229/*
230 * GPIO register bit definitions
231 */
232
233/* Interrupt styles
234 */
235#define IXP4XX_GPIO_STYLE_ACTIVE_HIGH 0x0
236#define IXP4XX_GPIO_STYLE_ACTIVE_LOW 0x1
237#define IXP4XX_GPIO_STYLE_RISING_EDGE 0x2
238#define IXP4XX_GPIO_STYLE_FALLING_EDGE 0x3
239#define IXP4XX_GPIO_STYLE_TRANSITIONAL 0x4
240
241/*
242 * Mask used to clear interrupt styles
243 */
244#define IXP4XX_GPIO_STYLE_CLEAR 0x7
245#define IXP4XX_GPIO_STYLE_SIZE 3
246
247/*
248 * Constants to make it easy to access Timer Control/Status registers
249 */
250#define IXP4XX_OSTS_OFFSET 0x00 /* Continious TimeStamp */
251#define IXP4XX_OST1_OFFSET 0x04 /* Timer 1 Timestamp */
252#define IXP4XX_OSRT1_OFFSET 0x08 /* Timer 1 Reload */
253#define IXP4XX_OST2_OFFSET 0x0C /* Timer 2 Timestamp */
254#define IXP4XX_OSRT2_OFFSET 0x10 /* Timer 2 Reload */
255#define IXP4XX_OSWT_OFFSET 0x14 /* Watchdog Timer */
256#define IXP4XX_OSWE_OFFSET 0x18 /* Watchdog Enable */
257#define IXP4XX_OSWK_OFFSET 0x1C /* Watchdog Key */
258#define IXP4XX_OSST_OFFSET 0x20 /* Timer Status */
259
260/*
261 * Operating System Timer Register Definitions.
262 */
263
264#define IXP4XX_TIMER_REG(x) ((volatile u32 *)(IXP4XX_TIMER_BASE_VIRT+(x)))
265
266#define IXP4XX_OSTS IXP4XX_TIMER_REG(IXP4XX_OSTS_OFFSET)
267#define IXP4XX_OST1 IXP4XX_TIMER_REG(IXP4XX_OST1_OFFSET)
268#define IXP4XX_OSRT1 IXP4XX_TIMER_REG(IXP4XX_OSRT1_OFFSET)
269#define IXP4XX_OST2 IXP4XX_TIMER_REG(IXP4XX_OST2_OFFSET)
270#define IXP4XX_OSRT2 IXP4XX_TIMER_REG(IXP4XX_OSRT2_OFFSET)
271#define IXP4XX_OSWT IXP4XX_TIMER_REG(IXP4XX_OSWT_OFFSET)
272#define IXP4XX_OSWE IXP4XX_TIMER_REG(IXP4XX_OSWE_OFFSET)
273#define IXP4XX_OSWK IXP4XX_TIMER_REG(IXP4XX_OSWK_OFFSET)
274#define IXP4XX_OSST IXP4XX_TIMER_REG(IXP4XX_OSST_OFFSET)
275
276/*
277 * Timer register values and bit definitions
278 */
279#define IXP4XX_OST_ENABLE 0x00000001
280#define IXP4XX_OST_ONE_SHOT 0x00000002
281/* Low order bits of reload value ignored */
282#define IXP4XX_OST_RELOAD_MASK 0x00000003
283#define IXP4XX_OST_DISABLED 0x00000000
284#define IXP4XX_OSST_TIMER_1_PEND 0x00000001
285#define IXP4XX_OSST_TIMER_2_PEND 0x00000002
286#define IXP4XX_OSST_TIMER_TS_PEND 0x00000004
287#define IXP4XX_OSST_TIMER_WDOG_PEND 0x00000008
288#define IXP4XX_OSST_TIMER_WARM_RESET 0x00000010
289
290#define IXP4XX_WDT_KEY 0x0000482E
291
292#define IXP4XX_WDT_RESET_ENABLE 0x00000001
293#define IXP4XX_WDT_IRQ_ENABLE 0x00000002
294#define IXP4XX_WDT_COUNT_ENABLE 0x00000004
295
296
297/*
298 * Constants to make it easy to access PCI Control/Status registers
299 */
300#define PCI_NP_AD_OFFSET 0x00
301#define PCI_NP_CBE_OFFSET 0x04
302#define PCI_NP_WDATA_OFFSET 0x08
303#define PCI_NP_RDATA_OFFSET 0x0c
304#define PCI_CRP_AD_CBE_OFFSET 0x10
305#define PCI_CRP_WDATA_OFFSET 0x14
306#define PCI_CRP_RDATA_OFFSET 0x18
307#define PCI_CSR_OFFSET 0x1c
308#define PCI_ISR_OFFSET 0x20
309#define PCI_INTEN_OFFSET 0x24
310#define PCI_DMACTRL_OFFSET 0x28
311#define PCI_AHBMEMBASE_OFFSET 0x2c
312#define PCI_AHBIOBASE_OFFSET 0x30
313#define PCI_PCIMEMBASE_OFFSET 0x34
314#define PCI_AHBDOORBELL_OFFSET 0x38
315#define PCI_PCIDOORBELL_OFFSET 0x3C
316#define PCI_ATPDMA0_AHBADDR_OFFSET 0x40
317#define PCI_ATPDMA0_PCIADDR_OFFSET 0x44
318#define PCI_ATPDMA0_LENADDR_OFFSET 0x48
319#define PCI_ATPDMA1_AHBADDR_OFFSET 0x4C
320#define PCI_ATPDMA1_PCIADDR_OFFSET 0x50
321#define PCI_ATPDMA1_LENADDR_OFFSET 0x54
322
323/*
324 * PCI Control/Status Registers
325 */
326#define IXP4XX_PCI_CSR(x) ((volatile u32 *)(IXP4XX_PCI_CFG_BASE_VIRT+(x)))
327
328#define PCI_NP_AD IXP4XX_PCI_CSR(PCI_NP_AD_OFFSET)
329#define PCI_NP_CBE IXP4XX_PCI_CSR(PCI_NP_CBE_OFFSET)
330#define PCI_NP_WDATA IXP4XX_PCI_CSR(PCI_NP_WDATA_OFFSET)
331#define PCI_NP_RDATA IXP4XX_PCI_CSR(PCI_NP_RDATA_OFFSET)
332#define PCI_CRP_AD_CBE IXP4XX_PCI_CSR(PCI_CRP_AD_CBE_OFFSET)
333#define PCI_CRP_WDATA IXP4XX_PCI_CSR(PCI_CRP_WDATA_OFFSET)
334#define PCI_CRP_RDATA IXP4XX_PCI_CSR(PCI_CRP_RDATA_OFFSET)
335#define PCI_CSR IXP4XX_PCI_CSR(PCI_CSR_OFFSET)
336#define PCI_ISR IXP4XX_PCI_CSR(PCI_ISR_OFFSET)
337#define PCI_INTEN IXP4XX_PCI_CSR(PCI_INTEN_OFFSET)
338#define PCI_DMACTRL IXP4XX_PCI_CSR(PCI_DMACTRL_OFFSET)
339#define PCI_AHBMEMBASE IXP4XX_PCI_CSR(PCI_AHBMEMBASE_OFFSET)
340#define PCI_AHBIOBASE IXP4XX_PCI_CSR(PCI_AHBIOBASE_OFFSET)
341#define PCI_PCIMEMBASE IXP4XX_PCI_CSR(PCI_PCIMEMBASE_OFFSET)
342#define PCI_AHBDOORBELL IXP4XX_PCI_CSR(PCI_AHBDOORBELL_OFFSET)
343#define PCI_PCIDOORBELL IXP4XX_PCI_CSR(PCI_PCIDOORBELL_OFFSET)
344#define PCI_ATPDMA0_AHBADDR IXP4XX_PCI_CSR(PCI_ATPDMA0_AHBADDR_OFFSET)
345#define PCI_ATPDMA0_PCIADDR IXP4XX_PCI_CSR(PCI_ATPDMA0_PCIADDR_OFFSET)
346#define PCI_ATPDMA0_LENADDR IXP4XX_PCI_CSR(PCI_ATPDMA0_LENADDR_OFFSET)
347#define PCI_ATPDMA1_AHBADDR IXP4XX_PCI_CSR(PCI_ATPDMA1_AHBADDR_OFFSET)
348#define PCI_ATPDMA1_PCIADDR IXP4XX_PCI_CSR(PCI_ATPDMA1_PCIADDR_OFFSET)
349#define PCI_ATPDMA1_LENADDR IXP4XX_PCI_CSR(PCI_ATPDMA1_LENADDR_OFFSET)
350
351/*
352 * PCI register values and bit definitions
353 */
354
355/* CSR bit definitions */
356#define PCI_CSR_HOST 0x00000001
357#define PCI_CSR_ARBEN 0x00000002
358#define PCI_CSR_ADS 0x00000004
359#define PCI_CSR_PDS 0x00000008
360#define PCI_CSR_ABE 0x00000010
361#define PCI_CSR_DBT 0x00000020
362#define PCI_CSR_ASE 0x00000100
363#define PCI_CSR_IC 0x00008000
364
365/* ISR (Interrupt status) Register bit definitions */
366#define PCI_ISR_PSE 0x00000001
367#define PCI_ISR_PFE 0x00000002
368#define PCI_ISR_PPE 0x00000004
369#define PCI_ISR_AHBE 0x00000008
370#define PCI_ISR_APDC 0x00000010
371#define PCI_ISR_PADC 0x00000020
372#define PCI_ISR_ADB 0x00000040
373#define PCI_ISR_PDB 0x00000080
374
375/* INTEN (Interrupt Enable) Register bit definitions */
376#define PCI_INTEN_PSE 0x00000001
377#define PCI_INTEN_PFE 0x00000002
378#define PCI_INTEN_PPE 0x00000004
379#define PCI_INTEN_AHBE 0x00000008
380#define PCI_INTEN_APDC 0x00000010
381#define PCI_INTEN_PADC 0x00000020
382#define PCI_INTEN_ADB 0x00000040
383#define PCI_INTEN_PDB 0x00000080
384
385/*
386 * Shift value for byte enable on NP cmd/byte enable register
387 */
388#define IXP4XX_PCI_NP_CBE_BESL 4
389
390/*
391 * PCI commands supported by NP access unit
392 */
393#define NP_CMD_IOREAD 0x2
394#define NP_CMD_IOWRITE 0x3
395#define NP_CMD_CONFIGREAD 0xa
396#define NP_CMD_CONFIGWRITE 0xb
397#define NP_CMD_MEMREAD 0x6
398#define NP_CMD_MEMWRITE 0x7
399
400/*
401 * Constants for CRP access into local config space
402 */
403#define CRP_AD_CBE_BESL 20
404#define CRP_AD_CBE_WRITE 0x00010000
405
406
407/*
408 * USB Device Controller
409 *
410 * These are used by the USB gadget driver, so they don't follow the
411 * IXP4XX_ naming convetions.
412 *
413 */
414# define IXP4XX_USB_REG(x) (*((volatile u32 *)(x)))
415
416/* UDC Undocumented - Reserved1 */
417#define UDC_RES1 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0004)
418/* UDC Undocumented - Reserved2 */
419#define UDC_RES2 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0008)
420/* UDC Undocumented - Reserved3 */
421#define UDC_RES3 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x000C)
422/* UDC Control Register */
423#define UDCCR IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0000)
424/* UDC Endpoint 0 Control/Status Register */
425#define UDCCS0 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0010)
426/* UDC Endpoint 1 (IN) Control/Status Register */
427#define UDCCS1 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0014)
428/* UDC Endpoint 2 (OUT) Control/Status Register */
429#define UDCCS2 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0018)
430/* UDC Endpoint 3 (IN) Control/Status Register */
431#define UDCCS3 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x001C)
432/* UDC Endpoint 4 (OUT) Control/Status Register */
433#define UDCCS4 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0020)
434/* UDC Endpoint 5 (Interrupt) Control/Status Register */
435#define UDCCS5 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0024)
436/* UDC Endpoint 6 (IN) Control/Status Register */
437#define UDCCS6 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0028)
438/* UDC Endpoint 7 (OUT) Control/Status Register */
439#define UDCCS7 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x002C)
440/* UDC Endpoint 8 (IN) Control/Status Register */
441#define UDCCS8 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0030)
442/* UDC Endpoint 9 (OUT) Control/Status Register */
443#define UDCCS9 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0034)
444/* UDC Endpoint 10 (Interrupt) Control/Status Register */
445#define UDCCS10 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0038)
446/* UDC Endpoint 11 (IN) Control/Status Register */
447#define UDCCS11 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x003C)
448/* UDC Endpoint 12 (OUT) Control/Status Register */
449#define UDCCS12 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0040)
450/* UDC Endpoint 13 (IN) Control/Status Register */
451#define UDCCS13 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0044)
452/* UDC Endpoint 14 (OUT) Control/Status Register */
453#define UDCCS14 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0048)
454/* UDC Endpoint 15 (Interrupt) Control/Status Register */
455#define UDCCS15 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x004C)
456/* UDC Frame Number Register High */
457#define UFNRH IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0060)
458/* UDC Frame Number Register Low */
459#define UFNRL IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0064)
460/* UDC Byte Count Reg 2 */
461#define UBCR2 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0068)
462/* UDC Byte Count Reg 4 */
463#define UBCR4 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x006c)
464/* UDC Byte Count Reg 7 */
465#define UBCR7 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0070)
466/* UDC Byte Count Reg 9 */
467#define UBCR9 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0074)
468/* UDC Byte Count Reg 12 */
469#define UBCR12 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0078)
470/* UDC Byte Count Reg 14 */
471#define UBCR14 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x007c)
472/* UDC Endpoint 0 Data Register */
473#define UDDR0 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0080)
474/* UDC Endpoint 1 Data Register */
475#define UDDR1 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0100)
476/* UDC Endpoint 2 Data Register */
477#define UDDR2 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0180)
478/* UDC Endpoint 3 Data Register */
479#define UDDR3 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0200)
480/* UDC Endpoint 4 Data Register */
481#define UDDR4 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0400)
482/* UDC Endpoint 5 Data Register */
483#define UDDR5 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x00A0)
484/* UDC Endpoint 6 Data Register */
485#define UDDR6 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0600)
486/* UDC Endpoint 7 Data Register */
487#define UDDR7 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0680)
488/* UDC Endpoint 8 Data Register */
489#define UDDR8 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0700)
490/* UDC Endpoint 9 Data Register */
491#define UDDR9 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0900)
492/* UDC Endpoint 10 Data Register */
493#define UDDR10 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x00C0)
494/* UDC Endpoint 11 Data Register */
495#define UDDR11 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0B00)
496/* UDC Endpoint 12 Data Register */
497#define UDDR12 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0B80)
498/* UDC Endpoint 13 Data Register */
499#define UDDR13 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0C00)
500/* UDC Endpoint 14 Data Register */
501#define UDDR14 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0E00)
502/* UDC Endpoint 15 Data Register */
503#define UDDR15 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x00E0)
504/* UDC Interrupt Control Register 0 */
505#define UICR0 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0050)
506/* UDC Interrupt Control Register 1 */
507#define UICR1 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0054)
508/* UDC Status Interrupt Register 0 */
509#define USIR0 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0058)
510/* UDC Status Interrupt Register 1 */
511#define USIR1 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x005C)
512
513#define UDCCR_UDE (1 << 0) /* UDC enable */
514#define UDCCR_UDA (1 << 1) /* UDC active */
515#define UDCCR_RSM (1 << 2) /* Device resume */
516#define UDCCR_RESIR (1 << 3) /* Resume interrupt request */
517#define UDCCR_SUSIR (1 << 4) /* Suspend interrupt request */
518#define UDCCR_SRM (1 << 5) /* Suspend/resume interrupt mask */
519#define UDCCR_RSTIR (1 << 6) /* Reset interrupt request */
520#define UDCCR_REM (1 << 7) /* Reset interrupt mask */
521
522#define UDCCS0_OPR (1 << 0) /* OUT packet ready */
523#define UDCCS0_IPR (1 << 1) /* IN packet ready */
524#define UDCCS0_FTF (1 << 2) /* Flush Tx FIFO */
525#define UDCCS0_DRWF (1 << 3) /* Device remote wakeup feature */
526#define UDCCS0_SST (1 << 4) /* Sent stall */
527#define UDCCS0_FST (1 << 5) /* Force stall */
528#define UDCCS0_RNE (1 << 6) /* Receive FIFO no empty */
529#define UDCCS0_SA (1 << 7) /* Setup active */
530
531#define UDCCS_BI_TFS (1 << 0) /* Transmit FIFO service */
532#define UDCCS_BI_TPC (1 << 1) /* Transmit packet complete */
533#define UDCCS_BI_FTF (1 << 2) /* Flush Tx FIFO */
534#define UDCCS_BI_TUR (1 << 3) /* Transmit FIFO underrun */
535#define UDCCS_BI_SST (1 << 4) /* Sent stall */
536#define UDCCS_BI_FST (1 << 5) /* Force stall */
537#define UDCCS_BI_TSP (1 << 7) /* Transmit short packet */
538
539#define UDCCS_BO_RFS (1 << 0) /* Receive FIFO service */
540#define UDCCS_BO_RPC (1 << 1) /* Receive packet complete */
541#define UDCCS_BO_DME (1 << 3) /* DMA enable */
542#define UDCCS_BO_SST (1 << 4) /* Sent stall */
543#define UDCCS_BO_FST (1 << 5) /* Force stall */
544#define UDCCS_BO_RNE (1 << 6) /* Receive FIFO not empty */
545#define UDCCS_BO_RSP (1 << 7) /* Receive short packet */
546
547#define UDCCS_II_TFS (1 << 0) /* Transmit FIFO service */
548#define UDCCS_II_TPC (1 << 1) /* Transmit packet complete */
549#define UDCCS_II_FTF (1 << 2) /* Flush Tx FIFO */
550#define UDCCS_II_TUR (1 << 3) /* Transmit FIFO underrun */
551#define UDCCS_II_TSP (1 << 7) /* Transmit short packet */
552
553#define UDCCS_IO_RFS (1 << 0) /* Receive FIFO service */
554#define UDCCS_IO_RPC (1 << 1) /* Receive packet complete */
555#define UDCCS_IO_ROF (1 << 3) /* Receive overflow */
556#define UDCCS_IO_DME (1 << 3) /* DMA enable */
557#define UDCCS_IO_RNE (1 << 6) /* Receive FIFO not empty */
558#define UDCCS_IO_RSP (1 << 7) /* Receive short packet */
559
560#define UDCCS_INT_TFS (1 << 0) /* Transmit FIFO service */
561#define UDCCS_INT_TPC (1 << 1) /* Transmit packet complete */
562#define UDCCS_INT_FTF (1 << 2) /* Flush Tx FIFO */
563#define UDCCS_INT_TUR (1 << 3) /* Transmit FIFO underrun */
564#define UDCCS_INT_SST (1 << 4) /* Sent stall */
565#define UDCCS_INT_FST (1 << 5) /* Force stall */
566#define UDCCS_INT_TSP (1 << 7) /* Transmit short packet */
567
568#define UICR0_IM0 (1 << 0) /* Interrupt mask ep 0 */
569#define UICR0_IM1 (1 << 1) /* Interrupt mask ep 1 */
570#define UICR0_IM2 (1 << 2) /* Interrupt mask ep 2 */
571#define UICR0_IM3 (1 << 3) /* Interrupt mask ep 3 */
572#define UICR0_IM4 (1 << 4) /* Interrupt mask ep 4 */
573#define UICR0_IM5 (1 << 5) /* Interrupt mask ep 5 */
574#define UICR0_IM6 (1 << 6) /* Interrupt mask ep 6 */
575#define UICR0_IM7 (1 << 7) /* Interrupt mask ep 7 */
576
577#define UICR1_IM8 (1 << 0) /* Interrupt mask ep 8 */
578#define UICR1_IM9 (1 << 1) /* Interrupt mask ep 9 */
579#define UICR1_IM10 (1 << 2) /* Interrupt mask ep 10 */
580#define UICR1_IM11 (1 << 3) /* Interrupt mask ep 11 */
581#define UICR1_IM12 (1 << 4) /* Interrupt mask ep 12 */
582#define UICR1_IM13 (1 << 5) /* Interrupt mask ep 13 */
583#define UICR1_IM14 (1 << 6) /* Interrupt mask ep 14 */
584#define UICR1_IM15 (1 << 7) /* Interrupt mask ep 15 */
585
586#define USIR0_IR0 (1 << 0) /* Interrupt request ep 0 */
587#define USIR0_IR1 (1 << 1) /* Interrupt request ep 1 */
588#define USIR0_IR2 (1 << 2) /* Interrupt request ep 2 */
589#define USIR0_IR3 (1 << 3) /* Interrupt request ep 3 */
590#define USIR0_IR4 (1 << 4) /* Interrupt request ep 4 */
591#define USIR0_IR5 (1 << 5) /* Interrupt request ep 5 */
592#define USIR0_IR6 (1 << 6) /* Interrupt request ep 6 */
593#define USIR0_IR7 (1 << 7) /* Interrupt request ep 7 */
594
595#define USIR1_IR8 (1 << 0) /* Interrupt request ep 8 */
596#define USIR1_IR9 (1 << 1) /* Interrupt request ep 9 */
597#define USIR1_IR10 (1 << 2) /* Interrupt request ep 10 */
598#define USIR1_IR11 (1 << 3) /* Interrupt request ep 11 */
599#define USIR1_IR12 (1 << 4) /* Interrupt request ep 12 */
600#define USIR1_IR13 (1 << 5) /* Interrupt request ep 13 */
601#define USIR1_IR14 (1 << 6) /* Interrupt request ep 14 */
602#define USIR1_IR15 (1 << 7) /* Interrupt request ep 15 */
603
604#define DCMD_LENGTH 0x01fff /* length mask (max = 8K - 1) */
605
606/* "fuse" bits of IXP_EXP_CFG2 */
607#define IXP4XX_FEATURE_RCOMP (1 << 0)
608#define IXP4XX_FEATURE_USB_DEVICE (1 << 1)
609#define IXP4XX_FEATURE_HASH (1 << 2)
610#define IXP4XX_FEATURE_AES (1 << 3)
611#define IXP4XX_FEATURE_DES (1 << 4)
612#define IXP4XX_FEATURE_HDLC (1 << 5)
613#define IXP4XX_FEATURE_AAL (1 << 6)
614#define IXP4XX_FEATURE_HSS (1 << 7)
615#define IXP4XX_FEATURE_UTOPIA (1 << 8)
616#define IXP4XX_FEATURE_NPEB_ETH0 (1 << 9)
617#define IXP4XX_FEATURE_NPEC_ETH (1 << 10)
618#define IXP4XX_FEATURE_RESET_NPEA (1 << 11)
619#define IXP4XX_FEATURE_RESET_NPEB (1 << 12)
620#define IXP4XX_FEATURE_RESET_NPEC (1 << 13)
621#define IXP4XX_FEATURE_PCI (1 << 14)
622#define IXP4XX_FEATURE_ECC_TIMESYNC (1 << 15)
623#define IXP4XX_FEATURE_UTOPIA_PHY_LIMIT (3 << 16)
624#define IXP4XX_FEATURE_USB_HOST (1 << 18)
625#define IXP4XX_FEATURE_NPEA_ETH (1 << 19)
626#define IXP4XX_FEATURE_NPEB_ETH_1_TO_3 (1 << 20)
627#define IXP4XX_FEATURE_RSA (1 << 21)
628#define IXP4XX_FEATURE_XSCALE_MAX_FREQ (3 << 22)
629#define IXP4XX_FEATURE_RESERVED (0xFF << 24)
630
631#define IXP4XX_FEATURE_IXP46X_ONLY (IXP4XX_FEATURE_ECC_TIMESYNC | \
632 IXP4XX_FEATURE_USB_HOST | \
633 IXP4XX_FEATURE_NPEA_ETH | \
634 IXP4XX_FEATURE_NPEB_ETH_1_TO_3 | \
635 IXP4XX_FEATURE_RSA | \
636 IXP4XX_FEATURE_XSCALE_MAX_FREQ)
637
638#endif
diff --git a/arch/arm/mach-ixp4xx/include/mach/memory.h b/arch/arm/mach-ixp4xx/include/mach/memory.h
new file mode 100644
index 000000000000..c4d2830ac987
--- /dev/null
+++ b/arch/arm/mach-ixp4xx/include/mach/memory.h
@@ -0,0 +1,40 @@
1/*
2 * arch/arm/mach-ixp4xx/include/mach/memory.h
3 *
4 * Copyright (c) 2001-2004 MontaVista Software, Inc.
5 */
6
7#ifndef __ASM_ARCH_MEMORY_H
8#define __ASM_ARCH_MEMORY_H
9
10#include <asm/sizes.h>
11
12/*
13 * Physical DRAM offset.
14 */
15#define PHYS_OFFSET UL(0x00000000)
16
17#if !defined(__ASSEMBLY__) && defined(CONFIG_PCI)
18
19void ixp4xx_adjust_zones(int node, unsigned long *size, unsigned long *holes);
20
21#define arch_adjust_zones(node, size, holes) \
22 ixp4xx_adjust_zones(node, size, holes)
23
24#define ISA_DMA_THRESHOLD (SZ_64M - 1)
25
26#endif
27
28/*
29 * Virtual view <-> DMA view memory address translations
30 * virt_to_bus: Used to translate the virtual address to an
31 * address suitable to be passed to set_dma_addr
32 * bus_to_virt: Used to convert an address for DMA operations
33 * to an address that the kernel can use.
34 *
35 * These are dummies for now.
36 */
37#define __virt_to_bus(x) __virt_to_phys(x)
38#define __bus_to_virt(x) __phys_to_virt(x)
39
40#endif
diff --git a/arch/arm/mach-ixp4xx/include/mach/nas100d.h b/arch/arm/mach-ixp4xx/include/mach/nas100d.h
new file mode 100644
index 000000000000..3771d62a9748
--- /dev/null
+++ b/arch/arm/mach-ixp4xx/include/mach/nas100d.h
@@ -0,0 +1,52 @@
1/*
2 * arch/arm/mach-ixp4xx/include/mach/nas100d.h
3 *
4 * NAS100D platform specific definitions
5 *
6 * Copyright (c) 2005 Tower Technologies
7 *
8 * Author: Alessandro Zummo <a.zummo@towertech.it>
9 *
10 * based on ixdp425.h:
11 * Copyright 2004 (c) MontaVista, Software, Inc.
12 *
13 * This file is licensed under the terms of the GNU General Public
14 * License version 2. This program is licensed "as is" without any
15 * warranty of any kind, whether express or implied.
16 */
17
18#ifndef __ASM_ARCH_HARDWARE_H__
19#error "Do not include this directly, instead #include <mach/hardware.h>"
20#endif
21
22#define NAS100D_SDA_PIN 5
23#define NAS100D_SCL_PIN 6
24
25/*
26 * NAS100D PCI IRQs
27 */
28#define NAS100D_PCI_MAX_DEV 3
29#define NAS100D_PCI_IRQ_LINES 3
30
31
32/* PCI controller GPIO to IRQ pin mappings */
33#define NAS100D_PCI_INTA_PIN 11
34#define NAS100D_PCI_INTB_PIN 10
35#define NAS100D_PCI_INTC_PIN 9
36#define NAS100D_PCI_INTD_PIN 8
37#define NAS100D_PCI_INTE_PIN 7
38
39/* Buttons */
40
41#define NAS100D_PB_GPIO 14 /* power button */
42#define NAS100D_RB_GPIO 4 /* reset button */
43
44/* Power control */
45
46#define NAS100D_PO_GPIO 12 /* power off */
47
48/* LEDs */
49
50#define NAS100D_LED_WLAN_GPIO 0
51#define NAS100D_LED_DISK_GPIO 3
52#define NAS100D_LED_PWR_GPIO 15
diff --git a/include/asm-arm/arch-ixp4xx/npe.h b/arch/arm/mach-ixp4xx/include/mach/npe.h
index 37d0511689dc..37d0511689dc 100644
--- a/include/asm-arm/arch-ixp4xx/npe.h
+++ b/arch/arm/mach-ixp4xx/include/mach/npe.h
diff --git a/arch/arm/mach-ixp4xx/include/mach/nslu2.h b/arch/arm/mach-ixp4xx/include/mach/nslu2.h
new file mode 100644
index 000000000000..85d00adbfb92
--- /dev/null
+++ b/arch/arm/mach-ixp4xx/include/mach/nslu2.h
@@ -0,0 +1,55 @@
1/*
2 * arch/arm/mach-ixp4xx/include/mach/nslu2.h
3 *
4 * NSLU2 platform specific definitions
5 *
6 * Author: Mark Rakes <mrakes AT mac.com>
7 * Maintainers: http://www.nslu2-linux.org
8 *
9 * based on ixdp425.h:
10 * Copyright 2004 (c) MontaVista, Software, Inc.
11 *
12 * This file is licensed under the terms of the GNU General Public
13 * License version 2. This program is licensed "as is" without any
14 * warranty of any kind, whether express or implied.
15 */
16
17#ifndef __ASM_ARCH_HARDWARE_H__
18#error "Do not include this directly, instead #include <mach/hardware.h>"
19#endif
20
21#define NSLU2_SDA_PIN 7
22#define NSLU2_SCL_PIN 6
23
24/*
25 * NSLU2 PCI IRQs
26 */
27#define NSLU2_PCI_MAX_DEV 3
28#define NSLU2_PCI_IRQ_LINES 3
29
30
31/* PCI controller GPIO to IRQ pin mappings */
32#define NSLU2_PCI_INTA_PIN 11
33#define NSLU2_PCI_INTB_PIN 10
34#define NSLU2_PCI_INTC_PIN 9
35#define NSLU2_PCI_INTD_PIN 8
36
37/* NSLU2 Timer */
38#define NSLU2_FREQ 66000000
39
40/* Buttons */
41
42#define NSLU2_PB_GPIO 5 /* power button */
43#define NSLU2_PO_GPIO 8 /* power off */
44#define NSLU2_RB_GPIO 12 /* reset button */
45
46/* Buzzer */
47
48#define NSLU2_GPIO_BUZZ 4
49
50/* LEDs */
51
52#define NSLU2_LED_RED_GPIO 0
53#define NSLU2_LED_GRN_GPIO 1
54#define NSLU2_LED_DISK1_GPIO 3
55#define NSLU2_LED_DISK2_GPIO 2
diff --git a/arch/arm/mach-ixp4xx/include/mach/platform.h b/arch/arm/mach-ixp4xx/include/mach/platform.h
new file mode 100644
index 000000000000..e824c02c825a
--- /dev/null
+++ b/arch/arm/mach-ixp4xx/include/mach/platform.h
@@ -0,0 +1,173 @@
1/*
2 * arch/arm/mach-ixp4xx/include/mach/platform.h
3 *
4 * Constants and functions that are useful to IXP4xx platform-specific code
5 * and device drivers.
6 *
7 * Copyright (C) 2004 MontaVista Software, Inc.
8 */
9
10#ifndef __ASM_ARCH_HARDWARE_H__
11#error "Do not include this directly, instead #include <mach/hardware.h>"
12#endif
13
14#ifndef __ASSEMBLY__
15
16#include <asm/types.h>
17
18#ifndef __ARMEB__
19#define REG_OFFSET 0
20#else
21#define REG_OFFSET 3
22#endif
23
24/*
25 * Expansion bus memory regions
26 */
27#define IXP4XX_EXP_BUS_BASE_PHYS (0x50000000)
28
29/*
30 * The expansion bus on the IXP4xx can be configured for either 16 or
31 * 32MB windows and the CS offset for each region changes based on the
32 * current configuration. This means that we cannot simply hardcode
33 * each offset. ixp4xx_sys_init() looks at the expansion bus configuration
34 * as setup by the bootloader to determine our window size.
35 */
36extern unsigned long ixp4xx_exp_bus_size;
37
38#define IXP4XX_EXP_BUS_BASE(region)\
39 (IXP4XX_EXP_BUS_BASE_PHYS + ((region) * ixp4xx_exp_bus_size))
40
41#define IXP4XX_EXP_BUS_END(region)\
42 (IXP4XX_EXP_BUS_BASE(region) + ixp4xx_exp_bus_size - 1)
43
44/* Those macros can be used to adjust timing and configure
45 * other features for each region.
46 */
47
48#define IXP4XX_EXP_BUS_RECOVERY_T(x) (((x) & 0x0f) << 16)
49#define IXP4XX_EXP_BUS_HOLD_T(x) (((x) & 0x03) << 20)
50#define IXP4XX_EXP_BUS_STROBE_T(x) (((x) & 0x0f) << 22)
51#define IXP4XX_EXP_BUS_SETUP_T(x) (((x) & 0x03) << 26)
52#define IXP4XX_EXP_BUS_ADDR_T(x) (((x) & 0x03) << 28)
53#define IXP4XX_EXP_BUS_SIZE(x) (((x) & 0x0f) << 10)
54#define IXP4XX_EXP_BUS_CYCLES(x) (((x) & 0x03) << 14)
55
56#define IXP4XX_EXP_BUS_CS_EN (1L << 31)
57#define IXP4XX_EXP_BUS_BYTE_RD16 (1L << 6)
58#define IXP4XX_EXP_BUS_HRDY_POL (1L << 5)
59#define IXP4XX_EXP_BUS_MUX_EN (1L << 4)
60#define IXP4XX_EXP_BUS_SPLT_EN (1L << 3)
61#define IXP4XX_EXP_BUS_WR_EN (1L << 1)
62#define IXP4XX_EXP_BUS_BYTE_EN (1L << 0)
63
64#define IXP4XX_EXP_BUS_CYCLES_INTEL 0x00
65#define IXP4XX_EXP_BUS_CYCLES_MOTOROLA 0x01
66#define IXP4XX_EXP_BUS_CYCLES_HPI 0x02
67
68#define IXP4XX_FLASH_WRITABLE (0x2)
69#define IXP4XX_FLASH_DEFAULT (0xbcd23c40)
70#define IXP4XX_FLASH_WRITE (0xbcd23c42)
71
72/*
73 * Clock Speed Definitions.
74 */
75#define IXP4XX_PERIPHERAL_BUS_CLOCK (66) /* 66Mhzi APB BUS */
76#define IXP4XX_UART_XTAL 14745600
77
78/*
79 * This structure provide a means for the board setup code
80 * to give information to th pata_ixp4xx driver. It is
81 * passed as platform_data.
82 */
83struct ixp4xx_pata_data {
84 volatile u32 *cs0_cfg;
85 volatile u32 *cs1_cfg;
86 unsigned long cs0_bits;
87 unsigned long cs1_bits;
88 void __iomem *cs0;
89 void __iomem *cs1;
90};
91
92struct sys_timer;
93
94#define IXP4XX_ETH_NPEA 0x00
95#define IXP4XX_ETH_NPEB 0x10
96#define IXP4XX_ETH_NPEC 0x20
97
98/* Information about built-in Ethernet MAC interfaces */
99struct eth_plat_info {
100 u8 phy; /* MII PHY ID, 0 - 31 */
101 u8 rxq; /* configurable, currently 0 - 31 only */
102 u8 txreadyq;
103 u8 hwaddr[6];
104};
105
106/* Information about built-in HSS (synchronous serial) interfaces */
107struct hss_plat_info {
108 int (*set_clock)(int port, unsigned int clock_type);
109 int (*open)(int port, void *pdev,
110 void (*set_carrier_cb)(void *pdev, int carrier));
111 void (*close)(int port, void *pdev);
112 u8 txreadyq;
113};
114
115/*
116 * Frequency of clock used for primary clocksource
117 */
118extern unsigned long ixp4xx_timer_freq;
119
120/*
121 * Functions used by platform-level setup code
122 */
123extern void ixp4xx_map_io(void);
124extern void ixp4xx_init_irq(void);
125extern void ixp4xx_sys_init(void);
126extern void ixp4xx_timer_init(void);
127extern struct sys_timer ixp4xx_timer;
128extern void ixp4xx_pci_preinit(void);
129struct pci_sys_data;
130extern int ixp4xx_setup(int nr, struct pci_sys_data *sys);
131extern struct pci_bus *ixp4xx_scan_bus(int nr, struct pci_sys_data *sys);
132
133/*
134 * GPIO-functions
135 */
136/*
137 * The following converted to the real HW bits the gpio_line_config
138 */
139/* GPIO pin types */
140#define IXP4XX_GPIO_OUT 0x1
141#define IXP4XX_GPIO_IN 0x2
142
143/* GPIO signal types */
144#define IXP4XX_GPIO_LOW 0
145#define IXP4XX_GPIO_HIGH 1
146
147/* GPIO Clocks */
148#define IXP4XX_GPIO_CLK_0 14
149#define IXP4XX_GPIO_CLK_1 15
150
151static inline void gpio_line_config(u8 line, u32 direction)
152{
153 if (direction == IXP4XX_GPIO_IN)
154 *IXP4XX_GPIO_GPOER |= (1 << line);
155 else
156 *IXP4XX_GPIO_GPOER &= ~(1 << line);
157}
158
159static inline void gpio_line_get(u8 line, int *value)
160{
161 *value = (*IXP4XX_GPIO_GPINR >> line) & 0x1;
162}
163
164static inline void gpio_line_set(u8 line, int value)
165{
166 if (value == IXP4XX_GPIO_HIGH)
167 *IXP4XX_GPIO_GPOUTR |= (1 << line);
168 else if (value == IXP4XX_GPIO_LOW)
169 *IXP4XX_GPIO_GPOUTR &= ~(1 << line);
170}
171
172#endif // __ASSEMBLY__
173
diff --git a/arch/arm/mach-ixp4xx/include/mach/prpmc1100.h b/arch/arm/mach-ixp4xx/include/mach/prpmc1100.h
new file mode 100644
index 000000000000..17274a2e3dec
--- /dev/null
+++ b/arch/arm/mach-ixp4xx/include/mach/prpmc1100.h
@@ -0,0 +1,33 @@
1/*
2 * arch/arm/mach-ixp4xx/include/mach/prpmc1100.h
3 *
4 * Motorolla PrPMC1100 platform specific definitions
5 *
6 * Author: Deepak Saxena <dsaxena@plexity.net>
7 *
8 * Copyright 2004 (c) MontaVista, Software, Inc.
9 *
10 * This file is licensed under the terms of the GNU General Public
11 * License version 2. This program is licensed "as is" without any
12 * warranty of any kind, whether express or implied.
13 */
14
15#ifndef __ASM_ARCH_HARDWARE_H__
16#error "Do not include this directly, instead #include <mach/hardware.h>"
17#endif
18
19#define PRPMC1100_FLASH_BASE IXP4XX_EXP_BUS_CS0_BASE_PHYS
20#define PRPMC1100_FLASH_SIZE IXP4XX_EXP_BUS_CSX_REGION_SIZE
21
22#define PRPMC1100_PCI_MIN_DEVID 10
23#define PRPMC1100_PCI_MAX_DEVID 16
24#define PRPMC1100_PCI_IRQ_LINES 4
25
26
27/* PCI controller GPIO to IRQ pin mappings */
28#define PRPMC1100_PCI_INTA_PIN 11
29#define PRPMC1100_PCI_INTB_PIN 10
30#define PRPMC1100_PCI_INTC_PIN 9
31#define PRPMC1100_PCI_INTD_PIN 8
32
33
diff --git a/include/asm-arm/arch-ixp4xx/qmgr.h b/arch/arm/mach-ixp4xx/include/mach/qmgr.h
index 1e52b95cede5..1e52b95cede5 100644
--- a/include/asm-arm/arch-ixp4xx/qmgr.h
+++ b/arch/arm/mach-ixp4xx/include/mach/qmgr.h
diff --git a/arch/arm/mach-ixp4xx/include/mach/system.h b/arch/arm/mach-ixp4xx/include/mach/system.h
new file mode 100644
index 000000000000..92a7e8ddf69a
--- /dev/null
+++ b/arch/arm/mach-ixp4xx/include/mach/system.h
@@ -0,0 +1,42 @@
1/*
2 * arch/arm/mach-ixp4xx/include/mach/system.h
3 *
4 * Copyright (C) 2002 Intel Corporation.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 */
11
12#include <mach/hardware.h>
13
14static inline void arch_idle(void)
15{
16#if 0
17 if (!hlt_counter)
18 cpu_do_idle(0);
19#endif
20}
21
22
23static inline void arch_reset(char mode)
24{
25 if ( 1 && mode == 's') {
26 /* Jump into ROM at address 0 */
27 cpu_reset(0);
28 } else {
29 /* Use on-chip reset capability */
30
31 /* set the "key" register to enable access to
32 * "timer" and "enable" registers
33 */
34 *IXP4XX_OSWK = IXP4XX_WDT_KEY;
35
36 /* write 0 to the timer register for an immediate reset */
37 *IXP4XX_OSWT = 0;
38
39 *IXP4XX_OSWE = IXP4XX_WDT_RESET_ENABLE | IXP4XX_WDT_COUNT_ENABLE;
40 }
41}
42
diff --git a/arch/arm/mach-ixp4xx/include/mach/timex.h b/arch/arm/mach-ixp4xx/include/mach/timex.h
new file mode 100644
index 000000000000..89ce3ee84698
--- /dev/null
+++ b/arch/arm/mach-ixp4xx/include/mach/timex.h
@@ -0,0 +1,15 @@
1/*
2 * arch/arm/mach-ixp4xx/include/mach/timex.h
3 *
4 */
5
6#include <mach/hardware.h>
7
8/*
9 * We use IXP425 General purpose timer for our timer needs, it runs at
10 * 66.66... MHz. We do a convulted calculation of CLOCK_TICK_RATE b/c the
11 * timer register ignores the bottom 2 bits of the LATCH value.
12 */
13#define FREQ 66666666
14#define CLOCK_TICK_RATE (((FREQ / HZ & ~IXP4XX_OST_RELOAD_MASK) + 1) * HZ)
15
diff --git a/arch/arm/mach-ixp4xx/include/mach/udc.h b/arch/arm/mach-ixp4xx/include/mach/udc.h
new file mode 100644
index 000000000000..80d6da2eafac
--- /dev/null
+++ b/arch/arm/mach-ixp4xx/include/mach/udc.h
@@ -0,0 +1,8 @@
1/*
2 * arch/arm/mach-ixp4xx/include/mach/udc.h
3 *
4 */
5#include <asm/mach/udc_pxa2xx.h>
6
7extern void ixp4xx_set_udc_info(struct pxa2xx_udc_mach_info *info);
8
diff --git a/arch/arm/mach-ixp4xx/include/mach/uncompress.h b/arch/arm/mach-ixp4xx/include/mach/uncompress.h
new file mode 100644
index 000000000000..2db0078a8cf2
--- /dev/null
+++ b/arch/arm/mach-ixp4xx/include/mach/uncompress.h
@@ -0,0 +1,57 @@
1/*
2 * arch/arm/mach-ixp4xx/include/mach/uncompress.h
3 *
4 * Copyright (C) 2002 Intel Corporation.
5 * Copyright (C) 2003-2004 MontaVista Software, Inc.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 *
11 */
12
13#ifndef _ARCH_UNCOMPRESS_H_
14#define _ARCH_UNCOMPRESS_H_
15
16#include "ixp4xx-regs.h"
17#include <asm/mach-types.h>
18#include <linux/serial_reg.h>
19
20#define TX_DONE (UART_LSR_TEMT|UART_LSR_THRE)
21
22static volatile u32* uart_base;
23
24static inline void putc(int c)
25{
26 /* Check THRE and TEMT bits before we transmit the character.
27 */
28 while ((uart_base[UART_LSR] & TX_DONE) != TX_DONE)
29 barrier();
30
31 *uart_base = c;
32}
33
34static void flush(void)
35{
36}
37
38static __inline__ void __arch_decomp_setup(unsigned long arch_id)
39{
40 /*
41 * Some boards are using UART2 as console
42 */
43 if (machine_is_adi_coyote() || machine_is_gtwx5715() ||
44 machine_is_gateway7001() || machine_is_wg302v2())
45 uart_base = (volatile u32*) IXP4XX_UART2_BASE_PHYS;
46 else
47 uart_base = (volatile u32*) IXP4XX_UART1_BASE_PHYS;
48}
49
50/*
51 * arch_id is a variable in decompress_kernel()
52 */
53#define arch_decomp_setup() __arch_decomp_setup(arch_id)
54
55#define arch_decomp_wdog()
56
57#endif
diff --git a/arch/arm/mach-ixp4xx/include/mach/vmalloc.h b/arch/arm/mach-ixp4xx/include/mach/vmalloc.h
new file mode 100644
index 000000000000..7b3580b53adf
--- /dev/null
+++ b/arch/arm/mach-ixp4xx/include/mach/vmalloc.h
@@ -0,0 +1,5 @@
1/*
2 * arch/arm/mach-ixp4xx/include/mach/vmalloc.h
3 */
4#define VMALLOC_END (0xFF000000)
5
diff --git a/arch/arm/mach-ixp4xx/ixdp425-pci.c b/arch/arm/mach-ixp4xx/ixdp425-pci.c
index 7d9bb4d23104..64c29aacaac9 100644
--- a/arch/arm/mach-ixp4xx/ixdp425-pci.c
+++ b/arch/arm/mach-ixp4xx/ixdp425-pci.c
@@ -22,7 +22,7 @@
22 22
23#include <asm/mach/pci.h> 23#include <asm/mach/pci.h>
24#include <asm/irq.h> 24#include <asm/irq.h>
25#include <asm/hardware.h> 25#include <mach/hardware.h>
26#include <asm/mach-types.h> 26#include <asm/mach-types.h>
27 27
28void __init ixdp425_pci_preinit(void) 28void __init ixdp425_pci_preinit(void)
diff --git a/arch/arm/mach-ixp4xx/ixdp425-setup.c b/arch/arm/mach-ixp4xx/ixdp425-setup.c
index 44584afb34a3..9b2d2ec14c80 100644
--- a/arch/arm/mach-ixp4xx/ixdp425-setup.c
+++ b/arch/arm/mach-ixp4xx/ixdp425-setup.c
@@ -24,7 +24,7 @@
24#include <asm/types.h> 24#include <asm/types.h>
25#include <asm/setup.h> 25#include <asm/setup.h>
26#include <asm/memory.h> 26#include <asm/memory.h>
27#include <asm/hardware.h> 27#include <mach/hardware.h>
28#include <asm/mach-types.h> 28#include <asm/mach-types.h>
29#include <asm/irq.h> 29#include <asm/irq.h>
30#include <asm/mach/arch.h> 30#include <asm/mach/arch.h>
diff --git a/arch/arm/mach-ixp4xx/ixdpg425-pci.c b/arch/arm/mach-ixp4xx/ixdpg425-pci.c
index 37d9f2e8f602..4ed7ac614920 100644
--- a/arch/arm/mach-ixp4xx/ixdpg425-pci.c
+++ b/arch/arm/mach-ixp4xx/ixdpg425-pci.c
@@ -19,7 +19,7 @@
19#include <linux/irq.h> 19#include <linux/irq.h>
20 20
21#include <asm/mach-types.h> 21#include <asm/mach-types.h>
22#include <asm/hardware.h> 22#include <mach/hardware.h>
23 23
24#include <asm/mach/pci.h> 24#include <asm/mach/pci.h>
25 25
diff --git a/arch/arm/mach-ixp4xx/ixp4xx_npe.c b/arch/arm/mach-ixp4xx/ixp4xx_npe.c
index 63a23fa4aab4..c73a94d0ca2b 100644
--- a/arch/arm/mach-ixp4xx/ixp4xx_npe.c
+++ b/arch/arm/mach-ixp4xx/ixp4xx_npe.c
@@ -21,7 +21,7 @@
21#include <linux/kernel.h> 21#include <linux/kernel.h>
22#include <linux/module.h> 22#include <linux/module.h>
23#include <linux/slab.h> 23#include <linux/slab.h>
24#include <asm/arch/npe.h> 24#include <mach/npe.h>
25 25
26#define DEBUG_MSG 0 26#define DEBUG_MSG 0
27#define DEBUG_FW 0 27#define DEBUG_FW 0
diff --git a/arch/arm/mach-ixp4xx/ixp4xx_qmgr.c b/arch/arm/mach-ixp4xx/ixp4xx_qmgr.c
index fab94eaecee7..c6cb069a5a83 100644
--- a/arch/arm/mach-ixp4xx/ixp4xx_qmgr.c
+++ b/arch/arm/mach-ixp4xx/ixp4xx_qmgr.c
@@ -12,7 +12,7 @@
12#include <linux/interrupt.h> 12#include <linux/interrupt.h>
13#include <linux/kernel.h> 13#include <linux/kernel.h>
14#include <linux/module.h> 14#include <linux/module.h>
15#include <asm/arch/qmgr.h> 15#include <mach/qmgr.h>
16 16
17#define DEBUG 0 17#define DEBUG 0
18 18
diff --git a/arch/arm/mach-ixp4xx/wg302v2-pci.c b/arch/arm/mach-ixp4xx/wg302v2-pci.c
index 0f00feab67f8..9b59ed03b151 100644
--- a/arch/arm/mach-ixp4xx/wg302v2-pci.c
+++ b/arch/arm/mach-ixp4xx/wg302v2-pci.c
@@ -23,7 +23,7 @@
23#include <linux/irq.h> 23#include <linux/irq.h>
24 24
25#include <asm/mach-types.h> 25#include <asm/mach-types.h>
26#include <asm/hardware.h> 26#include <mach/hardware.h>
27 27
28#include <asm/mach/pci.h> 28#include <asm/mach/pci.h>
29 29
diff --git a/arch/arm/mach-ixp4xx/wg302v2-setup.c b/arch/arm/mach-ixp4xx/wg302v2-setup.c
index f7e09ad804e8..7ea782021d1f 100644
--- a/arch/arm/mach-ixp4xx/wg302v2-setup.c
+++ b/arch/arm/mach-ixp4xx/wg302v2-setup.c
@@ -23,7 +23,7 @@
23#include <asm/types.h> 23#include <asm/types.h>
24#include <asm/setup.h> 24#include <asm/setup.h>
25#include <asm/memory.h> 25#include <asm/memory.h>
26#include <asm/hardware.h> 26#include <mach/hardware.h>
27#include <asm/irq.h> 27#include <asm/irq.h>
28#include <asm/mach-types.h> 28#include <asm/mach-types.h>
29#include <asm/mach/arch.h> 29#include <asm/mach/arch.h>
diff --git a/arch/arm/mach-kirkwood/addr-map.c b/arch/arm/mach-kirkwood/addr-map.c
index a39f0f3c4730..c79f492072f9 100644
--- a/arch/arm/mach-kirkwood/addr-map.c
+++ b/arch/arm/mach-kirkwood/addr-map.c
@@ -12,7 +12,7 @@
12#include <linux/init.h> 12#include <linux/init.h>
13#include <linux/mbus.h> 13#include <linux/mbus.h>
14#include <linux/io.h> 14#include <linux/io.h>
15#include <asm/hardware.h> 15#include <mach/hardware.h>
16#include "common.h" 16#include "common.h"
17 17
18/* 18/*
diff --git a/arch/arm/mach-kirkwood/common.c b/arch/arm/mach-kirkwood/common.c
index 5938a3b33cdc..0e509b8ad56e 100644
--- a/arch/arm/mach-kirkwood/common.c
+++ b/arch/arm/mach-kirkwood/common.c
@@ -19,7 +19,7 @@
19#include <asm/timex.h> 19#include <asm/timex.h>
20#include <asm/mach/map.h> 20#include <asm/mach/map.h>
21#include <asm/mach/time.h> 21#include <asm/mach/time.h>
22#include <asm/arch/kirkwood.h> 22#include <mach/kirkwood.h>
23#include <asm/plat-orion/cache-feroceon-l2.h> 23#include <asm/plat-orion/cache-feroceon-l2.h>
24#include <asm/plat-orion/ehci-orion.h> 24#include <asm/plat-orion/ehci-orion.h>
25#include <asm/plat-orion/orion_nand.h> 25#include <asm/plat-orion/orion_nand.h>
diff --git a/arch/arm/mach-kirkwood/db88f6281-bp-setup.c b/arch/arm/mach-kirkwood/db88f6281-bp-setup.c
index d5c482c628e3..610fb24d8ae2 100644
--- a/arch/arm/mach-kirkwood/db88f6281-bp-setup.c
+++ b/arch/arm/mach-kirkwood/db88f6281-bp-setup.c
@@ -21,7 +21,7 @@
21#include <asm/mach-types.h> 21#include <asm/mach-types.h>
22#include <asm/mach/arch.h> 22#include <asm/mach/arch.h>
23#include <asm/mach/pci.h> 23#include <asm/mach/pci.h>
24#include <asm/arch/kirkwood.h> 24#include <mach/kirkwood.h>
25#include "common.h" 25#include "common.h"
26 26
27static struct mv643xx_eth_platform_data db88f6281_ge00_data = { 27static struct mv643xx_eth_platform_data db88f6281_ge00_data = {
diff --git a/arch/arm/mach-kirkwood/include/mach/debug-macro.S b/arch/arm/mach-kirkwood/include/mach/debug-macro.S
new file mode 100644
index 000000000000..c0cc5b5c82ac
--- /dev/null
+++ b/arch/arm/mach-kirkwood/include/mach/debug-macro.S
@@ -0,0 +1,20 @@
1/*
2 * arch/arm/mach-kirkwood/include/mach/debug-macro.S
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7*/
8
9#include <mach/kirkwood.h>
10
11 .macro addruart,rx
12 mrc p15, 0, \rx, c1, c0
13 tst \rx, #1 @ MMU enabled?
14 ldreq \rx, =KIRKWOOD_REGS_PHYS_BASE
15 ldrne \rx, =KIRKWOOD_REGS_VIRT_BASE
16 orr \rx, \rx, #0x00012000
17 .endm
18
19#define UART_SHIFT 2
20#include <asm/hardware/debug-8250.S>
diff --git a/include/asm-arm/arch-kirkwood/dma.h b/arch/arm/mach-kirkwood/include/mach/dma.h
index 40a8c178f10d..40a8c178f10d 100644
--- a/include/asm-arm/arch-kirkwood/dma.h
+++ b/arch/arm/mach-kirkwood/include/mach/dma.h
diff --git a/arch/arm/mach-kirkwood/include/mach/entry-macro.S b/arch/arm/mach-kirkwood/include/mach/entry-macro.S
new file mode 100644
index 000000000000..83e0cba77b36
--- /dev/null
+++ b/arch/arm/mach-kirkwood/include/mach/entry-macro.S
@@ -0,0 +1,40 @@
1/*
2 * arch/arm/mach-kirkwood/include/mach/entry-macro.S
3 *
4 * Low-level IRQ helper macros for Marvell Kirkwood platforms
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10
11#include <mach/kirkwood.h>
12
13 .macro disable_fiq
14 .endm
15
16 .macro arch_ret_to_user, tmp1, tmp2
17 .endm
18
19 .macro get_irqnr_preamble, base, tmp
20 ldr \base, =IRQ_VIRT_BASE
21 .endm
22
23 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
24 @ check low interrupts
25 ldr \irqstat, [\base, #IRQ_CAUSE_LOW_OFF]
26 ldr \tmp, [\base, #IRQ_MASK_LOW_OFF]
27 mov \irqnr, #31
28 ands \irqstat, \irqstat, \tmp
29 bne 1001f
30
31 @ if no low interrupts set, check high interrupts
32 ldr \irqstat, [\base, #IRQ_CAUSE_HIGH_OFF]
33 ldr \tmp, [\base, #IRQ_MASK_HIGH_OFF]
34 mov \irqnr, #63
35 ands \irqstat, \irqstat, \tmp
36
37 @ find first active interrupt source
381001: clzne \irqstat, \irqstat
39 subne \irqnr, \irqnr, \irqstat
40 .endm
diff --git a/arch/arm/mach-kirkwood/include/mach/hardware.h b/arch/arm/mach-kirkwood/include/mach/hardware.h
new file mode 100644
index 000000000000..cde85283f7d3
--- /dev/null
+++ b/arch/arm/mach-kirkwood/include/mach/hardware.h
@@ -0,0 +1,21 @@
1/*
2 * arch/arm/mach-kirkwood/include/mach/hardware.h
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 */
8
9#ifndef __ASM_ARCH_HARDWARE_H
10#define __ASM_ARCH_HARDWARE_H
11
12#include "kirkwood.h"
13
14#define pcibios_assign_all_busses() 1
15
16#define PCIBIOS_MIN_IO 0x00001000
17#define PCIBIOS_MIN_MEM 0x01000000
18#define PCIMEM_BASE KIRKWOOD_PCIE_MEM_PHYS_BASE /* mem base for VGA */
19
20
21#endif
diff --git a/arch/arm/mach-kirkwood/include/mach/io.h b/arch/arm/mach-kirkwood/include/mach/io.h
new file mode 100644
index 000000000000..be07be0ef522
--- /dev/null
+++ b/arch/arm/mach-kirkwood/include/mach/io.h
@@ -0,0 +1,26 @@
1/*
2 * arch/arm/mach-kirkwood/include/mach/io.h
3 *
4 * This file is licensed under the terms of the GNU General Public
5 * License version 2. This program is licensed "as is" without any
6 * warranty of any kind, whether express or implied.
7 */
8
9#ifndef __ASM_ARCH_IO_H
10#define __ASM_ARCH_IO_H
11
12#include "kirkwood.h"
13
14#define IO_SPACE_LIMIT 0xffffffff
15
16static inline void __iomem *__io(unsigned long addr)
17{
18 return (void __iomem *)((addr - KIRKWOOD_PCIE_IO_PHYS_BASE)
19 + KIRKWOOD_PCIE_IO_VIRT_BASE);
20}
21
22#define __io(a) __io(a)
23#define __mem_pci(a) (a)
24
25
26#endif
diff --git a/arch/arm/mach-kirkwood/include/mach/irqs.h b/arch/arm/mach-kirkwood/include/mach/irqs.h
new file mode 100644
index 000000000000..6fd05838c72d
--- /dev/null
+++ b/arch/arm/mach-kirkwood/include/mach/irqs.h
@@ -0,0 +1,63 @@
1/*
2 * arch/arm/mach-kirkwood/include/mach/irqs.h
3 *
4 * IRQ definitions for Marvell Kirkwood SoCs
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10
11#ifndef __ASM_ARCH_IRQS_H
12#define __ASM_ARCH_IRQS_H
13
14#include "kirkwood.h" /* need GPIO_MAX */
15
16/*
17 * Low Interrupt Controller
18 */
19#define IRQ_KIRKWOOD_HIGH_SUM 0
20#define IRQ_KIRKWOOD_BRIDGE 1
21#define IRQ_KIRKWOOD_HOST2CPU 2
22#define IRQ_KIRKWOOD_CPU2HOST 3
23#define IRQ_KIRKWOOD_XOR_00 5
24#define IRQ_KIRKWOOD_XOR_01 6
25#define IRQ_KIRKWOOD_XOR_10 7
26#define IRQ_KIRKWOOD_XOR_11 8
27#define IRQ_KIRKWOOD_PCIE 9
28#define IRQ_KIRKWOOD_GE00_SUM 11
29#define IRQ_KIRKWOOD_GE01_SUM 15
30#define IRQ_KIRKWOOD_USB 19
31#define IRQ_KIRKWOOD_SATA 21
32#define IRQ_KIRKWOOD_CRYPTO 22
33#define IRQ_KIRKWOOD_SPI 23
34#define IRQ_KIRKWOOD_I2S 24
35#define IRQ_KIRKWOOD_TS_0 26
36#define IRQ_KIRKWOOD_SDIO 28
37#define IRQ_KIRKWOOD_TWSI 29
38#define IRQ_KIRKWOOD_AVB 30
39#define IRQ_KIRKWOOD_TDMI 31
40
41/*
42 * High Interrupt Controller
43 */
44#define IRQ_KIRKWOOD_UART_0 33
45#define IRQ_KIRKWOOD_UART_1 34
46#define IRQ_KIRKWOOD_GPIO_LOW_0_7 35
47#define IRQ_KIRKWOOD_GPIO_LOW_8_15 36
48#define IRQ_KIRKWOOD_GPIO_LOW_16_23 37
49#define IRQ_KIRKWOOD_GPIO_LOW_24_31 38
50#define IRQ_KIRKWOOD_GPIO_HIGH_0_7 39
51#define IRQ_KIRKWOOD_GPIO_HIGH_8_15 40
52#define IRQ_KIRKWOOD_GPIO_HIGH_16_23 41
53
54/*
55 * KIRKWOOD General Purpose Pins
56 */
57#define IRQ_KIRKWOOD_GPIO_START 64
58#define NR_GPIO_IRQS GPIO_MAX
59
60#define NR_IRQS (IRQ_KIRKWOOD_GPIO_START + NR_GPIO_IRQS)
61
62
63#endif
diff --git a/arch/arm/mach-kirkwood/include/mach/kirkwood.h b/arch/arm/mach-kirkwood/include/mach/kirkwood.h
new file mode 100644
index 000000000000..d1336b41f0fb
--- /dev/null
+++ b/arch/arm/mach-kirkwood/include/mach/kirkwood.h
@@ -0,0 +1,100 @@
1/*
2 * arch/arm/mach-kirkwood/include/mach/kirkwood.h
3 *
4 * Generic definitions for Marvell Kirkwood SoC flavors:
5 * 88F6180, 88F6192 and 88F6281.
6 *
7 * This file is licensed under the terms of the GNU General Public
8 * License version 2. This program is licensed "as is" without any
9 * warranty of any kind, whether express or implied.
10 */
11
12#ifndef __ASM_ARCH_KIRKWOOD_H
13#define __ASM_ARCH_KIRKWOOD_H
14
15/*
16 * Marvell Kirkwood address maps.
17 *
18 * phys
19 * e0000000 PCIe Memory space
20 * f1000000 on-chip peripheral registers
21 * f2000000 PCIe I/O space
22 * f3000000 NAND controller address window
23 *
24 * virt phys size
25 * fee00000 f1000000 1M on-chip peripheral registers
26 * fef00000 f2000000 1M PCIe I/O space
27 */
28
29#define KIRKWOOD_NAND_MEM_PHYS_BASE 0xf3000000
30#define KIRKWOOD_NAND_MEM_SIZE SZ_64K /* 1K is sufficient, but 64K
31 * is the minimal window size
32 */
33
34#define KIRKWOOD_PCIE_IO_PHYS_BASE 0xf2000000
35#define KIRKWOOD_PCIE_IO_VIRT_BASE 0xfef00000
36#define KIRKWOOD_PCIE_IO_BUS_BASE 0x00000000
37#define KIRKWOOD_PCIE_IO_SIZE SZ_1M
38
39#define KIRKWOOD_REGS_PHYS_BASE 0xf1000000
40#define KIRKWOOD_REGS_VIRT_BASE 0xfee00000
41#define KIRKWOOD_REGS_SIZE SZ_1M
42
43#define KIRKWOOD_PCIE_MEM_PHYS_BASE 0xe0000000
44#define KIRKWOOD_PCIE_MEM_SIZE SZ_128M
45
46/*
47 * MBUS bridge registers.
48 */
49#define BRIDGE_VIRT_BASE (KIRKWOOD_REGS_VIRT_BASE | 0x20000)
50#define CPU_CONTROL (BRIDGE_VIRT_BASE | 0x0104)
51#define CPU_RESET 0x00000002
52#define RSTOUTn_MASK (BRIDGE_VIRT_BASE | 0x0108)
53#define SOFT_RESET_OUT_EN 0x00000004
54#define SYSTEM_SOFT_RESET (BRIDGE_VIRT_BASE | 0x010c)
55#define SOFT_RESET 0x00000001
56#define BRIDGE_CAUSE (BRIDGE_VIRT_BASE | 0x0110)
57#define BRIDGE_MASK (BRIDGE_VIRT_BASE | 0x0114)
58#define BRIDGE_INT_TIMER0 0x0002
59#define BRIDGE_INT_TIMER1 0x0004
60#define BRIDGE_INT_TIMER1_CLR (~0x0004)
61#define IRQ_VIRT_BASE (BRIDGE_VIRT_BASE | 0x0200)
62#define IRQ_CAUSE_LOW_OFF 0x0000
63#define IRQ_MASK_LOW_OFF 0x0004
64#define IRQ_CAUSE_HIGH_OFF 0x0010
65#define IRQ_MASK_HIGH_OFF 0x0014
66#define TIMER_VIRT_BASE (BRIDGE_VIRT_BASE | 0x0300)
67#define L2_CONFIG_REG (BRIDGE_VIRT_BASE | 0x0128)
68#define L2_WRITETHROUGH 0x00000010
69
70/*
71 * Register Map
72 */
73#define DDR_VIRT_BASE (KIRKWOOD_REGS_VIRT_BASE | 0x00000)
74#define DDR_WINDOW_CPU_BASE (DDR_VIRT_BASE | 0x1500)
75
76#define DEV_BUS_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE | 0x10000)
77#define DEV_BUS_VIRT_BASE (KIRKWOOD_REGS_VIRT_BASE | 0x10000)
78#define SAMPLE_AT_RESET (DEV_BUS_VIRT_BASE | 0x0030)
79#define DEVICE_ID (DEV_BUS_VIRT_BASE | 0x0034)
80#define RTC_PHYS_BASE (DEV_BUS_PHYS_BASE | 0x0300)
81#define SPI_PHYS_BASE (DEV_BUS_PHYS_BASE | 0x0600)
82#define UART0_PHYS_BASE (DEV_BUS_PHYS_BASE | 0x2000)
83#define UART0_VIRT_BASE (DEV_BUS_VIRT_BASE | 0x2000)
84#define UART1_PHYS_BASE (DEV_BUS_PHYS_BASE | 0x2100)
85#define UART1_VIRT_BASE (DEV_BUS_VIRT_BASE | 0x2100)
86
87#define PCIE_VIRT_BASE (KIRKWOOD_REGS_VIRT_BASE | 0x40000)
88
89#define USB_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE | 0x50000)
90
91#define GE00_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE | 0x70000)
92#define GE01_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE | 0x74000)
93
94#define SATA_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE | 0x80000)
95
96
97#define GPIO_MAX 50
98
99
100#endif
diff --git a/arch/arm/mach-kirkwood/include/mach/memory.h b/arch/arm/mach-kirkwood/include/mach/memory.h
new file mode 100644
index 000000000000..b5fb34bdccd5
--- /dev/null
+++ b/arch/arm/mach-kirkwood/include/mach/memory.h
@@ -0,0 +1,14 @@
1/*
2 * arch/arm/mach-kirkwood/include/mach/memory.h
3 */
4
5#ifndef __ASM_ARCH_MEMORY_H
6#define __ASM_ARCH_MEMORY_H
7
8#define PHYS_OFFSET UL(0x00000000)
9
10#define __virt_to_bus(x) __virt_to_phys(x)
11#define __bus_to_virt(x) __phys_to_virt(x)
12
13
14#endif
diff --git a/arch/arm/mach-kirkwood/include/mach/system.h b/arch/arm/mach-kirkwood/include/mach/system.h
new file mode 100644
index 000000000000..8510f6cfdabf
--- /dev/null
+++ b/arch/arm/mach-kirkwood/include/mach/system.h
@@ -0,0 +1,37 @@
1/*
2 * arch/arm/mach-kirkwood/include/mach/system.h
3 *
4 * This file is licensed under the terms of the GNU General Public
5 * License version 2. This program is licensed "as is" without any
6 * warranty of any kind, whether express or implied.
7 */
8
9#ifndef __ASM_ARCH_SYSTEM_H
10#define __ASM_ARCH_SYSTEM_H
11
12#include <mach/hardware.h>
13#include <mach/kirkwood.h>
14
15static inline void arch_idle(void)
16{
17 cpu_do_idle();
18}
19
20static inline void arch_reset(char mode)
21{
22 /*
23 * Enable soft reset to assert RSTOUTn.
24 */
25 writel(SOFT_RESET_OUT_EN, RSTOUTn_MASK);
26
27 /*
28 * Assert soft reset.
29 */
30 writel(SOFT_RESET, SYSTEM_SOFT_RESET);
31
32 while (1)
33 ;
34}
35
36
37#endif
diff --git a/arch/arm/mach-kirkwood/include/mach/timex.h b/arch/arm/mach-kirkwood/include/mach/timex.h
new file mode 100644
index 000000000000..f77ef4a32c5f
--- /dev/null
+++ b/arch/arm/mach-kirkwood/include/mach/timex.h
@@ -0,0 +1,11 @@
1/*
2 * arch/arm/mach-kirkwood/include/mach/timex.h
3 *
4 * This file is licensed under the terms of the GNU General Public
5 * License version 2. This program is licensed "as is" without any
6 * warranty of any kind, whether express or implied.
7 */
8
9#define CLOCK_TICK_RATE (100 * HZ)
10
11#define KIRKWOOD_TCLK 166666667
diff --git a/arch/arm/mach-kirkwood/include/mach/uncompress.h b/arch/arm/mach-kirkwood/include/mach/uncompress.h
new file mode 100644
index 000000000000..75d5497df3a8
--- /dev/null
+++ b/arch/arm/mach-kirkwood/include/mach/uncompress.h
@@ -0,0 +1,47 @@
1/*
2 * arch/arm/mach-kirkwood/include/mach/uncompress.h
3 *
4 * This file is licensed under the terms of the GNU General Public
5 * License version 2. This program is licensed "as is" without any
6 * warranty of any kind, whether express or implied.
7 */
8
9#include <linux/serial_reg.h>
10#include <mach/kirkwood.h>
11
12#define SERIAL_BASE ((unsigned char *)UART0_PHYS_BASE)
13
14static void putc(const char c)
15{
16 unsigned char *base = SERIAL_BASE;
17 int i;
18
19 for (i = 0; i < 0x1000; i++) {
20 if (base[UART_LSR << 2] & UART_LSR_THRE)
21 break;
22 barrier();
23 }
24
25 base[UART_TX << 2] = c;
26}
27
28static void flush(void)
29{
30 unsigned char *base = SERIAL_BASE;
31 unsigned char mask;
32 int i;
33
34 mask = UART_LSR_TEMT | UART_LSR_THRE;
35
36 for (i = 0; i < 0x1000; i++) {
37 if ((base[UART_LSR << 2] & mask) == mask)
38 break;
39 barrier();
40 }
41}
42
43/*
44 * nothing to do
45 */
46#define arch_decomp_setup()
47#define arch_decomp_wdog()
diff --git a/arch/arm/mach-kirkwood/include/mach/vmalloc.h b/arch/arm/mach-kirkwood/include/mach/vmalloc.h
new file mode 100644
index 000000000000..8f48260dcdad
--- /dev/null
+++ b/arch/arm/mach-kirkwood/include/mach/vmalloc.h
@@ -0,0 +1,5 @@
1/*
2 * arch/arm/mach-kirkwood/include/mach/vmalloc.h
3 */
4
5#define VMALLOC_END 0xfe800000
diff --git a/arch/arm/mach-kirkwood/rd88f6192-nas-setup.c b/arch/arm/mach-kirkwood/rd88f6192-nas-setup.c
index 6cf642c504d3..182230a5d198 100644
--- a/arch/arm/mach-kirkwood/rd88f6192-nas-setup.c
+++ b/arch/arm/mach-kirkwood/rd88f6192-nas-setup.c
@@ -21,7 +21,7 @@
21#include <asm/mach-types.h> 21#include <asm/mach-types.h>
22#include <asm/mach/arch.h> 22#include <asm/mach/arch.h>
23#include <asm/mach/pci.h> 23#include <asm/mach/pci.h>
24#include <asm/arch/kirkwood.h> 24#include <mach/kirkwood.h>
25#include "common.h" 25#include "common.h"
26 26
27#define RD88F6192_GPIO_USB_VBUS 10 27#define RD88F6192_GPIO_USB_VBUS 10
diff --git a/arch/arm/mach-kirkwood/rd88f6281-setup.c b/arch/arm/mach-kirkwood/rd88f6281-setup.c
index b6437f47a77f..d8a43018c7d3 100644
--- a/arch/arm/mach-kirkwood/rd88f6281-setup.c
+++ b/arch/arm/mach-kirkwood/rd88f6281-setup.c
@@ -22,7 +22,7 @@
22#include <asm/mach-types.h> 22#include <asm/mach-types.h>
23#include <asm/mach/arch.h> 23#include <asm/mach/arch.h>
24#include <asm/mach/pci.h> 24#include <asm/mach/pci.h>
25#include <asm/arch/kirkwood.h> 25#include <mach/kirkwood.h>
26#include <asm/plat-orion/orion_nand.h> 26#include <asm/plat-orion/orion_nand.h>
27#include "common.h" 27#include "common.h"
28 28
diff --git a/arch/arm/mach-ks8695/board-micrel.c b/arch/arm/mach-ks8695/board-micrel.c
index 05ac2bd04020..0468e93b7d3b 100644
--- a/arch/arm/mach-ks8695/board-micrel.c
+++ b/arch/arm/mach-ks8695/board-micrel.c
@@ -18,7 +18,7 @@
18#include <asm/mach/map.h> 18#include <asm/mach/map.h>
19#include <asm/mach/irq.h> 19#include <asm/mach/irq.h>
20 20
21#include <asm/arch/devices.h> 21#include <mach/devices.h>
22 22
23#include "generic.h" 23#include "generic.h"
24 24
diff --git a/arch/arm/mach-ks8695/cpu.c b/arch/arm/mach-ks8695/cpu.c
index 407d255e42bf..c6c08e800233 100644
--- a/arch/arm/mach-ks8695/cpu.c
+++ b/arch/arm/mach-ks8695/cpu.c
@@ -25,13 +25,13 @@
25#include <linux/module.h> 25#include <linux/module.h>
26#include <linux/init.h> 26#include <linux/init.h>
27 27
28#include <asm/hardware.h> 28#include <mach/hardware.h>
29#include <asm/io.h> 29#include <asm/io.h>
30#include <asm/mach/arch.h> 30#include <asm/mach/arch.h>
31#include <asm/mach/map.h> 31#include <asm/mach/map.h>
32 32
33#include <asm/arch/regs-sys.h> 33#include <mach/regs-sys.h>
34#include <asm/arch/regs-misc.h> 34#include <mach/regs-misc.h>
35 35
36 36
37static struct __initdata map_desc ks8695_io_desc[] = { 37static struct __initdata map_desc ks8695_io_desc[] = {
diff --git a/arch/arm/mach-ks8695/devices.c b/arch/arm/mach-ks8695/devices.c
index 3db2ec61d06f..4bd251482c8f 100644
--- a/arch/arm/mach-ks8695/devices.c
+++ b/arch/arm/mach-ks8695/devices.c
@@ -22,9 +22,9 @@
22 22
23#include <linux/platform_device.h> 23#include <linux/platform_device.h>
24 24
25#include <asm/arch/regs-wan.h> 25#include <mach/regs-wan.h>
26#include <asm/arch/regs-lan.h> 26#include <mach/regs-lan.h>
27#include <asm/arch/regs-hpna.h> 27#include <mach/regs-hpna.h>
28 28
29 29
30/* -------------------------------------------------------------------- 30/* --------------------------------------------------------------------
diff --git a/arch/arm/mach-ks8695/gpio.c b/arch/arm/mach-ks8695/gpio.c
index 5e46191c0af9..3624e65cd89b 100644
--- a/arch/arm/mach-ks8695/gpio.c
+++ b/arch/arm/mach-ks8695/gpio.c
@@ -25,11 +25,11 @@
25#include <linux/module.h> 25#include <linux/module.h>
26 26
27#include <asm/io.h> 27#include <asm/io.h>
28#include <asm/hardware.h> 28#include <mach/hardware.h>
29#include <asm/mach/irq.h> 29#include <asm/mach/irq.h>
30 30
31#include <asm/arch/regs-gpio.h> 31#include <mach/regs-gpio.h>
32#include <asm/arch/gpio.h> 32#include <mach/gpio.h>
33 33
34/* 34/*
35 * Configure a GPIO line for either GPIO function, or its internal 35 * Configure a GPIO line for either GPIO function, or its internal
diff --git a/arch/arm/mach-ks8695/include/mach/debug-macro.S b/arch/arm/mach-ks8695/include/mach/debug-macro.S
new file mode 100644
index 000000000000..3782c3559497
--- /dev/null
+++ b/arch/arm/mach-ks8695/include/mach/debug-macro.S
@@ -0,0 +1,38 @@
1/*
2 * arch/arm/mach-ks8695/include/mach/debug-macro.S
3 *
4 * Copyright (C) 2006 Ben Dooks <ben@simtec.co.uk>
5 * Copyright (C) 2006 Simtec Electronics
6 *
7 * KS8695 - Debug macros
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12 */
13
14#include <mach/hardware.h>
15#include <mach/regs-uart.h>
16
17 .macro addruart, rx
18 mrc p15, 0, \rx, c1, c0
19 tst \rx, #1 @ MMU enabled?
20 ldreq \rx, =KS8695_UART_PA @ physical base address
21 ldrne \rx, =KS8695_UART_VA @ virtual base address
22 .endm
23
24 .macro senduart, rd, rx
25 str \rd, [\rx, #KS8695_URTH] @ Write to Transmit Holding Register
26 .endm
27
28 .macro busyuart, rd, rx
291001: ldr \rd, [\rx, #KS8695_URLS] @ Read Line Status Register
30 tst \rd, #URLS_URTE @ Holding & Shift registers empty?
31 beq 1001b
32 .endm
33
34 .macro waituart, rd, rx
351001: ldr \rd, [\rx, #KS8695_URLS] @ Read Line Status Register
36 tst \rd, #URLS_URTHRE @ Holding Register empty?
37 beq 1001b
38 .endm
diff --git a/arch/arm/mach-ks8695/include/mach/devices.h b/arch/arm/mach-ks8695/include/mach/devices.h
new file mode 100644
index 000000000000..2744fecb429c
--- /dev/null
+++ b/arch/arm/mach-ks8695/include/mach/devices.h
@@ -0,0 +1,37 @@
1/*
2 * arch/arm/mach-ks8695/include/mach/devices.h
3 *
4 * Copyright (C) 2006 Andrew Victor
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10
11#ifndef __ASM_ARCH_DEVICES_H
12#define __ASM_ARCH_DEVICES_H
13
14#include <linux/pci.h>
15
16 /* Ethernet */
17extern void __init ks8695_add_device_wan(void);
18extern void __init ks8695_add_device_lan(void);
19extern void __init ks8695_add_device_hpna(void);
20
21 /* LEDs */
22extern short ks8695_leds_cpu;
23extern short ks8695_leds_timer;
24extern void __init ks8695_init_leds(u8 cpu_led, u8 timer_led);
25
26 /* PCI */
27#define KS8695_MODE_PCI 0
28#define KS8695_MODE_MINIPCI 1
29#define KS8695_MODE_CARDBUS 2
30
31struct ks8695_pci_cfg {
32 short mode;
33 int (*map_irq)(struct pci_dev *, u8, u8);
34};
35extern __init void ks8695_init_pci(struct ks8695_pci_cfg *);
36
37#endif
diff --git a/arch/arm/mach-ks8695/include/mach/dma.h b/arch/arm/mach-ks8695/include/mach/dma.h
new file mode 100644
index 000000000000..561206280089
--- /dev/null
+++ b/arch/arm/mach-ks8695/include/mach/dma.h
@@ -0,0 +1,17 @@
1/*
2 * arch/arm/mach-ks8695/include/mach/dma.h
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 */
diff --git a/arch/arm/mach-ks8695/include/mach/entry-macro.S b/arch/arm/mach-ks8695/include/mach/entry-macro.S
new file mode 100644
index 000000000000..b4fe0c11c6ce
--- /dev/null
+++ b/arch/arm/mach-ks8695/include/mach/entry-macro.S
@@ -0,0 +1,53 @@
1/*
2 * arch/arm/mach-ks8695/include/mach/entry-macro.S
3 *
4 * Copyright (C) 2006 Ben Dooks <ben@simtec.co.uk>
5 * Copyright (C) 2006 Simtec Electronics
6 *
7 * Low-level IRQ helper macros for KS8695
8 *
9 * This file is licensed under the terms of the GNU General Public
10 * License version 2. This program is licensed "as is" without any
11 * warranty of any kind, whether express or implied.
12*/
13
14#include <mach/hardware.h>
15#include <mach/regs-irq.h>
16
17 .macro disable_fiq
18 .endm
19
20 .macro get_irqnr_preamble, base, tmp
21 ldr \base, =KS8695_IRQ_VA @ Base address of interrupt controller
22 .endm
23
24 .macro arch_ret_to_user, tmp1, tmp2
25 .endm
26
27 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
28 ldr \irqstat, [\base, #KS8695_INTMS] @ Mask Status register
29
30 teq \irqstat, #0
31 beq 1001f
32
33 mov \irqnr, #0
34
35 tst \irqstat, #0xff
36 moveq \irqstat, \irqstat, lsr #8
37 addeq \irqnr, \irqnr, #8
38 tsteq \irqstat, #0xff
39 moveq \irqstat, \irqstat, lsr #8
40 addeq \irqnr, \irqnr, #8
41 tsteq \irqstat, #0xff
42 moveq \irqstat, \irqstat, lsr #8
43 addeq \irqnr, \irqnr, #8
44 tst \irqstat, #0x0f
45 moveq \irqstat, \irqstat, lsr #4
46 addeq \irqnr, \irqnr, #4
47 tst \irqstat, #0x03
48 moveq \irqstat, \irqstat, lsr #2
49 addeq \irqnr, \irqnr, #2
50 tst \irqstat, #0x01
51 addeqs \irqnr, \irqnr, #1
521001:
53 .endm
diff --git a/arch/arm/mach-ks8695/include/mach/gpio.h b/arch/arm/mach-ks8695/include/mach/gpio.h
new file mode 100644
index 000000000000..73c84168761c
--- /dev/null
+++ b/arch/arm/mach-ks8695/include/mach/gpio.h
@@ -0,0 +1,79 @@
1/*
2 * arch/arm/mach-ks8695/include/mach/gpio.h
3 *
4 * Copyright (C) 2006 Andrew Victor
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10
11#ifndef __ASM_ARCH_GPIO_H_
12#define __ASM_ARCH_GPIO_H_
13
14#define KS8695_GPIO_0 0
15#define KS8695_GPIO_1 1
16#define KS8695_GPIO_2 2
17#define KS8695_GPIO_3 3
18#define KS8695_GPIO_4 4
19#define KS8695_GPIO_5 5
20#define KS8695_GPIO_6 6
21#define KS8695_GPIO_7 7
22#define KS8695_GPIO_8 8
23#define KS8695_GPIO_9 9
24#define KS8695_GPIO_10 10
25#define KS8695_GPIO_11 11
26#define KS8695_GPIO_12 12
27#define KS8695_GPIO_13 13
28#define KS8695_GPIO_14 14
29#define KS8695_GPIO_15 15
30
31
32/*
33 * Configure GPIO pin as external interrupt source.
34 */
35int __init_or_module ks8695_gpio_interrupt(unsigned int pin, unsigned int type);
36
37/*
38 * Configure the GPIO line as an input.
39 */
40int __init_or_module gpio_direction_input(unsigned int pin);
41
42/*
43 * Configure the GPIO line as an output, with default state.
44 */
45int __init_or_module gpio_direction_output(unsigned int pin, unsigned int state);
46
47/*
48 * Set the state of an output GPIO line.
49 */
50void gpio_set_value(unsigned int pin, unsigned int state);
51
52/*
53 * Read the state of a GPIO line.
54 */
55int gpio_get_value(unsigned int pin);
56
57/*
58 * Map GPIO line to IRQ number.
59 */
60int gpio_to_irq(unsigned int pin);
61
62/*
63 * Map IRQ number to GPIO line.
64 */
65int irq_to_gpio(unsigned int irq);
66
67
68#include <asm-generic/gpio.h>
69
70static inline int gpio_request(unsigned int pin, const char *label)
71{
72 return 0;
73}
74
75static inline void gpio_free(unsigned int pin)
76{
77}
78
79#endif
diff --git a/arch/arm/mach-ks8695/include/mach/hardware.h b/arch/arm/mach-ks8695/include/mach/hardware.h
new file mode 100644
index 000000000000..1d640d075b7e
--- /dev/null
+++ b/arch/arm/mach-ks8695/include/mach/hardware.h
@@ -0,0 +1,49 @@
1/*
2 * arch/arm/mach-ks8695/include/mach/hardware.h
3 *
4 * Copyright (C) 2006 Ben Dooks <ben@simtec.co.uk>
5 * Copyright (C) 2006 Simtec Electronics
6 *
7 * KS8695 - Memory Map definitions
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12*/
13
14#ifndef __ASM_ARCH_HARDWARE_H
15#define __ASM_ARCH_HARDWARE_H
16
17#include <asm/sizes.h>
18
19/*
20 * Physical RAM address.
21 */
22#define KS8695_SDRAM_PA 0x00000000
23
24
25/*
26 * We map an entire MiB with the System Configuration Registers in even
27 * though only 64KiB is needed. This makes it easier for use with the
28 * head debug code as the initial MMU setup only deals in L1 sections.
29 */
30#define KS8695_IO_PA 0x03F00000
31#define KS8695_IO_VA 0xF0000000
32#define KS8695_IO_SIZE SZ_1M
33
34#define KS8695_PCIMEM_PA 0x60000000
35#define KS8695_PCIMEM_SIZE SZ_512M
36
37#define KS8695_PCIIO_PA 0x80000000
38#define KS8695_PCIIO_SIZE SZ_64K
39
40
41/*
42 * PCI support
43 */
44#define pcibios_assign_all_busses() 1
45
46#define PCIBIOS_MIN_IO 0
47#define PCIBIOS_MIN_MEM 0
48
49#endif
diff --git a/arch/arm/mach-ks8695/include/mach/io.h b/arch/arm/mach-ks8695/include/mach/io.h
new file mode 100644
index 000000000000..f364f24ffe1e
--- /dev/null
+++ b/arch/arm/mach-ks8695/include/mach/io.h
@@ -0,0 +1,19 @@
1/*
2 * arch/arm/mach-ks8695/include/mach/io.h
3 *
4 * Copyright (C) 2006 Andrew Victor
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10
11#ifndef __ASM_ARCH_IO_H
12#define __ASM_ARCH_IO_H
13
14#define IO_SPACE_LIMIT 0xffffffff
15
16#define __io(a) ((void __iomem *)(a))
17#define __mem_pci(a) (a)
18
19#endif
diff --git a/arch/arm/mach-ks8695/include/mach/irqs.h b/arch/arm/mach-ks8695/include/mach/irqs.h
new file mode 100644
index 000000000000..86fc9e6ce404
--- /dev/null
+++ b/arch/arm/mach-ks8695/include/mach/irqs.h
@@ -0,0 +1,54 @@
1/*
2 * arch/arm/mach-ks8695/include/mach/irqs.h
3 *
4 * Copyright (C) 2006 Simtec Electronics
5 * Ben Dooks <ben@simtec.co.uk>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 */
11
12#ifndef __ASM_ARCH_IRQS_H
13#define __ASM_ARCH_IRQS_H
14
15
16#define NR_IRQS 32
17
18/*
19 * IRQ definitions
20 */
21#define KS8695_IRQ_COMM_RX 0
22#define KS8695_IRQ_COMM_TX 1
23#define KS8695_IRQ_EXTERN0 2
24#define KS8695_IRQ_EXTERN1 3
25#define KS8695_IRQ_EXTERN2 4
26#define KS8695_IRQ_EXTERN3 5
27#define KS8695_IRQ_TIMER0 6
28#define KS8695_IRQ_TIMER1 7
29#define KS8695_IRQ_UART_TX 8
30#define KS8695_IRQ_UART_RX 9
31#define KS8695_IRQ_UART_LINE_STATUS 10
32#define KS8695_IRQ_UART_MODEM_STATUS 11
33#define KS8695_IRQ_LAN_RX_STOP 12
34#define KS8695_IRQ_LAN_TX_STOP 13
35#define KS8695_IRQ_LAN_RX_BUF 14
36#define KS8695_IRQ_LAN_TX_BUF 15
37#define KS8695_IRQ_LAN_RX_STATUS 16
38#define KS8695_IRQ_LAN_TX_STATUS 17
39#define KS8695_IRQ_HPNA_RX_STOP 18
40#define KS8695_IRQ_HPNA_TX_STOP 19
41#define KS8695_IRQ_HPNA_RX_BUF 20
42#define KS8695_IRQ_HPNA_TX_BUF 21
43#define KS8695_IRQ_HPNA_RX_STATUS 22
44#define KS8695_IRQ_HPNA_TX_STATUS 23
45#define KS8695_IRQ_BUS_ERROR 24
46#define KS8695_IRQ_WAN_RX_STOP 25
47#define KS8695_IRQ_WAN_TX_STOP 26
48#define KS8695_IRQ_WAN_RX_BUF 27
49#define KS8695_IRQ_WAN_TX_BUF 28
50#define KS8695_IRQ_WAN_RX_STATUS 29
51#define KS8695_IRQ_WAN_TX_STATUS 30
52#define KS8695_IRQ_WAN_LINK 31
53
54#endif
diff --git a/arch/arm/mach-ks8695/include/mach/memory.h b/arch/arm/mach-ks8695/include/mach/memory.h
new file mode 100644
index 000000000000..dadbe66cb75c
--- /dev/null
+++ b/arch/arm/mach-ks8695/include/mach/memory.h
@@ -0,0 +1,49 @@
1/*
2 * arch/arm/mach-ks8695/include/mach/memory.h
3 *
4 * Copyright (C) 2006 Andrew Victor
5 *
6 * KS8695 Memory definitions
7 *
8 * This file is licensed under the terms of the GNU General Public
9 * License version 2. This program is licensed "as is" without any
10 * warranty of any kind, whether express or implied.
11 */
12
13#ifndef __ASM_ARCH_MEMORY_H
14#define __ASM_ARCH_MEMORY_H
15
16#include <mach/hardware.h>
17
18/*
19 * Physical SRAM offset.
20 */
21#define PHYS_OFFSET KS8695_SDRAM_PA
22
23#ifndef __ASSEMBLY__
24
25#ifdef CONFIG_PCI
26
27/* PCI mappings */
28#define __virt_to_bus(x) ((x) - PAGE_OFFSET + KS8695_PCIMEM_PA)
29#define __bus_to_virt(x) ((x) - KS8695_PCIMEM_PA + PAGE_OFFSET)
30
31/* Platform-bus mapping */
32extern struct bus_type platform_bus_type;
33#define is_lbus_device(dev) (dev && dev->bus == &platform_bus_type)
34#define __arch_dma_to_virt(dev, x) ({ is_lbus_device(dev) ? \
35 __phys_to_virt(x) : __bus_to_virt(x); })
36#define __arch_virt_to_dma(dev, x) ({ is_lbus_device(dev) ? \
37 (dma_addr_t)__virt_to_phys(x) : (dma_addr_t)__virt_to_bus(x); })
38#define __arch_page_to_dma(dev, x) __arch_virt_to_dma(dev, page_address(x))
39
40#else
41
42#define __virt_to_bus(x) __virt_to_phys(x)
43#define __bus_to_virt(x) __phys_to_virt(x)
44
45#endif
46
47#endif
48
49#endif
diff --git a/arch/arm/mach-ks8695/include/mach/regs-gpio.h b/arch/arm/mach-ks8695/include/mach/regs-gpio.h
new file mode 100644
index 000000000000..0df6fe61d1ce
--- /dev/null
+++ b/arch/arm/mach-ks8695/include/mach/regs-gpio.h
@@ -0,0 +1,55 @@
1/*
2 * arch/arm/mach-ks8695/include/mach/regs-gpio.h
3 *
4 * Copyright (C) 2007 Andrew Victor
5 *
6 * KS8695 - GPIO control registers and bit definitions.
7 *
8 * This file is licensed under the terms of the GNU General Public
9 * License version 2. This program is licensed "as is" without any
10 * warranty of any kind, whether express or implied.
11 */
12
13#ifndef KS8695_GPIO_H
14#define KS8695_GPIO_H
15
16#define KS8695_GPIO_OFFSET (0xF0000 + 0xE600)
17#define KS8695_GPIO_VA (KS8695_IO_VA + KS8695_GPIO_OFFSET)
18#define KS8695_GPIO_PA (KS8695_IO_PA + KS8695_GPIO_OFFSET)
19
20
21#define KS8695_IOPM (0x00) /* I/O Port Mode Register */
22#define KS8695_IOPC (0x04) /* I/O Port Control Register */
23#define KS8695_IOPD (0x08) /* I/O Port Data Register */
24
25
26/* Port Mode Register */
27#define IOPM_(x) (1 << (x)) /* Mode for GPIO Pin x */
28
29/* Port Control Register */
30#define IOPC_IOTIM1EN (1 << 17) /* GPIO Pin for Timer1 Enable */
31#define IOPC_IOTIM0EN (1 << 16) /* GPIO Pin for Timer0 Enable */
32#define IOPC_IOEINT3EN (1 << 15) /* GPIO Pin for External/Soft Interrupt 3 Enable */
33#define IOPC_IOEINT3TM (7 << 12) /* GPIO Pin for External/Soft Interrupt 3 Trigger Mode */
34#define IOPC_IOEINT3_MODE(x) ((x) << 12)
35#define IOPC_IOEINT2EN (1 << 11) /* GPIO Pin for External/Soft Interrupt 2 Enable */
36#define IOPC_IOEINT2TM (7 << 8) /* GPIO Pin for External/Soft Interrupt 2 Trigger Mode */
37#define IOPC_IOEINT2_MODE(x) ((x) << 8)
38#define IOPC_IOEINT1EN (1 << 7) /* GPIO Pin for External/Soft Interrupt 1 Enable */
39#define IOPC_IOEINT1TM (7 << 4) /* GPIO Pin for External/Soft Interrupt 1 Trigger Mode */
40#define IOPC_IOEINT1_MODE(x) ((x) << 4)
41#define IOPC_IOEINT0EN (1 << 3) /* GPIO Pin for External/Soft Interrupt 0 Enable */
42#define IOPC_IOEINT0TM (7 << 0) /* GPIO Pin for External/Soft Interrupt 0 Trigger Mode */
43#define IOPC_IOEINT0_MODE(x) ((x) << 0)
44
45 /* Trigger Modes */
46#define IOPC_TM_LOW (0) /* Level Detection (Active Low) */
47#define IOPC_TM_HIGH (1) /* Level Detection (Active High) */
48#define IOPC_TM_RISING (2) /* Rising Edge Detection */
49#define IOPC_TM_FALLING (4) /* Falling Edge Detection */
50#define IOPC_TM_EDGE (6) /* Both Edge Detection */
51
52/* Port Data Register */
53#define IOPD_(x) (1 << (x)) /* Signal Level of GPIO Pin x */
54
55#endif
diff --git a/arch/arm/mach-ks8695/include/mach/regs-hpna.h b/arch/arm/mach-ks8695/include/mach/regs-hpna.h
new file mode 100644
index 000000000000..815ce5c2e3b9
--- /dev/null
+++ b/arch/arm/mach-ks8695/include/mach/regs-hpna.h
@@ -0,0 +1,25 @@
1/*
2 * arch/arm/mach-ks8695/include/mach/regs-wan.h
3 *
4 * Copyright (C) 2006 Andrew Victor
5 *
6 * KS8695 - HPNA Registers and bit definitions.
7 *
8 * This file is licensed under the terms of the GNU General Public
9 * License version 2. This program is licensed "as is" without any
10 * warranty of any kind, whether express or implied.
11 */
12
13#ifndef KS8695_HPNA_H
14#define KS8695_HPNA_H
15
16#define KS8695_HPNA_OFFSET (0xF0000 + 0xA000)
17#define KS8695_HPNA_VA (KS8695_IO_VA + KS8695_HPNA_OFFSET)
18#define KS8695_HPNA_PA (KS8695_IO_PA + KS8695_HPNA_OFFSET)
19
20
21/*
22 * HPNA registers
23 */
24
25#endif
diff --git a/arch/arm/mach-ks8695/include/mach/regs-irq.h b/arch/arm/mach-ks8695/include/mach/regs-irq.h
new file mode 100644
index 000000000000..352b7e8704d5
--- /dev/null
+++ b/arch/arm/mach-ks8695/include/mach/regs-irq.h
@@ -0,0 +1,41 @@
1/*
2 * arch/arm/mach-ks8695/include/mach/regs-irq.h
3 *
4 * Copyright (C) 2006 Ben Dooks <ben@simtec.co.uk>
5 * Copyright (C) 2006 Simtec Electronics
6 *
7 * KS8695 - IRQ registers and bit definitions
8 *
9 * This file is licensed under the terms of the GNU General Public
10 * License version 2. This program is licensed "as is" without any
11 * warranty of any kind, whether express or implied.
12 */
13
14#ifndef KS8695_IRQ_H
15#define KS8695_IRQ_H
16
17#define KS8695_IRQ_OFFSET (0xF0000 + 0xE200)
18#define KS8695_IRQ_VA (KS8695_IO_VA + KS8695_IRQ_OFFSET)
19#define KS8695_IRQ_PA (KS8695_IO_PA + KS8695_IRQ_OFFSET)
20
21
22/*
23 * Interrupt Controller registers
24 */
25#define KS8695_INTMC (0x00) /* Mode Control Register */
26#define KS8695_INTEN (0x04) /* Interrupt Enable Register */
27#define KS8695_INTST (0x08) /* Interrupt Status Register */
28#define KS8695_INTPW (0x0c) /* Interrupt Priority (WAN MAC) */
29#define KS8695_INTPH (0x10) /* Interrupt Priority (HPNA) [KS8695 only] */
30#define KS8695_INTPL (0x14) /* Interrupt Priority (LAN MAC) */
31#define KS8695_INTPT (0x18) /* Interrupt Priority (Timer) */
32#define KS8695_INTPU (0x1c) /* Interrupt Priority (UART) */
33#define KS8695_INTPE (0x20) /* Interrupt Priority (External Interrupt) */
34#define KS8695_INTPC (0x24) /* Interrupt Priority (Communications Channel) */
35#define KS8695_INTPBE (0x28) /* Interrupt Priority (Bus Error Response) */
36#define KS8695_INTMS (0x2c) /* Interrupt Mask Status Register */
37#define KS8695_INTHPF (0x30) /* Interrupt Pending Highest Priority (FIQ) */
38#define KS8695_INTHPI (0x34) /* Interrupt Pending Highest Priority (IRQ) */
39
40
41#endif
diff --git a/arch/arm/mach-ks8695/include/mach/regs-lan.h b/arch/arm/mach-ks8695/include/mach/regs-lan.h
new file mode 100644
index 000000000000..9ef409901e76
--- /dev/null
+++ b/arch/arm/mach-ks8695/include/mach/regs-lan.h
@@ -0,0 +1,65 @@
1/*
2 * arch/arm/mach-ks8695/include/mach/regs-lan.h
3 *
4 * Copyright (C) 2006 Andrew Victor
5 *
6 * KS8695 - LAN Registers and bit definitions.
7 *
8 * This file is licensed under the terms of the GNU General Public
9 * License version 2. This program is licensed "as is" without any
10 * warranty of any kind, whether express or implied.
11 */
12
13#ifndef KS8695_LAN_H
14#define KS8695_LAN_H
15
16#define KS8695_LAN_OFFSET (0xF0000 + 0x8000)
17#define KS8695_LAN_VA (KS8695_IO_VA + KS8695_LAN_OFFSET)
18#define KS8695_LAN_PA (KS8695_IO_PA + KS8695_LAN_OFFSET)
19
20
21/*
22 * LAN registers
23 */
24#define KS8695_LMDTXC (0x00) /* DMA Transmit Control */
25#define KS8695_LMDRXC (0x04) /* DMA Receive Control */
26#define KS8695_LMDTSC (0x08) /* DMA Transmit Start Command */
27#define KS8695_LMDRSC (0x0c) /* DMA Receive Start Command */
28#define KS8695_LTDLB (0x10) /* Transmit Descriptor List Base Address */
29#define KS8695_LRDLB (0x14) /* Receive Descriptor List Base Address */
30#define KS8695_LMAL (0x18) /* MAC Station Address Low */
31#define KS8695_LMAH (0x1c) /* MAC Station Address High */
32#define KS8695_LMAAL_(n) (0x80 + ((n)*8)) /* MAC Additional Station Address (0..15) Low */
33#define KS8695_LMAAH_(n) (0x84 + ((n)*8)) /* MAC Additional Station Address (0..15) High */
34
35
36/* DMA Transmit Control Register */
37#define LMDTXC_LMTRST (1 << 31) /* Soft Reset */
38#define LMDTXC_LMTBS (0x3f << 24) /* Transmit Burst Size */
39#define LMDTXC_LMTUCG (1 << 18) /* Transmit UDP Checksum Generate */
40#define LMDTXC_LMTTCG (1 << 17) /* Transmit TCP Checksum Generate */
41#define LMDTXC_LMTICG (1 << 16) /* Transmit IP Checksum Generate */
42#define LMDTXC_LMTFCE (1 << 9) /* Transmit Flow Control Enable */
43#define LMDTXC_LMTLB (1 << 8) /* Loopback mode */
44#define LMDTXC_LMTEP (1 << 2) /* Transmit Enable Padding */
45#define LMDTXC_LMTAC (1 << 1) /* Transmit Add CRC */
46#define LMDTXC_LMTE (1 << 0) /* TX Enable */
47
48/* DMA Receive Control Register */
49#define LMDRXC_LMRBS (0x3f << 24) /* Receive Burst Size */
50#define LMDRXC_LMRUCC (1 << 18) /* Receive UDP Checksum check */
51#define LMDRXC_LMRTCG (1 << 17) /* Receive TCP Checksum check */
52#define LMDRXC_LMRICG (1 << 16) /* Receive IP Checksum check */
53#define LMDRXC_LMRFCE (1 << 9) /* Receive Flow Control Enable */
54#define LMDRXC_LMRB (1 << 6) /* Receive Broadcast */
55#define LMDRXC_LMRM (1 << 5) /* Receive Multicast */
56#define LMDRXC_LMRU (1 << 4) /* Receive Unicast */
57#define LMDRXC_LMRERR (1 << 3) /* Receive Error Frame */
58#define LMDRXC_LMRA (1 << 2) /* Receive All */
59#define LMDRXC_LMRE (1 << 1) /* RX Enable */
60
61/* Additional Station Address High */
62#define LMAAH_E (1 << 31) /* Address Enabled */
63
64
65#endif
diff --git a/arch/arm/mach-ks8695/include/mach/regs-mem.h b/arch/arm/mach-ks8695/include/mach/regs-mem.h
new file mode 100644
index 000000000000..55806bc68ce3
--- /dev/null
+++ b/arch/arm/mach-ks8695/include/mach/regs-mem.h
@@ -0,0 +1,89 @@
1/*
2 * arch/arm/mach-ks8695/include/mach/regs-mem.h
3 *
4 * Copyright (C) 2006 Andrew Victor
5 *
6 * KS8695 - Memory Controller registers and bit definitions
7 *
8 * This file is licensed under the terms of the GNU General Public
9 * License version 2. This program is licensed "as is" without any
10 * warranty of any kind, whether express or implied.
11 */
12
13#ifndef KS8695_MEM_H
14#define KS8695_MEM_H
15
16#define KS8695_MEM_OFFSET (0xF0000 + 0x4000)
17#define KS8695_MEM_VA (KS8695_IO_VA + KS8695_MEM_OFFSET)
18#define KS8695_MEM_PA (KS8695_IO_PA + KS8695_MEM_OFFSET)
19
20
21/*
22 * Memory Controller Registers
23 */
24#define KS8695_EXTACON0 (0x00) /* External I/O 0 Access Control */
25#define KS8695_EXTACON1 (0x04) /* External I/O 1 Access Control */
26#define KS8695_EXTACON2 (0x08) /* External I/O 2 Access Control */
27#define KS8695_ROMCON0 (0x10) /* ROM/SRAM/Flash 1 Control Register */
28#define KS8695_ROMCON1 (0x14) /* ROM/SRAM/Flash 2 Control Register */
29#define KS8695_ERGCON (0x20) /* External I/O and ROM/SRAM/Flash General Register */
30#define KS8695_SDCON0 (0x30) /* SDRAM Control Register 0 */
31#define KS8695_SDCON1 (0x34) /* SDRAM Control Register 1 */
32#define KS8695_SDGCON (0x38) /* SDRAM General Control */
33#define KS8695_SDBCON (0x3c) /* SDRAM Buffer Control */
34#define KS8695_REFTIM (0x40) /* SDRAM Refresh Timer */
35
36
37/* External I/O Access Control Registers */
38#define EXTACON_EBNPTR (0x3ff << 22) /* Last Address Pointer */
39#define EXTACON_EBBPTR (0x3ff << 12) /* Base Pointer */
40#define EXTACON_EBTACT (7 << 9) /* Write Enable/Output Enable Active Time */
41#define EXTACON_EBTCOH (7 << 6) /* Chip Select Hold Time */
42#define EXTACON_EBTACS (7 << 3) /* Address Setup Time before ECSN */
43#define EXTACON_EBTCOS (7 << 0) /* Chip Select Time before OEN */
44
45/* ROM/SRAM/Flash Control Register */
46#define ROMCON_RBNPTR (0x3ff << 22) /* Next Pointer */
47#define ROMCON_RBBPTR (0x3ff << 12) /* Base Pointer */
48#define ROMCON_RBTACC (7 << 4) /* Access Cycle Time */
49#define ROMCON_RBTPA (3 << 2) /* Page Address Access Time */
50#define ROMCON_PMC (3 << 0) /* Page Mode Configuration */
51#define PMC_NORMAL (0 << 0)
52#define PMC_4WORD (1 << 0)
53#define PMC_8WORD (2 << 0)
54#define PMC_16WORD (3 << 0)
55
56/* External I/O and ROM/SRAM/Flash General Register */
57#define ERGCON_TMULT (3 << 28) /* Time Multiplier */
58#define ERGCON_DSX2 (3 << 20) /* Data Width (External I/O Bank 2) */
59#define ERGCON_DSX1 (3 << 18) /* Data Width (External I/O Bank 1) */
60#define ERGCON_DSX0 (3 << 16) /* Data Width (External I/O Bank 0) */
61#define ERGCON_DSR1 (3 << 2) /* Data Width (ROM/SRAM/Flash Bank 1) */
62#define ERGCON_DSR0 (3 << 0) /* Data Width (ROM/SRAM/Flash Bank 0) */
63
64/* SDRAM Control Register */
65#define SDCON_DBNPTR (0x3ff << 22) /* Last Address Pointer */
66#define SDCON_DBBPTR (0x3ff << 12) /* Base Pointer */
67#define SDCON_DBCAB (3 << 8) /* Column Address Bits */
68#define SDCON_DBBNUM (1 << 3) /* Number of Banks */
69#define SDCON_DBDBW (3 << 1) /* Data Bus Width */
70
71/* SDRAM General Control Register */
72#define SDGCON_SDTRC (3 << 2) /* RAS to CAS latency */
73#define SDGCON_SDCAS (3 << 0) /* CAS latency */
74
75/* SDRAM Buffer Control Register */
76#define SDBCON_SDESTA (1 << 31) /* SDRAM Engine Status */
77#define SDBCON_RBUFBDIS (1 << 24) /* Read Buffer Burst Enable */
78#define SDBCON_WFIFOEN (1 << 23) /* Write FIFO Enable */
79#define SDBCON_RBUFEN (1 << 22) /* Read Buffer Enable */
80#define SDBCON_FLUSHWFIFO (1 << 21) /* Flush Write FIFO */
81#define SDBCON_RBUFINV (1 << 20) /* Read Buffer Invalidate */
82#define SDBCON_SDINI (3 << 16) /* SDRAM Initialization Control */
83#define SDBCON_SDMODE (0x3fff << 0) /* SDRAM Mode Register Value Program */
84
85/* SDRAM Refresh Timer Register */
86#define REFTIM_REFTIM (0xffff << 0) /* Refresh Timer Value */
87
88
89#endif
diff --git a/arch/arm/mach-ks8695/include/mach/regs-misc.h b/arch/arm/mach-ks8695/include/mach/regs-misc.h
new file mode 100644
index 000000000000..2740c52494a0
--- /dev/null
+++ b/arch/arm/mach-ks8695/include/mach/regs-misc.h
@@ -0,0 +1,97 @@
1/*
2 * arch/arm/mach-ks8695/include/mach/regs-misc.h
3 *
4 * Copyright (C) 2006 Andrew Victor
5 *
6 * KS8695 - Miscellaneous Registers
7 *
8 * This file is licensed under the terms of the GNU General Public
9 * License version 2. This program is licensed "as is" without any
10 * warranty of any kind, whether express or implied.
11 */
12
13#ifndef KS8695_MISC_H
14#define KS8695_MISC_H
15
16#define KS8695_MISC_OFFSET (0xF0000 + 0xEA00)
17#define KS8695_MISC_VA (KS8695_IO_VA + KS8695_MISC_OFFSET)
18#define KS8695_MISC_PA (KS8695_IO_PA + KS8695_MISC_OFFSET)
19
20
21/*
22 * Miscellaneous registers
23 */
24#define KS8695_DID (0x00) /* Device ID */
25#define KS8695_RID (0x04) /* Revision ID */
26#define KS8695_HMC (0x08) /* HPNA Miscellaneous Control [KS8695 only] */
27#define KS8695_WMC (0x0c) /* WAN Miscellaneous Control */
28#define KS8695_WPPM (0x10) /* WAN PHY Power Management */
29#define KS8695_PPS (0x1c) /* PHY PowerSave */
30
31/* Device ID Register */
32#define DID_ID (0xffff << 0) /* Device ID */
33
34/* Revision ID Register */
35#define RID_SUBID (0xf << 4) /* Sub-Device ID */
36#define RID_REVISION (0xf << 0) /* Revision ID */
37
38/* HPNA Miscellaneous Control Register */
39#define HMC_HSS (1 << 1) /* Speed */
40#define HMC_HDS (1 << 0) /* Duplex */
41
42/* WAN Miscellaneous Control Register */
43#define WMC_WANC (1 << 30) /* Auto-negotiation complete */
44#define WMC_WANR (1 << 29) /* Auto-negotiation restart */
45#define WMC_WANAP (1 << 28) /* Advertise Pause */
46#define WMC_WANA100F (1 << 27) /* Advertise 100 FDX */
47#define WMC_WANA100H (1 << 26) /* Advertise 100 HDX */
48#define WMC_WANA10F (1 << 25) /* Advertise 10 FDX */
49#define WMC_WANA10H (1 << 24) /* Advertise 10 HDX */
50#define WMC_WLS (1 << 23) /* Link status */
51#define WMC_WDS (1 << 22) /* Duplex status */
52#define WMC_WSS (1 << 21) /* Speed status */
53#define WMC_WLPP (1 << 20) /* Link Partner Pause */
54#define WMC_WLP100F (1 << 19) /* Link Partner 100 FDX */
55#define WMC_WLP100H (1 << 18) /* Link Partner 100 HDX */
56#define WMC_WLP10F (1 << 17) /* Link Partner 10 FDX */
57#define WMC_WLP10H (1 << 16) /* Link Partner 10 HDX */
58#define WMC_WAND (1 << 15) /* Auto-negotiation disable */
59#define WMC_WANF100 (1 << 14) /* Force 100 */
60#define WMC_WANFF (1 << 13) /* Force FDX */
61#define WMC_WLED1S (7 << 4) /* LED1 Select */
62#define WLED1S_SPEED (0 << 4)
63#define WLED1S_LINK (1 << 4)
64#define WLED1S_DUPLEX (2 << 4)
65#define WLED1S_COLLISION (3 << 4)
66#define WLED1S_ACTIVITY (4 << 4)
67#define WLED1S_FDX_COLLISION (5 << 4)
68#define WLED1S_LINK_ACTIVITY (6 << 4)
69#define WMC_WLED0S (7 << 0) /* LED0 Select */
70#define WLED0S_SPEED (0 << 0)
71#define WLED0S_LINK (1 << 0)
72#define WLED0S_DUPLEX (2 << 0)
73#define WLED0S_COLLISION (3 << 0)
74#define WLED0S_ACTIVITY (4 << 0)
75#define WLED0S_FDX_COLLISION (5 << 0)
76#define WLED0S_LINK_ACTIVITY (6 << 0)
77
78/* WAN PHY Power Management Register */
79#define WPPM_WLPBK (1 << 14) /* Local Loopback */
80#define WPPM_WRLPKB (1 << 13) /* Remove Loopback */
81#define WPPM_WPI (1 << 12) /* PHY isolate */
82#define WPPM_WFL (1 << 10) /* Force link */
83#define WPPM_MDIXS (1 << 9) /* MDIX Status */
84#define WPPM_FEF (1 << 8) /* Far End Fault */
85#define WPPM_AMDIXP (1 << 7) /* Auto MDIX Parameter */
86#define WPPM_TXDIS (1 << 6) /* Disable transmitter */
87#define WPPM_DFEF (1 << 5) /* Disable Far End Fault */
88#define WPPM_PD (1 << 4) /* Power Down */
89#define WPPM_DMDX (1 << 3) /* Disable Auto MDI/MDIX */
90#define WPPM_FMDX (1 << 2) /* Force MDIX */
91#define WPPM_LPBK (1 << 1) /* MAX Loopback */
92
93/* PHY Power Save Register */
94#define PPS_PPSM (1 << 0) /* PHY Power Save Mode */
95
96
97#endif
diff --git a/arch/arm/mach-ks8695/include/mach/regs-pci.h b/arch/arm/mach-ks8695/include/mach/regs-pci.h
new file mode 100644
index 000000000000..75a9db6edbd9
--- /dev/null
+++ b/arch/arm/mach-ks8695/include/mach/regs-pci.h
@@ -0,0 +1,53 @@
1/*
2 * arch/arm/mach-ks8695/include/mach/regs-pci.h
3 *
4 * Copyright (C) 2006 Ben Dooks <ben@simtec.co.uk>
5 * Copyright (C) 2006 Simtec Electronics
6 *
7 * KS8695 - PCI bridge registers and bit definitions.
8 *
9 * This file is licensed under the terms of the GNU General Public
10 * License version 2. This program is licensed "as is" without any
11 * warranty of any kind, whether express or implied.
12 */
13
14#define KS8695_PCI_OFFSET (0xF0000 + 0x2000)
15#define KS8695_PCI_VA (KS8695_IO_VA + KS8695_PCI_OFFSET)
16#define KS8695_PCI_PA (KS8695_IO_PA + KS8695_PCI_OFFSET)
17
18
19#define KS8695_CRCFID (0x000) /* Configuration: Identification */
20#define KS8695_CRCFCS (0x004) /* Configuration: Command and Status */
21#define KS8695_CRCFRV (0x008) /* Configuration: Revision */
22#define KS8695_CRCFLT (0x00C) /* Configuration: Latency Timer */
23#define KS8695_CRCBMA (0x010) /* Configuration: Base Memory Address */
24#define KS8695_CRCSID (0x02C) /* Configuration: Subsystem ID */
25#define KS8695_CRCFIT (0x03C) /* Configuration: Interrupt */
26#define KS8695_PBCA (0x100) /* Bridge Configuration Address */
27#define KS8695_PBCD (0x104) /* Bridge Configuration Data */
28#define KS8695_PBM (0x200) /* Bridge Mode */
29#define KS8695_PBCS (0x204) /* Bridge Control and Status */
30#define KS8695_PMBA (0x208) /* Bridge Memory Base Address */
31#define KS8695_PMBAC (0x20C) /* Bridge Memory Base Address Control */
32#define KS8695_PMBAM (0x210) /* Bridge Memory Base Address Mask */
33#define KS8695_PMBAT (0x214) /* Bridge Memory Base Address Translation */
34#define KS8695_PIOBA (0x218) /* Bridge I/O Base Address */
35#define KS8695_PIOBAC (0x21C) /* Bridge I/O Base Address Control */
36#define KS8695_PIOBAM (0x220) /* Bridge I/O Base Address Mask */
37#define KS8695_PIOBAT (0x224) /* Bridge I/O Base Address Translation */
38
39
40/* Configuration: Identification */
41
42/* Configuration: Command and Status */
43
44/* Configuration: Revision */
45
46
47
48#define CFRV_GUEST (1 << 23)
49
50#define PBCA_TYPE1 (1)
51#define PBCA_ENABLE (1 << 31)
52
53
diff --git a/arch/arm/mach-ks8695/include/mach/regs-switch.h b/arch/arm/mach-ks8695/include/mach/regs-switch.h
new file mode 100644
index 000000000000..56d12e8de895
--- /dev/null
+++ b/arch/arm/mach-ks8695/include/mach/regs-switch.h
@@ -0,0 +1,66 @@
1/*
2 * arch/arm/mach-ks8695/include/mach/regs-switch.h
3 *
4 * Copyright (C) 2006 Andrew Victor
5 *
6 * KS8695 - Switch Registers and bit definitions.
7 *
8 * This file is licensed under the terms of the GNU General Public
9 * License version 2. This program is licensed "as is" without any
10 * warranty of any kind, whether express or implied.
11 */
12
13#ifndef KS8695_SWITCH_H
14#define KS8695_SWITCH_H
15
16#define KS8695_SWITCH_OFFSET (0xF0000 + 0xe800)
17#define KS8695_SWITCH_VA (KS8695_IO_VA + KS8695_SWITCH_OFFSET)
18#define KS8695_SWITCH_PA (KS8695_IO_PA + KS8695_SWITCH_OFFSET)
19
20
21/*
22 * Switch registers
23 */
24#define KS8695_SEC0 (0x00) /* Switch Engine Control 0 */
25#define KS8695_SEC1 (0x04) /* Switch Engine Control 1 */
26#define KS8695_SEC2 (0x08) /* Switch Engine Control 2 */
27
28#define KS8695_P(x)_C(z) (0xc0 + (((x)-1)*3 + ((z)-1))*4) /* Port Configuration Registers */
29
30#define KS8695_SEP12AN (0x48) /* Port 1 & 2 Auto-Negotiation */
31#define KS8695_SEP34AN (0x4c) /* Port 3 & 4 Auto-Negotiation */
32#define KS8695_SEIAC (0x50) /* Indirect Access Control */
33#define KS8695_SEIADH2 (0x54) /* Indirect Access Data High 2 */
34#define KS8695_SEIADH1 (0x58) /* Indirect Access Data High 1 */
35#define KS8695_SEIADL (0x5c) /* Indirect Access Data Low */
36#define KS8695_SEAFC (0x60) /* Advance Feature Control */
37#define KS8695_SEDSCPH (0x64) /* TOS Priority High */
38#define KS8695_SEDSCPL (0x68) /* TOS Priority Low */
39#define KS8695_SEMAH (0x6c) /* Switch Engine MAC Address High */
40#define KS8695_SEMAL (0x70) /* Switch Engine MAC Address Low */
41#define KS8695_LPPM12 (0x74) /* Port 1 & 2 PHY Power Management */
42#define KS8695_LPPM34 (0x78) /* Port 3 & 4 PHY Power Management */
43
44
45/* Switch Engine Control 0 */
46#define SEC0_LLED1S (7 << 25) /* LED1 Select */
47#define LLED1S_SPEED (0 << 25)
48#define LLED1S_LINK (1 << 25)
49#define LLED1S_DUPLEX (2 << 25)
50#define LLED1S_COLLISION (3 << 25)
51#define LLED1S_ACTIVITY (4 << 25)
52#define LLED1S_FDX_COLLISION (5 << 25)
53#define LLED1S_LINK_ACTIVITY (6 << 25)
54#define SEC0_LLED0S (7 << 22) /* LED0 Select */
55#define LLED0S_SPEED (0 << 22)
56#define LLED0S_LINK (1 << 22)
57#define LLED0S_DUPLEX (2 << 22)
58#define LLED0S_COLLISION (3 << 22)
59#define LLED0S_ACTIVITY (4 << 22)
60#define LLED0S_FDX_COLLISION (5 << 22)
61#define LLED0S_LINK_ACTIVITY (6 << 22)
62#define SEC0_ENABLE (1 << 0) /* Enable Switch */
63
64
65
66#endif
diff --git a/arch/arm/mach-ks8695/include/mach/regs-sys.h b/arch/arm/mach-ks8695/include/mach/regs-sys.h
new file mode 100644
index 000000000000..57c20be0c129
--- /dev/null
+++ b/arch/arm/mach-ks8695/include/mach/regs-sys.h
@@ -0,0 +1,34 @@
1/*
2 * arch/arm/mach-ks8695/include/mach/regs-sys.h
3 *
4 * Copyright (C) 2006 Ben Dooks <ben@simtec.co.uk>
5 * Copyright (C) 2006 Simtec Electronics
6 *
7 * KS8695 - System control registers and bit definitions
8 *
9 * This file is licensed under the terms of the GNU General Public
10 * License version 2. This program is licensed "as is" without any
11 * warranty of any kind, whether express or implied.
12 */
13
14#ifndef KS8695_SYS_H
15#define KS8695_SYS_H
16
17#define KS8695_SYS_OFFSET (0xF0000 + 0x0000)
18#define KS8695_SYS_VA (KS8695_IO_VA + KS8695_SYS_OFFSET)
19#define KS8695_SYS_PA (KS8695_IO_PA + KS8695_SYS_OFFSET)
20
21
22#define KS8695_SYSCFG (0x00) /* System Configuration Register */
23#define KS8695_CLKCON (0x04) /* System Clock and Bus Control Register */
24
25
26/* System Configuration Register */
27#define SYSCFG_SPRBP (0x3ff << 16) /* Register Bank Base Pointer */
28
29/* System Clock and Bus Control Register */
30#define CLKCON_SFMODE (1 << 8) /* System Fast Mode for Simulation */
31#define CLKCON_SCDC (7 << 0) /* System Clock Divider Select */
32
33
34#endif
diff --git a/arch/arm/mach-ks8695/include/mach/regs-timer.h b/arch/arm/mach-ks8695/include/mach/regs-timer.h
new file mode 100644
index 000000000000..e620cda99d2d
--- /dev/null
+++ b/arch/arm/mach-ks8695/include/mach/regs-timer.h
@@ -0,0 +1,40 @@
1/*
2 * arch/arm/mach-ks8695/include/mach/regs-timer.h
3 *
4 * Copyright (C) 2006 Ben Dooks <ben@simtec.co.uk>
5 * Copyright (C) 2006 Simtec Electronics
6 *
7 * KS8695 - Timer registers and bit definitions.
8 *
9 * This file is licensed under the terms of the GNU General Public
10 * License version 2. This program is licensed "as is" without any
11 * warranty of any kind, whether express or implied.
12 */
13
14#ifndef KS8695_TIMER_H
15#define KS8695_TIMER_H
16
17#define KS8695_TMR_OFFSET (0xF0000 + 0xE400)
18#define KS8695_TMR_VA (KS8695_IO_VA + KS8695_TMR_OFFSET)
19#define KS8695_TMR_PA (KS8695_IO_PA + KS8695_TMR_OFFSET)
20
21
22/*
23 * Timer registers
24 */
25#define KS8695_TMCON (0x00) /* Timer Control Register */
26#define KS8695_T1TC (0x04) /* Timer 1 Timeout Count Register */
27#define KS8695_T0TC (0x08) /* Timer 0 Timeout Count Register */
28#define KS8695_T1PD (0x0C) /* Timer 1 Pulse Count Register */
29#define KS8695_T0PD (0x10) /* Timer 0 Pulse Count Register */
30
31
32/* Timer Control Register */
33#define TMCON_T1EN (1 << 1) /* Timer 1 Enable */
34#define TMCON_T0EN (1 << 0) /* Timer 0 Enable */
35
36/* Timer0 Timeout Counter Register */
37#define T0TC_WATCHDOG (0xff) /* Enable watchdog mode */
38
39
40#endif
diff --git a/arch/arm/mach-ks8695/include/mach/regs-uart.h b/arch/arm/mach-ks8695/include/mach/regs-uart.h
new file mode 100644
index 000000000000..8581fbc6245f
--- /dev/null
+++ b/arch/arm/mach-ks8695/include/mach/regs-uart.h
@@ -0,0 +1,92 @@
1/*
2 * arch/arm/mach-ks8695/include/mach/regs-uart.h
3 *
4 * Copyright (C) 2006 Ben Dooks <ben@simtec.co.uk>
5 * Copyright (C) 2006 Simtec Electronics
6 *
7 * KS8695 - UART register and bit definitions.
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12 */
13
14#ifndef KS8695_UART_H
15#define KS8695_UART_H
16
17#define KS8695_UART_OFFSET (0xF0000 + 0xE000)
18#define KS8695_UART_VA (KS8695_IO_VA + KS8695_UART_OFFSET)
19#define KS8695_UART_PA (KS8695_IO_PA + KS8695_UART_OFFSET)
20
21
22/*
23 * UART registers
24 */
25#define KS8695_URRB (0x00) /* Receive Buffer Register */
26#define KS8695_URTH (0x04) /* Transmit Holding Register */
27#define KS8695_URFC (0x08) /* FIFO Control Register */
28#define KS8695_URLC (0x0C) /* Line Control Register */
29#define KS8695_URMC (0x10) /* Modem Control Register */
30#define KS8695_URLS (0x14) /* Line Status Register */
31#define KS8695_URMS (0x18) /* Modem Status Register */
32#define KS8695_URBD (0x1C) /* Baud Rate Divisor Register */
33#define KS8695_USR (0x20) /* Status Register */
34
35
36/* FIFO Control Register */
37#define URFC_URFRT (3 << 6) /* Receive FIFO Trigger Level */
38#define URFC_URFRT_1 (0 << 6)
39#define URFC_URFRT_4 (1 << 6)
40#define URFC_URFRT_8 (2 << 6)
41#define URFC_URFRT_14 (3 << 6)
42#define URFC_URTFR (1 << 2) /* Transmit FIFO Reset */
43#define URFC_URRFR (1 << 1) /* Receive FIFO Reset */
44#define URFC_URFE (1 << 0) /* FIFO Enable */
45
46/* Line Control Register */
47#define URLC_URSBC (1 << 6) /* Set Break Condition */
48#define URLC_PARITY (7 << 3) /* Parity */
49#define URPE_NONE (0 << 3)
50#define URPE_ODD (1 << 3)
51#define URPE_EVEN (3 << 3)
52#define URPE_MARK (5 << 3)
53#define URPE_SPACE (7 << 3)
54#define URLC_URSB (1 << 2) /* Stop Bits */
55#define URLC_URCL (3 << 0) /* Character Length */
56#define URCL_5 (0 << 0)
57#define URCL_6 (1 << 0)
58#define URCL_7 (2 << 0)
59#define URCL_8 (3 << 0)
60
61/* Modem Control Register */
62#define URMC_URLB (1 << 4) /* Loop-back mode */
63#define URMC_UROUT2 (1 << 3) /* OUT2 signal */
64#define URMC_UROUT1 (1 << 2) /* OUT1 signal */
65#define URMC_URRTS (1 << 1) /* Request to Send */
66#define URMC_URDTR (1 << 0) /* Data Terminal Ready */
67
68/* Line Status Register */
69#define URLS_URRFE (1 << 7) /* Receive FIFO Error */
70#define URLS_URTE (1 << 6) /* Transmit Empty */
71#define URLS_URTHRE (1 << 5) /* Transmit Holding Register Empty */
72#define URLS_URBI (1 << 4) /* Break Interrupt */
73#define URLS_URFE (1 << 3) /* Framing Error */
74#define URLS_URPE (1 << 2) /* Parity Error */
75#define URLS_URROE (1 << 1) /* Receive Overrun Error */
76#define URLS_URDR (1 << 0) /* Receive Data Ready */
77
78/* Modem Status Register */
79#define URMS_URDCD (1 << 7) /* Data Carrier Detect */
80#define URMS_URRI (1 << 6) /* Ring Indicator */
81#define URMS_URDSR (1 << 5) /* Data Set Ready */
82#define URMS_URCTS (1 << 4) /* Clear to Send */
83#define URMS_URDDCD (1 << 3) /* Delta Data Carrier Detect */
84#define URMS_URTERI (1 << 2) /* Trailing Edge Ring Indicator */
85#define URMS_URDDST (1 << 1) /* Delta Data Set Ready */
86#define URMS_URDCTS (1 << 0) /* Delta Clear to Send */
87
88/* Status Register */
89#define USR_UTI (1 << 0) /* Timeout Indication */
90
91
92#endif
diff --git a/arch/arm/mach-ks8695/include/mach/regs-wan.h b/arch/arm/mach-ks8695/include/mach/regs-wan.h
new file mode 100644
index 000000000000..eb494ec6e956
--- /dev/null
+++ b/arch/arm/mach-ks8695/include/mach/regs-wan.h
@@ -0,0 +1,65 @@
1/*
2 * arch/arm/mach-ks8695/include/mach/regs-wan.h
3 *
4 * Copyright (C) 2006 Andrew Victor
5 *
6 * KS8695 - WAN Registers and bit definitions.
7 *
8 * This file is licensed under the terms of the GNU General Public
9 * License version 2. This program is licensed "as is" without any
10 * warranty of any kind, whether express or implied.
11 */
12
13#ifndef KS8695_WAN_H
14#define KS8695_WAN_H
15
16#define KS8695_WAN_OFFSET (0xF0000 + 0x6000)
17#define KS8695_WAN_VA (KS8695_IO_VA + KS8695_WAN_OFFSET)
18#define KS8695_WAN_PA (KS8695_IO_PA + KS8695_WAN_OFFSET)
19
20
21/*
22 * WAN registers
23 */
24#define KS8695_WMDTXC (0x00) /* DMA Transmit Control */
25#define KS8695_WMDRXC (0x04) /* DMA Receive Control */
26#define KS8695_WMDTSC (0x08) /* DMA Transmit Start Command */
27#define KS8695_WMDRSC (0x0c) /* DMA Receive Start Command */
28#define KS8695_WTDLB (0x10) /* Transmit Descriptor List Base Address */
29#define KS8695_WRDLB (0x14) /* Receive Descriptor List Base Address */
30#define KS8695_WMAL (0x18) /* MAC Station Address Low */
31#define KS8695_WMAH (0x1c) /* MAC Station Address High */
32#define KS8695_WMAAL_(n) (0x80 + ((n)*8)) /* MAC Additional Station Address (0..15) Low */
33#define KS8695_WMAAH_(n) (0x84 + ((n)*8)) /* MAC Additional Station Address (0..15) High */
34
35
36/* DMA Transmit Control Register */
37#define WMDTXC_WMTRST (1 << 31) /* Soft Reset */
38#define WMDTXC_WMTBS (0x3f << 24) /* Transmit Burst Size */
39#define WMDTXC_WMTUCG (1 << 18) /* Transmit UDP Checksum Generate */
40#define WMDTXC_WMTTCG (1 << 17) /* Transmit TCP Checksum Generate */
41#define WMDTXC_WMTICG (1 << 16) /* Transmit IP Checksum Generate */
42#define WMDTXC_WMTFCE (1 << 9) /* Transmit Flow Control Enable */
43#define WMDTXC_WMTLB (1 << 8) /* Loopback mode */
44#define WMDTXC_WMTEP (1 << 2) /* Transmit Enable Padding */
45#define WMDTXC_WMTAC (1 << 1) /* Transmit Add CRC */
46#define WMDTXC_WMTE (1 << 0) /* TX Enable */
47
48/* DMA Receive Control Register */
49#define WMDRXC_WMRBS (0x3f << 24) /* Receive Burst Size */
50#define WMDRXC_WMRUCC (1 << 18) /* Receive UDP Checksum check */
51#define WMDRXC_WMRTCG (1 << 17) /* Receive TCP Checksum check */
52#define WMDRXC_WMRICG (1 << 16) /* Receive IP Checksum check */
53#define WMDRXC_WMRFCE (1 << 9) /* Receive Flow Control Enable */
54#define WMDRXC_WMRB (1 << 6) /* Receive Broadcast */
55#define WMDRXC_WMRM (1 << 5) /* Receive Multicast */
56#define WMDRXC_WMRU (1 << 4) /* Receive Unicast */
57#define WMDRXC_WMRERR (1 << 3) /* Receive Error Frame */
58#define WMDRXC_WMRA (1 << 2) /* Receive All */
59#define WMDRXC_WMRE (1 << 0) /* RX Enable */
60
61/* Additional Station Address High */
62#define WMAAH_E (1 << 31) /* Address Enabled */
63
64
65#endif
diff --git a/arch/arm/mach-ks8695/include/mach/system.h b/arch/arm/mach-ks8695/include/mach/system.h
new file mode 100644
index 000000000000..2a6f91869056
--- /dev/null
+++ b/arch/arm/mach-ks8695/include/mach/system.h
@@ -0,0 +1,48 @@
1/*
2 * arch/arm/mach-s3c2410/include/mach/system.h
3 *
4 * Copyright (C) 2006 Simtec Electronics
5 * Ben Dooks <ben@simtec.co.uk>
6 *
7 * KS8695 - System function defines and includes
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12 */
13
14#ifndef __ASM_ARCH_SYSTEM_H
15#define __ASM_ARCH_SYSTEM_H
16
17#include <asm/io.h>
18#include <mach/regs-timer.h>
19
20static void arch_idle(void)
21{
22 /*
23 * This should do all the clock switching
24 * and wait for interrupt tricks,
25 */
26 cpu_do_idle();
27
28}
29
30static void arch_reset(char mode)
31{
32 unsigned int reg;
33
34 if (mode == 's')
35 cpu_reset(0);
36
37 /* disable timer0 */
38 reg = __raw_readl(KS8695_TMR_VA + KS8695_TMCON);
39 __raw_writel(reg & ~TMCON_T0EN, KS8695_TMR_VA + KS8695_TMCON);
40
41 /* enable watchdog mode */
42 __raw_writel((10 << 8) | T0TC_WATCHDOG, KS8695_TMR_VA + KS8695_T0TC);
43
44 /* re-enable timer0 */
45 __raw_writel(reg | TMCON_T0EN, KS8695_TMR_VA + KS8695_TMCON);
46}
47
48#endif
diff --git a/arch/arm/mach-ks8695/include/mach/timex.h b/arch/arm/mach-ks8695/include/mach/timex.h
new file mode 100644
index 000000000000..4682e350369b
--- /dev/null
+++ b/arch/arm/mach-ks8695/include/mach/timex.h
@@ -0,0 +1,20 @@
1/*
2 * arch/arm/mach-ks8695/include/mach/timex.h
3 *
4 * Copyright (C) 2006 Simtec Electronics
5 * Ben Dooks <ben@simtec.co.uk>
6 *
7 * KS8695 - Time Parameters
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12 */
13
14#ifndef __ASM_ARCH_TIMEX_H
15#define __ASM_ARCH_TIMEX_H
16
17/* timers are derived from MCLK, which is 25MHz */
18#define CLOCK_TICK_RATE 25000000
19
20#endif
diff --git a/arch/arm/mach-ks8695/include/mach/uncompress.h b/arch/arm/mach-ks8695/include/mach/uncompress.h
new file mode 100644
index 000000000000..0eee37a69075
--- /dev/null
+++ b/arch/arm/mach-ks8695/include/mach/uncompress.h
@@ -0,0 +1,37 @@
1/*
2 * arch/arm/mach-ks8695/include/mach/uncompress.h
3 *
4 * Copyright (C) 2006 Ben Dooks <ben@simtec.co.uk>
5 * Copyright (C) 2006 Simtec Electronics
6 *
7 * KS8695 - Kernel uncompressor
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12 */
13
14#ifndef __ASM_ARCH_UNCOMPRESS_H
15#define __ASM_ARCH_UNCOMPRESS_H
16
17#include <asm/io.h>
18#include <mach/regs-uart.h>
19
20static void putc(char c)
21{
22 while (!(__raw_readl(KS8695_UART_PA + KS8695_URLS) & URLS_URTHRE))
23 barrier();
24
25 __raw_writel(c, KS8695_UART_PA + KS8695_URTH);
26}
27
28static inline void flush(void)
29{
30 while (!(__raw_readl(KS8695_UART_PA + KS8695_URLS) & URLS_URTE))
31 barrier();
32}
33
34#define arch_decomp_setup()
35#define arch_decomp_wdog()
36
37#endif
diff --git a/arch/arm/mach-ks8695/include/mach/vmalloc.h b/arch/arm/mach-ks8695/include/mach/vmalloc.h
new file mode 100644
index 000000000000..744ac66be3a2
--- /dev/null
+++ b/arch/arm/mach-ks8695/include/mach/vmalloc.h
@@ -0,0 +1,19 @@
1/*
2 * arch/arm/mach-ks8695/include/mach/vmalloc.h
3 *
4 * Copyright (C) 2006 Ben Dooks
5 * Copyright (C) 2006 Simtec Electronics <linux@simtec.co.uk>
6 *
7 * KS8695 vmalloc definition
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12 */
13
14#ifndef __ASM_ARCH_VMALLOC_H
15#define __ASM_ARCH_VMALLOC_H
16
17#define VMALLOC_END (KS8695_IO_VA & PGDIR_MASK)
18
19#endif
diff --git a/arch/arm/mach-ks8695/irq.c b/arch/arm/mach-ks8695/irq.c
index 0b06941a1eed..e5e71f4dbb84 100644
--- a/arch/arm/mach-ks8695/irq.c
+++ b/arch/arm/mach-ks8695/irq.c
@@ -25,14 +25,14 @@
25#include <linux/ioport.h> 25#include <linux/ioport.h>
26#include <linux/sysdev.h> 26#include <linux/sysdev.h>
27 27
28#include <asm/hardware.h> 28#include <mach/hardware.h>
29#include <asm/irq.h> 29#include <asm/irq.h>
30#include <asm/io.h> 30#include <asm/io.h>
31 31
32#include <asm/mach/irq.h> 32#include <asm/mach/irq.h>
33 33
34#include <asm/arch/regs-irq.h> 34#include <mach/regs-irq.h>
35#include <asm/arch/regs-gpio.h> 35#include <mach/regs-gpio.h>
36 36
37static void ks8695_irq_mask(unsigned int irqno) 37static void ks8695_irq_mask(unsigned int irqno)
38{ 38{
diff --git a/arch/arm/mach-ks8695/leds.c b/arch/arm/mach-ks8695/leds.c
index d61762ae50d8..184ef74e4bee 100644
--- a/arch/arm/mach-ks8695/leds.c
+++ b/arch/arm/mach-ks8695/leds.c
@@ -12,10 +12,9 @@
12#include <linux/module.h> 12#include <linux/module.h>
13#include <linux/init.h> 13#include <linux/init.h>
14 14
15#include <asm/mach-types.h>
16#include <asm/leds.h> 15#include <asm/leds.h>
17#include <asm/arch/devices.h> 16#include <mach/devices.h>
18#include <asm/arch/gpio.h> 17#include <mach/gpio.h>
19 18
20 19
21static inline void ks8695_led_on(unsigned int led) 20static inline void ks8695_led_on(unsigned int led)
diff --git a/arch/arm/mach-ks8695/pci.c b/arch/arm/mach-ks8695/pci.c
index 3f4e0330cb1a..1746c67af176 100644
--- a/arch/arm/mach-ks8695/pci.c
+++ b/arch/arm/mach-ks8695/pci.c
@@ -31,10 +31,10 @@
31#include <asm/io.h> 31#include <asm/io.h>
32#include <asm/signal.h> 32#include <asm/signal.h>
33#include <asm/mach/pci.h> 33#include <asm/mach/pci.h>
34#include <asm/hardware.h> 34#include <mach/hardware.h>
35 35
36#include <asm/arch/devices.h> 36#include <mach/devices.h>
37#include <asm/arch/regs-pci.h> 37#include <mach/regs-pci.h>
38 38
39 39
40static int pci_dbg; 40static int pci_dbg;
diff --git a/arch/arm/mach-ks8695/time.c b/arch/arm/mach-ks8695/time.c
index 02f766b3121d..940888dffc16 100644
--- a/arch/arm/mach-ks8695/time.c
+++ b/arch/arm/mach-ks8695/time.c
@@ -28,8 +28,8 @@
28#include <asm/io.h> 28#include <asm/io.h>
29#include <asm/mach/time.h> 29#include <asm/mach/time.h>
30 30
31#include <asm/arch/regs-timer.h> 31#include <mach/regs-timer.h>
32#include <asm/arch/regs-irq.h> 32#include <mach/regs-irq.h>
33 33
34#include "generic.h" 34#include "generic.h"
35 35
diff --git a/arch/arm/mach-l7200/core.c b/arch/arm/mach-l7200/core.c
index 561a0fe7095d..50d23246d4f0 100644
--- a/arch/arm/mach-l7200/core.c
+++ b/arch/arm/mach-l7200/core.c
@@ -13,7 +13,7 @@
13#include <asm/types.h> 13#include <asm/types.h>
14#include <asm/irq.h> 14#include <asm/irq.h>
15#include <asm/mach-types.h> 15#include <asm/mach-types.h>
16#include <asm/hardware.h> 16#include <mach/hardware.h>
17#include <asm/page.h> 17#include <asm/page.h>
18 18
19#include <asm/mach/arch.h> 19#include <asm/mach/arch.h>
diff --git a/arch/arm/mach-l7200/include/mach/aux_reg.h b/arch/arm/mach-l7200/include/mach/aux_reg.h
new file mode 100644
index 000000000000..4671558cdd51
--- /dev/null
+++ b/arch/arm/mach-l7200/include/mach/aux_reg.h
@@ -0,0 +1,28 @@
1/*
2 * arch/arm/mach-l7200/include/mach/aux_reg.h
3 *
4 * Copyright (C) 2000 Steve Hill (sjhill@cotw.com)
5 *
6 * Changelog:
7 * 08-02-2000 SJH Created file
8 */
9#ifndef _ASM_ARCH_AUXREG_H
10#define _ASM_ARCH_AUXREG_H
11
12#include <mach/hardware.h>
13
14#define l7200aux_reg *((volatile unsigned int *) (AUX_BASE))
15
16/*
17 * Auxillary register values
18 */
19#define AUX_CLEAR 0x00000000
20#define AUX_DIAG_LED_ON 0x00000002
21#define AUX_RTS_UART1 0x00000004
22#define AUX_DTR_UART1 0x00000008
23#define AUX_KBD_COLUMN_12_HIGH 0x00000010
24#define AUX_KBD_COLUMN_12_OFF 0x00000020
25#define AUX_KBD_COLUMN_13_HIGH 0x00000040
26#define AUX_KBD_COLUMN_13_OFF 0x00000080
27
28#endif
diff --git a/arch/arm/mach-l7200/include/mach/debug-macro.S b/arch/arm/mach-l7200/include/mach/debug-macro.S
new file mode 100644
index 000000000000..34eed2a63e69
--- /dev/null
+++ b/arch/arm/mach-l7200/include/mach/debug-macro.S
@@ -0,0 +1,40 @@
1/* arch/arm/mach-l7200/include/mach/debug-macro.S
2 *
3 * Debugging macro include header
4 *
5 * Copyright (C) 1994-1999 Russell King
6 * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 *
12*/
13
14 .equ io_virt, IO_BASE
15 .equ io_phys, IO_START
16
17 .macro addruart,rx
18 mrc p15, 0, \rx, c1, c0
19 tst \rx, #1 @ MMU enabled?
20 moveq \rx, #io_phys @ physical base address
21 movne \rx, #io_virt @ virtual address
22 add \rx, \rx, #0x00044000 @ UART1
23@ add \rx, \rx, #0x00045000 @ UART2
24 .endm
25
26 .macro senduart,rd,rx
27 str \rd, [\rx, #0x0] @ UARTDR
28 .endm
29
30 .macro waituart,rd,rx
311001: ldr \rd, [\rx, #0x18] @ UARTFLG
32 tst \rd, #1 << 5 @ UARTFLGUTXFF - 1 when full
33 bne 1001b
34 .endm
35
36 .macro busyuart,rd,rx
371001: ldr \rd, [\rx, #0x18] @ UARTFLG
38 tst \rd, #1 << 3 @ UARTFLGUBUSY - 1 when busy
39 bne 1001b
40 .endm
diff --git a/arch/arm/mach-l7200/include/mach/dma.h b/arch/arm/mach-l7200/include/mach/dma.h
new file mode 100644
index 000000000000..c7e48bd4590c
--- /dev/null
+++ b/arch/arm/mach-l7200/include/mach/dma.h
@@ -0,0 +1,23 @@
1/*
2 * arch/arm/mach-l7200/include/mach/dma.h
3 *
4 * Copyright (C) 2000 Steve Hill (sjhill@cotw.com)
5 *
6 * Changelog:
7 * 08-29-2000 SJH Created
8 */
9#ifndef __ASM_ARCH_DMA_H
10#define __ASM_ARCH_DMA_H
11
12/* DMA is not yet implemented! It should be the same as acorn, copy over.. */
13
14/*
15 * This is the maximum DMA address that can be DMAd to.
16 * There should not be more than (0xd0000000 - 0xc0000000)
17 * bytes of RAM.
18 */
19#define MAX_DMA_ADDRESS 0xd0000000
20
21#define DMA_S0 0
22
23#endif /* _ASM_ARCH_DMA_H */
diff --git a/arch/arm/mach-l7200/include/mach/entry-macro.S b/arch/arm/mach-l7200/include/mach/entry-macro.S
new file mode 100644
index 000000000000..1726d91fc1d3
--- /dev/null
+++ b/arch/arm/mach-l7200/include/mach/entry-macro.S
@@ -0,0 +1,35 @@
1/*
2 * arch/arm/mach-l7200/include/mach/entry-macro.S
3 *
4 * Low-level IRQ helper macros for L7200-based platforms
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10#include <mach/hardware.h>
11
12 .equ irq_base_addr, IO_BASE_2
13
14 .macro disable_fiq
15 .endm
16
17 .macro get_irqnr_preamble, base, tmp
18 .endm
19
20 .macro arch_ret_to_user, tmp1, tmp2
21 .endm
22
23 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
24 mov \irqstat, #irq_base_addr @ Virt addr IRQ regs
25 add \irqstat, \irqstat, #0x00001000 @ Status reg
26 ldr \irqstat, [\irqstat, #0] @ get interrupts
27 mov \irqnr, #0
281001: tst \irqstat, #1
29 addeq \irqnr, \irqnr, #1
30 moveq \irqstat, \irqstat, lsr #1
31 tsteq \irqnr, #32
32 beq 1001b
33 teq \irqnr, #32
34 .endm
35
diff --git a/arch/arm/mach-l7200/include/mach/gp_timers.h b/arch/arm/mach-l7200/include/mach/gp_timers.h
new file mode 100644
index 000000000000..2b7086a26b81
--- /dev/null
+++ b/arch/arm/mach-l7200/include/mach/gp_timers.h
@@ -0,0 +1,42 @@
1/*
2 * arch/arm/mach-l7200/include/mach/gp_timers.h
3 *
4 * Copyright (C) 2000 Steve Hill (sjhill@cotw.com)
5 *
6 * Changelog:
7 * 07-28-2000 SJH Created file
8 * 08-02-2000 SJH Used structure for registers
9 */
10#ifndef _ASM_ARCH_GPTIMERS_H
11#define _ASM_ARCH_GPTIMERS_H
12
13#include <mach/hardware.h>
14
15/*
16 * Layout of L7200 general purpose timer registers
17 */
18struct GPT_Regs {
19 unsigned int TIMERLOAD;
20 unsigned int TIMERVALUE;
21 unsigned int TIMERCONTROL;
22 unsigned int TIMERCLEAR;
23};
24
25#define GPT_BASE (IO_BASE_2 + 0x3000)
26#define l7200_timer1_regs ((volatile struct GPT_Regs *) (GPT_BASE))
27#define l7200_timer2_regs ((volatile struct GPT_Regs *) (GPT_BASE + 0x20))
28
29/*
30 * General register values
31 */
32#define GPT_PRESCALE_1 0x00000000
33#define GPT_PRESCALE_16 0x00000004
34#define GPT_PRESCALE_256 0x00000008
35#define GPT_MODE_FREERUN 0x00000000
36#define GPT_MODE_PERIODIC 0x00000040
37#define GPT_ENABLE 0x00000080
38#define GPT_BZTOG 0x00000100
39#define GPT_BZMOD 0x00000200
40#define GPT_LOAD_MASK 0x0000ffff
41
42#endif
diff --git a/arch/arm/mach-l7200/include/mach/gpio.h b/arch/arm/mach-l7200/include/mach/gpio.h
new file mode 100644
index 000000000000..c7b0a5d7b8bb
--- /dev/null
+++ b/arch/arm/mach-l7200/include/mach/gpio.h
@@ -0,0 +1,105 @@
1/****************************************************************************/
2/*
3 * arch/arm/mach-l7200/include/mach/gpio.h
4 *
5 * Registers and helper functions for the L7200 Link-Up Systems
6 * GPIO.
7 *
8 * (C) Copyright 2000, S A McConnell (samcconn@cotw.com)
9 *
10 * This file is subject to the terms and conditions of the GNU General Public
11 * License. See the file COPYING in the main directory of this archive for
12 * more details.
13 */
14
15/****************************************************************************/
16
17#define GPIO_OFF 0x00005000 /* Offset from IO_START to the GPIO reg's. */
18
19/* IO_START and IO_BASE are defined in hardware.h */
20
21#define GPIO_START (IO_START_2 + GPIO_OFF) /* Physical addr of the GPIO reg. */
22#define GPIO_BASE (IO_BASE_2 + GPIO_OFF) /* Virtual addr of the GPIO reg. */
23
24/* Offsets from the start of the GPIO for all the registers. */
25#define PADR_OFF 0x000
26#define PADDR_OFF 0x004
27#define PASBSR_OFF 0x008
28#define PAEENR_OFF 0x00c
29#define PAESNR_OFF 0x010
30#define PAESTR_OFF 0x014
31#define PAIMR_OFF 0x018
32#define PAINT_OFF 0x01c
33
34#define PBDR_OFF 0x020
35#define PBDDR_OFF 0x024
36#define PBSBSR_OFF 0x028
37#define PBIMR_OFF 0x038
38#define PBINT_OFF 0x03c
39
40#define PCDR_OFF 0x040
41#define PCDDR_OFF 0x044
42#define PCSBSR_OFF 0x048
43#define PCIMR_OFF 0x058
44#define PCINT_OFF 0x05c
45
46#define PDDR_OFF 0x060
47#define PDDDR_OFF 0x064
48#define PDSBSR_OFF 0x068
49#define PDEENR_OFF 0x06c
50#define PDESNR_OFF 0x070
51#define PDESTR_OFF 0x074
52#define PDIMR_OFF 0x078
53#define PDINT_OFF 0x07c
54
55#define PEDR_OFF 0x080
56#define PEDDR_OFF 0x084
57#define PESBSR_OFF 0x088
58#define PEEENR_OFF 0x08c
59#define PEESNR_OFF 0x090
60#define PEESTR_OFF 0x094
61#define PEIMR_OFF 0x098
62#define PEINT_OFF 0x09c
63
64/* Define the GPIO registers for use by device drivers and the kernel. */
65#define PADR (*(volatile unsigned long *)(GPIO_BASE+PADR_OFF))
66#define PADDR (*(volatile unsigned long *)(GPIO_BASE+PADDR_OFF))
67#define PASBSR (*(volatile unsigned long *)(GPIO_BASE+PASBSR_OFF))
68#define PAEENR (*(volatile unsigned long *)(GPIO_BASE+PAEENR_OFF))
69#define PAESNR (*(volatile unsigned long *)(GPIO_BASE+PAESNR_OFF))
70#define PAESTR (*(volatile unsigned long *)(GPIO_BASE+PAESTR_OFF))
71#define PAIMR (*(volatile unsigned long *)(GPIO_BASE+PAIMR_OFF))
72#define PAINT (*(volatile unsigned long *)(GPIO_BASE+PAINT_OFF))
73
74#define PBDR (*(volatile unsigned long *)(GPIO_BASE+PBDR_OFF))
75#define PBDDR (*(volatile unsigned long *)(GPIO_BASE+PBDDR_OFF))
76#define PBSBSR (*(volatile unsigned long *)(GPIO_BASE+PBSBSR_OFF))
77#define PBIMR (*(volatile unsigned long *)(GPIO_BASE+PBIMR_OFF))
78#define PBINT (*(volatile unsigned long *)(GPIO_BASE+PBINT_OFF))
79
80#define PCDR (*(volatile unsigned long *)(GPIO_BASE+PCDR_OFF))
81#define PCDDR (*(volatile unsigned long *)(GPIO_BASE+PCDDR_OFF))
82#define PCSBSR (*(volatile unsigned long *)(GPIO_BASE+PCSBSR_OFF))
83#define PCIMR (*(volatile unsigned long *)(GPIO_BASE+PCIMR_OFF))
84#define PCINT (*(volatile unsigned long *)(GPIO_BASE+PCINT_OFF))
85
86#define PDDR (*(volatile unsigned long *)(GPIO_BASE+PDDR_OFF))
87#define PDDDR (*(volatile unsigned long *)(GPIO_BASE+PDDDR_OFF))
88#define PDSBSR (*(volatile unsigned long *)(GPIO_BASE+PDSBSR_OFF))
89#define PDEENR (*(volatile unsigned long *)(GPIO_BASE+PDEENR_OFF))
90#define PDESNR (*(volatile unsigned long *)(GPIO_BASE+PDESNR_OFF))
91#define PDESTR (*(volatile unsigned long *)(GPIO_BASE+PDESTR_OFF))
92#define PDIMR (*(volatile unsigned long *)(GPIO_BASE+PDIMR_OFF))
93#define PDINT (*(volatile unsigned long *)(GPIO_BASE+PDINT_OFF))
94
95#define PEDR (*(volatile unsigned long *)(GPIO_BASE+PEDR_OFF))
96#define PEDDR (*(volatile unsigned long *)(GPIO_BASE+PEDDR_OFF))
97#define PESBSR (*(volatile unsigned long *)(GPIO_BASE+PESBSR_OFF))
98#define PEEENR (*(volatile unsigned long *)(GPIO_BASE+PEEENR_OFF))
99#define PEESNR (*(volatile unsigned long *)(GPIO_BASE+PEESNR_OFF))
100#define PEESTR (*(volatile unsigned long *)(GPIO_BASE+PEESTR_OFF))
101#define PEIMR (*(volatile unsigned long *)(GPIO_BASE+PEIMR_OFF))
102#define PEINT (*(volatile unsigned long *)(GPIO_BASE+PEINT_OFF))
103
104#define VEE_EN 0x02
105#define BACKLIGHT_EN 0x04
diff --git a/arch/arm/mach-l7200/include/mach/hardware.h b/arch/arm/mach-l7200/include/mach/hardware.h
new file mode 100644
index 000000000000..c31909cfc254
--- /dev/null
+++ b/arch/arm/mach-l7200/include/mach/hardware.h
@@ -0,0 +1,57 @@
1/*
2 * arch/arm/mach-l7200/include/mach/hardware.h
3 *
4 * Copyright (C) 2000 Rob Scott (rscott@mtrob.fdns.net)
5 * Steve Hill (sjhill@cotw.com)
6 *
7 * This file contains the hardware definitions for the
8 * LinkUp Systems L7200 SOC development board.
9 *
10 * Changelog:
11 * 02-01-2000 RS Created L7200 version, derived from rpc code
12 * 03-21-2000 SJH Cleaned up file
13 * 04-21-2000 RS Changed mapping of I/O in virtual space
14 * 04-25-2000 SJH Removed unused symbols and such
15 * 05-05-2000 SJH Complete rewrite
16 * 07-31-2000 SJH Added undocumented debug auxillary port to
17 * get at last two columns for keyboard driver
18 */
19#ifndef __ASM_ARCH_HARDWARE_H
20#define __ASM_ARCH_HARDWARE_H
21
22/* Hardware addresses of major areas.
23 * *_START is the physical address
24 * *_SIZE is the size of the region
25 * *_BASE is the virtual address
26 */
27#define RAM_START 0xf0000000
28#define RAM_SIZE 0x02000000
29#define RAM_BASE 0xc0000000
30
31#define IO_START 0x80000000 /* I/O */
32#define IO_SIZE 0x01000000
33#define IO_BASE 0xd0000000
34
35#define IO_START_2 0x90000000 /* I/O */
36#define IO_SIZE_2 0x01000000
37#define IO_BASE_2 0xd1000000
38
39#define AUX_START 0x1a000000 /* AUX PORT */
40#define AUX_SIZE 0x01000000
41#define AUX_BASE 0xd2000000
42
43#define FLASH1_START 0x00000000 /* FLASH BANK 1 */
44#define FLASH1_SIZE 0x01000000
45#define FLASH1_BASE 0xd3000000
46
47#define FLASH2_START 0x10000000 /* FLASH BANK 2 */
48#define FLASH2_SIZE 0x01000000
49#define FLASH2_BASE 0xd4000000
50
51#define ISA_START 0x20000000 /* ISA */
52#define ISA_SIZE 0x20000000
53#define ISA_BASE 0xe0000000
54
55#define PCIO_BASE IO_BASE
56
57#endif
diff --git a/arch/arm/mach-l7200/include/mach/io.h b/arch/arm/mach-l7200/include/mach/io.h
new file mode 100644
index 000000000000..d432ba9e5dff
--- /dev/null
+++ b/arch/arm/mach-l7200/include/mach/io.h
@@ -0,0 +1,27 @@
1/*
2 * arch/arm/mach-l7200/include/mach/io.h
3 *
4 * Copyright (C) 2000 Steve Hill (sjhill@cotw.com)
5 *
6 * Changelog:
7 * 03-21-2000 SJH Created from arch/arm/mach-nexuspci/include/mach/io.h
8 * 08-31-2000 SJH Added in IO functions necessary for new drivers
9 */
10#ifndef __ASM_ARM_ARCH_IO_H
11#define __ASM_ARM_ARCH_IO_H
12
13#include <mach/hardware.h>
14
15#define IO_SPACE_LIMIT 0xffffffff
16
17/*
18 * There are not real ISA nor PCI buses, so we fake it.
19 */
20static inline void __iomem *__io(unsigned long addr)
21{
22 return (void __iomem *)addr;
23}
24#define __io(a) __io(a)
25#define __mem_pci(a) (a)
26
27#endif
diff --git a/arch/arm/mach-l7200/include/mach/irqs.h b/arch/arm/mach-l7200/include/mach/irqs.h
new file mode 100644
index 000000000000..7edffd713c5b
--- /dev/null
+++ b/arch/arm/mach-l7200/include/mach/irqs.h
@@ -0,0 +1,56 @@
1/*
2 * arch/arm/mach-l7200/include/mach/irqs.h
3 *
4 * Copyright (C) 2000 Rob Scott (rscott@mtrob.fdns.net)
5 * Steve Hill (sjhill@cotw.com)
6 *
7 * Changelog:
8 * 01-02-2000 RS Create l7200 version
9 * 03-28-2000 SJH Removed unused interrupt
10 * 07-28-2000 SJH Added pseudo-keyboard interrupt
11 */
12
13/*
14 * NOTE: The second timer (Timer 2) is used as the keyboard
15 * interrupt when the keyboard driver is enabled.
16 */
17
18#define NR_IRQS 32
19
20#define IRQ_STWDOG 0 /* Watchdog timer */
21#define IRQ_PROG 1 /* Programmable interrupt */
22#define IRQ_DEBUG_RX 2 /* Comm Rx debug */
23#define IRQ_DEBUG_TX 3 /* Comm Tx debug */
24#define IRQ_GCTC1 4 /* Timer 1 */
25#define IRQ_GCTC2 5 /* Timer 2 / Keyboard */
26#define IRQ_DMA 6 /* DMA controller */
27#define IRQ_CLCD 7 /* Color LCD controller */
28#define IRQ_SM_RX 8 /* Smart card */
29#define IRQ_SM_TX 9 /* Smart cart */
30#define IRQ_SM_RST 10 /* Smart card */
31#define IRQ_SIB 11 /* Serial Interface Bus */
32#define IRQ_MMC 12 /* MultiMediaCard */
33#define IRQ_SSP1 13 /* Synchronous Serial Port 1 */
34#define IRQ_SSP2 14 /* Synchronous Serial Port 1 */
35#define IRQ_SPI 15 /* SPI slave */
36#define IRQ_UART_1 16 /* UART 1 */
37#define IRQ_UART_2 17 /* UART 2 */
38#define IRQ_IRDA 18 /* IRDA */
39#define IRQ_RTC_TICK 19 /* Real Time Clock tick */
40#define IRQ_RTC_ALARM 20 /* Real Time Clock alarm */
41#define IRQ_GPIO 21 /* General Purpose IO */
42#define IRQ_GPIO_DMA 22 /* General Purpose IO, DMA */
43#define IRQ_M2M 23 /* Memory to memory DMA */
44#define IRQ_RESERVED 24 /* RESERVED, don't use */
45#define IRQ_INTF 25 /* External active low interrupt */
46#define IRQ_INT0 26 /* External active low interrupt */
47#define IRQ_INT1 27 /* External active low interrupt */
48#define IRQ_INT2 28 /* External active low interrupt */
49#define IRQ_UCB1200 29 /* Interrupt generated by UCB1200*/
50#define IRQ_BAT_LO 30 /* Low batery or external power */
51#define IRQ_MEDIA_CHG 31 /* Media change interrupt */
52
53/*
54 * This is the offset of the FIQ "IRQ" numbers
55 */
56#define FIQ_START 64
diff --git a/arch/arm/mach-l7200/include/mach/memory.h b/arch/arm/mach-l7200/include/mach/memory.h
new file mode 100644
index 000000000000..f338cf3ffd93
--- /dev/null
+++ b/arch/arm/mach-l7200/include/mach/memory.h
@@ -0,0 +1,29 @@
1/*
2 * arch/arm/mach-l7200/include/mach/memory.h
3 *
4 * Copyright (c) 2000 Steve Hill (sjhill@cotw.com)
5 * Copyright (c) 2000 Rob Scott (rscott@mtrob.fdns.net)
6 *
7 * Changelog:
8 * 03-13-2000 SJH Created
9 * 04-13-2000 RS Changed bus macros for new addr
10 * 05-03-2000 SJH Removed bus macros and fixed virt_to_phys macro
11 */
12#ifndef __ASM_ARCH_MEMORY_H
13#define __ASM_ARCH_MEMORY_H
14
15/*
16 * Physical DRAM offset on the L7200 SDB.
17 */
18#define PHYS_OFFSET UL(0xf0000000)
19
20#define __virt_to_bus(x) __virt_to_phys(x)
21#define __bus_to_virt(x) __phys_to_virt(x)
22
23/*
24 * Cache flushing area - ROM
25 */
26#define FLUSH_BASE_PHYS 0x40000000
27#define FLUSH_BASE 0xdf000000
28
29#endif
diff --git a/arch/arm/mach-l7200/include/mach/pmpcon.h b/arch/arm/mach-l7200/include/mach/pmpcon.h
new file mode 100644
index 000000000000..3959871e8361
--- /dev/null
+++ b/arch/arm/mach-l7200/include/mach/pmpcon.h
@@ -0,0 +1,46 @@
1/****************************************************************************/
2/*
3 * arch/arm/mach-l7200/include/mach/pmpcon.h
4 *
5 * Registers and helper functions for the L7200 Link-Up Systems
6 * DC/DC converter register.
7 *
8 * (C) Copyright 2000, S A McConnell (samcconn@cotw.com)
9 *
10 * This file is subject to the terms and conditions of the GNU General Public
11 * License. See the file COPYING in the main directory of this archive for
12 * more details.
13 */
14
15/****************************************************************************/
16
17#define PMPCON_OFF 0x00006000 /* Offset from IO_START_2. */
18
19/* IO_START_2 and IO_BASE_2 are defined in hardware.h */
20
21#define PMPCON_START (IO_START_2 + PMPCON_OFF) /* Physical address of reg. */
22#define PMPCON_BASE (IO_BASE_2 + PMPCON_OFF) /* Virtual address of reg. */
23
24
25#define PMPCON (*(volatile unsigned int *)(PMPCON_BASE))
26
27#define PWM2_50CYCLE 0x800
28#define CONTRAST 0x9
29
30#define PWM1H (CONTRAST)
31#define PWM1L (CONTRAST << 4)
32
33#define PMPCON_VALUE (PWM2_50CYCLE | PWM1L | PWM1H)
34
35/* PMPCON = 0x811; // too light and fuzzy
36 * PMPCON = 0x844;
37 * PMPCON = 0x866; // better color poor depth
38 * PMPCON = 0x888; // Darker but better depth
39 * PMPCON = 0x899; // Darker even better depth
40 * PMPCON = 0x8aa; // too dark even better depth
41 * PMPCON = 0X8cc; // Way too dark
42 */
43
44/* As CONTRAST value increases the greater the depth perception and
45 * the darker the colors.
46 */
diff --git a/arch/arm/mach-l7200/include/mach/pmu.h b/arch/arm/mach-l7200/include/mach/pmu.h
new file mode 100644
index 000000000000..a2da7aedf208
--- /dev/null
+++ b/arch/arm/mach-l7200/include/mach/pmu.h
@@ -0,0 +1,125 @@
1/****************************************************************************/
2/*
3 * arch/arm/mach-l7200/include/mach/pmu.h
4 *
5 * Registers and helper functions for the L7200 Link-Up Systems
6 * Power Management Unit (PMU).
7 *
8 * (C) Copyright 2000, S A McConnell (samcconn@cotw.com)
9 *
10 * This file is subject to the terms and conditions of the GNU General Public
11 * License. See the file COPYING in the main directory of this archive for
12 * more details.
13 */
14
15/****************************************************************************/
16
17#define PMU_OFF 0x00050000 /* Offset from IO_START to the PMU registers. */
18
19/* IO_START and IO_BASE are defined in hardware.h */
20
21#define PMU_START (IO_START + PMU_OFF) /* Physical addr. of the PMU reg. */
22#define PMU_BASE (IO_BASE + PMU_OFF) /* Virtual addr. of the PMU reg. */
23
24
25/* Define the PMU registers for use by device drivers and the kernel. */
26
27typedef struct {
28 unsigned int CURRENT; /* Current configuration register */
29 unsigned int NEXT; /* Next configuration register */
30 unsigned int reserved;
31 unsigned int RUN; /* Run configuration register */
32 unsigned int COMM; /* Configuration command register */
33 unsigned int SDRAM; /* SDRAM configuration bypass register */
34} pmu_interface;
35
36#define PMU ((volatile pmu_interface *)(PMU_BASE))
37
38
39/* Macro's for reading the common register fields. */
40
41#define GET_TRANSOP(reg) ((reg >> 25) & 0x03) /* Bits 26-25 */
42#define GET_OSCEN(reg) ((reg >> 16) & 0x01)
43#define GET_OSCMUX(reg) ((reg >> 15) & 0x01)
44#define GET_PLLMUL(reg) ((reg >> 9) & 0x3f) /* Bits 14-9 */
45#define GET_PLLEN(reg) ((reg >> 8) & 0x01)
46#define GET_PLLMUX(reg) ((reg >> 7) & 0x01)
47#define GET_BCLK_DIV(reg) ((reg >> 3) & 0x03) /* Bits 4-3 */
48#define GET_SDRB_SEL(reg) ((reg >> 2) & 0x01)
49#define GET_SDRF_SEL(reg) ((reg >> 1) & 0x01)
50#define GET_FASTBUS(reg) (reg & 0x1)
51
52/* CFG_NEXT register */
53
54#define CFG_NEXT_CLOCKRECOVERY ((PMU->NEXT >> 18) & 0x7f) /* Bits 24-18 */
55#define CFG_NEXT_INTRET ((PMU->NEXT >> 17) & 0x01)
56#define CFG_NEXT_SDR_STOP ((PMU->NEXT >> 6) & 0x01)
57#define CFG_NEXT_SYSCLKEN ((PMU->NEXT >> 5) & 0x01)
58
59/* Useful field values that can be used to construct the
60 * CFG_NEXT and CFG_RUN registers.
61 */
62
63#define TRANSOP_NOP 0<<25 /* NOCHANGE_NOSTALL */
64#define NOCHANGE_STALL 1<<25
65#define CHANGE_NOSTALL 2<<25
66#define CHANGE_STALL 3<<25
67
68#define INTRET 1<<17
69#define OSCEN 1<<16
70#define OSCMUX 1<<15
71
72/* PLL frequencies */
73
74#define PLLMUL_0 0<<9 /* 3.6864 MHz */
75#define PLLMUL_1 1<<9 /* ?????? MHz */
76#define PLLMUL_5 5<<9 /* 18.432 MHz */
77#define PLLMUL_10 10<<9 /* 36.864 MHz */
78#define PLLMUL_18 18<<9 /* ?????? MHz */
79#define PLLMUL_20 20<<9 /* 73.728 MHz */
80#define PLLMUL_32 32<<9 /* ?????? MHz */
81#define PLLMUL_35 35<<9 /* 129.024 MHz */
82#define PLLMUL_36 36<<9 /* ?????? MHz */
83#define PLLMUL_39 39<<9 /* ?????? MHz */
84#define PLLMUL_40 40<<9 /* 147.456 MHz */
85
86/* Clock recovery times */
87
88#define CRCLOCK_1 1<<18
89#define CRCLOCK_2 2<<18
90#define CRCLOCK_4 4<<18
91#define CRCLOCK_8 8<<18
92#define CRCLOCK_16 16<<18
93#define CRCLOCK_32 32<<18
94#define CRCLOCK_63 63<<18
95#define CRCLOCK_127 127<<18
96
97#define PLLEN 1<<8
98#define PLLMUX 1<<7
99#define SDR_STOP 1<<6
100#define SYSCLKEN 1<<5
101
102#define BCLK_DIV_4 2<<3
103#define BCLK_DIV_2 1<<3
104#define BCLK_DIV_1 0<<3
105
106#define SDRB_SEL 1<<2
107#define SDRF_SEL 1<<1
108#define FASTBUS 1<<0
109
110
111/* CFG_SDRAM */
112
113#define SDRREFFQ 1<<0 /* Only if SDRSTOPRQ is not set. */
114#define SDRREFACK 1<<1 /* Read-only */
115#define SDRSTOPRQ 1<<2 /* Only if SDRREFFQ is not set. */
116#define SDRSTOPACK 1<<3 /* Read-only */
117#define PICEN 1<<4 /* Enable Co-procesor */
118#define PICTEST 1<<5
119
120#define GET_SDRREFFQ ((PMU->SDRAM >> 0) & 0x01)
121#define GET_SDRREFACK ((PMU->SDRAM >> 1) & 0x01) /* Read-only */
122#define GET_SDRSTOPRQ ((PMU->SDRAM >> 2) & 0x01)
123#define GET_SDRSTOPACK ((PMU->SDRAM >> 3) & 0x01) /* Read-only */
124#define GET_PICEN ((PMU->SDRAM >> 4) & 0x01)
125#define GET_PICTEST ((PMU->SDRAM >> 5) & 0x01)
diff --git a/arch/arm/mach-l7200/include/mach/serial.h b/arch/arm/mach-l7200/include/mach/serial.h
new file mode 100644
index 000000000000..adc05e5f8378
--- /dev/null
+++ b/arch/arm/mach-l7200/include/mach/serial.h
@@ -0,0 +1,37 @@
1/*
2 * arch/arm/mach-l7200/include/mach/serial.h
3 *
4 * Copyright (c) 2000 Rob Scott (rscott@mtrob.fdns.net)
5 * Steve Hill (sjhill@cotw.com)
6 *
7 * Changelog:
8 * 03-20-2000 SJH Created
9 * 03-26-2000 SJH Added flags for serial ports
10 * 03-27-2000 SJH Corrected BASE_BAUD value
11 * 04-14-2000 RS Made register addr dependent on IO_BASE
12 * 05-03-2000 SJH Complete rewrite
13 * 05-09-2000 SJH Stripped out architecture specific serial stuff
14 * and placed it in a separate file
15 * 07-28-2000 SJH Moved base baud rate variable
16 */
17#ifndef __ASM_ARCH_SERIAL_H
18#define __ASM_ARCH_SERIAL_H
19
20/*
21 * This assumes you have a 3.6864 MHz clock for your UART.
22 */
23#define BASE_BAUD 3686400
24
25/*
26 * Standard COM flags
27 */
28#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST)
29
30#define STD_SERIAL_PORT_DEFNS \
31 /* MAGIC UART CLK PORT IRQ FLAGS */ \
32 { 0, BASE_BAUD, UART1_BASE, IRQ_UART_1, STD_COM_FLAGS }, /* ttyLU0 */ \
33 { 0, BASE_BAUD, UART2_BASE, IRQ_UART_2, STD_COM_FLAGS }, /* ttyLU1 */ \
34
35#define EXTRA_SERIAL_PORT_DEFNS
36
37#endif
diff --git a/arch/arm/mach-l7200/include/mach/serial_l7200.h b/arch/arm/mach-l7200/include/mach/serial_l7200.h
new file mode 100644
index 000000000000..645f1c5e568d
--- /dev/null
+++ b/arch/arm/mach-l7200/include/mach/serial_l7200.h
@@ -0,0 +1,101 @@
1/*
2 * arch/arm/mach-l7200/include/mach/serial_l7200.h
3 *
4 * Copyright (c) 2000 Steven Hill (sjhill@cotw.com)
5 *
6 * Changelog:
7 * 05-09-2000 SJH Created
8 */
9#ifndef __ASM_ARCH_SERIAL_L7200_H
10#define __ASM_ARCH_SERIAL_L7200_H
11
12#include <mach/memory.h>
13
14/*
15 * This assumes you have a 3.6864 MHz clock for your UART.
16 */
17#define BASE_BAUD 3686400
18
19/*
20 * UART base register addresses
21 */
22#define UART1_BASE (IO_BASE + 0x00044000)
23#define UART2_BASE (IO_BASE + 0x00045000)
24
25/*
26 * UART register offsets
27 */
28#define UARTDR 0x00 /* Tx/Rx data */
29#define RXSTAT 0x04 /* Rx status */
30#define H_UBRLCR 0x08 /* mode register high */
31#define M_UBRLCR 0x0C /* mode reg mid (MSB of baud)*/
32#define L_UBRLCR 0x10 /* mode reg low (LSB of baud)*/
33#define UARTCON 0x14 /* control register */
34#define UARTFLG 0x18 /* flag register */
35#define UARTINTSTAT 0x1C /* FIFO IRQ status register */
36#define UARTINTMASK 0x20 /* FIFO IRQ mask register */
37
38/*
39 * UART baud rate register values
40 */
41#define BR_110 0x827
42#define BR_1200 0x06e
43#define BR_2400 0x05f
44#define BR_4800 0x02f
45#define BR_9600 0x017
46#define BR_14400 0x00f
47#define BR_19200 0x00b
48#define BR_38400 0x005
49#define BR_57600 0x003
50#define BR_76800 0x002
51#define BR_115200 0x001
52
53/*
54 * Receiver status register (RXSTAT) mask values
55 */
56#define RXSTAT_NO_ERR 0x00 /* No error */
57#define RXSTAT_FRM_ERR 0x01 /* Framing error */
58#define RXSTAT_PAR_ERR 0x02 /* Parity error */
59#define RXSTAT_OVR_ERR 0x04 /* Overrun error */
60
61/*
62 * High byte of UART bit rate and line control register (H_UBRLCR) values
63 */
64#define UBRLCR_BRK 0x01 /* generate break on tx */
65#define UBRLCR_PEN 0x02 /* enable parity */
66#define UBRLCR_PDIS 0x00 /* disable parity */
67#define UBRLCR_EVEN 0x04 /* 1= even parity,0 = odd parity */
68#define UBRLCR_STP2 0x08 /* transmit 2 stop bits */
69#define UBRLCR_FIFO 0x10 /* enable FIFO */
70#define UBRLCR_LEN5 0x60 /* word length5 */
71#define UBRLCR_LEN6 0x40 /* word length6 */
72#define UBRLCR_LEN7 0x20 /* word length7 */
73#define UBRLCR_LEN8 0x00 /* word length8 */
74
75/*
76 * UART control register (UARTCON) values
77 */
78#define UARTCON_UARTEN 0x01 /* Enable UART */
79#define UARTCON_DMAONERR 0x08 /* Mask RxDmaRq when errors occur */
80
81/*
82 * UART flag register (UARTFLG) mask values
83 */
84#define UARTFLG_UTXFF 0x20 /* Transmit FIFO full */
85#define UARTFLG_URXFE 0x10 /* Receiver FIFO empty */
86#define UARTFLG_UBUSY 0x08 /* Transmitter busy */
87#define UARTFLG_DCD 0x04 /* Data carrier detect */
88#define UARTFLG_DSR 0x02 /* Data set ready */
89#define UARTFLG_CTS 0x01 /* Clear to send */
90
91/*
92 * UART interrupt status/clear registers (UARTINTSTAT/CLR) values
93 */
94#define UART_TXINT 0x01 /* TX interrupt */
95#define UART_RXINT 0x02 /* RX interrupt */
96#define UART_RXERRINT 0x04 /* RX error interrupt */
97#define UART_MSINT 0x08 /* Modem Status interrupt */
98#define UART_UDINT 0x10 /* UART Disabled interrupt */
99#define UART_ALLIRQS 0x1f /* All interrupts */
100
101#endif
diff --git a/arch/arm/mach-l7200/include/mach/sib.h b/arch/arm/mach-l7200/include/mach/sib.h
new file mode 100644
index 000000000000..965728712cf3
--- /dev/null
+++ b/arch/arm/mach-l7200/include/mach/sib.h
@@ -0,0 +1,119 @@
1/****************************************************************************/
2/*
3 * arch/arm/mach-l7200/include/mach/sib.h
4 *
5 * Registers and helper functions for the Serial Interface Bus.
6 *
7 * (C) Copyright 2000, S A McConnell (samcconn@cotw.com)
8 *
9 * This file is subject to the terms and conditions of the GNU General Public
10 * License. See the file COPYING in the main directory of this archive for
11 * more details.
12 */
13
14/****************************************************************************/
15
16#define SIB_OFF 0x00040000 /* Offset from IO_START to the SIB reg's. */
17
18/* IO_START and IO_BASE are defined in hardware.h */
19
20#define SIB_START (IO_START + SIB_OFF) /* Physical addr of the SIB reg. */
21#define SIB_BASE (IO_BASE + SIB_OFF) /* Virtual addr of the SIB reg. */
22
23/* Offsets from the start of the SIB for all the registers. */
24
25/* Define the SIB registers for use by device drivers and the kernel. */
26
27typedef struct
28{
29 unsigned int MCCR; /* SIB Control Register Offset: 0x00 */
30 unsigned int RES1; /* Reserved Offset: 0x04 */
31 unsigned int MCDR0; /* SIB Data Register 0 Offset: 0x08 */
32 unsigned int MCDR1; /* SIB Data Register 1 Offset: 0x0c */
33 unsigned int MCDR2; /* SIB Data Register 2 (UCB1x00) Offset: 0x10 */
34 unsigned int RES2; /* Reserved Offset: 0x14 */
35 unsigned int MCSR; /* SIB Status Register Offset: 0x18 */
36} SIB_Interface;
37
38#define SIB ((volatile SIB_Interface *) (SIB_BASE))
39
40/* MCCR */
41
42#define INTERNAL_FREQ 9216000 /* Hertz */
43#define AUDIO_FREQ 5000 /* Hertz */
44#define TELECOM_FREQ 5000 /* Hertz */
45
46#define AUDIO_DIVIDE (INTERNAL_FREQ / (32 * AUDIO_FREQ))
47#define TELECOM_DIVIDE (INTERNAL_FREQ / (32 * TELECOM_FREQ))
48
49#define MCCR_ASD57 AUDIO_DIVIDE
50#define MCCR_TSD57 (TELECOM_DIVIDE << 8)
51#define MCCR_MCE (1 << 16) /* SIB enable */
52#define MCCR_ECS (1 << 17) /* External Clock Select */
53#define MCCR_ADM (1 << 18) /* A/D Data Sampling */
54#define MCCR_PMC (1 << 26) /* PIN Multiplexer Control */
55
56
57#define GET_ASD ((SIB->MCCR >> 0) & 0x3f) /* Audio Sample Rate Div. */
58#define GET_TSD ((SIB->MCCR >> 8) & 0x3f) /* Telcom Sample Rate Div. */
59#define GET_MCE ((SIB->MCCR >> 16) & 0x01) /* SIB Enable */
60#define GET_ECS ((SIB->MCCR >> 17) & 0x01) /* External Clock Select */
61#define GET_ADM ((SIB->MCCR >> 18) & 0x01) /* A/D Data Sampling Mode */
62#define GET_TTM ((SIB->MCCR >> 19) & 0x01) /* Telco Trans. FIFO I mask */
63#define GET_TRM ((SIB->MCCR >> 20) & 0x01) /* Telco Recv. FIFO I mask */
64#define GET_ATM ((SIB->MCCR >> 21) & 0x01) /* Audio Trans. FIFO I mask */
65#define GET_ARM ((SIB->MCCR >> 22) & 0x01) /* Audio Recv. FIFO I mask */
66#define GET_LBM ((SIB->MCCR >> 23) & 0x01) /* Loop Back Mode */
67#define GET_ECP ((SIB->MCCR >> 24) & 0x03) /* Extern. Clck Prescale sel */
68#define GET_PMC ((SIB->MCCR >> 26) & 0x01) /* PIN Multiplexer Control */
69#define GET_ERI ((SIB->MCCR >> 27) & 0x01) /* External Read Interrupt */
70#define GET_EWI ((SIB->MCCR >> 28) & 0x01) /* External Write Interrupt */
71
72/* MCDR0 */
73
74#define AUDIO_RECV ((SIB->MCDR0 >> 4) & 0xfff)
75#define AUDIO_WRITE(v) ((SIB->MCDR0 = (v & 0xfff) << 4))
76
77/* MCDR1 */
78
79#define TELECOM_RECV ((SIB->MCDR1 >> 2) & 032fff)
80#define TELECOM_WRITE(v) ((SIB->MCDR1 = (v & 0x3fff) << 2))
81
82
83/* MCSR */
84
85#define MCSR_ATU (1 << 4) /* Audio Transmit FIFO Underrun */
86#define MCSR_ARO (1 << 5) /* Audio Receive FIFO Underrun */
87#define MCSR_TTU (1 << 6) /* TELECOM Transmit FIFO Underrun */
88#define MCSR_TRO (1 << 7) /* TELECOM Receive FIFO Underrun */
89
90#define MCSR_CLEAR_UNDERUN_BITS (MCSR_ATU | MCSR_ARO | MCSR_TTU | MCSR_TRO)
91
92
93#define GET_ATS ((SIB->MCSR >> 0) & 0x01) /* Audio Transmit FIFO Service Req*/
94#define GET_ARS ((SIB->MCSR >> 1) & 0x01) /* Audio Recv FIFO Service Request*/
95#define GET_TTS ((SIB->MCSR >> 2) & 0x01) /* TELECOM Transmit FIFO Flag */
96#define GET_TRS ((SIB->MCSR >> 3) & 0x01) /* TELECOM Recv FIFO Service Req. */
97#define GET_ATU ((SIB->MCSR >> 4) & 0x01) /* Audio Transmit FIFO Underrun */
98#define GET_ARO ((SIB->MCSR >> 5) & 0x01) /* Audio Receive FIFO Underrun */
99#define GET_TTU ((SIB->MCSR >> 6) & 0x01) /* TELECOM Transmit FIFO Underrun */
100#define GET_TRO ((SIB->MCSR >> 7) & 0x01) /* TELECOM Receive FIFO Underrun */
101#define GET_ANF ((SIB->MCSR >> 8) & 0x01) /* Audio Transmit FIFO not full */
102#define GET_ANE ((SIB->MCSR >> 9) & 0x01) /* Audio Receive FIFO not empty */
103#define GET_TNF ((SIB->MCSR >> 10) & 0x01) /* Telecom Transmit FIFO not full */
104#define GET_TNE ((SIB->MCSR >> 11) & 0x01) /* Telecom Receive FIFO not empty */
105#define GET_CWC ((SIB->MCSR >> 12) & 0x01) /* Codec Write Complete */
106#define GET_CRC ((SIB->MCSR >> 13) & 0x01) /* Codec Read Complete */
107#define GET_ACE ((SIB->MCSR >> 14) & 0x01) /* Audio Codec Enabled */
108#define GET_TCE ((SIB->MCSR >> 15) & 0x01) /* Telecom Codec Enabled */
109
110/* MCDR2 */
111
112#define MCDR2_rW (1 << 16)
113
114#define WRITE_MCDR2(reg, data) (SIB->MCDR2 =((reg<<17)|MCDR2_rW|(data&0xffff)))
115#define MCDR2_WRITE_COMPLETE GET_CWC
116
117#define INITIATE_MCDR2_READ(reg) (SIB->MCDR2 = (reg << 17))
118#define MCDR2_READ_COMPLETE GET_CRC
119#define MCDR2_READ (SIB->MCDR2 & 0xffff)
diff --git a/arch/arm/mach-l7200/include/mach/sys-clock.h b/arch/arm/mach-l7200/include/mach/sys-clock.h
new file mode 100644
index 000000000000..2d7722be60ea
--- /dev/null
+++ b/arch/arm/mach-l7200/include/mach/sys-clock.h
@@ -0,0 +1,67 @@
1/****************************************************************************/
2/*
3 * arch/arm/mach-l7200/include/mach/sys-clock.h
4 *
5 * Registers and helper functions for the L7200 Link-Up Systems
6 * System clocks.
7 *
8 * (C) Copyright 2000, S A McConnell (samcconn@cotw.com)
9 *
10 * This file is subject to the terms and conditions of the GNU General Public
11 * License. See the file COPYING in the main directory of this archive for
12 * more details.
13 */
14
15/****************************************************************************/
16
17#define SYS_CLOCK_OFF 0x00050030 /* Offset from IO_START. */
18
19/* IO_START and IO_BASE are defined in hardware.h */
20
21#define SYS_CLOCK_START (IO_START + SYS_CLCOK_OFF) /* Physical address */
22#define SYS_CLOCK_BASE (IO_BASE + SYS_CLOCK_OFF) /* Virtual address */
23
24/* Define the interface to the SYS_CLOCK */
25
26typedef struct
27{
28 unsigned int ENABLE;
29 unsigned int ESYNC;
30 unsigned int SELECT;
31} sys_clock_interface;
32
33#define SYS_CLOCK ((volatile sys_clock_interface *)(SYS_CLOCK_BASE))
34
35//#define CLOCK_EN (*(volatile unsigned long *)(PMU_BASE+CLOCK_EN_OFF))
36//#define CLOCK_ESYNC (*(volatile unsigned long *)(PMU_BASE+CLOCK_ESYNC_OFF))
37//#define CLOCK_SEL (*(volatile unsigned long *)(PMU_BASE+CLOCK_SEL_OFF))
38
39/* SYS_CLOCK -> ENABLE */
40
41#define SYN_EN 1<<0
42#define B18M_EN 1<<1
43#define CLK3M6_EN 1<<2
44#define BUART_EN 1<<3
45#define CLK18MU_EN 1<<4
46#define FIR_EN 1<<5
47#define MIRN_EN 1<<6
48#define UARTM_EN 1<<7
49#define SIBADC_EN 1<<8
50#define ALTD_EN 1<<9
51#define CLCLK_EN 1<<10
52
53/* SYS_CLOCK -> SELECT */
54
55#define CLK18M_DIV 1<<0
56#define MIR_SEL 1<<1
57#define SSP_SEL 1<<4
58#define MM_DIV 1<<5
59#define MM_SEL 1<<6
60#define ADC_SEL_2 0<<7
61#define ADC_SEL_4 1<<7
62#define ADC_SEL_8 3<<7
63#define ADC_SEL_16 7<<7
64#define ADC_SEL_32 0x0f<<7
65#define ADC_SEL_64 0x1f<<7
66#define ADC_SEL_128 0x3f<<7
67#define ALTD_SEL 1<<13
diff --git a/arch/arm/mach-l7200/include/mach/system.h b/arch/arm/mach-l7200/include/mach/system.h
new file mode 100644
index 000000000000..5272abee0d0e
--- /dev/null
+++ b/arch/arm/mach-l7200/include/mach/system.h
@@ -0,0 +1,29 @@
1/*
2 * arch/arm/mach-l7200/include/mach/system.h
3 *
4 * Copyright (c) 2000 Steve Hill (sjhill@cotw.com)
5 *
6 * Changelog
7 * 03-21-2000 SJH Created
8 * 04-26-2000 SJH Fixed functions
9 * 05-03-2000 SJH Removed usage of obsolete 'iomd.h'
10 * 05-31-2000 SJH Properly implemented 'arch_idle'
11 */
12#ifndef __ASM_ARCH_SYSTEM_H
13#define __ASM_ARCH_SYSTEM_H
14
15#include <mach/hardware.h>
16
17static inline void arch_idle(void)
18{
19 *(unsigned long *)(IO_BASE + 0x50004) = 1; /* idle mode */
20}
21
22static inline void arch_reset(char mode)
23{
24 if (mode == 's') {
25 cpu_reset(0);
26 }
27}
28
29#endif
diff --git a/arch/arm/mach-l7200/include/mach/time.h b/arch/arm/mach-l7200/include/mach/time.h
new file mode 100644
index 000000000000..061771c2c2bd
--- /dev/null
+++ b/arch/arm/mach-l7200/include/mach/time.h
@@ -0,0 +1,73 @@
1/*
2 * arch/arm/mach-l7200/include/mach/time.h
3 *
4 * Copyright (C) 2000 Rob Scott (rscott@mtrob.fdns.net)
5 * Steve Hill (sjhill@cotw.com)
6 *
7 * Changelog:
8 * 01-02-2000 RS Created l7200 version, derived from rpc code
9 * 05-03-2000 SJH Complete rewrite
10 */
11#ifndef _ASM_ARCH_TIME_H
12#define _ASM_ARCH_TIME_H
13
14#include <mach/irqs.h>
15
16/*
17 * RTC base register address
18 */
19#define RTC_BASE (IO_BASE_2 + 0x2000)
20
21/*
22 * RTC registers
23 */
24#define RTC_RTCDR (*(volatile unsigned char *) (RTC_BASE + 0x000))
25#define RTC_RTCMR (*(volatile unsigned char *) (RTC_BASE + 0x004))
26#define RTC_RTCS (*(volatile unsigned char *) (RTC_BASE + 0x008))
27#define RTC_RTCC (*(volatile unsigned char *) (RTC_BASE + 0x008))
28#define RTC_RTCDV (*(volatile unsigned char *) (RTC_BASE + 0x00c))
29#define RTC_RTCCR (*(volatile unsigned char *) (RTC_BASE + 0x010))
30
31/*
32 * RTCCR register values
33 */
34#define RTC_RATE_32 0x00 /* 32 Hz tick */
35#define RTC_RATE_64 0x10 /* 64 Hz tick */
36#define RTC_RATE_128 0x20 /* 128 Hz tick */
37#define RTC_RATE_256 0x30 /* 256 Hz tick */
38#define RTC_EN_ALARM 0x01 /* Enable alarm */
39#define RTC_EN_TIC 0x04 /* Enable counter */
40#define RTC_EN_STWDOG 0x08 /* Enable watchdog */
41
42/*
43 * Handler for RTC timer interrupt
44 */
45static irqreturn_t
46timer_interrupt(int irq, void *dev_id)
47{
48 struct pt_regs *regs = get_irq_regs();
49 do_timer(1);
50#ifndef CONFIG_SMP
51 update_process_times(user_mode(regs));
52#endif
53 do_profile(regs);
54 RTC_RTCC = 0; /* Clear interrupt */
55
56 return IRQ_HANDLED;
57}
58
59/*
60 * Set up RTC timer interrupt, and return the current time in seconds.
61 */
62void __init time_init(void)
63{
64 RTC_RTCC = 0; /* Clear interrupt */
65
66 timer_irq.handler = timer_interrupt;
67
68 setup_irq(IRQ_RTC_TICK, &timer_irq);
69
70 RTC_RTCCR = RTC_RATE_128 | RTC_EN_TIC; /* Set rate and enable timer */
71}
72
73#endif
diff --git a/arch/arm/mach-l7200/include/mach/timex.h b/arch/arm/mach-l7200/include/mach/timex.h
new file mode 100644
index 000000000000..ffc96a63b5a2
--- /dev/null
+++ b/arch/arm/mach-l7200/include/mach/timex.h
@@ -0,0 +1,20 @@
1/*
2 * arch/arm/mach-l7200/include/mach/timex.h
3 *
4 * Copyright (C) 2000 Rob Scott (rscott@mtrob.fdns.net)
5 * Steve Hill (sjhill@cotw.com)
6 *
7 * 04-21-2000 RS Created file
8 * 05-03-2000 SJH Tick rate was wrong
9 *
10 */
11
12/*
13 * On the ARM720T, clock ticks are set to 128 Hz.
14 *
15 * NOTE: The actual RTC value is set in 'time.h' which
16 * must be changed when choosing a different tick
17 * rate. The value of HZ in 'param.h' must also
18 * be changed to match below.
19 */
20#define CLOCK_TICK_RATE 128
diff --git a/arch/arm/mach-l7200/include/mach/uncompress.h b/arch/arm/mach-l7200/include/mach/uncompress.h
new file mode 100644
index 000000000000..591c962bb315
--- /dev/null
+++ b/arch/arm/mach-l7200/include/mach/uncompress.h
@@ -0,0 +1,39 @@
1/*
2 * arch/arm/mach-l7200/include/mach/uncompress.h
3 *
4 * Copyright (C) 2000 Steve Hill (sjhill@cotw.com)
5 *
6 * Changelog:
7 * 05-01-2000 SJH Created
8 * 05-13-2000 SJH Filled in function bodies
9 * 07-26-2000 SJH Removed hard coded baud rate
10 */
11
12#include <mach/hardware.h>
13
14#define IO_UART IO_START + 0x00044000
15
16#define __raw_writeb(v,p) (*(volatile unsigned char *)(p) = (v))
17#define __raw_readb(p) (*(volatile unsigned char *)(p))
18
19static inline void putc(int c)
20{
21 while(__raw_readb(IO_UART + 0x18) & 0x20 ||
22 __raw_readb(IO_UART + 0x18) & 0x08)
23 barrier();
24
25 __raw_writeb(c, IO_UART + 0x00);
26}
27
28static inline void flush(void)
29{
30}
31
32static __inline__ void arch_decomp_setup(void)
33{
34 __raw_writeb(0x00, IO_UART + 0x08); /* Set HSB */
35 __raw_writeb(0x00, IO_UART + 0x20); /* Disable IRQs */
36 __raw_writeb(0x01, IO_UART + 0x14); /* Enable UART */
37}
38
39#define arch_decomp_wdog()
diff --git a/arch/arm/mach-l7200/include/mach/vmalloc.h b/arch/arm/mach-l7200/include/mach/vmalloc.h
new file mode 100644
index 000000000000..85f0abbf15f1
--- /dev/null
+++ b/arch/arm/mach-l7200/include/mach/vmalloc.h
@@ -0,0 +1,4 @@
1/*
2 * arch/arm/mach-l7200/include/mach/vmalloc.h
3 */
4#define VMALLOC_END (PAGE_OFFSET + 0x10000000)
diff --git a/arch/arm/mach-lh7a40x/arch-kev7a400.c b/arch/arm/mach-lh7a40x/arch-kev7a400.c
index 2ef7d0097b38..551b97261826 100644
--- a/arch/arm/mach-lh7a40x/arch-kev7a400.c
+++ b/arch/arm/mach-lh7a40x/arch-kev7a400.c
@@ -13,7 +13,7 @@
13#include <linux/device.h> 13#include <linux/device.h>
14#include <linux/interrupt.h> 14#include <linux/interrupt.h>
15 15
16#include <asm/hardware.h> 16#include <mach/hardware.h>
17#include <asm/setup.h> 17#include <asm/setup.h>
18#include <asm/mach-types.h> 18#include <asm/mach-types.h>
19#include <asm/mach/arch.h> 19#include <asm/mach/arch.h>
diff --git a/arch/arm/mach-lh7a40x/arch-lpd7a40x.c b/arch/arm/mach-lh7a40x/arch-lpd7a40x.c
index fe64946f9e18..e373fb8e2699 100644
--- a/arch/arm/mach-lh7a40x/arch-lpd7a40x.c
+++ b/arch/arm/mach-lh7a40x/arch-lpd7a40x.c
@@ -14,7 +14,7 @@
14#include <linux/interrupt.h> 14#include <linux/interrupt.h>
15#include <linux/irq.h> 15#include <linux/irq.h>
16 16
17#include <asm/hardware.h> 17#include <mach/hardware.h>
18#include <asm/setup.h> 18#include <asm/setup.h>
19#include <asm/mach-types.h> 19#include <asm/mach-types.h>
20#include <asm/mach/arch.h> 20#include <asm/mach/arch.h>
diff --git a/arch/arm/mach-lh7a40x/clcd.c b/arch/arm/mach-lh7a40x/clcd.c
index 1992db4c2523..a2a543258fc3 100644
--- a/arch/arm/mach-lh7a40x/clcd.c
+++ b/arch/arm/mach-lh7a40x/clcd.c
@@ -17,14 +17,13 @@
17 17
18//#include <linux/module.h> 18//#include <linux/module.h>
19//#include <linux/time.h> 19//#include <linux/time.h>
20//#include <asm/hardware.h>
21 20
22//#include <asm/mach/time.h> 21//#include <asm/mach/time.h>
23#include <asm/irq.h> 22#include <asm/irq.h>
24#include <asm/mach/irq.h> 23#include <asm/mach/irq.h>
25 24
26#include <asm/system.h> 25#include <asm/system.h>
27#include <asm/hardware.h> 26#include <mach/hardware.h>
28#include <linux/amba/bus.h> 27#include <linux/amba/bus.h>
29#include <linux/amba/clcd.h> 28#include <linux/amba/clcd.h>
30 29
diff --git a/arch/arm/mach-lh7a40x/clocks.c b/arch/arm/mach-lh7a40x/clocks.c
index 7530a95c15a6..4fb23ac6b5ac 100644
--- a/arch/arm/mach-lh7a40x/clocks.c
+++ b/arch/arm/mach-lh7a40x/clocks.c
@@ -9,8 +9,8 @@
9 */ 9 */
10 10
11#include <linux/cpufreq.h> 11#include <linux/cpufreq.h>
12#include <asm/hardware.h> 12#include <mach/hardware.h>
13#include <asm/arch/clocks.h> 13#include <mach/clocks.h>
14#include <linux/err.h> 14#include <linux/err.h>
15 15
16struct module; 16struct module;
diff --git a/arch/arm/mach-lh7a40x/include/mach/clocks.h b/arch/arm/mach-lh7a40x/include/mach/clocks.h
new file mode 100644
index 000000000000..fe2e0255c084
--- /dev/null
+++ b/arch/arm/mach-lh7a40x/include/mach/clocks.h
@@ -0,0 +1,18 @@
1/* arch/arm/mach-lh7a40x/include/mach/clocks.h
2 *
3 * Copyright (C) 2004 Marc Singer
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * version 2 as published by the Free Software Foundation.
8 *
9 */
10
11#ifndef __ASM_ARCH_CLOCKS_H
12#define __ASM_ARCH_CLOCKS_H
13
14unsigned int fclkfreq_get (void);
15unsigned int hclkfreq_get (void);
16unsigned int pclkfreq_get (void);
17
18#endif /* _ASM_ARCH_CLOCKS_H */
diff --git a/arch/arm/mach-lh7a40x/include/mach/constants.h b/arch/arm/mach-lh7a40x/include/mach/constants.h
new file mode 100644
index 000000000000..55c6edbc2dfd
--- /dev/null
+++ b/arch/arm/mach-lh7a40x/include/mach/constants.h
@@ -0,0 +1,91 @@
1/* arch/arm/mach-lh7a40x/include/mach/constants.h
2 *
3 * Copyright (C) 2004 Coastal Environmental Systems
4 * Copyright (C) 2004 Logic Product Development
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * version 2 as published by the Free Software Foundation.
9 *
10 */
11
12#ifndef __ASM_ARCH_CONSTANTS_H
13#define __ASM_ARCH_CONSTANTS_H
14
15
16/* Addressing constants */
17
18 /* SoC CPU IO addressing */
19#define IO_PHYS (0x80000000)
20#define IO_VIRT (0xf8000000)
21#define IO_SIZE (0x0000B000)
22
23#ifdef CONFIG_MACH_KEV7A400
24# define CPLD_PHYS (0x20000000)
25# define CPLD_VIRT (0xf2000000)
26# define CPLD_SIZE PAGE_SIZE
27#endif
28
29#if defined (CONFIG_MACH_LPD7A400) || defined (CONFIG_MACH_LPD7A404)
30
31# define IOBARRIER_PHYS 0x10000000 /* Second bank, fastest timing */
32# define IOBARRIER_VIRT 0xf0000000
33# define IOBARRIER_SIZE PAGE_SIZE
34
35# define CF_PHYS 0x60200000
36# define CF_VIRT 0xf6020000
37# define CF_SIZE (8*1024)
38
39 /* The IO mappings for the LPD CPLD are, unfortunately, sparse. */
40# define CPLDX_PHYS(x) (0x70000000 | ((x) << 20))
41# define CPLDX_VIRT(x) (0xf7000000 | ((x) << 16))
42# define CPLD00_PHYS CPLDX_PHYS (0x00) /* Wired LAN */
43# define CPLD00_VIRT CPLDX_VIRT (0x00)
44# define CPLD00_SIZE PAGE_SIZE
45# define CPLD02_PHYS CPLDX_PHYS (0x02)
46# define CPLD02_VIRT CPLDX_VIRT (0x02)
47# define CPLD02_SIZE PAGE_SIZE
48# define CPLD06_PHYS CPLDX_PHYS (0x06)
49# define CPLD06_VIRT CPLDX_VIRT (0x06)
50# define CPLD06_SIZE PAGE_SIZE
51# define CPLD08_PHYS CPLDX_PHYS (0x08)
52# define CPLD08_VIRT CPLDX_VIRT (0x08)
53# define CPLD08_SIZE PAGE_SIZE
54# define CPLD0A_PHYS CPLDX_PHYS (0x0a)
55# define CPLD0A_VIRT CPLDX_VIRT (0x0a)
56# define CPLD0A_SIZE PAGE_SIZE
57# define CPLD0C_PHYS CPLDX_PHYS (0x0c)
58# define CPLD0C_VIRT CPLDX_VIRT (0x0c)
59# define CPLD0C_SIZE PAGE_SIZE
60# define CPLD0E_PHYS CPLDX_PHYS (0x0e)
61# define CPLD0E_VIRT CPLDX_VIRT (0x0e)
62# define CPLD0E_SIZE PAGE_SIZE
63# define CPLD10_PHYS CPLDX_PHYS (0x10)
64# define CPLD10_VIRT CPLDX_VIRT (0x10)
65# define CPLD10_SIZE PAGE_SIZE
66# define CPLD12_PHYS CPLDX_PHYS (0x12)
67# define CPLD12_VIRT CPLDX_VIRT (0x12)
68# define CPLD12_SIZE PAGE_SIZE
69# define CPLD14_PHYS CPLDX_PHYS (0x14)
70# define CPLD14_VIRT CPLDX_VIRT (0x14)
71# define CPLD14_SIZE PAGE_SIZE
72# define CPLD16_PHYS CPLDX_PHYS (0x16)
73# define CPLD16_VIRT CPLDX_VIRT (0x16)
74# define CPLD16_SIZE PAGE_SIZE
75# define CPLD18_PHYS CPLDX_PHYS (0x18)
76# define CPLD18_VIRT CPLDX_VIRT (0x18)
77# define CPLD18_SIZE PAGE_SIZE
78# define CPLD1A_PHYS CPLDX_PHYS (0x1a)
79# define CPLD1A_VIRT CPLDX_VIRT (0x1a)
80# define CPLD1A_SIZE PAGE_SIZE
81#endif
82
83 /* Timing constants */
84
85#define XTAL_IN 14745600 /* 14.7456 MHz crystal */
86#define PLL_CLOCK (XTAL_IN * 21) /* 309 MHz PLL clock */
87#define MAX_HCLK_KHZ 100000 /* HCLK max limit ~100MHz */
88#define HCLK (99993600)
89//#define HCLK (119808000)
90
91#endif /* __ASM_ARCH_CONSTANTS_H */
diff --git a/arch/arm/mach-lh7a40x/include/mach/debug-macro.S b/arch/arm/mach-lh7a40x/include/mach/debug-macro.S
new file mode 100644
index 000000000000..85141ed5383d
--- /dev/null
+++ b/arch/arm/mach-lh7a40x/include/mach/debug-macro.S
@@ -0,0 +1,39 @@
1/* arch/arm/mach-lh7a40x/include/mach/debug-macro.S
2 *
3 * Debugging macro include header
4 *
5 * Copyright (C) 1994-1999 Russell King
6 * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 *
12*/
13
14 @ It is not known if this will be appropriate for every 40x
15 @ board.
16
17 .macro addruart,rx
18 mrc p15, 0, \rx, c1, c0
19 tst \rx, #1 @ MMU enabled?
20 mov \rx, #0x00000700 @ offset from base
21 orreq \rx, \rx, #0x80000000 @ physical base
22 orrne \rx, \rx, #0xf8000000 @ virtual base
23 .endm
24
25 .macro senduart,rd,rx
26 strb \rd, [\rx] @ DATA
27 .endm
28
29 .macro busyuart,rd,rx @ spin while busy
301001: ldr \rd, [\rx, #0x10] @ STATUS
31 tst \rd, #1 << 3 @ BUSY (TX FIFO not empty)
32 bne 1001b @ yes, spin
33 .endm
34
35 .macro waituart,rd,rx @ wait for Tx FIFO room
361001: ldrb \rd, [\rx, #0x10] @ STATUS
37 tst \rd, #1 << 5 @ TXFF (TX FIFO full)
38 bne 1001b @ yes, spin
39 .endm
diff --git a/arch/arm/mach-lh7a40x/include/mach/dma.h b/arch/arm/mach-lh7a40x/include/mach/dma.h
new file mode 100644
index 000000000000..baa3f8dbd04b
--- /dev/null
+++ b/arch/arm/mach-lh7a40x/include/mach/dma.h
@@ -0,0 +1,86 @@
1/* arch/arm/mach-lh7a40x/include/mach/dma.h
2 *
3 * Copyright (C) 2005 Marc Singer
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * version 2 as published by the Free Software Foundation.
8 *
9 */
10
11typedef enum {
12 DMA_M2M0 = 0,
13 DMA_M2M1 = 1,
14 DMA_M2P0 = 2, /* Tx */
15 DMA_M2P1 = 3, /* Rx */
16 DMA_M2P2 = 4, /* Tx */
17 DMA_M2P3 = 5, /* Rx */
18 DMA_M2P4 = 6, /* Tx - AC97 */
19 DMA_M2P5 = 7, /* Rx - AC97 */
20 DMA_M2P6 = 8, /* Tx */
21 DMA_M2P7 = 9, /* Rx */
22} dma_device_t;
23
24#define DMA_LENGTH_MAX ((64*1024) - 4) /* bytes */
25
26#define DMAC_GCA __REG(DMAC_PHYS + 0x2b80)
27#define DMAC_GIR __REG(DMAC_PHYS + 0x2bc0)
28
29#define DMAC_GIR_MMI1 (1<<11)
30#define DMAC_GIR_MMI0 (1<<10)
31#define DMAC_GIR_MPI8 (1<<9)
32#define DMAC_GIR_MPI9 (1<<8)
33#define DMAC_GIR_MPI6 (1<<7)
34#define DMAC_GIR_MPI7 (1<<6)
35#define DMAC_GIR_MPI4 (1<<5)
36#define DMAC_GIR_MPI5 (1<<4)
37#define DMAC_GIR_MPI2 (1<<3)
38#define DMAC_GIR_MPI3 (1<<2)
39#define DMAC_GIR_MPI0 (1<<1)
40#define DMAC_GIR_MPI1 (1<<0)
41
42#define DMAC_M2P0 0x0000
43#define DMAC_M2P1 0x0040
44#define DMAC_M2P2 0x0080
45#define DMAC_M2P3 0x00c0
46#define DMAC_M2P4 0x0240
47#define DMAC_M2P5 0x0200
48#define DMAC_M2P6 0x02c0
49#define DMAC_M2P7 0x0280
50#define DMAC_M2P8 0x0340
51#define DMAC_M2P9 0x0300
52#define DMAC_M2M0 0x0100
53#define DMAC_M2M1 0x0140
54
55#define DMAC_P_PCONTROL(c) __REG(DMAC_PHYS + (c) + 0x00)
56#define DMAC_P_PINTERRUPT(c) __REG(DMAC_PHYS + (c) + 0x04)
57#define DMAC_P_PPALLOC(c) __REG(DMAC_PHYS + (c) + 0x08)
58#define DMAC_P_PSTATUS(c) __REG(DMAC_PHYS + (c) + 0x0c)
59#define DMAC_P_REMAIN(c) __REG(DMAC_PHYS + (c) + 0x14)
60#define DMAC_P_MAXCNT0(c) __REG(DMAC_PHYS + (c) + 0x20)
61#define DMAC_P_BASE0(c) __REG(DMAC_PHYS + (c) + 0x24)
62#define DMAC_P_CURRENT0(c) __REG(DMAC_PHYS + (c) + 0x28)
63#define DMAC_P_MAXCNT1(c) __REG(DMAC_PHYS + (c) + 0x30)
64#define DMAC_P_BASE1(c) __REG(DMAC_PHYS + (c) + 0x34)
65#define DMAC_P_CURRENT1(c) __REG(DMAC_PHYS + (c) + 0x38)
66
67#define DMAC_PCONTROL_ENABLE (1<<4)
68
69#define DMAC_PORT_USB 0
70#define DMAC_PORT_SDMMC 1
71#define DMAC_PORT_AC97_1 2
72#define DMAC_PORT_AC97_2 3
73#define DMAC_PORT_AC97_3 4
74#define DMAC_PORT_UART1 6
75#define DMAC_PORT_UART2 7
76#define DMAC_PORT_UART3 8
77
78#define DMAC_PSTATUS_CURRSTATE_SHIFT 4
79#define DMAC_PSTATUS_CURRSTATE_MASK 0x3
80
81#define DMAC_PSTATUS_NEXTBUF (1<<6)
82#define DMAC_PSTATUS_STALLRINT (1<<0)
83
84#define DMAC_INT_CHE (1<<3)
85#define DMAC_INT_NFB (1<<1)
86#define DMAC_INT_STALL (1<<0)
diff --git a/arch/arm/mach-lh7a40x/include/mach/entry-macro.S b/arch/arm/mach-lh7a40x/include/mach/entry-macro.S
new file mode 100644
index 000000000000..069bb4cefff7
--- /dev/null
+++ b/arch/arm/mach-lh7a40x/include/mach/entry-macro.S
@@ -0,0 +1,149 @@
1/*
2 * arch/arm/mach-lh7a40x/include/mach/entry-macro.S
3 *
4 * Low-level IRQ helper macros for LH7A40x platforms
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10#include <mach/hardware.h>
11#include <mach/irqs.h>
12
13/* In order to allow there to be support for both of the processor
14 classes at the same time, we make a hack here that isn't very
15 pretty. At startup, the link pointed to with the
16 branch_irq_lh7a400 symbol is replaced with a NOP when the CPU is
17 detected as a lh7a404.
18
19 *** FIXME: we should clean this up so that there is only one
20 implementation for each CPU's design.
21
22*/
23
24#if defined (CONFIG_ARCH_LH7A400) && defined (CONFIG_ARCH_LH7A404)
25
26 .macro disable_fiq
27 .endm
28
29 .macro get_irqnr_preamble, base, tmp
30 .endm
31
32 .macro arch_ret_to_user, tmp1, tmp2
33 .endm
34
35 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
36
37branch_irq_lh7a400: b 1000f
38
39@ Implementation of the LH7A404 get_irqnr_and_base.
40
41 mov \irqnr, #0 @ VIC1 irq base
42 mov \base, #io_p2v(0x80000000) @ APB registers
43 add \base, \base, #0x8000
44 ldr \tmp, [\base, #0x0030] @ VIC1_VECTADDR
45 tst \tmp, #VA_VECTORED @ Direct vectored
46 bne 1002f
47 tst \tmp, #VA_VIC1DEFAULT @ Default vectored VIC1
48 ldrne \irqstat, [\base, #0] @ VIC1_IRQSTATUS
49 bne 1001f
50 add \base, \base, #(0xa000 - 0x8000)
51 ldr \tmp, [\base, #0x0030] @ VIC2_VECTADDR
52 tst \tmp, #VA_VECTORED @ Direct vectored
53 bne 1002f
54 ldr \irqstat, [\base, #0] @ VIC2_IRQSTATUS
55 mov \irqnr, #32 @ VIC2 irq base
56
571001: movs \irqstat, \irqstat, lsr #1 @ Shift into carry
58 bcs 1008f @ Bit set; irq found
59 add \irqnr, \irqnr, #1
60 bne 1001b @ Until no bits
61 b 1009f @ Nothing? Hmm.
621002: and \irqnr, \tmp, #0x3f @ Mask for valid bits
631008: movs \irqstat, #1 @ Force !Z
64 str \tmp, [\base, #0x0030] @ Clear vector
65 b 1009f
66
67@ Implementation of the LH7A400 get_irqnr_and_base.
68
691000: mov \irqnr, #0
70 mov \base, #io_p2v(0x80000000) @ APB registers
71 ldr \irqstat, [\base, #0x500] @ PIC INTSR
72
731001: movs \irqstat, \irqstat, lsr #1 @ Shift into carry
74 bcs 1008f @ Bit set; irq found
75 add \irqnr, \irqnr, #1
76 bne 1001b @ Until no bits
77 b 1009f @ Nothing? Hmm.
781008: movs \irqstat, #1 @ Force !Z
79
801009:
81 .endm
82
83
84
85#elif defined (CONFIG_ARCH_LH7A400)
86 .macro disable_fiq
87 .endm
88
89 .macro get_irqnr_preamble, base, tmp
90 .endm
91
92 .macro arch_ret_to_user, tmp1, tmp2
93 .endm
94
95 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
96 mov \irqnr, #0
97 mov \base, #io_p2v(0x80000000) @ APB registers
98 ldr \irqstat, [\base, #0x500] @ PIC INTSR
99
1001001: movs \irqstat, \irqstat, lsr #1 @ Shift into carry
101 bcs 1008f @ Bit set; irq found
102 add \irqnr, \irqnr, #1
103 bne 1001b @ Until no bits
104 b 1009f @ Nothing? Hmm.
1051008: movs \irqstat, #1 @ Force !Z
1061009:
107 .endm
108
109#elif defined(CONFIG_ARCH_LH7A404)
110
111 .macro disable_fiq
112 .endm
113
114 .macro get_irqnr_preamble, base, tmp
115 .endm
116
117 .macro arch_ret_to_user, tmp1, tmp2
118 .endm
119
120 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
121 mov \irqnr, #0 @ VIC1 irq base
122 mov \base, #io_p2v(0x80000000) @ APB registers
123 add \base, \base, #0x8000
124 ldr \tmp, [\base, #0x0030] @ VIC1_VECTADDR
125 tst \tmp, #VA_VECTORED @ Direct vectored
126 bne 1002f
127 tst \tmp, #VA_VIC1DEFAULT @ Default vectored VIC1
128 ldrne \irqstat, [\base, #0] @ VIC1_IRQSTATUS
129 bne 1001f
130 add \base, \base, #(0xa000 - 0x8000)
131 ldr \tmp, [\base, #0x0030] @ VIC2_VECTADDR
132 tst \tmp, #VA_VECTORED @ Direct vectored
133 bne 1002f
134 ldr \irqstat, [\base, #0] @ VIC2_IRQSTATUS
135 mov \irqnr, #32 @ VIC2 irq base
136
1371001: movs \irqstat, \irqstat, lsr #1 @ Shift into carry
138 bcs 1008f @ Bit set; irq found
139 add \irqnr, \irqnr, #1
140 bne 1001b @ Until no bits
141 b 1009f @ Nothing? Hmm.
1421002: and \irqnr, \tmp, #0x3f @ Mask for valid bits
1431008: movs \irqstat, #1 @ Force !Z
144 str \tmp, [\base, #0x0030] @ Clear vector
1451009:
146 .endm
147#endif
148
149
diff --git a/arch/arm/mach-lh7a40x/include/mach/hardware.h b/arch/arm/mach-lh7a40x/include/mach/hardware.h
new file mode 100644
index 000000000000..48e827d2fa56
--- /dev/null
+++ b/arch/arm/mach-lh7a40x/include/mach/hardware.h
@@ -0,0 +1,62 @@
1/* arch/arm/mach-lh7a40x/include/mach/hardware.h
2 *
3 * Copyright (C) 2004 Coastal Environmental Systems
4 *
5 * [ Substantially cribbed from arch/arm/mach-pxa/include/mach/hardware.h ]
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * version 2 as published by the Free Software Foundation.
10 *
11 */
12
13#ifndef __ASM_ARCH_HARDWARE_H
14#define __ASM_ARCH_HARDWARE_H
15
16#include <asm/sizes.h> /* Added for the sake of amba-clcd driver */
17
18#define io_p2v(x) (0xf0000000 | (((x) & 0xfff00000) >> 4) | ((x) & 0x0000ffff))
19#define io_v2p(x) ( (((x) & 0x0fff0000) << 4) | ((x) & 0x0000ffff))
20
21#ifdef __ASSEMBLY__
22
23# define __REG(x) io_p2v(x)
24# define __PREG(x) io_v2p(x)
25
26#else
27
28# if 0
29# define __REG(x) (*((volatile u32 *)io_p2v(x)))
30# else
31/*
32 * This __REG() version gives the same results as the one above, except
33 * that we are fooling gcc somehow so it generates far better and smaller
34 * assembly code for access to contigous registers. It's a shame that gcc
35 * doesn't guess this by itself.
36 */
37#include <asm/types.h>
38typedef struct { volatile u32 offset[4096]; } __regbase;
39# define __REGP(x) ((__regbase *)((x)&~4095))->offset[((x)&4095)>>2]
40# define __REG(x) __REGP(io_p2v(x))
41typedef struct { volatile u16 offset[4096]; } __regbase16;
42# define __REGP16(x) ((__regbase16 *)((x)&~4095))->offset[((x)&4095)>>1]
43# define __REG16(x) __REGP16(io_p2v(x))
44typedef struct { volatile u8 offset[4096]; } __regbase8;
45# define __REGP8(x) ((__regbase8 *)((x)&~4095))->offset[(x)&4095]
46# define __REG8(x) __REGP8(io_p2v(x))
47#endif
48
49/* Let's kick gcc's ass again... */
50# define __REG2(x,y) \
51 ( __builtin_constant_p(y) ? (__REG((x) + (y))) \
52 : (*(volatile u32 *)((u32)&__REG(x) + (y))) )
53
54# define __PREG(x) (io_v2p((u32)&(x)))
55
56#endif
57
58#define MASK_AND_SET(v,m,s) (v) = ((v)&~(m))|(s)
59
60#include "registers.h"
61
62#endif /* _ASM_ARCH_HARDWARE_H */
diff --git a/arch/arm/mach-lh7a40x/include/mach/io.h b/arch/arm/mach-lh7a40x/include/mach/io.h
new file mode 100644
index 000000000000..031d26f9163c
--- /dev/null
+++ b/arch/arm/mach-lh7a40x/include/mach/io.h
@@ -0,0 +1,22 @@
1/* arch/arm/mach-lh7a40x/include/mach/io.h
2 *
3 * Copyright (C) 2004 Coastal Environmental Systems
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * version 2 as published by the Free Software Foundation.
8 *
9 */
10
11#ifndef __ASM_ARCH_IO_H
12#define __ASM_ARCH_IO_H
13
14#include <mach/hardware.h>
15
16#define IO_SPACE_LIMIT 0xffffffff
17
18/* No ISA or PCI bus on this machine. */
19#define __io(a) ((void __iomem *)(a))
20#define __mem_pci(a) (a)
21
22#endif /* __ASM_ARCH_IO_H */
diff --git a/arch/arm/mach-lh7a40x/include/mach/irqs.h b/arch/arm/mach-lh7a40x/include/mach/irqs.h
new file mode 100644
index 000000000000..0f9b83675935
--- /dev/null
+++ b/arch/arm/mach-lh7a40x/include/mach/irqs.h
@@ -0,0 +1,200 @@
1/* arch/arm/mach-lh7a40x/include/mach/irqs.h
2 *
3 * Copyright (C) 2004 Coastal Environmental Systems
4 * Copyright (C) 2004 Logic Product Development
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * version 2 as published by the Free Software Foundation.
9 *
10 */
11
12/* It is to be seen whether or not we can build a kernel for more than
13 * one board. For the time being, these macros assume that we cannot.
14 * Thus, it is OK to ifdef machine/board specific IRQ assignments.
15 */
16
17
18#ifndef __ASM_ARCH_IRQS_H
19#define __ASM_ARCH_IRQS_H
20
21
22#define FIQ_START 80
23
24#if defined (CONFIG_ARCH_LH7A400)
25
26 /* FIQs */
27
28# define IRQ_GPIO0FIQ 0 /* GPIO External FIQ Interrupt on F0 */
29# define IRQ_BLINT 1 /* Battery Low */
30# define IRQ_WEINT 2 /* Watchdog Timer, WDT overflow */
31# define IRQ_MCINT 3 /* Media Change, MEDCHG pin rising */
32
33 /* IRQs */
34
35# define IRQ_CSINT 4 /* Audio Codec (ACI) */
36# define IRQ_GPIO1INTR 5 /* GPIO External IRQ Interrupt on F1 */
37# define IRQ_GPIO2INTR 6 /* GPIO External IRQ Interrupt on F2 */
38# define IRQ_GPIO3INTR 7 /* GPIO External IRQ Interrupt on F3 */
39# define IRQ_T1UI 8 /* Timer 1 underflow */
40# define IRQ_T2UI 9 /* Timer 2 underflow */
41# define IRQ_RTCMI 10
42# define IRQ_TINTR 11 /* Clock State Controller 64 Hz tick (CSC) */
43# define IRQ_UART1INTR 12
44# define IRQ_UART2INTR 13
45# define IRQ_LCDINTR 14
46# define IRQ_SSIEOT 15 /* Synchronous Serial Interface (SSI) */
47# define IRQ_UART3INTR 16
48# define IRQ_SCIINTR 17 /* Smart Card Interface (SCI) */
49# define IRQ_AACINTR 18 /* Advanced Audio Codec (AAC) */
50# define IRQ_MMCINTR 19 /* Multimedia Card (MMC) */
51# define IRQ_USBINTR 20
52# define IRQ_DMAINTR 21
53# define IRQ_T3UI 22 /* Timer 3 underflow */
54# define IRQ_GPIO4INTR 23 /* GPIO External IRQ Interrupt on F4 */
55# define IRQ_GPIO5INTR 24 /* GPIO External IRQ Interrupt on F5 */
56# define IRQ_GPIO6INTR 25 /* GPIO External IRQ Interrupt on F6 */
57# define IRQ_GPIO7INTR 26 /* GPIO External IRQ Interrupt on F7 */
58# define IRQ_BMIINTR 27 /* Battery Monitor Interface (BMI) */
59
60# define NR_IRQ_CPU 28 /* IRQs directly recognized by CPU */
61
62 /* Given IRQ, return GPIO interrupt number 0-7 */
63# define IRQ_TO_GPIO(i) ((i) \
64 - (((i) > IRQ_GPIO3INTR) ? IRQ_GPIO4INTR - IRQ_GPIO3INTR - 1 : 0)\
65 - (((i) > IRQ_GPIO0INTR) ? IRQ_GPIO1INTR - IRQ_GPIO0INTR - 1 : 0))
66
67#endif
68
69#if defined (CONFIG_ARCH_LH7A404)
70
71# define IRQ_BROWN 0 /* Brownout */
72# define IRQ_WDTINTR 1 /* Watchdog Timer */
73# define IRQ_COMMRX 2 /* ARM Comm Rx for Debug */
74# define IRQ_COMMTX 3 /* ARM Comm Tx for Debug */
75# define IRQ_T1UI 4 /* Timer 1 underflow */
76# define IRQ_T2UI 5 /* Timer 2 underflow */
77# define IRQ_CSINT 6 /* Codec Interrupt (shared by AAC on 404) */
78# define IRQ_DMAM2P0 7 /* -- DMA Memory to Peripheral */
79# define IRQ_DMAM2P1 8
80# define IRQ_DMAM2P2 9
81# define IRQ_DMAM2P3 10
82# define IRQ_DMAM2P4 11
83# define IRQ_DMAM2P5 12
84# define IRQ_DMAM2P6 13
85# define IRQ_DMAM2P7 14
86# define IRQ_DMAM2P8 15
87# define IRQ_DMAM2P9 16
88# define IRQ_DMAM2M0 17 /* -- DMA Memory to Memory */
89# define IRQ_DMAM2M1 18
90# define IRQ_GPIO0INTR 19 /* -- GPIOF Interrupt */
91# define IRQ_GPIO1INTR 20
92# define IRQ_GPIO2INTR 21
93# define IRQ_GPIO3INTR 22
94# define IRQ_SOFT_V1_23 23 /* -- Unassigned */
95# define IRQ_SOFT_V1_24 24
96# define IRQ_SOFT_V1_25 25
97# define IRQ_SOFT_V1_26 26
98# define IRQ_SOFT_V1_27 27
99# define IRQ_SOFT_V1_28 28
100# define IRQ_SOFT_V1_29 29
101# define IRQ_SOFT_V1_30 30
102# define IRQ_SOFT_V1_31 31
103
104# define IRQ_BLINT 32 /* Battery Low */
105# define IRQ_BMIINTR 33 /* Battery Monitor */
106# define IRQ_MCINTR 34 /* Media Change */
107# define IRQ_TINTR 35 /* 64Hz Tick */
108# define IRQ_WEINT 36 /* Watchdog Expired */
109# define IRQ_RTCMI 37 /* Real-time Clock Match */
110# define IRQ_UART1INTR 38 /* UART1 Interrupt (including error) */
111# define IRQ_UART1ERR 39 /* UART1 Error */
112# define IRQ_UART2INTR 40 /* UART2 Interrupt (including error) */
113# define IRQ_UART2ERR 41 /* UART2 Error */
114# define IRQ_UART3INTR 42 /* UART3 Interrupt (including error) */
115# define IRQ_UART3ERR 43 /* UART3 Error */
116# define IRQ_SCIINTR 44 /* Smart Card */
117# define IRQ_TSCINTR 45 /* Touchscreen */
118# define IRQ_KMIINTR 46 /* Keyboard/Mouse (PS/2) */
119# define IRQ_GPIO4INTR 47 /* -- GPIOF Interrupt */
120# define IRQ_GPIO5INTR 48
121# define IRQ_GPIO6INTR 49
122# define IRQ_GPIO7INTR 50
123# define IRQ_T3UI 51 /* Timer 3 underflow */
124# define IRQ_LCDINTR 52 /* LCD Controller */
125# define IRQ_SSPINTR 53 /* Synchronous Serial Port */
126# define IRQ_SDINTR 54 /* Secure Digital Port (MMC) */
127# define IRQ_USBINTR 55 /* USB Device Port */
128# define IRQ_USHINTR 56 /* USB Host Port */
129# define IRQ_SOFT_V2_25 57 /* -- Unassigned */
130# define IRQ_SOFT_V2_26 58
131# define IRQ_SOFT_V2_27 59
132# define IRQ_SOFT_V2_28 60
133# define IRQ_SOFT_V2_29 61
134# define IRQ_SOFT_V2_30 62
135# define IRQ_SOFT_V2_31 63
136
137# define NR_IRQ_CPU 64 /* IRQs directly recognized by CPU */
138
139 /* Given IRQ, return GPIO interrupt number 0-7 */
140# define IRQ_TO_GPIO(i) ((i) \
141 - (((i) > IRQ_GPIO3INTR) ? IRQ_GPIO4INTR - IRQ_GPIO3INTR - 1 : 0)\
142 - IRQ_GPIO0INTR)
143
144 /* Vector Address constants */
145# define VA_VECTORED 0x100 /* Set for vectored interrupt */
146# define VA_VIC1DEFAULT 0x200 /* Set as default VECTADDR for VIC1 */
147# define VA_VIC2DEFAULT 0x400 /* Set as default VECTADDR for VIC2 */
148
149#endif
150
151 /* IRQ aliases */
152
153#if !defined (IRQ_GPIO0INTR)
154# define IRQ_GPIO0INTR IRQ_GPIO0FIQ
155#endif
156#define IRQ_TICK IRQ_TINTR
157#define IRQ_PCC1_RDY IRQ_GPIO6INTR /* PCCard 1 ready */
158#define IRQ_PCC2_RDY IRQ_GPIO7INTR /* PCCard 2 ready */
159#define IRQ_USB IRQ_USBINTR /* USB device */
160
161#ifdef CONFIG_MACH_KEV7A400
162# define IRQ_TS IRQ_GPIOFIQ /* Touchscreen */
163# define IRQ_CPLD IRQ_GPIO1INTR /* CPLD cascade */
164# define IRQ_PCC1_CD IRQ_GPIO_F2 /* PCCard 1 card detect */
165# define IRQ_PCC2_CD IRQ_GPIO_F3 /* PCCard 2 card detect */
166#endif
167
168#if defined (CONFIG_MACH_LPD7A400) || defined (CONFIG_MACH_LPD7A404)
169# define IRQ_CPLD_V28 IRQ_GPIO7INTR /* CPLD cascade through GPIO_PF7 */
170# define IRQ_CPLD_V34 IRQ_GPIO3INTR /* CPLD cascade through GPIO_PF3 */
171#endif
172
173 /* System specific IRQs */
174
175#define IRQ_BOARD_START NR_IRQ_CPU
176
177#ifdef CONFIG_MACH_KEV7A400
178# define IRQ_KEV7A400_CPLD IRQ_BOARD_START
179# define NR_IRQ_BOARD 5
180# define IRQ_KEV7A400_MMC_CD IRQ_KEV7A400_CPLD + 0 /* MMC Card Detect */
181# define IRQ_KEV7A400_RI2 IRQ_KEV7A400_CPLD + 1 /* Ring Indicator 2 */
182# define IRQ_KEV7A400_IDE_CF IRQ_KEV7A400_CPLD + 2 /* Compact Flash (?) */
183# define IRQ_KEV7A400_ETH_INT IRQ_KEV7A400_CPLD + 3 /* Ethernet chip */
184# define IRQ_KEV7A400_INT IRQ_KEV7A400_CPLD + 4
185#endif
186
187#if defined (CONFIG_MACH_LPD7A400) || defined (CONFIG_MACH_LPD7A404)
188# define IRQ_LPD7A40X_CPLD IRQ_BOARD_START
189# define NR_IRQ_BOARD 2
190# define IRQ_LPD7A40X_ETH_INT IRQ_LPD7A40X_CPLD + 0 /* Ethernet chip */
191# define IRQ_LPD7A400_TS IRQ_LPD7A40X_CPLD + 1 /* Touch screen */
192#endif
193
194#if defined (CONFIG_MACH_LPD7A400)
195# define IRQ_TOUCH IRQ_LPD7A400_TS
196#endif
197
198#define NR_IRQS (NR_IRQ_CPU + NR_IRQ_BOARD)
199
200#endif
diff --git a/arch/arm/mach-lh7a40x/include/mach/memory.h b/arch/arm/mach-lh7a40x/include/mach/memory.h
new file mode 100644
index 000000000000..f7107b4c197a
--- /dev/null
+++ b/arch/arm/mach-lh7a40x/include/mach/memory.h
@@ -0,0 +1,76 @@
1/* arch/arm/mach-lh7a40x/include/mach/memory.h
2 *
3 * Copyright (C) 2004 Coastal Environmental Systems
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * version 2 as published by the Free Software Foundation.
8 *
9 *
10 * Refer to <file:Documentation/arm/Sharp-LH/SDRAM> for more information.
11 *
12 */
13
14#ifndef __ASM_ARCH_MEMORY_H
15#define __ASM_ARCH_MEMORY_H
16
17/*
18 * Physical DRAM offset.
19 */
20#define PHYS_OFFSET UL(0xc0000000)
21
22/*
23 * Virtual view <-> DMA view memory address translations
24 * virt_to_bus: Used to translate the virtual address to an
25 * address suitable to be passed to set_dma_addr
26 * bus_to_virt: Used to convert an address for DMA operations
27 * to an address that the kernel can use.
28 */
29#define __virt_to_bus(x) __virt_to_phys(x)
30#define __bus_to_virt(x) __phys_to_virt(x)
31
32#ifdef CONFIG_DISCONTIGMEM
33
34/*
35 * Given a kernel address, find the home node of the underlying memory.
36 */
37
38# ifdef CONFIG_LH7A40X_ONE_BANK_PER_NODE
39# define KVADDR_TO_NID(addr) \
40 ( ((((unsigned long) (addr) - PAGE_OFFSET) >> 24) & 1)\
41 | ((((unsigned long) (addr) - PAGE_OFFSET) >> 25) & ~1))
42# else /* 2 banks per node */
43# define KVADDR_TO_NID(addr) \
44 (((unsigned long) (addr) - PAGE_OFFSET) >> 26)
45# endif
46
47/*
48 * Given a page frame number, convert it to a node id.
49 */
50
51# ifdef CONFIG_LH7A40X_ONE_BANK_PER_NODE
52# define PFN_TO_NID(pfn) \
53 (((((pfn) - PHYS_PFN_OFFSET) >> (24 - PAGE_SHIFT)) & 1)\
54 | ((((pfn) - PHYS_PFN_OFFSET) >> (25 - PAGE_SHIFT)) & ~1))
55# else /* 2 banks per node */
56# define PFN_TO_NID(pfn) \
57 (((pfn) - PHYS_PFN_OFFSET) >> (26 - PAGE_SHIFT))
58#endif
59
60/*
61 * Given a kaddr, LOCAL_MEM_MAP finds the owning node of the memory
62 * and returns the index corresponding to the appropriate page in the
63 * node's mem_map.
64 */
65
66# ifdef CONFIG_LH7A40X_ONE_BANK_PER_NODE
67# define LOCAL_MAP_NR(addr) \
68 (((unsigned long)(addr) & 0x003fffff) >> PAGE_SHIFT)
69# else /* 2 banks per node */
70# define LOCAL_MAP_NR(addr) \
71 (((unsigned long)(addr) & 0x01ffffff) >> PAGE_SHIFT)
72# endif
73
74#endif
75
76#endif
diff --git a/arch/arm/mach-lh7a40x/include/mach/registers.h b/arch/arm/mach-lh7a40x/include/mach/registers.h
new file mode 100644
index 000000000000..ea44396383a7
--- /dev/null
+++ b/arch/arm/mach-lh7a40x/include/mach/registers.h
@@ -0,0 +1,224 @@
1/* arch/arm/mach-lh7a40x/include/mach/registers.h
2 *
3 * Copyright (C) 2004 Coastal Environmental Systems
4 * Copyright (C) 2004 Logic Product Development
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * version 2 as published by the Free Software Foundation.
9 *
10 */
11
12#include <mach/constants.h>
13
14#ifndef __ASM_ARCH_REGISTERS_H
15#define __ASM_ARCH_REGISTERS_H
16
17
18 /* Physical register base addresses */
19
20#define AC97C_PHYS (0x80000000) /* AC97 Controller */
21#define MMC_PHYS (0x80000100) /* Multimedia Card Controller */
22#define USB_PHYS (0x80000200) /* USB Client */
23#define SCI_PHYS (0x80000300) /* Secure Card Interface */
24#define CSC_PHYS (0x80000400) /* Clock/State Controller */
25#define INTC_PHYS (0x80000500) /* Interrupt Controller */
26#define UART1_PHYS (0x80000600) /* UART1 Controller */
27#define SIR_PHYS (0x80000600) /* IR Controller, same are UART1 */
28#define UART2_PHYS (0x80000700) /* UART2 Controller */
29#define UART3_PHYS (0x80000800) /* UART3 Controller */
30#define DCDC_PHYS (0x80000900) /* DC to DC Controller */
31#define ACI_PHYS (0x80000a00) /* Audio Codec Interface */
32#define SSP_PHYS (0x80000b00) /* Synchronous ... */
33#define TIMER_PHYS (0x80000c00) /* Timer Controller */
34#define RTC_PHYS (0x80000d00) /* Real-time Clock */
35#define GPIO_PHYS (0x80000e00) /* General Purpose IO */
36#define BMI_PHYS (0x80000f00) /* Battery Monitor Interface */
37#define HRTFTC_PHYS (0x80001000) /* High-res TFT Controller (LH7A400) */
38#define ALI_PHYS (0x80001000) /* Advanced LCD Interface (LH7A404) */
39#define WDT_PHYS (0x80001400) /* Watchdog Timer */
40#define SMC_PHYS (0x80002000) /* Static Memory Controller */
41#define SDRC_PHYS (0x80002400) /* SDRAM Controller */
42#define DMAC_PHYS (0x80002800) /* DMA Controller */
43#define CLCDC_PHYS (0x80003000) /* Color LCD Controller */
44
45 /* Physical registers of the LH7A404 */
46
47#define ADC_PHYS (0x80001300) /* A/D & Touchscreen Controller */
48#define VIC1_PHYS (0x80008000) /* Vectored Interrupt Controller 1 */
49#define USBH_PHYS (0x80009000) /* USB OHCI host controller */
50#define VIC2_PHYS (0x8000a000) /* Vectored Interrupt Controller 2 */
51
52/*#define KBD_PHYS (0x80000e00) */
53/*#define LCDICP_PHYS (0x80001000) */
54
55
56 /* Clock/State Controller register */
57
58#define CSC_PWRSR __REG(CSC_PHYS + 0x00) /* Reset register & ID */
59#define CSC_PWRCNT __REG(CSC_PHYS + 0x04) /* Power control */
60#define CSC_CLKSET __REG(CSC_PHYS + 0x20) /* Clock speed control */
61#define CSC_USBDRESET __REG(CSC_PHYS + 0x4c) /* USB Device resets */
62
63#define CSC_PWRCNT_USBH_EN (1<<28) /* USB Host power enable */
64#define CSC_PWRCNT_DMAC_M2M1_EN (1<<27)
65#define CSC_PWRCNT_DMAC_M2M0_EN (1<<26)
66#define CSC_PWRCNT_DMAC_M2P8_EN (1<<25)
67#define CSC_PWRCNT_DMAC_M2P9_EN (1<<24)
68#define CSC_PWRCNT_DMAC_M2P6_EN (1<<23)
69#define CSC_PWRCNT_DMAC_M2P7_EN (1<<22)
70#define CSC_PWRCNT_DMAC_M2P4_EN (1<<21)
71#define CSC_PWRCNT_DMAC_M2P5_EN (1<<20)
72#define CSC_PWRCNT_DMAC_M2P2_EN (1<<19)
73#define CSC_PWRCNT_DMAC_M2P3_EN (1<<18)
74#define CSC_PWRCNT_DMAC_M2P0_EN (1<<17)
75#define CSC_PWRCNT_DMAC_M2P1_EN (1<<16)
76
77#define CSC_PWRSR_CHIPMAN_SHIFT (24)
78#define CSC_PWRSR_CHIPMAN_MASK (0xff)
79#define CSC_PWRSR_CHIPID_SHIFT (16)
80#define CSC_PWRSR_CHIPID_MASK (0xff)
81
82#define CSC_USBDRESET_APBRESETREG (1<<1)
83#define CSC_USBDRESET_IORESETREG (1<<0)
84
85 /* Interrupt Controller registers */
86
87#define INTC_INTSR __REG(INTC_PHYS + 0x00) /* Status */
88#define INTC_INTRSR __REG(INTC_PHYS + 0x04) /* Raw Status */
89#define INTC_INTENS __REG(INTC_PHYS + 0x08) /* Enable Set */
90#define INTC_INTENC __REG(INTC_PHYS + 0x0c) /* Enable Clear */
91
92
93 /* Vectored Interrupted Controller registers */
94
95#define VIC1_IRQSTATUS __REG(VIC1_PHYS + 0x00)
96#define VIC1_FIQSTATUS __REG(VIC1_PHYS + 0x04)
97#define VIC1_RAWINTR __REG(VIC1_PHYS + 0x08)
98#define VIC1_INTSEL __REG(VIC1_PHYS + 0x0c)
99#define VIC1_INTEN __REG(VIC1_PHYS + 0x10)
100#define VIC1_INTENCLR __REG(VIC1_PHYS + 0x14)
101#define VIC1_SOFTINT __REG(VIC1_PHYS + 0x18)
102#define VIC1_SOFTINTCLR __REG(VIC1_PHYS + 0x1c)
103#define VIC1_PROTECT __REG(VIC1_PHYS + 0x20)
104#define VIC1_VECTADDR __REG(VIC1_PHYS + 0x30)
105#define VIC1_NVADDR __REG(VIC1_PHYS + 0x34)
106#define VIC1_VAD0 __REG(VIC1_PHYS + 0x100)
107#define VIC1_VECTCNTL0 __REG(VIC1_PHYS + 0x200)
108#define VIC2_IRQSTATUS __REG(VIC2_PHYS + 0x00)
109#define VIC2_FIQSTATUS __REG(VIC2_PHYS + 0x04)
110#define VIC2_RAWINTR __REG(VIC2_PHYS + 0x08)
111#define VIC2_INTSEL __REG(VIC2_PHYS + 0x0c)
112#define VIC2_INTEN __REG(VIC2_PHYS + 0x10)
113#define VIC2_INTENCLR __REG(VIC2_PHYS + 0x14)
114#define VIC2_SOFTINT __REG(VIC2_PHYS + 0x18)
115#define VIC2_SOFTINTCLR __REG(VIC2_PHYS + 0x1c)
116#define VIC2_PROTECT __REG(VIC2_PHYS + 0x20)
117#define VIC2_VECTADDR __REG(VIC2_PHYS + 0x30)
118#define VIC2_NVADDR __REG(VIC2_PHYS + 0x34)
119#define VIC2_VAD0 __REG(VIC2_PHYS + 0x100)
120#define VIC2_VECTCNTL0 __REG(VIC2_PHYS + 0x200)
121
122#define VIC_CNTL_ENABLE (0x20)
123
124 /* USB Host registers (Open HCI compatible) */
125
126#define USBH_CMDSTATUS __REG(USBH_PHYS + 0x08)
127
128
129 /* GPIO registers */
130
131#define GPIO_INTTYPE1 __REG(GPIO_PHYS + 0x4c) /* Interrupt Type 1 (Edge) */
132#define GPIO_INTTYPE2 __REG(GPIO_PHYS + 0x50) /* Interrupt Type 2 */
133#define GPIO_GPIOFEOI __REG(GPIO_PHYS + 0x54) /* GPIO End-of-Interrupt */
134#define GPIO_GPIOINTEN __REG(GPIO_PHYS + 0x58) /* GPIO Interrupt Enable */
135#define GPIO_INTSTATUS __REG(GPIO_PHYS + 0x5c) /* GPIO Interrupt Status */
136#define GPIO_PINMUX __REG(GPIO_PHYS + 0x2c)
137#define GPIO_PADD __REG(GPIO_PHYS + 0x10)
138#define GPIO_PAD __REG(GPIO_PHYS + 0x00)
139#define GPIO_PCD __REG(GPIO_PHYS + 0x08)
140#define GPIO_PCDD __REG(GPIO_PHYS + 0x18)
141#define GPIO_PEDD __REG(GPIO_PHYS + 0x24)
142#define GPIO_PED __REG(GPIO_PHYS + 0x20)
143
144
145 /* Static Memory Controller registers */
146
147#define SMC_BCR0 __REG(SMC_PHYS + 0x00) /* Bank 0 Configuration */
148#define SMC_BCR1 __REG(SMC_PHYS + 0x04) /* Bank 1 Configuration */
149#define SMC_BCR2 __REG(SMC_PHYS + 0x08) /* Bank 2 Configuration */
150#define SMC_BCR3 __REG(SMC_PHYS + 0x0C) /* Bank 3 Configuration */
151#define SMC_BCR6 __REG(SMC_PHYS + 0x18) /* Bank 6 Configuration */
152#define SMC_BCR7 __REG(SMC_PHYS + 0x1c) /* Bank 7 Configuration */
153
154
155#ifdef CONFIG_MACH_KEV7A400
156# define CPLD_RD_OPT_DIP_SW __REG16(CPLD_PHYS + 0x00) /* Read Option SW */
157# define CPLD_WR_IO_BRD_CTL __REG16(CPLD_PHYS + 0x00) /* Write Control */
158# define CPLD_RD_PB_KEYS __REG16(CPLD_PHYS + 0x02) /* Read Btn Keys */
159# define CPLD_LATCHED_INTS __REG16(CPLD_PHYS + 0x04) /* Read INTR stat. */
160# define CPLD_CL_INT __REG16(CPLD_PHYS + 0x04) /* Clear INTR stat */
161# define CPLD_BOOT_MMC_STATUS __REG16(CPLD_PHYS + 0x06) /* R/O */
162# define CPLD_RD_KPD_ROW_SENSE __REG16(CPLD_PHYS + 0x08)
163# define CPLD_WR_PB_INT_MASK __REG16(CPLD_PHYS + 0x08)
164# define CPLD_RD_BRD_DISP_SW __REG16(CPLD_PHYS + 0x0a)
165# define CPLD_WR_EXT_INT_MASK __REG16(CPLD_PHYS + 0x0a)
166# define CPLD_LCD_PWR_CNTL __REG16(CPLD_PHYS + 0x0c)
167# define CPLD_SEVEN_SEG __REG16(CPLD_PHYS + 0x0e) /* 7 seg. LED mask */
168
169#endif
170
171#if defined (CONFIG_MACH_LPD7A400) || defined (CONFIG_MACH_LPD7A404)
172
173# define CPLD_CONTROL __REG16(CPLD02_PHYS)
174# define CPLD_SPI_DATA __REG16(CPLD06_PHYS)
175# define CPLD_SPI_CONTROL __REG16(CPLD08_PHYS)
176# define CPLD_SPI_EEPROM __REG16(CPLD0A_PHYS)
177# define CPLD_INTERRUPTS __REG16(CPLD0C_PHYS) /* IRQ mask/status */
178# define CPLD_BOOT_MODE __REG16(CPLD0E_PHYS)
179# define CPLD_FLASH __REG16(CPLD10_PHYS)
180# define CPLD_POWER_MGMT __REG16(CPLD12_PHYS)
181# define CPLD_REVISION __REG16(CPLD14_PHYS)
182# define CPLD_GPIO_EXT __REG16(CPLD16_PHYS)
183# define CPLD_GPIO_DATA __REG16(CPLD18_PHYS)
184# define CPLD_GPIO_DIR __REG16(CPLD1A_PHYS)
185
186#endif
187
188 /* Timer registers */
189
190#define TIMER_LOAD1 __REG(TIMER_PHYS + 0x00) /* Timer 1 initial value */
191#define TIMER_VALUE1 __REG(TIMER_PHYS + 0x04) /* Timer 1 current value */
192#define TIMER_CONTROL1 __REG(TIMER_PHYS + 0x08) /* Timer 1 control word */
193#define TIMER_EOI1 __REG(TIMER_PHYS + 0x0c) /* Timer 1 interrupt clear */
194
195#define TIMER_LOAD2 __REG(TIMER_PHYS + 0x20) /* Timer 2 initial value */
196#define TIMER_VALUE2 __REG(TIMER_PHYS + 0x24) /* Timer 2 current value */
197#define TIMER_CONTROL2 __REG(TIMER_PHYS + 0x28) /* Timer 2 control word */
198#define TIMER_EOI2 __REG(TIMER_PHYS + 0x2c) /* Timer 2 interrupt clear */
199
200#define TIMER_BUZZCON __REG(TIMER_PHYS + 0x40) /* Buzzer configuration */
201
202#define TIMER_LOAD3 __REG(TIMER_PHYS + 0x80) /* Timer 3 initial value */
203#define TIMER_VALUE3 __REG(TIMER_PHYS + 0x84) /* Timer 3 current value */
204#define TIMER_CONTROL3 __REG(TIMER_PHYS + 0x88) /* Timer 3 control word */
205#define TIMER_EOI3 __REG(TIMER_PHYS + 0x8c) /* Timer 3 interrupt clear */
206
207#define TIMER_C_ENABLE (1<<7)
208#define TIMER_C_PERIODIC (1<<6)
209#define TIMER_C_FREERUNNING (0)
210#define TIMER_C_2KHZ (0x00) /* 1.986 kHz */
211#define TIMER_C_508KHZ (0x08)
212
213 /* GPIO registers */
214
215#define GPIO_PFDD __REG(GPIO_PHYS + 0x34) /* PF direction */
216#define GPIO_INTTYPE1 __REG(GPIO_PHYS + 0x4c) /* IRQ edge or lvl */
217#define GPIO_INTTYPE2 __REG(GPIO_PHYS + 0x50) /* IRQ activ hi/lo */
218#define GPIO_GPIOFEOI __REG(GPIO_PHYS + 0x54) /* GPIOF end of IRQ */
219#define GPIO_GPIOFINTEN __REG(GPIO_PHYS + 0x58) /* GPIOF IRQ enable */
220#define GPIO_INTSTATUS __REG(GPIO_PHYS + 0x5c) /* GPIOF IRQ latch */
221#define GPIO_RAWINTSTATUS __REG(GPIO_PHYS + 0x60) /* GPIOF IRQ raw */
222
223
224#endif /* _ASM_ARCH_REGISTERS_H */
diff --git a/include/asm-arm/arch-lh7a40x/ssp.h b/arch/arm/mach-lh7a40x/include/mach/ssp.h
index 132b1c4d5ce6..132b1c4d5ce6 100644
--- a/include/asm-arm/arch-lh7a40x/ssp.h
+++ b/arch/arm/mach-lh7a40x/include/mach/ssp.h
diff --git a/arch/arm/mach-lh7a40x/include/mach/system.h b/arch/arm/mach-lh7a40x/include/mach/system.h
new file mode 100644
index 000000000000..fa46bb1ef07b
--- /dev/null
+++ b/arch/arm/mach-lh7a40x/include/mach/system.h
@@ -0,0 +1,19 @@
1/* arch/arm/mach-lh7a40x/include/mach/system.h
2 *
3 * Copyright (C) 2004 Coastal Environmental Systems
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * version 2 as published by the Free Software Foundation.
8 *
9 */
10
11static inline void arch_idle(void)
12{
13 cpu_do_idle ();
14}
15
16static inline void arch_reset(char mode)
17{
18 cpu_reset (0);
19}
diff --git a/arch/arm/mach-lh7a40x/include/mach/timex.h b/arch/arm/mach-lh7a40x/include/mach/timex.h
new file mode 100644
index 000000000000..08028cef1b3b
--- /dev/null
+++ b/arch/arm/mach-lh7a40x/include/mach/timex.h
@@ -0,0 +1,17 @@
1/* arch/arm/mach-lh7a40x/include/mach/timex.h
2 *
3 * Copyright (C) 2004 Coastal Environmental Systems
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * version 2 as published by the Free Software Foundation.
8 *
9 */
10
11#include <mach/constants.h>
12
13#define CLOCK_TICK_RATE (PLL_CLOCK/6/16)
14
15/*
16#define CLOCK_TICK_RATE 3686400
17*/
diff --git a/arch/arm/mach-lh7a40x/include/mach/uncompress.h b/arch/arm/mach-lh7a40x/include/mach/uncompress.h
new file mode 100644
index 000000000000..55b80d479eb4
--- /dev/null
+++ b/arch/arm/mach-lh7a40x/include/mach/uncompress.h
@@ -0,0 +1,38 @@
1/* arch/arm/mach-lh7a40x/include/mach/uncompress.h
2 *
3 * Copyright (C) 2004 Coastal Environmental Systems
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * version 2 as published by the Free Software Foundation.
8 *
9 */
10
11#include <mach/registers.h>
12
13#ifndef UART_R_DATA
14# define UART_R_DATA (0x00)
15#endif
16#ifndef UART_R_STATUS
17# define UART_R_STATUS (0x10)
18#endif
19#define nTxRdy (0x20) /* Not TxReady (literally Tx FIFO full) */
20
21 /* Access UART with physical addresses before MMU is setup */
22#define UART_STATUS (*(volatile unsigned long*) (UART2_PHYS + UART_R_STATUS))
23#define UART_DATA (*(volatile unsigned long*) (UART2_PHYS + UART_R_DATA))
24
25static inline void putc(int ch)
26{
27 while (UART_STATUS & nTxRdy)
28 barrier();
29 UART_DATA = ch;
30}
31
32static inline void flush(void)
33{
34}
35
36 /* NULL functions; we don't presently need them */
37#define arch_decomp_setup()
38#define arch_decomp_wdog()
diff --git a/arch/arm/mach-lh7a40x/include/mach/vmalloc.h b/arch/arm/mach-lh7a40x/include/mach/vmalloc.h
new file mode 100644
index 000000000000..3fbd49490bb9
--- /dev/null
+++ b/arch/arm/mach-lh7a40x/include/mach/vmalloc.h
@@ -0,0 +1,10 @@
1/* arch/arm/mach-lh7a40x/include/mach/vmalloc.h
2 *
3 * Copyright (C) 2004 Coastal Environmental Systems
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * version 2 as published by the Free Software Foundation.
8 *
9 */
10#define VMALLOC_END (0xe8000000)
diff --git a/arch/arm/mach-lh7a40x/irq-lh7a400.c b/arch/arm/mach-lh7a40x/irq-lh7a400.c
index 9472bbebd8ab..1ad3afcf6b3d 100644
--- a/arch/arm/mach-lh7a40x/irq-lh7a400.c
+++ b/arch/arm/mach-lh7a40x/irq-lh7a400.c
@@ -12,10 +12,10 @@
12#include <linux/module.h> 12#include <linux/module.h>
13#include <linux/interrupt.h> 13#include <linux/interrupt.h>
14 14
15#include <asm/hardware.h> 15#include <mach/hardware.h>
16#include <asm/irq.h> 16#include <asm/irq.h>
17#include <asm/mach/irq.h> 17#include <asm/mach/irq.h>
18#include <asm/arch/irqs.h> 18#include <mach/irqs.h>
19 19
20#include "common.h" 20#include "common.h"
21 21
diff --git a/arch/arm/mach-lh7a40x/irq-lh7a404.c b/arch/arm/mach-lh7a40x/irq-lh7a404.c
index 9b28389035e6..12b045b688c6 100644
--- a/arch/arm/mach-lh7a40x/irq-lh7a404.c
+++ b/arch/arm/mach-lh7a40x/irq-lh7a404.c
@@ -12,10 +12,10 @@
12#include <linux/module.h> 12#include <linux/module.h>
13#include <linux/interrupt.h> 13#include <linux/interrupt.h>
14 14
15#include <asm/hardware.h> 15#include <mach/hardware.h>
16#include <asm/irq.h> 16#include <asm/irq.h>
17#include <asm/mach/irq.h> 17#include <asm/mach/irq.h>
18#include <asm/arch/irqs.h> 18#include <mach/irqs.h>
19 19
20#include "common.h" 20#include "common.h"
21 21
diff --git a/arch/arm/mach-lh7a40x/irq-lpd7a40x.c b/arch/arm/mach-lh7a40x/irq-lpd7a40x.c
index 66e1ed3961ea..0d5063ebda10 100644
--- a/arch/arm/mach-lh7a40x/irq-lpd7a40x.c
+++ b/arch/arm/mach-lh7a40x/irq-lpd7a40x.c
@@ -13,10 +13,10 @@
13#include <linux/module.h> 13#include <linux/module.h>
14#include <linux/interrupt.h> 14#include <linux/interrupt.h>
15 15
16#include <asm/hardware.h> 16#include <mach/hardware.h>
17#include <asm/irq.h> 17#include <asm/irq.h>
18#include <asm/mach/irq.h> 18#include <asm/mach/irq.h>
19#include <asm/arch/irqs.h> 19#include <mach/irqs.h>
20 20
21#include "common.h" 21#include "common.h"
22 22
diff --git a/arch/arm/mach-lh7a40x/ssp-cpld.c b/arch/arm/mach-lh7a40x/ssp-cpld.c
index a10830186dac..51fbef9601b9 100644
--- a/arch/arm/mach-lh7a40x/ssp-cpld.c
+++ b/arch/arm/mach-lh7a40x/ssp-cpld.c
@@ -46,9 +46,9 @@
46 46
47#include <asm/io.h> 47#include <asm/io.h>
48#include <asm/irq.h> 48#include <asm/irq.h>
49#include <asm/hardware.h> 49#include <mach/hardware.h>
50 50
51#include <asm/arch/ssp.h> 51#include <mach/ssp.h>
52 52
53//#define TALK 53//#define TALK
54 54
diff --git a/arch/arm/mach-lh7a40x/time.c b/arch/arm/mach-lh7a40x/time.c
index e50e60b33851..7fe9e06cf662 100644
--- a/arch/arm/mach-lh7a40x/time.c
+++ b/arch/arm/mach-lh7a40x/time.c
@@ -14,7 +14,7 @@
14#include <linux/irq.h> 14#include <linux/irq.h>
15#include <linux/time.h> 15#include <linux/time.h>
16 16
17#include <asm/hardware.h> 17#include <mach/hardware.h>
18#include <asm/io.h> 18#include <asm/io.h>
19#include <asm/irq.h> 19#include <asm/irq.h>
20#include <asm/leds.h> 20#include <asm/leds.h>
diff --git a/arch/arm/mach-loki/addr-map.c b/arch/arm/mach-loki/addr-map.c
index ba25e56ade58..70ca56bb6f33 100644
--- a/arch/arm/mach-loki/addr-map.c
+++ b/arch/arm/mach-loki/addr-map.c
@@ -11,7 +11,7 @@
11#include <linux/kernel.h> 11#include <linux/kernel.h>
12#include <linux/init.h> 12#include <linux/init.h>
13#include <linux/mbus.h> 13#include <linux/mbus.h>
14#include <asm/hardware.h> 14#include <mach/hardware.h>
15#include <asm/io.h> 15#include <asm/io.h>
16#include "common.h" 16#include "common.h"
17 17
diff --git a/arch/arm/mach-loki/common.c b/arch/arm/mach-loki/common.c
index 410f50399dd3..e20cdbca1ebe 100644
--- a/arch/arm/mach-loki/common.c
+++ b/arch/arm/mach-loki/common.c
@@ -18,7 +18,7 @@
18#include <asm/timex.h> 18#include <asm/timex.h>
19#include <asm/mach/map.h> 19#include <asm/mach/map.h>
20#include <asm/mach/time.h> 20#include <asm/mach/time.h>
21#include <asm/arch/loki.h> 21#include <mach/loki.h>
22#include <asm/plat-orion/orion_nand.h> 22#include <asm/plat-orion/orion_nand.h>
23#include <asm/plat-orion/time.h> 23#include <asm/plat-orion/time.h>
24#include "common.h" 24#include "common.h"
diff --git a/arch/arm/mach-loki/include/mach/debug-macro.S b/arch/arm/mach-loki/include/mach/debug-macro.S
new file mode 100644
index 000000000000..a8c20bd2f951
--- /dev/null
+++ b/arch/arm/mach-loki/include/mach/debug-macro.S
@@ -0,0 +1,20 @@
1/*
2 * arch/arm/mach-loki/include/mach/debug-macro.S
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7*/
8
9#include <mach/loki.h>
10
11 .macro addruart,rx
12 mrc p15, 0, \rx, c1, c0
13 tst \rx, #1 @ MMU enabled?
14 ldreq \rx, =LOKI_REGS_PHYS_BASE
15 ldrne \rx, =LOKI_REGS_VIRT_BASE
16 orr \rx, \rx, #0x00012000
17 .endm
18
19#define UART_SHIFT 2
20#include <asm/hardware/debug-8250.S>
diff --git a/include/asm-arm/arch-loki/dma.h b/arch/arm/mach-loki/include/mach/dma.h
index 40a8c178f10d..40a8c178f10d 100644
--- a/include/asm-arm/arch-loki/dma.h
+++ b/arch/arm/mach-loki/include/mach/dma.h
diff --git a/arch/arm/mach-loki/include/mach/entry-macro.S b/arch/arm/mach-loki/include/mach/entry-macro.S
new file mode 100644
index 000000000000..332af38ec13c
--- /dev/null
+++ b/arch/arm/mach-loki/include/mach/entry-macro.S
@@ -0,0 +1,30 @@
1/*
2 * arch/arm/mach-loki/include/mach/entry-macro.S
3 *
4 * Low-level IRQ helper macros for Marvell Loki (88RC8480) platforms
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10
11#include <mach/loki.h>
12
13 .macro disable_fiq
14 .endm
15
16 .macro arch_ret_to_user, tmp1, tmp2
17 .endm
18
19 .macro get_irqnr_preamble, base, tmp
20 ldr \base, =IRQ_VIRT_BASE
21 .endm
22
23 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
24 ldr \irqstat, [\base, #IRQ_CAUSE_OFF]
25 ldr \tmp, [\base, #IRQ_MASK_OFF]
26 mov \irqnr, #0
27 ands \irqstat, \irqstat, \tmp
28 clzne \irqnr, \irqstat
29 rsbne \irqnr, \irqnr, #31
30 .endm
diff --git a/arch/arm/mach-loki/include/mach/hardware.h b/arch/arm/mach-loki/include/mach/hardware.h
new file mode 100644
index 000000000000..d7bfc8f17729
--- /dev/null
+++ b/arch/arm/mach-loki/include/mach/hardware.h
@@ -0,0 +1,15 @@
1/*
2 * arch/arm/mach-loki/include/mach/hardware.h
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 */
8
9#ifndef __ASM_ARCH_HARDWARE_H
10#define __ASM_ARCH_HARDWARE_H
11
12#include "loki.h"
13
14
15#endif
diff --git a/arch/arm/mach-loki/include/mach/io.h b/arch/arm/mach-loki/include/mach/io.h
new file mode 100644
index 000000000000..a373cd582c84
--- /dev/null
+++ b/arch/arm/mach-loki/include/mach/io.h
@@ -0,0 +1,26 @@
1/*
2 * arch/arm/mach-loki/include/mach/io.h
3 *
4 * This file is licensed under the terms of the GNU General Public
5 * License version 2. This program is licensed "as is" without any
6 * warranty of any kind, whether express or implied.
7 */
8
9#ifndef __ASM_ARCH_IO_H
10#define __ASM_ARCH_IO_H
11
12#include "loki.h"
13
14#define IO_SPACE_LIMIT 0xffffffff
15
16static inline void __iomem *__io(unsigned long addr)
17{
18 return (void __iomem *)((addr - LOKI_PCIE0_IO_PHYS_BASE)
19 + LOKI_PCIE0_IO_VIRT_BASE);
20}
21
22#define __io(a) __io(a)
23#define __mem_pci(a) (a)
24
25
26#endif
diff --git a/arch/arm/mach-loki/include/mach/irqs.h b/arch/arm/mach-loki/include/mach/irqs.h
new file mode 100644
index 000000000000..9fbd3326867b
--- /dev/null
+++ b/arch/arm/mach-loki/include/mach/irqs.h
@@ -0,0 +1,58 @@
1/*
2 * arch/arm/mach-loki/include/mach/irqs.h
3 *
4 * IRQ definitions for Marvell Loki (88RC8480) SoCs
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10
11#ifndef __ASM_ARCH_IRQS_H
12#define __ASM_ARCH_IRQS_H
13
14#include "loki.h" /* need GPIO_MAX */
15
16/*
17 * Interrupt Controller
18 */
19#define IRQ_LOKI_PCIE_A_CPU_DRBL 0
20#define IRQ_LOKI_CPU_PCIE_A_DRBL 1
21#define IRQ_LOKI_PCIE_B_CPU_DRBL 2
22#define IRQ_LOKI_CPU_PCIE_B_DRBL 3
23#define IRQ_LOKI_COM_A_ERR 6
24#define IRQ_LOKI_COM_A_IN 7
25#define IRQ_LOKI_COM_A_OUT 8
26#define IRQ_LOKI_COM_B_ERR 9
27#define IRQ_LOKI_COM_B_IN 10
28#define IRQ_LOKI_COM_B_OUT 11
29#define IRQ_LOKI_DMA_A 12
30#define IRQ_LOKI_DMA_B 13
31#define IRQ_LOKI_SAS_A 14
32#define IRQ_LOKI_SAS_B 15
33#define IRQ_LOKI_DDR 16
34#define IRQ_LOKI_XOR 17
35#define IRQ_LOKI_BRIDGE 18
36#define IRQ_LOKI_PCIE_A_ERR 20
37#define IRQ_LOKI_PCIE_A_INT 21
38#define IRQ_LOKI_PCIE_B_ERR 22
39#define IRQ_LOKI_PCIE_B_INT 23
40#define IRQ_LOKI_GBE_A_INT 24
41#define IRQ_LOKI_GBE_B_INT 25
42#define IRQ_LOKI_DEV_ERR 26
43#define IRQ_LOKI_UART0 27
44#define IRQ_LOKI_UART1 28
45#define IRQ_LOKI_TWSI 29
46#define IRQ_LOKI_GPIO_23_0 30
47#define IRQ_LOKI_GPIO_25_24 31
48
49/*
50 * Loki General Purpose Pins
51 */
52#define IRQ_LOKI_GPIO_START 32
53#define NR_GPIO_IRQS GPIO_MAX
54
55#define NR_IRQS (IRQ_LOKI_GPIO_START + NR_GPIO_IRQS)
56
57
58#endif
diff --git a/arch/arm/mach-loki/include/mach/loki.h b/arch/arm/mach-loki/include/mach/loki.h
new file mode 100644
index 000000000000..c00af6ba5578
--- /dev/null
+++ b/arch/arm/mach-loki/include/mach/loki.h
@@ -0,0 +1,97 @@
1/*
2 * arch/arm/mach-loki/include/mach/loki.h
3 *
4 * Generic definitions for Marvell Loki (88RC8480) SoC flavors
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10
11#ifndef __ASM_ARCH_LOKI_H
12#define __ASM_ARCH_LOKI_H
13
14/*
15 * Marvell Loki (88RC8480) address maps.
16 *
17 * phys
18 * d0000000 on-chip peripheral registers
19 * e0000000 PCIe 0 Memory space
20 * e8000000 PCIe 1 Memory space
21 * f0000000 PCIe 0 I/O space
22 * f0100000 PCIe 1 I/O space
23 *
24 * virt phys size
25 * fed00000 d0000000 1M on-chip peripheral registers
26 * fee00000 f0000000 64K PCIe 0 I/O space
27 * fef00000 f0100000 64K PCIe 1 I/O space
28 */
29
30#define LOKI_REGS_PHYS_BASE 0xd0000000
31#define LOKI_REGS_VIRT_BASE 0xfed00000
32#define LOKI_REGS_SIZE SZ_1M
33
34#define LOKI_PCIE0_IO_PHYS_BASE 0xf0000000
35#define LOKI_PCIE0_IO_VIRT_BASE 0xfee00000
36#define LOKI_PCIE0_IO_BUS_BASE 0x00000000
37#define LOKI_PCIE0_IO_SIZE SZ_64K
38
39#define LOKI_PCIE1_IO_PHYS_BASE 0xf0100000
40#define LOKI_PCIE1_IO_VIRT_BASE 0xfef00000
41#define LOKI_PCIE1_IO_BUS_BASE 0x00000000
42#define LOKI_PCIE1_IO_SIZE SZ_64K
43
44#define LOKI_PCIE0_MEM_PHYS_BASE 0xe0000000
45#define LOKI_PCIE0_MEM_SIZE SZ_128M
46
47#define LOKI_PCIE1_MEM_PHYS_BASE 0xe8000000
48#define LOKI_PCIE1_MEM_SIZE SZ_128M
49
50/*
51 * Register Map
52 */
53#define DEV_BUS_PHYS_BASE (LOKI_REGS_PHYS_BASE | 0x10000)
54#define DEV_BUS_VIRT_BASE (LOKI_REGS_VIRT_BASE | 0x10000)
55#define UART0_PHYS_BASE (DEV_BUS_PHYS_BASE | 0x2000)
56#define UART0_VIRT_BASE (DEV_BUS_VIRT_BASE | 0x2000)
57#define UART1_PHYS_BASE (DEV_BUS_PHYS_BASE | 0x2100)
58#define UART1_VIRT_BASE (DEV_BUS_VIRT_BASE | 0x2100)
59
60#define BRIDGE_VIRT_BASE (LOKI_REGS_VIRT_BASE | 0x20000)
61#define BRIDGE_REG(x) (BRIDGE_VIRT_BASE | (x))
62#define RSTOUTn_MASK (BRIDGE_VIRT_BASE | 0x0108)
63#define SOFT_RESET_OUT_EN 0x00000004
64#define SYSTEM_SOFT_RESET (BRIDGE_VIRT_BASE | 0x010c)
65#define SOFT_RESET 0x00000001
66#define BRIDGE_CAUSE (BRIDGE_VIRT_BASE | 0x0110)
67#define BRIDGE_MASK (BRIDGE_VIRT_BASE | 0x0114)
68#define BRIDGE_INT_TIMER0 0x0002
69#define BRIDGE_INT_TIMER1 0x0004
70#define BRIDGE_INT_TIMER1_CLR 0x0004
71#define IRQ_VIRT_BASE (BRIDGE_VIRT_BASE | 0x0200)
72#define IRQ_CAUSE_OFF 0x0000
73#define IRQ_MASK_OFF 0x0004
74#define TIMER_VIRT_BASE (BRIDGE_VIRT_BASE | 0x0300)
75
76#define PCIE0_VIRT_BASE (LOKI_REGS_VIRT_BASE | 0x30000)
77
78#define PCIE1_VIRT_BASE (LOKI_REGS_VIRT_BASE | 0x40000)
79
80#define SAS0_PHYS_BASE (LOKI_REGS_PHYS_BASE | 0x80000)
81
82#define SAS1_PHYS_BASE (LOKI_REGS_PHYS_BASE | 0x90000)
83
84#define GE0_PHYS_BASE (LOKI_REGS_PHYS_BASE | 0xa0000)
85#define GE0_VIRT_BASE (LOKI_REGS_VIRT_BASE | 0xa0000)
86
87#define GE1_PHYS_BASE (LOKI_REGS_PHYS_BASE | 0xb0000)
88#define GE1_VIRT_BASE (LOKI_REGS_VIRT_BASE | 0xb0000)
89
90#define DDR_VIRT_BASE (LOKI_REGS_VIRT_BASE | 0xf0000)
91#define DDR_REG(x) (DDR_VIRT_BASE | (x))
92
93
94#define GPIO_MAX 8
95
96
97#endif
diff --git a/arch/arm/mach-loki/include/mach/memory.h b/arch/arm/mach-loki/include/mach/memory.h
new file mode 100644
index 000000000000..a39533ab489d
--- /dev/null
+++ b/arch/arm/mach-loki/include/mach/memory.h
@@ -0,0 +1,14 @@
1/*
2 * arch/arm/mach-loki/include/mach/memory.h
3 */
4
5#ifndef __ASM_ARCH_MEMORY_H
6#define __ASM_ARCH_MEMORY_H
7
8#define PHYS_OFFSET UL(0x00000000)
9
10#define __virt_to_bus(x) __virt_to_phys(x)
11#define __bus_to_virt(x) __phys_to_virt(x)
12
13
14#endif
diff --git a/arch/arm/mach-loki/include/mach/system.h b/arch/arm/mach-loki/include/mach/system.h
new file mode 100644
index 000000000000..8db1147d4ec5
--- /dev/null
+++ b/arch/arm/mach-loki/include/mach/system.h
@@ -0,0 +1,37 @@
1/*
2 * arch/arm/mach-loki/include/mach/system.h
3 *
4 * This file is licensed under the terms of the GNU General Public
5 * License version 2. This program is licensed "as is" without any
6 * warranty of any kind, whether express or implied.
7 */
8
9#ifndef __ASM_ARCH_SYSTEM_H
10#define __ASM_ARCH_SYSTEM_H
11
12#include <mach/hardware.h>
13#include <mach/loki.h>
14
15static inline void arch_idle(void)
16{
17 cpu_do_idle();
18}
19
20static inline void arch_reset(char mode)
21{
22 /*
23 * Enable soft reset to assert RSTOUTn.
24 */
25 writel(SOFT_RESET_OUT_EN, RSTOUTn_MASK);
26
27 /*
28 * Assert soft reset.
29 */
30 writel(SOFT_RESET, SYSTEM_SOFT_RESET);
31
32 while (1)
33 ;
34}
35
36
37#endif
diff --git a/arch/arm/mach-loki/include/mach/timex.h b/arch/arm/mach-loki/include/mach/timex.h
new file mode 100644
index 000000000000..9df210915297
--- /dev/null
+++ b/arch/arm/mach-loki/include/mach/timex.h
@@ -0,0 +1,11 @@
1/*
2 * arch/arm/mach-loki/include/mach/timex.h
3 *
4 * This file is licensed under the terms of the GNU General Public
5 * License version 2. This program is licensed "as is" without any
6 * warranty of any kind, whether express or implied.
7 */
8
9#define CLOCK_TICK_RATE (100 * HZ)
10
11#define LOKI_TCLK 180000000
diff --git a/arch/arm/mach-loki/include/mach/uncompress.h b/arch/arm/mach-loki/include/mach/uncompress.h
new file mode 100644
index 000000000000..90b2a7e65da3
--- /dev/null
+++ b/arch/arm/mach-loki/include/mach/uncompress.h
@@ -0,0 +1,47 @@
1/*
2 * arch/arm/mach-loki/include/mach/uncompress.h
3 *
4 * This file is licensed under the terms of the GNU General Public
5 * License version 2. This program is licensed "as is" without any
6 * warranty of any kind, whether express or implied.
7 */
8
9#include <linux/serial_reg.h>
10#include <mach/loki.h>
11
12#define SERIAL_BASE ((unsigned char *)UART0_PHYS_BASE)
13
14static void putc(const char c)
15{
16 unsigned char *base = SERIAL_BASE;
17 int i;
18
19 for (i = 0; i < 0x1000; i++) {
20 if (base[UART_LSR << 2] & UART_LSR_THRE)
21 break;
22 barrier();
23 }
24
25 base[UART_TX << 2] = c;
26}
27
28static void flush(void)
29{
30 unsigned char *base = SERIAL_BASE;
31 unsigned char mask;
32 int i;
33
34 mask = UART_LSR_TEMT | UART_LSR_THRE;
35
36 for (i = 0; i < 0x1000; i++) {
37 if ((base[UART_LSR << 2] & mask) == mask)
38 break;
39 barrier();
40 }
41}
42
43/*
44 * nothing to do
45 */
46#define arch_decomp_setup()
47#define arch_decomp_wdog()
diff --git a/arch/arm/mach-loki/include/mach/vmalloc.h b/arch/arm/mach-loki/include/mach/vmalloc.h
new file mode 100644
index 000000000000..8dc3bfcbf9f0
--- /dev/null
+++ b/arch/arm/mach-loki/include/mach/vmalloc.h
@@ -0,0 +1,5 @@
1/*
2 * arch/arm/mach-loki/include/mach/vmalloc.h
3 */
4
5#define VMALLOC_END 0xfe800000
diff --git a/arch/arm/mach-loki/lb88rc8480-setup.c b/arch/arm/mach-loki/lb88rc8480-setup.c
index d1b9e6e6253a..2cc9ac9b488f 100644
--- a/arch/arm/mach-loki/lb88rc8480-setup.c
+++ b/arch/arm/mach-loki/lb88rc8480-setup.c
@@ -19,7 +19,7 @@
19#include <linux/mv643xx_eth.h> 19#include <linux/mv643xx_eth.h>
20#include <asm/mach-types.h> 20#include <asm/mach-types.h>
21#include <asm/mach/arch.h> 21#include <asm/mach/arch.h>
22#include <asm/arch/loki.h> 22#include <mach/loki.h>
23#include "common.h" 23#include "common.h"
24 24
25#define LB88RC8480_FLASH_BOOT_CS_BASE 0xf8000000 25#define LB88RC8480_FLASH_BOOT_CS_BASE 0xf8000000
diff --git a/arch/arm/mach-msm/board-halibut.c b/arch/arm/mach-msm/board-halibut.c
index 86dfb2b5261c..995afc4ade4b 100644
--- a/arch/arm/mach-msm/board-halibut.c
+++ b/arch/arm/mach-msm/board-halibut.c
@@ -19,14 +19,14 @@
19#include <linux/platform_device.h> 19#include <linux/platform_device.h>
20#include <linux/input.h> 20#include <linux/input.h>
21 21
22#include <asm/hardware.h> 22#include <mach/hardware.h>
23#include <asm/mach-types.h> 23#include <asm/mach-types.h>
24#include <asm/mach/arch.h> 24#include <asm/mach/arch.h>
25#include <asm/mach/map.h> 25#include <asm/mach/map.h>
26#include <asm/mach/flash.h> 26#include <asm/mach/flash.h>
27 27
28#include <asm/arch/board.h> 28#include <mach/board.h>
29#include <asm/arch/msm_iomap.h> 29#include <mach/msm_iomap.h>
30 30
31#include <asm/io.h> 31#include <asm/io.h>
32#include <asm/delay.h> 32#include <asm/delay.h>
diff --git a/arch/arm/mach-msm/common.c b/arch/arm/mach-msm/common.c
index 3f5d3362f887..3a511368a5d8 100644
--- a/arch/arm/mach-msm/common.c
+++ b/arch/arm/mach-msm/common.c
@@ -28,9 +28,9 @@
28#include <linux/mtd/nand.h> 28#include <linux/mtd/nand.h>
29#include <linux/mtd/partitions.h> 29#include <linux/mtd/partitions.h>
30 30
31#include <asm/arch/msm_iomap.h> 31#include <mach/msm_iomap.h>
32 32
33#include <asm/arch/board.h> 33#include <mach/board.h>
34 34
35struct flash_platform_data msm_nand_data = { 35struct flash_platform_data msm_nand_data = {
36 .parts = 0, 36 .parts = 0,
diff --git a/arch/arm/mach-msm/dma.c b/arch/arm/mach-msm/dma.c
index 8b0f339b3274..9de08265d974 100644
--- a/arch/arm/mach-msm/dma.c
+++ b/arch/arm/mach-msm/dma.c
@@ -15,7 +15,7 @@
15 15
16#include <asm/io.h> 16#include <asm/io.h>
17#include <linux/interrupt.h> 17#include <linux/interrupt.h>
18#include <asm/arch/dma.h> 18#include <mach/dma.h>
19 19
20#define MSM_DMOV_CHANNEL_COUNT 16 20#define MSM_DMOV_CHANNEL_COUNT 16
21 21
diff --git a/arch/arm/mach-msm/idle.S b/arch/arm/mach-msm/idle.S
index 2b1cb7f16943..6a94f0527137 100644
--- a/arch/arm/mach-msm/idle.S
+++ b/arch/arm/mach-msm/idle.S
@@ -1,4 +1,4 @@
1/* linux/include/asm-arm/arch-msm/idle.S 1/* arch/arm/mach-msm/include/mach/idle.S
2 * 2 *
3 * Idle processing for MSM7K - work around bugs with SWFI. 3 * Idle processing for MSM7K - work around bugs with SWFI.
4 * 4 *
diff --git a/arch/arm/mach-msm/include/mach/board.h b/arch/arm/mach-msm/include/mach/board.h
new file mode 100644
index 000000000000..a7639493c095
--- /dev/null
+++ b/arch/arm/mach-msm/include/mach/board.h
@@ -0,0 +1,37 @@
1/* arch/arm/mach-msm/include/mach/board.h
2 *
3 * Copyright (C) 2007 Google, Inc.
4 * Author: Brian Swetland <swetland@google.com>
5 *
6 * This software is licensed under the terms of the GNU General Public
7 * License version 2, as published by the Free Software Foundation, and
8 * may be copied, distributed, and modified under those terms.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 */
16
17#ifndef __ASM_ARCH_MSM_BOARD_H
18#define __ASM_ARCH_MSM_BOARD_H
19
20#include <linux/types.h>
21
22/* platform device data structures */
23
24struct msm_mddi_platform_data
25{
26 void (*panel_power)(int on);
27 unsigned has_vsync_irq:1;
28};
29
30/* common init routines for use by arch/arm/mach-msm/board-*.c */
31
32void __init msm_add_devices(void);
33void __init msm_map_common_io(void);
34void __init msm_init_irq(void);
35void __init msm_init_gpio(void);
36
37#endif
diff --git a/arch/arm/mach-msm/include/mach/debug-macro.S b/arch/arm/mach-msm/include/mach/debug-macro.S
new file mode 100644
index 000000000000..528eef4b605c
--- /dev/null
+++ b/arch/arm/mach-msm/include/mach/debug-macro.S
@@ -0,0 +1,40 @@
1/* arch/arm/mach-msm7200/include/mach/debug-macro.S
2 *
3 * Copyright (C) 2007 Google, Inc.
4 * Author: Brian Swetland <swetland@google.com>
5 *
6 * This software is licensed under the terms of the GNU General Public
7 * License version 2, as published by the Free Software Foundation, and
8 * may be copied, distributed, and modified under those terms.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 */
16
17#include <mach/hardware.h>
18#include <mach/msm_iomap.h>
19
20 .macro addruart,rx
21 @ see if the MMU is enabled and select appropriate base address
22 mrc p15, 0, \rx, c1, c0
23 tst \rx, #1
24 ldreq \rx, =MSM_UART1_PHYS
25 ldrne \rx, =MSM_UART1_BASE
26 .endm
27
28 .macro senduart,rd,rx
29 str \rd, [\rx, #0x0C]
30 .endm
31
32 .macro waituart,rd,rx
33 @ wait for TX_READY
341: ldr \rd, [\rx, #0x08]
35 tst \rd, #0x04
36 beq 1b
37 .endm
38
39 .macro busyuart,rd,rx
40 .endm
diff --git a/arch/arm/mach-msm/include/mach/dma.h b/arch/arm/mach-msm/include/mach/dma.h
new file mode 100644
index 000000000000..ad1c87f86d10
--- /dev/null
+++ b/arch/arm/mach-msm/include/mach/dma.h
@@ -0,0 +1,151 @@
1/* arch/arm/mach-msm/include/mach/dma.h
2 *
3 * Copyright (C) 2007 Google, Inc.
4 *
5 * This software is licensed under the terms of the GNU General Public
6 * License version 2, as published by the Free Software Foundation, and
7 * may be copied, distributed, and modified under those terms.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 */
15
16#ifndef __ASM_ARCH_MSM_DMA_H
17
18#include <linux/list.h>
19#include <mach/msm_iomap.h>
20
21struct msm_dmov_cmd {
22 struct list_head list;
23 unsigned int cmdptr;
24 void (*complete_func)(struct msm_dmov_cmd *cmd, unsigned int result);
25/* void (*user_result_func)(struct msm_dmov_cmd *cmd); */
26};
27
28void msm_dmov_enqueue_cmd(unsigned id, struct msm_dmov_cmd *cmd);
29void msm_dmov_stop_cmd(unsigned id, struct msm_dmov_cmd *cmd);
30int msm_dmov_exec_cmd(unsigned id, unsigned int cmdptr);
31/* int msm_dmov_exec_cmd_etc(unsigned id, unsigned int cmdptr, int timeout, int interruptible); */
32
33
34
35#define DMOV_SD0(off, ch) (MSM_DMOV_BASE + 0x0000 + (off) + ((ch) << 2))
36#define DMOV_SD1(off, ch) (MSM_DMOV_BASE + 0x0400 + (off) + ((ch) << 2))
37#define DMOV_SD2(off, ch) (MSM_DMOV_BASE + 0x0800 + (off) + ((ch) << 2))
38#define DMOV_SD3(off, ch) (MSM_DMOV_BASE + 0x0C00 + (off) + ((ch) << 2))
39
40/* only security domain 3 is available to the ARM11
41 * SD0 -> mARM trusted, SD1 -> mARM nontrusted, SD2 -> aDSP, SD3 -> aARM
42 */
43
44#define DMOV_CMD_PTR(ch) DMOV_SD3(0x000, ch)
45#define DMOV_CMD_LIST (0 << 29) /* does not work */
46#define DMOV_CMD_PTR_LIST (1 << 29) /* works */
47#define DMOV_CMD_INPUT_CFG (2 << 29) /* untested */
48#define DMOV_CMD_OUTPUT_CFG (3 << 29) /* untested */
49#define DMOV_CMD_ADDR(addr) ((addr) >> 3)
50
51#define DMOV_RSLT(ch) DMOV_SD3(0x040, ch)
52#define DMOV_RSLT_VALID (1 << 31) /* 0 == host has empties result fifo */
53#define DMOV_RSLT_ERROR (1 << 3)
54#define DMOV_RSLT_FLUSH (1 << 2)
55#define DMOV_RSLT_DONE (1 << 1) /* top pointer done */
56#define DMOV_RSLT_USER (1 << 0) /* command with FR force result */
57
58#define DMOV_FLUSH0(ch) DMOV_SD3(0x080, ch)
59#define DMOV_FLUSH1(ch) DMOV_SD3(0x0C0, ch)
60#define DMOV_FLUSH2(ch) DMOV_SD3(0x100, ch)
61#define DMOV_FLUSH3(ch) DMOV_SD3(0x140, ch)
62#define DMOV_FLUSH4(ch) DMOV_SD3(0x180, ch)
63#define DMOV_FLUSH5(ch) DMOV_SD3(0x1C0, ch)
64
65#define DMOV_STATUS(ch) DMOV_SD3(0x200, ch)
66#define DMOV_STATUS_RSLT_COUNT(n) (((n) >> 29))
67#define DMOV_STATUS_CMD_COUNT(n) (((n) >> 27) & 3)
68#define DMOV_STATUS_RSLT_VALID (1 << 1)
69#define DMOV_STATUS_CMD_PTR_RDY (1 << 0)
70
71#define DMOV_ISR DMOV_SD3(0x380, 0)
72
73#define DMOV_CONFIG(ch) DMOV_SD3(0x300, ch)
74#define DMOV_CONFIG_FORCE_TOP_PTR_RSLT (1 << 2)
75#define DMOV_CONFIG_FORCE_FLUSH_RSLT (1 << 1)
76#define DMOV_CONFIG_IRQ_EN (1 << 0)
77
78/* channel assignments */
79
80#define DMOV_NAND_CHAN 7
81#define DMOV_NAND_CRCI_CMD 5
82#define DMOV_NAND_CRCI_DATA 4
83
84#define DMOV_SDC1_CHAN 8
85#define DMOV_SDC1_CRCI 6
86
87#define DMOV_SDC2_CHAN 8
88#define DMOV_SDC2_CRCI 7
89
90#define DMOV_TSIF_CHAN 10
91#define DMOV_TSIF_CRCI 10
92
93#define DMOV_USB_CHAN 11
94
95/* no client rate control ifc (eg, ram) */
96#define DMOV_NONE_CRCI 0
97
98
99/* If the CMD_PTR register has CMD_PTR_LIST selected, the data mover
100 * is going to walk a list of 32bit pointers as described below. Each
101 * pointer points to a *array* of dmov_s, etc structs. The last pointer
102 * in the list is marked with CMD_PTR_LP. The last struct in each array
103 * is marked with CMD_LC (see below).
104 */
105#define CMD_PTR_ADDR(addr) ((addr) >> 3)
106#define CMD_PTR_LP (1 << 31) /* last pointer */
107#define CMD_PTR_PT (3 << 29) /* ? */
108
109/* Single Item Mode */
110typedef struct {
111 unsigned cmd;
112 unsigned src;
113 unsigned dst;
114 unsigned len;
115} dmov_s;
116
117/* Scatter/Gather Mode */
118typedef struct {
119 unsigned cmd;
120 unsigned src_dscr;
121 unsigned dst_dscr;
122 unsigned _reserved;
123} dmov_sg;
124
125/* bits for the cmd field of the above structures */
126
127#define CMD_LC (1 << 31) /* last command */
128#define CMD_FR (1 << 22) /* force result -- does not work? */
129#define CMD_OCU (1 << 21) /* other channel unblock */
130#define CMD_OCB (1 << 20) /* other channel block */
131#define CMD_TCB (1 << 19) /* ? */
132#define CMD_DAH (1 << 18) /* destination address hold -- does not work?*/
133#define CMD_SAH (1 << 17) /* source address hold -- does not work? */
134
135#define CMD_MODE_SINGLE (0 << 0) /* dmov_s structure used */
136#define CMD_MODE_SG (1 << 0) /* untested */
137#define CMD_MODE_IND_SG (2 << 0) /* untested */
138#define CMD_MODE_BOX (3 << 0) /* untested */
139
140#define CMD_DST_SWAP_BYTES (1 << 14) /* exchange each byte n with byte n+1 */
141#define CMD_DST_SWAP_SHORTS (1 << 15) /* exchange each short n with short n+1 */
142#define CMD_DST_SWAP_WORDS (1 << 16) /* exchange each word n with word n+1 */
143
144#define CMD_SRC_SWAP_BYTES (1 << 11) /* exchange each byte n with byte n+1 */
145#define CMD_SRC_SWAP_SHORTS (1 << 12) /* exchange each short n with short n+1 */
146#define CMD_SRC_SWAP_WORDS (1 << 13) /* exchange each word n with word n+1 */
147
148#define CMD_DST_CRCI(n) (((n) & 15) << 7)
149#define CMD_SRC_CRCI(n) (((n) & 15) << 3)
150
151#endif
diff --git a/arch/arm/mach-msm/include/mach/entry-macro.S b/arch/arm/mach-msm/include/mach/entry-macro.S
new file mode 100644
index 000000000000..d2259486bcb1
--- /dev/null
+++ b/arch/arm/mach-msm/include/mach/entry-macro.S
@@ -0,0 +1,38 @@
1/* arch/arm/mach-msm7200/include/mach/entry-macro.S
2 *
3 * Copyright (C) 2007 Google, Inc.
4 * Author: Brian Swetland <swetland@google.com>
5 *
6 * This software is licensed under the terms of the GNU General Public
7 * License version 2, as published by the Free Software Foundation, and
8 * may be copied, distributed, and modified under those terms.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 */
16
17#include <mach/msm_iomap.h>
18
19 .macro disable_fiq
20 .endm
21
22 .macro get_irqnr_preamble, base, tmp
23 @ enable imprecise aborts
24 cpsie a
25 mov \base, #MSM_VIC_BASE
26 .endm
27
28 .macro arch_ret_to_user, tmp1, tmp2
29 .endm
30
31 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
32 @ 0xD0 has irq# or old irq# if the irq has been handled
33 @ 0xD4 has irq# or -1 if none pending *but* if you just
34 @ read 0xD4 you never get the first irq for some reason
35 ldr \irqnr, [\base, #0xD0]
36 ldr \irqnr, [\base, #0xD4]
37 cmp \irqnr, #0xffffffff
38 .endm
diff --git a/arch/arm/mach-msm/include/mach/hardware.h b/arch/arm/mach-msm/include/mach/hardware.h
new file mode 100644
index 000000000000..2d126091ae41
--- /dev/null
+++ b/arch/arm/mach-msm/include/mach/hardware.h
@@ -0,0 +1,18 @@
1/* arch/arm/mach-msm/include/mach/hardware.h
2 *
3 * Copyright (C) 2007 Google, Inc.
4 *
5 * This software is licensed under the terms of the GNU General Public
6 * License version 2, as published by the Free Software Foundation, and
7 * may be copied, distributed, and modified under those terms.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 */
15
16#ifndef __ASM_ARCH_MSM_HARDWARE_H
17
18#endif
diff --git a/arch/arm/mach-msm/include/mach/io.h b/arch/arm/mach-msm/include/mach/io.h
new file mode 100644
index 000000000000..c6a2feb268b0
--- /dev/null
+++ b/arch/arm/mach-msm/include/mach/io.h
@@ -0,0 +1,33 @@
1/* arch/arm/mach-msm/include/mach/io.h
2 *
3 * Copyright (C) 2007 Google, Inc.
4 *
5 * This software is licensed under the terms of the GNU General Public
6 * License version 2, as published by the Free Software Foundation, and
7 * may be copied, distributed, and modified under those terms.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 */
15
16#ifndef __ASM_ARM_ARCH_IO_H
17#define __ASM_ARM_ARCH_IO_H
18
19#define IO_SPACE_LIMIT 0xffffffff
20
21#define __arch_ioremap __msm_ioremap
22#define __arch_iounmap __iounmap
23
24void __iomem *__msm_ioremap(unsigned long phys_addr, size_t size, unsigned int mtype);
25
26static inline void __iomem *__io(unsigned long addr)
27{
28 return (void __iomem *)addr;
29}
30#define __io(a) __io(a)
31#define __mem_pci(a) (a)
32
33#endif
diff --git a/arch/arm/mach-msm/include/mach/irqs.h b/arch/arm/mach-msm/include/mach/irqs.h
new file mode 100644
index 000000000000..9dd4cf8a2693
--- /dev/null
+++ b/arch/arm/mach-msm/include/mach/irqs.h
@@ -0,0 +1,90 @@
1/* arch/arm/mach-msm/include/mach/irqs.h
2 *
3 * Copyright (C) 2007 Google, Inc.
4 * Author: Brian Swetland <swetland@google.com>
5 *
6 * This software is licensed under the terms of the GNU General Public
7 * License version 2, as published by the Free Software Foundation, and
8 * may be copied, distributed, and modified under those terms.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 */
16
17#ifndef __ASM_ARCH_MSM_IRQS_H
18#define __ASM_ARCH_MSM_IRQS_H
19
20/* MSM ARM11 Interrupt Numbers */
21/* See 80-VE113-1 A, pp219-221 */
22
23#define INT_A9_M2A_0 0
24#define INT_A9_M2A_1 1
25#define INT_A9_M2A_2 2
26#define INT_A9_M2A_3 3
27#define INT_A9_M2A_4 4
28#define INT_A9_M2A_5 5
29#define INT_A9_M2A_6 6
30#define INT_GP_TIMER_EXP 7
31#define INT_DEBUG_TIMER_EXP 8
32#define INT_UART1 9
33#define INT_UART2 10
34#define INT_UART3 11
35#define INT_UART1_RX 12
36#define INT_UART2_RX 13
37#define INT_UART3_RX 14
38#define INT_USB_OTG 15
39#define INT_MDDI_PRI 16
40#define INT_MDDI_EXT 17
41#define INT_MDDI_CLIENT 18
42#define INT_MDP 19
43#define INT_GRAPHICS 20
44#define INT_ADM_AARM 21
45#define INT_ADSP_A11 22
46#define INT_ADSP_A9_A11 23
47#define INT_SDC1_0 24
48#define INT_SDC1_1 25
49#define INT_SDC2_0 26
50#define INT_SDC2_1 27
51#define INT_KEYSENSE 28
52#define INT_TCHSCRN_SSBI 29
53#define INT_TCHSCRN1 30
54#define INT_TCHSCRN2 31
55
56#define INT_GPIO_GROUP1 (32 + 0)
57#define INT_GPIO_GROUP2 (32 + 1)
58#define INT_PWB_I2C (32 + 2)
59#define INT_SOFTRESET (32 + 3)
60#define INT_NAND_WR_ER_DONE (32 + 4)
61#define INT_NAND_OP_DONE (32 + 5)
62#define INT_PBUS_ARM11 (32 + 6)
63#define INT_AXI_MPU_SMI (32 + 7)
64#define INT_AXI_MPU_EBI1 (32 + 8)
65#define INT_AD_HSSD (32 + 9)
66#define INT_ARM11_PMU (32 + 10)
67#define INT_ARM11_DMA (32 + 11)
68#define INT_TSIF_IRQ (32 + 12)
69#define INT_UART1DM_IRQ (32 + 13)
70#define INT_UART1DM_RX (32 + 14)
71#define INT_USB_HS (32 + 15)
72#define INT_SDC3_0 (32 + 16)
73#define INT_SDC3_1 (32 + 17)
74#define INT_SDC4_0 (32 + 18)
75#define INT_SDC4_1 (32 + 19)
76#define INT_UART2DM_RX (32 + 20)
77#define INT_UART2DM_IRQ (32 + 21)
78
79/* 22-31 are reserved */
80
81#define MSM_IRQ_BIT(irq) (1 << ((irq) & 31))
82
83#define NR_MSM_IRQS 64
84#define NR_GPIO_IRQS 122
85#define NR_BOARD_IRQS 64
86#define NR_IRQS (NR_MSM_IRQS + NR_GPIO_IRQS + NR_BOARD_IRQS)
87
88#define MSM_GPIO_TO_INT(n) (NR_MSM_IRQS + (n))
89
90#endif
diff --git a/arch/arm/mach-msm/include/mach/memory.h b/arch/arm/mach-msm/include/mach/memory.h
new file mode 100644
index 000000000000..63fd47f2e62e
--- /dev/null
+++ b/arch/arm/mach-msm/include/mach/memory.h
@@ -0,0 +1,27 @@
1/* arch/arm/mach-msm/include/mach/memory.h
2 *
3 * Copyright (C) 2007 Google, Inc.
4 *
5 * This software is licensed under the terms of the GNU General Public
6 * License version 2, as published by the Free Software Foundation, and
7 * may be copied, distributed, and modified under those terms.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 */
15
16#ifndef __ASM_ARCH_MEMORY_H
17#define __ASM_ARCH_MEMORY_H
18
19/* physical offset of RAM */
20#define PHYS_OFFSET UL(0x10000000)
21
22/* bus address and physical addresses are identical */
23#define __virt_to_bus(x) __virt_to_phys(x)
24#define __bus_to_virt(x) __phys_to_virt(x)
25
26#endif
27
diff --git a/arch/arm/mach-msm/include/mach/msm_iomap.h b/arch/arm/mach-msm/include/mach/msm_iomap.h
new file mode 100644
index 000000000000..e221f58ceea3
--- /dev/null
+++ b/arch/arm/mach-msm/include/mach/msm_iomap.h
@@ -0,0 +1,104 @@
1/* arch/arm/mach-msm/include/mach/msm_iomap.h
2 *
3 * Copyright (C) 2007 Google, Inc.
4 * Author: Brian Swetland <swetland@google.com>
5 *
6 * This software is licensed under the terms of the GNU General Public
7 * License version 2, as published by the Free Software Foundation, and
8 * may be copied, distributed, and modified under those terms.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 *
16 * The MSM peripherals are spread all over across 768MB of physical
17 * space, which makes just having a simple IO_ADDRESS macro to slide
18 * them into the right virtual location rough. Instead, we will
19 * provide a master phys->virt mapping for peripherals here.
20 *
21 */
22
23#ifndef __ASM_ARCH_MSM_IOMAP_H
24#define __ASM_ARCH_MSM_IOMAP_H
25
26#include <asm/sizes.h>
27
28/* Physical base address and size of peripherals.
29 * Ordered by the virtual base addresses they will be mapped at.
30 *
31 * MSM_VIC_BASE must be an value that can be loaded via a "mov"
32 * instruction, otherwise entry-macro.S will not compile.
33 *
34 * If you add or remove entries here, you'll want to edit the
35 * msm_io_desc array in arch/arm/mach-msm/io.c to reflect your
36 * changes.
37 *
38 */
39
40#define MSM_VIC_BASE 0xE0000000
41#define MSM_VIC_PHYS 0xC0000000
42#define MSM_VIC_SIZE SZ_4K
43
44#define MSM_CSR_BASE 0xE0001000
45#define MSM_CSR_PHYS 0xC0100000
46#define MSM_CSR_SIZE SZ_4K
47
48#define MSM_GPT_PHYS MSM_CSR_PHYS
49#define MSM_GPT_BASE MSM_CSR_BASE
50#define MSM_GPT_SIZE SZ_4K
51
52#define MSM_DMOV_BASE 0xE0002000
53#define MSM_DMOV_PHYS 0xA9700000
54#define MSM_DMOV_SIZE SZ_4K
55
56#define MSM_UART1_BASE 0xE0003000
57#define MSM_UART1_PHYS 0xA9A00000
58#define MSM_UART1_SIZE SZ_4K
59
60#define MSM_UART2_BASE 0xE0004000
61#define MSM_UART2_PHYS 0xA9B00000
62#define MSM_UART2_SIZE SZ_4K
63
64#define MSM_UART3_BASE 0xE0005000
65#define MSM_UART3_PHYS 0xA9C00000
66#define MSM_UART3_SIZE SZ_4K
67
68#define MSM_I2C_BASE 0xE0006000
69#define MSM_I2C_PHYS 0xA9900000
70#define MSM_I2C_SIZE SZ_4K
71
72#define MSM_GPIO1_BASE 0xE0007000
73#define MSM_GPIO1_PHYS 0xA9200000
74#define MSM_GPIO1_SIZE SZ_4K
75
76#define MSM_GPIO2_BASE 0xE0008000
77#define MSM_GPIO2_PHYS 0xA9300000
78#define MSM_GPIO2_SIZE SZ_4K
79
80#define MSM_HSUSB_BASE 0xE0009000
81#define MSM_HSUSB_PHYS 0xA0800000
82#define MSM_HSUSB_SIZE SZ_4K
83
84#define MSM_CLK_CTL_BASE 0xE000A000
85#define MSM_CLK_CTL_PHYS 0xA8600000
86#define MSM_CLK_CTL_SIZE SZ_4K
87
88#define MSM_PMDH_BASE 0xE000B000
89#define MSM_PMDH_PHYS 0xAA600000
90#define MSM_PMDH_SIZE SZ_4K
91
92#define MSM_EMDH_BASE 0xE000C000
93#define MSM_EMDH_PHYS 0xAA700000
94#define MSM_EMDH_SIZE SZ_4K
95
96#define MSM_MDP_BASE 0xE0010000
97#define MSM_MDP_PHYS 0xAA200000
98#define MSM_MDP_SIZE 0x000F0000
99
100#define MSM_SHARED_RAM_BASE 0xE0100000
101#define MSM_SHARED_RAM_PHYS 0x01F00000
102#define MSM_SHARED_RAM_SIZE SZ_1M
103
104#endif
diff --git a/arch/arm/mach-msm/include/mach/system.h b/arch/arm/mach-msm/include/mach/system.h
new file mode 100644
index 000000000000..f05ad2e0f235
--- /dev/null
+++ b/arch/arm/mach-msm/include/mach/system.h
@@ -0,0 +1,23 @@
1/* arch/arm/mach-msm/include/mach/system.h
2 *
3 * Copyright (C) 2007 Google, Inc.
4 *
5 * This software is licensed under the terms of the GNU General Public
6 * License version 2, as published by the Free Software Foundation, and
7 * may be copied, distributed, and modified under those terms.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 */
15
16#include <mach/hardware.h>
17
18void arch_idle(void);
19
20static inline void arch_reset(char mode)
21{
22 for (;;) ; /* depends on IPC w/ other core */
23}
diff --git a/arch/arm/mach-msm/include/mach/timex.h b/arch/arm/mach-msm/include/mach/timex.h
new file mode 100644
index 000000000000..a62e6b215aec
--- /dev/null
+++ b/arch/arm/mach-msm/include/mach/timex.h
@@ -0,0 +1,21 @@
1/* arch/arm/mach-msm/include/mach/timex.h
2 *
3 * Copyright (C) 2007 Google, Inc.
4 *
5 * This software is licensed under the terms of the GNU General Public
6 * License version 2, as published by the Free Software Foundation, and
7 * may be copied, distributed, and modified under those terms.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 */
15
16#ifndef __ASM_ARCH_MSM_TIMEX_H
17#define __ASM_ARCH_MSM_TIMEX_H
18
19#define CLOCK_TICK_RATE 1000000
20
21#endif
diff --git a/arch/arm/mach-msm/include/mach/uncompress.h b/arch/arm/mach-msm/include/mach/uncompress.h
new file mode 100644
index 000000000000..026e8955ace9
--- /dev/null
+++ b/arch/arm/mach-msm/include/mach/uncompress.h
@@ -0,0 +1,36 @@
1/* arch/arm/mach-msm/include/mach/uncompress.h
2 *
3 * Copyright (C) 2007 Google, Inc.
4 *
5 * This software is licensed under the terms of the GNU General Public
6 * License version 2, as published by the Free Software Foundation, and
7 * may be copied, distributed, and modified under those terms.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 */
15
16#ifndef __ASM_ARCH_MSM_UNCOMPRESS_H
17
18#include "hardware.h"
19
20static void putc(int c)
21{
22}
23
24static inline void flush(void)
25{
26}
27
28static inline void arch_decomp_setup(void)
29{
30}
31
32static inline void arch_decomp_wdog(void)
33{
34}
35
36#endif
diff --git a/arch/arm/mach-msm/include/mach/vmalloc.h b/arch/arm/mach-msm/include/mach/vmalloc.h
new file mode 100644
index 000000000000..05f81fd8623c
--- /dev/null
+++ b/arch/arm/mach-msm/include/mach/vmalloc.h
@@ -0,0 +1,22 @@
1/* arch/arm/mach-msm/include/mach/vmalloc.h
2 *
3 * Copyright (C) 2007 Google, Inc.
4 *
5 * This software is licensed under the terms of the GNU General Public
6 * License version 2, as published by the Free Software Foundation, and
7 * may be copied, distributed, and modified under those terms.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 */
15
16#ifndef __ASM_ARCH_MSM_VMALLOC_H
17#define __ASM_ARCH_MSM_VMALLOC_H
18
19#define VMALLOC_END (PAGE_OFFSET + 0x10000000)
20
21#endif
22
diff --git a/arch/arm/mach-msm/io.c b/arch/arm/mach-msm/io.c
index c39edb994a88..5976200de99b 100644
--- a/arch/arm/mach-msm/io.c
+++ b/arch/arm/mach-msm/io.c
@@ -19,13 +19,13 @@
19#include <linux/kernel.h> 19#include <linux/kernel.h>
20#include <linux/init.h> 20#include <linux/init.h>
21 21
22#include <asm/hardware.h> 22#include <mach/hardware.h>
23#include <asm/io.h> 23#include <asm/io.h>
24#include <asm/page.h> 24#include <asm/page.h>
25#include <asm/arch/msm_iomap.h> 25#include <mach/msm_iomap.h>
26#include <asm/mach/map.h> 26#include <asm/mach/map.h>
27 27
28#include <asm/arch/board.h> 28#include <mach/board.h>
29 29
30#define MSM_DEVICE(name) { \ 30#define MSM_DEVICE(name) { \
31 .virtual = MSM_##name##_BASE, \ 31 .virtual = MSM_##name##_BASE, \
diff --git a/arch/arm/mach-msm/irq.c b/arch/arm/mach-msm/irq.c
index 24158040b789..66901baf8c8e 100644
--- a/arch/arm/mach-msm/irq.c
+++ b/arch/arm/mach-msm/irq.c
@@ -21,11 +21,11 @@
21#include <linux/timer.h> 21#include <linux/timer.h>
22 22
23#include <linux/irq.h> 23#include <linux/irq.h>
24#include <asm/hardware.h> 24#include <mach/hardware.h>
25 25
26#include <asm/io.h> 26#include <asm/io.h>
27 27
28#include <asm/arch/msm_iomap.h> 28#include <mach/msm_iomap.h>
29 29
30#define VIC_REG(off) (MSM_VIC_BASE + (off)) 30#define VIC_REG(off) (MSM_VIC_BASE + (off))
31 31
diff --git a/arch/arm/mach-msm/timer.c b/arch/arm/mach-msm/timer.c
index bd4732d1ab3e..9f02d7dca985 100644
--- a/arch/arm/mach-msm/timer.c
+++ b/arch/arm/mach-msm/timer.c
@@ -22,7 +22,7 @@
22#include <linux/delay.h> 22#include <linux/delay.h>
23 23
24#include <asm/mach/time.h> 24#include <asm/mach/time.h>
25#include <asm/arch/msm_iomap.h> 25#include <mach/msm_iomap.h>
26 26
27#include <asm/io.h> 27#include <asm/io.h>
28 28
diff --git a/arch/arm/mach-mv78xx0/common.c b/arch/arm/mach-mv78xx0/common.c
index d27b83b7bf62..e633f9cb239f 100644
--- a/arch/arm/mach-mv78xx0/common.c
+++ b/arch/arm/mach-mv78xx0/common.c
@@ -17,7 +17,7 @@
17#include <linux/ata_platform.h> 17#include <linux/ata_platform.h>
18#include <asm/mach/map.h> 18#include <asm/mach/map.h>
19#include <asm/mach/time.h> 19#include <asm/mach/time.h>
20#include <asm/arch/mv78xx0.h> 20#include <mach/mv78xx0.h>
21#include <asm/plat-orion/cache-feroceon-l2.h> 21#include <asm/plat-orion/cache-feroceon-l2.h>
22#include <asm/plat-orion/ehci-orion.h> 22#include <asm/plat-orion/ehci-orion.h>
23#include <asm/plat-orion/orion_nand.h> 23#include <asm/plat-orion/orion_nand.h>
diff --git a/arch/arm/mach-mv78xx0/db78x00-bp-setup.c b/arch/arm/mach-mv78xx0/db78x00-bp-setup.c
index 0c93d19193df..a2d0c9783604 100644
--- a/arch/arm/mach-mv78xx0/db78x00-bp-setup.c
+++ b/arch/arm/mach-mv78xx0/db78x00-bp-setup.c
@@ -13,7 +13,7 @@
13#include <linux/platform_device.h> 13#include <linux/platform_device.h>
14#include <linux/ata_platform.h> 14#include <linux/ata_platform.h>
15#include <linux/mv643xx_eth.h> 15#include <linux/mv643xx_eth.h>
16#include <asm/arch/mv78xx0.h> 16#include <mach/mv78xx0.h>
17#include <asm/mach-types.h> 17#include <asm/mach-types.h>
18#include <asm/mach/arch.h> 18#include <asm/mach/arch.h>
19#include "common.h" 19#include "common.h"
diff --git a/arch/arm/mach-mv78xx0/include/mach/debug-macro.S b/arch/arm/mach-mv78xx0/include/mach/debug-macro.S
new file mode 100644
index 000000000000..a06442fbd341
--- /dev/null
+++ b/arch/arm/mach-mv78xx0/include/mach/debug-macro.S
@@ -0,0 +1,20 @@
1/*
2 * arch/arm/mach-mv78xx0/include/mach/debug-macro.S
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7*/
8
9#include <mach/mv78xx0.h>
10
11 .macro addruart,rx
12 mrc p15, 0, \rx, c1, c0
13 tst \rx, #1 @ MMU enabled?
14 ldreq \rx, =MV78XX0_REGS_PHYS_BASE
15 ldrne \rx, =MV78XX0_REGS_VIRT_BASE
16 orr \rx, \rx, #0x00012000
17 .endm
18
19#define UART_SHIFT 2
20#include <asm/hardware/debug-8250.S>
diff --git a/include/asm-arm/arch-mv78xx0/dma.h b/arch/arm/mach-mv78xx0/include/mach/dma.h
index 40a8c178f10d..40a8c178f10d 100644
--- a/include/asm-arm/arch-mv78xx0/dma.h
+++ b/arch/arm/mach-mv78xx0/include/mach/dma.h
diff --git a/arch/arm/mach-mv78xx0/include/mach/entry-macro.S b/arch/arm/mach-mv78xx0/include/mach/entry-macro.S
new file mode 100644
index 000000000000..ed4a46bcd3b0
--- /dev/null
+++ b/arch/arm/mach-mv78xx0/include/mach/entry-macro.S
@@ -0,0 +1,39 @@
1/*
2 * arch/arm/mach-mv78xx0/include/mach/entry-macro.S
3 *
4 * Low-level IRQ helper macros for Marvell MV78xx0 platforms
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10
11#include <mach/mv78xx0.h>
12
13 .macro disable_fiq
14 .endm
15
16 .macro arch_ret_to_user, tmp1, tmp2
17 .endm
18
19 .macro get_irqnr_preamble, base, tmp
20 ldr \base, =IRQ_VIRT_BASE
21 .endm
22
23 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
24 @ check low interrupts
25 ldr \irqstat, [\base, #IRQ_CAUSE_LOW_OFF]
26 ldr \tmp, [\base, #IRQ_MASK_LOW_OFF]
27 mov \irqnr, #31
28 ands \irqstat, \irqstat, \tmp
29
30 @ if no low interrupts set, check high interrupts
31 ldreq \irqstat, [\base, #IRQ_CAUSE_HIGH_OFF]
32 ldreq \tmp, [\base, #IRQ_MASK_HIGH_OFF]
33 moveq \irqnr, #63
34 andeqs \irqstat, \irqstat, \tmp
35
36 @ find first active interrupt source
37 clzne \irqstat, \irqstat
38 subne \irqnr, \irqnr, \irqstat
39 .endm
diff --git a/arch/arm/mach-mv78xx0/include/mach/hardware.h b/arch/arm/mach-mv78xx0/include/mach/hardware.h
new file mode 100644
index 000000000000..5d887557e123
--- /dev/null
+++ b/arch/arm/mach-mv78xx0/include/mach/hardware.h
@@ -0,0 +1,21 @@
1/*
2 * arch/arm/mach-mv78xx0/include/mach/hardware.h
3 *
4 * This file is licensed under the terms of the GNU General Public
5 * License version 2. This program is licensed "as is" without any
6 * warranty of any kind, whether express or implied.
7 */
8
9#ifndef __ASM_ARCH_HARDWARE_H
10#define __ASM_ARCH_HARDWARE_H
11
12#include "mv78xx0.h"
13
14#define pcibios_assign_all_busses() 1
15
16#define PCIBIOS_MIN_IO 0x00001000
17#define PCIBIOS_MIN_MEM 0x01000000
18#define PCIMEM_BASE MV78XX0_PCIE_MEM_PHYS_BASE /* mem base for VGA */
19
20
21#endif
diff --git a/arch/arm/mach-mv78xx0/include/mach/io.h b/arch/arm/mach-mv78xx0/include/mach/io.h
new file mode 100644
index 000000000000..450e0e1ad092
--- /dev/null
+++ b/arch/arm/mach-mv78xx0/include/mach/io.h
@@ -0,0 +1,26 @@
1/*
2 * arch/arm/mach-mv78xx0/include/mach/io.h
3 *
4 * This file is licensed under the terms of the GNU General Public
5 * License version 2. This program is licensed "as is" without any
6 * warranty of any kind, whether express or implied.
7 */
8
9#ifndef __ASM_ARCH_IO_H
10#define __ASM_ARCH_IO_H
11
12#include "mv78xx0.h"
13
14#define IO_SPACE_LIMIT 0xffffffff
15
16static inline void __iomem *__io(unsigned long addr)
17{
18 return (void __iomem *)((addr - MV78XX0_PCIE_IO_PHYS_BASE(0))
19 + MV78XX0_PCIE_IO_VIRT_BASE(0));
20}
21
22#define __io(a) __io(a)
23#define __mem_pci(a) (a)
24
25
26#endif
diff --git a/arch/arm/mach-mv78xx0/include/mach/irqs.h b/arch/arm/mach-mv78xx0/include/mach/irqs.h
new file mode 100644
index 000000000000..995d7fb8d06f
--- /dev/null
+++ b/arch/arm/mach-mv78xx0/include/mach/irqs.h
@@ -0,0 +1,91 @@
1/*
2 * arch/arm/mach-mv78xx0/include/mach/irqs.h
3 *
4 * IRQ definitions for Marvell MV78xx0 SoCs
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10
11#ifndef __ASM_ARCH_IRQS_H
12#define __ASM_ARCH_IRQS_H
13
14#include "mv78xx0.h" /* need GPIO_MAX */
15
16/*
17 * MV78xx0 Low Interrupt Controller
18 */
19#define IRQ_MV78XX0_ERR 0
20#define IRQ_MV78XX0_SPI 1
21#define IRQ_MV78XX0_I2C_0 2
22#define IRQ_MV78XX0_I2C_1 3
23#define IRQ_MV78XX0_IDMA_0 4
24#define IRQ_MV78XX0_IDMA_1 5
25#define IRQ_MV78XX0_IDMA_2 6
26#define IRQ_MV78XX0_IDMA_3 7
27#define IRQ_MV78XX0_TIMER_0 8
28#define IRQ_MV78XX0_TIMER_1 9
29#define IRQ_MV78XX0_TIMER_2 10
30#define IRQ_MV78XX0_TIMER_3 11
31#define IRQ_MV78XX0_UART_0 12
32#define IRQ_MV78XX0_UART_1 13
33#define IRQ_MV78XX0_UART_2 14
34#define IRQ_MV78XX0_UART_3 15
35#define IRQ_MV78XX0_USB_0 16
36#define IRQ_MV78XX0_USB_1 17
37#define IRQ_MV78XX0_USB_2 18
38#define IRQ_MV78XX0_CRYPTO 19
39#define IRQ_MV78XX0_SDIO_0 20
40#define IRQ_MV78XX0_SDIO_1 21
41#define IRQ_MV78XX0_XOR_0 22
42#define IRQ_MV78XX0_XOR_1 23
43#define IRQ_MV78XX0_I2S_0 24
44#define IRQ_MV78XX0_I2S_1 25
45#define IRQ_MV78XX0_SATA 26
46#define IRQ_MV78XX0_TDMI 27
47
48/*
49 * MV78xx0 High Interrupt Controller
50 */
51#define IRQ_MV78XX0_PCIE_00 32
52#define IRQ_MV78XX0_PCIE_01 33
53#define IRQ_MV78XX0_PCIE_02 34
54#define IRQ_MV78XX0_PCIE_03 35
55#define IRQ_MV78XX0_PCIE_10 36
56#define IRQ_MV78XX0_PCIE_11 37
57#define IRQ_MV78XX0_PCIE_12 38
58#define IRQ_MV78XX0_PCIE_13 39
59#define IRQ_MV78XX0_GE00_SUM 40
60#define IRQ_MV78XX0_GE00_RX 41
61#define IRQ_MV78XX0_GE00_TX 42
62#define IRQ_MV78XX0_GE00_MISC 43
63#define IRQ_MV78XX0_GE01_SUM 44
64#define IRQ_MV78XX0_GE01_RX 45
65#define IRQ_MV78XX0_GE01_TX 46
66#define IRQ_MV78XX0_GE01_MISC 47
67#define IRQ_MV78XX0_GE10_SUM 48
68#define IRQ_MV78XX0_GE10_RX 49
69#define IRQ_MV78XX0_GE10_TX 50
70#define IRQ_MV78XX0_GE10_MISC 51
71#define IRQ_MV78XX0_GE11_SUM 52
72#define IRQ_MV78XX0_GE11_RX 53
73#define IRQ_MV78XX0_GE11_TX 54
74#define IRQ_MV78XX0_GE11_MISC 55
75#define IRQ_MV78XX0_GPIO_0_7 56
76#define IRQ_MV78XX0_GPIO_8_15 57
77#define IRQ_MV78XX0_GPIO_16_23 58
78#define IRQ_MV78XX0_GPIO_24_31 59
79#define IRQ_MV78XX0_DB_IN 60
80#define IRQ_MV78XX0_DB_OUT 61
81
82/*
83 * MV78XX0 General Purpose Pins
84 */
85#define IRQ_MV78XX0_GPIO_START 64
86#define NR_GPIO_IRQS GPIO_MAX
87
88#define NR_IRQS (IRQ_MV78XX0_GPIO_START + NR_GPIO_IRQS)
89
90
91#endif
diff --git a/arch/arm/mach-mv78xx0/include/mach/memory.h b/arch/arm/mach-mv78xx0/include/mach/memory.h
new file mode 100644
index 000000000000..9e47a140ff7a
--- /dev/null
+++ b/arch/arm/mach-mv78xx0/include/mach/memory.h
@@ -0,0 +1,14 @@
1/*
2 * arch/arm/mach-mv78xx0/include/mach/memory.h
3 */
4
5#ifndef __ASM_ARCH_MEMORY_H
6#define __ASM_ARCH_MEMORY_H
7
8#define PHYS_OFFSET UL(0x00000000)
9
10#define __virt_to_bus(x) __virt_to_phys(x)
11#define __bus_to_virt(x) __phys_to_virt(x)
12
13
14#endif
diff --git a/arch/arm/mach-mv78xx0/include/mach/mv78xx0.h b/arch/arm/mach-mv78xx0/include/mach/mv78xx0.h
new file mode 100644
index 000000000000..ad664178d6e1
--- /dev/null
+++ b/arch/arm/mach-mv78xx0/include/mach/mv78xx0.h
@@ -0,0 +1,126 @@
1/*
2 * arch/arm/mach-mv78xx0/include/mach/mv78xx0.h
3 *
4 * Generic definitions for Marvell MV78xx0 SoC flavors:
5 * MV781x0 and MV782x0.
6 *
7 * This file is licensed under the terms of the GNU General Public
8 * License version 2. This program is licensed "as is" without any
9 * warranty of any kind, whether express or implied.
10 */
11
12#ifndef __ASM_ARCH_MV78XX0_H
13#define __ASM_ARCH_MV78XX0_H
14
15/*
16 * Marvell MV78xx0 address maps.
17 *
18 * phys
19 * c0000000 PCIe Memory space
20 * f0800000 PCIe #0 I/O space
21 * f0900000 PCIe #1 I/O space
22 * f0a00000 PCIe #2 I/O space
23 * f0b00000 PCIe #3 I/O space
24 * f0c00000 PCIe #4 I/O space
25 * f0d00000 PCIe #5 I/O space
26 * f0e00000 PCIe #6 I/O space
27 * f0f00000 PCIe #7 I/O space
28 * f1000000 on-chip peripheral registers
29 *
30 * virt phys size
31 * fe400000 f102x000 16K core-specific peripheral registers
32 * fe700000 f0800000 1M PCIe #0 I/O space
33 * fe800000 f0900000 1M PCIe #1 I/O space
34 * fe900000 f0a00000 1M PCIe #2 I/O space
35 * fea00000 f0b00000 1M PCIe #3 I/O space
36 * feb00000 f0c00000 1M PCIe #4 I/O space
37 * fec00000 f0d00000 1M PCIe #5 I/O space
38 * fed00000 f0e00000 1M PCIe #6 I/O space
39 * fee00000 f0f00000 1M PCIe #7 I/O space
40 * fef00000 f1000000 1M on-chip peripheral registers
41 */
42#define MV78XX0_CORE0_REGS_PHYS_BASE 0xf1020000
43#define MV78XX0_CORE1_REGS_PHYS_BASE 0xf1024000
44#define MV78XX0_CORE_REGS_VIRT_BASE 0xfe400000
45#define MV78XX0_CORE_REGS_SIZE SZ_16K
46
47#define MV78XX0_PCIE_IO_PHYS_BASE(i) (0xf0800000 + ((i) << 20))
48#define MV78XX0_PCIE_IO_VIRT_BASE(i) (0xfe700000 + ((i) << 20))
49#define MV78XX0_PCIE_IO_SIZE SZ_1M
50
51#define MV78XX0_REGS_PHYS_BASE 0xf1000000
52#define MV78XX0_REGS_VIRT_BASE 0xfef00000
53#define MV78XX0_REGS_SIZE SZ_1M
54
55#define MV78XX0_PCIE_MEM_PHYS_BASE 0xc0000000
56#define MV78XX0_PCIE_MEM_SIZE 0x30000000
57
58/*
59 * Core-specific peripheral registers.
60 */
61#define BRIDGE_VIRT_BASE (MV78XX0_CORE_REGS_VIRT_BASE)
62#define CPU_CONTROL (BRIDGE_VIRT_BASE | 0x0104)
63#define L2_WRITETHROUGH 0x00020000
64#define RSTOUTn_MASK (BRIDGE_VIRT_BASE | 0x0108)
65#define SOFT_RESET_OUT_EN 0x00000004
66#define SYSTEM_SOFT_RESET (BRIDGE_VIRT_BASE | 0x010c)
67#define SOFT_RESET 0x00000001
68#define BRIDGE_CAUSE (BRIDGE_VIRT_BASE | 0x0110)
69#define BRIDGE_MASK (BRIDGE_VIRT_BASE | 0x0114)
70#define BRIDGE_INT_TIMER0 0x0002
71#define BRIDGE_INT_TIMER1 0x0004
72#define BRIDGE_INT_TIMER1_CLR (~0x0004)
73#define IRQ_VIRT_BASE (BRIDGE_VIRT_BASE | 0x0200)
74#define IRQ_CAUSE_LOW_OFF 0x0004
75#define IRQ_CAUSE_HIGH_OFF 0x0008
76#define IRQ_MASK_LOW_OFF 0x0010
77#define IRQ_MASK_HIGH_OFF 0x0014
78#define TIMER_VIRT_BASE (BRIDGE_VIRT_BASE | 0x0300)
79
80/*
81 * Register Map
82 */
83#define DDR_VIRT_BASE (MV78XX0_REGS_VIRT_BASE | 0x00000)
84#define DDR_WINDOW_CPU0_BASE (DDR_VIRT_BASE | 0x1500)
85#define DDR_WINDOW_CPU1_BASE (DDR_VIRT_BASE | 0x1700)
86
87#define DEV_BUS_PHYS_BASE (MV78XX0_REGS_PHYS_BASE | 0x10000)
88#define DEV_BUS_VIRT_BASE (MV78XX0_REGS_VIRT_BASE | 0x10000)
89#define SAMPLE_AT_RESET_LOW (DEV_BUS_VIRT_BASE | 0x0030)
90#define SAMPLE_AT_RESET_HIGH (DEV_BUS_VIRT_BASE | 0x0034)
91#define UART0_PHYS_BASE (DEV_BUS_PHYS_BASE | 0x2000)
92#define UART0_VIRT_BASE (DEV_BUS_VIRT_BASE | 0x2000)
93#define UART1_PHYS_BASE (DEV_BUS_PHYS_BASE | 0x2100)
94#define UART1_VIRT_BASE (DEV_BUS_VIRT_BASE | 0x2100)
95#define UART2_PHYS_BASE (DEV_BUS_PHYS_BASE | 0x2200)
96#define UART2_VIRT_BASE (DEV_BUS_VIRT_BASE | 0x2200)
97#define UART3_PHYS_BASE (DEV_BUS_PHYS_BASE | 0x2300)
98#define UART3_VIRT_BASE (DEV_BUS_VIRT_BASE | 0x2300)
99
100#define GE10_PHYS_BASE (MV78XX0_REGS_PHYS_BASE | 0x30000)
101#define GE11_PHYS_BASE (MV78XX0_REGS_PHYS_BASE | 0x34000)
102
103#define PCIE00_VIRT_BASE (MV78XX0_REGS_VIRT_BASE | 0x40000)
104#define PCIE01_VIRT_BASE (MV78XX0_REGS_VIRT_BASE | 0x44000)
105#define PCIE02_VIRT_BASE (MV78XX0_REGS_VIRT_BASE | 0x48000)
106#define PCIE03_VIRT_BASE (MV78XX0_REGS_VIRT_BASE | 0x4c000)
107
108#define USB0_PHYS_BASE (MV78XX0_REGS_PHYS_BASE | 0x50000)
109#define USB1_PHYS_BASE (MV78XX0_REGS_PHYS_BASE | 0x51000)
110#define USB2_PHYS_BASE (MV78XX0_REGS_PHYS_BASE | 0x52000)
111
112#define GE00_PHYS_BASE (MV78XX0_REGS_PHYS_BASE | 0x70000)
113#define GE01_PHYS_BASE (MV78XX0_REGS_PHYS_BASE | 0x74000)
114
115#define PCIE10_VIRT_BASE (MV78XX0_REGS_VIRT_BASE | 0x80000)
116#define PCIE11_VIRT_BASE (MV78XX0_REGS_VIRT_BASE | 0x84000)
117#define PCIE12_VIRT_BASE (MV78XX0_REGS_VIRT_BASE | 0x88000)
118#define PCIE13_VIRT_BASE (MV78XX0_REGS_VIRT_BASE | 0x8c000)
119
120#define SATA_PHYS_BASE (MV78XX0_REGS_PHYS_BASE | 0xa0000)
121
122
123#define GPIO_MAX 32
124
125
126#endif
diff --git a/arch/arm/mach-mv78xx0/include/mach/system.h b/arch/arm/mach-mv78xx0/include/mach/system.h
new file mode 100644
index 000000000000..7d5179408832
--- /dev/null
+++ b/arch/arm/mach-mv78xx0/include/mach/system.h
@@ -0,0 +1,37 @@
1/*
2 * arch/arm/mach-mv78xx0/include/mach/system.h
3 *
4 * This file is licensed under the terms of the GNU General Public
5 * License version 2. This program is licensed "as is" without any
6 * warranty of any kind, whether express or implied.
7 */
8
9#ifndef __ASM_ARCH_SYSTEM_H
10#define __ASM_ARCH_SYSTEM_H
11
12#include <mach/hardware.h>
13#include <mach/mv78xx0.h>
14
15static inline void arch_idle(void)
16{
17 cpu_do_idle();
18}
19
20static inline void arch_reset(char mode)
21{
22 /*
23 * Enable soft reset to assert RSTOUTn.
24 */
25 writel(SOFT_RESET_OUT_EN, RSTOUTn_MASK);
26
27 /*
28 * Assert soft reset.
29 */
30 writel(SOFT_RESET, SYSTEM_SOFT_RESET);
31
32 while (1)
33 ;
34}
35
36
37#endif
diff --git a/arch/arm/mach-mv78xx0/include/mach/timex.h b/arch/arm/mach-mv78xx0/include/mach/timex.h
new file mode 100644
index 000000000000..0e8c443c723a
--- /dev/null
+++ b/arch/arm/mach-mv78xx0/include/mach/timex.h
@@ -0,0 +1,9 @@
1/*
2 * arch/arm/mach-mv78xx0/include/mach/timex.h
3 *
4 * This file is licensed under the terms of the GNU General Public
5 * License version 2. This program is licensed "as is" without any
6 * warranty of any kind, whether express or implied.
7 */
8
9#define CLOCK_TICK_RATE (100 * HZ)
diff --git a/arch/arm/mach-mv78xx0/include/mach/uncompress.h b/arch/arm/mach-mv78xx0/include/mach/uncompress.h
new file mode 100644
index 000000000000..365264298e79
--- /dev/null
+++ b/arch/arm/mach-mv78xx0/include/mach/uncompress.h
@@ -0,0 +1,47 @@
1/*
2 * arch/arm/mach-mv78xx0/include/mach/uncompress.h
3 *
4 * This file is licensed under the terms of the GNU General Public
5 * License version 2. This program is licensed "as is" without any
6 * warranty of any kind, whether express or implied.
7 */
8
9#include <linux/serial_reg.h>
10#include <mach/mv78xx0.h>
11
12#define SERIAL_BASE ((unsigned char *)UART0_PHYS_BASE)
13
14static void putc(const char c)
15{
16 unsigned char *base = SERIAL_BASE;
17 int i;
18
19 for (i = 0; i < 0x1000; i++) {
20 if (base[UART_LSR << 2] & UART_LSR_THRE)
21 break;
22 barrier();
23 }
24
25 base[UART_TX << 2] = c;
26}
27
28static void flush(void)
29{
30 unsigned char *base = SERIAL_BASE;
31 unsigned char mask;
32 int i;
33
34 mask = UART_LSR_TEMT | UART_LSR_THRE;
35
36 for (i = 0; i < 0x1000; i++) {
37 if ((base[UART_LSR << 2] & mask) == mask)
38 break;
39 barrier();
40 }
41}
42
43/*
44 * nothing to do
45 */
46#define arch_decomp_setup()
47#define arch_decomp_wdog()
diff --git a/arch/arm/mach-mv78xx0/include/mach/vmalloc.h b/arch/arm/mach-mv78xx0/include/mach/vmalloc.h
new file mode 100644
index 000000000000..1c4954386a84
--- /dev/null
+++ b/arch/arm/mach-mv78xx0/include/mach/vmalloc.h
@@ -0,0 +1,5 @@
1/*
2 * arch/arm/mach-mv78xx0/include/mach/vmalloc.h
3 */
4
5#define VMALLOC_END 0xfe000000
diff --git a/arch/arm/mach-mv78xx0/irq.c b/arch/arm/mach-mv78xx0/irq.c
index 60f4ee4d4532..3198abf54c90 100644
--- a/arch/arm/mach-mv78xx0/irq.c
+++ b/arch/arm/mach-mv78xx0/irq.c
@@ -11,7 +11,7 @@
11#include <linux/kernel.h> 11#include <linux/kernel.h>
12#include <linux/init.h> 12#include <linux/init.h>
13#include <linux/pci.h> 13#include <linux/pci.h>
14#include <asm/arch/mv78xx0.h> 14#include <mach/mv78xx0.h>
15#include <asm/plat-orion/irq.h> 15#include <asm/plat-orion/irq.h>
16#include "common.h" 16#include "common.h"
17 17
diff --git a/arch/arm/mach-mx2/clock_imx27.c b/arch/arm/mach-mx2/clock_imx27.c
index 0a29ef29c73a..c69896d011a1 100644
--- a/arch/arm/mach-mx2/clock_imx27.c
+++ b/arch/arm/mach-mx2/clock_imx27.c
@@ -22,10 +22,9 @@
22#include <linux/module.h> 22#include <linux/module.h>
23#include <linux/spinlock.h> 23#include <linux/spinlock.h>
24 24
25#include <asm/arch/clock.h> 25#include <mach/clock.h>
26#include <asm/arch/common.h> 26#include <mach/common.h>
27#include <asm/div64.h> 27#include <asm/div64.h>
28#include <asm/mach-types.h>
29 28
30#include "crm_regs.h" 29#include "crm_regs.h"
31 30
diff --git a/arch/arm/mach-mx2/cpu_imx27.c b/arch/arm/mach-mx2/cpu_imx27.c
index d6b5c2e3377f..239308fe6652 100644
--- a/arch/arm/mach-mx2/cpu_imx27.c
+++ b/arch/arm/mach-mx2/cpu_imx27.c
@@ -24,7 +24,7 @@
24#include <linux/io.h> 24#include <linux/io.h>
25#include <linux/module.h> 25#include <linux/module.h>
26 26
27#include <asm/hardware.h> 27#include <mach/hardware.h>
28 28
29#include "crm_regs.h" 29#include "crm_regs.h"
30 30
diff --git a/arch/arm/mach-mx2/crm_regs.h b/arch/arm/mach-mx2/crm_regs.h
index a40a9b950ce9..94644cd0a0fc 100644
--- a/arch/arm/mach-mx2/crm_regs.h
+++ b/arch/arm/mach-mx2/crm_regs.h
@@ -20,7 +20,7 @@
20#ifndef __ARCH_ARM_MACH_MX2_CRM_REGS_H__ 20#ifndef __ARCH_ARM_MACH_MX2_CRM_REGS_H__
21#define __ARCH_ARM_MACH_MX2_CRM_REGS_H__ 21#define __ARCH_ARM_MACH_MX2_CRM_REGS_H__
22 22
23#include <asm/arch/hardware.h> 23#include <mach/hardware.h>
24 24
25/* Register offsets */ 25/* Register offsets */
26#define CCM_CSCR (IO_ADDRESS(CCM_BASE_ADDR) + 0x0) 26#define CCM_CSCR (IO_ADDRESS(CCM_BASE_ADDR) + 0x0)
diff --git a/arch/arm/mach-mx2/devices.c b/arch/arm/mach-mx2/devices.c
index a1f44c3c5315..bd0559d5933e 100644
--- a/arch/arm/mach-mx2/devices.c
+++ b/arch/arm/mach-mx2/devices.c
@@ -32,7 +32,7 @@
32#include <linux/platform_device.h> 32#include <linux/platform_device.h>
33#include <linux/gpio.h> 33#include <linux/gpio.h>
34 34
35#include <asm/hardware.h> 35#include <mach/hardware.h>
36 36
37/* 37/*
38 * Resource definition for the MXC IrDA 38 * Resource definition for the MXC IrDA
diff --git a/arch/arm/mach-mx2/generic.c b/arch/arm/mach-mx2/generic.c
index 07875cf00de9..dea6521d4d5c 100644
--- a/arch/arm/mach-mx2/generic.c
+++ b/arch/arm/mach-mx2/generic.c
@@ -20,7 +20,7 @@
20 20
21#include <linux/mm.h> 21#include <linux/mm.h>
22#include <linux/init.h> 22#include <linux/init.h>
23#include <asm/hardware.h> 23#include <mach/hardware.h>
24#include <asm/pgtable.h> 24#include <asm/pgtable.h>
25#include <asm/mach/map.h> 25#include <asm/mach/map.h>
26 26
diff --git a/arch/arm/mach-mx2/mx27ads.c b/arch/arm/mach-mx2/mx27ads.c
index a9ff01fff137..4ce56ef4d8d3 100644
--- a/arch/arm/mach-mx2/mx27ads.c
+++ b/arch/arm/mach-mx2/mx27ads.c
@@ -23,16 +23,16 @@
23#include <linux/mtd/map.h> 23#include <linux/mtd/map.h>
24#include <linux/mtd/partitions.h> 24#include <linux/mtd/partitions.h>
25#include <linux/mtd/physmap.h> 25#include <linux/mtd/physmap.h>
26#include <asm/arch/common.h> 26#include <mach/common.h>
27#include <asm/hardware.h> 27#include <mach/hardware.h>
28#include <asm/mach-types.h> 28#include <asm/mach-types.h>
29#include <asm/mach/arch.h> 29#include <asm/mach/arch.h>
30#include <asm/mach/time.h> 30#include <asm/mach/time.h>
31#include <asm/mach/map.h> 31#include <asm/mach/map.h>
32#include <asm/arch/gpio.h> 32#include <mach/gpio.h>
33#include <asm/arch/imx-uart.h> 33#include <mach/imx-uart.h>
34#include <asm/arch/iomux-mx1-mx2.h> 34#include <mach/iomux-mx1-mx2.h>
35#include <asm/arch/board-mx27ads.h> 35#include <mach/board-mx27ads.h>
36 36
37/* ADS's NOR flash */ 37/* ADS's NOR flash */
38static struct physmap_flash_data mx27ads_flash_data = { 38static struct physmap_flash_data mx27ads_flash_data = {
diff --git a/arch/arm/mach-mx2/pcm038.c b/arch/arm/mach-mx2/pcm038.c
index a9a28f58e714..1028f453cfc8 100644
--- a/arch/arm/mach-mx2/pcm038.c
+++ b/arch/arm/mach-mx2/pcm038.c
@@ -21,12 +21,12 @@
21#include <linux/mtd/physmap.h> 21#include <linux/mtd/physmap.h>
22#include <asm/mach/arch.h> 22#include <asm/mach/arch.h>
23#include <asm/mach-types.h> 23#include <asm/mach-types.h>
24#include <asm/arch/common.h> 24#include <mach/common.h>
25#include <asm/hardware.h> 25#include <mach/hardware.h>
26#include <asm/arch/iomux-mx1-mx2.h> 26#include <mach/iomux-mx1-mx2.h>
27#include <asm/mach/time.h> 27#include <asm/mach/time.h>
28#include <asm/arch/imx-uart.h> 28#include <mach/imx-uart.h>
29#include <asm/arch/board-pcm038.h> 29#include <mach/board-pcm038.h>
30 30
31/* 31/*
32 * Phytec's phyCORE-i.MX27 comes with 32MiB flash, 32 * Phytec's phyCORE-i.MX27 comes with 32MiB flash,
diff --git a/arch/arm/mach-mx2/pcm970-baseboard.c b/arch/arm/mach-mx2/pcm970-baseboard.c
index 028ac4d33684..a560cd6ad23d 100644
--- a/arch/arm/mach-mx2/pcm970-baseboard.c
+++ b/arch/arm/mach-mx2/pcm970-baseboard.c
@@ -17,8 +17,7 @@
17 */ 17 */
18 18
19#include <linux/platform_device.h> 19#include <linux/platform_device.h>
20#include <asm/hardware.h> 20#include <mach/hardware.h>
21#include <asm/mach-types.h>
22#include <asm/mach/arch.h> 21#include <asm/mach/arch.h>
23 22
24/* 23/*
diff --git a/arch/arm/mach-mx2/serial.c b/arch/arm/mach-mx2/serial.c
index 570c02b8e5df..e31fd44f7941 100644
--- a/arch/arm/mach-mx2/serial.c
+++ b/arch/arm/mach-mx2/serial.c
@@ -20,8 +20,8 @@
20#include <linux/module.h> 20#include <linux/module.h>
21#include <linux/platform_device.h> 21#include <linux/platform_device.h>
22#include <linux/serial.h> 22#include <linux/serial.h>
23#include <asm/hardware.h> 23#include <mach/hardware.h>
24#include <asm/arch/imx-uart.h> 24#include <mach/imx-uart.h>
25 25
26static struct resource uart0[] = { 26static struct resource uart0[] = {
27 { 27 {
diff --git a/arch/arm/mach-mx2/system.c b/arch/arm/mach-mx2/system.c
index 99304645299d..7b8269719d11 100644
--- a/arch/arm/mach-mx2/system.c
+++ b/arch/arm/mach-mx2/system.c
@@ -23,7 +23,7 @@
23#include <linux/clk.h> 23#include <linux/clk.h>
24#include <linux/io.h> 24#include <linux/io.h>
25 25
26#include <asm/arch/hardware.h> 26#include <mach/hardware.h>
27#include <asm/proc-fns.h> 27#include <asm/proc-fns.h>
28#include <asm/system.h> 28#include <asm/system.h>
29 29
diff --git a/arch/arm/mach-mx3/clock.c b/arch/arm/mach-mx3/clock.c
index 2f3635943e70..9f14a871ee7c 100644
--- a/arch/arm/mach-mx3/clock.c
+++ b/arch/arm/mach-mx3/clock.c
@@ -23,7 +23,7 @@
23#include <linux/clk.h> 23#include <linux/clk.h>
24#include <linux/err.h> 24#include <linux/err.h>
25#include <linux/io.h> 25#include <linux/io.h>
26#include <asm/arch/clock.h> 26#include <mach/clock.h>
27#include <asm/div64.h> 27#include <asm/div64.h>
28 28
29#include "crm_regs.h" 29#include "crm_regs.h"
diff --git a/arch/arm/mach-mx3/devices.c b/arch/arm/mach-mx3/devices.c
index 5c0320fce5b6..e08c6a8ac56b 100644
--- a/arch/arm/mach-mx3/devices.c
+++ b/arch/arm/mach-mx3/devices.c
@@ -21,8 +21,8 @@
21#include <linux/platform_device.h> 21#include <linux/platform_device.h>
22#include <linux/serial.h> 22#include <linux/serial.h>
23#include <linux/gpio.h> 23#include <linux/gpio.h>
24#include <asm/hardware.h> 24#include <mach/hardware.h>
25#include <asm/arch/imx-uart.h> 25#include <mach/imx-uart.h>
26 26
27static struct resource uart0[] = { 27static struct resource uart0[] = {
28 { 28 {
diff --git a/arch/arm/mach-mx3/iomux.c b/arch/arm/mach-mx3/iomux.c
index adc51feefc1d..3dda1fe23cbf 100644
--- a/arch/arm/mach-mx3/iomux.c
+++ b/arch/arm/mach-mx3/iomux.c
@@ -21,9 +21,9 @@
21#include <linux/spinlock.h> 21#include <linux/spinlock.h>
22#include <linux/io.h> 22#include <linux/io.h>
23#include <linux/gpio.h> 23#include <linux/gpio.h>
24#include <asm/hardware.h> 24#include <mach/hardware.h>
25#include <asm/arch/gpio.h> 25#include <mach/gpio.h>
26#include <asm/arch/iomux-mx3.h> 26#include <mach/iomux-mx3.h>
27 27
28/* 28/*
29 * IOMUX register (base) addresses 29 * IOMUX register (base) addresses
diff --git a/arch/arm/mach-mx3/mm.c b/arch/arm/mach-mx3/mm.c
index 41dad485ded9..30d842bd4d64 100644
--- a/arch/arm/mach-mx3/mm.c
+++ b/arch/arm/mach-mx3/mm.c
@@ -22,10 +22,10 @@
22 22
23#include <linux/mm.h> 23#include <linux/mm.h>
24#include <linux/init.h> 24#include <linux/init.h>
25#include <asm/hardware.h> 25#include <mach/hardware.h>
26#include <asm/pgtable.h> 26#include <asm/pgtable.h>
27#include <asm/mach/map.h> 27#include <asm/mach/map.h>
28#include <asm/arch/common.h> 28#include <mach/common.h>
29 29
30/*! 30/*!
31 * @file mm.c 31 * @file mm.c
diff --git a/arch/arm/mach-mx3/mx31ads.c b/arch/arm/mach-mx3/mx31ads.c
index eba3e0cd4283..60fb4e0d5acd 100644
--- a/arch/arm/mach-mx3/mx31ads.c
+++ b/arch/arm/mach-mx3/mx31ads.c
@@ -23,14 +23,14 @@
23#include <linux/clk.h> 23#include <linux/clk.h>
24#include <linux/serial_8250.h> 24#include <linux/serial_8250.h>
25 25
26#include <asm/hardware.h> 26#include <mach/hardware.h>
27#include <asm/mach-types.h> 27#include <asm/mach-types.h>
28#include <asm/mach/arch.h> 28#include <asm/mach/arch.h>
29#include <asm/mach/time.h> 29#include <asm/mach/time.h>
30#include <asm/memory.h> 30#include <asm/memory.h>
31#include <asm/mach/map.h> 31#include <asm/mach/map.h>
32#include <asm/arch/common.h> 32#include <mach/common.h>
33#include <asm/arch/board-mx31ads.h> 33#include <mach/board-mx31ads.h>
34 34
35/*! 35/*!
36 * @file mx31ads.c 36 * @file mx31ads.c
diff --git a/arch/arm/mach-mx3/mx31lite.c b/arch/arm/mach-mx3/mx31lite.c
index 1372c1a1fc3f..d363a6e79f80 100644
--- a/arch/arm/mach-mx3/mx31lite.c
+++ b/arch/arm/mach-mx3/mx31lite.c
@@ -23,15 +23,15 @@
23#include <linux/kernel.h> 23#include <linux/kernel.h>
24#include <linux/memory.h> 24#include <linux/memory.h>
25 25
26#include <asm/hardware.h> 26#include <mach/hardware.h>
27#include <asm/mach-types.h> 27#include <asm/mach-types.h>
28#include <asm/mach/arch.h> 28#include <asm/mach/arch.h>
29#include <asm/mach/time.h> 29#include <asm/mach/time.h>
30#include <asm/mach/map.h> 30#include <asm/mach/map.h>
31#include <asm/arch/common.h> 31#include <mach/common.h>
32#include <asm/page.h> 32#include <asm/page.h>
33#include <asm/setup.h> 33#include <asm/setup.h>
34#include <asm/arch/board-mx31lite.h> 34#include <mach/board-mx31lite.h>
35 35
36/* 36/*
37 * This file contains the board-specific initialization routines. 37 * This file contains the board-specific initialization routines.
diff --git a/arch/arm/mach-mx3/pcm037.c b/arch/arm/mach-mx3/pcm037.c
index a34ae6de266f..0a152ed15a85 100644
--- a/arch/arm/mach-mx3/pcm037.c
+++ b/arch/arm/mach-mx3/pcm037.c
@@ -23,15 +23,15 @@
23#include <linux/mtd/physmap.h> 23#include <linux/mtd/physmap.h>
24#include <linux/memory.h> 24#include <linux/memory.h>
25 25
26#include <asm/hardware.h> 26#include <mach/hardware.h>
27#include <asm/mach-types.h> 27#include <asm/mach-types.h>
28#include <asm/mach/arch.h> 28#include <asm/mach/arch.h>
29#include <asm/mach/time.h> 29#include <asm/mach/time.h>
30#include <asm/mach/map.h> 30#include <asm/mach/map.h>
31#include <asm/arch/common.h> 31#include <mach/common.h>
32#include <asm/arch/imx-uart.h> 32#include <mach/imx-uart.h>
33#include <asm/arch/iomux-mx3.h> 33#include <mach/iomux-mx3.h>
34#include <asm/arch/board-pcm037.h> 34#include <mach/board-pcm037.h>
35 35
36static struct physmap_flash_data pcm037_flash_data = { 36static struct physmap_flash_data pcm037_flash_data = {
37 .width = 2, 37 .width = 2,
diff --git a/arch/arm/mach-netx/fb.c b/arch/arm/mach-netx/fb.c
index ef0ab6115c0b..24c79650f9f3 100644
--- a/arch/arm/mach-netx/fb.c
+++ b/arch/arm/mach-netx/fb.c
@@ -23,8 +23,8 @@
23#include <linux/amba/bus.h> 23#include <linux/amba/bus.h>
24#include <linux/amba/clcd.h> 24#include <linux/amba/clcd.h>
25 25
26#include <asm/arch/netx-regs.h> 26#include <mach/netx-regs.h>
27#include <asm/hardware.h> 27#include <mach/hardware.h>
28 28
29struct clk {}; 29struct clk {};
30 30
diff --git a/arch/arm/mach-netx/generic.c b/arch/arm/mach-netx/generic.c
index 99d4fb19a08a..1b40483ea753 100644
--- a/arch/arm/mach-netx/generic.c
+++ b/arch/arm/mach-netx/generic.c
@@ -22,11 +22,11 @@
22#include <linux/kernel.h> 22#include <linux/kernel.h>
23#include <linux/module.h> 23#include <linux/module.h>
24#include <linux/platform_device.h> 24#include <linux/platform_device.h>
25#include <asm/hardware.h> 25#include <mach/hardware.h>
26#include <asm/mach/map.h> 26#include <asm/mach/map.h>
27#include <asm/hardware/vic.h> 27#include <asm/hardware/vic.h>
28#include <asm/io.h> 28#include <asm/io.h>
29#include <asm/arch/netx-regs.h> 29#include <mach/netx-regs.h>
30#include <asm/mach/irq.h> 30#include <asm/mach/irq.h>
31 31
32static struct map_desc netx_io_desc[] __initdata = { 32static struct map_desc netx_io_desc[] __initdata = {
diff --git a/arch/arm/mach-netx/include/mach/debug-macro.S b/arch/arm/mach-netx/include/mach/debug-macro.S
new file mode 100644
index 000000000000..11b9d5b46390
--- /dev/null
+++ b/arch/arm/mach-netx/include/mach/debug-macro.S
@@ -0,0 +1,38 @@
1/* arch/arm/mach-netx/include/mach/debug-macro.S
2 *
3 * Debugging macro include header
4 *
5 * Copyright (C) 1994-1999 Russell King
6 * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 *
12*/
13
14#include "hardware.h"
15
16 .macro addruart,rx
17 mrc p15, 0, \rx, c1, c0
18 tst \rx, #1 @ MMU enabled?
19 moveq \rx, #0x00100000 @ physical
20 movne \rx, #io_p2v(0x00100000) @ virtual
21 orr \rx, \rx, #0x00000a00
22 .endm
23
24 .macro senduart,rd,rx
25 str \rd, [\rx, #0]
26 .endm
27
28 .macro busyuart,rd,rx
291002: ldr \rd, [\rx, #0x18]
30 tst \rd, #(1 << 3)
31 bne 1002b
32 .endm
33
34 .macro waituart,rd,rx
351001: ldr \rd, [\rx, #0x18]
36 tst \rd, #(1 << 3)
37 bne 1001b
38 .endm
diff --git a/arch/arm/mach-netx/include/mach/dma.h b/arch/arm/mach-netx/include/mach/dma.h
new file mode 100644
index 000000000000..690b3ebc43ac
--- /dev/null
+++ b/arch/arm/mach-netx/include/mach/dma.h
@@ -0,0 +1,21 @@
1/*
2 * arch/arm/mach-netx/include/mach/dma.h
3 *
4 * Copyright (C) 2005 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2
8 * as published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */
19
20#define MAX_DMA_CHANNELS 0
21#define MAX_DMA_ADDRESS ~0
diff --git a/arch/arm/mach-netx/include/mach/entry-macro.S b/arch/arm/mach-netx/include/mach/entry-macro.S
new file mode 100644
index 000000000000..a1952a0feda6
--- /dev/null
+++ b/arch/arm/mach-netx/include/mach/entry-macro.S
@@ -0,0 +1,41 @@
1/*
2 * arch/arm/mach-netx/include/mach/entry-macro.S
3 *
4 * Low-level IRQ helper macros for Hilscher netX based platforms
5 *
6 * Copyright (C) 2005 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2
10 * as published by the Free Software Foundation.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
21#include <mach/hardware.h>
22
23 .macro disable_fiq
24 .endm
25
26 .macro get_irqnr_preamble, base, tmp
27 .endm
28
29 .macro arch_ret_to_user, tmp1, tmp2
30 .endm
31
32 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
33 mov \base, #io_p2v(0x00100000)
34 add \base, \base, #0x000ff000
35
36 ldr \irqstat, [\base, #0]
37 clz \irqnr, \irqstat
38 rsb \irqnr, \irqnr, #31
39 cmp \irqstat, #0
40 .endm
41
diff --git a/arch/arm/mach-netx/include/mach/eth.h b/arch/arm/mach-netx/include/mach/eth.h
new file mode 100644
index 000000000000..88af1ac28ead
--- /dev/null
+++ b/arch/arm/mach-netx/include/mach/eth.h
@@ -0,0 +1,27 @@
1/*
2 * arch/arm/mach-netx/include/mach/eth.h
3 *
4 * Copyright (c) 2005 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2
8 * as published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */
19
20#ifndef ASMARM_ARCH_ETH_H
21#define ASMARM_ARCH_ETH_H
22
23struct netxeth_platform_data {
24 unsigned int xcno; /* number of xmac/xpec engine this eth uses */
25};
26
27#endif
diff --git a/arch/arm/mach-netx/include/mach/hardware.h b/arch/arm/mach-netx/include/mach/hardware.h
new file mode 100644
index 000000000000..517a2bd37842
--- /dev/null
+++ b/arch/arm/mach-netx/include/mach/hardware.h
@@ -0,0 +1,39 @@
1/*
2 * arch/arm/mach-netx/include/mach/hardware.h
3 *
4 * Copyright (C) 2005 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2
8 * as published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */
19#ifndef __ASM_ARCH_HARDWARE_H
20#define __ASM_ARCH_HARDWARE_H
21
22#define NETX_IO_PHYS 0x00100000
23#define NETX_IO_VIRT 0xe0000000
24#define NETX_IO_SIZE 0x00100000
25
26#define SRAM_INTERNAL_PHYS_0 0x00000
27#define SRAM_INTERNAL_PHYS_1 0x08000
28#define SRAM_INTERNAL_PHYS_2 0x10000
29#define SRAM_INTERNAL_PHYS_3 0x18000
30#define SRAM_INTERNAL_PHYS(no) ((no) * 0x8000)
31
32#define XPEC_MEM_SIZE 0x4000
33#define XMAC_MEM_SIZE 0x1000
34#define SRAM_MEM_SIZE 0x8000
35
36#define io_p2v(x) ((x) - NETX_IO_PHYS + NETX_IO_VIRT)
37#define io_v2p(x) ((x) - NETX_IO_VIRT + NETX_IO_PHYS)
38
39#endif
diff --git a/arch/arm/mach-netx/include/mach/io.h b/arch/arm/mach-netx/include/mach/io.h
new file mode 100644
index 000000000000..468b92a82585
--- /dev/null
+++ b/arch/arm/mach-netx/include/mach/io.h
@@ -0,0 +1,28 @@
1/*
2 * arch/arm/mach-netx/include/mach/io.h
3 *
4 * Copyright (C) 2005 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2
8 * as published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */
19
20#ifndef __ASM_ARM_ARCH_IO_H
21#define __ASM_ARM_ARCH_IO_H
22
23#define IO_SPACE_LIMIT 0xffffffff
24
25#define __io(a) ((void __iomem *)(a))
26#define __mem_pci(a) (a)
27
28#endif
diff --git a/arch/arm/mach-netx/include/mach/irqs.h b/arch/arm/mach-netx/include/mach/irqs.h
new file mode 100644
index 000000000000..6ce914d54a30
--- /dev/null
+++ b/arch/arm/mach-netx/include/mach/irqs.h
@@ -0,0 +1,70 @@
1/*
2 * arch/arm/mach-netx/include/mach/irqs.h
3 *
4 * Copyright (C) 2005 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2
8 * as published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */
19
20#define NETX_IRQ_VIC_START 0
21#define NETX_IRQ_SOFTINT 0
22#define NETX_IRQ_TIMER0 1
23#define NETX_IRQ_TIMER1 2
24#define NETX_IRQ_TIMER2 3
25#define NETX_IRQ_SYSTIME_NS 4
26#define NETX_IRQ_SYSTIME_S 5
27#define NETX_IRQ_GPIO_15 6
28#define NETX_IRQ_WATCHDOG 7
29#define NETX_IRQ_UART0 8
30#define NETX_IRQ_UART1 9
31#define NETX_IRQ_UART2 10
32#define NETX_IRQ_USB 11
33#define NETX_IRQ_SPI 12
34#define NETX_IRQ_I2C 13
35#define NETX_IRQ_LCD 14
36#define NETX_IRQ_HIF 15
37#define NETX_IRQ_GPIO_0_14 16
38#define NETX_IRQ_XPEC0 17
39#define NETX_IRQ_XPEC1 18
40#define NETX_IRQ_XPEC2 19
41#define NETX_IRQ_XPEC3 20
42#define NETX_IRQ_XPEC(no) (17 + (no))
43#define NETX_IRQ_MSYNC0 21
44#define NETX_IRQ_MSYNC1 22
45#define NETX_IRQ_MSYNC2 23
46#define NETX_IRQ_MSYNC3 24
47#define NETX_IRQ_IRQ_PHY 25
48#define NETX_IRQ_ISO_AREA 26
49/* int 27 is reserved */
50/* int 28 is reserved */
51#define NETX_IRQ_TIMER3 29
52#define NETX_IRQ_TIMER4 30
53/* int 31 is reserved */
54
55#define NETX_IRQS 32
56
57/* for multiplexed irqs on gpio 0..14 */
58#define NETX_IRQ_GPIO(x) (NETX_IRQS + (x))
59#define NETX_IRQ_GPIO_LAST NETX_IRQ_GPIO(14)
60
61/* Host interface interrupts */
62#define NETX_IRQ_HIF_CHAINED(x) (NETX_IRQ_GPIO_LAST + 1 + (x))
63#define NETX_IRQ_HIF_PIO35 NETX_IRQ_HIF_CHAINED(0)
64#define NETX_IRQ_HIF_PIO36 NETX_IRQ_HIF_CHAINED(1)
65#define NETX_IRQ_HIF_PIO40 NETX_IRQ_HIF_CHAINED(2)
66#define NETX_IRQ_HIF_PIO47 NETX_IRQ_HIF_CHAINED(3)
67#define NETX_IRQ_HIF_PIO72 NETX_IRQ_HIF_CHAINED(4)
68#define NETX_IRQ_HIF_LAST NETX_IRQ_HIF_CHAINED(4)
69
70#define NR_IRQS (NETX_IRQ_HIF_LAST + 1)
diff --git a/arch/arm/mach-netx/include/mach/memory.h b/arch/arm/mach-netx/include/mach/memory.h
new file mode 100644
index 000000000000..53745a1378de
--- /dev/null
+++ b/arch/arm/mach-netx/include/mach/memory.h
@@ -0,0 +1,36 @@
1/*
2 * arch/arm/mach-netx/include/mach/memory.h
3 *
4 * Copyright (C) 2005 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2
8 * as published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */
19
20#ifndef __ASM_ARCH_MEMORY_H
21#define __ASM_ARCH_MEMORY_H
22
23#define PHYS_OFFSET UL(0x80000000)
24
25/*
26 * Virtual view <-> DMA view memory address translations
27 * virt_to_bus: Used to translate the virtual address to an
28 * address suitable to be passed to set_dma_addr
29 * bus_to_virt: Used to convert an address for DMA operations
30 * to an address that the kernel can use.
31 */
32#define __virt_to_bus(x) __virt_to_phys(x)
33#define __bus_to_virt(x) __phys_to_virt(x)
34
35#endif
36
diff --git a/arch/arm/mach-netx/include/mach/netx-regs.h b/arch/arm/mach-netx/include/mach/netx-regs.h
new file mode 100644
index 000000000000..5104a00d40f4
--- /dev/null
+++ b/arch/arm/mach-netx/include/mach/netx-regs.h
@@ -0,0 +1,410 @@
1/*
2 * arch/arm/mach-netx/include/mach/netx-regs.h
3 *
4 * Copyright (c) 2005 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2
8 * as published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */
19
20#ifndef __ASM_ARCH_NETX_REGS_H
21#define __ASM_ARCH_NETX_REGS_H
22
23/* offsets relative to the beginning of the io space */
24#define NETX_OFS_SYSTEM 0x00000
25#define NETX_OFS_MEMCR 0x00100
26#define NETX_OFS_DPMAS 0x03000
27#define NETX_OFS_GPIO 0x00800
28#define NETX_OFS_PIO 0x00900
29#define NETX_OFS_UART0 0x00a00
30#define NETX_OFS_UART1 0x00a40
31#define NETX_OFS_UART2 0x00a80
32#define NETX_OF_MIIMU 0x00b00
33#define NETX_OFS_SPI 0x00c00
34#define NETX_OFS_I2C 0x00d00
35#define NETX_OFS_SYSTIME 0x01100
36#define NETX_OFS_RTC 0x01200
37#define NETX_OFS_EXTBUS 0x03600
38#define NETX_OFS_LCD 0x04000
39#define NETX_OFS_USB 0x20000
40#define NETX_OFS_XMAC0 0x60000
41#define NETX_OFS_XMAC1 0x61000
42#define NETX_OFS_XMAC2 0x62000
43#define NETX_OFS_XMAC3 0x63000
44#define NETX_OFS_XMAC(no) (0x60000 + (no) * 0x1000)
45#define NETX_OFS_PFIFO 0x64000
46#define NETX_OFS_XPEC0 0x70000
47#define NETX_OFS_XPEC1 0x74000
48#define NETX_OFS_XPEC2 0x78000
49#define NETX_OFS_XPEC3 0x7c000
50#define NETX_OFS_XPEC(no) (0x70000 + (no) * 0x4000)
51#define NETX_OFS_VIC 0xff000
52
53/* physical addresses */
54#define NETX_PA_SYSTEM (NETX_IO_PHYS + NETX_OFS_SYSTEM)
55#define NETX_PA_MEMCR (NETX_IO_PHYS + NETX_OFS_MEMCR)
56#define NETX_PA_DPMAS (NETX_IO_PHYS + NETX_OFS_DPMAS)
57#define NETX_PA_GPIO (NETX_IO_PHYS + NETX_OFS_GPIO)
58#define NETX_PA_PIO (NETX_IO_PHYS + NETX_OFS_PIO)
59#define NETX_PA_UART0 (NETX_IO_PHYS + NETX_OFS_UART0)
60#define NETX_PA_UART1 (NETX_IO_PHYS + NETX_OFS_UART1)
61#define NETX_PA_UART2 (NETX_IO_PHYS + NETX_OFS_UART2)
62#define NETX_PA_MIIMU (NETX_IO_PHYS + NETX_OF_MIIMU)
63#define NETX_PA_SPI (NETX_IO_PHYS + NETX_OFS_SPI)
64#define NETX_PA_I2C (NETX_IO_PHYS + NETX_OFS_I2C)
65#define NETX_PA_SYSTIME (NETX_IO_PHYS + NETX_OFS_SYSTIME)
66#define NETX_PA_RTC (NETX_IO_PHYS + NETX_OFS_RTC)
67#define NETX_PA_EXTBUS (NETX_IO_PHYS + NETX_OFS_EXTBUS)
68#define NETX_PA_LCD (NETX_IO_PHYS + NETX_OFS_LCD)
69#define NETX_PA_USB (NETX_IO_PHYS + NETX_OFS_USB)
70#define NETX_PA_XMAC0 (NETX_IO_PHYS + NETX_OFS_XMAC0)
71#define NETX_PA_XMAC1 (NETX_IO_PHYS + NETX_OFS_XMAC1)
72#define NETX_PA_XMAC2 (NETX_IO_PHYS + NETX_OFS_XMAC2)
73#define NETX_PA_XMAC3 (NETX_IO_PHYS + NETX_OFS_XMAC3)
74#define NETX_PA_XMAC(no) (NETX_IO_PHYS + NETX_OFS_XMAC(no))
75#define NETX_PA_PFIFO (NETX_IO_PHYS + NETX_OFS_PFIFO)
76#define NETX_PA_XPEC0 (NETX_IO_PHYS + NETX_OFS_XPEC0)
77#define NETX_PA_XPEC1 (NETX_IO_PHYS + NETX_OFS_XPEC1)
78#define NETX_PA_XPEC2 (NETX_IO_PHYS + NETX_OFS_XPEC2)
79#define NETX_PA_XPEC3 (NETX_IO_PHYS + NETX_OFS_XPEC3)
80#define NETX_PA_XPEC(no) (NETX_IO_PHYS + NETX_OFS_XPEC(no))
81#define NETX_PA_VIC (NETX_IO_PHYS + NETX_OFS_VIC)
82
83/* virual addresses */
84#define NETX_VA_SYSTEM (NETX_IO_VIRT + NETX_OFS_SYSTEM)
85#define NETX_VA_MEMCR (NETX_IO_VIRT + NETX_OFS_MEMCR)
86#define NETX_VA_DPMAS (NETX_IO_VIRT + NETX_OFS_DPMAS)
87#define NETX_VA_GPIO (NETX_IO_VIRT + NETX_OFS_GPIO)
88#define NETX_VA_PIO (NETX_IO_VIRT + NETX_OFS_PIO)
89#define NETX_VA_UART0 (NETX_IO_VIRT + NETX_OFS_UART0)
90#define NETX_VA_UART1 (NETX_IO_VIRT + NETX_OFS_UART1)
91#define NETX_VA_UART2 (NETX_IO_VIRT + NETX_OFS_UART2)
92#define NETX_VA_MIIMU (NETX_IO_VIRT + NETX_OF_MIIMU)
93#define NETX_VA_SPI (NETX_IO_VIRT + NETX_OFS_SPI)
94#define NETX_VA_I2C (NETX_IO_VIRT + NETX_OFS_I2C)
95#define NETX_VA_SYSTIME (NETX_IO_VIRT + NETX_OFS_SYSTIME)
96#define NETX_VA_RTC (NETX_IO_VIRT + NETX_OFS_RTC)
97#define NETX_VA_EXTBUS (NETX_IO_VIRT + NETX_OFS_EXTBUS)
98#define NETX_VA_LCD (NETX_IO_VIRT + NETX_OFS_LCD)
99#define NETX_VA_USB (NETX_IO_VIRT + NETX_OFS_USB)
100#define NETX_VA_XMAC0 (NETX_IO_VIRT + NETX_OFS_XMAC0)
101#define NETX_VA_XMAC1 (NETX_IO_VIRT + NETX_OFS_XMAC1)
102#define NETX_VA_XMAC2 (NETX_IO_VIRT + NETX_OFS_XMAC2)
103#define NETX_VA_XMAC3 (NETX_IO_VIRT + NETX_OFS_XMAC3)
104#define NETX_VA_XMAC(no) (NETX_IO_VIRT + NETX_OFS_XMAC(no))
105#define NETX_VA_PFIFO (NETX_IO_VIRT + NETX_OFS_PFIFO)
106#define NETX_VA_XPEC0 (NETX_IO_VIRT + NETX_OFS_XPEC0)
107#define NETX_VA_XPEC1 (NETX_IO_VIRT + NETX_OFS_XPEC1)
108#define NETX_VA_XPEC2 (NETX_IO_VIRT + NETX_OFS_XPEC2)
109#define NETX_VA_XPEC3 (NETX_IO_VIRT + NETX_OFS_XPEC3)
110#define NETX_VA_XPEC(no) (NETX_IO_VIRT + NETX_OFS_XPEC(no))
111#define NETX_VA_VIC (NETX_IO_VIRT + NETX_OFS_VIC)
112
113/*********************************
114 * System functions *
115 *********************************/
116
117/* Registers */
118#define NETX_SYSTEM_REG(ofs) __io(NETX_VA_SYSTEM + (ofs))
119#define NETX_SYSTEM_BOO_SR NETX_SYSTEM_REG(0x00)
120#define NETX_SYSTEM_IOC_CR NETX_SYSTEM_REG(0x04)
121#define NETX_SYSTEM_IOC_MR NETX_SYSTEM_REG(0x08)
122
123/* FIXME: Docs are not consistent */
124/* #define NETX_SYSTEM_RES_CR NETX_SYSTEM_REG(0x08) */
125#define NETX_SYSTEM_RES_CR NETX_SYSTEM_REG(0x0c)
126
127#define NETX_SYSTEM_PHY_CONTROL NETX_SYSTEM_REG(0x10)
128#define NETX_SYSTEM_REV NETX_SYSTEM_REG(0x34)
129#define NETX_SYSTEM_IOC_ACCESS_KEY NETX_SYSTEM_REG(0x70)
130#define NETX_SYSTEM_WDG_TR NETX_SYSTEM_REG(0x200)
131#define NETX_SYSTEM_WDG_CTR NETX_SYSTEM_REG(0x204)
132#define NETX_SYSTEM_WDG_IRQ_TIMEOUT NETX_SYSTEM_REG(0x208)
133#define NETX_SYSTEM_WDG_RES_TIMEOUT NETX_SYSTEM_REG(0x20c)
134
135/* Bits */
136#define NETX_SYSTEM_RES_CR_RSTIN (1<<0)
137#define NETX_SYSTEM_RES_CR_WDG_RES (1<<1)
138#define NETX_SYSTEM_RES_CR_HOST_RES (1<<2)
139#define NETX_SYSTEM_RES_CR_FIRMW_RES (1<<3)
140#define NETX_SYSTEM_RES_CR_XPEC0_RES (1<<4)
141#define NETX_SYSTEM_RES_CR_XPEC1_RES (1<<5)
142#define NETX_SYSTEM_RES_CR_XPEC2_RES (1<<6)
143#define NETX_SYSTEM_RES_CR_XPEC3_RES (1<<7)
144#define NETX_SYSTEM_RES_CR_DIS_XPEC0_RES (1<<16)
145#define NETX_SYSTEM_RES_CR_DIS_XPEC1_RES (1<<17)
146#define NETX_SYSTEM_RES_CR_DIS_XPEC2_RES (1<<18)
147#define NETX_SYSTEM_RES_CR_DIS_XPEC3_RES (1<<19)
148#define NETX_SYSTEM_RES_CR_FIRMW_FLG0 (1<<20)
149#define NETX_SYSTEM_RES_CR_FIRMW_FLG1 (1<<21)
150#define NETX_SYSTEM_RES_CR_FIRMW_FLG2 (1<<22)
151#define NETX_SYSTEM_RES_CR_FIRMW_FLG3 (1<<23)
152#define NETX_SYSTEM_RES_CR_FIRMW_RES_EN (1<<24)
153#define NETX_SYSTEM_RES_CR_RSTOUT (1<<25)
154#define NETX_SYSTEM_RES_CR_EN_RSTOUT (1<<26)
155
156#define PHY_CONTROL_RESET (1<<31)
157#define PHY_CONTROL_SIM_BYP (1<<30)
158#define PHY_CONTROL_CLK_XLATIN (1<<29)
159#define PHY_CONTROL_PHY1_EN (1<<21)
160#define PHY_CONTROL_PHY1_NP_MSG_CODE
161#define PHY_CONTROL_PHY1_AUTOMDIX (1<<17)
162#define PHY_CONTROL_PHY1_FIXMODE (1<<16)
163#define PHY_CONTROL_PHY1_MODE(mode) (((mode) & 0x7) << 13)
164#define PHY_CONTROL_PHY0_EN (1<<12)
165#define PHY_CONTROL_PHY0_NP_MSG_CODE
166#define PHY_CONTROL_PHY0_AUTOMDIX (1<<8)
167#define PHY_CONTROL_PHY0_FIXMODE (1<<7)
168#define PHY_CONTROL_PHY0_MODE(mode) (((mode) & 0x7) << 4)
169#define PHY_CONTROL_PHY_ADDRESS(adr) ((adr) & 0xf)
170
171#define PHY_MODE_10BASE_T_HALF 0
172#define PHY_MODE_10BASE_T_FULL 1
173#define PHY_MODE_100BASE_TX_FX_FULL 2
174#define PHY_MODE_100BASE_TX_FX_HALF 3
175#define PHY_MODE_100BASE_TX_HALF 4
176#define PHY_MODE_REPEATER 5
177#define PHY_MODE_POWER_DOWN 6
178#define PHY_MODE_ALL 7
179
180/* Bits */
181#define VECT_CNTL_ENABLE (1 << 5)
182
183/*******************************
184 * GPIO and timer module *
185 *******************************/
186
187/* Registers */
188#define NETX_GPIO_REG(ofs) __io(NETX_VA_GPIO + (ofs))
189#define NETX_GPIO_CFG(gpio) NETX_GPIO_REG(0x0 + ((gpio)<<2))
190#define NETX_GPIO_THRESHOLD_CAPTURE(gpio) NETX_GPIO_REG(0x40 + ((gpio)<<2))
191#define NETX_GPIO_COUNTER_CTRL(counter) NETX_GPIO_REG(0x80 + ((counter)<<2))
192#define NETX_GPIO_COUNTER_MAX(counter) NETX_GPIO_REG(0x94 + ((counter)<<2))
193#define NETX_GPIO_COUNTER_CURRENT(counter) NETX_GPIO_REG(0xa8 + ((counter)<<2))
194#define NETX_GPIO_IRQ_ENABLE NETX_GPIO_REG(0xbc)
195#define NETX_GPIO_IRQ_DISABLE NETX_GPIO_REG(0xc0)
196#define NETX_GPIO_SYSTIME_NS_CMP NETX_GPIO_REG(0xc4)
197#define NETX_GPIO_LINE NETX_GPIO_REG(0xc8)
198#define NETX_GPIO_IRQ NETX_GPIO_REG(0xd0)
199
200/* Bits */
201#define NETX_GPIO_CFG_IOCFG_GP_INPUT (0x0)
202#define NETX_GPIO_CFG_IOCFG_GP_OUTPUT (0x1)
203#define NETX_GPIO_CFG_IOCFG_GP_UART (0x2)
204#define NETX_GPIO_CFG_INV (1<<2)
205#define NETX_GPIO_CFG_MODE_INPUT_READ (0<<3)
206#define NETX_GPIO_CFG_MODE_INPUT_CAPTURE_CONT_RISING (1<<3)
207#define NETX_GPIO_CFG_MODE_INPUT_CAPTURE_ONCE_RISING (2<<3)
208#define NETX_GPIO_CFG_MODE_INPUT_CAPTURE_HIGH_LEVEL (3<<3)
209#define NETX_GPIO_CFG_COUNT_REF_COUNTER0 (0<<5)
210#define NETX_GPIO_CFG_COUNT_REF_COUNTER1 (1<<5)
211#define NETX_GPIO_CFG_COUNT_REF_COUNTER2 (2<<5)
212#define NETX_GPIO_CFG_COUNT_REF_COUNTER3 (3<<5)
213#define NETX_GPIO_CFG_COUNT_REF_COUNTER4 (4<<5)
214#define NETX_GPIO_CFG_COUNT_REF_SYSTIME (7<<5)
215
216#define NETX_GPIO_COUNTER_CTRL_RUN (1<<0)
217#define NETX_GPIO_COUNTER_CTRL_SYM (1<<1)
218#define NETX_GPIO_COUNTER_CTRL_ONCE (1<<2)
219#define NETX_GPIO_COUNTER_CTRL_IRQ_EN (1<<3)
220#define NETX_GPIO_COUNTER_CTRL_CNT_EVENT (1<<4)
221#define NETX_GPIO_COUNTER_CTRL_RST_EN (1<<5)
222#define NETX_GPIO_COUNTER_CTRL_SEL_EVENT (1<<6)
223#define NETX_GPIO_COUNTER_CTRL_GPIO_REF /* FIXME */
224
225#define GPIO_BIT(gpio) (1<<(gpio))
226#define COUNTER_BIT(counter) ((1<<16)<<(counter))
227
228/*******************************
229 * PIO *
230 *******************************/
231
232/* Registers */
233#define NETX_PIO_REG(ofs) __io(NETX_VA_PIO + (ofs))
234#define NETX_PIO_INPIO NETX_PIO_REG(0x0)
235#define NETX_PIO_OUTPIO NETX_PIO_REG(0x4)
236#define NETX_PIO_OEPIO NETX_PIO_REG(0x8)
237
238/*******************************
239 * MII Unit *
240 *******************************/
241
242/* Registers */
243#define NETX_MIIMU __io(NETX_VA_MIIMU)
244
245/* Bits */
246#define MIIMU_SNRDY (1<<0)
247#define MIIMU_PREAMBLE (1<<1)
248#define MIIMU_OPMODE_WRITE (1<<2)
249#define MIIMU_MDC_PERIOD (1<<3)
250#define MIIMU_PHY_NRES (1<<4)
251#define MIIMU_RTA (1<<5)
252#define MIIMU_REGADDR(adr) (((adr) & 0x1f) << 6)
253#define MIIMU_PHYADDR(adr) (((adr) & 0x1f) << 11)
254#define MIIMU_DATA(data) (((data) & 0xffff) << 16)
255
256/*******************************
257 * xmac / xpec *
258 *******************************/
259
260/* XPEC register offsets relative to NETX_VA_XPEC(no) */
261#define NETX_XPEC_R0_OFS 0x00
262#define NETX_XPEC_R1_OFS 0x04
263#define NETX_XPEC_R2_OFS 0x08
264#define NETX_XPEC_R3_OFS 0x0c
265#define NETX_XPEC_R4_OFS 0x10
266#define NETX_XPEC_R5_OFS 0x14
267#define NETX_XPEC_R6_OFS 0x18
268#define NETX_XPEC_R7_OFS 0x1c
269#define NETX_XPEC_RANGE01_OFS 0x20
270#define NETX_XPEC_RANGE23_OFS 0x24
271#define NETX_XPEC_RANGE45_OFS 0x28
272#define NETX_XPEC_RANGE67_OFS 0x2c
273#define NETX_XPEC_PC_OFS 0x48
274#define NETX_XPEC_TIMER_OFS(timer) (0x30 + ((timer)<<2))
275#define NETX_XPEC_IRQ_OFS 0x8c
276#define NETX_XPEC_SYSTIME_NS_OFS 0x90
277#define NETX_XPEC_FIFO_DATA_OFS 0x94
278#define NETX_XPEC_SYSTIME_S_OFS 0x98
279#define NETX_XPEC_ADC_OFS 0x9c
280#define NETX_XPEC_URX_COUNT_OFS 0x40
281#define NETX_XPEC_UTX_COUNT_OFS 0x44
282#define NETX_XPEC_PC_OFS 0x48
283#define NETX_XPEC_ZERO_OFS 0x4c
284#define NETX_XPEC_STATCFG_OFS 0x50
285#define NETX_XPEC_EC_MASKA_OFS 0x54
286#define NETX_XPEC_EC_MASKB_OFS 0x58
287#define NETX_XPEC_EC_MASK0_OFS 0x5c
288#define NETX_XPEC_EC_MASK8_OFS 0x7c
289#define NETX_XPEC_EC_MASK9_OFS 0x80
290#define NETX_XPEC_XPU_HOLD_PC_OFS 0x100
291#define NETX_XPEC_RAM_START_OFS 0x2000
292
293/* Bits */
294#define XPU_HOLD_PC (1<<0)
295
296/* XMAC register offsets relative to NETX_VA_XMAC(no) */
297#define NETX_XMAC_RPU_PROGRAM_START_OFS 0x000
298#define NETX_XMAC_RPU_PROGRAM_END_OFS 0x3ff
299#define NETX_XMAC_TPU_PROGRAM_START_OFS 0x400
300#define NETX_XMAC_TPU_PROGRAM_END_OFS 0x7ff
301#define NETX_XMAC_RPU_HOLD_PC_OFS 0xa00
302#define NETX_XMAC_TPU_HOLD_PC_OFS 0xa04
303#define NETX_XMAC_STATUS_SHARED0_OFS 0x840
304#define NETX_XMAC_CONFIG_SHARED0_OFS 0x844
305#define NETX_XMAC_STATUS_SHARED1_OFS 0x848
306#define NETX_XMAC_CONFIG_SHARED1_OFS 0x84c
307#define NETX_XMAC_STATUS_SHARED2_OFS 0x850
308#define NETX_XMAC_CONFIG_SHARED2_OFS 0x854
309#define NETX_XMAC_STATUS_SHARED3_OFS 0x858
310#define NETX_XMAC_CONFIG_SHARED3_OFS 0x85c
311
312#define RPU_HOLD_PC (1<<15)
313#define TPU_HOLD_PC (1<<15)
314
315/*******************************
316 * Pointer FIFO *
317 *******************************/
318
319/* Registers */
320#define NETX_PFIFO_REG(ofs) __io(NETX_VA_PFIFO + (ofs))
321#define NETX_PFIFO_BASE(pfifo) NETX_PFIFO_REG(0x00 + ((pfifo)<<2))
322#define NETX_PFIFO_BORDER_BASE(pfifo) NETX_PFIFO_REG(0x80 + ((pfifo)<<2))
323#define NETX_PFIFO_RESET NETX_PFIFO_REG(0x100)
324#define NETX_PFIFO_FULL NETX_PFIFO_REG(0x104)
325#define NETX_PFIFO_EMPTY NETX_PFIFO_REG(0x108)
326#define NETX_PFIFO_OVEFLOW NETX_PFIFO_REG(0x10c)
327#define NETX_PFIFO_UNDERRUN NETX_PFIFO_REG(0x110)
328#define NETX_PFIFO_FILL_LEVEL(pfifo) NETX_PFIFO_REG(0x180 + ((pfifo)<<2))
329#define NETX_PFIFO_XPEC_ISR(xpec) NETX_PFIFO_REG(0x400 + ((xpec) << 2))
330
331/*******************************
332 * Dual Port Memory *
333 *******************************/
334
335/* Registers */
336#define NETX_DPMAS_REG(ofs) __io(NETX_VA_DPMAS + (ofs))
337#define NETX_DPMAS_SYS_STAT NETX_DPMAS_REG(0x4d8)
338#define NETX_DPMAS_INT_STAT NETX_DPMAS_REG(0x4e0)
339#define NETX_DPMAS_INT_EN NETX_DPMAS_REG(0x4f0)
340#define NETX_DPMAS_IF_CONF0 NETX_DPMAS_REG(0x608)
341#define NETX_DPMAS_IF_CONF1 NETX_DPMAS_REG(0x60c)
342#define NETX_DPMAS_EXT_CONFIG(cs) NETX_DPMAS_REG(0x610 + 4 * (cs))
343#define NETX_DPMAS_IO_MODE0 NETX_DPMAS_REG(0x620) /* I/O 32..63 */
344#define NETX_DPMAS_DRV_EN0 NETX_DPMAS_REG(0x624)
345#define NETX_DPMAS_DATA0 NETX_DPMAS_REG(0x628)
346#define NETX_DPMAS_IO_MODE1 NETX_DPMAS_REG(0x630) /* I/O 64..84 */
347#define NETX_DPMAS_DRV_EN1 NETX_DPMAS_REG(0x634)
348#define NETX_DPMAS_DATA1 NETX_DPMAS_REG(0x638)
349
350/* Bits */
351#define NETX_DPMAS_INT_EN_GLB_EN (1<<31)
352#define NETX_DPMAS_INT_EN_MEM_LCK (1<<30)
353#define NETX_DPMAS_INT_EN_WDG (1<<29)
354#define NETX_DPMAS_INT_EN_PIO72 (1<<28)
355#define NETX_DPMAS_INT_EN_PIO47 (1<<27)
356#define NETX_DPMAS_INT_EN_PIO40 (1<<26)
357#define NETX_DPMAS_INT_EN_PIO36 (1<<25)
358#define NETX_DPMAS_INT_EN_PIO35 (1<<24)
359
360#define NETX_DPMAS_IF_CONF0_HIF_DISABLED (0<<28)
361#define NETX_DPMAS_IF_CONF0_HIF_EXT_BUS (1<<28)
362#define NETX_DPMAS_IF_CONF0_HIF_UP_8BIT (2<<28)
363#define NETX_DPMAS_IF_CONF0_HIF_UP_16BIT (3<<28)
364#define NETX_DPMAS_IF_CONF0_HIF_IO (4<<28)
365#define NETX_DPMAS_IF_CONF0_WAIT_DRV_PP (1<<14)
366#define NETX_DPMAS_IF_CONF0_WAIT_DRV_OD (2<<14)
367#define NETX_DPMAS_IF_CONF0_WAIT_DRV_TRI (3<<14)
368
369#define NETX_DPMAS_IF_CONF1_IRQ_POL_PIO35 (1<<26)
370#define NETX_DPMAS_IF_CONF1_IRQ_POL_PIO36 (1<<27)
371#define NETX_DPMAS_IF_CONF1_IRQ_POL_PIO40 (1<<28)
372#define NETX_DPMAS_IF_CONF1_IRQ_POL_PIO47 (1<<29)
373#define NETX_DPMAS_IF_CONF1_IRQ_POL_PIO72 (1<<30)
374
375#define NETX_EXT_CONFIG_TALEWIDTH(x) (((x) & 0x7) << 29)
376#define NETX_EXT_CONFIG_TADRHOLD(x) (((x) & 0x7) << 26)
377#define NETX_EXT_CONFIG_TCSON(x) (((x) & 0x7) << 23)
378#define NETX_EXT_CONFIG_TRDON(x) (((x) & 0x7) << 20)
379#define NETX_EXT_CONFIG_TWRON(x) (((x) & 0x7) << 17)
380#define NETX_EXT_CONFIG_TWROFF(x) (((x) & 0x1f) << 12)
381#define NETX_EXT_CONFIG_TRDWRCYC(x) (((x) & 0x1f) << 7)
382#define NETX_EXT_CONFIG_WAIT_POL (1<<6)
383#define NETX_EXT_CONFIG_WAIT_EN (1<<5)
384#define NETX_EXT_CONFIG_NRD_MODE (1<<4)
385#define NETX_EXT_CONFIG_DS_MODE (1<<3)
386#define NETX_EXT_CONFIG_NWR_MODE (1<<2)
387#define NETX_EXT_CONFIG_16BIT (1<<1)
388#define NETX_EXT_CONFIG_CS_ENABLE (1<<0)
389
390#define NETX_DPMAS_IO_MODE0_WRL (1<<13)
391#define NETX_DPMAS_IO_MODE0_WAIT (1<<14)
392#define NETX_DPMAS_IO_MODE0_READY (1<<15)
393#define NETX_DPMAS_IO_MODE0_CS0 (1<<19)
394#define NETX_DPMAS_IO_MODE0_EXTRD (1<<20)
395
396#define NETX_DPMAS_IO_MODE1_CS2 (1<<15)
397#define NETX_DPMAS_IO_MODE1_CS1 (1<<16)
398#define NETX_DPMAS_IO_MODE1_SAMPLE_NPOR (0<<30)
399#define NETX_DPMAS_IO_MODE1_SAMPLE_100MHZ (1<<30)
400#define NETX_DPMAS_IO_MODE1_SAMPLE_NPIO36 (2<<30)
401#define NETX_DPMAS_IO_MODE1_SAMPLE_PIO36 (3<<30)
402
403/*******************************
404 * I2C *
405 *******************************/
406#define NETX_I2C_REG(ofs) __io(NETX_VA_I2C, (ofs))
407#define NETX_I2C_CTRL NETX_I2C_REG(0x0)
408#define NETX_I2C_DATA NETX_I2C_REG(0x4)
409
410#endif /* __ASM_ARCH_NETX_REGS_H */
diff --git a/arch/arm/mach-netx/include/mach/param.h b/arch/arm/mach-netx/include/mach/param.h
new file mode 100644
index 000000000000..a771459206aa
--- /dev/null
+++ b/arch/arm/mach-netx/include/mach/param.h
@@ -0,0 +1,18 @@
1/*
2 * arch/arm/mach-netx/include/mach/param.h
3 *
4 * Copyright (C) 2005 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2
8 * as published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */
diff --git a/arch/arm/mach-netx/include/mach/pfifo.h b/arch/arm/mach-netx/include/mach/pfifo.h
new file mode 100644
index 000000000000..42c59068f8d8
--- /dev/null
+++ b/arch/arm/mach-netx/include/mach/pfifo.h
@@ -0,0 +1,54 @@
1/*
2 * arch/arm/mach-netx/include/mach/pfifo.h
3 *
4 * Copyright (c) 2005 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2
8 * as published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */
19
20
21#ifndef ASM_ARCH_PFIFO_H
22#define ASM_ARCH_PFIFO_H
23
24static inline int pfifo_push(int no, unsigned int pointer)
25{
26 writel(pointer, NETX_PFIFO_BASE(no));
27 return 0;
28}
29
30static inline unsigned int pfifo_pop(int no)
31{
32 return readl(NETX_PFIFO_BASE(no));
33}
34
35static inline int pfifo_fill_level(int no)
36{
37
38 return readl(NETX_PFIFO_FILL_LEVEL(no));
39}
40
41static inline int pfifo_full(int no)
42{
43 return readl(NETX_PFIFO_FULL) & (1<<no) ? 1 : 0;
44}
45
46static inline int pfifo_empty(int no)
47{
48 return readl(NETX_PFIFO_EMPTY) & (1<<no) ? 1 : 0;
49}
50
51int pfifo_request(unsigned int pfifo_mask);
52void pfifo_free(unsigned int pfifo_mask);
53
54#endif /* ASM_ARCH_PFIFO_H */
diff --git a/arch/arm/mach-netx/include/mach/system.h b/arch/arm/mach-netx/include/mach/system.h
new file mode 100644
index 000000000000..27d8ef8e8e29
--- /dev/null
+++ b/arch/arm/mach-netx/include/mach/system.h
@@ -0,0 +1,38 @@
1/*
2 * arch/arm/mach-netx/include/mach/system.h
3 *
4 * Copyright (C) 2005 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2
8 * as published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */
19#ifndef __ASM_ARCH_SYSTEM_H
20#define __ASM_ARCH_SYSTEM_H
21
22#include <asm/io.h>
23#include <mach/hardware.h>
24#include "netx-regs.h"
25
26static inline void arch_idle(void)
27{
28 cpu_do_idle();
29}
30
31static inline void arch_reset(char mode)
32{
33 writel(NETX_SYSTEM_RES_CR_FIRMW_RES_EN | NETX_SYSTEM_RES_CR_FIRMW_RES,
34 NETX_SYSTEM_RES_CR);
35}
36
37#endif
38
diff --git a/arch/arm/mach-netx/include/mach/timex.h b/arch/arm/mach-netx/include/mach/timex.h
new file mode 100644
index 000000000000..1120dd0ba393
--- /dev/null
+++ b/arch/arm/mach-netx/include/mach/timex.h
@@ -0,0 +1,20 @@
1/*
2 * arch/arm/mach-netx/include/mach/timex.h
3 *
4 * Copyright (C) 2005 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2
8 * as published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */
19
20#define CLOCK_TICK_RATE 100000000
diff --git a/arch/arm/mach-netx/include/mach/uncompress.h b/arch/arm/mach-netx/include/mach/uncompress.h
new file mode 100644
index 000000000000..84f91284f612
--- /dev/null
+++ b/arch/arm/mach-netx/include/mach/uncompress.h
@@ -0,0 +1,76 @@
1/*
2 * arch/arm/mach-netx/include/mach/uncompress.h
3 *
4 * Copyright (C) 2005 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2
8 * as published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */
19
20/*
21 * The following code assumes the serial port has already been
22 * initialized by the bootloader. We search for the first enabled
23 * port in the most probable order. If you didn't setup a port in
24 * your bootloader then nothing will appear (which might be desired).
25 *
26 * This does not append a newline
27 */
28
29#define REG(x) (*(volatile unsigned long *)(x))
30
31#define UART1_BASE 0x100a00
32#define UART2_BASE 0x100a80
33
34#define UART_DR 0x0
35
36#define UART_CR 0x14
37#define CR_UART_EN (1<<0)
38
39#define UART_FR 0x18
40#define FR_BUSY (1<<3)
41#define FR_TXFF (1<<5)
42
43static void putc(char c)
44{
45 unsigned long base;
46
47 if (REG(UART1_BASE + UART_CR) & CR_UART_EN)
48 base = UART1_BASE;
49 else if (REG(UART2_BASE + UART_CR) & CR_UART_EN)
50 base = UART2_BASE;
51 else
52 return;
53
54 while (REG(base + UART_FR) & FR_TXFF);
55 REG(base + UART_DR) = c;
56}
57
58static inline void flush(void)
59{
60 unsigned long base;
61
62 if (REG(UART1_BASE + UART_CR) & CR_UART_EN)
63 base = UART1_BASE;
64 else if (REG(UART2_BASE + UART_CR) & CR_UART_EN)
65 base = UART2_BASE;
66 else
67 return;
68
69 while (REG(base + UART_FR) & FR_BUSY);
70}
71
72/*
73 * nothing to do
74 */
75#define arch_decomp_setup()
76#define arch_decomp_wdog()
diff --git a/arch/arm/mach-netx/include/mach/vmalloc.h b/arch/arm/mach-netx/include/mach/vmalloc.h
new file mode 100644
index 000000000000..25d5cc676e0f
--- /dev/null
+++ b/arch/arm/mach-netx/include/mach/vmalloc.h
@@ -0,0 +1,19 @@
1/*
2 * arch/arm/mach-netx/include/mach/vmalloc.h
3 *
4 * Copyright (C) 2005 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2
8 * as published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */
19#define VMALLOC_END (PAGE_OFFSET + 0x10000000)
diff --git a/arch/arm/mach-netx/include/mach/xc.h b/arch/arm/mach-netx/include/mach/xc.h
new file mode 100644
index 000000000000..0c0011d4fc2d
--- /dev/null
+++ b/arch/arm/mach-netx/include/mach/xc.h
@@ -0,0 +1,42 @@
1/*
2 * arch/arm/mach-netx/include/mach/xc.h
3 *
4 * Copyright (C) 2005 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2
8 * as published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */
19
20#ifndef __ASM_ARCH_XC_H
21#define __ASM_ARCH_XC_H
22
23struct xc {
24 int no;
25 unsigned int type;
26 unsigned int version;
27 void __iomem *xpec_base;
28 void __iomem *xmac_base;
29 void __iomem *sram_base;
30 int irq;
31 struct device *dev;
32};
33
34int xc_reset(struct xc *x);
35int xc_stop(struct xc* x);
36int xc_start(struct xc *x);
37int xc_running(struct xc *x);
38int xc_request_firmware(struct xc* x);
39struct xc* request_xc(int xcno, struct device *dev);
40void free_xc(struct xc *x);
41
42#endif /* __ASM_ARCH_XC_H */
diff --git a/arch/arm/mach-netx/nxdb500.c b/arch/arm/mach-netx/nxdb500.c
index e4a133d62846..c9b174bc8ccf 100644
--- a/arch/arm/mach-netx/nxdb500.c
+++ b/arch/arm/mach-netx/nxdb500.c
@@ -25,11 +25,11 @@
25#include <linux/amba/bus.h> 25#include <linux/amba/bus.h>
26#include <linux/amba/clcd.h> 26#include <linux/amba/clcd.h>
27 27
28#include <asm/hardware.h> 28#include <mach/hardware.h>
29#include <asm/mach-types.h> 29#include <asm/mach-types.h>
30#include <asm/mach/arch.h> 30#include <asm/mach/arch.h>
31#include <asm/arch/netx-regs.h> 31#include <mach/netx-regs.h>
32#include <asm/arch/eth.h> 32#include <mach/eth.h>
33 33
34#include "generic.h" 34#include "generic.h"
35#include "fb.h" 35#include "fb.h"
diff --git a/arch/arm/mach-netx/nxdkn.c b/arch/arm/mach-netx/nxdkn.c
index 7e26c42d1ac7..15b54c62d60f 100644
--- a/arch/arm/mach-netx/nxdkn.c
+++ b/arch/arm/mach-netx/nxdkn.c
@@ -25,11 +25,11 @@
25#include <linux/amba/bus.h> 25#include <linux/amba/bus.h>
26#include <linux/amba/clcd.h> 26#include <linux/amba/clcd.h>
27 27
28#include <asm/hardware.h> 28#include <mach/hardware.h>
29#include <asm/mach-types.h> 29#include <asm/mach-types.h>
30#include <asm/mach/arch.h> 30#include <asm/mach/arch.h>
31#include <asm/arch/netx-regs.h> 31#include <mach/netx-regs.h>
32#include <asm/arch/eth.h> 32#include <mach/eth.h>
33 33
34#include "generic.h" 34#include "generic.h"
35 35
diff --git a/arch/arm/mach-netx/nxeb500hmi.c b/arch/arm/mach-netx/nxeb500hmi.c
index 53e10a9849f9..1061c01ff679 100644
--- a/arch/arm/mach-netx/nxeb500hmi.c
+++ b/arch/arm/mach-netx/nxeb500hmi.c
@@ -25,11 +25,11 @@
25#include <linux/amba/bus.h> 25#include <linux/amba/bus.h>
26#include <linux/amba/clcd.h> 26#include <linux/amba/clcd.h>
27 27
28#include <asm/hardware.h> 28#include <mach/hardware.h>
29#include <asm/mach-types.h> 29#include <asm/mach-types.h>
30#include <asm/mach/arch.h> 30#include <asm/mach/arch.h>
31#include <asm/arch/netx-regs.h> 31#include <mach/netx-regs.h>
32#include <asm/arch/eth.h> 32#include <mach/eth.h>
33 33
34#include "generic.h" 34#include "generic.h"
35#include "fb.h" 35#include "fb.h"
diff --git a/arch/arm/mach-netx/pfifo.c b/arch/arm/mach-netx/pfifo.c
index 44dea61a9de4..19ae0a72bea3 100644
--- a/arch/arm/mach-netx/pfifo.c
+++ b/arch/arm/mach-netx/pfifo.c
@@ -22,9 +22,9 @@
22#include <linux/mutex.h> 22#include <linux/mutex.h>
23 23
24#include <asm/io.h> 24#include <asm/io.h>
25#include <asm/hardware.h> 25#include <mach/hardware.h>
26#include <asm/arch/netx-regs.h> 26#include <mach/netx-regs.h>
27#include <asm/arch/pfifo.h> 27#include <mach/pfifo.h>
28 28
29static DEFINE_MUTEX(pfifo_lock); 29static DEFINE_MUTEX(pfifo_lock);
30 30
diff --git a/arch/arm/mach-netx/time.c b/arch/arm/mach-netx/time.c
index ea07b54afa59..ac8e5bfed691 100644
--- a/arch/arm/mach-netx/time.c
+++ b/arch/arm/mach-netx/time.c
@@ -22,10 +22,10 @@
22#include <linux/irq.h> 22#include <linux/irq.h>
23#include <linux/clocksource.h> 23#include <linux/clocksource.h>
24 24
25#include <asm/hardware.h> 25#include <mach/hardware.h>
26#include <asm/io.h> 26#include <asm/io.h>
27#include <asm/mach/time.h> 27#include <asm/mach/time.h>
28#include <asm/arch/netx-regs.h> 28#include <mach/netx-regs.h>
29 29
30/* 30/*
31 * IRQ handler for the timer 31 * IRQ handler for the timer
diff --git a/arch/arm/mach-netx/xc.c b/arch/arm/mach-netx/xc.c
index ca9c5b61283a..04c34e82fe6d 100644
--- a/arch/arm/mach-netx/xc.c
+++ b/arch/arm/mach-netx/xc.c
@@ -23,10 +23,10 @@
23#include <linux/mutex.h> 23#include <linux/mutex.h>
24 24
25#include <asm/io.h> 25#include <asm/io.h>
26#include <asm/hardware.h> 26#include <mach/hardware.h>
27#include <asm/arch/netx-regs.h> 27#include <mach/netx-regs.h>
28 28
29#include <asm/arch/xc.h> 29#include <mach/xc.h>
30 30
31static DEFINE_MUTEX(xc_lock); 31static DEFINE_MUTEX(xc_lock);
32 32
diff --git a/arch/arm/mach-ns9xxx/board-a9m9750dev.c b/arch/arm/mach-ns9xxx/board-a9m9750dev.c
index 46b4f5a2e7f4..a22a608a7aba 100644
--- a/arch/arm/mach-ns9xxx/board-a9m9750dev.c
+++ b/arch/arm/mach-ns9xxx/board-a9m9750dev.c
@@ -13,12 +13,12 @@
13#include <asm/mach/map.h> 13#include <asm/mach/map.h>
14#include <asm/gpio.h> 14#include <asm/gpio.h>
15 15
16#include <asm/arch/board.h> 16#include <mach/board.h>
17#include <asm/arch/processor-ns9360.h> 17#include <mach/processor-ns9360.h>
18#include <asm/arch/regs-sys-ns9360.h> 18#include <mach/regs-sys-ns9360.h>
19#include <asm/arch/regs-mem.h> 19#include <mach/regs-mem.h>
20#include <asm/arch/regs-bbu.h> 20#include <mach/regs-bbu.h>
21#include <asm/arch/regs-board-a9m9750dev.h> 21#include <mach/regs-board-a9m9750dev.h>
22 22
23#include "board-a9m9750dev.h" 23#include "board-a9m9750dev.h"
24 24
diff --git a/arch/arm/mach-ns9xxx/gpio-ns9360.c b/arch/arm/mach-ns9xxx/gpio-ns9360.c
index 7bc05a4b45b8..377330c1b250 100644
--- a/arch/arm/mach-ns9xxx/gpio-ns9360.c
+++ b/arch/arm/mach-ns9xxx/gpio-ns9360.c
@@ -14,8 +14,8 @@
14#include <linux/kernel.h> 14#include <linux/kernel.h>
15#include <linux/module.h> 15#include <linux/module.h>
16 16
17#include <asm/arch/regs-bbu.h> 17#include <mach/regs-bbu.h>
18#include <asm/arch/processor-ns9360.h> 18#include <mach/processor-ns9360.h>
19 19
20#include "gpio-ns9360.h" 20#include "gpio-ns9360.h"
21 21
diff --git a/arch/arm/mach-ns9xxx/gpio.c b/arch/arm/mach-ns9xxx/gpio.c
index ed4c83389d4a..804c30075960 100644
--- a/arch/arm/mach-ns9xxx/gpio.c
+++ b/arch/arm/mach-ns9xxx/gpio.c
@@ -13,9 +13,9 @@
13#include <linux/spinlock.h> 13#include <linux/spinlock.h>
14#include <linux/module.h> 14#include <linux/module.h>
15 15
16#include <asm/arch/gpio.h> 16#include <mach/gpio.h>
17#include <asm/arch/processor.h> 17#include <mach/processor.h>
18#include <asm/arch/processor-ns9360.h> 18#include <mach/processor-ns9360.h>
19#include <asm/bug.h> 19#include <asm/bug.h>
20#include <asm/types.h> 20#include <asm/types.h>
21#include <asm/bitops.h> 21#include <asm/bitops.h>
diff --git a/arch/arm/mach-ns9xxx/include/mach/board.h b/arch/arm/mach-ns9xxx/include/mach/board.h
new file mode 100644
index 000000000000..f7e9196eb9ab
--- /dev/null
+++ b/arch/arm/mach-ns9xxx/include/mach/board.h
@@ -0,0 +1,42 @@
1/*
2 * arch/arm/mach-ns9xxx/include/mach/board.h
3 *
4 * Copyright (C) 2006,2007 by Digi International Inc.
5 * All rights reserved.
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License version 2 as published by
9 * the Free Software Foundation.
10 */
11#ifndef __ASM_ARCH_BOARD_H
12#define __ASM_ARCH_BOARD_H
13
14#include <asm/mach-types.h>
15
16#define board_is_a9m9750dev() (0 \
17 || machine_is_cc9p9360dev() \
18 || machine_is_cc9p9750dev() \
19 )
20
21#define board_is_a9mvali() (0 \
22 || machine_is_cc9p9360val() \
23 || machine_is_cc9p9750val() \
24 )
25
26#define board_is_jscc9p9210() (0 \
27 || machine_is_cc9p9210js() \
28 )
29
30#define board_is_jscc9p9215() (0 \
31 || machine_is_cc9p9215js() \
32 )
33
34#define board_is_jscc9p9360() (0 \
35 || machine_is_cc9p9360js() \
36 )
37
38#define board_is_uncbas() (0 \
39 || machine_is_cc7ucamry() \
40 )
41
42#endif /* ifndef __ASM_ARCH_BOARD_H */
diff --git a/arch/arm/mach-ns9xxx/include/mach/debug-macro.S b/arch/arm/mach-ns9xxx/include/mach/debug-macro.S
new file mode 100644
index 000000000000..c9530fba00aa
--- /dev/null
+++ b/arch/arm/mach-ns9xxx/include/mach/debug-macro.S
@@ -0,0 +1,22 @@
1/*
2 * arch/arm/mach-ns9xxx/include/mach/debug-macro.S
3 * Copyright (C) 2006 by Digi International Inc.
4 * All rights reserved.
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License version 2 as published by
8 * the Free Software Foundation.
9 */
10#include <mach/hardware.h>
11
12#include <mach/regs-board-a9m9750dev.h>
13
14 .macro addruart,rx
15 mrc p15, 0, \rx, c1, c0
16 tst \rx, #1
17 ldreq \rx, =NS9XXX_CSxSTAT_PHYS(0)
18 ldrne \rx, =io_p2v(NS9XXX_CSxSTAT_PHYS(0))
19 .endm
20
21#define UART_SHIFT 2
22#include <asm/hardware/debug-8250.S>
diff --git a/arch/arm/mach-ns9xxx/include/mach/dma.h b/arch/arm/mach-ns9xxx/include/mach/dma.h
new file mode 100644
index 000000000000..3f50d8c9e5c7
--- /dev/null
+++ b/arch/arm/mach-ns9xxx/include/mach/dma.h
@@ -0,0 +1,14 @@
1/*
2 * arch/arm/mach-ns9xxx/include/mach/dma.h
3 *
4 * Copyright (C) 2006 by Digi International Inc.
5 * All rights reserved.
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License version 2 as published by
9 * the Free Software Foundation.
10 */
11#ifndef __ASM_ARCH_DMA_H
12#define __ASM_ARCH_DMA_H
13
14#endif /* ifndef __ASM_ARCH_DMA_H */
diff --git a/arch/arm/mach-ns9xxx/include/mach/entry-macro.S b/arch/arm/mach-ns9xxx/include/mach/entry-macro.S
new file mode 100644
index 000000000000..71ca0319b547
--- /dev/null
+++ b/arch/arm/mach-ns9xxx/include/mach/entry-macro.S
@@ -0,0 +1,28 @@
1/*
2 * arch/arm/mach-ns9xxx/include/mach/entry-macro.S
3 *
4 * Copyright (C) 2006,2007 by Digi International Inc.
5 * All rights reserved.
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License version 2 as published by
9 * the Free Software Foundation.
10 */
11#include <mach/hardware.h>
12#include <mach/regs-sys-common.h>
13
14 .macro get_irqnr_preamble, base, tmp
15 ldr \base, =SYS_ISRADDR
16 .endm
17
18 .macro arch_ret_to_user, tmp1, tmp2
19 .endm
20
21 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
22 ldr \irqstat, [\base, #(SYS_ISA - SYS_ISRADDR)]
23 cmp \irqstat, #0
24 ldrne \irqnr, [\base]
25 .endm
26
27 .macro disable_fiq
28 .endm
diff --git a/arch/arm/mach-ns9xxx/include/mach/gpio.h b/arch/arm/mach-ns9xxx/include/mach/gpio.h
new file mode 100644
index 000000000000..5eb349032579
--- /dev/null
+++ b/arch/arm/mach-ns9xxx/include/mach/gpio.h
@@ -0,0 +1,47 @@
1/*
2 * arch/arm/mach-ns9xxx/include/mach/gpio.h
3 *
4 * Copyright (C) 2007 by Digi International Inc.
5 * All rights reserved.
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License version 2 as published by
9 * the Free Software Foundation.
10*/
11#ifndef __ASM_ARCH_GPIO_H
12#define __ASM_ARCH_GPIO_H
13
14#include <asm/errno.h>
15
16int gpio_request(unsigned gpio, const char *label);
17
18void gpio_free(unsigned gpio);
19
20int ns9xxx_gpio_configure(unsigned gpio, int inv, int func);
21
22int gpio_direction_input(unsigned gpio);
23
24int gpio_direction_output(unsigned gpio, int value);
25
26int gpio_get_value(unsigned gpio);
27
28void gpio_set_value(unsigned gpio, int value);
29
30/*
31 * ns9xxx can use gpio pins to trigger an irq, but it's not generic
32 * enough to be supported by the gpio_to_irq/irq_to_gpio interface
33 */
34static inline int gpio_to_irq(unsigned gpio)
35{
36 return -EINVAL;
37}
38
39static inline int irq_to_gpio(unsigned irq)
40{
41 return -EINVAL;
42}
43
44/* get the cansleep() stubs */
45#include <asm-generic/gpio.h>
46
47#endif /* ifndef __ASM_ARCH_GPIO_H */
diff --git a/arch/arm/mach-ns9xxx/include/mach/hardware.h b/arch/arm/mach-ns9xxx/include/mach/hardware.h
new file mode 100644
index 000000000000..6dbb2030f563
--- /dev/null
+++ b/arch/arm/mach-ns9xxx/include/mach/hardware.h
@@ -0,0 +1,79 @@
1/*
2 * arch/arm/mach-ns9xxx/include/mach/hardware.h
3 *
4 * Copyright (C) 2006 by Digi International Inc.
5 * All rights reserved.
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License version 2 as published by
9 * the Free Software Foundation.
10 */
11#ifndef __ASM_ARCH_HARDWARE_H
12#define __ASM_ARCH_HARDWARE_H
13
14#include <asm/memory.h>
15
16/*
17 * NetSilicon NS9xxx internal mapping:
18 *
19 * physical <--> virtual
20 * 0x90000000 - 0x906fffff <--> 0xf9000000 - 0xf96fffff
21 * 0xa0100000 - 0xa0afffff <--> 0xfa100000 - 0xfaafffff
22 */
23#define io_p2v(x) (0xf0000000 \
24 + (((x) & 0xf0000000) >> 4) \
25 + ((x) & 0x00ffffff))
26
27#define io_v2p(x) ((((x) & 0x0f000000) << 4) \
28 + ((x) & 0x00ffffff))
29
30#define __REGSHIFT(mask) ((mask) & (-(mask)))
31
32#define __REGBIT(bit) ((u32)1 << (bit))
33#define __REGBITS(hbit, lbit) ((((u32)1 << ((hbit) - (lbit) + 1)) - 1) << (lbit))
34#define __REGVAL(mask, value) (((value) * __REGSHIFT(mask)) & (mask))
35
36#ifndef __ASSEMBLY__
37
38# define __REG(x) ((void __iomem __force *)io_p2v((x)))
39# define __REG2(x, y) ((void __iomem __force *)(io_p2v((x)) + 4 * (y)))
40
41# define __REGSET(var, field, value) \
42 ((var) = (((var) & ~((field) & ~(value))) | (value)))
43
44# define REGSET(var, reg, field, value) \
45 __REGSET(var, reg ## _ ## field, reg ## _ ## field ## _ ## value)
46
47# define REGSET_IDX(var, reg, field, idx, value) \
48 __REGSET(var, reg ## _ ## field((idx)), reg ## _ ## field ## _ ## value((idx)))
49
50# define REGSETIM(var, reg, field, value) \
51 __REGSET(var, reg ## _ ## field, __REGVAL(reg ## _ ## field, (value)))
52
53# define REGSETIM_IDX(var, reg, field, idx, value) \
54 __REGSET(var, reg ## _ ## field((idx)), __REGVAL(reg ## _ ## field((idx)), (value)))
55
56# define __REGGET(var, field) \
57 (((var) & (field)))
58
59# define REGGET(var, reg, field) \
60 __REGGET(var, reg ## _ ## field)
61
62# define REGGET_IDX(var, reg, field, idx) \
63 __REGGET(var, reg ## _ ## field((idx)))
64
65# define REGGETIM(var, reg, field) \
66 __REGGET(var, reg ## _ ## field) / __REGSHIFT(reg ## _ ## field)
67
68# define REGGETIM_IDX(var, reg, field, idx) \
69 __REGGET(var, reg ## _ ## field((idx))) / \
70 __REGSHIFT(reg ## _ ## field((idx)))
71
72#else
73
74# define __REG(x) io_p2v(x)
75# define __REG2(x, y) io_p2v((x) + 4 * (y))
76
77#endif
78
79#endif /* ifndef __ASM_ARCH_HARDWARE_H */
diff --git a/arch/arm/mach-ns9xxx/include/mach/io.h b/arch/arm/mach-ns9xxx/include/mach/io.h
new file mode 100644
index 000000000000..027bf649645a
--- /dev/null
+++ b/arch/arm/mach-ns9xxx/include/mach/io.h
@@ -0,0 +1,20 @@
1/*
2 * arch/arm/mach-ns9xxx/include/mach/io.h
3 *
4 * Copyright (C) 2006 by Digi International Inc.
5 * All rights reserved.
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License version 2 as published by
9 * the Free Software Foundation.
10 */
11#ifndef __ASM_ARCH_IO_H
12#define __ASM_ARCH_IO_H
13
14#define IO_SPACE_LIMIT 0xffffffff /* XXX */
15
16#define __io(a) ((void __iomem *)(a))
17#define __mem_pci(a) (a)
18#define __mem_isa(a) (IO_BASE + (a))
19
20#endif /* ifndef __ASM_ARCH_IO_H */
diff --git a/arch/arm/mach-ns9xxx/include/mach/irqs.h b/arch/arm/mach-ns9xxx/include/mach/irqs.h
new file mode 100644
index 000000000000..13483949e210
--- /dev/null
+++ b/arch/arm/mach-ns9xxx/include/mach/irqs.h
@@ -0,0 +1,86 @@
1/*
2 * arch/arm/mach-ns9xxx/include/mach/irqs.h
3 *
4 * Copyright (C) 2006,2007 by Digi International Inc.
5 * All rights reserved.
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License version 2 as published by
9 * the Free Software Foundation.
10 */
11#ifndef __ASM_ARCH_IRQS_H
12#define __ASM_ARCH_IRQS_H
13
14/* NetSilicon 9360 */
15#define IRQ_NS9XXX_WATCHDOG 0
16#define IRQ_NS9XXX_AHBBUSERR 1
17#define IRQ_NS9360_BBUSAGG 2
18/* irq 3 is reserved for NS9360 */
19#define IRQ_NS9XXX_ETHRX 4
20#define IRQ_NS9XXX_ETHTX 5
21#define IRQ_NS9XXX_ETHPHY 6
22#define IRQ_NS9360_LCD 7
23#define IRQ_NS9360_SERBRX 8
24#define IRQ_NS9360_SERBTX 9
25#define IRQ_NS9360_SERARX 10
26#define IRQ_NS9360_SERATX 11
27#define IRQ_NS9360_SERCRX 12
28#define IRQ_NS9360_SERCTX 13
29#define IRQ_NS9360_I2C 14
30#define IRQ_NS9360_BBUSDMA 15
31#define IRQ_NS9360_TIMER0 16
32#define IRQ_NS9360_TIMER1 17
33#define IRQ_NS9360_TIMER2 18
34#define IRQ_NS9360_TIMER3 19
35#define IRQ_NS9360_TIMER4 20
36#define IRQ_NS9360_TIMER5 21
37#define IRQ_NS9360_TIMER6 22
38#define IRQ_NS9360_TIMER7 23
39#define IRQ_NS9360_RTC 24
40#define IRQ_NS9360_USBHOST 25
41#define IRQ_NS9360_USBDEVICE 26
42#define IRQ_NS9360_IEEE1284 27
43#define IRQ_NS9XXX_EXT0 28
44#define IRQ_NS9XXX_EXT1 29
45#define IRQ_NS9XXX_EXT2 30
46#define IRQ_NS9XXX_EXT3 31
47
48#define BBUS_IRQ(irq) (32 + irq)
49
50#define IRQ_BBUS_DMA BBUS_IRQ(0)
51#define IRQ_BBUS_SERBRX BBUS_IRQ(2)
52#define IRQ_BBUS_SERBTX BBUS_IRQ(3)
53#define IRQ_BBUS_SERARX BBUS_IRQ(4)
54#define IRQ_BBUS_SERATX BBUS_IRQ(5)
55#define IRQ_BBUS_SERCRX BBUS_IRQ(6)
56#define IRQ_BBUS_SERCTX BBUS_IRQ(7)
57#define IRQ_BBUS_SERDRX BBUS_IRQ(8)
58#define IRQ_BBUS_SERDTX BBUS_IRQ(9)
59#define IRQ_BBUS_I2C BBUS_IRQ(10)
60#define IRQ_BBUS_1284 BBUS_IRQ(11)
61#define IRQ_BBUS_UTIL BBUS_IRQ(12)
62#define IRQ_BBUS_RTC BBUS_IRQ(13)
63#define IRQ_BBUS_USBHST BBUS_IRQ(14)
64#define IRQ_BBUS_USBDEV BBUS_IRQ(15)
65#define IRQ_BBUS_AHBDMA1 BBUS_IRQ(24)
66#define IRQ_BBUS_AHBDMA2 BBUS_IRQ(25)
67
68/*
69 * these Interrupts are specific for the a9m9750dev board.
70 * They are generated by an FPGA that interrupts the CPU on
71 * IRQ_NS9360_EXT2
72 */
73#define FPGA_IRQ(irq) (64 + irq)
74
75#define IRQ_FPGA_UARTA FPGA_IRQ(0)
76#define IRQ_FPGA_UARTB FPGA_IRQ(1)
77#define IRQ_FPGA_UARTC FPGA_IRQ(2)
78#define IRQ_FPGA_UARTD FPGA_IRQ(3)
79#define IRQ_FPGA_TOUCH FPGA_IRQ(4)
80#define IRQ_FPGA_CF FPGA_IRQ(5)
81#define IRQ_FPGA_CAN0 FPGA_IRQ(6)
82#define IRQ_FPGA_CAN1 FPGA_IRQ(7)
83
84#define NR_IRQS 72
85
86#endif /* __ASM_ARCH_IRQS_H */
diff --git a/arch/arm/mach-ns9xxx/include/mach/memory.h b/arch/arm/mach-ns9xxx/include/mach/memory.h
new file mode 100644
index 000000000000..649ee6235b94
--- /dev/null
+++ b/arch/arm/mach-ns9xxx/include/mach/memory.h
@@ -0,0 +1,27 @@
1/*
2 * arch/arm/mach-ns9xxx/include/mach/memory.h
3 *
4 * Copyright (C) 2006 by Digi International Inc.
5 * All rights reserved.
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License version 2 as published by
9 * the Free Software Foundation.
10*/
11#ifndef __ASM_ARCH_MEMORY_H
12#define __ASM_ARCH_MEMORY_H
13
14/* x in [0..3] */
15#define NS9XXX_CSxSTAT_PHYS(x) UL(((x) + 4) << 28)
16
17#define NS9XXX_CS0STAT_LENGTH UL(0x1000)
18#define NS9XXX_CS1STAT_LENGTH UL(0x1000)
19#define NS9XXX_CS2STAT_LENGTH UL(0x1000)
20#define NS9XXX_CS3STAT_LENGTH UL(0x1000)
21
22#define PHYS_OFFSET UL(0x00000000)
23
24#define __virt_to_bus(x) __virt_to_phys(x)
25#define __bus_to_virt(x) __phys_to_virt(x)
26
27#endif
diff --git a/arch/arm/mach-ns9xxx/include/mach/module.h b/arch/arm/mach-ns9xxx/include/mach/module.h
new file mode 100644
index 000000000000..f851a6b7da6c
--- /dev/null
+++ b/arch/arm/mach-ns9xxx/include/mach/module.h
@@ -0,0 +1,60 @@
1/*
2 * arch/arm/mach-ns9xxx/include/mach/module.h
3 *
4 * Copyright (C) 2007 by Digi International Inc.
5 * All rights reserved.
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License version 2 as published by
9 * the Free Software Foundation.
10 */
11#ifndef __ASM_ARCH_MODULE_H
12#define __ASM_ARCH_MODULE_H
13
14#include <asm/mach-types.h>
15
16#define module_is_cc7ucamry() (0 \
17 || machine_is_cc7ucamry() \
18 )
19
20#define module_is_cc9c() (0 \
21 || machine_is_cc9c() \
22 )
23
24#define module_is_cc9p9210() (0 \
25 || machine_is_cc9p9210() \
26 || machine_is_cc9p9210js() \
27 )
28
29#define module_is_cc9p9215() (0 \
30 || machine_is_cc9p9215() \
31 || machine_is_cc9p9215js() \
32 )
33
34#define module_is_cc9p9360() (0 \
35 || machine_is_a9m9360() \
36 || machine_is_cc9p9360dev() \
37 || machine_is_cc9p9360js() \
38 || machine_is_cc9p9360val() \
39 )
40
41#define module_is_cc9p9750() (0 \
42 || machine_is_a9m9750() \
43 || machine_is_cc9p9750dev() \
44 || machine_is_cc9p9750js() \
45 || machine_is_cc9p9750val() \
46 )
47
48#define module_is_ccw9c() (0 \
49 || machine_is_ccw9c() \
50 )
51
52#define module_is_inc20otter() (0 \
53 || machine_is_inc20otter() \
54 )
55
56#define module_is_otter() (0 \
57 || machine_is_otter() \
58 )
59
60#endif /* ifndef __ASM_ARCH_MODULE_H */
diff --git a/arch/arm/mach-ns9xxx/include/mach/processor-ns9360.h b/arch/arm/mach-ns9xxx/include/mach/processor-ns9360.h
new file mode 100644
index 000000000000..f41deda5129e
--- /dev/null
+++ b/arch/arm/mach-ns9xxx/include/mach/processor-ns9360.h
@@ -0,0 +1,32 @@
1/*
2 * arch/arm/mach-ns9xxx/include/mach/processor-ns9360.h
3 *
4 * Copyright (C) 2007 by Digi International Inc.
5 * All rights reserved.
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License version 2 as published by
9 * the Free Software Foundation.
10 */
11#ifndef __ASM_ARCH_PROCESSORNS9360_H
12#define __ASM_ARCH_PROCESSORNS9360_H
13
14#include <linux/init.h>
15
16void ns9360_reset(char mode);
17
18unsigned long ns9360_systemclock(void) __attribute__((const));
19
20static inline unsigned long ns9360_cpuclock(void) __attribute__((const));
21static inline unsigned long ns9360_cpuclock(void)
22{
23 return ns9360_systemclock() / 2;
24}
25
26void __init ns9360_map_io(void);
27
28extern struct sys_timer ns9360_timer;
29
30int ns9360_gpio_configure(unsigned gpio, int inv, int func);
31
32#endif /* ifndef __ASM_ARCH_PROCESSORNS9360_H */
diff --git a/arch/arm/mach-ns9xxx/include/mach/processor.h b/arch/arm/mach-ns9xxx/include/mach/processor.h
new file mode 100644
index 000000000000..9f77f746a386
--- /dev/null
+++ b/arch/arm/mach-ns9xxx/include/mach/processor.h
@@ -0,0 +1,42 @@
1/*
2 * arch/arm/mach-ns9xxx/include/mach/processor.h
3 *
4 * Copyright (C) 2006,2007 by Digi International Inc.
5 * All rights reserved.
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License version 2 as published by
9 * the Free Software Foundation.
10 */
11#ifndef __ASM_ARCH_PROCESSOR_H
12#define __ASM_ARCH_PROCESSOR_H
13
14#include <mach/module.h>
15
16#define processor_is_ns9210() (0 \
17 || module_is_cc7ucamry() \
18 || module_is_cc9p9210() \
19 || module_is_inc20otter() \
20 || module_is_otter() \
21 )
22
23#define processor_is_ns9215() (0 \
24 || module_is_cc9p9215() \
25 )
26
27#define processor_is_ns9360() (0 \
28 || module_is_cc9p9360() \
29 || module_is_cc9c() \
30 || module_is_ccw9c() \
31 )
32
33#define processor_is_ns9750() (0 \
34 || module_is_cc9p9750() \
35 )
36
37#define processor_is_ns921x() (0 \
38 || processor_is_ns9210() \
39 || processor_is_ns9215() \
40 )
41
42#endif /* ifndef __ASM_ARCH_PROCESSOR_H */
diff --git a/arch/arm/mach-ns9xxx/include/mach/regs-bbu.h b/arch/arm/mach-ns9xxx/include/mach/regs-bbu.h
new file mode 100644
index 000000000000..af227c058fb9
--- /dev/null
+++ b/arch/arm/mach-ns9xxx/include/mach/regs-bbu.h
@@ -0,0 +1,45 @@
1/*
2 * arch/arm/mach-ns9xxx/include/mach/regs-bbu.h
3 *
4 * Copyright (C) 2006 by Digi International Inc.
5 * All rights reserved.
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License version 2 as published by
9 * the Free Software Foundation.
10 */
11#ifndef __ASM_ARCH_REGSBBU_H
12#define __ASM_ARCH_REGSBBU_H
13
14#include <mach/hardware.h>
15
16/* BBus Utility */
17
18/* GPIO Configuration Registers block 1 */
19/* NOTE: the HRM starts counting at 1 for the GPIO registers, here the start is
20 * at 0 for each block. That is, BBU_GCONFb1(0) is GPIO Configuration Register
21 * #1, BBU_GCONFb2(0) is GPIO Configuration Register #8. */
22#define BBU_GCONFb1(x) __REG2(0x90600010, (x))
23#define BBU_GCONFb2(x) __REG2(0x90600100, (x))
24
25#define BBU_GCONFx_DIR(m) __REGBIT(3 + (((m) & 7) << 2))
26#define BBU_GCONFx_DIR_INPUT(m) __REGVAL(BBU_GCONFx_DIR(m), 0)
27#define BBU_GCONFx_DIR_OUTPUT(m) __REGVAL(BBU_GCONFx_DIR(m), 1)
28#define BBU_GCONFx_INV(m) __REGBIT(2 + (((m) & 7) << 2))
29#define BBU_GCONFx_INV_NO(m) __REGVAL(BBU_GCONFx_INV(m), 0)
30#define BBU_GCONFx_INV_YES(m) __REGVAL(BBU_GCONFx_INV(m), 1)
31#define BBU_GCONFx_FUNC(m) __REGBITS(1 + (((m) & 7) << 2), ((m) & 7) << 2)
32#define BBU_GCONFx_FUNC_0(m) __REGVAL(BBU_GCONFx_FUNC(m), 0)
33#define BBU_GCONFx_FUNC_1(m) __REGVAL(BBU_GCONFx_FUNC(m), 1)
34#define BBU_GCONFx_FUNC_2(m) __REGVAL(BBU_GCONFx_FUNC(m), 2)
35#define BBU_GCONFx_FUNC_3(m) __REGVAL(BBU_GCONFx_FUNC(m), 3)
36
37#define BBU_GCTRL1 __REG(0x90600030)
38#define BBU_GCTRL2 __REG(0x90600034)
39#define BBU_GCTRL3 __REG(0x90600120)
40
41#define BBU_GSTAT1 __REG(0x90600040)
42#define BBU_GSTAT2 __REG(0x90600044)
43#define BBU_GSTAT3 __REG(0x90600130)
44
45#endif /* ifndef __ASM_ARCH_REGSBBU_H */
diff --git a/arch/arm/mach-ns9xxx/include/mach/regs-board-a9m9750dev.h b/arch/arm/mach-ns9xxx/include/mach/regs-board-a9m9750dev.h
new file mode 100644
index 000000000000..cd1593693f56
--- /dev/null
+++ b/arch/arm/mach-ns9xxx/include/mach/regs-board-a9m9750dev.h
@@ -0,0 +1,24 @@
1/*
2 * arch/arm/mach-ns9xxx/include/mach/regs-board-a9m9750dev.h
3 *
4 * Copyright (C) 2006 by Digi International Inc.
5 * All rights reserved.
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License version 2 as published by
9 * the Free Software Foundation.
10 */
11#ifndef __ASM_ARCH_REGSBOARDA9M9750_H
12#define __ASM_ARCH_REGSBOARDA9M9750_H
13
14#include <mach/hardware.h>
15
16#define FPGA_UARTA_BASE io_p2v(NS9XXX_CSxSTAT_PHYS(0))
17#define FPGA_UARTB_BASE io_p2v(NS9XXX_CSxSTAT_PHYS(0) + 0x08)
18#define FPGA_UARTC_BASE io_p2v(NS9XXX_CSxSTAT_PHYS(0) + 0x10)
19#define FPGA_UARTD_BASE io_p2v(NS9XXX_CSxSTAT_PHYS(0) + 0x18)
20
21#define FPGA_IER __REG(NS9XXX_CSxSTAT_PHYS(0) + 0x50)
22#define FPGA_ISR __REG(NS9XXX_CSxSTAT_PHYS(0) + 0x60)
23
24#endif /* ifndef __ASM_ARCH_REGSBOARDA9M9750_H */
diff --git a/arch/arm/mach-ns9xxx/include/mach/regs-mem.h b/arch/arm/mach-ns9xxx/include/mach/regs-mem.h
new file mode 100644
index 000000000000..f1625bf8cdce
--- /dev/null
+++ b/arch/arm/mach-ns9xxx/include/mach/regs-mem.h
@@ -0,0 +1,135 @@
1/*
2 * arch/arm/mach-ns9xxx/include/mach/regs-mem.h
3 *
4 * Copyright (C) 2006 by Digi International Inc.
5 * All rights reserved.
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License version 2 as published by
9 * the Free Software Foundation.
10 */
11#ifndef __ASM_ARCH_REGSMEM_H
12#define __ASM_ARCH_REGSMEM_H
13
14#include <mach/hardware.h>
15
16/* Memory Module */
17
18/* Control register */
19#define MEM_CTRL __REG(0xa0700000)
20
21/* Status register */
22#define MEM_STAT __REG(0xa0700004)
23
24/* Configuration register */
25#define MEM_CONF __REG(0xa0700008)
26
27/* Dynamic Memory Control register */
28#define MEM_DMCTRL __REG(0xa0700020)
29
30/* Dynamic Memory Refresh Timer */
31#define MEM_DMRT __REG(0xa0700024)
32
33/* Dynamic Memory Read Configuration register */
34#define MEM_DMRC __REG(0xa0700028)
35
36/* Dynamic Memory Precharge Command Period (tRP) */
37#define MEM_DMPCP __REG(0xa0700030)
38
39/* Dynamic Memory Active to Precharge Command Period (tRAS) */
40#define MEM_DMAPCP __REG(0xa0700034)
41
42/* Dynamic Memory Self-Refresh Exit Time (tSREX) */
43#define MEM_DMSRET __REG(0xa0700038)
44
45/* Dynamic Memory Last Data Out to Active Time (tAPR) */
46#define MEM_DMLDOAT __REG(0xa070003c)
47
48/* Dynamic Memory Data-in to Active Command Time (tDAL or TAPW) */
49#define MEM_DMDIACT __REG(0xa0700040)
50
51/* Dynamic Memory Write Recovery Time (tWR, tDPL, tRWL, tRDL) */
52#define MEM_DMWRT __REG(0xa0700044)
53
54/* Dynamic Memory Active to Active Command Period (tRC) */
55#define MEM_DMAACP __REG(0xa0700048)
56
57/* Dynamic Memory Auto Refresh Period, and Auto Refresh to Active Command Period (tRFC) */
58#define MEM_DMARP __REG(0xa070004c)
59
60/* Dynamic Memory Exit Self-Refresh to Active Command (tXSR) */
61#define MEM_DMESRAC __REG(0xa0700050)
62
63/* Dynamic Memory Active Bank A to Active B Time (tRRD) */
64#define MEM_DMABAABT __REG(0xa0700054)
65
66/* Dynamic Memory Load Mode register to Active Command Time (tMRD) */
67#define MEM_DMLMACT __REG(0xa0700058)
68
69/* Static Memory Extended Wait */
70#define MEM_SMEW __REG(0xa0700080)
71
72/* Dynamic Memory Configuration Register x */
73#define MEM_DMCONF(x) __REG2(0xa0700100, (x) << 3)
74
75/* Dynamic Memory RAS and CAS Delay x */
76#define MEM_DMRCD(x) __REG2(0xa0700104, (x) << 3)
77
78/* Static Memory Configuration Register x */
79#define MEM_SMC(x) __REG2(0xa0700200, (x) << 3)
80
81/* Static Memory Configuration Register x: Write protect */
82#define MEM_SMC_PSMC __REGBIT(20)
83#define MEM_SMC_PSMC_OFF __REGVAL(MEM_SMC_PSMC, 0)
84#define MEM_SMC_PSMC_ON __REGVAL(MEM_SMC_PSMC, 1)
85
86/* Static Memory Configuration Register x: Buffer enable */
87#define MEM_SMC_BSMC __REGBIT(19)
88#define MEM_SMC_BSMC_OFF __REGVAL(MEM_SMC_BSMC, 0)
89#define MEM_SMC_BSMC_ON __REGVAL(MEM_SMC_BSMC, 1)
90
91/* Static Memory Configuration Register x: Extended Wait */
92#define MEM_SMC_EW __REGBIT(8)
93#define MEM_SMC_EW_OFF __REGVAL(MEM_SMC_EW, 0)
94#define MEM_SMC_EW_ON __REGVAL(MEM_SMC_EW, 1)
95
96/* Static Memory Configuration Register x: Byte lane state */
97#define MEM_SMC_PB __REGBIT(7)
98#define MEM_SMC_PB_0 __REGVAL(MEM_SMC_PB, 0)
99#define MEM_SMC_PB_1 __REGVAL(MEM_SMC_PB, 1)
100
101/* Static Memory Configuration Register x: Chip select polarity */
102#define MEM_SMC_PC __REGBIT(6)
103#define MEM_SMC_PC_AL __REGVAL(MEM_SMC_PC, 0)
104#define MEM_SMC_PC_AH __REGVAL(MEM_SMC_PC, 1)
105
106/* static memory configuration register x: page mode*/
107#define MEM_SMC_PM __REGBIT(3)
108#define MEM_SMC_PM_DIS __REGVAL(MEM_SMC_PM, 0)
109#define MEM_SMC_PM_ASYNC __REGVAL(MEM_SMC_PM, 1)
110
111/* static memory configuration register x: Memory width */
112#define MEM_SMC_MW __REGBITS(1, 0)
113#define MEM_SMC_MW_8 __REGVAL(MEM_SMC_MW, 0)
114#define MEM_SMC_MW_16 __REGVAL(MEM_SMC_MW, 1)
115#define MEM_SMC_MW_32 __REGVAL(MEM_SMC_MW, 2)
116
117/* Static Memory Write Enable Delay x */
118#define MEM_SMWED(x) __REG2(0xa0700204, (x) << 3)
119
120/* Static Memory Output Enable Delay x */
121#define MEM_SMOED(x) __REG2(0xa0700208, (x) << 3)
122
123/* Static Memory Read Delay x */
124#define MEM_SMRD(x) __REG2(0xa070020c, (x) << 3)
125
126/* Static Memory Page Mode Read Delay 0 */
127#define MEM_SMPMRD(x) __REG2(0xa0700210, (x) << 3)
128
129/* Static Memory Write Delay */
130#define MEM_SMWD(x) __REG2(0xa0700214, (x) << 3)
131
132/* Static Memory Turn Round Delay x */
133#define MEM_SWT(x) __REG2(0xa0700218, (x) << 3)
134
135#endif /* ifndef __ASM_ARCH_REGSMEM_H */
diff --git a/arch/arm/mach-ns9xxx/include/mach/regs-sys-common.h b/arch/arm/mach-ns9xxx/include/mach/regs-sys-common.h
new file mode 100644
index 000000000000..14f91dfd5736
--- /dev/null
+++ b/arch/arm/mach-ns9xxx/include/mach/regs-sys-common.h
@@ -0,0 +1,31 @@
1/*
2 * arch/arm/mach-ns9xxx/include/mach/regs-sys-common.h
3 *
4 * Copyright (C) 2007 by Digi International Inc.
5 * All rights reserved.
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License version 2 as published by
9 * the Free Software Foundation.
10 */
11
12#ifndef __ASM_ARCH_REGSSYSCOMMON_H
13#define __ASM_ARCH_REGSSYSCOMMON_H
14#include <mach/hardware.h>
15
16/* Interrupt Vector Address Register Level x */
17#define SYS_IVA(x) __REG2(0xa09000c4, (x))
18
19/* Interrupt Configuration registers */
20#define SYS_IC(x) __REG2(0xa0900144, (x))
21
22/* ISRADDR */
23#define SYS_ISRADDR __REG(0xa0900164)
24
25/* Interrupt Status Active */
26#define SYS_ISA __REG(0xa0900168)
27
28/* Interrupt Status Raw */
29#define SYS_ISR __REG(0xa090016c)
30
31#endif /* ifndef __ASM_ARCH_REGSSYSCOMMON_H */
diff --git a/arch/arm/mach-ns9xxx/include/mach/regs-sys-ns9360.h b/arch/arm/mach-ns9xxx/include/mach/regs-sys-ns9360.h
new file mode 100644
index 000000000000..8ff254d9901c
--- /dev/null
+++ b/arch/arm/mach-ns9xxx/include/mach/regs-sys-ns9360.h
@@ -0,0 +1,148 @@
1/*
2 * arch/arm/mach-ns9xxx/include/mach/regs-sys-ns9360.h
3 *
4 * Copyright (C) 2006,2007 by Digi International Inc.
5 * All rights reserved.
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License version 2 as published by
9 * the Free Software Foundation.
10 */
11#ifndef __ASM_ARCH_REGSSYSNS9360_H
12#define __ASM_ARCH_REGSSYSNS9360_H
13
14#include <mach/hardware.h>
15
16/* System Control Module */
17
18/* AHB Arbiter Gen Configuration */
19#define SYS_AHBAGENCONF __REG(0xa0900000)
20
21/* BRC */
22#define SYS_BRC(x) __REG2(0xa0900004, (x))
23
24/* Timer x Reload Count register */
25#define SYS_TRC(x) __REG2(0xa0900044, (x))
26
27/* Timer x Read register */
28#define SYS_TR(x) __REG2(0xa0900084, (x))
29
30/* Timer Interrupt Status register */
31#define SYS_TIS __REG(0xa0900170)
32
33/* PLL Configuration register */
34#define SYS_PLL __REG(0xa0900188)
35
36/* PLL FS status */
37#define SYS_PLL_FS __REGBITS(24, 23)
38
39/* PLL ND status */
40#define SYS_PLL_ND __REGBITS(20, 16)
41
42/* PLL Configuration register: PLL SW change */
43#define SYS_PLL_SWC __REGBIT(15)
44#define SYS_PLL_SWC_NO __REGVAL(SYS_PLL_SWC, 0)
45#define SYS_PLL_SWC_YES __REGVAL(SYS_PLL_SWC, 1)
46
47/* Timer x Control register */
48#define SYS_TC(x) __REG2(0xa0900190, (x))
49
50/* Timer x Control register: Timer enable */
51#define SYS_TCx_TEN __REGBIT(15)
52#define SYS_TCx_TEN_DIS __REGVAL(SYS_TCx_TEN, 0)
53#define SYS_TCx_TEN_EN __REGVAL(SYS_TCx_TEN, 1)
54
55/* Timer x Control register: CPU debug mode */
56#define SYS_TCx_TDBG __REGBIT(10)
57#define SYS_TCx_TDBG_CONT __REGVAL(SYS_TCx_TDBG, 0)
58#define SYS_TCx_TDBG_STOP __REGVAL(SYS_TCx_TDBG, 1)
59
60/* Timer x Control register: Interrupt clear */
61#define SYS_TCx_INTC __REGBIT(9)
62#define SYS_TCx_INTC_UNSET __REGVAL(SYS_TCx_INTC, 0)
63#define SYS_TCx_INTC_SET __REGVAL(SYS_TCx_INTC, 1)
64
65/* Timer x Control register: Timer clock select */
66#define SYS_TCx_TLCS __REGBITS(8, 6)
67#define SYS_TCx_TLCS_CPU __REGVAL(SYS_TCx_TLCS, 0) /* CPU clock */
68#define SYS_TCx_TLCS_DIV2 __REGVAL(SYS_TCx_TLCS, 1) /* CPU clock / 2 */
69#define SYS_TCx_TLCS_DIV4 __REGVAL(SYS_TCx_TLCS, 2) /* CPU clock / 4 */
70#define SYS_TCx_TLCS_DIV8 __REGVAL(SYS_TCx_TLCS, 3) /* CPU clock / 8 */
71#define SYS_TCx_TLCS_DIV16 __REGVAL(SYS_TCx_TLCS, 4) /* CPU clock / 16 */
72#define SYS_TCx_TLCS_DIV32 __REGVAL(SYS_TCx_TLCS, 5) /* CPU clock / 32 */
73#define SYS_TCx_TLCS_DIV64 __REGVAL(SYS_TCx_TLCS, 6) /* CPU clock / 64 */
74#define SYS_TCx_TLCS_EXT __REGVAL(SYS_TCx_TLCS, 7)
75
76/* Timer x Control register: Timer mode */
77#define SYS_TCx_TM __REGBITS(5, 4)
78#define SYS_TCx_TM_IEE __REGVAL(SYS_TCx_TM, 0) /* Internal timer or external event */
79#define SYS_TCx_TM_ELL __REGVAL(SYS_TCx_TM, 1) /* External low-level, gated timer */
80#define SYS_TCx_TM_EHL __REGVAL(SYS_TCx_TM, 2) /* External high-level, gated timer */
81#define SYS_TCx_TM_CONCAT __REGVAL(SYS_TCx_TM, 3) /* Concatenate the lower timer. */
82
83/* Timer x Control register: Interrupt select */
84#define SYS_TCx_INTS __REGBIT(3)
85#define SYS_TCx_INTS_DIS __REGVAL(SYS_TCx_INTS, 0)
86#define SYS_TCx_INTS_EN __REGVAL(SYS_TCx_INTS, 1)
87
88/* Timer x Control register: Up/down select */
89#define SYS_TCx_UDS __REGBIT(2)
90#define SYS_TCx_UDS_UP __REGVAL(SYS_TCx_UDS, 0)
91#define SYS_TCx_UDS_DOWN __REGVAL(SYS_TCx_UDS, 1)
92
93/* Timer x Control register: 32- or 16-bit timer */
94#define SYS_TCx_TSZ __REGBIT(1)
95#define SYS_TCx_TSZ_16 __REGVAL(SYS_TCx_TSZ, 0)
96#define SYS_TCx_TSZ_32 __REGVAL(SYS_TCx_TSZ, 1)
97
98/* Timer x Control register: Reload enable */
99#define SYS_TCx_REN __REGBIT(0)
100#define SYS_TCx_REN_DIS __REGVAL(SYS_TCx_REN, 0)
101#define SYS_TCx_REN_EN __REGVAL(SYS_TCx_REN, 1)
102
103/* System Memory Chip Select x Dynamic Memory Base */
104#define SYS_SMCSDMB(x) __REG2(0xa09001d0, (x) << 1)
105
106/* System Memory Chip Select x Dynamic Memory Mask */
107#define SYS_SMCSDMM(x) __REG2(0xa09001d4, (x) << 1)
108
109/* System Memory Chip Select x Static Memory Base */
110#define SYS_SMCSSMB(x) __REG2(0xa09001f0, (x) << 1)
111
112/* System Memory Chip Select x Static Memory Base: Chip select x base */
113#define SYS_SMCSSMB_CSxB __REGBITS(31, 12)
114
115/* System Memory Chip Select x Static Memory Mask */
116#define SYS_SMCSSMM(x) __REG2(0xa09001f4, (x) << 1)
117
118/* System Memory Chip Select x Static Memory Mask: Chip select x mask */
119#define SYS_SMCSSMM_CSxM __REGBITS(31, 12)
120
121/* System Memory Chip Select x Static Memory Mask: Chip select x enable */
122#define SYS_SMCSSMM_CSEx __REGBIT(0)
123#define SYS_SMCSSMM_CSEx_DIS __REGVAL(SYS_SMCSSMM_CSEx, 0)
124#define SYS_SMCSSMM_CSEx_EN __REGVAL(SYS_SMCSSMM_CSEx, 1)
125
126/* General purpose, user-defined ID register */
127#define SYS_GENID __REG(0xa0900210)
128
129/* External Interrupt x Control register */
130#define SYS_EIC(x) __REG2(0xa0900214, (x))
131
132/* External Interrupt x Control register: Status */
133#define SYS_EIC_STS __REGBIT(3)
134
135/* External Interrupt x Control register: Clear */
136#define SYS_EIC_CLR __REGBIT(2)
137
138/* External Interrupt x Control register: Polarity */
139#define SYS_EIC_PLTY __REGBIT(1)
140#define SYS_EIC_PLTY_AH __REGVAL(SYS_EIC_PLTY, 0)
141#define SYS_EIC_PLTY_AL __REGVAL(SYS_EIC_PLTY, 1)
142
143/* External Interrupt x Control register: Level edge */
144#define SYS_EIC_LVEDG __REGBIT(0)
145#define SYS_EIC_LVEDG_LEVEL __REGVAL(SYS_EIC_LVEDG, 0)
146#define SYS_EIC_LVEDG_EDGE __REGVAL(SYS_EIC_LVEDG, 1)
147
148#endif /* ifndef __ASM_ARCH_REGSSYSNS9360_H */
diff --git a/arch/arm/mach-ns9xxx/include/mach/system.h b/arch/arm/mach-ns9xxx/include/mach/system.h
new file mode 100644
index 000000000000..e2068c57415f
--- /dev/null
+++ b/arch/arm/mach-ns9xxx/include/mach/system.h
@@ -0,0 +1,35 @@
1/*
2 * arch/arm/mach-ns9xxx/include/mach/system.h
3 *
4 * Copyright (C) 2006,2007 by Digi International Inc.
5 * All rights reserved.
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License version 2 as published by
9 * the Free Software Foundation.
10 */
11#ifndef __ASM_ARCH_SYSTEM_H
12#define __ASM_ARCH_SYSTEM_H
13
14#include <asm/proc-fns.h>
15#include <mach/processor.h>
16#include <mach/processor-ns9360.h>
17
18static inline void arch_idle(void)
19{
20 cpu_do_idle();
21}
22
23static inline void arch_reset(char mode)
24{
25#ifdef CONFIG_PROCESSOR_NS9360
26 if (processor_is_ns9360())
27 ns9360_reset(mode);
28 else
29#endif
30 BUG();
31
32 BUG();
33}
34
35#endif /* ifndef __ASM_ARCH_SYSTEM_H */
diff --git a/arch/arm/mach-ns9xxx/include/mach/timex.h b/arch/arm/mach-ns9xxx/include/mach/timex.h
new file mode 100644
index 000000000000..734a8d8bd578
--- /dev/null
+++ b/arch/arm/mach-ns9xxx/include/mach/timex.h
@@ -0,0 +1,20 @@
1/*
2 * arch/arm/mach-ns9xxx/include/mach/timex.h
3 *
4 * Copyright (C) 2005-2006 by Digi International Inc.
5 * All rights reserved.
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License version 2 as published by
9 * the Free Software Foundation.
10 */
11#ifndef __ASM_ARCH_TIMEX_H
12#define __ASM_ARCH_TIMEX_H
13
14/*
15 * value for CLOCK_TICK_RATE stolen from arch/arm/mach-s3c2410/include/mach/timex.h.
16 * See there for an explanation.
17 */
18#define CLOCK_TICK_RATE 12000000
19
20#endif /* ifndef __ASM_ARCH_TIMEX_H */
diff --git a/arch/arm/mach-ns9xxx/include/mach/uncompress.h b/arch/arm/mach-ns9xxx/include/mach/uncompress.h
new file mode 100644
index 000000000000..5dbc3c5167c8
--- /dev/null
+++ b/arch/arm/mach-ns9xxx/include/mach/uncompress.h
@@ -0,0 +1,164 @@
1/*
2 * arch/arm/mach-ns9xxx/include/mach/uncompress.h
3 *
4 * Copyright (C) 2006 by Digi International Inc.
5 * All rights reserved.
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License version 2 as published by
9 * the Free Software Foundation.
10 */
11#ifndef __ASM_ARCH_UNCOMPRESS_H
12#define __ASM_ARCH_UNCOMPRESS_H
13
14#include <asm/io.h>
15
16#define __REG(x) ((void __iomem __force *)(x))
17
18static void putc_dummy(char c, void __iomem *base)
19{
20 /* nothing */
21}
22
23static void putc_ns9360(char c, void __iomem *base)
24{
25 static int t = 0x10000;
26 do {
27 if (t)
28 --t;
29
30 if (__raw_readl(base + 8) & (1 << 3)) {
31 __raw_writeb(c, base + 16);
32 t = 0x10000;
33 break;
34 }
35 } while (t);
36}
37
38static void putc_a9m9750dev(char c, void __iomem *base)
39{
40 static int t = 0x10000;
41 do {
42 if (t)
43 --t;
44
45 if (__raw_readb(base + 5) & (1 << 5)) {
46 __raw_writeb(c, base);
47 t = 0x10000;
48 break;
49 }
50 } while (t);
51
52}
53
54static void putc_ns921x(char c, void __iomem *base)
55{
56 static int t = 0x10000;
57 do {
58 if (t)
59 --t;
60
61 if (!(__raw_readl(base) & (1 << 11))) {
62 __raw_writeb(c, base + 0x0028);
63 t = 0x10000;
64 break;
65 }
66 } while (t);
67}
68
69#define MSCS __REG(0xA0900184)
70
71#define NS9360_UARTA __REG(0x90200040)
72#define NS9360_UARTB __REG(0x90200000)
73#define NS9360_UARTC __REG(0x90300000)
74#define NS9360_UARTD __REG(0x90300040)
75
76#define NS9360_UART_ENABLED(base) \
77 (__raw_readl(NS9360_UARTA) & (1 << 31))
78
79#define A9M9750DEV_UARTA __REG(0x40000000)
80
81#define NS921XSYS_CLOCK __REG(0xa090017c)
82#define NS921X_UARTA __REG(0x90010000)
83#define NS921X_UARTB __REG(0x90018000)
84#define NS921X_UARTC __REG(0x90020000)
85#define NS921X_UARTD __REG(0x90028000)
86
87#define NS921X_UART_ENABLED(base) \
88 (__raw_readl((base) + 0x1000) & (1 << 29))
89
90static void autodetect(void (**putc)(char, void __iomem *), void __iomem **base)
91{
92 if (((__raw_readl(MSCS) >> 16) & 0xfe) == 0x00) {
93 /* ns9360 or ns9750 */
94 if (NS9360_UART_ENABLED(NS9360_UARTA)) {
95 *putc = putc_ns9360;
96 *base = NS9360_UARTA;
97 return;
98 } else if (NS9360_UART_ENABLED(NS9360_UARTB)) {
99 *putc = putc_ns9360;
100 *base = NS9360_UARTB;
101 return;
102 } else if (NS9360_UART_ENABLED(NS9360_UARTC)) {
103 *putc = putc_ns9360;
104 *base = NS9360_UARTC;
105 return;
106 } else if (NS9360_UART_ENABLED(NS9360_UARTD)) {
107 *putc = putc_ns9360;
108 *base = NS9360_UARTD;
109 return;
110 } else if (__raw_readl(__REG(0xa09001f4)) == 0xfffff001) {
111 *putc = putc_a9m9750dev;
112 *base = A9M9750DEV_UARTA;
113 return;
114 }
115 } else if (((__raw_readl(MSCS) >> 16) & 0xfe) == 0x02) {
116 /* ns921x */
117 u32 clock = __raw_readl(NS921XSYS_CLOCK);
118
119 if ((clock & (1 << 1)) &&
120 NS921X_UART_ENABLED(NS921X_UARTA)) {
121 *putc = putc_ns921x;
122 *base = NS921X_UARTA;
123 return;
124 } else if ((clock & (1 << 2)) &&
125 NS921X_UART_ENABLED(NS921X_UARTB)) {
126 *putc = putc_ns921x;
127 *base = NS921X_UARTB;
128 return;
129 } else if ((clock & (1 << 3)) &&
130 NS921X_UART_ENABLED(NS921X_UARTC)) {
131 *putc = putc_ns921x;
132 *base = NS921X_UARTC;
133 return;
134 } else if ((clock & (1 << 4)) &&
135 NS921X_UART_ENABLED(NS921X_UARTD)) {
136 *putc = putc_ns921x;
137 *base = NS921X_UARTD;
138 return;
139 }
140 }
141
142 *putc = putc_dummy;
143}
144
145void (*myputc)(char, void __iomem *);
146void __iomem *base;
147
148static void putc(char c)
149{
150 myputc(c, base);
151}
152
153static void arch_decomp_setup(void)
154{
155 autodetect(&myputc, &base);
156}
157#define arch_decomp_wdog()
158
159static void flush(void)
160{
161 /* nothing */
162}
163
164#endif /* ifndef __ASM_ARCH_UNCOMPRESS_H */
diff --git a/arch/arm/mach-ns9xxx/include/mach/vmalloc.h b/arch/arm/mach-ns9xxx/include/mach/vmalloc.h
new file mode 100644
index 000000000000..fe964d3bcc47
--- /dev/null
+++ b/arch/arm/mach-ns9xxx/include/mach/vmalloc.h
@@ -0,0 +1,16 @@
1/*
2 * arch/arm/mach-ns9xxx/include/mach/vmalloc.h
3 *
4 * Copyright (C) 2006 by Digi International Inc.
5 * All rights reserved.
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License version 2 as published by
9 * the Free Software Foundation.
10 */
11#ifndef __ASM_ARCH_VMALLOC_H
12#define __ASM_ARCH_VMALLOC_H
13
14#define VMALLOC_END (0xf0000000)
15
16#endif /* ifndef __ASM_ARCH_VMALLOC_H */
diff --git a/arch/arm/mach-ns9xxx/irq.c b/arch/arm/mach-ns9xxx/irq.c
index d2964257797e..38260d5f849b 100644
--- a/arch/arm/mach-ns9xxx/irq.c
+++ b/arch/arm/mach-ns9xxx/irq.c
@@ -12,10 +12,9 @@
12#include <linux/kernel_stat.h> 12#include <linux/kernel_stat.h>
13#include <asm/io.h> 13#include <asm/io.h>
14#include <asm/mach/irq.h> 14#include <asm/mach/irq.h>
15#include <asm/mach-types.h> 15#include <mach/regs-sys-common.h>
16#include <asm/arch/regs-sys-common.h> 16#include <mach/irqs.h>
17#include <asm/arch/irqs.h> 17#include <mach/board.h>
18#include <asm/arch/board.h>
19 18
20#include "generic.h" 19#include "generic.h"
21 20
diff --git a/arch/arm/mach-ns9xxx/mach-cc9p9360dev.c b/arch/arm/mach-ns9xxx/mach-cc9p9360dev.c
index 7714233fb004..2858417d8d8a 100644
--- a/arch/arm/mach-ns9xxx/mach-cc9p9360dev.c
+++ b/arch/arm/mach-ns9xxx/mach-cc9p9360dev.c
@@ -11,7 +11,7 @@
11#include <asm/mach/arch.h> 11#include <asm/mach/arch.h>
12#include <asm/mach-types.h> 12#include <asm/mach-types.h>
13 13
14#include <asm/arch/processor-ns9360.h> 14#include <mach/processor-ns9360.h>
15 15
16#include "board-a9m9750dev.h" 16#include "board-a9m9750dev.h"
17#include "generic.h" 17#include "generic.h"
diff --git a/arch/arm/mach-ns9xxx/mach-cc9p9360js.c b/arch/arm/mach-ns9xxx/mach-cc9p9360js.c
index bdbd0bb1a0b3..729f68da4293 100644
--- a/arch/arm/mach-ns9xxx/mach-cc9p9360js.c
+++ b/arch/arm/mach-ns9xxx/mach-cc9p9360js.c
@@ -11,7 +11,7 @@
11#include <asm/mach/arch.h> 11#include <asm/mach/arch.h>
12#include <asm/mach-types.h> 12#include <asm/mach-types.h>
13 13
14#include <asm/arch/processor-ns9360.h> 14#include <mach/processor-ns9360.h>
15 15
16#include "board-jscc9p9360.h" 16#include "board-jscc9p9360.h"
17#include "generic.h" 17#include "generic.h"
diff --git a/arch/arm/mach-ns9xxx/plat-serial8250.c b/arch/arm/mach-ns9xxx/plat-serial8250.c
index c9cce9b4e6c9..795b15e8982a 100644
--- a/arch/arm/mach-ns9xxx/plat-serial8250.c
+++ b/arch/arm/mach-ns9xxx/plat-serial8250.c
@@ -11,8 +11,8 @@
11#include <linux/platform_device.h> 11#include <linux/platform_device.h>
12#include <linux/serial_8250.h> 12#include <linux/serial_8250.h>
13 13
14#include <asm/arch/regs-board-a9m9750dev.h> 14#include <mach/regs-board-a9m9750dev.h>
15#include <asm/arch/board.h> 15#include <mach/board.h>
16 16
17#define DRIVER_NAME "serial8250" 17#define DRIVER_NAME "serial8250"
18 18
diff --git a/arch/arm/mach-ns9xxx/processor-ns9360.c b/arch/arm/mach-ns9xxx/processor-ns9360.c
index 8ee81b59b35d..abee8338735d 100644
--- a/arch/arm/mach-ns9xxx/processor-ns9360.c
+++ b/arch/arm/mach-ns9xxx/processor-ns9360.c
@@ -14,8 +14,8 @@
14 14
15#include <asm/page.h> 15#include <asm/page.h>
16#include <asm/mach/map.h> 16#include <asm/mach/map.h>
17#include <asm/arch/processor-ns9360.h> 17#include <mach/processor-ns9360.h>
18#include <asm/arch/regs-sys-ns9360.h> 18#include <mach/regs-sys-ns9360.h>
19 19
20void ns9360_reset(char mode) 20void ns9360_reset(char mode)
21{ 21{
diff --git a/arch/arm/mach-ns9xxx/time-ns9360.c b/arch/arm/mach-ns9xxx/time-ns9360.c
index 66bd58262974..a63424d083d9 100644
--- a/arch/arm/mach-ns9xxx/time-ns9360.c
+++ b/arch/arm/mach-ns9xxx/time-ns9360.c
@@ -15,10 +15,10 @@
15#include <linux/clocksource.h> 15#include <linux/clocksource.h>
16#include <linux/clockchips.h> 16#include <linux/clockchips.h>
17 17
18#include <asm/arch/processor-ns9360.h> 18#include <mach/processor-ns9360.h>
19#include <asm/arch/regs-sys-ns9360.h> 19#include <mach/regs-sys-ns9360.h>
20#include <asm/arch/irqs.h> 20#include <mach/irqs.h>
21#include <asm/arch/system.h> 21#include <mach/system.h>
22#include "generic.h" 22#include "generic.h"
23 23
24#define TIMER_CLOCKSOURCE 0 24#define TIMER_CLOCKSOURCE 0
diff --git a/arch/arm/mach-omap1/board-ams-delta.c b/arch/arm/mach-omap1/board-ams-delta.c
index 8b102ad59c14..2e618391cc51 100644
--- a/arch/arm/mach-omap1/board-ams-delta.c
+++ b/arch/arm/mach-omap1/board-ams-delta.c
@@ -17,18 +17,18 @@
17#include <linux/input.h> 17#include <linux/input.h>
18#include <linux/platform_device.h> 18#include <linux/platform_device.h>
19 19
20#include <asm/hardware.h> 20#include <mach/hardware.h>
21#include <asm/mach-types.h> 21#include <asm/mach-types.h>
22#include <asm/mach/arch.h> 22#include <asm/mach/arch.h>
23#include <asm/mach/map.h> 23#include <asm/mach/map.h>
24 24
25#include <asm/arch/board-ams-delta.h> 25#include <mach/board-ams-delta.h>
26#include <asm/arch/gpio.h> 26#include <mach/gpio.h>
27#include <asm/arch/keypad.h> 27#include <mach/keypad.h>
28#include <asm/arch/mux.h> 28#include <mach/mux.h>
29#include <asm/arch/usb.h> 29#include <mach/usb.h>
30#include <asm/arch/board.h> 30#include <mach/board.h>
31#include <asm/arch/common.h> 31#include <mach/common.h>
32 32
33static u8 ams_delta_latch1_reg; 33static u8 ams_delta_latch1_reg;
34static u16 ams_delta_latch2_reg; 34static u16 ams_delta_latch2_reg;
diff --git a/arch/arm/mach-omap1/board-fsample.c b/arch/arm/mach-omap1/board-fsample.c
index 1bdb66638e29..db789461fca4 100644
--- a/arch/arm/mach-omap1/board-fsample.c
+++ b/arch/arm/mach-omap1/board-fsample.c
@@ -20,21 +20,21 @@
20#include <linux/mtd/partitions.h> 20#include <linux/mtd/partitions.h>
21#include <linux/input.h> 21#include <linux/input.h>
22 22
23#include <asm/hardware.h> 23#include <mach/hardware.h>
24#include <asm/mach-types.h> 24#include <asm/mach-types.h>
25#include <asm/mach/arch.h> 25#include <asm/mach/arch.h>
26#include <asm/mach/flash.h> 26#include <asm/mach/flash.h>
27#include <asm/mach/map.h> 27#include <asm/mach/map.h>
28 28
29#include <asm/arch/tc.h> 29#include <mach/tc.h>
30#include <asm/arch/gpio.h> 30#include <mach/gpio.h>
31#include <asm/arch/mux.h> 31#include <mach/mux.h>
32#include <asm/arch/fpga.h> 32#include <mach/fpga.h>
33#include <asm/arch/nand.h> 33#include <mach/nand.h>
34#include <asm/arch/keypad.h> 34#include <mach/keypad.h>
35#include <asm/arch/common.h> 35#include <mach/common.h>
36#include <asm/arch/board.h> 36#include <mach/board.h>
37#include <asm/arch/board-fsample.h> 37#include <mach/board-fsample.h>
38 38
39static int fsample_keymap[] = { 39static int fsample_keymap[] = {
40 KEY(0,0,KEY_UP), 40 KEY(0,0,KEY_UP),
diff --git a/arch/arm/mach-omap1/board-generic.c b/arch/arm/mach-omap1/board-generic.c
index c711bf23f7b4..7d2670205373 100644
--- a/arch/arm/mach-omap1/board-generic.c
+++ b/arch/arm/mach-omap1/board-generic.c
@@ -17,16 +17,16 @@
17#include <linux/init.h> 17#include <linux/init.h>
18#include <linux/platform_device.h> 18#include <linux/platform_device.h>
19 19
20#include <asm/hardware.h> 20#include <mach/hardware.h>
21#include <asm/mach-types.h> 21#include <asm/mach-types.h>
22#include <asm/mach/arch.h> 22#include <asm/mach/arch.h>
23#include <asm/mach/map.h> 23#include <asm/mach/map.h>
24 24
25#include <asm/arch/gpio.h> 25#include <mach/gpio.h>
26#include <asm/arch/mux.h> 26#include <mach/mux.h>
27#include <asm/arch/usb.h> 27#include <mach/usb.h>
28#include <asm/arch/board.h> 28#include <mach/board.h>
29#include <asm/arch/common.h> 29#include <mach/common.h>
30 30
31static void __init omap_generic_init_irq(void) 31static void __init omap_generic_init_irq(void)
32{ 32{
diff --git a/arch/arm/mach-omap1/board-h2-mmc.c b/arch/arm/mach-omap1/board-h2-mmc.c
index 6fdc78406b21..ab9ee5820c48 100644
--- a/arch/arm/mach-omap1/board-h2-mmc.c
+++ b/arch/arm/mach-omap1/board-h2-mmc.c
@@ -12,8 +12,8 @@
12 * published by the Free Software Foundation. 12 * published by the Free Software Foundation.
13 */ 13 */
14 14
15#include <asm/arch/mmc.h> 15#include <mach/mmc.h>
16#include <asm/arch/gpio.h> 16#include <mach/gpio.h>
17 17
18#ifdef CONFIG_MMC_OMAP 18#ifdef CONFIG_MMC_OMAP
19static int slot_cover_open; 19static int slot_cover_open;
diff --git a/arch/arm/mach-omap1/board-h2.c b/arch/arm/mach-omap1/board-h2.c
index 4b444fdaafea..3b65914b9141 100644
--- a/arch/arm/mach-omap1/board-h2.c
+++ b/arch/arm/mach-omap1/board-h2.c
@@ -29,7 +29,7 @@
29#include <linux/input.h> 29#include <linux/input.h>
30#include <linux/i2c/tps65010.h> 30#include <linux/i2c/tps65010.h>
31 31
32#include <asm/hardware.h> 32#include <mach/hardware.h>
33#include <asm/gpio.h> 33#include <asm/gpio.h>
34 34
35#include <asm/mach-types.h> 35#include <asm/mach-types.h>
@@ -37,16 +37,16 @@
37#include <asm/mach/flash.h> 37#include <asm/mach/flash.h>
38#include <asm/mach/map.h> 38#include <asm/mach/map.h>
39 39
40#include <asm/arch/gpio-switch.h> 40#include <mach/gpio-switch.h>
41#include <asm/arch/mux.h> 41#include <mach/mux.h>
42#include <asm/arch/tc.h> 42#include <mach/tc.h>
43#include <asm/arch/nand.h> 43#include <mach/nand.h>
44#include <asm/arch/irda.h> 44#include <mach/irda.h>
45#include <asm/arch/usb.h> 45#include <mach/usb.h>
46#include <asm/arch/keypad.h> 46#include <mach/keypad.h>
47#include <asm/arch/common.h> 47#include <mach/common.h>
48#include <asm/arch/mcbsp.h> 48#include <mach/mcbsp.h>
49#include <asm/arch/omap-alsa.h> 49#include <mach/omap-alsa.h>
50 50
51static int h2_keymap[] = { 51static int h2_keymap[] = {
52 KEY(0, 0, KEY_LEFT), 52 KEY(0, 0, KEY_LEFT),
diff --git a/arch/arm/mach-omap1/board-h3-mmc.c b/arch/arm/mach-omap1/board-h3-mmc.c
index 66ecc437928f..36085819098c 100644
--- a/arch/arm/mach-omap1/board-h3-mmc.c
+++ b/arch/arm/mach-omap1/board-h3-mmc.c
@@ -12,8 +12,8 @@
12 * published by the Free Software Foundation. 12 * published by the Free Software Foundation.
13 */ 13 */
14 14
15#include <asm/arch/mmc.h> 15#include <mach/mmc.h>
16#include <asm/arch/gpio.h> 16#include <mach/gpio.h>
17 17
18#ifdef CONFIG_MMC_OMAP 18#ifdef CONFIG_MMC_OMAP
19static int slot_cover_open; 19static int slot_cover_open;
diff --git a/arch/arm/mach-omap1/board-h3.c b/arch/arm/mach-omap1/board-h3.c
index 7fbaa8d648cd..2ced6d9984d2 100644
--- a/arch/arm/mach-omap1/board-h3.c
+++ b/arch/arm/mach-omap1/board-h3.c
@@ -31,7 +31,7 @@
31 31
32#include <asm/setup.h> 32#include <asm/setup.h>
33#include <asm/page.h> 33#include <asm/page.h>
34#include <asm/hardware.h> 34#include <mach/hardware.h>
35#include <asm/gpio.h> 35#include <asm/gpio.h>
36 36
37#include <asm/mach-types.h> 37#include <asm/mach-types.h>
@@ -39,18 +39,18 @@
39#include <asm/mach/flash.h> 39#include <asm/mach/flash.h>
40#include <asm/mach/map.h> 40#include <asm/mach/map.h>
41 41
42#include <asm/arch/gpioexpander.h> 42#include <mach/gpioexpander.h>
43#include <asm/arch/irqs.h> 43#include <mach/irqs.h>
44#include <asm/arch/mux.h> 44#include <mach/mux.h>
45#include <asm/arch/tc.h> 45#include <mach/tc.h>
46#include <asm/arch/nand.h> 46#include <mach/nand.h>
47#include <asm/arch/irda.h> 47#include <mach/irda.h>
48#include <asm/arch/usb.h> 48#include <mach/usb.h>
49#include <asm/arch/keypad.h> 49#include <mach/keypad.h>
50#include <asm/arch/dma.h> 50#include <mach/dma.h>
51#include <asm/arch/common.h> 51#include <mach/common.h>
52#include <asm/arch/mcbsp.h> 52#include <mach/mcbsp.h>
53#include <asm/arch/omap-alsa.h> 53#include <mach/omap-alsa.h>
54 54
55#define H3_TS_GPIO 48 55#define H3_TS_GPIO 48
56 56
diff --git a/arch/arm/mach-omap1/board-innovator.c b/arch/arm/mach-omap1/board-innovator.c
index 4b8ae3ee0d05..cbc11be5cd2a 100644
--- a/arch/arm/mach-omap1/board-innovator.c
+++ b/arch/arm/mach-omap1/board-innovator.c
@@ -24,21 +24,21 @@
24#include <linux/mtd/partitions.h> 24#include <linux/mtd/partitions.h>
25#include <linux/input.h> 25#include <linux/input.h>
26 26
27#include <asm/hardware.h> 27#include <mach/hardware.h>
28#include <asm/mach-types.h> 28#include <asm/mach-types.h>
29#include <asm/mach/arch.h> 29#include <asm/mach/arch.h>
30#include <asm/mach/flash.h> 30#include <asm/mach/flash.h>
31#include <asm/mach/map.h> 31#include <asm/mach/map.h>
32 32
33#include <asm/arch/mux.h> 33#include <mach/mux.h>
34#include <asm/arch/fpga.h> 34#include <mach/fpga.h>
35#include <asm/arch/gpio.h> 35#include <mach/gpio.h>
36#include <asm/arch/tc.h> 36#include <mach/tc.h>
37#include <asm/arch/usb.h> 37#include <mach/usb.h>
38#include <asm/arch/keypad.h> 38#include <mach/keypad.h>
39#include <asm/arch/common.h> 39#include <mach/common.h>
40#include <asm/arch/mcbsp.h> 40#include <mach/mcbsp.h>
41#include <asm/arch/omap-alsa.h> 41#include <mach/omap-alsa.h>
42 42
43static int innovator_keymap[] = { 43static int innovator_keymap[] = {
44 KEY(0, 0, KEY_F1), 44 KEY(0, 0, KEY_F1),
diff --git a/arch/arm/mach-omap1/board-nokia770.c b/arch/arm/mach-omap1/board-nokia770.c
index 3f39e0e79c9f..38d9783ac6d6 100644
--- a/arch/arm/mach-omap1/board-nokia770.c
+++ b/arch/arm/mach-omap1/board-nokia770.c
@@ -20,21 +20,21 @@
20#include <linux/workqueue.h> 20#include <linux/workqueue.h>
21#include <linux/delay.h> 21#include <linux/delay.h>
22 22
23#include <asm/hardware.h> 23#include <mach/hardware.h>
24#include <asm/mach-types.h> 24#include <asm/mach-types.h>
25#include <asm/mach/arch.h> 25#include <asm/mach/arch.h>
26#include <asm/mach/map.h> 26#include <asm/mach/map.h>
27 27
28#include <asm/arch/gpio.h> 28#include <mach/gpio.h>
29#include <asm/arch/mux.h> 29#include <mach/mux.h>
30#include <asm/arch/usb.h> 30#include <mach/usb.h>
31#include <asm/arch/board.h> 31#include <mach/board.h>
32#include <asm/arch/keypad.h> 32#include <mach/keypad.h>
33#include <asm/arch/common.h> 33#include <mach/common.h>
34#include <asm/arch/dsp_common.h> 34#include <mach/dsp_common.h>
35#include <asm/arch/aic23.h> 35#include <mach/aic23.h>
36#include <asm/arch/omapfb.h> 36#include <mach/omapfb.h>
37#include <asm/arch/lcd_mipid.h> 37#include <mach/lcd_mipid.h>
38 38
39#define ADS7846_PENDOWN_GPIO 15 39#define ADS7846_PENDOWN_GPIO 15
40 40
diff --git a/arch/arm/mach-omap1/board-osk.c b/arch/arm/mach-omap1/board-osk.c
index 41f94f6fc15c..3e766e49f7cc 100644
--- a/arch/arm/mach-omap1/board-osk.c
+++ b/arch/arm/mach-omap1/board-osk.c
@@ -39,7 +39,7 @@
39 39
40#include <linux/i2c/tps65010.h> 40#include <linux/i2c/tps65010.h>
41 41
42#include <asm/hardware.h> 42#include <mach/hardware.h>
43#include <asm/gpio.h> 43#include <asm/gpio.h>
44 44
45#include <asm/mach-types.h> 45#include <asm/mach-types.h>
@@ -47,12 +47,12 @@
47#include <asm/mach/map.h> 47#include <asm/mach/map.h>
48#include <asm/mach/flash.h> 48#include <asm/mach/flash.h>
49 49
50#include <asm/arch/usb.h> 50#include <mach/usb.h>
51#include <asm/arch/mux.h> 51#include <mach/mux.h>
52#include <asm/arch/tc.h> 52#include <mach/tc.h>
53#include <asm/arch/common.h> 53#include <mach/common.h>
54#include <asm/arch/mcbsp.h> 54#include <mach/mcbsp.h>
55#include <asm/arch/omap-alsa.h> 55#include <mach/omap-alsa.h>
56 56
57static struct mtd_partition osk_partitions[] = { 57static struct mtd_partition osk_partitions[] = {
58 /* bootloader (U-Boot, etc) in first sector */ 58 /* bootloader (U-Boot, etc) in first sector */
@@ -340,7 +340,7 @@ static struct omap_board_config_kernel osk_config[] __initdata = {
340#include <linux/spi/spi.h> 340#include <linux/spi/spi.h>
341#include <linux/spi/ads7846.h> 341#include <linux/spi/ads7846.h>
342 342
343#include <asm/arch/keypad.h> 343#include <mach/keypad.h>
344 344
345static const int osk_keymap[] = { 345static const int osk_keymap[] = {
346 /* KEY(col, row, code) */ 346 /* KEY(col, row, code) */
diff --git a/arch/arm/mach-omap1/board-palmte.c b/arch/arm/mach-omap1/board-palmte.c
index a4d20127a60e..b58043644a6f 100644
--- a/arch/arm/mach-omap1/board-palmte.c
+++ b/arch/arm/mach-omap1/board-palmte.c
@@ -27,23 +27,23 @@
27#include <linux/interrupt.h> 27#include <linux/interrupt.h>
28#include <linux/apm-emulation.h> 28#include <linux/apm-emulation.h>
29 29
30#include <asm/hardware.h> 30#include <mach/hardware.h>
31#include <asm/mach-types.h> 31#include <asm/mach-types.h>
32#include <asm/mach/arch.h> 32#include <asm/mach/arch.h>
33#include <asm/mach/map.h> 33#include <asm/mach/map.h>
34#include <asm/mach/flash.h> 34#include <asm/mach/flash.h>
35 35
36#include <asm/arch/gpio.h> 36#include <mach/gpio.h>
37#include <asm/arch/mux.h> 37#include <mach/mux.h>
38#include <asm/arch/usb.h> 38#include <mach/usb.h>
39#include <asm/arch/tc.h> 39#include <mach/tc.h>
40#include <asm/arch/dma.h> 40#include <mach/dma.h>
41#include <asm/arch/board.h> 41#include <mach/board.h>
42#include <asm/arch/irda.h> 42#include <mach/irda.h>
43#include <asm/arch/keypad.h> 43#include <mach/keypad.h>
44#include <asm/arch/common.h> 44#include <mach/common.h>
45#include <asm/arch/mcbsp.h> 45#include <mach/mcbsp.h>
46#include <asm/arch/omap-alsa.h> 46#include <mach/omap-alsa.h>
47 47
48static void __init omap_palmte_init_irq(void) 48static void __init omap_palmte_init_irq(void)
49{ 49{
diff --git a/arch/arm/mach-omap1/board-palmtt.c b/arch/arm/mach-omap1/board-palmtt.c
index 2a033689f9f4..40f9860a09df 100644
--- a/arch/arm/mach-omap1/board-palmtt.c
+++ b/arch/arm/mach-omap1/board-palmtt.c
@@ -23,24 +23,24 @@
23#include <linux/mtd/partitions.h> 23#include <linux/mtd/partitions.h>
24#include <linux/leds.h> 24#include <linux/leds.h>
25 25
26#include <asm/hardware.h> 26#include <mach/hardware.h>
27#include <asm/mach-types.h> 27#include <asm/mach-types.h>
28#include <asm/mach/arch.h> 28#include <asm/mach/arch.h>
29#include <asm/mach/map.h> 29#include <asm/mach/map.h>
30#include <asm/mach/flash.h> 30#include <asm/mach/flash.h>
31 31
32#include <asm/arch/led.h> 32#include <mach/led.h>
33#include <asm/arch/mcbsp.h> 33#include <mach/mcbsp.h>
34#include <asm/arch/gpio.h> 34#include <mach/gpio.h>
35#include <asm/arch/mux.h> 35#include <mach/mux.h>
36#include <asm/arch/usb.h> 36#include <mach/usb.h>
37#include <asm/arch/dma.h> 37#include <mach/dma.h>
38#include <asm/arch/tc.h> 38#include <mach/tc.h>
39#include <asm/arch/board.h> 39#include <mach/board.h>
40#include <asm/arch/irda.h> 40#include <mach/irda.h>
41#include <asm/arch/keypad.h> 41#include <mach/keypad.h>
42#include <asm/arch/common.h> 42#include <mach/common.h>
43#include <asm/arch/omap-alsa.h> 43#include <mach/omap-alsa.h>
44 44
45#include <linux/spi/spi.h> 45#include <linux/spi/spi.h>
46#include <linux/spi/ads7846.h> 46#include <linux/spi/ads7846.h>
diff --git a/arch/arm/mach-omap1/board-palmz71.c b/arch/arm/mach-omap1/board-palmz71.c
index 34389b63b0ec..e719294250b1 100644
--- a/arch/arm/mach-omap1/board-palmz71.c
+++ b/arch/arm/mach-omap1/board-palmz71.c
@@ -26,23 +26,23 @@
26#include <linux/mtd/mtd.h> 26#include <linux/mtd/mtd.h>
27#include <linux/mtd/partitions.h> 27#include <linux/mtd/partitions.h>
28 28
29#include <asm/hardware.h> 29#include <mach/hardware.h>
30#include <asm/mach-types.h> 30#include <asm/mach-types.h>
31#include <asm/mach/arch.h> 31#include <asm/mach/arch.h>
32#include <asm/mach/map.h> 32#include <asm/mach/map.h>
33#include <asm/mach/flash.h> 33#include <asm/mach/flash.h>
34 34
35#include <asm/arch/mcbsp.h> 35#include <mach/mcbsp.h>
36#include <asm/arch/gpio.h> 36#include <mach/gpio.h>
37#include <asm/arch/mux.h> 37#include <mach/mux.h>
38#include <asm/arch/usb.h> 38#include <mach/usb.h>
39#include <asm/arch/dma.h> 39#include <mach/dma.h>
40#include <asm/arch/tc.h> 40#include <mach/tc.h>
41#include <asm/arch/board.h> 41#include <mach/board.h>
42#include <asm/arch/irda.h> 42#include <mach/irda.h>
43#include <asm/arch/keypad.h> 43#include <mach/keypad.h>
44#include <asm/arch/common.h> 44#include <mach/common.h>
45#include <asm/arch/omap-alsa.h> 45#include <mach/omap-alsa.h>
46 46
47#include <linux/spi/spi.h> 47#include <linux/spi/spi.h>
48#include <linux/spi/ads7846.h> 48#include <linux/spi/ads7846.h>
diff --git a/arch/arm/mach-omap1/board-perseus2.c b/arch/arm/mach-omap1/board-perseus2.c
index 94bc0745ab2c..b715917bfdaf 100644
--- a/arch/arm/mach-omap1/board-perseus2.c
+++ b/arch/arm/mach-omap1/board-perseus2.c
@@ -20,20 +20,20 @@
20#include <linux/mtd/partitions.h> 20#include <linux/mtd/partitions.h>
21#include <linux/input.h> 21#include <linux/input.h>
22 22
23#include <asm/hardware.h> 23#include <mach/hardware.h>
24#include <asm/mach-types.h> 24#include <asm/mach-types.h>
25#include <asm/mach/arch.h> 25#include <asm/mach/arch.h>
26#include <asm/mach/flash.h> 26#include <asm/mach/flash.h>
27#include <asm/mach/map.h> 27#include <asm/mach/map.h>
28 28
29#include <asm/arch/tc.h> 29#include <mach/tc.h>
30#include <asm/arch/gpio.h> 30#include <mach/gpio.h>
31#include <asm/arch/mux.h> 31#include <mach/mux.h>
32#include <asm/arch/fpga.h> 32#include <mach/fpga.h>
33#include <asm/arch/nand.h> 33#include <mach/nand.h>
34#include <asm/arch/keypad.h> 34#include <mach/keypad.h>
35#include <asm/arch/common.h> 35#include <mach/common.h>
36#include <asm/arch/board.h> 36#include <mach/board.h>
37 37
38static int p2_keymap[] = { 38static int p2_keymap[] = {
39 KEY(0,0,KEY_UP), 39 KEY(0,0,KEY_UP),
diff --git a/arch/arm/mach-omap1/board-sx1-mmc.c b/arch/arm/mach-omap1/board-sx1-mmc.c
index 8c93d47719e8..0be4ebaa2842 100644
--- a/arch/arm/mach-omap1/board-sx1-mmc.c
+++ b/arch/arm/mach-omap1/board-sx1-mmc.c
@@ -12,9 +12,9 @@
12 * published by the Free Software Foundation. 12 * published by the Free Software Foundation.
13 */ 13 */
14 14
15#include <asm/arch/hardware.h> 15#include <mach/hardware.h>
16#include <asm/arch/mmc.h> 16#include <mach/mmc.h>
17#include <asm/arch/gpio.h> 17#include <mach/gpio.h>
18 18
19#ifdef CONFIG_MMC_OMAP 19#ifdef CONFIG_MMC_OMAP
20static int slot_cover_open; 20static int slot_cover_open;
diff --git a/arch/arm/mach-omap1/board-sx1.c b/arch/arm/mach-omap1/board-sx1.c
index e473fa6d4a5f..130bcc6fd082 100644
--- a/arch/arm/mach-omap1/board-sx1.c
+++ b/arch/arm/mach-omap1/board-sx1.c
@@ -26,22 +26,22 @@
26#include <linux/i2c.h> 26#include <linux/i2c.h>
27#include <linux/errno.h> 27#include <linux/errno.h>
28 28
29#include <asm/hardware.h> 29#include <mach/hardware.h>
30#include <asm/mach-types.h> 30#include <asm/mach-types.h>
31#include <asm/mach/arch.h> 31#include <asm/mach/arch.h>
32#include <asm/mach/flash.h> 32#include <asm/mach/flash.h>
33#include <asm/mach/map.h> 33#include <asm/mach/map.h>
34 34
35#include <asm/arch/gpio.h> 35#include <mach/gpio.h>
36#include <asm/arch/mux.h> 36#include <mach/mux.h>
37#include <asm/arch/irda.h> 37#include <mach/irda.h>
38#include <asm/arch/usb.h> 38#include <mach/usb.h>
39#include <asm/arch/tc.h> 39#include <mach/tc.h>
40#include <asm/arch/board.h> 40#include <mach/board.h>
41#include <asm/arch/common.h> 41#include <mach/common.h>
42#include <asm/arch/mcbsp.h> 42#include <mach/mcbsp.h>
43#include <asm/arch/omap-alsa.h> 43#include <mach/omap-alsa.h>
44#include <asm/arch/keypad.h> 44#include <mach/keypad.h>
45 45
46/* Write to I2C device */ 46/* Write to I2C device */
47int sx1_i2c_write_byte(u8 devaddr, u8 regoffset, u8 value) 47int sx1_i2c_write_byte(u8 devaddr, u8 regoffset, u8 value)
diff --git a/arch/arm/mach-omap1/board-voiceblue.c b/arch/arm/mach-omap1/board-voiceblue.c
index 8948d45a2769..213b48787102 100644
--- a/arch/arm/mach-omap1/board-voiceblue.c
+++ b/arch/arm/mach-omap1/board-voiceblue.c
@@ -22,17 +22,17 @@
22#include <linux/serial_8250.h> 22#include <linux/serial_8250.h>
23#include <linux/serial_reg.h> 23#include <linux/serial_reg.h>
24 24
25#include <asm/hardware.h> 25#include <mach/hardware.h>
26#include <asm/mach-types.h> 26#include <asm/mach-types.h>
27#include <asm/mach/arch.h> 27#include <asm/mach/arch.h>
28#include <asm/mach/flash.h> 28#include <asm/mach/flash.h>
29#include <asm/mach/map.h> 29#include <asm/mach/map.h>
30 30
31#include <asm/arch/common.h> 31#include <mach/common.h>
32#include <asm/arch/gpio.h> 32#include <mach/gpio.h>
33#include <asm/arch/mux.h> 33#include <mach/mux.h>
34#include <asm/arch/tc.h> 34#include <mach/tc.h>
35#include <asm/arch/usb.h> 35#include <mach/usb.h>
36 36
37static struct plat_serial8250_port voiceblue_ports[] = { 37static struct plat_serial8250_port voiceblue_ports[] = {
38 { 38 {
diff --git a/arch/arm/mach-omap1/clock.c b/arch/arm/mach-omap1/clock.c
index 4ea2933f887d..5965cf09f8c4 100644
--- a/arch/arm/mach-omap1/clock.c
+++ b/arch/arm/mach-omap1/clock.c
@@ -21,10 +21,10 @@
21#include <asm/io.h> 21#include <asm/io.h>
22#include <asm/mach-types.h> 22#include <asm/mach-types.h>
23 23
24#include <asm/arch/cpu.h> 24#include <mach/cpu.h>
25#include <asm/arch/usb.h> 25#include <mach/usb.h>
26#include <asm/arch/clock.h> 26#include <mach/clock.h>
27#include <asm/arch/sram.h> 27#include <mach/sram.h>
28 28
29#include "clock.h" 29#include "clock.h"
30 30
diff --git a/arch/arm/mach-omap1/devices.c b/arch/arm/mach-omap1/devices.c
index da8a3ac47e13..ab708d4c597e 100644
--- a/arch/arm/mach-omap1/devices.c
+++ b/arch/arm/mach-omap1/devices.c
@@ -14,15 +14,14 @@
14#include <linux/init.h> 14#include <linux/init.h>
15#include <linux/platform_device.h> 15#include <linux/platform_device.h>
16 16
17#include <asm/hardware.h> 17#include <mach/hardware.h>
18#include <asm/io.h> 18#include <asm/io.h>
19#include <asm/mach-types.h>
20#include <asm/mach/map.h> 19#include <asm/mach/map.h>
21 20
22#include <asm/arch/tc.h> 21#include <mach/tc.h>
23#include <asm/arch/board.h> 22#include <mach/board.h>
24#include <asm/arch/mux.h> 23#include <mach/mux.h>
25#include <asm/arch/gpio.h> 24#include <mach/gpio.h>
26 25
27/*-------------------------------------------------------------------------*/ 26/*-------------------------------------------------------------------------*/
28 27
diff --git a/arch/arm/mach-omap1/fpga.c b/arch/arm/mach-omap1/fpga.c
index d963125ed755..4449d86095f6 100644
--- a/arch/arm/mach-omap1/fpga.c
+++ b/arch/arm/mach-omap1/fpga.c
@@ -22,13 +22,13 @@
22#include <linux/device.h> 22#include <linux/device.h>
23#include <linux/errno.h> 23#include <linux/errno.h>
24 24
25#include <asm/hardware.h> 25#include <mach/hardware.h>
26#include <asm/io.h> 26#include <asm/io.h>
27#include <asm/irq.h> 27#include <asm/irq.h>
28#include <asm/mach/irq.h> 28#include <asm/mach/irq.h>
29 29
30#include <asm/arch/fpga.h> 30#include <mach/fpga.h>
31#include <asm/arch/gpio.h> 31#include <mach/gpio.h>
32 32
33static void fpga_mask_irq(unsigned int irq) 33static void fpga_mask_irq(unsigned int irq)
34{ 34{
diff --git a/arch/arm/mach-omap1/io.c b/arch/arm/mach-omap1/io.c
index 81c4e738506c..2b9750b200ce 100644
--- a/arch/arm/mach-omap1/io.c
+++ b/arch/arm/mach-omap1/io.c
@@ -15,8 +15,8 @@
15#include <asm/tlb.h> 15#include <asm/tlb.h>
16#include <asm/mach/map.h> 16#include <asm/mach/map.h>
17#include <asm/io.h> 17#include <asm/io.h>
18#include <asm/arch/mux.h> 18#include <mach/mux.h>
19#include <asm/arch/tc.h> 19#include <mach/tc.h>
20 20
21extern int omap1_clk_init(void); 21extern int omap1_clk_init(void);
22extern void omap_check_revision(void); 22extern void omap_check_revision(void);
diff --git a/arch/arm/mach-omap1/irq.c b/arch/arm/mach-omap1/irq.c
index 1da9d59a0347..0ec6c1ec4250 100644
--- a/arch/arm/mach-omap1/irq.c
+++ b/arch/arm/mach-omap1/irq.c
@@ -41,11 +41,11 @@
41#include <linux/sched.h> 41#include <linux/sched.h>
42#include <linux/interrupt.h> 42#include <linux/interrupt.h>
43 43
44#include <asm/hardware.h> 44#include <mach/hardware.h>
45#include <asm/irq.h> 45#include <asm/irq.h>
46#include <asm/mach/irq.h> 46#include <asm/mach/irq.h>
47#include <asm/arch/gpio.h> 47#include <mach/gpio.h>
48#include <asm/arch/cpu.h> 48#include <mach/cpu.h>
49 49
50#include <asm/io.h> 50#include <asm/io.h>
51 51
diff --git a/arch/arm/mach-omap1/leds-h2p2-debug.c b/arch/arm/mach-omap1/leds-h2p2-debug.c
index 8976fbb21f7c..610f51f18741 100644
--- a/arch/arm/mach-omap1/leds-h2p2-debug.c
+++ b/arch/arm/mach-omap1/leds-h2p2-debug.c
@@ -14,13 +14,13 @@
14#include <linux/sched.h> 14#include <linux/sched.h>
15 15
16#include <asm/io.h> 16#include <asm/io.h>
17#include <asm/hardware.h> 17#include <mach/hardware.h>
18#include <asm/leds.h> 18#include <asm/leds.h>
19#include <asm/system.h> 19#include <asm/system.h>
20#include <asm/mach-types.h> 20#include <asm/mach-types.h>
21 21
22#include <asm/arch/fpga.h> 22#include <mach/fpga.h>
23#include <asm/arch/gpio.h> 23#include <mach/gpio.h>
24 24
25#include "leds.h" 25#include "leds.h"
26 26
diff --git a/arch/arm/mach-omap1/leds-innovator.c b/arch/arm/mach-omap1/leds-innovator.c
index e7835d6f53a0..9b99c2894623 100644
--- a/arch/arm/mach-omap1/leds-innovator.c
+++ b/arch/arm/mach-omap1/leds-innovator.c
@@ -3,7 +3,7 @@
3 */ 3 */
4#include <linux/init.h> 4#include <linux/init.h>
5 5
6#include <asm/hardware.h> 6#include <mach/hardware.h>
7#include <asm/leds.h> 7#include <asm/leds.h>
8#include <asm/system.h> 8#include <asm/system.h>
9 9
diff --git a/arch/arm/mach-omap1/leds-osk.c b/arch/arm/mach-omap1/leds-osk.c
index 754383dde807..98e789622dfd 100644
--- a/arch/arm/mach-omap1/leds-osk.c
+++ b/arch/arm/mach-omap1/leds-osk.c
@@ -5,11 +5,11 @@
5 */ 5 */
6#include <linux/init.h> 6#include <linux/init.h>
7 7
8#include <asm/hardware.h> 8#include <mach/hardware.h>
9#include <asm/leds.h> 9#include <asm/leds.h>
10#include <asm/system.h> 10#include <asm/system.h>
11 11
12#include <asm/arch/gpio.h> 12#include <mach/gpio.h>
13 13
14#include "leds.h" 14#include "leds.h"
15 15
diff --git a/arch/arm/mach-omap1/leds.c b/arch/arm/mach-omap1/leds.c
index 3f9dcac4fd41..6cdad93c4a00 100644
--- a/arch/arm/mach-omap1/leds.c
+++ b/arch/arm/mach-omap1/leds.c
@@ -9,8 +9,8 @@
9#include <asm/leds.h> 9#include <asm/leds.h>
10#include <asm/mach-types.h> 10#include <asm/mach-types.h>
11 11
12#include <asm/arch/gpio.h> 12#include <mach/gpio.h>
13#include <asm/arch/mux.h> 13#include <mach/mux.h>
14 14
15#include "leds.h" 15#include "leds.h"
16 16
diff --git a/arch/arm/mach-omap1/mailbox.c b/arch/arm/mach-omap1/mailbox.c
index bad1e7152d8e..af44eab1ed24 100644
--- a/arch/arm/mach-omap1/mailbox.c
+++ b/arch/arm/mach-omap1/mailbox.c
@@ -13,8 +13,8 @@
13#include <linux/resource.h> 13#include <linux/resource.h>
14#include <linux/interrupt.h> 14#include <linux/interrupt.h>
15#include <linux/platform_device.h> 15#include <linux/platform_device.h>
16#include <asm/arch/mailbox.h> 16#include <mach/mailbox.h>
17#include <asm/arch/irqs.h> 17#include <mach/irqs.h>
18#include <asm/io.h> 18#include <asm/io.h>
19 19
20#define MAILBOX_ARM2DSP1 0x00 20#define MAILBOX_ARM2DSP1 0x00
diff --git a/arch/arm/mach-omap1/mcbsp.c b/arch/arm/mach-omap1/mcbsp.c
index 2d2c2522b048..826010d5d014 100644
--- a/arch/arm/mach-omap1/mcbsp.c
+++ b/arch/arm/mach-omap1/mcbsp.c
@@ -17,11 +17,11 @@
17#include <linux/io.h> 17#include <linux/io.h>
18#include <linux/platform_device.h> 18#include <linux/platform_device.h>
19 19
20#include <asm/arch/dma.h> 20#include <mach/dma.h>
21#include <asm/arch/mux.h> 21#include <mach/mux.h>
22#include <asm/arch/cpu.h> 22#include <mach/cpu.h>
23#include <asm/arch/mcbsp.h> 23#include <mach/mcbsp.h>
24#include <asm/arch/dsp_common.h> 24#include <mach/dsp_common.h>
25 25
26#define DPS_RSTCT2_PER_EN (1 << 0) 26#define DPS_RSTCT2_PER_EN (1 << 0)
27#define DSP_RSTCT2_WD_PER_EN (1 << 1) 27#define DSP_RSTCT2_WD_PER_EN (1 << 1)
diff --git a/arch/arm/mach-omap1/mux.c b/arch/arm/mach-omap1/mux.c
index e207bf7cb853..898516e362e7 100644
--- a/arch/arm/mach-omap1/mux.c
+++ b/arch/arm/mach-omap1/mux.c
@@ -28,7 +28,7 @@
28#include <asm/io.h> 28#include <asm/io.h>
29#include <linux/spinlock.h> 29#include <linux/spinlock.h>
30 30
31#include <asm/arch/mux.h> 31#include <mach/mux.h>
32 32
33#ifdef CONFIG_OMAP_MUX 33#ifdef CONFIG_OMAP_MUX
34 34
diff --git a/arch/arm/mach-omap1/pm.c b/arch/arm/mach-omap1/pm.c
index 742f79e73bd7..63c4ea18b1ca 100644
--- a/arch/arm/mach-omap1/pm.c
+++ b/arch/arm/mach-omap1/pm.c
@@ -47,17 +47,16 @@
47#include <asm/atomic.h> 47#include <asm/atomic.h>
48#include <asm/mach/time.h> 48#include <asm/mach/time.h>
49#include <asm/mach/irq.h> 49#include <asm/mach/irq.h>
50#include <asm/mach-types.h> 50
51 51#include <mach/cpu.h>
52#include <asm/arch/cpu.h> 52#include <mach/irqs.h>
53#include <asm/arch/irqs.h> 53#include <mach/clock.h>
54#include <asm/arch/clock.h> 54#include <mach/sram.h>
55#include <asm/arch/sram.h> 55#include <mach/tc.h>
56#include <asm/arch/tc.h> 56#include <mach/pm.h>
57#include <asm/arch/pm.h> 57#include <mach/mux.h>
58#include <asm/arch/mux.h> 58#include <mach/dma.h>
59#include <asm/arch/dma.h> 59#include <mach/dmtimer.h>
60#include <asm/arch/dmtimer.h>
61 60
62static unsigned int arm_sleep_save[ARM_SLEEP_SAVE_SIZE]; 61static unsigned int arm_sleep_save[ARM_SLEEP_SAVE_SIZE];
63static unsigned short dsp_sleep_save[DSP_SLEEP_SAVE_SIZE]; 62static unsigned short dsp_sleep_save[DSP_SLEEP_SAVE_SIZE];
diff --git a/arch/arm/mach-omap1/serial.c b/arch/arm/mach-omap1/serial.c
index 10a4fe88b2fd..0e25a996bb4c 100644
--- a/arch/arm/mach-omap1/serial.c
+++ b/arch/arm/mach-omap1/serial.c
@@ -22,12 +22,12 @@
22#include <asm/io.h> 22#include <asm/io.h>
23#include <asm/mach-types.h> 23#include <asm/mach-types.h>
24 24
25#include <asm/arch/board.h> 25#include <mach/board.h>
26#include <asm/arch/mux.h> 26#include <mach/mux.h>
27#include <asm/arch/gpio.h> 27#include <mach/gpio.h>
28#include <asm/arch/fpga.h> 28#include <mach/fpga.h>
29#ifdef CONFIG_PM 29#ifdef CONFIG_PM
30#include <asm/arch/pm.h> 30#include <mach/pm.h>
31#endif 31#endif
32 32
33static struct clk * uart1_ck; 33static struct clk * uart1_ck;
diff --git a/arch/arm/mach-omap1/sleep.S b/arch/arm/mach-omap1/sleep.S
index 68f5b39030b6..f3eac932092d 100644
--- a/arch/arm/mach-omap1/sleep.S
+++ b/arch/arm/mach-omap1/sleep.S
@@ -34,8 +34,8 @@
34 34
35#include <linux/linkage.h> 35#include <linux/linkage.h>
36#include <asm/assembler.h> 36#include <asm/assembler.h>
37#include <asm/arch/io.h> 37#include <mach/io.h>
38#include <asm/arch/pm.h> 38#include <mach/pm.h>
39 39
40 .text 40 .text
41 41
diff --git a/arch/arm/mach-omap1/sram.S b/arch/arm/mach-omap1/sram.S
index 126d252062d7..261cdc48228b 100644
--- a/arch/arm/mach-omap1/sram.S
+++ b/arch/arm/mach-omap1/sram.S
@@ -10,8 +10,8 @@
10 10
11#include <linux/linkage.h> 11#include <linux/linkage.h>
12#include <asm/assembler.h> 12#include <asm/assembler.h>
13#include <asm/arch/io.h> 13#include <mach/io.h>
14#include <asm/hardware.h> 14#include <mach/hardware.h>
15 15
16 .text 16 .text
17 17
diff --git a/arch/arm/mach-omap1/time.c b/arch/arm/mach-omap1/time.c
index 5d2b270935a2..e54708595ecf 100644
--- a/arch/arm/mach-omap1/time.c
+++ b/arch/arm/mach-omap1/time.c
@@ -45,7 +45,7 @@
45#include <linux/clockchips.h> 45#include <linux/clockchips.h>
46 46
47#include <asm/system.h> 47#include <asm/system.h>
48#include <asm/hardware.h> 48#include <mach/hardware.h>
49#include <asm/io.h> 49#include <asm/io.h>
50#include <asm/leds.h> 50#include <asm/leds.h>
51#include <asm/irq.h> 51#include <asm/irq.h>
diff --git a/arch/arm/mach-omap1/timer32k.c b/arch/arm/mach-omap1/timer32k.c
index fbbdb806c95a..e67760189d14 100644
--- a/arch/arm/mach-omap1/timer32k.c
+++ b/arch/arm/mach-omap1/timer32k.c
@@ -46,13 +46,13 @@
46#include <linux/clockchips.h> 46#include <linux/clockchips.h>
47 47
48#include <asm/system.h> 48#include <asm/system.h>
49#include <asm/hardware.h> 49#include <mach/hardware.h>
50#include <asm/io.h> 50#include <asm/io.h>
51#include <asm/leds.h> 51#include <asm/leds.h>
52#include <asm/irq.h> 52#include <asm/irq.h>
53#include <asm/mach/irq.h> 53#include <asm/mach/irq.h>
54#include <asm/mach/time.h> 54#include <asm/mach/time.h>
55#include <asm/arch/dmtimer.h> 55#include <mach/dmtimer.h>
56 56
57struct sys_timer omap_timer; 57struct sys_timer omap_timer;
58 58
diff --git a/arch/arm/mach-omap2/board-2430sdp.c b/arch/arm/mach-omap2/board-2430sdp.c
index 1682eb77c46d..d4d6385cad7c 100644
--- a/arch/arm/mach-omap2/board-2430sdp.c
+++ b/arch/arm/mach-omap2/board-2430sdp.c
@@ -22,17 +22,17 @@
22#include <linux/err.h> 22#include <linux/err.h>
23#include <linux/clk.h> 23#include <linux/clk.h>
24 24
25#include <asm/hardware.h> 25#include <mach/hardware.h>
26#include <asm/mach-types.h> 26#include <asm/mach-types.h>
27#include <asm/mach/arch.h> 27#include <asm/mach/arch.h>
28#include <asm/mach/map.h> 28#include <asm/mach/map.h>
29#include <asm/mach/flash.h> 29#include <asm/mach/flash.h>
30 30
31#include <asm/arch/gpio.h> 31#include <mach/gpio.h>
32#include <asm/arch/mux.h> 32#include <mach/mux.h>
33#include <asm/arch/board.h> 33#include <mach/board.h>
34#include <asm/arch/common.h> 34#include <mach/common.h>
35#include <asm/arch/gpmc.h> 35#include <mach/gpmc.h>
36 36
37#include <asm/io.h> 37#include <asm/io.h>
38 38
diff --git a/arch/arm/mach-omap2/board-apollon.c b/arch/arm/mach-omap2/board-apollon.c
index 870b34972d3b..989ad152d7f8 100644
--- a/arch/arm/mach-omap2/board-apollon.c
+++ b/arch/arm/mach-omap2/board-apollon.c
@@ -29,19 +29,19 @@
29#include <linux/err.h> 29#include <linux/err.h>
30#include <linux/clk.h> 30#include <linux/clk.h>
31 31
32#include <asm/hardware.h> 32#include <mach/hardware.h>
33#include <asm/mach-types.h> 33#include <asm/mach-types.h>
34#include <asm/mach/arch.h> 34#include <asm/mach/arch.h>
35#include <asm/mach/flash.h> 35#include <asm/mach/flash.h>
36 36
37#include <asm/arch/gpio.h> 37#include <mach/gpio.h>
38#include <asm/arch/led.h> 38#include <mach/led.h>
39#include <asm/arch/mux.h> 39#include <mach/mux.h>
40#include <asm/arch/usb.h> 40#include <mach/usb.h>
41#include <asm/arch/board.h> 41#include <mach/board.h>
42#include <asm/arch/common.h> 42#include <mach/common.h>
43#include <asm/arch/gpmc.h> 43#include <mach/gpmc.h>
44#include <asm/arch/control.h> 44#include <mach/control.h>
45 45
46/* LED & Switch macros */ 46/* LED & Switch macros */
47#define LED0_GPIO13 13 47#define LED0_GPIO13 13
diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c
index df8be081e159..9ba097868e72 100644
--- a/arch/arm/mach-omap2/board-generic.c
+++ b/arch/arm/mach-omap2/board-generic.c
@@ -20,16 +20,16 @@
20#include <linux/init.h> 20#include <linux/init.h>
21#include <linux/device.h> 21#include <linux/device.h>
22 22
23#include <asm/hardware.h> 23#include <mach/hardware.h>
24#include <asm/mach-types.h> 24#include <asm/mach-types.h>
25#include <asm/mach/arch.h> 25#include <asm/mach/arch.h>
26#include <asm/mach/map.h> 26#include <asm/mach/map.h>
27 27
28#include <asm/arch/gpio.h> 28#include <mach/gpio.h>
29#include <asm/arch/mux.h> 29#include <mach/mux.h>
30#include <asm/arch/usb.h> 30#include <mach/usb.h>
31#include <asm/arch/board.h> 31#include <mach/board.h>
32#include <asm/arch/common.h> 32#include <mach/common.h>
33 33
34static void __init omap_generic_init_irq(void) 34static void __init omap_generic_init_irq(void)
35{ 35{
diff --git a/arch/arm/mach-omap2/board-h4.c b/arch/arm/mach-omap2/board-h4.c
index 0d28f6897c8e..9e2624ca70a2 100644
--- a/arch/arm/mach-omap2/board-h4.c
+++ b/arch/arm/mach-omap2/board-h4.c
@@ -22,24 +22,24 @@
22#include <linux/err.h> 22#include <linux/err.h>
23#include <linux/clk.h> 23#include <linux/clk.h>
24 24
25#include <asm/hardware.h> 25#include <mach/hardware.h>
26#include <asm/mach-types.h> 26#include <asm/mach-types.h>
27#include <asm/mach/arch.h> 27#include <asm/mach/arch.h>
28#include <asm/mach/map.h> 28#include <asm/mach/map.h>
29#include <asm/mach/flash.h> 29#include <asm/mach/flash.h>
30 30
31#include <asm/arch/control.h> 31#include <mach/control.h>
32#include <asm/arch/gpio.h> 32#include <mach/gpio.h>
33#include <asm/arch/gpioexpander.h> 33#include <mach/gpioexpander.h>
34#include <asm/arch/mux.h> 34#include <mach/mux.h>
35#include <asm/arch/usb.h> 35#include <mach/usb.h>
36#include <asm/arch/irda.h> 36#include <mach/irda.h>
37#include <asm/arch/board.h> 37#include <mach/board.h>
38#include <asm/arch/common.h> 38#include <mach/common.h>
39#include <asm/arch/keypad.h> 39#include <mach/keypad.h>
40#include <asm/arch/menelaus.h> 40#include <mach/menelaus.h>
41#include <asm/arch/dma.h> 41#include <mach/dma.h>
42#include <asm/arch/gpmc.h> 42#include <mach/gpmc.h>
43 43
44#include <asm/io.h> 44#include <asm/io.h>
45 45
diff --git a/arch/arm/mach-omap2/clock.c b/arch/arm/mach-omap2/clock.c
index 15675bce8012..1d891e4a6933 100644
--- a/arch/arm/mach-omap2/clock.c
+++ b/arch/arm/mach-omap2/clock.c
@@ -25,9 +25,9 @@
25 25
26#include <asm/io.h> 26#include <asm/io.h>
27 27
28#include <asm/arch/clock.h> 28#include <mach/clock.h>
29#include <asm/arch/sram.h> 29#include <mach/sram.h>
30#include <asm/arch/cpu.h> 30#include <mach/cpu.h>
31#include <asm/div64.h> 31#include <asm/div64.h>
32 32
33#include "memory.h" 33#include "memory.h"
diff --git a/arch/arm/mach-omap2/clock.h b/arch/arm/mach-omap2/clock.h
index 3cd37cb57c5a..626e5fa93b6a 100644
--- a/arch/arm/mach-omap2/clock.h
+++ b/arch/arm/mach-omap2/clock.h
@@ -16,7 +16,7 @@
16#ifndef __ARCH_ARM_MACH_OMAP2_CLOCK_H 16#ifndef __ARCH_ARM_MACH_OMAP2_CLOCK_H
17#define __ARCH_ARM_MACH_OMAP2_CLOCK_H 17#define __ARCH_ARM_MACH_OMAP2_CLOCK_H
18 18
19#include <asm/arch/clock.h> 19#include <mach/clock.h>
20 20
21/* The maximum error between a target DPLL rate and the rounded rate in Hz */ 21/* The maximum error between a target DPLL rate and the rounded rate in Hz */
22#define DEFAULT_DPLL_RATE_TOLERANCE 50000 22#define DEFAULT_DPLL_RATE_TOLERANCE 50000
diff --git a/arch/arm/mach-omap2/clock24xx.c b/arch/arm/mach-omap2/clock24xx.c
index aa567876651d..295e671e9cfd 100644
--- a/arch/arm/mach-omap2/clock24xx.c
+++ b/arch/arm/mach-omap2/clock24xx.c
@@ -28,8 +28,8 @@
28#include <linux/io.h> 28#include <linux/io.h>
29#include <linux/cpufreq.h> 29#include <linux/cpufreq.h>
30 30
31#include <asm/arch/clock.h> 31#include <mach/clock.h>
32#include <asm/arch/sram.h> 32#include <mach/sram.h>
33#include <asm/div64.h> 33#include <asm/div64.h>
34#include <asm/bitops.h> 34#include <asm/bitops.h>
35 35
diff --git a/arch/arm/mach-omap2/clock34xx.c b/arch/arm/mach-omap2/clock34xx.c
index 4263099b1ad3..3ff74952f835 100644
--- a/arch/arm/mach-omap2/clock34xx.c
+++ b/arch/arm/mach-omap2/clock34xx.c
@@ -26,8 +26,8 @@
26#include <linux/io.h> 26#include <linux/io.h>
27#include <linux/limits.h> 27#include <linux/limits.h>
28 28
29#include <asm/arch/clock.h> 29#include <mach/clock.h>
30#include <asm/arch/sram.h> 30#include <mach/sram.h>
31#include <asm/div64.h> 31#include <asm/div64.h>
32#include <asm/bitops.h> 32#include <asm/bitops.h>
33 33
diff --git a/arch/arm/mach-omap2/clock34xx.h b/arch/arm/mach-omap2/clock34xx.h
index 05757eb032bc..ec664457a11a 100644
--- a/arch/arm/mach-omap2/clock34xx.h
+++ b/arch/arm/mach-omap2/clock34xx.h
@@ -19,7 +19,7 @@
19#ifndef __ARCH_ARM_MACH_OMAP2_CLOCK34XX_H 19#ifndef __ARCH_ARM_MACH_OMAP2_CLOCK34XX_H
20#define __ARCH_ARM_MACH_OMAP2_CLOCK34XX_H 20#define __ARCH_ARM_MACH_OMAP2_CLOCK34XX_H
21 21
22#include <asm/arch/control.h> 22#include <mach/control.h>
23 23
24#include "clock.h" 24#include "clock.h"
25#include "cm.h" 25#include "cm.h"
diff --git a/arch/arm/mach-omap2/control.c b/arch/arm/mach-omap2/control.c
index 51f70300996f..5f3aad977842 100644
--- a/arch/arm/mach-omap2/control.c
+++ b/arch/arm/mach-omap2/control.c
@@ -15,8 +15,8 @@
15#include <linux/kernel.h> 15#include <linux/kernel.h>
16#include <linux/io.h> 16#include <linux/io.h>
17 17
18#include <asm/arch/common.h> 18#include <mach/common.h>
19#include <asm/arch/control.h> 19#include <mach/control.h>
20 20
21static void __iomem *omap2_ctrl_base; 21static void __iomem *omap2_ctrl_base;
22 22
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
index b603bc5f8e5b..7a7f02559075 100644
--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -14,15 +14,15 @@
14#include <linux/init.h> 14#include <linux/init.h>
15#include <linux/platform_device.h> 15#include <linux/platform_device.h>
16 16
17#include <asm/hardware.h> 17#include <mach/hardware.h>
18#include <asm/io.h> 18#include <asm/io.h>
19#include <asm/mach-types.h> 19#include <asm/mach-types.h>
20#include <asm/mach/map.h> 20#include <asm/mach/map.h>
21 21
22#include <asm/arch/tc.h> 22#include <mach/tc.h>
23#include <asm/arch/board.h> 23#include <mach/board.h>
24#include <asm/arch/mux.h> 24#include <mach/mux.h>
25#include <asm/arch/gpio.h> 25#include <mach/gpio.h>
26 26
27#if defined(CONFIG_I2C_OMAP) || defined(CONFIG_I2C_OMAP_MODULE) 27#if defined(CONFIG_I2C_OMAP) || defined(CONFIG_I2C_OMAP_MODULE)
28 28
@@ -142,7 +142,7 @@ static inline void omap_init_sti(void) {}
142 142
143#if defined(CONFIG_SPI_OMAP24XX) 143#if defined(CONFIG_SPI_OMAP24XX)
144 144
145#include <asm/arch/mcspi.h> 145#include <mach/mcspi.h>
146 146
147#define OMAP2_MCSPI1_BASE 0x48098000 147#define OMAP2_MCSPI1_BASE 0x48098000
148#define OMAP2_MCSPI2_BASE 0x4809a000 148#define OMAP2_MCSPI2_BASE 0x4809a000
diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c
index dbf68dc50ae2..f51d69bc457d 100644
--- a/arch/arm/mach-omap2/gpmc.c
+++ b/arch/arm/mach-omap2/gpmc.c
@@ -18,7 +18,7 @@
18 18
19#include <asm/io.h> 19#include <asm/io.h>
20#include <asm/mach-types.h> 20#include <asm/mach-types.h>
21#include <asm/arch/gpmc.h> 21#include <mach/gpmc.h>
22 22
23#undef DEBUG 23#undef DEBUG
24 24
diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
index dff4b16cead6..a5d4526ac4d6 100644
--- a/arch/arm/mach-omap2/id.c
+++ b/arch/arm/mach-omap2/id.c
@@ -17,8 +17,8 @@
17 17
18#include <asm/io.h> 18#include <asm/io.h>
19 19
20#include <asm/arch/control.h> 20#include <mach/control.h>
21#include <asm/arch/cpu.h> 21#include <mach/cpu.h>
22 22
23#if defined(CONFIG_ARCH_OMAP2420) 23#if defined(CONFIG_ARCH_OMAP2420)
24#define TAP_BASE io_p2v(0x48014000) 24#define TAP_BASE io_p2v(0x48014000)
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c
index 69c8174f3aac..987351f07d7b 100644
--- a/arch/arm/mach-omap2/io.c
+++ b/arch/arm/mach-omap2/io.c
@@ -21,8 +21,8 @@
21 21
22#include <asm/mach/map.h> 22#include <asm/mach/map.h>
23 23
24#include <asm/arch/mux.h> 24#include <mach/mux.h>
25#include <asm/arch/omapfb.h> 25#include <mach/omapfb.h>
26 26
27extern void omap_sram_init(void); 27extern void omap_sram_init(void);
28extern int omap2_clk_init(void); 28extern int omap2_clk_init(void);
diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c
index f064f725e724..9ef15b31d8fc 100644
--- a/arch/arm/mach-omap2/irq.c
+++ b/arch/arm/mach-omap2/irq.c
@@ -13,7 +13,7 @@
13#include <linux/kernel.h> 13#include <linux/kernel.h>
14#include <linux/init.h> 14#include <linux/init.h>
15#include <linux/interrupt.h> 15#include <linux/interrupt.h>
16#include <asm/hardware.h> 16#include <mach/hardware.h>
17#include <asm/mach/irq.h> 17#include <asm/mach/irq.h>
18#include <asm/irq.h> 18#include <asm/irq.h>
19#include <asm/io.h> 19#include <asm/io.h>
diff --git a/arch/arm/mach-omap2/mailbox.c b/arch/arm/mach-omap2/mailbox.c
index 4799561c5a9e..a480b96948e4 100644
--- a/arch/arm/mach-omap2/mailbox.c
+++ b/arch/arm/mach-omap2/mailbox.c
@@ -14,8 +14,8 @@
14#include <linux/clk.h> 14#include <linux/clk.h>
15#include <linux/err.h> 15#include <linux/err.h>
16#include <linux/platform_device.h> 16#include <linux/platform_device.h>
17#include <asm/arch/mailbox.h> 17#include <mach/mailbox.h>
18#include <asm/arch/irqs.h> 18#include <mach/irqs.h>
19#include <asm/io.h> 19#include <asm/io.h>
20 20
21#define MAILBOX_REVISION 0x00 21#define MAILBOX_REVISION 0x00
diff --git a/arch/arm/mach-omap2/mcbsp.c b/arch/arm/mach-omap2/mcbsp.c
index 17cf199d1130..27eb6e3ca926 100644
--- a/arch/arm/mach-omap2/mcbsp.c
+++ b/arch/arm/mach-omap2/mcbsp.c
@@ -17,10 +17,10 @@
17#include <linux/io.h> 17#include <linux/io.h>
18#include <linux/platform_device.h> 18#include <linux/platform_device.h>
19 19
20#include <asm/arch/dma.h> 20#include <mach/dma.h>
21#include <asm/arch/mux.h> 21#include <mach/mux.h>
22#include <asm/arch/cpu.h> 22#include <mach/cpu.h>
23#include <asm/arch/mcbsp.h> 23#include <mach/mcbsp.h>
24 24
25struct mcbsp_internal_clk { 25struct mcbsp_internal_clk {
26 struct clk clk; 26 struct clk clk;
diff --git a/arch/arm/mach-omap2/memory.c b/arch/arm/mach-omap2/memory.c
index 73cadb2c75cf..6b49cc9cbdcb 100644
--- a/arch/arm/mach-omap2/memory.c
+++ b/arch/arm/mach-omap2/memory.c
@@ -24,9 +24,9 @@
24 24
25#include <asm/io.h> 25#include <asm/io.h>
26 26
27#include <asm/arch/common.h> 27#include <mach/common.h>
28#include <asm/arch/clock.h> 28#include <mach/clock.h>
29#include <asm/arch/sram.h> 29#include <mach/sram.h>
30 30
31#include "prm.h" 31#include "prm.h"
32 32
diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c
index 8f98b20f30a1..443d07fef7f3 100644
--- a/arch/arm/mach-omap2/mux.c
+++ b/arch/arm/mach-omap2/mux.c
@@ -29,8 +29,8 @@
29#include <asm/io.h> 29#include <asm/io.h>
30#include <linux/spinlock.h> 30#include <linux/spinlock.h>
31 31
32#include <asm/arch/control.h> 32#include <mach/control.h>
33#include <asm/arch/mux.h> 33#include <mach/mux.h>
34 34
35#ifdef CONFIG_OMAP_MUX 35#ifdef CONFIG_OMAP_MUX
36 36
diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c
index d6c9de82ca0c..8671e1079ab5 100644
--- a/arch/arm/mach-omap2/pm.c
+++ b/arch/arm/mach-omap2/pm.c
@@ -30,12 +30,11 @@
30#include <asm/atomic.h> 30#include <asm/atomic.h>
31#include <asm/mach/time.h> 31#include <asm/mach/time.h>
32#include <asm/mach/irq.h> 32#include <asm/mach/irq.h>
33#include <asm/mach-types.h>
34 33
35#include <asm/arch/irqs.h> 34#include <mach/irqs.h>
36#include <asm/arch/clock.h> 35#include <mach/clock.h>
37#include <asm/arch/sram.h> 36#include <mach/sram.h>
38#include <asm/arch/pm.h> 37#include <mach/pm.h>
39 38
40static struct clk *vclk; 39static struct clk *vclk;
41static void (*omap2_sram_idle)(void); 40static void (*omap2_sram_idle)(void);
diff --git a/arch/arm/mach-omap2/prcm.c b/arch/arm/mach-omap2/prcm.c
index fd92a80f38f2..f945156d5585 100644
--- a/arch/arm/mach-omap2/prcm.c
+++ b/arch/arm/mach-omap2/prcm.c
@@ -18,8 +18,8 @@
18#include <linux/clk.h> 18#include <linux/clk.h>
19#include <linux/io.h> 19#include <linux/io.h>
20 20
21#include <asm/arch/common.h> 21#include <mach/common.h>
22#include <asm/arch/prcm.h> 22#include <mach/prcm.h>
23 23
24#include "clock.h" 24#include "clock.h"
25#include "prm.h" 25#include "prm.h"
diff --git a/arch/arm/mach-omap2/sdrc.h b/arch/arm/mach-omap2/sdrc.h
index 1b1fe4f6e030..1a8bbd094066 100644
--- a/arch/arm/mach-omap2/sdrc.h
+++ b/arch/arm/mach-omap2/sdrc.h
@@ -15,7 +15,7 @@
15 */ 15 */
16#undef DEBUG 16#undef DEBUG
17 17
18#include <asm/arch/sdrc.h> 18#include <mach/sdrc.h>
19 19
20#ifndef __ASSEMBLER__ 20#ifndef __ASSEMBLER__
21extern void __iomem *omap2_sdrc_base; 21extern void __iomem *omap2_sdrc_base;
diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
index e9c367fc9f61..adc8a26a8fb0 100644
--- a/arch/arm/mach-omap2/serial.c
+++ b/arch/arm/mach-omap2/serial.c
@@ -20,8 +20,8 @@
20 20
21#include <asm/io.h> 21#include <asm/io.h>
22 22
23#include <asm/arch/common.h> 23#include <mach/common.h>
24#include <asm/arch/board.h> 24#include <mach/board.h>
25 25
26static struct clk * uart1_ick = NULL; 26static struct clk * uart1_ick = NULL;
27static struct clk * uart1_fck = NULL; 27static struct clk * uart1_fck = NULL;
diff --git a/arch/arm/mach-omap2/sleep.S b/arch/arm/mach-omap2/sleep.S
index 46ccb9b8b583..87a706fd5f82 100644
--- a/arch/arm/mach-omap2/sleep.S
+++ b/arch/arm/mach-omap2/sleep.S
@@ -23,8 +23,8 @@
23 23
24#include <linux/linkage.h> 24#include <linux/linkage.h>
25#include <asm/assembler.h> 25#include <asm/assembler.h>
26#include <asm/arch/io.h> 26#include <mach/io.h>
27#include <asm/arch/pm.h> 27#include <mach/pm.h>
28 28
29#include "sdrc.h" 29#include "sdrc.h"
30 30
diff --git a/arch/arm/mach-omap2/sram242x.S b/arch/arm/mach-omap2/sram242x.S
index 4c274510f3e9..af4bd3490227 100644
--- a/arch/arm/mach-omap2/sram242x.S
+++ b/arch/arm/mach-omap2/sram242x.S
@@ -24,8 +24,8 @@
24 */ 24 */
25#include <linux/linkage.h> 25#include <linux/linkage.h>
26#include <asm/assembler.h> 26#include <asm/assembler.h>
27#include <asm/arch/io.h> 27#include <mach/io.h>
28#include <asm/hardware.h> 28#include <mach/hardware.h>
29 29
30#include "prm.h" 30#include "prm.h"
31#include "cm.h" 31#include "cm.h"
diff --git a/arch/arm/mach-omap2/sram243x.S b/arch/arm/mach-omap2/sram243x.S
index a3fa48dc08cd..84363e269e8c 100644
--- a/arch/arm/mach-omap2/sram243x.S
+++ b/arch/arm/mach-omap2/sram243x.S
@@ -24,8 +24,8 @@
24 */ 24 */
25#include <linux/linkage.h> 25#include <linux/linkage.h>
26#include <asm/assembler.h> 26#include <asm/assembler.h>
27#include <asm/arch/io.h> 27#include <mach/io.h>
28#include <asm/hardware.h> 28#include <mach/hardware.h>
29 29
30#include "prm.h" 30#include "prm.h"
31#include "cm.h" 31#include "cm.h"
diff --git a/arch/arm/mach-omap2/timer-gp.c b/arch/arm/mach-omap2/timer-gp.c
index 557603f99313..589393bedade 100644
--- a/arch/arm/mach-omap2/timer-gp.c
+++ b/arch/arm/mach-omap2/timer-gp.c
@@ -34,7 +34,7 @@
34#include <linux/clockchips.h> 34#include <linux/clockchips.h>
35 35
36#include <asm/mach/time.h> 36#include <asm/mach/time.h>
37#include <asm/arch/dmtimer.h> 37#include <mach/dmtimer.h>
38 38
39static struct omap_dm_timer *gptimer; 39static struct omap_dm_timer *gptimer;
40static struct clock_event_device clockevent_gpt; 40static struct clock_event_device clockevent_gpt;
diff --git a/arch/arm/mach-omap2/usb-tusb6010.c b/arch/arm/mach-omap2/usb-tusb6010.c
index 80bb42eb5082..1607c941d95f 100644
--- a/arch/arm/mach-omap2/usb-tusb6010.c
+++ b/arch/arm/mach-omap2/usb-tusb6010.c
@@ -15,9 +15,9 @@
15 15
16#include <linux/usb/musb.h> 16#include <linux/usb/musb.h>
17 17
18#include <asm/arch/gpmc.h> 18#include <mach/gpmc.h>
19#include <asm/arch/gpio.h> 19#include <mach/gpio.h>
20#include <asm/arch/mux.h> 20#include <mach/mux.h>
21 21
22 22
23static u8 async_cs, sync_cs; 23static u8 async_cs, sync_cs;
diff --git a/arch/arm/mach-orion5x/addr-map.c b/arch/arm/mach-orion5x/addr-map.c
index 6f0dbda6c44c..bea37972120a 100644
--- a/arch/arm/mach-orion5x/addr-map.c
+++ b/arch/arm/mach-orion5x/addr-map.c
@@ -13,7 +13,7 @@
13#include <linux/kernel.h> 13#include <linux/kernel.h>
14#include <linux/init.h> 14#include <linux/init.h>
15#include <linux/mbus.h> 15#include <linux/mbus.h>
16#include <asm/hardware.h> 16#include <mach/hardware.h>
17#include <asm/io.h> 17#include <asm/io.h>
18#include "common.h" 18#include "common.h"
19 19
diff --git a/arch/arm/mach-orion5x/common.c b/arch/arm/mach-orion5x/common.c
index faf4e3211918..168eeacaa4c0 100644
--- a/arch/arm/mach-orion5x/common.c
+++ b/arch/arm/mach-orion5x/common.c
@@ -24,8 +24,8 @@
24#include <asm/mach/arch.h> 24#include <asm/mach/arch.h>
25#include <asm/mach/map.h> 25#include <asm/mach/map.h>
26#include <asm/mach/time.h> 26#include <asm/mach/time.h>
27#include <asm/arch/hardware.h> 27#include <mach/hardware.h>
28#include <asm/arch/orion5x.h> 28#include <mach/orion5x.h>
29#include <asm/plat-orion/ehci-orion.h> 29#include <asm/plat-orion/ehci-orion.h>
30#include <asm/plat-orion/orion_nand.h> 30#include <asm/plat-orion/orion_nand.h>
31#include <asm/plat-orion/time.h> 31#include <asm/plat-orion/time.h>
diff --git a/arch/arm/mach-orion5x/db88f5281-setup.c b/arch/arm/mach-orion5x/db88f5281-setup.c
index 40a0bee4fbb3..48ce6d0e0020 100644
--- a/arch/arm/mach-orion5x/db88f5281-setup.c
+++ b/arch/arm/mach-orion5x/db88f5281-setup.c
@@ -24,7 +24,7 @@
24#include <asm/gpio.h> 24#include <asm/gpio.h>
25#include <asm/mach/arch.h> 25#include <asm/mach/arch.h>
26#include <asm/mach/pci.h> 26#include <asm/mach/pci.h>
27#include <asm/arch/orion5x.h> 27#include <mach/orion5x.h>
28#include <asm/plat-orion/orion_nand.h> 28#include <asm/plat-orion/orion_nand.h>
29#include "common.h" 29#include "common.h"
30#include "mpp.h" 30#include "mpp.h"
diff --git a/arch/arm/mach-orion5x/dns323-setup.c b/arch/arm/mach-orion5x/dns323-setup.c
index 3791ca6f001a..1a1d84b80a65 100644
--- a/arch/arm/mach-orion5x/dns323-setup.c
+++ b/arch/arm/mach-orion5x/dns323-setup.c
@@ -25,7 +25,7 @@
25#include <asm/gpio.h> 25#include <asm/gpio.h>
26#include <asm/mach/arch.h> 26#include <asm/mach/arch.h>
27#include <asm/mach/pci.h> 27#include <asm/mach/pci.h>
28#include <asm/arch/orion5x.h> 28#include <mach/orion5x.h>
29#include "common.h" 29#include "common.h"
30#include "mpp.h" 30#include "mpp.h"
31 31
diff --git a/arch/arm/mach-orion5x/gpio.c b/arch/arm/mach-orion5x/gpio.c
index d09797990f41..cd8a16f67d2b 100644
--- a/arch/arm/mach-orion5x/gpio.c
+++ b/arch/arm/mach-orion5x/gpio.c
@@ -17,7 +17,7 @@
17#include <linux/bitops.h> 17#include <linux/bitops.h>
18#include <asm/gpio.h> 18#include <asm/gpio.h>
19#include <asm/io.h> 19#include <asm/io.h>
20#include <asm/arch/orion5x.h> 20#include <mach/orion5x.h>
21#include "common.h" 21#include "common.h"
22 22
23static DEFINE_SPINLOCK(gpio_lock); 23static DEFINE_SPINLOCK(gpio_lock);
diff --git a/arch/arm/mach-orion5x/include/mach/debug-macro.S b/arch/arm/mach-orion5x/include/mach/debug-macro.S
new file mode 100644
index 000000000000..c7f808bfe272
--- /dev/null
+++ b/arch/arm/mach-orion5x/include/mach/debug-macro.S
@@ -0,0 +1,22 @@
1/*
2 * arch/arm/mach-orion5x/include/mach/debug-macro.S
3 *
4 * Debugging macro include header
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9*/
10
11#include <mach/orion5x.h>
12
13 .macro addruart,rx
14 mrc p15, 0, \rx, c1, c0
15 tst \rx, #1 @ MMU enabled?
16 ldreq \rx, =ORION5X_REGS_PHYS_BASE
17 ldrne \rx, =ORION5X_REGS_VIRT_BASE
18 orr \rx, \rx, #0x00012000
19 .endm
20
21#define UART_SHIFT 2
22#include <asm/hardware/debug-8250.S>
diff --git a/include/asm-arm/arch-orion5x/dma.h b/arch/arm/mach-orion5x/include/mach/dma.h
index 40a8c178f10d..40a8c178f10d 100644
--- a/include/asm-arm/arch-orion5x/dma.h
+++ b/arch/arm/mach-orion5x/include/mach/dma.h
diff --git a/arch/arm/mach-orion5x/include/mach/entry-macro.S b/arch/arm/mach-orion5x/include/mach/entry-macro.S
new file mode 100644
index 000000000000..4351937035cd
--- /dev/null
+++ b/arch/arm/mach-orion5x/include/mach/entry-macro.S
@@ -0,0 +1,31 @@
1/*
2 * arch/arm/mach-orion5x/include/mach/entry-macro.S
3 *
4 * Low-level IRQ helper macros for Orion platforms
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10
11#include <mach/orion5x.h>
12
13 .macro disable_fiq
14 .endm
15
16 .macro arch_ret_to_user, tmp1, tmp2
17 .endm
18
19 .macro get_irqnr_preamble, base, tmp
20 ldr \base, =MAIN_IRQ_CAUSE
21 .endm
22
23 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
24 ldr \irqstat, [\base, #0] @ main cause
25 ldr \tmp, [\base, #(MAIN_IRQ_MASK - MAIN_IRQ_CAUSE)] @ main mask
26 mov \irqnr, #0 @ default irqnr
27 @ find cause bits that are unmasked
28 ands \irqstat, \irqstat, \tmp @ clear Z flag if any
29 clzne \irqnr, \irqstat @ calc irqnr
30 rsbne \irqnr, \irqnr, #31
31 .endm
diff --git a/arch/arm/mach-orion5x/include/mach/gpio.h b/arch/arm/mach-orion5x/include/mach/gpio.h
new file mode 100644
index 000000000000..65dc136a86f7
--- /dev/null
+++ b/arch/arm/mach-orion5x/include/mach/gpio.h
@@ -0,0 +1,28 @@
1/*
2 * arch/arm/mach-orion5x/include/mach/gpio.h
3 *
4 * This file is licensed under the terms of the GNU General Public
5 * License version 2. This program is licensed "as is" without any
6 * warranty of any kind, whether express or implied.
7 */
8
9extern int gpio_request(unsigned pin, const char *label);
10extern void gpio_free(unsigned pin);
11extern int gpio_direction_input(unsigned pin);
12extern int gpio_direction_output(unsigned pin, int value);
13extern int gpio_get_value(unsigned pin);
14extern void gpio_set_value(unsigned pin, int value);
15extern void orion5x_gpio_set_blink(unsigned pin, int blink);
16extern void gpio_display(void); /* debug */
17
18static inline int gpio_to_irq(int pin)
19{
20 return pin + IRQ_ORION5X_GPIO_START;
21}
22
23static inline int irq_to_gpio(int irq)
24{
25 return irq - IRQ_ORION5X_GPIO_START;
26}
27
28#include <asm-generic/gpio.h> /* cansleep wrappers */
diff --git a/arch/arm/mach-orion5x/include/mach/hardware.h b/arch/arm/mach-orion5x/include/mach/hardware.h
new file mode 100644
index 000000000000..e51aaf4bf2b5
--- /dev/null
+++ b/arch/arm/mach-orion5x/include/mach/hardware.h
@@ -0,0 +1,21 @@
1/*
2 * arch/arm/mach-orion5x/include/mach/hardware.h
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 */
8
9#ifndef __ASM_ARCH_HARDWARE_H
10#define __ASM_ARCH_HARDWARE_H
11
12#include "orion5x.h"
13
14#define pcibios_assign_all_busses() 1
15
16#define PCIBIOS_MIN_IO 0x00001000
17#define PCIBIOS_MIN_MEM 0x01000000
18#define PCIMEM_BASE ORION5X_PCIE_MEM_PHYS_BASE
19
20
21#endif
diff --git a/arch/arm/mach-orion5x/include/mach/io.h b/arch/arm/mach-orion5x/include/mach/io.h
new file mode 100644
index 000000000000..f24b2513f7f3
--- /dev/null
+++ b/arch/arm/mach-orion5x/include/mach/io.h
@@ -0,0 +1,63 @@
1/*
2 * arch/arm/mach-orion5x/include/mach/io.h
3 *
4 * Tzachi Perelstein <tzachi@marvell.com>
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10
11#ifndef __ASM_ARCH_IO_H
12#define __ASM_ARCH_IO_H
13
14#include "orion5x.h"
15
16#define IO_SPACE_LIMIT 0xffffffff
17
18static inline void __iomem *
19__arch_ioremap(unsigned long paddr, size_t size, unsigned int mtype)
20{
21 void __iomem *retval;
22 unsigned long offs = paddr - ORION5X_REGS_PHYS_BASE;
23 if (mtype == MT_DEVICE && size && offs < ORION5X_REGS_SIZE &&
24 size <= ORION5X_REGS_SIZE && offs + size <= ORION5X_REGS_SIZE) {
25 retval = (void __iomem *)ORION5X_REGS_VIRT_BASE + offs;
26 } else {
27 retval = __arm_ioremap(paddr, size, mtype);
28 }
29
30 return retval;
31}
32
33static inline void
34__arch_iounmap(void __iomem *addr)
35{
36 if (addr < (void __iomem *)ORION5X_REGS_VIRT_BASE ||
37 addr >= (void __iomem *)(ORION5X_REGS_VIRT_BASE + ORION5X_REGS_SIZE))
38 __iounmap(addr);
39}
40
41static inline void __iomem *__io(unsigned long addr)
42{
43 return (void __iomem *)addr;
44}
45
46#define __arch_ioremap(p, s, m) __arch_ioremap(p, s, m)
47#define __arch_iounmap(a) __arch_iounmap(a)
48#define __io(a) __io(a)
49#define __mem_pci(a) (a)
50
51
52/*****************************************************************************
53 * Helpers to access Orion registers
54 ****************************************************************************/
55/*
56 * These are not preempt-safe. Locks, if needed, must be taken
57 * care of by the caller.
58 */
59#define orion5x_setbits(r, mask) writel(readl(r) | (mask), (r))
60#define orion5x_clrbits(r, mask) writel(readl(r) & ~(mask), (r))
61
62
63#endif
diff --git a/arch/arm/mach-orion5x/include/mach/irqs.h b/arch/arm/mach-orion5x/include/mach/irqs.h
new file mode 100644
index 000000000000..d5b0fbf6b965
--- /dev/null
+++ b/arch/arm/mach-orion5x/include/mach/irqs.h
@@ -0,0 +1,62 @@
1/*
2 * arch/arm/mach-orion5x/include/mach/irqs.h
3 *
4 * IRQ definitions for Orion SoC
5 *
6 * Maintainer: Tzachi Perelstein <tzachi@marvell.com>
7 *
8 * This file is licensed under the terms of the GNU General Public
9 * License version 2. This program is licensed "as is" without any
10 * warranty of any kind, whether express or implied.
11 */
12
13#ifndef __ASM_ARCH_IRQS_H
14#define __ASM_ARCH_IRQS_H
15
16#include "orion5x.h" /* need GPIO_MAX */
17
18/*
19 * Orion Main Interrupt Controller
20 */
21#define IRQ_ORION5X_BRIDGE 0
22#define IRQ_ORION5X_DOORBELL_H2C 1
23#define IRQ_ORION5X_DOORBELL_C2H 2
24#define IRQ_ORION5X_UART0 3
25#define IRQ_ORION5X_UART1 4
26#define IRQ_ORION5X_I2C 5
27#define IRQ_ORION5X_GPIO_0_7 6
28#define IRQ_ORION5X_GPIO_8_15 7
29#define IRQ_ORION5X_GPIO_16_23 8
30#define IRQ_ORION5X_GPIO_24_31 9
31#define IRQ_ORION5X_PCIE0_ERR 10
32#define IRQ_ORION5X_PCIE0_INT 11
33#define IRQ_ORION5X_USB1_CTRL 12
34#define IRQ_ORION5X_DEV_BUS_ERR 14
35#define IRQ_ORION5X_PCI_ERR 15
36#define IRQ_ORION5X_USB_BR_ERR 16
37#define IRQ_ORION5X_USB0_CTRL 17
38#define IRQ_ORION5X_ETH_RX 18
39#define IRQ_ORION5X_ETH_TX 19
40#define IRQ_ORION5X_ETH_MISC 20
41#define IRQ_ORION5X_ETH_SUM 21
42#define IRQ_ORION5X_ETH_ERR 22
43#define IRQ_ORION5X_IDMA_ERR 23
44#define IRQ_ORION5X_IDMA_0 24
45#define IRQ_ORION5X_IDMA_1 25
46#define IRQ_ORION5X_IDMA_2 26
47#define IRQ_ORION5X_IDMA_3 27
48#define IRQ_ORION5X_CESA 28
49#define IRQ_ORION5X_SATA 29
50#define IRQ_ORION5X_XOR0 30
51#define IRQ_ORION5X_XOR1 31
52
53/*
54 * Orion General Purpose Pins
55 */
56#define IRQ_ORION5X_GPIO_START 32
57#define NR_GPIO_IRQS GPIO_MAX
58
59#define NR_IRQS (IRQ_ORION5X_GPIO_START + NR_GPIO_IRQS)
60
61
62#endif
diff --git a/arch/arm/mach-orion5x/include/mach/memory.h b/arch/arm/mach-orion5x/include/mach/memory.h
new file mode 100644
index 000000000000..54dd76b013f2
--- /dev/null
+++ b/arch/arm/mach-orion5x/include/mach/memory.h
@@ -0,0 +1,16 @@
1/*
2 * arch/arm/mach-orion5x/include/mach/memory.h
3 *
4 * Marvell Orion memory definitions
5 */
6
7#ifndef __ASM_ARCH_MEMORY_H
8#define __ASM_ARCH_MEMORY_H
9
10#define PHYS_OFFSET UL(0x00000000)
11
12#define __virt_to_bus(x) __virt_to_phys(x)
13#define __bus_to_virt(x) __phys_to_virt(x)
14
15
16#endif
diff --git a/arch/arm/mach-orion5x/include/mach/orion5x.h b/arch/arm/mach-orion5x/include/mach/orion5x.h
new file mode 100644
index 000000000000..f52a7d65bec2
--- /dev/null
+++ b/arch/arm/mach-orion5x/include/mach/orion5x.h
@@ -0,0 +1,162 @@
1/*
2 * arch/arm/mach-orion5x/include/mach/orion5x.h
3 *
4 * Generic definitions of Orion SoC flavors:
5 * Orion-1, Orion-VoIP, Orion-NAS, and Orion-2.
6 *
7 * Maintainer: Tzachi Perelstein <tzachi@marvell.com>
8 *
9 * This file is licensed under the terms of the GNU General Public
10 * License version 2. This program is licensed "as is" without any
11 * warranty of any kind, whether express or implied.
12 */
13
14#ifndef __ASM_ARCH_ORION5X_H
15#define __ASM_ARCH_ORION5X_H
16
17/*****************************************************************************
18 * Orion Address Maps
19 *
20 * phys
21 * e0000000 PCIe MEM space
22 * e8000000 PCI MEM space
23 * f0000000 PCIe WA space (Orion-1/Orion-NAS only)
24 * f1000000 on-chip peripheral registers
25 * f2000000 PCIe I/O space
26 * f2100000 PCI I/O space
27 * f4000000 device bus mappings (boot)
28 * fa000000 device bus mappings (cs0)
29 * fa800000 device bus mappings (cs2)
30 * fc000000 device bus mappings (cs0/cs1)
31 *
32 * virt phys size
33 * fdd00000 f1000000 1M on-chip peripheral registers
34 * fde00000 f2000000 1M PCIe I/O space
35 * fdf00000 f2100000 1M PCI I/O space
36 * fe000000 f0000000 16M PCIe WA space (Orion-1/Orion-NAS only)
37 ****************************************************************************/
38#define ORION5X_REGS_PHYS_BASE 0xf1000000
39#define ORION5X_REGS_VIRT_BASE 0xfdd00000
40#define ORION5X_REGS_SIZE SZ_1M
41
42#define ORION5X_PCIE_IO_PHYS_BASE 0xf2000000
43#define ORION5X_PCIE_IO_VIRT_BASE 0xfde00000
44#define ORION5X_PCIE_IO_BUS_BASE 0x00000000
45#define ORION5X_PCIE_IO_SIZE SZ_1M
46
47#define ORION5X_PCI_IO_PHYS_BASE 0xf2100000
48#define ORION5X_PCI_IO_VIRT_BASE 0xfdf00000
49#define ORION5X_PCI_IO_BUS_BASE 0x00100000
50#define ORION5X_PCI_IO_SIZE SZ_1M
51
52/* Relevant only for Orion-1/Orion-NAS */
53#define ORION5X_PCIE_WA_PHYS_BASE 0xf0000000
54#define ORION5X_PCIE_WA_VIRT_BASE 0xfe000000
55#define ORION5X_PCIE_WA_SIZE SZ_16M
56
57#define ORION5X_PCIE_MEM_PHYS_BASE 0xe0000000
58#define ORION5X_PCIE_MEM_SIZE SZ_128M
59
60#define ORION5X_PCI_MEM_PHYS_BASE 0xe8000000
61#define ORION5X_PCI_MEM_SIZE SZ_128M
62
63/*******************************************************************************
64 * Supported Devices & Revisions
65 ******************************************************************************/
66/* Orion-1 (88F5181) and Orion-VoIP (88F5181L) */
67#define MV88F5181_DEV_ID 0x5181
68#define MV88F5181_REV_B1 3
69#define MV88F5181L_REV_A0 8
70#define MV88F5181L_REV_A1 9
71/* Orion-NAS (88F5182) */
72#define MV88F5182_DEV_ID 0x5182
73#define MV88F5182_REV_A2 2
74/* Orion-2 (88F5281) */
75#define MV88F5281_DEV_ID 0x5281
76#define MV88F5281_REV_D1 5
77#define MV88F5281_REV_D2 6
78
79/*******************************************************************************
80 * Orion Registers Map
81 ******************************************************************************/
82#define ORION5X_DDR_VIRT_BASE (ORION5X_REGS_VIRT_BASE | 0x00000)
83#define ORION5X_DDR_REG(x) (ORION5X_DDR_VIRT_BASE | (x))
84
85#define ORION5X_DEV_BUS_PHYS_BASE (ORION5X_REGS_PHYS_BASE | 0x10000)
86#define ORION5X_DEV_BUS_VIRT_BASE (ORION5X_REGS_VIRT_BASE | 0x10000)
87#define ORION5X_DEV_BUS_REG(x) (ORION5X_DEV_BUS_VIRT_BASE | (x))
88#define I2C_PHYS_BASE (ORION5X_DEV_BUS_PHYS_BASE | 0x1000)
89#define UART0_PHYS_BASE (ORION5X_DEV_BUS_PHYS_BASE | 0x2000)
90#define UART0_VIRT_BASE (ORION5X_DEV_BUS_VIRT_BASE | 0x2000)
91#define UART1_PHYS_BASE (ORION5X_DEV_BUS_PHYS_BASE | 0x2100)
92#define UART1_VIRT_BASE (ORION5X_DEV_BUS_VIRT_BASE | 0x2100)
93
94#define ORION5X_BRIDGE_VIRT_BASE (ORION5X_REGS_VIRT_BASE | 0x20000)
95#define ORION5X_BRIDGE_REG(x) (ORION5X_BRIDGE_VIRT_BASE | (x))
96#define TIMER_VIRT_BASE (ORION5X_BRIDGE_VIRT_BASE | 0x300)
97
98#define ORION5X_PCI_VIRT_BASE (ORION5X_REGS_VIRT_BASE | 0x30000)
99#define ORION5X_PCI_REG(x) (ORION5X_PCI_VIRT_BASE | (x))
100
101#define ORION5X_PCIE_VIRT_BASE (ORION5X_REGS_VIRT_BASE | 0x40000)
102#define ORION5X_PCIE_REG(x) (ORION5X_PCIE_VIRT_BASE | (x))
103
104#define ORION5X_USB0_PHYS_BASE (ORION5X_REGS_PHYS_BASE | 0x50000)
105#define ORION5X_USB0_VIRT_BASE (ORION5X_REGS_VIRT_BASE | 0x50000)
106#define ORION5X_USB0_REG(x) (ORION5X_USB0_VIRT_BASE | (x))
107
108#define ORION5X_ETH_PHYS_BASE (ORION5X_REGS_PHYS_BASE | 0x70000)
109#define ORION5X_ETH_VIRT_BASE (ORION5X_REGS_VIRT_BASE | 0x70000)
110#define ORION5X_ETH_REG(x) (ORION5X_ETH_VIRT_BASE | (x))
111
112#define ORION5X_SATA_PHYS_BASE (ORION5X_REGS_PHYS_BASE | 0x80000)
113#define ORION5X_SATA_VIRT_BASE (ORION5X_REGS_VIRT_BASE | 0x80000)
114#define ORION5X_SATA_REG(x) (ORION5X_SATA_VIRT_BASE | (x))
115
116#define ORION5X_USB1_PHYS_BASE (ORION5X_REGS_PHYS_BASE | 0xa0000)
117#define ORION5X_USB1_VIRT_BASE (ORION5X_REGS_VIRT_BASE | 0xa0000)
118#define ORION5X_USB1_REG(x) (ORION5X_USB1_VIRT_BASE | (x))
119
120/*******************************************************************************
121 * Device Bus Registers
122 ******************************************************************************/
123#define MPP_0_7_CTRL ORION5X_DEV_BUS_REG(0x000)
124#define MPP_8_15_CTRL ORION5X_DEV_BUS_REG(0x004)
125#define MPP_16_19_CTRL ORION5X_DEV_BUS_REG(0x050)
126#define MPP_DEV_CTRL ORION5X_DEV_BUS_REG(0x008)
127#define MPP_RESET_SAMPLE ORION5X_DEV_BUS_REG(0x010)
128#define GPIO_OUT ORION5X_DEV_BUS_REG(0x100)
129#define GPIO_IO_CONF ORION5X_DEV_BUS_REG(0x104)
130#define GPIO_BLINK_EN ORION5X_DEV_BUS_REG(0x108)
131#define GPIO_IN_POL ORION5X_DEV_BUS_REG(0x10c)
132#define GPIO_DATA_IN ORION5X_DEV_BUS_REG(0x110)
133#define GPIO_EDGE_CAUSE ORION5X_DEV_BUS_REG(0x114)
134#define GPIO_EDGE_MASK ORION5X_DEV_BUS_REG(0x118)
135#define GPIO_LEVEL_MASK ORION5X_DEV_BUS_REG(0x11c)
136#define DEV_BANK_0_PARAM ORION5X_DEV_BUS_REG(0x45c)
137#define DEV_BANK_1_PARAM ORION5X_DEV_BUS_REG(0x460)
138#define DEV_BANK_2_PARAM ORION5X_DEV_BUS_REG(0x464)
139#define DEV_BANK_BOOT_PARAM ORION5X_DEV_BUS_REG(0x46c)
140#define DEV_BUS_CTRL ORION5X_DEV_BUS_REG(0x4c0)
141#define DEV_BUS_INT_CAUSE ORION5X_DEV_BUS_REG(0x4d0)
142#define DEV_BUS_INT_MASK ORION5X_DEV_BUS_REG(0x4d4)
143#define GPIO_MAX 32
144
145/***************************************************************************
146 * Orion CPU Bridge Registers
147 **************************************************************************/
148#define CPU_CONF ORION5X_BRIDGE_REG(0x100)
149#define CPU_CTRL ORION5X_BRIDGE_REG(0x104)
150#define CPU_RESET_MASK ORION5X_BRIDGE_REG(0x108)
151#define CPU_SOFT_RESET ORION5X_BRIDGE_REG(0x10c)
152#define POWER_MNG_CTRL_REG ORION5X_BRIDGE_REG(0x11C)
153#define BRIDGE_CAUSE ORION5X_BRIDGE_REG(0x110)
154#define BRIDGE_MASK ORION5X_BRIDGE_REG(0x114)
155#define BRIDGE_INT_TIMER0 0x0002
156#define BRIDGE_INT_TIMER1 0x0004
157#define BRIDGE_INT_TIMER1_CLR (~0x0004)
158#define MAIN_IRQ_CAUSE ORION5X_BRIDGE_REG(0x200)
159#define MAIN_IRQ_MASK ORION5X_BRIDGE_REG(0x204)
160
161
162#endif
diff --git a/arch/arm/mach-orion5x/include/mach/system.h b/arch/arm/mach-orion5x/include/mach/system.h
new file mode 100644
index 000000000000..08e430757890
--- /dev/null
+++ b/arch/arm/mach-orion5x/include/mach/system.h
@@ -0,0 +1,32 @@
1/*
2 * arch/arm/mach-orion5x/include/mach/system.h
3 *
4 * Tzachi Perelstein <tzachi@marvell.com>
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10
11#ifndef __ASM_ARCH_SYSTEM_H
12#define __ASM_ARCH_SYSTEM_H
13
14#include <mach/hardware.h>
15#include <mach/orion5x.h>
16
17static inline void arch_idle(void)
18{
19 cpu_do_idle();
20}
21
22static inline void arch_reset(char mode)
23{
24 /*
25 * Enable and issue soft reset
26 */
27 orion5x_setbits(CPU_RESET_MASK, (1 << 2));
28 orion5x_setbits(CPU_SOFT_RESET, 1);
29}
30
31
32#endif
diff --git a/arch/arm/mach-orion5x/include/mach/timex.h b/arch/arm/mach-orion5x/include/mach/timex.h
new file mode 100644
index 000000000000..e82e44db7629
--- /dev/null
+++ b/arch/arm/mach-orion5x/include/mach/timex.h
@@ -0,0 +1,13 @@
1/*
2 * arch/arm/mach-orion5x/include/mach/timex.h
3 *
4 * Tzachi Perelstein <tzachi@marvell.com>
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10
11#define CLOCK_TICK_RATE (100 * HZ)
12
13#define ORION5X_TCLK 166666667
diff --git a/arch/arm/mach-orion5x/include/mach/uncompress.h b/arch/arm/mach-orion5x/include/mach/uncompress.h
new file mode 100644
index 000000000000..4322dba468a4
--- /dev/null
+++ b/arch/arm/mach-orion5x/include/mach/uncompress.h
@@ -0,0 +1,49 @@
1/*
2 * arch/arm/mach-orion5x/include/mach/uncompress.h
3 *
4 * Tzachi Perelstein <tzachi@marvell.com>
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10
11#include <linux/serial_reg.h>
12#include <mach/orion5x.h>
13
14#define SERIAL_BASE ((unsigned char *)UART0_PHYS_BASE)
15
16static void putc(const char c)
17{
18 unsigned char *base = SERIAL_BASE;
19 int i;
20
21 for (i = 0; i < 0x1000; i++) {
22 if (base[UART_LSR << 2] & UART_LSR_THRE)
23 break;
24 barrier();
25 }
26
27 base[UART_TX << 2] = c;
28}
29
30static void flush(void)
31{
32 unsigned char *base = SERIAL_BASE;
33 unsigned char mask;
34 int i;
35
36 mask = UART_LSR_TEMT | UART_LSR_THRE;
37
38 for (i = 0; i < 0x1000; i++) {
39 if ((base[UART_LSR << 2] & mask) == mask)
40 break;
41 barrier();
42 }
43}
44
45/*
46 * nothing to do
47 */
48#define arch_decomp_setup()
49#define arch_decomp_wdog()
diff --git a/arch/arm/mach-orion5x/include/mach/vmalloc.h b/arch/arm/mach-orion5x/include/mach/vmalloc.h
new file mode 100644
index 000000000000..7147a297e97f
--- /dev/null
+++ b/arch/arm/mach-orion5x/include/mach/vmalloc.h
@@ -0,0 +1,5 @@
1/*
2 * arch/arm/mach-orion5x/include/mach/vmalloc.h
3 */
4
5#define VMALLOC_END 0xfd800000
diff --git a/arch/arm/mach-orion5x/irq.c b/arch/arm/mach-orion5x/irq.c
index 9ae3f6dc7839..cc2a017fd2a9 100644
--- a/arch/arm/mach-orion5x/irq.c
+++ b/arch/arm/mach-orion5x/irq.c
@@ -15,7 +15,7 @@
15#include <linux/irq.h> 15#include <linux/irq.h>
16#include <asm/gpio.h> 16#include <asm/gpio.h>
17#include <asm/io.h> 17#include <asm/io.h>
18#include <asm/arch/orion5x.h> 18#include <mach/orion5x.h>
19#include <asm/plat-orion/irq.h> 19#include <asm/plat-orion/irq.h>
20#include "common.h" 20#include "common.h"
21 21
diff --git a/arch/arm/mach-orion5x/kurobox_pro-setup.c b/arch/arm/mach-orion5x/kurobox_pro-setup.c
index 84feac4a1fe2..0caaaac74bc1 100644
--- a/arch/arm/mach-orion5x/kurobox_pro-setup.c
+++ b/arch/arm/mach-orion5x/kurobox_pro-setup.c
@@ -24,7 +24,7 @@
24#include <asm/gpio.h> 24#include <asm/gpio.h>
25#include <asm/mach/arch.h> 25#include <asm/mach/arch.h>
26#include <asm/mach/pci.h> 26#include <asm/mach/pci.h>
27#include <asm/arch/orion5x.h> 27#include <mach/orion5x.h>
28#include <asm/plat-orion/orion_nand.h> 28#include <asm/plat-orion/orion_nand.h>
29#include "common.h" 29#include "common.h"
30#include "mpp.h" 30#include "mpp.h"
diff --git a/arch/arm/mach-orion5x/mpp.c b/arch/arm/mach-orion5x/mpp.c
index a48cadb01590..c04ab0e16ea1 100644
--- a/arch/arm/mach-orion5x/mpp.c
+++ b/arch/arm/mach-orion5x/mpp.c
@@ -11,7 +11,7 @@
11#include <linux/kernel.h> 11#include <linux/kernel.h>
12#include <linux/init.h> 12#include <linux/init.h>
13#include <linux/mbus.h> 13#include <linux/mbus.h>
14#include <asm/hardware.h> 14#include <mach/hardware.h>
15#include <asm/io.h> 15#include <asm/io.h>
16#include "common.h" 16#include "common.h"
17#include "mpp.h" 17#include "mpp.h"
diff --git a/arch/arm/mach-orion5x/mss2-setup.c b/arch/arm/mach-orion5x/mss2-setup.c
index 7ce9e407d9d1..4403cc963d66 100644
--- a/arch/arm/mach-orion5x/mss2-setup.c
+++ b/arch/arm/mach-orion5x/mss2-setup.c
@@ -25,7 +25,7 @@
25#include <asm/mach-types.h> 25#include <asm/mach-types.h>
26#include <asm/mach/arch.h> 26#include <asm/mach/arch.h>
27#include <asm/mach/pci.h> 27#include <asm/mach/pci.h>
28#include <asm/arch/orion5x.h> 28#include <mach/orion5x.h>
29#include "common.h" 29#include "common.h"
30#include "mpp.h" 30#include "mpp.h"
31 31
diff --git a/arch/arm/mach-orion5x/mv2120-setup.c b/arch/arm/mach-orion5x/mv2120-setup.c
index 55f3b0fdef8b..67b2c0df615f 100644
--- a/arch/arm/mach-orion5x/mv2120-setup.c
+++ b/arch/arm/mach-orion5x/mv2120-setup.c
@@ -22,7 +22,7 @@
22#include <asm/mach-types.h> 22#include <asm/mach-types.h>
23#include <asm/gpio.h> 23#include <asm/gpio.h>
24#include <asm/mach/arch.h> 24#include <asm/mach/arch.h>
25#include <asm/arch/orion5x.h> 25#include <mach/orion5x.h>
26#include "common.h" 26#include "common.h"
27#include "mpp.h" 27#include "mpp.h"
28 28
diff --git a/arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c b/arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c
index 73e9242da7ad..e72fe1e065e8 100644
--- a/arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c
+++ b/arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c
@@ -21,7 +21,7 @@
21#include <asm/leds.h> 21#include <asm/leds.h>
22#include <asm/mach/arch.h> 22#include <asm/mach/arch.h>
23#include <asm/mach/pci.h> 23#include <asm/mach/pci.h>
24#include <asm/arch/orion5x.h> 24#include <mach/orion5x.h>
25#include "common.h" 25#include "common.h"
26#include "mpp.h" 26#include "mpp.h"
27 27
diff --git a/arch/arm/mach-orion5x/rd88f5181l-ge-setup.c b/arch/arm/mach-orion5x/rd88f5181l-ge-setup.c
index ac482019abbf..a1fe3257320d 100644
--- a/arch/arm/mach-orion5x/rd88f5181l-ge-setup.c
+++ b/arch/arm/mach-orion5x/rd88f5181l-ge-setup.c
@@ -22,7 +22,7 @@
22#include <asm/leds.h> 22#include <asm/leds.h>
23#include <asm/mach/arch.h> 23#include <asm/mach/arch.h>
24#include <asm/mach/pci.h> 24#include <asm/mach/pci.h>
25#include <asm/arch/orion5x.h> 25#include <mach/orion5x.h>
26#include "common.h" 26#include "common.h"
27#include "mpp.h" 27#include "mpp.h"
28 28
diff --git a/arch/arm/mach-orion5x/rd88f5182-setup.c b/arch/arm/mach-orion5x/rd88f5182-setup.c
index 2a46d27209c1..8771cb76f0dc 100644
--- a/arch/arm/mach-orion5x/rd88f5182-setup.c
+++ b/arch/arm/mach-orion5x/rd88f5182-setup.c
@@ -24,7 +24,7 @@
24#include <asm/leds.h> 24#include <asm/leds.h>
25#include <asm/mach/arch.h> 25#include <asm/mach/arch.h>
26#include <asm/mach/pci.h> 26#include <asm/mach/pci.h>
27#include <asm/arch/orion5x.h> 27#include <mach/orion5x.h>
28#include "common.h" 28#include "common.h"
29#include "mpp.h" 29#include "mpp.h"
30 30
diff --git a/arch/arm/mach-orion5x/ts209-setup.c b/arch/arm/mach-orion5x/ts209-setup.c
index f270ada2def9..809132de31d2 100644
--- a/arch/arm/mach-orion5x/ts209-setup.c
+++ b/arch/arm/mach-orion5x/ts209-setup.c
@@ -26,7 +26,7 @@
26#include <asm/gpio.h> 26#include <asm/gpio.h>
27#include <asm/mach/arch.h> 27#include <asm/mach/arch.h>
28#include <asm/mach/pci.h> 28#include <asm/mach/pci.h>
29#include <asm/arch/orion5x.h> 29#include <mach/orion5x.h>
30#include "common.h" 30#include "common.h"
31#include "mpp.h" 31#include "mpp.h"
32#include "tsx09-common.h" 32#include "tsx09-common.h"
diff --git a/arch/arm/mach-orion5x/ts409-setup.c b/arch/arm/mach-orion5x/ts409-setup.c
index 32f0ff073b7e..6053e76ac967 100644
--- a/arch/arm/mach-orion5x/ts409-setup.c
+++ b/arch/arm/mach-orion5x/ts409-setup.c
@@ -24,7 +24,7 @@
24#include <asm/gpio.h> 24#include <asm/gpio.h>
25#include <asm/mach/arch.h> 25#include <asm/mach/arch.h>
26#include <asm/mach/pci.h> 26#include <asm/mach/pci.h>
27#include <asm/arch/orion5x.h> 27#include <mach/orion5x.h>
28#include "common.h" 28#include "common.h"
29#include "mpp.h" 29#include "mpp.h"
30#include "tsx09-common.h" 30#include "tsx09-common.h"
diff --git a/arch/arm/mach-orion5x/ts78xx-setup.c b/arch/arm/mach-orion5x/ts78xx-setup.c
index 77e9f351f07a..014916a28fdc 100644
--- a/arch/arm/mach-orion5x/ts78xx-setup.c
+++ b/arch/arm/mach-orion5x/ts78xx-setup.c
@@ -18,7 +18,7 @@
18#include <asm/mach-types.h> 18#include <asm/mach-types.h>
19#include <asm/mach/arch.h> 19#include <asm/mach/arch.h>
20#include <asm/mach/map.h> 20#include <asm/mach/map.h>
21#include <asm/arch/orion5x.h> 21#include <mach/orion5x.h>
22#include "common.h" 22#include "common.h"
23#include "mpp.h" 23#include "mpp.h"
24 24
diff --git a/arch/arm/mach-orion5x/wnr854t-setup.c b/arch/arm/mach-orion5x/wnr854t-setup.c
index 25568c2a3d29..b6bc43e07eed 100644
--- a/arch/arm/mach-orion5x/wnr854t-setup.c
+++ b/arch/arm/mach-orion5x/wnr854t-setup.c
@@ -19,7 +19,7 @@
19#include <asm/gpio.h> 19#include <asm/gpio.h>
20#include <asm/mach/arch.h> 20#include <asm/mach/arch.h>
21#include <asm/mach/pci.h> 21#include <asm/mach/pci.h>
22#include <asm/arch/orion5x.h> 22#include <mach/orion5x.h>
23#include "common.h" 23#include "common.h"
24#include "mpp.h" 24#include "mpp.h"
25 25
diff --git a/arch/arm/mach-orion5x/wrt350n-v2-setup.c b/arch/arm/mach-orion5x/wrt350n-v2-setup.c
index 9b8ee8c48bf0..b10da17b3fbd 100644
--- a/arch/arm/mach-orion5x/wrt350n-v2-setup.c
+++ b/arch/arm/mach-orion5x/wrt350n-v2-setup.c
@@ -19,7 +19,7 @@
19#include <asm/gpio.h> 19#include <asm/gpio.h>
20#include <asm/mach/arch.h> 20#include <asm/mach/arch.h>
21#include <asm/mach/pci.h> 21#include <asm/mach/pci.h>
22#include <asm/arch/orion5x.h> 22#include <mach/orion5x.h>
23#include "common.h" 23#include "common.h"
24#include "mpp.h" 24#include "mpp.h"
25 25
diff --git a/arch/arm/mach-pnx4008/clock.c b/arch/arm/mach-pnx4008/clock.c
index a5268c3ac5a7..24d036a24a72 100644
--- a/arch/arm/mach-pnx4008/clock.c
+++ b/arch/arm/mach-pnx4008/clock.c
@@ -21,10 +21,10 @@
21#include <linux/err.h> 21#include <linux/err.h>
22#include <linux/delay.h> 22#include <linux/delay.h>
23 23
24#include <asm/hardware.h> 24#include <mach/hardware.h>
25#include <asm/io.h> 25#include <asm/io.h>
26 26
27#include <asm/arch/clock.h> 27#include <mach/clock.h>
28#include "clock.h" 28#include "clock.h"
29 29
30/*forward declaration*/ 30/*forward declaration*/
diff --git a/arch/arm/mach-pnx4008/core.c b/arch/arm/mach-pnx4008/core.c
index 429c796938be..3ba46ede9bbd 100644
--- a/arch/arm/mach-pnx4008/core.c
+++ b/arch/arm/mach-pnx4008/core.c
@@ -26,7 +26,7 @@
26#include <linux/device.h> 26#include <linux/device.h>
27#include <linux/spi/spi.h> 27#include <linux/spi/spi.h>
28 28
29#include <asm/hardware.h> 29#include <mach/hardware.h>
30#include <asm/io.h> 30#include <asm/io.h>
31#include <asm/setup.h> 31#include <asm/setup.h>
32#include <asm/mach-types.h> 32#include <asm/mach-types.h>
@@ -38,9 +38,9 @@
38#include <asm/mach/map.h> 38#include <asm/mach/map.h>
39#include <asm/mach/time.h> 39#include <asm/mach/time.h>
40 40
41#include <asm/arch/irq.h> 41#include <mach/irq.h>
42#include <asm/arch/clock.h> 42#include <mach/clock.h>
43#include <asm/arch/dma.h> 43#include <mach/dma.h>
44 44
45struct resource spipnx_0_resources[] = { 45struct resource spipnx_0_resources[] = {
46 { 46 {
diff --git a/arch/arm/mach-pnx4008/dma.c b/arch/arm/mach-pnx4008/dma.c
index fe152e82590b..833c56be7344 100644
--- a/arch/arm/mach-pnx4008/dma.c
+++ b/arch/arm/mach-pnx4008/dma.c
@@ -23,12 +23,12 @@
23#include <linux/clk.h> 23#include <linux/clk.h>
24 24
25#include <asm/system.h> 25#include <asm/system.h>
26#include <asm/hardware.h> 26#include <mach/hardware.h>
27#include <asm/dma.h> 27#include <asm/dma.h>
28#include <asm/dma-mapping.h> 28#include <asm/dma-mapping.h>
29#include <asm/io.h> 29#include <asm/io.h>
30#include <asm/mach/dma.h> 30#include <asm/mach/dma.h>
31#include <asm/arch/clock.h> 31#include <mach/clock.h>
32 32
33static struct dma_channel { 33static struct dma_channel {
34 char *name; 34 char *name;
diff --git a/arch/arm/mach-pnx4008/gpio.c b/arch/arm/mach-pnx4008/gpio.c
index ef179cab80e2..fb51f7279e95 100644
--- a/arch/arm/mach-pnx4008/gpio.c
+++ b/arch/arm/mach-pnx4008/gpio.c
@@ -18,8 +18,8 @@
18#include <linux/kernel.h> 18#include <linux/kernel.h>
19#include <linux/module.h> 19#include <linux/module.h>
20#include <asm/io.h> 20#include <asm/io.h>
21#include <asm/arch/platform.h> 21#include <mach/platform.h>
22#include <asm/arch/gpio.h> 22#include <mach/gpio.h>
23 23
24/* register definitions */ 24/* register definitions */
25#define PIO_VA_BASE IO_ADDRESS(PNX4008_PIO_BASE) 25#define PIO_VA_BASE IO_ADDRESS(PNX4008_PIO_BASE)
diff --git a/arch/arm/mach-pnx4008/i2c.c b/arch/arm/mach-pnx4008/i2c.c
index 6f308827c4fe..87c093286ff9 100644
--- a/arch/arm/mach-pnx4008/i2c.c
+++ b/arch/arm/mach-pnx4008/i2c.c
@@ -14,8 +14,8 @@
14#include <linux/i2c-pnx.h> 14#include <linux/i2c-pnx.h>
15#include <linux/platform_device.h> 15#include <linux/platform_device.h>
16#include <linux/err.h> 16#include <linux/err.h>
17#include <asm/arch/platform.h> 17#include <mach/platform.h>
18#include <asm/arch/i2c.h> 18#include <mach/i2c.h>
19 19
20static int set_clock_run(struct platform_device *pdev) 20static int set_clock_run(struct platform_device *pdev)
21{ 21{
diff --git a/arch/arm/mach-pnx4008/include/mach/clock.h b/arch/arm/mach-pnx4008/include/mach/clock.h
new file mode 100644
index 000000000000..8d2a5ef52c90
--- /dev/null
+++ b/arch/arm/mach-pnx4008/include/mach/clock.h
@@ -0,0 +1,62 @@
1/*
2 * arch/arm/mach-pnx4008/include/mach/clock.h
3 *
4 * Clock control driver for PNX4008 - header file
5 *
6 * Authors: Vitaly Wool, Dmitry Chigirev <source@mvista.com>
7 *
8 * 2005 (c) MontaVista Software, Inc. This file is licensed under
9 * the terms of the GNU General Public License version 2. This program
10 * is licensed "as is" without any warranty of any kind, whether express
11 * or implied.
12 */
13#ifndef __PNX4008_CLOCK_H__
14#define __PNX4008_CLOCK_H__
15
16struct module;
17struct clk;
18
19#define PWRMAN_VA_BASE IO_ADDRESS(PNX4008_PWRMAN_BASE)
20#define HCLKDIVCTRL_REG (PWRMAN_VA_BASE + 0x40)
21#define PWRCTRL_REG (PWRMAN_VA_BASE + 0x44)
22#define PLLCTRL_REG (PWRMAN_VA_BASE + 0x48)
23#define OSC13CTRL_REG (PWRMAN_VA_BASE + 0x4c)
24#define SYSCLKCTRL_REG (PWRMAN_VA_BASE + 0x50)
25#define HCLKPLLCTRL_REG (PWRMAN_VA_BASE + 0x58)
26#define USBCTRL_REG (PWRMAN_VA_BASE + 0x64)
27#define SDRAMCLKCTRL_REG (PWRMAN_VA_BASE + 0x68)
28#define MSCTRL_REG (PWRMAN_VA_BASE + 0x80)
29#define BTCLKCTRL (PWRMAN_VA_BASE + 0x84)
30#define DUMCLKCTRL_REG (PWRMAN_VA_BASE + 0x90)
31#define I2CCLKCTRL_REG (PWRMAN_VA_BASE + 0xac)
32#define KEYCLKCTRL_REG (PWRMAN_VA_BASE + 0xb0)
33#define TSCLKCTRL_REG (PWRMAN_VA_BASE + 0xb4)
34#define PWMCLKCTRL_REG (PWRMAN_VA_BASE + 0xb8)
35#define TIMCLKCTRL_REG (PWRMAN_VA_BASE + 0xbc)
36#define SPICTRL_REG (PWRMAN_VA_BASE + 0xc4)
37#define FLASHCLKCTRL_REG (PWRMAN_VA_BASE + 0xc8)
38#define UART3CLK_REG (PWRMAN_VA_BASE + 0xd0)
39#define UARTCLKCTRL_REG (PWRMAN_VA_BASE + 0xe4)
40#define DMACLKCTRL_REG (PWRMAN_VA_BASE + 0xe8)
41#define AUTOCLK_CTRL (PWRMAN_VA_BASE + 0xec)
42#define JPEGCLKCTRL_REG (PWRMAN_VA_BASE + 0xfc)
43
44#define AUDIOCONFIG_VA_BASE IO_ADDRESS(PNX4008_AUDIOCONFIG_BASE)
45#define DSPPLLCTRL_REG (AUDIOCONFIG_VA_BASE + 0x60)
46#define DSPCLKCTRL_REG (AUDIOCONFIG_VA_BASE + 0x64)
47#define AUDIOCLKCTRL_REG (AUDIOCONFIG_VA_BASE + 0x68)
48#define AUDIOPLLCTRL_REG (AUDIOCONFIG_VA_BASE + 0x6C)
49
50#define USB_OTG_CLKCTRL_REG IO_ADDRESS(PNX4008_USB_CONFIG_BASE + 0xff4)
51
52#define VFP9CLKCTRL_REG IO_ADDRESS(PNX4008_DEBUG_BASE)
53
54#define CLK_RATE_13MHZ 13000
55#define CLK_RATE_1MHZ 1000
56#define CLK_RATE_208MHZ 208000
57#define CLK_RATE_48MHZ 48000
58#define CLK_RATE_32KHZ 32
59
60#define PNX4008_UART_CLK CLK_RATE_13MHZ * 1000 /* in MHz */
61
62#endif
diff --git a/arch/arm/mach-pnx4008/include/mach/debug-macro.S b/arch/arm/mach-pnx4008/include/mach/debug-macro.S
new file mode 100644
index 000000000000..6d1407f319f8
--- /dev/null
+++ b/arch/arm/mach-pnx4008/include/mach/debug-macro.S
@@ -0,0 +1,23 @@
1/* arch/arm/mach-pnx4008/include/mach/debug-macro.S
2 *
3 * Debugging macro include header
4 *
5 * Copyright (C) 1994-1999 Russell King
6 * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 *
12*/
13
14 .macro addruart,rx
15 mrc p15, 0, \rx, c1, c0
16 tst \rx, #1 @ MMU enabled?
17 mov \rx, #0x00090000
18 addeq \rx, \rx, #0x40000000
19 addne \rx, \rx, #0xf4000000
20 .endm
21
22#define UART_SHIFT 2
23#include <asm/hardware/debug-8250.S>
diff --git a/arch/arm/mach-pnx4008/include/mach/dma.h b/arch/arm/mach-pnx4008/include/mach/dma.h
new file mode 100644
index 000000000000..5442d04fc575
--- /dev/null
+++ b/arch/arm/mach-pnx4008/include/mach/dma.h
@@ -0,0 +1,162 @@
1/*
2 * arch/arm/mach-pnx4008/include/mach/dma.h
3 *
4 * PNX4008 DMA header file
5 *
6 * Author: Vitaly Wool
7 * Copyright: MontaVista Software Inc. (c) 2005
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12 */
13
14#ifndef __ASM_ARCH_DMA_H
15#define __ASM_ARCH_DMA_H
16
17#include "platform.h"
18
19#define MAX_DMA_ADDRESS 0xffffffff
20
21#define MAX_DMA_CHANNELS 8
22
23#define DMAC_BASE IO_ADDRESS(PNX4008_DMA_CONFIG_BASE)
24#define DMAC_INT_STAT (DMAC_BASE + 0x0000)
25#define DMAC_INT_TC_STAT (DMAC_BASE + 0x0004)
26#define DMAC_INT_TC_CLEAR (DMAC_BASE + 0x0008)
27#define DMAC_INT_ERR_STAT (DMAC_BASE + 0x000c)
28#define DMAC_INT_ERR_CLEAR (DMAC_BASE + 0x0010)
29#define DMAC_SOFT_SREQ (DMAC_BASE + 0x0024)
30#define DMAC_CONFIG (DMAC_BASE + 0x0030)
31#define DMAC_Cx_SRC_ADDR(c) (DMAC_BASE + 0x0100 + (c) * 0x20)
32#define DMAC_Cx_DEST_ADDR(c) (DMAC_BASE + 0x0104 + (c) * 0x20)
33#define DMAC_Cx_LLI(c) (DMAC_BASE + 0x0108 + (c) * 0x20)
34#define DMAC_Cx_CONTROL(c) (DMAC_BASE + 0x010c + (c) * 0x20)
35#define DMAC_Cx_CONFIG(c) (DMAC_BASE + 0x0110 + (c) * 0x20)
36
37enum {
38 WIDTH_BYTE = 0,
39 WIDTH_HWORD,
40 WIDTH_WORD
41};
42
43enum {
44 FC_MEM2MEM_DMA,
45 FC_MEM2PER_DMA,
46 FC_PER2MEM_DMA,
47 FC_PER2PER_DMA,
48 FC_PER2PER_DPER,
49 FC_MEM2PER_PER,
50 FC_PER2MEM_PER,
51 FC_PER2PER_SPER
52};
53
54enum {
55 DMA_INT_UNKNOWN = 0,
56 DMA_ERR_INT = 1,
57 DMA_TC_INT = 2,
58};
59
60enum {
61 DMA_BUFFER_ALLOCATED = 1,
62 DMA_HAS_LL = 2,
63};
64
65enum {
66 PER_CAM_DMA_1 = 0,
67 PER_NDF_FLASH = 1,
68 PER_MBX_SLAVE_FIFO = 2,
69 PER_SPI2_REC_XMIT = 3,
70 PER_MS_SD_RX_XMIT = 4,
71 PER_HS_UART_1_XMIT = 5,
72 PER_HS_UART_1_RX = 6,
73 PER_HS_UART_2_XMIT = 7,
74 PER_HS_UART_2_RX = 8,
75 PER_HS_UART_7_XMIT = 9,
76 PER_HS_UART_7_RX = 10,
77 PER_SPI1_REC_XMIT = 11,
78 PER_MLC_NDF_SREC = 12,
79 PER_CAM_DMA_2 = 13,
80 PER_PRNG_INFIFO = 14,
81 PER_PRNG_OUTFIFO = 15,
82};
83
84struct pnx4008_dma_ch_ctrl {
85 int tc_mask;
86 int cacheable;
87 int bufferable;
88 int priv_mode;
89 int di;
90 int si;
91 int dest_ahb1;
92 int src_ahb1;
93 int dwidth;
94 int swidth;
95 int dbsize;
96 int sbsize;
97 int tr_size;
98};
99
100struct pnx4008_dma_ch_config {
101 int halt;
102 int active;
103 int lock;
104 int itc;
105 int ie;
106 int flow_cntrl;
107 int dest_per;
108 int src_per;
109};
110
111struct pnx4008_dma_ll {
112 unsigned long src_addr;
113 unsigned long dest_addr;
114 u32 next_dma;
115 unsigned long ch_ctrl;
116 struct pnx4008_dma_ll *next;
117 int flags;
118 void *alloc_data;
119 int (*free) (void *);
120};
121
122struct pnx4008_dma_config {
123 int is_ll;
124 unsigned long src_addr;
125 unsigned long dest_addr;
126 unsigned long ch_ctrl;
127 unsigned long ch_cfg;
128 struct pnx4008_dma_ll *ll;
129 u32 ll_dma;
130 int flags;
131 void *alloc_data;
132 int (*free) (void *);
133};
134
135extern struct pnx4008_dma_ll *pnx4008_alloc_ll_entry(dma_addr_t *);
136extern void pnx4008_free_ll_entry(struct pnx4008_dma_ll *, dma_addr_t);
137extern void pnx4008_free_ll(u32 ll_dma, struct pnx4008_dma_ll *);
138
139extern int pnx4008_request_channel(char *, int,
140 void (*)(int, int, void *),
141 void *);
142extern void pnx4008_free_channel(int);
143extern int pnx4008_config_dma(int, int, int);
144extern int pnx4008_dma_pack_control(const struct pnx4008_dma_ch_ctrl *,
145 unsigned long *);
146extern int pnx4008_dma_parse_control(unsigned long,
147 struct pnx4008_dma_ch_ctrl *);
148extern int pnx4008_dma_pack_config(const struct pnx4008_dma_ch_config *,
149 unsigned long *);
150extern int pnx4008_dma_parse_config(unsigned long,
151 struct pnx4008_dma_ch_config *);
152extern int pnx4008_config_channel(int, struct pnx4008_dma_config *);
153extern int pnx4008_channel_get_config(int, struct pnx4008_dma_config *);
154extern int pnx4008_dma_ch_enable(int);
155extern int pnx4008_dma_ch_disable(int);
156extern int pnx4008_dma_ch_enabled(int);
157extern void pnx4008_dma_split_head_entry(struct pnx4008_dma_config *,
158 struct pnx4008_dma_ch_ctrl *);
159extern void pnx4008_dma_split_ll_entry(struct pnx4008_dma_ll *,
160 struct pnx4008_dma_ch_ctrl *);
161
162#endif /* _ASM_ARCH_DMA_H */
diff --git a/arch/arm/mach-pnx4008/include/mach/entry-macro.S b/arch/arm/mach-pnx4008/include/mach/entry-macro.S
new file mode 100644
index 000000000000..8003037578ed
--- /dev/null
+++ b/arch/arm/mach-pnx4008/include/mach/entry-macro.S
@@ -0,0 +1,127 @@
1/*
2 * arch/arm/mach-pnx4008/include/mach/entry-macro.S
3 *
4 * Low-level IRQ helper macros for PNX4008-based platforms
5 *
6 * 2005-2006 (c) MontaVista Software, Inc.
7 * Author: Vitaly Wool <vwool@ru.mvista.com>
8 * This file is licensed under the terms of the GNU General Public
9 * License version 2. This program is licensed "as is" without any
10 * warranty of any kind, whether express or implied.
11 */
12
13#include "platform.h"
14
15#define IO_BASE 0xF0000000
16#define IO_ADDRESS(x) (((((x) & 0xff000000) >> 4) | ((x) & 0xfffff)) | IO_BASE)
17
18#define INTRC_MASK 0x00
19#define INTRC_RAW_STAT 0x04
20#define INTRC_STAT 0x08
21#define INTRC_POLAR 0x0C
22#define INTRC_ACT_TYPE 0x10
23#define INTRC_TYPE 0x14
24
25#define SIC1_BASE_INT 32
26#define SIC2_BASE_INT 64
27
28 .macro disable_fiq
29 .endm
30
31 .macro get_irqnr_preamble, base, tmp
32 .endm
33
34 .macro arch_ret_to_user, tmp1, tmp2
35 .endm
36
37 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
38/* decode the MIC interrupt numbers */
39 ldr \base, =IO_ADDRESS(PNX4008_INTCTRLMIC_BASE)
40 ldr \irqstat, [\base, #INTRC_STAT]
41
42 cmp \irqstat,#1<<16
43 movhs \irqnr,#16
44 movlo \irqnr,#0
45 movhs \irqstat,\irqstat,lsr#16
46 cmp \irqstat,#1<<8
47 addhs \irqnr,\irqnr,#8
48 movhs \irqstat,\irqstat,lsr#8
49 cmp \irqstat,#1<<4
50 addhs \irqnr,\irqnr,#4
51 movhs \irqstat,\irqstat,lsr#4
52 cmp \irqstat,#1<<2
53 addhs \irqnr,\irqnr,#2
54 movhs \irqstat,\irqstat,lsr#2
55 cmp \irqstat,#1<<1
56 addhs \irqnr,\irqnr,#1
57
58/* was there an interrupt ? if not then drop out with EQ status */
59 teq \irqstat,#0
60 beq 1003f
61
62/* and now check for extended IRQ reasons */
63 cmp \irqnr,#1
64 bls 1003f
65 cmp \irqnr,#30
66 blo 1002f
67
68/* IRQ 31,30 : High priority cascade IRQ handle */
69/* read the correct SIC */
70/* decoding status after compare : eq is 30 (SIC1) , ne is 31 (SIC2) */
71/* set the base IRQ number */
72 ldreq \base, =IO_ADDRESS(PNX4008_INTCTRLSIC1_BASE)
73 moveq \irqnr,#SIC1_BASE_INT
74 ldrne \base, =IO_ADDRESS(PNX4008_INTCTRLSIC2_BASE)
75 movne \irqnr,#SIC2_BASE_INT
76 ldr \irqstat, [\base, #INTRC_STAT]
77 ldr \tmp, [\base, #INTRC_TYPE]
78/* and with inverted mask : low priority interrupts */
79 and \irqstat,\irqstat,\tmp
80 b 1004f
81
821003:
83/* IRQ 1,0 : Low priority cascade IRQ handle */
84/* read the correct SIC */
85/* decoding status after compare : eq is 1 (SIC2) , ne is 0 (SIC1)*/
86/* read the correct SIC */
87/* set the base IRQ number */
88 ldrne \base, =IO_ADDRESS(PNX4008_INTCTRLSIC1_BASE)
89 movne \irqnr,#SIC1_BASE_INT
90 ldreq \base, =IO_ADDRESS(PNX4008_INTCTRLSIC2_BASE)
91 moveq \irqnr,#SIC2_BASE_INT
92 ldr \irqstat, [\base, #INTRC_STAT]
93 ldr \tmp, [\base, #INTRC_TYPE]
94/* and with inverted mask : low priority interrupts */
95 bic \irqstat,\irqstat,\tmp
96
971004:
98
99 cmp \irqstat,#1<<16
100 addhs \irqnr,\irqnr,#16
101 movhs \irqstat,\irqstat,lsr#16
102 cmp \irqstat,#1<<8
103 addhs \irqnr,\irqnr,#8
104 movhs \irqstat,\irqstat,lsr#8
105 cmp \irqstat,#1<<4
106 addhs \irqnr,\irqnr,#4
107 movhs \irqstat,\irqstat,lsr#4
108 cmp \irqstat,#1<<2
109 addhs \irqnr,\irqnr,#2
110 movhs \irqstat,\irqstat,lsr#2
111 cmp \irqstat,#1<<1
112 addhs \irqnr,\irqnr,#1
113
114
115/* is irqstat not zero */
116
1171002:
118/* we assert that irqstat is not equal to zero and return ne status if true*/
119 teq \irqstat,#0
1201003:
121 .endm
122
123
124 .macro irq_prio_table
125 .endm
126
127
diff --git a/arch/arm/mach-pnx4008/include/mach/gpio.h b/arch/arm/mach-pnx4008/include/mach/gpio.h
new file mode 100644
index 000000000000..9591467eb9ec
--- /dev/null
+++ b/arch/arm/mach-pnx4008/include/mach/gpio.h
@@ -0,0 +1,241 @@
1/*
2 * arch/arm/mach-pnx4008/include/mach/gpio.h
3 *
4 * PNX4008 GPIO driver - header file
5 *
6 * Author: Dmitry Chigirev <source@mvista.com>
7 *
8 * Based on reference code by Iwo Mergler and Z.Tabaaloute from Philips:
9 * Copyright (c) 2005 Koninklijke Philips Electronics N.V.
10 *
11 * 2005 (c) MontaVista Software, Inc. This file is licensed under
12 * the terms of the GNU General Public License version 2. This program
13 * is licensed "as is" without any warranty of any kind, whether express
14 * or implied.
15 */
16
17#ifndef _PNX4008_GPIO_H_
18#define _PNX4008_GPIO_H_
19
20
21/* Block numbers */
22#define GPIO_IN (0)
23#define GPIO_OUT (0x100)
24#define GPIO_BID (0x200)
25#define GPIO_RAM (0x300)
26#define GPIO_MUX (0x400)
27
28#define GPIO_TYPE_MASK(K) ((K) & 0x700)
29
30/* INPUT GPIOs */
31/* GPI */
32#define GPI_00 (GPIO_IN | 0)
33#define GPI_01 (GPIO_IN | 1)
34#define GPI_02 (GPIO_IN | 2)
35#define GPI_03 (GPIO_IN | 3)
36#define GPI_04 (GPIO_IN | 4)
37#define GPI_05 (GPIO_IN | 5)
38#define GPI_06 (GPIO_IN | 6)
39#define GPI_07 (GPIO_IN | 7)
40#define GPI_08 (GPIO_IN | 8)
41#define GPI_09 (GPIO_IN | 9)
42#define U1_RX (GPIO_IN | 15)
43#define U2_HTCS (GPIO_IN | 16)
44#define U2_RX (GPIO_IN | 17)
45#define U3_RX (GPIO_IN | 18)
46#define U4_RX (GPIO_IN | 19)
47#define U5_RX (GPIO_IN | 20)
48#define U6_IRRX (GPIO_IN | 21)
49#define U7_HCTS (GPIO_IN | 22)
50#define U7_RX (GPIO_IN | 23)
51/* MISC IN */
52#define SPI1_DATIN (GPIO_IN | 25)
53#define DISP_SYNC (GPIO_IN | 26)
54#define SPI2_DATIN (GPIO_IN | 27)
55#define GPI_11 (GPIO_IN | 28)
56
57#define GPIO_IN_MASK 0x1eff83ff
58
59/* OUTPUT GPIOs */
60/* GPO */
61#define GPO_00 (GPIO_OUT | 0)
62#define GPO_01 (GPIO_OUT | 1)
63#define GPO_02 (GPIO_OUT | 2)
64#define GPO_03 (GPIO_OUT | 3)
65#define GPO_04 (GPIO_OUT | 4)
66#define GPO_05 (GPIO_OUT | 5)
67#define GPO_06 (GPIO_OUT | 6)
68#define GPO_07 (GPIO_OUT | 7)
69#define GPO_08 (GPIO_OUT | 8)
70#define GPO_09 (GPIO_OUT | 9)
71#define GPO_10 (GPIO_OUT | 10)
72#define GPO_11 (GPIO_OUT | 11)
73#define GPO_12 (GPIO_OUT | 12)
74#define GPO_13 (GPIO_OUT | 13)
75#define GPO_14 (GPIO_OUT | 14)
76#define GPO_15 (GPIO_OUT | 15)
77#define GPO_16 (GPIO_OUT | 16)
78#define GPO_17 (GPIO_OUT | 17)
79#define GPO_18 (GPIO_OUT | 18)
80#define GPO_19 (GPIO_OUT | 19)
81#define GPO_20 (GPIO_OUT | 20)
82#define GPO_21 (GPIO_OUT | 21)
83#define GPO_22 (GPIO_OUT | 22)
84#define GPO_23 (GPIO_OUT | 23)
85
86#define GPIO_OUT_MASK 0xffffff
87
88/* BIDIRECTIONAL GPIOs */
89/* RAM pins */
90#define RAM_D19 (GPIO_RAM | 0)
91#define RAM_D20 (GPIO_RAM | 1)
92#define RAM_D21 (GPIO_RAM | 2)
93#define RAM_D22 (GPIO_RAM | 3)
94#define RAM_D23 (GPIO_RAM | 4)
95#define RAM_D24 (GPIO_RAM | 5)
96#define RAM_D25 (GPIO_RAM | 6)
97#define RAM_D26 (GPIO_RAM | 7)
98#define RAM_D27 (GPIO_RAM | 8)
99#define RAM_D28 (GPIO_RAM | 9)
100#define RAM_D29 (GPIO_RAM | 10)
101#define RAM_D30 (GPIO_RAM | 11)
102#define RAM_D31 (GPIO_RAM | 12)
103
104#define GPIO_RAM_MASK 0x1fff
105
106/* I/O pins */
107#define GPIO_00 (GPIO_BID | 25)
108#define GPIO_01 (GPIO_BID | 26)
109#define GPIO_02 (GPIO_BID | 27)
110#define GPIO_03 (GPIO_BID | 28)
111#define GPIO_04 (GPIO_BID | 29)
112#define GPIO_05 (GPIO_BID | 30)
113
114#define GPIO_BID_MASK 0x7e000000
115
116/* Non-GPIO multiplexed PIOs. For multiplexing with GPIO, please use GPIO macros */
117#define GPIO_SDRAM_SEL (GPIO_MUX | 3)
118
119#define GPIO_MUX_MASK 0x8
120
121/* Extraction/assembly macros */
122#define GPIO_BIT_MASK(K) ((K) & 0x1F)
123#define GPIO_BIT(K) (1 << GPIO_BIT_MASK(K))
124#define GPIO_ISMUX(K) ((GPIO_TYPE_MASK(K) == GPIO_MUX) && (GPIO_BIT(K) & GPIO_MUX_MASK))
125#define GPIO_ISRAM(K) ((GPIO_TYPE_MASK(K) == GPIO_RAM) && (GPIO_BIT(K) & GPIO_RAM_MASK))
126#define GPIO_ISBID(K) ((GPIO_TYPE_MASK(K) == GPIO_BID) && (GPIO_BIT(K) & GPIO_BID_MASK))
127#define GPIO_ISOUT(K) ((GPIO_TYPE_MASK(K) == GPIO_OUT) && (GPIO_BIT(K) & GPIO_OUT_MASK))
128#define GPIO_ISIN(K) ((GPIO_TYPE_MASK(K) == GPIO_IN) && (GPIO_BIT(K) & GPIO_IN_MASK))
129
130/* Start Enable Pin Interrupts - table 58 page 66 */
131
132#define SE_PIN_BASE_INT 32
133
134#define SE_U7_RX_INT 63
135#define SE_U7_HCTS_INT 62
136#define SE_BT_CLKREQ_INT 61
137#define SE_U6_IRRX_INT 60
138/*59 unused*/
139#define SE_U5_RX_INT 58
140#define SE_GPI_11_INT 57
141#define SE_U3_RX_INT 56
142#define SE_U2_HCTS_INT 55
143#define SE_U2_RX_INT 54
144#define SE_U1_RX_INT 53
145#define SE_DISP_SYNC_INT 52
146/*51 unused*/
147#define SE_SDIO_INT_N 50
148#define SE_MSDIO_START_INT 49
149#define SE_GPI_06_INT 48
150#define SE_GPI_05_INT 47
151#define SE_GPI_04_INT 46
152#define SE_GPI_03_INT 45
153#define SE_GPI_02_INT 44
154#define SE_GPI_01_INT 43
155#define SE_GPI_00_INT 42
156#define SE_SYSCLKEN_PIN_INT 41
157#define SE_SPI1_DATAIN_INT 40
158#define SE_GPI_07_INT 39
159#define SE_SPI2_DATAIN_INT 38
160#define SE_GPI_10_INT 37
161#define SE_GPI_09_INT 36
162#define SE_GPI_08_INT 35
163/*34-32 unused*/
164
165/* Start Enable Internal Interrupts - table 57 page 65 */
166
167#define SE_INT_BASE_INT 0
168
169#define SE_TS_IRQ 31
170#define SE_TS_P_INT 30
171#define SE_TS_AUX_INT 29
172/*27-28 unused*/
173#define SE_USB_AHB_NEED_CLK_INT 26
174#define SE_MSTIMER_INT 25
175#define SE_RTC_INT 24
176#define SE_USB_NEED_CLK_INT 23
177#define SE_USB_INT 22
178#define SE_USB_I2C_INT 21
179#define SE_USB_OTG_TIMER_INT 20
180#define SE_USB_OTG_ATX_INT_N 19
181/*18 unused*/
182#define SE_DSP_GPIO4_INT 17
183#define SE_KEY_IRQ 16
184#define SE_DSP_SLAVEPORT_INT 15
185#define SE_DSP_GPIO1_INT 14
186#define SE_DSP_GPIO0_INT 13
187#define SE_DSP_AHB_INT 12
188/*11-6 unused*/
189#define SE_GPIO_05_INT 5
190#define SE_GPIO_04_INT 4
191#define SE_GPIO_03_INT 3
192#define SE_GPIO_02_INT 2
193#define SE_GPIO_01_INT 1
194#define SE_GPIO_00_INT 0
195
196#define START_INT_REG_BIT(irq) (1<<((irq)&0x1F))
197
198#define START_INT_ER_REG(irq) IO_ADDRESS((PNX4008_PWRMAN_BASE + 0x20 + (((irq)&(0x1<<5))>>1)))
199#define START_INT_RSR_REG(irq) IO_ADDRESS((PNX4008_PWRMAN_BASE + 0x24 + (((irq)&(0x1<<5))>>1)))
200#define START_INT_SR_REG(irq) IO_ADDRESS((PNX4008_PWRMAN_BASE + 0x28 + (((irq)&(0x1<<5))>>1)))
201#define START_INT_APR_REG(irq) IO_ADDRESS((PNX4008_PWRMAN_BASE + 0x2C + (((irq)&(0x1<<5))>>1)))
202
203extern int pnx4008_gpio_register_pin(unsigned short pin);
204extern int pnx4008_gpio_unregister_pin(unsigned short pin);
205extern unsigned long pnx4008_gpio_read_pin(unsigned short pin);
206extern int pnx4008_gpio_write_pin(unsigned short pin, int output);
207extern int pnx4008_gpio_set_pin_direction(unsigned short pin, int output);
208extern int pnx4008_gpio_read_pin_direction(unsigned short pin);
209extern int pnx4008_gpio_set_pin_mux(unsigned short pin, int output);
210extern int pnx4008_gpio_read_pin_mux(unsigned short pin);
211
212static inline void start_int_umask(u8 irq)
213{
214 __raw_writel(__raw_readl(START_INT_ER_REG(irq)) |
215 START_INT_REG_BIT(irq), START_INT_ER_REG(irq));
216}
217
218static inline void start_int_mask(u8 irq)
219{
220 __raw_writel(__raw_readl(START_INT_ER_REG(irq)) &
221 ~START_INT_REG_BIT(irq), START_INT_ER_REG(irq));
222}
223
224static inline void start_int_ack(u8 irq)
225{
226 __raw_writel(START_INT_REG_BIT(irq), START_INT_RSR_REG(irq));
227}
228
229static inline void start_int_set_falling_edge(u8 irq)
230{
231 __raw_writel(__raw_readl(START_INT_APR_REG(irq)) &
232 ~START_INT_REG_BIT(irq), START_INT_APR_REG(irq));
233}
234
235static inline void start_int_set_rising_edge(u8 irq)
236{
237 __raw_writel(__raw_readl(START_INT_APR_REG(irq)) |
238 START_INT_REG_BIT(irq), START_INT_APR_REG(irq));
239}
240
241#endif /* _PNX4008_GPIO_H_ */
diff --git a/arch/arm/mach-pnx4008/include/mach/hardware.h b/arch/arm/mach-pnx4008/include/mach/hardware.h
new file mode 100644
index 000000000000..7b98b828d368
--- /dev/null
+++ b/arch/arm/mach-pnx4008/include/mach/hardware.h
@@ -0,0 +1,32 @@
1/*
2 * arch/arm/mach-pnx4008/include/mach/hardware.h
3 *
4 * Copyright (c) 2005 MontaVista Software, Inc. <source@mvista.com>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20#ifndef __ASM_ARCH_HARDWARE_H
21#define __ASM_ARCH_HARDWARE_H
22
23#include <asm/sizes.h>
24#include <mach/platform.h>
25
26/* Start of virtual addresses for IO devices */
27#define IO_BASE 0xF0000000
28
29/* This macro relies on fact that for all HW i/o addresses bits 20-23 are 0 */
30#define IO_ADDRESS(x) (((((x) & 0xff000000) >> 4) | ((x) & 0xfffff)) | IO_BASE)
31
32#endif
diff --git a/arch/arm/mach-pnx4008/include/mach/i2c.h b/arch/arm/mach-pnx4008/include/mach/i2c.h
new file mode 100644
index 000000000000..259ac53abf40
--- /dev/null
+++ b/arch/arm/mach-pnx4008/include/mach/i2c.h
@@ -0,0 +1,64 @@
1/*
2 * PNX4008-specific tweaks for I2C IP3204 block
3 *
4 * Author: Vitaly Wool <vwool@ru.mvista.com>
5 *
6 * 2005 (c) MontaVista Software, Inc. This file is licensed under
7 * the terms of the GNU General Public License version 2. This program
8 * is licensed "as is" without any warranty of any kind, whether express
9 * or implied.
10 */
11
12#ifndef __ASM_ARCH_I2C_H__
13#define __ASM_ARCH_I2C_H__
14
15enum {
16 mstatus_tdi = 0x00000001,
17 mstatus_afi = 0x00000002,
18 mstatus_nai = 0x00000004,
19 mstatus_drmi = 0x00000008,
20 mstatus_active = 0x00000020,
21 mstatus_scl = 0x00000040,
22 mstatus_sda = 0x00000080,
23 mstatus_rff = 0x00000100,
24 mstatus_rfe = 0x00000200,
25 mstatus_tff = 0x00000400,
26 mstatus_tfe = 0x00000800,
27};
28
29enum {
30 mcntrl_tdie = 0x00000001,
31 mcntrl_afie = 0x00000002,
32 mcntrl_naie = 0x00000004,
33 mcntrl_drmie = 0x00000008,
34 mcntrl_daie = 0x00000020,
35 mcntrl_rffie = 0x00000040,
36 mcntrl_tffie = 0x00000080,
37 mcntrl_reset = 0x00000100,
38 mcntrl_cdbmode = 0x00000400,
39};
40
41enum {
42 rw_bit = 1 << 0,
43 start_bit = 1 << 8,
44 stop_bit = 1 << 9,
45};
46
47#define I2C_REG_RX(a) ((a)->ioaddr) /* Rx FIFO reg (RO) */
48#define I2C_REG_TX(a) ((a)->ioaddr) /* Tx FIFO reg (WO) */
49#define I2C_REG_STS(a) ((a)->ioaddr + 0x04) /* Status reg (RO) */
50#define I2C_REG_CTL(a) ((a)->ioaddr + 0x08) /* Ctl reg */
51#define I2C_REG_CKL(a) ((a)->ioaddr + 0x0c) /* Clock divider low */
52#define I2C_REG_CKH(a) ((a)->ioaddr + 0x10) /* Clock divider high */
53#define I2C_REG_ADR(a) ((a)->ioaddr + 0x14) /* I2C address */
54#define I2C_REG_RFL(a) ((a)->ioaddr + 0x18) /* Rx FIFO level (RO) */
55#define I2C_REG_TFL(a) ((a)->ioaddr + 0x1c) /* Tx FIFO level (RO) */
56#define I2C_REG_RXB(a) ((a)->ioaddr + 0x20) /* Num of bytes Rx-ed (RO) */
57#define I2C_REG_TXB(a) ((a)->ioaddr + 0x24) /* Num of bytes Tx-ed (RO) */
58#define I2C_REG_TXS(a) ((a)->ioaddr + 0x28) /* Tx slave FIFO (RO) */
59#define I2C_REG_STFL(a) ((a)->ioaddr + 0x2c) /* Tx slave FIFO level (RO) */
60
61#define HCLK_MHZ 13
62#define I2C_CHIP_NAME "PNX4008-I2C"
63
64#endif /* __ASM_ARCH_I2C_H___ */
diff --git a/arch/arm/mach-pnx4008/include/mach/io.h b/arch/arm/mach-pnx4008/include/mach/io.h
new file mode 100644
index 000000000000..c6206f25839d
--- /dev/null
+++ b/arch/arm/mach-pnx4008/include/mach/io.h
@@ -0,0 +1,21 @@
1
2/*
3 * arch/arm/mach-pnx4008/include/mach/io.h
4 *
5 * Author: Dmitry Chigirev <chigirev@ru.mvista.com>
6 *
7 * 2005 (c) MontaVista Software, Inc. This file is licensed under
8 * the terms of the GNU General Public License version 2. This program
9 * is licensed "as is" without any warranty of any kind, whether express
10 * or implied.
11 */
12
13#ifndef __ASM_ARM_ARCH_IO_H
14#define __ASM_ARM_ARCH_IO_H
15
16#define IO_SPACE_LIMIT 0xffffffff
17
18#define __io(a) ((void __iomem *)(a))
19#define __mem_pci(a) (a)
20
21#endif
diff --git a/arch/arm/mach-pnx4008/include/mach/irq.h b/arch/arm/mach-pnx4008/include/mach/irq.h
new file mode 100644
index 000000000000..2a690ca33870
--- /dev/null
+++ b/arch/arm/mach-pnx4008/include/mach/irq.h
@@ -0,0 +1,42 @@
1/*
2 * arch/arm/mach-pnx4008/include/mach/irq.h
3 *
4 * PNX4008 IRQ controller driver - header file
5 * this one is used in entry-arnv.S as well so it cannot contain C code
6 *
7 * Copyright (c) 2005 Philips Semiconductors
8 * Copyright (c) 2005 MontaVista Software, Inc.
9 *
10 * This program is free software; you can redistribute it and/or modify it
11 * under the terms of the GNU General Public License as published by the
12 * Free Software Foundation; either version 2 of the License, or (at your
13 * option) any later version.
14 */
15#ifndef __PNX4008_IRQ_H__
16#define __PNX4008_IRQ_H__
17
18#define MIC_VA_BASE IO_ADDRESS(PNX4008_INTCTRLMIC_BASE)
19#define SIC1_VA_BASE IO_ADDRESS(PNX4008_INTCTRLSIC1_BASE)
20#define SIC2_VA_BASE IO_ADDRESS(PNX4008_INTCTRLSIC2_BASE)
21
22/* Manual: Chapter 20, page 195 */
23
24#define INTC_BIT(irq) (1<< ((irq) & 0x1F))
25
26#define INTC_ER(irq) IO_ADDRESS((PNX4008_INTCTRLMIC_BASE + 0x0 + (((irq)&(0x3<<5))<<9)))
27#define INTC_RSR(irq) IO_ADDRESS((PNX4008_INTCTRLMIC_BASE + 0x4 + (((irq)&(0x3<<5))<<9)))
28#define INTC_SR(irq) IO_ADDRESS((PNX4008_INTCTRLMIC_BASE + 0x8 + (((irq)&(0x3<<5))<<9)))
29#define INTC_APR(irq) IO_ADDRESS((PNX4008_INTCTRLMIC_BASE + 0xC + (((irq)&(0x3<<5))<<9)))
30#define INTC_ATR(irq) IO_ADDRESS((PNX4008_INTCTRLMIC_BASE + 0x10 + (((irq)&(0x3<<5))<<9)))
31#define INTC_ITR(irq) IO_ADDRESS((PNX4008_INTCTRLMIC_BASE + 0x14 + (((irq)&(0x3<<5))<<9)))
32
33#define START_INT_REG_BIT(irq) (1<<((irq)&0x1F))
34
35#define START_INT_ER_REG(irq) IO_ADDRESS((PNX4008_PWRMAN_BASE + 0x20 + (((irq)&(0x1<<5))>>1)))
36#define START_INT_RSR_REG(irq) IO_ADDRESS((PNX4008_PWRMAN_BASE + 0x24 + (((irq)&(0x1<<5))>>1)))
37#define START_INT_SR_REG(irq) IO_ADDRESS((PNX4008_PWRMAN_BASE + 0x28 + (((irq)&(0x1<<5))>>1)))
38#define START_INT_APR_REG(irq) IO_ADDRESS((PNX4008_PWRMAN_BASE + 0x2C + (((irq)&(0x1<<5))>>1)))
39
40extern void __init pnx4008_init_irq(void);
41
42#endif /* __PNX4008_IRQ_H__ */
diff --git a/arch/arm/mach-pnx4008/include/mach/irqs.h b/arch/arm/mach-pnx4008/include/mach/irqs.h
new file mode 100644
index 000000000000..f6b33cf23ae2
--- /dev/null
+++ b/arch/arm/mach-pnx4008/include/mach/irqs.h
@@ -0,0 +1,215 @@
1/*
2 * arch/arm/mach-pnx4008/include/mach/irqs.h
3 *
4 * PNX4008 IRQ controller driver - header file
5 *
6 * Author: Dmitry Chigirev <source@mvista.com>
7 *
8 * 2005 (c) MontaVista Software, Inc. This file is licensed under
9 * the terms of the GNU General Public License version 2. This program
10 * is licensed "as is" without any warranty of any kind, whether express
11 * or implied.
12 */
13#ifndef __PNX4008_IRQS_h__
14#define __PNX4008_IRQS_h__
15
16#define NR_IRQS 96
17
18/*Manual: table 259, page 199*/
19
20/*SUB2 Interrupt Routing (SIC2)*/
21
22#define SIC2_BASE_INT 64
23
24#define CLK_SWITCH_ARM_INT 95 /*manual: Clkswitch ARM */
25#define CLK_SWITCH_DSP_INT 94 /*manual: ClkSwitch DSP */
26#define CLK_SWITCH_AUD_INT 93 /*manual: Clkswitch AUD */
27#define GPI_06_INT 92
28#define GPI_05_INT 91
29#define GPI_04_INT 90
30#define GPI_03_INT 89
31#define GPI_02_INT 88
32#define GPI_01_INT 87
33#define GPI_00_INT 86
34#define BT_CLKREQ_INT 85
35#define SPI1_DATIN_INT 84
36#define U5_RX_INT 83
37#define SDIO_INT_N 82
38#define CAM_HS_INT 81
39#define CAM_VS_INT 80
40#define GPI_07_INT 79
41#define DISP_SYNC_INT 78
42#define DSP_INT8 77
43#define U7_HCTS_INT 76
44#define GPI_10_INT 75
45#define GPI_09_INT 74
46#define GPI_08_INT 73
47#define DSP_INT7 72
48#define U2_HCTS_INT 71
49#define SPI2_DATIN_INT 70
50#define GPIO_05_INT 69
51#define GPIO_04_INT 68
52#define GPIO_03_INT 67
53#define GPIO_02_INT 66
54#define GPIO_01_INT 65
55#define GPIO_00_INT 64
56
57/*Manual: table 258, page 198*/
58
59/*SUB1 Interrupt Routing (SIC1)*/
60
61#define SIC1_BASE_INT 32
62
63#define USB_I2C_INT 63
64#define USB_DEV_HP_INT 62
65#define USB_DEV_LP_INT 61
66#define USB_DEV_DMA_INT 60
67#define USB_HOST_INT 59
68#define USB_OTG_ATX_INT_N 58
69#define USB_OTG_TIMER_INT 57
70#define SW_INT 56
71#define SPI1_INT 55
72#define KEY_IRQ 54
73#define DSP_M_INT 53
74#define RTC_INT 52
75#define I2C_1_INT 51
76#define I2C_2_INT 50
77#define PLL1_LOCK_INT 49
78#define PLL2_LOCK_INT 48
79#define PLL3_LOCK_INT 47
80#define PLL4_LOCK_INT 46
81#define PLL5_LOCK_INT 45
82#define SPI2_INT 44
83#define DSP_INT1 43
84#define DSP_INT2 42
85#define DSP_TDM_INT2 41
86#define TS_AUX_INT 40
87#define TS_IRQ 39
88#define TS_P_INT 38
89#define UOUT1_TO_PAD_INT 37
90#define GPI_11_INT 36
91#define DSP_INT4 35
92#define JTAG_COMM_RX_INT 34
93#define JTAG_COMM_TX_INT 33
94#define DSP_INT3 32
95
96/*Manual: table 257, page 197*/
97
98/*MAIN Interrupt Routing*/
99
100#define MAIN_BASE_INT 0
101
102#define SUB2_FIQ_N 31 /*active low */
103#define SUB1_FIQ_N 30 /*active low */
104#define JPEG_INT 29
105#define DMA_INT 28
106#define MSTIMER_INT 27
107#define IIR1_INT 26
108#define IIR2_INT 25
109#define IIR7_INT 24
110#define DSP_TDM_INT0 23
111#define DSP_TDM_INT1 22
112#define DSP_P_INT 21
113#define DSP_INT0 20
114#define DUM_INT 19
115#define UOUT0_TO_PAD_INT 18
116#define MP4_ENC_INT 17
117#define MP4_DEC_INT 16
118#define SD0_INT 15
119#define MBX_INT 14
120#define SD1_INT 13
121#define MS_INT_N 12
122#define FLASH_INT 11 /*NAND*/
123#define IIR6_INT 10
124#define IIR5_INT 9
125#define IIR4_INT 8
126#define IIR3_INT 7
127#define WATCH_INT 6
128#define HSTIMER_INT 5
129#define ARCH_TIMER_IRQ HSTIMER_INT
130#define CAM_INT 4
131#define PRNG_INT 3
132#define CRYPTO_INT 2
133#define SUB2_IRQ_N 1 /*active low */
134#define SUB1_IRQ_N 0 /*active low */
135
136#define PNX4008_IRQ_TYPES \
137{ /*IRQ #'s: */ \
138IRQ_TYPE_LEVEL_LOW, IRQ_TYPE_LEVEL_LOW, IRQ_TYPE_LEVEL_LOW, IRQ_TYPE_LEVEL_HIGH, /* 0, 1, 2, 3 */ \
139IRQ_TYPE_LEVEL_LOW, IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, /* 4, 5, 6, 7 */ \
140IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, /* 8, 9,10,11 */ \
141IRQ_TYPE_LEVEL_LOW, IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, /* 12,13,14,15 */ \
142IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, /* 16,17,18,19 */ \
143IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, /* 20,21,22,23 */ \
144IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, /* 24,25,26,27 */ \
145IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_LOW, IRQ_TYPE_LEVEL_LOW, /* 28,29,30,31 */ \
146IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_LOW, IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, /* 32,33,34,35 */ \
147IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_EDGE_FALLING, IRQ_TYPE_LEVEL_HIGH, /* 36,37,38,39 */ \
148IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, /* 40,41,42,43 */ \
149IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, /* 44,45,46,47 */ \
150IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_LOW, IRQ_TYPE_LEVEL_LOW, /* 48,49,50,51 */ \
151IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, /* 52,53,54,55 */ \
152IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_LOW, IRQ_TYPE_LEVEL_HIGH, /* 56,57,58,59 */ \
153IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, /* 60,61,62,63 */ \
154IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, /* 64,65,66,67 */ \
155IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, /* 68,69,70,71 */ \
156IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, /* 72,73,74,75 */ \
157IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, /* 76,77,78,79 */ \
158IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, /* 80,81,82,83 */ \
159IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, /* 84,85,86,87 */ \
160IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, /* 88,89,90,91 */ \
161IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, /* 92,93,94,95 */ \
162}
163
164/* Start Enable Pin Interrupts - table 58 page 66 */
165
166#define SE_PIN_BASE_INT 32
167
168#define SE_U7_RX_INT 63
169#define SE_U7_HCTS_INT 62
170#define SE_BT_CLKREQ_INT 61
171#define SE_U6_IRRX_INT 60
172/*59 unused*/
173#define SE_U5_RX_INT 58
174#define SE_GPI_11_INT 57
175#define SE_U3_RX_INT 56
176#define SE_U2_HCTS_INT 55
177#define SE_U2_RX_INT 54
178#define SE_U1_RX_INT 53
179#define SE_DISP_SYNC_INT 52
180/*51 unused*/
181#define SE_SDIO_INT_N 50
182#define SE_MSDIO_START_INT 49
183#define SE_GPI_06_INT 48
184#define SE_GPI_05_INT 47
185#define SE_GPI_04_INT 46
186#define SE_GPI_03_INT 45
187#define SE_GPI_02_INT 44
188#define SE_GPI_01_INT 43
189#define SE_GPI_00_INT 42
190#define SE_SYSCLKEN_PIN_INT 41
191#define SE_SPI1_DATAIN_INT 40
192#define SE_GPI_07_INT 39
193#define SE_SPI2_DATAIN_INT 38
194#define SE_GPI_10_INT 37
195#define SE_GPI_09_INT 36
196#define SE_GPI_08_INT 35
197/*34-32 unused*/
198
199/* Start Enable Internal Interrupts - table 57 page 65 */
200
201#define SE_INT_BASE_INT 0
202
203#define SE_TS_IRQ 31
204#define SE_TS_P_INT 30
205#define SE_TS_AUX_INT 29
206/*27-28 unused*/
207#define SE_USB_AHB_NEED_CLK_INT 26
208#define SE_MSTIMER_INT 25
209#define SE_RTC_INT 24
210#define SE_USB_NEED_CLK_INT 23
211#define SE_USB_INT 22
212#define SE_USB_I2C_INT 21
213#define SE_USB_OTG_TIMER_INT 20
214
215#endif /* __PNX4008_IRQS_h__ */
diff --git a/arch/arm/mach-pnx4008/include/mach/memory.h b/arch/arm/mach-pnx4008/include/mach/memory.h
new file mode 100644
index 000000000000..5789a2d16f5a
--- /dev/null
+++ b/arch/arm/mach-pnx4008/include/mach/memory.h
@@ -0,0 +1,24 @@
1/*
2 * arch/arm/mach-pnx4008/include/mach/memory.h
3 *
4 * Copyright (c) 2005 Philips Semiconductors
5 * Copyright (c) 2005 MontaVista Software, Inc.
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; either version 2 of the License, or (at your
10 * option) any later version.
11 */
12
13#ifndef __ASM_ARCH_MEMORY_H
14#define __ASM_ARCH_MEMORY_H
15
16/*
17 * Physical DRAM offset.
18 */
19#define PHYS_OFFSET (0x80000000)
20
21#define __virt_to_bus(x) ((x) - PAGE_OFFSET + PHYS_OFFSET)
22#define __bus_to_virt(x) ((x) + PAGE_OFFSET - PHYS_OFFSET)
23
24#endif
diff --git a/arch/arm/mach-pnx4008/include/mach/param.h b/arch/arm/mach-pnx4008/include/mach/param.h
new file mode 100644
index 000000000000..6ea02f2176b7
--- /dev/null
+++ b/arch/arm/mach-pnx4008/include/mach/param.h
@@ -0,0 +1,21 @@
1/*
2 * arch/arm/mach-pnx4008/include/mach/param.h
3 *
4 * Copyright (C) 1999 ARM Limited
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20
21#define HZ 100
diff --git a/arch/arm/mach-pnx4008/include/mach/platform.h b/arch/arm/mach-pnx4008/include/mach/platform.h
new file mode 100644
index 000000000000..368c2c10a308
--- /dev/null
+++ b/arch/arm/mach-pnx4008/include/mach/platform.h
@@ -0,0 +1,69 @@
1/*
2 * arch/arm/mach-pnx4008/include/mach/platform.h
3 *
4 * PNX4008 Base addresses - header file
5 *
6 * Author: Dmitry Chigirev <source@mvista.com>
7 *
8 * Based on reference code received from Philips:
9 * Copyright (C) 2003 Philips Semiconductors
10 *
11 * 2005 (c) MontaVista Software, Inc. This file is licensed under
12 * the terms of the GNU General Public License version 2. This program
13 * is licensed "as is" without any warranty of any kind, whether express
14 * or implied.
15 */
16
17
18#ifndef __ASM_ARCH_PLATFORM_H__
19#define __ASM_ARCH_PLATFORM_H__
20
21#define PNX4008_IRAM_BASE 0x08000000
22#define PNX4008_IRAM_SIZE 0x00010000
23#define PNX4008_YUV_SLAVE_BASE 0x10000000
24#define PNX4008_DUM_SLAVE_BASE 0x18000000
25#define PNX4008_NDF_FLASH_BASE 0x20020000
26#define PNX4008_SPI1_BASE 0x20088000
27#define PNX4008_SPI2_BASE 0x20090000
28#define PNX4008_SD_CONFIG_BASE 0x20098000
29#define PNX4008_FLASH_DATA 0x200B0000
30#define PNX4008_MLC_FLASH_BASE 0x200B8000
31#define PNX4008_JPEG_CONFIG_BASE 0x300A0000
32#define PNX4008_DMA_CONFIG_BASE 0x31000000
33#define PNX4008_USB_CONFIG_BASE 0x31020000
34#define PNX4008_SDRAM_CFG_BASE 0x31080000
35#define PNX4008_AHB2FAB_BASE 0x40000000
36#define PNX4008_PWRMAN_BASE 0x40004000
37#define PNX4008_INTCTRLMIC_BASE 0x40008000
38#define PNX4008_INTCTRLSIC1_BASE 0x4000C000
39#define PNX4008_INTCTRLSIC2_BASE 0x40010000
40#define PNX4008_HSUART1_BASE 0x40014000
41#define PNX4008_HSUART2_BASE 0x40018000
42#define PNX4008_HSUART7_BASE 0x4001C000
43#define PNX4008_RTC_BASE 0x40024000
44#define PNX4008_PIO_BASE 0x40028000
45#define PNX4008_MSTIMER_BASE 0x40034000
46#define PNX4008_HSTIMER_BASE 0x40038000
47#define PNX4008_WDOG_BASE 0x4003C000
48#define PNX4008_DEBUG_BASE 0x40040000
49#define PNX4008_TOUCH1_BASE 0x40048000
50#define PNX4008_KEYSCAN_BASE 0x40050000
51#define PNX4008_UARTCTRL_BASE 0x40054000
52#define PNX4008_PWM_BASE 0x4005C000
53#define PNX4008_UART3_BASE 0x40080000
54#define PNX4008_UART4_BASE 0x40088000
55#define PNX4008_UART5_BASE 0x40090000
56#define PNX4008_UART6_BASE 0x40098000
57#define PNX4008_I2C1_BASE 0x400A0000
58#define PNX4008_I2C2_BASE 0x400A8000
59#define PNX4008_MAGICGATE_BASE 0x400B0000
60#define PNX4008_DUMCONF_BASE 0x400B8000
61#define PNX4008_DUM_MAINCFG_BASE 0x400BC000
62#define PNX4008_DSP_BASE 0x400C0000
63#define PNX4008_PROFCOUNTER_BASE 0x400C8000
64#define PNX4008_CRYPTO_BASE 0x400D0000
65#define PNX4008_CAMIFCONF_BASE 0x400D8000
66#define PNX4008_YUV2RGB_BASE 0x400E0000
67#define PNX4008_AUDIOCONFIG_BASE 0x400E8000
68
69#endif
diff --git a/arch/arm/mach-pnx4008/include/mach/pm.h b/arch/arm/mach-pnx4008/include/mach/pm.h
new file mode 100644
index 000000000000..2fa685bff858
--- /dev/null
+++ b/arch/arm/mach-pnx4008/include/mach/pm.h
@@ -0,0 +1,33 @@
1/*
2 * arch/arm/mach-pnx4008/include/mach/pm.h
3 *
4 * PNX4008 Power Management Routiness - header file
5 *
6 * Authors: Vitaly Wool, Dmitry Chigirev <source@mvista.com>
7 *
8 * 2005 (c) MontaVista Software, Inc. This file is licensed under
9 * the terms of the GNU General Public License version 2. This program
10 * is licensed "as is" without any warranty of any kind, whether express
11 * or implied.
12 */
13
14#ifndef __ASM_ARCH_PNX4008_PM_H
15#define __ASM_ARCH_PNX4008_PM_H
16
17#ifndef __ASSEMBLER__
18#include "irq.h"
19#include "irqs.h"
20#include "clock.h"
21
22extern void pnx4008_pm_idle(void);
23extern void pnx4008_pm_suspend(void);
24extern unsigned int pnx4008_cpu_suspend_sz;
25extern void pnx4008_cpu_suspend(void);
26extern unsigned int pnx4008_cpu_standby_sz;
27extern void pnx4008_cpu_standby(void);
28
29extern int pnx4008_startup_pll(struct clk *);
30extern int pnx4008_shutdown_pll(struct clk *);
31
32#endif /* ASSEMBLER */
33#endif /* __ASM_ARCH_PNX4008_PM_H */
diff --git a/arch/arm/mach-pnx4008/include/mach/system.h b/arch/arm/mach-pnx4008/include/mach/system.h
new file mode 100644
index 000000000000..8985a4622b8c
--- /dev/null
+++ b/arch/arm/mach-pnx4008/include/mach/system.h
@@ -0,0 +1,38 @@
1/*
2 * arch/arm/mach-pnx4008/include/mach/system.h
3 *
4 * Copyright (C) 2003 Philips Semiconductors
5 * Copyright (C) 2005 MontaVista Software, Inc.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
21#ifndef __ASM_ARCH_SYSTEM_H
22#define __ASM_ARCH_SYSTEM_H
23
24#include <mach/hardware.h>
25#include <asm/io.h>
26#include <mach/platform.h>
27
28static void arch_idle(void)
29{
30 cpu_do_idle();
31}
32
33static inline void arch_reset(char mode)
34{
35 cpu_reset(0);
36}
37
38#endif
diff --git a/arch/arm/mach-pnx4008/include/mach/timex.h b/arch/arm/mach-pnx4008/include/mach/timex.h
new file mode 100644
index 000000000000..956fbd8e977c
--- /dev/null
+++ b/arch/arm/mach-pnx4008/include/mach/timex.h
@@ -0,0 +1,73 @@
1/*
2 * arch/arm/mach-pnx4008/include/mach/timex.h
3 *
4 * PNX4008 timers header file
5 *
6 * Author: Dmitry Chigirev <source@mvista.com>
7 *
8 * 2005 (c) MontaVista Software, Inc. This file is licensed under
9 * the terms of the GNU General Public License version 2. This program
10 * is licensed "as is" without any warranty of any kind, whether express
11 * or implied.
12 */
13
14#ifndef __PNX4008_TIMEX_H
15#define __PNX4008_TIMEX_H
16
17#include <mach/hardware.h>
18#include <asm/io.h>
19
20#define CLOCK_TICK_RATE 1000000
21
22#define TICKS2USECS(x) (x)
23
24/* MilliSecond Timer - Chapter 21 Page 202 */
25
26#define MSTIM_INT IO_ADDRESS((PNX4008_MSTIMER_BASE + 0x0))
27#define MSTIM_CTRL IO_ADDRESS((PNX4008_MSTIMER_BASE + 0x4))
28#define MSTIM_COUNTER IO_ADDRESS((PNX4008_MSTIMER_BASE + 0x8))
29#define MSTIM_MCTRL IO_ADDRESS((PNX4008_MSTIMER_BASE + 0x14))
30#define MSTIM_MATCH0 IO_ADDRESS((PNX4008_MSTIMER_BASE + 0x18))
31#define MSTIM_MATCH1 IO_ADDRESS((PNX4008_MSTIMER_BASE + 0x1c))
32
33/* High Speed Timer - Chpater 22, Page 205 */
34
35#define HSTIM_INT IO_ADDRESS((PNX4008_HSTIMER_BASE + 0x0))
36#define HSTIM_CTRL IO_ADDRESS((PNX4008_HSTIMER_BASE + 0x4))
37#define HSTIM_COUNTER IO_ADDRESS((PNX4008_HSTIMER_BASE + 0x8))
38#define HSTIM_PMATCH IO_ADDRESS((PNX4008_HSTIMER_BASE + 0xC))
39#define HSTIM_PCOUNT IO_ADDRESS((PNX4008_HSTIMER_BASE + 0x10))
40#define HSTIM_MCTRL IO_ADDRESS((PNX4008_HSTIMER_BASE + 0x14))
41#define HSTIM_MATCH0 IO_ADDRESS((PNX4008_HSTIMER_BASE + 0x18))
42#define HSTIM_MATCH1 IO_ADDRESS((PNX4008_HSTIMER_BASE + 0x1c))
43#define HSTIM_MATCH2 IO_ADDRESS((PNX4008_HSTIMER_BASE + 0x20))
44#define HSTIM_CCR IO_ADDRESS((PNX4008_HSTIMER_BASE + 0x28))
45#define HSTIM_CR0 IO_ADDRESS((PNX4008_HSTIMER_BASE + 0x2C))
46#define HSTIM_CR1 IO_ADDRESS((PNX4008_HSTIMER_BASE + 0x30))
47
48/* IMPORTANT: both timers are UPCOUNTING */
49
50/* xSTIM_MCTRL bit definitions */
51#define MR0_INT 1
52#define RESET_COUNT0 (1<<1)
53#define STOP_COUNT0 (1<<2)
54#define MR1_INT (1<<3)
55#define RESET_COUNT1 (1<<4)
56#define STOP_COUNT1 (1<<5)
57#define MR2_INT (1<<6)
58#define RESET_COUNT2 (1<<7)
59#define STOP_COUNT2 (1<<8)
60
61/* xSTIM_CTRL bit definitions */
62#define COUNT_ENAB 1
63#define RESET_COUNT (1<<1)
64#define DEBUG_EN (1<<2)
65
66/* xSTIM_INT bit definitions */
67#define MATCH0_INT 1
68#define MATCH1_INT (1<<1)
69#define MATCH2_INT (1<<2)
70#define RTC_TICK0 (1<<4)
71#define RTC_TICK1 (1<<5)
72
73#endif
diff --git a/arch/arm/mach-pnx4008/include/mach/uncompress.h b/arch/arm/mach-pnx4008/include/mach/uncompress.h
new file mode 100644
index 000000000000..bb4751ee2539
--- /dev/null
+++ b/arch/arm/mach-pnx4008/include/mach/uncompress.h
@@ -0,0 +1,46 @@
1/*
2 * arch/arm/mach-pnx4008/include/mach/uncompress.h
3 *
4 * Copyright (C) 1999 ARM Limited
5 * Copyright (C) 2006 MontaVista Software, Inc.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
21
22#define UART5_BASE 0x40090000
23
24#define UART5_DR (*(volatile unsigned char *) (UART5_BASE))
25#define UART5_FR (*(volatile unsigned char *) (UART5_BASE + 18))
26
27static __inline__ void putc(char c)
28{
29 while (UART5_FR & (1 << 5))
30 barrier();
31
32 UART5_DR = c;
33}
34
35/*
36 * This does not append a newline
37 */
38static inline void flush(void)
39{
40}
41
42/*
43 * nothing to do
44 */
45#define arch_decomp_setup()
46#define arch_decomp_wdog()
diff --git a/arch/arm/mach-pnx4008/include/mach/vmalloc.h b/arch/arm/mach-pnx4008/include/mach/vmalloc.h
new file mode 100644
index 000000000000..2ad398378aed
--- /dev/null
+++ b/arch/arm/mach-pnx4008/include/mach/vmalloc.h
@@ -0,0 +1,20 @@
1/*
2 * arch/arm/mach-pnx4008/include/mach/vmalloc.h
3 *
4 * Author: Vitaly Wool <source@mvista.com>
5 *
6 * 2006 (c) MontaVista Software, Inc. This file is licensed under
7 * the terms of the GNU General Public License version 2. This program
8 * is licensed "as is" without any warranty of any kind, whether express
9 * or implied.
10 */
11
12/*
13 * Just any arbitrary offset to the start of the vmalloc VM area: the
14 * current 8MB value just means that there will be a 8MB "hole" after the
15 * physical memory until the kernel virtual memory starts. That means that
16 * any out-of-bounds memory accesses will hopefully be caught.
17 * The vmalloc() routines leaves a hole of 4kB between each vmalloced
18 * area for the same reason. ;)
19 */
20#define VMALLOC_END (PAGE_OFFSET + 0x10000000)
diff --git a/arch/arm/mach-pnx4008/irq.c b/arch/arm/mach-pnx4008/irq.c
index 5ed67e1947a8..5c4f55af5d4b 100644
--- a/arch/arm/mach-pnx4008/irq.c
+++ b/arch/arm/mach-pnx4008/irq.c
@@ -23,17 +23,16 @@
23#include <linux/ioport.h> 23#include <linux/ioport.h>
24#include <linux/device.h> 24#include <linux/device.h>
25#include <linux/irq.h> 25#include <linux/irq.h>
26#include <asm/hardware.h> 26#include <mach/hardware.h>
27#include <asm/io.h> 27#include <asm/io.h>
28#include <asm/setup.h> 28#include <asm/setup.h>
29#include <asm/mach-types.h>
30#include <asm/pgtable.h> 29#include <asm/pgtable.h>
31#include <asm/page.h> 30#include <asm/page.h>
32#include <asm/system.h> 31#include <asm/system.h>
33#include <asm/mach/arch.h> 32#include <asm/mach/arch.h>
34#include <asm/mach/irq.h> 33#include <asm/mach/irq.h>
35#include <asm/mach/map.h> 34#include <asm/mach/map.h>
36#include <asm/arch/irq.h> 35#include <mach/irq.h>
37 36
38static u8 pnx4008_irq_type[NR_IRQS] = PNX4008_IRQ_TYPES; 37static u8 pnx4008_irq_type[NR_IRQS] = PNX4008_IRQ_TYPES;
39 38
diff --git a/arch/arm/mach-pnx4008/pm.c b/arch/arm/mach-pnx4008/pm.c
index 40116d254349..f970906d8848 100644
--- a/arch/arm/mach-pnx4008/pm.c
+++ b/arch/arm/mach-pnx4008/pm.c
@@ -20,10 +20,9 @@
20#include <linux/clk.h> 20#include <linux/clk.h>
21 21
22#include <asm/io.h> 22#include <asm/io.h>
23#include <asm/mach-types.h>
24#include <asm/cacheflush.h> 23#include <asm/cacheflush.h>
25#include <asm/arch/pm.h> 24#include <mach/pm.h>
26#include <asm/arch/clock.h> 25#include <mach/clock.h>
27 26
28#define SRAM_VA IO_ADDRESS(PNX4008_IRAM_BASE) 27#define SRAM_VA IO_ADDRESS(PNX4008_IRAM_BASE)
29 28
diff --git a/arch/arm/mach-pnx4008/serial.c b/arch/arm/mach-pnx4008/serial.c
index 95a1b3f964a2..9be84bbb30e8 100644
--- a/arch/arm/mach-pnx4008/serial.c
+++ b/arch/arm/mach-pnx4008/serial.c
@@ -15,14 +15,14 @@
15 15
16#include <asm/io.h> 16#include <asm/io.h>
17 17
18#include <asm/arch/platform.h> 18#include <mach/platform.h>
19#include <asm/hardware.h> 19#include <mach/hardware.h>
20 20
21#include <linux/serial_core.h> 21#include <linux/serial_core.h>
22#include <linux/serial_reg.h> 22#include <linux/serial_reg.h>
23#include <asm/arch/gpio.h> 23#include <mach/gpio.h>
24 24
25#include <asm/arch/clock.h> 25#include <mach/clock.h>
26 26
27#define UART_3 0 27#define UART_3 0
28#define UART_4 1 28#define UART_4 1
diff --git a/arch/arm/mach-pnx4008/sleep.S b/arch/arm/mach-pnx4008/sleep.S
index fea1e17a3650..f4eed495d295 100644
--- a/arch/arm/mach-pnx4008/sleep.S
+++ b/arch/arm/mach-pnx4008/sleep.S
@@ -13,7 +13,7 @@
13 13
14#include <linux/linkage.h> 14#include <linux/linkage.h>
15#include <asm/assembler.h> 15#include <asm/assembler.h>
16#include <asm/hardware.h> 16#include <mach/hardware.h>
17 17
18#define PWRMAN_VA_BASE IO_ADDRESS(PNX4008_PWRMAN_BASE) 18#define PWRMAN_VA_BASE IO_ADDRESS(PNX4008_PWRMAN_BASE)
19#define PWR_CTRL_REG_OFFS 0x44 19#define PWR_CTRL_REG_OFFS 0x44
diff --git a/arch/arm/mach-pnx4008/time.c b/arch/arm/mach-pnx4008/time.c
index 6d4ca8fc0cb4..180975244f96 100644
--- a/arch/arm/mach-pnx4008/time.c
+++ b/arch/arm/mach-pnx4008/time.c
@@ -24,7 +24,7 @@
24#include <linux/irq.h> 24#include <linux/irq.h>
25 25
26#include <asm/system.h> 26#include <asm/system.h>
27#include <asm/hardware.h> 27#include <mach/hardware.h>
28#include <asm/io.h> 28#include <asm/io.h>
29#include <asm/leds.h> 29#include <asm/leds.h>
30#include <asm/mach/time.h> 30#include <asm/mach/time.h>
diff --git a/arch/arm/mach-pxa/akita-ioexp.c b/arch/arm/mach-pxa/akita-ioexp.c
index 254892ac30cd..5c67b188a3ba 100644
--- a/arch/arm/mach-pxa/akita-ioexp.c
+++ b/arch/arm/mach-pxa/akita-ioexp.c
@@ -19,7 +19,7 @@
19#include <linux/i2c.h> 19#include <linux/i2c.h>
20#include <linux/slab.h> 20#include <linux/slab.h>
21#include <linux/workqueue.h> 21#include <linux/workqueue.h>
22#include <asm/arch/akita.h> 22#include <mach/akita.h>
23 23
24/* MAX7310 Regiser Map */ 24/* MAX7310 Regiser Map */
25#define MAX7310_INPUT 0x00 25#define MAX7310_INPUT 0x00
diff --git a/arch/arm/mach-pxa/clock.c b/arch/arm/mach-pxa/clock.c
index 630063ffa6fc..c01eea88f787 100644
--- a/arch/arm/mach-pxa/clock.c
+++ b/arch/arm/mach-pxa/clock.c
@@ -12,9 +12,9 @@
12#include <linux/platform_device.h> 12#include <linux/platform_device.h>
13#include <linux/delay.h> 13#include <linux/delay.h>
14 14
15#include <asm/arch/pxa2xx-regs.h> 15#include <mach/pxa2xx-regs.h>
16#include <asm/arch/pxa2xx-gpio.h> 16#include <mach/pxa2xx-gpio.h>
17#include <asm/hardware.h> 17#include <mach/hardware.h>
18 18
19#include "devices.h" 19#include "devices.h"
20#include "generic.h" 20#include "generic.h"
diff --git a/arch/arm/mach-pxa/cm-x270-pci.c b/arch/arm/mach-pxa/cm-x270-pci.c
index 31f5bd411ced..2d5bcea1e520 100644
--- a/arch/arm/mach-pxa/cm-x270-pci.c
+++ b/arch/arm/mach-pxa/cm-x270-pci.c
@@ -22,7 +22,7 @@
22#include <linux/gpio.h> 22#include <linux/gpio.h>
23 23
24#include <asm/mach/pci.h> 24#include <asm/mach/pci.h>
25#include <asm/arch/pxa-regs.h> 25#include <mach/pxa-regs.h>
26#include <asm/mach-types.h> 26#include <asm/mach-types.h>
27 27
28#include <asm/hardware/it8152.h> 28#include <asm/hardware/it8152.h>
diff --git a/arch/arm/mach-pxa/cm-x270.c b/arch/arm/mach-pxa/cm-x270.c
index 402e807eae54..af003a269534 100644
--- a/arch/arm/mach-pxa/cm-x270.c
+++ b/arch/arm/mach-pxa/cm-x270.c
@@ -23,14 +23,14 @@
23#include <asm/mach-types.h> 23#include <asm/mach-types.h>
24#include <asm/mach/map.h> 24#include <asm/mach/map.h>
25 25
26#include <asm/arch/pxa2xx-regs.h> 26#include <mach/pxa2xx-regs.h>
27#include <asm/arch/mfp-pxa27x.h> 27#include <mach/mfp-pxa27x.h>
28#include <asm/arch/pxa-regs.h> 28#include <mach/pxa-regs.h>
29#include <asm/arch/audio.h> 29#include <mach/audio.h>
30#include <asm/arch/pxafb.h> 30#include <mach/pxafb.h>
31#include <asm/arch/ohci.h> 31#include <mach/ohci.h>
32#include <asm/arch/mmc.h> 32#include <mach/mmc.h>
33#include <asm/arch/bitfield.h> 33#include <mach/bitfield.h>
34 34
35#include <asm/hardware/it8152.h> 35#include <asm/hardware/it8152.h>
36 36
diff --git a/arch/arm/mach-pxa/colibri.c b/arch/arm/mach-pxa/colibri.c
index 574839d7c132..abce13c846c5 100644
--- a/arch/arm/mach-pxa/colibri.c
+++ b/arch/arm/mach-pxa/colibri.c
@@ -21,16 +21,16 @@
21#include <linux/mtd/partitions.h> 21#include <linux/mtd/partitions.h>
22#include <linux/mtd/physmap.h> 22#include <linux/mtd/physmap.h>
23#include <asm/mach-types.h> 23#include <asm/mach-types.h>
24#include <asm/hardware.h> 24#include <mach/hardware.h>
25#include <asm/irq.h> 25#include <asm/irq.h>
26#include <asm/sizes.h> 26#include <asm/sizes.h>
27#include <asm/mach/arch.h> 27#include <asm/mach/arch.h>
28#include <asm/mach/map.h> 28#include <asm/mach/map.h>
29#include <asm/mach/irq.h> 29#include <asm/mach/irq.h>
30#include <asm/mach/flash.h> 30#include <asm/mach/flash.h>
31#include <asm/arch/pxa-regs.h> 31#include <mach/pxa-regs.h>
32#include <asm/arch/pxa2xx-gpio.h> 32#include <mach/pxa2xx-gpio.h>
33#include <asm/arch/colibri.h> 33#include <mach/colibri.h>
34 34
35#include "generic.h" 35#include "generic.h"
36#include "devices.h" 36#include "devices.h"
diff --git a/arch/arm/mach-pxa/corgi.c b/arch/arm/mach-pxa/corgi.c
index e58504edb140..123a950db466 100644
--- a/arch/arm/mach-pxa/corgi.c
+++ b/arch/arm/mach-pxa/corgi.c
@@ -26,7 +26,7 @@
26#include <asm/setup.h> 26#include <asm/setup.h>
27#include <asm/memory.h> 27#include <asm/memory.h>
28#include <asm/mach-types.h> 28#include <asm/mach-types.h>
29#include <asm/hardware.h> 29#include <mach/hardware.h>
30#include <asm/irq.h> 30#include <asm/irq.h>
31#include <asm/io.h> 31#include <asm/io.h>
32#include <asm/system.h> 32#include <asm/system.h>
@@ -35,14 +35,14 @@
35#include <asm/mach/map.h> 35#include <asm/mach/map.h>
36#include <asm/mach/irq.h> 36#include <asm/mach/irq.h>
37 37
38#include <asm/arch/pxa-regs.h> 38#include <mach/pxa-regs.h>
39#include <asm/arch/pxa2xx-regs.h> 39#include <mach/pxa2xx-regs.h>
40#include <asm/arch/pxa2xx-gpio.h> 40#include <mach/pxa2xx-gpio.h>
41#include <asm/arch/irda.h> 41#include <mach/irda.h>
42#include <asm/arch/mmc.h> 42#include <mach/mmc.h>
43#include <asm/arch/udc.h> 43#include <mach/udc.h>
44#include <asm/arch/corgi.h> 44#include <mach/corgi.h>
45#include <asm/arch/sharpsl.h> 45#include <mach/sharpsl.h>
46 46
47#include <asm/mach/sharpsl_param.h> 47#include <asm/mach/sharpsl_param.h>
48#include <asm/hardware/scoop.h> 48#include <asm/hardware/scoop.h>
diff --git a/arch/arm/mach-pxa/corgi_lcd.c b/arch/arm/mach-pxa/corgi_lcd.c
index 9328df37afd1..311baf149b07 100644
--- a/arch/arm/mach-pxa/corgi_lcd.c
+++ b/arch/arm/mach-pxa/corgi_lcd.c
@@ -20,12 +20,12 @@
20#include <linux/platform_device.h> 20#include <linux/platform_device.h>
21#include <linux/module.h> 21#include <linux/module.h>
22#include <linux/string.h> 22#include <linux/string.h>
23#include <asm/arch/akita.h> 23#include <mach/akita.h>
24#include <asm/arch/corgi.h> 24#include <mach/corgi.h>
25#include <asm/hardware.h> 25#include <mach/hardware.h>
26#include <asm/arch/pxa-regs.h> 26#include <mach/pxa-regs.h>
27#include <asm/arch/sharpsl.h> 27#include <mach/sharpsl.h>
28#include <asm/arch/spitz.h> 28#include <mach/spitz.h>
29#include <asm/hardware/scoop.h> 29#include <asm/hardware/scoop.h>
30#include <asm/mach/sharpsl_param.h> 30#include <asm/mach/sharpsl_param.h>
31#include "generic.h" 31#include "generic.h"
diff --git a/arch/arm/mach-pxa/corgi_pm.c b/arch/arm/mach-pxa/corgi_pm.c
index e91c0f26c412..35bbfccd2df3 100644
--- a/arch/arm/mach-pxa/corgi_pm.c
+++ b/arch/arm/mach-pxa/corgi_pm.c
@@ -20,14 +20,14 @@
20 20
21#include <asm/irq.h> 21#include <asm/irq.h>
22#include <asm/mach-types.h> 22#include <asm/mach-types.h>
23#include <asm/hardware.h> 23#include <mach/hardware.h>
24#include <asm/hardware/scoop.h> 24#include <asm/hardware/scoop.h>
25 25
26#include <asm/arch/sharpsl.h> 26#include <mach/sharpsl.h>
27#include <asm/arch/corgi.h> 27#include <mach/corgi.h>
28#include <asm/arch/pxa-regs.h> 28#include <mach/pxa-regs.h>
29#include <asm/arch/pxa2xx-regs.h> 29#include <mach/pxa2xx-regs.h>
30#include <asm/arch/pxa2xx-gpio.h> 30#include <mach/pxa2xx-gpio.h>
31#include "sharpsl.h" 31#include "sharpsl.h"
32 32
33#define SHARPSL_CHARGE_ON_VOLT 0x99 /* 2.9V */ 33#define SHARPSL_CHARGE_ON_VOLT 0x99 /* 2.9V */
diff --git a/arch/arm/mach-pxa/corgi_ssp.c b/arch/arm/mach-pxa/corgi_ssp.c
index eccc45d21f75..8e2f2215c4ba 100644
--- a/arch/arm/mach-pxa/corgi_ssp.c
+++ b/arch/arm/mach-pxa/corgi_ssp.c
@@ -16,13 +16,13 @@
16#include <linux/slab.h> 16#include <linux/slab.h>
17#include <linux/delay.h> 17#include <linux/delay.h>
18#include <linux/platform_device.h> 18#include <linux/platform_device.h>
19#include <asm/hardware.h> 19#include <mach/hardware.h>
20#include <asm/mach-types.h> 20#include <asm/mach-types.h>
21 21
22#include <asm/arch/ssp.h> 22#include <mach/ssp.h>
23#include <asm/arch/pxa-regs.h> 23#include <mach/pxa-regs.h>
24#include <asm/arch/pxa2xx-gpio.h> 24#include <mach/pxa2xx-gpio.h>
25#include <asm/arch/regs-ssp.h> 25#include <mach/regs-ssp.h>
26#include "sharpsl.h" 26#include "sharpsl.h"
27 27
28static DEFINE_SPINLOCK(corgi_ssp_lock); 28static DEFINE_SPINLOCK(corgi_ssp_lock);
diff --git a/arch/arm/mach-pxa/cpu-pxa.c b/arch/arm/mach-pxa/cpu-pxa.c
index fb9ba1ab2826..6f5569bac131 100644
--- a/arch/arm/mach-pxa/cpu-pxa.c
+++ b/arch/arm/mach-pxa/cpu-pxa.c
@@ -37,9 +37,9 @@
37#include <linux/init.h> 37#include <linux/init.h>
38#include <linux/cpufreq.h> 38#include <linux/cpufreq.h>
39 39
40#include <asm/hardware.h> 40#include <mach/hardware.h>
41#include <asm/arch/pxa-regs.h> 41#include <mach/pxa-regs.h>
42#include <asm/arch/pxa2xx-regs.h> 42#include <mach/pxa2xx-regs.h>
43 43
44#ifdef DEBUG 44#ifdef DEBUG
45static unsigned int freq_debug; 45static unsigned int freq_debug;
diff --git a/arch/arm/mach-pxa/devices.c b/arch/arm/mach-pxa/devices.c
index 84489dc51d81..35736fc08634 100644
--- a/arch/arm/mach-pxa/devices.c
+++ b/arch/arm/mach-pxa/devices.c
@@ -4,19 +4,19 @@
4#include <linux/platform_device.h> 4#include <linux/platform_device.h>
5#include <linux/dma-mapping.h> 5#include <linux/dma-mapping.h>
6 6
7#include <asm/arch/gpio.h> 7#include <mach/gpio.h>
8#include <asm/arch/udc.h> 8#include <mach/udc.h>
9#include <asm/arch/pxafb.h> 9#include <mach/pxafb.h>
10#include <asm/arch/mmc.h> 10#include <mach/mmc.h>
11#include <asm/arch/irda.h> 11#include <mach/irda.h>
12#include <asm/arch/i2c.h> 12#include <mach/i2c.h>
13#include <asm/arch/mfp-pxa27x.h> 13#include <mach/mfp-pxa27x.h>
14#include <asm/arch/ohci.h> 14#include <mach/ohci.h>
15#include <asm/arch/pxa27x_keypad.h> 15#include <mach/pxa27x_keypad.h>
16#include <asm/arch/pxa2xx_spi.h> 16#include <mach/pxa2xx_spi.h>
17#include <asm/arch/camera.h> 17#include <mach/camera.h>
18#include <asm/arch/audio.h> 18#include <mach/audio.h>
19#include <asm/arch/pxa3xx_nand.h> 19#include <mach/pxa3xx_nand.h>
20 20
21#include "devices.h" 21#include "devices.h"
22#include "generic.h" 22#include "generic.h"
diff --git a/arch/arm/mach-pxa/dma.c b/arch/arm/mach-pxa/dma.c
index 3215316d7b06..c0be17e0ab82 100644
--- a/arch/arm/mach-pxa/dma.c
+++ b/arch/arm/mach-pxa/dma.c
@@ -20,10 +20,10 @@
20 20
21#include <asm/system.h> 21#include <asm/system.h>
22#include <asm/irq.h> 22#include <asm/irq.h>
23#include <asm/hardware.h> 23#include <mach/hardware.h>
24#include <asm/dma.h> 24#include <asm/dma.h>
25 25
26#include <asm/arch/pxa-regs.h> 26#include <mach/pxa-regs.h>
27 27
28struct dma_channel { 28struct dma_channel {
29 char *name; 29 char *name;
diff --git a/arch/arm/mach-pxa/e400_lcd.c b/arch/arm/mach-pxa/e400_lcd.c
index 16c023630626..263884165f57 100644
--- a/arch/arm/mach-pxa/e400_lcd.c
+++ b/arch/arm/mach-pxa/e400_lcd.c
@@ -14,8 +14,8 @@
14#include <linux/module.h> 14#include <linux/module.h>
15 15
16#include <asm/mach-types.h> 16#include <asm/mach-types.h>
17#include <asm/arch/pxa-regs.h> 17#include <mach/pxa-regs.h>
18#include <asm/arch/pxafb.h> 18#include <mach/pxafb.h>
19 19
20static struct pxafb_mode_info e400_pxafb_mode_info = { 20static struct pxafb_mode_info e400_pxafb_mode_info = {
21 .pixclock = 140703, 21 .pixclock = 140703,
diff --git a/arch/arm/mach-pxa/em-x270.c b/arch/arm/mach-pxa/em-x270.c
index e5cc6ca63c75..7a0a681a5847 100644
--- a/arch/arm/mach-pxa/em-x270.c
+++ b/arch/arm/mach-pxa/em-x270.c
@@ -23,14 +23,14 @@
23#include <asm/mach-types.h> 23#include <asm/mach-types.h>
24#include <asm/mach/arch.h> 24#include <asm/mach/arch.h>
25 25
26#include <asm/arch/mfp-pxa27x.h> 26#include <mach/mfp-pxa27x.h>
27#include <asm/arch/pxa-regs.h> 27#include <mach/pxa-regs.h>
28#include <asm/arch/pxa27x-udc.h> 28#include <mach/pxa27x-udc.h>
29#include <asm/arch/audio.h> 29#include <mach/audio.h>
30#include <asm/arch/pxafb.h> 30#include <mach/pxafb.h>
31#include <asm/arch/ohci.h> 31#include <mach/ohci.h>
32#include <asm/arch/mmc.h> 32#include <mach/mmc.h>
33#include <asm/arch/pxa27x_keypad.h> 33#include <mach/pxa27x_keypad.h>
34 34
35#include "generic.h" 35#include "generic.h"
36 36
diff --git a/arch/arm/mach-pxa/eseries.c b/arch/arm/mach-pxa/eseries.c
index c29b7b21c11b..03942450885b 100644
--- a/arch/arm/mach-pxa/eseries.c
+++ b/arch/arm/mach-pxa/eseries.c
@@ -14,7 +14,7 @@
14 14
15#include <asm/setup.h> 15#include <asm/setup.h>
16#include <asm/mach/arch.h> 16#include <asm/mach/arch.h>
17#include <asm/arch/hardware.h> 17#include <mach/hardware.h>
18#include <asm/mach-types.h> 18#include <asm/mach-types.h>
19 19
20#include "generic.h" 20#include "generic.h"
diff --git a/arch/arm/mach-pxa/eseries_udc.c b/arch/arm/mach-pxa/eseries_udc.c
index 362847a10998..d622c04c0d44 100644
--- a/arch/arm/mach-pxa/eseries_udc.c
+++ b/arch/arm/mach-pxa/eseries_udc.c
@@ -14,10 +14,10 @@
14#include <linux/init.h> 14#include <linux/init.h>
15#include <linux/device.h> 15#include <linux/device.h>
16 16
17#include <asm/arch/udc.h> 17#include <mach/udc.h>
18#include <asm/arch/eseries-gpio.h> 18#include <mach/eseries-gpio.h>
19#include <asm/arch/hardware.h> 19#include <mach/hardware.h>
20#include <asm/arch/pxa-regs.h> 20#include <mach/pxa-regs.h>
21#include <asm/mach/arch.h> 21#include <asm/mach/arch.h>
22#include <asm/mach-types.h> 22#include <asm/mach-types.h>
23#include <asm/mach/map.h> 23#include <asm/mach/map.h>
diff --git a/arch/arm/mach-pxa/ezx.c b/arch/arm/mach-pxa/ezx.c
index 0143eed65398..cc3d850cc0b6 100644
--- a/arch/arm/mach-pxa/ezx.c
+++ b/arch/arm/mach-pxa/ezx.c
@@ -18,13 +18,13 @@
18#include <linux/pwm_backlight.h> 18#include <linux/pwm_backlight.h>
19 19
20#include <asm/setup.h> 20#include <asm/setup.h>
21#include <asm/arch/pxafb.h> 21#include <mach/pxafb.h>
22#include <asm/arch/ohci.h> 22#include <mach/ohci.h>
23#include <asm/arch/i2c.h> 23#include <mach/i2c.h>
24 24
25#include <asm/arch/mfp-pxa27x.h> 25#include <mach/mfp-pxa27x.h>
26#include <asm/arch/pxa-regs.h> 26#include <mach/pxa-regs.h>
27#include <asm/arch/pxa2xx-regs.h> 27#include <mach/pxa2xx-regs.h>
28#include <asm/mach-types.h> 28#include <asm/mach-types.h>
29#include <asm/mach/arch.h> 29#include <asm/mach/arch.h>
30 30
diff --git a/arch/arm/mach-pxa/generic.c b/arch/arm/mach-pxa/generic.c
index ca053226fba0..ceaed0076366 100644
--- a/arch/arm/mach-pxa/generic.c
+++ b/arch/arm/mach-pxa/generic.c
@@ -20,15 +20,25 @@
20#include <linux/kernel.h> 20#include <linux/kernel.h>
21#include <linux/init.h> 21#include <linux/init.h>
22 22
23#include <asm/hardware.h> 23#include <mach/hardware.h>
24#include <asm/system.h> 24#include <asm/system.h>
25#include <asm/pgtable.h> 25#include <asm/pgtable.h>
26#include <asm/mach/map.h> 26#include <asm/mach/map.h>
27 27
28#include <asm/arch/pxa-regs.h> 28#include <mach/pxa-regs.h>
29#include <mach/reset.h>
29 30
30#include "generic.h" 31#include "generic.h"
31 32
33void clear_reset_status(unsigned int mask)
34{
35 if (cpu_is_pxa2xx())
36 pxa2xx_clear_reset_status(mask);
37
38 if (cpu_is_pxa3xx())
39 pxa3xx_clear_reset_status(mask);
40}
41
32/* 42/*
33 * Get the clock frequency as reflected by CCCR and the turbo flag. 43 * Get the clock frequency as reflected by CCCR and the turbo flag.
34 * We assume these values have been applied via a fcs. 44 * We assume these values have been applied via a fcs.
diff --git a/arch/arm/mach-pxa/generic.h b/arch/arm/mach-pxa/generic.h
index 5bb7ae757831..041c048320e4 100644
--- a/arch/arm/mach-pxa/generic.h
+++ b/arch/arm/mach-pxa/generic.h
@@ -47,12 +47,20 @@ extern unsigned pxa27x_get_memclk_frequency_10khz(void);
47#define pxa27x_get_memclk_frequency_10khz() (0) 47#define pxa27x_get_memclk_frequency_10khz() (0)
48#endif 48#endif
49 49
50#if defined(CONFIG_PXA25x) || defined(CONFIG_PXA27x)
51extern void pxa2xx_clear_reset_status(unsigned int);
52#else
53static inline void pxa2xx_clear_reset_status(unsigned int mask) {}
54#endif
55
50#ifdef CONFIG_PXA3xx 56#ifdef CONFIG_PXA3xx
51extern unsigned pxa3xx_get_clk_frequency_khz(int); 57extern unsigned pxa3xx_get_clk_frequency_khz(int);
52extern unsigned pxa3xx_get_memclk_frequency_10khz(void); 58extern unsigned pxa3xx_get_memclk_frequency_10khz(void);
59extern void pxa3xx_clear_reset_status(unsigned int);
53#else 60#else
54#define pxa3xx_get_clk_frequency_khz(x) (0) 61#define pxa3xx_get_clk_frequency_khz(x) (0)
55#define pxa3xx_get_memclk_frequency_10khz() (0) 62#define pxa3xx_get_memclk_frequency_10khz() (0)
63static inline void pxa3xx_clear_reset_status(unsigned int mask) {}
56#endif 64#endif
57 65
58extern struct sysdev_class pxa_irq_sysclass; 66extern struct sysdev_class pxa_irq_sysclass;
diff --git a/arch/arm/mach-pxa/gpio.c b/arch/arm/mach-pxa/gpio.c
index 7d3e16970be0..07acc1b23857 100644
--- a/arch/arm/mach-pxa/gpio.c
+++ b/arch/arm/mach-pxa/gpio.c
@@ -18,10 +18,10 @@
18#include <linux/sysdev.h> 18#include <linux/sysdev.h>
19 19
20#include <asm/gpio.h> 20#include <asm/gpio.h>
21#include <asm/hardware.h> 21#include <mach/hardware.h>
22#include <asm/io.h> 22#include <asm/io.h>
23#include <asm/arch/pxa-regs.h> 23#include <mach/pxa-regs.h>
24#include <asm/arch/pxa2xx-gpio.h> 24#include <mach/pxa2xx-gpio.h>
25 25
26#include "generic.h" 26#include "generic.h"
27 27
diff --git a/arch/arm/mach-pxa/gumstix.c b/arch/arm/mach-pxa/gumstix.c
index bdf239754037..c0092472fa58 100644
--- a/arch/arm/mach-pxa/gumstix.c
+++ b/arch/arm/mach-pxa/gumstix.c
@@ -26,7 +26,7 @@
26#include <asm/setup.h> 26#include <asm/setup.h>
27#include <asm/memory.h> 27#include <asm/memory.h>
28#include <asm/mach-types.h> 28#include <asm/mach-types.h>
29#include <asm/hardware.h> 29#include <mach/hardware.h>
30#include <asm/irq.h> 30#include <asm/irq.h>
31#include <asm/sizes.h> 31#include <asm/sizes.h>
32 32
@@ -34,13 +34,13 @@
34#include <asm/mach/map.h> 34#include <asm/mach/map.h>
35#include <asm/mach/irq.h> 35#include <asm/mach/irq.h>
36#include <asm/mach/flash.h> 36#include <asm/mach/flash.h>
37#include <asm/arch/mmc.h> 37#include <mach/mmc.h>
38#include <asm/arch/udc.h> 38#include <mach/udc.h>
39#include <asm/arch/gumstix.h> 39#include <mach/gumstix.h>
40 40
41#include <asm/arch/pxa-regs.h> 41#include <mach/pxa-regs.h>
42#include <asm/arch/pxa2xx-regs.h> 42#include <mach/pxa2xx-regs.h>
43#include <asm/arch/pxa2xx-gpio.h> 43#include <mach/pxa2xx-gpio.h>
44 44
45#include "generic.h" 45#include "generic.h"
46 46
diff --git a/arch/arm/mach-pxa/idp.c b/arch/arm/mach-pxa/idp.c
index 2637633f9166..5aa0270d5605 100644
--- a/arch/arm/mach-pxa/idp.c
+++ b/arch/arm/mach-pxa/idp.c
@@ -25,18 +25,18 @@
25#include <asm/setup.h> 25#include <asm/setup.h>
26#include <asm/memory.h> 26#include <asm/memory.h>
27#include <asm/mach-types.h> 27#include <asm/mach-types.h>
28#include <asm/hardware.h> 28#include <mach/hardware.h>
29#include <asm/irq.h> 29#include <asm/irq.h>
30 30
31#include <asm/mach/arch.h> 31#include <asm/mach/arch.h>
32#include <asm/mach/map.h> 32#include <asm/mach/map.h>
33 33
34#include <asm/arch/pxa-regs.h> 34#include <mach/pxa-regs.h>
35#include <asm/arch/pxa2xx-gpio.h> 35#include <mach/pxa2xx-gpio.h>
36#include <asm/arch/idp.h> 36#include <mach/idp.h>
37#include <asm/arch/pxafb.h> 37#include <mach/pxafb.h>
38#include <asm/arch/bitfield.h> 38#include <mach/bitfield.h>
39#include <asm/arch/mmc.h> 39#include <mach/mmc.h>
40 40
41#include "generic.h" 41#include "generic.h"
42#include "devices.h" 42#include "devices.h"
diff --git a/include/asm-arm/arch-pxa/akita.h b/arch/arm/mach-pxa/include/mach/akita.h
index 5d8cc1d9cb10..5d8cc1d9cb10 100644
--- a/include/asm-arm/arch-pxa/akita.h
+++ b/arch/arm/mach-pxa/include/mach/akita.h
diff --git a/include/asm-arm/arch-pxa/audio.h b/arch/arm/mach-pxa/include/mach/audio.h
index f82f96dd1053..f82f96dd1053 100644
--- a/include/asm-arm/arch-pxa/audio.h
+++ b/arch/arm/mach-pxa/include/mach/audio.h
diff --git a/include/asm-arm/arch-pxa/bitfield.h b/arch/arm/mach-pxa/include/mach/bitfield.h
index f1f0e3387d9c..f1f0e3387d9c 100644
--- a/include/asm-arm/arch-pxa/bitfield.h
+++ b/arch/arm/mach-pxa/include/mach/bitfield.h
diff --git a/include/asm-arm/arch-pxa/camera.h b/arch/arm/mach-pxa/include/mach/camera.h
index 39516ced8b1f..39516ced8b1f 100644
--- a/include/asm-arm/arch-pxa/camera.h
+++ b/arch/arm/mach-pxa/include/mach/camera.h
diff --git a/include/asm-arm/arch-pxa/colibri.h b/arch/arm/mach-pxa/include/mach/colibri.h
index 2ae373fb5675..2ae373fb5675 100644
--- a/include/asm-arm/arch-pxa/colibri.h
+++ b/arch/arm/mach-pxa/include/mach/colibri.h
diff --git a/include/asm-arm/arch-pxa/corgi.h b/arch/arm/mach-pxa/include/mach/corgi.h
index bf856503baf6..bf856503baf6 100644
--- a/include/asm-arm/arch-pxa/corgi.h
+++ b/arch/arm/mach-pxa/include/mach/corgi.h
diff --git a/arch/arm/mach-pxa/include/mach/debug-macro.S b/arch/arm/mach-pxa/include/mach/debug-macro.S
new file mode 100644
index 000000000000..55d6a175ab19
--- /dev/null
+++ b/arch/arm/mach-pxa/include/mach/debug-macro.S
@@ -0,0 +1,25 @@
1/* arch/arm/mach-pxa/include/mach/debug-macro.S
2 *
3 * Debugging macro include header
4 *
5 * Copyright (C) 1994-1999 Russell King
6 * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 *
12*/
13
14#include "hardware.h"
15
16 .macro addruart,rx
17 mrc p15, 0, \rx, c1, c0
18 tst \rx, #1 @ MMU enabled?
19 moveq \rx, #0x40000000 @ physical
20 movne \rx, #io_p2v(0x40000000) @ virtual
21 orr \rx, \rx, #0x00100000
22 .endm
23
24#define UART_SHIFT 2
25#include <asm/hardware/debug-8250.S>
diff --git a/arch/arm/mach-pxa/include/mach/dma.h b/arch/arm/mach-pxa/include/mach/dma.h
new file mode 100644
index 000000000000..955bfe606067
--- /dev/null
+++ b/arch/arm/mach-pxa/include/mach/dma.h
@@ -0,0 +1,50 @@
1/*
2 * arch/arm/mach-pxa/include/mach/dma.h
3 *
4 * Author: Nicolas Pitre
5 * Created: Jun 15, 2001
6 * Copyright: MontaVista Software, Inc.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 */
12#ifndef __ASM_ARCH_DMA_H
13#define __ASM_ARCH_DMA_H
14
15/*
16 * Descriptor structure for PXA's DMA engine
17 * Note: this structure must always be aligned to a 16-byte boundary.
18 */
19
20typedef struct pxa_dma_desc {
21 volatile u32 ddadr; /* Points to the next descriptor + flags */
22 volatile u32 dsadr; /* DSADR value for the current transfer */
23 volatile u32 dtadr; /* DTADR value for the current transfer */
24 volatile u32 dcmd; /* DCMD value for the current transfer */
25} pxa_dma_desc;
26
27typedef enum {
28 DMA_PRIO_HIGH = 0,
29 DMA_PRIO_MEDIUM = 1,
30 DMA_PRIO_LOW = 2
31} pxa_dma_prio;
32
33#if defined(CONFIG_MACH_ARMCORE) && defined(CONFIG_PCI)
34#define HAVE_ARCH_PCI_SET_DMA_MASK 1
35#endif
36
37/*
38 * DMA registration
39 */
40
41int __init pxa_init_dma(int num_ch);
42
43int pxa_request_dma (char *name,
44 pxa_dma_prio prio,
45 void (*irq_handler)(int, void *),
46 void *data);
47
48void pxa_free_dma (int dma_ch);
49
50#endif /* _ASM_ARCH_DMA_H */
diff --git a/arch/arm/mach-pxa/include/mach/entry-macro.S b/arch/arm/mach-pxa/include/mach/entry-macro.S
new file mode 100644
index 000000000000..de16c12d5232
--- /dev/null
+++ b/arch/arm/mach-pxa/include/mach/entry-macro.S
@@ -0,0 +1,57 @@
1/*
2 * arch/arm/mach-pxa/include/mach/entry-macro.S
3 *
4 * Low-level IRQ helper macros for PXA-based platforms
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10#include <mach/hardware.h>
11#include <mach/irqs.h>
12
13 .macro disable_fiq
14 .endm
15
16 .macro get_irqnr_preamble, base, tmp
17 .endm
18
19 .macro arch_ret_to_user, tmp1, tmp2
20 .endm
21
22 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
23 mrc p15, 0, \tmp, c0, c0, 0 @ CPUID
24 mov \tmp, \tmp, lsr #13
25 and \tmp, \tmp, #0x7 @ Core G
26 cmp \tmp, #1
27 bhi 1004f
28
29 mov \base, #io_p2v(0x40000000) @ IIR Ctl = 0x40d00000
30 add \base, \base, #0x00d00000
31 ldr \irqstat, [\base, #0] @ ICIP
32 ldr \irqnr, [\base, #4] @ ICMR
33 b 1002f
34
351004:
36 mrc p6, 0, \irqstat, c6, c0, 0 @ ICIP2
37 mrc p6, 0, \irqnr, c7, c0, 0 @ ICMR2
38 ands \irqnr, \irqstat, \irqnr
39 beq 1003f
40 rsb \irqstat, \irqnr, #0
41 and \irqstat, \irqstat, \irqnr
42 clz \irqnr, \irqstat
43 rsb \irqnr, \irqnr, #31
44 add \irqnr, \irqnr, #32
45 b 1001f
461003:
47 mrc p6, 0, \irqstat, c0, c0, 0 @ ICIP
48 mrc p6, 0, \irqnr, c1, c0, 0 @ ICMR
491002:
50 ands \irqnr, \irqstat, \irqnr
51 beq 1001f
52 rsb \irqstat, \irqnr, #0
53 and \irqstat, \irqstat, \irqnr
54 clz \irqnr, \irqstat
55 rsb \irqnr, \irqnr, #31
561001:
57 .endm
diff --git a/include/asm-arm/arch-pxa/eseries-gpio.h b/arch/arm/mach-pxa/include/mach/eseries-gpio.h
index 4c90b1310270..4c90b1310270 100644
--- a/include/asm-arm/arch-pxa/eseries-gpio.h
+++ b/arch/arm/mach-pxa/include/mach/eseries-gpio.h
diff --git a/include/asm-arm/arch-pxa/eseries-irq.h b/arch/arm/mach-pxa/include/mach/eseries-irq.h
index f2a93d5e31d3..f2a93d5e31d3 100644
--- a/include/asm-arm/arch-pxa/eseries-irq.h
+++ b/arch/arm/mach-pxa/include/mach/eseries-irq.h
diff --git a/arch/arm/mach-pxa/include/mach/gpio.h b/arch/arm/mach-pxa/include/mach/gpio.h
new file mode 100644
index 000000000000..2c538d8c362d
--- /dev/null
+++ b/arch/arm/mach-pxa/include/mach/gpio.h
@@ -0,0 +1,65 @@
1/*
2 * arch/arm/mach-pxa/include/mach/gpio.h
3 *
4 * PXA GPIO wrappers for arch-neutral GPIO calls
5 *
6 * Written by Philipp Zabel <philipp.zabel@gmail.com>
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 *
22 */
23
24#ifndef __ASM_ARCH_PXA_GPIO_H
25#define __ASM_ARCH_PXA_GPIO_H
26
27#include <mach/pxa-regs.h>
28#include <asm/irq.h>
29#include <mach/hardware.h>
30
31#include <asm-generic/gpio.h>
32
33
34/* NOTE: some PXAs have fewer on-chip GPIOs (like PXA255, with 85).
35 * Those cases currently cause holes in the GPIO number space.
36 */
37#define NR_BUILTIN_GPIO 128
38
39static inline int gpio_get_value(unsigned gpio)
40{
41 if (__builtin_constant_p(gpio) && (gpio < NR_BUILTIN_GPIO))
42 return GPLR(gpio) & GPIO_bit(gpio);
43 else
44 return __gpio_get_value(gpio);
45}
46
47static inline void gpio_set_value(unsigned gpio, int value)
48{
49 if (__builtin_constant_p(gpio) && (gpio < NR_BUILTIN_GPIO)) {
50 if (value)
51 GPSR(gpio) = GPIO_bit(gpio);
52 else
53 GPCR(gpio) = GPIO_bit(gpio);
54 } else {
55 __gpio_set_value(gpio, value);
56 }
57}
58
59#define gpio_cansleep __gpio_cansleep
60
61#define gpio_to_irq(gpio) IRQ_GPIO(gpio)
62#define irq_to_gpio(irq) IRQ_TO_GPIO(irq)
63
64
65#endif
diff --git a/arch/arm/mach-pxa/include/mach/gumstix.h b/arch/arm/mach-pxa/include/mach/gumstix.h
new file mode 100644
index 000000000000..42ee1956750e
--- /dev/null
+++ b/arch/arm/mach-pxa/include/mach/gumstix.h
@@ -0,0 +1,96 @@
1/*
2 * arch/arm/mach-pxa/include/mach/gumstix.h
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 */
8
9
10/* BTRESET - Reset line to Bluetooth module, active low signal. */
11#define GPIO_GUMSTIX_BTRESET 7
12#define GPIO_GUMSTIX_BTRESET_MD (GPIO_GUMSTIX_BTRESET | GPIO_OUT)
13
14
15/*
16GPIOn - Input from MAX823 (or equiv), normalizing USB +5V into a clean
17interrupt signal for determining cable presence. On the original gumstix,
18this is GPIO81, and GPIO83 needs to be defined as well. On the gumstix F,
19this moves to GPIO17 and GPIO37. */
20
21/* GPIOx - Connects to USB D+ and used as a pull-up after GPIOn
22has detected a cable insertion; driven low otherwise. */
23
24#ifdef CONFIG_ARCH_GUMSTIX_ORIG
25
26#define GPIO_GUMSTIX_USB_GPIOn 81
27#define GPIO_GUMSTIX_USB_GPIOx 83
28
29#else
30
31#define GPIO_GUMSTIX_USB_GPIOn 35
32#define GPIO_GUMSTIX_USB_GPIOx 41
33
34#endif
35
36/* usb state change */
37#define GUMSTIX_USB_INTR_IRQ IRQ_GPIO(GPIO_GUMSTIX_USB_GPIOn)
38
39#define GPIO_GUMSTIX_USB_GPIOn_MD (GPIO_GUMSTIX_USB_GPIOn | GPIO_IN)
40#define GPIO_GUMSTIX_USB_GPIOx_CON_MD (GPIO_GUMSTIX_USB_GPIOx | GPIO_OUT)
41#define GPIO_GUMSTIX_USB_GPIOx_DIS_MD (GPIO_GUMSTIX_USB_GPIOx | GPIO_IN)
42
43/*
44 * SD/MMC definitions
45 */
46#define GUMSTIX_GPIO_nSD_WP 22 /* SD Write Protect */
47#define GUMSTIX_GPIO_nSD_DETECT 11 /* MMC/SD Card Detect */
48#define GUMSTIX_IRQ_GPIO_nSD_DETECT IRQ_GPIO(GUMSTIX_GPIO_nSD_DETECT)
49
50/*
51 * SMC Ethernet definitions
52 * ETH_RST provides a hardware reset line to the ethernet chip
53 * ETH is the IRQ line in from the ethernet chip to the PXA
54 */
55#define GPIO_GUMSTIX_ETH0_RST 80
56#define GPIO_GUMSTIX_ETH0_RST_MD (GPIO_GUMSTIX_ETH0_RST | GPIO_OUT)
57#define GPIO_GUMSTIX_ETH1_RST 52
58#define GPIO_GUMSTIX_ETH1_RST_MD (GPIO_GUMSTIX_ETH1_RST | GPIO_OUT)
59
60#define GPIO_GUMSTIX_ETH0 36
61#define GPIO_GUMSTIX_ETH0_MD (GPIO_GUMSTIX_ETH0 | GPIO_IN)
62#define GUMSTIX_ETH0_IRQ IRQ_GPIO(GPIO_GUMSTIX_ETH0)
63#define GPIO_GUMSTIX_ETH1 27
64#define GPIO_GUMSTIX_ETH1_MD (GPIO_GUMSTIX_ETH1 | GPIO_IN)
65#define GUMSTIX_ETH1_IRQ IRQ_GPIO(GPIO_GUMSTIX_ETH1)
66
67
68/* CF reset line */
69#define GPIO8_RESET 8
70
71/* CF slot 0 */
72#define GPIO4_nBVD1 4
73#define GPIO4_nSTSCHG GPIO4_nBVD1
74#define GPIO11_nCD 11
75#define GPIO26_PRDY_nBSY 26
76#define GUMSTIX_S0_nSTSCHG_IRQ IRQ_GPIO(GPIO4_nSTSCHG)
77#define GUMSTIX_S0_nCD_IRQ IRQ_GPIO(GPIO11_nCD)
78#define GUMSTIX_S0_PRDY_nBSY_IRQ IRQ_GPIO(GPIO26_PRDY_nBSY)
79
80/* CF slot 1 */
81#define GPIO18_nBVD1 18
82#define GPIO18_nSTSCHG GPIO18_nBVD1
83#define GPIO36_nCD 36
84#define GPIO27_PRDY_nBSY 27
85#define GUMSTIX_S1_nSTSCHG_IRQ IRQ_GPIO(GPIO18_nSTSCHG)
86#define GUMSTIX_S1_nCD_IRQ IRQ_GPIO(GPIO36_nCD)
87#define GUMSTIX_S1_PRDY_nBSY_IRQ IRQ_GPIO(GPIO27_PRDY_nBSY)
88
89/* CF GPIO line modes */
90#define GPIO4_nSTSCHG_MD (GPIO4_nSTSCHG | GPIO_IN)
91#define GPIO8_RESET_MD (GPIO8_RESET | GPIO_OUT)
92#define GPIO11_nCD_MD (GPIO11_nCD | GPIO_IN)
93#define GPIO18_nSTSCHG_MD (GPIO18_nSTSCHG | GPIO_IN)
94#define GPIO26_PRDY_nBSY_MD (GPIO26_PRDY_nBSY | GPIO_IN)
95#define GPIO27_PRDY_nBSY_MD (GPIO27_PRDY_nBSY | GPIO_IN)
96#define GPIO36_nCD_MD (GPIO36_nCD | GPIO_IN)
diff --git a/arch/arm/mach-pxa/include/mach/hardware.h b/arch/arm/mach-pxa/include/mach/hardware.h
new file mode 100644
index 000000000000..e89df4d0d239
--- /dev/null
+++ b/arch/arm/mach-pxa/include/mach/hardware.h
@@ -0,0 +1,235 @@
1/*
2 * arch/arm/mach-pxa/include/mach/hardware.h
3 *
4 * Author: Nicolas Pitre
5 * Created: Jun 15, 2001
6 * Copyright: MontaVista Software Inc.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 */
12
13#ifndef __ASM_ARCH_HARDWARE_H
14#define __ASM_ARCH_HARDWARE_H
15
16/*
17 * We requires absolute addresses.
18 */
19#define PCIO_BASE 0
20
21/*
22 * Workarounds for at least 2 errata so far require this.
23 * The mapping is set in mach-pxa/generic.c.
24 */
25#define UNCACHED_PHYS_0 0xff000000
26#define UNCACHED_ADDR UNCACHED_PHYS_0
27
28/*
29 * Intel PXA2xx internal register mapping:
30 *
31 * 0x40000000 - 0x41ffffff <--> 0xf2000000 - 0xf3ffffff
32 * 0x44000000 - 0x45ffffff <--> 0xf4000000 - 0xf5ffffff
33 * 0x48000000 - 0x49ffffff <--> 0xf6000000 - 0xf7ffffff
34 * 0x4c000000 - 0x4dffffff <--> 0xf8000000 - 0xf9ffffff
35 * 0x50000000 - 0x51ffffff <--> 0xfa000000 - 0xfbffffff
36 * 0x54000000 - 0x55ffffff <--> 0xfc000000 - 0xfdffffff
37 * 0x58000000 - 0x59ffffff <--> 0xfe000000 - 0xffffffff
38 *
39 * Note that not all PXA2xx chips implement all those addresses, and the
40 * kernel only maps the minimum needed range of this mapping.
41 */
42#define io_p2v(x) (0xf2000000 + ((x) & 0x01ffffff) + (((x) & 0x1c000000) >> 1))
43#define io_v2p(x) (0x3c000000 + ((x) & 0x01ffffff) + (((x) & 0x0e000000) << 1))
44
45#ifndef __ASSEMBLY__
46
47# define __REG(x) (*((volatile u32 *)io_p2v(x)))
48
49/* With indexed regs we don't want to feed the index through io_p2v()
50 especially if it is a variable, otherwise horrible code will result. */
51# define __REG2(x,y) \
52 (*(volatile u32 *)((u32)&__REG(x) + (y)))
53
54# define __PREG(x) (io_v2p((u32)&(x)))
55
56#else
57
58# define __REG(x) io_p2v(x)
59# define __PREG(x) io_v2p(x)
60
61#endif
62
63#ifndef __ASSEMBLY__
64
65#ifdef CONFIG_PXA25x
66#define __cpu_is_pxa21x(id) \
67 ({ \
68 unsigned int _id = (id) >> 4 & 0xf3f; \
69 _id == 0x212; \
70 })
71
72#define __cpu_is_pxa255(id) \
73 ({ \
74 unsigned int _id = (id) >> 4 & 0xfff; \
75 _id == 0x2d0; \
76 })
77
78#define __cpu_is_pxa25x(id) \
79 ({ \
80 unsigned int _id = (id) >> 4 & 0xfff; \
81 _id == 0x2d0 || _id == 0x290; \
82 })
83#else
84#define __cpu_is_pxa21x(id) (0)
85#define __cpu_is_pxa255(id) (0)
86#define __cpu_is_pxa25x(id) (0)
87#endif
88
89#ifdef CONFIG_PXA27x
90#define __cpu_is_pxa27x(id) \
91 ({ \
92 unsigned int _id = (id) >> 4 & 0xfff; \
93 _id == 0x411; \
94 })
95#else
96#define __cpu_is_pxa27x(id) (0)
97#endif
98
99#ifdef CONFIG_CPU_PXA300
100#define __cpu_is_pxa300(id) \
101 ({ \
102 unsigned int _id = (id) >> 4 & 0xfff; \
103 _id == 0x688; \
104 })
105#else
106#define __cpu_is_pxa300(id) (0)
107#endif
108
109#ifdef CONFIG_CPU_PXA310
110#define __cpu_is_pxa310(id) \
111 ({ \
112 unsigned int _id = (id) >> 4 & 0xfff; \
113 _id == 0x689; \
114 })
115#else
116#define __cpu_is_pxa310(id) (0)
117#endif
118
119#ifdef CONFIG_CPU_PXA320
120#define __cpu_is_pxa320(id) \
121 ({ \
122 unsigned int _id = (id) >> 4 & 0xfff; \
123 _id == 0x603 || _id == 0x682; \
124 })
125#else
126#define __cpu_is_pxa320(id) (0)
127#endif
128
129#ifdef CONFIG_CPU_PXA930
130#define __cpu_is_pxa930(id) \
131 ({ \
132 unsigned int _id = (id) >> 4 & 0xfff; \
133 _id == 0x683; \
134 })
135#else
136#define __cpu_is_pxa930(id) (0)
137#endif
138
139#define cpu_is_pxa21x() \
140 ({ \
141 __cpu_is_pxa21x(read_cpuid_id()); \
142 })
143
144#define cpu_is_pxa255() \
145 ({ \
146 __cpu_is_pxa255(read_cpuid_id()); \
147 })
148
149#define cpu_is_pxa25x() \
150 ({ \
151 __cpu_is_pxa25x(read_cpuid_id()); \
152 })
153
154#define cpu_is_pxa27x() \
155 ({ \
156 __cpu_is_pxa27x(read_cpuid_id()); \
157 })
158
159#define cpu_is_pxa300() \
160 ({ \
161 __cpu_is_pxa300(read_cpuid_id()); \
162 })
163
164#define cpu_is_pxa310() \
165 ({ \
166 __cpu_is_pxa310(read_cpuid_id()); \
167 })
168
169#define cpu_is_pxa320() \
170 ({ \
171 __cpu_is_pxa320(read_cpuid_id()); \
172 })
173
174#define cpu_is_pxa930() \
175 ({ \
176 unsigned int id = read_cpuid(CPUID_ID); \
177 __cpu_is_pxa930(id); \
178 })
179
180/*
181 * CPUID Core Generation Bit
182 * <= 0x2 for pxa21x/pxa25x/pxa26x/pxa27x
183 * == 0x3 for pxa300/pxa310/pxa320
184 */
185#define __cpu_is_pxa2xx(id) \
186 ({ \
187 unsigned int _id = (id) >> 13 & 0x7; \
188 _id <= 0x2; \
189 })
190
191#define __cpu_is_pxa3xx(id) \
192 ({ \
193 unsigned int _id = (id) >> 13 & 0x7; \
194 _id == 0x3; \
195 })
196
197#define cpu_is_pxa2xx() \
198 ({ \
199 __cpu_is_pxa2xx(read_cpuid_id()); \
200 })
201
202#define cpu_is_pxa3xx() \
203 ({ \
204 __cpu_is_pxa3xx(read_cpuid_id()); \
205 })
206
207/*
208 * Handy routine to set GPIO alternate functions
209 */
210extern int pxa_gpio_mode( int gpio_mode );
211
212/*
213 * Return GPIO level, nonzero means high, zero is low
214 */
215extern int pxa_gpio_get_value(unsigned gpio);
216
217/*
218 * Set output GPIO level
219 */
220extern void pxa_gpio_set_value(unsigned gpio, int value);
221
222/*
223 * return current memory and LCD clock frequency in units of 10kHz
224 */
225extern unsigned int get_memclk_frequency_10khz(void);
226
227#endif
228
229#if defined(CONFIG_MACH_ARMCORE) && defined(CONFIG_PCI)
230#define PCIBIOS_MIN_IO 0
231#define PCIBIOS_MIN_MEM 0
232#define pcibios_assign_all_busses() 1
233#endif
234
235#endif /* _ASM_ARCH_HARDWARE_H */
diff --git a/include/asm-arm/arch-pxa/i2c.h b/arch/arm/mach-pxa/include/mach/i2c.h
index 80596b013443..80596b013443 100644
--- a/include/asm-arm/arch-pxa/i2c.h
+++ b/arch/arm/mach-pxa/include/mach/i2c.h
diff --git a/arch/arm/mach-pxa/include/mach/idp.h b/arch/arm/mach-pxa/include/mach/idp.h
new file mode 100644
index 000000000000..5eff96fcc944
--- /dev/null
+++ b/arch/arm/mach-pxa/include/mach/idp.h
@@ -0,0 +1,199 @@
1/*
2 * arch/arm/mach-pxa/include/mach/idp.h
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 *
8 * Copyright (c) 2001 Cliff Brake, Accelent Systems Inc.
9 *
10 * 2001-09-13: Cliff Brake <cbrake@accelent.com>
11 * Initial code
12 *
13 * 2005-02-15: Cliff Brake <cliff.brake@gmail.com>
14 * <http://www.vibren.com> <http://bec-systems.com>
15 * Changes for 2.6 kernel.
16 */
17
18
19/*
20 * Note: this file must be safe to include in assembly files
21 *
22 * Support for the Vibren PXA255 IDP requires rev04 or later
23 * IDP hardware.
24 */
25
26
27#define IDP_FLASH_PHYS (PXA_CS0_PHYS)
28#define IDP_ALT_FLASH_PHYS (PXA_CS1_PHYS)
29#define IDP_MEDIAQ_PHYS (PXA_CS3_PHYS)
30#define IDP_IDE_PHYS (PXA_CS5_PHYS + 0x03000000)
31#define IDP_ETH_PHYS (PXA_CS5_PHYS + 0x03400000)
32#define IDP_COREVOLT_PHYS (PXA_CS5_PHYS + 0x03800000)
33#define IDP_CPLD_PHYS (PXA_CS5_PHYS + 0x03C00000)
34
35
36/*
37 * virtual memory map
38 */
39
40#define IDP_COREVOLT_VIRT (0xf0000000)
41#define IDP_COREVOLT_SIZE (1*1024*1024)
42
43#define IDP_CPLD_VIRT (IDP_COREVOLT_VIRT + IDP_COREVOLT_SIZE)
44#define IDP_CPLD_SIZE (1*1024*1024)
45
46#if (IDP_CPLD_VIRT + IDP_CPLD_SIZE) > 0xfc000000
47#error Your custom IO space is getting a bit large !!
48#endif
49
50#define CPLD_P2V(x) ((x) - IDP_CPLD_PHYS + IDP_CPLD_VIRT)
51#define CPLD_V2P(x) ((x) - IDP_CPLD_VIRT + IDP_CPLD_PHYS)
52
53#ifndef __ASSEMBLY__
54# define __CPLD_REG(x) (*((volatile unsigned long *)CPLD_P2V(x)))
55#else
56# define __CPLD_REG(x) CPLD_P2V(x)
57#endif
58
59/* board level registers in the CPLD: (offsets from CPLD_VIRT) */
60
61#define _IDP_CPLD_REV (IDP_CPLD_PHYS + 0x00)
62#define _IDP_CPLD_PERIPH_PWR (IDP_CPLD_PHYS + 0x04)
63#define _IDP_CPLD_LED_CONTROL (IDP_CPLD_PHYS + 0x08)
64#define _IDP_CPLD_KB_COL_HIGH (IDP_CPLD_PHYS + 0x0C)
65#define _IDP_CPLD_KB_COL_LOW (IDP_CPLD_PHYS + 0x10)
66#define _IDP_CPLD_PCCARD_EN (IDP_CPLD_PHYS + 0x14)
67#define _IDP_CPLD_GPIOH_DIR (IDP_CPLD_PHYS + 0x18)
68#define _IDP_CPLD_GPIOH_VALUE (IDP_CPLD_PHYS + 0x1C)
69#define _IDP_CPLD_GPIOL_DIR (IDP_CPLD_PHYS + 0x20)
70#define _IDP_CPLD_GPIOL_VALUE (IDP_CPLD_PHYS + 0x24)
71#define _IDP_CPLD_PCCARD_PWR (IDP_CPLD_PHYS + 0x28)
72#define _IDP_CPLD_MISC_CTRL (IDP_CPLD_PHYS + 0x2C)
73#define _IDP_CPLD_LCD (IDP_CPLD_PHYS + 0x30)
74#define _IDP_CPLD_FLASH_WE (IDP_CPLD_PHYS + 0x34)
75
76#define _IDP_CPLD_KB_ROW (IDP_CPLD_PHYS + 0x50)
77#define _IDP_CPLD_PCCARD0_STATUS (IDP_CPLD_PHYS + 0x54)
78#define _IDP_CPLD_PCCARD1_STATUS (IDP_CPLD_PHYS + 0x58)
79#define _IDP_CPLD_MISC_STATUS (IDP_CPLD_PHYS + 0x5C)
80
81/* FPGA register virtual addresses */
82
83#define IDP_CPLD_REV __CPLD_REG(_IDP_CPLD_REV)
84#define IDP_CPLD_PERIPH_PWR __CPLD_REG(_IDP_CPLD_PERIPH_PWR)
85#define IDP_CPLD_LED_CONTROL __CPLD_REG(_IDP_CPLD_LED_CONTROL)
86#define IDP_CPLD_KB_COL_HIGH __CPLD_REG(_IDP_CPLD_KB_COL_HIGH)
87#define IDP_CPLD_KB_COL_LOW __CPLD_REG(_IDP_CPLD_KB_COL_LOW)
88#define IDP_CPLD_PCCARD_EN __CPLD_REG(_IDP_CPLD_PCCARD_EN)
89#define IDP_CPLD_GPIOH_DIR __CPLD_REG(_IDP_CPLD_GPIOH_DIR)
90#define IDP_CPLD_GPIOH_VALUE __CPLD_REG(_IDP_CPLD_GPIOH_VALUE)
91#define IDP_CPLD_GPIOL_DIR __CPLD_REG(_IDP_CPLD_GPIOL_DIR)
92#define IDP_CPLD_GPIOL_VALUE __CPLD_REG(_IDP_CPLD_GPIOL_VALUE)
93#define IDP_CPLD_PCCARD_PWR __CPLD_REG(_IDP_CPLD_PCCARD_PWR)
94#define IDP_CPLD_MISC_CTRL __CPLD_REG(_IDP_CPLD_MISC_CTRL)
95#define IDP_CPLD_LCD __CPLD_REG(_IDP_CPLD_LCD)
96#define IDP_CPLD_FLASH_WE __CPLD_REG(_IDP_CPLD_FLASH_WE)
97
98#define IDP_CPLD_KB_ROW __CPLD_REG(_IDP_CPLD_KB_ROW)
99#define IDP_CPLD_PCCARD0_STATUS __CPLD_REG(_IDP_CPLD_PCCARD0_STATUS)
100#define IDP_CPLD_PCCARD1_STATUS __CPLD_REG(_IDP_CPLD_PCCARD1_STATUS)
101#define IDP_CPLD_MISC_STATUS __CPLD_REG(_IDP_CPLD_MISC_STATUS)
102
103
104/*
105 * Bit masks for various registers
106 */
107
108// IDP_CPLD_PCCARD_PWR
109#define PCC0_PWR0 (1 << 0)
110#define PCC0_PWR1 (1 << 1)
111#define PCC0_PWR2 (1 << 2)
112#define PCC0_PWR3 (1 << 3)
113#define PCC1_PWR0 (1 << 4)
114#define PCC1_PWR1 (1 << 5)
115#define PCC1_PWR2 (1 << 6)
116#define PCC1_PWR3 (1 << 7)
117
118// IDP_CPLD_PCCARD_EN
119#define PCC0_RESET (1 << 6)
120#define PCC1_RESET (1 << 7)
121#define PCC0_ENABLE (1 << 0)
122#define PCC1_ENABLE (1 << 1)
123
124// IDP_CPLD_PCCARDx_STATUS
125#define _PCC_WRPROT (1 << 7) // 7-4 read as low true
126#define _PCC_RESET (1 << 6)
127#define _PCC_IRQ (1 << 5)
128#define _PCC_INPACK (1 << 4)
129#define PCC_BVD2 (1 << 3)
130#define PCC_BVD1 (1 << 2)
131#define PCC_VS2 (1 << 1)
132#define PCC_VS1 (1 << 0)
133
134#define PCC_DETECT(x) (GPLR(7 + (x)) & GPIO_bit(7 + (x)))
135
136/* A listing of interrupts used by external hardware devices */
137
138#define TOUCH_PANEL_IRQ IRQ_GPIO(5)
139#define IDE_IRQ IRQ_GPIO(21)
140
141#define TOUCH_PANEL_IRQ_EDGE IRQ_TYPE_EDGE_FALLING
142
143#define ETHERNET_IRQ IRQ_GPIO(4)
144#define ETHERNET_IRQ_EDGE IRQ_TYPE_EDGE_RISING
145
146#define IDE_IRQ_EDGE IRQ_TYPE_EDGE_RISING
147
148#define PCMCIA_S0_CD_VALID IRQ_GPIO(7)
149#define PCMCIA_S0_CD_VALID_EDGE IRQ_TYPE_EDGE_BOTH
150
151#define PCMCIA_S1_CD_VALID IRQ_GPIO(8)
152#define PCMCIA_S1_CD_VALID_EDGE IRQ_TYPE_EDGE_BOTH
153
154#define PCMCIA_S0_RDYINT IRQ_GPIO(19)
155#define PCMCIA_S1_RDYINT IRQ_GPIO(22)
156
157
158/*
159 * Macros for LED Driver
160 */
161
162/* leds 0 = ON */
163#define IDP_HB_LED (1<<5)
164#define IDP_BUSY_LED (1<<6)
165
166#define IDP_LEDS_MASK (IDP_HB_LED | IDP_BUSY_LED)
167
168/*
169 * macros for MTD driver
170 */
171
172#define FLASH_WRITE_PROTECT_DISABLE() ((IDP_CPLD_FLASH_WE) &= ~(0x1))
173#define FLASH_WRITE_PROTECT_ENABLE() ((IDP_CPLD_FLASH_WE) |= (0x1))
174
175/*
176 * macros for matrix keyboard driver
177 */
178
179#define KEYBD_MATRIX_NUMBER_INPUTS 7
180#define KEYBD_MATRIX_NUMBER_OUTPUTS 14
181
182#define KEYBD_MATRIX_INVERT_OUTPUT_LOGIC FALSE
183#define KEYBD_MATRIX_INVERT_INPUT_LOGIC FALSE
184
185#define KEYBD_MATRIX_SETTLING_TIME_US 100
186#define KEYBD_MATRIX_KEYSTATE_DEBOUNCE_CONSTANT 2
187
188#define KEYBD_MATRIX_SET_OUTPUTS(outputs) \
189{\
190 IDP_CPLD_KB_COL_LOW = outputs;\
191 IDP_CPLD_KB_COL_HIGH = outputs >> 7;\
192}
193
194#define KEYBD_MATRIX_GET_INPUTS(inputs) \
195{\
196 inputs = (IDP_CPLD_KB_ROW & 0x7f);\
197}
198
199
diff --git a/arch/arm/mach-pxa/include/mach/io.h b/arch/arm/mach-pxa/include/mach/io.h
new file mode 100644
index 000000000000..600fd4f76603
--- /dev/null
+++ b/arch/arm/mach-pxa/include/mach/io.h
@@ -0,0 +1,20 @@
1/*
2 * arch/arm/mach-pxa/include/mach/io.h
3 *
4 * Copied from asm/arch/sa1100/io.h
5 */
6#ifndef __ASM_ARM_ARCH_IO_H
7#define __ASM_ARM_ARCH_IO_H
8
9#include <mach/hardware.h>
10
11#define IO_SPACE_LIMIT 0xffffffff
12
13/*
14 * We don't actually have real ISA nor PCI buses, but there is so many
15 * drivers out there that might just work if we fake them...
16 */
17#define __io(a) ((void __iomem *)(a))
18#define __mem_pci(a) (a)
19
20#endif
diff --git a/include/asm-arm/arch-pxa/irda.h b/arch/arm/mach-pxa/include/mach/irda.h
index 0a50c3c763df..0a50c3c763df 100644
--- a/include/asm-arm/arch-pxa/irda.h
+++ b/arch/arm/mach-pxa/include/mach/irda.h
diff --git a/arch/arm/mach-pxa/include/mach/irqs.h b/arch/arm/mach-pxa/include/mach/irqs.h
new file mode 100644
index 000000000000..32772bc6925c
--- /dev/null
+++ b/arch/arm/mach-pxa/include/mach/irqs.h
@@ -0,0 +1,264 @@
1/*
2 * arch/arm/mach-pxa/include/mach/irqs.h
3 *
4 * Author: Nicolas Pitre
5 * Created: Jun 15, 2001
6 * Copyright: MontaVista Software Inc.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 */
12
13
14#define PXA_IRQ(x) (x)
15
16#if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx)
17#define IRQ_SSP3 PXA_IRQ(0) /* SSP3 service request */
18#define IRQ_MSL PXA_IRQ(1) /* MSL Interface interrupt */
19#define IRQ_USBH2 PXA_IRQ(2) /* USB Host interrupt 1 (OHCI) */
20#define IRQ_USBH1 PXA_IRQ(3) /* USB Host interrupt 2 (non-OHCI) */
21#define IRQ_KEYPAD PXA_IRQ(4) /* Key pad controller */
22#define IRQ_MEMSTK PXA_IRQ(5) /* Memory Stick interrupt */
23#define IRQ_PWRI2C PXA_IRQ(6) /* Power I2C interrupt */
24#endif
25
26#define IRQ_HWUART PXA_IRQ(7) /* HWUART Transmit/Receive/Error (PXA26x) */
27#define IRQ_OST_4_11 PXA_IRQ(7) /* OS timer 4-11 matches (PXA27x) */
28#define IRQ_GPIO0 PXA_IRQ(8) /* GPIO0 Edge Detect */
29#define IRQ_GPIO1 PXA_IRQ(9) /* GPIO1 Edge Detect */
30#define IRQ_GPIO_2_x PXA_IRQ(10) /* GPIO[2-x] Edge Detect */
31#define IRQ_USB PXA_IRQ(11) /* USB Service */
32#define IRQ_PMU PXA_IRQ(12) /* Performance Monitoring Unit */
33#define IRQ_I2S PXA_IRQ(13) /* I2S Interrupt */
34#define IRQ_AC97 PXA_IRQ(14) /* AC97 Interrupt */
35#define IRQ_ASSP PXA_IRQ(15) /* Audio SSP Service Request (PXA25x) */
36#define IRQ_USIM PXA_IRQ(15) /* Smart Card interface interrupt (PXA27x) */
37#define IRQ_NSSP PXA_IRQ(16) /* Network SSP Service Request (PXA25x) */
38#define IRQ_SSP2 PXA_IRQ(16) /* SSP2 interrupt (PXA27x) */
39#define IRQ_LCD PXA_IRQ(17) /* LCD Controller Service Request */
40#define IRQ_I2C PXA_IRQ(18) /* I2C Service Request */
41#define IRQ_ICP PXA_IRQ(19) /* ICP Transmit/Receive/Error */
42#define IRQ_STUART PXA_IRQ(20) /* STUART Transmit/Receive/Error */
43#define IRQ_BTUART PXA_IRQ(21) /* BTUART Transmit/Receive/Error */
44#define IRQ_FFUART PXA_IRQ(22) /* FFUART Transmit/Receive/Error*/
45#define IRQ_MMC PXA_IRQ(23) /* MMC Status/Error Detection */
46#define IRQ_SSP PXA_IRQ(24) /* SSP Service Request */
47#define IRQ_DMA PXA_IRQ(25) /* DMA Channel Service Request */
48#define IRQ_OST0 PXA_IRQ(26) /* OS Timer match 0 */
49#define IRQ_OST1 PXA_IRQ(27) /* OS Timer match 1 */
50#define IRQ_OST2 PXA_IRQ(28) /* OS Timer match 2 */
51#define IRQ_OST3 PXA_IRQ(29) /* OS Timer match 3 */
52#define IRQ_RTC1Hz PXA_IRQ(30) /* RTC HZ Clock Tick */
53#define IRQ_RTCAlrm PXA_IRQ(31) /* RTC Alarm */
54
55#if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx)
56#define IRQ_TPM PXA_IRQ(32) /* TPM interrupt */
57#define IRQ_CAMERA PXA_IRQ(33) /* Camera Interface */
58#endif
59
60#ifdef CONFIG_PXA3xx
61#define IRQ_SSP4 PXA_IRQ(13) /* SSP4 service request */
62#define IRQ_CIR PXA_IRQ(34) /* Consumer IR */
63#define IRQ_TSI PXA_IRQ(36) /* Touch Screen Interface (PXA320) */
64#define IRQ_USIM2 PXA_IRQ(38) /* USIM2 Controller */
65#define IRQ_GRPHICS PXA_IRQ(39) /* Graphics Controller */
66#define IRQ_MMC2 PXA_IRQ(41) /* MMC2 Controller */
67#define IRQ_1WIRE PXA_IRQ(44) /* 1-Wire Controller */
68#define IRQ_NAND PXA_IRQ(45) /* NAND Controller */
69#define IRQ_USB2 PXA_IRQ(46) /* USB 2.0 Device Controller */
70#define IRQ_WAKEUP0 PXA_IRQ(49) /* EXT_WAKEUP0 */
71#define IRQ_WAKEUP1 PXA_IRQ(50) /* EXT_WAKEUP1 */
72#define IRQ_DMEMC PXA_IRQ(51) /* Dynamic Memory Controller */
73#define IRQ_MMC3 PXA_IRQ(55) /* MMC3 Controller (PXA310) */
74#endif
75
76#define PXA_GPIO_IRQ_BASE (64)
77#define PXA_GPIO_IRQ_NUM (128)
78
79#define GPIO_2_x_TO_IRQ(x) (PXA_GPIO_IRQ_BASE + (x))
80#define IRQ_GPIO(x) (((x) < 2) ? (IRQ_GPIO0 + (x)) : GPIO_2_x_TO_IRQ(x))
81
82#define IRQ_TO_GPIO_2_x(i) ((i) - PXA_GPIO_IRQ_BASE)
83#define IRQ_TO_GPIO(i) (((i) < IRQ_GPIO(2)) ? ((i) - IRQ_GPIO0) : IRQ_TO_GPIO_2_x(i))
84
85/*
86 * The next 16 interrupts are for board specific purposes. Since
87 * the kernel can only run on one machine at a time, we can re-use
88 * these. If you need more, increase IRQ_BOARD_END, but keep it
89 * within sensible limits.
90 */
91#define IRQ_BOARD_START (PXA_GPIO_IRQ_BASE + PXA_GPIO_IRQ_NUM)
92#define IRQ_BOARD_END (IRQ_BOARD_START + 16)
93
94#define IRQ_SA1111_START (IRQ_BOARD_END)
95#define IRQ_GPAIN0 (IRQ_BOARD_END + 0)
96#define IRQ_GPAIN1 (IRQ_BOARD_END + 1)
97#define IRQ_GPAIN2 (IRQ_BOARD_END + 2)
98#define IRQ_GPAIN3 (IRQ_BOARD_END + 3)
99#define IRQ_GPBIN0 (IRQ_BOARD_END + 4)
100#define IRQ_GPBIN1 (IRQ_BOARD_END + 5)
101#define IRQ_GPBIN2 (IRQ_BOARD_END + 6)
102#define IRQ_GPBIN3 (IRQ_BOARD_END + 7)
103#define IRQ_GPBIN4 (IRQ_BOARD_END + 8)
104#define IRQ_GPBIN5 (IRQ_BOARD_END + 9)
105#define IRQ_GPCIN0 (IRQ_BOARD_END + 10)
106#define IRQ_GPCIN1 (IRQ_BOARD_END + 11)
107#define IRQ_GPCIN2 (IRQ_BOARD_END + 12)
108#define IRQ_GPCIN3 (IRQ_BOARD_END + 13)
109#define IRQ_GPCIN4 (IRQ_BOARD_END + 14)
110#define IRQ_GPCIN5 (IRQ_BOARD_END + 15)
111#define IRQ_GPCIN6 (IRQ_BOARD_END + 16)
112#define IRQ_GPCIN7 (IRQ_BOARD_END + 17)
113#define IRQ_MSTXINT (IRQ_BOARD_END + 18)
114#define IRQ_MSRXINT (IRQ_BOARD_END + 19)
115#define IRQ_MSSTOPERRINT (IRQ_BOARD_END + 20)
116#define IRQ_TPTXINT (IRQ_BOARD_END + 21)
117#define IRQ_TPRXINT (IRQ_BOARD_END + 22)
118#define IRQ_TPSTOPERRINT (IRQ_BOARD_END + 23)
119#define SSPXMTINT (IRQ_BOARD_END + 24)
120#define SSPRCVINT (IRQ_BOARD_END + 25)
121#define SSPROR (IRQ_BOARD_END + 26)
122#define AUDXMTDMADONEA (IRQ_BOARD_END + 32)
123#define AUDRCVDMADONEA (IRQ_BOARD_END + 33)
124#define AUDXMTDMADONEB (IRQ_BOARD_END + 34)
125#define AUDRCVDMADONEB (IRQ_BOARD_END + 35)
126#define AUDTFSR (IRQ_BOARD_END + 36)
127#define AUDRFSR (IRQ_BOARD_END + 37)
128#define AUDTUR (IRQ_BOARD_END + 38)
129#define AUDROR (IRQ_BOARD_END + 39)
130#define AUDDTS (IRQ_BOARD_END + 40)
131#define AUDRDD (IRQ_BOARD_END + 41)
132#define AUDSTO (IRQ_BOARD_END + 42)
133#define IRQ_USBPWR (IRQ_BOARD_END + 43)
134#define IRQ_HCIM (IRQ_BOARD_END + 44)
135#define IRQ_HCIBUFFACC (IRQ_BOARD_END + 45)
136#define IRQ_HCIRMTWKP (IRQ_BOARD_END + 46)
137#define IRQ_NHCIMFCIR (IRQ_BOARD_END + 47)
138#define IRQ_USB_PORT_RESUME (IRQ_BOARD_END + 48)
139#define IRQ_S0_READY_NINT (IRQ_BOARD_END + 49)
140#define IRQ_S1_READY_NINT (IRQ_BOARD_END + 50)
141#define IRQ_S0_CD_VALID (IRQ_BOARD_END + 51)
142#define IRQ_S1_CD_VALID (IRQ_BOARD_END + 52)
143#define IRQ_S0_BVD1_STSCHG (IRQ_BOARD_END + 53)
144#define IRQ_S1_BVD1_STSCHG (IRQ_BOARD_END + 54)
145
146#define IRQ_LOCOMO_START (IRQ_BOARD_END)
147#define IRQ_LOCOMO_KEY (IRQ_BOARD_END + 0)
148#define IRQ_LOCOMO_GPIO0 (IRQ_BOARD_END + 1)
149#define IRQ_LOCOMO_GPIO1 (IRQ_BOARD_END + 2)
150#define IRQ_LOCOMO_GPIO2 (IRQ_BOARD_END + 3)
151#define IRQ_LOCOMO_GPIO3 (IRQ_BOARD_END + 4)
152#define IRQ_LOCOMO_GPIO4 (IRQ_BOARD_END + 5)
153#define IRQ_LOCOMO_GPIO5 (IRQ_BOARD_END + 6)
154#define IRQ_LOCOMO_GPIO6 (IRQ_BOARD_END + 7)
155#define IRQ_LOCOMO_GPIO7 (IRQ_BOARD_END + 8)
156#define IRQ_LOCOMO_GPIO8 (IRQ_BOARD_END + 9)
157#define IRQ_LOCOMO_GPIO9 (IRQ_BOARD_END + 10)
158#define IRQ_LOCOMO_GPIO10 (IRQ_BOARD_END + 11)
159#define IRQ_LOCOMO_GPIO11 (IRQ_BOARD_END + 12)
160#define IRQ_LOCOMO_GPIO12 (IRQ_BOARD_END + 13)
161#define IRQ_LOCOMO_GPIO13 (IRQ_BOARD_END + 14)
162#define IRQ_LOCOMO_GPIO14 (IRQ_BOARD_END + 15)
163#define IRQ_LOCOMO_GPIO15 (IRQ_BOARD_END + 16)
164#define IRQ_LOCOMO_LT (IRQ_BOARD_END + 17)
165#define IRQ_LOCOMO_SPI_RFR (IRQ_BOARD_END + 18)
166#define IRQ_LOCOMO_SPI_RFW (IRQ_BOARD_END + 19)
167#define IRQ_LOCOMO_SPI_OVRN (IRQ_BOARD_END + 20)
168#define IRQ_LOCOMO_SPI_TEND (IRQ_BOARD_END + 21)
169
170/*
171 * Figure out the MAX IRQ number.
172 *
173 * If we have an SA1111, the max IRQ is S1_BVD1_STSCHG+1.
174 * If we have an LoCoMo, the max IRQ is IRQ_LOCOMO_SPI_TEND+1
175 * Otherwise, we have the standard IRQs only.
176 */
177#ifdef CONFIG_SA1111
178#define NR_IRQS (IRQ_S1_BVD1_STSCHG + 1)
179#elif defined(CONFIG_SHARP_LOCOMO)
180#define NR_IRQS (IRQ_LOCOMO_SPI_TEND + 1)
181#elif defined(CONFIG_ARCH_LUBBOCK) || \
182 defined(CONFIG_MACH_LOGICPD_PXA270) || \
183 defined(CONFIG_MACH_TOSA) || \
184 defined(CONFIG_MACH_MAINSTONE) || \
185 defined(CONFIG_MACH_PCM027) || \
186 defined(CONFIG_MACH_MAGICIAN)
187#define NR_IRQS (IRQ_BOARD_END)
188#elif defined(CONFIG_MACH_ZYLONITE)
189#define NR_IRQS (IRQ_BOARD_START + 32)
190#else
191#define NR_IRQS (IRQ_BOARD_START)
192#endif
193
194/*
195 * Board specific IRQs. Define them here.
196 * Do not surround them with ifdefs.
197 */
198#define LUBBOCK_IRQ(x) (IRQ_BOARD_START + (x))
199#define LUBBOCK_SD_IRQ LUBBOCK_IRQ(0)
200#define LUBBOCK_SA1111_IRQ LUBBOCK_IRQ(1)
201#define LUBBOCK_USB_IRQ LUBBOCK_IRQ(2) /* usb connect */
202#define LUBBOCK_ETH_IRQ LUBBOCK_IRQ(3)
203#define LUBBOCK_UCB1400_IRQ LUBBOCK_IRQ(4)
204#define LUBBOCK_BB_IRQ LUBBOCK_IRQ(5)
205#define LUBBOCK_USB_DISC_IRQ LUBBOCK_IRQ(6) /* usb disconnect */
206#define LUBBOCK_LAST_IRQ LUBBOCK_IRQ(6)
207
208#define LPD270_IRQ(x) (IRQ_BOARD_START + (x))
209#define LPD270_USBC_IRQ LPD270_IRQ(2)
210#define LPD270_ETHERNET_IRQ LPD270_IRQ(3)
211#define LPD270_AC97_IRQ LPD270_IRQ(4)
212
213#define MAINSTONE_IRQ(x) (IRQ_BOARD_START + (x))
214#define MAINSTONE_MMC_IRQ MAINSTONE_IRQ(0)
215#define MAINSTONE_USIM_IRQ MAINSTONE_IRQ(1)
216#define MAINSTONE_USBC_IRQ MAINSTONE_IRQ(2)
217#define MAINSTONE_ETHERNET_IRQ MAINSTONE_IRQ(3)
218#define MAINSTONE_AC97_IRQ MAINSTONE_IRQ(4)
219#define MAINSTONE_PEN_IRQ MAINSTONE_IRQ(5)
220#define MAINSTONE_MSINS_IRQ MAINSTONE_IRQ(6)
221#define MAINSTONE_EXBRD_IRQ MAINSTONE_IRQ(7)
222#define MAINSTONE_S0_CD_IRQ MAINSTONE_IRQ(9)
223#define MAINSTONE_S0_STSCHG_IRQ MAINSTONE_IRQ(10)
224#define MAINSTONE_S0_IRQ MAINSTONE_IRQ(11)
225#define MAINSTONE_S1_CD_IRQ MAINSTONE_IRQ(13)
226#define MAINSTONE_S1_STSCHG_IRQ MAINSTONE_IRQ(14)
227#define MAINSTONE_S1_IRQ MAINSTONE_IRQ(15)
228
229/* LoCoMo Interrupts (CONFIG_SHARP_LOCOMO) */
230#define IRQ_LOCOMO_KEY_BASE (IRQ_BOARD_START + 0)
231#define IRQ_LOCOMO_GPIO_BASE (IRQ_BOARD_START + 1)
232#define IRQ_LOCOMO_LT_BASE (IRQ_BOARD_START + 2)
233#define IRQ_LOCOMO_SPI_BASE (IRQ_BOARD_START + 3)
234
235/* phyCORE-PXA270 (PCM027) Interrupts */
236#define PCM027_IRQ(x) (IRQ_BOARD_START + (x))
237#define PCM027_BTDET_IRQ PCM027_IRQ(0)
238#define PCM027_FF_RI_IRQ PCM027_IRQ(1)
239#define PCM027_MMCDET_IRQ PCM027_IRQ(2)
240#define PCM027_PM_5V_IRQ PCM027_IRQ(3)
241
242/* ITE8152 irqs */
243/* add IT8152 IRQs beyond BOARD_END */
244#ifdef CONFIG_PCI_HOST_ITE8152
245#define IT8152_IRQ(x) (IRQ_BOARD_END + (x))
246
247/* IRQ-sources in 3 groups - local devices, LPC (serial), and external PCI */
248#define IT8152_LD_IRQ_COUNT 9
249#define IT8152_LP_IRQ_COUNT 16
250#define IT8152_PD_IRQ_COUNT 15
251
252/* Priorities: */
253#define IT8152_PD_IRQ(i) IT8152_IRQ(i)
254#define IT8152_LP_IRQ(i) (IT8152_IRQ(i) + IT8152_PD_IRQ_COUNT)
255#define IT8152_LD_IRQ(i) (IT8152_IRQ(i) + IT8152_PD_IRQ_COUNT + IT8152_LP_IRQ_COUNT)
256
257#define IT8152_LAST_IRQ IT8152_LD_IRQ(IT8152_LD_IRQ_COUNT - 1)
258
259#if NR_IRQS < (IT8152_LAST_IRQ+1)
260#undef NR_IRQS
261#define NR_IRQS (IT8152_LAST_IRQ+1)
262#endif
263
264#endif /* CONFIG_PCI_HOST_ITE8152 */
diff --git a/include/asm-arm/arch-pxa/littleton.h b/arch/arm/mach-pxa/include/mach/littleton.h
index 79d209b826f4..79d209b826f4 100644
--- a/include/asm-arm/arch-pxa/littleton.h
+++ b/arch/arm/mach-pxa/include/mach/littleton.h
diff --git a/arch/arm/mach-pxa/include/mach/lpd270.h b/arch/arm/mach-pxa/include/mach/lpd270.h
new file mode 100644
index 000000000000..f89fb715266b
--- /dev/null
+++ b/arch/arm/mach-pxa/include/mach/lpd270.h
@@ -0,0 +1,38 @@
1/*
2 * arch/arm/mach-pxa/include/mach/lpd270.h
3 *
4 * Author: Lennert Buytenhek
5 * Created: Feb 10, 2006
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 */
11
12#ifndef __ASM_ARCH_LPD270_H
13#define __ASM_ARCH_LPD270_H
14
15#define LPD270_CPLD_PHYS PXA_CS2_PHYS
16#define LPD270_CPLD_VIRT 0xf0000000
17#define LPD270_CPLD_SIZE 0x00100000
18
19#define LPD270_ETH_PHYS (PXA_CS2_PHYS + 0x01000000)
20
21/* CPLD registers */
22#define LPD270_CPLD_REG(x) ((unsigned long)(LPD270_CPLD_VIRT + (x)))
23#define LPD270_CONTROL LPD270_CPLD_REG(0x00)
24#define LPD270_PERIPHERAL0 LPD270_CPLD_REG(0x04)
25#define LPD270_PERIPHERAL1 LPD270_CPLD_REG(0x08)
26#define LPD270_CPLD_REVISION LPD270_CPLD_REG(0x14)
27#define LPD270_EEPROM_SPI_ITF LPD270_CPLD_REG(0x20)
28#define LPD270_MODE_PINS LPD270_CPLD_REG(0x24)
29#define LPD270_EGPIO LPD270_CPLD_REG(0x30)
30#define LPD270_INT_MASK LPD270_CPLD_REG(0x40)
31#define LPD270_INT_STATUS LPD270_CPLD_REG(0x50)
32
33#define LPD270_INT_AC97 (1 << 4) /* AC'97 CODEC IRQ */
34#define LPD270_INT_ETHERNET (1 << 3) /* Ethernet controller IRQ */
35#define LPD270_INT_USBC (1 << 2) /* USB client cable detection IRQ */
36
37
38#endif
diff --git a/arch/arm/mach-pxa/include/mach/lubbock.h b/arch/arm/mach-pxa/include/mach/lubbock.h
new file mode 100644
index 000000000000..4cb24154a5a8
--- /dev/null
+++ b/arch/arm/mach-pxa/include/mach/lubbock.h
@@ -0,0 +1,40 @@
1/*
2 * arch/arm/mach-pxa/include/mach/lubbock.h
3 *
4 * Author: Nicolas Pitre
5 * Created: Jun 15, 2001
6 * Copyright: MontaVista Software Inc.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 */
12
13#define LUBBOCK_ETH_PHYS PXA_CS3_PHYS
14
15#define LUBBOCK_FPGA_PHYS PXA_CS2_PHYS
16#define LUBBOCK_FPGA_VIRT (0xf0000000)
17#define LUB_P2V(x) ((x) - LUBBOCK_FPGA_PHYS + LUBBOCK_FPGA_VIRT)
18#define LUB_V2P(x) ((x) - LUBBOCK_FPGA_VIRT + LUBBOCK_FPGA_PHYS)
19
20#ifndef __ASSEMBLY__
21# define __LUB_REG(x) (*((volatile unsigned long *)LUB_P2V(x)))
22#else
23# define __LUB_REG(x) LUB_P2V(x)
24#endif
25
26/* FPGA register virtual addresses */
27#define LUB_WHOAMI __LUB_REG(LUBBOCK_FPGA_PHYS + 0x000)
28#define LUB_HEXLED __LUB_REG(LUBBOCK_FPGA_PHYS + 0x010)
29#define LUB_DISC_BLNK_LED __LUB_REG(LUBBOCK_FPGA_PHYS + 0x040)
30#define LUB_CONF_SWITCHES __LUB_REG(LUBBOCK_FPGA_PHYS + 0x050)
31#define LUB_USER_SWITCHES __LUB_REG(LUBBOCK_FPGA_PHYS + 0x060)
32#define LUB_MISC_WR __LUB_REG(LUBBOCK_FPGA_PHYS + 0x080)
33#define LUB_MISC_RD __LUB_REG(LUBBOCK_FPGA_PHYS + 0x090)
34#define LUB_IRQ_MASK_EN __LUB_REG(LUBBOCK_FPGA_PHYS + 0x0c0)
35#define LUB_IRQ_SET_CLR __LUB_REG(LUBBOCK_FPGA_PHYS + 0x0d0)
36#define LUB_GP __LUB_REG(LUBBOCK_FPGA_PHYS + 0x100)
37
38#ifndef __ASSEMBLY__
39extern void lubbock_set_misc_wr(unsigned int mask, unsigned int set);
40#endif
diff --git a/arch/arm/mach-pxa/include/mach/magician.h b/arch/arm/mach-pxa/include/mach/magician.h
new file mode 100644
index 000000000000..38d68d99f585
--- /dev/null
+++ b/arch/arm/mach-pxa/include/mach/magician.h
@@ -0,0 +1,117 @@
1/*
2 * GPIO and IRQ definitions for HTC Magician PDA phones
3 *
4 * Copyright (c) 2007 Philipp Zabel
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 */
11
12#ifndef _MAGICIAN_H_
13#define _MAGICIAN_H_
14
15#include <mach/irqs.h>
16
17/*
18 * PXA GPIOs
19 */
20
21#define GPIO0_MAGICIAN_KEY_POWER 0
22#define GPIO9_MAGICIAN_UNKNOWN 9
23#define GPIO10_MAGICIAN_GSM_IRQ 10
24#define GPIO11_MAGICIAN_GSM_OUT1 11
25#define GPIO13_MAGICIAN_CPLD_IRQ 13
26#define GPIO18_MAGICIAN_UNKNOWN 18
27#define GPIO22_MAGICIAN_VIBRA_EN 22
28#define GPIO26_MAGICIAN_GSM_POWER 26
29#define GPIO27_MAGICIAN_USBC_PUEN 27
30#define GPIO30_MAGICIAN_nCHARGE_EN 30
31#define GPIO37_MAGICIAN_KEY_HANGUP 37
32#define GPIO38_MAGICIAN_KEY_CONTACTS 38
33#define GPIO40_MAGICIAN_GSM_OUT2 40
34#define GPIO48_MAGICIAN_UNKNOWN 48
35#define GPIO56_MAGICIAN_UNKNOWN 56
36#define GPIO57_MAGICIAN_CAM_RESET 57
37#define GPIO75_MAGICIAN_SAMSUNG_POWER 75
38#define GPIO83_MAGICIAN_nIR_EN 83
39#define GPIO86_MAGICIAN_GSM_RESET 86
40#define GPIO87_MAGICIAN_GSM_SELECT 87
41#define GPIO90_MAGICIAN_KEY_CALENDAR 90
42#define GPIO91_MAGICIAN_KEY_CAMERA 91
43#define GPIO93_MAGICIAN_KEY_UP 93
44#define GPIO94_MAGICIAN_KEY_DOWN 94
45#define GPIO95_MAGICIAN_KEY_LEFT 95
46#define GPIO96_MAGICIAN_KEY_RIGHT 96
47#define GPIO97_MAGICIAN_KEY_ENTER 97
48#define GPIO98_MAGICIAN_KEY_RECORD 98
49#define GPIO99_MAGICIAN_HEADPHONE_IN 99
50#define GPIO100_MAGICIAN_KEY_VOL_UP 100
51#define GPIO101_MAGICIAN_KEY_VOL_DOWN 101
52#define GPIO102_MAGICIAN_KEY_PHONE 102
53#define GPIO103_MAGICIAN_LED_KP 103
54#define GPIO104_MAGICIAN_LCD_POWER_1 104
55#define GPIO105_MAGICIAN_LCD_POWER_2 105
56#define GPIO106_MAGICIAN_LCD_POWER_3 106
57#define GPIO107_MAGICIAN_DS1WM_IRQ 107
58#define GPIO108_MAGICIAN_GSM_READY 108
59#define GPIO114_MAGICIAN_UNKNOWN 114
60#define GPIO115_MAGICIAN_nPEN_IRQ 115
61#define GPIO116_MAGICIAN_nCAM_EN 116
62#define GPIO119_MAGICIAN_UNKNOWN 119
63#define GPIO120_MAGICIAN_UNKNOWN 120
64
65/*
66 * CPLD IRQs
67 */
68
69#define IRQ_MAGICIAN_SD (IRQ_BOARD_START + 0)
70#define IRQ_MAGICIAN_EP (IRQ_BOARD_START + 1)
71#define IRQ_MAGICIAN_BT (IRQ_BOARD_START + 2)
72#define IRQ_MAGICIAN_AC (IRQ_BOARD_START + 3)
73
74/*
75 * CPLD EGPIOs
76 */
77
78#define MAGICIAN_EGPIO_BASE 0x80 /* GPIO_BOARD_START */
79#define MAGICIAN_EGPIO(reg,bit) \
80 (MAGICIAN_EGPIO_BASE + 8*reg + bit)
81
82/* output */
83
84#define EGPIO_MAGICIAN_TOPPOLY_POWER MAGICIAN_EGPIO(0, 2)
85#define EGPIO_MAGICIAN_LED_POWER MAGICIAN_EGPIO(0, 5)
86#define EGPIO_MAGICIAN_GSM_RESET MAGICIAN_EGPIO(0, 6)
87#define EGPIO_MAGICIAN_LCD_POWER MAGICIAN_EGPIO(0, 7)
88#define EGPIO_MAGICIAN_SPK_POWER MAGICIAN_EGPIO(1, 0)
89#define EGPIO_MAGICIAN_EP_POWER MAGICIAN_EGPIO(1, 1)
90#define EGPIO_MAGICIAN_IN_SEL0 MAGICIAN_EGPIO(1, 2)
91#define EGPIO_MAGICIAN_IN_SEL1 MAGICIAN_EGPIO(1, 3)
92#define EGPIO_MAGICIAN_MIC_POWER MAGICIAN_EGPIO(1, 4)
93#define EGPIO_MAGICIAN_CODEC_RESET MAGICIAN_EGPIO(1, 5)
94#define EGPIO_MAGICIAN_CODEC_POWER MAGICIAN_EGPIO(1, 6)
95#define EGPIO_MAGICIAN_BL_POWER MAGICIAN_EGPIO(1, 7)
96#define EGPIO_MAGICIAN_SD_POWER MAGICIAN_EGPIO(2, 0)
97#define EGPIO_MAGICIAN_CARKIT_MIC MAGICIAN_EGPIO(2, 1)
98#define EGPIO_MAGICIAN_UNKNOWN_WAVEDEV_DLL MAGICIAN_EGPIO(2, 2)
99#define EGPIO_MAGICIAN_FLASH_VPP MAGICIAN_EGPIO(2, 3)
100#define EGPIO_MAGICIAN_BL_POWER2 MAGICIAN_EGPIO(2, 4)
101#define EGPIO_MAGICIAN_CHARGE_EN MAGICIAN_EGPIO(2, 5)
102#define EGPIO_MAGICIAN_GSM_POWER MAGICIAN_EGPIO(2, 7)
103
104/* input */
105
106#define EGPIO_MAGICIAN_CABLE_STATE_AC MAGICIAN_EGPIO(4, 0)
107#define EGPIO_MAGICIAN_CABLE_STATE_USB MAGICIAN_EGPIO(4, 1)
108
109#define EGPIO_MAGICIAN_BOARD_ID0 MAGICIAN_EGPIO(5, 0)
110#define EGPIO_MAGICIAN_BOARD_ID1 MAGICIAN_EGPIO(5, 1)
111#define EGPIO_MAGICIAN_BOARD_ID2 MAGICIAN_EGPIO(5, 2)
112#define EGPIO_MAGICIAN_LCD_SELECT MAGICIAN_EGPIO(5, 3)
113#define EGPIO_MAGICIAN_nSD_READONLY MAGICIAN_EGPIO(5, 4)
114
115#define EGPIO_MAGICIAN_EP_INSERT MAGICIAN_EGPIO(6, 1)
116
117#endif /* _MAGICIAN_H_ */
diff --git a/arch/arm/mach-pxa/include/mach/mainstone.h b/arch/arm/mach-pxa/include/mach/mainstone.h
new file mode 100644
index 000000000000..3461c4302ff4
--- /dev/null
+++ b/arch/arm/mach-pxa/include/mach/mainstone.h
@@ -0,0 +1,120 @@
1/*
2 * arch/arm/mach-pxa/include/mach/mainstone.h
3 *
4 * Author: Nicolas Pitre
5 * Created: Nov 14, 2002
6 * Copyright: MontaVista Software Inc.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 */
12
13#ifndef ASM_ARCH_MAINSTONE_H
14#define ASM_ARCH_MAINSTONE_H
15
16#define MST_ETH_PHYS PXA_CS4_PHYS
17
18#define MST_FPGA_PHYS PXA_CS2_PHYS
19#define MST_FPGA_VIRT (0xf0000000)
20#define MST_P2V(x) ((x) - MST_FPGA_PHYS + MST_FPGA_VIRT)
21#define MST_V2P(x) ((x) - MST_FPGA_VIRT + MST_FPGA_PHYS)
22
23#ifndef __ASSEMBLY__
24# define __MST_REG(x) (*((volatile unsigned long *)MST_P2V(x)))
25#else
26# define __MST_REG(x) MST_P2V(x)
27#endif
28
29/* board level registers in the FPGA */
30
31#define MST_LEDDAT1 __MST_REG(0x08000010)
32#define MST_LEDDAT2 __MST_REG(0x08000014)
33#define MST_LEDCTRL __MST_REG(0x08000040)
34#define MST_GPSWR __MST_REG(0x08000060)
35#define MST_MSCWR1 __MST_REG(0x08000080)
36#define MST_MSCWR2 __MST_REG(0x08000084)
37#define MST_MSCWR3 __MST_REG(0x08000088)
38#define MST_MSCRD __MST_REG(0x08000090)
39#define MST_INTMSKENA __MST_REG(0x080000c0)
40#define MST_INTSETCLR __MST_REG(0x080000d0)
41#define MST_PCMCIA0 __MST_REG(0x080000e0)
42#define MST_PCMCIA1 __MST_REG(0x080000e4)
43
44#define MST_MSCWR1_CAMERA_ON (1 << 15) /* Camera interface power control */
45#define MST_MSCWR1_CAMERA_SEL (1 << 14) /* Camera interface mux control */
46#define MST_MSCWR1_LCD_CTL (1 << 13) /* General-purpose LCD control */
47#define MST_MSCWR1_MS_ON (1 << 12) /* Memory Stick power control */
48#define MST_MSCWR1_MMC_ON (1 << 11) /* MultiMediaCard* power control */
49#define MST_MSCWR1_MS_SEL (1 << 10) /* SD/MS multiplexer control */
50#define MST_MSCWR1_BB_SEL (1 << 9) /* PCMCIA/Baseband multiplexer */
51#define MST_MSCWR1_BT_ON (1 << 8) /* Bluetooth UART transceiver */
52#define MST_MSCWR1_BTDTR (1 << 7) /* Bluetooth UART DTR */
53
54#define MST_MSCWR1_IRDA_MASK (3 << 5) /* IrDA transceiver mode */
55#define MST_MSCWR1_IRDA_FULL (0 << 5) /* full distance power */
56#define MST_MSCWR1_IRDA_OFF (1 << 5) /* shutdown */
57#define MST_MSCWR1_IRDA_MED (2 << 5) /* 2/3 distance power */
58#define MST_MSCWR1_IRDA_LOW (3 << 5) /* 1/3 distance power */
59
60#define MST_MSCWR1_IRDA_FIR (1 << 4) /* IrDA transceiver SIR/FIR */
61#define MST_MSCWR1_GREENLED (1 << 3) /* LED D1 control */
62#define MST_MSCWR1_PDC_CTL (1 << 2) /* reserved */
63#define MST_MSCWR1_MTR_ON (1 << 1) /* Silent alert motor */
64#define MST_MSCWR1_SYSRESET (1 << 0) /* System reset */
65
66#define MST_MSCWR2_USB_OTG_RST (1 << 6) /* USB On The Go reset */
67#define MST_MSCWR2_USB_OTG_SEL (1 << 5) /* USB On The Go control */
68#define MST_MSCWR2_nUSBC_SC (1 << 4) /* USB client soft connect control */
69#define MST_MSCWR2_I2S_SPKROFF (1 << 3) /* I2S CODEC amplifier control */
70#define MST_MSCWR2_AC97_SPKROFF (1 << 2) /* AC97 CODEC amplifier control */
71#define MST_MSCWR2_RADIO_PWR (1 << 1) /* Radio module power control */
72#define MST_MSCWR2_RADIO_WAKE (1 << 0) /* Radio module wake-up signal */
73
74#define MST_MSCWR3_GPIO_RESET_EN (1 << 2) /* Enable GPIO Reset */
75#define MST_MSCWR3_GPIO_RESET (1 << 1) /* Initiate a GPIO Reset */
76#define MST_MSCWR3_COMMS_SW_RESET (1 << 0) /* Communications Processor Reset Control */
77
78#define MST_MSCRD_nPENIRQ (1 << 9) /* ADI7873* nPENIRQ signal */
79#define MST_MSCRD_nMEMSTK_CD (1 << 8) /* Memory Stick detection signal */
80#define MST_MSCRD_nMMC_CD (1 << 7) /* SD/MMC card detection signal */
81#define MST_MSCRD_nUSIM_CD (1 << 6) /* USIM card detection signal */
82#define MST_MSCRD_USB_CBL (1 << 5) /* USB client cable status */
83#define MST_MSCRD_TS_BUSY (1 << 4) /* ADI7873 busy */
84#define MST_MSCRD_BTDSR (1 << 3) /* Bluetooth UART DSR */
85#define MST_MSCRD_BTRI (1 << 2) /* Bluetooth UART Ring Indicator */
86#define MST_MSCRD_BTDCD (1 << 1) /* Bluetooth UART DCD */
87#define MST_MSCRD_nMMC_WP (1 << 0) /* SD/MMC write-protect status */
88
89#define MST_INT_S1_IRQ (1 << 15) /* PCMCIA socket 1 IRQ */
90#define MST_INT_S1_STSCHG (1 << 14) /* PCMCIA socket 1 status changed */
91#define MST_INT_S1_CD (1 << 13) /* PCMCIA socket 1 card detection */
92#define MST_INT_S0_IRQ (1 << 11) /* PCMCIA socket 0 IRQ */
93#define MST_INT_S0_STSCHG (1 << 10) /* PCMCIA socket 0 status changed */
94#define MST_INT_S0_CD (1 << 9) /* PCMCIA socket 0 card detection */
95#define MST_INT_nEXBRD_INT (1 << 7) /* Expansion board IRQ */
96#define MST_INT_MSINS (1 << 6) /* Memory Stick* detection */
97#define MST_INT_PENIRQ (1 << 5) /* ADI7873* touch-screen IRQ */
98#define MST_INT_AC97 (1 << 4) /* AC'97 CODEC IRQ */
99#define MST_INT_ETHERNET (1 << 3) /* Ethernet controller IRQ */
100#define MST_INT_USBC (1 << 2) /* USB client cable detection IRQ */
101#define MST_INT_USIM (1 << 1) /* USIM card detection IRQ */
102#define MST_INT_MMC (1 << 0) /* MMC/SD card detection IRQ */
103
104#define MST_PCMCIA_nIRQ (1 << 10) /* IRQ / ready signal */
105#define MST_PCMCIA_nSPKR_BVD2 (1 << 9) /* VDD sense / digital speaker */
106#define MST_PCMCIA_nSTSCHG_BVD1 (1 << 8) /* VDD sense / card status changed */
107#define MST_PCMCIA_nVS2 (1 << 7) /* VSS voltage sense */
108#define MST_PCMCIA_nVS1 (1 << 6) /* VSS voltage sense */
109#define MST_PCMCIA_nCD (1 << 5) /* Card detection signal */
110#define MST_PCMCIA_RESET (1 << 4) /* Card reset signal */
111#define MST_PCMCIA_PWR_MASK (0x000f) /* MAX1602 power-supply controls */
112
113#define MST_PCMCIA_PWR_VPP_0 0x0 /* voltage VPP = 0V */
114#define MST_PCMCIA_PWR_VPP_120 0x2 /* voltage VPP = 12V*/
115#define MST_PCMCIA_PWR_VPP_VCC 0x1 /* voltage VPP = VCC */
116#define MST_PCMCIA_PWR_VCC_0 0x0 /* voltage VCC = 0V */
117#define MST_PCMCIA_PWR_VCC_33 0x8 /* voltage VCC = 3.3V */
118#define MST_PCMCIA_PWR_VCC_50 0x4 /* voltage VCC = 5.0V */
119
120#endif
diff --git a/arch/arm/mach-pxa/include/mach/memory.h b/arch/arm/mach-pxa/include/mach/memory.h
new file mode 100644
index 000000000000..552eb7fa6579
--- /dev/null
+++ b/arch/arm/mach-pxa/include/mach/memory.h
@@ -0,0 +1,52 @@
1/*
2 * arch/arm/mach-pxa/include/mach/memory.h
3 *
4 * Author: Nicolas Pitre
5 * Copyright: (C) 2001 MontaVista Software Inc.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 */
11
12#ifndef __ASM_ARCH_MEMORY_H
13#define __ASM_ARCH_MEMORY_H
14
15/*
16 * Physical DRAM offset.
17 */
18#define PHYS_OFFSET UL(0xa0000000)
19
20/*
21 * Virtual view <-> DMA view memory address translations
22 * virt_to_bus: Used to translate the virtual address to an
23 * address suitable to be passed to set_dma_addr
24 * bus_to_virt: Used to convert an address for DMA operations
25 * to an address that the kernel can use.
26 */
27#define __virt_to_bus(x) __virt_to_phys(x)
28#define __bus_to_virt(x) __phys_to_virt(x)
29
30/*
31 * The nodes are matched with the physical SDRAM banks as follows:
32 *
33 * node 0: 0xa0000000-0xa3ffffff --> 0xc0000000-0xc3ffffff
34 * node 1: 0xa4000000-0xa7ffffff --> 0xc4000000-0xc7ffffff
35 * node 2: 0xa8000000-0xabffffff --> 0xc8000000-0xcbffffff
36 * node 3: 0xac000000-0xafffffff --> 0xcc000000-0xcfffffff
37 *
38 * This needs a node mem size of 26 bits.
39 */
40#define NODE_MEM_SIZE_BITS 26
41
42#if !defined(__ASSEMBLY__) && defined(CONFIG_MACH_ARMCORE) && defined(CONFIG_PCI)
43void cmx270_pci_adjust_zones(int node, unsigned long *size,
44 unsigned long *holes);
45
46#define arch_adjust_zones(node, size, holes) \
47 cmx270_pci_adjust_zones(node, size, holes)
48
49#define ISA_DMA_THRESHOLD (PHYS_OFFSET + SZ_64M - 1)
50#endif
51
52#endif
diff --git a/arch/arm/mach-pxa/include/mach/mfp-pxa25x.h b/arch/arm/mach-pxa/include/mach/mfp-pxa25x.h
new file mode 100644
index 000000000000..6c8e72238bfd
--- /dev/null
+++ b/arch/arm/mach-pxa/include/mach/mfp-pxa25x.h
@@ -0,0 +1,161 @@
1#ifndef __ASM_ARCH_MFP_PXA25X_H
2#define __ASM_ARCH_MFP_PXA25X_H
3
4#include <mach/mfp.h>
5#include <mach/mfp-pxa2xx.h>
6
7/* GPIO */
8#define GPIO2_GPIO MFP_CFG_IN(GPIO2, AF0)
9#define GPIO3_GPIO MFP_CFG_IN(GPIO3, AF0)
10#define GPIO4_GPIO MFP_CFG_IN(GPIO4, AF0)
11#define GPIO5_GPIO MFP_CFG_IN(GPIO5, AF0)
12#define GPIO6_GPIO MFP_CFG_IN(GPIO6, AF0)
13#define GPIO7_GPIO MFP_CFG_IN(GPIO7, AF0)
14#define GPIO8_GPIO MFP_CFG_IN(GPIO8, AF0)
15
16#define GPIO1_RST MFP_CFG_IN(GPIO1, AF1)
17
18/* Crystal and Clock Signals */
19#define GPIO10_RTCCLK MFP_CFG_OUT(GPIO10, AF1, DRIVE_LOW)
20#define GPIO70_RTC_CLK MFP_CFG_OUT(GPIO70, AF1, DRIVE_LOW)
21#define GPIO7_48MHz MFP_CFG_OUT(GPIO7, AF1, DRIVE_LOW)
22#define GPIO11_3_6MHz MFP_CFG_OUT(GPIO11, AF1, DRIVE_LOW)
23#define GPIO71_3_6MHz MFP_CFG_OUT(GPIO71, AF1, DRIVE_LOW)
24#define GPIO12_32KHz MFP_CFG_OUT(GPIO12, AF1, DRIVE_LOW)
25#define GPIO72_32kHz MFP_CFG_OUT(GPIO72, AF1, DRIVE_LOW)
26
27/* SDRAM and Static Memory I/O Signals */
28#define GPIO15_nCS_1 MFP_CFG_OUT(GPIO15, AF2, DRIVE_HIGH)
29#define GPIO78_nCS_2 MFP_CFG_OUT(GPIO78, AF2, DRIVE_HIGH)
30#define GPIO79_nCS_3 MFP_CFG_OUT(GPIO79, AF2, DRIVE_HIGH)
31#define GPIO80_nCS_4 MFP_CFG_OUT(GPIO80, AF2, DRIVE_HIGH)
32#define GPIO33_nCS_5 MFP_CFG_OUT(GPIO33, AF2, DRIVE_HIGH)
33
34/* Miscellaneous I/O and DMA Signals */
35#define GPIO18_RDY MFP_CFG_IN(GPIO18, AF1)
36#define GPIO20_DREQ_0 MFP_CFG_IN(GPIO20, AF1)
37#define GPIO19_DREQ_1 MFP_CFG_IN(GPIO19, AF1)
38
39/* Alternate Bus Master Mode I/O Signals */
40#define GPIO13_MBGNT MFP_CFG_OUT(GPIO13, AF2, DRIVE_LOW)
41#define GPIO73_MBGNT MFP_CFG_OUT(GPIO73, AF1, DRIVE_LOW)
42#define GPIO14_MBREQ MFP_CFG_IN(GPIO14, AF1)
43#define GPIO66_MBREQ MFP_CFG_IN(GPIO66, AF1)
44
45/* PC CARD */
46#define GPIO52_nPCE_1 MFP_CFG_OUT(GPIO52, AF2, DRIVE_HIGH)
47#define GPIO53_nPCE_2 MFP_CFG_OUT(GPIO53, AF2, DRIVE_HIGH)
48#define GPIO55_nPREG MFP_CFG_OUT(GPIO55, AF2, DRIVE_HIGH)
49#define GPIO50_nPIOR MFP_CFG_OUT(GPIO50, AF2, DRIVE_HIGH)
50#define GPIO51_nPIOW MFP_CFG_OUT(GPIO51, AF2, DRIVE_HIGH)
51#define GPIO49_nPWE MFP_CFG_OUT(GPIO49, AF2, DRIVE_HIGH)
52#define GPIO48_nPOE MFP_CFG_OUT(GPIO48, AF2, DRIVE_HIGH)
53#define GPIO57_nIOIS16 MFP_CFG_IN(GPIO57, AF1)
54#define GPIO56_nPWAIT MFP_CFG_IN(GPIO56, AF1)
55#define GPIO54_nPSKTSEL MFP_CFG_OUT(GPIO54, AF2, DRIVE_HIGH)
56
57/* FFUART */
58#define GPIO34_FFUART_RXD MFP_CFG_IN(GPIO34, AF1)
59#define GPIO35_FFUART_CTS MFP_CFG_IN(GPIO35, AF1)
60#define GPIO36_FFUART_DCD MFP_CFG_IN(GPIO36, AF1)
61#define GPIO37_FFUART_DSR MFP_CFG_IN(GPIO37, AF1)
62#define GPIO38_FFUART_RI MFP_CFG_IN(GPIO38, AF1)
63#define GPIO39_FFUART_TXD MFP_CFG_OUT(GPIO39, AF2, DRIVE_HIGH)
64#define GPIO40_FFUART_DTR MFP_CFG_OUT(GPIO40, AF2, DRIVE_HIGH)
65#define GPIO41_FFUART_RTS MFP_CFG_OUT(GPIO41, AF2, DRIVE_HIGH)
66
67/* BTUART */
68#define GPIO42_BTUART_RXD MFP_CFG_IN(GPIO42, AF1)
69#define GPIO43_BTUART_TXD MFP_CFG_OUT(GPIO43, AF2, DRIVE_HIGH)
70#define GPIO44_BTUART_CTS MFP_CFG_IN(GPIO44, AF1)
71#define GPIO45_BTUART_RTS MFP_CFG_OUT(GPIO45, AF2, DRIVE_HIGH)
72
73/* STUART */
74#define GPIO46_STUART_RXD MFP_CFG_IN(GPIO46, AF2)
75#define GPIO47_STUART_TXD MFP_CFG_OUT(GPIO47, AF1, DRIVE_HIGH)
76
77/* HWUART */
78#define GPIO42_HWUART_RXD MFP_CFG_IN(GPIO42, AF3)
79#define GPIO43_HWUART_TXD MFP_CFG_OUT(GPIO43, AF3, DRIVE_HIGH)
80#define GPIO44_HWUART_CTS MFP_CFG_IN(GPIO44, AF3)
81#define GPIO45_HWUART_RTS MFP_CFG_OUT(GPIO45, AF3, DRIVE_HIGH)
82#define GPIO48_HWUART_TXD MFP_CFG_OUT(GPIO48, AF1, DRIVE_HIGH)
83#define GPIO49_HWUART_RXD MFP_CFG_IN(GPIO49, AF1)
84#define GPIO50_HWUART_CTS MFP_CFG_IN(GPIO50, AF1)
85#define GPIO51_HWUART_RTS MFP_CFG_OUT(GPIO51, AF1, DRIVE_HIGH)
86
87/* FICP */
88#define GPIO46_FICP_RXD MFP_CFG_IN(GPIO46, AF1)
89#define GPIO47_FICP_TXD MFP_CFG_OUT(GPIO47, AF2, DRIVE_HIGH)
90
91/* PWM 0/1 */
92#define GPIO16_PWM0_OUT MFP_CFG_OUT(GPIO16, AF2, DRIVE_LOW)
93#define GPIO17_PWM1_OUT MFP_CFG_OUT(GPIO17, AF2, DRIVE_LOW)
94
95/* AC97 */
96#define GPIO28_AC97_BITCLK MFP_CFG_IN(GPIO28, AF1)
97#define GPIO29_AC97_SDATA_IN_0 MFP_CFG_IN(GPIO29, AF1)
98#define GPIO30_AC97_SDATA_OUT MFP_CFG_OUT(GPIO30, AF2, DRIVE_LOW)
99#define GPIO31_AC97_SYNC MFP_CFG_OUT(GPIO31, AF2, DRIVE_LOW)
100#define GPIO32_AC97_SDATA_IN_1 MFP_CFG_IN(GPIO32, AF1)
101
102/* I2S */
103#define GPIO28_I2S_BITCLK_IN MFP_CFG_IN(GPIO28, AF2)
104#define GPIO28_I2S_BITCLK_OUT MFP_CFG_OUT(GPIO28, AF1, DRIVE_LOW)
105#define GPIO29_I2S_SDATA_IN MFP_CFG_IN(GPIO29, AF2)
106#define GPIO30_I2S_SDATA_OUT MFP_CFG_OUT(GPIO30, AF1, DRIVE_LOW)
107#define GPIO31_I2S_SYNC MFP_CFG_OUT(GPIO31, AF1, DRIVE_LOW)
108#define GPIO32_I2S_SYSCLK MFP_CFG_OUT(GPIO32, AF1, DRIVE_LOW)
109
110/* SSP 1 */
111#define GPIO23_SSP1_SCLK MFP_CFG_OUT(GPIO23, AF2, DRIVE_LOW)
112#define GPIO24_SSP1_SFRM MFP_CFG_OUT(GPIO24, AF2, DRIVE_LOW)
113#define GPIO25_SSP1_TXD MFP_CFG_OUT(GPIO25, AF2, DRIVE_LOW)
114#define GPIO26_SSP1_RXD MFP_CFG_IN(GPIO26, AF1)
115#define GPIO27_SSP1_EXTCLK MFP_CFG_IN(GPIO27, AF1)
116
117/* SSP 2 - NSSP */
118#define GPIO81_SSP2_CLK_OUT MFP_CFG_OUT(GPIO81, AF1, DRIVE_LOW)
119#define GPIO81_SSP2_CLK_IN MFP_CFG_IN(GPIO81, AF1)
120#define GPIO82_SSP2_FRM_OUT MFP_CFG_OUT(GPIO82, AF1, DRIVE_LOW)
121#define GPIO82_SSP2_FRM_IN MFP_CFG_IN(GPIO82, AF1)
122#define GPIO83_SSP2_TXD MFP_CFG_OUT(GPIO83, AF1, DRIVE_LOW)
123#define GPIO83_SSP2_RXD MFP_CFG_IN(GPIO83, AF2)
124#define GPIO84_SSP2_TXD MFP_CFG_OUT(GPIO84, AF1, DRIVE_LOW)
125#define GPIO84_SSP2_RXD MFP_CFG_IN(GPIO84, AF2)
126
127/* MMC */
128#define GPIO6_MMC_CLK MFP_CFG_OUT(GPIO6, AF1, DRIVE_LOW)
129#define GPIO8_MMC_CS0 MFP_CFG_OUT(GPIO8, AF1, DRIVE_LOW)
130#define GPIO9_MMC_CS1 MFP_CFG_OUT(GPIO9, AF1, DRIVE_LOW)
131#define GPIO34_MMC_CS0 MFP_CFG_OUT(GPIO34, AF2, DRIVE_LOW)
132#define GPIO39_MMC_CS1 MFP_CFG_OUT(GPIO39, AF1, DRIVE_LOW)
133#define GPIO53_MMC_CLK MFP_CFG_OUT(GPIO53, AF1, DRIVE_LOW)
134#define GPIO54_MMC_CLK MFP_CFG_OUT(GPIO54, AF1, DRIVE_LOW)
135#define GPIO69_MMC_CLK MFP_CFG_OUT(GPIO69, AF1, DRIVE_LOW)
136#define GPIO67_MMC_CS0 MFP_CFG_OUT(GPIO67, AF1, DRIVE_LOW)
137#define GPIO68_MMC_CS1 MFP_CFG_OUT(GPIO68, AF1, DRIVE_LOW)
138
139/* LCD */
140#define GPIO58_LCD_LDD_0 MFP_CFG_OUT(GPIO58, AF2, DRIVE_LOW)
141#define GPIO59_LCD_LDD_1 MFP_CFG_OUT(GPIO59, AF2, DRIVE_LOW)
142#define GPIO60_LCD_LDD_2 MFP_CFG_OUT(GPIO60, AF2, DRIVE_LOW)
143#define GPIO61_LCD_LDD_3 MFP_CFG_OUT(GPIO61, AF2, DRIVE_LOW)
144#define GPIO62_LCD_LDD_4 MFP_CFG_OUT(GPIO62, AF2, DRIVE_LOW)
145#define GPIO63_LCD_LDD_5 MFP_CFG_OUT(GPIO63, AF2, DRIVE_LOW)
146#define GPIO64_LCD_LDD_6 MFP_CFG_OUT(GPIO64, AF2, DRIVE_LOW)
147#define GPIO65_LCD_LDD_7 MFP_CFG_OUT(GPIO65, AF2, DRIVE_LOW)
148#define GPIO66_LCD_LDD_8 MFP_CFG_OUT(GPIO66, AF2, DRIVE_LOW)
149#define GPIO67_LCD_LDD_9 MFP_CFG_OUT(GPIO67, AF2, DRIVE_LOW)
150#define GPIO68_LCD_LDD_10 MFP_CFG_OUT(GPIO68, AF2, DRIVE_LOW)
151#define GPIO69_LCD_LDD_11 MFP_CFG_OUT(GPIO69, AF2, DRIVE_LOW)
152#define GPIO70_LCD_LDD_12 MFP_CFG_OUT(GPIO70, AF2, DRIVE_LOW)
153#define GPIO71_LCD_LDD_13 MFP_CFG_OUT(GPIO71, AF2, DRIVE_LOW)
154#define GPIO72_LCD_LDD_14 MFP_CFG_OUT(GPIO72, AF2, DRIVE_LOW)
155#define GPIO73_LCD_LDD_15 MFP_CFG_OUT(GPIO73, AF2, DRIVE_LOW)
156#define GPIO74_LCD_FCLK MFP_CFG_OUT(GPIO74, AF2, DRIVE_LOW)
157#define GPIO75_LCD_LCLK MFP_CFG_OUT(GPIO75, AF2, DRIVE_LOW)
158#define GPIO76_LCD_PCLK MFP_CFG_OUT(GPIO76, AF2, DRIVE_LOW)
159#define GPIO77_LCD_ACBIAS MFP_CFG_OUT(GPIO77, AF2, DRIVE_LOW)
160
161#endif /* __ASM_ARCH_MFP_PXA25X_H */
diff --git a/arch/arm/mach-pxa/include/mach/mfp-pxa27x.h b/arch/arm/mach-pxa/include/mach/mfp-pxa27x.h
new file mode 100644
index 000000000000..122bdbd53182
--- /dev/null
+++ b/arch/arm/mach-pxa/include/mach/mfp-pxa27x.h
@@ -0,0 +1,433 @@
1#ifndef __ASM_ARCH_MFP_PXA27X_H
2#define __ASM_ARCH_MFP_PXA27X_H
3
4/*
5 * NOTE: for those special-function bidirectional GPIOs, as described
6 * in the "PXA27x Developer's Manual" Section 24.4.2.1, only its input
7 * alternative is preserved, the direction is actually selected by the
8 * specific controller, and this should work in most cases.
9 */
10
11#include <mach/mfp.h>
12#include <mach/mfp-pxa2xx.h>
13
14/* GPIO */
15#define GPIO85_GPIO MFP_CFG_IN(GPIO85, AF0)
16#define GPIO86_GPIO MFP_CFG_IN(GPIO86, AF0)
17#define GPIO87_GPIO MFP_CFG_IN(GPIO87, AF0)
18#define GPIO88_GPIO MFP_CFG_IN(GPIO88, AF0)
19#define GPIO89_GPIO MFP_CFG_IN(GPIO89, AF0)
20#define GPIO90_GPIO MFP_CFG_IN(GPIO90, AF0)
21#define GPIO91_GPIO MFP_CFG_IN(GPIO91, AF0)
22#define GPIO92_GPIO MFP_CFG_IN(GPIO92, AF0)
23#define GPIO93_GPIO MFP_CFG_IN(GPIO93, AF0)
24#define GPIO94_GPIO MFP_CFG_IN(GPIO94, AF0)
25#define GPIO95_GPIO MFP_CFG_IN(GPIO95, AF0)
26#define GPIO96_GPIO MFP_CFG_IN(GPIO96, AF0)
27#define GPIO97_GPIO MFP_CFG_IN(GPIO97, AF0)
28#define GPIO98_GPIO MFP_CFG_IN(GPIO98, AF0)
29#define GPIO99_GPIO MFP_CFG_IN(GPIO99, AF0)
30#define GPIO100_GPIO MFP_CFG_IN(GPIO100, AF0)
31#define GPIO101_GPIO MFP_CFG_IN(GPIO101, AF0)
32#define GPIO102_GPIO MFP_CFG_IN(GPIO102, AF0)
33#define GPIO103_GPIO MFP_CFG_IN(GPIO103, AF0)
34#define GPIO104_GPIO MFP_CFG_IN(GPIO104, AF0)
35#define GPIO105_GPIO MFP_CFG_IN(GPIO105, AF0)
36#define GPIO106_GPIO MFP_CFG_IN(GPIO106, AF0)
37#define GPIO107_GPIO MFP_CFG_IN(GPIO107, AF0)
38#define GPIO108_GPIO MFP_CFG_IN(GPIO108, AF0)
39#define GPIO109_GPIO MFP_CFG_IN(GPIO109, AF0)
40#define GPIO110_GPIO MFP_CFG_IN(GPIO110, AF0)
41#define GPIO111_GPIO MFP_CFG_IN(GPIO111, AF0)
42#define GPIO112_GPIO MFP_CFG_IN(GPIO112, AF0)
43#define GPIO113_GPIO MFP_CFG_IN(GPIO113, AF0)
44#define GPIO114_GPIO MFP_CFG_IN(GPIO114, AF0)
45#define GPIO115_GPIO MFP_CFG_IN(GPIO115, AF0)
46#define GPIO116_GPIO MFP_CFG_IN(GPIO116, AF0)
47#define GPIO117_GPIO MFP_CFG_IN(GPIO117, AF0)
48#define GPIO118_GPIO MFP_CFG_IN(GPIO118, AF0)
49#define GPIO119_GPIO MFP_CFG_IN(GPIO119, AF0)
50#define GPIO120_GPIO MFP_CFG_IN(GPIO120, AF0)
51
52/* Crystal and Clock Signals */
53#define GPIO9_HZ_CLK MFP_CFG_OUT(GPIO9, AF1, DRIVE_LOW)
54#define GPIO10_HZ_CLK MFP_CFG_OUT(GPIO10, AF1, DRIVE_LOW)
55#define GPIO11_48_MHz MFP_CFG_OUT(GPIO11, AF3, DRIVE_LOW)
56#define GPIO12_48_MHz MFP_CFG_OUT(GPIO12, AF3, DRIVE_LOW)
57#define GPIO13_CLK_EXT MFP_CFG_IN(GPIO13, AF1)
58
59/* OS Timer Signals */
60#define GPIO11_EXT_SYNC_0 MFP_CFG_IN(GPIO11, AF1)
61#define GPIO12_EXT_SYNC_1 MFP_CFG_IN(GPIO12, AF1)
62#define GPIO9_CHOUT_0 MFP_CFG_OUT(GPIO9, AF3, DRIVE_LOW)
63#define GPIO10_CHOUT_1 MFP_CFG_OUT(GPIO10, AF3, DRIVE_LOW)
64#define GPIO11_CHOUT_0 MFP_CFG_OUT(GPIO11, AF1, DRIVE_LOW)
65#define GPIO12_CHOUT_1 MFP_CFG_OUT(GPIO12, AF1, DRIVE_LOW)
66
67/* SDRAM and Static Memory I/O Signals */
68#define GPIO20_nSDCS_2 MFP_CFG_OUT(GPIO20, AF1, DRIVE_HIGH)
69#define GPIO21_nSDCS_3 MFP_CFG_OUT(GPIO21, AF1, DRIVE_HIGH)
70#define GPIO15_nCS_1 MFP_CFG_OUT(GPIO15, AF2, DRIVE_HIGH)
71#define GPIO78_nCS_2 MFP_CFG_OUT(GPIO78, AF2, DRIVE_HIGH)
72#define GPIO79_nCS_3 MFP_CFG_OUT(GPIO79, AF2, DRIVE_HIGH)
73#define GPIO80_nCS_4 MFP_CFG_OUT(GPIO80, AF2, DRIVE_HIGH)
74#define GPIO33_nCS_5 MFP_CFG_OUT(GPIO33, AF2, DRIVE_HIGH)
75
76/* Miscellaneous I/O and DMA Signals */
77#define GPIO21_DVAL_0 MFP_CFG_OUT(GPIO21, AF2, DRIVE_HIGH)
78#define GPIO116_DVAL_0 MFP_CFG_OUT(GPIO116, AF1, DRIVE_HIGH)
79#define GPIO33_DVAL_1 MFP_CFG_OUT(GPIO33, AF1, DRIVE_HIGH)
80#define GPIO96_DVAL_1 MFP_CFG_OUT(GPIO96, AF2, DRIVE_HIGH)
81#define GPIO18_RDY MFP_CFG_IN(GPIO18, AF1)
82#define GPIO20_DREQ_0 MFP_CFG_IN(GPIO20, AF1)
83#define GPIO115_DREQ_0 MFP_CFG_IN(GPIO115, AF1)
84#define GPIO80_DREQ_1 MFP_CFG_IN(GPIO80, AF1)
85#define GPIO97_DREQ_1 MFP_CFG_IN(GPIO97, AF2)
86#define GPIO85_DREQ_2 MFP_CFG_IN(GPIO85, AF2)
87#define GPIO100_DREQ_2 MFP_CFG_IN(GPIO100, AF2)
88
89/* Alternate Bus Master Mode I/O Signals */
90#define GPIO20_MBREQ MFP_CFG_IN(GPIO20, AF2)
91#define GPIO80_MBREQ MFP_CFG_IN(GPIO80, AF2)
92#define GPIO96_MBREQ MFP_CFG_IN(GPIO96, AF2)
93#define GPIO115_MBREQ MFP_CFG_IN(GPIO115, AF3)
94#define GPIO21_MBGNT MFP_CFG_OUT(GPIO21, AF3, DRIVE_LOW)
95#define GPIO33_MBGNT MFP_CFG_OUT(GPIO33, AF3, DRIVE_LOW)
96#define GPIO97_MBGNT MFP_CFG_OUT(GPIO97, AF2, DRIVE_LOW)
97#define GPIO116_MBGNT MFP_CFG_OUT(GPIO116, AF3, DRIVE_LOW)
98
99/* PC CARD */
100#define GPIO15_nPCE_1 MFP_CFG_OUT(GPIO15, AF1, DRIVE_HIGH)
101#define GPIO85_nPCE_1 MFP_CFG_OUT(GPIO85, AF1, DRIVE_HIGH)
102#define GPIO86_nPCE_1 MFP_CFG_OUT(GPIO86, AF1, DRIVE_HIGH)
103#define GPIO102_nPCE_1 MFP_CFG_OUT(GPIO102, AF1, DRIVE_HIGH)
104#define GPIO54_nPCE_2 MFP_CFG_OUT(GPIO54, AF2, DRIVE_HIGH)
105#define GPIO78_nPCE_2 MFP_CFG_OUT(GPIO78, AF1, DRIVE_HIGH)
106#define GPIO87_nPCE_2 MFP_CFG_IN(GPIO87, AF1)
107#define GPIO55_nPREG MFP_CFG_OUT(GPIO55, AF2, DRIVE_HIGH)
108#define GPIO50_nPIOR MFP_CFG_OUT(GPIO50, AF2, DRIVE_HIGH)
109#define GPIO51_nPIOW MFP_CFG_OUT(GPIO51, AF2, DRIVE_HIGH)
110#define GPIO49_nPWE MFP_CFG_OUT(GPIO49, AF2, DRIVE_HIGH)
111#define GPIO48_nPOE MFP_CFG_OUT(GPIO48, AF2, DRIVE_HIGH)
112#define GPIO57_nIOIS16 MFP_CFG_IN(GPIO57, AF1)
113#define GPIO56_nPWAIT MFP_CFG_IN(GPIO56, AF1)
114#define GPIO79_PSKTSEL MFP_CFG_OUT(GPIO79, AF1, DRIVE_HIGH)
115#define GPIO104_PSKTSEL MFP_CFG_OUT(GPIO104, AF1, DRIVE_HIGH)
116
117/* I2C */
118#define GPIO117_I2C_SCL MFP_CFG_IN(GPIO117, AF1)
119#define GPIO118_I2C_SDA MFP_CFG_IN(GPIO118, AF1)
120
121/* FFUART */
122#define GPIO9_FFUART_CTS MFP_CFG_IN(GPIO9, AF3)
123#define GPIO26_FFUART_CTS MFP_CFG_IN(GPIO26, AF3)
124#define GPIO35_FFUART_CTS MFP_CFG_IN(GPIO35, AF1)
125#define GPIO100_FFUART_CTS MFP_CFG_IN(GPIO100, AF3)
126#define GPIO10_FFUART_DCD MFP_CFG_IN(GPIO10, AF1)
127#define GPIO36_FFUART_DCD MFP_CFG_IN(GPIO36, AF1)
128#define GPIO33_FFUART_DSR MFP_CFG_IN(GPIO33, AF2)
129#define GPIO37_FFUART_DSR MFP_CFG_IN(GPIO37, AF1)
130#define GPIO38_FFUART_RI MFP_CFG_IN(GPIO38, AF1)
131#define GPIO89_FFUART_RI MFP_CFG_IN(GPIO89, AF3)
132#define GPIO19_FFUART_RXD MFP_CFG_IN(GPIO19, AF3)
133#define GPIO33_FFUART_RXD MFP_CFG_IN(GPIO33, AF1)
134#define GPIO34_FFUART_RXD MFP_CFG_IN(GPIO34, AF1)
135#define GPIO41_FFUART_RXD MFP_CFG_IN(GPIO41, AF1)
136#define GPIO53_FFUART_RXD MFP_CFG_IN(GPIO53, AF1)
137#define GPIO85_FFUART_RXD MFP_CFG_IN(GPIO85, AF1)
138#define GPIO96_FFUART_RXD MFP_CFG_IN(GPIO96, AF3)
139#define GPIO102_FFUART_RXD MFP_CFG_IN(GPIO102, AF3)
140#define GPIO16_FFUART_TXD MFP_CFG_OUT(GPIO16, AF3, DRIVE_HIGH)
141#define GPIO37_FFUART_TXD MFP_CFG_OUT(GPIO37, AF3, DRIVE_HIGH)
142#define GPIO39_FFUART_TXD MFP_CFG_OUT(GPIO39, AF2, DRIVE_HIGH)
143#define GPIO83_FFUART_TXD MFP_CFG_OUT(GPIO83, AF2, DRIVE_HIGH)
144#define GPIO99_FFUART_TXD MFP_CFG_OUT(GPIO99, AF3, DRIVE_HIGH)
145#define GPIO27_FFUART_RTS MFP_CFG_OUT(GPIO27, AF3, DRIVE_HIGH)
146#define GPIO41_FFUART_RTS MFP_CFG_OUT(GPIO41, AF2, DRIVE_HIGH)
147#define GPIO83_FFUART_RTS MFP_CFG_OUT(GPIO83, AF3, DRIVE_HIGH)
148#define GPIO98_FFUART_RTS MFP_CFG_OUT(GPIO98, AF3, DRIVE_HIGH)
149#define GPIO40_FFUART_DTR MFP_CFG_OUT(GPIO40, AF2, DRIVE_HIGH)
150#define GPIO82_FFUART_DTR MFP_CFG_OUT(GPIO82, AF3, DRIVE_HIGH)
151
152/* BTUART */
153#define GPIO44_BTUART_CTS MFP_CFG_IN(GPIO44, AF1)
154#define GPIO42_BTUART_RXD MFP_CFG_IN(GPIO42, AF1)
155#define GPIO45_BTUART_RTS MFP_CFG_OUT(GPIO45, AF2, DRIVE_HIGH)
156#define GPIO43_BTUART_TXD MFP_CFG_OUT(GPIO43, AF2, DRIVE_HIGH)
157
158/* STUART */
159#define GPIO46_STUART_RXD MFP_CFG_IN(GPIO46, AF2)
160#define GPIO47_STUART_TXD MFP_CFG_OUT(GPIO47, AF1, DRIVE_HIGH)
161
162/* FICP */
163#define GPIO42_FICP_RXD MFP_CFG_IN(GPIO42, AF2)
164#define GPIO46_FICP_RXD MFP_CFG_IN(GPIO46, AF1)
165#define GPIO43_FICP_TXD MFP_CFG_OUT(GPIO43, AF1, DRIVE_HIGH)
166#define GPIO47_FICP_TXD MFP_CFG_OUT(GPIO47, AF2, DRIVE_HIGH)
167
168/* PWM 0/1/2/3 */
169#define GPIO11_PWM2_OUT MFP_CFG_OUT(GPIO11, AF2, DRIVE_LOW)
170#define GPIO12_PWM3_OUT MFP_CFG_OUT(GPIO12, AF2, DRIVE_LOW)
171#define GPIO16_PWM0_OUT MFP_CFG_OUT(GPIO16, AF2, DRIVE_LOW)
172#define GPIO17_PWM1_OUT MFP_CFG_OUT(GPIO17, AF2, DRIVE_LOW)
173#define GPIO38_PWM1_OUT MFP_CFG_OUT(GPIO38, AF3, DRIVE_LOW)
174#define GPIO46_PWM2_OUT MFP_CFG_OUT(GPIO46, AF2, DRIVE_LOW)
175#define GPIO47_PWM3_OUT MFP_CFG_OUT(GPIO47, AF3, DRIVE_LOW)
176#define GPIO79_PWM2_OUT MFP_CFG_OUT(GPIO79, AF3, DRIVE_LOW)
177#define GPIO80_PWM3_OUT MFP_CFG_OUT(GPIO80, AF3, DRIVE_LOW)
178#define GPIO115_PWM1_OUT MFP_CFG_OUT(GPIO115, AF3, DRIVE_LOW)
179
180/* AC97 */
181#define GPIO31_AC97_SYNC MFP_CFG_OUT(GPIO31, AF2, DRIVE_LOW)
182#define GPIO94_AC97_SYNC MFP_CFG_OUT(GPIO94, AF1, DRIVE_LOW)
183#define GPIO30_AC97_SDATA_OUT MFP_CFG_OUT(GPIO30, AF2, DRIVE_LOW)
184#define GPIO93_AC97_SDATA_OUT MFP_CFG_OUT(GPIO93, AF1, DRIVE_LOW)
185#define GPIO45_AC97_SYSCLK MFP_CFG_OUT(GPIO45, AF1, DRIVE_LOW)
186#define GPIO89_AC97_SYSCLK MFP_CFG_OUT(GPIO89, AF1, DRIVE_LOW)
187#define GPIO98_AC97_SYSCLK MFP_CFG_OUT(GPIO98, AF1, DRIVE_LOW)
188#define GPIO95_AC97_nRESET MFP_CFG_OUT(GPIO95, AF1, DRIVE_LOW)
189#define GPIO113_AC97_nRESET MFP_CFG_OUT(GPIO113, AF2, DRIVE_LOW)
190#define GPIO28_AC97_BITCLK MFP_CFG_IN(GPIO28, AF1)
191#define GPIO29_AC97_SDATA_IN_0 MFP_CFG_IN(GPIO29, AF1)
192#define GPIO116_AC97_SDATA_IN_0 MFP_CFG_IN(GPIO116, AF2)
193#define GPIO99_AC97_SDATA_IN_1 MFP_CFG_IN(GPIO99, AF2)
194
195/* I2S */
196#define GPIO28_I2S_BITCLK_IN MFP_CFG_IN(GPIO28, AF2)
197#define GPIO28_I2S_BITCLK_OUT MFP_CFG_OUT(GPIO28, AF1, DRIVE_LOW)
198#define GPIO29_I2S_SDATA_IN MFP_CFG_IN(GPIO29, AF2)
199#define GPIO30_I2S_SDATA_OUT MFP_CFG_OUT(GPIO30, AF1, DRIVE_LOW)
200#define GPIO31_I2S_SYNC MFP_CFG_OUT(GPIO31, AF1, DRIVE_LOW)
201#define GPIO113_I2S_SYSCLK MFP_CFG_OUT(GPIO113, AF1, DRIVE_LOW)
202
203/* SSP 1 */
204#define GPIO23_SSP1_SCLK MFP_CFG_OUT(GPIO23, AF2, DRIVE_LOW)
205#define GPIO29_SSP1_SCLK MFP_CFG_IN(GPIO29, AF3)
206#define GPIO27_SSP1_SYSCLK MFP_CFG_OUT(GPIO27, AF1, DRIVE_LOW)
207#define GPIO53_SSP1_SYSCLK MFP_CFG_OUT(GPIO53, AF3, DRIVE_LOW)
208#define GPIO24_SSP1_SFRM MFP_CFG_IN(GPIO24, AF2)
209#define GPIO28_SSP1_SFRM MFP_CFG_IN(GPIO28, AF3)
210#define GPIO25_SSP1_TXD MFP_CFG_OUT(GPIO25, AF2, DRIVE_LOW)
211#define GPIO57_SSP1_TXD MFP_CFG_OUT(GPIO57, AF3, DRIVE_LOW)
212#define GPIO26_SSP1_RXD MFP_CFG_IN(GPIO26, AF1)
213#define GPIO27_SSP1_SCLKEN MFP_CFG_IN(GPIO27, AF2)
214
215/* SSP 2 */
216#define GPIO19_SSP2_SCLK MFP_CFG_IN(GPIO19, AF1)
217#define GPIO22_SSP2_SCLK MFP_CFG_IN(GPIO22, AF3)
218#define GPIO29_SSP2_SCLK MFP_CFG_OUT(GPIO29, AF3, DRIVE_LOW)
219#define GPIO36_SSP2_SCLK MFP_CFG_IN(GPIO36, AF2)
220#define GPIO50_SSP2_SCLK MFP_CFG_IN(GPIO50, AF3)
221#define GPIO22_SSP2_SYSCLK MFP_CFG_OUT(GPIO22, AF2, DRIVE_LOW)
222#define GPIO14_SSP2_SFRM MFP_CFG_IN(GPIO14, AF2)
223#define GPIO37_SSP2_SFRM MFP_CFG_IN(GPIO37, AF2)
224#define GPIO87_SSP2_SFRM MFP_CFG_OUT(GPIO87, AF3, DRIVE_LOW)
225#define GPIO88_SSP2_SFRM MFP_CFG_IN(GPIO88, AF3)
226#define GPIO13_SSP2_TXD MFP_CFG_OUT(GPIO13, AF1, DRIVE_LOW)
227#define GPIO38_SSP2_TXD MFP_CFG_OUT(GPIO38, AF2, DRIVE_LOW)
228#define GPIO87_SSP2_TXD MFP_CFG_OUT(GPIO87, AF1, DRIVE_LOW)
229#define GPIO89_SSP2_TXD MFP_CFG_OUT(GPIO89, AF3, DRIVE_LOW)
230#define GPIO11_SSP2_RXD MFP_CFG_IN(GPIO11, AF2)
231#define GPIO29_SSP2_RXD MFP_CFG_OUT(GPIO29, AF1, DRIVE_LOW)
232#define GPIO40_SSP2_RXD MFP_CFG_IN(GPIO40, AF1)
233#define GPIO86_SSP2_RXD MFP_CFG_IN(GPIO86, AF1)
234#define GPIO88_SSP2_RXD MFP_CFG_IN(GPIO88, AF2)
235#define GPIO22_SSP2_EXTCLK MFP_CFG_IN(GPIO22, AF1)
236#define GPIO27_SSP2_EXTCLK MFP_CFG_IN(GPIO27, AF1)
237#define GPIO22_SSP2_SCLKEN MFP_CFG_IN(GPIO22, AF2)
238#define GPIO23_SSP2_SCLKEN MFP_CFG_IN(GPIO23, AF2)
239
240/* SSP 3 */
241#define GPIO34_SSP3_SCLK MFP_CFG_IN(GPIO34, AF3)
242#define GPIO40_SSP3_SCLK MFP_CFG_OUT(GPIO40, AF3, DRIVE_LOW)
243#define GPIO52_SSP3_SCLK MFP_CFG_IN(GPIO52, AF2)
244#define GPIO84_SSP3_SCLK MFP_CFG_IN(GPIO84, AF1)
245#define GPIO45_SSP3_SYSCLK MFP_CFG_OUT(GPIO45, AF3, DRIVE_LOW)
246#define GPIO35_SSP3_SFRM MFP_CFG_IN(GPIO35, AF3)
247#define GPIO39_SSP3_SFRM MFP_CFG_IN(GPIO39, AF3)
248#define GPIO83_SSP3_SFRM MFP_CFG_IN(GPIO83, AF1)
249#define GPIO35_SSP3_TXD MFP_CFG_OUT(GPIO35, AF3, DRIVE_LOW)
250#define GPIO38_SSP3_TXD MFP_CFG_OUT(GPIO38, AF1, DRIVE_LOW)
251#define GPIO81_SSP3_TXD MFP_CFG_OUT(GPIO81, AF1, DRIVE_LOW)
252#define GPIO41_SSP3_RXD MFP_CFG_IN(GPIO41, AF3)
253#define GPIO82_SSP3_RXD MFP_CFG_IN(GPIO82, AF1)
254#define GPIO89_SSP3_RXD MFP_CFG_IN(GPIO89, AF1)
255
256/* MMC */
257#define GPIO32_MMC_CLK MFP_CFG_OUT(GPIO32, AF2, DRIVE_LOW)
258#define GPIO92_MMC_DAT_0 MFP_CFG_IN(GPIO92, AF1)
259#define GPIO109_MMC_DAT_1 MFP_CFG_IN(GPIO109, AF1)
260#define GPIO110_MMC_DAT_2 MFP_CFG_IN(GPIO110, AF1)
261#define GPIO111_MMC_DAT_3 MFP_CFG_IN(GPIO111, AF1)
262#define GPIO112_MMC_CMD MFP_CFG_IN(GPIO112, AF1)
263
264/* LCD */
265#define GPIO58_LCD_LDD_0 MFP_CFG_OUT(GPIO58, AF2, DRIVE_LOW)
266#define GPIO59_LCD_LDD_1 MFP_CFG_OUT(GPIO59, AF2, DRIVE_LOW)
267#define GPIO60_LCD_LDD_2 MFP_CFG_OUT(GPIO60, AF2, DRIVE_LOW)
268#define GPIO61_LCD_LDD_3 MFP_CFG_OUT(GPIO61, AF2, DRIVE_LOW)
269#define GPIO62_LCD_LDD_4 MFP_CFG_OUT(GPIO62, AF2, DRIVE_LOW)
270#define GPIO63_LCD_LDD_5 MFP_CFG_OUT(GPIO63, AF2, DRIVE_LOW)
271#define GPIO64_LCD_LDD_6 MFP_CFG_OUT(GPIO64, AF2, DRIVE_LOW)
272#define GPIO65_LCD_LDD_7 MFP_CFG_OUT(GPIO65, AF2, DRIVE_LOW)
273#define GPIO66_LCD_LDD_8 MFP_CFG_OUT(GPIO66, AF2, DRIVE_LOW)
274#define GPIO67_LCD_LDD_9 MFP_CFG_OUT(GPIO67, AF2, DRIVE_LOW)
275#define GPIO68_LCD_LDD_10 MFP_CFG_OUT(GPIO68, AF2, DRIVE_LOW)
276#define GPIO69_LCD_LDD_11 MFP_CFG_OUT(GPIO69, AF2, DRIVE_LOW)
277#define GPIO70_LCD_LDD_12 MFP_CFG_OUT(GPIO70, AF2, DRIVE_LOW)
278#define GPIO71_LCD_LDD_13 MFP_CFG_OUT(GPIO71, AF2, DRIVE_LOW)
279#define GPIO72_LCD_LDD_14 MFP_CFG_OUT(GPIO72, AF2, DRIVE_LOW)
280#define GPIO73_LCD_LDD_15 MFP_CFG_OUT(GPIO73, AF2, DRIVE_LOW)
281#define GPIO86_LCD_LDD_16 MFP_CFG_OUT(GPIO86, AF2, DRIVE_LOW)
282#define GPIO87_LCD_LDD_17 MFP_CFG_OUT(GPIO87, AF2, DRIVE_LOW)
283#define GPIO74_LCD_FCLK MFP_CFG_OUT(GPIO74, AF2, DRIVE_LOW)
284#define GPIO75_LCD_LCLK MFP_CFG_OUT(GPIO75, AF2, DRIVE_LOW)
285#define GPIO76_LCD_PCLK MFP_CFG_OUT(GPIO76, AF2, DRIVE_LOW)
286#define GPIO77_LCD_BIAS MFP_CFG_OUT(GPIO77, AF2, DRIVE_LOW)
287#define GPIO14_LCD_VSYNC MFP_CFG_IN(GPIO14, AF1)
288#define GPIO19_LCD_CS MFP_CFG_OUT(GPIO19, AF2, DRIVE_LOW)
289
290/* Keypad */
291#define GPIO93_KP_DKIN_0 MFP_CFG_IN(GPIO93, AF1)
292#define GPIO94_KP_DKIN_1 MFP_CFG_IN(GPIO94, AF1)
293#define GPIO95_KP_DKIN_2 MFP_CFG_IN(GPIO95, AF1)
294#define GPIO96_KP_DKIN_3 MFP_CFG_IN(GPIO96, AF1)
295#define GPIO97_KP_DKIN_4 MFP_CFG_IN(GPIO97, AF1)
296#define GPIO98_KP_DKIN_5 MFP_CFG_IN(GPIO98, AF1)
297#define GPIO99_KP_DKIN_6 MFP_CFG_IN(GPIO99, AF1)
298#define GPIO13_KP_KDIN_7 MFP_CFG_IN(GPIO13, AF2)
299#define GPIO100_KP_MKIN_0 MFP_CFG_IN(GPIO100, AF1)
300#define GPIO101_KP_MKIN_1 MFP_CFG_IN(GPIO101, AF1)
301#define GPIO102_KP_MKIN_2 MFP_CFG_IN(GPIO102, AF1)
302#define GPIO34_KP_MKIN_3 MFP_CFG_IN(GPIO34, AF2)
303#define GPIO37_KP_MKIN_3 MFP_CFG_IN(GPIO37, AF3)
304#define GPIO97_KP_MKIN_3 MFP_CFG_IN(GPIO97, AF3)
305#define GPIO98_KP_MKIN_4 MFP_CFG_IN(GPIO98, AF3)
306#define GPIO38_KP_MKIN_4 MFP_CFG_IN(GPIO38, AF2)
307#define GPIO39_KP_MKIN_4 MFP_CFG_IN(GPIO39, AF1)
308#define GPIO16_KP_MKIN_5 MFP_CFG_IN(GPIO16, AF1)
309#define GPIO90_KP_MKIN_5 MFP_CFG_IN(GPIO90, AF1)
310#define GPIO99_KP_MKIN_5 MFP_CFG_IN(GPIO99, AF3)
311#define GPIO17_KP_MKIN_6 MFP_CFG_IN(GPIO17, AF1)
312#define GPIO91_KP_MKIN_6 MFP_CFG_IN(GPIO91, AF1)
313#define GPIO95_KP_MKIN_6 MFP_CFG_IN(GPIO95, AF3)
314#define GPIO13_KP_MKIN_7 MFP_CFG_IN(GPIO13, AF3)
315#define GPIO36_KP_MKIN_7 MFP_CFG_IN(GPIO36, AF3)
316#define GPIO103_KP_MKOUT_0 MFP_CFG_OUT(GPIO103, AF2, DRIVE_HIGH)
317#define GPIO104_KP_MKOUT_1 MFP_CFG_OUT(GPIO104, AF2, DRIVE_HIGH)
318#define GPIO105_KP_MKOUT_2 MFP_CFG_OUT(GPIO105, AF2, DRIVE_HIGH)
319#define GPIO106_KP_MKOUT_3 MFP_CFG_OUT(GPIO106, AF2, DRIVE_HIGH)
320#define GPIO107_KP_MKOUT_4 MFP_CFG_OUT(GPIO107, AF2, DRIVE_HIGH)
321#define GPIO108_KP_MKOUT_5 MFP_CFG_OUT(GPIO108, AF2, DRIVE_HIGH)
322#define GPIO35_KP_MKOUT_6 MFP_CFG_OUT(GPIO35, AF2, DRIVE_HIGH)
323#define GPIO22_KP_MKOUT_7 MFP_CFG_OUT(GPIO22, AF1, DRIVE_HIGH)
324#define GPIO40_KP_MKOUT_6 MFP_CFG_OUT(GPIO40, AF1, DRIVE_HIGH)
325#define GPIO41_KP_MKOUT_7 MFP_CFG_OUT(GPIO41, AF1, DRIVE_HIGH)
326#define GPIO96_KP_MKOUT_6 MFP_CFG_OUT(GPIO96, AF3, DRIVE_HIGH)
327
328/* USB P3 */
329#define GPIO10_USB_P3_5 MFP_CFG_IN(GPIO10, AF3)
330#define GPIO11_USB_P3_1 MFP_CFG_IN(GPIO11, AF3)
331#define GPIO30_USB_P3_2 MFP_CFG_OUT(GPIO30, AF3, DRIVE_LOW)
332#define GPIO31_USB_P3_6 MFP_CFG_OUT(GPIO31, AF3, DRIVE_LOW)
333#define GPIO56_USB_P3_4 MFP_CFG_OUT(GPIO56, AF1, DRIVE_LOW)
334#define GPIO86_USB_P3_5 MFP_CFG_IN(GPIO86, AF3)
335#define GPIO87_USB_P3_1 MFP_CFG_IN(GPIO87, AF3)
336#define GPIO90_USB_P3_5 MFP_CFG_IN(GPIO90, AF2)
337#define GPIO91_USB_P3_1 MFP_CFG_IN(GPIO91, AF2)
338#define GPIO113_USB_P3_3 MFP_CFG_IN(GPIO113, AF3)
339
340/* USB P2 */
341#define GPIO34_USB_P2_2 MFP_CFG_OUT(GPIO34, AF1, DRIVE_LOW)
342#define GPIO35_USB_P2_1 MFP_CFG_IN(GPIO35, AF2)
343#define GPIO36_USB_P2_4 MFP_CFG_OUT(GPIO36, AF1, DRIVE_LOW)
344#define GPIO37_USB_P2_8 MFP_CFG_OUT(GPIO37, AF1, DRIVE_LOW)
345#define GPIO38_USB_P2_3 MFP_CFG_IN(GPIO38, AF3)
346#define GPIO39_USB_P2_6 MFP_CFG_OUT(GPIO39, AF1, DRIVE_LOW)
347#define GPIO40_USB_P2_5 MFP_CFG_IN(GPIO40, AF3)
348#define GPIO41_USB_P2_7 MFP_CFG_IN(GPIO41, AF2)
349#define GPIO53_USB_P2_3 MFP_CFG_IN(GPIO53, AF2)
350
351/* USB Host Port 1/2 */
352#define GPIO88_USBH1_PWR MFP_CFG_IN(GPIO88, AF1)
353#define GPIO89_USBH1_PEN MFP_CFG_OUT(GPIO89, AF2, DRIVE_LOW)
354#define GPIO119_USBH2_PWR MFP_CFG_IN(GPIO119, AF1)
355#define GPIO120_USBH2_PEN MFP_CFG_OUT(GPIO120, AF2, DRIVE_LOW)
356
357/* QCI - default to Master Mode: CIF_FV/CIF_LV Direction In */
358#define GPIO115_CIF_DD_3 MFP_CFG_IN(GPIO115, AF2)
359#define GPIO116_CIF_DD_2 MFP_CFG_IN(GPIO116, AF1)
360#define GPIO12_CIF_DD_7 MFP_CFG_IN(GPIO12, AF2)
361#define GPIO17_CIF_DD_6 MFP_CFG_IN(GPIO17, AF2)
362#define GPIO23_CIF_MCLK MFP_CFG_OUT(GPIO23, AF1, DRIVE_LOW)
363#define GPIO24_CIF_FV MFP_CFG_IN(GPIO24, AF1)
364#define GPIO25_CIF_LV MFP_CFG_IN(GPIO25, AF1)
365#define GPIO26_CIF_PCLK MFP_CFG_IN(GPIO26, AF2)
366#define GPIO27_CIF_DD_0 MFP_CFG_IN(GPIO27, AF3)
367#define GPIO42_CIF_MCLK MFP_CFG_OUT(GPIO42, AF3, DRIVE_LOW)
368#define GPIO43_CIF_FV MFP_CFG_IN(GPIO43, AF3)
369#define GPIO44_CIF_LV MFP_CFG_IN(GPIO44, AF3)
370#define GPIO45_CIF_PCLK MFP_CFG_IN(GPIO45, AF3)
371#define GPIO47_CIF_DD_0 MFP_CFG_IN(GPIO47, AF1)
372#define GPIO48_CIF_DD_5 MFP_CFG_IN(GPIO48, AF1)
373#define GPIO50_CIF_DD_3 MFP_CFG_IN(GPIO50, AF1)
374#define GPIO51_CIF_DD_2 MFP_CFG_IN(GPIO51, AF1)
375#define GPIO52_CIF_DD_4 MFP_CFG_IN(GPIO52, AF1)
376#define GPIO53_CIF_MCLK MFP_CFG_OUT(GPIO53, AF2, DRIVE_LOW)
377#define GPIO54_CIF_PCLK MFP_CFG_IN(GPIO54, AF3)
378#define GPIO55_CIF_DD_1 MFP_CFG_IN(GPIO55, AF1)
379#define GPIO81_CIF_DD_0 MFP_CFG_IN(GPIO81, AF2)
380#define GPIO82_CIF_DD_5 MFP_CFG_IN(GPIO82, AF3)
381#define GPIO83_CIF_DD_4 MFP_CFG_IN(GPIO83, AF3)
382#define GPIO84_CIF_FV MFP_CFG_IN(GPIO84, AF3)
383#define GPIO85_CIF_LV MFP_CFG_IN(GPIO85, AF3)
384#define GPIO90_CIF_DD_4 MFP_CFG_IN(GPIO90, AF3)
385#define GPIO91_CIF_DD_5 MFP_CFG_IN(GPIO91, AF3)
386#define GPIO93_CIF_DD_6 MFP_CFG_IN(GPIO93, AF2)
387#define GPIO94_CIF_DD_5 MFP_CFG_IN(GPIO94, AF2)
388#define GPIO95_CIF_DD_4 MFP_CFG_IN(GPIO95, AF2)
389#define GPIO98_CIF_DD_0 MFP_CFG_IN(GPIO98, AF2)
390#define GPIO103_CIF_DD_3 MFP_CFG_IN(GPIO103, AF1)
391#define GPIO104_CIF_DD_2 MFP_CFG_IN(GPIO104, AF1)
392#define GPIO105_CIF_DD_1 MFP_CFG_IN(GPIO105, AF1)
393#define GPIO106_CIF_DD_9 MFP_CFG_IN(GPIO106, AF1)
394#define GPIO107_CIF_DD_8 MFP_CFG_IN(GPIO107, AF1)
395#define GPIO108_CIF_DD_7 MFP_CFG_IN(GPIO108, AF1)
396#define GPIO114_CIF_DD_1 MFP_CFG_IN(GPIO114, AF1)
397
398/* Universal Subscriber ID Interface */
399#define GPIO114_UVS0 MFP_CFG_OUT(GPIO114, AF2, DRIVE_LOW)
400#define GPIO115_nUVS1 MFP_CFG_OUT(GPIO115, AF2, DRIVE_LOW)
401#define GPIO116_nUVS2 MFP_CFG_OUT(GPIO116, AF2, DRIVE_LOW)
402#define GPIO14_UCLK MFP_CFG_OUT(GPIO14, AF3, DRIVE_LOW)
403#define GPIO91_UCLK MFP_CFG_OUT(GPIO91, AF2, DRIVE_LOW)
404#define GPIO19_nURST MFP_CFG_OUT(GPIO19, AF3, DRIVE_LOW)
405#define GPIO90_nURST MFP_CFG_OUT(GPIO90, AF2, DRIVE_LOW)
406#define GPIO116_UDET MFP_CFG_IN(GPIO116, AF3)
407#define GPIO114_UEN MFP_CFG_OUT(GPIO114, AF1, DRIVE_LOW)
408#define GPIO115_UEN MFP_CFG_OUT(GPIO115, AF1, DRIVE_LOW)
409
410/* Mobile Scalable Link (MSL) Interface */
411#define GPIO81_BB_OB_DAT_0 MFP_CFG_OUT(GPIO81, AF2, DRIVE_LOW)
412#define GPIO48_BB_OB_DAT_1 MFP_CFG_OUT(GPIO48, AF1, DRIVE_LOW)
413#define GPIO50_BB_OB_DAT_2 MFP_CFG_OUT(GPIO50, AF1, DRIVE_LOW)
414#define GPIO51_BB_OB_DAT_3 MFP_CFG_OUT(GPIO51, AF1, DRIVE_LOW)
415#define GPIO52_BB_OB_CLK MFP_CFG_OUT(GPIO52, AF1, DRIVE_LOW)
416#define GPIO53_BB_OB_STB MFP_CFG_OUT(GPIO53, AF1, DRIVE_LOW)
417#define GPIO54_BB_OB_WAIT MFP_CFG_IN(GPIO54, AF2)
418#define GPIO82_BB_IB_DAT_0 MFP_CFG_IN(GPIO82, AF2)
419#define GPIO55_BB_IB_DAT_1 MFP_CFG_IN(GPIO55, AF2)
420#define GPIO56_BB_IB_DAT_2 MFP_CFG_IN(GPIO56, AF2)
421#define GPIO57_BB_IB_DAT_3 MFP_CFG_IN(GPIO57, AF2)
422#define GPIO83_BB_IB_CLK MFP_CFG_IN(GPIO83, AF2)
423#define GPIO84_BB_IB_STB MFP_CFG_IN(GPIO84, AF2)
424#define GPIO85_BB_IB_WAIT MFP_CFG_OUT(GPIO85, AF2, DRIVE_LOW)
425
426/* Memory Stick Host Controller */
427#define GPIO92_MSBS MFP_CFG_OUT(GPIO92, AF2, DRIVE_LOW)
428#define GPIO109_MSSDIO MFP_CFG_IN(GPIO109, AF2)
429#define GPIO112_nMSINS MFP_CFG_IN(GPIO112, AF2)
430#define GPIO32_MSSCLK MFP_CFG_OUT(GPIO32, AF1, DRIVE_LOW)
431
432extern int keypad_set_wake(unsigned int on);
433#endif /* __ASM_ARCH_MFP_PXA27X_H */
diff --git a/arch/arm/mach-pxa/include/mach/mfp-pxa2xx.h b/arch/arm/mach-pxa/include/mach/mfp-pxa2xx.h
new file mode 100644
index 000000000000..3e9211591e20
--- /dev/null
+++ b/arch/arm/mach-pxa/include/mach/mfp-pxa2xx.h
@@ -0,0 +1,133 @@
1#ifndef __ASM_ARCH_MFP_PXA2XX_H
2#define __ASM_ARCH_MFP_PXA2XX_H
3
4#include <mach/mfp.h>
5
6/*
7 * the following MFP_xxx bit definitions in mfp.h are re-used for pxa2xx:
8 *
9 * MFP_PIN(x)
10 * MFP_AFx
11 * MFP_LPM_DRIVE_{LOW, HIGH}
12 * MFP_LPM_EDGE_x
13 *
14 * other MFP_x bit definitions will be ignored
15 *
16 * and adds the below two bits specifically for pxa2xx:
17 *
18 * bit 23 - Input/Output (PXA2xx specific)
19 * bit 24 - Wakeup Enable(PXA2xx specific)
20 */
21
22#define MFP_DIR_IN (0x0 << 23)
23#define MFP_DIR_OUT (0x1 << 23)
24#define MFP_DIR_MASK (0x1 << 23)
25#define MFP_DIR(x) (((x) >> 23) & 0x1)
26
27#define MFP_LPM_CAN_WAKEUP (0x1 << 24)
28#define WAKEUP_ON_EDGE_RISE (MFP_LPM_CAN_WAKEUP | MFP_LPM_EDGE_RISE)
29#define WAKEUP_ON_EDGE_FALL (MFP_LPM_CAN_WAKEUP | MFP_LPM_EDGE_FALL)
30#define WAKEUP_ON_EDGE_BOTH (MFP_LPM_CAN_WAKEUP | MFP_LPM_EDGE_BOTH)
31
32/* specifically for enabling wakeup on keypad GPIOs */
33#define WAKEUP_ON_LEVEL_HIGH (MFP_LPM_CAN_WAKEUP)
34
35#define MFP_CFG_IN(pin, af) \
36 ((MFP_CFG_DEFAULT & ~(MFP_AF_MASK | MFP_DIR_MASK)) |\
37 (MFP_PIN(MFP_PIN_##pin) | MFP_##af | MFP_DIR_IN))
38
39/* NOTE: pins configured as output _must_ provide a low power state,
40 * and this state should help to minimize the power dissipation.
41 */
42#define MFP_CFG_OUT(pin, af, state) \
43 ((MFP_CFG_DEFAULT & ~(MFP_AF_MASK | MFP_DIR_MASK | MFP_LPM_STATE_MASK)) |\
44 (MFP_PIN(MFP_PIN_##pin) | MFP_##af | MFP_DIR_OUT | MFP_LPM_##state))
45
46/* Common configurations for pxa25x and pxa27x
47 *
48 * Note: pins configured as GPIO are always initialized to input
49 * so not to cause any side effect
50 */
51#define GPIO0_GPIO MFP_CFG_IN(GPIO0, AF0)
52#define GPIO1_GPIO MFP_CFG_IN(GPIO1, AF0)
53#define GPIO9_GPIO MFP_CFG_IN(GPIO9, AF0)
54#define GPIO10_GPIO MFP_CFG_IN(GPIO10, AF0)
55#define GPIO11_GPIO MFP_CFG_IN(GPIO11, AF0)
56#define GPIO12_GPIO MFP_CFG_IN(GPIO12, AF0)
57#define GPIO13_GPIO MFP_CFG_IN(GPIO13, AF0)
58#define GPIO14_GPIO MFP_CFG_IN(GPIO14, AF0)
59#define GPIO15_GPIO MFP_CFG_IN(GPIO15, AF0)
60#define GPIO16_GPIO MFP_CFG_IN(GPIO16, AF0)
61#define GPIO17_GPIO MFP_CFG_IN(GPIO17, AF0)
62#define GPIO18_GPIO MFP_CFG_IN(GPIO18, AF0)
63#define GPIO19_GPIO MFP_CFG_IN(GPIO19, AF0)
64#define GPIO20_GPIO MFP_CFG_IN(GPIO20, AF0)
65#define GPIO21_GPIO MFP_CFG_IN(GPIO21, AF0)
66#define GPIO22_GPIO MFP_CFG_IN(GPIO22, AF0)
67#define GPIO23_GPIO MFP_CFG_IN(GPIO23, AF0)
68#define GPIO24_GPIO MFP_CFG_IN(GPIO24, AF0)
69#define GPIO25_GPIO MFP_CFG_IN(GPIO25, AF0)
70#define GPIO26_GPIO MFP_CFG_IN(GPIO26, AF0)
71#define GPIO27_GPIO MFP_CFG_IN(GPIO27, AF0)
72#define GPIO28_GPIO MFP_CFG_IN(GPIO28, AF0)
73#define GPIO29_GPIO MFP_CFG_IN(GPIO29, AF0)
74#define GPIO30_GPIO MFP_CFG_IN(GPIO30, AF0)
75#define GPIO31_GPIO MFP_CFG_IN(GPIO31, AF0)
76#define GPIO32_GPIO MFP_CFG_IN(GPIO32, AF0)
77#define GPIO33_GPIO MFP_CFG_IN(GPIO33, AF0)
78#define GPIO34_GPIO MFP_CFG_IN(GPIO34, AF0)
79#define GPIO35_GPIO MFP_CFG_IN(GPIO35, AF0)
80#define GPIO36_GPIO MFP_CFG_IN(GPIO36, AF0)
81#define GPIO37_GPIO MFP_CFG_IN(GPIO37, AF0)
82#define GPIO38_GPIO MFP_CFG_IN(GPIO38, AF0)
83#define GPIO39_GPIO MFP_CFG_IN(GPIO39, AF0)
84#define GPIO40_GPIO MFP_CFG_IN(GPIO40, AF0)
85#define GPIO41_GPIO MFP_CFG_IN(GPIO41, AF0)
86#define GPIO42_GPIO MFP_CFG_IN(GPIO42, AF0)
87#define GPIO43_GPIO MFP_CFG_IN(GPIO43, AF0)
88#define GPIO44_GPIO MFP_CFG_IN(GPIO44, AF0)
89#define GPIO45_GPIO MFP_CFG_IN(GPIO45, AF0)
90#define GPIO46_GPIO MFP_CFG_IN(GPIO46, AF0)
91#define GPIO47_GPIO MFP_CFG_IN(GPIO47, AF0)
92#define GPIO48_GPIO MFP_CFG_IN(GPIO48, AF0)
93#define GPIO49_GPIO MFP_CFG_IN(GPIO49, AF0)
94#define GPIO50_GPIO MFP_CFG_IN(GPIO50, AF0)
95#define GPIO51_GPIO MFP_CFG_IN(GPIO51, AF0)
96#define GPIO52_GPIO MFP_CFG_IN(GPIO52, AF0)
97#define GPIO53_GPIO MFP_CFG_IN(GPIO53, AF0)
98#define GPIO54_GPIO MFP_CFG_IN(GPIO54, AF0)
99#define GPIO55_GPIO MFP_CFG_IN(GPIO55, AF0)
100#define GPIO56_GPIO MFP_CFG_IN(GPIO56, AF0)
101#define GPIO57_GPIO MFP_CFG_IN(GPIO57, AF0)
102#define GPIO58_GPIO MFP_CFG_IN(GPIO58, AF0)
103#define GPIO59_GPIO MFP_CFG_IN(GPIO59, AF0)
104#define GPIO60_GPIO MFP_CFG_IN(GPIO60, AF0)
105#define GPIO61_GPIO MFP_CFG_IN(GPIO61, AF0)
106#define GPIO62_GPIO MFP_CFG_IN(GPIO62, AF0)
107#define GPIO63_GPIO MFP_CFG_IN(GPIO63, AF0)
108#define GPIO64_GPIO MFP_CFG_IN(GPIO64, AF0)
109#define GPIO65_GPIO MFP_CFG_IN(GPIO65, AF0)
110#define GPIO66_GPIO MFP_CFG_IN(GPIO66, AF0)
111#define GPIO67_GPIO MFP_CFG_IN(GPIO67, AF0)
112#define GPIO68_GPIO MFP_CFG_IN(GPIO68, AF0)
113#define GPIO69_GPIO MFP_CFG_IN(GPIO69, AF0)
114#define GPIO70_GPIO MFP_CFG_IN(GPIO70, AF0)
115#define GPIO71_GPIO MFP_CFG_IN(GPIO71, AF0)
116#define GPIO72_GPIO MFP_CFG_IN(GPIO72, AF0)
117#define GPIO73_GPIO MFP_CFG_IN(GPIO73, AF0)
118#define GPIO74_GPIO MFP_CFG_IN(GPIO74, AF0)
119#define GPIO75_GPIO MFP_CFG_IN(GPIO75, AF0)
120#define GPIO76_GPIO MFP_CFG_IN(GPIO76, AF0)
121#define GPIO77_GPIO MFP_CFG_IN(GPIO77, AF0)
122#define GPIO78_GPIO MFP_CFG_IN(GPIO78, AF0)
123#define GPIO79_GPIO MFP_CFG_IN(GPIO79, AF0)
124#define GPIO80_GPIO MFP_CFG_IN(GPIO80, AF0)
125#define GPIO81_GPIO MFP_CFG_IN(GPIO81, AF0)
126#define GPIO82_GPIO MFP_CFG_IN(GPIO82, AF0)
127#define GPIO83_GPIO MFP_CFG_IN(GPIO83, AF0)
128#define GPIO84_GPIO MFP_CFG_IN(GPIO84, AF0)
129
130extern void pxa2xx_mfp_config(unsigned long *mfp_cfgs, int num);
131extern void pxa2xx_mfp_set_lpm(int mfp, unsigned long lpm);
132extern int gpio_set_wake(unsigned int gpio, unsigned int on);
133#endif /* __ASM_ARCH_MFP_PXA2XX_H */
diff --git a/arch/arm/mach-pxa/include/mach/mfp-pxa300.h b/arch/arm/mach-pxa/include/mach/mfp-pxa300.h
new file mode 100644
index 000000000000..bc1fb33a6e70
--- /dev/null
+++ b/arch/arm/mach-pxa/include/mach/mfp-pxa300.h
@@ -0,0 +1,575 @@
1/*
2 * arch/arm/mach-pxa/include/mach/mfp-pxa300.h
3 *
4 * PXA300/PXA310 specific MFP configuration definitions
5 *
6 * Copyright (C) 2007 Marvell International Ltd.
7 * 2007-08-21: eric miao <eric.miao@marvell.com>
8 * initial version
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
13 */
14
15#ifndef __ASM_ARCH_MFP_PXA300_H
16#define __ASM_ARCH_MFP_PXA300_H
17
18#include <mach/mfp.h>
19#include <mach/mfp-pxa3xx.h>
20
21/* GPIO */
22#define GPIO46_GPIO MFP_CFG(GPIO46, AF1)
23#define GPIO49_GPIO MFP_CFG(GPIO49, AF3)
24#define GPIO50_GPIO MFP_CFG(GPIO50, AF2)
25#define GPIO51_GPIO MFP_CFG(GPIO51, AF3)
26#define GPIO52_GPIO MFP_CFG(GPIO52, AF3)
27#define GPIO56_GPIO MFP_CFG(GPIO56, AF0)
28#define GPIO58_GPIO MFP_CFG(GPIO58, AF0)
29#define GPIO59_GPIO MFP_CFG(GPIO59, AF0)
30#define GPIO60_GPIO MFP_CFG(GPIO60, AF0)
31#define GPIO61_GPIO MFP_CFG(GPIO61, AF0)
32#define GPIO62_GPIO MFP_CFG(GPIO62, AF0)
33
34#ifdef CONFIG_CPU_PXA310
35#define GPIO7_2_GPIO MFP_CFG(GPIO7_2, AF0)
36#define GPIO8_2_GPIO MFP_CFG(GPIO8_2, AF0)
37#define GPIO9_2_GPIO MFP_CFG(GPIO9_2, AF0)
38#define GPIO10_2_GPIO MFP_CFG(GPIO10_2, AF0)
39#define GPIO11_2_GPIO MFP_CFG(GPIO11_2, AF0)
40#define GPIO12_2_GPIO MFP_CFG(GPIO12_2, AF0)
41#endif
42
43/* Chip Select */
44#define GPIO2_nCS3 MFP_CFG(GPIO2, AF1)
45
46/* AC97 */
47#define GPIO23_AC97_nACRESET MFP_CFG(GPIO23, AF1)
48#define GPIO24_AC97_SYSCLK MFP_CFG(GPIO24, AF1)
49#define GPIO29_AC97_BITCLK MFP_CFG(GPIO29, AF1)
50#define GPIO25_AC97_SDATA_IN_0 MFP_CFG(GPIO25, AF1)
51#define GPIO26_AC97_SDATA_IN_1 MFP_CFG(GPIO26, AF1)
52#define GPIO17_AC97_SDATA_IN_2 MFP_CFG(GPIO17, AF3)
53#define GPIO21_AC97_SDATA_IN_2 MFP_CFG(GPIO21, AF2)
54#define GPIO18_AC97_SDATA_IN_3 MFP_CFG(GPIO18, AF3)
55#define GPIO22_AC97_SDATA_IN_3 MFP_CFG(GPIO22, AF2)
56#define GPIO27_AC97_SDATA_OUT MFP_CFG(GPIO27, AF1)
57#define GPIO28_AC97_SYNC MFP_CFG(GPIO28, AF1)
58
59/* I2C */
60#define GPIO21_I2C_SCL MFP_CFG_LPM(GPIO21, AF1, PULL_HIGH)
61#define GPIO22_I2C_SDA MFP_CFG_LPM(GPIO22, AF1, PULL_HIGH)
62
63/* QCI */
64#define GPIO39_CI_DD_0 MFP_CFG_DRV(GPIO39, AF1, DS04X)
65#define GPIO40_CI_DD_1 MFP_CFG_DRV(GPIO40, AF1, DS04X)
66#define GPIO41_CI_DD_2 MFP_CFG_DRV(GPIO41, AF1, DS04X)
67#define GPIO42_CI_DD_3 MFP_CFG_DRV(GPIO42, AF1, DS04X)
68#define GPIO43_CI_DD_4 MFP_CFG_DRV(GPIO43, AF1, DS04X)
69#define GPIO44_CI_DD_5 MFP_CFG_DRV(GPIO44, AF1, DS04X)
70#define GPIO45_CI_DD_6 MFP_CFG_DRV(GPIO45, AF1, DS04X)
71#define GPIO46_CI_DD_7 MFP_CFG_DRV(GPIO46, AF0, DS04X)
72#define GPIO47_CI_DD_8 MFP_CFG_DRV(GPIO47, AF1, DS04X)
73#define GPIO48_CI_DD_9 MFP_CFG_DRV(GPIO48, AF1, DS04X)
74#define GPIO52_CI_HSYNC MFP_CFG_DRV(GPIO52, AF0, DS04X)
75#define GPIO51_CI_VSYNC MFP_CFG_DRV(GPIO51, AF0, DS04X)
76#define GPIO49_CI_MCLK MFP_CFG_DRV(GPIO49, AF0, DS04X)
77#define GPIO50_CI_PCLK MFP_CFG_DRV(GPIO50, AF0, DS04X)
78
79/* KEYPAD */
80#define GPIO3_KP_DKIN_6 MFP_CFG_LPM(GPIO3, AF2, FLOAT)
81#define GPIO4_KP_DKIN_7 MFP_CFG_LPM(GPIO4, AF2, FLOAT)
82#define GPIO16_KP_DKIN_6 MFP_CFG_LPM(GPIO16, AF6, FLOAT)
83#define GPIO83_KP_DKIN_2 MFP_CFG_LPM(GPIO83, AF5, FLOAT)
84#define GPIO84_KP_DKIN_1 MFP_CFG_LPM(GPIO84, AF5, FLOAT)
85#define GPIO85_KP_DKIN_0 MFP_CFG_LPM(GPIO85, AF3, FLOAT)
86#define GPIO86_KP_DKIN_1 MFP_CFG_LPM(GPIO86, AF3, FLOAT)
87#define GPIO87_KP_DKIN_2 MFP_CFG_LPM(GPIO87, AF3, FLOAT)
88#define GPIO88_KP_DKIN_3 MFP_CFG_LPM(GPIO88, AF3, FLOAT)
89#define GPIO89_KP_DKIN_3 MFP_CFG_LPM(GPIO89, AF3, FLOAT)
90#define GPIO107_KP_DKIN_0 MFP_CFG_LPM(GPIO107, AF2, FLOAT)
91#define GPIO108_KP_DKIN_1 MFP_CFG_LPM(GPIO108, AF2, FLOAT)
92#define GPIO109_KP_DKIN_2 MFP_CFG_LPM(GPIO109, AF2, FLOAT)
93#define GPIO110_KP_DKIN_3 MFP_CFG_LPM(GPIO110, AF2, FLOAT)
94#define GPIO111_KP_DKIN_4 MFP_CFG_LPM(GPIO111, AF2, FLOAT)
95#define GPIO112_KP_DKIN_5 MFP_CFG_LPM(GPIO112, AF2, FLOAT)
96#define GPIO113_KP_DKIN_6 MFP_CFG_LPM(GPIO113, AF2, FLOAT)
97#define GPIO114_KP_DKIN_7 MFP_CFG_LPM(GPIO114, AF2, FLOAT)
98#define GPIO115_KP_DKIN_0 MFP_CFG_LPM(GPIO115, AF2, FLOAT)
99#define GPIO116_KP_DKIN_1 MFP_CFG_LPM(GPIO116, AF2, FLOAT)
100#define GPIO117_KP_DKIN_2 MFP_CFG_LPM(GPIO117, AF2, FLOAT)
101#define GPIO118_KP_DKIN_3 MFP_CFG_LPM(GPIO118, AF2, FLOAT)
102#define GPIO119_KP_DKIN_4 MFP_CFG_LPM(GPIO119, AF2, FLOAT)
103#define GPIO120_KP_DKIN_5 MFP_CFG_LPM(GPIO120, AF2, FLOAT)
104#define GPIO121_KP_DKIN_6 MFP_CFG_LPM(GPIO121, AF2, FLOAT)
105#define GPIO122_KP_DKIN_5 MFP_CFG_LPM(GPIO122, AF2, FLOAT)
106#define GPIO123_KP_DKIN_4 MFP_CFG_LPM(GPIO123, AF2, FLOAT)
107#define GPIO124_KP_DKIN_3 MFP_CFG_LPM(GPIO124, AF2, FLOAT)
108#define GPIO127_KP_DKIN_0 MFP_CFG_LPM(GPIO127, AF5, FLOAT)
109#define GPIO0_2_KP_DKIN_0 MFP_CFG_LPM(GPIO0_2, AF2, FLOAT)
110#define GPIO1_2_KP_DKIN_1 MFP_CFG_LPM(GPIO1_2, AF2, FLOAT)
111#define GPIO2_2_KP_DKIN_6 MFP_CFG_LPM(GPIO2_2, AF2, FLOAT)
112#define GPIO3_2_KP_DKIN_7 MFP_CFG_LPM(GPIO3_2, AF2, FLOAT)
113#define GPIO4_2_KP_DKIN_1 MFP_CFG_LPM(GPIO4_2, AF2, FLOAT)
114#define GPIO5_2_KP_DKIN_0 MFP_CFG_LPM(GPIO5_2, AF2, FLOAT)
115
116#define GPIO5_KP_MKIN_0 MFP_CFG_LPM(GPIO5, AF2, FLOAT)
117#define GPIO6_KP_MKIN_1 MFP_CFG_LPM(GPIO6, AF2, FLOAT)
118#define GPIO9_KP_MKIN_6 MFP_CFG_LPM(GPIO9, AF3, FLOAT)
119#define GPIO10_KP_MKIN_7 MFP_CFG_LPM(GPIO10, AF3, FLOAT)
120#define GPIO70_KP_MKIN_6 MFP_CFG_LPM(GPIO70, AF3, FLOAT)
121#define GPIO71_KP_MKIN_7 MFP_CFG_LPM(GPIO71, AF3, FLOAT)
122#define GPIO100_KP_MKIN_6 MFP_CFG_LPM(GPIO100, AF7, FLOAT)
123#define GPIO101_KP_MKIN_7 MFP_CFG_LPM(GPIO101, AF7, FLOAT)
124#define GPIO112_KP_MKIN_6 MFP_CFG_LPM(GPIO112, AF4, FLOAT)
125#define GPIO113_KP_MKIN_7 MFP_CFG_LPM(GPIO113, AF4, FLOAT)
126#define GPIO115_KP_MKIN_0 MFP_CFG_LPM(GPIO115, AF1, FLOAT)
127#define GPIO116_KP_MKIN_1 MFP_CFG_LPM(GPIO116, AF1, FLOAT)
128#define GPIO117_KP_MKIN_2 MFP_CFG_LPM(GPIO117, AF1, FLOAT)
129#define GPIO118_KP_MKIN_3 MFP_CFG_LPM(GPIO118, AF1, FLOAT)
130#define GPIO119_KP_MKIN_4 MFP_CFG_LPM(GPIO119, AF1, FLOAT)
131#define GPIO120_KP_MKIN_5 MFP_CFG_LPM(GPIO120, AF1, FLOAT)
132#define GPIO125_KP_MKIN_2 MFP_CFG_LPM(GPIO125, AF2, FLOAT)
133#define GPIO2_2_KP_MKIN_6 MFP_CFG_LPM(GPIO2_2, AF1, FLOAT)
134#define GPIO3_2_KP_MKIN_7 MFP_CFG_LPM(GPIO3_2, AF1, FLOAT)
135
136#define GPIO7_KP_MKOUT_5 MFP_CFG_LPM(GPIO7, AF1, DRIVE_HIGH)
137#define GPIO11_KP_MKOUT_5 MFP_CFG_LPM(GPIO11, AF3, DRIVE_HIGH)
138#define GPIO12_KP_MKOUT_6 MFP_CFG_LPM(GPIO12, AF3, DRIVE_HIGH)
139#define GPIO13_KP_MKOUT_7 MFP_CFG_LPM(GPIO13, AF3, DRIVE_HIGH)
140#define GPIO19_KP_MKOUT_4 MFP_CFG_LPM(GPIO19, AF3, DRIVE_HIGH)
141#define GPIO20_KP_MKOUT_5 MFP_CFG_LPM(GPIO20, AF3, DRIVE_HIGH)
142#define GPIO38_KP_MKOUT_5 MFP_CFG_LPM(GPIO38, AF5, DRIVE_HIGH)
143#define GPIO53_KP_MKOUT_6 MFP_CFG_LPM(GPIO53, AF5, DRIVE_HIGH)
144#define GPIO78_KP_MKOUT_7 MFP_CFG_LPM(GPIO78, AF5, DRIVE_HIGH)
145#define GPIO85_KP_MKOUT_0 MFP_CFG_LPM(GPIO85, AF2, DRIVE_HIGH)
146#define GPIO86_KP_MKOUT_1 MFP_CFG_LPM(GPIO86, AF2, DRIVE_HIGH)
147#define GPIO87_KP_MKOUT_2 MFP_CFG_LPM(GPIO87, AF2, DRIVE_HIGH)
148#define GPIO88_KP_MKOUT_3 MFP_CFG_LPM(GPIO88, AF2, DRIVE_HIGH)
149#define GPIO104_KP_MKOUT_6 MFP_CFG_LPM(GPIO104, AF5, DRIVE_HIGH)
150#define GPIO105_KP_MKOUT_7 MFP_CFG_LPM(GPIO105, AF5, DRIVE_HIGH)
151#define GPIO121_KP_MKOUT_0 MFP_CFG_LPM(GPIO121, AF1, DRIVE_HIGH)
152#define GPIO122_KP_MKOUT_1 MFP_CFG_LPM(GPIO122, AF1, DRIVE_HIGH)
153#define GPIO123_KP_MKOUT_2 MFP_CFG_LPM(GPIO123, AF1, DRIVE_HIGH)
154#define GPIO124_KP_MKOUT_3 MFP_CFG_LPM(GPIO124, AF1, DRIVE_HIGH)
155#define GPIO125_KP_MKOUT_4 MFP_CFG_LPM(GPIO125, AF1, DRIVE_HIGH)
156#define GPIO126_KP_MKOUT_7 MFP_CFG_LPM(GPIO126, AF4, DRIVE_HIGH)
157#define GPIO5_2_KP_MKOUT_6 MFP_CFG_LPM(GPIO5_2, AF1, DRIVE_HIGH)
158#define GPIO4_2_KP_MKOUT_5 MFP_CFG_LPM(GPIO4_2, AF1, DRIVE_HIGH)
159#define GPIO6_2_KP_MKOUT_7 MFP_CFG_LPM(GPIO6_2, AF1, DRIVE_HIGH)
160
161/* LCD */
162#define GPIO54_LCD_LDD_0 MFP_CFG_DRV(GPIO54, AF1, DS01X)
163#define GPIO55_LCD_LDD_1 MFP_CFG_DRV(GPIO55, AF1, DS01X)
164#define GPIO56_LCD_LDD_2 MFP_CFG_DRV(GPIO56, AF1, DS01X)
165#define GPIO57_LCD_LDD_3 MFP_CFG_DRV(GPIO57, AF1, DS01X)
166#define GPIO58_LCD_LDD_4 MFP_CFG_DRV(GPIO58, AF1, DS01X)
167#define GPIO59_LCD_LDD_5 MFP_CFG_DRV(GPIO59, AF1, DS01X)
168#define GPIO60_LCD_LDD_6 MFP_CFG_DRV(GPIO60, AF1, DS01X)
169#define GPIO61_LCD_LDD_7 MFP_CFG_DRV(GPIO61, AF1, DS01X)
170#define GPIO62_LCD_LDD_8 MFP_CFG_DRV(GPIO62, AF1, DS01X)
171#define GPIO63_LCD_LDD_9 MFP_CFG_DRV(GPIO63, AF1, DS01X)
172#define GPIO64_LCD_LDD_10 MFP_CFG_DRV(GPIO64, AF1, DS01X)
173#define GPIO65_LCD_LDD_11 MFP_CFG_DRV(GPIO65, AF1, DS01X)
174#define GPIO66_LCD_LDD_12 MFP_CFG_DRV(GPIO66, AF1, DS01X)
175#define GPIO67_LCD_LDD_13 MFP_CFG_DRV(GPIO67, AF1, DS01X)
176#define GPIO68_LCD_LDD_14 MFP_CFG_DRV(GPIO68, AF1, DS01X)
177#define GPIO69_LCD_LDD_15 MFP_CFG_DRV(GPIO69, AF1, DS01X)
178#define GPIO70_LCD_LDD_16 MFP_CFG_DRV(GPIO70, AF1, DS01X)
179#define GPIO71_LCD_LDD_17 MFP_CFG_DRV(GPIO71, AF1, DS01X)
180#define GPIO62_LCD_CS_N MFP_CFG_DRV(GPIO62, AF2, DS01X)
181#define GPIO72_LCD_FCLK MFP_CFG_DRV(GPIO72, AF1, DS01X)
182#define GPIO73_LCD_LCLK MFP_CFG_DRV(GPIO73, AF1, DS01X)
183#define GPIO74_LCD_PCLK MFP_CFG_DRV(GPIO74, AF1, DS02X)
184#define GPIO75_LCD_BIAS MFP_CFG_DRV(GPIO75, AF1, DS01X)
185#define GPIO76_LCD_VSYNC MFP_CFG_DRV(GPIO76, AF2, DS01X)
186
187#define GPIO15_LCD_CS_N MFP_CFG_DRV(GPIO15, AF2, DS01X)
188#define GPIO127_LCD_CS_N MFP_CFG_DRV(GPIO127, AF1, DS01X)
189#define GPIO63_LCD_VSYNC MFP_CFG_DRV(GPIO63, AF2, DS01X)
190
191/* Mini-LCD */
192#define GPIO72_MLCD_FCLK MFP_CFG_DRV(GPIO72, AF7, DS08X)
193#define GPIO73_MLCD_LCLK MFP_CFG_DRV(GPIO73, AF7, DS08X)
194#define GPIO54_MLCD_LDD_0 MFP_CFG_DRV(GPIO54, AF7, DS08X)
195#define GPIO55_MLCD_LDD_1 MFP_CFG_DRV(GPIO55, AF7, DS08X)
196#define GPIO56_MLCD_LDD_2 MFP_CFG_DRV(GPIO56, AF7, DS08X)
197#define GPIO57_MLCD_LDD_3 MFP_CFG_DRV(GPIO57, AF7, DS08X)
198#define GPIO58_MLCD_LDD_4 MFP_CFG_DRV(GPIO58, AF7, DS08X)
199#define GPIO59_MLCD_LDD_5 MFP_CFG_DRV(GPIO59, AF7, DS08X)
200#define GPIO60_MLCD_LDD_6 MFP_CFG_DRV(GPIO60, AF7, DS08X)
201#define GPIO61_MLCD_LDD_7 MFP_CFG_DRV(GPIO61, AF7, DS08X)
202#define GPIO62_MLCD_LDD_8 MFP_CFG_DRV(GPIO62, AF7, DS08X)
203#define GPIO63_MLCD_LDD_9 MFP_CFG_DRV(GPIO63, AF7, DS08X)
204#define GPIO64_MLCD_LDD_10 MFP_CFG_DRV(GPIO64, AF7, DS08X)
205#define GPIO65_MLCD_LDD_11 MFP_CFG_DRV(GPIO65, AF7, DS08X)
206#define GPIO66_MLCD_LDD_12 MFP_CFG_DRV(GPIO66, AF7, DS08X)
207#define GPIO67_MLCD_LDD_13 MFP_CFG_DRV(GPIO67, AF7, DS08X)
208#define GPIO68_MLCD_LDD_14 MFP_CFG_DRV(GPIO68, AF7, DS08X)
209#define GPIO69_MLCD_LDD_15 MFP_CFG_DRV(GPIO69, AF7, DS08X)
210#define GPIO74_MLCD_PCLK MFP_CFG_DRV(GPIO74, AF7, DS08X)
211#define GPIO75_MLCD_BIAS MFP_CFG_DRV(GPIO75, AF2, DS08X)
212
213/* MMC1 */
214#define GPIO7_MMC1_CLK MFP_CFG_LPM(GPIO7, AF4, DRIVE_HIGH)
215#define GPIO8_MMC1_CMD MFP_CFG_LPM(GPIO8, AF4, DRIVE_HIGH)
216#define GPIO14_MMC1_CMD MFP_CFG_LPM(GPIO14, AF5, DRIVE_HIGH)
217#define GPIO15_MMC1_CMD MFP_CFG_LPM(GPIO15, AF5, DRIVE_HIGH)
218#define GPIO3_MMC1_DAT0 MFP_CFG_LPM(GPIO3, AF4, DRIVE_HIGH)
219#define GPIO4_MMC1_DAT1 MFP_CFG_LPM(GPIO4, AF4, DRIVE_HIGH)
220#define GPIO5_MMC1_DAT2 MFP_CFG_LPM(GPIO5, AF4, DRIVE_HIGH)
221#define GPIO6_MMC1_DAT3 MFP_CFG_LPM(GPIO6, AF4, DRIVE_HIGH)
222
223/* MMC2 */
224#define GPIO9_MMC2_DAT0 MFP_CFG_LPM(GPIO9, AF4, PULL_HIGH)
225#define GPIO10_MMC2_DAT1 MFP_CFG_LPM(GPIO10, AF4, PULL_HIGH)
226#define GPIO11_MMC2_DAT2 MFP_CFG_LPM(GPIO11, AF4, PULL_HIGH)
227#define GPIO12_MMC2_DAT3 MFP_CFG_LPM(GPIO12, AF4, PULL_HIGH)
228#define GPIO13_MMC2_CLK MFP_CFG_LPM(GPIO13, AF4, PULL_HIGH)
229#define GPIO14_MMC2_CMD MFP_CFG_LPM(GPIO14, AF4, PULL_HIGH)
230#define GPIO77_MMC2_DAT0 MFP_CFG_LPM(GPIO77, AF4, PULL_HIGH)
231#define GPIO78_MMC2_DAT1 MFP_CFG_LPM(GPIO78, AF4, PULL_HIGH)
232#define GPIO79_MMC2_DAT2 MFP_CFG_LPM(GPIO79, AF4, PULL_HIGH)
233#define GPIO80_MMC2_DAT3 MFP_CFG_LPM(GPIO80, AF4, PULL_HIGH)
234#define GPIO81_MMC2_CLK MFP_CFG_LPM(GPIO81, AF4, PULL_HIGH)
235#define GPIO82_MMC2_CMD MFP_CFG_LPM(GPIO82, AF4, PULL_HIGH)
236
237/* SSP1 */
238#define GPIO89_SSP1_EXTCLK MFP_CFG(GPIO89, AF1)
239#define GPIO90_SSP1_SYSCLK MFP_CFG(GPIO90, AF1)
240#define GPIO15_SSP1_SCLK MFP_CFG(GPIO15, AF6)
241#define GPIO16_SSP1_FRM MFP_CFG(GPIO16, AF2)
242#define GPIO33_SSP1_SCLK MFP_CFG(GPIO33, AF5)
243#define GPIO34_SSP1_FRM MFP_CFG(GPIO34, AF5)
244#define GPIO85_SSP1_SCLK MFP_CFG(GPIO85, AF1)
245#define GPIO86_SSP1_FRM MFP_CFG(GPIO86, AF1)
246#define GPIO18_SSP1_TXD MFP_CFG(GPIO18, AF7)
247#define GPIO18_SSP1_RXD MFP_CFG(GPIO18, AF2)
248#define GPIO20_SSP1_TXD MFP_CFG(GPIO20, AF2)
249#define GPIO20_SSP1_RXD MFP_CFG(GPIO20, AF7)
250#define GPIO35_SSP1_TXD MFP_CFG(GPIO35, AF5)
251#define GPIO35_SSP1_RXD MFP_CFG(GPIO35, AF4)
252#define GPIO36_SSP1_TXD MFP_CFG(GPIO36, AF5)
253#define GPIO36_SSP1_RXD MFP_CFG(GPIO36, AF6)
254#define GPIO87_SSP1_TXD MFP_CFG(GPIO87, AF1)
255#define GPIO87_SSP1_RXD MFP_CFG(GPIO87, AF6)
256#define GPIO88_SSP1_TXD MFP_CFG(GPIO88, AF6)
257#define GPIO88_SSP1_RXD MFP_CFG(GPIO88, AF1)
258
259/* SSP2 */
260#define GPIO29_SSP2_EXTCLK MFP_CFG(GPIO29, AF2)
261#define GPIO23_SSP2_SCLK MFP_CFG(GPIO23, AF2)
262#define GPIO17_SSP2_FRM MFP_CFG(GPIO17, AF2)
263#define GPIO25_SSP2_SCLK MFP_CFG(GPIO25, AF2)
264#define GPIO26_SSP2_FRM MFP_CFG(GPIO26, AF2)
265#define GPIO33_SSP2_SCLK MFP_CFG(GPIO33, AF6)
266#define GPIO34_SSP2_FRM MFP_CFG(GPIO34, AF6)
267#define GPIO64_SSP2_SCLK MFP_CFG(GPIO64, AF2)
268#define GPIO65_SSP2_FRM MFP_CFG(GPIO65, AF2)
269#define GPIO19_SSP2_TXD MFP_CFG(GPIO19, AF2)
270#define GPIO19_SSP2_RXD MFP_CFG(GPIO19, AF7)
271#define GPIO24_SSP2_TXD MFP_CFG(GPIO24, AF5)
272#define GPIO24_SSP2_RXD MFP_CFG(GPIO24, AF4)
273#define GPIO27_SSP2_TXD MFP_CFG(GPIO27, AF2)
274#define GPIO27_SSP2_RXD MFP_CFG(GPIO27, AF5)
275#define GPIO28_SSP2_TXD MFP_CFG(GPIO28, AF5)
276#define GPIO28_SSP2_RXD MFP_CFG(GPIO28, AF2)
277#define GPIO35_SSP2_TXD MFP_CFG(GPIO35, AF7)
278#define GPIO35_SSP2_RXD MFP_CFG(GPIO35, AF6)
279#define GPIO66_SSP2_TXD MFP_CFG(GPIO66, AF4)
280#define GPIO66_SSP2_RXD MFP_CFG(GPIO66, AF2)
281#define GPIO67_SSP2_TXD MFP_CFG(GPIO67, AF2)
282#define GPIO67_SSP2_RXD MFP_CFG(GPIO67, AF4)
283#define GPIO36_SSP2_TXD MFP_CFG(GPIO36, AF7)
284
285/* SSP3 */
286#define GPIO69_SSP3_FRM MFP_CFG_X(GPIO69, AF2, DS08X, DRIVE_LOW)
287#define GPIO68_SSP3_SCLK MFP_CFG_X(GPIO68, AF2, DS08X, FLOAT)
288#define GPIO92_SSP3_FRM MFP_CFG_X(GPIO92, AF1, DS08X, DRIVE_LOW)
289#define GPIO91_SSP3_SCLK MFP_CFG_X(GPIO91, AF1, DS08X, FLOAT)
290#define GPIO70_SSP3_TXD MFP_CFG_X(GPIO70, AF2, DS08X, DRIVE_LOW)
291#define GPIO70_SSP3_RXD MFP_CFG_X(GPIO70, AF5, DS08X, FLOAT)
292#define GPIO71_SSP3_TXD MFP_CFG_X(GPIO71, AF5, DS08X, DRIVE_LOW)
293#define GPIO71_SSP3_RXD MFP_CFG_X(GPIO71, AF2, DS08X, FLOAT)
294#define GPIO93_SSP3_TXD MFP_CFG_X(GPIO93, AF1, DS08X, DRIVE_LOW)
295#define GPIO93_SSP3_RXD MFP_CFG_X(GPIO93, AF5, DS08X, FLOAT)
296#define GPIO94_SSP3_TXD MFP_CFG_X(GPIO94, AF5, DS08X, DRIVE_LOW)
297#define GPIO94_SSP3_RXD MFP_CFG_X(GPIO94, AF1, DS08X, FLOAT)
298
299/* SSP4 */
300#define GPIO95_SSP4_SCLK MFP_CFG_LPM(GPIO95, AF1, PULL_HIGH)
301#define GPIO96_SSP4_FRM MFP_CFG_LPM(GPIO96, AF1, PULL_HIGH)
302#define GPIO97_SSP4_TXD MFP_CFG_LPM(GPIO97, AF1, PULL_HIGH)
303#define GPIO97_SSP4_RXD MFP_CFG_LPM(GPIO97, AF5, PULL_HIGH)
304#define GPIO98_SSP4_TXD MFP_CFG_LPM(GPIO98, AF5, PULL_HIGH)
305#define GPIO98_SSP4_RXD MFP_CFG_LPM(GPIO98, AF1, PULL_HIGH)
306
307/* UART1 */
308#define GPIO32_UART1_CTS MFP_CFG_LPM(GPIO32, AF2, FLOAT)
309#define GPIO37_UART1_CTS MFP_CFG_LPM(GPIO37, AF4, FLOAT)
310#define GPIO79_UART1_CTS MFP_CFG_LPM(GPIO79, AF1, FLOAT)
311#define GPIO84_UART1_CTS MFP_CFG_LPM(GPIO84, AF3, FLOAT)
312#define GPIO101_UART1_CTS MFP_CFG_LPM(GPIO101, AF1, FLOAT)
313#define GPIO106_UART1_CTS MFP_CFG_LPM(GPIO106, AF6, FLOAT)
314
315#define GPIO32_UART1_RTS MFP_CFG_LPM(GPIO32, AF4, FLOAT)
316#define GPIO37_UART1_RTS MFP_CFG_LPM(GPIO37, AF2, FLOAT)
317#define GPIO79_UART1_RTS MFP_CFG_LPM(GPIO79, AF3, FLOAT)
318#define GPIO84_UART1_RTS MFP_CFG_LPM(GPIO84, AF1, FLOAT)
319#define GPIO101_UART1_RTS MFP_CFG_LPM(GPIO101, AF6, FLOAT)
320#define GPIO106_UART1_RTS MFP_CFG_LPM(GPIO106, AF1, FLOAT)
321
322#define GPIO34_UART1_DSR MFP_CFG_LPM(GPIO34, AF2, FLOAT)
323#define GPIO36_UART1_DSR MFP_CFG_LPM(GPIO36, AF4, FLOAT)
324#define GPIO81_UART1_DSR MFP_CFG_LPM(GPIO81, AF1, FLOAT)
325#define GPIO83_UART1_DSR MFP_CFG_LPM(GPIO83, AF3, FLOAT)
326#define GPIO103_UART1_DSR MFP_CFG_LPM(GPIO103, AF1, FLOAT)
327#define GPIO105_UART1_DSR MFP_CFG_LPM(GPIO105, AF6, FLOAT)
328
329#define GPIO34_UART1_DTR MFP_CFG_LPM(GPIO34, AF4, FLOAT)
330#define GPIO36_UART1_DTR MFP_CFG_LPM(GPIO36, AF2, FLOAT)
331#define GPIO81_UART1_DTR MFP_CFG_LPM(GPIO81, AF3, FLOAT)
332#define GPIO83_UART1_DTR MFP_CFG_LPM(GPIO83, AF1, FLOAT)
333#define GPIO103_UART1_DTR MFP_CFG_LPM(GPIO103, AF6, FLOAT)
334#define GPIO105_UART1_DTR MFP_CFG_LPM(GPIO105, AF1, FLOAT)
335
336#define GPIO35_UART1_RI MFP_CFG_LPM(GPIO35, AF2, FLOAT)
337#define GPIO82_UART1_RI MFP_CFG_LPM(GPIO82, AF1, FLOAT)
338#define GPIO104_UART1_RI MFP_CFG_LPM(GPIO104, AF1, FLOAT)
339
340#define GPIO33_UART1_DCD MFP_CFG_LPM(GPIO33, AF2, FLOAT)
341#define GPIO80_UART1_DCD MFP_CFG_LPM(GPIO80, AF1, FLOAT)
342#define GPIO102_UART1_DCD MFP_CFG_LPM(GPIO102, AF1, FLOAT)
343
344#define GPIO30_UART1_RXD MFP_CFG_LPM(GPIO30, AF2, FLOAT)
345#define GPIO31_UART1_RXD MFP_CFG_LPM(GPIO31, AF4, FLOAT)
346#define GPIO77_UART1_RXD MFP_CFG_LPM(GPIO77, AF1, FLOAT)
347#define GPIO78_UART1_RXD MFP_CFG_LPM(GPIO78, AF3, FLOAT)
348#define GPIO99_UART1_RXD MFP_CFG_LPM(GPIO99, AF1, FLOAT)
349#define GPIO100_UART1_RXD MFP_CFG_LPM(GPIO100, AF6, FLOAT)
350#define GPIO102_UART1_RXD MFP_CFG_LPM(GPIO102, AF6, FLOAT)
351#define GPIO104_UART1_RXD MFP_CFG_LPM(GPIO104, AF4, FLOAT)
352
353#define GPIO30_UART1_TXD MFP_CFG_LPM(GPIO30, AF4, FLOAT)
354#define GPIO31_UART1_TXD MFP_CFG_LPM(GPIO31, AF2, FLOAT)
355#define GPIO77_UART1_TXD MFP_CFG_LPM(GPIO77, AF3, FLOAT)
356#define GPIO78_UART1_TXD MFP_CFG_LPM(GPIO78, AF1, FLOAT)
357#define GPIO99_UART1_TXD MFP_CFG_LPM(GPIO99, AF6, FLOAT)
358#define GPIO100_UART1_TXD MFP_CFG_LPM(GPIO100, AF1, FLOAT)
359#define GPIO102_UART1_TXD MFP_CFG_LPM(GPIO102, AF4, FLOAT)
360
361/* UART2 */
362#define GPIO15_UART2_CTS MFP_CFG_LPM(GPIO15, AF3, FLOAT)
363#define GPIO16_UART2_CTS MFP_CFG_LPM(GPIO16, AF5, FLOAT)
364#define GPIO111_UART2_CTS MFP_CFG_LPM(GPIO111, AF3, FLOAT)
365#define GPIO114_UART2_CTS MFP_CFG_LPM(GPIO114, AF1, FLOAT)
366
367#define GPIO15_UART2_RTS MFP_CFG_LPM(GPIO15, AF4, FLOAT)
368#define GPIO16_UART2_RTS MFP_CFG_LPM(GPIO16, AF4, FLOAT)
369#define GPIO114_UART2_RTS MFP_CFG_LPM(GPIO114, AF3, FLOAT)
370#define GPIO111_UART2_RTS MFP_CFG_LPM(GPIO111, AF1, FLOAT)
371
372#define GPIO18_UART2_RXD MFP_CFG_LPM(GPIO18, AF5, FLOAT)
373#define GPIO19_UART2_RXD MFP_CFG_LPM(GPIO19, AF4, FLOAT)
374#define GPIO112_UART2_RXD MFP_CFG_LPM(GPIO112, AF1, FLOAT)
375#define GPIO113_UART2_RXD MFP_CFG_LPM(GPIO113, AF3, FLOAT)
376
377#define GPIO18_UART2_TXD MFP_CFG_LPM(GPIO18, AF4, FLOAT)
378#define GPIO19_UART2_TXD MFP_CFG_LPM(GPIO19, AF5, FLOAT)
379#define GPIO112_UART2_TXD MFP_CFG_LPM(GPIO112, AF3, FLOAT)
380#define GPIO113_UART2_TXD MFP_CFG_LPM(GPIO113, AF1, FLOAT)
381
382/* UART3 */
383#define GPIO91_UART3_CTS MFP_CFG_LPM(GPIO91, AF2, FLOAT)
384#define GPIO92_UART3_CTS MFP_CFG_LPM(GPIO92, AF4, FLOAT)
385#define GPIO107_UART3_CTS MFP_CFG_LPM(GPIO107, AF1, FLOAT)
386#define GPIO108_UART3_CTS MFP_CFG_LPM(GPIO108, AF3, FLOAT)
387
388#define GPIO91_UART3_RTS MFP_CFG_LPM(GPIO91, AF4, FLOAT)
389#define GPIO92_UART3_RTS MFP_CFG_LPM(GPIO92, AF2, FLOAT)
390#define GPIO107_UART3_RTS MFP_CFG_LPM(GPIO107, AF3, FLOAT)
391#define GPIO108_UART3_RTS MFP_CFG_LPM(GPIO108, AF1, FLOAT)
392
393#define GPIO7_UART3_RXD MFP_CFG_LPM(GPIO7, AF2, FLOAT)
394#define GPIO8_UART3_RXD MFP_CFG_LPM(GPIO8, AF6, FLOAT)
395#define GPIO93_UART3_RXD MFP_CFG_LPM(GPIO93, AF4, FLOAT)
396#define GPIO94_UART3_RXD MFP_CFG_LPM(GPIO94, AF2, FLOAT)
397#define GPIO109_UART3_RXD MFP_CFG_LPM(GPIO109, AF3, FLOAT)
398#define GPIO110_UART3_RXD MFP_CFG_LPM(GPIO110, AF1, FLOAT)
399
400#define GPIO7_UART3_TXD MFP_CFG_LPM(GPIO7, AF6, FLOAT)
401#define GPIO8_UART3_TXD MFP_CFG_LPM(GPIO8, AF2, FLOAT)
402#define GPIO93_UART3_TXD MFP_CFG_LPM(GPIO93, AF2, FLOAT)
403#define GPIO94_UART3_TXD MFP_CFG_LPM(GPIO94, AF4, FLOAT)
404#define GPIO109_UART3_TXD MFP_CFG_LPM(GPIO109, AF1, FLOAT)
405#define GPIO110_UART3_TXD MFP_CFG_LPM(GPIO110, AF3, FLOAT)
406
407/* USB Host */
408#define GPIO0_2_USBH_PEN MFP_CFG(GPIO0_2, AF1)
409#define GPIO1_2_USBH_PWR MFP_CFG(GPIO1_2, AF1)
410
411/* USB P3 */
412#define GPIO77_USB_P3_1 MFP_CFG(GPIO77, AF2)
413#define GPIO78_USB_P3_2 MFP_CFG(GPIO78, AF2)
414#define GPIO79_USB_P3_3 MFP_CFG(GPIO79, AF2)
415#define GPIO80_USB_P3_4 MFP_CFG(GPIO80, AF2)
416#define GPIO81_USB_P3_5 MFP_CFG(GPIO81, AF2)
417#define GPIO82_USB_P3_6 MFP_CFG(GPIO82, AF2)
418
419/* PWM */
420#define GPIO17_PWM0_OUT MFP_CFG(GPIO17, AF1)
421#define GPIO18_PWM1_OUT MFP_CFG(GPIO18, AF1)
422#define GPIO19_PWM2_OUT MFP_CFG(GPIO19, AF1)
423#define GPIO20_PWM3_OUT MFP_CFG(GPIO20, AF1)
424
425/* CIR */
426#define GPIO8_CIR_OUT MFP_CFG(GPIO8, AF5)
427#define GPIO16_CIR_OUT MFP_CFG(GPIO16, AF3)
428
429#define GPIO20_OW_DQ_IN MFP_CFG(GPIO20, AF5)
430#define GPIO126_OW_DQ MFP_CFG(GPIO126, AF2)
431
432#define GPIO0_DF_RDY MFP_CFG(GPIO0, AF1)
433#define GPIO7_CLK_BYPASS_XSC MFP_CFG(GPIO7, AF7)
434#define GPIO17_EXT_SYNC_MVT_0 MFP_CFG(GPIO17, AF6)
435#define GPIO18_EXT_SYNC_MVT_1 MFP_CFG(GPIO18, AF6)
436#define GPIO19_OST_CHOUT_MVT_0 MFP_CFG(GPIO19, AF6)
437#define GPIO20_OST_CHOUT_MVT_1 MFP_CFG(GPIO20, AF6)
438#define GPIO49_48M_CLK MFP_CFG(GPIO49, AF2)
439#define GPIO126_EXT_CLK MFP_CFG(GPIO126, AF3)
440#define GPIO127_CLK_BYPASS_GB MFP_CFG(GPIO127, AF7)
441#define GPIO71_EXT_MATCH_MVT MFP_CFG(GPIO71, AF6)
442
443#define GPIO3_uIO_IN MFP_CFG(GPIO3, AF1)
444
445#define GPIO4_uSIM_CARD_STATE MFP_CFG(GPIO4, AF1)
446#define GPIO5_uSIM_uCLK MFP_CFG(GPIO5, AF1)
447#define GPIO6_uSIM_uRST MFP_CFG(GPIO6, AF1)
448#define GPIO16_uSIM_UVS_0 MFP_CFG(GPIO16, AF1)
449
450#define GPIO9_SCIO MFP_CFG(GPIO9, AF1)
451#define GPIO20_RTC_MVT MFP_CFG(GPIO20, AF4)
452#define GPIO126_RTC_MVT MFP_CFG(GPIO126, AF1)
453
454/*
455 * PXA300 specific MFP configurations
456 */
457#ifdef CONFIG_CPU_PXA300
458#define GPIO99_USB_P2_2 MFP_CFG(GPIO99, AF2)
459#define GPIO99_USB_P2_5 MFP_CFG(GPIO99, AF3)
460#define GPIO99_USB_P2_6 MFP_CFG(GPIO99, AF4)
461#define GPIO100_USB_P2_2 MFP_CFG(GPIO100, AF4)
462#define GPIO100_USB_P2_5 MFP_CFG(GPIO100, AF5)
463#define GPIO101_USB_P2_1 MFP_CFG(GPIO101, AF2)
464#define GPIO102_USB_P2_4 MFP_CFG(GPIO102, AF2)
465#define GPIO104_USB_P2_3 MFP_CFG(GPIO104, AF2)
466#define GPIO105_USB_P2_5 MFP_CFG(GPIO105, AF2)
467#define GPIO100_USB_P2_6 MFP_CFG(GPIO100, AF2)
468#define GPIO106_USB_P2_7 MFP_CFG(GPIO106, AF2)
469#define GPIO103_USB_P2_8 MFP_CFG(GPIO103, AF2)
470
471/* U2D UTMI */
472#define GPIO38_UTM_CLK MFP_CFG(GPIO38, AF1)
473#define GPIO26_U2D_RXERROR MFP_CFG(GPIO26, AF3)
474#define GPIO50_U2D_RXERROR MFP_CFG(GPIO50, AF1)
475#define GPIO89_U2D_RXERROR MFP_CFG(GPIO89, AF5)
476#define GPIO24_UTM_RXVALID MFP_CFG(GPIO24, AF3)
477#define GPIO48_UTM_RXVALID MFP_CFG(GPIO48, AF2)
478#define GPIO87_UTM_RXVALID MFP_CFG(GPIO87, AF5)
479#define GPIO25_UTM_RXACTIVE MFP_CFG(GPIO25, AF3)
480#define GPIO47_UTM_RXACTIVE MFP_CFG(GPIO47, AF2)
481#define GPIO49_UTM_RXACTIVE MFP_CFG(GPIO49, AF1)
482#define GPIO88_UTM_RXACTIVE MFP_CFG(GPIO88, AF5)
483#define GPIO53_UTM_TXREADY MFP_CFG(GPIO53, AF1)
484#define GPIO67_UTM_LINESTATE_0 MFP_CFG(GPIO67, AF3)
485#define GPIO92_UTM_LINESTATE_0 MFP_CFG(GPIO92, AF3)
486#define GPIO104_UTM_LINESTATE_0 MFP_CFG(GPIO104, AF3)
487#define GPIO109_UTM_LINESTATE_0 MFP_CFG(GPIO109, AF4)
488#define GPIO68_UTM_LINESTATE_1 MFP_CFG(GPIO68, AF3)
489#define GPIO93_UTM_LINESTATE_1 MFP_CFG(GPIO93, AF3)
490#define GPIO105_UTM_LINESTATE_1 MFP_CFG(GPIO105, AF3)
491#define GPIO27_U2D_OPMODE_0 MFP_CFG(GPIO27, AF4)
492#define GPIO51_U2D_OPMODE_0 MFP_CFG(GPIO51, AF2)
493#define GPIO90_U2D_OPMODE_0 MFP_CFG(GPIO90, AF7)
494#define GPIO28_U2D_OPMODE_1 MFP_CFG(GPIO28, AF4)
495#define GPIO52_U2D_OPMODE_1 MFP_CFG(GPIO52, AF2)
496#define GPIO106_U2D_OPMODE_1 MFP_CFG(GPIO106, AF3)
497#define GPIO110_U2D_OPMODE_1 MFP_CFG(GPIO110, AF5)
498#define GPIO76_U2D_RESET MFP_CFG(GPIO76, AF1)
499#define GPIO95_U2D_RESET MFP_CFG(GPIO95, AF2)
500#define GPIO100_U2D_RESET MFP_CFG(GPIO100, AF3)
501#define GPIO66_U2D_SUSPEND MFP_CFG(GPIO66, AF3)
502#define GPIO98_U2D_SUSPEND MFP_CFG(GPIO98, AF2)
503#define GPIO103_U2D_SUSPEND MFP_CFG(GPIO103, AF3)
504#define GPIO65_U2D_TERM_SEL MFP_CFG(GPIO65, AF5)
505#define GPIO97_U2D_TERM_SEL MFP_CFG(GPIO97, AF3)
506#define GPIO102_U2D_TERM_SEL MFP_CFG(GPIO102, AF5)
507#define GPIO29_U2D_TXVALID MFP_CFG(GPIO29, AF3)
508#define GPIO52_U2D_TXVALID MFP_CFG(GPIO52, AF4)
509#define GPIO69_U2D_TXVALID MFP_CFG(GPIO69, AF3)
510#define GPIO85_U2D_TXVALID MFP_CFG(GPIO85, AF7)
511#define GPIO64_U2D_XCVR_SEL MFP_CFG(GPIO64, AF5)
512#define GPIO96_U2D_XCVR_SEL MFP_CFG(GPIO96, AF3)
513#define GPIO101_U2D_XCVR_SEL MFP_CFG(GPIO101, AF5)
514#define GPIO30_UTM_PHYDATA_0 MFP_CFG(GPIO30, AF3)
515#define GPIO31_UTM_PHYDATA_1 MFP_CFG(GPIO31, AF3)
516#define GPIO32_UTM_PHYDATA_2 MFP_CFG(GPIO32, AF3)
517#define GPIO33_UTM_PHYDATA_3 MFP_CFG(GPIO33, AF3)
518#define GPIO34_UTM_PHYDATA_4 MFP_CFG(GPIO34, AF3)
519#define GPIO35_UTM_PHYDATA_5 MFP_CFG(GPIO35, AF3)
520#define GPIO36_UTM_PHYDATA_6 MFP_CFG(GPIO36, AF3)
521#define GPIO37_UTM_PHYDATA_7 MFP_CFG(GPIO37, AF3)
522#define GPIO39_UTM_PHYDATA_0 MFP_CFG(GPIO39, AF3)
523#define GPIO40_UTM_PHYDATA_1 MFP_CFG(GPIO40, AF3)
524#define GPIO41_UTM_PHYDATA_2 MFP_CFG(GPIO41, AF3)
525#define GPIO42_UTM_PHYDATA_3 MFP_CFG(GPIO42, AF3)
526#define GPIO43_UTM_PHYDATA_4 MFP_CFG(GPIO43, AF3)
527#define GPIO44_UTM_PHYDATA_5 MFP_CFG(GPIO44, AF3)
528#define GPIO45_UTM_PHYDATA_6 MFP_CFG(GPIO45, AF3)
529#define GPIO46_UTM_PHYDATA_7 MFP_CFG(GPIO46, AF3)
530#endif /* CONFIG_CPU_PXA300 */
531
532/*
533 * PXA310 specific MFP configurations
534 */
535#ifdef CONFIG_CPU_PXA310
536/* USB P2 */
537#define GPIO36_USB_P2_1 MFP_CFG(GPIO36, AF1)
538#define GPIO30_USB_P2_2 MFP_CFG(GPIO30, AF1)
539#define GPIO35_USB_P2_3 MFP_CFG(GPIO35, AF1)
540#define GPIO32_USB_P2_4 MFP_CFG(GPIO32, AF1)
541#define GPIO34_USB_P2_5 MFP_CFG(GPIO34, AF1)
542#define GPIO31_USB_P2_6 MFP_CFG(GPIO31, AF1)
543
544/* MMC1 */
545#define GPIO24_MMC1_CMD MFP_CFG(GPIO24, AF3)
546#define GPIO29_MMC1_DAT0 MFP_CFG(GPIO29, AF3)
547
548/* MMC3 */
549#define GPIO103_MMC3_CLK MFP_CFG(GPIO103, AF2)
550#define GPIO105_MMC3_CMD MFP_CFG(GPIO105, AF2)
551#define GPIO11_2_MMC3_CLK MFP_CFG(GPIO11_2, AF1)
552#define GPIO12_2_MMC3_CMD MFP_CFG(GPIO12_2, AF1)
553#define GPIO7_2_MMC3_DAT0 MFP_CFG(GPIO7_2, AF1)
554#define GPIO8_2_MMC3_DAT1 MFP_CFG(GPIO8_2, AF1)
555#define GPIO9_2_MMC3_DAT2 MFP_CFG(GPIO9_2, AF1)
556#define GPIO10_2_MMC3_DAT3 MFP_CFG(GPIO10_2, AF1)
557
558/* ULPI */
559#define GPIO38_ULPI_CLK MFP_CFG(GPIO38, AF1)
560#define GPIO30_ULPI_DATA_OUT_0 MFP_CFG(GPIO30, AF3)
561#define GPIO31_ULPI_DATA_OUT_1 MFP_CFG(GPIO31, AF3)
562#define GPIO32_ULPI_DATA_OUT_2 MFP_CFG(GPIO32, AF3)
563#define GPIO33_ULPI_DATA_OUT_3 MFP_CFG(GPIO33, AF3)
564#define GPIO34_ULPI_DATA_OUT_4 MFP_CFG(GPIO34, AF3)
565#define GPIO35_ULPI_DATA_OUT_5 MFP_CFG(GPIO35, AF3)
566#define GPIO36_ULPI_DATA_OUT_6 MFP_CFG(GPIO36, AF3)
567#define GPIO37_ULPI_DATA_OUT_7 MFP_CFG(GPIO37, AF3)
568#define GPIO33_ULPI_OTG_INTR MFP_CFG(GPIO33, AF1)
569
570#define ULPI_DIR MFP_CFG_DRV(ULPI_DIR, MFP_AF0, MFP_DS01X)
571#define ULPI_NXT MFP_CFG_DRV(ULPI_NXT, MFP_AF0, MFP_DS01X)
572#define ULPI_STP MFP_CFG_DRV(ULPI_STP, MFP_AF0, MFP_DS01X)
573#endif /* CONFIG_CPU_PXA310 */
574
575#endif /* __ASM_ARCH_MFP_PXA300_H */
diff --git a/arch/arm/mach-pxa/include/mach/mfp-pxa320.h b/arch/arm/mach-pxa/include/mach/mfp-pxa320.h
new file mode 100644
index 000000000000..74990510cf34
--- /dev/null
+++ b/arch/arm/mach-pxa/include/mach/mfp-pxa320.h
@@ -0,0 +1,447 @@
1/*
2 * arch/arm/mach-pxa/include/mach/mfp-pxa320.h
3 *
4 * PXA320 specific MFP configuration definitions
5 *
6 * Copyright (C) 2007 Marvell International Ltd.
7 * 2007-08-21: eric miao <eric.miao@marvell.com>
8 * initial version
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
13 */
14
15#ifndef __ASM_ARCH_MFP_PXA320_H
16#define __ASM_ARCH_MFP_PXA320_H
17
18#include <mach/mfp.h>
19#include <mach/mfp-pxa3xx.h>
20
21/* GPIO */
22#define GPIO46_GPIO MFP_CFG(GPIO46, AF0)
23#define GPIO49_GPIO MFP_CFG(GPIO49, AF0)
24#define GPIO50_GPIO MFP_CFG(GPIO50, AF0)
25#define GPIO51_GPIO MFP_CFG(GPIO51, AF0)
26#define GPIO52_GPIO MFP_CFG(GPIO52, AF0)
27
28#define GPIO7_2_GPIO MFP_CFG(GPIO7_2, AF0)
29#define GPIO8_2_GPIO MFP_CFG(GPIO8_2, AF0)
30#define GPIO9_2_GPIO MFP_CFG(GPIO9_2, AF0)
31#define GPIO10_2_GPIO MFP_CFG(GPIO10_2, AF0)
32#define GPIO11_2_GPIO MFP_CFG(GPIO11_2, AF0)
33#define GPIO12_2_GPIO MFP_CFG(GPIO12_2, AF0)
34#define GPIO13_2_GPIO MFP_CFG(GPIO13_2, AF0)
35#define GPIO14_2_GPIO MFP_CFG(GPIO14_2, AF0)
36#define GPIO15_2_GPIO MFP_CFG(GPIO15_2, AF0)
37#define GPIO16_2_GPIO MFP_CFG(GPIO16_2, AF0)
38#define GPIO17_2_GPIO MFP_CFG(GPIO17_2, AF0)
39
40/* Chip Select */
41#define GPIO4_nCS3 MFP_CFG(GPIO4, AF1)
42
43/* AC97 */
44#define GPIO34_AC97_SYSCLK MFP_CFG(GPIO34, AF1)
45#define GPIO39_AC97_BITCLK MFP_CFG(GPIO39, AF1)
46#define GPIO40_AC97_nACRESET MFP_CFG(GPIO40, AF1)
47#define GPIO35_AC97_SDATA_IN_0 MFP_CFG(GPIO35, AF1)
48#define GPIO36_AC97_SDATA_IN_1 MFP_CFG(GPIO36, AF1)
49#define GPIO32_AC97_SDATA_IN_2 MFP_CFG(GPIO32, AF2)
50#define GPIO33_AC97_SDATA_IN_3 MFP_CFG(GPIO33, AF2)
51#define GPIO11_AC97_SDATA_IN_2 MFP_CFG(GPIO11, AF3)
52#define GPIO12_AC97_SDATA_IN_3 MFP_CFG(GPIO12, AF3)
53#define GPIO37_AC97_SDATA_OUT MFP_CFG(GPIO37, AF1)
54#define GPIO38_AC97_SYNC MFP_CFG(GPIO38, AF1)
55
56/* I2C */
57#define GPIO32_I2C_SCL MFP_CFG_LPM(GPIO32, AF1, PULL_HIGH)
58#define GPIO33_I2C_SDA MFP_CFG_LPM(GPIO33, AF1, PULL_HIGH)
59
60/* QCI */
61#define GPIO49_CI_DD_0 MFP_CFG_DRV(GPIO49, AF1, DS04X)
62#define GPIO50_CI_DD_1 MFP_CFG_DRV(GPIO50, AF1, DS04X)
63#define GPIO51_CI_DD_2 MFP_CFG_DRV(GPIO51, AF1, DS04X)
64#define GPIO52_CI_DD_3 MFP_CFG_DRV(GPIO52, AF1, DS04X)
65#define GPIO53_CI_DD_4 MFP_CFG_DRV(GPIO53, AF1, DS04X)
66#define GPIO54_CI_DD_5 MFP_CFG_DRV(GPIO54, AF1, DS04X)
67#define GPIO55_CI_DD_6 MFP_CFG_DRV(GPIO55, AF1, DS04X)
68#define GPIO56_CI_DD_7 MFP_CFG_DRV(GPIO56, AF0, DS04X)
69#define GPIO57_CI_DD_8 MFP_CFG_DRV(GPIO57, AF1, DS04X)
70#define GPIO58_CI_DD_9 MFP_CFG_DRV(GPIO58, AF1, DS04X)
71#define GPIO59_CI_MCLK MFP_CFG_DRV(GPIO59, AF0, DS04X)
72#define GPIO60_CI_PCLK MFP_CFG_DRV(GPIO60, AF0, DS04X)
73#define GPIO61_CI_HSYNC MFP_CFG_DRV(GPIO61, AF0, DS04X)
74#define GPIO62_CI_VSYNC MFP_CFG_DRV(GPIO62, AF0, DS04X)
75
76#define GPIO31_CIR_OUT MFP_CFG(GPIO31, AF5)
77
78#define GPIO0_2_CLK_EXT MFP_CFG(GPIO0_2, AF3)
79#define GPIO0_DRQ MFP_CFG(GPIO0, AF2)
80#define GPIO11_EXT_SYNC0 MFP_CFG(GPIO11, AF5)
81#define GPIO12_EXT_SYNC1 MFP_CFG(GPIO12, AF6)
82#define GPIO0_2_HZ_CLK MFP_CFG(GPIO0_2, AF1)
83#define GPIO14_HZ_CLK MFP_CFG(GPIO14, AF4)
84#define GPIO30_ICP_RXD MFP_CFG(GPIO30, AF1)
85#define GPIO31_ICP_TXD MFP_CFG(GPIO31, AF1)
86
87#define GPIO83_KP_DKIN_0 MFP_CFG_LPM(GPIO83, AF3, FLOAT)
88#define GPIO84_KP_DKIN_1 MFP_CFG_LPM(GPIO84, AF3, FLOAT)
89#define GPIO85_KP_DKIN_2 MFP_CFG_LPM(GPIO85, AF3, FLOAT)
90#define GPIO86_KP_DKIN_3 MFP_CFG_LPM(GPIO86, AF3, FLOAT)
91
92#define GPIO105_KP_DKIN_0 MFP_CFG_LPM(GPIO105, AF2, FLOAT)
93#define GPIO106_KP_DKIN_1 MFP_CFG_LPM(GPIO106, AF2, FLOAT)
94#define GPIO107_KP_DKIN_2 MFP_CFG_LPM(GPIO107, AF2, FLOAT)
95#define GPIO108_KP_DKIN_3 MFP_CFG_LPM(GPIO108, AF2, FLOAT)
96#define GPIO109_KP_DKIN_4 MFP_CFG_LPM(GPIO109, AF2, FLOAT)
97#define GPIO110_KP_DKIN_5 MFP_CFG_LPM(GPIO110, AF2, FLOAT)
98#define GPIO111_KP_DKIN_6 MFP_CFG_LPM(GPIO111, AF2, FLOAT)
99#define GPIO112_KP_DKIN_7 MFP_CFG_LPM(GPIO112, AF2, FLOAT)
100
101#define GPIO113_KP_DKIN_0 MFP_CFG_LPM(GPIO113, AF2, FLOAT)
102#define GPIO114_KP_DKIN_1 MFP_CFG_LPM(GPIO114, AF2, FLOAT)
103#define GPIO115_KP_DKIN_2 MFP_CFG_LPM(GPIO115, AF2, FLOAT)
104#define GPIO116_KP_DKIN_3 MFP_CFG_LPM(GPIO116, AF2, FLOAT)
105#define GPIO117_KP_DKIN_4 MFP_CFG_LPM(GPIO117, AF2, FLOAT)
106#define GPIO118_KP_DKIN_5 MFP_CFG_LPM(GPIO118, AF2, FLOAT)
107#define GPIO119_KP_DKIN_6 MFP_CFG_LPM(GPIO119, AF2, FLOAT)
108#define GPIO120_KP_DKIN_7 MFP_CFG_LPM(GPIO120, AF2, FLOAT)
109
110#define GPIO127_KP_DKIN_0 MFP_CFG_LPM(GPIO127, AF2, FLOAT)
111#define GPIO126_KP_DKIN_1 MFP_CFG_LPM(GPIO126, AF2, FLOAT)
112
113#define GPIO2_2_KP_DKIN_0 MFP_CFG_LPM(GPIO2_2, AF2, FLOAT)
114#define GPIO3_2_KP_DKIN_1 MFP_CFG_LPM(GPIO3_2, AF2, FLOAT)
115#define GPIO125_KP_DKIN_2 MFP_CFG_LPM(GPIO125, AF2, FLOAT)
116#define GPIO124_KP_DKIN_3 MFP_CFG_LPM(GPIO124, AF2, FLOAT)
117#define GPIO123_KP_DKIN_4 MFP_CFG_LPM(GPIO123, AF2, FLOAT)
118#define GPIO122_KP_DKIN_5 MFP_CFG_LPM(GPIO122, AF2, FLOAT)
119#define GPIO121_KP_DKIN_6 MFP_CFG_LPM(GPIO121, AF2, FLOAT)
120#define GPIO4_2_KP_DKIN_7 MFP_CFG_LPM(GPIO4_2, AF2, FLOAT)
121
122#define GPIO113_KP_MKIN_0 MFP_CFG_LPM(GPIO113, AF1, FLOAT)
123#define GPIO114_KP_MKIN_1 MFP_CFG_LPM(GPIO114, AF1, FLOAT)
124#define GPIO115_KP_MKIN_2 MFP_CFG_LPM(GPIO115, AF1, FLOAT)
125#define GPIO116_KP_MKIN_3 MFP_CFG_LPM(GPIO116, AF1, FLOAT)
126#define GPIO117_KP_MKIN_4 MFP_CFG_LPM(GPIO117, AF1, FLOAT)
127#define GPIO118_KP_MKIN_5 MFP_CFG_LPM(GPIO118, AF1, FLOAT)
128#define GPIO119_KP_MKIN_6 MFP_CFG_LPM(GPIO119, AF1, FLOAT)
129#define GPIO120_KP_MKIN_7 MFP_CFG_LPM(GPIO120, AF1, FLOAT)
130
131#define GPIO83_KP_MKOUT_0 MFP_CFG_LPM(GPIO83, AF2, DRIVE_HIGH)
132#define GPIO84_KP_MKOUT_1 MFP_CFG_LPM(GPIO84, AF2, DRIVE_HIGH)
133#define GPIO85_KP_MKOUT_2 MFP_CFG_LPM(GPIO85, AF2, DRIVE_HIGH)
134#define GPIO86_KP_MKOUT_3 MFP_CFG_LPM(GPIO86, AF2, DRIVE_HIGH)
135#define GPIO13_KP_MKOUT_4 MFP_CFG_LPM(GPIO13, AF3, DRIVE_HIGH)
136#define GPIO14_KP_MKOUT_5 MFP_CFG_LPM(GPIO14, AF3, DRIVE_HIGH)
137
138#define GPIO121_KP_MKOUT_0 MFP_CFG_LPM(GPIO121, AF1, DRIVE_HIGH)
139#define GPIO122_KP_MKOUT_1 MFP_CFG_LPM(GPIO122, AF1, DRIVE_HIGH)
140#define GPIO123_KP_MKOUT_2 MFP_CFG_LPM(GPIO123, AF1, DRIVE_HIGH)
141#define GPIO124_KP_MKOUT_3 MFP_CFG_LPM(GPIO124, AF1, DRIVE_HIGH)
142#define GPIO125_KP_MKOUT_4 MFP_CFG_LPM(GPIO125, AF1, DRIVE_HIGH)
143#define GPIO126_KP_MKOUT_5 MFP_CFG_LPM(GPIO126, AF1, DRIVE_HIGH)
144#define GPIO127_KP_MKOUT_6 MFP_CFG_LPM(GPIO127, AF1, DRIVE_HIGH)
145#define GPIO5_2_KP_MKOUT_7 MFP_CFG_LPM(GPIO5_2, AF1, DRIVE_HIGH)
146
147/* LCD */
148#define GPIO6_2_LCD_LDD_0 MFP_CFG_DRV(GPIO6_2, AF1, DS01X)
149#define GPIO7_2_LCD_LDD_1 MFP_CFG_DRV(GPIO7_2, AF1, DS01X)
150#define GPIO8_2_LCD_LDD_2 MFP_CFG_DRV(GPIO8_2, AF1, DS01X)
151#define GPIO9_2_LCD_LDD_3 MFP_CFG_DRV(GPIO9_2, AF1, DS01X)
152#define GPIO10_2_LCD_LDD_4 MFP_CFG_DRV(GPIO10_2, AF1, DS01X)
153#define GPIO11_2_LCD_LDD_5 MFP_CFG_DRV(GPIO11_2, AF1, DS01X)
154#define GPIO12_2_LCD_LDD_6 MFP_CFG_DRV(GPIO12_2, AF1, DS01X)
155#define GPIO13_2_LCD_LDD_7 MFP_CFG_DRV(GPIO13_2, AF1, DS01X)
156#define GPIO63_LCD_LDD_8 MFP_CFG_DRV(GPIO63, AF1, DS01X)
157#define GPIO64_LCD_LDD_9 MFP_CFG_DRV(GPIO64, AF1, DS01X)
158#define GPIO65_LCD_LDD_10 MFP_CFG_DRV(GPIO65, AF1, DS01X)
159#define GPIO66_LCD_LDD_11 MFP_CFG_DRV(GPIO66, AF1, DS01X)
160#define GPIO67_LCD_LDD_12 MFP_CFG_DRV(GPIO67, AF1, DS01X)
161#define GPIO68_LCD_LDD_13 MFP_CFG_DRV(GPIO68, AF1, DS01X)
162#define GPIO69_LCD_LDD_14 MFP_CFG_DRV(GPIO69, AF1, DS01X)
163#define GPIO70_LCD_LDD_15 MFP_CFG_DRV(GPIO70, AF1, DS01X)
164#define GPIO71_LCD_LDD_16 MFP_CFG_DRV(GPIO71, AF1, DS01X)
165#define GPIO72_LCD_LDD_17 MFP_CFG_DRV(GPIO72, AF1, DS01X)
166#define GPIO73_LCD_CS_N MFP_CFG_DRV(GPIO73, AF2, DS01X)
167#define GPIO74_LCD_VSYNC MFP_CFG_DRV(GPIO74, AF2, DS01X)
168#define GPIO14_2_LCD_FCLK MFP_CFG_DRV(GPIO14_2, AF1, DS01X)
169#define GPIO15_2_LCD_LCLK MFP_CFG_DRV(GPIO15_2, AF1, DS01X)
170#define GPIO16_2_LCD_PCLK MFP_CFG_DRV(GPIO16_2, AF1, DS01X)
171#define GPIO17_2_LCD_BIAS MFP_CFG_DRV(GPIO17_2, AF1, DS01X)
172#define GPIO64_LCD_VSYNC MFP_CFG_DRV(GPIO64, AF2, DS01X)
173#define GPIO63_LCD_CS_N MFP_CFG_DRV(GPIO63, AF2, DS01X)
174
175#define GPIO6_2_MLCD_DD_0 MFP_CFG_DRV(GPIO6_2, AF7, DS08X)
176#define GPIO7_2_MLCD_DD_1 MFP_CFG_DRV(GPIO7_2, AF7, DS08X)
177#define GPIO8_2_MLCD_DD_2 MFP_CFG_DRV(GPIO8_2, AF7, DS08X)
178#define GPIO9_2_MLCD_DD_3 MFP_CFG_DRV(GPIO9_2, AF7, DS08X)
179#define GPIO10_2_MLCD_DD_4 MFP_CFG_DRV(GPIO10_2, AF7, DS08X)
180#define GPIO11_2_MLCD_DD_5 MFP_CFG_DRV(GPIO11_2, AF7, DS08X)
181#define GPIO12_2_MLCD_DD_6 MFP_CFG_DRV(GPIO12_2, AF7, DS08X)
182#define GPIO13_2_MLCD_DD_7 MFP_CFG_DRV(GPIO13_2, AF7, DS08X)
183#define GPIO63_MLCD_DD_8 MFP_CFG_DRV(GPIO63, AF7, DS08X)
184#define GPIO64_MLCD_DD_9 MFP_CFG_DRV(GPIO64, AF7, DS08X)
185#define GPIO65_MLCD_DD_10 MFP_CFG_DRV(GPIO65, AF7, DS08X)
186#define GPIO66_MLCD_DD_11 MFP_CFG_DRV(GPIO66, AF7, DS08X)
187#define GPIO67_MLCD_DD_12 MFP_CFG_DRV(GPIO67, AF7, DS08X)
188#define GPIO68_MLCD_DD_13 MFP_CFG_DRV(GPIO68, AF7, DS08X)
189#define GPIO69_MLCD_DD_14 MFP_CFG_DRV(GPIO69, AF7, DS08X)
190#define GPIO70_MLCD_DD_15 MFP_CFG_DRV(GPIO70, AF7, DS08X)
191#define GPIO71_MLCD_DD_16 MFP_CFG_DRV(GPIO71, AF7, DS08X)
192#define GPIO72_MLCD_DD_17 MFP_CFG_DRV(GPIO72, AF7, DS08X)
193#define GPIO73_MLCD_CS MFP_CFG_DRV(GPIO73, AF7, DS08X)
194#define GPIO74_MLCD_VSYNC MFP_CFG_DRV(GPIO74, AF7, DS08X)
195#define GPIO14_2_MLCD_FCLK MFP_CFG_DRV(GPIO14_2, AF7, DS08X)
196#define GPIO15_2_MLCD_LCLK MFP_CFG_DRV(GPIO15_2, AF7, DS08X)
197#define GPIO16_2_MLCD_PCLK MFP_CFG_DRV(GPIO16_2, AF7, DS08X)
198#define GPIO17_2_MLCD_BIAS MFP_CFG_DRV(GPIO17_2, AF7, DS08X)
199
200/* MMC1 */
201#define GPIO9_MMC1_CMD MFP_CFG_LPM(GPIO9, AF4, DRIVE_HIGH)
202#define GPIO22_MMC1_CLK MFP_CFG_LPM(GPIO22, AF4, DRIVE_HIGH)
203#define GPIO23_MMC1_CMD MFP_CFG_LPM(GPIO23, AF4, DRIVE_HIGH)
204#define GPIO30_MMC1_CLK MFP_CFG_LPM(GPIO30, AF4, DRIVE_HIGH)
205#define GPIO31_MMC1_CMD MFP_CFG_LPM(GPIO31, AF4, DRIVE_HIGH)
206#define GPIO5_MMC1_DAT0 MFP_CFG_LPM(GPIO5, AF4, DRIVE_HIGH)
207#define GPIO6_MMC1_DAT1 MFP_CFG_LPM(GPIO6, AF4, DRIVE_HIGH)
208#define GPIO7_MMC1_DAT2 MFP_CFG_LPM(GPIO7, AF4, DRIVE_HIGH)
209#define GPIO8_MMC1_DAT3 MFP_CFG_LPM(GPIO8, AF4, DRIVE_HIGH)
210#define GPIO18_MMC1_DAT0 MFP_CFG_LPM(GPIO18, AF4, DRIVE_HIGH)
211#define GPIO19_MMC1_DAT1 MFP_CFG_LPM(GPIO19, AF4, DRIVE_HIGH)
212#define GPIO20_MMC1_DAT2 MFP_CFG_LPM(GPIO20, AF4, DRIVE_HIGH)
213#define GPIO21_MMC1_DAT3 MFP_CFG_LPM(GPIO21, AF4, DRIVE_HIGH)
214
215#define GPIO28_MMC2_CLK MFP_CFG_LPM(GPIO28, AF4, PULL_HIGH)
216#define GPIO29_MMC2_CMD MFP_CFG_LPM(GPIO29, AF4, PULL_HIGH)
217#define GPIO30_MMC2_CLK MFP_CFG_LPM(GPIO30, AF3, PULL_HIGH)
218#define GPIO31_MMC2_CMD MFP_CFG_LPM(GPIO31, AF3, PULL_HIGH)
219#define GPIO79_MMC2_CLK MFP_CFG_LPM(GPIO79, AF4, PULL_HIGH)
220#define GPIO80_MMC2_CMD MFP_CFG_LPM(GPIO80, AF4, PULL_HIGH)
221
222#define GPIO5_MMC2_DAT0 MFP_CFG_LPM(GPIO5, AF2, PULL_HIGH)
223#define GPIO6_MMC2_DAT1 MFP_CFG_LPM(GPIO6, AF2, PULL_HIGH)
224#define GPIO7_MMC2_DAT2 MFP_CFG_LPM(GPIO7, AF2, PULL_HIGH)
225#define GPIO8_MMC2_DAT3 MFP_CFG_LPM(GPIO8, AF2, PULL_HIGH)
226#define GPIO24_MMC2_DAT0 MFP_CFG_LPM(GPIO24, AF4, PULL_HIGH)
227#define GPIO75_MMC2_DAT0 MFP_CFG_LPM(GPIO75, AF4, PULL_HIGH)
228#define GPIO25_MMC2_DAT1 MFP_CFG_LPM(GPIO25, AF4, PULL_HIGH)
229#define GPIO76_MMC2_DAT1 MFP_CFG_LPM(GPIO76, AF4, PULL_HIGH)
230#define GPIO26_MMC2_DAT2 MFP_CFG_LPM(GPIO26, AF4, PULL_HIGH)
231#define GPIO77_MMC2_DAT2 MFP_CFG_LPM(GPIO77, AF4, PULL_HIGH)
232#define GPIO27_MMC2_DAT3 MFP_CFG_LPM(GPIO27, AF4, PULL_HIGH)
233#define GPIO78_MMC2_DAT3 MFP_CFG_LPM(GPIO78, AF4, PULL_HIGH)
234
235/* 1-Wire */
236#define GPIO14_ONE_WIRE MFP_CFG_LPM(GPIO14, AF5, FLOAT)
237#define GPIO0_2_ONE_WIRE MFP_CFG_LPM(GPIO0_2, AF2, FLOAT)
238
239/* SSP1 */
240#define GPIO87_SSP1_EXTCLK MFP_CFG(GPIO87, AF1)
241#define GPIO88_SSP1_SYSCLK MFP_CFG(GPIO88, AF1)
242#define GPIO83_SSP1_SCLK MFP_CFG(GPIO83, AF1)
243#define GPIO84_SSP1_SFRM MFP_CFG(GPIO84, AF1)
244#define GPIO85_SSP1_RXD MFP_CFG(GPIO85, AF6)
245#define GPIO85_SSP1_TXD MFP_CFG(GPIO85, AF1)
246#define GPIO86_SSP1_RXD MFP_CFG(GPIO86, AF1)
247#define GPIO86_SSP1_TXD MFP_CFG(GPIO86, AF6)
248
249/* SSP2 */
250#define GPIO39_SSP2_EXTCLK MFP_CFG(GPIO39, AF2)
251#define GPIO40_SSP2_SYSCLK MFP_CFG(GPIO40, AF2)
252#define GPIO12_SSP2_SCLK MFP_CFG(GPIO12, AF2)
253#define GPIO35_SSP2_SCLK MFP_CFG(GPIO35, AF2)
254#define GPIO36_SSP2_SFRM MFP_CFG(GPIO36, AF2)
255#define GPIO37_SSP2_RXD MFP_CFG(GPIO37, AF5)
256#define GPIO37_SSP2_TXD MFP_CFG(GPIO37, AF2)
257#define GPIO38_SSP2_RXD MFP_CFG(GPIO38, AF2)
258#define GPIO38_SSP2_TXD MFP_CFG(GPIO38, AF5)
259
260#define GPIO69_SSP3_SCLK MFP_CFG(GPIO69, AF2, DS08X, FLOAT)
261#define GPIO70_SSP3_FRM MFP_CFG(GPIO70, AF2, DS08X, DRIVE_LOW)
262#define GPIO89_SSP3_SCLK MFP_CFG(GPIO89, AF1, DS08X, FLOAT)
263#define GPIO90_SSP3_FRM MFP_CFG(GPIO90, AF1, DS08X, DRIVE_LOW)
264#define GPIO71_SSP3_RXD MFP_CFG_X(GPIO71, AF5, DS08X, FLOAT)
265#define GPIO71_SSP3_TXD MFP_CFG_X(GPIO71, AF2, DS08X, DRIVE_LOW)
266#define GPIO72_SSP3_RXD MFP_CFG_X(GPIO72, AF2, DS08X, FLOAT)
267#define GPIO72_SSP3_TXD MFP_CFG_X(GPIO72, AF5, DS08X, DRIVE_LOW)
268#define GPIO91_SSP3_RXD MFP_CFG_X(GPIO91, AF5, DS08X, FLOAT)
269#define GPIO91_SSP3_TXD MFP_CFG_X(GPIO91, AF1, DS08X, DRIVE_LOW)
270#define GPIO92_SSP3_RXD MFP_CFG_X(GPIO92, AF1, DS08X, FLOAT)
271#define GPIO92_SSP3_TXD MFP_CFG_X(GPIO92, AF5, DS08X, DRIVE_LOW)
272
273#define GPIO93_SSP4_SCLK MFP_CFG_LPM(GPIO93, AF1, PULL_HIGH)
274#define GPIO94_SSP4_FRM MFP_CFG_LPM(GPIO94, AF1, PULL_HIGH)
275#define GPIO94_SSP4_RXD MFP_CFG_LPM(GPIO94, AF5, PULL_HIGH)
276#define GPIO95_SSP4_RXD MFP_CFG_LPM(GPIO95, AF5, PULL_HIGH)
277#define GPIO95_SSP4_TXD MFP_CFG_LPM(GPIO95, AF1, PULL_HIGH)
278#define GPIO96_SSP4_RXD MFP_CFG_LPM(GPIO96, AF1, PULL_HIGH)
279#define GPIO96_SSP4_TXD MFP_CFG_LPM(GPIO96, AF5, PULL_HIGH)
280
281/* UART1 */
282#define GPIO41_UART1_RXD MFP_CFG_LPM(GPIO41, AF2, FLOAT)
283#define GPIO41_UART1_TXD MFP_CFG_LPM(GPIO41, AF4, FLOAT)
284#define GPIO42_UART1_RXD MFP_CFG_LPM(GPIO42, AF4, FLOAT)
285#define GPIO42_UART1_TXD MFP_CFG_LPM(GPIO42, AF2, FLOAT)
286#define GPIO97_UART1_RXD MFP_CFG_LPM(GPIO97, AF1, FLOAT)
287#define GPIO97_UART1_TXD MFP_CFG_LPM(GPIO97, AF6, FLOAT)
288#define GPIO98_UART1_RXD MFP_CFG_LPM(GPIO98, AF6, FLOAT)
289#define GPIO98_UART1_TXD MFP_CFG_LPM(GPIO98, AF1, FLOAT)
290#define GPIO43_UART1_CTS MFP_CFG_LPM(GPIO43, AF2, FLOAT)
291#define GPIO43_UART1_RTS MFP_CFG_LPM(GPIO43, AF4, FLOAT)
292#define GPIO48_UART1_CTS MFP_CFG_LPM(GPIO48, AF4, FLOAT)
293#define GPIO48_UART1_RTS MFP_CFG_LPM(GPIO48, AF2, FLOAT)
294#define GPIO99_UART1_CTS MFP_CFG_LPM(GPIO99, AF1, FLOAT)
295#define GPIO99_UART1_RTS MFP_CFG_LPM(GPIO99, AF6, FLOAT)
296#define GPIO104_UART1_CTS MFP_CFG_LPM(GPIO104, AF6, FLOAT)
297#define GPIO104_UART1_RTS MFP_CFG_LPM(GPIO104, AF1, FLOAT)
298#define GPIO45_UART1_DTR MFP_CFG_LPM(GPIO45, AF4, FLOAT)
299#define GPIO45_UART1_DSR MFP_CFG_LPM(GPIO45, AF2, FLOAT)
300#define GPIO47_UART1_DTR MFP_CFG_LPM(GPIO47, AF2, FLOAT)
301#define GPIO47_UART1_DSR MFP_CFG_LPM(GPIO47, AF4, FLOAT)
302#define GPIO101_UART1_DTR MFP_CFG_LPM(GPIO101, AF6, FLOAT)
303#define GPIO101_UART1_DSR MFP_CFG_LPM(GPIO101, AF1, FLOAT)
304#define GPIO103_UART1_DTR MFP_CFG_LPM(GPIO103, AF1, FLOAT)
305#define GPIO103_UART1_DSR MFP_CFG_LPM(GPIO103, AF6, FLOAT)
306#define GPIO44_UART1_DCD MFP_CFG_LPM(GPIO44, AF2, FLOAT)
307#define GPIO100_UART1_DCD MFP_CFG_LPM(GPIO100, AF1, FLOAT)
308#define GPIO46_UART1_RI MFP_CFG_LPM(GPIO46, AF2, FLOAT)
309#define GPIO102_UART1_RI MFP_CFG_LPM(GPIO102, AF1, FLOAT)
310
311/* UART2 */
312#define GPIO109_UART2_CTS MFP_CFG_LPM(GPIO109, AF3, FLOAT)
313#define GPIO109_UART2_RTS MFP_CFG_LPM(GPIO109, AF1, FLOAT)
314#define GPIO112_UART2_CTS MFP_CFG_LPM(GPIO112, AF1, FLOAT)
315#define GPIO112_UART2_RTS MFP_CFG_LPM(GPIO112, AF3, FLOAT)
316#define GPIO110_UART2_RXD MFP_CFG_LPM(GPIO110, AF1, FLOAT)
317#define GPIO110_UART2_TXD MFP_CFG_LPM(GPIO110, AF3, FLOAT)
318#define GPIO111_UART2_RXD MFP_CFG_LPM(GPIO111, AF3, FLOAT)
319#define GPIO111_UART2_TXD MFP_CFG_LPM(GPIO111, AF1, FLOAT)
320
321/* UART3 */
322#define GPIO89_UART3_CTS MFP_CFG_LPM(GPIO89, AF2, FLOAT)
323#define GPIO89_UART3_RTS MFP_CFG_LPM(GPIO89, AF4, FLOAT)
324#define GPIO90_UART3_CTS MFP_CFG_LPM(GPIO90, AF4, FLOAT)
325#define GPIO90_UART3_RTS MFP_CFG_LPM(GPIO90, AF2, FLOAT)
326#define GPIO105_UART3_CTS MFP_CFG_LPM(GPIO105, AF1, FLOAT)
327#define GPIO105_UART3_RTS MFP_CFG_LPM(GPIO105, AF3, FLOAT)
328#define GPIO106_UART3_CTS MFP_CFG_LPM(GPIO106, AF3, FLOAT)
329#define GPIO106_UART3_RTS MFP_CFG_LPM(GPIO106, AF1, FLOAT)
330#define GPIO30_UART3_RXD MFP_CFG_LPM(GPIO30, AF2, FLOAT)
331#define GPIO30_UART3_TXD MFP_CFG_LPM(GPIO30, AF6, FLOAT)
332#define GPIO31_UART3_RXD MFP_CFG_LPM(GPIO31, AF6, FLOAT)
333#define GPIO31_UART3_TXD MFP_CFG_LPM(GPIO31, AF2, FLOAT)
334#define GPIO91_UART3_RXD MFP_CFG_LPM(GPIO91, AF4, FLOAT)
335#define GPIO91_UART3_TXD MFP_CFG_LPM(GPIO91, AF2, FLOAT)
336#define GPIO92_UART3_RXD MFP_CFG_LPM(GPIO92, AF2, FLOAT)
337#define GPIO92_UART3_TXD MFP_CFG_LPM(GPIO92, AF4, FLOAT)
338#define GPIO107_UART3_RXD MFP_CFG_LPM(GPIO107, AF3, FLOAT)
339#define GPIO107_UART3_TXD MFP_CFG_LPM(GPIO107, AF1, FLOAT)
340#define GPIO108_UART3_RXD MFP_CFG_LPM(GPIO108, AF1, FLOAT)
341#define GPIO108_UART3_TXD MFP_CFG_LPM(GPIO108, AF3, FLOAT)
342
343
344/* USB 2.0 UTMI */
345#define GPIO10_UTM_CLK MFP_CFG(GPIO10, AF1)
346#define GPIO36_U2D_RXERROR MFP_CFG(GPIO36, AF3)
347#define GPIO60_U2D_RXERROR MFP_CFG(GPIO60, AF1)
348#define GPIO87_U2D_RXERROR MFP_CFG(GPIO87, AF5)
349#define GPIO34_UTM_RXVALID MFP_CFG(GPIO34, AF3)
350#define GPIO58_UTM_RXVALID MFP_CFG(GPIO58, AF2)
351#define GPIO85_UTM_RXVALID MFP_CFG(GPIO85, AF5)
352#define GPIO35_UTM_RXACTIVE MFP_CFG(GPIO35, AF3)
353#define GPIO59_UTM_RXACTIVE MFP_CFG(GPIO59, AF1)
354#define GPIO86_UTM_RXACTIVE MFP_CFG(GPIO86, AF5)
355#define GPIO73_UTM_TXREADY MFP_CFG(GPIO73, AF1)
356#define GPIO68_UTM_LINESTATE_0 MFP_CFG(GPIO68, AF3)
357#define GPIO90_UTM_LINESTATE_0 MFP_CFG(GPIO90, AF3)
358#define GPIO102_UTM_LINESTATE_0 MFP_CFG(GPIO102, AF3)
359#define GPIO107_UTM_LINESTATE_0 MFP_CFG(GPIO107, AF4)
360#define GPIO69_UTM_LINESTATE_1 MFP_CFG(GPIO69, AF3)
361#define GPIO91_UTM_LINESTATE_1 MFP_CFG(GPIO91, AF3)
362#define GPIO103_UTM_LINESTATE_1 MFP_CFG(GPIO103, AF3)
363
364#define GPIO41_U2D_PHYDATA_0 MFP_CFG(GPIO41, AF3)
365#define GPIO42_U2D_PHYDATA_1 MFP_CFG(GPIO42, AF3)
366#define GPIO43_U2D_PHYDATA_2 MFP_CFG(GPIO43, AF3)
367#define GPIO44_U2D_PHYDATA_3 MFP_CFG(GPIO44, AF3)
368#define GPIO45_U2D_PHYDATA_4 MFP_CFG(GPIO45, AF3)
369#define GPIO46_U2D_PHYDATA_5 MFP_CFG(GPIO46, AF3)
370#define GPIO47_U2D_PHYDATA_6 MFP_CFG(GPIO47, AF3)
371#define GPIO48_U2D_PHYDATA_7 MFP_CFG(GPIO48, AF3)
372
373#define GPIO49_U2D_PHYDATA_0 MFP_CFG(GPIO49, AF3)
374#define GPIO50_U2D_PHYDATA_1 MFP_CFG(GPIO50, AF3)
375#define GPIO51_U2D_PHYDATA_2 MFP_CFG(GPIO51, AF3)
376#define GPIO52_U2D_PHYDATA_3 MFP_CFG(GPIO52, AF3)
377#define GPIO53_U2D_PHYDATA_4 MFP_CFG(GPIO53, AF3)
378#define GPIO54_U2D_PHYDATA_5 MFP_CFG(GPIO54, AF3)
379#define GPIO55_U2D_PHYDATA_6 MFP_CFG(GPIO55, AF3)
380#define GPIO56_U2D_PHYDATA_7 MFP_CFG(GPIO56, AF3)
381
382#define GPIO37_U2D_OPMODE0 MFP_CFG(GPIO37, AF4)
383#define GPIO61_U2D_OPMODE0 MFP_CFG(GPIO61, AF2)
384#define GPIO88_U2D_OPMODE0 MFP_CFG(GPIO88, AF7)
385
386#define GPIO38_U2D_OPMODE1 MFP_CFG(GPIO38, AF4)
387#define GPIO62_U2D_OPMODE1 MFP_CFG(GPIO62, AF2)
388#define GPIO104_U2D_OPMODE1 MFP_CFG(GPIO104, AF4)
389#define GPIO108_U2D_OPMODE1 MFP_CFG(GPIO108, AF5)
390
391#define GPIO74_U2D_RESET MFP_CFG(GPIO74, AF1)
392#define GPIO93_U2D_RESET MFP_CFG(GPIO93, AF2)
393#define GPIO98_U2D_RESET MFP_CFG(GPIO98, AF3)
394
395#define GPIO67_U2D_SUSPEND MFP_CFG(GPIO67, AF3)
396#define GPIO96_U2D_SUSPEND MFP_CFG(GPIO96, AF2)
397#define GPIO101_U2D_SUSPEND MFP_CFG(GPIO101, AF3)
398
399#define GPIO66_U2D_TERM_SEL MFP_CFG(GPIO66, AF5)
400#define GPIO95_U2D_TERM_SEL MFP_CFG(GPIO95, AF3)
401#define GPIO97_U2D_TERM_SEL MFP_CFG(GPIO97, AF7)
402#define GPIO100_U2D_TERM_SEL MFP_CFG(GPIO100, AF5)
403
404#define GPIO39_U2D_TXVALID MFP_CFG(GPIO39, AF4)
405#define GPIO70_U2D_TXVALID MFP_CFG(GPIO70, AF5)
406#define GPIO83_U2D_TXVALID MFP_CFG(GPIO83, AF7)
407
408#define GPIO65_U2D_XCVR_SEL MFP_CFG(GPIO65, AF5)
409#define GPIO94_U2D_XCVR_SEL MFP_CFG(GPIO94, AF3)
410#define GPIO99_U2D_XCVR_SEL MFP_CFG(GPIO99, AF5)
411
412/* USB Host 1.1 */
413#define GPIO2_2_USBH_PEN MFP_CFG(GPIO2_2, AF1)
414#define GPIO3_2_USBH_PWR MFP_CFG(GPIO3_2, AF1)
415
416/* USB P2 */
417#define GPIO97_USB_P2_2 MFP_CFG(GPIO97, AF2)
418#define GPIO97_USB_P2_6 MFP_CFG(GPIO97, AF4)
419#define GPIO98_USB_P2_2 MFP_CFG(GPIO98, AF4)
420#define GPIO98_USB_P2_6 MFP_CFG(GPIO98, AF2)
421#define GPIO99_USB_P2_1 MFP_CFG(GPIO99, AF2)
422#define GPIO100_USB_P2_4 MFP_CFG(GPIO100, AF2)
423#define GPIO101_USB_P2_8 MFP_CFG(GPIO101, AF2)
424#define GPIO102_USB_P2_3 MFP_CFG(GPIO102, AF2)
425#define GPIO103_USB_P2_5 MFP_CFG(GPIO103, AF2)
426#define GPIO104_USB_P2_7 MFP_CFG(GPIO104, AF2)
427
428/* USB P3 */
429#define GPIO75_USB_P3_1 MFP_CFG(GPIO75, AF2)
430#define GPIO76_USB_P3_2 MFP_CFG(GPIO76, AF2)
431#define GPIO77_USB_P3_3 MFP_CFG(GPIO77, AF2)
432#define GPIO78_USB_P3_4 MFP_CFG(GPIO78, AF2)
433#define GPIO79_USB_P3_5 MFP_CFG(GPIO79, AF2)
434#define GPIO80_USB_P3_6 MFP_CFG(GPIO80, AF2)
435
436#define GPIO13_CHOUT0 MFP_CFG(GPIO13, AF6)
437#define GPIO14_CHOUT1 MFP_CFG(GPIO14, AF6)
438
439#define GPIO2_RDY MFP_CFG(GPIO2, AF1)
440#define GPIO5_NPIOR MFP_CFG(GPIO5, AF3)
441
442#define GPIO11_PWM0_OUT MFP_CFG(GPIO11, AF1)
443#define GPIO12_PWM1_OUT MFP_CFG(GPIO12, AF1)
444#define GPIO13_PWM2_OUT MFP_CFG(GPIO13, AF1)
445#define GPIO14_PWM3_OUT MFP_CFG(GPIO14, AF1)
446
447#endif /* __ASM_ARCH_MFP_PXA320_H */
diff --git a/include/asm-arm/arch-pxa/mfp-pxa3xx.h b/arch/arm/mach-pxa/include/mach/mfp-pxa3xx.h
index 1f6b35c015d0..1f6b35c015d0 100644
--- a/include/asm-arm/arch-pxa/mfp-pxa3xx.h
+++ b/arch/arm/mach-pxa/include/mach/mfp-pxa3xx.h
diff --git a/arch/arm/mach-pxa/include/mach/mfp-pxa930.h b/arch/arm/mach-pxa/include/mach/mfp-pxa930.h
new file mode 100644
index 000000000000..fabd9b4df827
--- /dev/null
+++ b/arch/arm/mach-pxa/include/mach/mfp-pxa930.h
@@ -0,0 +1,491 @@
1/*
2 * arch/arm/mach-pxa/include/mach/mfp-pxa930.h
3 *
4 * PXA930 specific MFP configuration definitions
5 *
6 * Copyright (C) 2007-2008 Marvell International Ltd.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 */
12
13#ifndef __ASM_ARCH_MFP_PXA9xx_H
14#define __ASM_ARCH_MFP_PXA9xx_H
15
16#include <mach/mfp.h>
17#include <mach/mfp-pxa3xx.h>
18
19/* GPIO */
20#define GPIO46_GPIO MFP_CFG(GPIO46, AF0)
21#define GPIO49_GPIO MFP_CFG(GPIO49, AF0)
22#define GPIO50_GPIO MFP_CFG(GPIO50, AF0)
23#define GPIO51_GPIO MFP_CFG(GPIO51, AF0)
24#define GPIO52_GPIO MFP_CFG(GPIO52, AF0)
25#define GPIO56_GPIO MFP_CFG(GPIO56, AF0)
26#define GPIO58_GPIO MFP_CFG(GPIO58, AF0)
27#define GPIO59_GPIO MFP_CFG(GPIO59, AF0)
28#define GPIO60_GPIO MFP_CFG(GPIO60, AF0)
29#define GPIO61_GPIO MFP_CFG(GPIO61, AF0)
30#define GPIO62_GPIO MFP_CFG(GPIO62, AF0)
31
32#define GSIM_UCLK_GPIO_79 MFP_CFG(GSIM_UCLK, AF0)
33#define GSIM_UIO_GPIO_80 MFP_CFG(GSIM_UIO, AF0)
34#define GSIM_nURST_GPIO_81 MFP_CFG(GSIM_nURST, AF0)
35#define GSIM_UDET_GPIO_82 MFP_CFG(GSIM_UDET, AF0)
36
37#define DF_IO15_GPIO_28 MFP_CFG(DF_IO15, AF0)
38#define DF_IO14_GPIO_29 MFP_CFG(DF_IO14, AF0)
39#define DF_IO13_GPIO_30 MFP_CFG(DF_IO13, AF0)
40#define DF_IO12_GPIO_31 MFP_CFG(DF_IO12, AF0)
41#define DF_IO11_GPIO_32 MFP_CFG(DF_IO11, AF0)
42#define DF_IO10_GPIO_33 MFP_CFG(DF_IO10, AF0)
43#define DF_IO9_GPIO_34 MFP_CFG(DF_IO9, AF0)
44#define DF_IO8_GPIO_35 MFP_CFG(DF_IO8, AF0)
45#define DF_IO7_GPIO_36 MFP_CFG(DF_IO7, AF0)
46#define DF_IO6_GPIO_37 MFP_CFG(DF_IO6, AF0)
47#define DF_IO5_GPIO_38 MFP_CFG(DF_IO5, AF0)
48#define DF_IO4_GPIO_39 MFP_CFG(DF_IO4, AF0)
49#define DF_IO3_GPIO_40 MFP_CFG(DF_IO3, AF0)
50#define DF_IO2_GPIO_41 MFP_CFG(DF_IO2, AF0)
51#define DF_IO1_GPIO_42 MFP_CFG(DF_IO1, AF0)
52#define DF_IO0_GPIO_43 MFP_CFG(DF_IO0, AF0)
53#define DF_nCS0_GPIO_44 MFP_CFG(DF_nCS0, AF0)
54#define DF_nCS1_GPIO_45 MFP_CFG(DF_nCS1, AF0)
55#define DF_nWE_GPIO_46 MFP_CFG(DF_nWE, AF0)
56#define DF_nRE_nOE_GPIO_47 MFP_CFG(DF_nRE_nOE, AF0)
57#define DF_CLE_nOE_GPIO_48 MFP_CFG(DF_CLE_nOE, AF0)
58#define DF_nADV1_ALE_GPIO_49 MFP_CFG(DF_nADV1_ALE, AF0)
59#define DF_nADV2_ALE_GPIO_50 MFP_CFG(DF_nADV2_ALE, AF0)
60#define DF_INT_RnB_GPIO_51 MFP_CFG(DF_INT_RnB, AF0)
61#define DF_SCLK_E_GPIO_52 MFP_CFG(DF_SCLK_E, AF0)
62
63#define DF_ADDR0_GPIO_53 MFP_CFG(DF_ADDR0, AF0)
64#define DF_ADDR1_GPIO_54 MFP_CFG(DF_ADDR1, AF0)
65#define DF_ADDR2_GPIO_55 MFP_CFG(DF_ADDR2, AF0)
66#define DF_ADDR3_GPIO_56 MFP_CFG(DF_ADDR3, AF0)
67#define nXCVREN_GPIO_57 MFP_CFG(nXCVREN, AF0)
68#define nLUA_GPIO_58 MFP_CFG(nLUA, AF0)
69#define nLLA_GPIO_59 MFP_CFG(nLLA, AF0)
70#define nBE0_GPIO_60 MFP_CFG(nBE0, AF0)
71#define nBE1_GPIO_61 MFP_CFG(nBE1, AF0)
72#define RDY_GPIO_62 MFP_CFG(RDY, AF0)
73
74/* Chip Select */
75#define DF_nCS0_nCS2 MFP_CFG_LPM(DF_nCS0, AF3, PULL_HIGH)
76#define DF_nCS1_nCS3 MFP_CFG_LPM(DF_nCS1, AF3, PULL_HIGH)
77
78/* AC97 */
79#define GPIO83_BAC97_SYSCLK MFP_CFG(GPIO83, AF3)
80#define GPIO84_BAC97_SDATA_IN0 MFP_CFG(GPIO84, AF3)
81#define GPIO85_BAC97_BITCLK MFP_CFG(GPIO85, AF3)
82#define GPIO86_BAC97_nRESET MFP_CFG(GPIO86, AF3)
83#define GPIO87_BAC97_SYNC MFP_CFG(GPIO87, AF3)
84#define GPIO88_BAC97_SDATA_OUT MFP_CFG(GPIO88, AF3)
85
86/* I2C */
87#define GPIO39_CI2C_SCL MFP_CFG_LPM(GPIO39, AF3, PULL_HIGH)
88#define GPIO40_CI2C_SDA MFP_CFG_LPM(GPIO40, AF3, PULL_HIGH)
89
90#define GPIO51_CI2C_SCL MFP_CFG_LPM(GPIO51, AF3, PULL_HIGH)
91#define GPIO52_CI2C_SDA MFP_CFG_LPM(GPIO52, AF3, PULL_HIGH)
92
93#define GPIO63_CI2C_SCL MFP_CFG_LPM(GPIO63, AF4, PULL_HIGH)
94#define GPIO64_CI2C_SDA MFP_CFG_LPM(GPIO64, AF4, PULL_HIGH)
95
96#define GPIO77_CI2C_SCL MFP_CFG_LPM(GPIO77, AF2, PULL_HIGH)
97#define GPIO78_CI2C_SDA MFP_CFG_LPM(GPIO78, AF2, PULL_HIGH)
98
99#define GPIO89_CI2C_SCL MFP_CFG_LPM(GPIO89, AF1, PULL_HIGH)
100#define GPIO90_CI2C_SDA MFP_CFG_LPM(GPIO90, AF1, PULL_HIGH)
101
102#define GPIO95_CI2C_SCL MFP_CFG_LPM(GPIO95, AF1, PULL_HIGH)
103#define GPIO96_CI2C_SDA MFP_CFG_LPM(GPIO96, AF1, PULL_HIGH)
104
105#define GPIO97_CI2C_SCL MFP_CFG_LPM(GPIO97, AF3, PULL_HIGH)
106#define GPIO98_CI2C_SDA MFP_CFG_LPM(GPIO98, AF3, PULL_HIGH)
107
108/* QCI */
109#define GPIO63_CI_DD_9 MFP_CFG_LPM(GPIO63, AF1, PULL_LOW)
110#define GPIO64_CI_DD_8 MFP_CFG_LPM(GPIO64, AF1, PULL_LOW)
111#define GPIO65_CI_DD_7 MFP_CFG_LPM(GPIO65, AF1, PULL_LOW)
112#define GPIO66_CI_DD_6 MFP_CFG_LPM(GPIO66, AF1, PULL_LOW)
113#define GPIO67_CI_DD_5 MFP_CFG_LPM(GPIO67, AF1, PULL_LOW)
114#define GPIO68_CI_DD_4 MFP_CFG_LPM(GPIO68, AF1, PULL_LOW)
115#define GPIO69_CI_DD_3 MFP_CFG_LPM(GPIO69, AF1, PULL_LOW)
116#define GPIO70_CI_DD_2 MFP_CFG_LPM(GPIO70, AF1, PULL_LOW)
117#define GPIO71_CI_DD_1 MFP_CFG_LPM(GPIO71, AF1, PULL_LOW)
118#define GPIO72_CI_DD_0 MFP_CFG_LPM(GPIO72, AF1, PULL_LOW)
119#define GPIO73_CI_HSYNC MFP_CFG_LPM(GPIO73, AF1, PULL_LOW)
120#define GPIO74_CI_VSYNC MFP_CFG_LPM(GPIO74, AF1, PULL_LOW)
121#define GPIO75_CI_MCLK MFP_CFG_LPM(GPIO75, AF1, PULL_LOW)
122#define GPIO76_CI_PCLK MFP_CFG_LPM(GPIO76, AF1, PULL_LOW)
123
124/* KEYPAD */
125#define GPIO4_KP_DKIN_4 MFP_CFG_LPM(GPIO4, AF3, FLOAT)
126#define GPIO5_KP_DKIN_5 MFP_CFG_LPM(GPIO5, AF3, FLOAT)
127#define GPIO6_KP_DKIN_6 MFP_CFG_LPM(GPIO6, AF3, FLOAT)
128#define GPIO7_KP_DKIN_7 MFP_CFG_LPM(GPIO7, AF3, FLOAT)
129#define GPIO8_KP_DKIN_4 MFP_CFG_LPM(GPIO8, AF3, FLOAT)
130#define GPIO9_KP_DKIN_5 MFP_CFG_LPM(GPIO9, AF3, FLOAT)
131#define GPIO10_KP_DKIN_6 MFP_CFG_LPM(GPIO10, AF3, FLOAT)
132#define GPIO11_KP_DKIN_7 MFP_CFG_LPM(GPIO11, AF3, FLOAT)
133
134#define GPIO12_KP_DKIN_0 MFP_CFG_LPM(GPIO12, AF2, FLOAT)
135#define GPIO13_KP_DKIN_1 MFP_CFG_LPM(GPIO13, AF2, FLOAT)
136#define GPIO14_KP_DKIN_2 MFP_CFG_LPM(GPIO14, AF2, FLOAT)
137#define GPIO15_KP_DKIN_3 MFP_CFG_LPM(GPIO15, AF2, FLOAT)
138
139#define GPIO41_KP_DKIN_0 MFP_CFG_LPM(GPIO41, AF2, FLOAT)
140#define GPIO42_KP_DKIN_1 MFP_CFG_LPM(GPIO42, AF2, FLOAT)
141#define GPIO43_KP_DKIN_2 MFP_CFG_LPM(GPIO43, AF2, FLOAT)
142#define GPIO44_KP_DKIN_3 MFP_CFG_LPM(GPIO44, AF2, FLOAT)
143#define GPIO41_KP_DKIN_4 MFP_CFG_LPM(GPIO41, AF4, FLOAT)
144#define GPIO42_KP_DKIN_5 MFP_CFG_LPM(GPIO42, AF4, FLOAT)
145
146#define GPIO0_KP_MKIN_0 MFP_CFG_LPM(GPIO0, AF1, FLOAT)
147#define GPIO2_KP_MKIN_1 MFP_CFG_LPM(GPIO2, AF1, FLOAT)
148#define GPIO4_KP_MKIN_2 MFP_CFG_LPM(GPIO4, AF1, FLOAT)
149#define GPIO6_KP_MKIN_3 MFP_CFG_LPM(GPIO6, AF1, FLOAT)
150#define GPIO8_KP_MKIN_4 MFP_CFG_LPM(GPIO8, AF1, FLOAT)
151#define GPIO10_KP_MKIN_5 MFP_CFG_LPM(GPIO10, AF1, FLOAT)
152#define GPIO12_KP_MKIN_6 MFP_CFG_LPM(GPIO12, AF1, FLOAT)
153#define GPIO14_KP_MKIN_7 MFP_CFG(GPIO14, AF1)
154#define GPIO35_KP_MKIN_5 MFP_CFG(GPIO35, AF4)
155
156#define GPIO1_KP_MKOUT_0 MFP_CFG_LPM(GPIO1, AF1, DRIVE_HIGH)
157#define GPIO3_KP_MKOUT_1 MFP_CFG_LPM(GPIO3, AF1, DRIVE_HIGH)
158#define GPIO5_KP_MKOUT_2 MFP_CFG_LPM(GPIO5, AF1, DRIVE_HIGH)
159#define GPIO7_KP_MKOUT_3 MFP_CFG_LPM(GPIO7, AF1, DRIVE_HIGH)
160#define GPIO9_KP_MKOUT_4 MFP_CFG_LPM(GPIO9, AF1, DRIVE_HIGH)
161#define GPIO11_KP_MKOUT_5 MFP_CFG_LPM(GPIO11, AF1, DRIVE_HIGH)
162#define GPIO13_KP_MKOUT_6 MFP_CFG_LPM(GPIO13, AF1, DRIVE_HIGH)
163#define GPIO15_KP_MKOUT_7 MFP_CFG_LPM(GPIO15, AF1, DRIVE_HIGH)
164#define GPIO36_KP_MKOUT_5 MFP_CFG_LPM(GPIO36, AF4, DRIVE_HIGH)
165
166/* LCD */
167#define GPIO17_LCD_FCLK_RD MFP_CFG(GPIO17, AF1)
168#define GPIO18_LCD_LCLK_A0 MFP_CFG(GPIO18, AF1)
169#define GPIO19_LCD_PCLK_WR MFP_CFG(GPIO19, AF1)
170#define GPIO20_LCD_BIAS MFP_CFG(GPIO20, AF1)
171#define GPIO21_LCD_CS MFP_CFG(GPIO21, AF1)
172#define GPIO22_LCD_CS2 MFP_CFG(GPIO22, AF2)
173#define GPIO22_LCD_VSYNC MFP_CFG(GPIO22, AF1)
174#define GPIO23_LCD_DD0 MFP_CFG(GPIO23, AF1)
175#define GPIO24_LCD_DD1 MFP_CFG(GPIO24, AF1)
176#define GPIO25_LCD_DD2 MFP_CFG(GPIO25, AF1)
177#define GPIO26_LCD_DD3 MFP_CFG(GPIO26, AF1)
178#define GPIO27_LCD_DD4 MFP_CFG(GPIO27, AF1)
179#define GPIO28_LCD_DD5 MFP_CFG(GPIO28, AF1)
180#define GPIO29_LCD_DD6 MFP_CFG(GPIO29, AF1)
181#define GPIO30_LCD_DD7 MFP_CFG(GPIO30, AF1)
182#define GPIO31_LCD_DD8 MFP_CFG(GPIO31, AF1)
183#define GPIO32_LCD_DD9 MFP_CFG(GPIO32, AF1)
184#define GPIO33_LCD_DD10 MFP_CFG(GPIO33, AF1)
185#define GPIO34_LCD_DD11 MFP_CFG(GPIO34, AF1)
186#define GPIO35_LCD_DD12 MFP_CFG(GPIO35, AF1)
187#define GPIO36_LCD_DD13 MFP_CFG(GPIO36, AF1)
188#define GPIO37_LCD_DD14 MFP_CFG(GPIO37, AF1)
189#define GPIO38_LCD_DD15 MFP_CFG(GPIO38, AF1)
190#define GPIO39_LCD_DD16 MFP_CFG(GPIO39, AF1)
191#define GPIO40_LCD_DD17 MFP_CFG(GPIO40, AF1)
192#define GPIO41_LCD_CS2 MFP_CFG(GPIO41, AF3)
193#define GPIO42_LCD_VSYNC2 MFP_CFG(GPIO42, AF3)
194#define GPIO44_LCD_DD7 MFP_CFG(GPIO44, AF1)
195
196/* Mini-LCD */
197#define GPIO17_MLCD_FCLK MFP_CFG(GPIO17, AF3)
198#define GPIO18_MLCD_LCLK MFP_CFG(GPIO18, AF3)
199#define GPIO19_MLCD_PCLK MFP_CFG(GPIO19, AF3)
200#define GPIO20_MLCD_BIAS MFP_CFG(GPIO20, AF3)
201#define GPIO23_MLCD_DD0 MFP_CFG(GPIO23, AF3)
202#define GPIO24_MLCD_DD1 MFP_CFG(GPIO24, AF3)
203#define GPIO25_MLCD_DD2 MFP_CFG(GPIO25, AF3)
204#define GPIO26_MLCD_DD3 MFP_CFG(GPIO26, AF3)
205#define GPIO27_MLCD_DD4 MFP_CFG(GPIO27, AF3)
206#define GPIO28_MLCD_DD5 MFP_CFG(GPIO28, AF3)
207#define GPIO29_MLCD_DD6 MFP_CFG(GPIO29, AF3)
208#define GPIO30_MLCD_DD7 MFP_CFG(GPIO30, AF3)
209#define GPIO31_MLCD_DD8 MFP_CFG(GPIO31, AF3)
210#define GPIO32_MLCD_DD9 MFP_CFG(GPIO32, AF3)
211#define GPIO33_MLCD_DD10 MFP_CFG(GPIO33, AF3)
212#define GPIO34_MLCD_DD11 MFP_CFG(GPIO34, AF3)
213#define GPIO35_MLCD_DD12 MFP_CFG(GPIO35, AF3)
214#define GPIO36_MLCD_DD13 MFP_CFG(GPIO36, AF3)
215#define GPIO37_MLCD_DD14 MFP_CFG(GPIO37, AF3)
216#define GPIO38_MLCD_DD15 MFP_CFG(GPIO38, AF3)
217#define GPIO44_MLCD_DD7 MFP_CFG(GPIO44, AF5)
218
219/* MMC1 */
220#define GPIO10_MMC1_DAT3 MFP_CFG(GPIO10, AF4)
221#define GPIO11_MMC1_DAT2 MFP_CFG(GPIO11, AF4)
222#define GPIO12_MMC1_DAT1 MFP_CFG(GPIO12, AF4)
223#define GPIO13_MMC1_DAT0 MFP_CFG(GPIO13, AF4)
224#define GPIO14_MMC1_CMD MFP_CFG(GPIO14, AF4)
225#define GPIO15_MMC1_CLK MFP_CFG(GPIO15, AF4)
226#define GPIO55_MMC1_CMD MFP_CFG(GPIO55, AF3)
227#define GPIO56_MMC1_CLK MFP_CFG(GPIO56, AF3)
228#define GPIO57_MMC1_DAT0 MFP_CFG(GPIO57, AF3)
229#define GPIO58_MMC1_DAT1 MFP_CFG(GPIO58, AF3)
230#define GPIO59_MMC1_DAT2 MFP_CFG(GPIO59, AF3)
231#define GPIO60_MMC1_DAT3 MFP_CFG(GPIO60, AF3)
232
233#define DF_ADDR0_MMC1_CLK MFP_CFG(DF_ADDR0, AF2)
234#define DF_ADDR1_MMC1_CMD MFP_CFG(DF_ADDR1, AF2)
235#define DF_ADDR2_MMC1_DAT0 MFP_CFG(DF_ADDR2, AF2)
236#define DF_ADDR3_MMC1_DAT1 MFP_CFG(DF_ADDR3, AF3)
237#define nXCVREN_MMC1_DAT2 MFP_CFG(nXCVREN, AF2)
238
239/* MMC2 */
240#define GPIO31_MMC2_CMD MFP_CFG(GPIO31, AF7)
241#define GPIO32_MMC2_CLK MFP_CFG(GPIO32, AF7)
242#define GPIO33_MMC2_DAT0 MFP_CFG(GPIO33, AF7)
243#define GPIO34_MMC2_DAT1 MFP_CFG(GPIO34, AF7)
244#define GPIO35_MMC2_DAT2 MFP_CFG(GPIO35, AF7)
245#define GPIO36_MMC2_DAT3 MFP_CFG(GPIO36, AF7)
246
247#define GPIO101_MMC2_DAT3 MFP_CFG(GPIO101, AF1)
248#define GPIO102_MMC2_DAT2 MFP_CFG(GPIO102, AF1)
249#define GPIO103_MMC2_DAT1 MFP_CFG(GPIO103, AF1)
250#define GPIO104_MMC2_DAT0 MFP_CFG(GPIO104, AF1)
251#define GPIO105_MMC2_CMD MFP_CFG(GPIO105, AF1)
252#define GPIO106_MMC2_CLK MFP_CFG(GPIO106, AF1)
253
254#define DF_IO10_MMC2_DAT3 MFP_CFG(DF_IO10, AF3)
255#define DF_IO11_MMC2_DAT2 MFP_CFG(DF_IO11, AF3)
256#define DF_IO12_MMC2_DAT1 MFP_CFG(DF_IO12, AF3)
257#define DF_IO13_MMC2_DAT0 MFP_CFG(DF_IO13, AF3)
258#define DF_IO14_MMC2_CLK MFP_CFG(DF_IO14, AF3)
259#define DF_IO15_MMC2_CMD MFP_CFG(DF_IO15, AF3)
260
261/* BSSP1 */
262#define GPIO12_BSSP1_CLK MFP_CFG(GPIO12, AF3)
263#define GPIO13_BSSP1_FRM MFP_CFG(GPIO13, AF3)
264#define GPIO14_BSSP1_RXD MFP_CFG(GPIO14, AF3)
265#define GPIO15_BSSP1_TXD MFP_CFG(GPIO15, AF3)
266#define GPIO97_BSSP1_CLK MFP_CFG(GPIO97, AF5)
267#define GPIO98_BSSP1_FRM MFP_CFG(GPIO98, AF5)
268
269/* BSSP2 */
270#define GPIO84_BSSP2_SDATA_IN MFP_CFG(GPIO84, AF1)
271#define GPIO85_BSSP2_BITCLK MFP_CFG(GPIO85, AF1)
272#define GPIO86_BSSP2_SYSCLK MFP_CFG(GPIO86, AF1)
273#define GPIO87_BSSP2_SYNC MFP_CFG(GPIO87, AF1)
274#define GPIO88_BSSP2_DATA_OUT MFP_CFG(GPIO88, AF1)
275#define GPIO86_BSSP2_SDATA_IN MFP_CFG(GPIO86, AF4)
276
277/* BSSP3 */
278#define GPIO79_BSSP3_CLK MFP_CFG(GPIO79, AF1)
279#define GPIO80_BSSP3_FRM MFP_CFG(GPIO80, AF1)
280#define GPIO81_BSSP3_TXD MFP_CFG(GPIO81, AF1)
281#define GPIO82_BSSP3_RXD MFP_CFG(GPIO82, AF1)
282#define GPIO83_BSSP3_SYSCLK MFP_CFG(GPIO83, AF1)
283
284/* BSSP4 */
285#define GPIO43_BSSP4_CLK MFP_CFG(GPIO43, AF4)
286#define GPIO44_BSSP4_FRM MFP_CFG(GPIO44, AF4)
287#define GPIO45_BSSP4_TXD MFP_CFG(GPIO45, AF4)
288#define GPIO46_BSSP4_RXD MFP_CFG(GPIO46, AF4)
289
290#define GPIO51_BSSP4_CLK MFP_CFG(GPIO51, AF4)
291#define GPIO52_BSSP4_FRM MFP_CFG(GPIO52, AF4)
292#define GPIO53_BSSP4_TXD MFP_CFG(GPIO53, AF4)
293#define GPIO54_BSSP4_RXD MFP_CFG(GPIO54, AF4)
294
295/* GSSP1 */
296#define GPIO79_GSSP1_CLK MFP_CFG(GPIO79, AF2)
297#define GPIO80_GSSP1_FRM MFP_CFG(GPIO80, AF2)
298#define GPIO81_GSSP1_TXD MFP_CFG(GPIO81, AF2)
299#define GPIO82_GSSP1_RXD MFP_CFG(GPIO82, AF2)
300#define GPIO83_GSSP1_SYSCLK MFP_CFG(GPIO83, AF2)
301
302#define GPIO93_GSSP1_CLK MFP_CFG(GPIO93, AF4)
303#define GPIO94_GSSP1_FRM MFP_CFG(GPIO94, AF4)
304#define GPIO95_GSSP1_TXD MFP_CFG(GPIO95, AF4)
305#define GPIO96_GSSP1_RXD MFP_CFG(GPIO96, AF4)
306
307/* GSSP2 */
308#define GPIO47_GSSP2_CLK MFP_CFG(GPIO47, AF4)
309#define GPIO48_GSSP2_FRM MFP_CFG(GPIO48, AF4)
310#define GPIO49_GSSP2_RXD MFP_CFG(GPIO49, AF4)
311#define GPIO50_GSSP2_TXD MFP_CFG(GPIO50, AF4)
312
313#define GPIO69_GSSP2_CLK MFP_CFG(GPIO69, AF4)
314#define GPIO70_GSSP2_FRM MFP_CFG(GPIO70, AF4)
315#define GPIO71_GSSP2_RXD MFP_CFG(GPIO71, AF4)
316#define GPIO72_GSSP2_TXD MFP_CFG(GPIO72, AF4)
317
318#define GPIO84_GSSP2_RXD MFP_CFG(GPIO84, AF2)
319#define GPIO85_GSSP2_CLK MFP_CFG(GPIO85, AF2)
320#define GPIO86_GSSP2_SYSCLK MFP_CFG(GPIO86, AF2)
321#define GPIO87_GSSP2_FRM MFP_CFG(GPIO87, AF2)
322#define GPIO88_GSSP2_TXD MFP_CFG(GPIO88, AF2)
323#define GPIO86_GSSP2_RXD MFP_CFG(GPIO86, AF5)
324
325#define GPIO103_GSSP2_CLK MFP_CFG(GPIO103, AF2)
326#define GPIO104_GSSP2_FRM MFP_CFG(GPIO104, AF2)
327#define GPIO105_GSSP2_RXD MFP_CFG(GPIO105, AF2)
328#define GPIO106_GSSP2_TXD MFP_CFG(GPIO106, AF2)
329
330/* UART1 - FFUART */
331#define GPIO47_UART1_DSR_N MFP_CFG(GPIO47, AF1)
332#define GPIO48_UART1_DTR_N MFP_CFG(GPIO48, AF1)
333#define GPIO49_UART1_RI MFP_CFG(GPIO49, AF1)
334#define GPIO50_UART1_DCD MFP_CFG(GPIO50, AF1)
335#define GPIO51_UART1_CTS MFP_CFG(GPIO51, AF1)
336#define GPIO52_UART1_RTS MFP_CFG(GPIO52, AF1)
337#define GPIO53_UART1_RXD MFP_CFG(GPIO53, AF1)
338#define GPIO54_UART1_TXD MFP_CFG(GPIO54, AF1)
339
340#define GPIO63_UART1_TXD MFP_CFG(GPIO63, AF2)
341#define GPIO64_UART1_RXD MFP_CFG(GPIO64, AF2)
342#define GPIO65_UART1_DSR MFP_CFG(GPIO65, AF2)
343#define GPIO66_UART1_DTR MFP_CFG(GPIO66, AF2)
344#define GPIO67_UART1_RI MFP_CFG(GPIO67, AF2)
345#define GPIO68_UART1_DCD MFP_CFG(GPIO68, AF2)
346#define GPIO69_UART1_CTS MFP_CFG(GPIO69, AF2)
347#define GPIO70_UART1_RTS MFP_CFG(GPIO70, AF2)
348
349/* UART2 - BTUART */
350#define GPIO91_UART2_RXD MFP_CFG(GPIO91, AF1)
351#define GPIO92_UART2_TXD MFP_CFG(GPIO92, AF1)
352#define GPIO93_UART2_CTS MFP_CFG(GPIO93, AF1)
353#define GPIO94_UART2_RTS MFP_CFG(GPIO94, AF1)
354
355/* UART3 - STUART */
356#define GPIO43_UART3_RTS MFP_CFG(GPIO43, AF3)
357#define GPIO44_UART3_CTS MFP_CFG(GPIO44, AF3)
358#define GPIO45_UART3_RXD MFP_CFG(GPIO45, AF3)
359#define GPIO46_UART3_TXD MFP_CFG(GPIO46, AF3)
360
361#define GPIO75_UART3_RTS MFP_CFG(GPIO75, AF5)
362#define GPIO76_UART3_CTS MFP_CFG(GPIO76, AF5)
363#define GPIO77_UART3_TXD MFP_CFG(GPIO77, AF5)
364#define GPIO78_UART3_RXD MFP_CFG(GPIO78, AF5)
365
366/* DFI */
367#define DF_IO0_DF_IO0 MFP_CFG(DF_IO0, AF2)
368#define DF_IO1_DF_IO1 MFP_CFG(DF_IO1, AF2)
369#define DF_IO2_DF_IO2 MFP_CFG(DF_IO2, AF2)
370#define DF_IO3_DF_IO3 MFP_CFG(DF_IO3, AF2)
371#define DF_IO4_DF_IO4 MFP_CFG(DF_IO4, AF2)
372#define DF_IO5_DF_IO5 MFP_CFG(DF_IO5, AF2)
373#define DF_IO6_DF_IO6 MFP_CFG(DF_IO6, AF2)
374#define DF_IO7_DF_IO7 MFP_CFG(DF_IO7, AF2)
375#define DF_IO8_DF_IO8 MFP_CFG(DF_IO8, AF2)
376#define DF_IO9_DF_IO9 MFP_CFG(DF_IO9, AF2)
377#define DF_IO10_DF_IO10 MFP_CFG(DF_IO10, AF2)
378#define DF_IO11_DF_IO11 MFP_CFG(DF_IO11, AF2)
379#define DF_IO12_DF_IO12 MFP_CFG(DF_IO12, AF2)
380#define DF_IO13_DF_IO13 MFP_CFG(DF_IO13, AF2)
381#define DF_IO14_DF_IO14 MFP_CFG(DF_IO14, AF2)
382#define DF_IO15_DF_IO15 MFP_CFG(DF_IO15, AF2)
383#define DF_nADV1_ALE_DF_nADV1 MFP_CFG(DF_nADV1_ALE, AF2)
384#define DF_nADV2_ALE_DF_nADV2 MFP_CFG(DF_nADV2_ALE, AF2)
385#define DF_nCS0_DF_nCS0 MFP_CFG(DF_nCS0, AF2)
386#define DF_nCS1_DF_nCS1 MFP_CFG(DF_nCS1, AF2)
387#define DF_nRE_nOE_DF_nOE MFP_CFG(DF_nRE_nOE, AF2)
388#define DF_nWE_DF_nWE MFP_CFG(DF_nWE, AF2)
389
390/* DFI - NAND */
391#define DF_CLE_nOE_ND_CLE MFP_CFG_LPM(DF_CLE_nOE, AF1, PULL_HIGH)
392#define DF_INT_RnB_ND_INT_RnB MFP_CFG_LPM(DF_INT_RnB, AF1, PULL_LOW)
393#define DF_IO0_ND_IO0 MFP_CFG_LPM(DF_IO0, AF1, PULL_LOW)
394#define DF_IO1_ND_IO1 MFP_CFG_LPM(DF_IO1, AF1, PULL_LOW)
395#define DF_IO2_ND_IO2 MFP_CFG_LPM(DF_IO2, AF1, PULL_LOW)
396#define DF_IO3_ND_IO3 MFP_CFG_LPM(DF_IO3, AF1, PULL_LOW)
397#define DF_IO4_ND_IO4 MFP_CFG_LPM(DF_IO4, AF1, PULL_LOW)
398#define DF_IO5_ND_IO5 MFP_CFG_LPM(DF_IO5, AF1, PULL_LOW)
399#define DF_IO6_ND_IO6 MFP_CFG_LPM(DF_IO6, AF1, PULL_LOW)
400#define DF_IO7_ND_IO7 MFP_CFG_LPM(DF_IO7, AF1, PULL_LOW)
401#define DF_IO8_ND_IO8 MFP_CFG_LPM(DF_IO8, AF1, PULL_LOW)
402#define DF_IO9_ND_IO9 MFP_CFG_LPM(DF_IO9, AF1, PULL_LOW)
403#define DF_IO10_ND_IO10 MFP_CFG_LPM(DF_IO10, AF1, PULL_LOW)
404#define DF_IO11_ND_IO11 MFP_CFG_LPM(DF_IO11, AF1, PULL_LOW)
405#define DF_IO12_ND_IO12 MFP_CFG_LPM(DF_IO12, AF1, PULL_LOW)
406#define DF_IO13_ND_IO13 MFP_CFG_LPM(DF_IO13, AF1, PULL_LOW)
407#define DF_IO14_ND_IO14 MFP_CFG_LPM(DF_IO14, AF1, PULL_LOW)
408#define DF_IO15_ND_IO15 MFP_CFG_LPM(DF_IO15, AF1, PULL_LOW)
409#define DF_nADV1_ALE_ND_ALE MFP_CFG_LPM(DF_nADV1_ALE, AF1, PULL_HIGH)
410#define DF_nADV2_ALE_ND_ALE MFP_CFG_LPM(DF_nADV2_ALE, AF1, PULL_HIGH)
411#define DF_nADV2_ALE_nCS3 MFP_CFG_LPM(DF_nADV2_ALE, AF3, PULL_HIGH)
412#define DF_nCS0_ND_nCS0 MFP_CFG_LPM(DF_nCS0, AF1, PULL_HIGH)
413#define DF_nCS1_ND_nCS1 MFP_CFG_LPM(DF_nCS1, AF1, PULL_HIGH)
414#define DF_nRE_nOE_ND_nRE MFP_CFG_LPM(DF_nRE_nOE, AF1, PULL_HIGH)
415#define DF_nWE_ND_nWE MFP_CFG_LPM(DF_nWE, AF1, PULL_HIGH)
416
417/* PWM */
418#define GPIO41_PWM0 MFP_CFG_LPM(GPIO41, AF1, PULL_LOW)
419#define GPIO42_PWM1 MFP_CFG_LPM(GPIO42, AF1, PULL_LOW)
420#define GPIO43_PWM3 MFP_CFG_LPM(GPIO43, AF1, PULL_LOW)
421#define GPIO20_PWM0 MFP_CFG_LPM(GPIO20, AF2, PULL_LOW)
422#define GPIO21_PWM2 MFP_CFG_LPM(GPIO21, AF3, PULL_LOW)
423#define GPIO22_PWM3 MFP_CFG_LPM(GPIO22, AF3, PULL_LOW)
424
425/* CIR */
426#define GPIO46_CIR_OUT MFP_CFG(GPIO46, AF1)
427#define GPIO77_CIR_OUT MFP_CFG(GPIO77, AF3)
428
429/* USB P2 */
430#define GPIO0_USB_P2_7 MFP_CFG(GPIO0, AF3)
431#define GPIO15_USB_P2_7 MFP_CFG(GPIO15, AF5)
432#define GPIO16_USB_P2_7 MFP_CFG(GPIO16, AF2)
433#define GPIO48_USB_P2_7 MFP_CFG(GPIO48, AF7)
434#define GPIO49_USB_P2_7 MFP_CFG(GPIO49, AF6)
435#define DF_IO9_USB_P2_7 MFP_CFG(DF_IO9, AF3)
436
437#define GPIO48_USB_P2_8 MFP_CFG(GPIO48, AF2)
438#define GPIO50_USB_P2_7 MFP_CFG_X(GPIO50, AF2, DS02X, FLOAT)
439#define GPIO51_USB_P2_5 MFP_CFG(GPIO51, AF2)
440#define GPIO47_USB_P2_4 MFP_CFG(GPIO47, AF2)
441#define GPIO53_USB_P2_3 MFP_CFG(GPIO53, AF2)
442#define GPIO54_USB_P2_6 MFP_CFG(GPIO54, AF2)
443#define GPIO49_USB_P2_2 MFP_CFG(GPIO49, AF2)
444#define GPIO52_USB_P2_1 MFP_CFG(GPIO52, AF2)
445
446#define GPIO63_USB_P2_8 MFP_CFG(GPIO63, AF3)
447#define GPIO64_USB_P2_7 MFP_CFG(GPIO64, AF3)
448#define GPIO65_USB_P2_6 MFP_CFG(GPIO65, AF3)
449#define GPIO66_USG_P2_5 MFP_CFG(GPIO66, AF3)
450#define GPIO67_USB_P2_4 MFP_CFG(GPIO67, AF3)
451#define GPIO68_USB_P2_3 MFP_CFG(GPIO68, AF3)
452#define GPIO69_USB_P2_2 MFP_CFG(GPIO69, AF3)
453#define GPIO70_USB_P2_1 MFP_CFG(GPIO70, AF3)
454
455/* ULPI */
456#define GPIO31_USB_ULPI_D0 MFP_CFG(GPIO31, AF4)
457#define GPIO30_USB_ULPI_D1 MFP_CFG(GPIO30, AF7)
458#define GPIO33_USB_ULPI_D2 MFP_CFG(GPIO33, AF5)
459#define GPIO34_USB_ULPI_D3 MFP_CFG(GPIO34, AF5)
460#define GPIO35_USB_ULPI_D4 MFP_CFG(GPIO35, AF5)
461#define GPIO36_USB_ULPI_D5 MFP_CFG(GPIO36, AF5)
462#define GPIO41_USB_ULPI_D6 MFP_CFG(GPIO41, AF5)
463#define GPIO42_USB_ULPI_D7 MFP_CFG(GPIO42, AF5)
464#define GPIO37_USB_ULPI_DIR MFP_CFG(GPIO37, AF4)
465#define GPIO38_USB_ULPI_CLK MFP_CFG(GPIO38, AF4)
466#define GPIO39_USB_ULPI_STP MFP_CFG(GPIO39, AF4)
467#define GPIO40_USB_ULPI_NXT MFP_CFG(GPIO40, AF4)
468
469#define GPIO3_CLK26MOUTDMD MFP_CFG(GPIO3, AF3)
470#define GPIO40_CLK26MOUTDMD MFP_CFG(GPIO40, AF7)
471#define GPIO94_CLK26MOUTDMD MFP_CFG(GPIO94, AF5)
472#define GPIO104_CLK26MOUTDMD MFP_CFG(GPIO104, AF4)
473#define DF_ADDR1_CLK26MOUTDMD MFP_CFG(DF_ADDR2, AF3)
474#define DF_ADDR3_CLK26MOUTDMD MFP_CFG(DF_ADDR3, AF3)
475
476#define GPIO14_CLK26MOUT MFP_CFG(GPIO14, AF5)
477#define GPIO38_CLK26MOUT MFP_CFG(GPIO38, AF7)
478#define GPIO92_CLK26MOUT MFP_CFG(GPIO92, AF5)
479#define GPIO105_CLK26MOUT MFP_CFG(GPIO105, AF4)
480
481#define GPIO2_CLK13MOUTDMD MFP_CFG(GPIO2, AF3)
482#define GPIO39_CLK13MOUTDMD MFP_CFG(GPIO39, AF7)
483#define GPIO50_CLK13MOUTDMD MFP_CFG(GPIO50, AF3)
484#define GPIO93_CLK13MOUTDMD MFP_CFG(GPIO93, AF5)
485#define GPIO103_CLK13MOUTDMD MFP_CFG(GPIO103, AF4)
486#define DF_ADDR2_CLK13MOUTDMD MFP_CFG(DF_ADDR2, AF3)
487
488/* 1 wire */
489#define GPIO95_OW_DQ_IN MFP_CFG(GPIO95, AF5)
490
491#endif /* __ASM_ARCH_MFP_PXA9xx_H */
diff --git a/arch/arm/mach-pxa/include/mach/mfp.h b/arch/arm/mach-pxa/include/mach/mfp.h
new file mode 100644
index 000000000000..8769567b389b
--- /dev/null
+++ b/arch/arm/mach-pxa/include/mach/mfp.h
@@ -0,0 +1,319 @@
1/*
2 * arch/arm/mach-pxa/include/mach/mfp.h
3 *
4 * Multi-Function Pin Definitions
5 *
6 * Copyright (C) 2007 Marvell International Ltd.
7 *
8 * 2007-8-21: eric miao <eric.miao@marvell.com>
9 * initial version
10 *
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License version 2 as
13 * published by the Free Software Foundation.
14 */
15
16#ifndef __ASM_ARCH_MFP_H
17#define __ASM_ARCH_MFP_H
18
19#define mfp_to_gpio(m) ((m) % 128)
20
21/* list of all the configurable MFP pins */
22enum {
23 MFP_PIN_INVALID = -1,
24
25 MFP_PIN_GPIO0 = 0,
26 MFP_PIN_GPIO1,
27 MFP_PIN_GPIO2,
28 MFP_PIN_GPIO3,
29 MFP_PIN_GPIO4,
30 MFP_PIN_GPIO5,
31 MFP_PIN_GPIO6,
32 MFP_PIN_GPIO7,
33 MFP_PIN_GPIO8,
34 MFP_PIN_GPIO9,
35 MFP_PIN_GPIO10,
36 MFP_PIN_GPIO11,
37 MFP_PIN_GPIO12,
38 MFP_PIN_GPIO13,
39 MFP_PIN_GPIO14,
40 MFP_PIN_GPIO15,
41 MFP_PIN_GPIO16,
42 MFP_PIN_GPIO17,
43 MFP_PIN_GPIO18,
44 MFP_PIN_GPIO19,
45 MFP_PIN_GPIO20,
46 MFP_PIN_GPIO21,
47 MFP_PIN_GPIO22,
48 MFP_PIN_GPIO23,
49 MFP_PIN_GPIO24,
50 MFP_PIN_GPIO25,
51 MFP_PIN_GPIO26,
52 MFP_PIN_GPIO27,
53 MFP_PIN_GPIO28,
54 MFP_PIN_GPIO29,
55 MFP_PIN_GPIO30,
56 MFP_PIN_GPIO31,
57 MFP_PIN_GPIO32,
58 MFP_PIN_GPIO33,
59 MFP_PIN_GPIO34,
60 MFP_PIN_GPIO35,
61 MFP_PIN_GPIO36,
62 MFP_PIN_GPIO37,
63 MFP_PIN_GPIO38,
64 MFP_PIN_GPIO39,
65 MFP_PIN_GPIO40,
66 MFP_PIN_GPIO41,
67 MFP_PIN_GPIO42,
68 MFP_PIN_GPIO43,
69 MFP_PIN_GPIO44,
70 MFP_PIN_GPIO45,
71 MFP_PIN_GPIO46,
72 MFP_PIN_GPIO47,
73 MFP_PIN_GPIO48,
74 MFP_PIN_GPIO49,
75 MFP_PIN_GPIO50,
76 MFP_PIN_GPIO51,
77 MFP_PIN_GPIO52,
78 MFP_PIN_GPIO53,
79 MFP_PIN_GPIO54,
80 MFP_PIN_GPIO55,
81 MFP_PIN_GPIO56,
82 MFP_PIN_GPIO57,
83 MFP_PIN_GPIO58,
84 MFP_PIN_GPIO59,
85 MFP_PIN_GPIO60,
86 MFP_PIN_GPIO61,
87 MFP_PIN_GPIO62,
88 MFP_PIN_GPIO63,
89 MFP_PIN_GPIO64,
90 MFP_PIN_GPIO65,
91 MFP_PIN_GPIO66,
92 MFP_PIN_GPIO67,
93 MFP_PIN_GPIO68,
94 MFP_PIN_GPIO69,
95 MFP_PIN_GPIO70,
96 MFP_PIN_GPIO71,
97 MFP_PIN_GPIO72,
98 MFP_PIN_GPIO73,
99 MFP_PIN_GPIO74,
100 MFP_PIN_GPIO75,
101 MFP_PIN_GPIO76,
102 MFP_PIN_GPIO77,
103 MFP_PIN_GPIO78,
104 MFP_PIN_GPIO79,
105 MFP_PIN_GPIO80,
106 MFP_PIN_GPIO81,
107 MFP_PIN_GPIO82,
108 MFP_PIN_GPIO83,
109 MFP_PIN_GPIO84,
110 MFP_PIN_GPIO85,
111 MFP_PIN_GPIO86,
112 MFP_PIN_GPIO87,
113 MFP_PIN_GPIO88,
114 MFP_PIN_GPIO89,
115 MFP_PIN_GPIO90,
116 MFP_PIN_GPIO91,
117 MFP_PIN_GPIO92,
118 MFP_PIN_GPIO93,
119 MFP_PIN_GPIO94,
120 MFP_PIN_GPIO95,
121 MFP_PIN_GPIO96,
122 MFP_PIN_GPIO97,
123 MFP_PIN_GPIO98,
124 MFP_PIN_GPIO99,
125 MFP_PIN_GPIO100,
126 MFP_PIN_GPIO101,
127 MFP_PIN_GPIO102,
128 MFP_PIN_GPIO103,
129 MFP_PIN_GPIO104,
130 MFP_PIN_GPIO105,
131 MFP_PIN_GPIO106,
132 MFP_PIN_GPIO107,
133 MFP_PIN_GPIO108,
134 MFP_PIN_GPIO109,
135 MFP_PIN_GPIO110,
136 MFP_PIN_GPIO111,
137 MFP_PIN_GPIO112,
138 MFP_PIN_GPIO113,
139 MFP_PIN_GPIO114,
140 MFP_PIN_GPIO115,
141 MFP_PIN_GPIO116,
142 MFP_PIN_GPIO117,
143 MFP_PIN_GPIO118,
144 MFP_PIN_GPIO119,
145 MFP_PIN_GPIO120,
146 MFP_PIN_GPIO121,
147 MFP_PIN_GPIO122,
148 MFP_PIN_GPIO123,
149 MFP_PIN_GPIO124,
150 MFP_PIN_GPIO125,
151 MFP_PIN_GPIO126,
152 MFP_PIN_GPIO127,
153 MFP_PIN_GPIO0_2,
154 MFP_PIN_GPIO1_2,
155 MFP_PIN_GPIO2_2,
156 MFP_PIN_GPIO3_2,
157 MFP_PIN_GPIO4_2,
158 MFP_PIN_GPIO5_2,
159 MFP_PIN_GPIO6_2,
160 MFP_PIN_GPIO7_2,
161 MFP_PIN_GPIO8_2,
162 MFP_PIN_GPIO9_2,
163 MFP_PIN_GPIO10_2,
164 MFP_PIN_GPIO11_2,
165 MFP_PIN_GPIO12_2,
166 MFP_PIN_GPIO13_2,
167 MFP_PIN_GPIO14_2,
168 MFP_PIN_GPIO15_2,
169 MFP_PIN_GPIO16_2,
170 MFP_PIN_GPIO17_2,
171
172 MFP_PIN_ULPI_STP,
173 MFP_PIN_ULPI_NXT,
174 MFP_PIN_ULPI_DIR,
175
176 MFP_PIN_nXCVREN,
177 MFP_PIN_DF_CLE_nOE,
178 MFP_PIN_DF_nADV1_ALE,
179 MFP_PIN_DF_SCLK_E,
180 MFP_PIN_DF_SCLK_S,
181 MFP_PIN_nBE0,
182 MFP_PIN_nBE1,
183 MFP_PIN_DF_nADV2_ALE,
184 MFP_PIN_DF_INT_RnB,
185 MFP_PIN_DF_nCS0,
186 MFP_PIN_DF_nCS1,
187 MFP_PIN_nLUA,
188 MFP_PIN_nLLA,
189 MFP_PIN_DF_nWE,
190 MFP_PIN_DF_ALE_nWE,
191 MFP_PIN_DF_nRE_nOE,
192 MFP_PIN_DF_ADDR0,
193 MFP_PIN_DF_ADDR1,
194 MFP_PIN_DF_ADDR2,
195 MFP_PIN_DF_ADDR3,
196 MFP_PIN_DF_IO0,
197 MFP_PIN_DF_IO1,
198 MFP_PIN_DF_IO2,
199 MFP_PIN_DF_IO3,
200 MFP_PIN_DF_IO4,
201 MFP_PIN_DF_IO5,
202 MFP_PIN_DF_IO6,
203 MFP_PIN_DF_IO7,
204 MFP_PIN_DF_IO8,
205 MFP_PIN_DF_IO9,
206 MFP_PIN_DF_IO10,
207 MFP_PIN_DF_IO11,
208 MFP_PIN_DF_IO12,
209 MFP_PIN_DF_IO13,
210 MFP_PIN_DF_IO14,
211 MFP_PIN_DF_IO15,
212
213 /* additional pins on PXA930 */
214 MFP_PIN_GSIM_UIO,
215 MFP_PIN_GSIM_UCLK,
216 MFP_PIN_GSIM_UDET,
217 MFP_PIN_GSIM_nURST,
218 MFP_PIN_PMIC_INT,
219 MFP_PIN_RDY,
220
221 MFP_PIN_MAX,
222};
223
224/*
225 * a possible MFP configuration is represented by a 32-bit integer
226 *
227 * bit 0.. 9 - MFP Pin Number (1024 Pins Maximum)
228 * bit 10..12 - Alternate Function Selection
229 * bit 13..15 - Drive Strength
230 * bit 16..18 - Low Power Mode State
231 * bit 19..20 - Low Power Mode Edge Detection
232 * bit 21..22 - Run Mode Pull State
233 *
234 * to facilitate the definition, the following macros are provided
235 *
236 * MFP_CFG_DEFAULT - default MFP configuration value, with
237 * alternate function = 0,
238 * drive strength = fast 3mA (MFP_DS03X)
239 * low power mode = default
240 * edge detection = none
241 *
242 * MFP_CFG - default MFPR value with alternate function
243 * MFP_CFG_DRV - default MFPR value with alternate function and
244 * pin drive strength
245 * MFP_CFG_LPM - default MFPR value with alternate function and
246 * low power mode
247 * MFP_CFG_X - default MFPR value with alternate function,
248 * pin drive strength and low power mode
249 */
250
251typedef unsigned long mfp_cfg_t;
252
253#define MFP_PIN(x) ((x) & 0x3ff)
254
255#define MFP_AF0 (0x0 << 10)
256#define MFP_AF1 (0x1 << 10)
257#define MFP_AF2 (0x2 << 10)
258#define MFP_AF3 (0x3 << 10)
259#define MFP_AF4 (0x4 << 10)
260#define MFP_AF5 (0x5 << 10)
261#define MFP_AF6 (0x6 << 10)
262#define MFP_AF7 (0x7 << 10)
263#define MFP_AF_MASK (0x7 << 10)
264#define MFP_AF(x) (((x) >> 10) & 0x7)
265
266#define MFP_DS01X (0x0 << 13)
267#define MFP_DS02X (0x1 << 13)
268#define MFP_DS03X (0x2 << 13)
269#define MFP_DS04X (0x3 << 13)
270#define MFP_DS06X (0x4 << 13)
271#define MFP_DS08X (0x5 << 13)
272#define MFP_DS10X (0x6 << 13)
273#define MFP_DS13X (0x7 << 13)
274#define MFP_DS_MASK (0x7 << 13)
275#define MFP_DS(x) (((x) >> 13) & 0x7)
276
277#define MFP_LPM_INPUT (0x0 << 16)
278#define MFP_LPM_DRIVE_LOW (0x1 << 16)
279#define MFP_LPM_DRIVE_HIGH (0x2 << 16)
280#define MFP_LPM_PULL_LOW (0x3 << 16)
281#define MFP_LPM_PULL_HIGH (0x4 << 16)
282#define MFP_LPM_FLOAT (0x5 << 16)
283#define MFP_LPM_STATE_MASK (0x7 << 16)
284#define MFP_LPM_STATE(x) (((x) >> 16) & 0x7)
285
286#define MFP_LPM_EDGE_NONE (0x0 << 19)
287#define MFP_LPM_EDGE_RISE (0x1 << 19)
288#define MFP_LPM_EDGE_FALL (0x2 << 19)
289#define MFP_LPM_EDGE_BOTH (0x3 << 19)
290#define MFP_LPM_EDGE_MASK (0x3 << 19)
291#define MFP_LPM_EDGE(x) (((x) >> 19) & 0x3)
292
293#define MFP_PULL_NONE (0x0 << 21)
294#define MFP_PULL_LOW (0x1 << 21)
295#define MFP_PULL_HIGH (0x2 << 21)
296#define MFP_PULL_BOTH (0x3 << 21)
297#define MFP_PULL_MASK (0x3 << 21)
298#define MFP_PULL(x) (((x) >> 21) & 0x3)
299
300#define MFP_CFG_DEFAULT (MFP_AF0 | MFP_DS03X | MFP_LPM_INPUT |\
301 MFP_LPM_EDGE_NONE | MFP_PULL_NONE)
302
303#define MFP_CFG(pin, af) \
304 ((MFP_CFG_DEFAULT & ~MFP_AF_MASK) |\
305 (MFP_PIN(MFP_PIN_##pin) | MFP_##af))
306
307#define MFP_CFG_DRV(pin, af, drv) \
308 ((MFP_CFG_DEFAULT & ~(MFP_AF_MASK | MFP_DS_MASK)) |\
309 (MFP_PIN(MFP_PIN_##pin) | MFP_##af | MFP_##drv))
310
311#define MFP_CFG_LPM(pin, af, lpm) \
312 ((MFP_CFG_DEFAULT & ~(MFP_AF_MASK | MFP_LPM_STATE_MASK)) |\
313 (MFP_PIN(MFP_PIN_##pin) | MFP_##af | MFP_LPM_##lpm))
314
315#define MFP_CFG_X(pin, af, drv, lpm) \
316 ((MFP_CFG_DEFAULT & ~(MFP_AF_MASK | MFP_DS_MASK | MFP_LPM_STATE_MASK)) |\
317 (MFP_PIN(MFP_PIN_##pin) | MFP_##af | MFP_##drv | MFP_LPM_##lpm))
318
319#endif /* __ASM_ARCH_MFP_H */
diff --git a/include/asm-arm/arch-pxa/mmc.h b/arch/arm/mach-pxa/include/mach/mmc.h
index 6d1304c9270f..6d1304c9270f 100644
--- a/include/asm-arm/arch-pxa/mmc.h
+++ b/arch/arm/mach-pxa/include/mach/mmc.h
diff --git a/arch/arm/mach-pxa/include/mach/mtd-xip.h b/arch/arm/mach-pxa/include/mach/mtd-xip.h
new file mode 100644
index 000000000000..351f32f13ce4
--- /dev/null
+++ b/arch/arm/mach-pxa/include/mach/mtd-xip.h
@@ -0,0 +1,37 @@
1/*
2 * MTD primitives for XIP support. Architecture specific functions
3 *
4 * Do not include this file directly. It's included from linux/mtd/xip.h
5 *
6 * Author: Nicolas Pitre
7 * Created: Nov 2, 2004
8 * Copyright: (C) 2004 MontaVista Software, Inc.
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
13 *
14 * $Id: xip.h,v 1.2 2004/12/01 15:49:10 nico Exp $
15 */
16
17#ifndef __ARCH_PXA_MTD_XIP_H__
18#define __ARCH_PXA_MTD_XIP_H__
19
20#include <mach/pxa-regs.h>
21
22#define xip_irqpending() (ICIP & ICMR)
23
24/* we sample OSCR and convert desired delta to usec (1/4 ~= 1000000/3686400) */
25#define xip_currtime() (OSCR)
26#define xip_elapsed_since(x) (signed)((OSCR - (x)) / 4)
27
28/*
29 * xip_cpu_idle() is used when waiting for a delay equal or larger than
30 * the system timer tick period. This should put the CPU into idle mode
31 * to save power and to be woken up only when some interrupts are pending.
32 * As above, this should not rely upon standard kernel code.
33 */
34
35#define xip_cpu_idle() asm volatile ("mcr p14, 0, %0, c7, c0, 0" :: "r" (1))
36
37#endif /* __ARCH_PXA_MTD_XIP_H__ */
diff --git a/include/asm-arm/arch-pxa/ohci.h b/arch/arm/mach-pxa/include/mach/ohci.h
index e848a47128cd..e848a47128cd 100644
--- a/include/asm-arm/arch-pxa/ohci.h
+++ b/arch/arm/mach-pxa/include/mach/ohci.h
diff --git a/include/asm-arm/arch-pxa/palmtx.h b/arch/arm/mach-pxa/include/mach/palmtx.h
index 1e8bccbda510..1e8bccbda510 100644
--- a/include/asm-arm/arch-pxa/palmtx.h
+++ b/arch/arm/mach-pxa/include/mach/palmtx.h
diff --git a/arch/arm/mach-pxa/include/mach/pcm027.h b/arch/arm/mach-pxa/include/mach/pcm027.h
new file mode 100644
index 000000000000..4dcd2e8baa61
--- /dev/null
+++ b/arch/arm/mach-pxa/include/mach/pcm027.h
@@ -0,0 +1,75 @@
1/*
2 * arch/arm/mach-pxa/include/mach/pcm027.h
3 *
4 * (c) 2003 Phytec Messtechnik GmbH <armlinux@phytec.de>
5 * (c) 2007 Juergen Beisert <j.beisert@pengutronix.de>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
21
22/*
23 * Definitions of CPU card resources only
24 */
25
26/* I2C RTC */
27#define PCM027_RTC_IRQ_GPIO 0
28#define PCM027_RTC_IRQ IRQ_GPIO(PCM027_RTC_IRQ_GPIO)
29#define PCM027_RTC_IRQ_EDGE IRQ_TYPE_EDGE_FALLING
30#define ADR_PCM027_RTC 0x51 /* I2C address */
31
32/* I2C EEPROM */
33#define ADR_PCM027_EEPROM 0x54 /* I2C address */
34
35/* Ethernet chip (SMSC91C111) */
36#define PCM027_ETH_IRQ_GPIO 52
37#define PCM027_ETH_IRQ IRQ_GPIO(PCM027_ETH_IRQ_GPIO)
38#define PCM027_ETH_IRQ_EDGE IRQ_TYPE_EDGE_RISING
39#define PCM027_ETH_PHYS PXA_CS5_PHYS
40#define PCM027_ETH_SIZE (1*1024*1024)
41
42/* CAN controller SJA1000 (unsupported yet) */
43#define PCM027_CAN_IRQ_GPIO 114
44#define PCM027_CAN_IRQ IRQ_GPIO(PCM027_CAN_IRQ_GPIO)
45#define PCM027_CAN_IRQ_EDGE IRQ_TYPE_EDGE_FALLING
46#define PCM027_CAN_PHYS 0x22000000
47#define PCM027_CAN_SIZE 0x100
48
49/* SPI GPIO expander (unsupported yet) */
50#define PCM027_EGPIO_IRQ_GPIO 27
51#define PCM027_EGPIO_IRQ IRQ_GPIO(PCM027_EGPIO_IRQ_GPIO)
52#define PCM027_EGPIO_IRQ_EDGE IRQ_TYPE_EDGE_FALLING
53#define PCM027_EGPIO_CS 24
54/*
55 * TODO: Switch this pin from dedicated usage to GPIO if
56 * more than the MAX7301 device is connected to this SPI bus
57 */
58#define PCM027_EGPIO_CS_MODE GPIO24_SFRM_MD
59
60/* Flash memory */
61#define PCM027_FLASH_PHYS 0x00000000
62#define PCM027_FLASH_SIZE 0x02000000
63
64/* onboard LEDs connected to GPIO */
65#define PCM027_LED_CPU 90
66#define PCM027_LED_HEARD_BEAT 91
67
68/*
69 * This CPU module needs a baseboard to work. After basic initializing
70 * its own devices, it calls baseboard's init function.
71 * TODO: Add your own basebaord init function and call it from
72 * inside pcm027_init(). This example here is for the developmen board.
73 * Refer pcm990-baseboard.c
74 */
75extern void pcm990_baseboard_init(void);
diff --git a/arch/arm/mach-pxa/include/mach/pcm990_baseboard.h b/arch/arm/mach-pxa/include/mach/pcm990_baseboard.h
new file mode 100644
index 000000000000..8a4383b776d7
--- /dev/null
+++ b/arch/arm/mach-pxa/include/mach/pcm990_baseboard.h
@@ -0,0 +1,275 @@
1/*
2 * arch/arm/mach-pxa/include/mach/pcm990_baseboard.h
3 *
4 * (c) 2003 Phytec Messtechnik GmbH <armlinux@phytec.de>
5 * (c) 2007 Juergen Beisert <j.beisert@pengutronix.de>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
21
22#include <mach/pcm027.h>
23
24/*
25 * definitions relevant only when the PCM-990
26 * development base board is in use
27 */
28
29/* CPLD's interrupt controller is connected to PCM-027 GPIO 9 */
30#define PCM990_CTRL_INT_IRQ_GPIO 9
31#define PCM990_CTRL_INT_IRQ IRQ_GPIO(PCM990_CTRL_INT_IRQ_GPIO)
32#define PCM990_CTRL_INT_IRQ_EDGE IRQ_TYPE_EDGE_RISING
33#define PCM990_CTRL_PHYS PXA_CS1_PHYS /* 16-Bit */
34#define PCM990_CTRL_BASE 0xea000000
35#define PCM990_CTRL_SIZE (1*1024*1024)
36
37#define PCM990_CTRL_PWR_IRQ_GPIO 14
38#define PCM990_CTRL_PWR_IRQ IRQ_GPIO(PCM990_CTRL_PWR_IRQ_GPIO)
39#define PCM990_CTRL_PWR_IRQ_EDGE IRQ_TYPE_EDGE_RISING
40
41/* visible CPLD (U7) registers */
42#define PCM990_CTRL_REG0 0x0000 /* RESET REGISTER */
43#define PCM990_CTRL_SYSRES 0x0001 /* System RESET REGISTER */
44#define PCM990_CTRL_RESOUT 0x0002 /* RESETOUT Enable REGISTER */
45#define PCM990_CTRL_RESGPIO 0x0004 /* RESETGPIO Enable REGISTER */
46
47#define PCM990_CTRL_REG1 0x0002 /* Power REGISTER */
48#define PCM990_CTRL_5VOFF 0x0001 /* Disable 5V Regulators */
49#define PCM990_CTRL_CANPWR 0x0004 /* Enable CANPWR ADUM */
50#define PCM990_CTRL_PM_5V 0x0008 /* Read 5V OK */
51
52#define PCM990_CTRL_REG2 0x0004 /* LED REGISTER */
53#define PCM990_CTRL_LEDPWR 0x0001 /* POWER LED enable */
54#define PCM990_CTRL_LEDBAS 0x0002 /* BASIS LED enable */
55#define PCM990_CTRL_LEDUSR 0x0004 /* USER LED enable */
56
57#define PCM990_CTRL_REG3 0x0006 /* LCD CTRL REGISTER 3 */
58#define PCM990_CTRL_LCDPWR 0x0001 /* RW LCD Power on */
59#define PCM990_CTRL_LCDON 0x0002 /* RW LCD Latch on */
60#define PCM990_CTRL_LCDPOS1 0x0004 /* RW POS 1 */
61#define PCM990_CTRL_LCDPOS2 0x0008 /* RW POS 2 */
62
63#define PCM990_CTRL_REG4 0x0008 /* MMC1 CTRL REGISTER 4 */
64#define PCM990_CTRL_MMC1PWR 0x0001 /* RW MMC1 Power on */
65
66#define PCM990_CTRL_REG5 0x000A /* MMC2 CTRL REGISTER 5 */
67#define PCM990_CTRL_MMC2PWR 0x0001 /* RW MMC2 Power on */
68#define PCM990_CTRL_MMC2LED 0x0002 /* RW MMC2 LED */
69#define PCM990_CTRL_MMC2DE 0x0004 /* R MMC2 Card detect */
70#define PCM990_CTRL_MMC2WP 0x0008 /* R MMC2 Card write protect */
71
72#define PCM990_CTRL_REG6 0x000C /* Interrupt Clear REGISTER */
73#define PCM990_CTRL_INTC0 0x0001 /* Clear Reg BT Detect */
74#define PCM990_CTRL_INTC1 0x0002 /* Clear Reg FR RI */
75#define PCM990_CTRL_INTC2 0x0004 /* Clear Reg MMC1 Detect */
76#define PCM990_CTRL_INTC3 0x0008 /* Clear Reg PM_5V off */
77
78#define PCM990_CTRL_REG7 0x000E /* Interrupt Enable REGISTER */
79#define PCM990_CTRL_ENAINT0 0x0001 /* Enable Int BT Detect */
80#define PCM990_CTRL_ENAINT1 0x0002 /* Enable Int FR RI */
81#define PCM990_CTRL_ENAINT2 0x0004 /* Enable Int MMC1 Detect */
82#define PCM990_CTRL_ENAINT3 0x0008 /* Enable Int PM_5V off */
83
84#define PCM990_CTRL_REG8 0x0014 /* Uart REGISTER */
85#define PCM990_CTRL_FFSD 0x0001 /* BT Uart Enable */
86#define PCM990_CTRL_BTSD 0x0002 /* FF Uart Enable */
87#define PCM990_CTRL_FFRI 0x0004 /* FF Uart RI detect */
88#define PCM990_CTRL_BTRX 0x0008 /* BT Uart Rx detect */
89
90#define PCM990_CTRL_REG9 0x0010 /* AC97 Flash REGISTER */
91#define PCM990_CTRL_FLWP 0x0001 /* pC Flash Write Protect */
92#define PCM990_CTRL_FLDIS 0x0002 /* pC Flash Disable */
93#define PCM990_CTRL_AC97ENA 0x0004 /* Enable AC97 Expansion */
94
95#define PCM990_CTRL_REG10 0x0012 /* GPS-REGISTER */
96#define PCM990_CTRL_GPSPWR 0x0004 /* GPS-Modul Power on */
97#define PCM990_CTRL_GPSENA 0x0008 /* GPS-Modul Enable */
98
99#define PCM990_CTRL_REG11 0x0014 /* Accu REGISTER */
100#define PCM990_CTRL_ACENA 0x0001 /* Charge Enable */
101#define PCM990_CTRL_ACSEL 0x0002 /* Charge Akku -> DC Enable */
102#define PCM990_CTRL_ACPRES 0x0004 /* DC Present */
103#define PCM990_CTRL_ACALARM 0x0008 /* Error Akku */
104
105#define PCM990_CTRL_P2V(x) ((x) - PCM990_CTRL_PHYS + PCM990_CTRL_BASE)
106#define PCM990_CTRL_V2P(x) ((x) - PCM990_CTRL_BASE + PCM990_CTRL_PHYS)
107
108#ifndef __ASSEMBLY__
109# define __PCM990_CTRL_REG(x) \
110 (*((volatile unsigned char *)PCM990_CTRL_P2V(x)))
111#else
112# define __PCM990_CTRL_REG(x) PCM990_CTRL_P2V(x)
113#endif
114
115#define PCM990_INTMSKENA __PCM990_CTRL_REG(PCM990_CTRL_PHYS + PCM990_CTRL_REG7)
116#define PCM990_INTSETCLR __PCM990_CTRL_REG(PCM990_CTRL_PHYS + PCM990_CTRL_REG6)
117#define PCM990_CTRL0 __PCM990_CTRL_REG(PCM990_CTRL_PHYS + PCM990_CTRL_REG0)
118#define PCM990_CTRL1 __PCM990_CTRL_REG(PCM990_CTRL_PHYS + PCM990_CTRL_REG1)
119#define PCM990_CTRL2 __PCM990_CTRL_REG(PCM990_CTRL_PHYS + PCM990_CTRL_REG2)
120#define PCM990_CTRL3 __PCM990_CTRL_REG(PCM990_CTRL_PHYS + PCM990_CTRL_REG3)
121#define PCM990_CTRL4 __PCM990_CTRL_REG(PCM990_CTRL_PHYS + PCM990_CTRL_REG4)
122#define PCM990_CTRL5 __PCM990_CTRL_REG(PCM990_CTRL_PHYS + PCM990_CTRL_REG5)
123#define PCM990_CTRL6 __PCM990_CTRL_REG(PCM990_CTRL_PHYS + PCM990_CTRL_REG6)
124#define PCM990_CTRL7 __PCM990_CTRL_REG(PCM990_CTRL_PHYS + PCM990_CTRL_REG7)
125#define PCM990_CTRL8 __PCM990_CTRL_REG(PCM990_CTRL_PHYS + PCM990_CTRL_REG8)
126#define PCM990_CTRL9 __PCM990_CTRL_REG(PCM990_CTRL_PHYS + PCM990_CTRL_REG9)
127#define PCM990_CTRL10 __PCM990_CTRL_REG(PCM990_CTRL_PHYS + PCM990_CTRL_REG10)
128#define PCM990_CTRL11 __PCM990_CTRL_REG(PCM990_CTRL_PHYS + PCM990_CTRL_REG11)
129
130
131/*
132 * IDE
133 */
134#define PCM990_IDE_IRQ_GPIO 13
135#define PCM990_IDE_IRQ IRQ_GPIO(PCM990_IDE_IRQ_GPIO)
136#define PCM990_IDE_IRQ_EDGE IRQ_TYPE_EDGE_RISING
137#define PCM990_IDE_PLD_PHYS 0x20000000 /* 16 bit wide */
138#define PCM990_IDE_PLD_BASE 0xee000000
139#define PCM990_IDE_PLD_SIZE (1*1024*1024)
140
141/* visible CPLD (U6) registers */
142#define PCM990_IDE_PLD_REG0 0x1000 /* OFFSET IDE REGISTER 0 */
143#define PCM990_IDE_PM5V 0x0004 /* R System VCC_5V */
144#define PCM990_IDE_STBY 0x0008 /* R System StandBy */
145
146#define PCM990_IDE_PLD_REG1 0x1002 /* OFFSET IDE REGISTER 1 */
147#define PCM990_IDE_IDEMODE 0x0001 /* R TrueIDE Mode */
148#define PCM990_IDE_DMAENA 0x0004 /* RW DMA Enable */
149#define PCM990_IDE_DMA1_0 0x0008 /* RW 1=DREQ1 0=DREQ0 */
150
151#define PCM990_IDE_PLD_REG2 0x1004 /* OFFSET IDE REGISTER 2 */
152#define PCM990_IDE_RESENA 0x0001 /* RW IDE Reset Bit enable */
153#define PCM990_IDE_RES 0x0002 /* RW IDE Reset Bit */
154#define PCM990_IDE_RDY 0x0008 /* RDY */
155
156#define PCM990_IDE_PLD_REG3 0x1006 /* OFFSET IDE REGISTER 3 */
157#define PCM990_IDE_IDEOE 0x0001 /* RW Latch on Databus */
158#define PCM990_IDE_IDEON 0x0002 /* RW Latch on Control Address */
159#define PCM990_IDE_IDEIN 0x0004 /* RW Latch on Interrupt usw. */
160
161#define PCM990_IDE_PLD_REG4 0x1008 /* OFFSET IDE REGISTER 4 */
162#define PCM990_IDE_PWRENA 0x0001 /* RW IDE Power enable */
163#define PCM990_IDE_5V 0x0002 /* R IDE Power 5V */
164#define PCM990_IDE_PWG 0x0008 /* R IDE Power is on */
165
166#define PCM990_IDE_PLD_P2V(x) ((x) - PCM990_IDE_PLD_PHYS + PCM990_IDE_PLD_BASE)
167#define PCM990_IDE_PLD_V2P(x) ((x) - PCM990_IDE_PLD_BASE + PCM990_IDE_PLD_PHYS)
168
169#ifndef __ASSEMBLY__
170# define __PCM990_IDE_PLD_REG(x) \
171 (*((volatile unsigned char *)PCM990_IDE_PLD_P2V(x)))
172#else
173# define __PCM990_IDE_PLD_REG(x) PCM990_IDE_PLD_P2V(x)
174#endif
175
176#define PCM990_IDE0 \
177 __PCM990_IDE_PLD_REG(PCM990_IDE_PLD_PHYS + PCM990_IDE_PLD_REG0)
178#define PCM990_IDE1 \
179 __PCM990_IDE_PLD_REG(PCM990_IDE_PLD_PHYS + PCM990_IDE_PLD_REG1)
180#define PCM990_IDE2 \
181 __PCM990_IDE_PLD_REG(PCM990_IDE_PLD_PHYS + PCM990_IDE_PLD_REG2)
182#define PCM990_IDE3 \
183 __PCM990_IDE_PLD_REG(PCM990_IDE_PLD_PHYS + PCM990_IDE_PLD_REG3)
184#define PCM990_IDE4 \
185 __PCM990_IDE_PLD_REG(PCM990_IDE_PLD_PHYS + PCM990_IDE_PLD_REG4)
186
187/*
188 * Compact Flash
189 */
190#define PCM990_CF_IRQ_GPIO 11
191#define PCM990_CF_IRQ IRQ_GPIO(PCM990_CF_IRQ_GPIO)
192#define PCM990_CF_IRQ_EDGE IRQ_TYPE_EDGE_RISING
193
194#define PCM990_CF_CD_GPIO 12
195#define PCM990_CF_CD IRQ_GPIO(PCM990_CF_CD_GPIO)
196#define PCM990_CF_CD_EDGE IRQ_TYPE_EDGE_RISING
197
198#define PCM990_CF_PLD_PHYS 0x30000000 /* 16 bit wide */
199#define PCM990_CF_PLD_BASE 0xef000000
200#define PCM990_CF_PLD_SIZE (1*1024*1024)
201#define PCM990_CF_PLD_P2V(x) ((x) - PCM990_CF_PLD_PHYS + PCM990_CF_PLD_BASE)
202#define PCM990_CF_PLD_V2P(x) ((x) - PCM990_CF_PLD_BASE + PCM990_CF_PLD_PHYS)
203
204/* visible CPLD (U6) registers */
205#define PCM990_CF_PLD_REG0 0x1000 /* OFFSET CF REGISTER 0 */
206#define PCM990_CF_REG0_LED 0x0001 /* RW LED on */
207#define PCM990_CF_REG0_BLK 0x0002 /* RW LED flash when access */
208#define PCM990_CF_REG0_PM5V 0x0004 /* R System VCC_5V enable */
209#define PCM990_CF_REG0_STBY 0x0008 /* R System StandBy */
210
211#define PCM990_CF_PLD_REG1 0x1002 /* OFFSET CF REGISTER 1 */
212#define PCM990_CF_REG1_IDEMODE 0x0001 /* RW CF card run as TrueIDE */
213#define PCM990_CF_REG1_CF0 0x0002 /* RW CF card at ADDR 0x28000000 */
214
215#define PCM990_CF_PLD_REG2 0x1004 /* OFFSET CF REGISTER 2 */
216#define PCM990_CF_REG2_RES 0x0002 /* RW CF RESET BIT */
217#define PCM990_CF_REG2_RDYENA 0x0004 /* RW Enable CF_RDY */
218#define PCM990_CF_REG2_RDY 0x0008 /* R CF_RDY auf PWAIT */
219
220#define PCM990_CF_PLD_REG3 0x1006 /* OFFSET CF REGISTER 3 */
221#define PCM990_CF_REG3_CFOE 0x0001 /* RW Latch on Databus */
222#define PCM990_CF_REG3_CFON 0x0002 /* RW Latch on Control Address */
223#define PCM990_CF_REG3_CFIN 0x0004 /* RW Latch on Interrupt usw. */
224#define PCM990_CF_REG3_CFCD 0x0008 /* RW Latch on CD1/2 VS1/2 usw */
225
226#define PCM990_CF_PLD_REG4 0x1008 /* OFFSET CF REGISTER 4 */
227#define PCM990_CF_REG4_PWRENA 0x0001 /* RW CF Power on (CD1/2 = "00") */
228#define PCM990_CF_REG4_5_3V 0x0002 /* RW 1 = 5V CF_VCC 0 = 3 V CF_VCC */
229#define PCM990_CF_REG4_3B 0x0004 /* RW 3.0V Backup from VCC (5_3V=0) */
230#define PCM990_CF_REG4_PWG 0x0008 /* R CF-Power is on */
231
232#define PCM990_CF_PLD_REG5 0x100A /* OFFSET CF REGISTER 5 */
233#define PCM990_CF_REG5_BVD1 0x0001 /* R CF /BVD1 */
234#define PCM990_CF_REG5_BVD2 0x0002 /* R CF /BVD2 */
235#define PCM990_CF_REG5_VS1 0x0004 /* R CF /VS1 */
236#define PCM990_CF_REG5_VS2 0x0008 /* R CF /VS2 */
237
238#define PCM990_CF_PLD_REG6 0x100C /* OFFSET CF REGISTER 6 */
239#define PCM990_CF_REG6_CD1 0x0001 /* R CF Card_Detect1 */
240#define PCM990_CF_REG6_CD2 0x0002 /* R CF Card_Detect2 */
241
242#ifndef __ASSEMBLY__
243# define __PCM990_CF_PLD_REG(x) \
244 (*((volatile unsigned char *)PCM990_CF_PLD_P2V(x)))
245#else
246# define __PCM990_CF_PLD_REG(x) PCM990_CF_PLD_P2V(x)
247#endif
248
249#define PCM990_CF0 __PCM990_CF_PLD_REG(PCM990_CF_PLD_PHYS + PCM990_CF_PLD_REG0)
250#define PCM990_CF1 __PCM990_CF_PLD_REG(PCM990_CF_PLD_PHYS + PCM990_CF_PLD_REG1)
251#define PCM990_CF2 __PCM990_CF_PLD_REG(PCM990_CF_PLD_PHYS + PCM990_CF_PLD_REG2)
252#define PCM990_CF3 __PCM990_CF_PLD_REG(PCM990_CF_PLD_PHYS + PCM990_CF_PLD_REG3)
253#define PCM990_CF4 __PCM990_CF_PLD_REG(PCM990_CF_PLD_PHYS + PCM990_CF_PLD_REG4)
254#define PCM990_CF5 __PCM990_CF_PLD_REG(PCM990_CF_PLD_PHYS + PCM990_CF_PLD_REG5)
255#define PCM990_CF6 __PCM990_CF_PLD_REG(PCM990_CF_PLD_PHYS + PCM990_CF_PLD_REG6)
256
257/*
258 * Wolfson AC97 Touch
259 */
260#define PCM990_AC97_IRQ_GPIO 10
261#define PCM990_AC97_IRQ IRQ_GPIO(PCM990_AC97_IRQ_GPIO)
262#define PCM990_AC97_IRQ_EDGE IRQ_TYPE_EDGE_RISING
263
264/*
265 * MMC phyCORE
266 */
267#define PCM990_MMC0_IRQ_GPIO 9
268#define PCM990_MMC0_IRQ IRQ_GPIO(PCM990_MMC0_IRQ_GPIO)
269#define PCM990_MMC0_IRQ_EDGE IRQ_TYPE_EDGE_FALLING
270
271/*
272 * USB phyCore
273 */
274#define PCM990_USB_OVERCURRENT (88 | GPIO_ALT_FN_1_IN)
275#define PCM990_USB_PWR_EN (89 | GPIO_ALT_FN_2_OUT)
diff --git a/include/asm-arm/arch-pxa/pm.h b/arch/arm/mach-pxa/include/mach/pm.h
index 261e5bc958db..261e5bc958db 100644
--- a/include/asm-arm/arch-pxa/pm.h
+++ b/arch/arm/mach-pxa/include/mach/pm.h
diff --git a/arch/arm/mach-pxa/include/mach/poodle.h b/arch/arm/mach-pxa/include/mach/poodle.h
new file mode 100644
index 000000000000..8956afe8195e
--- /dev/null
+++ b/arch/arm/mach-pxa/include/mach/poodle.h
@@ -0,0 +1,75 @@
1/*
2 * arch/arm/mach-pxa/include/mach/poodle.h
3 *
4 * May be copied or modified under the terms of the GNU General Public
5 * License. See linux/COPYING for more information.
6 *
7 * Based on:
8 * arch/arm/mach-sa1100/include/mach/collie.h
9 *
10 * ChangeLog:
11 * 04-06-2001 Lineo Japan, Inc.
12 * 04-16-2001 SHARP Corporation
13 * Update to 2.6 John Lenz
14 */
15#ifndef __ASM_ARCH_POODLE_H
16#define __ASM_ARCH_POODLE_H 1
17
18/*
19 * GPIOs
20 */
21/* PXA GPIOs */
22#define POODLE_GPIO_ON_KEY (0)
23#define POODLE_GPIO_AC_IN (1)
24#define POODLE_GPIO_CO 16
25#define POODLE_GPIO_TP_INT (5)
26#define POODLE_GPIO_WAKEUP (11) /* change battery */
27#define POODLE_GPIO_GA_INT (10)
28#define POODLE_GPIO_IR_ON (22)
29#define POODLE_GPIO_HP_IN (4)
30#define POODLE_GPIO_CF_IRQ (17)
31#define POODLE_GPIO_CF_CD (14)
32#define POODLE_GPIO_CF_STSCHG (14)
33#define POODLE_GPIO_SD_PWR (33)
34#define POODLE_GPIO_SD_PWR1 (3)
35#define POODLE_GPIO_nSD_CLK (6)
36#define POODLE_GPIO_nSD_WP (7)
37#define POODLE_GPIO_nSD_INT (8)
38#define POODLE_GPIO_nSD_DETECT (9)
39#define POODLE_GPIO_MAIN_BAT_LOW (13)
40#define POODLE_GPIO_BAT_COVER (13)
41#define POODLE_GPIO_USB_PULLUP (20)
42#define POODLE_GPIO_ADC_TEMP_ON (21)
43#define POODLE_GPIO_BYPASS_ON (36)
44#define POODLE_GPIO_CHRG_ON (38)
45#define POODLE_GPIO_CHRG_FULL (16)
46#define POODLE_GPIO_DISCHARGE_ON (42) /* Enable battery discharge */
47
48/* PXA GPIOs */
49#define POODLE_IRQ_GPIO_ON_KEY IRQ_GPIO(0)
50#define POODLE_IRQ_GPIO_AC_IN IRQ_GPIO(1)
51#define POODLE_IRQ_GPIO_HP_IN IRQ_GPIO(4)
52#define POODLE_IRQ_GPIO_CO IRQ_GPIO(16)
53#define POODLE_IRQ_GPIO_TP_INT IRQ_GPIO(5)
54#define POODLE_IRQ_GPIO_WAKEUP IRQ_GPIO(11)
55#define POODLE_IRQ_GPIO_GA_INT IRQ_GPIO(10)
56#define POODLE_IRQ_GPIO_CF_IRQ IRQ_GPIO(17)
57#define POODLE_IRQ_GPIO_CF_CD IRQ_GPIO(14)
58#define POODLE_IRQ_GPIO_nSD_INT IRQ_GPIO(8)
59#define POODLE_IRQ_GPIO_nSD_DETECT IRQ_GPIO(9)
60#define POODLE_IRQ_GPIO_MAIN_BAT_LOW IRQ_GPIO(13)
61
62/* SCOOP GPIOs */
63#define POODLE_SCOOP_CHARGE_ON SCOOP_GPCR_PA11
64#define POODLE_SCOOP_CP401 SCOOP_GPCR_PA13
65#define POODLE_SCOOP_VPEN SCOOP_GPCR_PA18
66#define POODLE_SCOOP_L_PCLK SCOOP_GPCR_PA20
67#define POODLE_SCOOP_L_LCLK SCOOP_GPCR_PA21
68#define POODLE_SCOOP_HS_OUT SCOOP_GPCR_PA22
69
70#define POODLE_SCOOP_IO_DIR ( POODLE_SCOOP_VPEN | POODLE_SCOOP_HS_OUT )
71#define POODLE_SCOOP_IO_OUT ( 0 )
72
73extern struct platform_device poodle_locomo_device;
74
75#endif /* __ASM_ARCH_POODLE_H */
diff --git a/arch/arm/mach-pxa/include/mach/pxa-regs.h b/arch/arm/mach-pxa/include/mach/pxa-regs.h
new file mode 100644
index 000000000000..12288ca3cbb2
--- /dev/null
+++ b/arch/arm/mach-pxa/include/mach/pxa-regs.h
@@ -0,0 +1,1070 @@
1/*
2 * arch/arm/mach-pxa/include/mach/pxa-regs.h
3 *
4 * Author: Nicolas Pitre
5 * Created: Jun 15, 2001
6 * Copyright: MontaVista Software Inc.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 */
12
13#ifndef __PXA_REGS_H
14#define __PXA_REGS_H
15
16
17/*
18 * PXA Chip selects
19 */
20
21#define PXA_CS0_PHYS 0x00000000
22#define PXA_CS1_PHYS 0x04000000
23#define PXA_CS2_PHYS 0x08000000
24#define PXA_CS3_PHYS 0x0C000000
25#define PXA_CS4_PHYS 0x10000000
26#define PXA_CS5_PHYS 0x14000000
27
28
29/*
30 * Personal Computer Memory Card International Association (PCMCIA) sockets
31 */
32
33#define PCMCIAPrtSp 0x04000000 /* PCMCIA Partition Space [byte] */
34#define PCMCIASp (4*PCMCIAPrtSp) /* PCMCIA Space [byte] */
35#define PCMCIAIOSp PCMCIAPrtSp /* PCMCIA I/O Space [byte] */
36#define PCMCIAAttrSp PCMCIAPrtSp /* PCMCIA Attribute Space [byte] */
37#define PCMCIAMemSp PCMCIAPrtSp /* PCMCIA Memory Space [byte] */
38
39#define PCMCIA0Sp PCMCIASp /* PCMCIA 0 Space [byte] */
40#define PCMCIA0IOSp PCMCIAIOSp /* PCMCIA 0 I/O Space [byte] */
41#define PCMCIA0AttrSp PCMCIAAttrSp /* PCMCIA 0 Attribute Space [byte] */
42#define PCMCIA0MemSp PCMCIAMemSp /* PCMCIA 0 Memory Space [byte] */
43
44#define PCMCIA1Sp PCMCIASp /* PCMCIA 1 Space [byte] */
45#define PCMCIA1IOSp PCMCIAIOSp /* PCMCIA 1 I/O Space [byte] */
46#define PCMCIA1AttrSp PCMCIAAttrSp /* PCMCIA 1 Attribute Space [byte] */
47#define PCMCIA1MemSp PCMCIAMemSp /* PCMCIA 1 Memory Space [byte] */
48
49#define _PCMCIA(Nb) /* PCMCIA [0..1] */ \
50 (0x20000000 + (Nb)*PCMCIASp)
51#define _PCMCIAIO(Nb) _PCMCIA (Nb) /* PCMCIA I/O [0..1] */
52#define _PCMCIAAttr(Nb) /* PCMCIA Attribute [0..1] */ \
53 (_PCMCIA (Nb) + 2*PCMCIAPrtSp)
54#define _PCMCIAMem(Nb) /* PCMCIA Memory [0..1] */ \
55 (_PCMCIA (Nb) + 3*PCMCIAPrtSp)
56
57#define _PCMCIA0 _PCMCIA (0) /* PCMCIA 0 */
58#define _PCMCIA0IO _PCMCIAIO (0) /* PCMCIA 0 I/O */
59#define _PCMCIA0Attr _PCMCIAAttr (0) /* PCMCIA 0 Attribute */
60#define _PCMCIA0Mem _PCMCIAMem (0) /* PCMCIA 0 Memory */
61
62#define _PCMCIA1 _PCMCIA (1) /* PCMCIA 1 */
63#define _PCMCIA1IO _PCMCIAIO (1) /* PCMCIA 1 I/O */
64#define _PCMCIA1Attr _PCMCIAAttr (1) /* PCMCIA 1 Attribute */
65#define _PCMCIA1Mem _PCMCIAMem (1) /* PCMCIA 1 Memory */
66
67
68
69/*
70 * DMA Controller
71 */
72
73#define DCSR0 __REG(0x40000000) /* DMA Control / Status Register for Channel 0 */
74#define DCSR1 __REG(0x40000004) /* DMA Control / Status Register for Channel 1 */
75#define DCSR2 __REG(0x40000008) /* DMA Control / Status Register for Channel 2 */
76#define DCSR3 __REG(0x4000000c) /* DMA Control / Status Register for Channel 3 */
77#define DCSR4 __REG(0x40000010) /* DMA Control / Status Register for Channel 4 */
78#define DCSR5 __REG(0x40000014) /* DMA Control / Status Register for Channel 5 */
79#define DCSR6 __REG(0x40000018) /* DMA Control / Status Register for Channel 6 */
80#define DCSR7 __REG(0x4000001c) /* DMA Control / Status Register for Channel 7 */
81#define DCSR8 __REG(0x40000020) /* DMA Control / Status Register for Channel 8 */
82#define DCSR9 __REG(0x40000024) /* DMA Control / Status Register for Channel 9 */
83#define DCSR10 __REG(0x40000028) /* DMA Control / Status Register for Channel 10 */
84#define DCSR11 __REG(0x4000002c) /* DMA Control / Status Register for Channel 11 */
85#define DCSR12 __REG(0x40000030) /* DMA Control / Status Register for Channel 12 */
86#define DCSR13 __REG(0x40000034) /* DMA Control / Status Register for Channel 13 */
87#define DCSR14 __REG(0x40000038) /* DMA Control / Status Register for Channel 14 */
88#define DCSR15 __REG(0x4000003c) /* DMA Control / Status Register for Channel 15 */
89
90#define DCSR(x) __REG2(0x40000000, (x) << 2)
91
92#define DCSR_RUN (1 << 31) /* Run Bit (read / write) */
93#define DCSR_NODESC (1 << 30) /* No-Descriptor Fetch (read / write) */
94#define DCSR_STOPIRQEN (1 << 29) /* Stop Interrupt Enable (read / write) */
95#ifdef CONFIG_PXA27x
96#define DCSR_EORIRQEN (1 << 28) /* End of Receive Interrupt Enable (R/W) */
97#define DCSR_EORJMPEN (1 << 27) /* Jump to next descriptor on EOR */
98#define DCSR_EORSTOPEN (1 << 26) /* STOP on an EOR */
99#define DCSR_SETCMPST (1 << 25) /* Set Descriptor Compare Status */
100#define DCSR_CLRCMPST (1 << 24) /* Clear Descriptor Compare Status */
101#define DCSR_CMPST (1 << 10) /* The Descriptor Compare Status */
102#define DCSR_EORINTR (1 << 9) /* The end of Receive */
103#endif
104#define DCSR_REQPEND (1 << 8) /* Request Pending (read-only) */
105#define DCSR_STOPSTATE (1 << 3) /* Stop State (read-only) */
106#define DCSR_ENDINTR (1 << 2) /* End Interrupt (read / write) */
107#define DCSR_STARTINTR (1 << 1) /* Start Interrupt (read / write) */
108#define DCSR_BUSERR (1 << 0) /* Bus Error Interrupt (read / write) */
109
110#define DALGN __REG(0x400000a0) /* DMA Alignment Register */
111#define DINT __REG(0x400000f0) /* DMA Interrupt Register */
112
113#define DRCMR(n) (*(((n) < 64) ? \
114 &__REG2(0x40000100, ((n) & 0x3f) << 2) : \
115 &__REG2(0x40001100, ((n) & 0x3f) << 2)))
116
117#define DRCMR0 __REG(0x40000100) /* Request to Channel Map Register for DREQ 0 */
118#define DRCMR1 __REG(0x40000104) /* Request to Channel Map Register for DREQ 1 */
119#define DRCMR2 __REG(0x40000108) /* Request to Channel Map Register for I2S receive Request */
120#define DRCMR3 __REG(0x4000010c) /* Request to Channel Map Register for I2S transmit Request */
121#define DRCMR4 __REG(0x40000110) /* Request to Channel Map Register for BTUART receive Request */
122#define DRCMR5 __REG(0x40000114) /* Request to Channel Map Register for BTUART transmit Request. */
123#define DRCMR6 __REG(0x40000118) /* Request to Channel Map Register for FFUART receive Request */
124#define DRCMR7 __REG(0x4000011c) /* Request to Channel Map Register for FFUART transmit Request */
125#define DRCMR8 __REG(0x40000120) /* Request to Channel Map Register for AC97 microphone Request */
126#define DRCMR9 __REG(0x40000124) /* Request to Channel Map Register for AC97 modem receive Request */
127#define DRCMR10 __REG(0x40000128) /* Request to Channel Map Register for AC97 modem transmit Request */
128#define DRCMR11 __REG(0x4000012c) /* Request to Channel Map Register for AC97 audio receive Request */
129#define DRCMR12 __REG(0x40000130) /* Request to Channel Map Register for AC97 audio transmit Request */
130#define DRCMR13 __REG(0x40000134) /* Request to Channel Map Register for SSP receive Request */
131#define DRCMR14 __REG(0x40000138) /* Request to Channel Map Register for SSP transmit Request */
132#define DRCMR15 __REG(0x4000013c) /* Request to Channel Map Register for SSP2 receive Request */
133#define DRCMR16 __REG(0x40000140) /* Request to Channel Map Register for SSP2 transmit Request */
134#define DRCMR17 __REG(0x40000144) /* Request to Channel Map Register for ICP receive Request */
135#define DRCMR18 __REG(0x40000148) /* Request to Channel Map Register for ICP transmit Request */
136#define DRCMR19 __REG(0x4000014c) /* Request to Channel Map Register for STUART receive Request */
137#define DRCMR20 __REG(0x40000150) /* Request to Channel Map Register for STUART transmit Request */
138#define DRCMR21 __REG(0x40000154) /* Request to Channel Map Register for MMC receive Request */
139#define DRCMR22 __REG(0x40000158) /* Request to Channel Map Register for MMC transmit Request */
140#define DRCMR23 __REG(0x4000015c) /* Reserved */
141#define DRCMR24 __REG(0x40000160) /* Reserved */
142#define DRCMR25 __REG(0x40000164) /* Request to Channel Map Register for USB endpoint 1 Request */
143#define DRCMR26 __REG(0x40000168) /* Request to Channel Map Register for USB endpoint 2 Request */
144#define DRCMR27 __REG(0x4000016C) /* Request to Channel Map Register for USB endpoint 3 Request */
145#define DRCMR28 __REG(0x40000170) /* Request to Channel Map Register for USB endpoint 4 Request */
146#define DRCMR29 __REG(0x40000174) /* Reserved */
147#define DRCMR30 __REG(0x40000178) /* Request to Channel Map Register for USB endpoint 6 Request */
148#define DRCMR31 __REG(0x4000017C) /* Request to Channel Map Register for USB endpoint 7 Request */
149#define DRCMR32 __REG(0x40000180) /* Request to Channel Map Register for USB endpoint 8 Request */
150#define DRCMR33 __REG(0x40000184) /* Request to Channel Map Register for USB endpoint 9 Request */
151#define DRCMR34 __REG(0x40000188) /* Reserved */
152#define DRCMR35 __REG(0x4000018C) /* Request to Channel Map Register for USB endpoint 11 Request */
153#define DRCMR36 __REG(0x40000190) /* Request to Channel Map Register for USB endpoint 12 Request */
154#define DRCMR37 __REG(0x40000194) /* Request to Channel Map Register for USB endpoint 13 Request */
155#define DRCMR38 __REG(0x40000198) /* Request to Channel Map Register for USB endpoint 14 Request */
156#define DRCMR39 __REG(0x4000019C) /* Reserved */
157#define DRCMR66 __REG(0x40001108) /* Request to Channel Map Register for SSP3 receive Request */
158#define DRCMR67 __REG(0x4000110C) /* Request to Channel Map Register for SSP3 transmit Request */
159#define DRCMR68 __REG(0x40001110) /* Request to Channel Map Register for Camera FIFO 0 Request */
160#define DRCMR69 __REG(0x40001114) /* Request to Channel Map Register for Camera FIFO 1 Request */
161#define DRCMR70 __REG(0x40001118) /* Request to Channel Map Register for Camera FIFO 2 Request */
162
163#define DRCMRRXSADR DRCMR2
164#define DRCMRTXSADR DRCMR3
165#define DRCMRRXBTRBR DRCMR4
166#define DRCMRTXBTTHR DRCMR5
167#define DRCMRRXFFRBR DRCMR6
168#define DRCMRTXFFTHR DRCMR7
169#define DRCMRRXMCDR DRCMR8
170#define DRCMRRXMODR DRCMR9
171#define DRCMRTXMODR DRCMR10
172#define DRCMRRXPCDR DRCMR11
173#define DRCMRTXPCDR DRCMR12
174#define DRCMRRXSSDR DRCMR13
175#define DRCMRTXSSDR DRCMR14
176#define DRCMRRXSS2DR DRCMR15
177#define DRCMRTXSS2DR DRCMR16
178#define DRCMRRXICDR DRCMR17
179#define DRCMRTXICDR DRCMR18
180#define DRCMRRXSTRBR DRCMR19
181#define DRCMRTXSTTHR DRCMR20
182#define DRCMRRXMMC DRCMR21
183#define DRCMRTXMMC DRCMR22
184#define DRCMRRXSS3DR DRCMR66
185#define DRCMRTXSS3DR DRCMR67
186#define DRCMRUDC(x) DRCMR((x) + 24)
187
188#define DRCMR_MAPVLD (1 << 7) /* Map Valid (read / write) */
189#define DRCMR_CHLNUM 0x1f /* mask for Channel Number (read / write) */
190
191#define DDADR0 __REG(0x40000200) /* DMA Descriptor Address Register Channel 0 */
192#define DSADR0 __REG(0x40000204) /* DMA Source Address Register Channel 0 */
193#define DTADR0 __REG(0x40000208) /* DMA Target Address Register Channel 0 */
194#define DCMD0 __REG(0x4000020c) /* DMA Command Address Register Channel 0 */
195#define DDADR1 __REG(0x40000210) /* DMA Descriptor Address Register Channel 1 */
196#define DSADR1 __REG(0x40000214) /* DMA Source Address Register Channel 1 */
197#define DTADR1 __REG(0x40000218) /* DMA Target Address Register Channel 1 */
198#define DCMD1 __REG(0x4000021c) /* DMA Command Address Register Channel 1 */
199#define DDADR2 __REG(0x40000220) /* DMA Descriptor Address Register Channel 2 */
200#define DSADR2 __REG(0x40000224) /* DMA Source Address Register Channel 2 */
201#define DTADR2 __REG(0x40000228) /* DMA Target Address Register Channel 2 */
202#define DCMD2 __REG(0x4000022c) /* DMA Command Address Register Channel 2 */
203#define DDADR3 __REG(0x40000230) /* DMA Descriptor Address Register Channel 3 */
204#define DSADR3 __REG(0x40000234) /* DMA Source Address Register Channel 3 */
205#define DTADR3 __REG(0x40000238) /* DMA Target Address Register Channel 3 */
206#define DCMD3 __REG(0x4000023c) /* DMA Command Address Register Channel 3 */
207#define DDADR4 __REG(0x40000240) /* DMA Descriptor Address Register Channel 4 */
208#define DSADR4 __REG(0x40000244) /* DMA Source Address Register Channel 4 */
209#define DTADR4 __REG(0x40000248) /* DMA Target Address Register Channel 4 */
210#define DCMD4 __REG(0x4000024c) /* DMA Command Address Register Channel 4 */
211#define DDADR5 __REG(0x40000250) /* DMA Descriptor Address Register Channel 5 */
212#define DSADR5 __REG(0x40000254) /* DMA Source Address Register Channel 5 */
213#define DTADR5 __REG(0x40000258) /* DMA Target Address Register Channel 5 */
214#define DCMD5 __REG(0x4000025c) /* DMA Command Address Register Channel 5 */
215#define DDADR6 __REG(0x40000260) /* DMA Descriptor Address Register Channel 6 */
216#define DSADR6 __REG(0x40000264) /* DMA Source Address Register Channel 6 */
217#define DTADR6 __REG(0x40000268) /* DMA Target Address Register Channel 6 */
218#define DCMD6 __REG(0x4000026c) /* DMA Command Address Register Channel 6 */
219#define DDADR7 __REG(0x40000270) /* DMA Descriptor Address Register Channel 7 */
220#define DSADR7 __REG(0x40000274) /* DMA Source Address Register Channel 7 */
221#define DTADR7 __REG(0x40000278) /* DMA Target Address Register Channel 7 */
222#define DCMD7 __REG(0x4000027c) /* DMA Command Address Register Channel 7 */
223#define DDADR8 __REG(0x40000280) /* DMA Descriptor Address Register Channel 8 */
224#define DSADR8 __REG(0x40000284) /* DMA Source Address Register Channel 8 */
225#define DTADR8 __REG(0x40000288) /* DMA Target Address Register Channel 8 */
226#define DCMD8 __REG(0x4000028c) /* DMA Command Address Register Channel 8 */
227#define DDADR9 __REG(0x40000290) /* DMA Descriptor Address Register Channel 9 */
228#define DSADR9 __REG(0x40000294) /* DMA Source Address Register Channel 9 */
229#define DTADR9 __REG(0x40000298) /* DMA Target Address Register Channel 9 */
230#define DCMD9 __REG(0x4000029c) /* DMA Command Address Register Channel 9 */
231#define DDADR10 __REG(0x400002a0) /* DMA Descriptor Address Register Channel 10 */
232#define DSADR10 __REG(0x400002a4) /* DMA Source Address Register Channel 10 */
233#define DTADR10 __REG(0x400002a8) /* DMA Target Address Register Channel 10 */
234#define DCMD10 __REG(0x400002ac) /* DMA Command Address Register Channel 10 */
235#define DDADR11 __REG(0x400002b0) /* DMA Descriptor Address Register Channel 11 */
236#define DSADR11 __REG(0x400002b4) /* DMA Source Address Register Channel 11 */
237#define DTADR11 __REG(0x400002b8) /* DMA Target Address Register Channel 11 */
238#define DCMD11 __REG(0x400002bc) /* DMA Command Address Register Channel 11 */
239#define DDADR12 __REG(0x400002c0) /* DMA Descriptor Address Register Channel 12 */
240#define DSADR12 __REG(0x400002c4) /* DMA Source Address Register Channel 12 */
241#define DTADR12 __REG(0x400002c8) /* DMA Target Address Register Channel 12 */
242#define DCMD12 __REG(0x400002cc) /* DMA Command Address Register Channel 12 */
243#define DDADR13 __REG(0x400002d0) /* DMA Descriptor Address Register Channel 13 */
244#define DSADR13 __REG(0x400002d4) /* DMA Source Address Register Channel 13 */
245#define DTADR13 __REG(0x400002d8) /* DMA Target Address Register Channel 13 */
246#define DCMD13 __REG(0x400002dc) /* DMA Command Address Register Channel 13 */
247#define DDADR14 __REG(0x400002e0) /* DMA Descriptor Address Register Channel 14 */
248#define DSADR14 __REG(0x400002e4) /* DMA Source Address Register Channel 14 */
249#define DTADR14 __REG(0x400002e8) /* DMA Target Address Register Channel 14 */
250#define DCMD14 __REG(0x400002ec) /* DMA Command Address Register Channel 14 */
251#define DDADR15 __REG(0x400002f0) /* DMA Descriptor Address Register Channel 15 */
252#define DSADR15 __REG(0x400002f4) /* DMA Source Address Register Channel 15 */
253#define DTADR15 __REG(0x400002f8) /* DMA Target Address Register Channel 15 */
254#define DCMD15 __REG(0x400002fc) /* DMA Command Address Register Channel 15 */
255
256#define DDADR(x) __REG2(0x40000200, (x) << 4)
257#define DSADR(x) __REG2(0x40000204, (x) << 4)
258#define DTADR(x) __REG2(0x40000208, (x) << 4)
259#define DCMD(x) __REG2(0x4000020c, (x) << 4)
260
261#define DDADR_DESCADDR 0xfffffff0 /* Address of next descriptor (mask) */
262#define DDADR_STOP (1 << 0) /* Stop (read / write) */
263
264#define DCMD_INCSRCADDR (1 << 31) /* Source Address Increment Setting. */
265#define DCMD_INCTRGADDR (1 << 30) /* Target Address Increment Setting. */
266#define DCMD_FLOWSRC (1 << 29) /* Flow Control by the source. */
267#define DCMD_FLOWTRG (1 << 28) /* Flow Control by the target. */
268#define DCMD_STARTIRQEN (1 << 22) /* Start Interrupt Enable */
269#define DCMD_ENDIRQEN (1 << 21) /* End Interrupt Enable */
270#define DCMD_ENDIAN (1 << 18) /* Device Endian-ness. */
271#define DCMD_BURST8 (1 << 16) /* 8 byte burst */
272#define DCMD_BURST16 (2 << 16) /* 16 byte burst */
273#define DCMD_BURST32 (3 << 16) /* 32 byte burst */
274#define DCMD_WIDTH1 (1 << 14) /* 1 byte width */
275#define DCMD_WIDTH2 (2 << 14) /* 2 byte width (HalfWord) */
276#define DCMD_WIDTH4 (3 << 14) /* 4 byte width (Word) */
277#define DCMD_LENGTH 0x01fff /* length mask (max = 8K - 1) */
278
279
280/*
281 * UARTs
282 */
283
284/* Full Function UART (FFUART) */
285#define FFUART FFRBR
286#define FFRBR __REG(0x40100000) /* Receive Buffer Register (read only) */
287#define FFTHR __REG(0x40100000) /* Transmit Holding Register (write only) */
288#define FFIER __REG(0x40100004) /* Interrupt Enable Register (read/write) */
289#define FFIIR __REG(0x40100008) /* Interrupt ID Register (read only) */
290#define FFFCR __REG(0x40100008) /* FIFO Control Register (write only) */
291#define FFLCR __REG(0x4010000C) /* Line Control Register (read/write) */
292#define FFMCR __REG(0x40100010) /* Modem Control Register (read/write) */
293#define FFLSR __REG(0x40100014) /* Line Status Register (read only) */
294#define FFMSR __REG(0x40100018) /* Modem Status Register (read only) */
295#define FFSPR __REG(0x4010001C) /* Scratch Pad Register (read/write) */
296#define FFISR __REG(0x40100020) /* Infrared Selection Register (read/write) */
297#define FFDLL __REG(0x40100000) /* Divisor Latch Low Register (DLAB = 1) (read/write) */
298#define FFDLH __REG(0x40100004) /* Divisor Latch High Register (DLAB = 1) (read/write) */
299
300/* Bluetooth UART (BTUART) */
301#define BTUART BTRBR
302#define BTRBR __REG(0x40200000) /* Receive Buffer Register (read only) */
303#define BTTHR __REG(0x40200000) /* Transmit Holding Register (write only) */
304#define BTIER __REG(0x40200004) /* Interrupt Enable Register (read/write) */
305#define BTIIR __REG(0x40200008) /* Interrupt ID Register (read only) */
306#define BTFCR __REG(0x40200008) /* FIFO Control Register (write only) */
307#define BTLCR __REG(0x4020000C) /* Line Control Register (read/write) */
308#define BTMCR __REG(0x40200010) /* Modem Control Register (read/write) */
309#define BTLSR __REG(0x40200014) /* Line Status Register (read only) */
310#define BTMSR __REG(0x40200018) /* Modem Status Register (read only) */
311#define BTSPR __REG(0x4020001C) /* Scratch Pad Register (read/write) */
312#define BTISR __REG(0x40200020) /* Infrared Selection Register (read/write) */
313#define BTDLL __REG(0x40200000) /* Divisor Latch Low Register (DLAB = 1) (read/write) */
314#define BTDLH __REG(0x40200004) /* Divisor Latch High Register (DLAB = 1) (read/write) */
315
316/* Standard UART (STUART) */
317#define STUART STRBR
318#define STRBR __REG(0x40700000) /* Receive Buffer Register (read only) */
319#define STTHR __REG(0x40700000) /* Transmit Holding Register (write only) */
320#define STIER __REG(0x40700004) /* Interrupt Enable Register (read/write) */
321#define STIIR __REG(0x40700008) /* Interrupt ID Register (read only) */
322#define STFCR __REG(0x40700008) /* FIFO Control Register (write only) */
323#define STLCR __REG(0x4070000C) /* Line Control Register (read/write) */
324#define STMCR __REG(0x40700010) /* Modem Control Register (read/write) */
325#define STLSR __REG(0x40700014) /* Line Status Register (read only) */
326#define STMSR __REG(0x40700018) /* Reserved */
327#define STSPR __REG(0x4070001C) /* Scratch Pad Register (read/write) */
328#define STISR __REG(0x40700020) /* Infrared Selection Register (read/write) */
329#define STDLL __REG(0x40700000) /* Divisor Latch Low Register (DLAB = 1) (read/write) */
330#define STDLH __REG(0x40700004) /* Divisor Latch High Register (DLAB = 1) (read/write) */
331
332/* Hardware UART (HWUART) */
333#define HWUART HWRBR
334#define HWRBR __REG(0x41600000) /* Receive Buffer Register (read only) */
335#define HWTHR __REG(0x41600000) /* Transmit Holding Register (write only) */
336#define HWIER __REG(0x41600004) /* Interrupt Enable Register (read/write) */
337#define HWIIR __REG(0x41600008) /* Interrupt ID Register (read only) */
338#define HWFCR __REG(0x41600008) /* FIFO Control Register (write only) */
339#define HWLCR __REG(0x4160000C) /* Line Control Register (read/write) */
340#define HWMCR __REG(0x41600010) /* Modem Control Register (read/write) */
341#define HWLSR __REG(0x41600014) /* Line Status Register (read only) */
342#define HWMSR __REG(0x41600018) /* Modem Status Register (read only) */
343#define HWSPR __REG(0x4160001C) /* Scratch Pad Register (read/write) */
344#define HWISR __REG(0x41600020) /* Infrared Selection Register (read/write) */
345#define HWFOR __REG(0x41600024) /* Receive FIFO Occupancy Register (read only) */
346#define HWABR __REG(0x41600028) /* Auto-Baud Control Register (read/write) */
347#define HWACR __REG(0x4160002C) /* Auto-Baud Count Register (read only) */
348#define HWDLL __REG(0x41600000) /* Divisor Latch Low Register (DLAB = 1) (read/write) */
349#define HWDLH __REG(0x41600004) /* Divisor Latch High Register (DLAB = 1) (read/write) */
350
351#define IER_DMAE (1 << 7) /* DMA Requests Enable */
352#define IER_UUE (1 << 6) /* UART Unit Enable */
353#define IER_NRZE (1 << 5) /* NRZ coding Enable */
354#define IER_RTIOE (1 << 4) /* Receiver Time Out Interrupt Enable */
355#define IER_MIE (1 << 3) /* Modem Interrupt Enable */
356#define IER_RLSE (1 << 2) /* Receiver Line Status Interrupt Enable */
357#define IER_TIE (1 << 1) /* Transmit Data request Interrupt Enable */
358#define IER_RAVIE (1 << 0) /* Receiver Data Available Interrupt Enable */
359
360#define IIR_FIFOES1 (1 << 7) /* FIFO Mode Enable Status */
361#define IIR_FIFOES0 (1 << 6) /* FIFO Mode Enable Status */
362#define IIR_TOD (1 << 3) /* Time Out Detected */
363#define IIR_IID2 (1 << 2) /* Interrupt Source Encoded */
364#define IIR_IID1 (1 << 1) /* Interrupt Source Encoded */
365#define IIR_IP (1 << 0) /* Interrupt Pending (active low) */
366
367#define FCR_ITL2 (1 << 7) /* Interrupt Trigger Level */
368#define FCR_ITL1 (1 << 6) /* Interrupt Trigger Level */
369#define FCR_RESETTF (1 << 2) /* Reset Transmitter FIFO */
370#define FCR_RESETRF (1 << 1) /* Reset Receiver FIFO */
371#define FCR_TRFIFOE (1 << 0) /* Transmit and Receive FIFO Enable */
372#define FCR_ITL_1 (0)
373#define FCR_ITL_8 (FCR_ITL1)
374#define FCR_ITL_16 (FCR_ITL2)
375#define FCR_ITL_32 (FCR_ITL2|FCR_ITL1)
376
377#define LCR_DLAB (1 << 7) /* Divisor Latch Access Bit */
378#define LCR_SB (1 << 6) /* Set Break */
379#define LCR_STKYP (1 << 5) /* Sticky Parity */
380#define LCR_EPS (1 << 4) /* Even Parity Select */
381#define LCR_PEN (1 << 3) /* Parity Enable */
382#define LCR_STB (1 << 2) /* Stop Bit */
383#define LCR_WLS1 (1 << 1) /* Word Length Select */
384#define LCR_WLS0 (1 << 0) /* Word Length Select */
385
386#define LSR_FIFOE (1 << 7) /* FIFO Error Status */
387#define LSR_TEMT (1 << 6) /* Transmitter Empty */
388#define LSR_TDRQ (1 << 5) /* Transmit Data Request */
389#define LSR_BI (1 << 4) /* Break Interrupt */
390#define LSR_FE (1 << 3) /* Framing Error */
391#define LSR_PE (1 << 2) /* Parity Error */
392#define LSR_OE (1 << 1) /* Overrun Error */
393#define LSR_DR (1 << 0) /* Data Ready */
394
395#define MCR_LOOP (1 << 4)
396#define MCR_OUT2 (1 << 3) /* force MSR_DCD in loopback mode */
397#define MCR_OUT1 (1 << 2) /* force MSR_RI in loopback mode */
398#define MCR_RTS (1 << 1) /* Request to Send */
399#define MCR_DTR (1 << 0) /* Data Terminal Ready */
400
401#define MSR_DCD (1 << 7) /* Data Carrier Detect */
402#define MSR_RI (1 << 6) /* Ring Indicator */
403#define MSR_DSR (1 << 5) /* Data Set Ready */
404#define MSR_CTS (1 << 4) /* Clear To Send */
405#define MSR_DDCD (1 << 3) /* Delta Data Carrier Detect */
406#define MSR_TERI (1 << 2) /* Trailing Edge Ring Indicator */
407#define MSR_DDSR (1 << 1) /* Delta Data Set Ready */
408#define MSR_DCTS (1 << 0) /* Delta Clear To Send */
409
410/*
411 * IrSR (Infrared Selection Register)
412 */
413#define STISR_RXPL (1 << 4) /* Receive Data Polarity */
414#define STISR_TXPL (1 << 3) /* Transmit Data Polarity */
415#define STISR_XMODE (1 << 2) /* Transmit Pulse Width Select */
416#define STISR_RCVEIR (1 << 1) /* Receiver SIR Enable */
417#define STISR_XMITIR (1 << 0) /* Transmitter SIR Enable */
418
419
420/*
421 * I2C registers
422 */
423
424#define IBMR __REG(0x40301680) /* I2C Bus Monitor Register - IBMR */
425#define IDBR __REG(0x40301688) /* I2C Data Buffer Register - IDBR */
426#define ICR __REG(0x40301690) /* I2C Control Register - ICR */
427#define ISR __REG(0x40301698) /* I2C Status Register - ISR */
428#define ISAR __REG(0x403016A0) /* I2C Slave Address Register - ISAR */
429
430#define PWRIBMR __REG(0x40f00180) /* Power I2C Bus Monitor Register-IBMR */
431#define PWRIDBR __REG(0x40f00188) /* Power I2C Data Buffer Register-IDBR */
432#define PWRICR __REG(0x40f00190) /* Power I2C Control Register - ICR */
433#define PWRISR __REG(0x40f00198) /* Power I2C Status Register - ISR */
434#define PWRISAR __REG(0x40f001A0) /*Power I2C Slave Address Register-ISAR */
435
436#define ICR_START (1 << 0) /* start bit */
437#define ICR_STOP (1 << 1) /* stop bit */
438#define ICR_ACKNAK (1 << 2) /* send ACK(0) or NAK(1) */
439#define ICR_TB (1 << 3) /* transfer byte bit */
440#define ICR_MA (1 << 4) /* master abort */
441#define ICR_SCLE (1 << 5) /* master clock enable */
442#define ICR_IUE (1 << 6) /* unit enable */
443#define ICR_GCD (1 << 7) /* general call disable */
444#define ICR_ITEIE (1 << 8) /* enable tx interrupts */
445#define ICR_IRFIE (1 << 9) /* enable rx interrupts */
446#define ICR_BEIE (1 << 10) /* enable bus error ints */
447#define ICR_SSDIE (1 << 11) /* slave STOP detected int enable */
448#define ICR_ALDIE (1 << 12) /* enable arbitration interrupt */
449#define ICR_SADIE (1 << 13) /* slave address detected int enable */
450#define ICR_UR (1 << 14) /* unit reset */
451
452#define ISR_RWM (1 << 0) /* read/write mode */
453#define ISR_ACKNAK (1 << 1) /* ack/nak status */
454#define ISR_UB (1 << 2) /* unit busy */
455#define ISR_IBB (1 << 3) /* bus busy */
456#define ISR_SSD (1 << 4) /* slave stop detected */
457#define ISR_ALD (1 << 5) /* arbitration loss detected */
458#define ISR_ITE (1 << 6) /* tx buffer empty */
459#define ISR_IRF (1 << 7) /* rx buffer full */
460#define ISR_GCAD (1 << 8) /* general call address detected */
461#define ISR_SAD (1 << 9) /* slave address detected */
462#define ISR_BED (1 << 10) /* bus error no ACK/NAK */
463
464
465/*
466 * Serial Audio Controller
467 */
468
469#define SACR0 __REG(0x40400000) /* Global Control Register */
470#define SACR1 __REG(0x40400004) /* Serial Audio I 2 S/MSB-Justified Control Register */
471#define SASR0 __REG(0x4040000C) /* Serial Audio I 2 S/MSB-Justified Interface and FIFO Status Register */
472#define SAIMR __REG(0x40400014) /* Serial Audio Interrupt Mask Register */
473#define SAICR __REG(0x40400018) /* Serial Audio Interrupt Clear Register */
474#define SADIV __REG(0x40400060) /* Audio Clock Divider Register. */
475#define SADR __REG(0x40400080) /* Serial Audio Data Register (TX and RX FIFO access Register). */
476
477#define SACR0_RFTH(x) ((x) << 12) /* Rx FIFO Interrupt or DMA Trigger Threshold */
478#define SACR0_TFTH(x) ((x) << 8) /* Tx FIFO Interrupt or DMA Trigger Threshold */
479#define SACR0_STRF (1 << 5) /* FIFO Select for EFWR Special Function */
480#define SACR0_EFWR (1 << 4) /* Enable EFWR Function */
481#define SACR0_RST (1 << 3) /* FIFO, i2s Register Reset */
482#define SACR0_BCKD (1 << 2) /* Bit Clock Direction */
483#define SACR0_ENB (1 << 0) /* Enable I2S Link */
484#define SACR1_ENLBF (1 << 5) /* Enable Loopback */
485#define SACR1_DRPL (1 << 4) /* Disable Replaying Function */
486#define SACR1_DREC (1 << 3) /* Disable Recording Function */
487#define SACR1_AMSL (1 << 0) /* Specify Alternate Mode */
488
489#define SASR0_I2SOFF (1 << 7) /* Controller Status */
490#define SASR0_ROR (1 << 6) /* Rx FIFO Overrun */
491#define SASR0_TUR (1 << 5) /* Tx FIFO Underrun */
492#define SASR0_RFS (1 << 4) /* Rx FIFO Service Request */
493#define SASR0_TFS (1 << 3) /* Tx FIFO Service Request */
494#define SASR0_BSY (1 << 2) /* I2S Busy */
495#define SASR0_RNE (1 << 1) /* Rx FIFO Not Empty */
496#define SASR0_TNF (1 << 0) /* Tx FIFO Not Empty */
497
498#define SAICR_ROR (1 << 6) /* Clear Rx FIFO Overrun Interrupt */
499#define SAICR_TUR (1 << 5) /* Clear Tx FIFO Underrun Interrupt */
500
501#define SAIMR_ROR (1 << 6) /* Enable Rx FIFO Overrun Condition Interrupt */
502#define SAIMR_TUR (1 << 5) /* Enable Tx FIFO Underrun Condition Interrupt */
503#define SAIMR_RFS (1 << 4) /* Enable Rx FIFO Service Interrupt */
504#define SAIMR_TFS (1 << 3) /* Enable Tx FIFO Service Interrupt */
505
506/*
507 * AC97 Controller registers
508 */
509
510#define POCR __REG(0x40500000) /* PCM Out Control Register */
511#define POCR_FEIE (1 << 3) /* FIFO Error Interrupt Enable */
512#define POCR_FSRIE (1 << 1) /* FIFO Service Request Interrupt Enable */
513
514#define PICR __REG(0x40500004) /* PCM In Control Register */
515#define PICR_FEIE (1 << 3) /* FIFO Error Interrupt Enable */
516#define PICR_FSRIE (1 << 1) /* FIFO Service Request Interrupt Enable */
517
518#define MCCR __REG(0x40500008) /* Mic In Control Register */
519#define MCCR_FEIE (1 << 3) /* FIFO Error Interrupt Enable */
520#define MCCR_FSRIE (1 << 1) /* FIFO Service Request Interrupt Enable */
521
522#define GCR __REG(0x4050000C) /* Global Control Register */
523#ifdef CONFIG_PXA3xx
524#define GCR_CLKBPB (1 << 31) /* Internal clock enable */
525#endif
526#define GCR_nDMAEN (1 << 24) /* non DMA Enable */
527#define GCR_CDONE_IE (1 << 19) /* Command Done Interrupt Enable */
528#define GCR_SDONE_IE (1 << 18) /* Status Done Interrupt Enable */
529#define GCR_SECRDY_IEN (1 << 9) /* Secondary Ready Interrupt Enable */
530#define GCR_PRIRDY_IEN (1 << 8) /* Primary Ready Interrupt Enable */
531#define GCR_SECRES_IEN (1 << 5) /* Secondary Resume Interrupt Enable */
532#define GCR_PRIRES_IEN (1 << 4) /* Primary Resume Interrupt Enable */
533#define GCR_ACLINK_OFF (1 << 3) /* AC-link Shut Off */
534#define GCR_WARM_RST (1 << 2) /* AC97 Warm Reset */
535#define GCR_COLD_RST (1 << 1) /* AC'97 Cold Reset (0 = active) */
536#define GCR_GIE (1 << 0) /* Codec GPI Interrupt Enable */
537
538#define POSR __REG(0x40500010) /* PCM Out Status Register */
539#define POSR_FIFOE (1 << 4) /* FIFO error */
540#define POSR_FSR (1 << 2) /* FIFO Service Request */
541
542#define PISR __REG(0x40500014) /* PCM In Status Register */
543#define PISR_FIFOE (1 << 4) /* FIFO error */
544#define PISR_EOC (1 << 3) /* DMA End-of-Chain (exclusive clear) */
545#define PISR_FSR (1 << 2) /* FIFO Service Request */
546
547#define MCSR __REG(0x40500018) /* Mic In Status Register */
548#define MCSR_FIFOE (1 << 4) /* FIFO error */
549#define MCSR_EOC (1 << 3) /* DMA End-of-Chain (exclusive clear) */
550#define MCSR_FSR (1 << 2) /* FIFO Service Request */
551
552#define GSR __REG(0x4050001C) /* Global Status Register */
553#define GSR_CDONE (1 << 19) /* Command Done */
554#define GSR_SDONE (1 << 18) /* Status Done */
555#define GSR_RDCS (1 << 15) /* Read Completion Status */
556#define GSR_BIT3SLT12 (1 << 14) /* Bit 3 of slot 12 */
557#define GSR_BIT2SLT12 (1 << 13) /* Bit 2 of slot 12 */
558#define GSR_BIT1SLT12 (1 << 12) /* Bit 1 of slot 12 */
559#define GSR_SECRES (1 << 11) /* Secondary Resume Interrupt */
560#define GSR_PRIRES (1 << 10) /* Primary Resume Interrupt */
561#define GSR_SCR (1 << 9) /* Secondary Codec Ready */
562#define GSR_PCR (1 << 8) /* Primary Codec Ready */
563#define GSR_MCINT (1 << 7) /* Mic In Interrupt */
564#define GSR_POINT (1 << 6) /* PCM Out Interrupt */
565#define GSR_PIINT (1 << 5) /* PCM In Interrupt */
566#define GSR_ACOFFD (1 << 3) /* AC-link Shut Off Done */
567#define GSR_MOINT (1 << 2) /* Modem Out Interrupt */
568#define GSR_MIINT (1 << 1) /* Modem In Interrupt */
569#define GSR_GSCI (1 << 0) /* Codec GPI Status Change Interrupt */
570
571#define CAR __REG(0x40500020) /* CODEC Access Register */
572#define CAR_CAIP (1 << 0) /* Codec Access In Progress */
573
574#define PCDR __REG(0x40500040) /* PCM FIFO Data Register */
575#define MCDR __REG(0x40500060) /* Mic-in FIFO Data Register */
576
577#define MOCR __REG(0x40500100) /* Modem Out Control Register */
578#define MOCR_FEIE (1 << 3) /* FIFO Error */
579#define MOCR_FSRIE (1 << 1) /* FIFO Service Request Interrupt Enable */
580
581#define MICR __REG(0x40500108) /* Modem In Control Register */
582#define MICR_FEIE (1 << 3) /* FIFO Error */
583#define MICR_FSRIE (1 << 1) /* FIFO Service Request Interrupt Enable */
584
585#define MOSR __REG(0x40500110) /* Modem Out Status Register */
586#define MOSR_FIFOE (1 << 4) /* FIFO error */
587#define MOSR_FSR (1 << 2) /* FIFO Service Request */
588
589#define MISR __REG(0x40500118) /* Modem In Status Register */
590#define MISR_FIFOE (1 << 4) /* FIFO error */
591#define MISR_EOC (1 << 3) /* DMA End-of-Chain (exclusive clear) */
592#define MISR_FSR (1 << 2) /* FIFO Service Request */
593
594#define MODR __REG(0x40500140) /* Modem FIFO Data Register */
595
596#define PAC_REG_BASE __REG(0x40500200) /* Primary Audio Codec */
597#define SAC_REG_BASE __REG(0x40500300) /* Secondary Audio Codec */
598#define PMC_REG_BASE __REG(0x40500400) /* Primary Modem Codec */
599#define SMC_REG_BASE __REG(0x40500500) /* Secondary Modem Codec */
600
601
602/*
603 * Fast Infrared Communication Port
604 */
605
606#define FICP __REG(0x40800000) /* Start of FICP area */
607#define ICCR0 __REG(0x40800000) /* ICP Control Register 0 */
608#define ICCR1 __REG(0x40800004) /* ICP Control Register 1 */
609#define ICCR2 __REG(0x40800008) /* ICP Control Register 2 */
610#define ICDR __REG(0x4080000c) /* ICP Data Register */
611#define ICSR0 __REG(0x40800014) /* ICP Status Register 0 */
612#define ICSR1 __REG(0x40800018) /* ICP Status Register 1 */
613
614#define ICCR0_AME (1 << 7) /* Address match enable */
615#define ICCR0_TIE (1 << 6) /* Transmit FIFO interrupt enable */
616#define ICCR0_RIE (1 << 5) /* Recieve FIFO interrupt enable */
617#define ICCR0_RXE (1 << 4) /* Receive enable */
618#define ICCR0_TXE (1 << 3) /* Transmit enable */
619#define ICCR0_TUS (1 << 2) /* Transmit FIFO underrun select */
620#define ICCR0_LBM (1 << 1) /* Loopback mode */
621#define ICCR0_ITR (1 << 0) /* IrDA transmission */
622
623#define ICCR2_RXP (1 << 3) /* Receive Pin Polarity select */
624#define ICCR2_TXP (1 << 2) /* Transmit Pin Polarity select */
625#define ICCR2_TRIG (3 << 0) /* Receive FIFO Trigger threshold */
626#define ICCR2_TRIG_8 (0 << 0) /* >= 8 bytes */
627#define ICCR2_TRIG_16 (1 << 0) /* >= 16 bytes */
628#define ICCR2_TRIG_32 (2 << 0) /* >= 32 bytes */
629
630#ifdef CONFIG_PXA27x
631#define ICSR0_EOC (1 << 6) /* DMA End of Descriptor Chain */
632#endif
633#define ICSR0_FRE (1 << 5) /* Framing error */
634#define ICSR0_RFS (1 << 4) /* Receive FIFO service request */
635#define ICSR0_TFS (1 << 3) /* Transnit FIFO service request */
636#define ICSR0_RAB (1 << 2) /* Receiver abort */
637#define ICSR0_TUR (1 << 1) /* Trunsmit FIFO underun */
638#define ICSR0_EIF (1 << 0) /* End/Error in FIFO */
639
640#define ICSR1_ROR (1 << 6) /* Receiver FIFO underrun */
641#define ICSR1_CRE (1 << 5) /* CRC error */
642#define ICSR1_EOF (1 << 4) /* End of frame */
643#define ICSR1_TNF (1 << 3) /* Transmit FIFO not full */
644#define ICSR1_RNE (1 << 2) /* Receive FIFO not empty */
645#define ICSR1_TBY (1 << 1) /* Tramsmiter busy flag */
646#define ICSR1_RSY (1 << 0) /* Recevier synchronized flag */
647
648
649/*
650 * Real Time Clock
651 */
652
653#define RCNR __REG(0x40900000) /* RTC Count Register */
654#define RTAR __REG(0x40900004) /* RTC Alarm Register */
655#define RTSR __REG(0x40900008) /* RTC Status Register */
656#define RTTR __REG(0x4090000C) /* RTC Timer Trim Register */
657#define PIAR __REG(0x40900038) /* Periodic Interrupt Alarm Register */
658
659#define RTSR_PICE (1 << 15) /* Periodic interrupt count enable */
660#define RTSR_PIALE (1 << 14) /* Periodic interrupt Alarm enable */
661#define RTSR_HZE (1 << 3) /* HZ interrupt enable */
662#define RTSR_ALE (1 << 2) /* RTC alarm interrupt enable */
663#define RTSR_HZ (1 << 1) /* HZ rising-edge detected */
664#define RTSR_AL (1 << 0) /* RTC alarm detected */
665
666
667/*
668 * OS Timer & Match Registers
669 */
670
671#define OSMR0 __REG(0x40A00000) /* */
672#define OSMR1 __REG(0x40A00004) /* */
673#define OSMR2 __REG(0x40A00008) /* */
674#define OSMR3 __REG(0x40A0000C) /* */
675#define OSMR4 __REG(0x40A00080) /* */
676#define OSCR __REG(0x40A00010) /* OS Timer Counter Register */
677#define OSCR4 __REG(0x40A00040) /* OS Timer Counter Register */
678#define OMCR4 __REG(0x40A000C0) /* */
679#define OSSR __REG(0x40A00014) /* OS Timer Status Register */
680#define OWER __REG(0x40A00018) /* OS Timer Watchdog Enable Register */
681#define OIER __REG(0x40A0001C) /* OS Timer Interrupt Enable Register */
682
683#define OSSR_M3 (1 << 3) /* Match status channel 3 */
684#define OSSR_M2 (1 << 2) /* Match status channel 2 */
685#define OSSR_M1 (1 << 1) /* Match status channel 1 */
686#define OSSR_M0 (1 << 0) /* Match status channel 0 */
687
688#define OWER_WME (1 << 0) /* Watchdog Match Enable */
689
690#define OIER_E3 (1 << 3) /* Interrupt enable channel 3 */
691#define OIER_E2 (1 << 2) /* Interrupt enable channel 2 */
692#define OIER_E1 (1 << 1) /* Interrupt enable channel 1 */
693#define OIER_E0 (1 << 0) /* Interrupt enable channel 0 */
694
695
696/*
697 * Pulse Width Modulator
698 */
699
700#define PWM_CTRL0 __REG(0x40B00000) /* PWM 0 Control Register */
701#define PWM_PWDUTY0 __REG(0x40B00004) /* PWM 0 Duty Cycle Register */
702#define PWM_PERVAL0 __REG(0x40B00008) /* PWM 0 Period Control Register */
703
704#define PWM_CTRL1 __REG(0x40C00000) /* PWM 1Control Register */
705#define PWM_PWDUTY1 __REG(0x40C00004) /* PWM 1 Duty Cycle Register */
706#define PWM_PERVAL1 __REG(0x40C00008) /* PWM 1 Period Control Register */
707
708
709/*
710 * Interrupt Controller
711 */
712
713#define ICIP __REG(0x40D00000) /* Interrupt Controller IRQ Pending Register */
714#define ICMR __REG(0x40D00004) /* Interrupt Controller Mask Register */
715#define ICLR __REG(0x40D00008) /* Interrupt Controller Level Register */
716#define ICFP __REG(0x40D0000C) /* Interrupt Controller FIQ Pending Register */
717#define ICPR __REG(0x40D00010) /* Interrupt Controller Pending Register */
718#define ICCR __REG(0x40D00014) /* Interrupt Controller Control Register */
719
720#define ICIP2 __REG(0x40D0009C) /* Interrupt Controller IRQ Pending Register 2 */
721#define ICMR2 __REG(0x40D000A0) /* Interrupt Controller Mask Register 2 */
722#define ICLR2 __REG(0x40D000A4) /* Interrupt Controller Level Register 2 */
723#define ICFP2 __REG(0x40D000A8) /* Interrupt Controller FIQ Pending Register 2 */
724#define ICPR2 __REG(0x40D000AC) /* Interrupt Controller Pending Register 2 */
725
726/*
727 * General Purpose I/O
728 */
729
730#define GPIO0_BASE ((void __iomem *)io_p2v(0x40E00000))
731#define GPIO1_BASE ((void __iomem *)io_p2v(0x40E00004))
732#define GPIO2_BASE ((void __iomem *)io_p2v(0x40E00008))
733#define GPIO3_BASE ((void __iomem *)io_p2v(0x40E00100))
734
735#define GPLR_OFFSET 0x00
736#define GPDR_OFFSET 0x0C
737#define GPSR_OFFSET 0x18
738#define GPCR_OFFSET 0x24
739#define GRER_OFFSET 0x30
740#define GFER_OFFSET 0x3C
741#define GEDR_OFFSET 0x48
742
743#define GPLR0 __REG(0x40E00000) /* GPIO Pin-Level Register GPIO<31:0> */
744#define GPLR1 __REG(0x40E00004) /* GPIO Pin-Level Register GPIO<63:32> */
745#define GPLR2 __REG(0x40E00008) /* GPIO Pin-Level Register GPIO<80:64> */
746
747#define GPDR0 __REG(0x40E0000C) /* GPIO Pin Direction Register GPIO<31:0> */
748#define GPDR1 __REG(0x40E00010) /* GPIO Pin Direction Register GPIO<63:32> */
749#define GPDR2 __REG(0x40E00014) /* GPIO Pin Direction Register GPIO<80:64> */
750
751#define GPSR0 __REG(0x40E00018) /* GPIO Pin Output Set Register GPIO<31:0> */
752#define GPSR1 __REG(0x40E0001C) /* GPIO Pin Output Set Register GPIO<63:32> */
753#define GPSR2 __REG(0x40E00020) /* GPIO Pin Output Set Register GPIO<80:64> */
754
755#define GPCR0 __REG(0x40E00024) /* GPIO Pin Output Clear Register GPIO<31:0> */
756#define GPCR1 __REG(0x40E00028) /* GPIO Pin Output Clear Register GPIO <63:32> */
757#define GPCR2 __REG(0x40E0002C) /* GPIO Pin Output Clear Register GPIO <80:64> */
758
759#define GRER0 __REG(0x40E00030) /* GPIO Rising-Edge Detect Register GPIO<31:0> */
760#define GRER1 __REG(0x40E00034) /* GPIO Rising-Edge Detect Register GPIO<63:32> */
761#define GRER2 __REG(0x40E00038) /* GPIO Rising-Edge Detect Register GPIO<80:64> */
762
763#define GFER0 __REG(0x40E0003C) /* GPIO Falling-Edge Detect Register GPIO<31:0> */
764#define GFER1 __REG(0x40E00040) /* GPIO Falling-Edge Detect Register GPIO<63:32> */
765#define GFER2 __REG(0x40E00044) /* GPIO Falling-Edge Detect Register GPIO<80:64> */
766
767#define GEDR0 __REG(0x40E00048) /* GPIO Edge Detect Status Register GPIO<31:0> */
768#define GEDR1 __REG(0x40E0004C) /* GPIO Edge Detect Status Register GPIO<63:32> */
769#define GEDR2 __REG(0x40E00050) /* GPIO Edge Detect Status Register GPIO<80:64> */
770
771#define GAFR0_L __REG(0x40E00054) /* GPIO Alternate Function Select Register GPIO<15:0> */
772#define GAFR0_U __REG(0x40E00058) /* GPIO Alternate Function Select Register GPIO<31:16> */
773#define GAFR1_L __REG(0x40E0005C) /* GPIO Alternate Function Select Register GPIO<47:32> */
774#define GAFR1_U __REG(0x40E00060) /* GPIO Alternate Function Select Register GPIO<63:48> */
775#define GAFR2_L __REG(0x40E00064) /* GPIO Alternate Function Select Register GPIO<79:64> */
776#define GAFR2_U __REG(0x40E00068) /* GPIO Alternate Function Select Register GPIO<95-80> */
777#define GAFR3_L __REG(0x40E0006C) /* GPIO Alternate Function Select Register GPIO<111:96> */
778#define GAFR3_U __REG(0x40E00070) /* GPIO Alternate Function Select Register GPIO<127:112> */
779
780#define GPLR3 __REG(0x40E00100) /* GPIO Pin-Level Register GPIO<127:96> */
781#define GPDR3 __REG(0x40E0010C) /* GPIO Pin Direction Register GPIO<127:96> */
782#define GPSR3 __REG(0x40E00118) /* GPIO Pin Output Set Register GPIO<127:96> */
783#define GPCR3 __REG(0x40E00124) /* GPIO Pin Output Clear Register GPIO<127:96> */
784#define GRER3 __REG(0x40E00130) /* GPIO Rising-Edge Detect Register GPIO<127:96> */
785#define GFER3 __REG(0x40E0013C) /* GPIO Falling-Edge Detect Register GPIO<127:96> */
786#define GEDR3 __REG(0x40E00148) /* GPIO Edge Detect Status Register GPIO<127:96> */
787
788/* More handy macros. The argument is a literal GPIO number. */
789
790#define GPIO_bit(x) (1 << ((x) & 0x1f))
791
792#if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx)
793
794/* Interrupt Controller */
795
796#define _GPLR(x) __REG2(0x40E00000, ((x) & 0x60) >> 3)
797#define _GPDR(x) __REG2(0x40E0000C, ((x) & 0x60) >> 3)
798#define _GPSR(x) __REG2(0x40E00018, ((x) & 0x60) >> 3)
799#define _GPCR(x) __REG2(0x40E00024, ((x) & 0x60) >> 3)
800#define _GRER(x) __REG2(0x40E00030, ((x) & 0x60) >> 3)
801#define _GFER(x) __REG2(0x40E0003C, ((x) & 0x60) >> 3)
802#define _GEDR(x) __REG2(0x40E00048, ((x) & 0x60) >> 3)
803#define _GAFR(x) __REG2(0x40E00054, ((x) & 0x70) >> 2)
804
805#define GPLR(x) (*((((x) & 0x7f) < 96) ? &_GPLR(x) : &GPLR3))
806#define GPDR(x) (*((((x) & 0x7f) < 96) ? &_GPDR(x) : &GPDR3))
807#define GPSR(x) (*((((x) & 0x7f) < 96) ? &_GPSR(x) : &GPSR3))
808#define GPCR(x) (*((((x) & 0x7f) < 96) ? &_GPCR(x) : &GPCR3))
809#define GRER(x) (*((((x) & 0x7f) < 96) ? &_GRER(x) : &GRER3))
810#define GFER(x) (*((((x) & 0x7f) < 96) ? &_GFER(x) : &GFER3))
811#define GEDR(x) (*((((x) & 0x7f) < 96) ? &_GEDR(x) : &GEDR3))
812#define GAFR(x) (*((((x) & 0x7f) < 96) ? &_GAFR(x) : \
813 ((((x) & 0x7f) < 112) ? &GAFR3_L : &GAFR3_U)))
814#else
815
816#define GPLR(x) __REG2(0x40E00000, ((x) & 0x60) >> 3)
817#define GPDR(x) __REG2(0x40E0000C, ((x) & 0x60) >> 3)
818#define GPSR(x) __REG2(0x40E00018, ((x) & 0x60) >> 3)
819#define GPCR(x) __REG2(0x40E00024, ((x) & 0x60) >> 3)
820#define GRER(x) __REG2(0x40E00030, ((x) & 0x60) >> 3)
821#define GFER(x) __REG2(0x40E0003C, ((x) & 0x60) >> 3)
822#define GEDR(x) __REG2(0x40E00048, ((x) & 0x60) >> 3)
823#define GAFR(x) __REG2(0x40E00054, ((x) & 0x70) >> 2)
824
825#endif
826
827/*
828 * Power Manager - see pxa2xx-regs.h
829 */
830
831/*
832 * SSP Serial Port Registers - see arch/arm/mach-pxa/include/mach/regs-ssp.h
833 */
834
835/*
836 * MultiMediaCard (MMC) controller - see drivers/mmc/host/pxamci.h
837 */
838
839/*
840 * Core Clock - see arch/arm/mach-pxa/include/mach/pxa2xx-regs.h
841 */
842
843#ifdef CONFIG_PXA27x
844
845/* Camera Interface */
846#define CICR0 __REG(0x50000000)
847#define CICR1 __REG(0x50000004)
848#define CICR2 __REG(0x50000008)
849#define CICR3 __REG(0x5000000C)
850#define CICR4 __REG(0x50000010)
851#define CISR __REG(0x50000014)
852#define CIFR __REG(0x50000018)
853#define CITOR __REG(0x5000001C)
854#define CIBR0 __REG(0x50000028)
855#define CIBR1 __REG(0x50000030)
856#define CIBR2 __REG(0x50000038)
857
858#define CICR0_DMAEN (1 << 31) /* DMA request enable */
859#define CICR0_PAR_EN (1 << 30) /* Parity enable */
860#define CICR0_SL_CAP_EN (1 << 29) /* Capture enable for slave mode */
861#define CICR0_ENB (1 << 28) /* Camera interface enable */
862#define CICR0_DIS (1 << 27) /* Camera interface disable */
863#define CICR0_SIM (0x7 << 24) /* Sensor interface mode mask */
864#define CICR0_TOM (1 << 9) /* Time-out mask */
865#define CICR0_RDAVM (1 << 8) /* Receive-data-available mask */
866#define CICR0_FEM (1 << 7) /* FIFO-empty mask */
867#define CICR0_EOLM (1 << 6) /* End-of-line mask */
868#define CICR0_PERRM (1 << 5) /* Parity-error mask */
869#define CICR0_QDM (1 << 4) /* Quick-disable mask */
870#define CICR0_CDM (1 << 3) /* Disable-done mask */
871#define CICR0_SOFM (1 << 2) /* Start-of-frame mask */
872#define CICR0_EOFM (1 << 1) /* End-of-frame mask */
873#define CICR0_FOM (1 << 0) /* FIFO-overrun mask */
874
875#define CICR1_TBIT (1 << 31) /* Transparency bit */
876#define CICR1_RGBT_CONV (0x3 << 29) /* RGBT conversion mask */
877#define CICR1_PPL (0x7ff << 15) /* Pixels per line mask */
878#define CICR1_RGB_CONV (0x7 << 12) /* RGB conversion mask */
879#define CICR1_RGB_F (1 << 11) /* RGB format */
880#define CICR1_YCBCR_F (1 << 10) /* YCbCr format */
881#define CICR1_RGB_BPP (0x7 << 7) /* RGB bis per pixel mask */
882#define CICR1_RAW_BPP (0x3 << 5) /* Raw bis per pixel mask */
883#define CICR1_COLOR_SP (0x3 << 3) /* Color space mask */
884#define CICR1_DW (0x7 << 0) /* Data width mask */
885
886#define CICR2_BLW (0xff << 24) /* Beginning-of-line pixel clock
887 wait count mask */
888#define CICR2_ELW (0xff << 16) /* End-of-line pixel clock
889 wait count mask */
890#define CICR2_HSW (0x3f << 10) /* Horizontal sync pulse width mask */
891#define CICR2_BFPW (0x3f << 3) /* Beginning-of-frame pixel clock
892 wait count mask */
893#define CICR2_FSW (0x7 << 0) /* Frame stabilization
894 wait count mask */
895
896#define CICR3_BFW (0xff << 24) /* Beginning-of-frame line clock
897 wait count mask */
898#define CICR3_EFW (0xff << 16) /* End-of-frame line clock
899 wait count mask */
900#define CICR3_VSW (0x3f << 10) /* Vertical sync pulse width mask */
901#define CICR3_BFPW (0x3f << 3) /* Beginning-of-frame pixel clock
902 wait count mask */
903#define CICR3_LPF (0x7ff << 0) /* Lines per frame mask */
904
905#define CICR4_MCLK_DLY (0x3 << 24) /* MCLK Data Capture Delay mask */
906#define CICR4_PCLK_EN (1 << 23) /* Pixel clock enable */
907#define CICR4_PCP (1 << 22) /* Pixel clock polarity */
908#define CICR4_HSP (1 << 21) /* Horizontal sync polarity */
909#define CICR4_VSP (1 << 20) /* Vertical sync polarity */
910#define CICR4_MCLK_EN (1 << 19) /* MCLK enable */
911#define CICR4_FR_RATE (0x7 << 8) /* Frame rate mask */
912#define CICR4_DIV (0xff << 0) /* Clock divisor mask */
913
914#define CISR_FTO (1 << 15) /* FIFO time-out */
915#define CISR_RDAV_2 (1 << 14) /* Channel 2 receive data available */
916#define CISR_RDAV_1 (1 << 13) /* Channel 1 receive data available */
917#define CISR_RDAV_0 (1 << 12) /* Channel 0 receive data available */
918#define CISR_FEMPTY_2 (1 << 11) /* Channel 2 FIFO empty */
919#define CISR_FEMPTY_1 (1 << 10) /* Channel 1 FIFO empty */
920#define CISR_FEMPTY_0 (1 << 9) /* Channel 0 FIFO empty */
921#define CISR_EOL (1 << 8) /* End of line */
922#define CISR_PAR_ERR (1 << 7) /* Parity error */
923#define CISR_CQD (1 << 6) /* Camera interface quick disable */
924#define CISR_CDD (1 << 5) /* Camera interface disable done */
925#define CISR_SOF (1 << 4) /* Start of frame */
926#define CISR_EOF (1 << 3) /* End of frame */
927#define CISR_IFO_2 (1 << 2) /* FIFO overrun for Channel 2 */
928#define CISR_IFO_1 (1 << 1) /* FIFO overrun for Channel 1 */
929#define CISR_IFO_0 (1 << 0) /* FIFO overrun for Channel 0 */
930
931#define CIFR_FLVL2 (0x7f << 23) /* FIFO 2 level mask */
932#define CIFR_FLVL1 (0x7f << 16) /* FIFO 1 level mask */
933#define CIFR_FLVL0 (0xff << 8) /* FIFO 0 level mask */
934#define CIFR_THL_0 (0x3 << 4) /* Threshold Level for Channel 0 FIFO */
935#define CIFR_RESET_F (1 << 3) /* Reset input FIFOs */
936#define CIFR_FEN2 (1 << 2) /* FIFO enable for channel 2 */
937#define CIFR_FEN1 (1 << 1) /* FIFO enable for channel 1 */
938#define CIFR_FEN0 (1 << 0) /* FIFO enable for channel 0 */
939
940#define SRAM_SIZE 0x40000 /* 4x64K */
941
942#define SRAM_MEM_PHYS 0x5C000000
943
944#define IMPMCR __REG(0x58000000) /* IM Power Management Control Reg */
945#define IMPMSR __REG(0x58000008) /* IM Power Management Status Reg */
946
947#define IMPMCR_PC3 (0x3 << 22) /* Bank 3 Power Control */
948#define IMPMCR_PC3_RUN_MODE (0x0 << 22) /* Run mode */
949#define IMPMCR_PC3_STANDBY_MODE (0x1 << 22) /* Standby mode */
950#define IMPMCR_PC3_AUTO_MODE (0x3 << 22) /* Automatically controlled */
951
952#define IMPMCR_PC2 (0x3 << 20) /* Bank 2 Power Control */
953#define IMPMCR_PC2_RUN_MODE (0x0 << 20) /* Run mode */
954#define IMPMCR_PC2_STANDBY_MODE (0x1 << 20) /* Standby mode */
955#define IMPMCR_PC2_AUTO_MODE (0x3 << 20) /* Automatically controlled */
956
957#define IMPMCR_PC1 (0x3 << 18) /* Bank 1 Power Control */
958#define IMPMCR_PC1_RUN_MODE (0x0 << 18) /* Run mode */
959#define IMPMCR_PC1_STANDBY_MODE (0x1 << 18) /* Standby mode */
960#define IMPMCR_PC1_AUTO_MODE (0x3 << 18) /* Automatically controlled */
961
962#define IMPMCR_PC0 (0x3 << 16) /* Bank 0 Power Control */
963#define IMPMCR_PC0_RUN_MODE (0x0 << 16) /* Run mode */
964#define IMPMCR_PC0_STANDBY_MODE (0x1 << 16) /* Standby mode */
965#define IMPMCR_PC0_AUTO_MODE (0x3 << 16) /* Automatically controlled */
966
967#define IMPMCR_AW3 (1 << 11) /* Bank 3 Automatic Wake-up enable */
968#define IMPMCR_AW2 (1 << 10) /* Bank 2 Automatic Wake-up enable */
969#define IMPMCR_AW1 (1 << 9) /* Bank 1 Automatic Wake-up enable */
970#define IMPMCR_AW0 (1 << 8) /* Bank 0 Automatic Wake-up enable */
971
972#define IMPMCR_DST (0xFF << 0) /* Delay Standby Time, ms */
973
974#define IMPMSR_PS3 (0x3 << 6) /* Bank 3 Power Status: */
975#define IMPMSR_PS3_RUN_MODE (0x0 << 6) /* Run mode */
976#define IMPMSR_PS3_STANDBY_MODE (0x1 << 6) /* Standby mode */
977
978#define IMPMSR_PS2 (0x3 << 4) /* Bank 2 Power Status: */
979#define IMPMSR_PS2_RUN_MODE (0x0 << 4) /* Run mode */
980#define IMPMSR_PS2_STANDBY_MODE (0x1 << 4) /* Standby mode */
981
982#define IMPMSR_PS1 (0x3 << 2) /* Bank 1 Power Status: */
983#define IMPMSR_PS1_RUN_MODE (0x0 << 2) /* Run mode */
984#define IMPMSR_PS1_STANDBY_MODE (0x1 << 2) /* Standby mode */
985
986#define IMPMSR_PS0 (0x3 << 0) /* Bank 0 Power Status: */
987#define IMPMSR_PS0_RUN_MODE (0x0 << 0) /* Run mode */
988#define IMPMSR_PS0_STANDBY_MODE (0x1 << 0) /* Standby mode */
989
990#endif
991
992#if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx)
993/*
994 * UHC: USB Host Controller (OHCI-like) register definitions
995 */
996#define UHC_BASE_PHYS (0x4C000000)
997#define UHCREV __REG(0x4C000000) /* UHC HCI Spec Revision */
998#define UHCHCON __REG(0x4C000004) /* UHC Host Control Register */
999#define UHCCOMS __REG(0x4C000008) /* UHC Command Status Register */
1000#define UHCINTS __REG(0x4C00000C) /* UHC Interrupt Status Register */
1001#define UHCINTE __REG(0x4C000010) /* UHC Interrupt Enable */
1002#define UHCINTD __REG(0x4C000014) /* UHC Interrupt Disable */
1003#define UHCHCCA __REG(0x4C000018) /* UHC Host Controller Comm. Area */
1004#define UHCPCED __REG(0x4C00001C) /* UHC Period Current Endpt Descr */
1005#define UHCCHED __REG(0x4C000020) /* UHC Control Head Endpt Descr */
1006#define UHCCCED __REG(0x4C000024) /* UHC Control Current Endpt Descr */
1007#define UHCBHED __REG(0x4C000028) /* UHC Bulk Head Endpt Descr */
1008#define UHCBCED __REG(0x4C00002C) /* UHC Bulk Current Endpt Descr */
1009#define UHCDHEAD __REG(0x4C000030) /* UHC Done Head */
1010#define UHCFMI __REG(0x4C000034) /* UHC Frame Interval */
1011#define UHCFMR __REG(0x4C000038) /* UHC Frame Remaining */
1012#define UHCFMN __REG(0x4C00003C) /* UHC Frame Number */
1013#define UHCPERS __REG(0x4C000040) /* UHC Periodic Start */
1014#define UHCLS __REG(0x4C000044) /* UHC Low Speed Threshold */
1015
1016#define UHCRHDA __REG(0x4C000048) /* UHC Root Hub Descriptor A */
1017#define UHCRHDA_NOCP (1 << 12) /* No over current protection */
1018
1019#define UHCRHDB __REG(0x4C00004C) /* UHC Root Hub Descriptor B */
1020#define UHCRHS __REG(0x4C000050) /* UHC Root Hub Status */
1021#define UHCRHPS1 __REG(0x4C000054) /* UHC Root Hub Port 1 Status */
1022#define UHCRHPS2 __REG(0x4C000058) /* UHC Root Hub Port 2 Status */
1023#define UHCRHPS3 __REG(0x4C00005C) /* UHC Root Hub Port 3 Status */
1024
1025#define UHCSTAT __REG(0x4C000060) /* UHC Status Register */
1026#define UHCSTAT_UPS3 (1 << 16) /* USB Power Sense Port3 */
1027#define UHCSTAT_SBMAI (1 << 15) /* System Bus Master Abort Interrupt*/
1028#define UHCSTAT_SBTAI (1 << 14) /* System Bus Target Abort Interrupt*/
1029#define UHCSTAT_UPRI (1 << 13) /* USB Port Resume Interrupt */
1030#define UHCSTAT_UPS2 (1 << 12) /* USB Power Sense Port 2 */
1031#define UHCSTAT_UPS1 (1 << 11) /* USB Power Sense Port 1 */
1032#define UHCSTAT_HTA (1 << 10) /* HCI Target Abort */
1033#define UHCSTAT_HBA (1 << 8) /* HCI Buffer Active */
1034#define UHCSTAT_RWUE (1 << 7) /* HCI Remote Wake Up Event */
1035
1036#define UHCHR __REG(0x4C000064) /* UHC Reset Register */
1037#define UHCHR_SSEP3 (1 << 11) /* Sleep Standby Enable for Port3 */
1038#define UHCHR_SSEP2 (1 << 10) /* Sleep Standby Enable for Port2 */
1039#define UHCHR_SSEP1 (1 << 9) /* Sleep Standby Enable for Port1 */
1040#define UHCHR_PCPL (1 << 7) /* Power control polarity low */
1041#define UHCHR_PSPL (1 << 6) /* Power sense polarity low */
1042#define UHCHR_SSE (1 << 5) /* Sleep Standby Enable */
1043#define UHCHR_UIT (1 << 4) /* USB Interrupt Test */
1044#define UHCHR_SSDC (1 << 3) /* Simulation Scale Down Clock */
1045#define UHCHR_CGR (1 << 2) /* Clock Generation Reset */
1046#define UHCHR_FHR (1 << 1) /* Force Host Controller Reset */
1047#define UHCHR_FSBIR (1 << 0) /* Force System Bus Iface Reset */
1048
1049#define UHCHIE __REG(0x4C000068) /* UHC Interrupt Enable Register*/
1050#define UHCHIE_UPS3IE (1 << 14) /* Power Sense Port3 IntEn */
1051#define UHCHIE_UPRIE (1 << 13) /* Port Resume IntEn */
1052#define UHCHIE_UPS2IE (1 << 12) /* Power Sense Port2 IntEn */
1053#define UHCHIE_UPS1IE (1 << 11) /* Power Sense Port1 IntEn */
1054#define UHCHIE_TAIE (1 << 10) /* HCI Interface Transfer Abort
1055 Interrupt Enable*/
1056#define UHCHIE_HBAIE (1 << 8) /* HCI Buffer Active IntEn */
1057#define UHCHIE_RWIE (1 << 7) /* Remote Wake-up IntEn */
1058
1059#define UHCHIT __REG(0x4C00006C) /* UHC Interrupt Test register */
1060
1061#endif /* CONFIG_PXA27x || CONFIG_PXA3xx */
1062
1063/* PWRMODE register M field values */
1064
1065#define PWRMODE_IDLE 0x1
1066#define PWRMODE_STANDBY 0x2
1067#define PWRMODE_SLEEP 0x3
1068#define PWRMODE_DEEPSLEEP 0x7
1069
1070#endif
diff --git a/include/asm-arm/arch-pxa/pxa25x-udc.h b/arch/arm/mach-pxa/include/mach/pxa25x-udc.h
index 1b80a4805a60..1b80a4805a60 100644
--- a/include/asm-arm/arch-pxa/pxa25x-udc.h
+++ b/arch/arm/mach-pxa/include/mach/pxa25x-udc.h
diff --git a/include/asm-arm/arch-pxa/pxa27x-udc.h b/arch/arm/mach-pxa/include/mach/pxa27x-udc.h
index ab1443f8bd89..ab1443f8bd89 100644
--- a/include/asm-arm/arch-pxa/pxa27x-udc.h
+++ b/arch/arm/mach-pxa/include/mach/pxa27x-udc.h
diff --git a/include/asm-arm/arch-pxa/pxa27x_keypad.h b/arch/arm/mach-pxa/include/mach/pxa27x_keypad.h
index d5a48a96dea7..d5a48a96dea7 100644
--- a/include/asm-arm/arch-pxa/pxa27x_keypad.h
+++ b/arch/arm/mach-pxa/include/mach/pxa27x_keypad.h
diff --git a/include/asm-arm/arch-pxa/pxa2xx-gpio.h b/arch/arm/mach-pxa/include/mach/pxa2xx-gpio.h
index 6ef1dd09970b..6ef1dd09970b 100644
--- a/include/asm-arm/arch-pxa/pxa2xx-gpio.h
+++ b/arch/arm/mach-pxa/include/mach/pxa2xx-gpio.h
diff --git a/arch/arm/mach-pxa/include/mach/pxa2xx-regs.h b/arch/arm/mach-pxa/include/mach/pxa2xx-regs.h
new file mode 100644
index 000000000000..806ecfea44bf
--- /dev/null
+++ b/arch/arm/mach-pxa/include/mach/pxa2xx-regs.h
@@ -0,0 +1,246 @@
1/*
2 * arch/arm/mach-pxa/include/mach/pxa2xx-regs.h
3 *
4 * Taken from pxa-regs.h by Russell King
5 *
6 * Author: Nicolas Pitre
7 * Copyright: MontaVista Software Inc.
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12 */
13
14#ifndef __PXA2XX_REGS_H
15#define __PXA2XX_REGS_H
16
17/*
18 * Memory controller
19 */
20
21#define MDCNFG __REG(0x48000000) /* SDRAM Configuration Register 0 */
22#define MDREFR __REG(0x48000004) /* SDRAM Refresh Control Register */
23#define MSC0 __REG(0x48000008) /* Static Memory Control Register 0 */
24#define MSC1 __REG(0x4800000C) /* Static Memory Control Register 1 */
25#define MSC2 __REG(0x48000010) /* Static Memory Control Register 2 */
26#define MECR __REG(0x48000014) /* Expansion Memory (PCMCIA/Compact Flash) Bus Configuration */
27#define SXLCR __REG(0x48000018) /* LCR value to be written to SDRAM-Timing Synchronous Flash */
28#define SXCNFG __REG(0x4800001C) /* Synchronous Static Memory Control Register */
29#define SXMRS __REG(0x48000024) /* MRS value to be written to Synchronous Flash or SMROM */
30#define MCMEM0 __REG(0x48000028) /* Card interface Common Memory Space Socket 0 Timing */
31#define MCMEM1 __REG(0x4800002C) /* Card interface Common Memory Space Socket 1 Timing */
32#define MCATT0 __REG(0x48000030) /* Card interface Attribute Space Socket 0 Timing Configuration */
33#define MCATT1 __REG(0x48000034) /* Card interface Attribute Space Socket 1 Timing Configuration */
34#define MCIO0 __REG(0x48000038) /* Card interface I/O Space Socket 0 Timing Configuration */
35#define MCIO1 __REG(0x4800003C) /* Card interface I/O Space Socket 1 Timing Configuration */
36#define MDMRS __REG(0x48000040) /* MRS value to be written to SDRAM */
37#define BOOT_DEF __REG(0x48000044) /* Read-Only Boot-Time Register. Contains BOOT_SEL and PKG_SEL */
38
39/*
40 * More handy macros for PCMCIA
41 *
42 * Arg is socket number
43 */
44#define MCMEM(s) __REG2(0x48000028, (s)<<2 ) /* Card interface Common Memory Space Socket s Timing */
45#define MCATT(s) __REG2(0x48000030, (s)<<2 ) /* Card interface Attribute Space Socket s Timing Configuration */
46#define MCIO(s) __REG2(0x48000038, (s)<<2 ) /* Card interface I/O Space Socket s Timing Configuration */
47
48/* MECR register defines */
49#define MECR_NOS (1 << 0) /* Number Of Sockets: 0 -> 1 sock, 1 -> 2 sock */
50#define MECR_CIT (1 << 1) /* Card Is There: 0 -> no card, 1 -> card inserted */
51
52#define MDREFR_K0DB4 (1 << 29) /* SDCLK0 Divide by 4 Control/Status */
53#define MDREFR_K2FREE (1 << 25) /* SDRAM Free-Running Control */
54#define MDREFR_K1FREE (1 << 24) /* SDRAM Free-Running Control */
55#define MDREFR_K0FREE (1 << 23) /* SDRAM Free-Running Control */
56#define MDREFR_SLFRSH (1 << 22) /* SDRAM Self-Refresh Control/Status */
57#define MDREFR_APD (1 << 20) /* SDRAM/SSRAM Auto-Power-Down Enable */
58#define MDREFR_K2DB2 (1 << 19) /* SDCLK2 Divide by 2 Control/Status */
59#define MDREFR_K2RUN (1 << 18) /* SDCLK2 Run Control/Status */
60#define MDREFR_K1DB2 (1 << 17) /* SDCLK1 Divide by 2 Control/Status */
61#define MDREFR_K1RUN (1 << 16) /* SDCLK1 Run Control/Status */
62#define MDREFR_E1PIN (1 << 15) /* SDCKE1 Level Control/Status */
63#define MDREFR_K0DB2 (1 << 14) /* SDCLK0 Divide by 2 Control/Status */
64#define MDREFR_K0RUN (1 << 13) /* SDCLK0 Run Control/Status */
65#define MDREFR_E0PIN (1 << 12) /* SDCKE0 Level Control/Status */
66
67
68#ifdef CONFIG_PXA27x
69
70#define ARB_CNTRL __REG(0x48000048) /* Arbiter Control Register */
71
72#define ARB_DMA_SLV_PARK (1<<31) /* Be parked with DMA slave when idle */
73#define ARB_CI_PARK (1<<30) /* Be parked with Camera Interface when idle */
74#define ARB_EX_MEM_PARK (1<<29) /* Be parked with external MEMC when idle */
75#define ARB_INT_MEM_PARK (1<<28) /* Be parked with internal MEMC when idle */
76#define ARB_USB_PARK (1<<27) /* Be parked with USB when idle */
77#define ARB_LCD_PARK (1<<26) /* Be parked with LCD when idle */
78#define ARB_DMA_PARK (1<<25) /* Be parked with DMA when idle */
79#define ARB_CORE_PARK (1<<24) /* Be parked with core when idle */
80#define ARB_LOCK_FLAG (1<<23) /* Only Locking masters gain access to the bus */
81
82#endif
83
84
85/*
86 * Power Manager
87 */
88
89#define PMCR __REG(0x40F00000) /* Power Manager Control Register */
90#define PSSR __REG(0x40F00004) /* Power Manager Sleep Status Register */
91#define PSPR __REG(0x40F00008) /* Power Manager Scratch Pad Register */
92#define PWER __REG(0x40F0000C) /* Power Manager Wake-up Enable Register */
93#define PRER __REG(0x40F00010) /* Power Manager GPIO Rising-Edge Detect Enable Register */
94#define PFER __REG(0x40F00014) /* Power Manager GPIO Falling-Edge Detect Enable Register */
95#define PEDR __REG(0x40F00018) /* Power Manager GPIO Edge Detect Status Register */
96#define PCFR __REG(0x40F0001C) /* Power Manager General Configuration Register */
97#define PGSR0 __REG(0x40F00020) /* Power Manager GPIO Sleep State Register for GP[31-0] */
98#define PGSR1 __REG(0x40F00024) /* Power Manager GPIO Sleep State Register for GP[63-32] */
99#define PGSR2 __REG(0x40F00028) /* Power Manager GPIO Sleep State Register for GP[84-64] */
100#define PGSR3 __REG(0x40F0002C) /* Power Manager GPIO Sleep State Register for GP[118-96] */
101#define RCSR __REG(0x40F00030) /* Reset Controller Status Register */
102
103#define PSLR __REG(0x40F00034) /* Power Manager Sleep Config Register */
104#define PSTR __REG(0x40F00038) /* Power Manager Standby Config Register */
105#define PSNR __REG(0x40F0003C) /* Power Manager Sense Config Register */
106#define PVCR __REG(0x40F00040) /* Power Manager VoltageControl Register */
107#define PKWR __REG(0x40F00050) /* Power Manager KB Wake-up Enable Reg */
108#define PKSR __REG(0x40F00054) /* Power Manager KB Level-Detect Register */
109#define PCMD(x) __REG2(0x40F00080, (x)<<2)
110#define PCMD0 __REG(0x40F00080 + 0 * 4)
111#define PCMD1 __REG(0x40F00080 + 1 * 4)
112#define PCMD2 __REG(0x40F00080 + 2 * 4)
113#define PCMD3 __REG(0x40F00080 + 3 * 4)
114#define PCMD4 __REG(0x40F00080 + 4 * 4)
115#define PCMD5 __REG(0x40F00080 + 5 * 4)
116#define PCMD6 __REG(0x40F00080 + 6 * 4)
117#define PCMD7 __REG(0x40F00080 + 7 * 4)
118#define PCMD8 __REG(0x40F00080 + 8 * 4)
119#define PCMD9 __REG(0x40F00080 + 9 * 4)
120#define PCMD10 __REG(0x40F00080 + 10 * 4)
121#define PCMD11 __REG(0x40F00080 + 11 * 4)
122#define PCMD12 __REG(0x40F00080 + 12 * 4)
123#define PCMD13 __REG(0x40F00080 + 13 * 4)
124#define PCMD14 __REG(0x40F00080 + 14 * 4)
125#define PCMD15 __REG(0x40F00080 + 15 * 4)
126#define PCMD16 __REG(0x40F00080 + 16 * 4)
127#define PCMD17 __REG(0x40F00080 + 17 * 4)
128#define PCMD18 __REG(0x40F00080 + 18 * 4)
129#define PCMD19 __REG(0x40F00080 + 19 * 4)
130#define PCMD20 __REG(0x40F00080 + 20 * 4)
131#define PCMD21 __REG(0x40F00080 + 21 * 4)
132#define PCMD22 __REG(0x40F00080 + 22 * 4)
133#define PCMD23 __REG(0x40F00080 + 23 * 4)
134#define PCMD24 __REG(0x40F00080 + 24 * 4)
135#define PCMD25 __REG(0x40F00080 + 25 * 4)
136#define PCMD26 __REG(0x40F00080 + 26 * 4)
137#define PCMD27 __REG(0x40F00080 + 27 * 4)
138#define PCMD28 __REG(0x40F00080 + 28 * 4)
139#define PCMD29 __REG(0x40F00080 + 29 * 4)
140#define PCMD30 __REG(0x40F00080 + 30 * 4)
141#define PCMD31 __REG(0x40F00080 + 31 * 4)
142
143#define PCMD_MBC (1<<12)
144#define PCMD_DCE (1<<11)
145#define PCMD_LC (1<<10)
146/* FIXME: PCMD_SQC need be checked. */
147#define PCMD_SQC (3<<8) /* currently only bit 8 is changeable,
148 bit 9 should be 0 all day. */
149#define PVCR_VCSA (0x1<<14)
150#define PVCR_CommandDelay (0xf80)
151#define PCFR_PI2C_EN (0x1 << 6)
152
153#define PSSR_OTGPH (1 << 6) /* OTG Peripheral control Hold */
154#define PSSR_RDH (1 << 5) /* Read Disable Hold */
155#define PSSR_PH (1 << 4) /* Peripheral Control Hold */
156#define PSSR_STS (1 << 3) /* Standby Mode Status */
157#define PSSR_VFS (1 << 2) /* VDD Fault Status */
158#define PSSR_BFS (1 << 1) /* Battery Fault Status */
159#define PSSR_SSS (1 << 0) /* Software Sleep Status */
160
161#define PSLR_SL_ROD (1 << 20) /* Sleep-Mode/Depp-Sleep Mode nRESET_OUT Disable */
162
163#define PCFR_RO (1 << 15) /* RDH Override */
164#define PCFR_PO (1 << 14) /* PH Override */
165#define PCFR_GPROD (1 << 12) /* GPIO nRESET_OUT Disable */
166#define PCFR_L1_EN (1 << 11) /* Sleep Mode L1 converter Enable */
167#define PCFR_FVC (1 << 10) /* Frequency/Voltage Change */
168#define PCFR_DC_EN (1 << 7) /* Sleep/deep-sleep DC-DC Converter Enable */
169#define PCFR_PI2CEN (1 << 6) /* Enable PI2C controller */
170#define PCFR_GPR_EN (1 << 4) /* nRESET_GPIO Pin Enable */
171#define PCFR_DS (1 << 3) /* Deep Sleep Mode */
172#define PCFR_FS (1 << 2) /* Float Static Chip Selects */
173#define PCFR_FP (1 << 1) /* Float PCMCIA controls */
174#define PCFR_OPDE (1 << 0) /* 3.6864 MHz oscillator power-down enable */
175
176#define RCSR_GPR (1 << 3) /* GPIO Reset */
177#define RCSR_SMR (1 << 2) /* Sleep Mode */
178#define RCSR_WDR (1 << 1) /* Watchdog Reset */
179#define RCSR_HWR (1 << 0) /* Hardware Reset */
180
181#define PWER_GPIO(Nb) (1 << Nb) /* GPIO [0..15] wake-up enable */
182#define PWER_GPIO0 PWER_GPIO (0) /* GPIO [0] wake-up enable */
183#define PWER_GPIO1 PWER_GPIO (1) /* GPIO [1] wake-up enable */
184#define PWER_GPIO2 PWER_GPIO (2) /* GPIO [2] wake-up enable */
185#define PWER_GPIO3 PWER_GPIO (3) /* GPIO [3] wake-up enable */
186#define PWER_GPIO4 PWER_GPIO (4) /* GPIO [4] wake-up enable */
187#define PWER_GPIO5 PWER_GPIO (5) /* GPIO [5] wake-up enable */
188#define PWER_GPIO6 PWER_GPIO (6) /* GPIO [6] wake-up enable */
189#define PWER_GPIO7 PWER_GPIO (7) /* GPIO [7] wake-up enable */
190#define PWER_GPIO8 PWER_GPIO (8) /* GPIO [8] wake-up enable */
191#define PWER_GPIO9 PWER_GPIO (9) /* GPIO [9] wake-up enable */
192#define PWER_GPIO10 PWER_GPIO (10) /* GPIO [10] wake-up enable */
193#define PWER_GPIO11 PWER_GPIO (11) /* GPIO [11] wake-up enable */
194#define PWER_GPIO12 PWER_GPIO (12) /* GPIO [12] wake-up enable */
195#define PWER_GPIO13 PWER_GPIO (13) /* GPIO [13] wake-up enable */
196#define PWER_GPIO14 PWER_GPIO (14) /* GPIO [14] wake-up enable */
197#define PWER_GPIO15 PWER_GPIO (15) /* GPIO [15] wake-up enable */
198#define PWER_RTC 0x80000000 /* RTC alarm wake-up enable */
199
200/*
201 * PXA2xx specific Core clock definitions
202 */
203#define CCCR __REG(0x41300000) /* Core Clock Configuration Register */
204#define CCSR __REG(0x4130000C) /* Core Clock Status Register */
205#define CKEN __REG(0x41300004) /* Clock Enable Register */
206#define OSCC __REG(0x41300008) /* Oscillator Configuration Register */
207
208#define CCCR_N_MASK 0x0380 /* Run Mode Frequency to Turbo Mode Frequency Multiplier */
209#define CCCR_M_MASK 0x0060 /* Memory Frequency to Run Mode Frequency Multiplier */
210#define CCCR_L_MASK 0x001f /* Crystal Frequency to Memory Frequency Multiplier */
211
212#define CKEN_AC97CONF (31) /* AC97 Controller Configuration */
213#define CKEN_CAMERA (24) /* Camera Interface Clock Enable */
214#define CKEN_SSP1 (23) /* SSP1 Unit Clock Enable */
215#define CKEN_MEMC (22) /* Memory Controller Clock Enable */
216#define CKEN_MEMSTK (21) /* Memory Stick Host Controller */
217#define CKEN_IM (20) /* Internal Memory Clock Enable */
218#define CKEN_KEYPAD (19) /* Keypad Interface Clock Enable */
219#define CKEN_USIM (18) /* USIM Unit Clock Enable */
220#define CKEN_MSL (17) /* MSL Unit Clock Enable */
221#define CKEN_LCD (16) /* LCD Unit Clock Enable */
222#define CKEN_PWRI2C (15) /* PWR I2C Unit Clock Enable */
223#define CKEN_I2C (14) /* I2C Unit Clock Enable */
224#define CKEN_FICP (13) /* FICP Unit Clock Enable */
225#define CKEN_MMC (12) /* MMC Unit Clock Enable */
226#define CKEN_USB (11) /* USB Unit Clock Enable */
227#define CKEN_ASSP (10) /* ASSP (SSP3) Clock Enable */
228#define CKEN_USBHOST (10) /* USB Host Unit Clock Enable */
229#define CKEN_OSTIMER (9) /* OS Timer Unit Clock Enable */
230#define CKEN_NSSP (9) /* NSSP (SSP2) Clock Enable */
231#define CKEN_I2S (8) /* I2S Unit Clock Enable */
232#define CKEN_BTUART (7) /* BTUART Unit Clock Enable */
233#define CKEN_FFUART (6) /* FFUART Unit Clock Enable */
234#define CKEN_STUART (5) /* STUART Unit Clock Enable */
235#define CKEN_HWUART (4) /* HWUART Unit Clock Enable */
236#define CKEN_SSP3 (4) /* SSP3 Unit Clock Enable */
237#define CKEN_SSP (3) /* SSP Unit Clock Enable */
238#define CKEN_SSP2 (3) /* SSP2 Unit Clock Enable */
239#define CKEN_AC97 (2) /* AC97 Unit Clock Enable */
240#define CKEN_PWM1 (1) /* PWM1 Clock Enable */
241#define CKEN_PWM0 (0) /* PWM0 Clock Enable */
242
243#define OSCC_OON (1 << 1) /* 32.768kHz OON (write-once only bit) */
244#define OSCC_OOK (1 << 0) /* 32.768kHz OOK (read-only bit) */
245
246#endif
diff --git a/include/asm-arm/arch-pxa/pxa2xx_spi.h b/arch/arm/mach-pxa/include/mach/pxa2xx_spi.h
index 2206cb61a9f9..2206cb61a9f9 100644
--- a/include/asm-arm/arch-pxa/pxa2xx_spi.h
+++ b/arch/arm/mach-pxa/include/mach/pxa2xx_spi.h
diff --git a/arch/arm/mach-pxa/include/mach/pxa3xx-regs.h b/arch/arm/mach-pxa/include/mach/pxa3xx-regs.h
new file mode 100644
index 000000000000..39eb68319e28
--- /dev/null
+++ b/arch/arm/mach-pxa/include/mach/pxa3xx-regs.h
@@ -0,0 +1,183 @@
1/*
2 * arch/arm/mach-pxa/include/mach/pxa3xx-regs.h
3 *
4 * PXA3xx specific register definitions
5 *
6 * Copyright (C) 2007 Marvell International Ltd.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 */
12
13#ifndef __ASM_ARCH_PXA3XX_REGS_H
14#define __ASM_ARCH_PXA3XX_REGS_H
15
16/*
17 * Oscillator Configuration Register (OSCC)
18 */
19#define OSCC __REG(0x41350000) /* Oscillator Configuration Register */
20
21#define OSCC_PEN (1 << 11) /* 13MHz POUT */
22
23
24/*
25 * Service Power Management Unit (MPMU)
26 */
27#define PMCR __REG(0x40F50000) /* Power Manager Control Register */
28#define PSR __REG(0x40F50004) /* Power Manager S2 Status Register */
29#define PSPR __REG(0x40F50008) /* Power Manager Scratch Pad Register */
30#define PCFR __REG(0x40F5000C) /* Power Manager General Configuration Register */
31#define PWER __REG(0x40F50010) /* Power Manager Wake-up Enable Register */
32#define PWSR __REG(0x40F50014) /* Power Manager Wake-up Status Register */
33#define PECR __REG(0x40F50018) /* Power Manager EXT_WAKEUP[1:0] Control Register */
34#define DCDCSR __REG(0x40F50080) /* DC-DC Controller Status Register */
35#define PVCR __REG(0x40F50100) /* Power Manager Voltage Change Control Register */
36#define PCMD(x) __REG(0x40F50110 + ((x) << 2))
37
38/*
39 * Slave Power Managment Unit
40 */
41#define ASCR __REG(0x40f40000) /* Application Subsystem Power Status/Configuration */
42#define ARSR __REG(0x40f40004) /* Application Subsystem Reset Status */
43#define AD3ER __REG(0x40f40008) /* Application Subsystem Wake-Up from D3 Enable */
44#define AD3SR __REG(0x40f4000c) /* Application Subsystem Wake-Up from D3 Status */
45#define AD2D0ER __REG(0x40f40010) /* Application Subsystem Wake-Up from D2 to D0 Enable */
46#define AD2D0SR __REG(0x40f40014) /* Application Subsystem Wake-Up from D2 to D0 Status */
47#define AD2D1ER __REG(0x40f40018) /* Application Subsystem Wake-Up from D2 to D1 Enable */
48#define AD2D1SR __REG(0x40f4001c) /* Application Subsystem Wake-Up from D2 to D1 Status */
49#define AD1D0ER __REG(0x40f40020) /* Application Subsystem Wake-Up from D1 to D0 Enable */
50#define AD1D0SR __REG(0x40f40024) /* Application Subsystem Wake-Up from D1 to D0 Status */
51#define AGENP __REG(0x40f4002c) /* Application Subsystem General Purpose */
52#define AD3R __REG(0x40f40030) /* Application Subsystem D3 Configuration */
53#define AD2R __REG(0x40f40034) /* Application Subsystem D2 Configuration */
54#define AD1R __REG(0x40f40038) /* Application Subsystem D1 Configuration */
55
56/*
57 * Application Subsystem Configuration bits.
58 */
59#define ASCR_RDH (1 << 31)
60#define ASCR_D1S (1 << 2)
61#define ASCR_D2S (1 << 1)
62#define ASCR_D3S (1 << 0)
63
64/*
65 * Application Reset Status bits.
66 */
67#define ARSR_GPR (1 << 3)
68#define ARSR_LPMR (1 << 2)
69#define ARSR_WDT (1 << 1)
70#define ARSR_HWR (1 << 0)
71
72/*
73 * Application Subsystem Wake-Up bits.
74 */
75#define ADXER_WRTC (1 << 31) /* RTC */
76#define ADXER_WOST (1 << 30) /* OS Timer */
77#define ADXER_WTSI (1 << 29) /* Touchscreen */
78#define ADXER_WUSBH (1 << 28) /* USB host */
79#define ADXER_WUSB2 (1 << 26) /* USB client 2.0 */
80#define ADXER_WMSL0 (1 << 24) /* MSL port 0*/
81#define ADXER_WDMUX3 (1 << 23) /* USB EDMUX3 */
82#define ADXER_WDMUX2 (1 << 22) /* USB EDMUX2 */
83#define ADXER_WKP (1 << 21) /* Keypad */
84#define ADXER_WUSIM1 (1 << 20) /* USIM Port 1 */
85#define ADXER_WUSIM0 (1 << 19) /* USIM Port 0 */
86#define ADXER_WOTG (1 << 16) /* USBOTG input */
87#define ADXER_MFP_WFLASH (1 << 15) /* MFP: Data flash busy */
88#define ADXER_MFP_GEN12 (1 << 14) /* MFP: MMC3/GPIO/OST inputs */
89#define ADXER_MFP_WMMC2 (1 << 13) /* MFP: MMC2 */
90#define ADXER_MFP_WMMC1 (1 << 12) /* MFP: MMC1 */
91#define ADXER_MFP_WI2C (1 << 11) /* MFP: I2C */
92#define ADXER_MFP_WSSP4 (1 << 10) /* MFP: SSP4 */
93#define ADXER_MFP_WSSP3 (1 << 9) /* MFP: SSP3 */
94#define ADXER_MFP_WMAXTRIX (1 << 8) /* MFP: matrix keypad */
95#define ADXER_MFP_WUART3 (1 << 7) /* MFP: UART3 */
96#define ADXER_MFP_WUART2 (1 << 6) /* MFP: UART2 */
97#define ADXER_MFP_WUART1 (1 << 5) /* MFP: UART1 */
98#define ADXER_MFP_WSSP2 (1 << 4) /* MFP: SSP2 */
99#define ADXER_MFP_WSSP1 (1 << 3) /* MFP: SSP1 */
100#define ADXER_MFP_WAC97 (1 << 2) /* MFP: AC97 */
101#define ADXER_WEXTWAKE1 (1 << 1) /* External Wake 1 */
102#define ADXER_WEXTWAKE0 (1 << 0) /* External Wake 0 */
103
104/*
105 * AD3R/AD2R/AD1R bits. R2-R5 are only defined for PXA320.
106 */
107#define ADXR_L2 (1 << 8)
108#define ADXR_R5 (1 << 5)
109#define ADXR_R4 (1 << 4)
110#define ADXR_R3 (1 << 3)
111#define ADXR_R2 (1 << 2)
112#define ADXR_R1 (1 << 1)
113#define ADXR_R0 (1 << 0)
114
115/*
116 * Values for PWRMODE CP15 register
117 */
118#define PXA3xx_PM_S3D4C4 0x07 /* aka deep sleep */
119#define PXA3xx_PM_S2D3C4 0x06 /* aka sleep */
120#define PXA3xx_PM_S0D2C2 0x03 /* aka standby */
121#define PXA3xx_PM_S0D1C2 0x02 /* aka LCD refresh */
122#define PXA3xx_PM_S0D0C1 0x01
123
124/*
125 * Application Subsystem Clock
126 */
127#define ACCR __REG(0x41340000) /* Application Subsystem Clock Configuration Register */
128#define ACSR __REG(0x41340004) /* Application Subsystem Clock Status Register */
129#define AICSR __REG(0x41340008) /* Application Subsystem Interrupt Control/Status Register */
130#define CKENA __REG(0x4134000C) /* A Clock Enable Register */
131#define CKENB __REG(0x41340010) /* B Clock Enable Register */
132#define AC97_DIV __REG(0x41340014) /* AC97 clock divisor value register */
133
134/*
135 * Clock Enable Bit
136 */
137#define CKEN_LCD 1 /* < LCD Clock Enable */
138#define CKEN_USBH 2 /* < USB host clock enable */
139#define CKEN_CAMERA 3 /* < Camera interface clock enable */
140#define CKEN_NAND 4 /* < NAND Flash Controller Clock Enable */
141#define CKEN_USB2 6 /* < USB 2.0 client clock enable. */
142#define CKEN_DMC 8 /* < Dynamic Memory Controller clock enable */
143#define CKEN_SMC 9 /* < Static Memory Controller clock enable */
144#define CKEN_ISC 10 /* < Internal SRAM Controller clock enable */
145#define CKEN_BOOT 11 /* < Boot rom clock enable */
146#define CKEN_MMC1 12 /* < MMC1 Clock enable */
147#define CKEN_MMC2 13 /* < MMC2 clock enable */
148#define CKEN_KEYPAD 14 /* < Keypand Controller Clock Enable */
149#define CKEN_CIR 15 /* < Consumer IR Clock Enable */
150#define CKEN_USIM0 17 /* < USIM[0] Clock Enable */
151#define CKEN_USIM1 18 /* < USIM[1] Clock Enable */
152#define CKEN_TPM 19 /* < TPM clock enable */
153#define CKEN_UDC 20 /* < UDC clock enable */
154#define CKEN_BTUART 21 /* < BTUART clock enable */
155#define CKEN_FFUART 22 /* < FFUART clock enable */
156#define CKEN_STUART 23 /* < STUART clock enable */
157#define CKEN_AC97 24 /* < AC97 clock enable */
158#define CKEN_TOUCH 25 /* < Touch screen Interface Clock Enable */
159#define CKEN_SSP1 26 /* < SSP1 clock enable */
160#define CKEN_SSP2 27 /* < SSP2 clock enable */
161#define CKEN_SSP3 28 /* < SSP3 clock enable */
162#define CKEN_SSP4 29 /* < SSP4 clock enable */
163#define CKEN_MSL0 30 /* < MSL0 clock enable */
164#define CKEN_PWM0 32 /* < PWM[0] clock enable */
165#define CKEN_PWM1 33 /* < PWM[1] clock enable */
166#define CKEN_I2C 36 /* < I2C clock enable */
167#define CKEN_INTC 38 /* < Interrupt controller clock enable */
168#define CKEN_GPIO 39 /* < GPIO clock enable */
169#define CKEN_1WIRE 40 /* < 1-wire clock enable */
170#define CKEN_HSIO2 41 /* < HSIO2 clock enable */
171#define CKEN_MINI_IM 48 /* < Mini-IM */
172#define CKEN_MINI_LCD 49 /* < Mini LCD */
173
174#if defined(CONFIG_CPU_PXA310)
175#define CKEN_MMC3 5 /* < MMC3 Clock Enable */
176#define CKEN_MVED 43 /* < MVED clock enable */
177#endif
178
179/* Note: GCU clock enable bit differs on PXA300/PXA310 and PXA320 */
180#define PXA300_CKEN_GRAPHICS 42 /* Graphics controller clock enable */
181#define PXA320_CKEN_GRAPHICS 7 /* Graphics controller clock enable */
182
183#endif /* __ASM_ARCH_PXA3XX_REGS_H */
diff --git a/include/asm-arm/arch-pxa/pxa3xx_nand.h b/arch/arm/mach-pxa/include/mach/pxa3xx_nand.h
index eb4b190b6657..eb4b190b6657 100644
--- a/include/asm-arm/arch-pxa/pxa3xx_nand.h
+++ b/arch/arm/mach-pxa/include/mach/pxa3xx_nand.h
diff --git a/arch/arm/mach-pxa/include/mach/pxafb.h b/arch/arm/mach-pxa/include/mach/pxafb.h
new file mode 100644
index 000000000000..65447549616f
--- /dev/null
+++ b/arch/arm/mach-pxa/include/mach/pxafb.h
@@ -0,0 +1,151 @@
1/*
2 * arch/arm/mach-pxa/include/mach/pxafb.h
3 *
4 * Support for the xscale frame buffer.
5 *
6 * Author: Jean-Frederic Clere
7 * Created: Sep 22, 2003
8 * Copyright: jfclere@sinix.net
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
13 */
14
15#include <linux/fb.h>
16#include <mach/regs-lcd.h>
17
18/*
19 * Supported LCD connections
20 *
21 * bits 0 - 3: for LCD panel type:
22 *
23 * STN - for passive matrix
24 * DSTN - for dual scan passive matrix
25 * TFT - for active matrix
26 *
27 * bits 4 - 9 : for bus width
28 * bits 10-17 : for AC Bias Pin Frequency
29 * bit 18 : for output enable polarity
30 * bit 19 : for pixel clock edge
31 */
32#define LCD_CONN_TYPE(_x) ((_x) & 0x0f)
33#define LCD_CONN_WIDTH(_x) (((_x) >> 4) & 0x1f)
34
35#define LCD_TYPE_UNKNOWN 0
36#define LCD_TYPE_MONO_STN 1
37#define LCD_TYPE_MONO_DSTN 2
38#define LCD_TYPE_COLOR_STN 3
39#define LCD_TYPE_COLOR_DSTN 4
40#define LCD_TYPE_COLOR_TFT 5
41#define LCD_TYPE_SMART_PANEL 6
42#define LCD_TYPE_MAX 7
43
44#define LCD_MONO_STN_4BPP ((4 << 4) | LCD_TYPE_MONO_STN)
45#define LCD_MONO_STN_8BPP ((8 << 4) | LCD_TYPE_MONO_STN)
46#define LCD_MONO_DSTN_8BPP ((8 << 4) | LCD_TYPE_MONO_DSTN)
47#define LCD_COLOR_STN_8BPP ((8 << 4) | LCD_TYPE_COLOR_STN)
48#define LCD_COLOR_DSTN_16BPP ((16 << 4) | LCD_TYPE_COLOR_DSTN)
49#define LCD_COLOR_TFT_16BPP ((16 << 4) | LCD_TYPE_COLOR_TFT)
50#define LCD_COLOR_TFT_18BPP ((18 << 4) | LCD_TYPE_COLOR_TFT)
51#define LCD_SMART_PANEL_8BPP ((8 << 4) | LCD_TYPE_SMART_PANEL)
52#define LCD_SMART_PANEL_16BPP ((16 << 4) | LCD_TYPE_SMART_PANEL)
53#define LCD_SMART_PANEL_18BPP ((18 << 4) | LCD_TYPE_SMART_PANEL)
54
55#define LCD_AC_BIAS_FREQ(x) (((x) & 0xff) << 10)
56#define LCD_BIAS_ACTIVE_HIGH (0 << 17)
57#define LCD_BIAS_ACTIVE_LOW (1 << 17)
58#define LCD_PCLK_EDGE_RISE (0 << 18)
59#define LCD_PCLK_EDGE_FALL (1 << 18)
60
61/*
62 * This structure describes the machine which we are running on.
63 * It is set in linux/arch/arm/mach-pxa/machine_name.c and used in the probe routine
64 * of linux/drivers/video/pxafb.c
65 */
66struct pxafb_mode_info {
67 u_long pixclock;
68
69 u_short xres;
70 u_short yres;
71
72 u_char bpp;
73 u_int cmap_greyscale:1,
74 depth:8,
75 unused:23;
76
77 /* Parallel Mode Timing */
78 u_char hsync_len;
79 u_char left_margin;
80 u_char right_margin;
81
82 u_char vsync_len;
83 u_char upper_margin;
84 u_char lower_margin;
85 u_char sync;
86
87 /* Smart Panel Mode Timing - see PXA27x DM 7.4.15.0.3 for details
88 * Note:
89 * 1. all parameters in nanosecond (ns)
90 * 2. a0cs{rd,wr}_set_hld are controlled by the same register bits
91 * in pxa27x and pxa3xx, initialize them to the same value or
92 * the larger one will be used
93 * 3. same to {rd,wr}_pulse_width
94 */
95 unsigned a0csrd_set_hld; /* A0 and CS Setup/Hold Time before/after L_FCLK_RD */
96 unsigned a0cswr_set_hld; /* A0 and CS Setup/Hold Time before/after L_PCLK_WR */
97 unsigned wr_pulse_width; /* L_PCLK_WR pulse width */
98 unsigned rd_pulse_width; /* L_FCLK_RD pulse width */
99 unsigned cmd_inh_time; /* Command Inhibit time between two writes */
100 unsigned op_hold_time; /* Output Hold time from L_FCLK_RD negation */
101};
102
103struct pxafb_mach_info {
104 struct pxafb_mode_info *modes;
105 unsigned int num_modes;
106
107 unsigned int lcd_conn;
108
109 u_int fixed_modes:1,
110 cmap_inverse:1,
111 cmap_static:1,
112 unused:29;
113
114 /* The following should be defined in LCCR0
115 * LCCR0_Act or LCCR0_Pas Active or Passive
116 * LCCR0_Sngl or LCCR0_Dual Single/Dual panel
117 * LCCR0_Mono or LCCR0_Color Mono/Color
118 * LCCR0_4PixMono or LCCR0_8PixMono (in mono single mode)
119 * LCCR0_DMADel(Tcpu) (optional) DMA request delay
120 *
121 * The following should not be defined in LCCR0:
122 * LCCR0_OUM, LCCR0_BM, LCCR0_QDM, LCCR0_DIS, LCCR0_EFM
123 * LCCR0_IUM, LCCR0_SFM, LCCR0_LDM, LCCR0_ENB
124 */
125 u_int lccr0;
126 /* The following should be defined in LCCR3
127 * LCCR3_OutEnH or LCCR3_OutEnL Output enable polarity
128 * LCCR3_PixRsEdg or LCCR3_PixFlEdg Pixel clock edge type
129 * LCCR3_Acb(X) AB Bias pin frequency
130 * LCCR3_DPC (optional) Double Pixel Clock mode (untested)
131 *
132 * The following should not be defined in LCCR3
133 * LCCR3_HSP, LCCR3_VSP, LCCR0_Pcd(x), LCCR3_Bpp
134 */
135 u_int lccr3;
136 /* The following should be defined in LCCR4
137 * LCCR4_PAL_FOR_0 or LCCR4_PAL_FOR_1 or LCCR4_PAL_FOR_2
138 *
139 * All other bits in LCCR4 should be left alone.
140 */
141 u_int lccr4;
142 void (*pxafb_backlight_power)(int);
143 void (*pxafb_lcd_power)(int, struct fb_var_screeninfo *);
144 void (*smart_update)(struct fb_info *);
145};
146void set_pxa_fb_info(struct pxafb_mach_info *hard_pxa_fb_info);
147void set_pxa_fb_parent(struct device *parent_dev);
148unsigned long pxafb_get_hsync_time(struct device *dev);
149
150extern int pxafb_smart_queue(struct fb_info *info, uint16_t *cmds, int);
151extern int pxafb_smart_flush(struct fb_info *info);
diff --git a/arch/arm/mach-pxa/include/mach/regs-lcd.h b/arch/arm/mach-pxa/include/mach/regs-lcd.h
new file mode 100644
index 000000000000..c689c4ea769c
--- /dev/null
+++ b/arch/arm/mach-pxa/include/mach/regs-lcd.h
@@ -0,0 +1,180 @@
1#ifndef __ASM_ARCH_REGS_LCD_H
2#define __ASM_ARCH_REGS_LCD_H
3
4#include <mach/bitfield.h>
5
6/*
7 * LCD Controller Registers and Bits Definitions
8 */
9#define LCCR0 (0x000) /* LCD Controller Control Register 0 */
10#define LCCR1 (0x004) /* LCD Controller Control Register 1 */
11#define LCCR2 (0x008) /* LCD Controller Control Register 2 */
12#define LCCR3 (0x00C) /* LCD Controller Control Register 3 */
13#define LCCR4 (0x010) /* LCD Controller Control Register 4 */
14#define LCCR5 (0x014) /* LCD Controller Control Register 5 */
15#define DFBR0 (0x020) /* DMA Channel 0 Frame Branch Register */
16#define DFBR1 (0x024) /* DMA Channel 1 Frame Branch Register */
17#define LCSR (0x038) /* LCD Controller Status Register */
18#define LIIDR (0x03C) /* LCD Controller Interrupt ID Register */
19#define TMEDRGBR (0x040) /* TMED RGB Seed Register */
20#define TMEDCR (0x044) /* TMED Control Register */
21
22#define CMDCR (0x100) /* Command Control Register */
23#define PRSR (0x104) /* Panel Read Status Register */
24
25#define LCCR3_1BPP (0 << 24)
26#define LCCR3_2BPP (1 << 24)
27#define LCCR3_4BPP (2 << 24)
28#define LCCR3_8BPP (3 << 24)
29#define LCCR3_16BPP (4 << 24)
30#define LCCR3_18BPP (5 << 24)
31#define LCCR3_18BPP_P (6 << 24)
32#define LCCR3_19BPP (7 << 24)
33#define LCCR3_19BPP_P (1 << 29)
34#define LCCR3_24BPP ((1 << 29) | (1 << 24))
35#define LCCR3_25BPP ((1 << 29) | (2 << 24))
36
37#define LCCR3_PDFOR_0 (0 << 30)
38#define LCCR3_PDFOR_1 (1 << 30)
39#define LCCR3_PDFOR_2 (2 << 30)
40#define LCCR3_PDFOR_3 (3 << 30)
41
42#define LCCR4_PAL_FOR_0 (0 << 15)
43#define LCCR4_PAL_FOR_1 (1 << 15)
44#define LCCR4_PAL_FOR_2 (2 << 15)
45#define LCCR4_PAL_FOR_MASK (3 << 15)
46
47#define FDADR0 (0x200) /* DMA Channel 0 Frame Descriptor Address Register */
48#define FSADR0 (0x204) /* DMA Channel 0 Frame Source Address Register */
49#define FIDR0 (0x208) /* DMA Channel 0 Frame ID Register */
50#define LDCMD0 (0x20C) /* DMA Channel 0 Command Register */
51#define FDADR1 (0x210) /* DMA Channel 1 Frame Descriptor Address Register */
52#define FSADR1 (0x214) /* DMA Channel 1 Frame Source Address Register */
53#define FIDR1 (0x218) /* DMA Channel 1 Frame ID Register */
54#define LDCMD1 (0x21C) /* DMA Channel 1 Command Register */
55#define FDADR6 (0x260) /* DMA Channel 6 Frame Descriptor Address Register */
56#define FSADR6 (0x264) /* DMA Channel 6 Frame Source Address Register */
57#define FIDR6 (0x268) /* DMA Channel 6 Frame ID Register */
58
59#define LCCR0_ENB (1 << 0) /* LCD Controller enable */
60#define LCCR0_CMS (1 << 1) /* Color/Monochrome Display Select */
61#define LCCR0_Color (LCCR0_CMS*0) /* Color display */
62#define LCCR0_Mono (LCCR0_CMS*1) /* Monochrome display */
63#define LCCR0_SDS (1 << 2) /* Single/Dual Panel Display Select */
64#define LCCR0_Sngl (LCCR0_SDS*0) /* Single panel display */
65#define LCCR0_Dual (LCCR0_SDS*1) /* Dual panel display */
66
67#define LCCR0_LDM (1 << 3) /* LCD Disable Done Mask */
68#define LCCR0_SFM (1 << 4) /* Start of frame mask */
69#define LCCR0_IUM (1 << 5) /* Input FIFO underrun mask */
70#define LCCR0_EFM (1 << 6) /* End of Frame mask */
71#define LCCR0_PAS (1 << 7) /* Passive/Active display Select */
72#define LCCR0_Pas (LCCR0_PAS*0) /* Passive display (STN) */
73#define LCCR0_Act (LCCR0_PAS*1) /* Active display (TFT) */
74#define LCCR0_DPD (1 << 9) /* Double Pixel Data (monochrome) */
75#define LCCR0_4PixMono (LCCR0_DPD*0) /* 4-Pixel/clock Monochrome display */
76#define LCCR0_8PixMono (LCCR0_DPD*1) /* 8-Pixel/clock Monochrome display */
77#define LCCR0_DIS (1 << 10) /* LCD Disable */
78#define LCCR0_QDM (1 << 11) /* LCD Quick Disable mask */
79#define LCCR0_PDD (0xff << 12) /* Palette DMA request delay */
80#define LCCR0_PDD_S 12
81#define LCCR0_BM (1 << 20) /* Branch mask */
82#define LCCR0_OUM (1 << 21) /* Output FIFO underrun mask */
83#define LCCR0_LCDT (1 << 22) /* LCD panel type */
84#define LCCR0_RDSTM (1 << 23) /* Read status interrupt mask */
85#define LCCR0_CMDIM (1 << 24) /* Command interrupt mask */
86#define LCCR0_OUC (1 << 25) /* Overlay Underlay control bit */
87#define LCCR0_LDDALT (1 << 26) /* LDD alternate mapping control */
88
89#define LCCR1_PPL Fld (10, 0) /* Pixels Per Line - 1 */
90#define LCCR1_DisWdth(Pixel) (((Pixel) - 1) << FShft (LCCR1_PPL))
91
92#define LCCR1_HSW Fld (6, 10) /* Horizontal Synchronization */
93#define LCCR1_HorSnchWdth(Tpix) (((Tpix) - 1) << FShft (LCCR1_HSW))
94
95#define LCCR1_ELW Fld (8, 16) /* End-of-Line pixel clock Wait - 1 */
96#define LCCR1_EndLnDel(Tpix) (((Tpix) - 1) << FShft (LCCR1_ELW))
97
98#define LCCR1_BLW Fld (8, 24) /* Beginning-of-Line pixel clock */
99#define LCCR1_BegLnDel(Tpix) (((Tpix) - 1) << FShft (LCCR1_BLW))
100
101#define LCCR2_LPP Fld (10, 0) /* Line Per Panel - 1 */
102#define LCCR2_DisHght(Line) (((Line) - 1) << FShft (LCCR2_LPP))
103
104#define LCCR2_VSW Fld (6, 10) /* Vertical Synchronization pulse - 1 */
105#define LCCR2_VrtSnchWdth(Tln) (((Tln) - 1) << FShft (LCCR2_VSW))
106
107#define LCCR2_EFW Fld (8, 16) /* End-of-Frame line clock Wait */
108#define LCCR2_EndFrmDel(Tln) ((Tln) << FShft (LCCR2_EFW))
109
110#define LCCR2_BFW Fld (8, 24) /* Beginning-of-Frame line clock */
111#define LCCR2_BegFrmDel(Tln) ((Tln) << FShft (LCCR2_BFW))
112
113#define LCCR3_API (0xf << 16) /* AC Bias pin trasitions per interrupt */
114#define LCCR3_API_S 16
115#define LCCR3_VSP (1 << 20) /* vertical sync polarity */
116#define LCCR3_HSP (1 << 21) /* horizontal sync polarity */
117#define LCCR3_PCP (1 << 22) /* Pixel Clock Polarity (L_PCLK) */
118#define LCCR3_PixRsEdg (LCCR3_PCP*0) /* Pixel clock Rising-Edge */
119#define LCCR3_PixFlEdg (LCCR3_PCP*1) /* Pixel clock Falling-Edge */
120
121#define LCCR3_OEP (1 << 23) /* Output Enable Polarity */
122#define LCCR3_OutEnH (LCCR3_OEP*0) /* Output Enable active High */
123#define LCCR3_OutEnL (LCCR3_OEP*1) /* Output Enable active Low */
124
125#define LCCR3_DPC (1 << 27) /* double pixel clock mode */
126#define LCCR3_PCD Fld (8, 0) /* Pixel Clock Divisor */
127#define LCCR3_PixClkDiv(Div) (((Div) << FShft (LCCR3_PCD)))
128
129#define LCCR3_BPP Fld (3, 24) /* Bit Per Pixel */
130#define LCCR3_Bpp(Bpp) (((Bpp) << FShft (LCCR3_BPP)))
131
132#define LCCR3_ACB Fld (8, 8) /* AC Bias */
133#define LCCR3_Acb(Acb) (((Acb) << FShft (LCCR3_ACB)))
134
135#define LCCR3_HorSnchH (LCCR3_HSP*0) /* HSP Active High */
136#define LCCR3_HorSnchL (LCCR3_HSP*1) /* HSP Active Low */
137
138#define LCCR3_VrtSnchH (LCCR3_VSP*0) /* VSP Active High */
139#define LCCR3_VrtSnchL (LCCR3_VSP*1) /* VSP Active Low */
140
141#define LCCR5_IUM(x) (1 << ((x) + 23)) /* input underrun mask */
142#define LCCR5_BSM(x) (1 << ((x) + 15)) /* branch mask */
143#define LCCR5_EOFM(x) (1 << ((x) + 7)) /* end of frame mask */
144#define LCCR5_SOFM(x) (1 << ((x) + 0)) /* start of frame mask */
145
146#define LCSR_LDD (1 << 0) /* LCD Disable Done */
147#define LCSR_SOF (1 << 1) /* Start of frame */
148#define LCSR_BER (1 << 2) /* Bus error */
149#define LCSR_ABC (1 << 3) /* AC Bias count */
150#define LCSR_IUL (1 << 4) /* input FIFO underrun Lower panel */
151#define LCSR_IUU (1 << 5) /* input FIFO underrun Upper panel */
152#define LCSR_OU (1 << 6) /* output FIFO underrun */
153#define LCSR_QD (1 << 7) /* quick disable */
154#define LCSR_EOF (1 << 8) /* end of frame */
155#define LCSR_BS (1 << 9) /* branch status */
156#define LCSR_SINT (1 << 10) /* subsequent interrupt */
157#define LCSR_RD_ST (1 << 11) /* read status */
158#define LCSR_CMD_INT (1 << 12) /* command interrupt */
159
160#define LDCMD_PAL (1 << 26) /* instructs DMA to load palette buffer */
161
162/* smartpanel related */
163#define PRSR_DATA(x) ((x) & 0xff) /* Panel Data */
164#define PRSR_A0 (1 << 8) /* Read Data Source */
165#define PRSR_ST_OK (1 << 9) /* Status OK */
166#define PRSR_CON_NT (1 << 10) /* Continue to Next Command */
167
168#define SMART_CMD_A0 (0x1 << 8)
169#define SMART_CMD_READ_STATUS_REG (0x0 << 9)
170#define SMART_CMD_READ_FRAME_BUFFER ((0x0 << 9) | SMART_CMD_A0)
171#define SMART_CMD_WRITE_COMMAND (0x1 << 9)
172#define SMART_CMD_WRITE_DATA ((0x1 << 9) | SMART_CMD_A0)
173#define SMART_CMD_WRITE_FRAME ((0x2 << 9) | SMART_CMD_A0)
174#define SMART_CMD_WAIT_FOR_VSYNC (0x3 << 9)
175#define SMART_CMD_NOOP (0x4 << 9)
176#define SMART_CMD_INTERRUPT (0x5 << 9)
177
178#define SMART_CMD(x) (SMART_CMD_WRITE_COMMAND | ((x) & 0xff))
179#define SMART_DAT(x) (SMART_CMD_WRITE_DATA | ((x) & 0xff))
180#endif /* __ASM_ARCH_REGS_LCD_H */
diff --git a/include/asm-arm/arch-pxa/regs-ssp.h b/arch/arm/mach-pxa/include/mach/regs-ssp.h
index 3c04cde2cf1f..3c04cde2cf1f 100644
--- a/include/asm-arm/arch-pxa/regs-ssp.h
+++ b/arch/arm/mach-pxa/include/mach/regs-ssp.h
diff --git a/arch/arm/mach-pxa/include/mach/reset.h b/arch/arm/mach-pxa/include/mach/reset.h
new file mode 100644
index 000000000000..9489a48871a8
--- /dev/null
+++ b/arch/arm/mach-pxa/include/mach/reset.h
@@ -0,0 +1,18 @@
1#ifndef __ASM_ARCH_RESET_H
2#define __ASM_ARCH_RESET_H
3
4#define RESET_STATUS_HARDWARE (1 << 0) /* Hardware Reset */
5#define RESET_STATUS_WATCHDOG (1 << 1) /* Watchdog Reset */
6#define RESET_STATUS_LOWPOWER (1 << 2) /* Low Power/Sleep Exit */
7#define RESET_STATUS_GPIO (1 << 3) /* GPIO Reset */
8#define RESET_STATUS_ALL (0xf)
9
10extern unsigned int reset_status;
11extern void clear_reset_status(unsigned int mask);
12
13/*
14 * register GPIO as reset generator
15 */
16extern int init_gpio_reset(int gpio);
17
18#endif /* __ASM_ARCH_RESET_H */
diff --git a/include/asm-arm/arch-pxa/sharpsl.h b/arch/arm/mach-pxa/include/mach/sharpsl.h
index 3b1d4a72d4d1..3b1d4a72d4d1 100644
--- a/include/asm-arm/arch-pxa/sharpsl.h
+++ b/arch/arm/mach-pxa/include/mach/sharpsl.h
diff --git a/include/asm-arm/arch-pxa/spitz.h b/arch/arm/mach-pxa/include/mach/spitz.h
index bd14365f7ed5..bd14365f7ed5 100644
--- a/include/asm-arm/arch-pxa/spitz.h
+++ b/arch/arm/mach-pxa/include/mach/spitz.h
diff --git a/include/asm-arm/arch-pxa/ssp.h b/arch/arm/mach-pxa/include/mach/ssp.h
index a012882c9ee6..a012882c9ee6 100644
--- a/include/asm-arm/arch-pxa/ssp.h
+++ b/arch/arm/mach-pxa/include/mach/ssp.h
diff --git a/arch/arm/mach-pxa/include/mach/system.h b/arch/arm/mach-pxa/include/mach/system.h
new file mode 100644
index 000000000000..0f381e692999
--- /dev/null
+++ b/arch/arm/mach-pxa/include/mach/system.h
@@ -0,0 +1,24 @@
1/*
2 * arch/arm/mach-pxa/include/mach/system.h
3 *
4 * Author: Nicolas Pitre
5 * Created: Jun 15, 2001
6 * Copyright: MontaVista Software Inc.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 */
12
13#include <asm/proc-fns.h>
14#include "hardware.h"
15#include "pxa2xx-regs.h"
16#include "pxa-regs.h"
17
18static inline void arch_idle(void)
19{
20 cpu_do_idle();
21}
22
23
24void arch_reset(char mode);
diff --git a/arch/arm/mach-pxa/include/mach/timex.h b/arch/arm/mach-pxa/include/mach/timex.h
new file mode 100644
index 000000000000..b05fc6683c47
--- /dev/null
+++ b/arch/arm/mach-pxa/include/mach/timex.h
@@ -0,0 +1,26 @@
1/*
2 * arch/arm/mach-pxa/include/mach/timex.h
3 *
4 * Author: Nicolas Pitre
5 * Created: Jun 15, 2001
6 * Copyright: MontaVista Software Inc.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 */
12
13
14#if defined(CONFIG_PXA25x)
15/* PXA250/210 timer base */
16#define CLOCK_TICK_RATE 3686400
17#elif defined(CONFIG_PXA27x)
18/* PXA27x timer base */
19#ifdef CONFIG_MACH_MAINSTONE
20#define CLOCK_TICK_RATE 3249600
21#else
22#define CLOCK_TICK_RATE 3250000
23#endif
24#else
25#define CLOCK_TICK_RATE 3250000
26#endif
diff --git a/include/asm-arm/arch-pxa/tosa.h b/arch/arm/mach-pxa/include/mach/tosa.h
index a72803f0461b..a72803f0461b 100644
--- a/include/asm-arm/arch-pxa/tosa.h
+++ b/arch/arm/mach-pxa/include/mach/tosa.h
diff --git a/include/asm-arm/arch-pxa/tosa_bt.h b/arch/arm/mach-pxa/include/mach/tosa_bt.h
index efc3c3d3b75d..efc3c3d3b75d 100644
--- a/include/asm-arm/arch-pxa/tosa_bt.h
+++ b/arch/arm/mach-pxa/include/mach/tosa_bt.h
diff --git a/include/asm-arm/arch-pxa/trizeps4.h b/arch/arm/mach-pxa/include/mach/trizeps4.h
index 641d0ec110bb..641d0ec110bb 100644
--- a/include/asm-arm/arch-pxa/trizeps4.h
+++ b/arch/arm/mach-pxa/include/mach/trizeps4.h
diff --git a/arch/arm/mach-pxa/include/mach/udc.h b/arch/arm/mach-pxa/include/mach/udc.h
new file mode 100644
index 000000000000..2f82332e81a0
--- /dev/null
+++ b/arch/arm/mach-pxa/include/mach/udc.h
@@ -0,0 +1,8 @@
1/*
2 * arch/arm/mach-pxa/include/mach/udc.h
3 *
4 */
5#include <asm/mach/udc_pxa2xx.h>
6
7extern void pxa_set_udc_info(struct pxa2xx_udc_mach_info *info);
8
diff --git a/arch/arm/mach-pxa/include/mach/uncompress.h b/arch/arm/mach-pxa/include/mach/uncompress.h
new file mode 100644
index 000000000000..21e3e890af98
--- /dev/null
+++ b/arch/arm/mach-pxa/include/mach/uncompress.h
@@ -0,0 +1,45 @@
1/*
2 * arch/arm/mach-pxa/include/mach/uncompress.h
3 *
4 * Author: Nicolas Pitre
5 * Copyright: (C) 2001 MontaVista Software Inc.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 */
11
12#include <linux/serial_reg.h>
13#include <mach/pxa-regs.h>
14#include <asm/mach-types.h>
15
16#define __REG(x) ((volatile unsigned long *)x)
17
18static volatile unsigned long *UART = FFUART;
19
20static inline void putc(char c)
21{
22 if (!(UART[UART_IER] & IER_UUE))
23 return;
24 while (!(UART[UART_LSR] & LSR_TDRQ))
25 barrier();
26 UART[UART_TX] = c;
27}
28
29/*
30 * This does not append a newline
31 */
32static inline void flush(void)
33{
34}
35
36static inline void arch_decomp_setup(void)
37{
38 if (machine_is_littleton())
39 UART = STUART;
40}
41
42/*
43 * nothing to do
44 */
45#define arch_decomp_wdog()
diff --git a/arch/arm/mach-pxa/include/mach/vmalloc.h b/arch/arm/mach-pxa/include/mach/vmalloc.h
new file mode 100644
index 000000000000..e90c5eeb81dd
--- /dev/null
+++ b/arch/arm/mach-pxa/include/mach/vmalloc.h
@@ -0,0 +1,11 @@
1/*
2 * arch/arm/mach-pxa/include/mach/vmalloc.h
3 *
4 * Author: Nicolas Pitre
5 * Copyright: (C) 2001 MontaVista Software Inc.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 */
11#define VMALLOC_END (0xe8000000)
diff --git a/include/asm-arm/arch-pxa/zylonite.h b/arch/arm/mach-pxa/include/mach/zylonite.h
index 0d35ca04731e..0d35ca04731e 100644
--- a/include/asm-arm/arch-pxa/zylonite.h
+++ b/arch/arm/mach-pxa/include/mach/zylonite.h
diff --git a/arch/arm/mach-pxa/irq.c b/arch/arm/mach-pxa/irq.c
index fbff557bb225..5e95c5372fec 100644
--- a/arch/arm/mach-pxa/irq.c
+++ b/arch/arm/mach-pxa/irq.c
@@ -17,10 +17,10 @@
17#include <linux/interrupt.h> 17#include <linux/interrupt.h>
18#include <linux/sysdev.h> 18#include <linux/sysdev.h>
19 19
20#include <asm/hardware.h> 20#include <mach/hardware.h>
21#include <asm/irq.h> 21#include <asm/irq.h>
22#include <asm/mach/irq.h> 22#include <asm/mach/irq.h>
23#include <asm/arch/pxa-regs.h> 23#include <mach/pxa-regs.h>
24 24
25#include "generic.h" 25#include "generic.h"
26 26
diff --git a/arch/arm/mach-pxa/leds-idp.c b/arch/arm/mach-pxa/leds-idp.c
index 38aa9270540e..18b20d469410 100644
--- a/arch/arm/mach-pxa/leds-idp.c
+++ b/arch/arm/mach-pxa/leds-idp.c
@@ -14,12 +14,12 @@
14 14
15#include <linux/init.h> 15#include <linux/init.h>
16 16
17#include <asm/hardware.h> 17#include <mach/hardware.h>
18#include <asm/leds.h> 18#include <asm/leds.h>
19#include <asm/system.h> 19#include <asm/system.h>
20 20
21#include <asm/arch/pxa-regs.h> 21#include <mach/pxa-regs.h>
22#include <asm/arch/idp.h> 22#include <mach/idp.h>
23 23
24#include "leds.h" 24#include "leds.h"
25 25
diff --git a/arch/arm/mach-pxa/leds-lubbock.c b/arch/arm/mach-pxa/leds-lubbock.c
index afbc6698e27c..1a258029c33c 100644
--- a/arch/arm/mach-pxa/leds-lubbock.c
+++ b/arch/arm/mach-pxa/leds-lubbock.c
@@ -13,11 +13,11 @@
13 13
14#include <linux/init.h> 14#include <linux/init.h>
15 15
16#include <asm/hardware.h> 16#include <mach/hardware.h>
17#include <asm/leds.h> 17#include <asm/leds.h>
18#include <asm/system.h> 18#include <asm/system.h>
19#include <asm/arch/pxa-regs.h> 19#include <mach/pxa-regs.h>
20#include <asm/arch/lubbock.h> 20#include <mach/lubbock.h>
21 21
22#include "leds.h" 22#include "leds.h"
23 23
diff --git a/arch/arm/mach-pxa/leds-mainstone.c b/arch/arm/mach-pxa/leds-mainstone.c
index 065293eb0d82..95e06b849634 100644
--- a/arch/arm/mach-pxa/leds-mainstone.c
+++ b/arch/arm/mach-pxa/leds-mainstone.c
@@ -12,12 +12,12 @@
12 12
13#include <linux/init.h> 13#include <linux/init.h>
14 14
15#include <asm/hardware.h> 15#include <mach/hardware.h>
16#include <asm/leds.h> 16#include <asm/leds.h>
17#include <asm/system.h> 17#include <asm/system.h>
18 18
19#include <asm/arch/pxa-regs.h> 19#include <mach/pxa-regs.h>
20#include <asm/arch/mainstone.h> 20#include <mach/mainstone.h>
21 21
22#include "leds.h" 22#include "leds.h"
23 23
diff --git a/arch/arm/mach-pxa/leds-trizeps4.c b/arch/arm/mach-pxa/leds-trizeps4.c
index 21880daabafe..3bc29007df3a 100644
--- a/arch/arm/mach-pxa/leds-trizeps4.c
+++ b/arch/arm/mach-pxa/leds-trizeps4.c
@@ -12,14 +12,14 @@
12 12
13#include <linux/init.h> 13#include <linux/init.h>
14 14
15#include <asm/hardware.h> 15#include <mach/hardware.h>
16#include <asm/system.h> 16#include <asm/system.h>
17#include <asm/types.h> 17#include <asm/types.h>
18#include <asm/leds.h> 18#include <asm/leds.h>
19 19
20#include <asm/arch/pxa-regs.h> 20#include <mach/pxa-regs.h>
21#include <asm/arch/pxa2xx-gpio.h> 21#include <mach/pxa2xx-gpio.h>
22#include <asm/arch/trizeps4.h> 22#include <mach/trizeps4.h>
23 23
24#include "leds.h" 24#include "leds.h"
25 25
diff --git a/arch/arm/mach-pxa/littleton.c b/arch/arm/mach-pxa/littleton.c
index dd759d03a9fd..58f3402a0375 100644
--- a/arch/arm/mach-pxa/littleton.c
+++ b/arch/arm/mach-pxa/littleton.c
@@ -26,21 +26,21 @@
26#include <asm/setup.h> 26#include <asm/setup.h>
27#include <asm/memory.h> 27#include <asm/memory.h>
28#include <asm/mach-types.h> 28#include <asm/mach-types.h>
29#include <asm/hardware.h> 29#include <mach/hardware.h>
30#include <asm/irq.h> 30#include <asm/irq.h>
31 31
32#include <asm/mach/arch.h> 32#include <asm/mach/arch.h>
33#include <asm/mach/map.h> 33#include <asm/mach/map.h>
34#include <asm/mach/irq.h> 34#include <asm/mach/irq.h>
35 35
36#include <asm/arch/pxa-regs.h> 36#include <mach/pxa-regs.h>
37#include <asm/arch/mfp-pxa300.h> 37#include <mach/mfp-pxa300.h>
38#include <asm/arch/gpio.h> 38#include <mach/gpio.h>
39#include <asm/arch/pxafb.h> 39#include <mach/pxafb.h>
40#include <asm/arch/ssp.h> 40#include <mach/ssp.h>
41#include <asm/arch/pxa27x_keypad.h> 41#include <mach/pxa27x_keypad.h>
42#include <asm/arch/pxa3xx_nand.h> 42#include <mach/pxa3xx_nand.h>
43#include <asm/arch/littleton.h> 43#include <mach/littleton.h>
44 44
45#include "generic.h" 45#include "generic.h"
46 46
diff --git a/arch/arm/mach-pxa/lpd270.c b/arch/arm/mach-pxa/lpd270.c
index 8d1ab54e7b20..b7038948d1d4 100644
--- a/arch/arm/mach-pxa/lpd270.c
+++ b/arch/arm/mach-pxa/lpd270.c
@@ -29,7 +29,7 @@
29#include <asm/setup.h> 29#include <asm/setup.h>
30#include <asm/memory.h> 30#include <asm/memory.h>
31#include <asm/mach-types.h> 31#include <asm/mach-types.h>
32#include <asm/hardware.h> 32#include <mach/hardware.h>
33#include <asm/irq.h> 33#include <asm/irq.h>
34#include <asm/sizes.h> 34#include <asm/sizes.h>
35 35
@@ -38,15 +38,15 @@
38#include <asm/mach/irq.h> 38#include <asm/mach/irq.h>
39#include <asm/mach/flash.h> 39#include <asm/mach/flash.h>
40 40
41#include <asm/arch/pxa-regs.h> 41#include <mach/pxa-regs.h>
42#include <asm/arch/pxa2xx-regs.h> 42#include <mach/pxa2xx-regs.h>
43#include <asm/arch/pxa2xx-gpio.h> 43#include <mach/pxa2xx-gpio.h>
44#include <asm/arch/lpd270.h> 44#include <mach/lpd270.h>
45#include <asm/arch/audio.h> 45#include <mach/audio.h>
46#include <asm/arch/pxafb.h> 46#include <mach/pxafb.h>
47#include <asm/arch/mmc.h> 47#include <mach/mmc.h>
48#include <asm/arch/irda.h> 48#include <mach/irda.h>
49#include <asm/arch/ohci.h> 49#include <mach/ohci.h>
50 50
51#include "generic.h" 51#include "generic.h"
52#include "devices.h" 52#include "devices.h"
diff --git a/arch/arm/mach-pxa/lubbock.c b/arch/arm/mach-pxa/lubbock.c
index af7375bb46a4..bb9e09208b9f 100644
--- a/arch/arm/mach-pxa/lubbock.c
+++ b/arch/arm/mach-pxa/lubbock.c
@@ -25,12 +25,12 @@
25 25
26#include <linux/spi/spi.h> 26#include <linux/spi/spi.h>
27#include <linux/spi/ads7846.h> 27#include <linux/spi/ads7846.h>
28#include <asm/arch/pxa2xx_spi.h> 28#include <mach/pxa2xx_spi.h>
29 29
30#include <asm/setup.h> 30#include <asm/setup.h>
31#include <asm/memory.h> 31#include <asm/memory.h>
32#include <asm/mach-types.h> 32#include <asm/mach-types.h>
33#include <asm/hardware.h> 33#include <mach/hardware.h>
34#include <asm/irq.h> 34#include <asm/irq.h>
35#include <asm/sizes.h> 35#include <asm/sizes.h>
36 36
@@ -41,15 +41,15 @@
41 41
42#include <asm/hardware/sa1111.h> 42#include <asm/hardware/sa1111.h>
43 43
44#include <asm/arch/pxa-regs.h> 44#include <mach/pxa-regs.h>
45#include <asm/arch/pxa2xx-regs.h> 45#include <mach/pxa2xx-regs.h>
46#include <asm/arch/mfp-pxa25x.h> 46#include <mach/mfp-pxa25x.h>
47#include <asm/arch/audio.h> 47#include <mach/audio.h>
48#include <asm/arch/lubbock.h> 48#include <mach/lubbock.h>
49#include <asm/arch/udc.h> 49#include <mach/udc.h>
50#include <asm/arch/irda.h> 50#include <mach/irda.h>
51#include <asm/arch/pxafb.h> 51#include <mach/pxafb.h>
52#include <asm/arch/mmc.h> 52#include <mach/mmc.h>
53 53
54#include "generic.h" 54#include "generic.h"
55#include "devices.h" 55#include "devices.h"
@@ -224,7 +224,7 @@ static struct platform_device sa1111_device = {
224 * for the temperature sensors. 224 * for the temperature sensors.
225 */ 225 */
226static struct pxa2xx_spi_master pxa_ssp_master_info = { 226static struct pxa2xx_spi_master pxa_ssp_master_info = {
227 .num_chipselect = 0, 227 .num_chipselect = 1,
228}; 228};
229 229
230static int lubbock_ads7846_pendown_state(void) 230static int lubbock_ads7846_pendown_state(void)
diff --git a/arch/arm/mach-pxa/magician.c b/arch/arm/mach-pxa/magician.c
index c9d274f0048f..143f28adaf95 100644
--- a/arch/arm/mach-pxa/magician.c
+++ b/arch/arm/mach-pxa/magician.c
@@ -26,18 +26,18 @@
26#include <linux/pda_power.h> 26#include <linux/pda_power.h>
27#include <linux/pwm_backlight.h> 27#include <linux/pwm_backlight.h>
28 28
29#include <asm/hardware.h> 29#include <mach/hardware.h>
30#include <asm/mach-types.h> 30#include <asm/mach-types.h>
31#include <asm/mach/arch.h> 31#include <asm/mach/arch.h>
32#include <asm/arch/magician.h> 32#include <mach/magician.h>
33#include <asm/arch/mfp-pxa27x.h> 33#include <mach/mfp-pxa27x.h>
34#include <asm/arch/pxa-regs.h> 34#include <mach/pxa-regs.h>
35#include <asm/arch/pxa2xx-regs.h> 35#include <mach/pxa2xx-regs.h>
36#include <asm/arch/pxafb.h> 36#include <mach/pxafb.h>
37#include <asm/arch/i2c.h> 37#include <mach/i2c.h>
38#include <asm/arch/mmc.h> 38#include <mach/mmc.h>
39#include <asm/arch/irda.h> 39#include <mach/irda.h>
40#include <asm/arch/ohci.h> 40#include <mach/ohci.h>
41 41
42#include "devices.h" 42#include "devices.h"
43#include "generic.h" 43#include "generic.h"
diff --git a/arch/arm/mach-pxa/mainstone.c b/arch/arm/mach-pxa/mainstone.c
index c8e38b5ff1c4..d44af761564d 100644
--- a/arch/arm/mach-pxa/mainstone.c
+++ b/arch/arm/mach-pxa/mainstone.c
@@ -32,7 +32,7 @@
32#include <asm/setup.h> 32#include <asm/setup.h>
33#include <asm/memory.h> 33#include <asm/memory.h>
34#include <asm/mach-types.h> 34#include <asm/mach-types.h>
35#include <asm/hardware.h> 35#include <mach/hardware.h>
36#include <asm/irq.h> 36#include <asm/irq.h>
37#include <asm/sizes.h> 37#include <asm/sizes.h>
38 38
@@ -41,17 +41,17 @@
41#include <asm/mach/irq.h> 41#include <asm/mach/irq.h>
42#include <asm/mach/flash.h> 42#include <asm/mach/flash.h>
43 43
44#include <asm/arch/pxa-regs.h> 44#include <mach/pxa-regs.h>
45#include <asm/arch/pxa2xx-regs.h> 45#include <mach/pxa2xx-regs.h>
46#include <asm/arch/mfp-pxa27x.h> 46#include <mach/mfp-pxa27x.h>
47#include <asm/arch/mainstone.h> 47#include <mach/mainstone.h>
48#include <asm/arch/audio.h> 48#include <mach/audio.h>
49#include <asm/arch/pxafb.h> 49#include <mach/pxafb.h>
50#include <asm/arch/i2c.h> 50#include <mach/i2c.h>
51#include <asm/arch/mmc.h> 51#include <mach/mmc.h>
52#include <asm/arch/irda.h> 52#include <mach/irda.h>
53#include <asm/arch/ohci.h> 53#include <mach/ohci.h>
54#include <asm/arch/pxa27x_keypad.h> 54#include <mach/pxa27x_keypad.h>
55 55
56#include "generic.h" 56#include "generic.h"
57#include "devices.h" 57#include "devices.h"
diff --git a/arch/arm/mach-pxa/mfp-pxa2xx.c b/arch/arm/mach-pxa/mfp-pxa2xx.c
index fd4545eab803..925575f10acf 100644
--- a/arch/arm/mach-pxa/mfp-pxa2xx.c
+++ b/arch/arm/mach-pxa/mfp-pxa2xx.c
@@ -18,10 +18,10 @@
18#include <linux/init.h> 18#include <linux/init.h>
19#include <linux/sysdev.h> 19#include <linux/sysdev.h>
20 20
21#include <asm/arch/hardware.h> 21#include <mach/hardware.h>
22#include <asm/arch/pxa-regs.h> 22#include <mach/pxa-regs.h>
23#include <asm/arch/pxa2xx-regs.h> 23#include <mach/pxa2xx-regs.h>
24#include <asm/arch/mfp-pxa2xx.h> 24#include <mach/mfp-pxa2xx.h>
25 25
26#include "generic.h" 26#include "generic.h"
27 27
diff --git a/arch/arm/mach-pxa/mfp-pxa3xx.c b/arch/arm/mach-pxa/mfp-pxa3xx.c
index 3a5b0fcbaf1f..eb197a6e8e94 100644
--- a/arch/arm/mach-pxa/mfp-pxa3xx.c
+++ b/arch/arm/mach-pxa/mfp-pxa3xx.c
@@ -19,10 +19,10 @@
19#include <linux/io.h> 19#include <linux/io.h>
20#include <linux/sysdev.h> 20#include <linux/sysdev.h>
21 21
22#include <asm/hardware.h> 22#include <mach/hardware.h>
23#include <asm/arch/mfp.h> 23#include <mach/mfp.h>
24#include <asm/arch/mfp-pxa3xx.h> 24#include <mach/mfp-pxa3xx.h>
25#include <asm/arch/pxa3xx-regs.h> 25#include <mach/pxa3xx-regs.h>
26 26
27/* mfp_spin_lock is used to ensure that MFP register configuration 27/* mfp_spin_lock is used to ensure that MFP register configuration
28 * (most likely a read-modify-write operation) is atomic, and that 28 * (most likely a read-modify-write operation) is atomic, and that
diff --git a/arch/arm/mach-pxa/palmtx.c b/arch/arm/mach-pxa/palmtx.c
index 408657a24f8c..fe924a23debe 100644
--- a/arch/arm/mach-pxa/palmtx.c
+++ b/arch/arm/mach-pxa/palmtx.c
@@ -30,15 +30,15 @@
30#include <asm/mach/arch.h> 30#include <asm/mach/arch.h>
31#include <asm/mach/map.h> 31#include <asm/mach/map.h>
32 32
33#include <asm/arch/audio.h> 33#include <mach/audio.h>
34#include <asm/arch/palmtx.h> 34#include <mach/palmtx.h>
35#include <asm/arch/mmc.h> 35#include <mach/mmc.h>
36#include <asm/arch/pxafb.h> 36#include <mach/pxafb.h>
37#include <asm/arch/pxa-regs.h> 37#include <mach/pxa-regs.h>
38#include <asm/arch/mfp-pxa27x.h> 38#include <mach/mfp-pxa27x.h>
39#include <asm/arch/irda.h> 39#include <mach/irda.h>
40#include <asm/arch/pxa27x_keypad.h> 40#include <mach/pxa27x_keypad.h>
41#include <asm/arch/udc.h> 41#include <mach/udc.h>
42 42
43#include "generic.h" 43#include "generic.h"
44#include "devices.h" 44#include "devices.h"
diff --git a/arch/arm/mach-pxa/pcm027.c b/arch/arm/mach-pxa/pcm027.c
index 377f3be8ce57..730b9f6ede1d 100644
--- a/arch/arm/mach-pxa/pcm027.c
+++ b/arch/arm/mach-pxa/pcm027.c
@@ -29,12 +29,12 @@
29 29
30#include <asm/mach-types.h> 30#include <asm/mach-types.h>
31#include <asm/mach/arch.h> 31#include <asm/mach/arch.h>
32#include <asm/arch/hardware.h> 32#include <mach/hardware.h>
33#include <asm/arch/pxa-regs.h> 33#include <mach/pxa-regs.h>
34#include <asm/arch/pxa2xx-gpio.h> 34#include <mach/pxa2xx-gpio.h>
35#include <asm/arch/pxa2xx-regs.h> 35#include <mach/pxa2xx-regs.h>
36#include <asm/arch/pxa2xx_spi.h> 36#include <mach/pxa2xx_spi.h>
37#include <asm/arch/pcm027.h> 37#include <mach/pcm027.h>
38#include "generic.h" 38#include "generic.h"
39 39
40/* 40/*
diff --git a/arch/arm/mach-pxa/pcm990-baseboard.c b/arch/arm/mach-pxa/pcm990-baseboard.c
index 90056d56b210..420c9b3813f6 100644
--- a/arch/arm/mach-pxa/pcm990-baseboard.c
+++ b/arch/arm/mach-pxa/pcm990-baseboard.c
@@ -28,16 +28,16 @@
28#include <media/soc_camera.h> 28#include <media/soc_camera.h>
29 29
30#include <asm/gpio.h> 30#include <asm/gpio.h>
31#include <asm/arch/i2c.h> 31#include <mach/i2c.h>
32#include <asm/arch/camera.h> 32#include <mach/camera.h>
33#include <asm/mach/map.h> 33#include <asm/mach/map.h>
34#include <asm/arch/pxa-regs.h> 34#include <mach/pxa-regs.h>
35#include <asm/arch/audio.h> 35#include <mach/audio.h>
36#include <asm/arch/mmc.h> 36#include <mach/mmc.h>
37#include <asm/arch/ohci.h> 37#include <mach/ohci.h>
38#include <asm/arch/pcm990_baseboard.h> 38#include <mach/pcm990_baseboard.h>
39#include <asm/arch/pxafb.h> 39#include <mach/pxafb.h>
40#include <asm/arch/mfp-pxa27x.h> 40#include <mach/mfp-pxa27x.h>
41 41
42#include "devices.h" 42#include "devices.h"
43#include "generic.h" 43#include "generic.h"
diff --git a/arch/arm/mach-pxa/pm.c b/arch/arm/mach-pxa/pm.c
index 7d4debbdcca3..1b539e675579 100644
--- a/arch/arm/mach-pxa/pm.c
+++ b/arch/arm/mach-pxa/pm.c
@@ -16,12 +16,12 @@
16#include <linux/errno.h> 16#include <linux/errno.h>
17#include <linux/time.h> 17#include <linux/time.h>
18 18
19#include <asm/hardware.h> 19#include <mach/hardware.h>
20#include <asm/memory.h> 20#include <asm/memory.h>
21#include <asm/system.h> 21#include <asm/system.h>
22#include <asm/arch/pm.h> 22#include <mach/pm.h>
23#include <asm/arch/pxa-regs.h> 23#include <mach/pxa-regs.h>
24#include <asm/arch/lubbock.h> 24#include <mach/lubbock.h>
25#include <asm/mach/time.h> 25#include <asm/mach/time.h>
26 26
27struct pxa_cpu_pm_fns *pxa_cpu_pm_fns; 27struct pxa_cpu_pm_fns *pxa_cpu_pm_fns;
diff --git a/arch/arm/mach-pxa/poodle.c b/arch/arm/mach-pxa/poodle.c
index 39612cfa0b4d..055ec63d768c 100644
--- a/arch/arm/mach-pxa/poodle.c
+++ b/arch/arm/mach-pxa/poodle.c
@@ -21,7 +21,7 @@
21#include <linux/pm.h> 21#include <linux/pm.h>
22#include <linux/delay.h> 22#include <linux/delay.h>
23 23
24#include <asm/hardware.h> 24#include <mach/hardware.h>
25#include <asm/mach-types.h> 25#include <asm/mach-types.h>
26#include <asm/irq.h> 26#include <asm/irq.h>
27#include <asm/setup.h> 27#include <asm/setup.h>
@@ -31,16 +31,16 @@
31#include <asm/mach/map.h> 31#include <asm/mach/map.h>
32#include <asm/mach/irq.h> 32#include <asm/mach/irq.h>
33 33
34#include <asm/arch/pxa-regs.h> 34#include <mach/pxa-regs.h>
35#include <asm/arch/pxa2xx-regs.h> 35#include <mach/pxa2xx-regs.h>
36#include <asm/arch/pxa2xx-gpio.h> 36#include <mach/pxa2xx-gpio.h>
37#include <asm/arch/mmc.h> 37#include <mach/mmc.h>
38#include <asm/arch/udc.h> 38#include <mach/udc.h>
39#include <asm/arch/irda.h> 39#include <mach/irda.h>
40#include <asm/arch/poodle.h> 40#include <mach/poodle.h>
41#include <asm/arch/pxafb.h> 41#include <mach/pxafb.h>
42#include <asm/arch/sharpsl.h> 42#include <mach/sharpsl.h>
43#include <asm/arch/ssp.h> 43#include <mach/ssp.h>
44 44
45#include <asm/hardware/scoop.h> 45#include <asm/hardware/scoop.h>
46#include <asm/hardware/locomo.h> 46#include <asm/hardware/locomo.h>
diff --git a/arch/arm/mach-pxa/pwm.c b/arch/arm/mach-pxa/pwm.c
index ce28cd9fed16..316cd986da5c 100644
--- a/arch/arm/mach-pxa/pwm.c
+++ b/arch/arm/mach-pxa/pwm.c
@@ -20,7 +20,7 @@
20#include <linux/pwm.h> 20#include <linux/pwm.h>
21 21
22#include <asm/div64.h> 22#include <asm/div64.h>
23#include <asm/arch/pxa-regs.h> 23#include <mach/pxa-regs.h>
24 24
25/* PWM registers and bits definitions */ 25/* PWM registers and bits definitions */
26#define PWMCR (0x00) 26#define PWMCR (0x00)
diff --git a/arch/arm/mach-pxa/pxa25x.c b/arch/arm/mach-pxa/pxa25x.c
index c5b845b935bb..9e5d8a8c6424 100644
--- a/arch/arm/mach-pxa/pxa25x.c
+++ b/arch/arm/mach-pxa/pxa25x.c
@@ -23,13 +23,14 @@
23#include <linux/suspend.h> 23#include <linux/suspend.h>
24#include <linux/sysdev.h> 24#include <linux/sysdev.h>
25 25
26#include <asm/hardware.h> 26#include <mach/hardware.h>
27#include <asm/arch/irqs.h> 27#include <mach/irqs.h>
28#include <asm/arch/pxa-regs.h> 28#include <mach/pxa-regs.h>
29#include <asm/arch/pxa2xx-regs.h> 29#include <mach/pxa2xx-regs.h>
30#include <asm/arch/mfp-pxa25x.h> 30#include <mach/mfp-pxa25x.h>
31#include <asm/arch/pm.h> 31#include <mach/reset.h>
32#include <asm/arch/dma.h> 32#include <mach/pm.h>
33#include <mach/dma.h>
33 34
34#include "generic.h" 35#include "generic.h"
35#include "devices.h" 36#include "devices.h"
@@ -348,6 +349,9 @@ static int __init pxa25x_init(void)
348 clks_register(&pxa25x_hwuart_clk, 1); 349 clks_register(&pxa25x_hwuart_clk, 1);
349 350
350 if (cpu_is_pxa21x() || cpu_is_pxa25x()) { 351 if (cpu_is_pxa21x() || cpu_is_pxa25x()) {
352
353 reset_status = RCSR;
354
351 clks_register(pxa25x_clks, ARRAY_SIZE(pxa25x_clks)); 355 clks_register(pxa25x_clks, ARRAY_SIZE(pxa25x_clks));
352 356
353 if ((ret = pxa_init_dma(16))) 357 if ((ret = pxa_init_dma(16)))
diff --git a/arch/arm/mach-pxa/pxa27x.c b/arch/arm/mach-pxa/pxa27x.c
index d5d14ea33f27..f9f6a9c31f4b 100644
--- a/arch/arm/mach-pxa/pxa27x.c
+++ b/arch/arm/mach-pxa/pxa27x.c
@@ -18,16 +18,17 @@
18#include <linux/platform_device.h> 18#include <linux/platform_device.h>
19#include <linux/sysdev.h> 19#include <linux/sysdev.h>
20 20
21#include <asm/hardware.h> 21#include <mach/hardware.h>
22#include <asm/irq.h> 22#include <asm/irq.h>
23#include <asm/arch/irqs.h> 23#include <mach/irqs.h>
24#include <asm/arch/pxa-regs.h> 24#include <mach/pxa-regs.h>
25#include <asm/arch/pxa2xx-regs.h> 25#include <mach/pxa2xx-regs.h>
26#include <asm/arch/mfp-pxa27x.h> 26#include <mach/mfp-pxa27x.h>
27#include <asm/arch/ohci.h> 27#include <mach/reset.h>
28#include <asm/arch/pm.h> 28#include <mach/ohci.h>
29#include <asm/arch/dma.h> 29#include <mach/pm.h>
30#include <asm/arch/i2c.h> 30#include <mach/dma.h>
31#include <mach/i2c.h>
31 32
32#include "generic.h" 33#include "generic.h"
33#include "devices.h" 34#include "devices.h"
@@ -384,6 +385,9 @@ static int __init pxa27x_init(void)
384 int i, ret = 0; 385 int i, ret = 0;
385 386
386 if (cpu_is_pxa27x()) { 387 if (cpu_is_pxa27x()) {
388
389 reset_status = RCSR;
390
387 clks_register(pxa27x_clks, ARRAY_SIZE(pxa27x_clks)); 391 clks_register(pxa27x_clks, ARRAY_SIZE(pxa27x_clks));
388 392
389 if ((ret = pxa_init_dma(32))) 393 if ((ret = pxa_init_dma(32)))
diff --git a/arch/arm/mach-pxa/pxa2xx.c b/arch/arm/mach-pxa/pxa2xx.c
index d4f6415e8413..73d04d81c75a 100644
--- a/arch/arm/mach-pxa/pxa2xx.c
+++ b/arch/arm/mach-pxa/pxa2xx.c
@@ -14,9 +14,18 @@
14#include <linux/kernel.h> 14#include <linux/kernel.h>
15#include <linux/device.h> 15#include <linux/device.h>
16 16
17#include <asm/arch/mfp-pxa2xx.h> 17#include <mach/hardware.h>
18#include <asm/arch/mfp-pxa25x.h> 18#include <mach/pxa2xx-regs.h>
19#include <asm/arch/irda.h> 19#include <mach/mfp-pxa2xx.h>
20#include <mach/mfp-pxa25x.h>
21#include <mach/reset.h>
22#include <mach/irda.h>
23
24void pxa2xx_clear_reset_status(unsigned int mask)
25{
26 /* RESET_STATUS_* has a 1:1 mapping with RCSR */
27 RCSR = mask;
28}
20 29
21static unsigned long pxa2xx_mfp_fir[] = { 30static unsigned long pxa2xx_mfp_fir[] = {
22 GPIO46_FICP_RXD, 31 GPIO46_FICP_RXD,
diff --git a/arch/arm/mach-pxa/pxa300.c b/arch/arm/mach-pxa/pxa300.c
index da92e9733886..494fc1f032db 100644
--- a/arch/arm/mach-pxa/pxa300.c
+++ b/arch/arm/mach-pxa/pxa300.c
@@ -17,9 +17,9 @@
17#include <linux/kernel.h> 17#include <linux/kernel.h>
18#include <linux/platform_device.h> 18#include <linux/platform_device.h>
19 19
20#include <asm/hardware.h> 20#include <mach/hardware.h>
21#include <asm/arch/pxa3xx-regs.h> 21#include <mach/pxa3xx-regs.h>
22#include <asm/arch/mfp-pxa300.h> 22#include <mach/mfp-pxa300.h>
23 23
24#include "generic.h" 24#include "generic.h"
25#include "devices.h" 25#include "devices.h"
diff --git a/arch/arm/mach-pxa/pxa320.c b/arch/arm/mach-pxa/pxa320.c
index c557c23a1efe..016eb18f01a3 100644
--- a/arch/arm/mach-pxa/pxa320.c
+++ b/arch/arm/mach-pxa/pxa320.c
@@ -17,10 +17,10 @@
17#include <linux/kernel.h> 17#include <linux/kernel.h>
18#include <linux/platform_device.h> 18#include <linux/platform_device.h>
19 19
20#include <asm/hardware.h> 20#include <mach/hardware.h>
21#include <asm/arch/mfp.h> 21#include <mach/mfp.h>
22#include <asm/arch/pxa3xx-regs.h> 22#include <mach/pxa3xx-regs.h>
23#include <asm/arch/mfp-pxa320.h> 23#include <mach/mfp-pxa320.h>
24 24
25#include "generic.h" 25#include "generic.h"
26#include "devices.h" 26#include "devices.h"
diff --git a/arch/arm/mach-pxa/pxa3xx.c b/arch/arm/mach-pxa/pxa3xx.c
index f491025a0c82..03cbc38103ed 100644
--- a/arch/arm/mach-pxa/pxa3xx.c
+++ b/arch/arm/mach-pxa/pxa3xx.c
@@ -22,12 +22,13 @@
22#include <linux/io.h> 22#include <linux/io.h>
23#include <linux/sysdev.h> 23#include <linux/sysdev.h>
24 24
25#include <asm/hardware.h> 25#include <mach/hardware.h>
26#include <asm/arch/pxa3xx-regs.h> 26#include <mach/pxa3xx-regs.h>
27#include <asm/arch/ohci.h> 27#include <mach/reset.h>
28#include <asm/arch/pm.h> 28#include <mach/ohci.h>
29#include <asm/arch/dma.h> 29#include <mach/pm.h>
30#include <asm/arch/ssp.h> 30#include <mach/dma.h>
31#include <mach/ssp.h>
31 32
32#include "generic.h" 33#include "generic.h"
33#include "devices.h" 34#include "devices.h"
@@ -109,6 +110,12 @@ unsigned int pxa3xx_get_memclk_frequency_10khz(void)
109 return (clk / 10000); 110 return (clk / 10000);
110} 111}
111 112
113void pxa3xx_clear_reset_status(unsigned int mask)
114{
115 /* RESET_STATUS_* has a 1:1 mapping with ARSR */
116 ARSR = mask;
117}
118
112/* 119/*
113 * Return the current AC97 clock frequency. 120 * Return the current AC97 clock frequency.
114 */ 121 */
@@ -532,6 +539,9 @@ static int __init pxa3xx_init(void)
532 int i, ret = 0; 539 int i, ret = 0;
533 540
534 if (cpu_is_pxa3xx()) { 541 if (cpu_is_pxa3xx()) {
542
543 reset_status = ARSR;
544
535 /* 545 /*
536 * clear RDH bit every time after reset 546 * clear RDH bit every time after reset
537 * 547 *
diff --git a/arch/arm/mach-pxa/pxa930.c b/arch/arm/mach-pxa/pxa930.c
index 9503897d049c..13e6bfdfff60 100644
--- a/arch/arm/mach-pxa/pxa930.c
+++ b/arch/arm/mach-pxa/pxa930.c
@@ -16,8 +16,8 @@
16#include <linux/irq.h> 16#include <linux/irq.h>
17#include <linux/dma-mapping.h> 17#include <linux/dma-mapping.h>
18 18
19#include <asm/hardware.h> 19#include <mach/hardware.h>
20#include <asm/arch/mfp-pxa930.h> 20#include <mach/mfp-pxa930.h>
21 21
22static struct pxa3xx_mfp_addr_map pxa930_mfp_addr_map[] __initdata = { 22static struct pxa3xx_mfp_addr_map pxa930_mfp_addr_map[] __initdata = {
23 23
diff --git a/arch/arm/mach-pxa/reset.c b/arch/arm/mach-pxa/reset.c
index 9d39dea57ce2..9996c612c3d6 100644
--- a/arch/arm/mach-pxa/reset.c
+++ b/arch/arm/mach-pxa/reset.c
@@ -10,8 +10,11 @@
10#include <asm/io.h> 10#include <asm/io.h>
11#include <asm/proc-fns.h> 11#include <asm/proc-fns.h>
12 12
13#include <asm/arch/pxa-regs.h> 13#include <mach/pxa-regs.h>
14#include <asm/arch/pxa2xx-regs.h> 14#include <mach/reset.h>
15
16unsigned int reset_status;
17EXPORT_SYMBOL(reset_status);
15 18
16static void do_hw_reset(void); 19static void do_hw_reset(void);
17 20
@@ -77,8 +80,7 @@ static void do_hw_reset(void)
77 80
78void arch_reset(char mode) 81void arch_reset(char mode)
79{ 82{
80 if (cpu_is_pxa2xx()) 83 clear_reset_status(RESET_STATUS_ALL);
81 RCSR = RCSR_HWR | RCSR_WDR | RCSR_SMR | RCSR_GPR;
82 84
83 switch (mode) { 85 switch (mode) {
84 case 's': 86 case 's':
diff --git a/arch/arm/mach-pxa/saar.c b/arch/arm/mach-pxa/saar.c
index d02bc6f8bb93..e7ea91ce7f02 100644
--- a/arch/arm/mach-pxa/saar.c
+++ b/arch/arm/mach-pxa/saar.c
@@ -21,9 +21,9 @@
21 21
22#include <asm/mach-types.h> 22#include <asm/mach-types.h>
23#include <asm/mach/arch.h> 23#include <asm/mach/arch.h>
24#include <asm/hardware.h> 24#include <mach/hardware.h>
25#include <asm/arch/pxa3xx-regs.h> 25#include <mach/pxa3xx-regs.h>
26#include <asm/arch/mfp-pxa930.h> 26#include <mach/mfp-pxa930.h>
27 27
28#include "devices.h" 28#include "devices.h"
29#include "generic.h" 29#include "generic.h"
diff --git a/arch/arm/mach-pxa/sharpsl_pm.c b/arch/arm/mach-pxa/sharpsl_pm.c
index 23e9b9283301..e804ae09370c 100644
--- a/arch/arm/mach-pxa/sharpsl_pm.c
+++ b/arch/arm/mach-pxa/sharpsl_pm.c
@@ -22,12 +22,12 @@
22#include <linux/platform_device.h> 22#include <linux/platform_device.h>
23#include <linux/apm-emulation.h> 23#include <linux/apm-emulation.h>
24 24
25#include <asm/hardware.h> 25#include <mach/hardware.h>
26#include <asm/mach-types.h> 26#include <asm/mach-types.h>
27#include <asm/arch/pm.h> 27#include <mach/pm.h>
28#include <asm/arch/pxa-regs.h> 28#include <mach/pxa-regs.h>
29#include <asm/arch/pxa2xx-gpio.h> 29#include <mach/pxa2xx-gpio.h>
30#include <asm/arch/sharpsl.h> 30#include <mach/sharpsl.h>
31#include "sharpsl.h" 31#include "sharpsl.h"
32 32
33struct battery_thresh spitz_battery_levels_acin[] = { 33struct battery_thresh spitz_battery_levels_acin[] = {
diff --git a/arch/arm/mach-pxa/sleep.S b/arch/arm/mach-pxa/sleep.S
index 784716eb7fc5..a62c8375eb53 100644
--- a/arch/arm/mach-pxa/sleep.S
+++ b/arch/arm/mach-pxa/sleep.S
@@ -13,10 +13,10 @@
13 13
14#include <linux/linkage.h> 14#include <linux/linkage.h>
15#include <asm/assembler.h> 15#include <asm/assembler.h>
16#include <asm/hardware.h> 16#include <mach/hardware.h>
17 17
18#include <asm/arch/pxa-regs.h> 18#include <mach/pxa-regs.h>
19#include <asm/arch/pxa2xx-regs.h> 19#include <mach/pxa2xx-regs.h>
20 20
21#define MDREFR_KDIV 0x200a4000 // all banks 21#define MDREFR_KDIV 0x200a4000 // all banks
22#define CCCR_SLEEP 0x00000107 // L=7 2N=2 A=0 PPDIS=0 CPDIS=0 22#define CCCR_SLEEP 0x00000107 // L=7 2N=2 A=0 PPDIS=0 CPDIS=0
diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c
index 762249c03ded..cd39005c98ff 100644
--- a/arch/arm/mach-pxa/spitz.c
+++ b/arch/arm/mach-pxa/spitz.c
@@ -26,7 +26,7 @@
26#include <asm/setup.h> 26#include <asm/setup.h>
27#include <asm/memory.h> 27#include <asm/memory.h>
28#include <asm/mach-types.h> 28#include <asm/mach-types.h>
29#include <asm/hardware.h> 29#include <mach/hardware.h>
30#include <asm/irq.h> 30#include <asm/irq.h>
31#include <asm/io.h> 31#include <asm/io.h>
32#include <asm/system.h> 32#include <asm/system.h>
@@ -35,18 +35,19 @@
35#include <asm/mach/map.h> 35#include <asm/mach/map.h>
36#include <asm/mach/irq.h> 36#include <asm/mach/irq.h>
37 37
38#include <asm/arch/pxa-regs.h> 38#include <mach/pxa-regs.h>
39#include <asm/arch/pxa2xx-regs.h> 39#include <mach/pxa2xx-regs.h>
40#include <asm/arch/pxa2xx-gpio.h> 40#include <mach/pxa2xx-gpio.h>
41#include <asm/arch/pxa27x-udc.h> 41#include <mach/pxa27x-udc.h>
42#include <asm/arch/irda.h> 42#include <mach/reset.h>
43#include <asm/arch/mmc.h> 43#include <mach/irda.h>
44#include <asm/arch/ohci.h> 44#include <mach/mmc.h>
45#include <asm/arch/udc.h> 45#include <mach/ohci.h>
46#include <asm/arch/pxafb.h> 46#include <mach/udc.h>
47#include <asm/arch/akita.h> 47#include <mach/pxafb.h>
48#include <asm/arch/spitz.h> 48#include <mach/akita.h>
49#include <asm/arch/sharpsl.h> 49#include <mach/spitz.h>
50#include <mach/sharpsl.h>
50 51
51#include <asm/mach/sharpsl_param.h> 52#include <asm/mach/sharpsl_param.h>
52#include <asm/hardware/scoop.h> 53#include <asm/hardware/scoop.h>
diff --git a/arch/arm/mach-pxa/spitz_pm.c b/arch/arm/mach-pxa/spitz_pm.c
index 360354084ae4..8a40505dfd28 100644
--- a/arch/arm/mach-pxa/spitz_pm.c
+++ b/arch/arm/mach-pxa/spitz_pm.c
@@ -20,14 +20,14 @@
20 20
21#include <asm/irq.h> 21#include <asm/irq.h>
22#include <asm/mach-types.h> 22#include <asm/mach-types.h>
23#include <asm/hardware.h> 23#include <mach/hardware.h>
24#include <asm/hardware/scoop.h> 24#include <asm/hardware/scoop.h>
25 25
26#include <asm/arch/sharpsl.h> 26#include <mach/sharpsl.h>
27#include <asm/arch/spitz.h> 27#include <mach/spitz.h>
28#include <asm/arch/pxa-regs.h> 28#include <mach/pxa-regs.h>
29#include <asm/arch/pxa2xx-regs.h> 29#include <mach/pxa2xx-regs.h>
30#include <asm/arch/pxa2xx-gpio.h> 30#include <mach/pxa2xx-gpio.h>
31#include "sharpsl.h" 31#include "sharpsl.h"
32 32
33#define SHARPSL_CHARGE_ON_VOLT 0x99 /* 2.9V */ 33#define SHARPSL_CHARGE_ON_VOLT 0x99 /* 2.9V */
diff --git a/arch/arm/mach-pxa/ssp.c b/arch/arm/mach-pxa/ssp.c
index 89f38683787e..9bd93c5f28b2 100644
--- a/arch/arm/mach-pxa/ssp.c
+++ b/arch/arm/mach-pxa/ssp.c
@@ -31,10 +31,10 @@
31 31
32#include <asm/io.h> 32#include <asm/io.h>
33#include <asm/irq.h> 33#include <asm/irq.h>
34#include <asm/hardware.h> 34#include <mach/hardware.h>
35#include <asm/arch/ssp.h> 35#include <mach/ssp.h>
36#include <asm/arch/pxa-regs.h> 36#include <mach/pxa-regs.h>
37#include <asm/arch/regs-ssp.h> 37#include <mach/regs-ssp.h>
38 38
39#define TIMEOUT 100000 39#define TIMEOUT 100000
40 40
diff --git a/arch/arm/mach-pxa/standby.S b/arch/arm/mach-pxa/standby.S
index 40bb70eff3fe..f3821cfda72f 100644
--- a/arch/arm/mach-pxa/standby.S
+++ b/arch/arm/mach-pxa/standby.S
@@ -11,10 +11,10 @@
11 11
12#include <linux/linkage.h> 12#include <linux/linkage.h>
13#include <asm/assembler.h> 13#include <asm/assembler.h>
14#include <asm/hardware.h> 14#include <mach/hardware.h>
15 15
16#include <asm/arch/pxa-regs.h> 16#include <mach/pxa-regs.h>
17#include <asm/arch/pxa2xx-regs.h> 17#include <mach/pxa2xx-regs.h>
18 18
19 .text 19 .text
20 20
diff --git a/arch/arm/mach-pxa/tavorevb.c b/arch/arm/mach-pxa/tavorevb.c
index ac283507e423..589d32b4fc46 100644
--- a/arch/arm/mach-pxa/tavorevb.c
+++ b/arch/arm/mach-pxa/tavorevb.c
@@ -21,9 +21,9 @@
21 21
22#include <asm/mach-types.h> 22#include <asm/mach-types.h>
23#include <asm/mach/arch.h> 23#include <asm/mach/arch.h>
24#include <asm/hardware.h> 24#include <mach/hardware.h>
25#include <asm/arch/pxa3xx-regs.h> 25#include <mach/pxa3xx-regs.h>
26#include <asm/arch/mfp-pxa930.h> 26#include <mach/mfp-pxa930.h>
27 27
28#include "devices.h" 28#include "devices.h"
29#include "generic.h" 29#include "generic.h"
diff --git a/arch/arm/mach-pxa/time.c b/arch/arm/mach-pxa/time.c
index 7b7c0179795b..67e18509d7bf 100644
--- a/arch/arm/mach-pxa/time.c
+++ b/arch/arm/mach-pxa/time.c
@@ -22,7 +22,7 @@
22#include <asm/cnt32_to_63.h> 22#include <asm/cnt32_to_63.h>
23#include <asm/mach/irq.h> 23#include <asm/mach/irq.h>
24#include <asm/mach/time.h> 24#include <asm/mach/time.h>
25#include <asm/arch/pxa-regs.h> 25#include <mach/pxa-regs.h>
26#include <asm/mach-types.h> 26#include <asm/mach-types.h>
27 27
28/* 28/*
diff --git a/arch/arm/mach-pxa/tosa-bt.c b/arch/arm/mach-pxa/tosa-bt.c
index 7d8505466e54..fb0294bd4310 100644
--- a/arch/arm/mach-pxa/tosa-bt.c
+++ b/arch/arm/mach-pxa/tosa-bt.c
@@ -16,7 +16,7 @@
16#include <linux/delay.h> 16#include <linux/delay.h>
17#include <linux/rfkill.h> 17#include <linux/rfkill.h>
18 18
19#include <asm/arch/tosa_bt.h> 19#include <mach/tosa_bt.h>
20 20
21static void tosa_bt_on(struct tosa_bt_data *data) 21static void tosa_bt_on(struct tosa_bt_data *data)
22{ 22{
diff --git a/arch/arm/mach-pxa/tosa.c b/arch/arm/mach-pxa/tosa.c
index fea17ce6b55f..5dab30eafddc 100644
--- a/arch/arm/mach-pxa/tosa.c
+++ b/arch/arm/mach-pxa/tosa.c
@@ -34,16 +34,17 @@
34 34
35#include <asm/setup.h> 35#include <asm/setup.h>
36#include <asm/mach-types.h> 36#include <asm/mach-types.h>
37#include <asm/arch/pxa2xx-regs.h> 37#include <mach/pxa2xx-regs.h>
38#include <asm/arch/mfp-pxa25x.h> 38#include <mach/mfp-pxa25x.h>
39#include <asm/arch/irda.h> 39#include <mach/reset.h>
40#include <asm/arch/i2c.h> 40#include <mach/irda.h>
41#include <asm/arch/mmc.h> 41#include <mach/i2c.h>
42#include <asm/arch/udc.h> 42#include <mach/mmc.h>
43#include <asm/arch/tosa_bt.h> 43#include <mach/udc.h>
44#include <mach/tosa_bt.h>
44 45
45#include <asm/mach/arch.h> 46#include <asm/mach/arch.h>
46#include <asm/arch/tosa.h> 47#include <mach/tosa.h>
47 48
48#include <asm/hardware/scoop.h> 49#include <asm/hardware/scoop.h>
49#include <asm/mach/sharpsl_param.h> 50#include <asm/mach/sharpsl_param.h>
diff --git a/arch/arm/mach-pxa/trizeps4.c b/arch/arm/mach-pxa/trizeps4.c
index 12811b7aea07..3ed757e6bcc8 100644
--- a/arch/arm/mach-pxa/trizeps4.c
+++ b/arch/arm/mach-pxa/trizeps4.c
@@ -31,7 +31,7 @@
31#include <asm/setup.h> 31#include <asm/setup.h>
32#include <asm/memory.h> 32#include <asm/memory.h>
33#include <asm/mach-types.h> 33#include <asm/mach-types.h>
34#include <asm/hardware.h> 34#include <mach/hardware.h>
35#include <asm/irq.h> 35#include <asm/irq.h>
36#include <asm/sizes.h> 36#include <asm/sizes.h>
37 37
@@ -40,15 +40,15 @@
40#include <asm/mach/irq.h> 40#include <asm/mach/irq.h>
41#include <asm/mach/flash.h> 41#include <asm/mach/flash.h>
42 42
43#include <asm/arch/pxa-regs.h> 43#include <mach/pxa-regs.h>
44#include <asm/arch/pxa2xx-regs.h> 44#include <mach/pxa2xx-regs.h>
45#include <asm/arch/pxa2xx-gpio.h> 45#include <mach/pxa2xx-gpio.h>
46#include <asm/arch/trizeps4.h> 46#include <mach/trizeps4.h>
47#include <asm/arch/audio.h> 47#include <mach/audio.h>
48#include <asm/arch/pxafb.h> 48#include <mach/pxafb.h>
49#include <asm/arch/mmc.h> 49#include <mach/mmc.h>
50#include <asm/arch/irda.h> 50#include <mach/irda.h>
51#include <asm/arch/ohci.h> 51#include <mach/ohci.h>
52 52
53#include "generic.h" 53#include "generic.h"
54#include "devices.h" 54#include "devices.h"
diff --git a/arch/arm/mach-pxa/zylonite.c b/arch/arm/mach-pxa/zylonite.c
index 8fca6d890b7d..0cb65b5772fe 100644
--- a/arch/arm/mach-pxa/zylonite.c
+++ b/arch/arm/mach-pxa/zylonite.c
@@ -23,14 +23,14 @@
23 23
24#include <asm/mach-types.h> 24#include <asm/mach-types.h>
25#include <asm/mach/arch.h> 25#include <asm/mach/arch.h>
26#include <asm/hardware.h> 26#include <mach/hardware.h>
27#include <asm/arch/audio.h> 27#include <mach/audio.h>
28#include <asm/arch/gpio.h> 28#include <mach/gpio.h>
29#include <asm/arch/pxafb.h> 29#include <mach/pxafb.h>
30#include <asm/arch/zylonite.h> 30#include <mach/zylonite.h>
31#include <asm/arch/mmc.h> 31#include <mach/mmc.h>
32#include <asm/arch/pxa27x_keypad.h> 32#include <mach/pxa27x_keypad.h>
33#include <asm/arch/pxa3xx_nand.h> 33#include <mach/pxa3xx_nand.h>
34 34
35#include "devices.h" 35#include "devices.h"
36#include "generic.h" 36#include "generic.h"
diff --git a/arch/arm/mach-pxa/zylonite_pxa300.c b/arch/arm/mach-pxa/zylonite_pxa300.c
index b28d46e081d3..095f5c648236 100644
--- a/arch/arm/mach-pxa/zylonite_pxa300.c
+++ b/arch/arm/mach-pxa/zylonite_pxa300.c
@@ -20,9 +20,9 @@
20#include <linux/i2c/pca953x.h> 20#include <linux/i2c/pca953x.h>
21 21
22#include <asm/gpio.h> 22#include <asm/gpio.h>
23#include <asm/arch/mfp-pxa300.h> 23#include <mach/mfp-pxa300.h>
24#include <asm/arch/i2c.h> 24#include <mach/i2c.h>
25#include <asm/arch/zylonite.h> 25#include <mach/zylonite.h>
26 26
27#include "generic.h" 27#include "generic.h"
28 28
diff --git a/arch/arm/mach-pxa/zylonite_pxa320.c b/arch/arm/mach-pxa/zylonite_pxa320.c
index 2b7fba7a2921..9879d7da2df5 100644
--- a/arch/arm/mach-pxa/zylonite_pxa320.c
+++ b/arch/arm/mach-pxa/zylonite_pxa320.c
@@ -17,9 +17,9 @@
17#include <linux/kernel.h> 17#include <linux/kernel.h>
18#include <linux/init.h> 18#include <linux/init.h>
19 19
20#include <asm/arch/gpio.h> 20#include <mach/gpio.h>
21#include <asm/arch/mfp-pxa320.h> 21#include <mach/mfp-pxa320.h>
22#include <asm/arch/zylonite.h> 22#include <mach/zylonite.h>
23 23
24#include "generic.h" 24#include "generic.h"
25 25
diff --git a/arch/arm/mach-realview/core.c b/arch/arm/mach-realview/core.c
index 131990d196f5..4f9c84ab781c 100644
--- a/arch/arm/mach-realview/core.c
+++ b/arch/arm/mach-realview/core.c
@@ -29,7 +29,7 @@
29#include <linux/clockchips.h> 29#include <linux/clockchips.h>
30 30
31#include <asm/system.h> 31#include <asm/system.h>
32#include <asm/hardware.h> 32#include <mach/hardware.h>
33#include <asm/io.h> 33#include <asm/io.h>
34#include <asm/irq.h> 34#include <asm/irq.h>
35#include <asm/leds.h> 35#include <asm/leds.h>
diff --git a/arch/arm/mach-realview/include/mach/board-eb.h b/arch/arm/mach-realview/include/mach/board-eb.h
new file mode 100644
index 000000000000..8d699fd324d0
--- /dev/null
+++ b/arch/arm/mach-realview/include/mach/board-eb.h
@@ -0,0 +1,191 @@
1/*
2 * arch/arm/mach-realview/include/mach/board-eb.h
3 *
4 * Copyright (C) 2007 ARM Limited
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
18 * MA 02110-1301, USA.
19 */
20
21#ifndef __ASM_ARCH_BOARD_EB_H
22#define __ASM_ARCH_BOARD_EB_H
23
24#include <mach/platform.h>
25
26/*
27 * RealView EB + ARM11MPCore peripheral addresses
28 */
29#define REALVIEW_EB_UART0_BASE 0x10009000 /* UART 0 */
30#define REALVIEW_EB_UART1_BASE 0x1000A000 /* UART 1 */
31#define REALVIEW_EB_UART2_BASE 0x1000B000 /* UART 2 */
32#define REALVIEW_EB_UART3_BASE 0x1000C000 /* UART 3 */
33#define REALVIEW_EB_SSP_BASE 0x1000D000 /* Synchronous Serial Port */
34#define REALVIEW_EB_WATCHDOG_BASE 0x10010000 /* watchdog interface */
35#define REALVIEW_EB_TIMER0_1_BASE 0x10011000 /* Timer 0 and 1 */
36#define REALVIEW_EB_TIMER2_3_BASE 0x10012000 /* Timer 2 and 3 */
37#define REALVIEW_EB_GPIO0_BASE 0x10013000 /* GPIO port 0 */
38#define REALVIEW_EB_RTC_BASE 0x10017000 /* Real Time Clock */
39#define REALVIEW_EB_CLCD_BASE 0x10020000 /* CLCD */
40#define REALVIEW_EB_GIC_CPU_BASE 0x10040000 /* Generic interrupt controller CPU interface */
41#define REALVIEW_EB_GIC_DIST_BASE 0x10041000 /* Generic interrupt controller distributor */
42#define REALVIEW_EB_SMC_BASE 0x10080000 /* Static memory controller */
43
44#define REALVIEW_EB_FLASH_BASE 0x40000000
45#define REALVIEW_EB_FLASH_SIZE SZ_64M
46#define REALVIEW_EB_ETH_BASE 0x4E000000 /* Ethernet */
47#define REALVIEW_EB_USB_BASE 0x4F000000 /* USB */
48
49#ifdef CONFIG_REALVIEW_EB_ARM11MP_REVB
50#define REALVIEW_EB11MP_SCU_BASE 0x10100000 /* SCU registers */
51#define REALVIEW_EB11MP_GIC_CPU_BASE 0x10100100 /* Generic interrupt controller CPU interface */
52#define REALVIEW_EB11MP_TWD_BASE 0x10100700
53#define REALVIEW_EB11MP_TWD_SIZE 0x00000100
54#define REALVIEW_EB11MP_GIC_DIST_BASE 0x10101000 /* Generic interrupt controller distributor */
55#define REALVIEW_EB11MP_L220_BASE 0x10102000 /* L220 registers */
56#define REALVIEW_EB11MP_SYS_PLD_CTRL1 0xD8 /* Register offset for MPCore sysctl */
57#else
58#define REALVIEW_EB11MP_SCU_BASE 0x1F000000 /* SCU registers */
59#define REALVIEW_EB11MP_GIC_CPU_BASE 0x1F000100 /* Generic interrupt controller CPU interface */
60#define REALVIEW_EB11MP_TWD_BASE 0x1F000700
61#define REALVIEW_EB11MP_TWD_SIZE 0x00000100
62#define REALVIEW_EB11MP_GIC_DIST_BASE 0x1F001000 /* Generic interrupt controller distributor */
63#define REALVIEW_EB11MP_L220_BASE 0x1F002000 /* L220 registers */
64#define REALVIEW_EB11MP_SYS_PLD_CTRL1 0x74 /* Register offset for MPCore sysctl */
65#endif
66
67#define IRQ_EB_GIC_START 32
68
69/*
70 * RealView EB interrupt sources
71 */
72#define IRQ_EB_WDOG (IRQ_EB_GIC_START + 0) /* Watchdog timer */
73#define IRQ_EB_SOFT (IRQ_EB_GIC_START + 1) /* Software interrupt */
74#define IRQ_EB_COMMRx (IRQ_EB_GIC_START + 2) /* Debug Comm Rx interrupt */
75#define IRQ_EB_COMMTx (IRQ_EB_GIC_START + 3) /* Debug Comm Tx interrupt */
76#define IRQ_EB_TIMER0_1 (IRQ_EB_GIC_START + 4) /* Timer 0 and 1 */
77#define IRQ_EB_TIMER2_3 (IRQ_EB_GIC_START + 5) /* Timer 2 and 3 */
78#define IRQ_EB_GPIO0 (IRQ_EB_GIC_START + 6) /* GPIO 0 */
79#define IRQ_EB_GPIO1 (IRQ_EB_GIC_START + 7) /* GPIO 1 */
80#define IRQ_EB_GPIO2 (IRQ_EB_GIC_START + 8) /* GPIO 2 */
81 /* 9 reserved */
82#define IRQ_EB_RTC (IRQ_EB_GIC_START + 10) /* Real Time Clock */
83#define IRQ_EB_SSP (IRQ_EB_GIC_START + 11) /* Synchronous Serial Port */
84#define IRQ_EB_UART0 (IRQ_EB_GIC_START + 12) /* UART 0 on development chip */
85#define IRQ_EB_UART1 (IRQ_EB_GIC_START + 13) /* UART 1 on development chip */
86#define IRQ_EB_UART2 (IRQ_EB_GIC_START + 14) /* UART 2 on development chip */
87#define IRQ_EB_UART3 (IRQ_EB_GIC_START + 15) /* UART 3 on development chip */
88#define IRQ_EB_SCI (IRQ_EB_GIC_START + 16) /* Smart Card Interface */
89#define IRQ_EB_MMCI0A (IRQ_EB_GIC_START + 17) /* Multimedia Card 0A */
90#define IRQ_EB_MMCI0B (IRQ_EB_GIC_START + 18) /* Multimedia Card 0B */
91#define IRQ_EB_AACI (IRQ_EB_GIC_START + 19) /* Audio Codec */
92#define IRQ_EB_KMI0 (IRQ_EB_GIC_START + 20) /* Keyboard/Mouse port 0 */
93#define IRQ_EB_KMI1 (IRQ_EB_GIC_START + 21) /* Keyboard/Mouse port 1 */
94#define IRQ_EB_CHARLCD (IRQ_EB_GIC_START + 22) /* Character LCD */
95#define IRQ_EB_CLCD (IRQ_EB_GIC_START + 23) /* CLCD controller */
96#define IRQ_EB_DMA (IRQ_EB_GIC_START + 24) /* DMA controller */
97#define IRQ_EB_PWRFAIL (IRQ_EB_GIC_START + 25) /* Power failure */
98#define IRQ_EB_PISMO (IRQ_EB_GIC_START + 26) /* PISMO interface */
99#define IRQ_EB_DoC (IRQ_EB_GIC_START + 27) /* Disk on Chip memory controller */
100#define IRQ_EB_ETH (IRQ_EB_GIC_START + 28) /* Ethernet controller */
101#define IRQ_EB_USB (IRQ_EB_GIC_START + 29) /* USB controller */
102#define IRQ_EB_TSPEN (IRQ_EB_GIC_START + 30) /* Touchscreen pen */
103#define IRQ_EB_TSKPAD (IRQ_EB_GIC_START + 31) /* Touchscreen keypad */
104
105/*
106 * RealView EB + ARM11MPCore interrupt sources (primary GIC on the core tile)
107 */
108#define IRQ_EB11MP_AACI (IRQ_EB_GIC_START + 0)
109#define IRQ_EB11MP_TIMER0_1 (IRQ_EB_GIC_START + 1)
110#define IRQ_EB11MP_TIMER2_3 (IRQ_EB_GIC_START + 2)
111#define IRQ_EB11MP_USB (IRQ_EB_GIC_START + 3)
112#define IRQ_EB11MP_UART0 (IRQ_EB_GIC_START + 4)
113#define IRQ_EB11MP_UART1 (IRQ_EB_GIC_START + 5)
114#define IRQ_EB11MP_RTC (IRQ_EB_GIC_START + 6)
115#define IRQ_EB11MP_KMI0 (IRQ_EB_GIC_START + 7)
116#define IRQ_EB11MP_KMI1 (IRQ_EB_GIC_START + 8)
117#define IRQ_EB11MP_ETH (IRQ_EB_GIC_START + 9)
118#define IRQ_EB11MP_EB_IRQ1 (IRQ_EB_GIC_START + 10) /* main GIC */
119#define IRQ_EB11MP_EB_IRQ2 (IRQ_EB_GIC_START + 11) /* tile GIC */
120#define IRQ_EB11MP_EB_FIQ1 (IRQ_EB_GIC_START + 12) /* main GIC */
121#define IRQ_EB11MP_EB_FIQ2 (IRQ_EB_GIC_START + 13) /* tile GIC */
122#define IRQ_EB11MP_MMCI0A (IRQ_EB_GIC_START + 14)
123#define IRQ_EB11MP_MMCI0B (IRQ_EB_GIC_START + 15)
124
125#define IRQ_EB11MP_PMU_CPU0 (IRQ_EB_GIC_START + 17)
126#define IRQ_EB11MP_PMU_CPU1 (IRQ_EB_GIC_START + 18)
127#define IRQ_EB11MP_PMU_CPU2 (IRQ_EB_GIC_START + 19)
128#define IRQ_EB11MP_PMU_CPU3 (IRQ_EB_GIC_START + 20)
129#define IRQ_EB11MP_PMU_SCU0 (IRQ_EB_GIC_START + 21)
130#define IRQ_EB11MP_PMU_SCU1 (IRQ_EB_GIC_START + 22)
131#define IRQ_EB11MP_PMU_SCU2 (IRQ_EB_GIC_START + 23)
132#define IRQ_EB11MP_PMU_SCU3 (IRQ_EB_GIC_START + 24)
133#define IRQ_EB11MP_PMU_SCU4 (IRQ_EB_GIC_START + 25)
134#define IRQ_EB11MP_PMU_SCU5 (IRQ_EB_GIC_START + 26)
135#define IRQ_EB11MP_PMU_SCU6 (IRQ_EB_GIC_START + 27)
136#define IRQ_EB11MP_PMU_SCU7 (IRQ_EB_GIC_START + 28)
137
138#define IRQ_EB11MP_L220_EVENT (IRQ_EB_GIC_START + 29)
139#define IRQ_EB11MP_L220_SLAVE (IRQ_EB_GIC_START + 30)
140#define IRQ_EB11MP_L220_DECODE (IRQ_EB_GIC_START + 31)
141
142#define IRQ_EB11MP_UART2 -1
143#define IRQ_EB11MP_UART3 -1
144#define IRQ_EB11MP_CLCD -1
145#define IRQ_EB11MP_DMA -1
146#define IRQ_EB11MP_WDOG -1
147#define IRQ_EB11MP_GPIO0 -1
148#define IRQ_EB11MP_GPIO1 -1
149#define IRQ_EB11MP_GPIO2 -1
150#define IRQ_EB11MP_SCI -1
151#define IRQ_EB11MP_SSP -1
152
153#define NR_GIC_EB11MP 2
154
155/*
156 * Only define NR_IRQS if less than NR_IRQS_EB
157 */
158#define NR_IRQS_EB (IRQ_EB_GIC_START + 96)
159
160#if defined(CONFIG_MACH_REALVIEW_EB) \
161 && (!defined(NR_IRQS) || (NR_IRQS < NR_IRQS_EB))
162#undef NR_IRQS
163#define NR_IRQS NR_IRQS_EB
164#endif
165
166#if defined(CONFIG_REALVIEW_EB_ARM11MP) \
167 && (!defined(MAX_GIC_NR) || (MAX_GIC_NR < NR_GIC_EB11MP))
168#undef MAX_GIC_NR
169#define MAX_GIC_NR NR_GIC_EB11MP
170#endif
171
172/*
173 * Core tile identification (REALVIEW_SYS_PROCID)
174 */
175#define REALVIEW_EB_PROC_MASK 0xFF000000
176#define REALVIEW_EB_PROC_ARM7TDMI 0x00000000
177#define REALVIEW_EB_PROC_ARM9 0x02000000
178#define REALVIEW_EB_PROC_ARM11 0x04000000
179#define REALVIEW_EB_PROC_ARM11MP 0x06000000
180
181#define check_eb_proc(proc_type) \
182 ((readl(__io_address(REALVIEW_SYS_PROCID)) & REALVIEW_EB_PROC_MASK) \
183 == proc_type)
184
185#ifdef CONFIG_REALVIEW_EB_ARM11MP
186#define core_tile_eb11mp() check_eb_proc(REALVIEW_EB_PROC_ARM11MP)
187#else
188#define core_tile_eb11mp() 0
189#endif
190
191#endif /* __ASM_ARCH_BOARD_EB_H */
diff --git a/arch/arm/mach-realview/include/mach/board-pb1176.h b/arch/arm/mach-realview/include/mach/board-pb1176.h
new file mode 100644
index 000000000000..858eea7b1adc
--- /dev/null
+++ b/arch/arm/mach-realview/include/mach/board-pb1176.h
@@ -0,0 +1,152 @@
1/*
2 * arch/arm/mach-realview/include/mach/board-pb1176.h
3 *
4 * Copyright (C) 2008 ARM Limited
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
18 * MA 02110-1301, USA.
19 */
20
21#ifndef __ASM_ARCH_BOARD_PB1176_H
22#define __ASM_ARCH_BOARD_PB1176_H
23
24#include <mach/platform.h>
25
26/*
27 * Peripheral addresses
28 */
29#define REALVIEW_PB1176_SCTL_BASE 0x10100000 /* System controller */
30#define REALVIEW_PB1176_SMC_BASE 0x10111000 /* SMC */
31#define REALVIEW_PB1176_DMC_BASE 0x10109000 /* DMC configuration */
32#define REALVIEW_PB1176_SDRAM67_BASE 0x70000000 /* SDRAM banks 6 and 7 */
33#define REALVIEW_PB1176_FLASH_BASE 0x30000000
34#define REALVIEW_PB1176_FLASH_SIZE SZ_64M
35
36#define REALVIEW_PB1176_TIMER0_1_BASE 0x10104000 /* Timer 0 and 1 */
37#define REALVIEW_PB1176_TIMER2_3_BASE 0x10105000 /* Timer 2 and 3 */
38#define REALVIEW_PB1176_TIMER4_5_BASE 0x10106000 /* Timer 4 and 5 */
39#define REALVIEW_PB1176_WATCHDOG_BASE 0x10107000 /* watchdog interface */
40#define REALVIEW_PB1176_RTC_BASE 0x10108000 /* Real Time Clock */
41#define REALVIEW_PB1176_GPIO0_BASE 0x1010A000 /* GPIO port 0 */
42#define REALVIEW_PB1176_SSP_BASE 0x1010B000 /* Synchronous Serial Port */
43#define REALVIEW_PB1176_UART0_BASE 0x1010C000 /* UART 0 */
44#define REALVIEW_PB1176_UART1_BASE 0x1010D000 /* UART 1 */
45#define REALVIEW_PB1176_UART2_BASE 0x1010E000 /* UART 2 */
46#define REALVIEW_PB1176_UART3_BASE 0x1010F000 /* UART 3 */
47#define REALVIEW_PB1176_CLCD_BASE 0x10112000 /* CLCD */
48#define REALVIEW_PB1176_ETH_BASE 0x3A000000 /* Ethernet */
49#define REALVIEW_PB1176_USB_BASE 0x3B000000 /* USB */
50
51/*
52 * PCI regions
53 */
54#define REALVIEW_PB1176_PCI_BASE 0x60000000 /* PCI self config */
55#define REALVIEW_PB1176_PCI_CFG_BASE 0x61000000 /* PCI config */
56#define REALVIEW_PB1176_PCI_IO_BASE0 0x62000000 /* PCI IO region */
57#define REALVIEW_PB1176_PCI_MEM_BASE0 0x63000000 /* Memory region 1 */
58#define REALVIEW_PB1176_PCI_MEM_BASE1 0x64000000 /* Memory region 2 */
59#define REALVIEW_PB1176_PCI_MEM_BASE2 0x68000000 /* Memory region 3 */
60
61#define REALVIEW_PB1176_PCI_BASE_SIZE 0x01000000 /* 16MB */
62#define REALVIEW_PB1176_PCI_CFG_BASE_SIZE 0x01000000 /* 16MB */
63#define REALVIEW_PB1176_PCI_IO_BASE0_SIZE 0x01000000 /* 16MB */
64#define REALVIEW_PB1176_PCI_MEM_BASE0_SIZE 0x01000000 /* 16MB */
65#define REALVIEW_PB1176_PCI_MEM_BASE1_SIZE 0x04000000 /* 64MB */
66#define REALVIEW_PB1176_PCI_MEM_BASE2_SIZE 0x08000000 /* 128MB */
67
68#define REALVIEW_DC1176_GIC_CPU_BASE 0x10120000 /* GIC CPU interface, on devchip */
69#define REALVIEW_DC1176_GIC_DIST_BASE 0x10121000 /* GIC distributor, on devchip */
70#define REALVIEW_PB1176_GIC_CPU_BASE 0x10040000 /* GIC CPU interface, on FPGA */
71#define REALVIEW_PB1176_GIC_DIST_BASE 0x10041000 /* GIC distributor, on FPGA */
72#define REALVIEW_PB1176_L220_BASE 0x10110000 /* L220 registers */
73
74/*
75 * Irqs
76 */
77#define IRQ_DC1176_GIC_START 32
78#define IRQ_PB1176_GIC_START 64
79
80/*
81 * ARM1176 DevChip interrupt sources (primary GIC)
82 */
83#define IRQ_DC1176_WATCHDOG (IRQ_DC1176_GIC_START + 0) /* Watchdog timer */
84#define IRQ_DC1176_SOFTINT (IRQ_DC1176_GIC_START + 1) /* Software interrupt */
85#define IRQ_DC1176_COMMRx (IRQ_DC1176_GIC_START + 2) /* Debug Comm Rx interrupt */
86#define IRQ_DC1176_COMMTx (IRQ_DC1176_GIC_START + 3) /* Debug Comm Tx interrupt */
87#define IRQ_DC1176_TIMER0 (IRQ_DC1176_GIC_START + 8) /* Timer 0 */
88#define IRQ_DC1176_TIMER1 (IRQ_DC1176_GIC_START + 9) /* Timer 1 */
89#define IRQ_DC1176_TIMER2 (IRQ_DC1176_GIC_START + 10) /* Timer 2 */
90#define IRQ_DC1176_APC (IRQ_DC1176_GIC_START + 11)
91#define IRQ_DC1176_IEC (IRQ_DC1176_GIC_START + 12)
92#define IRQ_DC1176_L2CC (IRQ_DC1176_GIC_START + 13)
93#define IRQ_DC1176_RTC (IRQ_DC1176_GIC_START + 14)
94#define IRQ_DC1176_CLCD (IRQ_DC1176_GIC_START + 15) /* CLCD controller */
95#define IRQ_DC1176_UART0 (IRQ_DC1176_GIC_START + 18) /* UART 0 on development chip */
96#define IRQ_DC1176_UART1 (IRQ_DC1176_GIC_START + 19) /* UART 1 on development chip */
97#define IRQ_DC1176_UART2 (IRQ_DC1176_GIC_START + 20) /* UART 2 on development chip */
98#define IRQ_DC1176_UART3 (IRQ_DC1176_GIC_START + 21) /* UART 3 on development chip */
99
100#define IRQ_DC1176_PB_IRQ2 (IRQ_DC1176_GIC_START + 30) /* tile GIC */
101#define IRQ_DC1176_PB_IRQ1 (IRQ_DC1176_GIC_START + 31) /* main GIC */
102
103/*
104 * RealView PB1176 interrupt sources (secondary GIC)
105 */
106#define IRQ_PB1176_MMCI0A (IRQ_PB1176_GIC_START + 1) /* Multimedia Card 0A */
107#define IRQ_PB1176_MMCI0B (IRQ_PB1176_GIC_START + 2) /* Multimedia Card 0A */
108#define IRQ_PB1176_KMI0 (IRQ_PB1176_GIC_START + 3) /* Keyboard/Mouse port 0 */
109#define IRQ_PB1176_KMI1 (IRQ_PB1176_GIC_START + 4) /* Keyboard/Mouse port 1 */
110#define IRQ_PB1176_SCI (IRQ_PB1176_GIC_START + 5)
111#define IRQ_PB1176_UART4 (IRQ_PB1176_GIC_START + 6) /* UART 4 on baseboard */
112#define IRQ_PB1176_CHARLCD (IRQ_PB1176_GIC_START + 7) /* Character LCD */
113#define IRQ_PB1176_GPIO1 (IRQ_PB1176_GIC_START + 8)
114#define IRQ_PB1176_GPIO2 (IRQ_PB1176_GIC_START + 9)
115#define IRQ_PB1176_ETH (IRQ_PB1176_GIC_START + 10) /* Ethernet controller */
116#define IRQ_PB1176_USB (IRQ_PB1176_GIC_START + 11) /* USB controller */
117
118#define IRQ_PB1176_PISMO (IRQ_PB1176_GIC_START + 16)
119
120#define IRQ_PB1176_AACI (IRQ_PB1176_GIC_START + 19) /* Audio Codec */
121
122#define IRQ_PB1176_TIMER0_1 (IRQ_PB1176_GIC_START + 22)
123#define IRQ_PB1176_TIMER2_3 (IRQ_PB1176_GIC_START + 23)
124#define IRQ_PB1176_DMAC (IRQ_PB1176_GIC_START + 24) /* DMA controller */
125#define IRQ_PB1176_RTC (IRQ_PB1176_GIC_START + 25) /* Real Time Clock */
126
127#define IRQ_PB1176_GPIO0 -1
128#define IRQ_PB1176_SSP -1
129#define IRQ_PB1176_SCTL -1
130
131#define NR_GIC_PB1176 2
132
133/*
134 * Only define NR_IRQS if less than NR_IRQS_PB1176
135 */
136#define NR_IRQS_PB1176 (IRQ_DC1176_GIC_START + 96)
137
138#if defined(CONFIG_MACH_REALVIEW_PB1176)
139
140#if !defined(NR_IRQS) || (NR_IRQS < NR_IRQS_PB1176)
141#undef NR_IRQS
142#define NR_IRQS NR_IRQS_PB1176
143#endif
144
145#if !defined(MAX_GIC_NR) || (MAX_GIC_NR < NR_GIC_PB1176)
146#undef MAX_GIC_NR
147#define MAX_GIC_NR NR_GIC_PB1176
148#endif
149
150#endif /* CONFIG_MACH_REALVIEW_PB1176 */
151
152#endif /* __ASM_ARCH_BOARD_PB1176_H */
diff --git a/arch/arm/mach-realview/include/mach/board-pb11mp.h b/arch/arm/mach-realview/include/mach/board-pb11mp.h
new file mode 100644
index 000000000000..ecd80e58631e
--- /dev/null
+++ b/arch/arm/mach-realview/include/mach/board-pb11mp.h
@@ -0,0 +1,186 @@
1/*
2 * arch/arm/mach-realview/include/mach/board-pb11mp.h
3 *
4 * Copyright (C) 2008 ARM Limited
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
18 * MA 02110-1301, USA.
19 */
20
21#ifndef __ASM_ARCH_BOARD_PB11MP_H
22#define __ASM_ARCH_BOARD_PB11MP_H
23
24#include <mach/platform.h>
25
26/*
27 * Peripheral addresses
28 */
29#define REALVIEW_PB11MP_UART0_BASE 0x10009000 /* UART 0 */
30#define REALVIEW_PB11MP_UART1_BASE 0x1000A000 /* UART 1 */
31#define REALVIEW_PB11MP_UART2_BASE 0x1000B000 /* UART 2 */
32#define REALVIEW_PB11MP_UART3_BASE 0x1000C000 /* UART 3 */
33#define REALVIEW_PB11MP_SSP_BASE 0x1000D000 /* Synchronous Serial Port */
34#define REALVIEW_PB11MP_WATCHDOG0_BASE 0x1000F000 /* Watchdog 0 */
35#define REALVIEW_PB11MP_WATCHDOG_BASE 0x10010000 /* watchdog interface */
36#define REALVIEW_PB11MP_TIMER0_1_BASE 0x10011000 /* Timer 0 and 1 */
37#define REALVIEW_PB11MP_TIMER2_3_BASE 0x10012000 /* Timer 2 and 3 */
38#define REALVIEW_PB11MP_GPIO0_BASE 0x10013000 /* GPIO port 0 */
39#define REALVIEW_PB11MP_RTC_BASE 0x10017000 /* Real Time Clock */
40#define REALVIEW_PB11MP_TIMER4_5_BASE 0x10018000 /* Timer 4/5 */
41#define REALVIEW_PB11MP_TIMER6_7_BASE 0x10019000 /* Timer 6/7 */
42#define REALVIEW_PB11MP_SCTL_BASE 0x1001A000 /* System Controller */
43#define REALVIEW_PB11MP_CLCD_BASE 0x10020000 /* CLCD */
44#define REALVIEW_PB11MP_ONB_SRAM_BASE 0x10060000 /* On-board SRAM */
45#define REALVIEW_PB11MP_DMC_BASE 0x100E0000 /* DMC configuration */
46#define REALVIEW_PB11MP_SMC_BASE 0x100E1000 /* SMC configuration */
47#define REALVIEW_PB11MP_CAN_BASE 0x100E2000 /* CAN bus */
48#define REALVIEW_PB11MP_CF_BASE 0x18000000 /* Compact flash */
49#define REALVIEW_PB11MP_CF_MEM_BASE 0x18003000 /* SMC for Compact flash */
50#define REALVIEW_PB11MP_GIC_CPU_BASE 0x1E000000 /* Generic interrupt controller CPU interface */
51#define REALVIEW_PB11MP_FLASH0_BASE 0x40000000
52#define REALVIEW_PB11MP_FLASH0_SIZE SZ_64M
53#define REALVIEW_PB11MP_FLASH1_BASE 0x44000000
54#define REALVIEW_PB11MP_FLASH1_SIZE SZ_64M
55#define REALVIEW_PB11MP_ETH_BASE 0x4E000000 /* Ethernet */
56#define REALVIEW_PB11MP_USB_BASE 0x4F000000 /* USB */
57#define REALVIEW_PB11MP_GIC_DIST_BASE 0x1E001000 /* Generic interrupt controller distributor */
58#define REALVIEW_PB11MP_LT_BASE 0xC0000000 /* Logic Tile expansion */
59#define REALVIEW_PB11MP_SDRAM6_BASE 0x70000000 /* SDRAM bank 6 256MB */
60#define REALVIEW_PB11MP_SDRAM7_BASE 0x80000000 /* SDRAM bank 7 256MB */
61
62#define REALVIEW_PB11MP_SYS_PLD_CTRL1 0x74
63
64/*
65 * PB11MPCore PCI regions
66 */
67#define REALVIEW_PB11MP_PCI_BASE 0x90040000 /* PCI-X Unit base */
68#define REALVIEW_PB11MP_PCI_IO_BASE 0x90050000 /* IO Region on AHB */
69#define REALVIEW_PB11MP_PCI_MEM_BASE 0xA0000000 /* MEM Region on AHB */
70
71#define REALVIEW_PB11MP_PCI_BASE_SIZE 0x10000 /* 16 Kb */
72#define REALVIEW_PB11MP_PCI_IO_SIZE 0x1000 /* 4 Kb */
73#define REALVIEW_PB11MP_PCI_MEM_SIZE 0x20000000 /* 512 MB */
74
75/*
76 * Testchip peripheral and fpga gic regions
77 */
78#define REALVIEW_TC11MP_SCU_BASE 0x1F000000 /* IRQ, Test chip */
79#define REALVIEW_TC11MP_GIC_CPU_BASE 0x1F000100 /* Test chip interrupt controller CPU interface */
80#define REALVIEW_TC11MP_TWD_BASE 0x1F000700
81#define REALVIEW_TC11MP_TWD_SIZE 0x00000100
82#define REALVIEW_TC11MP_GIC_DIST_BASE 0x1F001000 /* Test chip interrupt controller distributor */
83#define REALVIEW_TC11MP_L220_BASE 0x1F002000 /* L220 registers */
84
85/*
86 * Irqs
87 */
88#define IRQ_TC11MP_GIC_START 32
89#define IRQ_PB11MP_GIC_START 64
90
91/*
92 * ARM11MPCore test chip interrupt sources (primary GIC on the test chip)
93 */
94#define IRQ_TC11MP_AACI (IRQ_TC11MP_GIC_START + 0)
95#define IRQ_TC11MP_TIMER0_1 (IRQ_TC11MP_GIC_START + 1)
96#define IRQ_TC11MP_TIMER2_3 (IRQ_TC11MP_GIC_START + 2)
97#define IRQ_TC11MP_USB (IRQ_TC11MP_GIC_START + 3)
98#define IRQ_TC11MP_UART0 (IRQ_TC11MP_GIC_START + 4)
99#define IRQ_TC11MP_UART1 (IRQ_TC11MP_GIC_START + 5)
100#define IRQ_TC11MP_RTC (IRQ_TC11MP_GIC_START + 6)
101#define IRQ_TC11MP_KMI0 (IRQ_TC11MP_GIC_START + 7)
102#define IRQ_TC11MP_KMI1 (IRQ_TC11MP_GIC_START + 8)
103#define IRQ_TC11MP_ETH (IRQ_TC11MP_GIC_START + 9)
104#define IRQ_TC11MP_PB_IRQ1 (IRQ_TC11MP_GIC_START + 10) /* main GIC */
105#define IRQ_TC11MP_PB_IRQ2 (IRQ_TC11MP_GIC_START + 11) /* tile GIC */
106#define IRQ_TC11MP_PB_FIQ1 (IRQ_TC11MP_GIC_START + 12) /* main GIC */
107#define IRQ_TC11MP_PB_FIQ2 (IRQ_TC11MP_GIC_START + 13) /* tile GIC */
108#define IRQ_TC11MP_MMCI0A (IRQ_TC11MP_GIC_START + 14)
109#define IRQ_TC11MP_MMCI0B (IRQ_TC11MP_GIC_START + 15)
110
111#define IRQ_TC11MP_PMU_CPU0 (IRQ_TC11MP_GIC_START + 17)
112#define IRQ_TC11MP_PMU_CPU1 (IRQ_TC11MP_GIC_START + 18)
113#define IRQ_TC11MP_PMU_CPU2 (IRQ_TC11MP_GIC_START + 19)
114#define IRQ_TC11MP_PMU_CPU3 (IRQ_TC11MP_GIC_START + 20)
115#define IRQ_TC11MP_PMU_SCU0 (IRQ_TC11MP_GIC_START + 21)
116#define IRQ_TC11MP_PMU_SCU1 (IRQ_TC11MP_GIC_START + 22)
117#define IRQ_TC11MP_PMU_SCU2 (IRQ_TC11MP_GIC_START + 23)
118#define IRQ_TC11MP_PMU_SCU3 (IRQ_TC11MP_GIC_START + 24)
119#define IRQ_TC11MP_PMU_SCU4 (IRQ_TC11MP_GIC_START + 25)
120#define IRQ_TC11MP_PMU_SCU5 (IRQ_TC11MP_GIC_START + 26)
121#define IRQ_TC11MP_PMU_SCU6 (IRQ_TC11MP_GIC_START + 27)
122#define IRQ_TC11MP_PMU_SCU7 (IRQ_TC11MP_GIC_START + 28)
123
124#define IRQ_TC11MP_L220_EVENT (IRQ_TC11MP_GIC_START + 29)
125#define IRQ_TC11MP_L220_SLAVE (IRQ_TC11MP_GIC_START + 30)
126#define IRQ_TC11MP_L220_DECODE (IRQ_TC11MP_GIC_START + 31)
127
128/*
129 * RealView PB11MPCore GIC interrupt sources (secondary GIC on the board)
130 */
131#define IRQ_PB11MP_WATCHDOG (IRQ_PB11MP_GIC_START + 0) /* Watchdog timer */
132#define IRQ_PB11MP_SOFT (IRQ_PB11MP_GIC_START + 1) /* Software interrupt */
133#define IRQ_PB11MP_COMMRx (IRQ_PB11MP_GIC_START + 2) /* Debug Comm Rx interrupt */
134#define IRQ_PB11MP_COMMTx (IRQ_PB11MP_GIC_START + 3) /* Debug Comm Tx interrupt */
135#define IRQ_PB11MP_GPIO0 (IRQ_PB11MP_GIC_START + 6) /* GPIO 0 */
136#define IRQ_PB11MP_GPIO1 (IRQ_PB11MP_GIC_START + 7) /* GPIO 1 */
137#define IRQ_PB11MP_GPIO2 (IRQ_PB11MP_GIC_START + 8) /* GPIO 2 */
138 /* 9 reserved */
139#define IRQ_PB11MP_RTC_GIC1 (IRQ_PB11MP_GIC_START + 10) /* Real Time Clock */
140#define IRQ_PB11MP_SSP (IRQ_PB11MP_GIC_START + 11) /* Synchronous Serial Port */
141#define IRQ_PB11MP_UART0_GIC1 (IRQ_PB11MP_GIC_START + 12) /* UART 0 on development chip */
142#define IRQ_PB11MP_UART1_GIC1 (IRQ_PB11MP_GIC_START + 13) /* UART 1 on development chip */
143#define IRQ_PB11MP_UART2 (IRQ_PB11MP_GIC_START + 14) /* UART 2 on development chip */
144#define IRQ_PB11MP_UART3 (IRQ_PB11MP_GIC_START + 15) /* UART 3 on development chip */
145#define IRQ_PB11MP_SCI (IRQ_PB11MP_GIC_START + 16) /* Smart Card Interface */
146#define IRQ_PB11MP_MMCI0A_GIC1 (IRQ_PB11MP_GIC_START + 17) /* Multimedia Card 0A */
147#define IRQ_PB11MP_MMCI0B_GIC1 (IRQ_PB11MP_GIC_START + 18) /* Multimedia Card 0B */
148#define IRQ_PB11MP_AACI_GIC1 (IRQ_PB11MP_GIC_START + 19) /* Audio Codec */
149#define IRQ_PB11MP_KMI0_GIC1 (IRQ_PB11MP_GIC_START + 20) /* Keyboard/Mouse port 0 */
150#define IRQ_PB11MP_KMI1_GIC1 (IRQ_PB11MP_GIC_START + 21) /* Keyboard/Mouse port 1 */
151#define IRQ_PB11MP_CHARLCD (IRQ_PB11MP_GIC_START + 22) /* Character LCD */
152#define IRQ_PB11MP_CLCD (IRQ_PB11MP_GIC_START + 23) /* CLCD controller */
153#define IRQ_PB11MP_DMAC (IRQ_PB11MP_GIC_START + 24) /* DMA controller */
154#define IRQ_PB11MP_PWRFAIL (IRQ_PB11MP_GIC_START + 25) /* Power failure */
155#define IRQ_PB11MP_PISMO (IRQ_PB11MP_GIC_START + 26) /* PISMO interface */
156#define IRQ_PB11MP_DoC (IRQ_PB11MP_GIC_START + 27) /* Disk on Chip memory controller */
157#define IRQ_PB11MP_ETH_GIC1 (IRQ_PB11MP_GIC_START + 28) /* Ethernet controller */
158#define IRQ_PB11MP_USB_GIC1 (IRQ_PB11MP_GIC_START + 29) /* USB controller */
159#define IRQ_PB11MP_TSPEN (IRQ_PB11MP_GIC_START + 30) /* Touchscreen pen */
160#define IRQ_PB11MP_TSKPAD (IRQ_PB11MP_GIC_START + 31) /* Touchscreen keypad */
161
162#define IRQ_PB11MP_SMC -1
163#define IRQ_PB11MP_SCTL -1
164
165#define NR_GIC_PB11MP 2
166
167/*
168 * Only define NR_IRQS if less than NR_IRQS_PB11MP
169 */
170#define NR_IRQS_PB11MP (IRQ_TC11MP_GIC_START + 96)
171
172#if defined(CONFIG_MACH_REALVIEW_PB11MP)
173
174#if !defined(NR_IRQS) || (NR_IRQS < NR_IRQS_PB11MP)
175#undef NR_IRQS
176#define NR_IRQS NR_IRQS_PB11MP
177#endif
178
179#if !defined(MAX_GIC_NR) || (MAX_GIC_NR < NR_GIC_PB11MP)
180#undef MAX_GIC_NR
181#define MAX_GIC_NR NR_GIC_PB11MP
182#endif
183
184#endif /* CONFIG_MACH_REALVIEW_PB11MP */
185
186#endif /* __ASM_ARCH_BOARD_PB11MP_H */
diff --git a/arch/arm/mach-realview/include/mach/debug-macro.S b/arch/arm/mach-realview/include/mach/debug-macro.S
new file mode 100644
index 000000000000..7196bcadff0c
--- /dev/null
+++ b/arch/arm/mach-realview/include/mach/debug-macro.S
@@ -0,0 +1,22 @@
1/* arch/arm/mach-realview/include/mach/debug-macro.S
2 *
3 * Debugging macro include header
4 *
5 * Copyright (C) 1994-1999 Russell King
6 * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 *
12*/
13
14 .macro addruart,rx
15 mrc p15, 0, \rx, c1, c0
16 tst \rx, #1 @ MMU enabled?
17 moveq \rx, #0x10000000
18 movne \rx, #0xf0000000 @ virtual base
19 orr \rx, \rx, #0x00009000
20 .endm
21
22#include <asm/hardware/debug-pl01x.S>
diff --git a/arch/arm/mach-realview/include/mach/dma.h b/arch/arm/mach-realview/include/mach/dma.h
new file mode 100644
index 000000000000..f1a5a1a10952
--- /dev/null
+++ b/arch/arm/mach-realview/include/mach/dma.h
@@ -0,0 +1,20 @@
1/*
2 * arch/arm/mach-realview/include/mach/dma.h
3 *
4 * Copyright (C) 2003 ARM Limited.
5 * Copyright (C) 1997,1998 Russell King
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
diff --git a/arch/arm/mach-realview/include/mach/entry-macro.S b/arch/arm/mach-realview/include/mach/entry-macro.S
new file mode 100644
index 000000000000..340a5c276946
--- /dev/null
+++ b/arch/arm/mach-realview/include/mach/entry-macro.S
@@ -0,0 +1,81 @@
1/*
2 * arch/arm/mach-realview/include/mach/entry-macro.S
3 *
4 * Low-level IRQ helper macros for RealView platforms
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10#include <mach/hardware.h>
11#include <asm/hardware/gic.h>
12
13 .macro disable_fiq
14 .endm
15
16 .macro get_irqnr_preamble, base, tmp
17 ldr \base, =gic_cpu_base_addr
18 ldr \base, [\base]
19 .endm
20
21 .macro arch_ret_to_user, tmp1, tmp2
22 .endm
23
24 /*
25 * The interrupt numbering scheme is defined in the
26 * interrupt controller spec. To wit:
27 *
28 * Interrupts 0-15 are IPI
29 * 16-28 are reserved
30 * 29-31 are local. We allow 30 to be used for the watchdog.
31 * 32-1020 are global
32 * 1021-1022 are reserved
33 * 1023 is "spurious" (no interrupt)
34 *
35 * For now, we ignore all local interrupts so only return an interrupt if it's
36 * between 30 and 1020. The test_for_ipi routine below will pick up on IPIs.
37 *
38 * A simple read from the controller will tell us the number of the highest
39 * priority enabled interrupt. We then just need to check whether it is in the
40 * valid range for an IRQ (30-1020 inclusive).
41 */
42
43 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
44
45 ldr \irqstat, [\base, #GIC_CPU_INTACK] /* bits 12-10 = src CPU, 9-0 = int # */
46
47 ldr \tmp, =1021
48
49 bic \irqnr, \irqstat, #0x1c00
50
51 cmp \irqnr, #29
52 cmpcc \irqnr, \irqnr
53 cmpne \irqnr, \tmp
54 cmpcs \irqnr, \irqnr
55
56 .endm
57
58 /* We assume that irqstat (the raw value of the IRQ acknowledge
59 * register) is preserved from the macro above.
60 * If there is an IPI, we immediately signal end of interrupt on the
61 * controller, since this requires the original irqstat value which
62 * we won't easily be able to recreate later.
63 */
64
65 .macro test_for_ipi, irqnr, irqstat, base, tmp
66 bic \irqnr, \irqstat, #0x1c00
67 cmp \irqnr, #16
68 strcc \irqstat, [\base, #GIC_CPU_EOI]
69 cmpcs \irqnr, \irqnr
70 .endm
71
72 /* As above, this assumes that irqstat and base are preserved.. */
73
74 .macro test_for_ltirq, irqnr, irqstat, base, tmp
75 bic \irqnr, \irqstat, #0x1c00
76 mov \tmp, #0
77 cmp \irqnr, #29
78 moveq \tmp, #1
79 streq \irqstat, [\base, #GIC_CPU_EOI]
80 cmp \tmp, #0
81 .endm
diff --git a/arch/arm/mach-realview/include/mach/hardware.h b/arch/arm/mach-realview/include/mach/hardware.h
new file mode 100644
index 000000000000..79a93b3dfca9
--- /dev/null
+++ b/arch/arm/mach-realview/include/mach/hardware.h
@@ -0,0 +1,31 @@
1/*
2 * arch/arm/mach-realview/include/mach/hardware.h
3 *
4 * This file contains the hardware definitions of the RealView boards.
5 *
6 * Copyright (C) 2003 ARM Limited.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 */
22#ifndef __ASM_ARCH_HARDWARE_H
23#define __ASM_ARCH_HARDWARE_H
24
25#include <asm/sizes.h>
26
27/* macro to get at IO space when running virtually */
28#define IO_ADDRESS(x) (((x) & 0x0fffffff) + 0xf0000000)
29#define __io_address(n) __io(IO_ADDRESS(n))
30
31#endif
diff --git a/arch/arm/mach-realview/include/mach/io.h b/arch/arm/mach-realview/include/mach/io.h
new file mode 100644
index 000000000000..aa069424d310
--- /dev/null
+++ b/arch/arm/mach-realview/include/mach/io.h
@@ -0,0 +1,33 @@
1/*
2 * arch/arm/mach-realview/include/mach/io.h
3 *
4 * Copyright (C) 2003 ARM Limited
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20#ifndef __ASM_ARM_ARCH_IO_H
21#define __ASM_ARM_ARCH_IO_H
22
23#define IO_SPACE_LIMIT 0xffffffff
24
25static inline void __iomem *__io(unsigned long addr)
26{
27 return (void __iomem *)addr;
28}
29
30#define __io(a) __io(a)
31#define __mem_pci(a) (a)
32
33#endif
diff --git a/arch/arm/mach-realview/include/mach/irqs.h b/arch/arm/mach-realview/include/mach/irqs.h
new file mode 100644
index 000000000000..02a918529db3
--- /dev/null
+++ b/arch/arm/mach-realview/include/mach/irqs.h
@@ -0,0 +1,38 @@
1/*
2 * arch/arm/mach-realview/include/mach/irqs.h
3 *
4 * Copyright (C) 2003 ARM Limited
5 * Copyright (C) 2000 Deep Blue Solutions Ltd.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
21
22#ifndef __ASM_ARCH_IRQS_H
23#define __ASM_ARCH_IRQS_H
24
25#include <mach/board-eb.h>
26#include <mach/board-pb11mp.h>
27#include <mach/board-pb1176.h>
28
29#define IRQ_LOCALTIMER 29
30#define IRQ_LOCALWDOG 30
31
32#define IRQ_GIC_START 32
33
34#ifndef NR_IRQS
35#error "NR_IRQS not defined by the board-specific files"
36#endif
37
38#endif
diff --git a/arch/arm/mach-realview/include/mach/memory.h b/arch/arm/mach-realview/include/mach/memory.h
new file mode 100644
index 000000000000..0e673483a141
--- /dev/null
+++ b/arch/arm/mach-realview/include/mach/memory.h
@@ -0,0 +1,38 @@
1/*
2 * arch/arm/mach-realview/include/mach/memory.h
3 *
4 * Copyright (C) 2003 ARM Limited
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20#ifndef __ASM_ARCH_MEMORY_H
21#define __ASM_ARCH_MEMORY_H
22
23/*
24 * Physical DRAM offset.
25 */
26#define PHYS_OFFSET UL(0x00000000)
27
28/*
29 * Virtual view <-> DMA view memory address translations
30 * virt_to_bus: Used to translate the virtual address to an
31 * address suitable to be passed to set_dma_addr
32 * bus_to_virt: Used to convert an address for DMA operations
33 * to an address that the kernel can use.
34 */
35#define __virt_to_bus(x) ((x) - PAGE_OFFSET)
36#define __bus_to_virt(x) ((x) + PAGE_OFFSET)
37
38#endif
diff --git a/arch/arm/mach-realview/include/mach/platform.h b/arch/arm/mach-realview/include/mach/platform.h
new file mode 100644
index 000000000000..4034b54950c2
--- /dev/null
+++ b/arch/arm/mach-realview/include/mach/platform.h
@@ -0,0 +1,293 @@
1/*
2 * arch/arm/mach-realview/include/mach/platform.h
3 *
4 * Copyright (c) ARM Limited 2003. All rights reserved.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20
21#ifndef __ASM_ARCH_PLATFORM_H
22#define __ASM_ARCH_PLATFORM_H
23
24/*
25 * Memory definitions
26 */
27#define REALVIEW_BOOT_ROM_LO 0x30000000 /* DoC Base (64Mb)...*/
28#define REALVIEW_BOOT_ROM_HI 0x30000000
29#define REALVIEW_BOOT_ROM_BASE REALVIEW_BOOT_ROM_HI /* Normal position */
30#define REALVIEW_BOOT_ROM_SIZE SZ_64M
31
32#define REALVIEW_SSRAM_BASE /* REALVIEW_SSMC_BASE ? */
33#define REALVIEW_SSRAM_SIZE SZ_2M
34
35/*
36 * SDRAM
37 */
38#define REALVIEW_SDRAM_BASE 0x00000000
39
40/*
41 * Logic expansion modules
42 *
43 */
44
45
46/* ------------------------------------------------------------------------
47 * RealView Registers
48 * ------------------------------------------------------------------------
49 *
50 */
51#define REALVIEW_SYS_ID_OFFSET 0x00
52#define REALVIEW_SYS_SW_OFFSET 0x04
53#define REALVIEW_SYS_LED_OFFSET 0x08
54#define REALVIEW_SYS_OSC0_OFFSET 0x0C
55
56#define REALVIEW_SYS_OSC1_OFFSET 0x10
57#define REALVIEW_SYS_OSC2_OFFSET 0x14
58#define REALVIEW_SYS_OSC3_OFFSET 0x18
59#define REALVIEW_SYS_OSC4_OFFSET 0x1C /* OSC1 for RealView/AB */
60
61#define REALVIEW_SYS_LOCK_OFFSET 0x20
62#define REALVIEW_SYS_100HZ_OFFSET 0x24
63#define REALVIEW_SYS_CFGDATA1_OFFSET 0x28
64#define REALVIEW_SYS_CFGDATA2_OFFSET 0x2C
65#define REALVIEW_SYS_FLAGS_OFFSET 0x30
66#define REALVIEW_SYS_FLAGSSET_OFFSET 0x30
67#define REALVIEW_SYS_FLAGSCLR_OFFSET 0x34
68#define REALVIEW_SYS_NVFLAGS_OFFSET 0x38
69#define REALVIEW_SYS_NVFLAGSSET_OFFSET 0x38
70#define REALVIEW_SYS_NVFLAGSCLR_OFFSET 0x3C
71#define REALVIEW_SYS_RESETCTL_OFFSET 0x40
72#define REALVIEW_SYS_PCICTL_OFFSET 0x44
73#define REALVIEW_SYS_MCI_OFFSET 0x48
74#define REALVIEW_SYS_FLASH_OFFSET 0x4C
75#define REALVIEW_SYS_CLCD_OFFSET 0x50
76#define REALVIEW_SYS_CLCDSER_OFFSET 0x54
77#define REALVIEW_SYS_BOOTCS_OFFSET 0x58
78#define REALVIEW_SYS_24MHz_OFFSET 0x5C
79#define REALVIEW_SYS_MISC_OFFSET 0x60
80#define REALVIEW_SYS_IOSEL_OFFSET 0x70
81#define REALVIEW_SYS_PROCID_OFFSET 0x84
82#define REALVIEW_SYS_TEST_OSC0_OFFSET 0xC0
83#define REALVIEW_SYS_TEST_OSC1_OFFSET 0xC4
84#define REALVIEW_SYS_TEST_OSC2_OFFSET 0xC8
85#define REALVIEW_SYS_TEST_OSC3_OFFSET 0xCC
86#define REALVIEW_SYS_TEST_OSC4_OFFSET 0xD0
87
88#define REALVIEW_SYS_BASE 0x10000000
89#define REALVIEW_SYS_ID (REALVIEW_SYS_BASE + REALVIEW_SYS_ID_OFFSET)
90#define REALVIEW_SYS_SW (REALVIEW_SYS_BASE + REALVIEW_SYS_SW_OFFSET)
91#define REALVIEW_SYS_LED (REALVIEW_SYS_BASE + REALVIEW_SYS_LED_OFFSET)
92#define REALVIEW_SYS_OSC0 (REALVIEW_SYS_BASE + REALVIEW_SYS_OSC0_OFFSET)
93#define REALVIEW_SYS_OSC1 (REALVIEW_SYS_BASE + REALVIEW_SYS_OSC1_OFFSET)
94
95#define REALVIEW_SYS_LOCK (REALVIEW_SYS_BASE + REALVIEW_SYS_LOCK_OFFSET)
96#define REALVIEW_SYS_100HZ (REALVIEW_SYS_BASE + REALVIEW_SYS_100HZ_OFFSET)
97#define REALVIEW_SYS_CFGDATA1 (REALVIEW_SYS_BASE + REALVIEW_SYS_CFGDATA1_OFFSET)
98#define REALVIEW_SYS_CFGDATA2 (REALVIEW_SYS_BASE + REALVIEW_SYS_CFGDATA2_OFFSET)
99#define REALVIEW_SYS_FLAGS (REALVIEW_SYS_BASE + REALVIEW_SYS_FLAGS_OFFSET)
100#define REALVIEW_SYS_FLAGSSET (REALVIEW_SYS_BASE + REALVIEW_SYS_FLAGSSET_OFFSET)
101#define REALVIEW_SYS_FLAGSCLR (REALVIEW_SYS_BASE + REALVIEW_SYS_FLAGSCLR_OFFSET)
102#define REALVIEW_SYS_NVFLAGS (REALVIEW_SYS_BASE + REALVIEW_SYS_NVFLAGS_OFFSET)
103#define REALVIEW_SYS_NVFLAGSSET (REALVIEW_SYS_BASE + REALVIEW_SYS_NVFLAGSSET_OFFSET)
104#define REALVIEW_SYS_NVFLAGSCLR (REALVIEW_SYS_BASE + REALVIEW_SYS_NVFLAGSCLR_OFFSET)
105#define REALVIEW_SYS_RESETCTL (REALVIEW_SYS_BASE + REALVIEW_SYS_RESETCTL_OFFSET)
106#define REALVIEW_SYS_PCICTL (REALVIEW_SYS_BASE + REALVIEW_SYS_PCICTL_OFFSET)
107#define REALVIEW_SYS_MCI (REALVIEW_SYS_BASE + REALVIEW_SYS_MCI_OFFSET)
108#define REALVIEW_SYS_FLASH (REALVIEW_SYS_BASE + REALVIEW_SYS_FLASH_OFFSET)
109#define REALVIEW_SYS_CLCD (REALVIEW_SYS_BASE + REALVIEW_SYS_CLCD_OFFSET)
110#define REALVIEW_SYS_CLCDSER (REALVIEW_SYS_BASE + REALVIEW_SYS_CLCDSER_OFFSET)
111#define REALVIEW_SYS_BOOTCS (REALVIEW_SYS_BASE + REALVIEW_SYS_BOOTCS_OFFSET)
112#define REALVIEW_SYS_24MHz (REALVIEW_SYS_BASE + REALVIEW_SYS_24MHz_OFFSET)
113#define REALVIEW_SYS_MISC (REALVIEW_SYS_BASE + REALVIEW_SYS_MISC_OFFSET)
114#define REALVIEW_SYS_IOSEL (REALVIEW_SYS_BASE + REALVIEW_SYS_IOSEL_OFFSET)
115#define REALVIEW_SYS_PROCID (REALVIEW_SYS_BASE + REALVIEW_SYS_PROCID_OFFSET)
116#define REALVIEW_SYS_TEST_OSC0 (REALVIEW_SYS_BASE + REALVIEW_SYS_TEST_OSC0_OFFSET)
117#define REALVIEW_SYS_TEST_OSC1 (REALVIEW_SYS_BASE + REALVIEW_SYS_TEST_OSC1_OFFSET)
118#define REALVIEW_SYS_TEST_OSC2 (REALVIEW_SYS_BASE + REALVIEW_SYS_TEST_OSC2_OFFSET)
119#define REALVIEW_SYS_TEST_OSC3 (REALVIEW_SYS_BASE + REALVIEW_SYS_TEST_OSC3_OFFSET)
120#define REALVIEW_SYS_TEST_OSC4 (REALVIEW_SYS_BASE + REALVIEW_SYS_TEST_OSC4_OFFSET)
121
122/*
123 * Values for REALVIEW_SYS_RESET_CTRL
124 */
125#define REALVIEW_SYS_CTRL_RESET_CONFIGCLR 0x01
126#define REALVIEW_SYS_CTRL_RESET_CONFIGINIT 0x02
127#define REALVIEW_SYS_CTRL_RESET_DLLRESET 0x03
128#define REALVIEW_SYS_CTRL_RESET_PLLRESET 0x04
129#define REALVIEW_SYS_CTRL_RESET_POR 0x05
130#define REALVIEW_SYS_CTRL_RESET_DoC 0x06
131
132#define REALVIEW_SYS_CTRL_LED (1 << 0)
133
134
135/* ------------------------------------------------------------------------
136 * RealView control registers
137 * ------------------------------------------------------------------------
138 */
139
140/*
141 * REALVIEW_IDFIELD
142 *
143 * 31:24 = manufacturer (0x41 = ARM)
144 * 23:16 = architecture (0x08 = AHB system bus, ASB processor bus)
145 * 15:12 = FPGA (0x3 = XVC600 or XVC600E)
146 * 11:4 = build value
147 * 3:0 = revision number (0x1 = rev B (AHB))
148 */
149
150/*
151 * REALVIEW_SYS_LOCK
152 * control access to SYS_OSCx, SYS_CFGDATAx, SYS_RESETCTL,
153 * SYS_CLD, SYS_BOOTCS
154 */
155#define REALVIEW_SYS_LOCK_LOCKED (1 << 16)
156#define REALVIEW_SYS_LOCKVAL_MASK 0xFFFF /* write 0xA05F to enable write access */
157
158/*
159 * REALVIEW_SYS_FLASH
160 */
161#define REALVIEW_FLASHPROG_FLVPPEN (1 << 0) /* Enable writing to flash */
162
163/*
164 * REALVIEW_INTREG
165 * - used to acknowledge and control MMCI and UART interrupts
166 */
167#define REALVIEW_INTREG_WPROT 0x00 /* MMC protection status (no interrupt generated) */
168#define REALVIEW_INTREG_RI0 0x01 /* Ring indicator UART0 is asserted, */
169#define REALVIEW_INTREG_CARDIN 0x08 /* MMCI card in detect */
170 /* write 1 to acknowledge and clear */
171#define REALVIEW_INTREG_RI1 0x02 /* Ring indicator UART1 is asserted, */
172#define REALVIEW_INTREG_CARDINSERT 0x03 /* Signal insertion of MMC card */
173
174/*
175 * RealView common peripheral addresses
176 */
177#define REALVIEW_SCTL_BASE 0x10001000 /* System controller */
178#define REALVIEW_I2C_BASE 0x10002000 /* I2C control */
179#define REALVIEW_AACI_BASE 0x10004000 /* Audio */
180#define REALVIEW_MMCI0_BASE 0x10005000 /* MMC interface */
181#define REALVIEW_KMI0_BASE 0x10006000 /* KMI interface */
182#define REALVIEW_KMI1_BASE 0x10007000 /* KMI 2nd interface */
183#define REALVIEW_CHAR_LCD_BASE 0x10008000 /* Character LCD */
184#define REALVIEW_SCI_BASE 0x1000E000 /* Smart card controller */
185#define REALVIEW_GPIO1_BASE 0x10014000 /* GPIO port 1 */
186#define REALVIEW_GPIO2_BASE 0x10015000 /* GPIO port 2 */
187#define REALVIEW_DMC_BASE 0x10018000 /* DMC configuration */
188#define REALVIEW_DMAC_BASE 0x10030000 /* DMA controller */
189
190/* PCI space */
191#define REALVIEW_PCI_BASE 0x41000000 /* PCI Interface */
192#define REALVIEW_PCI_CFG_BASE 0x42000000
193#define REALVIEW_PCI_MEM_BASE0 0x44000000
194#define REALVIEW_PCI_MEM_BASE1 0x50000000
195#define REALVIEW_PCI_MEM_BASE2 0x60000000
196/* Sizes of above maps */
197#define REALVIEW_PCI_BASE_SIZE 0x01000000
198#define REALVIEW_PCI_CFG_BASE_SIZE 0x02000000
199#define REALVIEW_PCI_MEM_BASE0_SIZE 0x0c000000 /* 32Mb */
200#define REALVIEW_PCI_MEM_BASE1_SIZE 0x10000000 /* 256Mb */
201#define REALVIEW_PCI_MEM_BASE2_SIZE 0x10000000 /* 256Mb */
202
203#define REALVIEW_SDRAM67_BASE 0x70000000 /* SDRAM banks 6 and 7 */
204#define REALVIEW_LT_BASE 0x80000000 /* Logic Tile expansion */
205
206/*
207 * Disk on Chip
208 */
209#define REALVIEW_DOC_BASE 0x2C000000
210#define REALVIEW_DOC_SIZE (16 << 20)
211#define REALVIEW_DOC_PAGE_SIZE 512
212#define REALVIEW_DOC_TOTAL_PAGES (DOC_SIZE / PAGE_SIZE)
213
214#define ERASE_UNIT_PAGES 32
215#define START_PAGE 0x80
216
217/*
218 * LED settings, bits [7:0]
219 */
220#define REALVIEW_SYS_LED0 (1 << 0)
221#define REALVIEW_SYS_LED1 (1 << 1)
222#define REALVIEW_SYS_LED2 (1 << 2)
223#define REALVIEW_SYS_LED3 (1 << 3)
224#define REALVIEW_SYS_LED4 (1 << 4)
225#define REALVIEW_SYS_LED5 (1 << 5)
226#define REALVIEW_SYS_LED6 (1 << 6)
227#define REALVIEW_SYS_LED7 (1 << 7)
228
229#define ALL_LEDS 0xFF
230
231#define LED_BANK REALVIEW_SYS_LED
232
233/*
234 * Control registers
235 */
236#define REALVIEW_IDFIELD_OFFSET 0x0 /* RealView build information */
237#define REALVIEW_FLASHPROG_OFFSET 0x4 /* Flash devices */
238#define REALVIEW_INTREG_OFFSET 0x8 /* Interrupt control */
239#define REALVIEW_DECODE_OFFSET 0xC /* Fitted logic modules */
240
241/*
242 * Application Flash
243 *
244 */
245#define FLASH_BASE REALVIEW_FLASH_BASE
246#define FLASH_SIZE REALVIEW_FLASH_SIZE
247#define FLASH_END (FLASH_BASE + FLASH_SIZE - 1)
248#define FLASH_BLOCK_SIZE SZ_128K
249
250/*
251 * Boot Flash
252 *
253 */
254#define EPROM_BASE REALVIEW_BOOT_ROM_HI
255#define EPROM_SIZE REALVIEW_BOOT_ROM_SIZE
256#define EPROM_END (EPROM_BASE + EPROM_SIZE - 1)
257
258/*
259 * Clean base - dummy
260 *
261 */
262#define CLEAN_BASE EPROM_BASE
263
264/*
265 * System controller bit assignment
266 */
267#define REALVIEW_REFCLK 0
268#define REALVIEW_TIMCLK 1
269
270#define REALVIEW_TIMER1_EnSel 15
271#define REALVIEW_TIMER2_EnSel 17
272#define REALVIEW_TIMER3_EnSel 19
273#define REALVIEW_TIMER4_EnSel 21
274
275
276#define MAX_TIMER 2
277#define MAX_PERIOD 699050
278#define TICKS_PER_uSEC 1
279
280/*
281 * These are useconds NOT ticks.
282 *
283 */
284#define mSEC_1 1000
285#define mSEC_5 (mSEC_1 * 5)
286#define mSEC_10 (mSEC_1 * 10)
287#define mSEC_25 (mSEC_1 * 25)
288#define SEC_1 (mSEC_1 * 1000)
289
290#define REALVIEW_CSR_BASE 0x10000000
291#define REALVIEW_CSR_SIZE 0x10000000
292
293#endif /* __ASM_ARCH_PLATFORM_H */
diff --git a/include/asm-arm/arch-realview/scu.h b/arch/arm/mach-realview/include/mach/scu.h
index d55802d645af..d55802d645af 100644
--- a/include/asm-arm/arch-realview/scu.h
+++ b/arch/arm/mach-realview/include/mach/scu.h
diff --git a/include/asm-arm/arch-realview/smp.h b/arch/arm/mach-realview/include/mach/smp.h
index 515819efd046..515819efd046 100644
--- a/include/asm-arm/arch-realview/smp.h
+++ b/arch/arm/mach-realview/include/mach/smp.h
diff --git a/arch/arm/mach-realview/include/mach/system.h b/arch/arm/mach-realview/include/mach/system.h
new file mode 100644
index 000000000000..4d3c8f3f8053
--- /dev/null
+++ b/arch/arm/mach-realview/include/mach/system.h
@@ -0,0 +1,51 @@
1/*
2 * arch/arm/mach-realview/include/mach/system.h
3 *
4 * Copyright (C) 2003 ARM Limited
5 * Copyright (C) 2000 Deep Blue Solutions Ltd
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
21#ifndef __ASM_ARCH_SYSTEM_H
22#define __ASM_ARCH_SYSTEM_H
23
24#include <mach/hardware.h>
25#include <asm/io.h>
26#include <mach/platform.h>
27
28static inline void arch_idle(void)
29{
30 /*
31 * This should do all the clock switching
32 * and wait for interrupt tricks
33 */
34 cpu_do_idle();
35}
36
37static inline void arch_reset(char mode)
38{
39 void __iomem *hdr_ctrl = __io_address(REALVIEW_SYS_BASE) + REALVIEW_SYS_RESETCTL_OFFSET;
40 unsigned int val;
41
42 /*
43 * To reset, we hit the on-board reset register
44 * in the system FPGA
45 */
46 val = __raw_readl(hdr_ctrl);
47 val |= REALVIEW_SYS_CTRL_RESET_CONFIGCLR;
48 __raw_writel(val, hdr_ctrl);
49}
50
51#endif
diff --git a/arch/arm/mach-realview/include/mach/timex.h b/arch/arm/mach-realview/include/mach/timex.h
new file mode 100644
index 000000000000..4eeb069373c2
--- /dev/null
+++ b/arch/arm/mach-realview/include/mach/timex.h
@@ -0,0 +1,23 @@
1/*
2 * arch/arm/mach-realview/include/mach/timex.h
3 *
4 * RealView architecture timex specifications
5 *
6 * Copyright (C) 2003 ARM Limited
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 */
22
23#define CLOCK_TICK_RATE (50000000 / 16)
diff --git a/arch/arm/mach-realview/include/mach/uncompress.h b/arch/arm/mach-realview/include/mach/uncompress.h
new file mode 100644
index 000000000000..79f50f218e77
--- /dev/null
+++ b/arch/arm/mach-realview/include/mach/uncompress.h
@@ -0,0 +1,72 @@
1/*
2 * arch/arm/mach-realview/include/mach/uncompress.h
3 *
4 * Copyright (C) 2003 ARM Limited
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20#include <mach/hardware.h>
21#include <asm/mach-types.h>
22
23#include <mach/board-eb.h>
24#include <mach/board-pb11mp.h>
25#include <mach/board-pb1176.h>
26
27#define AMBA_UART_DR(base) (*(volatile unsigned char *)((base) + 0x00))
28#define AMBA_UART_LCRH(base) (*(volatile unsigned char *)((base) + 0x2c))
29#define AMBA_UART_CR(base) (*(volatile unsigned char *)((base) + 0x30))
30#define AMBA_UART_FR(base) (*(volatile unsigned char *)((base) + 0x18))
31
32/*
33 * Return the UART base address
34 */
35static inline unsigned long get_uart_base(void)
36{
37 if (machine_is_realview_eb())
38 return REALVIEW_EB_UART0_BASE;
39 else if (machine_is_realview_pb11mp())
40 return REALVIEW_PB11MP_UART0_BASE;
41 else if (machine_is_realview_pb1176())
42 return REALVIEW_PB1176_UART0_BASE;
43 else
44 return 0;
45}
46
47/*
48 * This does not append a newline
49 */
50static inline void putc(int c)
51{
52 unsigned long base = get_uart_base();
53
54 while (AMBA_UART_FR(base) & (1 << 5))
55 barrier();
56
57 AMBA_UART_DR(base) = c;
58}
59
60static inline void flush(void)
61{
62 unsigned long base = get_uart_base();
63
64 while (AMBA_UART_FR(base) & (1 << 3))
65 barrier();
66}
67
68/*
69 * nothing to do
70 */
71#define arch_decomp_setup()
72#define arch_decomp_wdog()
diff --git a/arch/arm/mach-realview/include/mach/vmalloc.h b/arch/arm/mach-realview/include/mach/vmalloc.h
new file mode 100644
index 000000000000..48cbcc873db2
--- /dev/null
+++ b/arch/arm/mach-realview/include/mach/vmalloc.h
@@ -0,0 +1,21 @@
1/*
2 * arch/arm/mach-realview/include/mach/vmalloc.h
3 *
4 * Copyright (C) 2003 ARM Limited
5 * Copyright (C) 2000 Russell King.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
21#define VMALLOC_END (PAGE_OFFSET + 0x18000000)
diff --git a/arch/arm/mach-realview/localtimer.c b/arch/arm/mach-realview/localtimer.c
index 50604360479f..82fa1f26e026 100644
--- a/arch/arm/mach-realview/localtimer.c
+++ b/arch/arm/mach-realview/localtimer.c
@@ -20,7 +20,7 @@
20 20
21#include <asm/hardware/arm_twd.h> 21#include <asm/hardware/arm_twd.h>
22#include <asm/hardware/gic.h> 22#include <asm/hardware/gic.h>
23#include <asm/hardware.h> 23#include <mach/hardware.h>
24#include <asm/io.h> 24#include <asm/io.h>
25#include <asm/irq.h> 25#include <asm/irq.h>
26 26
diff --git a/arch/arm/mach-realview/platsmp.c b/arch/arm/mach-realview/platsmp.c
index 8e813ed57519..1907d22f4fed 100644
--- a/arch/arm/mach-realview/platsmp.c
+++ b/arch/arm/mach-realview/platsmp.c
@@ -15,13 +15,13 @@
15#include <linux/smp.h> 15#include <linux/smp.h>
16 16
17#include <asm/cacheflush.h> 17#include <asm/cacheflush.h>
18#include <asm/hardware.h> 18#include <mach/hardware.h>
19#include <asm/io.h> 19#include <asm/io.h>
20#include <asm/mach-types.h> 20#include <asm/mach-types.h>
21 21
22#include <asm/arch/board-eb.h> 22#include <mach/board-eb.h>
23#include <asm/arch/board-pb11mp.h> 23#include <mach/board-pb11mp.h>
24#include <asm/arch/scu.h> 24#include <mach/scu.h>
25 25
26extern void realview_secondary_startup(void); 26extern void realview_secondary_startup(void);
27 27
diff --git a/arch/arm/mach-realview/realview_eb.c b/arch/arm/mach-realview/realview_eb.c
index 5782d83fd886..19a9968fc5b9 100644
--- a/arch/arm/mach-realview/realview_eb.c
+++ b/arch/arm/mach-realview/realview_eb.c
@@ -24,7 +24,7 @@
24#include <linux/sysdev.h> 24#include <linux/sysdev.h>
25#include <linux/amba/bus.h> 25#include <linux/amba/bus.h>
26 26
27#include <asm/hardware.h> 27#include <mach/hardware.h>
28#include <asm/io.h> 28#include <asm/io.h>
29#include <asm/irq.h> 29#include <asm/irq.h>
30#include <asm/leds.h> 30#include <asm/leds.h>
@@ -38,8 +38,8 @@
38#include <asm/mach/mmc.h> 38#include <asm/mach/mmc.h>
39#include <asm/mach/time.h> 39#include <asm/mach/time.h>
40 40
41#include <asm/arch/board-eb.h> 41#include <mach/board-eb.h>
42#include <asm/arch/irqs.h> 42#include <mach/irqs.h>
43 43
44#include "core.h" 44#include "core.h"
45#include "clock.h" 45#include "clock.h"
diff --git a/arch/arm/mach-realview/realview_pb1176.c b/arch/arm/mach-realview/realview_pb1176.c
index cf7f576a5860..0986cbd15943 100644
--- a/arch/arm/mach-realview/realview_pb1176.c
+++ b/arch/arm/mach-realview/realview_pb1176.c
@@ -24,7 +24,7 @@
24#include <linux/sysdev.h> 24#include <linux/sysdev.h>
25#include <linux/amba/bus.h> 25#include <linux/amba/bus.h>
26 26
27#include <asm/hardware.h> 27#include <mach/hardware.h>
28#include <asm/io.h> 28#include <asm/io.h>
29#include <asm/irq.h> 29#include <asm/irq.h>
30#include <asm/leds.h> 30#include <asm/leds.h>
@@ -39,8 +39,8 @@
39#include <asm/mach/mmc.h> 39#include <asm/mach/mmc.h>
40#include <asm/mach/time.h> 40#include <asm/mach/time.h>
41 41
42#include <asm/arch/board-pb1176.h> 42#include <mach/board-pb1176.h>
43#include <asm/arch/irqs.h> 43#include <mach/irqs.h>
44 44
45#include "core.h" 45#include "core.h"
46#include "clock.h" 46#include "clock.h"
diff --git a/arch/arm/mach-realview/realview_pb11mp.c b/arch/arm/mach-realview/realview_pb11mp.c
index f7ce1c5a178a..f4e7135e3eb5 100644
--- a/arch/arm/mach-realview/realview_pb11mp.c
+++ b/arch/arm/mach-realview/realview_pb11mp.c
@@ -24,7 +24,7 @@
24#include <linux/sysdev.h> 24#include <linux/sysdev.h>
25#include <linux/amba/bus.h> 25#include <linux/amba/bus.h>
26 26
27#include <asm/hardware.h> 27#include <mach/hardware.h>
28#include <asm/io.h> 28#include <asm/io.h>
29#include <asm/irq.h> 29#include <asm/irq.h>
30#include <asm/leds.h> 30#include <asm/leds.h>
@@ -39,8 +39,8 @@
39#include <asm/mach/mmc.h> 39#include <asm/mach/mmc.h>
40#include <asm/mach/time.h> 40#include <asm/mach/time.h>
41 41
42#include <asm/arch/board-pb11mp.h> 42#include <mach/board-pb11mp.h>
43#include <asm/arch/irqs.h> 43#include <mach/irqs.h>
44 44
45#include "core.h" 45#include "core.h"
46#include "clock.h" 46#include "clock.h"
diff --git a/arch/arm/mach-rpc/dma.c b/arch/arm/mach-rpc/dma.c
index 596379a4cf82..4b19fe484190 100644
--- a/arch/arm/mach-rpc/dma.c
+++ b/arch/arm/mach-rpc/dma.c
@@ -20,7 +20,7 @@
20#include <asm/fiq.h> 20#include <asm/fiq.h>
21#include <asm/io.h> 21#include <asm/io.h>
22#include <asm/irq.h> 22#include <asm/irq.h>
23#include <asm/hardware.h> 23#include <mach/hardware.h>
24#include <asm/uaccess.h> 24#include <asm/uaccess.h>
25 25
26#include <asm/mach/dma.h> 26#include <asm/mach/dma.h>
diff --git a/arch/arm/mach-rpc/include/mach/acornfb.h b/arch/arm/mach-rpc/include/mach/acornfb.h
new file mode 100644
index 000000000000..395d76288ffe
--- /dev/null
+++ b/arch/arm/mach-rpc/include/mach/acornfb.h
@@ -0,0 +1,140 @@
1/*
2 * arch/arm/mach-rpc/include/mach/acornfb.h
3 *
4 * Copyright (C) 1999 Russell King
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * AcornFB architecture specific code
11 */
12
13#define acornfb_bandwidth(var) ((var)->pixclock * 8 / (var)->bits_per_pixel)
14
15static inline int
16acornfb_valid_pixrate(struct fb_var_screeninfo *var)
17{
18 u_long limit;
19
20 if (!var->pixclock)
21 return 0;
22
23 /*
24 * Limits below are taken from RISC OS bandwidthlimit file
25 */
26 if (current_par.using_vram) {
27 if (current_par.vram_half_sam == 2048)
28 limit = 6578;
29 else
30 limit = 13157;
31 } else {
32 limit = 26315;
33 }
34
35 return acornfb_bandwidth(var) >= limit;
36}
37
38/*
39 * Try to find the best PLL parameters for the pixel clock.
40 * This algorithm seems to give best predictable results,
41 * and produces the same values as detailed in the VIDC20
42 * data sheet.
43 */
44static inline u_int
45acornfb_vidc20_find_pll(u_int pixclk)
46{
47 u_int r, best_r = 2, best_v = 2;
48 int best_d = 0x7fffffff;
49
50 for (r = 2; r <= 32; r++) {
51 u_int rr, v, p;
52 int d;
53
54 rr = 41667 * r;
55
56 v = (rr + pixclk / 2) / pixclk;
57
58 if (v > 32 || v < 2)
59 continue;
60
61 p = (rr + v / 2) / v;
62
63 d = pixclk - p;
64
65 if (d < 0)
66 d = -d;
67
68 if (d < best_d) {
69 best_d = d;
70 best_v = v - 1;
71 best_r = r - 1;
72 }
73
74 if (d == 0)
75 break;
76 }
77
78 return best_v << 8 | best_r;
79}
80
81static inline void
82acornfb_vidc20_find_rates(struct vidc_timing *vidc,
83 struct fb_var_screeninfo *var)
84{
85 u_int div;
86
87 /* Select pixel-clock divisor to keep PLL in range */
88 div = var->pixclock / 9090; /*9921*/
89
90 /* Limit divisor */
91 if (div == 0)
92 div = 1;
93 if (div > 8)
94 div = 8;
95
96 /* Encode divisor to VIDC20 setting */
97 switch (div) {
98 case 1: vidc->control |= VIDC20_CTRL_PIX_CK; break;
99 case 2: vidc->control |= VIDC20_CTRL_PIX_CK2; break;
100 case 3: vidc->control |= VIDC20_CTRL_PIX_CK3; break;
101 case 4: vidc->control |= VIDC20_CTRL_PIX_CK4; break;
102 case 5: vidc->control |= VIDC20_CTRL_PIX_CK5; break;
103 case 6: vidc->control |= VIDC20_CTRL_PIX_CK6; break;
104 case 7: vidc->control |= VIDC20_CTRL_PIX_CK7; break;
105 case 8: vidc->control |= VIDC20_CTRL_PIX_CK8; break;
106 }
107
108 /*
109 * With VRAM, the FIFO can be set to the highest possible setting
110 * because there are no latency considerations for other memory
111 * accesses. However, in 64 bit bus mode the FIFO preload value
112 * must not be set to VIDC20_CTRL_FIFO_28 because this will let
113 * the FIFO overflow. See VIDC20 manual page 33 (6.0 Setting the
114 * FIFO preload value).
115 */
116 if (current_par.using_vram) {
117 if (current_par.vram_half_sam == 2048)
118 vidc->control |= VIDC20_CTRL_FIFO_24;
119 else
120 vidc->control |= VIDC20_CTRL_FIFO_28;
121 } else {
122 unsigned long bandwidth = acornfb_bandwidth(var);
123
124 /* Encode bandwidth as VIDC20 setting */
125 if (bandwidth > 33334) /* < 30.0MB/s */
126 vidc->control |= VIDC20_CTRL_FIFO_16;
127 else if (bandwidth > 26666) /* < 37.5MB/s */
128 vidc->control |= VIDC20_CTRL_FIFO_20;
129 else if (bandwidth > 22222) /* < 45.0MB/s */
130 vidc->control |= VIDC20_CTRL_FIFO_24;
131 else /* > 45.0MB/s */
132 vidc->control |= VIDC20_CTRL_FIFO_28;
133 }
134
135 /* Find the PLL values */
136 vidc->pll_ctl = acornfb_vidc20_find_pll(var->pixclock / div);
137}
138
139#define acornfb_default_control() (VIDC20_CTRL_PIX_VCLK)
140#define acornfb_default_econtrol() (VIDC20_ECTL_DAC | VIDC20_ECTL_REG(3))
diff --git a/arch/arm/mach-rpc/include/mach/debug-macro.S b/arch/arm/mach-rpc/include/mach/debug-macro.S
new file mode 100644
index 000000000000..b2a939ffdcde
--- /dev/null
+++ b/arch/arm/mach-rpc/include/mach/debug-macro.S
@@ -0,0 +1,25 @@
1/* arch/arm/mach-rpc/include/mach/debug-macro.S
2 *
3 * Debugging macro include header
4 *
5 * Copyright (C) 1994-1999 Russell King
6 * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 *
12*/
13
14 .macro addruart,rx
15 mrc p15, 0, \rx, c1, c0
16 tst \rx, #1 @ MMU enabled?
17 moveq \rx, #0x03000000
18 movne \rx, #0xe0000000
19 orr \rx, \rx, #0x00010000
20 orr \rx, \rx, #0x00000fe0
21 .endm
22
23#define UART_SHIFT 2
24#define FLOW_CONTROL
25#include <asm/hardware/debug-8250.S>
diff --git a/arch/arm/mach-rpc/include/mach/dma.h b/arch/arm/mach-rpc/include/mach/dma.h
new file mode 100644
index 000000000000..360b56f8f29f
--- /dev/null
+++ b/arch/arm/mach-rpc/include/mach/dma.h
@@ -0,0 +1,33 @@
1/*
2 * arch/arm/mach-rpc/include/mach/dma.h
3 *
4 * Copyright (C) 1997 Russell King
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10#ifndef __ASM_ARCH_DMA_H
11#define __ASM_ARCH_DMA_H
12
13/*
14 * This is the maximum DMA address that can be DMAd to.
15 * There should not be more than (0xd0000000 - 0xc0000000)
16 * bytes of RAM.
17 */
18#define MAX_DMA_ADDRESS 0xd0000000
19#define MAX_DMA_CHANNELS 8
20
21#define DMA_0 0
22#define DMA_1 1
23#define DMA_2 2
24#define DMA_3 3
25#define DMA_S0 4
26#define DMA_S1 5
27#define DMA_VIRTUAL_FLOPPY 6
28#define DMA_VIRTUAL_SOUND 7
29
30#define DMA_FLOPPY DMA_VIRTUAL_FLOPPY
31
32#endif /* _ASM_ARCH_DMA_H */
33
diff --git a/arch/arm/mach-rpc/include/mach/entry-macro.S b/arch/arm/mach-rpc/include/mach/entry-macro.S
new file mode 100644
index 000000000000..4e7e54144093
--- /dev/null
+++ b/arch/arm/mach-rpc/include/mach/entry-macro.S
@@ -0,0 +1,16 @@
1#include <mach/hardware.h>
2#include <asm/hardware/entry-macro-iomd.S>
3
4 .equ ioc_base_high, IOC_BASE & 0xff000000
5 .equ ioc_base_low, IOC_BASE & 0x00ff0000
6
7 .macro get_irqnr_preamble, base, tmp
8 mov \base, #ioc_base_high @ point at IOC
9 .if ioc_base_low
10 orr \base, \base, #ioc_base_low
11 .endif
12 .endm
13
14 .macro arch_ret_to_user, tmp1, tmp2
15 .endm
16
diff --git a/arch/arm/mach-rpc/include/mach/hardware.h b/arch/arm/mach-rpc/include/mach/hardware.h
new file mode 100644
index 000000000000..dde6b3c0e299
--- /dev/null
+++ b/arch/arm/mach-rpc/include/mach/hardware.h
@@ -0,0 +1,83 @@
1/*
2 * arch/arm/mach-rpc/include/mach/hardware.h
3 *
4 * Copyright (C) 1996-1999 Russell King.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * This file contains the hardware definitions of the RiscPC series machines.
11 */
12#ifndef __ASM_ARCH_HARDWARE_H
13#define __ASM_ARCH_HARDWARE_H
14
15#include <mach/memory.h>
16
17#ifndef __ASSEMBLY__
18#define IOMEM(x) ((void __iomem *)(unsigned long)(x))
19#else
20#define IOMEM(x) x
21#endif /* __ASSEMBLY__ */
22
23/*
24 * What hardware must be present
25 */
26#define HAS_IOMD
27#define HAS_VIDC20
28
29/* Hardware addresses of major areas.
30 * *_START is the physical address
31 * *_SIZE is the size of the region
32 * *_BASE is the virtual address
33 */
34#define RAM_SIZE 0x10000000
35#define RAM_START 0x10000000
36
37#define EASI_SIZE 0x08000000 /* EASI I/O */
38#define EASI_START 0x08000000
39#define EASI_BASE 0xe5000000
40
41#define IO_START 0x03000000 /* I/O */
42#define IO_SIZE 0x01000000
43#define IO_BASE IOMEM(0xe0000000)
44
45#define SCREEN_START 0x02000000 /* VRAM */
46#define SCREEN_END 0xdfc00000
47#define SCREEN_BASE 0xdf800000
48
49#define UNCACHEABLE_ADDR 0xdf010000
50
51/*
52 * IO Addresses
53 */
54#define VIDC_BASE IOMEM(0xe0400000)
55#define EXPMASK_BASE 0xe0360000
56#define IOMD_BASE IOMEM(0xe0200000)
57#define IOC_BASE IOMEM(0xe0200000)
58#define PCIO_BASE IOMEM(0xe0010000)
59#define FLOPPYDMA_BASE IOMEM(0xe002a000)
60
61#define vidc_writel(val) __raw_writel(val, VIDC_BASE)
62
63#define IO_EC_EASI_BASE 0x81400000
64#define IO_EC_IOC4_BASE 0x8009c000
65#define IO_EC_IOC_BASE 0x80090000
66#define IO_EC_MEMC8_BASE 0x8000ac00
67#define IO_EC_MEMC_BASE 0x80000000
68
69#define NETSLOT_BASE 0x0302b000
70#define NETSLOT_SIZE 0x00001000
71
72#define PODSLOT_IOC0_BASE 0x03240000
73#define PODSLOT_IOC4_BASE 0x03270000
74#define PODSLOT_IOC_SIZE (1 << 14)
75#define PODSLOT_MEMC_BASE 0x03000000
76#define PODSLOT_MEMC_SIZE (1 << 14)
77#define PODSLOT_EASI_BASE 0x08000000
78#define PODSLOT_EASI_SIZE (1 << 24)
79
80#define EXPMASK_STATUS (EXPMASK_BASE + 0x00)
81#define EXPMASK_ENABLE (EXPMASK_BASE + 0x04)
82
83#endif
diff --git a/arch/arm/mach-rpc/include/mach/io.h b/arch/arm/mach-rpc/include/mach/io.h
new file mode 100644
index 000000000000..9f0553b7ec28
--- /dev/null
+++ b/arch/arm/mach-rpc/include/mach/io.h
@@ -0,0 +1,258 @@
1/*
2 * arch/arm/mach-rpc/include/mach/io.h
3 *
4 * Copyright (C) 1997 Russell King
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * Modifications:
11 * 06-Dec-1997 RMK Created.
12 */
13#ifndef __ASM_ARM_ARCH_IO_H
14#define __ASM_ARM_ARCH_IO_H
15
16#include <mach/hardware.h>
17
18#define IO_SPACE_LIMIT 0xffffffff
19
20/*
21 * GCC is totally crap at loading/storing data. We try to persuade it
22 * to do the right thing by using these whereever possible instead of
23 * the above.
24 */
25#define __arch_base_getb(b,o) \
26 ({ \
27 unsigned int __v, __r = (b); \
28 __asm__ __volatile__( \
29 "ldrb %0, [%1, %2]" \
30 : "=r" (__v) \
31 : "r" (__r), "Ir" (o)); \
32 __v; \
33 })
34
35#define __arch_base_getl(b,o) \
36 ({ \
37 unsigned int __v, __r = (b); \
38 __asm__ __volatile__( \
39 "ldr %0, [%1, %2]" \
40 : "=r" (__v) \
41 : "r" (__r), "Ir" (o)); \
42 __v; \
43 })
44
45#define __arch_base_putb(v,b,o) \
46 ({ \
47 unsigned int __r = (b); \
48 __asm__ __volatile__( \
49 "strb %0, [%1, %2]" \
50 : \
51 : "r" (v), "r" (__r), "Ir" (o));\
52 })
53
54#define __arch_base_putl(v,b,o) \
55 ({ \
56 unsigned int __r = (b); \
57 __asm__ __volatile__( \
58 "str %0, [%1, %2]" \
59 : \
60 : "r" (v), "r" (__r), "Ir" (o));\
61 })
62
63/*
64 * We use two different types of addressing - PC style addresses, and ARM
65 * addresses. PC style accesses the PC hardware with the normal PC IO
66 * addresses, eg 0x3f8 for serial#1. ARM addresses are 0x80000000+
67 * and are translated to the start of IO. Note that all addresses are
68 * shifted left!
69 */
70#define __PORT_PCIO(x) (!((x) & 0x80000000))
71
72/*
73 * Dynamic IO functions.
74 */
75static inline void __outb (unsigned int value, unsigned int port)
76{
77 unsigned long temp;
78 __asm__ __volatile__(
79 "tst %2, #0x80000000\n\t"
80 "mov %0, %4\n\t"
81 "addeq %0, %0, %3\n\t"
82 "strb %1, [%0, %2, lsl #2] @ outb"
83 : "=&r" (temp)
84 : "r" (value), "r" (port), "Ir" (PCIO_BASE - IO_BASE), "Ir" (IO_BASE)
85 : "cc");
86}
87
88static inline void __outw (unsigned int value, unsigned int port)
89{
90 unsigned long temp;
91 __asm__ __volatile__(
92 "tst %2, #0x80000000\n\t"
93 "mov %0, %4\n\t"
94 "addeq %0, %0, %3\n\t"
95 "str %1, [%0, %2, lsl #2] @ outw"
96 : "=&r" (temp)
97 : "r" (value|value<<16), "r" (port), "Ir" (PCIO_BASE - IO_BASE), "Ir" (IO_BASE)
98 : "cc");
99}
100
101static inline void __outl (unsigned int value, unsigned int port)
102{
103 unsigned long temp;
104 __asm__ __volatile__(
105 "tst %2, #0x80000000\n\t"
106 "mov %0, %4\n\t"
107 "addeq %0, %0, %3\n\t"
108 "str %1, [%0, %2, lsl #2] @ outl"
109 : "=&r" (temp)
110 : "r" (value), "r" (port), "Ir" (PCIO_BASE - IO_BASE), "Ir" (IO_BASE)
111 : "cc");
112}
113
114#define DECLARE_DYN_IN(sz,fnsuffix,instr) \
115static inline unsigned sz __in##fnsuffix (unsigned int port) \
116{ \
117 unsigned long temp, value; \
118 __asm__ __volatile__( \
119 "tst %2, #0x80000000\n\t" \
120 "mov %0, %4\n\t" \
121 "addeq %0, %0, %3\n\t" \
122 "ldr" instr " %1, [%0, %2, lsl #2] @ in" #fnsuffix \
123 : "=&r" (temp), "=r" (value) \
124 : "r" (port), "Ir" (PCIO_BASE - IO_BASE), "Ir" (IO_BASE) \
125 : "cc"); \
126 return (unsigned sz)value; \
127}
128
129static inline void __iomem *__deprecated __ioaddr(unsigned int port)
130{
131 void __iomem *ret;
132 if (__PORT_PCIO(port))
133 ret = PCIO_BASE;
134 else
135 ret = IO_BASE;
136 return ret + (port << 2);
137}
138
139#define DECLARE_IO(sz,fnsuffix,instr) \
140 DECLARE_DYN_IN(sz,fnsuffix,instr)
141
142DECLARE_IO(char,b,"b")
143DECLARE_IO(short,w,"")
144DECLARE_IO(int,l,"")
145
146#undef DECLARE_IO
147#undef DECLARE_DYN_IN
148
149/*
150 * Constant address IO functions
151 *
152 * These have to be macros for the 'J' constraint to work -
153 * +/-4096 immediate operand.
154 */
155#define __outbc(value,port) \
156({ \
157 if (__PORT_PCIO((port))) \
158 __asm__ __volatile__( \
159 "strb %0, [%1, %2] @ outbc" \
160 : : "r" (value), "r" (PCIO_BASE), "Jr" ((port) << 2)); \
161 else \
162 __asm__ __volatile__( \
163 "strb %0, [%1, %2] @ outbc" \
164 : : "r" (value), "r" (IO_BASE), "r" ((port) << 2)); \
165})
166
167#define __inbc(port) \
168({ \
169 unsigned char result; \
170 if (__PORT_PCIO((port))) \
171 __asm__ __volatile__( \
172 "ldrb %0, [%1, %2] @ inbc" \
173 : "=r" (result) : "r" (PCIO_BASE), "Jr" ((port) << 2)); \
174 else \
175 __asm__ __volatile__( \
176 "ldrb %0, [%1, %2] @ inbc" \
177 : "=r" (result) : "r" (IO_BASE), "r" ((port) << 2)); \
178 result; \
179})
180
181#define __outwc(value,port) \
182({ \
183 unsigned long __v = value; \
184 if (__PORT_PCIO((port))) \
185 __asm__ __volatile__( \
186 "str %0, [%1, %2] @ outwc" \
187 : : "r" (__v|__v<<16), "r" (PCIO_BASE), "Jr" ((port) << 2)); \
188 else \
189 __asm__ __volatile__( \
190 "str %0, [%1, %2] @ outwc" \
191 : : "r" (__v|__v<<16), "r" (IO_BASE), "r" ((port) << 2)); \
192})
193
194#define __inwc(port) \
195({ \
196 unsigned short result; \
197 if (__PORT_PCIO((port))) \
198 __asm__ __volatile__( \
199 "ldr %0, [%1, %2] @ inwc" \
200 : "=r" (result) : "r" (PCIO_BASE), "Jr" ((port) << 2)); \
201 else \
202 __asm__ __volatile__( \
203 "ldr %0, [%1, %2] @ inwc" \
204 : "=r" (result) : "r" (IO_BASE), "r" ((port) << 2)); \
205 result & 0xffff; \
206})
207
208#define __outlc(value,port) \
209({ \
210 unsigned long __v = value; \
211 if (__PORT_PCIO((port))) \
212 __asm__ __volatile__( \
213 "str %0, [%1, %2] @ outlc" \
214 : : "r" (__v), "r" (PCIO_BASE), "Jr" ((port) << 2)); \
215 else \
216 __asm__ __volatile__( \
217 "str %0, [%1, %2] @ outlc" \
218 : : "r" (__v), "r" (IO_BASE), "r" ((port) << 2)); \
219})
220
221#define __inlc(port) \
222({ \
223 unsigned long result; \
224 if (__PORT_PCIO((port))) \
225 __asm__ __volatile__( \
226 "ldr %0, [%1, %2] @ inlc" \
227 : "=r" (result) : "r" (PCIO_BASE), "Jr" ((port) << 2)); \
228 else \
229 __asm__ __volatile__( \
230 "ldr %0, [%1, %2] @ inlc" \
231 : "=r" (result) : "r" (IO_BASE), "r" ((port) << 2)); \
232 result; \
233})
234
235#define __ioaddrc(port) __ioaddr(port)
236
237#define inb(p) (__builtin_constant_p((p)) ? __inbc(p) : __inb(p))
238#define inw(p) (__builtin_constant_p((p)) ? __inwc(p) : __inw(p))
239#define inl(p) (__builtin_constant_p((p)) ? __inlc(p) : __inl(p))
240#define outb(v,p) (__builtin_constant_p((p)) ? __outbc(v,p) : __outb(v,p))
241#define outw(v,p) (__builtin_constant_p((p)) ? __outwc(v,p) : __outw(v,p))
242#define outl(v,p) (__builtin_constant_p((p)) ? __outlc(v,p) : __outl(v,p))
243#define __ioaddr(p) (__builtin_constant_p((p)) ? __ioaddr(p) : __ioaddrc(p))
244/* the following macro is deprecated */
245#define ioaddr(port) ((unsigned long)__ioaddr((port)))
246
247#define insb(p,d,l) __raw_readsb(__ioaddr(p),d,l)
248#define insw(p,d,l) __raw_readsw(__ioaddr(p),d,l)
249
250#define outsb(p,d,l) __raw_writesb(__ioaddr(p),d,l)
251#define outsw(p,d,l) __raw_writesw(__ioaddr(p),d,l)
252
253/*
254 * 1:1 mapping for ioremapped regions.
255 */
256#define __mem_pci(x) (x)
257
258#endif
diff --git a/arch/arm/mach-rpc/include/mach/irqs.h b/arch/arm/mach-rpc/include/mach/irqs.h
new file mode 100644
index 000000000000..4ce6ca97f669
--- /dev/null
+++ b/arch/arm/mach-rpc/include/mach/irqs.h
@@ -0,0 +1,46 @@
1/*
2 * arch/arm/mach-rpc/include/mach/irqs.h
3 *
4 * Copyright (C) 1996 Russell King
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10
11#define IRQ_PRINTER 0
12#define IRQ_BATLOW 1
13#define IRQ_FLOPPYINDEX 2
14#define IRQ_VSYNCPULSE 3
15#define IRQ_POWERON 4
16#define IRQ_TIMER0 5
17#define IRQ_TIMER1 6
18#define IRQ_IMMEDIATE 7
19#define IRQ_EXPCARDFIQ 8
20#define IRQ_HARDDISK 9
21#define IRQ_SERIALPORT 10
22#define IRQ_FLOPPYDISK 12
23#define IRQ_EXPANSIONCARD 13
24#define IRQ_KEYBOARDTX 14
25#define IRQ_KEYBOARDRX 15
26
27#define IRQ_DMA0 16
28#define IRQ_DMA1 17
29#define IRQ_DMA2 18
30#define IRQ_DMA3 19
31#define IRQ_DMAS0 20
32#define IRQ_DMAS1 21
33
34#define FIQ_FLOPPYDATA 0
35#define FIQ_ECONET 2
36#define FIQ_SERIALPORT 4
37#define FIQ_EXPANSIONCARD 6
38#define FIQ_FORCE 7
39
40/*
41 * This is the offset of the FIQ "IRQ" numbers
42 */
43#define FIQ_START 64
44
45#define IRQ_TIMER IRQ_TIMER0
46
diff --git a/arch/arm/mach-rpc/include/mach/memory.h b/arch/arm/mach-rpc/include/mach/memory.h
new file mode 100644
index 000000000000..05425d558ee7
--- /dev/null
+++ b/arch/arm/mach-rpc/include/mach/memory.h
@@ -0,0 +1,39 @@
1/*
2 * arch/arm/mach-rpc/include/mach/memory.h
3 *
4 * Copyright (C) 1996,1997,1998 Russell King.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * Changelog:
11 * 20-Oct-1996 RMK Created
12 * 31-Dec-1997 RMK Fixed definitions to reduce warnings
13 * 11-Jan-1998 RMK Uninlined to reduce hits on cache
14 * 08-Feb-1998 RMK Added __virt_to_bus and __bus_to_virt
15 * 21-Mar-1999 RMK Renamed to memory.h
16 * RMK Added TASK_SIZE and PAGE_OFFSET
17 */
18#ifndef __ASM_ARCH_MEMORY_H
19#define __ASM_ARCH_MEMORY_H
20
21/*
22 * Physical DRAM offset.
23 */
24#define PHYS_OFFSET UL(0x10000000)
25
26/*
27 * These are exactly the same on the RiscPC as the
28 * physical memory view.
29 */
30#define __virt_to_bus(x) __virt_to_phys(x)
31#define __bus_to_virt(x) __phys_to_virt(x)
32
33/*
34 * Cache flushing area - ROM
35 */
36#define FLUSH_BASE_PHYS 0x00000000
37#define FLUSH_BASE 0xdf000000
38
39#endif
diff --git a/arch/arm/mach-rpc/include/mach/system.h b/arch/arm/mach-rpc/include/mach/system.h
new file mode 100644
index 000000000000..54d6e3f2d319
--- /dev/null
+++ b/arch/arm/mach-rpc/include/mach/system.h
@@ -0,0 +1,27 @@
1/*
2 * arch/arm/mach-rpc/include/mach/system.h
3 *
4 * Copyright (C) 1996-1999 Russell King.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10#include <mach/hardware.h>
11#include <asm/hardware/iomd.h>
12#include <asm/io.h>
13
14static inline void arch_idle(void)
15{
16 cpu_do_idle();
17}
18
19static inline void arch_reset(char mode)
20{
21 iomd_writeb(0, IOMD_ROMCR0);
22
23 /*
24 * Jump into the ROM
25 */
26 cpu_reset(0);
27}
diff --git a/arch/arm/mach-rpc/include/mach/timex.h b/arch/arm/mach-rpc/include/mach/timex.h
new file mode 100644
index 000000000000..dd75e7387bbe
--- /dev/null
+++ b/arch/arm/mach-rpc/include/mach/timex.h
@@ -0,0 +1,17 @@
1/*
2 * arch/arm/mach-rpc/include/mach/timex.h
3 *
4 * Copyright (C) 1997, 1998 Russell King
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * RiscPC architecture timex specifications
11 */
12
13/*
14 * On the RiscPC, the clock ticks at 2MHz.
15 */
16#define CLOCK_TICK_RATE 2000000
17
diff --git a/arch/arm/mach-rpc/include/mach/uncompress.h b/arch/arm/mach-rpc/include/mach/uncompress.h
new file mode 100644
index 000000000000..baa9c866d7bf
--- /dev/null
+++ b/arch/arm/mach-rpc/include/mach/uncompress.h
@@ -0,0 +1,198 @@
1/*
2 * arch/arm/mach-rpc/include/mach/uncompress.h
3 *
4 * Copyright (C) 1996 Russell King
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10#define VIDMEM ((char *)SCREEN_START)
11
12#include <mach/hardware.h>
13#include <asm/io.h>
14#include <asm/setup.h>
15#include <asm/page.h>
16
17int video_size_row;
18unsigned char bytes_per_char_h;
19extern unsigned long con_charconvtable[256];
20
21struct param_struct {
22 unsigned long page_size;
23 unsigned long nr_pages;
24 unsigned long ramdisk_size;
25 unsigned long mountrootrdonly;
26 unsigned long rootdev;
27 unsigned long video_num_cols;
28 unsigned long video_num_rows;
29 unsigned long video_x;
30 unsigned long video_y;
31 unsigned long memc_control_reg;
32 unsigned char sounddefault;
33 unsigned char adfsdrives;
34 unsigned char bytes_per_char_h;
35 unsigned char bytes_per_char_v;
36 unsigned long unused[256/4-11];
37};
38
39static const unsigned long palette_4[16] = {
40 0x00000000,
41 0x000000cc,
42 0x0000cc00, /* Green */
43 0x0000cccc, /* Yellow */
44 0x00cc0000, /* Blue */
45 0x00cc00cc, /* Magenta */
46 0x00cccc00, /* Cyan */
47 0x00cccccc, /* White */
48 0x00000000,
49 0x000000ff,
50 0x0000ff00,
51 0x0000ffff,
52 0x00ff0000,
53 0x00ff00ff,
54 0x00ffff00,
55 0x00ffffff
56};
57
58#define palette_setpixel(p) *(unsigned long *)(IO_START+0x00400000) = 0x10000000|((p) & 255)
59#define palette_write(v) *(unsigned long *)(IO_START+0x00400000) = 0x00000000|((v) & 0x00ffffff)
60
61/*
62 * params_phys is a linker defined symbol - see
63 * arch/arm/boot/compressed/Makefile
64 */
65extern __attribute__((pure)) struct param_struct *params(void);
66#define params (params())
67
68#ifndef STANDALONE_DEBUG
69static unsigned long video_num_cols;
70static unsigned long video_num_rows;
71static unsigned long video_x;
72static unsigned long video_y;
73static unsigned char bytes_per_char_v;
74static int white;
75
76/*
77 * This does not append a newline
78 */
79static void putc(int c)
80{
81 extern void ll_write_char(char *, char c, char white);
82 int x,y;
83 char *ptr;
84
85 x = video_x;
86 y = video_y;
87
88 if (c == '\n') {
89 if (++y >= video_num_rows)
90 y--;
91 } else if (c == '\r') {
92 x = 0;
93 } else {
94 ptr = VIDMEM + ((y*video_num_cols*bytes_per_char_v+x)*bytes_per_char_h);
95 ll_write_char(ptr, c, white);
96 if (++x >= video_num_cols) {
97 x = 0;
98 if ( ++y >= video_num_rows ) {
99 y--;
100 }
101 }
102 }
103
104 video_x = x;
105 video_y = y;
106}
107
108static inline void flush(void)
109{
110}
111
112static void error(char *x);
113
114/*
115 * Setup for decompression
116 */
117static void arch_decomp_setup(void)
118{
119 int i;
120 struct tag *t = (struct tag *)params;
121 unsigned int nr_pages = 0, page_size = PAGE_SIZE;
122
123 if (t->hdr.tag == ATAG_CORE)
124 {
125 for (; t->hdr.size; t = tag_next(t))
126 {
127 if (t->hdr.tag == ATAG_VIDEOTEXT)
128 {
129 video_num_rows = t->u.videotext.video_lines;
130 video_num_cols = t->u.videotext.video_cols;
131 bytes_per_char_h = t->u.videotext.video_points;
132 bytes_per_char_v = t->u.videotext.video_points;
133 video_x = t->u.videotext.x;
134 video_y = t->u.videotext.y;
135 }
136
137 if (t->hdr.tag == ATAG_MEM)
138 {
139 page_size = PAGE_SIZE;
140 nr_pages += (t->u.mem.size / PAGE_SIZE);
141 }
142 }
143 }
144 else
145 {
146 nr_pages = params->nr_pages;
147 page_size = params->page_size;
148 video_num_rows = params->video_num_rows;
149 video_num_cols = params->video_num_cols;
150 video_x = params->video_x;
151 video_y = params->video_y;
152 bytes_per_char_h = params->bytes_per_char_h;
153 bytes_per_char_v = params->bytes_per_char_v;
154 }
155
156 video_size_row = video_num_cols * bytes_per_char_h;
157
158 if (bytes_per_char_h == 4)
159 for (i = 0; i < 256; i++)
160 con_charconvtable[i] =
161 (i & 128 ? 1 << 0 : 0) |
162 (i & 64 ? 1 << 4 : 0) |
163 (i & 32 ? 1 << 8 : 0) |
164 (i & 16 ? 1 << 12 : 0) |
165 (i & 8 ? 1 << 16 : 0) |
166 (i & 4 ? 1 << 20 : 0) |
167 (i & 2 ? 1 << 24 : 0) |
168 (i & 1 ? 1 << 28 : 0);
169 else
170 for (i = 0; i < 16; i++)
171 con_charconvtable[i] =
172 (i & 8 ? 1 << 0 : 0) |
173 (i & 4 ? 1 << 8 : 0) |
174 (i & 2 ? 1 << 16 : 0) |
175 (i & 1 ? 1 << 24 : 0);
176
177
178 palette_setpixel(0);
179 if (bytes_per_char_h == 1) {
180 palette_write (0);
181 palette_write (0x00ffffff);
182 for (i = 2; i < 256; i++)
183 palette_write (0);
184 white = 1;
185 } else {
186 for (i = 0; i < 256; i++)
187 palette_write (i < 16 ? palette_4[i] : 0);
188 white = 7;
189 }
190
191 if (nr_pages * page_size < 4096*1024) error("<4M of mem\n");
192}
193#endif
194
195/*
196 * nothing to do
197 */
198#define arch_decomp_wdog()
diff --git a/arch/arm/mach-rpc/include/mach/vmalloc.h b/arch/arm/mach-rpc/include/mach/vmalloc.h
new file mode 100644
index 000000000000..9a96fd69e705
--- /dev/null
+++ b/arch/arm/mach-rpc/include/mach/vmalloc.h
@@ -0,0 +1,10 @@
1/*
2 * arch/arm/mach-rpc/include/mach/vmalloc.h
3 *
4 * Copyright (C) 1997 Russell King
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10#define VMALLOC_END (PAGE_OFFSET + 0x1c000000)
diff --git a/arch/arm/mach-rpc/riscpc.c b/arch/arm/mach-rpc/riscpc.c
index eca558c6bf5d..ce8470fea887 100644
--- a/arch/arm/mach-rpc/riscpc.c
+++ b/arch/arm/mach-rpc/riscpc.c
@@ -22,7 +22,7 @@
22#include <asm/elf.h> 22#include <asm/elf.h>
23#include <asm/io.h> 23#include <asm/io.h>
24#include <asm/mach-types.h> 24#include <asm/mach-types.h>
25#include <asm/hardware.h> 25#include <mach/hardware.h>
26#include <asm/page.h> 26#include <asm/page.h>
27#include <asm/domain.h> 27#include <asm/domain.h>
28#include <asm/setup.h> 28#include <asm/setup.h>
diff --git a/arch/arm/mach-s3c2400/gpio.c b/arch/arm/mach-s3c2400/gpio.c
index 758e160410e9..148d0ddef3e8 100644
--- a/arch/arm/mach-s3c2400/gpio.c
+++ b/arch/arm/mach-s3c2400/gpio.c
@@ -25,11 +25,11 @@
25#include <linux/interrupt.h> 25#include <linux/interrupt.h>
26#include <linux/ioport.h> 26#include <linux/ioport.h>
27 27
28#include <asm/hardware.h> 28#include <mach/hardware.h>
29#include <asm/irq.h> 29#include <asm/irq.h>
30#include <asm/io.h> 30#include <asm/io.h>
31 31
32#include <asm/arch/regs-gpio.h> 32#include <mach/regs-gpio.h>
33 33
34int s3c2400_gpio_getirq(unsigned int pin) 34int s3c2400_gpio_getirq(unsigned int pin)
35{ 35{
diff --git a/arch/arm/mach-s3c2400/include/mach/map.h b/arch/arm/mach-s3c2400/include/mach/map.h
new file mode 100644
index 000000000000..1535540edc82
--- /dev/null
+++ b/arch/arm/mach-s3c2400/include/mach/map.h
@@ -0,0 +1,66 @@
1/* arch/arm/mach-s3c2400/include/mach/map.h
2 *
3 * Copyright 2003,2007 Simtec Electronics
4 * http://armlinux.simtec.co.uk/
5 * Ben Dooks <ben@simtec.co.uk>
6 *
7 * Copyright 2003, Lucas Correia Villa Real
8 *
9 * S3C2400 - Memory map definitions
10 *
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License version 2 as
13 * published by the Free Software Foundation.
14*/
15
16#define S3C2400_PA_MEMCTRL (0x14000000)
17#define S3C2400_PA_USBHOST (0x14200000)
18#define S3C2400_PA_IRQ (0x14400000)
19#define S3C2400_PA_DMA (0x14600000)
20#define S3C2400_PA_CLKPWR (0x14800000)
21#define S3C2400_PA_LCD (0x14A00000)
22#define S3C2400_PA_UART (0x15000000)
23#define S3C2400_PA_TIMER (0x15100000)
24#define S3C2400_PA_USBDEV (0x15200140)
25#define S3C2400_PA_WATCHDOG (0x15300000)
26#define S3C2400_PA_IIC (0x15400000)
27#define S3C2400_PA_IIS (0x15508000)
28#define S3C2400_PA_GPIO (0x15600000)
29#define S3C2400_PA_RTC (0x15700040)
30#define S3C2400_PA_ADC (0x15800000)
31#define S3C2400_PA_SPI (0x15900000)
32
33#define S3C2400_PA_MMC (0x15A00000)
34#define S3C2400_SZ_MMC SZ_1M
35
36/* physical addresses of all the chip-select areas */
37
38#define S3C2400_CS0 (0x00000000)
39#define S3C2400_CS1 (0x02000000)
40#define S3C2400_CS2 (0x04000000)
41#define S3C2400_CS3 (0x06000000)
42#define S3C2400_CS4 (0x08000000)
43#define S3C2400_CS5 (0x0A000000)
44#define S3C2400_CS6 (0x0C000000)
45#define S3C2400_CS7 (0x0E000000)
46
47#define S3C2400_SDRAM_PA (S3C2400_CS6)
48
49/* Use a single interface for common resources between S3C24XX cpus */
50
51#define S3C24XX_PA_IRQ S3C2400_PA_IRQ
52#define S3C24XX_PA_MEMCTRL S3C2400_PA_MEMCTRL
53#define S3C24XX_PA_USBHOST S3C2400_PA_USBHOST
54#define S3C24XX_PA_DMA S3C2400_PA_DMA
55#define S3C24XX_PA_CLKPWR S3C2400_PA_CLKPWR
56#define S3C24XX_PA_LCD S3C2400_PA_LCD
57#define S3C24XX_PA_UART S3C2400_PA_UART
58#define S3C24XX_PA_TIMER S3C2400_PA_TIMER
59#define S3C24XX_PA_USBDEV S3C2400_PA_USBDEV
60#define S3C24XX_PA_WATCHDOG S3C2400_PA_WATCHDOG
61#define S3C24XX_PA_IIC S3C2400_PA_IIC
62#define S3C24XX_PA_IIS S3C2400_PA_IIS
63#define S3C24XX_PA_GPIO S3C2400_PA_GPIO
64#define S3C24XX_PA_RTC S3C2400_PA_RTC
65#define S3C24XX_PA_ADC S3C2400_PA_ADC
66#define S3C24XX_PA_SPI S3C2400_PA_SPI
diff --git a/arch/arm/mach-s3c2400/include/mach/memory.h b/arch/arm/mach-s3c2400/include/mach/memory.h
new file mode 100644
index 000000000000..8f4878e4f591
--- /dev/null
+++ b/arch/arm/mach-s3c2400/include/mach/memory.h
@@ -0,0 +1,23 @@
1/* arch/arm/mach-s3c2400/include/mach/memory.h
2 * from arch/arm/mach-rpc/include/mach/memory.h
3 *
4 * Copyright 2007 Simtec Electronics
5 * http://armlinux.simtec.co.uk/
6 * Ben Dooks <ben@simtec.co.uk>
7 *
8 * Copyright (C) 1996,1997,1998 Russell King.
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
13*/
14
15#ifndef __ASM_ARCH_MEMORY_H
16#define __ASM_ARCH_MEMORY_H
17
18#define PHYS_OFFSET UL(0x0C000000)
19
20#define __virt_to_bus(x) __virt_to_phys(x)
21#define __bus_to_virt(x) __phys_to_virt(x)
22
23#endif
diff --git a/arch/arm/mach-s3c2410/bast-ide.c b/arch/arm/mach-s3c2410/bast-ide.c
index df95fe37cdc8..298ececfa366 100644
--- a/arch/arm/mach-s3c2410/bast-ide.c
+++ b/arch/arm/mach-s3c2410/bast-ide.c
@@ -24,9 +24,9 @@
24#include <asm/mach/map.h> 24#include <asm/mach/map.h>
25#include <asm/mach/irq.h> 25#include <asm/mach/irq.h>
26 26
27#include <asm/arch/map.h> 27#include <mach/map.h>
28#include <asm/arch/bast-map.h> 28#include <mach/bast-map.h>
29#include <asm/arch/bast-irq.h> 29#include <mach/bast-irq.h>
30 30
31/* IDE ports */ 31/* IDE ports */
32 32
diff --git a/arch/arm/mach-s3c2410/bast-irq.c b/arch/arm/mach-s3c2410/bast-irq.c
index 76a7cb15f3be..c66021b5fa4d 100644
--- a/arch/arm/mach-s3c2410/bast-irq.c
+++ b/arch/arm/mach-s3c2410/bast-irq.c
@@ -28,15 +28,15 @@
28 28
29#include <asm/mach-types.h> 29#include <asm/mach-types.h>
30 30
31#include <asm/hardware.h> 31#include <mach/hardware.h>
32#include <asm/irq.h> 32#include <asm/irq.h>
33#include <asm/io.h> 33#include <asm/io.h>
34 34
35#include <asm/mach/irq.h> 35#include <asm/mach/irq.h>
36 36
37#include <asm/arch/regs-irq.h> 37#include <mach/regs-irq.h>
38#include <asm/arch/bast-map.h> 38#include <mach/bast-map.h>
39#include <asm/arch/bast-irq.h> 39#include <mach/bast-irq.h>
40 40
41#include <asm/plat-s3c24xx/irq.h> 41#include <asm/plat-s3c24xx/irq.h>
42 42
diff --git a/arch/arm/mach-s3c2410/clock.c b/arch/arm/mach-s3c2410/clock.c
index 2bfaa6102025..1322851d1acb 100644
--- a/arch/arm/mach-s3c2410/clock.c
+++ b/arch/arm/mach-s3c2410/clock.c
@@ -34,12 +34,12 @@
34 34
35#include <asm/mach/map.h> 35#include <asm/mach/map.h>
36 36
37#include <asm/hardware.h> 37#include <mach/hardware.h>
38#include <asm/io.h> 38#include <asm/io.h>
39 39
40#include <asm/plat-s3c/regs-serial.h> 40#include <asm/plat-s3c/regs-serial.h>
41#include <asm/arch/regs-clock.h> 41#include <mach/regs-clock.h>
42#include <asm/arch/regs-gpio.h> 42#include <mach/regs-gpio.h>
43 43
44#include <asm/plat-s3c24xx/s3c2410.h> 44#include <asm/plat-s3c24xx/s3c2410.h>
45#include <asm/plat-s3c24xx/clock.h> 45#include <asm/plat-s3c24xx/clock.h>
diff --git a/arch/arm/mach-s3c2410/dma.c b/arch/arm/mach-s3c2410/dma.c
index 8f12e855ef5f..8730797749e3 100644
--- a/arch/arm/mach-s3c2410/dma.c
+++ b/arch/arm/mach-s3c2410/dma.c
@@ -18,17 +18,17 @@
18#include <linux/serial_core.h> 18#include <linux/serial_core.h>
19 19
20#include <asm/dma.h> 20#include <asm/dma.h>
21#include <asm/arch/dma.h> 21#include <mach/dma.h>
22 22
23#include <asm/plat-s3c24xx/cpu.h> 23#include <asm/plat-s3c24xx/cpu.h>
24#include <asm/plat-s3c24xx/dma.h> 24#include <asm/plat-s3c24xx/dma.h>
25 25
26#include <asm/plat-s3c/regs-serial.h> 26#include <asm/plat-s3c/regs-serial.h>
27#include <asm/arch/regs-gpio.h> 27#include <mach/regs-gpio.h>
28#include <asm/plat-s3c/regs-ac97.h> 28#include <asm/plat-s3c/regs-ac97.h>
29#include <asm/arch/regs-mem.h> 29#include <mach/regs-mem.h>
30#include <asm/arch/regs-lcd.h> 30#include <mach/regs-lcd.h>
31#include <asm/arch/regs-sdi.h> 31#include <mach/regs-sdi.h>
32#include <asm/plat-s3c24xx/regs-iis.h> 32#include <asm/plat-s3c24xx/regs-iis.h>
33#include <asm/plat-s3c24xx/regs-spi.h> 33#include <asm/plat-s3c24xx/regs-spi.h>
34 34
diff --git a/arch/arm/mach-s3c2410/gpio.c b/arch/arm/mach-s3c2410/gpio.c
index 01e795d1146e..c6eefb1d590c 100644
--- a/arch/arm/mach-s3c2410/gpio.c
+++ b/arch/arm/mach-s3c2410/gpio.c
@@ -26,11 +26,11 @@
26#include <linux/interrupt.h> 26#include <linux/interrupt.h>
27#include <linux/ioport.h> 27#include <linux/ioport.h>
28 28
29#include <asm/hardware.h> 29#include <mach/hardware.h>
30#include <asm/irq.h> 30#include <asm/irq.h>
31#include <asm/io.h> 31#include <asm/io.h>
32 32
33#include <asm/arch/regs-gpio.h> 33#include <mach/regs-gpio.h>
34 34
35int s3c2410_gpio_irqfilter(unsigned int pin, unsigned int on, 35int s3c2410_gpio_irqfilter(unsigned int pin, unsigned int on,
36 unsigned int config) 36 unsigned int config)
diff --git a/arch/arm/mach-s3c2410/h1940-bluetooth.c b/arch/arm/mach-s3c2410/h1940-bluetooth.c
index 3c48886521e7..5a6bc56f186b 100644
--- a/arch/arm/mach-s3c2410/h1940-bluetooth.c
+++ b/arch/arm/mach-s3c2410/h1940-bluetooth.c
@@ -16,9 +16,9 @@
16#include <linux/string.h> 16#include <linux/string.h>
17#include <linux/ctype.h> 17#include <linux/ctype.h>
18#include <linux/leds.h> 18#include <linux/leds.h>
19#include <asm/arch/regs-gpio.h> 19#include <mach/regs-gpio.h>
20#include <asm/hardware.h> 20#include <mach/hardware.h>
21#include <asm/arch/h1940-latch.h> 21#include <mach/h1940-latch.h>
22 22
23#define DRV_NAME "h1940-bt" 23#define DRV_NAME "h1940-bt"
24 24
diff --git a/arch/arm/mach-s3c2410/include/mach/anubis-cpld.h b/arch/arm/mach-s3c2410/include/mach/anubis-cpld.h
new file mode 100644
index 000000000000..1b614d5a81f3
--- /dev/null
+++ b/arch/arm/mach-s3c2410/include/mach/anubis-cpld.h
@@ -0,0 +1,25 @@
1/* arch/arm/mach-s3c2410/include/mach/anubis-cpld.h
2 *
3 * Copyright (c) 2005 Simtec Electronics
4 * http://www.simtec.co.uk/products/
5 * Ben Dooks <ben@simtec.co.uk>
6 *
7 * ANUBIS - CPLD control constants
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12*/
13
14#ifndef __ASM_ARCH_ANUBISCPLD_H
15#define __ASM_ARCH_ANUBISCPLD_H
16
17/* CTRL2 - NAND WP control, IDE Reset assert/check */
18
19#define ANUBIS_CTRL1_NANDSEL (0x3)
20
21/* IDREG - revision */
22
23#define ANUBIS_IDREG_REVMASK (0x7)
24
25#endif /* __ASM_ARCH_ANUBISCPLD_H */
diff --git a/arch/arm/mach-s3c2410/include/mach/anubis-irq.h b/arch/arm/mach-s3c2410/include/mach/anubis-irq.h
new file mode 100644
index 000000000000..a2a328134e34
--- /dev/null
+++ b/arch/arm/mach-s3c2410/include/mach/anubis-irq.h
@@ -0,0 +1,21 @@
1/* arch/arm/mach-s3c2410/include/mach/anubis-irq.h
2 *
3 * Copyright (c) 2005 Simtec Electronics
4 * http://www.simtec.co.uk/products/
5 * Ben Dooks <ben@simtec.co.uk>
6 *
7 * ANUBIS - IRQ Number definitions
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12*/
13
14#ifndef __ASM_ARCH_ANUBISIRQ_H
15#define __ASM_ARCH_ANUBISIRQ_H
16
17#define IRQ_IDE0 IRQ_EINT2
18#define IRQ_IDE1 IRQ_EINT3
19#define IRQ_ASIX IRQ_EINT1
20
21#endif /* __ASM_ARCH_ANUBISIRQ_H */
diff --git a/arch/arm/mach-s3c2410/include/mach/anubis-map.h b/arch/arm/mach-s3c2410/include/mach/anubis-map.h
new file mode 100644
index 000000000000..c9deb3a5b2c3
--- /dev/null
+++ b/arch/arm/mach-s3c2410/include/mach/anubis-map.h
@@ -0,0 +1,38 @@
1/* arch/arm/mach-s3c2410/include/mach/anubis-map.h
2 *
3 * Copyright (c) 2005 Simtec Electronics
4 * http://www.simtec.co.uk/products/
5 * Ben Dooks <ben@simtec.co.uk>
6 *
7 * ANUBIS - Memory map definitions
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12*/
13
14/* needs arch/map.h including with this */
15
16#ifndef __ASM_ARCH_ANUBISMAP_H
17#define __ASM_ARCH_ANUBISMAP_H
18
19/* start peripherals off after the S3C2410 */
20
21#define ANUBIS_IOADDR(x) (S3C2410_ADDR((x) + 0x01800000))
22
23#define ANUBIS_PA_CPLD (S3C2410_CS1 | (1<<26))
24
25/* we put the CPLD registers next, to get them out of the way */
26
27#define ANUBIS_VA_CTRL1 ANUBIS_IOADDR(0x00000000) /* 0x01800000 */
28#define ANUBIS_PA_CTRL1 (ANUBIS_PA_CPLD)
29
30#define ANUBIS_VA_IDREG ANUBIS_IOADDR(0x00300000) /* 0x01B00000 */
31#define ANUBIS_PA_IDREG (ANUBIS_PA_CPLD + (3<<23))
32
33#define ANUBIS_IDEPRI ANUBIS_IOADDR(0x01000000)
34#define ANUBIS_IDEPRIAUX ANUBIS_IOADDR(0x01100000)
35#define ANUBIS_IDESEC ANUBIS_IOADDR(0x01200000)
36#define ANUBIS_IDESECAUX ANUBIS_IOADDR(0x01300000)
37
38#endif /* __ASM_ARCH_ANUBISMAP_H */
diff --git a/arch/arm/mach-s3c2410/include/mach/audio.h b/arch/arm/mach-s3c2410/include/mach/audio.h
new file mode 100644
index 000000000000..de0e8da48bc3
--- /dev/null
+++ b/arch/arm/mach-s3c2410/include/mach/audio.h
@@ -0,0 +1,45 @@
1/* arch/arm/mach-s3c2410/include/mach/audio.h
2 *
3 * Copyright (c) 2004-2005 Simtec Electronics
4 * http://www.simtec.co.uk/products/SWLINUX/
5 * Ben Dooks <ben@simtec.co.uk>
6 *
7 * S3C24XX - Audio platfrom_device info
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12*/
13
14#ifndef __ASM_ARCH_AUDIO_H
15#define __ASM_ARCH_AUDIO_H __FILE__
16
17/* struct s3c24xx_iis_ops
18 *
19 * called from the s3c24xx audio core to deal with the architecture
20 * or the codec's setup and control.
21 *
22 * the pointer to itself is passed through in case the caller wants to
23 * embed this in an larger structure for easy reference to it's context.
24*/
25
26struct s3c24xx_iis_ops {
27 struct module *owner;
28
29 int (*startup)(struct s3c24xx_iis_ops *me);
30 void (*shutdown)(struct s3c24xx_iis_ops *me);
31 int (*suspend)(struct s3c24xx_iis_ops *me);
32 int (*resume)(struct s3c24xx_iis_ops *me);
33
34 int (*open)(struct s3c24xx_iis_ops *me, struct snd_pcm_substream *strm);
35 int (*close)(struct s3c24xx_iis_ops *me, struct snd_pcm_substream *strm);
36 int (*prepare)(struct s3c24xx_iis_ops *me, struct snd_pcm_substream *strm, struct snd_pcm_runtime *rt);
37};
38
39struct s3c24xx_platdata_iis {
40 const char *codec_clk;
41 struct s3c24xx_iis_ops *ops;
42 int (*match_dev)(struct device *dev);
43};
44
45#endif /* __ASM_ARCH_AUDIO_H */
diff --git a/arch/arm/mach-s3c2410/include/mach/bast-cpld.h b/arch/arm/mach-s3c2410/include/mach/bast-cpld.h
new file mode 100644
index 000000000000..20493b048360
--- /dev/null
+++ b/arch/arm/mach-s3c2410/include/mach/bast-cpld.h
@@ -0,0 +1,53 @@
1/* arch/arm/mach-s3c2410/include/mach/bast-cpld.h
2 *
3 * Copyright (c) 2003,2004 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * BAST - CPLD control constants
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11*/
12
13#ifndef __ASM_ARCH_BASTCPLD_H
14#define __ASM_ARCH_BASTCPLD_H
15
16/* CTRL1 - Audio LR routing */
17
18#define BAST_CPLD_CTRL1_LRCOFF (0x00)
19#define BAST_CPLD_CTRL1_LRCADC (0x01)
20#define BAST_CPLD_CTRL1_LRCDAC (0x02)
21#define BAST_CPLD_CTRL1_LRCARM (0x03)
22#define BAST_CPLD_CTRL1_LRMASK (0x03)
23
24/* CTRL2 - NAND WP control, IDE Reset assert/check */
25
26#define BAST_CPLD_CTRL2_WNAND (0x04)
27#define BAST_CPLD_CTLR2_IDERST (0x08)
28
29/* CTRL3 - rom write control, CPLD identity */
30
31#define BAST_CPLD_CTRL3_IDMASK (0x0e)
32#define BAST_CPLD_CTRL3_ROMWEN (0x01)
33
34/* CTRL4 - 8bit LCD interface control/status */
35
36#define BAST_CPLD_CTRL4_LLAT (0x01)
37#define BAST_CPLD_CTRL4_LCDRW (0x02)
38#define BAST_CPLD_CTRL4_LCDCMD (0x04)
39#define BAST_CPLD_CTRL4_LCDE2 (0x01)
40
41/* CTRL5 - DMA routing */
42
43#define BAST_CPLD_DMA0_PRIIDE (0<<0)
44#define BAST_CPLD_DMA0_SECIDE (1<<0)
45#define BAST_CPLD_DMA0_ISA15 (2<<0)
46#define BAST_CPLD_DMA0_ISA36 (3<<0)
47
48#define BAST_CPLD_DMA1_PRIIDE (0<<2)
49#define BAST_CPLD_DMA1_SECIDE (1<<2)
50#define BAST_CPLD_DMA1_ISA15 (2<<2)
51#define BAST_CPLD_DMA1_ISA36 (3<<2)
52
53#endif /* __ASM_ARCH_BASTCPLD_H */
diff --git a/arch/arm/mach-s3c2410/include/mach/bast-irq.h b/arch/arm/mach-s3c2410/include/mach/bast-irq.h
new file mode 100644
index 000000000000..501c202b53cf
--- /dev/null
+++ b/arch/arm/mach-s3c2410/include/mach/bast-irq.h
@@ -0,0 +1,29 @@
1/* arch/arm/mach-s3c2410/include/mach/bast-irq.h
2 *
3 * Copyright (c) 2003,2004 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * Machine BAST - IRQ Number definitions
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11*/
12
13#ifndef __ASM_ARCH_BASTIRQ_H
14#define __ASM_ARCH_BASTIRQ_H
15
16/* irq numbers to onboard peripherals */
17
18#define IRQ_USBOC IRQ_EINT18
19#define IRQ_IDE0 IRQ_EINT16
20#define IRQ_IDE1 IRQ_EINT17
21#define IRQ_PCSERIAL1 IRQ_EINT15
22#define IRQ_PCSERIAL2 IRQ_EINT14
23#define IRQ_PCPARALLEL IRQ_EINT13
24#define IRQ_ASIX IRQ_EINT11
25#define IRQ_DM9000 IRQ_EINT10
26#define IRQ_ISA IRQ_EINT9
27#define IRQ_SMALERT IRQ_EINT8
28
29#endif /* __ASM_ARCH_BASTIRQ_H */
diff --git a/arch/arm/mach-s3c2410/include/mach/bast-map.h b/arch/arm/mach-s3c2410/include/mach/bast-map.h
new file mode 100644
index 000000000000..c2c5baf07345
--- /dev/null
+++ b/arch/arm/mach-s3c2410/include/mach/bast-map.h
@@ -0,0 +1,146 @@
1/* arch/arm/mach-s3c2410/include/mach/bast-map.h
2 *
3 * Copyright (c) 2003,2004 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * Machine BAST - Memory map definitions
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11*/
12
13/* needs arch/map.h including with this */
14
15/* ok, we've used up to 0x13000000, now we need to find space for the
16 * peripherals that live in the nGCS[x] areas, which are quite numerous
17 * in their space. We also have the board's CPLD to find register space
18 * for.
19 */
20
21#ifndef __ASM_ARCH_BASTMAP_H
22#define __ASM_ARCH_BASTMAP_H
23
24#define BAST_IOADDR(x) (S3C2410_ADDR((x) + 0x01300000))
25
26/* we put the CPLD registers next, to get them out of the way */
27
28#define BAST_VA_CTRL1 BAST_IOADDR(0x00000000) /* 0x01300000 */
29#define BAST_PA_CTRL1 (S3C2410_CS5 | 0x7800000)
30
31#define BAST_VA_CTRL2 BAST_IOADDR(0x00100000) /* 0x01400000 */
32#define BAST_PA_CTRL2 (S3C2410_CS1 | 0x6000000)
33
34#define BAST_VA_CTRL3 BAST_IOADDR(0x00200000) /* 0x01500000 */
35#define BAST_PA_CTRL3 (S3C2410_CS1 | 0x6800000)
36
37#define BAST_VA_CTRL4 BAST_IOADDR(0x00300000) /* 0x01600000 */
38#define BAST_PA_CTRL4 (S3C2410_CS1 | 0x7000000)
39
40/* next, we have the PC104 ISA interrupt registers */
41
42#define BAST_PA_PC104_IRQREQ (S3C2410_CS5 | 0x6000000) /* 0x01700000 */
43#define BAST_VA_PC104_IRQREQ BAST_IOADDR(0x00400000)
44
45#define BAST_PA_PC104_IRQRAW (S3C2410_CS5 | 0x6800000) /* 0x01800000 */
46#define BAST_VA_PC104_IRQRAW BAST_IOADDR(0x00500000)
47
48#define BAST_PA_PC104_IRQMASK (S3C2410_CS5 | 0x7000000) /* 0x01900000 */
49#define BAST_VA_PC104_IRQMASK BAST_IOADDR(0x00600000)
50
51#define BAST_PA_LCD_RCMD1 (0x8800000)
52#define BAST_VA_LCD_RCMD1 BAST_IOADDR(0x00700000)
53
54#define BAST_PA_LCD_WCMD1 (0x8000000)
55#define BAST_VA_LCD_WCMD1 BAST_IOADDR(0x00800000)
56
57#define BAST_PA_LCD_RDATA1 (0x9800000)
58#define BAST_VA_LCD_RDATA1 BAST_IOADDR(0x00900000)
59
60#define BAST_PA_LCD_WDATA1 (0x9000000)
61#define BAST_VA_LCD_WDATA1 BAST_IOADDR(0x00A00000)
62
63#define BAST_PA_LCD_RCMD2 (0xA800000)
64#define BAST_VA_LCD_RCMD2 BAST_IOADDR(0x00B00000)
65
66#define BAST_PA_LCD_WCMD2 (0xA000000)
67#define BAST_VA_LCD_WCMD2 BAST_IOADDR(0x00C00000)
68
69#define BAST_PA_LCD_RDATA2 (0xB800000)
70#define BAST_VA_LCD_RDATA2 BAST_IOADDR(0x00D00000)
71
72#define BAST_PA_LCD_WDATA2 (0xB000000)
73#define BAST_VA_LCD_WDATA2 BAST_IOADDR(0x00E00000)
74
75
76/* 0xE0000000 contains the IO space that is split by speed and
77 * wether the access is for 8 or 16bit IO... this ensures that
78 * the correct access is made
79 *
80 * 0x10000000 of space, partitioned as so:
81 *
82 * 0x00000000 to 0x04000000 8bit, slow
83 * 0x04000000 to 0x08000000 16bit, slow
84 * 0x08000000 to 0x0C000000 16bit, net
85 * 0x0C000000 to 0x10000000 16bit, fast
86 *
87 * each of these spaces has the following in:
88 *
89 * 0x00000000 to 0x01000000 16MB ISA IO space
90 * 0x01000000 to 0x02000000 16MB ISA memory space
91 * 0x02000000 to 0x02100000 1MB IDE primary channel
92 * 0x02100000 to 0x02200000 1MB IDE primary channel aux
93 * 0x02200000 to 0x02400000 1MB IDE secondary channel
94 * 0x02300000 to 0x02400000 1MB IDE secondary channel aux
95 * 0x02400000 to 0x02500000 1MB ASIX ethernet controller
96 * 0x02500000 to 0x02600000 1MB Davicom DM9000 ethernet controller
97 * 0x02600000 to 0x02700000 1MB PC SuperIO controller
98 *
99 * the phyiscal layout of the zones are:
100 * nGCS2 - 8bit, slow
101 * nGCS3 - 16bit, slow
102 * nGCS4 - 16bit, net
103 * nGCS5 - 16bit, fast
104 */
105
106#define BAST_VA_MULTISPACE (0xE0000000)
107
108#define BAST_VA_ISAIO (BAST_VA_MULTISPACE + 0x00000000)
109#define BAST_VA_ISAMEM (BAST_VA_MULTISPACE + 0x01000000)
110#define BAST_VA_IDEPRI (BAST_VA_MULTISPACE + 0x02000000)
111#define BAST_VA_IDEPRIAUX (BAST_VA_MULTISPACE + 0x02100000)
112#define BAST_VA_IDESEC (BAST_VA_MULTISPACE + 0x02200000)
113#define BAST_VA_IDESECAUX (BAST_VA_MULTISPACE + 0x02300000)
114#define BAST_VA_ASIXNET (BAST_VA_MULTISPACE + 0x02400000)
115#define BAST_VA_DM9000 (BAST_VA_MULTISPACE + 0x02500000)
116#define BAST_VA_SUPERIO (BAST_VA_MULTISPACE + 0x02600000)
117
118#define BAST_VA_MULTISPACE (0xE0000000)
119
120#define BAST_VAM_CS2 (0x00000000)
121#define BAST_VAM_CS3 (0x04000000)
122#define BAST_VAM_CS4 (0x08000000)
123#define BAST_VAM_CS5 (0x0C000000)
124
125/* physical offset addresses for the peripherals */
126
127#define BAST_PA_ISAIO (0x00000000)
128#define BAST_PA_ASIXNET (0x01000000)
129#define BAST_PA_SUPERIO (0x01800000)
130#define BAST_PA_IDEPRI (0x02000000)
131#define BAST_PA_IDEPRIAUX (0x02800000)
132#define BAST_PA_IDESEC (0x03000000)
133#define BAST_PA_IDESECAUX (0x03800000)
134#define BAST_PA_ISAMEM (0x04000000)
135#define BAST_PA_DM9000 (0x05000000)
136
137/* some configurations for the peripherals */
138
139#define BAST_PCSIO (BAST_VA_SUPERIO + BAST_VAM_CS2)
140/* */
141
142#define BAST_ASIXNET_CS BAST_VAM_CS5
143#define BAST_IDE_CS BAST_VAM_CS5
144#define BAST_DM9000_CS BAST_VAM_CS4
145
146#endif /* __ASM_ARCH_BASTMAP_H */
diff --git a/arch/arm/mach-s3c2410/include/mach/bast-pmu.h b/arch/arm/mach-s3c2410/include/mach/bast-pmu.h
new file mode 100644
index 000000000000..61684cb8ce59
--- /dev/null
+++ b/arch/arm/mach-s3c2410/include/mach/bast-pmu.h
@@ -0,0 +1,40 @@
1/* arch/arm/mach-s3c2410/include/mach/bast-pmu.h
2 *
3 * Copyright (c) 2003,2004 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 * Vincent Sanders <vince@simtec.co.uk>
6 *
7 * Machine BAST - Power Management chip
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12*/
13
14#ifndef __ASM_ARCH_BASTPMU_H
15#define __ASM_ARCH_BASTPMU_H "08_OCT_2004"
16
17#define BASTPMU_REG_IDENT (0x00)
18#define BASTPMU_REG_VERSION (0x01)
19#define BASTPMU_REG_DDCCTRL (0x02)
20#define BASTPMU_REG_POWER (0x03)
21#define BASTPMU_REG_RESET (0x04)
22#define BASTPMU_REG_GWO (0x05)
23#define BASTPMU_REG_WOL (0x06)
24#define BASTPMU_REG_WOR (0x07)
25#define BASTPMU_REG_UID (0x09)
26
27#define BASTPMU_EEPROM (0xC0)
28
29#define BASTPMU_EEP_UID (BASTPMU_EEPROM + 0)
30#define BASTPMU_EEP_WOL (BASTPMU_EEPROM + 8)
31#define BASTPMU_EEP_WOR (BASTPMU_EEPROM + 9)
32
33#define BASTPMU_IDENT_0 0x53
34#define BASTPMU_IDENT_1 0x42
35#define BASTPMU_IDENT_2 0x50
36#define BASTPMU_IDENT_3 0x4d
37
38#define BASTPMU_RESET_GUARD (0x55)
39
40#endif /* __ASM_ARCH_BASTPMU_H */
diff --git a/arch/arm/mach-s3c2410/include/mach/debug-macro.S b/arch/arm/mach-s3c2410/include/mach/debug-macro.S
new file mode 100644
index 000000000000..682df23087ab
--- /dev/null
+++ b/arch/arm/mach-s3c2410/include/mach/debug-macro.S
@@ -0,0 +1,102 @@
1/* arch/arm/mach-s3c2410/include/mach/debug-macro.S
2 *
3 * Debugging macro include header
4 *
5 * Copyright (C) 1994-1999 Russell King
6 * Copyright (C) 2005 Simtec Electronics
7 *
8 * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
13*/
14
15#include <mach/map.h>
16#include <mach/regs-gpio.h>
17#include <asm/plat-s3c/regs-serial.h>
18
19#define S3C2410_UART1_OFF (0x4000)
20#define SHIFT_2440TXF (14-9)
21
22 .macro addruart, rx
23 mrc p15, 0, \rx, c1, c0
24 tst \rx, #1
25 ldreq \rx, = S3C24XX_PA_UART
26 ldrne \rx, = S3C24XX_VA_UART
27#if CONFIG_DEBUG_S3C_UART != 0
28 add \rx, \rx, #(S3C2410_UART1_OFF * CONFIG_DEBUG_S3C_UART)
29#endif
30 .endm
31
32 .macro fifo_full_s3c24xx rd, rx
33 @ check for arm920 vs arm926. currently assume all arm926
34 @ devices have an 64 byte FIFO identical to the s3c2440
35 mrc p15, 0, \rd, c0, c0
36 and \rd, \rd, #0xff0
37 teq \rd, #0x260
38 beq 1004f
39 mrc p15, 0, \rd, c1, c0
40 tst \rd, #1
41 addeq \rd, \rx, #(S3C24XX_PA_GPIO - S3C24XX_PA_UART)
42 addne \rd, \rx, #(S3C24XX_VA_GPIO - S3C24XX_VA_UART)
43 bic \rd, \rd, #0xff000
44 ldr \rd, [ \rd, # S3C2410_GSTATUS1 - S3C2410_GPIOREG(0) ]
45 and \rd, \rd, #0x00ff0000
46 teq \rd, #0x00440000 @ is it 2440?
471004:
48 ldr \rd, [ \rx, # S3C2410_UFSTAT ]
49 moveq \rd, \rd, lsr #SHIFT_2440TXF
50 tst \rd, #S3C2410_UFSTAT_TXFULL
51 .endm
52
53 .macro fifo_full_s3c2410 rd, rx
54 ldr \rd, [ \rx, # S3C2410_UFSTAT ]
55 tst \rd, #S3C2410_UFSTAT_TXFULL
56 .endm
57
58/* fifo level reading */
59
60 .macro fifo_level_s3c24xx rd, rx
61 @ check for arm920 vs arm926. currently assume all arm926
62 @ devices have an 64 byte FIFO identical to the s3c2440
63 mrc p15, 0, \rd, c0, c0
64 and \rd, \rd, #0xff0
65 teq \rd, #0x260
66 beq 10000f
67 mrc p15, 0, \rd, c1, c0
68 tst \rd, #1
69 addeq \rd, \rx, #(S3C24XX_PA_GPIO - S3C24XX_PA_UART)
70 addne \rd, \rx, #(S3C24XX_VA_GPIO - S3C24XX_VA_UART)
71 bic \rd, \rd, #0xff000
72 ldr \rd, [ \rd, # S3C2410_GSTATUS1 - S3C2410_GPIOREG(0) ]
73 and \rd, \rd, #0x00ff0000
74 teq \rd, #0x00440000 @ is it 2440?
75
7610000:
77 ldr \rd, [ \rx, # S3C2410_UFSTAT ]
78 andne \rd, \rd, #S3C2410_UFSTAT_TXMASK
79 andeq \rd, \rd, #S3C2440_UFSTAT_TXMASK
80 .endm
81
82 .macro fifo_level_s3c2410 rd, rx
83 ldr \rd, [ \rx, # S3C2410_UFSTAT ]
84 and \rd, \rd, #S3C2410_UFSTAT_TXMASK
85 .endm
86
87/* Select the correct implementation depending on the configuration. The
88 * S3C2440 will get selected by default, as these are the most widely
89 * used variants of these
90*/
91
92#if defined(CONFIG_CPU_LLSERIAL_S3C2410_ONLY)
93#define fifo_full fifo_full_s3c2410
94#define fifo_level fifo_level_s3c2410
95#elif !defined(CONFIG_CPU_LLSERIAL_S3C2440_ONLY)
96#define fifo_full fifo_full_s3c24xx
97#define fifo_level fifo_level_s3c24xx
98#endif
99
100/* include the reset of the code which will do the work */
101
102#include <asm/plat-s3c/debug-macro.S>
diff --git a/arch/arm/mach-s3c2410/include/mach/dma.h b/arch/arm/mach-s3c2410/include/mach/dma.h
new file mode 100644
index 000000000000..891b53cd69b8
--- /dev/null
+++ b/arch/arm/mach-s3c2410/include/mach/dma.h
@@ -0,0 +1,453 @@
1/* arch/arm/mach-s3c2410/include/mach/dma.h
2 *
3 * Copyright (C) 2003,2004,2006 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * Samsung S3C241XX DMA support
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11*/
12
13#ifndef __ASM_ARCH_DMA_H
14#define __ASM_ARCH_DMA_H __FILE__
15
16#include <linux/sysdev.h>
17#include <mach/hardware.h>
18
19/*
20 * This is the maximum DMA address(physical address) that can be DMAd to.
21 *
22 */
23#define MAX_DMA_ADDRESS 0x40000000
24#define MAX_DMA_TRANSFER_SIZE 0x100000 /* Data Unit is half word */
25
26/* We use `virtual` dma channels to hide the fact we have only a limited
27 * number of DMA channels, and not of all of them (dependant on the device)
28 * can be attached to any DMA source. We therefore let the DMA core handle
29 * the allocation of hardware channels to clients.
30*/
31
32enum dma_ch {
33 DMACH_XD0,
34 DMACH_XD1,
35 DMACH_SDI,
36 DMACH_SPI0,
37 DMACH_SPI1,
38 DMACH_UART0,
39 DMACH_UART1,
40 DMACH_UART2,
41 DMACH_TIMER,
42 DMACH_I2S_IN,
43 DMACH_I2S_OUT,
44 DMACH_PCM_IN,
45 DMACH_PCM_OUT,
46 DMACH_MIC_IN,
47 DMACH_USB_EP1,
48 DMACH_USB_EP2,
49 DMACH_USB_EP3,
50 DMACH_USB_EP4,
51 DMACH_UART0_SRC2, /* s3c2412 second uart sources */
52 DMACH_UART1_SRC2,
53 DMACH_UART2_SRC2,
54 DMACH_UART3, /* s3c2443 has extra uart */
55 DMACH_UART3_SRC2,
56 DMACH_MAX, /* the end entry */
57};
58
59#define DMACH_LOW_LEVEL (1<<28) /* use this to specifiy hardware ch no */
60
61/* we have 4 dma channels */
62#ifndef CONFIG_CPU_S3C2443
63#define S3C2410_DMA_CHANNELS (4)
64#else
65#define S3C2410_DMA_CHANNELS (6)
66#endif
67
68/* types */
69
70enum s3c2410_dma_state {
71 S3C2410_DMA_IDLE,
72 S3C2410_DMA_RUNNING,
73 S3C2410_DMA_PAUSED
74};
75
76
77/* enum s3c2410_dma_loadst
78 *
79 * This represents the state of the DMA engine, wrt to the loaded / running
80 * transfers. Since we don't have any way of knowing exactly the state of
81 * the DMA transfers, we need to know the state to make decisions on wether
82 * we can
83 *
84 * S3C2410_DMA_NONE
85 *
86 * There are no buffers loaded (the channel should be inactive)
87 *
88 * S3C2410_DMA_1LOADED
89 *
90 * There is one buffer loaded, however it has not been confirmed to be
91 * loaded by the DMA engine. This may be because the channel is not
92 * yet running, or the DMA driver decided that it was too costly to
93 * sit and wait for it to happen.
94 *
95 * S3C2410_DMA_1RUNNING
96 *
97 * The buffer has been confirmed running, and not finisged
98 *
99 * S3C2410_DMA_1LOADED_1RUNNING
100 *
101 * There is a buffer waiting to be loaded by the DMA engine, and one
102 * currently running.
103*/
104
105enum s3c2410_dma_loadst {
106 S3C2410_DMALOAD_NONE,
107 S3C2410_DMALOAD_1LOADED,
108 S3C2410_DMALOAD_1RUNNING,
109 S3C2410_DMALOAD_1LOADED_1RUNNING,
110};
111
112enum s3c2410_dma_buffresult {
113 S3C2410_RES_OK,
114 S3C2410_RES_ERR,
115 S3C2410_RES_ABORT
116};
117
118enum s3c2410_dmasrc {
119 S3C2410_DMASRC_HW, /* source is memory */
120 S3C2410_DMASRC_MEM /* source is hardware */
121};
122
123/* enum s3c2410_chan_op
124 *
125 * operation codes passed to the DMA code by the user, and also used
126 * to inform the current channel owner of any changes to the system state
127*/
128
129enum s3c2410_chan_op {
130 S3C2410_DMAOP_START,
131 S3C2410_DMAOP_STOP,
132 S3C2410_DMAOP_PAUSE,
133 S3C2410_DMAOP_RESUME,
134 S3C2410_DMAOP_FLUSH,
135 S3C2410_DMAOP_TIMEOUT, /* internal signal to handler */
136 S3C2410_DMAOP_STARTED, /* indicate channel started */
137};
138
139/* flags */
140
141#define S3C2410_DMAF_SLOW (1<<0) /* slow, so don't worry about
142 * waiting for reloads */
143#define S3C2410_DMAF_AUTOSTART (1<<1) /* auto-start if buffer queued */
144
145/* dma buffer */
146
147struct s3c2410_dma_client {
148 char *name;
149};
150
151/* s3c2410_dma_buf_s
152 *
153 * internally used buffer structure to describe a queued or running
154 * buffer.
155*/
156
157struct s3c2410_dma_buf;
158struct s3c2410_dma_buf {
159 struct s3c2410_dma_buf *next;
160 int magic; /* magic */
161 int size; /* buffer size in bytes */
162 dma_addr_t data; /* start of DMA data */
163 dma_addr_t ptr; /* where the DMA got to [1] */
164 void *id; /* client's id */
165};
166
167/* [1] is this updated for both recv/send modes? */
168
169struct s3c2410_dma_chan;
170
171/* s3c2410_dma_cbfn_t
172 *
173 * buffer callback routine type
174*/
175
176typedef void (*s3c2410_dma_cbfn_t)(struct s3c2410_dma_chan *,
177 void *buf, int size,
178 enum s3c2410_dma_buffresult result);
179
180typedef int (*s3c2410_dma_opfn_t)(struct s3c2410_dma_chan *,
181 enum s3c2410_chan_op );
182
183struct s3c2410_dma_stats {
184 unsigned long loads;
185 unsigned long timeout_longest;
186 unsigned long timeout_shortest;
187 unsigned long timeout_avg;
188 unsigned long timeout_failed;
189};
190
191struct s3c2410_dma_map;
192
193/* struct s3c2410_dma_chan
194 *
195 * full state information for each DMA channel
196*/
197
198struct s3c2410_dma_chan {
199 /* channel state flags and information */
200 unsigned char number; /* number of this dma channel */
201 unsigned char in_use; /* channel allocated */
202 unsigned char irq_claimed; /* irq claimed for channel */
203 unsigned char irq_enabled; /* irq enabled for channel */
204 unsigned char xfer_unit; /* size of an transfer */
205
206 /* channel state */
207
208 enum s3c2410_dma_state state;
209 enum s3c2410_dma_loadst load_state;
210 struct s3c2410_dma_client *client;
211
212 /* channel configuration */
213 enum s3c2410_dmasrc source;
214 unsigned long dev_addr;
215 unsigned long load_timeout;
216 unsigned int flags; /* channel flags */
217 unsigned int hw_cfg; /* last hw config */
218
219 struct s3c24xx_dma_map *map; /* channel hw maps */
220
221 /* channel's hardware position and configuration */
222 void __iomem *regs; /* channels registers */
223 void __iomem *addr_reg; /* data address register */
224 unsigned int irq; /* channel irq */
225 unsigned long dcon; /* default value of DCON */
226
227 /* driver handles */
228 s3c2410_dma_cbfn_t callback_fn; /* buffer done callback */
229 s3c2410_dma_opfn_t op_fn; /* channel op callback */
230
231 /* stats gathering */
232 struct s3c2410_dma_stats *stats;
233 struct s3c2410_dma_stats stats_store;
234
235 /* buffer list and information */
236 struct s3c2410_dma_buf *curr; /* current dma buffer */
237 struct s3c2410_dma_buf *next; /* next buffer to load */
238 struct s3c2410_dma_buf *end; /* end of queue */
239
240 /* system device */
241 struct sys_device dev;
242};
243
244/* the currently allocated channel information */
245extern struct s3c2410_dma_chan s3c2410_chans[];
246
247/* note, we don't really use dma_device_t at the moment */
248typedef unsigned long dma_device_t;
249
250/* functions --------------------------------------------------------------- */
251
252/* s3c2410_dma_request
253 *
254 * request a dma channel exclusivley
255*/
256
257extern int s3c2410_dma_request(dmach_t channel,
258 struct s3c2410_dma_client *, void *dev);
259
260
261/* s3c2410_dma_ctrl
262 *
263 * change the state of the dma channel
264*/
265
266extern int s3c2410_dma_ctrl(dmach_t channel, enum s3c2410_chan_op op);
267
268/* s3c2410_dma_setflags
269 *
270 * set the channel's flags to a given state
271*/
272
273extern int s3c2410_dma_setflags(dmach_t channel,
274 unsigned int flags);
275
276/* s3c2410_dma_free
277 *
278 * free the dma channel (will also abort any outstanding operations)
279*/
280
281extern int s3c2410_dma_free(dmach_t channel, struct s3c2410_dma_client *);
282
283/* s3c2410_dma_enqueue
284 *
285 * place the given buffer onto the queue of operations for the channel.
286 * The buffer must be allocated from dma coherent memory, or the Dcache/WB
287 * drained before the buffer is given to the DMA system.
288*/
289
290extern int s3c2410_dma_enqueue(dmach_t channel, void *id,
291 dma_addr_t data, int size);
292
293/* s3c2410_dma_config
294 *
295 * configure the dma channel
296*/
297
298extern int s3c2410_dma_config(dmach_t channel, int xferunit, int dcon);
299
300/* s3c2410_dma_devconfig
301 *
302 * configure the device we're talking to
303*/
304
305extern int s3c2410_dma_devconfig(int channel, enum s3c2410_dmasrc source,
306 int hwcfg, unsigned long devaddr);
307
308/* s3c2410_dma_getposition
309 *
310 * get the position that the dma transfer is currently at
311*/
312
313extern int s3c2410_dma_getposition(dmach_t channel,
314 dma_addr_t *src, dma_addr_t *dest);
315
316extern int s3c2410_dma_set_opfn(dmach_t, s3c2410_dma_opfn_t rtn);
317extern int s3c2410_dma_set_buffdone_fn(dmach_t, s3c2410_dma_cbfn_t rtn);
318
319/* DMA Register definitions */
320
321#define S3C2410_DMA_DISRC (0x00)
322#define S3C2410_DMA_DISRCC (0x04)
323#define S3C2410_DMA_DIDST (0x08)
324#define S3C2410_DMA_DIDSTC (0x0C)
325#define S3C2410_DMA_DCON (0x10)
326#define S3C2410_DMA_DSTAT (0x14)
327#define S3C2410_DMA_DCSRC (0x18)
328#define S3C2410_DMA_DCDST (0x1C)
329#define S3C2410_DMA_DMASKTRIG (0x20)
330#define S3C2412_DMA_DMAREQSEL (0x24)
331#define S3C2443_DMA_DMAREQSEL (0x24)
332
333#define S3C2410_DISRCC_INC (1<<0)
334#define S3C2410_DISRCC_APB (1<<1)
335
336#define S3C2410_DMASKTRIG_STOP (1<<2)
337#define S3C2410_DMASKTRIG_ON (1<<1)
338#define S3C2410_DMASKTRIG_SWTRIG (1<<0)
339
340#define S3C2410_DCON_DEMAND (0<<31)
341#define S3C2410_DCON_HANDSHAKE (1<<31)
342#define S3C2410_DCON_SYNC_PCLK (0<<30)
343#define S3C2410_DCON_SYNC_HCLK (1<<30)
344
345#define S3C2410_DCON_INTREQ (1<<29)
346
347#define S3C2410_DCON_CH0_XDREQ0 (0<<24)
348#define S3C2410_DCON_CH0_UART0 (1<<24)
349#define S3C2410_DCON_CH0_SDI (2<<24)
350#define S3C2410_DCON_CH0_TIMER (3<<24)
351#define S3C2410_DCON_CH0_USBEP1 (4<<24)
352
353#define S3C2410_DCON_CH1_XDREQ1 (0<<24)
354#define S3C2410_DCON_CH1_UART1 (1<<24)
355#define S3C2410_DCON_CH1_I2SSDI (2<<24)
356#define S3C2410_DCON_CH1_SPI (3<<24)
357#define S3C2410_DCON_CH1_USBEP2 (4<<24)
358
359#define S3C2410_DCON_CH2_I2SSDO (0<<24)
360#define S3C2410_DCON_CH2_I2SSDI (1<<24)
361#define S3C2410_DCON_CH2_SDI (2<<24)
362#define S3C2410_DCON_CH2_TIMER (3<<24)
363#define S3C2410_DCON_CH2_USBEP3 (4<<24)
364
365#define S3C2410_DCON_CH3_UART2 (0<<24)
366#define S3C2410_DCON_CH3_SDI (1<<24)
367#define S3C2410_DCON_CH3_SPI (2<<24)
368#define S3C2410_DCON_CH3_TIMER (3<<24)
369#define S3C2410_DCON_CH3_USBEP4 (4<<24)
370
371#define S3C2410_DCON_SRCSHIFT (24)
372#define S3C2410_DCON_SRCMASK (7<<24)
373
374#define S3C2410_DCON_BYTE (0<<20)
375#define S3C2410_DCON_HALFWORD (1<<20)
376#define S3C2410_DCON_WORD (2<<20)
377
378#define S3C2410_DCON_AUTORELOAD (0<<22)
379#define S3C2410_DCON_NORELOAD (1<<22)
380#define S3C2410_DCON_HWTRIG (1<<23)
381
382#ifdef CONFIG_CPU_S3C2440
383#define S3C2440_DIDSTC_CHKINT (1<<2)
384
385#define S3C2440_DCON_CH0_I2SSDO (5<<24)
386#define S3C2440_DCON_CH0_PCMIN (6<<24)
387
388#define S3C2440_DCON_CH1_PCMOUT (5<<24)
389#define S3C2440_DCON_CH1_SDI (6<<24)
390
391#define S3C2440_DCON_CH2_PCMIN (5<<24)
392#define S3C2440_DCON_CH2_MICIN (6<<24)
393
394#define S3C2440_DCON_CH3_MICIN (5<<24)
395#define S3C2440_DCON_CH3_PCMOUT (6<<24)
396#endif
397
398#ifdef CONFIG_CPU_S3C2412
399
400#define S3C2412_DMAREQSEL_SRC(x) ((x)<<1)
401
402#define S3C2412_DMAREQSEL_HW (1)
403
404#define S3C2412_DMAREQSEL_SPI0TX S3C2412_DMAREQSEL_SRC(0)
405#define S3C2412_DMAREQSEL_SPI0RX S3C2412_DMAREQSEL_SRC(1)
406#define S3C2412_DMAREQSEL_SPI1TX S3C2412_DMAREQSEL_SRC(2)
407#define S3C2412_DMAREQSEL_SPI1RX S3C2412_DMAREQSEL_SRC(3)
408#define S3C2412_DMAREQSEL_I2STX S3C2412_DMAREQSEL_SRC(4)
409#define S3C2412_DMAREQSEL_I2SRX S3C2412_DMAREQSEL_SRC(5)
410#define S3C2412_DMAREQSEL_TIMER S3C2412_DMAREQSEL_SRC(9)
411#define S3C2412_DMAREQSEL_SDI S3C2412_DMAREQSEL_SRC(10)
412#define S3C2412_DMAREQSEL_USBEP1 S3C2412_DMAREQSEL_SRC(13)
413#define S3C2412_DMAREQSEL_USBEP2 S3C2412_DMAREQSEL_SRC(14)
414#define S3C2412_DMAREQSEL_USBEP3 S3C2412_DMAREQSEL_SRC(15)
415#define S3C2412_DMAREQSEL_USBEP4 S3C2412_DMAREQSEL_SRC(16)
416#define S3C2412_DMAREQSEL_XDREQ0 S3C2412_DMAREQSEL_SRC(17)
417#define S3C2412_DMAREQSEL_XDREQ1 S3C2412_DMAREQSEL_SRC(18)
418#define S3C2412_DMAREQSEL_UART0_0 S3C2412_DMAREQSEL_SRC(19)
419#define S3C2412_DMAREQSEL_UART0_1 S3C2412_DMAREQSEL_SRC(20)
420#define S3C2412_DMAREQSEL_UART1_0 S3C2412_DMAREQSEL_SRC(21)
421#define S3C2412_DMAREQSEL_UART1_1 S3C2412_DMAREQSEL_SRC(22)
422#define S3C2412_DMAREQSEL_UART2_0 S3C2412_DMAREQSEL_SRC(23)
423#define S3C2412_DMAREQSEL_UART2_1 S3C2412_DMAREQSEL_SRC(24)
424
425#endif
426
427#define S3C2443_DMAREQSEL_SRC(x) ((x)<<1)
428
429#define S3C2443_DMAREQSEL_HW (1)
430
431#define S3C2443_DMAREQSEL_SPI0TX S3C2443_DMAREQSEL_SRC(0)
432#define S3C2443_DMAREQSEL_SPI0RX S3C2443_DMAREQSEL_SRC(1)
433#define S3C2443_DMAREQSEL_SPI1TX S3C2443_DMAREQSEL_SRC(2)
434#define S3C2443_DMAREQSEL_SPI1RX S3C2443_DMAREQSEL_SRC(3)
435#define S3C2443_DMAREQSEL_I2STX S3C2443_DMAREQSEL_SRC(4)
436#define S3C2443_DMAREQSEL_I2SRX S3C2443_DMAREQSEL_SRC(5)
437#define S3C2443_DMAREQSEL_TIMER S3C2443_DMAREQSEL_SRC(9)
438#define S3C2443_DMAREQSEL_SDI S3C2443_DMAREQSEL_SRC(10)
439#define S3C2443_DMAREQSEL_XDREQ0 S3C2443_DMAREQSEL_SRC(17)
440#define S3C2443_DMAREQSEL_XDREQ1 S3C2443_DMAREQSEL_SRC(18)
441#define S3C2443_DMAREQSEL_UART0_0 S3C2443_DMAREQSEL_SRC(19)
442#define S3C2443_DMAREQSEL_UART0_1 S3C2443_DMAREQSEL_SRC(20)
443#define S3C2443_DMAREQSEL_UART1_0 S3C2443_DMAREQSEL_SRC(21)
444#define S3C2443_DMAREQSEL_UART1_1 S3C2443_DMAREQSEL_SRC(22)
445#define S3C2443_DMAREQSEL_UART2_0 S3C2443_DMAREQSEL_SRC(23)
446#define S3C2443_DMAREQSEL_UART2_1 S3C2443_DMAREQSEL_SRC(24)
447#define S3C2443_DMAREQSEL_UART3_0 S3C2443_DMAREQSEL_SRC(25)
448#define S3C2443_DMAREQSEL_UART3_1 S3C2443_DMAREQSEL_SRC(26)
449#define S3C2443_DMAREQSEL_PCMOUT S3C2443_DMAREQSEL_SRC(27)
450#define S3C2443_DMAREQSEL_PCMIN S3C2443_DMAREQSEL_SRC(28)
451#define S3C2443_DMAREQSEL_MICIN S3C2443_DMAREQSEL_SRC(29)
452
453#endif /* __ASM_ARCH_DMA_H */
diff --git a/arch/arm/mach-s3c2410/include/mach/entry-macro.S b/arch/arm/mach-s3c2410/include/mach/entry-macro.S
new file mode 100644
index 000000000000..473b3cd37d9b
--- /dev/null
+++ b/arch/arm/mach-s3c2410/include/mach/entry-macro.S
@@ -0,0 +1,78 @@
1/*
2 * arch/arm/mach-s3c2410/include/mach/entry-macro.S
3 *
4 * Low-level IRQ helper macros for S3C2410-based platforms
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9*/
10
11/* We have a problem that the INTOFFSET register does not always
12 * show one interrupt. Occasionally we get two interrupts through
13 * the prioritiser, and this causes the INTOFFSET register to show
14 * what looks like the logical-or of the two interrupt numbers.
15 *
16 * Thanks to Klaus, Shannon, et al for helping to debug this problem
17*/
18
19#define INTPND (0x10)
20#define INTOFFSET (0x14)
21
22#include <mach/hardware.h>
23#include <asm/irq.h>
24
25 .macro get_irqnr_preamble, base, tmp
26 .endm
27
28 .macro arch_ret_to_user, tmp1, tmp2
29 .endm
30
31 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
32
33 mov \base, #S3C24XX_VA_IRQ
34
35 @@ try the interrupt offset register, since it is there
36
37 ldr \irqstat, [ \base, #INTPND ]
38 teq \irqstat, #0
39 beq 1002f
40 ldr \irqnr, [ \base, #INTOFFSET ]
41 mov \tmp, #1
42 tst \irqstat, \tmp, lsl \irqnr
43 bne 1001f
44
45 @@ the number specified is not a valid irq, so try
46 @@ and work it out for ourselves
47
48 mov \irqnr, #0 @@ start here
49
50 @@ work out which irq (if any) we got
51
52 movs \tmp, \irqstat, lsl#16
53 addeq \irqnr, \irqnr, #16
54 moveq \irqstat, \irqstat, lsr#16
55 tst \irqstat, #0xff
56 addeq \irqnr, \irqnr, #8
57 moveq \irqstat, \irqstat, lsr#8
58 tst \irqstat, #0xf
59 addeq \irqnr, \irqnr, #4
60 moveq \irqstat, \irqstat, lsr#4
61 tst \irqstat, #0x3
62 addeq \irqnr, \irqnr, #2
63 moveq \irqstat, \irqstat, lsr#2
64 tst \irqstat, #0x1
65 addeq \irqnr, \irqnr, #1
66
67 @@ we have the value
681001:
69 adds \irqnr, \irqnr, #IRQ_EINT0
701002:
71 @@ exit here, Z flag unset if IRQ
72
73 .endm
74
75 /* currently don't need an disable_fiq macro */
76
77 .macro disable_fiq
78 .endm
diff --git a/arch/arm/mach-s3c2410/include/mach/fb.h b/arch/arm/mach-s3c2410/include/mach/fb.h
new file mode 100644
index 000000000000..eee0654eb8fb
--- /dev/null
+++ b/arch/arm/mach-s3c2410/include/mach/fb.h
@@ -0,0 +1,74 @@
1/* arch/arm/mach-s3c2410/include/mach/fb.h
2 *
3 * Copyright (c) 2004 Arnaud Patard <arnaud.patard@rtp-net.org>
4 *
5 * Inspired by pxafb.h
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10*/
11
12#ifndef __ASM_ARM_FB_H
13#define __ASM_ARM_FB_H
14
15#include <mach/regs-lcd.h>
16
17struct s3c2410fb_hw {
18 unsigned long lcdcon1;
19 unsigned long lcdcon2;
20 unsigned long lcdcon3;
21 unsigned long lcdcon4;
22 unsigned long lcdcon5;
23};
24
25/* LCD description */
26struct s3c2410fb_display {
27 /* LCD type */
28 unsigned type;
29
30 /* Screen size */
31 unsigned short width;
32 unsigned short height;
33
34 /* Screen info */
35 unsigned short xres;
36 unsigned short yres;
37 unsigned short bpp;
38
39 unsigned pixclock; /* pixclock in picoseconds */
40 unsigned short left_margin; /* value in pixels (TFT) or HCLKs (STN) */
41 unsigned short right_margin; /* value in pixels (TFT) or HCLKs (STN) */
42 unsigned short hsync_len; /* value in pixels (TFT) or HCLKs (STN) */
43 unsigned short upper_margin; /* value in lines (TFT) or 0 (STN) */
44 unsigned short lower_margin; /* value in lines (TFT) or 0 (STN) */
45 unsigned short vsync_len; /* value in lines (TFT) or 0 (STN) */
46
47 /* lcd configuration registers */
48 unsigned long lcdcon5;
49};
50
51struct s3c2410fb_mach_info {
52
53 struct s3c2410fb_display *displays; /* attached diplays info */
54 unsigned num_displays; /* number of defined displays */
55 unsigned default_display;
56
57 /* GPIOs */
58
59 unsigned long gpcup;
60 unsigned long gpcup_mask;
61 unsigned long gpccon;
62 unsigned long gpccon_mask;
63 unsigned long gpdup;
64 unsigned long gpdup_mask;
65 unsigned long gpdcon;
66 unsigned long gpdcon_mask;
67
68 /* lpc3600 control register */
69 unsigned long lpcsel;
70};
71
72extern void __init s3c24xx_fb_set_platdata(struct s3c2410fb_mach_info *);
73
74#endif /* __ASM_ARM_FB_H */
diff --git a/arch/arm/mach-s3c2410/include/mach/gpio.h b/arch/arm/mach-s3c2410/include/mach/gpio.h
new file mode 100644
index 000000000000..3b52b86498a6
--- /dev/null
+++ b/arch/arm/mach-s3c2410/include/mach/gpio.h
@@ -0,0 +1,18 @@
1/* arch/arm/mach-s3c2410/include/mach/gpio.h
2 *
3 * Copyright (c) 2008 Simtec Electronics
4 * http://armlinux.simtec.co.uk/
5 * Ben Dooks <ben@simtec.co.uk>
6 *
7 * S3C2410 - GPIO lib support
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12*/
13
14#define gpio_get_value __gpio_get_value
15#define gpio_set_value __gpio_set_value
16#define gpio_cansleep __gpio_cansleep
17
18#include <asm-generic/gpio.h>
diff --git a/arch/arm/mach-s3c2410/include/mach/h1940-latch.h b/arch/arm/mach-s3c2410/include/mach/h1940-latch.h
new file mode 100644
index 000000000000..d8a832729a8a
--- /dev/null
+++ b/arch/arm/mach-s3c2410/include/mach/h1940-latch.h
@@ -0,0 +1,64 @@
1/* arch/arm/mach-s3c2410/include/mach/h1940-latch.h
2 *
3 * Copyright (c) 2005 Simtec Electronics
4 * http://armlinux.simtec.co.uk/
5 * Ben Dooks <ben@simtec.co.uk>
6 *
7 * iPAQ H1940 series - latch definitions
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12*/
13
14#ifndef __ASM_ARCH_H1940_LATCH_H
15#define __ASM_ARCH_H1940_LATCH_H
16
17
18#ifndef __ASSEMBLY__
19#define H1940_LATCH ((void __force __iomem *)0xF8000000)
20#else
21#define H1940_LATCH 0xF8000000
22#endif
23
24#define H1940_PA_LATCH (S3C2410_CS2)
25
26/* SD layer latch */
27
28#define H1940_LATCH_SDQ1 (1<<16)
29#define H1940_LATCH_LCD_P1 (1<<17)
30#define H1940_LATCH_LCD_P2 (1<<18)
31#define H1940_LATCH_LCD_P3 (1<<19)
32#define H1940_LATCH_MAX1698_nSHUTDOWN (1<<20) /* LCD backlight */
33#define H1940_LATCH_LED_RED (1<<21)
34#define H1940_LATCH_SDQ7 (1<<22)
35#define H1940_LATCH_USB_DP (1<<23)
36
37/* CPU layer latch */
38
39#define H1940_LATCH_UDA_POWER (1<<24)
40#define H1940_LATCH_AUDIO_POWER (1<<25)
41#define H1940_LATCH_SM803_ENABLE (1<<26)
42#define H1940_LATCH_LCD_P4 (1<<27)
43#define H1940_LATCH_CPUQ5 (1<<28) /* untraced */
44#define H1940_LATCH_BLUETOOTH_POWER (1<<29) /* active high */
45#define H1940_LATCH_LED_GREEN (1<<30)
46#define H1940_LATCH_LED_FLASH (1<<31)
47
48/* default settings */
49
50#define H1940_LATCH_DEFAULT \
51 H1940_LATCH_LCD_P4 | \
52 H1940_LATCH_SM803_ENABLE | \
53 H1940_LATCH_SDQ1 | \
54 H1940_LATCH_LCD_P1 | \
55 H1940_LATCH_LCD_P2 | \
56 H1940_LATCH_LCD_P3 | \
57 H1940_LATCH_MAX1698_nSHUTDOWN | \
58 H1940_LATCH_CPUQ5
59
60/* control functions */
61
62extern void h1940_latch_control(unsigned int clear, unsigned int set);
63
64#endif /* __ASM_ARCH_H1940_LATCH_H */
diff --git a/arch/arm/mach-s3c2410/include/mach/h1940.h b/arch/arm/mach-s3c2410/include/mach/h1940.h
new file mode 100644
index 000000000000..4559784129c0
--- /dev/null
+++ b/arch/arm/mach-s3c2410/include/mach/h1940.h
@@ -0,0 +1,21 @@
1/* arch/arm/mach-s3c2410/include/mach/h1940.h
2 *
3 * Copyright 2006 Ben Dooks <ben-linux@fluff.org>
4 *
5 * H1940 definitions
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10*/
11
12#ifndef __ASM_ARCH_H1940_H
13#define __ASM_ARCH_H1940_H
14
15#define H1940_SUSPEND_CHECKSUM (0x30003ff8)
16#define H1940_SUSPEND_RESUMEAT (0x30081000)
17#define H1940_SUSPEND_CHECK (0x30080000)
18
19extern void h1940_pm_return(void);
20
21#endif /* __ASM_ARCH_H1940_H */
diff --git a/arch/arm/mach-s3c2410/include/mach/hardware.h b/arch/arm/mach-s3c2410/include/mach/hardware.h
new file mode 100644
index 000000000000..74d5a1a4024c
--- /dev/null
+++ b/arch/arm/mach-s3c2410/include/mach/hardware.h
@@ -0,0 +1,137 @@
1/* arch/arm/mach-s3c2410/include/mach/hardware.h
2 *
3 * Copyright (c) 2003 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * S3C2410 - hardware
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11*/
12
13#ifndef __ASM_ARCH_HARDWARE_H
14#define __ASM_ARCH_HARDWARE_H
15
16#ifndef __ASSEMBLY__
17
18/* external functions for GPIO support
19 *
20 * These allow various different clients to access the same GPIO
21 * registers without conflicting. If your driver only owns the entire
22 * GPIO register, then it is safe to ioremap/__raw_{read|write} to it.
23*/
24
25/* s3c2410_gpio_cfgpin
26 *
27 * set the configuration of the given pin to the value passed.
28 *
29 * eg:
30 * s3c2410_gpio_cfgpin(S3C2410_GPA0, S3C2410_GPA0_ADDR0);
31 * s3c2410_gpio_cfgpin(S3C2410_GPE8, S3C2410_GPE8_SDDAT1);
32*/
33
34extern void s3c2410_gpio_cfgpin(unsigned int pin, unsigned int function);
35
36extern unsigned int s3c2410_gpio_getcfg(unsigned int pin);
37
38/* s3c2410_gpio_getirq
39 *
40 * turn the given pin number into the corresponding IRQ number
41 *
42 * returns:
43 * < 0 = no interrupt for this pin
44 * >=0 = interrupt number for the pin
45*/
46
47extern int s3c2410_gpio_getirq(unsigned int pin);
48
49/* s3c2410_gpio_irq2pin
50 *
51 * turn the given irq number into the corresponding GPIO number
52 *
53 * returns:
54 * < 0 = no pin
55 * >=0 = gpio pin number
56*/
57
58extern int s3c2410_gpio_irq2pin(unsigned int irq);
59
60#ifdef CONFIG_CPU_S3C2400
61
62extern int s3c2400_gpio_getirq(unsigned int pin);
63
64#endif /* CONFIG_CPU_S3C2400 */
65
66/* s3c2410_gpio_irqfilter
67 *
68 * set the irq filtering on the given pin
69 *
70 * on = 0 => disable filtering
71 * 1 => enable filtering
72 *
73 * config = S3C2410_EINTFLT_PCLK or S3C2410_EINTFLT_EXTCLK orred with
74 * width of filter (0 through 63)
75 *
76 *
77*/
78
79extern int s3c2410_gpio_irqfilter(unsigned int pin, unsigned int on,
80 unsigned int config);
81
82/* s3c2410_gpio_pullup
83 *
84 * configure the pull-up control on the given pin
85 *
86 * to = 1 => disable the pull-up
87 * 0 => enable the pull-up
88 *
89 * eg;
90 *
91 * s3c2410_gpio_pullup(S3C2410_GPB0, 0);
92 * s3c2410_gpio_pullup(S3C2410_GPE8, 0);
93*/
94
95extern void s3c2410_gpio_pullup(unsigned int pin, unsigned int to);
96
97/* s3c2410_gpio_getpull
98 *
99 * Read the state of the pull-up on a given pin
100 *
101 * return:
102 * < 0 => error code
103 * 0 => enabled
104 * 1 => disabled
105*/
106
107extern int s3c2410_gpio_getpull(unsigned int pin);
108
109extern void s3c2410_gpio_setpin(unsigned int pin, unsigned int to);
110
111extern unsigned int s3c2410_gpio_getpin(unsigned int pin);
112
113extern unsigned int s3c2410_modify_misccr(unsigned int clr, unsigned int chg);
114
115#ifdef CONFIG_CPU_S3C2440
116
117extern int s3c2440_set_dsc(unsigned int pin, unsigned int value);
118
119#endif /* CONFIG_CPU_S3C2440 */
120
121#ifdef CONFIG_CPU_S3C2412
122
123extern int s3c2412_gpio_set_sleepcfg(unsigned int pin, unsigned int state);
124
125#endif /* CONFIG_CPU_S3C2412 */
126
127#endif /* __ASSEMBLY__ */
128
129#include <asm/sizes.h>
130#include <mach/map.h>
131
132/* machine specific hardware definitions should go after this */
133
134/* currently here until moved into config (todo) */
135#define CONFIG_NO_MULTIWORD_IO
136
137#endif /* __ASM_ARCH_HARDWARE_H */
diff --git a/arch/arm/mach-s3c2410/include/mach/idle.h b/arch/arm/mach-s3c2410/include/mach/idle.h
new file mode 100644
index 000000000000..e9ddd706b16e
--- /dev/null
+++ b/arch/arm/mach-s3c2410/include/mach/idle.h
@@ -0,0 +1,24 @@
1/* arch/arm/mach-s3c2410/include/mach/idle.h
2 *
3 * Copyright (c) 2004 Simtec Electronics <linux@simtec.co.uk>
4 * http://www.simtec.co.uk/products/SWLINUX/
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * S3C2410 CPU Idle controls
11*/
12
13#ifndef __ASM_ARCH_IDLE_H
14#define __ASM_ARCH_IDLE_H __FILE__
15
16/* This allows the over-ride of the default idle code, in case there
17 * is any other things to be done over idle (like DVS)
18*/
19
20extern void (*s3c24xx_idle)(void);
21
22extern void s3c24xx_default_idle(void);
23
24#endif /* __ASM_ARCH_IDLE_H */
diff --git a/arch/arm/mach-s3c2410/include/mach/io.h b/arch/arm/mach-s3c2410/include/mach/io.h
new file mode 100644
index 000000000000..9813dbf2ae4f
--- /dev/null
+++ b/arch/arm/mach-s3c2410/include/mach/io.h
@@ -0,0 +1,218 @@
1/*
2 * arch/arm/mach-s3c2410/include/mach/io.h
3 * from arch/arm/mach-rpc/include/mach/io.h
4 *
5 * Copyright (C) 1997 Russell King
6 * (C) 2003 Simtec Electronics
7*/
8
9#ifndef __ASM_ARM_ARCH_IO_H
10#define __ASM_ARM_ARCH_IO_H
11
12#include <mach/hardware.h>
13
14#define IO_SPACE_LIMIT 0xffffffff
15
16/*
17 * We use two different types of addressing - PC style addresses, and ARM
18 * addresses. PC style accesses the PC hardware with the normal PC IO
19 * addresses, eg 0x3f8 for serial#1. ARM addresses are above A28
20 * and are translated to the start of IO. Note that all addresses are
21 * not shifted left!
22 */
23
24#define __PORT_PCIO(x) ((x) < (1<<28))
25
26#define PCIO_BASE (S3C24XX_VA_ISA_WORD)
27#define PCIO_BASE_b (S3C24XX_VA_ISA_BYTE)
28#define PCIO_BASE_w (S3C24XX_VA_ISA_WORD)
29#define PCIO_BASE_l (S3C24XX_VA_ISA_WORD)
30/*
31 * Dynamic IO functions - let the compiler
32 * optimize the expressions
33 */
34
35#define DECLARE_DYN_OUT(sz,fnsuffix,instr) \
36static inline void __out##fnsuffix (unsigned int val, unsigned int port) \
37{ \
38 unsigned long temp; \
39 __asm__ __volatile__( \
40 "cmp %2, #(1<<28)\n\t" \
41 "mov %0, %2\n\t" \
42 "addcc %0, %0, %3\n\t" \
43 "str" instr " %1, [%0, #0 ] @ out" #fnsuffix \
44 : "=&r" (temp) \
45 : "r" (val), "r" (port), "Ir" (PCIO_BASE_##fnsuffix) \
46 : "cc"); \
47}
48
49
50#define DECLARE_DYN_IN(sz,fnsuffix,instr) \
51static inline unsigned sz __in##fnsuffix (unsigned int port) \
52{ \
53 unsigned long temp, value; \
54 __asm__ __volatile__( \
55 "cmp %2, #(1<<28)\n\t" \
56 "mov %0, %2\n\t" \
57 "addcc %0, %0, %3\n\t" \
58 "ldr" instr " %1, [%0, #0 ] @ in" #fnsuffix \
59 : "=&r" (temp), "=r" (value) \
60 : "r" (port), "Ir" (PCIO_BASE_##fnsuffix) \
61 : "cc"); \
62 return (unsigned sz)value; \
63}
64
65static inline void __iomem *__ioaddr (unsigned long port)
66{
67 return __PORT_PCIO(port) ? (PCIO_BASE + port) : (void __iomem *)port;
68}
69
70#define DECLARE_IO(sz,fnsuffix,instr) \
71 DECLARE_DYN_IN(sz,fnsuffix,instr) \
72 DECLARE_DYN_OUT(sz,fnsuffix,instr)
73
74DECLARE_IO(char,b,"b")
75DECLARE_IO(short,w,"h")
76DECLARE_IO(int,l,"")
77
78#undef DECLARE_IO
79#undef DECLARE_DYN_IN
80
81/*
82 * Constant address IO functions
83 *
84 * These have to be macros for the 'J' constraint to work -
85 * +/-4096 immediate operand.
86 */
87#define __outbc(value,port) \
88({ \
89 if (__PORT_PCIO((port))) \
90 __asm__ __volatile__( \
91 "strb %0, [%1, %2] @ outbc" \
92 : : "r" (value), "r" (PCIO_BASE), "Jr" ((port))); \
93 else \
94 __asm__ __volatile__( \
95 "strb %0, [%1, #0] @ outbc" \
96 : : "r" (value), "r" ((port))); \
97})
98
99#define __inbc(port) \
100({ \
101 unsigned char result; \
102 if (__PORT_PCIO((port))) \
103 __asm__ __volatile__( \
104 "ldrb %0, [%1, %2] @ inbc" \
105 : "=r" (result) : "r" (PCIO_BASE), "Jr" ((port))); \
106 else \
107 __asm__ __volatile__( \
108 "ldrb %0, [%1, #0] @ inbc" \
109 : "=r" (result) : "r" ((port))); \
110 result; \
111})
112
113#define __outwc(value,port) \
114({ \
115 unsigned long v = value; \
116 if (__PORT_PCIO((port))) { \
117 if ((port) < 256 && (port) > -256) \
118 __asm__ __volatile__( \
119 "strh %0, [%1, %2] @ outwc" \
120 : : "r" (v), "r" (PCIO_BASE), "Jr" ((port))); \
121 else if ((port) > 0) \
122 __asm__ __volatile__( \
123 "strh %0, [%1, %2] @ outwc" \
124 : : "r" (v), \
125 "r" (PCIO_BASE + ((port) & ~0xff)), \
126 "Jr" (((port) & 0xff))); \
127 else \
128 __asm__ __volatile__( \
129 "strh %0, [%1, #0] @ outwc" \
130 : : "r" (v), \
131 "r" (PCIO_BASE + (port))); \
132 } else \
133 __asm__ __volatile__( \
134 "strh %0, [%1, #0] @ outwc" \
135 : : "r" (v), "r" ((port))); \
136})
137
138#define __inwc(port) \
139({ \
140 unsigned short result; \
141 if (__PORT_PCIO((port))) { \
142 if ((port) < 256 && (port) > -256 ) \
143 __asm__ __volatile__( \
144 "ldrh %0, [%1, %2] @ inwc" \
145 : "=r" (result) \
146 : "r" (PCIO_BASE), \
147 "Jr" ((port))); \
148 else if ((port) > 0) \
149 __asm__ __volatile__( \
150 "ldrh %0, [%1, %2] @ inwc" \
151 : "=r" (result) \
152 : "r" (PCIO_BASE + ((port) & ~0xff)), \
153 "Jr" (((port) & 0xff))); \
154 else \
155 __asm__ __volatile__( \
156 "ldrh %0, [%1, #0] @ inwc" \
157 : "=r" (result) \
158 : "r" (PCIO_BASE + ((port)))); \
159 } else \
160 __asm__ __volatile__( \
161 "ldrh %0, [%1, #0] @ inwc" \
162 : "=r" (result) : "r" ((port))); \
163 result; \
164})
165
166#define __outlc(value,port) \
167({ \
168 unsigned long v = value; \
169 if (__PORT_PCIO((port))) \
170 __asm__ __volatile__( \
171 "str %0, [%1, %2] @ outlc" \
172 : : "r" (v), "r" (PCIO_BASE), "Jr" ((port))); \
173 else \
174 __asm__ __volatile__( \
175 "str %0, [%1, #0] @ outlc" \
176 : : "r" (v), "r" ((port))); \
177})
178
179#define __inlc(port) \
180({ \
181 unsigned long result; \
182 if (__PORT_PCIO((port))) \
183 __asm__ __volatile__( \
184 "ldr %0, [%1, %2] @ inlc" \
185 : "=r" (result) : "r" (PCIO_BASE), "Jr" ((port))); \
186 else \
187 __asm__ __volatile__( \
188 "ldr %0, [%1, #0] @ inlc" \
189 : "=r" (result) : "r" ((port))); \
190 result; \
191})
192
193#define __ioaddrc(port) ((__PORT_PCIO(port) ? PCIO_BASE + (port) : (void __iomem *)(port)))
194
195#define inb(p) (__builtin_constant_p((p)) ? __inbc(p) : __inb(p))
196#define inw(p) (__builtin_constant_p((p)) ? __inwc(p) : __inw(p))
197#define inl(p) (__builtin_constant_p((p)) ? __inlc(p) : __inl(p))
198#define outb(v,p) (__builtin_constant_p((p)) ? __outbc(v,p) : __outb(v,p))
199#define outw(v,p) (__builtin_constant_p((p)) ? __outwc(v,p) : __outw(v,p))
200#define outl(v,p) (__builtin_constant_p((p)) ? __outlc(v,p) : __outl(v,p))
201#define __ioaddr(p) (__builtin_constant_p((p)) ? __ioaddr(p) : __ioaddrc(p))
202/* the following macro is deprecated */
203#define ioaddr(port) __ioaddr((port))
204
205#define insb(p,d,l) __raw_readsb(__ioaddr(p),d,l)
206#define insw(p,d,l) __raw_readsw(__ioaddr(p),d,l)
207#define insl(p,d,l) __raw_readsl(__ioaddr(p),d,l)
208
209#define outsb(p,d,l) __raw_writesb(__ioaddr(p),d,l)
210#define outsw(p,d,l) __raw_writesw(__ioaddr(p),d,l)
211#define outsl(p,d,l) __raw_writesl(__ioaddr(p),d,l)
212
213/*
214 * 1:1 mapping for ioremapped regions.
215 */
216#define __mem_pci(x) (x)
217
218#endif
diff --git a/arch/arm/mach-s3c2410/include/mach/irqs.h b/arch/arm/mach-s3c2410/include/mach/irqs.h
new file mode 100644
index 000000000000..950c71bf1489
--- /dev/null
+++ b/arch/arm/mach-s3c2410/include/mach/irqs.h
@@ -0,0 +1,166 @@
1/* arch/arm/mach-s3c2410/include/mach/irqs.h
2 *
3 * Copyright (c) 2003-2005 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9*/
10
11
12#ifndef __ASM_ARCH_IRQS_H
13#define __ASM_ARCH_IRQS_H __FILE__
14
15#ifndef __ASM_ARM_IRQ_H
16#error "Do not include this directly, instead #include <asm/irq.h>"
17#endif
18
19/* we keep the first set of CPU IRQs out of the range of
20 * the ISA space, so that the PC104 has them to itself
21 * and we don't end up having to do horrible things to the
22 * standard ISA drivers....
23 */
24
25#define S3C2410_CPUIRQ_OFFSET (16)
26
27#define S3C2410_IRQ(x) ((x) + S3C2410_CPUIRQ_OFFSET)
28
29/* main cpu interrupts */
30#define IRQ_EINT0 S3C2410_IRQ(0) /* 16 */
31#define IRQ_EINT1 S3C2410_IRQ(1)
32#define IRQ_EINT2 S3C2410_IRQ(2)
33#define IRQ_EINT3 S3C2410_IRQ(3)
34#define IRQ_EINT4t7 S3C2410_IRQ(4) /* 20 */
35#define IRQ_EINT8t23 S3C2410_IRQ(5)
36#define IRQ_RESERVED6 S3C2410_IRQ(6) /* for s3c2410 */
37#define IRQ_CAM S3C2410_IRQ(6) /* for s3c2440,s3c2443 */
38#define IRQ_BATT_FLT S3C2410_IRQ(7)
39#define IRQ_TICK S3C2410_IRQ(8) /* 24 */
40#define IRQ_WDT S3C2410_IRQ(9) /* WDT/AC97 for s3c2443 */
41#define IRQ_TIMER0 S3C2410_IRQ(10)
42#define IRQ_TIMER1 S3C2410_IRQ(11)
43#define IRQ_TIMER2 S3C2410_IRQ(12)
44#define IRQ_TIMER3 S3C2410_IRQ(13)
45#define IRQ_TIMER4 S3C2410_IRQ(14)
46#define IRQ_UART2 S3C2410_IRQ(15)
47#define IRQ_LCD S3C2410_IRQ(16) /* 32 */
48#define IRQ_DMA0 S3C2410_IRQ(17) /* IRQ_DMA for s3c2443 */
49#define IRQ_DMA1 S3C2410_IRQ(18)
50#define IRQ_DMA2 S3C2410_IRQ(19)
51#define IRQ_DMA3 S3C2410_IRQ(20)
52#define IRQ_SDI S3C2410_IRQ(21)
53#define IRQ_SPI0 S3C2410_IRQ(22)
54#define IRQ_UART1 S3C2410_IRQ(23)
55#define IRQ_RESERVED24 S3C2410_IRQ(24) /* 40 */
56#define IRQ_NFCON S3C2410_IRQ(24) /* for s3c2440 */
57#define IRQ_USBD S3C2410_IRQ(25)
58#define IRQ_USBH S3C2410_IRQ(26)
59#define IRQ_IIC S3C2410_IRQ(27)
60#define IRQ_UART0 S3C2410_IRQ(28) /* 44 */
61#define IRQ_SPI1 S3C2410_IRQ(29)
62#define IRQ_RTC S3C2410_IRQ(30)
63#define IRQ_ADCPARENT S3C2410_IRQ(31)
64
65/* interrupts generated from the external interrupts sources */
66#define IRQ_EINT4 S3C2410_IRQ(32) /* 48 */
67#define IRQ_EINT5 S3C2410_IRQ(33)
68#define IRQ_EINT6 S3C2410_IRQ(34)
69#define IRQ_EINT7 S3C2410_IRQ(35)
70#define IRQ_EINT8 S3C2410_IRQ(36)
71#define IRQ_EINT9 S3C2410_IRQ(37)
72#define IRQ_EINT10 S3C2410_IRQ(38)
73#define IRQ_EINT11 S3C2410_IRQ(39)
74#define IRQ_EINT12 S3C2410_IRQ(40)
75#define IRQ_EINT13 S3C2410_IRQ(41)
76#define IRQ_EINT14 S3C2410_IRQ(42)
77#define IRQ_EINT15 S3C2410_IRQ(43)
78#define IRQ_EINT16 S3C2410_IRQ(44)
79#define IRQ_EINT17 S3C2410_IRQ(45)
80#define IRQ_EINT18 S3C2410_IRQ(46)
81#define IRQ_EINT19 S3C2410_IRQ(47)
82#define IRQ_EINT20 S3C2410_IRQ(48) /* 64 */
83#define IRQ_EINT21 S3C2410_IRQ(49)
84#define IRQ_EINT22 S3C2410_IRQ(50)
85#define IRQ_EINT23 S3C2410_IRQ(51)
86
87
88#define IRQ_EINT(x) (((x) >= 4) ? (IRQ_EINT4 + (x) - 4) : (IRQ_EINT0 + (x)))
89
90#define IRQ_LCD_FIFO S3C2410_IRQ(52)
91#define IRQ_LCD_FRAME S3C2410_IRQ(53)
92
93/* IRQs for the interal UARTs, and ADC
94 * these need to be ordered in number of appearance in the
95 * SUBSRC mask register
96*/
97
98#define S3C2410_IRQSUB(x) S3C2410_IRQ((x)+54)
99
100#define IRQ_S3CUART_RX0 S3C2410_IRQSUB(0) /* 70 */
101#define IRQ_S3CUART_TX0 S3C2410_IRQSUB(1)
102#define IRQ_S3CUART_ERR0 S3C2410_IRQSUB(2)
103
104#define IRQ_S3CUART_RX1 S3C2410_IRQSUB(3) /* 73 */
105#define IRQ_S3CUART_TX1 S3C2410_IRQSUB(4)
106#define IRQ_S3CUART_ERR1 S3C2410_IRQSUB(5)
107
108#define IRQ_S3CUART_RX2 S3C2410_IRQSUB(6) /* 76 */
109#define IRQ_S3CUART_TX2 S3C2410_IRQSUB(7)
110#define IRQ_S3CUART_ERR2 S3C2410_IRQSUB(8)
111
112#define IRQ_TC S3C2410_IRQSUB(9)
113#define IRQ_ADC S3C2410_IRQSUB(10)
114
115/* extra irqs for s3c2412 */
116
117#define IRQ_S3C2412_CFSDI S3C2410_IRQ(21)
118
119#define IRQ_S3C2412_SDI S3C2410_IRQSUB(13)
120#define IRQ_S3C2412_CF S3C2410_IRQSUB(14)
121
122/* extra irqs for s3c2440 */
123
124#define IRQ_S3C2440_CAM_C S3C2410_IRQSUB(11) /* S3C2443 too */
125#define IRQ_S3C2440_CAM_P S3C2410_IRQSUB(12) /* S3C2443 too */
126#define IRQ_S3C2440_WDT S3C2410_IRQSUB(13)
127#define IRQ_S3C2440_AC97 S3C2410_IRQSUB(14)
128
129/* irqs for s3c2443 */
130
131#define IRQ_S3C2443_DMA S3C2410_IRQ(17) /* IRQ_DMA1 */
132#define IRQ_S3C2443_UART3 S3C2410_IRQ(18) /* IRQ_DMA2 */
133#define IRQ_S3C2443_CFCON S3C2410_IRQ(19) /* IRQ_DMA3 */
134#define IRQ_S3C2443_HSMMC S3C2410_IRQ(20) /* IRQ_SDI */
135#define IRQ_S3C2443_NAND S3C2410_IRQ(24) /* reserved */
136
137#define IRQ_S3C2443_LCD1 S3C2410_IRQSUB(14)
138#define IRQ_S3C2443_LCD2 S3C2410_IRQSUB(15)
139#define IRQ_S3C2443_LCD3 S3C2410_IRQSUB(16)
140#define IRQ_S3C2443_LCD4 S3C2410_IRQSUB(17)
141
142#define IRQ_S3C2443_DMA0 S3C2410_IRQSUB(18)
143#define IRQ_S3C2443_DMA1 S3C2410_IRQSUB(19)
144#define IRQ_S3C2443_DMA2 S3C2410_IRQSUB(20)
145#define IRQ_S3C2443_DMA3 S3C2410_IRQSUB(21)
146#define IRQ_S3C2443_DMA4 S3C2410_IRQSUB(22)
147#define IRQ_S3C2443_DMA5 S3C2410_IRQSUB(23)
148
149/* UART3 */
150#define IRQ_S3C2443_RX3 S3C2410_IRQSUB(24)
151#define IRQ_S3C2443_TX3 S3C2410_IRQSUB(25)
152#define IRQ_S3C2443_ERR3 S3C2410_IRQSUB(26)
153
154#define IRQ_S3C2443_WDT S3C2410_IRQSUB(27)
155#define IRQ_S3C2443_AC97 S3C2410_IRQSUB(28)
156
157#ifdef CONFIG_CPU_S3C2443
158#define NR_IRQS (IRQ_S3C2443_AC97+1)
159#else
160#define NR_IRQS (IRQ_S3C2440_AC97+1)
161#endif
162
163/* Our FIQs are routable from IRQ_EINT0 to IRQ_ADCPARENT */
164#define FIQ_START IRQ_EINT0
165
166#endif /* __ASM_ARCH_IRQ_H */
diff --git a/arch/arm/mach-s3c2410/include/mach/leds-gpio.h b/arch/arm/mach-s3c2410/include/mach/leds-gpio.h
new file mode 100644
index 000000000000..d8a7672519b6
--- /dev/null
+++ b/arch/arm/mach-s3c2410/include/mach/leds-gpio.h
@@ -0,0 +1,28 @@
1/* arch/arm/mach-s3c2410/include/mach/leds-gpio.h
2 *
3 * Copyright (c) 2006 Simtec Electronics
4 * http://armlinux.simtec.co.uk/
5 * Ben Dooks <ben@simtec.co.uk>
6 *
7 * S3C24XX - LEDs GPIO connector
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12*/
13
14#ifndef __ASM_ARCH_LEDSGPIO_H
15#define __ASM_ARCH_LEDSGPIO_H "leds-gpio.h"
16
17#define S3C24XX_LEDF_ACTLOW (1<<0) /* LED is on when GPIO low */
18#define S3C24XX_LEDF_TRISTATE (1<<1) /* tristate to turn off */
19
20struct s3c24xx_led_platdata {
21 unsigned int gpio;
22 unsigned int flags;
23
24 char *name;
25 char *def_trigger;
26};
27
28#endif /* __ASM_ARCH_LEDSGPIO_H */
diff --git a/arch/arm/mach-s3c2410/include/mach/map.h b/arch/arm/mach-s3c2410/include/mach/map.h
new file mode 100644
index 000000000000..64bf7e94a5bf
--- /dev/null
+++ b/arch/arm/mach-s3c2410/include/mach/map.h
@@ -0,0 +1,178 @@
1/* arch/arm/mach-s3c2410/include/mach/map.h
2 *
3 * Copyright (c) 2003 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * S3C2410 - Memory map definitions
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11*/
12
13#ifndef __ASM_ARCH_MAP_H
14#define __ASM_ARCH_MAP_H
15
16#include <asm/plat-s3c/map.h>
17
18#define S3C2410_ADDR(x) S3C_ADDR(x)
19
20/* interrupt controller is the first thing we put in, to make
21 * the assembly code for the irq detection easier
22 */
23#define S3C24XX_VA_IRQ S3C_VA_IRQ
24#define S3C2410_PA_IRQ (0x4A000000)
25#define S3C24XX_SZ_IRQ SZ_1M
26
27/* memory controller registers */
28#define S3C24XX_VA_MEMCTRL S3C_VA_MEM
29#define S3C2410_PA_MEMCTRL (0x48000000)
30#define S3C24XX_SZ_MEMCTRL SZ_1M
31
32/* USB host controller */
33#define S3C2410_PA_USBHOST (0x49000000)
34#define S3C24XX_SZ_USBHOST SZ_1M
35
36/* DMA controller */
37#define S3C2410_PA_DMA (0x4B000000)
38#define S3C24XX_SZ_DMA SZ_1M
39
40/* Clock and Power management */
41#define S3C24XX_VA_CLKPWR S3C_VA_SYS
42#define S3C2410_PA_CLKPWR (0x4C000000)
43#define S3C24XX_SZ_CLKPWR SZ_1M
44
45/* LCD controller */
46#define S3C2410_PA_LCD (0x4D000000)
47#define S3C24XX_SZ_LCD SZ_1M
48
49/* NAND flash controller */
50#define S3C2410_PA_NAND (0x4E000000)
51#define S3C24XX_SZ_NAND SZ_1M
52
53/* UARTs */
54#define S3C24XX_VA_UART S3C_VA_UART
55#define S3C2410_PA_UART (0x50000000)
56#define S3C24XX_SZ_UART SZ_1M
57
58/* Timers */
59#define S3C24XX_VA_TIMER S3C_VA_TIMER
60#define S3C2410_PA_TIMER (0x51000000)
61#define S3C24XX_SZ_TIMER SZ_1M
62
63/* USB Device port */
64#define S3C2410_PA_USBDEV (0x52000000)
65#define S3C24XX_SZ_USBDEV SZ_1M
66
67/* Watchdog */
68#define S3C24XX_VA_WATCHDOG S3C_VA_WATCHDOG
69#define S3C2410_PA_WATCHDOG (0x53000000)
70#define S3C24XX_SZ_WATCHDOG SZ_1M
71
72/* IIC hardware controller */
73#define S3C2410_PA_IIC (0x54000000)
74#define S3C24XX_SZ_IIC SZ_1M
75
76/* IIS controller */
77#define S3C2410_PA_IIS (0x55000000)
78#define S3C24XX_SZ_IIS SZ_1M
79
80/* GPIO ports */
81
82/* the calculation for the VA of this must ensure that
83 * it is the same distance apart from the UART in the
84 * phsyical address space, as the initial mapping for the IO
85 * is done as a 1:1 maping. This puts it (currently) at
86 * 0xFA800000, which is not in the way of any current mapping
87 * by the base system.
88*/
89
90#define S3C2410_PA_GPIO (0x56000000)
91#define S3C24XX_VA_GPIO ((S3C2410_PA_GPIO - S3C24XX_PA_UART) + S3C24XX_VA_UART)
92#define S3C24XX_SZ_GPIO SZ_1M
93
94/* RTC */
95#define S3C2410_PA_RTC (0x57000000)
96#define S3C24XX_SZ_RTC SZ_1M
97
98/* ADC */
99#define S3C2410_PA_ADC (0x58000000)
100#define S3C24XX_SZ_ADC SZ_1M
101
102/* SPI */
103#define S3C2410_PA_SPI (0x59000000)
104#define S3C24XX_SZ_SPI SZ_1M
105
106/* SDI */
107#define S3C2410_PA_SDI (0x5A000000)
108#define S3C24XX_SZ_SDI SZ_1M
109
110/* CAMIF */
111#define S3C2440_PA_CAMIF (0x4F000000)
112#define S3C2440_SZ_CAMIF SZ_1M
113
114/* AC97 */
115
116#define S3C2440_PA_AC97 (0x5B000000)
117#define S3C2440_SZ_AC97 SZ_1M
118
119/* S3C2443 High-speed SD/MMC */
120#define S3C2443_PA_HSMMC (0x4A800000)
121#define S3C2443_SZ_HSMMC (256)
122
123/* ISA style IO, for each machine to sort out mappings for, if it
124 * implements it. We reserve two 16M regions for ISA.
125 */
126
127#define S3C24XX_VA_ISA_WORD S3C2410_ADDR(0x02000000)
128#define S3C24XX_VA_ISA_BYTE S3C2410_ADDR(0x03000000)
129
130/* physical addresses of all the chip-select areas */
131
132#define S3C2410_CS0 (0x00000000)
133#define S3C2410_CS1 (0x08000000)
134#define S3C2410_CS2 (0x10000000)
135#define S3C2410_CS3 (0x18000000)
136#define S3C2410_CS4 (0x20000000)
137#define S3C2410_CS5 (0x28000000)
138#define S3C2410_CS6 (0x30000000)
139#define S3C2410_CS7 (0x38000000)
140
141#define S3C2410_SDRAM_PA (S3C2410_CS6)
142
143/* Use a single interface for common resources between S3C24XX cpus */
144
145#define S3C24XX_PA_IRQ S3C2410_PA_IRQ
146#define S3C24XX_PA_MEMCTRL S3C2410_PA_MEMCTRL
147#define S3C24XX_PA_USBHOST S3C2410_PA_USBHOST
148#define S3C24XX_PA_DMA S3C2410_PA_DMA
149#define S3C24XX_PA_CLKPWR S3C2410_PA_CLKPWR
150#define S3C24XX_PA_LCD S3C2410_PA_LCD
151#define S3C24XX_PA_UART S3C2410_PA_UART
152#define S3C24XX_PA_TIMER S3C2410_PA_TIMER
153#define S3C24XX_PA_USBDEV S3C2410_PA_USBDEV
154#define S3C24XX_PA_WATCHDOG S3C2410_PA_WATCHDOG
155#define S3C24XX_PA_IIC S3C2410_PA_IIC
156#define S3C24XX_PA_IIS S3C2410_PA_IIS
157#define S3C24XX_PA_GPIO S3C2410_PA_GPIO
158#define S3C24XX_PA_RTC S3C2410_PA_RTC
159#define S3C24XX_PA_ADC S3C2410_PA_ADC
160#define S3C24XX_PA_SPI S3C2410_PA_SPI
161
162/* deal with the registers that move under the 2412/2413 */
163
164#if defined(CONFIG_CPU_S3C2412) || defined(CONFIG_CPU_S3C2413)
165#ifndef __ASSEMBLY__
166extern void __iomem *s3c24xx_va_gpio2;
167#endif
168#ifdef CONFIG_CPU_S3C2412_ONLY
169#define S3C24XX_VA_GPIO2 (S3C24XX_VA_GPIO + 0x10)
170#else
171#define S3C24XX_VA_GPIO2 s3c24xx_va_gpio2
172#endif
173#else
174#define s3c24xx_va_gpio2 S3C24XX_VA_GPIO
175#define S3C24XX_VA_GPIO2 S3C24XX_VA_GPIO
176#endif
177
178#endif /* __ASM_ARCH_MAP_H */
diff --git a/arch/arm/mach-s3c2410/include/mach/memory.h b/arch/arm/mach-s3c2410/include/mach/memory.h
new file mode 100644
index 000000000000..93782628a786
--- /dev/null
+++ b/arch/arm/mach-s3c2410/include/mach/memory.h
@@ -0,0 +1,19 @@
1/* arch/arm/mach-s3c2410/include/mach/memory.h
2 * from arch/arm/mach-rpc/include/mach/memory.h
3 *
4 * Copyright (C) 1996,1997,1998 Russell King.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9*/
10
11#ifndef __ASM_ARCH_MEMORY_H
12#define __ASM_ARCH_MEMORY_H
13
14#define PHYS_OFFSET UL(0x30000000)
15
16#define __virt_to_bus(x) __virt_to_phys(x)
17#define __bus_to_virt(x) __phys_to_virt(x)
18
19#endif
diff --git a/arch/arm/mach-s3c2410/include/mach/osiris-cpld.h b/arch/arm/mach-s3c2410/include/mach/osiris-cpld.h
new file mode 100644
index 000000000000..e9e36b0abbac
--- /dev/null
+++ b/arch/arm/mach-s3c2410/include/mach/osiris-cpld.h
@@ -0,0 +1,30 @@
1/* arch/arm/mach-s3c2410/include/mach/osiris-cpld.h
2 *
3 * Copyright 2005 Simtec Electronics
4 * http://www.simtec.co.uk/products/
5 * Ben Dooks <ben@simtec.co.uk>
6 *
7 * OSIRIS - CPLD control constants
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12*/
13
14#ifndef __ASM_ARCH_OSIRISCPLD_H
15#define __ASM_ARCH_OSIRISCPLD_H
16
17/* CTRL0 - NAND WP control */
18
19#define OSIRIS_CTRL0_NANDSEL (0x3)
20#define OSIRIS_CTRL0_BOOT_INT (1<<3)
21#define OSIRIS_CTRL0_PCMCIA (1<<4)
22#define OSIRIS_CTRL0_FIX8 (1<<5)
23#define OSIRIS_CTRL0_PCMCIA_nWAIT (1<<6)
24#define OSIRIS_CTRL0_PCMCIA_nIOIS16 (1<<7)
25
26#define OSIRIS_CTRL1_FIX8 (1<<0)
27
28#define OSIRIS_ID_REVMASK (0x7)
29
30#endif /* __ASM_ARCH_OSIRISCPLD_H */
diff --git a/arch/arm/mach-s3c2410/include/mach/osiris-map.h b/arch/arm/mach-s3c2410/include/mach/osiris-map.h
new file mode 100644
index 000000000000..639eff523d4e
--- /dev/null
+++ b/arch/arm/mach-s3c2410/include/mach/osiris-map.h
@@ -0,0 +1,42 @@
1/* arch/arm/mach-s3c2410/include/mach/osiris-map.h
2 *
3 * (c) 2005 Simtec Electronics
4 * http://www.simtec.co.uk/products/
5 * Ben Dooks <ben@simtec.co.uk>
6 *
7 * OSIRIS - Memory map definitions
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12*/
13
14/* needs arch/map.h including with this */
15
16#ifndef __ASM_ARCH_OSIRISMAP_H
17#define __ASM_ARCH_OSIRISMAP_H
18
19/* start peripherals off after the S3C2410 */
20
21#define OSIRIS_IOADDR(x) (S3C2410_ADDR((x) + 0x04000000))
22
23#define OSIRIS_PA_CPLD (S3C2410_CS1 | (1<<26))
24
25/* we put the CPLD registers next, to get them out of the way */
26
27#define OSIRIS_VA_CTRL0 OSIRIS_IOADDR(0x00000000)
28#define OSIRIS_PA_CTRL0 (OSIRIS_PA_CPLD)
29
30#define OSIRIS_VA_CTRL1 OSIRIS_IOADDR(0x00100000)
31#define OSIRIS_PA_CTRL1 (OSIRIS_PA_CPLD + (1<<23))
32
33#define OSIRIS_VA_CTRL2 OSIRIS_IOADDR(0x00200000)
34#define OSIRIS_PA_CTRL2 (OSIRIS_PA_CPLD + (2<<23))
35
36#define OSIRIS_VA_CTRL3 OSIRIS_IOADDR(0x00300000)
37#define OSIRIS_PA_CTRL3 (OSIRIS_PA_CPLD + (2<<23))
38
39#define OSIRIS_VA_IDREG OSIRIS_IOADDR(0x00700000)
40#define OSIRIS_PA_IDREG (OSIRIS_PA_CPLD + (7<<23))
41
42#endif /* __ASM_ARCH_OSIRISMAP_H */
diff --git a/arch/arm/mach-s3c2410/include/mach/otom-map.h b/arch/arm/mach-s3c2410/include/mach/otom-map.h
new file mode 100644
index 000000000000..f9277a52c145
--- /dev/null
+++ b/arch/arm/mach-s3c2410/include/mach/otom-map.h
@@ -0,0 +1,30 @@
1/* arch/arm/mach-s3c2410/include/mach/otom-map.h
2 *
3 * (c) 2005 Guillaume GOURAT / NexVision
4 * guillaume.gourat@nexvision.fr
5 *
6 * NexVision OTOM board memory map definitions
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11*/
12
13/* needs arch/map.h including with this */
14
15/* ok, we've used up to 0x01300000, now we need to find space for the
16 * peripherals that live in the nGCS[x] areas, which are quite numerous
17 * in their space.
18 */
19
20#ifndef __ASM_ARCH_OTOMMAP_H
21#define __ASM_ARCH_OTOMMAP_H
22
23#define OTOM_PA_CS8900A_BASE (S3C2410_CS3 + 0x01000000) /* nGCS3 +0x01000000 */
24#define OTOM_VA_CS8900A_BASE S3C2410_ADDR(0x04000000) /* 0xF4000000 */
25
26/* physical offset addresses for the peripherals */
27
28#define OTOM_PA_FLASH0_BASE (S3C2410_CS0) /* Bank 0 */
29
30#endif /* __ASM_ARCH_OTOMMAP_H */
diff --git a/arch/arm/mach-s3c2410/include/mach/regs-clock.h b/arch/arm/mach-s3c2410/include/mach/regs-clock.h
new file mode 100644
index 000000000000..d583688458a4
--- /dev/null
+++ b/arch/arm/mach-s3c2410/include/mach/regs-clock.h
@@ -0,0 +1,197 @@
1/* arch/arm/mach-s3c2410/include/mach/regs-clock.h
2 *
3 * Copyright (c) 2003,2004,2005,2006 Simtec Electronics <linux@simtec.co.uk>
4 * http://armlinux.simtec.co.uk/
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * S3C2410 clock register definitions
11*/
12
13#ifndef __ASM_ARM_REGS_CLOCK
14#define __ASM_ARM_REGS_CLOCK "$Id: clock.h,v 1.4 2003/04/30 14:50:51 ben Exp $"
15
16#define S3C2410_CLKREG(x) ((x) + S3C24XX_VA_CLKPWR)
17
18#define S3C2410_PLLVAL(_m,_p,_s) ((_m) << 12 | ((_p) << 4) | ((_s)))
19
20#define S3C2410_LOCKTIME S3C2410_CLKREG(0x00)
21#define S3C2410_MPLLCON S3C2410_CLKREG(0x04)
22#define S3C2410_UPLLCON S3C2410_CLKREG(0x08)
23#define S3C2410_CLKCON S3C2410_CLKREG(0x0C)
24#define S3C2410_CLKSLOW S3C2410_CLKREG(0x10)
25#define S3C2410_CLKDIVN S3C2410_CLKREG(0x14)
26
27#define S3C2410_CLKCON_IDLE (1<<2)
28#define S3C2410_CLKCON_POWER (1<<3)
29#define S3C2410_CLKCON_NAND (1<<4)
30#define S3C2410_CLKCON_LCDC (1<<5)
31#define S3C2410_CLKCON_USBH (1<<6)
32#define S3C2410_CLKCON_USBD (1<<7)
33#define S3C2410_CLKCON_PWMT (1<<8)
34#define S3C2410_CLKCON_SDI (1<<9)
35#define S3C2410_CLKCON_UART0 (1<<10)
36#define S3C2410_CLKCON_UART1 (1<<11)
37#define S3C2410_CLKCON_UART2 (1<<12)
38#define S3C2410_CLKCON_GPIO (1<<13)
39#define S3C2410_CLKCON_RTC (1<<14)
40#define S3C2410_CLKCON_ADC (1<<15)
41#define S3C2410_CLKCON_IIC (1<<16)
42#define S3C2410_CLKCON_IIS (1<<17)
43#define S3C2410_CLKCON_SPI (1<<18)
44
45#define S3C2410_PLLCON_MDIVSHIFT 12
46#define S3C2410_PLLCON_PDIVSHIFT 4
47#define S3C2410_PLLCON_SDIVSHIFT 0
48#define S3C2410_PLLCON_MDIVMASK ((1<<(1+(19-12)))-1)
49#define S3C2410_PLLCON_PDIVMASK ((1<<5)-1)
50#define S3C2410_PLLCON_SDIVMASK 3
51
52/* DCLKCON register addresses in gpio.h */
53
54#define S3C2410_DCLKCON_DCLK0EN (1<<0)
55#define S3C2410_DCLKCON_DCLK0_PCLK (0<<1)
56#define S3C2410_DCLKCON_DCLK0_UCLK (1<<1)
57#define S3C2410_DCLKCON_DCLK0_DIV(x) (((x) - 1 )<<4)
58#define S3C2410_DCLKCON_DCLK0_CMP(x) (((x) - 1 )<<8)
59#define S3C2410_DCLKCON_DCLK0_DIV_MASK ((0xf)<<4)
60#define S3C2410_DCLKCON_DCLK0_CMP_MASK ((0xf)<<8)
61
62#define S3C2410_DCLKCON_DCLK1EN (1<<16)
63#define S3C2410_DCLKCON_DCLK1_PCLK (0<<17)
64#define S3C2410_DCLKCON_DCLK1_UCLK (1<<17)
65#define S3C2410_DCLKCON_DCLK1_DIV(x) (((x) - 1) <<20)
66#define S3C2410_DCLKCON_DCLK1_CMP(x) (((x) - 1) <<24)
67#define S3C2410_DCLKCON_DCLK1_DIV_MASK ((0xf) <<20)
68#define S3C2410_DCLKCON_DCLK1_CMP_MASK ((0xf) <<24)
69
70#define S3C2410_CLKDIVN_PDIVN (1<<0)
71#define S3C2410_CLKDIVN_HDIVN (1<<1)
72
73#define S3C2410_CLKSLOW_UCLK_OFF (1<<7)
74#define S3C2410_CLKSLOW_MPLL_OFF (1<<5)
75#define S3C2410_CLKSLOW_SLOW (1<<4)
76#define S3C2410_CLKSLOW_SLOWVAL(x) (x)
77#define S3C2410_CLKSLOW_GET_SLOWVAL(x) ((x) & 7)
78
79#ifndef __ASSEMBLY__
80
81#include <asm/div64.h>
82
83static inline unsigned int
84s3c2410_get_pll(unsigned int pllval, unsigned int baseclk)
85{
86 unsigned int mdiv, pdiv, sdiv;
87 uint64_t fvco;
88
89 mdiv = pllval >> S3C2410_PLLCON_MDIVSHIFT;
90 pdiv = pllval >> S3C2410_PLLCON_PDIVSHIFT;
91 sdiv = pllval >> S3C2410_PLLCON_SDIVSHIFT;
92
93 mdiv &= S3C2410_PLLCON_MDIVMASK;
94 pdiv &= S3C2410_PLLCON_PDIVMASK;
95 sdiv &= S3C2410_PLLCON_SDIVMASK;
96
97 fvco = (uint64_t)baseclk * (mdiv + 8);
98 do_div(fvco, (pdiv + 2) << sdiv);
99
100 return (unsigned int)fvco;
101}
102
103#endif /* __ASSEMBLY__ */
104
105#if defined(CONFIG_CPU_S3C2440) || defined(CONFIG_CPU_S3C2442)
106
107/* extra registers */
108#define S3C2440_CAMDIVN S3C2410_CLKREG(0x18)
109
110#define S3C2440_CLKCON_CAMERA (1<<19)
111#define S3C2440_CLKCON_AC97 (1<<20)
112
113#define S3C2440_CLKDIVN_PDIVN (1<<0)
114#define S3C2440_CLKDIVN_HDIVN_MASK (3<<1)
115#define S3C2440_CLKDIVN_HDIVN_1 (0<<1)
116#define S3C2440_CLKDIVN_HDIVN_2 (1<<1)
117#define S3C2440_CLKDIVN_HDIVN_4_8 (2<<1)
118#define S3C2440_CLKDIVN_HDIVN_3_6 (3<<1)
119#define S3C2440_CLKDIVN_UCLK (1<<3)
120
121#define S3C2440_CAMDIVN_CAMCLK_MASK (0xf<<0)
122#define S3C2440_CAMDIVN_CAMCLK_SEL (1<<4)
123#define S3C2440_CAMDIVN_HCLK3_HALF (1<<8)
124#define S3C2440_CAMDIVN_HCLK4_HALF (1<<9)
125#define S3C2440_CAMDIVN_DVSEN (1<<12)
126
127#define S3C2442_CAMDIVN_CAMCLK_DIV3 (1<<5)
128
129#endif /* CONFIG_CPU_S3C2440 or CONFIG_CPU_S3C2442 */
130
131#if defined(CONFIG_CPU_S3C2412) || defined(CONFIG_CPU_S3C2413)
132
133#define S3C2412_OSCSET S3C2410_CLKREG(0x18)
134#define S3C2412_CLKSRC S3C2410_CLKREG(0x1C)
135
136#define S3C2412_PLLCON_OFF (1<<20)
137
138#define S3C2412_CLKDIVN_PDIVN (1<<2)
139#define S3C2412_CLKDIVN_HDIVN_MASK (3<<0)
140#define S3C2412_CLKDIVN_ARMDIVN (1<<3)
141#define S3C2412_CLKDIVN_DVSEN (1<<4)
142#define S3C2412_CLKDIVN_HALFHCLK (1<<5)
143#define S3C2412_CLKDIVN_USB48DIV (1<<6)
144#define S3C2412_CLKDIVN_UARTDIV_MASK (15<<8)
145#define S3C2412_CLKDIVN_UARTDIV_SHIFT (8)
146#define S3C2412_CLKDIVN_I2SDIV_MASK (15<<12)
147#define S3C2412_CLKDIVN_I2SDIV_SHIFT (12)
148#define S3C2412_CLKDIVN_CAMDIV_MASK (15<<16)
149#define S3C2412_CLKDIVN_CAMDIV_SHIFT (16)
150
151#define S3C2412_CLKCON_WDT (1<<28)
152#define S3C2412_CLKCON_SPI (1<<27)
153#define S3C2412_CLKCON_IIS (1<<26)
154#define S3C2412_CLKCON_IIC (1<<25)
155#define S3C2412_CLKCON_ADC (1<<24)
156#define S3C2412_CLKCON_RTC (1<<23)
157#define S3C2412_CLKCON_GPIO (1<<22)
158#define S3C2412_CLKCON_UART2 (1<<21)
159#define S3C2412_CLKCON_UART1 (1<<20)
160#define S3C2412_CLKCON_UART0 (1<<19)
161#define S3C2412_CLKCON_SDI (1<<18)
162#define S3C2412_CLKCON_PWMT (1<<17)
163#define S3C2412_CLKCON_USBD (1<<16)
164#define S3C2412_CLKCON_CAMCLK (1<<15)
165#define S3C2412_CLKCON_UARTCLK (1<<14)
166/* missing 13 */
167#define S3C2412_CLKCON_USB_HOST48 (1<<12)
168#define S3C2412_CLKCON_USB_DEV48 (1<<11)
169#define S3C2412_CLKCON_HCLKdiv2 (1<<10)
170#define S3C2412_CLKCON_HCLKx2 (1<<9)
171#define S3C2412_CLKCON_SDRAM (1<<8)
172/* missing 7 */
173#define S3C2412_CLKCON_USBH S3C2410_CLKCON_USBH
174#define S3C2412_CLKCON_LCDC S3C2410_CLKCON_LCDC
175#define S3C2412_CLKCON_NAND S3C2410_CLKCON_NAND
176#define S3C2412_CLKCON_DMA3 (1<<3)
177#define S3C2412_CLKCON_DMA2 (1<<2)
178#define S3C2412_CLKCON_DMA1 (1<<1)
179#define S3C2412_CLKCON_DMA0 (1<<0)
180
181/* clock sourec controls */
182
183#define S3C2412_CLKSRC_EXTCLKDIV_MASK (7 << 0)
184#define S3C2412_CLKSRC_EXTCLKDIV_SHIFT (0)
185#define S3C2412_CLKSRC_MDIVCLK_EXTCLKDIV (1<<3)
186#define S3C2412_CLKSRC_MSYSCLK_MPLL (1<<4)
187#define S3C2412_CLKSRC_USYSCLK_UPLL (1<<5)
188#define S3C2412_CLKSRC_UARTCLK_MPLL (1<<8)
189#define S3C2412_CLKSRC_I2SCLK_MPLL (1<<9)
190#define S3C2412_CLKSRC_USBCLK_HCLK (1<<10)
191#define S3C2412_CLKSRC_CAMCLK_HCLK (1<<11)
192#define S3C2412_CLKSRC_UREFCLK_EXTCLK (1<<12)
193#define S3C2412_CLKSRC_EREFCLK_EXTCLK (1<<14)
194
195#endif /* CONFIG_CPU_S3C2412 | CONFIG_CPU_S3C2413 */
196
197#endif /* __ASM_ARM_REGS_CLOCK */
diff --git a/arch/arm/mach-s3c2410/include/mach/regs-dsc.h b/arch/arm/mach-s3c2410/include/mach/regs-dsc.h
new file mode 100644
index 000000000000..3c3853cd3cf7
--- /dev/null
+++ b/arch/arm/mach-s3c2410/include/mach/regs-dsc.h
@@ -0,0 +1,184 @@
1/* arch/arm/mach-s3c2410/include/mach/regs-dsc.h
2 *
3 * Copyright (c) 2004 Simtec Electronics <linux@simtec.co.uk>
4 * http://www.simtec.co.uk/products/SWLINUX/
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * S3C2440/S3C2412 Signal Drive Strength Control
11*/
12
13
14#ifndef __ASM_ARCH_REGS_DSC_H
15#define __ASM_ARCH_REGS_DSC_H "2440-dsc"
16
17#if defined(CONFIG_CPU_S3C2412)
18#define S3C2412_DSC0 S3C2410_GPIOREG(0xdc)
19#define S3C2412_DSC1 S3C2410_GPIOREG(0xe0)
20#endif
21
22#if defined(CONFIG_CPU_S3C244X)
23
24#define S3C2440_DSC0 S3C2410_GPIOREG(0xc4)
25#define S3C2440_DSC1 S3C2410_GPIOREG(0xc8)
26
27#define S3C2440_SELECT_DSC0 (0)
28#define S3C2440_SELECT_DSC1 (1<<31)
29
30#define S3C2440_DSC_GETSHIFT(x) ((x) & 31)
31
32#define S3C2440_DSC0_DISABLE (1<<31)
33
34#define S3C2440_DSC0_ADDR (S3C2440_SELECT_DSC0 | 8)
35#define S3C2440_DSC0_ADDR_12mA (0<<8)
36#define S3C2440_DSC0_ADDR_10mA (1<<8)
37#define S3C2440_DSC0_ADDR_8mA (2<<8)
38#define S3C2440_DSC0_ADDR_6mA (3<<8)
39#define S3C2440_DSC0_ADDR_MASK (3<<8)
40
41/* D24..D31 */
42#define S3C2440_DSC0_DATA3 (S3C2440_SELECT_DSC0 | 6)
43#define S3C2440_DSC0_DATA3_12mA (0<<6)
44#define S3C2440_DSC0_DATA3_10mA (1<<6)
45#define S3C2440_DSC0_DATA3_8mA (2<<6)
46#define S3C2440_DSC0_DATA3_6mA (3<<6)
47#define S3C2440_DSC0_DATA3_MASK (3<<6)
48
49/* D16..D23 */
50#define S3C2440_DSC0_DATA2 (S3C2440_SELECT_DSC0 | 4)
51#define S3C2440_DSC0_DATA2_12mA (0<<4)
52#define S3C2440_DSC0_DATA2_10mA (1<<4)
53#define S3C2440_DSC0_DATA2_8mA (2<<4)
54#define S3C2440_DSC0_DATA2_6mA (3<<4)
55#define S3C2440_DSC0_DATA2_MASK (3<<4)
56
57/* D8..D15 */
58#define S3C2440_DSC0_DATA1 (S3C2440_SELECT_DSC0 | 2)
59#define S3C2440_DSC0_DATA1_12mA (0<<2)
60#define S3C2440_DSC0_DATA1_10mA (1<<2)
61#define S3C2440_DSC0_DATA1_8mA (2<<2)
62#define S3C2440_DSC0_DATA1_6mA (3<<2)
63#define S3C2440_DSC0_DATA1_MASK (3<<2)
64
65/* D0..D7 */
66#define S3C2440_DSC0_DATA0 (S3C2440_SELECT_DSC0 | 0)
67#define S3C2440_DSC0_DATA0_12mA (0<<0)
68#define S3C2440_DSC0_DATA0_10mA (1<<0)
69#define S3C2440_DSC0_DATA0_8mA (2<<0)
70#define S3C2440_DSC0_DATA0_6mA (3<<0)
71#define S3C2440_DSC0_DATA0_MASK (3<<0)
72
73#define S3C2440_DSC1_SCK1 (S3C2440_SELECT_DSC1 | 28)
74#define S3C2440_DSC1_SCK1_12mA (0<<28)
75#define S3C2440_DSC1_SCK1_10mA (1<<28)
76#define S3C2440_DSC1_SCK1_8mA (2<<28)
77#define S3C2440_DSC1_SCK1_6mA (3<<28)
78#define S3C2440_DSC1_SCK1_MASK (3<<28)
79
80#define S3C2440_DSC1_SCK0 (S3C2440_SELECT_DSC1 | 26)
81#define S3C2440_DSC1_SCK0_12mA (0<<26)
82#define S3C2440_DSC1_SCK0_10mA (1<<26)
83#define S3C2440_DSC1_SCK0_8mA (2<<26)
84#define S3C2440_DSC1_SCK0_6mA (3<<26)
85#define S3C2440_DSC1_SCK0_MASK (3<<26)
86
87#define S3C2440_DSC1_SCKE (S3C2440_SELECT_DSC1 | 24)
88#define S3C2440_DSC1_SCKE_10mA (0<<24)
89#define S3C2440_DSC1_SCKE_8mA (1<<24)
90#define S3C2440_DSC1_SCKE_6mA (2<<24)
91#define S3C2440_DSC1_SCKE_4mA (3<<24)
92#define S3C2440_DSC1_SCKE_MASK (3<<24)
93
94/* SDRAM nRAS/nCAS */
95#define S3C2440_DSC1_SDR (S3C2440_SELECT_DSC1 | 22)
96#define S3C2440_DSC1_SDR_10mA (0<<22)
97#define S3C2440_DSC1_SDR_8mA (1<<22)
98#define S3C2440_DSC1_SDR_6mA (2<<22)
99#define S3C2440_DSC1_SDR_4mA (3<<22)
100#define S3C2440_DSC1_SDR_MASK (3<<22)
101
102/* NAND Flash Controller */
103#define S3C2440_DSC1_NFC (S3C2440_SELECT_DSC1 | 20)
104#define S3C2440_DSC1_NFC_10mA (0<<20)
105#define S3C2440_DSC1_NFC_8mA (1<<20)
106#define S3C2440_DSC1_NFC_6mA (2<<20)
107#define S3C2440_DSC1_NFC_4mA (3<<20)
108#define S3C2440_DSC1_NFC_MASK (3<<20)
109
110/* nBE[0..3] */
111#define S3C2440_DSC1_nBE (S3C2440_SELECT_DSC1 | 18)
112#define S3C2440_DSC1_nBE_10mA (0<<18)
113#define S3C2440_DSC1_nBE_8mA (1<<18)
114#define S3C2440_DSC1_nBE_6mA (2<<18)
115#define S3C2440_DSC1_nBE_4mA (3<<18)
116#define S3C2440_DSC1_nBE_MASK (3<<18)
117
118#define S3C2440_DSC1_WOE (S3C2440_SELECT_DSC1 | 16)
119#define S3C2440_DSC1_WOE_10mA (0<<16)
120#define S3C2440_DSC1_WOE_8mA (1<<16)
121#define S3C2440_DSC1_WOE_6mA (2<<16)
122#define S3C2440_DSC1_WOE_4mA (3<<16)
123#define S3C2440_DSC1_WOE_MASK (3<<16)
124
125#define S3C2440_DSC1_CS7 (S3C2440_SELECT_DSC1 | 14)
126#define S3C2440_DSC1_CS7_10mA (0<<14)
127#define S3C2440_DSC1_CS7_8mA (1<<14)
128#define S3C2440_DSC1_CS7_6mA (2<<14)
129#define S3C2440_DSC1_CS7_4mA (3<<14)
130#define S3C2440_DSC1_CS7_MASK (3<<14)
131
132#define S3C2440_DSC1_CS6 (S3C2440_SELECT_DSC1 | 12)
133#define S3C2440_DSC1_CS6_10mA (0<<12)
134#define S3C2440_DSC1_CS6_8mA (1<<12)
135#define S3C2440_DSC1_CS6_6mA (2<<12)
136#define S3C2440_DSC1_CS6_4mA (3<<12)
137#define S3C2440_DSC1_CS6_MASK (3<<12)
138
139#define S3C2440_DSC1_CS5 (S3C2440_SELECT_DSC1 | 10)
140#define S3C2440_DSC1_CS5_10mA (0<<10)
141#define S3C2440_DSC1_CS5_8mA (1<<10)
142#define S3C2440_DSC1_CS5_6mA (2<<10)
143#define S3C2440_DSC1_CS5_4mA (3<<10)
144#define S3C2440_DSC1_CS5_MASK (3<<10)
145
146#define S3C2440_DSC1_CS4 (S3C2440_SELECT_DSC1 | 8)
147#define S3C2440_DSC1_CS4_10mA (0<<8)
148#define S3C2440_DSC1_CS4_8mA (1<<8)
149#define S3C2440_DSC1_CS4_6mA (2<<8)
150#define S3C2440_DSC1_CS4_4mA (3<<8)
151#define S3C2440_DSC1_CS4_MASK (3<<8)
152
153#define S3C2440_DSC1_CS3 (S3C2440_SELECT_DSC1 | 6)
154#define S3C2440_DSC1_CS3_10mA (0<<6)
155#define S3C2440_DSC1_CS3_8mA (1<<6)
156#define S3C2440_DSC1_CS3_6mA (2<<6)
157#define S3C2440_DSC1_CS3_4mA (3<<6)
158#define S3C2440_DSC1_CS3_MASK (3<<6)
159
160#define S3C2440_DSC1_CS2 (S3C2440_SELECT_DSC1 | 4)
161#define S3C2440_DSC1_CS2_10mA (0<<4)
162#define S3C2440_DSC1_CS2_8mA (1<<4)
163#define S3C2440_DSC1_CS2_6mA (2<<4)
164#define S3C2440_DSC1_CS2_4mA (3<<4)
165#define S3C2440_DSC1_CS2_MASK (3<<4)
166
167#define S3C2440_DSC1_CS1 (S3C2440_SELECT_DSC1 | 2)
168#define S3C2440_DSC1_CS1_10mA (0<<2)
169#define S3C2440_DSC1_CS1_8mA (1<<2)
170#define S3C2440_DSC1_CS1_6mA (2<<2)
171#define S3C2440_DSC1_CS1_4mA (3<<2)
172#define S3C2440_DSC1_CS1_MASK (3<<2)
173
174#define S3C2440_DSC1_CS0 (S3C2440_SELECT_DSC1 | 0)
175#define S3C2440_DSC1_CS0_10mA (0<<0)
176#define S3C2440_DSC1_CS0_8mA (1<<0)
177#define S3C2440_DSC1_CS0_6mA (2<<0)
178#define S3C2440_DSC1_CS0_4mA (3<<0)
179#define S3C2440_DSC1_CS0_MASK (3<<0)
180
181#endif /* CONFIG_CPU_S3C2440 */
182
183#endif /* __ASM_ARCH_REGS_DSC_H */
184
diff --git a/arch/arm/mach-s3c2410/include/mach/regs-gpio.h b/arch/arm/mach-s3c2410/include/mach/regs-gpio.h
new file mode 100644
index 000000000000..30bec027f5fa
--- /dev/null
+++ b/arch/arm/mach-s3c2410/include/mach/regs-gpio.h
@@ -0,0 +1,1163 @@
1/* arch/arm/mach-s3c2410/include/mach/regs-gpio.h
2 *
3 * Copyright (c) 2003,2004 Simtec Electronics <linux@simtec.co.uk>
4 * http://www.simtec.co.uk/products/SWLINUX/
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * S3C2410 GPIO register definitions
11*/
12
13
14#ifndef __ASM_ARCH_REGS_GPIO_H
15#define __ASM_ARCH_REGS_GPIO_H "$Id: gpio.h,v 1.5 2003/05/19 12:51:08 ben Exp $"
16
17#define S3C2410_GPIONO(bank,offset) ((bank) + (offset))
18
19#define S3C2410_GPIO_BANKA (32*0)
20#define S3C2410_GPIO_BANKB (32*1)
21#define S3C2410_GPIO_BANKC (32*2)
22#define S3C2410_GPIO_BANKD (32*3)
23#define S3C2410_GPIO_BANKE (32*4)
24#define S3C2410_GPIO_BANKF (32*5)
25#define S3C2410_GPIO_BANKG (32*6)
26#define S3C2410_GPIO_BANKH (32*7)
27
28#ifdef CONFIG_CPU_S3C2400
29#define S3C24XX_GPIO_BASE(x) S3C2400_GPIO_BASE(x)
30#define S3C24XX_MISCCR S3C2400_MISCCR
31#else
32#define S3C24XX_GPIO_BASE(x) S3C2410_GPIO_BASE(x)
33#define S3C24XX_MISCCR S3C24XX_GPIOREG2(0x80)
34#endif /* CONFIG_CPU_S3C2400 */
35
36
37/* S3C2400 doesn't have a 1:1 mapping to S3C2410 gpio base pins */
38
39#define S3C2400_BANKNUM(pin) (((pin) & ~31) / 32)
40#define S3C2400_BASEA2B(pin) ((((pin) & ~31) >> 2))
41#define S3C2400_BASEC2H(pin) ((S3C2400_BANKNUM(pin) * 10) + \
42 (2 * (S3C2400_BANKNUM(pin)-2)))
43
44#define S3C2400_GPIO_BASE(pin) (pin < S3C2410_GPIO_BANKC ? \
45 S3C2400_BASEA2B(pin)+S3C24XX_VA_GPIO : \
46 S3C2400_BASEC2H(pin)+S3C24XX_VA_GPIO)
47
48
49#define S3C2410_GPIO_BASE(pin) ((((pin) & ~31) >> 1) + S3C24XX_VA_GPIO)
50#define S3C2410_GPIO_OFFSET(pin) ((pin) & 31)
51
52/* general configuration options */
53
54#define S3C2410_GPIO_LEAVE (0xFFFFFFFF)
55#define S3C2410_GPIO_INPUT (0xFFFFFFF0) /* not available on A */
56#define S3C2410_GPIO_OUTPUT (0xFFFFFFF1)
57#define S3C2410_GPIO_IRQ (0xFFFFFFF2) /* not available for all */
58#define S3C2410_GPIO_SFN2 (0xFFFFFFF2) /* bank A => addr/cs/nand */
59#define S3C2410_GPIO_SFN3 (0xFFFFFFF3) /* not available on A */
60
61/* register address for the GPIO registers.
62 * S3C24XX_GPIOREG2 is for the second set of registers in the
63 * GPIO which move between s3c2410 and s3c2412 type systems */
64
65#define S3C2410_GPIOREG(x) ((x) + S3C24XX_VA_GPIO)
66#define S3C24XX_GPIOREG2(x) ((x) + S3C24XX_VA_GPIO2)
67
68
69/* configure GPIO ports A..G */
70
71/* port A - S3C2410: 22bits, zero in bit X makes pin X output
72 * S3C2400: 18bits, zero in bit X makes pin X output
73 * 1 makes port special function, this is default
74*/
75#define S3C2410_GPACON S3C2410_GPIOREG(0x00)
76#define S3C2410_GPADAT S3C2410_GPIOREG(0x04)
77
78#define S3C2400_GPACON S3C2410_GPIOREG(0x00)
79#define S3C2400_GPADAT S3C2410_GPIOREG(0x04)
80
81#define S3C2410_GPA0 S3C2410_GPIONO(S3C2410_GPIO_BANKA, 0)
82#define S3C2410_GPA0_OUT (0<<0)
83#define S3C2410_GPA0_ADDR0 (1<<0)
84
85#define S3C2410_GPA1 S3C2410_GPIONO(S3C2410_GPIO_BANKA, 1)
86#define S3C2410_GPA1_OUT (0<<1)
87#define S3C2410_GPA1_ADDR16 (1<<1)
88
89#define S3C2410_GPA2 S3C2410_GPIONO(S3C2410_GPIO_BANKA, 2)
90#define S3C2410_GPA2_OUT (0<<2)
91#define S3C2410_GPA2_ADDR17 (1<<2)
92
93#define S3C2410_GPA3 S3C2410_GPIONO(S3C2410_GPIO_BANKA, 3)
94#define S3C2410_GPA3_OUT (0<<3)
95#define S3C2410_GPA3_ADDR18 (1<<3)
96
97#define S3C2410_GPA4 S3C2410_GPIONO(S3C2410_GPIO_BANKA, 4)
98#define S3C2410_GPA4_OUT (0<<4)
99#define S3C2410_GPA4_ADDR19 (1<<4)
100
101#define S3C2410_GPA5 S3C2410_GPIONO(S3C2410_GPIO_BANKA, 5)
102#define S3C2410_GPA5_OUT (0<<5)
103#define S3C2410_GPA5_ADDR20 (1<<5)
104
105#define S3C2410_GPA6 S3C2410_GPIONO(S3C2410_GPIO_BANKA, 6)
106#define S3C2410_GPA6_OUT (0<<6)
107#define S3C2410_GPA6_ADDR21 (1<<6)
108
109#define S3C2410_GPA7 S3C2410_GPIONO(S3C2410_GPIO_BANKA, 7)
110#define S3C2410_GPA7_OUT (0<<7)
111#define S3C2410_GPA7_ADDR22 (1<<7)
112
113#define S3C2410_GPA8 S3C2410_GPIONO(S3C2410_GPIO_BANKA, 8)
114#define S3C2410_GPA8_OUT (0<<8)
115#define S3C2410_GPA8_ADDR23 (1<<8)
116
117#define S3C2410_GPA9 S3C2410_GPIONO(S3C2410_GPIO_BANKA, 9)
118#define S3C2410_GPA9_OUT (0<<9)
119#define S3C2410_GPA9_ADDR24 (1<<9)
120
121#define S3C2410_GPA10 S3C2410_GPIONO(S3C2410_GPIO_BANKA, 10)
122#define S3C2410_GPA10_OUT (0<<10)
123#define S3C2410_GPA10_ADDR25 (1<<10)
124#define S3C2400_GPA10_SCKE (1<<10)
125
126#define S3C2410_GPA11 S3C2410_GPIONO(S3C2410_GPIO_BANKA, 11)
127#define S3C2410_GPA11_OUT (0<<11)
128#define S3C2410_GPA11_ADDR26 (1<<11)
129#define S3C2400_GPA11_nCAS0 (1<<11)
130
131#define S3C2410_GPA12 S3C2410_GPIONO(S3C2410_GPIO_BANKA, 12)
132#define S3C2410_GPA12_OUT (0<<12)
133#define S3C2410_GPA12_nGCS1 (1<<12)
134#define S3C2400_GPA12_nCAS1 (1<<12)
135
136#define S3C2410_GPA13 S3C2410_GPIONO(S3C2410_GPIO_BANKA, 13)
137#define S3C2410_GPA13_OUT (0<<13)
138#define S3C2410_GPA13_nGCS2 (1<<13)
139#define S3C2400_GPA13_nGCS1 (1<<13)
140
141#define S3C2410_GPA14 S3C2410_GPIONO(S3C2410_GPIO_BANKA, 14)
142#define S3C2410_GPA14_OUT (0<<14)
143#define S3C2410_GPA14_nGCS3 (1<<14)
144#define S3C2400_GPA14_nGCS2 (1<<14)
145
146#define S3C2410_GPA15 S3C2410_GPIONO(S3C2410_GPIO_BANKA, 15)
147#define S3C2410_GPA15_OUT (0<<15)
148#define S3C2410_GPA15_nGCS4 (1<<15)
149#define S3C2400_GPA15_nGCS3 (1<<15)
150
151#define S3C2410_GPA16 S3C2410_GPIONO(S3C2410_GPIO_BANKA, 16)
152#define S3C2410_GPA16_OUT (0<<16)
153#define S3C2410_GPA16_nGCS5 (1<<16)
154#define S3C2400_GPA16_nGCS4 (1<<16)
155
156#define S3C2410_GPA17 S3C2410_GPIONO(S3C2410_GPIO_BANKA, 17)
157#define S3C2410_GPA17_OUT (0<<17)
158#define S3C2410_GPA17_CLE (1<<17)
159#define S3C2400_GPA17_nGCS5 (1<<17)
160
161#define S3C2410_GPA18 S3C2410_GPIONO(S3C2410_GPIO_BANKA, 18)
162#define S3C2410_GPA18_OUT (0<<18)
163#define S3C2410_GPA18_ALE (1<<18)
164
165#define S3C2410_GPA19 S3C2410_GPIONO(S3C2410_GPIO_BANKA, 19)
166#define S3C2410_GPA19_OUT (0<<19)
167#define S3C2410_GPA19_nFWE (1<<19)
168
169#define S3C2410_GPA20 S3C2410_GPIONO(S3C2410_GPIO_BANKA, 20)
170#define S3C2410_GPA20_OUT (0<<20)
171#define S3C2410_GPA20_nFRE (1<<20)
172
173#define S3C2410_GPA21 S3C2410_GPIONO(S3C2410_GPIO_BANKA, 21)
174#define S3C2410_GPA21_OUT (0<<21)
175#define S3C2410_GPA21_nRSTOUT (1<<21)
176
177#define S3C2410_GPA22 S3C2410_GPIONO(S3C2410_GPIO_BANKA, 22)
178#define S3C2410_GPA22_OUT (0<<22)
179#define S3C2410_GPA22_nFCE (1<<22)
180
181/* 0x08 and 0x0c are reserved on S3C2410 */
182
183/* S3C2410:
184 * GPB is 10 IO pins, each configured by 2 bits each in GPBCON.
185 * 00 = input, 01 = output, 10=special function, 11=reserved
186
187 * S3C2400:
188 * GPB is 16 IO pins, each configured by 2 bits each in GPBCON.
189 * 00 = input, 01 = output, 10=data, 11=special function
190
191 * bit 0,1 = pin 0, 2,3= pin 1...
192 *
193 * CPBUP = pull up resistor control, 1=disabled, 0=enabled
194*/
195
196#define S3C2410_GPBCON S3C2410_GPIOREG(0x10)
197#define S3C2410_GPBDAT S3C2410_GPIOREG(0x14)
198#define S3C2410_GPBUP S3C2410_GPIOREG(0x18)
199
200#define S3C2400_GPBCON S3C2410_GPIOREG(0x08)
201#define S3C2400_GPBDAT S3C2410_GPIOREG(0x0C)
202#define S3C2400_GPBUP S3C2410_GPIOREG(0x10)
203
204/* no i/o pin in port b can have value 3 (unless it is a s3c2443) ! */
205
206#define S3C2410_GPB0 S3C2410_GPIONO(S3C2410_GPIO_BANKB, 0)
207#define S3C2410_GPB0_INP (0x00 << 0)
208#define S3C2410_GPB0_OUTP (0x01 << 0)
209#define S3C2410_GPB0_TOUT0 (0x02 << 0)
210#define S3C2400_GPB0_DATA16 (0x02 << 0)
211
212#define S3C2410_GPB1 S3C2410_GPIONO(S3C2410_GPIO_BANKB, 1)
213#define S3C2410_GPB1_INP (0x00 << 2)
214#define S3C2410_GPB1_OUTP (0x01 << 2)
215#define S3C2410_GPB1_TOUT1 (0x02 << 2)
216#define S3C2400_GPB1_DATA17 (0x02 << 2)
217
218#define S3C2410_GPB2 S3C2410_GPIONO(S3C2410_GPIO_BANKB, 2)
219#define S3C2410_GPB2_INP (0x00 << 4)
220#define S3C2410_GPB2_OUTP (0x01 << 4)
221#define S3C2410_GPB2_TOUT2 (0x02 << 4)
222#define S3C2400_GPB2_DATA18 (0x02 << 4)
223#define S3C2400_GPB2_TCLK1 (0x03 << 4)
224
225#define S3C2410_GPB3 S3C2410_GPIONO(S3C2410_GPIO_BANKB, 3)
226#define S3C2410_GPB3_INP (0x00 << 6)
227#define S3C2410_GPB3_OUTP (0x01 << 6)
228#define S3C2410_GPB3_TOUT3 (0x02 << 6)
229#define S3C2400_GPB3_DATA19 (0x02 << 6)
230#define S3C2400_GPB3_TXD1 (0x03 << 6)
231
232#define S3C2410_GPB4 S3C2410_GPIONO(S3C2410_GPIO_BANKB, 4)
233#define S3C2410_GPB4_INP (0x00 << 8)
234#define S3C2410_GPB4_OUTP (0x01 << 8)
235#define S3C2410_GPB4_TCLK0 (0x02 << 8)
236#define S3C2400_GPB4_DATA20 (0x02 << 8)
237#define S3C2410_GPB4_MASK (0x03 << 8)
238#define S3C2400_GPB4_RXD1 (0x03 << 8)
239#define S3C2400_GPB4_MASK (0x03 << 8)
240
241#define S3C2410_GPB5 S3C2410_GPIONO(S3C2410_GPIO_BANKB, 5)
242#define S3C2410_GPB5_INP (0x00 << 10)
243#define S3C2410_GPB5_OUTP (0x01 << 10)
244#define S3C2410_GPB5_nXBACK (0x02 << 10)
245#define S3C2443_GPB5_XBACK (0x03 << 10)
246#define S3C2400_GPB5_DATA21 (0x02 << 10)
247#define S3C2400_GPB5_nCTS1 (0x03 << 10)
248
249#define S3C2410_GPB6 S3C2410_GPIONO(S3C2410_GPIO_BANKB, 6)
250#define S3C2410_GPB6_INP (0x00 << 12)
251#define S3C2410_GPB6_OUTP (0x01 << 12)
252#define S3C2410_GPB6_nXBREQ (0x02 << 12)
253#define S3C2443_GPB6_XBREQ (0x03 << 12)
254#define S3C2400_GPB6_DATA22 (0x02 << 12)
255#define S3C2400_GPB6_nRTS1 (0x03 << 12)
256
257#define S3C2410_GPB7 S3C2410_GPIONO(S3C2410_GPIO_BANKB, 7)
258#define S3C2410_GPB7_INP (0x00 << 14)
259#define S3C2410_GPB7_OUTP (0x01 << 14)
260#define S3C2410_GPB7_nXDACK1 (0x02 << 14)
261#define S3C2443_GPB7_XDACK1 (0x03 << 14)
262#define S3C2400_GPB7_DATA23 (0x02 << 14)
263
264#define S3C2410_GPB8 S3C2410_GPIONO(S3C2410_GPIO_BANKB, 8)
265#define S3C2410_GPB8_INP (0x00 << 16)
266#define S3C2410_GPB8_OUTP (0x01 << 16)
267#define S3C2410_GPB8_nXDREQ1 (0x02 << 16)
268#define S3C2400_GPB8_DATA24 (0x02 << 16)
269
270#define S3C2410_GPB9 S3C2410_GPIONO(S3C2410_GPIO_BANKB, 9)
271#define S3C2410_GPB9_INP (0x00 << 18)
272#define S3C2410_GPB9_OUTP (0x01 << 18)
273#define S3C2410_GPB9_nXDACK0 (0x02 << 18)
274#define S3C2443_GPB9_XDACK0 (0x03 << 18)
275#define S3C2400_GPB9_DATA25 (0x02 << 18)
276#define S3C2400_GPB9_I2SSDI (0x03 << 18)
277
278#define S3C2410_GPB10 S3C2410_GPIONO(S3C2410_GPIO_BANKB, 10)
279#define S3C2410_GPB10_INP (0x00 << 20)
280#define S3C2410_GPB10_OUTP (0x01 << 20)
281#define S3C2410_GPB10_nXDRE0 (0x02 << 20)
282#define S3C2443_GPB10_XDREQ0 (0x03 << 20)
283#define S3C2400_GPB10_DATA26 (0x02 << 20)
284#define S3C2400_GPB10_nSS (0x03 << 20)
285
286#define S3C2400_GPB11 S3C2410_GPIONO(S3C2410_GPIO_BANKB, 11)
287#define S3C2400_GPB11_INP (0x00 << 22)
288#define S3C2400_GPB11_OUTP (0x01 << 22)
289#define S3C2400_GPB11_DATA27 (0x02 << 22)
290
291#define S3C2400_GPB12 S3C2410_GPIONO(S3C2410_GPIO_BANKB, 12)
292#define S3C2400_GPB12_INP (0x00 << 24)
293#define S3C2400_GPB12_OUTP (0x01 << 24)
294#define S3C2400_GPB12_DATA28 (0x02 << 24)
295
296#define S3C2400_GPB13 S3C2410_GPIONO(S3C2410_GPIO_BANKB, 13)
297#define S3C2400_GPB13_INP (0x00 << 26)
298#define S3C2400_GPB13_OUTP (0x01 << 26)
299#define S3C2400_GPB13_DATA29 (0x02 << 26)
300
301#define S3C2400_GPB14 S3C2410_GPIONO(S3C2410_GPIO_BANKB, 14)
302#define S3C2400_GPB14_INP (0x00 << 28)
303#define S3C2400_GPB14_OUTP (0x01 << 28)
304#define S3C2400_GPB14_DATA30 (0x02 << 28)
305
306#define S3C2400_GPB15 S3C2410_GPIONO(S3C2410_GPIO_BANKB, 15)
307#define S3C2400_GPB15_INP (0x00 << 30)
308#define S3C2400_GPB15_OUTP (0x01 << 30)
309#define S3C2400_GPB15_DATA31 (0x02 << 30)
310
311#define S3C2410_GPB_PUPDIS(x) (1<<(x))
312
313/* Port C consits of 16 GPIO/Special function
314 *
315 * almost identical setup to port b, but the special functions are mostly
316 * to do with the video system's sync/etc.
317*/
318
319#define S3C2410_GPCCON S3C2410_GPIOREG(0x20)
320#define S3C2410_GPCDAT S3C2410_GPIOREG(0x24)
321#define S3C2410_GPCUP S3C2410_GPIOREG(0x28)
322
323#define S3C2400_GPCCON S3C2410_GPIOREG(0x14)
324#define S3C2400_GPCDAT S3C2410_GPIOREG(0x18)
325#define S3C2400_GPCUP S3C2410_GPIOREG(0x1C)
326
327#define S3C2410_GPC0 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 0)
328#define S3C2410_GPC0_INP (0x00 << 0)
329#define S3C2410_GPC0_OUTP (0x01 << 0)
330#define S3C2410_GPC0_LEND (0x02 << 0)
331#define S3C2400_GPC0_VD0 (0x02 << 0)
332
333#define S3C2410_GPC1 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 1)
334#define S3C2410_GPC1_INP (0x00 << 2)
335#define S3C2410_GPC1_OUTP (0x01 << 2)
336#define S3C2410_GPC1_VCLK (0x02 << 2)
337#define S3C2400_GPC1_VD1 (0x02 << 2)
338
339#define S3C2410_GPC2 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 2)
340#define S3C2410_GPC2_INP (0x00 << 4)
341#define S3C2410_GPC2_OUTP (0x01 << 4)
342#define S3C2410_GPC2_VLINE (0x02 << 4)
343#define S3C2400_GPC2_VD2 (0x02 << 4)
344
345#define S3C2410_GPC3 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 3)
346#define S3C2410_GPC3_INP (0x00 << 6)
347#define S3C2410_GPC3_OUTP (0x01 << 6)
348#define S3C2410_GPC3_VFRAME (0x02 << 6)
349#define S3C2400_GPC3_VD3 (0x02 << 6)
350
351#define S3C2410_GPC4 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 4)
352#define S3C2410_GPC4_INP (0x00 << 8)
353#define S3C2410_GPC4_OUTP (0x01 << 8)
354#define S3C2410_GPC4_VM (0x02 << 8)
355#define S3C2400_GPC4_VD4 (0x02 << 8)
356
357#define S3C2410_GPC5 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 5)
358#define S3C2410_GPC5_INP (0x00 << 10)
359#define S3C2410_GPC5_OUTP (0x01 << 10)
360#define S3C2410_GPC5_LCDVF0 (0x02 << 10)
361#define S3C2400_GPC5_VD5 (0x02 << 10)
362
363#define S3C2410_GPC6 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 6)
364#define S3C2410_GPC6_INP (0x00 << 12)
365#define S3C2410_GPC6_OUTP (0x01 << 12)
366#define S3C2410_GPC6_LCDVF1 (0x02 << 12)
367#define S3C2400_GPC6_VD6 (0x02 << 12)
368
369#define S3C2410_GPC7 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 7)
370#define S3C2410_GPC7_INP (0x00 << 14)
371#define S3C2410_GPC7_OUTP (0x01 << 14)
372#define S3C2410_GPC7_LCDVF2 (0x02 << 14)
373#define S3C2400_GPC7_VD7 (0x02 << 14)
374
375#define S3C2410_GPC8 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 8)
376#define S3C2410_GPC8_INP (0x00 << 16)
377#define S3C2410_GPC8_OUTP (0x01 << 16)
378#define S3C2410_GPC8_VD0 (0x02 << 16)
379#define S3C2400_GPC8_VD8 (0x02 << 16)
380
381#define S3C2410_GPC9 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 9)
382#define S3C2410_GPC9_INP (0x00 << 18)
383#define S3C2410_GPC9_OUTP (0x01 << 18)
384#define S3C2410_GPC9_VD1 (0x02 << 18)
385#define S3C2400_GPC9_VD9 (0x02 << 18)
386
387#define S3C2410_GPC10 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 10)
388#define S3C2410_GPC10_INP (0x00 << 20)
389#define S3C2410_GPC10_OUTP (0x01 << 20)
390#define S3C2410_GPC10_VD2 (0x02 << 20)
391#define S3C2400_GPC10_VD10 (0x02 << 20)
392
393#define S3C2410_GPC11 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 11)
394#define S3C2410_GPC11_INP (0x00 << 22)
395#define S3C2410_GPC11_OUTP (0x01 << 22)
396#define S3C2410_GPC11_VD3 (0x02 << 22)
397#define S3C2400_GPC11_VD11 (0x02 << 22)
398
399#define S3C2410_GPC12 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 12)
400#define S3C2410_GPC12_INP (0x00 << 24)
401#define S3C2410_GPC12_OUTP (0x01 << 24)
402#define S3C2410_GPC12_VD4 (0x02 << 24)
403#define S3C2400_GPC12_VD12 (0x02 << 24)
404
405#define S3C2410_GPC13 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 13)
406#define S3C2410_GPC13_INP (0x00 << 26)
407#define S3C2410_GPC13_OUTP (0x01 << 26)
408#define S3C2410_GPC13_VD5 (0x02 << 26)
409#define S3C2400_GPC13_VD13 (0x02 << 26)
410
411#define S3C2410_GPC14 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 14)
412#define S3C2410_GPC14_INP (0x00 << 28)
413#define S3C2410_GPC14_OUTP (0x01 << 28)
414#define S3C2410_GPC14_VD6 (0x02 << 28)
415#define S3C2400_GPC14_VD14 (0x02 << 28)
416
417#define S3C2410_GPC15 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 15)
418#define S3C2410_GPC15_INP (0x00 << 30)
419#define S3C2410_GPC15_OUTP (0x01 << 30)
420#define S3C2410_GPC15_VD7 (0x02 << 30)
421#define S3C2400_GPC15_VD15 (0x02 << 30)
422
423#define S3C2410_GPC_PUPDIS(x) (1<<(x))
424
425/*
426 * S3C2410: Port D consists of 16 GPIO/Special function
427 *
428 * almost identical setup to port b, but the special functions are mostly
429 * to do with the video system's data.
430 *
431 * S3C2400: Port D consists of 11 GPIO/Special function
432 *
433 * almost identical setup to port c
434*/
435
436#define S3C2410_GPDCON S3C2410_GPIOREG(0x30)
437#define S3C2410_GPDDAT S3C2410_GPIOREG(0x34)
438#define S3C2410_GPDUP S3C2410_GPIOREG(0x38)
439
440#define S3C2400_GPDCON S3C2410_GPIOREG(0x20)
441#define S3C2400_GPDDAT S3C2410_GPIOREG(0x24)
442#define S3C2400_GPDUP S3C2410_GPIOREG(0x28)
443
444#define S3C2410_GPD0 S3C2410_GPIONO(S3C2410_GPIO_BANKD, 0)
445#define S3C2410_GPD0_INP (0x00 << 0)
446#define S3C2410_GPD0_OUTP (0x01 << 0)
447#define S3C2410_GPD0_VD8 (0x02 << 0)
448#define S3C2400_GPD0_VFRAME (0x02 << 0)
449#define S3C2442_GPD0_nSPICS1 (0x03 << 0)
450
451#define S3C2410_GPD1 S3C2410_GPIONO(S3C2410_GPIO_BANKD, 1)
452#define S3C2410_GPD1_INP (0x00 << 2)
453#define S3C2410_GPD1_OUTP (0x01 << 2)
454#define S3C2410_GPD1_VD9 (0x02 << 2)
455#define S3C2400_GPD1_VM (0x02 << 2)
456#define S3C2442_GPD1_SPICLK1 (0x03 << 2)
457
458#define S3C2410_GPD2 S3C2410_GPIONO(S3C2410_GPIO_BANKD, 2)
459#define S3C2410_GPD2_INP (0x00 << 4)
460#define S3C2410_GPD2_OUTP (0x01 << 4)
461#define S3C2410_GPD2_VD10 (0x02 << 4)
462#define S3C2400_GPD2_VLINE (0x02 << 4)
463
464#define S3C2410_GPD3 S3C2410_GPIONO(S3C2410_GPIO_BANKD, 3)
465#define S3C2410_GPD3_INP (0x00 << 6)
466#define S3C2410_GPD3_OUTP (0x01 << 6)
467#define S3C2410_GPD3_VD11 (0x02 << 6)
468#define S3C2400_GPD3_VCLK (0x02 << 6)
469
470#define S3C2410_GPD4 S3C2410_GPIONO(S3C2410_GPIO_BANKD, 4)
471#define S3C2410_GPD4_INP (0x00 << 8)
472#define S3C2410_GPD4_OUTP (0x01 << 8)
473#define S3C2410_GPD4_VD12 (0x02 << 8)
474#define S3C2400_GPD4_LEND (0x02 << 8)
475
476#define S3C2410_GPD5 S3C2410_GPIONO(S3C2410_GPIO_BANKD, 5)
477#define S3C2410_GPD5_INP (0x00 << 10)
478#define S3C2410_GPD5_OUTP (0x01 << 10)
479#define S3C2410_GPD5_VD13 (0x02 << 10)
480#define S3C2400_GPD5_TOUT0 (0x02 << 10)
481
482#define S3C2410_GPD6 S3C2410_GPIONO(S3C2410_GPIO_BANKD, 6)
483#define S3C2410_GPD6_INP (0x00 << 12)
484#define S3C2410_GPD6_OUTP (0x01 << 12)
485#define S3C2410_GPD6_VD14 (0x02 << 12)
486#define S3C2400_GPD6_TOUT1 (0x02 << 12)
487
488#define S3C2410_GPD7 S3C2410_GPIONO(S3C2410_GPIO_BANKD, 7)
489#define S3C2410_GPD7_INP (0x00 << 14)
490#define S3C2410_GPD7_OUTP (0x01 << 14)
491#define S3C2410_GPD7_VD15 (0x02 << 14)
492#define S3C2400_GPD7_TOUT2 (0x02 << 14)
493
494#define S3C2410_GPD8 S3C2410_GPIONO(S3C2410_GPIO_BANKD, 8)
495#define S3C2410_GPD8_INP (0x00 << 16)
496#define S3C2410_GPD8_OUTP (0x01 << 16)
497#define S3C2410_GPD8_VD16 (0x02 << 16)
498#define S3C2400_GPD8_TOUT3 (0x02 << 16)
499
500#define S3C2410_GPD9 S3C2410_GPIONO(S3C2410_GPIO_BANKD, 9)
501#define S3C2410_GPD9_INP (0x00 << 18)
502#define S3C2410_GPD9_OUTP (0x01 << 18)
503#define S3C2410_GPD9_VD17 (0x02 << 18)
504#define S3C2400_GPD9_TCLK0 (0x02 << 18)
505#define S3C2410_GPD9_MASK (0x03 << 18)
506
507#define S3C2410_GPD10 S3C2410_GPIONO(S3C2410_GPIO_BANKD, 10)
508#define S3C2410_GPD10_INP (0x00 << 20)
509#define S3C2410_GPD10_OUTP (0x01 << 20)
510#define S3C2410_GPD10_VD18 (0x02 << 20)
511#define S3C2400_GPD10_nWAIT (0x02 << 20)
512
513#define S3C2410_GPD11 S3C2410_GPIONO(S3C2410_GPIO_BANKD, 11)
514#define S3C2410_GPD11_INP (0x00 << 22)
515#define S3C2410_GPD11_OUTP (0x01 << 22)
516#define S3C2410_GPD11_VD19 (0x02 << 22)
517
518#define S3C2410_GPD12 S3C2410_GPIONO(S3C2410_GPIO_BANKD, 12)
519#define S3C2410_GPD12_INP (0x00 << 24)
520#define S3C2410_GPD12_OUTP (0x01 << 24)
521#define S3C2410_GPD12_VD20 (0x02 << 24)
522
523#define S3C2410_GPD13 S3C2410_GPIONO(S3C2410_GPIO_BANKD, 13)
524#define S3C2410_GPD13_INP (0x00 << 26)
525#define S3C2410_GPD13_OUTP (0x01 << 26)
526#define S3C2410_GPD13_VD21 (0x02 << 26)
527
528#define S3C2410_GPD14 S3C2410_GPIONO(S3C2410_GPIO_BANKD, 14)
529#define S3C2410_GPD14_INP (0x00 << 28)
530#define S3C2410_GPD14_OUTP (0x01 << 28)
531#define S3C2410_GPD14_VD22 (0x02 << 28)
532#define S3C2410_GPD14_nSS1 (0x03 << 28)
533
534#define S3C2410_GPD15 S3C2410_GPIONO(S3C2410_GPIO_BANKD, 15)
535#define S3C2410_GPD15_INP (0x00 << 30)
536#define S3C2410_GPD15_OUTP (0x01 << 30)
537#define S3C2410_GPD15_VD23 (0x02 << 30)
538#define S3C2410_GPD15_nSS0 (0x03 << 30)
539
540#define S3C2410_GPD_PUPDIS(x) (1<<(x))
541
542/* S3C2410:
543 * Port E consists of 16 GPIO/Special function
544 *
545 * again, the same as port B, but dealing with I2S, SDI, and
546 * more miscellaneous functions
547 *
548 * S3C2400:
549 * Port E consists of 12 GPIO/Special function
550 *
551 * GPIO / interrupt inputs
552*/
553
554#define S3C2410_GPECON S3C2410_GPIOREG(0x40)
555#define S3C2410_GPEDAT S3C2410_GPIOREG(0x44)
556#define S3C2410_GPEUP S3C2410_GPIOREG(0x48)
557
558#define S3C2400_GPECON S3C2410_GPIOREG(0x2C)
559#define S3C2400_GPEDAT S3C2410_GPIOREG(0x30)
560#define S3C2400_GPEUP S3C2410_GPIOREG(0x34)
561
562#define S3C2410_GPE0 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 0)
563#define S3C2410_GPE0_INP (0x00 << 0)
564#define S3C2410_GPE0_OUTP (0x01 << 0)
565#define S3C2410_GPE0_I2SLRCK (0x02 << 0)
566#define S3C2443_GPE0_AC_nRESET (0x03 << 0)
567#define S3C2400_GPE0_EINT0 (0x02 << 0)
568#define S3C2410_GPE0_MASK (0x03 << 0)
569
570#define S3C2410_GPE1 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 1)
571#define S3C2410_GPE1_INP (0x00 << 2)
572#define S3C2410_GPE1_OUTP (0x01 << 2)
573#define S3C2410_GPE1_I2SSCLK (0x02 << 2)
574#define S3C2443_GPE1_AC_SYNC (0x03 << 2)
575#define S3C2400_GPE1_EINT1 (0x02 << 2)
576#define S3C2400_GPE1_nSS (0x03 << 2)
577#define S3C2410_GPE1_MASK (0x03 << 2)
578
579#define S3C2410_GPE2 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 2)
580#define S3C2410_GPE2_INP (0x00 << 4)
581#define S3C2410_GPE2_OUTP (0x01 << 4)
582#define S3C2410_GPE2_CDCLK (0x02 << 4)
583#define S3C2443_GPE2_AC_BITCLK (0x03 << 4)
584#define S3C2400_GPE2_EINT2 (0x02 << 4)
585#define S3C2400_GPE2_I2SSDI (0x03 << 4)
586
587#define S3C2410_GPE3 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 3)
588#define S3C2410_GPE3_INP (0x00 << 6)
589#define S3C2410_GPE3_OUTP (0x01 << 6)
590#define S3C2410_GPE3_I2SSDI (0x02 << 6)
591#define S3C2443_GPE3_AC_SDI (0x03 << 6)
592#define S3C2400_GPE3_EINT3 (0x02 << 6)
593#define S3C2400_GPE3_nCTS1 (0x03 << 6)
594#define S3C2410_GPE3_nSS0 (0x03 << 6)
595#define S3C2410_GPE3_MASK (0x03 << 6)
596
597#define S3C2410_GPE4 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 4)
598#define S3C2410_GPE4_INP (0x00 << 8)
599#define S3C2410_GPE4_OUTP (0x01 << 8)
600#define S3C2410_GPE4_I2SSDO (0x02 << 8)
601#define S3C2443_GPE4_AC_SDO (0x03 << 8)
602#define S3C2400_GPE4_EINT4 (0x02 << 8)
603#define S3C2400_GPE4_nRTS1 (0x03 << 8)
604#define S3C2410_GPE4_I2SSDI (0x03 << 8)
605#define S3C2410_GPE4_MASK (0x03 << 8)
606
607#define S3C2410_GPE5 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 5)
608#define S3C2410_GPE5_INP (0x00 << 10)
609#define S3C2410_GPE5_OUTP (0x01 << 10)
610#define S3C2410_GPE5_SDCLK (0x02 << 10)
611#define S3C2443_GPE5_SD1_CLK (0x02 << 10)
612#define S3C2400_GPE5_EINT5 (0x02 << 10)
613#define S3C2400_GPE5_TCLK1 (0x03 << 10)
614
615#define S3C2410_GPE6 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 6)
616#define S3C2410_GPE6_INP (0x00 << 12)
617#define S3C2410_GPE6_OUTP (0x01 << 12)
618#define S3C2410_GPE6_SDCMD (0x02 << 12)
619#define S3C2443_GPE6_SD1_CMD (0x02 << 12)
620#define S3C2443_GPE6_AC_BITCLK (0x03 << 12)
621#define S3C2400_GPE6_EINT6 (0x02 << 12)
622
623#define S3C2410_GPE7 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 7)
624#define S3C2410_GPE7_INP (0x00 << 14)
625#define S3C2410_GPE7_OUTP (0x01 << 14)
626#define S3C2410_GPE7_SDDAT0 (0x02 << 14)
627#define S3C2443_GPE5_SD1_DAT0 (0x02 << 14)
628#define S3C2443_GPE7_AC_SDI (0x03 << 14)
629#define S3C2400_GPE7_EINT7 (0x02 << 14)
630
631#define S3C2410_GPE8 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 8)
632#define S3C2410_GPE8_INP (0x00 << 16)
633#define S3C2410_GPE8_OUTP (0x01 << 16)
634#define S3C2410_GPE8_SDDAT1 (0x02 << 16)
635#define S3C2443_GPE8_SD1_DAT1 (0x02 << 16)
636#define S3C2443_GPE8_AC_SDO (0x03 << 16)
637#define S3C2400_GPE8_nXDACK0 (0x02 << 16)
638
639#define S3C2410_GPE9 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 9)
640#define S3C2410_GPE9_INP (0x00 << 18)
641#define S3C2410_GPE9_OUTP (0x01 << 18)
642#define S3C2410_GPE9_SDDAT2 (0x02 << 18)
643#define S3C2443_GPE9_SD1_DAT2 (0x02 << 18)
644#define S3C2443_GPE9_AC_SYNC (0x03 << 18)
645#define S3C2400_GPE9_nXDACK1 (0x02 << 18)
646#define S3C2400_GPE9_nXBACK (0x03 << 18)
647
648#define S3C2410_GPE10 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 10)
649#define S3C2410_GPE10_INP (0x00 << 20)
650#define S3C2410_GPE10_OUTP (0x01 << 20)
651#define S3C2410_GPE10_SDDAT3 (0x02 << 20)
652#define S3C2443_GPE10_SD1_DAT3 (0x02 << 20)
653#define S3C2443_GPE10_AC_nRESET (0x03 << 20)
654#define S3C2400_GPE10_nXDREQ0 (0x02 << 20)
655
656#define S3C2410_GPE11 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 11)
657#define S3C2410_GPE11_INP (0x00 << 22)
658#define S3C2410_GPE11_OUTP (0x01 << 22)
659#define S3C2410_GPE11_SPIMISO0 (0x02 << 22)
660#define S3C2400_GPE11_nXDREQ1 (0x02 << 22)
661#define S3C2400_GPE11_nXBREQ (0x03 << 22)
662
663#define S3C2410_GPE12 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 12)
664#define S3C2410_GPE12_INP (0x00 << 24)
665#define S3C2410_GPE12_OUTP (0x01 << 24)
666#define S3C2410_GPE12_SPIMOSI0 (0x02 << 24)
667
668#define S3C2410_GPE13 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 13)
669#define S3C2410_GPE13_INP (0x00 << 26)
670#define S3C2410_GPE13_OUTP (0x01 << 26)
671#define S3C2410_GPE13_SPICLK0 (0x02 << 26)
672
673#define S3C2410_GPE14 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 14)
674#define S3C2410_GPE14_INP (0x00 << 28)
675#define S3C2410_GPE14_OUTP (0x01 << 28)
676#define S3C2410_GPE14_IICSCL (0x02 << 28)
677#define S3C2410_GPE14_MASK (0x03 << 28)
678
679#define S3C2410_GPE15 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 15)
680#define S3C2410_GPE15_INP (0x00 << 30)
681#define S3C2410_GPE15_OUTP (0x01 << 30)
682#define S3C2410_GPE15_IICSDA (0x02 << 30)
683#define S3C2410_GPE15_MASK (0x03 << 30)
684
685#define S3C2440_GPE0_ACSYNC (0x03 << 0)
686#define S3C2440_GPE1_ACBITCLK (0x03 << 2)
687#define S3C2440_GPE2_ACRESET (0x03 << 4)
688#define S3C2440_GPE3_ACIN (0x03 << 6)
689#define S3C2440_GPE4_ACOUT (0x03 << 8)
690
691#define S3C2410_GPE_PUPDIS(x) (1<<(x))
692
693/* S3C2410:
694 * Port F consists of 8 GPIO/Special function
695 *
696 * GPIO / interrupt inputs
697 *
698 * GPFCON has 2 bits for each of the input pins on port F
699 * 00 = 0 input, 1 output, 2 interrupt (EINT0..7), 3 undefined
700 *
701 * pull up works like all other ports.
702 *
703 * S3C2400:
704 * Port F consists of 7 GPIO/Special function
705 *
706 * GPIO/serial/misc pins
707*/
708
709#define S3C2410_GPFCON S3C2410_GPIOREG(0x50)
710#define S3C2410_GPFDAT S3C2410_GPIOREG(0x54)
711#define S3C2410_GPFUP S3C2410_GPIOREG(0x58)
712
713#define S3C2400_GPFCON S3C2410_GPIOREG(0x38)
714#define S3C2400_GPFDAT S3C2410_GPIOREG(0x3C)
715#define S3C2400_GPFUP S3C2410_GPIOREG(0x40)
716
717#define S3C2410_GPF0 S3C2410_GPIONO(S3C2410_GPIO_BANKF, 0)
718#define S3C2410_GPF0_INP (0x00 << 0)
719#define S3C2410_GPF0_OUTP (0x01 << 0)
720#define S3C2410_GPF0_EINT0 (0x02 << 0)
721#define S3C2400_GPF0_RXD0 (0x02 << 0)
722
723#define S3C2410_GPF1 S3C2410_GPIONO(S3C2410_GPIO_BANKF, 1)
724#define S3C2410_GPF1_INP (0x00 << 2)
725#define S3C2410_GPF1_OUTP (0x01 << 2)
726#define S3C2410_GPF1_EINT1 (0x02 << 2)
727#define S3C2400_GPF1_RXD1 (0x02 << 2)
728#define S3C2400_GPF1_IICSDA (0x03 << 2)
729
730#define S3C2410_GPF2 S3C2410_GPIONO(S3C2410_GPIO_BANKF, 2)
731#define S3C2410_GPF2_INP (0x00 << 4)
732#define S3C2410_GPF2_OUTP (0x01 << 4)
733#define S3C2410_GPF2_EINT2 (0x02 << 4)
734#define S3C2400_GPF2_TXD0 (0x02 << 4)
735
736#define S3C2410_GPF3 S3C2410_GPIONO(S3C2410_GPIO_BANKF, 3)
737#define S3C2410_GPF3_INP (0x00 << 6)
738#define S3C2410_GPF3_OUTP (0x01 << 6)
739#define S3C2410_GPF3_EINT3 (0x02 << 6)
740#define S3C2400_GPF3_TXD1 (0x02 << 6)
741#define S3C2400_GPF3_IICSCL (0x03 << 6)
742
743#define S3C2410_GPF4 S3C2410_GPIONO(S3C2410_GPIO_BANKF, 4)
744#define S3C2410_GPF4_INP (0x00 << 8)
745#define S3C2410_GPF4_OUTP (0x01 << 8)
746#define S3C2410_GPF4_EINT4 (0x02 << 8)
747#define S3C2400_GPF4_nRTS0 (0x02 << 8)
748#define S3C2400_GPF4_nXBACK (0x03 << 8)
749
750#define S3C2410_GPF5 S3C2410_GPIONO(S3C2410_GPIO_BANKF, 5)
751#define S3C2410_GPF5_INP (0x00 << 10)
752#define S3C2410_GPF5_OUTP (0x01 << 10)
753#define S3C2410_GPF5_EINT5 (0x02 << 10)
754#define S3C2400_GPF5_nCTS0 (0x02 << 10)
755#define S3C2400_GPF5_nXBREQ (0x03 << 10)
756
757#define S3C2410_GPF6 S3C2410_GPIONO(S3C2410_GPIO_BANKF, 6)
758#define S3C2410_GPF6_INP (0x00 << 12)
759#define S3C2410_GPF6_OUTP (0x01 << 12)
760#define S3C2410_GPF6_EINT6 (0x02 << 12)
761#define S3C2400_GPF6_CLKOUT (0x02 << 12)
762
763#define S3C2410_GPF7 S3C2410_GPIONO(S3C2410_GPIO_BANKF, 7)
764#define S3C2410_GPF7_INP (0x00 << 14)
765#define S3C2410_GPF7_OUTP (0x01 << 14)
766#define S3C2410_GPF7_EINT7 (0x02 << 14)
767
768#define S3C2410_GPF_PUPDIS(x) (1<<(x))
769
770/* S3C2410:
771 * Port G consists of 8 GPIO/IRQ/Special function
772 *
773 * GPGCON has 2 bits for each of the input pins on port F
774 * 00 = 0 input, 1 output, 2 interrupt (EINT0..7), 3 special func
775 *
776 * pull up works like all other ports.
777 *
778 * S3C2400:
779 * Port G consists of 10 GPIO/Special function
780*/
781
782#define S3C2410_GPGCON S3C2410_GPIOREG(0x60)
783#define S3C2410_GPGDAT S3C2410_GPIOREG(0x64)
784#define S3C2410_GPGUP S3C2410_GPIOREG(0x68)
785
786#define S3C2400_GPGCON S3C2410_GPIOREG(0x44)
787#define S3C2400_GPGDAT S3C2410_GPIOREG(0x48)
788#define S3C2400_GPGUP S3C2410_GPIOREG(0x4C)
789
790#define S3C2410_GPG0 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 0)
791#define S3C2410_GPG0_INP (0x00 << 0)
792#define S3C2410_GPG0_OUTP (0x01 << 0)
793#define S3C2410_GPG0_EINT8 (0x02 << 0)
794#define S3C2400_GPG0_I2SLRCK (0x02 << 0)
795
796#define S3C2410_GPG1 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 1)
797#define S3C2410_GPG1_INP (0x00 << 2)
798#define S3C2410_GPG1_OUTP (0x01 << 2)
799#define S3C2410_GPG1_EINT9 (0x02 << 2)
800#define S3C2400_GPG1_I2SSCLK (0x02 << 2)
801
802#define S3C2410_GPG2 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 2)
803#define S3C2410_GPG2_INP (0x00 << 4)
804#define S3C2410_GPG2_OUTP (0x01 << 4)
805#define S3C2410_GPG2_EINT10 (0x02 << 4)
806#define S3C2410_GPG2_nSS0 (0x03 << 4)
807#define S3C2400_GPG2_CDCLK (0x02 << 4)
808
809#define S3C2410_GPG3 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 3)
810#define S3C2410_GPG3_INP (0x00 << 6)
811#define S3C2410_GPG3_OUTP (0x01 << 6)
812#define S3C2410_GPG3_EINT11 (0x02 << 6)
813#define S3C2410_GPG3_nSS1 (0x03 << 6)
814#define S3C2400_GPG3_I2SSDO (0x02 << 6)
815#define S3C2400_GPG3_I2SSDI (0x03 << 6)
816
817#define S3C2410_GPG4 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 4)
818#define S3C2410_GPG4_INP (0x00 << 8)
819#define S3C2410_GPG4_OUTP (0x01 << 8)
820#define S3C2410_GPG4_EINT12 (0x02 << 8)
821#define S3C2400_GPG4_MMCCLK (0x02 << 8)
822#define S3C2400_GPG4_I2SSDI (0x03 << 8)
823#define S3C2410_GPG4_LCDPWREN (0x03 << 8)
824#define S3C2443_GPG4_LCDPWRDN (0x03 << 8)
825
826#define S3C2410_GPG5 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 5)
827#define S3C2410_GPG5_INP (0x00 << 10)
828#define S3C2410_GPG5_OUTP (0x01 << 10)
829#define S3C2410_GPG5_EINT13 (0x02 << 10)
830#define S3C2400_GPG5_MMCCMD (0x02 << 10)
831#define S3C2400_GPG5_IICSDA (0x03 << 10)
832#define S3C2410_GPG5_SPIMISO1 (0x03 << 10) /* not s3c2443 */
833
834#define S3C2410_GPG6 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 6)
835#define S3C2410_GPG6_INP (0x00 << 12)
836#define S3C2410_GPG6_OUTP (0x01 << 12)
837#define S3C2410_GPG6_EINT14 (0x02 << 12)
838#define S3C2400_GPG6_MMCDAT (0x02 << 12)
839#define S3C2400_GPG6_IICSCL (0x03 << 12)
840#define S3C2410_GPG6_SPIMOSI1 (0x03 << 12)
841
842#define S3C2410_GPG7 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 7)
843#define S3C2410_GPG7_INP (0x00 << 14)
844#define S3C2410_GPG7_OUTP (0x01 << 14)
845#define S3C2410_GPG7_EINT15 (0x02 << 14)
846#define S3C2410_GPG7_SPICLK1 (0x03 << 14)
847#define S3C2400_GPG7_SPIMISO (0x02 << 14)
848#define S3C2400_GPG7_IICSDA (0x03 << 14)
849
850#define S3C2410_GPG8 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 8)
851#define S3C2410_GPG8_INP (0x00 << 16)
852#define S3C2410_GPG8_OUTP (0x01 << 16)
853#define S3C2410_GPG8_EINT16 (0x02 << 16)
854#define S3C2400_GPG8_SPIMOSI (0x02 << 16)
855#define S3C2400_GPG8_IICSCL (0x03 << 16)
856
857#define S3C2410_GPG9 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 9)
858#define S3C2410_GPG9_INP (0x00 << 18)
859#define S3C2410_GPG9_OUTP (0x01 << 18)
860#define S3C2410_GPG9_EINT17 (0x02 << 18)
861#define S3C2400_GPG9_SPICLK (0x02 << 18)
862#define S3C2400_GPG9_MMCCLK (0x03 << 18)
863
864#define S3C2410_GPG10 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 10)
865#define S3C2410_GPG10_INP (0x00 << 20)
866#define S3C2410_GPG10_OUTP (0x01 << 20)
867#define S3C2410_GPG10_EINT18 (0x02 << 20)
868
869#define S3C2410_GPG11 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 11)
870#define S3C2410_GPG11_INP (0x00 << 22)
871#define S3C2410_GPG11_OUTP (0x01 << 22)
872#define S3C2410_GPG11_EINT19 (0x02 << 22)
873#define S3C2410_GPG11_TCLK1 (0x03 << 22)
874#define S3C2443_GPG11_CF_nIREQ (0x03 << 22)
875
876#define S3C2410_GPG12 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 12)
877#define S3C2410_GPG12_INP (0x00 << 24)
878#define S3C2410_GPG12_OUTP (0x01 << 24)
879#define S3C2410_GPG12_EINT20 (0x02 << 24)
880#define S3C2410_GPG12_XMON (0x03 << 24)
881#define S3C2442_GPG12_nSPICS0 (0x03 << 24)
882#define S3C2443_GPG12_nINPACK (0x03 << 24)
883
884#define S3C2410_GPG13 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 13)
885#define S3C2410_GPG13_INP (0x00 << 26)
886#define S3C2410_GPG13_OUTP (0x01 << 26)
887#define S3C2410_GPG13_EINT21 (0x02 << 26)
888#define S3C2410_GPG13_nXPON (0x03 << 26)
889#define S3C2443_GPG13_CF_nREG (0x03 << 26)
890
891#define S3C2410_GPG14 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 14)
892#define S3C2410_GPG14_INP (0x00 << 28)
893#define S3C2410_GPG14_OUTP (0x01 << 28)
894#define S3C2410_GPG14_EINT22 (0x02 << 28)
895#define S3C2410_GPG14_YMON (0x03 << 28)
896#define S3C2443_GPG14_CF_RESET (0x03 << 28)
897
898#define S3C2410_GPG15 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 15)
899#define S3C2410_GPG15_INP (0x00 << 30)
900#define S3C2410_GPG15_OUTP (0x01 << 30)
901#define S3C2410_GPG15_EINT23 (0x02 << 30)
902#define S3C2410_GPG15_nYPON (0x03 << 30)
903#define S3C2443_GPG15_CF_PWR (0x03 << 30)
904
905#define S3C2410_GPG_PUPDIS(x) (1<<(x))
906
907/* Port H consists of11 GPIO/serial/Misc pins
908 *
909 * GPGCON has 2 bits for each of the input pins on port F
910 * 00 = 0 input, 1 output, 2 interrupt (EINT0..7), 3 special func
911 *
912 * pull up works like all other ports.
913*/
914
915#define S3C2410_GPHCON S3C2410_GPIOREG(0x70)
916#define S3C2410_GPHDAT S3C2410_GPIOREG(0x74)
917#define S3C2410_GPHUP S3C2410_GPIOREG(0x78)
918
919#define S3C2410_GPH0 S3C2410_GPIONO(S3C2410_GPIO_BANKH, 0)
920#define S3C2410_GPH0_INP (0x00 << 0)
921#define S3C2410_GPH0_OUTP (0x01 << 0)
922#define S3C2410_GPH0_nCTS0 (0x02 << 0)
923
924#define S3C2410_GPH1 S3C2410_GPIONO(S3C2410_GPIO_BANKH, 1)
925#define S3C2410_GPH1_INP (0x00 << 2)
926#define S3C2410_GPH1_OUTP (0x01 << 2)
927#define S3C2410_GPH1_nRTS0 (0x02 << 2)
928
929#define S3C2410_GPH2 S3C2410_GPIONO(S3C2410_GPIO_BANKH, 2)
930#define S3C2410_GPH2_INP (0x00 << 4)
931#define S3C2410_GPH2_OUTP (0x01 << 4)
932#define S3C2410_GPH2_TXD0 (0x02 << 4)
933
934#define S3C2410_GPH3 S3C2410_GPIONO(S3C2410_GPIO_BANKH, 3)
935#define S3C2410_GPH3_INP (0x00 << 6)
936#define S3C2410_GPH3_OUTP (0x01 << 6)
937#define S3C2410_GPH3_RXD0 (0x02 << 6)
938
939#define S3C2410_GPH4 S3C2410_GPIONO(S3C2410_GPIO_BANKH, 4)
940#define S3C2410_GPH4_INP (0x00 << 8)
941#define S3C2410_GPH4_OUTP (0x01 << 8)
942#define S3C2410_GPH4_TXD1 (0x02 << 8)
943
944#define S3C2410_GPH5 S3C2410_GPIONO(S3C2410_GPIO_BANKH, 5)
945#define S3C2410_GPH5_INP (0x00 << 10)
946#define S3C2410_GPH5_OUTP (0x01 << 10)
947#define S3C2410_GPH5_RXD1 (0x02 << 10)
948
949#define S3C2410_GPH6 S3C2410_GPIONO(S3C2410_GPIO_BANKH, 6)
950#define S3C2410_GPH6_INP (0x00 << 12)
951#define S3C2410_GPH6_OUTP (0x01 << 12)
952#define S3C2410_GPH6_TXD2 (0x02 << 12)
953#define S3C2410_GPH6_nRTS1 (0x03 << 12)
954
955#define S3C2410_GPH7 S3C2410_GPIONO(S3C2410_GPIO_BANKH, 7)
956#define S3C2410_GPH7_INP (0x00 << 14)
957#define S3C2410_GPH7_OUTP (0x01 << 14)
958#define S3C2410_GPH7_RXD2 (0x02 << 14)
959#define S3C2410_GPH7_nCTS1 (0x03 << 14)
960
961#define S3C2410_GPH8 S3C2410_GPIONO(S3C2410_GPIO_BANKH, 8)
962#define S3C2410_GPH8_INP (0x00 << 16)
963#define S3C2410_GPH8_OUTP (0x01 << 16)
964#define S3C2410_GPH8_UCLK (0x02 << 16)
965
966#define S3C2410_GPH9 S3C2410_GPIONO(S3C2410_GPIO_BANKH, 9)
967#define S3C2410_GPH9_INP (0x00 << 18)
968#define S3C2410_GPH9_OUTP (0x01 << 18)
969#define S3C2410_GPH9_CLKOUT0 (0x02 << 18)
970#define S3C2442_GPH9_nSPICS0 (0x03 << 18)
971
972#define S3C2410_GPH10 S3C2410_GPIONO(S3C2410_GPIO_BANKH, 10)
973#define S3C2410_GPH10_INP (0x00 << 20)
974#define S3C2410_GPH10_OUTP (0x01 << 20)
975#define S3C2410_GPH10_CLKOUT1 (0x02 << 20)
976
977/* The S3C2412 and S3C2413 move the GPJ register set to after
978 * GPH, which means all registers after 0x80 are now offset by 0x10
979 * for the 2412/2413 from the 2410/2440/2442
980*/
981
982/* miscellaneous control */
983#define S3C2400_MISCCR S3C2410_GPIOREG(0x54)
984#define S3C2410_MISCCR S3C2410_GPIOREG(0x80)
985#define S3C2410_DCLKCON S3C2410_GPIOREG(0x84)
986
987#define S3C24XX_DCLKCON S3C24XX_GPIOREG2(0x84)
988
989/* see clock.h for dclk definitions */
990
991/* pullup control on databus */
992#define S3C2410_MISCCR_SPUCR_HEN (0<<0)
993#define S3C2410_MISCCR_SPUCR_HDIS (1<<0)
994#define S3C2410_MISCCR_SPUCR_LEN (0<<1)
995#define S3C2410_MISCCR_SPUCR_LDIS (1<<1)
996
997#define S3C2400_MISCCR_SPUCR_LEN (0<<0)
998#define S3C2400_MISCCR_SPUCR_LDIS (1<<0)
999#define S3C2400_MISCCR_SPUCR_HEN (0<<1)
1000#define S3C2400_MISCCR_SPUCR_HDIS (1<<1)
1001
1002#define S3C2400_MISCCR_HZ_STOPEN (0<<2)
1003#define S3C2400_MISCCR_HZ_STOPPREV (1<<2)
1004
1005#define S3C2410_MISCCR_USBDEV (0<<3)
1006#define S3C2410_MISCCR_USBHOST (1<<3)
1007
1008#define S3C2410_MISCCR_CLK0_MPLL (0<<4)
1009#define S3C2410_MISCCR_CLK0_UPLL (1<<4)
1010#define S3C2410_MISCCR_CLK0_FCLK (2<<4)
1011#define S3C2410_MISCCR_CLK0_HCLK (3<<4)
1012#define S3C2410_MISCCR_CLK0_PCLK (4<<4)
1013#define S3C2410_MISCCR_CLK0_DCLK0 (5<<4)
1014#define S3C2410_MISCCR_CLK0_MASK (7<<4)
1015
1016#define S3C2412_MISCCR_CLK0_RTC (2<<4)
1017
1018#define S3C2410_MISCCR_CLK1_MPLL (0<<8)
1019#define S3C2410_MISCCR_CLK1_UPLL (1<<8)
1020#define S3C2410_MISCCR_CLK1_FCLK (2<<8)
1021#define S3C2410_MISCCR_CLK1_HCLK (3<<8)
1022#define S3C2410_MISCCR_CLK1_PCLK (4<<8)
1023#define S3C2410_MISCCR_CLK1_DCLK1 (5<<8)
1024#define S3C2410_MISCCR_CLK1_MASK (7<<8)
1025
1026#define S3C2412_MISCCR_CLK1_CLKsrc (0<<8)
1027
1028#define S3C2410_MISCCR_USBSUSPND0 (1<<12)
1029#define S3C2410_MISCCR_USBSUSPND1 (1<<13)
1030
1031#define S3C2410_MISCCR_nRSTCON (1<<16)
1032
1033#define S3C2410_MISCCR_nEN_SCLK0 (1<<17)
1034#define S3C2410_MISCCR_nEN_SCLK1 (1<<18)
1035#define S3C2410_MISCCR_nEN_SCLKE (1<<19) /* not 2412 */
1036#define S3C2410_MISCCR_SDSLEEP (7<<17)
1037
1038/* external interrupt control... */
1039/* S3C2410_EXTINT0 -> irq sense control for EINT0..EINT7
1040 * S3C2410_EXTINT1 -> irq sense control for EINT8..EINT15
1041 * S3C2410_EXTINT2 -> irq sense control for EINT16..EINT23
1042 *
1043 * note S3C2410_EXTINT2 has filtering options for EINT16..EINT23
1044 *
1045 * Samsung datasheet p9-25
1046*/
1047#define S3C2400_EXTINT0 S3C2410_GPIOREG(0x58)
1048#define S3C2410_EXTINT0 S3C2410_GPIOREG(0x88)
1049#define S3C2410_EXTINT1 S3C2410_GPIOREG(0x8C)
1050#define S3C2410_EXTINT2 S3C2410_GPIOREG(0x90)
1051
1052#define S3C24XX_EXTINT0 S3C24XX_GPIOREG2(0x88)
1053#define S3C24XX_EXTINT1 S3C24XX_GPIOREG2(0x8C)
1054#define S3C24XX_EXTINT2 S3C24XX_GPIOREG2(0x90)
1055
1056/* values for S3C2410_EXTINT0/1/2 */
1057#define S3C2410_EXTINT_LOWLEV (0x00)
1058#define S3C2410_EXTINT_HILEV (0x01)
1059#define S3C2410_EXTINT_FALLEDGE (0x02)
1060#define S3C2410_EXTINT_RISEEDGE (0x04)
1061#define S3C2410_EXTINT_BOTHEDGE (0x06)
1062
1063/* interrupt filtering conrrol for EINT16..EINT23 */
1064#define S3C2410_EINFLT0 S3C2410_GPIOREG(0x94)
1065#define S3C2410_EINFLT1 S3C2410_GPIOREG(0x98)
1066#define S3C2410_EINFLT2 S3C2410_GPIOREG(0x9C)
1067#define S3C2410_EINFLT3 S3C2410_GPIOREG(0xA0)
1068
1069#define S3C24XX_EINFLT0 S3C24XX_GPIOREG2(0x94)
1070#define S3C24XX_EINFLT1 S3C24XX_GPIOREG2(0x98)
1071#define S3C24XX_EINFLT2 S3C24XX_GPIOREG2(0x9C)
1072#define S3C24XX_EINFLT3 S3C24XX_GPIOREG2(0xA0)
1073
1074/* values for interrupt filtering */
1075#define S3C2410_EINTFLT_PCLK (0x00)
1076#define S3C2410_EINTFLT_EXTCLK (1<<7)
1077#define S3C2410_EINTFLT_WIDTHMSK(x) ((x) & 0x3f)
1078
1079/* removed EINTxxxx defs from here, not meant for this */
1080
1081/* GSTATUS have miscellaneous information in them
1082 *
1083 * These move between s3c2410 and s3c2412 style systems.
1084 */
1085
1086#define S3C2410_GSTATUS0 S3C2410_GPIOREG(0x0AC)
1087#define S3C2410_GSTATUS1 S3C2410_GPIOREG(0x0B0)
1088#define S3C2410_GSTATUS2 S3C2410_GPIOREG(0x0B4)
1089#define S3C2410_GSTATUS3 S3C2410_GPIOREG(0x0B8)
1090#define S3C2410_GSTATUS4 S3C2410_GPIOREG(0x0BC)
1091
1092#define S3C2412_GSTATUS0 S3C2410_GPIOREG(0x0BC)
1093#define S3C2412_GSTATUS1 S3C2410_GPIOREG(0x0C0)
1094#define S3C2412_GSTATUS2 S3C2410_GPIOREG(0x0C4)
1095#define S3C2412_GSTATUS3 S3C2410_GPIOREG(0x0C8)
1096#define S3C2412_GSTATUS4 S3C2410_GPIOREG(0x0CC)
1097
1098#define S3C24XX_GSTATUS0 S3C24XX_GPIOREG2(0x0AC)
1099#define S3C24XX_GSTATUS1 S3C24XX_GPIOREG2(0x0B0)
1100#define S3C24XX_GSTATUS2 S3C24XX_GPIOREG2(0x0B4)
1101#define S3C24XX_GSTATUS3 S3C24XX_GPIOREG2(0x0B8)
1102#define S3C24XX_GSTATUS4 S3C24XX_GPIOREG2(0x0BC)
1103
1104#define S3C2410_GSTATUS0_nWAIT (1<<3)
1105#define S3C2410_GSTATUS0_NCON (1<<2)
1106#define S3C2410_GSTATUS0_RnB (1<<1)
1107#define S3C2410_GSTATUS0_nBATTFLT (1<<0)
1108
1109#define S3C2410_GSTATUS1_IDMASK (0xffff0000)
1110#define S3C2410_GSTATUS1_2410 (0x32410000)
1111#define S3C2410_GSTATUS1_2412 (0x32412001)
1112#define S3C2410_GSTATUS1_2440 (0x32440000)
1113#define S3C2410_GSTATUS1_2442 (0x32440aaa)
1114
1115#define S3C2410_GSTATUS2_WTRESET (1<<2)
1116#define S3C2410_GSTATUS2_OFFRESET (1<<1)
1117#define S3C2410_GSTATUS2_PONRESET (1<<0)
1118
1119/* open drain control register */
1120#define S3C2400_OPENCR S3C2410_GPIOREG(0x50)
1121
1122#define S3C2400_OPENCR_OPC_RXD1DIS (0<<0)
1123#define S3C2400_OPENCR_OPC_RXD1EN (1<<0)
1124#define S3C2400_OPENCR_OPC_TXD1DIS (0<<1)
1125#define S3C2400_OPENCR_OPC_TXD1EN (1<<1)
1126#define S3C2400_OPENCR_OPC_CMDDIS (0<<2)
1127#define S3C2400_OPENCR_OPC_CMDEN (1<<2)
1128#define S3C2400_OPENCR_OPC_DATDIS (0<<3)
1129#define S3C2400_OPENCR_OPC_DATEN (1<<3)
1130#define S3C2400_OPENCR_OPC_MISODIS (0<<4)
1131#define S3C2400_OPENCR_OPC_MISOEN (1<<4)
1132#define S3C2400_OPENCR_OPC_MOSIDIS (0<<5)
1133#define S3C2400_OPENCR_OPC_MOSIEN (1<<5)
1134
1135/* 2412/2413 sleep configuration registers */
1136
1137#define S3C2412_GPBSLPCON S3C2410_GPIOREG(0x1C)
1138#define S3C2412_GPCSLPCON S3C2410_GPIOREG(0x2C)
1139#define S3C2412_GPDSLPCON S3C2410_GPIOREG(0x3C)
1140#define S3C2412_GPFSLPCON S3C2410_GPIOREG(0x5C)
1141#define S3C2412_GPGSLPCON S3C2410_GPIOREG(0x6C)
1142#define S3C2412_GPHSLPCON S3C2410_GPIOREG(0x7C)
1143
1144/* definitions for each pin bit */
1145#define S3C2412_GPIO_SLPCON_LOW ( 0x00 )
1146#define S3C2412_GPIO_SLPCON_HIGH ( 0x01 )
1147#define S3C2412_GPIO_SLPCON_IN ( 0x02 )
1148#define S3C2412_GPIO_SLPCON_PULL ( 0x03 )
1149
1150#define S3C2412_SLPCON_LOW(x) ( 0x00 << ((x) * 2))
1151#define S3C2412_SLPCON_HIGH(x) ( 0x01 << ((x) * 2))
1152#define S3C2412_SLPCON_IN(x) ( 0x02 << ((x) * 2))
1153#define S3C2412_SLPCON_PULL(x) ( 0x03 << ((x) * 2))
1154#define S3C2412_SLPCON_EINT(x) ( 0x02 << ((x) * 2)) /* only IRQ pins */
1155#define S3C2412_SLPCON_MASK(x) ( 0x03 << ((x) * 2))
1156
1157#define S3C2412_SLPCON_ALL_LOW (0x0)
1158#define S3C2412_SLPCON_ALL_HIGH (0x11111111 | 0x44444444)
1159#define S3C2412_SLPCON_ALL_IN (0x22222222 | 0x88888888)
1160#define S3C2412_SLPCON_ALL_PULL (0x33333333)
1161
1162#endif /* __ASM_ARCH_REGS_GPIO_H */
1163
diff --git a/arch/arm/mach-s3c2410/include/mach/regs-gpioj.h b/arch/arm/mach-s3c2410/include/mach/regs-gpioj.h
new file mode 100644
index 000000000000..1202ca5e99f6
--- /dev/null
+++ b/arch/arm/mach-s3c2410/include/mach/regs-gpioj.h
@@ -0,0 +1,106 @@
1/* arch/arm/mach-s3c2410/include/mach/regs-gpioj.h
2 *
3 * Copyright (c) 2004 Simtec Electronics <linux@simtec.co.uk>
4 * http://www.simtec.co.uk/products/SWLINUX/
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * S3C2440 GPIO J register definitions
11*/
12
13
14#ifndef __ASM_ARCH_REGS_GPIOJ_H
15#define __ASM_ARCH_REGS_GPIOJ_H "gpioj"
16
17/* Port J consists of 13 GPIO/Camera pins
18 *
19 * GPJCON has 2 bits for each of the input pins on port F
20 * 00 = 0 input, 1 output, 2 Camera
21 *
22 * pull up works like all other ports.
23*/
24
25#define S3C2440_GPIO_BANKJ (416)
26
27#define S3C2440_GPJCON S3C2410_GPIOREG(0xd0)
28#define S3C2440_GPJDAT S3C2410_GPIOREG(0xd4)
29#define S3C2440_GPJUP S3C2410_GPIOREG(0xd8)
30
31#define S3C2413_GPJCON S3C2410_GPIOREG(0x80)
32#define S3C2413_GPJDAT S3C2410_GPIOREG(0x84)
33#define S3C2413_GPJUP S3C2410_GPIOREG(0x88)
34#define S3C2413_GPJSLPCON S3C2410_GPIOREG(0x8C)
35
36#define S3C2440_GPJ0 S3C2410_GPIONO(S3C2440_GPIO_BANKJ, 0)
37#define S3C2440_GPJ0_INP (0x00 << 0)
38#define S3C2440_GPJ0_OUTP (0x01 << 0)
39#define S3C2440_GPJ0_CAMDATA0 (0x02 << 0)
40
41#define S3C2440_GPJ1 S3C2410_GPIONO(S3C2440_GPIO_BANKJ, 1)
42#define S3C2440_GPJ1_INP (0x00 << 2)
43#define S3C2440_GPJ1_OUTP (0x01 << 2)
44#define S3C2440_GPJ1_CAMDATA1 (0x02 << 2)
45
46#define S3C2440_GPJ2 S3C2410_GPIONO(S3C2440_GPIO_BANKJ, 2)
47#define S3C2440_GPJ2_INP (0x00 << 4)
48#define S3C2440_GPJ2_OUTP (0x01 << 4)
49#define S3C2440_GPJ2_CAMDATA2 (0x02 << 4)
50
51#define S3C2440_GPJ3 S3C2410_GPIONO(S3C2440_GPIO_BANKJ, 3)
52#define S3C2440_GPJ3_INP (0x00 << 6)
53#define S3C2440_GPJ3_OUTP (0x01 << 6)
54#define S3C2440_GPJ3_CAMDATA3 (0x02 << 6)
55
56#define S3C2440_GPJ4 S3C2410_GPIONO(S3C2440_GPIO_BANKJ, 4)
57#define S3C2440_GPJ4_INP (0x00 << 8)
58#define S3C2440_GPJ4_OUTP (0x01 << 8)
59#define S3C2440_GPJ4_CAMDATA4 (0x02 << 8)
60
61#define S3C2440_GPJ5 S3C2410_GPIONO(S3C2440_GPIO_BANKJ, 5)
62#define S3C2440_GPJ5_INP (0x00 << 10)
63#define S3C2440_GPJ5_OUTP (0x01 << 10)
64#define S3C2440_GPJ5_CAMDATA5 (0x02 << 10)
65
66#define S3C2440_GPJ6 S3C2410_GPIONO(S3C2440_GPIO_BANKJ, 6)
67#define S3C2440_GPJ6_INP (0x00 << 12)
68#define S3C2440_GPJ6_OUTP (0x01 << 12)
69#define S3C2440_GPJ6_CAMDATA6 (0x02 << 12)
70
71#define S3C2440_GPJ7 S3C2410_GPIONO(S3C2440_GPIO_BANKJ, 7)
72#define S3C2440_GPJ7_INP (0x00 << 14)
73#define S3C2440_GPJ7_OUTP (0x01 << 14)
74#define S3C2440_GPJ7_CAMDATA7 (0x02 << 14)
75
76#define S3C2440_GPJ8 S3C2410_GPIONO(S3C2440_GPIO_BANKJ, 8)
77#define S3C2440_GPJ8_INP (0x00 << 16)
78#define S3C2440_GPJ8_OUTP (0x01 << 16)
79#define S3C2440_GPJ8_CAMPCLK (0x02 << 16)
80
81#define S3C2440_GPJ9 S3C2410_GPIONO(S3C2440_GPIO_BANKJ, 9)
82#define S3C2440_GPJ9_INP (0x00 << 18)
83#define S3C2440_GPJ9_OUTP (0x01 << 18)
84#define S3C2440_GPJ9_CAMVSYNC (0x02 << 18)
85
86#define S3C2440_GPJ10 S3C2410_GPIONO(S3C2440_GPIO_BANKJ, 10)
87#define S3C2440_GPJ10_INP (0x00 << 20)
88#define S3C2440_GPJ10_OUTP (0x01 << 20)
89#define S3C2440_GPJ10_CAMHREF (0x02 << 20)
90
91#define S3C2440_GPJ11 S3C2410_GPIONO(S3C2440_GPIO_BANKJ, 11)
92#define S3C2440_GPJ11_INP (0x00 << 22)
93#define S3C2440_GPJ11_OUTP (0x01 << 22)
94#define S3C2440_GPJ11_CAMCLKOUT (0x02 << 22)
95
96#define S3C2440_GPJ12 S3C2410_GPIONO(S3C2440_GPIO_BANKJ, 12)
97#define S3C2440_GPJ12_INP (0x00 << 24)
98#define S3C2440_GPJ12_OUTP (0x01 << 24)
99#define S3C2440_GPJ12_CAMRESET (0x02 << 24)
100
101#define S3C2443_GPJ13 S3C2410_GPIONO(S3C2440_GPIO_BANKJ, 13)
102#define S3C2443_GPJ14 S3C2410_GPIONO(S3C2440_GPIO_BANKJ, 14)
103#define S3C2443_GPJ15 S3C2410_GPIONO(S3C2440_GPIO_BANKJ, 15)
104
105#endif /* __ASM_ARCH_REGS_GPIOJ_H */
106
diff --git a/arch/arm/mach-s3c2410/include/mach/regs-irq.h b/arch/arm/mach-s3c2410/include/mach/regs-irq.h
new file mode 100644
index 000000000000..b057c06d167a
--- /dev/null
+++ b/arch/arm/mach-s3c2410/include/mach/regs-irq.h
@@ -0,0 +1,43 @@
1/* arch/arm/mach-s3c2410/include/mach/regs-irq.h
2 *
3 * Copyright (c) 2003 Simtec Electronics <linux@simtec.co.uk>
4 * http://www.simtec.co.uk/products/SWLINUX/
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9*/
10
11
12#ifndef ___ASM_ARCH_REGS_IRQ_H
13#define ___ASM_ARCH_REGS_IRQ_H "$Id: irq.h,v 1.3 2003/03/25 21:29:06 ben Exp $"
14
15/* interrupt controller */
16
17#define S3C2410_IRQREG(x) ((x) + S3C24XX_VA_IRQ)
18#define S3C2410_EINTREG(x) ((x) + S3C24XX_VA_GPIO)
19#define S3C24XX_EINTREG(x) ((x) + S3C24XX_VA_GPIO2)
20
21#define S3C2410_SRCPND S3C2410_IRQREG(0x000)
22#define S3C2410_INTMOD S3C2410_IRQREG(0x004)
23#define S3C2410_INTMSK S3C2410_IRQREG(0x008)
24#define S3C2410_PRIORITY S3C2410_IRQREG(0x00C)
25#define S3C2410_INTPND S3C2410_IRQREG(0x010)
26#define S3C2410_INTOFFSET S3C2410_IRQREG(0x014)
27#define S3C2410_SUBSRCPND S3C2410_IRQREG(0x018)
28#define S3C2410_INTSUBMSK S3C2410_IRQREG(0x01C)
29
30/* mask: 0=enable, 1=disable
31 * 1 bit EINT, 4=EINT4, 23=EINT23
32 * EINT0,1,2,3 are not handled here.
33*/
34
35#define S3C2410_EINTMASK S3C2410_EINTREG(0x0A4)
36#define S3C2410_EINTPEND S3C2410_EINTREG(0X0A8)
37#define S3C2412_EINTMASK S3C2410_EINTREG(0x0B4)
38#define S3C2412_EINTPEND S3C2410_EINTREG(0X0B8)
39
40#define S3C24XX_EINTMASK S3C24XX_EINTREG(0x0A4)
41#define S3C24XX_EINTPEND S3C24XX_EINTREG(0X0A8)
42
43#endif /* ___ASM_ARCH_REGS_IRQ_H */
diff --git a/arch/arm/mach-s3c2410/include/mach/regs-lcd.h b/arch/arm/mach-s3c2410/include/mach/regs-lcd.h
new file mode 100644
index 000000000000..893b8742f954
--- /dev/null
+++ b/arch/arm/mach-s3c2410/include/mach/regs-lcd.h
@@ -0,0 +1,162 @@
1/* arch/arm/mach-s3c2410/include/mach/regs-lcd.h
2 *
3 * Copyright (c) 2003 Simtec Electronics <linux@simtec.co.uk>
4 * http://www.simtec.co.uk/products/SWLINUX/
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9*/
10
11
12#ifndef ___ASM_ARCH_REGS_LCD_H
13#define ___ASM_ARCH_REGS_LCD_H "$Id: lcd.h,v 1.3 2003/06/26 13:25:06 ben Exp $"
14
15#define S3C2410_LCDREG(x) (x)
16
17/* LCD control registers */
18#define S3C2410_LCDCON1 S3C2410_LCDREG(0x00)
19#define S3C2410_LCDCON2 S3C2410_LCDREG(0x04)
20#define S3C2410_LCDCON3 S3C2410_LCDREG(0x08)
21#define S3C2410_LCDCON4 S3C2410_LCDREG(0x0C)
22#define S3C2410_LCDCON5 S3C2410_LCDREG(0x10)
23
24#define S3C2410_LCDCON1_CLKVAL(x) ((x) << 8)
25#define S3C2410_LCDCON1_MMODE (1<<7)
26#define S3C2410_LCDCON1_DSCAN4 (0<<5)
27#define S3C2410_LCDCON1_STN4 (1<<5)
28#define S3C2410_LCDCON1_STN8 (2<<5)
29#define S3C2410_LCDCON1_TFT (3<<5)
30
31#define S3C2410_LCDCON1_STN1BPP (0<<1)
32#define S3C2410_LCDCON1_STN2GREY (1<<1)
33#define S3C2410_LCDCON1_STN4GREY (2<<1)
34#define S3C2410_LCDCON1_STN8BPP (3<<1)
35#define S3C2410_LCDCON1_STN12BPP (4<<1)
36
37#define S3C2410_LCDCON1_TFT1BPP (8<<1)
38#define S3C2410_LCDCON1_TFT2BPP (9<<1)
39#define S3C2410_LCDCON1_TFT4BPP (10<<1)
40#define S3C2410_LCDCON1_TFT8BPP (11<<1)
41#define S3C2410_LCDCON1_TFT16BPP (12<<1)
42#define S3C2410_LCDCON1_TFT24BPP (13<<1)
43
44#define S3C2410_LCDCON1_ENVID (1)
45
46#define S3C2410_LCDCON1_MODEMASK 0x1E
47
48#define S3C2410_LCDCON2_VBPD(x) ((x) << 24)
49#define S3C2410_LCDCON2_LINEVAL(x) ((x) << 14)
50#define S3C2410_LCDCON2_VFPD(x) ((x) << 6)
51#define S3C2410_LCDCON2_VSPW(x) ((x) << 0)
52
53#define S3C2410_LCDCON2_GET_VBPD(x) ( ((x) >> 24) & 0xFF)
54#define S3C2410_LCDCON2_GET_VFPD(x) ( ((x) >> 6) & 0xFF)
55#define S3C2410_LCDCON2_GET_VSPW(x) ( ((x) >> 0) & 0x3F)
56
57#define S3C2410_LCDCON3_HBPD(x) ((x) << 19)
58#define S3C2410_LCDCON3_WDLY(x) ((x) << 19)
59#define S3C2410_LCDCON3_HOZVAL(x) ((x) << 8)
60#define S3C2410_LCDCON3_HFPD(x) ((x) << 0)
61#define S3C2410_LCDCON3_LINEBLANK(x)((x) << 0)
62
63#define S3C2410_LCDCON3_GET_HBPD(x) ( ((x) >> 19) & 0x7F)
64#define S3C2410_LCDCON3_GET_HFPD(x) ( ((x) >> 0) & 0xFF)
65
66/* LDCCON4 changes for STN mode on the S3C2412 */
67
68#define S3C2410_LCDCON4_MVAL(x) ((x) << 8)
69#define S3C2410_LCDCON4_HSPW(x) ((x) << 0)
70#define S3C2410_LCDCON4_WLH(x) ((x) << 0)
71
72#define S3C2410_LCDCON4_GET_HSPW(x) ( ((x) >> 0) & 0xFF)
73
74#define S3C2410_LCDCON5_BPP24BL (1<<12)
75#define S3C2410_LCDCON5_FRM565 (1<<11)
76#define S3C2410_LCDCON5_INVVCLK (1<<10)
77#define S3C2410_LCDCON5_INVVLINE (1<<9)
78#define S3C2410_LCDCON5_INVVFRAME (1<<8)
79#define S3C2410_LCDCON5_INVVD (1<<7)
80#define S3C2410_LCDCON5_INVVDEN (1<<6)
81#define S3C2410_LCDCON5_INVPWREN (1<<5)
82#define S3C2410_LCDCON5_INVLEND (1<<4)
83#define S3C2410_LCDCON5_PWREN (1<<3)
84#define S3C2410_LCDCON5_ENLEND (1<<2)
85#define S3C2410_LCDCON5_BSWP (1<<1)
86#define S3C2410_LCDCON5_HWSWP (1<<0)
87
88/* framebuffer start addressed */
89#define S3C2410_LCDSADDR1 S3C2410_LCDREG(0x14)
90#define S3C2410_LCDSADDR2 S3C2410_LCDREG(0x18)
91#define S3C2410_LCDSADDR3 S3C2410_LCDREG(0x1C)
92
93#define S3C2410_LCDBANK(x) ((x) << 21)
94#define S3C2410_LCDBASEU(x) (x)
95
96#define S3C2410_OFFSIZE(x) ((x) << 11)
97#define S3C2410_PAGEWIDTH(x) (x)
98
99/* colour lookup and miscellaneous controls */
100
101#define S3C2410_REDLUT S3C2410_LCDREG(0x20)
102#define S3C2410_GREENLUT S3C2410_LCDREG(0x24)
103#define S3C2410_BLUELUT S3C2410_LCDREG(0x28)
104
105#define S3C2410_DITHMODE S3C2410_LCDREG(0x4C)
106#define S3C2410_TPAL S3C2410_LCDREG(0x50)
107
108#define S3C2410_TPAL_EN (1<<24)
109
110/* interrupt info */
111#define S3C2410_LCDINTPND S3C2410_LCDREG(0x54)
112#define S3C2410_LCDSRCPND S3C2410_LCDREG(0x58)
113#define S3C2410_LCDINTMSK S3C2410_LCDREG(0x5C)
114#define S3C2410_LCDINT_FIWSEL (1<<2)
115#define S3C2410_LCDINT_FRSYNC (1<<1)
116#define S3C2410_LCDINT_FICNT (1<<0)
117
118/* s3c2442 extra stn registers */
119
120#define S3C2442_REDLUT S3C2410_LCDREG(0x20)
121#define S3C2442_GREENLUT S3C2410_LCDREG(0x24)
122#define S3C2442_BLUELUT S3C2410_LCDREG(0x28)
123#define S3C2442_DITHMODE S3C2410_LCDREG(0x20)
124
125#define S3C2410_LPCSEL S3C2410_LCDREG(0x60)
126
127#define S3C2410_TFTPAL(x) S3C2410_LCDREG((0x400 + (x)*4))
128
129/* S3C2412 registers */
130
131#define S3C2412_TPAL S3C2410_LCDREG(0x20)
132
133#define S3C2412_LCDINTPND S3C2410_LCDREG(0x24)
134#define S3C2412_LCDSRCPND S3C2410_LCDREG(0x28)
135#define S3C2412_LCDINTMSK S3C2410_LCDREG(0x2C)
136
137#define S3C2412_TCONSEL S3C2410_LCDREG(0x30)
138
139#define S3C2412_LCDCON6 S3C2410_LCDREG(0x34)
140#define S3C2412_LCDCON7 S3C2410_LCDREG(0x38)
141#define S3C2412_LCDCON8 S3C2410_LCDREG(0x3C)
142#define S3C2412_LCDCON9 S3C2410_LCDREG(0x40)
143
144#define S3C2412_REDLUT(x) S3C2410_LCDREG(0x44 + ((x)*4))
145#define S3C2412_GREENLUT(x) S3C2410_LCDREG(0x60 + ((x)*4))
146#define S3C2412_BLUELUT(x) S3C2410_LCDREG(0x98 + ((x)*4))
147
148#define S3C2412_FRCPAT(x) S3C2410_LCDREG(0xB4 + ((x)*4))
149
150/* general registers */
151
152/* base of the LCD registers, where INTPND, INTSRC and then INTMSK
153 * are available. */
154
155#define S3C2410_LCDINTBASE S3C2410_LCDREG(0x54)
156#define S3C2412_LCDINTBASE S3C2410_LCDREG(0x24)
157
158#define S3C24XX_LCDINTPND (0x00)
159#define S3C24XX_LCDSRCPND (0x04)
160#define S3C24XX_LCDINTMSK (0x08)
161
162#endif /* ___ASM_ARCH_REGS_LCD_H */
diff --git a/arch/arm/mach-s3c2410/include/mach/regs-mem.h b/arch/arm/mach-s3c2410/include/mach/regs-mem.h
new file mode 100644
index 000000000000..f9926abd5cde
--- /dev/null
+++ b/arch/arm/mach-s3c2410/include/mach/regs-mem.h
@@ -0,0 +1,220 @@
1/* arch/arm/mach-s3c2410/include/mach/regs-mem.h
2 *
3 * Copyright (c) 2004 Simtec Electronics <linux@simtec.co.uk>
4 * http://www.simtec.co.uk/products/SWLINUX/
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * S3C2410 Memory Control register definitions
11*/
12
13#ifndef __ASM_ARM_MEMREGS_H
14#define __ASM_ARM_MEMREGS_H "$Id: regs.h,v 1.8 2003/05/01 15:55:41 ben Exp $"
15
16#ifndef S3C2410_MEMREG
17#define S3C2410_MEMREG(x) (S3C24XX_VA_MEMCTRL + (x))
18#endif
19
20/* bus width, and wait state control */
21#define S3C2410_BWSCON S3C2410_MEMREG(0x0000)
22
23/* bank zero config - note, pinstrapped from OM pins! */
24#define S3C2410_BWSCON_DW0_16 (1<<1)
25#define S3C2410_BWSCON_DW0_32 (2<<1)
26
27/* bank one configs */
28#define S3C2410_BWSCON_DW1_8 (0<<4)
29#define S3C2410_BWSCON_DW1_16 (1<<4)
30#define S3C2410_BWSCON_DW1_32 (2<<4)
31#define S3C2410_BWSCON_WS1 (1<<6)
32#define S3C2410_BWSCON_ST1 (1<<7)
33
34/* bank 2 configurations */
35#define S3C2410_BWSCON_DW2_8 (0<<8)
36#define S3C2410_BWSCON_DW2_16 (1<<8)
37#define S3C2410_BWSCON_DW2_32 (2<<8)
38#define S3C2410_BWSCON_WS2 (1<<10)
39#define S3C2410_BWSCON_ST2 (1<<11)
40
41/* bank 3 configurations */
42#define S3C2410_BWSCON_DW3_8 (0<<12)
43#define S3C2410_BWSCON_DW3_16 (1<<12)
44#define S3C2410_BWSCON_DW3_32 (2<<12)
45#define S3C2410_BWSCON_WS3 (1<<14)
46#define S3C2410_BWSCON_ST3 (1<<15)
47
48/* bank 4 configurations */
49#define S3C2410_BWSCON_DW4_8 (0<<16)
50#define S3C2410_BWSCON_DW4_16 (1<<16)
51#define S3C2410_BWSCON_DW4_32 (2<<16)
52#define S3C2410_BWSCON_WS4 (1<<18)
53#define S3C2410_BWSCON_ST4 (1<<19)
54
55/* bank 5 configurations */
56#define S3C2410_BWSCON_DW5_8 (0<<20)
57#define S3C2410_BWSCON_DW5_16 (1<<20)
58#define S3C2410_BWSCON_DW5_32 (2<<20)
59#define S3C2410_BWSCON_WS5 (1<<22)
60#define S3C2410_BWSCON_ST5 (1<<23)
61
62/* bank 6 configurations */
63#define S3C2410_BWSCON_DW6_8 (0<<24)
64#define S3C2410_BWSCON_DW6_16 (1<<24)
65#define S3C2410_BWSCON_DW6_32 (2<<24)
66#define S3C2410_BWSCON_WS6 (1<<26)
67#define S3C2410_BWSCON_ST6 (1<<27)
68
69/* bank 7 configurations */
70#define S3C2410_BWSCON_DW7_8 (0<<28)
71#define S3C2410_BWSCON_DW7_16 (1<<28)
72#define S3C2410_BWSCON_DW7_32 (2<<28)
73#define S3C2410_BWSCON_WS7 (1<<30)
74#define S3C2410_BWSCON_ST7 (1<<31)
75
76/* memory set (rom, ram) */
77#define S3C2410_BANKCON0 S3C2410_MEMREG(0x0004)
78#define S3C2410_BANKCON1 S3C2410_MEMREG(0x0008)
79#define S3C2410_BANKCON2 S3C2410_MEMREG(0x000C)
80#define S3C2410_BANKCON3 S3C2410_MEMREG(0x0010)
81#define S3C2410_BANKCON4 S3C2410_MEMREG(0x0014)
82#define S3C2410_BANKCON5 S3C2410_MEMREG(0x0018)
83#define S3C2410_BANKCON6 S3C2410_MEMREG(0x001C)
84#define S3C2410_BANKCON7 S3C2410_MEMREG(0x0020)
85
86/* bank configuration registers */
87
88#define S3C2410_BANKCON_PMCnorm (0x00)
89#define S3C2410_BANKCON_PMC4 (0x01)
90#define S3C2410_BANKCON_PMC8 (0x02)
91#define S3C2410_BANKCON_PMC16 (0x03)
92
93/* bank configurations for banks 0..7, note banks
94 * 6 and 7 have differnt configurations depending on
95 * the memory type bits */
96
97#define S3C2410_BANKCON_Tacp2 (0x0 << 2)
98#define S3C2410_BANKCON_Tacp3 (0x1 << 2)
99#define S3C2410_BANKCON_Tacp4 (0x2 << 2)
100#define S3C2410_BANKCON_Tacp6 (0x3 << 2)
101#define S3C2410_BANKCON_Tacp_SHIFT (2)
102
103#define S3C2410_BANKCON_Tcah0 (0x0 << 4)
104#define S3C2410_BANKCON_Tcah1 (0x1 << 4)
105#define S3C2410_BANKCON_Tcah2 (0x2 << 4)
106#define S3C2410_BANKCON_Tcah4 (0x3 << 4)
107#define S3C2410_BANKCON_Tcah_SHIFT (4)
108
109#define S3C2410_BANKCON_Tcoh0 (0x0 << 6)
110#define S3C2410_BANKCON_Tcoh1 (0x1 << 6)
111#define S3C2410_BANKCON_Tcoh2 (0x2 << 6)
112#define S3C2410_BANKCON_Tcoh4 (0x3 << 6)
113#define S3C2410_BANKCON_Tcoh_SHIFT (6)
114
115#define S3C2410_BANKCON_Tacc1 (0x0 << 8)
116#define S3C2410_BANKCON_Tacc2 (0x1 << 8)
117#define S3C2410_BANKCON_Tacc3 (0x2 << 8)
118#define S3C2410_BANKCON_Tacc4 (0x3 << 8)
119#define S3C2410_BANKCON_Tacc6 (0x4 << 8)
120#define S3C2410_BANKCON_Tacc8 (0x5 << 8)
121#define S3C2410_BANKCON_Tacc10 (0x6 << 8)
122#define S3C2410_BANKCON_Tacc14 (0x7 << 8)
123#define S3C2410_BANKCON_Tacc_SHIFT (8)
124
125#define S3C2410_BANKCON_Tcos0 (0x0 << 11)
126#define S3C2410_BANKCON_Tcos1 (0x1 << 11)
127#define S3C2410_BANKCON_Tcos2 (0x2 << 11)
128#define S3C2410_BANKCON_Tcos4 (0x3 << 11)
129#define S3C2410_BANKCON_Tcos_SHIFT (11)
130
131#define S3C2410_BANKCON_Tacs0 (0x0 << 13)
132#define S3C2410_BANKCON_Tacs1 (0x1 << 13)
133#define S3C2410_BANKCON_Tacs2 (0x2 << 13)
134#define S3C2410_BANKCON_Tacs4 (0x3 << 13)
135#define S3C2410_BANKCON_Tacs_SHIFT (13)
136
137#define S3C2410_BANKCON_SRAM (0x0 << 15)
138#define S3C2400_BANKCON_EDODRAM (0x2 << 15)
139#define S3C2410_BANKCON_SDRAM (0x3 << 15)
140
141/* next bits only for EDO DRAM in 6,7 */
142#define S3C2400_BANKCON_EDO_Trcd1 (0x00 << 4)
143#define S3C2400_BANKCON_EDO_Trcd2 (0x01 << 4)
144#define S3C2400_BANKCON_EDO_Trcd3 (0x02 << 4)
145#define S3C2400_BANKCON_EDO_Trcd4 (0x03 << 4)
146
147/* CAS pulse width */
148#define S3C2400_BANKCON_EDO_PULSE1 (0x00 << 3)
149#define S3C2400_BANKCON_EDO_PULSE2 (0x01 << 3)
150
151/* CAS pre-charge */
152#define S3C2400_BANKCON_EDO_TCP1 (0x00 << 2)
153#define S3C2400_BANKCON_EDO_TCP2 (0x01 << 2)
154
155/* control column address select */
156#define S3C2400_BANKCON_EDO_SCANb8 (0x00 << 0)
157#define S3C2400_BANKCON_EDO_SCANb9 (0x01 << 0)
158#define S3C2400_BANKCON_EDO_SCANb10 (0x02 << 0)
159#define S3C2400_BANKCON_EDO_SCANb11 (0x03 << 0)
160
161/* next bits only for SDRAM in 6,7 */
162#define S3C2410_BANKCON_Trcd2 (0x00 << 2)
163#define S3C2410_BANKCON_Trcd3 (0x01 << 2)
164#define S3C2410_BANKCON_Trcd4 (0x02 << 2)
165
166/* control column address select */
167#define S3C2410_BANKCON_SCANb8 (0x00 << 0)
168#define S3C2410_BANKCON_SCANb9 (0x01 << 0)
169#define S3C2410_BANKCON_SCANb10 (0x02 << 0)
170
171#define S3C2410_REFRESH S3C2410_MEMREG(0x0024)
172#define S3C2410_BANKSIZE S3C2410_MEMREG(0x0028)
173#define S3C2410_MRSRB6 S3C2410_MEMREG(0x002C)
174#define S3C2410_MRSRB7 S3C2410_MEMREG(0x0030)
175
176/* refresh control */
177
178#define S3C2410_REFRESH_REFEN (1<<23)
179#define S3C2410_REFRESH_SELF (1<<22)
180#define S3C2410_REFRESH_REFCOUNTER ((1<<11)-1)
181
182#define S3C2410_REFRESH_TRP_MASK (3<<20)
183#define S3C2410_REFRESH_TRP_2clk (0<<20)
184#define S3C2410_REFRESH_TRP_3clk (1<<20)
185#define S3C2410_REFRESH_TRP_4clk (2<<20)
186
187#define S3C2400_REFRESH_DRAM_TRP_MASK (3<<20)
188#define S3C2400_REFRESH_DRAM_TRP_1_5clk (0<<20)
189#define S3C2400_REFRESH_DRAM_TRP_2_5clk (1<<20)
190#define S3C2400_REFRESH_DRAM_TRP_3_5clk (2<<20)
191#define S3C2400_REFRESH_DRAM_TRP_4_5clk (3<<20)
192
193#define S3C2410_REFRESH_TSRC_MASK (3<<18)
194#define S3C2410_REFRESH_TSRC_4clk (0<<18)
195#define S3C2410_REFRESH_TSRC_5clk (1<<18)
196#define S3C2410_REFRESH_TSRC_6clk (2<<18)
197#define S3C2410_REFRESH_TSRC_7clk (3<<18)
198
199
200/* mode select register(s) */
201
202#define S3C2410_MRSRB_CL1 (0x00 << 4)
203#define S3C2410_MRSRB_CL2 (0x02 << 4)
204#define S3C2410_MRSRB_CL3 (0x03 << 4)
205
206/* bank size register */
207#define S3C2410_BANKSIZE_128M (0x2 << 0)
208#define S3C2410_BANKSIZE_64M (0x1 << 0)
209#define S3C2410_BANKSIZE_32M (0x0 << 0)
210#define S3C2410_BANKSIZE_16M (0x7 << 0)
211#define S3C2410_BANKSIZE_8M (0x6 << 0)
212#define S3C2410_BANKSIZE_4M (0x5 << 0)
213#define S3C2410_BANKSIZE_2M (0x4 << 0)
214#define S3C2410_BANKSIZE_MASK (0x7 << 0)
215#define S3C2400_BANKSIZE_MASK (0x4 << 0)
216#define S3C2410_BANKSIZE_SCLK_EN (1<<4)
217#define S3C2410_BANKSIZE_SCKE_EN (1<<5)
218#define S3C2410_BANKSIZE_BURST (1<<7)
219
220#endif /* __ASM_ARM_MEMREGS_H */
diff --git a/arch/arm/mach-s3c2410/include/mach/regs-power.h b/arch/arm/mach-s3c2410/include/mach/regs-power.h
new file mode 100644
index 000000000000..2d36353f57d7
--- /dev/null
+++ b/arch/arm/mach-s3c2410/include/mach/regs-power.h
@@ -0,0 +1,40 @@
1/* arch/arm/mach-s3c2410/include/mach/regs-power.h
2 *
3 * Copyright (c) 2003,2004,2005,2006 Simtec Electronics <linux@simtec.co.uk>
4 * http://armlinux.simtec.co.uk/
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * S3C24XX power control register definitions
11*/
12
13#ifndef __ASM_ARM_REGS_PWR
14#define __ASM_ARM_REGS_PWR __FILE__
15
16#define S3C24XX_PWRREG(x) ((x) + S3C24XX_VA_CLKPWR)
17
18#define S3C2412_PWRMODECON S3C24XX_PWRREG(0x20)
19#define S3C2412_PWRCFG S3C24XX_PWRREG(0x24)
20
21#define S3C2412_INFORM0 S3C24XX_PWRREG(0x70)
22#define S3C2412_INFORM1 S3C24XX_PWRREG(0x74)
23#define S3C2412_INFORM2 S3C24XX_PWRREG(0x78)
24#define S3C2412_INFORM3 S3C24XX_PWRREG(0x7C)
25
26#define S3C2412_PWRCFG_BATF_IRQ (1<<0)
27#define S3C2412_PWRCFG_BATF_IGNORE (2<<0)
28#define S3C2412_PWRCFG_BATF_SLEEP (3<<0)
29#define S3C2412_PWRCFG_BATF_MASK (3<<0)
30
31#define S3C2412_PWRCFG_STANDBYWFI_IGNORE (0<<6)
32#define S3C2412_PWRCFG_STANDBYWFI_IDLE (1<<6)
33#define S3C2412_PWRCFG_STANDBYWFI_STOP (2<<6)
34#define S3C2412_PWRCFG_STANDBYWFI_SLEEP (3<<6)
35#define S3C2412_PWRCFG_STANDBYWFI_MASK (3<<6)
36
37#define S3C2412_PWRCFG_RTC_MASKIRQ (1<<8)
38#define S3C2412_PWRCFG_NAND_NORST (1<<9)
39
40#endif /* __ASM_ARM_REGS_PWR */
diff --git a/arch/arm/mach-s3c2410/include/mach/regs-s3c2412-mem.h b/arch/arm/mach-s3c2410/include/mach/regs-s3c2412-mem.h
new file mode 100644
index 000000000000..a4bf27123170
--- /dev/null
+++ b/arch/arm/mach-s3c2410/include/mach/regs-s3c2412-mem.h
@@ -0,0 +1,29 @@
1/* arch/arm/mach-s3c2410/include/mach/regs-s3c2412-mem.h
2 *
3 * Copyright (c) 2008 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 * http://armlinux.simtec.co.uk/
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 *
11 * S3C2412 memory register definitions
12*/
13
14#ifndef __ASM_ARM_REGS_S3C2412_MEM
15#define __ASM_ARM_REGS_S3C2412_MEM
16
17#ifndef S3C2412_MEMREG
18#define S3C2412_MEMREG(x) (S3C24XX_VA_MEMCTRL + (x))
19#endif
20
21#define S3C2412_BANKCFG S3C2412_MEMREG(0x00)
22#define S3C2412_BANKCON1 S3C2412_MEMREG(0x04)
23#define S3C2412_BANKCON2 S3C2412_MEMREG(0x08)
24#define S3C2412_BANKCON3 S3C2412_MEMREG(0x0C)
25
26#define S3C2412_REFRESH S3C2412_MEMREG(0x10)
27#define S3C2412_TIMEOUT S3C2412_MEMREG(0x14)
28
29#endif /* __ASM_ARM_REGS_S3C2412_MEM */
diff --git a/arch/arm/mach-s3c2410/include/mach/regs-s3c2412.h b/arch/arm/mach-s3c2410/include/mach/regs-s3c2412.h
new file mode 100644
index 000000000000..aa69dc79bc38
--- /dev/null
+++ b/arch/arm/mach-s3c2410/include/mach/regs-s3c2412.h
@@ -0,0 +1,23 @@
1/* arch/arm/mach-s3c2410/include/mach/regs-s3c2412.h
2 *
3 * Copyright 2007 Simtec Electronics
4 * http://armlinux.simtec.co.uk/
5 * Ben Dooks <ben@simtec.co.uk>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 *
11 * S3C2412 specific register definitions
12*/
13
14#ifndef __ASM_ARCH_REGS_S3C2412_H
15#define __ASM_ARCH_REGS_S3C2412_H "s3c2412"
16
17#define S3C2412_SWRST (S3C24XX_VA_CLKPWR + 0x30)
18#define S3C2412_SWRST_RESET (0x533C2412)
19
20/* see regs-power.h for the other registers in the power block. */
21
22#endif /* __ASM_ARCH_REGS_S3C2412_H */
23
diff --git a/arch/arm/mach-s3c2410/include/mach/regs-s3c2443-clock.h b/arch/arm/mach-s3c2410/include/mach/regs-s3c2443-clock.h
new file mode 100644
index 000000000000..7dd458363a51
--- /dev/null
+++ b/arch/arm/mach-s3c2410/include/mach/regs-s3c2443-clock.h
@@ -0,0 +1,195 @@
1/* arch/arm/mach-s3c2410/include/mach/regs-s3c2443-clock.h
2 *
3 * Copyright (c) 2007 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 * http://armlinux.simtec.co.uk/
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 *
11 * S3C2443 clock register definitions
12*/
13
14#ifndef __ASM_ARM_REGS_S3C2443_CLOCK
15#define __ASM_ARM_REGS_S3C2443_CLOCK
16
17#define S3C2443_CLKREG(x) ((x) + S3C24XX_VA_CLKPWR)
18
19#define S3C2443_PLLCON_MDIVSHIFT 16
20#define S3C2443_PLLCON_PDIVSHIFT 8
21#define S3C2443_PLLCON_SDIVSHIFT 0
22#define S3C2443_PLLCON_MDIVMASK ((1<<(1+(23-16)))-1)
23#define S3C2443_PLLCON_PDIVMASK ((1<<(1+(9-8)))-1)
24#define S3C2443_PLLCON_SDIVMASK (3)
25
26#define S3C2443_MPLLCON S3C2443_CLKREG(0x10)
27#define S3C2443_EPLLCON S3C2443_CLKREG(0x18)
28#define S3C2443_CLKSRC S3C2443_CLKREG(0x20)
29#define S3C2443_CLKDIV0 S3C2443_CLKREG(0x24)
30#define S3C2443_CLKDIV1 S3C2443_CLKREG(0x28)
31#define S3C2443_HCLKCON S3C2443_CLKREG(0x30)
32#define S3C2443_PCLKCON S3C2443_CLKREG(0x34)
33#define S3C2443_SCLKCON S3C2443_CLKREG(0x38)
34#define S3C2443_PWRMODE S3C2443_CLKREG(0x40)
35#define S3C2443_SWRST S3C2443_CLKREG(0x44)
36#define S3C2443_BUSPRI0 S3C2443_CLKREG(0x50)
37#define S3C2443_SYSID S3C2443_CLKREG(0x5C)
38#define S3C2443_PWRCFG S3C2443_CLKREG(0x60)
39#define S3C2443_RSTCON S3C2443_CLKREG(0x64)
40
41#define S3C2443_SWRST_RESET (0x533c2443)
42
43#define S3C2443_PLLCON_OFF (1<<24)
44
45#define S3C2443_CLKSRC_I2S_EXT (1<<14)
46#define S3C2443_CLKSRC_I2S_EPLLDIV (0<<14)
47#define S3C2443_CLKSRC_I2S_EPLLREF (2<<14)
48#define S3C2443_CLKSRC_I2S_EPLLREF3 (3<<14)
49#define S3C2443_CLKSRC_I2S_MASK (3<<14)
50
51#define S3C2443_CLKSRC_EPLLREF_XTAL (2<<8)
52#define S3C2443_CLKSRC_EPLLREF_EXTCLK (3<<8)
53#define S3C2443_CLKSRC_EPLLREF_MPLLREF (0<<8)
54#define S3C2443_CLKSRC_EPLLREF_MPLLREF2 (1<<8)
55#define S3C2443_CLKSRC_EPLLREF_MASK (3<<8)
56
57#define S3C2443_CLKSRC_ESYSCLK_EPLL (1<<6)
58#define S3C2443_CLKSRC_MSYSCLK_MPLL (1<<4)
59#define S3C2443_CLKSRC_EXTCLK_DIV (1<<3)
60
61#define S3C2443_CLKDIV0_DVS (1<<13)
62#define S3C2443_CLKDIV0_HALF_HCLK (1<<3)
63#define S3C2443_CLKDIV0_HALF_PCLK (1<<2)
64
65#define S3C2443_CLKDIV0_HCLKDIV_MASK (3<<0)
66
67#define S3C2443_CLKDIV0_EXTDIV_MASK (3<<6)
68#define S3C2443_CLKDIV0_EXTDIV_SHIFT (6)
69
70#define S3C2443_CLKDIV0_PREDIV_MASK (3<<4)
71#define S3C2443_CLKDIV0_PREDIV_SHIFT (4)
72
73#define S3C2443_CLKDIV0_ARMDIV_MASK (15<<9)
74#define S3C2443_CLKDIV0_ARMDIV_SHIFT (9)
75#define S3C2443_CLKDIV0_ARMDIV_1 (0<<9)
76#define S3C2443_CLKDIV0_ARMDIV_2 (8<<9)
77#define S3C2443_CLKDIV0_ARMDIV_3 (2<<9)
78#define S3C2443_CLKDIV0_ARMDIV_4 (9<<9)
79#define S3C2443_CLKDIV0_ARMDIV_6 (10<<9)
80#define S3C2443_CLKDIV0_ARMDIV_8 (11<<9)
81#define S3C2443_CLKDIV0_ARMDIV_12 (13<<9)
82#define S3C2443_CLKDIV0_ARMDIV_16 (15<<9)
83
84/* S3C2443_CLKDIV1 */
85
86#define S3C2443_CLKDIV1_CAMDIV_MASK (15<<26)
87#define S3C2443_CLKDIV1_CAMDIV_SHIFT (26)
88
89#define S3C2443_CLKDIV1_HSSPIDIV_MASK (3<<24)
90#define S3C2443_CLKDIV1_HSSPIDIV_SHIFT (24)
91
92#define S3C2443_CLKDIV1_DISPDIV_MASK (0xff<<16)
93#define S3C2443_CLKDIV1_DISPDIV_SHIFT (16)
94
95#define S3C2443_CLKDIV1_I2SDIV_MASK (15<<12)
96#define S3C2443_CLKDIV1_I2SDIV_SHIFT (12)
97
98#define S3C2443_CLKDIV1_UARTDIV_MASK (15<<8)
99#define S3C2443_CLKDIV1_UARTDIV_SHIFT (8)
100
101#define S3C2443_CLKDIV1_HSMMCDIV_MASK (3<<6)
102#define S3C2443_CLKDIV1_HSMMCDIV_SHIFT (6)
103
104#define S3C2443_CLKDIV1_USBHOSTDIV_MASK (3<<4)
105#define S3C2443_CLKDIV1_USBHOSTDIV_SHIFT (4)
106
107#define S3C2443_CLKCON_NAND
108
109#define S3C2443_HCLKCON_DMA0 (1<<0)
110#define S3C2443_HCLKCON_DMA1 (1<<1)
111#define S3C2443_HCLKCON_DMA2 (1<<2)
112#define S3C2443_HCLKCON_DMA3 (1<<3)
113#define S3C2443_HCLKCON_DMA4 (1<<4)
114#define S3C2443_HCLKCON_DMA5 (1<<5)
115#define S3C2443_HCLKCON_CAMIF (1<<8)
116#define S3C2443_HCLKCON_DISP (1<<9)
117#define S3C2443_HCLKCON_LCDC (1<<10)
118#define S3C2443_HCLKCON_USBH (1<<11)
119#define S3C2443_HCLKCON_USBD (1<<12)
120#define S3C2443_HCLKCON_HSMMC (1<<16)
121#define S3C2443_HCLKCON_CFC (1<<17)
122#define S3C2443_HCLKCON_SSMC (1<<18)
123#define S3C2443_HCLKCON_DRAMC (1<<19)
124
125#define S3C2443_PCLKCON_UART0 (1<<0)
126#define S3C2443_PCLKCON_UART1 (1<<1)
127#define S3C2443_PCLKCON_UART2 (1<<2)
128#define S3C2443_PCLKCON_UART3 (1<<3)
129#define S3C2443_PCLKCON_IIC (1<<4)
130#define S3C2443_PCLKCON_SDI (1<<5)
131#define S3C2443_PCLKCON_ADC (1<<7)
132#define S3C2443_PCLKCON_AC97 (1<<8)
133#define S3C2443_PCLKCON_IIS (1<<9)
134#define S3C2443_PCLKCON_PWMT (1<<10)
135#define S3C2443_PCLKCON_WDT (1<<11)
136#define S3C2443_PCLKCON_RTC (1<<12)
137#define S3C2443_PCLKCON_GPIO (1<<13)
138#define S3C2443_PCLKCON_SPI0 (1<<14)
139#define S3C2443_PCLKCON_SPI1 (1<<15)
140
141#define S3C2443_SCLKCON_DDRCLK (1<<16)
142#define S3C2443_SCLKCON_SSMCCLK (1<<15)
143#define S3C2443_SCLKCON_HSSPICLK (1<<14)
144#define S3C2443_SCLKCON_HSMMCCLK_EXT (1<<13)
145#define S3C2443_SCLKCON_HSMMCCLK_EPLL (1<<12)
146#define S3C2443_SCLKCON_CAMCLK (1<<11)
147#define S3C2443_SCLKCON_DISPCLK (1<<10)
148#define S3C2443_SCLKCON_I2SCLK (1<<9)
149#define S3C2443_SCLKCON_UARTCLK (1<<8)
150#define S3C2443_SCLKCON_USBHOST (1<<1)
151
152#include <asm/div64.h>
153
154static inline unsigned int
155s3c2443_get_mpll(unsigned int pllval, unsigned int baseclk)
156{
157 unsigned int mdiv, pdiv, sdiv;
158 uint64_t fvco;
159
160 mdiv = pllval >> S3C2443_PLLCON_MDIVSHIFT;
161 pdiv = pllval >> S3C2443_PLLCON_PDIVSHIFT;
162 sdiv = pllval >> S3C2443_PLLCON_SDIVSHIFT;
163
164 mdiv &= S3C2443_PLLCON_MDIVMASK;
165 pdiv &= S3C2443_PLLCON_PDIVMASK;
166 sdiv &= S3C2443_PLLCON_SDIVMASK;
167
168 fvco = (uint64_t)baseclk * (2 * (mdiv + 8));
169 do_div(fvco, pdiv << sdiv);
170
171 return (unsigned int)fvco;
172}
173
174static inline unsigned int
175s3c2443_get_epll(unsigned int pllval, unsigned int baseclk)
176{
177 unsigned int mdiv, pdiv, sdiv;
178 uint64_t fvco;
179
180 mdiv = pllval >> S3C2443_PLLCON_MDIVSHIFT;
181 pdiv = pllval >> S3C2443_PLLCON_PDIVSHIFT;
182 sdiv = pllval >> S3C2443_PLLCON_SDIVSHIFT;
183
184 mdiv &= S3C2443_PLLCON_MDIVMASK;
185 pdiv &= S3C2443_PLLCON_PDIVMASK;
186 sdiv &= S3C2443_PLLCON_SDIVMASK;
187
188 fvco = (uint64_t)baseclk * (mdiv + 8);
189 do_div(fvco, (pdiv + 2) << sdiv);
190
191 return (unsigned int)fvco;
192}
193
194#endif /* __ASM_ARM_REGS_S3C2443_CLOCK */
195
diff --git a/arch/arm/mach-s3c2410/include/mach/regs-sdi.h b/arch/arm/mach-s3c2410/include/mach/regs-sdi.h
new file mode 100644
index 000000000000..cbf2d8884e30
--- /dev/null
+++ b/arch/arm/mach-s3c2410/include/mach/regs-sdi.h
@@ -0,0 +1,127 @@
1/* arch/arm/mach-s3c2410/include/mach/regs-sdi.h
2 *
3 * Copyright (c) 2004 Simtec Electronics <linux@simtec.co.uk>
4 * http://www.simtec.co.uk/products/SWLINUX/
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * S3C2410 MMC/SDIO register definitions
11*/
12
13#ifndef __ASM_ARM_REGS_SDI
14#define __ASM_ARM_REGS_SDI "regs-sdi.h"
15
16#define S3C2410_SDICON (0x00)
17#define S3C2410_SDIPRE (0x04)
18#define S3C2410_SDICMDARG (0x08)
19#define S3C2410_SDICMDCON (0x0C)
20#define S3C2410_SDICMDSTAT (0x10)
21#define S3C2410_SDIRSP0 (0x14)
22#define S3C2410_SDIRSP1 (0x18)
23#define S3C2410_SDIRSP2 (0x1C)
24#define S3C2410_SDIRSP3 (0x20)
25#define S3C2410_SDITIMER (0x24)
26#define S3C2410_SDIBSIZE (0x28)
27#define S3C2410_SDIDCON (0x2C)
28#define S3C2410_SDIDCNT (0x30)
29#define S3C2410_SDIDSTA (0x34)
30#define S3C2410_SDIFSTA (0x38)
31
32#define S3C2410_SDIDATA (0x3C)
33#define S3C2410_SDIIMSK (0x40)
34
35#define S3C2440_SDIDATA (0x40)
36#define S3C2440_SDIIMSK (0x3C)
37
38#define S3C2440_SDICON_SDRESET (1<<8)
39#define S3C2440_SDICON_MMCCLOCK (1<<5)
40#define S3C2410_SDICON_BYTEORDER (1<<4)
41#define S3C2410_SDICON_SDIOIRQ (1<<3)
42#define S3C2410_SDICON_RWAITEN (1<<2)
43#define S3C2410_SDICON_FIFORESET (1<<1)
44#define S3C2410_SDICON_CLOCKTYPE (1<<0)
45
46#define S3C2410_SDICMDCON_ABORT (1<<12)
47#define S3C2410_SDICMDCON_WITHDATA (1<<11)
48#define S3C2410_SDICMDCON_LONGRSP (1<<10)
49#define S3C2410_SDICMDCON_WAITRSP (1<<9)
50#define S3C2410_SDICMDCON_CMDSTART (1<<8)
51#define S3C2410_SDICMDCON_SENDERHOST (1<<6)
52#define S3C2410_SDICMDCON_INDEX (0x3f)
53
54#define S3C2410_SDICMDSTAT_CRCFAIL (1<<12)
55#define S3C2410_SDICMDSTAT_CMDSENT (1<<11)
56#define S3C2410_SDICMDSTAT_CMDTIMEOUT (1<<10)
57#define S3C2410_SDICMDSTAT_RSPFIN (1<<9)
58#define S3C2410_SDICMDSTAT_XFERING (1<<8)
59#define S3C2410_SDICMDSTAT_INDEX (0xff)
60
61#define S3C2440_SDIDCON_DS_BYTE (0<<22)
62#define S3C2440_SDIDCON_DS_HALFWORD (1<<22)
63#define S3C2440_SDIDCON_DS_WORD (2<<22)
64#define S3C2410_SDIDCON_IRQPERIOD (1<<21)
65#define S3C2410_SDIDCON_TXAFTERRESP (1<<20)
66#define S3C2410_SDIDCON_RXAFTERCMD (1<<19)
67#define S3C2410_SDIDCON_BUSYAFTERCMD (1<<18)
68#define S3C2410_SDIDCON_BLOCKMODE (1<<17)
69#define S3C2410_SDIDCON_WIDEBUS (1<<16)
70#define S3C2410_SDIDCON_DMAEN (1<<15)
71#define S3C2410_SDIDCON_STOP (1<<14)
72#define S3C2440_SDIDCON_DATSTART (1<<14)
73#define S3C2410_SDIDCON_DATMODE (3<<12)
74#define S3C2410_SDIDCON_BLKNUM (0x7ff)
75
76/* constants for S3C2410_SDIDCON_DATMODE */
77#define S3C2410_SDIDCON_XFER_READY (0<<12)
78#define S3C2410_SDIDCON_XFER_CHKSTART (1<<12)
79#define S3C2410_SDIDCON_XFER_RXSTART (2<<12)
80#define S3C2410_SDIDCON_XFER_TXSTART (3<<12)
81
82#define S3C2410_SDIDCON_BLKNUM_MASK (0xFFF)
83#define S3C2410_SDIDCNT_BLKNUM_SHIFT (12)
84
85#define S3C2410_SDIDSTA_RDYWAITREQ (1<<10)
86#define S3C2410_SDIDSTA_SDIOIRQDETECT (1<<9)
87#define S3C2410_SDIDSTA_FIFOFAIL (1<<8) /* reserved on 2440 */
88#define S3C2410_SDIDSTA_CRCFAIL (1<<7)
89#define S3C2410_SDIDSTA_RXCRCFAIL (1<<6)
90#define S3C2410_SDIDSTA_DATATIMEOUT (1<<5)
91#define S3C2410_SDIDSTA_XFERFINISH (1<<4)
92#define S3C2410_SDIDSTA_BUSYFINISH (1<<3)
93#define S3C2410_SDIDSTA_SBITERR (1<<2) /* reserved on 2410a/2440 */
94#define S3C2410_SDIDSTA_TXDATAON (1<<1)
95#define S3C2410_SDIDSTA_RXDATAON (1<<0)
96
97#define S3C2440_SDIFSTA_FIFORESET (1<<16)
98#define S3C2440_SDIFSTA_FIFOFAIL (3<<14) /* 3 is correct (2 bits) */
99#define S3C2410_SDIFSTA_TFDET (1<<13)
100#define S3C2410_SDIFSTA_RFDET (1<<12)
101#define S3C2410_SDIFSTA_TFHALF (1<<11)
102#define S3C2410_SDIFSTA_TFEMPTY (1<<10)
103#define S3C2410_SDIFSTA_RFLAST (1<<9)
104#define S3C2410_SDIFSTA_RFFULL (1<<8)
105#define S3C2410_SDIFSTA_RFHALF (1<<7)
106#define S3C2410_SDIFSTA_COUNTMASK (0x7f)
107
108#define S3C2410_SDIIMSK_RESPONSECRC (1<<17)
109#define S3C2410_SDIIMSK_CMDSENT (1<<16)
110#define S3C2410_SDIIMSK_CMDTIMEOUT (1<<15)
111#define S3C2410_SDIIMSK_RESPONSEND (1<<14)
112#define S3C2410_SDIIMSK_READWAIT (1<<13)
113#define S3C2410_SDIIMSK_SDIOIRQ (1<<12)
114#define S3C2410_SDIIMSK_FIFOFAIL (1<<11)
115#define S3C2410_SDIIMSK_CRCSTATUS (1<<10)
116#define S3C2410_SDIIMSK_DATACRC (1<<9)
117#define S3C2410_SDIIMSK_DATATIMEOUT (1<<8)
118#define S3C2410_SDIIMSK_DATAFINISH (1<<7)
119#define S3C2410_SDIIMSK_BUSYFINISH (1<<6)
120#define S3C2410_SDIIMSK_SBITERR (1<<5) /* reserved 2440/2410a */
121#define S3C2410_SDIIMSK_TXFIFOHALF (1<<4)
122#define S3C2410_SDIIMSK_TXFIFOEMPTY (1<<3)
123#define S3C2410_SDIIMSK_RXFIFOLAST (1<<2)
124#define S3C2410_SDIIMSK_RXFIFOFULL (1<<1)
125#define S3C2410_SDIIMSK_RXFIFOHALF (1<<0)
126
127#endif /* __ASM_ARM_REGS_SDI */
diff --git a/arch/arm/mach-s3c2410/include/mach/reset.h b/arch/arm/mach-s3c2410/include/mach/reset.h
new file mode 100644
index 000000000000..f8c9387b049d
--- /dev/null
+++ b/arch/arm/mach-s3c2410/include/mach/reset.h
@@ -0,0 +1,22 @@
1/* arch/arm/mach-s3c2410/include/mach/reset.h
2 *
3 * Copyright (c) 2007 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 * http://armlinux.simtec.co.uk/
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 *
11 * S3C2410 CPU reset controls
12*/
13
14#ifndef __ASM_ARCH_RESET_H
15#define __ASM_ARCH_RESET_H __FILE__
16
17/* This allows the over-ride of the default reset code
18*/
19
20extern void (*s3c24xx_reset_hook)(void);
21
22#endif /* __ASM_ARCH_RESET_H */
diff --git a/arch/arm/mach-s3c2410/include/mach/spi-gpio.h b/arch/arm/mach-s3c2410/include/mach/spi-gpio.h
new file mode 100644
index 000000000000..3fe8be9ca110
--- /dev/null
+++ b/arch/arm/mach-s3c2410/include/mach/spi-gpio.h
@@ -0,0 +1,27 @@
1/* arch/arm/mach-s3c2410/include/mach/spi-gpio.h
2 *
3 * Copyright (c) 2006 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * S3C2410 - SPI Controller platfrom_device info
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11*/
12
13#ifndef __ASM_ARCH_SPIGPIO_H
14#define __ASM_ARCH_SPIGPIO_H __FILE__
15
16struct s3c2410_spigpio_info {
17 unsigned long pin_clk;
18 unsigned long pin_mosi;
19 unsigned long pin_miso;
20
21 int bus_num;
22
23 void (*chip_select)(struct s3c2410_spigpio_info *spi, int cs);
24};
25
26
27#endif /* __ASM_ARCH_SPIGPIO_H */
diff --git a/arch/arm/mach-s3c2410/include/mach/spi.h b/arch/arm/mach-s3c2410/include/mach/spi.h
new file mode 100644
index 000000000000..921b13b4f0a0
--- /dev/null
+++ b/arch/arm/mach-s3c2410/include/mach/spi.h
@@ -0,0 +1,25 @@
1/* arch/arm/mach-s3c2410/include/mach/spi.h
2 *
3 * Copyright (c) 2006 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * S3C2410 - SPI Controller platform_device info
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11*/
12
13#ifndef __ASM_ARCH_SPI_H
14#define __ASM_ARCH_SPI_H __FILE__
15
16struct s3c2410_spi_info {
17 unsigned long pin_cs; /* simple gpio cs */
18 unsigned int num_cs; /* total chipselects */
19 int bus_num; /* bus number to use. */
20
21 void (*set_cs)(struct s3c2410_spi_info *spi, int cs, int pol);
22};
23
24
25#endif /* __ASM_ARCH_SPI_H */
diff --git a/arch/arm/mach-s3c2410/include/mach/system-reset.h b/arch/arm/mach-s3c2410/include/mach/system-reset.h
new file mode 100644
index 000000000000..ec2defebf0d5
--- /dev/null
+++ b/arch/arm/mach-s3c2410/include/mach/system-reset.h
@@ -0,0 +1,64 @@
1/* arch/arm/mach-s3c2410/include/mach/system-reset.h
2 *
3 * Copyright (c) 2008 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * S3C2410 - System define for arch_reset() function
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11*/
12
13#include <mach/hardware.h>
14#include <asm/io.h>
15
16#include <asm/plat-s3c/regs-watchdog.h>
17#include <mach/regs-clock.h>
18
19#include <linux/clk.h>
20#include <linux/err.h>
21
22extern void (*s3c24xx_reset_hook)(void);
23
24static void
25arch_reset(char mode)
26{
27 struct clk *wdtclk;
28
29 if (mode == 's') {
30 cpu_reset(0);
31 }
32
33 if (s3c24xx_reset_hook)
34 s3c24xx_reset_hook();
35
36 printk("arch_reset: attempting watchdog reset\n");
37
38 __raw_writel(0, S3C2410_WTCON); /* disable watchdog, to be safe */
39
40 wdtclk = clk_get(NULL, "watchdog");
41 if (!IS_ERR(wdtclk)) {
42 clk_enable(wdtclk);
43 } else
44 printk(KERN_WARNING "%s: warning: cannot get watchdog clock\n", __func__);
45
46 /* put initial values into count and data */
47 __raw_writel(0x80, S3C2410_WTCNT);
48 __raw_writel(0x80, S3C2410_WTDAT);
49
50 /* set the watchdog to go and reset... */
51 __raw_writel(S3C2410_WTCON_ENABLE|S3C2410_WTCON_DIV16|S3C2410_WTCON_RSTEN |
52 S3C2410_WTCON_PRESCALE(0x20), S3C2410_WTCON);
53
54 /* wait for reset to assert... */
55 mdelay(500);
56
57 printk(KERN_ERR "Watchdog reset failed to assert reset\n");
58
59 /* delay to allow the serial port to show the message */
60 mdelay(50);
61
62 /* we'll take a jump through zero as a poor second */
63 cpu_reset(0);
64}
diff --git a/arch/arm/mach-s3c2410/include/mach/system.h b/arch/arm/mach-s3c2410/include/mach/system.h
new file mode 100644
index 000000000000..e9f676bc0116
--- /dev/null
+++ b/arch/arm/mach-s3c2410/include/mach/system.h
@@ -0,0 +1,58 @@
1/* arch/arm/mach-s3c2410/include/mach/system.h
2 *
3 * Copyright (c) 2003 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * S3C2410 - System function defines and includes
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11*/
12
13#include <mach/hardware.h>
14#include <asm/io.h>
15
16#include <mach/map.h>
17#include <mach/idle.h>
18#include <mach/reset.h>
19
20#include <mach/regs-clock.h>
21
22void (*s3c24xx_idle)(void);
23void (*s3c24xx_reset_hook)(void);
24
25void s3c24xx_default_idle(void)
26{
27 unsigned long tmp;
28 int i;
29
30 /* idle the system by using the idle mode which will wait for an
31 * interrupt to happen before restarting the system.
32 */
33
34 /* Warning: going into idle state upsets jtag scanning */
35
36 __raw_writel(__raw_readl(S3C2410_CLKCON) | S3C2410_CLKCON_IDLE,
37 S3C2410_CLKCON);
38
39 /* the samsung port seems to do a loop and then unset idle.. */
40 for (i = 0; i < 50; i++) {
41 tmp += __raw_readl(S3C2410_CLKCON); /* ensure loop not optimised out */
42 }
43
44 /* this bit is not cleared on re-start... */
45
46 __raw_writel(__raw_readl(S3C2410_CLKCON) & ~S3C2410_CLKCON_IDLE,
47 S3C2410_CLKCON);
48}
49
50static void arch_idle(void)
51{
52 if (s3c24xx_idle != NULL)
53 (s3c24xx_idle)();
54 else
55 s3c24xx_default_idle();
56}
57
58#include <mach/system-reset.h>
diff --git a/arch/arm/mach-s3c2410/include/mach/timex.h b/arch/arm/mach-s3c2410/include/mach/timex.h
new file mode 100644
index 000000000000..2a425ed0a7e0
--- /dev/null
+++ b/arch/arm/mach-s3c2410/include/mach/timex.h
@@ -0,0 +1,26 @@
1/* arch/arm/mach-s3c2410/include/mach/timex.h
2 *
3 * Copyright (c) 2003-2005 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * S3C2410 - time parameters
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11*/
12
13#ifndef __ASM_ARCH_TIMEX_H
14#define __ASM_ARCH_TIMEX_H
15
16/* CLOCK_TICK_RATE needs to be evaluatable by the cpp, so making it
17 * a variable is useless. It seems as long as we make our timers an
18 * exact multiple of HZ, any value that makes a 1->1 correspondence
19 * for the time conversion functions to/from jiffies is acceptable.
20*/
21
22
23#define CLOCK_TICK_RATE 12000000
24
25
26#endif /* __ASM_ARCH_TIMEX_H */
diff --git a/arch/arm/mach-s3c2410/include/mach/uncompress.h b/arch/arm/mach-s3c2410/include/mach/uncompress.h
new file mode 100644
index 000000000000..708e47459ffc
--- /dev/null
+++ b/arch/arm/mach-s3c2410/include/mach/uncompress.h
@@ -0,0 +1,52 @@
1/* arch/arm/mach-s3c2410/include/mach/uncompress.h
2 *
3 * Copyright (c) 2003, 2007 Simtec Electronics
4 * http://armlinux.simtec.co.uk/
5 * Ben Dooks <ben@simtec.co.uk>
6 *
7 * S3C2410 - uncompress code
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12*/
13
14#ifndef __ASM_ARCH_UNCOMPRESS_H
15#define __ASM_ARCH_UNCOMPRESS_H
16
17#include <mach/regs-gpio.h>
18#include <mach/map.h>
19
20/* working in physical space... */
21#undef S3C2410_GPIOREG
22#define S3C2410_GPIOREG(x) ((S3C24XX_PA_GPIO + (x)))
23
24#include <asm/plat-s3c/uncompress.h>
25
26static inline int is_arm926(void)
27{
28 unsigned int cpuid;
29
30 asm volatile ("mrc p15, 0, %0, c1, c0, 0" : "=r" (cpuid));
31
32 return ((cpuid & 0xff0) == 0x260);
33}
34
35static void arch_detect_cpu(void)
36{
37 unsigned int cpuid;
38
39 cpuid = *((volatile unsigned int *)S3C2410_GSTATUS1);
40 cpuid &= S3C2410_GSTATUS1_IDMASK;
41
42 if (is_arm926() || cpuid == S3C2410_GSTATUS1_2440 ||
43 cpuid == S3C2410_GSTATUS1_2442) {
44 fifo_mask = S3C2440_UFSTAT_TXMASK;
45 fifo_max = 63 << S3C2440_UFSTAT_TXSHIFT;
46 } else {
47 fifo_mask = S3C2410_UFSTAT_TXMASK;
48 fifo_max = 15 << S3C2410_UFSTAT_TXSHIFT;
49 }
50}
51
52#endif /* __ASM_ARCH_UNCOMPRESS_H */
diff --git a/arch/arm/mach-s3c2410/include/mach/usb-control.h b/arch/arm/mach-s3c2410/include/mach/usb-control.h
new file mode 100644
index 000000000000..cd91d1591f31
--- /dev/null
+++ b/arch/arm/mach-s3c2410/include/mach/usb-control.h
@@ -0,0 +1,41 @@
1/* arch/arm/mach-s3c2410/include/mach/usb-control.h
2 *
3 * Copyright (c) 2004 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * S3C2410 - usb port information
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11*/
12
13#ifndef __ASM_ARCH_USBCONTROL_H
14#define __ASM_ARCH_USBCONTROL_H "arch/arm/mach-s3c2410/include/mach/usb-control.h"
15
16#define S3C_HCDFLG_USED (1)
17
18struct s3c2410_hcd_port {
19 unsigned char flags;
20 unsigned char power;
21 unsigned char oc_status;
22 unsigned char oc_changed;
23};
24
25struct s3c2410_hcd_info {
26 struct usb_hcd *hcd;
27 struct s3c2410_hcd_port port[2];
28
29 void (*power_control)(int port, int to);
30 void (*enable_oc)(struct s3c2410_hcd_info *, int on);
31 void (*report_oc)(struct s3c2410_hcd_info *, int ports);
32};
33
34static void inline s3c2410_usb_report_oc(struct s3c2410_hcd_info *info, int ports)
35{
36 if (info->report_oc != NULL) {
37 (info->report_oc)(info, ports);
38 }
39}
40
41#endif /*__ASM_ARCH_USBCONTROL_H */
diff --git a/arch/arm/mach-s3c2410/include/mach/vmalloc.h b/arch/arm/mach-s3c2410/include/mach/vmalloc.h
new file mode 100644
index 000000000000..315b0078a34d
--- /dev/null
+++ b/arch/arm/mach-s3c2410/include/mach/vmalloc.h
@@ -0,0 +1,20 @@
1/* arch/arm/mach-s3c2410/include/mach/vmalloc.h
2 *
3 * from arch/arm/mach-iop3xx/include/mach/vmalloc.h
4 *
5 * Copyright (c) 2003 Simtec Electronics <linux@simtec.co.uk>
6 * http://www.simtec.co.uk/products/SWLINUX/
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 *
12 * S3C2410 vmalloc definition
13*/
14
15#ifndef __ASM_ARCH_VMALLOC_H
16#define __ASM_ARCH_VMALLOC_H
17
18#define VMALLOC_END (0xE0000000)
19
20#endif /* __ASM_ARCH_VMALLOC_H */
diff --git a/arch/arm/mach-s3c2410/include/mach/vr1000-cpld.h b/arch/arm/mach-s3c2410/include/mach/vr1000-cpld.h
new file mode 100644
index 000000000000..e4119913d7c5
--- /dev/null
+++ b/arch/arm/mach-s3c2410/include/mach/vr1000-cpld.h
@@ -0,0 +1,18 @@
1/* arch/arm/mach-s3c2410/include/mach/vr1000-cpld.h
2 *
3 * Copyright (c) 2003 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * VR1000 - CPLD control constants
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11*/
12
13#ifndef __ASM_ARCH_VR1000CPLD_H
14#define __ASM_ARCH_VR1000CPLD_H
15
16#define VR1000_CPLD_CTRL2_RAMWEN (0x04) /* SRAM Write Enable */
17
18#endif /* __ASM_ARCH_VR1000CPLD_H */
diff --git a/arch/arm/mach-s3c2410/include/mach/vr1000-irq.h b/arch/arm/mach-s3c2410/include/mach/vr1000-irq.h
new file mode 100644
index 000000000000..f53f85b4ad8b
--- /dev/null
+++ b/arch/arm/mach-s3c2410/include/mach/vr1000-irq.h
@@ -0,0 +1,26 @@
1/* arch/arm/mach-s3c2410/include/mach/vr1000-irq.h
2 *
3 * Copyright (c) 2003,2004 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * Machine VR1000 - IRQ Number definitions
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11*/
12
13#ifndef __ASM_ARCH_VR1000IRQ_H
14#define __ASM_ARCH_VR1000IRQ_H
15
16/* irq numbers to onboard peripherals */
17
18#define IRQ_USBOC IRQ_EINT19
19#define IRQ_IDE0 IRQ_EINT16
20#define IRQ_IDE1 IRQ_EINT17
21#define IRQ_VR1000_SERIAL IRQ_EINT12
22#define IRQ_VR1000_DM9000A IRQ_EINT10
23#define IRQ_VR1000_DM9000N IRQ_EINT9
24#define IRQ_SMALERT IRQ_EINT8
25
26#endif /* __ASM_ARCH_VR1000IRQ_H */
diff --git a/arch/arm/mach-s3c2410/include/mach/vr1000-map.h b/arch/arm/mach-s3c2410/include/mach/vr1000-map.h
new file mode 100644
index 000000000000..99612fcc4eb2
--- /dev/null
+++ b/arch/arm/mach-s3c2410/include/mach/vr1000-map.h
@@ -0,0 +1,110 @@
1/* arch/arm/mach-s3c2410/include/mach/vr1000-map.h
2 *
3 * Copyright (c) 2003-2005 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * Machine VR1000 - Memory map definitions
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11*/
12
13/* needs arch/map.h including with this */
14
15/* ok, we've used up to 0x13000000, now we need to find space for the
16 * peripherals that live in the nGCS[x] areas, which are quite numerous
17 * in their space. We also have the board's CPLD to find register space
18 * for.
19 */
20
21#ifndef __ASM_ARCH_VR1000MAP_H
22#define __ASM_ARCH_VR1000MAP_H
23
24#include <mach/bast-map.h>
25
26#define VR1000_IOADDR(x) BAST_IOADDR(x)
27
28/* we put the CPLD registers next, to get them out of the way */
29
30#define VR1000_VA_CTRL1 VR1000_IOADDR(0x00000000) /* 0x01300000 */
31#define VR1000_PA_CTRL1 (S3C2410_CS5 | 0x7800000)
32
33#define VR1000_VA_CTRL2 VR1000_IOADDR(0x00100000) /* 0x01400000 */
34#define VR1000_PA_CTRL2 (S3C2410_CS1 | 0x6000000)
35
36#define VR1000_VA_CTRL3 VR1000_IOADDR(0x00200000) /* 0x01500000 */
37#define VR1000_PA_CTRL3 (S3C2410_CS1 | 0x6800000)
38
39#define VR1000_VA_CTRL4 VR1000_IOADDR(0x00300000) /* 0x01600000 */
40#define VR1000_PA_CTRL4 (S3C2410_CS1 | 0x7000000)
41
42/* next, we have the PC104 ISA interrupt registers */
43
44#define VR1000_PA_PC104_IRQREQ (S3C2410_CS5 | 0x6000000) /* 0x01700000 */
45#define VR1000_VA_PC104_IRQREQ VR1000_IOADDR(0x00400000)
46
47#define VR1000_PA_PC104_IRQRAW (S3C2410_CS5 | 0x6800000) /* 0x01800000 */
48#define VR1000_VA_PC104_IRQRAW VR1000_IOADDR(0x00500000)
49
50#define VR1000_PA_PC104_IRQMASK (S3C2410_CS5 | 0x7000000) /* 0x01900000 */
51#define VR1000_VA_PC104_IRQMASK VR1000_IOADDR(0x00600000)
52
53/* 0xE0000000 contains the IO space that is split by speed and
54 * wether the access is for 8 or 16bit IO... this ensures that
55 * the correct access is made
56 *
57 * 0x10000000 of space, partitioned as so:
58 *
59 * 0x00000000 to 0x04000000 8bit, slow
60 * 0x04000000 to 0x08000000 16bit, slow
61 * 0x08000000 to 0x0C000000 16bit, net
62 * 0x0C000000 to 0x10000000 16bit, fast
63 *
64 * each of these spaces has the following in:
65 *
66 * 0x02000000 to 0x02100000 1MB IDE primary channel
67 * 0x02100000 to 0x02200000 1MB IDE primary channel aux
68 * 0x02200000 to 0x02400000 1MB IDE secondary channel
69 * 0x02300000 to 0x02400000 1MB IDE secondary channel aux
70 * 0x02500000 to 0x02600000 1MB Davicom DM9000 ethernet controllers
71 * 0x02600000 to 0x02700000 1MB
72 *
73 * the phyiscal layout of the zones are:
74 * nGCS2 - 8bit, slow
75 * nGCS3 - 16bit, slow
76 * nGCS4 - 16bit, net
77 * nGCS5 - 16bit, fast
78 */
79
80#define VR1000_VA_MULTISPACE (0xE0000000)
81
82#define VR1000_VA_ISAIO (VR1000_VA_MULTISPACE + 0x00000000)
83#define VR1000_VA_ISAMEM (VR1000_VA_MULTISPACE + 0x01000000)
84#define VR1000_VA_IDEPRI (VR1000_VA_MULTISPACE + 0x02000000)
85#define VR1000_VA_IDEPRIAUX (VR1000_VA_MULTISPACE + 0x02100000)
86#define VR1000_VA_IDESEC (VR1000_VA_MULTISPACE + 0x02200000)
87#define VR1000_VA_IDESECAUX (VR1000_VA_MULTISPACE + 0x02300000)
88#define VR1000_VA_ASIXNET (VR1000_VA_MULTISPACE + 0x02400000)
89#define VR1000_VA_DM9000 (VR1000_VA_MULTISPACE + 0x02500000)
90#define VR1000_VA_SUPERIO (VR1000_VA_MULTISPACE + 0x02600000)
91
92/* physical offset addresses for the peripherals */
93
94#define VR1000_PA_IDEPRI (0x02000000)
95#define VR1000_PA_IDEPRIAUX (0x02800000)
96#define VR1000_PA_IDESEC (0x03000000)
97#define VR1000_PA_IDESECAUX (0x03800000)
98#define VR1000_PA_DM9000 (0x05000000)
99
100#define VR1000_PA_SERIAL (0x11800000)
101#define VR1000_VA_SERIAL (VR1000_IOADDR(0x00700000))
102
103/* VR1000 ram is in CS1, with A26..A24 = 2_101 */
104#define VR1000_PA_SRAM (S3C2410_CS1 | 0x05000000)
105
106/* some configurations for the peripherals */
107
108#define VR1000_DM9000_CS VR1000_VAM_CS4
109
110#endif /* __ASM_ARCH_VR1000MAP_H */
diff --git a/arch/arm/mach-s3c2410/mach-amlm5900.c b/arch/arm/mach-s3c2410/mach-amlm5900.c
index a67a0685664d..f0de3c23ce78 100644
--- a/arch/arm/mach-s3c2410/mach-amlm5900.c
+++ b/arch/arm/mach-s3c2410/mach-amlm5900.c
@@ -42,15 +42,15 @@
42#include <asm/mach/irq.h> 42#include <asm/mach/irq.h>
43#include <asm/mach/flash.h> 43#include <asm/mach/flash.h>
44 44
45#include <asm/hardware.h> 45#include <mach/hardware.h>
46#include <asm/io.h> 46#include <asm/io.h>
47#include <asm/irq.h> 47#include <asm/irq.h>
48#include <asm/mach-types.h> 48#include <asm/mach-types.h>
49#include <asm/arch/fb.h> 49#include <mach/fb.h>
50 50
51#include <asm/plat-s3c/regs-serial.h> 51#include <asm/plat-s3c/regs-serial.h>
52#include <asm/arch/regs-lcd.h> 52#include <mach/regs-lcd.h>
53#include <asm/arch/regs-gpio.h> 53#include <mach/regs-gpio.h>
54 54
55#include <asm/plat-s3c24xx/devs.h> 55#include <asm/plat-s3c24xx/devs.h>
56#include <asm/plat-s3c24xx/cpu.h> 56#include <asm/plat-s3c24xx/cpu.h>
diff --git a/arch/arm/mach-s3c2410/mach-bast.c b/arch/arm/mach-s3c2410/mach-bast.c
index 965f27129707..fb1e78e28e50 100644
--- a/arch/arm/mach-s3c2410/mach-bast.c
+++ b/arch/arm/mach-s3c2410/mach-bast.c
@@ -29,24 +29,24 @@
29#include <asm/mach/map.h> 29#include <asm/mach/map.h>
30#include <asm/mach/irq.h> 30#include <asm/mach/irq.h>
31 31
32#include <asm/arch/bast-map.h> 32#include <mach/bast-map.h>
33#include <asm/arch/bast-irq.h> 33#include <mach/bast-irq.h>
34#include <asm/arch/bast-cpld.h> 34#include <mach/bast-cpld.h>
35 35
36#include <asm/hardware.h> 36#include <mach/hardware.h>
37#include <asm/io.h> 37#include <asm/io.h>
38#include <asm/irq.h> 38#include <asm/irq.h>
39#include <asm/mach-types.h> 39#include <asm/mach-types.h>
40 40
41//#include <asm/debug-ll.h> 41//#include <asm/debug-ll.h>
42#include <asm/plat-s3c/regs-serial.h> 42#include <asm/plat-s3c/regs-serial.h>
43#include <asm/arch/regs-gpio.h> 43#include <mach/regs-gpio.h>
44#include <asm/arch/regs-mem.h> 44#include <mach/regs-mem.h>
45#include <asm/arch/regs-lcd.h> 45#include <mach/regs-lcd.h>
46 46
47#include <asm/plat-s3c/nand.h> 47#include <asm/plat-s3c/nand.h>
48#include <asm/plat-s3c/iic.h> 48#include <asm/plat-s3c/iic.h>
49#include <asm/arch/fb.h> 49#include <mach/fb.h>
50 50
51#include <linux/mtd/mtd.h> 51#include <linux/mtd/mtd.h>
52#include <linux/mtd/nand.h> 52#include <linux/mtd/nand.h>
diff --git a/arch/arm/mach-s3c2410/mach-h1940.c b/arch/arm/mach-s3c2410/mach-h1940.c
index 7c1145e87c12..e35933a46d10 100644
--- a/arch/arm/mach-s3c2410/mach-h1940.c
+++ b/arch/arm/mach-s3c2410/mach-h1940.c
@@ -25,19 +25,19 @@
25#include <asm/mach/map.h> 25#include <asm/mach/map.h>
26#include <asm/mach/irq.h> 26#include <asm/mach/irq.h>
27 27
28#include <asm/hardware.h> 28#include <mach/hardware.h>
29#include <asm/io.h> 29#include <asm/io.h>
30#include <asm/irq.h> 30#include <asm/irq.h>
31#include <asm/mach-types.h> 31#include <asm/mach-types.h>
32 32
33#include <asm/plat-s3c/regs-serial.h> 33#include <asm/plat-s3c/regs-serial.h>
34#include <asm/arch/regs-lcd.h> 34#include <mach/regs-lcd.h>
35#include <asm/arch/regs-gpio.h> 35#include <mach/regs-gpio.h>
36#include <asm/arch/regs-clock.h> 36#include <mach/regs-clock.h>
37 37
38#include <asm/arch/h1940.h> 38#include <mach/h1940.h>
39#include <asm/arch/h1940-latch.h> 39#include <mach/h1940-latch.h>
40#include <asm/arch/fb.h> 40#include <mach/fb.h>
41#include <asm/plat-s3c24xx/udc.h> 41#include <asm/plat-s3c24xx/udc.h>
42 42
43#include <asm/plat-s3c24xx/clock.h> 43#include <asm/plat-s3c24xx/clock.h>
diff --git a/arch/arm/mach-s3c2410/mach-n30.c b/arch/arm/mach-s3c2410/mach-n30.c
index 43c2e915c5bf..80fe2ed0775c 100644
--- a/arch/arm/mach-s3c2410/mach-n30.c
+++ b/arch/arm/mach-s3c2410/mach-n30.c
@@ -26,15 +26,15 @@
26#include <linux/serial_core.h> 26#include <linux/serial_core.h>
27#include <linux/timer.h> 27#include <linux/timer.h>
28 28
29#include <asm/hardware.h> 29#include <mach/hardware.h>
30#include <asm/io.h> 30#include <asm/io.h>
31#include <asm/irq.h> 31#include <asm/irq.h>
32#include <asm/mach-types.h> 32#include <asm/mach-types.h>
33 33
34#include <asm/arch/fb.h> 34#include <mach/fb.h>
35#include <asm/arch/leds-gpio.h> 35#include <mach/leds-gpio.h>
36#include <asm/arch/regs-gpio.h> 36#include <mach/regs-gpio.h>
37#include <asm/arch/regs-lcd.h> 37#include <mach/regs-lcd.h>
38 38
39#include <asm/mach/arch.h> 39#include <asm/mach/arch.h>
40#include <asm/mach/irq.h> 40#include <asm/mach/irq.h>
diff --git a/arch/arm/mach-s3c2410/mach-otom.c b/arch/arm/mach-s3c2410/mach-otom.c
index 717af40e4477..606ee15911b6 100644
--- a/arch/arm/mach-s3c2410/mach-otom.c
+++ b/arch/arm/mach-s3c2410/mach-otom.c
@@ -22,15 +22,15 @@
22#include <asm/mach/map.h> 22#include <asm/mach/map.h>
23#include <asm/mach/irq.h> 23#include <asm/mach/irq.h>
24 24
25#include <asm/arch/otom-map.h> 25#include <mach/otom-map.h>
26 26
27#include <asm/hardware.h> 27#include <mach/hardware.h>
28#include <asm/io.h> 28#include <asm/io.h>
29#include <asm/irq.h> 29#include <asm/irq.h>
30#include <asm/mach-types.h> 30#include <asm/mach-types.h>
31 31
32#include <asm/plat-s3c/regs-serial.h> 32#include <asm/plat-s3c/regs-serial.h>
33#include <asm/arch/regs-gpio.h> 33#include <mach/regs-gpio.h>
34 34
35#include <asm/plat-s3c24xx/s3c2410.h> 35#include <asm/plat-s3c24xx/s3c2410.h>
36#include <asm/plat-s3c24xx/clock.h> 36#include <asm/plat-s3c24xx/clock.h>
diff --git a/arch/arm/mach-s3c2410/mach-qt2410.c b/arch/arm/mach-s3c2410/mach-qt2410.c
index a1caf4b0adac..7d34844debde 100644
--- a/arch/arm/mach-s3c2410/mach-qt2410.c
+++ b/arch/arm/mach-s3c2410/mach-qt2410.c
@@ -42,19 +42,19 @@
42#include <asm/mach/map.h> 42#include <asm/mach/map.h>
43#include <asm/mach/irq.h> 43#include <asm/mach/irq.h>
44 44
45#include <asm/hardware.h> 45#include <mach/hardware.h>
46#include <asm/io.h> 46#include <asm/io.h>
47#include <asm/irq.h> 47#include <asm/irq.h>
48#include <asm/mach-types.h> 48#include <asm/mach-types.h>
49 49
50#include <asm/arch/regs-gpio.h> 50#include <mach/regs-gpio.h>
51#include <asm/arch/leds-gpio.h> 51#include <mach/leds-gpio.h>
52#include <asm/plat-s3c/regs-serial.h> 52#include <asm/plat-s3c/regs-serial.h>
53#include <asm/arch/fb.h> 53#include <mach/fb.h>
54#include <asm/plat-s3c/nand.h> 54#include <asm/plat-s3c/nand.h>
55#include <asm/plat-s3c24xx/udc.h> 55#include <asm/plat-s3c24xx/udc.h>
56#include <asm/arch/spi.h> 56#include <mach/spi.h>
57#include <asm/arch/spi-gpio.h> 57#include <mach/spi-gpio.h>
58 58
59#include <asm/plat-s3c24xx/common-smdk.h> 59#include <asm/plat-s3c24xx/common-smdk.h>
60#include <asm/plat-s3c24xx/devs.h> 60#include <asm/plat-s3c24xx/devs.h>
diff --git a/arch/arm/mach-s3c2410/mach-smdk2410.c b/arch/arm/mach-s3c2410/mach-smdk2410.c
index 226550504c85..c9040080727e 100644
--- a/arch/arm/mach-s3c2410/mach-smdk2410.c
+++ b/arch/arm/mach-s3c2410/mach-smdk2410.c
@@ -42,7 +42,7 @@
42#include <asm/mach/map.h> 42#include <asm/mach/map.h>
43#include <asm/mach/irq.h> 43#include <asm/mach/irq.h>
44 44
45#include <asm/hardware.h> 45#include <mach/hardware.h>
46#include <asm/io.h> 46#include <asm/io.h>
47#include <asm/irq.h> 47#include <asm/irq.h>
48#include <asm/mach-types.h> 48#include <asm/mach-types.h>
diff --git a/arch/arm/mach-s3c2410/mach-tct_hammer.c b/arch/arm/mach-s3c2410/mach-tct_hammer.c
index d90d445ccfb4..ec87306a8c24 100644
--- a/arch/arm/mach-s3c2410/mach-tct_hammer.c
+++ b/arch/arm/mach-s3c2410/mach-tct_hammer.c
@@ -39,7 +39,7 @@
39#include <asm/mach/irq.h> 39#include <asm/mach/irq.h>
40#include <asm/mach/flash.h> 40#include <asm/mach/flash.h>
41 41
42#include <asm/hardware.h> 42#include <mach/hardware.h>
43#include <asm/io.h> 43#include <asm/io.h>
44#include <asm/irq.h> 44#include <asm/irq.h>
45#include <asm/mach-types.h> 45#include <asm/mach-types.h>
diff --git a/arch/arm/mach-s3c2410/mach-vr1000.c b/arch/arm/mach-s3c2410/mach-vr1000.c
index 9a0965ac5e11..12cbca68f57d 100644
--- a/arch/arm/mach-s3c2410/mach-vr1000.c
+++ b/arch/arm/mach-s3c2410/mach-vr1000.c
@@ -30,19 +30,19 @@
30#include <asm/mach/map.h> 30#include <asm/mach/map.h>
31#include <asm/mach/irq.h> 31#include <asm/mach/irq.h>
32 32
33#include <asm/arch/bast-map.h> 33#include <mach/bast-map.h>
34#include <asm/arch/vr1000-map.h> 34#include <mach/vr1000-map.h>
35#include <asm/arch/vr1000-irq.h> 35#include <mach/vr1000-irq.h>
36#include <asm/arch/vr1000-cpld.h> 36#include <mach/vr1000-cpld.h>
37 37
38#include <asm/hardware.h> 38#include <mach/hardware.h>
39#include <asm/io.h> 39#include <asm/io.h>
40#include <asm/irq.h> 40#include <asm/irq.h>
41#include <asm/mach-types.h> 41#include <asm/mach-types.h>
42 42
43#include <asm/plat-s3c/regs-serial.h> 43#include <asm/plat-s3c/regs-serial.h>
44#include <asm/arch/regs-gpio.h> 44#include <mach/regs-gpio.h>
45#include <asm/arch/leds-gpio.h> 45#include <mach/leds-gpio.h>
46 46
47#include <asm/plat-s3c24xx/clock.h> 47#include <asm/plat-s3c24xx/clock.h>
48#include <asm/plat-s3c24xx/devs.h> 48#include <asm/plat-s3c24xx/devs.h>
diff --git a/arch/arm/mach-s3c2410/nor-simtec.c b/arch/arm/mach-s3c2410/nor-simtec.c
index f44e21b9c3ba..b2ae237042a5 100644
--- a/arch/arm/mach-s3c2410/nor-simtec.c
+++ b/arch/arm/mach-s3c2410/nor-simtec.c
@@ -26,9 +26,9 @@
26#include <asm/mach/map.h> 26#include <asm/mach/map.h>
27#include <asm/mach/irq.h> 27#include <asm/mach/irq.h>
28 28
29#include <asm/arch/map.h> 29#include <mach/map.h>
30#include <asm/arch/bast-map.h> 30#include <mach/bast-map.h>
31#include <asm/arch/bast-cpld.h> 31#include <mach/bast-cpld.h>
32 32
33 33
34static void simtec_nor_vpp(struct map_info *map, int vpp) 34static void simtec_nor_vpp(struct map_info *map, int vpp)
diff --git a/arch/arm/mach-s3c2410/pm-h1940.S b/arch/arm/mach-s3c2410/pm-h1940.S
index 7d66de7ff7db..c93bf2db9f4d 100644
--- a/arch/arm/mach-s3c2410/pm-h1940.S
+++ b/arch/arm/mach-s3c2410/pm-h1940.S
@@ -20,10 +20,10 @@
20 20
21#include <linux/linkage.h> 21#include <linux/linkage.h>
22#include <asm/assembler.h> 22#include <asm/assembler.h>
23#include <asm/hardware.h> 23#include <mach/hardware.h>
24#include <asm/arch/map.h> 24#include <mach/map.h>
25 25
26#include <asm/arch/regs-gpio.h> 26#include <mach/regs-gpio.h>
27 27
28 .text 28 .text
29 .global h1940_pm_return 29 .global h1940_pm_return
diff --git a/arch/arm/mach-s3c2410/pm.c b/arch/arm/mach-s3c2410/pm.c
index 3b3a7db4e0dd..ba43ff9e8164 100644
--- a/arch/arm/mach-s3c2410/pm.c
+++ b/arch/arm/mach-s3c2410/pm.c
@@ -26,13 +26,13 @@
26#include <linux/time.h> 26#include <linux/time.h>
27#include <linux/sysdev.h> 27#include <linux/sysdev.h>
28 28
29#include <asm/hardware.h> 29#include <mach/hardware.h>
30#include <asm/io.h> 30#include <asm/io.h>
31 31
32#include <asm/mach-types.h> 32#include <asm/mach-types.h>
33 33
34#include <asm/arch/regs-gpio.h> 34#include <mach/regs-gpio.h>
35#include <asm/arch/h1940.h> 35#include <mach/h1940.h>
36 36
37#include <asm/plat-s3c24xx/cpu.h> 37#include <asm/plat-s3c24xx/cpu.h>
38#include <asm/plat-s3c24xx/pm.h> 38#include <asm/plat-s3c24xx/pm.h>
diff --git a/arch/arm/mach-s3c2410/s3c2410.c b/arch/arm/mach-s3c2410/s3c2410.c
index 0e7991940f81..5d977f9c88ac 100644
--- a/arch/arm/mach-s3c2410/s3c2410.c
+++ b/arch/arm/mach-s3c2410/s3c2410.c
@@ -24,11 +24,11 @@
24#include <asm/mach/map.h> 24#include <asm/mach/map.h>
25#include <asm/mach/irq.h> 25#include <asm/mach/irq.h>
26 26
27#include <asm/hardware.h> 27#include <mach/hardware.h>
28#include <asm/io.h> 28#include <asm/io.h>
29#include <asm/irq.h> 29#include <asm/irq.h>
30 30
31#include <asm/arch/regs-clock.h> 31#include <mach/regs-clock.h>
32#include <asm/plat-s3c/regs-serial.h> 32#include <asm/plat-s3c/regs-serial.h>
33 33
34#include <asm/plat-s3c24xx/s3c2410.h> 34#include <asm/plat-s3c24xx/s3c2410.h>
diff --git a/arch/arm/mach-s3c2410/sleep.S b/arch/arm/mach-s3c2410/sleep.S
index 8a9c5a2bb252..be37f221a177 100644
--- a/arch/arm/mach-s3c2410/sleep.S
+++ b/arch/arm/mach-s3c2410/sleep.S
@@ -26,12 +26,12 @@
26 26
27#include <linux/linkage.h> 27#include <linux/linkage.h>
28#include <asm/assembler.h> 28#include <asm/assembler.h>
29#include <asm/hardware.h> 29#include <mach/hardware.h>
30#include <asm/arch/map.h> 30#include <mach/map.h>
31 31
32#include <asm/arch/regs-gpio.h> 32#include <mach/regs-gpio.h>
33#include <asm/arch/regs-clock.h> 33#include <mach/regs-clock.h>
34#include <asm/arch/regs-mem.h> 34#include <mach/regs-mem.h>
35#include <asm/plat-s3c/regs-serial.h> 35#include <asm/plat-s3c/regs-serial.h>
36 36
37 /* s3c2410_cpu_suspend 37 /* s3c2410_cpu_suspend
diff --git a/arch/arm/mach-s3c2410/usb-simtec.c b/arch/arm/mach-s3c2410/usb-simtec.c
index 6aec86a5da56..4dacf8a1750d 100644
--- a/arch/arm/mach-s3c2410/usb-simtec.c
+++ b/arch/arm/mach-s3c2410/usb-simtec.c
@@ -26,12 +26,12 @@
26#include <asm/mach/map.h> 26#include <asm/mach/map.h>
27#include <asm/mach/irq.h> 27#include <asm/mach/irq.h>
28 28
29#include <asm/arch/bast-map.h> 29#include <mach/bast-map.h>
30#include <asm/arch/bast-irq.h> 30#include <mach/bast-irq.h>
31#include <asm/arch/usb-control.h> 31#include <mach/usb-control.h>
32#include <asm/arch/regs-gpio.h> 32#include <mach/regs-gpio.h>
33 33
34#include <asm/hardware.h> 34#include <mach/hardware.h>
35#include <asm/io.h> 35#include <asm/io.h>
36#include <asm/irq.h> 36#include <asm/irq.h>
37 37
diff --git a/arch/arm/mach-s3c2412/clock.c b/arch/arm/mach-s3c2412/clock.c
index 1157b5a16263..af4b2ce516f9 100644
--- a/arch/arm/mach-s3c2412/clock.c
+++ b/arch/arm/mach-s3c2412/clock.c
@@ -34,12 +34,12 @@
34 34
35#include <asm/mach/map.h> 35#include <asm/mach/map.h>
36 36
37#include <asm/hardware.h> 37#include <mach/hardware.h>
38#include <asm/io.h> 38#include <asm/io.h>
39 39
40#include <asm/plat-s3c/regs-serial.h> 40#include <asm/plat-s3c/regs-serial.h>
41#include <asm/arch/regs-clock.h> 41#include <mach/regs-clock.h>
42#include <asm/arch/regs-gpio.h> 42#include <mach/regs-gpio.h>
43 43
44#include <asm/plat-s3c24xx/s3c2412.h> 44#include <asm/plat-s3c24xx/s3c2412.h>
45#include <asm/plat-s3c24xx/clock.h> 45#include <asm/plat-s3c24xx/clock.h>
diff --git a/arch/arm/mach-s3c2412/dma.c b/arch/arm/mach-s3c2412/dma.c
index 1dd864993566..22fc04a3b533 100644
--- a/arch/arm/mach-s3c2412/dma.c
+++ b/arch/arm/mach-s3c2412/dma.c
@@ -18,18 +18,18 @@
18#include <linux/serial_core.h> 18#include <linux/serial_core.h>
19 19
20#include <asm/dma.h> 20#include <asm/dma.h>
21#include <asm/arch/dma.h> 21#include <mach/dma.h>
22#include <asm/io.h> 22#include <asm/io.h>
23 23
24#include <asm/plat-s3c24xx/dma.h> 24#include <asm/plat-s3c24xx/dma.h>
25#include <asm/plat-s3c24xx/cpu.h> 25#include <asm/plat-s3c24xx/cpu.h>
26 26
27#include <asm/plat-s3c/regs-serial.h> 27#include <asm/plat-s3c/regs-serial.h>
28#include <asm/arch/regs-gpio.h> 28#include <mach/regs-gpio.h>
29#include <asm/plat-s3c/regs-ac97.h> 29#include <asm/plat-s3c/regs-ac97.h>
30#include <asm/arch/regs-mem.h> 30#include <mach/regs-mem.h>
31#include <asm/arch/regs-lcd.h> 31#include <mach/regs-lcd.h>
32#include <asm/arch/regs-sdi.h> 32#include <mach/regs-sdi.h>
33#include <asm/plat-s3c24xx/regs-s3c2412-iis.h> 33#include <asm/plat-s3c24xx/regs-s3c2412-iis.h>
34#include <asm/plat-s3c24xx/regs-iis.h> 34#include <asm/plat-s3c24xx/regs-iis.h>
35#include <asm/plat-s3c24xx/regs-spi.h> 35#include <asm/plat-s3c24xx/regs-spi.h>
diff --git a/arch/arm/mach-s3c2412/gpio.c b/arch/arm/mach-s3c2412/gpio.c
index 8e55c3a2eab8..f7afece7fc38 100644
--- a/arch/arm/mach-s3c2412/gpio.c
+++ b/arch/arm/mach-s3c2412/gpio.c
@@ -20,9 +20,9 @@
20#include <asm/mach/arch.h> 20#include <asm/mach/arch.h>
21#include <asm/mach/map.h> 21#include <asm/mach/map.h>
22 22
23#include <asm/arch/regs-gpio.h> 23#include <mach/regs-gpio.h>
24 24
25#include <asm/hardware.h> 25#include <mach/hardware.h>
26 26
27int s3c2412_gpio_set_sleepcfg(unsigned int pin, unsigned int state) 27int s3c2412_gpio_set_sleepcfg(unsigned int pin, unsigned int state)
28{ 28{
diff --git a/arch/arm/mach-s3c2412/irq.c b/arch/arm/mach-s3c2412/irq.c
index cc1917bf952a..ac62b79044f4 100644
--- a/arch/arm/mach-s3c2412/irq.c
+++ b/arch/arm/mach-s3c2412/irq.c
@@ -25,15 +25,15 @@
25#include <linux/ioport.h> 25#include <linux/ioport.h>
26#include <linux/sysdev.h> 26#include <linux/sysdev.h>
27 27
28#include <asm/hardware.h> 28#include <mach/hardware.h>
29#include <asm/irq.h> 29#include <asm/irq.h>
30#include <asm/io.h> 30#include <asm/io.h>
31 31
32#include <asm/mach/irq.h> 32#include <asm/mach/irq.h>
33 33
34#include <asm/arch/regs-irq.h> 34#include <mach/regs-irq.h>
35#include <asm/arch/regs-gpio.h> 35#include <mach/regs-gpio.h>
36#include <asm/arch/regs-power.h> 36#include <mach/regs-power.h>
37 37
38#include <asm/plat-s3c24xx/cpu.h> 38#include <asm/plat-s3c24xx/cpu.h>
39#include <asm/plat-s3c24xx/irq.h> 39#include <asm/plat-s3c24xx/irq.h>
diff --git a/arch/arm/mach-s3c2412/mach-jive.c b/arch/arm/mach-s3c2412/mach-jive.c
index 7f5924713485..30f613a79bfe 100644
--- a/arch/arm/mach-s3c2412/mach-jive.c
+++ b/arch/arm/mach-s3c2412/mach-jive.c
@@ -37,12 +37,12 @@
37#include <asm/plat-s3c/nand.h> 37#include <asm/plat-s3c/nand.h>
38#include <asm/plat-s3c/iic.h> 38#include <asm/plat-s3c/iic.h>
39 39
40#include <asm/arch/regs-power.h> 40#include <mach/regs-power.h>
41#include <asm/arch/regs-gpio.h> 41#include <mach/regs-gpio.h>
42#include <asm/arch/regs-mem.h> 42#include <mach/regs-mem.h>
43#include <asm/arch/regs-lcd.h> 43#include <mach/regs-lcd.h>
44#include <asm/arch/spi-gpio.h> 44#include <mach/spi-gpio.h>
45#include <asm/arch/fb.h> 45#include <mach/fb.h>
46 46
47#include <asm/mach-types.h> 47#include <asm/mach-types.h>
48 48
diff --git a/arch/arm/mach-s3c2412/mach-smdk2413.c b/arch/arm/mach-s3c2412/mach-smdk2413.c
index b126a530daa6..80affb1ee4cd 100644
--- a/arch/arm/mach-s3c2412/mach-smdk2413.c
+++ b/arch/arm/mach-s3c2412/mach-smdk2413.c
@@ -24,7 +24,7 @@
24#include <asm/mach/map.h> 24#include <asm/mach/map.h>
25#include <asm/mach/irq.h> 25#include <asm/mach/irq.h>
26 26
27#include <asm/hardware.h> 27#include <mach/hardware.h>
28#include <asm/hardware/iomd.h> 28#include <asm/hardware/iomd.h>
29#include <asm/setup.h> 29#include <asm/setup.h>
30#include <asm/io.h> 30#include <asm/io.h>
@@ -33,12 +33,12 @@
33 33
34//#include <asm/debug-ll.h> 34//#include <asm/debug-ll.h>
35#include <asm/plat-s3c/regs-serial.h> 35#include <asm/plat-s3c/regs-serial.h>
36#include <asm/arch/regs-gpio.h> 36#include <mach/regs-gpio.h>
37#include <asm/arch/regs-lcd.h> 37#include <mach/regs-lcd.h>
38 38
39#include <asm/arch/idle.h> 39#include <mach/idle.h>
40#include <asm/plat-s3c24xx/udc.h> 40#include <asm/plat-s3c24xx/udc.h>
41#include <asm/arch/fb.h> 41#include <mach/fb.h>
42 42
43#include <asm/plat-s3c24xx/s3c2410.h> 43#include <asm/plat-s3c24xx/s3c2410.h>
44#include <asm/plat-s3c24xx/s3c2412.h> 44#include <asm/plat-s3c24xx/s3c2412.h>
diff --git a/arch/arm/mach-s3c2412/mach-vstms.c b/arch/arm/mach-s3c2412/mach-vstms.c
index 32982547cd63..7a08b3789915 100644
--- a/arch/arm/mach-s3c2412/mach-vstms.c
+++ b/arch/arm/mach-s3c2412/mach-vstms.c
@@ -27,18 +27,18 @@
27#include <asm/mach/map.h> 27#include <asm/mach/map.h>
28#include <asm/mach/irq.h> 28#include <asm/mach/irq.h>
29 29
30#include <asm/hardware.h> 30#include <mach/hardware.h>
31#include <asm/setup.h> 31#include <asm/setup.h>
32#include <asm/io.h> 32#include <asm/io.h>
33#include <asm/irq.h> 33#include <asm/irq.h>
34#include <asm/mach-types.h> 34#include <asm/mach-types.h>
35 35
36#include <asm/plat-s3c/regs-serial.h> 36#include <asm/plat-s3c/regs-serial.h>
37#include <asm/arch/regs-gpio.h> 37#include <mach/regs-gpio.h>
38#include <asm/arch/regs-lcd.h> 38#include <mach/regs-lcd.h>
39 39
40#include <asm/arch/idle.h> 40#include <mach/idle.h>
41#include <asm/arch/fb.h> 41#include <mach/fb.h>
42 42
43#include <asm/plat-s3c/nand.h> 43#include <asm/plat-s3c/nand.h>
44 44
diff --git a/arch/arm/mach-s3c2412/pm.c b/arch/arm/mach-s3c2412/pm.c
index d4ffb2d98076..737523a4e037 100644
--- a/arch/arm/mach-s3c2412/pm.c
+++ b/arch/arm/mach-s3c2412/pm.c
@@ -19,14 +19,14 @@
19#include <linux/sysdev.h> 19#include <linux/sysdev.h>
20#include <linux/platform_device.h> 20#include <linux/platform_device.h>
21 21
22#include <asm/hardware.h> 22#include <mach/hardware.h>
23#include <asm/io.h> 23#include <asm/io.h>
24#include <asm/irq.h> 24#include <asm/irq.h>
25 25
26#include <asm/arch/regs-power.h> 26#include <mach/regs-power.h>
27#include <asm/arch/regs-gpioj.h> 27#include <mach/regs-gpioj.h>
28#include <asm/arch/regs-gpio.h> 28#include <mach/regs-gpio.h>
29#include <asm/arch/regs-dsc.h> 29#include <mach/regs-dsc.h>
30 30
31#include <asm/plat-s3c24xx/cpu.h> 31#include <asm/plat-s3c24xx/cpu.h>
32#include <asm/plat-s3c24xx/pm.h> 32#include <asm/plat-s3c24xx/pm.h>
diff --git a/arch/arm/mach-s3c2412/s3c2412.c b/arch/arm/mach-s3c2412/s3c2412.c
index 98a0de924c22..d278010b9f60 100644
--- a/arch/arm/mach-s3c2412/s3c2412.c
+++ b/arch/arm/mach-s3c2412/s3c2412.c
@@ -25,22 +25,22 @@
25#include <asm/mach/map.h> 25#include <asm/mach/map.h>
26#include <asm/mach/irq.h> 26#include <asm/mach/irq.h>
27 27
28#include <asm/hardware.h> 28#include <mach/hardware.h>
29#include <asm/proc-fns.h> 29#include <asm/proc-fns.h>
30#include <asm/io.h> 30#include <asm/io.h>
31#include <asm/irq.h> 31#include <asm/irq.h>
32 32
33#include <asm/arch/reset.h> 33#include <mach/reset.h>
34#include <asm/arch/idle.h> 34#include <mach/idle.h>
35 35
36#include <asm/arch/regs-clock.h> 36#include <mach/regs-clock.h>
37#include <asm/plat-s3c/regs-serial.h> 37#include <asm/plat-s3c/regs-serial.h>
38#include <asm/arch/regs-power.h> 38#include <mach/regs-power.h>
39#include <asm/arch/regs-gpio.h> 39#include <mach/regs-gpio.h>
40#include <asm/arch/regs-gpioj.h> 40#include <mach/regs-gpioj.h>
41#include <asm/arch/regs-dsc.h> 41#include <mach/regs-dsc.h>
42#include <asm/plat-s3c24xx/regs-spi.h> 42#include <asm/plat-s3c24xx/regs-spi.h>
43#include <asm/arch/regs-s3c2412.h> 43#include <mach/regs-s3c2412.h>
44 44
45#include <asm/plat-s3c24xx/s3c2412.h> 45#include <asm/plat-s3c24xx/s3c2412.h>
46#include <asm/plat-s3c24xx/cpu.h> 46#include <asm/plat-s3c24xx/cpu.h>
diff --git a/arch/arm/mach-s3c2412/sleep.S b/arch/arm/mach-s3c2412/sleep.S
index db32cac4199a..c82418ed714d 100644
--- a/arch/arm/mach-s3c2412/sleep.S
+++ b/arch/arm/mach-s3c2412/sleep.S
@@ -22,10 +22,10 @@
22 22
23#include <linux/linkage.h> 23#include <linux/linkage.h>
24#include <asm/assembler.h> 24#include <asm/assembler.h>
25#include <asm/hardware.h> 25#include <mach/hardware.h>
26#include <asm/arch/map.h> 26#include <mach/map.h>
27 27
28#include <asm/arch/regs-irq.h> 28#include <mach/regs-irq.h>
29 29
30 .text 30 .text
31 31
diff --git a/arch/arm/mach-s3c2440/clock.c b/arch/arm/mach-s3c2440/clock.c
index 184d804934c9..95567e6daea1 100644
--- a/arch/arm/mach-s3c2440/clock.c
+++ b/arch/arm/mach-s3c2440/clock.c
@@ -34,12 +34,12 @@
34#include <linux/mutex.h> 34#include <linux/mutex.h>
35#include <linux/clk.h> 35#include <linux/clk.h>
36 36
37#include <asm/hardware.h> 37#include <mach/hardware.h>
38#include <asm/atomic.h> 38#include <asm/atomic.h>
39#include <asm/irq.h> 39#include <asm/irq.h>
40#include <asm/io.h> 40#include <asm/io.h>
41 41
42#include <asm/arch/regs-clock.h> 42#include <mach/regs-clock.h>
43 43
44#include <asm/plat-s3c24xx/clock.h> 44#include <asm/plat-s3c24xx/clock.h>
45#include <asm/plat-s3c24xx/cpu.h> 45#include <asm/plat-s3c24xx/cpu.h>
diff --git a/arch/arm/mach-s3c2440/dma.c b/arch/arm/mach-s3c2440/dma.c
index 0b1260827ac6..cdd4e6e79ac0 100644
--- a/arch/arm/mach-s3c2440/dma.c
+++ b/arch/arm/mach-s3c2440/dma.c
@@ -18,17 +18,17 @@
18#include <linux/serial_core.h> 18#include <linux/serial_core.h>
19 19
20#include <asm/dma.h> 20#include <asm/dma.h>
21#include <asm/arch/dma.h> 21#include <mach/dma.h>
22 22
23#include <asm/plat-s3c24xx/dma.h> 23#include <asm/plat-s3c24xx/dma.h>
24#include <asm/plat-s3c24xx/cpu.h> 24#include <asm/plat-s3c24xx/cpu.h>
25 25
26#include <asm/plat-s3c/regs-serial.h> 26#include <asm/plat-s3c/regs-serial.h>
27#include <asm/arch/regs-gpio.h> 27#include <mach/regs-gpio.h>
28#include <asm/plat-s3c/regs-ac97.h> 28#include <asm/plat-s3c/regs-ac97.h>
29#include <asm/arch/regs-mem.h> 29#include <mach/regs-mem.h>
30#include <asm/arch/regs-lcd.h> 30#include <mach/regs-lcd.h>
31#include <asm/arch/regs-sdi.h> 31#include <mach/regs-sdi.h>
32#include <asm/plat-s3c24xx/regs-iis.h> 32#include <asm/plat-s3c24xx/regs-iis.h>
33#include <asm/plat-s3c24xx/regs-spi.h> 33#include <asm/plat-s3c24xx/regs-spi.h>
34 34
diff --git a/arch/arm/mach-s3c2440/dsc.c b/arch/arm/mach-s3c2440/dsc.c
index 2995ff5681bb..c0c67438d0a4 100644
--- a/arch/arm/mach-s3c2440/dsc.c
+++ b/arch/arm/mach-s3c2440/dsc.c
@@ -20,12 +20,12 @@
20#include <asm/mach/map.h> 20#include <asm/mach/map.h>
21#include <asm/mach/irq.h> 21#include <asm/mach/irq.h>
22 22
23#include <asm/hardware.h> 23#include <mach/hardware.h>
24#include <asm/io.h> 24#include <asm/io.h>
25#include <asm/irq.h> 25#include <asm/irq.h>
26 26
27#include <asm/arch/regs-gpio.h> 27#include <mach/regs-gpio.h>
28#include <asm/arch/regs-dsc.h> 28#include <mach/regs-dsc.h>
29 29
30#include <asm/plat-s3c24xx/cpu.h> 30#include <asm/plat-s3c24xx/cpu.h>
31#include <asm/plat-s3c24xx/s3c2440.h> 31#include <asm/plat-s3c24xx/s3c2440.h>
diff --git a/arch/arm/mach-s3c2440/irq.c b/arch/arm/mach-s3c2440/irq.c
index a87608bc1a03..276b823f4e27 100644
--- a/arch/arm/mach-s3c2440/irq.c
+++ b/arch/arm/mach-s3c2440/irq.c
@@ -25,14 +25,14 @@
25#include <linux/ioport.h> 25#include <linux/ioport.h>
26#include <linux/sysdev.h> 26#include <linux/sysdev.h>
27 27
28#include <asm/hardware.h> 28#include <mach/hardware.h>
29#include <asm/irq.h> 29#include <asm/irq.h>
30#include <asm/io.h> 30#include <asm/io.h>
31 31
32#include <asm/mach/irq.h> 32#include <asm/mach/irq.h>
33 33
34#include <asm/arch/regs-irq.h> 34#include <mach/regs-irq.h>
35#include <asm/arch/regs-gpio.h> 35#include <mach/regs-gpio.h>
36 36
37#include <asm/plat-s3c24xx/cpu.h> 37#include <asm/plat-s3c24xx/cpu.h>
38#include <asm/plat-s3c24xx/pm.h> 38#include <asm/plat-s3c24xx/pm.h>
diff --git a/arch/arm/mach-s3c2440/mach-anubis.c b/arch/arm/mach-s3c2440/mach-anubis.c
index 09af8b23500b..265c77dec9d7 100644
--- a/arch/arm/mach-s3c2440/mach-anubis.c
+++ b/arch/arm/mach-s3c2440/mach-anubis.c
@@ -27,19 +27,19 @@
27#include <asm/mach/map.h> 27#include <asm/mach/map.h>
28#include <asm/mach/irq.h> 28#include <asm/mach/irq.h>
29 29
30#include <asm/arch/anubis-map.h> 30#include <mach/anubis-map.h>
31#include <asm/arch/anubis-irq.h> 31#include <mach/anubis-irq.h>
32#include <asm/arch/anubis-cpld.h> 32#include <mach/anubis-cpld.h>
33 33
34#include <asm/hardware.h> 34#include <mach/hardware.h>
35#include <asm/io.h> 35#include <asm/io.h>
36#include <asm/irq.h> 36#include <asm/irq.h>
37#include <asm/mach-types.h> 37#include <asm/mach-types.h>
38 38
39#include <asm/plat-s3c/regs-serial.h> 39#include <asm/plat-s3c/regs-serial.h>
40#include <asm/arch/regs-gpio.h> 40#include <mach/regs-gpio.h>
41#include <asm/arch/regs-mem.h> 41#include <mach/regs-mem.h>
42#include <asm/arch/regs-lcd.h> 42#include <mach/regs-lcd.h>
43#include <asm/plat-s3c/nand.h> 43#include <asm/plat-s3c/nand.h>
44 44
45#include <linux/mtd/mtd.h> 45#include <linux/mtd/mtd.h>
diff --git a/arch/arm/mach-s3c2440/mach-at2440evb.c b/arch/arm/mach-s3c2440/mach-at2440evb.c
index f5e3c7f27639..f0f0cc6afcf4 100644
--- a/arch/arm/mach-s3c2440/mach-at2440evb.c
+++ b/arch/arm/mach-s3c2440/mach-at2440evb.c
@@ -27,14 +27,14 @@
27#include <asm/mach/map.h> 27#include <asm/mach/map.h>
28#include <asm/mach/irq.h> 28#include <asm/mach/irq.h>
29 29
30#include <asm/hardware.h> 30#include <mach/hardware.h>
31#include <asm/irq.h> 31#include <asm/irq.h>
32#include <asm/mach-types.h> 32#include <asm/mach-types.h>
33 33
34#include <asm/plat-s3c/regs-serial.h> 34#include <asm/plat-s3c/regs-serial.h>
35#include <asm/arch/regs-gpio.h> 35#include <mach/regs-gpio.h>
36#include <asm/arch/regs-mem.h> 36#include <mach/regs-mem.h>
37#include <asm/arch/regs-lcd.h> 37#include <mach/regs-lcd.h>
38#include <asm/plat-s3c/nand.h> 38#include <asm/plat-s3c/nand.h>
39 39
40#include <linux/mtd/mtd.h> 40#include <linux/mtd/mtd.h>
diff --git a/arch/arm/mach-s3c2440/mach-nexcoder.c b/arch/arm/mach-s3c2440/mach-nexcoder.c
index afe0d7b7e389..1a5e7027b41b 100644
--- a/arch/arm/mach-s3c2440/mach-nexcoder.c
+++ b/arch/arm/mach-s3c2440/mach-nexcoder.c
@@ -29,13 +29,13 @@
29#include <asm/mach/irq.h> 29#include <asm/mach/irq.h>
30 30
31#include <asm/setup.h> 31#include <asm/setup.h>
32#include <asm/hardware.h> 32#include <mach/hardware.h>
33#include <asm/io.h> 33#include <asm/io.h>
34#include <asm/irq.h> 34#include <asm/irq.h>
35#include <asm/mach-types.h> 35#include <asm/mach-types.h>
36 36
37//#include <asm/debug-ll.h> 37//#include <asm/debug-ll.h>
38#include <asm/arch/regs-gpio.h> 38#include <mach/regs-gpio.h>
39#include <asm/plat-s3c/regs-serial.h> 39#include <asm/plat-s3c/regs-serial.h>
40 40
41#include <asm/plat-s3c24xx/s3c2410.h> 41#include <asm/plat-s3c24xx/s3c2410.h>
diff --git a/arch/arm/mach-s3c2440/mach-osiris.c b/arch/arm/mach-s3c2440/mach-osiris.c
index af996b0e91e8..d2ee0cd148c6 100644
--- a/arch/arm/mach-s3c2440/mach-osiris.c
+++ b/arch/arm/mach-s3c2440/mach-osiris.c
@@ -25,18 +25,18 @@
25#include <asm/mach/map.h> 25#include <asm/mach/map.h>
26#include <asm/mach/irq.h> 26#include <asm/mach/irq.h>
27 27
28#include <asm/arch/osiris-map.h> 28#include <mach/osiris-map.h>
29#include <asm/arch/osiris-cpld.h> 29#include <mach/osiris-cpld.h>
30 30
31#include <asm/hardware.h> 31#include <mach/hardware.h>
32#include <asm/io.h> 32#include <asm/io.h>
33#include <asm/irq.h> 33#include <asm/irq.h>
34#include <asm/mach-types.h> 34#include <asm/mach-types.h>
35 35
36#include <asm/plat-s3c/regs-serial.h> 36#include <asm/plat-s3c/regs-serial.h>
37#include <asm/arch/regs-gpio.h> 37#include <mach/regs-gpio.h>
38#include <asm/arch/regs-mem.h> 38#include <mach/regs-mem.h>
39#include <asm/arch/regs-lcd.h> 39#include <mach/regs-lcd.h>
40#include <asm/plat-s3c/nand.h> 40#include <asm/plat-s3c/nand.h>
41 41
42#include <linux/mtd/mtd.h> 42#include <linux/mtd/mtd.h>
diff --git a/arch/arm/mach-s3c2440/mach-rx3715.c b/arch/arm/mach-s3c2440/mach-rx3715.c
index bac40c4878a5..e0b07e6a0a18 100644
--- a/arch/arm/mach-s3c2440/mach-rx3715.c
+++ b/arch/arm/mach-s3c2440/mach-rx3715.c
@@ -33,18 +33,18 @@
33#include <asm/mach/map.h> 33#include <asm/mach/map.h>
34#include <asm/mach/irq.h> 34#include <asm/mach/irq.h>
35 35
36#include <asm/hardware.h> 36#include <mach/hardware.h>
37#include <asm/io.h> 37#include <asm/io.h>
38#include <asm/irq.h> 38#include <asm/irq.h>
39#include <asm/mach-types.h> 39#include <asm/mach-types.h>
40 40
41#include <asm/plat-s3c/regs-serial.h> 41#include <asm/plat-s3c/regs-serial.h>
42#include <asm/arch/regs-gpio.h> 42#include <mach/regs-gpio.h>
43#include <asm/arch/regs-lcd.h> 43#include <mach/regs-lcd.h>
44 44
45#include <asm/arch/h1940.h> 45#include <mach/h1940.h>
46#include <asm/plat-s3c/nand.h> 46#include <asm/plat-s3c/nand.h>
47#include <asm/arch/fb.h> 47#include <mach/fb.h>
48 48
49#include <asm/plat-s3c24xx/clock.h> 49#include <asm/plat-s3c24xx/clock.h>
50#include <asm/plat-s3c24xx/devs.h> 50#include <asm/plat-s3c24xx/devs.h>
diff --git a/arch/arm/mach-s3c2440/mach-smdk2440.c b/arch/arm/mach-s3c2440/mach-smdk2440.c
index 4552828bf800..327c8f371984 100644
--- a/arch/arm/mach-s3c2440/mach-smdk2440.c
+++ b/arch/arm/mach-s3c2440/mach-smdk2440.c
@@ -26,17 +26,17 @@
26#include <asm/mach/map.h> 26#include <asm/mach/map.h>
27#include <asm/mach/irq.h> 27#include <asm/mach/irq.h>
28 28
29#include <asm/hardware.h> 29#include <mach/hardware.h>
30#include <asm/io.h> 30#include <asm/io.h>
31#include <asm/irq.h> 31#include <asm/irq.h>
32#include <asm/mach-types.h> 32#include <asm/mach-types.h>
33 33
34#include <asm/plat-s3c/regs-serial.h> 34#include <asm/plat-s3c/regs-serial.h>
35#include <asm/arch/regs-gpio.h> 35#include <mach/regs-gpio.h>
36#include <asm/arch/regs-lcd.h> 36#include <mach/regs-lcd.h>
37 37
38#include <asm/arch/idle.h> 38#include <mach/idle.h>
39#include <asm/arch/fb.h> 39#include <mach/fb.h>
40 40
41#include <asm/plat-s3c24xx/s3c2410.h> 41#include <asm/plat-s3c24xx/s3c2410.h>
42#include <asm/plat-s3c24xx/s3c2440.h> 42#include <asm/plat-s3c24xx/s3c2440.h>
diff --git a/arch/arm/mach-s3c2440/s3c2440.c b/arch/arm/mach-s3c2440/s3c2440.c
index 90e1da61fbc3..d6b9a92d284e 100644
--- a/arch/arm/mach-s3c2440/s3c2440.c
+++ b/arch/arm/mach-s3c2440/s3c2440.c
@@ -25,7 +25,7 @@
25#include <asm/mach/map.h> 25#include <asm/mach/map.h>
26#include <asm/mach/irq.h> 26#include <asm/mach/irq.h>
27 27
28#include <asm/hardware.h> 28#include <mach/hardware.h>
29#include <asm/io.h> 29#include <asm/io.h>
30#include <asm/irq.h> 30#include <asm/irq.h>
31 31
diff --git a/arch/arm/mach-s3c2442/clock.c b/arch/arm/mach-s3c2442/clock.c
index 2d030d439fe9..569b5c3d334a 100644
--- a/arch/arm/mach-s3c2442/clock.c
+++ b/arch/arm/mach-s3c2442/clock.c
@@ -34,12 +34,12 @@
34#include <linux/mutex.h> 34#include <linux/mutex.h>
35#include <linux/clk.h> 35#include <linux/clk.h>
36 36
37#include <asm/hardware.h> 37#include <mach/hardware.h>
38#include <asm/atomic.h> 38#include <asm/atomic.h>
39#include <asm/irq.h> 39#include <asm/irq.h>
40#include <asm/io.h> 40#include <asm/io.h>
41 41
42#include <asm/arch/regs-clock.h> 42#include <mach/regs-clock.h>
43 43
44#include <asm/plat-s3c24xx/clock.h> 44#include <asm/plat-s3c24xx/clock.h>
45#include <asm/plat-s3c24xx/cpu.h> 45#include <asm/plat-s3c24xx/cpu.h>
diff --git a/arch/arm/mach-s3c2443/clock.c b/arch/arm/mach-s3c2443/clock.c
index 17f064fabdaf..6a8d7cced4a2 100644
--- a/arch/arm/mach-s3c2443/clock.c
+++ b/arch/arm/mach-s3c2443/clock.c
@@ -34,10 +34,10 @@
34 34
35#include <asm/mach/map.h> 35#include <asm/mach/map.h>
36 36
37#include <asm/hardware.h> 37#include <mach/hardware.h>
38#include <asm/io.h> 38#include <asm/io.h>
39 39
40#include <asm/arch/regs-s3c2443-clock.h> 40#include <mach/regs-s3c2443-clock.h>
41 41
42#include <asm/plat-s3c24xx/s3c2443.h> 42#include <asm/plat-s3c24xx/s3c2443.h>
43#include <asm/plat-s3c24xx/clock.h> 43#include <asm/plat-s3c24xx/clock.h>
diff --git a/arch/arm/mach-s3c2443/dma.c b/arch/arm/mach-s3c2443/dma.c
index f6c006d4297b..c1ff03aebfda 100644
--- a/arch/arm/mach-s3c2443/dma.c
+++ b/arch/arm/mach-s3c2443/dma.c
@@ -18,18 +18,18 @@
18#include <linux/serial_core.h> 18#include <linux/serial_core.h>
19 19
20#include <asm/dma.h> 20#include <asm/dma.h>
21#include <asm/arch/dma.h> 21#include <mach/dma.h>
22#include <asm/io.h> 22#include <asm/io.h>
23 23
24#include <asm/plat-s3c24xx/dma.h> 24#include <asm/plat-s3c24xx/dma.h>
25#include <asm/plat-s3c24xx/cpu.h> 25#include <asm/plat-s3c24xx/cpu.h>
26 26
27#include <asm/plat-s3c/regs-serial.h> 27#include <asm/plat-s3c/regs-serial.h>
28#include <asm/arch/regs-gpio.h> 28#include <mach/regs-gpio.h>
29#include <asm/plat-s3c/regs-ac97.h> 29#include <asm/plat-s3c/regs-ac97.h>
30#include <asm/arch/regs-mem.h> 30#include <mach/regs-mem.h>
31#include <asm/arch/regs-lcd.h> 31#include <mach/regs-lcd.h>
32#include <asm/arch/regs-sdi.h> 32#include <mach/regs-sdi.h>
33#include <asm/plat-s3c24xx/regs-iis.h> 33#include <asm/plat-s3c24xx/regs-iis.h>
34#include <asm/plat-s3c24xx/regs-spi.h> 34#include <asm/plat-s3c24xx/regs-spi.h>
35 35
diff --git a/arch/arm/mach-s3c2443/irq.c b/arch/arm/mach-s3c2443/irq.c
index f9ad498a6fc0..9674de7223fd 100644
--- a/arch/arm/mach-s3c2443/irq.c
+++ b/arch/arm/mach-s3c2443/irq.c
@@ -25,14 +25,14 @@
25#include <linux/ioport.h> 25#include <linux/ioport.h>
26#include <linux/sysdev.h> 26#include <linux/sysdev.h>
27 27
28#include <asm/hardware.h> 28#include <mach/hardware.h>
29#include <asm/irq.h> 29#include <asm/irq.h>
30#include <asm/io.h> 30#include <asm/io.h>
31 31
32#include <asm/mach/irq.h> 32#include <asm/mach/irq.h>
33 33
34#include <asm/arch/regs-irq.h> 34#include <mach/regs-irq.h>
35#include <asm/arch/regs-gpio.h> 35#include <mach/regs-gpio.h>
36 36
37#include <asm/plat-s3c24xx/cpu.h> 37#include <asm/plat-s3c24xx/cpu.h>
38#include <asm/plat-s3c24xx/pm.h> 38#include <asm/plat-s3c24xx/pm.h>
diff --git a/arch/arm/mach-s3c2443/mach-smdk2443.c b/arch/arm/mach-s3c2443/mach-smdk2443.c
index 8cd93130ef36..e3c0d587bd10 100644
--- a/arch/arm/mach-s3c2443/mach-smdk2443.c
+++ b/arch/arm/mach-s3c2443/mach-smdk2443.c
@@ -26,17 +26,17 @@
26#include <asm/mach/map.h> 26#include <asm/mach/map.h>
27#include <asm/mach/irq.h> 27#include <asm/mach/irq.h>
28 28
29#include <asm/hardware.h> 29#include <mach/hardware.h>
30#include <asm/io.h> 30#include <asm/io.h>
31#include <asm/irq.h> 31#include <asm/irq.h>
32#include <asm/mach-types.h> 32#include <asm/mach-types.h>
33 33
34#include <asm/plat-s3c/regs-serial.h> 34#include <asm/plat-s3c/regs-serial.h>
35#include <asm/arch/regs-gpio.h> 35#include <mach/regs-gpio.h>
36#include <asm/arch/regs-lcd.h> 36#include <mach/regs-lcd.h>
37 37
38#include <asm/arch/idle.h> 38#include <mach/idle.h>
39#include <asm/arch/fb.h> 39#include <mach/fb.h>
40 40
41#include <asm/plat-s3c24xx/s3c2410.h> 41#include <asm/plat-s3c24xx/s3c2410.h>
42#include <asm/plat-s3c24xx/s3c2440.h> 42#include <asm/plat-s3c24xx/s3c2440.h>
diff --git a/arch/arm/mach-s3c2443/s3c2443.c b/arch/arm/mach-s3c2443/s3c2443.c
index 9ce490560af9..37793f924b5e 100644
--- a/arch/arm/mach-s3c2443/s3c2443.c
+++ b/arch/arm/mach-s3c2443/s3c2443.c
@@ -25,12 +25,12 @@
25#include <asm/mach/map.h> 25#include <asm/mach/map.h>
26#include <asm/mach/irq.h> 26#include <asm/mach/irq.h>
27 27
28#include <asm/hardware.h> 28#include <mach/hardware.h>
29#include <asm/io.h> 29#include <asm/io.h>
30#include <asm/irq.h> 30#include <asm/irq.h>
31 31
32#include <asm/arch/regs-s3c2443-clock.h> 32#include <mach/regs-s3c2443-clock.h>
33#include <asm/arch/reset.h> 33#include <mach/reset.h>
34 34
35#include <asm/plat-s3c24xx/s3c2443.h> 35#include <asm/plat-s3c24xx/s3c2443.h>
36#include <asm/plat-s3c24xx/devs.h> 36#include <asm/plat-s3c24xx/devs.h>
diff --git a/arch/arm/mach-sa1100/Makefile b/arch/arm/mach-sa1100/Makefile
index 8e0244631d65..8a5546e6d547 100644
--- a/arch/arm/mach-sa1100/Makefile
+++ b/arch/arm/mach-sa1100/Makefile
@@ -46,9 +46,6 @@ led-$(CONFIG_SA1100_SIMPAD) += leds-simpad.o
46# LEDs support 46# LEDs support
47obj-$(CONFIG_LEDS) += $(led-y) 47obj-$(CONFIG_LEDS) += $(led-y)
48 48
49# SA1110 USB client support
50#obj-$(CONFIG_SA1100_USB) += usb/
51
52# Miscelaneous functions 49# Miscelaneous functions
53obj-$(CONFIG_PM) += pm.o sleep.o 50obj-$(CONFIG_PM) += pm.o sleep.o
54obj-$(CONFIG_SA1100_SSP) += ssp.o 51obj-$(CONFIG_SA1100_SSP) += ssp.o
diff --git a/arch/arm/mach-sa1100/assabet.c b/arch/arm/mach-sa1100/assabet.c
index be06d668a3c9..55e64477a876 100644
--- a/arch/arm/mach-sa1100/assabet.c
+++ b/arch/arm/mach-sa1100/assabet.c
@@ -20,7 +20,7 @@
20#include <linux/delay.h> 20#include <linux/delay.h>
21#include <linux/mm.h> 21#include <linux/mm.h>
22 22
23#include <asm/hardware.h> 23#include <mach/hardware.h>
24#include <asm/mach-types.h> 24#include <asm/mach-types.h>
25#include <asm/irq.h> 25#include <asm/irq.h>
26#include <asm/setup.h> 26#include <asm/setup.h>
@@ -34,8 +34,8 @@
34#include <asm/mach/irda.h> 34#include <asm/mach/irda.h>
35#include <asm/mach/map.h> 35#include <asm/mach/map.h>
36#include <asm/mach/serial_sa1100.h> 36#include <asm/mach/serial_sa1100.h>
37#include <asm/arch/assabet.h> 37#include <mach/assabet.h>
38#include <asm/arch/mcp.h> 38#include <mach/mcp.h>
39 39
40#include "generic.h" 40#include "generic.h"
41 41
diff --git a/arch/arm/mach-sa1100/badge4.c b/arch/arm/mach-sa1100/badge4.c
index 842d9e6dc5ff..3efefbdd2527 100644
--- a/arch/arm/mach-sa1100/badge4.c
+++ b/arch/arm/mach-sa1100/badge4.c
@@ -23,10 +23,10 @@
23#include <linux/mtd/partitions.h> 23#include <linux/mtd/partitions.h>
24#include <linux/errno.h> 24#include <linux/errno.h>
25 25
26#include <asm/hardware.h> 26#include <mach/hardware.h>
27#include <asm/mach-types.h> 27#include <asm/mach-types.h>
28#include <asm/setup.h> 28#include <asm/setup.h>
29#include <asm/arch/irqs.h> 29#include <mach/irqs.h>
30 30
31#include <asm/mach/arch.h> 31#include <asm/mach/arch.h>
32#include <asm/mach/flash.h> 32#include <asm/mach/flash.h>
@@ -34,7 +34,7 @@
34#include <asm/hardware/sa1111.h> 34#include <asm/hardware/sa1111.h>
35#include <asm/mach/serial_sa1100.h> 35#include <asm/mach/serial_sa1100.h>
36 36
37#include <asm/arch/badge4.h> 37#include <mach/badge4.h>
38 38
39#include "generic.h" 39#include "generic.h"
40 40
diff --git a/arch/arm/mach-sa1100/cerf.c b/arch/arm/mach-sa1100/cerf.c
index 56d3ee01baae..fd3ad9cfc912 100644
--- a/arch/arm/mach-sa1100/cerf.c
+++ b/arch/arm/mach-sa1100/cerf.c
@@ -19,7 +19,7 @@
19#include <linux/mtd/partitions.h> 19#include <linux/mtd/partitions.h>
20 20
21#include <asm/irq.h> 21#include <asm/irq.h>
22#include <asm/hardware.h> 22#include <mach/hardware.h>
23#include <asm/setup.h> 23#include <asm/setup.h>
24 24
25#include <asm/mach-types.h> 25#include <asm/mach-types.h>
@@ -28,8 +28,8 @@
28#include <asm/mach/map.h> 28#include <asm/mach/map.h>
29#include <asm/mach/serial_sa1100.h> 29#include <asm/mach/serial_sa1100.h>
30 30
31#include <asm/arch/cerf.h> 31#include <mach/cerf.h>
32#include <asm/arch/mcp.h> 32#include <mach/mcp.h>
33#include "generic.h" 33#include "generic.h"
34 34
35static struct resource cerfuart2_resources[] = { 35static struct resource cerfuart2_resources[] = {
diff --git a/arch/arm/mach-sa1100/clock.c b/arch/arm/mach-sa1100/clock.c
index b5809c51d13f..43c30f84abf2 100644
--- a/arch/arm/mach-sa1100/clock.c
+++ b/arch/arm/mach-sa1100/clock.c
@@ -11,7 +11,7 @@
11#include <linux/spinlock.h> 11#include <linux/spinlock.h>
12#include <linux/mutex.h> 12#include <linux/mutex.h>
13 13
14#include <asm/hardware.h> 14#include <mach/hardware.h>
15 15
16/* 16/*
17 * Very simple clock implementation - we only have one clock to 17 * Very simple clock implementation - we only have one clock to
diff --git a/arch/arm/mach-sa1100/collie.c b/arch/arm/mach-sa1100/collie.c
index 2f772a3965c4..fe289997cfaf 100644
--- a/arch/arm/mach-sa1100/collie.c
+++ b/arch/arm/mach-sa1100/collie.c
@@ -26,11 +26,11 @@
26#include <linux/mtd/partitions.h> 26#include <linux/mtd/partitions.h>
27#include <linux/timer.h> 27#include <linux/timer.h>
28 28
29#include <asm/hardware.h> 29#include <mach/hardware.h>
30#include <asm/mach-types.h> 30#include <asm/mach-types.h>
31#include <asm/irq.h> 31#include <asm/irq.h>
32#include <asm/setup.h> 32#include <asm/setup.h>
33#include <asm/arch/collie.h> 33#include <mach/collie.h>
34 34
35#include <asm/mach/arch.h> 35#include <asm/mach/arch.h>
36#include <asm/mach/flash.h> 36#include <asm/mach/flash.h>
@@ -40,7 +40,7 @@
40#include <asm/hardware/scoop.h> 40#include <asm/hardware/scoop.h>
41#include <asm/mach/sharpsl_param.h> 41#include <asm/mach/sharpsl_param.h>
42#include <asm/hardware/locomo.h> 42#include <asm/hardware/locomo.h>
43#include <asm/arch/mcp.h> 43#include <mach/mcp.h>
44 44
45#include "generic.h" 45#include "generic.h"
46 46
diff --git a/arch/arm/mach-sa1100/collie_pm.c b/arch/arm/mach-sa1100/collie_pm.c
index 94620be7bfac..b1161fc80602 100644
--- a/arch/arm/mach-sa1100/collie_pm.c
+++ b/arch/arm/mach-sa1100/collie_pm.c
@@ -24,11 +24,10 @@
24#include <linux/platform_device.h> 24#include <linux/platform_device.h>
25 25
26#include <asm/irq.h> 26#include <asm/irq.h>
27#include <asm/mach-types.h> 27#include <mach/hardware.h>
28#include <asm/hardware.h>
29#include <asm/hardware/scoop.h> 28#include <asm/hardware/scoop.h>
30#include <asm/dma.h> 29#include <asm/dma.h>
31#include <asm/arch/collie.h> 30#include <mach/collie.h>
32#include <asm/mach/sharpsl_param.h> 31#include <asm/mach/sharpsl_param.h>
33#include <asm/hardware/sharpsl_pm.h> 32#include <asm/hardware/sharpsl_pm.h>
34 33
diff --git a/arch/arm/mach-sa1100/cpu-sa1100.c b/arch/arm/mach-sa1100/cpu-sa1100.c
index 343368aa82de..da3a898a6d66 100644
--- a/arch/arm/mach-sa1100/cpu-sa1100.c
+++ b/arch/arm/mach-sa1100/cpu-sa1100.c
@@ -88,7 +88,7 @@
88#include <linux/init.h> 88#include <linux/init.h>
89#include <linux/cpufreq.h> 89#include <linux/cpufreq.h>
90 90
91#include <asm/hardware.h> 91#include <mach/hardware.h>
92 92
93#include "generic.h" 93#include "generic.h"
94 94
diff --git a/arch/arm/mach-sa1100/cpu-sa1110.c b/arch/arm/mach-sa1100/cpu-sa1110.c
index 36b47ff5af11..39d38c801736 100644
--- a/arch/arm/mach-sa1100/cpu-sa1110.c
+++ b/arch/arm/mach-sa1100/cpu-sa1110.c
@@ -26,7 +26,7 @@
26#include <linux/delay.h> 26#include <linux/delay.h>
27#include <linux/init.h> 27#include <linux/init.h>
28 28
29#include <asm/hardware.h> 29#include <mach/hardware.h>
30#include <asm/mach-types.h> 30#include <asm/mach-types.h>
31#include <asm/io.h> 31#include <asm/io.h>
32#include <asm/system.h> 32#include <asm/system.h>
diff --git a/arch/arm/mach-sa1100/dma.c b/arch/arm/mach-sa1100/dma.c
index e5080286060e..f990a3e85846 100644
--- a/arch/arm/mach-sa1100/dma.c
+++ b/arch/arm/mach-sa1100/dma.c
@@ -18,7 +18,7 @@
18 18
19#include <asm/system.h> 19#include <asm/system.h>
20#include <asm/irq.h> 20#include <asm/irq.h>
21#include <asm/hardware.h> 21#include <mach/hardware.h>
22#include <asm/dma.h> 22#include <asm/dma.h>
23 23
24 24
@@ -76,7 +76,7 @@ static irqreturn_t dma_irq_handler(int irq, void *dev_id)
76 * address of the hardware registers for that channel as the channel 76 * address of the hardware registers for that channel as the channel
77 * identifier. This identifier is written to the location pointed by 77 * identifier. This identifier is written to the location pointed by
78 * @dma_regs. The list of possible values for @device are listed into 78 * @dma_regs. The list of possible values for @device are listed into
79 * linux/include/asm-arm/arch-sa1100/dma.h as a dma_device_t enum. 79 * arch/arm/mach-sa1100/include/mach/dma.h as a dma_device_t enum.
80 * 80 *
81 * Note that reading from a port and writing to the same port are 81 * Note that reading from a port and writing to the same port are
82 * actually considered as two different streams requiring separate 82 * actually considered as two different streams requiring separate
diff --git a/arch/arm/mach-sa1100/generic.c b/arch/arm/mach-sa1100/generic.c
index 0c2fa1c4fb4c..1362994c78aa 100644
--- a/arch/arm/mach-sa1100/generic.c
+++ b/arch/arm/mach-sa1100/generic.c
@@ -21,7 +21,7 @@
21 21
22#include <asm/div64.h> 22#include <asm/div64.h>
23#include <asm/cnt32_to_63.h> 23#include <asm/cnt32_to_63.h>
24#include <asm/hardware.h> 24#include <mach/hardware.h>
25#include <asm/system.h> 25#include <asm/system.h>
26#include <asm/pgtable.h> 26#include <asm/pgtable.h>
27#include <asm/mach/map.h> 27#include <asm/mach/map.h>
@@ -31,6 +31,9 @@
31 31
32#include "generic.h" 32#include "generic.h"
33 33
34unsigned int reset_status;
35EXPORT_SYMBOL(reset_status);
36
34#define NR_FREQS 16 37#define NR_FREQS 16
35 38
36/* 39/*
diff --git a/arch/arm/mach-sa1100/gpio.c b/arch/arm/mach-sa1100/gpio.c
index 372f1f4f54a1..0d3829a8c2c1 100644
--- a/arch/arm/mach-sa1100/gpio.c
+++ b/arch/arm/mach-sa1100/gpio.c
@@ -12,7 +12,7 @@
12#include <linux/module.h> 12#include <linux/module.h>
13 13
14#include <asm/gpio.h> 14#include <asm/gpio.h>
15#include <asm/hardware.h> 15#include <mach/hardware.h>
16#include "generic.h" 16#include "generic.h"
17 17
18static int sa1100_gpio_get(struct gpio_chip *chip, unsigned offset) 18static int sa1100_gpio_get(struct gpio_chip *chip, unsigned offset)
diff --git a/arch/arm/mach-sa1100/h3600.c b/arch/arm/mach-sa1100/h3600.c
index b34ff42bbd75..af25a78d705d 100644
--- a/arch/arm/mach-sa1100/h3600.c
+++ b/arch/arm/mach-sa1100/h3600.c
@@ -30,7 +30,7 @@
30#include <linux/serial_core.h> 30#include <linux/serial_core.h>
31 31
32#include <asm/irq.h> 32#include <asm/irq.h>
33#include <asm/hardware.h> 33#include <mach/hardware.h>
34#include <asm/mach-types.h> 34#include <asm/mach-types.h>
35#include <asm/setup.h> 35#include <asm/setup.h>
36 36
@@ -41,14 +41,14 @@
41#include <asm/mach/map.h> 41#include <asm/mach/map.h>
42#include <asm/mach/serial_sa1100.h> 42#include <asm/mach/serial_sa1100.h>
43 43
44#include <asm/arch/h3600.h> 44#include <mach/h3600.h>
45 45
46#if defined (CONFIG_SA1100_H3600) || defined (CONFIG_SA1100_H3100) 46#if defined (CONFIG_SA1100_H3600) || defined (CONFIG_SA1100_H3100)
47#include <asm/arch/h3600_gpio.h> 47#include <mach/h3600_gpio.h>
48#endif 48#endif
49 49
50#ifdef CONFIG_SA1100_H3800 50#ifdef CONFIG_SA1100_H3800
51#include <asm/arch/h3600_asic.h> 51#include <mach/h3600_asic.h>
52#endif 52#endif
53 53
54#include "generic.h" 54#include "generic.h"
@@ -681,7 +681,7 @@ static struct ipaq_model_ops h3800_model_ops __initdata = {
681 681
682#define MAX_ASIC_ISR_LOOPS 20 682#define MAX_ASIC_ISR_LOOPS 20
683 683
684/* The order of these is important - see #include <asm/arch/irqs.h> */ 684/* The order of these is important - see #include <mach/irqs.h> */
685static u32 kpio_irq_mask[] = { 685static u32 kpio_irq_mask[] = {
686 KPIO_KEY_ALL, 686 KPIO_KEY_ALL,
687 KPIO_SPI_INT, 687 KPIO_SPI_INT,
diff --git a/arch/arm/mach-sa1100/hackkit.c b/arch/arm/mach-sa1100/hackkit.c
index 046b213efd5b..e7056c0b562c 100644
--- a/arch/arm/mach-sa1100/hackkit.c
+++ b/arch/arm/mach-sa1100/hackkit.c
@@ -22,7 +22,7 @@
22#include <linux/mtd/mtd.h> 22#include <linux/mtd/mtd.h>
23#include <linux/mtd/partitions.h> 23#include <linux/mtd/partitions.h>
24 24
25#include <asm/hardware.h> 25#include <mach/hardware.h>
26#include <asm/mach-types.h> 26#include <asm/mach-types.h>
27#include <asm/setup.h> 27#include <asm/setup.h>
28#include <asm/page.h> 28#include <asm/page.h>
diff --git a/include/asm-arm/arch-sa1100/SA-1100.h b/arch/arm/mach-sa1100/include/mach/SA-1100.h
index 62aaf04a3906..62aaf04a3906 100644
--- a/include/asm-arm/arch-sa1100/SA-1100.h
+++ b/arch/arm/mach-sa1100/include/mach/SA-1100.h
diff --git a/arch/arm/mach-sa1100/include/mach/SA-1101.h b/arch/arm/mach-sa1100/include/mach/SA-1101.h
new file mode 100644
index 000000000000..5d2ad7db991c
--- /dev/null
+++ b/arch/arm/mach-sa1100/include/mach/SA-1101.h
@@ -0,0 +1,925 @@
1/*
2 * SA-1101.h
3 *
4 * Copyright (c) Peter Danielsson 1999
5 *
6 * Definition of constants related to the sa1101
7 * support chip for the sa1100
8 *
9 */
10
11
12/* Be sure that virtual mapping is defined right */
13#ifndef __ASM_ARCH_HARDWARE_H
14#error You must include hardware.h not SA-1101.h
15#endif
16
17#ifndef SA1101_BASE
18#error You must define SA-1101 physical base address
19#endif
20
21#ifndef LANGUAGE
22# ifdef __ASSEMBLY__
23# define LANGUAGE Assembly
24# else
25# define LANGUAGE C
26# endif
27#endif
28
29/*
30 * We have mapped the sa1101 depending on the value of SA1101_BASE.
31 * It then appears from 0xf4000000.
32 */
33
34#define SA1101_p2v( x ) ((x) - SA1101_BASE + 0xf4000000)
35#define SA1101_v2p( x ) ((x) - 0xf4000000 + SA1101_BASE)
36
37#ifndef SA1101_p2v
38#define SA1101_p2v(PhAdd) (PhAdd)
39#endif
40
41#include <mach/bitfield.h>
42
43#define C 0
44#define Assembly 1
45
46
47/*
48 * Memory map
49 */
50
51#define __SHMEM_CONTROL0 0x00000000
52#define __SYSTEM_CONTROL1 0x00000400
53#define __ARBITER 0x00020000
54#define __SYSTEM_CONTROL2 0x00040000
55#define __SYSTEM_CONTROL3 0x00060000
56#define __PARALLEL_PORT 0x00080000
57#define __VIDMEM_CONTROL 0x00100000
58#define __UPDATE_FIFO 0x00120000
59#define __SHMEM_CONTROL1 0x00140000
60#define __INTERRUPT_CONTROL 0x00160000
61#define __USB_CONTROL 0x00180000
62#define __TRACK_INTERFACE 0x001a0000
63#define __MOUSE_INTERFACE 0x001b0000
64#define __KEYPAD_INTERFACE 0x001c0000
65#define __PCMCIA_INTERFACE 0x001e0000
66#define __VGA_CONTROL 0x00200000
67#define __GPIO_INTERFACE 0x00300000
68
69/*
70 * Macro that calculates real address for registers in the SA-1101
71 */
72
73#define _SA1101( x ) ((x) + SA1101_BASE)
74
75/*
76 * Interface and shared memory controller registers
77 *
78 * Registers
79 * SKCR SA-1101 control register (read/write)
80 * SMCR Shared Memory Controller Register
81 * SNPR Snoop Register
82 */
83
84#define _SKCR _SA1101( 0x00000000 ) /* SA-1101 Control Reg. */
85#define _SMCR _SA1101( 0x00140000 ) /* Shared Mem. Control Reg. */
86#define _SNPR _SA1101( 0x00140400 ) /* Snoop Reg. */
87
88#if LANGUAGE == C
89#define SKCR (*((volatile Word *) SA1101_p2v (_SKCR)))
90#define SMCR (*((volatile Word *) SA1101_p2v (_SMCR)))
91#define SNPR (*((volatile Word *) SA1101_p2v (_SNPR)))
92
93#define SKCR_PLLEn 0x0001 /* Enable On-Chip PLL */
94#define SKCR_BCLKEn 0x0002 /* Enables BCLK */
95#define SKCR_Sleep 0x0004 /* Sleep Mode */
96#define SKCR_IRefEn 0x0008 /* DAC Iref input enable */
97#define SKCR_VCOON 0x0010 /* VCO bias */
98#define SKCR_ScanTestEn 0x0020 /* Enables scan test */
99#define SKCR_ClockTestEn 0x0040 /* Enables clock test */
100
101#define SMCR_DCAC Fld(2,0) /* Number of column address bits */
102#define SMCR_DRAC Fld(2,2) /* Number of row address bits */
103#define SMCR_ArbiterBias 0x0008 /* favor video or USB */
104#define SMCR_TopVidMem Fld(4,5) /* Top 4 bits of vidmem addr. */
105
106#define SMCR_ColAdrBits( x ) /* col. addr bits 8..11 */ \
107 (( (x) - 8 ) << FShft (SMCR_DCAC))
108#define SMCR_RowAdrBits( x ) /* row addr bits 9..12 */\
109 (( (x) - 9 ) << FShft (SMCR_DRAC))
110
111#define SNPR_VFBstart Fld(12,0) /* Video frame buffer addr */
112#define SNPR_VFBsize Fld(11,12) /* Video frame buffer size */
113#define SNPR_WholeBank (1 << 23) /* Whole bank bit */
114#define SNPR_BankSelect Fld(2,27) /* Bank select */
115#define SNPR_SnoopEn (1 << 31) /* Enable snoop operation */
116
117#define SNPR_Set_VFBsize( x ) /* set frame buffer size (in kb) */ \
118 ( (x) << FShft (SNPR_VFBsize))
119#define SNPR_Select_Bank(x) /* select bank 0 or 1 */ \
120 (( (x) + 1 ) << FShft (SNPR_BankSelect ))
121
122#endif /* LANGUAGE == C */
123
124/*
125 * Video Memory Controller
126 *
127 * Registers
128 * VMCCR Configuration register
129 * VMCAR VMC address register
130 * VMCDR VMC data register
131 *
132 */
133
134#define _VMCCR _SA1101( 0x00100000 ) /* Configuration register */
135#define _VMCAR _SA1101( 0x00101000 ) /* VMC address register */
136#define _VMCDR _SA1101( 0x00101400 ) /* VMC data register */
137
138#if LANGUAGE == C
139#define VMCCR (*((volatile Word *) SA1101_p2v (_VMCCR)))
140#define VMCAR (*((volatile Word *) SA1101_p2v (_VMCAR)))
141#define VMCDR (*((volatile Word *) SA1101_p2v (_VMCDR)))
142
143#define VMCCR_RefreshEn 0x0000 /* Enable memory refresh */
144#define VMCCR_Config 0x0001 /* DRAM size */
145#define VMCCR_RefPeriod Fld(2,3) /* Refresh period */
146#define VMCCR_StaleDataWait Fld(4,5) /* Stale FIFO data timeout counter */
147#define VMCCR_SleepState (1<<9) /* State of interface pins in sleep*/
148#define VMCCR_RefTest (1<<10) /* refresh test */
149#define VMCCR_RefLow Fld(6,11) /* refresh low counter */
150#define VMCCR_RefHigh Fld(7,17) /* refresh high counter */
151#define VMCCR_SDTCTest Fld(7,24) /* stale data timeout counter */
152#define VMCCR_ForceSelfRef (1<<31) /* Force self refresh */
153
154#endif LANGUAGE == C
155
156
157/* Update FIFO
158 *
159 * Registers
160 * UFCR Update FIFO Control Register
161 * UFSR Update FIFO Status Register
162 * UFLVLR update FIFO level register
163 * UFDR update FIFO data register
164 */
165
166#define _UFCR _SA1101(0x00120000) /* Update FIFO Control Reg. */
167#define _UFSR _SA1101(0x00120400) /* Update FIFO Status Reg. */
168#define _UFLVLR _SA1101(0x00120800) /* Update FIFO level reg. */
169#define _UFDR _SA1101(0x00120c00) /* Update FIFO data reg. */
170
171#if LANGUAGE == C
172
173#define UFCR (*((volatile Word *) SA1101_p2v (_UFCR)))
174#define UFSR (*((volatile Word *) SA1101_p2v (_UFSR)))
175#define UFLVLR (*((volatile Word *) SA1101_p2v (_UFLVLR)))
176#define UFDR (*((volatile Word *) SA1101_p2v (_UFDR)))
177
178
179#define UFCR_FifoThreshhold Fld(7,0) /* Level for FifoGTn flag */
180
181#define UFSR_FifoGTnFlag 0x01 /* FifoGTn flag */#define UFSR_FifoEmpty 0x80 /* FIFO is empty */
182
183#endif /* LANGUAGE == C */
184
185/* System Controller
186 *
187 * Registers
188 * SKPCR Power Control Register
189 * SKCDR Clock Divider Register
190 * DACDR1 DAC1 Data register
191 * DACDR2 DAC2 Data register
192 */
193
194#define _SKPCR _SA1101(0x00000400)
195#define _SKCDR _SA1101(0x00040000)
196#define _DACDR1 _SA1101(0x00060000)
197#define _DACDR2 _SA1101(0x00060400)
198
199#if LANGUAGE == C
200#define SKPCR (*((volatile Word *) SA1101_p2v (_SKPCR)))
201#define SKCDR (*((volatile Word *) SA1101_p2v (_SKCDR)))
202#define DACDR1 (*((volatile Word *) SA1101_p2v (_DACDR1)))
203#define DACDR2 (*((volatile Word *) SA1101_p2v (_DACDR2)))
204
205#define SKPCR_UCLKEn 0x01 /* USB Enable */
206#define SKPCR_PCLKEn 0x02 /* PS/2 Enable */
207#define SKPCR_ICLKEn 0x04 /* Interrupt Controller Enable */
208#define SKPCR_VCLKEn 0x08 /* Video Controller Enable */
209#define SKPCR_PICLKEn 0x10 /* parallel port Enable */
210#define SKPCR_DCLKEn 0x20 /* DACs Enable */
211#define SKPCR_nKPADEn 0x40 /* Multiplexer */
212
213#define SKCDR_PLLMul Fld(7,0) /* PLL Multiplier */
214#define SKCDR_VCLKEn Fld(2,7) /* Video controller clock divider */
215#define SKDCR_BCLKEn (1<<9) /* BCLK Divider */
216#define SKDCR_UTESTCLKEn (1<<10) /* Route USB clock during test mode */
217#define SKDCR_DivRValue Fld(6,11) /* Input clock divider for PLL */
218#define SKDCR_DivNValue Fld(5,17) /* Output clock divider for PLL */
219#define SKDCR_PLLRSH Fld(3,22) /* PLL bandwidth control */
220#define SKDCR_ChargePump (1<<25) /* Charge pump control */
221#define SKDCR_ClkTestMode (1<<26) /* Clock output test mode */
222#define SKDCR_ClkTestEn (1<<27) /* Test clock generator */
223#define SKDCR_ClkJitterCntl Fld(3,28) /* video clock jitter compensation */
224
225#define DACDR_DACCount Fld(8,0) /* Count value */
226#define DACDR1_DACCount DACDR_DACCount
227#define DACDR2_DACCount DACDR_DACCount
228
229#endif /* LANGUAGE == C */
230
231/*
232 * Parallel Port Interface
233 *
234 * Registers
235 * IEEE_Config IEEE mode selection and programmable attributes
236 * IEEE_Control Controls the states of IEEE port control outputs
237 * IEEE_Data Forward transfer data register
238 * IEEE_Addr Forward transfer address register
239 * IEEE_Status Port IO signal status register
240 * IEEE_IntStatus Port interrupts status register
241 * IEEE_FifoLevels Rx and Tx FIFO interrupt generation levels
242 * IEEE_InitTime Forward timeout counter initial value
243 * IEEE_TimerStatus Forward timeout counter current value
244 * IEEE_FifoReset Reset forward transfer FIFO
245 * IEEE_ReloadValue Counter reload value
246 * IEEE_TestControl Control testmode
247 * IEEE_TestDataIn Test data register
248 * IEEE_TestDataInEn Enable test data
249 * IEEE_TestCtrlIn Test control signals
250 * IEEE_TestCtrlInEn Enable test control signals
251 * IEEE_TestDataStat Current data bus value
252 *
253 */
254
255/*
256 * The control registers are defined as offsets from a base address
257 */
258
259#define _IEEE( x ) _SA1101( (x) + __PARALLEL_PORT )
260
261#define _IEEE_Config _IEEE( 0x0000 )
262#define _IEEE_Control _IEEE( 0x0400 )
263#define _IEEE_Data _IEEE( 0x4000 )
264#define _IEEE_Addr _IEEE( 0x0800 )
265#define _IEEE_Status _IEEE( 0x0c00 )
266#define _IEEE_IntStatus _IEEE( 0x1000 )
267#define _IEEE_FifoLevels _IEEE( 0x1400 )
268#define _IEEE_InitTime _IEEE( 0x1800 )
269#define _IEEE_TimerStatus _IEEE( 0x1c00 )
270#define _IEEE_FifoReset _IEEE( 0x2000 )
271#define _IEEE_ReloadValue _IEEE( 0x3c00 )
272#define _IEEE_TestControl _IEEE( 0x2400 )
273#define _IEEE_TestDataIn _IEEE( 0x2800 )
274#define _IEEE_TestDataInEn _IEEE( 0x2c00 )
275#define _IEEE_TestCtrlIn _IEEE( 0x3000 )
276#define _IEEE_TestCtrlInEn _IEEE( 0x3400 )
277#define _IEEE_TestDataStat _IEEE( 0x3800 )
278
279
280#if LANGUAGE == C
281#define IEEE_Config (*((volatile Word *) SA1101_p2v (_IEEE_Config)))
282#define IEEE_Control (*((volatile Word *) SA1101_p2v (_IEEE_Control)))
283#define IEEE_Data (*((volatile Word *) SA1101_p2v (_IEEE_Data)))
284#define IEEE_Addr (*((volatile Word *) SA1101_p2v (_IEEE_Addr)))
285#define IEEE_Status (*((volatile Word *) SA1101_p2v (_IEEE_Status)))
286#define IEEE_IntStatus (*((volatile Word *) SA1101_p2v (_IEEE_IntStatus)))
287#define IEEE_FifoLevels (*((volatile Word *) SA1101_p2v (_IEEE_FifoLevels)))
288#define IEEE_InitTime (*((volatile Word *) SA1101_p2v (_IEEE_InitTime)))
289#define IEEE_TimerStatus (*((volatile Word *) SA1101_p2v (_IEEE_TimerStatus)))
290#define IEEE_FifoReset (*((volatile Word *) SA1101_p2v (_IEEE_FifoReset)))
291#define IEEE_ReloadValue (*((volatile Word *) SA1101_p2v (_IEEE_ReloadValue)))
292#define IEEE_TestControl (*((volatile Word *) SA1101_p2v (_IEEE_TestControl)))
293#define IEEE_TestDataIn (*((volatile Word *) SA1101_p2v (_IEEE_TestDataIn)))
294#define IEEE_TestDataInEn (*((volatile Word *) SA1101_p2v (_IEEE_TestDataInEn)))
295#define IEEE_TestCtrlIn (*((volatile Word *) SA1101_p2v (_IEEE_TestCtrlIn)))
296#define IEEE_TestCtrlInEn (*((volatile Word *) SA1101_p2v (_IEEE_TestCtrlInEn)))
297#define IEEE_TestDataStat (*((volatile Word *) SA1101_p2v (_IEEE_TestDataStat)))
298
299
300#define IEEE_Config_M Fld(3,0) /* Mode select */
301#define IEEE_Config_D 0x04 /* FIFO access enable */
302#define IEEE_Config_B 0x08 /* 9-bit word enable */
303#define IEEE_Config_T 0x10 /* Data transfer enable */
304#define IEEE_Config_A 0x20 /* Data transfer direction */
305#define IEEE_Config_E 0x40 /* Timer enable */
306#define IEEE_Control_A 0x08 /* AutoFd output */
307#define IEEE_Control_E 0x04 /* Selectin output */
308#define IEEE_Control_T 0x02 /* Strobe output */
309#define IEEE_Control_I 0x01 /* Port init output */
310#define IEEE_Data_C (1<<31) /* Byte count */
311#define IEEE_Data_Db Fld(9,16) /* Data byte 2 */
312#define IEEE_Data_Da Fld(9,0) /* Data byte 1 */
313#define IEEE_Addr_A Fld(8,0) /* forward address transfer byte */
314#define IEEE_Status_A 0x0100 /* nAutoFd port output status */
315#define IEEE_Status_E 0x0080 /* nSelectIn port output status */
316#define IEEE_Status_T 0x0040 /* nStrobe port output status */
317#define IEEE_Status_I 0x0020 /* nInit port output status */
318#define IEEE_Status_B 0x0010 /* Busy port inout status */
319#define IEEE_Status_S 0x0008 /* Select port input status */
320#define IEEE_Status_K 0x0004 /* nAck port input status */
321#define IEEE_Status_F 0x0002 /* nFault port input status */
322#define IEEE_Status_R 0x0001 /* pError port input status */
323
324#define IEEE_IntStatus_IntReqDat 0x0100
325#define IEEE_IntStatus_IntReqEmp 0x0080
326#define IEEE_IntStatus_IntReqInt 0x0040
327#define IEEE_IntStatus_IntReqRav 0x0020
328#define IEEE_IntStatus_IntReqTim 0x0010
329#define IEEE_IntStatus_RevAddrComp 0x0008
330#define IEEE_IntStatus_RevDataComp 0x0004
331#define IEEE_IntStatus_FwdAddrComp 0x0002
332#define IEEE_IntStatus_FwdDataComp 0x0001
333#define IEEE_FifoLevels_RevFifoLevel 2
334#define IEEE_FifoLevels_FwdFifoLevel 1
335#define IEEE_InitTime_TimValInit Fld(22,0)
336#define IEEE_TimerStatus_TimValStat Fld(22,0)
337#define IEEE_ReloadValue_Reload Fld(4,0)
338
339#define IEEE_TestControl_RegClk 0x04
340#define IEEE_TestControl_ClockSelect Fld(2,1)
341#define IEEE_TestControl_TimerTestModeEn 0x01
342#define IEEE_TestCtrlIn_PError 0x10
343#define IEEE_TestCtrlIn_nFault 0x08
344#define IEEE_TestCtrlIn_nAck 0x04
345#define IEEE_TestCtrlIn_PSel 0x02
346#define IEEE_TestCtrlIn_Busy 0x01
347
348#endif /* LANGUAGE == C */
349
350/*
351 * VGA Controller
352 *
353 * Registers
354 * VideoControl Video Control Register
355 * VgaTiming0 VGA Timing Register 0
356 * VgaTiming1 VGA Timing Register 1
357 * VgaTiming2 VGA Timing Register 2
358 * VgaTiming3 VGA Timing Register 3
359 * VgaBorder VGA Border Color Register
360 * VgaDBAR VGADMA Base Address Register
361 * VgaDCAR VGADMA Channel Current Address Register
362 * VgaStatus VGA Status Register
363 * VgaInterruptMask VGA Interrupt Mask Register
364 * VgaPalette VGA Palette Registers
365 * DacControl DAC Control Register
366 * VgaTest VGA Controller Test Register
367 */
368
369#define _VGA( x ) _SA1101( ( x ) + __VGA_CONTROL )
370
371#define _VideoControl _VGA( 0x0000 )
372#define _VgaTiming0 _VGA( 0x0400 )
373#define _VgaTiming1 _VGA( 0x0800 )
374#define _VgaTiming2 _VGA( 0x0c00 )
375#define _VgaTiming3 _VGA( 0x1000 )
376#define _VgaBorder _VGA( 0x1400 )
377#define _VgaDBAR _VGA( 0x1800 )
378#define _VgaDCAR _VGA( 0x1c00 )
379#define _VgaStatus _VGA( 0x2000 )
380#define _VgaInterruptMask _VGA( 0x2400 )
381#define _VgaPalette _VGA( 0x40000 )
382#define _DacControl _VGA( 0x3000 )
383#define _VgaTest _VGA( 0x2c00 )
384
385#if (LANGUAGE == C)
386#define VideoControl (*((volatile Word *) SA1101_p2v (_VideoControl)))
387#define VgaTiming0 (*((volatile Word *) SA1101_p2v (_VgaTiming0)))
388#define VgaTiming1 (*((volatile Word *) SA1101_p2v (_VgaTiming1)))
389#define VgaTiming2 (*((volatile Word *) SA1101_p2v (_VgaTiming2)))
390#define VgaTiming3 (*((volatile Word *) SA1101_p2v (_VgaTiming3)))
391#define VgaBorder (*((volatile Word *) SA1101_p2v (_VgaBorder)))
392#define VgaDBAR (*((volatile Word *) SA1101_p2v (_VgaDBAR)))
393#define VgaDCAR (*((volatile Word *) SA1101_p2v (_VgaDCAR)))
394#define VgaStatus (*((volatile Word *) SA1101_p2v (_VgaStatus)))
395#define VgaInterruptMask (*((volatile Word *) SA1101_p2v (_VgaInterruptMask)))
396#define VgaPalette (*((volatile Word *) SA1101_p2v (_VgaPalette)))
397#define DacControl (*((volatile Word *) SA1101_p2v (_DacControl)))
398#define VgaTest (*((volatile Word *) SA1101_p2v (_VgaTest)))
399
400#define VideoControl_VgaEn 0x00000000
401#define VideoControl_BGR 0x00000001
402#define VideoControl_VCompVal Fld(2,2)
403#define VideoControl_VgaReq Fld(4,4)
404#define VideoControl_VBurstL Fld(4,8)
405#define VideoControl_VMode (1<<12)
406#define VideoControl_PalRead (1<<13)
407
408#define VgaTiming0_PPL Fld(6,2)
409#define VgaTiming0_HSW Fld(8,8)
410#define VgaTiming0_HFP Fld(8,16)
411#define VgaTiming0_HBP Fld(8,24)
412
413#define VgaTiming1_LPS Fld(10,0)
414#define VgaTiming1_VSW Fld(6,10)
415#define VgaTiming1_VFP Fld(8,16)
416#define VgaTiming1_VBP Fld(8,24)
417
418#define VgaTiming2_IVS 0x01
419#define VgaTiming2_IHS 0x02
420#define VgaTiming2_CVS 0x04
421#define VgaTiming2_CHS 0x08
422
423#define VgaTiming3_HBS Fld(8,0)
424#define VgaTiming3_HBE Fld(8,8)
425#define VgaTiming3_VBS Fld(8,16)
426#define VgaTiming3_VBE Fld(8,24)
427
428#define VgaBorder_BCOL Fld(24,0)
429
430#define VgaStatus_VFUF 0x01
431#define VgaStatus_VNext 0x02
432#define VgaStatus_VComp 0x04
433
434#define VgaInterruptMask_VFUFMask 0x00
435#define VgaInterruptMask_VNextMask 0x01
436#define VgaInterruptMask_VCompMask 0x02
437
438#define VgaPalette_R Fld(8,0)
439#define VgaPalette_G Fld(8,8)
440#define VgaPalette_B Fld(8,16)
441
442#define DacControl_DACON 0x0001
443#define DacControl_COMPON 0x0002
444#define DacControl_PEDON 0x0004
445#define DacControl_RTrim Fld(5,4)
446#define DacControl_GTrim Fld(5,9)
447#define DacControl_BTrim Fld(5,14)
448
449#define VgaTest_TDAC 0x00
450#define VgaTest_Datatest Fld(4,1)
451#define VgaTest_DACTESTDAC 0x10
452#define VgaTest_DACTESTOUT Fld(3,5)
453
454#endif /* LANGUAGE == C */
455
456/*
457 * USB Host Interface Controller
458 *
459 * Registers
460 * Revision
461 * Control
462 * CommandStatus
463 * InterruptStatus
464 * InterruptEnable
465 * HCCA
466 * PeriodCurrentED
467 * ControlHeadED
468 * BulkHeadED
469 * BulkCurrentED
470 * DoneHead
471 * FmInterval
472 * FmRemaining
473 * FmNumber
474 * PeriodicStart
475 * LSThreshold
476 * RhDescriptorA
477 * RhDescriptorB
478 * RhStatus
479 * RhPortStatus
480 * USBStatus
481 * USBReset
482 * USTAR
483 * USWER
484 * USRFR
485 * USNFR
486 * USTCSR
487 * USSR
488 *
489 */
490
491#define _USB( x ) _SA1101( ( x ) + __USB_CONTROL )
492
493
494#define _Revision _USB( 0x0000 )
495#define _Control _USB( 0x0888 )
496#define _CommandStatus _USB( 0x0c00 )
497#define _InterruptStatus _USB( 0x1000 )
498#define _InterruptEnable _USB( 0x1400 )
499#define _HCCA _USB( 0x1800 )
500#define _PeriodCurrentED _USB( 0x1c00 )
501#define _ControlHeadED _USB( 0x2000 )
502#define _BulkHeadED _USB( 0x2800 )
503#define _BulkCurrentED _USB( 0x2c00 )
504#define _DoneHead _USB( 0x3000 )
505#define _FmInterval _USB( 0x3400 )
506#define _FmRemaining _USB( 0x3800 )
507#define _FmNumber _USB( 0x3c00 )
508#define _PeriodicStart _USB( 0x4000 )
509#define _LSThreshold _USB( 0x4400 )
510#define _RhDescriptorA _USB( 0x4800 )
511#define _RhDescriptorB _USB( 0x4c00 )
512#define _RhStatus _USB( 0x5000 )
513#define _RhPortStatus _USB( 0x5400 )
514#define _USBStatus _USB( 0x11800 )
515#define _USBReset _USB( 0x11c00 )
516
517#define _USTAR _USB( 0x10400 )
518#define _USWER _USB( 0x10800 )
519#define _USRFR _USB( 0x10c00 )
520#define _USNFR _USB( 0x11000 )
521#define _USTCSR _USB( 0x11400 )
522#define _USSR _USB( 0x11800 )
523
524
525#if (LANGUAGE == C)
526
527#define Revision (*((volatile Word *) SA1101_p2v (_Revision)))
528#define Control (*((volatile Word *) SA1101_p2v (_Control)))
529#define CommandStatus (*((volatile Word *) SA1101_p2v (_CommandStatus)))
530#define InterruptStatus (*((volatile Word *) SA1101_p2v (_InterruptStatus)))
531#define InterruptEnable (*((volatile Word *) SA1101_p2v (_InterruptEnable)))
532#define HCCA (*((volatile Word *) SA1101_p2v (_HCCA)))
533#define PeriodCurrentED (*((volatile Word *) SA1101_p2v (_PeriodCurrentED)))
534#define ControlHeadED (*((volatile Word *) SA1101_p2v (_ControlHeadED)))
535#define BulkHeadED (*((volatile Word *) SA1101_p2v (_BulkHeadED)))
536#define BulkCurrentED (*((volatile Word *) SA1101_p2v (_BulkCurrentED)))
537#define DoneHead (*((volatile Word *) SA1101_p2v (_DoneHead)))
538#define FmInterval (*((volatile Word *) SA1101_p2v (_FmInterval)))
539#define FmRemaining (*((volatile Word *) SA1101_p2v (_FmRemaining)))
540#define FmNumber (*((volatile Word *) SA1101_p2v (_FmNumber)))
541#define PeriodicStart (*((volatile Word *) SA1101_p2v (_PeriodicStart)))
542#define LSThreshold (*((volatile Word *) SA1101_p2v (_LSThreshold)))
543#define RhDescriptorA (*((volatile Word *) SA1101_p2v (_RhDescriptorA)))
544#define RhDescriptorB (*((volatile Word *) SA1101_p2v (_RhDescriptorB)))
545#define RhStatus (*((volatile Word *) SA1101_p2v (_RhStatus)))
546#define RhPortStatus (*((volatile Word *) SA1101_p2v (_RhPortStatus)))
547#define USBStatus (*((volatile Word *) SA1101_p2v (_USBStatus)))
548#define USBReset (*((volatile Word *) SA1101_p2v (_USBReset)))
549#define USTAR (*((volatile Word *) SA1101_p2v (_USTAR)))
550#define USWER (*((volatile Word *) SA1101_p2v (_USWER)))
551#define USRFR (*((volatile Word *) SA1101_p2v (_USRFR)))
552#define USNFR (*((volatile Word *) SA1101_p2v (_USNFR)))
553#define USTCSR (*((volatile Word *) SA1101_p2v (_USTCSR)))
554#define USSR (*((volatile Word *) SA1101_p2v (_USSR)))
555
556
557#define USBStatus_IrqHciRmtWkp (1<<7)
558#define USBStatus_IrqHciBuffAcc (1<<8)
559#define USBStatus_nIrqHciM (1<<9)
560#define USBStatus_nHciMFClr (1<<10)
561
562#define USBReset_ForceIfReset 0x01
563#define USBReset_ForceHcReset 0x02
564#define USBReset_ClkGenReset 0x04
565
566#define USTCR_RdBstCntrl Fld(3,0)
567#define USTCR_ByteEnable Fld(4,3)
568#define USTCR_WriteEn (1<<7)
569#define USTCR_FifoCir (1<<8)
570#define USTCR_TestXferSel (1<<9)
571#define USTCR_FifoCirAtEnd (1<<10)
572#define USTCR_nSimScaleDownClk (1<<11)
573
574#define USSR_nAppMDEmpty 0x01
575#define USSR_nAppMDFirst 0x02
576#define USSR_nAppMDLast 0x04
577#define USSR_nAppMDFull 0x08
578#define USSR_nAppMAFull 0x10
579#define USSR_XferReq 0x20
580#define USSR_XferEnd 0x40
581
582#endif /* LANGUAGE == C */
583
584
585/*
586 * Interrupt Controller
587 *
588 * Registers
589 * INTTEST0 Test register 0
590 * INTTEST1 Test register 1
591 * INTENABLE0 Interrupt Enable register 0
592 * INTENABLE1 Interrupt Enable register 1
593 * INTPOL0 Interrupt Polarity selection 0
594 * INTPOL1 Interrupt Polarity selection 1
595 * INTTSTSEL Interrupt source selection
596 * INTSTATCLR0 Interrupt Status 0
597 * INTSTATCLR1 Interrupt Status 1
598 * INTSET0 Interrupt Set 0
599 * INTSET1 Interrupt Set 1
600 */
601
602#define _INT( x ) _SA1101( ( x ) + __INTERRUPT_CONTROL)
603
604#define _INTTEST0 _INT( 0x1000 )
605#define _INTTEST1 _INT( 0x1400 )
606#define _INTENABLE0 _INT( 0x2000 )
607#define _INTENABLE1 _INT( 0x2400 )
608#define _INTPOL0 _INT( 0x3000 )
609#define _INTPOL1 _INT( 0x3400 )
610#define _INTTSTSEL _INT( 0x5000 )
611#define _INTSTATCLR0 _INT( 0x6000 )
612#define _INTSTATCLR1 _INT( 0x6400 )
613#define _INTSET0 _INT( 0x7000 )
614#define _INTSET1 _INT( 0x7400 )
615
616#if ( LANGUAGE == C )
617#define INTTEST0 (*((volatile Word *) SA1101_p2v (_INTTEST0)))
618#define INTTEST1 (*((volatile Word *) SA1101_p2v (_INTTEST1)))
619#define INTENABLE0 (*((volatile Word *) SA1101_p2v (_INTENABLE0)))
620#define INTENABLE1 (*((volatile Word *) SA1101_p2v (_INTENABLE1)))
621#define INTPOL0 (*((volatile Word *) SA1101_p2v (_INTPOL0)))
622#define INTPOL1 (*((volatile Word *) SA1101_p2v (_INTPOL1)))
623#define INTTSTSEL (*((volatile Word *) SA1101_p2v (_INTTSTSEL)))
624#define INTSTATCLR0 (*((volatile Word *) SA1101_p2v (_INTSTATCLR0)))
625#define INTSTATCLR1 (*((volatile Word *) SA1101_p2v (_INTSTATCLR1)))
626#define INTSET0 (*((volatile Word *) SA1101_p2v (_INTSET0)))
627#define INTSET1 (*((volatile Word *) SA1101_p2v (_INTSET1)))
628
629#endif /* LANGUAGE == C */
630
631/*
632 * PS/2 Trackpad and Mouse Interfaces
633 *
634 * Registers (prefix kbd applies to trackpad interface, mse to mouse)
635 * KBDCR Control Register
636 * KBDSTAT Status Register
637 * KBDDATA Transmit/Receive Data register
638 * KBDCLKDIV Clock Division Register
639 * KBDPRECNT Clock Precount Register
640 * KBDTEST1 Test register 1
641 * KBDTEST2 Test register 2
642 * KBDTEST3 Test register 3
643 * KBDTEST4 Test register 4
644 * MSECR
645 * MSESTAT
646 * MSEDATA
647 * MSECLKDIV
648 * MSEPRECNT
649 * MSETEST1
650 * MSETEST2
651 * MSETEST3
652 * MSETEST4
653 *
654 */
655
656#define _KBD( x ) _SA1101( ( x ) + __TRACK_INTERFACE )
657#define _MSE( x ) _SA1101( ( x ) + __MOUSE_INTERFACE )
658
659#define _KBDCR _KBD( 0x0000 )
660#define _KBDSTAT _KBD( 0x0400 )
661#define _KBDDATA _KBD( 0x0800 )
662#define _KBDCLKDIV _KBD( 0x0c00 )
663#define _KBDPRECNT _KBD( 0x1000 )
664#define _KBDTEST1 _KBD( 0x2000 )
665#define _KBDTEST2 _KBD( 0x2400 )
666#define _KBDTEST3 _KBD( 0x2800 )
667#define _KBDTEST4 _KBD( 0x2c00 )
668#define _MSECR _MSE( 0x0000 )
669#define _MSESTAT _MSE( 0x0400 )
670#define _MSEDATA _MSE( 0x0800 )
671#define _MSECLKDIV _MSE( 0x0c00 )
672#define _MSEPRECNT _MSE( 0x1000 )
673#define _MSETEST1 _MSE( 0x2000 )
674#define _MSETEST2 _MSE( 0x2400 )
675#define _MSETEST3 _MSE( 0x2800 )
676#define _MSETEST4 _MSE( 0x2c00 )
677
678#if ( LANGUAGE == C )
679
680#define KBDCR (*((volatile Word *) SA1101_p2v (_KBDCR)))
681#define KBDSTAT (*((volatile Word *) SA1101_p2v (_KBDSTAT)))
682#define KBDDATA (*((volatile Word *) SA1101_p2v (_KBDDATA)))
683#define KBDCLKDIV (*((volatile Word *) SA1101_p2v (_KBDCLKDIV)))
684#define KBDPRECNT (*((volatile Word *) SA1101_p2v (_KBDPRECNT)))
685#define KBDTEST1 (*((volatile Word *) SA1101_p2v (_KBDTEST1)))
686#define KBDTEST2 (*((volatile Word *) SA1101_p2v (_KBDTEST2)))
687#define KBDTEST3 (*((volatile Word *) SA1101_p2v (_KBDTEST3)))
688#define KBDTEST4 (*((volatile Word *) SA1101_p2v (_KBDTEST4)))
689#define MSECR (*((volatile Word *) SA1101_p2v (_MSECR)))
690#define MSESTAT (*((volatile Word *) SA1101_p2v (_MSESTAT)))
691#define MSEDATA (*((volatile Word *) SA1101_p2v (_MSEDATA)))
692#define MSECLKDIV (*((volatile Word *) SA1101_p2v (_MSECLKDIV)))
693#define MSEPRECNT (*((volatile Word *) SA1101_p2v (_MSEPRECNT)))
694#define MSETEST1 (*((volatile Word *) SA1101_p2v (_MSETEST1)))
695#define MSETEST2 (*((volatile Word *) SA1101_p2v (_MSETEST2)))
696#define MSETEST3 (*((volatile Word *) SA1101_p2v (_MSETEST3)))
697#define MSETEST4 (*((volatile Word *) SA1101_p2v (_MSETEST4)))
698
699
700#define KBDCR_ENA 0x08
701#define KBDCR_FKD 0x02
702#define KBDCR_FKC 0x01
703
704#define KBDSTAT_TXE 0x80
705#define KBDSTAT_TXB 0x40
706#define KBDSTAT_RXF 0x20
707#define KBDSTAT_RXB 0x10
708#define KBDSTAT_ENA 0x08
709#define KBDSTAT_RXP 0x04
710#define KBDSTAT_KBD 0x02
711#define KBDSTAT_KBC 0x01
712
713#define KBDCLKDIV_DivVal Fld(4,0)
714
715#define MSECR_ENA 0x08
716#define MSECR_FKD 0x02
717#define MSECR_FKC 0x01
718
719#define MSESTAT_TXE 0x80
720#define MSESTAT_TXB 0x40
721#define MSESTAT_RXF 0x20
722#define MSESTAT_RXB 0x10
723#define MSESTAT_ENA 0x08
724#define MSESTAT_RXP 0x04
725#define MSESTAT_MSD 0x02
726#define MSESTAT_MSC 0x01
727
728#define MSECLKDIV_DivVal Fld(4,0)
729
730#define KBDTEST1_CD 0x80
731#define KBDTEST1_RC1 0x40
732#define KBDTEST1_MC 0x20
733#define KBDTEST1_C Fld(2,3)
734#define KBDTEST1_T2 0x40
735#define KBDTEST1_T1 0x20
736#define KBDTEST1_T0 0x10
737#define KBDTEST2_TICBnRES 0x08
738#define KBDTEST2_RKC 0x04
739#define KBDTEST2_RKD 0x02
740#define KBDTEST2_SEL 0x01
741#define KBDTEST3_ms_16 0x80
742#define KBDTEST3_us_64 0x40
743#define KBDTEST3_us_16 0x20
744#define KBDTEST3_DIV8 0x10
745#define KBDTEST3_DIn 0x08
746#define KBDTEST3_CIn 0x04
747#define KBDTEST3_KD 0x02
748#define KBDTEST3_KC 0x01
749#define KBDTEST4_BC12 0x80
750#define KBDTEST4_BC11 0x40
751#define KBDTEST4_TRES 0x20
752#define KBDTEST4_CLKOE 0x10
753#define KBDTEST4_CRES 0x08
754#define KBDTEST4_RXB 0x04
755#define KBDTEST4_TXB 0x02
756#define KBDTEST4_SRX 0x01
757
758#define MSETEST1_CD 0x80
759#define MSETEST1_RC1 0x40
760#define MSETEST1_MC 0x20
761#define MSETEST1_C Fld(2,3)
762#define MSETEST1_T2 0x40
763#define MSETEST1_T1 0x20
764#define MSETEST1_T0 0x10
765#define MSETEST2_TICBnRES 0x08
766#define MSETEST2_RKC 0x04
767#define MSETEST2_RKD 0x02
768#define MSETEST2_SEL 0x01
769#define MSETEST3_ms_16 0x80
770#define MSETEST3_us_64 0x40
771#define MSETEST3_us_16 0x20
772#define MSETEST3_DIV8 0x10
773#define MSETEST3_DIn 0x08
774#define MSETEST3_CIn 0x04
775#define MSETEST3_KD 0x02
776#define MSETEST3_KC 0x01
777#define MSETEST4_BC12 0x80
778#define MSETEST4_BC11 0x40
779#define MSETEST4_TRES 0x20
780#define MSETEST4_CLKOE 0x10
781#define MSETEST4_CRES 0x08
782#define MSETEST4_RXB 0x04
783#define MSETEST4_TXB 0x02
784#define MSETEST4_SRX 0x01
785
786#endif /* LANGUAGE == C */
787
788
789/*
790 * General-Purpose I/O Interface
791 *
792 * Registers
793 * PADWR Port A Data Write Register
794 * PBDWR Port B Data Write Register
795 * PADRR Port A Data Read Register
796 * PBDRR Port B Data Read Register
797 * PADDR Port A Data Direction Register
798 * PBDDR Port B Data Direction Register
799 * PASSR Port A Sleep State Register
800 * PBSSR Port B Sleep State Register
801 *
802 */
803
804#define _PIO( x ) _SA1101( ( x ) + __GPIO_INTERFACE )
805
806#define _PADWR _PIO( 0x0000 )
807#define _PBDWR _PIO( 0x0400 )
808#define _PADRR _PIO( 0x0000 )
809#define _PBDRR _PIO( 0x0400 )
810#define _PADDR _PIO( 0x0800 )
811#define _PBDDR _PIO( 0x0c00 )
812#define _PASSR _PIO( 0x1000 )
813#define _PBSSR _PIO( 0x1400 )
814
815
816#if ( LANGUAGE == C )
817
818
819#define PADWR (*((volatile Word *) SA1101_p2v (_PADWR)))
820#define PBDWR (*((volatile Word *) SA1101_p2v (_PBDWR)))
821#define PADRR (*((volatile Word *) SA1101_p2v (_PADRR)))
822#define PBDRR (*((volatile Word *) SA1101_p2v (_PBDRR)))
823#define PADDR (*((volatile Word *) SA1101_p2v (_PADDR)))
824#define PBDDR (*((volatile Word *) SA1101_p2v (_PBDDR)))
825#define PASSR (*((volatile Word *) SA1101_p2v (_PASSR)))
826#define PBSSR (*((volatile Word *) SA1101_p2v (_PBSSR)))
827
828#endif
829
830
831
832/*
833 * Keypad Interface
834 *
835 * Registers
836 * PXDWR
837 * PXDRR
838 * PYDWR
839 * PYDRR
840 *
841 */
842
843#define _KEYPAD( x ) _SA1101( ( x ) + __KEYPAD_INTERFACE )
844
845#define _PXDWR _KEYPAD( 0x0000 )
846#define _PXDRR _KEYPAD( 0x0000 )
847#define _PYDWR _KEYPAD( 0x0400 )
848#define _PYDRR _KEYPAD( 0x0400 )
849
850#if ( LANGUAGE == C )
851
852
853#define PXDWR (*((volatile Word *) SA1101_p2v (_PXDWR)))
854#define PXDRR (*((volatile Word *) SA1101_p2v (_PXDRR)))
855#define PYDWR (*((volatile Word *) SA1101_p2v (_PYDWR)))
856#define PYDRR (*((volatile Word *) SA1101_p2v (_PYDRR)))
857
858#endif
859
860
861
862/*
863 * PCMCIA Interface
864 *
865 * Registers
866 * PCSR Status Register
867 * PCCR Control Register
868 * PCSSR Sleep State Register
869 *
870 */
871
872#define _CARD( x ) _SA1101( ( x ) + __PCMCIA_INTERFACE )
873
874#define _PCSR _CARD( 0x0000 )
875#define _PCCR _CARD( 0x0400 )
876#define _PCSSR _CARD( 0x0800 )
877
878#if ( LANGUAGE == C )
879#define PCSR (*((volatile Word *) SA1101_p2v (_PCSR)))
880#define PCCR (*((volatile Word *) SA1101_p2v (_PCCR)))
881#define PCSSR (*((volatile Word *) SA1101_p2v (_PCSSR)))
882
883#define PCSR_S0_ready 0x0001
884#define PCSR_S1_ready 0x0002
885#define PCSR_S0_detected 0x0004
886#define PCSR_S1_detected 0x0008
887#define PCSR_S0_VS1 0x0010
888#define PCSR_S0_VS2 0x0020
889#define PCSR_S1_VS1 0x0040
890#define PCSR_S1_VS2 0x0080
891#define PCSR_S0_WP 0x0100
892#define PCSR_S1_WP 0x0200
893#define PCSR_S0_BVD1_nSTSCHG 0x0400
894#define PCSR_S0_BVD2_nSPKR 0x0800
895#define PCSR_S1_BVD1_nSTSCHG 0x1000
896#define PCSR_S1_BVD2_nSPKR 0x2000
897
898#define PCCR_S0_VPP0 0x0001
899#define PCCR_S0_VPP1 0x0002
900#define PCCR_S0_VCC0 0x0004
901#define PCCR_S0_VCC1 0x0008
902#define PCCR_S1_VPP0 0x0010
903#define PCCR_S1_VPP1 0x0020
904#define PCCR_S1_VCC0 0x0040
905#define PCCR_S1_VCC1 0x0080
906#define PCCR_S0_reset 0x0100
907#define PCCR_S1_reset 0x0200
908#define PCCR_S0_float 0x0400
909#define PCCR_S1_float 0x0800
910
911#define PCSSR_S0_VCC0 0x0001
912#define PCSSR_S0_VCC1 0x0002
913#define PCSSR_S0_VPP0 0x0004
914#define PCSSR_S0_VPP1 0x0008
915#define PCSSR_S0_control 0x0010
916#define PCSSR_S1_VCC0 0x0020
917#define PCSSR_S1_VCC1 0x0040
918#define PCSSR_S1_VPP0 0x0080
919#define PCSSR_S1_VPP1 0x0100
920#define PCSSR_S1_control 0x0200
921
922#endif
923
924#undef C
925#undef Assembly
diff --git a/include/asm-arm/arch-sa1100/SA-1111.h b/arch/arm/mach-sa1100/include/mach/SA-1111.h
index c38f60915cb6..c38f60915cb6 100644
--- a/include/asm-arm/arch-sa1100/SA-1111.h
+++ b/arch/arm/mach-sa1100/include/mach/SA-1111.h
diff --git a/arch/arm/mach-sa1100/include/mach/assabet.h b/arch/arm/mach-sa1100/include/mach/assabet.h
new file mode 100644
index 000000000000..3959b20d5d1c
--- /dev/null
+++ b/arch/arm/mach-sa1100/include/mach/assabet.h
@@ -0,0 +1,105 @@
1/*
2 * arch/arm/mach-sa1100/include/mach/assabet.h
3 *
4 * Created 2000/06/05 by Nicolas Pitre <nico@cam.org>
5 *
6 * This file contains the hardware specific definitions for Assabet
7 * Only include this file from SA1100-specific files.
8 *
9 * 2000/05/23 John Dorsey <john+@cs.cmu.edu>
10 * Definitions for Neponset added.
11 */
12#ifndef __ASM_ARCH_ASSABET_H
13#define __ASM_ARCH_ASSABET_H
14
15
16/* System Configuration Register flags */
17
18#define ASSABET_SCR_SDRAM_LOW (1<<2) /* SDRAM size (low bit) */
19#define ASSABET_SCR_SDRAM_HIGH (1<<3) /* SDRAM size (high bit) */
20#define ASSABET_SCR_FLASH_LOW (1<<4) /* Flash size (low bit) */
21#define ASSABET_SCR_FLASH_HIGH (1<<5) /* Flash size (high bit) */
22#define ASSABET_SCR_GFX (1<<8) /* Graphics Accelerator (0 = present) */
23#define ASSABET_SCR_SA1111 (1<<9) /* Neponset (0 = present) */
24
25#define ASSABET_SCR_INIT -1
26
27extern unsigned long SCR_value;
28
29#ifdef CONFIG_ASSABET_NEPONSET
30#define machine_has_neponset() ((SCR_value & ASSABET_SCR_SA1111) == 0)
31#else
32#define machine_has_neponset() (0)
33#endif
34
35/* Board Control Register */
36
37#define ASSABET_BCR_BASE 0xf1000000
38#define ASSABET_BCR (*(volatile unsigned int *)(ASSABET_BCR_BASE))
39
40#define ASSABET_BCR_CF_PWR (1<<0) /* Compact Flash Power (1 = 3.3v, 0 = off) */
41#define ASSABET_BCR_CF_RST (1<<1) /* Compact Flash Reset (1 = power up reset) */
42#define ASSABET_BCR_GFX_RST (1<<1) /* Graphics Accelerator Reset (0 = hold reset) */
43#define ASSABET_BCR_CODEC_RST (1<<2) /* 0 = Holds UCB1300, ADI7171, and UDA1341 in reset */
44#define ASSABET_BCR_IRDA_FSEL (1<<3) /* IRDA Frequency select (0 = SIR, 1 = MIR/ FIR) */
45#define ASSABET_BCR_IRDA_MD0 (1<<4) /* Range/Power select */
46#define ASSABET_BCR_IRDA_MD1 (1<<5) /* Range/Power select */
47#define ASSABET_BCR_STEREO_LB (1<<6) /* Stereo Loopback */
48#define ASSABET_BCR_CF_BUS_OFF (1<<7) /* Compact Flash bus (0 = on, 1 = off (float)) */
49#define ASSABET_BCR_AUDIO_ON (1<<8) /* Audio power on */
50#define ASSABET_BCR_LIGHT_ON (1<<9) /* Backlight */
51#define ASSABET_BCR_LCD_12RGB (1<<10) /* 0 = 16RGB, 1 = 12RGB */
52#define ASSABET_BCR_LCD_ON (1<<11) /* LCD power on */
53#define ASSABET_BCR_RS232EN (1<<12) /* RS232 transceiver enable */
54#define ASSABET_BCR_LED_RED (1<<13) /* D9 (0 = on, 1 = off) */
55#define ASSABET_BCR_LED_GREEN (1<<14) /* D8 (0 = on, 1 = off) */
56#define ASSABET_BCR_VIB_ON (1<<15) /* Vibration motor (quiet alert) */
57#define ASSABET_BCR_COM_DTR (1<<16) /* COMport Data Terminal Ready */
58#define ASSABET_BCR_COM_RTS (1<<17) /* COMport Request To Send */
59#define ASSABET_BCR_RAD_WU (1<<18) /* Radio wake up interrupt */
60#define ASSABET_BCR_SMB_EN (1<<19) /* System management bus enable */
61#define ASSABET_BCR_TV_IR_DEC (1<<20) /* TV IR Decode Enable (not implemented) */
62#define ASSABET_BCR_QMUTE (1<<21) /* Quick Mute */
63#define ASSABET_BCR_RAD_ON (1<<22) /* Radio Power On */
64#define ASSABET_BCR_SPK_OFF (1<<23) /* 1 = Speaker amplifier power off */
65
66#ifdef CONFIG_SA1100_ASSABET
67extern void ASSABET_BCR_frob(unsigned int mask, unsigned int set);
68#else
69#define ASSABET_BCR_frob(x,y) do { } while (0)
70#endif
71
72#define ASSABET_BCR_set(x) ASSABET_BCR_frob((x), (x))
73#define ASSABET_BCR_clear(x) ASSABET_BCR_frob((x), 0)
74
75#define ASSABET_BSR_BASE 0xf1000000
76#define ASSABET_BSR (*(volatile unsigned int*)(ASSABET_BSR_BASE))
77
78#define ASSABET_BSR_RS232_VALID (1 << 24)
79#define ASSABET_BSR_COM_DCD (1 << 25)
80#define ASSABET_BSR_COM_CTS (1 << 26)
81#define ASSABET_BSR_COM_DSR (1 << 27)
82#define ASSABET_BSR_RAD_CTS (1 << 28)
83#define ASSABET_BSR_RAD_DSR (1 << 29)
84#define ASSABET_BSR_RAD_DCD (1 << 30)
85#define ASSABET_BSR_RAD_RI (1 << 31)
86
87
88/* GPIOs for which the generic definition doesn't say much */
89#define ASSABET_GPIO_RADIO_IRQ GPIO_GPIO (14) /* Radio interrupt request */
90#define ASSABET_GPIO_PS_MODE_SYNC GPIO_GPIO (16) /* Power supply mode/sync */
91#define ASSABET_GPIO_STEREO_64FS_CLK GPIO_GPIO (19) /* SSP UDA1341 clock input */
92#define ASSABET_GPIO_CF_IRQ GPIO_GPIO (21) /* CF IRQ */
93#define ASSABET_GPIO_CF_CD GPIO_GPIO (22) /* CF CD */
94#define ASSABET_GPIO_CF_BVD2 GPIO_GPIO (24) /* CF BVD */
95#define ASSABET_GPIO_GFX_IRQ GPIO_GPIO (24) /* Graphics IRQ */
96#define ASSABET_GPIO_CF_BVD1 GPIO_GPIO (25) /* CF BVD */
97#define ASSABET_GPIO_BATT_LOW GPIO_GPIO (26) /* Low battery */
98#define ASSABET_GPIO_RCLK GPIO_GPIO (26) /* CCLK/2 */
99
100#define ASSABET_IRQ_GPIO_CF_IRQ IRQ_GPIO21
101#define ASSABET_IRQ_GPIO_CF_CD IRQ_GPIO22
102#define ASSABET_IRQ_GPIO_CF_BVD2 IRQ_GPIO24
103#define ASSABET_IRQ_GPIO_CF_BVD1 IRQ_GPIO25
104
105#endif
diff --git a/arch/arm/mach-sa1100/include/mach/badge4.h b/arch/arm/mach-sa1100/include/mach/badge4.h
new file mode 100644
index 000000000000..44d2e1bfc04b
--- /dev/null
+++ b/arch/arm/mach-sa1100/include/mach/badge4.h
@@ -0,0 +1,75 @@
1/*
2 * arch/arm/mach-sa1100/include/mach/badge4.h
3 *
4 * Tim Connors <connors@hpl.hp.com>
5 * Christopher Hoover <ch@hpl.hp.com>
6 *
7 * Copyright (C) 2002 Hewlett-Packard Company
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12 *
13 */
14
15#ifndef __ASM_ARCH_HARDWARE_H
16#error "include <mach/hardware.h> instead"
17#endif
18
19#define BADGE4_SA1111_BASE (0x48000000)
20
21/* GPIOs on the BadgePAD 4 */
22#define BADGE4_GPIO_INT_1111 GPIO_GPIO0 /* SA-1111 IRQ */
23
24#define BADGE4_GPIO_INT_VID GPIO_GPIO1 /* Video expansion */
25#define BADGE4_GPIO_LGP2 GPIO_GPIO2 /* GPIO_LDD8 */
26#define BADGE4_GPIO_LGP3 GPIO_GPIO3 /* GPIO_LDD9 */
27#define BADGE4_GPIO_LGP4 GPIO_GPIO4 /* GPIO_LDD10 */
28#define BADGE4_GPIO_LGP5 GPIO_GPIO5 /* GPIO_LDD11 */
29#define BADGE4_GPIO_LGP6 GPIO_GPIO6 /* GPIO_LDD12 */
30#define BADGE4_GPIO_LGP7 GPIO_GPIO7 /* GPIO_LDD13 */
31#define BADGE4_GPIO_LGP8 GPIO_GPIO8 /* GPIO_LDD14 */
32#define BADGE4_GPIO_LGP9 GPIO_GPIO9 /* GPIO_LDD15 */
33#define BADGE4_GPIO_GPA_VID GPIO_GPIO10 /* Video expansion */
34#define BADGE4_GPIO_GPB_VID GPIO_GPIO11 /* Video expansion */
35#define BADGE4_GPIO_GPC_VID GPIO_GPIO12 /* Video expansion */
36
37#define BADGE4_GPIO_UART_HS1 GPIO_GPIO13
38#define BADGE4_GPIO_UART_HS2 GPIO_GPIO14
39
40#define BADGE4_GPIO_MUXSEL0 GPIO_GPIO15
41#define BADGE4_GPIO_TESTPT_J7 GPIO_GPIO16
42
43#define BADGE4_GPIO_SDSDA GPIO_GPIO17 /* SDRAM SPD Data */
44#define BADGE4_GPIO_SDSCL GPIO_GPIO18 /* SDRAM SPD Clock */
45#define BADGE4_GPIO_SDTYP0 GPIO_GPIO19 /* SDRAM Type Control */
46#define BADGE4_GPIO_SDTYP1 GPIO_GPIO20 /* SDRAM Type Control */
47
48#define BADGE4_GPIO_BGNT_1111 GPIO_GPIO21 /* GPIO_MBGNT */
49#define BADGE4_GPIO_BREQ_1111 GPIO_GPIO22 /* GPIO_TREQA */
50
51#define BADGE4_GPIO_TESTPT_J6 GPIO_GPIO23
52
53#define BADGE4_GPIO_PCMEN5V GPIO_GPIO24 /* 5V power */
54
55#define BADGE4_GPIO_SA1111_NRST GPIO_GPIO25 /* SA-1111 nRESET */
56
57#define BADGE4_GPIO_TESTPT_J5 GPIO_GPIO26
58
59#define BADGE4_GPIO_CLK_1111 GPIO_GPIO27 /* GPIO_32_768kHz */
60
61/* Interrupts on the BadgePAD 4 */
62#define BADGE4_IRQ_GPIO_SA1111 IRQ_GPIO0 /* SA-1111 interrupt */
63
64
65/* PCM5ENV Usage tracking */
66
67#define BADGE4_5V_PCMCIA_SOCK0 (1<<0)
68#define BADGE4_5V_PCMCIA_SOCK1 (1<<1)
69#define BADGE4_5V_PCMCIA_SOCK(n) (1<<(n))
70#define BADGE4_5V_USB (1<<2)
71#define BADGE4_5V_INITIALLY (1<<3)
72
73#ifndef __ASSEMBLY__
74extern void badge4_set_5V(unsigned subsystem, int on);
75#endif
diff --git a/include/asm-arm/arch-sa1100/bitfield.h b/arch/arm/mach-sa1100/include/mach/bitfield.h
index f1f0e3387d9c..f1f0e3387d9c 100644
--- a/include/asm-arm/arch-sa1100/bitfield.h
+++ b/arch/arm/mach-sa1100/include/mach/bitfield.h
diff --git a/arch/arm/mach-sa1100/include/mach/cerf.h b/arch/arm/mach-sa1100/include/mach/cerf.h
new file mode 100644
index 000000000000..c3ac3d0f9465
--- /dev/null
+++ b/arch/arm/mach-sa1100/include/mach/cerf.h
@@ -0,0 +1,28 @@
1/*
2 * arch/arm/mach-sa1100/include/mach/cerf.h
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 *
8 * Apr-2003 : Removed some old PDA crud [FB]
9 */
10#ifndef _INCLUDE_CERF_H_
11#define _INCLUDE_CERF_H_
12
13
14#define CERF_ETH_IO 0xf0000000
15#define CERF_ETH_IRQ IRQ_GPIO26
16
17#define CERF_GPIO_CF_BVD2 GPIO_GPIO (19)
18#define CERF_GPIO_CF_BVD1 GPIO_GPIO (20)
19#define CERF_GPIO_CF_RESET GPIO_GPIO (21)
20#define CERF_GPIO_CF_IRQ GPIO_GPIO (22)
21#define CERF_GPIO_CF_CD GPIO_GPIO (23)
22
23#define CERF_IRQ_GPIO_CF_BVD2 IRQ_GPIO19
24#define CERF_IRQ_GPIO_CF_BVD1 IRQ_GPIO20
25#define CERF_IRQ_GPIO_CF_IRQ IRQ_GPIO22
26#define CERF_IRQ_GPIO_CF_CD IRQ_GPIO23
27
28#endif // _INCLUDE_CERF_H_
diff --git a/arch/arm/mach-sa1100/include/mach/collie.h b/arch/arm/mach-sa1100/include/mach/collie.h
new file mode 100644
index 000000000000..69e962416e3f
--- /dev/null
+++ b/arch/arm/mach-sa1100/include/mach/collie.h
@@ -0,0 +1,88 @@
1/*
2 * arch/arm/mach-sa1100/include/mach/collie.h
3 *
4 * This file contains the hardware specific definitions for Assabet
5 * Only include this file from SA1100-specific files.
6 *
7 * ChangeLog:
8 * 04-06-2001 Lineo Japan, Inc.
9 * 04-16-2001 SHARP Corporation
10 * 07-07-2002 Chris Larson <clarson@digi.com>
11 *
12 */
13#ifndef __ASM_ARCH_COLLIE_H
14#define __ASM_ARCH_COLLIE_H
15
16
17#define COLLIE_SCP_CHARGE_ON SCOOP_GPCR_PA11
18#define COLLIE_SCP_DIAG_BOOT1 SCOOP_GPCR_PA12
19#define COLLIE_SCP_DIAG_BOOT2 SCOOP_GPCR_PA13
20#define COLLIE_SCP_MUTE_L SCOOP_GPCR_PA14
21#define COLLIE_SCP_MUTE_R SCOOP_GPCR_PA15
22#define COLLIE_SCP_5VON SCOOP_GPCR_PA16
23#define COLLIE_SCP_AMP_ON SCOOP_GPCR_PA17
24#define COLLIE_SCP_VPEN SCOOP_GPCR_PA18
25#define COLLIE_SCP_LB_VOL_CHG SCOOP_GPCR_PA19
26
27#define COLLIE_SCOOP_IO_DIR ( COLLIE_SCP_CHARGE_ON | COLLIE_SCP_MUTE_L | COLLIE_SCP_MUTE_R | \
28 COLLIE_SCP_5VON | COLLIE_SCP_AMP_ON | COLLIE_SCP_VPEN | \
29 COLLIE_SCP_LB_VOL_CHG )
30#define COLLIE_SCOOP_IO_OUT ( COLLIE_SCP_MUTE_L | COLLIE_SCP_MUTE_R | COLLIE_SCP_VPEN | \
31 COLLIE_SCP_CHARGE_ON )
32
33/* GPIOs for which the generic definition doesn't say much */
34
35#define COLLIE_GPIO_ON_KEY GPIO_GPIO (0)
36#define COLLIE_GPIO_AC_IN GPIO_GPIO (1)
37#define COLLIE_GPIO_SDIO_INT GPIO_GPIO (11)
38#define COLLIE_GPIO_CF_IRQ GPIO_GPIO (14)
39#define COLLIE_GPIO_nREMOCON_INT GPIO_GPIO (15)
40#define COLLIE_GPIO_UCB1x00_RESET GPIO_GPIO (16)
41#define COLLIE_GPIO_nMIC_ON GPIO_GPIO (17)
42#define COLLIE_GPIO_nREMOCON_ON GPIO_GPIO (18)
43#define COLLIE_GPIO_CO GPIO_GPIO (20)
44#define COLLIE_GPIO_MCP_CLK GPIO_GPIO (21)
45#define COLLIE_GPIO_CF_CD GPIO_GPIO (22)
46#define COLLIE_GPIO_UCB1x00_IRQ GPIO_GPIO (23)
47#define COLLIE_GPIO_WAKEUP GPIO_GPIO (24)
48#define COLLIE_GPIO_GA_INT GPIO_GPIO (25)
49#define COLLIE_GPIO_MAIN_BAT_LOW GPIO_GPIO (26)
50
51/* Interrupts */
52
53#define COLLIE_IRQ_GPIO_ON_KEY IRQ_GPIO0
54#define COLLIE_IRQ_GPIO_AC_IN IRQ_GPIO1
55#define COLLIE_IRQ_GPIO_SDIO_IRQ IRQ_GPIO11
56#define COLLIE_IRQ_GPIO_CF_IRQ IRQ_GPIO14
57#define COLLIE_IRQ_GPIO_nREMOCON_INT IRQ_GPIO15
58#define COLLIE_IRQ_GPIO_CO IRQ_GPIO20
59#define COLLIE_IRQ_GPIO_CF_CD IRQ_GPIO22
60#define COLLIE_IRQ_GPIO_UCB1x00_IRQ IRQ_GPIO23
61#define COLLIE_IRQ_GPIO_WAKEUP IRQ_GPIO24
62#define COLLIE_IRQ_GPIO_GA_INT IRQ_GPIO25
63#define COLLIE_IRQ_GPIO_MAIN_BAT_LOW IRQ_GPIO26
64
65#define COLLIE_LCM_IRQ_GPIO_RTS IRQ_LOCOMO_GPIO0
66#define COLLIE_LCM_IRQ_GPIO_CTS IRQ_LOCOMO_GPIO1
67#define COLLIE_LCM_IRQ_GPIO_DSR IRQ_LOCOMO_GPIO2
68#define COLLIE_LCM_IRQ_GPIO_DTR IRQ_LOCOMO_GPIO3
69#define COLLIE_LCM_IRQ_GPIO_nSD_DETECT IRQ_LOCOMO_GPIO13
70#define COLLIE_LCM_IRQ_GPIO_nSD_WP IRQ_LOCOMO_GPIO14
71
72/* GPIO's on the TC35143AF (Toshiba Analog Frontend) */
73#define COLLIE_TC35143_GPIO_VERSION0 UCB_IO_0 /* GPIO0=Version */
74#define COLLIE_TC35143_GPIO_TBL_CHK UCB_IO_1 /* GPIO1=TBL_CHK */
75#define COLLIE_TC35143_GPIO_VPEN_ON UCB_IO_2 /* GPIO2=VPNE_ON */
76#define COLLIE_TC35143_GPIO_IR_ON UCB_IO_3 /* GPIO3=IR_ON */
77#define COLLIE_TC35143_GPIO_AMP_ON UCB_IO_4 /* GPIO4=AMP_ON */
78#define COLLIE_TC35143_GPIO_VERSION1 UCB_IO_5 /* GPIO5=Version */
79#define COLLIE_TC35143_GPIO_FS8KLPF UCB_IO_5 /* GPIO5=fs 8k LPF */
80#define COLLIE_TC35143_GPIO_BUZZER_BIAS UCB_IO_6 /* GPIO6=BUZZER BIAS */
81#define COLLIE_TC35143_GPIO_MBAT_ON UCB_IO_7 /* GPIO7=MBAT_ON */
82#define COLLIE_TC35143_GPIO_BBAT_ON UCB_IO_8 /* GPIO8=BBAT_ON */
83#define COLLIE_TC35143_GPIO_TMP_ON UCB_IO_9 /* GPIO9=TMP_ON */
84#define COLLIE_TC35143_GPIO_IN ( UCB_IO_0 | UCB_IO_2 | UCB_IO_5 )
85#define COLLIE_TC35143_GPIO_OUT ( UCB_IO_1 | UCB_IO_3 | UCB_IO_4 | UCB_IO_6 | \
86 UCB_IO_7 | UCB_IO_8 | UCB_IO_9 )
87
88#endif
diff --git a/arch/arm/mach-sa1100/include/mach/debug-macro.S b/arch/arm/mach-sa1100/include/mach/debug-macro.S
new file mode 100644
index 000000000000..1f0634d92702
--- /dev/null
+++ b/arch/arm/mach-sa1100/include/mach/debug-macro.S
@@ -0,0 +1,58 @@
1/* arch/arm/mach-sa1100/include/mach/debug-macro.S
2 *
3 * Debugging macro include header
4 *
5 * Copyright (C) 1994-1999 Russell King
6 * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 *
12*/
13#include <mach/hardware.h>
14
15 .macro addruart,rx
16 mrc p15, 0, \rx, c1, c0
17 tst \rx, #1 @ MMU enabled?
18 moveq \rx, #0x80000000 @ physical base address
19 movne \rx, #0xf8000000 @ virtual address
20
21 @ We probe for the active serial port here, coherently with
22 @ the comment in arch/arm/mach-sa1100/include/mach/uncompress.h.
23 @ We assume r1 can be clobbered.
24
25 @ see if Ser3 is active
26 add \rx, \rx, #0x00050000
27 ldr r1, [\rx, #UTCR3]
28 tst r1, #UTCR3_TXE
29
30 @ if Ser3 is inactive, then try Ser1
31 addeq \rx, \rx, #(0x00010000 - 0x00050000)
32 ldreq r1, [\rx, #UTCR3]
33 tsteq r1, #UTCR3_TXE
34
35 @ if Ser1 is inactive, then try Ser2
36 addeq \rx, \rx, #(0x00030000 - 0x00010000)
37 ldreq r1, [\rx, #UTCR3]
38 tsteq r1, #UTCR3_TXE
39
40 @ if all ports are inactive, then there is nothing we can do
41 moveq pc, lr
42 .endm
43
44 .macro senduart,rd,rx
45 str \rd, [\rx, #UTDR]
46 .endm
47
48 .macro waituart,rd,rx
491001: ldr \rd, [\rx, #UTSR1]
50 tst \rd, #UTSR1_TNF
51 beq 1001b
52 .endm
53
54 .macro busyuart,rd,rx
551001: ldr \rd, [\rx, #UTSR1]
56 tst \rd, #UTSR1_TBY
57 bne 1001b
58 .endm
diff --git a/arch/arm/mach-sa1100/include/mach/dma.h b/arch/arm/mach-sa1100/include/mach/dma.h
new file mode 100644
index 000000000000..dda1b351310d
--- /dev/null
+++ b/arch/arm/mach-sa1100/include/mach/dma.h
@@ -0,0 +1,117 @@
1/*
2 * arch/arm/mach-sa1100/include/mach/dma.h
3 *
4 * Generic SA1100 DMA support
5 *
6 * Copyright (C) 2000 Nicolas Pitre
7 *
8 */
9
10#ifndef __ASM_ARCH_DMA_H
11#define __ASM_ARCH_DMA_H
12
13#include "hardware.h"
14
15
16/*
17 * The SA1100 has six internal DMA channels.
18 */
19#define SA1100_DMA_CHANNELS 6
20
21/*
22 * Maximum physical DMA buffer size
23 */
24#define MAX_DMA_SIZE 0x1fff
25#define CUT_DMA_SIZE 0x1000
26
27/*
28 * All possible SA1100 devices a DMA channel can be attached to.
29 */
30typedef enum {
31 DMA_Ser0UDCWr = DDAR_Ser0UDCWr, /* Ser. port 0 UDC Write */
32 DMA_Ser0UDCRd = DDAR_Ser0UDCRd, /* Ser. port 0 UDC Read */
33 DMA_Ser1UARTWr = DDAR_Ser1UARTWr, /* Ser. port 1 UART Write */
34 DMA_Ser1UARTRd = DDAR_Ser1UARTRd, /* Ser. port 1 UART Read */
35 DMA_Ser1SDLCWr = DDAR_Ser1SDLCWr, /* Ser. port 1 SDLC Write */
36 DMA_Ser1SDLCRd = DDAR_Ser1SDLCRd, /* Ser. port 1 SDLC Read */
37 DMA_Ser2UARTWr = DDAR_Ser2UARTWr, /* Ser. port 2 UART Write */
38 DMA_Ser2UARTRd = DDAR_Ser2UARTRd, /* Ser. port 2 UART Read */
39 DMA_Ser2HSSPWr = DDAR_Ser2HSSPWr, /* Ser. port 2 HSSP Write */
40 DMA_Ser2HSSPRd = DDAR_Ser2HSSPRd, /* Ser. port 2 HSSP Read */
41 DMA_Ser3UARTWr = DDAR_Ser3UARTWr, /* Ser. port 3 UART Write */
42 DMA_Ser3UARTRd = DDAR_Ser3UARTRd, /* Ser. port 3 UART Read */
43 DMA_Ser4MCP0Wr = DDAR_Ser4MCP0Wr, /* Ser. port 4 MCP 0 Write (audio) */
44 DMA_Ser4MCP0Rd = DDAR_Ser4MCP0Rd, /* Ser. port 4 MCP 0 Read (audio) */
45 DMA_Ser4MCP1Wr = DDAR_Ser4MCP1Wr, /* Ser. port 4 MCP 1 Write */
46 DMA_Ser4MCP1Rd = DDAR_Ser4MCP1Rd, /* Ser. port 4 MCP 1 Read */
47 DMA_Ser4SSPWr = DDAR_Ser4SSPWr, /* Ser. port 4 SSP Write (16 bits) */
48 DMA_Ser4SSPRd = DDAR_Ser4SSPRd /* Ser. port 4 SSP Read (16 bits) */
49} dma_device_t;
50
51typedef struct {
52 volatile u_long DDAR;
53 volatile u_long SetDCSR;
54 volatile u_long ClrDCSR;
55 volatile u_long RdDCSR;
56 volatile dma_addr_t DBSA;
57 volatile u_long DBTA;
58 volatile dma_addr_t DBSB;
59 volatile u_long DBTB;
60} dma_regs_t;
61
62typedef void (*dma_callback_t)(void *data);
63
64/*
65 * DMA function prototypes
66 */
67
68extern int sa1100_request_dma( dma_device_t device, const char *device_id,
69 dma_callback_t callback, void *data,
70 dma_regs_t **regs );
71extern void sa1100_free_dma( dma_regs_t *regs );
72extern int sa1100_start_dma( dma_regs_t *regs, dma_addr_t dma_ptr, u_int size );
73extern dma_addr_t sa1100_get_dma_pos(dma_regs_t *regs);
74extern void sa1100_reset_dma(dma_regs_t *regs);
75
76/**
77 * sa1100_stop_dma - stop DMA in progress
78 * @regs: identifier for the channel to use
79 *
80 * This stops DMA without clearing buffer pointers. Unlike
81 * sa1100_clear_dma() this allows subsequent use of sa1100_resume_dma()
82 * or sa1100_get_dma_pos().
83 *
84 * The @regs identifier is provided by a successful call to
85 * sa1100_request_dma().
86 **/
87
88#define sa1100_stop_dma(regs) ((regs)->ClrDCSR = DCSR_IE|DCSR_RUN)
89
90/**
91 * sa1100_resume_dma - resume DMA on a stopped channel
92 * @regs: identifier for the channel to use
93 *
94 * This resumes DMA on a channel previously stopped with
95 * sa1100_stop_dma().
96 *
97 * The @regs identifier is provided by a successful call to
98 * sa1100_request_dma().
99 **/
100
101#define sa1100_resume_dma(regs) ((regs)->SetDCSR = DCSR_IE|DCSR_RUN)
102
103/**
104 * sa1100_clear_dma - clear DMA pointers
105 * @regs: identifier for the channel to use
106 *
107 * This clear any DMA state so the DMA engine is ready to restart
108 * with new buffers through sa1100_start_dma(). Any buffers in flight
109 * are discarded.
110 *
111 * The @regs identifier is provided by a successful call to
112 * sa1100_request_dma().
113 **/
114
115#define sa1100_clear_dma(regs) ((regs)->ClrDCSR = DCSR_IE|DCSR_RUN|DCSR_STRTA|DCSR_STRTB)
116
117#endif /* _ASM_ARCH_DMA_H */
diff --git a/arch/arm/mach-sa1100/include/mach/entry-macro.S b/arch/arm/mach-sa1100/include/mach/entry-macro.S
new file mode 100644
index 000000000000..6aa13c46c5d3
--- /dev/null
+++ b/arch/arm/mach-sa1100/include/mach/entry-macro.S
@@ -0,0 +1,47 @@
1/*
2 * arch/arm/mach-sa1100/include/mach/entry-macro.S
3 *
4 * Low-level IRQ helper macros for SA1100-based platforms
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10
11 .macro disable_fiq
12 .endm
13
14 .macro get_irqnr_preamble, base, tmp
15 mov \base, #0xfa000000 @ ICIP = 0xfa050000
16 add \base, \base, #0x00050000
17 .endm
18
19 .macro arch_ret_to_user, tmp1, tmp2
20 .endm
21
22 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
23 ldr \irqstat, [\base] @ get irqs
24 ldr \irqnr, [\base, #4] @ ICMR = 0xfa050004
25 ands \irqstat, \irqstat, \irqnr
26 mov \irqnr, #0
27 beq 1001f
28 tst \irqstat, #0xff
29 moveq \irqstat, \irqstat, lsr #8
30 addeq \irqnr, \irqnr, #8
31 tsteq \irqstat, #0xff
32 moveq \irqstat, \irqstat, lsr #8
33 addeq \irqnr, \irqnr, #8
34 tsteq \irqstat, #0xff
35 moveq \irqstat, \irqstat, lsr #8
36 addeq \irqnr, \irqnr, #8
37 tst \irqstat, #0x0f
38 moveq \irqstat, \irqstat, lsr #4
39 addeq \irqnr, \irqnr, #4
40 tst \irqstat, #0x03
41 moveq \irqstat, \irqstat, lsr #2
42 addeq \irqnr, \irqnr, #2
43 tst \irqstat, #0x01
44 addeqs \irqnr, \irqnr, #1
451001:
46 .endm
47
diff --git a/arch/arm/mach-sa1100/include/mach/gpio.h b/arch/arm/mach-sa1100/include/mach/gpio.h
new file mode 100644
index 000000000000..582a0c92da53
--- /dev/null
+++ b/arch/arm/mach-sa1100/include/mach/gpio.h
@@ -0,0 +1,68 @@
1/*
2 * arch/arm/mach-sa1100/include/mach/gpio.h
3 *
4 * SA1100 GPIO wrappers for arch-neutral GPIO calls
5 *
6 * Written by Philipp Zabel <philipp.zabel@gmail.com>
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 *
22 */
23
24#ifndef __ASM_ARCH_SA1100_GPIO_H
25#define __ASM_ARCH_SA1100_GPIO_H
26
27#include <mach/hardware.h>
28#include <asm/irq.h>
29#include <asm-generic/gpio.h>
30
31static inline int gpio_get_value(unsigned gpio)
32{
33 if (__builtin_constant_p(gpio) && (gpio <= GPIO_MAX))
34 return GPLR & GPIO_GPIO(gpio);
35 else
36 return __gpio_get_value(gpio);
37}
38
39static inline void gpio_set_value(unsigned gpio, int value)
40{
41 if (__builtin_constant_p(gpio) && (gpio <= GPIO_MAX))
42 if (value)
43 GPSR = GPIO_GPIO(gpio);
44 else
45 GPCR = GPIO_GPIO(gpio);
46 else
47 __gpio_set_value(gpio, value);
48}
49
50#define gpio_cansleep __gpio_cansleep
51
52static inline unsigned gpio_to_irq(unsigned gpio)
53{
54 if (gpio < 11)
55 return IRQ_GPIO0 + gpio;
56 else
57 return IRQ_GPIO11 - 11 + gpio;
58}
59
60static inline unsigned irq_to_gpio(unsigned irq)
61{
62 if (irq < IRQ_GPIO11_27)
63 return irq - IRQ_GPIO0;
64 else
65 return irq - IRQ_GPIO11 + 11;
66}
67
68#endif
diff --git a/include/asm-arm/arch-sa1100/h3600.h b/arch/arm/mach-sa1100/include/mach/h3600.h
index 3ca0ecf095e6..3ca0ecf095e6 100644
--- a/include/asm-arm/arch-sa1100/h3600.h
+++ b/arch/arm/mach-sa1100/include/mach/h3600.h
diff --git a/include/asm-arm/arch-sa1100/h3600_gpio.h b/arch/arm/mach-sa1100/include/mach/h3600_gpio.h
index 62b0b7879685..62b0b7879685 100644
--- a/include/asm-arm/arch-sa1100/h3600_gpio.h
+++ b/arch/arm/mach-sa1100/include/mach/h3600_gpio.h
diff --git a/arch/arm/mach-sa1100/include/mach/hardware.h b/arch/arm/mach-sa1100/include/mach/hardware.h
new file mode 100644
index 000000000000..5976435f42c2
--- /dev/null
+++ b/arch/arm/mach-sa1100/include/mach/hardware.h
@@ -0,0 +1,57 @@
1/*
2 * arch/arm/mach-sa1100/include/mach/hardware.h
3 *
4 * Copyright (C) 1998 Nicolas Pitre <nico@cam.org>
5 *
6 * This file contains the hardware definitions for SA1100 architecture
7 *
8 * 2000/05/23 John Dorsey <john+@cs.cmu.edu>
9 * Definitions for SA1111 added.
10 */
11
12#ifndef __ASM_ARCH_HARDWARE_H
13#define __ASM_ARCH_HARDWARE_H
14
15
16#define UNCACHEABLE_ADDR 0xfa050000
17
18
19/*
20 * SA1100 internal I/O mappings
21 *
22 * We have the following mapping:
23 * phys virt
24 * 80000000 f8000000
25 * 90000000 fa000000
26 * a0000000 fc000000
27 * b0000000 fe000000
28 */
29
30#define VIO_BASE 0xf8000000 /* virtual start of IO space */
31#define VIO_SHIFT 3 /* x = IO space shrink power */
32#define PIO_START 0x80000000 /* physical start of IO space */
33
34#define io_p2v( x ) \
35 ( (((x)&0x00ffffff) | (((x)&0x30000000)>>VIO_SHIFT)) + VIO_BASE )
36#define io_v2p( x ) \
37 ( (((x)&0x00ffffff) | (((x)&(0x30000000>>VIO_SHIFT))<<VIO_SHIFT)) + PIO_START )
38
39#ifndef __ASSEMBLY__
40
41# define __REG(x) (*((volatile unsigned long *)io_p2v(x)))
42# define __PREG(x) (io_v2p((unsigned long)&(x)))
43
44#else
45
46# define __REG(x) io_p2v(x)
47# define __PREG(x) io_v2p(x)
48
49#endif
50
51#include "SA-1100.h"
52
53#ifdef CONFIG_SA1101
54#include "SA-1101.h"
55#endif
56
57#endif /* _ASM_ARCH_HARDWARE_H */
diff --git a/arch/arm/mach-sa1100/include/mach/ide.h b/arch/arm/mach-sa1100/include/mach/ide.h
new file mode 100644
index 000000000000..4c99c8f5e617
--- /dev/null
+++ b/arch/arm/mach-sa1100/include/mach/ide.h
@@ -0,0 +1,75 @@
1/*
2 * arch/arm/mach-sa1100/include/mach/ide.h
3 *
4 * Copyright (c) 1998 Hugo Fiennes & Nicolas Pitre
5 *
6 * 18-aug-2000: Cleanup by Erik Mouw (J.A.K.Mouw@its.tudelft.nl)
7 * Get rid of the special ide_init_hwif_ports() functions
8 * and make a generalised function that can be used by all
9 * architectures.
10 */
11
12#include <asm/irq.h>
13#include <mach/hardware.h>
14#include <asm/mach-types.h>
15
16#error "This code is broken and needs update to match with current ide support"
17
18
19/*
20 * Set up a hw structure for a specified data port, control port and IRQ.
21 * This should follow whatever the default interface uses.
22 */
23static inline void ide_init_hwif_ports(hw_regs_t *hw, unsigned long data_port,
24 unsigned long ctrl_port, int *irq)
25{
26 unsigned long reg = data_port;
27 int i;
28 int regincr = 1;
29
30 /* The Empeg board has the first two address lines unused */
31 if (machine_is_empeg())
32 regincr = 1 << 2;
33
34 /* The LART doesn't use A0 for IDE */
35 if (machine_is_lart())
36 regincr = 1 << 1;
37
38 memset(hw, 0, sizeof(*hw));
39
40 for (i = 0; i <= 7; i++) {
41 hw->io_ports_array[i] = reg;
42 reg += regincr;
43 }
44
45 hw->io_ports.ctl_addr = ctrl_port;
46
47 if (irq)
48 *irq = 0;
49}
50
51/*
52 * This registers the standard ports for this architecture with the IDE
53 * driver.
54 */
55static __inline__ void
56ide_init_default_hwifs(void)
57{
58 if (machine_is_lart()) {
59#ifdef CONFIG_SA1100_LART
60 hw_regs_t hw;
61
62 /* Enable GPIO as interrupt line */
63 GPDR &= ~LART_GPIO_IDE;
64 set_irq_type(LART_IRQ_IDE, IRQ_TYPE_EDGE_RISING);
65
66 /* set PCMCIA interface timing */
67 MECR = 0x00060006;
68
69 /* init the interface */
70 ide_init_hwif_ports(&hw, PCMCIA_IO_0_BASE + 0x0000, PCMCIA_IO_0_BASE + 0x1000, NULL);
71 hw.irq = LART_IRQ_IDE;
72 ide_register_hw(&hw);
73#endif
74 }
75}
diff --git a/arch/arm/mach-sa1100/include/mach/io.h b/arch/arm/mach-sa1100/include/mach/io.h
new file mode 100644
index 000000000000..0c070a6149bc
--- /dev/null
+++ b/arch/arm/mach-sa1100/include/mach/io.h
@@ -0,0 +1,26 @@
1/*
2 * arch/arm/mach-sa1100/include/mach/io.h
3 *
4 * Copyright (C) 1997-1999 Russell King
5 *
6 * Modifications:
7 * 06-12-1997 RMK Created.
8 * 07-04-1999 RMK Major cleanup
9 */
10#ifndef __ASM_ARM_ARCH_IO_H
11#define __ASM_ARM_ARCH_IO_H
12
13#define IO_SPACE_LIMIT 0xffffffff
14
15/*
16 * We don't actually have real ISA nor PCI buses, but there is so many
17 * drivers out there that might just work if we fake them...
18 */
19static inline void __iomem *__io(unsigned long addr)
20{
21 return (void __iomem *)addr;
22}
23#define __io(a) __io(a)
24#define __mem_pci(a) (a)
25
26#endif
diff --git a/arch/arm/mach-sa1100/include/mach/irqs.h b/arch/arm/mach-sa1100/include/mach/irqs.h
new file mode 100644
index 000000000000..0cb36609b3ac
--- /dev/null
+++ b/arch/arm/mach-sa1100/include/mach/irqs.h
@@ -0,0 +1,197 @@
1/*
2 * arch/arm/mach-sa1100/include/mach/irqs.h
3 *
4 * Copyright (C) 1996 Russell King
5 * Copyright (C) 1998 Deborah Wallach (updates for SA1100/Brutus).
6 * Copyright (C) 1999 Nicolas Pitre (full GPIO irq isolation)
7 *
8 * 2001/11/14 RMK Cleaned up and standardised a lot of the IRQs.
9 */
10
11#define IRQ_GPIO0 0
12#define IRQ_GPIO1 1
13#define IRQ_GPIO2 2
14#define IRQ_GPIO3 3
15#define IRQ_GPIO4 4
16#define IRQ_GPIO5 5
17#define IRQ_GPIO6 6
18#define IRQ_GPIO7 7
19#define IRQ_GPIO8 8
20#define IRQ_GPIO9 9
21#define IRQ_GPIO10 10
22#define IRQ_GPIO11_27 11
23#define IRQ_LCD 12 /* LCD controller */
24#define IRQ_Ser0UDC 13 /* Ser. port 0 UDC */
25#define IRQ_Ser1SDLC 14 /* Ser. port 1 SDLC */
26#define IRQ_Ser1UART 15 /* Ser. port 1 UART */
27#define IRQ_Ser2ICP 16 /* Ser. port 2 ICP */
28#define IRQ_Ser3UART 17 /* Ser. port 3 UART */
29#define IRQ_Ser4MCP 18 /* Ser. port 4 MCP */
30#define IRQ_Ser4SSP 19 /* Ser. port 4 SSP */
31#define IRQ_DMA0 20 /* DMA controller channel 0 */
32#define IRQ_DMA1 21 /* DMA controller channel 1 */
33#define IRQ_DMA2 22 /* DMA controller channel 2 */
34#define IRQ_DMA3 23 /* DMA controller channel 3 */
35#define IRQ_DMA4 24 /* DMA controller channel 4 */
36#define IRQ_DMA5 25 /* DMA controller channel 5 */
37#define IRQ_OST0 26 /* OS Timer match 0 */
38#define IRQ_OST1 27 /* OS Timer match 1 */
39#define IRQ_OST2 28 /* OS Timer match 2 */
40#define IRQ_OST3 29 /* OS Timer match 3 */
41#define IRQ_RTC1Hz 30 /* RTC 1 Hz clock */
42#define IRQ_RTCAlrm 31 /* RTC Alarm */
43
44#define IRQ_GPIO11 32
45#define IRQ_GPIO12 33
46#define IRQ_GPIO13 34
47#define IRQ_GPIO14 35
48#define IRQ_GPIO15 36
49#define IRQ_GPIO16 37
50#define IRQ_GPIO17 38
51#define IRQ_GPIO18 39
52#define IRQ_GPIO19 40
53#define IRQ_GPIO20 41
54#define IRQ_GPIO21 42
55#define IRQ_GPIO22 43
56#define IRQ_GPIO23 44
57#define IRQ_GPIO24 45
58#define IRQ_GPIO25 46
59#define IRQ_GPIO26 47
60#define IRQ_GPIO27 48
61
62/*
63 * The next 16 interrupts are for board specific purposes. Since
64 * the kernel can only run on one machine at a time, we can re-use
65 * these. If you need more, increase IRQ_BOARD_END, but keep it
66 * within sensible limits. IRQs 49 to 64 are available.
67 */
68#define IRQ_BOARD_START 49
69#define IRQ_BOARD_END 65
70
71#define IRQ_SA1111_START (IRQ_BOARD_END)
72#define IRQ_GPAIN0 (IRQ_BOARD_END + 0)
73#define IRQ_GPAIN1 (IRQ_BOARD_END + 1)
74#define IRQ_GPAIN2 (IRQ_BOARD_END + 2)
75#define IRQ_GPAIN3 (IRQ_BOARD_END + 3)
76#define IRQ_GPBIN0 (IRQ_BOARD_END + 4)
77#define IRQ_GPBIN1 (IRQ_BOARD_END + 5)
78#define IRQ_GPBIN2 (IRQ_BOARD_END + 6)
79#define IRQ_GPBIN3 (IRQ_BOARD_END + 7)
80#define IRQ_GPBIN4 (IRQ_BOARD_END + 8)
81#define IRQ_GPBIN5 (IRQ_BOARD_END + 9)
82#define IRQ_GPCIN0 (IRQ_BOARD_END + 10)
83#define IRQ_GPCIN1 (IRQ_BOARD_END + 11)
84#define IRQ_GPCIN2 (IRQ_BOARD_END + 12)
85#define IRQ_GPCIN3 (IRQ_BOARD_END + 13)
86#define IRQ_GPCIN4 (IRQ_BOARD_END + 14)
87#define IRQ_GPCIN5 (IRQ_BOARD_END + 15)
88#define IRQ_GPCIN6 (IRQ_BOARD_END + 16)
89#define IRQ_GPCIN7 (IRQ_BOARD_END + 17)
90#define IRQ_MSTXINT (IRQ_BOARD_END + 18)
91#define IRQ_MSRXINT (IRQ_BOARD_END + 19)
92#define IRQ_MSSTOPERRINT (IRQ_BOARD_END + 20)
93#define IRQ_TPTXINT (IRQ_BOARD_END + 21)
94#define IRQ_TPRXINT (IRQ_BOARD_END + 22)
95#define IRQ_TPSTOPERRINT (IRQ_BOARD_END + 23)
96#define SSPXMTINT (IRQ_BOARD_END + 24)
97#define SSPRCVINT (IRQ_BOARD_END + 25)
98#define SSPROR (IRQ_BOARD_END + 26)
99#define AUDXMTDMADONEA (IRQ_BOARD_END + 32)
100#define AUDRCVDMADONEA (IRQ_BOARD_END + 33)
101#define AUDXMTDMADONEB (IRQ_BOARD_END + 34)
102#define AUDRCVDMADONEB (IRQ_BOARD_END + 35)
103#define AUDTFSR (IRQ_BOARD_END + 36)
104#define AUDRFSR (IRQ_BOARD_END + 37)
105#define AUDTUR (IRQ_BOARD_END + 38)
106#define AUDROR (IRQ_BOARD_END + 39)
107#define AUDDTS (IRQ_BOARD_END + 40)
108#define AUDRDD (IRQ_BOARD_END + 41)
109#define AUDSTO (IRQ_BOARD_END + 42)
110#define IRQ_USBPWR (IRQ_BOARD_END + 43)
111#define IRQ_HCIM (IRQ_BOARD_END + 44)
112#define IRQ_HCIBUFFACC (IRQ_BOARD_END + 45)
113#define IRQ_HCIRMTWKP (IRQ_BOARD_END + 46)
114#define IRQ_NHCIMFCIR (IRQ_BOARD_END + 47)
115#define IRQ_USB_PORT_RESUME (IRQ_BOARD_END + 48)
116#define IRQ_S0_READY_NINT (IRQ_BOARD_END + 49)
117#define IRQ_S1_READY_NINT (IRQ_BOARD_END + 50)
118#define IRQ_S0_CD_VALID (IRQ_BOARD_END + 51)
119#define IRQ_S1_CD_VALID (IRQ_BOARD_END + 52)
120#define IRQ_S0_BVD1_STSCHG (IRQ_BOARD_END + 53)
121#define IRQ_S1_BVD1_STSCHG (IRQ_BOARD_END + 54)
122
123#define IRQ_LOCOMO_START (IRQ_BOARD_END)
124#define IRQ_LOCOMO_KEY (IRQ_BOARD_END + 0)
125#define IRQ_LOCOMO_GPIO0 (IRQ_BOARD_END + 1)
126#define IRQ_LOCOMO_GPIO1 (IRQ_BOARD_END + 2)
127#define IRQ_LOCOMO_GPIO2 (IRQ_BOARD_END + 3)
128#define IRQ_LOCOMO_GPIO3 (IRQ_BOARD_END + 4)
129#define IRQ_LOCOMO_GPIO4 (IRQ_BOARD_END + 5)
130#define IRQ_LOCOMO_GPIO5 (IRQ_BOARD_END + 6)
131#define IRQ_LOCOMO_GPIO6 (IRQ_BOARD_END + 7)
132#define IRQ_LOCOMO_GPIO7 (IRQ_BOARD_END + 8)
133#define IRQ_LOCOMO_GPIO8 (IRQ_BOARD_END + 9)
134#define IRQ_LOCOMO_GPIO9 (IRQ_BOARD_END + 10)
135#define IRQ_LOCOMO_GPIO10 (IRQ_BOARD_END + 11)
136#define IRQ_LOCOMO_GPIO11 (IRQ_BOARD_END + 12)
137#define IRQ_LOCOMO_GPIO12 (IRQ_BOARD_END + 13)
138#define IRQ_LOCOMO_GPIO13 (IRQ_BOARD_END + 14)
139#define IRQ_LOCOMO_GPIO14 (IRQ_BOARD_END + 15)
140#define IRQ_LOCOMO_GPIO15 (IRQ_BOARD_END + 16)
141#define IRQ_LOCOMO_LT (IRQ_BOARD_END + 17)
142#define IRQ_LOCOMO_SPI_RFR (IRQ_BOARD_END + 18)
143#define IRQ_LOCOMO_SPI_RFW (IRQ_BOARD_END + 19)
144#define IRQ_LOCOMO_SPI_REND (IRQ_BOARD_END + 20)
145#define IRQ_LOCOMO_SPI_TEND (IRQ_BOARD_END + 21)
146
147/*
148 * Figure out the MAX IRQ number.
149 *
150 * If we have an SA1111, the max IRQ is S1_BVD1_STSCHG+1.
151 * If we have an LoCoMo, the max IRQ is IRQ_LOCOMO_SPI_TEND+1
152 * Otherwise, we have the standard IRQs only.
153 */
154#ifdef CONFIG_SA1111
155#define NR_IRQS (IRQ_S1_BVD1_STSCHG + 1)
156#elif defined(CONFIG_SA1100_H3800)
157#define NR_IRQS (IRQ_BOARD_END)
158#elif defined(CONFIG_SHARP_LOCOMO)
159#define NR_IRQS (IRQ_LOCOMO_SPI_TEND + 1)
160#else
161#define NR_IRQS (IRQ_BOARD_START)
162#endif
163
164/*
165 * Board specific IRQs. Define them here.
166 * Do not surround them with ifdefs.
167 */
168#define IRQ_NEPONSET_SMC9196 (IRQ_BOARD_START + 0)
169#define IRQ_NEPONSET_USAR (IRQ_BOARD_START + 1)
170#define IRQ_NEPONSET_SA1111 (IRQ_BOARD_START + 2)
171
172/* LoCoMo Interrupts (CONFIG_SHARP_LOCOMO) */
173#define IRQ_LOCOMO_KEY_BASE (IRQ_BOARD_START + 0)
174#define IRQ_LOCOMO_GPIO_BASE (IRQ_BOARD_START + 1)
175#define IRQ_LOCOMO_LT_BASE (IRQ_BOARD_START + 2)
176#define IRQ_LOCOMO_SPI_BASE (IRQ_BOARD_START + 3)
177
178/* H3800-specific IRQs (CONFIG_SA1100_H3800) */
179#define H3800_KPIO_IRQ_START (IRQ_BOARD_START)
180#define IRQ_H3800_KEY (IRQ_BOARD_START + 0)
181#define IRQ_H3800_SPI (IRQ_BOARD_START + 1)
182#define IRQ_H3800_OWM (IRQ_BOARD_START + 2)
183#define IRQ_H3800_ADC (IRQ_BOARD_START + 3)
184#define IRQ_H3800_UART_0 (IRQ_BOARD_START + 4)
185#define IRQ_H3800_UART_1 (IRQ_BOARD_START + 5)
186#define IRQ_H3800_TIMER_0 (IRQ_BOARD_START + 6)
187#define IRQ_H3800_TIMER_1 (IRQ_BOARD_START + 7)
188#define IRQ_H3800_TIMER_2 (IRQ_BOARD_START + 8)
189#define H3800_KPIO_IRQ_COUNT 9
190
191#define H3800_GPIO_IRQ_START (IRQ_BOARD_START + 9)
192#define IRQ_H3800_PEN (IRQ_BOARD_START + 9)
193#define IRQ_H3800_SD_DETECT (IRQ_BOARD_START + 10)
194#define IRQ_H3800_EAR_IN (IRQ_BOARD_START + 11)
195#define IRQ_H3800_USB_DETECT (IRQ_BOARD_START + 12)
196#define IRQ_H3800_SD_CON_SLT (IRQ_BOARD_START + 13)
197#define H3800_GPIO_IRQ_COUNT 5
diff --git a/arch/arm/mach-sa1100/include/mach/jornada720.h b/arch/arm/mach-sa1100/include/mach/jornada720.h
new file mode 100644
index 000000000000..bc120850d313
--- /dev/null
+++ b/arch/arm/mach-sa1100/include/mach/jornada720.h
@@ -0,0 +1,27 @@
1/*
2 * arch/arm/mach-sa1100/include/mach/jornada720.h
3 *
4 * This file contains SSP/MCU communication definitions for HP Jornada 710/720/728
5 *
6 * Copyright (C) 2007 Kristoffer Ericson <Kristoffer.Ericson@gmail.com>
7 * Copyright (C) 2000 John Ankcorn <jca@lcs.mit.edu>
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12 *
13 */
14
15 /* HP Jornada 7xx microprocessor commands */
16#define GETBATTERYDATA 0xc0
17#define GETSCANKEYCODE 0x90
18#define GETTOUCHSAMPLES 0xa0
19#define GETCONTRAST 0xD0
20#define SETCONTRAST 0xD1
21#define GETBRIGHTNESS 0xD2
22#define SETBRIGHTNESS 0xD3
23#define CONTRASTOFF 0xD8
24#define BRIGHTNESSOFF 0xD9
25#define PWMOFF 0xDF
26#define TXDUMMY 0x11
27#define ERRORCODE 0x00
diff --git a/include/asm-arm/arch-sa1100/lart.h b/arch/arm/mach-sa1100/include/mach/lart.h
index 8a5482d908db..8a5482d908db 100644
--- a/include/asm-arm/arch-sa1100/lart.h
+++ b/arch/arm/mach-sa1100/include/mach/lart.h
diff --git a/arch/arm/mach-sa1100/include/mach/mcp.h b/arch/arm/mach-sa1100/include/mach/mcp.h
new file mode 100644
index 000000000000..fb8b09a57ad7
--- /dev/null
+++ b/arch/arm/mach-sa1100/include/mach/mcp.h
@@ -0,0 +1,21 @@
1/*
2 * arch/arm/mach-sa1100/include/mach/mcp.h
3 *
4 * Copyright (C) 2005 Russell King.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10#ifndef __ASM_ARM_ARCH_MCP_H
11#define __ASM_ARM_ARCH_MCP_H
12
13#include <linux/types.h>
14
15struct mcp_plat_data {
16 u32 mccr0;
17 u32 mccr1;
18 unsigned int sclk_rate;
19};
20
21#endif
diff --git a/arch/arm/mach-sa1100/include/mach/memory.h b/arch/arm/mach-sa1100/include/mach/memory.h
new file mode 100644
index 000000000000..29f639e2afc6
--- /dev/null
+++ b/arch/arm/mach-sa1100/include/mach/memory.h
@@ -0,0 +1,68 @@
1/*
2 * arch/arm/mach-sa1100/include/mach/memory.h
3 *
4 * Copyright (C) 1999-2000 Nicolas Pitre <nico@cam.org>
5 */
6
7#ifndef __ASM_ARCH_MEMORY_H
8#define __ASM_ARCH_MEMORY_H
9
10#include <asm/sizes.h>
11
12/*
13 * Physical DRAM offset is 0xc0000000 on the SA1100
14 */
15#define PHYS_OFFSET UL(0xc0000000)
16
17#ifndef __ASSEMBLY__
18
19#ifdef CONFIG_SA1111
20void sa1111_adjust_zones(int node, unsigned long *size, unsigned long *holes);
21
22#define arch_adjust_zones(node, size, holes) \
23 sa1111_adjust_zones(node, size, holes)
24
25#define ISA_DMA_THRESHOLD (PHYS_OFFSET + SZ_1M - 1)
26
27#endif
28#endif
29
30/*
31 * Virtual view <-> DMA view memory address translations
32 * virt_to_bus: Used to translate the virtual address to an
33 * address suitable to be passed to set_dma_addr
34 * bus_to_virt: Used to convert an address for DMA operations
35 * to an address that the kernel can use.
36 *
37 * On the SA1100, bus addresses are equivalent to physical addresses.
38 */
39#define __virt_to_bus(x) __virt_to_phys(x)
40#define __bus_to_virt(x) __phys_to_virt(x)
41
42/*
43 * Because of the wide memory address space between physical RAM banks on the
44 * SA1100, it's much convenient to use Linux's NUMA support to implement our
45 * memory map representation. Assuming all memory nodes have equal access
46 * characteristics, we then have generic discontiguous memory support.
47 *
48 * Of course, all this isn't mandatory for SA1100 implementations with only
49 * one used memory bank. For those, simply undefine CONFIG_DISCONTIGMEM.
50 *
51 * The nodes are matched with the physical memory bank addresses which are
52 * incidentally the same as virtual addresses.
53 *
54 * node 0: 0xc0000000 - 0xc7ffffff
55 * node 1: 0xc8000000 - 0xcfffffff
56 * node 2: 0xd0000000 - 0xd7ffffff
57 * node 3: 0xd8000000 - 0xdfffffff
58 */
59#define NODE_MEM_SIZE_BITS 27
60
61/*
62 * Cache flushing area - SA1100 zero bank
63 */
64#define FLUSH_BASE_PHYS 0xe0000000
65#define FLUSH_BASE 0xf5000000
66#define FLUSH_BASE_MINICACHE 0xf5100000
67
68#endif
diff --git a/include/asm-arm/arch-sa1100/mtd-xip.h b/arch/arm/mach-sa1100/include/mach/mtd-xip.h
index 80cfdac2b944..80cfdac2b944 100644
--- a/include/asm-arm/arch-sa1100/mtd-xip.h
+++ b/arch/arm/mach-sa1100/include/mach/mtd-xip.h
diff --git a/arch/arm/mach-sa1100/include/mach/neponset.h b/arch/arm/mach-sa1100/include/mach/neponset.h
new file mode 100644
index 000000000000..d3f044f92c00
--- /dev/null
+++ b/arch/arm/mach-sa1100/include/mach/neponset.h
@@ -0,0 +1,74 @@
1/*
2 * arch/arm/mach-sa1100/include/mach/neponset.h
3 *
4 * Created 2000/06/05 by Nicolas Pitre <nico@cam.org>
5 *
6 * This file contains the hardware specific definitions for Assabet
7 * Only include this file from SA1100-specific files.
8 *
9 * 2000/05/23 John Dorsey <john+@cs.cmu.edu>
10 * Definitions for Neponset added.
11 */
12#ifndef __ASM_ARCH_NEPONSET_H
13#define __ASM_ARCH_NEPONSET_H
14
15/*
16 * Neponset definitions:
17 */
18
19#define NEPONSET_CPLD_BASE (0x10000000)
20#define Nep_p2v( x ) ((x) - NEPONSET_CPLD_BASE + 0xf3000000)
21#define Nep_v2p( x ) ((x) - 0xf3000000 + NEPONSET_CPLD_BASE)
22
23#define _IRR 0x10000024 /* Interrupt Reason Register */
24#define _AUD_CTL 0x100000c0 /* Audio controls (RW) */
25#define _MDM_CTL_0 0x100000b0 /* Modem control 0 (RW) */
26#define _MDM_CTL_1 0x100000b4 /* Modem control 1 (RW) */
27#define _NCR_0 0x100000a0 /* Control Register (RW) */
28#define _KP_X_OUT 0x10000090 /* Keypad row write (RW) */
29#define _KP_Y_IN 0x10000080 /* Keypad column read (RO) */
30#define _SWPK 0x10000020 /* Switch pack (RO) */
31#define _WHOAMI 0x10000000 /* System ID Register (RO) */
32
33#define _LEDS 0x10000010 /* LEDs [31:0] (WO) */
34
35#define IRR (*((volatile u_char *) Nep_p2v(_IRR)))
36#define AUD_CTL (*((volatile u_char *) Nep_p2v(_AUD_CTL)))
37#define MDM_CTL_0 (*((volatile u_char *) Nep_p2v(_MDM_CTL_0)))
38#define MDM_CTL_1 (*((volatile u_char *) Nep_p2v(_MDM_CTL_1)))
39#define NCR_0 (*((volatile u_char *) Nep_p2v(_NCR_0)))
40#define KP_X_OUT (*((volatile u_char *) Nep_p2v(_KP_X_OUT)))
41#define KP_Y_IN (*((volatile u_char *) Nep_p2v(_KP_Y_IN)))
42#define SWPK (*((volatile u_char *) Nep_p2v(_SWPK)))
43#define WHOAMI (*((volatile u_char *) Nep_p2v(_WHOAMI)))
44
45#define LEDS (*((volatile Word *) Nep_p2v(_LEDS)))
46
47#define IRR_ETHERNET (1<<0)
48#define IRR_USAR (1<<1)
49#define IRR_SA1111 (1<<2)
50
51#define AUD_SEL_1341 (1<<0)
52#define AUD_MUTE_1341 (1<<1)
53
54#define MDM_CTL0_RTS1 (1 << 0)
55#define MDM_CTL0_DTR1 (1 << 1)
56#define MDM_CTL0_RTS2 (1 << 2)
57#define MDM_CTL0_DTR2 (1 << 3)
58
59#define MDM_CTL1_CTS1 (1 << 0)
60#define MDM_CTL1_DSR1 (1 << 1)
61#define MDM_CTL1_DCD1 (1 << 2)
62#define MDM_CTL1_CTS2 (1 << 3)
63#define MDM_CTL1_DSR2 (1 << 4)
64#define MDM_CTL1_DCD2 (1 << 5)
65
66#define NCR_GP01_OFF (1<<0)
67#define NCR_TP_PWR_EN (1<<1)
68#define NCR_MS_PWR_EN (1<<2)
69#define NCR_ENET_OSC_EN (1<<3)
70#define NCR_SPI_KB_WK_UP (1<<4)
71#define NCR_A0VPP (1<<5)
72#define NCR_A1VPP (1<<6)
73
74#endif
diff --git a/arch/arm/mach-sa1100/include/mach/reset.h b/arch/arm/mach-sa1100/include/mach/reset.h
new file mode 100644
index 000000000000..f61957e6842a
--- /dev/null
+++ b/arch/arm/mach-sa1100/include/mach/reset.h
@@ -0,0 +1,18 @@
1#ifndef __ASM_ARCH_RESET_H
2#define __ASM_ARCH_RESET_H
3
4#include "hardware.h"
5
6#define RESET_STATUS_HARDWARE (1 << 0) /* Hardware Reset */
7#define RESET_STATUS_WATCHDOG (1 << 1) /* Watchdog Reset */
8#define RESET_STATUS_LOWPOWER (1 << 2) /* Exit from Low Power/Sleep */
9#define RESET_STATUS_GPIO (1 << 3) /* GPIO Reset */
10#define RESET_STATUS_ALL (0xf)
11
12extern unsigned int reset_status;
13static inline void clear_reset_status(unsigned int mask)
14{
15 RCSR = mask;
16}
17
18#endif /* __ASM_ARCH_RESET_H */
diff --git a/include/asm-arm/arch-sa1100/shannon.h b/arch/arm/mach-sa1100/include/mach/shannon.h
index ec27d6e12140..ec27d6e12140 100644
--- a/include/asm-arm/arch-sa1100/shannon.h
+++ b/arch/arm/mach-sa1100/include/mach/shannon.h
diff --git a/arch/arm/mach-sa1100/include/mach/simpad.h b/arch/arm/mach-sa1100/include/mach/simpad.h
new file mode 100644
index 000000000000..9296c4513ce1
--- /dev/null
+++ b/arch/arm/mach-sa1100/include/mach/simpad.h
@@ -0,0 +1,112 @@
1/*
2 * arch/arm/mach-sa1100/include/mach/simpad.h
3 *
4 * based of assabet.h same as HUW_Webpanel
5 *
6 * This file contains the hardware specific definitions for SIMpad
7 *
8 * 2001/05/14 Juergen Messerer <juergen.messerer@freesurf.ch>
9 */
10
11#ifndef __ASM_ARCH_SIMPAD_H
12#define __ASM_ARCH_SIMPAD_H
13
14
15#define GPIO_UART1_RTS GPIO_GPIO14
16#define GPIO_UART1_DTR GPIO_GPIO7
17#define GPIO_UART1_CTS GPIO_GPIO8
18#define GPIO_UART1_DCD GPIO_GPIO23
19#define GPIO_UART1_DSR GPIO_GPIO6
20
21#define GPIO_UART3_RTS GPIO_GPIO12
22#define GPIO_UART3_DTR GPIO_GPIO16
23#define GPIO_UART3_CTS GPIO_GPIO13
24#define GPIO_UART3_DCD GPIO_GPIO18
25#define GPIO_UART3_DSR GPIO_GPIO17
26
27#define GPIO_POWER_BUTTON GPIO_GPIO0
28#define GPIO_UCB1300_IRQ GPIO_GPIO22 /* UCB GPIO and touchscreen */
29
30#define IRQ_UART1_CTS IRQ_GPIO15
31#define IRQ_UART1_DCD GPIO_GPIO23
32#define IRQ_UART1_DSR GPIO_GPIO6
33#define IRQ_UART3_CTS GPIO_GPIO13
34#define IRQ_UART3_DCD GPIO_GPIO18
35#define IRQ_UART3_DSR GPIO_GPIO17
36
37#define IRQ_GPIO_UCB1300_IRQ IRQ_GPIO22
38#define IRQ_GPIO_POWER_BUTTON IRQ_GPIO0
39
40
41/*--- PCMCIA ---*/
42#define GPIO_CF_CD GPIO_GPIO24
43#define GPIO_CF_IRQ GPIO_GPIO1
44#define IRQ_GPIO_CF_IRQ IRQ_GPIO1
45#define IRQ_GPIO_CF_CD IRQ_GPIO24
46
47/*--- SmartCard ---*/
48#define GPIO_SMART_CARD GPIO_GPIO10
49#define IRQ_GPIO_SMARD_CARD IRQ_GPIO10
50
51// CS3 Latch is write only, a shadow is necessary
52
53#define CS3BUSTYPE unsigned volatile long
54#define CS3_BASE 0xf1000000
55
56#define VCC_5V_EN 0x0001 // For 5V PCMCIA
57#define VCC_3V_EN 0x0002 // FOR 3.3V PCMCIA
58#define EN1 0x0004 // This is only for EPROM's
59#define EN0 0x0008 // Both should be enable for 3.3V or 5V
60#define DISPLAY_ON 0x0010
61#define PCMCIA_BUFF_DIS 0x0020
62#define MQ_RESET 0x0040
63#define PCMCIA_RESET 0x0080
64#define DECT_POWER_ON 0x0100
65#define IRDA_SD 0x0200 // Shutdown for powersave
66#define RS232_ON 0x0400
67#define SD_MEDIAQ 0x0800 // Shutdown for powersave
68#define LED2_ON 0x1000
69#define IRDA_MODE 0x2000 // Fast/Slow IrDA mode
70#define ENABLE_5V 0x4000 // Enable 5V circuit
71#define RESET_SIMCARD 0x8000
72
73#define RS232_ENABLE 0x0440
74#define PCMCIAMASK 0x402f
75
76
77struct simpad_battery {
78 unsigned char ac_status; /* line connected yes/no */
79 unsigned char status; /* battery loading yes/no */
80 unsigned char percentage; /* percentage loaded */
81 unsigned short life; /* life till empty */
82};
83
84/* These should match the apm_bios.h definitions */
85#define SIMPAD_AC_STATUS_AC_OFFLINE 0x00
86#define SIMPAD_AC_STATUS_AC_ONLINE 0x01
87#define SIMPAD_AC_STATUS_AC_BACKUP 0x02 /* What does this mean? */
88#define SIMPAD_AC_STATUS_AC_UNKNOWN 0xff
89
90/* These bitfields are rarely "or'd" together */
91#define SIMPAD_BATT_STATUS_HIGH 0x01
92#define SIMPAD_BATT_STATUS_LOW 0x02
93#define SIMPAD_BATT_STATUS_CRITICAL 0x04
94#define SIMPAD_BATT_STATUS_CHARGING 0x08
95#define SIMPAD_BATT_STATUS_CHARGE_MAIN 0x10
96#define SIMPAD_BATT_STATUS_DEAD 0x20 /* Battery will not charge */
97#define SIMPAD_BATT_NOT_INSTALLED 0x20 /* For expansion pack batteries */
98#define SIMPAD_BATT_STATUS_FULL 0x40 /* Battery fully charged (and connected to AC) */
99#define SIMPAD_BATT_STATUS_NOBATT 0x80
100#define SIMPAD_BATT_STATUS_UNKNOWN 0xff
101
102extern int simpad_get_battery(struct simpad_battery* );
103
104#endif // __ASM_ARCH_SIMPAD_H
105
106
107
108
109
110
111
112
diff --git a/arch/arm/mach-sa1100/include/mach/system.h b/arch/arm/mach-sa1100/include/mach/system.h
new file mode 100644
index 000000000000..63755ca5b1b4
--- /dev/null
+++ b/arch/arm/mach-sa1100/include/mach/system.h
@@ -0,0 +1,22 @@
1/*
2 * arch/arm/mach-sa1100/include/mach/system.h
3 *
4 * Copyright (c) 1999 Nicolas Pitre <nico@cam.org>
5 */
6#include <mach/hardware.h>
7
8static inline void arch_idle(void)
9{
10 cpu_do_idle();
11}
12
13static inline void arch_reset(char mode)
14{
15 if (mode == 's') {
16 /* Jump into ROM at address 0 */
17 cpu_reset(0);
18 } else {
19 /* Use on-chip reset capability */
20 RSRR = RSRR_SWR;
21 }
22}
diff --git a/arch/arm/mach-sa1100/include/mach/timex.h b/arch/arm/mach-sa1100/include/mach/timex.h
new file mode 100644
index 000000000000..7a5d017b58b3
--- /dev/null
+++ b/arch/arm/mach-sa1100/include/mach/timex.h
@@ -0,0 +1,12 @@
1/*
2 * arch/arm/mach-sa1100/include/mach/timex.h
3 *
4 * SA1100 architecture timex specifications
5 *
6 * Copyright (C) 1998
7 */
8
9/*
10 * SA1100 timer
11 */
12#define CLOCK_TICK_RATE 3686400
diff --git a/arch/arm/mach-sa1100/include/mach/uncompress.h b/arch/arm/mach-sa1100/include/mach/uncompress.h
new file mode 100644
index 000000000000..714160b03d7a
--- /dev/null
+++ b/arch/arm/mach-sa1100/include/mach/uncompress.h
@@ -0,0 +1,50 @@
1/*
2 * arch/arm/mach-sa1100/include/mach/uncompress.h
3 *
4 * (C) 1999 Nicolas Pitre <nico@cam.org>
5 *
6 * Reorganised to be machine independent.
7 */
8
9#include "hardware.h"
10
11/*
12 * The following code assumes the serial port has already been
13 * initialized by the bootloader. We search for the first enabled
14 * port in the most probable order. If you didn't setup a port in
15 * your bootloader then nothing will appear (which might be desired).
16 */
17
18#define UART(x) (*(volatile unsigned long *)(serial_port + (x)))
19
20static void putc(int c)
21{
22 unsigned long serial_port;
23
24 do {
25 serial_port = _Ser3UTCR0;
26 if (UART(UTCR3) & UTCR3_TXE) break;
27 serial_port = _Ser1UTCR0;
28 if (UART(UTCR3) & UTCR3_TXE) break;
29 serial_port = _Ser2UTCR0;
30 if (UART(UTCR3) & UTCR3_TXE) break;
31 return;
32 } while (0);
33
34 /* wait for space in the UART's transmitter */
35 while (!(UART(UTSR1) & UTSR1_TNF))
36 barrier();
37
38 /* send the character out. */
39 UART(UTDR) = c;
40}
41
42static inline void flush(void)
43{
44}
45
46/*
47 * Nothing to do for these
48 */
49#define arch_decomp_setup()
50#define arch_decomp_wdog()
diff --git a/arch/arm/mach-sa1100/include/mach/vmalloc.h b/arch/arm/mach-sa1100/include/mach/vmalloc.h
new file mode 100644
index 000000000000..ec8fdc5a3606
--- /dev/null
+++ b/arch/arm/mach-sa1100/include/mach/vmalloc.h
@@ -0,0 +1,4 @@
1/*
2 * arch/arm/mach-sa1100/include/mach/vmalloc.h
3 */
4#define VMALLOC_END (0xe8000000)
diff --git a/arch/arm/mach-sa1100/irq.c b/arch/arm/mach-sa1100/irq.c
index c5e438b12ec7..86369a8f0cea 100644
--- a/arch/arm/mach-sa1100/irq.c
+++ b/arch/arm/mach-sa1100/irq.c
@@ -16,7 +16,7 @@
16#include <linux/ioport.h> 16#include <linux/ioport.h>
17#include <linux/sysdev.h> 17#include <linux/sysdev.h>
18 18
19#include <asm/hardware.h> 19#include <mach/hardware.h>
20#include <asm/mach/irq.h> 20#include <asm/mach/irq.h>
21 21
22#include "generic.h" 22#include "generic.h"
diff --git a/arch/arm/mach-sa1100/jornada720.c b/arch/arm/mach-sa1100/jornada720.c
index 52ac37d1e23a..81848aa96424 100644
--- a/arch/arm/mach-sa1100/jornada720.c
+++ b/arch/arm/mach-sa1100/jornada720.c
@@ -23,7 +23,7 @@
23#include <linux/mtd/partitions.h> 23#include <linux/mtd/partitions.h>
24#include <video/s1d13xxxfb.h> 24#include <video/s1d13xxxfb.h>
25 25
26#include <asm/hardware.h> 26#include <mach/hardware.h>
27#include <asm/hardware/sa1111.h> 27#include <asm/hardware/sa1111.h>
28#include <asm/irq.h> 28#include <asm/irq.h>
29#include <asm/mach-types.h> 29#include <asm/mach-types.h>
diff --git a/arch/arm/mach-sa1100/jornada720_ssp.c b/arch/arm/mach-sa1100/jornada720_ssp.c
index 395c39bed7d8..06ea7abd9170 100644
--- a/arch/arm/mach-sa1100/jornada720_ssp.c
+++ b/arch/arm/mach-sa1100/jornada720_ssp.c
@@ -20,9 +20,9 @@
20#include <linux/sched.h> 20#include <linux/sched.h>
21#include <linux/slab.h> 21#include <linux/slab.h>
22 22
23#include <asm/hardware.h> 23#include <mach/hardware.h>
24#include <asm/hardware/ssp.h> 24#include <asm/hardware/ssp.h>
25#include <asm/arch/jornada720.h> 25#include <mach/jornada720.h>
26 26
27static DEFINE_SPINLOCK(jornada_ssp_lock); 27static DEFINE_SPINLOCK(jornada_ssp_lock);
28static unsigned long jornada_ssp_flags; 28static unsigned long jornada_ssp_flags;
diff --git a/arch/arm/mach-sa1100/lart.c b/arch/arm/mach-sa1100/lart.c
index 07d3a696ae7f..0cd52692d2f7 100644
--- a/arch/arm/mach-sa1100/lart.c
+++ b/arch/arm/mach-sa1100/lart.c
@@ -6,14 +6,14 @@
6#include <linux/kernel.h> 6#include <linux/kernel.h>
7#include <linux/tty.h> 7#include <linux/tty.h>
8 8
9#include <asm/hardware.h> 9#include <mach/hardware.h>
10#include <asm/setup.h> 10#include <asm/setup.h>
11#include <asm/mach-types.h> 11#include <asm/mach-types.h>
12 12
13#include <asm/mach/arch.h> 13#include <asm/mach/arch.h>
14#include <asm/mach/map.h> 14#include <asm/mach/map.h>
15#include <asm/mach/serial_sa1100.h> 15#include <asm/mach/serial_sa1100.h>
16#include <asm/arch/mcp.h> 16#include <mach/mcp.h>
17 17
18#include "generic.h" 18#include "generic.h"
19 19
diff --git a/arch/arm/mach-sa1100/leds-assabet.c b/arch/arm/mach-sa1100/leds-assabet.c
index ee9788989875..64e9b4b11b54 100644
--- a/arch/arm/mach-sa1100/leds-assabet.c
+++ b/arch/arm/mach-sa1100/leds-assabet.c
@@ -11,10 +11,10 @@
11 */ 11 */
12#include <linux/init.h> 12#include <linux/init.h>
13 13
14#include <asm/hardware.h> 14#include <mach/hardware.h>
15#include <asm/leds.h> 15#include <asm/leds.h>
16#include <asm/system.h> 16#include <asm/system.h>
17#include <asm/arch/assabet.h> 17#include <mach/assabet.h>
18 18
19#include "leds.h" 19#include "leds.h"
20 20
diff --git a/arch/arm/mach-sa1100/leds-badge4.c b/arch/arm/mach-sa1100/leds-badge4.c
index 280929be972d..cf1e38458b81 100644
--- a/arch/arm/mach-sa1100/leds-badge4.c
+++ b/arch/arm/mach-sa1100/leds-badge4.c
@@ -12,7 +12,7 @@
12 12
13#include <linux/init.h> 13#include <linux/init.h>
14 14
15#include <asm/hardware.h> 15#include <mach/hardware.h>
16#include <asm/leds.h> 16#include <asm/leds.h>
17#include <asm/system.h> 17#include <asm/system.h>
18 18
diff --git a/arch/arm/mach-sa1100/leds-cerf.c b/arch/arm/mach-sa1100/leds-cerf.c
index f38eeddbef10..259b48e0be89 100644
--- a/arch/arm/mach-sa1100/leds-cerf.c
+++ b/arch/arm/mach-sa1100/leds-cerf.c
@@ -5,7 +5,7 @@
5 */ 5 */
6#include <linux/init.h> 6#include <linux/init.h>
7 7
8#include <asm/hardware.h> 8#include <mach/hardware.h>
9#include <asm/leds.h> 9#include <asm/leds.h>
10#include <asm/system.h> 10#include <asm/system.h>
11 11
diff --git a/arch/arm/mach-sa1100/leds-hackkit.c b/arch/arm/mach-sa1100/leds-hackkit.c
index 7e91cc90b5ae..2bce137462e4 100644
--- a/arch/arm/mach-sa1100/leds-hackkit.c
+++ b/arch/arm/mach-sa1100/leds-hackkit.c
@@ -11,7 +11,7 @@
11 */ 11 */
12#include <linux/init.h> 12#include <linux/init.h>
13 13
14#include <asm/hardware.h> 14#include <mach/hardware.h>
15#include <asm/leds.h> 15#include <asm/leds.h>
16#include <asm/system.h> 16#include <asm/system.h>
17 17
diff --git a/arch/arm/mach-sa1100/leds-lart.c b/arch/arm/mach-sa1100/leds-lart.c
index 2d27d76cfc6b..0505a1fdcdb2 100644
--- a/arch/arm/mach-sa1100/leds-lart.c
+++ b/arch/arm/mach-sa1100/leds-lart.c
@@ -11,7 +11,7 @@
11 */ 11 */
12#include <linux/init.h> 12#include <linux/init.h>
13 13
14#include <asm/hardware.h> 14#include <mach/hardware.h>
15#include <asm/leds.h> 15#include <asm/leds.h>
16#include <asm/system.h> 16#include <asm/system.h>
17 17
diff --git a/arch/arm/mach-sa1100/leds-simpad.c b/arch/arm/mach-sa1100/leds-simpad.c
index def090a87385..d50f4eeaa12e 100644
--- a/arch/arm/mach-sa1100/leds-simpad.c
+++ b/arch/arm/mach-sa1100/leds-simpad.c
@@ -5,10 +5,10 @@
5 */ 5 */
6#include <linux/init.h> 6#include <linux/init.h>
7 7
8#include <asm/hardware.h> 8#include <mach/hardware.h>
9#include <asm/leds.h> 9#include <asm/leds.h>
10#include <asm/system.h> 10#include <asm/system.h>
11#include <asm/arch/simpad.h> 11#include <mach/simpad.h>
12 12
13#include "leds.h" 13#include "leds.h"
14 14
diff --git a/arch/arm/mach-sa1100/neponset.c b/arch/arm/mach-sa1100/neponset.c
index 967a48454f6b..4856a6bd2482 100644
--- a/arch/arm/mach-sa1100/neponset.c
+++ b/arch/arm/mach-sa1100/neponset.c
@@ -10,14 +10,14 @@
10#include <linux/platform_device.h> 10#include <linux/platform_device.h>
11#include <linux/slab.h> 11#include <linux/slab.h>
12 12
13#include <asm/hardware.h> 13#include <mach/hardware.h>
14#include <asm/mach-types.h> 14#include <asm/mach-types.h>
15#include <asm/irq.h> 15#include <asm/irq.h>
16#include <asm/mach/map.h> 16#include <asm/mach/map.h>
17#include <asm/mach/irq.h> 17#include <asm/mach/irq.h>
18#include <asm/mach/serial_sa1100.h> 18#include <asm/mach/serial_sa1100.h>
19#include <asm/arch/assabet.h> 19#include <mach/assabet.h>
20#include <asm/arch/neponset.h> 20#include <mach/neponset.h>
21#include <asm/hardware/sa1111.h> 21#include <asm/hardware/sa1111.h>
22#include <asm/sizes.h> 22#include <asm/sizes.h>
23 23
diff --git a/arch/arm/mach-sa1100/pleb.c b/arch/arm/mach-sa1100/pleb.c
index 69a71f11625e..83be1c6c5f80 100644
--- a/arch/arm/mach-sa1100/pleb.c
+++ b/arch/arm/mach-sa1100/pleb.c
@@ -11,7 +11,7 @@
11 11
12#include <linux/mtd/partitions.h> 12#include <linux/mtd/partitions.h>
13 13
14#include <asm/hardware.h> 14#include <mach/hardware.h>
15#include <asm/io.h> 15#include <asm/io.h>
16#include <asm/setup.h> 16#include <asm/setup.h>
17#include <asm/mach-types.h> 17#include <asm/mach-types.h>
@@ -20,7 +20,7 @@
20#include <asm/mach/map.h> 20#include <asm/mach/map.h>
21#include <asm/mach/flash.h> 21#include <asm/mach/flash.h>
22#include <asm/mach/serial_sa1100.h> 22#include <asm/mach/serial_sa1100.h>
23#include <asm/arch/irqs.h> 23#include <mach/irqs.h>
24 24
25#include "generic.h" 25#include "generic.h"
26 26
diff --git a/arch/arm/mach-sa1100/pm.c b/arch/arm/mach-sa1100/pm.c
index 1693d447a224..111cce67ad2f 100644
--- a/arch/arm/mach-sa1100/pm.c
+++ b/arch/arm/mach-sa1100/pm.c
@@ -27,7 +27,7 @@
27#include <linux/errno.h> 27#include <linux/errno.h>
28#include <linux/time.h> 28#include <linux/time.h>
29 29
30#include <asm/hardware.h> 30#include <mach/hardware.h>
31#include <asm/memory.h> 31#include <asm/memory.h>
32#include <asm/system.h> 32#include <asm/system.h>
33#include <asm/mach/time.h> 33#include <asm/mach/time.h>
diff --git a/arch/arm/mach-sa1100/shannon.c b/arch/arm/mach-sa1100/shannon.c
index 8acab7b1e4c2..9ccdd09cf69f 100644
--- a/arch/arm/mach-sa1100/shannon.c
+++ b/arch/arm/mach-sa1100/shannon.c
@@ -9,7 +9,7 @@
9#include <linux/mtd/mtd.h> 9#include <linux/mtd/mtd.h>
10#include <linux/mtd/partitions.h> 10#include <linux/mtd/partitions.h>
11 11
12#include <asm/hardware.h> 12#include <mach/hardware.h>
13#include <asm/mach-types.h> 13#include <asm/mach-types.h>
14#include <asm/setup.h> 14#include <asm/setup.h>
15 15
@@ -17,8 +17,8 @@
17#include <asm/mach/flash.h> 17#include <asm/mach/flash.h>
18#include <asm/mach/map.h> 18#include <asm/mach/map.h>
19#include <asm/mach/serial_sa1100.h> 19#include <asm/mach/serial_sa1100.h>
20#include <asm/arch/mcp.h> 20#include <mach/mcp.h>
21#include <asm/arch/shannon.h> 21#include <mach/shannon.h>
22 22
23#include "generic.h" 23#include "generic.h"
24 24
diff --git a/arch/arm/mach-sa1100/simpad.c b/arch/arm/mach-sa1100/simpad.c
index a9ae1b581aa6..8dd635317959 100644
--- a/arch/arm/mach-sa1100/simpad.c
+++ b/arch/arm/mach-sa1100/simpad.c
@@ -14,7 +14,7 @@
14#include <linux/mtd/partitions.h> 14#include <linux/mtd/partitions.h>
15 15
16#include <asm/irq.h> 16#include <asm/irq.h>
17#include <asm/hardware.h> 17#include <mach/hardware.h>
18#include <asm/setup.h> 18#include <asm/setup.h>
19 19
20#include <asm/mach-types.h> 20#include <asm/mach-types.h>
@@ -22,8 +22,8 @@
22#include <asm/mach/flash.h> 22#include <asm/mach/flash.h>
23#include <asm/mach/map.h> 23#include <asm/mach/map.h>
24#include <asm/mach/serial_sa1100.h> 24#include <asm/mach/serial_sa1100.h>
25#include <asm/arch/mcp.h> 25#include <mach/mcp.h>
26#include <asm/arch/simpad.h> 26#include <mach/simpad.h>
27 27
28#include <linux/serial_core.h> 28#include <linux/serial_core.h>
29#include <linux/ioport.h> 29#include <linux/ioport.h>
diff --git a/arch/arm/mach-sa1100/sleep.S b/arch/arm/mach-sa1100/sleep.S
index 5a84062f92af..171441f96710 100644
--- a/arch/arm/mach-sa1100/sleep.S
+++ b/arch/arm/mach-sa1100/sleep.S
@@ -18,7 +18,7 @@
18 18
19#include <linux/linkage.h> 19#include <linux/linkage.h>
20#include <asm/assembler.h> 20#include <asm/assembler.h>
21#include <asm/hardware.h> 21#include <mach/hardware.h>
22 22
23 23
24 24
diff --git a/arch/arm/mach-sa1100/ssp.c b/arch/arm/mach-sa1100/ssp.c
index 06206ceb312e..641f361c56f4 100644
--- a/arch/arm/mach-sa1100/ssp.c
+++ b/arch/arm/mach-sa1100/ssp.c
@@ -20,7 +20,7 @@
20 20
21#include <asm/io.h> 21#include <asm/io.h>
22#include <asm/irq.h> 22#include <asm/irq.h>
23#include <asm/hardware.h> 23#include <mach/hardware.h>
24#include <asm/hardware/ssp.h> 24#include <asm/hardware/ssp.h>
25 25
26#define TIMEOUT 100000 26#define TIMEOUT 100000
diff --git a/arch/arm/mach-sa1100/time.c b/arch/arm/mach-sa1100/time.c
index a9799cb35b74..24c0a4bae850 100644
--- a/arch/arm/mach-sa1100/time.c
+++ b/arch/arm/mach-sa1100/time.c
@@ -16,7 +16,7 @@
16#include <linux/clockchips.h> 16#include <linux/clockchips.h>
17 17
18#include <asm/mach/time.h> 18#include <asm/mach/time.h>
19#include <asm/hardware.h> 19#include <mach/hardware.h>
20 20
21#define MIN_OSCR_DELTA 2 21#define MIN_OSCR_DELTA 2
22 22
diff --git a/arch/arm/mach-shark/include/mach/debug-macro.S b/arch/arm/mach-shark/include/mach/debug-macro.S
new file mode 100644
index 000000000000..0836cb78b29a
--- /dev/null
+++ b/arch/arm/mach-shark/include/mach/debug-macro.S
@@ -0,0 +1,31 @@
1/* arch/arm/mach-shark/include/mach/debug-macro.S
2 *
3 * Debugging macro include header
4 *
5 * Copyright (C) 1994-1999 Russell King
6 * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 *
12*/
13
14 .macro addruart,rx
15 mov \rx, #0xe0000000
16 orr \rx, \rx, #0x000003f8
17 .endm
18
19 .macro senduart,rd,rx
20 strb \rd, [\rx]
21 .endm
22
23 .macro busyuart,rd,rx
24 mov \rd, #0
251001: add \rd, \rd, #1
26 teq \rd, #0x10000
27 bne 1001b
28 .endm
29
30 .macro waituart,rd,rx
31 .endm
diff --git a/arch/arm/mach-shark/include/mach/dma.h b/arch/arm/mach-shark/include/mach/dma.h
new file mode 100644
index 000000000000..c0a29bd2a74f
--- /dev/null
+++ b/arch/arm/mach-shark/include/mach/dma.h
@@ -0,0 +1,18 @@
1/*
2 * arch/arm/mach-shark/include/mach/dma.h
3 *
4 * by Alexander Schulz
5 */
6#ifndef __ASM_ARCH_DMA_H
7#define __ASM_ARCH_DMA_H
8
9/* Use only the lowest 4MB, nothing else works.
10 * The rest is not DMAable. See dev / .properties
11 * in OpenFirmware.
12 */
13#define MAX_DMA_ADDRESS 0xC0400000
14#define MAX_DMA_CHANNELS 8
15#define DMA_ISA_CASCADE 4
16
17#endif /* _ASM_ARCH_DMA_H */
18
diff --git a/arch/arm/mach-shark/include/mach/entry-macro.S b/arch/arm/mach-shark/include/mach/entry-macro.S
new file mode 100644
index 000000000000..e2853c0a3333
--- /dev/null
+++ b/arch/arm/mach-shark/include/mach/entry-macro.S
@@ -0,0 +1,41 @@
1/*
2 * arch/arm/mach-shark/include/mach/entry-macro.S
3 *
4 * Low-level IRQ helper macros for Shark platform
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10 .macro disable_fiq
11 .endm
12
13 .macro get_irqnr_preamble, base, tmp
14 .endm
15
16 .macro arch_ret_to_user, tmp1, tmp2
17 .endm
18
19 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
20 mov r4, #0xe0000000
21
22 mov \irqstat, #0x0C
23 strb \irqstat, [r4, #0x20] @outb(0x0C, 0x20) /* Poll command */
24 ldrb \irqnr, [r4, #0x20] @irq = inb(0x20) & 7
25 and \irqstat, \irqnr, #0x80
26 teq \irqstat, #0
27 beq 43f
28 and \irqnr, \irqnr, #7
29 teq \irqnr, #2
30 bne 44f
3143: mov \irqstat, #0x0C
32 strb \irqstat, [r4, #0xa0] @outb(0x0C, 0xA0) /* Poll command */
33 ldrb \irqnr, [r4, #0xa0] @irq = (inb(0xA0) & 7) + 8
34 and \irqstat, \irqnr, #0x80
35 teq \irqstat, #0
36 beq 44f
37 and \irqnr, \irqnr, #7
38 add \irqnr, \irqnr, #8
3944: teq \irqstat, #0
40 .endm
41
diff --git a/arch/arm/mach-shark/include/mach/hardware.h b/arch/arm/mach-shark/include/mach/hardware.h
new file mode 100644
index 000000000000..cb0ee2943c1a
--- /dev/null
+++ b/arch/arm/mach-shark/include/mach/hardware.h
@@ -0,0 +1,51 @@
1/*
2 * arch/arm/mach-shark/include/mach/hardware.h
3 *
4 * by Alexander Schulz
5 *
6 * derived from:
7 * arch/arm/mach-ebsa110/include/mach/hardware.h
8 * Copyright (C) 1996-1999 Russell King.
9 */
10#ifndef __ASM_ARCH_HARDWARE_H
11#define __ASM_ARCH_HARDWARE_H
12
13#ifndef __ASSEMBLY__
14
15/*
16 * Mapping areas
17 */
18#define IO_BASE 0xe0000000
19
20#else
21
22#define IO_BASE 0
23
24#endif
25
26#define IO_SIZE 0x08000000
27#define IO_START 0x40000000
28#define ROMCARD_SIZE 0x08000000
29#define ROMCARD_START 0x10000000
30
31#define PCIO_BASE 0xe0000000
32
33
34/* defines for the Framebuffer */
35#define FB_START 0x06000000
36#define FB_SIZE 0x01000000
37
38#define UNCACHEABLE_ADDR 0xdf010000
39
40#define SEQUOIA_LED_GREEN (1<<6)
41#define SEQUOIA_LED_AMBER (1<<5)
42#define SEQUOIA_LED_BACK (1<<7)
43
44#define pcibios_assign_all_busses() 1
45
46#define PCIBIOS_MIN_IO 0x6000
47#define PCIBIOS_MIN_MEM 0x50000000
48#define PCIMEM_BASE 0xe8000000
49
50#endif
51
diff --git a/arch/arm/mach-shark/include/mach/io.h b/arch/arm/mach-shark/include/mach/io.h
new file mode 100644
index 000000000000..92475922c068
--- /dev/null
+++ b/arch/arm/mach-shark/include/mach/io.h
@@ -0,0 +1,56 @@
1/*
2 * arch/arm/mach-shark/include/mach/io.h
3 *
4 * by Alexander Schulz
5 *
6 * derived from:
7 * arch/arm/mach-ebsa110/include/mach/io.h
8 * Copyright (C) 1997,1998 Russell King
9 */
10
11#ifndef __ASM_ARM_ARCH_IO_H
12#define __ASM_ARM_ARCH_IO_H
13
14#include <mach/hardware.h>
15
16#define IO_SPACE_LIMIT 0xffffffff
17
18/*
19 * We use two different types of addressing - PC style addresses, and ARM
20 * addresses. PC style accesses the PC hardware with the normal PC IO
21 * addresses, eg 0x3f8 for serial#1. ARM addresses are 0x80000000+
22 * and are translated to the start of IO.
23 */
24#define __PORT_PCIO(x) (!((x) & 0x80000000))
25
26#define __io(a) ((void __iomem *)(PCIO_BASE + (a)))
27
28
29static inline unsigned int __ioaddr (unsigned int port) \
30{ \
31 if (__PORT_PCIO(port)) \
32 return (unsigned int)(PCIO_BASE + (port)); \
33 else \
34 return (unsigned int)(IO_BASE + (port)); \
35}
36
37#define __mem_pci(addr) (addr)
38
39/*
40 * Translated address IO functions
41 *
42 * IO address has already been translated to a virtual address
43 */
44#define outb_t(v,p) \
45 (*(volatile unsigned char *)(p) = (v))
46
47#define inb_t(p) \
48 (*(volatile unsigned char *)(p))
49
50#define outl_t(v,p) \
51 (*(volatile unsigned long *)(p) = (v))
52
53#define inl_t(p) \
54 (*(volatile unsigned long *)(p))
55
56#endif
diff --git a/arch/arm/mach-shark/include/mach/irqs.h b/arch/arm/mach-shark/include/mach/irqs.h
new file mode 100644
index 000000000000..0586acd7cdd5
--- /dev/null
+++ b/arch/arm/mach-shark/include/mach/irqs.h
@@ -0,0 +1,13 @@
1/*
2 * arch/arm/mach-shark/include/mach/irqs.h
3 *
4 * by Alexander Schulz
5 */
6
7#define NR_IRQS 16
8
9#define IRQ_ISA_KEYBOARD 1
10#define RTC_IRQ 8
11#define I8042_KBD_IRQ 1
12#define I8042_AUX_IRQ 12
13#define IRQ_HARDDISK 14
diff --git a/arch/arm/mach-shark/include/mach/memory.h b/arch/arm/mach-shark/include/mach/memory.h
new file mode 100644
index 000000000000..b7874ad9f9f6
--- /dev/null
+++ b/arch/arm/mach-shark/include/mach/memory.h
@@ -0,0 +1,48 @@
1/*
2 * arch/arm/mach-shark/include/mach/memory.h
3 *
4 * by Alexander Schulz
5 *
6 * derived from:
7 * arch/arm/mach-ebsa110/include/mach/memory.h
8 * Copyright (c) 1996-1999 Russell King.
9 */
10#ifndef __ASM_ARCH_MEMORY_H
11#define __ASM_ARCH_MEMORY_H
12
13#include <asm/sizes.h>
14
15/*
16 * Physical DRAM offset.
17 */
18#define PHYS_OFFSET UL(0x08000000)
19
20#ifndef __ASSEMBLY__
21
22static inline void __arch_adjust_zones(int node, unsigned long *zone_size, unsigned long *zhole_size)
23{
24 if (node != 0) return;
25 /* Only the first 4 MB (=1024 Pages) are usable for DMA */
26 zone_size[1] = zone_size[0] - 1024;
27 zone_size[0] = 1024;
28 zhole_size[1] = zhole_size[0];
29 zhole_size[0] = 0;
30}
31
32#define arch_adjust_zones(node, size, holes) \
33 __arch_adjust_zones(node, size, holes)
34
35#define ISA_DMA_THRESHOLD (PHYS_OFFSET + SZ_4M - 1)
36
37#endif
38
39#define __virt_to_bus(x) __virt_to_phys(x)
40#define __bus_to_virt(x) __phys_to_virt(x)
41
42/*
43 * Cache flushing area
44 */
45#define FLUSH_BASE_PHYS 0x80000000
46#define FLUSH_BASE 0xdf000000
47
48#endif
diff --git a/arch/arm/mach-shark/include/mach/system.h b/arch/arm/mach-shark/include/mach/system.h
new file mode 100644
index 000000000000..85aceef6f874
--- /dev/null
+++ b/arch/arm/mach-shark/include/mach/system.h
@@ -0,0 +1,28 @@
1/*
2 * arch/arm/mach-shark/include/mach/system.h
3 *
4 * by Alexander Schulz
5 */
6#ifndef __ASM_ARCH_SYSTEM_H
7#define __ASM_ARCH_SYSTEM_H
8
9#include <asm/io.h>
10
11static void arch_reset(char mode)
12{
13 short temp;
14 local_irq_disable();
15 /* Reset the Machine via pc[3] of the sequoia chipset */
16 outw(0x09,0x24);
17 temp=inw(0x26);
18 temp = temp | (1<<3) | (1<<10);
19 outw(0x09,0x24);
20 outw(temp,0x26);
21
22}
23
24static inline void arch_idle(void)
25{
26}
27
28#endif
diff --git a/arch/arm/mach-shark/include/mach/timex.h b/arch/arm/mach-shark/include/mach/timex.h
new file mode 100644
index 000000000000..bb6eeaebed86
--- /dev/null
+++ b/arch/arm/mach-shark/include/mach/timex.h
@@ -0,0 +1,7 @@
1/*
2 * arch/arm/mach-shark/include/mach/timex.h
3 *
4 * by Alexander Schulz
5 */
6
7#define CLOCK_TICK_RATE 1193180
diff --git a/arch/arm/mach-shark/include/mach/uncompress.h b/arch/arm/mach-shark/include/mach/uncompress.h
new file mode 100644
index 000000000000..3725e1633418
--- /dev/null
+++ b/arch/arm/mach-shark/include/mach/uncompress.h
@@ -0,0 +1,51 @@
1/*
2 * arch/arm/mach-shark/include/mach/uncompress.h
3 * by Alexander Schulz
4 *
5 * derived from:
6 * arch/arm/mach-footbridge/include/mach/uncompress.h
7 * Copyright (C) 1996,1997,1998 Russell King
8 */
9
10#define SERIAL_BASE ((volatile unsigned char *)0x400003f8)
11
12static inline void putc(int c)
13{
14 int t;
15
16 SERIAL_BASE[0] = c;
17 t=0x10000;
18 while (t--);
19}
20
21static inline void flush(void)
22{
23}
24
25#ifdef DEBUG
26static void putn(unsigned long z)
27{
28 int i;
29 char x;
30
31 putc('0');
32 putc('x');
33 for (i=0;i<8;i++) {
34 x='0'+((z>>((7-i)*4))&0xf);
35 if (x>'9') x=x-'0'+'A'-10;
36 putc(x);
37 }
38}
39
40static void putr()
41{
42 putc('\n');
43 putc('\r');
44}
45#endif
46
47/*
48 * nothing to do
49 */
50#define arch_decomp_setup()
51#define arch_decomp_wdog()
diff --git a/arch/arm/mach-shark/include/mach/vmalloc.h b/arch/arm/mach-shark/include/mach/vmalloc.h
new file mode 100644
index 000000000000..f6c6837c5451
--- /dev/null
+++ b/arch/arm/mach-shark/include/mach/vmalloc.h
@@ -0,0 +1,4 @@
1/*
2 * arch/arm/mach-shark/include/mach/vmalloc.h
3 */
4#define VMALLOC_END (PAGE_OFFSET + 0x10000000)
diff --git a/arch/arm/mach-shark/irq.c b/arch/arm/mach-shark/irq.c
index 5b0c6af44ec6..44b0811b400c 100644
--- a/arch/arm/mach-shark/irq.c
+++ b/arch/arm/mach-shark/irq.c
@@ -4,7 +4,7 @@
4 * by Alexander Schulz 4 * by Alexander Schulz
5 * 5 *
6 * derived from linux/arch/ppc/kernel/i8259.c and: 6 * derived from linux/arch/ppc/kernel/i8259.c and:
7 * include/asm-arm/arch-ebsa110/irq.h 7 * arch/arm/mach-ebsa110/include/mach/irq.h
8 * Copyright (C) 1996-1998 Russell King 8 * Copyright (C) 1996-1998 Russell King
9 */ 9 */
10 10
diff --git a/arch/arm/mach-shark/leds.c b/arch/arm/mach-shark/leds.c
index 5386a81f796a..b1896471aa3c 100644
--- a/arch/arm/mach-shark/leds.c
+++ b/arch/arm/mach-shark/leds.c
@@ -21,7 +21,7 @@
21#include <linux/spinlock.h> 21#include <linux/spinlock.h>
22#include <linux/ioport.h> 22#include <linux/ioport.h>
23 23
24#include <asm/hardware.h> 24#include <mach/hardware.h>
25#include <asm/leds.h> 25#include <asm/leds.h>
26#include <asm/io.h> 26#include <asm/io.h>
27#include <asm/system.h> 27#include <asm/system.h>
diff --git a/arch/arm/mach-versatile/core.c b/arch/arm/mach-versatile/core.c
index a7dd09436cbc..d75e795c893e 100644
--- a/arch/arm/mach-versatile/core.c
+++ b/arch/arm/mach-versatile/core.c
@@ -31,7 +31,7 @@
31 31
32#include <asm/cnt32_to_63.h> 32#include <asm/cnt32_to_63.h>
33#include <asm/system.h> 33#include <asm/system.h>
34#include <asm/hardware.h> 34#include <mach/hardware.h>
35#include <asm/io.h> 35#include <asm/io.h>
36#include <asm/irq.h> 36#include <asm/irq.h>
37#include <asm/leds.h> 37#include <asm/leds.h>
diff --git a/arch/arm/mach-versatile/include/mach/debug-macro.S b/arch/arm/mach-versatile/include/mach/debug-macro.S
new file mode 100644
index 000000000000..b4ac00eacf68
--- /dev/null
+++ b/arch/arm/mach-versatile/include/mach/debug-macro.S
@@ -0,0 +1,23 @@
1/* arch/arm/mach-versatile/include/mach/debug-macro.S
2 *
3 * Debugging macro include header
4 *
5 * Copyright (C) 1994-1999 Russell King
6 * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 *
12*/
13
14 .macro addruart,rx
15 mrc p15, 0, \rx, c1, c0
16 tst \rx, #1 @ MMU enabled?
17 moveq \rx, #0x10000000
18 movne \rx, #0xf1000000 @ virtual base
19 orr \rx, \rx, #0x001F0000
20 orr \rx, \rx, #0x00001000
21 .endm
22
23#include <asm/hardware/debug-pl01x.S>
diff --git a/arch/arm/mach-versatile/include/mach/dma.h b/arch/arm/mach-versatile/include/mach/dma.h
new file mode 100644
index 000000000000..0aabf12c8834
--- /dev/null
+++ b/arch/arm/mach-versatile/include/mach/dma.h
@@ -0,0 +1,20 @@
1/*
2 * arch/arm/mach-versatile/include/mach/dma.h
3 *
4 * Copyright (C) 2003 ARM Limited.
5 * Copyright (C) 1997,1998 Russell King
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
diff --git a/arch/arm/mach-versatile/include/mach/entry-macro.S b/arch/arm/mach-versatile/include/mach/entry-macro.S
new file mode 100644
index 000000000000..8c8020980585
--- /dev/null
+++ b/arch/arm/mach-versatile/include/mach/entry-macro.S
@@ -0,0 +1,44 @@
1/*
2 * arch/arm/mach-versatile/include/mach/entry-macro.S
3 *
4 * Low-level IRQ helper macros for Versatile platforms
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10#include <mach/hardware.h>
11#include <asm/hardware/vic.h>
12
13 .macro disable_fiq
14 .endm
15
16 .macro get_irqnr_preamble, base, tmp
17 ldr \base, =IO_ADDRESS(VERSATILE_VIC_BASE)
18 .endm
19
20 .macro arch_ret_to_user, tmp1, tmp2
21 .endm
22
23 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
24 ldr \irqstat, [\base, #VIC_IRQ_STATUS] @ get masked status
25 mov \irqnr, #0
26 teq \irqstat, #0
27 beq 1003f
28
291001: tst \irqstat, #15
30 bne 1002f
31 add \irqnr, \irqnr, #4
32 movs \irqstat, \irqstat, lsr #4
33 bne 1001b
341002: tst \irqstat, #1
35 bne 1003f
36 add \irqnr, \irqnr, #1
37 movs \irqstat, \irqstat, lsr #1
38 bne 1002b
391003: /* EQ will be set if no irqs pending */
40
41@ clz \irqnr, \irqstat
42@1003: /* EQ will be set if we reach MAXIRQNUM */
43 .endm
44
diff --git a/arch/arm/mach-versatile/include/mach/hardware.h b/arch/arm/mach-versatile/include/mach/hardware.h
new file mode 100644
index 000000000000..7aa906c93154
--- /dev/null
+++ b/arch/arm/mach-versatile/include/mach/hardware.h
@@ -0,0 +1,52 @@
1/*
2 * arch/arm/mach-versatile/include/mach/hardware.h
3 *
4 * This file contains the hardware definitions of the Versatile boards.
5 *
6 * Copyright (C) 2003 ARM Limited.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 */
22#ifndef __ASM_ARCH_HARDWARE_H
23#define __ASM_ARCH_HARDWARE_H
24
25#include <asm/sizes.h>
26#include <mach/platform.h>
27
28/*
29 * PCI space virtual addresses
30 */
31#define VERSATILE_PCI_VIRT_BASE (void __iomem *)0xe8000000ul
32#define VERSATILE_PCI_CFG_VIRT_BASE (void __iomem *)0xe9000000ul
33
34#if 0
35#define VERSATILE_PCI_VIRT_MEM_BASE0 0xf4000000
36#define VERSATILE_PCI_VIRT_MEM_BASE1 0xf5000000
37#define VERSATILE_PCI_VIRT_MEM_BASE2 0xf6000000
38
39#define PCIO_BASE VERSATILE_PCI_VIRT_MEM_BASE0
40#define PCIMEM_BASE VERSATILE_PCI_VIRT_MEM_BASE1
41#endif
42
43/* CIK guesswork */
44#define PCIBIOS_MIN_IO 0x44000000
45#define PCIBIOS_MIN_MEM 0x50000000
46
47#define pcibios_assign_all_busses() 1
48
49/* macro to get at IO space when running virtually */
50#define IO_ADDRESS(x) (((x) & 0x0fffffff) + (((x) >> 4) & 0x0f000000) + 0xf0000000)
51
52#endif
diff --git a/arch/arm/mach-versatile/include/mach/io.h b/arch/arm/mach-versatile/include/mach/io.h
new file mode 100644
index 000000000000..c0b9dd1d0257
--- /dev/null
+++ b/arch/arm/mach-versatile/include/mach/io.h
@@ -0,0 +1,32 @@
1/*
2 * arch/arm/mach-versatile/include/mach/io.h
3 *
4 * Copyright (C) 2003 ARM Limited
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20#ifndef __ASM_ARM_ARCH_IO_H
21#define __ASM_ARM_ARCH_IO_H
22
23#define IO_SPACE_LIMIT 0xffffffff
24
25static inline void __iomem *__io(unsigned long addr)
26{
27 return (void __iomem *)addr;
28}
29#define __io(a) __io(a)
30#define __mem_pci(a) (a)
31
32#endif
diff --git a/arch/arm/mach-versatile/include/mach/irqs.h b/arch/arm/mach-versatile/include/mach/irqs.h
new file mode 100644
index 000000000000..216a1312e62e
--- /dev/null
+++ b/arch/arm/mach-versatile/include/mach/irqs.h
@@ -0,0 +1,211 @@
1/*
2 * arch/arm/mach-versatile/include/mach/irqs.h
3 *
4 * Copyright (C) 2003 ARM Limited
5 * Copyright (C) 2000 Deep Blue Solutions Ltd.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
21
22#include <mach/platform.h>
23
24/*
25 * IRQ interrupts definitions are the same as the INT definitions
26 * held within platform.h
27 */
28#define IRQ_VIC_START 0
29#define IRQ_WDOGINT (IRQ_VIC_START + INT_WDOGINT)
30#define IRQ_SOFTINT (IRQ_VIC_START + INT_SOFTINT)
31#define IRQ_COMMRx (IRQ_VIC_START + INT_COMMRx)
32#define IRQ_COMMTx (IRQ_VIC_START + INT_COMMTx)
33#define IRQ_TIMERINT0_1 (IRQ_VIC_START + INT_TIMERINT0_1)
34#define IRQ_TIMERINT2_3 (IRQ_VIC_START + INT_TIMERINT2_3)
35#define IRQ_GPIOINT0 (IRQ_VIC_START + INT_GPIOINT0)
36#define IRQ_GPIOINT1 (IRQ_VIC_START + INT_GPIOINT1)
37#define IRQ_GPIOINT2 (IRQ_VIC_START + INT_GPIOINT2)
38#define IRQ_GPIOINT3 (IRQ_VIC_START + INT_GPIOINT3)
39#define IRQ_RTCINT (IRQ_VIC_START + INT_RTCINT)
40#define IRQ_SSPINT (IRQ_VIC_START + INT_SSPINT)
41#define IRQ_UARTINT0 (IRQ_VIC_START + INT_UARTINT0)
42#define IRQ_UARTINT1 (IRQ_VIC_START + INT_UARTINT1)
43#define IRQ_UARTINT2 (IRQ_VIC_START + INT_UARTINT2)
44#define IRQ_SCIINT (IRQ_VIC_START + INT_SCIINT)
45#define IRQ_CLCDINT (IRQ_VIC_START + INT_CLCDINT)
46#define IRQ_DMAINT (IRQ_VIC_START + INT_DMAINT)
47#define IRQ_PWRFAILINT (IRQ_VIC_START + INT_PWRFAILINT)
48#define IRQ_MBXINT (IRQ_VIC_START + INT_MBXINT)
49#define IRQ_GNDINT (IRQ_VIC_START + INT_GNDINT)
50#define IRQ_VICSOURCE21 (IRQ_VIC_START + INT_VICSOURCE21)
51#define IRQ_VICSOURCE22 (IRQ_VIC_START + INT_VICSOURCE22)
52#define IRQ_VICSOURCE23 (IRQ_VIC_START + INT_VICSOURCE23)
53#define IRQ_VICSOURCE24 (IRQ_VIC_START + INT_VICSOURCE24)
54#define IRQ_VICSOURCE25 (IRQ_VIC_START + INT_VICSOURCE25)
55#define IRQ_VICSOURCE26 (IRQ_VIC_START + INT_VICSOURCE26)
56#define IRQ_VICSOURCE27 (IRQ_VIC_START + INT_VICSOURCE27)
57#define IRQ_VICSOURCE28 (IRQ_VIC_START + INT_VICSOURCE28)
58#define IRQ_VICSOURCE29 (IRQ_VIC_START + INT_VICSOURCE29)
59#define IRQ_VICSOURCE30 (IRQ_VIC_START + INT_VICSOURCE30)
60#define IRQ_VICSOURCE31 (IRQ_VIC_START + INT_VICSOURCE31)
61#define IRQ_VIC_END (IRQ_VIC_START + 31)
62
63#define IRQMASK_WDOGINT INTMASK_WDOGINT
64#define IRQMASK_SOFTINT INTMASK_SOFTINT
65#define IRQMASK_COMMRx INTMASK_COMMRx
66#define IRQMASK_COMMTx INTMASK_COMMTx
67#define IRQMASK_TIMERINT0_1 INTMASK_TIMERINT0_1
68#define IRQMASK_TIMERINT2_3 INTMASK_TIMERINT2_3
69#define IRQMASK_GPIOINT0 INTMASK_GPIOINT0
70#define IRQMASK_GPIOINT1 INTMASK_GPIOINT1
71#define IRQMASK_GPIOINT2 INTMASK_GPIOINT2
72#define IRQMASK_GPIOINT3 INTMASK_GPIOINT3
73#define IRQMASK_RTCINT INTMASK_RTCINT
74#define IRQMASK_SSPINT INTMASK_SSPINT
75#define IRQMASK_UARTINT0 INTMASK_UARTINT0
76#define IRQMASK_UARTINT1 INTMASK_UARTINT1
77#define IRQMASK_UARTINT2 INTMASK_UARTINT2
78#define IRQMASK_SCIINT INTMASK_SCIINT
79#define IRQMASK_CLCDINT INTMASK_CLCDINT
80#define IRQMASK_DMAINT INTMASK_DMAINT
81#define IRQMASK_PWRFAILINT INTMASK_PWRFAILINT
82#define IRQMASK_MBXINT INTMASK_MBXINT
83#define IRQMASK_GNDINT INTMASK_GNDINT
84#define IRQMASK_VICSOURCE21 INTMASK_VICSOURCE21
85#define IRQMASK_VICSOURCE22 INTMASK_VICSOURCE22
86#define IRQMASK_VICSOURCE23 INTMASK_VICSOURCE23
87#define IRQMASK_VICSOURCE24 INTMASK_VICSOURCE24
88#define IRQMASK_VICSOURCE25 INTMASK_VICSOURCE25
89#define IRQMASK_VICSOURCE26 INTMASK_VICSOURCE26
90#define IRQMASK_VICSOURCE27 INTMASK_VICSOURCE27
91#define IRQMASK_VICSOURCE28 INTMASK_VICSOURCE28
92#define IRQMASK_VICSOURCE29 INTMASK_VICSOURCE29
93#define IRQMASK_VICSOURCE30 INTMASK_VICSOURCE30
94#define IRQMASK_VICSOURCE31 INTMASK_VICSOURCE31
95
96/*
97 * FIQ interrupts definitions are the same as the INT definitions.
98 */
99#define FIQ_WDOGINT INT_WDOGINT
100#define FIQ_SOFTINT INT_SOFTINT
101#define FIQ_COMMRx INT_COMMRx
102#define FIQ_COMMTx INT_COMMTx
103#define FIQ_TIMERINT0_1 INT_TIMERINT0_1
104#define FIQ_TIMERINT2_3 INT_TIMERINT2_3
105#define FIQ_GPIOINT0 INT_GPIOINT0
106#define FIQ_GPIOINT1 INT_GPIOINT1
107#define FIQ_GPIOINT2 INT_GPIOINT2
108#define FIQ_GPIOINT3 INT_GPIOINT3
109#define FIQ_RTCINT INT_RTCINT
110#define FIQ_SSPINT INT_SSPINT
111#define FIQ_UARTINT0 INT_UARTINT0
112#define FIQ_UARTINT1 INT_UARTINT1
113#define FIQ_UARTINT2 INT_UARTINT2
114#define FIQ_SCIINT INT_SCIINT
115#define FIQ_CLCDINT INT_CLCDINT
116#define FIQ_DMAINT INT_DMAINT
117#define FIQ_PWRFAILINT INT_PWRFAILINT
118#define FIQ_MBXINT INT_MBXINT
119#define FIQ_GNDINT INT_GNDINT
120#define FIQ_VICSOURCE21 INT_VICSOURCE21
121#define FIQ_VICSOURCE22 INT_VICSOURCE22
122#define FIQ_VICSOURCE23 INT_VICSOURCE23
123#define FIQ_VICSOURCE24 INT_VICSOURCE24
124#define FIQ_VICSOURCE25 INT_VICSOURCE25
125#define FIQ_VICSOURCE26 INT_VICSOURCE26
126#define FIQ_VICSOURCE27 INT_VICSOURCE27
127#define FIQ_VICSOURCE28 INT_VICSOURCE28
128#define FIQ_VICSOURCE29 INT_VICSOURCE29
129#define FIQ_VICSOURCE30 INT_VICSOURCE30
130#define FIQ_VICSOURCE31 INT_VICSOURCE31
131
132
133#define FIQMASK_WDOGINT INTMASK_WDOGINT
134#define FIQMASK_SOFTINT INTMASK_SOFTINT
135#define FIQMASK_COMMRx INTMASK_COMMRx
136#define FIQMASK_COMMTx INTMASK_COMMTx
137#define FIQMASK_TIMERINT0_1 INTMASK_TIMERINT0_1
138#define FIQMASK_TIMERINT2_3 INTMASK_TIMERINT2_3
139#define FIQMASK_GPIOINT0 INTMASK_GPIOINT0
140#define FIQMASK_GPIOINT1 INTMASK_GPIOINT1
141#define FIQMASK_GPIOINT2 INTMASK_GPIOINT2
142#define FIQMASK_GPIOINT3 INTMASK_GPIOINT3
143#define FIQMASK_RTCINT INTMASK_RTCINT
144#define FIQMASK_SSPINT INTMASK_SSPINT
145#define FIQMASK_UARTINT0 INTMASK_UARTINT0
146#define FIQMASK_UARTINT1 INTMASK_UARTINT1
147#define FIQMASK_UARTINT2 INTMASK_UARTINT2
148#define FIQMASK_SCIINT INTMASK_SCIINT
149#define FIQMASK_CLCDINT INTMASK_CLCDINT
150#define FIQMASK_DMAINT INTMASK_DMAINT
151#define FIQMASK_PWRFAILINT INTMASK_PWRFAILINT
152#define FIQMASK_MBXINT INTMASK_MBXINT
153#define FIQMASK_GNDINT INTMASK_GNDINT
154#define FIQMASK_VICSOURCE21 INTMASK_VICSOURCE21
155#define FIQMASK_VICSOURCE22 INTMASK_VICSOURCE22
156#define FIQMASK_VICSOURCE23 INTMASK_VICSOURCE23
157#define FIQMASK_VICSOURCE24 INTMASK_VICSOURCE24
158#define FIQMASK_VICSOURCE25 INTMASK_VICSOURCE25
159#define FIQMASK_VICSOURCE26 INTMASK_VICSOURCE26
160#define FIQMASK_VICSOURCE27 INTMASK_VICSOURCE27
161#define FIQMASK_VICSOURCE28 INTMASK_VICSOURCE28
162#define FIQMASK_VICSOURCE29 INTMASK_VICSOURCE29
163#define FIQMASK_VICSOURCE30 INTMASK_VICSOURCE30
164#define FIQMASK_VICSOURCE31 INTMASK_VICSOURCE31
165
166/*
167 * Secondary interrupt controller
168 */
169#define IRQ_SIC_START 32
170#define IRQ_SIC_MMCI0B (IRQ_SIC_START + SIC_INT_MMCI0B)
171#define IRQ_SIC_MMCI1B (IRQ_SIC_START + SIC_INT_MMCI1B)
172#define IRQ_SIC_KMI0 (IRQ_SIC_START + SIC_INT_KMI0)
173#define IRQ_SIC_KMI1 (IRQ_SIC_START + SIC_INT_KMI1)
174#define IRQ_SIC_SCI3 (IRQ_SIC_START + SIC_INT_SCI3)
175#define IRQ_SIC_UART3 (IRQ_SIC_START + SIC_INT_UART3)
176#define IRQ_SIC_CLCD (IRQ_SIC_START + SIC_INT_CLCD)
177#define IRQ_SIC_TOUCH (IRQ_SIC_START + SIC_INT_TOUCH)
178#define IRQ_SIC_KEYPAD (IRQ_SIC_START + SIC_INT_KEYPAD)
179#define IRQ_SIC_DoC (IRQ_SIC_START + SIC_INT_DoC)
180#define IRQ_SIC_MMCI0A (IRQ_SIC_START + SIC_INT_MMCI0A)
181#define IRQ_SIC_MMCI1A (IRQ_SIC_START + SIC_INT_MMCI1A)
182#define IRQ_SIC_AACI (IRQ_SIC_START + SIC_INT_AACI)
183#define IRQ_SIC_ETH (IRQ_SIC_START + SIC_INT_ETH)
184#define IRQ_SIC_USB (IRQ_SIC_START + SIC_INT_USB)
185#define IRQ_SIC_PCI0 (IRQ_SIC_START + SIC_INT_PCI0)
186#define IRQ_SIC_PCI1 (IRQ_SIC_START + SIC_INT_PCI1)
187#define IRQ_SIC_PCI2 (IRQ_SIC_START + SIC_INT_PCI2)
188#define IRQ_SIC_PCI3 (IRQ_SIC_START + SIC_INT_PCI3)
189#define IRQ_SIC_END 63
190
191#define SIC_IRQMASK_MMCI0B SIC_INTMASK_MMCI0B
192#define SIC_IRQMASK_MMCI1B SIC_INTMASK_MMCI1B
193#define SIC_IRQMASK_KMI0 SIC_INTMASK_KMI0
194#define SIC_IRQMASK_KMI1 SIC_INTMASK_KMI1
195#define SIC_IRQMASK_SCI3 SIC_INTMASK_SCI3
196#define SIC_IRQMASK_UART3 SIC_INTMASK_UART3
197#define SIC_IRQMASK_CLCD SIC_INTMASK_CLCD
198#define SIC_IRQMASK_TOUCH SIC_INTMASK_TOUCH
199#define SIC_IRQMASK_KEYPAD SIC_INTMASK_KEYPAD
200#define SIC_IRQMASK_DoC SIC_INTMASK_DoC
201#define SIC_IRQMASK_MMCI0A SIC_INTMASK_MMCI0A
202#define SIC_IRQMASK_MMCI1A SIC_INTMASK_MMCI1A
203#define SIC_IRQMASK_AACI SIC_INTMASK_AACI
204#define SIC_IRQMASK_ETH SIC_INTMASK_ETH
205#define SIC_IRQMASK_USB SIC_INTMASK_USB
206#define SIC_IRQMASK_PCI0 SIC_INTMASK_PCI0
207#define SIC_IRQMASK_PCI1 SIC_INTMASK_PCI1
208#define SIC_IRQMASK_PCI2 SIC_INTMASK_PCI2
209#define SIC_IRQMASK_PCI3 SIC_INTMASK_PCI3
210
211#define NR_IRQS 64
diff --git a/arch/arm/mach-versatile/include/mach/memory.h b/arch/arm/mach-versatile/include/mach/memory.h
new file mode 100644
index 000000000000..b6315c0602ac
--- /dev/null
+++ b/arch/arm/mach-versatile/include/mach/memory.h
@@ -0,0 +1,38 @@
1/*
2 * arch/arm/mach-versatile/include/mach/memory.h
3 *
4 * Copyright (C) 2003 ARM Limited
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20#ifndef __ASM_ARCH_MEMORY_H
21#define __ASM_ARCH_MEMORY_H
22
23/*
24 * Physical DRAM offset.
25 */
26#define PHYS_OFFSET UL(0x00000000)
27
28/*
29 * Virtual view <-> DMA view memory address translations
30 * virt_to_bus: Used to translate the virtual address to an
31 * address suitable to be passed to set_dma_addr
32 * bus_to_virt: Used to convert an address for DMA operations
33 * to an address that the kernel can use.
34 */
35#define __virt_to_bus(x) ((x) - PAGE_OFFSET)
36#define __bus_to_virt(x) ((x) + PAGE_OFFSET)
37
38#endif
diff --git a/arch/arm/mach-versatile/include/mach/platform.h b/arch/arm/mach-versatile/include/mach/platform.h
new file mode 100644
index 000000000000..27cbe6a3f220
--- /dev/null
+++ b/arch/arm/mach-versatile/include/mach/platform.h
@@ -0,0 +1,510 @@
1/*
2 * arch/arm/mach-versatile/include/mach/platform.h
3 *
4 * Copyright (c) ARM Limited 2003. All rights reserved.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20
21#ifndef __address_h
22#define __address_h 1
23
24/*
25 * Memory definitions
26 */
27#define VERSATILE_BOOT_ROM_LO 0x30000000 /* DoC Base (64Mb)...*/
28#define VERSATILE_BOOT_ROM_HI 0x30000000
29#define VERSATILE_BOOT_ROM_BASE VERSATILE_BOOT_ROM_HI /* Normal position */
30#define VERSATILE_BOOT_ROM_SIZE SZ_64M
31
32#define VERSATILE_SSRAM_BASE /* VERSATILE_SSMC_BASE ? */
33#define VERSATILE_SSRAM_SIZE SZ_2M
34
35#define VERSATILE_FLASH_BASE 0x34000000
36#define VERSATILE_FLASH_SIZE SZ_64M
37
38/*
39 * SDRAM
40 */
41#define VERSATILE_SDRAM_BASE 0x00000000
42
43/*
44 * Logic expansion modules
45 *
46 */
47
48
49/* ------------------------------------------------------------------------
50 * Versatile Registers
51 * ------------------------------------------------------------------------
52 *
53 */
54#define VERSATILE_SYS_ID_OFFSET 0x00
55#define VERSATILE_SYS_SW_OFFSET 0x04
56#define VERSATILE_SYS_LED_OFFSET 0x08
57#define VERSATILE_SYS_OSC0_OFFSET 0x0C
58
59#if defined(CONFIG_ARCH_VERSATILE_PB)
60#define VERSATILE_SYS_OSC1_OFFSET 0x10
61#define VERSATILE_SYS_OSC2_OFFSET 0x14
62#define VERSATILE_SYS_OSC3_OFFSET 0x18
63#define VERSATILE_SYS_OSC4_OFFSET 0x1C
64#elif defined(CONFIG_MACH_VERSATILE_AB)
65#define VERSATILE_SYS_OSC1_OFFSET 0x1C
66#endif
67
68#define VERSATILE_SYS_OSCCLCD_OFFSET 0x1c
69
70#define VERSATILE_SYS_LOCK_OFFSET 0x20
71#define VERSATILE_SYS_100HZ_OFFSET 0x24
72#define VERSATILE_SYS_CFGDATA1_OFFSET 0x28
73#define VERSATILE_SYS_CFGDATA2_OFFSET 0x2C
74#define VERSATILE_SYS_FLAGS_OFFSET 0x30
75#define VERSATILE_SYS_FLAGSSET_OFFSET 0x30
76#define VERSATILE_SYS_FLAGSCLR_OFFSET 0x34
77#define VERSATILE_SYS_NVFLAGS_OFFSET 0x38
78#define VERSATILE_SYS_NVFLAGSSET_OFFSET 0x38
79#define VERSATILE_SYS_NVFLAGSCLR_OFFSET 0x3C
80#define VERSATILE_SYS_RESETCTL_OFFSET 0x40
81#define VERSATILE_SYS_PCICTL_OFFSET 0x44
82#define VERSATILE_SYS_MCI_OFFSET 0x48
83#define VERSATILE_SYS_FLASH_OFFSET 0x4C
84#define VERSATILE_SYS_CLCD_OFFSET 0x50
85#define VERSATILE_SYS_CLCDSER_OFFSET 0x54
86#define VERSATILE_SYS_BOOTCS_OFFSET 0x58
87#define VERSATILE_SYS_24MHz_OFFSET 0x5C
88#define VERSATILE_SYS_MISC_OFFSET 0x60
89#define VERSATILE_SYS_TEST_OSC0_OFFSET 0x80
90#define VERSATILE_SYS_TEST_OSC1_OFFSET 0x84
91#define VERSATILE_SYS_TEST_OSC2_OFFSET 0x88
92#define VERSATILE_SYS_TEST_OSC3_OFFSET 0x8C
93#define VERSATILE_SYS_TEST_OSC4_OFFSET 0x90
94
95#define VERSATILE_SYS_BASE 0x10000000
96#define VERSATILE_SYS_ID (VERSATILE_SYS_BASE + VERSATILE_SYS_ID_OFFSET)
97#define VERSATILE_SYS_SW (VERSATILE_SYS_BASE + VERSATILE_SYS_SW_OFFSET)
98#define VERSATILE_SYS_LED (VERSATILE_SYS_BASE + VERSATILE_SYS_LED_OFFSET)
99#define VERSATILE_SYS_OSC0 (VERSATILE_SYS_BASE + VERSATILE_SYS_OSC0_OFFSET)
100#define VERSATILE_SYS_OSC1 (VERSATILE_SYS_BASE + VERSATILE_SYS_OSC1_OFFSET)
101
102#if defined(CONFIG_ARCH_VERSATILE_PB)
103#define VERSATILE_SYS_OSC2 (VERSATILE_SYS_BASE + VERSATILE_SYS_OSC2_OFFSET)
104#define VERSATILE_SYS_OSC3 (VERSATILE_SYS_BASE + VERSATILE_SYS_OSC3_OFFSET)
105#define VERSATILE_SYS_OSC4 (VERSATILE_SYS_BASE + VERSATILE_SYS_OSC4_OFFSET)
106#endif
107
108#define VERSATILE_SYS_LOCK (VERSATILE_SYS_BASE + VERSATILE_SYS_LOCK_OFFSET)
109#define VERSATILE_SYS_100HZ (VERSATILE_SYS_BASE + VERSATILE_SYS_100HZ_OFFSET)
110#define VERSATILE_SYS_CFGDATA1 (VERSATILE_SYS_BASE + VERSATILE_SYS_CFGDATA1_OFFSET)
111#define VERSATILE_SYS_CFGDATA2 (VERSATILE_SYS_BASE + VERSATILE_SYS_CFGDATA2_OFFSET)
112#define VERSATILE_SYS_FLAGS (VERSATILE_SYS_BASE + VERSATILE_SYS_FLAGS_OFFSET)
113#define VERSATILE_SYS_FLAGSSET (VERSATILE_SYS_BASE + VERSATILE_SYS_FLAGSSET_OFFSET)
114#define VERSATILE_SYS_FLAGSCLR (VERSATILE_SYS_BASE + VERSATILE_SYS_FLAGSCLR_OFFSET)
115#define VERSATILE_SYS_NVFLAGS (VERSATILE_SYS_BASE + VERSATILE_SYS_NVFLAGS_OFFSET)
116#define VERSATILE_SYS_NVFLAGSSET (VERSATILE_SYS_BASE + VERSATILE_SYS_NVFLAGSSET_OFFSET)
117#define VERSATILE_SYS_NVFLAGSCLR (VERSATILE_SYS_BASE + VERSATILE_SYS_NVFLAGSCLR_OFFSET)
118#define VERSATILE_SYS_RESETCTL (VERSATILE_SYS_BASE + VERSATILE_SYS_RESETCTL_OFFSET)
119#define VERSATILE_SYS_PCICTL (VERSATILE_SYS_BASE + VERSATILE_SYS_PCICTL_OFFSET)
120#define VERSATILE_SYS_MCI (VERSATILE_SYS_BASE + VERSATILE_SYS_MCI_OFFSET)
121#define VERSATILE_SYS_FLASH (VERSATILE_SYS_BASE + VERSATILE_SYS_FLASH_OFFSET)
122#define VERSATILE_SYS_CLCD (VERSATILE_SYS_BASE + VERSATILE_SYS_CLCD_OFFSET)
123#define VERSATILE_SYS_CLCDSER (VERSATILE_SYS_BASE + VERSATILE_SYS_CLCDSER_OFFSET)
124#define VERSATILE_SYS_BOOTCS (VERSATILE_SYS_BASE + VERSATILE_SYS_BOOTCS_OFFSET)
125#define VERSATILE_SYS_24MHz (VERSATILE_SYS_BASE + VERSATILE_SYS_24MHz_OFFSET)
126#define VERSATILE_SYS_MISC (VERSATILE_SYS_BASE + VERSATILE_SYS_MISC_OFFSET)
127#define VERSATILE_SYS_TEST_OSC0 (VERSATILE_SYS_BASE + VERSATILE_SYS_TEST_OSC0_OFFSET)
128#define VERSATILE_SYS_TEST_OSC1 (VERSATILE_SYS_BASE + VERSATILE_SYS_TEST_OSC1_OFFSET)
129#define VERSATILE_SYS_TEST_OSC2 (VERSATILE_SYS_BASE + VERSATILE_SYS_TEST_OSC2_OFFSET)
130#define VERSATILE_SYS_TEST_OSC3 (VERSATILE_SYS_BASE + VERSATILE_SYS_TEST_OSC3_OFFSET)
131#define VERSATILE_SYS_TEST_OSC4 (VERSATILE_SYS_BASE + VERSATILE_SYS_TEST_OSC4_OFFSET)
132
133/*
134 * Values for VERSATILE_SYS_RESET_CTRL
135 */
136#define VERSATILE_SYS_CTRL_RESET_CONFIGCLR 0x01
137#define VERSATILE_SYS_CTRL_RESET_CONFIGINIT 0x02
138#define VERSATILE_SYS_CTRL_RESET_DLLRESET 0x03
139#define VERSATILE_SYS_CTRL_RESET_PLLRESET 0x04
140#define VERSATILE_SYS_CTRL_RESET_POR 0x05
141#define VERSATILE_SYS_CTRL_RESET_DoC 0x06
142
143#define VERSATILE_SYS_CTRL_LED (1 << 0)
144
145
146/* ------------------------------------------------------------------------
147 * Versatile control registers
148 * ------------------------------------------------------------------------
149 */
150
151/*
152 * VERSATILE_IDFIELD
153 *
154 * 31:24 = manufacturer (0x41 = ARM)
155 * 23:16 = architecture (0x08 = AHB system bus, ASB processor bus)
156 * 15:12 = FPGA (0x3 = XVC600 or XVC600E)
157 * 11:4 = build value
158 * 3:0 = revision number (0x1 = rev B (AHB))
159 */
160
161/*
162 * VERSATILE_SYS_LOCK
163 * control access to SYS_OSCx, SYS_CFGDATAx, SYS_RESETCTL,
164 * SYS_CLD, SYS_BOOTCS
165 */
166#define VERSATILE_SYS_LOCK_LOCKED (1 << 16)
167#define VERSATILE_SYS_LOCKVAL_MASK 0xFFFF /* write 0xA05F to enable write access */
168
169/*
170 * VERSATILE_SYS_FLASH
171 */
172#define VERSATILE_FLASHPROG_FLVPPEN (1 << 0) /* Enable writing to flash */
173
174/*
175 * VERSATILE_INTREG
176 * - used to acknowledge and control MMCI and UART interrupts
177 */
178#define VERSATILE_INTREG_WPROT 0x00 /* MMC protection status (no interrupt generated) */
179#define VERSATILE_INTREG_RI0 0x01 /* Ring indicator UART0 is asserted, */
180#define VERSATILE_INTREG_CARDIN 0x08 /* MMCI card in detect */
181 /* write 1 to acknowledge and clear */
182#define VERSATILE_INTREG_RI1 0x02 /* Ring indicator UART1 is asserted, */
183#define VERSATILE_INTREG_CARDINSERT 0x03 /* Signal insertion of MMC card */
184
185/*
186 * VERSATILE peripheral addresses
187 */
188#define VERSATILE_PCI_CORE_BASE 0x10001000 /* PCI core control */
189#define VERSATILE_I2C_BASE 0x10002000 /* I2C control */
190#define VERSATILE_SIC_BASE 0x10003000 /* Secondary interrupt controller */
191#define VERSATILE_AACI_BASE 0x10004000 /* Audio */
192#define VERSATILE_MMCI0_BASE 0x10005000 /* MMC interface */
193#define VERSATILE_KMI0_BASE 0x10006000 /* KMI interface */
194#define VERSATILE_KMI1_BASE 0x10007000 /* KMI 2nd interface */
195#define VERSATILE_CHAR_LCD_BASE 0x10008000 /* Character LCD */
196#define VERSATILE_UART3_BASE 0x10009000 /* UART 3 */
197#define VERSATILE_SCI1_BASE 0x1000A000
198#define VERSATILE_MMCI1_BASE 0x1000B000 /* MMC Interface */
199 /* 0x1000C000 - 0x1000CFFF = reserved */
200#define VERSATILE_ETH_BASE 0x10010000 /* Ethernet */
201#define VERSATILE_USB_BASE 0x10020000 /* USB */
202 /* 0x10030000 - 0x100FFFFF = reserved */
203#define VERSATILE_SMC_BASE 0x10100000 /* SMC */
204#define VERSATILE_MPMC_BASE 0x10110000 /* MPMC */
205#define VERSATILE_CLCD_BASE 0x10120000 /* CLCD */
206#define VERSATILE_DMAC_BASE 0x10130000 /* DMA controller */
207#define VERSATILE_VIC_BASE 0x10140000 /* Vectored interrupt controller */
208#define VERSATILE_PERIPH_BASE 0x10150000 /* off-chip peripherals alias from */
209 /* 0x10000000 - 0x100FFFFF */
210#define VERSATILE_AHBM_BASE 0x101D0000 /* AHB monitor */
211#define VERSATILE_SCTL_BASE 0x101E0000 /* System controller */
212#define VERSATILE_WATCHDOG_BASE 0x101E1000 /* Watchdog */
213#define VERSATILE_TIMER0_1_BASE 0x101E2000 /* Timer 0 and 1 */
214#define VERSATILE_TIMER2_3_BASE 0x101E3000 /* Timer 2 and 3 */
215#define VERSATILE_GPIO0_BASE 0x101E4000 /* GPIO port 0 */
216#define VERSATILE_GPIO1_BASE 0x101E5000 /* GPIO port 1 */
217#define VERSATILE_GPIO2_BASE 0x101E6000 /* GPIO port 2 */
218#define VERSATILE_GPIO3_BASE 0x101E7000 /* GPIO port 3 */
219#define VERSATILE_RTC_BASE 0x101E8000 /* Real Time Clock */
220 /* 0x101E9000 - reserved */
221#define VERSATILE_SCI_BASE 0x101F0000 /* Smart card controller */
222#define VERSATILE_UART0_BASE 0x101F1000 /* Uart 0 */
223#define VERSATILE_UART1_BASE 0x101F2000 /* Uart 1 */
224#define VERSATILE_UART2_BASE 0x101F3000 /* Uart 2 */
225#define VERSATILE_SSP_BASE 0x101F4000 /* Synchronous Serial Port */
226
227#define VERSATILE_SSMC_BASE 0x20000000 /* SSMC */
228#define VERSATILE_IB2_BASE 0x24000000 /* IB2 module */
229#define VERSATILE_MBX_BASE 0x40000000 /* MBX */
230
231/* PCI space */
232#define VERSATILE_PCI_BASE 0x41000000 /* PCI Interface */
233#define VERSATILE_PCI_CFG_BASE 0x42000000
234#define VERSATILE_PCI_MEM_BASE0 0x44000000
235#define VERSATILE_PCI_MEM_BASE1 0x50000000
236#define VERSATILE_PCI_MEM_BASE2 0x60000000
237/* Sizes of above maps */
238#define VERSATILE_PCI_BASE_SIZE 0x01000000
239#define VERSATILE_PCI_CFG_BASE_SIZE 0x02000000
240#define VERSATILE_PCI_MEM_BASE0_SIZE 0x0c000000 /* 32Mb */
241#define VERSATILE_PCI_MEM_BASE1_SIZE 0x10000000 /* 256Mb */
242#define VERSATILE_PCI_MEM_BASE2_SIZE 0x10000000 /* 256Mb */
243
244#define VERSATILE_SDRAM67_BASE 0x70000000 /* SDRAM banks 6 and 7 */
245#define VERSATILE_LT_BASE 0x80000000 /* Logic Tile expansion */
246
247/*
248 * Disk on Chip
249 */
250#define VERSATILE_DOC_BASE 0x2C000000
251#define VERSATILE_DOC_SIZE (16 << 20)
252#define VERSATILE_DOC_PAGE_SIZE 512
253#define VERSATILE_DOC_TOTAL_PAGES (DOC_SIZE / PAGE_SIZE)
254
255#define ERASE_UNIT_PAGES 32
256#define START_PAGE 0x80
257
258/*
259 * LED settings, bits [7:0]
260 */
261#define VERSATILE_SYS_LED0 (1 << 0)
262#define VERSATILE_SYS_LED1 (1 << 1)
263#define VERSATILE_SYS_LED2 (1 << 2)
264#define VERSATILE_SYS_LED3 (1 << 3)
265#define VERSATILE_SYS_LED4 (1 << 4)
266#define VERSATILE_SYS_LED5 (1 << 5)
267#define VERSATILE_SYS_LED6 (1 << 6)
268#define VERSATILE_SYS_LED7 (1 << 7)
269
270#define ALL_LEDS 0xFF
271
272#define LED_BANK VERSATILE_SYS_LED
273
274/*
275 * Control registers
276 */
277#define VERSATILE_IDFIELD_OFFSET 0x0 /* Versatile build information */
278#define VERSATILE_FLASHPROG_OFFSET 0x4 /* Flash devices */
279#define VERSATILE_INTREG_OFFSET 0x8 /* Interrupt control */
280#define VERSATILE_DECODE_OFFSET 0xC /* Fitted logic modules */
281
282
283/* ------------------------------------------------------------------------
284 * Versatile Interrupt Controller - control registers
285 * ------------------------------------------------------------------------
286 *
287 * Offsets from interrupt controller base
288 *
289 * System Controller interrupt controller base is
290 *
291 * VERSATILE_IC_BASE
292 *
293 * Core Module interrupt controller base is
294 *
295 * VERSATILE_SYS_IC
296 *
297 */
298/* VIC definitions in include/asm-arm/hardware/vic.h */
299
300#define SIC_IRQ_STATUS 0
301#define SIC_IRQ_RAW_STATUS 0x04
302#define SIC_IRQ_ENABLE 0x08
303#define SIC_IRQ_ENABLE_SET 0x08
304#define SIC_IRQ_ENABLE_CLEAR 0x0C
305#define SIC_INT_SOFT_SET 0x10
306#define SIC_INT_SOFT_CLEAR 0x14
307#define SIC_INT_PIC_ENABLE 0x20 /* read status of pass through mask */
308#define SIC_INT_PIC_ENABLES 0x20 /* set interrupt pass through bits */
309#define SIC_INT_PIC_ENABLEC 0x24 /* Clear interrupt pass through bits */
310
311/* ------------------------------------------------------------------------
312 * Interrupts - bit assignment (primary)
313 * ------------------------------------------------------------------------
314 */
315
316#define INT_WDOGINT 0 /* Watchdog timer */
317#define INT_SOFTINT 1 /* Software interrupt */
318#define INT_COMMRx 2 /* Debug Comm Rx interrupt */
319#define INT_COMMTx 3 /* Debug Comm Tx interrupt */
320#define INT_TIMERINT0_1 4 /* Timer 0 and 1 */
321#define INT_TIMERINT2_3 5 /* Timer 2 and 3 */
322#define INT_GPIOINT0 6 /* GPIO 0 */
323#define INT_GPIOINT1 7 /* GPIO 1 */
324#define INT_GPIOINT2 8 /* GPIO 2 */
325#define INT_GPIOINT3 9 /* GPIO 3 */
326#define INT_RTCINT 10 /* Real Time Clock */
327#define INT_SSPINT 11 /* Synchronous Serial Port */
328#define INT_UARTINT0 12 /* UART 0 on development chip */
329#define INT_UARTINT1 13 /* UART 1 on development chip */
330#define INT_UARTINT2 14 /* UART 2 on development chip */
331#define INT_SCIINT 15 /* Smart Card Interface */
332#define INT_CLCDINT 16 /* CLCD controller */
333#define INT_DMAINT 17 /* DMA controller */
334#define INT_PWRFAILINT 18 /* Power failure */
335#define INT_MBXINT 19 /* Graphics processor */
336#define INT_GNDINT 20 /* Reserved */
337 /* External interrupt signals from logic tiles or secondary controller */
338#define INT_VICSOURCE21 21 /* Disk on Chip */
339#define INT_VICSOURCE22 22 /* MCI0A */
340#define INT_VICSOURCE23 23 /* MCI1A */
341#define INT_VICSOURCE24 24 /* AACI */
342#define INT_VICSOURCE25 25 /* Ethernet */
343#define INT_VICSOURCE26 26 /* USB */
344#define INT_VICSOURCE27 27 /* PCI 0 */
345#define INT_VICSOURCE28 28 /* PCI 1 */
346#define INT_VICSOURCE29 29 /* PCI 2 */
347#define INT_VICSOURCE30 30 /* PCI 3 */
348#define INT_VICSOURCE31 31 /* SIC source */
349
350/*
351 * Interrupt bit positions
352 *
353 */
354#define INTMASK_WDOGINT (1 << INT_WDOGINT)
355#define INTMASK_SOFTINT (1 << INT_SOFTINT)
356#define INTMASK_COMMRx (1 << INT_COMMRx)
357#define INTMASK_COMMTx (1 << INT_COMMTx)
358#define INTMASK_TIMERINT0_1 (1 << INT_TIMERINT0_1)
359#define INTMASK_TIMERINT2_3 (1 << INT_TIMERINT2_3)
360#define INTMASK_GPIOINT0 (1 << INT_GPIOINT0)
361#define INTMASK_GPIOINT1 (1 << INT_GPIOINT1)
362#define INTMASK_GPIOINT2 (1 << INT_GPIOINT2)
363#define INTMASK_GPIOINT3 (1 << INT_GPIOINT3)
364#define INTMASK_RTCINT (1 << INT_RTCINT)
365#define INTMASK_SSPINT (1 << INT_SSPINT)
366#define INTMASK_UARTINT0 (1 << INT_UARTINT0)
367#define INTMASK_UARTINT1 (1 << INT_UARTINT1)
368#define INTMASK_UARTINT2 (1 << INT_UARTINT2)
369#define INTMASK_SCIINT (1 << INT_SCIINT)
370#define INTMASK_CLCDINT (1 << INT_CLCDINT)
371#define INTMASK_DMAINT (1 << INT_DMAINT)
372#define INTMASK_PWRFAILINT (1 << INT_PWRFAILINT)
373#define INTMASK_MBXINT (1 << INT_MBXINT)
374#define INTMASK_GNDINT (1 << INT_GNDINT)
375#define INTMASK_VICSOURCE21 (1 << INT_VICSOURCE21)
376#define INTMASK_VICSOURCE22 (1 << INT_VICSOURCE22)
377#define INTMASK_VICSOURCE23 (1 << INT_VICSOURCE23)
378#define INTMASK_VICSOURCE24 (1 << INT_VICSOURCE24)
379#define INTMASK_VICSOURCE25 (1 << INT_VICSOURCE25)
380#define INTMASK_VICSOURCE26 (1 << INT_VICSOURCE26)
381#define INTMASK_VICSOURCE27 (1 << INT_VICSOURCE27)
382#define INTMASK_VICSOURCE28 (1 << INT_VICSOURCE28)
383#define INTMASK_VICSOURCE29 (1 << INT_VICSOURCE29)
384#define INTMASK_VICSOURCE30 (1 << INT_VICSOURCE30)
385#define INTMASK_VICSOURCE31 (1 << INT_VICSOURCE31)
386
387
388#define VERSATILE_SC_VALID_INT 0x003FFFFF
389
390#define MAXIRQNUM 31
391#define MAXFIQNUM 31
392#define MAXSWINUM 31
393
394/* ------------------------------------------------------------------------
395 * Interrupts - bit assignment (secondary)
396 * ------------------------------------------------------------------------
397 */
398#define SIC_INT_MMCI0B 1 /* Multimedia Card 0B */
399#define SIC_INT_MMCI1B 2 /* Multimedia Card 1B */
400#define SIC_INT_KMI0 3 /* Keyboard/Mouse port 0 */
401#define SIC_INT_KMI1 4 /* Keyboard/Mouse port 1 */
402#define SIC_INT_SCI3 5 /* Smart Card interface */
403#define SIC_INT_UART3 6 /* UART 3 empty or data available */
404#define SIC_INT_CLCD 7 /* Character LCD */
405#define SIC_INT_TOUCH 8 /* Touchscreen */
406#define SIC_INT_KEYPAD 9 /* Key pressed on display keypad */
407 /* 10:20 - reserved */
408#define SIC_INT_DoC 21 /* Disk on Chip memory controller */
409#define SIC_INT_MMCI0A 22 /* MMC 0A */
410#define SIC_INT_MMCI1A 23 /* MMC 1A */
411#define SIC_INT_AACI 24 /* Audio Codec */
412#define SIC_INT_ETH 25 /* Ethernet controller */
413#define SIC_INT_USB 26 /* USB controller */
414#define SIC_INT_PCI0 27
415#define SIC_INT_PCI1 28
416#define SIC_INT_PCI2 29
417#define SIC_INT_PCI3 30
418
419
420#define SIC_INTMASK_MMCI0B (1 << SIC_INT_MMCI0B)
421#define SIC_INTMASK_MMCI1B (1 << SIC_INT_MMCI1B)
422#define SIC_INTMASK_KMI0 (1 << SIC_INT_KMI0)
423#define SIC_INTMASK_KMI1 (1 << SIC_INT_KMI1)
424#define SIC_INTMASK_SCI3 (1 << SIC_INT_SCI3)
425#define SIC_INTMASK_UART3 (1 << SIC_INT_UART3)
426#define SIC_INTMASK_CLCD (1 << SIC_INT_CLCD)
427#define SIC_INTMASK_TOUCH (1 << SIC_INT_TOUCH)
428#define SIC_INTMASK_KEYPAD (1 << SIC_INT_KEYPAD)
429#define SIC_INTMASK_DoC (1 << SIC_INT_DoC)
430#define SIC_INTMASK_MMCI0A (1 << SIC_INT_MMCI0A)
431#define SIC_INTMASK_MMCI1A (1 << SIC_INT_MMCI1A)
432#define SIC_INTMASK_AACI (1 << SIC_INT_AACI)
433#define SIC_INTMASK_ETH (1 << SIC_INT_ETH)
434#define SIC_INTMASK_USB (1 << SIC_INT_USB)
435#define SIC_INTMASK_PCI0 (1 << SIC_INT_PCI0)
436#define SIC_INTMASK_PCI1 (1 << SIC_INT_PCI1)
437#define SIC_INTMASK_PCI2 (1 << SIC_INT_PCI2)
438#define SIC_INTMASK_PCI3 (1 << SIC_INT_PCI3)
439/*
440 * Application Flash
441 *
442 */
443#define FLASH_BASE VERSATILE_FLASH_BASE
444#define FLASH_SIZE VERSATILE_FLASH_SIZE
445#define FLASH_END (FLASH_BASE + FLASH_SIZE - 1)
446#define FLASH_BLOCK_SIZE SZ_128K
447
448/*
449 * Boot Flash
450 *
451 */
452#define EPROM_BASE VERSATILE_BOOT_ROM_HI
453#define EPROM_SIZE VERSATILE_BOOT_ROM_SIZE
454#define EPROM_END (EPROM_BASE + EPROM_SIZE - 1)
455
456/*
457 * Clean base - dummy
458 *
459 */
460#define CLEAN_BASE EPROM_BASE
461
462/*
463 * System controller bit assignment
464 */
465#define VERSATILE_REFCLK 0
466#define VERSATILE_TIMCLK 1
467
468#define VERSATILE_TIMER1_EnSel 15
469#define VERSATILE_TIMER2_EnSel 17
470#define VERSATILE_TIMER3_EnSel 19
471#define VERSATILE_TIMER4_EnSel 21
472
473
474#define MAX_TIMER 2
475#define MAX_PERIOD 699050
476#define TICKS_PER_uSEC 1
477
478/*
479 * These are useconds NOT ticks.
480 *
481 */
482#define mSEC_1 1000
483#define mSEC_5 (mSEC_1 * 5)
484#define mSEC_10 (mSEC_1 * 10)
485#define mSEC_25 (mSEC_1 * 25)
486#define SEC_1 (mSEC_1 * 1000)
487
488#define VERSATILE_CSR_BASE 0x10000000
489#define VERSATILE_CSR_SIZE 0x10000000
490
491#ifdef CONFIG_MACH_VERSATILE_AB
492/*
493 * IB2 Versatile/AB expansion board definitions
494 */
495#define VERSATILE_IB2_CAMERA_BANK VERSATILE_IB2_BASE
496#define VERSATILE_IB2_KBD_DATAREG (VERSATILE_IB2_BASE + 0x01000000)
497
498/* VICINTSOURCE27 */
499#define VERSATILE_IB2_INT_BASE (VERSATILE_IB2_BASE + 0x02000000)
500#define VERSATILE_IB2_IER (VERSATILE_IB2_INT_BASE + 0)
501#define VERSATILE_IB2_ISR (VERSATILE_IB2_INT_BASE + 4)
502
503#define VERSATILE_IB2_CTL_BASE (VERSATILE_IB2_BASE + 0x03000000)
504#define VERSATILE_IB2_CTRL (VERSATILE_IB2_CTL_BASE + 0)
505#define VERSATILE_IB2_STAT (VERSATILE_IB2_CTL_BASE + 4)
506#endif
507
508#endif
509
510/* END */
diff --git a/arch/arm/mach-versatile/include/mach/system.h b/arch/arm/mach-versatile/include/mach/system.h
new file mode 100644
index 000000000000..91fa559c7cca
--- /dev/null
+++ b/arch/arm/mach-versatile/include/mach/system.h
@@ -0,0 +1,49 @@
1/*
2 * arch/arm/mach-versatile/include/mach/system.h
3 *
4 * Copyright (C) 2003 ARM Limited
5 * Copyright (C) 2000 Deep Blue Solutions Ltd
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
21#ifndef __ASM_ARCH_SYSTEM_H
22#define __ASM_ARCH_SYSTEM_H
23
24#include <mach/hardware.h>
25#include <asm/io.h>
26#include <mach/platform.h>
27
28static inline void arch_idle(void)
29{
30 /*
31 * This should do all the clock switching
32 * and wait for interrupt tricks
33 */
34 cpu_do_idle();
35}
36
37static inline void arch_reset(char mode)
38{
39 u32 val;
40
41 val = __raw_readl(IO_ADDRESS(VERSATILE_SYS_RESETCTL)) & ~0x7;
42 val |= 0x105;
43
44 __raw_writel(0xa05f, IO_ADDRESS(VERSATILE_SYS_LOCK));
45 __raw_writel(val, IO_ADDRESS(VERSATILE_SYS_RESETCTL));
46 __raw_writel(0, IO_ADDRESS(VERSATILE_SYS_LOCK));
47}
48
49#endif
diff --git a/arch/arm/mach-versatile/include/mach/timex.h b/arch/arm/mach-versatile/include/mach/timex.h
new file mode 100644
index 000000000000..426199b1add5
--- /dev/null
+++ b/arch/arm/mach-versatile/include/mach/timex.h
@@ -0,0 +1,23 @@
1/*
2 * arch/arm/mach-versatile/include/mach/timex.h
3 *
4 * Versatile architecture timex specifications
5 *
6 * Copyright (C) 2003 ARM Limited
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 */
22
23#define CLOCK_TICK_RATE (50000000 / 16)
diff --git a/arch/arm/mach-versatile/include/mach/uncompress.h b/arch/arm/mach-versatile/include/mach/uncompress.h
new file mode 100644
index 000000000000..3dd0048afb34
--- /dev/null
+++ b/arch/arm/mach-versatile/include/mach/uncompress.h
@@ -0,0 +1,46 @@
1/*
2 * arch/arm/mach-versatile/include/mach/uncompress.h
3 *
4 * Copyright (C) 2003 ARM Limited
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20#define AMBA_UART_DR (*(volatile unsigned char *)0x101F1000)
21#define AMBA_UART_LCRH (*(volatile unsigned char *)0x101F102C)
22#define AMBA_UART_CR (*(volatile unsigned char *)0x101F1030)
23#define AMBA_UART_FR (*(volatile unsigned char *)0x101F1018)
24
25/*
26 * This does not append a newline
27 */
28static inline void putc(int c)
29{
30 while (AMBA_UART_FR & (1 << 5))
31 barrier();
32
33 AMBA_UART_DR = c;
34}
35
36static inline void flush(void)
37{
38 while (AMBA_UART_FR & (1 << 3))
39 barrier();
40}
41
42/*
43 * nothing to do
44 */
45#define arch_decomp_setup()
46#define arch_decomp_wdog()
diff --git a/arch/arm/mach-versatile/include/mach/vmalloc.h b/arch/arm/mach-versatile/include/mach/vmalloc.h
new file mode 100644
index 000000000000..427e3612db5d
--- /dev/null
+++ b/arch/arm/mach-versatile/include/mach/vmalloc.h
@@ -0,0 +1,21 @@
1/*
2 * arch/arm/mach-versatile/include/mach/vmalloc.h
3 *
4 * Copyright (C) 2003 ARM Limited
5 * Copyright (C) 2000 Russell King.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
21#define VMALLOC_END (PAGE_OFFSET + 0x18000000)
diff --git a/arch/arm/mach-versatile/pci.c b/arch/arm/mach-versatile/pci.c
index ca8290159432..36f23f896503 100644
--- a/arch/arm/mach-versatile/pci.c
+++ b/arch/arm/mach-versatile/pci.c
@@ -22,7 +22,7 @@
22#include <linux/spinlock.h> 22#include <linux/spinlock.h>
23#include <linux/init.h> 23#include <linux/init.h>
24 24
25#include <asm/hardware.h> 25#include <mach/hardware.h>
26#include <asm/io.h> 26#include <asm/io.h>
27#include <asm/irq.h> 27#include <asm/irq.h>
28#include <asm/system.h> 28#include <asm/system.h>
diff --git a/arch/arm/mach-versatile/versatile_ab.c b/arch/arm/mach-versatile/versatile_ab.c
index b257ef78ef45..76375c64413a 100644
--- a/arch/arm/mach-versatile/versatile_ab.c
+++ b/arch/arm/mach-versatile/versatile_ab.c
@@ -24,7 +24,7 @@
24#include <linux/sysdev.h> 24#include <linux/sysdev.h>
25#include <linux/amba/bus.h> 25#include <linux/amba/bus.h>
26 26
27#include <asm/hardware.h> 27#include <mach/hardware.h>
28#include <asm/io.h> 28#include <asm/io.h>
29#include <asm/irq.h> 29#include <asm/irq.h>
30#include <asm/mach-types.h> 30#include <asm/mach-types.h>
diff --git a/arch/arm/mach-versatile/versatile_pb.c b/arch/arm/mach-versatile/versatile_pb.c
index be439bb9d450..1725f019fc85 100644
--- a/arch/arm/mach-versatile/versatile_pb.c
+++ b/arch/arm/mach-versatile/versatile_pb.c
@@ -24,7 +24,7 @@
24#include <linux/sysdev.h> 24#include <linux/sysdev.h>
25#include <linux/amba/bus.h> 25#include <linux/amba/bus.h>
26 26
27#include <asm/hardware.h> 27#include <mach/hardware.h>
28#include <asm/io.h> 28#include <asm/io.h>
29#include <asm/irq.h> 29#include <asm/irq.h>
30#include <asm/mach-types.h> 30#include <asm/mach-types.h>
diff --git a/arch/arm/mm/cache-v3.S b/arch/arm/mm/cache-v3.S
index e1994788cf0e..3b3639eb7ca5 100644
--- a/arch/arm/mm/cache-v3.S
+++ b/arch/arm/mm/cache-v3.S
@@ -9,7 +9,7 @@
9 */ 9 */
10#include <linux/linkage.h> 10#include <linux/linkage.h>
11#include <linux/init.h> 11#include <linux/init.h>
12#include <asm/hardware.h> 12#include <mach/hardware.h>
13#include <asm/page.h> 13#include <asm/page.h>
14#include "proc-macros.S" 14#include "proc-macros.S"
15 15
diff --git a/arch/arm/mm/cache-v4.S b/arch/arm/mm/cache-v4.S
index b2908063ed6a..33926c9fcda6 100644
--- a/arch/arm/mm/cache-v4.S
+++ b/arch/arm/mm/cache-v4.S
@@ -9,7 +9,7 @@
9 */ 9 */
10#include <linux/linkage.h> 10#include <linux/linkage.h>
11#include <linux/init.h> 11#include <linux/init.h>
12#include <asm/hardware.h> 12#include <mach/hardware.h>
13#include <asm/page.h> 13#include <asm/page.h>
14#include "proc-macros.S" 14#include "proc-macros.S"
15 15
diff --git a/arch/arm/mm/cache-v4wt.S b/arch/arm/mm/cache-v4wt.S
index 9bcabd86c6f3..51a9b0b273b6 100644
--- a/arch/arm/mm/cache-v4wt.S
+++ b/arch/arm/mm/cache-v4wt.S
@@ -13,7 +13,7 @@
13 */ 13 */
14#include <linux/linkage.h> 14#include <linux/linkage.h>
15#include <linux/init.h> 15#include <linux/init.h>
16#include <asm/hardware.h> 16#include <mach/hardware.h>
17#include <asm/page.h> 17#include <asm/page.h>
18#include "proc-macros.S" 18#include "proc-macros.S"
19 19
diff --git a/arch/arm/mm/proc-sa110.S b/arch/arm/mm/proc-sa110.S
index 9818195dbf11..bbe10576c861 100644
--- a/arch/arm/mm/proc-sa110.S
+++ b/arch/arm/mm/proc-sa110.S
@@ -18,7 +18,7 @@
18#include <asm/assembler.h> 18#include <asm/assembler.h>
19#include <asm/asm-offsets.h> 19#include <asm/asm-offsets.h>
20#include <asm/elf.h> 20#include <asm/elf.h>
21#include <asm/hardware.h> 21#include <mach/hardware.h>
22#include <asm/pgtable-hwdef.h> 22#include <asm/pgtable-hwdef.h>
23#include <asm/pgtable.h> 23#include <asm/pgtable.h>
24#include <asm/ptrace.h> 24#include <asm/ptrace.h>
diff --git a/arch/arm/mm/proc-sa1100.S b/arch/arm/mm/proc-sa1100.S
index c5fe27ad2892..871ba018252e 100644
--- a/arch/arm/mm/proc-sa1100.S
+++ b/arch/arm/mm/proc-sa1100.S
@@ -23,7 +23,7 @@
23#include <asm/assembler.h> 23#include <asm/assembler.h>
24#include <asm/asm-offsets.h> 24#include <asm/asm-offsets.h>
25#include <asm/elf.h> 25#include <asm/elf.h>
26#include <asm/hardware.h> 26#include <mach/hardware.h>
27#include <asm/pgtable-hwdef.h> 27#include <asm/pgtable-hwdef.h>
28#include <asm/pgtable.h> 28#include <asm/pgtable.h>
29 29
diff --git a/arch/arm/mm/proc-xsc3.S b/arch/arm/mm/proc-xsc3.S
index 6ff53c24510f..7bd9e7197f60 100644
--- a/arch/arm/mm/proc-xsc3.S
+++ b/arch/arm/mm/proc-xsc3.S
@@ -28,7 +28,7 @@
28#include <linux/init.h> 28#include <linux/init.h>
29#include <asm/assembler.h> 29#include <asm/assembler.h>
30#include <asm/elf.h> 30#include <asm/elf.h>
31#include <asm/hardware.h> 31#include <mach/hardware.h>
32#include <asm/pgtable.h> 32#include <asm/pgtable.h>
33#include <asm/pgtable-hwdef.h> 33#include <asm/pgtable-hwdef.h>
34#include <asm/page.h> 34#include <asm/page.h>
diff --git a/arch/arm/oprofile/op_model_mpcore.c b/arch/arm/oprofile/op_model_mpcore.c
index 4458705021e0..92db6e035c65 100644
--- a/arch/arm/oprofile/op_model_mpcore.c
+++ b/arch/arm/oprofile/op_model_mpcore.c
@@ -40,7 +40,7 @@
40#include <asm/io.h> 40#include <asm/io.h>
41#include <asm/irq.h> 41#include <asm/irq.h>
42#include <asm/mach/irq.h> 42#include <asm/mach/irq.h>
43#include <asm/hardware.h> 43#include <mach/hardware.h>
44#include <asm/system.h> 44#include <asm/system.h>
45 45
46#include "op_counter.h" 46#include "op_counter.h"
diff --git a/arch/arm/plat-iop/adma.c b/arch/arm/plat-iop/adma.c
index 53c5e9a52eb1..f72420821619 100644
--- a/arch/arm/plat-iop/adma.c
+++ b/arch/arm/plat-iop/adma.c
@@ -19,7 +19,7 @@
19#include <linux/platform_device.h> 19#include <linux/platform_device.h>
20#include <asm/hardware/iop3xx.h> 20#include <asm/hardware/iop3xx.h>
21#include <linux/dma-mapping.h> 21#include <linux/dma-mapping.h>
22#include <asm/arch/adma.h> 22#include <mach/adma.h>
23#include <asm/hardware/iop_adma.h> 23#include <asm/hardware/iop_adma.h>
24 24
25#ifdef CONFIG_ARCH_IOP32X 25#ifdef CONFIG_ARCH_IOP32X
diff --git a/arch/arm/plat-iop/i2c.c b/arch/arm/plat-iop/i2c.c
index e99909bdba71..6dcbcc4ad419 100644
--- a/arch/arm/plat-iop/i2c.c
+++ b/arch/arm/plat-iop/i2c.c
@@ -25,9 +25,8 @@
25#include <asm/setup.h> 25#include <asm/setup.h>
26#include <asm/system.h> 26#include <asm/system.h>
27#include <asm/memory.h> 27#include <asm/memory.h>
28#include <asm/hardware.h> 28#include <mach/hardware.h>
29#include <asm/hardware/iop3xx.h> 29#include <asm/hardware/iop3xx.h>
30#include <asm/mach-types.h>
31#include <asm/mach/arch.h> 30#include <asm/mach/arch.h>
32 31
33#ifdef CONFIG_ARCH_IOP32X 32#ifdef CONFIG_ARCH_IOP32X
diff --git a/arch/arm/plat-iop/io.c b/arch/arm/plat-iop/io.c
index 498675d028d0..39dcfb4bdc71 100644
--- a/arch/arm/plat-iop/io.c
+++ b/arch/arm/plat-iop/io.c
@@ -18,7 +18,7 @@
18 */ 18 */
19#include <linux/kernel.h> 19#include <linux/kernel.h>
20#include <linux/module.h> 20#include <linux/module.h>
21#include <asm/hardware.h> 21#include <mach/hardware.h>
22#include <asm/io.h> 22#include <asm/io.h>
23 23
24void * __iomem __iop3xx_ioremap(unsigned long cookie, size_t size, 24void * __iomem __iop3xx_ioremap(unsigned long cookie, size_t size,
diff --git a/arch/arm/plat-iop/pci.c b/arch/arm/plat-iop/pci.c
index d9bc15a69e5d..54708bf9cb15 100644
--- a/arch/arm/plat-iop/pci.c
+++ b/arch/arm/plat-iop/pci.c
@@ -21,10 +21,9 @@
21#include <asm/irq.h> 21#include <asm/irq.h>
22#include <asm/signal.h> 22#include <asm/signal.h>
23#include <asm/system.h> 23#include <asm/system.h>
24#include <asm/hardware.h> 24#include <mach/hardware.h>
25#include <asm/mach/pci.h> 25#include <asm/mach/pci.h>
26#include <asm/hardware/iop3xx.h> 26#include <asm/hardware/iop3xx.h>
27#include <asm/mach-types.h>
28 27
29// #define DEBUG 28// #define DEBUG
30 29
diff --git a/arch/arm/plat-iop/time.c b/arch/arm/plat-iop/time.c
index 6fe481ff4fdf..c53fefb6aac4 100644
--- a/arch/arm/plat-iop/time.c
+++ b/arch/arm/plat-iop/time.c
@@ -18,13 +18,13 @@
18#include <linux/time.h> 18#include <linux/time.h>
19#include <linux/init.h> 19#include <linux/init.h>
20#include <linux/timex.h> 20#include <linux/timex.h>
21#include <asm/hardware.h> 21#include <mach/hardware.h>
22#include <asm/io.h> 22#include <asm/io.h>
23#include <asm/irq.h> 23#include <asm/irq.h>
24#include <asm/uaccess.h> 24#include <asm/uaccess.h>
25#include <asm/mach/irq.h> 25#include <asm/mach/irq.h>
26#include <asm/mach/time.h> 26#include <asm/mach/time.h>
27#include <asm/arch/time.h> 27#include <mach/time.h>
28 28
29static unsigned long ticks_per_jiffy; 29static unsigned long ticks_per_jiffy;
30static unsigned long ticks_per_usec; 30static unsigned long ticks_per_usec;
diff --git a/arch/arm/plat-mxc/clock.c b/arch/arm/plat-mxc/clock.c
index 1aa86fd60d71..2f8627218839 100644
--- a/arch/arm/plat-mxc/clock.c
+++ b/arch/arm/plat-mxc/clock.c
@@ -39,7 +39,7 @@
39#include <linux/string.h> 39#include <linux/string.h>
40#include <linux/version.h> 40#include <linux/version.h>
41 41
42#include <asm/arch/clock.h> 42#include <mach/clock.h>
43 43
44static LIST_HEAD(clocks); 44static LIST_HEAD(clocks);
45static DEFINE_MUTEX(clocks_mutex); 45static DEFINE_MUTEX(clocks_mutex);
diff --git a/arch/arm/plat-mxc/gpio.c b/arch/arm/plat-mxc/gpio.c
index 318b268f938e..733e0acac916 100644
--- a/arch/arm/plat-mxc/gpio.c
+++ b/arch/arm/plat-mxc/gpio.c
@@ -23,7 +23,7 @@
23#include <linux/io.h> 23#include <linux/io.h>
24#include <linux/irq.h> 24#include <linux/irq.h>
25#include <linux/gpio.h> 25#include <linux/gpio.h>
26#include <asm/hardware.h> 26#include <mach/hardware.h>
27#include <asm-generic/bug.h> 27#include <asm-generic/bug.h>
28 28
29static struct mxc_gpio_port *mxc_gpio_ports; 29static struct mxc_gpio_port *mxc_gpio_ports;
diff --git a/include/asm-arm/arch-mxc/board-mx27ads.h b/arch/arm/plat-mxc/include/mach/board-mx27ads.h
index 61e66dac90ef..61e66dac90ef 100644
--- a/include/asm-arm/arch-mxc/board-mx27ads.h
+++ b/arch/arm/plat-mxc/include/mach/board-mx27ads.h
diff --git a/include/asm-arm/arch-mxc/board-mx31ads.h b/arch/arm/plat-mxc/include/mach/board-mx31ads.h
index 1bc6fb0f9a83..1bc6fb0f9a83 100644
--- a/include/asm-arm/arch-mxc/board-mx31ads.h
+++ b/arch/arm/plat-mxc/include/mach/board-mx31ads.h
diff --git a/include/asm-arm/arch-mxc/board-mx31lite.h b/arch/arm/plat-mxc/include/mach/board-mx31lite.h
index e4e5cf5ad7db..e4e5cf5ad7db 100644
--- a/include/asm-arm/arch-mxc/board-mx31lite.h
+++ b/arch/arm/plat-mxc/include/mach/board-mx31lite.h
diff --git a/include/asm-arm/arch-mxc/board-pcm037.h b/arch/arm/plat-mxc/include/mach/board-pcm037.h
index 82232ba3c8fc..82232ba3c8fc 100644
--- a/include/asm-arm/arch-mxc/board-pcm037.h
+++ b/arch/arm/plat-mxc/include/mach/board-pcm037.h
diff --git a/include/asm-arm/arch-mxc/board-pcm038.h b/arch/arm/plat-mxc/include/mach/board-pcm038.h
index 750c62afd90f..750c62afd90f 100644
--- a/include/asm-arm/arch-mxc/board-pcm038.h
+++ b/arch/arm/plat-mxc/include/mach/board-pcm038.h
diff --git a/include/asm-arm/arch-mxc/clock.h b/arch/arm/plat-mxc/include/mach/clock.h
index 24caa2b7c91d..24caa2b7c91d 100644
--- a/include/asm-arm/arch-mxc/clock.h
+++ b/arch/arm/plat-mxc/include/mach/clock.h
diff --git a/include/asm-arm/arch-mxc/common.h b/arch/arm/plat-mxc/include/mach/common.h
index a6d2e24aab15..a6d2e24aab15 100644
--- a/include/asm-arm/arch-mxc/common.h
+++ b/arch/arm/plat-mxc/include/mach/common.h
diff --git a/arch/arm/plat-mxc/include/mach/debug-macro.S b/arch/arm/plat-mxc/include/mach/debug-macro.S
new file mode 100644
index 000000000000..b9907bebba3b
--- /dev/null
+++ b/arch/arm/plat-mxc/include/mach/debug-macro.S
@@ -0,0 +1,49 @@
1/* arch/arm/mach-imx/include/mach/debug-macro.S
2 *
3 * Debugging macro include header
4 *
5 * Copyright (C) 1994-1999 Russell King
6 * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 *
12 */
13
14#include <mach/hardware.h>
15
16#ifdef CONFIG_MACH_MX31ADS
17#include <mach/board-mx31ads.h>
18#endif
19#ifdef CONFIG_MACH_PCM037
20#include <mach/board-pcm037.h>
21#endif
22#ifdef CONFIG_MACH_MX31LITE
23#include <mach/board-mx31lite.h>
24#endif
25#ifdef CONFIG_MACH_MX27ADS
26#include <mach/board-mx27ads.h>
27#endif
28#ifdef CONFIG_MACH_PCM038
29#include <mach/board-pcm038.h>
30#endif
31 .macro addruart,rx
32 mrc p15, 0, \rx, c1, c0
33 tst \rx, #1 @ MMU enabled?
34 ldreq \rx, =MXC_LL_UART_PADDR @ physical
35 ldrne \rx, =MXC_LL_UART_VADDR @ virtual
36 .endm
37
38 .macro senduart,rd,rx
39 str \rd, [\rx, #0x40] @ TXDATA
40 .endm
41
42 .macro waituart,rd,rx
43 .endm
44
45 .macro busyuart,rd,rx
461002: ldr \rd, [\rx, #0x98] @ SR2
47 tst \rd, #1 << 3 @ TXDC
48 beq 1002b @ wait until transmit done
49 .endm
diff --git a/include/asm-arm/arch-mxc/dma.h b/arch/arm/plat-mxc/include/mach/dma.h
index c822d569a05e..c822d569a05e 100644
--- a/include/asm-arm/arch-mxc/dma.h
+++ b/arch/arm/plat-mxc/include/mach/dma.h
diff --git a/include/asm-arm/arch-mxc/entry-macro.S b/arch/arm/plat-mxc/include/mach/entry-macro.S
index b542433afb1b..b542433afb1b 100644
--- a/include/asm-arm/arch-mxc/entry-macro.S
+++ b/arch/arm/plat-mxc/include/mach/entry-macro.S
diff --git a/arch/arm/plat-mxc/include/mach/gpio.h b/arch/arm/plat-mxc/include/mach/gpio.h
new file mode 100644
index 000000000000..65eedc0d196f
--- /dev/null
+++ b/arch/arm/plat-mxc/include/mach/gpio.h
@@ -0,0 +1,42 @@
1/*
2 * Copyright 2007 Freescale Semiconductor, Inc. All Rights Reserved.
3 * Copyright 2008 Juergen Beisert, kernel@pengutronix.de
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version 2
8 * of the License, or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 */
18
19#ifndef __ASM_ARCH_MXC_GPIO_H__
20#define __ASM_ARCH_MXC_GPIO_H__
21
22#include <mach/hardware.h>
23#include <asm-generic/gpio.h>
24
25/* use gpiolib dispatchers */
26#define gpio_get_value __gpio_get_value
27#define gpio_set_value __gpio_set_value
28#define gpio_cansleep __gpio_cansleep
29
30#define gpio_to_irq(gpio) (MXC_MAX_INT_LINES + (gpio))
31#define irq_to_gpio(irq) ((irq) - MXC_MAX_INT_LINES)
32
33struct mxc_gpio_port {
34 void __iomem *base;
35 int irq;
36 int virtual_irq_start;
37 struct gpio_chip chip;
38};
39
40int mxc_gpio_init(struct mxc_gpio_port*, int);
41
42#endif
diff --git a/arch/arm/plat-mxc/include/mach/hardware.h b/arch/arm/plat-mxc/include/mach/hardware.h
new file mode 100644
index 000000000000..3caadeeda701
--- /dev/null
+++ b/arch/arm/plat-mxc/include/mach/hardware.h
@@ -0,0 +1,37 @@
1/*
2 * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved.
3 * Copyright 2008 Juergen Beisert, kernel@pengutronix.de
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version 2
8 * of the License, or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
17 * MA 02110-1301, USA.
18 */
19
20#ifndef __ASM_ARCH_MXC_HARDWARE_H__
21#define __ASM_ARCH_MXC_HARDWARE_H__
22
23#include <asm/sizes.h>
24
25#ifdef CONFIG_ARCH_MX3
26# include <mach/mx31.h>
27#endif
28
29#ifdef CONFIG_ARCH_MX2
30# ifdef CONFIG_MACH_MX27
31# include <mach/mx27.h>
32# endif
33#endif
34
35#include <mach/mxc.h>
36
37#endif /* __ASM_ARCH_MXC_HARDWARE_H__ */
diff --git a/include/asm-arm/arch-mxc/iim.h b/arch/arm/plat-mxc/include/mach/iim.h
index 315bffadafda..315bffadafda 100644
--- a/include/asm-arm/arch-mxc/iim.h
+++ b/arch/arm/plat-mxc/include/mach/iim.h
diff --git a/include/asm-arm/arch-mxc/imx-uart.h b/arch/arm/plat-mxc/include/mach/imx-uart.h
index 83fb72c4048a..83fb72c4048a 100644
--- a/include/asm-arm/arch-mxc/imx-uart.h
+++ b/arch/arm/plat-mxc/include/mach/imx-uart.h
diff --git a/include/asm-arm/arch-mxc/io.h b/arch/arm/plat-mxc/include/mach/io.h
index 65b6810124c1..65b6810124c1 100644
--- a/include/asm-arm/arch-mxc/io.h
+++ b/arch/arm/plat-mxc/include/mach/io.h
diff --git a/include/asm-arm/arch-mxc/iomux-mx1-mx2.h b/arch/arm/plat-mxc/include/mach/iomux-mx1-mx2.h
index 076d37b38eb2..076d37b38eb2 100644
--- a/include/asm-arm/arch-mxc/iomux-mx1-mx2.h
+++ b/arch/arm/plat-mxc/include/mach/iomux-mx1-mx2.h
diff --git a/include/asm-arm/arch-mxc/iomux-mx3.h b/arch/arm/plat-mxc/include/mach/iomux-mx3.h
index 7509e7692f08..7509e7692f08 100644
--- a/include/asm-arm/arch-mxc/iomux-mx3.h
+++ b/arch/arm/plat-mxc/include/mach/iomux-mx3.h
diff --git a/arch/arm/plat-mxc/include/mach/irqs.h b/arch/arm/plat-mxc/include/mach/irqs.h
new file mode 100644
index 000000000000..228c4f68ccdf
--- /dev/null
+++ b/arch/arm/plat-mxc/include/mach/irqs.h
@@ -0,0 +1,16 @@
1/*
2 * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved.
3 */
4
5/*
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10
11#ifndef __ASM_ARCH_MXC_IRQS_H__
12#define __ASM_ARCH_MXC_IRQS_H__
13
14#include <mach/hardware.h>
15
16#endif /* __ASM_ARCH_MXC_IRQS_H__ */
diff --git a/arch/arm/plat-mxc/include/mach/memory.h b/arch/arm/plat-mxc/include/mach/memory.h
new file mode 100644
index 000000000000..d7a8d3ebed57
--- /dev/null
+++ b/arch/arm/plat-mxc/include/mach/memory.h
@@ -0,0 +1,29 @@
1/*
2 * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved.
3 */
4
5/*
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10
11#ifndef __ASM_ARCH_MXC_MEMORY_H__
12#define __ASM_ARCH_MXC_MEMORY_H__
13
14#include <mach/hardware.h>
15
16/*
17 * Virtual view <-> DMA view memory address translations
18 * This macro is used to translate the virtual address to an address
19 * suitable to be passed to set_dma_addr()
20 */
21#define __virt_to_bus(a) __virt_to_phys(a)
22
23/*
24 * Used to convert an address for DMA operations to an address that the
25 * kernel can use.
26 */
27#define __bus_to_virt(a) __phys_to_virt(a)
28
29#endif /* __ASM_ARCH_MXC_MEMORY_H__ */
diff --git a/include/asm-arm/arch-mxc/mx27.h b/arch/arm/plat-mxc/include/mach/mx27.h
index 212ecc246626..212ecc246626 100644
--- a/include/asm-arm/arch-mxc/mx27.h
+++ b/arch/arm/plat-mxc/include/mach/mx27.h
diff --git a/include/asm-arm/arch-mxc/mx31.h b/arch/arm/plat-mxc/include/mach/mx31.h
index a7373e4a56cb..a7373e4a56cb 100644
--- a/include/asm-arm/arch-mxc/mx31.h
+++ b/arch/arm/plat-mxc/include/mach/mx31.h
diff --git a/include/asm-arm/arch-mxc/mxc.h b/arch/arm/plat-mxc/include/mach/mxc.h
index 332eda4dbd3b..332eda4dbd3b 100644
--- a/include/asm-arm/arch-mxc/mxc.h
+++ b/arch/arm/plat-mxc/include/mach/mxc.h
diff --git a/arch/arm/plat-mxc/include/mach/mxc_timer.h b/arch/arm/plat-mxc/include/mach/mxc_timer.h
new file mode 100644
index 000000000000..130aebfbe168
--- /dev/null
+++ b/arch/arm/plat-mxc/include/mach/mxc_timer.h
@@ -0,0 +1,158 @@
1/*
2 * mxc_timer.h
3 *
4 * Copyright (C) 2008 Juergen Beisert (kernel@pengutronix.de)
5 *
6 * Platform independent (i.MX1, i.MX2, i.MX3) definition for timer handling.
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor,
20 * Boston, MA 02110-1301, USA.
21 */
22
23#ifndef __PLAT_MXC_TIMER_H
24#define __PLAT_MXC_TIMER_H
25
26#include <linux/clk.h>
27#include <mach/hardware.h>
28
29#ifdef CONFIG_ARCH_IMX
30#define TIMER_BASE IO_ADDRESS(TIM1_BASE_ADDR)
31#define TIMER_INTERRUPT TIM1_INT
32
33#define TCTL_VAL TCTL_CLK_PCLK1
34#define TCTL_IRQEN (1<<4)
35#define TCTL_FRR (1<<8)
36#define TCTL_CLK_PCLK1 (1<<1)
37#define TCTL_CLK_PCLK1_4 (2<<1)
38#define TCTL_CLK_TIN (3<<1)
39#define TCTL_CLK_32 (4<<1)
40
41#define MXC_TCTL 0x00
42#define MXC_TPRER 0x04
43#define MXC_TCMP 0x08
44#define MXC_TCR 0x0c
45#define MXC_TCN 0x10
46#define MXC_TSTAT 0x14
47#define TSTAT_CAPT (1<<1)
48#define TSTAT_COMP (1<<0)
49
50static inline void gpt_irq_disable(void)
51{
52 unsigned int tmp;
53
54 tmp = __raw_readl(TIMER_BASE + MXC_TCTL);
55 __raw_writel(tmp & ~TCTL_IRQEN, TIMER_BASE + MXC_TCTL);
56}
57
58static inline void gpt_irq_enable(void)
59{
60 __raw_writel(__raw_readl(TIMER_BASE + MXC_TCTL) | TCTL_IRQEN,
61 TIMER_BASE + MXC_TCTL);
62}
63
64static void gpt_irq_acknowledge(void)
65{
66 __raw_writel(0, TIMER_BASE + MXC_TSTAT);
67}
68#endif /* CONFIG_ARCH_IMX */
69
70#ifdef CONFIG_ARCH_MX2
71#define TIMER_BASE IO_ADDRESS(GPT1_BASE_ADDR)
72#define TIMER_INTERRUPT MXC_INT_GPT1
73
74#define MXC_TCTL 0x00
75#define TCTL_VAL TCTL_CLK_PCLK1
76#define TCTL_CLK_PCLK1 (1<<1)
77#define TCTL_CLK_PCLK1_4 (2<<1)
78#define TCTL_IRQEN (1<<4)
79#define TCTL_FRR (1<<8)
80#define MXC_TPRER 0x04
81#define MXC_TCMP 0x08
82#define MXC_TCR 0x0c
83#define MXC_TCN 0x10
84#define MXC_TSTAT 0x14
85#define TSTAT_CAPT (1<<1)
86#define TSTAT_COMP (1<<0)
87
88static inline void gpt_irq_disable(void)
89{
90 unsigned int tmp;
91
92 tmp = __raw_readl(TIMER_BASE + MXC_TCTL);
93 __raw_writel(tmp & ~TCTL_IRQEN, TIMER_BASE + MXC_TCTL);
94}
95
96static inline void gpt_irq_enable(void)
97{
98 __raw_writel(__raw_readl(TIMER_BASE + MXC_TCTL) | TCTL_IRQEN,
99 TIMER_BASE + MXC_TCTL);
100}
101
102static void gpt_irq_acknowledge(void)
103{
104 __raw_writel(TSTAT_CAPT | TSTAT_COMP, TIMER_BASE + MXC_TSTAT);
105}
106#endif /* CONFIG_ARCH_MX2 */
107
108#ifdef CONFIG_ARCH_MX3
109#define TIMER_BASE IO_ADDRESS(GPT1_BASE_ADDR)
110#define TIMER_INTERRUPT MXC_INT_GPT
111
112#define MXC_TCTL 0x00
113#define TCTL_VAL (TCTL_CLK_IPG | TCTL_WAITEN)
114#define TCTL_CLK_IPG (1<<6)
115#define TCTL_FRR (1<<9)
116#define TCTL_WAITEN (1<<3)
117
118#define MXC_TPRER 0x04
119#define MXC_TSTAT 0x08
120#define TSTAT_OF1 (1<<0)
121#define TSTAT_OF2 (1<<1)
122#define TSTAT_OF3 (1<<2)
123#define TSTAT_IF1 (1<<3)
124#define TSTAT_IF2 (1<<4)
125#define TSTAT_ROV (1<<5)
126#define MXC_IR 0x0c
127#define MXC_TCMP 0x10
128#define MXC_TCMP2 0x14
129#define MXC_TCMP3 0x18
130#define MXC_TCR 0x1c
131#define MXC_TCN 0x24
132
133static inline void gpt_irq_disable(void)
134{
135 __raw_writel(0, TIMER_BASE + MXC_IR);
136}
137
138static inline void gpt_irq_enable(void)
139{
140 __raw_writel(1<<0, TIMER_BASE + MXC_IR);
141}
142
143static inline void gpt_irq_acknowledge(void)
144{
145 __raw_writel(TSTAT_OF1, TIMER_BASE + MXC_TSTAT);
146}
147#endif /* CONFIG_ARCH_MX3 */
148
149#define TCTL_SWR (1<<15)
150#define TCTL_CC (1<<10)
151#define TCTL_OM (1<<9)
152#define TCTL_CAP_RIS (1<<6)
153#define TCTL_CAP_FAL (2<<6)
154#define TCTL_CAP_RIS_FAL (3<<6)
155#define TCTL_CAP_ENA (1<<5)
156#define TCTL_TEN (1<<0)
157
158#endif
diff --git a/include/asm-arm/arch-mxc/system.h b/arch/arm/plat-mxc/include/mach/system.h
index bbfc37465fc5..bbfc37465fc5 100644
--- a/include/asm-arm/arch-mxc/system.h
+++ b/arch/arm/plat-mxc/include/mach/system.h
diff --git a/arch/arm/plat-mxc/include/mach/timex.h b/arch/arm/plat-mxc/include/mach/timex.h
new file mode 100644
index 000000000000..0b0af0253e91
--- /dev/null
+++ b/arch/arm/plat-mxc/include/mach/timex.h
@@ -0,0 +1,25 @@
1/*
2 * Copyright (C) 1999 ARM Limited
3 * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved.
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */
19
20#ifndef __ASM_ARCH_MXC_TIMEX_H__
21#define __ASM_ARCH_MXC_TIMEX_H__
22
23#include <mach/hardware.h> /* for CLOCK_TICK_RATE */
24
25#endif /* __ASM_ARCH_MXC_TIMEX_H__ */
diff --git a/arch/arm/plat-mxc/include/mach/uncompress.h b/arch/arm/plat-mxc/include/mach/uncompress.h
new file mode 100644
index 000000000000..de6fe0365982
--- /dev/null
+++ b/arch/arm/plat-mxc/include/mach/uncompress.h
@@ -0,0 +1,78 @@
1/*
2 * arch/arm/plat-mxc/include/mach/uncompress.h
3 *
4 *
5 *
6 * Copyright (C) 1999 ARM Limited
7 * Copyright (C) Shane Nay (shane@minirl.com)
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 */
23#ifndef __ASM_ARCH_MXC_UNCOMPRESS_H__
24#define __ASM_ARCH_MXC_UNCOMPRESS_H__
25
26#define __MXC_BOOT_UNCOMPRESS
27
28#include <mach/hardware.h>
29
30#define UART(x) (*(volatile unsigned long *)(serial_port + (x)))
31
32#define USR2 0x98
33#define USR2_TXFE (1<<14)
34#define TXR 0x40
35#define UCR1 0x80
36#define UCR1_UARTEN 1
37
38/*
39 * The following code assumes the serial port has already been
40 * initialized by the bootloader. We search for the first enabled
41 * port in the most probable order. If you didn't setup a port in
42 * your bootloader then nothing will appear (which might be desired).
43 *
44 * This does not append a newline
45 */
46
47static void putc(int ch)
48{
49 static unsigned long serial_port = 0;
50
51 if (unlikely(serial_port == 0)) {
52 do {
53 serial_port = UART1_BASE_ADDR;
54 if (UART(UCR1) & UCR1_UARTEN)
55 break;
56 serial_port = UART2_BASE_ADDR;
57 if (UART(UCR1) & UCR1_UARTEN)
58 break;
59 return;
60 } while (0);
61 }
62
63 while (!(UART(USR2) & USR2_TXFE))
64 barrier();
65
66 UART(TXR) = ch;
67}
68
69#define flush() do { } while (0)
70
71/*
72 * nothing to do
73 */
74#define arch_decomp_setup()
75
76#define arch_decomp_wdog()
77
78#endif /* __ASM_ARCH_MXC_UNCOMPRESS_H__ */
diff --git a/include/asm-arm/arch-mxc/vmalloc.h b/arch/arm/plat-mxc/include/mach/vmalloc.h
index 62d97623412f..62d97623412f 100644
--- a/include/asm-arm/arch-mxc/vmalloc.h
+++ b/arch/arm/plat-mxc/include/mach/vmalloc.h
diff --git a/arch/arm/plat-mxc/iomux-mx1-mx2.c b/arch/arm/plat-mxc/iomux-mx1-mx2.c
index 1985571eb40c..d97387aa9a42 100644
--- a/arch/arm/plat-mxc/iomux-mx1-mx2.c
+++ b/arch/arm/plat-mxc/iomux-mx1-mx2.c
@@ -30,9 +30,9 @@
30#include <linux/string.h> 30#include <linux/string.h>
31#include <linux/gpio.h> 31#include <linux/gpio.h>
32 32
33#include <asm/hardware.h> 33#include <mach/hardware.h>
34#include <asm/mach/map.h> 34#include <asm/mach/map.h>
35#include <asm/arch/iomux-mx1-mx2.h> 35#include <mach/iomux-mx1-mx2.h>
36 36
37void mxc_gpio_mode(int gpio_mode) 37void mxc_gpio_mode(int gpio_mode)
38{ 38{
diff --git a/arch/arm/plat-mxc/irq.c b/arch/arm/plat-mxc/irq.c
index 1fbe01da6925..1053b666c676 100644
--- a/arch/arm/plat-mxc/irq.c
+++ b/arch/arm/plat-mxc/irq.c
@@ -19,7 +19,7 @@
19 19
20#include <linux/irq.h> 20#include <linux/irq.h>
21#include <asm/io.h> 21#include <asm/io.h>
22#include <asm/arch/common.h> 22#include <mach/common.h>
23 23
24#define AVIC_BASE IO_ADDRESS(AVIC_BASE_ADDR) 24#define AVIC_BASE IO_ADDRESS(AVIC_BASE_ADDR)
25#define AVIC_INTCNTL (AVIC_BASE + 0x00) /* int control reg */ 25#define AVIC_INTCNTL (AVIC_BASE + 0x00) /* int control reg */
diff --git a/arch/arm/plat-mxc/time.c b/arch/arm/plat-mxc/time.c
index 3bf86343fdf4..fd28f5194f71 100644
--- a/arch/arm/plat-mxc/time.c
+++ b/arch/arm/plat-mxc/time.c
@@ -26,10 +26,10 @@
26#include <linux/clockchips.h> 26#include <linux/clockchips.h>
27#include <linux/clk.h> 27#include <linux/clk.h>
28 28
29#include <asm/hardware.h> 29#include <mach/hardware.h>
30#include <asm/mach/time.h> 30#include <asm/mach/time.h>
31#include <asm/arch/common.h> 31#include <mach/common.h>
32#include <asm/arch/mxc_timer.h> 32#include <mach/mxc_timer.h>
33 33
34static struct clock_event_device clockevent_mxc; 34static struct clock_event_device clockevent_mxc;
35static enum clock_event_mode clockevent_mode = CLOCK_EVT_MODE_UNUSED; 35static enum clock_event_mode clockevent_mode = CLOCK_EVT_MODE_UNUSED;
diff --git a/arch/arm/plat-omap/clock.c b/arch/arm/plat-omap/clock.c
index c2e741de0203..23a070599993 100644
--- a/arch/arm/plat-omap/clock.c
+++ b/arch/arm/plat-omap/clock.c
@@ -26,7 +26,7 @@
26 26
27#include <asm/io.h> 27#include <asm/io.h>
28 28
29#include <asm/arch/clock.h> 29#include <mach/clock.h>
30 30
31static LIST_HEAD(clocks); 31static LIST_HEAD(clocks);
32static DEFINE_MUTEX(clocks_mutex); 32static DEFINE_MUTEX(clocks_mutex);
diff --git a/arch/arm/plat-omap/common.c b/arch/arm/plat-omap/common.c
index 8d04929a3c75..f4dff423ae7c 100644
--- a/arch/arm/plat-omap/common.c
+++ b/arch/arm/plat-omap/common.c
@@ -19,20 +19,20 @@
19#include <linux/serial_reg.h> 19#include <linux/serial_reg.h>
20#include <linux/clk.h> 20#include <linux/clk.h>
21 21
22#include <asm/hardware.h> 22#include <mach/hardware.h>
23#include <asm/system.h> 23#include <asm/system.h>
24#include <asm/pgtable.h> 24#include <asm/pgtable.h>
25#include <asm/mach/map.h> 25#include <asm/mach/map.h>
26#include <asm/io.h> 26#include <asm/io.h>
27#include <asm/setup.h> 27#include <asm/setup.h>
28 28
29#include <asm/arch/common.h> 29#include <mach/common.h>
30#include <asm/arch/board.h> 30#include <mach/board.h>
31#include <asm/arch/control.h> 31#include <mach/control.h>
32#include <asm/arch/mux.h> 32#include <mach/mux.h>
33#include <asm/arch/fpga.h> 33#include <mach/fpga.h>
34 34
35#include <asm/arch/clock.h> 35#include <mach/clock.h>
36 36
37#if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3) 37#if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3)
38# include "../mach-omap2/sdrc.h" 38# include "../mach-omap2/sdrc.h"
diff --git a/arch/arm/plat-omap/cpu-omap.c b/arch/arm/plat-omap/cpu-omap.c
index d719c15daa55..ae1de308aaad 100644
--- a/arch/arm/plat-omap/cpu-omap.c
+++ b/arch/arm/plat-omap/cpu-omap.c
@@ -21,7 +21,7 @@
21#include <linux/err.h> 21#include <linux/err.h>
22#include <linux/clk.h> 22#include <linux/clk.h>
23 23
24#include <asm/hardware.h> 24#include <mach/hardware.h>
25#include <asm/io.h> 25#include <asm/io.h>
26#include <asm/system.h> 26#include <asm/system.h>
27 27
diff --git a/arch/arm/plat-omap/debug-devices.c b/arch/arm/plat-omap/debug-devices.c
index f455233af082..5b73bb274452 100644
--- a/arch/arm/plat-omap/debug-devices.c
+++ b/arch/arm/plat-omap/debug-devices.c
@@ -13,11 +13,11 @@
13#include <linux/init.h> 13#include <linux/init.h>
14#include <linux/platform_device.h> 14#include <linux/platform_device.h>
15 15
16#include <asm/hardware.h> 16#include <mach/hardware.h>
17#include <asm/io.h> 17#include <asm/io.h>
18 18
19#include <asm/arch/board.h> 19#include <mach/board.h>
20#include <asm/arch/gpio.h> 20#include <mach/gpio.h>
21 21
22 22
23/* Many OMAP development platforms reuse the same "debug board"; these 23/* Many OMAP development platforms reuse the same "debug board"; these
diff --git a/arch/arm/plat-omap/debug-leds.c b/arch/arm/plat-omap/debug-leds.c
index 9128a80d228f..9422dee7de84 100644
--- a/arch/arm/plat-omap/debug-leds.c
+++ b/arch/arm/plat-omap/debug-leds.c
@@ -13,13 +13,13 @@
13#include <linux/leds.h> 13#include <linux/leds.h>
14 14
15#include <asm/io.h> 15#include <asm/io.h>
16#include <asm/hardware.h> 16#include <mach/hardware.h>
17#include <asm/leds.h> 17#include <asm/leds.h>
18#include <asm/system.h> 18#include <asm/system.h>
19#include <asm/mach-types.h> 19#include <asm/mach-types.h>
20 20
21#include <asm/arch/fpga.h> 21#include <mach/fpga.h>
22#include <asm/arch/gpio.h> 22#include <mach/gpio.h>
23 23
24 24
25/* Many OMAP development platforms reuse the same "debug board"; these 25/* Many OMAP development platforms reuse the same "debug board"; these
diff --git a/arch/arm/plat-omap/devices.c b/arch/arm/plat-omap/devices.c
index 81002b722da1..187e3d8bfdfe 100644
--- a/arch/arm/plat-omap/devices.c
+++ b/arch/arm/plat-omap/devices.c
@@ -14,17 +14,17 @@
14#include <linux/init.h> 14#include <linux/init.h>
15#include <linux/platform_device.h> 15#include <linux/platform_device.h>
16 16
17#include <asm/hardware.h> 17#include <mach/hardware.h>
18#include <asm/io.h> 18#include <asm/io.h>
19#include <asm/mach-types.h> 19#include <asm/mach-types.h>
20#include <asm/mach/map.h> 20#include <asm/mach/map.h>
21 21
22#include <asm/arch/tc.h> 22#include <mach/tc.h>
23#include <asm/arch/board.h> 23#include <mach/board.h>
24#include <asm/arch/mux.h> 24#include <mach/mux.h>
25#include <asm/arch/gpio.h> 25#include <mach/gpio.h>
26#include <asm/arch/menelaus.h> 26#include <mach/menelaus.h>
27#include <asm/arch/mcbsp.h> 27#include <mach/mcbsp.h>
28 28
29#if defined(CONFIG_OMAP_DSP) || defined(CONFIG_OMAP_DSP_MODULE) 29#if defined(CONFIG_OMAP_DSP) || defined(CONFIG_OMAP_DSP_MODULE)
30 30
diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c
index fac8e994f588..a63b644ad305 100644
--- a/arch/arm/plat-omap/dma.c
+++ b/arch/arm/plat-omap/dma.c
@@ -28,10 +28,10 @@
28#include <linux/io.h> 28#include <linux/io.h>
29 29
30#include <asm/system.h> 30#include <asm/system.h>
31#include <asm/hardware.h> 31#include <mach/hardware.h>
32#include <asm/dma.h> 32#include <asm/dma.h>
33 33
34#include <asm/arch/tc.h> 34#include <mach/tc.h>
35 35
36#undef DEBUG 36#undef DEBUG
37 37
diff --git a/arch/arm/plat-omap/dmtimer.c b/arch/arm/plat-omap/dmtimer.c
index f22506af0e67..743a4abcd85d 100644
--- a/arch/arm/plat-omap/dmtimer.c
+++ b/arch/arm/plat-omap/dmtimer.c
@@ -32,10 +32,10 @@
32#include <linux/list.h> 32#include <linux/list.h>
33#include <linux/clk.h> 33#include <linux/clk.h>
34#include <linux/delay.h> 34#include <linux/delay.h>
35#include <asm/hardware.h> 35#include <mach/hardware.h>
36#include <asm/arch/dmtimer.h> 36#include <mach/dmtimer.h>
37#include <asm/io.h> 37#include <asm/io.h>
38#include <asm/arch/irqs.h> 38#include <mach/irqs.h>
39 39
40/* register offsets */ 40/* register offsets */
41#define _OMAP_TIMER_ID_OFFSET 0x00 41#define _OMAP_TIMER_ID_OFFSET 0x00
diff --git a/arch/arm/plat-omap/fb.c b/arch/arm/plat-omap/fb.c
index 5d107520e6b9..17a92a31e746 100644
--- a/arch/arm/plat-omap/fb.c
+++ b/arch/arm/plat-omap/fb.c
@@ -28,14 +28,13 @@
28#include <linux/platform_device.h> 28#include <linux/platform_device.h>
29#include <linux/bootmem.h> 29#include <linux/bootmem.h>
30 30
31#include <asm/hardware.h> 31#include <mach/hardware.h>
32#include <asm/io.h> 32#include <asm/io.h>
33#include <asm/mach-types.h>
34#include <asm/mach/map.h> 33#include <asm/mach/map.h>
35 34
36#include <asm/arch/board.h> 35#include <mach/board.h>
37#include <asm/arch/sram.h> 36#include <mach/sram.h>
38#include <asm/arch/omapfb.h> 37#include <mach/omapfb.h>
39 38
40#if defined(CONFIG_FB_OMAP) || defined(CONFIG_FB_OMAP_MODULE) 39#if defined(CONFIG_FB_OMAP) || defined(CONFIG_FB_OMAP_MODULE)
41 40
diff --git a/arch/arm/plat-omap/gpio.c b/arch/arm/plat-omap/gpio.c
index 63e094342ef6..3e76ee2bc731 100644
--- a/arch/arm/plat-omap/gpio.c
+++ b/arch/arm/plat-omap/gpio.c
@@ -18,10 +18,10 @@
18#include <linux/err.h> 18#include <linux/err.h>
19#include <linux/clk.h> 19#include <linux/clk.h>
20 20
21#include <asm/hardware.h> 21#include <mach/hardware.h>
22#include <asm/irq.h> 22#include <asm/irq.h>
23#include <asm/arch/irqs.h> 23#include <mach/irqs.h>
24#include <asm/arch/gpio.h> 24#include <mach/gpio.h>
25#include <asm/mach/irq.h> 25#include <asm/mach/irq.h>
26 26
27#include <asm/io.h> 27#include <asm/io.h>
diff --git a/arch/arm/plat-omap/i2c.c b/arch/arm/plat-omap/i2c.c
index 7990ab185bb1..0e6d147ab6f8 100644
--- a/arch/arm/plat-omap/i2c.c
+++ b/arch/arm/plat-omap/i2c.c
@@ -26,8 +26,7 @@
26#include <linux/kernel.h> 26#include <linux/kernel.h>
27#include <linux/platform_device.h> 27#include <linux/platform_device.h>
28#include <linux/i2c.h> 28#include <linux/i2c.h>
29#include <asm/mach-types.h> 29#include <mach/mux.h>
30#include <asm/arch/mux.h>
31 30
32#define OMAP_I2C_SIZE 0x3f 31#define OMAP_I2C_SIZE 0x3f
33#define OMAP1_I2C_BASE 0xfffb3800 32#define OMAP1_I2C_BASE 0xfffb3800
diff --git a/arch/arm/plat-omap/include/mach/aic23.h b/arch/arm/plat-omap/include/mach/aic23.h
new file mode 100644
index 000000000000..5ccedac77526
--- /dev/null
+++ b/arch/arm/plat-omap/include/mach/aic23.h
@@ -0,0 +1,116 @@
1/*
2 * arch/arm/plat-omap/include/mach/aic23.h
3 *
4 * Hardware definitions for TI TLV320AIC23 audio codec
5 *
6 * Copyright (C) 2002 RidgeRun, Inc.
7 * Author: Steve Johnson
8 *
9 * This program is free software; you can redistribute it and/or modify it
10 * under the terms of the GNU General Public License as published by the
11 * Free Software Foundation; either version 2 of the License, or (at your
12 * option) any later version.
13 *
14 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
15 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
16 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
17 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
18 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
19 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
20 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
21 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 *
25 * You should have received a copy of the GNU General Public License along
26 * with this program; if not, write to the Free Software Foundation, Inc.,
27 * 675 Mass Ave, Cambridge, MA 02139, USA.
28 */
29
30#ifndef __ASM_ARCH_AIC23_H
31#define __ASM_ARCH_AIC23_H
32
33// Codec TLV320AIC23
34#define LEFT_LINE_VOLUME_ADDR 0x00
35#define RIGHT_LINE_VOLUME_ADDR 0x01
36#define LEFT_CHANNEL_VOLUME_ADDR 0x02
37#define RIGHT_CHANNEL_VOLUME_ADDR 0x03
38#define ANALOG_AUDIO_CONTROL_ADDR 0x04
39#define DIGITAL_AUDIO_CONTROL_ADDR 0x05
40#define POWER_DOWN_CONTROL_ADDR 0x06
41#define DIGITAL_AUDIO_FORMAT_ADDR 0x07
42#define SAMPLE_RATE_CONTROL_ADDR 0x08
43#define DIGITAL_INTERFACE_ACT_ADDR 0x09
44#define RESET_CONTROL_ADDR 0x0F
45
46// Left (right) line input volume control register
47#define LRS_ENABLED 0x0100
48#define LIM_MUTED 0x0080
49#define LIV_DEFAULT 0x0017
50#define LIV_MAX 0x001f
51#define LIV_MIN 0x0000
52
53// Left (right) channel headphone volume control register
54#define LZC_ON 0x0080
55#define LHV_DEFAULT 0x0079
56#define LHV_MAX 0x007f
57#define LHV_MIN 0x0000
58
59// Analog audio path control register
60#define STA_REG(x) ((x)<<6)
61#define STE_ENABLED 0x0020
62#define DAC_SELECTED 0x0010
63#define BYPASS_ON 0x0008
64#define INSEL_MIC 0x0004
65#define MICM_MUTED 0x0002
66#define MICB_20DB 0x0001
67
68// Digital audio path control register
69#define DACM_MUTE 0x0008
70#define DEEMP_32K 0x0002
71#define DEEMP_44K 0x0004
72#define DEEMP_48K 0x0006
73#define ADCHP_ON 0x0001
74
75// Power control down register
76#define DEVICE_POWER_OFF 0x0080
77#define CLK_OFF 0x0040
78#define OSC_OFF 0x0020
79#define OUT_OFF 0x0010
80#define DAC_OFF 0x0008
81#define ADC_OFF 0x0004
82#define MIC_OFF 0x0002
83#define LINE_OFF 0x0001
84
85// Digital audio interface register
86#define MS_MASTER 0x0040
87#define LRSWAP_ON 0x0020
88#define LRP_ON 0x0010
89#define IWL_16 0x0000
90#define IWL_20 0x0004
91#define IWL_24 0x0008
92#define IWL_32 0x000C
93#define FOR_I2S 0x0002
94#define FOR_DSP 0x0003
95
96// Sample rate control register
97#define CLKOUT_HALF 0x0080
98#define CLKIN_HALF 0x0040
99#define BOSR_384fs 0x0002 // BOSR_272fs when in USB mode
100#define USB_CLK_ON 0x0001
101#define SR_MASK 0xf
102#define CLKOUT_SHIFT 7
103#define CLKIN_SHIFT 6
104#define SR_SHIFT 2
105#define BOSR_SHIFT 1
106
107// Digital interface register
108#define ACT_ON 0x0001
109
110#define TLV320AIC23ID1 (0x1a) // cs low
111#define TLV320AIC23ID2 (0x1b) // cs high
112
113void aic23_power_up(void);
114void aic23_power_down(void);
115
116#endif /* __ASM_ARCH_AIC23_H */
diff --git a/include/asm-arm/arch-omap/blizzard.h b/arch/arm/plat-omap/include/mach/blizzard.h
index 8d160f171372..8d160f171372 100644
--- a/include/asm-arm/arch-omap/blizzard.h
+++ b/arch/arm/plat-omap/include/mach/blizzard.h
diff --git a/arch/arm/plat-omap/include/mach/board-2430sdp.h b/arch/arm/plat-omap/include/mach/board-2430sdp.h
new file mode 100644
index 000000000000..cf1dc0223949
--- /dev/null
+++ b/arch/arm/plat-omap/include/mach/board-2430sdp.h
@@ -0,0 +1,39 @@
1/*
2 * arch/arm/plat-omap/include/mach/board-2430sdp.h
3 *
4 * Hardware definitions for TI OMAP2430 SDP board.
5 *
6 * Based on board-h4.h by Dirk Behme <dirk.behme@de.bosch.com>
7 *
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License as published by the
10 * Free Software Foundation; either version 2 of the License, or (at your
11 * option) any later version.
12 *
13 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
14 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
15 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
16 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
17 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
18 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
19 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
20 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23 *
24 * You should have received a copy of the GNU General Public License along
25 * with this program; if not, write to the Free Software Foundation, Inc.,
26 * 675 Mass Ave, Cambridge, MA 02139, USA.
27 */
28
29#ifndef __ASM_ARCH_OMAP_2430SDP_H
30#define __ASM_ARCH_OMAP_2430SDP_H
31
32/* Placeholder for 2430SDP specific defines */
33#define OMAP24XX_ETHR_START 0x08000300
34#define OMAP24XX_ETHR_GPIO_IRQ 149
35#define SDP2430_CS0_BASE 0x04000000
36
37#define TWL4030_IRQNUM INT_24XX_SYS_NIRQ
38
39#endif /* __ASM_ARCH_OMAP_2430SDP_H */
diff --git a/arch/arm/plat-omap/include/mach/board-ams-delta.h b/arch/arm/plat-omap/include/mach/board-ams-delta.h
new file mode 100644
index 000000000000..51b102dc906b
--- /dev/null
+++ b/arch/arm/plat-omap/include/mach/board-ams-delta.h
@@ -0,0 +1,76 @@
1/*
2 * arch/arm/plat-omap/include/mach/board-ams-delta.h
3 *
4 * Copyright (C) 2006 Jonathan McDowell <noodles@earth.li>
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2 of the License, or (at your
9 * option) any later version.
10 *
11 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
12 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
13 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
14 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
15 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
16 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
17 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
18 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
19 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
20 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
21 *
22 * You should have received a copy of the GNU General Public License along
23 * with this program; if not, write to the Free Software Foundation, Inc.,
24 * 675 Mass Ave, Cambridge, MA 02139, USA.
25 */
26#ifndef __ASM_ARCH_OMAP_AMS_DELTA_H
27#define __ASM_ARCH_OMAP_AMS_DELTA_H
28
29#if defined (CONFIG_MACH_AMS_DELTA)
30
31#define AMS_DELTA_LATCH1_PHYS 0x01000000
32#define AMS_DELTA_LATCH1_VIRT 0xEA000000
33#define AMS_DELTA_MODEM_PHYS 0x04000000
34#define AMS_DELTA_MODEM_VIRT 0xEB000000
35#define AMS_DELTA_LATCH2_PHYS 0x08000000
36#define AMS_DELTA_LATCH2_VIRT 0xEC000000
37
38#define AMS_DELTA_LATCH1_LED_CAMERA 0x01
39#define AMS_DELTA_LATCH1_LED_ADVERT 0x02
40#define AMS_DELTA_LATCH1_LED_EMAIL 0x04
41#define AMS_DELTA_LATCH1_LED_HANDSFREE 0x08
42#define AMS_DELTA_LATCH1_LED_VOICEMAIL 0x10
43#define AMS_DELTA_LATCH1_LED_VOICE 0x20
44
45#define AMS_DELTA_LATCH2_LCD_VBLEN 0x0001
46#define AMS_DELTA_LATCH2_LCD_NDISP 0x0002
47#define AMS_DELTA_LATCH2_NAND_NCE 0x0004
48#define AMS_DELTA_LATCH2_NAND_NRE 0x0008
49#define AMS_DELTA_LATCH2_NAND_NWP 0x0010
50#define AMS_DELTA_LATCH2_NAND_NWE 0x0020
51#define AMS_DELTA_LATCH2_NAND_ALE 0x0040
52#define AMS_DELTA_LATCH2_NAND_CLE 0x0080
53#define AMD_DELTA_LATCH2_KEYBRD_PWR 0x0100
54#define AMD_DELTA_LATCH2_KEYBRD_DATA 0x0200
55#define AMD_DELTA_LATCH2_SCARD_RSTIN 0x0400
56#define AMD_DELTA_LATCH2_SCARD_CMDVCC 0x0800
57#define AMS_DELTA_LATCH2_MODEM_NRESET 0x1000
58#define AMS_DELTA_LATCH2_MODEM_CODEC 0x2000
59
60#define AMS_DELTA_GPIO_PIN_KEYBRD_DATA 0
61#define AMS_DELTA_GPIO_PIN_KEYBRD_CLK 1
62#define AMS_DELTA_GPIO_PIN_MODEM_IRQ 2
63#define AMS_DELTA_GPIO_PIN_HOOK_SWITCH 4
64#define AMS_DELTA_GPIO_PIN_SCARD_NOFF 6
65#define AMS_DELTA_GPIO_PIN_SCARD_IO 7
66#define AMS_DELTA_GPIO_PIN_CONFIG 11
67#define AMS_DELTA_GPIO_PIN_NAND_RB 12
68
69#ifndef __ASSEMBLY__
70void ams_delta_latch1_write(u8 mask, u8 value);
71void ams_delta_latch2_write(u16 mask, u16 value);
72#endif
73
74#endif /* CONFIG_MACH_AMS_DELTA */
75
76#endif /* __ASM_ARCH_OMAP_AMS_DELTA_H */
diff --git a/arch/arm/plat-omap/include/mach/board-apollon.h b/arch/arm/plat-omap/include/mach/board-apollon.h
new file mode 100644
index 000000000000..d6f2a8e963d5
--- /dev/null
+++ b/arch/arm/plat-omap/include/mach/board-apollon.h
@@ -0,0 +1,38 @@
1/*
2 * arch/arm/plat-omap/include/mach/board-apollon.h
3 *
4 * Hardware definitions for Samsung OMAP24XX Apollon board.
5 *
6 * Initial creation by Kyungmin Park <kyungmin.park@samsung.com>
7 *
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License as published by the
10 * Free Software Foundation; either version 2 of the License, or (at your
11 * option) any later version.
12 *
13 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
14 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
15 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
16 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
17 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
18 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
19 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
20 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23 *
24 * You should have received a copy of the GNU General Public License along
25 * with this program; if not, write to the Free Software Foundation, Inc.,
26 * 675 Mass Ave, Cambridge, MA 02139, USA.
27 */
28
29#ifndef __ASM_ARCH_OMAP_APOLLON_H
30#define __ASM_ARCH_OMAP_APOLLON_H
31
32extern void apollon_mmc_init(void);
33
34/* Placeholder for APOLLON specific defines */
35#define APOLLON_ETHR_GPIO_IRQ 74
36
37#endif /* __ASM_ARCH_OMAP_APOLLON_H */
38
diff --git a/arch/arm/plat-omap/include/mach/board-fsample.h b/arch/arm/plat-omap/include/mach/board-fsample.h
new file mode 100644
index 000000000000..cb3c5ae12776
--- /dev/null
+++ b/arch/arm/plat-omap/include/mach/board-fsample.h
@@ -0,0 +1,51 @@
1/*
2 * arch/arm/plat-omap/include/mach/board-fsample.h
3 *
4 * Board-specific goodies for TI F-Sample.
5 *
6 * Copyright (C) 2006 Google, Inc.
7 * Author: Brian Swetland <swetland@google.com>
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12 */
13
14#ifndef __ASM_ARCH_OMAP_FSAMPLE_H
15#define __ASM_ARCH_OMAP_FSAMPLE_H
16
17/* fsample is pretty close to p2-sample */
18#include <mach/board-perseus2.h>
19
20#define fsample_cpld_read(reg) __raw_readb(reg)
21#define fsample_cpld_write(val, reg) __raw_writeb(val, reg)
22
23#define FSAMPLE_CPLD_BASE 0xE8100000
24#define FSAMPLE_CPLD_SIZE SZ_4K
25#define FSAMPLE_CPLD_START 0x05080000
26
27#define FSAMPLE_CPLD_REG_A (FSAMPLE_CPLD_BASE + 0x00)
28#define FSAMPLE_CPLD_SWITCH (FSAMPLE_CPLD_BASE + 0x02)
29#define FSAMPLE_CPLD_UART (FSAMPLE_CPLD_BASE + 0x02)
30#define FSAMPLE_CPLD_REG_B (FSAMPLE_CPLD_BASE + 0x04)
31#define FSAMPLE_CPLD_VERSION (FSAMPLE_CPLD_BASE + 0x06)
32#define FSAMPLE_CPLD_SET_CLR (FSAMPLE_CPLD_BASE + 0x06)
33
34#define FSAMPLE_CPLD_BIT_BT_RESET 0
35#define FSAMPLE_CPLD_BIT_LCD_RESET 1
36#define FSAMPLE_CPLD_BIT_CAM_PWDN 2
37#define FSAMPLE_CPLD_BIT_CHARGER_ENABLE 3
38#define FSAMPLE_CPLD_BIT_SD_MMC_EN 4
39#define FSAMPLE_CPLD_BIT_aGPS_PWREN 5
40#define FSAMPLE_CPLD_BIT_BACKLIGHT 6
41#define FSAMPLE_CPLD_BIT_aGPS_EN_RESET 7
42#define FSAMPLE_CPLD_BIT_aGPS_SLEEPx_N 8
43#define FSAMPLE_CPLD_BIT_OTG_RESET 9
44
45#define fsample_cpld_set(bit) \
46 fsample_cpld_write((((bit) & 15) << 4) | 0x0f, FSAMPLE_CPLD_SET_CLR)
47
48#define fsample_cpld_clear(bit) \
49 fsample_cpld_write(0xf0 | ((bit) & 15), FSAMPLE_CPLD_SET_CLR)
50
51#endif
diff --git a/arch/arm/plat-omap/include/mach/board-h2.h b/arch/arm/plat-omap/include/mach/board-h2.h
new file mode 100644
index 000000000000..2a050e9be65f
--- /dev/null
+++ b/arch/arm/plat-omap/include/mach/board-h2.h
@@ -0,0 +1,41 @@
1/*
2 * arch/arm/plat-omap/include/mach/board-h2.h
3 *
4 * Hardware definitions for TI OMAP1610 H2 board.
5 *
6 * Cleanup for Linux-2.6 by Dirk Behme <dirk.behme@de.bosch.com>
7 *
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License as published by the
10 * Free Software Foundation; either version 2 of the License, or (at your
11 * option) any later version.
12 *
13 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
14 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
15 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
16 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
17 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
18 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
19 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
20 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23 *
24 * You should have received a copy of the GNU General Public License along
25 * with this program; if not, write to the Free Software Foundation, Inc.,
26 * 675 Mass Ave, Cambridge, MA 02139, USA.
27 */
28
29#ifndef __ASM_ARCH_OMAP_H2_H
30#define __ASM_ARCH_OMAP_H2_H
31
32/* Placeholder for H2 specific defines */
33
34/* At OMAP1610 Innovator the Ethernet is directly connected to CS1 */
35#define OMAP1610_ETHR_START 0x04000300
36
37extern void h2_mmc_init(void);
38extern void h2_mmc_slot_cover_handler(void *arg, int state);
39
40#endif /* __ASM_ARCH_OMAP_H2_H */
41
diff --git a/arch/arm/plat-omap/include/mach/board-h3.h b/arch/arm/plat-omap/include/mach/board-h3.h
new file mode 100644
index 000000000000..14909dc7858a
--- /dev/null
+++ b/arch/arm/plat-omap/include/mach/board-h3.h
@@ -0,0 +1,36 @@
1/*
2 * arch/arm/plat-omap/include/mach/board-h3.h
3 *
4 * Copyright (C) 2001 RidgeRun, Inc.
5 * Copyright (C) 2004 Texas Instruments, Inc.
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; either version 2 of the License, or (at your
10 * option) any later version.
11 *
12 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
13 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
14 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
15 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
16 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
17 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
18 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
19 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
20 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
21 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
22 *
23 * You should have received a copy of the GNU General Public License along
24 * with this program; if not, write to the Free Software Foundation, Inc.,
25 * 675 Mass Ave, Cambridge, MA 02139, USA.
26 */
27#ifndef __ASM_ARCH_OMAP_H3_H
28#define __ASM_ARCH_OMAP_H3_H
29
30/* In OMAP1710 H3 the Ethernet is directly connected to CS1 */
31#define OMAP1710_ETHR_START 0x04000300
32
33extern void h3_mmc_init(void);
34extern void h3_mmc_slot_cover_handler(void *arg, int state);
35
36#endif /* __ASM_ARCH_OMAP_H3_H */
diff --git a/arch/arm/plat-omap/include/mach/board-h4.h b/arch/arm/plat-omap/include/mach/board-h4.h
new file mode 100644
index 000000000000..1470cd3e519b
--- /dev/null
+++ b/arch/arm/plat-omap/include/mach/board-h4.h
@@ -0,0 +1,35 @@
1/*
2 * arch/arm/plat-omap/include/mach/board-h4.h
3 *
4 * Hardware definitions for TI OMAP1610 H4 board.
5 *
6 * Initial creation by Dirk Behme <dirk.behme@de.bosch.com>
7 *
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License as published by the
10 * Free Software Foundation; either version 2 of the License, or (at your
11 * option) any later version.
12 *
13 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
14 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
15 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
16 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
17 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
18 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
19 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
20 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23 *
24 * You should have received a copy of the GNU General Public License along
25 * with this program; if not, write to the Free Software Foundation, Inc.,
26 * 675 Mass Ave, Cambridge, MA 02139, USA.
27 */
28
29#ifndef __ASM_ARCH_OMAP_H4_H
30#define __ASM_ARCH_OMAP_H4_H
31
32/* Placeholder for H4 specific defines */
33#define OMAP24XX_ETHR_GPIO_IRQ 92
34#endif /* __ASM_ARCH_OMAP_H4_H */
35
diff --git a/arch/arm/plat-omap/include/mach/board-innovator.h b/arch/arm/plat-omap/include/mach/board-innovator.h
new file mode 100644
index 000000000000..5ae3e79b9f9c
--- /dev/null
+++ b/arch/arm/plat-omap/include/mach/board-innovator.h
@@ -0,0 +1,52 @@
1/*
2 * arch/arm/plat-omap/include/mach/board-innovator.h
3 *
4 * Copyright (C) 2001 RidgeRun, Inc.
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2 of the License, or (at your
9 * option) any later version.
10 *
11 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
12 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
13 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
14 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
15 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
16 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
17 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
18 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
19 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
20 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
21 *
22 * You should have received a copy of the GNU General Public License along
23 * with this program; if not, write to the Free Software Foundation, Inc.,
24 * 675 Mass Ave, Cambridge, MA 02139, USA.
25 */
26#ifndef __ASM_ARCH_OMAP_INNOVATOR_H
27#define __ASM_ARCH_OMAP_INNOVATOR_H
28
29#if defined (CONFIG_ARCH_OMAP15XX)
30
31#ifndef OMAP_SDRAM_DEVICE
32#define OMAP_SDRAM_DEVICE D256M_1X16_4B
33#endif
34
35#define OMAP1510P1_IMIF_PRI_VALUE 0x00
36#define OMAP1510P1_EMIFS_PRI_VALUE 0x00
37#define OMAP1510P1_EMIFF_PRI_VALUE 0x00
38
39#ifndef __ASSEMBLY__
40void fpga_write(unsigned char val, int reg);
41unsigned char fpga_read(int reg);
42#endif
43
44#endif /* CONFIG_ARCH_OMAP15XX */
45
46#if defined (CONFIG_ARCH_OMAP16XX)
47
48/* At OMAP1610 Innovator the Ethernet is directly connected to CS1 */
49#define INNOVATOR1610_ETHR_START 0x04000300
50
51#endif /* CONFIG_ARCH_OMAP1610 */
52#endif /* __ASM_ARCH_OMAP_INNOVATOR_H */
diff --git a/arch/arm/plat-omap/include/mach/board-nokia.h b/arch/arm/plat-omap/include/mach/board-nokia.h
new file mode 100644
index 000000000000..2abbe001af8c
--- /dev/null
+++ b/arch/arm/plat-omap/include/mach/board-nokia.h
@@ -0,0 +1,54 @@
1/*
2 * arch/arm/plat-omap/include/mach/board-nokia.h
3 *
4 * Information structures for Nokia-specific board config data
5 *
6 * Copyright (C) 2005 Nokia Corporation
7 */
8
9#ifndef _OMAP_BOARD_NOKIA_H
10#define _OMAP_BOARD_NOKIA_H
11
12#include <linux/types.h>
13
14#define OMAP_TAG_NOKIA_BT 0x4e01
15#define OMAP_TAG_WLAN_CX3110X 0x4e02
16#define OMAP_TAG_CBUS 0x4e03
17#define OMAP_TAG_EM_ASIC_BB5 0x4e04
18
19
20#define BT_CHIP_CSR 1
21#define BT_CHIP_TI 2
22
23#define BT_SYSCLK_12 1
24#define BT_SYSCLK_38_4 2
25
26struct omap_bluetooth_config {
27 u8 chip_type;
28 u8 bt_wakeup_gpio;
29 u8 host_wakeup_gpio;
30 u8 reset_gpio;
31 u8 bt_uart;
32 u8 bd_addr[6];
33 u8 bt_sysclk;
34};
35
36struct omap_wlan_cx3110x_config {
37 u8 chip_type;
38 s16 power_gpio;
39 s16 irq_gpio;
40 s16 spi_cs_gpio;
41};
42
43struct omap_cbus_config {
44 s16 clk_gpio;
45 s16 dat_gpio;
46 s16 sel_gpio;
47};
48
49struct omap_em_asic_bb5_config {
50 s16 retu_irq_gpio;
51 s16 tahvo_irq_gpio;
52};
53
54#endif
diff --git a/arch/arm/plat-omap/include/mach/board-osk.h b/arch/arm/plat-omap/include/mach/board-osk.h
new file mode 100644
index 000000000000..3850cb1f220a
--- /dev/null
+++ b/arch/arm/plat-omap/include/mach/board-osk.h
@@ -0,0 +1,47 @@
1/*
2 * arch/arm/plat-omap/include/mach/board-osk.h
3 *
4 * Hardware definitions for TI OMAP5912 OSK board.
5 *
6 * Written by Dirk Behme <dirk.behme@de.bosch.com>
7 *
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License as published by the
10 * Free Software Foundation; either version 2 of the License, or (at your
11 * option) any later version.
12 *
13 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
14 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
15 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
16 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
17 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
18 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
19 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
20 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23 *
24 * You should have received a copy of the GNU General Public License along
25 * with this program; if not, write to the Free Software Foundation, Inc.,
26 * 675 Mass Ave, Cambridge, MA 02139, USA.
27 */
28
29#ifndef __ASM_ARCH_OMAP_OSK_H
30#define __ASM_ARCH_OMAP_OSK_H
31
32/* At OMAP5912 OSK the Ethernet is directly connected to CS1 */
33#define OMAP_OSK_ETHR_START 0x04800300
34
35/* TPS65010 has four GPIOs. nPG and LED2 can be treated like GPIOs with
36 * alternate pin configurations for hardware-controlled blinking.
37 */
38#define OSK_TPS_GPIO_BASE (OMAP_MAX_GPIO_LINES + 16 /* MPUIO */)
39# define OSK_TPS_GPIO_USB_PWR_EN (OSK_TPS_GPIO_BASE + 0)
40# define OSK_TPS_GPIO_LED_D3 (OSK_TPS_GPIO_BASE + 1)
41# define OSK_TPS_GPIO_LAN_RESET (OSK_TPS_GPIO_BASE + 2)
42# define OSK_TPS_GPIO_DSP_PWR_EN (OSK_TPS_GPIO_BASE + 3)
43# define OSK_TPS_GPIO_LED_D9 (OSK_TPS_GPIO_BASE + 4)
44# define OSK_TPS_GPIO_LED_D2 (OSK_TPS_GPIO_BASE + 5)
45
46#endif /* __ASM_ARCH_OMAP_OSK_H */
47
diff --git a/arch/arm/plat-omap/include/mach/board-palmte.h b/arch/arm/plat-omap/include/mach/board-palmte.h
new file mode 100644
index 000000000000..6906cdebbcfb
--- /dev/null
+++ b/arch/arm/plat-omap/include/mach/board-palmte.h
@@ -0,0 +1,32 @@
1/*
2 * arch/arm/plat-omap/include/mach/board-palmte.h
3 *
4 * Hardware definitions for the Palm Tungsten E device.
5 *
6 * Maintainters : http://palmtelinux.sf.net
7 * palmtelinux-developpers@lists.sf.net
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12 */
13
14#ifndef __OMAP_BOARD_PALMTE_H
15#define __OMAP_BOARD_PALMTE_H
16
17#define PALMTE_USBDETECT_GPIO 0
18#define PALMTE_USB_OR_DC_GPIO 1
19#define PALMTE_TSC_GPIO 4
20#define PALMTE_PINTDAV_GPIO 6
21#define PALMTE_MMC_WP_GPIO 8
22#define PALMTE_MMC_POWER_GPIO 9
23#define PALMTE_HDQ_GPIO 11
24#define PALMTE_HEADPHONES_GPIO 14
25#define PALMTE_SPEAKER_GPIO 15
26#define PALMTE_DC_GPIO OMAP_MPUIO(2)
27#define PALMTE_MMC_SWITCH_GPIO OMAP_MPUIO(4)
28#define PALMTE_MMC1_GPIO OMAP_MPUIO(6)
29#define PALMTE_MMC2_GPIO OMAP_MPUIO(7)
30#define PALMTE_MMC3_GPIO OMAP_MPUIO(11)
31
32#endif /* __OMAP_BOARD_PALMTE_H */
diff --git a/arch/arm/plat-omap/include/mach/board-palmtt.h b/arch/arm/plat-omap/include/mach/board-palmtt.h
new file mode 100644
index 000000000000..e79f382b5931
--- /dev/null
+++ b/arch/arm/plat-omap/include/mach/board-palmtt.h
@@ -0,0 +1,23 @@
1/*
2 * arch/arm/plat-omap/include/mach/board-palmte.h
3 *
4 * Hardware definitions for the Palm Tungsten|T device.
5 *
6 * Maintainters : Marek Vasut <marek.vasut@gmail.com>
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 */
12
13#ifndef __OMAP_BOARD_PALMTT_H
14#define __OMAP_BOARD_PALMTT_H
15
16#define PALMTT_USBDETECT_GPIO 0
17#define PALMTT_CABLE_GPIO 1
18#define PALMTT_LED_GPIO 3
19#define PALMTT_PENIRQ_GPIO 6
20#define PALMTT_MMC_WP_GPIO 8
21#define PALMTT_HDQ_GPIO 11
22
23#endif /* __OMAP_BOARD_PALMTT_H */
diff --git a/arch/arm/plat-omap/include/mach/board-palmz71.h b/arch/arm/plat-omap/include/mach/board-palmz71.h
new file mode 100644
index 000000000000..b1d7d579b313
--- /dev/null
+++ b/arch/arm/plat-omap/include/mach/board-palmz71.h
@@ -0,0 +1,26 @@
1/*
2 * arch/arm/plat-omap/include/mach/board-palmz71.h
3 *
4 * Hardware definitions for the Palm Zire71 device.
5 *
6 * Maintainters : Marek Vasut <marek.vasut@gmail.com>
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 */
12
13#ifndef __OMAP_BOARD_PALMZ71_H
14#define __OMAP_BOARD_PALMZ71_H
15
16#define PALMZ71_USBDETECT_GPIO 0
17#define PALMZ71_PENIRQ_GPIO 6
18#define PALMZ71_MMC_WP_GPIO 8
19#define PALMZ71_HDQ_GPIO 11
20
21#define PALMZ71_HOTSYNC_GPIO OMAP_MPUIO(1)
22#define PALMZ71_CABLE_GPIO OMAP_MPUIO(2)
23#define PALMZ71_SLIDER_GPIO OMAP_MPUIO(3)
24#define PALMZ71_MMC_IN_GPIO OMAP_MPUIO(4)
25
26#endif /* __OMAP_BOARD_PALMZ71_H */
diff --git a/arch/arm/plat-omap/include/mach/board-perseus2.h b/arch/arm/plat-omap/include/mach/board-perseus2.h
new file mode 100644
index 000000000000..c06c3d717d57
--- /dev/null
+++ b/arch/arm/plat-omap/include/mach/board-perseus2.h
@@ -0,0 +1,39 @@
1/*
2 * arch/arm/plat-omap/include/mach/board-perseus2.h
3 *
4 * Copyright 2003 by Texas Instruments Incorporated
5 * OMAP730 / Perseus2 support by Jean Pihet
6 *
7 * Copyright (C) 2001 RidgeRun, Inc. (http://www.ridgerun.com)
8 * Author: RidgeRun, Inc.
9 *
10 * This program is free software; you can redistribute it and/or modify it
11 * under the terms of the GNU General Public License as published by the
12 * Free Software Foundation; either version 2 of the License, or (at your
13 * option) any later version.
14 *
15 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
16 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
17 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
18 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
21 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
22 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 *
26 * You should have received a copy of the GNU General Public License along
27 * with this program; if not, write to the Free Software Foundation, Inc.,
28 * 675 Mass Ave, Cambridge, MA 02139, USA.
29 */
30#ifndef __ASM_ARCH_OMAP_PERSEUS2_H
31#define __ASM_ARCH_OMAP_PERSEUS2_H
32
33#include <mach/fpga.h>
34
35#ifndef OMAP_SDRAM_DEVICE
36#define OMAP_SDRAM_DEVICE D256M_1X16_4B
37#endif
38
39#endif
diff --git a/include/asm-arm/arch-omap/board-sx1.h b/arch/arm/plat-omap/include/mach/board-sx1.h
index 355adbdaae33..355adbdaae33 100644
--- a/include/asm-arm/arch-omap/board-sx1.h
+++ b/arch/arm/plat-omap/include/mach/board-sx1.h
diff --git a/include/asm-arm/arch-omap/board-voiceblue.h b/arch/arm/plat-omap/include/mach/board-voiceblue.h
index ed6d346ee123..ed6d346ee123 100644
--- a/include/asm-arm/arch-omap/board-voiceblue.h
+++ b/arch/arm/plat-omap/include/mach/board-voiceblue.h
diff --git a/arch/arm/plat-omap/include/mach/board.h b/arch/arm/plat-omap/include/mach/board.h
new file mode 100644
index 000000000000..54445642f35d
--- /dev/null
+++ b/arch/arm/plat-omap/include/mach/board.h
@@ -0,0 +1,186 @@
1/*
2 * arch/arm/plat-omap/include/mach/board.h
3 *
4 * Information structures for board-specific data
5 *
6 * Copyright (C) 2004 Nokia Corporation
7 * Written by Juha Yrjölä <juha.yrjola@nokia.com>
8 */
9
10#ifndef _OMAP_BOARD_H
11#define _OMAP_BOARD_H
12
13#include <linux/types.h>
14
15#include <mach/gpio-switch.h>
16
17/* Different peripheral ids */
18#define OMAP_TAG_CLOCK 0x4f01
19#define OMAP_TAG_MMC 0x4f02
20#define OMAP_TAG_SERIAL_CONSOLE 0x4f03
21#define OMAP_TAG_USB 0x4f04
22#define OMAP_TAG_LCD 0x4f05
23#define OMAP_TAG_GPIO_SWITCH 0x4f06
24#define OMAP_TAG_UART 0x4f07
25#define OMAP_TAG_FBMEM 0x4f08
26#define OMAP_TAG_STI_CONSOLE 0x4f09
27#define OMAP_TAG_CAMERA_SENSOR 0x4f0a
28
29#define OMAP_TAG_BOOT_REASON 0x4f80
30#define OMAP_TAG_FLASH_PART 0x4f81
31#define OMAP_TAG_VERSION_STR 0x4f82
32
33struct omap_clock_config {
34 /* 0 for 12 MHz, 1 for 13 MHz and 2 for 19.2 MHz */
35 u8 system_clock_type;
36};
37
38struct omap_mmc_conf {
39 unsigned enabled:1;
40 /* nomux means "standard" muxing is wrong on this board, and that
41 * board-specific code handled it before common init logic.
42 */
43 unsigned nomux:1;
44 /* switch pin can be for card detect (default) or card cover */
45 unsigned cover:1;
46 /* 4 wire signaling is optional, and is only used for SD/SDIO */
47 unsigned wire4:1;
48 s16 power_pin;
49 s16 switch_pin;
50 s16 wp_pin;
51};
52
53struct omap_mmc_config {
54 struct omap_mmc_conf mmc[2];
55};
56
57struct omap_serial_console_config {
58 u8 console_uart;
59 u32 console_speed;
60};
61
62struct omap_sti_console_config {
63 unsigned enable:1;
64 u8 channel;
65};
66
67struct omap_camera_sensor_config {
68 u16 reset_gpio;
69 int (*power_on)(void * data);
70 int (*power_off)(void * data);
71};
72
73struct omap_usb_config {
74 /* Configure drivers according to the connectors on your board:
75 * - "A" connector (rectagular)
76 * ... for host/OHCI use, set "register_host".
77 * - "B" connector (squarish) or "Mini-B"
78 * ... for device/gadget use, set "register_dev".
79 * - "Mini-AB" connector (very similar to Mini-B)
80 * ... for OTG use as device OR host, initialize "otg"
81 */
82 unsigned register_host:1;
83 unsigned register_dev:1;
84 u8 otg; /* port number, 1-based: usb1 == 2 */
85
86 u8 hmc_mode;
87
88 /* implicitly true if otg: host supports remote wakeup? */
89 u8 rwc;
90
91 /* signaling pins used to talk to transceiver on usbN:
92 * 0 == usbN unused
93 * 2 == usb0-only, using internal transceiver
94 * 3 == 3 wire bidirectional
95 * 4 == 4 wire bidirectional
96 * 6 == 6 wire unidirectional (or TLL)
97 */
98 u8 pins[3];
99};
100
101struct omap_lcd_config {
102 char panel_name[16];
103 char ctrl_name[16];
104 s16 nreset_gpio;
105 u8 data_lines;
106};
107
108struct device;
109struct fb_info;
110struct omap_backlight_config {
111 int default_intensity;
112 int (*set_power)(struct device *dev, int state);
113 int (*check_fb)(struct fb_info *fb);
114};
115
116struct omap_fbmem_config {
117 u32 start;
118 u32 size;
119};
120
121struct omap_pwm_led_platform_data {
122 const char *name;
123 int intensity_timer;
124 int blink_timer;
125 void (*set_power)(struct omap_pwm_led_platform_data *self, int on_off);
126};
127
128/* See arch/arm/plat-omap/include/mach/gpio-switch.h for definitions */
129struct omap_gpio_switch_config {
130 char name[12];
131 u16 gpio;
132 int flags:4;
133 int type:4;
134 int key_code:24; /* Linux key code */
135};
136
137struct omap_uart_config {
138 /* Bit field of UARTs present; bit 0 --> UART1 */
139 unsigned int enabled_uarts;
140};
141
142
143struct omap_flash_part_config {
144 char part_table[0];
145};
146
147struct omap_boot_reason_config {
148 char reason_str[12];
149};
150
151struct omap_version_config {
152 char component[12];
153 char version[12];
154};
155
156
157#include <mach/board-nokia.h>
158
159struct omap_board_config_entry {
160 u16 tag;
161 u16 len;
162 u8 data[0];
163};
164
165struct omap_board_config_kernel {
166 u16 tag;
167 const void *data;
168};
169
170extern const void *__omap_get_config(u16 tag, size_t len, int nr);
171
172#define omap_get_config(tag, type) \
173 ((const type *) __omap_get_config((tag), sizeof(type), 0))
174#define omap_get_nr_config(tag, type, nr) \
175 ((const type *) __omap_get_config((tag), sizeof(type), (nr)))
176
177extern const void *omap_get_var_config(u16 tag, size_t *len);
178
179extern struct omap_board_config_kernel *omap_board_config;
180extern int omap_board_config_size;
181
182
183/* for TI reference platforms sharing the same debug card */
184extern int debug_card_init(u32 addr, unsigned gpio);
185
186#endif
diff --git a/arch/arm/plat-omap/include/mach/clock.h b/arch/arm/plat-omap/include/mach/clock.h
new file mode 100644
index 000000000000..92f7c7238fcd
--- /dev/null
+++ b/arch/arm/plat-omap/include/mach/clock.h
@@ -0,0 +1,162 @@
1/*
2 * arch/arm/plat-omap/include/mach/clock.h
3 *
4 * Copyright (C) 2004 - 2005 Nokia corporation
5 * Written by Tuukka Tikkanen <tuukka.tikkanen@elektrobit.com>
6 * Based on clocks.h by Tony Lindgren, Gordon McNutt and RidgeRun, Inc
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 */
12
13#ifndef __ARCH_ARM_OMAP_CLOCK_H
14#define __ARCH_ARM_OMAP_CLOCK_H
15
16struct module;
17struct clk;
18
19#if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3)
20
21struct clksel_rate {
22 u8 div;
23 u32 val;
24 u8 flags;
25};
26
27struct clksel {
28 struct clk *parent;
29 const struct clksel_rate *rates;
30};
31
32struct dpll_data {
33 void __iomem *mult_div1_reg;
34 u32 mult_mask;
35 u32 div1_mask;
36 u16 last_rounded_m;
37 u8 last_rounded_n;
38 unsigned long last_rounded_rate;
39 unsigned int rate_tolerance;
40 u16 max_multiplier;
41 u8 max_divider;
42 u32 max_tolerance;
43# if defined(CONFIG_ARCH_OMAP3)
44 u8 modes;
45 void __iomem *control_reg;
46 u32 enable_mask;
47 u8 auto_recal_bit;
48 u8 recal_en_bit;
49 u8 recal_st_bit;
50 void __iomem *autoidle_reg;
51 u32 autoidle_mask;
52 void __iomem *idlest_reg;
53 u8 idlest_bit;
54# endif
55};
56
57#endif
58
59struct clk {
60 struct list_head node;
61 struct module *owner;
62 const char *name;
63 int id;
64 struct clk *parent;
65 unsigned long rate;
66 __u32 flags;
67 void __iomem *enable_reg;
68 __u8 enable_bit;
69 __s8 usecount;
70 void (*recalc)(struct clk *);
71 int (*set_rate)(struct clk *, unsigned long);
72 long (*round_rate)(struct clk *, unsigned long);
73 void (*init)(struct clk *);
74 int (*enable)(struct clk *);
75 void (*disable)(struct clk *);
76#if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3)
77 u8 fixed_div;
78 void __iomem *clksel_reg;
79 u32 clksel_mask;
80 const struct clksel *clksel;
81 struct dpll_data *dpll_data;
82#else
83 __u8 rate_offset;
84 __u8 src_offset;
85#endif
86#if defined(CONFIG_PM_DEBUG) && defined(CONFIG_DEBUG_FS)
87 struct dentry *dent; /* For visible tree hierarchy */
88#endif
89};
90
91struct cpufreq_frequency_table;
92
93struct clk_functions {
94 int (*clk_enable)(struct clk *clk);
95 void (*clk_disable)(struct clk *clk);
96 long (*clk_round_rate)(struct clk *clk, unsigned long rate);
97 int (*clk_set_rate)(struct clk *clk, unsigned long rate);
98 int (*clk_set_parent)(struct clk *clk, struct clk *parent);
99 struct clk * (*clk_get_parent)(struct clk *clk);
100 void (*clk_allow_idle)(struct clk *clk);
101 void (*clk_deny_idle)(struct clk *clk);
102 void (*clk_disable_unused)(struct clk *clk);
103#ifdef CONFIG_CPU_FREQ
104 void (*clk_init_cpufreq_table)(struct cpufreq_frequency_table **);
105#endif
106};
107
108extern unsigned int mpurate;
109
110extern int clk_init(struct clk_functions * custom_clocks);
111extern int clk_register(struct clk *clk);
112extern void clk_unregister(struct clk *clk);
113extern void propagate_rate(struct clk *clk);
114extern void recalculate_root_clocks(void);
115extern void followparent_recalc(struct clk * clk);
116extern void clk_allow_idle(struct clk *clk);
117extern void clk_deny_idle(struct clk *clk);
118extern int clk_get_usecount(struct clk *clk);
119extern void clk_enable_init_clocks(void);
120
121/* Clock flags */
122#define RATE_CKCTL (1 << 0) /* Main fixed ratio clocks */
123#define RATE_FIXED (1 << 1) /* Fixed clock rate */
124#define RATE_PROPAGATES (1 << 2) /* Program children too */
125#define VIRTUAL_CLOCK (1 << 3) /* Composite clock from table */
126#define ALWAYS_ENABLED (1 << 4) /* Clock cannot be disabled */
127#define ENABLE_REG_32BIT (1 << 5) /* Use 32-bit access */
128#define VIRTUAL_IO_ADDRESS (1 << 6) /* Clock in virtual address */
129#define CLOCK_IDLE_CONTROL (1 << 7)
130#define CLOCK_NO_IDLE_PARENT (1 << 8)
131#define DELAYED_APP (1 << 9) /* Delay application of clock */
132#define CONFIG_PARTICIPANT (1 << 10) /* Fundamental clock */
133#define ENABLE_ON_INIT (1 << 11) /* Enable upon framework init */
134#define INVERT_ENABLE (1 << 12) /* 0 enables, 1 disables */
135/* bits 13-20 are currently free */
136#define CLOCK_IN_OMAP310 (1 << 21)
137#define CLOCK_IN_OMAP730 (1 << 22)
138#define CLOCK_IN_OMAP1510 (1 << 23)
139#define CLOCK_IN_OMAP16XX (1 << 24)
140#define CLOCK_IN_OMAP242X (1 << 25)
141#define CLOCK_IN_OMAP243X (1 << 26)
142#define CLOCK_IN_OMAP343X (1 << 27) /* clocks common to all 343X */
143#define PARENT_CONTROLS_CLOCK (1 << 28)
144#define CLOCK_IN_OMAP3430ES1 (1 << 29) /* 3430ES1 clocks only */
145#define CLOCK_IN_OMAP3430ES2 (1 << 30) /* 3430ES2 clocks only */
146
147/* Clksel_rate flags */
148#define DEFAULT_RATE (1 << 0)
149#define RATE_IN_242X (1 << 1)
150#define RATE_IN_243X (1 << 2)
151#define RATE_IN_343X (1 << 3) /* rates common to all 343X */
152#define RATE_IN_3430ES2 (1 << 4) /* 3430ES2 rates only */
153
154#define RATE_IN_24XX (RATE_IN_242X | RATE_IN_243X)
155
156
157/* CM_CLKSEL2_PLL.CORE_CLK_SRC options (24XX) */
158#define CORE_CLK_SRC_32K 0
159#define CORE_CLK_SRC_DPLL 1
160#define CORE_CLK_SRC_DPLL_X2 2
161
162#endif
diff --git a/arch/arm/plat-omap/include/mach/common.h b/arch/arm/plat-omap/include/mach/common.h
new file mode 100644
index 000000000000..06093112b665
--- /dev/null
+++ b/arch/arm/plat-omap/include/mach/common.h
@@ -0,0 +1,69 @@
1/*
2 * arch/arm/plat-omap/include/mach/common.h
3 *
4 * Header for code common to all OMAP machines.
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2 of the License, or (at your
9 * option) any later version.
10 *
11 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
12 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
13 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
14 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
15 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
16 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
17 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
18 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
19 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
20 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
21 *
22 * You should have received a copy of the GNU General Public License along
23 * with this program; if not, write to the Free Software Foundation, Inc.,
24 * 675 Mass Ave, Cambridge, MA 02139, USA.
25 */
26
27#ifndef __ARCH_ARM_MACH_OMAP_COMMON_H
28#define __ARCH_ARM_MACH_OMAP_COMMON_H
29
30#include <linux/i2c.h>
31
32struct sys_timer;
33
34extern void omap_map_common_io(void);
35extern struct sys_timer omap_timer;
36extern void omap_serial_init(void);
37#ifdef CONFIG_I2C_OMAP
38extern int omap_register_i2c_bus(int bus_id, u32 clkrate,
39 struct i2c_board_info const *info,
40 unsigned len);
41#else
42static inline int omap_register_i2c_bus(int bus_id, u32 clkrate,
43 struct i2c_board_info const *info,
44 unsigned len)
45{
46 return 0;
47}
48#endif
49
50/* IO bases for various OMAP processors */
51struct omap_globals {
52 void __iomem *tap; /* Control module ID code */
53 void __iomem *sdrc; /* SDRAM Controller */
54 void __iomem *sms; /* SDRAM Memory Scheduler */
55 void __iomem *ctrl; /* System Control Module */
56 void __iomem *prm; /* Power and Reset Management */
57 void __iomem *cm; /* Clock Management */
58};
59
60void omap2_set_globals_242x(void);
61void omap2_set_globals_243x(void);
62void omap2_set_globals_343x(void);
63
64/* These get called from omap2_set_globals_xxxx(), do not call these */
65void omap2_set_globals_memory(struct omap_globals *);
66void omap2_set_globals_control(struct omap_globals *);
67void omap2_set_globals_prcm(struct omap_globals *);
68
69#endif /* __ARCH_ARM_MACH_OMAP_COMMON_H */
diff --git a/arch/arm/plat-omap/include/mach/control.h b/arch/arm/plat-omap/include/mach/control.h
new file mode 100644
index 000000000000..e3fd62d9a995
--- /dev/null
+++ b/arch/arm/plat-omap/include/mach/control.h
@@ -0,0 +1,189 @@
1#ifndef __ASM_ARCH_CONTROL_H
2#define __ASM_ARCH_CONTROL_H
3
4/*
5 * arch/arm/plat-omap/include/mach/control.h
6 *
7 * OMAP2/3 System Control Module definitions
8 *
9 * Copyright (C) 2007 Texas Instruments, Inc.
10 * Copyright (C) 2007 Nokia Corporation
11 *
12 * Written by Paul Walmsley
13 *
14 * This program is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation.
17 */
18
19#include <mach/io.h>
20
21#define OMAP242X_CTRL_REGADDR(reg) \
22 (void __iomem *)IO_ADDRESS(OMAP242X_CTRL_BASE + (reg))
23#define OMAP243X_CTRL_REGADDR(reg) \
24 (void __iomem *)IO_ADDRESS(OMAP243X_CTRL_BASE + (reg))
25#define OMAP343X_CTRL_REGADDR(reg) \
26 (void __iomem *)IO_ADDRESS(OMAP343X_CTRL_BASE + (reg))
27
28/*
29 * As elsewhere, the "OMAP2_" prefix indicates that the macro is valid for
30 * OMAP24XX and OMAP34XX.
31 */
32
33/* Control submodule offsets */
34
35#define OMAP2_CONTROL_INTERFACE 0x000
36#define OMAP2_CONTROL_PADCONFS 0x030
37#define OMAP2_CONTROL_GENERAL 0x270
38#define OMAP343X_CONTROL_MEM_WKUP 0x600
39#define OMAP343X_CONTROL_PADCONFS_WKUP 0xa00
40#define OMAP343X_CONTROL_GENERAL_WKUP 0xa60
41
42/* Control register offsets - read/write with omap_ctrl_{read,write}{bwl}() */
43
44#define OMAP2_CONTROL_SYSCONFIG (OMAP2_CONTROL_INTERFACE + 0x10)
45
46/* CONTROL_GENERAL register offsets common to OMAP2 & 3 */
47#define OMAP2_CONTROL_DEVCONF0 (OMAP2_CONTROL_GENERAL + 0x0004)
48#define OMAP2_CONTROL_MSUSPENDMUX_0 (OMAP2_CONTROL_GENERAL + 0x0020)
49#define OMAP2_CONTROL_MSUSPENDMUX_1 (OMAP2_CONTROL_GENERAL + 0x0024)
50#define OMAP2_CONTROL_MSUSPENDMUX_2 (OMAP2_CONTROL_GENERAL + 0x0028)
51#define OMAP2_CONTROL_MSUSPENDMUX_3 (OMAP2_CONTROL_GENERAL + 0x002c)
52#define OMAP2_CONTROL_MSUSPENDMUX_4 (OMAP2_CONTROL_GENERAL + 0x0030)
53#define OMAP2_CONTROL_MSUSPENDMUX_5 (OMAP2_CONTROL_GENERAL + 0x0034)
54#define OMAP2_CONTROL_SEC_CTRL (OMAP2_CONTROL_GENERAL + 0x0040)
55#define OMAP2_CONTROL_RPUB_KEY_H_0 (OMAP2_CONTROL_GENERAL + 0x0090)
56#define OMAP2_CONTROL_RPUB_KEY_H_1 (OMAP2_CONTROL_GENERAL + 0x0094)
57#define OMAP2_CONTROL_RPUB_KEY_H_2 (OMAP2_CONTROL_GENERAL + 0x0098)
58#define OMAP2_CONTROL_RPUB_KEY_H_3 (OMAP2_CONTROL_GENERAL + 0x009c)
59
60/* 242x-only CONTROL_GENERAL register offsets */
61#define OMAP242X_CONTROL_DEVCONF OMAP2_CONTROL_DEVCONF0 /* match TRM */
62#define OMAP242X_CONTROL_OCM_RAM_PERM (OMAP2_CONTROL_GENERAL + 0x0068)
63
64/* 243x-only CONTROL_GENERAL register offsets */
65/* CONTROL_IVA2_BOOT{ADDR,MOD} are at the same place on 343x - noted below */
66#define OMAP243X_CONTROL_DEVCONF1 (OMAP2_CONTROL_GENERAL + 0x0078)
67#define OMAP243X_CONTROL_CSIRXFE (OMAP2_CONTROL_GENERAL + 0x007c)
68#define OMAP243X_CONTROL_IVA2_BOOTADDR (OMAP2_CONTROL_GENERAL + 0x0190)
69#define OMAP243X_CONTROL_IVA2_BOOTMOD (OMAP2_CONTROL_GENERAL + 0x0194)
70#define OMAP243X_CONTROL_IVA2_GEMCFG (OMAP2_CONTROL_GENERAL + 0x0198)
71
72/* 24xx-only CONTROL_GENERAL register offsets */
73#define OMAP24XX_CONTROL_DEBOBS (OMAP2_CONTROL_GENERAL + 0x0000)
74#define OMAP24XX_CONTROL_EMU_SUPPORT (OMAP2_CONTROL_GENERAL + 0x0008)
75#define OMAP24XX_CONTROL_SEC_TEST (OMAP2_CONTROL_GENERAL + 0x0044)
76#define OMAP24XX_CONTROL_PSA_CTRL (OMAP2_CONTROL_GENERAL + 0x0048)
77#define OMAP24XX_CONTROL_PSA_CMD (OMAP2_CONTROL_GENERAL + 0x004c)
78#define OMAP24XX_CONTROL_PSA_VALUE (OMAP2_CONTROL_GENERAL + 0x0050)
79#define OMAP24XX_CONTROL_SEC_EMU (OMAP2_CONTROL_GENERAL + 0x0060)
80#define OMAP24XX_CONTROL_SEC_TAP (OMAP2_CONTROL_GENERAL + 0x0064)
81#define OMAP24XX_CONTROL_OCM_PUB_RAM_ADD (OMAP2_CONTROL_GENERAL + 0x006c)
82#define OMAP24XX_CONTROL_EXT_SEC_RAM_START_ADD (OMAP2_CONTROL_GENERAL + 0x0070)
83#define OMAP24XX_CONTROL_EXT_SEC_RAM_STOP_ADD (OMAP2_CONTROL_GENERAL + 0x0074)
84#define OMAP24XX_CONTROL_SEC_STATUS (OMAP2_CONTROL_GENERAL + 0x0080)
85#define OMAP24XX_CONTROL_SEC_ERR_STATUS (OMAP2_CONTROL_GENERAL + 0x0084)
86#define OMAP24XX_CONTROL_STATUS (OMAP2_CONTROL_GENERAL + 0x0088)
87#define OMAP24XX_CONTROL_GENERAL_PURPOSE_STATUS (OMAP2_CONTROL_GENERAL + 0x008c)
88#define OMAP24XX_CONTROL_RAND_KEY_0 (OMAP2_CONTROL_GENERAL + 0x00a0)
89#define OMAP24XX_CONTROL_RAND_KEY_1 (OMAP2_CONTROL_GENERAL + 0x00a4)
90#define OMAP24XX_CONTROL_RAND_KEY_2 (OMAP2_CONTROL_GENERAL + 0x00a8)
91#define OMAP24XX_CONTROL_RAND_KEY_3 (OMAP2_CONTROL_GENERAL + 0x00ac)
92#define OMAP24XX_CONTROL_CUST_KEY_0 (OMAP2_CONTROL_GENERAL + 0x00b0)
93#define OMAP24XX_CONTROL_CUST_KEY_1 (OMAP2_CONTROL_GENERAL + 0x00b4)
94#define OMAP24XX_CONTROL_TEST_KEY_0 (OMAP2_CONTROL_GENERAL + 0x00c0)
95#define OMAP24XX_CONTROL_TEST_KEY_1 (OMAP2_CONTROL_GENERAL + 0x00c4)
96#define OMAP24XX_CONTROL_TEST_KEY_2 (OMAP2_CONTROL_GENERAL + 0x00c8)
97#define OMAP24XX_CONTROL_TEST_KEY_3 (OMAP2_CONTROL_GENERAL + 0x00cc)
98#define OMAP24XX_CONTROL_TEST_KEY_4 (OMAP2_CONTROL_GENERAL + 0x00d0)
99#define OMAP24XX_CONTROL_TEST_KEY_5 (OMAP2_CONTROL_GENERAL + 0x00d4)
100#define OMAP24XX_CONTROL_TEST_KEY_6 (OMAP2_CONTROL_GENERAL + 0x00d8)
101#define OMAP24XX_CONTROL_TEST_KEY_7 (OMAP2_CONTROL_GENERAL + 0x00dc)
102#define OMAP24XX_CONTROL_TEST_KEY_8 (OMAP2_CONTROL_GENERAL + 0x00e0)
103#define OMAP24XX_CONTROL_TEST_KEY_9 (OMAP2_CONTROL_GENERAL + 0x00e4)
104
105/* 34xx-only CONTROL_GENERAL register offsets */
106#define OMAP343X_CONTROL_PADCONF_OFF (OMAP2_CONTROL_GENERAL + 0x0000)
107#define OMAP343X_CONTROL_MEM_DFTRW0 (OMAP2_CONTROL_GENERAL + 0x0008)
108#define OMAP343X_CONTROL_MEM_DFTRW1 (OMAP2_CONTROL_GENERAL + 0x000c)
109#define OMAP343X_CONTROL_DEVCONF1 (OMAP2_CONTROL_GENERAL + 0x0068)
110#define OMAP343X_CONTROL_CSIRXFE (OMAP2_CONTROL_GENERAL + 0x006c)
111#define OMAP343X_CONTROL_SEC_STATUS (OMAP2_CONTROL_GENERAL + 0x0070)
112#define OMAP343X_CONTROL_SEC_ERR_STATUS (OMAP2_CONTROL_GENERAL + 0x0074)
113#define OMAP343X_CONTROL_SEC_ERR_STATUS_DEBUG (OMAP2_CONTROL_GENERAL + 0x0078)
114#define OMAP343X_CONTROL_STATUS (OMAP2_CONTROL_GENERAL + 0x0080)
115#define OMAP343X_CONTROL_GENERAL_PURPOSE_STATUS (OMAP2_CONTROL_GENERAL + 0x0084)
116#define OMAP343X_CONTROL_RPUB_KEY_H_4 (OMAP2_CONTROL_GENERAL + 0x00a0)
117#define OMAP343X_CONTROL_RAND_KEY_0 (OMAP2_CONTROL_GENERAL + 0x00a8)
118#define OMAP343X_CONTROL_RAND_KEY_1 (OMAP2_CONTROL_GENERAL + 0x00ac)
119#define OMAP343X_CONTROL_RAND_KEY_2 (OMAP2_CONTROL_GENERAL + 0x00b0)
120#define OMAP343X_CONTROL_RAND_KEY_3 (OMAP2_CONTROL_GENERAL + 0x00b4)
121#define OMAP343X_CONTROL_TEST_KEY_0 (OMAP2_CONTROL_GENERAL + 0x00c8)
122#define OMAP343X_CONTROL_TEST_KEY_1 (OMAP2_CONTROL_GENERAL + 0x00cc)
123#define OMAP343X_CONTROL_TEST_KEY_2 (OMAP2_CONTROL_GENERAL + 0x00d0)
124#define OMAP343X_CONTROL_TEST_KEY_3 (OMAP2_CONTROL_GENERAL + 0x00d4)
125#define OMAP343X_CONTROL_TEST_KEY_4 (OMAP2_CONTROL_GENERAL + 0x00d8)
126#define OMAP343X_CONTROL_TEST_KEY_5 (OMAP2_CONTROL_GENERAL + 0x00dc)
127#define OMAP343X_CONTROL_TEST_KEY_6 (OMAP2_CONTROL_GENERAL + 0x00e0)
128#define OMAP343X_CONTROL_TEST_KEY_7 (OMAP2_CONTROL_GENERAL + 0x00e4)
129#define OMAP343X_CONTROL_TEST_KEY_8 (OMAP2_CONTROL_GENERAL + 0x00e8)
130#define OMAP343X_CONTROL_TEST_KEY_9 (OMAP2_CONTROL_GENERAL + 0x00ec)
131#define OMAP343X_CONTROL_TEST_KEY_10 (OMAP2_CONTROL_GENERAL + 0x00f0)
132#define OMAP343X_CONTROL_TEST_KEY_11 (OMAP2_CONTROL_GENERAL + 0x00f4)
133#define OMAP343X_CONTROL_TEST_KEY_12 (OMAP2_CONTROL_GENERAL + 0x00f8)
134#define OMAP343X_CONTROL_TEST_KEY_13 (OMAP2_CONTROL_GENERAL + 0x00fc)
135#define OMAP343X_CONTROL_IVA2_BOOTADDR (OMAP2_CONTROL_GENERAL + 0x0190)
136#define OMAP343X_CONTROL_IVA2_BOOTMOD (OMAP2_CONTROL_GENERAL + 0x0194)
137
138/*
139 * REVISIT: This list of registers is not comprehensive - there are more
140 * that should be added.
141 */
142
143/*
144 * Control module register bit defines - these should eventually go into
145 * their own regbits file. Some of these will be complicated, depending
146 * on the device type (general-purpose, emulator, test, secure, bad, other)
147 * and the security mode (secure, non-secure, don't care)
148 */
149/* CONTROL_DEVCONF0 bits */
150#define OMAP24XX_USBSTANDBYCTRL (1 << 15)
151#define OMAP2_MCBSP2_CLKS_MASK (1 << 6)
152#define OMAP2_MCBSP1_CLKS_MASK (1 << 2)
153
154/* CONTROL_DEVCONF1 bits */
155#define OMAP2_MCBSP5_CLKS_MASK (1 << 4) /* > 242x */
156#define OMAP2_MCBSP4_CLKS_MASK (1 << 2) /* > 242x */
157#define OMAP2_MCBSP3_CLKS_MASK (1 << 0) /* > 242x */
158
159/* CONTROL_STATUS bits */
160#define OMAP2_DEVICETYPE_MASK (0x7 << 8)
161#define OMAP2_SYSBOOT_5_MASK (1 << 5)
162#define OMAP2_SYSBOOT_4_MASK (1 << 4)
163#define OMAP2_SYSBOOT_3_MASK (1 << 3)
164#define OMAP2_SYSBOOT_2_MASK (1 << 2)
165#define OMAP2_SYSBOOT_1_MASK (1 << 1)
166#define OMAP2_SYSBOOT_0_MASK (1 << 0)
167
168#ifndef __ASSEMBLY__
169#if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3)
170extern void __iomem *omap_ctrl_base_get(void);
171extern u8 omap_ctrl_readb(u16 offset);
172extern u16 omap_ctrl_readw(u16 offset);
173extern u32 omap_ctrl_readl(u16 offset);
174extern void omap_ctrl_writeb(u8 val, u16 offset);
175extern void omap_ctrl_writew(u16 val, u16 offset);
176extern void omap_ctrl_writel(u32 val, u16 offset);
177#else
178#define omap_ctrl_base_get() 0
179#define omap_ctrl_readb(x) 0
180#define omap_ctrl_readw(x) 0
181#define omap_ctrl_readl(x) 0
182#define omap_ctrl_writeb(x, y) WARN_ON(1)
183#define omap_ctrl_writew(x, y) WARN_ON(1)
184#define omap_ctrl_writel(x, y) WARN_ON(1)
185#endif
186#endif /* __ASSEMBLY__ */
187
188#endif /* __ASM_ARCH_CONTROL_H */
189
diff --git a/arch/arm/plat-omap/include/mach/cpu.h b/arch/arm/plat-omap/include/mach/cpu.h
new file mode 100644
index 000000000000..05aee0eda34f
--- /dev/null
+++ b/arch/arm/plat-omap/include/mach/cpu.h
@@ -0,0 +1,402 @@
1/*
2 * arch/arm/plat-omap/include/mach/cpu.h
3 *
4 * OMAP cpu type detection
5 *
6 * Copyright (C) 2004, 2008 Nokia Corporation
7 *
8 * Written by Tony Lindgren <tony.lindgren@nokia.com>
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 *
24 */
25
26#ifndef __ASM_ARCH_OMAP_CPU_H
27#define __ASM_ARCH_OMAP_CPU_H
28
29struct omap_chip_id {
30 u8 oc;
31};
32
33#define OMAP_CHIP_INIT(x) { .oc = x }
34
35extern unsigned int system_rev;
36
37#define omap2_cpu_rev() ((system_rev >> 12) & 0x0f)
38
39/*
40 * Test if multicore OMAP support is needed
41 */
42#undef MULTI_OMAP1
43#undef MULTI_OMAP2
44#undef OMAP_NAME
45
46#ifdef CONFIG_ARCH_OMAP730
47# ifdef OMAP_NAME
48# undef MULTI_OMAP1
49# define MULTI_OMAP1
50# else
51# define OMAP_NAME omap730
52# endif
53#endif
54#ifdef CONFIG_ARCH_OMAP15XX
55# ifdef OMAP_NAME
56# undef MULTI_OMAP1
57# define MULTI_OMAP1
58# else
59# define OMAP_NAME omap1510
60# endif
61#endif
62#ifdef CONFIG_ARCH_OMAP16XX
63# ifdef OMAP_NAME
64# undef MULTI_OMAP1
65# define MULTI_OMAP1
66# else
67# define OMAP_NAME omap16xx
68# endif
69#endif
70#if (defined(CONFIG_ARCH_OMAP24XX) || defined(CONFIG_ARCH_OMAP34XX))
71# if (defined(OMAP_NAME) || defined(MULTI_OMAP1))
72# error "OMAP1 and OMAP2 can't be selected at the same time"
73# endif
74#endif
75#ifdef CONFIG_ARCH_OMAP2420
76# ifdef OMAP_NAME
77# undef MULTI_OMAP2
78# define MULTI_OMAP2
79# else
80# define OMAP_NAME omap2420
81# endif
82#endif
83#ifdef CONFIG_ARCH_OMAP2430
84# ifdef OMAP_NAME
85# undef MULTI_OMAP2
86# define MULTI_OMAP2
87# else
88# define OMAP_NAME omap2430
89# endif
90#endif
91#ifdef CONFIG_ARCH_OMAP3430
92# ifdef OMAP_NAME
93# undef MULTI_OMAP2
94# define MULTI_OMAP2
95# else
96# define OMAP_NAME omap3430
97# endif
98#endif
99
100/*
101 * Macros to group OMAP into cpu classes.
102 * These can be used in most places.
103 * cpu_is_omap7xx(): True for OMAP730
104 * cpu_is_omap15xx(): True for OMAP1510, OMAP5910 and OMAP310
105 * cpu_is_omap16xx(): True for OMAP1610, OMAP5912 and OMAP1710
106 * cpu_is_omap24xx(): True for OMAP2420, OMAP2422, OMAP2423, OMAP2430
107 * cpu_is_omap242x(): True for OMAP2420, OMAP2422, OMAP2423
108 * cpu_is_omap243x(): True for OMAP2430
109 * cpu_is_omap343x(): True for OMAP3430
110 */
111#define GET_OMAP_CLASS ((system_rev >> 24) & 0xff)
112
113#define IS_OMAP_CLASS(class, id) \
114static inline int is_omap ##class (void) \
115{ \
116 return (GET_OMAP_CLASS == (id)) ? 1 : 0; \
117}
118
119#define GET_OMAP_SUBCLASS ((system_rev >> 20) & 0x0fff)
120
121#define IS_OMAP_SUBCLASS(subclass, id) \
122static inline int is_omap ##subclass (void) \
123{ \
124 return (GET_OMAP_SUBCLASS == (id)) ? 1 : 0; \
125}
126
127IS_OMAP_CLASS(7xx, 0x07)
128IS_OMAP_CLASS(15xx, 0x15)
129IS_OMAP_CLASS(16xx, 0x16)
130IS_OMAP_CLASS(24xx, 0x24)
131IS_OMAP_CLASS(34xx, 0x34)
132
133IS_OMAP_SUBCLASS(242x, 0x242)
134IS_OMAP_SUBCLASS(243x, 0x243)
135IS_OMAP_SUBCLASS(343x, 0x343)
136
137#define cpu_is_omap7xx() 0
138#define cpu_is_omap15xx() 0
139#define cpu_is_omap16xx() 0
140#define cpu_is_omap24xx() 0
141#define cpu_is_omap242x() 0
142#define cpu_is_omap243x() 0
143#define cpu_is_omap34xx() 0
144#define cpu_is_omap343x() 0
145
146#if defined(MULTI_OMAP1)
147# if defined(CONFIG_ARCH_OMAP730)
148# undef cpu_is_omap7xx
149# define cpu_is_omap7xx() is_omap7xx()
150# endif
151# if defined(CONFIG_ARCH_OMAP15XX)
152# undef cpu_is_omap15xx
153# define cpu_is_omap15xx() is_omap15xx()
154# endif
155# if defined(CONFIG_ARCH_OMAP16XX)
156# undef cpu_is_omap16xx
157# define cpu_is_omap16xx() is_omap16xx()
158# endif
159#else
160# if defined(CONFIG_ARCH_OMAP730)
161# undef cpu_is_omap7xx
162# define cpu_is_omap7xx() 1
163# endif
164# if defined(CONFIG_ARCH_OMAP15XX)
165# undef cpu_is_omap15xx
166# define cpu_is_omap15xx() 1
167# endif
168# if defined(CONFIG_ARCH_OMAP16XX)
169# undef cpu_is_omap16xx
170# define cpu_is_omap16xx() 1
171# endif
172#endif
173
174#if defined(MULTI_OMAP2)
175# if defined(CONFIG_ARCH_OMAP24XX)
176# undef cpu_is_omap24xx
177# undef cpu_is_omap242x
178# undef cpu_is_omap243x
179# define cpu_is_omap24xx() is_omap24xx()
180# define cpu_is_omap242x() is_omap242x()
181# define cpu_is_omap243x() is_omap243x()
182# endif
183# if defined(CONFIG_ARCH_OMAP34XX)
184# undef cpu_is_omap34xx
185# undef cpu_is_omap343x
186# define cpu_is_omap34xx() is_omap34xx()
187# define cpu_is_omap343x() is_omap343x()
188# endif
189#else
190# if defined(CONFIG_ARCH_OMAP24XX)
191# undef cpu_is_omap24xx
192# define cpu_is_omap24xx() 1
193# endif
194# if defined(CONFIG_ARCH_OMAP2420)
195# undef cpu_is_omap242x
196# define cpu_is_omap242x() 1
197# endif
198# if defined(CONFIG_ARCH_OMAP2430)
199# undef cpu_is_omap243x
200# define cpu_is_omap243x() 1
201# endif
202# if defined(CONFIG_ARCH_OMAP34XX)
203# undef cpu_is_omap34xx
204# define cpu_is_omap34xx() 1
205# endif
206# if defined(CONFIG_ARCH_OMAP3430)
207# undef cpu_is_omap343x
208# define cpu_is_omap343x() 1
209# endif
210#endif
211
212/*
213 * Macros to detect individual cpu types.
214 * These are only rarely needed.
215 * cpu_is_omap330(): True for OMAP330
216 * cpu_is_omap730(): True for OMAP730
217 * cpu_is_omap1510(): True for OMAP1510
218 * cpu_is_omap1610(): True for OMAP1610
219 * cpu_is_omap1611(): True for OMAP1611
220 * cpu_is_omap5912(): True for OMAP5912
221 * cpu_is_omap1621(): True for OMAP1621
222 * cpu_is_omap1710(): True for OMAP1710
223 * cpu_is_omap2420(): True for OMAP2420
224 * cpu_is_omap2422(): True for OMAP2422
225 * cpu_is_omap2423(): True for OMAP2423
226 * cpu_is_omap2430(): True for OMAP2430
227 * cpu_is_omap3430(): True for OMAP3430
228 */
229#define GET_OMAP_TYPE ((system_rev >> 16) & 0xffff)
230
231#define IS_OMAP_TYPE(type, id) \
232static inline int is_omap ##type (void) \
233{ \
234 return (GET_OMAP_TYPE == (id)) ? 1 : 0; \
235}
236
237IS_OMAP_TYPE(310, 0x0310)
238IS_OMAP_TYPE(730, 0x0730)
239IS_OMAP_TYPE(1510, 0x1510)
240IS_OMAP_TYPE(1610, 0x1610)
241IS_OMAP_TYPE(1611, 0x1611)
242IS_OMAP_TYPE(5912, 0x1611)
243IS_OMAP_TYPE(1621, 0x1621)
244IS_OMAP_TYPE(1710, 0x1710)
245IS_OMAP_TYPE(2420, 0x2420)
246IS_OMAP_TYPE(2422, 0x2422)
247IS_OMAP_TYPE(2423, 0x2423)
248IS_OMAP_TYPE(2430, 0x2430)
249IS_OMAP_TYPE(3430, 0x3430)
250
251#define cpu_is_omap310() 0
252#define cpu_is_omap730() 0
253#define cpu_is_omap1510() 0
254#define cpu_is_omap1610() 0
255#define cpu_is_omap5912() 0
256#define cpu_is_omap1611() 0
257#define cpu_is_omap1621() 0
258#define cpu_is_omap1710() 0
259#define cpu_is_omap2420() 0
260#define cpu_is_omap2422() 0
261#define cpu_is_omap2423() 0
262#define cpu_is_omap2430() 0
263#define cpu_is_omap3430() 0
264
265#if defined(MULTI_OMAP1)
266# if defined(CONFIG_ARCH_OMAP730)
267# undef cpu_is_omap730
268# define cpu_is_omap730() is_omap730()
269# endif
270#else
271# if defined(CONFIG_ARCH_OMAP730)
272# undef cpu_is_omap730
273# define cpu_is_omap730() 1
274# endif
275#endif
276
277/*
278 * Whether we have MULTI_OMAP1 or not, we still need to distinguish
279 * between 330 vs. 1510 and 1611B/5912 vs. 1710.
280 */
281#if defined(CONFIG_ARCH_OMAP15XX)
282# undef cpu_is_omap310
283# undef cpu_is_omap1510
284# define cpu_is_omap310() is_omap310()
285# define cpu_is_omap1510() is_omap1510()
286#endif
287
288#if defined(CONFIG_ARCH_OMAP16XX)
289# undef cpu_is_omap1610
290# undef cpu_is_omap1611
291# undef cpu_is_omap5912
292# undef cpu_is_omap1621
293# undef cpu_is_omap1710
294# define cpu_is_omap1610() is_omap1610()
295# define cpu_is_omap1611() is_omap1611()
296# define cpu_is_omap5912() is_omap5912()
297# define cpu_is_omap1621() is_omap1621()
298# define cpu_is_omap1710() is_omap1710()
299#endif
300
301#if defined(CONFIG_ARCH_OMAP24XX)
302# undef cpu_is_omap2420
303# undef cpu_is_omap2422
304# undef cpu_is_omap2423
305# undef cpu_is_omap2430
306# define cpu_is_omap2420() is_omap2420()
307# define cpu_is_omap2422() is_omap2422()
308# define cpu_is_omap2423() is_omap2423()
309# define cpu_is_omap2430() is_omap2430()
310#endif
311
312#if defined(CONFIG_ARCH_OMAP34XX)
313# undef cpu_is_omap3430
314# define cpu_is_omap3430() is_omap3430()
315#endif
316
317/* Macros to detect if we have OMAP1 or OMAP2 */
318#define cpu_class_is_omap1() (cpu_is_omap730() || cpu_is_omap15xx() || \
319 cpu_is_omap16xx())
320#define cpu_class_is_omap2() (cpu_is_omap24xx() || cpu_is_omap34xx())
321
322#if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3)
323/*
324 * Macros to detect silicon revision of OMAP2/3 processors.
325 * is_sil_rev_greater_than: true if passed cpu type & its rev is greater.
326 * is_sil_rev_lesser_than: true if passed cpu type & its rev is lesser.
327 * is_sil_rev_equal_to: true if passed cpu type & its rev is equal.
328 * get_sil_rev: return the silicon rev value.
329 */
330#define get_sil_omap_type(rev) ((rev & 0xffff0000) >> 16)
331#define get_sil_revision(rev) ((rev & 0x0000f000) >> 12)
332
333#define is_sil_rev_greater_than(rev) \
334 ((get_sil_omap_type(system_rev) == get_sil_omap_type(rev)) && \
335 (get_sil_revision(system_rev) > get_sil_revision(rev)))
336
337#define is_sil_rev_less_than(rev) \
338 ((get_sil_omap_type(system_rev) == get_sil_omap_type(rev)) && \
339 (get_sil_revision(system_rev) < get_sil_revision(rev)))
340
341#define is_sil_rev_equal_to(rev) \
342 ((get_sil_omap_type(system_rev) == get_sil_omap_type(rev)) && \
343 (get_sil_revision(system_rev) == get_sil_revision(rev)))
344
345#define get_sil_rev() \
346 get_sil_revision(system_rev)
347
348/* Various silicon macros defined here */
349#define OMAP2420_REV_ES1_0 0x24200000
350#define OMAP2420_REV_ES2_0 0x24201000
351#define OMAP2430_REV_ES1_0 0x24300000
352#define OMAP3430_REV_ES1_0 0x34300000
353#define OMAP3430_REV_ES2_0 0x34301000
354#define OMAP3430_REV_ES2_1 0x34302000
355#define OMAP3430_REV_ES2_2 0x34303000
356
357/*
358 * omap_chip bits
359 *
360 * CHIP_IS_OMAP{2420,2430,3430} indicate that a particular structure is
361 * valid on all chips of that type. CHIP_IS_OMAP3430ES{1,2} indicates
362 * something that is only valid on that particular ES revision.
363 *
364 * These bits may be ORed together to indicate structures that are
365 * available on multiple chip types.
366 *
367 * To test whether a particular structure matches the current OMAP chip type,
368 * use omap_chip_is().
369 *
370 */
371#define CHIP_IS_OMAP2420 (1 << 0)
372#define CHIP_IS_OMAP2430 (1 << 1)
373#define CHIP_IS_OMAP3430 (1 << 2)
374#define CHIP_IS_OMAP3430ES1 (1 << 3)
375#define CHIP_IS_OMAP3430ES2 (1 << 4)
376
377#define CHIP_IS_OMAP24XX (CHIP_IS_OMAP2420 | CHIP_IS_OMAP2430)
378
379int omap_chip_is(struct omap_chip_id oci);
380
381
382/*
383 * Macro to detect device type i.e. EMU/HS/TST/GP/BAD
384 */
385#define DEVICE_TYPE_TEST 0
386#define DEVICE_TYPE_EMU 1
387#define DEVICE_TYPE_SEC 2
388#define DEVICE_TYPE_GP 3
389#define DEVICE_TYPE_BAD 4
390
391#define get_device_type() ((system_rev & 0x700) >> 8)
392#define is_device_type_test() (get_device_type() == DEVICE_TYPE_TEST)
393#define is_device_type_emu() (get_device_type() == DEVICE_TYPE_EMU)
394#define is_device_type_sec() (get_device_type() == DEVICE_TYPE_SEC)
395#define is_device_type_gp() (get_device_type() == DEVICE_TYPE_GP)
396#define is_device_type_bad() (get_device_type() == DEVICE_TYPE_BAD)
397
398void omap2_check_revision(void);
399
400#endif /* defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3) */
401
402#endif
diff --git a/arch/arm/plat-omap/include/mach/debug-macro.S b/arch/arm/plat-omap/include/mach/debug-macro.S
new file mode 100644
index 000000000000..1b0039bdeb4e
--- /dev/null
+++ b/arch/arm/plat-omap/include/mach/debug-macro.S
@@ -0,0 +1,58 @@
1/* arch/arm/plat-omap/include/mach/debug-macro.S
2 *
3 * Debugging macro include header
4 *
5 * Copyright (C) 1994-1999 Russell King
6 * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 *
12*/
13
14 .macro addruart,rx
15 mrc p15, 0, \rx, c1, c0
16 tst \rx, #1 @ MMU enabled?
17#ifdef CONFIG_ARCH_OMAP1
18 moveq \rx, #0xff000000 @ physical base address
19 movne \rx, #0xfe000000 @ virtual base
20 orr \rx, \rx, #0x00fb0000
21#ifdef CONFIG_OMAP_LL_DEBUG_UART3
22 orr \rx, \rx, #0x00009000 @ UART 3
23#endif
24#if defined(CONFIG_OMAP_LL_DEBUG_UART2) || defined(CONFIG_OMAP_LL_DEBUG_UART3)
25 orr \rx, \rx, #0x00000800 @ UART 2 & 3
26#endif
27
28#elif CONFIG_ARCH_OMAP2
29 moveq \rx, #0x48000000 @ physical base address
30 movne \rx, #0xd8000000 @ virtual base
31 orr \rx, \rx, #0x0006a000
32#ifdef CONFIG_OMAP_LL_DEBUG_UART2
33 add \rx, \rx, #0x00002000 @ UART 2
34#endif
35#ifdef CONFIG_OMAP_LL_DEBUG_UART3
36 add \rx, \rx, #0x00004000 @ UART 3
37#endif
38#endif
39 .endm
40
41 .macro senduart,rd,rx
42 strb \rd, [\rx]
43 .endm
44
45 .macro busyuart,rd,rx
461001: ldrb \rd, [\rx, #(0x5 << 2)] @ OMAP-1510 and friends
47 and \rd, \rd, #0x60
48 teq \rd, #0x60
49 beq 1002f
50 ldrb \rd, [\rx, #(0x5 << 0)] @ OMAP-730 only
51 and \rd, \rd, #0x60
52 teq \rd, #0x60
53 bne 1001b
541002:
55 .endm
56
57 .macro waituart,rd,rx
58 .endm
diff --git a/arch/arm/plat-omap/include/mach/dma.h b/arch/arm/plat-omap/include/mach/dma.h
new file mode 100644
index 000000000000..54fe9665b182
--- /dev/null
+++ b/arch/arm/plat-omap/include/mach/dma.h
@@ -0,0 +1,570 @@
1/*
2 * arch/arm/plat-omap/include/mach/dma.h
3 *
4 * Copyright (C) 2003 Nokia Corporation
5 * Author: Juha Yrjölä <juha.yrjola@nokia.com>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
21#ifndef __ASM_ARCH_DMA_H
22#define __ASM_ARCH_DMA_H
23
24/* Hardware registers for omap1 */
25#define OMAP1_DMA_BASE (0xfffed800)
26
27#define OMAP1_DMA_GCR 0x400
28#define OMAP1_DMA_GSCR 0x404
29#define OMAP1_DMA_GRST 0x408
30#define OMAP1_DMA_HW_ID 0x442
31#define OMAP1_DMA_PCH2_ID 0x444
32#define OMAP1_DMA_PCH0_ID 0x446
33#define OMAP1_DMA_PCH1_ID 0x448
34#define OMAP1_DMA_PCHG_ID 0x44a
35#define OMAP1_DMA_PCHD_ID 0x44c
36#define OMAP1_DMA_CAPS_0_U 0x44e
37#define OMAP1_DMA_CAPS_0_L 0x450
38#define OMAP1_DMA_CAPS_1_U 0x452
39#define OMAP1_DMA_CAPS_1_L 0x454
40#define OMAP1_DMA_CAPS_2 0x456
41#define OMAP1_DMA_CAPS_3 0x458
42#define OMAP1_DMA_CAPS_4 0x45a
43#define OMAP1_DMA_PCH2_SR 0x460
44#define OMAP1_DMA_PCH0_SR 0x480
45#define OMAP1_DMA_PCH1_SR 0x482
46#define OMAP1_DMA_PCHD_SR 0x4c0
47
48/* Hardware registers for omap2 and omap3 */
49#define OMAP24XX_DMA4_BASE (L4_24XX_BASE + 0x56000)
50#define OMAP34XX_DMA4_BASE (L4_34XX_BASE + 0x56000)
51
52#define OMAP_DMA4_REVISION 0x00
53#define OMAP_DMA4_GCR 0x78
54#define OMAP_DMA4_IRQSTATUS_L0 0x08
55#define OMAP_DMA4_IRQSTATUS_L1 0x0c
56#define OMAP_DMA4_IRQSTATUS_L2 0x10
57#define OMAP_DMA4_IRQSTATUS_L3 0x14
58#define OMAP_DMA4_IRQENABLE_L0 0x18
59#define OMAP_DMA4_IRQENABLE_L1 0x1c
60#define OMAP_DMA4_IRQENABLE_L2 0x20
61#define OMAP_DMA4_IRQENABLE_L3 0x24
62#define OMAP_DMA4_SYSSTATUS 0x28
63#define OMAP_DMA4_OCP_SYSCONFIG 0x2c
64#define OMAP_DMA4_CAPS_0 0x64
65#define OMAP_DMA4_CAPS_2 0x6c
66#define OMAP_DMA4_CAPS_3 0x70
67#define OMAP_DMA4_CAPS_4 0x74
68
69#define OMAP1_LOGICAL_DMA_CH_COUNT 17
70#define OMAP_DMA4_LOGICAL_DMA_CH_COUNT 32 /* REVISIT: Is this 32 + 2? */
71
72/* Common channel specific registers for omap1 */
73#define OMAP1_DMA_CH_BASE(n) (0x40 * (n) + 0x00)
74#define OMAP1_DMA_CSDP(n) (0x40 * (n) + 0x00)
75#define OMAP1_DMA_CCR(n) (0x40 * (n) + 0x02)
76#define OMAP1_DMA_CICR(n) (0x40 * (n) + 0x04)
77#define OMAP1_DMA_CSR(n) (0x40 * (n) + 0x06)
78#define OMAP1_DMA_CEN(n) (0x40 * (n) + 0x10)
79#define OMAP1_DMA_CFN(n) (0x40 * (n) + 0x12)
80#define OMAP1_DMA_CSFI(n) (0x40 * (n) + 0x14)
81#define OMAP1_DMA_CSEI(n) (0x40 * (n) + 0x16)
82#define OMAP1_DMA_CPC(n) (0x40 * (n) + 0x18) /* 15xx only */
83#define OMAP1_DMA_CSAC(n) (0x40 * (n) + 0x18)
84#define OMAP1_DMA_CDAC(n) (0x40 * (n) + 0x1a)
85#define OMAP1_DMA_CDEI(n) (0x40 * (n) + 0x1c)
86#define OMAP1_DMA_CDFI(n) (0x40 * (n) + 0x1e)
87#define OMAP1_DMA_CLNK_CTRL(n) (0x40 * (n) + 0x28)
88
89/* Common channel specific registers for omap2 */
90#define OMAP_DMA4_CH_BASE(n) (0x60 * (n) + 0x80)
91#define OMAP_DMA4_CCR(n) (0x60 * (n) + 0x80)
92#define OMAP_DMA4_CLNK_CTRL(n) (0x60 * (n) + 0x84)
93#define OMAP_DMA4_CICR(n) (0x60 * (n) + 0x88)
94#define OMAP_DMA4_CSR(n) (0x60 * (n) + 0x8c)
95#define OMAP_DMA4_CSDP(n) (0x60 * (n) + 0x90)
96#define OMAP_DMA4_CEN(n) (0x60 * (n) + 0x94)
97#define OMAP_DMA4_CFN(n) (0x60 * (n) + 0x98)
98#define OMAP_DMA4_CSEI(n) (0x60 * (n) + 0xa4)
99#define OMAP_DMA4_CSFI(n) (0x60 * (n) + 0xa8)
100#define OMAP_DMA4_CDEI(n) (0x60 * (n) + 0xac)
101#define OMAP_DMA4_CDFI(n) (0x60 * (n) + 0xb0)
102#define OMAP_DMA4_CSAC(n) (0x60 * (n) + 0xb4)
103#define OMAP_DMA4_CDAC(n) (0x60 * (n) + 0xb8)
104
105/* Channel specific registers only on omap1 */
106#define OMAP1_DMA_CSSA_L(n) (0x40 * (n) + 0x08)
107#define OMAP1_DMA_CSSA_U(n) (0x40 * (n) + 0x0a)
108#define OMAP1_DMA_CDSA_L(n) (0x40 * (n) + 0x0c)
109#define OMAP1_DMA_CDSA_U(n) (0x40 * (n) + 0x0e)
110#define OMAP1_DMA_COLOR_L(n) (0x40 * (n) + 0x20)
111#define OMAP1_DMA_COLOR_U(n) (0x40 * (n) + 0x22)
112#define OMAP1_DMA_CCR2(n) (0x40 * (n) + 0x24)
113#define OMAP1_DMA_LCH_CTRL(n) (0x40 * (n) + 0x2a) /* not on 15xx */
114#define OMAP1_DMA_CCEN(n) 0
115#define OMAP1_DMA_CCFN(n) 0
116
117/* Channel specific registers only on omap2 */
118#define OMAP_DMA4_CSSA(n) (0x60 * (n) + 0x9c)
119#define OMAP_DMA4_CDSA(n) (0x60 * (n) + 0xa0)
120#define OMAP_DMA4_CCEN(n) (0x60 * (n) + 0xbc)
121#define OMAP_DMA4_CCFN(n) (0x60 * (n) + 0xc0)
122#define OMAP_DMA4_COLOR(n) (0x60 * (n) + 0xc4)
123
124/* Dummy defines to keep multi-omap compiles happy */
125#define OMAP1_DMA_REVISION 0
126#define OMAP1_DMA_IRQSTATUS_L0 0
127#define OMAP1_DMA_IRQENABLE_L0 0
128#define OMAP1_DMA_OCP_SYSCONFIG 0
129#define OMAP_DMA4_HW_ID 0
130#define OMAP_DMA4_CAPS_0_L 0
131#define OMAP_DMA4_CAPS_0_U 0
132#define OMAP_DMA4_CAPS_1_L 0
133#define OMAP_DMA4_CAPS_1_U 0
134#define OMAP_DMA4_GSCR 0
135#define OMAP_DMA4_CPC(n) 0
136
137#define OMAP_DMA4_LCH_CTRL(n) 0
138#define OMAP_DMA4_COLOR_L(n) 0
139#define OMAP_DMA4_COLOR_U(n) 0
140#define OMAP_DMA4_CCR2(n) 0
141#define OMAP1_DMA_CSSA(n) 0
142#define OMAP1_DMA_CDSA(n) 0
143#define OMAP_DMA4_CSSA_L(n) 0
144#define OMAP_DMA4_CSSA_U(n) 0
145#define OMAP_DMA4_CDSA_L(n) 0
146#define OMAP_DMA4_CDSA_U(n) 0
147
148/*----------------------------------------------------------------------------*/
149
150/* DMA channels for omap1 */
151#define OMAP_DMA_NO_DEVICE 0
152#define OMAP_DMA_MCSI1_TX 1
153#define OMAP_DMA_MCSI1_RX 2
154#define OMAP_DMA_I2C_RX 3
155#define OMAP_DMA_I2C_TX 4
156#define OMAP_DMA_EXT_NDMA_REQ 5
157#define OMAP_DMA_EXT_NDMA_REQ2 6
158#define OMAP_DMA_UWIRE_TX 7
159#define OMAP_DMA_MCBSP1_TX 8
160#define OMAP_DMA_MCBSP1_RX 9
161#define OMAP_DMA_MCBSP3_TX 10
162#define OMAP_DMA_MCBSP3_RX 11
163#define OMAP_DMA_UART1_TX 12
164#define OMAP_DMA_UART1_RX 13
165#define OMAP_DMA_UART2_TX 14
166#define OMAP_DMA_UART2_RX 15
167#define OMAP_DMA_MCBSP2_TX 16
168#define OMAP_DMA_MCBSP2_RX 17
169#define OMAP_DMA_UART3_TX 18
170#define OMAP_DMA_UART3_RX 19
171#define OMAP_DMA_CAMERA_IF_RX 20
172#define OMAP_DMA_MMC_TX 21
173#define OMAP_DMA_MMC_RX 22
174#define OMAP_DMA_NAND 23
175#define OMAP_DMA_IRQ_LCD_LINE 24
176#define OMAP_DMA_MEMORY_STICK 25
177#define OMAP_DMA_USB_W2FC_RX0 26
178#define OMAP_DMA_USB_W2FC_RX1 27
179#define OMAP_DMA_USB_W2FC_RX2 28
180#define OMAP_DMA_USB_W2FC_TX0 29
181#define OMAP_DMA_USB_W2FC_TX1 30
182#define OMAP_DMA_USB_W2FC_TX2 31
183
184/* These are only for 1610 */
185#define OMAP_DMA_CRYPTO_DES_IN 32
186#define OMAP_DMA_SPI_TX 33
187#define OMAP_DMA_SPI_RX 34
188#define OMAP_DMA_CRYPTO_HASH 35
189#define OMAP_DMA_CCP_ATTN 36
190#define OMAP_DMA_CCP_FIFO_NOT_EMPTY 37
191#define OMAP_DMA_CMT_APE_TX_CHAN_0 38
192#define OMAP_DMA_CMT_APE_RV_CHAN_0 39
193#define OMAP_DMA_CMT_APE_TX_CHAN_1 40
194#define OMAP_DMA_CMT_APE_RV_CHAN_1 41
195#define OMAP_DMA_CMT_APE_TX_CHAN_2 42
196#define OMAP_DMA_CMT_APE_RV_CHAN_2 43
197#define OMAP_DMA_CMT_APE_TX_CHAN_3 44
198#define OMAP_DMA_CMT_APE_RV_CHAN_3 45
199#define OMAP_DMA_CMT_APE_TX_CHAN_4 46
200#define OMAP_DMA_CMT_APE_RV_CHAN_4 47
201#define OMAP_DMA_CMT_APE_TX_CHAN_5 48
202#define OMAP_DMA_CMT_APE_RV_CHAN_5 49
203#define OMAP_DMA_CMT_APE_TX_CHAN_6 50
204#define OMAP_DMA_CMT_APE_RV_CHAN_6 51
205#define OMAP_DMA_CMT_APE_TX_CHAN_7 52
206#define OMAP_DMA_CMT_APE_RV_CHAN_7 53
207#define OMAP_DMA_MMC2_TX 54
208#define OMAP_DMA_MMC2_RX 55
209#define OMAP_DMA_CRYPTO_DES_OUT 56
210
211/* DMA channels for 24xx */
212#define OMAP24XX_DMA_NO_DEVICE 0
213#define OMAP24XX_DMA_XTI_DMA 1 /* S_DMA_0 */
214#define OMAP24XX_DMA_EXT_DMAREQ0 2 /* S_DMA_1 */
215#define OMAP24XX_DMA_EXT_DMAREQ1 3 /* S_DMA_2 */
216#define OMAP24XX_DMA_GPMC 4 /* S_DMA_3 */
217#define OMAP24XX_DMA_GFX 5 /* S_DMA_4 */
218#define OMAP24XX_DMA_DSS 6 /* S_DMA_5 */
219#define OMAP242X_DMA_VLYNQ_TX 7 /* S_DMA_6 */
220#define OMAP24XX_DMA_EXT_DMAREQ2 7 /* S_DMA_6 */
221#define OMAP24XX_DMA_CWT 8 /* S_DMA_7 */
222#define OMAP24XX_DMA_AES_TX 9 /* S_DMA_8 */
223#define OMAP24XX_DMA_AES_RX 10 /* S_DMA_9 */
224#define OMAP24XX_DMA_DES_TX 11 /* S_DMA_10 */
225#define OMAP24XX_DMA_DES_RX 12 /* S_DMA_11 */
226#define OMAP24XX_DMA_SHA1MD5_RX 13 /* S_DMA_12 */
227#define OMAP34XX_DMA_SHA2MD5_RX 13 /* S_DMA_12 */
228#define OMAP242X_DMA_EXT_DMAREQ2 14 /* S_DMA_13 */
229#define OMAP242X_DMA_EXT_DMAREQ3 15 /* S_DMA_14 */
230#define OMAP242X_DMA_EXT_DMAREQ4 16 /* S_DMA_15 */
231#define OMAP242X_DMA_EAC_AC_RD 17 /* S_DMA_16 */
232#define OMAP242X_DMA_EAC_AC_WR 18 /* S_DMA_17 */
233#define OMAP242X_DMA_EAC_MD_UL_RD 19 /* S_DMA_18 */
234#define OMAP242X_DMA_EAC_MD_UL_WR 20 /* S_DMA_19 */
235#define OMAP242X_DMA_EAC_MD_DL_RD 21 /* S_DMA_20 */
236#define OMAP242X_DMA_EAC_MD_DL_WR 22 /* S_DMA_21 */
237#define OMAP242X_DMA_EAC_BT_UL_RD 23 /* S_DMA_22 */
238#define OMAP242X_DMA_EAC_BT_UL_WR 24 /* S_DMA_23 */
239#define OMAP242X_DMA_EAC_BT_DL_RD 25 /* S_DMA_24 */
240#define OMAP242X_DMA_EAC_BT_DL_WR 26 /* S_DMA_25 */
241#define OMAP243X_DMA_EXT_DMAREQ3 14 /* S_DMA_13 */
242#define OMAP24XX_DMA_SPI3_TX0 15 /* S_DMA_14 */
243#define OMAP24XX_DMA_SPI3_RX0 16 /* S_DMA_15 */
244#define OMAP24XX_DMA_MCBSP3_TX 17 /* S_DMA_16 */
245#define OMAP24XX_DMA_MCBSP3_RX 18 /* S_DMA_17 */
246#define OMAP24XX_DMA_MCBSP4_TX 19 /* S_DMA_18 */
247#define OMAP24XX_DMA_MCBSP4_RX 20 /* S_DMA_19 */
248#define OMAP24XX_DMA_MCBSP5_TX 21 /* S_DMA_20 */
249#define OMAP24XX_DMA_MCBSP5_RX 22 /* S_DMA_21 */
250#define OMAP24XX_DMA_SPI3_TX1 23 /* S_DMA_22 */
251#define OMAP24XX_DMA_SPI3_RX1 24 /* S_DMA_23 */
252#define OMAP243X_DMA_EXT_DMAREQ4 25 /* S_DMA_24 */
253#define OMAP243X_DMA_EXT_DMAREQ5 26 /* S_DMA_25 */
254#define OMAP34XX_DMA_I2C3_TX 25 /* S_DMA_24 */
255#define OMAP34XX_DMA_I2C3_RX 26 /* S_DMA_25 */
256#define OMAP24XX_DMA_I2C1_TX 27 /* S_DMA_26 */
257#define OMAP24XX_DMA_I2C1_RX 28 /* S_DMA_27 */
258#define OMAP24XX_DMA_I2C2_TX 29 /* S_DMA_28 */
259#define OMAP24XX_DMA_I2C2_RX 30 /* S_DMA_29 */
260#define OMAP24XX_DMA_MCBSP1_TX 31 /* S_DMA_30 */
261#define OMAP24XX_DMA_MCBSP1_RX 32 /* S_DMA_31 */
262#define OMAP24XX_DMA_MCBSP2_TX 33 /* S_DMA_32 */
263#define OMAP24XX_DMA_MCBSP2_RX 34 /* S_DMA_33 */
264#define OMAP24XX_DMA_SPI1_TX0 35 /* S_DMA_34 */
265#define OMAP24XX_DMA_SPI1_RX0 36 /* S_DMA_35 */
266#define OMAP24XX_DMA_SPI1_TX1 37 /* S_DMA_36 */
267#define OMAP24XX_DMA_SPI1_RX1 38 /* S_DMA_37 */
268#define OMAP24XX_DMA_SPI1_TX2 39 /* S_DMA_38 */
269#define OMAP24XX_DMA_SPI1_RX2 40 /* S_DMA_39 */
270#define OMAP24XX_DMA_SPI1_TX3 41 /* S_DMA_40 */
271#define OMAP24XX_DMA_SPI1_RX3 42 /* S_DMA_41 */
272#define OMAP24XX_DMA_SPI2_TX0 43 /* S_DMA_42 */
273#define OMAP24XX_DMA_SPI2_RX0 44 /* S_DMA_43 */
274#define OMAP24XX_DMA_SPI2_TX1 45 /* S_DMA_44 */
275#define OMAP24XX_DMA_SPI2_RX1 46 /* S_DMA_45 */
276#define OMAP24XX_DMA_MMC2_TX 47 /* S_DMA_46 */
277#define OMAP24XX_DMA_MMC2_RX 48 /* S_DMA_47 */
278#define OMAP24XX_DMA_UART1_TX 49 /* S_DMA_48 */
279#define OMAP24XX_DMA_UART1_RX 50 /* S_DMA_49 */
280#define OMAP24XX_DMA_UART2_TX 51 /* S_DMA_50 */
281#define OMAP24XX_DMA_UART2_RX 52 /* S_DMA_51 */
282#define OMAP24XX_DMA_UART3_TX 53 /* S_DMA_52 */
283#define OMAP24XX_DMA_UART3_RX 54 /* S_DMA_53 */
284#define OMAP24XX_DMA_USB_W2FC_TX0 55 /* S_DMA_54 */
285#define OMAP24XX_DMA_USB_W2FC_RX0 56 /* S_DMA_55 */
286#define OMAP24XX_DMA_USB_W2FC_TX1 57 /* S_DMA_56 */
287#define OMAP24XX_DMA_USB_W2FC_RX1 58 /* S_DMA_57 */
288#define OMAP24XX_DMA_USB_W2FC_TX2 59 /* S_DMA_58 */
289#define OMAP24XX_DMA_USB_W2FC_RX2 60 /* S_DMA_59 */
290#define OMAP24XX_DMA_MMC1_TX 61 /* S_DMA_60 */
291#define OMAP24XX_DMA_MMC1_RX 62 /* S_DMA_61 */
292#define OMAP24XX_DMA_MS 63 /* S_DMA_62 */
293#define OMAP242X_DMA_EXT_DMAREQ5 64 /* S_DMA_63 */
294#define OMAP243X_DMA_EXT_DMAREQ6 64 /* S_DMA_63 */
295#define OMAP34XX_DMA_EXT_DMAREQ3 64 /* S_DMA_63 */
296#define OMAP34XX_DMA_AES2_TX 65 /* S_DMA_64 */
297#define OMAP34XX_DMA_AES2_RX 66 /* S_DMA_65 */
298#define OMAP34XX_DMA_DES2_TX 67 /* S_DMA_66 */
299#define OMAP34XX_DMA_DES2_RX 68 /* S_DMA_67 */
300#define OMAP34XX_DMA_SHA1MD5_RX 69 /* S_DMA_68 */
301#define OMAP34XX_DMA_SPI4_TX0 70 /* S_DMA_69 */
302#define OMAP34XX_DMA_SPI4_RX0 71 /* S_DMA_70 */
303#define OMAP34XX_DSS_DMA0 72 /* S_DMA_71 */
304#define OMAP34XX_DSS_DMA1 73 /* S_DMA_72 */
305#define OMAP34XX_DSS_DMA2 74 /* S_DMA_73 */
306#define OMAP34XX_DSS_DMA3 75 /* S_DMA_74 */
307#define OMAP34XX_DMA_MMC3_TX 77 /* S_DMA_76 */
308#define OMAP34XX_DMA_MMC3_RX 78 /* S_DMA_77 */
309#define OMAP34XX_DMA_USIM_TX 79 /* S_DMA_78 */
310#define OMAP34XX_DMA_USIM_RX 80 /* S_DMA_79 */
311
312/*----------------------------------------------------------------------------*/
313
314/* Hardware registers for LCD DMA */
315#define OMAP1510_DMA_LCD_BASE (0xfffedb00)
316#define OMAP1510_DMA_LCD_CTRL (OMAP1510_DMA_LCD_BASE + 0x00)
317#define OMAP1510_DMA_LCD_TOP_F1_L (OMAP1510_DMA_LCD_BASE + 0x02)
318#define OMAP1510_DMA_LCD_TOP_F1_U (OMAP1510_DMA_LCD_BASE + 0x04)
319#define OMAP1510_DMA_LCD_BOT_F1_L (OMAP1510_DMA_LCD_BASE + 0x06)
320#define OMAP1510_DMA_LCD_BOT_F1_U (OMAP1510_DMA_LCD_BASE + 0x08)
321
322#define OMAP1610_DMA_LCD_BASE (0xfffee300)
323#define OMAP1610_DMA_LCD_CSDP (OMAP1610_DMA_LCD_BASE + 0xc0)
324#define OMAP1610_DMA_LCD_CCR (OMAP1610_DMA_LCD_BASE + 0xc2)
325#define OMAP1610_DMA_LCD_CTRL (OMAP1610_DMA_LCD_BASE + 0xc4)
326#define OMAP1610_DMA_LCD_TOP_B1_L (OMAP1610_DMA_LCD_BASE + 0xc8)
327#define OMAP1610_DMA_LCD_TOP_B1_U (OMAP1610_DMA_LCD_BASE + 0xca)
328#define OMAP1610_DMA_LCD_BOT_B1_L (OMAP1610_DMA_LCD_BASE + 0xcc)
329#define OMAP1610_DMA_LCD_BOT_B1_U (OMAP1610_DMA_LCD_BASE + 0xce)
330#define OMAP1610_DMA_LCD_TOP_B2_L (OMAP1610_DMA_LCD_BASE + 0xd0)
331#define OMAP1610_DMA_LCD_TOP_B2_U (OMAP1610_DMA_LCD_BASE + 0xd2)
332#define OMAP1610_DMA_LCD_BOT_B2_L (OMAP1610_DMA_LCD_BASE + 0xd4)
333#define OMAP1610_DMA_LCD_BOT_B2_U (OMAP1610_DMA_LCD_BASE + 0xd6)
334#define OMAP1610_DMA_LCD_SRC_EI_B1 (OMAP1610_DMA_LCD_BASE + 0xd8)
335#define OMAP1610_DMA_LCD_SRC_FI_B1_L (OMAP1610_DMA_LCD_BASE + 0xda)
336#define OMAP1610_DMA_LCD_SRC_EN_B1 (OMAP1610_DMA_LCD_BASE + 0xe0)
337#define OMAP1610_DMA_LCD_SRC_FN_B1 (OMAP1610_DMA_LCD_BASE + 0xe4)
338#define OMAP1610_DMA_LCD_LCH_CTRL (OMAP1610_DMA_LCD_BASE + 0xea)
339#define OMAP1610_DMA_LCD_SRC_FI_B1_U (OMAP1610_DMA_LCD_BASE + 0xf4)
340
341#define OMAP1_DMA_TOUT_IRQ (1 << 0)
342#define OMAP_DMA_DROP_IRQ (1 << 1)
343#define OMAP_DMA_HALF_IRQ (1 << 2)
344#define OMAP_DMA_FRAME_IRQ (1 << 3)
345#define OMAP_DMA_LAST_IRQ (1 << 4)
346#define OMAP_DMA_BLOCK_IRQ (1 << 5)
347#define OMAP1_DMA_SYNC_IRQ (1 << 6)
348#define OMAP2_DMA_PKT_IRQ (1 << 7)
349#define OMAP2_DMA_TRANS_ERR_IRQ (1 << 8)
350#define OMAP2_DMA_SECURE_ERR_IRQ (1 << 9)
351#define OMAP2_DMA_SUPERVISOR_ERR_IRQ (1 << 10)
352#define OMAP2_DMA_MISALIGNED_ERR_IRQ (1 << 11)
353
354#define OMAP_DMA_DATA_TYPE_S8 0x00
355#define OMAP_DMA_DATA_TYPE_S16 0x01
356#define OMAP_DMA_DATA_TYPE_S32 0x02
357
358#define OMAP_DMA_SYNC_ELEMENT 0x00
359#define OMAP_DMA_SYNC_FRAME 0x01
360#define OMAP_DMA_SYNC_BLOCK 0x02
361#define OMAP_DMA_SYNC_PACKET 0x03
362
363#define OMAP_DMA_SRC_SYNC 0x01
364#define OMAP_DMA_DST_SYNC 0x00
365
366#define OMAP_DMA_PORT_EMIFF 0x00
367#define OMAP_DMA_PORT_EMIFS 0x01
368#define OMAP_DMA_PORT_OCP_T1 0x02
369#define OMAP_DMA_PORT_TIPB 0x03
370#define OMAP_DMA_PORT_OCP_T2 0x04
371#define OMAP_DMA_PORT_MPUI 0x05
372
373#define OMAP_DMA_AMODE_CONSTANT 0x00
374#define OMAP_DMA_AMODE_POST_INC 0x01
375#define OMAP_DMA_AMODE_SINGLE_IDX 0x02
376#define OMAP_DMA_AMODE_DOUBLE_IDX 0x03
377
378#define DMA_DEFAULT_FIFO_DEPTH 0x10
379#define DMA_DEFAULT_ARB_RATE 0x01
380/* Pass THREAD_RESERVE ORed with THREAD_FIFO for tparams */
381#define DMA_THREAD_RESERVE_NORM (0x00 << 12) /* Def */
382#define DMA_THREAD_RESERVE_ONET (0x01 << 12)
383#define DMA_THREAD_RESERVE_TWOT (0x02 << 12)
384#define DMA_THREAD_RESERVE_THREET (0x03 << 12)
385#define DMA_THREAD_FIFO_NONE (0x00 << 14) /* Def */
386#define DMA_THREAD_FIFO_75 (0x01 << 14)
387#define DMA_THREAD_FIFO_25 (0x02 << 14)
388#define DMA_THREAD_FIFO_50 (0x03 << 14)
389
390/* Chaining modes*/
391#ifndef CONFIG_ARCH_OMAP1
392#define OMAP_DMA_STATIC_CHAIN 0x1
393#define OMAP_DMA_DYNAMIC_CHAIN 0x2
394#define OMAP_DMA_CHAIN_ACTIVE 0x1
395#define OMAP_DMA_CHAIN_INACTIVE 0x0
396#endif
397
398#define DMA_CH_PRIO_HIGH 0x1
399#define DMA_CH_PRIO_LOW 0x0 /* Def */
400
401/* LCD DMA block numbers */
402enum {
403 OMAP_LCD_DMA_B1_TOP,
404 OMAP_LCD_DMA_B1_BOTTOM,
405 OMAP_LCD_DMA_B2_TOP,
406 OMAP_LCD_DMA_B2_BOTTOM
407};
408
409enum omap_dma_burst_mode {
410 OMAP_DMA_DATA_BURST_DIS = 0,
411 OMAP_DMA_DATA_BURST_4,
412 OMAP_DMA_DATA_BURST_8,
413 OMAP_DMA_DATA_BURST_16,
414};
415
416enum end_type {
417 OMAP_DMA_LITTLE_ENDIAN = 0,
418 OMAP_DMA_BIG_ENDIAN
419};
420
421enum omap_dma_color_mode {
422 OMAP_DMA_COLOR_DIS = 0,
423 OMAP_DMA_CONSTANT_FILL,
424 OMAP_DMA_TRANSPARENT_COPY
425};
426
427enum omap_dma_write_mode {
428 OMAP_DMA_WRITE_NON_POSTED = 0,
429 OMAP_DMA_WRITE_POSTED,
430 OMAP_DMA_WRITE_LAST_NON_POSTED
431};
432
433enum omap_dma_channel_mode {
434 OMAP_DMA_LCH_2D = 0,
435 OMAP_DMA_LCH_G,
436 OMAP_DMA_LCH_P,
437 OMAP_DMA_LCH_PD
438};
439
440struct omap_dma_channel_params {
441 int data_type; /* data type 8,16,32 */
442 int elem_count; /* number of elements in a frame */
443 int frame_count; /* number of frames in a element */
444
445 int src_port; /* Only on OMAP1 REVISIT: Is this needed? */
446 int src_amode; /* constant, post increment, indexed,
447 double indexed */
448 unsigned long src_start; /* source address : physical */
449 int src_ei; /* source element index */
450 int src_fi; /* source frame index */
451
452 int dst_port; /* Only on OMAP1 REVISIT: Is this needed? */
453 int dst_amode; /* constant, post increment, indexed,
454 double indexed */
455 unsigned long dst_start; /* source address : physical */
456 int dst_ei; /* source element index */
457 int dst_fi; /* source frame index */
458
459 int trigger; /* trigger attached if the channel is
460 synchronized */
461 int sync_mode; /* sycn on element, frame , block or packet */
462 int src_or_dst_synch; /* source synch(1) or destination synch(0) */
463
464 int ie; /* interrupt enabled */
465
466 unsigned char read_prio;/* read priority */
467 unsigned char write_prio;/* write priority */
468
469#ifndef CONFIG_ARCH_OMAP1
470 enum omap_dma_burst_mode burst_mode; /* Burst mode 4/8/16 words */
471#endif
472};
473
474
475extern void omap_set_dma_priority(int lch, int dst_port, int priority);
476extern int omap_request_dma(int dev_id, const char *dev_name,
477 void (*callback)(int lch, u16 ch_status, void *data),
478 void *data, int *dma_ch);
479extern void omap_enable_dma_irq(int ch, u16 irq_bits);
480extern void omap_disable_dma_irq(int ch, u16 irq_bits);
481extern void omap_free_dma(int ch);
482extern void omap_start_dma(int lch);
483extern void omap_stop_dma(int lch);
484extern void omap_set_dma_transfer_params(int lch, int data_type,
485 int elem_count, int frame_count,
486 int sync_mode,
487 int dma_trigger, int src_or_dst_synch);
488extern void omap_set_dma_color_mode(int lch, enum omap_dma_color_mode mode,
489 u32 color);
490extern void omap_set_dma_write_mode(int lch, enum omap_dma_write_mode mode);
491extern void omap_set_dma_channel_mode(int lch, enum omap_dma_channel_mode mode);
492
493extern void omap_set_dma_src_params(int lch, int src_port, int src_amode,
494 unsigned long src_start,
495 int src_ei, int src_fi);
496extern void omap_set_dma_src_index(int lch, int eidx, int fidx);
497extern void omap_set_dma_src_data_pack(int lch, int enable);
498extern void omap_set_dma_src_burst_mode(int lch,
499 enum omap_dma_burst_mode burst_mode);
500
501extern void omap_set_dma_dest_params(int lch, int dest_port, int dest_amode,
502 unsigned long dest_start,
503 int dst_ei, int dst_fi);
504extern void omap_set_dma_dest_index(int lch, int eidx, int fidx);
505extern void omap_set_dma_dest_data_pack(int lch, int enable);
506extern void omap_set_dma_dest_burst_mode(int lch,
507 enum omap_dma_burst_mode burst_mode);
508
509extern void omap_set_dma_params(int lch,
510 struct omap_dma_channel_params *params);
511
512extern void omap_dma_link_lch(int lch_head, int lch_queue);
513extern void omap_dma_unlink_lch(int lch_head, int lch_queue);
514
515extern int omap_set_dma_callback(int lch,
516 void (*callback)(int lch, u16 ch_status, void *data),
517 void *data);
518extern dma_addr_t omap_get_dma_src_pos(int lch);
519extern dma_addr_t omap_get_dma_dst_pos(int lch);
520extern void omap_clear_dma(int lch);
521extern int omap_get_dma_active_status(int lch);
522extern int omap_dma_running(void);
523extern void omap_dma_set_global_params(int arb_rate, int max_fifo_depth,
524 int tparams);
525extern int omap_dma_set_prio_lch(int lch, unsigned char read_prio,
526 unsigned char write_prio);
527extern void omap_set_dma_dst_endian_type(int lch, enum end_type etype);
528extern void omap_set_dma_src_endian_type(int lch, enum end_type etype);
529extern int omap_get_dma_index(int lch, int *ei, int *fi);
530
531/* Chaining APIs */
532#ifndef CONFIG_ARCH_OMAP1
533extern int omap_request_dma_chain(int dev_id, const char *dev_name,
534 void (*callback) (int chain_id, u16 ch_status,
535 void *data),
536 int *chain_id, int no_of_chans,
537 int chain_mode,
538 struct omap_dma_channel_params params);
539extern int omap_free_dma_chain(int chain_id);
540extern int omap_dma_chain_a_transfer(int chain_id, int src_start,
541 int dest_start, int elem_count,
542 int frame_count, void *callbk_data);
543extern int omap_start_dma_chain_transfers(int chain_id);
544extern int omap_stop_dma_chain_transfers(int chain_id);
545extern int omap_get_dma_chain_index(int chain_id, int *ei, int *fi);
546extern int omap_get_dma_chain_dst_pos(int chain_id);
547extern int omap_get_dma_chain_src_pos(int chain_id);
548
549extern int omap_modify_dma_chain_params(int chain_id,
550 struct omap_dma_channel_params params);
551extern int omap_dma_chain_status(int chain_id);
552#endif
553
554/* LCD DMA functions */
555extern int omap_request_lcd_dma(void (*callback)(u16 status, void *data),
556 void *data);
557extern void omap_free_lcd_dma(void);
558extern void omap_setup_lcd_dma(void);
559extern void omap_enable_lcd_dma(void);
560extern void omap_stop_lcd_dma(void);
561extern void omap_set_lcd_dma_ext_controller(int external);
562extern void omap_set_lcd_dma_single_transfer(int single);
563extern void omap_set_lcd_dma_b1(unsigned long addr, u16 fb_xres, u16 fb_yres,
564 int data_type);
565extern void omap_set_lcd_dma_b1_rotation(int rotate);
566extern void omap_set_lcd_dma_b1_vxres(unsigned long vxres);
567extern void omap_set_lcd_dma_b1_mirror(int mirror);
568extern void omap_set_lcd_dma_b1_scale(unsigned int xscale, unsigned int yscale);
569
570#endif /* __ASM_ARCH_DMA_H */
diff --git a/arch/arm/plat-omap/include/mach/dmtimer.h b/arch/arm/plat-omap/include/mach/dmtimer.h
new file mode 100644
index 000000000000..6dc703138210
--- /dev/null
+++ b/arch/arm/plat-omap/include/mach/dmtimer.h
@@ -0,0 +1,84 @@
1/*
2 * arch/arm/plat-omap/include/mach/dmtimer.h
3 *
4 * OMAP Dual-Mode Timers
5 *
6 * Copyright (C) 2005 Nokia Corporation
7 * Author: Lauri Leukkunen <lauri.leukkunen@nokia.com>
8 * PWM and clock framwork support by Timo Teras.
9 *
10 * This program is free software; you can redistribute it and/or modify it
11 * under the terms of the GNU General Public License as published by the
12 * Free Software Foundation; either version 2 of the License, or (at your
13 * option) any later version.
14 *
15 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
16 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
17 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
18 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23 *
24 * You should have received a copy of the GNU General Public License along
25 * with this program; if not, write to the Free Software Foundation, Inc.,
26 * 675 Mass Ave, Cambridge, MA 02139, USA.
27 */
28
29#ifndef __ASM_ARCH_DMTIMER_H
30#define __ASM_ARCH_DMTIMER_H
31
32/* clock sources */
33#define OMAP_TIMER_SRC_SYS_CLK 0x00
34#define OMAP_TIMER_SRC_32_KHZ 0x01
35#define OMAP_TIMER_SRC_EXT_CLK 0x02
36
37/* timer interrupt enable bits */
38#define OMAP_TIMER_INT_CAPTURE (1 << 2)
39#define OMAP_TIMER_INT_OVERFLOW (1 << 1)
40#define OMAP_TIMER_INT_MATCH (1 << 0)
41
42/* trigger types */
43#define OMAP_TIMER_TRIGGER_NONE 0x00
44#define OMAP_TIMER_TRIGGER_OVERFLOW 0x01
45#define OMAP_TIMER_TRIGGER_OVERFLOW_AND_COMPARE 0x02
46
47struct omap_dm_timer;
48struct clk;
49
50int omap_dm_timer_init(void);
51
52struct omap_dm_timer *omap_dm_timer_request(void);
53struct omap_dm_timer *omap_dm_timer_request_specific(int timer_id);
54void omap_dm_timer_free(struct omap_dm_timer *timer);
55void omap_dm_timer_enable(struct omap_dm_timer *timer);
56void omap_dm_timer_disable(struct omap_dm_timer *timer);
57
58int omap_dm_timer_get_irq(struct omap_dm_timer *timer);
59
60u32 omap_dm_timer_modify_idlect_mask(u32 inputmask);
61struct clk *omap_dm_timer_get_fclk(struct omap_dm_timer *timer);
62
63void omap_dm_timer_trigger(struct omap_dm_timer *timer);
64void omap_dm_timer_start(struct omap_dm_timer *timer);
65void omap_dm_timer_stop(struct omap_dm_timer *timer);
66
67void omap_dm_timer_set_source(struct omap_dm_timer *timer, int source);
68void omap_dm_timer_set_load(struct omap_dm_timer *timer, int autoreload, unsigned int value);
69void omap_dm_timer_set_load_start(struct omap_dm_timer *timer, int autoreload, unsigned int value);
70void omap_dm_timer_set_match(struct omap_dm_timer *timer, int enable, unsigned int match);
71void omap_dm_timer_set_pwm(struct omap_dm_timer *timer, int def_on, int toggle, int trigger);
72void omap_dm_timer_set_prescaler(struct omap_dm_timer *timer, int prescaler);
73
74void omap_dm_timer_set_int_enable(struct omap_dm_timer *timer, unsigned int value);
75
76unsigned int omap_dm_timer_read_status(struct omap_dm_timer *timer);
77void omap_dm_timer_write_status(struct omap_dm_timer *timer, unsigned int value);
78unsigned int omap_dm_timer_read_counter(struct omap_dm_timer *timer);
79void omap_dm_timer_write_counter(struct omap_dm_timer *timer, unsigned int value);
80
81int omap_dm_timers_active(void);
82
83
84#endif /* __ASM_ARCH_DMTIMER_H */
diff --git a/include/asm-arm/arch-omap/dsp_common.h b/arch/arm/plat-omap/include/mach/dsp_common.h
index da97736f3efa..da97736f3efa 100644
--- a/include/asm-arm/arch-omap/dsp_common.h
+++ b/arch/arm/plat-omap/include/mach/dsp_common.h
diff --git a/arch/arm/plat-omap/include/mach/eac.h b/arch/arm/plat-omap/include/mach/eac.h
new file mode 100644
index 000000000000..9e62cf030270
--- /dev/null
+++ b/arch/arm/plat-omap/include/mach/eac.h
@@ -0,0 +1,100 @@
1/*
2 * arch/arm/plat-omap/include/mach2/eac.h
3 *
4 * Defines for Enhanced Audio Controller
5 *
6 * Contact: Jarkko Nikula <jarkko.nikula@nokia.com>
7 *
8 * Copyright (C) 2006 Nokia Corporation
9 * Copyright (C) 2004 Texas Instruments, Inc.
10 *
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License
13 * version 2 as published by the Free Software Foundation.
14 *
15 * This program is distributed in the hope that it will be useful, but
16 * WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
23 * 02110-1301 USA
24 *
25 */
26
27#ifndef __ASM_ARM_ARCH_OMAP2_EAC_H
28#define __ASM_ARM_ARCH_OMAP2_EAC_H
29
30#include <mach/io.h>
31#include <mach/hardware.h>
32#include <asm/irq.h>
33
34#include <sound/core.h>
35
36/* master codec clock source */
37#define EAC_MCLK_EXT_MASK 0x100
38enum eac_mclk_src {
39 EAC_MCLK_INT_11290000, /* internal 96 MHz / 8.5 = 11.29 Mhz */
40 EAC_MCLK_EXT_11289600 = EAC_MCLK_EXT_MASK,
41 EAC_MCLK_EXT_12288000,
42 EAC_MCLK_EXT_2x11289600,
43 EAC_MCLK_EXT_2x12288000,
44};
45
46/* codec port interface mode */
47enum eac_codec_mode {
48 EAC_CODEC_PCM,
49 EAC_CODEC_AC97,
50 EAC_CODEC_I2S_MASTER, /* codec port, I.e. EAC is the master */
51 EAC_CODEC_I2S_SLAVE,
52};
53
54/* configuration structure for I2S mode */
55struct eac_i2s_conf {
56 /* if enabled, then first data slot (left channel) is signaled as
57 * positive level of frame sync EAC.AC_FS */
58 unsigned polarity_changed_mode:1;
59 /* if enabled, then serial data starts one clock cycle after the
60 * of EAC.AC_FS for first audio slot */
61 unsigned sync_delay_enable:1;
62};
63
64/* configuration structure for EAC codec port */
65struct eac_codec {
66 enum eac_mclk_src mclk_src;
67
68 enum eac_codec_mode codec_mode;
69 union {
70 struct eac_i2s_conf i2s;
71 } codec_conf;
72
73 int default_rate; /* audio sampling rate */
74
75 int (* set_power)(void *private_data, int dac, int adc);
76 int (* register_controls)(void *private_data,
77 struct snd_card *card);
78 const char *short_name;
79
80 void *private_data;
81};
82
83/* structure for passing platform dependent data to the EAC driver */
84struct eac_platform_data {
85 int (* init)(struct device *eac_dev);
86 void (* cleanup)(struct device *eac_dev);
87 /* these callbacks are used to configure & control external MCLK
88 * source. NULL if not used */
89 int (* enable_ext_clocks)(struct device *eac_dev);
90 void (* disable_ext_clocks)(struct device *eac_dev);
91};
92
93extern void omap_init_eac(struct eac_platform_data *pdata);
94
95extern int eac_register_codec(struct device *eac_dev, struct eac_codec *codec);
96extern void eac_unregister_codec(struct device *eac_dev);
97
98extern int eac_set_mode(struct device *eac_dev, int play, int rec);
99
100#endif /* __ASM_ARM_ARCH_OMAP2_EAC_H */
diff --git a/arch/arm/plat-omap/include/mach/entry-macro.S b/arch/arm/plat-omap/include/mach/entry-macro.S
new file mode 100644
index 000000000000..d4e9043bf201
--- /dev/null
+++ b/arch/arm/plat-omap/include/mach/entry-macro.S
@@ -0,0 +1,89 @@
1/*
2 * arch/arm/plat-omap/include/mach/entry-macro.S
3 *
4 * Low-level IRQ helper macros for OMAP-based platforms
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10#include <mach/hardware.h>
11#include <mach/io.h>
12#include <mach/irqs.h>
13
14#if defined(CONFIG_ARCH_OMAP1)
15
16#if defined(CONFIG_ARCH_OMAP730) && \
17 (defined(CONFIG_ARCH_OMAP15XX) || defined(CONFIG_ARCH_OMAP16XX))
18#error "FIXME: OMAP730 doesn't support multiple-OMAP"
19#elif defined(CONFIG_ARCH_OMAP730)
20#define INT_IH2_IRQ INT_730_IH2_IRQ
21#elif defined(CONFIG_ARCH_OMAP15XX)
22#define INT_IH2_IRQ INT_1510_IH2_IRQ
23#elif defined(CONFIG_ARCH_OMAP16XX)
24#define INT_IH2_IRQ INT_1610_IH2_IRQ
25#else
26#warning "IH2 IRQ defaulted"
27#define INT_IH2_IRQ INT_1510_IH2_IRQ
28#endif
29
30 .macro disable_fiq
31 .endm
32
33 .macro get_irqnr_preamble, base, tmp
34 .endm
35
36 .macro arch_ret_to_user, tmp1, tmp2
37 .endm
38
39 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
40 ldr \base, =IO_ADDRESS(OMAP_IH1_BASE)
41 ldr \irqnr, [\base, #IRQ_ITR_REG_OFFSET]
42 ldr \tmp, [\base, #IRQ_MIR_REG_OFFSET]
43 mov \irqstat, #0xffffffff
44 bic \tmp, \irqstat, \tmp
45 tst \irqnr, \tmp
46 beq 1510f
47
48 ldr \irqnr, [\base, #IRQ_SIR_FIQ_REG_OFFSET]
49 cmp \irqnr, #0
50 ldreq \irqnr, [\base, #IRQ_SIR_IRQ_REG_OFFSET]
51 cmpeq \irqnr, #INT_IH2_IRQ
52 ldreq \base, =IO_ADDRESS(OMAP_IH2_BASE)
53 ldreq \irqnr, [\base, #IRQ_SIR_IRQ_REG_OFFSET]
54 addeqs \irqnr, \irqnr, #32
551510:
56 .endm
57
58#elif defined(CONFIG_ARCH_OMAP24XX)
59
60#include <mach/omap24xx.h>
61
62 .macro disable_fiq
63 .endm
64
65 .macro get_irqnr_preamble, base, tmp
66 .endm
67
68 .macro arch_ret_to_user, tmp1, tmp2
69 .endm
70
71 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
72 ldr \base, =OMAP2_VA_IC_BASE
73 ldr \irqnr, [\base, #0x98] /* IRQ pending reg 1 */
74 cmp \irqnr, #0x0
75 bne 2222f
76 ldr \irqnr, [\base, #0xb8] /* IRQ pending reg 2 */
77 cmp \irqnr, #0x0
78 bne 2222f
79 ldr \irqnr, [\base, #0xd8] /* IRQ pending reg 3 */
80 cmp \irqnr, #0x0
812222:
82 ldrne \irqnr, [\base, #IRQ_SIR_IRQ]
83
84 .endm
85
86 .macro irq_prio_table
87 .endm
88
89#endif
diff --git a/arch/arm/plat-omap/include/mach/fpga.h b/arch/arm/plat-omap/include/mach/fpga.h
new file mode 100644
index 000000000000..c92e4b42b289
--- /dev/null
+++ b/arch/arm/plat-omap/include/mach/fpga.h
@@ -0,0 +1,197 @@
1/*
2 * arch/arm/plat-omap/include/mach/fpga.h
3 *
4 * Interrupt handler for OMAP-1510 FPGA
5 *
6 * Copyright (C) 2001 RidgeRun, Inc.
7 * Author: Greg Lonnon <glonnon@ridgerun.com>
8 *
9 * Copyright (C) 2002 MontaVista Software, Inc.
10 *
11 * Separated FPGA interrupts from innovator1510.c and cleaned up for 2.6
12 * Copyright (C) 2004 Nokia Corporation by Tony Lindrgen <tony@atomide.com>
13 *
14 * This program is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License version 2 as
16 * published by the Free Software Foundation.
17 */
18
19#ifndef __ASM_ARCH_OMAP_FPGA_H
20#define __ASM_ARCH_OMAP_FPGA_H
21
22#if defined(CONFIG_MACH_OMAP_INNOVATOR) && defined(CONFIG_ARCH_OMAP15XX)
23extern void omap1510_fpga_init_irq(void);
24#else
25#define omap1510_fpga_init_irq() (0)
26#endif
27
28#define fpga_read(reg) __raw_readb(reg)
29#define fpga_write(val, reg) __raw_writeb(val, reg)
30
31/*
32 * ---------------------------------------------------------------------------
33 * H2/P2 Debug board FPGA
34 * ---------------------------------------------------------------------------
35 */
36/* maps in the FPGA registers and the ETHR registers */
37#define H2P2_DBG_FPGA_BASE 0xE8000000 /* VA */
38#define H2P2_DBG_FPGA_SIZE SZ_4K /* SIZE */
39#define H2P2_DBG_FPGA_START 0x04000000 /* PA */
40
41#define H2P2_DBG_FPGA_ETHR_START (H2P2_DBG_FPGA_START + 0x300)
42#define H2P2_DBG_FPGA_FPGA_REV (H2P2_DBG_FPGA_BASE + 0x10) /* FPGA Revision */
43#define H2P2_DBG_FPGA_BOARD_REV (H2P2_DBG_FPGA_BASE + 0x12) /* Board Revision */
44#define H2P2_DBG_FPGA_GPIO (H2P2_DBG_FPGA_BASE + 0x14) /* GPIO outputs */
45#define H2P2_DBG_FPGA_LEDS (H2P2_DBG_FPGA_BASE + 0x16) /* LEDs outputs */
46#define H2P2_DBG_FPGA_MISC_INPUTS (H2P2_DBG_FPGA_BASE + 0x18) /* Misc inputs */
47#define H2P2_DBG_FPGA_LAN_STATUS (H2P2_DBG_FPGA_BASE + 0x1A) /* LAN Status line */
48#define H2P2_DBG_FPGA_LAN_RESET (H2P2_DBG_FPGA_BASE + 0x1C) /* LAN Reset line */
49
50/* NOTE: most boards don't have a static mapping for the FPGA ... */
51struct h2p2_dbg_fpga {
52 /* offset 0x00 */
53 u16 smc91x[8];
54 /* offset 0x10 */
55 u16 fpga_rev;
56 u16 board_rev;
57 u16 gpio_outputs;
58 u16 leds;
59 /* offset 0x18 */
60 u16 misc_inputs;
61 u16 lan_status;
62 u16 lan_reset;
63 u16 reserved0;
64 /* offset 0x20 */
65 u16 ps2_data;
66 u16 ps2_ctrl;
67 /* plus also 4 rs232 ports ... */
68};
69
70/* LEDs definition on debug board (16 LEDs, all physically green) */
71#define H2P2_DBG_FPGA_LED_GREEN (1 << 15)
72#define H2P2_DBG_FPGA_LED_AMBER (1 << 14)
73#define H2P2_DBG_FPGA_LED_RED (1 << 13)
74#define H2P2_DBG_FPGA_LED_BLUE (1 << 12)
75/* cpu0 load-meter LEDs */
76#define H2P2_DBG_FPGA_LOAD_METER (1 << 0) // A bit of fun on our board ...
77#define H2P2_DBG_FPGA_LOAD_METER_SIZE 11
78#define H2P2_DBG_FPGA_LOAD_METER_MASK ((1 << H2P2_DBG_FPGA_LOAD_METER_SIZE) - 1)
79
80#define H2P2_DBG_FPGA_P2_LED_TIMER (1 << 0)
81#define H2P2_DBG_FPGA_P2_LED_IDLE (1 << 1)
82
83/*
84 * ---------------------------------------------------------------------------
85 * OMAP-1510 FPGA
86 * ---------------------------------------------------------------------------
87 */
88#define OMAP1510_FPGA_BASE 0xE8000000 /* Virtual */
89#define OMAP1510_FPGA_SIZE SZ_4K
90#define OMAP1510_FPGA_START 0x08000000 /* Physical */
91
92/* Revision */
93#define OMAP1510_FPGA_REV_LOW (OMAP1510_FPGA_BASE + 0x0)
94#define OMAP1510_FPGA_REV_HIGH (OMAP1510_FPGA_BASE + 0x1)
95
96#define OMAP1510_FPGA_LCD_PANEL_CONTROL (OMAP1510_FPGA_BASE + 0x2)
97#define OMAP1510_FPGA_LED_DIGIT (OMAP1510_FPGA_BASE + 0x3)
98#define INNOVATOR_FPGA_HID_SPI (OMAP1510_FPGA_BASE + 0x4)
99#define OMAP1510_FPGA_POWER (OMAP1510_FPGA_BASE + 0x5)
100
101/* Interrupt status */
102#define OMAP1510_FPGA_ISR_LO (OMAP1510_FPGA_BASE + 0x6)
103#define OMAP1510_FPGA_ISR_HI (OMAP1510_FPGA_BASE + 0x7)
104
105/* Interrupt mask */
106#define OMAP1510_FPGA_IMR_LO (OMAP1510_FPGA_BASE + 0x8)
107#define OMAP1510_FPGA_IMR_HI (OMAP1510_FPGA_BASE + 0x9)
108
109/* Reset registers */
110#define OMAP1510_FPGA_HOST_RESET (OMAP1510_FPGA_BASE + 0xa)
111#define OMAP1510_FPGA_RST (OMAP1510_FPGA_BASE + 0xb)
112
113#define OMAP1510_FPGA_AUDIO (OMAP1510_FPGA_BASE + 0xc)
114#define OMAP1510_FPGA_DIP (OMAP1510_FPGA_BASE + 0xe)
115#define OMAP1510_FPGA_FPGA_IO (OMAP1510_FPGA_BASE + 0xf)
116#define OMAP1510_FPGA_UART1 (OMAP1510_FPGA_BASE + 0x14)
117#define OMAP1510_FPGA_UART2 (OMAP1510_FPGA_BASE + 0x15)
118#define OMAP1510_FPGA_OMAP1510_STATUS (OMAP1510_FPGA_BASE + 0x16)
119#define OMAP1510_FPGA_BOARD_REV (OMAP1510_FPGA_BASE + 0x18)
120#define OMAP1510P1_PPT_DATA (OMAP1510_FPGA_BASE + 0x100)
121#define OMAP1510P1_PPT_STATUS (OMAP1510_FPGA_BASE + 0x101)
122#define OMAP1510P1_PPT_CONTROL (OMAP1510_FPGA_BASE + 0x102)
123
124#define OMAP1510_FPGA_TOUCHSCREEN (OMAP1510_FPGA_BASE + 0x204)
125
126#define INNOVATOR_FPGA_INFO (OMAP1510_FPGA_BASE + 0x205)
127#define INNOVATOR_FPGA_LCD_BRIGHT_LO (OMAP1510_FPGA_BASE + 0x206)
128#define INNOVATOR_FPGA_LCD_BRIGHT_HI (OMAP1510_FPGA_BASE + 0x207)
129#define INNOVATOR_FPGA_LED_GRN_LO (OMAP1510_FPGA_BASE + 0x208)
130#define INNOVATOR_FPGA_LED_GRN_HI (OMAP1510_FPGA_BASE + 0x209)
131#define INNOVATOR_FPGA_LED_RED_LO (OMAP1510_FPGA_BASE + 0x20a)
132#define INNOVATOR_FPGA_LED_RED_HI (OMAP1510_FPGA_BASE + 0x20b)
133#define INNOVATOR_FPGA_CAM_USB_CONTROL (OMAP1510_FPGA_BASE + 0x20c)
134#define INNOVATOR_FPGA_EXP_CONTROL (OMAP1510_FPGA_BASE + 0x20d)
135#define INNOVATOR_FPGA_ISR2 (OMAP1510_FPGA_BASE + 0x20e)
136#define INNOVATOR_FPGA_IMR2 (OMAP1510_FPGA_BASE + 0x210)
137
138#define OMAP1510_FPGA_ETHR_START (OMAP1510_FPGA_START + 0x300)
139
140/*
141 * Power up Giga UART driver, turn on HID clock.
142 * Turn off BT power, since we're not using it and it
143 * draws power.
144 */
145#define OMAP1510_FPGA_RESET_VALUE 0x42
146
147#define OMAP1510_FPGA_PCR_IF_PD0 (1 << 7)
148#define OMAP1510_FPGA_PCR_COM2_EN (1 << 6)
149#define OMAP1510_FPGA_PCR_COM1_EN (1 << 5)
150#define OMAP1510_FPGA_PCR_EXP_PD0 (1 << 4)
151#define OMAP1510_FPGA_PCR_EXP_PD1 (1 << 3)
152#define OMAP1510_FPGA_PCR_48MHZ_CLK (1 << 2)
153#define OMAP1510_FPGA_PCR_4MHZ_CLK (1 << 1)
154#define OMAP1510_FPGA_PCR_RSRVD_BIT0 (1 << 0)
155
156/*
157 * Innovator/OMAP1510 FPGA HID register bit definitions
158 */
159#define OMAP1510_FPGA_HID_SCLK (1<<0) /* output */
160#define OMAP1510_FPGA_HID_MOSI (1<<1) /* output */
161#define OMAP1510_FPGA_HID_nSS (1<<2) /* output 0/1 chip idle/select */
162#define OMAP1510_FPGA_HID_nHSUS (1<<3) /* output 0/1 host active/suspended */
163#define OMAP1510_FPGA_HID_MISO (1<<4) /* input */
164#define OMAP1510_FPGA_HID_ATN (1<<5) /* input 0/1 chip idle/ATN */
165#define OMAP1510_FPGA_HID_rsrvd (1<<6)
166#define OMAP1510_FPGA_HID_RESETn (1<<7) /* output - 0/1 USAR reset/run */
167
168/* The FPGA IRQ is cascaded through GPIO_13 */
169#define OMAP1510_INT_FPGA (IH_GPIO_BASE + 13)
170
171/* IRQ Numbers for interrupts muxed through the FPGA */
172#define OMAP1510_INT_FPGA_ATN (OMAP_FPGA_IRQ_BASE + 0)
173#define OMAP1510_INT_FPGA_ACK (OMAP_FPGA_IRQ_BASE + 1)
174#define OMAP1510_INT_FPGA2 (OMAP_FPGA_IRQ_BASE + 2)
175#define OMAP1510_INT_FPGA3 (OMAP_FPGA_IRQ_BASE + 3)
176#define OMAP1510_INT_FPGA4 (OMAP_FPGA_IRQ_BASE + 4)
177#define OMAP1510_INT_FPGA5 (OMAP_FPGA_IRQ_BASE + 5)
178#define OMAP1510_INT_FPGA6 (OMAP_FPGA_IRQ_BASE + 6)
179#define OMAP1510_INT_FPGA7 (OMAP_FPGA_IRQ_BASE + 7)
180#define OMAP1510_INT_FPGA8 (OMAP_FPGA_IRQ_BASE + 8)
181#define OMAP1510_INT_FPGA9 (OMAP_FPGA_IRQ_BASE + 9)
182#define OMAP1510_INT_FPGA10 (OMAP_FPGA_IRQ_BASE + 10)
183#define OMAP1510_INT_FPGA11 (OMAP_FPGA_IRQ_BASE + 11)
184#define OMAP1510_INT_FPGA12 (OMAP_FPGA_IRQ_BASE + 12)
185#define OMAP1510_INT_ETHER (OMAP_FPGA_IRQ_BASE + 13)
186#define OMAP1510_INT_FPGAUART1 (OMAP_FPGA_IRQ_BASE + 14)
187#define OMAP1510_INT_FPGAUART2 (OMAP_FPGA_IRQ_BASE + 15)
188#define OMAP1510_INT_FPGA_TS (OMAP_FPGA_IRQ_BASE + 16)
189#define OMAP1510_INT_FPGA17 (OMAP_FPGA_IRQ_BASE + 17)
190#define OMAP1510_INT_FPGA_CAM (OMAP_FPGA_IRQ_BASE + 18)
191#define OMAP1510_INT_FPGA_RTC_A (OMAP_FPGA_IRQ_BASE + 19)
192#define OMAP1510_INT_FPGA_RTC_B (OMAP_FPGA_IRQ_BASE + 20)
193#define OMAP1510_INT_FPGA_CD (OMAP_FPGA_IRQ_BASE + 21)
194#define OMAP1510_INT_FPGA22 (OMAP_FPGA_IRQ_BASE + 22)
195#define OMAP1510_INT_FPGA23 (OMAP_FPGA_IRQ_BASE + 23)
196
197#endif
diff --git a/include/asm-arm/arch-omap/gpio-switch.h b/arch/arm/plat-omap/include/mach/gpio-switch.h
index 10da0e07c0cf..10da0e07c0cf 100644
--- a/include/asm-arm/arch-omap/gpio-switch.h
+++ b/arch/arm/plat-omap/include/mach/gpio-switch.h
diff --git a/arch/arm/plat-omap/include/mach/gpio.h b/arch/arm/plat-omap/include/mach/gpio.h
new file mode 100644
index 000000000000..94ce2780e8ee
--- /dev/null
+++ b/arch/arm/plat-omap/include/mach/gpio.h
@@ -0,0 +1,122 @@
1/*
2 * arch/arm/plat-omap/include/mach/gpio.h
3 *
4 * OMAP GPIO handling defines and functions
5 *
6 * Copyright (C) 2003-2005 Nokia Corporation
7 *
8 * Written by Juha Yrjölä <juha.yrjola@nokia.com>
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 *
24 */
25
26#ifndef __ASM_ARCH_OMAP_GPIO_H
27#define __ASM_ARCH_OMAP_GPIO_H
28
29#include <mach/irqs.h>
30#include <asm/io.h>
31
32#define OMAP_MPUIO_BASE (void __iomem *)0xfffb5000
33
34#ifdef CONFIG_ARCH_OMAP730
35#define OMAP_MPUIO_INPUT_LATCH 0x00
36#define OMAP_MPUIO_OUTPUT 0x02
37#define OMAP_MPUIO_IO_CNTL 0x04
38#define OMAP_MPUIO_KBR_LATCH 0x08
39#define OMAP_MPUIO_KBC 0x0a
40#define OMAP_MPUIO_GPIO_EVENT_MODE 0x0c
41#define OMAP_MPUIO_GPIO_INT_EDGE 0x0e
42#define OMAP_MPUIO_KBD_INT 0x10
43#define OMAP_MPUIO_GPIO_INT 0x12
44#define OMAP_MPUIO_KBD_MASKIT 0x14
45#define OMAP_MPUIO_GPIO_MASKIT 0x16
46#define OMAP_MPUIO_GPIO_DEBOUNCING 0x18
47#define OMAP_MPUIO_LATCH 0x1a
48#else
49#define OMAP_MPUIO_INPUT_LATCH 0x00
50#define OMAP_MPUIO_OUTPUT 0x04
51#define OMAP_MPUIO_IO_CNTL 0x08
52#define OMAP_MPUIO_KBR_LATCH 0x10
53#define OMAP_MPUIO_KBC 0x14
54#define OMAP_MPUIO_GPIO_EVENT_MODE 0x18
55#define OMAP_MPUIO_GPIO_INT_EDGE 0x1c
56#define OMAP_MPUIO_KBD_INT 0x20
57#define OMAP_MPUIO_GPIO_INT 0x24
58#define OMAP_MPUIO_KBD_MASKIT 0x28
59#define OMAP_MPUIO_GPIO_MASKIT 0x2c
60#define OMAP_MPUIO_GPIO_DEBOUNCING 0x30
61#define OMAP_MPUIO_LATCH 0x34
62#endif
63
64#define OMAP34XX_NR_GPIOS 6
65
66#define OMAP_MPUIO(nr) (OMAP_MAX_GPIO_LINES + (nr))
67#define OMAP_GPIO_IS_MPUIO(nr) ((nr) >= OMAP_MAX_GPIO_LINES)
68
69#define OMAP_GPIO_IRQ(nr) (OMAP_GPIO_IS_MPUIO(nr) ? \
70 IH_MPUIO_BASE + ((nr) & 0x0f) : \
71 IH_GPIO_BASE + (nr))
72
73extern int omap_gpio_init(void); /* Call from board init only */
74extern int omap_request_gpio(int gpio);
75extern void omap_free_gpio(int gpio);
76extern void omap_set_gpio_direction(int gpio, int is_input);
77extern void omap_set_gpio_dataout(int gpio, int enable);
78extern int omap_get_gpio_datain(int gpio);
79extern void omap_set_gpio_debounce(int gpio, int enable);
80extern void omap_set_gpio_debounce_time(int gpio, int enable);
81
82/*-------------------------------------------------------------------------*/
83
84/* Wrappers for "new style" GPIO calls, using the new infrastructure
85 * which lets us plug in FPGA, I2C, and other implementations.
86 * *
87 * The original OMAP-specfic calls should eventually be removed.
88 */
89
90#include <linux/errno.h>
91#include <asm-generic/gpio.h>
92
93static inline int gpio_get_value(unsigned gpio)
94{
95 return __gpio_get_value(gpio);
96}
97
98static inline void gpio_set_value(unsigned gpio, int value)
99{
100 __gpio_set_value(gpio, value);
101}
102
103static inline int gpio_cansleep(unsigned gpio)
104{
105 return __gpio_cansleep(gpio);
106}
107
108static inline int gpio_to_irq(unsigned gpio)
109{
110 if (gpio < (OMAP_MAX_GPIO_LINES + 16))
111 return OMAP_GPIO_IRQ(gpio);
112 return -EINVAL;
113}
114
115static inline int irq_to_gpio(unsigned irq)
116{
117 if (cpu_class_is_omap1() && (irq < (IH_MPUIO_BASE + 16)))
118 return (irq - IH_MPUIO_BASE) + OMAP_MAX_GPIO_LINES;
119 return irq - IH_GPIO_BASE;
120}
121
122#endif
diff --git a/arch/arm/plat-omap/include/mach/gpioexpander.h b/arch/arm/plat-omap/include/mach/gpioexpander.h
new file mode 100644
index 000000000000..90444a0d6b1a
--- /dev/null
+++ b/arch/arm/plat-omap/include/mach/gpioexpander.h
@@ -0,0 +1,35 @@
1/*
2 * arch/arm/plat-omap/include/mach/gpioexpander.h
3 *
4 *
5 * Copyright (C) 2004 Texas Instruments, Inc.
6 *
7 * This package is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 *
11 * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
12 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
13 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
14 */
15
16#ifndef __ASM_ARCH_OMAP_GPIOEXPANDER_H
17#define __ASM_ARCH_OMAP_GPIOEXPANDER_H
18
19/* Function Prototypes for GPIO Expander functions */
20
21#ifdef CONFIG_GPIOEXPANDER_OMAP
22int read_gpio_expa(u8 *, int);
23int write_gpio_expa(u8 , int);
24#else
25static inline int read_gpio_expa(u8 *val, int addr)
26{
27 return 0;
28}
29static inline int write_gpio_expa(u8 val, int addr)
30{
31 return 0;
32}
33#endif
34
35#endif /* __ASM_ARCH_OMAP_GPIOEXPANDER_H */
diff --git a/include/asm-arm/arch-omap/gpmc.h b/arch/arm/plat-omap/include/mach/gpmc.h
index 6a8e07ffc2d0..6a8e07ffc2d0 100644
--- a/include/asm-arm/arch-omap/gpmc.h
+++ b/arch/arm/plat-omap/include/mach/gpmc.h
diff --git a/arch/arm/plat-omap/include/mach/hardware.h b/arch/arm/plat-omap/include/mach/hardware.h
new file mode 100644
index 000000000000..07f5d7f21528
--- /dev/null
+++ b/arch/arm/plat-omap/include/mach/hardware.h
@@ -0,0 +1,355 @@
1/*
2 * arch/arm/plat-omap/include/mach/hardware.h
3 *
4 * Hardware definitions for TI OMAP processors and boards
5 *
6 * NOTE: Please put device driver specific defines into a separate header
7 * file for each driver.
8 *
9 * Copyright (C) 2001 RidgeRun, Inc.
10 * Author: RidgeRun, Inc. Greg Lonnon <glonnon@ridgerun.com>
11 *
12 * Reorganized for Linux-2.6 by Tony Lindgren <tony@atomide.com>
13 * and Dirk Behme <dirk.behme@de.bosch.com>
14 *
15 * This program is free software; you can redistribute it and/or modify it
16 * under the terms of the GNU General Public License as published by the
17 * Free Software Foundation; either version 2 of the License, or (at your
18 * option) any later version.
19 *
20 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
21 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
22 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
23 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
24 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
25 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
26 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
27 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
29 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 *
31 * You should have received a copy of the GNU General Public License along
32 * with this program; if not, write to the Free Software Foundation, Inc.,
33 * 675 Mass Ave, Cambridge, MA 02139, USA.
34 */
35
36#ifndef __ASM_ARCH_OMAP_HARDWARE_H
37#define __ASM_ARCH_OMAP_HARDWARE_H
38
39#include <asm/sizes.h>
40#ifndef __ASSEMBLER__
41#include <asm/types.h>
42#include <mach/cpu.h>
43#endif
44#include <mach/serial.h>
45
46/*
47 * ---------------------------------------------------------------------------
48 * Common definitions for all OMAP processors
49 * NOTE: Put all processor or board specific parts to the special header
50 * files.
51 * ---------------------------------------------------------------------------
52 */
53
54/*
55 * ----------------------------------------------------------------------------
56 * Timers
57 * ----------------------------------------------------------------------------
58 */
59#define OMAP_MPU_TIMER1_BASE (0xfffec500)
60#define OMAP_MPU_TIMER2_BASE (0xfffec600)
61#define OMAP_MPU_TIMER3_BASE (0xfffec700)
62#define MPU_TIMER_FREE (1 << 6)
63#define MPU_TIMER_CLOCK_ENABLE (1 << 5)
64#define MPU_TIMER_AR (1 << 1)
65#define MPU_TIMER_ST (1 << 0)
66
67/*
68 * ----------------------------------------------------------------------------
69 * Clocks
70 * ----------------------------------------------------------------------------
71 */
72#define CLKGEN_REG_BASE (0xfffece00)
73#define ARM_CKCTL (CLKGEN_REG_BASE + 0x0)
74#define ARM_IDLECT1 (CLKGEN_REG_BASE + 0x4)
75#define ARM_IDLECT2 (CLKGEN_REG_BASE + 0x8)
76#define ARM_EWUPCT (CLKGEN_REG_BASE + 0xC)
77#define ARM_RSTCT1 (CLKGEN_REG_BASE + 0x10)
78#define ARM_RSTCT2 (CLKGEN_REG_BASE + 0x14)
79#define ARM_SYSST (CLKGEN_REG_BASE + 0x18)
80#define ARM_IDLECT3 (CLKGEN_REG_BASE + 0x24)
81
82#define CK_RATEF 1
83#define CK_IDLEF 2
84#define CK_ENABLEF 4
85#define CK_SELECTF 8
86#define SETARM_IDLE_SHIFT
87
88/* DPLL control registers */
89#define DPLL_CTL (0xfffecf00)
90
91/* DSP clock control. Must use __raw_readw() and __raw_writew() with these */
92#define DSP_CONFIG_REG_BASE (0xe1008000)
93#define DSP_CKCTL (DSP_CONFIG_REG_BASE + 0x0)
94#define DSP_IDLECT1 (DSP_CONFIG_REG_BASE + 0x4)
95#define DSP_IDLECT2 (DSP_CONFIG_REG_BASE + 0x8)
96#define DSP_RSTCT2 (DSP_CONFIG_REG_BASE + 0x14)
97
98/*
99 * ---------------------------------------------------------------------------
100 * UPLD
101 * ---------------------------------------------------------------------------
102 */
103#define ULPD_REG_BASE (0xfffe0800)
104#define ULPD_IT_STATUS (ULPD_REG_BASE + 0x14)
105#define ULPD_SETUP_ANALOG_CELL_3 (ULPD_REG_BASE + 0x24)
106#define ULPD_CLOCK_CTRL (ULPD_REG_BASE + 0x30)
107# define DIS_USB_PVCI_CLK (1 << 5) /* no USB/FAC synch */
108# define USB_MCLK_EN (1 << 4) /* enable W4_USB_CLKO */
109#define ULPD_SOFT_REQ (ULPD_REG_BASE + 0x34)
110# define SOFT_UDC_REQ (1 << 4)
111# define SOFT_USB_CLK_REQ (1 << 3)
112# define SOFT_DPLL_REQ (1 << 0)
113#define ULPD_DPLL_CTRL (ULPD_REG_BASE + 0x3c)
114#define ULPD_STATUS_REQ (ULPD_REG_BASE + 0x40)
115#define ULPD_APLL_CTRL (ULPD_REG_BASE + 0x4c)
116#define ULPD_POWER_CTRL (ULPD_REG_BASE + 0x50)
117#define ULPD_SOFT_DISABLE_REQ_REG (ULPD_REG_BASE + 0x68)
118# define DIS_MMC2_DPLL_REQ (1 << 11)
119# define DIS_MMC1_DPLL_REQ (1 << 10)
120# define DIS_UART3_DPLL_REQ (1 << 9)
121# define DIS_UART2_DPLL_REQ (1 << 8)
122# define DIS_UART1_DPLL_REQ (1 << 7)
123# define DIS_USB_HOST_DPLL_REQ (1 << 6)
124#define ULPD_SDW_CLK_DIV_CTRL_SEL (ULPD_REG_BASE + 0x74)
125#define ULPD_CAM_CLK_CTRL (ULPD_REG_BASE + 0x7c)
126
127/*
128 * ---------------------------------------------------------------------------
129 * Watchdog timer
130 * ---------------------------------------------------------------------------
131 */
132
133/* Watchdog timer within the OMAP3.2 gigacell */
134#define OMAP_MPU_WATCHDOG_BASE (0xfffec800)
135#define OMAP_WDT_TIMER (OMAP_MPU_WATCHDOG_BASE + 0x0)
136#define OMAP_WDT_LOAD_TIM (OMAP_MPU_WATCHDOG_BASE + 0x4)
137#define OMAP_WDT_READ_TIM (OMAP_MPU_WATCHDOG_BASE + 0x4)
138#define OMAP_WDT_TIMER_MODE (OMAP_MPU_WATCHDOG_BASE + 0x8)
139
140/*
141 * ---------------------------------------------------------------------------
142 * Interrupts
143 * ---------------------------------------------------------------------------
144 */
145#ifdef CONFIG_ARCH_OMAP1
146
147/*
148 * XXX: These probably want to be moved to arch/arm/mach-omap/omap1/irq.c
149 * or something similar.. -- PFM.
150 */
151
152#define OMAP_IH1_BASE 0xfffecb00
153#define OMAP_IH2_BASE 0xfffe0000
154
155#define OMAP_IH1_ITR (OMAP_IH1_BASE + 0x00)
156#define OMAP_IH1_MIR (OMAP_IH1_BASE + 0x04)
157#define OMAP_IH1_SIR_IRQ (OMAP_IH1_BASE + 0x10)
158#define OMAP_IH1_SIR_FIQ (OMAP_IH1_BASE + 0x14)
159#define OMAP_IH1_CONTROL (OMAP_IH1_BASE + 0x18)
160#define OMAP_IH1_ILR0 (OMAP_IH1_BASE + 0x1c)
161#define OMAP_IH1_ISR (OMAP_IH1_BASE + 0x9c)
162
163#define OMAP_IH2_ITR (OMAP_IH2_BASE + 0x00)
164#define OMAP_IH2_MIR (OMAP_IH2_BASE + 0x04)
165#define OMAP_IH2_SIR_IRQ (OMAP_IH2_BASE + 0x10)
166#define OMAP_IH2_SIR_FIQ (OMAP_IH2_BASE + 0x14)
167#define OMAP_IH2_CONTROL (OMAP_IH2_BASE + 0x18)
168#define OMAP_IH2_ILR0 (OMAP_IH2_BASE + 0x1c)
169#define OMAP_IH2_ISR (OMAP_IH2_BASE + 0x9c)
170
171#define IRQ_ITR_REG_OFFSET 0x00
172#define IRQ_MIR_REG_OFFSET 0x04
173#define IRQ_SIR_IRQ_REG_OFFSET 0x10
174#define IRQ_SIR_FIQ_REG_OFFSET 0x14
175#define IRQ_CONTROL_REG_OFFSET 0x18
176#define IRQ_ISR_REG_OFFSET 0x9c
177#define IRQ_ILR0_REG_OFFSET 0x1c
178#define IRQ_GMR_REG_OFFSET 0xa0
179
180#endif
181
182/*
183 * ----------------------------------------------------------------------------
184 * System control registers
185 * ----------------------------------------------------------------------------
186 */
187#define MOD_CONF_CTRL_0 0xfffe1080
188#define MOD_CONF_CTRL_1 0xfffe1110
189
190/*
191 * ----------------------------------------------------------------------------
192 * Pin multiplexing registers
193 * ----------------------------------------------------------------------------
194 */
195#define FUNC_MUX_CTRL_0 0xfffe1000
196#define FUNC_MUX_CTRL_1 0xfffe1004
197#define FUNC_MUX_CTRL_2 0xfffe1008
198#define COMP_MODE_CTRL_0 0xfffe100c
199#define FUNC_MUX_CTRL_3 0xfffe1010
200#define FUNC_MUX_CTRL_4 0xfffe1014
201#define FUNC_MUX_CTRL_5 0xfffe1018
202#define FUNC_MUX_CTRL_6 0xfffe101C
203#define FUNC_MUX_CTRL_7 0xfffe1020
204#define FUNC_MUX_CTRL_8 0xfffe1024
205#define FUNC_MUX_CTRL_9 0xfffe1028
206#define FUNC_MUX_CTRL_A 0xfffe102C
207#define FUNC_MUX_CTRL_B 0xfffe1030
208#define FUNC_MUX_CTRL_C 0xfffe1034
209#define FUNC_MUX_CTRL_D 0xfffe1038
210#define PULL_DWN_CTRL_0 0xfffe1040
211#define PULL_DWN_CTRL_1 0xfffe1044
212#define PULL_DWN_CTRL_2 0xfffe1048
213#define PULL_DWN_CTRL_3 0xfffe104c
214#define PULL_DWN_CTRL_4 0xfffe10ac
215
216/* OMAP-1610 specific multiplexing registers */
217#define FUNC_MUX_CTRL_E 0xfffe1090
218#define FUNC_MUX_CTRL_F 0xfffe1094
219#define FUNC_MUX_CTRL_10 0xfffe1098
220#define FUNC_MUX_CTRL_11 0xfffe109c
221#define FUNC_MUX_CTRL_12 0xfffe10a0
222#define PU_PD_SEL_0 0xfffe10b4
223#define PU_PD_SEL_1 0xfffe10b8
224#define PU_PD_SEL_2 0xfffe10bc
225#define PU_PD_SEL_3 0xfffe10c0
226#define PU_PD_SEL_4 0xfffe10c4
227
228/* Timer32K for 1610 and 1710*/
229#define OMAP_TIMER32K_BASE 0xFFFBC400
230
231/*
232 * ---------------------------------------------------------------------------
233 * TIPB bus interface
234 * ---------------------------------------------------------------------------
235 */
236#define TIPB_PUBLIC_CNTL_BASE 0xfffed300
237#define MPU_PUBLIC_TIPB_CNTL (TIPB_PUBLIC_CNTL_BASE + 0x8)
238#define TIPB_PRIVATE_CNTL_BASE 0xfffeca00
239#define MPU_PRIVATE_TIPB_CNTL (TIPB_PRIVATE_CNTL_BASE + 0x8)
240
241/*
242 * ----------------------------------------------------------------------------
243 * MPUI interface
244 * ----------------------------------------------------------------------------
245 */
246#define MPUI_BASE (0xfffec900)
247#define MPUI_CTRL (MPUI_BASE + 0x0)
248#define MPUI_DEBUG_ADDR (MPUI_BASE + 0x4)
249#define MPUI_DEBUG_DATA (MPUI_BASE + 0x8)
250#define MPUI_DEBUG_FLAG (MPUI_BASE + 0xc)
251#define MPUI_STATUS_REG (MPUI_BASE + 0x10)
252#define MPUI_DSP_STATUS (MPUI_BASE + 0x14)
253#define MPUI_DSP_BOOT_CONFIG (MPUI_BASE + 0x18)
254#define MPUI_DSP_API_CONFIG (MPUI_BASE + 0x1c)
255
256/*
257 * ----------------------------------------------------------------------------
258 * LED Pulse Generator
259 * ----------------------------------------------------------------------------
260 */
261#define OMAP_LPG1_BASE 0xfffbd000
262#define OMAP_LPG2_BASE 0xfffbd800
263#define OMAP_LPG1_LCR (OMAP_LPG1_BASE + 0x00)
264#define OMAP_LPG1_PMR (OMAP_LPG1_BASE + 0x04)
265#define OMAP_LPG2_LCR (OMAP_LPG2_BASE + 0x00)
266#define OMAP_LPG2_PMR (OMAP_LPG2_BASE + 0x04)
267
268/*
269 * ----------------------------------------------------------------------------
270 * Pulse-Width Light
271 * ----------------------------------------------------------------------------
272 */
273#define OMAP_PWL_BASE 0xfffb5800
274#define OMAP_PWL_ENABLE (OMAP_PWL_BASE + 0x00)
275#define OMAP_PWL_CLK_ENABLE (OMAP_PWL_BASE + 0x04)
276
277/*
278 * ---------------------------------------------------------------------------
279 * Processor specific defines
280 * ---------------------------------------------------------------------------
281 */
282
283#include "omap730.h"
284#include "omap1510.h"
285#include "omap24xx.h"
286#include "omap16xx.h"
287#include "omap34xx.h"
288
289#ifndef __ASSEMBLER__
290
291/*
292 * ---------------------------------------------------------------------------
293 * Board specific defines
294 * ---------------------------------------------------------------------------
295 */
296
297#ifdef CONFIG_MACH_OMAP_INNOVATOR
298#include "board-innovator.h"
299#endif
300
301#ifdef CONFIG_MACH_OMAP_H2
302#include "board-h2.h"
303#endif
304
305#ifdef CONFIG_MACH_OMAP_PERSEUS2
306#include "board-perseus2.h"
307#endif
308
309#ifdef CONFIG_MACH_OMAP_FSAMPLE
310#include "board-fsample.h"
311#endif
312
313#ifdef CONFIG_MACH_OMAP_H3
314#include "board-h3.h"
315#endif
316
317#ifdef CONFIG_MACH_OMAP_H4
318#include "board-h4.h"
319#endif
320
321#ifdef CONFIG_MACH_OMAP_2430SDP
322#include "board-2430sdp.h"
323#endif
324
325#ifdef CONFIG_MACH_OMAP_APOLLON
326#include "board-apollon.h"
327#endif
328
329#ifdef CONFIG_MACH_OMAP_OSK
330#include "board-osk.h"
331#endif
332
333#ifdef CONFIG_MACH_VOICEBLUE
334#include "board-voiceblue.h"
335#endif
336
337#ifdef CONFIG_MACH_OMAP_PALMTE
338#include "board-palmte.h"
339#endif
340
341#ifdef CONFIG_MACH_OMAP_PALMZ71
342#include "board-palmz71.h"
343#endif
344
345#ifdef CONFIG_MACH_OMAP_PALMTT
346#include "board-palmtt.h"
347#endif
348
349#ifdef CONFIG_MACH_SX1
350#include "board-sx1.h"
351#endif
352
353#endif /* !__ASSEMBLER__ */
354
355#endif /* __ASM_ARCH_OMAP_HARDWARE_H */
diff --git a/include/asm-arm/arch-omap/hwa742.h b/arch/arm/plat-omap/include/mach/hwa742.h
index 577f492f2d3c..577f492f2d3c 100644
--- a/include/asm-arm/arch-omap/hwa742.h
+++ b/arch/arm/plat-omap/include/mach/hwa742.h
diff --git a/arch/arm/plat-omap/include/mach/io.h b/arch/arm/plat-omap/include/mach/io.h
new file mode 100644
index 000000000000..2a30b7d88cde
--- /dev/null
+++ b/arch/arm/plat-omap/include/mach/io.h
@@ -0,0 +1,197 @@
1/*
2 * arch/arm/plat-omap/include/mach/io.h
3 *
4 * IO definitions for TI OMAP processors and boards
5 *
6 * Copied from arch/arm/mach-sa1100/include/mach/io.h
7 * Copyright (C) 1997-1999 Russell King
8 *
9 * This program is free software; you can redistribute it and/or modify it
10 * under the terms of the GNU General Public License as published by the
11 * Free Software Foundation; either version 2 of the License, or (at your
12 * option) any later version.
13 *
14 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
15 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
16 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
17 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
18 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
19 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
20 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
21 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 *
25 * You should have received a copy of the GNU General Public License along
26 * with this program; if not, write to the Free Software Foundation, Inc.,
27 * 675 Mass Ave, Cambridge, MA 02139, USA.
28 *
29 * Modifications:
30 * 06-12-1997 RMK Created.
31 * 07-04-1999 RMK Major cleanup
32 */
33
34#ifndef __ASM_ARM_ARCH_IO_H
35#define __ASM_ARM_ARCH_IO_H
36
37#include <mach/hardware.h>
38
39#define IO_SPACE_LIMIT 0xffffffff
40
41/*
42 * We don't actually have real ISA nor PCI buses, but there is so many
43 * drivers out there that might just work if we fake them...
44 */
45#define __io(a) ((void __iomem *)(PCIO_BASE + (a)))
46#define __mem_pci(a) (a)
47
48/*
49 * ----------------------------------------------------------------------------
50 * I/O mapping
51 * ----------------------------------------------------------------------------
52 */
53
54#define PCIO_BASE 0
55
56#if defined(CONFIG_ARCH_OMAP1)
57
58#define IO_PHYS 0xFFFB0000
59#define IO_OFFSET 0x01000000 /* Virtual IO = 0xfefb0000 */
60#define IO_SIZE 0x40000
61#define IO_VIRT (IO_PHYS - IO_OFFSET)
62#define IO_ADDRESS(pa) ((pa) - IO_OFFSET)
63#define OMAP1_IO_ADDRESS(pa) ((pa) - IO_OFFSET)
64#define io_p2v(pa) ((pa) - IO_OFFSET)
65#define io_v2p(va) ((va) + IO_OFFSET)
66
67#elif defined(CONFIG_ARCH_OMAP2)
68
69/* We map both L3 and L4 on OMAP2 */
70#define L3_24XX_PHYS L3_24XX_BASE /* 0x68000000 */
71#define L3_24XX_VIRT 0xf8000000
72#define L3_24XX_SIZE SZ_1M /* 44kB of 128MB used, want 1MB sect */
73#define L4_24XX_PHYS L4_24XX_BASE /* 0x48000000 */
74#define L4_24XX_VIRT 0xd8000000
75#define L4_24XX_SIZE SZ_1M /* 1MB of 128MB used, want 1MB sect */
76
77#ifdef CONFIG_ARCH_OMAP2430
78#define L4_WK_243X_PHYS L4_WK_243X_BASE /* 0x49000000 */
79#define L4_WK_243X_VIRT 0xd9000000
80#define L4_WK_243X_SIZE SZ_1M
81#define OMAP243X_GPMC_PHYS OMAP243X_GPMC_BASE /* 0x49000000 */
82#define OMAP243X_GPMC_VIRT 0xFE000000
83#define OMAP243X_GPMC_SIZE SZ_1M
84#define OMAP243X_SDRC_PHYS OMAP243X_SDRC_BASE
85#define OMAP243X_SDRC_VIRT 0xFD000000
86#define OMAP243X_SDRC_SIZE SZ_1M
87#define OMAP243X_SMS_PHYS OMAP243X_SMS_BASE
88#define OMAP243X_SMS_VIRT 0xFC000000
89#define OMAP243X_SMS_SIZE SZ_1M
90
91#endif
92
93#define IO_OFFSET 0x90000000
94#define IO_ADDRESS(pa) ((pa) + IO_OFFSET) /* Works for L3 and L4 */
95#define OMAP2_IO_ADDRESS(pa) ((pa) + IO_OFFSET) /* Works for L3 and L4 */
96#define io_p2v(pa) ((pa) + IO_OFFSET) /* Works for L3 and L4 */
97#define io_v2p(va) ((va) - IO_OFFSET) /* Works for L3 and L4 */
98
99/* DSP */
100#define DSP_MEM_24XX_PHYS OMAP2420_DSP_MEM_BASE /* 0x58000000 */
101#define DSP_MEM_24XX_VIRT 0xe0000000
102#define DSP_MEM_24XX_SIZE 0x28000
103#define DSP_IPI_24XX_PHYS OMAP2420_DSP_IPI_BASE /* 0x59000000 */
104#define DSP_IPI_24XX_VIRT 0xe1000000
105#define DSP_IPI_24XX_SIZE SZ_4K
106#define DSP_MMU_24XX_PHYS OMAP2420_DSP_MMU_BASE /* 0x5a000000 */
107#define DSP_MMU_24XX_VIRT 0xe2000000
108#define DSP_MMU_24XX_SIZE SZ_4K
109
110#elif defined(CONFIG_ARCH_OMAP3)
111
112/* We map both L3 and L4 on OMAP3 */
113#define L3_34XX_PHYS L3_34XX_BASE /* 0x68000000 */
114#define L3_34XX_VIRT 0xf8000000
115#define L3_34XX_SIZE SZ_1M /* 44kB of 128MB used, want 1MB sect */
116
117#define L4_34XX_PHYS L4_34XX_BASE /* 0x48000000 */
118#define L4_34XX_VIRT 0xd8000000
119#define L4_34XX_SIZE SZ_4M /* 1MB of 128MB used, want 1MB sect */
120
121/*
122 * Need to look at the Size 4M for L4.
123 * VPOM3430 was not working for Int controller
124 */
125
126#define L4_WK_34XX_PHYS L4_WK_34XX_BASE /* 0x48300000 */
127#define L4_WK_34XX_VIRT 0xd8300000
128#define L4_WK_34XX_SIZE SZ_1M
129
130#define L4_PER_34XX_PHYS L4_PER_34XX_BASE /* 0x49000000 */
131#define L4_PER_34XX_VIRT 0xd9000000
132#define L4_PER_34XX_SIZE SZ_1M
133
134#define L4_EMU_34XX_PHYS L4_EMU_34XX_BASE /* 0x54000000 */
135#define L4_EMU_34XX_VIRT 0xe4000000
136#define L4_EMU_34XX_SIZE SZ_64M
137
138#define OMAP34XX_GPMC_PHYS OMAP34XX_GPMC_BASE /* 0x6E000000 */
139#define OMAP34XX_GPMC_VIRT 0xFE000000
140#define OMAP34XX_GPMC_SIZE SZ_1M
141
142#define OMAP343X_SMS_PHYS OMAP343X_SMS_BASE /* 0x6C000000 */
143#define OMAP343X_SMS_VIRT 0xFC000000
144#define OMAP343X_SMS_SIZE SZ_1M
145
146#define OMAP343X_SDRC_PHYS OMAP343X_SDRC_BASE /* 0x6D000000 */
147#define OMAP343X_SDRC_VIRT 0xFD000000
148#define OMAP343X_SDRC_SIZE SZ_1M
149
150
151#define IO_OFFSET 0x90000000
152#define IO_ADDRESS(pa) ((pa) + IO_OFFSET)/* Works for L3 and L4 */
153#define OMAP2_IO_ADDRESS(pa) ((pa) + IO_OFFSET)/* Works for L3 and L4 */
154#define io_p2v(pa) ((pa) + IO_OFFSET)/* Works for L3 and L4 */
155#define io_v2p(va) ((va) - IO_OFFSET)/* Works for L3 and L4 */
156
157/* DSP */
158#define DSP_MEM_34XX_PHYS OMAP34XX_DSP_MEM_BASE /* 0x58000000 */
159#define DSP_MEM_34XX_VIRT 0xe0000000
160#define DSP_MEM_34XX_SIZE 0x28000
161#define DSP_IPI_34XX_PHYS OMAP34XX_DSP_IPI_BASE /* 0x59000000 */
162#define DSP_IPI_34XX_VIRT 0xe1000000
163#define DSP_IPI_34XX_SIZE SZ_4K
164#define DSP_MMU_34XX_PHYS OMAP34XX_DSP_MMU_BASE /* 0x5a000000 */
165#define DSP_MMU_34XX_VIRT 0xe2000000
166#define DSP_MMU_34XX_SIZE SZ_4K
167
168#endif
169
170#ifndef __ASSEMBLER__
171
172/*
173 * Functions to access the OMAP IO region
174 *
175 * NOTE: - Use omap_read/write[bwl] for physical register addresses
176 * - Use __raw_read/write[bwl]() for virtual register addresses
177 * - Use IO_ADDRESS(phys_addr) to convert registers to virtual addresses
178 * - DO NOT use hardcoded virtual addresses to allow changing the
179 * IO address space again if needed
180 */
181#define omap_readb(a) (*(volatile unsigned char *)IO_ADDRESS(a))
182#define omap_readw(a) (*(volatile unsigned short *)IO_ADDRESS(a))
183#define omap_readl(a) (*(volatile unsigned int *)IO_ADDRESS(a))
184
185#define omap_writeb(v,a) (*(volatile unsigned char *)IO_ADDRESS(a) = (v))
186#define omap_writew(v,a) (*(volatile unsigned short *)IO_ADDRESS(a) = (v))
187#define omap_writel(v,a) (*(volatile unsigned int *)IO_ADDRESS(a) = (v))
188
189extern void omap1_map_common_io(void);
190extern void omap1_init_common_hw(void);
191
192extern void omap2_map_common_io(void);
193extern void omap2_init_common_hw(void);
194
195#endif
196
197#endif
diff --git a/arch/arm/plat-omap/include/mach/irda.h b/arch/arm/plat-omap/include/mach/irda.h
new file mode 100644
index 000000000000..8372a00d8e0b
--- /dev/null
+++ b/arch/arm/plat-omap/include/mach/irda.h
@@ -0,0 +1,37 @@
1/*
2 * arch/arm/plat-omap/include/mach/irda.h
3 *
4 * Copyright (C) 2005-2006 Komal Shah <komal_shah802003@yahoo.com>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10#ifndef ASMARM_ARCH_IRDA_H
11#define ASMARM_ARCH_IRDA_H
12
13/* board specific transceiver capabilities */
14
15#define IR_SEL 1 /* Selects IrDA */
16#define IR_SIRMODE 2
17#define IR_FIRMODE 4
18#define IR_MIRMODE 8
19
20struct omap_irda_config {
21 int transceiver_cap;
22 int (*transceiver_mode)(struct device *dev, int mode);
23 int (*select_irda)(struct device *dev, int state);
24 /* Very specific to the needs of some platforms (h3,h4)
25 * having calls which can sleep in irda_set_speed.
26 */
27 struct delayed_work gpio_expa;
28 int rx_channel;
29 int tx_channel;
30 unsigned long dest_start;
31 unsigned long src_start;
32 int tx_trigger;
33 int rx_trigger;
34 int mode;
35};
36
37#endif
diff --git a/arch/arm/plat-omap/include/mach/irqs.h b/arch/arm/plat-omap/include/mach/irqs.h
new file mode 100644
index 000000000000..17248bbf3f27
--- /dev/null
+++ b/arch/arm/plat-omap/include/mach/irqs.h
@@ -0,0 +1,332 @@
1/*
2 * arch/arm/plat-omap/include/mach/irqs.h
3 *
4 * Copyright (C) Greg Lonnon 2001
5 * Updated for OMAP-1610 by Tony Lindgren <tony@atomide.com>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 *
21 * NOTE: The interrupt vectors for the OMAP-1509, OMAP-1510, and OMAP-1610
22 * are different.
23 */
24
25#ifndef __ASM_ARCH_OMAP15XX_IRQS_H
26#define __ASM_ARCH_OMAP15XX_IRQS_H
27
28/*
29 * IRQ numbers for interrupt handler 1
30 *
31 * NOTE: See also the OMAP-1510 and 1610 specific IRQ numbers below
32 *
33 */
34#define INT_CAMERA 1
35#define INT_FIQ 3
36#define INT_RTDX 6
37#define INT_DSP_MMU_ABORT 7
38#define INT_HOST 8
39#define INT_ABORT 9
40#define INT_BRIDGE_PRIV 13
41#define INT_GPIO_BANK1 14
42#define INT_UART3 15
43#define INT_TIMER3 16
44#define INT_DMA_CH0_6 19
45#define INT_DMA_CH1_7 20
46#define INT_DMA_CH2_8 21
47#define INT_DMA_CH3 22
48#define INT_DMA_CH4 23
49#define INT_DMA_CH5 24
50#define INT_DMA_LCD 25
51#define INT_TIMER1 26
52#define INT_WD_TIMER 27
53#define INT_BRIDGE_PUB 28
54#define INT_TIMER2 30
55#define INT_LCD_CTRL 31
56
57/*
58 * OMAP-1510 specific IRQ numbers for interrupt handler 1
59 */
60#define INT_1510_IH2_IRQ 0
61#define INT_1510_RES2 2
62#define INT_1510_SPI_TX 4
63#define INT_1510_SPI_RX 5
64#define INT_1510_DSP_MAILBOX1 10
65#define INT_1510_DSP_MAILBOX2 11
66#define INT_1510_RES12 12
67#define INT_1510_LB_MMU 17
68#define INT_1510_RES18 18
69#define INT_1510_LOCAL_BUS 29
70
71/*
72 * OMAP-1610 specific IRQ numbers for interrupt handler 1
73 */
74#define INT_1610_IH2_IRQ 0
75#define INT_1610_IH2_FIQ 2
76#define INT_1610_McBSP2_TX 4
77#define INT_1610_McBSP2_RX 5
78#define INT_1610_DSP_MAILBOX1 10
79#define INT_1610_DSP_MAILBOX2 11
80#define INT_1610_LCD_LINE 12
81#define INT_1610_GPTIMER1 17
82#define INT_1610_GPTIMER2 18
83#define INT_1610_SSR_FIFO_0 29
84
85/*
86 * OMAP-730 specific IRQ numbers for interrupt handler 1
87 */
88#define INT_730_IH2_FIQ 0
89#define INT_730_IH2_IRQ 1
90#define INT_730_USB_NON_ISO 2
91#define INT_730_USB_ISO 3
92#define INT_730_ICR 4
93#define INT_730_EAC 5
94#define INT_730_GPIO_BANK1 6
95#define INT_730_GPIO_BANK2 7
96#define INT_730_GPIO_BANK3 8
97#define INT_730_McBSP2TX 10
98#define INT_730_McBSP2RX 11
99#define INT_730_McBSP2RX_OVF 12
100#define INT_730_LCD_LINE 14
101#define INT_730_GSM_PROTECT 15
102#define INT_730_TIMER3 16
103#define INT_730_GPIO_BANK5 17
104#define INT_730_GPIO_BANK6 18
105#define INT_730_SPGIO_WR 29
106
107/*
108 * IRQ numbers for interrupt handler 2
109 *
110 * NOTE: See also the OMAP-1510 and 1610 specific IRQ numbers below
111 */
112#define IH2_BASE 32
113
114#define INT_KEYBOARD (1 + IH2_BASE)
115#define INT_uWireTX (2 + IH2_BASE)
116#define INT_uWireRX (3 + IH2_BASE)
117#define INT_I2C (4 + IH2_BASE)
118#define INT_MPUIO (5 + IH2_BASE)
119#define INT_USB_HHC_1 (6 + IH2_BASE)
120#define INT_McBSP3TX (10 + IH2_BASE)
121#define INT_McBSP3RX (11 + IH2_BASE)
122#define INT_McBSP1TX (12 + IH2_BASE)
123#define INT_McBSP1RX (13 + IH2_BASE)
124#define INT_UART1 (14 + IH2_BASE)
125#define INT_UART2 (15 + IH2_BASE)
126#define INT_BT_MCSI1TX (16 + IH2_BASE)
127#define INT_BT_MCSI1RX (17 + IH2_BASE)
128#define INT_USB_W2FC (20 + IH2_BASE)
129#define INT_1WIRE (21 + IH2_BASE)
130#define INT_OS_TIMER (22 + IH2_BASE)
131#define INT_MMC (23 + IH2_BASE)
132#define INT_GAUGE_32K (24 + IH2_BASE)
133#define INT_RTC_TIMER (25 + IH2_BASE)
134#define INT_RTC_ALARM (26 + IH2_BASE)
135#define INT_MEM_STICK (27 + IH2_BASE)
136
137/*
138 * OMAP-1510 specific IRQ numbers for interrupt handler 2
139 */
140#define INT_1510_DSP_MMU (28 + IH2_BASE)
141#define INT_1510_COM_SPI_RO (31 + IH2_BASE)
142
143/*
144 * OMAP-1610 specific IRQ numbers for interrupt handler 2
145 */
146#define INT_1610_FAC (0 + IH2_BASE)
147#define INT_1610_USB_HHC_2 (7 + IH2_BASE)
148#define INT_1610_USB_OTG (8 + IH2_BASE)
149#define INT_1610_SoSSI (9 + IH2_BASE)
150#define INT_1610_SoSSI_MATCH (19 + IH2_BASE)
151#define INT_1610_DSP_MMU (28 + IH2_BASE)
152#define INT_1610_McBSP2RX_OF (31 + IH2_BASE)
153#define INT_1610_STI (32 + IH2_BASE)
154#define INT_1610_STI_WAKEUP (33 + IH2_BASE)
155#define INT_1610_GPTIMER3 (34 + IH2_BASE)
156#define INT_1610_GPTIMER4 (35 + IH2_BASE)
157#define INT_1610_GPTIMER5 (36 + IH2_BASE)
158#define INT_1610_GPTIMER6 (37 + IH2_BASE)
159#define INT_1610_GPTIMER7 (38 + IH2_BASE)
160#define INT_1610_GPTIMER8 (39 + IH2_BASE)
161#define INT_1610_GPIO_BANK2 (40 + IH2_BASE)
162#define INT_1610_GPIO_BANK3 (41 + IH2_BASE)
163#define INT_1610_MMC2 (42 + IH2_BASE)
164#define INT_1610_CF (43 + IH2_BASE)
165#define INT_1610_WAKE_UP_REQ (46 + IH2_BASE)
166#define INT_1610_GPIO_BANK4 (48 + IH2_BASE)
167#define INT_1610_SPI (49 + IH2_BASE)
168#define INT_1610_DMA_CH6 (53 + IH2_BASE)
169#define INT_1610_DMA_CH7 (54 + IH2_BASE)
170#define INT_1610_DMA_CH8 (55 + IH2_BASE)
171#define INT_1610_DMA_CH9 (56 + IH2_BASE)
172#define INT_1610_DMA_CH10 (57 + IH2_BASE)
173#define INT_1610_DMA_CH11 (58 + IH2_BASE)
174#define INT_1610_DMA_CH12 (59 + IH2_BASE)
175#define INT_1610_DMA_CH13 (60 + IH2_BASE)
176#define INT_1610_DMA_CH14 (61 + IH2_BASE)
177#define INT_1610_DMA_CH15 (62 + IH2_BASE)
178#define INT_1610_NAND (63 + IH2_BASE)
179
180/*
181 * OMAP-730 specific IRQ numbers for interrupt handler 2
182 */
183#define INT_730_HW_ERRORS (0 + IH2_BASE)
184#define INT_730_NFIQ_PWR_FAIL (1 + IH2_BASE)
185#define INT_730_CFCD (2 + IH2_BASE)
186#define INT_730_CFIREQ (3 + IH2_BASE)
187#define INT_730_I2C (4 + IH2_BASE)
188#define INT_730_PCC (5 + IH2_BASE)
189#define INT_730_MPU_EXT_NIRQ (6 + IH2_BASE)
190#define INT_730_SPI_100K_1 (7 + IH2_BASE)
191#define INT_730_SYREN_SPI (8 + IH2_BASE)
192#define INT_730_VLYNQ (9 + IH2_BASE)
193#define INT_730_GPIO_BANK4 (10 + IH2_BASE)
194#define INT_730_McBSP1TX (11 + IH2_BASE)
195#define INT_730_McBSP1RX (12 + IH2_BASE)
196#define INT_730_McBSP1RX_OF (13 + IH2_BASE)
197#define INT_730_UART_MODEM_IRDA_2 (14 + IH2_BASE)
198#define INT_730_UART_MODEM_1 (15 + IH2_BASE)
199#define INT_730_MCSI (16 + IH2_BASE)
200#define INT_730_uWireTX (17 + IH2_BASE)
201#define INT_730_uWireRX (18 + IH2_BASE)
202#define INT_730_SMC_CD (19 + IH2_BASE)
203#define INT_730_SMC_IREQ (20 + IH2_BASE)
204#define INT_730_HDQ_1WIRE (21 + IH2_BASE)
205#define INT_730_TIMER32K (22 + IH2_BASE)
206#define INT_730_MMC_SDIO (23 + IH2_BASE)
207#define INT_730_UPLD (24 + IH2_BASE)
208#define INT_730_USB_HHC_1 (27 + IH2_BASE)
209#define INT_730_USB_HHC_2 (28 + IH2_BASE)
210#define INT_730_USB_GENI (29 + IH2_BASE)
211#define INT_730_USB_OTG (30 + IH2_BASE)
212#define INT_730_CAMERA_IF (31 + IH2_BASE)
213#define INT_730_RNG (32 + IH2_BASE)
214#define INT_730_DUAL_MODE_TIMER (33 + IH2_BASE)
215#define INT_730_DBB_RF_EN (34 + IH2_BASE)
216#define INT_730_MPUIO_KEYPAD (35 + IH2_BASE)
217#define INT_730_SHA1_MD5 (36 + IH2_BASE)
218#define INT_730_SPI_100K_2 (37 + IH2_BASE)
219#define INT_730_RNG_IDLE (38 + IH2_BASE)
220#define INT_730_MPUIO (39 + IH2_BASE)
221#define INT_730_LLPC_LCD_CTRL_CAN_BE_OFF (40 + IH2_BASE)
222#define INT_730_LLPC_OE_FALLING (41 + IH2_BASE)
223#define INT_730_LLPC_OE_RISING (42 + IH2_BASE)
224#define INT_730_LLPC_VSYNC (43 + IH2_BASE)
225#define INT_730_WAKE_UP_REQ (46 + IH2_BASE)
226#define INT_730_DMA_CH6 (53 + IH2_BASE)
227#define INT_730_DMA_CH7 (54 + IH2_BASE)
228#define INT_730_DMA_CH8 (55 + IH2_BASE)
229#define INT_730_DMA_CH9 (56 + IH2_BASE)
230#define INT_730_DMA_CH10 (57 + IH2_BASE)
231#define INT_730_DMA_CH11 (58 + IH2_BASE)
232#define INT_730_DMA_CH12 (59 + IH2_BASE)
233#define INT_730_DMA_CH13 (60 + IH2_BASE)
234#define INT_730_DMA_CH14 (61 + IH2_BASE)
235#define INT_730_DMA_CH15 (62 + IH2_BASE)
236#define INT_730_NAND (63 + IH2_BASE)
237
238#define INT_24XX_SYS_NIRQ 7
239#define INT_24XX_SDMA_IRQ0 12
240#define INT_24XX_SDMA_IRQ1 13
241#define INT_24XX_SDMA_IRQ2 14
242#define INT_24XX_SDMA_IRQ3 15
243#define INT_24XX_CAM_IRQ 24
244#define INT_24XX_DSS_IRQ 25
245#define INT_24XX_MAIL_U0_MPU 26
246#define INT_24XX_DSP_UMA 27
247#define INT_24XX_DSP_MMU 28
248#define INT_24XX_GPIO_BANK1 29
249#define INT_24XX_GPIO_BANK2 30
250#define INT_24XX_GPIO_BANK3 31
251#define INT_24XX_GPIO_BANK4 32
252#define INT_24XX_GPIO_BANK5 33
253#define INT_24XX_MAIL_U3_MPU 34
254#define INT_24XX_GPTIMER1 37
255#define INT_24XX_GPTIMER2 38
256#define INT_24XX_GPTIMER3 39
257#define INT_24XX_GPTIMER4 40
258#define INT_24XX_GPTIMER5 41
259#define INT_24XX_GPTIMER6 42
260#define INT_24XX_GPTIMER7 43
261#define INT_24XX_GPTIMER8 44
262#define INT_24XX_GPTIMER9 45
263#define INT_24XX_GPTIMER10 46
264#define INT_24XX_GPTIMER11 47
265#define INT_24XX_GPTIMER12 48
266#define INT_24XX_I2C1_IRQ 56
267#define INT_24XX_I2C2_IRQ 57
268#define INT_24XX_MCBSP1_IRQ_TX 59
269#define INT_24XX_MCBSP1_IRQ_RX 60
270#define INT_24XX_MCBSP2_IRQ_TX 62
271#define INT_24XX_MCBSP2_IRQ_RX 63
272#define INT_24XX_UART1_IRQ 72
273#define INT_24XX_UART2_IRQ 73
274#define INT_24XX_UART3_IRQ 74
275#define INT_24XX_USB_IRQ_GEN 75
276#define INT_24XX_USB_IRQ_NISO 76
277#define INT_24XX_USB_IRQ_ISO 77
278#define INT_24XX_USB_IRQ_HGEN 78
279#define INT_24XX_USB_IRQ_HSOF 79
280#define INT_24XX_USB_IRQ_OTG 80
281#define INT_24XX_MMC_IRQ 83
282
283/* Max. 128 level 2 IRQs (OMAP1610), 192 GPIOs (OMAP730) and
284 * 16 MPUIO lines */
285#define OMAP_MAX_GPIO_LINES 192
286#define IH_GPIO_BASE (128 + IH2_BASE)
287#define IH_MPUIO_BASE (OMAP_MAX_GPIO_LINES + IH_GPIO_BASE)
288#define OMAP_IRQ_END (IH_MPUIO_BASE + 16)
289
290/* External FPGA handles interrupts on Innovator boards */
291#define OMAP_FPGA_IRQ_BASE (OMAP_IRQ_END)
292#ifdef CONFIG_MACH_OMAP_INNOVATOR
293#define OMAP_FPGA_NR_IRQS 24
294#else
295#define OMAP_FPGA_NR_IRQS 0
296#endif
297#define OMAP_FPGA_IRQ_END (OMAP_FPGA_IRQ_BASE + OMAP_FPGA_NR_IRQS)
298
299/* External TWL4030 can handle interrupts on 2430 and 34xx boards */
300#define TWL4030_IRQ_BASE (OMAP_FPGA_IRQ_END)
301#ifdef CONFIG_TWL4030_CORE
302#define TWL4030_BASE_NR_IRQS 8
303#define TWL4030_PWR_NR_IRQS 8
304#else
305#define TWL4030_BASE_NR_IRQS 0
306#define TWL4030_PWR_NR_IRQS 0
307#endif
308#define TWL4030_IRQ_END (TWL4030_IRQ_BASE + TWL4030_BASE_NR_IRQS)
309#define TWL4030_PWR_IRQ_BASE TWL4030_IRQ_END
310#define TWL4030_PWR_IRQ_END (TWL4030_PWR_IRQ_BASE + TWL4030_PWR_NR_IRQS)
311
312/* External TWL4030 gpio interrupts are optional */
313#define TWL4030_GPIO_IRQ_BASE TWL4030_PWR_IRQ_END
314#ifdef CONFIG_TWL4030_GPIO
315#define TWL4030_GPIO_NR_IRQS 18
316#else
317#define TWL4030_GPIO_NR_IRQS 0
318#endif
319#define TWL4030_GPIO_IRQ_END (TWL4030_GPIO_IRQ_BASE + TWL4030_GPIO_NR_IRQS)
320
321/* Total number of interrupts depends on the enabled blocks above */
322#define NR_IRQS TWL4030_GPIO_IRQ_END
323
324#define OMAP_IRQ_BIT(irq) (1 << ((irq) % 32))
325
326#ifndef __ASSEMBLY__
327extern void omap_init_irq(void);
328#endif
329
330#include <mach/hardware.h>
331
332#endif
diff --git a/arch/arm/plat-omap/include/mach/keypad.h b/arch/arm/plat-omap/include/mach/keypad.h
new file mode 100644
index 000000000000..232923aaf61d
--- /dev/null
+++ b/arch/arm/plat-omap/include/mach/keypad.h
@@ -0,0 +1,39 @@
1/*
2 * arch/arm/plat-omap/include/mach/keypad.h
3 *
4 * Copyright (C) 2006 Komal Shah <komal_shah802003@yahoo.com>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10#ifndef ASMARM_ARCH_KEYPAD_H
11#define ASMARM_ARCH_KEYPAD_H
12
13struct omap_kp_platform_data {
14 int rows;
15 int cols;
16 int *keymap;
17 unsigned int keymapsize;
18 unsigned int rep:1;
19 unsigned long delay;
20 unsigned int dbounce:1;
21 /* specific to OMAP242x*/
22 unsigned int *row_gpios;
23 unsigned int *col_gpios;
24};
25
26/* Group (0..3) -- when multiple keys are pressed, only the
27 * keys pressed in the same group are considered as pressed. This is
28 * in order to workaround certain crappy HW designs that produce ghost
29 * keypresses. */
30#define GROUP_0 (0 << 16)
31#define GROUP_1 (1 << 16)
32#define GROUP_2 (2 << 16)
33#define GROUP_3 (3 << 16)
34#define GROUP_MASK GROUP_3
35
36#define KEY(col, row, val) (((col) << 28) | ((row) << 24) | (val))
37
38#endif
39
diff --git a/include/asm-arm/arch-omap/lcd_mipid.h b/arch/arm/plat-omap/include/mach/lcd_mipid.h
index f8fbc4801e52..f8fbc4801e52 100644
--- a/include/asm-arm/arch-omap/lcd_mipid.h
+++ b/arch/arm/plat-omap/include/mach/lcd_mipid.h
diff --git a/arch/arm/plat-omap/include/mach/led.h b/arch/arm/plat-omap/include/mach/led.h
new file mode 100644
index 000000000000..25e451e7e2fd
--- /dev/null
+++ b/arch/arm/plat-omap/include/mach/led.h
@@ -0,0 +1,24 @@
1/*
2 * arch/arm/plat-omap/include/mach/led.h
3 *
4 * Copyright (C) 2006 Samsung Electronics
5 * Kyungmin Park <kyungmin.park@samsung.com>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 */
11#ifndef ASMARM_ARCH_LED_H
12#define ASMARM_ARCH_LED_H
13
14struct omap_led_config {
15 struct led_classdev cdev;
16 s16 gpio;
17};
18
19struct omap_led_platform_data {
20 s16 nr_leds;
21 struct omap_led_config *leds;
22};
23
24#endif
diff --git a/include/asm-arm/arch-omap/mailbox.h b/arch/arm/plat-omap/include/mach/mailbox.h
index 7cbed9332e16..7cbed9332e16 100644
--- a/include/asm-arm/arch-omap/mailbox.h
+++ b/arch/arm/plat-omap/include/mach/mailbox.h
diff --git a/arch/arm/plat-omap/include/mach/mcbsp.h b/arch/arm/plat-omap/include/mach/mcbsp.h
new file mode 100644
index 000000000000..6eb44a92871d
--- /dev/null
+++ b/arch/arm/plat-omap/include/mach/mcbsp.h
@@ -0,0 +1,380 @@
1/*
2 * arch/arm/plat-omap/include/mach/mcbsp.h
3 *
4 * Defines for Multi-Channel Buffered Serial Port
5 *
6 * Copyright (C) 2002 RidgeRun, Inc.
7 * Author: Steve Johnson
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 *
23 */
24#ifndef __ASM_ARCH_OMAP_MCBSP_H
25#define __ASM_ARCH_OMAP_MCBSP_H
26
27#include <linux/completion.h>
28#include <linux/spinlock.h>
29
30#include <mach/hardware.h>
31#include <mach/clock.h>
32
33#define OMAP730_MCBSP1_BASE 0xfffb1000
34#define OMAP730_MCBSP2_BASE 0xfffb1800
35
36#define OMAP1510_MCBSP1_BASE 0xe1011800
37#define OMAP1510_MCBSP2_BASE 0xfffb1000
38#define OMAP1510_MCBSP3_BASE 0xe1017000
39
40#define OMAP1610_MCBSP1_BASE 0xe1011800
41#define OMAP1610_MCBSP2_BASE 0xfffb1000
42#define OMAP1610_MCBSP3_BASE 0xe1017000
43
44#define OMAP24XX_MCBSP1_BASE 0x48074000
45#define OMAP24XX_MCBSP2_BASE 0x48076000
46
47#define OMAP34XX_MCBSP1_BASE 0x48074000
48#define OMAP34XX_MCBSP2_BASE 0x49022000
49
50#if defined(CONFIG_ARCH_OMAP15XX) || defined(CONFIG_ARCH_OMAP16XX) || defined(CONFIG_ARCH_OMAP730)
51
52#define OMAP_MCBSP_REG_DRR2 0x00
53#define OMAP_MCBSP_REG_DRR1 0x02
54#define OMAP_MCBSP_REG_DXR2 0x04
55#define OMAP_MCBSP_REG_DXR1 0x06
56#define OMAP_MCBSP_REG_SPCR2 0x08
57#define OMAP_MCBSP_REG_SPCR1 0x0a
58#define OMAP_MCBSP_REG_RCR2 0x0c
59#define OMAP_MCBSP_REG_RCR1 0x0e
60#define OMAP_MCBSP_REG_XCR2 0x10
61#define OMAP_MCBSP_REG_XCR1 0x12
62#define OMAP_MCBSP_REG_SRGR2 0x14
63#define OMAP_MCBSP_REG_SRGR1 0x16
64#define OMAP_MCBSP_REG_MCR2 0x18
65#define OMAP_MCBSP_REG_MCR1 0x1a
66#define OMAP_MCBSP_REG_RCERA 0x1c
67#define OMAP_MCBSP_REG_RCERB 0x1e
68#define OMAP_MCBSP_REG_XCERA 0x20
69#define OMAP_MCBSP_REG_XCERB 0x22
70#define OMAP_MCBSP_REG_PCR0 0x24
71#define OMAP_MCBSP_REG_RCERC 0x26
72#define OMAP_MCBSP_REG_RCERD 0x28
73#define OMAP_MCBSP_REG_XCERC 0x2A
74#define OMAP_MCBSP_REG_XCERD 0x2C
75#define OMAP_MCBSP_REG_RCERE 0x2E
76#define OMAP_MCBSP_REG_RCERF 0x30
77#define OMAP_MCBSP_REG_XCERE 0x32
78#define OMAP_MCBSP_REG_XCERF 0x34
79#define OMAP_MCBSP_REG_RCERG 0x36
80#define OMAP_MCBSP_REG_RCERH 0x38
81#define OMAP_MCBSP_REG_XCERG 0x3A
82#define OMAP_MCBSP_REG_XCERH 0x3C
83
84#define OMAP_MAX_MCBSP_COUNT 3
85#define MAX_MCBSP_CLOCKS 3
86
87#define AUDIO_MCBSP_DATAWRITE (OMAP1510_MCBSP1_BASE + OMAP_MCBSP_REG_DXR1)
88#define AUDIO_MCBSP_DATAREAD (OMAP1510_MCBSP1_BASE + OMAP_MCBSP_REG_DRR1)
89
90#define AUDIO_MCBSP OMAP_MCBSP1
91#define AUDIO_DMA_TX OMAP_DMA_MCBSP1_TX
92#define AUDIO_DMA_RX OMAP_DMA_MCBSP1_RX
93
94#elif defined(CONFIG_ARCH_OMAP24XX)
95
96#define OMAP_MCBSP_REG_DRR2 0x00
97#define OMAP_MCBSP_REG_DRR1 0x04
98#define OMAP_MCBSP_REG_DXR2 0x08
99#define OMAP_MCBSP_REG_DXR1 0x0C
100#define OMAP_MCBSP_REG_SPCR2 0x10
101#define OMAP_MCBSP_REG_SPCR1 0x14
102#define OMAP_MCBSP_REG_RCR2 0x18
103#define OMAP_MCBSP_REG_RCR1 0x1C
104#define OMAP_MCBSP_REG_XCR2 0x20
105#define OMAP_MCBSP_REG_XCR1 0x24
106#define OMAP_MCBSP_REG_SRGR2 0x28
107#define OMAP_MCBSP_REG_SRGR1 0x2C
108#define OMAP_MCBSP_REG_MCR2 0x30
109#define OMAP_MCBSP_REG_MCR1 0x34
110#define OMAP_MCBSP_REG_RCERA 0x38
111#define OMAP_MCBSP_REG_RCERB 0x3C
112#define OMAP_MCBSP_REG_XCERA 0x40
113#define OMAP_MCBSP_REG_XCERB 0x44
114#define OMAP_MCBSP_REG_PCR0 0x48
115#define OMAP_MCBSP_REG_RCERC 0x4C
116#define OMAP_MCBSP_REG_RCERD 0x50
117#define OMAP_MCBSP_REG_XCERC 0x54
118#define OMAP_MCBSP_REG_XCERD 0x58
119#define OMAP_MCBSP_REG_RCERE 0x5C
120#define OMAP_MCBSP_REG_RCERF 0x60
121#define OMAP_MCBSP_REG_XCERE 0x64
122#define OMAP_MCBSP_REG_XCERF 0x68
123#define OMAP_MCBSP_REG_RCERG 0x6C
124#define OMAP_MCBSP_REG_RCERH 0x70
125#define OMAP_MCBSP_REG_XCERG 0x74
126#define OMAP_MCBSP_REG_XCERH 0x78
127
128#define OMAP_MAX_MCBSP_COUNT 2
129#define MAX_MCBSP_CLOCKS 2
130
131#define AUDIO_MCBSP_DATAWRITE (OMAP24XX_MCBSP2_BASE + OMAP_MCBSP_REG_DXR1)
132#define AUDIO_MCBSP_DATAREAD (OMAP24XX_MCBSP2_BASE + OMAP_MCBSP_REG_DRR1)
133
134#define AUDIO_MCBSP OMAP_MCBSP2
135#define AUDIO_DMA_TX OMAP24XX_DMA_MCBSP2_TX
136#define AUDIO_DMA_RX OMAP24XX_DMA_MCBSP2_RX
137
138#endif
139
140#define OMAP_MCBSP_READ(base, reg) __raw_readw((base) + OMAP_MCBSP_REG_##reg)
141#define OMAP_MCBSP_WRITE(base, reg, val) __raw_writew((val), (base) + OMAP_MCBSP_REG_##reg)
142
143
144/************************** McBSP SPCR1 bit definitions ***********************/
145#define RRST 0x0001
146#define RRDY 0x0002
147#define RFULL 0x0004
148#define RSYNC_ERR 0x0008
149#define RINTM(value) ((value)<<4) /* bits 4:5 */
150#define ABIS 0x0040
151#define DXENA 0x0080
152#define CLKSTP(value) ((value)<<11) /* bits 11:12 */
153#define RJUST(value) ((value)<<13) /* bits 13:14 */
154#define DLB 0x8000
155
156/************************** McBSP SPCR2 bit definitions ***********************/
157#define XRST 0x0001
158#define XRDY 0x0002
159#define XEMPTY 0x0004
160#define XSYNC_ERR 0x0008
161#define XINTM(value) ((value)<<4) /* bits 4:5 */
162#define GRST 0x0040
163#define FRST 0x0080
164#define SOFT 0x0100
165#define FREE 0x0200
166
167/************************** McBSP PCR bit definitions *************************/
168#define CLKRP 0x0001
169#define CLKXP 0x0002
170#define FSRP 0x0004
171#define FSXP 0x0008
172#define DR_STAT 0x0010
173#define DX_STAT 0x0020
174#define CLKS_STAT 0x0040
175#define SCLKME 0x0080
176#define CLKRM 0x0100
177#define CLKXM 0x0200
178#define FSRM 0x0400
179#define FSXM 0x0800
180#define RIOEN 0x1000
181#define XIOEN 0x2000
182#define IDLE_EN 0x4000
183
184/************************** McBSP RCR1 bit definitions ************************/
185#define RWDLEN1(value) ((value)<<5) /* Bits 5:7 */
186#define RFRLEN1(value) ((value)<<8) /* Bits 8:14 */
187
188/************************** McBSP XCR1 bit definitions ************************/
189#define XWDLEN1(value) ((value)<<5) /* Bits 5:7 */
190#define XFRLEN1(value) ((value)<<8) /* Bits 8:14 */
191
192/*************************** McBSP RCR2 bit definitions ***********************/
193#define RDATDLY(value) (value) /* Bits 0:1 */
194#define RFIG 0x0004
195#define RCOMPAND(value) ((value)<<3) /* Bits 3:4 */
196#define RWDLEN2(value) ((value)<<5) /* Bits 5:7 */
197#define RFRLEN2(value) ((value)<<8) /* Bits 8:14 */
198#define RPHASE 0x8000
199
200/*************************** McBSP XCR2 bit definitions ***********************/
201#define XDATDLY(value) (value) /* Bits 0:1 */
202#define XFIG 0x0004
203#define XCOMPAND(value) ((value)<<3) /* Bits 3:4 */
204#define XWDLEN2(value) ((value)<<5) /* Bits 5:7 */
205#define XFRLEN2(value) ((value)<<8) /* Bits 8:14 */
206#define XPHASE 0x8000
207
208/************************* McBSP SRGR1 bit definitions ************************/
209#define CLKGDV(value) (value) /* Bits 0:7 */
210#define FWID(value) ((value)<<8) /* Bits 8:15 */
211
212/************************* McBSP SRGR2 bit definitions ************************/
213#define FPER(value) (value) /* Bits 0:11 */
214#define FSGM 0x1000
215#define CLKSM 0x2000
216#define CLKSP 0x4000
217#define GSYNC 0x8000
218
219/************************* McBSP MCR1 bit definitions *************************/
220#define RMCM 0x0001
221#define RCBLK(value) ((value)<<2) /* Bits 2:4 */
222#define RPABLK(value) ((value)<<5) /* Bits 5:6 */
223#define RPBBLK(value) ((value)<<7) /* Bits 7:8 */
224
225/************************* McBSP MCR2 bit definitions *************************/
226#define XMCM(value) (value) /* Bits 0:1 */
227#define XCBLK(value) ((value)<<2) /* Bits 2:4 */
228#define XPABLK(value) ((value)<<5) /* Bits 5:6 */
229#define XPBBLK(value) ((value)<<7) /* Bits 7:8 */
230
231
232/* we don't do multichannel for now */
233struct omap_mcbsp_reg_cfg {
234 u16 spcr2;
235 u16 spcr1;
236 u16 rcr2;
237 u16 rcr1;
238 u16 xcr2;
239 u16 xcr1;
240 u16 srgr2;
241 u16 srgr1;
242 u16 mcr2;
243 u16 mcr1;
244 u16 pcr0;
245 u16 rcerc;
246 u16 rcerd;
247 u16 xcerc;
248 u16 xcerd;
249 u16 rcere;
250 u16 rcerf;
251 u16 xcere;
252 u16 xcerf;
253 u16 rcerg;
254 u16 rcerh;
255 u16 xcerg;
256 u16 xcerh;
257};
258
259typedef enum {
260 OMAP_MCBSP1 = 0,
261 OMAP_MCBSP2,
262 OMAP_MCBSP3,
263} omap_mcbsp_id;
264
265typedef int __bitwise omap_mcbsp_io_type_t;
266#define OMAP_MCBSP_IRQ_IO ((__force omap_mcbsp_io_type_t) 1)
267#define OMAP_MCBSP_POLL_IO ((__force omap_mcbsp_io_type_t) 2)
268
269typedef enum {
270 OMAP_MCBSP_WORD_8 = 0,
271 OMAP_MCBSP_WORD_12,
272 OMAP_MCBSP_WORD_16,
273 OMAP_MCBSP_WORD_20,
274 OMAP_MCBSP_WORD_24,
275 OMAP_MCBSP_WORD_32,
276} omap_mcbsp_word_length;
277
278typedef enum {
279 OMAP_MCBSP_CLK_RISING = 0,
280 OMAP_MCBSP_CLK_FALLING,
281} omap_mcbsp_clk_polarity;
282
283typedef enum {
284 OMAP_MCBSP_FS_ACTIVE_HIGH = 0,
285 OMAP_MCBSP_FS_ACTIVE_LOW,
286} omap_mcbsp_fs_polarity;
287
288typedef enum {
289 OMAP_MCBSP_CLK_STP_MODE_NO_DELAY = 0,
290 OMAP_MCBSP_CLK_STP_MODE_DELAY,
291} omap_mcbsp_clk_stp_mode;
292
293
294/******* SPI specific mode **********/
295typedef enum {
296 OMAP_MCBSP_SPI_MASTER = 0,
297 OMAP_MCBSP_SPI_SLAVE,
298} omap_mcbsp_spi_mode;
299
300struct omap_mcbsp_spi_cfg {
301 omap_mcbsp_spi_mode spi_mode;
302 omap_mcbsp_clk_polarity rx_clock_polarity;
303 omap_mcbsp_clk_polarity tx_clock_polarity;
304 omap_mcbsp_fs_polarity fsx_polarity;
305 u8 clk_div;
306 omap_mcbsp_clk_stp_mode clk_stp_mode;
307 omap_mcbsp_word_length word_length;
308};
309
310/* Platform specific configuration */
311struct omap_mcbsp_ops {
312 void (*request)(unsigned int);
313 void (*free)(unsigned int);
314 int (*check)(unsigned int);
315};
316
317struct omap_mcbsp_platform_data {
318 u32 virt_base;
319 u8 dma_rx_sync, dma_tx_sync;
320 u16 rx_irq, tx_irq;
321 struct omap_mcbsp_ops *ops;
322 char const *clk_name;
323};
324
325struct omap_mcbsp {
326 struct device *dev;
327 u32 io_base;
328 u8 id;
329 u8 free;
330 omap_mcbsp_word_length rx_word_length;
331 omap_mcbsp_word_length tx_word_length;
332
333 omap_mcbsp_io_type_t io_type; /* IRQ or poll */
334 /* IRQ based TX/RX */
335 int rx_irq;
336 int tx_irq;
337
338 /* DMA stuff */
339 u8 dma_rx_sync;
340 short dma_rx_lch;
341 u8 dma_tx_sync;
342 short dma_tx_lch;
343
344 /* Completion queues */
345 struct completion tx_irq_completion;
346 struct completion rx_irq_completion;
347 struct completion tx_dma_completion;
348 struct completion rx_dma_completion;
349
350 /* Protect the field .free, while checking if the mcbsp is in use */
351 spinlock_t lock;
352 struct omap_mcbsp_platform_data *pdata;
353 struct clk *clk;
354};
355
356int omap_mcbsp_init(void);
357void omap_mcbsp_register_board_cfg(struct omap_mcbsp_platform_data *config,
358 int size);
359void omap_mcbsp_config(unsigned int id, const struct omap_mcbsp_reg_cfg * config);
360int omap_mcbsp_request(unsigned int id);
361void omap_mcbsp_free(unsigned int id);
362void omap_mcbsp_start(unsigned int id);
363void omap_mcbsp_stop(unsigned int id);
364void omap_mcbsp_xmit_word(unsigned int id, u32 word);
365u32 omap_mcbsp_recv_word(unsigned int id);
366
367int omap_mcbsp_xmit_buffer(unsigned int id, dma_addr_t buffer, unsigned int length);
368int omap_mcbsp_recv_buffer(unsigned int id, dma_addr_t buffer, unsigned int length);
369int omap_mcbsp_spi_master_xmit_word_poll(unsigned int id, u32 word);
370int omap_mcbsp_spi_master_recv_word_poll(unsigned int id, u32 * word);
371
372
373/* SPI specific API */
374void omap_mcbsp_set_spi_mode(unsigned int id, const struct omap_mcbsp_spi_cfg * spi_cfg);
375
376/* Polled read/write functions */
377int omap_mcbsp_pollread(unsigned int id, u16 * buf);
378int omap_mcbsp_pollwrite(unsigned int id, u16 buf);
379
380#endif
diff --git a/include/asm-arm/arch-omap/mcspi.h b/arch/arm/plat-omap/include/mach/mcspi.h
index 1254e4945b6f..1254e4945b6f 100644
--- a/include/asm-arm/arch-omap/mcspi.h
+++ b/arch/arm/plat-omap/include/mach/mcspi.h
diff --git a/arch/arm/plat-omap/include/mach/memory.h b/arch/arm/plat-omap/include/mach/memory.h
new file mode 100644
index 000000000000..037486c5f4a4
--- /dev/null
+++ b/arch/arm/plat-omap/include/mach/memory.h
@@ -0,0 +1,103 @@
1/*
2 * arch/arm/plat-omap/include/mach/memory.h
3 *
4 * Memory map for OMAP-1510 and 1610
5 *
6 * Copyright (C) 2000 RidgeRun, Inc.
7 * Author: Greg Lonnon <glonnon@ridgerun.com>
8 *
9 * This file was derived from arch/arm/mach-intergrator/include/mach/memory.h
10 * Copyright (C) 1999 ARM Limited
11 *
12 * This program is free software; you can redistribute it and/or modify it
13 * under the terms of the GNU General Public License as published by the
14 * Free Software Foundation; either version 2 of the License, or (at your
15 * option) any later version.
16 *
17 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
18 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
19 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
20 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
23 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
24 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 *
28 * You should have received a copy of the GNU General Public License along
29 * with this program; if not, write to the Free Software Foundation, Inc.,
30 * 675 Mass Ave, Cambridge, MA 02139, USA.
31 */
32
33#ifndef __ASM_ARCH_MEMORY_H
34#define __ASM_ARCH_MEMORY_H
35
36/*
37 * Physical DRAM offset.
38 */
39#if defined(CONFIG_ARCH_OMAP1)
40#define PHYS_OFFSET UL(0x10000000)
41#elif defined(CONFIG_ARCH_OMAP2)
42#define PHYS_OFFSET UL(0x80000000)
43#endif
44
45/*
46 * Conversion between SDRAM and fake PCI bus, used by USB
47 * NOTE: Physical address must be converted to Local Bus address
48 * on OMAP-1510 only
49 */
50
51/*
52 * Bus address is physical address, except for OMAP-1510 Local Bus.
53 */
54#define __virt_to_bus(x) __virt_to_phys(x)
55#define __bus_to_virt(x) __phys_to_virt(x)
56
57/*
58 * OMAP-1510 bus address is translated into a Local Bus address if the
59 * OMAP bus type is lbus. We do the address translation based on the
60 * device overriding the defaults used in the dma-mapping API.
61 * Note that the is_lbus_device() test is not very efficient on 1510
62 * because of the strncmp().
63 */
64#ifdef CONFIG_ARCH_OMAP15XX
65
66/*
67 * OMAP-1510 Local Bus address offset
68 */
69#define OMAP1510_LB_OFFSET UL(0x30000000)
70
71#define virt_to_lbus(x) ((x) - PAGE_OFFSET + OMAP1510_LB_OFFSET)
72#define lbus_to_virt(x) ((x) - OMAP1510_LB_OFFSET + PAGE_OFFSET)
73#define is_lbus_device(dev) (cpu_is_omap15xx() && dev && (strncmp(dev->bus_id, "ohci", 4) == 0))
74
75#define __arch_page_to_dma(dev, page) ({is_lbus_device(dev) ? \
76 (dma_addr_t)virt_to_lbus(page_address(page)) : \
77 (dma_addr_t)__virt_to_bus(page_address(page));})
78
79#define __arch_dma_to_virt(dev, addr) ({is_lbus_device(dev) ? \
80 lbus_to_virt(addr) : \
81 __bus_to_virt(addr);})
82
83#define __arch_virt_to_dma(dev, addr) ({is_lbus_device(dev) ? \
84 virt_to_lbus(addr) : \
85 __virt_to_bus(addr);})
86
87#endif /* CONFIG_ARCH_OMAP15XX */
88
89/* Override the ARM default */
90#ifdef CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE
91
92#if (CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE == 0)
93#undef CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE
94#define CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE 2
95#endif
96
97#define CONSISTENT_DMA_SIZE \
98 (((CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE + 1) & ~1) * 1024 * 1024)
99
100#endif
101
102#endif
103
diff --git a/arch/arm/plat-omap/include/mach/menelaus.h b/arch/arm/plat-omap/include/mach/menelaus.h
new file mode 100644
index 000000000000..3122bf68c7ce
--- /dev/null
+++ b/arch/arm/plat-omap/include/mach/menelaus.h
@@ -0,0 +1,49 @@
1/*
2 * arch/arm/plat-omap/include/mach/menelaus.h
3 *
4 * Functions to access Menelaus power management chip
5 */
6
7#ifndef __ASM_ARCH_MENELAUS_H
8#define __ASM_ARCH_MENELAUS_H
9
10struct device;
11
12struct menelaus_platform_data {
13 int (* late_init)(struct device *dev);
14};
15
16extern int menelaus_register_mmc_callback(void (*callback)(void *data, u8 card_mask),
17 void *data);
18extern void menelaus_unregister_mmc_callback(void);
19extern int menelaus_set_mmc_opendrain(int slot, int enable);
20extern int menelaus_set_mmc_slot(int slot, int enable, int power, int cd_on);
21
22extern int menelaus_set_vmem(unsigned int mV);
23extern int menelaus_set_vio(unsigned int mV);
24extern int menelaus_set_vmmc(unsigned int mV);
25extern int menelaus_set_vaux(unsigned int mV);
26extern int menelaus_set_vdcdc(int dcdc, unsigned int mV);
27extern int menelaus_set_slot_sel(int enable);
28extern int menelaus_get_slot_pin_states(void);
29extern int menelaus_set_vcore_sw(unsigned int mV);
30extern int menelaus_set_vcore_hw(unsigned int roof_mV, unsigned int floor_mV);
31
32#define EN_VPLL_SLEEP (1 << 7)
33#define EN_VMMC_SLEEP (1 << 6)
34#define EN_VAUX_SLEEP (1 << 5)
35#define EN_VIO_SLEEP (1 << 4)
36#define EN_VMEM_SLEEP (1 << 3)
37#define EN_DC3_SLEEP (1 << 2)
38#define EN_DC2_SLEEP (1 << 1)
39#define EN_VC_SLEEP (1 << 0)
40
41extern int menelaus_set_regulator_sleep(int enable, u32 val);
42
43#if defined(CONFIG_ARCH_OMAP24XX) && defined(CONFIG_MENELAUS)
44#define omap_has_menelaus() 1
45#else
46#define omap_has_menelaus() 0
47#endif
48
49#endif
diff --git a/arch/arm/plat-omap/include/mach/mmc.h b/arch/arm/plat-omap/include/mach/mmc.h
new file mode 100644
index 000000000000..fc15d13058fc
--- /dev/null
+++ b/arch/arm/plat-omap/include/mach/mmc.h
@@ -0,0 +1,74 @@
1/*
2 * MMC definitions for OMAP2
3 *
4 * Copyright (C) 2006 Nokia Corporation
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10
11#ifndef __OMAP2_MMC_H
12#define __OMAP2_MMC_H
13
14#include <linux/types.h>
15#include <linux/device.h>
16#include <linux/mmc/host.h>
17
18#include <mach/board.h>
19
20#define OMAP_MMC_MAX_SLOTS 2
21
22struct omap_mmc_platform_data {
23 struct omap_mmc_conf conf;
24
25 /* number of slots on board */
26 unsigned nr_slots:2;
27
28 /* set if your board has components or wiring that limits the
29 * maximum frequency on the MMC bus */
30 unsigned int max_freq;
31
32 /* switch the bus to a new slot */
33 int (* switch_slot)(struct device *dev, int slot);
34 /* initialize board-specific MMC functionality, can be NULL if
35 * not supported */
36 int (* init)(struct device *dev);
37 void (* cleanup)(struct device *dev);
38 void (* shutdown)(struct device *dev);
39
40 /* To handle board related suspend/resume functionality for MMC */
41 int (*suspend)(struct device *dev, int slot);
42 int (*resume)(struct device *dev, int slot);
43
44 struct omap_mmc_slot_data {
45 int (* set_bus_mode)(struct device *dev, int slot, int bus_mode);
46 int (* set_power)(struct device *dev, int slot, int power_on, int vdd);
47 int (* get_ro)(struct device *dev, int slot);
48
49 /* return MMC cover switch state, can be NULL if not supported.
50 *
51 * possible return values:
52 * 0 - open
53 * 1 - closed
54 */
55 int (* get_cover_state)(struct device *dev, int slot);
56
57 const char *name;
58 u32 ocr_mask;
59
60 /* Card detection IRQs */
61 int card_detect_irq;
62 int (* card_detect)(int irq);
63
64 unsigned int ban_openended:1;
65
66 } slots[OMAP_MMC_MAX_SLOTS];
67};
68
69extern void omap_set_mmc_info(int host, const struct omap_mmc_platform_data *info);
70
71/* called from board-specific card detection service routine */
72extern void omap_mmc_notify_cover_event(struct device *dev, int slot, int is_closed);
73
74#endif
diff --git a/arch/arm/plat-omap/include/mach/mtd-xip.h b/arch/arm/plat-omap/include/mach/mtd-xip.h
new file mode 100644
index 000000000000..5cee7e16a1b4
--- /dev/null
+++ b/arch/arm/plat-omap/include/mach/mtd-xip.h
@@ -0,0 +1,61 @@
1/*
2 * MTD primitives for XIP support. Architecture specific functions.
3 *
4 * Do not include this file directly. It's included from linux/mtd/xip.h
5 *
6 * Author: Vladimir Barinov <vbarinov@ru.mvista.com>
7 *
8 * (c) 2005 MontaVista Software, Inc. This file is licensed under the
9 * terms of the GNU General Public License version 2. This program is
10 * licensed "as is" without any warranty of any kind, whether express or
11 * implied.
12 */
13
14#ifndef __ARCH_OMAP_MTD_XIP_H__
15#define __ARCH_OMAP_MTD_XIP_H__
16
17#include <mach/hardware.h>
18#define OMAP_MPU_TIMER_BASE (0xfffec500)
19#define OMAP_MPU_TIMER_OFFSET 0x100
20
21typedef struct {
22 u32 cntl; /* CNTL_TIMER, R/W */
23 u32 load_tim; /* LOAD_TIM, W */
24 u32 read_tim; /* READ_TIM, R */
25} xip_omap_mpu_timer_regs_t;
26
27#define xip_omap_mpu_timer_base(n) \
28((volatile xip_omap_mpu_timer_regs_t*)IO_ADDRESS(OMAP_MPU_TIMER_BASE + \
29 (n)*OMAP_MPU_TIMER_OFFSET))
30
31static inline unsigned long xip_omap_mpu_timer_read(int nr)
32{
33 volatile xip_omap_mpu_timer_regs_t* timer = xip_omap_mpu_timer_base(nr);
34 return timer->read_tim;
35}
36
37#define xip_irqpending() \
38 (omap_readl(OMAP_IH1_ITR) & ~omap_readl(OMAP_IH1_MIR))
39#define xip_currtime() (~xip_omap_mpu_timer_read(0))
40
41/*
42 * It's permitted to do approxmation for xip_elapsed_since macro
43 * (see linux/mtd/xip.h)
44 */
45
46#ifdef CONFIG_MACH_OMAP_PERSEUS2
47#define xip_elapsed_since(x) (signed)((~xip_omap_mpu_timer_read(0) - (x)) / 7)
48#else
49#define xip_elapsed_since(x) (signed)((~xip_omap_mpu_timer_read(0) - (x)) / 6)
50#endif
51
52/*
53 * xip_cpu_idle() is used when waiting for a delay equal or larger than
54 * the system timer tick period. This should put the CPU into idle mode
55 * to save power and to be woken up only when some interrupts are pending.
56 * As above, this should not rely upon standard kernel code.
57 */
58
59#define xip_cpu_idle() asm volatile ("mcr p15, 0, %0, c7, c0, 4" :: "r" (1))
60
61#endif /* __ARCH_OMAP_MTD_XIP_H__ */
diff --git a/arch/arm/plat-omap/include/mach/mux.h b/arch/arm/plat-omap/include/mach/mux.h
new file mode 100644
index 000000000000..614b2c1327c7
--- /dev/null
+++ b/arch/arm/plat-omap/include/mach/mux.h
@@ -0,0 +1,615 @@
1/*
2 * arch/arm/plat-omap/include/mach/mux.h
3 *
4 * Table of the Omap register configurations for the FUNC_MUX and
5 * PULL_DWN combinations.
6 *
7 * Copyright (C) 2004 - 2008 Texas Instruments Inc.
8 * Copyright (C) 2003 - 2008 Nokia Corporation
9 *
10 * Written by Tony Lindgren
11 *
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 2 of the License, or
15 * (at your option) any later version.
16 *
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 *
26 * NOTE: Please use the following naming style for new pin entries.
27 * For example, W8_1610_MMC2_DAT0, where:
28 * - W8 = ball
29 * - 1610 = 1510 or 1610, none if common for both 1510 and 1610
30 * - MMC2_DAT0 = function
31 */
32
33#ifndef __ASM_ARCH_MUX_H
34#define __ASM_ARCH_MUX_H
35
36#define PU_PD_SEL_NA 0 /* No pu_pd reg available */
37#define PULL_DWN_CTRL_NA 0 /* No pull-down control needed */
38
39#ifdef CONFIG_OMAP_MUX_DEBUG
40#define MUX_REG(reg, mode_offset, mode) .mux_reg_name = "FUNC_MUX_CTRL_"#reg, \
41 .mux_reg = FUNC_MUX_CTRL_##reg, \
42 .mask_offset = mode_offset, \
43 .mask = mode,
44
45#define PULL_REG(reg, bit, status) .pull_name = "PULL_DWN_CTRL_"#reg, \
46 .pull_reg = PULL_DWN_CTRL_##reg, \
47 .pull_bit = bit, \
48 .pull_val = status,
49
50#define PU_PD_REG(reg, status) .pu_pd_name = "PU_PD_SEL_"#reg, \
51 .pu_pd_reg = PU_PD_SEL_##reg, \
52 .pu_pd_val = status,
53
54#define MUX_REG_730(reg, mode_offset, mode) .mux_reg_name = "OMAP730_IO_CONF_"#reg, \
55 .mux_reg = OMAP730_IO_CONF_##reg, \
56 .mask_offset = mode_offset, \
57 .mask = mode,
58
59#define PULL_REG_730(reg, bit, status) .pull_name = "OMAP730_IO_CONF_"#reg, \
60 .pull_reg = OMAP730_IO_CONF_##reg, \
61 .pull_bit = bit, \
62 .pull_val = status,
63
64#else
65
66#define MUX_REG(reg, mode_offset, mode) .mux_reg = FUNC_MUX_CTRL_##reg, \
67 .mask_offset = mode_offset, \
68 .mask = mode,
69
70#define PULL_REG(reg, bit, status) .pull_reg = PULL_DWN_CTRL_##reg, \
71 .pull_bit = bit, \
72 .pull_val = status,
73
74#define PU_PD_REG(reg, status) .pu_pd_reg = PU_PD_SEL_##reg, \
75 .pu_pd_val = status,
76
77#define MUX_REG_730(reg, mode_offset, mode) \
78 .mux_reg = OMAP730_IO_CONF_##reg, \
79 .mask_offset = mode_offset, \
80 .mask = mode,
81
82#define PULL_REG_730(reg, bit, status) .pull_reg = OMAP730_IO_CONF_##reg, \
83 .pull_bit = bit, \
84 .pull_val = status,
85
86#endif /* CONFIG_OMAP_MUX_DEBUG */
87
88#define MUX_CFG(desc, mux_reg, mode_offset, mode, \
89 pull_reg, pull_bit, pull_status, \
90 pu_pd_reg, pu_pd_status, debug_status) \
91{ \
92 .name = desc, \
93 .debug = debug_status, \
94 MUX_REG(mux_reg, mode_offset, mode) \
95 PULL_REG(pull_reg, pull_bit, pull_status) \
96 PU_PD_REG(pu_pd_reg, pu_pd_status) \
97},
98
99
100/*
101 * OMAP730 has a slightly different config for the pin mux.
102 * - config regs are the OMAP730_IO_CONF_x regs (see omap730.h) regs and
103 * not the FUNC_MUX_CTRL_x regs from hardware.h
104 * - for pull-up/down, only has one enable bit which is is in the same register
105 * as mux config
106 */
107#define MUX_CFG_730(desc, mux_reg, mode_offset, mode, \
108 pull_bit, pull_status, debug_status)\
109{ \
110 .name = desc, \
111 .debug = debug_status, \
112 MUX_REG_730(mux_reg, mode_offset, mode) \
113 PULL_REG_730(mux_reg, pull_bit, pull_status) \
114 PU_PD_REG(NA, 0) \
115},
116
117#define MUX_CFG_24XX(desc, reg_offset, mode, \
118 pull_en, pull_mode, dbg) \
119{ \
120 .name = desc, \
121 .debug = dbg, \
122 .mux_reg = reg_offset, \
123 .mask = mode, \
124 .pull_val = pull_en, \
125 .pu_pd_val = pull_mode, \
126},
127
128
129#define PULL_DISABLED 0
130#define PULL_ENABLED 1
131
132#define PULL_DOWN 0
133#define PULL_UP 1
134
135struct pin_config {
136 char *name;
137 unsigned char busy;
138 unsigned char debug;
139
140 const char *mux_reg_name;
141 const unsigned int mux_reg;
142 const unsigned char mask_offset;
143 const unsigned char mask;
144
145 const char *pull_name;
146 const unsigned int pull_reg;
147 const unsigned char pull_val;
148 const unsigned char pull_bit;
149
150 const char *pu_pd_name;
151 const unsigned int pu_pd_reg;
152 const unsigned char pu_pd_val;
153};
154
155enum omap730_index {
156 /* OMAP 730 keyboard */
157 E2_730_KBR0,
158 J7_730_KBR1,
159 E1_730_KBR2,
160 F3_730_KBR3,
161 D2_730_KBR4,
162 C2_730_KBC0,
163 D3_730_KBC1,
164 E4_730_KBC2,
165 F4_730_KBC3,
166 E3_730_KBC4,
167
168 /* USB */
169 AA17_730_USB_DM,
170 W16_730_USB_PU_EN,
171 W17_730_USB_VBUSI,
172};
173
174enum omap1xxx_index {
175 /* UART1 (BT_UART_GATING)*/
176 UART1_TX = 0,
177 UART1_RTS,
178
179 /* UART2 (COM_UART_GATING)*/
180 UART2_TX,
181 UART2_RX,
182 UART2_CTS,
183 UART2_RTS,
184
185 /* UART3 (GIGA_UART_GATING) */
186 UART3_TX,
187 UART3_RX,
188 UART3_CTS,
189 UART3_RTS,
190 UART3_CLKREQ,
191 UART3_BCLK, /* 12MHz clock out */
192 Y15_1610_UART3_RTS,
193
194 /* PWT & PWL */
195 PWT,
196 PWL,
197
198 /* USB master generic */
199 R18_USB_VBUS,
200 R18_1510_USB_GPIO0,
201 W4_USB_PUEN,
202 W4_USB_CLKO,
203 W4_USB_HIGHZ,
204 W4_GPIO58,
205
206 /* USB1 master */
207 USB1_SUSP,
208 USB1_SEO,
209 W13_1610_USB1_SE0,
210 USB1_TXEN,
211 USB1_TXD,
212 USB1_VP,
213 USB1_VM,
214 USB1_RCV,
215 USB1_SPEED,
216 R13_1610_USB1_SPEED,
217 R13_1710_USB1_SE0,
218
219 /* USB2 master */
220 USB2_SUSP,
221 USB2_VP,
222 USB2_TXEN,
223 USB2_VM,
224 USB2_RCV,
225 USB2_SEO,
226 USB2_TXD,
227
228 /* OMAP-1510 GPIO */
229 R18_1510_GPIO0,
230 R19_1510_GPIO1,
231 M14_1510_GPIO2,
232
233 /* OMAP1610 GPIO */
234 P18_1610_GPIO3,
235 Y15_1610_GPIO17,
236
237 /* OMAP-1710 GPIO */
238 R18_1710_GPIO0,
239 V2_1710_GPIO10,
240 N21_1710_GPIO14,
241 W15_1710_GPIO40,
242
243 /* MPUIO */
244 MPUIO2,
245 N15_1610_MPUIO2,
246 MPUIO4,
247 MPUIO5,
248 T20_1610_MPUIO5,
249 W11_1610_MPUIO6,
250 V10_1610_MPUIO7,
251 W11_1610_MPUIO9,
252 V10_1610_MPUIO10,
253 W10_1610_MPUIO11,
254 E20_1610_MPUIO13,
255 U20_1610_MPUIO14,
256 E19_1610_MPUIO15,
257
258 /* MCBSP2 */
259 MCBSP2_CLKR,
260 MCBSP2_CLKX,
261 MCBSP2_DR,
262 MCBSP2_DX,
263 MCBSP2_FSR,
264 MCBSP2_FSX,
265
266 /* MCBSP3 */
267 MCBSP3_CLKX,
268
269 /* Misc ballouts */
270 BALLOUT_V8_ARMIO3,
271 N20_HDQ,
272
273 /* OMAP-1610 MMC2 */
274 W8_1610_MMC2_DAT0,
275 V8_1610_MMC2_DAT1,
276 W15_1610_MMC2_DAT2,
277 R10_1610_MMC2_DAT3,
278 Y10_1610_MMC2_CLK,
279 Y8_1610_MMC2_CMD,
280 V9_1610_MMC2_CMDDIR,
281 V5_1610_MMC2_DATDIR0,
282 W19_1610_MMC2_DATDIR1,
283 R18_1610_MMC2_CLKIN,
284
285 /* OMAP-1610 External Trace Interface */
286 M19_1610_ETM_PSTAT0,
287 L15_1610_ETM_PSTAT1,
288 L18_1610_ETM_PSTAT2,
289 L19_1610_ETM_D0,
290 J19_1610_ETM_D6,
291 J18_1610_ETM_D7,
292
293 /* OMAP16XX GPIO */
294 P20_1610_GPIO4,
295 V9_1610_GPIO7,
296 W8_1610_GPIO9,
297 N20_1610_GPIO11,
298 N19_1610_GPIO13,
299 P10_1610_GPIO22,
300 V5_1610_GPIO24,
301 AA20_1610_GPIO_41,
302 W19_1610_GPIO48,
303 M7_1610_GPIO62,
304 V14_16XX_GPIO37,
305 R9_16XX_GPIO18,
306 L14_16XX_GPIO49,
307
308 /* OMAP-1610 uWire */
309 V19_1610_UWIRE_SCLK,
310 U18_1610_UWIRE_SDI,
311 W21_1610_UWIRE_SDO,
312 N14_1610_UWIRE_CS0,
313 P15_1610_UWIRE_CS3,
314 N15_1610_UWIRE_CS1,
315
316 /* OMAP-1610 SPI */
317 U19_1610_SPIF_SCK,
318 U18_1610_SPIF_DIN,
319 P20_1610_SPIF_DIN,
320 W21_1610_SPIF_DOUT,
321 R18_1610_SPIF_DOUT,
322 N14_1610_SPIF_CS0,
323 N15_1610_SPIF_CS1,
324 T19_1610_SPIF_CS2,
325 P15_1610_SPIF_CS3,
326
327 /* OMAP-1610 Flash */
328 L3_1610_FLASH_CS2B_OE,
329 M8_1610_FLASH_CS2B_WE,
330
331 /* First MMC */
332 MMC_CMD,
333 MMC_DAT1,
334 MMC_DAT2,
335 MMC_DAT0,
336 MMC_CLK,
337 MMC_DAT3,
338
339 /* OMAP-1710 MMC CMDDIR and DATDIR0 */
340 M15_1710_MMC_CLKI,
341 P19_1710_MMC_CMDDIR,
342 P20_1710_MMC_DATDIR0,
343
344 /* OMAP-1610 USB0 alternate pin configuration */
345 W9_USB0_TXEN,
346 AA9_USB0_VP,
347 Y5_USB0_RCV,
348 R9_USB0_VM,
349 V6_USB0_TXD,
350 W5_USB0_SE0,
351 V9_USB0_SPEED,
352 V9_USB0_SUSP,
353
354 /* USB2 */
355 W9_USB2_TXEN,
356 AA9_USB2_VP,
357 Y5_USB2_RCV,
358 R9_USB2_VM,
359 V6_USB2_TXD,
360 W5_USB2_SE0,
361
362 /* 16XX UART */
363 R13_1610_UART1_TX,
364 V14_16XX_UART1_RX,
365 R14_1610_UART1_CTS,
366 AA15_1610_UART1_RTS,
367 R9_16XX_UART2_RX,
368 L14_16XX_UART3_RX,
369
370 /* I2C OMAP-1610 */
371 I2C_SCL,
372 I2C_SDA,
373
374 /* Keypad */
375 F18_1610_KBC0,
376 D20_1610_KBC1,
377 D19_1610_KBC2,
378 E18_1610_KBC3,
379 C21_1610_KBC4,
380 G18_1610_KBR0,
381 F19_1610_KBR1,
382 H14_1610_KBR2,
383 E20_1610_KBR3,
384 E19_1610_KBR4,
385 N19_1610_KBR5,
386
387 /* Power management */
388 T20_1610_LOW_PWR,
389
390 /* MCLK Settings */
391 V5_1710_MCLK_ON,
392 V5_1710_MCLK_OFF,
393 R10_1610_MCLK_ON,
394 R10_1610_MCLK_OFF,
395
396 /* CompactFlash controller */
397 P11_1610_CF_CD2,
398 R11_1610_CF_IOIS16,
399 V10_1610_CF_IREQ,
400 W10_1610_CF_RESET,
401 W11_1610_CF_CD1,
402
403 /* parallel camera */
404 J15_1610_CAM_LCLK,
405 J18_1610_CAM_D7,
406 J19_1610_CAM_D6,
407 J14_1610_CAM_D5,
408 K18_1610_CAM_D4,
409 K19_1610_CAM_D3,
410 K15_1610_CAM_D2,
411 K14_1610_CAM_D1,
412 L19_1610_CAM_D0,
413 L18_1610_CAM_VS,
414 L15_1610_CAM_HS,
415 M19_1610_CAM_RSTZ,
416 Y15_1610_CAM_OUTCLK,
417
418 /* serial camera */
419 H19_1610_CAM_EXCLK,
420 Y12_1610_CCP_CLKP,
421 W13_1610_CCP_CLKM,
422 W14_1610_CCP_DATAP,
423 Y14_1610_CCP_DATAM,
424
425};
426
427enum omap24xx_index {
428 /* 24xx I2C */
429 M19_24XX_I2C1_SCL,
430 L15_24XX_I2C1_SDA,
431 J15_24XX_I2C2_SCL,
432 H19_24XX_I2C2_SDA,
433
434 /* 24xx Menelaus interrupt */
435 W19_24XX_SYS_NIRQ,
436
437 /* 24xx clock */
438 W14_24XX_SYS_CLKOUT,
439
440 /* 24xx GPMC chipselects, wait pin monitoring */
441 E2_GPMC_NCS2,
442 L2_GPMC_NCS7,
443 L3_GPMC_WAIT0,
444 N7_GPMC_WAIT1,
445 M1_GPMC_WAIT2,
446 P1_GPMC_WAIT3,
447
448 /* 242X McBSP */
449 Y15_24XX_MCBSP2_CLKX,
450 R14_24XX_MCBSP2_FSX,
451 W15_24XX_MCBSP2_DR,
452 V15_24XX_MCBSP2_DX,
453
454 /* 24xx GPIO */
455 M21_242X_GPIO11,
456 P21_242X_GPIO12,
457 AA10_242X_GPIO13,
458 AA6_242X_GPIO14,
459 AA4_242X_GPIO15,
460 Y11_242X_GPIO16,
461 AA12_242X_GPIO17,
462 AA8_242X_GPIO58,
463 Y20_24XX_GPIO60,
464 W4__24XX_GPIO74,
465 N15_24XX_GPIO85,
466 M15_24XX_GPIO92,
467 P20_24XX_GPIO93,
468 P18_24XX_GPIO95,
469 M18_24XX_GPIO96,
470 L14_24XX_GPIO97,
471 J15_24XX_GPIO99,
472 V14_24XX_GPIO117,
473 P14_24XX_GPIO125,
474
475 /* 242x DBG GPIO */
476 V4_242X_GPIO49,
477 W2_242X_GPIO50,
478 U4_242X_GPIO51,
479 V3_242X_GPIO52,
480 V2_242X_GPIO53,
481 V6_242X_GPIO53,
482 T4_242X_GPIO54,
483 Y4_242X_GPIO54,
484 T3_242X_GPIO55,
485 U2_242X_GPIO56,
486
487 /* 24xx external DMA requests */
488 AA10_242X_DMAREQ0,
489 AA6_242X_DMAREQ1,
490 E4_242X_DMAREQ2,
491 G4_242X_DMAREQ3,
492 D3_242X_DMAREQ4,
493 E3_242X_DMAREQ5,
494
495 /* UART3 */
496 K15_24XX_UART3_TX,
497 K14_24XX_UART3_RX,
498
499 /* MMC/SDIO */
500 G19_24XX_MMC_CLKO,
501 H18_24XX_MMC_CMD,
502 F20_24XX_MMC_DAT0,
503 H14_24XX_MMC_DAT1,
504 E19_24XX_MMC_DAT2,
505 D19_24XX_MMC_DAT3,
506 F19_24XX_MMC_DAT_DIR0,
507 E20_24XX_MMC_DAT_DIR1,
508 F18_24XX_MMC_DAT_DIR2,
509 E18_24XX_MMC_DAT_DIR3,
510 G18_24XX_MMC_CMD_DIR,
511 H15_24XX_MMC_CLKI,
512
513 /* Full speed USB */
514 J20_24XX_USB0_PUEN,
515 J19_24XX_USB0_VP,
516 K20_24XX_USB0_VM,
517 J18_24XX_USB0_RCV,
518 K19_24XX_USB0_TXEN,
519 J14_24XX_USB0_SE0,
520 K18_24XX_USB0_DAT,
521
522 N14_24XX_USB1_SE0,
523 W12_24XX_USB1_SE0,
524 P15_24XX_USB1_DAT,
525 R13_24XX_USB1_DAT,
526 W20_24XX_USB1_TXEN,
527 P13_24XX_USB1_TXEN,
528 V19_24XX_USB1_RCV,
529 V12_24XX_USB1_RCV,
530
531 AA10_24XX_USB2_SE0,
532 Y11_24XX_USB2_DAT,
533 AA12_24XX_USB2_TXEN,
534 AA6_24XX_USB2_RCV,
535 AA4_24XX_USB2_TLLSE0,
536
537 /* Keypad GPIO*/
538 T19_24XX_KBR0,
539 R19_24XX_KBR1,
540 V18_24XX_KBR2,
541 M21_24XX_KBR3,
542 E5__24XX_KBR4,
543 M18_24XX_KBR5,
544 R20_24XX_KBC0,
545 M14_24XX_KBC1,
546 H19_24XX_KBC2,
547 V17_24XX_KBC3,
548 P21_24XX_KBC4,
549 L14_24XX_KBC5,
550 N19_24XX_KBC6,
551
552 /* 24xx Menelaus Keypad GPIO */
553 B3__24XX_KBR5,
554 AA4_24XX_KBC2,
555 B13_24XX_KBC6,
556
557 /* 2430 USB */
558 AD9_2430_USB0_PUEN,
559 Y11_2430_USB0_VP,
560 AD7_2430_USB0_VM,
561 AE7_2430_USB0_RCV,
562 AD4_2430_USB0_TXEN,
563 AF9_2430_USB0_SE0,
564 AE6_2430_USB0_DAT,
565 AD24_2430_USB1_SE0,
566 AB24_2430_USB1_RCV,
567 Y25_2430_USB1_TXEN,
568 AA26_2430_USB1_DAT,
569
570 /* 2430 HS-USB */
571 AD9_2430_USB0HS_DATA3,
572 Y11_2430_USB0HS_DATA4,
573 AD7_2430_USB0HS_DATA5,
574 AE7_2430_USB0HS_DATA6,
575 AD4_2430_USB0HS_DATA2,
576 AF9_2430_USB0HS_DATA0,
577 AE6_2430_USB0HS_DATA1,
578 AE8_2430_USB0HS_CLK,
579 AD8_2430_USB0HS_DIR,
580 AE5_2430_USB0HS_STP,
581 AE9_2430_USB0HS_NXT,
582 AC7_2430_USB0HS_DATA7,
583
584 /* 2430 McBSP */
585 AC10_2430_MCBSP2_FSX,
586 AD16_2430_MCBSP2_CLX,
587 AE13_2430_MCBSP2_DX,
588 AD13_2430_MCBSP2_DR,
589 AC10_2430_MCBSP2_FSX_OFF,
590 AD16_2430_MCBSP2_CLX_OFF,
591 AE13_2430_MCBSP2_DX_OFF,
592 AD13_2430_MCBSP2_DR_OFF,
593
594};
595
596struct omap_mux_cfg {
597 struct pin_config *pins;
598 unsigned long size;
599 int (*cfg_reg)(const struct pin_config *cfg);
600};
601
602#ifdef CONFIG_OMAP_MUX
603/* setup pin muxing in Linux */
604extern int omap1_mux_init(void);
605extern int omap2_mux_init(void);
606extern int omap_mux_register(struct omap_mux_cfg *);
607extern int omap_cfg_reg(unsigned long reg_cfg);
608#else
609/* boot loader does it all (no warnings from CONFIG_OMAP_MUX_WARNINGS) */
610static inline int omap1_mux_init(void) { return 0; }
611static inline int omap2_mux_init(void) { return 0; }
612static inline int omap_cfg_reg(unsigned long reg_cfg) { return 0; }
613#endif
614
615#endif
diff --git a/arch/arm/plat-omap/include/mach/nand.h b/arch/arm/plat-omap/include/mach/nand.h
new file mode 100644
index 000000000000..631a7bed1eef
--- /dev/null
+++ b/arch/arm/plat-omap/include/mach/nand.h
@@ -0,0 +1,24 @@
1/*
2 * arch/arm/plat-omap/include/mach/nand.h
3 *
4 * Copyright (C) 2006 Micron Technology Inc.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10
11#include <linux/mtd/partitions.h>
12
13struct omap_nand_platform_data {
14 unsigned int options;
15 int cs;
16 int gpio_irq;
17 struct mtd_partition *parts;
18 int nr_parts;
19 int (*nand_setup)(void __iomem *);
20 int (*dev_ready)(struct omap_nand_platform_data *);
21 int dma_channel;
22 void __iomem *gpmc_cs_baseaddr;
23 void __iomem *gpmc_baseaddr;
24};
diff --git a/arch/arm/plat-omap/include/mach/omap-alsa.h b/arch/arm/plat-omap/include/mach/omap-alsa.h
new file mode 100644
index 000000000000..bdf30a0f87f2
--- /dev/null
+++ b/arch/arm/plat-omap/include/mach/omap-alsa.h
@@ -0,0 +1,123 @@
1/*
2 * arch/arm/plat-omap/include/mach/omap-alsa.h
3 *
4 * Alsa Driver for AIC23 and TSC2101 codecs on OMAP platform boards.
5 *
6 * Copyright (C) 2006 Mika Laitio <lamikr@cc.jyu.fi>
7 *
8 * Copyright (C) 2005 Instituto Nokia de Tecnologia - INdT - Manaus Brazil
9 * Written by Daniel Petrini, David Cohen, Anderson Briglia
10 * {daniel.petrini, david.cohen, anderson.briglia}@indt.org.br
11 *
12 * This program is free software; you can redistribute it and/or modify it
13 * under the terms of the GNU General Public License as published by the
14 * Free Software Foundation; either version 2 of the License, or (at your
15 * option) any later version.
16 *
17 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
18 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
19 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
20 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
23 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
24 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 *
28 * You should have received a copy of the GNU General Public License along
29 * with this program; if not, write to the Free Software Foundation, Inc.,
30 * 675 Mass Ave, Cambridge, MA 02139, USA.
31 *
32 * History
33 * -------
34 *
35 * 2005/07/25 INdT-10LE Kernel Team - Alsa driver for omap osk,
36 * original version based in sa1100 driver
37 * and omap oss driver.
38 */
39
40#ifndef __OMAP_ALSA_H
41#define __OMAP_ALSA_H
42
43#include <mach/dma.h>
44#include <sound/core.h>
45#include <sound/pcm.h>
46#include <mach/mcbsp.h>
47#include <linux/platform_device.h>
48
49#define DMA_BUF_SIZE (1024 * 8)
50
51/*
52 * Buffer management for alsa and dma
53 */
54struct audio_stream {
55 char *id; /* identification string */
56 int stream_id; /* numeric identification */
57 int dma_dev; /* dma number of that device */
58 int *lch; /* Chain of channels this stream is linked to */
59 char started; /* to store if the chain was started or not */
60 int dma_q_head; /* DMA Channel Q Head */
61 int dma_q_tail; /* DMA Channel Q Tail */
62 char dma_q_count; /* DMA Channel Q Count */
63 int active:1; /* we are using this stream for transfer now */
64 int period; /* current transfer period */
65 int periods; /* current count of periods registerd in the DMA engine */
66 spinlock_t dma_lock; /* for locking in DMA operations */
67 struct snd_pcm_substream *stream; /* the pcm stream */
68 unsigned linked:1; /* dma channels linked */
69 int offset; /* store start position of the last period in the alsa buffer */
70 int (*hw_start)(void); /* interface to start HW interface, e.g. McBSP */
71 int (*hw_stop)(void); /* interface to stop HW interface, e.g. McBSP */
72};
73
74/*
75 * Alsa card structure for aic23
76 */
77struct snd_card_omap_codec {
78 struct snd_card *card;
79 struct snd_pcm *pcm;
80 long samplerate;
81 struct audio_stream s[2]; /* playback & capture */
82};
83
84/* Codec specific information and function pointers.
85 * Codec (omap-alsa-aic23.c and omap-alsa-tsc2101.c)
86 * are responsible for defining the function pointers.
87 */
88struct omap_alsa_codec_config {
89 char *name;
90 struct omap_mcbsp_reg_cfg *mcbsp_regs_alsa;
91 struct snd_pcm_hw_constraint_list *hw_constraints_rates;
92 struct snd_pcm_hardware *snd_omap_alsa_playback;
93 struct snd_pcm_hardware *snd_omap_alsa_capture;
94 void (*codec_configure_dev)(void);
95 void (*codec_set_samplerate)(long);
96 void (*codec_clock_setup)(void);
97 int (*codec_clock_on)(void);
98 int (*codec_clock_off)(void);
99 int (*get_default_samplerate)(void);
100};
101
102/*********** Mixer function prototypes *************************/
103int snd_omap_mixer(struct snd_card_omap_codec *);
104void snd_omap_init_mixer(void);
105
106#ifdef CONFIG_PM
107void snd_omap_suspend_mixer(void);
108void snd_omap_resume_mixer(void);
109#endif
110
111int snd_omap_alsa_post_probe(struct platform_device *pdev, struct omap_alsa_codec_config *config);
112int snd_omap_alsa_remove(struct platform_device *pdev);
113#ifdef CONFIG_PM
114int snd_omap_alsa_suspend(struct platform_device *pdev, pm_message_t state);
115int snd_omap_alsa_resume(struct platform_device *pdev);
116#else
117#define snd_omap_alsa_suspend NULL
118#define snd_omap_alsa_resume NULL
119#endif
120
121void callback_omap_alsa_sound_dma(void *);
122
123#endif
diff --git a/arch/arm/plat-omap/include/mach/omap1510.h b/arch/arm/plat-omap/include/mach/omap1510.h
new file mode 100644
index 000000000000..505a38af8b22
--- /dev/null
+++ b/arch/arm/plat-omap/include/mach/omap1510.h
@@ -0,0 +1,48 @@
1/* arch/arm/plat-omap/include/mach/omap1510.h
2 *
3 * Hardware definitions for TI OMAP1510 processor.
4 *
5 * Cleanup for Linux-2.6 by Dirk Behme <dirk.behme@de.bosch.com>
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; either version 2 of the License, or (at your
10 * option) any later version.
11 *
12 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
13 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
14 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
15 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
16 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
17 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
18 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
19 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
20 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
21 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
22 *
23 * You should have received a copy of the GNU General Public License along
24 * with this program; if not, write to the Free Software Foundation, Inc.,
25 * 675 Mass Ave, Cambridge, MA 02139, USA.
26 */
27
28#ifndef __ASM_ARCH_OMAP15XX_H
29#define __ASM_ARCH_OMAP15XX_H
30
31/*
32 * ----------------------------------------------------------------------------
33 * Base addresses
34 * ----------------------------------------------------------------------------
35 */
36
37/* Syntax: XX_BASE = Virtual base address, XX_START = Physical base address */
38
39#define OMAP1510_DSP_BASE 0xE0000000
40#define OMAP1510_DSP_SIZE 0x28000
41#define OMAP1510_DSP_START 0xE0000000
42
43#define OMAP1510_DSPREG_BASE 0xE1000000
44#define OMAP1510_DSPREG_SIZE SZ_128K
45#define OMAP1510_DSPREG_START 0xE1000000
46
47#endif /* __ASM_ARCH_OMAP15XX_H */
48
diff --git a/arch/arm/plat-omap/include/mach/omap16xx.h b/arch/arm/plat-omap/include/mach/omap16xx.h
new file mode 100644
index 000000000000..c6c93afb2788
--- /dev/null
+++ b/arch/arm/plat-omap/include/mach/omap16xx.h
@@ -0,0 +1,197 @@
1/* arch/arm/plat-omap/include/mach/omap16xx.h
2 *
3 * Hardware definitions for TI OMAP1610/5912/1710 processors.
4 *
5 * Cleanup for Linux-2.6 by Dirk Behme <dirk.behme@de.bosch.com>
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; either version 2 of the License, or (at your
10 * option) any later version.
11 *
12 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
13 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
14 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
15 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
16 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
17 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
18 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
19 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
20 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
21 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
22 *
23 * You should have received a copy of the GNU General Public License along
24 * with this program; if not, write to the Free Software Foundation, Inc.,
25 * 675 Mass Ave, Cambridge, MA 02139, USA.
26 */
27
28#ifndef __ASM_ARCH_OMAP16XX_H
29#define __ASM_ARCH_OMAP16XX_H
30
31/*
32 * ----------------------------------------------------------------------------
33 * Base addresses
34 * ----------------------------------------------------------------------------
35 */
36
37/* Syntax: XX_BASE = Virtual base address, XX_START = Physical base address */
38
39#define OMAP16XX_DSP_BASE 0xE0000000
40#define OMAP16XX_DSP_SIZE 0x28000
41#define OMAP16XX_DSP_START 0xE0000000
42
43#define OMAP16XX_DSPREG_BASE 0xE1000000
44#define OMAP16XX_DSPREG_SIZE SZ_128K
45#define OMAP16XX_DSPREG_START 0xE1000000
46
47/*
48 * ---------------------------------------------------------------------------
49 * Interrupts
50 * ---------------------------------------------------------------------------
51 */
52#define OMAP_IH2_0_BASE (0xfffe0000)
53#define OMAP_IH2_1_BASE (0xfffe0100)
54#define OMAP_IH2_2_BASE (0xfffe0200)
55#define OMAP_IH2_3_BASE (0xfffe0300)
56
57#define OMAP_IH2_0_ITR (OMAP_IH2_0_BASE + 0x00)
58#define OMAP_IH2_0_MIR (OMAP_IH2_0_BASE + 0x04)
59#define OMAP_IH2_0_SIR_IRQ (OMAP_IH2_0_BASE + 0x10)
60#define OMAP_IH2_0_SIR_FIQ (OMAP_IH2_0_BASE + 0x14)
61#define OMAP_IH2_0_CONTROL (OMAP_IH2_0_BASE + 0x18)
62#define OMAP_IH2_0_ILR0 (OMAP_IH2_0_BASE + 0x1c)
63#define OMAP_IH2_0_ISR (OMAP_IH2_0_BASE + 0x9c)
64
65#define OMAP_IH2_1_ITR (OMAP_IH2_1_BASE + 0x00)
66#define OMAP_IH2_1_MIR (OMAP_IH2_1_BASE + 0x04)
67#define OMAP_IH2_1_SIR_IRQ (OMAP_IH2_1_BASE + 0x10)
68#define OMAP_IH2_1_SIR_FIQ (OMAP_IH2_1_BASE + 0x14)
69#define OMAP_IH2_1_CONTROL (OMAP_IH2_1_BASE + 0x18)
70#define OMAP_IH2_1_ILR1 (OMAP_IH2_1_BASE + 0x1c)
71#define OMAP_IH2_1_ISR (OMAP_IH2_1_BASE + 0x9c)
72
73#define OMAP_IH2_2_ITR (OMAP_IH2_2_BASE + 0x00)
74#define OMAP_IH2_2_MIR (OMAP_IH2_2_BASE + 0x04)
75#define OMAP_IH2_2_SIR_IRQ (OMAP_IH2_2_BASE + 0x10)
76#define OMAP_IH2_2_SIR_FIQ (OMAP_IH2_2_BASE + 0x14)
77#define OMAP_IH2_2_CONTROL (OMAP_IH2_2_BASE + 0x18)
78#define OMAP_IH2_2_ILR2 (OMAP_IH2_2_BASE + 0x1c)
79#define OMAP_IH2_2_ISR (OMAP_IH2_2_BASE + 0x9c)
80
81#define OMAP_IH2_3_ITR (OMAP_IH2_3_BASE + 0x00)
82#define OMAP_IH2_3_MIR (OMAP_IH2_3_BASE + 0x04)
83#define OMAP_IH2_3_SIR_IRQ (OMAP_IH2_3_BASE + 0x10)
84#define OMAP_IH2_3_SIR_FIQ (OMAP_IH2_3_BASE + 0x14)
85#define OMAP_IH2_3_CONTROL (OMAP_IH2_3_BASE + 0x18)
86#define OMAP_IH2_3_ILR3 (OMAP_IH2_3_BASE + 0x1c)
87#define OMAP_IH2_3_ISR (OMAP_IH2_3_BASE + 0x9c)
88
89/*
90 * ----------------------------------------------------------------------------
91 * Clocks
92 * ----------------------------------------------------------------------------
93 */
94#define OMAP16XX_ARM_IDLECT3 (CLKGEN_REG_BASE + 0x24)
95
96/*
97 * ----------------------------------------------------------------------------
98 * Pin configuration registers
99 * ----------------------------------------------------------------------------
100 */
101#define OMAP16XX_CONF_VOLTAGE_VDDSHV6 (1 << 8)
102#define OMAP16XX_CONF_VOLTAGE_VDDSHV7 (1 << 9)
103#define OMAP16XX_CONF_VOLTAGE_VDDSHV8 (1 << 10)
104#define OMAP16XX_CONF_VOLTAGE_VDDSHV9 (1 << 11)
105#define OMAP16XX_SUBLVDS_CONF_VALID (1 << 13)
106
107/*
108 * ----------------------------------------------------------------------------
109 * System control registers
110 * ----------------------------------------------------------------------------
111 */
112#define OMAP1610_RESET_CONTROL 0xfffe1140
113
114/*
115 * ---------------------------------------------------------------------------
116 * TIPB bus interface
117 * ---------------------------------------------------------------------------
118 */
119#define TIPB_SWITCH_BASE (0xfffbc800)
120#define OMAP16XX_MMCSD2_SSW_MPU_CONF (TIPB_SWITCH_BASE + 0x160)
121
122/* UART3 Registers Maping through MPU bus */
123#define UART3_RHR (OMAP_UART3_BASE + 0)
124#define UART3_THR (OMAP_UART3_BASE + 0)
125#define UART3_DLL (OMAP_UART3_BASE + 0)
126#define UART3_IER (OMAP_UART3_BASE + 4)
127#define UART3_DLH (OMAP_UART3_BASE + 4)
128#define UART3_IIR (OMAP_UART3_BASE + 8)
129#define UART3_FCR (OMAP_UART3_BASE + 8)
130#define UART3_EFR (OMAP_UART3_BASE + 8)
131#define UART3_LCR (OMAP_UART3_BASE + 0x0C)
132#define UART3_MCR (OMAP_UART3_BASE + 0x10)
133#define UART3_XON1_ADDR1 (OMAP_UART3_BASE + 0x10)
134#define UART3_XON2_ADDR2 (OMAP_UART3_BASE + 0x14)
135#define UART3_LSR (OMAP_UART3_BASE + 0x14)
136#define UART3_TCR (OMAP_UART3_BASE + 0x18)
137#define UART3_MSR (OMAP_UART3_BASE + 0x18)
138#define UART3_XOFF1 (OMAP_UART3_BASE + 0x18)
139#define UART3_XOFF2 (OMAP_UART3_BASE + 0x1C)
140#define UART3_SPR (OMAP_UART3_BASE + 0x1C)
141#define UART3_TLR (OMAP_UART3_BASE + 0x1C)
142#define UART3_MDR1 (OMAP_UART3_BASE + 0x20)
143#define UART3_MDR2 (OMAP_UART3_BASE + 0x24)
144#define UART3_SFLSR (OMAP_UART3_BASE + 0x28)
145#define UART3_TXFLL (OMAP_UART3_BASE + 0x28)
146#define UART3_RESUME (OMAP_UART3_BASE + 0x2C)
147#define UART3_TXFLH (OMAP_UART3_BASE + 0x2C)
148#define UART3_SFREGL (OMAP_UART3_BASE + 0x30)
149#define UART3_RXFLL (OMAP_UART3_BASE + 0x30)
150#define UART3_SFREGH (OMAP_UART3_BASE + 0x34)
151#define UART3_RXFLH (OMAP_UART3_BASE + 0x34)
152#define UART3_BLR (OMAP_UART3_BASE + 0x38)
153#define UART3_ACREG (OMAP_UART3_BASE + 0x3C)
154#define UART3_DIV16 (OMAP_UART3_BASE + 0x3C)
155#define UART3_SCR (OMAP_UART3_BASE + 0x40)
156#define UART3_SSR (OMAP_UART3_BASE + 0x44)
157#define UART3_EBLR (OMAP_UART3_BASE + 0x48)
158#define UART3_OSC_12M_SEL (OMAP_UART3_BASE + 0x4C)
159#define UART3_MVR (OMAP_UART3_BASE + 0x50)
160
161/*
162 * ---------------------------------------------------------------------------
163 * Watchdog timer
164 * ---------------------------------------------------------------------------
165 */
166
167/* 32-bit Watchdog timer in OMAP 16XX */
168#define OMAP_16XX_WATCHDOG_BASE (0xfffeb000)
169#define OMAP_16XX_WIDR (OMAP_16XX_WATCHDOG_BASE + 0x00)
170#define OMAP_16XX_WD_SYSCONFIG (OMAP_16XX_WATCHDOG_BASE + 0x10)
171#define OMAP_16XX_WD_SYSSTATUS (OMAP_16XX_WATCHDOG_BASE + 0x14)
172#define OMAP_16XX_WCLR (OMAP_16XX_WATCHDOG_BASE + 0x24)
173#define OMAP_16XX_WCRR (OMAP_16XX_WATCHDOG_BASE + 0x28)
174#define OMAP_16XX_WLDR (OMAP_16XX_WATCHDOG_BASE + 0x2c)
175#define OMAP_16XX_WTGR (OMAP_16XX_WATCHDOG_BASE + 0x30)
176#define OMAP_16XX_WWPS (OMAP_16XX_WATCHDOG_BASE + 0x34)
177#define OMAP_16XX_WSPR (OMAP_16XX_WATCHDOG_BASE + 0x48)
178
179#define WCLR_PRE_SHIFT 5
180#define WCLR_PTV_SHIFT 2
181
182#define WWPS_W_PEND_WSPR (1 << 4)
183#define WWPS_W_PEND_WTGR (1 << 3)
184#define WWPS_W_PEND_WLDR (1 << 2)
185#define WWPS_W_PEND_WCRR (1 << 1)
186#define WWPS_W_PEND_WCLR (1 << 0)
187
188#define WSPR_ENABLE_0 (0x0000bbbb)
189#define WSPR_ENABLE_1 (0x00004444)
190#define WSPR_DISABLE_0 (0x0000aaaa)
191#define WSPR_DISABLE_1 (0x00005555)
192
193/* Mailbox */
194#define OMAP16XX_MAILBOX_BASE (0xfffcf000)
195
196#endif /* __ASM_ARCH_OMAP16XX_H */
197
diff --git a/arch/arm/plat-omap/include/mach/omap24xx.h b/arch/arm/plat-omap/include/mach/omap24xx.h
new file mode 100644
index 000000000000..bb8319d66e9f
--- /dev/null
+++ b/arch/arm/plat-omap/include/mach/omap24xx.h
@@ -0,0 +1,107 @@
1/*
2 * arch/arm/plat-omap/include/mach/omap24xx.h
3 *
4 * This file contains the processor specific definitions
5 * of the TI OMAP24XX.
6 *
7 * Copyright (C) 2007 Texas Instruments.
8 * Copyright (C) 2007 Nokia Corporation.
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 *
24 */
25
26#ifndef __ASM_ARCH_OMAP24XX_H
27#define __ASM_ARCH_OMAP24XX_H
28
29/*
30 * Please place only base defines here and put the rest in device
31 * specific headers. Note also that some of these defines are needed
32 * for omap1 to compile without adding ifdefs.
33 */
34
35#define L4_24XX_BASE 0x48000000
36#define L4_WK_243X_BASE 0x49000000
37#define L3_24XX_BASE 0x68000000
38
39/* interrupt controller */
40#define OMAP24XX_IC_BASE (L4_24XX_BASE + 0xfe000)
41#define OMAP24XX_IVA_INTC_BASE 0x40000000
42#define IRQ_SIR_IRQ 0x0040
43
44#define OMAP2420_CTRL_BASE L4_24XX_BASE
45#define OMAP2420_32KSYNCT_BASE (L4_24XX_BASE + 0x4000)
46#define OMAP2420_PRCM_BASE (L4_24XX_BASE + 0x8000)
47#define OMAP2420_CM_BASE (L4_24XX_BASE + 0x8000)
48#define OMAP2420_PRM_BASE OMAP2420_CM_BASE
49#define OMAP2420_SDRC_BASE (L3_24XX_BASE + 0x9000)
50#define OMAP2420_SMS_BASE 0x68008000
51
52#define OMAP2430_32KSYNCT_BASE (L4_WK_243X_BASE + 0x20000)
53#define OMAP2430_PRCM_BASE (L4_WK_243X_BASE + 0x6000)
54#define OMAP2430_CM_BASE (L4_WK_243X_BASE + 0x6000)
55#define OMAP2430_PRM_BASE OMAP2430_CM_BASE
56
57#define OMAP243X_SMS_BASE 0x6C000000
58#define OMAP243X_SDRC_BASE 0x6D000000
59#define OMAP243X_GPMC_BASE 0x6E000000
60#define OMAP243X_SCM_BASE (L4_WK_243X_BASE + 0x2000)
61#define OMAP243X_CTRL_BASE OMAP243X_SCM_BASE
62#define OMAP243X_HS_BASE (L4_24XX_BASE + 0x000ac000)
63
64/* DSP SS */
65#define OMAP2420_DSP_BASE 0x58000000
66#define OMAP2420_DSP_MEM_BASE (OMAP2420_DSP_BASE + 0x0)
67#define OMAP2420_DSP_IPI_BASE (OMAP2420_DSP_BASE + 0x1000000)
68#define OMAP2420_DSP_MMU_BASE (OMAP2420_DSP_BASE + 0x2000000)
69
70#define OMAP243X_DSP_BASE 0x5C000000
71#define OMAP243X_DSP_MEM_BASE (OMAP243X_DSP_BASE + 0x0)
72#define OMAP243X_DSP_MMU_BASE (OMAP243X_DSP_BASE + 0x1000000)
73
74/* Mailbox */
75#define OMAP24XX_MAILBOX_BASE (L4_24XX_BASE + 0x94000)
76
77/* Camera */
78#define OMAP24XX_CAMERA_BASE (L4_24XX_BASE + 0x52000)
79
80/* Security */
81#define OMAP24XX_SEC_BASE (L4_24XX_BASE + 0xA0000)
82#define OMAP24XX_SEC_RNG_BASE (OMAP24XX_SEC_BASE + 0x0000)
83#define OMAP24XX_SEC_DES_BASE (OMAP24XX_SEC_BASE + 0x2000)
84#define OMAP24XX_SEC_SHA1MD5_BASE (OMAP24XX_SEC_BASE + 0x4000)
85#define OMAP24XX_SEC_AES_BASE (OMAP24XX_SEC_BASE + 0x6000)
86#define OMAP24XX_SEC_PKA_BASE (OMAP24XX_SEC_BASE + 0x8000)
87
88#if defined(CONFIG_ARCH_OMAP2420)
89
90#define OMAP2_32KSYNCT_BASE OMAP2420_32KSYNCT_BASE
91#define OMAP2_PRCM_BASE OMAP2420_PRCM_BASE
92#define OMAP2_CM_BASE OMAP2420_CM_BASE
93#define OMAP2_PRM_BASE OMAP2420_PRM_BASE
94#define OMAP2_VA_IC_BASE IO_ADDRESS(OMAP24XX_IC_BASE)
95
96#elif defined(CONFIG_ARCH_OMAP2430)
97
98#define OMAP2_32KSYNCT_BASE OMAP2430_32KSYNCT_BASE
99#define OMAP2_PRCM_BASE OMAP2430_PRCM_BASE
100#define OMAP2_CM_BASE OMAP2430_CM_BASE
101#define OMAP2_PRM_BASE OMAP2430_PRM_BASE
102#define OMAP2_VA_IC_BASE IO_ADDRESS(OMAP24XX_IC_BASE)
103
104#endif
105
106#endif /* __ASM_ARCH_OMAP24XX_H */
107
diff --git a/arch/arm/plat-omap/include/mach/omap34xx.h b/arch/arm/plat-omap/include/mach/omap34xx.h
new file mode 100644
index 000000000000..8e0479fff05a
--- /dev/null
+++ b/arch/arm/plat-omap/include/mach/omap34xx.h
@@ -0,0 +1,72 @@
1/*
2 * arch/arm/plat-omap/include/mach/omap34xx.h
3 *
4 * This file contains the processor specific definitions of the TI OMAP34XX.
5 *
6 * Copyright (C) 2007 Texas Instruments.
7 * Copyright (C) 2007 Nokia Corporation.
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 */
23
24#ifndef __ASM_ARCH_OMAP34XX_H
25#define __ASM_ARCH_OMAP34XX_H
26
27/*
28 * Please place only base defines here and put the rest in device
29 * specific headers.
30 */
31
32#define L4_34XX_BASE 0x48000000
33#define L4_WK_34XX_BASE 0x48300000
34#define L4_WK_OMAP_BASE L4_WK_34XX_BASE
35#define L4_PER_34XX_BASE 0x49000000
36#define L4_PER_OMAP_BASE L4_PER_34XX_BASE
37#define L4_EMU_34XX_BASE 0x54000000
38#define L4_EMU_BASE L4_EMU_34XX_BASE
39#define L3_34XX_BASE 0x68000000
40#define L3_OMAP_BASE L3_34XX_BASE
41
42#define OMAP3430_32KSYNCT_BASE 0x48320000
43#define OMAP3430_CM_BASE 0x48004800
44#define OMAP3430_PRM_BASE 0x48306800
45#define OMAP343X_SMS_BASE 0x6C000000
46#define OMAP343X_SDRC_BASE 0x6D000000
47#define OMAP34XX_GPMC_BASE 0x6E000000
48#define OMAP343X_SCM_BASE 0x48002000
49#define OMAP343X_CTRL_BASE OMAP343X_SCM_BASE
50
51#define OMAP34XX_IC_BASE 0x48200000
52#define OMAP34XX_IVA_INTC_BASE 0x40000000
53#define OMAP34XX_HSUSB_OTG_BASE (L4_34XX_BASE + 0xAB000)
54#define OMAP34XX_HSUSB_HOST_BASE (L4_34XX_BASE + 0x64000)
55#define OMAP34XX_USBTLL_BASE (L4_34XX_BASE + 0x62000)
56
57
58#if defined(CONFIG_ARCH_OMAP3430)
59
60#define OMAP2_32KSYNCT_BASE OMAP3430_32KSYNCT_BASE
61#define OMAP2_CM_BASE OMAP3430_CM_BASE
62#define OMAP2_PRM_BASE OMAP3430_PRM_BASE
63#define OMAP2_VA_IC_BASE IO_ADDRESS(OMAP34XX_IC_BASE)
64
65#endif
66
67#define OMAP34XX_DSP_BASE 0x58000000
68#define OMAP34XX_DSP_MEM_BASE (OMAP34XX_DSP_BASE + 0x0)
69#define OMAP34XX_DSP_IPI_BASE (OMAP34XX_DSP_BASE + 0x1000000)
70#define OMAP34XX_DSP_MMU_BASE (OMAP34XX_DSP_BASE + 0x2000000)
71#endif /* __ASM_ARCH_OMAP34XX_H */
72
diff --git a/arch/arm/plat-omap/include/mach/omap730.h b/arch/arm/plat-omap/include/mach/omap730.h
new file mode 100644
index 000000000000..14272bc1a6fd
--- /dev/null
+++ b/arch/arm/plat-omap/include/mach/omap730.h
@@ -0,0 +1,102 @@
1/* arch/arm/plat-omap/include/mach/omap730.h
2 *
3 * Hardware definitions for TI OMAP730 processor.
4 *
5 * Cleanup for Linux-2.6 by Dirk Behme <dirk.behme@de.bosch.com>
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; either version 2 of the License, or (at your
10 * option) any later version.
11 *
12 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
13 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
14 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
15 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
16 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
17 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
18 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
19 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
20 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
21 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
22 *
23 * You should have received a copy of the GNU General Public License along
24 * with this program; if not, write to the Free Software Foundation, Inc.,
25 * 675 Mass Ave, Cambridge, MA 02139, USA.
26 */
27
28#ifndef __ASM_ARCH_OMAP730_H
29#define __ASM_ARCH_OMAP730_H
30
31/*
32 * ----------------------------------------------------------------------------
33 * Base addresses
34 * ----------------------------------------------------------------------------
35 */
36
37/* Syntax: XX_BASE = Virtual base address, XX_START = Physical base address */
38
39#define OMAP730_DSP_BASE 0xE0000000
40#define OMAP730_DSP_SIZE 0x50000
41#define OMAP730_DSP_START 0xE0000000
42
43#define OMAP730_DSPREG_BASE 0xE1000000
44#define OMAP730_DSPREG_SIZE SZ_128K
45#define OMAP730_DSPREG_START 0xE1000000
46
47/*
48 * ----------------------------------------------------------------------------
49 * OMAP730 specific configuration registers
50 * ----------------------------------------------------------------------------
51 */
52#define OMAP730_CONFIG_BASE 0xfffe1000
53#define OMAP730_IO_CONF_0 0xfffe1070
54#define OMAP730_IO_CONF_1 0xfffe1074
55#define OMAP730_IO_CONF_2 0xfffe1078
56#define OMAP730_IO_CONF_3 0xfffe107c
57#define OMAP730_IO_CONF_4 0xfffe1080
58#define OMAP730_IO_CONF_5 0xfffe1084
59#define OMAP730_IO_CONF_6 0xfffe1088
60#define OMAP730_IO_CONF_7 0xfffe108c
61#define OMAP730_IO_CONF_8 0xfffe1090
62#define OMAP730_IO_CONF_9 0xfffe1094
63#define OMAP730_IO_CONF_10 0xfffe1098
64#define OMAP730_IO_CONF_11 0xfffe109c
65#define OMAP730_IO_CONF_12 0xfffe10a0
66#define OMAP730_IO_CONF_13 0xfffe10a4
67
68#define OMAP730_MODE_1 0xfffe1010
69#define OMAP730_MODE_2 0xfffe1014
70
71/* CSMI specials: in terms of base + offset */
72#define OMAP730_MODE2_OFFSET 0x14
73
74/*
75 * ----------------------------------------------------------------------------
76 * OMAP730 traffic controller configuration registers
77 * ----------------------------------------------------------------------------
78 */
79#define OMAP730_FLASH_CFG_0 0xfffecc10
80#define OMAP730_FLASH_ACFG_0 0xfffecc50
81#define OMAP730_FLASH_CFG_1 0xfffecc14
82#define OMAP730_FLASH_ACFG_1 0xfffecc54
83
84/*
85 * ----------------------------------------------------------------------------
86 * OMAP730 DSP control registers
87 * ----------------------------------------------------------------------------
88 */
89#define OMAP730_ICR_BASE 0xfffbb800
90#define OMAP730_DSP_M_CTL 0xfffbb804
91#define OMAP730_DSP_MMU_BASE 0xfffed200
92
93/*
94 * ----------------------------------------------------------------------------
95 * OMAP730 PCC_UPLD configuration registers
96 * ----------------------------------------------------------------------------
97 */
98#define OMAP730_PCC_UPLD_CTRL_BASE (0xfffe0900)
99#define OMAP730_PCC_UPLD_CTRL (OMAP730_PCC_UPLD_CTRL_BASE + 0x00)
100
101#endif /* __ASM_ARCH_OMAP730_H */
102
diff --git a/arch/arm/plat-omap/include/mach/omapfb.h b/arch/arm/plat-omap/include/mach/omapfb.h
new file mode 100644
index 000000000000..cae037d13079
--- /dev/null
+++ b/arch/arm/plat-omap/include/mach/omapfb.h
@@ -0,0 +1,395 @@
1/*
2 * File: arch/arm/plat-omap/include/mach/omapfb.h
3 *
4 * Framebuffer driver for TI OMAP boards
5 *
6 * Copyright (C) 2004 Nokia Corporation
7 * Author: Imre Deak <imre.deak@nokia.com>
8 *
9 * This program is free software; you can redistribute it and/or modify it
10 * under the terms of the GNU General Public License as published by the
11 * Free Software Foundation; either version 2 of the License, or (at your
12 * option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful, but
15 * WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License along
20 * with this program; if not, write to the Free Software Foundation, Inc.,
21 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 */
23
24#ifndef __OMAPFB_H
25#define __OMAPFB_H
26
27#include <asm/ioctl.h>
28#include <asm/types.h>
29
30/* IOCTL commands. */
31
32#define OMAP_IOW(num, dtype) _IOW('O', num, dtype)
33#define OMAP_IOR(num, dtype) _IOR('O', num, dtype)
34#define OMAP_IOWR(num, dtype) _IOWR('O', num, dtype)
35#define OMAP_IO(num) _IO('O', num)
36
37#define OMAPFB_MIRROR OMAP_IOW(31, int)
38#define OMAPFB_SYNC_GFX OMAP_IO(37)
39#define OMAPFB_VSYNC OMAP_IO(38)
40#define OMAPFB_SET_UPDATE_MODE OMAP_IOW(40, int)
41#define OMAPFB_GET_CAPS OMAP_IOR(42, struct omapfb_caps)
42#define OMAPFB_GET_UPDATE_MODE OMAP_IOW(43, int)
43#define OMAPFB_LCD_TEST OMAP_IOW(45, int)
44#define OMAPFB_CTRL_TEST OMAP_IOW(46, int)
45#define OMAPFB_UPDATE_WINDOW_OLD OMAP_IOW(47, struct omapfb_update_window_old)
46#define OMAPFB_SET_COLOR_KEY OMAP_IOW(50, struct omapfb_color_key)
47#define OMAPFB_GET_COLOR_KEY OMAP_IOW(51, struct omapfb_color_key)
48#define OMAPFB_SETUP_PLANE OMAP_IOW(52, struct omapfb_plane_info)
49#define OMAPFB_QUERY_PLANE OMAP_IOW(53, struct omapfb_plane_info)
50#define OMAPFB_UPDATE_WINDOW OMAP_IOW(54, struct omapfb_update_window)
51#define OMAPFB_SETUP_MEM OMAP_IOW(55, struct omapfb_mem_info)
52#define OMAPFB_QUERY_MEM OMAP_IOW(56, struct omapfb_mem_info)
53
54#define OMAPFB_CAPS_GENERIC_MASK 0x00000fff
55#define OMAPFB_CAPS_LCDC_MASK 0x00fff000
56#define OMAPFB_CAPS_PANEL_MASK 0xff000000
57
58#define OMAPFB_CAPS_MANUAL_UPDATE 0x00001000
59#define OMAPFB_CAPS_TEARSYNC 0x00002000
60#define OMAPFB_CAPS_PLANE_RELOCATE_MEM 0x00004000
61#define OMAPFB_CAPS_PLANE_SCALE 0x00008000
62#define OMAPFB_CAPS_WINDOW_PIXEL_DOUBLE 0x00010000
63#define OMAPFB_CAPS_WINDOW_SCALE 0x00020000
64#define OMAPFB_CAPS_WINDOW_OVERLAY 0x00040000
65#define OMAPFB_CAPS_SET_BACKLIGHT 0x01000000
66
67/* Values from DSP must map to lower 16-bits */
68#define OMAPFB_FORMAT_MASK 0x00ff
69#define OMAPFB_FORMAT_FLAG_DOUBLE 0x0100
70#define OMAPFB_FORMAT_FLAG_TEARSYNC 0x0200
71#define OMAPFB_FORMAT_FLAG_FORCE_VSYNC 0x0400
72#define OMAPFB_FORMAT_FLAG_ENABLE_OVERLAY 0x0800
73#define OMAPFB_FORMAT_FLAG_DISABLE_OVERLAY 0x1000
74
75#define OMAPFB_EVENT_READY 1
76#define OMAPFB_EVENT_DISABLED 2
77
78#define OMAPFB_MEMTYPE_SDRAM 0
79#define OMAPFB_MEMTYPE_SRAM 1
80#define OMAPFB_MEMTYPE_MAX 1
81
82enum omapfb_color_format {
83 OMAPFB_COLOR_RGB565 = 0,
84 OMAPFB_COLOR_YUV422,
85 OMAPFB_COLOR_YUV420,
86 OMAPFB_COLOR_CLUT_8BPP,
87 OMAPFB_COLOR_CLUT_4BPP,
88 OMAPFB_COLOR_CLUT_2BPP,
89 OMAPFB_COLOR_CLUT_1BPP,
90 OMAPFB_COLOR_RGB444,
91 OMAPFB_COLOR_YUY422,
92};
93
94struct omapfb_update_window {
95 __u32 x, y;
96 __u32 width, height;
97 __u32 format;
98 __u32 out_x, out_y;
99 __u32 out_width, out_height;
100 __u32 reserved[8];
101};
102
103struct omapfb_update_window_old {
104 __u32 x, y;
105 __u32 width, height;
106 __u32 format;
107};
108
109enum omapfb_plane {
110 OMAPFB_PLANE_GFX = 0,
111 OMAPFB_PLANE_VID1,
112 OMAPFB_PLANE_VID2,
113};
114
115enum omapfb_channel_out {
116 OMAPFB_CHANNEL_OUT_LCD = 0,
117 OMAPFB_CHANNEL_OUT_DIGIT,
118};
119
120struct omapfb_plane_info {
121 __u32 pos_x;
122 __u32 pos_y;
123 __u8 enabled;
124 __u8 channel_out;
125 __u8 mirror;
126 __u8 reserved1;
127 __u32 out_width;
128 __u32 out_height;
129 __u32 reserved2[12];
130};
131
132struct omapfb_mem_info {
133 __u32 size;
134 __u8 type;
135 __u8 reserved[3];
136};
137
138struct omapfb_caps {
139 __u32 ctrl;
140 __u32 plane_color;
141 __u32 wnd_color;
142};
143
144enum omapfb_color_key_type {
145 OMAPFB_COLOR_KEY_DISABLED = 0,
146 OMAPFB_COLOR_KEY_GFX_DST,
147 OMAPFB_COLOR_KEY_VID_SRC,
148};
149
150struct omapfb_color_key {
151 __u8 channel_out;
152 __u32 background;
153 __u32 trans_key;
154 __u8 key_type;
155};
156
157enum omapfb_update_mode {
158 OMAPFB_UPDATE_DISABLED = 0,
159 OMAPFB_AUTO_UPDATE,
160 OMAPFB_MANUAL_UPDATE
161};
162
163#ifdef __KERNEL__
164
165#include <linux/completion.h>
166#include <linux/interrupt.h>
167#include <linux/fb.h>
168#include <linux/mutex.h>
169
170#include <mach/board.h>
171
172#define OMAP_LCDC_INV_VSYNC 0x0001
173#define OMAP_LCDC_INV_HSYNC 0x0002
174#define OMAP_LCDC_INV_PIX_CLOCK 0x0004
175#define OMAP_LCDC_INV_OUTPUT_EN 0x0008
176#define OMAP_LCDC_HSVS_RISING_EDGE 0x0010
177#define OMAP_LCDC_HSVS_OPPOSITE 0x0020
178
179#define OMAP_LCDC_SIGNAL_MASK 0x003f
180
181#define OMAP_LCDC_PANEL_TFT 0x0100
182
183#define OMAPFB_PLANE_XRES_MIN 8
184#define OMAPFB_PLANE_YRES_MIN 8
185
186#ifdef CONFIG_ARCH_OMAP1
187#define OMAPFB_PLANE_NUM 1
188#else
189#define OMAPFB_PLANE_NUM 3
190#endif
191
192struct omapfb_device;
193
194struct lcd_panel {
195 const char *name;
196 int config; /* TFT/STN, signal inversion */
197 int bpp; /* Pixel format in fb mem */
198 int data_lines; /* Lines on LCD HW interface */
199
200 int x_res, y_res;
201 int pixel_clock; /* In kHz */
202 int hsw; /* Horizontal synchronization
203 pulse width */
204 int hfp; /* Horizontal front porch */
205 int hbp; /* Horizontal back porch */
206 int vsw; /* Vertical synchronization
207 pulse width */
208 int vfp; /* Vertical front porch */
209 int vbp; /* Vertical back porch */
210 int acb; /* ac-bias pin frequency */
211 int pcd; /* pixel clock divider.
212 Obsolete use pixel_clock instead */
213
214 int (*init) (struct lcd_panel *panel,
215 struct omapfb_device *fbdev);
216 void (*cleanup) (struct lcd_panel *panel);
217 int (*enable) (struct lcd_panel *panel);
218 void (*disable) (struct lcd_panel *panel);
219 unsigned long (*get_caps) (struct lcd_panel *panel);
220 int (*set_bklight_level)(struct lcd_panel *panel,
221 unsigned int level);
222 unsigned int (*get_bklight_level)(struct lcd_panel *panel);
223 unsigned int (*get_bklight_max) (struct lcd_panel *panel);
224 int (*run_test) (struct lcd_panel *panel, int test_num);
225};
226
227struct extif_timings {
228 int cs_on_time;
229 int cs_off_time;
230 int we_on_time;
231 int we_off_time;
232 int re_on_time;
233 int re_off_time;
234 int we_cycle_time;
235 int re_cycle_time;
236 int cs_pulse_width;
237 int access_time;
238
239 int clk_div;
240
241 u32 tim[5]; /* set by extif->convert_timings */
242
243 int converted;
244};
245
246struct lcd_ctrl_extif {
247 int (*init) (struct omapfb_device *fbdev);
248 void (*cleanup) (void);
249 void (*get_clk_info) (u32 *clk_period, u32 *max_clk_div);
250 unsigned long (*get_max_tx_rate)(void);
251 int (*convert_timings) (struct extif_timings *timings);
252 void (*set_timings) (const struct extif_timings *timings);
253 void (*set_bits_per_cycle)(int bpc);
254 void (*write_command) (const void *buf, unsigned int len);
255 void (*read_data) (void *buf, unsigned int len);
256 void (*write_data) (const void *buf, unsigned int len);
257 void (*transfer_area) (int width, int height,
258 void (callback)(void * data), void *data);
259 int (*setup_tearsync) (unsigned pin_cnt,
260 unsigned hs_pulse_time, unsigned vs_pulse_time,
261 int hs_pol_inv, int vs_pol_inv, int div);
262 int (*enable_tearsync) (int enable, unsigned line);
263
264 unsigned long max_transmit_size;
265};
266
267struct omapfb_notifier_block {
268 struct notifier_block nb;
269 void *data;
270 int plane_idx;
271};
272
273typedef int (*omapfb_notifier_callback_t)(struct notifier_block *,
274 unsigned long event,
275 void *fbi);
276
277struct omapfb_mem_region {
278 dma_addr_t paddr;
279 void *vaddr;
280 unsigned long size;
281 u8 type; /* OMAPFB_PLANE_MEM_* */
282 unsigned alloc:1; /* allocated by the driver */
283 unsigned map:1; /* kernel mapped by the driver */
284};
285
286struct omapfb_mem_desc {
287 int region_cnt;
288 struct omapfb_mem_region region[OMAPFB_PLANE_NUM];
289};
290
291struct lcd_ctrl {
292 const char *name;
293 void *data;
294
295 int (*init) (struct omapfb_device *fbdev,
296 int ext_mode,
297 struct omapfb_mem_desc *req_md);
298 void (*cleanup) (void);
299 void (*bind_client) (struct omapfb_notifier_block *nb);
300 void (*get_caps) (int plane, struct omapfb_caps *caps);
301 int (*set_update_mode)(enum omapfb_update_mode mode);
302 enum omapfb_update_mode (*get_update_mode)(void);
303 int (*setup_plane) (int plane, int channel_out,
304 unsigned long offset,
305 int screen_width,
306 int pos_x, int pos_y, int width,
307 int height, int color_mode);
308 int (*setup_mem) (int plane, size_t size,
309 int mem_type, unsigned long *paddr);
310 int (*mmap) (struct fb_info *info,
311 struct vm_area_struct *vma);
312 int (*set_scale) (int plane,
313 int orig_width, int orig_height,
314 int out_width, int out_height);
315 int (*enable_plane) (int plane, int enable);
316 int (*update_window) (struct fb_info *fbi,
317 struct omapfb_update_window *win,
318 void (*callback)(void *),
319 void *callback_data);
320 void (*sync) (void);
321 void (*suspend) (void);
322 void (*resume) (void);
323 int (*run_test) (int test_num);
324 int (*setcolreg) (u_int regno, u16 red, u16 green,
325 u16 blue, u16 transp,
326 int update_hw_mem);
327 int (*set_color_key) (struct omapfb_color_key *ck);
328 int (*get_color_key) (struct omapfb_color_key *ck);
329};
330
331enum omapfb_state {
332 OMAPFB_DISABLED = 0,
333 OMAPFB_SUSPENDED= 99,
334 OMAPFB_ACTIVE = 100
335};
336
337struct omapfb_plane_struct {
338 int idx;
339 struct omapfb_plane_info info;
340 enum omapfb_color_format color_mode;
341 struct omapfb_device *fbdev;
342};
343
344struct omapfb_device {
345 int state;
346 int ext_lcdc; /* Using external
347 LCD controller */
348 struct mutex rqueue_mutex;
349
350 int palette_size;
351 u32 pseudo_palette[17];
352
353 struct lcd_panel *panel; /* LCD panel */
354 struct lcd_ctrl *ctrl; /* LCD controller */
355 struct lcd_ctrl *int_ctrl; /* internal LCD ctrl */
356 struct lcd_ctrl_extif *ext_if; /* LCD ctrl external
357 interface */
358 struct device *dev;
359 struct fb_var_screeninfo new_var; /* for mode changes */
360
361 struct omapfb_mem_desc mem_desc;
362 struct fb_info *fb_info[OMAPFB_PLANE_NUM];
363};
364
365struct omapfb_platform_data {
366 struct omap_lcd_config lcd;
367 struct omapfb_mem_desc mem_desc;
368 void *ctrl_platform_data;
369};
370
371#ifdef CONFIG_ARCH_OMAP1
372extern struct lcd_ctrl omap1_lcd_ctrl;
373#else
374extern struct lcd_ctrl omap2_disp_ctrl;
375#endif
376
377extern void omapfb_register_panel(struct lcd_panel *panel);
378extern void omapfb_write_first_pixel(struct omapfb_device *fbdev, u16 pixval);
379extern void omapfb_notify_clients(struct omapfb_device *fbdev,
380 unsigned long event);
381extern int omapfb_register_client(struct omapfb_notifier_block *nb,
382 omapfb_notifier_callback_t callback,
383 void *callback_data);
384extern int omapfb_unregister_client(struct omapfb_notifier_block *nb);
385extern int omapfb_update_window_async(struct fb_info *fbi,
386 struct omapfb_update_window *win,
387 void (*callback)(void *),
388 void *callback_data);
389
390/* in arch/arm/plat-omap/fb.c */
391extern void omapfb_set_ctrl_platform_data(void *pdata);
392
393#endif /* __KERNEL__ */
394
395#endif /* __OMAPFB_H */
diff --git a/arch/arm/plat-omap/include/mach/onenand.h b/arch/arm/plat-omap/include/mach/onenand.h
new file mode 100644
index 000000000000..d57f20226b28
--- /dev/null
+++ b/arch/arm/plat-omap/include/mach/onenand.h
@@ -0,0 +1,21 @@
1/*
2 * arch/arm/plat-omap/include/mach/onenand.h
3 *
4 * Copyright (C) 2006 Nokia Corporation
5 * Author: Juha Yrjola
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 */
11
12#include <linux/mtd/partitions.h>
13
14struct omap_onenand_platform_data {
15 int cs;
16 int gpio_irq;
17 struct mtd_partition *parts;
18 int nr_parts;
19 int (*onenand_setup)(void __iomem *);
20 int dma_channel;
21};
diff --git a/arch/arm/plat-omap/include/mach/param.h b/arch/arm/plat-omap/include/mach/param.h
new file mode 100644
index 000000000000..1eb4dc326979
--- /dev/null
+++ b/arch/arm/plat-omap/include/mach/param.h
@@ -0,0 +1,8 @@
1/*
2 * arch/arm/plat-omap/include/mach/param.h
3 *
4 */
5
6#ifdef CONFIG_OMAP_32K_TIMER_HZ
7#define HZ CONFIG_OMAP_32K_TIMER_HZ
8#endif
diff --git a/arch/arm/plat-omap/include/mach/pm.h b/arch/arm/plat-omap/include/mach/pm.h
new file mode 100644
index 000000000000..bfa09325a5ff
--- /dev/null
+++ b/arch/arm/plat-omap/include/mach/pm.h
@@ -0,0 +1,356 @@
1/*
2 * arch/arm/plat-omap/include/mach/pm.h
3 *
4 * Header file for OMAP Power Management Routines
5 *
6 * Author: MontaVista Software, Inc.
7 * support@mvista.com
8 *
9 * Copyright 2002 MontaVista Software Inc.
10 *
11 * Cleanup 2004 for Linux 2.6 by Dirk Behme <dirk.behme@de.bosch.com>
12 *
13 * This program is free software; you can redistribute it and/or modify it
14 * under the terms of the GNU General Public License as published by the
15 * Free Software Foundation; either version 2 of the License, or (at your
16 * option) any later version.
17 *
18 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
19 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
20 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
21 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
22 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
23 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
24 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
25 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 *
29 * You should have received a copy of the GNU General Public License along
30 * with this program; if not, write to the Free Software Foundation, Inc.,
31 * 675 Mass Ave, Cambridge, MA 02139, USA.
32 */
33
34#ifndef __ASM_ARCH_OMAP_PM_H
35#define __ASM_ARCH_OMAP_PM_H
36
37/*
38 * ----------------------------------------------------------------------------
39 * Register and offset definitions to be used in PM assembler code
40 * ----------------------------------------------------------------------------
41 */
42#define CLKGEN_REG_ASM_BASE io_p2v(0xfffece00)
43#define ARM_IDLECT1_ASM_OFFSET 0x04
44#define ARM_IDLECT2_ASM_OFFSET 0x08
45
46#define TCMIF_ASM_BASE io_p2v(0xfffecc00)
47#define EMIFS_CONFIG_ASM_OFFSET 0x0c
48#define EMIFF_SDRAM_CONFIG_ASM_OFFSET 0x20
49
50/*
51 * ----------------------------------------------------------------------------
52 * Power management bitmasks
53 * ----------------------------------------------------------------------------
54 */
55#define IDLE_WAIT_CYCLES 0x00000fff
56#define PERIPHERAL_ENABLE 0x2
57
58#define SELF_REFRESH_MODE 0x0c000001
59#define IDLE_EMIFS_REQUEST 0xc
60#define MODEM_32K_EN 0x1
61#define PER_EN 0x1
62
63#define CPU_SUSPEND_SIZE 200
64#define ULPD_LOW_PWR_EN 0x0001
65#define ULPD_DEEP_SLEEP_TRANSITION_EN 0x0010
66#define ULPD_SETUP_ANALOG_CELL_3_VAL 0
67#define ULPD_POWER_CTRL_REG_VAL 0x0219
68
69#define DSP_IDLE_DELAY 10
70#define DSP_IDLE 0x0040
71#define DSP_RST 0x0004
72#define DSP_ENABLE 0x0002
73#define SUFFICIENT_DSP_RESET_TIME 1000
74#define DEFAULT_MPUI_CONFIG 0x05cf
75#define ENABLE_XORCLK 0x2
76#define DSP_CLOCK_ENABLE 0x2000
77#define DSP_IDLE_MODE 0x2
78#define TC_IDLE_REQUEST (0x0000000c)
79
80#define IRQ_LEVEL2 (1<<0)
81#define IRQ_KEYBOARD (1<<1)
82#define IRQ_UART2 (1<<15)
83
84#define PDE_BIT 0x08
85#define PWD_EN_BIT 0x04
86#define EN_PERCK_BIT 0x04
87
88#define OMAP1510_DEEP_SLEEP_REQUEST 0x0ec7
89#define OMAP1510_BIG_SLEEP_REQUEST 0x0cc5
90#define OMAP1510_IDLE_LOOP_REQUEST 0x0c00
91#define OMAP1510_IDLE_CLOCK_DOMAINS 0x2
92
93/* Both big sleep and deep sleep use same values. Difference is in ULPD. */
94#define OMAP1610_IDLECT1_SLEEP_VAL 0x13c7
95#define OMAP1610_IDLECT2_SLEEP_VAL 0x09c7
96#define OMAP1610_IDLECT3_VAL 0x3f
97#define OMAP1610_IDLECT3_SLEEP_ORMASK 0x2c
98#define OMAP1610_IDLECT3 0xfffece24
99#define OMAP1610_IDLE_LOOP_REQUEST 0x0400
100
101#define OMAP730_IDLECT1_SLEEP_VAL 0x16c7
102#define OMAP730_IDLECT2_SLEEP_VAL 0x09c7
103#define OMAP730_IDLECT3_VAL 0x3f
104#define OMAP730_IDLECT3 0xfffece24
105#define OMAP730_IDLE_LOOP_REQUEST 0x0C00
106
107#if !defined(CONFIG_ARCH_OMAP730) && \
108 !defined(CONFIG_ARCH_OMAP15XX) && \
109 !defined(CONFIG_ARCH_OMAP16XX) && \
110 !defined(CONFIG_ARCH_OMAP24XX)
111#error "Power management for this processor not implemented yet"
112#endif
113
114#ifndef __ASSEMBLER__
115
116#include <linux/clk.h>
117
118extern void prevent_idle_sleep(void);
119extern void allow_idle_sleep(void);
120
121/**
122 * clk_deny_idle - Prevents the clock from being idled during MPU idle
123 * @clk: clock signal handle
124 */
125void clk_deny_idle(struct clk *clk);
126
127/**
128 * clk_allow_idle - Counters previous clk_deny_idle
129 * @clk: clock signal handle
130 */
131void clk_deny_idle(struct clk *clk);
132
133extern void omap_pm_idle(void);
134extern void omap_pm_suspend(void);
135extern void omap730_cpu_suspend(unsigned short, unsigned short);
136extern void omap1510_cpu_suspend(unsigned short, unsigned short);
137extern void omap1610_cpu_suspend(unsigned short, unsigned short);
138extern void omap24xx_cpu_suspend(u32 dll_ctrl, u32 cpu_revision);
139extern void omap730_idle_loop_suspend(void);
140extern void omap1510_idle_loop_suspend(void);
141extern void omap1610_idle_loop_suspend(void);
142extern void omap24xx_idle_loop_suspend(void);
143
144extern unsigned int omap730_cpu_suspend_sz;
145extern unsigned int omap1510_cpu_suspend_sz;
146extern unsigned int omap1610_cpu_suspend_sz;
147extern unsigned int omap24xx_cpu_suspend_sz;
148extern unsigned int omap730_idle_loop_suspend_sz;
149extern unsigned int omap1510_idle_loop_suspend_sz;
150extern unsigned int omap1610_idle_loop_suspend_sz;
151extern unsigned int omap24xx_idle_loop_suspend_sz;
152
153#ifdef CONFIG_OMAP_SERIAL_WAKE
154extern void omap_serial_wake_trigger(int enable);
155#else
156#define omap_serial_wakeup_init() {}
157#define omap_serial_wake_trigger(x) {}
158#endif /* CONFIG_OMAP_SERIAL_WAKE */
159
160#define ARM_SAVE(x) arm_sleep_save[ARM_SLEEP_SAVE_##x] = omap_readl(x)
161#define ARM_RESTORE(x) omap_writel((arm_sleep_save[ARM_SLEEP_SAVE_##x]), (x))
162#define ARM_SHOW(x) arm_sleep_save[ARM_SLEEP_SAVE_##x]
163
164#define DSP_SAVE(x) dsp_sleep_save[DSP_SLEEP_SAVE_##x] = __raw_readw(x)
165#define DSP_RESTORE(x) __raw_writew((dsp_sleep_save[DSP_SLEEP_SAVE_##x]), (x))
166#define DSP_SHOW(x) dsp_sleep_save[DSP_SLEEP_SAVE_##x]
167
168#define ULPD_SAVE(x) ulpd_sleep_save[ULPD_SLEEP_SAVE_##x] = omap_readw(x)
169#define ULPD_RESTORE(x) omap_writew((ulpd_sleep_save[ULPD_SLEEP_SAVE_##x]), (x))
170#define ULPD_SHOW(x) ulpd_sleep_save[ULPD_SLEEP_SAVE_##x]
171
172#define MPUI730_SAVE(x) mpui730_sleep_save[MPUI730_SLEEP_SAVE_##x] = omap_readl(x)
173#define MPUI730_RESTORE(x) omap_writel((mpui730_sleep_save[MPUI730_SLEEP_SAVE_##x]), (x))
174#define MPUI730_SHOW(x) mpui730_sleep_save[MPUI730_SLEEP_SAVE_##x]
175
176#define MPUI1510_SAVE(x) mpui1510_sleep_save[MPUI1510_SLEEP_SAVE_##x] = omap_readl(x)
177#define MPUI1510_RESTORE(x) omap_writel((mpui1510_sleep_save[MPUI1510_SLEEP_SAVE_##x]), (x))
178#define MPUI1510_SHOW(x) mpui1510_sleep_save[MPUI1510_SLEEP_SAVE_##x]
179
180#define MPUI1610_SAVE(x) mpui1610_sleep_save[MPUI1610_SLEEP_SAVE_##x] = omap_readl(x)
181#define MPUI1610_RESTORE(x) omap_writel((mpui1610_sleep_save[MPUI1610_SLEEP_SAVE_##x]), (x))
182#define MPUI1610_SHOW(x) mpui1610_sleep_save[MPUI1610_SLEEP_SAVE_##x]
183
184#define OMAP24XX_SAVE(x) omap24xx_sleep_save[OMAP24XX_SLEEP_SAVE_##x] = x
185#define OMAP24XX_RESTORE(x) x = omap24xx_sleep_save[OMAP24XX_SLEEP_SAVE_##x]
186#define OMAP24XX_SHOW(x) omap24xx_sleep_save[OMAP24XX_SLEEP_SAVE_##x]
187
188/*
189 * List of global OMAP registers to preserve.
190 * More ones like CP and general purpose register values are preserved
191 * with the stack pointer in sleep.S.
192 */
193
194enum arm_save_state {
195 ARM_SLEEP_SAVE_START = 0,
196 /*
197 * MPU control registers 32 bits
198 */
199 ARM_SLEEP_SAVE_ARM_CKCTL,
200 ARM_SLEEP_SAVE_ARM_IDLECT1,
201 ARM_SLEEP_SAVE_ARM_IDLECT2,
202 ARM_SLEEP_SAVE_ARM_IDLECT3,
203 ARM_SLEEP_SAVE_ARM_EWUPCT,
204 ARM_SLEEP_SAVE_ARM_RSTCT1,
205 ARM_SLEEP_SAVE_ARM_RSTCT2,
206 ARM_SLEEP_SAVE_ARM_SYSST,
207 ARM_SLEEP_SAVE_SIZE
208};
209
210enum dsp_save_state {
211 DSP_SLEEP_SAVE_START = 0,
212 /*
213 * DSP registers 16 bits
214 */
215 DSP_SLEEP_SAVE_DSP_IDLECT2,
216 DSP_SLEEP_SAVE_SIZE
217};
218
219enum ulpd_save_state {
220 ULPD_SLEEP_SAVE_START = 0,
221 /*
222 * ULPD registers 16 bits
223 */
224 ULPD_SLEEP_SAVE_ULPD_IT_STATUS,
225 ULPD_SLEEP_SAVE_ULPD_CLOCK_CTRL,
226 ULPD_SLEEP_SAVE_ULPD_SOFT_REQ,
227 ULPD_SLEEP_SAVE_ULPD_STATUS_REQ,
228 ULPD_SLEEP_SAVE_ULPD_DPLL_CTRL,
229 ULPD_SLEEP_SAVE_ULPD_POWER_CTRL,
230 ULPD_SLEEP_SAVE_SIZE
231};
232
233enum mpui1510_save_state {
234 MPUI1510_SLEEP_SAVE_START = 0,
235 /*
236 * MPUI registers 32 bits
237 */
238 MPUI1510_SLEEP_SAVE_MPUI_CTRL,
239 MPUI1510_SLEEP_SAVE_MPUI_DSP_BOOT_CONFIG,
240 MPUI1510_SLEEP_SAVE_MPUI_DSP_API_CONFIG,
241 MPUI1510_SLEEP_SAVE_MPUI_DSP_STATUS,
242 MPUI1510_SLEEP_SAVE_EMIFF_SDRAM_CONFIG,
243 MPUI1510_SLEEP_SAVE_EMIFS_CONFIG,
244 MPUI1510_SLEEP_SAVE_OMAP_IH1_MIR,
245 MPUI1510_SLEEP_SAVE_OMAP_IH2_MIR,
246#if defined(CONFIG_ARCH_OMAP15XX)
247 MPUI1510_SLEEP_SAVE_SIZE
248#else
249 MPUI1510_SLEEP_SAVE_SIZE = 0
250#endif
251};
252
253enum mpui730_save_state {
254 MPUI730_SLEEP_SAVE_START = 0,
255 /*
256 * MPUI registers 32 bits
257 */
258 MPUI730_SLEEP_SAVE_MPUI_CTRL,
259 MPUI730_SLEEP_SAVE_MPUI_DSP_BOOT_CONFIG,
260 MPUI730_SLEEP_SAVE_MPUI_DSP_API_CONFIG,
261 MPUI730_SLEEP_SAVE_MPUI_DSP_STATUS,
262 MPUI730_SLEEP_SAVE_EMIFF_SDRAM_CONFIG,
263 MPUI730_SLEEP_SAVE_EMIFS_CONFIG,
264 MPUI730_SLEEP_SAVE_OMAP_IH1_MIR,
265 MPUI730_SLEEP_SAVE_OMAP_IH2_0_MIR,
266 MPUI730_SLEEP_SAVE_OMAP_IH2_1_MIR,
267#if defined(CONFIG_ARCH_OMAP730)
268 MPUI730_SLEEP_SAVE_SIZE
269#else
270 MPUI730_SLEEP_SAVE_SIZE = 0
271#endif
272};
273
274enum mpui1610_save_state {
275 MPUI1610_SLEEP_SAVE_START = 0,
276 /*
277 * MPUI registers 32 bits
278 */
279 MPUI1610_SLEEP_SAVE_MPUI_CTRL,
280 MPUI1610_SLEEP_SAVE_MPUI_DSP_BOOT_CONFIG,
281 MPUI1610_SLEEP_SAVE_MPUI_DSP_API_CONFIG,
282 MPUI1610_SLEEP_SAVE_MPUI_DSP_STATUS,
283 MPUI1610_SLEEP_SAVE_EMIFF_SDRAM_CONFIG,
284 MPUI1610_SLEEP_SAVE_EMIFS_CONFIG,
285 MPUI1610_SLEEP_SAVE_OMAP_IH1_MIR,
286 MPUI1610_SLEEP_SAVE_OMAP_IH2_0_MIR,
287 MPUI1610_SLEEP_SAVE_OMAP_IH2_1_MIR,
288 MPUI1610_SLEEP_SAVE_OMAP_IH2_2_MIR,
289 MPUI1610_SLEEP_SAVE_OMAP_IH2_3_MIR,
290#if defined(CONFIG_ARCH_OMAP16XX)
291 MPUI1610_SLEEP_SAVE_SIZE
292#else
293 MPUI1610_SLEEP_SAVE_SIZE = 0
294#endif
295};
296
297enum omap24xx_save_state {
298 OMAP24XX_SLEEP_SAVE_START = 0,
299 OMAP24XX_SLEEP_SAVE_INTC_MIR0,
300 OMAP24XX_SLEEP_SAVE_INTC_MIR1,
301 OMAP24XX_SLEEP_SAVE_INTC_MIR2,
302
303 OMAP24XX_SLEEP_SAVE_CM_CLKSTCTRL_MPU,
304 OMAP24XX_SLEEP_SAVE_CM_CLKSTCTRL_CORE,
305 OMAP24XX_SLEEP_SAVE_CM_CLKSTCTRL_GFX,
306 OMAP24XX_SLEEP_SAVE_CM_CLKSTCTRL_DSP,
307 OMAP24XX_SLEEP_SAVE_CM_CLKSTCTRL_MDM,
308
309 OMAP24XX_SLEEP_SAVE_PM_PWSTCTRL_MPU,
310 OMAP24XX_SLEEP_SAVE_PM_PWSTCTRL_CORE,
311 OMAP24XX_SLEEP_SAVE_PM_PWSTCTRL_GFX,
312 OMAP24XX_SLEEP_SAVE_PM_PWSTCTRL_DSP,
313 OMAP24XX_SLEEP_SAVE_PM_PWSTCTRL_MDM,
314
315 OMAP24XX_SLEEP_SAVE_CM_IDLEST1_CORE,
316 OMAP24XX_SLEEP_SAVE_CM_IDLEST2_CORE,
317 OMAP24XX_SLEEP_SAVE_CM_IDLEST3_CORE,
318 OMAP24XX_SLEEP_SAVE_CM_IDLEST4_CORE,
319 OMAP24XX_SLEEP_SAVE_CM_IDLEST_GFX,
320 OMAP24XX_SLEEP_SAVE_CM_IDLEST_WKUP,
321 OMAP24XX_SLEEP_SAVE_CM_IDLEST_CKGEN,
322 OMAP24XX_SLEEP_SAVE_CM_IDLEST_DSP,
323 OMAP24XX_SLEEP_SAVE_CM_IDLEST_MDM,
324
325 OMAP24XX_SLEEP_SAVE_CM_AUTOIDLE1_CORE,
326 OMAP24XX_SLEEP_SAVE_CM_AUTOIDLE2_CORE,
327 OMAP24XX_SLEEP_SAVE_CM_AUTOIDLE3_CORE,
328 OMAP24XX_SLEEP_SAVE_CM_AUTOIDLE4_CORE,
329 OMAP24XX_SLEEP_SAVE_CM_AUTOIDLE_WKUP,
330 OMAP24XX_SLEEP_SAVE_CM_AUTOIDLE_PLL,
331 OMAP24XX_SLEEP_SAVE_CM_AUTOIDLE_DSP,
332 OMAP24XX_SLEEP_SAVE_CM_AUTOIDLE_MDM,
333
334 OMAP24XX_SLEEP_SAVE_CM_FCLKEN1_CORE,
335 OMAP24XX_SLEEP_SAVE_CM_FCLKEN2_CORE,
336 OMAP24XX_SLEEP_SAVE_CM_ICLKEN1_CORE,
337 OMAP24XX_SLEEP_SAVE_CM_ICLKEN2_CORE,
338 OMAP24XX_SLEEP_SAVE_CM_ICLKEN3_CORE,
339 OMAP24XX_SLEEP_SAVE_CM_ICLKEN4_CORE,
340 OMAP24XX_SLEEP_SAVE_GPIO1_IRQENABLE1,
341 OMAP24XX_SLEEP_SAVE_GPIO2_IRQENABLE1,
342 OMAP24XX_SLEEP_SAVE_GPIO3_IRQENABLE1,
343 OMAP24XX_SLEEP_SAVE_GPIO4_IRQENABLE1,
344 OMAP24XX_SLEEP_SAVE_GPIO3_OE,
345 OMAP24XX_SLEEP_SAVE_GPIO4_OE,
346 OMAP24XX_SLEEP_SAVE_GPIO3_RISINGDETECT,
347 OMAP24XX_SLEEP_SAVE_GPIO3_FALLINGDETECT,
348 OMAP24XX_SLEEP_SAVE_CONTROL_PADCONF_SPI1_NCS2,
349 OMAP24XX_SLEEP_SAVE_CONTROL_PADCONF_MCBSP1_DX,
350 OMAP24XX_SLEEP_SAVE_CONTROL_PADCONF_SSI1_FLAG_TX,
351 OMAP24XX_SLEEP_SAVE_CONTROL_PADCONF_SYS_NIRQW0,
352 OMAP24XX_SLEEP_SAVE_SIZE
353};
354
355#endif /* ASSEMBLER */
356#endif /* __ASM_ARCH_OMAP_PM_H */
diff --git a/arch/arm/plat-omap/include/mach/prcm.h b/arch/arm/plat-omap/include/mach/prcm.h
new file mode 100644
index 000000000000..56eba0fd6f6a
--- /dev/null
+++ b/arch/arm/plat-omap/include/mach/prcm.h
@@ -0,0 +1,33 @@
1/*
2 * arch/arm/plat-omap/include/mach/prcm.h
3 *
4 * Access definations for use in OMAP24XX clock and power management
5 *
6 * Copyright (C) 2005 Texas Instruments, Inc.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 */
22
23#ifndef __ASM_ARM_ARCH_DPM_PRCM_H
24#define __ASM_ARM_ARCH_DPM_PRCM_H
25
26u32 omap_prcm_get_reset_sources(void);
27
28#endif
29
30
31
32
33
diff --git a/arch/arm/plat-omap/include/mach/sdrc.h b/arch/arm/plat-omap/include/mach/sdrc.h
new file mode 100644
index 000000000000..787b7acec546
--- /dev/null
+++ b/arch/arm/plat-omap/include/mach/sdrc.h
@@ -0,0 +1,75 @@
1#ifndef ____ASM_ARCH_SDRC_H
2#define ____ASM_ARCH_SDRC_H
3
4/*
5 * OMAP2/3 SDRC/SMS register definitions
6 *
7 * Copyright (C) 2007 Texas Instruments, Inc.
8 * Copyright (C) 2007 Nokia Corporation
9 *
10 * Written by Paul Walmsley
11 *
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License version 2 as
14 * published by the Free Software Foundation.
15 */
16
17#include <mach/io.h>
18
19/* SDRC register offsets - read/write with sdrc_{read,write}_reg() */
20
21#define SDRC_SYSCONFIG 0x010
22#define SDRC_DLLA_CTRL 0x060
23#define SDRC_DLLA_STATUS 0x064
24#define SDRC_DLLB_CTRL 0x068
25#define SDRC_DLLB_STATUS 0x06C
26#define SDRC_POWER 0x070
27#define SDRC_MR_0 0x084
28#define SDRC_RFR_CTRL_0 0x0a4
29
30/*
31 * These values represent the number of memory clock cycles between
32 * autorefresh initiation. They assume 1 refresh per 64 ms (JEDEC), 8192
33 * rows per device, and include a subtraction of a 50 cycle window in the
34 * event that the autorefresh command is delayed due to other SDRC activity.
35 * The '| 1' sets the ARE field to send one autorefresh when the autorefresh
36 * counter reaches 0.
37 *
38 * These represent optimal values for common parts, it won't work for all.
39 * As long as you scale down, most parameters are still work, they just
40 * become sub-optimal. The RFR value goes in the opposite direction. If you
41 * don't adjust it down as your clock period increases the refresh interval
42 * will not be met. Setting all parameters for complete worst case may work,
43 * but may cut memory performance by 2x. Due to errata the DLLs need to be
44 * unlocked and their value needs run time calibration. A dynamic call is
45 * need for that as no single right value exists acorss production samples.
46 *
47 * Only the FULL speed values are given. Current code is such that rate
48 * changes must be made at DPLLoutx2. The actual value adjustment for low
49 * frequency operation will be handled by omap_set_performance()
50 *
51 * By having the boot loader boot up in the fastest L4 speed available likely
52 * will result in something which you can switch between.
53 */
54#define SDRC_RFR_CTRL_165MHz (0x00044c00 | 1)
55#define SDRC_RFR_CTRL_133MHz (0x0003de00 | 1)
56#define SDRC_RFR_CTRL_100MHz (0x0002da01 | 1)
57#define SDRC_RFR_CTRL_110MHz (0x0002da01 | 1) /* Need to calc */
58#define SDRC_RFR_CTRL_BYPASS (0x00005000 | 1) /* Need to calc */
59
60
61/*
62 * SMS register access
63 */
64
65
66#define OMAP242X_SMS_REGADDR(reg) (void __iomem *)IO_ADDRESS(OMAP2420_SMS_BASE + reg)
67#define OMAP243X_SMS_REGADDR(reg) (void __iomem *)IO_ADDRESS(OMAP243X_SMS_BASE + reg)
68#define OMAP343X_SMS_REGADDR(reg) (void __iomem *)IO_ADDRESS(OMAP343X_SMS_BASE + reg)
69
70/* SMS register offsets - read/write with sms_{read,write}_reg() */
71
72#define SMS_SYSCONFIG 0x010
73/* REVISIT: fill in other SMS registers here */
74
75#endif
diff --git a/arch/arm/plat-omap/include/mach/serial.h b/arch/arm/plat-omap/include/mach/serial.h
new file mode 100644
index 000000000000..cc6bfa51ccb5
--- /dev/null
+++ b/arch/arm/plat-omap/include/mach/serial.h
@@ -0,0 +1,37 @@
1/*
2 * arch/arm/plat-omap/include/mach/serial.h
3 *
4 * This program is distributed in the hope that it will be useful,
5 * but WITHOUT ANY WARRANTY; without even the implied warranty of
6 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7 * GNU General Public License for more details.
8 */
9
10#ifndef __ASM_ARCH_SERIAL_H
11#define __ASM_ARCH_SERIAL_H
12
13#if defined(CONFIG_ARCH_OMAP1)
14/* OMAP1 serial ports */
15#define OMAP_UART1_BASE 0xfffb0000
16#define OMAP_UART2_BASE 0xfffb0800
17#define OMAP_UART3_BASE 0xfffb9800
18#elif defined(CONFIG_ARCH_OMAP2)
19/* OMAP2 serial ports */
20#define OMAP_UART1_BASE 0x4806a000
21#define OMAP_UART2_BASE 0x4806c000
22#define OMAP_UART3_BASE 0x4806e000
23#endif
24
25#define OMAP_MAX_NR_PORTS 3
26#define OMAP1510_BASE_BAUD (12000000/16)
27#define OMAP16XX_BASE_BAUD (48000000/16)
28
29#define is_omap_port(p) ({int __ret = 0; \
30 if (p == IO_ADDRESS(OMAP_UART1_BASE) || \
31 p == IO_ADDRESS(OMAP_UART2_BASE) || \
32 p == IO_ADDRESS(OMAP_UART3_BASE)) \
33 __ret = 1; \
34 __ret; \
35 })
36
37#endif
diff --git a/arch/arm/plat-omap/include/mach/sram.h b/arch/arm/plat-omap/include/mach/sram.h
new file mode 100644
index 000000000000..e09323449981
--- /dev/null
+++ b/arch/arm/plat-omap/include/mach/sram.h
@@ -0,0 +1,56 @@
1/*
2 * arch/arm/plat-omap/include/mach/sram.h
3 *
4 * Interface for functions that need to be run in internal SRAM
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10
11#ifndef __ARCH_ARM_OMAP_SRAM_H
12#define __ARCH_ARM_OMAP_SRAM_H
13
14extern int __init omap_sram_init(void);
15extern void * omap_sram_push(void * start, unsigned long size);
16extern void omap_sram_reprogram_clock(u32 dpllctl, u32 ckctl);
17
18extern void omap2_sram_ddr_init(u32 *slow_dll_ctrl, u32 fast_dll_ctrl,
19 u32 base_cs, u32 force_unlock);
20extern void omap2_sram_reprogram_sdrc(u32 perf_level, u32 dll_val,
21 u32 mem_type);
22extern u32 omap2_set_prcm(u32 dpll_ctrl_val, u32 sdrc_rfr_val, int bypass);
23
24/* Do not use these */
25extern void omap1_sram_reprogram_clock(u32 ckctl, u32 dpllctl);
26extern unsigned long omap1_sram_reprogram_clock_sz;
27
28extern void omap24xx_sram_reprogram_clock(u32 ckctl, u32 dpllctl);
29extern unsigned long omap24xx_sram_reprogram_clock_sz;
30
31extern void omap242x_sram_ddr_init(u32 *slow_dll_ctrl, u32 fast_dll_ctrl,
32 u32 base_cs, u32 force_unlock);
33extern unsigned long omap242x_sram_ddr_init_sz;
34
35extern u32 omap242x_sram_set_prcm(u32 dpll_ctrl_val, u32 sdrc_rfr_val,
36 int bypass);
37extern unsigned long omap242x_sram_set_prcm_sz;
38
39extern void omap242x_sram_reprogram_sdrc(u32 perf_level, u32 dll_val,
40 u32 mem_type);
41extern unsigned long omap242x_sram_reprogram_sdrc_sz;
42
43
44extern void omap243x_sram_ddr_init(u32 *slow_dll_ctrl, u32 fast_dll_ctrl,
45 u32 base_cs, u32 force_unlock);
46extern unsigned long omap243x_sram_ddr_init_sz;
47
48extern u32 omap243x_sram_set_prcm(u32 dpll_ctrl_val, u32 sdrc_rfr_val,
49 int bypass);
50extern unsigned long omap243x_sram_set_prcm_sz;
51
52extern void omap243x_sram_reprogram_sdrc(u32 perf_level, u32 dll_val,
53 u32 mem_type);
54extern unsigned long omap243x_sram_reprogram_sdrc_sz;
55
56#endif
diff --git a/arch/arm/plat-omap/include/mach/system.h b/arch/arm/plat-omap/include/mach/system.h
new file mode 100644
index 000000000000..06a28c7b98de
--- /dev/null
+++ b/arch/arm/plat-omap/include/mach/system.h
@@ -0,0 +1,49 @@
1/*
2 * Copied from arch/arm/mach-sa1100/include/mach/system.h
3 * Copyright (c) 1999 Nicolas Pitre <nico@cam.org>
4 */
5#ifndef __ASM_ARCH_SYSTEM_H
6#define __ASM_ARCH_SYSTEM_H
7#include <linux/clk.h>
8
9#include <asm/mach-types.h>
10#include <mach/hardware.h>
11
12#ifndef CONFIG_MACH_VOICEBLUE
13#define voiceblue_reset() do {} while (0)
14#endif
15
16extern void omap_prcm_arch_reset(char mode);
17
18static inline void arch_idle(void)
19{
20 cpu_do_idle();
21}
22
23static inline void omap1_arch_reset(char mode)
24{
25 /*
26 * Workaround for 5912/1611b bug mentioned in sprz209d.pdf p. 28
27 * "Global Software Reset Affects Traffic Controller Frequency".
28 */
29 if (cpu_is_omap5912()) {
30 omap_writew(omap_readw(DPLL_CTL) & ~(1 << 4),
31 DPLL_CTL);
32 omap_writew(0x8, ARM_RSTCT1);
33 }
34
35 if (machine_is_voiceblue())
36 voiceblue_reset();
37 else
38 omap_writew(1, ARM_RSTCT1);
39}
40
41static inline void arch_reset(char mode)
42{
43 if (!cpu_is_omap24xx())
44 omap1_arch_reset(mode);
45 else
46 omap_prcm_arch_reset(mode);
47}
48
49#endif
diff --git a/arch/arm/plat-omap/include/mach/tc.h b/arch/arm/plat-omap/include/mach/tc.h
new file mode 100644
index 000000000000..d2fcd789bb9a
--- /dev/null
+++ b/arch/arm/plat-omap/include/mach/tc.h
@@ -0,0 +1,106 @@
1/*
2 * arch/arm/plat-omap/include/mach/tc.h
3 *
4 * OMAP Traffic Controller
5 *
6 * Copyright (C) 2004 Nokia Corporation
7 * Author: Imre Deak <imre.deak@nokia.com>
8 *
9 * This program is free software; you can redistribute it and/or modify it
10 * under the terms of the GNU General Public License as published by the
11 * Free Software Foundation; either version 2 of the License, or (at your
12 * option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful, but
15 * WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License along
20 * with this program; if not, write to the Free Software Foundation, Inc.,
21 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 */
23
24#ifndef __ASM_ARCH_TC_H
25#define __ASM_ARCH_TC_H
26
27#define TCMIF_BASE 0xfffecc00
28#define OMAP_TC_OCPT1_PRIOR (TCMIF_BASE + 0x00)
29#define OMAP_TC_EMIFS_PRIOR (TCMIF_BASE + 0x04)
30#define OMAP_TC_EMIFF_PRIOR (TCMIF_BASE + 0x08)
31#define EMIFS_CONFIG (TCMIF_BASE + 0x0c)
32#define EMIFS_CS0_CONFIG (TCMIF_BASE + 0x10)
33#define EMIFS_CS1_CONFIG (TCMIF_BASE + 0x14)
34#define EMIFS_CS2_CONFIG (TCMIF_BASE + 0x18)
35#define EMIFS_CS3_CONFIG (TCMIF_BASE + 0x1c)
36#define EMIFF_SDRAM_CONFIG (TCMIF_BASE + 0x20)
37#define EMIFF_MRS (TCMIF_BASE + 0x24)
38#define TC_TIMEOUT1 (TCMIF_BASE + 0x28)
39#define TC_TIMEOUT2 (TCMIF_BASE + 0x2c)
40#define TC_TIMEOUT3 (TCMIF_BASE + 0x30)
41#define TC_ENDIANISM (TCMIF_BASE + 0x34)
42#define EMIFF_SDRAM_CONFIG_2 (TCMIF_BASE + 0x3c)
43#define EMIF_CFG_DYNAMIC_WS (TCMIF_BASE + 0x40)
44#define EMIFS_ACS0 (TCMIF_BASE + 0x50)
45#define EMIFS_ACS1 (TCMIF_BASE + 0x54)
46#define EMIFS_ACS2 (TCMIF_BASE + 0x58)
47#define EMIFS_ACS3 (TCMIF_BASE + 0x5c)
48#define OMAP_TC_OCPT2_PRIOR (TCMIF_BASE + 0xd0)
49
50/* external EMIFS chipselect regions */
51#define OMAP_CS0_PHYS 0x00000000
52#define OMAP_CS0_SIZE SZ_64M
53
54#define OMAP_CS1_PHYS 0x04000000
55#define OMAP_CS1_SIZE SZ_64M
56
57#define OMAP_CS1A_PHYS OMAP_CS1_PHYS
58#define OMAP_CS1A_SIZE SZ_32M
59
60#define OMAP_CS1B_PHYS (OMAP_CS1A_PHYS + OMAP_CS1A_SIZE)
61#define OMAP_CS1B_SIZE SZ_32M
62
63#define OMAP_CS2_PHYS 0x08000000
64#define OMAP_CS2_SIZE SZ_64M
65
66#define OMAP_CS2A_PHYS OMAP_CS2_PHYS
67#define OMAP_CS2A_SIZE SZ_32M
68
69#define OMAP_CS2B_PHYS (OMAP_CS2A_PHYS + OMAP_CS2A_SIZE)
70#define OMAP_CS2B_SIZE SZ_32M
71
72#define OMAP_CS3_PHYS 0x0c000000
73#define OMAP_CS3_SIZE SZ_64M
74
75#ifndef __ASSEMBLER__
76
77/* EMIF Slow Interface Configuration Register */
78#define OMAP_EMIFS_CONFIG_FR (1 << 4)
79#define OMAP_EMIFS_CONFIG_PDE (1 << 3)
80#define OMAP_EMIFS_CONFIG_PWD_EN (1 << 2)
81#define OMAP_EMIFS_CONFIG_BM (1 << 1)
82#define OMAP_EMIFS_CONFIG_WP (1 << 0)
83
84#define EMIFS_CCS(n) (EMIFS_CS0_CONFIG + (4 * (n)))
85#define EMIFS_ACS(n) (EMIFS_ACS0 + (4 * (n)))
86
87/* Almost all documentation for chip and board memory maps assumes
88 * BM is clear. Most devel boards have a switch to control booting
89 * from NOR flash (using external chipselect 3) rather than mask ROM,
90 * which uses BM to interchange the physical CS0 and CS3 addresses.
91 */
92static inline u32 omap_cs0_phys(void)
93{
94 return (omap_readl(EMIFS_CONFIG) & OMAP_EMIFS_CONFIG_BM)
95 ? OMAP_CS3_PHYS : 0;
96}
97
98static inline u32 omap_cs3_phys(void)
99{
100 return (omap_readl(EMIFS_CONFIG) & OMAP_EMIFS_CONFIG_BM)
101 ? 0 : OMAP_CS3_PHYS;
102}
103
104#endif /* __ASSEMBLER__ */
105
106#endif /* __ASM_ARCH_TC_H */
diff --git a/arch/arm/plat-omap/include/mach/timex.h b/arch/arm/plat-omap/include/mach/timex.h
new file mode 100644
index 000000000000..6d35767bc48f
--- /dev/null
+++ b/arch/arm/plat-omap/include/mach/timex.h
@@ -0,0 +1,41 @@
1/*
2 * arch/arm/plat-omap/include/mach/timex.h
3 *
4 * Copyright (C) 2000 RidgeRun, Inc.
5 * Author: Greg Lonnon <glonnon@ridgerun.com>
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; either version 2 of the License, or (at your
10 * option) any later version.
11 *
12 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
13 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
14 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
15 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
16 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
17 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
18 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
19 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
20 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
21 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
22 *
23 * You should have received a copy of the GNU General Public License along
24 * with this program; if not, write to the Free Software Foundation, Inc.,
25 * 675 Mass Ave, Cambridge, MA 02139, USA.
26 */
27
28#if !defined(__ASM_ARCH_OMAP_TIMEX_H)
29#define __ASM_ARCH_OMAP_TIMEX_H
30
31/*
32 * OMAP 32KHz timer updates time one jiffie at a time from a secondary timer,
33 * and that's why the CLOCK_TICK_RATE is not 32768.
34 */
35#ifdef CONFIG_OMAP_32K_TIMER
36#define CLOCK_TICK_RATE (CONFIG_OMAP_32K_TIMER_HZ)
37#else
38#define CLOCK_TICK_RATE (HZ * 100000UL)
39#endif
40
41#endif /* __ASM_ARCH_OMAP_TIMEX_H */
diff --git a/arch/arm/plat-omap/include/mach/uncompress.h b/arch/arm/plat-omap/include/mach/uncompress.h
new file mode 100644
index 000000000000..0814c5f210c3
--- /dev/null
+++ b/arch/arm/plat-omap/include/mach/uncompress.h
@@ -0,0 +1,83 @@
1/*
2 * arch/arm/plat-omap/include/mach/uncompress.h
3 *
4 * Serial port stubs for kernel decompress status messages
5 *
6 * Initially based on:
7 * linux-2.4.15-rmk1-dsplinux1.6/arch/arm/plat-omap/include/mach1510/uncompress.h
8 * Copyright (C) 2000 RidgeRun, Inc.
9 * Author: Greg Lonnon <glonnon@ridgerun.com>
10 *
11 * Rewritten by:
12 * Author: <source@mvista.com>
13 * 2004 (c) MontaVista Software, Inc.
14 *
15 * This file is licensed under the terms of the GNU General Public License
16 * version 2. This program is licensed "as is" without any warranty of any
17 * kind, whether express or implied.
18 */
19
20#include <linux/types.h>
21#include <linux/serial_reg.h>
22#include <mach/serial.h>
23
24unsigned int system_rev;
25
26#define UART_OMAP_MDR1 0x08 /* mode definition register */
27#define OMAP_ID_730 0x355F
28#define ID_MASK 0x7fff
29#define check_port(base, shift) ((base[UART_OMAP_MDR1 << shift] & 7) == 0)
30#define omap_get_id() ((*(volatile unsigned int *)(0xfffed404)) >> 12) & ID_MASK
31
32static void putc(int c)
33{
34 volatile u8 * uart = 0;
35 int shift = 2;
36
37#ifdef CONFIG_MACH_OMAP_PALMTE
38 return;
39#endif
40
41#ifdef CONFIG_ARCH_OMAP
42#ifdef CONFIG_OMAP_LL_DEBUG_UART3
43 uart = (volatile u8 *)(OMAP_UART3_BASE);
44#elif defined(CONFIG_OMAP_LL_DEBUG_UART2)
45 uart = (volatile u8 *)(OMAP_UART2_BASE);
46#else
47 uart = (volatile u8 *)(OMAP_UART1_BASE);
48#endif
49
50#ifdef CONFIG_ARCH_OMAP1
51 /* Determine which serial port to use */
52 do {
53 /* MMU is not on, so cpu_is_omapXXXX() won't work here */
54 unsigned int omap_id = omap_get_id();
55
56 if (omap_id == OMAP_ID_730)
57 shift = 0;
58
59 if (check_port(uart, shift))
60 break;
61 /* Silent boot if no serial ports are enabled. */
62 return;
63 } while (0);
64#endif /* CONFIG_ARCH_OMAP1 */
65#endif
66
67 /*
68 * Now, xmit each character
69 */
70 while (!(uart[UART_LSR << shift] & UART_LSR_THRE))
71 barrier();
72 uart[UART_TX << shift] = c;
73}
74
75static inline void flush(void)
76{
77}
78
79/*
80 * nothing to do
81 */
82#define arch_decomp_setup()
83#define arch_decomp_wdog()
diff --git a/arch/arm/plat-omap/include/mach/usb.h b/arch/arm/plat-omap/include/mach/usb.h
new file mode 100644
index 000000000000..a56a610950c2
--- /dev/null
+++ b/arch/arm/plat-omap/include/mach/usb.h
@@ -0,0 +1,141 @@
1// include/asm-arm/mach-omap/usb.h
2
3#ifndef __ASM_ARCH_OMAP_USB_H
4#define __ASM_ARCH_OMAP_USB_H
5
6#include <mach/board.h>
7
8/*-------------------------------------------------------------------------*/
9
10#define OMAP1_OTG_BASE 0xfffb0400
11#define OMAP1_UDC_BASE 0xfffb4000
12#define OMAP1_OHCI_BASE 0xfffba000
13
14#define OMAP2_OHCI_BASE 0x4805e000
15#define OMAP2_UDC_BASE 0x4805e200
16#define OMAP2_OTG_BASE 0x4805e300
17
18#ifdef CONFIG_ARCH_OMAP1
19
20#define OTG_BASE OMAP1_OTG_BASE
21#define UDC_BASE OMAP1_UDC_BASE
22#define OMAP_OHCI_BASE OMAP1_OHCI_BASE
23
24#else
25
26#define OTG_BASE OMAP2_OTG_BASE
27#define UDC_BASE OMAP2_UDC_BASE
28#define OMAP_OHCI_BASE OMAP2_OHCI_BASE
29
30#endif
31
32/*-------------------------------------------------------------------------*/
33
34/*
35 * OTG and transceiver registers, for OMAPs starting with ARM926
36 */
37#define OTG_REV (OTG_BASE + 0x00)
38#define OTG_SYSCON_1 (OTG_BASE + 0x04)
39# define USB2_TRX_MODE(w) (((w)>>24)&0x07)
40# define USB1_TRX_MODE(w) (((w)>>20)&0x07)
41# define USB0_TRX_MODE(w) (((w)>>16)&0x07)
42# define OTG_IDLE_EN (1 << 15)
43# define HST_IDLE_EN (1 << 14)
44# define DEV_IDLE_EN (1 << 13)
45# define OTG_RESET_DONE (1 << 2)
46# define OTG_SOFT_RESET (1 << 1)
47#define OTG_SYSCON_2 (OTG_BASE + 0x08)
48# define OTG_EN (1 << 31)
49# define USBX_SYNCHRO (1 << 30)
50# define OTG_MST16 (1 << 29)
51# define SRP_GPDATA (1 << 28)
52# define SRP_GPDVBUS (1 << 27)
53# define SRP_GPUVBUS(w) (((w)>>24)&0x07)
54# define A_WAIT_VRISE(w) (((w)>>20)&0x07)
55# define B_ASE_BRST(w) (((w)>>16)&0x07)
56# define SRP_DPW (1 << 14)
57# define SRP_DATA (1 << 13)
58# define SRP_VBUS (1 << 12)
59# define OTG_PADEN (1 << 10)
60# define HMC_PADEN (1 << 9)
61# define UHOST_EN (1 << 8)
62# define HMC_TLLSPEED (1 << 7)
63# define HMC_TLLATTACH (1 << 6)
64# define OTG_HMC(w) (((w)>>0)&0x3f)
65#define OTG_CTRL (OTG_BASE + 0x0c)
66# define OTG_USB2_EN (1 << 29)
67# define OTG_USB2_DP (1 << 28)
68# define OTG_USB2_DM (1 << 27)
69# define OTG_USB1_EN (1 << 26)
70# define OTG_USB1_DP (1 << 25)
71# define OTG_USB1_DM (1 << 24)
72# define OTG_USB0_EN (1 << 23)
73# define OTG_USB0_DP (1 << 22)
74# define OTG_USB0_DM (1 << 21)
75# define OTG_ASESSVLD (1 << 20)
76# define OTG_BSESSEND (1 << 19)
77# define OTG_BSESSVLD (1 << 18)
78# define OTG_VBUSVLD (1 << 17)
79# define OTG_ID (1 << 16)
80# define OTG_DRIVER_SEL (1 << 15)
81# define OTG_A_SETB_HNPEN (1 << 12)
82# define OTG_A_BUSREQ (1 << 11)
83# define OTG_B_HNPEN (1 << 9)
84# define OTG_B_BUSREQ (1 << 8)
85# define OTG_BUSDROP (1 << 7)
86# define OTG_PULLDOWN (1 << 5)
87# define OTG_PULLUP (1 << 4)
88# define OTG_DRV_VBUS (1 << 3)
89# define OTG_PD_VBUS (1 << 2)
90# define OTG_PU_VBUS (1 << 1)
91# define OTG_PU_ID (1 << 0)
92#define OTG_IRQ_EN (OTG_BASE + 0x10) /* 16-bit */
93# define DRIVER_SWITCH (1 << 15)
94# define A_VBUS_ERR (1 << 13)
95# define A_REQ_TMROUT (1 << 12)
96# define A_SRP_DETECT (1 << 11)
97# define B_HNP_FAIL (1 << 10)
98# define B_SRP_TMROUT (1 << 9)
99# define B_SRP_DONE (1 << 8)
100# define B_SRP_STARTED (1 << 7)
101# define OPRT_CHG (1 << 0)
102#define OTG_IRQ_SRC (OTG_BASE + 0x14) /* 16-bit */
103 // same bits as in IRQ_EN
104#define OTG_OUTCTRL (OTG_BASE + 0x18) /* 16-bit */
105# define OTGVPD (1 << 14)
106# define OTGVPU (1 << 13)
107# define OTGPUID (1 << 12)
108# define USB2VDR (1 << 10)
109# define USB2PDEN (1 << 9)
110# define USB2PUEN (1 << 8)
111# define USB1VDR (1 << 6)
112# define USB1PDEN (1 << 5)
113# define USB1PUEN (1 << 4)
114# define USB0VDR (1 << 2)
115# define USB0PDEN (1 << 1)
116# define USB0PUEN (1 << 0)
117#define OTG_TEST (OTG_BASE + 0x20) /* 16-bit */
118#define OTG_VENDOR_CODE (OTG_BASE + 0xfc) /* 16-bit */
119
120/*-------------------------------------------------------------------------*/
121
122/* OMAP1 */
123#define USB_TRANSCEIVER_CTRL (0xfffe1000 + 0x0064)
124# define CONF_USB2_UNI_R (1 << 8)
125# define CONF_USB1_UNI_R (1 << 7)
126# define CONF_USB_PORT0_R(x) (((x)>>4)&0x7)
127# define CONF_USB0_ISOLATE_R (1 << 3)
128# define CONF_USB_PWRDN_DM_R (1 << 2)
129# define CONF_USB_PWRDN_DP_R (1 << 1)
130
131/* OMAP2 */
132# define USB_UNIDIR 0x0
133# define USB_UNIDIR_TLL 0x1
134# define USB_BIDIR 0x2
135# define USB_BIDIR_TLL 0x3
136# define USBTXWRMODEI(port, x) ((x) << (22 - (port * 2)))
137# define USBT2TLL5PI (1 << 17)
138# define USB0PUENACTLOI (1 << 16)
139# define USBSTANDBYCTRL (1 << 15)
140
141#endif /* __ASM_ARCH_OMAP_USB_H */
diff --git a/arch/arm/plat-omap/include/mach/vmalloc.h b/arch/arm/plat-omap/include/mach/vmalloc.h
new file mode 100644
index 000000000000..dc104cd96197
--- /dev/null
+++ b/arch/arm/plat-omap/include/mach/vmalloc.h
@@ -0,0 +1,21 @@
1/*
2 * arch/arm/plat-omap/include/mach/vmalloc.h
3 *
4 * Copyright (C) 2000 Russell King.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20#define VMALLOC_END (PAGE_OFFSET + 0x10000000)
21
diff --git a/arch/arm/plat-omap/mailbox.c b/arch/arm/plat-omap/mailbox.c
index ff1413eae0b8..1d7aec1a691a 100644
--- a/arch/arm/plat-omap/mailbox.c
+++ b/arch/arm/plat-omap/mailbox.c
@@ -31,7 +31,7 @@
31#include <linux/err.h> 31#include <linux/err.h>
32#include <linux/delay.h> 32#include <linux/delay.h>
33#include <asm/io.h> 33#include <asm/io.h>
34#include <asm/arch/mailbox.h> 34#include <mach/mailbox.h>
35#include "mailbox.h" 35#include "mailbox.h"
36 36
37static struct omap_mbox *mboxes; 37static struct omap_mbox *mboxes;
diff --git a/arch/arm/plat-omap/mcbsp.c b/arch/arm/plat-omap/mcbsp.c
index c7f74064696c..d0844050f2d2 100644
--- a/arch/arm/plat-omap/mcbsp.c
+++ b/arch/arm/plat-omap/mcbsp.c
@@ -24,8 +24,8 @@
24#include <linux/delay.h> 24#include <linux/delay.h>
25#include <linux/io.h> 25#include <linux/io.h>
26 26
27#include <asm/arch/dma.h> 27#include <mach/dma.h>
28#include <asm/arch/mcbsp.h> 28#include <mach/mcbsp.h>
29 29
30static struct omap_mcbsp mcbsp[OMAP_MAX_MCBSP_COUNT]; 30static struct omap_mcbsp mcbsp[OMAP_MAX_MCBSP_COUNT];
31 31
diff --git a/arch/arm/plat-omap/mux.c b/arch/arm/plat-omap/mux.c
index 6f3f459731c8..847df208c46c 100644
--- a/arch/arm/plat-omap/mux.c
+++ b/arch/arm/plat-omap/mux.c
@@ -28,7 +28,7 @@
28#include <asm/system.h> 28#include <asm/system.h>
29#include <asm/io.h> 29#include <asm/io.h>
30#include <linux/spinlock.h> 30#include <linux/spinlock.h>
31#include <asm/arch/mux.h> 31#include <mach/mux.h>
32 32
33#ifdef CONFIG_OMAP_MUX 33#ifdef CONFIG_OMAP_MUX
34 34
diff --git a/arch/arm/plat-omap/ocpi.c b/arch/arm/plat-omap/ocpi.c
index b5d307026c82..8bdbf979a257 100644
--- a/arch/arm/plat-omap/ocpi.c
+++ b/arch/arm/plat-omap/ocpi.c
@@ -33,7 +33,7 @@
33#include <linux/clk.h> 33#include <linux/clk.h>
34 34
35#include <asm/io.h> 35#include <asm/io.h>
36#include <asm/hardware.h> 36#include <mach/hardware.h>
37 37
38#define OCPI_BASE 0xfffec320 38#define OCPI_BASE 0xfffec320
39#define OCPI_FAULT (OCPI_BASE + 0x00) 39#define OCPI_FAULT (OCPI_BASE + 0x00)
diff --git a/arch/arm/plat-omap/sram.c b/arch/arm/plat-omap/sram.c
index 554ee58e1294..ac67eeb6ca6a 100644
--- a/arch/arm/plat-omap/sram.c
+++ b/arch/arm/plat-omap/sram.c
@@ -22,10 +22,10 @@
22 22
23#include <asm/mach/map.h> 23#include <asm/mach/map.h>
24 24
25#include <asm/arch/sram.h> 25#include <mach/sram.h>
26#include <asm/arch/board.h> 26#include <mach/board.h>
27 27
28#include <asm/arch/control.h> 28#include <mach/control.h>
29 29
30#if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3) 30#if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3)
31# include "../mach-omap2/prm.h" 31# include "../mach-omap2/prm.h"
diff --git a/arch/arm/plat-omap/usb.c b/arch/arm/plat-omap/usb.c
index 2699c16d4da0..777485e0636b 100644
--- a/arch/arm/plat-omap/usb.c
+++ b/arch/arm/plat-omap/usb.c
@@ -31,12 +31,12 @@
31#include <asm/io.h> 31#include <asm/io.h>
32#include <asm/irq.h> 32#include <asm/irq.h>
33#include <asm/system.h> 33#include <asm/system.h>
34#include <asm/hardware.h> 34#include <mach/hardware.h>
35 35
36#include <asm/arch/control.h> 36#include <mach/control.h>
37#include <asm/arch/mux.h> 37#include <mach/mux.h>
38#include <asm/arch/usb.h> 38#include <mach/usb.h>
39#include <asm/arch/board.h> 39#include <mach/board.h>
40 40
41#ifdef CONFIG_ARCH_OMAP1 41#ifdef CONFIG_ARCH_OMAP1
42 42
diff --git a/arch/arm/plat-orion/time.c b/arch/arm/plat-orion/time.c
index 93c4ef9f0067..544d6b327f3a 100644
--- a/arch/arm/plat-orion/time.c
+++ b/arch/arm/plat-orion/time.c
@@ -16,7 +16,7 @@
16#include <linux/interrupt.h> 16#include <linux/interrupt.h>
17#include <linux/irq.h> 17#include <linux/irq.h>
18#include <asm/mach/time.h> 18#include <asm/mach/time.h>
19#include <asm/arch/hardware.h> 19#include <mach/hardware.h>
20 20
21/* 21/*
22 * Number of timer ticks per jiffy. 22 * Number of timer ticks per jiffy.
diff --git a/arch/arm/plat-s3c24xx/clock.c b/arch/arm/plat-s3c24xx/clock.c
index 3ac8d8d781b3..54d4b8e2263c 100644
--- a/arch/arm/plat-s3c24xx/clock.c
+++ b/arch/arm/plat-s3c24xx/clock.c
@@ -40,12 +40,12 @@
40#include <linux/mutex.h> 40#include <linux/mutex.h>
41#include <linux/delay.h> 41#include <linux/delay.h>
42 42
43#include <asm/hardware.h> 43#include <mach/hardware.h>
44#include <asm/irq.h> 44#include <asm/irq.h>
45#include <asm/io.h> 45#include <asm/io.h>
46 46
47#include <asm/arch/regs-clock.h> 47#include <mach/regs-clock.h>
48#include <asm/arch/regs-gpio.h> 48#include <mach/regs-gpio.h>
49 49
50#include <asm/plat-s3c24xx/clock.h> 50#include <asm/plat-s3c24xx/clock.h>
51#include <asm/plat-s3c24xx/cpu.h> 51#include <asm/plat-s3c24xx/cpu.h>
diff --git a/arch/arm/plat-s3c24xx/common-smdk.c b/arch/arm/plat-s3c24xx/common-smdk.c
index 398c7ac25296..1863a1b1bc49 100644
--- a/arch/arm/plat-s3c24xx/common-smdk.c
+++ b/arch/arm/plat-s3c24xx/common-smdk.c
@@ -31,12 +31,12 @@
31#include <asm/mach/irq.h> 31#include <asm/mach/irq.h>
32 32
33#include <asm/mach-types.h> 33#include <asm/mach-types.h>
34#include <asm/hardware.h> 34#include <mach/hardware.h>
35#include <asm/io.h> 35#include <asm/io.h>
36#include <asm/irq.h> 36#include <asm/irq.h>
37 37
38#include <asm/arch/regs-gpio.h> 38#include <mach/regs-gpio.h>
39#include <asm/arch/leds-gpio.h> 39#include <mach/leds-gpio.h>
40 40
41#include <asm/plat-s3c/nand.h> 41#include <asm/plat-s3c/nand.h>
42 42
diff --git a/arch/arm/plat-s3c24xx/cpu.c b/arch/arm/plat-s3c24xx/cpu.c
index f5699cadb0c3..6d60f0476bb8 100644
--- a/arch/arm/plat-s3c24xx/cpu.c
+++ b/arch/arm/plat-s3c24xx/cpu.c
@@ -30,7 +30,7 @@
30#include <linux/platform_device.h> 30#include <linux/platform_device.h>
31#include <linux/delay.h> 31#include <linux/delay.h>
32 32
33#include <asm/hardware.h> 33#include <mach/hardware.h>
34#include <asm/irq.h> 34#include <asm/irq.h>
35#include <asm/io.h> 35#include <asm/io.h>
36#include <asm/delay.h> 36#include <asm/delay.h>
@@ -39,9 +39,9 @@
39#include <asm/mach/arch.h> 39#include <asm/mach/arch.h>
40#include <asm/mach/map.h> 40#include <asm/mach/map.h>
41 41
42#include <asm/arch/system-reset.h> 42#include <mach/system-reset.h>
43 43
44#include <asm/arch/regs-gpio.h> 44#include <mach/regs-gpio.h>
45#include <asm/plat-s3c/regs-serial.h> 45#include <asm/plat-s3c/regs-serial.h>
46 46
47#include <asm/plat-s3c24xx/cpu.h> 47#include <asm/plat-s3c24xx/cpu.h>
diff --git a/arch/arm/plat-s3c24xx/devs.c b/arch/arm/plat-s3c24xx/devs.c
index eea3b32ff798..d6fb76578b11 100644
--- a/arch/arm/plat-s3c24xx/devs.c
+++ b/arch/arm/plat-s3c24xx/devs.c
@@ -23,8 +23,8 @@
23#include <asm/mach/arch.h> 23#include <asm/mach/arch.h>
24#include <asm/mach/map.h> 24#include <asm/mach/map.h>
25#include <asm/mach/irq.h> 25#include <asm/mach/irq.h>
26#include <asm/arch/fb.h> 26#include <mach/fb.h>
27#include <asm/hardware.h> 27#include <mach/hardware.h>
28#include <asm/io.h> 28#include <asm/io.h>
29#include <asm/irq.h> 29#include <asm/irq.h>
30 30
diff --git a/arch/arm/plat-s3c24xx/dma.c b/arch/arm/plat-s3c24xx/dma.c
index 8c5e656d5d8c..08c2aaf14c41 100644
--- a/arch/arm/plat-s3c24xx/dma.c
+++ b/arch/arm/plat-s3c24xx/dma.c
@@ -29,12 +29,12 @@
29 29
30#include <asm/system.h> 30#include <asm/system.h>
31#include <asm/irq.h> 31#include <asm/irq.h>
32#include <asm/hardware.h> 32#include <mach/hardware.h>
33#include <asm/io.h> 33#include <asm/io.h>
34#include <asm/dma.h> 34#include <asm/dma.h>
35 35
36#include <asm/mach/dma.h> 36#include <asm/mach/dma.h>
37#include <asm/arch/map.h> 37#include <mach/map.h>
38 38
39#include <asm/plat-s3c24xx/dma.h> 39#include <asm/plat-s3c24xx/dma.h>
40 40
diff --git a/arch/arm/plat-s3c24xx/gpio.c b/arch/arm/plat-s3c24xx/gpio.c
index ee99dcc7f0bd..dd27334e3d7e 100644
--- a/arch/arm/plat-s3c24xx/gpio.c
+++ b/arch/arm/plat-s3c24xx/gpio.c
@@ -27,11 +27,11 @@
27#include <linux/interrupt.h> 27#include <linux/interrupt.h>
28#include <linux/ioport.h> 28#include <linux/ioport.h>
29 29
30#include <asm/hardware.h> 30#include <mach/hardware.h>
31#include <asm/irq.h> 31#include <asm/irq.h>
32#include <asm/io.h> 32#include <asm/io.h>
33 33
34#include <asm/arch/regs-gpio.h> 34#include <mach/regs-gpio.h>
35 35
36void s3c2410_gpio_cfgpin(unsigned int pin, unsigned int function) 36void s3c2410_gpio_cfgpin(unsigned int pin, unsigned int function)
37{ 37{
diff --git a/arch/arm/plat-s3c24xx/gpiolib.c b/arch/arm/plat-s3c24xx/gpiolib.c
index 825d8d0c5ca2..849f8469714a 100644
--- a/arch/arm/plat-s3c24xx/gpiolib.c
+++ b/arch/arm/plat-s3c24xx/gpiolib.c
@@ -19,10 +19,10 @@
19#include <linux/io.h> 19#include <linux/io.h>
20#include <linux/gpio.h> 20#include <linux/gpio.h>
21 21
22#include <asm/hardware.h> 22#include <mach/hardware.h>
23#include <asm/irq.h> 23#include <asm/irq.h>
24 24
25#include <asm/arch/regs-gpio.h> 25#include <mach/regs-gpio.h>
26 26
27struct s3c24xx_gpio_chip { 27struct s3c24xx_gpio_chip {
28 struct gpio_chip chip; 28 struct gpio_chip chip;
diff --git a/arch/arm/plat-s3c24xx/irq.c b/arch/arm/plat-s3c24xx/irq.c
index 001436c04b13..36cefe176835 100644
--- a/arch/arm/plat-s3c24xx/irq.c
+++ b/arch/arm/plat-s3c24xx/irq.c
@@ -56,14 +56,14 @@
56#include <linux/ioport.h> 56#include <linux/ioport.h>
57#include <linux/sysdev.h> 57#include <linux/sysdev.h>
58 58
59#include <asm/hardware.h> 59#include <mach/hardware.h>
60#include <asm/irq.h> 60#include <asm/irq.h>
61#include <asm/io.h> 61#include <asm/io.h>
62 62
63#include <asm/mach/irq.h> 63#include <asm/mach/irq.h>
64 64
65#include <asm/arch/regs-irq.h> 65#include <mach/regs-irq.h>
66#include <asm/arch/regs-gpio.h> 66#include <mach/regs-gpio.h>
67 67
68#include <asm/plat-s3c24xx/cpu.h> 68#include <asm/plat-s3c24xx/cpu.h>
69#include <asm/plat-s3c24xx/pm.h> 69#include <asm/plat-s3c24xx/pm.h>
diff --git a/arch/arm/plat-s3c24xx/pm-simtec.c b/arch/arm/plat-s3c24xx/pm-simtec.c
index cb0b3a4ccf1b..e6705014b2a0 100644
--- a/arch/arm/plat-s3c24xx/pm-simtec.c
+++ b/arch/arm/plat-s3c24xx/pm-simtec.c
@@ -24,12 +24,12 @@
24#include <asm/mach/arch.h> 24#include <asm/mach/arch.h>
25#include <asm/mach/map.h> 25#include <asm/mach/map.h>
26 26
27#include <asm/hardware.h> 27#include <mach/hardware.h>
28#include <asm/io.h> 28#include <asm/io.h>
29 29
30#include <asm/arch/map.h> 30#include <mach/map.h>
31#include <asm/arch/regs-gpio.h> 31#include <mach/regs-gpio.h>
32#include <asm/arch/regs-mem.h> 32#include <mach/regs-mem.h>
33 33
34#include <asm/mach-types.h> 34#include <asm/mach-types.h>
35 35
diff --git a/arch/arm/plat-s3c24xx/pm.c b/arch/arm/plat-s3c24xx/pm.c
index bf5581a9aeea..fc4b731a949c 100644
--- a/arch/arm/plat-s3c24xx/pm.c
+++ b/arch/arm/plat-s3c24xx/pm.c
@@ -37,14 +37,14 @@
37#include <linux/serial_core.h> 37#include <linux/serial_core.h>
38 38
39#include <asm/cacheflush.h> 39#include <asm/cacheflush.h>
40#include <asm/hardware.h> 40#include <mach/hardware.h>
41#include <asm/io.h> 41#include <asm/io.h>
42 42
43#include <asm/plat-s3c/regs-serial.h> 43#include <asm/plat-s3c/regs-serial.h>
44#include <asm/arch/regs-clock.h> 44#include <mach/regs-clock.h>
45#include <asm/arch/regs-gpio.h> 45#include <mach/regs-gpio.h>
46#include <asm/arch/regs-mem.h> 46#include <mach/regs-mem.h>
47#include <asm/arch/regs-irq.h> 47#include <mach/regs-irq.h>
48 48
49#include <asm/mach/time.h> 49#include <asm/mach/time.h>
50 50
diff --git a/arch/arm/plat-s3c24xx/pwm-clock.c b/arch/arm/plat-s3c24xx/pwm-clock.c
index 2cda3e3c6786..ccfdc9d7ae4b 100644
--- a/arch/arm/plat-s3c24xx/pwm-clock.c
+++ b/arch/arm/plat-s3c24xx/pwm-clock.c
@@ -18,11 +18,11 @@
18#include <linux/err.h> 18#include <linux/err.h>
19#include <linux/io.h> 19#include <linux/io.h>
20 20
21#include <asm/hardware.h> 21#include <mach/hardware.h>
22#include <asm/irq.h> 22#include <asm/irq.h>
23 23
24#include <asm/arch/regs-clock.h> 24#include <mach/regs-clock.h>
25#include <asm/arch/regs-gpio.h> 25#include <mach/regs-gpio.h>
26 26
27#include <asm/plat-s3c24xx/clock.h> 27#include <asm/plat-s3c24xx/clock.h>
28#include <asm/plat-s3c24xx/cpu.h> 28#include <asm/plat-s3c24xx/cpu.h>
diff --git a/arch/arm/plat-s3c24xx/s3c244x-clock.c b/arch/arm/plat-s3c24xx/s3c244x-clock.c
index faf3e0f9f4e2..8a5fffde6631 100644
--- a/arch/arm/plat-s3c24xx/s3c244x-clock.c
+++ b/arch/arm/plat-s3c24xx/s3c244x-clock.c
@@ -34,12 +34,12 @@
34#include <linux/mutex.h> 34#include <linux/mutex.h>
35#include <linux/clk.h> 35#include <linux/clk.h>
36 36
37#include <asm/hardware.h> 37#include <mach/hardware.h>
38#include <asm/atomic.h> 38#include <asm/atomic.h>
39#include <asm/irq.h> 39#include <asm/irq.h>
40#include <asm/io.h> 40#include <asm/io.h>
41 41
42#include <asm/arch/regs-clock.h> 42#include <mach/regs-clock.h>
43 43
44#include <asm/plat-s3c24xx/clock.h> 44#include <asm/plat-s3c24xx/clock.h>
45#include <asm/plat-s3c24xx/cpu.h> 45#include <asm/plat-s3c24xx/cpu.h>
diff --git a/arch/arm/plat-s3c24xx/s3c244x-irq.c b/arch/arm/plat-s3c24xx/s3c244x-irq.c
index 2dbb2606d448..f3dc38cf1de4 100644
--- a/arch/arm/plat-s3c24xx/s3c244x-irq.c
+++ b/arch/arm/plat-s3c24xx/s3c244x-irq.c
@@ -25,14 +25,14 @@
25#include <linux/ioport.h> 25#include <linux/ioport.h>
26#include <linux/sysdev.h> 26#include <linux/sysdev.h>
27 27
28#include <asm/hardware.h> 28#include <mach/hardware.h>
29#include <asm/irq.h> 29#include <asm/irq.h>
30#include <asm/io.h> 30#include <asm/io.h>
31 31
32#include <asm/mach/irq.h> 32#include <asm/mach/irq.h>
33 33
34#include <asm/arch/regs-irq.h> 34#include <mach/regs-irq.h>
35#include <asm/arch/regs-gpio.h> 35#include <mach/regs-gpio.h>
36 36
37#include <asm/plat-s3c24xx/cpu.h> 37#include <asm/plat-s3c24xx/cpu.h>
38#include <asm/plat-s3c24xx/pm.h> 38#include <asm/plat-s3c24xx/pm.h>
diff --git a/arch/arm/plat-s3c24xx/s3c244x.c b/arch/arm/plat-s3c24xx/s3c244x.c
index 2f01af5f64c4..281b4804ed38 100644
--- a/arch/arm/plat-s3c24xx/s3c244x.c
+++ b/arch/arm/plat-s3c24xx/s3c244x.c
@@ -25,15 +25,15 @@
25#include <asm/mach/map.h> 25#include <asm/mach/map.h>
26#include <asm/mach/irq.h> 26#include <asm/mach/irq.h>
27 27
28#include <asm/hardware.h> 28#include <mach/hardware.h>
29#include <asm/io.h> 29#include <asm/io.h>
30#include <asm/irq.h> 30#include <asm/irq.h>
31 31
32#include <asm/arch/regs-clock.h> 32#include <mach/regs-clock.h>
33#include <asm/plat-s3c/regs-serial.h> 33#include <asm/plat-s3c/regs-serial.h>
34#include <asm/arch/regs-gpio.h> 34#include <mach/regs-gpio.h>
35#include <asm/arch/regs-gpioj.h> 35#include <mach/regs-gpioj.h>
36#include <asm/arch/regs-dsc.h> 36#include <mach/regs-dsc.h>
37 37
38#include <asm/plat-s3c24xx/s3c2410.h> 38#include <asm/plat-s3c24xx/s3c2410.h>
39#include <asm/plat-s3c24xx/s3c2440.h> 39#include <asm/plat-s3c24xx/s3c2440.h>
diff --git a/arch/arm/plat-s3c24xx/sleep.S b/arch/arm/plat-s3c24xx/sleep.S
index a646cbe8244c..4981a08b6ebb 100644
--- a/arch/arm/plat-s3c24xx/sleep.S
+++ b/arch/arm/plat-s3c24xx/sleep.S
@@ -26,12 +26,12 @@
26 26
27#include <linux/linkage.h> 27#include <linux/linkage.h>
28#include <asm/assembler.h> 28#include <asm/assembler.h>
29#include <asm/hardware.h> 29#include <mach/hardware.h>
30#include <asm/arch/map.h> 30#include <mach/map.h>
31 31
32#include <asm/arch/regs-gpio.h> 32#include <mach/regs-gpio.h>
33#include <asm/arch/regs-clock.h> 33#include <mach/regs-clock.h>
34#include <asm/arch/regs-mem.h> 34#include <mach/regs-mem.h>
35#include <asm/plat-s3c/regs-serial.h> 35#include <asm/plat-s3c/regs-serial.h>
36 36
37/* CONFIG_DEBUG_RESUME is dangerous if your bootloader does not 37/* CONFIG_DEBUG_RESUME is dangerous if your bootloader does not
diff --git a/arch/arm/plat-s3c24xx/time.c b/arch/arm/plat-s3c24xx/time.c
index 766473b3f98b..b471a21ae2e4 100644
--- a/arch/arm/plat-s3c24xx/time.c
+++ b/arch/arm/plat-s3c24xx/time.c
@@ -32,9 +32,9 @@
32 32
33#include <asm/io.h> 33#include <asm/io.h>
34#include <asm/irq.h> 34#include <asm/irq.h>
35#include <asm/arch/map.h> 35#include <mach/map.h>
36#include <asm/plat-s3c/regs-timer.h> 36#include <asm/plat-s3c/regs-timer.h>
37#include <asm/arch/regs-irq.h> 37#include <mach/regs-irq.h>
38#include <asm/mach/time.h> 38#include <asm/mach/time.h>
39 39
40#include <asm/plat-s3c24xx/clock.h> 40#include <asm/plat-s3c24xx/clock.h>
diff --git a/arch/arm/tools/Makefile b/arch/arm/tools/Makefile
index c2a4993a724c..1dbaa29ac4d7 100644
--- a/arch/arm/tools/Makefile
+++ b/arch/arm/tools/Makefile
@@ -6,4 +6,5 @@
6 6
7include/asm-arm/mach-types.h: $(src)/gen-mach-types $(src)/mach-types 7include/asm-arm/mach-types.h: $(src)/gen-mach-types $(src)/mach-types
8 @echo ' Generating $@' 8 @echo ' Generating $@'
9 @mkdir -p $(dir $@)
9 $(Q)$(AWK) -f $^ > $@ || { rm -f $@; /bin/false; } 10 $(Q)$(AWK) -f $^ > $@ || { rm -f $@; /bin/false; }
diff --git a/arch/avr32/Makefile b/arch/avr32/Makefile
index 17a3529341dd..c9e1f0b47fd3 100644
--- a/arch/avr32/Makefile
+++ b/arch/avr32/Makefile
@@ -23,9 +23,14 @@ KBUILD_AFLAGS += $(cpuflags-y)
23 23
24CHECKFLAGS += -D__avr32__ -D__BIG_ENDIAN 24CHECKFLAGS += -D__avr32__ -D__BIG_ENDIAN
25 25
26machine-$(CONFIG_PLATFORM_AT32AP) := at32ap
27machdirs := $(patsubst %,arch/avr32/mach-%/, $(machine-y))
28
29KBUILD_CPPFLAGS += $(patsubst %,-I$(srctree)/%include,$(machdirs))
30
26head-$(CONFIG_LOADER_U_BOOT) += arch/avr32/boot/u-boot/head.o 31head-$(CONFIG_LOADER_U_BOOT) += arch/avr32/boot/u-boot/head.o
27head-y += arch/avr32/kernel/head.o 32head-y += arch/avr32/kernel/head.o
28core-$(CONFIG_PLATFORM_AT32AP) += arch/avr32/mach-at32ap/ 33core-y += $(machdirs)
29core-$(CONFIG_BOARD_ATSTK1000) += arch/avr32/boards/atstk1000/ 34core-$(CONFIG_BOARD_ATSTK1000) += arch/avr32/boards/atstk1000/
30core-$(CONFIG_BOARD_ATNGW100) += arch/avr32/boards/atngw100/ 35core-$(CONFIG_BOARD_ATNGW100) += arch/avr32/boards/atngw100/
31core-$(CONFIG_LOADER_U_BOOT) += arch/avr32/boot/u-boot/ 36core-$(CONFIG_LOADER_U_BOOT) += arch/avr32/boot/u-boot/
@@ -34,20 +39,6 @@ core-y += arch/avr32/mm/
34drivers-$(CONFIG_OPROFILE) += arch/avr32/oprofile/ 39drivers-$(CONFIG_OPROFILE) += arch/avr32/oprofile/
35libs-y += arch/avr32/lib/ 40libs-y += arch/avr32/lib/
36 41
37archincdir-$(CONFIG_PLATFORM_AT32AP) := arch-at32ap
38
39include/asm-avr32/.arch: $(wildcard include/config/platform/*.h) include/config/auto.conf
40 @echo ' SYMLINK include/asm-avr32/arch -> include/asm-avr32/$(archincdir-y)'
41ifneq ($(KBUILD_SRC),)
42 $(Q)mkdir -p include/asm-avr32
43 $(Q)ln -fsn $(srctree)/include/asm-avr32/$(archincdir-y) include/asm-avr32/arch
44else
45 $(Q)ln -fsn $(archincdir-y) include/asm-avr32/arch
46endif
47 @touch $@
48
49archprepare: include/asm-avr32/.arch
50
51CLEAN_FILES += include/asm-avr32/.arch include/asm-avr32/arch 42CLEAN_FILES += include/asm-avr32/.arch include/asm-avr32/arch
52 43
53BOOT_TARGETS := vmlinux.elf vmlinux.bin uImage uImage.srec 44BOOT_TARGETS := vmlinux.elf vmlinux.bin uImage uImage.srec
diff --git a/arch/avr32/boards/atngw100/flash.c b/arch/avr32/boards/atngw100/flash.c
index b07ae63aa548..55ccc9ce4892 100644
--- a/arch/avr32/boards/atngw100/flash.c
+++ b/arch/avr32/boards/atngw100/flash.c
@@ -13,7 +13,7 @@
13#include <linux/mtd/partitions.h> 13#include <linux/mtd/partitions.h>
14#include <linux/mtd/physmap.h> 14#include <linux/mtd/physmap.h>
15 15
16#include <asm/arch/smc.h> 16#include <mach/smc.h>
17 17
18static struct smc_timing flash_timing __initdata = { 18static struct smc_timing flash_timing __initdata = {
19 .ncs_read_setup = 0, 19 .ncs_read_setup = 0,
diff --git a/arch/avr32/boards/atngw100/setup.c b/arch/avr32/boards/atngw100/setup.c
index c7fe94d03a1e..b8286f1ce854 100644
--- a/arch/avr32/boards/atngw100/setup.c
+++ b/arch/avr32/boards/atngw100/setup.c
@@ -23,10 +23,10 @@
23#include <asm/io.h> 23#include <asm/io.h>
24#include <asm/setup.h> 24#include <asm/setup.h>
25 25
26#include <asm/arch/at32ap700x.h> 26#include <mach/at32ap700x.h>
27#include <asm/arch/board.h> 27#include <mach/board.h>
28#include <asm/arch/init.h> 28#include <mach/init.h>
29#include <asm/arch/portmux.h> 29#include <mach/portmux.h>
30 30
31/* Oscillator frequencies. These are board-specific */ 31/* Oscillator frequencies. These are board-specific */
32unsigned long at32_board_osc_rates[3] = { 32unsigned long at32_board_osc_rates[3] = {
@@ -47,7 +47,7 @@ static struct eth_platform_data __initdata eth_data[2];
47static struct spi_board_info spi0_board_info[] __initdata = { 47static struct spi_board_info spi0_board_info[] __initdata = {
48 { 48 {
49 .modalias = "mtd_dataflash", 49 .modalias = "mtd_dataflash",
50 .max_speed_hz = 10000000, 50 .max_speed_hz = 8000000,
51 .chip_select = 0, 51 .chip_select = 0,
52 }, 52 },
53}; 53};
diff --git a/arch/avr32/boards/atstk1000/atstk1002.c b/arch/avr32/boards/atstk1000/atstk1002.c
index 8538ba75ef92..ee4c292683e1 100644
--- a/arch/avr32/boards/atstk1000/atstk1002.c
+++ b/arch/avr32/boards/atstk1000/atstk1002.c
@@ -23,10 +23,10 @@
23#include <asm/setup.h> 23#include <asm/setup.h>
24#include <asm/atmel-mci.h> 24#include <asm/atmel-mci.h>
25 25
26#include <asm/arch/at32ap700x.h> 26#include <mach/at32ap700x.h>
27#include <asm/arch/board.h> 27#include <mach/board.h>
28#include <asm/arch/init.h> 28#include <mach/init.h>
29#include <asm/arch/portmux.h> 29#include <mach/portmux.h>
30 30
31#include "atstk1000.h" 31#include "atstk1000.h"
32 32
@@ -49,7 +49,7 @@ unsigned long at32_board_osc_rates[3] = {
49 */ 49 */
50#ifdef CONFIG_BOARD_ATSTK1006 50#ifdef CONFIG_BOARD_ATSTK1006
51#include <linux/mtd/partitions.h> 51#include <linux/mtd/partitions.h>
52#include <asm/arch/smc.h> 52#include <mach/smc.h>
53 53
54static struct smc_timing nand_timing __initdata = { 54static struct smc_timing nand_timing __initdata = {
55 .ncs_read_setup = 0, 55 .ncs_read_setup = 0,
@@ -96,7 +96,7 @@ static struct mtd_partition *nand_part_info(int size, int *num_partitions)
96 return nand_partitions; 96 return nand_partitions;
97} 97}
98 98
99struct atmel_nand_data atstk1006_nand_data __initdata = { 99static struct atmel_nand_data atstk1006_nand_data __initdata = {
100 .cle = 21, 100 .cle = 21,
101 .ale = 22, 101 .ale = 22,
102 .rdy_pin = GPIO_PIN_PB(30), 102 .rdy_pin = GPIO_PIN_PB(30),
diff --git a/arch/avr32/boards/atstk1000/atstk1003.c b/arch/avr32/boards/atstk1000/atstk1003.c
index 591fc73b554a..0cf664174c17 100644
--- a/arch/avr32/boards/atstk1000/atstk1003.c
+++ b/arch/avr32/boards/atstk1000/atstk1003.c
@@ -20,10 +20,10 @@
20 20
21#include <asm/setup.h> 21#include <asm/setup.h>
22 22
23#include <asm/arch/at32ap700x.h> 23#include <mach/at32ap700x.h>
24#include <asm/arch/board.h> 24#include <mach/board.h>
25#include <asm/arch/init.h> 25#include <mach/init.h>
26#include <asm/arch/portmux.h> 26#include <mach/portmux.h>
27 27
28#include "atstk1000.h" 28#include "atstk1000.h"
29 29
diff --git a/arch/avr32/boards/atstk1000/atstk1004.c b/arch/avr32/boards/atstk1000/atstk1004.c
index d9c5e0a21256..50a5273e5916 100644
--- a/arch/avr32/boards/atstk1000/atstk1004.c
+++ b/arch/avr32/boards/atstk1000/atstk1004.c
@@ -22,10 +22,10 @@
22 22
23#include <asm/setup.h> 23#include <asm/setup.h>
24 24
25#include <asm/arch/at32ap700x.h> 25#include <mach/at32ap700x.h>
26#include <asm/arch/board.h> 26#include <mach/board.h>
27#include <asm/arch/init.h> 27#include <mach/init.h>
28#include <asm/arch/portmux.h> 28#include <mach/portmux.h>
29 29
30#include "atstk1000.h" 30#include "atstk1000.h"
31 31
diff --git a/arch/avr32/boards/atstk1000/flash.c b/arch/avr32/boards/atstk1000/flash.c
index 3d0a102ad45e..6e4d561977ff 100644
--- a/arch/avr32/boards/atstk1000/flash.c
+++ b/arch/avr32/boards/atstk1000/flash.c
@@ -13,7 +13,7 @@
13#include <linux/mtd/partitions.h> 13#include <linux/mtd/partitions.h>
14#include <linux/mtd/physmap.h> 14#include <linux/mtd/physmap.h>
15 15
16#include <asm/arch/smc.h> 16#include <mach/smc.h>
17 17
18static struct smc_timing flash_timing __initdata = { 18static struct smc_timing flash_timing __initdata = {
19 .ncs_read_setup = 0, 19 .ncs_read_setup = 0,
diff --git a/arch/avr32/boards/atstk1000/setup.c b/arch/avr32/boards/atstk1000/setup.c
index 8bedf93876a3..2d6b560115d9 100644
--- a/arch/avr32/boards/atstk1000/setup.c
+++ b/arch/avr32/boards/atstk1000/setup.c
@@ -18,9 +18,9 @@
18 18
19#include <asm/setup.h> 19#include <asm/setup.h>
20 20
21#include <asm/arch/at32ap700x.h> 21#include <mach/at32ap700x.h>
22#include <asm/arch/board.h> 22#include <mach/board.h>
23#include <asm/arch/portmux.h> 23#include <mach/portmux.h>
24 24
25#include "atstk1000.h" 25#include "atstk1000.h"
26 26
diff --git a/arch/avr32/configs/atngw100_defconfig b/arch/avr32/configs/atngw100_defconfig
index 119edb839ac3..541520912c55 100644
--- a/arch/avr32/configs/atngw100_defconfig
+++ b/arch/avr32/configs/atngw100_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.26-rc3 3# Linux kernel version: 2.6.27-rc1
4# Mon May 26 13:30:59 2008 4# Tue Aug 5 16:00:47 2008
5# 5#
6CONFIG_AVR32=y 6CONFIG_AVR32=y
7CONFIG_GENERIC_GPIO=y 7CONFIG_GENERIC_GPIO=y
@@ -78,10 +78,16 @@ CONFIG_PROFILING=y
78CONFIG_OPROFILE=m 78CONFIG_OPROFILE=m
79CONFIG_HAVE_OPROFILE=y 79CONFIG_HAVE_OPROFILE=y
80CONFIG_KPROBES=y 80CONFIG_KPROBES=y
81# CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS is not set
82# CONFIG_HAVE_IOREMAP_PROT is not set
81CONFIG_HAVE_KPROBES=y 83CONFIG_HAVE_KPROBES=y
82# CONFIG_HAVE_KRETPROBES is not set 84# CONFIG_HAVE_KRETPROBES is not set
85# CONFIG_HAVE_ARCH_TRACEHOOK is not set
83# CONFIG_HAVE_DMA_ATTRS is not set 86# CONFIG_HAVE_DMA_ATTRS is not set
87# CONFIG_USE_GENERIC_SMP_HELPERS is not set
88CONFIG_HAVE_CLK=y
84CONFIG_PROC_PAGE_MONITOR=y 89CONFIG_PROC_PAGE_MONITOR=y
90# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
85CONFIG_SLABINFO=y 91CONFIG_SLABINFO=y
86CONFIG_RT_MUTEXES=y 92CONFIG_RT_MUTEXES=y
87# CONFIG_TINY_SHMEM is not set 93# CONFIG_TINY_SHMEM is not set
@@ -98,6 +104,7 @@ CONFIG_BLOCK=y
98# CONFIG_BLK_DEV_IO_TRACE is not set 104# CONFIG_BLK_DEV_IO_TRACE is not set
99# CONFIG_LSF is not set 105# CONFIG_LSF is not set
100# CONFIG_BLK_DEV_BSG is not set 106# CONFIG_BLK_DEV_BSG is not set
107# CONFIG_BLK_DEV_INTEGRITY is not set
101 108
102# 109#
103# IO Schedulers 110# IO Schedulers
@@ -142,6 +149,7 @@ CONFIG_PHYS_OFFSET=0x10000000
142CONFIG_PREEMPT_NONE=y 149CONFIG_PREEMPT_NONE=y
143# CONFIG_PREEMPT_VOLUNTARY is not set 150# CONFIG_PREEMPT_VOLUNTARY is not set
144# CONFIG_PREEMPT is not set 151# CONFIG_PREEMPT is not set
152CONFIG_QUICKLIST=y
145# CONFIG_HAVE_ARCH_BOOTMEM_NODE is not set 153# CONFIG_HAVE_ARCH_BOOTMEM_NODE is not set
146# CONFIG_ARCH_HAVE_MEMORY_PRESENT is not set 154# CONFIG_ARCH_HAVE_MEMORY_PRESENT is not set
147# CONFIG_NEED_NODE_MEMMAP_SIZE is not set 155# CONFIG_NEED_NODE_MEMMAP_SIZE is not set
@@ -160,6 +168,7 @@ CONFIG_PAGEFLAGS_EXTENDED=y
160CONFIG_SPLIT_PTLOCK_CPUS=4 168CONFIG_SPLIT_PTLOCK_CPUS=4
161# CONFIG_RESOURCES_64BIT is not set 169# CONFIG_RESOURCES_64BIT is not set
162CONFIG_ZONE_DMA_FLAG=0 170CONFIG_ZONE_DMA_FLAG=0
171CONFIG_NR_QUICK=2
163CONFIG_VIRT_TO_BUS=y 172CONFIG_VIRT_TO_BUS=y
164# CONFIG_OWNERSHIP_TRACE is not set 173# CONFIG_OWNERSHIP_TRACE is not set
165CONFIG_NMI_DEBUGGING=y 174CONFIG_NMI_DEBUGGING=y
@@ -174,6 +183,12 @@ CONFIG_CMDLINE=""
174# 183#
175# Power management options 184# Power management options
176# 185#
186CONFIG_PM=y
187# CONFIG_PM_DEBUG is not set
188CONFIG_PM_SLEEP=y
189CONFIG_SUSPEND=y
190CONFIG_SUSPEND_FREEZER=y
191CONFIG_ARCH_SUSPEND_POSSIBLE=y
177 192
178# 193#
179# CPU Frequency scaling 194# CPU Frequency scaling
@@ -205,10 +220,6 @@ CONFIG_CPU_FREQ_AT32AP=y
205# 220#
206CONFIG_BINFMT_ELF=y 221CONFIG_BINFMT_ELF=y
207# CONFIG_BINFMT_MISC is not set 222# CONFIG_BINFMT_MISC is not set
208
209#
210# Networking
211#
212CONFIG_NET=y 223CONFIG_NET=y
213 224
214# 225#
@@ -222,6 +233,7 @@ CONFIG_XFRM_USER=y
222# CONFIG_XFRM_SUB_POLICY is not set 233# CONFIG_XFRM_SUB_POLICY is not set
223# CONFIG_XFRM_MIGRATE is not set 234# CONFIG_XFRM_MIGRATE is not set
224# CONFIG_XFRM_STATISTICS is not set 235# CONFIG_XFRM_STATISTICS is not set
236CONFIG_XFRM_IPCOMP=y
225CONFIG_NET_KEY=y 237CONFIG_NET_KEY=y
226# CONFIG_NET_KEY_MIGRATE is not set 238# CONFIG_NET_KEY_MIGRATE is not set
227CONFIG_INET=y 239CONFIG_INET=y
@@ -339,8 +351,10 @@ CONFIG_IP6_NF_MANGLE=m
339# CONFIG_IP_SCTP is not set 351# CONFIG_IP_SCTP is not set
340# CONFIG_TIPC is not set 352# CONFIG_TIPC is not set
341# CONFIG_ATM is not set 353# CONFIG_ATM is not set
354CONFIG_STP=m
342CONFIG_BRIDGE=m 355CONFIG_BRIDGE=m
343CONFIG_VLAN_8021Q=m 356CONFIG_VLAN_8021Q=m
357# CONFIG_VLAN_8021Q_GVRP is not set
344# CONFIG_DECNET is not set 358# CONFIG_DECNET is not set
345CONFIG_LLC=m 359CONFIG_LLC=m
346# CONFIG_LLC2 is not set 360# CONFIG_LLC2 is not set
@@ -499,7 +513,6 @@ CONFIG_ATMEL_TCB_CLKSRC_BLOCK=0
499# CONFIG_ATA is not set 513# CONFIG_ATA is not set
500# CONFIG_MD is not set 514# CONFIG_MD is not set
501CONFIG_NETDEVICES=y 515CONFIG_NETDEVICES=y
502# CONFIG_NETDEVICES_MULTIQUEUE is not set
503# CONFIG_DUMMY is not set 516# CONFIG_DUMMY is not set
504# CONFIG_BONDING is not set 517# CONFIG_BONDING is not set
505# CONFIG_MACVLAN is not set 518# CONFIG_MACVLAN is not set
@@ -607,21 +620,35 @@ CONFIG_I2C_ALGOBIT=m
607# 620#
608# I2C Hardware Bus support 621# I2C Hardware Bus support
609# 622#
623
624#
625# I2C system bus drivers (mostly embedded / system-on-chip)
626#
610CONFIG_I2C_GPIO=m 627CONFIG_I2C_GPIO=m
611# CONFIG_I2C_OCORES is not set 628# CONFIG_I2C_OCORES is not set
612# CONFIG_I2C_PARPORT_LIGHT is not set
613# CONFIG_I2C_SIMTEC is not set 629# CONFIG_I2C_SIMTEC is not set
630
631#
632# External I2C/SMBus adapter drivers
633#
634# CONFIG_I2C_PARPORT_LIGHT is not set
614# CONFIG_I2C_TAOS_EVM is not set 635# CONFIG_I2C_TAOS_EVM is not set
615# CONFIG_I2C_STUB is not set 636
637#
638# Other I2C/SMBus bus drivers
639#
616# CONFIG_I2C_PCA_PLATFORM is not set 640# CONFIG_I2C_PCA_PLATFORM is not set
641# CONFIG_I2C_STUB is not set
617 642
618# 643#
619# Miscellaneous I2C Chip support 644# Miscellaneous I2C Chip support
620# 645#
621# CONFIG_DS1682 is not set 646# CONFIG_DS1682 is not set
647CONFIG_AT24=m
622# CONFIG_SENSORS_EEPROM is not set 648# CONFIG_SENSORS_EEPROM is not set
623# CONFIG_SENSORS_PCF8574 is not set 649# CONFIG_SENSORS_PCF8574 is not set
624# CONFIG_PCF8575 is not set 650# CONFIG_PCF8575 is not set
651# CONFIG_SENSORS_PCA9539 is not set
625# CONFIG_SENSORS_PCF8591 is not set 652# CONFIG_SENSORS_PCF8591 is not set
626# CONFIG_TPS65010 is not set 653# CONFIG_TPS65010 is not set
627# CONFIG_SENSORS_MAX6875 is not set 654# CONFIG_SENSORS_MAX6875 is not set
@@ -646,27 +673,32 @@ CONFIG_SPI_ATMEL=y
646# CONFIG_SPI_AT25 is not set 673# CONFIG_SPI_AT25 is not set
647CONFIG_SPI_SPIDEV=m 674CONFIG_SPI_SPIDEV=m
648# CONFIG_SPI_TLE62X0 is not set 675# CONFIG_SPI_TLE62X0 is not set
649CONFIG_HAVE_GPIO_LIB=y 676CONFIG_ARCH_REQUIRE_GPIOLIB=y
650 677CONFIG_GPIOLIB=y
651#
652# GPIO Support
653#
654# CONFIG_DEBUG_GPIO is not set 678# CONFIG_DEBUG_GPIO is not set
679CONFIG_GPIO_SYSFS=y
655 680
656# 681#
657# I2C GPIO expanders: 682# I2C GPIO expanders:
658# 683#
684# CONFIG_GPIO_MAX732X is not set
659# CONFIG_GPIO_PCA953X is not set 685# CONFIG_GPIO_PCA953X is not set
660# CONFIG_GPIO_PCF857X is not set 686# CONFIG_GPIO_PCF857X is not set
661 687
662# 688#
689# PCI GPIO expanders:
690#
691
692#
663# SPI GPIO expanders: 693# SPI GPIO expanders:
664# 694#
695# CONFIG_GPIO_MAX7301 is not set
665# CONFIG_GPIO_MCP23S08 is not set 696# CONFIG_GPIO_MCP23S08 is not set
666# CONFIG_W1 is not set 697# CONFIG_W1 is not set
667# CONFIG_POWER_SUPPLY is not set 698# CONFIG_POWER_SUPPLY is not set
668# CONFIG_HWMON is not set 699# CONFIG_HWMON is not set
669# CONFIG_THERMAL is not set 700# CONFIG_THERMAL is not set
701# CONFIG_THERMAL_HWMON is not set
670CONFIG_WATCHDOG=y 702CONFIG_WATCHDOG=y
671# CONFIG_WATCHDOG_NOWAYOUT is not set 703# CONFIG_WATCHDOG_NOWAYOUT is not set
672 704
@@ -685,6 +717,7 @@ CONFIG_SSB_POSSIBLE=y
685# 717#
686# Multifunction device drivers 718# Multifunction device drivers
687# 719#
720# CONFIG_MFD_CORE is not set
688# CONFIG_MFD_SM501 is not set 721# CONFIG_MFD_SM501 is not set
689# CONFIG_HTC_PASIC3 is not set 722# CONFIG_HTC_PASIC3 is not set
690 723
@@ -716,10 +749,6 @@ CONFIG_SSB_POSSIBLE=y
716# Display device support 749# Display device support
717# 750#
718# CONFIG_DISPLAY_SUPPORT is not set 751# CONFIG_DISPLAY_SUPPORT is not set
719
720#
721# Sound
722#
723# CONFIG_SOUND is not set 752# CONFIG_SOUND is not set
724CONFIG_USB_SUPPORT=y 753CONFIG_USB_SUPPORT=y
725# CONFIG_USB_ARCH_HAS_HCD is not set 754# CONFIG_USB_ARCH_HAS_HCD is not set
@@ -740,7 +769,7 @@ CONFIG_USB_GADGET_ATMEL_USBA=y
740CONFIG_USB_ATMEL_USBA=y 769CONFIG_USB_ATMEL_USBA=y
741# CONFIG_USB_GADGET_FSL_USB2 is not set 770# CONFIG_USB_GADGET_FSL_USB2 is not set
742# CONFIG_USB_GADGET_NET2280 is not set 771# CONFIG_USB_GADGET_NET2280 is not set
743# CONFIG_USB_GADGET_PXA2XX is not set 772# CONFIG_USB_GADGET_PXA25X is not set
744# CONFIG_USB_GADGET_M66592 is not set 773# CONFIG_USB_GADGET_M66592 is not set
745# CONFIG_USB_GADGET_PXA27X is not set 774# CONFIG_USB_GADGET_PXA27X is not set
746# CONFIG_USB_GADGET_GOKU is not set 775# CONFIG_USB_GADGET_GOKU is not set
@@ -759,21 +788,24 @@ CONFIG_USB_FILE_STORAGE=m
759CONFIG_USB_G_SERIAL=m 788CONFIG_USB_G_SERIAL=m
760# CONFIG_USB_MIDI_GADGET is not set 789# CONFIG_USB_MIDI_GADGET is not set
761# CONFIG_USB_G_PRINTER is not set 790# CONFIG_USB_G_PRINTER is not set
762CONFIG_MMC=m 791CONFIG_USB_CDC_COMPOSITE=m
792CONFIG_MMC=y
763# CONFIG_MMC_DEBUG is not set 793# CONFIG_MMC_DEBUG is not set
764# CONFIG_MMC_UNSAFE_RESUME is not set 794# CONFIG_MMC_UNSAFE_RESUME is not set
765 795
766# 796#
767# MMC/SD Card Drivers 797# MMC/SD Card Drivers
768# 798#
769CONFIG_MMC_BLOCK=m 799CONFIG_MMC_BLOCK=y
770CONFIG_MMC_BLOCK_BOUNCE=y 800CONFIG_MMC_BLOCK_BOUNCE=y
771# CONFIG_SDIO_UART is not set 801# CONFIG_SDIO_UART is not set
772# CONFIG_MMC_TEST is not set 802CONFIG_MMC_TEST=m
773 803
774# 804#
775# MMC/SD Host Controller Drivers 805# MMC/SD Host Controller Drivers
776# 806#
807# CONFIG_MMC_SDHCI is not set
808CONFIG_MMC_ATMELMCI=y
777CONFIG_MMC_SPI=m 809CONFIG_MMC_SPI=m
778# CONFIG_MEMSTICK is not set 810# CONFIG_MEMSTICK is not set
779CONFIG_NEW_LEDS=y 811CONFIG_NEW_LEDS=y
@@ -783,6 +815,7 @@ CONFIG_LEDS_CLASS=y
783# LED drivers 815# LED drivers
784# 816#
785CONFIG_LEDS_GPIO=y 817CONFIG_LEDS_GPIO=y
818# CONFIG_LEDS_PCA955X is not set
786 819
787# 820#
788# LED Triggers 821# LED Triggers
@@ -821,10 +854,13 @@ CONFIG_RTC_INTF_DEV=y
821# CONFIG_RTC_DRV_PCF8583 is not set 854# CONFIG_RTC_DRV_PCF8583 is not set
822# CONFIG_RTC_DRV_M41T80 is not set 855# CONFIG_RTC_DRV_M41T80 is not set
823# CONFIG_RTC_DRV_S35390A is not set 856# CONFIG_RTC_DRV_S35390A is not set
857# CONFIG_RTC_DRV_FM3130 is not set
824 858
825# 859#
826# SPI RTC drivers 860# SPI RTC drivers
827# 861#
862# CONFIG_RTC_DRV_M41T94 is not set
863# CONFIG_RTC_DRV_DS1305 is not set
828# CONFIG_RTC_DRV_MAX6902 is not set 864# CONFIG_RTC_DRV_MAX6902 is not set
829# CONFIG_RTC_DRV_R9701 is not set 865# CONFIG_RTC_DRV_R9701 is not set
830# CONFIG_RTC_DRV_RS5C348 is not set 866# CONFIG_RTC_DRV_RS5C348 is not set
@@ -844,6 +880,19 @@ CONFIG_RTC_INTF_DEV=y
844# on-CPU RTC drivers 880# on-CPU RTC drivers
845# 881#
846CONFIG_RTC_DRV_AT32AP700X=y 882CONFIG_RTC_DRV_AT32AP700X=y
883CONFIG_DMADEVICES=y
884
885#
886# DMA Devices
887#
888CONFIG_DW_DMAC=y
889CONFIG_DMA_ENGINE=y
890
891#
892# DMA Clients
893#
894# CONFIG_NET_DMA is not set
895CONFIG_DMATEST=m
847# CONFIG_UIO is not set 896# CONFIG_UIO is not set
848 897
849# 898#
@@ -921,6 +970,7 @@ CONFIG_JFFS2_RTIME=y
921# CONFIG_CRAMFS is not set 970# CONFIG_CRAMFS is not set
922# CONFIG_VXFS_FS is not set 971# CONFIG_VXFS_FS is not set
923# CONFIG_MINIX_FS is not set 972# CONFIG_MINIX_FS is not set
973# CONFIG_OMFS_FS is not set
924# CONFIG_HPFS_FS is not set 974# CONFIG_HPFS_FS is not set
925# CONFIG_QNX4FS_FS is not set 975# CONFIG_QNX4FS_FS is not set
926# CONFIG_ROMFS_FS is not set 976# CONFIG_ROMFS_FS is not set
@@ -931,17 +981,16 @@ CONFIG_NFS_FS=y
931CONFIG_NFS_V3=y 981CONFIG_NFS_V3=y
932# CONFIG_NFS_V3_ACL is not set 982# CONFIG_NFS_V3_ACL is not set
933# CONFIG_NFS_V4 is not set 983# CONFIG_NFS_V4 is not set
984CONFIG_ROOT_NFS=y
934CONFIG_NFSD=m 985CONFIG_NFSD=m
935CONFIG_NFSD_V3=y 986CONFIG_NFSD_V3=y
936# CONFIG_NFSD_V3_ACL is not set 987# CONFIG_NFSD_V3_ACL is not set
937# CONFIG_NFSD_V4 is not set 988# CONFIG_NFSD_V4 is not set
938CONFIG_ROOT_NFS=y
939CONFIG_LOCKD=y 989CONFIG_LOCKD=y
940CONFIG_LOCKD_V4=y 990CONFIG_LOCKD_V4=y
941CONFIG_EXPORTFS=m 991CONFIG_EXPORTFS=m
942CONFIG_NFS_COMMON=y 992CONFIG_NFS_COMMON=y
943CONFIG_SUNRPC=y 993CONFIG_SUNRPC=y
944# CONFIG_SUNRPC_BIND34 is not set
945# CONFIG_RPCSEC_GSS_KRB5 is not set 994# CONFIG_RPCSEC_GSS_KRB5 is not set
946# CONFIG_RPCSEC_GSS_SPKM3 is not set 995# CONFIG_RPCSEC_GSS_SPKM3 is not set
947CONFIG_SMB_FS=m 996CONFIG_SMB_FS=m
@@ -1017,6 +1066,8 @@ CONFIG_MAGIC_SYSRQ=y
1017CONFIG_DEBUG_KERNEL=y 1066CONFIG_DEBUG_KERNEL=y
1018# CONFIG_DEBUG_SHIRQ is not set 1067# CONFIG_DEBUG_SHIRQ is not set
1019CONFIG_DETECT_SOFTLOCKUP=y 1068CONFIG_DETECT_SOFTLOCKUP=y
1069# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
1070CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
1020CONFIG_SCHED_DEBUG=y 1071CONFIG_SCHED_DEBUG=y
1021# CONFIG_SCHEDSTATS is not set 1072# CONFIG_SCHEDSTATS is not set
1022# CONFIG_TIMER_STATS is not set 1073# CONFIG_TIMER_STATS is not set
@@ -1037,6 +1088,7 @@ CONFIG_DEBUG_BUGVERBOSE=y
1037# CONFIG_DEBUG_INFO is not set 1088# CONFIG_DEBUG_INFO is not set
1038# CONFIG_DEBUG_VM is not set 1089# CONFIG_DEBUG_VM is not set
1039# CONFIG_DEBUG_WRITECOUNT is not set 1090# CONFIG_DEBUG_WRITECOUNT is not set
1091# CONFIG_DEBUG_MEMORY_INIT is not set
1040# CONFIG_DEBUG_LIST is not set 1092# CONFIG_DEBUG_LIST is not set
1041# CONFIG_DEBUG_SG is not set 1093# CONFIG_DEBUG_SG is not set
1042CONFIG_FRAME_POINTER=y 1094CONFIG_FRAME_POINTER=y
@@ -1101,6 +1153,10 @@ CONFIG_CRYPTO_HMAC=y
1101# CONFIG_CRYPTO_MD4 is not set 1153# CONFIG_CRYPTO_MD4 is not set
1102CONFIG_CRYPTO_MD5=y 1154CONFIG_CRYPTO_MD5=y
1103# CONFIG_CRYPTO_MICHAEL_MIC is not set 1155# CONFIG_CRYPTO_MICHAEL_MIC is not set
1156# CONFIG_CRYPTO_RMD128 is not set
1157# CONFIG_CRYPTO_RMD160 is not set
1158# CONFIG_CRYPTO_RMD256 is not set
1159# CONFIG_CRYPTO_RMD320 is not set
1104CONFIG_CRYPTO_SHA1=y 1160CONFIG_CRYPTO_SHA1=y
1105# CONFIG_CRYPTO_SHA256 is not set 1161# CONFIG_CRYPTO_SHA256 is not set
1106# CONFIG_CRYPTO_SHA512 is not set 1162# CONFIG_CRYPTO_SHA512 is not set
@@ -1141,12 +1197,14 @@ CONFIG_BITREVERSE=y
1141# CONFIG_GENERIC_FIND_NEXT_BIT is not set 1197# CONFIG_GENERIC_FIND_NEXT_BIT is not set
1142CONFIG_CRC_CCITT=m 1198CONFIG_CRC_CCITT=m
1143# CONFIG_CRC16 is not set 1199# CONFIG_CRC16 is not set
1200# CONFIG_CRC_T10DIF is not set
1144CONFIG_CRC_ITU_T=m 1201CONFIG_CRC_ITU_T=m
1145CONFIG_CRC32=y 1202CONFIG_CRC32=y
1146CONFIG_CRC7=m 1203CONFIG_CRC7=m
1147# CONFIG_LIBCRC32C is not set 1204# CONFIG_LIBCRC32C is not set
1148CONFIG_ZLIB_INFLATE=y 1205CONFIG_ZLIB_INFLATE=y
1149CONFIG_ZLIB_DEFLATE=y 1206CONFIG_ZLIB_DEFLATE=y
1207CONFIG_GENERIC_ALLOCATOR=y
1150CONFIG_PLIST=y 1208CONFIG_PLIST=y
1151CONFIG_HAS_IOMEM=y 1209CONFIG_HAS_IOMEM=y
1152CONFIG_HAS_IOPORT=y 1210CONFIG_HAS_IOPORT=y
diff --git a/arch/avr32/configs/atstk1002_defconfig b/arch/avr32/configs/atstk1002_defconfig
index c6d02eac8791..69fce6b6a783 100644
--- a/arch/avr32/configs/atstk1002_defconfig
+++ b/arch/avr32/configs/atstk1002_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.26-rc3 3# Linux kernel version: 2.6.27-rc1
4# Mon May 26 13:30:20 2008 4# Mon Aug 4 16:02:27 2008
5# 5#
6CONFIG_AVR32=y 6CONFIG_AVR32=y
7CONFIG_GENERIC_GPIO=y 7CONFIG_GENERIC_GPIO=y
@@ -77,10 +77,16 @@ CONFIG_PROFILING=y
77CONFIG_OPROFILE=m 77CONFIG_OPROFILE=m
78CONFIG_HAVE_OPROFILE=y 78CONFIG_HAVE_OPROFILE=y
79CONFIG_KPROBES=y 79CONFIG_KPROBES=y
80# CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS is not set
81# CONFIG_HAVE_IOREMAP_PROT is not set
80CONFIG_HAVE_KPROBES=y 82CONFIG_HAVE_KPROBES=y
81# CONFIG_HAVE_KRETPROBES is not set 83# CONFIG_HAVE_KRETPROBES is not set
84# CONFIG_HAVE_ARCH_TRACEHOOK is not set
82# CONFIG_HAVE_DMA_ATTRS is not set 85# CONFIG_HAVE_DMA_ATTRS is not set
86# CONFIG_USE_GENERIC_SMP_HELPERS is not set
87CONFIG_HAVE_CLK=y
83CONFIG_PROC_PAGE_MONITOR=y 88CONFIG_PROC_PAGE_MONITOR=y
89# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
84CONFIG_SLABINFO=y 90CONFIG_SLABINFO=y
85CONFIG_RT_MUTEXES=y 91CONFIG_RT_MUTEXES=y
86# CONFIG_TINY_SHMEM is not set 92# CONFIG_TINY_SHMEM is not set
@@ -91,12 +97,13 @@ CONFIG_MODULE_UNLOAD=y
91# CONFIG_MODULE_FORCE_UNLOAD is not set 97# CONFIG_MODULE_FORCE_UNLOAD is not set
92# CONFIG_MODVERSIONS is not set 98# CONFIG_MODVERSIONS is not set
93# CONFIG_MODULE_SRCVERSION_ALL is not set 99# CONFIG_MODULE_SRCVERSION_ALL is not set
94# CONFIG_KMOD is not set 100CONFIG_KMOD=y
95CONFIG_BLOCK=y 101CONFIG_BLOCK=y
96# CONFIG_LBD is not set 102# CONFIG_LBD is not set
97# CONFIG_BLK_DEV_IO_TRACE is not set 103# CONFIG_BLK_DEV_IO_TRACE is not set
98# CONFIG_LSF is not set 104# CONFIG_LSF is not set
99# CONFIG_BLK_DEV_BSG is not set 105# CONFIG_BLK_DEV_BSG is not set
106# CONFIG_BLK_DEV_INTEGRITY is not set
100 107
101# 108#
102# IO Schedulers 109# IO Schedulers
@@ -130,6 +137,7 @@ CONFIG_BOARD_ATSTK1000=y
130CONFIG_BOARD_ATSTK1002=y 137CONFIG_BOARD_ATSTK1002=y
131# CONFIG_BOARD_ATSTK1003 is not set 138# CONFIG_BOARD_ATSTK1003 is not set
132# CONFIG_BOARD_ATSTK1004 is not set 139# CONFIG_BOARD_ATSTK1004 is not set
140# CONFIG_BOARD_ATSTK1006 is not set
133# CONFIG_BOARD_ATSTK100X_CUSTOM is not set 141# CONFIG_BOARD_ATSTK100X_CUSTOM is not set
134# CONFIG_BOARD_ATSTK100X_SPI1 is not set 142# CONFIG_BOARD_ATSTK100X_SPI1 is not set
135# CONFIG_BOARD_ATSTK1000_J2_LED is not set 143# CONFIG_BOARD_ATSTK1000_J2_LED is not set
@@ -150,6 +158,7 @@ CONFIG_PHYS_OFFSET=0x10000000
150CONFIG_PREEMPT_NONE=y 158CONFIG_PREEMPT_NONE=y
151# CONFIG_PREEMPT_VOLUNTARY is not set 159# CONFIG_PREEMPT_VOLUNTARY is not set
152# CONFIG_PREEMPT is not set 160# CONFIG_PREEMPT is not set
161CONFIG_QUICKLIST=y
153# CONFIG_HAVE_ARCH_BOOTMEM_NODE is not set 162# CONFIG_HAVE_ARCH_BOOTMEM_NODE is not set
154# CONFIG_ARCH_HAVE_MEMORY_PRESENT is not set 163# CONFIG_ARCH_HAVE_MEMORY_PRESENT is not set
155# CONFIG_NEED_NODE_MEMMAP_SIZE is not set 164# CONFIG_NEED_NODE_MEMMAP_SIZE is not set
@@ -168,6 +177,7 @@ CONFIG_PAGEFLAGS_EXTENDED=y
168CONFIG_SPLIT_PTLOCK_CPUS=4 177CONFIG_SPLIT_PTLOCK_CPUS=4
169# CONFIG_RESOURCES_64BIT is not set 178# CONFIG_RESOURCES_64BIT is not set
170CONFIG_ZONE_DMA_FLAG=0 179CONFIG_ZONE_DMA_FLAG=0
180CONFIG_NR_QUICK=2
171CONFIG_VIRT_TO_BUS=y 181CONFIG_VIRT_TO_BUS=y
172# CONFIG_OWNERSHIP_TRACE is not set 182# CONFIG_OWNERSHIP_TRACE is not set
173CONFIG_NMI_DEBUGGING=y 183CONFIG_NMI_DEBUGGING=y
@@ -182,6 +192,12 @@ CONFIG_CMDLINE=""
182# 192#
183# Power management options 193# Power management options
184# 194#
195CONFIG_PM=y
196# CONFIG_PM_DEBUG is not set
197CONFIG_PM_SLEEP=y
198CONFIG_SUSPEND=y
199CONFIG_SUSPEND_FREEZER=y
200CONFIG_ARCH_SUSPEND_POSSIBLE=y
185 201
186# 202#
187# CPU Frequency scaling 203# CPU Frequency scaling
@@ -213,10 +229,6 @@ CONFIG_CPU_FREQ_AT32AP=y
213# 229#
214CONFIG_BINFMT_ELF=y 230CONFIG_BINFMT_ELF=y
215# CONFIG_BINFMT_MISC is not set 231# CONFIG_BINFMT_MISC is not set
216
217#
218# Networking
219#
220CONFIG_NET=y 232CONFIG_NET=y
221 233
222# 234#
@@ -230,6 +242,7 @@ CONFIG_XFRM_USER=m
230# CONFIG_XFRM_SUB_POLICY is not set 242# CONFIG_XFRM_SUB_POLICY is not set
231# CONFIG_XFRM_MIGRATE is not set 243# CONFIG_XFRM_MIGRATE is not set
232# CONFIG_XFRM_STATISTICS is not set 244# CONFIG_XFRM_STATISTICS is not set
245CONFIG_XFRM_IPCOMP=m
233CONFIG_NET_KEY=m 246CONFIG_NET_KEY=m
234# CONFIG_NET_KEY_MIGRATE is not set 247# CONFIG_NET_KEY_MIGRATE is not set
235CONFIG_INET=y 248CONFIG_INET=y
@@ -284,6 +297,7 @@ CONFIG_IPV6_TUNNEL=m
284# CONFIG_IP_SCTP is not set 297# CONFIG_IP_SCTP is not set
285# CONFIG_TIPC is not set 298# CONFIG_TIPC is not set
286# CONFIG_ATM is not set 299# CONFIG_ATM is not set
300CONFIG_STP=m
287CONFIG_BRIDGE=m 301CONFIG_BRIDGE=m
288# CONFIG_VLAN_8021Q is not set 302# CONFIG_VLAN_8021Q is not set
289# CONFIG_DECNET is not set 303# CONFIG_DECNET is not set
@@ -474,6 +488,7 @@ CONFIG_SCSI_WAIT_SCAN=m
474# CONFIG_SCSI_SAS_LIBSAS is not set 488# CONFIG_SCSI_SAS_LIBSAS is not set
475# CONFIG_SCSI_SRP_ATTRS is not set 489# CONFIG_SCSI_SRP_ATTRS is not set
476# CONFIG_SCSI_LOWLEVEL is not set 490# CONFIG_SCSI_LOWLEVEL is not set
491# CONFIG_SCSI_DH is not set
477CONFIG_ATA=m 492CONFIG_ATA=m
478# CONFIG_ATA_NONSTANDARD is not set 493# CONFIG_ATA_NONSTANDARD is not set
479# CONFIG_SATA_PMP is not set 494# CONFIG_SATA_PMP is not set
@@ -483,7 +498,6 @@ CONFIG_PATA_AT32=m
483# CONFIG_PATA_PLATFORM is not set 498# CONFIG_PATA_PLATFORM is not set
484# CONFIG_MD is not set 499# CONFIG_MD is not set
485CONFIG_NETDEVICES=y 500CONFIG_NETDEVICES=y
486# CONFIG_NETDEVICES_MULTIQUEUE is not set
487# CONFIG_DUMMY is not set 501# CONFIG_DUMMY is not set
488# CONFIG_BONDING is not set 502# CONFIG_BONDING is not set
489# CONFIG_MACVLAN is not set 503# CONFIG_MACVLAN is not set
@@ -625,21 +639,35 @@ CONFIG_I2C_ALGOBIT=m
625# 639#
626# I2C Hardware Bus support 640# I2C Hardware Bus support
627# 641#
642
643#
644# I2C system bus drivers (mostly embedded / system-on-chip)
645#
628CONFIG_I2C_GPIO=m 646CONFIG_I2C_GPIO=m
629# CONFIG_I2C_OCORES is not set 647# CONFIG_I2C_OCORES is not set
630# CONFIG_I2C_PARPORT_LIGHT is not set
631# CONFIG_I2C_SIMTEC is not set 648# CONFIG_I2C_SIMTEC is not set
649
650#
651# External I2C/SMBus adapter drivers
652#
653# CONFIG_I2C_PARPORT_LIGHT is not set
632# CONFIG_I2C_TAOS_EVM is not set 654# CONFIG_I2C_TAOS_EVM is not set
633# CONFIG_I2C_STUB is not set 655
656#
657# Other I2C/SMBus bus drivers
658#
634# CONFIG_I2C_PCA_PLATFORM is not set 659# CONFIG_I2C_PCA_PLATFORM is not set
660# CONFIG_I2C_STUB is not set
635 661
636# 662#
637# Miscellaneous I2C Chip support 663# Miscellaneous I2C Chip support
638# 664#
639# CONFIG_DS1682 is not set 665# CONFIG_DS1682 is not set
666CONFIG_AT24=m
640# CONFIG_SENSORS_EEPROM is not set 667# CONFIG_SENSORS_EEPROM is not set
641# CONFIG_SENSORS_PCF8574 is not set 668# CONFIG_SENSORS_PCF8574 is not set
642# CONFIG_PCF8575 is not set 669# CONFIG_PCF8575 is not set
670# CONFIG_SENSORS_PCA9539 is not set
643# CONFIG_SENSORS_PCF8591 is not set 671# CONFIG_SENSORS_PCF8591 is not set
644# CONFIG_TPS65010 is not set 672# CONFIG_TPS65010 is not set
645# CONFIG_SENSORS_MAX6875 is not set 673# CONFIG_SENSORS_MAX6875 is not set
@@ -664,27 +692,32 @@ CONFIG_SPI_ATMEL=y
664# CONFIG_SPI_AT25 is not set 692# CONFIG_SPI_AT25 is not set
665CONFIG_SPI_SPIDEV=m 693CONFIG_SPI_SPIDEV=m
666# CONFIG_SPI_TLE62X0 is not set 694# CONFIG_SPI_TLE62X0 is not set
667CONFIG_HAVE_GPIO_LIB=y 695CONFIG_ARCH_REQUIRE_GPIOLIB=y
668 696CONFIG_GPIOLIB=y
669#
670# GPIO Support
671#
672# CONFIG_DEBUG_GPIO is not set 697# CONFIG_DEBUG_GPIO is not set
698CONFIG_GPIO_SYSFS=y
673 699
674# 700#
675# I2C GPIO expanders: 701# I2C GPIO expanders:
676# 702#
703# CONFIG_GPIO_MAX732X is not set
677# CONFIG_GPIO_PCA953X is not set 704# CONFIG_GPIO_PCA953X is not set
678# CONFIG_GPIO_PCF857X is not set 705# CONFIG_GPIO_PCF857X is not set
679 706
680# 707#
708# PCI GPIO expanders:
709#
710
711#
681# SPI GPIO expanders: 712# SPI GPIO expanders:
682# 713#
714# CONFIG_GPIO_MAX7301 is not set
683# CONFIG_GPIO_MCP23S08 is not set 715# CONFIG_GPIO_MCP23S08 is not set
684# CONFIG_W1 is not set 716# CONFIG_W1 is not set
685# CONFIG_POWER_SUPPLY is not set 717# CONFIG_POWER_SUPPLY is not set
686# CONFIG_HWMON is not set 718# CONFIG_HWMON is not set
687# CONFIG_THERMAL is not set 719# CONFIG_THERMAL is not set
720# CONFIG_THERMAL_HWMON is not set
688CONFIG_WATCHDOG=y 721CONFIG_WATCHDOG=y
689# CONFIG_WATCHDOG_NOWAYOUT is not set 722# CONFIG_WATCHDOG_NOWAYOUT is not set
690 723
@@ -703,6 +736,7 @@ CONFIG_SSB_POSSIBLE=y
703# 736#
704# Multifunction device drivers 737# Multifunction device drivers
705# 738#
739# CONFIG_MFD_CORE is not set
706# CONFIG_MFD_SM501 is not set 740# CONFIG_MFD_SM501 is not set
707# CONFIG_HTC_PASIC3 is not set 741# CONFIG_HTC_PASIC3 is not set
708 742
@@ -754,6 +788,9 @@ CONFIG_FB_ATMEL=y
754CONFIG_BACKLIGHT_LCD_SUPPORT=y 788CONFIG_BACKLIGHT_LCD_SUPPORT=y
755CONFIG_LCD_CLASS_DEVICE=y 789CONFIG_LCD_CLASS_DEVICE=y
756CONFIG_LCD_LTV350QV=y 790CONFIG_LCD_LTV350QV=y
791# CONFIG_LCD_ILI9320 is not set
792# CONFIG_LCD_VGG2432A4 is not set
793# CONFIG_LCD_PLATFORM is not set
757# CONFIG_BACKLIGHT_CLASS_DEVICE is not set 794# CONFIG_BACKLIGHT_CLASS_DEVICE is not set
758 795
759# 796#
@@ -761,15 +798,7 @@ CONFIG_LCD_LTV350QV=y
761# 798#
762# CONFIG_DISPLAY_SUPPORT is not set 799# CONFIG_DISPLAY_SUPPORT is not set
763# CONFIG_LOGO is not set 800# CONFIG_LOGO is not set
764
765#
766# Sound
767#
768CONFIG_SOUND=m 801CONFIG_SOUND=m
769
770#
771# Advanced Linux Sound Architecture
772#
773CONFIG_SND=m 802CONFIG_SND=m
774CONFIG_SND_TIMER=m 803CONFIG_SND_TIMER=m
775CONFIG_SND_PCM=m 804CONFIG_SND_PCM=m
@@ -783,37 +812,11 @@ CONFIG_SND_PCM_OSS_PLUGINS=y
783# CONFIG_SND_VERBOSE_PROCFS is not set 812# CONFIG_SND_VERBOSE_PROCFS is not set
784# CONFIG_SND_VERBOSE_PRINTK is not set 813# CONFIG_SND_VERBOSE_PRINTK is not set
785# CONFIG_SND_DEBUG is not set 814# CONFIG_SND_DEBUG is not set
786 815# CONFIG_SND_DRIVERS is not set
787# 816CONFIG_SND_SPI=y
788# Generic devices
789#
790# CONFIG_SND_DUMMY is not set
791# CONFIG_SND_MTPAV is not set
792# CONFIG_SND_SERIAL_U16550 is not set
793# CONFIG_SND_MPU401 is not set
794
795#
796# SPI devices
797#
798CONFIG_SND_AT73C213=m 817CONFIG_SND_AT73C213=m
799CONFIG_SND_AT73C213_TARGET_BITRATE=48000 818CONFIG_SND_AT73C213_TARGET_BITRATE=48000
800
801#
802# System on Chip audio support
803#
804# CONFIG_SND_SOC is not set 819# CONFIG_SND_SOC is not set
805
806#
807# ALSA SoC audio for Freescale SOCs
808#
809
810#
811# SoC Audio for the Texas Instruments OMAP
812#
813
814#
815# Open Sound System
816#
817# CONFIG_SOUND_PRIME is not set 820# CONFIG_SOUND_PRIME is not set
818# CONFIG_HID_SUPPORT is not set 821# CONFIG_HID_SUPPORT is not set
819CONFIG_USB_SUPPORT=y 822CONFIG_USB_SUPPORT=y
@@ -836,7 +839,7 @@ CONFIG_USB_GADGET_ATMEL_USBA=y
836CONFIG_USB_ATMEL_USBA=y 839CONFIG_USB_ATMEL_USBA=y
837# CONFIG_USB_GADGET_FSL_USB2 is not set 840# CONFIG_USB_GADGET_FSL_USB2 is not set
838# CONFIG_USB_GADGET_NET2280 is not set 841# CONFIG_USB_GADGET_NET2280 is not set
839# CONFIG_USB_GADGET_PXA2XX is not set 842# CONFIG_USB_GADGET_PXA25X is not set
840# CONFIG_USB_GADGET_M66592 is not set 843# CONFIG_USB_GADGET_M66592 is not set
841# CONFIG_USB_GADGET_PXA27X is not set 844# CONFIG_USB_GADGET_PXA27X is not set
842# CONFIG_USB_GADGET_GOKU is not set 845# CONFIG_USB_GADGET_GOKU is not set
@@ -855,21 +858,24 @@ CONFIG_USB_FILE_STORAGE=m
855CONFIG_USB_G_SERIAL=m 858CONFIG_USB_G_SERIAL=m
856# CONFIG_USB_MIDI_GADGET is not set 859# CONFIG_USB_MIDI_GADGET is not set
857# CONFIG_USB_G_PRINTER is not set 860# CONFIG_USB_G_PRINTER is not set
858CONFIG_MMC=m 861CONFIG_USB_CDC_COMPOSITE=m
862CONFIG_MMC=y
859# CONFIG_MMC_DEBUG is not set 863# CONFIG_MMC_DEBUG is not set
860# CONFIG_MMC_UNSAFE_RESUME is not set 864# CONFIG_MMC_UNSAFE_RESUME is not set
861 865
862# 866#
863# MMC/SD Card Drivers 867# MMC/SD Card Drivers
864# 868#
865CONFIG_MMC_BLOCK=m 869CONFIG_MMC_BLOCK=y
866CONFIG_MMC_BLOCK_BOUNCE=y 870CONFIG_MMC_BLOCK_BOUNCE=y
867# CONFIG_SDIO_UART is not set 871# CONFIG_SDIO_UART is not set
868CONFIG_MMC_TEST=m 872# CONFIG_MMC_TEST is not set
869 873
870# 874#
871# MMC/SD Host Controller Drivers 875# MMC/SD Host Controller Drivers
872# 876#
877# CONFIG_MMC_SDHCI is not set
878CONFIG_MMC_ATMELMCI=y
873CONFIG_MMC_SPI=m 879CONFIG_MMC_SPI=m
874# CONFIG_MEMSTICK is not set 880# CONFIG_MEMSTICK is not set
875CONFIG_NEW_LEDS=y 881CONFIG_NEW_LEDS=y
@@ -879,7 +885,9 @@ CONFIG_LEDS_CLASS=m
879# LED drivers 885# LED drivers
880# 886#
881CONFIG_LEDS_ATMEL_PWM=m 887CONFIG_LEDS_ATMEL_PWM=m
888# CONFIG_LEDS_PCA9532 is not set
882CONFIG_LEDS_GPIO=m 889CONFIG_LEDS_GPIO=m
890# CONFIG_LEDS_PCA955X is not set
883 891
884# 892#
885# LED Triggers 893# LED Triggers
@@ -918,10 +926,13 @@ CONFIG_RTC_INTF_DEV=y
918# CONFIG_RTC_DRV_PCF8583 is not set 926# CONFIG_RTC_DRV_PCF8583 is not set
919# CONFIG_RTC_DRV_M41T80 is not set 927# CONFIG_RTC_DRV_M41T80 is not set
920# CONFIG_RTC_DRV_S35390A is not set 928# CONFIG_RTC_DRV_S35390A is not set
929# CONFIG_RTC_DRV_FM3130 is not set
921 930
922# 931#
923# SPI RTC drivers 932# SPI RTC drivers
924# 933#
934# CONFIG_RTC_DRV_M41T94 is not set
935# CONFIG_RTC_DRV_DS1305 is not set
925# CONFIG_RTC_DRV_MAX6902 is not set 936# CONFIG_RTC_DRV_MAX6902 is not set
926# CONFIG_RTC_DRV_R9701 is not set 937# CONFIG_RTC_DRV_R9701 is not set
927# CONFIG_RTC_DRV_RS5C348 is not set 938# CONFIG_RTC_DRV_RS5C348 is not set
@@ -941,18 +952,31 @@ CONFIG_RTC_INTF_DEV=y
941# on-CPU RTC drivers 952# on-CPU RTC drivers
942# 953#
943CONFIG_RTC_DRV_AT32AP700X=y 954CONFIG_RTC_DRV_AT32AP700X=y
955CONFIG_DMADEVICES=y
956
957#
958# DMA Devices
959#
960CONFIG_DW_DMAC=y
961CONFIG_DMA_ENGINE=y
962
963#
964# DMA Clients
965#
966# CONFIG_NET_DMA is not set
967CONFIG_DMATEST=m
944# CONFIG_UIO is not set 968# CONFIG_UIO is not set
945 969
946# 970#
947# File systems 971# File systems
948# 972#
949CONFIG_EXT2_FS=m 973CONFIG_EXT2_FS=y
950# CONFIG_EXT2_FS_XATTR is not set 974# CONFIG_EXT2_FS_XATTR is not set
951# CONFIG_EXT2_FS_XIP is not set 975# CONFIG_EXT2_FS_XIP is not set
952CONFIG_EXT3_FS=m 976CONFIG_EXT3_FS=y
953# CONFIG_EXT3_FS_XATTR is not set 977# CONFIG_EXT3_FS_XATTR is not set
954# CONFIG_EXT4DEV_FS is not set 978# CONFIG_EXT4DEV_FS is not set
955CONFIG_JBD=m 979CONFIG_JBD=y
956# CONFIG_JBD_DEBUG is not set 980# CONFIG_JBD_DEBUG is not set
957# CONFIG_REISERFS_FS is not set 981# CONFIG_REISERFS_FS is not set
958# CONFIG_JFS_FS is not set 982# CONFIG_JFS_FS is not set
@@ -1018,6 +1042,7 @@ CONFIG_JFFS2_RTIME=y
1018# CONFIG_CRAMFS is not set 1042# CONFIG_CRAMFS is not set
1019# CONFIG_VXFS_FS is not set 1043# CONFIG_VXFS_FS is not set
1020CONFIG_MINIX_FS=m 1044CONFIG_MINIX_FS=m
1045# CONFIG_OMFS_FS is not set
1021# CONFIG_HPFS_FS is not set 1046# CONFIG_HPFS_FS is not set
1022# CONFIG_QNX4FS_FS is not set 1047# CONFIG_QNX4FS_FS is not set
1023# CONFIG_ROMFS_FS is not set 1048# CONFIG_ROMFS_FS is not set
@@ -1028,13 +1053,12 @@ CONFIG_NFS_FS=y
1028CONFIG_NFS_V3=y 1053CONFIG_NFS_V3=y
1029# CONFIG_NFS_V3_ACL is not set 1054# CONFIG_NFS_V3_ACL is not set
1030# CONFIG_NFS_V4 is not set 1055# CONFIG_NFS_V4 is not set
1031# CONFIG_NFSD is not set
1032CONFIG_ROOT_NFS=y 1056CONFIG_ROOT_NFS=y
1057# CONFIG_NFSD is not set
1033CONFIG_LOCKD=y 1058CONFIG_LOCKD=y
1034CONFIG_LOCKD_V4=y 1059CONFIG_LOCKD_V4=y
1035CONFIG_NFS_COMMON=y 1060CONFIG_NFS_COMMON=y
1036CONFIG_SUNRPC=y 1061CONFIG_SUNRPC=y
1037# CONFIG_SUNRPC_BIND34 is not set
1038# CONFIG_RPCSEC_GSS_KRB5 is not set 1062# CONFIG_RPCSEC_GSS_KRB5 is not set
1039# CONFIG_RPCSEC_GSS_SPKM3 is not set 1063# CONFIG_RPCSEC_GSS_SPKM3 is not set
1040# CONFIG_SMB_FS is not set 1064# CONFIG_SMB_FS is not set
@@ -1104,6 +1128,8 @@ CONFIG_DEBUG_FS=y
1104CONFIG_DEBUG_KERNEL=y 1128CONFIG_DEBUG_KERNEL=y
1105# CONFIG_DEBUG_SHIRQ is not set 1129# CONFIG_DEBUG_SHIRQ is not set
1106CONFIG_DETECT_SOFTLOCKUP=y 1130CONFIG_DETECT_SOFTLOCKUP=y
1131# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
1132CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
1107CONFIG_SCHED_DEBUG=y 1133CONFIG_SCHED_DEBUG=y
1108# CONFIG_SCHEDSTATS is not set 1134# CONFIG_SCHEDSTATS is not set
1109# CONFIG_TIMER_STATS is not set 1135# CONFIG_TIMER_STATS is not set
@@ -1124,6 +1150,7 @@ CONFIG_DEBUG_BUGVERBOSE=y
1124# CONFIG_DEBUG_INFO is not set 1150# CONFIG_DEBUG_INFO is not set
1125# CONFIG_DEBUG_VM is not set 1151# CONFIG_DEBUG_VM is not set
1126# CONFIG_DEBUG_WRITECOUNT is not set 1152# CONFIG_DEBUG_WRITECOUNT is not set
1153# CONFIG_DEBUG_MEMORY_INIT is not set
1127# CONFIG_DEBUG_LIST is not set 1154# CONFIG_DEBUG_LIST is not set
1128# CONFIG_DEBUG_SG is not set 1155# CONFIG_DEBUG_SG is not set
1129CONFIG_FRAME_POINTER=y 1156CONFIG_FRAME_POINTER=y
@@ -1188,6 +1215,10 @@ CONFIG_CRYPTO_HMAC=m
1188# CONFIG_CRYPTO_MD4 is not set 1215# CONFIG_CRYPTO_MD4 is not set
1189CONFIG_CRYPTO_MD5=m 1216CONFIG_CRYPTO_MD5=m
1190# CONFIG_CRYPTO_MICHAEL_MIC is not set 1217# CONFIG_CRYPTO_MICHAEL_MIC is not set
1218# CONFIG_CRYPTO_RMD128 is not set
1219# CONFIG_CRYPTO_RMD160 is not set
1220# CONFIG_CRYPTO_RMD256 is not set
1221# CONFIG_CRYPTO_RMD320 is not set
1191CONFIG_CRYPTO_SHA1=m 1222CONFIG_CRYPTO_SHA1=m
1192# CONFIG_CRYPTO_SHA256 is not set 1223# CONFIG_CRYPTO_SHA256 is not set
1193# CONFIG_CRYPTO_SHA512 is not set 1224# CONFIG_CRYPTO_SHA512 is not set
@@ -1228,12 +1259,14 @@ CONFIG_BITREVERSE=y
1228# CONFIG_GENERIC_FIND_NEXT_BIT is not set 1259# CONFIG_GENERIC_FIND_NEXT_BIT is not set
1229CONFIG_CRC_CCITT=m 1260CONFIG_CRC_CCITT=m
1230# CONFIG_CRC16 is not set 1261# CONFIG_CRC16 is not set
1262CONFIG_CRC_T10DIF=m
1231CONFIG_CRC_ITU_T=m 1263CONFIG_CRC_ITU_T=m
1232CONFIG_CRC32=y 1264CONFIG_CRC32=y
1233CONFIG_CRC7=m 1265CONFIG_CRC7=m
1234# CONFIG_LIBCRC32C is not set 1266# CONFIG_LIBCRC32C is not set
1235CONFIG_ZLIB_INFLATE=y 1267CONFIG_ZLIB_INFLATE=y
1236CONFIG_ZLIB_DEFLATE=y 1268CONFIG_ZLIB_DEFLATE=y
1269CONFIG_GENERIC_ALLOCATOR=y
1237CONFIG_PLIST=y 1270CONFIG_PLIST=y
1238CONFIG_HAS_IOMEM=y 1271CONFIG_HAS_IOMEM=y
1239CONFIG_HAS_IOPORT=y 1272CONFIG_HAS_IOPORT=y
diff --git a/arch/avr32/configs/atstk1003_defconfig b/arch/avr32/configs/atstk1003_defconfig
index 5a4ae6b5d28f..5477ed3183b4 100644
--- a/arch/avr32/configs/atstk1003_defconfig
+++ b/arch/avr32/configs/atstk1003_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.26-rc3 3# Linux kernel version: 2.6.27-rc1
4# Mon May 26 13:33:05 2008 4# Tue Aug 5 15:34:44 2008
5# 5#
6CONFIG_AVR32=y 6CONFIG_AVR32=y
7CONFIG_GENERIC_GPIO=y 7CONFIG_GENERIC_GPIO=y
@@ -80,10 +80,16 @@ CONFIG_PROFILING=y
80CONFIG_OPROFILE=m 80CONFIG_OPROFILE=m
81CONFIG_HAVE_OPROFILE=y 81CONFIG_HAVE_OPROFILE=y
82CONFIG_KPROBES=y 82CONFIG_KPROBES=y
83# CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS is not set
84# CONFIG_HAVE_IOREMAP_PROT is not set
83CONFIG_HAVE_KPROBES=y 85CONFIG_HAVE_KPROBES=y
84# CONFIG_HAVE_KRETPROBES is not set 86# CONFIG_HAVE_KRETPROBES is not set
87# CONFIG_HAVE_ARCH_TRACEHOOK is not set
85# CONFIG_HAVE_DMA_ATTRS is not set 88# CONFIG_HAVE_DMA_ATTRS is not set
89# CONFIG_USE_GENERIC_SMP_HELPERS is not set
90CONFIG_HAVE_CLK=y
86CONFIG_PROC_PAGE_MONITOR=y 91CONFIG_PROC_PAGE_MONITOR=y
92# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
87CONFIG_RT_MUTEXES=y 93CONFIG_RT_MUTEXES=y
88# CONFIG_TINY_SHMEM is not set 94# CONFIG_TINY_SHMEM is not set
89CONFIG_BASE_SMALL=1 95CONFIG_BASE_SMALL=1
@@ -93,12 +99,13 @@ CONFIG_MODULE_UNLOAD=y
93# CONFIG_MODULE_FORCE_UNLOAD is not set 99# CONFIG_MODULE_FORCE_UNLOAD is not set
94# CONFIG_MODVERSIONS is not set 100# CONFIG_MODVERSIONS is not set
95# CONFIG_MODULE_SRCVERSION_ALL is not set 101# CONFIG_MODULE_SRCVERSION_ALL is not set
96# CONFIG_KMOD is not set 102CONFIG_KMOD=y
97CONFIG_BLOCK=y 103CONFIG_BLOCK=y
98# CONFIG_LBD is not set 104# CONFIG_LBD is not set
99# CONFIG_BLK_DEV_IO_TRACE is not set 105# CONFIG_BLK_DEV_IO_TRACE is not set
100# CONFIG_LSF is not set 106# CONFIG_LSF is not set
101# CONFIG_BLK_DEV_BSG is not set 107# CONFIG_BLK_DEV_BSG is not set
108# CONFIG_BLK_DEV_INTEGRITY is not set
102 109
103# 110#
104# IO Schedulers 111# IO Schedulers
@@ -132,6 +139,7 @@ CONFIG_BOARD_ATSTK1000=y
132# CONFIG_BOARD_ATSTK1002 is not set 139# CONFIG_BOARD_ATSTK1002 is not set
133CONFIG_BOARD_ATSTK1003=y 140CONFIG_BOARD_ATSTK1003=y
134# CONFIG_BOARD_ATSTK1004 is not set 141# CONFIG_BOARD_ATSTK1004 is not set
142# CONFIG_BOARD_ATSTK1006 is not set
135# CONFIG_BOARD_ATSTK100X_CUSTOM is not set 143# CONFIG_BOARD_ATSTK100X_CUSTOM is not set
136# CONFIG_BOARD_ATSTK100X_SPI1 is not set 144# CONFIG_BOARD_ATSTK100X_SPI1 is not set
137# CONFIG_BOARD_ATSTK1000_J2_LED is not set 145# CONFIG_BOARD_ATSTK1000_J2_LED is not set
@@ -152,6 +160,7 @@ CONFIG_PHYS_OFFSET=0x10000000
152CONFIG_PREEMPT_NONE=y 160CONFIG_PREEMPT_NONE=y
153# CONFIG_PREEMPT_VOLUNTARY is not set 161# CONFIG_PREEMPT_VOLUNTARY is not set
154# CONFIG_PREEMPT is not set 162# CONFIG_PREEMPT is not set
163CONFIG_QUICKLIST=y
155# CONFIG_HAVE_ARCH_BOOTMEM_NODE is not set 164# CONFIG_HAVE_ARCH_BOOTMEM_NODE is not set
156# CONFIG_ARCH_HAVE_MEMORY_PRESENT is not set 165# CONFIG_ARCH_HAVE_MEMORY_PRESENT is not set
157# CONFIG_NEED_NODE_MEMMAP_SIZE is not set 166# CONFIG_NEED_NODE_MEMMAP_SIZE is not set
@@ -170,6 +179,7 @@ CONFIG_PAGEFLAGS_EXTENDED=y
170CONFIG_SPLIT_PTLOCK_CPUS=4 179CONFIG_SPLIT_PTLOCK_CPUS=4
171# CONFIG_RESOURCES_64BIT is not set 180# CONFIG_RESOURCES_64BIT is not set
172CONFIG_ZONE_DMA_FLAG=0 181CONFIG_ZONE_DMA_FLAG=0
182CONFIG_NR_QUICK=2
173CONFIG_VIRT_TO_BUS=y 183CONFIG_VIRT_TO_BUS=y
174# CONFIG_OWNERSHIP_TRACE is not set 184# CONFIG_OWNERSHIP_TRACE is not set
175CONFIG_NMI_DEBUGGING=y 185CONFIG_NMI_DEBUGGING=y
@@ -184,6 +194,12 @@ CONFIG_CMDLINE=""
184# 194#
185# Power management options 195# Power management options
186# 196#
197CONFIG_PM=y
198# CONFIG_PM_DEBUG is not set
199CONFIG_PM_SLEEP=y
200CONFIG_SUSPEND=y
201CONFIG_SUSPEND_FREEZER=y
202CONFIG_ARCH_SUSPEND_POSSIBLE=y
187 203
188# 204#
189# CPU Frequency scaling 205# CPU Frequency scaling
@@ -215,10 +231,6 @@ CONFIG_CPU_FREQ_AT32AP=y
215# 231#
216CONFIG_BINFMT_ELF=y 232CONFIG_BINFMT_ELF=y
217# CONFIG_BINFMT_MISC is not set 233# CONFIG_BINFMT_MISC is not set
218
219#
220# Networking
221#
222CONFIG_NET=y 234CONFIG_NET=y
223 235
224# 236#
@@ -449,6 +461,7 @@ CONFIG_SCSI_WAIT_SCAN=m
449CONFIG_SCSI_LOWLEVEL=y 461CONFIG_SCSI_LOWLEVEL=y
450# CONFIG_ISCSI_TCP is not set 462# CONFIG_ISCSI_TCP is not set
451# CONFIG_SCSI_DEBUG is not set 463# CONFIG_SCSI_DEBUG is not set
464# CONFIG_SCSI_DH is not set
452CONFIG_ATA=m 465CONFIG_ATA=m
453# CONFIG_ATA_NONSTANDARD is not set 466# CONFIG_ATA_NONSTANDARD is not set
454# CONFIG_SATA_PMP is not set 467# CONFIG_SATA_PMP is not set
@@ -458,7 +471,6 @@ CONFIG_PATA_AT32=m
458# CONFIG_PATA_PLATFORM is not set 471# CONFIG_PATA_PLATFORM is not set
459# CONFIG_MD is not set 472# CONFIG_MD is not set
460CONFIG_NETDEVICES=y 473CONFIG_NETDEVICES=y
461# CONFIG_NETDEVICES_MULTIQUEUE is not set
462# CONFIG_DUMMY is not set 474# CONFIG_DUMMY is not set
463# CONFIG_BONDING is not set 475# CONFIG_BONDING is not set
464# CONFIG_MACVLAN is not set 476# CONFIG_MACVLAN is not set
@@ -575,21 +587,35 @@ CONFIG_I2C_ALGOBIT=m
575# 587#
576# I2C Hardware Bus support 588# I2C Hardware Bus support
577# 589#
590
591#
592# I2C system bus drivers (mostly embedded / system-on-chip)
593#
578CONFIG_I2C_GPIO=m 594CONFIG_I2C_GPIO=m
579# CONFIG_I2C_OCORES is not set 595# CONFIG_I2C_OCORES is not set
580# CONFIG_I2C_PARPORT_LIGHT is not set
581# CONFIG_I2C_SIMTEC is not set 596# CONFIG_I2C_SIMTEC is not set
597
598#
599# External I2C/SMBus adapter drivers
600#
601# CONFIG_I2C_PARPORT_LIGHT is not set
582# CONFIG_I2C_TAOS_EVM is not set 602# CONFIG_I2C_TAOS_EVM is not set
583# CONFIG_I2C_STUB is not set 603
604#
605# Other I2C/SMBus bus drivers
606#
584# CONFIG_I2C_PCA_PLATFORM is not set 607# CONFIG_I2C_PCA_PLATFORM is not set
608# CONFIG_I2C_STUB is not set
585 609
586# 610#
587# Miscellaneous I2C Chip support 611# Miscellaneous I2C Chip support
588# 612#
589# CONFIG_DS1682 is not set 613# CONFIG_DS1682 is not set
614CONFIG_AT24=m
590# CONFIG_SENSORS_EEPROM is not set 615# CONFIG_SENSORS_EEPROM is not set
591# CONFIG_SENSORS_PCF8574 is not set 616# CONFIG_SENSORS_PCF8574 is not set
592# CONFIG_PCF8575 is not set 617# CONFIG_PCF8575 is not set
618# CONFIG_SENSORS_PCA9539 is not set
593# CONFIG_SENSORS_PCF8591 is not set 619# CONFIG_SENSORS_PCF8591 is not set
594# CONFIG_TPS65010 is not set 620# CONFIG_TPS65010 is not set
595# CONFIG_SENSORS_MAX6875 is not set 621# CONFIG_SENSORS_MAX6875 is not set
@@ -614,27 +640,32 @@ CONFIG_SPI_ATMEL=y
614# CONFIG_SPI_AT25 is not set 640# CONFIG_SPI_AT25 is not set
615CONFIG_SPI_SPIDEV=m 641CONFIG_SPI_SPIDEV=m
616# CONFIG_SPI_TLE62X0 is not set 642# CONFIG_SPI_TLE62X0 is not set
617CONFIG_HAVE_GPIO_LIB=y 643CONFIG_ARCH_REQUIRE_GPIOLIB=y
618 644CONFIG_GPIOLIB=y
619#
620# GPIO Support
621#
622# CONFIG_DEBUG_GPIO is not set 645# CONFIG_DEBUG_GPIO is not set
646CONFIG_GPIO_SYSFS=y
623 647
624# 648#
625# I2C GPIO expanders: 649# I2C GPIO expanders:
626# 650#
651# CONFIG_GPIO_MAX732X is not set
627# CONFIG_GPIO_PCA953X is not set 652# CONFIG_GPIO_PCA953X is not set
628# CONFIG_GPIO_PCF857X is not set 653# CONFIG_GPIO_PCF857X is not set
629 654
630# 655#
656# PCI GPIO expanders:
657#
658
659#
631# SPI GPIO expanders: 660# SPI GPIO expanders:
632# 661#
662# CONFIG_GPIO_MAX7301 is not set
633# CONFIG_GPIO_MCP23S08 is not set 663# CONFIG_GPIO_MCP23S08 is not set
634# CONFIG_W1 is not set 664# CONFIG_W1 is not set
635# CONFIG_POWER_SUPPLY is not set 665# CONFIG_POWER_SUPPLY is not set
636# CONFIG_HWMON is not set 666# CONFIG_HWMON is not set
637# CONFIG_THERMAL is not set 667# CONFIG_THERMAL is not set
668# CONFIG_THERMAL_HWMON is not set
638CONFIG_WATCHDOG=y 669CONFIG_WATCHDOG=y
639# CONFIG_WATCHDOG_NOWAYOUT is not set 670# CONFIG_WATCHDOG_NOWAYOUT is not set
640 671
@@ -653,6 +684,7 @@ CONFIG_SSB_POSSIBLE=y
653# 684#
654# Multifunction device drivers 685# Multifunction device drivers
655# 686#
687# CONFIG_MFD_CORE is not set
656# CONFIG_MFD_SM501 is not set 688# CONFIG_MFD_SM501 is not set
657# CONFIG_HTC_PASIC3 is not set 689# CONFIG_HTC_PASIC3 is not set
658 690
@@ -684,15 +716,7 @@ CONFIG_SSB_POSSIBLE=y
684# Display device support 716# Display device support
685# 717#
686# CONFIG_DISPLAY_SUPPORT is not set 718# CONFIG_DISPLAY_SUPPORT is not set
687
688#
689# Sound
690#
691CONFIG_SOUND=m 719CONFIG_SOUND=m
692
693#
694# Advanced Linux Sound Architecture
695#
696CONFIG_SND=m 720CONFIG_SND=m
697CONFIG_SND_TIMER=m 721CONFIG_SND_TIMER=m
698CONFIG_SND_PCM=m 722CONFIG_SND_PCM=m
@@ -706,37 +730,11 @@ CONFIG_SND_SUPPORT_OLD_API=y
706CONFIG_SND_VERBOSE_PROCFS=y 730CONFIG_SND_VERBOSE_PROCFS=y
707# CONFIG_SND_VERBOSE_PRINTK is not set 731# CONFIG_SND_VERBOSE_PRINTK is not set
708# CONFIG_SND_DEBUG is not set 732# CONFIG_SND_DEBUG is not set
709 733# CONFIG_SND_DRIVERS is not set
710# 734CONFIG_SND_SPI=y
711# Generic devices
712#
713# CONFIG_SND_DUMMY is not set
714# CONFIG_SND_MTPAV is not set
715# CONFIG_SND_SERIAL_U16550 is not set
716# CONFIG_SND_MPU401 is not set
717
718#
719# SPI devices
720#
721CONFIG_SND_AT73C213=m 735CONFIG_SND_AT73C213=m
722CONFIG_SND_AT73C213_TARGET_BITRATE=48000 736CONFIG_SND_AT73C213_TARGET_BITRATE=48000
723
724#
725# System on Chip audio support
726#
727# CONFIG_SND_SOC is not set 737# CONFIG_SND_SOC is not set
728
729#
730# ALSA SoC audio for Freescale SOCs
731#
732
733#
734# SoC Audio for the Texas Instruments OMAP
735#
736
737#
738# Open Sound System
739#
740# CONFIG_SOUND_PRIME is not set 738# CONFIG_SOUND_PRIME is not set
741# CONFIG_HID_SUPPORT is not set 739# CONFIG_HID_SUPPORT is not set
742CONFIG_USB_SUPPORT=y 740CONFIG_USB_SUPPORT=y
@@ -759,7 +757,7 @@ CONFIG_USB_GADGET_ATMEL_USBA=y
759CONFIG_USB_ATMEL_USBA=y 757CONFIG_USB_ATMEL_USBA=y
760# CONFIG_USB_GADGET_FSL_USB2 is not set 758# CONFIG_USB_GADGET_FSL_USB2 is not set
761# CONFIG_USB_GADGET_NET2280 is not set 759# CONFIG_USB_GADGET_NET2280 is not set
762# CONFIG_USB_GADGET_PXA2XX is not set 760# CONFIG_USB_GADGET_PXA25X is not set
763# CONFIG_USB_GADGET_M66592 is not set 761# CONFIG_USB_GADGET_M66592 is not set
764# CONFIG_USB_GADGET_PXA27X is not set 762# CONFIG_USB_GADGET_PXA27X is not set
765# CONFIG_USB_GADGET_GOKU is not set 763# CONFIG_USB_GADGET_GOKU is not set
@@ -778,21 +776,24 @@ CONFIG_USB_FILE_STORAGE=m
778CONFIG_USB_G_SERIAL=m 776CONFIG_USB_G_SERIAL=m
779# CONFIG_USB_MIDI_GADGET is not set 777# CONFIG_USB_MIDI_GADGET is not set
780# CONFIG_USB_G_PRINTER is not set 778# CONFIG_USB_G_PRINTER is not set
781CONFIG_MMC=m 779CONFIG_USB_CDC_COMPOSITE=m
780CONFIG_MMC=y
782# CONFIG_MMC_DEBUG is not set 781# CONFIG_MMC_DEBUG is not set
783# CONFIG_MMC_UNSAFE_RESUME is not set 782# CONFIG_MMC_UNSAFE_RESUME is not set
784 783
785# 784#
786# MMC/SD Card Drivers 785# MMC/SD Card Drivers
787# 786#
788CONFIG_MMC_BLOCK=m 787CONFIG_MMC_BLOCK=y
789# CONFIG_MMC_BLOCK_BOUNCE is not set 788CONFIG_MMC_BLOCK_BOUNCE=y
790# CONFIG_SDIO_UART is not set 789# CONFIG_SDIO_UART is not set
791# CONFIG_MMC_TEST is not set 790CONFIG_MMC_TEST=m
792 791
793# 792#
794# MMC/SD Host Controller Drivers 793# MMC/SD Host Controller Drivers
795# 794#
795# CONFIG_MMC_SDHCI is not set
796CONFIG_MMC_ATMELMCI=y
796CONFIG_MMC_SPI=m 797CONFIG_MMC_SPI=m
797# CONFIG_MEMSTICK is not set 798# CONFIG_MEMSTICK is not set
798CONFIG_NEW_LEDS=y 799CONFIG_NEW_LEDS=y
@@ -802,7 +803,9 @@ CONFIG_LEDS_CLASS=y
802# LED drivers 803# LED drivers
803# 804#
804CONFIG_LEDS_ATMEL_PWM=m 805CONFIG_LEDS_ATMEL_PWM=m
806# CONFIG_LEDS_PCA9532 is not set
805CONFIG_LEDS_GPIO=y 807CONFIG_LEDS_GPIO=y
808# CONFIG_LEDS_PCA955X is not set
806 809
807# 810#
808# LED Triggers 811# LED Triggers
@@ -841,10 +844,13 @@ CONFIG_RTC_INTF_DEV=y
841# CONFIG_RTC_DRV_PCF8583 is not set 844# CONFIG_RTC_DRV_PCF8583 is not set
842# CONFIG_RTC_DRV_M41T80 is not set 845# CONFIG_RTC_DRV_M41T80 is not set
843# CONFIG_RTC_DRV_S35390A is not set 846# CONFIG_RTC_DRV_S35390A is not set
847# CONFIG_RTC_DRV_FM3130 is not set
844 848
845# 849#
846# SPI RTC drivers 850# SPI RTC drivers
847# 851#
852# CONFIG_RTC_DRV_M41T94 is not set
853# CONFIG_RTC_DRV_DS1305 is not set
848# CONFIG_RTC_DRV_MAX6902 is not set 854# CONFIG_RTC_DRV_MAX6902 is not set
849# CONFIG_RTC_DRV_R9701 is not set 855# CONFIG_RTC_DRV_R9701 is not set
850# CONFIG_RTC_DRV_RS5C348 is not set 856# CONFIG_RTC_DRV_RS5C348 is not set
@@ -864,8 +870,20 @@ CONFIG_RTC_INTF_DEV=y
864# on-CPU RTC drivers 870# on-CPU RTC drivers
865# 871#
866CONFIG_RTC_DRV_AT32AP700X=y 872CONFIG_RTC_DRV_AT32AP700X=y
867CONFIG_UIO=m 873CONFIG_DMADEVICES=y
868# CONFIG_UIO_SMX is not set 874
875#
876# DMA Devices
877#
878CONFIG_DW_DMAC=y
879CONFIG_DMA_ENGINE=y
880
881#
882# DMA Clients
883#
884# CONFIG_NET_DMA is not set
885CONFIG_DMATEST=m
886# CONFIG_UIO is not set
869 887
870# 888#
871# File systems 889# File systems
@@ -943,6 +961,7 @@ CONFIG_JFFS2_RTIME=y
943# CONFIG_CRAMFS is not set 961# CONFIG_CRAMFS is not set
944# CONFIG_VXFS_FS is not set 962# CONFIG_VXFS_FS is not set
945# CONFIG_MINIX_FS is not set 963# CONFIG_MINIX_FS is not set
964# CONFIG_OMFS_FS is not set
946# CONFIG_HPFS_FS is not set 965# CONFIG_HPFS_FS is not set
947# CONFIG_QNX4FS_FS is not set 966# CONFIG_QNX4FS_FS is not set
948# CONFIG_ROMFS_FS is not set 967# CONFIG_ROMFS_FS is not set
@@ -1011,6 +1030,8 @@ CONFIG_DEBUG_FS=y
1011CONFIG_DEBUG_KERNEL=y 1030CONFIG_DEBUG_KERNEL=y
1012# CONFIG_DEBUG_SHIRQ is not set 1031# CONFIG_DEBUG_SHIRQ is not set
1013CONFIG_DETECT_SOFTLOCKUP=y 1032CONFIG_DETECT_SOFTLOCKUP=y
1033# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
1034CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
1014CONFIG_SCHED_DEBUG=y 1035CONFIG_SCHED_DEBUG=y
1015# CONFIG_SCHEDSTATS is not set 1036# CONFIG_SCHEDSTATS is not set
1016# CONFIG_TIMER_STATS is not set 1037# CONFIG_TIMER_STATS is not set
@@ -1029,6 +1050,7 @@ CONFIG_DEBUG_BUGVERBOSE=y
1029# CONFIG_DEBUG_INFO is not set 1050# CONFIG_DEBUG_INFO is not set
1030# CONFIG_DEBUG_VM is not set 1051# CONFIG_DEBUG_VM is not set
1031# CONFIG_DEBUG_WRITECOUNT is not set 1052# CONFIG_DEBUG_WRITECOUNT is not set
1053# CONFIG_DEBUG_MEMORY_INIT is not set
1032# CONFIG_DEBUG_LIST is not set 1054# CONFIG_DEBUG_LIST is not set
1033# CONFIG_DEBUG_SG is not set 1055# CONFIG_DEBUG_SG is not set
1034CONFIG_FRAME_POINTER=y 1056CONFIG_FRAME_POINTER=y
@@ -1056,6 +1078,7 @@ CONFIG_BITREVERSE=y
1056# CONFIG_GENERIC_FIND_NEXT_BIT is not set 1078# CONFIG_GENERIC_FIND_NEXT_BIT is not set
1057CONFIG_CRC_CCITT=m 1079CONFIG_CRC_CCITT=m
1058# CONFIG_CRC16 is not set 1080# CONFIG_CRC16 is not set
1081CONFIG_CRC_T10DIF=m
1059CONFIG_CRC_ITU_T=m 1082CONFIG_CRC_ITU_T=m
1060CONFIG_CRC32=y 1083CONFIG_CRC32=y
1061CONFIG_CRC7=m 1084CONFIG_CRC7=m
@@ -1063,6 +1086,7 @@ CONFIG_CRC7=m
1063CONFIG_AUDIT_GENERIC=y 1086CONFIG_AUDIT_GENERIC=y
1064CONFIG_ZLIB_INFLATE=y 1087CONFIG_ZLIB_INFLATE=y
1065CONFIG_ZLIB_DEFLATE=y 1088CONFIG_ZLIB_DEFLATE=y
1089CONFIG_GENERIC_ALLOCATOR=y
1066CONFIG_PLIST=y 1090CONFIG_PLIST=y
1067CONFIG_HAS_IOMEM=y 1091CONFIG_HAS_IOMEM=y
1068CONFIG_HAS_IOPORT=y 1092CONFIG_HAS_IOPORT=y
diff --git a/arch/avr32/configs/atstk1004_defconfig b/arch/avr32/configs/atstk1004_defconfig
index a0912fb7c92e..69e6c0d08ce8 100644
--- a/arch/avr32/configs/atstk1004_defconfig
+++ b/arch/avr32/configs/atstk1004_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.26-rc3 3# Linux kernel version: 2.6.27-rc1
4# Mon May 26 13:34:57 2008 4# Tue Aug 5 15:38:56 2008
5# 5#
6CONFIG_AVR32=y 6CONFIG_AVR32=y
7CONFIG_GENERIC_GPIO=y 7CONFIG_GENERIC_GPIO=y
@@ -69,10 +69,16 @@ CONFIG_SLOB=y
69# CONFIG_PROFILING is not set 69# CONFIG_PROFILING is not set
70# CONFIG_MARKERS is not set 70# CONFIG_MARKERS is not set
71CONFIG_HAVE_OPROFILE=y 71CONFIG_HAVE_OPROFILE=y
72# CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS is not set
73# CONFIG_HAVE_IOREMAP_PROT is not set
72CONFIG_HAVE_KPROBES=y 74CONFIG_HAVE_KPROBES=y
73# CONFIG_HAVE_KRETPROBES is not set 75# CONFIG_HAVE_KRETPROBES is not set
76# CONFIG_HAVE_ARCH_TRACEHOOK is not set
74# CONFIG_HAVE_DMA_ATTRS is not set 77# CONFIG_HAVE_DMA_ATTRS is not set
78# CONFIG_USE_GENERIC_SMP_HELPERS is not set
79CONFIG_HAVE_CLK=y
75# CONFIG_PROC_PAGE_MONITOR is not set 80# CONFIG_PROC_PAGE_MONITOR is not set
81# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
76# CONFIG_TINY_SHMEM is not set 82# CONFIG_TINY_SHMEM is not set
77CONFIG_BASE_SMALL=1 83CONFIG_BASE_SMALL=1
78# CONFIG_MODULES is not set 84# CONFIG_MODULES is not set
@@ -97,6 +103,7 @@ CONFIG_BOARD_ATSTK1000=y
97# CONFIG_BOARD_ATSTK1002 is not set 103# CONFIG_BOARD_ATSTK1002 is not set
98# CONFIG_BOARD_ATSTK1003 is not set 104# CONFIG_BOARD_ATSTK1003 is not set
99CONFIG_BOARD_ATSTK1004=y 105CONFIG_BOARD_ATSTK1004=y
106# CONFIG_BOARD_ATSTK1006 is not set
100# CONFIG_BOARD_ATSTK100X_CUSTOM is not set 107# CONFIG_BOARD_ATSTK100X_CUSTOM is not set
101# CONFIG_BOARD_ATSTK100X_SPI1 is not set 108# CONFIG_BOARD_ATSTK100X_SPI1 is not set
102# CONFIG_BOARD_ATSTK1000_J2_LED is not set 109# CONFIG_BOARD_ATSTK1000_J2_LED is not set
@@ -115,6 +122,7 @@ CONFIG_PHYS_OFFSET=0x10000000
115CONFIG_PREEMPT_NONE=y 122CONFIG_PREEMPT_NONE=y
116# CONFIG_PREEMPT_VOLUNTARY is not set 123# CONFIG_PREEMPT_VOLUNTARY is not set
117# CONFIG_PREEMPT is not set 124# CONFIG_PREEMPT is not set
125CONFIG_QUICKLIST=y
118# CONFIG_HAVE_ARCH_BOOTMEM_NODE is not set 126# CONFIG_HAVE_ARCH_BOOTMEM_NODE is not set
119# CONFIG_ARCH_HAVE_MEMORY_PRESENT is not set 127# CONFIG_ARCH_HAVE_MEMORY_PRESENT is not set
120# CONFIG_NEED_NODE_MEMMAP_SIZE is not set 128# CONFIG_NEED_NODE_MEMMAP_SIZE is not set
@@ -133,6 +141,7 @@ CONFIG_PAGEFLAGS_EXTENDED=y
133CONFIG_SPLIT_PTLOCK_CPUS=4 141CONFIG_SPLIT_PTLOCK_CPUS=4
134# CONFIG_RESOURCES_64BIT is not set 142# CONFIG_RESOURCES_64BIT is not set
135CONFIG_ZONE_DMA_FLAG=0 143CONFIG_ZONE_DMA_FLAG=0
144CONFIG_NR_QUICK=2
136CONFIG_VIRT_TO_BUS=y 145CONFIG_VIRT_TO_BUS=y
137# CONFIG_OWNERSHIP_TRACE is not set 146# CONFIG_OWNERSHIP_TRACE is not set
138# CONFIG_NMI_DEBUGGING is not set 147# CONFIG_NMI_DEBUGGING is not set
@@ -147,6 +156,8 @@ CONFIG_CMDLINE=""
147# 156#
148# Power management options 157# Power management options
149# 158#
159# CONFIG_PM is not set
160CONFIG_ARCH_SUSPEND_POSSIBLE=y
150 161
151# 162#
152# CPU Frequency scaling 163# CPU Frequency scaling
@@ -164,10 +175,6 @@ CONFIG_CMDLINE=""
164# 175#
165CONFIG_BINFMT_ELF=y 176CONFIG_BINFMT_ELF=y
166# CONFIG_BINFMT_MISC is not set 177# CONFIG_BINFMT_MISC is not set
167
168#
169# Networking
170#
171CONFIG_NET=y 178CONFIG_NET=y
172 179
173# 180#
@@ -390,24 +397,28 @@ CONFIG_SPI_ATMEL=y
390# CONFIG_SPI_AT25 is not set 397# CONFIG_SPI_AT25 is not set
391# CONFIG_SPI_SPIDEV is not set 398# CONFIG_SPI_SPIDEV is not set
392# CONFIG_SPI_TLE62X0 is not set 399# CONFIG_SPI_TLE62X0 is not set
393CONFIG_HAVE_GPIO_LIB=y 400CONFIG_ARCH_REQUIRE_GPIOLIB=y
401CONFIG_GPIOLIB=y
402# CONFIG_GPIO_SYSFS is not set
394 403
395# 404#
396# GPIO Support 405# I2C GPIO expanders:
397# 406#
398 407
399# 408#
400# I2C GPIO expanders: 409# PCI GPIO expanders:
401# 410#
402 411
403# 412#
404# SPI GPIO expanders: 413# SPI GPIO expanders:
405# 414#
415# CONFIG_GPIO_MAX7301 is not set
406# CONFIG_GPIO_MCP23S08 is not set 416# CONFIG_GPIO_MCP23S08 is not set
407# CONFIG_W1 is not set 417# CONFIG_W1 is not set
408# CONFIG_POWER_SUPPLY is not set 418# CONFIG_POWER_SUPPLY is not set
409# CONFIG_HWMON is not set 419# CONFIG_HWMON is not set
410# CONFIG_THERMAL is not set 420# CONFIG_THERMAL is not set
421# CONFIG_THERMAL_HWMON is not set
411CONFIG_WATCHDOG=y 422CONFIG_WATCHDOG=y
412# CONFIG_WATCHDOG_NOWAYOUT is not set 423# CONFIG_WATCHDOG_NOWAYOUT is not set
413 424
@@ -426,6 +437,7 @@ CONFIG_SSB_POSSIBLE=y
426# 437#
427# Multifunction device drivers 438# Multifunction device drivers
428# 439#
440# CONFIG_MFD_CORE is not set
429# CONFIG_MFD_SM501 is not set 441# CONFIG_MFD_SM501 is not set
430# CONFIG_HTC_PASIC3 is not set 442# CONFIG_HTC_PASIC3 is not set
431 443
@@ -477,6 +489,9 @@ CONFIG_FB_ATMEL=y
477CONFIG_BACKLIGHT_LCD_SUPPORT=y 489CONFIG_BACKLIGHT_LCD_SUPPORT=y
478CONFIG_LCD_CLASS_DEVICE=y 490CONFIG_LCD_CLASS_DEVICE=y
479CONFIG_LCD_LTV350QV=y 491CONFIG_LCD_LTV350QV=y
492# CONFIG_LCD_ILI9320 is not set
493# CONFIG_LCD_VGG2432A4 is not set
494# CONFIG_LCD_PLATFORM is not set
480# CONFIG_BACKLIGHT_CLASS_DEVICE is not set 495# CONFIG_BACKLIGHT_CLASS_DEVICE is not set
481 496
482# 497#
@@ -484,10 +499,6 @@ CONFIG_LCD_LTV350QV=y
484# 499#
485# CONFIG_DISPLAY_SUPPORT is not set 500# CONFIG_DISPLAY_SUPPORT is not set
486# CONFIG_LOGO is not set 501# CONFIG_LOGO is not set
487
488#
489# Sound
490#
491# CONFIG_SOUND is not set 502# CONFIG_SOUND is not set
492CONFIG_USB_SUPPORT=y 503CONFIG_USB_SUPPORT=y
493# CONFIG_USB_ARCH_HAS_HCD is not set 504# CONFIG_USB_ARCH_HAS_HCD is not set
@@ -507,7 +518,7 @@ CONFIG_USB_GADGET_ATMEL_USBA=y
507CONFIG_USB_ATMEL_USBA=y 518CONFIG_USB_ATMEL_USBA=y
508# CONFIG_USB_GADGET_FSL_USB2 is not set 519# CONFIG_USB_GADGET_FSL_USB2 is not set
509# CONFIG_USB_GADGET_NET2280 is not set 520# CONFIG_USB_GADGET_NET2280 is not set
510# CONFIG_USB_GADGET_PXA2XX is not set 521# CONFIG_USB_GADGET_PXA25X is not set
511# CONFIG_USB_GADGET_M66592 is not set 522# CONFIG_USB_GADGET_M66592 is not set
512# CONFIG_USB_GADGET_PXA27X is not set 523# CONFIG_USB_GADGET_PXA27X is not set
513# CONFIG_USB_GADGET_GOKU is not set 524# CONFIG_USB_GADGET_GOKU is not set
@@ -525,6 +536,7 @@ CONFIG_USB_ETH=y
525# CONFIG_USB_G_SERIAL is not set 536# CONFIG_USB_G_SERIAL is not set
526# CONFIG_USB_MIDI_GADGET is not set 537# CONFIG_USB_MIDI_GADGET is not set
527# CONFIG_USB_G_PRINTER is not set 538# CONFIG_USB_G_PRINTER is not set
539# CONFIG_USB_CDC_COMPOSITE is not set
528# CONFIG_MMC is not set 540# CONFIG_MMC is not set
529# CONFIG_MEMSTICK is not set 541# CONFIG_MEMSTICK is not set
530# CONFIG_NEW_LEDS is not set 542# CONFIG_NEW_LEDS is not set
@@ -547,6 +559,8 @@ CONFIG_RTC_INTF_DEV=y
547# 559#
548# SPI RTC drivers 560# SPI RTC drivers
549# 561#
562# CONFIG_RTC_DRV_M41T94 is not set
563# CONFIG_RTC_DRV_DS1305 is not set
550# CONFIG_RTC_DRV_MAX6902 is not set 564# CONFIG_RTC_DRV_MAX6902 is not set
551# CONFIG_RTC_DRV_R9701 is not set 565# CONFIG_RTC_DRV_R9701 is not set
552# CONFIG_RTC_DRV_RS5C348 is not set 566# CONFIG_RTC_DRV_RS5C348 is not set
@@ -566,6 +580,7 @@ CONFIG_RTC_INTF_DEV=y
566# on-CPU RTC drivers 580# on-CPU RTC drivers
567# 581#
568CONFIG_RTC_DRV_AT32AP700X=y 582CONFIG_RTC_DRV_AT32AP700X=y
583# CONFIG_DMADEVICES is not set
569# CONFIG_UIO is not set 584# CONFIG_UIO is not set
570 585
571# 586#
@@ -620,6 +635,7 @@ CONFIG_MAGIC_SYSRQ=y
620# CONFIG_HEADERS_CHECK is not set 635# CONFIG_HEADERS_CHECK is not set
621# CONFIG_DEBUG_KERNEL is not set 636# CONFIG_DEBUG_KERNEL is not set
622# CONFIG_DEBUG_BUGVERBOSE is not set 637# CONFIG_DEBUG_BUGVERBOSE is not set
638# CONFIG_DEBUG_MEMORY_INIT is not set
623# CONFIG_SAMPLES is not set 639# CONFIG_SAMPLES is not set
624 640
625# 641#
@@ -638,12 +654,14 @@ CONFIG_BITREVERSE=y
638# CONFIG_GENERIC_FIND_NEXT_BIT is not set 654# CONFIG_GENERIC_FIND_NEXT_BIT is not set
639# CONFIG_CRC_CCITT is not set 655# CONFIG_CRC_CCITT is not set
640# CONFIG_CRC16 is not set 656# CONFIG_CRC16 is not set
657# CONFIG_CRC_T10DIF is not set
641# CONFIG_CRC_ITU_T is not set 658# CONFIG_CRC_ITU_T is not set
642CONFIG_CRC32=y 659CONFIG_CRC32=y
643# CONFIG_CRC7 is not set 660# CONFIG_CRC7 is not set
644# CONFIG_LIBCRC32C is not set 661# CONFIG_LIBCRC32C is not set
645CONFIG_ZLIB_INFLATE=y 662CONFIG_ZLIB_INFLATE=y
646CONFIG_ZLIB_DEFLATE=y 663CONFIG_ZLIB_DEFLATE=y
664CONFIG_GENERIC_ALLOCATOR=y
647CONFIG_HAS_IOMEM=y 665CONFIG_HAS_IOMEM=y
648CONFIG_HAS_IOPORT=y 666CONFIG_HAS_IOPORT=y
649CONFIG_HAS_DMA=y 667CONFIG_HAS_DMA=y
diff --git a/arch/avr32/configs/atstk1006_defconfig b/arch/avr32/configs/atstk1006_defconfig
new file mode 100644
index 000000000000..8b6e54c9946a
--- /dev/null
+++ b/arch/avr32/configs/atstk1006_defconfig
@@ -0,0 +1,1304 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.27-rc1
4# Tue Aug 5 15:40:26 2008
5#
6CONFIG_AVR32=y
7CONFIG_GENERIC_GPIO=y
8CONFIG_GENERIC_HARDIRQS=y
9CONFIG_STACKTRACE_SUPPORT=y
10CONFIG_LOCKDEP_SUPPORT=y
11CONFIG_TRACE_IRQFLAGS_SUPPORT=y
12CONFIG_HARDIRQS_SW_RESEND=y
13CONFIG_GENERIC_IRQ_PROBE=y
14CONFIG_RWSEM_GENERIC_SPINLOCK=y
15CONFIG_GENERIC_TIME=y
16CONFIG_GENERIC_CLOCKEVENTS=y
17# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
18# CONFIG_ARCH_HAS_ILOG2_U32 is not set
19# CONFIG_ARCH_HAS_ILOG2_U64 is not set
20CONFIG_GENERIC_HWEIGHT=y
21CONFIG_GENERIC_CALIBRATE_DELAY=y
22CONFIG_GENERIC_BUG=y
23CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
24
25#
26# General setup
27#
28CONFIG_EXPERIMENTAL=y
29CONFIG_BROKEN_ON_SMP=y
30CONFIG_INIT_ENV_ARG_LIMIT=32
31CONFIG_LOCALVERSION=""
32# CONFIG_LOCALVERSION_AUTO is not set
33CONFIG_SWAP=y
34CONFIG_SYSVIPC=y
35CONFIG_SYSVIPC_SYSCTL=y
36CONFIG_POSIX_MQUEUE=y
37# CONFIG_BSD_PROCESS_ACCT is not set
38# CONFIG_TASKSTATS is not set
39# CONFIG_AUDIT is not set
40# CONFIG_IKCONFIG is not set
41CONFIG_LOG_BUF_SHIFT=14
42# CONFIG_CGROUPS is not set
43# CONFIG_GROUP_SCHED is not set
44CONFIG_SYSFS_DEPRECATED=y
45CONFIG_SYSFS_DEPRECATED_V2=y
46CONFIG_RELAY=y
47# CONFIG_NAMESPACES is not set
48CONFIG_BLK_DEV_INITRD=y
49CONFIG_INITRAMFS_SOURCE=""
50CONFIG_CC_OPTIMIZE_FOR_SIZE=y
51CONFIG_SYSCTL=y
52CONFIG_EMBEDDED=y
53# CONFIG_SYSCTL_SYSCALL is not set
54CONFIG_KALLSYMS=y
55# CONFIG_KALLSYMS_ALL is not set
56# CONFIG_KALLSYMS_EXTRA_PASS is not set
57CONFIG_HOTPLUG=y
58CONFIG_PRINTK=y
59CONFIG_BUG=y
60CONFIG_ELF_CORE=y
61# CONFIG_COMPAT_BRK is not set
62# CONFIG_BASE_FULL is not set
63CONFIG_FUTEX=y
64CONFIG_ANON_INODES=y
65CONFIG_EPOLL=y
66CONFIG_SIGNALFD=y
67CONFIG_TIMERFD=y
68CONFIG_EVENTFD=y
69CONFIG_SHMEM=y
70CONFIG_VM_EVENT_COUNTERS=y
71CONFIG_SLUB_DEBUG=y
72# CONFIG_SLAB is not set
73CONFIG_SLUB=y
74# CONFIG_SLOB is not set
75CONFIG_PROFILING=y
76# CONFIG_MARKERS is not set
77CONFIG_OPROFILE=m
78CONFIG_HAVE_OPROFILE=y
79CONFIG_KPROBES=y
80# CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS is not set
81# CONFIG_HAVE_IOREMAP_PROT is not set
82CONFIG_HAVE_KPROBES=y
83# CONFIG_HAVE_KRETPROBES is not set
84# CONFIG_HAVE_ARCH_TRACEHOOK is not set
85# CONFIG_HAVE_DMA_ATTRS is not set
86# CONFIG_USE_GENERIC_SMP_HELPERS is not set
87CONFIG_HAVE_CLK=y
88CONFIG_PROC_PAGE_MONITOR=y
89# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
90CONFIG_SLABINFO=y
91CONFIG_RT_MUTEXES=y
92# CONFIG_TINY_SHMEM is not set
93CONFIG_BASE_SMALL=1
94CONFIG_MODULES=y
95# CONFIG_MODULE_FORCE_LOAD is not set
96CONFIG_MODULE_UNLOAD=y
97# CONFIG_MODULE_FORCE_UNLOAD is not set
98# CONFIG_MODVERSIONS is not set
99# CONFIG_MODULE_SRCVERSION_ALL is not set
100CONFIG_KMOD=y
101CONFIG_BLOCK=y
102# CONFIG_LBD is not set
103# CONFIG_BLK_DEV_IO_TRACE is not set
104# CONFIG_LSF is not set
105# CONFIG_BLK_DEV_BSG is not set
106# CONFIG_BLK_DEV_INTEGRITY is not set
107
108#
109# IO Schedulers
110#
111CONFIG_IOSCHED_NOOP=y
112# CONFIG_IOSCHED_AS is not set
113# CONFIG_IOSCHED_DEADLINE is not set
114CONFIG_IOSCHED_CFQ=y
115# CONFIG_DEFAULT_AS is not set
116# CONFIG_DEFAULT_DEADLINE is not set
117CONFIG_DEFAULT_CFQ=y
118# CONFIG_DEFAULT_NOOP is not set
119CONFIG_DEFAULT_IOSCHED="cfq"
120CONFIG_CLASSIC_RCU=y
121
122#
123# System Type and features
124#
125CONFIG_TICK_ONESHOT=y
126CONFIG_NO_HZ=y
127CONFIG_HIGH_RES_TIMERS=y
128CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
129CONFIG_SUBARCH_AVR32B=y
130CONFIG_MMU=y
131CONFIG_PERFORMANCE_COUNTERS=y
132CONFIG_PLATFORM_AT32AP=y
133CONFIG_CPU_AT32AP700X=y
134CONFIG_CPU_AT32AP7000=y
135CONFIG_BOARD_ATSTK1000=y
136# CONFIG_BOARD_ATNGW100 is not set
137# CONFIG_BOARD_ATSTK1002 is not set
138# CONFIG_BOARD_ATSTK1003 is not set
139# CONFIG_BOARD_ATSTK1004 is not set
140CONFIG_BOARD_ATSTK1006=y
141# CONFIG_BOARD_ATSTK100X_CUSTOM is not set
142# CONFIG_BOARD_ATSTK100X_SPI1 is not set
143# CONFIG_BOARD_ATSTK1000_J2_LED is not set
144# CONFIG_BOARD_ATSTK1000_J2_LED8 is not set
145# CONFIG_BOARD_ATSTK1000_J2_RGB is not set
146CONFIG_BOARD_ATSTK1000_EXTDAC=y
147CONFIG_LOADER_U_BOOT=y
148
149#
150# Atmel AVR32 AP options
151#
152# CONFIG_AP700X_32_BIT_SMC is not set
153CONFIG_AP700X_16_BIT_SMC=y
154# CONFIG_AP700X_8_BIT_SMC is not set
155CONFIG_LOAD_ADDRESS=0x10000000
156CONFIG_ENTRY_ADDRESS=0x90000000
157CONFIG_PHYS_OFFSET=0x10000000
158CONFIG_PREEMPT_NONE=y
159# CONFIG_PREEMPT_VOLUNTARY is not set
160# CONFIG_PREEMPT is not set
161CONFIG_QUICKLIST=y
162# CONFIG_HAVE_ARCH_BOOTMEM_NODE is not set
163# CONFIG_ARCH_HAVE_MEMORY_PRESENT is not set
164# CONFIG_NEED_NODE_MEMMAP_SIZE is not set
165CONFIG_ARCH_FLATMEM_ENABLE=y
166# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
167# CONFIG_ARCH_SPARSEMEM_ENABLE is not set
168CONFIG_SELECT_MEMORY_MODEL=y
169CONFIG_FLATMEM_MANUAL=y
170# CONFIG_DISCONTIGMEM_MANUAL is not set
171# CONFIG_SPARSEMEM_MANUAL is not set
172CONFIG_FLATMEM=y
173CONFIG_FLAT_NODE_MEM_MAP=y
174# CONFIG_SPARSEMEM_STATIC is not set
175# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
176CONFIG_PAGEFLAGS_EXTENDED=y
177CONFIG_SPLIT_PTLOCK_CPUS=4
178# CONFIG_RESOURCES_64BIT is not set
179CONFIG_ZONE_DMA_FLAG=0
180CONFIG_NR_QUICK=2
181CONFIG_VIRT_TO_BUS=y
182# CONFIG_OWNERSHIP_TRACE is not set
183CONFIG_NMI_DEBUGGING=y
184# CONFIG_HZ_100 is not set
185CONFIG_HZ_250=y
186# CONFIG_HZ_300 is not set
187# CONFIG_HZ_1000 is not set
188CONFIG_HZ=250
189# CONFIG_SCHED_HRTICK is not set
190CONFIG_CMDLINE=""
191
192#
193# Power management options
194#
195CONFIG_PM=y
196# CONFIG_PM_DEBUG is not set
197CONFIG_PM_SLEEP=y
198CONFIG_SUSPEND=y
199CONFIG_SUSPEND_FREEZER=y
200CONFIG_ARCH_SUSPEND_POSSIBLE=y
201
202#
203# CPU Frequency scaling
204#
205CONFIG_CPU_FREQ=y
206CONFIG_CPU_FREQ_TABLE=y
207# CONFIG_CPU_FREQ_DEBUG is not set
208# CONFIG_CPU_FREQ_STAT is not set
209# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
210# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set
211# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
212CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
213# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
214CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
215# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set
216CONFIG_CPU_FREQ_GOV_USERSPACE=y
217CONFIG_CPU_FREQ_GOV_ONDEMAND=y
218# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set
219CONFIG_CPU_FREQ_AT32AP=y
220
221#
222# Bus options
223#
224# CONFIG_ARCH_SUPPORTS_MSI is not set
225# CONFIG_PCCARD is not set
226
227#
228# Executable file formats
229#
230CONFIG_BINFMT_ELF=y
231# CONFIG_BINFMT_MISC is not set
232CONFIG_NET=y
233
234#
235# Networking options
236#
237CONFIG_PACKET=y
238CONFIG_PACKET_MMAP=y
239CONFIG_UNIX=y
240CONFIG_XFRM=y
241CONFIG_XFRM_USER=m
242# CONFIG_XFRM_SUB_POLICY is not set
243# CONFIG_XFRM_MIGRATE is not set
244# CONFIG_XFRM_STATISTICS is not set
245CONFIG_XFRM_IPCOMP=m
246CONFIG_NET_KEY=m
247# CONFIG_NET_KEY_MIGRATE is not set
248CONFIG_INET=y
249# CONFIG_IP_MULTICAST is not set
250# CONFIG_IP_ADVANCED_ROUTER is not set
251CONFIG_IP_FIB_HASH=y
252CONFIG_IP_PNP=y
253CONFIG_IP_PNP_DHCP=y
254# CONFIG_IP_PNP_BOOTP is not set
255# CONFIG_IP_PNP_RARP is not set
256CONFIG_NET_IPIP=m
257CONFIG_NET_IPGRE=m
258# CONFIG_ARPD is not set
259# CONFIG_SYN_COOKIES is not set
260CONFIG_INET_AH=m
261CONFIG_INET_ESP=m
262# CONFIG_INET_IPCOMP is not set
263# CONFIG_INET_XFRM_TUNNEL is not set
264CONFIG_INET_TUNNEL=m
265CONFIG_INET_XFRM_MODE_TRANSPORT=m
266CONFIG_INET_XFRM_MODE_TUNNEL=m
267CONFIG_INET_XFRM_MODE_BEET=m
268# CONFIG_INET_LRO is not set
269CONFIG_INET_DIAG=y
270CONFIG_INET_TCP_DIAG=y
271# CONFIG_TCP_CONG_ADVANCED is not set
272CONFIG_TCP_CONG_CUBIC=y
273CONFIG_DEFAULT_TCP_CONG="cubic"
274# CONFIG_TCP_MD5SIG is not set
275CONFIG_IPV6=m
276# CONFIG_IPV6_PRIVACY is not set
277# CONFIG_IPV6_ROUTER_PREF is not set
278# CONFIG_IPV6_OPTIMISTIC_DAD is not set
279CONFIG_INET6_AH=m
280CONFIG_INET6_ESP=m
281CONFIG_INET6_IPCOMP=m
282# CONFIG_IPV6_MIP6 is not set
283CONFIG_INET6_XFRM_TUNNEL=m
284CONFIG_INET6_TUNNEL=m
285CONFIG_INET6_XFRM_MODE_TRANSPORT=m
286CONFIG_INET6_XFRM_MODE_TUNNEL=m
287CONFIG_INET6_XFRM_MODE_BEET=m
288# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
289CONFIG_IPV6_SIT=m
290CONFIG_IPV6_NDISC_NODETYPE=y
291CONFIG_IPV6_TUNNEL=m
292# CONFIG_IPV6_MULTIPLE_TABLES is not set
293# CONFIG_IPV6_MROUTE is not set
294# CONFIG_NETWORK_SECMARK is not set
295# CONFIG_NETFILTER is not set
296# CONFIG_IP_DCCP is not set
297# CONFIG_IP_SCTP is not set
298# CONFIG_TIPC is not set
299# CONFIG_ATM is not set
300CONFIG_STP=m
301CONFIG_BRIDGE=m
302# CONFIG_VLAN_8021Q is not set
303# CONFIG_DECNET is not set
304CONFIG_LLC=m
305# CONFIG_LLC2 is not set
306# CONFIG_IPX is not set
307# CONFIG_ATALK is not set
308# CONFIG_X25 is not set
309# CONFIG_LAPB is not set
310# CONFIG_ECONET is not set
311# CONFIG_WAN_ROUTER is not set
312# CONFIG_NET_SCHED is not set
313
314#
315# Network testing
316#
317# CONFIG_NET_PKTGEN is not set
318# CONFIG_NET_TCPPROBE is not set
319# CONFIG_HAMRADIO is not set
320# CONFIG_CAN is not set
321# CONFIG_IRDA is not set
322# CONFIG_BT is not set
323# CONFIG_AF_RXRPC is not set
324
325#
326# Wireless
327#
328# CONFIG_CFG80211 is not set
329# CONFIG_WIRELESS_EXT is not set
330# CONFIG_MAC80211 is not set
331# CONFIG_IEEE80211 is not set
332# CONFIG_RFKILL is not set
333# CONFIG_NET_9P is not set
334
335#
336# Device Drivers
337#
338
339#
340# Generic Driver Options
341#
342CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
343CONFIG_STANDALONE=y
344# CONFIG_PREVENT_FIRMWARE_BUILD is not set
345# CONFIG_FW_LOADER is not set
346# CONFIG_DEBUG_DRIVER is not set
347# CONFIG_DEBUG_DEVRES is not set
348# CONFIG_SYS_HYPERVISOR is not set
349# CONFIG_CONNECTOR is not set
350CONFIG_MTD=y
351# CONFIG_MTD_DEBUG is not set
352# CONFIG_MTD_CONCAT is not set
353CONFIG_MTD_PARTITIONS=y
354# CONFIG_MTD_REDBOOT_PARTS is not set
355CONFIG_MTD_CMDLINE_PARTS=y
356# CONFIG_MTD_AR7_PARTS is not set
357
358#
359# User Modules And Translation Layers
360#
361CONFIG_MTD_CHAR=y
362CONFIG_MTD_BLKDEVS=y
363CONFIG_MTD_BLOCK=y
364# CONFIG_FTL is not set
365# CONFIG_NFTL is not set
366# CONFIG_INFTL is not set
367# CONFIG_RFD_FTL is not set
368# CONFIG_SSFDC is not set
369# CONFIG_MTD_OOPS is not set
370
371#
372# RAM/ROM/Flash chip drivers
373#
374CONFIG_MTD_CFI=y
375# CONFIG_MTD_JEDECPROBE is not set
376CONFIG_MTD_GEN_PROBE=y
377# CONFIG_MTD_CFI_ADV_OPTIONS is not set
378CONFIG_MTD_MAP_BANK_WIDTH_1=y
379CONFIG_MTD_MAP_BANK_WIDTH_2=y
380CONFIG_MTD_MAP_BANK_WIDTH_4=y
381# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
382# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
383# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
384CONFIG_MTD_CFI_I1=y
385CONFIG_MTD_CFI_I2=y
386# CONFIG_MTD_CFI_I4 is not set
387# CONFIG_MTD_CFI_I8 is not set
388# CONFIG_MTD_CFI_INTELEXT is not set
389CONFIG_MTD_CFI_AMDSTD=y
390# CONFIG_MTD_CFI_STAA is not set
391CONFIG_MTD_CFI_UTIL=y
392# CONFIG_MTD_RAM is not set
393# CONFIG_MTD_ROM is not set
394# CONFIG_MTD_ABSENT is not set
395
396#
397# Mapping drivers for chip access
398#
399# CONFIG_MTD_COMPLEX_MAPPINGS is not set
400CONFIG_MTD_PHYSMAP=y
401CONFIG_MTD_PHYSMAP_START=0x8000000
402CONFIG_MTD_PHYSMAP_LEN=0x0
403CONFIG_MTD_PHYSMAP_BANKWIDTH=2
404# CONFIG_MTD_PLATRAM is not set
405
406#
407# Self-contained MTD device drivers
408#
409CONFIG_MTD_DATAFLASH=m
410CONFIG_MTD_M25P80=m
411CONFIG_M25PXX_USE_FAST_READ=y
412# CONFIG_MTD_SLRAM is not set
413# CONFIG_MTD_PHRAM is not set
414# CONFIG_MTD_MTDRAM is not set
415# CONFIG_MTD_BLOCK2MTD is not set
416
417#
418# Disk-On-Chip Device Drivers
419#
420# CONFIG_MTD_DOC2000 is not set
421# CONFIG_MTD_DOC2001 is not set
422# CONFIG_MTD_DOC2001PLUS is not set
423CONFIG_MTD_NAND=y
424# CONFIG_MTD_NAND_VERIFY_WRITE is not set
425# CONFIG_MTD_NAND_ECC_SMC is not set
426# CONFIG_MTD_NAND_MUSEUM_IDS is not set
427CONFIG_MTD_NAND_IDS=y
428# CONFIG_MTD_NAND_DISKONCHIP is not set
429CONFIG_MTD_NAND_ATMEL=y
430CONFIG_MTD_NAND_ATMEL_ECC_HW=y
431# CONFIG_MTD_NAND_ATMEL_ECC_SOFT is not set
432# CONFIG_MTD_NAND_ATMEL_ECC_NONE is not set
433# CONFIG_MTD_NAND_NANDSIM is not set
434# CONFIG_MTD_NAND_PLATFORM is not set
435# CONFIG_MTD_ONENAND is not set
436
437#
438# UBI - Unsorted block images
439#
440CONFIG_MTD_UBI=y
441CONFIG_MTD_UBI_WL_THRESHOLD=4096
442CONFIG_MTD_UBI_BEB_RESERVE=1
443# CONFIG_MTD_UBI_GLUEBI is not set
444
445#
446# UBI debugging options
447#
448# CONFIG_MTD_UBI_DEBUG is not set
449# CONFIG_PARPORT is not set
450CONFIG_BLK_DEV=y
451# CONFIG_BLK_DEV_COW_COMMON is not set
452CONFIG_BLK_DEV_LOOP=m
453# CONFIG_BLK_DEV_CRYPTOLOOP is not set
454CONFIG_BLK_DEV_NBD=m
455CONFIG_BLK_DEV_RAM=m
456CONFIG_BLK_DEV_RAM_COUNT=16
457CONFIG_BLK_DEV_RAM_SIZE=4096
458# CONFIG_BLK_DEV_XIP is not set
459# CONFIG_CDROM_PKTCDVD is not set
460# CONFIG_ATA_OVER_ETH is not set
461CONFIG_MISC_DEVICES=y
462CONFIG_ATMEL_PWM=m
463CONFIG_ATMEL_TCLIB=y
464CONFIG_ATMEL_TCB_CLKSRC=y
465CONFIG_ATMEL_TCB_CLKSRC_BLOCK=0
466# CONFIG_EEPROM_93CX6 is not set
467CONFIG_ATMEL_SSC=m
468# CONFIG_ENCLOSURE_SERVICES is not set
469# CONFIG_HAVE_IDE is not set
470
471#
472# SCSI device support
473#
474# CONFIG_RAID_ATTRS is not set
475CONFIG_SCSI=m
476CONFIG_SCSI_DMA=y
477# CONFIG_SCSI_TGT is not set
478# CONFIG_SCSI_NETLINK is not set
479# CONFIG_SCSI_PROC_FS is not set
480
481#
482# SCSI support type (disk, tape, CD-ROM)
483#
484CONFIG_BLK_DEV_SD=m
485# CONFIG_CHR_DEV_ST is not set
486# CONFIG_CHR_DEV_OSST is not set
487CONFIG_BLK_DEV_SR=m
488# CONFIG_BLK_DEV_SR_VENDOR is not set
489# CONFIG_CHR_DEV_SG is not set
490# CONFIG_CHR_DEV_SCH is not set
491
492#
493# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
494#
495# CONFIG_SCSI_MULTI_LUN is not set
496# CONFIG_SCSI_CONSTANTS is not set
497# CONFIG_SCSI_LOGGING is not set
498# CONFIG_SCSI_SCAN_ASYNC is not set
499CONFIG_SCSI_WAIT_SCAN=m
500
501#
502# SCSI Transports
503#
504# CONFIG_SCSI_SPI_ATTRS is not set
505# CONFIG_SCSI_FC_ATTRS is not set
506# CONFIG_SCSI_ISCSI_ATTRS is not set
507# CONFIG_SCSI_SAS_LIBSAS is not set
508# CONFIG_SCSI_SRP_ATTRS is not set
509# CONFIG_SCSI_LOWLEVEL is not set
510# CONFIG_SCSI_DH is not set
511CONFIG_ATA=m
512# CONFIG_ATA_NONSTANDARD is not set
513# CONFIG_SATA_PMP is not set
514CONFIG_ATA_SFF=y
515# CONFIG_SATA_MV is not set
516CONFIG_PATA_AT32=m
517# CONFIG_PATA_PLATFORM is not set
518# CONFIG_MD is not set
519CONFIG_NETDEVICES=y
520# CONFIG_DUMMY is not set
521# CONFIG_BONDING is not set
522# CONFIG_MACVLAN is not set
523# CONFIG_EQUALIZER is not set
524CONFIG_TUN=m
525# CONFIG_VETH is not set
526CONFIG_PHYLIB=y
527
528#
529# MII PHY device drivers
530#
531# CONFIG_MARVELL_PHY is not set
532# CONFIG_DAVICOM_PHY is not set
533# CONFIG_QSEMI_PHY is not set
534# CONFIG_LXT_PHY is not set
535# CONFIG_CICADA_PHY is not set
536# CONFIG_VITESSE_PHY is not set
537# CONFIG_SMSC_PHY is not set
538# CONFIG_BROADCOM_PHY is not set
539# CONFIG_ICPLUS_PHY is not set
540# CONFIG_REALTEK_PHY is not set
541# CONFIG_FIXED_PHY is not set
542# CONFIG_MDIO_BITBANG is not set
543CONFIG_NET_ETHERNET=y
544# CONFIG_MII is not set
545CONFIG_MACB=y
546# CONFIG_ENC28J60 is not set
547# CONFIG_IBM_NEW_EMAC_ZMII is not set
548# CONFIG_IBM_NEW_EMAC_RGMII is not set
549# CONFIG_IBM_NEW_EMAC_TAH is not set
550# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
551# CONFIG_B44 is not set
552# CONFIG_NETDEV_1000 is not set
553# CONFIG_NETDEV_10000 is not set
554
555#
556# Wireless LAN
557#
558# CONFIG_WLAN_PRE80211 is not set
559# CONFIG_WLAN_80211 is not set
560# CONFIG_IWLWIFI_LEDS is not set
561# CONFIG_WAN is not set
562CONFIG_PPP=m
563# CONFIG_PPP_MULTILINK is not set
564# CONFIG_PPP_FILTER is not set
565CONFIG_PPP_ASYNC=m
566# CONFIG_PPP_SYNC_TTY is not set
567CONFIG_PPP_DEFLATE=m
568CONFIG_PPP_BSDCOMP=m
569# CONFIG_PPP_MPPE is not set
570# CONFIG_PPPOE is not set
571# CONFIG_PPPOL2TP is not set
572# CONFIG_SLIP is not set
573CONFIG_SLHC=m
574# CONFIG_NETCONSOLE is not set
575# CONFIG_NETPOLL is not set
576# CONFIG_NET_POLL_CONTROLLER is not set
577# CONFIG_ISDN is not set
578# CONFIG_PHONE is not set
579
580#
581# Input device support
582#
583CONFIG_INPUT=m
584# CONFIG_INPUT_FF_MEMLESS is not set
585CONFIG_INPUT_POLLDEV=m
586
587#
588# Userland interfaces
589#
590CONFIG_INPUT_MOUSEDEV=m
591CONFIG_INPUT_MOUSEDEV_PSAUX=y
592CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
593CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
594# CONFIG_INPUT_JOYDEV is not set
595CONFIG_INPUT_EVDEV=m
596# CONFIG_INPUT_EVBUG is not set
597
598#
599# Input Device Drivers
600#
601CONFIG_INPUT_KEYBOARD=y
602# CONFIG_KEYBOARD_ATKBD is not set
603# CONFIG_KEYBOARD_SUNKBD is not set
604# CONFIG_KEYBOARD_LKKBD is not set
605# CONFIG_KEYBOARD_XTKBD is not set
606# CONFIG_KEYBOARD_NEWTON is not set
607# CONFIG_KEYBOARD_STOWAWAY is not set
608CONFIG_KEYBOARD_GPIO=m
609CONFIG_INPUT_MOUSE=y
610# CONFIG_MOUSE_PS2 is not set
611# CONFIG_MOUSE_SERIAL is not set
612# CONFIG_MOUSE_VSXXXAA is not set
613CONFIG_MOUSE_GPIO=m
614# CONFIG_INPUT_JOYSTICK is not set
615# CONFIG_INPUT_TABLET is not set
616# CONFIG_INPUT_TOUCHSCREEN is not set
617# CONFIG_INPUT_MISC is not set
618
619#
620# Hardware I/O ports
621#
622# CONFIG_SERIO is not set
623# CONFIG_GAMEPORT is not set
624
625#
626# Character devices
627#
628# CONFIG_VT is not set
629# CONFIG_DEVKMEM is not set
630# CONFIG_SERIAL_NONSTANDARD is not set
631
632#
633# Serial drivers
634#
635# CONFIG_SERIAL_8250 is not set
636
637#
638# Non-8250 serial port support
639#
640CONFIG_SERIAL_ATMEL=y
641CONFIG_SERIAL_ATMEL_CONSOLE=y
642CONFIG_SERIAL_ATMEL_PDC=y
643# CONFIG_SERIAL_ATMEL_TTYAT is not set
644CONFIG_SERIAL_CORE=y
645CONFIG_SERIAL_CORE_CONSOLE=y
646CONFIG_UNIX98_PTYS=y
647# CONFIG_LEGACY_PTYS is not set
648# CONFIG_IPMI_HANDLER is not set
649# CONFIG_HW_RANDOM is not set
650# CONFIG_R3964 is not set
651# CONFIG_RAW_DRIVER is not set
652# CONFIG_TCG_TPM is not set
653CONFIG_I2C=m
654CONFIG_I2C_BOARDINFO=y
655CONFIG_I2C_CHARDEV=m
656CONFIG_I2C_ALGOBIT=m
657
658#
659# I2C Hardware Bus support
660#
661
662#
663# I2C system bus drivers (mostly embedded / system-on-chip)
664#
665CONFIG_I2C_GPIO=m
666# CONFIG_I2C_OCORES is not set
667# CONFIG_I2C_SIMTEC is not set
668
669#
670# External I2C/SMBus adapter drivers
671#
672# CONFIG_I2C_PARPORT_LIGHT is not set
673# CONFIG_I2C_TAOS_EVM is not set
674
675#
676# Other I2C/SMBus bus drivers
677#
678# CONFIG_I2C_PCA_PLATFORM is not set
679# CONFIG_I2C_STUB is not set
680
681#
682# Miscellaneous I2C Chip support
683#
684# CONFIG_DS1682 is not set
685# CONFIG_AT24 is not set
686# CONFIG_SENSORS_EEPROM is not set
687# CONFIG_SENSORS_PCF8574 is not set
688# CONFIG_PCF8575 is not set
689# CONFIG_SENSORS_PCA9539 is not set
690# CONFIG_SENSORS_PCF8591 is not set
691# CONFIG_TPS65010 is not set
692# CONFIG_SENSORS_MAX6875 is not set
693# CONFIG_SENSORS_TSL2550 is not set
694# CONFIG_I2C_DEBUG_CORE is not set
695# CONFIG_I2C_DEBUG_ALGO is not set
696# CONFIG_I2C_DEBUG_BUS is not set
697# CONFIG_I2C_DEBUG_CHIP is not set
698CONFIG_SPI=y
699# CONFIG_SPI_DEBUG is not set
700CONFIG_SPI_MASTER=y
701
702#
703# SPI Master Controller Drivers
704#
705CONFIG_SPI_ATMEL=y
706# CONFIG_SPI_BITBANG is not set
707
708#
709# SPI Protocol Masters
710#
711# CONFIG_SPI_AT25 is not set
712CONFIG_SPI_SPIDEV=m
713# CONFIG_SPI_TLE62X0 is not set
714CONFIG_ARCH_REQUIRE_GPIOLIB=y
715CONFIG_GPIOLIB=y
716# CONFIG_DEBUG_GPIO is not set
717CONFIG_GPIO_SYSFS=y
718
719#
720# I2C GPIO expanders:
721#
722# CONFIG_GPIO_MAX732X is not set
723# CONFIG_GPIO_PCA953X is not set
724# CONFIG_GPIO_PCF857X is not set
725
726#
727# PCI GPIO expanders:
728#
729
730#
731# SPI GPIO expanders:
732#
733# CONFIG_GPIO_MAX7301 is not set
734# CONFIG_GPIO_MCP23S08 is not set
735# CONFIG_W1 is not set
736# CONFIG_POWER_SUPPLY is not set
737# CONFIG_HWMON is not set
738# CONFIG_THERMAL is not set
739# CONFIG_THERMAL_HWMON is not set
740CONFIG_WATCHDOG=y
741# CONFIG_WATCHDOG_NOWAYOUT is not set
742
743#
744# Watchdog Device Drivers
745#
746# CONFIG_SOFT_WATCHDOG is not set
747CONFIG_AT32AP700X_WDT=y
748
749#
750# Sonics Silicon Backplane
751#
752CONFIG_SSB_POSSIBLE=y
753# CONFIG_SSB is not set
754
755#
756# Multifunction device drivers
757#
758# CONFIG_MFD_CORE is not set
759# CONFIG_MFD_SM501 is not set
760# CONFIG_HTC_PASIC3 is not set
761
762#
763# Multimedia devices
764#
765
766#
767# Multimedia core support
768#
769# CONFIG_VIDEO_DEV is not set
770# CONFIG_DVB_CORE is not set
771# CONFIG_VIDEO_MEDIA is not set
772
773#
774# Multimedia drivers
775#
776# CONFIG_DAB is not set
777
778#
779# Graphics support
780#
781# CONFIG_VGASTATE is not set
782# CONFIG_VIDEO_OUTPUT_CONTROL is not set
783CONFIG_FB=y
784# CONFIG_FIRMWARE_EDID is not set
785# CONFIG_FB_DDC is not set
786CONFIG_FB_CFB_FILLRECT=y
787CONFIG_FB_CFB_COPYAREA=y
788CONFIG_FB_CFB_IMAGEBLIT=y
789# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
790# CONFIG_FB_SYS_FILLRECT is not set
791# CONFIG_FB_SYS_COPYAREA is not set
792# CONFIG_FB_SYS_IMAGEBLIT is not set
793# CONFIG_FB_FOREIGN_ENDIAN is not set
794# CONFIG_FB_SYS_FOPS is not set
795# CONFIG_FB_SVGALIB is not set
796# CONFIG_FB_MACMODES is not set
797# CONFIG_FB_BACKLIGHT is not set
798# CONFIG_FB_MODE_HELPERS is not set
799# CONFIG_FB_TILEBLITTING is not set
800
801#
802# Frame buffer hardware drivers
803#
804# CONFIG_FB_S1D13XXX is not set
805CONFIG_FB_ATMEL=y
806# CONFIG_FB_VIRTUAL is not set
807CONFIG_BACKLIGHT_LCD_SUPPORT=y
808CONFIG_LCD_CLASS_DEVICE=y
809CONFIG_LCD_LTV350QV=y
810# CONFIG_LCD_ILI9320 is not set
811# CONFIG_LCD_VGG2432A4 is not set
812# CONFIG_LCD_PLATFORM is not set
813# CONFIG_BACKLIGHT_CLASS_DEVICE is not set
814
815#
816# Display device support
817#
818# CONFIG_DISPLAY_SUPPORT is not set
819# CONFIG_LOGO is not set
820CONFIG_SOUND=m
821CONFIG_SND=m
822CONFIG_SND_TIMER=m
823CONFIG_SND_PCM=m
824# CONFIG_SND_SEQUENCER is not set
825CONFIG_SND_OSSEMUL=y
826CONFIG_SND_MIXER_OSS=m
827CONFIG_SND_PCM_OSS=m
828CONFIG_SND_PCM_OSS_PLUGINS=y
829# CONFIG_SND_DYNAMIC_MINORS is not set
830# CONFIG_SND_SUPPORT_OLD_API is not set
831# CONFIG_SND_VERBOSE_PROCFS is not set
832# CONFIG_SND_VERBOSE_PRINTK is not set
833# CONFIG_SND_DEBUG is not set
834CONFIG_SND_DRIVERS=y
835# CONFIG_SND_DUMMY is not set
836# CONFIG_SND_MTPAV is not set
837# CONFIG_SND_SERIAL_U16550 is not set
838# CONFIG_SND_MPU401 is not set
839CONFIG_SND_SPI=y
840CONFIG_SND_AT73C213=m
841CONFIG_SND_AT73C213_TARGET_BITRATE=48000
842# CONFIG_SND_SOC is not set
843# CONFIG_SOUND_PRIME is not set
844# CONFIG_HID_SUPPORT is not set
845CONFIG_USB_SUPPORT=y
846# CONFIG_USB_ARCH_HAS_HCD is not set
847# CONFIG_USB_ARCH_HAS_OHCI is not set
848# CONFIG_USB_ARCH_HAS_EHCI is not set
849# CONFIG_USB_OTG_WHITELIST is not set
850# CONFIG_USB_OTG_BLACKLIST_HUB is not set
851
852#
853# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
854#
855CONFIG_USB_GADGET=y
856# CONFIG_USB_GADGET_DEBUG is not set
857# CONFIG_USB_GADGET_DEBUG_FILES is not set
858# CONFIG_USB_GADGET_DEBUG_FS is not set
859CONFIG_USB_GADGET_SELECTED=y
860# CONFIG_USB_GADGET_AMD5536UDC is not set
861CONFIG_USB_GADGET_ATMEL_USBA=y
862CONFIG_USB_ATMEL_USBA=y
863# CONFIG_USB_GADGET_FSL_USB2 is not set
864# CONFIG_USB_GADGET_NET2280 is not set
865# CONFIG_USB_GADGET_PXA25X is not set
866# CONFIG_USB_GADGET_M66592 is not set
867# CONFIG_USB_GADGET_PXA27X is not set
868# CONFIG_USB_GADGET_GOKU is not set
869# CONFIG_USB_GADGET_LH7A40X is not set
870# CONFIG_USB_GADGET_OMAP is not set
871# CONFIG_USB_GADGET_S3C2410 is not set
872# CONFIG_USB_GADGET_AT91 is not set
873# CONFIG_USB_GADGET_DUMMY_HCD is not set
874CONFIG_USB_GADGET_DUALSPEED=y
875CONFIG_USB_ZERO=m
876CONFIG_USB_ETH=m
877CONFIG_USB_ETH_RNDIS=y
878CONFIG_USB_GADGETFS=m
879CONFIG_USB_FILE_STORAGE=m
880# CONFIG_USB_FILE_STORAGE_TEST is not set
881CONFIG_USB_G_SERIAL=m
882# CONFIG_USB_MIDI_GADGET is not set
883# CONFIG_USB_G_PRINTER is not set
884# CONFIG_USB_CDC_COMPOSITE is not set
885CONFIG_MMC=y
886# CONFIG_MMC_DEBUG is not set
887# CONFIG_MMC_UNSAFE_RESUME is not set
888
889#
890# MMC/SD Card Drivers
891#
892CONFIG_MMC_BLOCK=y
893CONFIG_MMC_BLOCK_BOUNCE=y
894# CONFIG_SDIO_UART is not set
895# CONFIG_MMC_TEST is not set
896
897#
898# MMC/SD Host Controller Drivers
899#
900# CONFIG_MMC_SDHCI is not set
901CONFIG_MMC_ATMELMCI=y
902CONFIG_MMC_SPI=m
903# CONFIG_MEMSTICK is not set
904CONFIG_NEW_LEDS=y
905CONFIG_LEDS_CLASS=m
906
907#
908# LED drivers
909#
910CONFIG_LEDS_ATMEL_PWM=m
911# CONFIG_LEDS_PCA9532 is not set
912CONFIG_LEDS_GPIO=m
913# CONFIG_LEDS_PCA955X is not set
914
915#
916# LED Triggers
917#
918CONFIG_LEDS_TRIGGERS=y
919CONFIG_LEDS_TRIGGER_TIMER=m
920CONFIG_LEDS_TRIGGER_HEARTBEAT=m
921CONFIG_LEDS_TRIGGER_DEFAULT_ON=m
922# CONFIG_ACCESSIBILITY is not set
923CONFIG_RTC_LIB=y
924CONFIG_RTC_CLASS=y
925CONFIG_RTC_HCTOSYS=y
926CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
927# CONFIG_RTC_DEBUG is not set
928
929#
930# RTC interfaces
931#
932CONFIG_RTC_INTF_SYSFS=y
933CONFIG_RTC_INTF_PROC=y
934CONFIG_RTC_INTF_DEV=y
935# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
936# CONFIG_RTC_DRV_TEST is not set
937
938#
939# I2C RTC drivers
940#
941# CONFIG_RTC_DRV_DS1307 is not set
942# CONFIG_RTC_DRV_DS1374 is not set
943# CONFIG_RTC_DRV_DS1672 is not set
944# CONFIG_RTC_DRV_MAX6900 is not set
945# CONFIG_RTC_DRV_RS5C372 is not set
946# CONFIG_RTC_DRV_ISL1208 is not set
947# CONFIG_RTC_DRV_X1205 is not set
948# CONFIG_RTC_DRV_PCF8563 is not set
949# CONFIG_RTC_DRV_PCF8583 is not set
950# CONFIG_RTC_DRV_M41T80 is not set
951# CONFIG_RTC_DRV_S35390A is not set
952# CONFIG_RTC_DRV_FM3130 is not set
953
954#
955# SPI RTC drivers
956#
957# CONFIG_RTC_DRV_M41T94 is not set
958# CONFIG_RTC_DRV_DS1305 is not set
959# CONFIG_RTC_DRV_MAX6902 is not set
960# CONFIG_RTC_DRV_R9701 is not set
961# CONFIG_RTC_DRV_RS5C348 is not set
962
963#
964# Platform RTC drivers
965#
966# CONFIG_RTC_DRV_DS1511 is not set
967# CONFIG_RTC_DRV_DS1553 is not set
968# CONFIG_RTC_DRV_DS1742 is not set
969# CONFIG_RTC_DRV_STK17TA8 is not set
970# CONFIG_RTC_DRV_M48T86 is not set
971# CONFIG_RTC_DRV_M48T59 is not set
972# CONFIG_RTC_DRV_V3020 is not set
973
974#
975# on-CPU RTC drivers
976#
977CONFIG_RTC_DRV_AT32AP700X=y
978CONFIG_DMADEVICES=y
979
980#
981# DMA Devices
982#
983CONFIG_DW_DMAC=y
984CONFIG_DMA_ENGINE=y
985
986#
987# DMA Clients
988#
989# CONFIG_NET_DMA is not set
990CONFIG_DMATEST=m
991# CONFIG_UIO is not set
992
993#
994# File systems
995#
996CONFIG_EXT2_FS=m
997# CONFIG_EXT2_FS_XATTR is not set
998# CONFIG_EXT2_FS_XIP is not set
999CONFIG_EXT3_FS=m
1000# CONFIG_EXT3_FS_XATTR is not set
1001# CONFIG_EXT4DEV_FS is not set
1002CONFIG_JBD=m
1003# CONFIG_JBD_DEBUG is not set
1004# CONFIG_REISERFS_FS is not set
1005# CONFIG_JFS_FS is not set
1006# CONFIG_FS_POSIX_ACL is not set
1007# CONFIG_XFS_FS is not set
1008# CONFIG_OCFS2_FS is not set
1009# CONFIG_DNOTIFY is not set
1010CONFIG_INOTIFY=y
1011CONFIG_INOTIFY_USER=y
1012# CONFIG_QUOTA is not set
1013# CONFIG_AUTOFS_FS is not set
1014# CONFIG_AUTOFS4_FS is not set
1015CONFIG_FUSE_FS=m
1016
1017#
1018# CD-ROM/DVD Filesystems
1019#
1020# CONFIG_ISO9660_FS is not set
1021# CONFIG_UDF_FS is not set
1022
1023#
1024# DOS/FAT/NT Filesystems
1025#
1026CONFIG_FAT_FS=m
1027CONFIG_MSDOS_FS=m
1028CONFIG_VFAT_FS=m
1029CONFIG_FAT_DEFAULT_CODEPAGE=437
1030CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
1031# CONFIG_NTFS_FS is not set
1032
1033#
1034# Pseudo filesystems
1035#
1036CONFIG_PROC_FS=y
1037CONFIG_PROC_KCORE=y
1038CONFIG_PROC_SYSCTL=y
1039CONFIG_SYSFS=y
1040CONFIG_TMPFS=y
1041# CONFIG_TMPFS_POSIX_ACL is not set
1042# CONFIG_HUGETLB_PAGE is not set
1043# CONFIG_CONFIGFS_FS is not set
1044
1045#
1046# Miscellaneous filesystems
1047#
1048# CONFIG_ADFS_FS is not set
1049# CONFIG_AFFS_FS is not set
1050# CONFIG_HFS_FS is not set
1051# CONFIG_HFSPLUS_FS is not set
1052# CONFIG_BEFS_FS is not set
1053# CONFIG_BFS_FS is not set
1054# CONFIG_EFS_FS is not set
1055CONFIG_JFFS2_FS=y
1056CONFIG_JFFS2_FS_DEBUG=0
1057# CONFIG_JFFS2_FS_WRITEBUFFER is not set
1058# CONFIG_JFFS2_SUMMARY is not set
1059# CONFIG_JFFS2_FS_XATTR is not set
1060# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
1061CONFIG_JFFS2_ZLIB=y
1062# CONFIG_JFFS2_LZO is not set
1063CONFIG_JFFS2_RTIME=y
1064# CONFIG_JFFS2_RUBIN is not set
1065CONFIG_UBIFS_FS=y
1066CONFIG_UBIFS_FS_XATTR=y
1067# CONFIG_UBIFS_FS_ADVANCED_COMPR is not set
1068CONFIG_UBIFS_FS_LZO=y
1069CONFIG_UBIFS_FS_ZLIB=y
1070# CONFIG_UBIFS_FS_DEBUG is not set
1071# CONFIG_CRAMFS is not set
1072# CONFIG_VXFS_FS is not set
1073CONFIG_MINIX_FS=m
1074# CONFIG_OMFS_FS is not set
1075# CONFIG_HPFS_FS is not set
1076# CONFIG_QNX4FS_FS is not set
1077# CONFIG_ROMFS_FS is not set
1078# CONFIG_SYSV_FS is not set
1079# CONFIG_UFS_FS is not set
1080CONFIG_NETWORK_FILESYSTEMS=y
1081CONFIG_NFS_FS=y
1082CONFIG_NFS_V3=y
1083# CONFIG_NFS_V3_ACL is not set
1084# CONFIG_NFS_V4 is not set
1085CONFIG_ROOT_NFS=y
1086# CONFIG_NFSD is not set
1087CONFIG_LOCKD=y
1088CONFIG_LOCKD_V4=y
1089CONFIG_NFS_COMMON=y
1090CONFIG_SUNRPC=y
1091# CONFIG_RPCSEC_GSS_KRB5 is not set
1092# CONFIG_RPCSEC_GSS_SPKM3 is not set
1093# CONFIG_SMB_FS is not set
1094# CONFIG_CIFS is not set
1095# CONFIG_NCP_FS is not set
1096# CONFIG_CODA_FS is not set
1097# CONFIG_AFS_FS is not set
1098
1099#
1100# Partition Types
1101#
1102# CONFIG_PARTITION_ADVANCED is not set
1103CONFIG_MSDOS_PARTITION=y
1104CONFIG_NLS=m
1105CONFIG_NLS_DEFAULT="iso8859-1"
1106CONFIG_NLS_CODEPAGE_437=m
1107# CONFIG_NLS_CODEPAGE_737 is not set
1108# CONFIG_NLS_CODEPAGE_775 is not set
1109# CONFIG_NLS_CODEPAGE_850 is not set
1110# CONFIG_NLS_CODEPAGE_852 is not set
1111# CONFIG_NLS_CODEPAGE_855 is not set
1112# CONFIG_NLS_CODEPAGE_857 is not set
1113# CONFIG_NLS_CODEPAGE_860 is not set
1114# CONFIG_NLS_CODEPAGE_861 is not set
1115# CONFIG_NLS_CODEPAGE_862 is not set
1116# CONFIG_NLS_CODEPAGE_863 is not set
1117# CONFIG_NLS_CODEPAGE_864 is not set
1118# CONFIG_NLS_CODEPAGE_865 is not set
1119# CONFIG_NLS_CODEPAGE_866 is not set
1120# CONFIG_NLS_CODEPAGE_869 is not set
1121# CONFIG_NLS_CODEPAGE_936 is not set
1122# CONFIG_NLS_CODEPAGE_950 is not set
1123# CONFIG_NLS_CODEPAGE_932 is not set
1124# CONFIG_NLS_CODEPAGE_949 is not set
1125# CONFIG_NLS_CODEPAGE_874 is not set
1126# CONFIG_NLS_ISO8859_8 is not set
1127# CONFIG_NLS_CODEPAGE_1250 is not set
1128# CONFIG_NLS_CODEPAGE_1251 is not set
1129# CONFIG_NLS_ASCII is not set
1130CONFIG_NLS_ISO8859_1=m
1131# CONFIG_NLS_ISO8859_2 is not set
1132# CONFIG_NLS_ISO8859_3 is not set
1133# CONFIG_NLS_ISO8859_4 is not set
1134# CONFIG_NLS_ISO8859_5 is not set
1135# CONFIG_NLS_ISO8859_6 is not set
1136# CONFIG_NLS_ISO8859_7 is not set
1137# CONFIG_NLS_ISO8859_9 is not set
1138# CONFIG_NLS_ISO8859_13 is not set
1139# CONFIG_NLS_ISO8859_14 is not set
1140# CONFIG_NLS_ISO8859_15 is not set
1141# CONFIG_NLS_KOI8_R is not set
1142# CONFIG_NLS_KOI8_U is not set
1143CONFIG_NLS_UTF8=m
1144# CONFIG_DLM is not set
1145
1146#
1147# Kernel hacking
1148#
1149# CONFIG_PRINTK_TIME is not set
1150CONFIG_ENABLE_WARN_DEPRECATED=y
1151CONFIG_ENABLE_MUST_CHECK=y
1152CONFIG_FRAME_WARN=1024
1153CONFIG_MAGIC_SYSRQ=y
1154# CONFIG_UNUSED_SYMBOLS is not set
1155CONFIG_DEBUG_FS=y
1156# CONFIG_HEADERS_CHECK is not set
1157CONFIG_DEBUG_KERNEL=y
1158# CONFIG_DEBUG_SHIRQ is not set
1159CONFIG_DETECT_SOFTLOCKUP=y
1160# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
1161CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
1162CONFIG_SCHED_DEBUG=y
1163# CONFIG_SCHEDSTATS is not set
1164# CONFIG_TIMER_STATS is not set
1165# CONFIG_DEBUG_OBJECTS is not set
1166# CONFIG_SLUB_DEBUG_ON is not set
1167# CONFIG_SLUB_STATS is not set
1168# CONFIG_DEBUG_RT_MUTEXES is not set
1169# CONFIG_RT_MUTEX_TESTER is not set
1170# CONFIG_DEBUG_SPINLOCK is not set
1171# CONFIG_DEBUG_MUTEXES is not set
1172# CONFIG_DEBUG_LOCK_ALLOC is not set
1173# CONFIG_PROVE_LOCKING is not set
1174# CONFIG_LOCK_STAT is not set
1175# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1176# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1177# CONFIG_DEBUG_KOBJECT is not set
1178CONFIG_DEBUG_BUGVERBOSE=y
1179# CONFIG_DEBUG_INFO is not set
1180# CONFIG_DEBUG_VM is not set
1181# CONFIG_DEBUG_WRITECOUNT is not set
1182# CONFIG_DEBUG_MEMORY_INIT is not set
1183# CONFIG_DEBUG_LIST is not set
1184# CONFIG_DEBUG_SG is not set
1185CONFIG_FRAME_POINTER=y
1186# CONFIG_BOOT_PRINTK_DELAY is not set
1187# CONFIG_RCU_TORTURE_TEST is not set
1188# CONFIG_KPROBES_SANITY_TEST is not set
1189# CONFIG_BACKTRACE_SELF_TEST is not set
1190# CONFIG_LKDTM is not set
1191# CONFIG_FAULT_INJECTION is not set
1192# CONFIG_SAMPLES is not set
1193
1194#
1195# Security options
1196#
1197# CONFIG_KEYS is not set
1198# CONFIG_SECURITY is not set
1199# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1200CONFIG_CRYPTO=y
1201
1202#
1203# Crypto core or helper
1204#
1205CONFIG_CRYPTO_ALGAPI=y
1206CONFIG_CRYPTO_AEAD=m
1207CONFIG_CRYPTO_BLKCIPHER=m
1208CONFIG_CRYPTO_HASH=m
1209CONFIG_CRYPTO_MANAGER=m
1210# CONFIG_CRYPTO_GF128MUL is not set
1211# CONFIG_CRYPTO_NULL is not set
1212# CONFIG_CRYPTO_CRYPTD is not set
1213CONFIG_CRYPTO_AUTHENC=m
1214# CONFIG_CRYPTO_TEST is not set
1215
1216#
1217# Authenticated Encryption with Associated Data
1218#
1219# CONFIG_CRYPTO_CCM is not set
1220# CONFIG_CRYPTO_GCM is not set
1221# CONFIG_CRYPTO_SEQIV is not set
1222
1223#
1224# Block modes
1225#
1226CONFIG_CRYPTO_CBC=m
1227# CONFIG_CRYPTO_CTR is not set
1228# CONFIG_CRYPTO_CTS is not set
1229# CONFIG_CRYPTO_ECB is not set
1230# CONFIG_CRYPTO_LRW is not set
1231# CONFIG_CRYPTO_PCBC is not set
1232# CONFIG_CRYPTO_XTS is not set
1233
1234#
1235# Hash modes
1236#
1237CONFIG_CRYPTO_HMAC=m
1238# CONFIG_CRYPTO_XCBC is not set
1239
1240#
1241# Digest
1242#
1243# CONFIG_CRYPTO_CRC32C is not set
1244# CONFIG_CRYPTO_MD4 is not set
1245CONFIG_CRYPTO_MD5=m
1246# CONFIG_CRYPTO_MICHAEL_MIC is not set
1247# CONFIG_CRYPTO_RMD128 is not set
1248# CONFIG_CRYPTO_RMD160 is not set
1249# CONFIG_CRYPTO_RMD256 is not set
1250# CONFIG_CRYPTO_RMD320 is not set
1251CONFIG_CRYPTO_SHA1=m
1252# CONFIG_CRYPTO_SHA256 is not set
1253# CONFIG_CRYPTO_SHA512 is not set
1254# CONFIG_CRYPTO_TGR192 is not set
1255# CONFIG_CRYPTO_WP512 is not set
1256
1257#
1258# Ciphers
1259#
1260# CONFIG_CRYPTO_AES is not set
1261# CONFIG_CRYPTO_ANUBIS is not set
1262# CONFIG_CRYPTO_ARC4 is not set
1263# CONFIG_CRYPTO_BLOWFISH is not set
1264# CONFIG_CRYPTO_CAMELLIA is not set
1265# CONFIG_CRYPTO_CAST5 is not set
1266# CONFIG_CRYPTO_CAST6 is not set
1267CONFIG_CRYPTO_DES=m
1268# CONFIG_CRYPTO_FCRYPT is not set
1269# CONFIG_CRYPTO_KHAZAD is not set
1270# CONFIG_CRYPTO_SALSA20 is not set
1271# CONFIG_CRYPTO_SEED is not set
1272# CONFIG_CRYPTO_SERPENT is not set
1273# CONFIG_CRYPTO_TEA is not set
1274# CONFIG_CRYPTO_TWOFISH is not set
1275
1276#
1277# Compression
1278#
1279CONFIG_CRYPTO_DEFLATE=y
1280CONFIG_CRYPTO_LZO=y
1281# CONFIG_CRYPTO_HW is not set
1282
1283#
1284# Library routines
1285#
1286CONFIG_BITREVERSE=y
1287# CONFIG_GENERIC_FIND_FIRST_BIT is not set
1288# CONFIG_GENERIC_FIND_NEXT_BIT is not set
1289CONFIG_CRC_CCITT=m
1290CONFIG_CRC16=y
1291CONFIG_CRC_T10DIF=m
1292CONFIG_CRC_ITU_T=m
1293CONFIG_CRC32=y
1294CONFIG_CRC7=m
1295# CONFIG_LIBCRC32C is not set
1296CONFIG_ZLIB_INFLATE=y
1297CONFIG_ZLIB_DEFLATE=y
1298CONFIG_LZO_COMPRESS=y
1299CONFIG_LZO_DECOMPRESS=y
1300CONFIG_GENERIC_ALLOCATOR=y
1301CONFIG_PLIST=y
1302CONFIG_HAS_IOMEM=y
1303CONFIG_HAS_IOPORT=y
1304CONFIG_HAS_DMA=y
diff --git a/include/asm-avr32/Kbuild b/arch/avr32/include/asm/Kbuild
index 3136628ba8d2..3136628ba8d2 100644
--- a/include/asm-avr32/Kbuild
+++ b/arch/avr32/include/asm/Kbuild
diff --git a/include/asm-avr32/a.out.h b/arch/avr32/include/asm/a.out.h
index e46375a34a72..e46375a34a72 100644
--- a/include/asm-avr32/a.out.h
+++ b/arch/avr32/include/asm/a.out.h
diff --git a/include/asm-avr32/addrspace.h b/arch/avr32/include/asm/addrspace.h
index 366794858ec7..366794858ec7 100644
--- a/include/asm-avr32/addrspace.h
+++ b/arch/avr32/include/asm/addrspace.h
diff --git a/include/asm-avr32/asm.h b/arch/avr32/include/asm/asm.h
index a2c64f404b98..a2c64f404b98 100644
--- a/include/asm-avr32/asm.h
+++ b/arch/avr32/include/asm/asm.h
diff --git a/include/asm-avr32/atmel-mci.h b/arch/avr32/include/asm/atmel-mci.h
index c2ea6e1c9aa1..c2ea6e1c9aa1 100644
--- a/include/asm-avr32/atmel-mci.h
+++ b/arch/avr32/include/asm/atmel-mci.h
diff --git a/include/asm-avr32/atomic.h b/arch/avr32/include/asm/atomic.h
index 7ef3862a73d0..7ef3862a73d0 100644
--- a/include/asm-avr32/atomic.h
+++ b/arch/avr32/include/asm/atomic.h
diff --git a/include/asm-avr32/auxvec.h b/arch/avr32/include/asm/auxvec.h
index d5dd435bf8f4..d5dd435bf8f4 100644
--- a/include/asm-avr32/auxvec.h
+++ b/arch/avr32/include/asm/auxvec.h
diff --git a/include/asm-avr32/bitops.h b/arch/avr32/include/asm/bitops.h
index 1a50b69b1a19..1a50b69b1a19 100644
--- a/include/asm-avr32/bitops.h
+++ b/arch/avr32/include/asm/bitops.h
diff --git a/include/asm-avr32/bug.h b/arch/avr32/include/asm/bug.h
index 331d45bab18f..331d45bab18f 100644
--- a/include/asm-avr32/bug.h
+++ b/arch/avr32/include/asm/bug.h
diff --git a/include/asm-avr32/bugs.h b/arch/avr32/include/asm/bugs.h
index 7635e770622e..7635e770622e 100644
--- a/include/asm-avr32/bugs.h
+++ b/arch/avr32/include/asm/bugs.h
diff --git a/include/asm-avr32/byteorder.h b/arch/avr32/include/asm/byteorder.h
index d77b48ba7338..d77b48ba7338 100644
--- a/include/asm-avr32/byteorder.h
+++ b/arch/avr32/include/asm/byteorder.h
diff --git a/include/asm-avr32/cache.h b/arch/avr32/include/asm/cache.h
index d3cf35ab11ab..d3cf35ab11ab 100644
--- a/include/asm-avr32/cache.h
+++ b/arch/avr32/include/asm/cache.h
diff --git a/include/asm-avr32/cachectl.h b/arch/avr32/include/asm/cachectl.h
index 4faf1ce60061..4faf1ce60061 100644
--- a/include/asm-avr32/cachectl.h
+++ b/arch/avr32/include/asm/cachectl.h
diff --git a/include/asm-avr32/cacheflush.h b/arch/avr32/include/asm/cacheflush.h
index 670674749b20..670674749b20 100644
--- a/include/asm-avr32/cacheflush.h
+++ b/arch/avr32/include/asm/cacheflush.h
diff --git a/include/asm-avr32/checksum.h b/arch/avr32/include/asm/checksum.h
index 4ddbfd2486af..4ddbfd2486af 100644
--- a/include/asm-avr32/checksum.h
+++ b/arch/avr32/include/asm/checksum.h
diff --git a/include/asm-avr32/cputime.h b/arch/avr32/include/asm/cputime.h
index e87e0f81cbeb..e87e0f81cbeb 100644
--- a/include/asm-avr32/cputime.h
+++ b/arch/avr32/include/asm/cputime.h
diff --git a/include/asm-avr32/current.h b/arch/avr32/include/asm/current.h
index c7b0549eab8a..c7b0549eab8a 100644
--- a/include/asm-avr32/current.h
+++ b/arch/avr32/include/asm/current.h
diff --git a/include/asm-avr32/delay.h b/arch/avr32/include/asm/delay.h
index a0ed9a9839a5..a0ed9a9839a5 100644
--- a/include/asm-avr32/delay.h
+++ b/arch/avr32/include/asm/delay.h
diff --git a/include/asm-avr32/device.h b/arch/avr32/include/asm/device.h
index d8f9872b0e2d..d8f9872b0e2d 100644
--- a/include/asm-avr32/device.h
+++ b/arch/avr32/include/asm/device.h
diff --git a/include/asm-avr32/div64.h b/arch/avr32/include/asm/div64.h
index d7ddd4fdeca6..d7ddd4fdeca6 100644
--- a/include/asm-avr32/div64.h
+++ b/arch/avr32/include/asm/div64.h
diff --git a/include/asm-avr32/dma-mapping.h b/arch/avr32/include/asm/dma-mapping.h
index 0399359ab5d8..0399359ab5d8 100644
--- a/include/asm-avr32/dma-mapping.h
+++ b/arch/avr32/include/asm/dma-mapping.h
diff --git a/include/asm-avr32/dma.h b/arch/avr32/include/asm/dma.h
index 9e91205590ac..9e91205590ac 100644
--- a/include/asm-avr32/dma.h
+++ b/arch/avr32/include/asm/dma.h
diff --git a/include/asm-avr32/elf.h b/arch/avr32/include/asm/elf.h
index 64ce40ee1d58..64ce40ee1d58 100644
--- a/include/asm-avr32/elf.h
+++ b/arch/avr32/include/asm/elf.h
diff --git a/include/asm-avr32/emergency-restart.h b/arch/avr32/include/asm/emergency-restart.h
index 3e7e014776ba..3e7e014776ba 100644
--- a/include/asm-avr32/emergency-restart.h
+++ b/arch/avr32/include/asm/emergency-restart.h
diff --git a/include/asm-avr32/errno.h b/arch/avr32/include/asm/errno.h
index 558a7249f06d..558a7249f06d 100644
--- a/include/asm-avr32/errno.h
+++ b/arch/avr32/include/asm/errno.h
diff --git a/include/asm-avr32/fb.h b/arch/avr32/include/asm/fb.h
index 41baf84ad402..41baf84ad402 100644
--- a/include/asm-avr32/fb.h
+++ b/arch/avr32/include/asm/fb.h
diff --git a/include/asm-avr32/fcntl.h b/arch/avr32/include/asm/fcntl.h
index 14c0c4402b11..14c0c4402b11 100644
--- a/include/asm-avr32/fcntl.h
+++ b/arch/avr32/include/asm/fcntl.h
diff --git a/include/asm-avr32/futex.h b/arch/avr32/include/asm/futex.h
index 10419f14a68a..10419f14a68a 100644
--- a/include/asm-avr32/futex.h
+++ b/arch/avr32/include/asm/futex.h
diff --git a/arch/avr32/include/asm/gpio.h b/arch/avr32/include/asm/gpio.h
new file mode 100644
index 000000000000..b771f7105964
--- /dev/null
+++ b/arch/avr32/include/asm/gpio.h
@@ -0,0 +1,6 @@
1#ifndef __ASM_AVR32_GPIO_H
2#define __ASM_AVR32_GPIO_H
3
4#include <mach/gpio.h>
5
6#endif /* __ASM_AVR32_GPIO_H */
diff --git a/include/asm-avr32/hardirq.h b/arch/avr32/include/asm/hardirq.h
index 267354356f60..267354356f60 100644
--- a/include/asm-avr32/hardirq.h
+++ b/arch/avr32/include/asm/hardirq.h
diff --git a/include/asm-avr32/hw_irq.h b/arch/avr32/include/asm/hw_irq.h
index 218b0a6bfd1b..218b0a6bfd1b 100644
--- a/include/asm-avr32/hw_irq.h
+++ b/arch/avr32/include/asm/hw_irq.h
diff --git a/arch/avr32/include/asm/io.h b/arch/avr32/include/asm/io.h
new file mode 100644
index 000000000000..a520f77ead96
--- /dev/null
+++ b/arch/avr32/include/asm/io.h
@@ -0,0 +1,312 @@
1#ifndef __ASM_AVR32_IO_H
2#define __ASM_AVR32_IO_H
3
4#include <linux/kernel.h>
5#include <linux/string.h>
6#include <linux/types.h>
7
8#include <asm/addrspace.h>
9#include <asm/byteorder.h>
10
11#include <mach/io.h>
12
13/* virt_to_phys will only work when address is in P1 or P2 */
14static __inline__ unsigned long virt_to_phys(volatile void *address)
15{
16 return PHYSADDR(address);
17}
18
19static __inline__ void * phys_to_virt(unsigned long address)
20{
21 return (void *)P1SEGADDR(address);
22}
23
24#define cached_to_phys(addr) ((unsigned long)PHYSADDR(addr))
25#define uncached_to_phys(addr) ((unsigned long)PHYSADDR(addr))
26#define phys_to_cached(addr) ((void *)P1SEGADDR(addr))
27#define phys_to_uncached(addr) ((void *)P2SEGADDR(addr))
28
29/*
30 * Generic IO read/write. These perform native-endian accesses. Note
31 * that some architectures will want to re-define __raw_{read,write}w.
32 */
33extern void __raw_writesb(void __iomem *addr, const void *data, int bytelen);
34extern void __raw_writesw(void __iomem *addr, const void *data, int wordlen);
35extern void __raw_writesl(void __iomem *addr, const void *data, int longlen);
36
37extern void __raw_readsb(const void __iomem *addr, void *data, int bytelen);
38extern void __raw_readsw(const void __iomem *addr, void *data, int wordlen);
39extern void __raw_readsl(const void __iomem *addr, void *data, int longlen);
40
41static inline void __raw_writeb(u8 v, volatile void __iomem *addr)
42{
43 *(volatile u8 __force *)addr = v;
44}
45static inline void __raw_writew(u16 v, volatile void __iomem *addr)
46{
47 *(volatile u16 __force *)addr = v;
48}
49static inline void __raw_writel(u32 v, volatile void __iomem *addr)
50{
51 *(volatile u32 __force *)addr = v;
52}
53
54static inline u8 __raw_readb(const volatile void __iomem *addr)
55{
56 return *(const volatile u8 __force *)addr;
57}
58static inline u16 __raw_readw(const volatile void __iomem *addr)
59{
60 return *(const volatile u16 __force *)addr;
61}
62static inline u32 __raw_readl(const volatile void __iomem *addr)
63{
64 return *(const volatile u32 __force *)addr;
65}
66
67/* Convert I/O port address to virtual address */
68#ifndef __io
69# define __io(p) ((void *)phys_to_uncached(p))
70#endif
71
72/*
73 * Not really sure about the best way to slow down I/O on
74 * AVR32. Defining it as a no-op until we have an actual test case.
75 */
76#define SLOW_DOWN_IO do { } while (0)
77
78#define __BUILD_MEMORY_SINGLE(pfx, bwl, type) \
79static inline void \
80pfx##write##bwl(type val, volatile void __iomem *addr) \
81{ \
82 volatile type *__addr; \
83 type __val; \
84 \
85 __addr = (void *)__swizzle_addr_##bwl((unsigned long)(addr)); \
86 __val = pfx##ioswab##bwl(__addr, val); \
87 \
88 BUILD_BUG_ON(sizeof(type) > sizeof(unsigned long)); \
89 \
90 *__addr = __val; \
91} \
92 \
93static inline type pfx##read##bwl(const volatile void __iomem *addr) \
94{ \
95 volatile type *__addr; \
96 type __val; \
97 \
98 __addr = (void *)__swizzle_addr_##bwl((unsigned long)(addr)); \
99 \
100 BUILD_BUG_ON(sizeof(type) > sizeof(unsigned long)); \
101 \
102 __val = *__addr; \
103 return pfx##ioswab##bwl(__addr, __val); \
104}
105
106#define __BUILD_IOPORT_SINGLE(pfx, bwl, type, p, slow) \
107static inline void pfx##out##bwl##p(type val, unsigned long port) \
108{ \
109 volatile type *__addr; \
110 type __val; \
111 \
112 __addr = __io(__swizzle_addr_##bwl(port)); \
113 __val = pfx##ioswab##bwl(__addr, val); \
114 \
115 BUILD_BUG_ON(sizeof(type) > sizeof(unsigned long)); \
116 \
117 *__addr = __val; \
118 slow; \
119} \
120 \
121static inline type pfx##in##bwl##p(unsigned long port) \
122{ \
123 volatile type *__addr; \
124 type __val; \
125 \
126 __addr = __io(__swizzle_addr_##bwl(port)); \
127 \
128 BUILD_BUG_ON(sizeof(type) > sizeof(unsigned long)); \
129 \
130 __val = *__addr; \
131 slow; \
132 \
133 return pfx##ioswab##bwl(__addr, __val); \
134}
135
136#define __BUILD_MEMORY_PFX(bus, bwl, type) \
137 __BUILD_MEMORY_SINGLE(bus, bwl, type)
138
139#define BUILDIO_MEM(bwl, type) \
140 __BUILD_MEMORY_PFX(, bwl, type) \
141 __BUILD_MEMORY_PFX(__mem_, bwl, type)
142
143#define __BUILD_IOPORT_PFX(bus, bwl, type) \
144 __BUILD_IOPORT_SINGLE(bus, bwl, type, ,) \
145 __BUILD_IOPORT_SINGLE(bus, bwl, type, _p, SLOW_DOWN_IO)
146
147#define BUILDIO_IOPORT(bwl, type) \
148 __BUILD_IOPORT_PFX(, bwl, type) \
149 __BUILD_IOPORT_PFX(__mem_, bwl, type)
150
151BUILDIO_MEM(b, u8)
152BUILDIO_MEM(w, u16)
153BUILDIO_MEM(l, u32)
154
155BUILDIO_IOPORT(b, u8)
156BUILDIO_IOPORT(w, u16)
157BUILDIO_IOPORT(l, u32)
158
159#define readb_relaxed readb
160#define readw_relaxed readw
161#define readl_relaxed readl
162
163#define __BUILD_MEMORY_STRING(bwl, type) \
164static inline void writes##bwl(volatile void __iomem *addr, \
165 const void *data, unsigned int count) \
166{ \
167 const type *__data = data; \
168 \
169 while (count--) \
170 __mem_write##bwl(*__data++, addr); \
171} \
172 \
173static inline void reads##bwl(const volatile void __iomem *addr, \
174 void *data, unsigned int count) \
175{ \
176 type *__data = data; \
177 \
178 while (count--) \
179 *__data++ = __mem_read##bwl(addr); \
180}
181
182#define __BUILD_IOPORT_STRING(bwl, type) \
183static inline void outs##bwl(unsigned long port, const void *data, \
184 unsigned int count) \
185{ \
186 const type *__data = data; \
187 \
188 while (count--) \
189 __mem_out##bwl(*__data++, port); \
190} \
191 \
192static inline void ins##bwl(unsigned long port, void *data, \
193 unsigned int count) \
194{ \
195 type *__data = data; \
196 \
197 while (count--) \
198 *__data++ = __mem_in##bwl(port); \
199}
200
201#define BUILDSTRING(bwl, type) \
202 __BUILD_MEMORY_STRING(bwl, type) \
203 __BUILD_IOPORT_STRING(bwl, type)
204
205BUILDSTRING(b, u8)
206BUILDSTRING(w, u16)
207BUILDSTRING(l, u32)
208
209/*
210 * io{read,write}{8,16,32} macros in both le (for PCI style consumers) and native be
211 */
212#ifndef ioread8
213
214#define ioread8(p) ((unsigned int)readb(p))
215
216#define ioread16(p) ((unsigned int)readw(p))
217#define ioread16be(p) ((unsigned int)__raw_readw(p))
218
219#define ioread32(p) ((unsigned int)readl(p))
220#define ioread32be(p) ((unsigned int)__raw_readl(p))
221
222#define iowrite8(v,p) writeb(v, p)
223
224#define iowrite16(v,p) writew(v, p)
225#define iowrite16be(v,p) __raw_writew(v, p)
226
227#define iowrite32(v,p) writel(v, p)
228#define iowrite32be(v,p) __raw_writel(v, p)
229
230#define ioread8_rep(p,d,c) readsb(p,d,c)
231#define ioread16_rep(p,d,c) readsw(p,d,c)
232#define ioread32_rep(p,d,c) readsl(p,d,c)
233
234#define iowrite8_rep(p,s,c) writesb(p,s,c)
235#define iowrite16_rep(p,s,c) writesw(p,s,c)
236#define iowrite32_rep(p,s,c) writesl(p,s,c)
237
238#endif
239
240static inline void memcpy_fromio(void * to, const volatile void __iomem *from,
241 unsigned long count)
242{
243 memcpy(to, (const void __force *)from, count);
244}
245
246static inline void memcpy_toio(volatile void __iomem *to, const void * from,
247 unsigned long count)
248{
249 memcpy((void __force *)to, from, count);
250}
251
252static inline void memset_io(volatile void __iomem *addr, unsigned char val,
253 unsigned long count)
254{
255 memset((void __force *)addr, val, count);
256}
257
258#define mmiowb()
259
260#define IO_SPACE_LIMIT 0xffffffff
261
262extern void __iomem *__ioremap(unsigned long offset, size_t size,
263 unsigned long flags);
264extern void __iounmap(void __iomem *addr);
265
266/*
267 * ioremap - map bus memory into CPU space
268 * @offset bus address of the memory
269 * @size size of the resource to map
270 *
271 * ioremap performs a platform specific sequence of operations to make
272 * bus memory CPU accessible via the readb/.../writel functions and
273 * the other mmio helpers. The returned address is not guaranteed to
274 * be usable directly as a virtual address.
275 */
276#define ioremap(offset, size) \
277 __ioremap((offset), (size), 0)
278
279#define ioremap_nocache(offset, size) \
280 __ioremap((offset), (size), 0)
281
282#define iounmap(addr) \
283 __iounmap(addr)
284
285#define cached(addr) P1SEGADDR(addr)
286#define uncached(addr) P2SEGADDR(addr)
287
288#define virt_to_bus virt_to_phys
289#define bus_to_virt phys_to_virt
290#define page_to_bus page_to_phys
291#define bus_to_page phys_to_page
292
293/*
294 * Create a virtual mapping cookie for an IO port range. There exists
295 * no such thing as port-based I/O on AVR32, so a regular ioremap()
296 * should do what we need.
297 */
298#define ioport_map(port, nr) ioremap(port, nr)
299#define ioport_unmap(port) iounmap(port)
300
301/*
302 * Convert a physical pointer to a virtual kernel pointer for /dev/mem
303 * access
304 */
305#define xlate_dev_mem_ptr(p) __va(p)
306
307/*
308 * Convert a virtual cached pointer to an uncached pointer
309 */
310#define xlate_dev_kmem_ptr(p) p
311
312#endif /* __ASM_AVR32_IO_H */
diff --git a/include/asm-avr32/ioctl.h b/arch/avr32/include/asm/ioctl.h
index c8472c1398ef..c8472c1398ef 100644
--- a/include/asm-avr32/ioctl.h
+++ b/arch/avr32/include/asm/ioctl.h
diff --git a/include/asm-avr32/ioctls.h b/arch/avr32/include/asm/ioctls.h
index 0cf2c0a4502b..0cf2c0a4502b 100644
--- a/include/asm-avr32/ioctls.h
+++ b/arch/avr32/include/asm/ioctls.h
diff --git a/include/asm-avr32/ipcbuf.h b/arch/avr32/include/asm/ipcbuf.h
index 1552c9698f5e..1552c9698f5e 100644
--- a/include/asm-avr32/ipcbuf.h
+++ b/arch/avr32/include/asm/ipcbuf.h
diff --git a/arch/avr32/include/asm/irq.h b/arch/avr32/include/asm/irq.h
new file mode 100644
index 000000000000..6fa8913f8548
--- /dev/null
+++ b/arch/avr32/include/asm/irq.h
@@ -0,0 +1,24 @@
1#ifndef __ASM_AVR32_IRQ_H
2#define __ASM_AVR32_IRQ_H
3
4#define NR_INTERNAL_IRQS 64
5
6#include <mach/irq.h>
7
8#ifndef NR_IRQS
9#define NR_IRQS (NR_INTERNAL_IRQS)
10#endif
11
12#define irq_canonicalize(i) (i)
13
14#ifndef __ASSEMBLER__
15int nmi_enable(void);
16void nmi_disable(void);
17
18/*
19 * Returns a bitmask of pending interrupts in a group.
20 */
21extern unsigned long intc_get_pending(unsigned int group);
22#endif
23
24#endif /* __ASM_AVR32_IOCTLS_H */
diff --git a/include/asm-avr32/irq_regs.h b/arch/avr32/include/asm/irq_regs.h
index 3dd9c0b70270..3dd9c0b70270 100644
--- a/include/asm-avr32/irq_regs.h
+++ b/arch/avr32/include/asm/irq_regs.h
diff --git a/include/asm-avr32/irqflags.h b/arch/avr32/include/asm/irqflags.h
index 93570daac38a..93570daac38a 100644
--- a/include/asm-avr32/irqflags.h
+++ b/arch/avr32/include/asm/irqflags.h
diff --git a/include/asm-avr32/kdebug.h b/arch/avr32/include/asm/kdebug.h
index ca4f9542365a..ca4f9542365a 100644
--- a/include/asm-avr32/kdebug.h
+++ b/arch/avr32/include/asm/kdebug.h
diff --git a/include/asm-avr32/kmap_types.h b/arch/avr32/include/asm/kmap_types.h
index b7f5c6870107..b7f5c6870107 100644
--- a/include/asm-avr32/kmap_types.h
+++ b/arch/avr32/include/asm/kmap_types.h
diff --git a/include/asm-avr32/kprobes.h b/arch/avr32/include/asm/kprobes.h
index 996cb656474e..996cb656474e 100644
--- a/include/asm-avr32/kprobes.h
+++ b/arch/avr32/include/asm/kprobes.h
diff --git a/include/asm-avr32/linkage.h b/arch/avr32/include/asm/linkage.h
index f7b285e910d4..f7b285e910d4 100644
--- a/include/asm-avr32/linkage.h
+++ b/arch/avr32/include/asm/linkage.h
diff --git a/include/asm-avr32/local.h b/arch/avr32/include/asm/local.h
index 1c1619694da3..1c1619694da3 100644
--- a/include/asm-avr32/local.h
+++ b/arch/avr32/include/asm/local.h
diff --git a/include/asm-avr32/mach/serial_at91.h b/arch/avr32/include/asm/mach/serial_at91.h
index 55b317a89061..55b317a89061 100644
--- a/include/asm-avr32/mach/serial_at91.h
+++ b/arch/avr32/include/asm/mach/serial_at91.h
diff --git a/include/asm-avr32/mman.h b/arch/avr32/include/asm/mman.h
index 648f91e7187a..648f91e7187a 100644
--- a/include/asm-avr32/mman.h
+++ b/arch/avr32/include/asm/mman.h
diff --git a/include/asm-avr32/mmu.h b/arch/avr32/include/asm/mmu.h
index 60c2d2650d32..60c2d2650d32 100644
--- a/include/asm-avr32/mmu.h
+++ b/arch/avr32/include/asm/mmu.h
diff --git a/include/asm-avr32/mmu_context.h b/arch/avr32/include/asm/mmu_context.h
index 27ff23407100..27ff23407100 100644
--- a/include/asm-avr32/mmu_context.h
+++ b/arch/avr32/include/asm/mmu_context.h
diff --git a/include/asm-avr32/module.h b/arch/avr32/include/asm/module.h
index 451444538a1b..451444538a1b 100644
--- a/include/asm-avr32/module.h
+++ b/arch/avr32/include/asm/module.h
diff --git a/include/asm-avr32/msgbuf.h b/arch/avr32/include/asm/msgbuf.h
index ac18bc4da7f7..ac18bc4da7f7 100644
--- a/include/asm-avr32/msgbuf.h
+++ b/arch/avr32/include/asm/msgbuf.h
diff --git a/include/asm-avr32/mutex.h b/arch/avr32/include/asm/mutex.h
index 458c1f7fbc18..458c1f7fbc18 100644
--- a/include/asm-avr32/mutex.h
+++ b/arch/avr32/include/asm/mutex.h
diff --git a/include/asm-avr32/numnodes.h b/arch/avr32/include/asm/numnodes.h
index 0b864d7ce330..0b864d7ce330 100644
--- a/include/asm-avr32/numnodes.h
+++ b/arch/avr32/include/asm/numnodes.h
diff --git a/include/asm-avr32/ocd.h b/arch/avr32/include/asm/ocd.h
index 6bef09490235..6bef09490235 100644
--- a/include/asm-avr32/ocd.h
+++ b/arch/avr32/include/asm/ocd.h
diff --git a/include/asm-avr32/page.h b/arch/avr32/include/asm/page.h
index f805d1cb11bc..f805d1cb11bc 100644
--- a/include/asm-avr32/page.h
+++ b/arch/avr32/include/asm/page.h
diff --git a/include/asm-avr32/param.h b/arch/avr32/include/asm/param.h
index 34bc8d4c3b29..34bc8d4c3b29 100644
--- a/include/asm-avr32/param.h
+++ b/arch/avr32/include/asm/param.h
diff --git a/include/asm-avr32/pci.h b/arch/avr32/include/asm/pci.h
index a32a02372017..a32a02372017 100644
--- a/include/asm-avr32/pci.h
+++ b/arch/avr32/include/asm/pci.h
diff --git a/include/asm-avr32/percpu.h b/arch/avr32/include/asm/percpu.h
index 69227b4cd0d4..69227b4cd0d4 100644
--- a/include/asm-avr32/percpu.h
+++ b/arch/avr32/include/asm/percpu.h
diff --git a/include/asm-avr32/pgalloc.h b/arch/avr32/include/asm/pgalloc.h
index 640821323943..640821323943 100644
--- a/include/asm-avr32/pgalloc.h
+++ b/arch/avr32/include/asm/pgalloc.h
diff --git a/include/asm-avr32/pgtable-2level.h b/arch/avr32/include/asm/pgtable-2level.h
index 425dd567b5b9..425dd567b5b9 100644
--- a/include/asm-avr32/pgtable-2level.h
+++ b/arch/avr32/include/asm/pgtable-2level.h
diff --git a/include/asm-avr32/pgtable.h b/arch/avr32/include/asm/pgtable.h
index fecdda16f444..fecdda16f444 100644
--- a/include/asm-avr32/pgtable.h
+++ b/arch/avr32/include/asm/pgtable.h
diff --git a/include/asm-avr32/poll.h b/arch/avr32/include/asm/poll.h
index c98509d3149e..c98509d3149e 100644
--- a/include/asm-avr32/poll.h
+++ b/arch/avr32/include/asm/poll.h
diff --git a/include/asm-avr32/posix_types.h b/arch/avr32/include/asm/posix_types.h
index fe0c0c014389..fe0c0c014389 100644
--- a/include/asm-avr32/posix_types.h
+++ b/arch/avr32/include/asm/posix_types.h
diff --git a/include/asm-avr32/processor.h b/arch/avr32/include/asm/processor.h
index 49a88f5a9d2f..49a88f5a9d2f 100644
--- a/include/asm-avr32/processor.h
+++ b/arch/avr32/include/asm/processor.h
diff --git a/include/asm-avr32/ptrace.h b/arch/avr32/include/asm/ptrace.h
index 9e2d44f4e0fe..9e2d44f4e0fe 100644
--- a/include/asm-avr32/ptrace.h
+++ b/arch/avr32/include/asm/ptrace.h
diff --git a/include/asm-avr32/resource.h b/arch/avr32/include/asm/resource.h
index c6dd101472b1..c6dd101472b1 100644
--- a/include/asm-avr32/resource.h
+++ b/arch/avr32/include/asm/resource.h
diff --git a/include/asm-avr32/scatterlist.h b/arch/avr32/include/asm/scatterlist.h
index 377320e3bd17..377320e3bd17 100644
--- a/include/asm-avr32/scatterlist.h
+++ b/arch/avr32/include/asm/scatterlist.h
diff --git a/include/asm-avr32/sections.h b/arch/avr32/include/asm/sections.h
index aa14252e4181..aa14252e4181 100644
--- a/include/asm-avr32/sections.h
+++ b/arch/avr32/include/asm/sections.h
diff --git a/include/asm-avr32/sembuf.h b/arch/avr32/include/asm/sembuf.h
index e472216e0c97..e472216e0c97 100644
--- a/include/asm-avr32/sembuf.h
+++ b/arch/avr32/include/asm/sembuf.h
diff --git a/include/asm-avr32/serial.h b/arch/avr32/include/asm/serial.h
index 5ecaebc22b02..5ecaebc22b02 100644
--- a/include/asm-avr32/serial.h
+++ b/arch/avr32/include/asm/serial.h
diff --git a/include/asm-avr32/setup.h b/arch/avr32/include/asm/setup.h
index ff5b7cf6be4d..ff5b7cf6be4d 100644
--- a/include/asm-avr32/setup.h
+++ b/arch/avr32/include/asm/setup.h
diff --git a/include/asm-avr32/shmbuf.h b/arch/avr32/include/asm/shmbuf.h
index c62fba41739a..c62fba41739a 100644
--- a/include/asm-avr32/shmbuf.h
+++ b/arch/avr32/include/asm/shmbuf.h
diff --git a/include/asm-avr32/shmparam.h b/arch/avr32/include/asm/shmparam.h
index 3681266c77f7..3681266c77f7 100644
--- a/include/asm-avr32/shmparam.h
+++ b/arch/avr32/include/asm/shmparam.h
diff --git a/include/asm-avr32/sigcontext.h b/arch/avr32/include/asm/sigcontext.h
index e04062b5f39f..e04062b5f39f 100644
--- a/include/asm-avr32/sigcontext.h
+++ b/arch/avr32/include/asm/sigcontext.h
diff --git a/include/asm-avr32/siginfo.h b/arch/avr32/include/asm/siginfo.h
index 5ee93f40a8a8..5ee93f40a8a8 100644
--- a/include/asm-avr32/siginfo.h
+++ b/arch/avr32/include/asm/siginfo.h
diff --git a/include/asm-avr32/signal.h b/arch/avr32/include/asm/signal.h
index caffefeeba1f..caffefeeba1f 100644
--- a/include/asm-avr32/signal.h
+++ b/arch/avr32/include/asm/signal.h
diff --git a/include/asm-avr32/socket.h b/arch/avr32/include/asm/socket.h
index 35863f260929..35863f260929 100644
--- a/include/asm-avr32/socket.h
+++ b/arch/avr32/include/asm/socket.h
diff --git a/include/asm-avr32/sockios.h b/arch/avr32/include/asm/sockios.h
index 0802d742f97d..0802d742f97d 100644
--- a/include/asm-avr32/sockios.h
+++ b/arch/avr32/include/asm/sockios.h
diff --git a/include/asm-avr32/stat.h b/arch/avr32/include/asm/stat.h
index e72881e10230..e72881e10230 100644
--- a/include/asm-avr32/stat.h
+++ b/arch/avr32/include/asm/stat.h
diff --git a/include/asm-avr32/statfs.h b/arch/avr32/include/asm/statfs.h
index 2961bd18c50e..2961bd18c50e 100644
--- a/include/asm-avr32/statfs.h
+++ b/arch/avr32/include/asm/statfs.h
diff --git a/include/asm-avr32/string.h b/arch/avr32/include/asm/string.h
index c91a623cd585..c91a623cd585 100644
--- a/include/asm-avr32/string.h
+++ b/arch/avr32/include/asm/string.h
diff --git a/include/asm-avr32/sysreg.h b/arch/avr32/include/asm/sysreg.h
index d4e0950170ca..d4e0950170ca 100644
--- a/include/asm-avr32/sysreg.h
+++ b/arch/avr32/include/asm/sysreg.h
diff --git a/include/asm-avr32/system.h b/arch/avr32/include/asm/system.h
index 9702c2213e1e..9702c2213e1e 100644
--- a/include/asm-avr32/system.h
+++ b/arch/avr32/include/asm/system.h
diff --git a/include/asm-avr32/termbits.h b/arch/avr32/include/asm/termbits.h
index db2daab31fdb..db2daab31fdb 100644
--- a/include/asm-avr32/termbits.h
+++ b/arch/avr32/include/asm/termbits.h
diff --git a/include/asm-avr32/termios.h b/arch/avr32/include/asm/termios.h
index 0152aba35154..0152aba35154 100644
--- a/include/asm-avr32/termios.h
+++ b/arch/avr32/include/asm/termios.h
diff --git a/include/asm-avr32/thread_info.h b/arch/avr32/include/asm/thread_info.h
index 294b25f9323d..294b25f9323d 100644
--- a/include/asm-avr32/thread_info.h
+++ b/arch/avr32/include/asm/thread_info.h
diff --git a/include/asm-avr32/timex.h b/arch/avr32/include/asm/timex.h
index 187dcf38b210..187dcf38b210 100644
--- a/include/asm-avr32/timex.h
+++ b/arch/avr32/include/asm/timex.h
diff --git a/include/asm-avr32/tlb.h b/arch/avr32/include/asm/tlb.h
index 5c55f9ce7c7d..5c55f9ce7c7d 100644
--- a/include/asm-avr32/tlb.h
+++ b/arch/avr32/include/asm/tlb.h
diff --git a/include/asm-avr32/tlbflush.h b/arch/avr32/include/asm/tlbflush.h
index bf90a786f6be..bf90a786f6be 100644
--- a/include/asm-avr32/tlbflush.h
+++ b/arch/avr32/include/asm/tlbflush.h
diff --git a/include/asm-avr32/topology.h b/arch/avr32/include/asm/topology.h
index 5b766cbb4806..5b766cbb4806 100644
--- a/include/asm-avr32/topology.h
+++ b/arch/avr32/include/asm/topology.h
diff --git a/include/asm-avr32/traps.h b/arch/avr32/include/asm/traps.h
index 6a8fb944f414..6a8fb944f414 100644
--- a/include/asm-avr32/traps.h
+++ b/arch/avr32/include/asm/traps.h
diff --git a/include/asm-avr32/types.h b/arch/avr32/include/asm/types.h
index 9cefda6f534a..9cefda6f534a 100644
--- a/include/asm-avr32/types.h
+++ b/arch/avr32/include/asm/types.h
diff --git a/include/asm-avr32/uaccess.h b/arch/avr32/include/asm/uaccess.h
index ed092395215e..ed092395215e 100644
--- a/include/asm-avr32/uaccess.h
+++ b/arch/avr32/include/asm/uaccess.h
diff --git a/include/asm-avr32/ucontext.h b/arch/avr32/include/asm/ucontext.h
index ac7259c2a799..ac7259c2a799 100644
--- a/include/asm-avr32/ucontext.h
+++ b/arch/avr32/include/asm/ucontext.h
diff --git a/include/asm-avr32/unaligned.h b/arch/avr32/include/asm/unaligned.h
index 041877290470..041877290470 100644
--- a/include/asm-avr32/unaligned.h
+++ b/arch/avr32/include/asm/unaligned.h
diff --git a/include/asm-avr32/unistd.h b/arch/avr32/include/asm/unistd.h
index 89861a27543e..89861a27543e 100644
--- a/include/asm-avr32/unistd.h
+++ b/arch/avr32/include/asm/unistd.h
diff --git a/include/asm-avr32/user.h b/arch/avr32/include/asm/user.h
index 7e9152f81f5e..7e9152f81f5e 100644
--- a/include/asm-avr32/user.h
+++ b/arch/avr32/include/asm/user.h
diff --git a/include/asm-avr32/xor.h b/arch/avr32/include/asm/xor.h
index 99c87aa0af4f..99c87aa0af4f 100644
--- a/include/asm-avr32/xor.h
+++ b/arch/avr32/include/asm/xor.h
diff --git a/arch/avr32/kernel/process.c b/arch/avr32/kernel/process.c
index ff820a9e743a..2c08ac992ac3 100644
--- a/arch/avr32/kernel/process.c
+++ b/arch/avr32/kernel/process.c
@@ -18,7 +18,7 @@
18#include <asm/sysreg.h> 18#include <asm/sysreg.h>
19#include <asm/ocd.h> 19#include <asm/ocd.h>
20 20
21#include <asm/arch/pm.h> 21#include <mach/pm.h>
22 22
23void (*pm_power_off)(void) = NULL; 23void (*pm_power_off)(void) = NULL;
24EXPORT_SYMBOL(pm_power_off); 24EXPORT_SYMBOL(pm_power_off);
diff --git a/arch/avr32/kernel/setup.c b/arch/avr32/kernel/setup.c
index ce48c14f4349..d8e623c426c1 100644
--- a/arch/avr32/kernel/setup.c
+++ b/arch/avr32/kernel/setup.c
@@ -26,8 +26,8 @@
26#include <asm/setup.h> 26#include <asm/setup.h>
27#include <asm/sysreg.h> 27#include <asm/sysreg.h>
28 28
29#include <asm/arch/board.h> 29#include <mach/board.h>
30#include <asm/arch/init.h> 30#include <mach/init.h>
31 31
32extern int root_mountflags; 32extern int root_mountflags;
33 33
diff --git a/arch/avr32/kernel/time.c b/arch/avr32/kernel/time.c
index 7e7f32771ae1..283481d74a5b 100644
--- a/arch/avr32/kernel/time.c
+++ b/arch/avr32/kernel/time.c
@@ -15,7 +15,7 @@
15 15
16#include <asm/sysreg.h> 16#include <asm/sysreg.h>
17 17
18#include <asm/arch/pm.h> 18#include <mach/pm.h>
19 19
20 20
21static cycle_t read_cycle_count(void) 21static cycle_t read_cycle_count(void)
diff --git a/arch/avr32/mach-at32ap/Makefile b/arch/avr32/mach-at32ap/Makefile
index d5018e2eed25..514c9a9b009a 100644
--- a/arch/avr32/mach-at32ap/Makefile
+++ b/arch/avr32/mach-at32ap/Makefile
@@ -1,4 +1,5 @@
1obj-y += pdc.o clock.o intc.o extint.o pio.o hsmc.o 1obj-y += pdc.o clock.o intc.o extint.o pio.o hsmc.o
2obj-y += hmatrix.o
2obj-$(CONFIG_CPU_AT32AP700X) += at32ap700x.o pm-at32ap700x.o 3obj-$(CONFIG_CPU_AT32AP700X) += at32ap700x.o pm-at32ap700x.o
3obj-$(CONFIG_CPU_FREQ_AT32AP) += cpufreq.o 4obj-$(CONFIG_CPU_FREQ_AT32AP) += cpufreq.o
4obj-$(CONFIG_PM) += pm.o 5obj-$(CONFIG_PM) += pm.o
diff --git a/arch/avr32/mach-at32ap/at32ap700x.c b/arch/avr32/mach-at32ap/at32ap700x.c
index 1617048c86c5..e01dbe4ebb40 100644
--- a/arch/avr32/mach-at32ap/at32ap700x.c
+++ b/arch/avr32/mach-at32ap/at32ap700x.c
@@ -20,15 +20,15 @@
20#include <asm/io.h> 20#include <asm/io.h>
21#include <asm/irq.h> 21#include <asm/irq.h>
22 22
23#include <asm/arch/at32ap700x.h> 23#include <mach/at32ap700x.h>
24#include <asm/arch/board.h> 24#include <mach/board.h>
25#include <asm/arch/portmux.h> 25#include <mach/hmatrix.h>
26#include <asm/arch/sram.h> 26#include <mach/portmux.h>
27#include <mach/sram.h>
27 28
28#include <video/atmel_lcdc.h> 29#include <video/atmel_lcdc.h>
29 30
30#include "clock.h" 31#include "clock.h"
31#include "hmatrix.h"
32#include "pio.h" 32#include "pio.h"
33#include "pm.h" 33#include "pm.h"
34 34
@@ -725,7 +725,7 @@ static struct clk pico_clk = {
725 * HMATRIX 725 * HMATRIX
726 * -------------------------------------------------------------------- */ 726 * -------------------------------------------------------------------- */
727 727
728static struct clk hmatrix_clk = { 728struct clk at32_hmatrix_clk = {
729 .name = "hmatrix_clk", 729 .name = "hmatrix_clk",
730 .parent = &pbb_clk, 730 .parent = &pbb_clk,
731 .mode = pbb_clk_mode, 731 .mode = pbb_clk_mode,
@@ -733,12 +733,6 @@ static struct clk hmatrix_clk = {
733 .index = 2, 733 .index = 2,
734 .users = 1, 734 .users = 1,
735}; 735};
736#define HMATRIX_BASE ((void __iomem *)0xfff00800)
737
738#define hmatrix_readl(reg) \
739 __raw_readl((HMATRIX_BASE) + HMATRIX_##reg)
740#define hmatrix_writel(reg,value) \
741 __raw_writel((value), (HMATRIX_BASE) + HMATRIX_##reg)
742 736
743/* 737/*
744 * Set bits in the HMATRIX Special Function Register (SFR) used by the 738 * Set bits in the HMATRIX Special Function Register (SFR) used by the
@@ -748,13 +742,7 @@ static struct clk hmatrix_clk = {
748 */ 742 */
749static inline void set_ebi_sfr_bits(u32 mask) 743static inline void set_ebi_sfr_bits(u32 mask)
750{ 744{
751 u32 sfr; 745 hmatrix_sfr_set_bits(HMATRIX_SLAVE_EBI, mask);
752
753 clk_enable(&hmatrix_clk);
754 sfr = hmatrix_readl(SFR4);
755 sfr |= mask;
756 hmatrix_writel(SFR4, sfr);
757 clk_disable(&hmatrix_clk);
758} 746}
759 747
760/* -------------------------------------------------------------------- 748/* --------------------------------------------------------------------
@@ -1779,7 +1767,7 @@ static int __init at32_init_ide_or_cf(struct platform_device *pdev,
1779 return ret; 1767 return ret;
1780 1768
1781 select_peripheral(PE(21), PERIPH_A, 0); /* NCS4 -> OE_N */ 1769 select_peripheral(PE(21), PERIPH_A, 0); /* NCS4 -> OE_N */
1782 set_ebi_sfr_bits(HMATRIX_BIT(CS4A)); 1770 hmatrix_sfr_set_bits(HMATRIX_SLAVE_EBI, HMATRIX_EBI_CF0_ENABLE);
1783 break; 1771 break;
1784 case 5: 1772 case 5:
1785 ret = platform_device_add_resources(pdev, 1773 ret = platform_device_add_resources(pdev,
@@ -1789,7 +1777,7 @@ static int __init at32_init_ide_or_cf(struct platform_device *pdev,
1789 return ret; 1777 return ret;
1790 1778
1791 select_peripheral(PE(22), PERIPH_A, 0); /* NCS5 -> OE_N */ 1779 select_peripheral(PE(22), PERIPH_A, 0); /* NCS5 -> OE_N */
1792 set_ebi_sfr_bits(HMATRIX_BIT(CS5A)); 1780 hmatrix_sfr_set_bits(HMATRIX_SLAVE_EBI, HMATRIX_EBI_CF1_ENABLE);
1793 break; 1781 break;
1794 default: 1782 default:
1795 return -EINVAL; 1783 return -EINVAL;
@@ -1905,7 +1893,7 @@ at32_add_device_nand(unsigned int id, struct atmel_nand_data *data)
1905 sizeof(struct atmel_nand_data))) 1893 sizeof(struct atmel_nand_data)))
1906 goto fail; 1894 goto fail;
1907 1895
1908 set_ebi_sfr_bits(HMATRIX_BIT(CS3A)); 1896 hmatrix_sfr_set_bits(HMATRIX_SLAVE_EBI, HMATRIX_EBI_NAND_ENABLE);
1909 if (data->enable_pin) 1897 if (data->enable_pin)
1910 at32_select_gpio(data->enable_pin, 1898 at32_select_gpio(data->enable_pin,
1911 AT32_GPIOF_OUTPUT | AT32_GPIOF_HIGH); 1899 AT32_GPIOF_OUTPUT | AT32_GPIOF_HIGH);
@@ -2097,7 +2085,7 @@ struct clk *at32_clock_list[] = {
2097 &pbb_clk, 2085 &pbb_clk,
2098 &at32_pm_pclk, 2086 &at32_pm_pclk,
2099 &at32_intc0_pclk, 2087 &at32_intc0_pclk,
2100 &hmatrix_clk, 2088 &at32_hmatrix_clk,
2101 &ebi_clk, 2089 &ebi_clk,
2102 &hramc_clk, 2090 &hramc_clk,
2103 &sdramc_clk, 2091 &sdramc_clk,
diff --git a/arch/avr32/mach-at32ap/clock.c b/arch/avr32/mach-at32ap/clock.c
index 4642117cc9ab..6c27ddac5adf 100644
--- a/arch/avr32/mach-at32ap/clock.c
+++ b/arch/avr32/mach-at32ap/clock.c
@@ -16,6 +16,8 @@
16#include <linux/device.h> 16#include <linux/device.h>
17#include <linux/string.h> 17#include <linux/string.h>
18 18
19#include <mach/chip.h>
20
19#include "clock.h" 21#include "clock.h"
20 22
21static DEFINE_SPINLOCK(clk_lock); 23static DEFINE_SPINLOCK(clk_lock);
diff --git a/arch/avr32/mach-at32ap/hmatrix.c b/arch/avr32/mach-at32ap/hmatrix.c
new file mode 100644
index 000000000000..48f5ede77468
--- /dev/null
+++ b/arch/avr32/mach-at32ap/hmatrix.c
@@ -0,0 +1,88 @@
1/*
2 * High-Speed Bus Matrix helper functions
3 *
4 * Copyright (C) 2008 Atmel Corporation
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10#include <linux/clk.h>
11#include <linux/io.h>
12
13#include <mach/chip.h>
14#include <mach/hmatrix.h>
15
16static inline void __hmatrix_write_reg(unsigned long offset, u32 value)
17{
18 __raw_writel(value, (void __iomem __force *)(HMATRIX_BASE + offset));
19}
20
21static inline u32 __hmatrix_read_reg(unsigned long offset)
22{
23 return __raw_readl((void __iomem __force *)(HMATRIX_BASE + offset));
24}
25
26/**
27 * hmatrix_write_reg - write HMATRIX configuration register
28 * @offset: register offset
29 * @value: value to be written to the register at @offset
30 */
31void hmatrix_write_reg(unsigned long offset, u32 value)
32{
33 clk_enable(&at32_hmatrix_clk);
34 __hmatrix_write_reg(offset, value);
35 __hmatrix_read_reg(offset);
36 clk_disable(&at32_hmatrix_clk);
37}
38
39/**
40 * hmatrix_read_reg - read HMATRIX configuration register
41 * @offset: register offset
42 *
43 * Returns the value of the register at @offset.
44 */
45u32 hmatrix_read_reg(unsigned long offset)
46{
47 u32 value;
48
49 clk_enable(&at32_hmatrix_clk);
50 value = __hmatrix_read_reg(offset);
51 clk_disable(&at32_hmatrix_clk);
52
53 return value;
54}
55
56/**
57 * hmatrix_sfr_set_bits - set bits in a slave's Special Function Register
58 * @slave_id: operate on the SFR belonging to this slave
59 * @mask: mask of bits to be set in the SFR
60 */
61void hmatrix_sfr_set_bits(unsigned int slave_id, u32 mask)
62{
63 u32 value;
64
65 clk_enable(&at32_hmatrix_clk);
66 value = __hmatrix_read_reg(HMATRIX_SFR(slave_id));
67 value |= mask;
68 __hmatrix_write_reg(HMATRIX_SFR(slave_id), value);
69 __hmatrix_read_reg(HMATRIX_SFR(slave_id));
70 clk_disable(&at32_hmatrix_clk);
71}
72
73/**
74 * hmatrix_sfr_set_bits - clear bits in a slave's Special Function Register
75 * @slave_id: operate on the SFR belonging to this slave
76 * @mask: mask of bits to be cleared in the SFR
77 */
78void hmatrix_sfr_clear_bits(unsigned int slave_id, u32 mask)
79{
80 u32 value;
81
82 clk_enable(&at32_hmatrix_clk);
83 value = __hmatrix_read_reg(HMATRIX_SFR(slave_id));
84 value &= ~mask;
85 __hmatrix_write_reg(HMATRIX_SFR(slave_id), value);
86 __hmatrix_read_reg(HMATRIX_SFR(slave_id));
87 clk_disable(&at32_hmatrix_clk);
88}
diff --git a/arch/avr32/mach-at32ap/hmatrix.h b/arch/avr32/mach-at32ap/hmatrix.h
deleted file mode 100644
index d10bfb60d68d..000000000000
--- a/arch/avr32/mach-at32ap/hmatrix.h
+++ /dev/null
@@ -1,182 +0,0 @@
1/*
2 * Register definitions for High-Speed Bus Matrix
3 */
4#ifndef __HMATRIX_H
5#define __HMATRIX_H
6
7/* HMATRIX register offsets */
8#define HMATRIX_MCFG0 0x0000
9#define HMATRIX_MCFG1 0x0004
10#define HMATRIX_MCFG2 0x0008
11#define HMATRIX_MCFG3 0x000c
12#define HMATRIX_MCFG4 0x0010
13#define HMATRIX_MCFG5 0x0014
14#define HMATRIX_MCFG6 0x0018
15#define HMATRIX_MCFG7 0x001c
16#define HMATRIX_MCFG8 0x0020
17#define HMATRIX_MCFG9 0x0024
18#define HMATRIX_MCFG10 0x0028
19#define HMATRIX_MCFG11 0x002c
20#define HMATRIX_MCFG12 0x0030
21#define HMATRIX_MCFG13 0x0034
22#define HMATRIX_MCFG14 0x0038
23#define HMATRIX_MCFG15 0x003c
24#define HMATRIX_SCFG0 0x0040
25#define HMATRIX_SCFG1 0x0044
26#define HMATRIX_SCFG2 0x0048
27#define HMATRIX_SCFG3 0x004c
28#define HMATRIX_SCFG4 0x0050
29#define HMATRIX_SCFG5 0x0054
30#define HMATRIX_SCFG6 0x0058
31#define HMATRIX_SCFG7 0x005c
32#define HMATRIX_SCFG8 0x0060
33#define HMATRIX_SCFG9 0x0064
34#define HMATRIX_SCFG10 0x0068
35#define HMATRIX_SCFG11 0x006c
36#define HMATRIX_SCFG12 0x0070
37#define HMATRIX_SCFG13 0x0074
38#define HMATRIX_SCFG14 0x0078
39#define HMATRIX_SCFG15 0x007c
40#define HMATRIX_PRAS0 0x0080
41#define HMATRIX_PRBS0 0x0084
42#define HMATRIX_PRAS1 0x0088
43#define HMATRIX_PRBS1 0x008c
44#define HMATRIX_PRAS2 0x0090
45#define HMATRIX_PRBS2 0x0094
46#define HMATRIX_PRAS3 0x0098
47#define HMATRIX_PRBS3 0x009c
48#define HMATRIX_PRAS4 0x00a0
49#define HMATRIX_PRBS4 0x00a4
50#define HMATRIX_PRAS5 0x00a8
51#define HMATRIX_PRBS5 0x00ac
52#define HMATRIX_PRAS6 0x00b0
53#define HMATRIX_PRBS6 0x00b4
54#define HMATRIX_PRAS7 0x00b8
55#define HMATRIX_PRBS7 0x00bc
56#define HMATRIX_PRAS8 0x00c0
57#define HMATRIX_PRBS8 0x00c4
58#define HMATRIX_PRAS9 0x00c8
59#define HMATRIX_PRBS9 0x00cc
60#define HMATRIX_PRAS10 0x00d0
61#define HMATRIX_PRBS10 0x00d4
62#define HMATRIX_PRAS11 0x00d8
63#define HMATRIX_PRBS11 0x00dc
64#define HMATRIX_PRAS12 0x00e0
65#define HMATRIX_PRBS12 0x00e4
66#define HMATRIX_PRAS13 0x00e8
67#define HMATRIX_PRBS13 0x00ec
68#define HMATRIX_PRAS14 0x00f0
69#define HMATRIX_PRBS14 0x00f4
70#define HMATRIX_PRAS15 0x00f8
71#define HMATRIX_PRBS15 0x00fc
72#define HMATRIX_MRCR 0x0100
73#define HMATRIX_SFR0 0x0110
74#define HMATRIX_SFR1 0x0114
75#define HMATRIX_SFR2 0x0118
76#define HMATRIX_SFR3 0x011c
77#define HMATRIX_SFR4 0x0120
78#define HMATRIX_SFR5 0x0124
79#define HMATRIX_SFR6 0x0128
80#define HMATRIX_SFR7 0x012c
81#define HMATRIX_SFR8 0x0130
82#define HMATRIX_SFR9 0x0134
83#define HMATRIX_SFR10 0x0138
84#define HMATRIX_SFR11 0x013c
85#define HMATRIX_SFR12 0x0140
86#define HMATRIX_SFR13 0x0144
87#define HMATRIX_SFR14 0x0148
88#define HMATRIX_SFR15 0x014c
89
90/* Bitfields in MCFGx */
91#define HMATRIX_ULBT_OFFSET 0
92#define HMATRIX_ULBT_SIZE 3
93
94/* Bitfields in SCFGx */
95#define HMATRIX_SLOT_CYCLE_OFFSET 0
96#define HMATRIX_SLOT_CYCLE_SIZE 8
97#define HMATRIX_DEFMSTR_TYPE_OFFSET 16
98#define HMATRIX_DEFMSTR_TYPE_SIZE 2
99#define HMATRIX_FIXED_DEFMSTR_OFFSET 18
100#define HMATRIX_FIXED_DEFMSTR_SIZE 4
101#define HMATRIX_ARBT_OFFSET 24
102#define HMATRIX_ARBT_SIZE 2
103
104/* Bitfields in PRASx */
105#define HMATRIX_M0PR_OFFSET 0
106#define HMATRIX_M0PR_SIZE 4
107#define HMATRIX_M1PR_OFFSET 4
108#define HMATRIX_M1PR_SIZE 4
109#define HMATRIX_M2PR_OFFSET 8
110#define HMATRIX_M2PR_SIZE 4
111#define HMATRIX_M3PR_OFFSET 12
112#define HMATRIX_M3PR_SIZE 4
113#define HMATRIX_M4PR_OFFSET 16
114#define HMATRIX_M4PR_SIZE 4
115#define HMATRIX_M5PR_OFFSET 20
116#define HMATRIX_M5PR_SIZE 4
117#define HMATRIX_M6PR_OFFSET 24
118#define HMATRIX_M6PR_SIZE 4
119#define HMATRIX_M7PR_OFFSET 28
120#define HMATRIX_M7PR_SIZE 4
121
122/* Bitfields in PRBSx */
123#define HMATRIX_M8PR_OFFSET 0
124#define HMATRIX_M8PR_SIZE 4
125#define HMATRIX_M9PR_OFFSET 4
126#define HMATRIX_M9PR_SIZE 4
127#define HMATRIX_M10PR_OFFSET 8
128#define HMATRIX_M10PR_SIZE 4
129#define HMATRIX_M11PR_OFFSET 12
130#define HMATRIX_M11PR_SIZE 4
131#define HMATRIX_M12PR_OFFSET 16
132#define HMATRIX_M12PR_SIZE 4
133#define HMATRIX_M13PR_OFFSET 20
134#define HMATRIX_M13PR_SIZE 4
135#define HMATRIX_M14PR_OFFSET 24
136#define HMATRIX_M14PR_SIZE 4
137#define HMATRIX_M15PR_OFFSET 28
138#define HMATRIX_M15PR_SIZE 4
139
140/* Bitfields in SFR4 */
141#define HMATRIX_CS1A_OFFSET 1
142#define HMATRIX_CS1A_SIZE 1
143#define HMATRIX_CS3A_OFFSET 3
144#define HMATRIX_CS3A_SIZE 1
145#define HMATRIX_CS4A_OFFSET 4
146#define HMATRIX_CS4A_SIZE 1
147#define HMATRIX_CS5A_OFFSET 5
148#define HMATRIX_CS5A_SIZE 1
149#define HMATRIX_DBPUC_OFFSET 8
150#define HMATRIX_DBPUC_SIZE 1
151
152/* Constants for ULBT */
153#define HMATRIX_ULBT_INFINITE 0
154#define HMATRIX_ULBT_SINGLE 1
155#define HMATRIX_ULBT_FOUR_BEAT 2
156#define HMATRIX_ULBT_EIGHT_BEAT 3
157#define HMATRIX_ULBT_SIXTEEN_BEAT 4
158
159/* Constants for DEFMSTR_TYPE */
160#define HMATRIX_DEFMSTR_TYPE_NO_DEFAULT 0
161#define HMATRIX_DEFMSTR_TYPE_LAST_DEFAULT 1
162#define HMATRIX_DEFMSTR_TYPE_FIXED_DEFAULT 2
163
164/* Constants for ARBT */
165#define HMATRIX_ARBT_ROUND_ROBIN 0
166#define HMATRIX_ARBT_FIXED_PRIORITY 1
167
168/* Bit manipulation macros */
169#define HMATRIX_BIT(name) \
170 (1 << HMATRIX_##name##_OFFSET)
171#define HMATRIX_BF(name,value) \
172 (((value) & ((1 << HMATRIX_##name##_SIZE) - 1)) \
173 << HMATRIX_##name##_OFFSET)
174#define HMATRIX_BFEXT(name,value) \
175 (((value) >> HMATRIX_##name##_OFFSET) \
176 & ((1 << HMATRIX_##name##_SIZE) - 1))
177#define HMATRIX_BFINS(name,value,old) \
178 (((old) & ~(((1 << HMATRIX_##name##_SIZE) - 1) \
179 << HMATRIX_##name##_OFFSET)) \
180 | HMATRIX_BF(name,value))
181
182#endif /* __HMATRIX_H */
diff --git a/arch/avr32/mach-at32ap/hsmc.c b/arch/avr32/mach-at32ap/hsmc.c
index b2d9bc61a35c..2875c11be95d 100644
--- a/arch/avr32/mach-at32ap/hsmc.c
+++ b/arch/avr32/mach-at32ap/hsmc.c
@@ -14,7 +14,7 @@
14#include <linux/platform_device.h> 14#include <linux/platform_device.h>
15 15
16#include <asm/io.h> 16#include <asm/io.h>
17#include <asm/arch/smc.h> 17#include <mach/smc.h>
18 18
19#include "hsmc.h" 19#include "hsmc.h"
20 20
diff --git a/arch/avr32/mach-at32ap/include/mach/at32ap700x.h b/arch/avr32/mach-at32ap/include/mach/at32ap700x.h
new file mode 100644
index 000000000000..1e9852d65cca
--- /dev/null
+++ b/arch/avr32/mach-at32ap/include/mach/at32ap700x.h
@@ -0,0 +1,86 @@
1/*
2 * Pin definitions for AT32AP7000.
3 *
4 * Copyright (C) 2006 Atmel Corporation
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10#ifndef __ASM_ARCH_AT32AP700X_H__
11#define __ASM_ARCH_AT32AP700X_H__
12
13#define GPIO_PERIPH_A 0
14#define GPIO_PERIPH_B 1
15
16/*
17 * Pin numbers identifying specific GPIO pins on the chip. They can
18 * also be converted to IRQ numbers by passing them through
19 * gpio_to_irq().
20 */
21#define GPIO_PIOA_BASE (0)
22#define GPIO_PIOB_BASE (GPIO_PIOA_BASE + 32)
23#define GPIO_PIOC_BASE (GPIO_PIOB_BASE + 32)
24#define GPIO_PIOD_BASE (GPIO_PIOC_BASE + 32)
25#define GPIO_PIOE_BASE (GPIO_PIOD_BASE + 32)
26
27#define GPIO_PIN_PA(N) (GPIO_PIOA_BASE + (N))
28#define GPIO_PIN_PB(N) (GPIO_PIOB_BASE + (N))
29#define GPIO_PIN_PC(N) (GPIO_PIOC_BASE + (N))
30#define GPIO_PIN_PD(N) (GPIO_PIOD_BASE + (N))
31#define GPIO_PIN_PE(N) (GPIO_PIOE_BASE + (N))
32
33
34/*
35 * DMAC peripheral hardware handshaking interfaces, used with dw_dmac
36 */
37#define DMAC_MCI_RX 0
38#define DMAC_MCI_TX 1
39#define DMAC_DAC_TX 2
40#define DMAC_AC97_A_RX 3
41#define DMAC_AC97_A_TX 4
42#define DMAC_AC97_B_RX 5
43#define DMAC_AC97_B_TX 6
44#define DMAC_DMAREQ_0 7
45#define DMAC_DMAREQ_1 8
46#define DMAC_DMAREQ_2 9
47#define DMAC_DMAREQ_3 10
48
49/* HSB master IDs */
50#define HMATRIX_MASTER_CPU_DCACHE 0
51#define HMATRIX_MASTER_CPU_ICACHE 1
52#define HMATRIX_MASTER_PDC 2
53#define HMATRIX_MASTER_ISI 3
54#define HMATRIX_MASTER_USBA 4
55#define HMATRIX_MASTER_LCDC 5
56#define HMATRIX_MASTER_MACB0 6
57#define HMATRIX_MASTER_MACB1 7
58#define HMATRIX_MASTER_DMACA_M0 8
59#define HMATRIX_MASTER_DMACA_M1 9
60
61/* HSB slave IDs */
62#define HMATRIX_SLAVE_SRAM0 0
63#define HMATRIX_SLAVE_SRAM1 1
64#define HMATRIX_SLAVE_PBA 2
65#define HMATRIX_SLAVE_PBB 3
66#define HMATRIX_SLAVE_EBI 4
67#define HMATRIX_SLAVE_USBA 5
68#define HMATRIX_SLAVE_LCDC 6
69#define HMATRIX_SLAVE_DMACA 7
70
71/* Bits in HMATRIX SFR4 (EBI) */
72#define HMATRIX_EBI_SDRAM_ENABLE (1 << 1)
73#define HMATRIX_EBI_NAND_ENABLE (1 << 3)
74#define HMATRIX_EBI_CF0_ENABLE (1 << 4)
75#define HMATRIX_EBI_CF1_ENABLE (1 << 5)
76#define HMATRIX_EBI_PULLUP_DISABLE (1 << 8)
77
78/*
79 * Base addresses of controllers that may be accessed early by
80 * platform code.
81 */
82#define PM_BASE 0xfff00000
83#define HMATRIX_BASE 0xfff00800
84#define SDRAMC_BASE 0xfff03800
85
86#endif /* __ASM_ARCH_AT32AP700X_H__ */
diff --git a/include/asm-avr32/arch-at32ap/board.h b/arch/avr32/mach-at32ap/include/mach/board.h
index e60e9076544d..e60e9076544d 100644
--- a/include/asm-avr32/arch-at32ap/board.h
+++ b/arch/avr32/mach-at32ap/include/mach/board.h
diff --git a/arch/avr32/mach-at32ap/include/mach/chip.h b/arch/avr32/mach-at32ap/include/mach/chip.h
new file mode 100644
index 000000000000..5efca6da6acb
--- /dev/null
+++ b/arch/avr32/mach-at32ap/include/mach/chip.h
@@ -0,0 +1,19 @@
1/*
2 * AVR32 chip-specific definitions
3 *
4 * Copyright (C) 2008 Atmel Corporation
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10#ifndef __ASM_AVR32_ARCH_CHIP_H__
11#define __ASM_AVR32_ARCH_CHIP_H__
12
13#if defined(CONFIG_CPU_AT32AP700X)
14# include <mach/at32ap700x.h>
15#else
16# error Unknown chip type selected
17#endif
18
19#endif /* __ASM_AVR32_ARCH_CHIP_H__ */
diff --git a/include/asm-avr32/arch-at32ap/cpu.h b/arch/avr32/mach-at32ap/include/mach/cpu.h
index 44d0bfa1f409..44d0bfa1f409 100644
--- a/include/asm-avr32/arch-at32ap/cpu.h
+++ b/arch/avr32/mach-at32ap/include/mach/cpu.h
diff --git a/include/asm-avr32/arch-at32ap/gpio.h b/arch/avr32/mach-at32ap/include/mach/gpio.h
index 0180f584ef03..0180f584ef03 100644
--- a/include/asm-avr32/arch-at32ap/gpio.h
+++ b/arch/avr32/mach-at32ap/include/mach/gpio.h
diff --git a/arch/avr32/mach-at32ap/include/mach/hmatrix.h b/arch/avr32/mach-at32ap/include/mach/hmatrix.h
new file mode 100644
index 000000000000..7a368f227ebc
--- /dev/null
+++ b/arch/avr32/mach-at32ap/include/mach/hmatrix.h
@@ -0,0 +1,55 @@
1/*
2 * High-Speed Bus Matrix configuration registers
3 *
4 * Copyright (C) 2008 Atmel Corporation
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10#ifndef __HMATRIX_H
11#define __HMATRIX_H
12
13extern struct clk at32_hmatrix_clk;
14
15void hmatrix_write_reg(unsigned long offset, u32 value);
16u32 hmatrix_read_reg(unsigned long offset);
17
18void hmatrix_sfr_set_bits(unsigned int slave_id, u32 mask);
19void hmatrix_sfr_clear_bits(unsigned int slave_id, u32 mask);
20
21/* Master Configuration register */
22#define HMATRIX_MCFG(m) (0x0000 + 4 * (m))
23/* Undefined length burst limit */
24# define HMATRIX_MCFG_ULBT_INFINITE 0 /* Infinite length */
25# define HMATRIX_MCFG_ULBT_SINGLE 1 /* Single Access */
26# define HMATRIX_MCFG_ULBT_FOUR_BEAT 2 /* Four beat */
27# define HMATRIX_MCFG_ULBT_EIGHT_BEAT 3 /* Eight beat */
28# define HMATRIX_MCFG_ULBT_SIXTEEN_BEAT 4 /* Sixteen beat */
29
30/* Slave Configuration register */
31#define HMATRIX_SCFG(s) (0x0040 + 4 * (s))
32# define HMATRIX_SCFG_SLOT_CYCLE(x) ((x) << 0) /* Max burst cycles */
33# define HMATRIX_SCFG_DEFMSTR_NONE ( 0 << 16) /* No default master */
34# define HMATRIX_SCFG_DEFMSTR_LAST ( 1 << 16) /* Last def master */
35# define HMATRIX_SCFG_DEFMSTR_FIXED ( 2 << 16) /* Fixed def master */
36# define HMATRIX_SCFG_FIXED_DEFMSTR(m) ((m) << 18) /* Fixed master ID */
37# define HMATRIX_SCFG_ARBT_ROUND_ROBIN ( 0 << 24) /* RR arbitration */
38# define HMATRIX_SCFG_ARBT_FIXED_PRIO ( 1 << 24) /* Fixed priority */
39
40/* Slave Priority register A (master 0..7) */
41#define HMATRIX_PRAS(s) (0x0080 + 8 * (s))
42# define HMATRIX_PRAS_PRIO(m, p) ((p) << ((m) * 4))
43
44/* Slave Priority register A (master 8..15) */
45#define HMATRIX_PRBS(s) (0x0084 + 8 * (s))
46# define HMATRIX_PRBS_PRIO(m, p) ((p) << (((m) - 8) * 4))
47
48/* Master Remap Control Register */
49#define HMATRIX_MRCR 0x0100
50# define HMATRIX_MRCR_REMAP(m) ( 1 << (m)) /* Remap master m */
51
52/* Special Function Register. Bit definitions are chip-specific */
53#define HMATRIX_SFR(s) (0x0110 + 4 * (s))
54
55#endif /* __HMATRIX_H */
diff --git a/include/asm-avr32/arch-at32ap/init.h b/arch/avr32/mach-at32ap/include/mach/init.h
index bc40e3d46150..bc40e3d46150 100644
--- a/include/asm-avr32/arch-at32ap/init.h
+++ b/arch/avr32/mach-at32ap/include/mach/init.h
diff --git a/include/asm-avr32/arch-at32ap/io.h b/arch/avr32/mach-at32ap/include/mach/io.h
index 4ec6abc68ea3..4ec6abc68ea3 100644
--- a/include/asm-avr32/arch-at32ap/io.h
+++ b/arch/avr32/mach-at32ap/include/mach/io.h
diff --git a/include/asm-avr32/arch-at32ap/irq.h b/arch/avr32/mach-at32ap/include/mach/irq.h
index 608e350368c7..608e350368c7 100644
--- a/include/asm-avr32/arch-at32ap/irq.h
+++ b/arch/avr32/mach-at32ap/include/mach/irq.h
diff --git a/include/asm-avr32/arch-at32ap/pm.h b/arch/avr32/mach-at32ap/include/mach/pm.h
index 979b355b77b6..979b355b77b6 100644
--- a/include/asm-avr32/arch-at32ap/pm.h
+++ b/arch/avr32/mach-at32ap/include/mach/pm.h
diff --git a/include/asm-avr32/arch-at32ap/portmux.h b/arch/avr32/mach-at32ap/include/mach/portmux.h
index b1abe6b4e4ef..b1abe6b4e4ef 100644
--- a/include/asm-avr32/arch-at32ap/portmux.h
+++ b/arch/avr32/mach-at32ap/include/mach/portmux.h
diff --git a/include/asm-avr32/arch-at32ap/smc.h b/arch/avr32/mach-at32ap/include/mach/smc.h
index c98eea44a70a..c98eea44a70a 100644
--- a/include/asm-avr32/arch-at32ap/smc.h
+++ b/arch/avr32/mach-at32ap/include/mach/smc.h
diff --git a/include/asm-avr32/arch-at32ap/sram.h b/arch/avr32/mach-at32ap/include/mach/sram.h
index 4838dae7601a..4838dae7601a 100644
--- a/include/asm-avr32/arch-at32ap/sram.h
+++ b/arch/avr32/mach-at32ap/include/mach/sram.h
diff --git a/arch/avr32/mach-at32ap/pio.c b/arch/avr32/mach-at32ap/pio.c
index 296294f8ed81..405ee6bad4ce 100644
--- a/arch/avr32/mach-at32ap/pio.c
+++ b/arch/avr32/mach-at32ap/pio.c
@@ -17,7 +17,7 @@
17#include <asm/gpio.h> 17#include <asm/gpio.h>
18#include <asm/io.h> 18#include <asm/io.h>
19 19
20#include <asm/arch/portmux.h> 20#include <mach/portmux.h>
21 21
22#include "pio.h" 22#include "pio.h"
23 23
diff --git a/arch/avr32/mach-at32ap/pm-at32ap700x.S b/arch/avr32/mach-at32ap/pm-at32ap700x.S
index 0a53ad314ff4..5be4de65b209 100644
--- a/arch/avr32/mach-at32ap/pm-at32ap700x.S
+++ b/arch/avr32/mach-at32ap/pm-at32ap700x.S
@@ -10,7 +10,7 @@
10#include <asm/asm.h> 10#include <asm/asm.h>
11#include <asm/asm-offsets.h> 11#include <asm/asm-offsets.h>
12#include <asm/thread_info.h> 12#include <asm/thread_info.h>
13#include <asm/arch/pm.h> 13#include <mach/pm.h>
14 14
15#include "pm.h" 15#include "pm.h"
16#include "sdramc.h" 16#include "sdramc.h"
diff --git a/arch/avr32/mach-at32ap/pm.c b/arch/avr32/mach-at32ap/pm.c
index 0b764320135d..f021edfeaab0 100644
--- a/arch/avr32/mach-at32ap/pm.c
+++ b/arch/avr32/mach-at32ap/pm.c
@@ -14,11 +14,9 @@
14#include <asm/cacheflush.h> 14#include <asm/cacheflush.h>
15#include <asm/sysreg.h> 15#include <asm/sysreg.h>
16 16
17#include <asm/arch/pm.h> 17#include <mach/chip.h>
18#include <asm/arch/sram.h> 18#include <mach/pm.h>
19 19#include <mach/sram.h>
20/* FIXME: This is only valid for AP7000 */
21#define SDRAMC_BASE 0xfff03800
22 20
23#include "sdramc.h" 21#include "sdramc.h"
24 22
diff --git a/arch/avr32/mach-at32ap/pm.h b/arch/avr32/mach-at32ap/pm.h
index 694d521edc2f..532a3732c214 100644
--- a/arch/avr32/mach-at32ap/pm.h
+++ b/arch/avr32/mach-at32ap/pm.h
@@ -4,14 +4,6 @@
4#ifndef __ARCH_AVR32_MACH_AT32AP_PM_H__ 4#ifndef __ARCH_AVR32_MACH_AT32AP_PM_H__
5#define __ARCH_AVR32_MACH_AT32AP_PM_H__ 5#define __ARCH_AVR32_MACH_AT32AP_PM_H__
6 6
7/*
8 * We can reduce the code size a bit by using a constant here. Since
9 * this file is only used on AVR32 AP CPUs with segmentation enabled,
10 * it's safe to not use ioremap. Generic drivers should of course
11 * never do this.
12 */
13#define AT32_PM_BASE 0xfff00000
14
15/* PM register offsets */ 7/* PM register offsets */
16#define PM_MCCTRL 0x0000 8#define PM_MCCTRL 0x0000
17#define PM_CKSEL 0x0004 9#define PM_CKSEL 0x0004
@@ -113,8 +105,8 @@
113 105
114/* Register access macros */ 106/* Register access macros */
115#define pm_readl(reg) \ 107#define pm_readl(reg) \
116 __raw_readl((void __iomem __force *)AT32_PM_BASE + PM_##reg) 108 __raw_readl((void __iomem __force *)PM_BASE + PM_##reg)
117#define pm_writel(reg,value) \ 109#define pm_writel(reg,value) \
118 __raw_writel((value), (void __iomem __force *)AT32_PM_BASE + PM_##reg) 110 __raw_writel((value), (void __iomem __force *)PM_BASE + PM_##reg)
119 111
120#endif /* __ARCH_AVR32_MACH_AT32AP_PM_H__ */ 112#endif /* __ARCH_AVR32_MACH_AT32AP_PM_H__ */
diff --git a/arch/h8300/mm/init.c b/arch/h8300/mm/init.c
index a1d228f5e4e6..9942f24aff9e 100644
--- a/arch/h8300/mm/init.c
+++ b/arch/h8300/mm/init.c
@@ -40,9 +40,6 @@
40 40
41#undef DEBUG 41#undef DEBUG
42 42
43extern void die_if_kernel(char *,struct pt_regs *,long);
44extern void free_initmem(void);
45
46/* 43/*
47 * BAD_PAGE is the page that is used for page faults when linux 44 * BAD_PAGE is the page that is used for page faults when linux
48 * is out-of-memory. Older versions of linux just did a 45 * is out-of-memory. Older versions of linux just did a
@@ -73,7 +70,7 @@ extern unsigned long memory_end;
73 * The parameters are pointers to where to stick the starting and ending 70 * The parameters are pointers to where to stick the starting and ending
74 * addresses of available kernel virtual memory. 71 * addresses of available kernel virtual memory.
75 */ 72 */
76void paging_init(void) 73void __init paging_init(void)
77{ 74{
78 /* 75 /*
79 * Make sure start_mem is page aligned, otherwise bootmem and 76 * Make sure start_mem is page aligned, otherwise bootmem and
@@ -122,7 +119,7 @@ void paging_init(void)
122 } 119 }
123} 120}
124 121
125void mem_init(void) 122void __init mem_init(void)
126{ 123{
127 int codek = 0, datak = 0, initk = 0; 124 int codek = 0, datak = 0, initk = 0;
128 /* DAVIDM look at setup memory map generically with reserved area */ 125 /* DAVIDM look at setup memory map generically with reserved area */
@@ -178,7 +175,7 @@ void free_initrd_mem(unsigned long start, unsigned long end)
178#endif 175#endif
179 176
180void 177void
181free_initmem() 178free_initmem(void)
182{ 179{
183#ifdef CONFIG_RAMKERNEL 180#ifdef CONFIG_RAMKERNEL
184 unsigned long addr; 181 unsigned long addr;
diff --git a/arch/ia64/include/asm/sal.h b/arch/ia64/include/asm/sal.h
index 89594b442f83..ea310c0812aa 100644
--- a/arch/ia64/include/asm/sal.h
+++ b/arch/ia64/include/asm/sal.h
@@ -236,7 +236,7 @@ extern struct ia64_sal_desc_ptc *ia64_ptc_domain_info;
236 236
237extern unsigned short sal_revision; /* supported SAL spec revision */ 237extern unsigned short sal_revision; /* supported SAL spec revision */
238extern unsigned short sal_version; /* SAL version; OEM dependent */ 238extern unsigned short sal_version; /* SAL version; OEM dependent */
239#define SAL_VERSION_CODE(major, minor) ((BIN2BCD(major) << 8) | BIN2BCD(minor)) 239#define SAL_VERSION_CODE(major, minor) ((bin2bcd(major) << 8) | bin2bcd(minor))
240 240
241extern const char *ia64_sal_strerror (long status); 241extern const char *ia64_sal_strerror (long status);
242extern void ia64_sal_init (struct ia64_sal_systab *sal_systab); 242extern void ia64_sal_init (struct ia64_sal_systab *sal_systab);
diff --git a/arch/ia64/kernel/head.S b/arch/ia64/kernel/head.S
index 41c712917ff7..8bdea8eb62e3 100644
--- a/arch/ia64/kernel/head.S
+++ b/arch/ia64/kernel/head.S
@@ -359,7 +359,31 @@ start_ap:
359 mov ar.rsc=0 // place RSE in enforced lazy mode 359 mov ar.rsc=0 // place RSE in enforced lazy mode
360 ;; 360 ;;
361 loadrs // clear the dirty partition 361 loadrs // clear the dirty partition
362 mov IA64_KR(PER_CPU_DATA)=r0 // clear physical per-CPU base 362 movl r19=__phys_per_cpu_start
363 mov r18=PERCPU_PAGE_SIZE
364 ;;
365#ifndef CONFIG_SMP
366 add r19=r19,r18
367 ;;
368#else
369(isAP) br.few 2f
370 mov r20=r19
371 sub r19=r19,r18
372 ;;
373 shr.u r18=r18,3
3741:
375 ld8 r21=[r20],8;;
376 st8[r19]=r21,8
377 adds r18=-1,r18;;
378 cmp4.lt p7,p6=0,r18
379(p7) br.cond.dptk.few 1b
3802:
381#endif
382 tpa r19=r19
383 ;;
384 .pred.rel.mutex isBP,isAP
385(isBP) mov IA64_KR(PER_CPU_DATA)=r19 // per-CPU base for cpu0
386(isAP) mov IA64_KR(PER_CPU_DATA)=r0 // clear physical per-CPU base
363 ;; 387 ;;
364 mov ar.bspstore=r2 // establish the new RSE stack 388 mov ar.bspstore=r2 // establish the new RSE stack
365 ;; 389 ;;
diff --git a/arch/ia64/kernel/setup.c b/arch/ia64/kernel/setup.c
index 593279f33e96..c27d5b2c182b 100644
--- a/arch/ia64/kernel/setup.c
+++ b/arch/ia64/kernel/setup.c
@@ -927,17 +927,19 @@ cpu_init (void)
927 if (smp_processor_id() == 0) { 927 if (smp_processor_id() == 0) {
928 cpu_set(0, per_cpu(cpu_sibling_map, 0)); 928 cpu_set(0, per_cpu(cpu_sibling_map, 0));
929 cpu_set(0, cpu_core_map[0]); 929 cpu_set(0, cpu_core_map[0]);
930 } else {
931 /*
932 * Set ar.k3 so that assembly code in MCA handler can compute
933 * physical addresses of per cpu variables with a simple:
934 * phys = ar.k3 + &per_cpu_var
935 * and the alt-dtlb-miss handler can set per-cpu mapping into
936 * the TLB when needed. head.S already did this for cpu0.
937 */
938 ia64_set_kr(IA64_KR_PER_CPU_DATA,
939 ia64_tpa(cpu_data) - (long) __per_cpu_start);
930 } 940 }
931#endif 941#endif
932 942
933 /*
934 * We set ar.k3 so that assembly code in MCA handler can compute
935 * physical addresses of per cpu variables with a simple:
936 * phys = ar.k3 + &per_cpu_var
937 */
938 ia64_set_kr(IA64_KR_PER_CPU_DATA,
939 ia64_tpa(cpu_data) - (long) __per_cpu_start);
940
941 get_max_cacheline_size(); 943 get_max_cacheline_size();
942 944
943 /* 945 /*
diff --git a/arch/ia64/kernel/smpboot.c b/arch/ia64/kernel/smpboot.c
index 03f1a9908afc..b39853a292d5 100644
--- a/arch/ia64/kernel/smpboot.c
+++ b/arch/ia64/kernel/smpboot.c
@@ -467,7 +467,9 @@ start_secondary (void *unused)
467{ 467{
468 /* Early console may use I/O ports */ 468 /* Early console may use I/O ports */
469 ia64_set_kr(IA64_KR_IO_BASE, __pa(ia64_iobase)); 469 ia64_set_kr(IA64_KR_IO_BASE, __pa(ia64_iobase));
470#ifndef CONFIG_PRINTK_TIME
470 Dprintk("start_secondary: starting CPU 0x%x\n", hard_smp_processor_id()); 471 Dprintk("start_secondary: starting CPU 0x%x\n", hard_smp_processor_id());
472#endif
471 efi_map_pal_code(); 473 efi_map_pal_code();
472 cpu_init(); 474 cpu_init();
473 preempt_disable(); 475 preempt_disable();
diff --git a/arch/ia64/kernel/vmlinux.lds.S b/arch/ia64/kernel/vmlinux.lds.S
index 5a77206c2492..de71da811cd6 100644
--- a/arch/ia64/kernel/vmlinux.lds.S
+++ b/arch/ia64/kernel/vmlinux.lds.S
@@ -215,6 +215,9 @@ SECTIONS
215 /* Per-cpu data: */ 215 /* Per-cpu data: */
216 percpu : { } :percpu 216 percpu : { } :percpu
217 . = ALIGN(PERCPU_PAGE_SIZE); 217 . = ALIGN(PERCPU_PAGE_SIZE);
218#ifdef CONFIG_SMP
219 . = . + PERCPU_PAGE_SIZE; /* cpu0 per-cpu space */
220#endif
218 __phys_per_cpu_start = .; 221 __phys_per_cpu_start = .;
219 .data.percpu PERCPU_ADDR : AT(__phys_per_cpu_start - LOAD_OFFSET) 222 .data.percpu PERCPU_ADDR : AT(__phys_per_cpu_start - LOAD_OFFSET)
220 { 223 {
diff --git a/arch/ia64/mm/contig.c b/arch/ia64/mm/contig.c
index 798bf9835a51..e566ff43884a 100644
--- a/arch/ia64/mm/contig.c
+++ b/arch/ia64/mm/contig.c
@@ -163,8 +163,14 @@ per_cpu_init (void)
163 * get_zeroed_page(). 163 * get_zeroed_page().
164 */ 164 */
165 if (first_time) { 165 if (first_time) {
166 void *cpu0_data = __phys_per_cpu_start - PERCPU_PAGE_SIZE;
167
166 first_time=0; 168 first_time=0;
167 for (cpu = 0; cpu < NR_CPUS; cpu++) { 169
170 __per_cpu_offset[0] = (char *) cpu0_data - __per_cpu_start;
171 per_cpu(local_per_cpu_offset, 0) = __per_cpu_offset[0];
172
173 for (cpu = 1; cpu < NR_CPUS; cpu++) {
168 memcpy(cpu_data, __phys_per_cpu_start, __per_cpu_end - __per_cpu_start); 174 memcpy(cpu_data, __phys_per_cpu_start, __per_cpu_end - __per_cpu_start);
169 __per_cpu_offset[cpu] = (char *) cpu_data - __per_cpu_start; 175 __per_cpu_offset[cpu] = (char *) cpu_data - __per_cpu_start;
170 cpu_data += PERCPU_PAGE_SIZE; 176 cpu_data += PERCPU_PAGE_SIZE;
@@ -177,7 +183,7 @@ per_cpu_init (void)
177static inline void 183static inline void
178alloc_per_cpu_data(void) 184alloc_per_cpu_data(void)
179{ 185{
180 cpu_data = __alloc_bootmem(PERCPU_PAGE_SIZE * NR_CPUS, 186 cpu_data = __alloc_bootmem(PERCPU_PAGE_SIZE * NR_CPUS-1,
181 PERCPU_PAGE_SIZE, __pa(MAX_DMA_ADDRESS)); 187 PERCPU_PAGE_SIZE, __pa(MAX_DMA_ADDRESS));
182} 188}
183#else 189#else
diff --git a/arch/ia64/mm/discontig.c b/arch/ia64/mm/discontig.c
index d83125e1ed27..78026aabaa7f 100644
--- a/arch/ia64/mm/discontig.c
+++ b/arch/ia64/mm/discontig.c
@@ -143,7 +143,11 @@ static void *per_cpu_node_setup(void *cpu_data, int node)
143 int cpu; 143 int cpu;
144 144
145 for_each_possible_early_cpu(cpu) { 145 for_each_possible_early_cpu(cpu) {
146 if (node == node_cpuid[cpu].nid) { 146 if (cpu == 0) {
147 void *cpu0_data = __phys_per_cpu_start - PERCPU_PAGE_SIZE;
148 __per_cpu_offset[cpu] = (char*)cpu0_data -
149 __per_cpu_start;
150 } else if (node == node_cpuid[cpu].nid) {
147 memcpy(__va(cpu_data), __phys_per_cpu_start, 151 memcpy(__va(cpu_data), __phys_per_cpu_start,
148 __per_cpu_end - __per_cpu_start); 152 __per_cpu_end - __per_cpu_start);
149 __per_cpu_offset[cpu] = (char*)__va(cpu_data) - 153 __per_cpu_offset[cpu] = (char*)__va(cpu_data) -
diff --git a/arch/m68k/kernel/entry.S b/arch/m68k/kernel/entry.S
index 18a9c5f4b00d..f28404d9a2bc 100644
--- a/arch/m68k/kernel/entry.S
+++ b/arch/m68k/kernel/entry.S
@@ -747,4 +747,10 @@ sys_call_table:
747 .long sys_fallocate /* 320 */ 747 .long sys_fallocate /* 320 */
748 .long sys_timerfd_settime 748 .long sys_timerfd_settime
749 .long sys_timerfd_gettime 749 .long sys_timerfd_gettime
750 .long sys_signalfd4
751 .long sys_eventfd2
752 .long sys_epoll_create1 /* 325 */
753 .long sys_dup3
754 .long sys_pipe2
755 .long sys_inotify_init1
750 756
diff --git a/arch/m68knommu/include/asm/unistd.h b/arch/m68knommu/include/asm/unistd.h
index 4ba98b9c5d79..b034a2f7b444 100644
--- a/arch/m68knommu/include/asm/unistd.h
+++ b/arch/m68knommu/include/asm/unistd.h
@@ -326,10 +326,16 @@
326#define __NR_fallocate 320 326#define __NR_fallocate 320
327#define __NR_timerfd_settime 321 327#define __NR_timerfd_settime 321
328#define __NR_timerfd_gettime 322 328#define __NR_timerfd_gettime 322
329#define __NR_signalfd4 323
330#define __NR_eventfd2 324
331#define __NR_epoll_create1 325
332#define __NR_dup3 326
333#define __NR_pipe2 327
334#define __NR_inotify_init1 328
329 335
330#ifdef __KERNEL__ 336#ifdef __KERNEL__
331 337
332#define NR_syscalls 323 338#define NR_syscalls 329
333 339
334#define __ARCH_WANT_IPC_PARSE_VERSION 340#define __ARCH_WANT_IPC_PARSE_VERSION
335#define __ARCH_WANT_OLD_READDIR 341#define __ARCH_WANT_OLD_READDIR
diff --git a/arch/m68knommu/kernel/syscalltable.S b/arch/m68knommu/kernel/syscalltable.S
index fca2e49917a3..812f8d8b7a85 100644
--- a/arch/m68knommu/kernel/syscalltable.S
+++ b/arch/m68knommu/kernel/syscalltable.S
@@ -341,6 +341,12 @@ ENTRY(sys_call_table)
341 .long sys_fallocate /* 320 */ 341 .long sys_fallocate /* 320 */
342 .long sys_timerfd_settime 342 .long sys_timerfd_settime
343 .long sys_timerfd_gettime 343 .long sys_timerfd_gettime
344 .long sys_signalfd4
345 .long sys_eventfd2
346 .long sys_epoll_create1 /* 325 */
347 .long sys_dup3
348 .long sys_pipe2
349 .long sys_inotify_init1
344 350
345 .rept NR_syscalls-(.-sys_call_table)/4 351 .rept NR_syscalls-(.-sys_call_table)/4
346 .long sys_ni_syscall 352 .long sys_ni_syscall
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 63c9cafda9c4..587da5e0990f 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -42,9 +42,6 @@ config GENERIC_HARDIRQS
42 bool 42 bool
43 default y 43 default y
44 44
45config HAVE_GET_USER_PAGES_FAST
46 def_bool PPC64
47
48config HAVE_SETUP_PER_CPU_AREA 45config HAVE_SETUP_PER_CPU_AREA
49 def_bool PPC64 46 def_bool PPC64
50 47
diff --git a/arch/powerpc/boot/dts/warp.dts b/arch/powerpc/boot/dts/warp.dts
index 340018cf16b7..f4e4ba69eef7 100644
--- a/arch/powerpc/boot/dts/warp.dts
+++ b/arch/powerpc/boot/dts/warp.dts
@@ -139,6 +139,11 @@
139 interrupt-parent = <&UIC0>; 139 interrupt-parent = <&UIC0>;
140 }; 140 };
141 141
142 fpga@2,2000 {
143 compatible = "pika,fpga-sgl";
144 reg = <0x00000002 0x00002000 0x00000200>;
145 };
146
142 fpga@2,4000 { 147 fpga@2,4000 {
143 compatible = "pika,fpga-sd"; 148 compatible = "pika,fpga-sd";
144 reg = <0x00000002 0x00004000 0x00000A00>; 149 reg = <0x00000002 0x00004000 0x00000A00>;
@@ -152,7 +157,7 @@
152 #size-cells = <1>; 157 #size-cells = <1>;
153 partition@300000 { 158 partition@300000 {
154 label = "fpga"; 159 label = "fpga";
155 reg = <0x0030000 0x00040000>; 160 reg = <0x0300000 0x00040000>;
156 }; 161 };
157 partition@340000 { 162 partition@340000 {
158 label = "env"; 163 label = "env";
@@ -181,7 +186,6 @@
181 reg = <0xef600700 0x00000014>; 186 reg = <0xef600700 0x00000014>;
182 interrupt-parent = <&UIC0>; 187 interrupt-parent = <&UIC0>;
183 interrupts = <0x2 0x4>; 188 interrupts = <0x2 0x4>;
184 index = <0x0>;
185 #address-cells = <1>; 189 #address-cells = <1>;
186 #size-cells = <0>; 190 #size-cells = <0>;
187 191
@@ -191,6 +195,12 @@
191 interrupts = <0x19 0x8>; 195 interrupts = <0x19 0x8>;
192 interrupt-parent = <&UIC0>; 196 interrupt-parent = <&UIC0>;
193 }; 197 };
198
199 /* This will create 52 and 53 */
200 at24@52 {
201 compatible = "at,24c04";
202 reg = <0x52>;
203 };
194 }; 204 };
195 205
196 GPIO0: gpio@ef600b00 { 206 GPIO0: gpio@ef600b00 {
@@ -209,7 +219,13 @@
209 led@31 { 219 led@31 {
210 compatible = "linux,gpio-led"; 220 compatible = "linux,gpio-led";
211 linux,name = ":green:"; 221 linux,name = ":green:";
212 gpios = <&GPIO1 0x30 0>; 222 gpios = <&GPIO1 31 0>;
223 };
224
225 led@30 {
226 compatible = "linux,gpio-led";
227 linux,name = ":red:";
228 gpios = <&GPIO1 30 0>;
213 }; 229 };
214 }; 230 };
215 231
diff --git a/arch/powerpc/configs/40x/ep405_defconfig b/arch/powerpc/configs/40x/ep405_defconfig
index e24240a9a047..2113ae2ab401 100644
--- a/arch/powerpc/configs/40x/ep405_defconfig
+++ b/arch/powerpc/configs/40x/ep405_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.25-rc2 3# Linux kernel version: 2.6.27-rc1
4# Fri Feb 15 21:50:09 2008 4# Tue Aug 5 19:34:03 2008
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
@@ -26,8 +26,12 @@ CONFIG_GENERIC_TIME=y
26CONFIG_GENERIC_TIME_VSYSCALL=y 26CONFIG_GENERIC_TIME_VSYSCALL=y
27CONFIG_GENERIC_CLOCKEVENTS=y 27CONFIG_GENERIC_CLOCKEVENTS=y
28CONFIG_GENERIC_HARDIRQS=y 28CONFIG_GENERIC_HARDIRQS=y
29# CONFIG_HAVE_GET_USER_PAGES_FAST is not set
29# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 30# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
30CONFIG_IRQ_PER_CPU=y 31CONFIG_IRQ_PER_CPU=y
32CONFIG_STACKTRACE_SUPPORT=y
33CONFIG_HAVE_LATENCYTOP_SUPPORT=y
34CONFIG_LOCKDEP_SUPPORT=y
31CONFIG_RWSEM_XCHGADD_ALGORITHM=y 35CONFIG_RWSEM_XCHGADD_ALGORITHM=y
32CONFIG_ARCH_HAS_ILOG2_U32=y 36CONFIG_ARCH_HAS_ILOG2_U32=y
33CONFIG_GENERIC_HWEIGHT=y 37CONFIG_GENERIC_HWEIGHT=y
@@ -75,6 +79,7 @@ CONFIG_FAIR_GROUP_SCHED=y
75CONFIG_USER_SCHED=y 79CONFIG_USER_SCHED=y
76# CONFIG_CGROUP_SCHED is not set 80# CONFIG_CGROUP_SCHED is not set
77CONFIG_SYSFS_DEPRECATED=y 81CONFIG_SYSFS_DEPRECATED=y
82CONFIG_SYSFS_DEPRECATED_V2=y
78# CONFIG_RELAY is not set 83# CONFIG_RELAY is not set
79# CONFIG_NAMESPACES is not set 84# CONFIG_NAMESPACES is not set
80CONFIG_BLK_DEV_INITRD=y 85CONFIG_BLK_DEV_INITRD=y
@@ -83,6 +88,7 @@ CONFIG_INITRAMFS_SOURCE=""
83CONFIG_SYSCTL=y 88CONFIG_SYSCTL=y
84CONFIG_EMBEDDED=y 89CONFIG_EMBEDDED=y
85CONFIG_SYSCTL_SYSCALL=y 90CONFIG_SYSCTL_SYSCALL=y
91CONFIG_SYSCTL_SYSCALL_CHECK=y
86CONFIG_KALLSYMS=y 92CONFIG_KALLSYMS=y
87CONFIG_KALLSYMS_ALL=y 93CONFIG_KALLSYMS_ALL=y
88CONFIG_KALLSYMS_EXTRA_PASS=y 94CONFIG_KALLSYMS_EXTRA_PASS=y
@@ -108,13 +114,22 @@ CONFIG_SLUB=y
108# CONFIG_MARKERS is not set 114# CONFIG_MARKERS is not set
109CONFIG_HAVE_OPROFILE=y 115CONFIG_HAVE_OPROFILE=y
110# CONFIG_KPROBES is not set 116# CONFIG_KPROBES is not set
117CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y
118CONFIG_HAVE_IOREMAP_PROT=y
111CONFIG_HAVE_KPROBES=y 119CONFIG_HAVE_KPROBES=y
120CONFIG_HAVE_KRETPROBES=y
121CONFIG_HAVE_ARCH_TRACEHOOK=y
122# CONFIG_HAVE_DMA_ATTRS is not set
123# CONFIG_USE_GENERIC_SMP_HELPERS is not set
124# CONFIG_HAVE_CLK is not set
112CONFIG_PROC_PAGE_MONITOR=y 125CONFIG_PROC_PAGE_MONITOR=y
126# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
113CONFIG_SLABINFO=y 127CONFIG_SLABINFO=y
114CONFIG_RT_MUTEXES=y 128CONFIG_RT_MUTEXES=y
115# CONFIG_TINY_SHMEM is not set 129# CONFIG_TINY_SHMEM is not set
116CONFIG_BASE_SMALL=0 130CONFIG_BASE_SMALL=0
117CONFIG_MODULES=y 131CONFIG_MODULES=y
132# CONFIG_MODULE_FORCE_LOAD is not set
118CONFIG_MODULE_UNLOAD=y 133CONFIG_MODULE_UNLOAD=y
119# CONFIG_MODULE_FORCE_UNLOAD is not set 134# CONFIG_MODULE_FORCE_UNLOAD is not set
120# CONFIG_MODVERSIONS is not set 135# CONFIG_MODVERSIONS is not set
@@ -125,6 +140,7 @@ CONFIG_LBD=y
125# CONFIG_BLK_DEV_IO_TRACE is not set 140# CONFIG_BLK_DEV_IO_TRACE is not set
126# CONFIG_LSF is not set 141# CONFIG_LSF is not set
127# CONFIG_BLK_DEV_BSG is not set 142# CONFIG_BLK_DEV_BSG is not set
143# CONFIG_BLK_DEV_INTEGRITY is not set
128 144
129# 145#
130# IO Schedulers 146# IO Schedulers
@@ -139,14 +155,11 @@ CONFIG_DEFAULT_AS=y
139# CONFIG_DEFAULT_NOOP is not set 155# CONFIG_DEFAULT_NOOP is not set
140CONFIG_DEFAULT_IOSCHED="anticipatory" 156CONFIG_DEFAULT_IOSCHED="anticipatory"
141CONFIG_CLASSIC_RCU=y 157CONFIG_CLASSIC_RCU=y
142# CONFIG_PREEMPT_RCU is not set
143# CONFIG_PPC4xx_PCI_EXPRESS is not set 158# CONFIG_PPC4xx_PCI_EXPRESS is not set
144 159
145# 160#
146# Platform support 161# Platform support
147# 162#
148# CONFIG_PPC_MPC512x is not set
149# CONFIG_PPC_MPC5121 is not set
150# CONFIG_PPC_CELL is not set 163# CONFIG_PPC_CELL is not set
151# CONFIG_PPC_CELL_NATIVE is not set 164# CONFIG_PPC_CELL_NATIVE is not set
152# CONFIG_PQ2ADS is not set 165# CONFIG_PQ2ADS is not set
@@ -188,7 +201,6 @@ CONFIG_HZ=250
188CONFIG_PREEMPT_NONE=y 201CONFIG_PREEMPT_NONE=y
189# CONFIG_PREEMPT_VOLUNTARY is not set 202# CONFIG_PREEMPT_VOLUNTARY is not set
190# CONFIG_PREEMPT is not set 203# CONFIG_PREEMPT is not set
191CONFIG_RCU_TRACE=y
192CONFIG_BINFMT_ELF=y 204CONFIG_BINFMT_ELF=y
193# CONFIG_BINFMT_MISC is not set 205# CONFIG_BINFMT_MISC is not set
194# CONFIG_MATH_EMULATION is not set 206# CONFIG_MATH_EMULATION is not set
@@ -206,13 +218,17 @@ CONFIG_FLATMEM=y
206CONFIG_FLAT_NODE_MEM_MAP=y 218CONFIG_FLAT_NODE_MEM_MAP=y
207# CONFIG_SPARSEMEM_STATIC is not set 219# CONFIG_SPARSEMEM_STATIC is not set
208# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set 220# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
221CONFIG_PAGEFLAGS_EXTENDED=y
209CONFIG_SPLIT_PTLOCK_CPUS=4 222CONFIG_SPLIT_PTLOCK_CPUS=4
223CONFIG_MIGRATION=y
210# CONFIG_RESOURCES_64BIT is not set 224# CONFIG_RESOURCES_64BIT is not set
211CONFIG_ZONE_DMA_FLAG=1 225CONFIG_ZONE_DMA_FLAG=1
212CONFIG_BOUNCE=y 226CONFIG_BOUNCE=y
213CONFIG_VIRT_TO_BUS=y 227CONFIG_VIRT_TO_BUS=y
228CONFIG_FORCE_MAX_ZONEORDER=11
214CONFIG_PROC_DEVICETREE=y 229CONFIG_PROC_DEVICETREE=y
215# CONFIG_CMDLINE_BOOL is not set 230# CONFIG_CMDLINE_BOOL is not set
231CONFIG_EXTRA_TARGETS=""
216# CONFIG_PM is not set 232# CONFIG_PM is not set
217CONFIG_SECCOMP=y 233CONFIG_SECCOMP=y
218CONFIG_ISA_DMA_API=y 234CONFIG_ISA_DMA_API=y
@@ -222,6 +238,8 @@ CONFIG_ISA_DMA_API=y
222# 238#
223CONFIG_ZONE_DMA=y 239CONFIG_ZONE_DMA=y
224CONFIG_PPC_INDIRECT_PCI=y 240CONFIG_PPC_INDIRECT_PCI=y
241CONFIG_4xx_SOC=y
242CONFIG_PPC_PCI_CHOICE=y
225CONFIG_PCI=y 243CONFIG_PCI=y
226CONFIG_PCI_DOMAINS=y 244CONFIG_PCI_DOMAINS=y
227CONFIG_PCI_SYSCALL=y 245CONFIG_PCI_SYSCALL=y
@@ -232,6 +250,7 @@ CONFIG_PCI_LEGACY=y
232# CONFIG_PCI_DEBUG is not set 250# CONFIG_PCI_DEBUG is not set
233# CONFIG_PCCARD is not set 251# CONFIG_PCCARD is not set
234# CONFIG_HOTPLUG_PCI is not set 252# CONFIG_HOTPLUG_PCI is not set
253# CONFIG_HAS_RAPIDIO is not set
235 254
236# 255#
237# Advanced setup 256# Advanced setup
@@ -241,17 +260,13 @@ CONFIG_PCI_LEGACY=y
241# 260#
242# Default settings for advanced configuration options are used 261# Default settings for advanced configuration options are used
243# 262#
244CONFIG_HIGHMEM_START=0xfe000000
245CONFIG_LOWMEM_SIZE=0x30000000 263CONFIG_LOWMEM_SIZE=0x30000000
264CONFIG_PAGE_OFFSET=0xc0000000
246CONFIG_KERNEL_START=0xc0000000 265CONFIG_KERNEL_START=0xc0000000
266CONFIG_PHYSICAL_START=0x00000000
247CONFIG_TASK_SIZE=0xc0000000 267CONFIG_TASK_SIZE=0xc0000000
248CONFIG_CONSISTENT_START=0xff100000 268CONFIG_CONSISTENT_START=0xff100000
249CONFIG_CONSISTENT_SIZE=0x00200000 269CONFIG_CONSISTENT_SIZE=0x00200000
250CONFIG_BOOT_LOAD=0x00400000
251
252#
253# Networking
254#
255CONFIG_NET=y 270CONFIG_NET=y
256 271
257# 272#
@@ -289,8 +304,6 @@ CONFIG_TCP_CONG_CUBIC=y
289CONFIG_DEFAULT_TCP_CONG="cubic" 304CONFIG_DEFAULT_TCP_CONG="cubic"
290# CONFIG_TCP_MD5SIG is not set 305# CONFIG_TCP_MD5SIG is not set
291# CONFIG_IPV6 is not set 306# CONFIG_IPV6 is not set
292# CONFIG_INET6_XFRM_TUNNEL is not set
293# CONFIG_INET6_TUNNEL is not set
294# CONFIG_NETWORK_SECMARK is not set 307# CONFIG_NETWORK_SECMARK is not set
295# CONFIG_NETFILTER is not set 308# CONFIG_NETFILTER is not set
296# CONFIG_IP_DCCP is not set 309# CONFIG_IP_DCCP is not set
@@ -340,6 +353,8 @@ CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
340CONFIG_STANDALONE=y 353CONFIG_STANDALONE=y
341CONFIG_PREVENT_FIRMWARE_BUILD=y 354CONFIG_PREVENT_FIRMWARE_BUILD=y
342CONFIG_FW_LOADER=y 355CONFIG_FW_LOADER=y
356CONFIG_FIRMWARE_IN_KERNEL=y
357CONFIG_EXTRA_FIRMWARE=""
343# CONFIG_DEBUG_DRIVER is not set 358# CONFIG_DEBUG_DRIVER is not set
344# CONFIG_DEBUG_DEVRES is not set 359# CONFIG_DEBUG_DEVRES is not set
345# CONFIG_SYS_HYPERVISOR is not set 360# CONFIG_SYS_HYPERVISOR is not set
@@ -352,6 +367,7 @@ CONFIG_MTD_PARTITIONS=y
352# CONFIG_MTD_REDBOOT_PARTS is not set 367# CONFIG_MTD_REDBOOT_PARTS is not set
353CONFIG_MTD_CMDLINE_PARTS=y 368CONFIG_MTD_CMDLINE_PARTS=y
354CONFIG_MTD_OF_PARTS=y 369CONFIG_MTD_OF_PARTS=y
370# CONFIG_MTD_AR7_PARTS is not set
355 371
356# 372#
357# User Modules And Translation Layers 373# User Modules And Translation Layers
@@ -443,12 +459,14 @@ CONFIG_BLK_DEV_RAM_SIZE=35000
443# CONFIG_CDROM_PKTCDVD is not set 459# CONFIG_CDROM_PKTCDVD is not set
444# CONFIG_ATA_OVER_ETH is not set 460# CONFIG_ATA_OVER_ETH is not set
445# CONFIG_XILINX_SYSACE is not set 461# CONFIG_XILINX_SYSACE is not set
462# CONFIG_BLK_DEV_HD is not set
446CONFIG_MISC_DEVICES=y 463CONFIG_MISC_DEVICES=y
447# CONFIG_PHANTOM is not set 464# CONFIG_PHANTOM is not set
448# CONFIG_EEPROM_93CX6 is not set 465# CONFIG_EEPROM_93CX6 is not set
449# CONFIG_SGI_IOC4 is not set 466# CONFIG_SGI_IOC4 is not set
450# CONFIG_TIFM_CORE is not set 467# CONFIG_TIFM_CORE is not set
451# CONFIG_ENCLOSURE_SERVICES is not set 468# CONFIG_ENCLOSURE_SERVICES is not set
469# CONFIG_HP_ILO is not set
452CONFIG_HAVE_IDE=y 470CONFIG_HAVE_IDE=y
453# CONFIG_IDE is not set 471# CONFIG_IDE is not set
454 472
@@ -466,12 +484,15 @@ CONFIG_HAVE_IDE=y
466# 484#
467# IEEE 1394 (FireWire) support 485# IEEE 1394 (FireWire) support
468# 486#
487
488#
489# Enable only one of the two stacks, unless you know what you are doing
490#
469# CONFIG_FIREWIRE is not set 491# CONFIG_FIREWIRE is not set
470# CONFIG_IEEE1394 is not set 492# CONFIG_IEEE1394 is not set
471# CONFIG_I2O is not set 493# CONFIG_I2O is not set
472# CONFIG_MACINTOSH_DRIVERS is not set 494# CONFIG_MACINTOSH_DRIVERS is not set
473CONFIG_NETDEVICES=y 495CONFIG_NETDEVICES=y
474# CONFIG_NETDEVICES_MULTIQUEUE is not set
475# CONFIG_DUMMY is not set 496# CONFIG_DUMMY is not set
476# CONFIG_BONDING is not set 497# CONFIG_BONDING is not set
477# CONFIG_MACVLAN is not set 498# CONFIG_MACVLAN is not set
@@ -506,7 +527,6 @@ CONFIG_NETDEV_1000=y
506# CONFIG_DL2K is not set 527# CONFIG_DL2K is not set
507# CONFIG_E1000 is not set 528# CONFIG_E1000 is not set
508# CONFIG_E1000E is not set 529# CONFIG_E1000E is not set
509# CONFIG_E1000E_ENABLED is not set
510# CONFIG_IP1000 is not set 530# CONFIG_IP1000 is not set
511# CONFIG_IGB is not set 531# CONFIG_IGB is not set
512# CONFIG_NS83820 is not set 532# CONFIG_NS83820 is not set
@@ -516,12 +536,12 @@ CONFIG_NETDEV_1000=y
516# CONFIG_SIS190 is not set 536# CONFIG_SIS190 is not set
517# CONFIG_SKGE is not set 537# CONFIG_SKGE is not set
518# CONFIG_SKY2 is not set 538# CONFIG_SKY2 is not set
519# CONFIG_SK98LIN is not set
520# CONFIG_VIA_VELOCITY is not set 539# CONFIG_VIA_VELOCITY is not set
521# CONFIG_TIGON3 is not set 540# CONFIG_TIGON3 is not set
522# CONFIG_BNX2 is not set 541# CONFIG_BNX2 is not set
523# CONFIG_QLA3XXX is not set 542# CONFIG_QLA3XXX is not set
524# CONFIG_ATL1 is not set 543# CONFIG_ATL1 is not set
544# CONFIG_ATL1E is not set
525CONFIG_NETDEV_10000=y 545CONFIG_NETDEV_10000=y
526# CONFIG_CHELSIO_T1 is not set 546# CONFIG_CHELSIO_T1 is not set
527# CONFIG_CHELSIO_T3 is not set 547# CONFIG_CHELSIO_T3 is not set
@@ -534,6 +554,7 @@ CONFIG_NETDEV_10000=y
534# CONFIG_MLX4_CORE is not set 554# CONFIG_MLX4_CORE is not set
535# CONFIG_TEHUTI is not set 555# CONFIG_TEHUTI is not set
536# CONFIG_BNX2X is not set 556# CONFIG_BNX2X is not set
557# CONFIG_SFC is not set
537# CONFIG_TR is not set 558# CONFIG_TR is not set
538 559
539# 560#
@@ -541,6 +562,7 @@ CONFIG_NETDEV_10000=y
541# 562#
542# CONFIG_WLAN_PRE80211 is not set 563# CONFIG_WLAN_PRE80211 is not set
543# CONFIG_WLAN_80211 is not set 564# CONFIG_WLAN_80211 is not set
565# CONFIG_IWLWIFI_LEDS is not set
544 566
545# 567#
546# USB Network Adapters 568# USB Network Adapters
@@ -576,6 +598,7 @@ CONFIG_NETDEV_10000=y
576# Character devices 598# Character devices
577# 599#
578# CONFIG_VT is not set 600# CONFIG_VT is not set
601CONFIG_DEVKMEM=y
579# CONFIG_SERIAL_NONSTANDARD is not set 602# CONFIG_SERIAL_NONSTANDARD is not set
580# CONFIG_NOZOMI is not set 603# CONFIG_NOZOMI is not set
581 604
@@ -614,12 +637,9 @@ CONFIG_LEGACY_PTY_COUNT=256
614# CONFIG_TCG_TPM is not set 637# CONFIG_TCG_TPM is not set
615CONFIG_DEVPORT=y 638CONFIG_DEVPORT=y
616# CONFIG_I2C is not set 639# CONFIG_I2C is not set
617
618#
619# SPI support
620#
621# CONFIG_SPI is not set 640# CONFIG_SPI is not set
622# CONFIG_SPI_MASTER is not set 641CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
642# CONFIG_GPIOLIB is not set
623# CONFIG_W1 is not set 643# CONFIG_W1 is not set
624# CONFIG_POWER_SUPPLY is not set 644# CONFIG_POWER_SUPPLY is not set
625# CONFIG_HWMON is not set 645# CONFIG_HWMON is not set
@@ -635,13 +655,24 @@ CONFIG_SSB_POSSIBLE=y
635# 655#
636# Multifunction device drivers 656# Multifunction device drivers
637# 657#
658# CONFIG_MFD_CORE is not set
638# CONFIG_MFD_SM501 is not set 659# CONFIG_MFD_SM501 is not set
660# CONFIG_HTC_PASIC3 is not set
639 661
640# 662#
641# Multimedia devices 663# Multimedia devices
642# 664#
665
666#
667# Multimedia core support
668#
643# CONFIG_VIDEO_DEV is not set 669# CONFIG_VIDEO_DEV is not set
644# CONFIG_DVB_CORE is not set 670# CONFIG_DVB_CORE is not set
671# CONFIG_VIDEO_MEDIA is not set
672
673#
674# Multimedia drivers
675#
645# CONFIG_DAB is not set 676# CONFIG_DAB is not set
646 677
647# 678#
@@ -658,10 +689,6 @@ CONFIG_VIDEO_OUTPUT_CONTROL=m
658# Display device support 689# Display device support
659# 690#
660# CONFIG_DISPLAY_SUPPORT is not set 691# CONFIG_DISPLAY_SUPPORT is not set
661
662#
663# Sound
664#
665# CONFIG_SOUND is not set 692# CONFIG_SOUND is not set
666CONFIG_USB_SUPPORT=y 693CONFIG_USB_SUPPORT=y
667CONFIG_USB_ARCH_HAS_HCD=y 694CONFIG_USB_ARCH_HAS_HCD=y
@@ -678,12 +705,16 @@ CONFIG_USB_DEVICEFS=y
678CONFIG_USB_DEVICE_CLASS=y 705CONFIG_USB_DEVICE_CLASS=y
679# CONFIG_USB_DYNAMIC_MINORS is not set 706# CONFIG_USB_DYNAMIC_MINORS is not set
680# CONFIG_USB_OTG is not set 707# CONFIG_USB_OTG is not set
708# CONFIG_USB_OTG_WHITELIST is not set
709# CONFIG_USB_OTG_BLACKLIST_HUB is not set
681 710
682# 711#
683# USB Host Controller Drivers 712# USB Host Controller Drivers
684# 713#
714# CONFIG_USB_C67X00_HCD is not set
685# CONFIG_USB_EHCI_HCD is not set 715# CONFIG_USB_EHCI_HCD is not set
686# CONFIG_USB_ISP116X_HCD is not set 716# CONFIG_USB_ISP116X_HCD is not set
717# CONFIG_USB_ISP1760_HCD is not set
687CONFIG_USB_OHCI_HCD=y 718CONFIG_USB_OHCI_HCD=y
688CONFIG_USB_OHCI_HCD_PPC_OF=y 719CONFIG_USB_OHCI_HCD_PPC_OF=y
689CONFIG_USB_OHCI_HCD_PPC_OF_BE=y 720CONFIG_USB_OHCI_HCD_PPC_OF_BE=y
@@ -701,6 +732,7 @@ CONFIG_USB_OHCI_LITTLE_ENDIAN=y
701# 732#
702# CONFIG_USB_ACM is not set 733# CONFIG_USB_ACM is not set
703# CONFIG_USB_PRINTER is not set 734# CONFIG_USB_PRINTER is not set
735# CONFIG_USB_WDM is not set
704 736
705# 737#
706# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 738# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
@@ -744,17 +776,16 @@ CONFIG_USB_MON=y
744# CONFIG_USB_TRANCEVIBRATOR is not set 776# CONFIG_USB_TRANCEVIBRATOR is not set
745# CONFIG_USB_IOWARRIOR is not set 777# CONFIG_USB_IOWARRIOR is not set
746# CONFIG_USB_TEST is not set 778# CONFIG_USB_TEST is not set
779# CONFIG_USB_ISIGHTFW is not set
747# CONFIG_USB_GADGET is not set 780# CONFIG_USB_GADGET is not set
748# CONFIG_MMC is not set 781# CONFIG_MMC is not set
749# CONFIG_MEMSTICK is not set 782# CONFIG_MEMSTICK is not set
750# CONFIG_NEW_LEDS is not set 783# CONFIG_NEW_LEDS is not set
784# CONFIG_ACCESSIBILITY is not set
751# CONFIG_INFINIBAND is not set 785# CONFIG_INFINIBAND is not set
752# CONFIG_EDAC is not set 786# CONFIG_EDAC is not set
753# CONFIG_RTC_CLASS is not set 787# CONFIG_RTC_CLASS is not set
754 788# CONFIG_DMADEVICES is not set
755#
756# Userspace I/O
757#
758# CONFIG_UIO is not set 789# CONFIG_UIO is not set
759 790
760# 791#
@@ -769,7 +800,6 @@ CONFIG_EXT2_FS=y
769# CONFIG_JFS_FS is not set 800# CONFIG_JFS_FS is not set
770# CONFIG_FS_POSIX_ACL is not set 801# CONFIG_FS_POSIX_ACL is not set
771# CONFIG_XFS_FS is not set 802# CONFIG_XFS_FS is not set
772# CONFIG_GFS2_FS is not set
773# CONFIG_OCFS2_FS is not set 803# CONFIG_OCFS2_FS is not set
774CONFIG_DNOTIFY=y 804CONFIG_DNOTIFY=y
775CONFIG_INOTIFY=y 805CONFIG_INOTIFY=y
@@ -818,6 +848,7 @@ CONFIG_TMPFS=y
818CONFIG_CRAMFS=y 848CONFIG_CRAMFS=y
819# CONFIG_VXFS_FS is not set 849# CONFIG_VXFS_FS is not set
820# CONFIG_MINIX_FS is not set 850# CONFIG_MINIX_FS is not set
851# CONFIG_OMFS_FS is not set
821# CONFIG_HPFS_FS is not set 852# CONFIG_HPFS_FS is not set
822# CONFIG_QNX4FS_FS is not set 853# CONFIG_QNX4FS_FS is not set
823# CONFIG_ROMFS_FS is not set 854# CONFIG_ROMFS_FS is not set
@@ -828,14 +859,12 @@ CONFIG_NFS_FS=y
828CONFIG_NFS_V3=y 859CONFIG_NFS_V3=y
829# CONFIG_NFS_V3_ACL is not set 860# CONFIG_NFS_V3_ACL is not set
830# CONFIG_NFS_V4 is not set 861# CONFIG_NFS_V4 is not set
831# CONFIG_NFS_DIRECTIO is not set
832# CONFIG_NFSD is not set
833CONFIG_ROOT_NFS=y 862CONFIG_ROOT_NFS=y
863# CONFIG_NFSD is not set
834CONFIG_LOCKD=y 864CONFIG_LOCKD=y
835CONFIG_LOCKD_V4=y 865CONFIG_LOCKD_V4=y
836CONFIG_NFS_COMMON=y 866CONFIG_NFS_COMMON=y
837CONFIG_SUNRPC=y 867CONFIG_SUNRPC=y
838# CONFIG_SUNRPC_BIND34 is not set
839# CONFIG_RPCSEC_GSS_KRB5 is not set 868# CONFIG_RPCSEC_GSS_KRB5 is not set
840# CONFIG_RPCSEC_GSS_SPKM3 is not set 869# CONFIG_RPCSEC_GSS_SPKM3 is not set
841# CONFIG_SMB_FS is not set 870# CONFIG_SMB_FS is not set
@@ -856,8 +885,10 @@ CONFIG_MSDOS_PARTITION=y
856# Library routines 885# Library routines
857# 886#
858CONFIG_BITREVERSE=y 887CONFIG_BITREVERSE=y
888# CONFIG_GENERIC_FIND_FIRST_BIT is not set
859# CONFIG_CRC_CCITT is not set 889# CONFIG_CRC_CCITT is not set
860# CONFIG_CRC16 is not set 890# CONFIG_CRC16 is not set
891# CONFIG_CRC_T10DIF is not set
861# CONFIG_CRC_ITU_T is not set 892# CONFIG_CRC_ITU_T is not set
862CONFIG_CRC32=y 893CONFIG_CRC32=y
863# CONFIG_CRC7 is not set 894# CONFIG_CRC7 is not set
@@ -867,6 +898,7 @@ CONFIG_PLIST=y
867CONFIG_HAS_IOMEM=y 898CONFIG_HAS_IOMEM=y
868CONFIG_HAS_IOPORT=y 899CONFIG_HAS_IOPORT=y
869CONFIG_HAS_DMA=y 900CONFIG_HAS_DMA=y
901CONFIG_HAVE_LMB=y
870 902
871# 903#
872# Kernel hacking 904# Kernel hacking
@@ -874,6 +906,7 @@ CONFIG_HAS_DMA=y
874# CONFIG_PRINTK_TIME is not set 906# CONFIG_PRINTK_TIME is not set
875CONFIG_ENABLE_WARN_DEPRECATED=y 907CONFIG_ENABLE_WARN_DEPRECATED=y
876CONFIG_ENABLE_MUST_CHECK=y 908CONFIG_ENABLE_MUST_CHECK=y
909CONFIG_FRAME_WARN=1024
877CONFIG_MAGIC_SYSRQ=y 910CONFIG_MAGIC_SYSRQ=y
878# CONFIG_UNUSED_SYMBOLS is not set 911# CONFIG_UNUSED_SYMBOLS is not set
879CONFIG_DEBUG_FS=y 912CONFIG_DEBUG_FS=y
@@ -881,9 +914,12 @@ CONFIG_DEBUG_FS=y
881CONFIG_DEBUG_KERNEL=y 914CONFIG_DEBUG_KERNEL=y
882# CONFIG_DEBUG_SHIRQ is not set 915# CONFIG_DEBUG_SHIRQ is not set
883CONFIG_DETECT_SOFTLOCKUP=y 916CONFIG_DETECT_SOFTLOCKUP=y
917# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
918CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
884CONFIG_SCHED_DEBUG=y 919CONFIG_SCHED_DEBUG=y
885# CONFIG_SCHEDSTATS is not set 920# CONFIG_SCHEDSTATS is not set
886# CONFIG_TIMER_STATS is not set 921# CONFIG_TIMER_STATS is not set
922# CONFIG_DEBUG_OBJECTS is not set
887# CONFIG_SLUB_DEBUG_ON is not set 923# CONFIG_SLUB_DEBUG_ON is not set
888# CONFIG_SLUB_STATS is not set 924# CONFIG_SLUB_STATS is not set
889# CONFIG_DEBUG_RT_MUTEXES is not set 925# CONFIG_DEBUG_RT_MUTEXES is not set
@@ -896,17 +932,30 @@ CONFIG_SCHED_DEBUG=y
896CONFIG_DEBUG_BUGVERBOSE=y 932CONFIG_DEBUG_BUGVERBOSE=y
897# CONFIG_DEBUG_INFO is not set 933# CONFIG_DEBUG_INFO is not set
898# CONFIG_DEBUG_VM is not set 934# CONFIG_DEBUG_VM is not set
935# CONFIG_DEBUG_WRITECOUNT is not set
936# CONFIG_DEBUG_MEMORY_INIT is not set
899# CONFIG_DEBUG_LIST is not set 937# CONFIG_DEBUG_LIST is not set
900# CONFIG_DEBUG_SG is not set 938# CONFIG_DEBUG_SG is not set
901# CONFIG_BOOT_PRINTK_DELAY is not set 939# CONFIG_BOOT_PRINTK_DELAY is not set
902# CONFIG_RCU_TORTURE_TEST is not set 940# CONFIG_RCU_TORTURE_TEST is not set
903# CONFIG_BACKTRACE_SELF_TEST is not set 941# CONFIG_BACKTRACE_SELF_TEST is not set
904# CONFIG_FAULT_INJECTION is not set 942# CONFIG_FAULT_INJECTION is not set
943# CONFIG_LATENCYTOP is not set
944CONFIG_HAVE_FTRACE=y
945CONFIG_HAVE_DYNAMIC_FTRACE=y
946# CONFIG_FTRACE is not set
947# CONFIG_SCHED_TRACER is not set
948# CONFIG_CONTEXT_SWITCH_TRACER is not set
905# CONFIG_SAMPLES is not set 949# CONFIG_SAMPLES is not set
950CONFIG_HAVE_ARCH_KGDB=y
951# CONFIG_KGDB is not set
906# CONFIG_DEBUG_STACKOVERFLOW is not set 952# CONFIG_DEBUG_STACKOVERFLOW is not set
907# CONFIG_DEBUG_STACK_USAGE is not set 953# CONFIG_DEBUG_STACK_USAGE is not set
908# CONFIG_DEBUG_PAGEALLOC is not set 954# CONFIG_DEBUG_PAGEALLOC is not set
909# CONFIG_DEBUGGER is not set 955# CONFIG_CODE_PATCHING_SELFTEST is not set
956# CONFIG_FTR_FIXUP_SELFTEST is not set
957# CONFIG_XMON is not set
958# CONFIG_IRQSTACKS is not set
910# CONFIG_VIRQ_DEBUG is not set 959# CONFIG_VIRQ_DEBUG is not set
911# CONFIG_BDI_SWITCH is not set 960# CONFIG_BDI_SWITCH is not set
912# CONFIG_PPC_EARLY_DEBUG is not set 961# CONFIG_PPC_EARLY_DEBUG is not set
@@ -918,51 +967,85 @@ CONFIG_DEBUG_BUGVERBOSE=y
918# CONFIG_SECURITY is not set 967# CONFIG_SECURITY is not set
919# CONFIG_SECURITY_FILE_CAPABILITIES is not set 968# CONFIG_SECURITY_FILE_CAPABILITIES is not set
920CONFIG_CRYPTO=y 969CONFIG_CRYPTO=y
970
971#
972# Crypto core or helper
973#
921CONFIG_CRYPTO_ALGAPI=y 974CONFIG_CRYPTO_ALGAPI=y
922CONFIG_CRYPTO_BLKCIPHER=y 975CONFIG_CRYPTO_BLKCIPHER=y
923# CONFIG_CRYPTO_SEQIV is not set
924CONFIG_CRYPTO_MANAGER=y 976CONFIG_CRYPTO_MANAGER=y
977# CONFIG_CRYPTO_GF128MUL is not set
978# CONFIG_CRYPTO_NULL is not set
979# CONFIG_CRYPTO_CRYPTD is not set
980# CONFIG_CRYPTO_AUTHENC is not set
981# CONFIG_CRYPTO_TEST is not set
982
983#
984# Authenticated Encryption with Associated Data
985#
986# CONFIG_CRYPTO_CCM is not set
987# CONFIG_CRYPTO_GCM is not set
988# CONFIG_CRYPTO_SEQIV is not set
989
990#
991# Block modes
992#
993CONFIG_CRYPTO_CBC=y
994# CONFIG_CRYPTO_CTR is not set
995# CONFIG_CRYPTO_CTS is not set
996CONFIG_CRYPTO_ECB=y
997# CONFIG_CRYPTO_LRW is not set
998CONFIG_CRYPTO_PCBC=y
999# CONFIG_CRYPTO_XTS is not set
1000
1001#
1002# Hash modes
1003#
925# CONFIG_CRYPTO_HMAC is not set 1004# CONFIG_CRYPTO_HMAC is not set
926# CONFIG_CRYPTO_XCBC is not set 1005# CONFIG_CRYPTO_XCBC is not set
927# CONFIG_CRYPTO_NULL is not set 1006
1007#
1008# Digest
1009#
1010# CONFIG_CRYPTO_CRC32C is not set
928# CONFIG_CRYPTO_MD4 is not set 1011# CONFIG_CRYPTO_MD4 is not set
929CONFIG_CRYPTO_MD5=y 1012CONFIG_CRYPTO_MD5=y
1013# CONFIG_CRYPTO_MICHAEL_MIC is not set
1014# CONFIG_CRYPTO_RMD128 is not set
1015# CONFIG_CRYPTO_RMD160 is not set
1016# CONFIG_CRYPTO_RMD256 is not set
1017# CONFIG_CRYPTO_RMD320 is not set
930# CONFIG_CRYPTO_SHA1 is not set 1018# CONFIG_CRYPTO_SHA1 is not set
931# CONFIG_CRYPTO_SHA256 is not set 1019# CONFIG_CRYPTO_SHA256 is not set
932# CONFIG_CRYPTO_SHA512 is not set 1020# CONFIG_CRYPTO_SHA512 is not set
933# CONFIG_CRYPTO_WP512 is not set
934# CONFIG_CRYPTO_TGR192 is not set 1021# CONFIG_CRYPTO_TGR192 is not set
935# CONFIG_CRYPTO_GF128MUL is not set 1022# CONFIG_CRYPTO_WP512 is not set
936CONFIG_CRYPTO_ECB=y 1023
937CONFIG_CRYPTO_CBC=y 1024#
938CONFIG_CRYPTO_PCBC=y 1025# Ciphers
939# CONFIG_CRYPTO_LRW is not set 1026#
940# CONFIG_CRYPTO_XTS is not set
941# CONFIG_CRYPTO_CTR is not set
942# CONFIG_CRYPTO_GCM is not set
943# CONFIG_CRYPTO_CCM is not set
944# CONFIG_CRYPTO_CRYPTD is not set
945CONFIG_CRYPTO_DES=y
946# CONFIG_CRYPTO_FCRYPT is not set
947# CONFIG_CRYPTO_BLOWFISH is not set
948# CONFIG_CRYPTO_TWOFISH is not set
949# CONFIG_CRYPTO_SERPENT is not set
950# CONFIG_CRYPTO_AES is not set 1027# CONFIG_CRYPTO_AES is not set
1028# CONFIG_CRYPTO_ANUBIS is not set
1029# CONFIG_CRYPTO_ARC4 is not set
1030# CONFIG_CRYPTO_BLOWFISH is not set
1031# CONFIG_CRYPTO_CAMELLIA is not set
951# CONFIG_CRYPTO_CAST5 is not set 1032# CONFIG_CRYPTO_CAST5 is not set
952# CONFIG_CRYPTO_CAST6 is not set 1033# CONFIG_CRYPTO_CAST6 is not set
953# CONFIG_CRYPTO_TEA is not set 1034CONFIG_CRYPTO_DES=y
954# CONFIG_CRYPTO_ARC4 is not set 1035# CONFIG_CRYPTO_FCRYPT is not set
955# CONFIG_CRYPTO_KHAZAD is not set 1036# CONFIG_CRYPTO_KHAZAD is not set
956# CONFIG_CRYPTO_ANUBIS is not set
957# CONFIG_CRYPTO_SEED is not set
958# CONFIG_CRYPTO_SALSA20 is not set 1037# CONFIG_CRYPTO_SALSA20 is not set
1038# CONFIG_CRYPTO_SEED is not set
1039# CONFIG_CRYPTO_SERPENT is not set
1040# CONFIG_CRYPTO_TEA is not set
1041# CONFIG_CRYPTO_TWOFISH is not set
1042
1043#
1044# Compression
1045#
959# CONFIG_CRYPTO_DEFLATE is not set 1046# CONFIG_CRYPTO_DEFLATE is not set
960# CONFIG_CRYPTO_MICHAEL_MIC is not set
961# CONFIG_CRYPTO_CRC32C is not set
962# CONFIG_CRYPTO_CAMELLIA is not set
963# CONFIG_CRYPTO_TEST is not set
964# CONFIG_CRYPTO_AUTHENC is not set
965# CONFIG_CRYPTO_LZO is not set 1047# CONFIG_CRYPTO_LZO is not set
966CONFIG_CRYPTO_HW=y 1048CONFIG_CRYPTO_HW=y
967# CONFIG_CRYPTO_DEV_HIFN_795X is not set 1049# CONFIG_CRYPTO_DEV_HIFN_795X is not set
968# CONFIG_PPC_CLOCK is not set 1050# CONFIG_PPC_CLOCK is not set
1051# CONFIG_VIRTUALIZATION is not set
diff --git a/arch/powerpc/configs/40x/kilauea_defconfig b/arch/powerpc/configs/40x/kilauea_defconfig
index 2f475391f1d1..565ed9666c54 100644
--- a/arch/powerpc/configs/40x/kilauea_defconfig
+++ b/arch/powerpc/configs/40x/kilauea_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.25-rc2 3# Linux kernel version: 2.6.27-rc1
4# Fri Feb 15 21:51:43 2008 4# Tue Aug 5 19:36:14 2008
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
@@ -26,8 +26,12 @@ CONFIG_GENERIC_TIME=y
26CONFIG_GENERIC_TIME_VSYSCALL=y 26CONFIG_GENERIC_TIME_VSYSCALL=y
27CONFIG_GENERIC_CLOCKEVENTS=y 27CONFIG_GENERIC_CLOCKEVENTS=y
28CONFIG_GENERIC_HARDIRQS=y 28CONFIG_GENERIC_HARDIRQS=y
29# CONFIG_HAVE_GET_USER_PAGES_FAST is not set
29# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 30# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
30CONFIG_IRQ_PER_CPU=y 31CONFIG_IRQ_PER_CPU=y
32CONFIG_STACKTRACE_SUPPORT=y
33CONFIG_HAVE_LATENCYTOP_SUPPORT=y
34CONFIG_LOCKDEP_SUPPORT=y
31CONFIG_RWSEM_XCHGADD_ALGORITHM=y 35CONFIG_RWSEM_XCHGADD_ALGORITHM=y
32CONFIG_ARCH_HAS_ILOG2_U32=y 36CONFIG_ARCH_HAS_ILOG2_U32=y
33CONFIG_GENERIC_HWEIGHT=y 37CONFIG_GENERIC_HWEIGHT=y
@@ -75,6 +79,7 @@ CONFIG_GROUP_SCHED=y
75CONFIG_USER_SCHED=y 79CONFIG_USER_SCHED=y
76# CONFIG_CGROUP_SCHED is not set 80# CONFIG_CGROUP_SCHED is not set
77CONFIG_SYSFS_DEPRECATED=y 81CONFIG_SYSFS_DEPRECATED=y
82CONFIG_SYSFS_DEPRECATED_V2=y
78# CONFIG_RELAY is not set 83# CONFIG_RELAY is not set
79# CONFIG_NAMESPACES is not set 84# CONFIG_NAMESPACES is not set
80CONFIG_BLK_DEV_INITRD=y 85CONFIG_BLK_DEV_INITRD=y
@@ -83,6 +88,7 @@ CONFIG_INITRAMFS_SOURCE=""
83CONFIG_SYSCTL=y 88CONFIG_SYSCTL=y
84CONFIG_EMBEDDED=y 89CONFIG_EMBEDDED=y
85CONFIG_SYSCTL_SYSCALL=y 90CONFIG_SYSCTL_SYSCALL=y
91CONFIG_SYSCTL_SYSCALL_CHECK=y
86CONFIG_KALLSYMS=y 92CONFIG_KALLSYMS=y
87CONFIG_KALLSYMS_ALL=y 93CONFIG_KALLSYMS_ALL=y
88CONFIG_KALLSYMS_EXTRA_PASS=y 94CONFIG_KALLSYMS_EXTRA_PASS=y
@@ -108,13 +114,22 @@ CONFIG_SLUB=y
108# CONFIG_MARKERS is not set 114# CONFIG_MARKERS is not set
109CONFIG_HAVE_OPROFILE=y 115CONFIG_HAVE_OPROFILE=y
110# CONFIG_KPROBES is not set 116# CONFIG_KPROBES is not set
117CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y
118CONFIG_HAVE_IOREMAP_PROT=y
111CONFIG_HAVE_KPROBES=y 119CONFIG_HAVE_KPROBES=y
120CONFIG_HAVE_KRETPROBES=y
121CONFIG_HAVE_ARCH_TRACEHOOK=y
122# CONFIG_HAVE_DMA_ATTRS is not set
123# CONFIG_USE_GENERIC_SMP_HELPERS is not set
124# CONFIG_HAVE_CLK is not set
112CONFIG_PROC_PAGE_MONITOR=y 125CONFIG_PROC_PAGE_MONITOR=y
126# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
113CONFIG_SLABINFO=y 127CONFIG_SLABINFO=y
114CONFIG_RT_MUTEXES=y 128CONFIG_RT_MUTEXES=y
115# CONFIG_TINY_SHMEM is not set 129# CONFIG_TINY_SHMEM is not set
116CONFIG_BASE_SMALL=0 130CONFIG_BASE_SMALL=0
117CONFIG_MODULES=y 131CONFIG_MODULES=y
132# CONFIG_MODULE_FORCE_LOAD is not set
118CONFIG_MODULE_UNLOAD=y 133CONFIG_MODULE_UNLOAD=y
119# CONFIG_MODULE_FORCE_UNLOAD is not set 134# CONFIG_MODULE_FORCE_UNLOAD is not set
120# CONFIG_MODVERSIONS is not set 135# CONFIG_MODVERSIONS is not set
@@ -125,6 +140,7 @@ CONFIG_LBD=y
125# CONFIG_BLK_DEV_IO_TRACE is not set 140# CONFIG_BLK_DEV_IO_TRACE is not set
126# CONFIG_LSF is not set 141# CONFIG_LSF is not set
127# CONFIG_BLK_DEV_BSG is not set 142# CONFIG_BLK_DEV_BSG is not set
143# CONFIG_BLK_DEV_INTEGRITY is not set
128 144
129# 145#
130# IO Schedulers 146# IO Schedulers
@@ -139,14 +155,11 @@ CONFIG_DEFAULT_AS=y
139# CONFIG_DEFAULT_NOOP is not set 155# CONFIG_DEFAULT_NOOP is not set
140CONFIG_DEFAULT_IOSCHED="anticipatory" 156CONFIG_DEFAULT_IOSCHED="anticipatory"
141CONFIG_CLASSIC_RCU=y 157CONFIG_CLASSIC_RCU=y
142# CONFIG_PREEMPT_RCU is not set
143CONFIG_PPC4xx_PCI_EXPRESS=y 158CONFIG_PPC4xx_PCI_EXPRESS=y
144 159
145# 160#
146# Platform support 161# Platform support
147# 162#
148# CONFIG_PPC_MPC512x is not set
149# CONFIG_PPC_MPC5121 is not set
150# CONFIG_PPC_CELL is not set 163# CONFIG_PPC_CELL is not set
151# CONFIG_PPC_CELL_NATIVE is not set 164# CONFIG_PPC_CELL_NATIVE is not set
152# CONFIG_PQ2ADS is not set 165# CONFIG_PQ2ADS is not set
@@ -186,7 +199,6 @@ CONFIG_HZ=250
186CONFIG_PREEMPT_NONE=y 199CONFIG_PREEMPT_NONE=y
187# CONFIG_PREEMPT_VOLUNTARY is not set 200# CONFIG_PREEMPT_VOLUNTARY is not set
188# CONFIG_PREEMPT is not set 201# CONFIG_PREEMPT is not set
189CONFIG_RCU_TRACE=y
190CONFIG_BINFMT_ELF=y 202CONFIG_BINFMT_ELF=y
191# CONFIG_BINFMT_MISC is not set 203# CONFIG_BINFMT_MISC is not set
192# CONFIG_MATH_EMULATION is not set 204# CONFIG_MATH_EMULATION is not set
@@ -204,13 +216,17 @@ CONFIG_FLATMEM=y
204CONFIG_FLAT_NODE_MEM_MAP=y 216CONFIG_FLAT_NODE_MEM_MAP=y
205# CONFIG_SPARSEMEM_STATIC is not set 217# CONFIG_SPARSEMEM_STATIC is not set
206# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set 218# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
219CONFIG_PAGEFLAGS_EXTENDED=y
207CONFIG_SPLIT_PTLOCK_CPUS=4 220CONFIG_SPLIT_PTLOCK_CPUS=4
221CONFIG_MIGRATION=y
208# CONFIG_RESOURCES_64BIT is not set 222# CONFIG_RESOURCES_64BIT is not set
209CONFIG_ZONE_DMA_FLAG=1 223CONFIG_ZONE_DMA_FLAG=1
210CONFIG_BOUNCE=y 224CONFIG_BOUNCE=y
211CONFIG_VIRT_TO_BUS=y 225CONFIG_VIRT_TO_BUS=y
226CONFIG_FORCE_MAX_ZONEORDER=11
212CONFIG_PROC_DEVICETREE=y 227CONFIG_PROC_DEVICETREE=y
213# CONFIG_CMDLINE_BOOL is not set 228# CONFIG_CMDLINE_BOOL is not set
229CONFIG_EXTRA_TARGETS=""
214# CONFIG_PM is not set 230# CONFIG_PM is not set
215CONFIG_SECCOMP=y 231CONFIG_SECCOMP=y
216CONFIG_ISA_DMA_API=y 232CONFIG_ISA_DMA_API=y
@@ -220,6 +236,8 @@ CONFIG_ISA_DMA_API=y
220# 236#
221CONFIG_ZONE_DMA=y 237CONFIG_ZONE_DMA=y
222CONFIG_PPC_INDIRECT_PCI=y 238CONFIG_PPC_INDIRECT_PCI=y
239CONFIG_4xx_SOC=y
240CONFIG_PPC_PCI_CHOICE=y
223CONFIG_PCI=y 241CONFIG_PCI=y
224CONFIG_PCI_DOMAINS=y 242CONFIG_PCI_DOMAINS=y
225CONFIG_PCI_SYSCALL=y 243CONFIG_PCI_SYSCALL=y
@@ -230,6 +248,7 @@ CONFIG_PCI_LEGACY=y
230# CONFIG_PCI_DEBUG is not set 248# CONFIG_PCI_DEBUG is not set
231# CONFIG_PCCARD is not set 249# CONFIG_PCCARD is not set
232# CONFIG_HOTPLUG_PCI is not set 250# CONFIG_HOTPLUG_PCI is not set
251# CONFIG_HAS_RAPIDIO is not set
233 252
234# 253#
235# Advanced setup 254# Advanced setup
@@ -239,17 +258,13 @@ CONFIG_PCI_LEGACY=y
239# 258#
240# Default settings for advanced configuration options are used 259# Default settings for advanced configuration options are used
241# 260#
242CONFIG_HIGHMEM_START=0xfe000000
243CONFIG_LOWMEM_SIZE=0x30000000 261CONFIG_LOWMEM_SIZE=0x30000000
262CONFIG_PAGE_OFFSET=0xc0000000
244CONFIG_KERNEL_START=0xc0000000 263CONFIG_KERNEL_START=0xc0000000
264CONFIG_PHYSICAL_START=0x00000000
245CONFIG_TASK_SIZE=0xc0000000 265CONFIG_TASK_SIZE=0xc0000000
246CONFIG_CONSISTENT_START=0xff100000 266CONFIG_CONSISTENT_START=0xff100000
247CONFIG_CONSISTENT_SIZE=0x00200000 267CONFIG_CONSISTENT_SIZE=0x00200000
248CONFIG_BOOT_LOAD=0x00400000
249
250#
251# Networking
252#
253CONFIG_NET=y 268CONFIG_NET=y
254 269
255# 270#
@@ -287,8 +302,6 @@ CONFIG_TCP_CONG_CUBIC=y
287CONFIG_DEFAULT_TCP_CONG="cubic" 302CONFIG_DEFAULT_TCP_CONG="cubic"
288# CONFIG_TCP_MD5SIG is not set 303# CONFIG_TCP_MD5SIG is not set
289# CONFIG_IPV6 is not set 304# CONFIG_IPV6 is not set
290# CONFIG_INET6_XFRM_TUNNEL is not set
291# CONFIG_INET6_TUNNEL is not set
292# CONFIG_NETWORK_SECMARK is not set 305# CONFIG_NETWORK_SECMARK is not set
293# CONFIG_NETFILTER is not set 306# CONFIG_NETFILTER is not set
294# CONFIG_IP_DCCP is not set 307# CONFIG_IP_DCCP is not set
@@ -338,6 +351,8 @@ CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
338CONFIG_STANDALONE=y 351CONFIG_STANDALONE=y
339CONFIG_PREVENT_FIRMWARE_BUILD=y 352CONFIG_PREVENT_FIRMWARE_BUILD=y
340CONFIG_FW_LOADER=y 353CONFIG_FW_LOADER=y
354CONFIG_FIRMWARE_IN_KERNEL=y
355CONFIG_EXTRA_FIRMWARE=""
341# CONFIG_DEBUG_DRIVER is not set 356# CONFIG_DEBUG_DRIVER is not set
342# CONFIG_DEBUG_DEVRES is not set 357# CONFIG_DEBUG_DEVRES is not set
343# CONFIG_SYS_HYPERVISOR is not set 358# CONFIG_SYS_HYPERVISOR is not set
@@ -350,6 +365,7 @@ CONFIG_MTD_PARTITIONS=y
350# CONFIG_MTD_REDBOOT_PARTS is not set 365# CONFIG_MTD_REDBOOT_PARTS is not set
351CONFIG_MTD_CMDLINE_PARTS=y 366CONFIG_MTD_CMDLINE_PARTS=y
352CONFIG_MTD_OF_PARTS=y 367CONFIG_MTD_OF_PARTS=y
368# CONFIG_MTD_AR7_PARTS is not set
353 369
354# 370#
355# User Modules And Translation Layers 371# User Modules And Translation Layers
@@ -440,6 +456,7 @@ CONFIG_BLK_DEV_RAM_SIZE=35000
440# CONFIG_CDROM_PKTCDVD is not set 456# CONFIG_CDROM_PKTCDVD is not set
441# CONFIG_ATA_OVER_ETH is not set 457# CONFIG_ATA_OVER_ETH is not set
442# CONFIG_XILINX_SYSACE is not set 458# CONFIG_XILINX_SYSACE is not set
459# CONFIG_BLK_DEV_HD is not set
443# CONFIG_MISC_DEVICES is not set 460# CONFIG_MISC_DEVICES is not set
444CONFIG_HAVE_IDE=y 461CONFIG_HAVE_IDE=y
445# CONFIG_IDE is not set 462# CONFIG_IDE is not set
@@ -458,12 +475,15 @@ CONFIG_HAVE_IDE=y
458# 475#
459# IEEE 1394 (FireWire) support 476# IEEE 1394 (FireWire) support
460# 477#
478
479#
480# Enable only one of the two stacks, unless you know what you are doing
481#
461# CONFIG_FIREWIRE is not set 482# CONFIG_FIREWIRE is not set
462# CONFIG_IEEE1394 is not set 483# CONFIG_IEEE1394 is not set
463# CONFIG_I2O is not set 484# CONFIG_I2O is not set
464# CONFIG_MACINTOSH_DRIVERS is not set 485# CONFIG_MACINTOSH_DRIVERS is not set
465CONFIG_NETDEVICES=y 486CONFIG_NETDEVICES=y
466# CONFIG_NETDEVICES_MULTIQUEUE is not set
467# CONFIG_DUMMY is not set 487# CONFIG_DUMMY is not set
468# CONFIG_BONDING is not set 488# CONFIG_BONDING is not set
469# CONFIG_MACVLAN is not set 489# CONFIG_MACVLAN is not set
@@ -502,6 +522,7 @@ CONFIG_IBM_NEW_EMAC_EMAC4=y
502# 522#
503# CONFIG_WLAN_PRE80211 is not set 523# CONFIG_WLAN_PRE80211 is not set
504# CONFIG_WLAN_80211 is not set 524# CONFIG_WLAN_80211 is not set
525# CONFIG_IWLWIFI_LEDS is not set
505# CONFIG_WAN is not set 526# CONFIG_WAN is not set
506# CONFIG_FDDI is not set 527# CONFIG_FDDI is not set
507# CONFIG_HIPPI is not set 528# CONFIG_HIPPI is not set
@@ -528,6 +549,7 @@ CONFIG_IBM_NEW_EMAC_EMAC4=y
528# Character devices 549# Character devices
529# 550#
530# CONFIG_VT is not set 551# CONFIG_VT is not set
552CONFIG_DEVKMEM=y
531# CONFIG_SERIAL_NONSTANDARD is not set 553# CONFIG_SERIAL_NONSTANDARD is not set
532# CONFIG_NOZOMI is not set 554# CONFIG_NOZOMI is not set
533 555
@@ -566,12 +588,9 @@ CONFIG_LEGACY_PTY_COUNT=256
566# CONFIG_TCG_TPM is not set 588# CONFIG_TCG_TPM is not set
567CONFIG_DEVPORT=y 589CONFIG_DEVPORT=y
568# CONFIG_I2C is not set 590# CONFIG_I2C is not set
569
570#
571# SPI support
572#
573# CONFIG_SPI is not set 591# CONFIG_SPI is not set
574# CONFIG_SPI_MASTER is not set 592CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
593# CONFIG_GPIOLIB is not set
575# CONFIG_W1 is not set 594# CONFIG_W1 is not set
576# CONFIG_POWER_SUPPLY is not set 595# CONFIG_POWER_SUPPLY is not set
577# CONFIG_HWMON is not set 596# CONFIG_HWMON is not set
@@ -587,13 +606,24 @@ CONFIG_SSB_POSSIBLE=y
587# 606#
588# Multifunction device drivers 607# Multifunction device drivers
589# 608#
609# CONFIG_MFD_CORE is not set
590# CONFIG_MFD_SM501 is not set 610# CONFIG_MFD_SM501 is not set
611# CONFIG_HTC_PASIC3 is not set
591 612
592# 613#
593# Multimedia devices 614# Multimedia devices
594# 615#
616
617#
618# Multimedia core support
619#
595# CONFIG_VIDEO_DEV is not set 620# CONFIG_VIDEO_DEV is not set
596# CONFIG_DVB_CORE is not set 621# CONFIG_DVB_CORE is not set
622# CONFIG_VIDEO_MEDIA is not set
623
624#
625# Multimedia drivers
626#
597# CONFIG_DAB is not set 627# CONFIG_DAB is not set
598 628
599# 629#
@@ -610,22 +640,16 @@ CONFIG_SSB_POSSIBLE=y
610# Display device support 640# Display device support
611# 641#
612# CONFIG_DISPLAY_SUPPORT is not set 642# CONFIG_DISPLAY_SUPPORT is not set
613
614#
615# Sound
616#
617# CONFIG_SOUND is not set 643# CONFIG_SOUND is not set
618# CONFIG_USB_SUPPORT is not set 644# CONFIG_USB_SUPPORT is not set
619# CONFIG_MMC is not set 645# CONFIG_MMC is not set
620# CONFIG_MEMSTICK is not set 646# CONFIG_MEMSTICK is not set
621# CONFIG_NEW_LEDS is not set 647# CONFIG_NEW_LEDS is not set
648# CONFIG_ACCESSIBILITY is not set
622# CONFIG_INFINIBAND is not set 649# CONFIG_INFINIBAND is not set
623# CONFIG_EDAC is not set 650# CONFIG_EDAC is not set
624# CONFIG_RTC_CLASS is not set 651# CONFIG_RTC_CLASS is not set
625 652# CONFIG_DMADEVICES is not set
626#
627# Userspace I/O
628#
629# CONFIG_UIO is not set 653# CONFIG_UIO is not set
630 654
631# 655#
@@ -640,7 +664,6 @@ CONFIG_EXT2_FS=y
640# CONFIG_JFS_FS is not set 664# CONFIG_JFS_FS is not set
641# CONFIG_FS_POSIX_ACL is not set 665# CONFIG_FS_POSIX_ACL is not set
642# CONFIG_XFS_FS is not set 666# CONFIG_XFS_FS is not set
643# CONFIG_GFS2_FS is not set
644# CONFIG_OCFS2_FS is not set 667# CONFIG_OCFS2_FS is not set
645CONFIG_DNOTIFY=y 668CONFIG_DNOTIFY=y
646CONFIG_INOTIFY=y 669CONFIG_INOTIFY=y
@@ -689,6 +712,7 @@ CONFIG_TMPFS=y
689CONFIG_CRAMFS=y 712CONFIG_CRAMFS=y
690# CONFIG_VXFS_FS is not set 713# CONFIG_VXFS_FS is not set
691# CONFIG_MINIX_FS is not set 714# CONFIG_MINIX_FS is not set
715# CONFIG_OMFS_FS is not set
692# CONFIG_HPFS_FS is not set 716# CONFIG_HPFS_FS is not set
693# CONFIG_QNX4FS_FS is not set 717# CONFIG_QNX4FS_FS is not set
694# CONFIG_ROMFS_FS is not set 718# CONFIG_ROMFS_FS is not set
@@ -699,14 +723,12 @@ CONFIG_NFS_FS=y
699CONFIG_NFS_V3=y 723CONFIG_NFS_V3=y
700# CONFIG_NFS_V3_ACL is not set 724# CONFIG_NFS_V3_ACL is not set
701# CONFIG_NFS_V4 is not set 725# CONFIG_NFS_V4 is not set
702# CONFIG_NFS_DIRECTIO is not set
703# CONFIG_NFSD is not set
704CONFIG_ROOT_NFS=y 726CONFIG_ROOT_NFS=y
727# CONFIG_NFSD is not set
705CONFIG_LOCKD=y 728CONFIG_LOCKD=y
706CONFIG_LOCKD_V4=y 729CONFIG_LOCKD_V4=y
707CONFIG_NFS_COMMON=y 730CONFIG_NFS_COMMON=y
708CONFIG_SUNRPC=y 731CONFIG_SUNRPC=y
709# CONFIG_SUNRPC_BIND34 is not set
710# CONFIG_RPCSEC_GSS_KRB5 is not set 732# CONFIG_RPCSEC_GSS_KRB5 is not set
711# CONFIG_RPCSEC_GSS_SPKM3 is not set 733# CONFIG_RPCSEC_GSS_SPKM3 is not set
712# CONFIG_SMB_FS is not set 734# CONFIG_SMB_FS is not set
@@ -727,8 +749,10 @@ CONFIG_MSDOS_PARTITION=y
727# Library routines 749# Library routines
728# 750#
729CONFIG_BITREVERSE=y 751CONFIG_BITREVERSE=y
752# CONFIG_GENERIC_FIND_FIRST_BIT is not set
730# CONFIG_CRC_CCITT is not set 753# CONFIG_CRC_CCITT is not set
731# CONFIG_CRC16 is not set 754# CONFIG_CRC16 is not set
755# CONFIG_CRC_T10DIF is not set
732# CONFIG_CRC_ITU_T is not set 756# CONFIG_CRC_ITU_T is not set
733CONFIG_CRC32=y 757CONFIG_CRC32=y
734# CONFIG_CRC7 is not set 758# CONFIG_CRC7 is not set
@@ -738,6 +762,7 @@ CONFIG_PLIST=y
738CONFIG_HAS_IOMEM=y 762CONFIG_HAS_IOMEM=y
739CONFIG_HAS_IOPORT=y 763CONFIG_HAS_IOPORT=y
740CONFIG_HAS_DMA=y 764CONFIG_HAS_DMA=y
765CONFIG_HAVE_LMB=y
741 766
742# 767#
743# Kernel hacking 768# Kernel hacking
@@ -745,6 +770,7 @@ CONFIG_HAS_DMA=y
745# CONFIG_PRINTK_TIME is not set 770# CONFIG_PRINTK_TIME is not set
746CONFIG_ENABLE_WARN_DEPRECATED=y 771CONFIG_ENABLE_WARN_DEPRECATED=y
747CONFIG_ENABLE_MUST_CHECK=y 772CONFIG_ENABLE_MUST_CHECK=y
773CONFIG_FRAME_WARN=1024
748CONFIG_MAGIC_SYSRQ=y 774CONFIG_MAGIC_SYSRQ=y
749# CONFIG_UNUSED_SYMBOLS is not set 775# CONFIG_UNUSED_SYMBOLS is not set
750CONFIG_DEBUG_FS=y 776CONFIG_DEBUG_FS=y
@@ -752,9 +778,12 @@ CONFIG_DEBUG_FS=y
752CONFIG_DEBUG_KERNEL=y 778CONFIG_DEBUG_KERNEL=y
753# CONFIG_DEBUG_SHIRQ is not set 779# CONFIG_DEBUG_SHIRQ is not set
754CONFIG_DETECT_SOFTLOCKUP=y 780CONFIG_DETECT_SOFTLOCKUP=y
781# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
782CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
755CONFIG_SCHED_DEBUG=y 783CONFIG_SCHED_DEBUG=y
756# CONFIG_SCHEDSTATS is not set 784# CONFIG_SCHEDSTATS is not set
757# CONFIG_TIMER_STATS is not set 785# CONFIG_TIMER_STATS is not set
786# CONFIG_DEBUG_OBJECTS is not set
758# CONFIG_SLUB_DEBUG_ON is not set 787# CONFIG_SLUB_DEBUG_ON is not set
759# CONFIG_SLUB_STATS is not set 788# CONFIG_SLUB_STATS is not set
760# CONFIG_DEBUG_RT_MUTEXES is not set 789# CONFIG_DEBUG_RT_MUTEXES is not set
@@ -767,17 +796,30 @@ CONFIG_SCHED_DEBUG=y
767CONFIG_DEBUG_BUGVERBOSE=y 796CONFIG_DEBUG_BUGVERBOSE=y
768# CONFIG_DEBUG_INFO is not set 797# CONFIG_DEBUG_INFO is not set
769# CONFIG_DEBUG_VM is not set 798# CONFIG_DEBUG_VM is not set
799# CONFIG_DEBUG_WRITECOUNT is not set
800# CONFIG_DEBUG_MEMORY_INIT is not set
770# CONFIG_DEBUG_LIST is not set 801# CONFIG_DEBUG_LIST is not set
771# CONFIG_DEBUG_SG is not set 802# CONFIG_DEBUG_SG is not set
772# CONFIG_BOOT_PRINTK_DELAY is not set 803# CONFIG_BOOT_PRINTK_DELAY is not set
773# CONFIG_RCU_TORTURE_TEST is not set 804# CONFIG_RCU_TORTURE_TEST is not set
774# CONFIG_BACKTRACE_SELF_TEST is not set 805# CONFIG_BACKTRACE_SELF_TEST is not set
775# CONFIG_FAULT_INJECTION is not set 806# CONFIG_FAULT_INJECTION is not set
807# CONFIG_LATENCYTOP is not set
808CONFIG_HAVE_FTRACE=y
809CONFIG_HAVE_DYNAMIC_FTRACE=y
810# CONFIG_FTRACE is not set
811# CONFIG_SCHED_TRACER is not set
812# CONFIG_CONTEXT_SWITCH_TRACER is not set
776# CONFIG_SAMPLES is not set 813# CONFIG_SAMPLES is not set
814CONFIG_HAVE_ARCH_KGDB=y
815# CONFIG_KGDB is not set
777# CONFIG_DEBUG_STACKOVERFLOW is not set 816# CONFIG_DEBUG_STACKOVERFLOW is not set
778# CONFIG_DEBUG_STACK_USAGE is not set 817# CONFIG_DEBUG_STACK_USAGE is not set
779# CONFIG_DEBUG_PAGEALLOC is not set 818# CONFIG_DEBUG_PAGEALLOC is not set
780# CONFIG_DEBUGGER is not set 819# CONFIG_CODE_PATCHING_SELFTEST is not set
820# CONFIG_FTR_FIXUP_SELFTEST is not set
821# CONFIG_XMON is not set
822# CONFIG_IRQSTACKS is not set
781# CONFIG_VIRQ_DEBUG is not set 823# CONFIG_VIRQ_DEBUG is not set
782# CONFIG_BDI_SWITCH is not set 824# CONFIG_BDI_SWITCH is not set
783# CONFIG_PPC_EARLY_DEBUG is not set 825# CONFIG_PPC_EARLY_DEBUG is not set
@@ -789,51 +831,85 @@ CONFIG_DEBUG_BUGVERBOSE=y
789# CONFIG_SECURITY is not set 831# CONFIG_SECURITY is not set
790# CONFIG_SECURITY_FILE_CAPABILITIES is not set 832# CONFIG_SECURITY_FILE_CAPABILITIES is not set
791CONFIG_CRYPTO=y 833CONFIG_CRYPTO=y
834
835#
836# Crypto core or helper
837#
792CONFIG_CRYPTO_ALGAPI=y 838CONFIG_CRYPTO_ALGAPI=y
793CONFIG_CRYPTO_BLKCIPHER=y 839CONFIG_CRYPTO_BLKCIPHER=y
794# CONFIG_CRYPTO_SEQIV is not set
795CONFIG_CRYPTO_MANAGER=y 840CONFIG_CRYPTO_MANAGER=y
841# CONFIG_CRYPTO_GF128MUL is not set
842# CONFIG_CRYPTO_NULL is not set
843# CONFIG_CRYPTO_CRYPTD is not set
844# CONFIG_CRYPTO_AUTHENC is not set
845# CONFIG_CRYPTO_TEST is not set
846
847#
848# Authenticated Encryption with Associated Data
849#
850# CONFIG_CRYPTO_CCM is not set
851# CONFIG_CRYPTO_GCM is not set
852# CONFIG_CRYPTO_SEQIV is not set
853
854#
855# Block modes
856#
857CONFIG_CRYPTO_CBC=y
858# CONFIG_CRYPTO_CTR is not set
859# CONFIG_CRYPTO_CTS is not set
860CONFIG_CRYPTO_ECB=y
861# CONFIG_CRYPTO_LRW is not set
862CONFIG_CRYPTO_PCBC=y
863# CONFIG_CRYPTO_XTS is not set
864
865#
866# Hash modes
867#
796# CONFIG_CRYPTO_HMAC is not set 868# CONFIG_CRYPTO_HMAC is not set
797# CONFIG_CRYPTO_XCBC is not set 869# CONFIG_CRYPTO_XCBC is not set
798# CONFIG_CRYPTO_NULL is not set 870
871#
872# Digest
873#
874# CONFIG_CRYPTO_CRC32C is not set
799# CONFIG_CRYPTO_MD4 is not set 875# CONFIG_CRYPTO_MD4 is not set
800CONFIG_CRYPTO_MD5=y 876CONFIG_CRYPTO_MD5=y
877# CONFIG_CRYPTO_MICHAEL_MIC is not set
878# CONFIG_CRYPTO_RMD128 is not set
879# CONFIG_CRYPTO_RMD160 is not set
880# CONFIG_CRYPTO_RMD256 is not set
881# CONFIG_CRYPTO_RMD320 is not set
801# CONFIG_CRYPTO_SHA1 is not set 882# CONFIG_CRYPTO_SHA1 is not set
802# CONFIG_CRYPTO_SHA256 is not set 883# CONFIG_CRYPTO_SHA256 is not set
803# CONFIG_CRYPTO_SHA512 is not set 884# CONFIG_CRYPTO_SHA512 is not set
804# CONFIG_CRYPTO_WP512 is not set
805# CONFIG_CRYPTO_TGR192 is not set 885# CONFIG_CRYPTO_TGR192 is not set
806# CONFIG_CRYPTO_GF128MUL is not set 886# CONFIG_CRYPTO_WP512 is not set
807CONFIG_CRYPTO_ECB=y 887
808CONFIG_CRYPTO_CBC=y 888#
809CONFIG_CRYPTO_PCBC=y 889# Ciphers
810# CONFIG_CRYPTO_LRW is not set 890#
811# CONFIG_CRYPTO_XTS is not set
812# CONFIG_CRYPTO_CTR is not set
813# CONFIG_CRYPTO_GCM is not set
814# CONFIG_CRYPTO_CCM is not set
815# CONFIG_CRYPTO_CRYPTD is not set
816CONFIG_CRYPTO_DES=y
817# CONFIG_CRYPTO_FCRYPT is not set
818# CONFIG_CRYPTO_BLOWFISH is not set
819# CONFIG_CRYPTO_TWOFISH is not set
820# CONFIG_CRYPTO_SERPENT is not set
821# CONFIG_CRYPTO_AES is not set 891# CONFIG_CRYPTO_AES is not set
892# CONFIG_CRYPTO_ANUBIS is not set
893# CONFIG_CRYPTO_ARC4 is not set
894# CONFIG_CRYPTO_BLOWFISH is not set
895# CONFIG_CRYPTO_CAMELLIA is not set
822# CONFIG_CRYPTO_CAST5 is not set 896# CONFIG_CRYPTO_CAST5 is not set
823# CONFIG_CRYPTO_CAST6 is not set 897# CONFIG_CRYPTO_CAST6 is not set
824# CONFIG_CRYPTO_TEA is not set 898CONFIG_CRYPTO_DES=y
825# CONFIG_CRYPTO_ARC4 is not set 899# CONFIG_CRYPTO_FCRYPT is not set
826# CONFIG_CRYPTO_KHAZAD is not set 900# CONFIG_CRYPTO_KHAZAD is not set
827# CONFIG_CRYPTO_ANUBIS is not set
828# CONFIG_CRYPTO_SEED is not set
829# CONFIG_CRYPTO_SALSA20 is not set 901# CONFIG_CRYPTO_SALSA20 is not set
902# CONFIG_CRYPTO_SEED is not set
903# CONFIG_CRYPTO_SERPENT is not set
904# CONFIG_CRYPTO_TEA is not set
905# CONFIG_CRYPTO_TWOFISH is not set
906
907#
908# Compression
909#
830# CONFIG_CRYPTO_DEFLATE is not set 910# CONFIG_CRYPTO_DEFLATE is not set
831# CONFIG_CRYPTO_MICHAEL_MIC is not set
832# CONFIG_CRYPTO_CRC32C is not set
833# CONFIG_CRYPTO_CAMELLIA is not set
834# CONFIG_CRYPTO_TEST is not set
835# CONFIG_CRYPTO_AUTHENC is not set
836# CONFIG_CRYPTO_LZO is not set 911# CONFIG_CRYPTO_LZO is not set
837CONFIG_CRYPTO_HW=y 912CONFIG_CRYPTO_HW=y
838# CONFIG_CRYPTO_DEV_HIFN_795X is not set 913# CONFIG_CRYPTO_DEV_HIFN_795X is not set
839# CONFIG_PPC_CLOCK is not set 914# CONFIG_PPC_CLOCK is not set
915# CONFIG_VIRTUALIZATION is not set
diff --git a/arch/powerpc/configs/40x/makalu_defconfig b/arch/powerpc/configs/40x/makalu_defconfig
index 9ef4d8a312c8..987a4481800f 100644
--- a/arch/powerpc/configs/40x/makalu_defconfig
+++ b/arch/powerpc/configs/40x/makalu_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.25-rc2 3# Linux kernel version: 2.6.27-rc1
4# Fri Feb 15 21:52:30 2008 4# Tue Aug 5 19:38:39 2008
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
@@ -26,8 +26,12 @@ CONFIG_GENERIC_TIME=y
26CONFIG_GENERIC_TIME_VSYSCALL=y 26CONFIG_GENERIC_TIME_VSYSCALL=y
27CONFIG_GENERIC_CLOCKEVENTS=y 27CONFIG_GENERIC_CLOCKEVENTS=y
28CONFIG_GENERIC_HARDIRQS=y 28CONFIG_GENERIC_HARDIRQS=y
29# CONFIG_HAVE_GET_USER_PAGES_FAST is not set
29# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 30# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
30CONFIG_IRQ_PER_CPU=y 31CONFIG_IRQ_PER_CPU=y
32CONFIG_STACKTRACE_SUPPORT=y
33CONFIG_HAVE_LATENCYTOP_SUPPORT=y
34CONFIG_LOCKDEP_SUPPORT=y
31CONFIG_RWSEM_XCHGADD_ALGORITHM=y 35CONFIG_RWSEM_XCHGADD_ALGORITHM=y
32CONFIG_ARCH_HAS_ILOG2_U32=y 36CONFIG_ARCH_HAS_ILOG2_U32=y
33CONFIG_GENERIC_HWEIGHT=y 37CONFIG_GENERIC_HWEIGHT=y
@@ -75,6 +79,7 @@ CONFIG_GROUP_SCHED=y
75CONFIG_USER_SCHED=y 79CONFIG_USER_SCHED=y
76# CONFIG_CGROUP_SCHED is not set 80# CONFIG_CGROUP_SCHED is not set
77CONFIG_SYSFS_DEPRECATED=y 81CONFIG_SYSFS_DEPRECATED=y
82CONFIG_SYSFS_DEPRECATED_V2=y
78# CONFIG_RELAY is not set 83# CONFIG_RELAY is not set
79# CONFIG_NAMESPACES is not set 84# CONFIG_NAMESPACES is not set
80CONFIG_BLK_DEV_INITRD=y 85CONFIG_BLK_DEV_INITRD=y
@@ -83,6 +88,7 @@ CONFIG_INITRAMFS_SOURCE=""
83CONFIG_SYSCTL=y 88CONFIG_SYSCTL=y
84CONFIG_EMBEDDED=y 89CONFIG_EMBEDDED=y
85CONFIG_SYSCTL_SYSCALL=y 90CONFIG_SYSCTL_SYSCALL=y
91CONFIG_SYSCTL_SYSCALL_CHECK=y
86CONFIG_KALLSYMS=y 92CONFIG_KALLSYMS=y
87CONFIG_KALLSYMS_ALL=y 93CONFIG_KALLSYMS_ALL=y
88CONFIG_KALLSYMS_EXTRA_PASS=y 94CONFIG_KALLSYMS_EXTRA_PASS=y
@@ -108,13 +114,22 @@ CONFIG_SLUB=y
108# CONFIG_MARKERS is not set 114# CONFIG_MARKERS is not set
109CONFIG_HAVE_OPROFILE=y 115CONFIG_HAVE_OPROFILE=y
110# CONFIG_KPROBES is not set 116# CONFIG_KPROBES is not set
117CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y
118CONFIG_HAVE_IOREMAP_PROT=y
111CONFIG_HAVE_KPROBES=y 119CONFIG_HAVE_KPROBES=y
120CONFIG_HAVE_KRETPROBES=y
121CONFIG_HAVE_ARCH_TRACEHOOK=y
122# CONFIG_HAVE_DMA_ATTRS is not set
123# CONFIG_USE_GENERIC_SMP_HELPERS is not set
124# CONFIG_HAVE_CLK is not set
112CONFIG_PROC_PAGE_MONITOR=y 125CONFIG_PROC_PAGE_MONITOR=y
126# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
113CONFIG_SLABINFO=y 127CONFIG_SLABINFO=y
114CONFIG_RT_MUTEXES=y 128CONFIG_RT_MUTEXES=y
115# CONFIG_TINY_SHMEM is not set 129# CONFIG_TINY_SHMEM is not set
116CONFIG_BASE_SMALL=0 130CONFIG_BASE_SMALL=0
117CONFIG_MODULES=y 131CONFIG_MODULES=y
132# CONFIG_MODULE_FORCE_LOAD is not set
118CONFIG_MODULE_UNLOAD=y 133CONFIG_MODULE_UNLOAD=y
119# CONFIG_MODULE_FORCE_UNLOAD is not set 134# CONFIG_MODULE_FORCE_UNLOAD is not set
120# CONFIG_MODVERSIONS is not set 135# CONFIG_MODVERSIONS is not set
@@ -125,6 +140,7 @@ CONFIG_LBD=y
125# CONFIG_BLK_DEV_IO_TRACE is not set 140# CONFIG_BLK_DEV_IO_TRACE is not set
126# CONFIG_LSF is not set 141# CONFIG_LSF is not set
127# CONFIG_BLK_DEV_BSG is not set 142# CONFIG_BLK_DEV_BSG is not set
143# CONFIG_BLK_DEV_INTEGRITY is not set
128 144
129# 145#
130# IO Schedulers 146# IO Schedulers
@@ -139,14 +155,11 @@ CONFIG_DEFAULT_AS=y
139# CONFIG_DEFAULT_NOOP is not set 155# CONFIG_DEFAULT_NOOP is not set
140CONFIG_DEFAULT_IOSCHED="anticipatory" 156CONFIG_DEFAULT_IOSCHED="anticipatory"
141CONFIG_CLASSIC_RCU=y 157CONFIG_CLASSIC_RCU=y
142# CONFIG_PREEMPT_RCU is not set
143CONFIG_PPC4xx_PCI_EXPRESS=y 158CONFIG_PPC4xx_PCI_EXPRESS=y
144 159
145# 160#
146# Platform support 161# Platform support
147# 162#
148# CONFIG_PPC_MPC512x is not set
149# CONFIG_PPC_MPC5121 is not set
150# CONFIG_PPC_CELL is not set 163# CONFIG_PPC_CELL is not set
151# CONFIG_PPC_CELL_NATIVE is not set 164# CONFIG_PPC_CELL_NATIVE is not set
152# CONFIG_PQ2ADS is not set 165# CONFIG_PQ2ADS is not set
@@ -186,7 +199,6 @@ CONFIG_HZ=250
186CONFIG_PREEMPT_NONE=y 199CONFIG_PREEMPT_NONE=y
187# CONFIG_PREEMPT_VOLUNTARY is not set 200# CONFIG_PREEMPT_VOLUNTARY is not set
188# CONFIG_PREEMPT is not set 201# CONFIG_PREEMPT is not set
189CONFIG_RCU_TRACE=y
190CONFIG_BINFMT_ELF=y 202CONFIG_BINFMT_ELF=y
191# CONFIG_BINFMT_MISC is not set 203# CONFIG_BINFMT_MISC is not set
192# CONFIG_MATH_EMULATION is not set 204# CONFIG_MATH_EMULATION is not set
@@ -204,13 +216,17 @@ CONFIG_FLATMEM=y
204CONFIG_FLAT_NODE_MEM_MAP=y 216CONFIG_FLAT_NODE_MEM_MAP=y
205# CONFIG_SPARSEMEM_STATIC is not set 217# CONFIG_SPARSEMEM_STATIC is not set
206# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set 218# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
219CONFIG_PAGEFLAGS_EXTENDED=y
207CONFIG_SPLIT_PTLOCK_CPUS=4 220CONFIG_SPLIT_PTLOCK_CPUS=4
221CONFIG_MIGRATION=y
208# CONFIG_RESOURCES_64BIT is not set 222# CONFIG_RESOURCES_64BIT is not set
209CONFIG_ZONE_DMA_FLAG=1 223CONFIG_ZONE_DMA_FLAG=1
210CONFIG_BOUNCE=y 224CONFIG_BOUNCE=y
211CONFIG_VIRT_TO_BUS=y 225CONFIG_VIRT_TO_BUS=y
226CONFIG_FORCE_MAX_ZONEORDER=11
212CONFIG_PROC_DEVICETREE=y 227CONFIG_PROC_DEVICETREE=y
213# CONFIG_CMDLINE_BOOL is not set 228# CONFIG_CMDLINE_BOOL is not set
229CONFIG_EXTRA_TARGETS=""
214# CONFIG_PM is not set 230# CONFIG_PM is not set
215CONFIG_SECCOMP=y 231CONFIG_SECCOMP=y
216CONFIG_ISA_DMA_API=y 232CONFIG_ISA_DMA_API=y
@@ -220,6 +236,8 @@ CONFIG_ISA_DMA_API=y
220# 236#
221CONFIG_ZONE_DMA=y 237CONFIG_ZONE_DMA=y
222CONFIG_PPC_INDIRECT_PCI=y 238CONFIG_PPC_INDIRECT_PCI=y
239CONFIG_4xx_SOC=y
240CONFIG_PPC_PCI_CHOICE=y
223CONFIG_PCI=y 241CONFIG_PCI=y
224CONFIG_PCI_DOMAINS=y 242CONFIG_PCI_DOMAINS=y
225CONFIG_PCI_SYSCALL=y 243CONFIG_PCI_SYSCALL=y
@@ -230,6 +248,7 @@ CONFIG_PCI_LEGACY=y
230# CONFIG_PCI_DEBUG is not set 248# CONFIG_PCI_DEBUG is not set
231# CONFIG_PCCARD is not set 249# CONFIG_PCCARD is not set
232# CONFIG_HOTPLUG_PCI is not set 250# CONFIG_HOTPLUG_PCI is not set
251# CONFIG_HAS_RAPIDIO is not set
233 252
234# 253#
235# Advanced setup 254# Advanced setup
@@ -239,17 +258,13 @@ CONFIG_PCI_LEGACY=y
239# 258#
240# Default settings for advanced configuration options are used 259# Default settings for advanced configuration options are used
241# 260#
242CONFIG_HIGHMEM_START=0xfe000000
243CONFIG_LOWMEM_SIZE=0x30000000 261CONFIG_LOWMEM_SIZE=0x30000000
262CONFIG_PAGE_OFFSET=0xc0000000
244CONFIG_KERNEL_START=0xc0000000 263CONFIG_KERNEL_START=0xc0000000
264CONFIG_PHYSICAL_START=0x00000000
245CONFIG_TASK_SIZE=0xc0000000 265CONFIG_TASK_SIZE=0xc0000000
246CONFIG_CONSISTENT_START=0xff100000 266CONFIG_CONSISTENT_START=0xff100000
247CONFIG_CONSISTENT_SIZE=0x00200000 267CONFIG_CONSISTENT_SIZE=0x00200000
248CONFIG_BOOT_LOAD=0x00400000
249
250#
251# Networking
252#
253CONFIG_NET=y 268CONFIG_NET=y
254 269
255# 270#
@@ -287,8 +302,6 @@ CONFIG_TCP_CONG_CUBIC=y
287CONFIG_DEFAULT_TCP_CONG="cubic" 302CONFIG_DEFAULT_TCP_CONG="cubic"
288# CONFIG_TCP_MD5SIG is not set 303# CONFIG_TCP_MD5SIG is not set
289# CONFIG_IPV6 is not set 304# CONFIG_IPV6 is not set
290# CONFIG_INET6_XFRM_TUNNEL is not set
291# CONFIG_INET6_TUNNEL is not set
292# CONFIG_NETWORK_SECMARK is not set 305# CONFIG_NETWORK_SECMARK is not set
293# CONFIG_NETFILTER is not set 306# CONFIG_NETFILTER is not set
294# CONFIG_IP_DCCP is not set 307# CONFIG_IP_DCCP is not set
@@ -338,6 +351,8 @@ CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
338CONFIG_STANDALONE=y 351CONFIG_STANDALONE=y
339CONFIG_PREVENT_FIRMWARE_BUILD=y 352CONFIG_PREVENT_FIRMWARE_BUILD=y
340CONFIG_FW_LOADER=y 353CONFIG_FW_LOADER=y
354CONFIG_FIRMWARE_IN_KERNEL=y
355CONFIG_EXTRA_FIRMWARE=""
341# CONFIG_DEBUG_DRIVER is not set 356# CONFIG_DEBUG_DRIVER is not set
342# CONFIG_DEBUG_DEVRES is not set 357# CONFIG_DEBUG_DEVRES is not set
343# CONFIG_SYS_HYPERVISOR is not set 358# CONFIG_SYS_HYPERVISOR is not set
@@ -350,6 +365,7 @@ CONFIG_MTD_PARTITIONS=y
350# CONFIG_MTD_REDBOOT_PARTS is not set 365# CONFIG_MTD_REDBOOT_PARTS is not set
351CONFIG_MTD_CMDLINE_PARTS=y 366CONFIG_MTD_CMDLINE_PARTS=y
352CONFIG_MTD_OF_PARTS=y 367CONFIG_MTD_OF_PARTS=y
368# CONFIG_MTD_AR7_PARTS is not set
353 369
354# 370#
355# User Modules And Translation Layers 371# User Modules And Translation Layers
@@ -440,6 +456,7 @@ CONFIG_BLK_DEV_RAM_SIZE=35000
440# CONFIG_CDROM_PKTCDVD is not set 456# CONFIG_CDROM_PKTCDVD is not set
441# CONFIG_ATA_OVER_ETH is not set 457# CONFIG_ATA_OVER_ETH is not set
442# CONFIG_XILINX_SYSACE is not set 458# CONFIG_XILINX_SYSACE is not set
459# CONFIG_BLK_DEV_HD is not set
443# CONFIG_MISC_DEVICES is not set 460# CONFIG_MISC_DEVICES is not set
444CONFIG_HAVE_IDE=y 461CONFIG_HAVE_IDE=y
445# CONFIG_IDE is not set 462# CONFIG_IDE is not set
@@ -458,12 +475,15 @@ CONFIG_HAVE_IDE=y
458# 475#
459# IEEE 1394 (FireWire) support 476# IEEE 1394 (FireWire) support
460# 477#
478
479#
480# Enable only one of the two stacks, unless you know what you are doing
481#
461# CONFIG_FIREWIRE is not set 482# CONFIG_FIREWIRE is not set
462# CONFIG_IEEE1394 is not set 483# CONFIG_IEEE1394 is not set
463# CONFIG_I2O is not set 484# CONFIG_I2O is not set
464# CONFIG_MACINTOSH_DRIVERS is not set 485# CONFIG_MACINTOSH_DRIVERS is not set
465CONFIG_NETDEVICES=y 486CONFIG_NETDEVICES=y
466# CONFIG_NETDEVICES_MULTIQUEUE is not set
467# CONFIG_DUMMY is not set 487# CONFIG_DUMMY is not set
468# CONFIG_BONDING is not set 488# CONFIG_BONDING is not set
469# CONFIG_MACVLAN is not set 489# CONFIG_MACVLAN is not set
@@ -502,6 +522,7 @@ CONFIG_IBM_NEW_EMAC_EMAC4=y
502# 522#
503# CONFIG_WLAN_PRE80211 is not set 523# CONFIG_WLAN_PRE80211 is not set
504# CONFIG_WLAN_80211 is not set 524# CONFIG_WLAN_80211 is not set
525# CONFIG_IWLWIFI_LEDS is not set
505# CONFIG_WAN is not set 526# CONFIG_WAN is not set
506# CONFIG_FDDI is not set 527# CONFIG_FDDI is not set
507# CONFIG_HIPPI is not set 528# CONFIG_HIPPI is not set
@@ -528,6 +549,7 @@ CONFIG_IBM_NEW_EMAC_EMAC4=y
528# Character devices 549# Character devices
529# 550#
530# CONFIG_VT is not set 551# CONFIG_VT is not set
552CONFIG_DEVKMEM=y
531# CONFIG_SERIAL_NONSTANDARD is not set 553# CONFIG_SERIAL_NONSTANDARD is not set
532# CONFIG_NOZOMI is not set 554# CONFIG_NOZOMI is not set
533 555
@@ -566,12 +588,9 @@ CONFIG_LEGACY_PTY_COUNT=256
566# CONFIG_TCG_TPM is not set 588# CONFIG_TCG_TPM is not set
567CONFIG_DEVPORT=y 589CONFIG_DEVPORT=y
568# CONFIG_I2C is not set 590# CONFIG_I2C is not set
569
570#
571# SPI support
572#
573# CONFIG_SPI is not set 591# CONFIG_SPI is not set
574# CONFIG_SPI_MASTER is not set 592CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
593# CONFIG_GPIOLIB is not set
575# CONFIG_W1 is not set 594# CONFIG_W1 is not set
576# CONFIG_POWER_SUPPLY is not set 595# CONFIG_POWER_SUPPLY is not set
577# CONFIG_HWMON is not set 596# CONFIG_HWMON is not set
@@ -587,13 +606,24 @@ CONFIG_SSB_POSSIBLE=y
587# 606#
588# Multifunction device drivers 607# Multifunction device drivers
589# 608#
609# CONFIG_MFD_CORE is not set
590# CONFIG_MFD_SM501 is not set 610# CONFIG_MFD_SM501 is not set
611# CONFIG_HTC_PASIC3 is not set
591 612
592# 613#
593# Multimedia devices 614# Multimedia devices
594# 615#
616
617#
618# Multimedia core support
619#
595# CONFIG_VIDEO_DEV is not set 620# CONFIG_VIDEO_DEV is not set
596# CONFIG_DVB_CORE is not set 621# CONFIG_DVB_CORE is not set
622# CONFIG_VIDEO_MEDIA is not set
623
624#
625# Multimedia drivers
626#
597# CONFIG_DAB is not set 627# CONFIG_DAB is not set
598 628
599# 629#
@@ -610,22 +640,16 @@ CONFIG_SSB_POSSIBLE=y
610# Display device support 640# Display device support
611# 641#
612# CONFIG_DISPLAY_SUPPORT is not set 642# CONFIG_DISPLAY_SUPPORT is not set
613
614#
615# Sound
616#
617# CONFIG_SOUND is not set 643# CONFIG_SOUND is not set
618# CONFIG_USB_SUPPORT is not set 644# CONFIG_USB_SUPPORT is not set
619# CONFIG_MMC is not set 645# CONFIG_MMC is not set
620# CONFIG_MEMSTICK is not set 646# CONFIG_MEMSTICK is not set
621# CONFIG_NEW_LEDS is not set 647# CONFIG_NEW_LEDS is not set
648# CONFIG_ACCESSIBILITY is not set
622# CONFIG_INFINIBAND is not set 649# CONFIG_INFINIBAND is not set
623# CONFIG_EDAC is not set 650# CONFIG_EDAC is not set
624# CONFIG_RTC_CLASS is not set 651# CONFIG_RTC_CLASS is not set
625 652# CONFIG_DMADEVICES is not set
626#
627# Userspace I/O
628#
629# CONFIG_UIO is not set 653# CONFIG_UIO is not set
630 654
631# 655#
@@ -640,7 +664,6 @@ CONFIG_EXT2_FS=y
640# CONFIG_JFS_FS is not set 664# CONFIG_JFS_FS is not set
641# CONFIG_FS_POSIX_ACL is not set 665# CONFIG_FS_POSIX_ACL is not set
642# CONFIG_XFS_FS is not set 666# CONFIG_XFS_FS is not set
643# CONFIG_GFS2_FS is not set
644# CONFIG_OCFS2_FS is not set 667# CONFIG_OCFS2_FS is not set
645CONFIG_DNOTIFY=y 668CONFIG_DNOTIFY=y
646CONFIG_INOTIFY=y 669CONFIG_INOTIFY=y
@@ -689,6 +712,7 @@ CONFIG_TMPFS=y
689CONFIG_CRAMFS=y 712CONFIG_CRAMFS=y
690# CONFIG_VXFS_FS is not set 713# CONFIG_VXFS_FS is not set
691# CONFIG_MINIX_FS is not set 714# CONFIG_MINIX_FS is not set
715# CONFIG_OMFS_FS is not set
692# CONFIG_HPFS_FS is not set 716# CONFIG_HPFS_FS is not set
693# CONFIG_QNX4FS_FS is not set 717# CONFIG_QNX4FS_FS is not set
694# CONFIG_ROMFS_FS is not set 718# CONFIG_ROMFS_FS is not set
@@ -699,14 +723,12 @@ CONFIG_NFS_FS=y
699CONFIG_NFS_V3=y 723CONFIG_NFS_V3=y
700# CONFIG_NFS_V3_ACL is not set 724# CONFIG_NFS_V3_ACL is not set
701# CONFIG_NFS_V4 is not set 725# CONFIG_NFS_V4 is not set
702# CONFIG_NFS_DIRECTIO is not set
703# CONFIG_NFSD is not set
704CONFIG_ROOT_NFS=y 726CONFIG_ROOT_NFS=y
727# CONFIG_NFSD is not set
705CONFIG_LOCKD=y 728CONFIG_LOCKD=y
706CONFIG_LOCKD_V4=y 729CONFIG_LOCKD_V4=y
707CONFIG_NFS_COMMON=y 730CONFIG_NFS_COMMON=y
708CONFIG_SUNRPC=y 731CONFIG_SUNRPC=y
709# CONFIG_SUNRPC_BIND34 is not set
710# CONFIG_RPCSEC_GSS_KRB5 is not set 732# CONFIG_RPCSEC_GSS_KRB5 is not set
711# CONFIG_RPCSEC_GSS_SPKM3 is not set 733# CONFIG_RPCSEC_GSS_SPKM3 is not set
712# CONFIG_SMB_FS is not set 734# CONFIG_SMB_FS is not set
@@ -727,8 +749,10 @@ CONFIG_MSDOS_PARTITION=y
727# Library routines 749# Library routines
728# 750#
729CONFIG_BITREVERSE=y 751CONFIG_BITREVERSE=y
752# CONFIG_GENERIC_FIND_FIRST_BIT is not set
730# CONFIG_CRC_CCITT is not set 753# CONFIG_CRC_CCITT is not set
731# CONFIG_CRC16 is not set 754# CONFIG_CRC16 is not set
755# CONFIG_CRC_T10DIF is not set
732# CONFIG_CRC_ITU_T is not set 756# CONFIG_CRC_ITU_T is not set
733CONFIG_CRC32=y 757CONFIG_CRC32=y
734# CONFIG_CRC7 is not set 758# CONFIG_CRC7 is not set
@@ -738,6 +762,7 @@ CONFIG_PLIST=y
738CONFIG_HAS_IOMEM=y 762CONFIG_HAS_IOMEM=y
739CONFIG_HAS_IOPORT=y 763CONFIG_HAS_IOPORT=y
740CONFIG_HAS_DMA=y 764CONFIG_HAS_DMA=y
765CONFIG_HAVE_LMB=y
741 766
742# 767#
743# Kernel hacking 768# Kernel hacking
@@ -745,6 +770,7 @@ CONFIG_HAS_DMA=y
745# CONFIG_PRINTK_TIME is not set 770# CONFIG_PRINTK_TIME is not set
746CONFIG_ENABLE_WARN_DEPRECATED=y 771CONFIG_ENABLE_WARN_DEPRECATED=y
747CONFIG_ENABLE_MUST_CHECK=y 772CONFIG_ENABLE_MUST_CHECK=y
773CONFIG_FRAME_WARN=1024
748CONFIG_MAGIC_SYSRQ=y 774CONFIG_MAGIC_SYSRQ=y
749# CONFIG_UNUSED_SYMBOLS is not set 775# CONFIG_UNUSED_SYMBOLS is not set
750CONFIG_DEBUG_FS=y 776CONFIG_DEBUG_FS=y
@@ -752,9 +778,12 @@ CONFIG_DEBUG_FS=y
752CONFIG_DEBUG_KERNEL=y 778CONFIG_DEBUG_KERNEL=y
753# CONFIG_DEBUG_SHIRQ is not set 779# CONFIG_DEBUG_SHIRQ is not set
754CONFIG_DETECT_SOFTLOCKUP=y 780CONFIG_DETECT_SOFTLOCKUP=y
781# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
782CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
755CONFIG_SCHED_DEBUG=y 783CONFIG_SCHED_DEBUG=y
756# CONFIG_SCHEDSTATS is not set 784# CONFIG_SCHEDSTATS is not set
757# CONFIG_TIMER_STATS is not set 785# CONFIG_TIMER_STATS is not set
786# CONFIG_DEBUG_OBJECTS is not set
758# CONFIG_SLUB_DEBUG_ON is not set 787# CONFIG_SLUB_DEBUG_ON is not set
759# CONFIG_SLUB_STATS is not set 788# CONFIG_SLUB_STATS is not set
760# CONFIG_DEBUG_RT_MUTEXES is not set 789# CONFIG_DEBUG_RT_MUTEXES is not set
@@ -767,17 +796,30 @@ CONFIG_SCHED_DEBUG=y
767CONFIG_DEBUG_BUGVERBOSE=y 796CONFIG_DEBUG_BUGVERBOSE=y
768# CONFIG_DEBUG_INFO is not set 797# CONFIG_DEBUG_INFO is not set
769# CONFIG_DEBUG_VM is not set 798# CONFIG_DEBUG_VM is not set
799# CONFIG_DEBUG_WRITECOUNT is not set
800# CONFIG_DEBUG_MEMORY_INIT is not set
770# CONFIG_DEBUG_LIST is not set 801# CONFIG_DEBUG_LIST is not set
771# CONFIG_DEBUG_SG is not set 802# CONFIG_DEBUG_SG is not set
772# CONFIG_BOOT_PRINTK_DELAY is not set 803# CONFIG_BOOT_PRINTK_DELAY is not set
773# CONFIG_RCU_TORTURE_TEST is not set 804# CONFIG_RCU_TORTURE_TEST is not set
774# CONFIG_BACKTRACE_SELF_TEST is not set 805# CONFIG_BACKTRACE_SELF_TEST is not set
775# CONFIG_FAULT_INJECTION is not set 806# CONFIG_FAULT_INJECTION is not set
807# CONFIG_LATENCYTOP is not set
808CONFIG_HAVE_FTRACE=y
809CONFIG_HAVE_DYNAMIC_FTRACE=y
810# CONFIG_FTRACE is not set
811# CONFIG_SCHED_TRACER is not set
812# CONFIG_CONTEXT_SWITCH_TRACER is not set
776# CONFIG_SAMPLES is not set 813# CONFIG_SAMPLES is not set
814CONFIG_HAVE_ARCH_KGDB=y
815# CONFIG_KGDB is not set
777# CONFIG_DEBUG_STACKOVERFLOW is not set 816# CONFIG_DEBUG_STACKOVERFLOW is not set
778# CONFIG_DEBUG_STACK_USAGE is not set 817# CONFIG_DEBUG_STACK_USAGE is not set
779# CONFIG_DEBUG_PAGEALLOC is not set 818# CONFIG_DEBUG_PAGEALLOC is not set
780# CONFIG_DEBUGGER is not set 819# CONFIG_CODE_PATCHING_SELFTEST is not set
820# CONFIG_FTR_FIXUP_SELFTEST is not set
821# CONFIG_XMON is not set
822# CONFIG_IRQSTACKS is not set
781# CONFIG_VIRQ_DEBUG is not set 823# CONFIG_VIRQ_DEBUG is not set
782# CONFIG_BDI_SWITCH is not set 824# CONFIG_BDI_SWITCH is not set
783# CONFIG_PPC_EARLY_DEBUG is not set 825# CONFIG_PPC_EARLY_DEBUG is not set
@@ -789,51 +831,85 @@ CONFIG_DEBUG_BUGVERBOSE=y
789# CONFIG_SECURITY is not set 831# CONFIG_SECURITY is not set
790# CONFIG_SECURITY_FILE_CAPABILITIES is not set 832# CONFIG_SECURITY_FILE_CAPABILITIES is not set
791CONFIG_CRYPTO=y 833CONFIG_CRYPTO=y
834
835#
836# Crypto core or helper
837#
792CONFIG_CRYPTO_ALGAPI=y 838CONFIG_CRYPTO_ALGAPI=y
793CONFIG_CRYPTO_BLKCIPHER=y 839CONFIG_CRYPTO_BLKCIPHER=y
794# CONFIG_CRYPTO_SEQIV is not set
795CONFIG_CRYPTO_MANAGER=y 840CONFIG_CRYPTO_MANAGER=y
841# CONFIG_CRYPTO_GF128MUL is not set
842# CONFIG_CRYPTO_NULL is not set
843# CONFIG_CRYPTO_CRYPTD is not set
844# CONFIG_CRYPTO_AUTHENC is not set
845# CONFIG_CRYPTO_TEST is not set
846
847#
848# Authenticated Encryption with Associated Data
849#
850# CONFIG_CRYPTO_CCM is not set
851# CONFIG_CRYPTO_GCM is not set
852# CONFIG_CRYPTO_SEQIV is not set
853
854#
855# Block modes
856#
857CONFIG_CRYPTO_CBC=y
858# CONFIG_CRYPTO_CTR is not set
859# CONFIG_CRYPTO_CTS is not set
860CONFIG_CRYPTO_ECB=y
861# CONFIG_CRYPTO_LRW is not set
862CONFIG_CRYPTO_PCBC=y
863# CONFIG_CRYPTO_XTS is not set
864
865#
866# Hash modes
867#
796# CONFIG_CRYPTO_HMAC is not set 868# CONFIG_CRYPTO_HMAC is not set
797# CONFIG_CRYPTO_XCBC is not set 869# CONFIG_CRYPTO_XCBC is not set
798# CONFIG_CRYPTO_NULL is not set 870
871#
872# Digest
873#
874# CONFIG_CRYPTO_CRC32C is not set
799# CONFIG_CRYPTO_MD4 is not set 875# CONFIG_CRYPTO_MD4 is not set
800CONFIG_CRYPTO_MD5=y 876CONFIG_CRYPTO_MD5=y
877# CONFIG_CRYPTO_MICHAEL_MIC is not set
878# CONFIG_CRYPTO_RMD128 is not set
879# CONFIG_CRYPTO_RMD160 is not set
880# CONFIG_CRYPTO_RMD256 is not set
881# CONFIG_CRYPTO_RMD320 is not set
801# CONFIG_CRYPTO_SHA1 is not set 882# CONFIG_CRYPTO_SHA1 is not set
802# CONFIG_CRYPTO_SHA256 is not set 883# CONFIG_CRYPTO_SHA256 is not set
803# CONFIG_CRYPTO_SHA512 is not set 884# CONFIG_CRYPTO_SHA512 is not set
804# CONFIG_CRYPTO_WP512 is not set
805# CONFIG_CRYPTO_TGR192 is not set 885# CONFIG_CRYPTO_TGR192 is not set
806# CONFIG_CRYPTO_GF128MUL is not set 886# CONFIG_CRYPTO_WP512 is not set
807CONFIG_CRYPTO_ECB=y 887
808CONFIG_CRYPTO_CBC=y 888#
809CONFIG_CRYPTO_PCBC=y 889# Ciphers
810# CONFIG_CRYPTO_LRW is not set 890#
811# CONFIG_CRYPTO_XTS is not set
812# CONFIG_CRYPTO_CTR is not set
813# CONFIG_CRYPTO_GCM is not set
814# CONFIG_CRYPTO_CCM is not set
815# CONFIG_CRYPTO_CRYPTD is not set
816CONFIG_CRYPTO_DES=y
817# CONFIG_CRYPTO_FCRYPT is not set
818# CONFIG_CRYPTO_BLOWFISH is not set
819# CONFIG_CRYPTO_TWOFISH is not set
820# CONFIG_CRYPTO_SERPENT is not set
821# CONFIG_CRYPTO_AES is not set 891# CONFIG_CRYPTO_AES is not set
892# CONFIG_CRYPTO_ANUBIS is not set
893# CONFIG_CRYPTO_ARC4 is not set
894# CONFIG_CRYPTO_BLOWFISH is not set
895# CONFIG_CRYPTO_CAMELLIA is not set
822# CONFIG_CRYPTO_CAST5 is not set 896# CONFIG_CRYPTO_CAST5 is not set
823# CONFIG_CRYPTO_CAST6 is not set 897# CONFIG_CRYPTO_CAST6 is not set
824# CONFIG_CRYPTO_TEA is not set 898CONFIG_CRYPTO_DES=y
825# CONFIG_CRYPTO_ARC4 is not set 899# CONFIG_CRYPTO_FCRYPT is not set
826# CONFIG_CRYPTO_KHAZAD is not set 900# CONFIG_CRYPTO_KHAZAD is not set
827# CONFIG_CRYPTO_ANUBIS is not set
828# CONFIG_CRYPTO_SEED is not set
829# CONFIG_CRYPTO_SALSA20 is not set 901# CONFIG_CRYPTO_SALSA20 is not set
902# CONFIG_CRYPTO_SEED is not set
903# CONFIG_CRYPTO_SERPENT is not set
904# CONFIG_CRYPTO_TEA is not set
905# CONFIG_CRYPTO_TWOFISH is not set
906
907#
908# Compression
909#
830# CONFIG_CRYPTO_DEFLATE is not set 910# CONFIG_CRYPTO_DEFLATE is not set
831# CONFIG_CRYPTO_MICHAEL_MIC is not set
832# CONFIG_CRYPTO_CRC32C is not set
833# CONFIG_CRYPTO_CAMELLIA is not set
834# CONFIG_CRYPTO_TEST is not set
835# CONFIG_CRYPTO_AUTHENC is not set
836# CONFIG_CRYPTO_LZO is not set 911# CONFIG_CRYPTO_LZO is not set
837CONFIG_CRYPTO_HW=y 912CONFIG_CRYPTO_HW=y
838# CONFIG_CRYPTO_DEV_HIFN_795X is not set 913# CONFIG_CRYPTO_DEV_HIFN_795X is not set
839# CONFIG_PPC_CLOCK is not set 914# CONFIG_PPC_CLOCK is not set
915# CONFIG_VIRTUALIZATION is not set
diff --git a/arch/powerpc/configs/40x/walnut_defconfig b/arch/powerpc/configs/40x/walnut_defconfig
index 3b2689e5002a..aee79338f41f 100644
--- a/arch/powerpc/configs/40x/walnut_defconfig
+++ b/arch/powerpc/configs/40x/walnut_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.25-rc2 3# Linux kernel version: 2.6.27-rc1
4# Fri Feb 15 21:54:12 2008 4# Tue Aug 5 19:40:56 2008
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
@@ -26,8 +26,12 @@ CONFIG_GENERIC_TIME=y
26CONFIG_GENERIC_TIME_VSYSCALL=y 26CONFIG_GENERIC_TIME_VSYSCALL=y
27CONFIG_GENERIC_CLOCKEVENTS=y 27CONFIG_GENERIC_CLOCKEVENTS=y
28CONFIG_GENERIC_HARDIRQS=y 28CONFIG_GENERIC_HARDIRQS=y
29# CONFIG_HAVE_GET_USER_PAGES_FAST is not set
29# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 30# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
30CONFIG_IRQ_PER_CPU=y 31CONFIG_IRQ_PER_CPU=y
32CONFIG_STACKTRACE_SUPPORT=y
33CONFIG_HAVE_LATENCYTOP_SUPPORT=y
34CONFIG_LOCKDEP_SUPPORT=y
31CONFIG_RWSEM_XCHGADD_ALGORITHM=y 35CONFIG_RWSEM_XCHGADD_ALGORITHM=y
32CONFIG_ARCH_HAS_ILOG2_U32=y 36CONFIG_ARCH_HAS_ILOG2_U32=y
33CONFIG_GENERIC_HWEIGHT=y 37CONFIG_GENERIC_HWEIGHT=y
@@ -75,6 +79,7 @@ CONFIG_FAIR_GROUP_SCHED=y
75CONFIG_USER_SCHED=y 79CONFIG_USER_SCHED=y
76# CONFIG_CGROUP_SCHED is not set 80# CONFIG_CGROUP_SCHED is not set
77CONFIG_SYSFS_DEPRECATED=y 81CONFIG_SYSFS_DEPRECATED=y
82CONFIG_SYSFS_DEPRECATED_V2=y
78# CONFIG_RELAY is not set 83# CONFIG_RELAY is not set
79# CONFIG_NAMESPACES is not set 84# CONFIG_NAMESPACES is not set
80CONFIG_BLK_DEV_INITRD=y 85CONFIG_BLK_DEV_INITRD=y
@@ -83,6 +88,7 @@ CONFIG_INITRAMFS_SOURCE=""
83CONFIG_SYSCTL=y 88CONFIG_SYSCTL=y
84CONFIG_EMBEDDED=y 89CONFIG_EMBEDDED=y
85CONFIG_SYSCTL_SYSCALL=y 90CONFIG_SYSCTL_SYSCALL=y
91CONFIG_SYSCTL_SYSCALL_CHECK=y
86CONFIG_KALLSYMS=y 92CONFIG_KALLSYMS=y
87CONFIG_KALLSYMS_ALL=y 93CONFIG_KALLSYMS_ALL=y
88CONFIG_KALLSYMS_EXTRA_PASS=y 94CONFIG_KALLSYMS_EXTRA_PASS=y
@@ -108,13 +114,22 @@ CONFIG_SLUB=y
108# CONFIG_MARKERS is not set 114# CONFIG_MARKERS is not set
109CONFIG_HAVE_OPROFILE=y 115CONFIG_HAVE_OPROFILE=y
110# CONFIG_KPROBES is not set 116# CONFIG_KPROBES is not set
117CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y
118CONFIG_HAVE_IOREMAP_PROT=y
111CONFIG_HAVE_KPROBES=y 119CONFIG_HAVE_KPROBES=y
120CONFIG_HAVE_KRETPROBES=y
121CONFIG_HAVE_ARCH_TRACEHOOK=y
122# CONFIG_HAVE_DMA_ATTRS is not set
123# CONFIG_USE_GENERIC_SMP_HELPERS is not set
124# CONFIG_HAVE_CLK is not set
112CONFIG_PROC_PAGE_MONITOR=y 125CONFIG_PROC_PAGE_MONITOR=y
126# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
113CONFIG_SLABINFO=y 127CONFIG_SLABINFO=y
114CONFIG_RT_MUTEXES=y 128CONFIG_RT_MUTEXES=y
115# CONFIG_TINY_SHMEM is not set 129# CONFIG_TINY_SHMEM is not set
116CONFIG_BASE_SMALL=0 130CONFIG_BASE_SMALL=0
117CONFIG_MODULES=y 131CONFIG_MODULES=y
132# CONFIG_MODULE_FORCE_LOAD is not set
118CONFIG_MODULE_UNLOAD=y 133CONFIG_MODULE_UNLOAD=y
119# CONFIG_MODULE_FORCE_UNLOAD is not set 134# CONFIG_MODULE_FORCE_UNLOAD is not set
120# CONFIG_MODVERSIONS is not set 135# CONFIG_MODVERSIONS is not set
@@ -125,6 +140,7 @@ CONFIG_LBD=y
125# CONFIG_BLK_DEV_IO_TRACE is not set 140# CONFIG_BLK_DEV_IO_TRACE is not set
126# CONFIG_LSF is not set 141# CONFIG_LSF is not set
127# CONFIG_BLK_DEV_BSG is not set 142# CONFIG_BLK_DEV_BSG is not set
143# CONFIG_BLK_DEV_INTEGRITY is not set
128 144
129# 145#
130# IO Schedulers 146# IO Schedulers
@@ -139,14 +155,11 @@ CONFIG_DEFAULT_AS=y
139# CONFIG_DEFAULT_NOOP is not set 155# CONFIG_DEFAULT_NOOP is not set
140CONFIG_DEFAULT_IOSCHED="anticipatory" 156CONFIG_DEFAULT_IOSCHED="anticipatory"
141CONFIG_CLASSIC_RCU=y 157CONFIG_CLASSIC_RCU=y
142# CONFIG_PREEMPT_RCU is not set
143# CONFIG_PPC4xx_PCI_EXPRESS is not set 158# CONFIG_PPC4xx_PCI_EXPRESS is not set
144 159
145# 160#
146# Platform support 161# Platform support
147# 162#
148# CONFIG_PPC_MPC512x is not set
149# CONFIG_PPC_MPC5121 is not set
150# CONFIG_PPC_CELL is not set 163# CONFIG_PPC_CELL is not set
151# CONFIG_PPC_CELL_NATIVE is not set 164# CONFIG_PPC_CELL_NATIVE is not set
152# CONFIG_PQ2ADS is not set 165# CONFIG_PQ2ADS is not set
@@ -189,7 +202,6 @@ CONFIG_HZ=250
189CONFIG_PREEMPT_NONE=y 202CONFIG_PREEMPT_NONE=y
190# CONFIG_PREEMPT_VOLUNTARY is not set 203# CONFIG_PREEMPT_VOLUNTARY is not set
191# CONFIG_PREEMPT is not set 204# CONFIG_PREEMPT is not set
192CONFIG_RCU_TRACE=y
193CONFIG_BINFMT_ELF=y 205CONFIG_BINFMT_ELF=y
194# CONFIG_BINFMT_MISC is not set 206# CONFIG_BINFMT_MISC is not set
195# CONFIG_MATH_EMULATION is not set 207# CONFIG_MATH_EMULATION is not set
@@ -207,13 +219,17 @@ CONFIG_FLATMEM=y
207CONFIG_FLAT_NODE_MEM_MAP=y 219CONFIG_FLAT_NODE_MEM_MAP=y
208# CONFIG_SPARSEMEM_STATIC is not set 220# CONFIG_SPARSEMEM_STATIC is not set
209# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set 221# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
222CONFIG_PAGEFLAGS_EXTENDED=y
210CONFIG_SPLIT_PTLOCK_CPUS=4 223CONFIG_SPLIT_PTLOCK_CPUS=4
224CONFIG_MIGRATION=y
211CONFIG_RESOURCES_64BIT=y 225CONFIG_RESOURCES_64BIT=y
212CONFIG_ZONE_DMA_FLAG=1 226CONFIG_ZONE_DMA_FLAG=1
213CONFIG_BOUNCE=y 227CONFIG_BOUNCE=y
214CONFIG_VIRT_TO_BUS=y 228CONFIG_VIRT_TO_BUS=y
229CONFIG_FORCE_MAX_ZONEORDER=11
215CONFIG_PROC_DEVICETREE=y 230CONFIG_PROC_DEVICETREE=y
216# CONFIG_CMDLINE_BOOL is not set 231# CONFIG_CMDLINE_BOOL is not set
232CONFIG_EXTRA_TARGETS=""
217# CONFIG_PM is not set 233# CONFIG_PM is not set
218CONFIG_SECCOMP=y 234CONFIG_SECCOMP=y
219CONFIG_ISA_DMA_API=y 235CONFIG_ISA_DMA_API=y
@@ -223,6 +239,8 @@ CONFIG_ISA_DMA_API=y
223# 239#
224CONFIG_ZONE_DMA=y 240CONFIG_ZONE_DMA=y
225CONFIG_PPC_INDIRECT_PCI=y 241CONFIG_PPC_INDIRECT_PCI=y
242CONFIG_4xx_SOC=y
243CONFIG_PPC_PCI_CHOICE=y
226CONFIG_PCI=y 244CONFIG_PCI=y
227CONFIG_PCI_DOMAINS=y 245CONFIG_PCI_DOMAINS=y
228CONFIG_PCI_SYSCALL=y 246CONFIG_PCI_SYSCALL=y
@@ -233,6 +251,7 @@ CONFIG_ARCH_SUPPORTS_MSI=y
233# CONFIG_PCI_DEBUG is not set 251# CONFIG_PCI_DEBUG is not set
234# CONFIG_PCCARD is not set 252# CONFIG_PCCARD is not set
235# CONFIG_HOTPLUG_PCI is not set 253# CONFIG_HOTPLUG_PCI is not set
254# CONFIG_HAS_RAPIDIO is not set
236 255
237# 256#
238# Advanced setup 257# Advanced setup
@@ -242,17 +261,13 @@ CONFIG_ARCH_SUPPORTS_MSI=y
242# 261#
243# Default settings for advanced configuration options are used 262# Default settings for advanced configuration options are used
244# 263#
245CONFIG_HIGHMEM_START=0xfe000000
246CONFIG_LOWMEM_SIZE=0x30000000 264CONFIG_LOWMEM_SIZE=0x30000000
265CONFIG_PAGE_OFFSET=0xc0000000
247CONFIG_KERNEL_START=0xc0000000 266CONFIG_KERNEL_START=0xc0000000
267CONFIG_PHYSICAL_START=0x00000000
248CONFIG_TASK_SIZE=0xc0000000 268CONFIG_TASK_SIZE=0xc0000000
249CONFIG_CONSISTENT_START=0xff100000 269CONFIG_CONSISTENT_START=0xff100000
250CONFIG_CONSISTENT_SIZE=0x00200000 270CONFIG_CONSISTENT_SIZE=0x00200000
251CONFIG_BOOT_LOAD=0x00400000
252
253#
254# Networking
255#
256CONFIG_NET=y 271CONFIG_NET=y
257 272
258# 273#
@@ -290,8 +305,6 @@ CONFIG_TCP_CONG_CUBIC=y
290CONFIG_DEFAULT_TCP_CONG="cubic" 305CONFIG_DEFAULT_TCP_CONG="cubic"
291# CONFIG_TCP_MD5SIG is not set 306# CONFIG_TCP_MD5SIG is not set
292# CONFIG_IPV6 is not set 307# CONFIG_IPV6 is not set
293# CONFIG_INET6_XFRM_TUNNEL is not set
294# CONFIG_INET6_TUNNEL is not set
295# CONFIG_NETWORK_SECMARK is not set 308# CONFIG_NETWORK_SECMARK is not set
296# CONFIG_NETFILTER is not set 309# CONFIG_NETFILTER is not set
297# CONFIG_IP_DCCP is not set 310# CONFIG_IP_DCCP is not set
@@ -341,6 +354,8 @@ CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
341CONFIG_STANDALONE=y 354CONFIG_STANDALONE=y
342CONFIG_PREVENT_FIRMWARE_BUILD=y 355CONFIG_PREVENT_FIRMWARE_BUILD=y
343CONFIG_FW_LOADER=y 356CONFIG_FW_LOADER=y
357CONFIG_FIRMWARE_IN_KERNEL=y
358CONFIG_EXTRA_FIRMWARE=""
344# CONFIG_DEBUG_DRIVER is not set 359# CONFIG_DEBUG_DRIVER is not set
345# CONFIG_DEBUG_DEVRES is not set 360# CONFIG_DEBUG_DEVRES is not set
346# CONFIG_SYS_HYPERVISOR is not set 361# CONFIG_SYS_HYPERVISOR is not set
@@ -353,6 +368,7 @@ CONFIG_MTD_PARTITIONS=y
353# CONFIG_MTD_REDBOOT_PARTS is not set 368# CONFIG_MTD_REDBOOT_PARTS is not set
354CONFIG_MTD_CMDLINE_PARTS=y 369CONFIG_MTD_CMDLINE_PARTS=y
355CONFIG_MTD_OF_PARTS=y 370CONFIG_MTD_OF_PARTS=y
371# CONFIG_MTD_AR7_PARTS is not set
356 372
357# 373#
358# User Modules And Translation Layers 374# User Modules And Translation Layers
@@ -443,12 +459,14 @@ CONFIG_BLK_DEV_RAM_SIZE=35000
443# CONFIG_CDROM_PKTCDVD is not set 459# CONFIG_CDROM_PKTCDVD is not set
444# CONFIG_ATA_OVER_ETH is not set 460# CONFIG_ATA_OVER_ETH is not set
445# CONFIG_XILINX_SYSACE is not set 461# CONFIG_XILINX_SYSACE is not set
462# CONFIG_BLK_DEV_HD is not set
446CONFIG_MISC_DEVICES=y 463CONFIG_MISC_DEVICES=y
447# CONFIG_PHANTOM is not set 464# CONFIG_PHANTOM is not set
448# CONFIG_EEPROM_93CX6 is not set 465# CONFIG_EEPROM_93CX6 is not set
449# CONFIG_SGI_IOC4 is not set 466# CONFIG_SGI_IOC4 is not set
450# CONFIG_TIFM_CORE is not set 467# CONFIG_TIFM_CORE is not set
451# CONFIG_ENCLOSURE_SERVICES is not set 468# CONFIG_ENCLOSURE_SERVICES is not set
469# CONFIG_HP_ILO is not set
452CONFIG_HAVE_IDE=y 470CONFIG_HAVE_IDE=y
453# CONFIG_IDE is not set 471# CONFIG_IDE is not set
454 472
@@ -466,12 +484,15 @@ CONFIG_HAVE_IDE=y
466# 484#
467# IEEE 1394 (FireWire) support 485# IEEE 1394 (FireWire) support
468# 486#
487
488#
489# Enable only one of the two stacks, unless you know what you are doing
490#
469# CONFIG_FIREWIRE is not set 491# CONFIG_FIREWIRE is not set
470# CONFIG_IEEE1394 is not set 492# CONFIG_IEEE1394 is not set
471# CONFIG_I2O is not set 493# CONFIG_I2O is not set
472# CONFIG_MACINTOSH_DRIVERS is not set 494# CONFIG_MACINTOSH_DRIVERS is not set
473CONFIG_NETDEVICES=y 495CONFIG_NETDEVICES=y
474# CONFIG_NETDEVICES_MULTIQUEUE is not set
475# CONFIG_DUMMY is not set 496# CONFIG_DUMMY is not set
476# CONFIG_BONDING is not set 497# CONFIG_BONDING is not set
477# CONFIG_MACVLAN is not set 498# CONFIG_MACVLAN is not set
@@ -506,7 +527,6 @@ CONFIG_NETDEV_1000=y
506# CONFIG_DL2K is not set 527# CONFIG_DL2K is not set
507# CONFIG_E1000 is not set 528# CONFIG_E1000 is not set
508# CONFIG_E1000E is not set 529# CONFIG_E1000E is not set
509# CONFIG_E1000E_ENABLED is not set
510# CONFIG_IP1000 is not set 530# CONFIG_IP1000 is not set
511# CONFIG_IGB is not set 531# CONFIG_IGB is not set
512# CONFIG_NS83820 is not set 532# CONFIG_NS83820 is not set
@@ -516,12 +536,12 @@ CONFIG_NETDEV_1000=y
516# CONFIG_SIS190 is not set 536# CONFIG_SIS190 is not set
517# CONFIG_SKGE is not set 537# CONFIG_SKGE is not set
518# CONFIG_SKY2 is not set 538# CONFIG_SKY2 is not set
519# CONFIG_SK98LIN is not set
520# CONFIG_VIA_VELOCITY is not set 539# CONFIG_VIA_VELOCITY is not set
521# CONFIG_TIGON3 is not set 540# CONFIG_TIGON3 is not set
522# CONFIG_BNX2 is not set 541# CONFIG_BNX2 is not set
523# CONFIG_QLA3XXX is not set 542# CONFIG_QLA3XXX is not set
524# CONFIG_ATL1 is not set 543# CONFIG_ATL1 is not set
544# CONFIG_ATL1E is not set
525CONFIG_NETDEV_10000=y 545CONFIG_NETDEV_10000=y
526# CONFIG_CHELSIO_T1 is not set 546# CONFIG_CHELSIO_T1 is not set
527# CONFIG_CHELSIO_T3 is not set 547# CONFIG_CHELSIO_T3 is not set
@@ -534,6 +554,7 @@ CONFIG_NETDEV_10000=y
534# CONFIG_MLX4_CORE is not set 554# CONFIG_MLX4_CORE is not set
535# CONFIG_TEHUTI is not set 555# CONFIG_TEHUTI is not set
536# CONFIG_BNX2X is not set 556# CONFIG_BNX2X is not set
557# CONFIG_SFC is not set
537# CONFIG_TR is not set 558# CONFIG_TR is not set
538 559
539# 560#
@@ -541,6 +562,7 @@ CONFIG_NETDEV_10000=y
541# 562#
542# CONFIG_WLAN_PRE80211 is not set 563# CONFIG_WLAN_PRE80211 is not set
543# CONFIG_WLAN_80211 is not set 564# CONFIG_WLAN_80211 is not set
565# CONFIG_IWLWIFI_LEDS is not set
544# CONFIG_WAN is not set 566# CONFIG_WAN is not set
545# CONFIG_FDDI is not set 567# CONFIG_FDDI is not set
546# CONFIG_HIPPI is not set 568# CONFIG_HIPPI is not set
@@ -567,6 +589,7 @@ CONFIG_NETDEV_10000=y
567# Character devices 589# Character devices
568# 590#
569# CONFIG_VT is not set 591# CONFIG_VT is not set
592CONFIG_DEVKMEM=y
570# CONFIG_SERIAL_NONSTANDARD is not set 593# CONFIG_SERIAL_NONSTANDARD is not set
571# CONFIG_NOZOMI is not set 594# CONFIG_NOZOMI is not set
572 595
@@ -605,12 +628,9 @@ CONFIG_LEGACY_PTY_COUNT=256
605# CONFIG_TCG_TPM is not set 628# CONFIG_TCG_TPM is not set
606CONFIG_DEVPORT=y 629CONFIG_DEVPORT=y
607# CONFIG_I2C is not set 630# CONFIG_I2C is not set
608
609#
610# SPI support
611#
612# CONFIG_SPI is not set 631# CONFIG_SPI is not set
613# CONFIG_SPI_MASTER is not set 632CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
633# CONFIG_GPIOLIB is not set
614# CONFIG_W1 is not set 634# CONFIG_W1 is not set
615# CONFIG_POWER_SUPPLY is not set 635# CONFIG_POWER_SUPPLY is not set
616# CONFIG_HWMON is not set 636# CONFIG_HWMON is not set
@@ -626,13 +646,24 @@ CONFIG_SSB_POSSIBLE=y
626# 646#
627# Multifunction device drivers 647# Multifunction device drivers
628# 648#
649# CONFIG_MFD_CORE is not set
629# CONFIG_MFD_SM501 is not set 650# CONFIG_MFD_SM501 is not set
651# CONFIG_HTC_PASIC3 is not set
630 652
631# 653#
632# Multimedia devices 654# Multimedia devices
633# 655#
656
657#
658# Multimedia core support
659#
634# CONFIG_VIDEO_DEV is not set 660# CONFIG_VIDEO_DEV is not set
635# CONFIG_DVB_CORE is not set 661# CONFIG_DVB_CORE is not set
662# CONFIG_VIDEO_MEDIA is not set
663
664#
665# Multimedia drivers
666#
636# CONFIG_DAB is not set 667# CONFIG_DAB is not set
637 668
638# 669#
@@ -649,16 +680,14 @@ CONFIG_VIDEO_OUTPUT_CONTROL=m
649# Display device support 680# Display device support
650# 681#
651# CONFIG_DISPLAY_SUPPORT is not set 682# CONFIG_DISPLAY_SUPPORT is not set
652
653#
654# Sound
655#
656# CONFIG_SOUND is not set 683# CONFIG_SOUND is not set
657CONFIG_USB_SUPPORT=y 684CONFIG_USB_SUPPORT=y
658CONFIG_USB_ARCH_HAS_HCD=y 685CONFIG_USB_ARCH_HAS_HCD=y
659CONFIG_USB_ARCH_HAS_OHCI=y 686CONFIG_USB_ARCH_HAS_OHCI=y
660CONFIG_USB_ARCH_HAS_EHCI=y 687CONFIG_USB_ARCH_HAS_EHCI=y
661# CONFIG_USB is not set 688# CONFIG_USB is not set
689# CONFIG_USB_OTG_WHITELIST is not set
690# CONFIG_USB_OTG_BLACKLIST_HUB is not set
662 691
663# 692#
664# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 693# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
@@ -667,13 +696,11 @@ CONFIG_USB_ARCH_HAS_EHCI=y
667# CONFIG_MMC is not set 696# CONFIG_MMC is not set
668# CONFIG_MEMSTICK is not set 697# CONFIG_MEMSTICK is not set
669# CONFIG_NEW_LEDS is not set 698# CONFIG_NEW_LEDS is not set
699# CONFIG_ACCESSIBILITY is not set
670# CONFIG_INFINIBAND is not set 700# CONFIG_INFINIBAND is not set
671# CONFIG_EDAC is not set 701# CONFIG_EDAC is not set
672# CONFIG_RTC_CLASS is not set 702# CONFIG_RTC_CLASS is not set
673 703# CONFIG_DMADEVICES is not set
674#
675# Userspace I/O
676#
677# CONFIG_UIO is not set 704# CONFIG_UIO is not set
678 705
679# 706#
@@ -688,7 +715,6 @@ CONFIG_EXT2_FS=y
688# CONFIG_JFS_FS is not set 715# CONFIG_JFS_FS is not set
689# CONFIG_FS_POSIX_ACL is not set 716# CONFIG_FS_POSIX_ACL is not set
690# CONFIG_XFS_FS is not set 717# CONFIG_XFS_FS is not set
691# CONFIG_GFS2_FS is not set
692# CONFIG_OCFS2_FS is not set 718# CONFIG_OCFS2_FS is not set
693CONFIG_DNOTIFY=y 719CONFIG_DNOTIFY=y
694CONFIG_INOTIFY=y 720CONFIG_INOTIFY=y
@@ -737,6 +763,7 @@ CONFIG_TMPFS=y
737CONFIG_CRAMFS=y 763CONFIG_CRAMFS=y
738# CONFIG_VXFS_FS is not set 764# CONFIG_VXFS_FS is not set
739# CONFIG_MINIX_FS is not set 765# CONFIG_MINIX_FS is not set
766# CONFIG_OMFS_FS is not set
740# CONFIG_HPFS_FS is not set 767# CONFIG_HPFS_FS is not set
741# CONFIG_QNX4FS_FS is not set 768# CONFIG_QNX4FS_FS is not set
742# CONFIG_ROMFS_FS is not set 769# CONFIG_ROMFS_FS is not set
@@ -747,14 +774,12 @@ CONFIG_NFS_FS=y
747CONFIG_NFS_V3=y 774CONFIG_NFS_V3=y
748# CONFIG_NFS_V3_ACL is not set 775# CONFIG_NFS_V3_ACL is not set
749# CONFIG_NFS_V4 is not set 776# CONFIG_NFS_V4 is not set
750# CONFIG_NFS_DIRECTIO is not set
751# CONFIG_NFSD is not set
752CONFIG_ROOT_NFS=y 777CONFIG_ROOT_NFS=y
778# CONFIG_NFSD is not set
753CONFIG_LOCKD=y 779CONFIG_LOCKD=y
754CONFIG_LOCKD_V4=y 780CONFIG_LOCKD_V4=y
755CONFIG_NFS_COMMON=y 781CONFIG_NFS_COMMON=y
756CONFIG_SUNRPC=y 782CONFIG_SUNRPC=y
757# CONFIG_SUNRPC_BIND34 is not set
758# CONFIG_RPCSEC_GSS_KRB5 is not set 783# CONFIG_RPCSEC_GSS_KRB5 is not set
759# CONFIG_RPCSEC_GSS_SPKM3 is not set 784# CONFIG_RPCSEC_GSS_SPKM3 is not set
760# CONFIG_SMB_FS is not set 785# CONFIG_SMB_FS is not set
@@ -775,8 +800,10 @@ CONFIG_MSDOS_PARTITION=y
775# Library routines 800# Library routines
776# 801#
777CONFIG_BITREVERSE=y 802CONFIG_BITREVERSE=y
803# CONFIG_GENERIC_FIND_FIRST_BIT is not set
778# CONFIG_CRC_CCITT is not set 804# CONFIG_CRC_CCITT is not set
779# CONFIG_CRC16 is not set 805# CONFIG_CRC16 is not set
806# CONFIG_CRC_T10DIF is not set
780# CONFIG_CRC_ITU_T is not set 807# CONFIG_CRC_ITU_T is not set
781CONFIG_CRC32=y 808CONFIG_CRC32=y
782# CONFIG_CRC7 is not set 809# CONFIG_CRC7 is not set
@@ -786,6 +813,7 @@ CONFIG_PLIST=y
786CONFIG_HAS_IOMEM=y 813CONFIG_HAS_IOMEM=y
787CONFIG_HAS_IOPORT=y 814CONFIG_HAS_IOPORT=y
788CONFIG_HAS_DMA=y 815CONFIG_HAS_DMA=y
816CONFIG_HAVE_LMB=y
789 817
790# 818#
791# Kernel hacking 819# Kernel hacking
@@ -793,6 +821,7 @@ CONFIG_HAS_DMA=y
793# CONFIG_PRINTK_TIME is not set 821# CONFIG_PRINTK_TIME is not set
794CONFIG_ENABLE_WARN_DEPRECATED=y 822CONFIG_ENABLE_WARN_DEPRECATED=y
795CONFIG_ENABLE_MUST_CHECK=y 823CONFIG_ENABLE_MUST_CHECK=y
824CONFIG_FRAME_WARN=1024
796CONFIG_MAGIC_SYSRQ=y 825CONFIG_MAGIC_SYSRQ=y
797# CONFIG_UNUSED_SYMBOLS is not set 826# CONFIG_UNUSED_SYMBOLS is not set
798CONFIG_DEBUG_FS=y 827CONFIG_DEBUG_FS=y
@@ -800,9 +829,12 @@ CONFIG_DEBUG_FS=y
800CONFIG_DEBUG_KERNEL=y 829CONFIG_DEBUG_KERNEL=y
801# CONFIG_DEBUG_SHIRQ is not set 830# CONFIG_DEBUG_SHIRQ is not set
802CONFIG_DETECT_SOFTLOCKUP=y 831CONFIG_DETECT_SOFTLOCKUP=y
832# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
833CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
803CONFIG_SCHED_DEBUG=y 834CONFIG_SCHED_DEBUG=y
804# CONFIG_SCHEDSTATS is not set 835# CONFIG_SCHEDSTATS is not set
805# CONFIG_TIMER_STATS is not set 836# CONFIG_TIMER_STATS is not set
837# CONFIG_DEBUG_OBJECTS is not set
806# CONFIG_SLUB_DEBUG_ON is not set 838# CONFIG_SLUB_DEBUG_ON is not set
807# CONFIG_SLUB_STATS is not set 839# CONFIG_SLUB_STATS is not set
808# CONFIG_DEBUG_RT_MUTEXES is not set 840# CONFIG_DEBUG_RT_MUTEXES is not set
@@ -815,17 +847,30 @@ CONFIG_SCHED_DEBUG=y
815CONFIG_DEBUG_BUGVERBOSE=y 847CONFIG_DEBUG_BUGVERBOSE=y
816# CONFIG_DEBUG_INFO is not set 848# CONFIG_DEBUG_INFO is not set
817# CONFIG_DEBUG_VM is not set 849# CONFIG_DEBUG_VM is not set
850# CONFIG_DEBUG_WRITECOUNT is not set
851# CONFIG_DEBUG_MEMORY_INIT is not set
818# CONFIG_DEBUG_LIST is not set 852# CONFIG_DEBUG_LIST is not set
819# CONFIG_DEBUG_SG is not set 853# CONFIG_DEBUG_SG is not set
820# CONFIG_BOOT_PRINTK_DELAY is not set 854# CONFIG_BOOT_PRINTK_DELAY is not set
821# CONFIG_RCU_TORTURE_TEST is not set 855# CONFIG_RCU_TORTURE_TEST is not set
822# CONFIG_BACKTRACE_SELF_TEST is not set 856# CONFIG_BACKTRACE_SELF_TEST is not set
823# CONFIG_FAULT_INJECTION is not set 857# CONFIG_FAULT_INJECTION is not set
858# CONFIG_LATENCYTOP is not set
859CONFIG_HAVE_FTRACE=y
860CONFIG_HAVE_DYNAMIC_FTRACE=y
861# CONFIG_FTRACE is not set
862# CONFIG_SCHED_TRACER is not set
863# CONFIG_CONTEXT_SWITCH_TRACER is not set
824# CONFIG_SAMPLES is not set 864# CONFIG_SAMPLES is not set
865CONFIG_HAVE_ARCH_KGDB=y
866# CONFIG_KGDB is not set
825# CONFIG_DEBUG_STACKOVERFLOW is not set 867# CONFIG_DEBUG_STACKOVERFLOW is not set
826# CONFIG_DEBUG_STACK_USAGE is not set 868# CONFIG_DEBUG_STACK_USAGE is not set
827# CONFIG_DEBUG_PAGEALLOC is not set 869# CONFIG_DEBUG_PAGEALLOC is not set
828# CONFIG_DEBUGGER is not set 870# CONFIG_CODE_PATCHING_SELFTEST is not set
871# CONFIG_FTR_FIXUP_SELFTEST is not set
872# CONFIG_XMON is not set
873# CONFIG_IRQSTACKS is not set
829# CONFIG_VIRQ_DEBUG is not set 874# CONFIG_VIRQ_DEBUG is not set
830# CONFIG_BDI_SWITCH is not set 875# CONFIG_BDI_SWITCH is not set
831# CONFIG_PPC_EARLY_DEBUG is not set 876# CONFIG_PPC_EARLY_DEBUG is not set
@@ -837,51 +882,85 @@ CONFIG_DEBUG_BUGVERBOSE=y
837# CONFIG_SECURITY is not set 882# CONFIG_SECURITY is not set
838# CONFIG_SECURITY_FILE_CAPABILITIES is not set 883# CONFIG_SECURITY_FILE_CAPABILITIES is not set
839CONFIG_CRYPTO=y 884CONFIG_CRYPTO=y
885
886#
887# Crypto core or helper
888#
840CONFIG_CRYPTO_ALGAPI=y 889CONFIG_CRYPTO_ALGAPI=y
841CONFIG_CRYPTO_BLKCIPHER=y 890CONFIG_CRYPTO_BLKCIPHER=y
842# CONFIG_CRYPTO_SEQIV is not set
843CONFIG_CRYPTO_MANAGER=y 891CONFIG_CRYPTO_MANAGER=y
892# CONFIG_CRYPTO_GF128MUL is not set
893# CONFIG_CRYPTO_NULL is not set
894# CONFIG_CRYPTO_CRYPTD is not set
895# CONFIG_CRYPTO_AUTHENC is not set
896# CONFIG_CRYPTO_TEST is not set
897
898#
899# Authenticated Encryption with Associated Data
900#
901# CONFIG_CRYPTO_CCM is not set
902# CONFIG_CRYPTO_GCM is not set
903# CONFIG_CRYPTO_SEQIV is not set
904
905#
906# Block modes
907#
908CONFIG_CRYPTO_CBC=y
909# CONFIG_CRYPTO_CTR is not set
910# CONFIG_CRYPTO_CTS is not set
911CONFIG_CRYPTO_ECB=y
912# CONFIG_CRYPTO_LRW is not set
913CONFIG_CRYPTO_PCBC=y
914# CONFIG_CRYPTO_XTS is not set
915
916#
917# Hash modes
918#
844# CONFIG_CRYPTO_HMAC is not set 919# CONFIG_CRYPTO_HMAC is not set
845# CONFIG_CRYPTO_XCBC is not set 920# CONFIG_CRYPTO_XCBC is not set
846# CONFIG_CRYPTO_NULL is not set 921
922#
923# Digest
924#
925# CONFIG_CRYPTO_CRC32C is not set
847# CONFIG_CRYPTO_MD4 is not set 926# CONFIG_CRYPTO_MD4 is not set
848CONFIG_CRYPTO_MD5=y 927CONFIG_CRYPTO_MD5=y
928# CONFIG_CRYPTO_MICHAEL_MIC is not set
929# CONFIG_CRYPTO_RMD128 is not set
930# CONFIG_CRYPTO_RMD160 is not set
931# CONFIG_CRYPTO_RMD256 is not set
932# CONFIG_CRYPTO_RMD320 is not set
849# CONFIG_CRYPTO_SHA1 is not set 933# CONFIG_CRYPTO_SHA1 is not set
850# CONFIG_CRYPTO_SHA256 is not set 934# CONFIG_CRYPTO_SHA256 is not set
851# CONFIG_CRYPTO_SHA512 is not set 935# CONFIG_CRYPTO_SHA512 is not set
852# CONFIG_CRYPTO_WP512 is not set
853# CONFIG_CRYPTO_TGR192 is not set 936# CONFIG_CRYPTO_TGR192 is not set
854# CONFIG_CRYPTO_GF128MUL is not set 937# CONFIG_CRYPTO_WP512 is not set
855CONFIG_CRYPTO_ECB=y 938
856CONFIG_CRYPTO_CBC=y 939#
857CONFIG_CRYPTO_PCBC=y 940# Ciphers
858# CONFIG_CRYPTO_LRW is not set 941#
859# CONFIG_CRYPTO_XTS is not set
860# CONFIG_CRYPTO_CTR is not set
861# CONFIG_CRYPTO_GCM is not set
862# CONFIG_CRYPTO_CCM is not set
863# CONFIG_CRYPTO_CRYPTD is not set
864CONFIG_CRYPTO_DES=y
865# CONFIG_CRYPTO_FCRYPT is not set
866# CONFIG_CRYPTO_BLOWFISH is not set
867# CONFIG_CRYPTO_TWOFISH is not set
868# CONFIG_CRYPTO_SERPENT is not set
869# CONFIG_CRYPTO_AES is not set 942# CONFIG_CRYPTO_AES is not set
943# CONFIG_CRYPTO_ANUBIS is not set
944# CONFIG_CRYPTO_ARC4 is not set
945# CONFIG_CRYPTO_BLOWFISH is not set
946# CONFIG_CRYPTO_CAMELLIA is not set
870# CONFIG_CRYPTO_CAST5 is not set 947# CONFIG_CRYPTO_CAST5 is not set
871# CONFIG_CRYPTO_CAST6 is not set 948# CONFIG_CRYPTO_CAST6 is not set
872# CONFIG_CRYPTO_TEA is not set 949CONFIG_CRYPTO_DES=y
873# CONFIG_CRYPTO_ARC4 is not set 950# CONFIG_CRYPTO_FCRYPT is not set
874# CONFIG_CRYPTO_KHAZAD is not set 951# CONFIG_CRYPTO_KHAZAD is not set
875# CONFIG_CRYPTO_ANUBIS is not set
876# CONFIG_CRYPTO_SEED is not set
877# CONFIG_CRYPTO_SALSA20 is not set 952# CONFIG_CRYPTO_SALSA20 is not set
953# CONFIG_CRYPTO_SEED is not set
954# CONFIG_CRYPTO_SERPENT is not set
955# CONFIG_CRYPTO_TEA is not set
956# CONFIG_CRYPTO_TWOFISH is not set
957
958#
959# Compression
960#
878# CONFIG_CRYPTO_DEFLATE is not set 961# CONFIG_CRYPTO_DEFLATE is not set
879# CONFIG_CRYPTO_MICHAEL_MIC is not set
880# CONFIG_CRYPTO_CRC32C is not set
881# CONFIG_CRYPTO_CAMELLIA is not set
882# CONFIG_CRYPTO_TEST is not set
883# CONFIG_CRYPTO_AUTHENC is not set
884# CONFIG_CRYPTO_LZO is not set 962# CONFIG_CRYPTO_LZO is not set
885CONFIG_CRYPTO_HW=y 963CONFIG_CRYPTO_HW=y
886# CONFIG_CRYPTO_DEV_HIFN_795X is not set 964# CONFIG_CRYPTO_DEV_HIFN_795X is not set
887# CONFIG_PPC_CLOCK is not set 965# CONFIG_PPC_CLOCK is not set
966# CONFIG_VIRTUALIZATION is not set
diff --git a/arch/powerpc/configs/44x/bamboo_defconfig b/arch/powerpc/configs/44x/bamboo_defconfig
index c44db554cdc6..e920693535af 100644
--- a/arch/powerpc/configs/44x/bamboo_defconfig
+++ b/arch/powerpc/configs/44x/bamboo_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.25-rc2 3# Linux kernel version: 2.6.27-rc1
4# Fri Feb 15 21:36:39 2008 4# Tue Aug 5 08:43:44 2008
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
@@ -30,8 +30,12 @@ CONFIG_GENERIC_TIME=y
30CONFIG_GENERIC_TIME_VSYSCALL=y 30CONFIG_GENERIC_TIME_VSYSCALL=y
31CONFIG_GENERIC_CLOCKEVENTS=y 31CONFIG_GENERIC_CLOCKEVENTS=y
32CONFIG_GENERIC_HARDIRQS=y 32CONFIG_GENERIC_HARDIRQS=y
33# CONFIG_HAVE_GET_USER_PAGES_FAST is not set
33# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 34# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
34CONFIG_IRQ_PER_CPU=y 35CONFIG_IRQ_PER_CPU=y
36CONFIG_STACKTRACE_SUPPORT=y
37CONFIG_HAVE_LATENCYTOP_SUPPORT=y
38CONFIG_LOCKDEP_SUPPORT=y
35CONFIG_RWSEM_XCHGADD_ALGORITHM=y 39CONFIG_RWSEM_XCHGADD_ALGORITHM=y
36CONFIG_ARCH_HAS_ILOG2_U32=y 40CONFIG_ARCH_HAS_ILOG2_U32=y
37CONFIG_GENERIC_HWEIGHT=y 41CONFIG_GENERIC_HWEIGHT=y
@@ -79,6 +83,7 @@ CONFIG_FAIR_GROUP_SCHED=y
79CONFIG_USER_SCHED=y 83CONFIG_USER_SCHED=y
80# CONFIG_CGROUP_SCHED is not set 84# CONFIG_CGROUP_SCHED is not set
81CONFIG_SYSFS_DEPRECATED=y 85CONFIG_SYSFS_DEPRECATED=y
86CONFIG_SYSFS_DEPRECATED_V2=y
82# CONFIG_RELAY is not set 87# CONFIG_RELAY is not set
83# CONFIG_NAMESPACES is not set 88# CONFIG_NAMESPACES is not set
84CONFIG_BLK_DEV_INITRD=y 89CONFIG_BLK_DEV_INITRD=y
@@ -87,6 +92,7 @@ CONFIG_INITRAMFS_SOURCE=""
87CONFIG_SYSCTL=y 92CONFIG_SYSCTL=y
88CONFIG_EMBEDDED=y 93CONFIG_EMBEDDED=y
89CONFIG_SYSCTL_SYSCALL=y 94CONFIG_SYSCTL_SYSCALL=y
95CONFIG_SYSCTL_SYSCALL_CHECK=y
90CONFIG_KALLSYMS=y 96CONFIG_KALLSYMS=y
91# CONFIG_KALLSYMS_ALL is not set 97# CONFIG_KALLSYMS_ALL is not set
92# CONFIG_KALLSYMS_EXTRA_PASS is not set 98# CONFIG_KALLSYMS_EXTRA_PASS is not set
@@ -112,13 +118,22 @@ CONFIG_SLUB=y
112# CONFIG_MARKERS is not set 118# CONFIG_MARKERS is not set
113CONFIG_HAVE_OPROFILE=y 119CONFIG_HAVE_OPROFILE=y
114# CONFIG_KPROBES is not set 120# CONFIG_KPROBES is not set
121CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y
122CONFIG_HAVE_IOREMAP_PROT=y
115CONFIG_HAVE_KPROBES=y 123CONFIG_HAVE_KPROBES=y
124CONFIG_HAVE_KRETPROBES=y
125CONFIG_HAVE_ARCH_TRACEHOOK=y
126# CONFIG_HAVE_DMA_ATTRS is not set
127# CONFIG_USE_GENERIC_SMP_HELPERS is not set
128# CONFIG_HAVE_CLK is not set
116CONFIG_PROC_PAGE_MONITOR=y 129CONFIG_PROC_PAGE_MONITOR=y
130# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
117CONFIG_SLABINFO=y 131CONFIG_SLABINFO=y
118CONFIG_RT_MUTEXES=y 132CONFIG_RT_MUTEXES=y
119# CONFIG_TINY_SHMEM is not set 133# CONFIG_TINY_SHMEM is not set
120CONFIG_BASE_SMALL=0 134CONFIG_BASE_SMALL=0
121CONFIG_MODULES=y 135CONFIG_MODULES=y
136# CONFIG_MODULE_FORCE_LOAD is not set
122CONFIG_MODULE_UNLOAD=y 137CONFIG_MODULE_UNLOAD=y
123# CONFIG_MODULE_FORCE_UNLOAD is not set 138# CONFIG_MODULE_FORCE_UNLOAD is not set
124# CONFIG_MODVERSIONS is not set 139# CONFIG_MODVERSIONS is not set
@@ -129,6 +144,7 @@ CONFIG_LBD=y
129# CONFIG_BLK_DEV_IO_TRACE is not set 144# CONFIG_BLK_DEV_IO_TRACE is not set
130# CONFIG_LSF is not set 145# CONFIG_LSF is not set
131# CONFIG_BLK_DEV_BSG is not set 146# CONFIG_BLK_DEV_BSG is not set
147# CONFIG_BLK_DEV_INTEGRITY is not set
132 148
133# 149#
134# IO Schedulers 150# IO Schedulers
@@ -143,24 +159,25 @@ CONFIG_DEFAULT_AS=y
143# CONFIG_DEFAULT_NOOP is not set 159# CONFIG_DEFAULT_NOOP is not set
144CONFIG_DEFAULT_IOSCHED="anticipatory" 160CONFIG_DEFAULT_IOSCHED="anticipatory"
145CONFIG_CLASSIC_RCU=y 161CONFIG_CLASSIC_RCU=y
146# CONFIG_PREEMPT_RCU is not set
147# CONFIG_PPC4xx_PCI_EXPRESS is not set 162# CONFIG_PPC4xx_PCI_EXPRESS is not set
148 163
149# 164#
150# Platform support 165# Platform support
151# 166#
152# CONFIG_PPC_MPC512x is not set
153# CONFIG_PPC_MPC5121 is not set
154# CONFIG_PPC_CELL is not set 167# CONFIG_PPC_CELL is not set
155# CONFIG_PPC_CELL_NATIVE is not set 168# CONFIG_PPC_CELL_NATIVE is not set
156# CONFIG_PQ2ADS is not set 169# CONFIG_PQ2ADS is not set
157CONFIG_BAMBOO=y 170CONFIG_BAMBOO=y
158# CONFIG_EBONY is not set 171# CONFIG_EBONY is not set
172# CONFIG_SAM440EP is not set
159# CONFIG_SEQUOIA is not set 173# CONFIG_SEQUOIA is not set
160# CONFIG_TAISHAN is not set 174# CONFIG_TAISHAN is not set
161# CONFIG_KATMAI is not set 175# CONFIG_KATMAI is not set
162# CONFIG_RAINIER is not set 176# CONFIG_RAINIER is not set
163# CONFIG_WARP is not set 177# CONFIG_WARP is not set
178# CONFIG_CANYONLANDS is not set
179# CONFIG_YOSEMITE is not set
180# CONFIG_XILINX_VIRTEX440_GENERIC_BOARD is not set
164CONFIG_440EP=y 181CONFIG_440EP=y
165CONFIG_IBM440EP_ERR42=y 182CONFIG_IBM440EP_ERR42=y
166# CONFIG_IPIC is not set 183# CONFIG_IPIC is not set
@@ -193,7 +210,6 @@ CONFIG_HZ=250
193CONFIG_PREEMPT_NONE=y 210CONFIG_PREEMPT_NONE=y
194# CONFIG_PREEMPT_VOLUNTARY is not set 211# CONFIG_PREEMPT_VOLUNTARY is not set
195# CONFIG_PREEMPT is not set 212# CONFIG_PREEMPT is not set
196CONFIG_RCU_TRACE=y
197CONFIG_BINFMT_ELF=y 213CONFIG_BINFMT_ELF=y
198# CONFIG_BINFMT_MISC is not set 214# CONFIG_BINFMT_MISC is not set
199# CONFIG_MATH_EMULATION is not set 215# CONFIG_MATH_EMULATION is not set
@@ -211,14 +227,18 @@ CONFIG_FLATMEM=y
211CONFIG_FLAT_NODE_MEM_MAP=y 227CONFIG_FLAT_NODE_MEM_MAP=y
212# CONFIG_SPARSEMEM_STATIC is not set 228# CONFIG_SPARSEMEM_STATIC is not set
213# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set 229# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
230CONFIG_PAGEFLAGS_EXTENDED=y
214CONFIG_SPLIT_PTLOCK_CPUS=4 231CONFIG_SPLIT_PTLOCK_CPUS=4
232CONFIG_MIGRATION=y
215CONFIG_RESOURCES_64BIT=y 233CONFIG_RESOURCES_64BIT=y
216CONFIG_ZONE_DMA_FLAG=1 234CONFIG_ZONE_DMA_FLAG=1
217CONFIG_BOUNCE=y 235CONFIG_BOUNCE=y
218CONFIG_VIRT_TO_BUS=y 236CONFIG_VIRT_TO_BUS=y
237CONFIG_FORCE_MAX_ZONEORDER=11
219CONFIG_PROC_DEVICETREE=y 238CONFIG_PROC_DEVICETREE=y
220CONFIG_CMDLINE_BOOL=y 239CONFIG_CMDLINE_BOOL=y
221CONFIG_CMDLINE="" 240CONFIG_CMDLINE=""
241CONFIG_EXTRA_TARGETS=""
222CONFIG_SECCOMP=y 242CONFIG_SECCOMP=y
223CONFIG_ISA_DMA_API=y 243CONFIG_ISA_DMA_API=y
224 244
@@ -227,6 +247,8 @@ CONFIG_ISA_DMA_API=y
227# 247#
228CONFIG_ZONE_DMA=y 248CONFIG_ZONE_DMA=y
229CONFIG_PPC_INDIRECT_PCI=y 249CONFIG_PPC_INDIRECT_PCI=y
250CONFIG_4xx_SOC=y
251CONFIG_PPC_PCI_CHOICE=y
230CONFIG_PCI=y 252CONFIG_PCI=y
231CONFIG_PCI_DOMAINS=y 253CONFIG_PCI_DOMAINS=y
232CONFIG_PCI_SYSCALL=y 254CONFIG_PCI_SYSCALL=y
@@ -237,6 +259,7 @@ CONFIG_PCI_LEGACY=y
237# CONFIG_PCI_DEBUG is not set 259# CONFIG_PCI_DEBUG is not set
238# CONFIG_PCCARD is not set 260# CONFIG_PCCARD is not set
239# CONFIG_HOTPLUG_PCI is not set 261# CONFIG_HOTPLUG_PCI is not set
262# CONFIG_HAS_RAPIDIO is not set
240 263
241# 264#
242# Advanced setup 265# Advanced setup
@@ -246,17 +269,13 @@ CONFIG_PCI_LEGACY=y
246# 269#
247# Default settings for advanced configuration options are used 270# Default settings for advanced configuration options are used
248# 271#
249CONFIG_HIGHMEM_START=0xfe000000
250CONFIG_LOWMEM_SIZE=0x30000000 272CONFIG_LOWMEM_SIZE=0x30000000
273CONFIG_PAGE_OFFSET=0xc0000000
251CONFIG_KERNEL_START=0xc0000000 274CONFIG_KERNEL_START=0xc0000000
275CONFIG_PHYSICAL_START=0x00000000
252CONFIG_TASK_SIZE=0xc0000000 276CONFIG_TASK_SIZE=0xc0000000
253CONFIG_CONSISTENT_START=0xff100000 277CONFIG_CONSISTENT_START=0xff100000
254CONFIG_CONSISTENT_SIZE=0x00200000 278CONFIG_CONSISTENT_SIZE=0x00200000
255CONFIG_BOOT_LOAD=0x01000000
256
257#
258# Networking
259#
260CONFIG_NET=y 279CONFIG_NET=y
261 280
262# 281#
@@ -294,8 +313,6 @@ CONFIG_TCP_CONG_CUBIC=y
294CONFIG_DEFAULT_TCP_CONG="cubic" 313CONFIG_DEFAULT_TCP_CONG="cubic"
295# CONFIG_TCP_MD5SIG is not set 314# CONFIG_TCP_MD5SIG is not set
296# CONFIG_IPV6 is not set 315# CONFIG_IPV6 is not set
297# CONFIG_INET6_XFRM_TUNNEL is not set
298# CONFIG_INET6_TUNNEL is not set
299# CONFIG_NETWORK_SECMARK is not set 316# CONFIG_NETWORK_SECMARK is not set
300# CONFIG_NETFILTER is not set 317# CONFIG_NETFILTER is not set
301# CONFIG_IP_DCCP is not set 318# CONFIG_IP_DCCP is not set
@@ -345,6 +362,8 @@ CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
345CONFIG_STANDALONE=y 362CONFIG_STANDALONE=y
346CONFIG_PREVENT_FIRMWARE_BUILD=y 363CONFIG_PREVENT_FIRMWARE_BUILD=y
347CONFIG_FW_LOADER=y 364CONFIG_FW_LOADER=y
365CONFIG_FIRMWARE_IN_KERNEL=y
366CONFIG_EXTRA_FIRMWARE=""
348# CONFIG_DEBUG_DRIVER is not set 367# CONFIG_DEBUG_DRIVER is not set
349# CONFIG_DEBUG_DEVRES is not set 368# CONFIG_DEBUG_DEVRES is not set
350# CONFIG_SYS_HYPERVISOR is not set 369# CONFIG_SYS_HYPERVISOR is not set
@@ -370,12 +389,14 @@ CONFIG_BLK_DEV_RAM_SIZE=35000
370# CONFIG_CDROM_PKTCDVD is not set 389# CONFIG_CDROM_PKTCDVD is not set
371# CONFIG_ATA_OVER_ETH is not set 390# CONFIG_ATA_OVER_ETH is not set
372# CONFIG_XILINX_SYSACE is not set 391# CONFIG_XILINX_SYSACE is not set
392# CONFIG_BLK_DEV_HD is not set
373CONFIG_MISC_DEVICES=y 393CONFIG_MISC_DEVICES=y
374# CONFIG_PHANTOM is not set 394# CONFIG_PHANTOM is not set
375# CONFIG_EEPROM_93CX6 is not set 395# CONFIG_EEPROM_93CX6 is not set
376# CONFIG_SGI_IOC4 is not set 396# CONFIG_SGI_IOC4 is not set
377# CONFIG_TIFM_CORE is not set 397# CONFIG_TIFM_CORE is not set
378# CONFIG_ENCLOSURE_SERVICES is not set 398# CONFIG_ENCLOSURE_SERVICES is not set
399# CONFIG_HP_ILO is not set
379CONFIG_HAVE_IDE=y 400CONFIG_HAVE_IDE=y
380# CONFIG_IDE is not set 401# CONFIG_IDE is not set
381 402
@@ -393,12 +414,15 @@ CONFIG_HAVE_IDE=y
393# 414#
394# IEEE 1394 (FireWire) support 415# IEEE 1394 (FireWire) support
395# 416#
417
418#
419# Enable only one of the two stacks, unless you know what you are doing
420#
396# CONFIG_FIREWIRE is not set 421# CONFIG_FIREWIRE is not set
397# CONFIG_IEEE1394 is not set 422# CONFIG_IEEE1394 is not set
398# CONFIG_I2O is not set 423# CONFIG_I2O is not set
399# CONFIG_MACINTOSH_DRIVERS is not set 424# CONFIG_MACINTOSH_DRIVERS is not set
400CONFIG_NETDEVICES=y 425CONFIG_NETDEVICES=y
401# CONFIG_NETDEVICES_MULTIQUEUE is not set
402# CONFIG_DUMMY is not set 426# CONFIG_DUMMY is not set
403# CONFIG_BONDING is not set 427# CONFIG_BONDING is not set
404# CONFIG_MACVLAN is not set 428# CONFIG_MACVLAN is not set
@@ -433,7 +457,6 @@ CONFIG_NETDEV_1000=y
433# CONFIG_DL2K is not set 457# CONFIG_DL2K is not set
434# CONFIG_E1000 is not set 458# CONFIG_E1000 is not set
435# CONFIG_E1000E is not set 459# CONFIG_E1000E is not set
436# CONFIG_E1000E_ENABLED is not set
437# CONFIG_IP1000 is not set 460# CONFIG_IP1000 is not set
438# CONFIG_IGB is not set 461# CONFIG_IGB is not set
439# CONFIG_NS83820 is not set 462# CONFIG_NS83820 is not set
@@ -443,12 +466,12 @@ CONFIG_NETDEV_1000=y
443# CONFIG_SIS190 is not set 466# CONFIG_SIS190 is not set
444# CONFIG_SKGE is not set 467# CONFIG_SKGE is not set
445# CONFIG_SKY2 is not set 468# CONFIG_SKY2 is not set
446# CONFIG_SK98LIN is not set
447# CONFIG_VIA_VELOCITY is not set 469# CONFIG_VIA_VELOCITY is not set
448# CONFIG_TIGON3 is not set 470# CONFIG_TIGON3 is not set
449# CONFIG_BNX2 is not set 471# CONFIG_BNX2 is not set
450# CONFIG_QLA3XXX is not set 472# CONFIG_QLA3XXX is not set
451# CONFIG_ATL1 is not set 473# CONFIG_ATL1 is not set
474# CONFIG_ATL1E is not set
452CONFIG_NETDEV_10000=y 475CONFIG_NETDEV_10000=y
453# CONFIG_CHELSIO_T1 is not set 476# CONFIG_CHELSIO_T1 is not set
454# CONFIG_CHELSIO_T3 is not set 477# CONFIG_CHELSIO_T3 is not set
@@ -461,6 +484,7 @@ CONFIG_NETDEV_10000=y
461# CONFIG_MLX4_CORE is not set 484# CONFIG_MLX4_CORE is not set
462# CONFIG_TEHUTI is not set 485# CONFIG_TEHUTI is not set
463# CONFIG_BNX2X is not set 486# CONFIG_BNX2X is not set
487# CONFIG_SFC is not set
464# CONFIG_TR is not set 488# CONFIG_TR is not set
465 489
466# 490#
@@ -468,6 +492,7 @@ CONFIG_NETDEV_10000=y
468# 492#
469# CONFIG_WLAN_PRE80211 is not set 493# CONFIG_WLAN_PRE80211 is not set
470# CONFIG_WLAN_80211 is not set 494# CONFIG_WLAN_80211 is not set
495# CONFIG_IWLWIFI_LEDS is not set
471# CONFIG_WAN is not set 496# CONFIG_WAN is not set
472# CONFIG_FDDI is not set 497# CONFIG_FDDI is not set
473# CONFIG_HIPPI is not set 498# CONFIG_HIPPI is not set
@@ -494,6 +519,7 @@ CONFIG_NETDEV_10000=y
494# Character devices 519# Character devices
495# 520#
496# CONFIG_VT is not set 521# CONFIG_VT is not set
522CONFIG_DEVKMEM=y
497# CONFIG_SERIAL_NONSTANDARD is not set 523# CONFIG_SERIAL_NONSTANDARD is not set
498# CONFIG_NOZOMI is not set 524# CONFIG_NOZOMI is not set
499 525
@@ -532,12 +558,9 @@ CONFIG_LEGACY_PTY_COUNT=256
532# CONFIG_TCG_TPM is not set 558# CONFIG_TCG_TPM is not set
533CONFIG_DEVPORT=y 559CONFIG_DEVPORT=y
534# CONFIG_I2C is not set 560# CONFIG_I2C is not set
535
536#
537# SPI support
538#
539# CONFIG_SPI is not set 561# CONFIG_SPI is not set
540# CONFIG_SPI_MASTER is not set 562CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
563# CONFIG_GPIOLIB is not set
541# CONFIG_W1 is not set 564# CONFIG_W1 is not set
542# CONFIG_POWER_SUPPLY is not set 565# CONFIG_POWER_SUPPLY is not set
543# CONFIG_HWMON is not set 566# CONFIG_HWMON is not set
@@ -553,13 +576,24 @@ CONFIG_SSB_POSSIBLE=y
553# 576#
554# Multifunction device drivers 577# Multifunction device drivers
555# 578#
579# CONFIG_MFD_CORE is not set
556# CONFIG_MFD_SM501 is not set 580# CONFIG_MFD_SM501 is not set
581# CONFIG_HTC_PASIC3 is not set
557 582
558# 583#
559# Multimedia devices 584# Multimedia devices
560# 585#
586
587#
588# Multimedia core support
589#
561# CONFIG_VIDEO_DEV is not set 590# CONFIG_VIDEO_DEV is not set
562# CONFIG_DVB_CORE is not set 591# CONFIG_DVB_CORE is not set
592# CONFIG_VIDEO_MEDIA is not set
593
594#
595# Multimedia drivers
596#
563CONFIG_DAB=y 597CONFIG_DAB=y
564 598
565# 599#
@@ -576,16 +610,14 @@ CONFIG_VIDEO_OUTPUT_CONTROL=m
576# Display device support 610# Display device support
577# 611#
578# CONFIG_DISPLAY_SUPPORT is not set 612# CONFIG_DISPLAY_SUPPORT is not set
579
580#
581# Sound
582#
583# CONFIG_SOUND is not set 613# CONFIG_SOUND is not set
584CONFIG_USB_SUPPORT=y 614CONFIG_USB_SUPPORT=y
585CONFIG_USB_ARCH_HAS_HCD=y 615CONFIG_USB_ARCH_HAS_HCD=y
586CONFIG_USB_ARCH_HAS_OHCI=y 616CONFIG_USB_ARCH_HAS_OHCI=y
587CONFIG_USB_ARCH_HAS_EHCI=y 617CONFIG_USB_ARCH_HAS_EHCI=y
588# CONFIG_USB is not set 618# CONFIG_USB is not set
619# CONFIG_USB_OTG_WHITELIST is not set
620# CONFIG_USB_OTG_BLACKLIST_HUB is not set
589 621
590# 622#
591# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 623# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
@@ -594,13 +626,11 @@ CONFIG_USB_ARCH_HAS_EHCI=y
594# CONFIG_MMC is not set 626# CONFIG_MMC is not set
595# CONFIG_MEMSTICK is not set 627# CONFIG_MEMSTICK is not set
596# CONFIG_NEW_LEDS is not set 628# CONFIG_NEW_LEDS is not set
629# CONFIG_ACCESSIBILITY is not set
597# CONFIG_INFINIBAND is not set 630# CONFIG_INFINIBAND is not set
598# CONFIG_EDAC is not set 631# CONFIG_EDAC is not set
599# CONFIG_RTC_CLASS is not set 632# CONFIG_RTC_CLASS is not set
600 633# CONFIG_DMADEVICES is not set
601#
602# Userspace I/O
603#
604# CONFIG_UIO is not set 634# CONFIG_UIO is not set
605 635
606# 636#
@@ -615,7 +645,6 @@ CONFIG_EXT2_FS=y
615# CONFIG_JFS_FS is not set 645# CONFIG_JFS_FS is not set
616# CONFIG_FS_POSIX_ACL is not set 646# CONFIG_FS_POSIX_ACL is not set
617# CONFIG_XFS_FS is not set 647# CONFIG_XFS_FS is not set
618# CONFIG_GFS2_FS is not set
619# CONFIG_OCFS2_FS is not set 648# CONFIG_OCFS2_FS is not set
620CONFIG_DNOTIFY=y 649CONFIG_DNOTIFY=y
621CONFIG_INOTIFY=y 650CONFIG_INOTIFY=y
@@ -663,6 +692,7 @@ CONFIG_TMPFS=y
663CONFIG_CRAMFS=y 692CONFIG_CRAMFS=y
664# CONFIG_VXFS_FS is not set 693# CONFIG_VXFS_FS is not set
665# CONFIG_MINIX_FS is not set 694# CONFIG_MINIX_FS is not set
695# CONFIG_OMFS_FS is not set
666# CONFIG_HPFS_FS is not set 696# CONFIG_HPFS_FS is not set
667# CONFIG_QNX4FS_FS is not set 697# CONFIG_QNX4FS_FS is not set
668# CONFIG_ROMFS_FS is not set 698# CONFIG_ROMFS_FS is not set
@@ -673,14 +703,12 @@ CONFIG_NFS_FS=y
673CONFIG_NFS_V3=y 703CONFIG_NFS_V3=y
674# CONFIG_NFS_V3_ACL is not set 704# CONFIG_NFS_V3_ACL is not set
675# CONFIG_NFS_V4 is not set 705# CONFIG_NFS_V4 is not set
676# CONFIG_NFS_DIRECTIO is not set
677# CONFIG_NFSD is not set
678CONFIG_ROOT_NFS=y 706CONFIG_ROOT_NFS=y
707# CONFIG_NFSD is not set
679CONFIG_LOCKD=y 708CONFIG_LOCKD=y
680CONFIG_LOCKD_V4=y 709CONFIG_LOCKD_V4=y
681CONFIG_NFS_COMMON=y 710CONFIG_NFS_COMMON=y
682CONFIG_SUNRPC=y 711CONFIG_SUNRPC=y
683# CONFIG_SUNRPC_BIND34 is not set
684# CONFIG_RPCSEC_GSS_KRB5 is not set 712# CONFIG_RPCSEC_GSS_KRB5 is not set
685# CONFIG_RPCSEC_GSS_SPKM3 is not set 713# CONFIG_RPCSEC_GSS_SPKM3 is not set
686# CONFIG_SMB_FS is not set 714# CONFIG_SMB_FS is not set
@@ -701,8 +729,10 @@ CONFIG_MSDOS_PARTITION=y
701# Library routines 729# Library routines
702# 730#
703CONFIG_BITREVERSE=y 731CONFIG_BITREVERSE=y
732# CONFIG_GENERIC_FIND_FIRST_BIT is not set
704# CONFIG_CRC_CCITT is not set 733# CONFIG_CRC_CCITT is not set
705# CONFIG_CRC16 is not set 734# CONFIG_CRC16 is not set
735# CONFIG_CRC_T10DIF is not set
706# CONFIG_CRC_ITU_T is not set 736# CONFIG_CRC_ITU_T is not set
707CONFIG_CRC32=y 737CONFIG_CRC32=y
708# CONFIG_CRC7 is not set 738# CONFIG_CRC7 is not set
@@ -712,6 +742,7 @@ CONFIG_PLIST=y
712CONFIG_HAS_IOMEM=y 742CONFIG_HAS_IOMEM=y
713CONFIG_HAS_IOPORT=y 743CONFIG_HAS_IOPORT=y
714CONFIG_HAS_DMA=y 744CONFIG_HAS_DMA=y
745CONFIG_HAVE_LMB=y
715 746
716# 747#
717# Kernel hacking 748# Kernel hacking
@@ -719,6 +750,7 @@ CONFIG_HAS_DMA=y
719# CONFIG_PRINTK_TIME is not set 750# CONFIG_PRINTK_TIME is not set
720CONFIG_ENABLE_WARN_DEPRECATED=y 751CONFIG_ENABLE_WARN_DEPRECATED=y
721CONFIG_ENABLE_MUST_CHECK=y 752CONFIG_ENABLE_MUST_CHECK=y
753CONFIG_FRAME_WARN=1024
722CONFIG_MAGIC_SYSRQ=y 754CONFIG_MAGIC_SYSRQ=y
723# CONFIG_UNUSED_SYMBOLS is not set 755# CONFIG_UNUSED_SYMBOLS is not set
724CONFIG_DEBUG_FS=y 756CONFIG_DEBUG_FS=y
@@ -726,9 +758,12 @@ CONFIG_DEBUG_FS=y
726CONFIG_DEBUG_KERNEL=y 758CONFIG_DEBUG_KERNEL=y
727# CONFIG_DEBUG_SHIRQ is not set 759# CONFIG_DEBUG_SHIRQ is not set
728CONFIG_DETECT_SOFTLOCKUP=y 760CONFIG_DETECT_SOFTLOCKUP=y
761# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
762CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
729CONFIG_SCHED_DEBUG=y 763CONFIG_SCHED_DEBUG=y
730# CONFIG_SCHEDSTATS is not set 764# CONFIG_SCHEDSTATS is not set
731# CONFIG_TIMER_STATS is not set 765# CONFIG_TIMER_STATS is not set
766# CONFIG_DEBUG_OBJECTS is not set
732# CONFIG_SLUB_DEBUG_ON is not set 767# CONFIG_SLUB_DEBUG_ON is not set
733# CONFIG_SLUB_STATS is not set 768# CONFIG_SLUB_STATS is not set
734# CONFIG_DEBUG_RT_MUTEXES is not set 769# CONFIG_DEBUG_RT_MUTEXES is not set
@@ -741,19 +776,30 @@ CONFIG_SCHED_DEBUG=y
741# CONFIG_DEBUG_BUGVERBOSE is not set 776# CONFIG_DEBUG_BUGVERBOSE is not set
742# CONFIG_DEBUG_INFO is not set 777# CONFIG_DEBUG_INFO is not set
743# CONFIG_DEBUG_VM is not set 778# CONFIG_DEBUG_VM is not set
779# CONFIG_DEBUG_WRITECOUNT is not set
780# CONFIG_DEBUG_MEMORY_INIT is not set
744# CONFIG_DEBUG_LIST is not set 781# CONFIG_DEBUG_LIST is not set
745# CONFIG_DEBUG_SG is not set 782# CONFIG_DEBUG_SG is not set
746# CONFIG_BOOT_PRINTK_DELAY is not set 783# CONFIG_BOOT_PRINTK_DELAY is not set
747# CONFIG_RCU_TORTURE_TEST is not set 784# CONFIG_RCU_TORTURE_TEST is not set
748# CONFIG_BACKTRACE_SELF_TEST is not set 785# CONFIG_BACKTRACE_SELF_TEST is not set
749# CONFIG_FAULT_INJECTION is not set 786# CONFIG_FAULT_INJECTION is not set
787# CONFIG_LATENCYTOP is not set
788CONFIG_HAVE_FTRACE=y
789CONFIG_HAVE_DYNAMIC_FTRACE=y
790# CONFIG_FTRACE is not set
791# CONFIG_SCHED_TRACER is not set
792# CONFIG_CONTEXT_SWITCH_TRACER is not set
750# CONFIG_SAMPLES is not set 793# CONFIG_SAMPLES is not set
794CONFIG_HAVE_ARCH_KGDB=y
795# CONFIG_KGDB is not set
751# CONFIG_DEBUG_STACKOVERFLOW is not set 796# CONFIG_DEBUG_STACKOVERFLOW is not set
752# CONFIG_DEBUG_STACK_USAGE is not set 797# CONFIG_DEBUG_STACK_USAGE is not set
753# CONFIG_DEBUG_PAGEALLOC is not set 798# CONFIG_DEBUG_PAGEALLOC is not set
754CONFIG_DEBUGGER=y 799# CONFIG_CODE_PATCHING_SELFTEST is not set
755# CONFIG_KGDB is not set 800# CONFIG_FTR_FIXUP_SELFTEST is not set
756# CONFIG_XMON is not set 801# CONFIG_XMON is not set
802# CONFIG_IRQSTACKS is not set
757# CONFIG_VIRQ_DEBUG is not set 803# CONFIG_VIRQ_DEBUG is not set
758# CONFIG_BDI_SWITCH is not set 804# CONFIG_BDI_SWITCH is not set
759# CONFIG_PPC_EARLY_DEBUG is not set 805# CONFIG_PPC_EARLY_DEBUG is not set
@@ -765,51 +811,85 @@ CONFIG_DEBUGGER=y
765# CONFIG_SECURITY is not set 811# CONFIG_SECURITY is not set
766# CONFIG_SECURITY_FILE_CAPABILITIES is not set 812# CONFIG_SECURITY_FILE_CAPABILITIES is not set
767CONFIG_CRYPTO=y 813CONFIG_CRYPTO=y
814
815#
816# Crypto core or helper
817#
768CONFIG_CRYPTO_ALGAPI=y 818CONFIG_CRYPTO_ALGAPI=y
769CONFIG_CRYPTO_BLKCIPHER=y 819CONFIG_CRYPTO_BLKCIPHER=y
770# CONFIG_CRYPTO_SEQIV is not set
771CONFIG_CRYPTO_MANAGER=y 820CONFIG_CRYPTO_MANAGER=y
821# CONFIG_CRYPTO_GF128MUL is not set
822# CONFIG_CRYPTO_NULL is not set
823# CONFIG_CRYPTO_CRYPTD is not set
824# CONFIG_CRYPTO_AUTHENC is not set
825# CONFIG_CRYPTO_TEST is not set
826
827#
828# Authenticated Encryption with Associated Data
829#
830# CONFIG_CRYPTO_CCM is not set
831# CONFIG_CRYPTO_GCM is not set
832# CONFIG_CRYPTO_SEQIV is not set
833
834#
835# Block modes
836#
837CONFIG_CRYPTO_CBC=y
838# CONFIG_CRYPTO_CTR is not set
839# CONFIG_CRYPTO_CTS is not set
840CONFIG_CRYPTO_ECB=y
841# CONFIG_CRYPTO_LRW is not set
842CONFIG_CRYPTO_PCBC=y
843# CONFIG_CRYPTO_XTS is not set
844
845#
846# Hash modes
847#
772# CONFIG_CRYPTO_HMAC is not set 848# CONFIG_CRYPTO_HMAC is not set
773# CONFIG_CRYPTO_XCBC is not set 849# CONFIG_CRYPTO_XCBC is not set
774# CONFIG_CRYPTO_NULL is not set 850
851#
852# Digest
853#
854# CONFIG_CRYPTO_CRC32C is not set
775# CONFIG_CRYPTO_MD4 is not set 855# CONFIG_CRYPTO_MD4 is not set
776CONFIG_CRYPTO_MD5=y 856CONFIG_CRYPTO_MD5=y
857# CONFIG_CRYPTO_MICHAEL_MIC is not set
858# CONFIG_CRYPTO_RMD128 is not set
859# CONFIG_CRYPTO_RMD160 is not set
860# CONFIG_CRYPTO_RMD256 is not set
861# CONFIG_CRYPTO_RMD320 is not set
777# CONFIG_CRYPTO_SHA1 is not set 862# CONFIG_CRYPTO_SHA1 is not set
778# CONFIG_CRYPTO_SHA256 is not set 863# CONFIG_CRYPTO_SHA256 is not set
779# CONFIG_CRYPTO_SHA512 is not set 864# CONFIG_CRYPTO_SHA512 is not set
780# CONFIG_CRYPTO_WP512 is not set
781# CONFIG_CRYPTO_TGR192 is not set 865# CONFIG_CRYPTO_TGR192 is not set
782# CONFIG_CRYPTO_GF128MUL is not set 866# CONFIG_CRYPTO_WP512 is not set
783CONFIG_CRYPTO_ECB=y 867
784CONFIG_CRYPTO_CBC=y 868#
785CONFIG_CRYPTO_PCBC=y 869# Ciphers
786# CONFIG_CRYPTO_LRW is not set 870#
787# CONFIG_CRYPTO_XTS is not set
788# CONFIG_CRYPTO_CTR is not set
789# CONFIG_CRYPTO_GCM is not set
790# CONFIG_CRYPTO_CCM is not set
791# CONFIG_CRYPTO_CRYPTD is not set
792CONFIG_CRYPTO_DES=y
793# CONFIG_CRYPTO_FCRYPT is not set
794# CONFIG_CRYPTO_BLOWFISH is not set
795# CONFIG_CRYPTO_TWOFISH is not set
796# CONFIG_CRYPTO_SERPENT is not set
797# CONFIG_CRYPTO_AES is not set 871# CONFIG_CRYPTO_AES is not set
872# CONFIG_CRYPTO_ANUBIS is not set
873# CONFIG_CRYPTO_ARC4 is not set
874# CONFIG_CRYPTO_BLOWFISH is not set
875# CONFIG_CRYPTO_CAMELLIA is not set
798# CONFIG_CRYPTO_CAST5 is not set 876# CONFIG_CRYPTO_CAST5 is not set
799# CONFIG_CRYPTO_CAST6 is not set 877# CONFIG_CRYPTO_CAST6 is not set
800# CONFIG_CRYPTO_TEA is not set 878CONFIG_CRYPTO_DES=y
801# CONFIG_CRYPTO_ARC4 is not set 879# CONFIG_CRYPTO_FCRYPT is not set
802# CONFIG_CRYPTO_KHAZAD is not set 880# CONFIG_CRYPTO_KHAZAD is not set
803# CONFIG_CRYPTO_ANUBIS is not set
804# CONFIG_CRYPTO_SEED is not set
805# CONFIG_CRYPTO_SALSA20 is not set 881# CONFIG_CRYPTO_SALSA20 is not set
882# CONFIG_CRYPTO_SEED is not set
883# CONFIG_CRYPTO_SERPENT is not set
884# CONFIG_CRYPTO_TEA is not set
885# CONFIG_CRYPTO_TWOFISH is not set
886
887#
888# Compression
889#
806# CONFIG_CRYPTO_DEFLATE is not set 890# CONFIG_CRYPTO_DEFLATE is not set
807# CONFIG_CRYPTO_MICHAEL_MIC is not set
808# CONFIG_CRYPTO_CRC32C is not set
809# CONFIG_CRYPTO_CAMELLIA is not set
810# CONFIG_CRYPTO_TEST is not set
811# CONFIG_CRYPTO_AUTHENC is not set
812# CONFIG_CRYPTO_LZO is not set 891# CONFIG_CRYPTO_LZO is not set
813CONFIG_CRYPTO_HW=y 892CONFIG_CRYPTO_HW=y
814# CONFIG_CRYPTO_DEV_HIFN_795X is not set 893# CONFIG_CRYPTO_DEV_HIFN_795X is not set
815# CONFIG_PPC_CLOCK is not set 894# CONFIG_PPC_CLOCK is not set
895# CONFIG_VIRTUALIZATION is not set
diff --git a/arch/powerpc/configs/44x/canyonlands_defconfig b/arch/powerpc/configs/44x/canyonlands_defconfig
index a3b763c45ec6..74da5c7754a4 100644
--- a/arch/powerpc/configs/44x/canyonlands_defconfig
+++ b/arch/powerpc/configs/44x/canyonlands_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.25-rc1 3# Linux kernel version: 2.6.27-rc1
4# Thu Feb 21 14:29:28 2008 4# Tue Aug 5 08:46:14 2008
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
@@ -30,8 +30,12 @@ CONFIG_GENERIC_TIME=y
30CONFIG_GENERIC_TIME_VSYSCALL=y 30CONFIG_GENERIC_TIME_VSYSCALL=y
31CONFIG_GENERIC_CLOCKEVENTS=y 31CONFIG_GENERIC_CLOCKEVENTS=y
32CONFIG_GENERIC_HARDIRQS=y 32CONFIG_GENERIC_HARDIRQS=y
33# CONFIG_HAVE_GET_USER_PAGES_FAST is not set
33# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 34# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
34CONFIG_IRQ_PER_CPU=y 35CONFIG_IRQ_PER_CPU=y
36CONFIG_STACKTRACE_SUPPORT=y
37CONFIG_HAVE_LATENCYTOP_SUPPORT=y
38CONFIG_LOCKDEP_SUPPORT=y
35CONFIG_RWSEM_XCHGADD_ALGORITHM=y 39CONFIG_RWSEM_XCHGADD_ALGORITHM=y
36CONFIG_ARCH_HAS_ILOG2_U32=y 40CONFIG_ARCH_HAS_ILOG2_U32=y
37CONFIG_GENERIC_HWEIGHT=y 41CONFIG_GENERIC_HWEIGHT=y
@@ -73,8 +77,9 @@ CONFIG_POSIX_MQUEUE=y
73# CONFIG_IKCONFIG is not set 77# CONFIG_IKCONFIG is not set
74CONFIG_LOG_BUF_SHIFT=14 78CONFIG_LOG_BUF_SHIFT=14
75# CONFIG_CGROUPS is not set 79# CONFIG_CGROUPS is not set
76# CONFIG_FAIR_GROUP_SCHED is not set 80# CONFIG_GROUP_SCHED is not set
77CONFIG_SYSFS_DEPRECATED=y 81CONFIG_SYSFS_DEPRECATED=y
82CONFIG_SYSFS_DEPRECATED_V2=y
78# CONFIG_RELAY is not set 83# CONFIG_RELAY is not set
79# CONFIG_NAMESPACES is not set 84# CONFIG_NAMESPACES is not set
80CONFIG_BLK_DEV_INITRD=y 85CONFIG_BLK_DEV_INITRD=y
@@ -83,12 +88,12 @@ CONFIG_INITRAMFS_SOURCE=""
83CONFIG_SYSCTL=y 88CONFIG_SYSCTL=y
84CONFIG_EMBEDDED=y 89CONFIG_EMBEDDED=y
85CONFIG_SYSCTL_SYSCALL=y 90CONFIG_SYSCTL_SYSCALL=y
91CONFIG_SYSCTL_SYSCALL_CHECK=y
86CONFIG_KALLSYMS=y 92CONFIG_KALLSYMS=y
87# CONFIG_KALLSYMS_ALL is not set 93# CONFIG_KALLSYMS_ALL is not set
88# CONFIG_KALLSYMS_EXTRA_PASS is not set 94# CONFIG_KALLSYMS_EXTRA_PASS is not set
89CONFIG_HOTPLUG=y 95CONFIG_HOTPLUG=y
90CONFIG_PRINTK=y 96CONFIG_PRINTK=y
91# CONFIG_LOGBUFFER is not set
92CONFIG_BUG=y 97CONFIG_BUG=y
93CONFIG_ELF_CORE=y 98CONFIG_ELF_CORE=y
94CONFIG_COMPAT_BRK=y 99CONFIG_COMPAT_BRK=y
@@ -109,13 +114,22 @@ CONFIG_SLUB=y
109# CONFIG_MARKERS is not set 114# CONFIG_MARKERS is not set
110CONFIG_HAVE_OPROFILE=y 115CONFIG_HAVE_OPROFILE=y
111# CONFIG_KPROBES is not set 116# CONFIG_KPROBES is not set
117CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y
118CONFIG_HAVE_IOREMAP_PROT=y
112CONFIG_HAVE_KPROBES=y 119CONFIG_HAVE_KPROBES=y
120CONFIG_HAVE_KRETPROBES=y
121CONFIG_HAVE_ARCH_TRACEHOOK=y
122# CONFIG_HAVE_DMA_ATTRS is not set
123# CONFIG_USE_GENERIC_SMP_HELPERS is not set
124# CONFIG_HAVE_CLK is not set
113CONFIG_PROC_PAGE_MONITOR=y 125CONFIG_PROC_PAGE_MONITOR=y
126# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
114CONFIG_SLABINFO=y 127CONFIG_SLABINFO=y
115CONFIG_RT_MUTEXES=y 128CONFIG_RT_MUTEXES=y
116# CONFIG_TINY_SHMEM is not set 129# CONFIG_TINY_SHMEM is not set
117CONFIG_BASE_SMALL=0 130CONFIG_BASE_SMALL=0
118CONFIG_MODULES=y 131CONFIG_MODULES=y
132# CONFIG_MODULE_FORCE_LOAD is not set
119CONFIG_MODULE_UNLOAD=y 133CONFIG_MODULE_UNLOAD=y
120# CONFIG_MODULE_FORCE_UNLOAD is not set 134# CONFIG_MODULE_FORCE_UNLOAD is not set
121# CONFIG_MODVERSIONS is not set 135# CONFIG_MODVERSIONS is not set
@@ -126,6 +140,7 @@ CONFIG_LBD=y
126# CONFIG_BLK_DEV_IO_TRACE is not set 140# CONFIG_BLK_DEV_IO_TRACE is not set
127# CONFIG_LSF is not set 141# CONFIG_LSF is not set
128# CONFIG_BLK_DEV_BSG is not set 142# CONFIG_BLK_DEV_BSG is not set
143# CONFIG_BLK_DEV_INTEGRITY is not set
129 144
130# 145#
131# IO Schedulers 146# IO Schedulers
@@ -140,25 +155,25 @@ CONFIG_DEFAULT_AS=y
140# CONFIG_DEFAULT_NOOP is not set 155# CONFIG_DEFAULT_NOOP is not set
141CONFIG_DEFAULT_IOSCHED="anticipatory" 156CONFIG_DEFAULT_IOSCHED="anticipatory"
142CONFIG_CLASSIC_RCU=y 157CONFIG_CLASSIC_RCU=y
143# CONFIG_PREEMPT_RCU is not set
144CONFIG_PPC4xx_PCI_EXPRESS=y 158CONFIG_PPC4xx_PCI_EXPRESS=y
145 159
146# 160#
147# Platform support 161# Platform support
148# 162#
149# CONFIG_PPC_MPC512x is not set
150# CONFIG_PPC_MPC5121 is not set
151# CONFIG_PPC_CELL is not set 163# CONFIG_PPC_CELL is not set
152# CONFIG_PPC_CELL_NATIVE is not set 164# CONFIG_PPC_CELL_NATIVE is not set
153# CONFIG_PQ2ADS is not set 165# CONFIG_PQ2ADS is not set
154# CONFIG_BAMBOO is not set 166# CONFIG_BAMBOO is not set
155# CONFIG_EBONY is not set 167# CONFIG_EBONY is not set
168# CONFIG_SAM440EP is not set
156# CONFIG_SEQUOIA is not set 169# CONFIG_SEQUOIA is not set
157# CONFIG_TAISHAN is not set 170# CONFIG_TAISHAN is not set
158# CONFIG_KATMAI is not set 171# CONFIG_KATMAI is not set
159# CONFIG_RAINIER is not set 172# CONFIG_RAINIER is not set
160# CONFIG_WARP is not set 173# CONFIG_WARP is not set
161CONFIG_CANYONLANDS=y 174CONFIG_CANYONLANDS=y
175# CONFIG_YOSEMITE is not set
176# CONFIG_XILINX_VIRTEX440_GENERIC_BOARD is not set
162CONFIG_460EX=y 177CONFIG_460EX=y
163# CONFIG_IPIC is not set 178# CONFIG_IPIC is not set
164# CONFIG_MPIC is not set 179# CONFIG_MPIC is not set
@@ -190,7 +205,6 @@ CONFIG_HZ=250
190CONFIG_PREEMPT_NONE=y 205CONFIG_PREEMPT_NONE=y
191# CONFIG_PREEMPT_VOLUNTARY is not set 206# CONFIG_PREEMPT_VOLUNTARY is not set
192# CONFIG_PREEMPT is not set 207# CONFIG_PREEMPT is not set
193CONFIG_RCU_TRACE=y
194CONFIG_BINFMT_ELF=y 208CONFIG_BINFMT_ELF=y
195# CONFIG_BINFMT_MISC is not set 209# CONFIG_BINFMT_MISC is not set
196# CONFIG_MATH_EMULATION is not set 210# CONFIG_MATH_EMULATION is not set
@@ -208,16 +222,19 @@ CONFIG_FLATMEM=y
208CONFIG_FLAT_NODE_MEM_MAP=y 222CONFIG_FLAT_NODE_MEM_MAP=y
209# CONFIG_SPARSEMEM_STATIC is not set 223# CONFIG_SPARSEMEM_STATIC is not set
210# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set 224# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
225CONFIG_PAGEFLAGS_EXTENDED=y
211CONFIG_SPLIT_PTLOCK_CPUS=4 226CONFIG_SPLIT_PTLOCK_CPUS=4
227CONFIG_MIGRATION=y
212CONFIG_RESOURCES_64BIT=y 228CONFIG_RESOURCES_64BIT=y
213CONFIG_ZONE_DMA_FLAG=1 229CONFIG_ZONE_DMA_FLAG=1
214CONFIG_BOUNCE=y 230CONFIG_BOUNCE=y
215CONFIG_VIRT_TO_BUS=y 231CONFIG_VIRT_TO_BUS=y
232CONFIG_FORCE_MAX_ZONEORDER=11
216CONFIG_PROC_DEVICETREE=y 233CONFIG_PROC_DEVICETREE=y
217CONFIG_CMDLINE_BOOL=y 234CONFIG_CMDLINE_BOOL=y
218CONFIG_CMDLINE="" 235CONFIG_CMDLINE=""
236CONFIG_EXTRA_TARGETS=""
219CONFIG_SECCOMP=y 237CONFIG_SECCOMP=y
220CONFIG_WANT_DEVICE_TREE=y
221CONFIG_ISA_DMA_API=y 238CONFIG_ISA_DMA_API=y
222 239
223# 240#
@@ -225,6 +242,8 @@ CONFIG_ISA_DMA_API=y
225# 242#
226CONFIG_ZONE_DMA=y 243CONFIG_ZONE_DMA=y
227CONFIG_PPC_INDIRECT_PCI=y 244CONFIG_PPC_INDIRECT_PCI=y
245CONFIG_4xx_SOC=y
246CONFIG_PPC_PCI_CHOICE=y
228CONFIG_PCI=y 247CONFIG_PCI=y
229CONFIG_PCI_DOMAINS=y 248CONFIG_PCI_DOMAINS=y
230CONFIG_PCI_SYSCALL=y 249CONFIG_PCI_SYSCALL=y
@@ -235,6 +254,7 @@ CONFIG_PCI_LEGACY=y
235# CONFIG_PCI_DEBUG is not set 254# CONFIG_PCI_DEBUG is not set
236# CONFIG_PCCARD is not set 255# CONFIG_PCCARD is not set
237# CONFIG_HOTPLUG_PCI is not set 256# CONFIG_HOTPLUG_PCI is not set
257# CONFIG_HAS_RAPIDIO is not set
238 258
239# 259#
240# Advanced setup 260# Advanced setup
@@ -244,17 +264,13 @@ CONFIG_PCI_LEGACY=y
244# 264#
245# Default settings for advanced configuration options are used 265# Default settings for advanced configuration options are used
246# 266#
247CONFIG_HIGHMEM_START=0xfe000000
248CONFIG_LOWMEM_SIZE=0x30000000 267CONFIG_LOWMEM_SIZE=0x30000000
268CONFIG_PAGE_OFFSET=0xc0000000
249CONFIG_KERNEL_START=0xc0000000 269CONFIG_KERNEL_START=0xc0000000
270CONFIG_PHYSICAL_START=0x00000000
250CONFIG_TASK_SIZE=0xc0000000 271CONFIG_TASK_SIZE=0xc0000000
251CONFIG_CONSISTENT_START=0xff100000 272CONFIG_CONSISTENT_START=0xff100000
252CONFIG_CONSISTENT_SIZE=0x00200000 273CONFIG_CONSISTENT_SIZE=0x00200000
253CONFIG_BOOT_LOAD=0x01000000
254
255#
256# Networking
257#
258CONFIG_NET=y 274CONFIG_NET=y
259 275
260# 276#
@@ -292,8 +308,6 @@ CONFIG_TCP_CONG_CUBIC=y
292CONFIG_DEFAULT_TCP_CONG="cubic" 308CONFIG_DEFAULT_TCP_CONG="cubic"
293# CONFIG_TCP_MD5SIG is not set 309# CONFIG_TCP_MD5SIG is not set
294# CONFIG_IPV6 is not set 310# CONFIG_IPV6 is not set
295# CONFIG_INET6_XFRM_TUNNEL is not set
296# CONFIG_INET6_TUNNEL is not set
297# CONFIG_NETWORK_SECMARK is not set 311# CONFIG_NETWORK_SECMARK is not set
298# CONFIG_NETFILTER is not set 312# CONFIG_NETFILTER is not set
299# CONFIG_IP_DCCP is not set 313# CONFIG_IP_DCCP is not set
@@ -343,6 +357,8 @@ CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
343CONFIG_STANDALONE=y 357CONFIG_STANDALONE=y
344CONFIG_PREVENT_FIRMWARE_BUILD=y 358CONFIG_PREVENT_FIRMWARE_BUILD=y
345CONFIG_FW_LOADER=y 359CONFIG_FW_LOADER=y
360CONFIG_FIRMWARE_IN_KERNEL=y
361CONFIG_EXTRA_FIRMWARE=""
346# CONFIG_DEBUG_DRIVER is not set 362# CONFIG_DEBUG_DRIVER is not set
347# CONFIG_DEBUG_DEVRES is not set 363# CONFIG_DEBUG_DEVRES is not set
348# CONFIG_SYS_HYPERVISOR is not set 364# CONFIG_SYS_HYPERVISOR is not set
@@ -368,6 +384,7 @@ CONFIG_BLK_DEV_RAM_SIZE=35000
368# CONFIG_CDROM_PKTCDVD is not set 384# CONFIG_CDROM_PKTCDVD is not set
369# CONFIG_ATA_OVER_ETH is not set 385# CONFIG_ATA_OVER_ETH is not set
370# CONFIG_XILINX_SYSACE is not set 386# CONFIG_XILINX_SYSACE is not set
387# CONFIG_BLK_DEV_HD is not set
371# CONFIG_MISC_DEVICES is not set 388# CONFIG_MISC_DEVICES is not set
372CONFIG_HAVE_IDE=y 389CONFIG_HAVE_IDE=y
373# CONFIG_IDE is not set 390# CONFIG_IDE is not set
@@ -386,12 +403,15 @@ CONFIG_HAVE_IDE=y
386# 403#
387# IEEE 1394 (FireWire) support 404# IEEE 1394 (FireWire) support
388# 405#
406
407#
408# Enable only one of the two stacks, unless you know what you are doing
409#
389# CONFIG_FIREWIRE is not set 410# CONFIG_FIREWIRE is not set
390# CONFIG_IEEE1394 is not set 411# CONFIG_IEEE1394 is not set
391# CONFIG_I2O is not set 412# CONFIG_I2O is not set
392# CONFIG_MACINTOSH_DRIVERS is not set 413# CONFIG_MACINTOSH_DRIVERS is not set
393CONFIG_NETDEVICES=y 414CONFIG_NETDEVICES=y
394# CONFIG_NETDEVICES_MULTIQUEUE is not set
395# CONFIG_DUMMY is not set 415# CONFIG_DUMMY is not set
396# CONFIG_BONDING is not set 416# CONFIG_BONDING is not set
397# CONFIG_MACVLAN is not set 417# CONFIG_MACVLAN is not set
@@ -430,6 +450,7 @@ CONFIG_IBM_NEW_EMAC_EMAC4=y
430# 450#
431# CONFIG_WLAN_PRE80211 is not set 451# CONFIG_WLAN_PRE80211 is not set
432# CONFIG_WLAN_80211 is not set 452# CONFIG_WLAN_80211 is not set
453# CONFIG_IWLWIFI_LEDS is not set
433# CONFIG_WAN is not set 454# CONFIG_WAN is not set
434# CONFIG_FDDI is not set 455# CONFIG_FDDI is not set
435# CONFIG_HIPPI is not set 456# CONFIG_HIPPI is not set
@@ -456,6 +477,7 @@ CONFIG_IBM_NEW_EMAC_EMAC4=y
456# Character devices 477# Character devices
457# 478#
458# CONFIG_VT is not set 479# CONFIG_VT is not set
480CONFIG_DEVKMEM=y
459# CONFIG_SERIAL_NONSTANDARD is not set 481# CONFIG_SERIAL_NONSTANDARD is not set
460# CONFIG_NOZOMI is not set 482# CONFIG_NOZOMI is not set
461 483
@@ -494,16 +516,14 @@ CONFIG_LEGACY_PTY_COUNT=256
494# CONFIG_TCG_TPM is not set 516# CONFIG_TCG_TPM is not set
495CONFIG_DEVPORT=y 517CONFIG_DEVPORT=y
496# CONFIG_I2C is not set 518# CONFIG_I2C is not set
497
498#
499# SPI support
500#
501# CONFIG_SPI is not set 519# CONFIG_SPI is not set
502# CONFIG_SPI_MASTER is not set 520CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
521# CONFIG_GPIOLIB is not set
503# CONFIG_W1 is not set 522# CONFIG_W1 is not set
504# CONFIG_POWER_SUPPLY is not set 523# CONFIG_POWER_SUPPLY is not set
505# CONFIG_HWMON is not set 524# CONFIG_HWMON is not set
506# CONFIG_THERMAL is not set 525# CONFIG_THERMAL is not set
526# CONFIG_THERMAL_HWMON is not set
507# CONFIG_WATCHDOG is not set 527# CONFIG_WATCHDOG is not set
508 528
509# 529#
@@ -515,13 +535,24 @@ CONFIG_SSB_POSSIBLE=y
515# 535#
516# Multifunction device drivers 536# Multifunction device drivers
517# 537#
538# CONFIG_MFD_CORE is not set
518# CONFIG_MFD_SM501 is not set 539# CONFIG_MFD_SM501 is not set
540# CONFIG_HTC_PASIC3 is not set
519 541
520# 542#
521# Multimedia devices 543# Multimedia devices
522# 544#
545
546#
547# Multimedia core support
548#
523# CONFIG_VIDEO_DEV is not set 549# CONFIG_VIDEO_DEV is not set
524# CONFIG_DVB_CORE is not set 550# CONFIG_DVB_CORE is not set
551# CONFIG_VIDEO_MEDIA is not set
552
553#
554# Multimedia drivers
555#
525CONFIG_DAB=y 556CONFIG_DAB=y
526 557
527# 558#
@@ -538,22 +569,16 @@ CONFIG_VIDEO_OUTPUT_CONTROL=m
538# Display device support 569# Display device support
539# 570#
540# CONFIG_DISPLAY_SUPPORT is not set 571# CONFIG_DISPLAY_SUPPORT is not set
541
542#
543# Sound
544#
545# CONFIG_SOUND is not set 572# CONFIG_SOUND is not set
546# CONFIG_USB_SUPPORT is not set 573# CONFIG_USB_SUPPORT is not set
547# CONFIG_MMC is not set 574# CONFIG_MMC is not set
548# CONFIG_MEMSTICK is not set 575# CONFIG_MEMSTICK is not set
549# CONFIG_NEW_LEDS is not set 576# CONFIG_NEW_LEDS is not set
577# CONFIG_ACCESSIBILITY is not set
550# CONFIG_INFINIBAND is not set 578# CONFIG_INFINIBAND is not set
551# CONFIG_EDAC is not set 579# CONFIG_EDAC is not set
552# CONFIG_RTC_CLASS is not set 580# CONFIG_RTC_CLASS is not set
553 581# CONFIG_DMADEVICES is not set
554#
555# Userspace I/O
556#
557# CONFIG_UIO is not set 582# CONFIG_UIO is not set
558 583
559# 584#
@@ -568,7 +593,6 @@ CONFIG_EXT2_FS=y
568# CONFIG_JFS_FS is not set 593# CONFIG_JFS_FS is not set
569# CONFIG_FS_POSIX_ACL is not set 594# CONFIG_FS_POSIX_ACL is not set
570# CONFIG_XFS_FS is not set 595# CONFIG_XFS_FS is not set
571# CONFIG_GFS2_FS is not set
572# CONFIG_OCFS2_FS is not set 596# CONFIG_OCFS2_FS is not set
573CONFIG_DNOTIFY=y 597CONFIG_DNOTIFY=y
574CONFIG_INOTIFY=y 598CONFIG_INOTIFY=y
@@ -616,6 +640,7 @@ CONFIG_TMPFS=y
616CONFIG_CRAMFS=y 640CONFIG_CRAMFS=y
617# CONFIG_VXFS_FS is not set 641# CONFIG_VXFS_FS is not set
618# CONFIG_MINIX_FS is not set 642# CONFIG_MINIX_FS is not set
643# CONFIG_OMFS_FS is not set
619# CONFIG_HPFS_FS is not set 644# CONFIG_HPFS_FS is not set
620# CONFIG_QNX4FS_FS is not set 645# CONFIG_QNX4FS_FS is not set
621# CONFIG_ROMFS_FS is not set 646# CONFIG_ROMFS_FS is not set
@@ -626,14 +651,12 @@ CONFIG_NFS_FS=y
626CONFIG_NFS_V3=y 651CONFIG_NFS_V3=y
627# CONFIG_NFS_V3_ACL is not set 652# CONFIG_NFS_V3_ACL is not set
628# CONFIG_NFS_V4 is not set 653# CONFIG_NFS_V4 is not set
629# CONFIG_NFS_DIRECTIO is not set
630# CONFIG_NFSD is not set
631CONFIG_ROOT_NFS=y 654CONFIG_ROOT_NFS=y
655# CONFIG_NFSD is not set
632CONFIG_LOCKD=y 656CONFIG_LOCKD=y
633CONFIG_LOCKD_V4=y 657CONFIG_LOCKD_V4=y
634CONFIG_NFS_COMMON=y 658CONFIG_NFS_COMMON=y
635CONFIG_SUNRPC=y 659CONFIG_SUNRPC=y
636# CONFIG_SUNRPC_BIND34 is not set
637# CONFIG_RPCSEC_GSS_KRB5 is not set 660# CONFIG_RPCSEC_GSS_KRB5 is not set
638# CONFIG_RPCSEC_GSS_SPKM3 is not set 661# CONFIG_RPCSEC_GSS_SPKM3 is not set
639# CONFIG_SMB_FS is not set 662# CONFIG_SMB_FS is not set
@@ -654,8 +677,10 @@ CONFIG_MSDOS_PARTITION=y
654# Library routines 677# Library routines
655# 678#
656CONFIG_BITREVERSE=y 679CONFIG_BITREVERSE=y
680# CONFIG_GENERIC_FIND_FIRST_BIT is not set
657# CONFIG_CRC_CCITT is not set 681# CONFIG_CRC_CCITT is not set
658# CONFIG_CRC16 is not set 682# CONFIG_CRC16 is not set
683# CONFIG_CRC_T10DIF is not set
659# CONFIG_CRC_ITU_T is not set 684# CONFIG_CRC_ITU_T is not set
660CONFIG_CRC32=y 685CONFIG_CRC32=y
661# CONFIG_CRC7 is not set 686# CONFIG_CRC7 is not set
@@ -665,6 +690,7 @@ CONFIG_PLIST=y
665CONFIG_HAS_IOMEM=y 690CONFIG_HAS_IOMEM=y
666CONFIG_HAS_IOPORT=y 691CONFIG_HAS_IOPORT=y
667CONFIG_HAS_DMA=y 692CONFIG_HAS_DMA=y
693CONFIG_HAVE_LMB=y
668 694
669# 695#
670# Kernel hacking 696# Kernel hacking
@@ -672,6 +698,7 @@ CONFIG_HAS_DMA=y
672# CONFIG_PRINTK_TIME is not set 698# CONFIG_PRINTK_TIME is not set
673CONFIG_ENABLE_WARN_DEPRECATED=y 699CONFIG_ENABLE_WARN_DEPRECATED=y
674CONFIG_ENABLE_MUST_CHECK=y 700CONFIG_ENABLE_MUST_CHECK=y
701CONFIG_FRAME_WARN=1024
675CONFIG_MAGIC_SYSRQ=y 702CONFIG_MAGIC_SYSRQ=y
676# CONFIG_UNUSED_SYMBOLS is not set 703# CONFIG_UNUSED_SYMBOLS is not set
677CONFIG_DEBUG_FS=y 704CONFIG_DEBUG_FS=y
@@ -679,9 +706,12 @@ CONFIG_DEBUG_FS=y
679CONFIG_DEBUG_KERNEL=y 706CONFIG_DEBUG_KERNEL=y
680# CONFIG_DEBUG_SHIRQ is not set 707# CONFIG_DEBUG_SHIRQ is not set
681CONFIG_DETECT_SOFTLOCKUP=y 708CONFIG_DETECT_SOFTLOCKUP=y
709# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
710CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
682CONFIG_SCHED_DEBUG=y 711CONFIG_SCHED_DEBUG=y
683# CONFIG_SCHEDSTATS is not set 712# CONFIG_SCHEDSTATS is not set
684# CONFIG_TIMER_STATS is not set 713# CONFIG_TIMER_STATS is not set
714# CONFIG_DEBUG_OBJECTS is not set
685# CONFIG_SLUB_DEBUG_ON is not set 715# CONFIG_SLUB_DEBUG_ON is not set
686# CONFIG_SLUB_STATS is not set 716# CONFIG_SLUB_STATS is not set
687# CONFIG_DEBUG_RT_MUTEXES is not set 717# CONFIG_DEBUG_RT_MUTEXES is not set
@@ -694,19 +724,30 @@ CONFIG_SCHED_DEBUG=y
694# CONFIG_DEBUG_BUGVERBOSE is not set 724# CONFIG_DEBUG_BUGVERBOSE is not set
695# CONFIG_DEBUG_INFO is not set 725# CONFIG_DEBUG_INFO is not set
696# CONFIG_DEBUG_VM is not set 726# CONFIG_DEBUG_VM is not set
727# CONFIG_DEBUG_WRITECOUNT is not set
728# CONFIG_DEBUG_MEMORY_INIT is not set
697# CONFIG_DEBUG_LIST is not set 729# CONFIG_DEBUG_LIST is not set
698# CONFIG_DEBUG_SG is not set 730# CONFIG_DEBUG_SG is not set
699# CONFIG_BOOT_PRINTK_DELAY is not set 731# CONFIG_BOOT_PRINTK_DELAY is not set
700# CONFIG_RCU_TORTURE_TEST is not set 732# CONFIG_RCU_TORTURE_TEST is not set
701# CONFIG_BACKTRACE_SELF_TEST is not set 733# CONFIG_BACKTRACE_SELF_TEST is not set
702# CONFIG_FAULT_INJECTION is not set 734# CONFIG_FAULT_INJECTION is not set
735# CONFIG_LATENCYTOP is not set
736CONFIG_HAVE_FTRACE=y
737CONFIG_HAVE_DYNAMIC_FTRACE=y
738# CONFIG_FTRACE is not set
739# CONFIG_SCHED_TRACER is not set
740# CONFIG_CONTEXT_SWITCH_TRACER is not set
703# CONFIG_SAMPLES is not set 741# CONFIG_SAMPLES is not set
742CONFIG_HAVE_ARCH_KGDB=y
743# CONFIG_KGDB is not set
704# CONFIG_DEBUG_STACKOVERFLOW is not set 744# CONFIG_DEBUG_STACKOVERFLOW is not set
705# CONFIG_DEBUG_STACK_USAGE is not set 745# CONFIG_DEBUG_STACK_USAGE is not set
706# CONFIG_DEBUG_PAGEALLOC is not set 746# CONFIG_DEBUG_PAGEALLOC is not set
707CONFIG_DEBUGGER=y 747# CONFIG_CODE_PATCHING_SELFTEST is not set
708# CONFIG_KGDB is not set 748# CONFIG_FTR_FIXUP_SELFTEST is not set
709# CONFIG_XMON is not set 749# CONFIG_XMON is not set
750# CONFIG_IRQSTACKS is not set
710# CONFIG_VIRQ_DEBUG is not set 751# CONFIG_VIRQ_DEBUG is not set
711# CONFIG_BDI_SWITCH is not set 752# CONFIG_BDI_SWITCH is not set
712# CONFIG_PPC_EARLY_DEBUG is not set 753# CONFIG_PPC_EARLY_DEBUG is not set
@@ -719,3 +760,4 @@ CONFIG_DEBUGGER=y
719# CONFIG_SECURITY_FILE_CAPABILITIES is not set 760# CONFIG_SECURITY_FILE_CAPABILITIES is not set
720# CONFIG_CRYPTO is not set 761# CONFIG_CRYPTO is not set
721# CONFIG_PPC_CLOCK is not set 762# CONFIG_PPC_CLOCK is not set
763# CONFIG_VIRTUALIZATION is not set
diff --git a/arch/powerpc/configs/44x/ebony_defconfig b/arch/powerpc/configs/44x/ebony_defconfig
index 07c8d4ce175a..17615750b494 100644
--- a/arch/powerpc/configs/44x/ebony_defconfig
+++ b/arch/powerpc/configs/44x/ebony_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.25-rc2 3# Linux kernel version: 2.6.27-rc1
4# Fri Feb 15 21:50:44 2008 4# Tue Aug 5 09:04:12 2008
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
@@ -29,8 +29,12 @@ CONFIG_GENERIC_TIME=y
29CONFIG_GENERIC_TIME_VSYSCALL=y 29CONFIG_GENERIC_TIME_VSYSCALL=y
30CONFIG_GENERIC_CLOCKEVENTS=y 30CONFIG_GENERIC_CLOCKEVENTS=y
31CONFIG_GENERIC_HARDIRQS=y 31CONFIG_GENERIC_HARDIRQS=y
32# CONFIG_HAVE_GET_USER_PAGES_FAST is not set
32# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 33# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
33CONFIG_IRQ_PER_CPU=y 34CONFIG_IRQ_PER_CPU=y
35CONFIG_STACKTRACE_SUPPORT=y
36CONFIG_HAVE_LATENCYTOP_SUPPORT=y
37CONFIG_LOCKDEP_SUPPORT=y
34CONFIG_RWSEM_XCHGADD_ALGORITHM=y 38CONFIG_RWSEM_XCHGADD_ALGORITHM=y
35CONFIG_ARCH_HAS_ILOG2_U32=y 39CONFIG_ARCH_HAS_ILOG2_U32=y
36CONFIG_GENERIC_HWEIGHT=y 40CONFIG_GENERIC_HWEIGHT=y
@@ -78,6 +82,7 @@ CONFIG_FAIR_GROUP_SCHED=y
78CONFIG_USER_SCHED=y 82CONFIG_USER_SCHED=y
79# CONFIG_CGROUP_SCHED is not set 83# CONFIG_CGROUP_SCHED is not set
80CONFIG_SYSFS_DEPRECATED=y 84CONFIG_SYSFS_DEPRECATED=y
85CONFIG_SYSFS_DEPRECATED_V2=y
81# CONFIG_RELAY is not set 86# CONFIG_RELAY is not set
82# CONFIG_NAMESPACES is not set 87# CONFIG_NAMESPACES is not set
83CONFIG_BLK_DEV_INITRD=y 88CONFIG_BLK_DEV_INITRD=y
@@ -86,6 +91,7 @@ CONFIG_INITRAMFS_SOURCE=""
86CONFIG_SYSCTL=y 91CONFIG_SYSCTL=y
87CONFIG_EMBEDDED=y 92CONFIG_EMBEDDED=y
88CONFIG_SYSCTL_SYSCALL=y 93CONFIG_SYSCTL_SYSCALL=y
94CONFIG_SYSCTL_SYSCALL_CHECK=y
89CONFIG_KALLSYMS=y 95CONFIG_KALLSYMS=y
90CONFIG_KALLSYMS_ALL=y 96CONFIG_KALLSYMS_ALL=y
91CONFIG_KALLSYMS_EXTRA_PASS=y 97CONFIG_KALLSYMS_EXTRA_PASS=y
@@ -111,13 +117,22 @@ CONFIG_SLUB=y
111# CONFIG_MARKERS is not set 117# CONFIG_MARKERS is not set
112CONFIG_HAVE_OPROFILE=y 118CONFIG_HAVE_OPROFILE=y
113# CONFIG_KPROBES is not set 119# CONFIG_KPROBES is not set
120CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y
121CONFIG_HAVE_IOREMAP_PROT=y
114CONFIG_HAVE_KPROBES=y 122CONFIG_HAVE_KPROBES=y
123CONFIG_HAVE_KRETPROBES=y
124CONFIG_HAVE_ARCH_TRACEHOOK=y
125# CONFIG_HAVE_DMA_ATTRS is not set
126# CONFIG_USE_GENERIC_SMP_HELPERS is not set
127# CONFIG_HAVE_CLK is not set
115CONFIG_PROC_PAGE_MONITOR=y 128CONFIG_PROC_PAGE_MONITOR=y
129# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
116CONFIG_SLABINFO=y 130CONFIG_SLABINFO=y
117CONFIG_RT_MUTEXES=y 131CONFIG_RT_MUTEXES=y
118# CONFIG_TINY_SHMEM is not set 132# CONFIG_TINY_SHMEM is not set
119CONFIG_BASE_SMALL=0 133CONFIG_BASE_SMALL=0
120CONFIG_MODULES=y 134CONFIG_MODULES=y
135# CONFIG_MODULE_FORCE_LOAD is not set
121CONFIG_MODULE_UNLOAD=y 136CONFIG_MODULE_UNLOAD=y
122# CONFIG_MODULE_FORCE_UNLOAD is not set 137# CONFIG_MODULE_FORCE_UNLOAD is not set
123# CONFIG_MODVERSIONS is not set 138# CONFIG_MODVERSIONS is not set
@@ -128,6 +143,7 @@ CONFIG_LBD=y
128# CONFIG_BLK_DEV_IO_TRACE is not set 143# CONFIG_BLK_DEV_IO_TRACE is not set
129# CONFIG_LSF is not set 144# CONFIG_LSF is not set
130# CONFIG_BLK_DEV_BSG is not set 145# CONFIG_BLK_DEV_BSG is not set
146# CONFIG_BLK_DEV_INTEGRITY is not set
131 147
132# 148#
133# IO Schedulers 149# IO Schedulers
@@ -142,24 +158,25 @@ CONFIG_DEFAULT_AS=y
142# CONFIG_DEFAULT_NOOP is not set 158# CONFIG_DEFAULT_NOOP is not set
143CONFIG_DEFAULT_IOSCHED="anticipatory" 159CONFIG_DEFAULT_IOSCHED="anticipatory"
144CONFIG_CLASSIC_RCU=y 160CONFIG_CLASSIC_RCU=y
145# CONFIG_PREEMPT_RCU is not set
146# CONFIG_PPC4xx_PCI_EXPRESS is not set 161# CONFIG_PPC4xx_PCI_EXPRESS is not set
147 162
148# 163#
149# Platform support 164# Platform support
150# 165#
151# CONFIG_PPC_MPC512x is not set
152# CONFIG_PPC_MPC5121 is not set
153# CONFIG_PPC_CELL is not set 166# CONFIG_PPC_CELL is not set
154# CONFIG_PPC_CELL_NATIVE is not set 167# CONFIG_PPC_CELL_NATIVE is not set
155# CONFIG_PQ2ADS is not set 168# CONFIG_PQ2ADS is not set
156# CONFIG_BAMBOO is not set 169# CONFIG_BAMBOO is not set
157CONFIG_EBONY=y 170CONFIG_EBONY=y
171# CONFIG_SAM440EP is not set
158# CONFIG_SEQUOIA is not set 172# CONFIG_SEQUOIA is not set
159# CONFIG_TAISHAN is not set 173# CONFIG_TAISHAN is not set
160# CONFIG_KATMAI is not set 174# CONFIG_KATMAI is not set
161# CONFIG_RAINIER is not set 175# CONFIG_RAINIER is not set
162# CONFIG_WARP is not set 176# CONFIG_WARP is not set
177# CONFIG_CANYONLANDS is not set
178# CONFIG_YOSEMITE is not set
179# CONFIG_XILINX_VIRTEX440_GENERIC_BOARD is not set
163CONFIG_440GP=y 180CONFIG_440GP=y
164# CONFIG_IPIC is not set 181# CONFIG_IPIC is not set
165# CONFIG_MPIC is not set 182# CONFIG_MPIC is not set
@@ -192,7 +209,6 @@ CONFIG_HZ=250
192CONFIG_PREEMPT_NONE=y 209CONFIG_PREEMPT_NONE=y
193# CONFIG_PREEMPT_VOLUNTARY is not set 210# CONFIG_PREEMPT_VOLUNTARY is not set
194# CONFIG_PREEMPT is not set 211# CONFIG_PREEMPT is not set
195CONFIG_RCU_TRACE=y
196CONFIG_BINFMT_ELF=y 212CONFIG_BINFMT_ELF=y
197# CONFIG_BINFMT_MISC is not set 213# CONFIG_BINFMT_MISC is not set
198CONFIG_MATH_EMULATION=y 214CONFIG_MATH_EMULATION=y
@@ -210,13 +226,17 @@ CONFIG_FLATMEM=y
210CONFIG_FLAT_NODE_MEM_MAP=y 226CONFIG_FLAT_NODE_MEM_MAP=y
211# CONFIG_SPARSEMEM_STATIC is not set 227# CONFIG_SPARSEMEM_STATIC is not set
212# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set 228# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
229CONFIG_PAGEFLAGS_EXTENDED=y
213CONFIG_SPLIT_PTLOCK_CPUS=4 230CONFIG_SPLIT_PTLOCK_CPUS=4
231CONFIG_MIGRATION=y
214CONFIG_RESOURCES_64BIT=y 232CONFIG_RESOURCES_64BIT=y
215CONFIG_ZONE_DMA_FLAG=1 233CONFIG_ZONE_DMA_FLAG=1
216CONFIG_BOUNCE=y 234CONFIG_BOUNCE=y
217CONFIG_VIRT_TO_BUS=y 235CONFIG_VIRT_TO_BUS=y
236CONFIG_FORCE_MAX_ZONEORDER=11
218CONFIG_PROC_DEVICETREE=y 237CONFIG_PROC_DEVICETREE=y
219# CONFIG_CMDLINE_BOOL is not set 238# CONFIG_CMDLINE_BOOL is not set
239CONFIG_EXTRA_TARGETS=""
220CONFIG_SECCOMP=y 240CONFIG_SECCOMP=y
221CONFIG_ISA_DMA_API=y 241CONFIG_ISA_DMA_API=y
222 242
@@ -225,6 +245,8 @@ CONFIG_ISA_DMA_API=y
225# 245#
226CONFIG_ZONE_DMA=y 246CONFIG_ZONE_DMA=y
227CONFIG_PPC_INDIRECT_PCI=y 247CONFIG_PPC_INDIRECT_PCI=y
248CONFIG_4xx_SOC=y
249CONFIG_PPC_PCI_CHOICE=y
228CONFIG_PCI=y 250CONFIG_PCI=y
229CONFIG_PCI_DOMAINS=y 251CONFIG_PCI_DOMAINS=y
230CONFIG_PCI_SYSCALL=y 252CONFIG_PCI_SYSCALL=y
@@ -235,6 +257,7 @@ CONFIG_PCI_LEGACY=y
235# CONFIG_PCI_DEBUG is not set 257# CONFIG_PCI_DEBUG is not set
236# CONFIG_PCCARD is not set 258# CONFIG_PCCARD is not set
237# CONFIG_HOTPLUG_PCI is not set 259# CONFIG_HOTPLUG_PCI is not set
260# CONFIG_HAS_RAPIDIO is not set
238 261
239# 262#
240# Advanced setup 263# Advanced setup
@@ -244,17 +267,13 @@ CONFIG_PCI_LEGACY=y
244# 267#
245# Default settings for advanced configuration options are used 268# Default settings for advanced configuration options are used
246# 269#
247CONFIG_HIGHMEM_START=0xfe000000
248CONFIG_LOWMEM_SIZE=0x30000000 270CONFIG_LOWMEM_SIZE=0x30000000
271CONFIG_PAGE_OFFSET=0xc0000000
249CONFIG_KERNEL_START=0xc0000000 272CONFIG_KERNEL_START=0xc0000000
273CONFIG_PHYSICAL_START=0x00000000
250CONFIG_TASK_SIZE=0xc0000000 274CONFIG_TASK_SIZE=0xc0000000
251CONFIG_CONSISTENT_START=0xff100000 275CONFIG_CONSISTENT_START=0xff100000
252CONFIG_CONSISTENT_SIZE=0x00200000 276CONFIG_CONSISTENT_SIZE=0x00200000
253CONFIG_BOOT_LOAD=0x01000000
254
255#
256# Networking
257#
258CONFIG_NET=y 277CONFIG_NET=y
259 278
260# 279#
@@ -292,8 +311,6 @@ CONFIG_TCP_CONG_CUBIC=y
292CONFIG_DEFAULT_TCP_CONG="cubic" 311CONFIG_DEFAULT_TCP_CONG="cubic"
293# CONFIG_TCP_MD5SIG is not set 312# CONFIG_TCP_MD5SIG is not set
294# CONFIG_IPV6 is not set 313# CONFIG_IPV6 is not set
295# CONFIG_INET6_XFRM_TUNNEL is not set
296# CONFIG_INET6_TUNNEL is not set
297# CONFIG_NETWORK_SECMARK is not set 314# CONFIG_NETWORK_SECMARK is not set
298# CONFIG_NETFILTER is not set 315# CONFIG_NETFILTER is not set
299# CONFIG_IP_DCCP is not set 316# CONFIG_IP_DCCP is not set
@@ -343,6 +360,8 @@ CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
343CONFIG_STANDALONE=y 360CONFIG_STANDALONE=y
344CONFIG_PREVENT_FIRMWARE_BUILD=y 361CONFIG_PREVENT_FIRMWARE_BUILD=y
345CONFIG_FW_LOADER=y 362CONFIG_FW_LOADER=y
363CONFIG_FIRMWARE_IN_KERNEL=y
364CONFIG_EXTRA_FIRMWARE=""
346# CONFIG_DEBUG_DRIVER is not set 365# CONFIG_DEBUG_DRIVER is not set
347# CONFIG_DEBUG_DEVRES is not set 366# CONFIG_DEBUG_DEVRES is not set
348# CONFIG_SYS_HYPERVISOR is not set 367# CONFIG_SYS_HYPERVISOR is not set
@@ -355,6 +374,7 @@ CONFIG_MTD_PARTITIONS=y
355# CONFIG_MTD_REDBOOT_PARTS is not set 374# CONFIG_MTD_REDBOOT_PARTS is not set
356# CONFIG_MTD_CMDLINE_PARTS is not set 375# CONFIG_MTD_CMDLINE_PARTS is not set
357CONFIG_MTD_OF_PARTS=y 376CONFIG_MTD_OF_PARTS=y
377# CONFIG_MTD_AR7_PARTS is not set
358 378
359# 379#
360# User Modules And Translation Layers 380# User Modules And Translation Layers
@@ -444,12 +464,14 @@ CONFIG_BLK_DEV_RAM_SIZE=35000
444# CONFIG_CDROM_PKTCDVD is not set 464# CONFIG_CDROM_PKTCDVD is not set
445# CONFIG_ATA_OVER_ETH is not set 465# CONFIG_ATA_OVER_ETH is not set
446# CONFIG_XILINX_SYSACE is not set 466# CONFIG_XILINX_SYSACE is not set
467# CONFIG_BLK_DEV_HD is not set
447CONFIG_MISC_DEVICES=y 468CONFIG_MISC_DEVICES=y
448# CONFIG_PHANTOM is not set 469# CONFIG_PHANTOM is not set
449# CONFIG_EEPROM_93CX6 is not set 470# CONFIG_EEPROM_93CX6 is not set
450# CONFIG_SGI_IOC4 is not set 471# CONFIG_SGI_IOC4 is not set
451# CONFIG_TIFM_CORE is not set 472# CONFIG_TIFM_CORE is not set
452# CONFIG_ENCLOSURE_SERVICES is not set 473# CONFIG_ENCLOSURE_SERVICES is not set
474# CONFIG_HP_ILO is not set
453CONFIG_HAVE_IDE=y 475CONFIG_HAVE_IDE=y
454# CONFIG_IDE is not set 476# CONFIG_IDE is not set
455 477
@@ -467,12 +489,15 @@ CONFIG_HAVE_IDE=y
467# 489#
468# IEEE 1394 (FireWire) support 490# IEEE 1394 (FireWire) support
469# 491#
492
493#
494# Enable only one of the two stacks, unless you know what you are doing
495#
470# CONFIG_FIREWIRE is not set 496# CONFIG_FIREWIRE is not set
471# CONFIG_IEEE1394 is not set 497# CONFIG_IEEE1394 is not set
472# CONFIG_I2O is not set 498# CONFIG_I2O is not set
473# CONFIG_MACINTOSH_DRIVERS is not set 499# CONFIG_MACINTOSH_DRIVERS is not set
474CONFIG_NETDEVICES=y 500CONFIG_NETDEVICES=y
475# CONFIG_NETDEVICES_MULTIQUEUE is not set
476# CONFIG_DUMMY is not set 501# CONFIG_DUMMY is not set
477# CONFIG_BONDING is not set 502# CONFIG_BONDING is not set
478# CONFIG_MACVLAN is not set 503# CONFIG_MACVLAN is not set
@@ -507,7 +532,6 @@ CONFIG_NETDEV_1000=y
507# CONFIG_DL2K is not set 532# CONFIG_DL2K is not set
508# CONFIG_E1000 is not set 533# CONFIG_E1000 is not set
509# CONFIG_E1000E is not set 534# CONFIG_E1000E is not set
510# CONFIG_E1000E_ENABLED is not set
511# CONFIG_IP1000 is not set 535# CONFIG_IP1000 is not set
512# CONFIG_IGB is not set 536# CONFIG_IGB is not set
513# CONFIG_NS83820 is not set 537# CONFIG_NS83820 is not set
@@ -517,12 +541,12 @@ CONFIG_NETDEV_1000=y
517# CONFIG_SIS190 is not set 541# CONFIG_SIS190 is not set
518# CONFIG_SKGE is not set 542# CONFIG_SKGE is not set
519# CONFIG_SKY2 is not set 543# CONFIG_SKY2 is not set
520# CONFIG_SK98LIN is not set
521# CONFIG_VIA_VELOCITY is not set 544# CONFIG_VIA_VELOCITY is not set
522# CONFIG_TIGON3 is not set 545# CONFIG_TIGON3 is not set
523# CONFIG_BNX2 is not set 546# CONFIG_BNX2 is not set
524# CONFIG_QLA3XXX is not set 547# CONFIG_QLA3XXX is not set
525# CONFIG_ATL1 is not set 548# CONFIG_ATL1 is not set
549# CONFIG_ATL1E is not set
526CONFIG_NETDEV_10000=y 550CONFIG_NETDEV_10000=y
527# CONFIG_CHELSIO_T1 is not set 551# CONFIG_CHELSIO_T1 is not set
528# CONFIG_CHELSIO_T3 is not set 552# CONFIG_CHELSIO_T3 is not set
@@ -535,6 +559,7 @@ CONFIG_NETDEV_10000=y
535# CONFIG_MLX4_CORE is not set 559# CONFIG_MLX4_CORE is not set
536# CONFIG_TEHUTI is not set 560# CONFIG_TEHUTI is not set
537# CONFIG_BNX2X is not set 561# CONFIG_BNX2X is not set
562# CONFIG_SFC is not set
538# CONFIG_TR is not set 563# CONFIG_TR is not set
539 564
540# 565#
@@ -542,6 +567,7 @@ CONFIG_NETDEV_10000=y
542# 567#
543# CONFIG_WLAN_PRE80211 is not set 568# CONFIG_WLAN_PRE80211 is not set
544# CONFIG_WLAN_80211 is not set 569# CONFIG_WLAN_80211 is not set
570# CONFIG_IWLWIFI_LEDS is not set
545# CONFIG_WAN is not set 571# CONFIG_WAN is not set
546# CONFIG_FDDI is not set 572# CONFIG_FDDI is not set
547# CONFIG_HIPPI is not set 573# CONFIG_HIPPI is not set
@@ -568,6 +594,7 @@ CONFIG_NETDEV_10000=y
568# Character devices 594# Character devices
569# 595#
570# CONFIG_VT is not set 596# CONFIG_VT is not set
597CONFIG_DEVKMEM=y
571# CONFIG_SERIAL_NONSTANDARD is not set 598# CONFIG_SERIAL_NONSTANDARD is not set
572# CONFIG_NOZOMI is not set 599# CONFIG_NOZOMI is not set
573 600
@@ -606,12 +633,9 @@ CONFIG_LEGACY_PTY_COUNT=256
606# CONFIG_TCG_TPM is not set 633# CONFIG_TCG_TPM is not set
607CONFIG_DEVPORT=y 634CONFIG_DEVPORT=y
608# CONFIG_I2C is not set 635# CONFIG_I2C is not set
609
610#
611# SPI support
612#
613# CONFIG_SPI is not set 636# CONFIG_SPI is not set
614# CONFIG_SPI_MASTER is not set 637CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
638# CONFIG_GPIOLIB is not set
615# CONFIG_W1 is not set 639# CONFIG_W1 is not set
616# CONFIG_POWER_SUPPLY is not set 640# CONFIG_POWER_SUPPLY is not set
617# CONFIG_HWMON is not set 641# CONFIG_HWMON is not set
@@ -627,13 +651,24 @@ CONFIG_SSB_POSSIBLE=y
627# 651#
628# Multifunction device drivers 652# Multifunction device drivers
629# 653#
654# CONFIG_MFD_CORE is not set
630# CONFIG_MFD_SM501 is not set 655# CONFIG_MFD_SM501 is not set
656# CONFIG_HTC_PASIC3 is not set
631 657
632# 658#
633# Multimedia devices 659# Multimedia devices
634# 660#
661
662#
663# Multimedia core support
664#
635# CONFIG_VIDEO_DEV is not set 665# CONFIG_VIDEO_DEV is not set
636# CONFIG_DVB_CORE is not set 666# CONFIG_DVB_CORE is not set
667# CONFIG_VIDEO_MEDIA is not set
668
669#
670# Multimedia drivers
671#
637# CONFIG_DAB is not set 672# CONFIG_DAB is not set
638 673
639# 674#
@@ -650,16 +685,14 @@ CONFIG_SSB_POSSIBLE=y
650# Display device support 685# Display device support
651# 686#
652# CONFIG_DISPLAY_SUPPORT is not set 687# CONFIG_DISPLAY_SUPPORT is not set
653
654#
655# Sound
656#
657# CONFIG_SOUND is not set 688# CONFIG_SOUND is not set
658CONFIG_USB_SUPPORT=y 689CONFIG_USB_SUPPORT=y
659CONFIG_USB_ARCH_HAS_HCD=y 690CONFIG_USB_ARCH_HAS_HCD=y
660CONFIG_USB_ARCH_HAS_OHCI=y 691CONFIG_USB_ARCH_HAS_OHCI=y
661CONFIG_USB_ARCH_HAS_EHCI=y 692CONFIG_USB_ARCH_HAS_EHCI=y
662# CONFIG_USB is not set 693# CONFIG_USB is not set
694# CONFIG_USB_OTG_WHITELIST is not set
695# CONFIG_USB_OTG_BLACKLIST_HUB is not set
663 696
664# 697#
665# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 698# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
@@ -668,13 +701,11 @@ CONFIG_USB_ARCH_HAS_EHCI=y
668# CONFIG_MMC is not set 701# CONFIG_MMC is not set
669# CONFIG_MEMSTICK is not set 702# CONFIG_MEMSTICK is not set
670# CONFIG_NEW_LEDS is not set 703# CONFIG_NEW_LEDS is not set
704# CONFIG_ACCESSIBILITY is not set
671# CONFIG_INFINIBAND is not set 705# CONFIG_INFINIBAND is not set
672# CONFIG_EDAC is not set 706# CONFIG_EDAC is not set
673# CONFIG_RTC_CLASS is not set 707# CONFIG_RTC_CLASS is not set
674 708# CONFIG_DMADEVICES is not set
675#
676# Userspace I/O
677#
678# CONFIG_UIO is not set 709# CONFIG_UIO is not set
679 710
680# 711#
@@ -689,7 +720,6 @@ CONFIG_EXT2_FS=y
689# CONFIG_JFS_FS is not set 720# CONFIG_JFS_FS is not set
690# CONFIG_FS_POSIX_ACL is not set 721# CONFIG_FS_POSIX_ACL is not set
691# CONFIG_XFS_FS is not set 722# CONFIG_XFS_FS is not set
692# CONFIG_GFS2_FS is not set
693# CONFIG_OCFS2_FS is not set 723# CONFIG_OCFS2_FS is not set
694CONFIG_DNOTIFY=y 724CONFIG_DNOTIFY=y
695CONFIG_INOTIFY=y 725CONFIG_INOTIFY=y
@@ -748,6 +778,7 @@ CONFIG_JFFS2_RTIME=y
748CONFIG_CRAMFS=y 778CONFIG_CRAMFS=y
749# CONFIG_VXFS_FS is not set 779# CONFIG_VXFS_FS is not set
750# CONFIG_MINIX_FS is not set 780# CONFIG_MINIX_FS is not set
781# CONFIG_OMFS_FS is not set
751# CONFIG_HPFS_FS is not set 782# CONFIG_HPFS_FS is not set
752# CONFIG_QNX4FS_FS is not set 783# CONFIG_QNX4FS_FS is not set
753# CONFIG_ROMFS_FS is not set 784# CONFIG_ROMFS_FS is not set
@@ -758,14 +789,12 @@ CONFIG_NFS_FS=y
758CONFIG_NFS_V3=y 789CONFIG_NFS_V3=y
759# CONFIG_NFS_V3_ACL is not set 790# CONFIG_NFS_V3_ACL is not set
760# CONFIG_NFS_V4 is not set 791# CONFIG_NFS_V4 is not set
761# CONFIG_NFS_DIRECTIO is not set
762# CONFIG_NFSD is not set
763CONFIG_ROOT_NFS=y 792CONFIG_ROOT_NFS=y
793# CONFIG_NFSD is not set
764CONFIG_LOCKD=y 794CONFIG_LOCKD=y
765CONFIG_LOCKD_V4=y 795CONFIG_LOCKD_V4=y
766CONFIG_NFS_COMMON=y 796CONFIG_NFS_COMMON=y
767CONFIG_SUNRPC=y 797CONFIG_SUNRPC=y
768# CONFIG_SUNRPC_BIND34 is not set
769# CONFIG_RPCSEC_GSS_KRB5 is not set 798# CONFIG_RPCSEC_GSS_KRB5 is not set
770# CONFIG_RPCSEC_GSS_SPKM3 is not set 799# CONFIG_RPCSEC_GSS_SPKM3 is not set
771# CONFIG_SMB_FS is not set 800# CONFIG_SMB_FS is not set
@@ -786,8 +815,10 @@ CONFIG_MSDOS_PARTITION=y
786# Library routines 815# Library routines
787# 816#
788CONFIG_BITREVERSE=y 817CONFIG_BITREVERSE=y
818# CONFIG_GENERIC_FIND_FIRST_BIT is not set
789# CONFIG_CRC_CCITT is not set 819# CONFIG_CRC_CCITT is not set
790# CONFIG_CRC16 is not set 820# CONFIG_CRC16 is not set
821# CONFIG_CRC_T10DIF is not set
791# CONFIG_CRC_ITU_T is not set 822# CONFIG_CRC_ITU_T is not set
792CONFIG_CRC32=y 823CONFIG_CRC32=y
793# CONFIG_CRC7 is not set 824# CONFIG_CRC7 is not set
@@ -798,6 +829,7 @@ CONFIG_PLIST=y
798CONFIG_HAS_IOMEM=y 829CONFIG_HAS_IOMEM=y
799CONFIG_HAS_IOPORT=y 830CONFIG_HAS_IOPORT=y
800CONFIG_HAS_DMA=y 831CONFIG_HAS_DMA=y
832CONFIG_HAVE_LMB=y
801 833
802# 834#
803# Kernel hacking 835# Kernel hacking
@@ -805,6 +837,7 @@ CONFIG_HAS_DMA=y
805# CONFIG_PRINTK_TIME is not set 837# CONFIG_PRINTK_TIME is not set
806CONFIG_ENABLE_WARN_DEPRECATED=y 838CONFIG_ENABLE_WARN_DEPRECATED=y
807CONFIG_ENABLE_MUST_CHECK=y 839CONFIG_ENABLE_MUST_CHECK=y
840CONFIG_FRAME_WARN=1024
808CONFIG_MAGIC_SYSRQ=y 841CONFIG_MAGIC_SYSRQ=y
809# CONFIG_UNUSED_SYMBOLS is not set 842# CONFIG_UNUSED_SYMBOLS is not set
810CONFIG_DEBUG_FS=y 843CONFIG_DEBUG_FS=y
@@ -812,9 +845,12 @@ CONFIG_DEBUG_FS=y
812CONFIG_DEBUG_KERNEL=y 845CONFIG_DEBUG_KERNEL=y
813# CONFIG_DEBUG_SHIRQ is not set 846# CONFIG_DEBUG_SHIRQ is not set
814CONFIG_DETECT_SOFTLOCKUP=y 847CONFIG_DETECT_SOFTLOCKUP=y
848# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
849CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
815CONFIG_SCHED_DEBUG=y 850CONFIG_SCHED_DEBUG=y
816# CONFIG_SCHEDSTATS is not set 851# CONFIG_SCHEDSTATS is not set
817# CONFIG_TIMER_STATS is not set 852# CONFIG_TIMER_STATS is not set
853# CONFIG_DEBUG_OBJECTS is not set
818# CONFIG_SLUB_DEBUG_ON is not set 854# CONFIG_SLUB_DEBUG_ON is not set
819# CONFIG_SLUB_STATS is not set 855# CONFIG_SLUB_STATS is not set
820# CONFIG_DEBUG_RT_MUTEXES is not set 856# CONFIG_DEBUG_RT_MUTEXES is not set
@@ -827,17 +863,30 @@ CONFIG_SCHED_DEBUG=y
827CONFIG_DEBUG_BUGVERBOSE=y 863CONFIG_DEBUG_BUGVERBOSE=y
828# CONFIG_DEBUG_INFO is not set 864# CONFIG_DEBUG_INFO is not set
829# CONFIG_DEBUG_VM is not set 865# CONFIG_DEBUG_VM is not set
866# CONFIG_DEBUG_WRITECOUNT is not set
867# CONFIG_DEBUG_MEMORY_INIT is not set
830# CONFIG_DEBUG_LIST is not set 868# CONFIG_DEBUG_LIST is not set
831# CONFIG_DEBUG_SG is not set 869# CONFIG_DEBUG_SG is not set
832# CONFIG_BOOT_PRINTK_DELAY is not set 870# CONFIG_BOOT_PRINTK_DELAY is not set
833# CONFIG_RCU_TORTURE_TEST is not set 871# CONFIG_RCU_TORTURE_TEST is not set
834# CONFIG_BACKTRACE_SELF_TEST is not set 872# CONFIG_BACKTRACE_SELF_TEST is not set
835# CONFIG_FAULT_INJECTION is not set 873# CONFIG_FAULT_INJECTION is not set
874# CONFIG_LATENCYTOP is not set
875CONFIG_HAVE_FTRACE=y
876CONFIG_HAVE_DYNAMIC_FTRACE=y
877# CONFIG_FTRACE is not set
878# CONFIG_SCHED_TRACER is not set
879# CONFIG_CONTEXT_SWITCH_TRACER is not set
836# CONFIG_SAMPLES is not set 880# CONFIG_SAMPLES is not set
881CONFIG_HAVE_ARCH_KGDB=y
882# CONFIG_KGDB is not set
837# CONFIG_DEBUG_STACKOVERFLOW is not set 883# CONFIG_DEBUG_STACKOVERFLOW is not set
838# CONFIG_DEBUG_STACK_USAGE is not set 884# CONFIG_DEBUG_STACK_USAGE is not set
839# CONFIG_DEBUG_PAGEALLOC is not set 885# CONFIG_DEBUG_PAGEALLOC is not set
840# CONFIG_DEBUGGER is not set 886# CONFIG_CODE_PATCHING_SELFTEST is not set
887# CONFIG_FTR_FIXUP_SELFTEST is not set
888# CONFIG_XMON is not set
889# CONFIG_IRQSTACKS is not set
841# CONFIG_VIRQ_DEBUG is not set 890# CONFIG_VIRQ_DEBUG is not set
842# CONFIG_BDI_SWITCH is not set 891# CONFIG_BDI_SWITCH is not set
843# CONFIG_PPC_EARLY_DEBUG is not set 892# CONFIG_PPC_EARLY_DEBUG is not set
@@ -849,50 +898,84 @@ CONFIG_DEBUG_BUGVERBOSE=y
849# CONFIG_SECURITY is not set 898# CONFIG_SECURITY is not set
850# CONFIG_SECURITY_FILE_CAPABILITIES is not set 899# CONFIG_SECURITY_FILE_CAPABILITIES is not set
851CONFIG_CRYPTO=y 900CONFIG_CRYPTO=y
901
902#
903# Crypto core or helper
904#
852CONFIG_CRYPTO_ALGAPI=y 905CONFIG_CRYPTO_ALGAPI=y
853CONFIG_CRYPTO_BLKCIPHER=y 906CONFIG_CRYPTO_BLKCIPHER=y
854# CONFIG_CRYPTO_SEQIV is not set
855CONFIG_CRYPTO_MANAGER=y 907CONFIG_CRYPTO_MANAGER=y
908# CONFIG_CRYPTO_GF128MUL is not set
909# CONFIG_CRYPTO_NULL is not set
910# CONFIG_CRYPTO_CRYPTD is not set
911# CONFIG_CRYPTO_AUTHENC is not set
912# CONFIG_CRYPTO_TEST is not set
913
914#
915# Authenticated Encryption with Associated Data
916#
917# CONFIG_CRYPTO_CCM is not set
918# CONFIG_CRYPTO_GCM is not set
919# CONFIG_CRYPTO_SEQIV is not set
920
921#
922# Block modes
923#
924CONFIG_CRYPTO_CBC=y
925# CONFIG_CRYPTO_CTR is not set
926# CONFIG_CRYPTO_CTS is not set
927CONFIG_CRYPTO_ECB=y
928# CONFIG_CRYPTO_LRW is not set
929CONFIG_CRYPTO_PCBC=y
930# CONFIG_CRYPTO_XTS is not set
931
932#
933# Hash modes
934#
856# CONFIG_CRYPTO_HMAC is not set 935# CONFIG_CRYPTO_HMAC is not set
857# CONFIG_CRYPTO_XCBC is not set 936# CONFIG_CRYPTO_XCBC is not set
858# CONFIG_CRYPTO_NULL is not set 937
938#
939# Digest
940#
941# CONFIG_CRYPTO_CRC32C is not set
859# CONFIG_CRYPTO_MD4 is not set 942# CONFIG_CRYPTO_MD4 is not set
860CONFIG_CRYPTO_MD5=y 943CONFIG_CRYPTO_MD5=y
944# CONFIG_CRYPTO_MICHAEL_MIC is not set
945# CONFIG_CRYPTO_RMD128 is not set
946# CONFIG_CRYPTO_RMD160 is not set
947# CONFIG_CRYPTO_RMD256 is not set
948# CONFIG_CRYPTO_RMD320 is not set
861# CONFIG_CRYPTO_SHA1 is not set 949# CONFIG_CRYPTO_SHA1 is not set
862# CONFIG_CRYPTO_SHA256 is not set 950# CONFIG_CRYPTO_SHA256 is not set
863# CONFIG_CRYPTO_SHA512 is not set 951# CONFIG_CRYPTO_SHA512 is not set
864# CONFIG_CRYPTO_WP512 is not set
865# CONFIG_CRYPTO_TGR192 is not set 952# CONFIG_CRYPTO_TGR192 is not set
866# CONFIG_CRYPTO_GF128MUL is not set 953# CONFIG_CRYPTO_WP512 is not set
867CONFIG_CRYPTO_ECB=y 954
868CONFIG_CRYPTO_CBC=y 955#
869CONFIG_CRYPTO_PCBC=y 956# Ciphers
870# CONFIG_CRYPTO_LRW is not set 957#
871# CONFIG_CRYPTO_XTS is not set
872# CONFIG_CRYPTO_CTR is not set
873# CONFIG_CRYPTO_GCM is not set
874# CONFIG_CRYPTO_CCM is not set
875# CONFIG_CRYPTO_CRYPTD is not set
876CONFIG_CRYPTO_DES=y
877# CONFIG_CRYPTO_FCRYPT is not set
878# CONFIG_CRYPTO_BLOWFISH is not set
879# CONFIG_CRYPTO_TWOFISH is not set
880# CONFIG_CRYPTO_SERPENT is not set
881# CONFIG_CRYPTO_AES is not set 958# CONFIG_CRYPTO_AES is not set
959# CONFIG_CRYPTO_ANUBIS is not set
960# CONFIG_CRYPTO_ARC4 is not set
961# CONFIG_CRYPTO_BLOWFISH is not set
962# CONFIG_CRYPTO_CAMELLIA is not set
882# CONFIG_CRYPTO_CAST5 is not set 963# CONFIG_CRYPTO_CAST5 is not set
883# CONFIG_CRYPTO_CAST6 is not set 964# CONFIG_CRYPTO_CAST6 is not set
884# CONFIG_CRYPTO_TEA is not set 965CONFIG_CRYPTO_DES=y
885# CONFIG_CRYPTO_ARC4 is not set 966# CONFIG_CRYPTO_FCRYPT is not set
886# CONFIG_CRYPTO_KHAZAD is not set 967# CONFIG_CRYPTO_KHAZAD is not set
887# CONFIG_CRYPTO_ANUBIS is not set
888# CONFIG_CRYPTO_SEED is not set
889# CONFIG_CRYPTO_SALSA20 is not set 968# CONFIG_CRYPTO_SALSA20 is not set
969# CONFIG_CRYPTO_SEED is not set
970# CONFIG_CRYPTO_SERPENT is not set
971# CONFIG_CRYPTO_TEA is not set
972# CONFIG_CRYPTO_TWOFISH is not set
973
974#
975# Compression
976#
890# CONFIG_CRYPTO_DEFLATE is not set 977# CONFIG_CRYPTO_DEFLATE is not set
891# CONFIG_CRYPTO_MICHAEL_MIC is not set
892# CONFIG_CRYPTO_CRC32C is not set
893# CONFIG_CRYPTO_CAMELLIA is not set
894# CONFIG_CRYPTO_TEST is not set
895# CONFIG_CRYPTO_AUTHENC is not set
896# CONFIG_CRYPTO_LZO is not set 978# CONFIG_CRYPTO_LZO is not set
897# CONFIG_CRYPTO_HW is not set 979# CONFIG_CRYPTO_HW is not set
898# CONFIG_PPC_CLOCK is not set 980# CONFIG_PPC_CLOCK is not set
981# CONFIG_VIRTUALIZATION is not set
diff --git a/arch/powerpc/configs/44x/katmai_defconfig b/arch/powerpc/configs/44x/katmai_defconfig
index c8804ec01ea4..7bc4082a1c93 100644
--- a/arch/powerpc/configs/44x/katmai_defconfig
+++ b/arch/powerpc/configs/44x/katmai_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.24-rc6 3# Linux kernel version: 2.6.27-rc1
4# Mon Dec 24 11:17:43 2007 4# Tue Aug 5 09:06:51 2008
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
@@ -29,7 +29,12 @@ CONFIG_GENERIC_TIME=y
29CONFIG_GENERIC_TIME_VSYSCALL=y 29CONFIG_GENERIC_TIME_VSYSCALL=y
30CONFIG_GENERIC_CLOCKEVENTS=y 30CONFIG_GENERIC_CLOCKEVENTS=y
31CONFIG_GENERIC_HARDIRQS=y 31CONFIG_GENERIC_HARDIRQS=y
32# CONFIG_HAVE_GET_USER_PAGES_FAST is not set
33# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
32CONFIG_IRQ_PER_CPU=y 34CONFIG_IRQ_PER_CPU=y
35CONFIG_STACKTRACE_SUPPORT=y
36CONFIG_HAVE_LATENCYTOP_SUPPORT=y
37CONFIG_LOCKDEP_SUPPORT=y
33CONFIG_RWSEM_XCHGADD_ALGORITHM=y 38CONFIG_RWSEM_XCHGADD_ALGORITHM=y
34CONFIG_ARCH_HAS_ILOG2_U32=y 39CONFIG_ARCH_HAS_ILOG2_U32=y
35CONFIG_GENERIC_HWEIGHT=y 40CONFIG_GENERIC_HWEIGHT=y
@@ -67,23 +72,22 @@ CONFIG_SYSVIPC_SYSCTL=y
67CONFIG_POSIX_MQUEUE=y 72CONFIG_POSIX_MQUEUE=y
68# CONFIG_BSD_PROCESS_ACCT is not set 73# CONFIG_BSD_PROCESS_ACCT is not set
69# CONFIG_TASKSTATS is not set 74# CONFIG_TASKSTATS is not set
70# CONFIG_USER_NS is not set
71# CONFIG_PID_NS is not set
72# CONFIG_AUDIT is not set 75# CONFIG_AUDIT is not set
73# CONFIG_IKCONFIG is not set 76# CONFIG_IKCONFIG is not set
74CONFIG_LOG_BUF_SHIFT=14 77CONFIG_LOG_BUF_SHIFT=14
75# CONFIG_CGROUPS is not set 78# CONFIG_CGROUPS is not set
76CONFIG_FAIR_GROUP_SCHED=y 79# CONFIG_GROUP_SCHED is not set
77CONFIG_FAIR_USER_SCHED=y
78# CONFIG_FAIR_CGROUP_SCHED is not set
79CONFIG_SYSFS_DEPRECATED=y 80CONFIG_SYSFS_DEPRECATED=y
81CONFIG_SYSFS_DEPRECATED_V2=y
80# CONFIG_RELAY is not set 82# CONFIG_RELAY is not set
83# CONFIG_NAMESPACES is not set
81CONFIG_BLK_DEV_INITRD=y 84CONFIG_BLK_DEV_INITRD=y
82CONFIG_INITRAMFS_SOURCE="" 85CONFIG_INITRAMFS_SOURCE=""
83# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 86# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
84CONFIG_SYSCTL=y 87CONFIG_SYSCTL=y
85CONFIG_EMBEDDED=y 88CONFIG_EMBEDDED=y
86CONFIG_SYSCTL_SYSCALL=y 89CONFIG_SYSCTL_SYSCALL=y
90CONFIG_SYSCTL_SYSCALL_CHECK=y
87CONFIG_KALLSYMS=y 91CONFIG_KALLSYMS=y
88# CONFIG_KALLSYMS_ALL is not set 92# CONFIG_KALLSYMS_ALL is not set
89# CONFIG_KALLSYMS_EXTRA_PASS is not set 93# CONFIG_KALLSYMS_EXTRA_PASS is not set
@@ -91,11 +95,13 @@ CONFIG_HOTPLUG=y
91CONFIG_PRINTK=y 95CONFIG_PRINTK=y
92CONFIG_BUG=y 96CONFIG_BUG=y
93CONFIG_ELF_CORE=y 97CONFIG_ELF_CORE=y
98CONFIG_COMPAT_BRK=y
94CONFIG_BASE_FULL=y 99CONFIG_BASE_FULL=y
95CONFIG_FUTEX=y 100CONFIG_FUTEX=y
96CONFIG_ANON_INODES=y 101CONFIG_ANON_INODES=y
97CONFIG_EPOLL=y 102CONFIG_EPOLL=y
98CONFIG_SIGNALFD=y 103CONFIG_SIGNALFD=y
104CONFIG_TIMERFD=y
99CONFIG_EVENTFD=y 105CONFIG_EVENTFD=y
100CONFIG_SHMEM=y 106CONFIG_SHMEM=y
101CONFIG_VM_EVENT_COUNTERS=y 107CONFIG_VM_EVENT_COUNTERS=y
@@ -103,10 +109,26 @@ CONFIG_SLUB_DEBUG=y
103# CONFIG_SLAB is not set 109# CONFIG_SLAB is not set
104CONFIG_SLUB=y 110CONFIG_SLUB=y
105# CONFIG_SLOB is not set 111# CONFIG_SLOB is not set
112# CONFIG_PROFILING is not set
113# CONFIG_MARKERS is not set
114CONFIG_HAVE_OPROFILE=y
115# CONFIG_KPROBES is not set
116CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y
117CONFIG_HAVE_IOREMAP_PROT=y
118CONFIG_HAVE_KPROBES=y
119CONFIG_HAVE_KRETPROBES=y
120CONFIG_HAVE_ARCH_TRACEHOOK=y
121# CONFIG_HAVE_DMA_ATTRS is not set
122# CONFIG_USE_GENERIC_SMP_HELPERS is not set
123# CONFIG_HAVE_CLK is not set
124CONFIG_PROC_PAGE_MONITOR=y
125# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
126CONFIG_SLABINFO=y
106CONFIG_RT_MUTEXES=y 127CONFIG_RT_MUTEXES=y
107# CONFIG_TINY_SHMEM is not set 128# CONFIG_TINY_SHMEM is not set
108CONFIG_BASE_SMALL=0 129CONFIG_BASE_SMALL=0
109CONFIG_MODULES=y 130CONFIG_MODULES=y
131# CONFIG_MODULE_FORCE_LOAD is not set
110CONFIG_MODULE_UNLOAD=y 132CONFIG_MODULE_UNLOAD=y
111# CONFIG_MODULE_FORCE_UNLOAD is not set 133# CONFIG_MODULE_FORCE_UNLOAD is not set
112# CONFIG_MODVERSIONS is not set 134# CONFIG_MODVERSIONS is not set
@@ -117,6 +139,7 @@ CONFIG_LBD=y
117# CONFIG_BLK_DEV_IO_TRACE is not set 139# CONFIG_BLK_DEV_IO_TRACE is not set
118# CONFIG_LSF is not set 140# CONFIG_LSF is not set
119# CONFIG_BLK_DEV_BSG is not set 141# CONFIG_BLK_DEV_BSG is not set
142# CONFIG_BLK_DEV_INTEGRITY is not set
120 143
121# 144#
122# IO Schedulers 145# IO Schedulers
@@ -130,23 +153,28 @@ CONFIG_DEFAULT_AS=y
130# CONFIG_DEFAULT_CFQ is not set 153# CONFIG_DEFAULT_CFQ is not set
131# CONFIG_DEFAULT_NOOP is not set 154# CONFIG_DEFAULT_NOOP is not set
132CONFIG_DEFAULT_IOSCHED="anticipatory" 155CONFIG_DEFAULT_IOSCHED="anticipatory"
156CONFIG_CLASSIC_RCU=y
133CONFIG_PPC4xx_PCI_EXPRESS=y 157CONFIG_PPC4xx_PCI_EXPRESS=y
134 158
135# 159#
136# Platform support 160# Platform support
137# 161#
138# CONFIG_PPC_MPC52xx is not set
139# CONFIG_PPC_MPC5200 is not set
140# CONFIG_PPC_CELL is not set 162# CONFIG_PPC_CELL is not set
141# CONFIG_PPC_CELL_NATIVE is not set 163# CONFIG_PPC_CELL_NATIVE is not set
142# CONFIG_PQ2ADS is not set 164# CONFIG_PQ2ADS is not set
143# CONFIG_BAMBOO is not set 165# CONFIG_BAMBOO is not set
144# CONFIG_EBONY is not set 166# CONFIG_EBONY is not set
167# CONFIG_SAM440EP is not set
145# CONFIG_SEQUOIA is not set 168# CONFIG_SEQUOIA is not set
146# CONFIG_TAISHAN is not set 169# CONFIG_TAISHAN is not set
147CONFIG_KATMAI=y 170CONFIG_KATMAI=y
148# CONFIG_RAINIER is not set 171# CONFIG_RAINIER is not set
172# CONFIG_WARP is not set
173# CONFIG_CANYONLANDS is not set
174# CONFIG_YOSEMITE is not set
175# CONFIG_XILINX_VIRTEX440_GENERIC_BOARD is not set
149CONFIG_440SPe=y 176CONFIG_440SPe=y
177# CONFIG_IPIC is not set
150# CONFIG_MPIC is not set 178# CONFIG_MPIC is not set
151# CONFIG_MPIC_WEIRD is not set 179# CONFIG_MPIC_WEIRD is not set
152# CONFIG_PPC_I8259 is not set 180# CONFIG_PPC_I8259 is not set
@@ -157,7 +185,6 @@ CONFIG_440SPe=y
157# CONFIG_PPC_INDIRECT_IO is not set 185# CONFIG_PPC_INDIRECT_IO is not set
158# CONFIG_GENERIC_IOMAP is not set 186# CONFIG_GENERIC_IOMAP is not set
159# CONFIG_CPU_FREQ is not set 187# CONFIG_CPU_FREQ is not set
160# CONFIG_CPM2 is not set
161# CONFIG_FSL_ULI1575 is not set 188# CONFIG_FSL_ULI1575 is not set
162 189
163# 190#
@@ -173,13 +200,17 @@ CONFIG_HZ_250=y
173# CONFIG_HZ_300 is not set 200# CONFIG_HZ_300 is not set
174# CONFIG_HZ_1000 is not set 201# CONFIG_HZ_1000 is not set
175CONFIG_HZ=250 202CONFIG_HZ=250
203# CONFIG_SCHED_HRTICK is not set
176CONFIG_PREEMPT_NONE=y 204CONFIG_PREEMPT_NONE=y
177# CONFIG_PREEMPT_VOLUNTARY is not set 205# CONFIG_PREEMPT_VOLUNTARY is not set
178# CONFIG_PREEMPT is not set 206# CONFIG_PREEMPT is not set
179CONFIG_BINFMT_ELF=y 207CONFIG_BINFMT_ELF=y
180# CONFIG_BINFMT_MISC is not set 208# CONFIG_BINFMT_MISC is not set
181# CONFIG_MATH_EMULATION is not set 209# CONFIG_MATH_EMULATION is not set
210# CONFIG_IOMMU_HELPER is not set
182CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y 211CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
212CONFIG_ARCH_HAS_WALK_MEMORY=y
213CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y
183CONFIG_ARCH_FLATMEM_ENABLE=y 214CONFIG_ARCH_FLATMEM_ENABLE=y
184CONFIG_ARCH_POPULATES_NODE_MAP=y 215CONFIG_ARCH_POPULATES_NODE_MAP=y
185CONFIG_SELECT_MEMORY_MODEL=y 216CONFIG_SELECT_MEMORY_MODEL=y
@@ -190,17 +221,19 @@ CONFIG_FLATMEM=y
190CONFIG_FLAT_NODE_MEM_MAP=y 221CONFIG_FLAT_NODE_MEM_MAP=y
191# CONFIG_SPARSEMEM_STATIC is not set 222# CONFIG_SPARSEMEM_STATIC is not set
192# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set 223# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
224CONFIG_PAGEFLAGS_EXTENDED=y
193CONFIG_SPLIT_PTLOCK_CPUS=4 225CONFIG_SPLIT_PTLOCK_CPUS=4
226CONFIG_MIGRATION=y
194CONFIG_RESOURCES_64BIT=y 227CONFIG_RESOURCES_64BIT=y
195CONFIG_ZONE_DMA_FLAG=1 228CONFIG_ZONE_DMA_FLAG=1
196CONFIG_BOUNCE=y 229CONFIG_BOUNCE=y
197CONFIG_VIRT_TO_BUS=y 230CONFIG_VIRT_TO_BUS=y
231CONFIG_FORCE_MAX_ZONEORDER=11
198CONFIG_PROC_DEVICETREE=y 232CONFIG_PROC_DEVICETREE=y
199CONFIG_CMDLINE_BOOL=y 233CONFIG_CMDLINE_BOOL=y
200CONFIG_CMDLINE="" 234CONFIG_CMDLINE=""
235CONFIG_EXTRA_TARGETS=""
201CONFIG_SECCOMP=y 236CONFIG_SECCOMP=y
202CONFIG_WANT_DEVICE_TREE=y
203CONFIG_DEVICE_TREE="katmai.dts"
204CONFIG_ISA_DMA_API=y 237CONFIG_ISA_DMA_API=y
205 238
206# 239#
@@ -208,6 +241,8 @@ CONFIG_ISA_DMA_API=y
208# 241#
209CONFIG_ZONE_DMA=y 242CONFIG_ZONE_DMA=y
210CONFIG_PPC_INDIRECT_PCI=y 243CONFIG_PPC_INDIRECT_PCI=y
244CONFIG_4xx_SOC=y
245CONFIG_PPC_PCI_CHOICE=y
211CONFIG_PCI=y 246CONFIG_PCI=y
212CONFIG_PCI_DOMAINS=y 247CONFIG_PCI_DOMAINS=y
213CONFIG_PCI_SYSCALL=y 248CONFIG_PCI_SYSCALL=y
@@ -218,6 +253,7 @@ CONFIG_PCI_LEGACY=y
218# CONFIG_PCI_DEBUG is not set 253# CONFIG_PCI_DEBUG is not set
219# CONFIG_PCCARD is not set 254# CONFIG_PCCARD is not set
220# CONFIG_HOTPLUG_PCI is not set 255# CONFIG_HOTPLUG_PCI is not set
256# CONFIG_HAS_RAPIDIO is not set
221 257
222# 258#
223# Advanced setup 259# Advanced setup
@@ -227,17 +263,13 @@ CONFIG_PCI_LEGACY=y
227# 263#
228# Default settings for advanced configuration options are used 264# Default settings for advanced configuration options are used
229# 265#
230CONFIG_HIGHMEM_START=0xfe000000
231CONFIG_LOWMEM_SIZE=0x30000000 266CONFIG_LOWMEM_SIZE=0x30000000
267CONFIG_PAGE_OFFSET=0xc0000000
232CONFIG_KERNEL_START=0xc0000000 268CONFIG_KERNEL_START=0xc0000000
269CONFIG_PHYSICAL_START=0x00000000
233CONFIG_TASK_SIZE=0xc0000000 270CONFIG_TASK_SIZE=0xc0000000
234CONFIG_CONSISTENT_START=0xff100000 271CONFIG_CONSISTENT_START=0xff100000
235CONFIG_CONSISTENT_SIZE=0x00200000 272CONFIG_CONSISTENT_SIZE=0x00200000
236CONFIG_BOOT_LOAD=0x01000000
237
238#
239# Networking
240#
241CONFIG_NET=y 273CONFIG_NET=y
242 274
243# 275#
@@ -275,8 +307,6 @@ CONFIG_TCP_CONG_CUBIC=y
275CONFIG_DEFAULT_TCP_CONG="cubic" 307CONFIG_DEFAULT_TCP_CONG="cubic"
276# CONFIG_TCP_MD5SIG is not set 308# CONFIG_TCP_MD5SIG is not set
277# CONFIG_IPV6 is not set 309# CONFIG_IPV6 is not set
278# CONFIG_INET6_XFRM_TUNNEL is not set
279# CONFIG_INET6_TUNNEL is not set
280# CONFIG_NETWORK_SECMARK is not set 310# CONFIG_NETWORK_SECMARK is not set
281# CONFIG_NETFILTER is not set 311# CONFIG_NETFILTER is not set
282# CONFIG_IP_DCCP is not set 312# CONFIG_IP_DCCP is not set
@@ -300,6 +330,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
300# 330#
301# CONFIG_NET_PKTGEN is not set 331# CONFIG_NET_PKTGEN is not set
302# CONFIG_HAMRADIO is not set 332# CONFIG_HAMRADIO is not set
333# CONFIG_CAN is not set
303# CONFIG_IRDA is not set 334# CONFIG_IRDA is not set
304# CONFIG_BT is not set 335# CONFIG_BT is not set
305# CONFIG_AF_RXRPC is not set 336# CONFIG_AF_RXRPC is not set
@@ -325,6 +356,8 @@ CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
325CONFIG_STANDALONE=y 356CONFIG_STANDALONE=y
326CONFIG_PREVENT_FIRMWARE_BUILD=y 357CONFIG_PREVENT_FIRMWARE_BUILD=y
327CONFIG_FW_LOADER=y 358CONFIG_FW_LOADER=y
359CONFIG_FIRMWARE_IN_KERNEL=y
360CONFIG_EXTRA_FIRMWARE=""
328# CONFIG_DEBUG_DRIVER is not set 361# CONFIG_DEBUG_DRIVER is not set
329# CONFIG_DEBUG_DEVRES is not set 362# CONFIG_DEBUG_DEVRES is not set
330# CONFIG_SYS_HYPERVISOR is not set 363# CONFIG_SYS_HYPERVISOR is not set
@@ -346,15 +379,19 @@ CONFIG_BLK_DEV=y
346CONFIG_BLK_DEV_RAM=y 379CONFIG_BLK_DEV_RAM=y
347CONFIG_BLK_DEV_RAM_COUNT=16 380CONFIG_BLK_DEV_RAM_COUNT=16
348CONFIG_BLK_DEV_RAM_SIZE=35000 381CONFIG_BLK_DEV_RAM_SIZE=35000
349CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 382# CONFIG_BLK_DEV_XIP is not set
350# CONFIG_CDROM_PKTCDVD is not set 383# CONFIG_CDROM_PKTCDVD is not set
351# CONFIG_ATA_OVER_ETH is not set 384# CONFIG_ATA_OVER_ETH is not set
352# CONFIG_XILINX_SYSACE is not set 385# CONFIG_XILINX_SYSACE is not set
386# CONFIG_BLK_DEV_HD is not set
353CONFIG_MISC_DEVICES=y 387CONFIG_MISC_DEVICES=y
354# CONFIG_PHANTOM is not set 388# CONFIG_PHANTOM is not set
355# CONFIG_EEPROM_93CX6 is not set 389# CONFIG_EEPROM_93CX6 is not set
356# CONFIG_SGI_IOC4 is not set 390# CONFIG_SGI_IOC4 is not set
357# CONFIG_TIFM_CORE is not set 391# CONFIG_TIFM_CORE is not set
392# CONFIG_ENCLOSURE_SERVICES is not set
393# CONFIG_HP_ILO is not set
394CONFIG_HAVE_IDE=y
358# CONFIG_IDE is not set 395# CONFIG_IDE is not set
359 396
360# 397#
@@ -371,6 +408,10 @@ CONFIG_MISC_DEVICES=y
371# 408#
372# IEEE 1394 (FireWire) support 409# IEEE 1394 (FireWire) support
373# 410#
411
412#
413# Enable only one of the two stacks, unless you know what you are doing
414#
374# CONFIG_FIREWIRE is not set 415# CONFIG_FIREWIRE is not set
375# CONFIG_IEEE1394 is not set 416# CONFIG_IEEE1394 is not set
376# CONFIG_I2O is not set 417# CONFIG_I2O is not set
@@ -378,14 +419,12 @@ CONFIG_MACINTOSH_DRIVERS=y
378# CONFIG_MAC_EMUMOUSEBTN is not set 419# CONFIG_MAC_EMUMOUSEBTN is not set
379# CONFIG_WINDFARM is not set 420# CONFIG_WINDFARM is not set
380CONFIG_NETDEVICES=y 421CONFIG_NETDEVICES=y
381# CONFIG_NETDEVICES_MULTIQUEUE is not set
382# CONFIG_DUMMY is not set 422# CONFIG_DUMMY is not set
383# CONFIG_BONDING is not set 423# CONFIG_BONDING is not set
384# CONFIG_MACVLAN is not set 424# CONFIG_MACVLAN is not set
385# CONFIG_EQUALIZER is not set 425# CONFIG_EQUALIZER is not set
386# CONFIG_TUN is not set 426# CONFIG_TUN is not set
387# CONFIG_VETH is not set 427# CONFIG_VETH is not set
388# CONFIG_IP1000 is not set
389# CONFIG_ARCNET is not set 428# CONFIG_ARCNET is not set
390# CONFIG_PHYLIB is not set 429# CONFIG_PHYLIB is not set
391CONFIG_NET_ETHERNET=y 430CONFIG_NET_ETHERNET=y
@@ -414,6 +453,8 @@ CONFIG_NETDEV_1000=y
414# CONFIG_DL2K is not set 453# CONFIG_DL2K is not set
415# CONFIG_E1000 is not set 454# CONFIG_E1000 is not set
416# CONFIG_E1000E is not set 455# CONFIG_E1000E is not set
456# CONFIG_IP1000 is not set
457# CONFIG_IGB is not set
417# CONFIG_NS83820 is not set 458# CONFIG_NS83820 is not set
418# CONFIG_HAMACHI is not set 459# CONFIG_HAMACHI is not set
419# CONFIG_YELLOWFIN is not set 460# CONFIG_YELLOWFIN is not set
@@ -421,12 +462,12 @@ CONFIG_NETDEV_1000=y
421# CONFIG_SIS190 is not set 462# CONFIG_SIS190 is not set
422# CONFIG_SKGE is not set 463# CONFIG_SKGE is not set
423# CONFIG_SKY2 is not set 464# CONFIG_SKY2 is not set
424# CONFIG_SK98LIN is not set
425# CONFIG_VIA_VELOCITY is not set 465# CONFIG_VIA_VELOCITY is not set
426# CONFIG_TIGON3 is not set 466# CONFIG_TIGON3 is not set
427# CONFIG_BNX2 is not set 467# CONFIG_BNX2 is not set
428# CONFIG_QLA3XXX is not set 468# CONFIG_QLA3XXX is not set
429# CONFIG_ATL1 is not set 469# CONFIG_ATL1 is not set
470# CONFIG_ATL1E is not set
430CONFIG_NETDEV_10000=y 471CONFIG_NETDEV_10000=y
431# CONFIG_CHELSIO_T1 is not set 472# CONFIG_CHELSIO_T1 is not set
432# CONFIG_CHELSIO_T3 is not set 473# CONFIG_CHELSIO_T3 is not set
@@ -438,6 +479,8 @@ CONFIG_NETDEV_10000=y
438# CONFIG_NIU is not set 479# CONFIG_NIU is not set
439# CONFIG_MLX4_CORE is not set 480# CONFIG_MLX4_CORE is not set
440# CONFIG_TEHUTI is not set 481# CONFIG_TEHUTI is not set
482# CONFIG_BNX2X is not set
483# CONFIG_SFC is not set
441# CONFIG_TR is not set 484# CONFIG_TR is not set
442 485
443# 486#
@@ -445,12 +488,12 @@ CONFIG_NETDEV_10000=y
445# 488#
446# CONFIG_WLAN_PRE80211 is not set 489# CONFIG_WLAN_PRE80211 is not set
447# CONFIG_WLAN_80211 is not set 490# CONFIG_WLAN_80211 is not set
491# CONFIG_IWLWIFI_LEDS is not set
448# CONFIG_WAN is not set 492# CONFIG_WAN is not set
449# CONFIG_FDDI is not set 493# CONFIG_FDDI is not set
450# CONFIG_HIPPI is not set 494# CONFIG_HIPPI is not set
451# CONFIG_PPP is not set 495# CONFIG_PPP is not set
452# CONFIG_SLIP is not set 496# CONFIG_SLIP is not set
453# CONFIG_SHAPER is not set
454# CONFIG_NETCONSOLE is not set 497# CONFIG_NETCONSOLE is not set
455# CONFIG_NETPOLL is not set 498# CONFIG_NETPOLL is not set
456# CONFIG_NET_POLL_CONTROLLER is not set 499# CONFIG_NET_POLL_CONTROLLER is not set
@@ -472,7 +515,9 @@ CONFIG_NETDEV_10000=y
472# Character devices 515# Character devices
473# 516#
474# CONFIG_VT is not set 517# CONFIG_VT is not set
518CONFIG_DEVKMEM=y
475# CONFIG_SERIAL_NONSTANDARD is not set 519# CONFIG_SERIAL_NONSTANDARD is not set
520# CONFIG_NOZOMI is not set
476 521
477# 522#
478# Serial drivers 523# Serial drivers
@@ -509,15 +554,14 @@ CONFIG_LEGACY_PTY_COUNT=256
509# CONFIG_TCG_TPM is not set 554# CONFIG_TCG_TPM is not set
510CONFIG_DEVPORT=y 555CONFIG_DEVPORT=y
511# CONFIG_I2C is not set 556# CONFIG_I2C is not set
512
513#
514# SPI support
515#
516# CONFIG_SPI is not set 557# CONFIG_SPI is not set
517# CONFIG_SPI_MASTER is not set 558CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
559# CONFIG_GPIOLIB is not set
518# CONFIG_W1 is not set 560# CONFIG_W1 is not set
519# CONFIG_POWER_SUPPLY is not set 561# CONFIG_POWER_SUPPLY is not set
520# CONFIG_HWMON is not set 562# CONFIG_HWMON is not set
563# CONFIG_THERMAL is not set
564# CONFIG_THERMAL_HWMON is not set
521# CONFIG_WATCHDOG is not set 565# CONFIG_WATCHDOG is not set
522 566
523# 567#
@@ -529,13 +573,24 @@ CONFIG_SSB_POSSIBLE=y
529# 573#
530# Multifunction device drivers 574# Multifunction device drivers
531# 575#
576# CONFIG_MFD_CORE is not set
532# CONFIG_MFD_SM501 is not set 577# CONFIG_MFD_SM501 is not set
578# CONFIG_HTC_PASIC3 is not set
533 579
534# 580#
535# Multimedia devices 581# Multimedia devices
536# 582#
583
584#
585# Multimedia core support
586#
537# CONFIG_VIDEO_DEV is not set 587# CONFIG_VIDEO_DEV is not set
538# CONFIG_DVB_CORE is not set 588# CONFIG_DVB_CORE is not set
589# CONFIG_VIDEO_MEDIA is not set
590
591#
592# Multimedia drivers
593#
539CONFIG_DAB=y 594CONFIG_DAB=y
540 595
541# 596#
@@ -552,34 +607,27 @@ CONFIG_VIDEO_OUTPUT_CONTROL=m
552# Display device support 607# Display device support
553# 608#
554# CONFIG_DISPLAY_SUPPORT is not set 609# CONFIG_DISPLAY_SUPPORT is not set
555
556#
557# Sound
558#
559# CONFIG_SOUND is not set 610# CONFIG_SOUND is not set
560CONFIG_USB_SUPPORT=y 611CONFIG_USB_SUPPORT=y
561CONFIG_USB_ARCH_HAS_HCD=y 612CONFIG_USB_ARCH_HAS_HCD=y
562CONFIG_USB_ARCH_HAS_OHCI=y 613CONFIG_USB_ARCH_HAS_OHCI=y
563CONFIG_USB_ARCH_HAS_EHCI=y 614CONFIG_USB_ARCH_HAS_EHCI=y
564# CONFIG_USB is not set 615# CONFIG_USB is not set
616# CONFIG_USB_OTG_WHITELIST is not set
617# CONFIG_USB_OTG_BLACKLIST_HUB is not set
565 618
566# 619#
567# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 620# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
568# 621#
569
570#
571# USB Gadget Support
572#
573# CONFIG_USB_GADGET is not set 622# CONFIG_USB_GADGET is not set
574# CONFIG_MMC is not set 623# CONFIG_MMC is not set
624# CONFIG_MEMSTICK is not set
575# CONFIG_NEW_LEDS is not set 625# CONFIG_NEW_LEDS is not set
626# CONFIG_ACCESSIBILITY is not set
576# CONFIG_INFINIBAND is not set 627# CONFIG_INFINIBAND is not set
577# CONFIG_EDAC is not set 628# CONFIG_EDAC is not set
578# CONFIG_RTC_CLASS is not set 629# CONFIG_RTC_CLASS is not set
579 630# CONFIG_DMADEVICES is not set
580#
581# Userspace I/O
582#
583# CONFIG_UIO is not set 631# CONFIG_UIO is not set
584 632
585# 633#
@@ -594,14 +642,11 @@ CONFIG_EXT2_FS=y
594# CONFIG_JFS_FS is not set 642# CONFIG_JFS_FS is not set
595# CONFIG_FS_POSIX_ACL is not set 643# CONFIG_FS_POSIX_ACL is not set
596# CONFIG_XFS_FS is not set 644# CONFIG_XFS_FS is not set
597# CONFIG_GFS2_FS is not set
598# CONFIG_OCFS2_FS is not set 645# CONFIG_OCFS2_FS is not set
599# CONFIG_MINIX_FS is not set 646CONFIG_DNOTIFY=y
600# CONFIG_ROMFS_FS is not set
601CONFIG_INOTIFY=y 647CONFIG_INOTIFY=y
602CONFIG_INOTIFY_USER=y 648CONFIG_INOTIFY_USER=y
603# CONFIG_QUOTA is not set 649# CONFIG_QUOTA is not set
604CONFIG_DNOTIFY=y
605# CONFIG_AUTOFS_FS is not set 650# CONFIG_AUTOFS_FS is not set
606# CONFIG_AUTOFS4_FS is not set 651# CONFIG_AUTOFS4_FS is not set
607# CONFIG_FUSE_FS is not set 652# CONFIG_FUSE_FS is not set
@@ -643,8 +688,11 @@ CONFIG_TMPFS=y
643# CONFIG_EFS_FS is not set 688# CONFIG_EFS_FS is not set
644CONFIG_CRAMFS=y 689CONFIG_CRAMFS=y
645# CONFIG_VXFS_FS is not set 690# CONFIG_VXFS_FS is not set
691# CONFIG_MINIX_FS is not set
692# CONFIG_OMFS_FS is not set
646# CONFIG_HPFS_FS is not set 693# CONFIG_HPFS_FS is not set
647# CONFIG_QNX4FS_FS is not set 694# CONFIG_QNX4FS_FS is not set
695# CONFIG_ROMFS_FS is not set
648# CONFIG_SYSV_FS is not set 696# CONFIG_SYSV_FS is not set
649# CONFIG_UFS_FS is not set 697# CONFIG_UFS_FS is not set
650CONFIG_NETWORK_FILESYSTEMS=y 698CONFIG_NETWORK_FILESYSTEMS=y
@@ -652,14 +700,12 @@ CONFIG_NFS_FS=y
652CONFIG_NFS_V3=y 700CONFIG_NFS_V3=y
653# CONFIG_NFS_V3_ACL is not set 701# CONFIG_NFS_V3_ACL is not set
654# CONFIG_NFS_V4 is not set 702# CONFIG_NFS_V4 is not set
655# CONFIG_NFS_DIRECTIO is not set
656# CONFIG_NFSD is not set
657CONFIG_ROOT_NFS=y 703CONFIG_ROOT_NFS=y
704# CONFIG_NFSD is not set
658CONFIG_LOCKD=y 705CONFIG_LOCKD=y
659CONFIG_LOCKD_V4=y 706CONFIG_LOCKD_V4=y
660CONFIG_NFS_COMMON=y 707CONFIG_NFS_COMMON=y
661CONFIG_SUNRPC=y 708CONFIG_SUNRPC=y
662# CONFIG_SUNRPC_BIND34 is not set
663# CONFIG_RPCSEC_GSS_KRB5 is not set 709# CONFIG_RPCSEC_GSS_KRB5 is not set
664# CONFIG_RPCSEC_GSS_SPKM3 is not set 710# CONFIG_RPCSEC_GSS_SPKM3 is not set
665# CONFIG_SMB_FS is not set 711# CONFIG_SMB_FS is not set
@@ -675,14 +721,15 @@ CONFIG_SUNRPC=y
675CONFIG_MSDOS_PARTITION=y 721CONFIG_MSDOS_PARTITION=y
676# CONFIG_NLS is not set 722# CONFIG_NLS is not set
677# CONFIG_DLM is not set 723# CONFIG_DLM is not set
678# CONFIG_UCC_SLOW is not set
679 724
680# 725#
681# Library routines 726# Library routines
682# 727#
683CONFIG_BITREVERSE=y 728CONFIG_BITREVERSE=y
729# CONFIG_GENERIC_FIND_FIRST_BIT is not set
684# CONFIG_CRC_CCITT is not set 730# CONFIG_CRC_CCITT is not set
685# CONFIG_CRC16 is not set 731# CONFIG_CRC16 is not set
732# CONFIG_CRC_T10DIF is not set
686# CONFIG_CRC_ITU_T is not set 733# CONFIG_CRC_ITU_T is not set
687CONFIG_CRC32=y 734CONFIG_CRC32=y
688# CONFIG_CRC7 is not set 735# CONFIG_CRC7 is not set
@@ -692,10 +739,7 @@ CONFIG_PLIST=y
692CONFIG_HAS_IOMEM=y 739CONFIG_HAS_IOMEM=y
693CONFIG_HAS_IOPORT=y 740CONFIG_HAS_IOPORT=y
694CONFIG_HAS_DMA=y 741CONFIG_HAS_DMA=y
695CONFIG_INSTRUMENTATION=y 742CONFIG_HAVE_LMB=y
696# CONFIG_PROFILING is not set
697# CONFIG_KPROBES is not set
698# CONFIG_MARKERS is not set
699 743
700# 744#
701# Kernel hacking 745# Kernel hacking
@@ -703,6 +747,7 @@ CONFIG_INSTRUMENTATION=y
703# CONFIG_PRINTK_TIME is not set 747# CONFIG_PRINTK_TIME is not set
704CONFIG_ENABLE_WARN_DEPRECATED=y 748CONFIG_ENABLE_WARN_DEPRECATED=y
705CONFIG_ENABLE_MUST_CHECK=y 749CONFIG_ENABLE_MUST_CHECK=y
750CONFIG_FRAME_WARN=1024
706CONFIG_MAGIC_SYSRQ=y 751CONFIG_MAGIC_SYSRQ=y
707# CONFIG_UNUSED_SYMBOLS is not set 752# CONFIG_UNUSED_SYMBOLS is not set
708# CONFIG_DEBUG_FS is not set 753# CONFIG_DEBUG_FS is not set
@@ -710,10 +755,14 @@ CONFIG_MAGIC_SYSRQ=y
710CONFIG_DEBUG_KERNEL=y 755CONFIG_DEBUG_KERNEL=y
711# CONFIG_DEBUG_SHIRQ is not set 756# CONFIG_DEBUG_SHIRQ is not set
712CONFIG_DETECT_SOFTLOCKUP=y 757CONFIG_DETECT_SOFTLOCKUP=y
758# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
759CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
713CONFIG_SCHED_DEBUG=y 760CONFIG_SCHED_DEBUG=y
714# CONFIG_SCHEDSTATS is not set 761# CONFIG_SCHEDSTATS is not set
715# CONFIG_TIMER_STATS is not set 762# CONFIG_TIMER_STATS is not set
763# CONFIG_DEBUG_OBJECTS is not set
716# CONFIG_SLUB_DEBUG_ON is not set 764# CONFIG_SLUB_DEBUG_ON is not set
765# CONFIG_SLUB_STATS is not set
717# CONFIG_DEBUG_RT_MUTEXES is not set 766# CONFIG_DEBUG_RT_MUTEXES is not set
718# CONFIG_RT_MUTEX_TESTER is not set 767# CONFIG_RT_MUTEX_TESTER is not set
719# CONFIG_DEBUG_SPINLOCK is not set 768# CONFIG_DEBUG_SPINLOCK is not set
@@ -724,19 +773,30 @@ CONFIG_SCHED_DEBUG=y
724# CONFIG_DEBUG_BUGVERBOSE is not set 773# CONFIG_DEBUG_BUGVERBOSE is not set
725# CONFIG_DEBUG_INFO is not set 774# CONFIG_DEBUG_INFO is not set
726# CONFIG_DEBUG_VM is not set 775# CONFIG_DEBUG_VM is not set
776# CONFIG_DEBUG_WRITECOUNT is not set
777# CONFIG_DEBUG_MEMORY_INIT is not set
727# CONFIG_DEBUG_LIST is not set 778# CONFIG_DEBUG_LIST is not set
728# CONFIG_DEBUG_SG is not set 779# CONFIG_DEBUG_SG is not set
729CONFIG_FORCED_INLINING=y
730# CONFIG_BOOT_PRINTK_DELAY is not set 780# CONFIG_BOOT_PRINTK_DELAY is not set
731# CONFIG_RCU_TORTURE_TEST is not set 781# CONFIG_RCU_TORTURE_TEST is not set
782# CONFIG_BACKTRACE_SELF_TEST is not set
732# CONFIG_FAULT_INJECTION is not set 783# CONFIG_FAULT_INJECTION is not set
784# CONFIG_LATENCYTOP is not set
785CONFIG_HAVE_FTRACE=y
786CONFIG_HAVE_DYNAMIC_FTRACE=y
787# CONFIG_FTRACE is not set
788# CONFIG_SCHED_TRACER is not set
789# CONFIG_CONTEXT_SWITCH_TRACER is not set
733# CONFIG_SAMPLES is not set 790# CONFIG_SAMPLES is not set
791CONFIG_HAVE_ARCH_KGDB=y
792# CONFIG_KGDB is not set
734# CONFIG_DEBUG_STACKOVERFLOW is not set 793# CONFIG_DEBUG_STACKOVERFLOW is not set
735# CONFIG_DEBUG_STACK_USAGE is not set 794# CONFIG_DEBUG_STACK_USAGE is not set
736# CONFIG_DEBUG_PAGEALLOC is not set 795# CONFIG_DEBUG_PAGEALLOC is not set
737CONFIG_DEBUGGER=y 796# CONFIG_CODE_PATCHING_SELFTEST is not set
738# CONFIG_KGDB is not set 797# CONFIG_FTR_FIXUP_SELFTEST is not set
739# CONFIG_XMON is not set 798# CONFIG_XMON is not set
799# CONFIG_IRQSTACKS is not set
740# CONFIG_BDI_SWITCH is not set 800# CONFIG_BDI_SWITCH is not set
741# CONFIG_PPC_EARLY_DEBUG is not set 801# CONFIG_PPC_EARLY_DEBUG is not set
742 802
@@ -747,44 +807,85 @@ CONFIG_DEBUGGER=y
747# CONFIG_SECURITY is not set 807# CONFIG_SECURITY is not set
748# CONFIG_SECURITY_FILE_CAPABILITIES is not set 808# CONFIG_SECURITY_FILE_CAPABILITIES is not set
749CONFIG_CRYPTO=y 809CONFIG_CRYPTO=y
810
811#
812# Crypto core or helper
813#
750CONFIG_CRYPTO_ALGAPI=y 814CONFIG_CRYPTO_ALGAPI=y
751CONFIG_CRYPTO_BLKCIPHER=y 815CONFIG_CRYPTO_BLKCIPHER=y
752CONFIG_CRYPTO_MANAGER=y 816CONFIG_CRYPTO_MANAGER=y
817# CONFIG_CRYPTO_GF128MUL is not set
818# CONFIG_CRYPTO_NULL is not set
819# CONFIG_CRYPTO_CRYPTD is not set
820# CONFIG_CRYPTO_AUTHENC is not set
821# CONFIG_CRYPTO_TEST is not set
822
823#
824# Authenticated Encryption with Associated Data
825#
826# CONFIG_CRYPTO_CCM is not set
827# CONFIG_CRYPTO_GCM is not set
828# CONFIG_CRYPTO_SEQIV is not set
829
830#
831# Block modes
832#
833CONFIG_CRYPTO_CBC=y
834# CONFIG_CRYPTO_CTR is not set
835# CONFIG_CRYPTO_CTS is not set
836CONFIG_CRYPTO_ECB=y
837# CONFIG_CRYPTO_LRW is not set
838CONFIG_CRYPTO_PCBC=y
839# CONFIG_CRYPTO_XTS is not set
840
841#
842# Hash modes
843#
753# CONFIG_CRYPTO_HMAC is not set 844# CONFIG_CRYPTO_HMAC is not set
754# CONFIG_CRYPTO_XCBC is not set 845# CONFIG_CRYPTO_XCBC is not set
755# CONFIG_CRYPTO_NULL is not set 846
847#
848# Digest
849#
850# CONFIG_CRYPTO_CRC32C is not set
756# CONFIG_CRYPTO_MD4 is not set 851# CONFIG_CRYPTO_MD4 is not set
757CONFIG_CRYPTO_MD5=y 852CONFIG_CRYPTO_MD5=y
853# CONFIG_CRYPTO_MICHAEL_MIC is not set
854# CONFIG_CRYPTO_RMD128 is not set
855# CONFIG_CRYPTO_RMD160 is not set
856# CONFIG_CRYPTO_RMD256 is not set
857# CONFIG_CRYPTO_RMD320 is not set
758# CONFIG_CRYPTO_SHA1 is not set 858# CONFIG_CRYPTO_SHA1 is not set
759# CONFIG_CRYPTO_SHA256 is not set 859# CONFIG_CRYPTO_SHA256 is not set
760# CONFIG_CRYPTO_SHA512 is not set 860# CONFIG_CRYPTO_SHA512 is not set
761# CONFIG_CRYPTO_WP512 is not set
762# CONFIG_CRYPTO_TGR192 is not set 861# CONFIG_CRYPTO_TGR192 is not set
763# CONFIG_CRYPTO_GF128MUL is not set 862# CONFIG_CRYPTO_WP512 is not set
764CONFIG_CRYPTO_ECB=y 863
765CONFIG_CRYPTO_CBC=y 864#
766CONFIG_CRYPTO_PCBC=y 865# Ciphers
767# CONFIG_CRYPTO_LRW is not set 866#
768# CONFIG_CRYPTO_XTS is not set
769# CONFIG_CRYPTO_CRYPTD is not set
770CONFIG_CRYPTO_DES=y
771# CONFIG_CRYPTO_FCRYPT is not set
772# CONFIG_CRYPTO_BLOWFISH is not set
773# CONFIG_CRYPTO_TWOFISH is not set
774# CONFIG_CRYPTO_SERPENT is not set
775# CONFIG_CRYPTO_AES is not set 867# CONFIG_CRYPTO_AES is not set
868# CONFIG_CRYPTO_ANUBIS is not set
869# CONFIG_CRYPTO_ARC4 is not set
870# CONFIG_CRYPTO_BLOWFISH is not set
871# CONFIG_CRYPTO_CAMELLIA is not set
776# CONFIG_CRYPTO_CAST5 is not set 872# CONFIG_CRYPTO_CAST5 is not set
777# CONFIG_CRYPTO_CAST6 is not set 873# CONFIG_CRYPTO_CAST6 is not set
778# CONFIG_CRYPTO_TEA is not set 874CONFIG_CRYPTO_DES=y
779# CONFIG_CRYPTO_ARC4 is not set 875# CONFIG_CRYPTO_FCRYPT is not set
780# CONFIG_CRYPTO_KHAZAD is not set 876# CONFIG_CRYPTO_KHAZAD is not set
781# CONFIG_CRYPTO_ANUBIS is not set 877# CONFIG_CRYPTO_SALSA20 is not set
782# CONFIG_CRYPTO_SEED is not set 878# CONFIG_CRYPTO_SEED is not set
879# CONFIG_CRYPTO_SERPENT is not set
880# CONFIG_CRYPTO_TEA is not set
881# CONFIG_CRYPTO_TWOFISH is not set
882
883#
884# Compression
885#
783# CONFIG_CRYPTO_DEFLATE is not set 886# CONFIG_CRYPTO_DEFLATE is not set
784# CONFIG_CRYPTO_MICHAEL_MIC is not set 887# CONFIG_CRYPTO_LZO is not set
785# CONFIG_CRYPTO_CRC32C is not set
786# CONFIG_CRYPTO_CAMELLIA is not set
787# CONFIG_CRYPTO_TEST is not set
788# CONFIG_CRYPTO_AUTHENC is not set
789CONFIG_CRYPTO_HW=y 888CONFIG_CRYPTO_HW=y
889# CONFIG_CRYPTO_DEV_HIFN_795X is not set
790# CONFIG_PPC_CLOCK is not set 890# CONFIG_PPC_CLOCK is not set
891# CONFIG_VIRTUALIZATION is not set
diff --git a/arch/powerpc/configs/44x/rainier_defconfig b/arch/powerpc/configs/44x/rainier_defconfig
index dec18ca73519..0479648a9141 100644
--- a/arch/powerpc/configs/44x/rainier_defconfig
+++ b/arch/powerpc/configs/44x/rainier_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.25-rc2 3# Linux kernel version: 2.6.27-rc1
4# Fri Feb 15 21:53:10 2008 4# Tue Aug 5 09:09:35 2008
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
@@ -29,8 +29,12 @@ CONFIG_GENERIC_TIME=y
29CONFIG_GENERIC_TIME_VSYSCALL=y 29CONFIG_GENERIC_TIME_VSYSCALL=y
30CONFIG_GENERIC_CLOCKEVENTS=y 30CONFIG_GENERIC_CLOCKEVENTS=y
31CONFIG_GENERIC_HARDIRQS=y 31CONFIG_GENERIC_HARDIRQS=y
32# CONFIG_HAVE_GET_USER_PAGES_FAST is not set
32# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 33# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
33CONFIG_IRQ_PER_CPU=y 34CONFIG_IRQ_PER_CPU=y
35CONFIG_STACKTRACE_SUPPORT=y
36CONFIG_HAVE_LATENCYTOP_SUPPORT=y
37CONFIG_LOCKDEP_SUPPORT=y
34CONFIG_RWSEM_XCHGADD_ALGORITHM=y 38CONFIG_RWSEM_XCHGADD_ALGORITHM=y
35CONFIG_ARCH_HAS_ILOG2_U32=y 39CONFIG_ARCH_HAS_ILOG2_U32=y
36CONFIG_GENERIC_HWEIGHT=y 40CONFIG_GENERIC_HWEIGHT=y
@@ -78,6 +82,7 @@ CONFIG_FAIR_GROUP_SCHED=y
78CONFIG_USER_SCHED=y 82CONFIG_USER_SCHED=y
79# CONFIG_CGROUP_SCHED is not set 83# CONFIG_CGROUP_SCHED is not set
80CONFIG_SYSFS_DEPRECATED=y 84CONFIG_SYSFS_DEPRECATED=y
85CONFIG_SYSFS_DEPRECATED_V2=y
81# CONFIG_RELAY is not set 86# CONFIG_RELAY is not set
82# CONFIG_NAMESPACES is not set 87# CONFIG_NAMESPACES is not set
83CONFIG_BLK_DEV_INITRD=y 88CONFIG_BLK_DEV_INITRD=y
@@ -86,6 +91,7 @@ CONFIG_INITRAMFS_SOURCE=""
86CONFIG_SYSCTL=y 91CONFIG_SYSCTL=y
87CONFIG_EMBEDDED=y 92CONFIG_EMBEDDED=y
88CONFIG_SYSCTL_SYSCALL=y 93CONFIG_SYSCTL_SYSCALL=y
94CONFIG_SYSCTL_SYSCALL_CHECK=y
89CONFIG_KALLSYMS=y 95CONFIG_KALLSYMS=y
90# CONFIG_KALLSYMS_ALL is not set 96# CONFIG_KALLSYMS_ALL is not set
91# CONFIG_KALLSYMS_EXTRA_PASS is not set 97# CONFIG_KALLSYMS_EXTRA_PASS is not set
@@ -111,13 +117,22 @@ CONFIG_SLUB=y
111# CONFIG_MARKERS is not set 117# CONFIG_MARKERS is not set
112CONFIG_HAVE_OPROFILE=y 118CONFIG_HAVE_OPROFILE=y
113# CONFIG_KPROBES is not set 119# CONFIG_KPROBES is not set
120CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y
121CONFIG_HAVE_IOREMAP_PROT=y
114CONFIG_HAVE_KPROBES=y 122CONFIG_HAVE_KPROBES=y
123CONFIG_HAVE_KRETPROBES=y
124CONFIG_HAVE_ARCH_TRACEHOOK=y
125# CONFIG_HAVE_DMA_ATTRS is not set
126# CONFIG_USE_GENERIC_SMP_HELPERS is not set
127# CONFIG_HAVE_CLK is not set
115CONFIG_PROC_PAGE_MONITOR=y 128CONFIG_PROC_PAGE_MONITOR=y
129# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
116CONFIG_SLABINFO=y 130CONFIG_SLABINFO=y
117CONFIG_RT_MUTEXES=y 131CONFIG_RT_MUTEXES=y
118# CONFIG_TINY_SHMEM is not set 132# CONFIG_TINY_SHMEM is not set
119CONFIG_BASE_SMALL=0 133CONFIG_BASE_SMALL=0
120CONFIG_MODULES=y 134CONFIG_MODULES=y
135# CONFIG_MODULE_FORCE_LOAD is not set
121CONFIG_MODULE_UNLOAD=y 136CONFIG_MODULE_UNLOAD=y
122# CONFIG_MODULE_FORCE_UNLOAD is not set 137# CONFIG_MODULE_FORCE_UNLOAD is not set
123# CONFIG_MODVERSIONS is not set 138# CONFIG_MODVERSIONS is not set
@@ -128,6 +143,7 @@ CONFIG_LBD=y
128# CONFIG_BLK_DEV_IO_TRACE is not set 143# CONFIG_BLK_DEV_IO_TRACE is not set
129# CONFIG_LSF is not set 144# CONFIG_LSF is not set
130# CONFIG_BLK_DEV_BSG is not set 145# CONFIG_BLK_DEV_BSG is not set
146# CONFIG_BLK_DEV_INTEGRITY is not set
131 147
132# 148#
133# IO Schedulers 149# IO Schedulers
@@ -142,24 +158,25 @@ CONFIG_DEFAULT_AS=y
142# CONFIG_DEFAULT_NOOP is not set 158# CONFIG_DEFAULT_NOOP is not set
143CONFIG_DEFAULT_IOSCHED="anticipatory" 159CONFIG_DEFAULT_IOSCHED="anticipatory"
144CONFIG_CLASSIC_RCU=y 160CONFIG_CLASSIC_RCU=y
145# CONFIG_PREEMPT_RCU is not set
146# CONFIG_PPC4xx_PCI_EXPRESS is not set 161# CONFIG_PPC4xx_PCI_EXPRESS is not set
147 162
148# 163#
149# Platform support 164# Platform support
150# 165#
151# CONFIG_PPC_MPC512x is not set
152# CONFIG_PPC_MPC5121 is not set
153# CONFIG_PPC_CELL is not set 166# CONFIG_PPC_CELL is not set
154# CONFIG_PPC_CELL_NATIVE is not set 167# CONFIG_PPC_CELL_NATIVE is not set
155# CONFIG_PQ2ADS is not set 168# CONFIG_PQ2ADS is not set
156# CONFIG_BAMBOO is not set 169# CONFIG_BAMBOO is not set
157# CONFIG_EBONY is not set 170# CONFIG_EBONY is not set
171# CONFIG_SAM440EP is not set
158# CONFIG_SEQUOIA is not set 172# CONFIG_SEQUOIA is not set
159# CONFIG_TAISHAN is not set 173# CONFIG_TAISHAN is not set
160# CONFIG_KATMAI is not set 174# CONFIG_KATMAI is not set
161CONFIG_RAINIER=y 175CONFIG_RAINIER=y
162# CONFIG_WARP is not set 176# CONFIG_WARP is not set
177# CONFIG_CANYONLANDS is not set
178# CONFIG_YOSEMITE is not set
179# CONFIG_XILINX_VIRTEX440_GENERIC_BOARD is not set
163CONFIG_440GRX=y 180CONFIG_440GRX=y
164# CONFIG_IPIC is not set 181# CONFIG_IPIC is not set
165# CONFIG_MPIC is not set 182# CONFIG_MPIC is not set
@@ -191,7 +208,6 @@ CONFIG_HZ=250
191CONFIG_PREEMPT_NONE=y 208CONFIG_PREEMPT_NONE=y
192# CONFIG_PREEMPT_VOLUNTARY is not set 209# CONFIG_PREEMPT_VOLUNTARY is not set
193# CONFIG_PREEMPT is not set 210# CONFIG_PREEMPT is not set
194CONFIG_RCU_TRACE=y
195CONFIG_BINFMT_ELF=y 211CONFIG_BINFMT_ELF=y
196# CONFIG_BINFMT_MISC is not set 212# CONFIG_BINFMT_MISC is not set
197CONFIG_MATH_EMULATION=y 213CONFIG_MATH_EMULATION=y
@@ -209,14 +225,18 @@ CONFIG_FLATMEM=y
209CONFIG_FLAT_NODE_MEM_MAP=y 225CONFIG_FLAT_NODE_MEM_MAP=y
210# CONFIG_SPARSEMEM_STATIC is not set 226# CONFIG_SPARSEMEM_STATIC is not set
211# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set 227# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
228CONFIG_PAGEFLAGS_EXTENDED=y
212CONFIG_SPLIT_PTLOCK_CPUS=4 229CONFIG_SPLIT_PTLOCK_CPUS=4
230CONFIG_MIGRATION=y
213CONFIG_RESOURCES_64BIT=y 231CONFIG_RESOURCES_64BIT=y
214CONFIG_ZONE_DMA_FLAG=1 232CONFIG_ZONE_DMA_FLAG=1
215CONFIG_BOUNCE=y 233CONFIG_BOUNCE=y
216CONFIG_VIRT_TO_BUS=y 234CONFIG_VIRT_TO_BUS=y
235CONFIG_FORCE_MAX_ZONEORDER=11
217CONFIG_PROC_DEVICETREE=y 236CONFIG_PROC_DEVICETREE=y
218CONFIG_CMDLINE_BOOL=y 237CONFIG_CMDLINE_BOOL=y
219CONFIG_CMDLINE="" 238CONFIG_CMDLINE=""
239CONFIG_EXTRA_TARGETS=""
220CONFIG_SECCOMP=y 240CONFIG_SECCOMP=y
221CONFIG_ISA_DMA_API=y 241CONFIG_ISA_DMA_API=y
222 242
@@ -225,6 +245,8 @@ CONFIG_ISA_DMA_API=y
225# 245#
226CONFIG_ZONE_DMA=y 246CONFIG_ZONE_DMA=y
227CONFIG_PPC_INDIRECT_PCI=y 247CONFIG_PPC_INDIRECT_PCI=y
248CONFIG_4xx_SOC=y
249CONFIG_PPC_PCI_CHOICE=y
228CONFIG_PCI=y 250CONFIG_PCI=y
229CONFIG_PCI_DOMAINS=y 251CONFIG_PCI_DOMAINS=y
230CONFIG_PCI_SYSCALL=y 252CONFIG_PCI_SYSCALL=y
@@ -235,6 +257,7 @@ CONFIG_PCI_LEGACY=y
235# CONFIG_PCI_DEBUG is not set 257# CONFIG_PCI_DEBUG is not set
236# CONFIG_PCCARD is not set 258# CONFIG_PCCARD is not set
237# CONFIG_HOTPLUG_PCI is not set 259# CONFIG_HOTPLUG_PCI is not set
260# CONFIG_HAS_RAPIDIO is not set
238 261
239# 262#
240# Advanced setup 263# Advanced setup
@@ -244,17 +267,13 @@ CONFIG_PCI_LEGACY=y
244# 267#
245# Default settings for advanced configuration options are used 268# Default settings for advanced configuration options are used
246# 269#
247CONFIG_HIGHMEM_START=0xfe000000
248CONFIG_LOWMEM_SIZE=0x30000000 270CONFIG_LOWMEM_SIZE=0x30000000
271CONFIG_PAGE_OFFSET=0xc0000000
249CONFIG_KERNEL_START=0xc0000000 272CONFIG_KERNEL_START=0xc0000000
273CONFIG_PHYSICAL_START=0x00000000
250CONFIG_TASK_SIZE=0xc0000000 274CONFIG_TASK_SIZE=0xc0000000
251CONFIG_CONSISTENT_START=0xff100000 275CONFIG_CONSISTENT_START=0xff100000
252CONFIG_CONSISTENT_SIZE=0x00200000 276CONFIG_CONSISTENT_SIZE=0x00200000
253CONFIG_BOOT_LOAD=0x01000000
254
255#
256# Networking
257#
258CONFIG_NET=y 277CONFIG_NET=y
259 278
260# 279#
@@ -292,8 +311,6 @@ CONFIG_TCP_CONG_CUBIC=y
292CONFIG_DEFAULT_TCP_CONG="cubic" 311CONFIG_DEFAULT_TCP_CONG="cubic"
293# CONFIG_TCP_MD5SIG is not set 312# CONFIG_TCP_MD5SIG is not set
294# CONFIG_IPV6 is not set 313# CONFIG_IPV6 is not set
295# CONFIG_INET6_XFRM_TUNNEL is not set
296# CONFIG_INET6_TUNNEL is not set
297# CONFIG_NETWORK_SECMARK is not set 314# CONFIG_NETWORK_SECMARK is not set
298# CONFIG_NETFILTER is not set 315# CONFIG_NETFILTER is not set
299# CONFIG_IP_DCCP is not set 316# CONFIG_IP_DCCP is not set
@@ -343,6 +360,8 @@ CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
343CONFIG_STANDALONE=y 360CONFIG_STANDALONE=y
344CONFIG_PREVENT_FIRMWARE_BUILD=y 361CONFIG_PREVENT_FIRMWARE_BUILD=y
345CONFIG_FW_LOADER=y 362CONFIG_FW_LOADER=y
363CONFIG_FIRMWARE_IN_KERNEL=y
364CONFIG_EXTRA_FIRMWARE=""
346# CONFIG_DEBUG_DRIVER is not set 365# CONFIG_DEBUG_DRIVER is not set
347# CONFIG_DEBUG_DEVRES is not set 366# CONFIG_DEBUG_DEVRES is not set
348# CONFIG_SYS_HYPERVISOR is not set 367# CONFIG_SYS_HYPERVISOR is not set
@@ -355,6 +374,7 @@ CONFIG_MTD_PARTITIONS=y
355# CONFIG_MTD_REDBOOT_PARTS is not set 374# CONFIG_MTD_REDBOOT_PARTS is not set
356CONFIG_MTD_CMDLINE_PARTS=y 375CONFIG_MTD_CMDLINE_PARTS=y
357CONFIG_MTD_OF_PARTS=y 376CONFIG_MTD_OF_PARTS=y
377# CONFIG_MTD_AR7_PARTS is not set
358 378
359# 379#
360# User Modules And Translation Layers 380# User Modules And Translation Layers
@@ -445,12 +465,14 @@ CONFIG_BLK_DEV_RAM_SIZE=35000
445# CONFIG_CDROM_PKTCDVD is not set 465# CONFIG_CDROM_PKTCDVD is not set
446# CONFIG_ATA_OVER_ETH is not set 466# CONFIG_ATA_OVER_ETH is not set
447# CONFIG_XILINX_SYSACE is not set 467# CONFIG_XILINX_SYSACE is not set
468# CONFIG_BLK_DEV_HD is not set
448CONFIG_MISC_DEVICES=y 469CONFIG_MISC_DEVICES=y
449# CONFIG_PHANTOM is not set 470# CONFIG_PHANTOM is not set
450# CONFIG_EEPROM_93CX6 is not set 471# CONFIG_EEPROM_93CX6 is not set
451# CONFIG_SGI_IOC4 is not set 472# CONFIG_SGI_IOC4 is not set
452# CONFIG_TIFM_CORE is not set 473# CONFIG_TIFM_CORE is not set
453# CONFIG_ENCLOSURE_SERVICES is not set 474# CONFIG_ENCLOSURE_SERVICES is not set
475# CONFIG_HP_ILO is not set
454CONFIG_HAVE_IDE=y 476CONFIG_HAVE_IDE=y
455# CONFIG_IDE is not set 477# CONFIG_IDE is not set
456 478
@@ -468,6 +490,10 @@ CONFIG_HAVE_IDE=y
468# 490#
469# IEEE 1394 (FireWire) support 491# IEEE 1394 (FireWire) support
470# 492#
493
494#
495# Enable only one of the two stacks, unless you know what you are doing
496#
471# CONFIG_FIREWIRE is not set 497# CONFIG_FIREWIRE is not set
472# CONFIG_IEEE1394 is not set 498# CONFIG_IEEE1394 is not set
473# CONFIG_I2O is not set 499# CONFIG_I2O is not set
@@ -475,7 +501,6 @@ CONFIG_MACINTOSH_DRIVERS=y
475# CONFIG_MAC_EMUMOUSEBTN is not set 501# CONFIG_MAC_EMUMOUSEBTN is not set
476# CONFIG_WINDFARM is not set 502# CONFIG_WINDFARM is not set
477CONFIG_NETDEVICES=y 503CONFIG_NETDEVICES=y
478# CONFIG_NETDEVICES_MULTIQUEUE is not set
479# CONFIG_DUMMY is not set 504# CONFIG_DUMMY is not set
480# CONFIG_BONDING is not set 505# CONFIG_BONDING is not set
481# CONFIG_MACVLAN is not set 506# CONFIG_MACVLAN is not set
@@ -492,7 +517,6 @@ CONFIG_NETDEV_1000=y
492# CONFIG_DL2K is not set 517# CONFIG_DL2K is not set
493# CONFIG_E1000 is not set 518# CONFIG_E1000 is not set
494# CONFIG_E1000E is not set 519# CONFIG_E1000E is not set
495# CONFIG_E1000E_ENABLED is not set
496# CONFIG_IP1000 is not set 520# CONFIG_IP1000 is not set
497# CONFIG_IGB is not set 521# CONFIG_IGB is not set
498# CONFIG_NS83820 is not set 522# CONFIG_NS83820 is not set
@@ -502,12 +526,12 @@ CONFIG_NETDEV_1000=y
502# CONFIG_SIS190 is not set 526# CONFIG_SIS190 is not set
503# CONFIG_SKGE is not set 527# CONFIG_SKGE is not set
504# CONFIG_SKY2 is not set 528# CONFIG_SKY2 is not set
505# CONFIG_SK98LIN is not set
506# CONFIG_VIA_VELOCITY is not set 529# CONFIG_VIA_VELOCITY is not set
507# CONFIG_TIGON3 is not set 530# CONFIG_TIGON3 is not set
508# CONFIG_BNX2 is not set 531# CONFIG_BNX2 is not set
509# CONFIG_QLA3XXX is not set 532# CONFIG_QLA3XXX is not set
510# CONFIG_ATL1 is not set 533# CONFIG_ATL1 is not set
534# CONFIG_ATL1E is not set
511CONFIG_NETDEV_10000=y 535CONFIG_NETDEV_10000=y
512# CONFIG_CHELSIO_T1 is not set 536# CONFIG_CHELSIO_T1 is not set
513# CONFIG_CHELSIO_T3 is not set 537# CONFIG_CHELSIO_T3 is not set
@@ -520,6 +544,7 @@ CONFIG_NETDEV_10000=y
520# CONFIG_MLX4_CORE is not set 544# CONFIG_MLX4_CORE is not set
521# CONFIG_TEHUTI is not set 545# CONFIG_TEHUTI is not set
522# CONFIG_BNX2X is not set 546# CONFIG_BNX2X is not set
547# CONFIG_SFC is not set
523# CONFIG_TR is not set 548# CONFIG_TR is not set
524 549
525# 550#
@@ -527,6 +552,7 @@ CONFIG_NETDEV_10000=y
527# 552#
528# CONFIG_WLAN_PRE80211 is not set 553# CONFIG_WLAN_PRE80211 is not set
529# CONFIG_WLAN_80211 is not set 554# CONFIG_WLAN_80211 is not set
555# CONFIG_IWLWIFI_LEDS is not set
530# CONFIG_WAN is not set 556# CONFIG_WAN is not set
531# CONFIG_FDDI is not set 557# CONFIG_FDDI is not set
532# CONFIG_HIPPI is not set 558# CONFIG_HIPPI is not set
@@ -553,6 +579,7 @@ CONFIG_NETDEV_10000=y
553# Character devices 579# Character devices
554# 580#
555# CONFIG_VT is not set 581# CONFIG_VT is not set
582CONFIG_DEVKMEM=y
556# CONFIG_SERIAL_NONSTANDARD is not set 583# CONFIG_SERIAL_NONSTANDARD is not set
557# CONFIG_NOZOMI is not set 584# CONFIG_NOZOMI is not set
558 585
@@ -591,12 +618,9 @@ CONFIG_LEGACY_PTY_COUNT=256
591# CONFIG_TCG_TPM is not set 618# CONFIG_TCG_TPM is not set
592CONFIG_DEVPORT=y 619CONFIG_DEVPORT=y
593# CONFIG_I2C is not set 620# CONFIG_I2C is not set
594
595#
596# SPI support
597#
598# CONFIG_SPI is not set 621# CONFIG_SPI is not set
599# CONFIG_SPI_MASTER is not set 622CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
623# CONFIG_GPIOLIB is not set
600# CONFIG_W1 is not set 624# CONFIG_W1 is not set
601# CONFIG_POWER_SUPPLY is not set 625# CONFIG_POWER_SUPPLY is not set
602# CONFIG_HWMON is not set 626# CONFIG_HWMON is not set
@@ -612,13 +636,24 @@ CONFIG_SSB_POSSIBLE=y
612# 636#
613# Multifunction device drivers 637# Multifunction device drivers
614# 638#
639# CONFIG_MFD_CORE is not set
615# CONFIG_MFD_SM501 is not set 640# CONFIG_MFD_SM501 is not set
641# CONFIG_HTC_PASIC3 is not set
616 642
617# 643#
618# Multimedia devices 644# Multimedia devices
619# 645#
646
647#
648# Multimedia core support
649#
620# CONFIG_VIDEO_DEV is not set 650# CONFIG_VIDEO_DEV is not set
621# CONFIG_DVB_CORE is not set 651# CONFIG_DVB_CORE is not set
652# CONFIG_VIDEO_MEDIA is not set
653
654#
655# Multimedia drivers
656#
622CONFIG_DAB=y 657CONFIG_DAB=y
623 658
624# 659#
@@ -635,16 +670,14 @@ CONFIG_VIDEO_OUTPUT_CONTROL=m
635# Display device support 670# Display device support
636# 671#
637# CONFIG_DISPLAY_SUPPORT is not set 672# CONFIG_DISPLAY_SUPPORT is not set
638
639#
640# Sound
641#
642# CONFIG_SOUND is not set 673# CONFIG_SOUND is not set
643CONFIG_USB_SUPPORT=y 674CONFIG_USB_SUPPORT=y
644CONFIG_USB_ARCH_HAS_HCD=y 675CONFIG_USB_ARCH_HAS_HCD=y
645CONFIG_USB_ARCH_HAS_OHCI=y 676CONFIG_USB_ARCH_HAS_OHCI=y
646CONFIG_USB_ARCH_HAS_EHCI=y 677CONFIG_USB_ARCH_HAS_EHCI=y
647# CONFIG_USB is not set 678# CONFIG_USB is not set
679# CONFIG_USB_OTG_WHITELIST is not set
680# CONFIG_USB_OTG_BLACKLIST_HUB is not set
648 681
649# 682#
650# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 683# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
@@ -653,13 +686,11 @@ CONFIG_USB_ARCH_HAS_EHCI=y
653# CONFIG_MMC is not set 686# CONFIG_MMC is not set
654# CONFIG_MEMSTICK is not set 687# CONFIG_MEMSTICK is not set
655# CONFIG_NEW_LEDS is not set 688# CONFIG_NEW_LEDS is not set
689# CONFIG_ACCESSIBILITY is not set
656# CONFIG_INFINIBAND is not set 690# CONFIG_INFINIBAND is not set
657# CONFIG_EDAC is not set 691# CONFIG_EDAC is not set
658# CONFIG_RTC_CLASS is not set 692# CONFIG_RTC_CLASS is not set
659 693# CONFIG_DMADEVICES is not set
660#
661# Userspace I/O
662#
663# CONFIG_UIO is not set 694# CONFIG_UIO is not set
664 695
665# 696#
@@ -674,7 +705,6 @@ CONFIG_EXT2_FS=y
674# CONFIG_JFS_FS is not set 705# CONFIG_JFS_FS is not set
675# CONFIG_FS_POSIX_ACL is not set 706# CONFIG_FS_POSIX_ACL is not set
676# CONFIG_XFS_FS is not set 707# CONFIG_XFS_FS is not set
677# CONFIG_GFS2_FS is not set
678# CONFIG_OCFS2_FS is not set 708# CONFIG_OCFS2_FS is not set
679CONFIG_DNOTIFY=y 709CONFIG_DNOTIFY=y
680CONFIG_INOTIFY=y 710CONFIG_INOTIFY=y
@@ -733,6 +763,7 @@ CONFIG_JFFS2_RTIME=y
733CONFIG_CRAMFS=y 763CONFIG_CRAMFS=y
734# CONFIG_VXFS_FS is not set 764# CONFIG_VXFS_FS is not set
735# CONFIG_MINIX_FS is not set 765# CONFIG_MINIX_FS is not set
766# CONFIG_OMFS_FS is not set
736# CONFIG_HPFS_FS is not set 767# CONFIG_HPFS_FS is not set
737# CONFIG_QNX4FS_FS is not set 768# CONFIG_QNX4FS_FS is not set
738# CONFIG_ROMFS_FS is not set 769# CONFIG_ROMFS_FS is not set
@@ -743,14 +774,12 @@ CONFIG_NFS_FS=y
743CONFIG_NFS_V3=y 774CONFIG_NFS_V3=y
744# CONFIG_NFS_V3_ACL is not set 775# CONFIG_NFS_V3_ACL is not set
745# CONFIG_NFS_V4 is not set 776# CONFIG_NFS_V4 is not set
746# CONFIG_NFS_DIRECTIO is not set
747# CONFIG_NFSD is not set
748CONFIG_ROOT_NFS=y 777CONFIG_ROOT_NFS=y
778# CONFIG_NFSD is not set
749CONFIG_LOCKD=y 779CONFIG_LOCKD=y
750CONFIG_LOCKD_V4=y 780CONFIG_LOCKD_V4=y
751CONFIG_NFS_COMMON=y 781CONFIG_NFS_COMMON=y
752CONFIG_SUNRPC=y 782CONFIG_SUNRPC=y
753# CONFIG_SUNRPC_BIND34 is not set
754# CONFIG_RPCSEC_GSS_KRB5 is not set 783# CONFIG_RPCSEC_GSS_KRB5 is not set
755# CONFIG_RPCSEC_GSS_SPKM3 is not set 784# CONFIG_RPCSEC_GSS_SPKM3 is not set
756# CONFIG_SMB_FS is not set 785# CONFIG_SMB_FS is not set
@@ -771,8 +800,10 @@ CONFIG_MSDOS_PARTITION=y
771# Library routines 800# Library routines
772# 801#
773CONFIG_BITREVERSE=y 802CONFIG_BITREVERSE=y
803# CONFIG_GENERIC_FIND_FIRST_BIT is not set
774# CONFIG_CRC_CCITT is not set 804# CONFIG_CRC_CCITT is not set
775# CONFIG_CRC16 is not set 805# CONFIG_CRC16 is not set
806# CONFIG_CRC_T10DIF is not set
776# CONFIG_CRC_ITU_T is not set 807# CONFIG_CRC_ITU_T is not set
777CONFIG_CRC32=y 808CONFIG_CRC32=y
778# CONFIG_CRC7 is not set 809# CONFIG_CRC7 is not set
@@ -783,6 +814,7 @@ CONFIG_PLIST=y
783CONFIG_HAS_IOMEM=y 814CONFIG_HAS_IOMEM=y
784CONFIG_HAS_IOPORT=y 815CONFIG_HAS_IOPORT=y
785CONFIG_HAS_DMA=y 816CONFIG_HAS_DMA=y
817CONFIG_HAVE_LMB=y
786 818
787# 819#
788# Kernel hacking 820# Kernel hacking
@@ -790,6 +822,7 @@ CONFIG_HAS_DMA=y
790# CONFIG_PRINTK_TIME is not set 822# CONFIG_PRINTK_TIME is not set
791CONFIG_ENABLE_WARN_DEPRECATED=y 823CONFIG_ENABLE_WARN_DEPRECATED=y
792CONFIG_ENABLE_MUST_CHECK=y 824CONFIG_ENABLE_MUST_CHECK=y
825CONFIG_FRAME_WARN=1024
793CONFIG_MAGIC_SYSRQ=y 826CONFIG_MAGIC_SYSRQ=y
794# CONFIG_UNUSED_SYMBOLS is not set 827# CONFIG_UNUSED_SYMBOLS is not set
795CONFIG_DEBUG_FS=y 828CONFIG_DEBUG_FS=y
@@ -797,9 +830,12 @@ CONFIG_DEBUG_FS=y
797CONFIG_DEBUG_KERNEL=y 830CONFIG_DEBUG_KERNEL=y
798# CONFIG_DEBUG_SHIRQ is not set 831# CONFIG_DEBUG_SHIRQ is not set
799CONFIG_DETECT_SOFTLOCKUP=y 832CONFIG_DETECT_SOFTLOCKUP=y
833# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
834CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
800CONFIG_SCHED_DEBUG=y 835CONFIG_SCHED_DEBUG=y
801# CONFIG_SCHEDSTATS is not set 836# CONFIG_SCHEDSTATS is not set
802# CONFIG_TIMER_STATS is not set 837# CONFIG_TIMER_STATS is not set
838# CONFIG_DEBUG_OBJECTS is not set
803# CONFIG_SLUB_DEBUG_ON is not set 839# CONFIG_SLUB_DEBUG_ON is not set
804# CONFIG_SLUB_STATS is not set 840# CONFIG_SLUB_STATS is not set
805# CONFIG_DEBUG_RT_MUTEXES is not set 841# CONFIG_DEBUG_RT_MUTEXES is not set
@@ -812,19 +848,30 @@ CONFIG_SCHED_DEBUG=y
812# CONFIG_DEBUG_BUGVERBOSE is not set 848# CONFIG_DEBUG_BUGVERBOSE is not set
813# CONFIG_DEBUG_INFO is not set 849# CONFIG_DEBUG_INFO is not set
814# CONFIG_DEBUG_VM is not set 850# CONFIG_DEBUG_VM is not set
851# CONFIG_DEBUG_WRITECOUNT is not set
852# CONFIG_DEBUG_MEMORY_INIT is not set
815# CONFIG_DEBUG_LIST is not set 853# CONFIG_DEBUG_LIST is not set
816# CONFIG_DEBUG_SG is not set 854# CONFIG_DEBUG_SG is not set
817# CONFIG_BOOT_PRINTK_DELAY is not set 855# CONFIG_BOOT_PRINTK_DELAY is not set
818# CONFIG_RCU_TORTURE_TEST is not set 856# CONFIG_RCU_TORTURE_TEST is not set
819# CONFIG_BACKTRACE_SELF_TEST is not set 857# CONFIG_BACKTRACE_SELF_TEST is not set
820# CONFIG_FAULT_INJECTION is not set 858# CONFIG_FAULT_INJECTION is not set
859# CONFIG_LATENCYTOP is not set
860CONFIG_HAVE_FTRACE=y
861CONFIG_HAVE_DYNAMIC_FTRACE=y
862# CONFIG_FTRACE is not set
863# CONFIG_SCHED_TRACER is not set
864# CONFIG_CONTEXT_SWITCH_TRACER is not set
821# CONFIG_SAMPLES is not set 865# CONFIG_SAMPLES is not set
866CONFIG_HAVE_ARCH_KGDB=y
867# CONFIG_KGDB is not set
822# CONFIG_DEBUG_STACKOVERFLOW is not set 868# CONFIG_DEBUG_STACKOVERFLOW is not set
823# CONFIG_DEBUG_STACK_USAGE is not set 869# CONFIG_DEBUG_STACK_USAGE is not set
824# CONFIG_DEBUG_PAGEALLOC is not set 870# CONFIG_DEBUG_PAGEALLOC is not set
825CONFIG_DEBUGGER=y 871# CONFIG_CODE_PATCHING_SELFTEST is not set
826# CONFIG_KGDB is not set 872# CONFIG_FTR_FIXUP_SELFTEST is not set
827# CONFIG_XMON is not set 873# CONFIG_XMON is not set
874# CONFIG_IRQSTACKS is not set
828# CONFIG_VIRQ_DEBUG is not set 875# CONFIG_VIRQ_DEBUG is not set
829# CONFIG_BDI_SWITCH is not set 876# CONFIG_BDI_SWITCH is not set
830CONFIG_PPC_EARLY_DEBUG=y 877CONFIG_PPC_EARLY_DEBUG=y
@@ -849,51 +896,85 @@ CONFIG_PPC_EARLY_DEBUG_44x_PHYSHIGH=0x1
849# CONFIG_SECURITY is not set 896# CONFIG_SECURITY is not set
850# CONFIG_SECURITY_FILE_CAPABILITIES is not set 897# CONFIG_SECURITY_FILE_CAPABILITIES is not set
851CONFIG_CRYPTO=y 898CONFIG_CRYPTO=y
899
900#
901# Crypto core or helper
902#
852CONFIG_CRYPTO_ALGAPI=y 903CONFIG_CRYPTO_ALGAPI=y
853CONFIG_CRYPTO_BLKCIPHER=y 904CONFIG_CRYPTO_BLKCIPHER=y
854# CONFIG_CRYPTO_SEQIV is not set
855CONFIG_CRYPTO_MANAGER=y 905CONFIG_CRYPTO_MANAGER=y
906# CONFIG_CRYPTO_GF128MUL is not set
907# CONFIG_CRYPTO_NULL is not set
908# CONFIG_CRYPTO_CRYPTD is not set
909# CONFIG_CRYPTO_AUTHENC is not set
910# CONFIG_CRYPTO_TEST is not set
911
912#
913# Authenticated Encryption with Associated Data
914#
915# CONFIG_CRYPTO_CCM is not set
916# CONFIG_CRYPTO_GCM is not set
917# CONFIG_CRYPTO_SEQIV is not set
918
919#
920# Block modes
921#
922CONFIG_CRYPTO_CBC=y
923# CONFIG_CRYPTO_CTR is not set
924# CONFIG_CRYPTO_CTS is not set
925CONFIG_CRYPTO_ECB=y
926# CONFIG_CRYPTO_LRW is not set
927CONFIG_CRYPTO_PCBC=y
928# CONFIG_CRYPTO_XTS is not set
929
930#
931# Hash modes
932#
856# CONFIG_CRYPTO_HMAC is not set 933# CONFIG_CRYPTO_HMAC is not set
857# CONFIG_CRYPTO_XCBC is not set 934# CONFIG_CRYPTO_XCBC is not set
858# CONFIG_CRYPTO_NULL is not set 935
936#
937# Digest
938#
939# CONFIG_CRYPTO_CRC32C is not set
859# CONFIG_CRYPTO_MD4 is not set 940# CONFIG_CRYPTO_MD4 is not set
860CONFIG_CRYPTO_MD5=y 941CONFIG_CRYPTO_MD5=y
942# CONFIG_CRYPTO_MICHAEL_MIC is not set
943# CONFIG_CRYPTO_RMD128 is not set
944# CONFIG_CRYPTO_RMD160 is not set
945# CONFIG_CRYPTO_RMD256 is not set
946# CONFIG_CRYPTO_RMD320 is not set
861# CONFIG_CRYPTO_SHA1 is not set 947# CONFIG_CRYPTO_SHA1 is not set
862# CONFIG_CRYPTO_SHA256 is not set 948# CONFIG_CRYPTO_SHA256 is not set
863# CONFIG_CRYPTO_SHA512 is not set 949# CONFIG_CRYPTO_SHA512 is not set
864# CONFIG_CRYPTO_WP512 is not set
865# CONFIG_CRYPTO_TGR192 is not set 950# CONFIG_CRYPTO_TGR192 is not set
866# CONFIG_CRYPTO_GF128MUL is not set 951# CONFIG_CRYPTO_WP512 is not set
867CONFIG_CRYPTO_ECB=y 952
868CONFIG_CRYPTO_CBC=y 953#
869CONFIG_CRYPTO_PCBC=y 954# Ciphers
870# CONFIG_CRYPTO_LRW is not set 955#
871# CONFIG_CRYPTO_XTS is not set
872# CONFIG_CRYPTO_CTR is not set
873# CONFIG_CRYPTO_GCM is not set
874# CONFIG_CRYPTO_CCM is not set
875# CONFIG_CRYPTO_CRYPTD is not set
876CONFIG_CRYPTO_DES=y
877# CONFIG_CRYPTO_FCRYPT is not set
878# CONFIG_CRYPTO_BLOWFISH is not set
879# CONFIG_CRYPTO_TWOFISH is not set
880# CONFIG_CRYPTO_SERPENT is not set
881# CONFIG_CRYPTO_AES is not set 956# CONFIG_CRYPTO_AES is not set
957# CONFIG_CRYPTO_ANUBIS is not set
958# CONFIG_CRYPTO_ARC4 is not set
959# CONFIG_CRYPTO_BLOWFISH is not set
960# CONFIG_CRYPTO_CAMELLIA is not set
882# CONFIG_CRYPTO_CAST5 is not set 961# CONFIG_CRYPTO_CAST5 is not set
883# CONFIG_CRYPTO_CAST6 is not set 962# CONFIG_CRYPTO_CAST6 is not set
884# CONFIG_CRYPTO_TEA is not set 963CONFIG_CRYPTO_DES=y
885# CONFIG_CRYPTO_ARC4 is not set 964# CONFIG_CRYPTO_FCRYPT is not set
886# CONFIG_CRYPTO_KHAZAD is not set 965# CONFIG_CRYPTO_KHAZAD is not set
887# CONFIG_CRYPTO_ANUBIS is not set
888# CONFIG_CRYPTO_SEED is not set
889# CONFIG_CRYPTO_SALSA20 is not set 966# CONFIG_CRYPTO_SALSA20 is not set
967# CONFIG_CRYPTO_SEED is not set
968# CONFIG_CRYPTO_SERPENT is not set
969# CONFIG_CRYPTO_TEA is not set
970# CONFIG_CRYPTO_TWOFISH is not set
971
972#
973# Compression
974#
890# CONFIG_CRYPTO_DEFLATE is not set 975# CONFIG_CRYPTO_DEFLATE is not set
891# CONFIG_CRYPTO_MICHAEL_MIC is not set
892# CONFIG_CRYPTO_CRC32C is not set
893# CONFIG_CRYPTO_CAMELLIA is not set
894# CONFIG_CRYPTO_TEST is not set
895# CONFIG_CRYPTO_AUTHENC is not set
896# CONFIG_CRYPTO_LZO is not set 976# CONFIG_CRYPTO_LZO is not set
897CONFIG_CRYPTO_HW=y 977CONFIG_CRYPTO_HW=y
898# CONFIG_CRYPTO_DEV_HIFN_795X is not set 978# CONFIG_CRYPTO_DEV_HIFN_795X is not set
899# CONFIG_PPC_CLOCK is not set 979# CONFIG_PPC_CLOCK is not set
980# CONFIG_VIRTUALIZATION is not set
diff --git a/arch/powerpc/configs/44x/sam440ep_defconfig b/arch/powerpc/configs/44x/sam440ep_defconfig
index 9ce5cbc2a4e7..0ed2de05f4e8 100644
--- a/arch/powerpc/configs/44x/sam440ep_defconfig
+++ b/arch/powerpc/configs/44x/sam440ep_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.25 3# Linux kernel version: 2.6.27-rc1
4# Mon May 5 13:43:02 2008 4# Tue Aug 5 09:12:48 2008
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
@@ -30,9 +30,11 @@ CONFIG_GENERIC_TIME=y
30CONFIG_GENERIC_TIME_VSYSCALL=y 30CONFIG_GENERIC_TIME_VSYSCALL=y
31CONFIG_GENERIC_CLOCKEVENTS=y 31CONFIG_GENERIC_CLOCKEVENTS=y
32CONFIG_GENERIC_HARDIRQS=y 32CONFIG_GENERIC_HARDIRQS=y
33# CONFIG_HAVE_GET_USER_PAGES_FAST is not set
33# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 34# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
34CONFIG_IRQ_PER_CPU=y 35CONFIG_IRQ_PER_CPU=y
35CONFIG_STACKTRACE_SUPPORT=y 36CONFIG_STACKTRACE_SUPPORT=y
37CONFIG_HAVE_LATENCYTOP_SUPPORT=y
36CONFIG_LOCKDEP_SUPPORT=y 38CONFIG_LOCKDEP_SUPPORT=y
37CONFIG_RWSEM_XCHGADD_ALGORITHM=y 39CONFIG_RWSEM_XCHGADD_ALGORITHM=y
38CONFIG_ARCH_HAS_ILOG2_U32=y 40CONFIG_ARCH_HAS_ILOG2_U32=y
@@ -116,15 +118,22 @@ CONFIG_SLUB=y
116# CONFIG_MARKERS is not set 118# CONFIG_MARKERS is not set
117CONFIG_HAVE_OPROFILE=y 119CONFIG_HAVE_OPROFILE=y
118# CONFIG_KPROBES is not set 120# CONFIG_KPROBES is not set
121CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y
122CONFIG_HAVE_IOREMAP_PROT=y
119CONFIG_HAVE_KPROBES=y 123CONFIG_HAVE_KPROBES=y
120CONFIG_HAVE_KRETPROBES=y 124CONFIG_HAVE_KRETPROBES=y
125CONFIG_HAVE_ARCH_TRACEHOOK=y
121# CONFIG_HAVE_DMA_ATTRS is not set 126# CONFIG_HAVE_DMA_ATTRS is not set
127# CONFIG_USE_GENERIC_SMP_HELPERS is not set
128# CONFIG_HAVE_CLK is not set
122CONFIG_PROC_PAGE_MONITOR=y 129CONFIG_PROC_PAGE_MONITOR=y
130# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
123CONFIG_SLABINFO=y 131CONFIG_SLABINFO=y
124CONFIG_RT_MUTEXES=y 132CONFIG_RT_MUTEXES=y
125# CONFIG_TINY_SHMEM is not set 133# CONFIG_TINY_SHMEM is not set
126CONFIG_BASE_SMALL=0 134CONFIG_BASE_SMALL=0
127CONFIG_MODULES=y 135CONFIG_MODULES=y
136# CONFIG_MODULE_FORCE_LOAD is not set
128CONFIG_MODULE_UNLOAD=y 137CONFIG_MODULE_UNLOAD=y
129# CONFIG_MODULE_FORCE_UNLOAD is not set 138# CONFIG_MODULE_FORCE_UNLOAD is not set
130# CONFIG_MODVERSIONS is not set 139# CONFIG_MODVERSIONS is not set
@@ -135,6 +144,7 @@ CONFIG_BLOCK=y
135# CONFIG_BLK_DEV_IO_TRACE is not set 144# CONFIG_BLK_DEV_IO_TRACE is not set
136# CONFIG_LSF is not set 145# CONFIG_LSF is not set
137# CONFIG_BLK_DEV_BSG is not set 146# CONFIG_BLK_DEV_BSG is not set
147# CONFIG_BLK_DEV_INTEGRITY is not set
138 148
139# 149#
140# IO Schedulers 150# IO Schedulers
@@ -154,8 +164,6 @@ CONFIG_CLASSIC_RCU=y
154# 164#
155# Platform support 165# Platform support
156# 166#
157# CONFIG_PPC_MPC512x is not set
158# CONFIG_PPC_MPC5121 is not set
159# CONFIG_PPC_CELL is not set 167# CONFIG_PPC_CELL is not set
160# CONFIG_PPC_CELL_NATIVE is not set 168# CONFIG_PPC_CELL_NATIVE is not set
161# CONFIG_PQ2ADS is not set 169# CONFIG_PQ2ADS is not set
@@ -169,6 +177,7 @@ CONFIG_SAM440EP=y
169# CONFIG_WARP is not set 177# CONFIG_WARP is not set
170# CONFIG_CANYONLANDS is not set 178# CONFIG_CANYONLANDS is not set
171# CONFIG_YOSEMITE is not set 179# CONFIG_YOSEMITE is not set
180# CONFIG_XILINX_VIRTEX440_GENERIC_BOARD is not set
172CONFIG_440EP=y 181CONFIG_440EP=y
173CONFIG_IBM440EP_ERR42=y 182CONFIG_IBM440EP_ERR42=y
174# CONFIG_IPIC is not set 183# CONFIG_IPIC is not set
@@ -220,6 +229,7 @@ CONFIG_FLAT_NODE_MEM_MAP=y
220# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set 229# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
221CONFIG_PAGEFLAGS_EXTENDED=y 230CONFIG_PAGEFLAGS_EXTENDED=y
222CONFIG_SPLIT_PTLOCK_CPUS=4 231CONFIG_SPLIT_PTLOCK_CPUS=4
232CONFIG_MIGRATION=y
223CONFIG_RESOURCES_64BIT=y 233CONFIG_RESOURCES_64BIT=y
224CONFIG_ZONE_DMA_FLAG=1 234CONFIG_ZONE_DMA_FLAG=1
225CONFIG_BOUNCE=y 235CONFIG_BOUNCE=y
@@ -228,6 +238,7 @@ CONFIG_FORCE_MAX_ZONEORDER=11
228CONFIG_PROC_DEVICETREE=y 238CONFIG_PROC_DEVICETREE=y
229CONFIG_CMDLINE_BOOL=y 239CONFIG_CMDLINE_BOOL=y
230CONFIG_CMDLINE="" 240CONFIG_CMDLINE=""
241CONFIG_EXTRA_TARGETS=""
231CONFIG_SECCOMP=y 242CONFIG_SECCOMP=y
232CONFIG_ISA_DMA_API=y 243CONFIG_ISA_DMA_API=y
233 244
@@ -237,6 +248,7 @@ CONFIG_ISA_DMA_API=y
237CONFIG_ZONE_DMA=y 248CONFIG_ZONE_DMA=y
238CONFIG_PPC_INDIRECT_PCI=y 249CONFIG_PPC_INDIRECT_PCI=y
239CONFIG_4xx_SOC=y 250CONFIG_4xx_SOC=y
251CONFIG_PPC_PCI_CHOICE=y
240CONFIG_PCI=y 252CONFIG_PCI=y
241CONFIG_PCI_DOMAINS=y 253CONFIG_PCI_DOMAINS=y
242CONFIG_PCI_SYSCALL=y 254CONFIG_PCI_SYSCALL=y
@@ -263,10 +275,6 @@ CONFIG_PHYSICAL_START=0x00000000
263CONFIG_TASK_SIZE=0xc0000000 275CONFIG_TASK_SIZE=0xc0000000
264CONFIG_CONSISTENT_START=0xff100000 276CONFIG_CONSISTENT_START=0xff100000
265CONFIG_CONSISTENT_SIZE=0x00200000 277CONFIG_CONSISTENT_SIZE=0x00200000
266
267#
268# Networking
269#
270CONFIG_NET=y 278CONFIG_NET=y
271 279
272# 280#
@@ -353,6 +361,8 @@ CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
353CONFIG_STANDALONE=y 361CONFIG_STANDALONE=y
354CONFIG_PREVENT_FIRMWARE_BUILD=y 362CONFIG_PREVENT_FIRMWARE_BUILD=y
355CONFIG_FW_LOADER=y 363CONFIG_FW_LOADER=y
364CONFIG_FIRMWARE_IN_KERNEL=y
365CONFIG_EXTRA_FIRMWARE=""
356# CONFIG_SYS_HYPERVISOR is not set 366# CONFIG_SYS_HYPERVISOR is not set
357CONFIG_CONNECTOR=y 367CONFIG_CONNECTOR=y
358CONFIG_PROC_EVENTS=y 368CONFIG_PROC_EVENTS=y
@@ -379,6 +389,7 @@ CONFIG_BLK_DEV_RAM_SIZE=35000
379# CONFIG_CDROM_PKTCDVD is not set 389# CONFIG_CDROM_PKTCDVD is not set
380# CONFIG_ATA_OVER_ETH is not set 390# CONFIG_ATA_OVER_ETH is not set
381# CONFIG_XILINX_SYSACE is not set 391# CONFIG_XILINX_SYSACE is not set
392# CONFIG_BLK_DEV_HD is not set
382# CONFIG_MISC_DEVICES is not set 393# CONFIG_MISC_DEVICES is not set
383CONFIG_HAVE_IDE=y 394CONFIG_HAVE_IDE=y
384# CONFIG_IDE is not set 395# CONFIG_IDE is not set
@@ -422,6 +433,7 @@ CONFIG_SCSI_WAIT_SCAN=m
422# CONFIG_SCSI_SAS_LIBSAS is not set 433# CONFIG_SCSI_SAS_LIBSAS is not set
423# CONFIG_SCSI_SRP_ATTRS is not set 434# CONFIG_SCSI_SRP_ATTRS is not set
424# CONFIG_SCSI_LOWLEVEL is not set 435# CONFIG_SCSI_LOWLEVEL is not set
436# CONFIG_SCSI_DH is not set
425CONFIG_ATA=y 437CONFIG_ATA=y
426# CONFIG_ATA_NONSTANDARD is not set 438# CONFIG_ATA_NONSTANDARD is not set
427# CONFIG_SATA_PMP is not set 439# CONFIG_SATA_PMP is not set
@@ -481,18 +493,22 @@ CONFIG_SATA_SIL=y
481# CONFIG_PATA_VIA is not set 493# CONFIG_PATA_VIA is not set
482# CONFIG_PATA_WINBOND is not set 494# CONFIG_PATA_WINBOND is not set
483# CONFIG_PATA_PLATFORM is not set 495# CONFIG_PATA_PLATFORM is not set
496# CONFIG_PATA_SCH is not set
484# CONFIG_MD is not set 497# CONFIG_MD is not set
485# CONFIG_FUSION is not set 498# CONFIG_FUSION is not set
486 499
487# 500#
488# IEEE 1394 (FireWire) support 501# IEEE 1394 (FireWire) support
489# 502#
503
504#
505# Enable only one of the two stacks, unless you know what you are doing
506#
490# CONFIG_FIREWIRE is not set 507# CONFIG_FIREWIRE is not set
491# CONFIG_IEEE1394 is not set 508# CONFIG_IEEE1394 is not set
492# CONFIG_I2O is not set 509# CONFIG_I2O is not set
493# CONFIG_MACINTOSH_DRIVERS is not set 510# CONFIG_MACINTOSH_DRIVERS is not set
494CONFIG_NETDEVICES=y 511CONFIG_NETDEVICES=y
495# CONFIG_NETDEVICES_MULTIQUEUE is not set
496# CONFIG_DUMMY is not set 512# CONFIG_DUMMY is not set
497# CONFIG_BONDING is not set 513# CONFIG_BONDING is not set
498# CONFIG_MACVLAN is not set 514# CONFIG_MACVLAN is not set
@@ -531,7 +547,6 @@ CONFIG_IBM_NEW_EMAC_ZMII=y
531# 547#
532# CONFIG_WLAN_PRE80211 is not set 548# CONFIG_WLAN_PRE80211 is not set
533# CONFIG_WLAN_80211 is not set 549# CONFIG_WLAN_80211 is not set
534# CONFIG_IWLWIFI is not set
535# CONFIG_IWLWIFI_LEDS is not set 550# CONFIG_IWLWIFI_LEDS is not set
536 551
537# 552#
@@ -607,12 +622,14 @@ CONFIG_SERIO_SERPORT=y
607# CONFIG_SERIO_PCIPS2 is not set 622# CONFIG_SERIO_PCIPS2 is not set
608CONFIG_SERIO_LIBPS2=y 623CONFIG_SERIO_LIBPS2=y
609# CONFIG_SERIO_RAW is not set 624# CONFIG_SERIO_RAW is not set
625# CONFIG_SERIO_XILINX_XPS_PS2 is not set
610# CONFIG_GAMEPORT is not set 626# CONFIG_GAMEPORT is not set
611 627
612# 628#
613# Character devices 629# Character devices
614# 630#
615CONFIG_VT=y 631CONFIG_VT=y
632CONFIG_CONSOLE_TRANSLATIONS=y
616CONFIG_VT_CONSOLE=y 633CONFIG_VT_CONSOLE=y
617CONFIG_HW_CONSOLE=y 634CONFIG_HW_CONSOLE=y
618# CONFIG_VT_HW_CONSOLE_BINDING is not set 635# CONFIG_VT_HW_CONSOLE_BINDING is not set
@@ -661,40 +678,60 @@ CONFIG_I2C_ALGOBIT=y
661# 678#
662# I2C Hardware Bus support 679# I2C Hardware Bus support
663# 680#
681
682#
683# PC SMBus host controller drivers
684#
664# CONFIG_I2C_ALI1535 is not set 685# CONFIG_I2C_ALI1535 is not set
665# CONFIG_I2C_ALI1563 is not set 686# CONFIG_I2C_ALI1563 is not set
666# CONFIG_I2C_ALI15X3 is not set 687# CONFIG_I2C_ALI15X3 is not set
667# CONFIG_I2C_AMD756 is not set 688# CONFIG_I2C_AMD756 is not set
668# CONFIG_I2C_AMD8111 is not set 689# CONFIG_I2C_AMD8111 is not set
669# CONFIG_I2C_I801 is not set 690# CONFIG_I2C_I801 is not set
670# CONFIG_I2C_I810 is not set 691# CONFIG_I2C_ISCH is not set
671# CONFIG_I2C_PIIX4 is not set 692# CONFIG_I2C_PIIX4 is not set
672CONFIG_I2C_IBM_IIC=y
673# CONFIG_I2C_MPC is not set
674# CONFIG_I2C_NFORCE2 is not set 693# CONFIG_I2C_NFORCE2 is not set
675# CONFIG_I2C_OCORES is not set
676# CONFIG_I2C_PARPORT_LIGHT is not set
677# CONFIG_I2C_PROSAVAGE is not set
678# CONFIG_I2C_SAVAGE4 is not set
679# CONFIG_I2C_SIMTEC is not set
680# CONFIG_I2C_SIS5595 is not set 694# CONFIG_I2C_SIS5595 is not set
681# CONFIG_I2C_SIS630 is not set 695# CONFIG_I2C_SIS630 is not set
682# CONFIG_I2C_SIS96X is not set 696# CONFIG_I2C_SIS96X is not set
683# CONFIG_I2C_TAOS_EVM is not set
684# CONFIG_I2C_STUB is not set
685# CONFIG_I2C_TINY_USB is not set
686# CONFIG_I2C_VIA is not set 697# CONFIG_I2C_VIA is not set
687# CONFIG_I2C_VIAPRO is not set 698# CONFIG_I2C_VIAPRO is not set
699
700#
701# I2C system bus drivers (mostly embedded / system-on-chip)
702#
703CONFIG_I2C_IBM_IIC=y
704# CONFIG_I2C_MPC is not set
705# CONFIG_I2C_OCORES is not set
706# CONFIG_I2C_SIMTEC is not set
707
708#
709# External I2C/SMBus adapter drivers
710#
711# CONFIG_I2C_PARPORT_LIGHT is not set
712# CONFIG_I2C_TAOS_EVM is not set
713# CONFIG_I2C_TINY_USB is not set
714
715#
716# Graphics adapter I2C/DDC channel drivers
717#
688# CONFIG_I2C_VOODOO3 is not set 718# CONFIG_I2C_VOODOO3 is not set
719
720#
721# Other I2C/SMBus bus drivers
722#
689# CONFIG_I2C_PCA_PLATFORM is not set 723# CONFIG_I2C_PCA_PLATFORM is not set
724# CONFIG_I2C_STUB is not set
690 725
691# 726#
692# Miscellaneous I2C Chip support 727# Miscellaneous I2C Chip support
693# 728#
694# CONFIG_DS1682 is not set 729# CONFIG_DS1682 is not set
730# CONFIG_AT24 is not set
695# CONFIG_SENSORS_EEPROM is not set 731# CONFIG_SENSORS_EEPROM is not set
696# CONFIG_SENSORS_PCF8574 is not set 732# CONFIG_SENSORS_PCF8574 is not set
697# CONFIG_PCF8575 is not set 733# CONFIG_PCF8575 is not set
734# CONFIG_SENSORS_PCA9539 is not set
698# CONFIG_SENSORS_PCF8591 is not set 735# CONFIG_SENSORS_PCF8591 is not set
699# CONFIG_SENSORS_MAX6875 is not set 736# CONFIG_SENSORS_MAX6875 is not set
700# CONFIG_SENSORS_TSL2550 is not set 737# CONFIG_SENSORS_TSL2550 is not set
@@ -703,10 +740,13 @@ CONFIG_I2C_IBM_IIC=y
703# CONFIG_I2C_DEBUG_BUS is not set 740# CONFIG_I2C_DEBUG_BUS is not set
704# CONFIG_I2C_DEBUG_CHIP is not set 741# CONFIG_I2C_DEBUG_CHIP is not set
705# CONFIG_SPI is not set 742# CONFIG_SPI is not set
743CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
744# CONFIG_GPIOLIB is not set
706# CONFIG_W1 is not set 745# CONFIG_W1 is not set
707# CONFIG_POWER_SUPPLY is not set 746# CONFIG_POWER_SUPPLY is not set
708# CONFIG_HWMON is not set 747# CONFIG_HWMON is not set
709# CONFIG_THERMAL is not set 748# CONFIG_THERMAL is not set
749# CONFIG_THERMAL_HWMON is not set
710# CONFIG_WATCHDOG is not set 750# CONFIG_WATCHDOG is not set
711 751
712# 752#
@@ -718,6 +758,7 @@ CONFIG_SSB_POSSIBLE=y
718# 758#
719# Multifunction device drivers 759# Multifunction device drivers
720# 760#
761# CONFIG_MFD_CORE is not set
721# CONFIG_MFD_SM501 is not set 762# CONFIG_MFD_SM501 is not set
722# CONFIG_HTC_PASIC3 is not set 763# CONFIG_HTC_PASIC3 is not set
723 764
@@ -730,6 +771,7 @@ CONFIG_SSB_POSSIBLE=y
730# 771#
731# CONFIG_VIDEO_DEV is not set 772# CONFIG_VIDEO_DEV is not set
732# CONFIG_DVB_CORE is not set 773# CONFIG_DVB_CORE is not set
774# CONFIG_VIDEO_MEDIA is not set
733 775
734# 776#
735# Multimedia drivers 777# Multimedia drivers
@@ -755,7 +797,6 @@ CONFIG_FB_CFB_IMAGEBLIT=y
755# CONFIG_FB_SYS_IMAGEBLIT is not set 797# CONFIG_FB_SYS_IMAGEBLIT is not set
756# CONFIG_FB_FOREIGN_ENDIAN is not set 798# CONFIG_FB_FOREIGN_ENDIAN is not set
757# CONFIG_FB_SYS_FOPS is not set 799# CONFIG_FB_SYS_FOPS is not set
758CONFIG_FB_DEFERRED_IO=y
759# CONFIG_FB_SVGALIB is not set 800# CONFIG_FB_SVGALIB is not set
760CONFIG_FB_MACMODES=y 801CONFIG_FB_MACMODES=y
761CONFIG_FB_BACKLIGHT=y 802CONFIG_FB_BACKLIGHT=y
@@ -795,10 +836,13 @@ CONFIG_FB_RADEON_BACKLIGHT=y
795# CONFIG_FB_TRIDENT is not set 836# CONFIG_FB_TRIDENT is not set
796# CONFIG_FB_ARK is not set 837# CONFIG_FB_ARK is not set
797# CONFIG_FB_PM3 is not set 838# CONFIG_FB_PM3 is not set
839# CONFIG_FB_CARMINE is not set
798# CONFIG_FB_IBM_GXT4500 is not set 840# CONFIG_FB_IBM_GXT4500 is not set
799# CONFIG_FB_VIRTUAL is not set 841# CONFIG_FB_VIRTUAL is not set
800CONFIG_BACKLIGHT_LCD_SUPPORT=y 842CONFIG_BACKLIGHT_LCD_SUPPORT=y
801CONFIG_LCD_CLASS_DEVICE=y 843CONFIG_LCD_CLASS_DEVICE=y
844# CONFIG_LCD_ILI9320 is not set
845# CONFIG_LCD_PLATFORM is not set
802CONFIG_BACKLIGHT_CLASS_DEVICE=y 846CONFIG_BACKLIGHT_CLASS_DEVICE=y
803# CONFIG_BACKLIGHT_CORGI is not set 847# CONFIG_BACKLIGHT_CORGI is not set
804 848
@@ -821,10 +865,6 @@ CONFIG_LOGO=y
821CONFIG_LOGO_LINUX_MONO=y 865CONFIG_LOGO_LINUX_MONO=y
822CONFIG_LOGO_LINUX_VGA16=y 866CONFIG_LOGO_LINUX_VGA16=y
823CONFIG_LOGO_LINUX_CLUT224=y 867CONFIG_LOGO_LINUX_CLUT224=y
824
825#
826# Sound
827#
828# CONFIG_SOUND is not set 868# CONFIG_SOUND is not set
829CONFIG_HID_SUPPORT=y 869CONFIG_HID_SUPPORT=y
830CONFIG_HID=y 870CONFIG_HID=y
@@ -859,11 +899,13 @@ CONFIG_USB_DEVICEFS=y
859# 899#
860# USB Host Controller Drivers 900# USB Host Controller Drivers
861# 901#
902# CONFIG_USB_C67X00_HCD is not set
862CONFIG_USB_EHCI_HCD=m 903CONFIG_USB_EHCI_HCD=m
863# CONFIG_USB_EHCI_ROOT_HUB_TT is not set 904# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
864# CONFIG_USB_EHCI_TT_NEWSCHED is not set 905# CONFIG_USB_EHCI_TT_NEWSCHED is not set
865CONFIG_USB_EHCI_HCD_PPC_OF=y 906CONFIG_USB_EHCI_HCD_PPC_OF=y
866# CONFIG_USB_ISP116X_HCD is not set 907# CONFIG_USB_ISP116X_HCD is not set
908# CONFIG_USB_ISP1760_HCD is not set
867CONFIG_USB_OHCI_HCD=y 909CONFIG_USB_OHCI_HCD=y
868CONFIG_USB_OHCI_HCD_PPC_OF=y 910CONFIG_USB_OHCI_HCD_PPC_OF=y
869CONFIG_USB_OHCI_HCD_PPC_OF_BE=y 911CONFIG_USB_OHCI_HCD_PPC_OF_BE=y
@@ -881,6 +923,7 @@ CONFIG_USB_OHCI_LITTLE_ENDIAN=y
881# 923#
882# CONFIG_USB_ACM is not set 924# CONFIG_USB_ACM is not set
883# CONFIG_USB_PRINTER is not set 925# CONFIG_USB_PRINTER is not set
926# CONFIG_USB_WDM is not set
884 927
885# 928#
886# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 929# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
@@ -900,6 +943,7 @@ CONFIG_USB_STORAGE=m
900# CONFIG_USB_STORAGE_SDDR55 is not set 943# CONFIG_USB_STORAGE_SDDR55 is not set
901# CONFIG_USB_STORAGE_JUMPSHOT is not set 944# CONFIG_USB_STORAGE_JUMPSHOT is not set
902# CONFIG_USB_STORAGE_ALAUDA is not set 945# CONFIG_USB_STORAGE_ALAUDA is not set
946# CONFIG_USB_STORAGE_ONETOUCH is not set
903# CONFIG_USB_STORAGE_KARMA is not set 947# CONFIG_USB_STORAGE_KARMA is not set
904# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set 948# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
905# CONFIG_USB_LIBUSUAL is not set 949# CONFIG_USB_LIBUSUAL is not set
@@ -939,6 +983,7 @@ CONFIG_USB_STORAGE=m
939# CONFIG_USB_TRANCEVIBRATOR is not set 983# CONFIG_USB_TRANCEVIBRATOR is not set
940# CONFIG_USB_IOWARRIOR is not set 984# CONFIG_USB_IOWARRIOR is not set
941# CONFIG_USB_TEST is not set 985# CONFIG_USB_TEST is not set
986# CONFIG_USB_ISIGHTFW is not set
942# CONFIG_USB_GADGET is not set 987# CONFIG_USB_GADGET is not set
943# CONFIG_MMC is not set 988# CONFIG_MMC is not set
944# CONFIG_MEMSTICK is not set 989# CONFIG_MEMSTICK is not set
@@ -976,6 +1021,7 @@ CONFIG_RTC_INTF_DEV=y
976CONFIG_RTC_DRV_M41T80=y 1021CONFIG_RTC_DRV_M41T80=y
977CONFIG_RTC_DRV_M41T80_WDT=y 1022CONFIG_RTC_DRV_M41T80_WDT=y
978# CONFIG_RTC_DRV_S35390A is not set 1023# CONFIG_RTC_DRV_S35390A is not set
1024# CONFIG_RTC_DRV_FM3130 is not set
979 1025
980# 1026#
981# SPI RTC drivers 1027# SPI RTC drivers
@@ -996,6 +1042,7 @@ CONFIG_RTC_DRV_M41T80_WDT=y
996# 1042#
997# on-CPU RTC drivers 1043# on-CPU RTC drivers
998# 1044#
1045# CONFIG_RTC_DRV_PPC is not set
999# CONFIG_DMADEVICES is not set 1046# CONFIG_DMADEVICES is not set
1000# CONFIG_UIO is not set 1047# CONFIG_UIO is not set
1001 1048
@@ -1074,6 +1121,7 @@ CONFIG_AFFS_FS=m
1074# CONFIG_CRAMFS is not set 1121# CONFIG_CRAMFS is not set
1075# CONFIG_VXFS_FS is not set 1122# CONFIG_VXFS_FS is not set
1076# CONFIG_MINIX_FS is not set 1123# CONFIG_MINIX_FS is not set
1124# CONFIG_OMFS_FS is not set
1077# CONFIG_HPFS_FS is not set 1125# CONFIG_HPFS_FS is not set
1078# CONFIG_QNX4FS_FS is not set 1126# CONFIG_QNX4FS_FS is not set
1079# CONFIG_ROMFS_FS is not set 1127# CONFIG_ROMFS_FS is not set
@@ -1151,6 +1199,7 @@ CONFIG_BITREVERSE=y
1151# CONFIG_GENERIC_FIND_FIRST_BIT is not set 1199# CONFIG_GENERIC_FIND_FIRST_BIT is not set
1152# CONFIG_CRC_CCITT is not set 1200# CONFIG_CRC_CCITT is not set
1153# CONFIG_CRC16 is not set 1201# CONFIG_CRC16 is not set
1202CONFIG_CRC_T10DIF=y
1154CONFIG_CRC_ITU_T=y 1203CONFIG_CRC_ITU_T=y
1155CONFIG_CRC32=y 1204CONFIG_CRC32=y
1156# CONFIG_CRC7 is not set 1205# CONFIG_CRC7 is not set
@@ -1177,7 +1226,15 @@ CONFIG_MAGIC_SYSRQ=y
1177# CONFIG_SLUB_DEBUG_ON is not set 1226# CONFIG_SLUB_DEBUG_ON is not set
1178# CONFIG_SLUB_STATS is not set 1227# CONFIG_SLUB_STATS is not set
1179# CONFIG_DEBUG_BUGVERBOSE is not set 1228# CONFIG_DEBUG_BUGVERBOSE is not set
1229# CONFIG_DEBUG_MEMORY_INIT is not set
1230# CONFIG_LATENCYTOP is not set
1231CONFIG_HAVE_FTRACE=y
1232CONFIG_HAVE_DYNAMIC_FTRACE=y
1233# CONFIG_FTRACE is not set
1234# CONFIG_SCHED_TRACER is not set
1235# CONFIG_CONTEXT_SWITCH_TRACER is not set
1180# CONFIG_SAMPLES is not set 1236# CONFIG_SAMPLES is not set
1237CONFIG_HAVE_ARCH_KGDB=y
1181# CONFIG_IRQSTACKS is not set 1238# CONFIG_IRQSTACKS is not set
1182# CONFIG_PPC_EARLY_DEBUG is not set 1239# CONFIG_PPC_EARLY_DEBUG is not set
1183 1240
diff --git a/arch/powerpc/configs/44x/sequoia_defconfig b/arch/powerpc/configs/44x/sequoia_defconfig
index dd5d6303c396..e40b1023265c 100644
--- a/arch/powerpc/configs/44x/sequoia_defconfig
+++ b/arch/powerpc/configs/44x/sequoia_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.25-rc2 3# Linux kernel version: 2.6.27-rc1
4# Fri Feb 15 21:53:46 2008 4# Tue Aug 5 09:15:13 2008
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
@@ -30,8 +30,12 @@ CONFIG_GENERIC_TIME=y
30CONFIG_GENERIC_TIME_VSYSCALL=y 30CONFIG_GENERIC_TIME_VSYSCALL=y
31CONFIG_GENERIC_CLOCKEVENTS=y 31CONFIG_GENERIC_CLOCKEVENTS=y
32CONFIG_GENERIC_HARDIRQS=y 32CONFIG_GENERIC_HARDIRQS=y
33# CONFIG_HAVE_GET_USER_PAGES_FAST is not set
33# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 34# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
34CONFIG_IRQ_PER_CPU=y 35CONFIG_IRQ_PER_CPU=y
36CONFIG_STACKTRACE_SUPPORT=y
37CONFIG_HAVE_LATENCYTOP_SUPPORT=y
38CONFIG_LOCKDEP_SUPPORT=y
35CONFIG_RWSEM_XCHGADD_ALGORITHM=y 39CONFIG_RWSEM_XCHGADD_ALGORITHM=y
36CONFIG_ARCH_HAS_ILOG2_U32=y 40CONFIG_ARCH_HAS_ILOG2_U32=y
37CONFIG_GENERIC_HWEIGHT=y 41CONFIG_GENERIC_HWEIGHT=y
@@ -79,6 +83,7 @@ CONFIG_GROUP_SCHED=y
79CONFIG_USER_SCHED=y 83CONFIG_USER_SCHED=y
80# CONFIG_CGROUP_SCHED is not set 84# CONFIG_CGROUP_SCHED is not set
81CONFIG_SYSFS_DEPRECATED=y 85CONFIG_SYSFS_DEPRECATED=y
86CONFIG_SYSFS_DEPRECATED_V2=y
82# CONFIG_RELAY is not set 87# CONFIG_RELAY is not set
83# CONFIG_NAMESPACES is not set 88# CONFIG_NAMESPACES is not set
84CONFIG_BLK_DEV_INITRD=y 89CONFIG_BLK_DEV_INITRD=y
@@ -87,6 +92,7 @@ CONFIG_INITRAMFS_SOURCE=""
87CONFIG_SYSCTL=y 92CONFIG_SYSCTL=y
88CONFIG_EMBEDDED=y 93CONFIG_EMBEDDED=y
89CONFIG_SYSCTL_SYSCALL=y 94CONFIG_SYSCTL_SYSCALL=y
95CONFIG_SYSCTL_SYSCALL_CHECK=y
90CONFIG_KALLSYMS=y 96CONFIG_KALLSYMS=y
91# CONFIG_KALLSYMS_ALL is not set 97# CONFIG_KALLSYMS_ALL is not set
92# CONFIG_KALLSYMS_EXTRA_PASS is not set 98# CONFIG_KALLSYMS_EXTRA_PASS is not set
@@ -112,13 +118,22 @@ CONFIG_SLUB=y
112# CONFIG_MARKERS is not set 118# CONFIG_MARKERS is not set
113CONFIG_HAVE_OPROFILE=y 119CONFIG_HAVE_OPROFILE=y
114# CONFIG_KPROBES is not set 120# CONFIG_KPROBES is not set
121CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y
122CONFIG_HAVE_IOREMAP_PROT=y
115CONFIG_HAVE_KPROBES=y 123CONFIG_HAVE_KPROBES=y
124CONFIG_HAVE_KRETPROBES=y
125CONFIG_HAVE_ARCH_TRACEHOOK=y
126# CONFIG_HAVE_DMA_ATTRS is not set
127# CONFIG_USE_GENERIC_SMP_HELPERS is not set
128# CONFIG_HAVE_CLK is not set
116CONFIG_PROC_PAGE_MONITOR=y 129CONFIG_PROC_PAGE_MONITOR=y
130# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
117CONFIG_SLABINFO=y 131CONFIG_SLABINFO=y
118CONFIG_RT_MUTEXES=y 132CONFIG_RT_MUTEXES=y
119# CONFIG_TINY_SHMEM is not set 133# CONFIG_TINY_SHMEM is not set
120CONFIG_BASE_SMALL=0 134CONFIG_BASE_SMALL=0
121CONFIG_MODULES=y 135CONFIG_MODULES=y
136# CONFIG_MODULE_FORCE_LOAD is not set
122CONFIG_MODULE_UNLOAD=y 137CONFIG_MODULE_UNLOAD=y
123# CONFIG_MODULE_FORCE_UNLOAD is not set 138# CONFIG_MODULE_FORCE_UNLOAD is not set
124# CONFIG_MODVERSIONS is not set 139# CONFIG_MODVERSIONS is not set
@@ -129,6 +144,7 @@ CONFIG_LBD=y
129# CONFIG_BLK_DEV_IO_TRACE is not set 144# CONFIG_BLK_DEV_IO_TRACE is not set
130# CONFIG_LSF is not set 145# CONFIG_LSF is not set
131# CONFIG_BLK_DEV_BSG is not set 146# CONFIG_BLK_DEV_BSG is not set
147# CONFIG_BLK_DEV_INTEGRITY is not set
132 148
133# 149#
134# IO Schedulers 150# IO Schedulers
@@ -143,24 +159,25 @@ CONFIG_DEFAULT_AS=y
143# CONFIG_DEFAULT_NOOP is not set 159# CONFIG_DEFAULT_NOOP is not set
144CONFIG_DEFAULT_IOSCHED="anticipatory" 160CONFIG_DEFAULT_IOSCHED="anticipatory"
145CONFIG_CLASSIC_RCU=y 161CONFIG_CLASSIC_RCU=y
146# CONFIG_PREEMPT_RCU is not set
147# CONFIG_PPC4xx_PCI_EXPRESS is not set 162# CONFIG_PPC4xx_PCI_EXPRESS is not set
148 163
149# 164#
150# Platform support 165# Platform support
151# 166#
152# CONFIG_PPC_MPC512x is not set
153# CONFIG_PPC_MPC5121 is not set
154# CONFIG_PPC_CELL is not set 167# CONFIG_PPC_CELL is not set
155# CONFIG_PPC_CELL_NATIVE is not set 168# CONFIG_PPC_CELL_NATIVE is not set
156# CONFIG_PQ2ADS is not set 169# CONFIG_PQ2ADS is not set
157# CONFIG_BAMBOO is not set 170# CONFIG_BAMBOO is not set
158# CONFIG_EBONY is not set 171# CONFIG_EBONY is not set
172# CONFIG_SAM440EP is not set
159CONFIG_SEQUOIA=y 173CONFIG_SEQUOIA=y
160# CONFIG_TAISHAN is not set 174# CONFIG_TAISHAN is not set
161# CONFIG_KATMAI is not set 175# CONFIG_KATMAI is not set
162# CONFIG_RAINIER is not set 176# CONFIG_RAINIER is not set
163# CONFIG_WARP is not set 177# CONFIG_WARP is not set
178# CONFIG_CANYONLANDS is not set
179# CONFIG_YOSEMITE is not set
180# CONFIG_XILINX_VIRTEX440_GENERIC_BOARD is not set
164CONFIG_440EPX=y 181CONFIG_440EPX=y
165# CONFIG_IPIC is not set 182# CONFIG_IPIC is not set
166# CONFIG_MPIC is not set 183# CONFIG_MPIC is not set
@@ -192,7 +209,6 @@ CONFIG_HZ=250
192CONFIG_PREEMPT_NONE=y 209CONFIG_PREEMPT_NONE=y
193# CONFIG_PREEMPT_VOLUNTARY is not set 210# CONFIG_PREEMPT_VOLUNTARY is not set
194# CONFIG_PREEMPT is not set 211# CONFIG_PREEMPT is not set
195CONFIG_RCU_TRACE=y
196CONFIG_BINFMT_ELF=y 212CONFIG_BINFMT_ELF=y
197# CONFIG_BINFMT_MISC is not set 213# CONFIG_BINFMT_MISC is not set
198# CONFIG_MATH_EMULATION is not set 214# CONFIG_MATH_EMULATION is not set
@@ -210,14 +226,18 @@ CONFIG_FLATMEM=y
210CONFIG_FLAT_NODE_MEM_MAP=y 226CONFIG_FLAT_NODE_MEM_MAP=y
211# CONFIG_SPARSEMEM_STATIC is not set 227# CONFIG_SPARSEMEM_STATIC is not set
212# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set 228# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
229CONFIG_PAGEFLAGS_EXTENDED=y
213CONFIG_SPLIT_PTLOCK_CPUS=4 230CONFIG_SPLIT_PTLOCK_CPUS=4
231CONFIG_MIGRATION=y
214CONFIG_RESOURCES_64BIT=y 232CONFIG_RESOURCES_64BIT=y
215CONFIG_ZONE_DMA_FLAG=1 233CONFIG_ZONE_DMA_FLAG=1
216CONFIG_BOUNCE=y 234CONFIG_BOUNCE=y
217CONFIG_VIRT_TO_BUS=y 235CONFIG_VIRT_TO_BUS=y
236CONFIG_FORCE_MAX_ZONEORDER=11
218CONFIG_PROC_DEVICETREE=y 237CONFIG_PROC_DEVICETREE=y
219CONFIG_CMDLINE_BOOL=y 238CONFIG_CMDLINE_BOOL=y
220CONFIG_CMDLINE="" 239CONFIG_CMDLINE=""
240CONFIG_EXTRA_TARGETS=""
221CONFIG_SECCOMP=y 241CONFIG_SECCOMP=y
222CONFIG_ISA_DMA_API=y 242CONFIG_ISA_DMA_API=y
223 243
@@ -226,6 +246,8 @@ CONFIG_ISA_DMA_API=y
226# 246#
227CONFIG_ZONE_DMA=y 247CONFIG_ZONE_DMA=y
228CONFIG_PPC_INDIRECT_PCI=y 248CONFIG_PPC_INDIRECT_PCI=y
249CONFIG_4xx_SOC=y
250CONFIG_PPC_PCI_CHOICE=y
229CONFIG_PCI=y 251CONFIG_PCI=y
230CONFIG_PCI_DOMAINS=y 252CONFIG_PCI_DOMAINS=y
231CONFIG_PCI_SYSCALL=y 253CONFIG_PCI_SYSCALL=y
@@ -236,6 +258,7 @@ CONFIG_PCI_LEGACY=y
236# CONFIG_PCI_DEBUG is not set 258# CONFIG_PCI_DEBUG is not set
237# CONFIG_PCCARD is not set 259# CONFIG_PCCARD is not set
238# CONFIG_HOTPLUG_PCI is not set 260# CONFIG_HOTPLUG_PCI is not set
261# CONFIG_HAS_RAPIDIO is not set
239 262
240# 263#
241# Advanced setup 264# Advanced setup
@@ -245,17 +268,13 @@ CONFIG_PCI_LEGACY=y
245# 268#
246# Default settings for advanced configuration options are used 269# Default settings for advanced configuration options are used
247# 270#
248CONFIG_HIGHMEM_START=0xfe000000
249CONFIG_LOWMEM_SIZE=0x30000000 271CONFIG_LOWMEM_SIZE=0x30000000
272CONFIG_PAGE_OFFSET=0xc0000000
250CONFIG_KERNEL_START=0xc0000000 273CONFIG_KERNEL_START=0xc0000000
274CONFIG_PHYSICAL_START=0x00000000
251CONFIG_TASK_SIZE=0xc0000000 275CONFIG_TASK_SIZE=0xc0000000
252CONFIG_CONSISTENT_START=0xff100000 276CONFIG_CONSISTENT_START=0xff100000
253CONFIG_CONSISTENT_SIZE=0x00200000 277CONFIG_CONSISTENT_SIZE=0x00200000
254CONFIG_BOOT_LOAD=0x01000000
255
256#
257# Networking
258#
259CONFIG_NET=y 278CONFIG_NET=y
260 279
261# 280#
@@ -293,8 +312,6 @@ CONFIG_TCP_CONG_CUBIC=y
293CONFIG_DEFAULT_TCP_CONG="cubic" 312CONFIG_DEFAULT_TCP_CONG="cubic"
294# CONFIG_TCP_MD5SIG is not set 313# CONFIG_TCP_MD5SIG is not set
295# CONFIG_IPV6 is not set 314# CONFIG_IPV6 is not set
296# CONFIG_INET6_XFRM_TUNNEL is not set
297# CONFIG_INET6_TUNNEL is not set
298# CONFIG_NETWORK_SECMARK is not set 315# CONFIG_NETWORK_SECMARK is not set
299# CONFIG_NETFILTER is not set 316# CONFIG_NETFILTER is not set
300# CONFIG_IP_DCCP is not set 317# CONFIG_IP_DCCP is not set
@@ -344,6 +361,8 @@ CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
344CONFIG_STANDALONE=y 361CONFIG_STANDALONE=y
345CONFIG_PREVENT_FIRMWARE_BUILD=y 362CONFIG_PREVENT_FIRMWARE_BUILD=y
346CONFIG_FW_LOADER=y 363CONFIG_FW_LOADER=y
364CONFIG_FIRMWARE_IN_KERNEL=y
365CONFIG_EXTRA_FIRMWARE=""
347# CONFIG_DEBUG_DRIVER is not set 366# CONFIG_DEBUG_DRIVER is not set
348# CONFIG_DEBUG_DEVRES is not set 367# CONFIG_DEBUG_DEVRES is not set
349# CONFIG_SYS_HYPERVISOR is not set 368# CONFIG_SYS_HYPERVISOR is not set
@@ -356,6 +375,7 @@ CONFIG_MTD_PARTITIONS=y
356# CONFIG_MTD_REDBOOT_PARTS is not set 375# CONFIG_MTD_REDBOOT_PARTS is not set
357CONFIG_MTD_CMDLINE_PARTS=y 376CONFIG_MTD_CMDLINE_PARTS=y
358CONFIG_MTD_OF_PARTS=y 377CONFIG_MTD_OF_PARTS=y
378# CONFIG_MTD_AR7_PARTS is not set
359 379
360# 380#
361# User Modules And Translation Layers 381# User Modules And Translation Layers
@@ -446,12 +466,14 @@ CONFIG_BLK_DEV_RAM_SIZE=35000
446# CONFIG_CDROM_PKTCDVD is not set 466# CONFIG_CDROM_PKTCDVD is not set
447# CONFIG_ATA_OVER_ETH is not set 467# CONFIG_ATA_OVER_ETH is not set
448# CONFIG_XILINX_SYSACE is not set 468# CONFIG_XILINX_SYSACE is not set
469# CONFIG_BLK_DEV_HD is not set
449CONFIG_MISC_DEVICES=y 470CONFIG_MISC_DEVICES=y
450# CONFIG_PHANTOM is not set 471# CONFIG_PHANTOM is not set
451# CONFIG_EEPROM_93CX6 is not set 472# CONFIG_EEPROM_93CX6 is not set
452# CONFIG_SGI_IOC4 is not set 473# CONFIG_SGI_IOC4 is not set
453# CONFIG_TIFM_CORE is not set 474# CONFIG_TIFM_CORE is not set
454# CONFIG_ENCLOSURE_SERVICES is not set 475# CONFIG_ENCLOSURE_SERVICES is not set
476# CONFIG_HP_ILO is not set
455CONFIG_HAVE_IDE=y 477CONFIG_HAVE_IDE=y
456# CONFIG_IDE is not set 478# CONFIG_IDE is not set
457 479
@@ -469,12 +491,15 @@ CONFIG_HAVE_IDE=y
469# 491#
470# IEEE 1394 (FireWire) support 492# IEEE 1394 (FireWire) support
471# 493#
494
495#
496# Enable only one of the two stacks, unless you know what you are doing
497#
472# CONFIG_FIREWIRE is not set 498# CONFIG_FIREWIRE is not set
473# CONFIG_IEEE1394 is not set 499# CONFIG_IEEE1394 is not set
474# CONFIG_I2O is not set 500# CONFIG_I2O is not set
475# CONFIG_MACINTOSH_DRIVERS is not set 501# CONFIG_MACINTOSH_DRIVERS is not set
476CONFIG_NETDEVICES=y 502CONFIG_NETDEVICES=y
477# CONFIG_NETDEVICES_MULTIQUEUE is not set
478# CONFIG_DUMMY is not set 503# CONFIG_DUMMY is not set
479# CONFIG_BONDING is not set 504# CONFIG_BONDING is not set
480# CONFIG_MACVLAN is not set 505# CONFIG_MACVLAN is not set
@@ -509,7 +534,6 @@ CONFIG_NETDEV_1000=y
509# CONFIG_DL2K is not set 534# CONFIG_DL2K is not set
510# CONFIG_E1000 is not set 535# CONFIG_E1000 is not set
511# CONFIG_E1000E is not set 536# CONFIG_E1000E is not set
512# CONFIG_E1000E_ENABLED is not set
513# CONFIG_IP1000 is not set 537# CONFIG_IP1000 is not set
514# CONFIG_IGB is not set 538# CONFIG_IGB is not set
515# CONFIG_NS83820 is not set 539# CONFIG_NS83820 is not set
@@ -519,12 +543,12 @@ CONFIG_NETDEV_1000=y
519# CONFIG_SIS190 is not set 543# CONFIG_SIS190 is not set
520# CONFIG_SKGE is not set 544# CONFIG_SKGE is not set
521# CONFIG_SKY2 is not set 545# CONFIG_SKY2 is not set
522# CONFIG_SK98LIN is not set
523# CONFIG_VIA_VELOCITY is not set 546# CONFIG_VIA_VELOCITY is not set
524# CONFIG_TIGON3 is not set 547# CONFIG_TIGON3 is not set
525# CONFIG_BNX2 is not set 548# CONFIG_BNX2 is not set
526# CONFIG_QLA3XXX is not set 549# CONFIG_QLA3XXX is not set
527# CONFIG_ATL1 is not set 550# CONFIG_ATL1 is not set
551# CONFIG_ATL1E is not set
528CONFIG_NETDEV_10000=y 552CONFIG_NETDEV_10000=y
529# CONFIG_CHELSIO_T1 is not set 553# CONFIG_CHELSIO_T1 is not set
530# CONFIG_CHELSIO_T3 is not set 554# CONFIG_CHELSIO_T3 is not set
@@ -537,6 +561,7 @@ CONFIG_NETDEV_10000=y
537# CONFIG_MLX4_CORE is not set 561# CONFIG_MLX4_CORE is not set
538# CONFIG_TEHUTI is not set 562# CONFIG_TEHUTI is not set
539# CONFIG_BNX2X is not set 563# CONFIG_BNX2X is not set
564# CONFIG_SFC is not set
540# CONFIG_TR is not set 565# CONFIG_TR is not set
541 566
542# 567#
@@ -544,6 +569,7 @@ CONFIG_NETDEV_10000=y
544# 569#
545# CONFIG_WLAN_PRE80211 is not set 570# CONFIG_WLAN_PRE80211 is not set
546# CONFIG_WLAN_80211 is not set 571# CONFIG_WLAN_80211 is not set
572# CONFIG_IWLWIFI_LEDS is not set
547# CONFIG_WAN is not set 573# CONFIG_WAN is not set
548# CONFIG_FDDI is not set 574# CONFIG_FDDI is not set
549# CONFIG_HIPPI is not set 575# CONFIG_HIPPI is not set
@@ -570,6 +596,7 @@ CONFIG_NETDEV_10000=y
570# Character devices 596# Character devices
571# 597#
572# CONFIG_VT is not set 598# CONFIG_VT is not set
599CONFIG_DEVKMEM=y
573# CONFIG_SERIAL_NONSTANDARD is not set 600# CONFIG_SERIAL_NONSTANDARD is not set
574# CONFIG_NOZOMI is not set 601# CONFIG_NOZOMI is not set
575 602
@@ -608,12 +635,9 @@ CONFIG_LEGACY_PTY_COUNT=256
608# CONFIG_TCG_TPM is not set 635# CONFIG_TCG_TPM is not set
609CONFIG_DEVPORT=y 636CONFIG_DEVPORT=y
610# CONFIG_I2C is not set 637# CONFIG_I2C is not set
611
612#
613# SPI support
614#
615# CONFIG_SPI is not set 638# CONFIG_SPI is not set
616# CONFIG_SPI_MASTER is not set 639CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
640# CONFIG_GPIOLIB is not set
617# CONFIG_W1 is not set 641# CONFIG_W1 is not set
618# CONFIG_POWER_SUPPLY is not set 642# CONFIG_POWER_SUPPLY is not set
619# CONFIG_HWMON is not set 643# CONFIG_HWMON is not set
@@ -629,13 +653,24 @@ CONFIG_SSB_POSSIBLE=y
629# 653#
630# Multifunction device drivers 654# Multifunction device drivers
631# 655#
656# CONFIG_MFD_CORE is not set
632# CONFIG_MFD_SM501 is not set 657# CONFIG_MFD_SM501 is not set
658# CONFIG_HTC_PASIC3 is not set
633 659
634# 660#
635# Multimedia devices 661# Multimedia devices
636# 662#
663
664#
665# Multimedia core support
666#
637# CONFIG_VIDEO_DEV is not set 667# CONFIG_VIDEO_DEV is not set
638# CONFIG_DVB_CORE is not set 668# CONFIG_DVB_CORE is not set
669# CONFIG_VIDEO_MEDIA is not set
670
671#
672# Multimedia drivers
673#
639CONFIG_DAB=y 674CONFIG_DAB=y
640 675
641# 676#
@@ -652,16 +687,14 @@ CONFIG_VIDEO_OUTPUT_CONTROL=m
652# Display device support 687# Display device support
653# 688#
654# CONFIG_DISPLAY_SUPPORT is not set 689# CONFIG_DISPLAY_SUPPORT is not set
655
656#
657# Sound
658#
659# CONFIG_SOUND is not set 690# CONFIG_SOUND is not set
660CONFIG_USB_SUPPORT=y 691CONFIG_USB_SUPPORT=y
661CONFIG_USB_ARCH_HAS_HCD=y 692CONFIG_USB_ARCH_HAS_HCD=y
662CONFIG_USB_ARCH_HAS_OHCI=y 693CONFIG_USB_ARCH_HAS_OHCI=y
663CONFIG_USB_ARCH_HAS_EHCI=y 694CONFIG_USB_ARCH_HAS_EHCI=y
664# CONFIG_USB is not set 695# CONFIG_USB is not set
696# CONFIG_USB_OTG_WHITELIST is not set
697# CONFIG_USB_OTG_BLACKLIST_HUB is not set
665 698
666# 699#
667# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 700# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
@@ -670,13 +703,11 @@ CONFIG_USB_ARCH_HAS_EHCI=y
670# CONFIG_MMC is not set 703# CONFIG_MMC is not set
671# CONFIG_MEMSTICK is not set 704# CONFIG_MEMSTICK is not set
672# CONFIG_NEW_LEDS is not set 705# CONFIG_NEW_LEDS is not set
706# CONFIG_ACCESSIBILITY is not set
673# CONFIG_INFINIBAND is not set 707# CONFIG_INFINIBAND is not set
674# CONFIG_EDAC is not set 708# CONFIG_EDAC is not set
675# CONFIG_RTC_CLASS is not set 709# CONFIG_RTC_CLASS is not set
676 710# CONFIG_DMADEVICES is not set
677#
678# Userspace I/O
679#
680# CONFIG_UIO is not set 711# CONFIG_UIO is not set
681 712
682# 713#
@@ -691,7 +722,6 @@ CONFIG_EXT2_FS=y
691# CONFIG_JFS_FS is not set 722# CONFIG_JFS_FS is not set
692# CONFIG_FS_POSIX_ACL is not set 723# CONFIG_FS_POSIX_ACL is not set
693# CONFIG_XFS_FS is not set 724# CONFIG_XFS_FS is not set
694# CONFIG_GFS2_FS is not set
695# CONFIG_OCFS2_FS is not set 725# CONFIG_OCFS2_FS is not set
696CONFIG_DNOTIFY=y 726CONFIG_DNOTIFY=y
697CONFIG_INOTIFY=y 727CONFIG_INOTIFY=y
@@ -750,6 +780,7 @@ CONFIG_JFFS2_RTIME=y
750CONFIG_CRAMFS=y 780CONFIG_CRAMFS=y
751# CONFIG_VXFS_FS is not set 781# CONFIG_VXFS_FS is not set
752# CONFIG_MINIX_FS is not set 782# CONFIG_MINIX_FS is not set
783# CONFIG_OMFS_FS is not set
753# CONFIG_HPFS_FS is not set 784# CONFIG_HPFS_FS is not set
754# CONFIG_QNX4FS_FS is not set 785# CONFIG_QNX4FS_FS is not set
755# CONFIG_ROMFS_FS is not set 786# CONFIG_ROMFS_FS is not set
@@ -760,14 +791,12 @@ CONFIG_NFS_FS=y
760CONFIG_NFS_V3=y 791CONFIG_NFS_V3=y
761# CONFIG_NFS_V3_ACL is not set 792# CONFIG_NFS_V3_ACL is not set
762# CONFIG_NFS_V4 is not set 793# CONFIG_NFS_V4 is not set
763# CONFIG_NFS_DIRECTIO is not set
764# CONFIG_NFSD is not set
765CONFIG_ROOT_NFS=y 794CONFIG_ROOT_NFS=y
795# CONFIG_NFSD is not set
766CONFIG_LOCKD=y 796CONFIG_LOCKD=y
767CONFIG_LOCKD_V4=y 797CONFIG_LOCKD_V4=y
768CONFIG_NFS_COMMON=y 798CONFIG_NFS_COMMON=y
769CONFIG_SUNRPC=y 799CONFIG_SUNRPC=y
770# CONFIG_SUNRPC_BIND34 is not set
771# CONFIG_RPCSEC_GSS_KRB5 is not set 800# CONFIG_RPCSEC_GSS_KRB5 is not set
772# CONFIG_RPCSEC_GSS_SPKM3 is not set 801# CONFIG_RPCSEC_GSS_SPKM3 is not set
773# CONFIG_SMB_FS is not set 802# CONFIG_SMB_FS is not set
@@ -788,8 +817,10 @@ CONFIG_MSDOS_PARTITION=y
788# Library routines 817# Library routines
789# 818#
790CONFIG_BITREVERSE=y 819CONFIG_BITREVERSE=y
820# CONFIG_GENERIC_FIND_FIRST_BIT is not set
791# CONFIG_CRC_CCITT is not set 821# CONFIG_CRC_CCITT is not set
792# CONFIG_CRC16 is not set 822# CONFIG_CRC16 is not set
823# CONFIG_CRC_T10DIF is not set
793# CONFIG_CRC_ITU_T is not set 824# CONFIG_CRC_ITU_T is not set
794CONFIG_CRC32=y 825CONFIG_CRC32=y
795# CONFIG_CRC7 is not set 826# CONFIG_CRC7 is not set
@@ -800,6 +831,7 @@ CONFIG_PLIST=y
800CONFIG_HAS_IOMEM=y 831CONFIG_HAS_IOMEM=y
801CONFIG_HAS_IOPORT=y 832CONFIG_HAS_IOPORT=y
802CONFIG_HAS_DMA=y 833CONFIG_HAS_DMA=y
834CONFIG_HAVE_LMB=y
803 835
804# 836#
805# Kernel hacking 837# Kernel hacking
@@ -807,6 +839,7 @@ CONFIG_HAS_DMA=y
807# CONFIG_PRINTK_TIME is not set 839# CONFIG_PRINTK_TIME is not set
808CONFIG_ENABLE_WARN_DEPRECATED=y 840CONFIG_ENABLE_WARN_DEPRECATED=y
809CONFIG_ENABLE_MUST_CHECK=y 841CONFIG_ENABLE_MUST_CHECK=y
842CONFIG_FRAME_WARN=1024
810CONFIG_MAGIC_SYSRQ=y 843CONFIG_MAGIC_SYSRQ=y
811# CONFIG_UNUSED_SYMBOLS is not set 844# CONFIG_UNUSED_SYMBOLS is not set
812CONFIG_DEBUG_FS=y 845CONFIG_DEBUG_FS=y
@@ -814,9 +847,12 @@ CONFIG_DEBUG_FS=y
814CONFIG_DEBUG_KERNEL=y 847CONFIG_DEBUG_KERNEL=y
815# CONFIG_DEBUG_SHIRQ is not set 848# CONFIG_DEBUG_SHIRQ is not set
816CONFIG_DETECT_SOFTLOCKUP=y 849CONFIG_DETECT_SOFTLOCKUP=y
850# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
851CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
817CONFIG_SCHED_DEBUG=y 852CONFIG_SCHED_DEBUG=y
818# CONFIG_SCHEDSTATS is not set 853# CONFIG_SCHEDSTATS is not set
819# CONFIG_TIMER_STATS is not set 854# CONFIG_TIMER_STATS is not set
855# CONFIG_DEBUG_OBJECTS is not set
820# CONFIG_SLUB_DEBUG_ON is not set 856# CONFIG_SLUB_DEBUG_ON is not set
821# CONFIG_SLUB_STATS is not set 857# CONFIG_SLUB_STATS is not set
822# CONFIG_DEBUG_RT_MUTEXES is not set 858# CONFIG_DEBUG_RT_MUTEXES is not set
@@ -829,19 +865,30 @@ CONFIG_SCHED_DEBUG=y
829# CONFIG_DEBUG_BUGVERBOSE is not set 865# CONFIG_DEBUG_BUGVERBOSE is not set
830# CONFIG_DEBUG_INFO is not set 866# CONFIG_DEBUG_INFO is not set
831# CONFIG_DEBUG_VM is not set 867# CONFIG_DEBUG_VM is not set
868# CONFIG_DEBUG_WRITECOUNT is not set
869# CONFIG_DEBUG_MEMORY_INIT is not set
832# CONFIG_DEBUG_LIST is not set 870# CONFIG_DEBUG_LIST is not set
833# CONFIG_DEBUG_SG is not set 871# CONFIG_DEBUG_SG is not set
834# CONFIG_BOOT_PRINTK_DELAY is not set 872# CONFIG_BOOT_PRINTK_DELAY is not set
835# CONFIG_RCU_TORTURE_TEST is not set 873# CONFIG_RCU_TORTURE_TEST is not set
836# CONFIG_BACKTRACE_SELF_TEST is not set 874# CONFIG_BACKTRACE_SELF_TEST is not set
837# CONFIG_FAULT_INJECTION is not set 875# CONFIG_FAULT_INJECTION is not set
876# CONFIG_LATENCYTOP is not set
877CONFIG_HAVE_FTRACE=y
878CONFIG_HAVE_DYNAMIC_FTRACE=y
879# CONFIG_FTRACE is not set
880# CONFIG_SCHED_TRACER is not set
881# CONFIG_CONTEXT_SWITCH_TRACER is not set
838# CONFIG_SAMPLES is not set 882# CONFIG_SAMPLES is not set
883CONFIG_HAVE_ARCH_KGDB=y
884# CONFIG_KGDB is not set
839# CONFIG_DEBUG_STACKOVERFLOW is not set 885# CONFIG_DEBUG_STACKOVERFLOW is not set
840# CONFIG_DEBUG_STACK_USAGE is not set 886# CONFIG_DEBUG_STACK_USAGE is not set
841# CONFIG_DEBUG_PAGEALLOC is not set 887# CONFIG_DEBUG_PAGEALLOC is not set
842CONFIG_DEBUGGER=y 888# CONFIG_CODE_PATCHING_SELFTEST is not set
843# CONFIG_KGDB is not set 889# CONFIG_FTR_FIXUP_SELFTEST is not set
844# CONFIG_XMON is not set 890# CONFIG_XMON is not set
891# CONFIG_IRQSTACKS is not set
845# CONFIG_VIRQ_DEBUG is not set 892# CONFIG_VIRQ_DEBUG is not set
846# CONFIG_BDI_SWITCH is not set 893# CONFIG_BDI_SWITCH is not set
847CONFIG_PPC_EARLY_DEBUG=y 894CONFIG_PPC_EARLY_DEBUG=y
@@ -866,51 +913,85 @@ CONFIG_PPC_EARLY_DEBUG_44x_PHYSHIGH=0x1
866# CONFIG_SECURITY is not set 913# CONFIG_SECURITY is not set
867# CONFIG_SECURITY_FILE_CAPABILITIES is not set 914# CONFIG_SECURITY_FILE_CAPABILITIES is not set
868CONFIG_CRYPTO=y 915CONFIG_CRYPTO=y
916
917#
918# Crypto core or helper
919#
869CONFIG_CRYPTO_ALGAPI=y 920CONFIG_CRYPTO_ALGAPI=y
870CONFIG_CRYPTO_BLKCIPHER=y 921CONFIG_CRYPTO_BLKCIPHER=y
871# CONFIG_CRYPTO_SEQIV is not set
872CONFIG_CRYPTO_MANAGER=y 922CONFIG_CRYPTO_MANAGER=y
923# CONFIG_CRYPTO_GF128MUL is not set
924# CONFIG_CRYPTO_NULL is not set
925# CONFIG_CRYPTO_CRYPTD is not set
926# CONFIG_CRYPTO_AUTHENC is not set
927# CONFIG_CRYPTO_TEST is not set
928
929#
930# Authenticated Encryption with Associated Data
931#
932# CONFIG_CRYPTO_CCM is not set
933# CONFIG_CRYPTO_GCM is not set
934# CONFIG_CRYPTO_SEQIV is not set
935
936#
937# Block modes
938#
939CONFIG_CRYPTO_CBC=y
940# CONFIG_CRYPTO_CTR is not set
941# CONFIG_CRYPTO_CTS is not set
942CONFIG_CRYPTO_ECB=y
943# CONFIG_CRYPTO_LRW is not set
944CONFIG_CRYPTO_PCBC=y
945# CONFIG_CRYPTO_XTS is not set
946
947#
948# Hash modes
949#
873# CONFIG_CRYPTO_HMAC is not set 950# CONFIG_CRYPTO_HMAC is not set
874# CONFIG_CRYPTO_XCBC is not set 951# CONFIG_CRYPTO_XCBC is not set
875# CONFIG_CRYPTO_NULL is not set 952
953#
954# Digest
955#
956# CONFIG_CRYPTO_CRC32C is not set
876# CONFIG_CRYPTO_MD4 is not set 957# CONFIG_CRYPTO_MD4 is not set
877CONFIG_CRYPTO_MD5=y 958CONFIG_CRYPTO_MD5=y
959# CONFIG_CRYPTO_MICHAEL_MIC is not set
960# CONFIG_CRYPTO_RMD128 is not set
961# CONFIG_CRYPTO_RMD160 is not set
962# CONFIG_CRYPTO_RMD256 is not set
963# CONFIG_CRYPTO_RMD320 is not set
878# CONFIG_CRYPTO_SHA1 is not set 964# CONFIG_CRYPTO_SHA1 is not set
879# CONFIG_CRYPTO_SHA256 is not set 965# CONFIG_CRYPTO_SHA256 is not set
880# CONFIG_CRYPTO_SHA512 is not set 966# CONFIG_CRYPTO_SHA512 is not set
881# CONFIG_CRYPTO_WP512 is not set
882# CONFIG_CRYPTO_TGR192 is not set 967# CONFIG_CRYPTO_TGR192 is not set
883# CONFIG_CRYPTO_GF128MUL is not set 968# CONFIG_CRYPTO_WP512 is not set
884CONFIG_CRYPTO_ECB=y 969
885CONFIG_CRYPTO_CBC=y 970#
886CONFIG_CRYPTO_PCBC=y 971# Ciphers
887# CONFIG_CRYPTO_LRW is not set 972#
888# CONFIG_CRYPTO_XTS is not set
889# CONFIG_CRYPTO_CTR is not set
890# CONFIG_CRYPTO_GCM is not set
891# CONFIG_CRYPTO_CCM is not set
892# CONFIG_CRYPTO_CRYPTD is not set
893CONFIG_CRYPTO_DES=y
894# CONFIG_CRYPTO_FCRYPT is not set
895# CONFIG_CRYPTO_BLOWFISH is not set
896# CONFIG_CRYPTO_TWOFISH is not set
897# CONFIG_CRYPTO_SERPENT is not set
898# CONFIG_CRYPTO_AES is not set 973# CONFIG_CRYPTO_AES is not set
974# CONFIG_CRYPTO_ANUBIS is not set
975# CONFIG_CRYPTO_ARC4 is not set
976# CONFIG_CRYPTO_BLOWFISH is not set
977# CONFIG_CRYPTO_CAMELLIA is not set
899# CONFIG_CRYPTO_CAST5 is not set 978# CONFIG_CRYPTO_CAST5 is not set
900# CONFIG_CRYPTO_CAST6 is not set 979# CONFIG_CRYPTO_CAST6 is not set
901# CONFIG_CRYPTO_TEA is not set 980CONFIG_CRYPTO_DES=y
902# CONFIG_CRYPTO_ARC4 is not set 981# CONFIG_CRYPTO_FCRYPT is not set
903# CONFIG_CRYPTO_KHAZAD is not set 982# CONFIG_CRYPTO_KHAZAD is not set
904# CONFIG_CRYPTO_ANUBIS is not set
905# CONFIG_CRYPTO_SEED is not set
906# CONFIG_CRYPTO_SALSA20 is not set 983# CONFIG_CRYPTO_SALSA20 is not set
984# CONFIG_CRYPTO_SEED is not set
985# CONFIG_CRYPTO_SERPENT is not set
986# CONFIG_CRYPTO_TEA is not set
987# CONFIG_CRYPTO_TWOFISH is not set
988
989#
990# Compression
991#
907# CONFIG_CRYPTO_DEFLATE is not set 992# CONFIG_CRYPTO_DEFLATE is not set
908# CONFIG_CRYPTO_MICHAEL_MIC is not set
909# CONFIG_CRYPTO_CRC32C is not set
910# CONFIG_CRYPTO_CAMELLIA is not set
911# CONFIG_CRYPTO_TEST is not set
912# CONFIG_CRYPTO_AUTHENC is not set
913# CONFIG_CRYPTO_LZO is not set 993# CONFIG_CRYPTO_LZO is not set
914CONFIG_CRYPTO_HW=y 994CONFIG_CRYPTO_HW=y
915# CONFIG_CRYPTO_DEV_HIFN_795X is not set 995# CONFIG_CRYPTO_DEV_HIFN_795X is not set
916# CONFIG_PPC_CLOCK is not set 996# CONFIG_PPC_CLOCK is not set
997# CONFIG_VIRTUALIZATION is not set
diff --git a/arch/powerpc/configs/44x/taishan_defconfig b/arch/powerpc/configs/44x/taishan_defconfig
index e53c92655bd6..5075873bdb1b 100644
--- a/arch/powerpc/configs/44x/taishan_defconfig
+++ b/arch/powerpc/configs/44x/taishan_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.25-rc2 3# Linux kernel version: 2.6.27-rc1
4# Fri Feb 15 21:40:44 2008 4# Tue Aug 5 09:17:48 2008
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
@@ -29,8 +29,12 @@ CONFIG_GENERIC_TIME=y
29CONFIG_GENERIC_TIME_VSYSCALL=y 29CONFIG_GENERIC_TIME_VSYSCALL=y
30CONFIG_GENERIC_CLOCKEVENTS=y 30CONFIG_GENERIC_CLOCKEVENTS=y
31CONFIG_GENERIC_HARDIRQS=y 31CONFIG_GENERIC_HARDIRQS=y
32# CONFIG_HAVE_GET_USER_PAGES_FAST is not set
32# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 33# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
33CONFIG_IRQ_PER_CPU=y 34CONFIG_IRQ_PER_CPU=y
35CONFIG_STACKTRACE_SUPPORT=y
36CONFIG_HAVE_LATENCYTOP_SUPPORT=y
37CONFIG_LOCKDEP_SUPPORT=y
34CONFIG_RWSEM_XCHGADD_ALGORITHM=y 38CONFIG_RWSEM_XCHGADD_ALGORITHM=y
35CONFIG_ARCH_HAS_ILOG2_U32=y 39CONFIG_ARCH_HAS_ILOG2_U32=y
36CONFIG_GENERIC_HWEIGHT=y 40CONFIG_GENERIC_HWEIGHT=y
@@ -78,6 +82,7 @@ CONFIG_FAIR_GROUP_SCHED=y
78CONFIG_USER_SCHED=y 82CONFIG_USER_SCHED=y
79# CONFIG_CGROUP_SCHED is not set 83# CONFIG_CGROUP_SCHED is not set
80CONFIG_SYSFS_DEPRECATED=y 84CONFIG_SYSFS_DEPRECATED=y
85CONFIG_SYSFS_DEPRECATED_V2=y
81# CONFIG_RELAY is not set 86# CONFIG_RELAY is not set
82# CONFIG_NAMESPACES is not set 87# CONFIG_NAMESPACES is not set
83CONFIG_BLK_DEV_INITRD=y 88CONFIG_BLK_DEV_INITRD=y
@@ -86,6 +91,7 @@ CONFIG_INITRAMFS_SOURCE=""
86CONFIG_SYSCTL=y 91CONFIG_SYSCTL=y
87CONFIG_EMBEDDED=y 92CONFIG_EMBEDDED=y
88CONFIG_SYSCTL_SYSCALL=y 93CONFIG_SYSCTL_SYSCALL=y
94CONFIG_SYSCTL_SYSCALL_CHECK=y
89CONFIG_KALLSYMS=y 95CONFIG_KALLSYMS=y
90# CONFIG_KALLSYMS_ALL is not set 96# CONFIG_KALLSYMS_ALL is not set
91# CONFIG_KALLSYMS_EXTRA_PASS is not set 97# CONFIG_KALLSYMS_EXTRA_PASS is not set
@@ -111,13 +117,22 @@ CONFIG_SLUB=y
111# CONFIG_MARKERS is not set 117# CONFIG_MARKERS is not set
112CONFIG_HAVE_OPROFILE=y 118CONFIG_HAVE_OPROFILE=y
113# CONFIG_KPROBES is not set 119# CONFIG_KPROBES is not set
120CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y
121CONFIG_HAVE_IOREMAP_PROT=y
114CONFIG_HAVE_KPROBES=y 122CONFIG_HAVE_KPROBES=y
123CONFIG_HAVE_KRETPROBES=y
124CONFIG_HAVE_ARCH_TRACEHOOK=y
125# CONFIG_HAVE_DMA_ATTRS is not set
126# CONFIG_USE_GENERIC_SMP_HELPERS is not set
127# CONFIG_HAVE_CLK is not set
115CONFIG_PROC_PAGE_MONITOR=y 128CONFIG_PROC_PAGE_MONITOR=y
129# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
116CONFIG_SLABINFO=y 130CONFIG_SLABINFO=y
117CONFIG_RT_MUTEXES=y 131CONFIG_RT_MUTEXES=y
118# CONFIG_TINY_SHMEM is not set 132# CONFIG_TINY_SHMEM is not set
119CONFIG_BASE_SMALL=0 133CONFIG_BASE_SMALL=0
120CONFIG_MODULES=y 134CONFIG_MODULES=y
135# CONFIG_MODULE_FORCE_LOAD is not set
121CONFIG_MODULE_UNLOAD=y 136CONFIG_MODULE_UNLOAD=y
122# CONFIG_MODULE_FORCE_UNLOAD is not set 137# CONFIG_MODULE_FORCE_UNLOAD is not set
123# CONFIG_MODVERSIONS is not set 138# CONFIG_MODVERSIONS is not set
@@ -128,6 +143,7 @@ CONFIG_LBD=y
128# CONFIG_BLK_DEV_IO_TRACE is not set 143# CONFIG_BLK_DEV_IO_TRACE is not set
129# CONFIG_LSF is not set 144# CONFIG_LSF is not set
130# CONFIG_BLK_DEV_BSG is not set 145# CONFIG_BLK_DEV_BSG is not set
146# CONFIG_BLK_DEV_INTEGRITY is not set
131 147
132# 148#
133# IO Schedulers 149# IO Schedulers
@@ -142,24 +158,25 @@ CONFIG_DEFAULT_AS=y
142# CONFIG_DEFAULT_NOOP is not set 158# CONFIG_DEFAULT_NOOP is not set
143CONFIG_DEFAULT_IOSCHED="anticipatory" 159CONFIG_DEFAULT_IOSCHED="anticipatory"
144CONFIG_CLASSIC_RCU=y 160CONFIG_CLASSIC_RCU=y
145# CONFIG_PREEMPT_RCU is not set
146# CONFIG_PPC4xx_PCI_EXPRESS is not set 161# CONFIG_PPC4xx_PCI_EXPRESS is not set
147 162
148# 163#
149# Platform support 164# Platform support
150# 165#
151# CONFIG_PPC_MPC512x is not set
152# CONFIG_PPC_MPC5121 is not set
153# CONFIG_PPC_CELL is not set 166# CONFIG_PPC_CELL is not set
154# CONFIG_PPC_CELL_NATIVE is not set 167# CONFIG_PPC_CELL_NATIVE is not set
155# CONFIG_PQ2ADS is not set 168# CONFIG_PQ2ADS is not set
156# CONFIG_BAMBOO is not set 169# CONFIG_BAMBOO is not set
157# CONFIG_EBONY is not set 170# CONFIG_EBONY is not set
171# CONFIG_SAM440EP is not set
158# CONFIG_SEQUOIA is not set 172# CONFIG_SEQUOIA is not set
159CONFIG_TAISHAN=y 173CONFIG_TAISHAN=y
160# CONFIG_KATMAI is not set 174# CONFIG_KATMAI is not set
161# CONFIG_RAINIER is not set 175# CONFIG_RAINIER is not set
162# CONFIG_WARP is not set 176# CONFIG_WARP is not set
177# CONFIG_CANYONLANDS is not set
178# CONFIG_YOSEMITE is not set
179# CONFIG_XILINX_VIRTEX440_GENERIC_BOARD is not set
163CONFIG_440GX=y 180CONFIG_440GX=y
164# CONFIG_IPIC is not set 181# CONFIG_IPIC is not set
165# CONFIG_MPIC is not set 182# CONFIG_MPIC is not set
@@ -191,7 +208,6 @@ CONFIG_HZ=250
191CONFIG_PREEMPT_NONE=y 208CONFIG_PREEMPT_NONE=y
192# CONFIG_PREEMPT_VOLUNTARY is not set 209# CONFIG_PREEMPT_VOLUNTARY is not set
193# CONFIG_PREEMPT is not set 210# CONFIG_PREEMPT is not set
194CONFIG_RCU_TRACE=y
195CONFIG_BINFMT_ELF=y 211CONFIG_BINFMT_ELF=y
196# CONFIG_BINFMT_MISC is not set 212# CONFIG_BINFMT_MISC is not set
197# CONFIG_MATH_EMULATION is not set 213# CONFIG_MATH_EMULATION is not set
@@ -209,14 +225,18 @@ CONFIG_FLATMEM=y
209CONFIG_FLAT_NODE_MEM_MAP=y 225CONFIG_FLAT_NODE_MEM_MAP=y
210# CONFIG_SPARSEMEM_STATIC is not set 226# CONFIG_SPARSEMEM_STATIC is not set
211# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set 227# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
228CONFIG_PAGEFLAGS_EXTENDED=y
212CONFIG_SPLIT_PTLOCK_CPUS=4 229CONFIG_SPLIT_PTLOCK_CPUS=4
230CONFIG_MIGRATION=y
213CONFIG_RESOURCES_64BIT=y 231CONFIG_RESOURCES_64BIT=y
214CONFIG_ZONE_DMA_FLAG=1 232CONFIG_ZONE_DMA_FLAG=1
215CONFIG_BOUNCE=y 233CONFIG_BOUNCE=y
216CONFIG_VIRT_TO_BUS=y 234CONFIG_VIRT_TO_BUS=y
235CONFIG_FORCE_MAX_ZONEORDER=11
217CONFIG_PROC_DEVICETREE=y 236CONFIG_PROC_DEVICETREE=y
218CONFIG_CMDLINE_BOOL=y 237CONFIG_CMDLINE_BOOL=y
219CONFIG_CMDLINE="" 238CONFIG_CMDLINE=""
239CONFIG_EXTRA_TARGETS=""
220CONFIG_SECCOMP=y 240CONFIG_SECCOMP=y
221CONFIG_ISA_DMA_API=y 241CONFIG_ISA_DMA_API=y
222 242
@@ -225,6 +245,8 @@ CONFIG_ISA_DMA_API=y
225# 245#
226CONFIG_ZONE_DMA=y 246CONFIG_ZONE_DMA=y
227CONFIG_PPC_INDIRECT_PCI=y 247CONFIG_PPC_INDIRECT_PCI=y
248CONFIG_4xx_SOC=y
249CONFIG_PPC_PCI_CHOICE=y
228CONFIG_PCI=y 250CONFIG_PCI=y
229CONFIG_PCI_DOMAINS=y 251CONFIG_PCI_DOMAINS=y
230CONFIG_PCI_SYSCALL=y 252CONFIG_PCI_SYSCALL=y
@@ -235,6 +257,7 @@ CONFIG_PCI_LEGACY=y
235# CONFIG_PCI_DEBUG is not set 257# CONFIG_PCI_DEBUG is not set
236# CONFIG_PCCARD is not set 258# CONFIG_PCCARD is not set
237# CONFIG_HOTPLUG_PCI is not set 259# CONFIG_HOTPLUG_PCI is not set
260# CONFIG_HAS_RAPIDIO is not set
238 261
239# 262#
240# Advanced setup 263# Advanced setup
@@ -244,17 +267,13 @@ CONFIG_PCI_LEGACY=y
244# 267#
245# Default settings for advanced configuration options are used 268# Default settings for advanced configuration options are used
246# 269#
247CONFIG_HIGHMEM_START=0xfe000000
248CONFIG_LOWMEM_SIZE=0x30000000 270CONFIG_LOWMEM_SIZE=0x30000000
271CONFIG_PAGE_OFFSET=0xc0000000
249CONFIG_KERNEL_START=0xc0000000 272CONFIG_KERNEL_START=0xc0000000
273CONFIG_PHYSICAL_START=0x00000000
250CONFIG_TASK_SIZE=0xc0000000 274CONFIG_TASK_SIZE=0xc0000000
251CONFIG_CONSISTENT_START=0xff100000 275CONFIG_CONSISTENT_START=0xff100000
252CONFIG_CONSISTENT_SIZE=0x00200000 276CONFIG_CONSISTENT_SIZE=0x00200000
253CONFIG_BOOT_LOAD=0x01000000
254
255#
256# Networking
257#
258CONFIG_NET=y 277CONFIG_NET=y
259 278
260# 279#
@@ -292,8 +311,6 @@ CONFIG_TCP_CONG_CUBIC=y
292CONFIG_DEFAULT_TCP_CONG="cubic" 311CONFIG_DEFAULT_TCP_CONG="cubic"
293# CONFIG_TCP_MD5SIG is not set 312# CONFIG_TCP_MD5SIG is not set
294# CONFIG_IPV6 is not set 313# CONFIG_IPV6 is not set
295# CONFIG_INET6_XFRM_TUNNEL is not set
296# CONFIG_INET6_TUNNEL is not set
297# CONFIG_NETWORK_SECMARK is not set 314# CONFIG_NETWORK_SECMARK is not set
298# CONFIG_NETFILTER is not set 315# CONFIG_NETFILTER is not set
299# CONFIG_IP_DCCP is not set 316# CONFIG_IP_DCCP is not set
@@ -343,6 +360,8 @@ CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
343CONFIG_STANDALONE=y 360CONFIG_STANDALONE=y
344CONFIG_PREVENT_FIRMWARE_BUILD=y 361CONFIG_PREVENT_FIRMWARE_BUILD=y
345CONFIG_FW_LOADER=y 362CONFIG_FW_LOADER=y
363CONFIG_FIRMWARE_IN_KERNEL=y
364CONFIG_EXTRA_FIRMWARE=""
346# CONFIG_DEBUG_DRIVER is not set 365# CONFIG_DEBUG_DRIVER is not set
347# CONFIG_DEBUG_DEVRES is not set 366# CONFIG_DEBUG_DEVRES is not set
348# CONFIG_SYS_HYPERVISOR is not set 367# CONFIG_SYS_HYPERVISOR is not set
@@ -354,6 +373,8 @@ CONFIG_MTD=y
354CONFIG_MTD_PARTITIONS=y 373CONFIG_MTD_PARTITIONS=y
355# CONFIG_MTD_REDBOOT_PARTS is not set 374# CONFIG_MTD_REDBOOT_PARTS is not set
356CONFIG_MTD_CMDLINE_PARTS=y 375CONFIG_MTD_CMDLINE_PARTS=y
376# CONFIG_MTD_OF_PARTS is not set
377# CONFIG_MTD_AR7_PARTS is not set
357 378
358# 379#
359# User Modules And Translation Layers 380# User Modules And Translation Layers
@@ -444,12 +465,14 @@ CONFIG_BLK_DEV_RAM_SIZE=35000
444# CONFIG_CDROM_PKTCDVD is not set 465# CONFIG_CDROM_PKTCDVD is not set
445# CONFIG_ATA_OVER_ETH is not set 466# CONFIG_ATA_OVER_ETH is not set
446# CONFIG_XILINX_SYSACE is not set 467# CONFIG_XILINX_SYSACE is not set
468# CONFIG_BLK_DEV_HD is not set
447CONFIG_MISC_DEVICES=y 469CONFIG_MISC_DEVICES=y
448# CONFIG_PHANTOM is not set 470# CONFIG_PHANTOM is not set
449# CONFIG_EEPROM_93CX6 is not set 471# CONFIG_EEPROM_93CX6 is not set
450# CONFIG_SGI_IOC4 is not set 472# CONFIG_SGI_IOC4 is not set
451# CONFIG_TIFM_CORE is not set 473# CONFIG_TIFM_CORE is not set
452# CONFIG_ENCLOSURE_SERVICES is not set 474# CONFIG_ENCLOSURE_SERVICES is not set
475# CONFIG_HP_ILO is not set
453CONFIG_HAVE_IDE=y 476CONFIG_HAVE_IDE=y
454# CONFIG_IDE is not set 477# CONFIG_IDE is not set
455 478
@@ -467,6 +490,10 @@ CONFIG_HAVE_IDE=y
467# 490#
468# IEEE 1394 (FireWire) support 491# IEEE 1394 (FireWire) support
469# 492#
493
494#
495# Enable only one of the two stacks, unless you know what you are doing
496#
470# CONFIG_FIREWIRE is not set 497# CONFIG_FIREWIRE is not set
471# CONFIG_IEEE1394 is not set 498# CONFIG_IEEE1394 is not set
472# CONFIG_I2O is not set 499# CONFIG_I2O is not set
@@ -474,7 +501,6 @@ CONFIG_MACINTOSH_DRIVERS=y
474# CONFIG_MAC_EMUMOUSEBTN is not set 501# CONFIG_MAC_EMUMOUSEBTN is not set
475# CONFIG_WINDFARM is not set 502# CONFIG_WINDFARM is not set
476CONFIG_NETDEVICES=y 503CONFIG_NETDEVICES=y
477# CONFIG_NETDEVICES_MULTIQUEUE is not set
478# CONFIG_DUMMY is not set 504# CONFIG_DUMMY is not set
479# CONFIG_BONDING is not set 505# CONFIG_BONDING is not set
480# CONFIG_MACVLAN is not set 506# CONFIG_MACVLAN is not set
@@ -509,7 +535,6 @@ CONFIG_NETDEV_1000=y
509# CONFIG_DL2K is not set 535# CONFIG_DL2K is not set
510# CONFIG_E1000 is not set 536# CONFIG_E1000 is not set
511# CONFIG_E1000E is not set 537# CONFIG_E1000E is not set
512# CONFIG_E1000E_ENABLED is not set
513# CONFIG_IP1000 is not set 538# CONFIG_IP1000 is not set
514# CONFIG_IGB is not set 539# CONFIG_IGB is not set
515# CONFIG_NS83820 is not set 540# CONFIG_NS83820 is not set
@@ -519,12 +544,12 @@ CONFIG_NETDEV_1000=y
519# CONFIG_SIS190 is not set 544# CONFIG_SIS190 is not set
520# CONFIG_SKGE is not set 545# CONFIG_SKGE is not set
521# CONFIG_SKY2 is not set 546# CONFIG_SKY2 is not set
522# CONFIG_SK98LIN is not set
523# CONFIG_VIA_VELOCITY is not set 547# CONFIG_VIA_VELOCITY is not set
524# CONFIG_TIGON3 is not set 548# CONFIG_TIGON3 is not set
525# CONFIG_BNX2 is not set 549# CONFIG_BNX2 is not set
526# CONFIG_QLA3XXX is not set 550# CONFIG_QLA3XXX is not set
527# CONFIG_ATL1 is not set 551# CONFIG_ATL1 is not set
552# CONFIG_ATL1E is not set
528CONFIG_NETDEV_10000=y 553CONFIG_NETDEV_10000=y
529# CONFIG_CHELSIO_T1 is not set 554# CONFIG_CHELSIO_T1 is not set
530# CONFIG_CHELSIO_T3 is not set 555# CONFIG_CHELSIO_T3 is not set
@@ -537,6 +562,7 @@ CONFIG_NETDEV_10000=y
537# CONFIG_MLX4_CORE is not set 562# CONFIG_MLX4_CORE is not set
538# CONFIG_TEHUTI is not set 563# CONFIG_TEHUTI is not set
539# CONFIG_BNX2X is not set 564# CONFIG_BNX2X is not set
565# CONFIG_SFC is not set
540# CONFIG_TR is not set 566# CONFIG_TR is not set
541 567
542# 568#
@@ -544,6 +570,7 @@ CONFIG_NETDEV_10000=y
544# 570#
545# CONFIG_WLAN_PRE80211 is not set 571# CONFIG_WLAN_PRE80211 is not set
546# CONFIG_WLAN_80211 is not set 572# CONFIG_WLAN_80211 is not set
573# CONFIG_IWLWIFI_LEDS is not set
547# CONFIG_WAN is not set 574# CONFIG_WAN is not set
548# CONFIG_FDDI is not set 575# CONFIG_FDDI is not set
549# CONFIG_HIPPI is not set 576# CONFIG_HIPPI is not set
@@ -570,6 +597,7 @@ CONFIG_NETDEV_10000=y
570# Character devices 597# Character devices
571# 598#
572# CONFIG_VT is not set 599# CONFIG_VT is not set
600CONFIG_DEVKMEM=y
573# CONFIG_SERIAL_NONSTANDARD is not set 601# CONFIG_SERIAL_NONSTANDARD is not set
574# CONFIG_NOZOMI is not set 602# CONFIG_NOZOMI is not set
575 603
@@ -608,12 +636,9 @@ CONFIG_LEGACY_PTY_COUNT=256
608# CONFIG_TCG_TPM is not set 636# CONFIG_TCG_TPM is not set
609CONFIG_DEVPORT=y 637CONFIG_DEVPORT=y
610# CONFIG_I2C is not set 638# CONFIG_I2C is not set
611
612#
613# SPI support
614#
615# CONFIG_SPI is not set 639# CONFIG_SPI is not set
616# CONFIG_SPI_MASTER is not set 640CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
641# CONFIG_GPIOLIB is not set
617# CONFIG_W1 is not set 642# CONFIG_W1 is not set
618# CONFIG_POWER_SUPPLY is not set 643# CONFIG_POWER_SUPPLY is not set
619# CONFIG_HWMON is not set 644# CONFIG_HWMON is not set
@@ -629,13 +654,24 @@ CONFIG_SSB_POSSIBLE=y
629# 654#
630# Multifunction device drivers 655# Multifunction device drivers
631# 656#
657# CONFIG_MFD_CORE is not set
632# CONFIG_MFD_SM501 is not set 658# CONFIG_MFD_SM501 is not set
659# CONFIG_HTC_PASIC3 is not set
633 660
634# 661#
635# Multimedia devices 662# Multimedia devices
636# 663#
664
665#
666# Multimedia core support
667#
637# CONFIG_VIDEO_DEV is not set 668# CONFIG_VIDEO_DEV is not set
638# CONFIG_DVB_CORE is not set 669# CONFIG_DVB_CORE is not set
670# CONFIG_VIDEO_MEDIA is not set
671
672#
673# Multimedia drivers
674#
639CONFIG_DAB=y 675CONFIG_DAB=y
640 676
641# 677#
@@ -652,16 +688,14 @@ CONFIG_VIDEO_OUTPUT_CONTROL=m
652# Display device support 688# Display device support
653# 689#
654# CONFIG_DISPLAY_SUPPORT is not set 690# CONFIG_DISPLAY_SUPPORT is not set
655
656#
657# Sound
658#
659# CONFIG_SOUND is not set 691# CONFIG_SOUND is not set
660CONFIG_USB_SUPPORT=y 692CONFIG_USB_SUPPORT=y
661CONFIG_USB_ARCH_HAS_HCD=y 693CONFIG_USB_ARCH_HAS_HCD=y
662CONFIG_USB_ARCH_HAS_OHCI=y 694CONFIG_USB_ARCH_HAS_OHCI=y
663CONFIG_USB_ARCH_HAS_EHCI=y 695CONFIG_USB_ARCH_HAS_EHCI=y
664# CONFIG_USB is not set 696# CONFIG_USB is not set
697# CONFIG_USB_OTG_WHITELIST is not set
698# CONFIG_USB_OTG_BLACKLIST_HUB is not set
665 699
666# 700#
667# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 701# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
@@ -670,13 +704,11 @@ CONFIG_USB_ARCH_HAS_EHCI=y
670# CONFIG_MMC is not set 704# CONFIG_MMC is not set
671# CONFIG_MEMSTICK is not set 705# CONFIG_MEMSTICK is not set
672# CONFIG_NEW_LEDS is not set 706# CONFIG_NEW_LEDS is not set
707# CONFIG_ACCESSIBILITY is not set
673# CONFIG_INFINIBAND is not set 708# CONFIG_INFINIBAND is not set
674# CONFIG_EDAC is not set 709# CONFIG_EDAC is not set
675# CONFIG_RTC_CLASS is not set 710# CONFIG_RTC_CLASS is not set
676 711# CONFIG_DMADEVICES is not set
677#
678# Userspace I/O
679#
680# CONFIG_UIO is not set 712# CONFIG_UIO is not set
681 713
682# 714#
@@ -691,7 +723,6 @@ CONFIG_EXT2_FS=y
691# CONFIG_JFS_FS is not set 723# CONFIG_JFS_FS is not set
692# CONFIG_FS_POSIX_ACL is not set 724# CONFIG_FS_POSIX_ACL is not set
693# CONFIG_XFS_FS is not set 725# CONFIG_XFS_FS is not set
694# CONFIG_GFS2_FS is not set
695# CONFIG_OCFS2_FS is not set 726# CONFIG_OCFS2_FS is not set
696CONFIG_DNOTIFY=y 727CONFIG_DNOTIFY=y
697CONFIG_INOTIFY=y 728CONFIG_INOTIFY=y
@@ -740,6 +771,7 @@ CONFIG_TMPFS=y
740CONFIG_CRAMFS=y 771CONFIG_CRAMFS=y
741# CONFIG_VXFS_FS is not set 772# CONFIG_VXFS_FS is not set
742# CONFIG_MINIX_FS is not set 773# CONFIG_MINIX_FS is not set
774# CONFIG_OMFS_FS is not set
743# CONFIG_HPFS_FS is not set 775# CONFIG_HPFS_FS is not set
744# CONFIG_QNX4FS_FS is not set 776# CONFIG_QNX4FS_FS is not set
745# CONFIG_ROMFS_FS is not set 777# CONFIG_ROMFS_FS is not set
@@ -750,14 +782,12 @@ CONFIG_NFS_FS=y
750CONFIG_NFS_V3=y 782CONFIG_NFS_V3=y
751# CONFIG_NFS_V3_ACL is not set 783# CONFIG_NFS_V3_ACL is not set
752# CONFIG_NFS_V4 is not set 784# CONFIG_NFS_V4 is not set
753# CONFIG_NFS_DIRECTIO is not set
754# CONFIG_NFSD is not set
755CONFIG_ROOT_NFS=y 785CONFIG_ROOT_NFS=y
786# CONFIG_NFSD is not set
756CONFIG_LOCKD=y 787CONFIG_LOCKD=y
757CONFIG_LOCKD_V4=y 788CONFIG_LOCKD_V4=y
758CONFIG_NFS_COMMON=y 789CONFIG_NFS_COMMON=y
759CONFIG_SUNRPC=y 790CONFIG_SUNRPC=y
760# CONFIG_SUNRPC_BIND34 is not set
761# CONFIG_RPCSEC_GSS_KRB5 is not set 791# CONFIG_RPCSEC_GSS_KRB5 is not set
762# CONFIG_RPCSEC_GSS_SPKM3 is not set 792# CONFIG_RPCSEC_GSS_SPKM3 is not set
763# CONFIG_SMB_FS is not set 793# CONFIG_SMB_FS is not set
@@ -778,8 +808,10 @@ CONFIG_MSDOS_PARTITION=y
778# Library routines 808# Library routines
779# 809#
780CONFIG_BITREVERSE=y 810CONFIG_BITREVERSE=y
811# CONFIG_GENERIC_FIND_FIRST_BIT is not set
781# CONFIG_CRC_CCITT is not set 812# CONFIG_CRC_CCITT is not set
782# CONFIG_CRC16 is not set 813# CONFIG_CRC16 is not set
814# CONFIG_CRC_T10DIF is not set
783# CONFIG_CRC_ITU_T is not set 815# CONFIG_CRC_ITU_T is not set
784CONFIG_CRC32=y 816CONFIG_CRC32=y
785# CONFIG_CRC7 is not set 817# CONFIG_CRC7 is not set
@@ -789,6 +821,7 @@ CONFIG_PLIST=y
789CONFIG_HAS_IOMEM=y 821CONFIG_HAS_IOMEM=y
790CONFIG_HAS_IOPORT=y 822CONFIG_HAS_IOPORT=y
791CONFIG_HAS_DMA=y 823CONFIG_HAS_DMA=y
824CONFIG_HAVE_LMB=y
792 825
793# 826#
794# Kernel hacking 827# Kernel hacking
@@ -796,6 +829,7 @@ CONFIG_HAS_DMA=y
796# CONFIG_PRINTK_TIME is not set 829# CONFIG_PRINTK_TIME is not set
797CONFIG_ENABLE_WARN_DEPRECATED=y 830CONFIG_ENABLE_WARN_DEPRECATED=y
798CONFIG_ENABLE_MUST_CHECK=y 831CONFIG_ENABLE_MUST_CHECK=y
832CONFIG_FRAME_WARN=1024
799CONFIG_MAGIC_SYSRQ=y 833CONFIG_MAGIC_SYSRQ=y
800# CONFIG_UNUSED_SYMBOLS is not set 834# CONFIG_UNUSED_SYMBOLS is not set
801CONFIG_DEBUG_FS=y 835CONFIG_DEBUG_FS=y
@@ -803,9 +837,12 @@ CONFIG_DEBUG_FS=y
803CONFIG_DEBUG_KERNEL=y 837CONFIG_DEBUG_KERNEL=y
804# CONFIG_DEBUG_SHIRQ is not set 838# CONFIG_DEBUG_SHIRQ is not set
805CONFIG_DETECT_SOFTLOCKUP=y 839CONFIG_DETECT_SOFTLOCKUP=y
840# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
841CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
806CONFIG_SCHED_DEBUG=y 842CONFIG_SCHED_DEBUG=y
807# CONFIG_SCHEDSTATS is not set 843# CONFIG_SCHEDSTATS is not set
808# CONFIG_TIMER_STATS is not set 844# CONFIG_TIMER_STATS is not set
845# CONFIG_DEBUG_OBJECTS is not set
809# CONFIG_SLUB_DEBUG_ON is not set 846# CONFIG_SLUB_DEBUG_ON is not set
810# CONFIG_SLUB_STATS is not set 847# CONFIG_SLUB_STATS is not set
811# CONFIG_DEBUG_RT_MUTEXES is not set 848# CONFIG_DEBUG_RT_MUTEXES is not set
@@ -818,19 +855,30 @@ CONFIG_SCHED_DEBUG=y
818# CONFIG_DEBUG_BUGVERBOSE is not set 855# CONFIG_DEBUG_BUGVERBOSE is not set
819# CONFIG_DEBUG_INFO is not set 856# CONFIG_DEBUG_INFO is not set
820# CONFIG_DEBUG_VM is not set 857# CONFIG_DEBUG_VM is not set
858# CONFIG_DEBUG_WRITECOUNT is not set
859# CONFIG_DEBUG_MEMORY_INIT is not set
821# CONFIG_DEBUG_LIST is not set 860# CONFIG_DEBUG_LIST is not set
822# CONFIG_DEBUG_SG is not set 861# CONFIG_DEBUG_SG is not set
823# CONFIG_BOOT_PRINTK_DELAY is not set 862# CONFIG_BOOT_PRINTK_DELAY is not set
824# CONFIG_RCU_TORTURE_TEST is not set 863# CONFIG_RCU_TORTURE_TEST is not set
825# CONFIG_BACKTRACE_SELF_TEST is not set 864# CONFIG_BACKTRACE_SELF_TEST is not set
826# CONFIG_FAULT_INJECTION is not set 865# CONFIG_FAULT_INJECTION is not set
866# CONFIG_LATENCYTOP is not set
867CONFIG_HAVE_FTRACE=y
868CONFIG_HAVE_DYNAMIC_FTRACE=y
869# CONFIG_FTRACE is not set
870# CONFIG_SCHED_TRACER is not set
871# CONFIG_CONTEXT_SWITCH_TRACER is not set
827# CONFIG_SAMPLES is not set 872# CONFIG_SAMPLES is not set
873CONFIG_HAVE_ARCH_KGDB=y
874# CONFIG_KGDB is not set
828# CONFIG_DEBUG_STACKOVERFLOW is not set 875# CONFIG_DEBUG_STACKOVERFLOW is not set
829# CONFIG_DEBUG_STACK_USAGE is not set 876# CONFIG_DEBUG_STACK_USAGE is not set
830# CONFIG_DEBUG_PAGEALLOC is not set 877# CONFIG_DEBUG_PAGEALLOC is not set
831CONFIG_DEBUGGER=y 878# CONFIG_CODE_PATCHING_SELFTEST is not set
832# CONFIG_KGDB is not set 879# CONFIG_FTR_FIXUP_SELFTEST is not set
833# CONFIG_XMON is not set 880# CONFIG_XMON is not set
881# CONFIG_IRQSTACKS is not set
834# CONFIG_VIRQ_DEBUG is not set 882# CONFIG_VIRQ_DEBUG is not set
835# CONFIG_BDI_SWITCH is not set 883# CONFIG_BDI_SWITCH is not set
836# CONFIG_PPC_EARLY_DEBUG is not set 884# CONFIG_PPC_EARLY_DEBUG is not set
@@ -842,51 +890,85 @@ CONFIG_DEBUGGER=y
842# CONFIG_SECURITY is not set 890# CONFIG_SECURITY is not set
843# CONFIG_SECURITY_FILE_CAPABILITIES is not set 891# CONFIG_SECURITY_FILE_CAPABILITIES is not set
844CONFIG_CRYPTO=y 892CONFIG_CRYPTO=y
893
894#
895# Crypto core or helper
896#
845CONFIG_CRYPTO_ALGAPI=y 897CONFIG_CRYPTO_ALGAPI=y
846CONFIG_CRYPTO_BLKCIPHER=y 898CONFIG_CRYPTO_BLKCIPHER=y
847# CONFIG_CRYPTO_SEQIV is not set
848CONFIG_CRYPTO_MANAGER=y 899CONFIG_CRYPTO_MANAGER=y
900# CONFIG_CRYPTO_GF128MUL is not set
901# CONFIG_CRYPTO_NULL is not set
902# CONFIG_CRYPTO_CRYPTD is not set
903# CONFIG_CRYPTO_AUTHENC is not set
904# CONFIG_CRYPTO_TEST is not set
905
906#
907# Authenticated Encryption with Associated Data
908#
909# CONFIG_CRYPTO_CCM is not set
910# CONFIG_CRYPTO_GCM is not set
911# CONFIG_CRYPTO_SEQIV is not set
912
913#
914# Block modes
915#
916CONFIG_CRYPTO_CBC=y
917# CONFIG_CRYPTO_CTR is not set
918# CONFIG_CRYPTO_CTS is not set
919CONFIG_CRYPTO_ECB=y
920# CONFIG_CRYPTO_LRW is not set
921CONFIG_CRYPTO_PCBC=y
922# CONFIG_CRYPTO_XTS is not set
923
924#
925# Hash modes
926#
849# CONFIG_CRYPTO_HMAC is not set 927# CONFIG_CRYPTO_HMAC is not set
850# CONFIG_CRYPTO_XCBC is not set 928# CONFIG_CRYPTO_XCBC is not set
851# CONFIG_CRYPTO_NULL is not set 929
930#
931# Digest
932#
933# CONFIG_CRYPTO_CRC32C is not set
852# CONFIG_CRYPTO_MD4 is not set 934# CONFIG_CRYPTO_MD4 is not set
853CONFIG_CRYPTO_MD5=y 935CONFIG_CRYPTO_MD5=y
936# CONFIG_CRYPTO_MICHAEL_MIC is not set
937# CONFIG_CRYPTO_RMD128 is not set
938# CONFIG_CRYPTO_RMD160 is not set
939# CONFIG_CRYPTO_RMD256 is not set
940# CONFIG_CRYPTO_RMD320 is not set
854# CONFIG_CRYPTO_SHA1 is not set 941# CONFIG_CRYPTO_SHA1 is not set
855# CONFIG_CRYPTO_SHA256 is not set 942# CONFIG_CRYPTO_SHA256 is not set
856# CONFIG_CRYPTO_SHA512 is not set 943# CONFIG_CRYPTO_SHA512 is not set
857# CONFIG_CRYPTO_WP512 is not set
858# CONFIG_CRYPTO_TGR192 is not set 944# CONFIG_CRYPTO_TGR192 is not set
859# CONFIG_CRYPTO_GF128MUL is not set 945# CONFIG_CRYPTO_WP512 is not set
860CONFIG_CRYPTO_ECB=y 946
861CONFIG_CRYPTO_CBC=y 947#
862CONFIG_CRYPTO_PCBC=y 948# Ciphers
863# CONFIG_CRYPTO_LRW is not set 949#
864# CONFIG_CRYPTO_XTS is not set
865# CONFIG_CRYPTO_CTR is not set
866# CONFIG_CRYPTO_GCM is not set
867# CONFIG_CRYPTO_CCM is not set
868# CONFIG_CRYPTO_CRYPTD is not set
869CONFIG_CRYPTO_DES=y
870# CONFIG_CRYPTO_FCRYPT is not set
871# CONFIG_CRYPTO_BLOWFISH is not set
872# CONFIG_CRYPTO_TWOFISH is not set
873# CONFIG_CRYPTO_SERPENT is not set
874# CONFIG_CRYPTO_AES is not set 950# CONFIG_CRYPTO_AES is not set
951# CONFIG_CRYPTO_ANUBIS is not set
952# CONFIG_CRYPTO_ARC4 is not set
953# CONFIG_CRYPTO_BLOWFISH is not set
954# CONFIG_CRYPTO_CAMELLIA is not set
875# CONFIG_CRYPTO_CAST5 is not set 955# CONFIG_CRYPTO_CAST5 is not set
876# CONFIG_CRYPTO_CAST6 is not set 956# CONFIG_CRYPTO_CAST6 is not set
877# CONFIG_CRYPTO_TEA is not set 957CONFIG_CRYPTO_DES=y
878# CONFIG_CRYPTO_ARC4 is not set 958# CONFIG_CRYPTO_FCRYPT is not set
879# CONFIG_CRYPTO_KHAZAD is not set 959# CONFIG_CRYPTO_KHAZAD is not set
880# CONFIG_CRYPTO_ANUBIS is not set
881# CONFIG_CRYPTO_SEED is not set
882# CONFIG_CRYPTO_SALSA20 is not set 960# CONFIG_CRYPTO_SALSA20 is not set
961# CONFIG_CRYPTO_SEED is not set
962# CONFIG_CRYPTO_SERPENT is not set
963# CONFIG_CRYPTO_TEA is not set
964# CONFIG_CRYPTO_TWOFISH is not set
965
966#
967# Compression
968#
883# CONFIG_CRYPTO_DEFLATE is not set 969# CONFIG_CRYPTO_DEFLATE is not set
884# CONFIG_CRYPTO_MICHAEL_MIC is not set
885# CONFIG_CRYPTO_CRC32C is not set
886# CONFIG_CRYPTO_CAMELLIA is not set
887# CONFIG_CRYPTO_TEST is not set
888# CONFIG_CRYPTO_AUTHENC is not set
889# CONFIG_CRYPTO_LZO is not set 970# CONFIG_CRYPTO_LZO is not set
890CONFIG_CRYPTO_HW=y 971CONFIG_CRYPTO_HW=y
891# CONFIG_CRYPTO_DEV_HIFN_795X is not set 972# CONFIG_CRYPTO_DEV_HIFN_795X is not set
892# CONFIG_PPC_CLOCK is not set 973# CONFIG_PPC_CLOCK is not set
974# CONFIG_VIRTUALIZATION is not set
diff --git a/arch/powerpc/configs/44x/virtex5_defconfig b/arch/powerpc/configs/44x/virtex5_defconfig
index 9c41f66b5a7d..663ec512b33b 100644
--- a/arch/powerpc/configs/44x/virtex5_defconfig
+++ b/arch/powerpc/configs/44x/virtex5_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.26-rc8 3# Linux kernel version: 2.6.27-rc1
4# Wed Jul 2 15:36:41 2008 4# Tue Aug 5 09:20:16 2008
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
@@ -29,9 +29,11 @@ CONFIG_GENERIC_TIME=y
29CONFIG_GENERIC_TIME_VSYSCALL=y 29CONFIG_GENERIC_TIME_VSYSCALL=y
30CONFIG_GENERIC_CLOCKEVENTS=y 30CONFIG_GENERIC_CLOCKEVENTS=y
31CONFIG_GENERIC_HARDIRQS=y 31CONFIG_GENERIC_HARDIRQS=y
32# CONFIG_HAVE_GET_USER_PAGES_FAST is not set
32# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 33# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
33CONFIG_IRQ_PER_CPU=y 34CONFIG_IRQ_PER_CPU=y
34CONFIG_STACKTRACE_SUPPORT=y 35CONFIG_STACKTRACE_SUPPORT=y
36CONFIG_HAVE_LATENCYTOP_SUPPORT=y
35CONFIG_LOCKDEP_SUPPORT=y 37CONFIG_LOCKDEP_SUPPORT=y
36CONFIG_RWSEM_XCHGADD_ALGORITHM=y 38CONFIG_RWSEM_XCHGADD_ALGORITHM=y
37CONFIG_ARCH_HAS_ILOG2_U32=y 39CONFIG_ARCH_HAS_ILOG2_U32=y
@@ -115,10 +117,16 @@ CONFIG_SLAB=y
115# CONFIG_MARKERS is not set 117# CONFIG_MARKERS is not set
116CONFIG_HAVE_OPROFILE=y 118CONFIG_HAVE_OPROFILE=y
117# CONFIG_KPROBES is not set 119# CONFIG_KPROBES is not set
120CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y
121CONFIG_HAVE_IOREMAP_PROT=y
118CONFIG_HAVE_KPROBES=y 122CONFIG_HAVE_KPROBES=y
119CONFIG_HAVE_KRETPROBES=y 123CONFIG_HAVE_KRETPROBES=y
124CONFIG_HAVE_ARCH_TRACEHOOK=y
120# CONFIG_HAVE_DMA_ATTRS is not set 125# CONFIG_HAVE_DMA_ATTRS is not set
126# CONFIG_USE_GENERIC_SMP_HELPERS is not set
127# CONFIG_HAVE_CLK is not set
121CONFIG_PROC_PAGE_MONITOR=y 128CONFIG_PROC_PAGE_MONITOR=y
129# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
122CONFIG_SLABINFO=y 130CONFIG_SLABINFO=y
123CONFIG_RT_MUTEXES=y 131CONFIG_RT_MUTEXES=y
124# CONFIG_TINY_SHMEM is not set 132# CONFIG_TINY_SHMEM is not set
@@ -135,6 +143,7 @@ CONFIG_BLOCK=y
135# CONFIG_BLK_DEV_IO_TRACE is not set 143# CONFIG_BLK_DEV_IO_TRACE is not set
136# CONFIG_LSF is not set 144# CONFIG_LSF is not set
137# CONFIG_BLK_DEV_BSG is not set 145# CONFIG_BLK_DEV_BSG is not set
146# CONFIG_BLK_DEV_INTEGRITY is not set
138 147
139# 148#
140# IO Schedulers 149# IO Schedulers
@@ -154,13 +163,12 @@ CONFIG_CLASSIC_RCU=y
154# 163#
155# Platform support 164# Platform support
156# 165#
157# CONFIG_PPC_MPC512x is not set
158# CONFIG_PPC_MPC5121 is not set
159# CONFIG_PPC_CELL is not set 166# CONFIG_PPC_CELL is not set
160# CONFIG_PPC_CELL_NATIVE is not set 167# CONFIG_PPC_CELL_NATIVE is not set
161# CONFIG_PQ2ADS is not set 168# CONFIG_PQ2ADS is not set
162# CONFIG_BAMBOO is not set 169# CONFIG_BAMBOO is not set
163# CONFIG_EBONY is not set 170# CONFIG_EBONY is not set
171# CONFIG_SAM440EP is not set
164# CONFIG_SEQUOIA is not set 172# CONFIG_SEQUOIA is not set
165# CONFIG_TAISHAN is not set 173# CONFIG_TAISHAN is not set
166# CONFIG_KATMAI is not set 174# CONFIG_KATMAI is not set
@@ -221,6 +229,7 @@ CONFIG_FLAT_NODE_MEM_MAP=y
221# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set 229# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
222CONFIG_PAGEFLAGS_EXTENDED=y 230CONFIG_PAGEFLAGS_EXTENDED=y
223CONFIG_SPLIT_PTLOCK_CPUS=4 231CONFIG_SPLIT_PTLOCK_CPUS=4
232CONFIG_MIGRATION=y
224CONFIG_RESOURCES_64BIT=y 233CONFIG_RESOURCES_64BIT=y
225CONFIG_ZONE_DMA_FLAG=1 234CONFIG_ZONE_DMA_FLAG=1
226CONFIG_BOUNCE=y 235CONFIG_BOUNCE=y
@@ -239,6 +248,7 @@ CONFIG_ISA_DMA_API=y
239CONFIG_ZONE_DMA=y 248CONFIG_ZONE_DMA=y
240CONFIG_PPC_INDIRECT_PCI=y 249CONFIG_PPC_INDIRECT_PCI=y
241CONFIG_4xx_SOC=y 250CONFIG_4xx_SOC=y
251CONFIG_PPC_PCI_CHOICE=y
242CONFIG_PCI=y 252CONFIG_PCI=y
243CONFIG_PCI_DOMAINS=y 253CONFIG_PCI_DOMAINS=y
244CONFIG_PCI_SYSCALL=y 254CONFIG_PCI_SYSCALL=y
@@ -265,10 +275,6 @@ CONFIG_PHYSICAL_START=0x00000000
265CONFIG_TASK_SIZE=0xc0000000 275CONFIG_TASK_SIZE=0xc0000000
266CONFIG_CONSISTENT_START=0xff100000 276CONFIG_CONSISTENT_START=0xff100000
267CONFIG_CONSISTENT_SIZE=0x00200000 277CONFIG_CONSISTENT_SIZE=0x00200000
268
269#
270# Networking
271#
272CONFIG_NET=y 278CONFIG_NET=y
273 279
274# 280#
@@ -446,7 +452,9 @@ CONFIG_IP_NF_MANGLE=m
446CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 452CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
447CONFIG_STANDALONE=y 453CONFIG_STANDALONE=y
448CONFIG_PREVENT_FIRMWARE_BUILD=y 454CONFIG_PREVENT_FIRMWARE_BUILD=y
449# CONFIG_FW_LOADER is not set 455CONFIG_FW_LOADER=y
456CONFIG_FIRMWARE_IN_KERNEL=y
457CONFIG_EXTRA_FIRMWARE=""
450# CONFIG_SYS_HYPERVISOR is not set 458# CONFIG_SYS_HYPERVISOR is not set
451# CONFIG_CONNECTOR is not set 459# CONFIG_CONNECTOR is not set
452# CONFIG_MTD is not set 460# CONFIG_MTD is not set
@@ -471,12 +479,14 @@ CONFIG_BLK_DEV_RAM_SIZE=8192
471# CONFIG_CDROM_PKTCDVD is not set 479# CONFIG_CDROM_PKTCDVD is not set
472# CONFIG_ATA_OVER_ETH is not set 480# CONFIG_ATA_OVER_ETH is not set
473# CONFIG_XILINX_SYSACE is not set 481# CONFIG_XILINX_SYSACE is not set
482# CONFIG_BLK_DEV_HD is not set
474CONFIG_MISC_DEVICES=y 483CONFIG_MISC_DEVICES=y
475# CONFIG_PHANTOM is not set 484# CONFIG_PHANTOM is not set
476# CONFIG_EEPROM_93CX6 is not set 485# CONFIG_EEPROM_93CX6 is not set
477# CONFIG_SGI_IOC4 is not set 486# CONFIG_SGI_IOC4 is not set
478# CONFIG_TIFM_CORE is not set 487# CONFIG_TIFM_CORE is not set
479# CONFIG_ENCLOSURE_SERVICES is not set 488# CONFIG_ENCLOSURE_SERVICES is not set
489# CONFIG_HP_ILO is not set
480CONFIG_HAVE_IDE=y 490CONFIG_HAVE_IDE=y
481# CONFIG_IDE is not set 491# CONFIG_IDE is not set
482 492
@@ -503,7 +513,6 @@ CONFIG_HAVE_IDE=y
503# CONFIG_I2O is not set 513# CONFIG_I2O is not set
504# CONFIG_MACINTOSH_DRIVERS is not set 514# CONFIG_MACINTOSH_DRIVERS is not set
505CONFIG_NETDEVICES=y 515CONFIG_NETDEVICES=y
506# CONFIG_NETDEVICES_MULTIQUEUE is not set
507# CONFIG_DUMMY is not set 516# CONFIG_DUMMY is not set
508# CONFIG_BONDING is not set 517# CONFIG_BONDING is not set
509# CONFIG_MACVLAN is not set 518# CONFIG_MACVLAN is not set
@@ -532,7 +541,6 @@ CONFIG_NETDEV_1000=y
532# CONFIG_DL2K is not set 541# CONFIG_DL2K is not set
533# CONFIG_E1000 is not set 542# CONFIG_E1000 is not set
534# CONFIG_E1000E is not set 543# CONFIG_E1000E is not set
535# CONFIG_E1000E_ENABLED is not set
536# CONFIG_IP1000 is not set 544# CONFIG_IP1000 is not set
537# CONFIG_IGB is not set 545# CONFIG_IGB is not set
538# CONFIG_NS83820 is not set 546# CONFIG_NS83820 is not set
@@ -547,6 +555,7 @@ CONFIG_NETDEV_1000=y
547# CONFIG_BNX2 is not set 555# CONFIG_BNX2 is not set
548# CONFIG_QLA3XXX is not set 556# CONFIG_QLA3XXX is not set
549# CONFIG_ATL1 is not set 557# CONFIG_ATL1 is not set
558# CONFIG_ATL1E is not set
550# CONFIG_NETDEV_10000 is not set 559# CONFIG_NETDEV_10000 is not set
551# CONFIG_TR is not set 560# CONFIG_TR is not set
552 561
@@ -619,12 +628,14 @@ CONFIG_SERIO_SERPORT=y
619# CONFIG_SERIO_PCIPS2 is not set 628# CONFIG_SERIO_PCIPS2 is not set
620CONFIG_SERIO_LIBPS2=y 629CONFIG_SERIO_LIBPS2=y
621# CONFIG_SERIO_RAW is not set 630# CONFIG_SERIO_RAW is not set
631# CONFIG_SERIO_XILINX_XPS_PS2 is not set
622# CONFIG_GAMEPORT is not set 632# CONFIG_GAMEPORT is not set
623 633
624# 634#
625# Character devices 635# Character devices
626# 636#
627CONFIG_VT=y 637CONFIG_VT=y
638CONFIG_CONSOLE_TRANSLATIONS=y
628CONFIG_VT_CONSOLE=y 639CONFIG_VT_CONSOLE=y
629CONFIG_HW_CONSOLE=y 640CONFIG_HW_CONSOLE=y
630# CONFIG_VT_HW_CONSOLE_BINDING is not set 641# CONFIG_VT_HW_CONSOLE_BINDING is not set
@@ -670,39 +681,59 @@ CONFIG_I2C_CHARDEV=y
670# 681#
671# I2C Hardware Bus support 682# I2C Hardware Bus support
672# 683#
684
685#
686# PC SMBus host controller drivers
687#
673# CONFIG_I2C_ALI1535 is not set 688# CONFIG_I2C_ALI1535 is not set
674# CONFIG_I2C_ALI1563 is not set 689# CONFIG_I2C_ALI1563 is not set
675# CONFIG_I2C_ALI15X3 is not set 690# CONFIG_I2C_ALI15X3 is not set
676# CONFIG_I2C_AMD756 is not set 691# CONFIG_I2C_AMD756 is not set
677# CONFIG_I2C_AMD8111 is not set 692# CONFIG_I2C_AMD8111 is not set
678# CONFIG_I2C_I801 is not set 693# CONFIG_I2C_I801 is not set
679# CONFIG_I2C_I810 is not set 694# CONFIG_I2C_ISCH is not set
680# CONFIG_I2C_PIIX4 is not set 695# CONFIG_I2C_PIIX4 is not set
681# CONFIG_I2C_IBM_IIC is not set
682# CONFIG_I2C_MPC is not set
683# CONFIG_I2C_NFORCE2 is not set 696# CONFIG_I2C_NFORCE2 is not set
684# CONFIG_I2C_OCORES is not set
685# CONFIG_I2C_PARPORT_LIGHT is not set
686# CONFIG_I2C_PROSAVAGE is not set
687# CONFIG_I2C_SAVAGE4 is not set
688# CONFIG_I2C_SIMTEC is not set
689# CONFIG_I2C_SIS5595 is not set 697# CONFIG_I2C_SIS5595 is not set
690# CONFIG_I2C_SIS630 is not set 698# CONFIG_I2C_SIS630 is not set
691# CONFIG_I2C_SIS96X is not set 699# CONFIG_I2C_SIS96X is not set
692# CONFIG_I2C_TAOS_EVM is not set
693# CONFIG_I2C_STUB is not set
694# CONFIG_I2C_VIA is not set 700# CONFIG_I2C_VIA is not set
695# CONFIG_I2C_VIAPRO is not set 701# CONFIG_I2C_VIAPRO is not set
702
703#
704# I2C system bus drivers (mostly embedded / system-on-chip)
705#
706# CONFIG_I2C_IBM_IIC is not set
707# CONFIG_I2C_MPC is not set
708# CONFIG_I2C_OCORES is not set
709# CONFIG_I2C_SIMTEC is not set
710
711#
712# External I2C/SMBus adapter drivers
713#
714# CONFIG_I2C_PARPORT_LIGHT is not set
715# CONFIG_I2C_TAOS_EVM is not set
716
717#
718# Graphics adapter I2C/DDC channel drivers
719#
696# CONFIG_I2C_VOODOO3 is not set 720# CONFIG_I2C_VOODOO3 is not set
721
722#
723# Other I2C/SMBus bus drivers
724#
697# CONFIG_I2C_PCA_PLATFORM is not set 725# CONFIG_I2C_PCA_PLATFORM is not set
726# CONFIG_I2C_STUB is not set
698 727
699# 728#
700# Miscellaneous I2C Chip support 729# Miscellaneous I2C Chip support
701# 730#
702# CONFIG_DS1682 is not set 731# CONFIG_DS1682 is not set
732# CONFIG_AT24 is not set
703# CONFIG_SENSORS_EEPROM is not set 733# CONFIG_SENSORS_EEPROM is not set
704# CONFIG_SENSORS_PCF8574 is not set 734# CONFIG_SENSORS_PCF8574 is not set
705# CONFIG_PCF8575 is not set 735# CONFIG_PCF8575 is not set
736# CONFIG_SENSORS_PCA9539 is not set
706# CONFIG_SENSORS_PCF8591 is not set 737# CONFIG_SENSORS_PCF8591 is not set
707# CONFIG_SENSORS_MAX6875 is not set 738# CONFIG_SENSORS_MAX6875 is not set
708# CONFIG_SENSORS_TSL2550 is not set 739# CONFIG_SENSORS_TSL2550 is not set
@@ -711,10 +742,13 @@ CONFIG_I2C_DEBUG_ALGO=y
711# CONFIG_I2C_DEBUG_BUS is not set 742# CONFIG_I2C_DEBUG_BUS is not set
712# CONFIG_I2C_DEBUG_CHIP is not set 743# CONFIG_I2C_DEBUG_CHIP is not set
713# CONFIG_SPI is not set 744# CONFIG_SPI is not set
745CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
746# CONFIG_GPIOLIB is not set
714# CONFIG_W1 is not set 747# CONFIG_W1 is not set
715# CONFIG_POWER_SUPPLY is not set 748# CONFIG_POWER_SUPPLY is not set
716# CONFIG_HWMON is not set 749# CONFIG_HWMON is not set
717# CONFIG_THERMAL is not set 750# CONFIG_THERMAL is not set
751# CONFIG_THERMAL_HWMON is not set
718# CONFIG_WATCHDOG is not set 752# CONFIG_WATCHDOG is not set
719 753
720# 754#
@@ -726,6 +760,7 @@ CONFIG_SSB_POSSIBLE=y
726# 760#
727# Multifunction device drivers 761# Multifunction device drivers
728# 762#
763# CONFIG_MFD_CORE is not set
729# CONFIG_MFD_SM501 is not set 764# CONFIG_MFD_SM501 is not set
730# CONFIG_HTC_PASIC3 is not set 765# CONFIG_HTC_PASIC3 is not set
731 766
@@ -799,6 +834,7 @@ CONFIG_FB_CFB_IMAGEBLIT=y
799# CONFIG_FB_TRIDENT is not set 834# CONFIG_FB_TRIDENT is not set
800# CONFIG_FB_ARK is not set 835# CONFIG_FB_ARK is not set
801# CONFIG_FB_PM3 is not set 836# CONFIG_FB_PM3 is not set
837# CONFIG_FB_CARMINE is not set
802# CONFIG_FB_IBM_GXT4500 is not set 838# CONFIG_FB_IBM_GXT4500 is not set
803CONFIG_FB_XILINX=y 839CONFIG_FB_XILINX=y
804# CONFIG_FB_VIRTUAL is not set 840# CONFIG_FB_VIRTUAL is not set
@@ -831,10 +867,6 @@ CONFIG_LOGO=y
831CONFIG_LOGO_LINUX_MONO=y 867CONFIG_LOGO_LINUX_MONO=y
832CONFIG_LOGO_LINUX_VGA16=y 868CONFIG_LOGO_LINUX_VGA16=y
833CONFIG_LOGO_LINUX_CLUT224=y 869CONFIG_LOGO_LINUX_CLUT224=y
834
835#
836# Sound
837#
838# CONFIG_SOUND is not set 870# CONFIG_SOUND is not set
839# CONFIG_HID_SUPPORT is not set 871# CONFIG_HID_SUPPORT is not set
840# CONFIG_USB_SUPPORT is not set 872# CONFIG_USB_SUPPORT is not set
@@ -910,6 +942,7 @@ CONFIG_TMPFS=y
910CONFIG_CRAMFS=y 942CONFIG_CRAMFS=y
911# CONFIG_VXFS_FS is not set 943# CONFIG_VXFS_FS is not set
912# CONFIG_MINIX_FS is not set 944# CONFIG_MINIX_FS is not set
945# CONFIG_OMFS_FS is not set
913# CONFIG_HPFS_FS is not set 946# CONFIG_HPFS_FS is not set
914# CONFIG_QNX4FS_FS is not set 947# CONFIG_QNX4FS_FS is not set
915CONFIG_ROMFS_FS=y 948CONFIG_ROMFS_FS=y
@@ -920,17 +953,16 @@ CONFIG_NFS_FS=y
920CONFIG_NFS_V3=y 953CONFIG_NFS_V3=y
921# CONFIG_NFS_V3_ACL is not set 954# CONFIG_NFS_V3_ACL is not set
922# CONFIG_NFS_V4 is not set 955# CONFIG_NFS_V4 is not set
956CONFIG_ROOT_NFS=y
923CONFIG_NFSD=y 957CONFIG_NFSD=y
924CONFIG_NFSD_V3=y 958CONFIG_NFSD_V3=y
925# CONFIG_NFSD_V3_ACL is not set 959# CONFIG_NFSD_V3_ACL is not set
926# CONFIG_NFSD_V4 is not set 960# CONFIG_NFSD_V4 is not set
927CONFIG_ROOT_NFS=y
928CONFIG_LOCKD=y 961CONFIG_LOCKD=y
929CONFIG_LOCKD_V4=y 962CONFIG_LOCKD_V4=y
930CONFIG_EXPORTFS=y 963CONFIG_EXPORTFS=y
931CONFIG_NFS_COMMON=y 964CONFIG_NFS_COMMON=y
932CONFIG_SUNRPC=y 965CONFIG_SUNRPC=y
933# CONFIG_SUNRPC_BIND34 is not set
934# CONFIG_RPCSEC_GSS_KRB5 is not set 966# CONFIG_RPCSEC_GSS_KRB5 is not set
935# CONFIG_RPCSEC_GSS_SPKM3 is not set 967# CONFIG_RPCSEC_GSS_SPKM3 is not set
936CONFIG_SMB_FS=y 968CONFIG_SMB_FS=y
@@ -994,6 +1026,7 @@ CONFIG_BITREVERSE=y
994# CONFIG_GENERIC_FIND_FIRST_BIT is not set 1026# CONFIG_GENERIC_FIND_FIRST_BIT is not set
995CONFIG_CRC_CCITT=y 1027CONFIG_CRC_CCITT=y
996# CONFIG_CRC16 is not set 1028# CONFIG_CRC16 is not set
1029# CONFIG_CRC_T10DIF is not set
997# CONFIG_CRC_ITU_T is not set 1030# CONFIG_CRC_ITU_T is not set
998CONFIG_CRC32=y 1031CONFIG_CRC32=y
999# CONFIG_CRC7 is not set 1032# CONFIG_CRC7 is not set
@@ -1018,7 +1051,16 @@ CONFIG_FRAME_WARN=1024
1018# CONFIG_HEADERS_CHECK is not set 1051# CONFIG_HEADERS_CHECK is not set
1019# CONFIG_DEBUG_KERNEL is not set 1052# CONFIG_DEBUG_KERNEL is not set
1020CONFIG_DEBUG_BUGVERBOSE=y 1053CONFIG_DEBUG_BUGVERBOSE=y
1054CONFIG_DEBUG_MEMORY_INIT=y
1055# CONFIG_LATENCYTOP is not set
1056CONFIG_HAVE_FTRACE=y
1057CONFIG_HAVE_DYNAMIC_FTRACE=y
1058# CONFIG_FTRACE is not set
1059# CONFIG_PREEMPT_TRACER is not set
1060# CONFIG_SCHED_TRACER is not set
1061# CONFIG_CONTEXT_SWITCH_TRACER is not set
1021# CONFIG_SAMPLES is not set 1062# CONFIG_SAMPLES is not set
1063CONFIG_HAVE_ARCH_KGDB=y
1022# CONFIG_IRQSTACKS is not set 1064# CONFIG_IRQSTACKS is not set
1023# CONFIG_PPC_EARLY_DEBUG is not set 1065# CONFIG_PPC_EARLY_DEBUG is not set
1024 1066
@@ -1071,6 +1113,10 @@ CONFIG_CRYPTO=y
1071# CONFIG_CRYPTO_MD4 is not set 1113# CONFIG_CRYPTO_MD4 is not set
1072# CONFIG_CRYPTO_MD5 is not set 1114# CONFIG_CRYPTO_MD5 is not set
1073# CONFIG_CRYPTO_MICHAEL_MIC is not set 1115# CONFIG_CRYPTO_MICHAEL_MIC is not set
1116# CONFIG_CRYPTO_RMD128 is not set
1117# CONFIG_CRYPTO_RMD160 is not set
1118# CONFIG_CRYPTO_RMD256 is not set
1119# CONFIG_CRYPTO_RMD320 is not set
1074# CONFIG_CRYPTO_SHA1 is not set 1120# CONFIG_CRYPTO_SHA1 is not set
1075# CONFIG_CRYPTO_SHA256 is not set 1121# CONFIG_CRYPTO_SHA256 is not set
1076# CONFIG_CRYPTO_SHA512 is not set 1122# CONFIG_CRYPTO_SHA512 is not set
diff --git a/arch/powerpc/configs/44x/warp_defconfig b/arch/powerpc/configs/44x/warp_defconfig
index 2313c3e8ef61..d9375a969c67 100644
--- a/arch/powerpc/configs/44x/warp_defconfig
+++ b/arch/powerpc/configs/44x/warp_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.25-rc2 3# Linux kernel version: 2.6.27-rc1
4# Fri Feb 15 21:54:43 2008 4# Tue Aug 5 09:23:39 2008
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
@@ -30,8 +30,12 @@ CONFIG_GENERIC_TIME=y
30CONFIG_GENERIC_TIME_VSYSCALL=y 30CONFIG_GENERIC_TIME_VSYSCALL=y
31CONFIG_GENERIC_CLOCKEVENTS=y 31CONFIG_GENERIC_CLOCKEVENTS=y
32CONFIG_GENERIC_HARDIRQS=y 32CONFIG_GENERIC_HARDIRQS=y
33# CONFIG_HAVE_GET_USER_PAGES_FAST is not set
33# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 34# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
34CONFIG_IRQ_PER_CPU=y 35CONFIG_IRQ_PER_CPU=y
36CONFIG_STACKTRACE_SUPPORT=y
37CONFIG_HAVE_LATENCYTOP_SUPPORT=y
38CONFIG_LOCKDEP_SUPPORT=y
35CONFIG_RWSEM_XCHGADD_ALGORITHM=y 39CONFIG_RWSEM_XCHGADD_ALGORITHM=y
36CONFIG_ARCH_HAS_ILOG2_U32=y 40CONFIG_ARCH_HAS_ILOG2_U32=y
37CONFIG_GENERIC_HWEIGHT=y 41CONFIG_GENERIC_HWEIGHT=y
@@ -79,6 +83,7 @@ CONFIG_FAIR_GROUP_SCHED=y
79CONFIG_USER_SCHED=y 83CONFIG_USER_SCHED=y
80# CONFIG_CGROUP_SCHED is not set 84# CONFIG_CGROUP_SCHED is not set
81CONFIG_SYSFS_DEPRECATED=y 85CONFIG_SYSFS_DEPRECATED=y
86CONFIG_SYSFS_DEPRECATED_V2=y
82# CONFIG_RELAY is not set 87# CONFIG_RELAY is not set
83# CONFIG_NAMESPACES is not set 88# CONFIG_NAMESPACES is not set
84CONFIG_BLK_DEV_INITRD=y 89CONFIG_BLK_DEV_INITRD=y
@@ -87,6 +92,7 @@ CONFIG_INITRAMFS_SOURCE=""
87CONFIG_SYSCTL=y 92CONFIG_SYSCTL=y
88CONFIG_EMBEDDED=y 93CONFIG_EMBEDDED=y
89CONFIG_SYSCTL_SYSCALL=y 94CONFIG_SYSCTL_SYSCALL=y
95CONFIG_SYSCTL_SYSCALL_CHECK=y
90CONFIG_KALLSYMS=y 96CONFIG_KALLSYMS=y
91# CONFIG_KALLSYMS_ALL is not set 97# CONFIG_KALLSYMS_ALL is not set
92# CONFIG_KALLSYMS_EXTRA_PASS is not set 98# CONFIG_KALLSYMS_EXTRA_PASS is not set
@@ -111,13 +117,22 @@ CONFIG_SLAB=y
111# CONFIG_MARKERS is not set 117# CONFIG_MARKERS is not set
112CONFIG_HAVE_OPROFILE=y 118CONFIG_HAVE_OPROFILE=y
113# CONFIG_KPROBES is not set 119# CONFIG_KPROBES is not set
120CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y
121CONFIG_HAVE_IOREMAP_PROT=y
114CONFIG_HAVE_KPROBES=y 122CONFIG_HAVE_KPROBES=y
123CONFIG_HAVE_KRETPROBES=y
124CONFIG_HAVE_ARCH_TRACEHOOK=y
125# CONFIG_HAVE_DMA_ATTRS is not set
126# CONFIG_USE_GENERIC_SMP_HELPERS is not set
127# CONFIG_HAVE_CLK is not set
115CONFIG_PROC_PAGE_MONITOR=y 128CONFIG_PROC_PAGE_MONITOR=y
129# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
116CONFIG_SLABINFO=y 130CONFIG_SLABINFO=y
117CONFIG_RT_MUTEXES=y 131CONFIG_RT_MUTEXES=y
118# CONFIG_TINY_SHMEM is not set 132# CONFIG_TINY_SHMEM is not set
119CONFIG_BASE_SMALL=0 133CONFIG_BASE_SMALL=0
120CONFIG_MODULES=y 134CONFIG_MODULES=y
135# CONFIG_MODULE_FORCE_LOAD is not set
121CONFIG_MODULE_UNLOAD=y 136CONFIG_MODULE_UNLOAD=y
122# CONFIG_MODULE_FORCE_UNLOAD is not set 137# CONFIG_MODULE_FORCE_UNLOAD is not set
123# CONFIG_MODVERSIONS is not set 138# CONFIG_MODVERSIONS is not set
@@ -128,6 +143,7 @@ CONFIG_BLOCK=y
128# CONFIG_BLK_DEV_IO_TRACE is not set 143# CONFIG_BLK_DEV_IO_TRACE is not set
129# CONFIG_LSF is not set 144# CONFIG_LSF is not set
130# CONFIG_BLK_DEV_BSG is not set 145# CONFIG_BLK_DEV_BSG is not set
146# CONFIG_BLK_DEV_INTEGRITY is not set
131 147
132# 148#
133# IO Schedulers 149# IO Schedulers
@@ -142,23 +158,24 @@ CONFIG_DEFAULT_AS=y
142# CONFIG_DEFAULT_NOOP is not set 158# CONFIG_DEFAULT_NOOP is not set
143CONFIG_DEFAULT_IOSCHED="anticipatory" 159CONFIG_DEFAULT_IOSCHED="anticipatory"
144CONFIG_CLASSIC_RCU=y 160CONFIG_CLASSIC_RCU=y
145# CONFIG_PREEMPT_RCU is not set
146 161
147# 162#
148# Platform support 163# Platform support
149# 164#
150# CONFIG_PPC_MPC512x is not set
151# CONFIG_PPC_MPC5121 is not set
152# CONFIG_PPC_CELL is not set 165# CONFIG_PPC_CELL is not set
153# CONFIG_PPC_CELL_NATIVE is not set 166# CONFIG_PPC_CELL_NATIVE is not set
154# CONFIG_PQ2ADS is not set 167# CONFIG_PQ2ADS is not set
155# CONFIG_BAMBOO is not set 168# CONFIG_BAMBOO is not set
156# CONFIG_EBONY is not set 169# CONFIG_EBONY is not set
170# CONFIG_SAM440EP is not set
157# CONFIG_SEQUOIA is not set 171# CONFIG_SEQUOIA is not set
158# CONFIG_TAISHAN is not set 172# CONFIG_TAISHAN is not set
159# CONFIG_KATMAI is not set 173# CONFIG_KATMAI is not set
160# CONFIG_RAINIER is not set 174# CONFIG_RAINIER is not set
161CONFIG_WARP=y 175CONFIG_WARP=y
176# CONFIG_CANYONLANDS is not set
177# CONFIG_YOSEMITE is not set
178# CONFIG_XILINX_VIRTEX440_GENERIC_BOARD is not set
162CONFIG_440EP=y 179CONFIG_440EP=y
163CONFIG_IBM440EP_ERR42=y 180CONFIG_IBM440EP_ERR42=y
164# CONFIG_IPIC is not set 181# CONFIG_IPIC is not set
@@ -191,7 +208,6 @@ CONFIG_HZ=1000
191CONFIG_PREEMPT_NONE=y 208CONFIG_PREEMPT_NONE=y
192# CONFIG_PREEMPT_VOLUNTARY is not set 209# CONFIG_PREEMPT_VOLUNTARY is not set
193# CONFIG_PREEMPT is not set 210# CONFIG_PREEMPT is not set
194CONFIG_RCU_TRACE=y
195CONFIG_BINFMT_ELF=y 211CONFIG_BINFMT_ELF=y
196# CONFIG_BINFMT_MISC is not set 212# CONFIG_BINFMT_MISC is not set
197# CONFIG_MATH_EMULATION is not set 213# CONFIG_MATH_EMULATION is not set
@@ -209,14 +225,18 @@ CONFIG_FLATMEM=y
209CONFIG_FLAT_NODE_MEM_MAP=y 225CONFIG_FLAT_NODE_MEM_MAP=y
210# CONFIG_SPARSEMEM_STATIC is not set 226# CONFIG_SPARSEMEM_STATIC is not set
211# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set 227# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
228CONFIG_PAGEFLAGS_EXTENDED=y
212CONFIG_SPLIT_PTLOCK_CPUS=4 229CONFIG_SPLIT_PTLOCK_CPUS=4
230CONFIG_MIGRATION=y
213CONFIG_RESOURCES_64BIT=y 231CONFIG_RESOURCES_64BIT=y
214CONFIG_ZONE_DMA_FLAG=1 232CONFIG_ZONE_DMA_FLAG=1
215CONFIG_BOUNCE=y 233CONFIG_BOUNCE=y
216CONFIG_VIRT_TO_BUS=y 234CONFIG_VIRT_TO_BUS=y
235CONFIG_FORCE_MAX_ZONEORDER=11
217CONFIG_PROC_DEVICETREE=y 236CONFIG_PROC_DEVICETREE=y
218CONFIG_CMDLINE_BOOL=y 237CONFIG_CMDLINE_BOOL=y
219CONFIG_CMDLINE="ip=on" 238CONFIG_CMDLINE="ip=on"
239CONFIG_EXTRA_TARGETS=""
220CONFIG_SECCOMP=y 240CONFIG_SECCOMP=y
221CONFIG_ISA_DMA_API=y 241CONFIG_ISA_DMA_API=y
222 242
@@ -224,10 +244,13 @@ CONFIG_ISA_DMA_API=y
224# Bus options 244# Bus options
225# 245#
226CONFIG_ZONE_DMA=y 246CONFIG_ZONE_DMA=y
247CONFIG_4xx_SOC=y
248CONFIG_PPC_PCI_CHOICE=y
227# CONFIG_PCI is not set 249# CONFIG_PCI is not set
228# CONFIG_PCI_DOMAINS is not set 250# CONFIG_PCI_DOMAINS is not set
229# CONFIG_PCI_SYSCALL is not set 251# CONFIG_PCI_SYSCALL is not set
230# CONFIG_ARCH_SUPPORTS_MSI is not set 252# CONFIG_ARCH_SUPPORTS_MSI is not set
253# CONFIG_HAS_RAPIDIO is not set
231 254
232# 255#
233# Advanced setup 256# Advanced setup
@@ -237,17 +260,13 @@ CONFIG_ZONE_DMA=y
237# 260#
238# Default settings for advanced configuration options are used 261# Default settings for advanced configuration options are used
239# 262#
240CONFIG_HIGHMEM_START=0xfe000000
241CONFIG_LOWMEM_SIZE=0x30000000 263CONFIG_LOWMEM_SIZE=0x30000000
264CONFIG_PAGE_OFFSET=0xc0000000
242CONFIG_KERNEL_START=0xc0000000 265CONFIG_KERNEL_START=0xc0000000
266CONFIG_PHYSICAL_START=0x00000000
243CONFIG_TASK_SIZE=0xc0000000 267CONFIG_TASK_SIZE=0xc0000000
244CONFIG_CONSISTENT_START=0xff100000 268CONFIG_CONSISTENT_START=0xff100000
245CONFIG_CONSISTENT_SIZE=0x00200000 269CONFIG_CONSISTENT_SIZE=0x00200000
246CONFIG_BOOT_LOAD=0x01000000
247
248#
249# Networking
250#
251CONFIG_NET=y 270CONFIG_NET=y
252 271
253# 272#
@@ -291,8 +310,6 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
291# CONFIG_TCP_MD5SIG is not set 310# CONFIG_TCP_MD5SIG is not set
292# CONFIG_IP_VS is not set 311# CONFIG_IP_VS is not set
293# CONFIG_IPV6 is not set 312# CONFIG_IPV6 is not set
294# CONFIG_INET6_XFRM_TUNNEL is not set
295# CONFIG_INET6_TUNNEL is not set
296# CONFIG_NETWORK_SECMARK is not set 313# CONFIG_NETWORK_SECMARK is not set
297CONFIG_NETFILTER=y 314CONFIG_NETFILTER=y
298# CONFIG_NETFILTER_DEBUG is not set 315# CONFIG_NETFILTER_DEBUG is not set
@@ -318,6 +335,7 @@ CONFIG_NETFILTER_ADVANCED=y
318# CONFIG_ATM is not set 335# CONFIG_ATM is not set
319# CONFIG_BRIDGE is not set 336# CONFIG_BRIDGE is not set
320CONFIG_VLAN_8021Q=y 337CONFIG_VLAN_8021Q=y
338# CONFIG_VLAN_8021Q_GVRP is not set
321# CONFIG_DECNET is not set 339# CONFIG_DECNET is not set
322# CONFIG_LLC2 is not set 340# CONFIG_LLC2 is not set
323# CONFIG_IPX is not set 341# CONFIG_IPX is not set
@@ -368,6 +386,7 @@ CONFIG_MTD_PARTITIONS=y
368# CONFIG_MTD_REDBOOT_PARTS is not set 386# CONFIG_MTD_REDBOOT_PARTS is not set
369# CONFIG_MTD_CMDLINE_PARTS is not set 387# CONFIG_MTD_CMDLINE_PARTS is not set
370CONFIG_MTD_OF_PARTS=y 388CONFIG_MTD_OF_PARTS=y
389# CONFIG_MTD_AR7_PARTS is not set
371 390
372# 391#
373# User Modules And Translation Layers 392# User Modules And Translation Layers
@@ -446,6 +465,7 @@ CONFIG_MTD_NAND_IDS=y
446# 465#
447# CONFIG_MTD_UBI is not set 466# CONFIG_MTD_UBI is not set
448CONFIG_OF_DEVICE=y 467CONFIG_OF_DEVICE=y
468CONFIG_OF_I2C=y
449# CONFIG_PARPORT is not set 469# CONFIG_PARPORT is not set
450CONFIG_BLK_DEV=y 470CONFIG_BLK_DEV=y
451# CONFIG_BLK_DEV_FD is not set 471# CONFIG_BLK_DEV_FD is not set
@@ -460,6 +480,7 @@ CONFIG_BLK_DEV_RAM_SIZE=4096
460# CONFIG_CDROM_PKTCDVD is not set 480# CONFIG_CDROM_PKTCDVD is not set
461# CONFIG_ATA_OVER_ETH is not set 481# CONFIG_ATA_OVER_ETH is not set
462# CONFIG_XILINX_SYSACE is not set 482# CONFIG_XILINX_SYSACE is not set
483# CONFIG_BLK_DEV_HD is not set
463CONFIG_MISC_DEVICES=y 484CONFIG_MISC_DEVICES=y
464# CONFIG_EEPROM_93CX6 is not set 485# CONFIG_EEPROM_93CX6 is not set
465# CONFIG_ENCLOSURE_SERVICES is not set 486# CONFIG_ENCLOSURE_SERVICES is not set
@@ -504,11 +525,11 @@ CONFIG_SCSI_SPI_ATTRS=y
504# CONFIG_SCSI_SAS_LIBSAS is not set 525# CONFIG_SCSI_SAS_LIBSAS is not set
505# CONFIG_SCSI_SRP_ATTRS is not set 526# CONFIG_SCSI_SRP_ATTRS is not set
506# CONFIG_SCSI_LOWLEVEL is not set 527# CONFIG_SCSI_LOWLEVEL is not set
528# CONFIG_SCSI_DH is not set
507# CONFIG_ATA is not set 529# CONFIG_ATA is not set
508# CONFIG_MD is not set 530# CONFIG_MD is not set
509# CONFIG_MACINTOSH_DRIVERS is not set 531# CONFIG_MACINTOSH_DRIVERS is not set
510CONFIG_NETDEVICES=y 532CONFIG_NETDEVICES=y
511# CONFIG_NETDEVICES_MULTIQUEUE is not set
512# CONFIG_DUMMY is not set 533# CONFIG_DUMMY is not set
513# CONFIG_BONDING is not set 534# CONFIG_BONDING is not set
514# CONFIG_MACVLAN is not set 535# CONFIG_MACVLAN is not set
@@ -538,6 +559,7 @@ CONFIG_IBM_NEW_EMAC_ZMII=y
538# 559#
539# CONFIG_WLAN_PRE80211 is not set 560# CONFIG_WLAN_PRE80211 is not set
540# CONFIG_WLAN_80211 is not set 561# CONFIG_WLAN_80211 is not set
562# CONFIG_IWLWIFI_LEDS is not set
541 563
542# 564#
543# USB Network Adapters 565# USB Network Adapters
@@ -571,6 +593,7 @@ CONFIG_IBM_NEW_EMAC_ZMII=y
571# Character devices 593# Character devices
572# 594#
573# CONFIG_VT is not set 595# CONFIG_VT is not set
596CONFIG_DEVKMEM=y
574# CONFIG_SERIAL_NONSTANDARD is not set 597# CONFIG_SERIAL_NONSTANDARD is not set
575 598
576# 599#
@@ -608,44 +631,49 @@ CONFIG_I2C_BOARDINFO=y
608# CONFIG_I2C_CHARDEV is not set 631# CONFIG_I2C_CHARDEV is not set
609 632
610# 633#
611# I2C Algorithms 634# I2C Hardware Bus support
612# 635#
613# CONFIG_I2C_ALGOBIT is not set
614# CONFIG_I2C_ALGOPCF is not set
615# CONFIG_I2C_ALGOPCA is not set
616 636
617# 637#
618# I2C Hardware Bus support 638# I2C system bus drivers (mostly embedded / system-on-chip)
619# 639#
640# CONFIG_I2C_IBM_IIC is not set
620# CONFIG_I2C_MPC is not set 641# CONFIG_I2C_MPC is not set
621# CONFIG_I2C_OCORES is not set 642# CONFIG_I2C_OCORES is not set
622# CONFIG_I2C_PARPORT_LIGHT is not set
623# CONFIG_I2C_SIMTEC is not set 643# CONFIG_I2C_SIMTEC is not set
644
645#
646# External I2C/SMBus adapter drivers
647#
648# CONFIG_I2C_PARPORT_LIGHT is not set
624# CONFIG_I2C_TAOS_EVM is not set 649# CONFIG_I2C_TAOS_EVM is not set
625# CONFIG_I2C_STUB is not set
626# CONFIG_I2C_TINY_USB is not set 650# CONFIG_I2C_TINY_USB is not set
627 651
628# 652#
653# Other I2C/SMBus bus drivers
654#
655# CONFIG_I2C_PCA_PLATFORM is not set
656# CONFIG_I2C_STUB is not set
657
658#
629# Miscellaneous I2C Chip support 659# Miscellaneous I2C Chip support
630# 660#
631# CONFIG_DS1682 is not set 661# CONFIG_DS1682 is not set
662# CONFIG_AT24 is not set
632CONFIG_SENSORS_EEPROM=y 663CONFIG_SENSORS_EEPROM=y
633# CONFIG_SENSORS_PCF8574 is not set 664# CONFIG_SENSORS_PCF8574 is not set
634# CONFIG_PCF8575 is not set 665# CONFIG_PCF8575 is not set
666# CONFIG_SENSORS_PCA9539 is not set
635# CONFIG_SENSORS_PCF8591 is not set 667# CONFIG_SENSORS_PCF8591 is not set
636# CONFIG_TPS65010 is not set
637# CONFIG_SENSORS_MAX6875 is not set 668# CONFIG_SENSORS_MAX6875 is not set
638# CONFIG_SENSORS_TSL2550 is not set 669# CONFIG_SENSORS_TSL2550 is not set
639# CONFIG_I2C_DEBUG_CORE is not set 670# CONFIG_I2C_DEBUG_CORE is not set
640# CONFIG_I2C_DEBUG_ALGO is not set 671# CONFIG_I2C_DEBUG_ALGO is not set
641# CONFIG_I2C_DEBUG_BUS is not set 672# CONFIG_I2C_DEBUG_BUS is not set
642# CONFIG_I2C_DEBUG_CHIP is not set 673# CONFIG_I2C_DEBUG_CHIP is not set
643
644#
645# SPI support
646#
647# CONFIG_SPI is not set 674# CONFIG_SPI is not set
648# CONFIG_SPI_MASTER is not set 675CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
676# CONFIG_GPIOLIB is not set
649# CONFIG_W1 is not set 677# CONFIG_W1 is not set
650# CONFIG_POWER_SUPPLY is not set 678# CONFIG_POWER_SUPPLY is not set
651CONFIG_HWMON=y 679CONFIG_HWMON=y
@@ -658,6 +686,7 @@ CONFIG_HWMON=y
658# CONFIG_SENSORS_ADM1031 is not set 686# CONFIG_SENSORS_ADM1031 is not set
659# CONFIG_SENSORS_ADM9240 is not set 687# CONFIG_SENSORS_ADM9240 is not set
660# CONFIG_SENSORS_ADT7470 is not set 688# CONFIG_SENSORS_ADT7470 is not set
689# CONFIG_SENSORS_ADT7473 is not set
661# CONFIG_SENSORS_ATXP1 is not set 690# CONFIG_SENSORS_ATXP1 is not set
662# CONFIG_SENSORS_DS1621 is not set 691# CONFIG_SENSORS_DS1621 is not set
663# CONFIG_SENSORS_F71805F is not set 692# CONFIG_SENSORS_F71805F is not set
@@ -698,6 +727,7 @@ CONFIG_HWMON=y
698# CONFIG_SENSORS_W83627EHF is not set 727# CONFIG_SENSORS_W83627EHF is not set
699# CONFIG_HWMON_DEBUG_CHIP is not set 728# CONFIG_HWMON_DEBUG_CHIP is not set
700CONFIG_THERMAL=y 729CONFIG_THERMAL=y
730# CONFIG_THERMAL_HWMON is not set
701# CONFIG_WATCHDOG is not set 731# CONFIG_WATCHDOG is not set
702 732
703# 733#
@@ -709,13 +739,24 @@ CONFIG_SSB_POSSIBLE=y
709# 739#
710# Multifunction device drivers 740# Multifunction device drivers
711# 741#
742# CONFIG_MFD_CORE is not set
712# CONFIG_MFD_SM501 is not set 743# CONFIG_MFD_SM501 is not set
744# CONFIG_HTC_PASIC3 is not set
713 745
714# 746#
715# Multimedia devices 747# Multimedia devices
716# 748#
749
750#
751# Multimedia core support
752#
717# CONFIG_VIDEO_DEV is not set 753# CONFIG_VIDEO_DEV is not set
718# CONFIG_DVB_CORE is not set 754# CONFIG_DVB_CORE is not set
755# CONFIG_VIDEO_MEDIA is not set
756
757#
758# Multimedia drivers
759#
719# CONFIG_DAB is not set 760# CONFIG_DAB is not set
720 761
721# 762#
@@ -730,10 +771,6 @@ CONFIG_SSB_POSSIBLE=y
730# Display device support 771# Display device support
731# 772#
732# CONFIG_DISPLAY_SUPPORT is not set 773# CONFIG_DISPLAY_SUPPORT is not set
733
734#
735# Sound
736#
737# CONFIG_SOUND is not set 774# CONFIG_SOUND is not set
738CONFIG_USB_SUPPORT=y 775CONFIG_USB_SUPPORT=y
739CONFIG_USB_ARCH_HAS_HCD=y 776CONFIG_USB_ARCH_HAS_HCD=y
@@ -750,11 +787,15 @@ CONFIG_USB=y
750CONFIG_USB_DEVICE_CLASS=y 787CONFIG_USB_DEVICE_CLASS=y
751# CONFIG_USB_DYNAMIC_MINORS is not set 788# CONFIG_USB_DYNAMIC_MINORS is not set
752# CONFIG_USB_OTG is not set 789# CONFIG_USB_OTG is not set
790# CONFIG_USB_OTG_WHITELIST is not set
791# CONFIG_USB_OTG_BLACKLIST_HUB is not set
753 792
754# 793#
755# USB Host Controller Drivers 794# USB Host Controller Drivers
756# 795#
796# CONFIG_USB_C67X00_HCD is not set
757# CONFIG_USB_ISP116X_HCD is not set 797# CONFIG_USB_ISP116X_HCD is not set
798# CONFIG_USB_ISP1760_HCD is not set
758CONFIG_USB_OHCI_HCD=y 799CONFIG_USB_OHCI_HCD=y
759CONFIG_USB_OHCI_HCD_PPC_OF=y 800CONFIG_USB_OHCI_HCD_PPC_OF=y
760CONFIG_USB_OHCI_HCD_PPC_OF_BE=y 801CONFIG_USB_OHCI_HCD_PPC_OF_BE=y
@@ -770,6 +811,7 @@ CONFIG_USB_OHCI_LITTLE_ENDIAN=y
770# 811#
771# CONFIG_USB_ACM is not set 812# CONFIG_USB_ACM is not set
772# CONFIG_USB_PRINTER is not set 813# CONFIG_USB_PRINTER is not set
814# CONFIG_USB_WDM is not set
773 815
774# 816#
775# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 817# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
@@ -790,6 +832,7 @@ CONFIG_USB_STORAGE=y
790# CONFIG_USB_STORAGE_JUMPSHOT is not set 832# CONFIG_USB_STORAGE_JUMPSHOT is not set
791# CONFIG_USB_STORAGE_ALAUDA is not set 833# CONFIG_USB_STORAGE_ALAUDA is not set
792# CONFIG_USB_STORAGE_KARMA is not set 834# CONFIG_USB_STORAGE_KARMA is not set
835# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
793# CONFIG_USB_LIBUSUAL is not set 836# CONFIG_USB_LIBUSUAL is not set
794 837
795# 838#
@@ -825,6 +868,7 @@ CONFIG_USB_MON=y
825# CONFIG_USB_LD is not set 868# CONFIG_USB_LD is not set
826# CONFIG_USB_TRANCEVIBRATOR is not set 869# CONFIG_USB_TRANCEVIBRATOR is not set
827# CONFIG_USB_IOWARRIOR is not set 870# CONFIG_USB_IOWARRIOR is not set
871# CONFIG_USB_ISIGHTFW is not set
828# CONFIG_USB_GADGET is not set 872# CONFIG_USB_GADGET is not set
829CONFIG_MMC=m 873CONFIG_MMC=m
830# CONFIG_MMC_DEBUG is not set 874# CONFIG_MMC_DEBUG is not set
@@ -836,19 +880,19 @@ CONFIG_MMC=m
836CONFIG_MMC_BLOCK=m 880CONFIG_MMC_BLOCK=m
837CONFIG_MMC_BLOCK_BOUNCE=y 881CONFIG_MMC_BLOCK_BOUNCE=y
838# CONFIG_SDIO_UART is not set 882# CONFIG_SDIO_UART is not set
883# CONFIG_MMC_TEST is not set
839 884
840# 885#
841# MMC/SD Host Controller Drivers 886# MMC/SD Host Controller Drivers
842# 887#
888# CONFIG_MMC_SDHCI is not set
843# CONFIG_MMC_WBSD is not set 889# CONFIG_MMC_WBSD is not set
844# CONFIG_MEMSTICK is not set 890# CONFIG_MEMSTICK is not set
845# CONFIG_NEW_LEDS is not set 891# CONFIG_NEW_LEDS is not set
892# CONFIG_ACCESSIBILITY is not set
846# CONFIG_EDAC is not set 893# CONFIG_EDAC is not set
847# CONFIG_RTC_CLASS is not set 894# CONFIG_RTC_CLASS is not set
848 895# CONFIG_DMADEVICES is not set
849#
850# Userspace I/O
851#
852# CONFIG_UIO is not set 896# CONFIG_UIO is not set
853 897
854# 898#
@@ -863,7 +907,6 @@ CONFIG_EXT2_FS=y
863# CONFIG_JFS_FS is not set 907# CONFIG_JFS_FS is not set
864# CONFIG_FS_POSIX_ACL is not set 908# CONFIG_FS_POSIX_ACL is not set
865# CONFIG_XFS_FS is not set 909# CONFIG_XFS_FS is not set
866# CONFIG_GFS2_FS is not set
867# CONFIG_OCFS2_FS is not set 910# CONFIG_OCFS2_FS is not set
868CONFIG_DNOTIFY=y 911CONFIG_DNOTIFY=y
869CONFIG_INOTIFY=y 912CONFIG_INOTIFY=y
@@ -924,6 +967,7 @@ CONFIG_JFFS2_RTIME=y
924CONFIG_CRAMFS=y 967CONFIG_CRAMFS=y
925# CONFIG_VXFS_FS is not set 968# CONFIG_VXFS_FS is not set
926# CONFIG_MINIX_FS is not set 969# CONFIG_MINIX_FS is not set
970# CONFIG_OMFS_FS is not set
927# CONFIG_HPFS_FS is not set 971# CONFIG_HPFS_FS is not set
928# CONFIG_QNX4FS_FS is not set 972# CONFIG_QNX4FS_FS is not set
929# CONFIG_ROMFS_FS is not set 973# CONFIG_ROMFS_FS is not set
@@ -934,14 +978,12 @@ CONFIG_NFS_FS=y
934CONFIG_NFS_V3=y 978CONFIG_NFS_V3=y
935# CONFIG_NFS_V3_ACL is not set 979# CONFIG_NFS_V3_ACL is not set
936# CONFIG_NFS_V4 is not set 980# CONFIG_NFS_V4 is not set
937# CONFIG_NFS_DIRECTIO is not set
938# CONFIG_NFSD is not set
939CONFIG_ROOT_NFS=y 981CONFIG_ROOT_NFS=y
982# CONFIG_NFSD is not set
940CONFIG_LOCKD=y 983CONFIG_LOCKD=y
941CONFIG_LOCKD_V4=y 984CONFIG_LOCKD_V4=y
942CONFIG_NFS_COMMON=y 985CONFIG_NFS_COMMON=y
943CONFIG_SUNRPC=y 986CONFIG_SUNRPC=y
944# CONFIG_SUNRPC_BIND34 is not set
945# CONFIG_RPCSEC_GSS_KRB5 is not set 987# CONFIG_RPCSEC_GSS_KRB5 is not set
946# CONFIG_RPCSEC_GSS_SPKM3 is not set 988# CONFIG_RPCSEC_GSS_SPKM3 is not set
947# CONFIG_SMB_FS is not set 989# CONFIG_SMB_FS is not set
@@ -1001,8 +1043,10 @@ CONFIG_NLS_UTF8=y
1001# Library routines 1043# Library routines
1002# 1044#
1003CONFIG_BITREVERSE=y 1045CONFIG_BITREVERSE=y
1046# CONFIG_GENERIC_FIND_FIRST_BIT is not set
1004CONFIG_CRC_CCITT=y 1047CONFIG_CRC_CCITT=y
1005# CONFIG_CRC16 is not set 1048# CONFIG_CRC16 is not set
1049CONFIG_CRC_T10DIF=y
1006# CONFIG_CRC_ITU_T is not set 1050# CONFIG_CRC_ITU_T is not set
1007CONFIG_CRC32=y 1051CONFIG_CRC32=y
1008# CONFIG_CRC7 is not set 1052# CONFIG_CRC7 is not set
@@ -1013,6 +1057,7 @@ CONFIG_PLIST=y
1013CONFIG_HAS_IOMEM=y 1057CONFIG_HAS_IOMEM=y
1014CONFIG_HAS_IOPORT=y 1058CONFIG_HAS_IOPORT=y
1015CONFIG_HAS_DMA=y 1059CONFIG_HAS_DMA=y
1060CONFIG_HAVE_LMB=y
1016 1061
1017# 1062#
1018# Kernel hacking 1063# Kernel hacking
@@ -1020,6 +1065,7 @@ CONFIG_HAS_DMA=y
1020# CONFIG_PRINTK_TIME is not set 1065# CONFIG_PRINTK_TIME is not set
1021CONFIG_ENABLE_WARN_DEPRECATED=y 1066CONFIG_ENABLE_WARN_DEPRECATED=y
1022CONFIG_ENABLE_MUST_CHECK=y 1067CONFIG_ENABLE_MUST_CHECK=y
1068CONFIG_FRAME_WARN=1024
1023CONFIG_MAGIC_SYSRQ=y 1069CONFIG_MAGIC_SYSRQ=y
1024# CONFIG_UNUSED_SYMBOLS is not set 1070# CONFIG_UNUSED_SYMBOLS is not set
1025CONFIG_DEBUG_FS=y 1071CONFIG_DEBUG_FS=y
@@ -1027,9 +1073,12 @@ CONFIG_DEBUG_FS=y
1027CONFIG_DEBUG_KERNEL=y 1073CONFIG_DEBUG_KERNEL=y
1028# CONFIG_DEBUG_SHIRQ is not set 1074# CONFIG_DEBUG_SHIRQ is not set
1029CONFIG_DETECT_SOFTLOCKUP=y 1075CONFIG_DETECT_SOFTLOCKUP=y
1076# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
1077CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
1030# CONFIG_SCHED_DEBUG is not set 1078# CONFIG_SCHED_DEBUG is not set
1031# CONFIG_SCHEDSTATS is not set 1079# CONFIG_SCHEDSTATS is not set
1032# CONFIG_TIMER_STATS is not set 1080# CONFIG_TIMER_STATS is not set
1081# CONFIG_DEBUG_OBJECTS is not set
1033# CONFIG_DEBUG_SLAB is not set 1082# CONFIG_DEBUG_SLAB is not set
1034# CONFIG_DEBUG_RT_MUTEXES is not set 1083# CONFIG_DEBUG_RT_MUTEXES is not set
1035# CONFIG_RT_MUTEX_TESTER is not set 1084# CONFIG_RT_MUTEX_TESTER is not set
@@ -1041,17 +1090,30 @@ CONFIG_DETECT_SOFTLOCKUP=y
1041# CONFIG_DEBUG_BUGVERBOSE is not set 1090# CONFIG_DEBUG_BUGVERBOSE is not set
1042CONFIG_DEBUG_INFO=y 1091CONFIG_DEBUG_INFO=y
1043# CONFIG_DEBUG_VM is not set 1092# CONFIG_DEBUG_VM is not set
1093# CONFIG_DEBUG_WRITECOUNT is not set
1094# CONFIG_DEBUG_MEMORY_INIT is not set
1044# CONFIG_DEBUG_LIST is not set 1095# CONFIG_DEBUG_LIST is not set
1045# CONFIG_DEBUG_SG is not set 1096# CONFIG_DEBUG_SG is not set
1046# CONFIG_BOOT_PRINTK_DELAY is not set 1097# CONFIG_BOOT_PRINTK_DELAY is not set
1047# CONFIG_RCU_TORTURE_TEST is not set 1098# CONFIG_RCU_TORTURE_TEST is not set
1048# CONFIG_BACKTRACE_SELF_TEST is not set 1099# CONFIG_BACKTRACE_SELF_TEST is not set
1049# CONFIG_FAULT_INJECTION is not set 1100# CONFIG_FAULT_INJECTION is not set
1101# CONFIG_LATENCYTOP is not set
1102CONFIG_HAVE_FTRACE=y
1103CONFIG_HAVE_DYNAMIC_FTRACE=y
1104# CONFIG_FTRACE is not set
1105# CONFIG_SCHED_TRACER is not set
1106# CONFIG_CONTEXT_SWITCH_TRACER is not set
1050# CONFIG_SAMPLES is not set 1107# CONFIG_SAMPLES is not set
1108CONFIG_HAVE_ARCH_KGDB=y
1109# CONFIG_KGDB is not set
1051# CONFIG_DEBUG_STACKOVERFLOW is not set 1110# CONFIG_DEBUG_STACKOVERFLOW is not set
1052# CONFIG_DEBUG_STACK_USAGE is not set 1111# CONFIG_DEBUG_STACK_USAGE is not set
1053# CONFIG_DEBUG_PAGEALLOC is not set 1112# CONFIG_DEBUG_PAGEALLOC is not set
1054# CONFIG_DEBUGGER is not set 1113# CONFIG_CODE_PATCHING_SELFTEST is not set
1114# CONFIG_FTR_FIXUP_SELFTEST is not set
1115# CONFIG_XMON is not set
1116# CONFIG_IRQSTACKS is not set
1055# CONFIG_VIRQ_DEBUG is not set 1117# CONFIG_VIRQ_DEBUG is not set
1056CONFIG_BDI_SWITCH=y 1118CONFIG_BDI_SWITCH=y
1057# CONFIG_PPC_EARLY_DEBUG is not set 1119# CONFIG_PPC_EARLY_DEBUG is not set
@@ -1063,48 +1125,82 @@ CONFIG_BDI_SWITCH=y
1063# CONFIG_SECURITY is not set 1125# CONFIG_SECURITY is not set
1064# CONFIG_SECURITY_FILE_CAPABILITIES is not set 1126# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1065CONFIG_CRYPTO=y 1127CONFIG_CRYPTO=y
1066# CONFIG_CRYPTO_SEQIV is not set 1128
1129#
1130# Crypto core or helper
1131#
1067# CONFIG_CRYPTO_MANAGER is not set 1132# CONFIG_CRYPTO_MANAGER is not set
1133# CONFIG_CRYPTO_GF128MUL is not set
1134# CONFIG_CRYPTO_NULL is not set
1135# CONFIG_CRYPTO_CRYPTD is not set
1136# CONFIG_CRYPTO_AUTHENC is not set
1137# CONFIG_CRYPTO_TEST is not set
1138
1139#
1140# Authenticated Encryption with Associated Data
1141#
1142# CONFIG_CRYPTO_CCM is not set
1143# CONFIG_CRYPTO_GCM is not set
1144# CONFIG_CRYPTO_SEQIV is not set
1145
1146#
1147# Block modes
1148#
1149# CONFIG_CRYPTO_CBC is not set
1150# CONFIG_CRYPTO_CTR is not set
1151# CONFIG_CRYPTO_CTS is not set
1152# CONFIG_CRYPTO_ECB is not set
1153# CONFIG_CRYPTO_LRW is not set
1154# CONFIG_CRYPTO_PCBC is not set
1155# CONFIG_CRYPTO_XTS is not set
1156
1157#
1158# Hash modes
1159#
1068# CONFIG_CRYPTO_HMAC is not set 1160# CONFIG_CRYPTO_HMAC is not set
1069# CONFIG_CRYPTO_XCBC is not set 1161# CONFIG_CRYPTO_XCBC is not set
1070# CONFIG_CRYPTO_NULL is not set 1162
1163#
1164# Digest
1165#
1166# CONFIG_CRYPTO_CRC32C is not set
1071# CONFIG_CRYPTO_MD4 is not set 1167# CONFIG_CRYPTO_MD4 is not set
1072# CONFIG_CRYPTO_MD5 is not set 1168# CONFIG_CRYPTO_MD5 is not set
1169# CONFIG_CRYPTO_MICHAEL_MIC is not set
1170# CONFIG_CRYPTO_RMD128 is not set
1171# CONFIG_CRYPTO_RMD160 is not set
1172# CONFIG_CRYPTO_RMD256 is not set
1173# CONFIG_CRYPTO_RMD320 is not set
1073# CONFIG_CRYPTO_SHA1 is not set 1174# CONFIG_CRYPTO_SHA1 is not set
1074# CONFIG_CRYPTO_SHA256 is not set 1175# CONFIG_CRYPTO_SHA256 is not set
1075# CONFIG_CRYPTO_SHA512 is not set 1176# CONFIG_CRYPTO_SHA512 is not set
1076# CONFIG_CRYPTO_WP512 is not set
1077# CONFIG_CRYPTO_TGR192 is not set 1177# CONFIG_CRYPTO_TGR192 is not set
1078# CONFIG_CRYPTO_GF128MUL is not set 1178# CONFIG_CRYPTO_WP512 is not set
1079# CONFIG_CRYPTO_ECB is not set 1179
1080# CONFIG_CRYPTO_CBC is not set 1180#
1081# CONFIG_CRYPTO_PCBC is not set 1181# Ciphers
1082# CONFIG_CRYPTO_LRW is not set 1182#
1083# CONFIG_CRYPTO_XTS is not set
1084# CONFIG_CRYPTO_CTR is not set
1085# CONFIG_CRYPTO_GCM is not set
1086# CONFIG_CRYPTO_CCM is not set
1087# CONFIG_CRYPTO_CRYPTD is not set
1088# CONFIG_CRYPTO_DES is not set
1089# CONFIG_CRYPTO_FCRYPT is not set
1090# CONFIG_CRYPTO_BLOWFISH is not set
1091# CONFIG_CRYPTO_TWOFISH is not set
1092# CONFIG_CRYPTO_SERPENT is not set
1093# CONFIG_CRYPTO_AES is not set 1183# CONFIG_CRYPTO_AES is not set
1184# CONFIG_CRYPTO_ANUBIS is not set
1185# CONFIG_CRYPTO_ARC4 is not set
1186# CONFIG_CRYPTO_BLOWFISH is not set
1187# CONFIG_CRYPTO_CAMELLIA is not set
1094# CONFIG_CRYPTO_CAST5 is not set 1188# CONFIG_CRYPTO_CAST5 is not set
1095# CONFIG_CRYPTO_CAST6 is not set 1189# CONFIG_CRYPTO_CAST6 is not set
1096# CONFIG_CRYPTO_TEA is not set 1190# CONFIG_CRYPTO_DES is not set
1097# CONFIG_CRYPTO_ARC4 is not set 1191# CONFIG_CRYPTO_FCRYPT is not set
1098# CONFIG_CRYPTO_KHAZAD is not set 1192# CONFIG_CRYPTO_KHAZAD is not set
1099# CONFIG_CRYPTO_ANUBIS is not set
1100# CONFIG_CRYPTO_SEED is not set
1101# CONFIG_CRYPTO_SALSA20 is not set 1193# CONFIG_CRYPTO_SALSA20 is not set
1194# CONFIG_CRYPTO_SEED is not set
1195# CONFIG_CRYPTO_SERPENT is not set
1196# CONFIG_CRYPTO_TEA is not set
1197# CONFIG_CRYPTO_TWOFISH is not set
1198
1199#
1200# Compression
1201#
1102# CONFIG_CRYPTO_DEFLATE is not set 1202# CONFIG_CRYPTO_DEFLATE is not set
1103# CONFIG_CRYPTO_MICHAEL_MIC is not set
1104# CONFIG_CRYPTO_CRC32C is not set
1105# CONFIG_CRYPTO_CAMELLIA is not set
1106# CONFIG_CRYPTO_TEST is not set
1107# CONFIG_CRYPTO_AUTHENC is not set
1108# CONFIG_CRYPTO_LZO is not set 1203# CONFIG_CRYPTO_LZO is not set
1109CONFIG_CRYPTO_HW=y 1204CONFIG_CRYPTO_HW=y
1110# CONFIG_PPC_CLOCK is not set 1205# CONFIG_PPC_CLOCK is not set
1206# CONFIG_VIRTUALIZATION is not set
diff --git a/arch/powerpc/configs/ppc40x_defconfig b/arch/powerpc/configs/ppc40x_defconfig
index 9d0140e3838e..6a5b713a07e0 100644
--- a/arch/powerpc/configs/ppc40x_defconfig
+++ b/arch/powerpc/configs/ppc40x_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.25-rc9 3# Linux kernel version: 2.6.27-rc1
4# Tue Apr 15 08:46:44 2008 4# Tue Aug 5 12:34:33 2008
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
@@ -26,8 +26,12 @@ CONFIG_GENERIC_TIME=y
26CONFIG_GENERIC_TIME_VSYSCALL=y 26CONFIG_GENERIC_TIME_VSYSCALL=y
27CONFIG_GENERIC_CLOCKEVENTS=y 27CONFIG_GENERIC_CLOCKEVENTS=y
28CONFIG_GENERIC_HARDIRQS=y 28CONFIG_GENERIC_HARDIRQS=y
29# CONFIG_HAVE_GET_USER_PAGES_FAST is not set
29# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 30# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
30CONFIG_IRQ_PER_CPU=y 31CONFIG_IRQ_PER_CPU=y
32CONFIG_STACKTRACE_SUPPORT=y
33CONFIG_HAVE_LATENCYTOP_SUPPORT=y
34CONFIG_LOCKDEP_SUPPORT=y
31CONFIG_RWSEM_XCHGADD_ALGORITHM=y 35CONFIG_RWSEM_XCHGADD_ALGORITHM=y
32CONFIG_ARCH_HAS_ILOG2_U32=y 36CONFIG_ARCH_HAS_ILOG2_U32=y
33CONFIG_GENERIC_HWEIGHT=y 37CONFIG_GENERIC_HWEIGHT=y
@@ -84,6 +88,7 @@ CONFIG_INITRAMFS_SOURCE=""
84CONFIG_SYSCTL=y 88CONFIG_SYSCTL=y
85CONFIG_EMBEDDED=y 89CONFIG_EMBEDDED=y
86CONFIG_SYSCTL_SYSCALL=y 90CONFIG_SYSCTL_SYSCALL=y
91CONFIG_SYSCTL_SYSCALL_CHECK=y
87CONFIG_KALLSYMS=y 92CONFIG_KALLSYMS=y
88CONFIG_KALLSYMS_ALL=y 93CONFIG_KALLSYMS_ALL=y
89CONFIG_KALLSYMS_EXTRA_PASS=y 94CONFIG_KALLSYMS_EXTRA_PASS=y
@@ -109,14 +114,22 @@ CONFIG_SLUB=y
109# CONFIG_MARKERS is not set 114# CONFIG_MARKERS is not set
110CONFIG_HAVE_OPROFILE=y 115CONFIG_HAVE_OPROFILE=y
111# CONFIG_KPROBES is not set 116# CONFIG_KPROBES is not set
117CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y
118CONFIG_HAVE_IOREMAP_PROT=y
112CONFIG_HAVE_KPROBES=y 119CONFIG_HAVE_KPROBES=y
113CONFIG_HAVE_KRETPROBES=y 120CONFIG_HAVE_KRETPROBES=y
121CONFIG_HAVE_ARCH_TRACEHOOK=y
122# CONFIG_HAVE_DMA_ATTRS is not set
123# CONFIG_USE_GENERIC_SMP_HELPERS is not set
124# CONFIG_HAVE_CLK is not set
114CONFIG_PROC_PAGE_MONITOR=y 125CONFIG_PROC_PAGE_MONITOR=y
126# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
115CONFIG_SLABINFO=y 127CONFIG_SLABINFO=y
116CONFIG_RT_MUTEXES=y 128CONFIG_RT_MUTEXES=y
117# CONFIG_TINY_SHMEM is not set 129# CONFIG_TINY_SHMEM is not set
118CONFIG_BASE_SMALL=0 130CONFIG_BASE_SMALL=0
119CONFIG_MODULES=y 131CONFIG_MODULES=y
132# CONFIG_MODULE_FORCE_LOAD is not set
120CONFIG_MODULE_UNLOAD=y 133CONFIG_MODULE_UNLOAD=y
121# CONFIG_MODULE_FORCE_UNLOAD is not set 134# CONFIG_MODULE_FORCE_UNLOAD is not set
122# CONFIG_MODVERSIONS is not set 135# CONFIG_MODVERSIONS is not set
@@ -127,6 +140,7 @@ CONFIG_LBD=y
127# CONFIG_BLK_DEV_IO_TRACE is not set 140# CONFIG_BLK_DEV_IO_TRACE is not set
128# CONFIG_LSF is not set 141# CONFIG_LSF is not set
129# CONFIG_BLK_DEV_BSG is not set 142# CONFIG_BLK_DEV_BSG is not set
143# CONFIG_BLK_DEV_INTEGRITY is not set
130 144
131# 145#
132# IO Schedulers 146# IO Schedulers
@@ -146,11 +160,10 @@ CONFIG_PPC4xx_PCI_EXPRESS=y
146# 160#
147# Platform support 161# Platform support
148# 162#
149# CONFIG_PPC_MPC512x is not set
150# CONFIG_PPC_MPC5121 is not set
151# CONFIG_PPC_CELL is not set 163# CONFIG_PPC_CELL is not set
152# CONFIG_PPC_CELL_NATIVE is not set 164# CONFIG_PPC_CELL_NATIVE is not set
153# CONFIG_PQ2ADS is not set 165# CONFIG_PQ2ADS is not set
166CONFIG_XILINX_VIRTEX=y
154CONFIG_EP405=y 167CONFIG_EP405=y
155CONFIG_KILAUEA=y 168CONFIG_KILAUEA=y
156CONFIG_MAKALU=y 169CONFIG_MAKALU=y
@@ -158,7 +171,6 @@ CONFIG_WALNUT=y
158CONFIG_XILINX_VIRTEX_GENERIC_BOARD=y 171CONFIG_XILINX_VIRTEX_GENERIC_BOARD=y
159CONFIG_405GP=y 172CONFIG_405GP=y
160CONFIG_405EX=y 173CONFIG_405EX=y
161CONFIG_XILINX_VIRTEX=y
162CONFIG_XILINX_VIRTEX_II_PRO=y 174CONFIG_XILINX_VIRTEX_II_PRO=y
163CONFIG_XILINX_VIRTEX_4_FX=y 175CONFIG_XILINX_VIRTEX_4_FX=y
164CONFIG_IBM405_ERR77=y 176CONFIG_IBM405_ERR77=y
@@ -211,7 +223,9 @@ CONFIG_FLATMEM=y
211CONFIG_FLAT_NODE_MEM_MAP=y 223CONFIG_FLAT_NODE_MEM_MAP=y
212# CONFIG_SPARSEMEM_STATIC is not set 224# CONFIG_SPARSEMEM_STATIC is not set
213# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set 225# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
226CONFIG_PAGEFLAGS_EXTENDED=y
214CONFIG_SPLIT_PTLOCK_CPUS=4 227CONFIG_SPLIT_PTLOCK_CPUS=4
228CONFIG_MIGRATION=y
215CONFIG_RESOURCES_64BIT=y 229CONFIG_RESOURCES_64BIT=y
216CONFIG_ZONE_DMA_FLAG=1 230CONFIG_ZONE_DMA_FLAG=1
217CONFIG_BOUNCE=y 231CONFIG_BOUNCE=y
@@ -219,6 +233,7 @@ CONFIG_VIRT_TO_BUS=y
219CONFIG_FORCE_MAX_ZONEORDER=11 233CONFIG_FORCE_MAX_ZONEORDER=11
220CONFIG_PROC_DEVICETREE=y 234CONFIG_PROC_DEVICETREE=y
221# CONFIG_CMDLINE_BOOL is not set 235# CONFIG_CMDLINE_BOOL is not set
236CONFIG_EXTRA_TARGETS=""
222# CONFIG_PM is not set 237# CONFIG_PM is not set
223CONFIG_SECCOMP=y 238CONFIG_SECCOMP=y
224CONFIG_ISA_DMA_API=y 239CONFIG_ISA_DMA_API=y
@@ -229,6 +244,7 @@ CONFIG_ISA_DMA_API=y
229CONFIG_ZONE_DMA=y 244CONFIG_ZONE_DMA=y
230CONFIG_PPC_INDIRECT_PCI=y 245CONFIG_PPC_INDIRECT_PCI=y
231CONFIG_4xx_SOC=y 246CONFIG_4xx_SOC=y
247CONFIG_PPC_PCI_CHOICE=y
232CONFIG_PCI=y 248CONFIG_PCI=y
233CONFIG_PCI_DOMAINS=y 249CONFIG_PCI_DOMAINS=y
234CONFIG_PCI_SYSCALL=y 250CONFIG_PCI_SYSCALL=y
@@ -239,6 +255,7 @@ CONFIG_ARCH_SUPPORTS_MSI=y
239# CONFIG_PCI_DEBUG is not set 255# CONFIG_PCI_DEBUG is not set
240# CONFIG_PCCARD is not set 256# CONFIG_PCCARD is not set
241# CONFIG_HOTPLUG_PCI is not set 257# CONFIG_HOTPLUG_PCI is not set
258# CONFIG_HAS_RAPIDIO is not set
242 259
243# 260#
244# Advanced setup 261# Advanced setup
@@ -248,17 +265,13 @@ CONFIG_ARCH_SUPPORTS_MSI=y
248# 265#
249# Default settings for advanced configuration options are used 266# Default settings for advanced configuration options are used
250# 267#
251CONFIG_HIGHMEM_START=0xfe000000
252CONFIG_LOWMEM_SIZE=0x30000000 268CONFIG_LOWMEM_SIZE=0x30000000
269CONFIG_PAGE_OFFSET=0xc0000000
253CONFIG_KERNEL_START=0xc0000000 270CONFIG_KERNEL_START=0xc0000000
271CONFIG_PHYSICAL_START=0x00000000
254CONFIG_TASK_SIZE=0xc0000000 272CONFIG_TASK_SIZE=0xc0000000
255CONFIG_CONSISTENT_START=0xff100000 273CONFIG_CONSISTENT_START=0xff100000
256CONFIG_CONSISTENT_SIZE=0x00200000 274CONFIG_CONSISTENT_SIZE=0x00200000
257CONFIG_BOOT_LOAD=0x00400000
258
259#
260# Networking
261#
262CONFIG_NET=y 275CONFIG_NET=y
263 276
264# 277#
@@ -267,6 +280,11 @@ CONFIG_NET=y
267CONFIG_PACKET=y 280CONFIG_PACKET=y
268# CONFIG_PACKET_MMAP is not set 281# CONFIG_PACKET_MMAP is not set
269CONFIG_UNIX=y 282CONFIG_UNIX=y
283CONFIG_XFRM=y
284# CONFIG_XFRM_USER is not set
285# CONFIG_XFRM_SUB_POLICY is not set
286# CONFIG_XFRM_MIGRATE is not set
287# CONFIG_XFRM_STATISTICS is not set
270# CONFIG_NET_KEY is not set 288# CONFIG_NET_KEY is not set
271CONFIG_INET=y 289CONFIG_INET=y
272# CONFIG_IP_MULTICAST is not set 290# CONFIG_IP_MULTICAST is not set
@@ -284,7 +302,7 @@ CONFIG_IP_PNP_BOOTP=y
284# CONFIG_INET_ESP is not set 302# CONFIG_INET_ESP is not set
285# CONFIG_INET_IPCOMP is not set 303# CONFIG_INET_IPCOMP is not set
286# CONFIG_INET_XFRM_TUNNEL is not set 304# CONFIG_INET_XFRM_TUNNEL is not set
287# CONFIG_INET_TUNNEL is not set 305CONFIG_INET_TUNNEL=m
288# CONFIG_INET_XFRM_MODE_TRANSPORT is not set 306# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
289# CONFIG_INET_XFRM_MODE_TUNNEL is not set 307# CONFIG_INET_XFRM_MODE_TUNNEL is not set
290# CONFIG_INET_XFRM_MODE_BEET is not set 308# CONFIG_INET_XFRM_MODE_BEET is not set
@@ -295,9 +313,25 @@ CONFIG_INET_TCP_DIAG=y
295CONFIG_TCP_CONG_CUBIC=y 313CONFIG_TCP_CONG_CUBIC=y
296CONFIG_DEFAULT_TCP_CONG="cubic" 314CONFIG_DEFAULT_TCP_CONG="cubic"
297# CONFIG_TCP_MD5SIG is not set 315# CONFIG_TCP_MD5SIG is not set
298# CONFIG_IPV6 is not set 316CONFIG_IPV6=m
317# CONFIG_IPV6_PRIVACY is not set
318# CONFIG_IPV6_ROUTER_PREF is not set
319# CONFIG_IPV6_OPTIMISTIC_DAD is not set
320# CONFIG_INET6_AH is not set
321# CONFIG_INET6_ESP is not set
322# CONFIG_INET6_IPCOMP is not set
323# CONFIG_IPV6_MIP6 is not set
299# CONFIG_INET6_XFRM_TUNNEL is not set 324# CONFIG_INET6_XFRM_TUNNEL is not set
300# CONFIG_INET6_TUNNEL is not set 325# CONFIG_INET6_TUNNEL is not set
326CONFIG_INET6_XFRM_MODE_TRANSPORT=m
327CONFIG_INET6_XFRM_MODE_TUNNEL=m
328CONFIG_INET6_XFRM_MODE_BEET=m
329# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
330CONFIG_IPV6_SIT=m
331CONFIG_IPV6_NDISC_NODETYPE=y
332# CONFIG_IPV6_TUNNEL is not set
333# CONFIG_IPV6_MULTIPLE_TABLES is not set
334# CONFIG_IPV6_MROUTE is not set
301# CONFIG_NETWORK_SECMARK is not set 335# CONFIG_NETWORK_SECMARK is not set
302# CONFIG_NETFILTER is not set 336# CONFIG_NETFILTER is not set
303# CONFIG_IP_DCCP is not set 337# CONFIG_IP_DCCP is not set
@@ -347,6 +381,8 @@ CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
347CONFIG_STANDALONE=y 381CONFIG_STANDALONE=y
348CONFIG_PREVENT_FIRMWARE_BUILD=y 382CONFIG_PREVENT_FIRMWARE_BUILD=y
349CONFIG_FW_LOADER=y 383CONFIG_FW_LOADER=y
384CONFIG_FIRMWARE_IN_KERNEL=y
385CONFIG_EXTRA_FIRMWARE=""
350# CONFIG_DEBUG_DRIVER is not set 386# CONFIG_DEBUG_DRIVER is not set
351# CONFIG_DEBUG_DEVRES is not set 387# CONFIG_DEBUG_DEVRES is not set
352# CONFIG_SYS_HYPERVISOR is not set 388# CONFIG_SYS_HYPERVISOR is not set
@@ -359,6 +395,7 @@ CONFIG_MTD_PARTITIONS=y
359# CONFIG_MTD_REDBOOT_PARTS is not set 395# CONFIG_MTD_REDBOOT_PARTS is not set
360CONFIG_MTD_CMDLINE_PARTS=y 396CONFIG_MTD_CMDLINE_PARTS=y
361CONFIG_MTD_OF_PARTS=y 397CONFIG_MTD_OF_PARTS=y
398# CONFIG_MTD_AR7_PARTS is not set
362 399
363# 400#
364# User Modules And Translation Layers 401# User Modules And Translation Layers
@@ -429,8 +466,17 @@ CONFIG_MTD_PHYSMAP_OF=y
429# 466#
430# UBI - Unsorted block images 467# UBI - Unsorted block images
431# 468#
432# CONFIG_MTD_UBI is not set 469CONFIG_MTD_UBI=m
470CONFIG_MTD_UBI_WL_THRESHOLD=4096
471CONFIG_MTD_UBI_BEB_RESERVE=1
472CONFIG_MTD_UBI_GLUEBI=y
473
474#
475# UBI debugging options
476#
477# CONFIG_MTD_UBI_DEBUG is not set
433CONFIG_OF_DEVICE=y 478CONFIG_OF_DEVICE=y
479CONFIG_OF_I2C=m
434# CONFIG_PARPORT is not set 480# CONFIG_PARPORT is not set
435CONFIG_BLK_DEV=y 481CONFIG_BLK_DEV=y
436# CONFIG_BLK_DEV_FD is not set 482# CONFIG_BLK_DEV_FD is not set
@@ -449,12 +495,14 @@ CONFIG_BLK_DEV_RAM_SIZE=35000
449# CONFIG_CDROM_PKTCDVD is not set 495# CONFIG_CDROM_PKTCDVD is not set
450# CONFIG_ATA_OVER_ETH is not set 496# CONFIG_ATA_OVER_ETH is not set
451# CONFIG_XILINX_SYSACE is not set 497# CONFIG_XILINX_SYSACE is not set
498# CONFIG_BLK_DEV_HD is not set
452CONFIG_MISC_DEVICES=y 499CONFIG_MISC_DEVICES=y
453# CONFIG_PHANTOM is not set 500# CONFIG_PHANTOM is not set
454# CONFIG_EEPROM_93CX6 is not set 501# CONFIG_EEPROM_93CX6 is not set
455# CONFIG_SGI_IOC4 is not set 502# CONFIG_SGI_IOC4 is not set
456# CONFIG_TIFM_CORE is not set 503# CONFIG_TIFM_CORE is not set
457# CONFIG_ENCLOSURE_SERVICES is not set 504# CONFIG_ENCLOSURE_SERVICES is not set
505# CONFIG_HP_ILO is not set
458CONFIG_HAVE_IDE=y 506CONFIG_HAVE_IDE=y
459# CONFIG_IDE is not set 507# CONFIG_IDE is not set
460 508
@@ -472,12 +520,15 @@ CONFIG_HAVE_IDE=y
472# 520#
473# IEEE 1394 (FireWire) support 521# IEEE 1394 (FireWire) support
474# 522#
523
524#
525# Enable only one of the two stacks, unless you know what you are doing
526#
475# CONFIG_FIREWIRE is not set 527# CONFIG_FIREWIRE is not set
476# CONFIG_IEEE1394 is not set 528# CONFIG_IEEE1394 is not set
477# CONFIG_I2O is not set 529# CONFIG_I2O is not set
478# CONFIG_MACINTOSH_DRIVERS is not set 530# CONFIG_MACINTOSH_DRIVERS is not set
479CONFIG_NETDEVICES=y 531CONFIG_NETDEVICES=y
480# CONFIG_NETDEVICES_MULTIQUEUE is not set
481# CONFIG_DUMMY is not set 532# CONFIG_DUMMY is not set
482# CONFIG_BONDING is not set 533# CONFIG_BONDING is not set
483# CONFIG_MACVLAN is not set 534# CONFIG_MACVLAN is not set
@@ -512,7 +563,6 @@ CONFIG_NETDEV_1000=y
512# CONFIG_DL2K is not set 563# CONFIG_DL2K is not set
513# CONFIG_E1000 is not set 564# CONFIG_E1000 is not set
514# CONFIG_E1000E is not set 565# CONFIG_E1000E is not set
515# CONFIG_E1000E_ENABLED is not set
516# CONFIG_IP1000 is not set 566# CONFIG_IP1000 is not set
517# CONFIG_IGB is not set 567# CONFIG_IGB is not set
518# CONFIG_NS83820 is not set 568# CONFIG_NS83820 is not set
@@ -522,12 +572,12 @@ CONFIG_NETDEV_1000=y
522# CONFIG_SIS190 is not set 572# CONFIG_SIS190 is not set
523# CONFIG_SKGE is not set 573# CONFIG_SKGE is not set
524# CONFIG_SKY2 is not set 574# CONFIG_SKY2 is not set
525# CONFIG_SK98LIN is not set
526# CONFIG_VIA_VELOCITY is not set 575# CONFIG_VIA_VELOCITY is not set
527# CONFIG_TIGON3 is not set 576# CONFIG_TIGON3 is not set
528# CONFIG_BNX2 is not set 577# CONFIG_BNX2 is not set
529# CONFIG_QLA3XXX is not set 578# CONFIG_QLA3XXX is not set
530# CONFIG_ATL1 is not set 579# CONFIG_ATL1 is not set
580# CONFIG_ATL1E is not set
531CONFIG_NETDEV_10000=y 581CONFIG_NETDEV_10000=y
532# CONFIG_CHELSIO_T1 is not set 582# CONFIG_CHELSIO_T1 is not set
533# CONFIG_CHELSIO_T3 is not set 583# CONFIG_CHELSIO_T3 is not set
@@ -540,6 +590,7 @@ CONFIG_NETDEV_10000=y
540# CONFIG_MLX4_CORE is not set 590# CONFIG_MLX4_CORE is not set
541# CONFIG_TEHUTI is not set 591# CONFIG_TEHUTI is not set
542# CONFIG_BNX2X is not set 592# CONFIG_BNX2X is not set
593# CONFIG_SFC is not set
543# CONFIG_TR is not set 594# CONFIG_TR is not set
544 595
545# 596#
@@ -547,6 +598,7 @@ CONFIG_NETDEV_10000=y
547# 598#
548# CONFIG_WLAN_PRE80211 is not set 599# CONFIG_WLAN_PRE80211 is not set
549# CONFIG_WLAN_80211 is not set 600# CONFIG_WLAN_80211 is not set
601# CONFIG_IWLWIFI_LEDS is not set
550# CONFIG_WAN is not set 602# CONFIG_WAN is not set
551# CONFIG_FDDI is not set 603# CONFIG_FDDI is not set
552# CONFIG_HIPPI is not set 604# CONFIG_HIPPI is not set
@@ -573,6 +625,7 @@ CONFIG_NETDEV_10000=y
573# Character devices 625# Character devices
574# 626#
575# CONFIG_VT is not set 627# CONFIG_VT is not set
628CONFIG_DEVKMEM=y
576# CONFIG_SERIAL_NONSTANDARD is not set 629# CONFIG_SERIAL_NONSTANDARD is not set
577# CONFIG_NOZOMI is not set 630# CONFIG_NOZOMI is not set
578 631
@@ -611,13 +664,76 @@ CONFIG_XILINX_HWICAP=m
611# CONFIG_RAW_DRIVER is not set 664# CONFIG_RAW_DRIVER is not set
612# CONFIG_TCG_TPM is not set 665# CONFIG_TCG_TPM is not set
613CONFIG_DEVPORT=y 666CONFIG_DEVPORT=y
614# CONFIG_I2C is not set 667CONFIG_I2C=m
668CONFIG_I2C_BOARDINFO=y
669CONFIG_I2C_CHARDEV=m
615 670
616# 671#
617# SPI support 672# I2C Hardware Bus support
673#
674
675#
676# PC SMBus host controller drivers
677#
678# CONFIG_I2C_ALI1535 is not set
679# CONFIG_I2C_ALI1563 is not set
680# CONFIG_I2C_ALI15X3 is not set
681# CONFIG_I2C_AMD756 is not set
682# CONFIG_I2C_AMD8111 is not set
683# CONFIG_I2C_I801 is not set
684# CONFIG_I2C_ISCH is not set
685# CONFIG_I2C_PIIX4 is not set
686# CONFIG_I2C_NFORCE2 is not set
687# CONFIG_I2C_SIS5595 is not set
688# CONFIG_I2C_SIS630 is not set
689# CONFIG_I2C_SIS96X is not set
690# CONFIG_I2C_VIA is not set
691# CONFIG_I2C_VIAPRO is not set
692
618# 693#
694# I2C system bus drivers (mostly embedded / system-on-chip)
695#
696CONFIG_I2C_IBM_IIC=m
697# CONFIG_I2C_MPC is not set
698# CONFIG_I2C_OCORES is not set
699# CONFIG_I2C_SIMTEC is not set
700
701#
702# External I2C/SMBus adapter drivers
703#
704# CONFIG_I2C_PARPORT_LIGHT is not set
705# CONFIG_I2C_TAOS_EVM is not set
706
707#
708# Graphics adapter I2C/DDC channel drivers
709#
710# CONFIG_I2C_VOODOO3 is not set
711
712#
713# Other I2C/SMBus bus drivers
714#
715# CONFIG_I2C_PCA_PLATFORM is not set
716# CONFIG_I2C_STUB is not set
717
718#
719# Miscellaneous I2C Chip support
720#
721# CONFIG_DS1682 is not set
722# CONFIG_AT24 is not set
723# CONFIG_SENSORS_EEPROM is not set
724# CONFIG_SENSORS_PCF8574 is not set
725# CONFIG_PCF8575 is not set
726# CONFIG_SENSORS_PCA9539 is not set
727# CONFIG_SENSORS_PCF8591 is not set
728# CONFIG_SENSORS_MAX6875 is not set
729# CONFIG_SENSORS_TSL2550 is not set
730# CONFIG_I2C_DEBUG_CORE is not set
731# CONFIG_I2C_DEBUG_ALGO is not set
732# CONFIG_I2C_DEBUG_BUS is not set
733# CONFIG_I2C_DEBUG_CHIP is not set
619# CONFIG_SPI is not set 734# CONFIG_SPI is not set
620# CONFIG_SPI_MASTER is not set 735CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
736# CONFIG_GPIOLIB is not set
621# CONFIG_W1 is not set 737# CONFIG_W1 is not set
622# CONFIG_POWER_SUPPLY is not set 738# CONFIG_POWER_SUPPLY is not set
623# CONFIG_HWMON is not set 739# CONFIG_HWMON is not set
@@ -633,13 +749,24 @@ CONFIG_SSB_POSSIBLE=y
633# 749#
634# Multifunction device drivers 750# Multifunction device drivers
635# 751#
752# CONFIG_MFD_CORE is not set
636# CONFIG_MFD_SM501 is not set 753# CONFIG_MFD_SM501 is not set
754# CONFIG_HTC_PASIC3 is not set
637 755
638# 756#
639# Multimedia devices 757# Multimedia devices
640# 758#
759
760#
761# Multimedia core support
762#
641# CONFIG_VIDEO_DEV is not set 763# CONFIG_VIDEO_DEV is not set
642# CONFIG_DVB_CORE is not set 764# CONFIG_DVB_CORE is not set
765# CONFIG_VIDEO_MEDIA is not set
766
767#
768# Multimedia drivers
769#
643# CONFIG_DAB is not set 770# CONFIG_DAB is not set
644 771
645# 772#
@@ -656,16 +783,14 @@ CONFIG_VIDEO_OUTPUT_CONTROL=m
656# Display device support 783# Display device support
657# 784#
658# CONFIG_DISPLAY_SUPPORT is not set 785# CONFIG_DISPLAY_SUPPORT is not set
659
660#
661# Sound
662#
663# CONFIG_SOUND is not set 786# CONFIG_SOUND is not set
664CONFIG_USB_SUPPORT=y 787CONFIG_USB_SUPPORT=y
665CONFIG_USB_ARCH_HAS_HCD=y 788CONFIG_USB_ARCH_HAS_HCD=y
666CONFIG_USB_ARCH_HAS_OHCI=y 789CONFIG_USB_ARCH_HAS_OHCI=y
667CONFIG_USB_ARCH_HAS_EHCI=y 790CONFIG_USB_ARCH_HAS_EHCI=y
668# CONFIG_USB is not set 791# CONFIG_USB is not set
792# CONFIG_USB_OTG_WHITELIST is not set
793# CONFIG_USB_OTG_BLACKLIST_HUB is not set
669 794
670# 795#
671# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 796# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
@@ -674,14 +799,11 @@ CONFIG_USB_ARCH_HAS_EHCI=y
674# CONFIG_MMC is not set 799# CONFIG_MMC is not set
675# CONFIG_MEMSTICK is not set 800# CONFIG_MEMSTICK is not set
676# CONFIG_NEW_LEDS is not set 801# CONFIG_NEW_LEDS is not set
802# CONFIG_ACCESSIBILITY is not set
677# CONFIG_INFINIBAND is not set 803# CONFIG_INFINIBAND is not set
678# CONFIG_EDAC is not set 804# CONFIG_EDAC is not set
679# CONFIG_RTC_CLASS is not set 805# CONFIG_RTC_CLASS is not set
680# CONFIG_DMADEVICES is not set 806# CONFIG_DMADEVICES is not set
681
682#
683# Userspace I/O
684#
685# CONFIG_UIO is not set 807# CONFIG_UIO is not set
686 808
687# 809#
@@ -690,13 +812,18 @@ CONFIG_USB_ARCH_HAS_EHCI=y
690CONFIG_EXT2_FS=y 812CONFIG_EXT2_FS=y
691# CONFIG_EXT2_FS_XATTR is not set 813# CONFIG_EXT2_FS_XATTR is not set
692# CONFIG_EXT2_FS_XIP is not set 814# CONFIG_EXT2_FS_XIP is not set
693# CONFIG_EXT3_FS is not set 815CONFIG_EXT3_FS=m
816CONFIG_EXT3_FS_XATTR=y
817# CONFIG_EXT3_FS_POSIX_ACL is not set
818# CONFIG_EXT3_FS_SECURITY is not set
694# CONFIG_EXT4DEV_FS is not set 819# CONFIG_EXT4DEV_FS is not set
820CONFIG_JBD=m
821# CONFIG_JBD_DEBUG is not set
822CONFIG_FS_MBCACHE=y
695# CONFIG_REISERFS_FS is not set 823# CONFIG_REISERFS_FS is not set
696# CONFIG_JFS_FS is not set 824# CONFIG_JFS_FS is not set
697# CONFIG_FS_POSIX_ACL is not set 825# CONFIG_FS_POSIX_ACL is not set
698# CONFIG_XFS_FS is not set 826# CONFIG_XFS_FS is not set
699# CONFIG_GFS2_FS is not set
700# CONFIG_OCFS2_FS is not set 827# CONFIG_OCFS2_FS is not set
701CONFIG_DNOTIFY=y 828CONFIG_DNOTIFY=y
702CONFIG_INOTIFY=y 829CONFIG_INOTIFY=y
@@ -715,8 +842,11 @@ CONFIG_INOTIFY_USER=y
715# 842#
716# DOS/FAT/NT Filesystems 843# DOS/FAT/NT Filesystems
717# 844#
845CONFIG_FAT_FS=m
718# CONFIG_MSDOS_FS is not set 846# CONFIG_MSDOS_FS is not set
719# CONFIG_VFAT_FS is not set 847CONFIG_VFAT_FS=m
848CONFIG_FAT_DEFAULT_CODEPAGE=437
849CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
720# CONFIG_NTFS_FS is not set 850# CONFIG_NTFS_FS is not set
721 851
722# 852#
@@ -741,10 +871,27 @@ CONFIG_TMPFS=y
741# CONFIG_BEFS_FS is not set 871# CONFIG_BEFS_FS is not set
742# CONFIG_BFS_FS is not set 872# CONFIG_BFS_FS is not set
743# CONFIG_EFS_FS is not set 873# CONFIG_EFS_FS is not set
744# CONFIG_JFFS2_FS is not set 874CONFIG_JFFS2_FS=m
875CONFIG_JFFS2_FS_DEBUG=0
876CONFIG_JFFS2_FS_WRITEBUFFER=y
877# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
878# CONFIG_JFFS2_SUMMARY is not set
879# CONFIG_JFFS2_FS_XATTR is not set
880# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
881CONFIG_JFFS2_ZLIB=y
882# CONFIG_JFFS2_LZO is not set
883CONFIG_JFFS2_RTIME=y
884# CONFIG_JFFS2_RUBIN is not set
885CONFIG_UBIFS_FS=m
886# CONFIG_UBIFS_FS_XATTR is not set
887# CONFIG_UBIFS_FS_ADVANCED_COMPR is not set
888CONFIG_UBIFS_FS_LZO=y
889CONFIG_UBIFS_FS_ZLIB=y
890# CONFIG_UBIFS_FS_DEBUG is not set
745CONFIG_CRAMFS=y 891CONFIG_CRAMFS=y
746# CONFIG_VXFS_FS is not set 892# CONFIG_VXFS_FS is not set
747# CONFIG_MINIX_FS is not set 893# CONFIG_MINIX_FS is not set
894# CONFIG_OMFS_FS is not set
748# CONFIG_HPFS_FS is not set 895# CONFIG_HPFS_FS is not set
749# CONFIG_QNX4FS_FS is not set 896# CONFIG_QNX4FS_FS is not set
750# CONFIG_ROMFS_FS is not set 897# CONFIG_ROMFS_FS is not set
@@ -755,14 +902,12 @@ CONFIG_NFS_FS=y
755CONFIG_NFS_V3=y 902CONFIG_NFS_V3=y
756# CONFIG_NFS_V3_ACL is not set 903# CONFIG_NFS_V3_ACL is not set
757# CONFIG_NFS_V4 is not set 904# CONFIG_NFS_V4 is not set
758# CONFIG_NFS_DIRECTIO is not set
759# CONFIG_NFSD is not set
760CONFIG_ROOT_NFS=y 905CONFIG_ROOT_NFS=y
906# CONFIG_NFSD is not set
761CONFIG_LOCKD=y 907CONFIG_LOCKD=y
762CONFIG_LOCKD_V4=y 908CONFIG_LOCKD_V4=y
763CONFIG_NFS_COMMON=y 909CONFIG_NFS_COMMON=y
764CONFIG_SUNRPC=y 910CONFIG_SUNRPC=y
765# CONFIG_SUNRPC_BIND34 is not set
766# CONFIG_RPCSEC_GSS_KRB5 is not set 911# CONFIG_RPCSEC_GSS_KRB5 is not set
767# CONFIG_RPCSEC_GSS_SPKM3 is not set 912# CONFIG_RPCSEC_GSS_SPKM3 is not set
768# CONFIG_SMB_FS is not set 913# CONFIG_SMB_FS is not set
@@ -776,20 +921,64 @@ CONFIG_SUNRPC=y
776# 921#
777# CONFIG_PARTITION_ADVANCED is not set 922# CONFIG_PARTITION_ADVANCED is not set
778CONFIG_MSDOS_PARTITION=y 923CONFIG_MSDOS_PARTITION=y
779# CONFIG_NLS is not set 924CONFIG_NLS=m
925CONFIG_NLS_DEFAULT="iso8859-1"
926CONFIG_NLS_CODEPAGE_437=m
927# CONFIG_NLS_CODEPAGE_737 is not set
928# CONFIG_NLS_CODEPAGE_775 is not set
929# CONFIG_NLS_CODEPAGE_850 is not set
930# CONFIG_NLS_CODEPAGE_852 is not set
931# CONFIG_NLS_CODEPAGE_855 is not set
932# CONFIG_NLS_CODEPAGE_857 is not set
933# CONFIG_NLS_CODEPAGE_860 is not set
934# CONFIG_NLS_CODEPAGE_861 is not set
935# CONFIG_NLS_CODEPAGE_862 is not set
936# CONFIG_NLS_CODEPAGE_863 is not set
937# CONFIG_NLS_CODEPAGE_864 is not set
938# CONFIG_NLS_CODEPAGE_865 is not set
939# CONFIG_NLS_CODEPAGE_866 is not set
940# CONFIG_NLS_CODEPAGE_869 is not set
941# CONFIG_NLS_CODEPAGE_936 is not set
942# CONFIG_NLS_CODEPAGE_950 is not set
943# CONFIG_NLS_CODEPAGE_932 is not set
944# CONFIG_NLS_CODEPAGE_949 is not set
945# CONFIG_NLS_CODEPAGE_874 is not set
946# CONFIG_NLS_ISO8859_8 is not set
947# CONFIG_NLS_CODEPAGE_1250 is not set
948# CONFIG_NLS_CODEPAGE_1251 is not set
949# CONFIG_NLS_ASCII is not set
950CONFIG_NLS_ISO8859_1=m
951# CONFIG_NLS_ISO8859_2 is not set
952# CONFIG_NLS_ISO8859_3 is not set
953# CONFIG_NLS_ISO8859_4 is not set
954# CONFIG_NLS_ISO8859_5 is not set
955# CONFIG_NLS_ISO8859_6 is not set
956# CONFIG_NLS_ISO8859_7 is not set
957# CONFIG_NLS_ISO8859_9 is not set
958# CONFIG_NLS_ISO8859_13 is not set
959# CONFIG_NLS_ISO8859_14 is not set
960# CONFIG_NLS_ISO8859_15 is not set
961# CONFIG_NLS_KOI8_R is not set
962# CONFIG_NLS_KOI8_U is not set
963# CONFIG_NLS_UTF8 is not set
780# CONFIG_DLM is not set 964# CONFIG_DLM is not set
781 965
782# 966#
783# Library routines 967# Library routines
784# 968#
785CONFIG_BITREVERSE=y 969CONFIG_BITREVERSE=y
970# CONFIG_GENERIC_FIND_FIRST_BIT is not set
786# CONFIG_CRC_CCITT is not set 971# CONFIG_CRC_CCITT is not set
787# CONFIG_CRC16 is not set 972CONFIG_CRC16=m
973# CONFIG_CRC_T10DIF is not set
788# CONFIG_CRC_ITU_T is not set 974# CONFIG_CRC_ITU_T is not set
789CONFIG_CRC32=y 975CONFIG_CRC32=y
790# CONFIG_CRC7 is not set 976# CONFIG_CRC7 is not set
791# CONFIG_LIBCRC32C is not set 977# CONFIG_LIBCRC32C is not set
792CONFIG_ZLIB_INFLATE=y 978CONFIG_ZLIB_INFLATE=y
979CONFIG_ZLIB_DEFLATE=m
980CONFIG_LZO_COMPRESS=m
981CONFIG_LZO_DECOMPRESS=m
793CONFIG_PLIST=y 982CONFIG_PLIST=y
794CONFIG_HAS_IOMEM=y 983CONFIG_HAS_IOMEM=y
795CONFIG_HAS_IOPORT=y 984CONFIG_HAS_IOPORT=y
@@ -802,6 +991,7 @@ CONFIG_HAVE_LMB=y
802# CONFIG_PRINTK_TIME is not set 991# CONFIG_PRINTK_TIME is not set
803CONFIG_ENABLE_WARN_DEPRECATED=y 992CONFIG_ENABLE_WARN_DEPRECATED=y
804CONFIG_ENABLE_MUST_CHECK=y 993CONFIG_ENABLE_MUST_CHECK=y
994CONFIG_FRAME_WARN=1024
805CONFIG_MAGIC_SYSRQ=y 995CONFIG_MAGIC_SYSRQ=y
806# CONFIG_UNUSED_SYMBOLS is not set 996# CONFIG_UNUSED_SYMBOLS is not set
807CONFIG_DEBUG_FS=y 997CONFIG_DEBUG_FS=y
@@ -809,9 +999,12 @@ CONFIG_DEBUG_FS=y
809CONFIG_DEBUG_KERNEL=y 999CONFIG_DEBUG_KERNEL=y
810# CONFIG_DEBUG_SHIRQ is not set 1000# CONFIG_DEBUG_SHIRQ is not set
811CONFIG_DETECT_SOFTLOCKUP=y 1001CONFIG_DETECT_SOFTLOCKUP=y
1002# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
1003CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
812CONFIG_SCHED_DEBUG=y 1004CONFIG_SCHED_DEBUG=y
813# CONFIG_SCHEDSTATS is not set 1005# CONFIG_SCHEDSTATS is not set
814# CONFIG_TIMER_STATS is not set 1006# CONFIG_TIMER_STATS is not set
1007# CONFIG_DEBUG_OBJECTS is not set
815# CONFIG_SLUB_DEBUG_ON is not set 1008# CONFIG_SLUB_DEBUG_ON is not set
816# CONFIG_SLUB_STATS is not set 1009# CONFIG_SLUB_STATS is not set
817# CONFIG_DEBUG_RT_MUTEXES is not set 1010# CONFIG_DEBUG_RT_MUTEXES is not set
@@ -824,17 +1017,30 @@ CONFIG_SCHED_DEBUG=y
824CONFIG_DEBUG_BUGVERBOSE=y 1017CONFIG_DEBUG_BUGVERBOSE=y
825# CONFIG_DEBUG_INFO is not set 1018# CONFIG_DEBUG_INFO is not set
826# CONFIG_DEBUG_VM is not set 1019# CONFIG_DEBUG_VM is not set
1020# CONFIG_DEBUG_WRITECOUNT is not set
1021# CONFIG_DEBUG_MEMORY_INIT is not set
827# CONFIG_DEBUG_LIST is not set 1022# CONFIG_DEBUG_LIST is not set
828# CONFIG_DEBUG_SG is not set 1023# CONFIG_DEBUG_SG is not set
829# CONFIG_BOOT_PRINTK_DELAY is not set 1024# CONFIG_BOOT_PRINTK_DELAY is not set
830# CONFIG_RCU_TORTURE_TEST is not set 1025# CONFIG_RCU_TORTURE_TEST is not set
831# CONFIG_BACKTRACE_SELF_TEST is not set 1026# CONFIG_BACKTRACE_SELF_TEST is not set
832# CONFIG_FAULT_INJECTION is not set 1027# CONFIG_FAULT_INJECTION is not set
1028# CONFIG_LATENCYTOP is not set
1029CONFIG_HAVE_FTRACE=y
1030CONFIG_HAVE_DYNAMIC_FTRACE=y
1031# CONFIG_FTRACE is not set
1032# CONFIG_SCHED_TRACER is not set
1033# CONFIG_CONTEXT_SWITCH_TRACER is not set
833# CONFIG_SAMPLES is not set 1034# CONFIG_SAMPLES is not set
1035CONFIG_HAVE_ARCH_KGDB=y
1036# CONFIG_KGDB is not set
834# CONFIG_DEBUG_STACKOVERFLOW is not set 1037# CONFIG_DEBUG_STACKOVERFLOW is not set
835# CONFIG_DEBUG_STACK_USAGE is not set 1038# CONFIG_DEBUG_STACK_USAGE is not set
836# CONFIG_DEBUG_PAGEALLOC is not set 1039# CONFIG_DEBUG_PAGEALLOC is not set
837# CONFIG_DEBUGGER is not set 1040# CONFIG_CODE_PATCHING_SELFTEST is not set
1041# CONFIG_FTR_FIXUP_SELFTEST is not set
1042# CONFIG_XMON is not set
1043# CONFIG_IRQSTACKS is not set
838# CONFIG_VIRQ_DEBUG is not set 1044# CONFIG_VIRQ_DEBUG is not set
839# CONFIG_BDI_SWITCH is not set 1045# CONFIG_BDI_SWITCH is not set
840# CONFIG_PPC_EARLY_DEBUG is not set 1046# CONFIG_PPC_EARLY_DEBUG is not set
@@ -846,51 +1052,85 @@ CONFIG_DEBUG_BUGVERBOSE=y
846# CONFIG_SECURITY is not set 1052# CONFIG_SECURITY is not set
847# CONFIG_SECURITY_FILE_CAPABILITIES is not set 1053# CONFIG_SECURITY_FILE_CAPABILITIES is not set
848CONFIG_CRYPTO=y 1054CONFIG_CRYPTO=y
1055
1056#
1057# Crypto core or helper
1058#
849CONFIG_CRYPTO_ALGAPI=y 1059CONFIG_CRYPTO_ALGAPI=y
850CONFIG_CRYPTO_BLKCIPHER=y 1060CONFIG_CRYPTO_BLKCIPHER=y
851# CONFIG_CRYPTO_SEQIV is not set
852CONFIG_CRYPTO_MANAGER=y 1061CONFIG_CRYPTO_MANAGER=y
1062# CONFIG_CRYPTO_GF128MUL is not set
1063# CONFIG_CRYPTO_NULL is not set
1064# CONFIG_CRYPTO_CRYPTD is not set
1065# CONFIG_CRYPTO_AUTHENC is not set
1066# CONFIG_CRYPTO_TEST is not set
1067
1068#
1069# Authenticated Encryption with Associated Data
1070#
1071# CONFIG_CRYPTO_CCM is not set
1072# CONFIG_CRYPTO_GCM is not set
1073# CONFIG_CRYPTO_SEQIV is not set
1074
1075#
1076# Block modes
1077#
1078CONFIG_CRYPTO_CBC=y
1079# CONFIG_CRYPTO_CTR is not set
1080# CONFIG_CRYPTO_CTS is not set
1081CONFIG_CRYPTO_ECB=y
1082# CONFIG_CRYPTO_LRW is not set
1083CONFIG_CRYPTO_PCBC=y
1084# CONFIG_CRYPTO_XTS is not set
1085
1086#
1087# Hash modes
1088#
853# CONFIG_CRYPTO_HMAC is not set 1089# CONFIG_CRYPTO_HMAC is not set
854# CONFIG_CRYPTO_XCBC is not set 1090# CONFIG_CRYPTO_XCBC is not set
855# CONFIG_CRYPTO_NULL is not set 1091
1092#
1093# Digest
1094#
1095# CONFIG_CRYPTO_CRC32C is not set
856# CONFIG_CRYPTO_MD4 is not set 1096# CONFIG_CRYPTO_MD4 is not set
857CONFIG_CRYPTO_MD5=y 1097CONFIG_CRYPTO_MD5=y
1098# CONFIG_CRYPTO_MICHAEL_MIC is not set
1099# CONFIG_CRYPTO_RMD128 is not set
1100# CONFIG_CRYPTO_RMD160 is not set
1101# CONFIG_CRYPTO_RMD256 is not set
1102# CONFIG_CRYPTO_RMD320 is not set
858# CONFIG_CRYPTO_SHA1 is not set 1103# CONFIG_CRYPTO_SHA1 is not set
859# CONFIG_CRYPTO_SHA256 is not set 1104# CONFIG_CRYPTO_SHA256 is not set
860# CONFIG_CRYPTO_SHA512 is not set 1105# CONFIG_CRYPTO_SHA512 is not set
861# CONFIG_CRYPTO_WP512 is not set
862# CONFIG_CRYPTO_TGR192 is not set 1106# CONFIG_CRYPTO_TGR192 is not set
863# CONFIG_CRYPTO_GF128MUL is not set 1107# CONFIG_CRYPTO_WP512 is not set
864CONFIG_CRYPTO_ECB=y 1108
865CONFIG_CRYPTO_CBC=y 1109#
866CONFIG_CRYPTO_PCBC=y 1110# Ciphers
867# CONFIG_CRYPTO_LRW is not set 1111#
868# CONFIG_CRYPTO_XTS is not set
869# CONFIG_CRYPTO_CTR is not set
870# CONFIG_CRYPTO_GCM is not set
871# CONFIG_CRYPTO_CCM is not set
872# CONFIG_CRYPTO_CRYPTD is not set
873CONFIG_CRYPTO_DES=y
874# CONFIG_CRYPTO_FCRYPT is not set
875# CONFIG_CRYPTO_BLOWFISH is not set
876# CONFIG_CRYPTO_TWOFISH is not set
877# CONFIG_CRYPTO_SERPENT is not set
878# CONFIG_CRYPTO_AES is not set 1112# CONFIG_CRYPTO_AES is not set
1113# CONFIG_CRYPTO_ANUBIS is not set
1114# CONFIG_CRYPTO_ARC4 is not set
1115# CONFIG_CRYPTO_BLOWFISH is not set
1116# CONFIG_CRYPTO_CAMELLIA is not set
879# CONFIG_CRYPTO_CAST5 is not set 1117# CONFIG_CRYPTO_CAST5 is not set
880# CONFIG_CRYPTO_CAST6 is not set 1118# CONFIG_CRYPTO_CAST6 is not set
881# CONFIG_CRYPTO_TEA is not set 1119CONFIG_CRYPTO_DES=y
882# CONFIG_CRYPTO_ARC4 is not set 1120# CONFIG_CRYPTO_FCRYPT is not set
883# CONFIG_CRYPTO_KHAZAD is not set 1121# CONFIG_CRYPTO_KHAZAD is not set
884# CONFIG_CRYPTO_ANUBIS is not set
885# CONFIG_CRYPTO_SEED is not set
886# CONFIG_CRYPTO_SALSA20 is not set 1122# CONFIG_CRYPTO_SALSA20 is not set
887# CONFIG_CRYPTO_DEFLATE is not set 1123# CONFIG_CRYPTO_SEED is not set
888# CONFIG_CRYPTO_MICHAEL_MIC is not set 1124# CONFIG_CRYPTO_SERPENT is not set
889# CONFIG_CRYPTO_CRC32C is not set 1125# CONFIG_CRYPTO_TEA is not set
890# CONFIG_CRYPTO_CAMELLIA is not set 1126# CONFIG_CRYPTO_TWOFISH is not set
891# CONFIG_CRYPTO_TEST is not set 1127
892# CONFIG_CRYPTO_AUTHENC is not set 1128#
893# CONFIG_CRYPTO_LZO is not set 1129# Compression
1130#
1131CONFIG_CRYPTO_DEFLATE=m
1132CONFIG_CRYPTO_LZO=m
894CONFIG_CRYPTO_HW=y 1133CONFIG_CRYPTO_HW=y
895# CONFIG_CRYPTO_DEV_HIFN_795X is not set 1134# CONFIG_CRYPTO_DEV_HIFN_795X is not set
896# CONFIG_PPC_CLOCK is not set 1135# CONFIG_PPC_CLOCK is not set
1136# CONFIG_VIRTUALIZATION is not set
diff --git a/arch/powerpc/configs/ppc44x_defconfig b/arch/powerpc/configs/ppc44x_defconfig
index f9d279bb700b..c7825dcbf415 100644
--- a/arch/powerpc/configs/ppc44x_defconfig
+++ b/arch/powerpc/configs/ppc44x_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.26-rc8 3# Linux kernel version: 2.6.27-rc1
4# Wed Jul 9 13:50:48 2008 4# Tue Aug 5 10:01:31 2008
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
@@ -30,9 +30,11 @@ CONFIG_GENERIC_TIME=y
30CONFIG_GENERIC_TIME_VSYSCALL=y 30CONFIG_GENERIC_TIME_VSYSCALL=y
31CONFIG_GENERIC_CLOCKEVENTS=y 31CONFIG_GENERIC_CLOCKEVENTS=y
32CONFIG_GENERIC_HARDIRQS=y 32CONFIG_GENERIC_HARDIRQS=y
33# CONFIG_HAVE_GET_USER_PAGES_FAST is not set
33# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 34# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
34CONFIG_IRQ_PER_CPU=y 35CONFIG_IRQ_PER_CPU=y
35CONFIG_STACKTRACE_SUPPORT=y 36CONFIG_STACKTRACE_SUPPORT=y
37CONFIG_HAVE_LATENCYTOP_SUPPORT=y
36CONFIG_LOCKDEP_SUPPORT=y 38CONFIG_LOCKDEP_SUPPORT=y
37CONFIG_RWSEM_XCHGADD_ALGORITHM=y 39CONFIG_RWSEM_XCHGADD_ALGORITHM=y
38CONFIG_ARCH_HAS_ILOG2_U32=y 40CONFIG_ARCH_HAS_ILOG2_U32=y
@@ -116,10 +118,16 @@ CONFIG_SLUB=y
116# CONFIG_MARKERS is not set 118# CONFIG_MARKERS is not set
117CONFIG_HAVE_OPROFILE=y 119CONFIG_HAVE_OPROFILE=y
118# CONFIG_KPROBES is not set 120# CONFIG_KPROBES is not set
121CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y
122CONFIG_HAVE_IOREMAP_PROT=y
119CONFIG_HAVE_KPROBES=y 123CONFIG_HAVE_KPROBES=y
120CONFIG_HAVE_KRETPROBES=y 124CONFIG_HAVE_KRETPROBES=y
125CONFIG_HAVE_ARCH_TRACEHOOK=y
121# CONFIG_HAVE_DMA_ATTRS is not set 126# CONFIG_HAVE_DMA_ATTRS is not set
127# CONFIG_USE_GENERIC_SMP_HELPERS is not set
128# CONFIG_HAVE_CLK is not set
122CONFIG_PROC_PAGE_MONITOR=y 129CONFIG_PROC_PAGE_MONITOR=y
130# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
123CONFIG_SLABINFO=y 131CONFIG_SLABINFO=y
124CONFIG_RT_MUTEXES=y 132CONFIG_RT_MUTEXES=y
125# CONFIG_TINY_SHMEM is not set 133# CONFIG_TINY_SHMEM is not set
@@ -136,6 +144,7 @@ CONFIG_LBD=y
136# CONFIG_BLK_DEV_IO_TRACE is not set 144# CONFIG_BLK_DEV_IO_TRACE is not set
137# CONFIG_LSF is not set 145# CONFIG_LSF is not set
138# CONFIG_BLK_DEV_BSG is not set 146# CONFIG_BLK_DEV_BSG is not set
147# CONFIG_BLK_DEV_INTEGRITY is not set
139 148
140# 149#
141# IO Schedulers 150# IO Schedulers
@@ -155,8 +164,6 @@ CONFIG_PPC4xx_PCI_EXPRESS=y
155# 164#
156# Platform support 165# Platform support
157# 166#
158# CONFIG_PPC_MPC512x is not set
159# CONFIG_PPC_MPC5121 is not set
160# CONFIG_PPC_CELL is not set 167# CONFIG_PPC_CELL is not set
161# CONFIG_PPC_CELL_NATIVE is not set 168# CONFIG_PPC_CELL_NATIVE is not set
162# CONFIG_PQ2ADS is not set 169# CONFIG_PQ2ADS is not set
@@ -231,6 +238,7 @@ CONFIG_FLAT_NODE_MEM_MAP=y
231# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set 238# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
232CONFIG_PAGEFLAGS_EXTENDED=y 239CONFIG_PAGEFLAGS_EXTENDED=y
233CONFIG_SPLIT_PTLOCK_CPUS=4 240CONFIG_SPLIT_PTLOCK_CPUS=4
241CONFIG_MIGRATION=y
234CONFIG_RESOURCES_64BIT=y 242CONFIG_RESOURCES_64BIT=y
235CONFIG_ZONE_DMA_FLAG=1 243CONFIG_ZONE_DMA_FLAG=1
236CONFIG_BOUNCE=y 244CONFIG_BOUNCE=y
@@ -248,6 +256,7 @@ CONFIG_ISA_DMA_API=y
248CONFIG_ZONE_DMA=y 256CONFIG_ZONE_DMA=y
249CONFIG_PPC_INDIRECT_PCI=y 257CONFIG_PPC_INDIRECT_PCI=y
250CONFIG_4xx_SOC=y 258CONFIG_4xx_SOC=y
259CONFIG_PPC_PCI_CHOICE=y
251CONFIG_PCI=y 260CONFIG_PCI=y
252CONFIG_PCI_DOMAINS=y 261CONFIG_PCI_DOMAINS=y
253CONFIG_PCI_SYSCALL=y 262CONFIG_PCI_SYSCALL=y
@@ -275,10 +284,6 @@ CONFIG_PHYSICAL_START=0x00000000
275CONFIG_TASK_SIZE=0xc0000000 284CONFIG_TASK_SIZE=0xc0000000
276CONFIG_CONSISTENT_START=0xff100000 285CONFIG_CONSISTENT_START=0xff100000
277CONFIG_CONSISTENT_SIZE=0x00200000 286CONFIG_CONSISTENT_SIZE=0x00200000
278
279#
280# Networking
281#
282CONFIG_NET=y 287CONFIG_NET=y
283 288
284# 289#
@@ -287,6 +292,11 @@ CONFIG_NET=y
287CONFIG_PACKET=y 292CONFIG_PACKET=y
288# CONFIG_PACKET_MMAP is not set 293# CONFIG_PACKET_MMAP is not set
289CONFIG_UNIX=y 294CONFIG_UNIX=y
295CONFIG_XFRM=y
296# CONFIG_XFRM_USER is not set
297# CONFIG_XFRM_SUB_POLICY is not set
298# CONFIG_XFRM_MIGRATE is not set
299# CONFIG_XFRM_STATISTICS is not set
290# CONFIG_NET_KEY is not set 300# CONFIG_NET_KEY is not set
291CONFIG_INET=y 301CONFIG_INET=y
292# CONFIG_IP_MULTICAST is not set 302# CONFIG_IP_MULTICAST is not set
@@ -304,7 +314,7 @@ CONFIG_IP_PNP_BOOTP=y
304# CONFIG_INET_ESP is not set 314# CONFIG_INET_ESP is not set
305# CONFIG_INET_IPCOMP is not set 315# CONFIG_INET_IPCOMP is not set
306# CONFIG_INET_XFRM_TUNNEL is not set 316# CONFIG_INET_XFRM_TUNNEL is not set
307# CONFIG_INET_TUNNEL is not set 317CONFIG_INET_TUNNEL=m
308# CONFIG_INET_XFRM_MODE_TRANSPORT is not set 318# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
309# CONFIG_INET_XFRM_MODE_TUNNEL is not set 319# CONFIG_INET_XFRM_MODE_TUNNEL is not set
310# CONFIG_INET_XFRM_MODE_BEET is not set 320# CONFIG_INET_XFRM_MODE_BEET is not set
@@ -315,7 +325,25 @@ CONFIG_INET_TCP_DIAG=y
315CONFIG_TCP_CONG_CUBIC=y 325CONFIG_TCP_CONG_CUBIC=y
316CONFIG_DEFAULT_TCP_CONG="cubic" 326CONFIG_DEFAULT_TCP_CONG="cubic"
317# CONFIG_TCP_MD5SIG is not set 327# CONFIG_TCP_MD5SIG is not set
318# CONFIG_IPV6 is not set 328CONFIG_IPV6=m
329# CONFIG_IPV6_PRIVACY is not set
330# CONFIG_IPV6_ROUTER_PREF is not set
331# CONFIG_IPV6_OPTIMISTIC_DAD is not set
332# CONFIG_INET6_AH is not set
333# CONFIG_INET6_ESP is not set
334# CONFIG_INET6_IPCOMP is not set
335# CONFIG_IPV6_MIP6 is not set
336# CONFIG_INET6_XFRM_TUNNEL is not set
337# CONFIG_INET6_TUNNEL is not set
338CONFIG_INET6_XFRM_MODE_TRANSPORT=m
339CONFIG_INET6_XFRM_MODE_TUNNEL=m
340CONFIG_INET6_XFRM_MODE_BEET=m
341# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
342CONFIG_IPV6_SIT=m
343CONFIG_IPV6_NDISC_NODETYPE=y
344# CONFIG_IPV6_TUNNEL is not set
345# CONFIG_IPV6_MULTIPLE_TABLES is not set
346# CONFIG_IPV6_MROUTE is not set
319# CONFIG_NETWORK_SECMARK is not set 347# CONFIG_NETWORK_SECMARK is not set
320# CONFIG_NETFILTER is not set 348# CONFIG_NETFILTER is not set
321# CONFIG_IP_DCCP is not set 349# CONFIG_IP_DCCP is not set
@@ -365,6 +393,8 @@ CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
365CONFIG_STANDALONE=y 393CONFIG_STANDALONE=y
366CONFIG_PREVENT_FIRMWARE_BUILD=y 394CONFIG_PREVENT_FIRMWARE_BUILD=y
367CONFIG_FW_LOADER=y 395CONFIG_FW_LOADER=y
396CONFIG_FIRMWARE_IN_KERNEL=y
397CONFIG_EXTRA_FIRMWARE=""
368# CONFIG_DEBUG_DRIVER is not set 398# CONFIG_DEBUG_DRIVER is not set
369# CONFIG_DEBUG_DEVRES is not set 399# CONFIG_DEBUG_DEVRES is not set
370# CONFIG_SYS_HYPERVISOR is not set 400# CONFIG_SYS_HYPERVISOR is not set
@@ -447,8 +477,17 @@ CONFIG_MTD_PHYSMAP_OF=y
447# 477#
448# UBI - Unsorted block images 478# UBI - Unsorted block images
449# 479#
450# CONFIG_MTD_UBI is not set 480CONFIG_MTD_UBI=m
481CONFIG_MTD_UBI_WL_THRESHOLD=4096
482CONFIG_MTD_UBI_BEB_RESERVE=1
483CONFIG_MTD_UBI_GLUEBI=y
484
485#
486# UBI debugging options
487#
488# CONFIG_MTD_UBI_DEBUG is not set
451CONFIG_OF_DEVICE=y 489CONFIG_OF_DEVICE=y
490CONFIG_OF_I2C=m
452# CONFIG_PARPORT is not set 491# CONFIG_PARPORT is not set
453CONFIG_BLK_DEV=y 492CONFIG_BLK_DEV=y
454# CONFIG_BLK_DEV_FD is not set 493# CONFIG_BLK_DEV_FD is not set
@@ -460,6 +499,7 @@ CONFIG_BLK_DEV=y
460# CONFIG_BLK_DEV_LOOP is not set 499# CONFIG_BLK_DEV_LOOP is not set
461# CONFIG_BLK_DEV_NBD is not set 500# CONFIG_BLK_DEV_NBD is not set
462# CONFIG_BLK_DEV_SX8 is not set 501# CONFIG_BLK_DEV_SX8 is not set
502# CONFIG_BLK_DEV_UB is not set
463CONFIG_BLK_DEV_RAM=y 503CONFIG_BLK_DEV_RAM=y
464CONFIG_BLK_DEV_RAM_COUNT=16 504CONFIG_BLK_DEV_RAM_COUNT=16
465CONFIG_BLK_DEV_RAM_SIZE=35000 505CONFIG_BLK_DEV_RAM_SIZE=35000
@@ -467,12 +507,14 @@ CONFIG_BLK_DEV_RAM_SIZE=35000
467# CONFIG_CDROM_PKTCDVD is not set 507# CONFIG_CDROM_PKTCDVD is not set
468# CONFIG_ATA_OVER_ETH is not set 508# CONFIG_ATA_OVER_ETH is not set
469# CONFIG_XILINX_SYSACE is not set 509# CONFIG_XILINX_SYSACE is not set
510# CONFIG_BLK_DEV_HD is not set
470CONFIG_MISC_DEVICES=y 511CONFIG_MISC_DEVICES=y
471# CONFIG_PHANTOM is not set 512# CONFIG_PHANTOM is not set
472# CONFIG_EEPROM_93CX6 is not set 513# CONFIG_EEPROM_93CX6 is not set
473# CONFIG_SGI_IOC4 is not set 514# CONFIG_SGI_IOC4 is not set
474# CONFIG_TIFM_CORE is not set 515# CONFIG_TIFM_CORE is not set
475# CONFIG_ENCLOSURE_SERVICES is not set 516# CONFIG_ENCLOSURE_SERVICES is not set
517# CONFIG_HP_ILO is not set
476CONFIG_HAVE_IDE=y 518CONFIG_HAVE_IDE=y
477# CONFIG_IDE is not set 519# CONFIG_IDE is not set
478 520
@@ -480,9 +522,41 @@ CONFIG_HAVE_IDE=y
480# SCSI device support 522# SCSI device support
481# 523#
482# CONFIG_RAID_ATTRS is not set 524# CONFIG_RAID_ATTRS is not set
483# CONFIG_SCSI is not set 525CONFIG_SCSI=m
484# CONFIG_SCSI_DMA is not set 526CONFIG_SCSI_DMA=y
527# CONFIG_SCSI_TGT is not set
485# CONFIG_SCSI_NETLINK is not set 528# CONFIG_SCSI_NETLINK is not set
529CONFIG_SCSI_PROC_FS=y
530
531#
532# SCSI support type (disk, tape, CD-ROM)
533#
534CONFIG_BLK_DEV_SD=m
535# CONFIG_CHR_DEV_ST is not set
536# CONFIG_CHR_DEV_OSST is not set
537# CONFIG_BLK_DEV_SR is not set
538# CONFIG_CHR_DEV_SG is not set
539# CONFIG_CHR_DEV_SCH is not set
540
541#
542# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
543#
544# CONFIG_SCSI_MULTI_LUN is not set
545# CONFIG_SCSI_CONSTANTS is not set
546# CONFIG_SCSI_LOGGING is not set
547# CONFIG_SCSI_SCAN_ASYNC is not set
548CONFIG_SCSI_WAIT_SCAN=m
549
550#
551# SCSI Transports
552#
553# CONFIG_SCSI_SPI_ATTRS is not set
554# CONFIG_SCSI_FC_ATTRS is not set
555# CONFIG_SCSI_ISCSI_ATTRS is not set
556# CONFIG_SCSI_SAS_LIBSAS is not set
557# CONFIG_SCSI_SRP_ATTRS is not set
558# CONFIG_SCSI_LOWLEVEL is not set
559# CONFIG_SCSI_DH is not set
486# CONFIG_ATA is not set 560# CONFIG_ATA is not set
487# CONFIG_MD is not set 561# CONFIG_MD is not set
488# CONFIG_FUSION is not set 562# CONFIG_FUSION is not set
@@ -499,7 +573,6 @@ CONFIG_HAVE_IDE=y
499# CONFIG_I2O is not set 573# CONFIG_I2O is not set
500# CONFIG_MACINTOSH_DRIVERS is not set 574# CONFIG_MACINTOSH_DRIVERS is not set
501CONFIG_NETDEVICES=y 575CONFIG_NETDEVICES=y
502# CONFIG_NETDEVICES_MULTIQUEUE is not set
503# CONFIG_DUMMY is not set 576# CONFIG_DUMMY is not set
504# CONFIG_BONDING is not set 577# CONFIG_BONDING is not set
505# CONFIG_MACVLAN is not set 578# CONFIG_MACVLAN is not set
@@ -534,7 +607,6 @@ CONFIG_NETDEV_1000=y
534# CONFIG_DL2K is not set 607# CONFIG_DL2K is not set
535# CONFIG_E1000 is not set 608# CONFIG_E1000 is not set
536# CONFIG_E1000E is not set 609# CONFIG_E1000E is not set
537# CONFIG_E1000E_ENABLED is not set
538# CONFIG_IP1000 is not set 610# CONFIG_IP1000 is not set
539# CONFIG_IGB is not set 611# CONFIG_IGB is not set
540# CONFIG_NS83820 is not set 612# CONFIG_NS83820 is not set
@@ -549,6 +621,7 @@ CONFIG_NETDEV_1000=y
549# CONFIG_BNX2 is not set 621# CONFIG_BNX2 is not set
550# CONFIG_QLA3XXX is not set 622# CONFIG_QLA3XXX is not set
551# CONFIG_ATL1 is not set 623# CONFIG_ATL1 is not set
624# CONFIG_ATL1E is not set
552CONFIG_NETDEV_10000=y 625CONFIG_NETDEV_10000=y
553# CONFIG_CHELSIO_T1 is not set 626# CONFIG_CHELSIO_T1 is not set
554# CONFIG_CHELSIO_T3 is not set 627# CONFIG_CHELSIO_T3 is not set
@@ -570,11 +643,21 @@ CONFIG_NETDEV_10000=y
570# CONFIG_WLAN_PRE80211 is not set 643# CONFIG_WLAN_PRE80211 is not set
571# CONFIG_WLAN_80211 is not set 644# CONFIG_WLAN_80211 is not set
572# CONFIG_IWLWIFI_LEDS is not set 645# CONFIG_IWLWIFI_LEDS is not set
646
647#
648# USB Network Adapters
649#
650# CONFIG_USB_CATC is not set
651# CONFIG_USB_KAWETH is not set
652# CONFIG_USB_PEGASUS is not set
653# CONFIG_USB_RTL8150 is not set
654# CONFIG_USB_USBNET is not set
573# CONFIG_WAN is not set 655# CONFIG_WAN is not set
574# CONFIG_FDDI is not set 656# CONFIG_FDDI is not set
575# CONFIG_HIPPI is not set 657# CONFIG_HIPPI is not set
576# CONFIG_PPP is not set 658# CONFIG_PPP is not set
577# CONFIG_SLIP is not set 659# CONFIG_SLIP is not set
660# CONFIG_NET_FC is not set
578# CONFIG_NETCONSOLE is not set 661# CONFIG_NETCONSOLE is not set
579# CONFIG_NETPOLL is not set 662# CONFIG_NETPOLL is not set
580# CONFIG_NET_POLL_CONTROLLER is not set 663# CONFIG_NET_POLL_CONTROLLER is not set
@@ -635,8 +718,77 @@ CONFIG_XILINX_HWICAP=m
635# CONFIG_RAW_DRIVER is not set 718# CONFIG_RAW_DRIVER is not set
636# CONFIG_TCG_TPM is not set 719# CONFIG_TCG_TPM is not set
637CONFIG_DEVPORT=y 720CONFIG_DEVPORT=y
638# CONFIG_I2C is not set 721CONFIG_I2C=m
722CONFIG_I2C_BOARDINFO=y
723CONFIG_I2C_CHARDEV=m
724
725#
726# I2C Hardware Bus support
727#
728
729#
730# PC SMBus host controller drivers
731#
732# CONFIG_I2C_ALI1535 is not set
733# CONFIG_I2C_ALI1563 is not set
734# CONFIG_I2C_ALI15X3 is not set
735# CONFIG_I2C_AMD756 is not set
736# CONFIG_I2C_AMD8111 is not set
737# CONFIG_I2C_I801 is not set
738# CONFIG_I2C_ISCH is not set
739# CONFIG_I2C_PIIX4 is not set
740# CONFIG_I2C_NFORCE2 is not set
741# CONFIG_I2C_SIS5595 is not set
742# CONFIG_I2C_SIS630 is not set
743# CONFIG_I2C_SIS96X is not set
744# CONFIG_I2C_VIA is not set
745# CONFIG_I2C_VIAPRO is not set
746
747#
748# I2C system bus drivers (mostly embedded / system-on-chip)
749#
750CONFIG_I2C_IBM_IIC=m
751# CONFIG_I2C_MPC is not set
752# CONFIG_I2C_OCORES is not set
753# CONFIG_I2C_SIMTEC is not set
754
755#
756# External I2C/SMBus adapter drivers
757#
758# CONFIG_I2C_PARPORT_LIGHT is not set
759# CONFIG_I2C_TAOS_EVM is not set
760# CONFIG_I2C_TINY_USB is not set
761
762#
763# Graphics adapter I2C/DDC channel drivers
764#
765# CONFIG_I2C_VOODOO3 is not set
766
767#
768# Other I2C/SMBus bus drivers
769#
770# CONFIG_I2C_PCA_PLATFORM is not set
771# CONFIG_I2C_STUB is not set
772
773#
774# Miscellaneous I2C Chip support
775#
776# CONFIG_DS1682 is not set
777# CONFIG_AT24 is not set
778# CONFIG_SENSORS_EEPROM is not set
779# CONFIG_SENSORS_PCF8574 is not set
780# CONFIG_PCF8575 is not set
781# CONFIG_SENSORS_PCA9539 is not set
782# CONFIG_SENSORS_PCF8591 is not set
783# CONFIG_SENSORS_MAX6875 is not set
784# CONFIG_SENSORS_TSL2550 is not set
785# CONFIG_I2C_DEBUG_CORE is not set
786# CONFIG_I2C_DEBUG_ALGO is not set
787# CONFIG_I2C_DEBUG_BUS is not set
788# CONFIG_I2C_DEBUG_CHIP is not set
639# CONFIG_SPI is not set 789# CONFIG_SPI is not set
790CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
791# CONFIG_GPIOLIB is not set
640# CONFIG_W1 is not set 792# CONFIG_W1 is not set
641# CONFIG_POWER_SUPPLY is not set 793# CONFIG_POWER_SUPPLY is not set
642# CONFIG_HWMON is not set 794# CONFIG_HWMON is not set
@@ -653,6 +805,7 @@ CONFIG_SSB_POSSIBLE=y
653# 805#
654# Multifunction device drivers 806# Multifunction device drivers
655# 807#
808# CONFIG_MFD_CORE is not set
656# CONFIG_MFD_SM501 is not set 809# CONFIG_MFD_SM501 is not set
657# CONFIG_HTC_PASIC3 is not set 810# CONFIG_HTC_PASIC3 is not set
658 811
@@ -686,22 +839,113 @@ CONFIG_SSB_POSSIBLE=y
686# Display device support 839# Display device support
687# 840#
688# CONFIG_DISPLAY_SUPPORT is not set 841# CONFIG_DISPLAY_SUPPORT is not set
689
690#
691# Sound
692#
693# CONFIG_SOUND is not set 842# CONFIG_SOUND is not set
694CONFIG_USB_SUPPORT=y 843CONFIG_USB_SUPPORT=y
695CONFIG_USB_ARCH_HAS_HCD=y 844CONFIG_USB_ARCH_HAS_HCD=y
696CONFIG_USB_ARCH_HAS_OHCI=y 845CONFIG_USB_ARCH_HAS_OHCI=y
697CONFIG_USB_ARCH_HAS_EHCI=y 846CONFIG_USB_ARCH_HAS_EHCI=y
698# CONFIG_USB is not set 847CONFIG_USB=m
848# CONFIG_USB_DEBUG is not set
849# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set
850
851#
852# Miscellaneous USB options
853#
854# CONFIG_USB_DEVICEFS is not set
855CONFIG_USB_DEVICE_CLASS=y
856# CONFIG_USB_DYNAMIC_MINORS is not set
857# CONFIG_USB_OTG is not set
699# CONFIG_USB_OTG_WHITELIST is not set 858# CONFIG_USB_OTG_WHITELIST is not set
700# CONFIG_USB_OTG_BLACKLIST_HUB is not set 859# CONFIG_USB_OTG_BLACKLIST_HUB is not set
701 860
702# 861#
862# USB Host Controller Drivers
863#
864# CONFIG_USB_C67X00_HCD is not set
865CONFIG_USB_EHCI_HCD=m
866# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
867# CONFIG_USB_EHCI_TT_NEWSCHED is not set
868CONFIG_USB_EHCI_BIG_ENDIAN_MMIO=y
869CONFIG_USB_EHCI_BIG_ENDIAN_DESC=y
870CONFIG_USB_EHCI_HCD_PPC_OF=y
871# CONFIG_USB_ISP116X_HCD is not set
872# CONFIG_USB_ISP1760_HCD is not set
873CONFIG_USB_OHCI_HCD=m
874CONFIG_USB_OHCI_HCD_PPC_OF=y
875CONFIG_USB_OHCI_HCD_PPC_OF_BE=y
876# CONFIG_USB_OHCI_HCD_PPC_OF_LE is not set
877# CONFIG_USB_OHCI_HCD_PCI is not set
878CONFIG_USB_OHCI_BIG_ENDIAN_DESC=y
879CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y
880CONFIG_USB_OHCI_LITTLE_ENDIAN=y
881# CONFIG_USB_UHCI_HCD is not set
882# CONFIG_USB_SL811_HCD is not set
883# CONFIG_USB_R8A66597_HCD is not set
884
885#
886# USB Device Class drivers
887#
888# CONFIG_USB_ACM is not set
889# CONFIG_USB_PRINTER is not set
890# CONFIG_USB_WDM is not set
891
892#
703# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 893# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
704# 894#
895
896#
897# may also be needed; see USB_STORAGE Help for more information
898#
899CONFIG_USB_STORAGE=m
900# CONFIG_USB_STORAGE_DEBUG is not set
901# CONFIG_USB_STORAGE_DATAFAB is not set
902# CONFIG_USB_STORAGE_FREECOM is not set
903# CONFIG_USB_STORAGE_ISD200 is not set
904# CONFIG_USB_STORAGE_DPCM is not set
905# CONFIG_USB_STORAGE_USBAT is not set
906# CONFIG_USB_STORAGE_SDDR09 is not set
907# CONFIG_USB_STORAGE_SDDR55 is not set
908# CONFIG_USB_STORAGE_JUMPSHOT is not set
909# CONFIG_USB_STORAGE_ALAUDA is not set
910# CONFIG_USB_STORAGE_KARMA is not set
911# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
912# CONFIG_USB_LIBUSUAL is not set
913
914#
915# USB Imaging devices
916#
917# CONFIG_USB_MDC800 is not set
918# CONFIG_USB_MICROTEK is not set
919# CONFIG_USB_MON is not set
920
921#
922# USB port drivers
923#
924# CONFIG_USB_SERIAL is not set
925
926#
927# USB Miscellaneous drivers
928#
929# CONFIG_USB_EMI62 is not set
930# CONFIG_USB_EMI26 is not set
931# CONFIG_USB_ADUTUX is not set
932# CONFIG_USB_AUERSWALD is not set
933# CONFIG_USB_RIO500 is not set
934# CONFIG_USB_LEGOTOWER is not set
935# CONFIG_USB_LCD is not set
936# CONFIG_USB_BERRY_CHARGE is not set
937# CONFIG_USB_LED is not set
938# CONFIG_USB_CYPRESS_CY7C63 is not set
939# CONFIG_USB_CYTHERM is not set
940# CONFIG_USB_PHIDGET is not set
941# CONFIG_USB_IDMOUSE is not set
942# CONFIG_USB_FTDI_ELAN is not set
943# CONFIG_USB_APPLEDISPLAY is not set
944# CONFIG_USB_SISUSBVGA is not set
945# CONFIG_USB_LD is not set
946# CONFIG_USB_TRANCEVIBRATOR is not set
947# CONFIG_USB_IOWARRIOR is not set
948# CONFIG_USB_ISIGHTFW is not set
705# CONFIG_USB_GADGET is not set 949# CONFIG_USB_GADGET is not set
706# CONFIG_MMC is not set 950# CONFIG_MMC is not set
707# CONFIG_MEMSTICK is not set 951# CONFIG_MEMSTICK is not set
@@ -719,8 +963,13 @@ CONFIG_USB_ARCH_HAS_EHCI=y
719CONFIG_EXT2_FS=y 963CONFIG_EXT2_FS=y
720# CONFIG_EXT2_FS_XATTR is not set 964# CONFIG_EXT2_FS_XATTR is not set
721# CONFIG_EXT2_FS_XIP is not set 965# CONFIG_EXT2_FS_XIP is not set
722# CONFIG_EXT3_FS is not set 966CONFIG_EXT3_FS=m
967CONFIG_EXT3_FS_XATTR=y
968# CONFIG_EXT3_FS_POSIX_ACL is not set
969# CONFIG_EXT3_FS_SECURITY is not set
723# CONFIG_EXT4DEV_FS is not set 970# CONFIG_EXT4DEV_FS is not set
971CONFIG_JBD=m
972CONFIG_FS_MBCACHE=y
724# CONFIG_REISERFS_FS is not set 973# CONFIG_REISERFS_FS is not set
725# CONFIG_JFS_FS is not set 974# CONFIG_JFS_FS is not set
726# CONFIG_FS_POSIX_ACL is not set 975# CONFIG_FS_POSIX_ACL is not set
@@ -743,8 +992,11 @@ CONFIG_INOTIFY_USER=y
743# 992#
744# DOS/FAT/NT Filesystems 993# DOS/FAT/NT Filesystems
745# 994#
995CONFIG_FAT_FS=m
746# CONFIG_MSDOS_FS is not set 996# CONFIG_MSDOS_FS is not set
747# CONFIG_VFAT_FS is not set 997CONFIG_VFAT_FS=m
998CONFIG_FAT_DEFAULT_CODEPAGE=437
999CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
748# CONFIG_NTFS_FS is not set 1000# CONFIG_NTFS_FS is not set
749 1001
750# 1002#
@@ -780,9 +1032,16 @@ CONFIG_JFFS2_ZLIB=y
780# CONFIG_JFFS2_LZO is not set 1032# CONFIG_JFFS2_LZO is not set
781CONFIG_JFFS2_RTIME=y 1033CONFIG_JFFS2_RTIME=y
782# CONFIG_JFFS2_RUBIN is not set 1034# CONFIG_JFFS2_RUBIN is not set
1035CONFIG_UBIFS_FS=m
1036CONFIG_UBIFS_FS_XATTR=y
1037# CONFIG_UBIFS_FS_ADVANCED_COMPR is not set
1038CONFIG_UBIFS_FS_LZO=y
1039CONFIG_UBIFS_FS_ZLIB=y
1040# CONFIG_UBIFS_FS_DEBUG is not set
783CONFIG_CRAMFS=y 1041CONFIG_CRAMFS=y
784# CONFIG_VXFS_FS is not set 1042# CONFIG_VXFS_FS is not set
785# CONFIG_MINIX_FS is not set 1043# CONFIG_MINIX_FS is not set
1044# CONFIG_OMFS_FS is not set
786# CONFIG_HPFS_FS is not set 1045# CONFIG_HPFS_FS is not set
787# CONFIG_QNX4FS_FS is not set 1046# CONFIG_QNX4FS_FS is not set
788# CONFIG_ROMFS_FS is not set 1047# CONFIG_ROMFS_FS is not set
@@ -793,13 +1052,12 @@ CONFIG_NFS_FS=y
793CONFIG_NFS_V3=y 1052CONFIG_NFS_V3=y
794# CONFIG_NFS_V3_ACL is not set 1053# CONFIG_NFS_V3_ACL is not set
795# CONFIG_NFS_V4 is not set 1054# CONFIG_NFS_V4 is not set
796# CONFIG_NFSD is not set
797CONFIG_ROOT_NFS=y 1055CONFIG_ROOT_NFS=y
1056# CONFIG_NFSD is not set
798CONFIG_LOCKD=y 1057CONFIG_LOCKD=y
799CONFIG_LOCKD_V4=y 1058CONFIG_LOCKD_V4=y
800CONFIG_NFS_COMMON=y 1059CONFIG_NFS_COMMON=y
801CONFIG_SUNRPC=y 1060CONFIG_SUNRPC=y
802# CONFIG_SUNRPC_BIND34 is not set
803# CONFIG_RPCSEC_GSS_KRB5 is not set 1061# CONFIG_RPCSEC_GSS_KRB5 is not set
804# CONFIG_RPCSEC_GSS_SPKM3 is not set 1062# CONFIG_RPCSEC_GSS_SPKM3 is not set
805# CONFIG_SMB_FS is not set 1063# CONFIG_SMB_FS is not set
@@ -813,7 +1071,46 @@ CONFIG_SUNRPC=y
813# 1071#
814# CONFIG_PARTITION_ADVANCED is not set 1072# CONFIG_PARTITION_ADVANCED is not set
815CONFIG_MSDOS_PARTITION=y 1073CONFIG_MSDOS_PARTITION=y
816# CONFIG_NLS is not set 1074CONFIG_NLS=m
1075CONFIG_NLS_DEFAULT="iso8859-1"
1076CONFIG_NLS_CODEPAGE_437=m
1077# CONFIG_NLS_CODEPAGE_737 is not set
1078# CONFIG_NLS_CODEPAGE_775 is not set
1079# CONFIG_NLS_CODEPAGE_850 is not set
1080# CONFIG_NLS_CODEPAGE_852 is not set
1081# CONFIG_NLS_CODEPAGE_855 is not set
1082# CONFIG_NLS_CODEPAGE_857 is not set
1083# CONFIG_NLS_CODEPAGE_860 is not set
1084# CONFIG_NLS_CODEPAGE_861 is not set
1085# CONFIG_NLS_CODEPAGE_862 is not set
1086# CONFIG_NLS_CODEPAGE_863 is not set
1087# CONFIG_NLS_CODEPAGE_864 is not set
1088# CONFIG_NLS_CODEPAGE_865 is not set
1089# CONFIG_NLS_CODEPAGE_866 is not set
1090# CONFIG_NLS_CODEPAGE_869 is not set
1091# CONFIG_NLS_CODEPAGE_936 is not set
1092# CONFIG_NLS_CODEPAGE_950 is not set
1093# CONFIG_NLS_CODEPAGE_932 is not set
1094# CONFIG_NLS_CODEPAGE_949 is not set
1095# CONFIG_NLS_CODEPAGE_874 is not set
1096# CONFIG_NLS_ISO8859_8 is not set
1097# CONFIG_NLS_CODEPAGE_1250 is not set
1098# CONFIG_NLS_CODEPAGE_1251 is not set
1099# CONFIG_NLS_ASCII is not set
1100CONFIG_NLS_ISO8859_1=m
1101# CONFIG_NLS_ISO8859_2 is not set
1102# CONFIG_NLS_ISO8859_3 is not set
1103# CONFIG_NLS_ISO8859_4 is not set
1104# CONFIG_NLS_ISO8859_5 is not set
1105# CONFIG_NLS_ISO8859_6 is not set
1106# CONFIG_NLS_ISO8859_7 is not set
1107# CONFIG_NLS_ISO8859_9 is not set
1108# CONFIG_NLS_ISO8859_13 is not set
1109# CONFIG_NLS_ISO8859_14 is not set
1110# CONFIG_NLS_ISO8859_15 is not set
1111# CONFIG_NLS_KOI8_R is not set
1112# CONFIG_NLS_KOI8_U is not set
1113# CONFIG_NLS_UTF8 is not set
817# CONFIG_DLM is not set 1114# CONFIG_DLM is not set
818 1115
819# 1116#
@@ -822,13 +1119,16 @@ CONFIG_MSDOS_PARTITION=y
822CONFIG_BITREVERSE=y 1119CONFIG_BITREVERSE=y
823# CONFIG_GENERIC_FIND_FIRST_BIT is not set 1120# CONFIG_GENERIC_FIND_FIRST_BIT is not set
824# CONFIG_CRC_CCITT is not set 1121# CONFIG_CRC_CCITT is not set
825# CONFIG_CRC16 is not set 1122CONFIG_CRC16=m
1123CONFIG_CRC_T10DIF=m
826# CONFIG_CRC_ITU_T is not set 1124# CONFIG_CRC_ITU_T is not set
827CONFIG_CRC32=y 1125CONFIG_CRC32=y
828# CONFIG_CRC7 is not set 1126# CONFIG_CRC7 is not set
829# CONFIG_LIBCRC32C is not set 1127# CONFIG_LIBCRC32C is not set
830CONFIG_ZLIB_INFLATE=y 1128CONFIG_ZLIB_INFLATE=y
831CONFIG_ZLIB_DEFLATE=y 1129CONFIG_ZLIB_DEFLATE=y
1130CONFIG_LZO_COMPRESS=m
1131CONFIG_LZO_DECOMPRESS=m
832CONFIG_PLIST=y 1132CONFIG_PLIST=y
833CONFIG_HAS_IOMEM=y 1133CONFIG_HAS_IOMEM=y
834CONFIG_HAS_IOPORT=y 1134CONFIG_HAS_IOPORT=y
@@ -849,6 +1149,8 @@ CONFIG_MAGIC_SYSRQ=y
849CONFIG_DEBUG_KERNEL=y 1149CONFIG_DEBUG_KERNEL=y
850# CONFIG_DEBUG_SHIRQ is not set 1150# CONFIG_DEBUG_SHIRQ is not set
851CONFIG_DETECT_SOFTLOCKUP=y 1151CONFIG_DETECT_SOFTLOCKUP=y
1152# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
1153CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
852CONFIG_SCHED_DEBUG=y 1154CONFIG_SCHED_DEBUG=y
853# CONFIG_SCHEDSTATS is not set 1155# CONFIG_SCHEDSTATS is not set
854# CONFIG_TIMER_STATS is not set 1156# CONFIG_TIMER_STATS is not set
@@ -866,19 +1168,28 @@ CONFIG_DEBUG_BUGVERBOSE=y
866# CONFIG_DEBUG_INFO is not set 1168# CONFIG_DEBUG_INFO is not set
867# CONFIG_DEBUG_VM is not set 1169# CONFIG_DEBUG_VM is not set
868# CONFIG_DEBUG_WRITECOUNT is not set 1170# CONFIG_DEBUG_WRITECOUNT is not set
1171# CONFIG_DEBUG_MEMORY_INIT is not set
869# CONFIG_DEBUG_LIST is not set 1172# CONFIG_DEBUG_LIST is not set
870# CONFIG_DEBUG_SG is not set 1173# CONFIG_DEBUG_SG is not set
871# CONFIG_BOOT_PRINTK_DELAY is not set 1174# CONFIG_BOOT_PRINTK_DELAY is not set
872# CONFIG_RCU_TORTURE_TEST is not set 1175# CONFIG_RCU_TORTURE_TEST is not set
873# CONFIG_BACKTRACE_SELF_TEST is not set 1176# CONFIG_BACKTRACE_SELF_TEST is not set
874# CONFIG_FAULT_INJECTION is not set 1177# CONFIG_FAULT_INJECTION is not set
1178# CONFIG_LATENCYTOP is not set
1179CONFIG_HAVE_FTRACE=y
1180CONFIG_HAVE_DYNAMIC_FTRACE=y
1181# CONFIG_FTRACE is not set
1182# CONFIG_SCHED_TRACER is not set
1183# CONFIG_CONTEXT_SWITCH_TRACER is not set
875# CONFIG_SAMPLES is not set 1184# CONFIG_SAMPLES is not set
1185CONFIG_HAVE_ARCH_KGDB=y
1186# CONFIG_KGDB is not set
876# CONFIG_DEBUG_STACKOVERFLOW is not set 1187# CONFIG_DEBUG_STACKOVERFLOW is not set
877# CONFIG_DEBUG_STACK_USAGE is not set 1188# CONFIG_DEBUG_STACK_USAGE is not set
878# CONFIG_DEBUG_PAGEALLOC is not set 1189# CONFIG_DEBUG_PAGEALLOC is not set
879# CONFIG_DEBUGGER is not set
880# CONFIG_CODE_PATCHING_SELFTEST is not set 1190# CONFIG_CODE_PATCHING_SELFTEST is not set
881# CONFIG_FTR_FIXUP_SELFTEST is not set 1191# CONFIG_FTR_FIXUP_SELFTEST is not set
1192# CONFIG_XMON is not set
882# CONFIG_IRQSTACKS is not set 1193# CONFIG_IRQSTACKS is not set
883# CONFIG_BDI_SWITCH is not set 1194# CONFIG_BDI_SWITCH is not set
884# CONFIG_PPC_EARLY_DEBUG is not set 1195# CONFIG_PPC_EARLY_DEBUG is not set
@@ -934,6 +1245,10 @@ CONFIG_CRYPTO_PCBC=y
934# CONFIG_CRYPTO_MD4 is not set 1245# CONFIG_CRYPTO_MD4 is not set
935CONFIG_CRYPTO_MD5=y 1246CONFIG_CRYPTO_MD5=y
936# CONFIG_CRYPTO_MICHAEL_MIC is not set 1247# CONFIG_CRYPTO_MICHAEL_MIC is not set
1248# CONFIG_CRYPTO_RMD128 is not set
1249# CONFIG_CRYPTO_RMD160 is not set
1250# CONFIG_CRYPTO_RMD256 is not set
1251# CONFIG_CRYPTO_RMD320 is not set
937# CONFIG_CRYPTO_SHA1 is not set 1252# CONFIG_CRYPTO_SHA1 is not set
938# CONFIG_CRYPTO_SHA256 is not set 1253# CONFIG_CRYPTO_SHA256 is not set
939# CONFIG_CRYPTO_SHA512 is not set 1254# CONFIG_CRYPTO_SHA512 is not set
@@ -962,8 +1277,8 @@ CONFIG_CRYPTO_DES=y
962# 1277#
963# Compression 1278# Compression
964# 1279#
965# CONFIG_CRYPTO_DEFLATE is not set 1280CONFIG_CRYPTO_DEFLATE=m
966# CONFIG_CRYPTO_LZO is not set 1281CONFIG_CRYPTO_LZO=m
967# CONFIG_CRYPTO_HW is not set 1282# CONFIG_CRYPTO_HW is not set
968# CONFIG_PPC_CLOCK is not set 1283# CONFIG_PPC_CLOCK is not set
969# CONFIG_VIRTUALIZATION is not set 1284# CONFIG_VIRTUALIZATION is not set
diff --git a/arch/powerpc/include/asm/mmu-hash64.h b/arch/powerpc/include/asm/mmu-hash64.h
index 19c7a9403490..c2df53c5ceb9 100644
--- a/arch/powerpc/include/asm/mmu-hash64.h
+++ b/arch/powerpc/include/asm/mmu-hash64.h
@@ -278,7 +278,7 @@ extern int hash_huge_page(struct mm_struct *mm, unsigned long access,
278 unsigned long trap); 278 unsigned long trap);
279 279
280extern int htab_bolt_mapping(unsigned long vstart, unsigned long vend, 280extern int htab_bolt_mapping(unsigned long vstart, unsigned long vend,
281 unsigned long pstart, unsigned long mode, 281 unsigned long pstart, unsigned long prot,
282 int psize, int ssize); 282 int psize, int ssize);
283extern void set_huge_psize(int psize); 283extern void set_huge_psize(int psize);
284extern void add_gpage(unsigned long addr, unsigned long page_size, 284extern void add_gpage(unsigned long addr, unsigned long page_size,
diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c
index 224e9a11765c..ea0c61e09b76 100644
--- a/arch/powerpc/kernel/pci-common.c
+++ b/arch/powerpc/kernel/pci-common.c
@@ -650,11 +650,18 @@ void __devinit pci_process_bridge_OF_ranges(struct pci_controller *hose,
650 } 650 }
651 } 651 }
652 652
653 /* Out of paranoia, let's put the ISA hole last if any */ 653 /* If there's an ISA hole and the pci_mem_offset is -not- matching
654 if (isa_hole >= 0 && memno > 0 && isa_hole != (memno-1)) { 654 * the ISA hole offset, then we need to remove the ISA hole from
655 struct resource tmp = hose->mem_resources[isa_hole]; 655 * the resource list for that brige
656 hose->mem_resources[isa_hole] = hose->mem_resources[memno-1]; 656 */
657 hose->mem_resources[memno-1] = tmp; 657 if (isa_hole >= 0 && hose->pci_mem_offset != isa_mb) {
658 unsigned int next = isa_hole + 1;
659 printk(KERN_INFO " Removing ISA hole at 0x%016llx\n", isa_mb);
660 if (next < memno)
661 memmove(&hose->mem_resources[isa_hole],
662 &hose->mem_resources[next],
663 sizeof(struct resource) * (memno - next));
664 hose->mem_resources[--memno].flags = 0;
658 } 665 }
659} 666}
660 667
diff --git a/arch/powerpc/kernel/rtas.c b/arch/powerpc/kernel/rtas.c
index c680f1bbd387..1f8505c23548 100644
--- a/arch/powerpc/kernel/rtas.c
+++ b/arch/powerpc/kernel/rtas.c
@@ -792,6 +792,9 @@ asmlinkage int ppc_rtas(struct rtas_args __user *uargs)
792 if (args.token == RTAS_UNKNOWN_SERVICE) 792 if (args.token == RTAS_UNKNOWN_SERVICE)
793 return -EINVAL; 793 return -EINVAL;
794 794
795 args.rets = &args.args[nargs];
796 memset(args.rets, 0, args.nret * sizeof(rtas_arg_t));
797
795 /* Need to handle ibm,suspend_me call specially */ 798 /* Need to handle ibm,suspend_me call specially */
796 if (args.token == ibm_suspend_me_token) { 799 if (args.token == ibm_suspend_me_token) {
797 rc = rtas_ibm_suspend_me(&args); 800 rc = rtas_ibm_suspend_me(&args);
@@ -808,8 +811,6 @@ asmlinkage int ppc_rtas(struct rtas_args __user *uargs)
808 enter_rtas(__pa(&rtas.args)); 811 enter_rtas(__pa(&rtas.args));
809 args = rtas.args; 812 args = rtas.args;
810 813
811 args.rets = &args.args[nargs];
812
813 /* A -1 return code indicates that the last command couldn't 814 /* A -1 return code indicates that the last command couldn't
814 be completed due to a hardware error. */ 815 be completed due to a hardware error. */
815 if (args.rets[0] == -1) 816 if (args.rets[0] == -1)
diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c
index 5ce5a4dcd008..14be408dfc9b 100644
--- a/arch/powerpc/mm/hash_utils_64.c
+++ b/arch/powerpc/mm/hash_utils_64.c
@@ -151,39 +151,53 @@ static struct mmu_psize_def mmu_psize_defaults_gp[] = {
151 }, 151 },
152}; 152};
153 153
154static unsigned long htab_convert_pte_flags(unsigned long pteflags)
155{
156 unsigned long rflags = pteflags & 0x1fa;
157
158 /* _PAGE_EXEC -> NOEXEC */
159 if ((pteflags & _PAGE_EXEC) == 0)
160 rflags |= HPTE_R_N;
161
162 /* PP bits. PAGE_USER is already PP bit 0x2, so we only
163 * need to add in 0x1 if it's a read-only user page
164 */
165 if ((pteflags & _PAGE_USER) && !((pteflags & _PAGE_RW) &&
166 (pteflags & _PAGE_DIRTY)))
167 rflags |= 1;
168
169 /* Always add C */
170 return rflags | HPTE_R_C;
171}
154 172
155int htab_bolt_mapping(unsigned long vstart, unsigned long vend, 173int htab_bolt_mapping(unsigned long vstart, unsigned long vend,
156 unsigned long pstart, unsigned long mode, 174 unsigned long pstart, unsigned long prot,
157 int psize, int ssize) 175 int psize, int ssize)
158{ 176{
159 unsigned long vaddr, paddr; 177 unsigned long vaddr, paddr;
160 unsigned int step, shift; 178 unsigned int step, shift;
161 unsigned long tmp_mode;
162 int ret = 0; 179 int ret = 0;
163 180
164 shift = mmu_psize_defs[psize].shift; 181 shift = mmu_psize_defs[psize].shift;
165 step = 1 << shift; 182 step = 1 << shift;
166 183
184 prot = htab_convert_pte_flags(prot);
185
186 DBG("htab_bolt_mapping(%lx..%lx -> %lx (%lx,%d,%d)\n",
187 vstart, vend, pstart, prot, psize, ssize);
188
167 for (vaddr = vstart, paddr = pstart; vaddr < vend; 189 for (vaddr = vstart, paddr = pstart; vaddr < vend;
168 vaddr += step, paddr += step) { 190 vaddr += step, paddr += step) {
169 unsigned long hash, hpteg; 191 unsigned long hash, hpteg;
170 unsigned long vsid = get_kernel_vsid(vaddr, ssize); 192 unsigned long vsid = get_kernel_vsid(vaddr, ssize);
171 unsigned long va = hpt_va(vaddr, vsid, ssize); 193 unsigned long va = hpt_va(vaddr, vsid, ssize);
172 194
173 tmp_mode = mode;
174
175 /* Make non-kernel text non-executable */
176 if (!in_kernel_text(vaddr))
177 tmp_mode = mode | HPTE_R_N;
178
179 hash = hpt_hash(va, shift, ssize); 195 hash = hpt_hash(va, shift, ssize);
180 hpteg = ((hash & htab_hash_mask) * HPTES_PER_GROUP); 196 hpteg = ((hash & htab_hash_mask) * HPTES_PER_GROUP);
181 197
182 DBG("htab_bolt_mapping: calling %p\n", ppc_md.hpte_insert);
183
184 BUG_ON(!ppc_md.hpte_insert); 198 BUG_ON(!ppc_md.hpte_insert);
185 ret = ppc_md.hpte_insert(hpteg, va, paddr, 199 ret = ppc_md.hpte_insert(hpteg, va, paddr, prot,
186 tmp_mode, HPTE_V_BOLTED, psize, ssize); 200 HPTE_V_BOLTED, psize, ssize);
187 201
188 if (ret < 0) 202 if (ret < 0)
189 break; 203 break;
@@ -519,9 +533,9 @@ static unsigned long __init htab_get_table_size(void)
519#ifdef CONFIG_MEMORY_HOTPLUG 533#ifdef CONFIG_MEMORY_HOTPLUG
520void create_section_mapping(unsigned long start, unsigned long end) 534void create_section_mapping(unsigned long start, unsigned long end)
521{ 535{
522 BUG_ON(htab_bolt_mapping(start, end, __pa(start), 536 BUG_ON(htab_bolt_mapping(start, end, __pa(start),
523 _PAGE_ACCESSED | _PAGE_DIRTY | _PAGE_COHERENT | PP_RWXX, 537 PAGE_KERNEL, mmu_linear_psize,
524 mmu_linear_psize, mmu_kernel_ssize)); 538 mmu_kernel_ssize));
525} 539}
526 540
527int remove_section_mapping(unsigned long start, unsigned long end) 541int remove_section_mapping(unsigned long start, unsigned long end)
@@ -570,7 +584,7 @@ void __init htab_initialize(void)
570{ 584{
571 unsigned long table; 585 unsigned long table;
572 unsigned long pteg_count; 586 unsigned long pteg_count;
573 unsigned long mode_rw; 587 unsigned long prot, tprot;
574 unsigned long base = 0, size = 0, limit; 588 unsigned long base = 0, size = 0, limit;
575 int i; 589 int i;
576 590
@@ -628,7 +642,7 @@ void __init htab_initialize(void)
628 mtspr(SPRN_SDR1, _SDR1); 642 mtspr(SPRN_SDR1, _SDR1);
629 } 643 }
630 644
631 mode_rw = _PAGE_ACCESSED | _PAGE_DIRTY | _PAGE_COHERENT | PP_RWXX; 645 prot = PAGE_KERNEL;
632 646
633#ifdef CONFIG_DEBUG_PAGEALLOC 647#ifdef CONFIG_DEBUG_PAGEALLOC
634 linear_map_hash_count = lmb_end_of_DRAM() >> PAGE_SHIFT; 648 linear_map_hash_count = lmb_end_of_DRAM() >> PAGE_SHIFT;
@@ -646,8 +660,10 @@ void __init htab_initialize(void)
646 for (i=0; i < lmb.memory.cnt; i++) { 660 for (i=0; i < lmb.memory.cnt; i++) {
647 base = (unsigned long)__va(lmb.memory.region[i].base); 661 base = (unsigned long)__va(lmb.memory.region[i].base);
648 size = lmb.memory.region[i].size; 662 size = lmb.memory.region[i].size;
663 tprot = prot | (in_kernel_text(base) ? _PAGE_EXEC : 0);
649 664
650 DBG("creating mapping for region: %lx : %lx\n", base, size); 665 DBG("creating mapping for region: %lx..%lx (prot: %x)\n",
666 base, size, tprot);
651 667
652#ifdef CONFIG_U3_DART 668#ifdef CONFIG_U3_DART
653 /* Do not map the DART space. Fortunately, it will be aligned 669 /* Do not map the DART space. Fortunately, it will be aligned
@@ -664,21 +680,21 @@ void __init htab_initialize(void)
664 unsigned long dart_table_end = dart_tablebase + 16 * MB; 680 unsigned long dart_table_end = dart_tablebase + 16 * MB;
665 if (base != dart_tablebase) 681 if (base != dart_tablebase)
666 BUG_ON(htab_bolt_mapping(base, dart_tablebase, 682 BUG_ON(htab_bolt_mapping(base, dart_tablebase,
667 __pa(base), mode_rw, 683 __pa(base), tprot,
668 mmu_linear_psize, 684 mmu_linear_psize,
669 mmu_kernel_ssize)); 685 mmu_kernel_ssize));
670 if ((base + size) > dart_table_end) 686 if ((base + size) > dart_table_end)
671 BUG_ON(htab_bolt_mapping(dart_tablebase+16*MB, 687 BUG_ON(htab_bolt_mapping(dart_tablebase+16*MB,
672 base + size, 688 base + size,
673 __pa(dart_table_end), 689 __pa(dart_table_end),
674 mode_rw, 690 tprot,
675 mmu_linear_psize, 691 mmu_linear_psize,
676 mmu_kernel_ssize)); 692 mmu_kernel_ssize));
677 continue; 693 continue;
678 } 694 }
679#endif /* CONFIG_U3_DART */ 695#endif /* CONFIG_U3_DART */
680 BUG_ON(htab_bolt_mapping(base, base + size, __pa(base), 696 BUG_ON(htab_bolt_mapping(base, base + size, __pa(base),
681 mode_rw, mmu_linear_psize, mmu_kernel_ssize)); 697 tprot, mmu_linear_psize, mmu_kernel_ssize));
682 } 698 }
683 699
684 /* 700 /*
@@ -696,7 +712,7 @@ void __init htab_initialize(void)
696 tce_alloc_start = base + size + 1; 712 tce_alloc_start = base + size + 1;
697 713
698 BUG_ON(htab_bolt_mapping(tce_alloc_start, tce_alloc_end, 714 BUG_ON(htab_bolt_mapping(tce_alloc_start, tce_alloc_end,
699 __pa(tce_alloc_start), mode_rw, 715 __pa(tce_alloc_start), prot,
700 mmu_linear_psize, mmu_kernel_ssize)); 716 mmu_linear_psize, mmu_kernel_ssize));
701 } 717 }
702 718
@@ -1117,8 +1133,7 @@ static void kernel_map_linear_page(unsigned long vaddr, unsigned long lmi)
1117 unsigned long hash, hpteg; 1133 unsigned long hash, hpteg;
1118 unsigned long vsid = get_kernel_vsid(vaddr, mmu_kernel_ssize); 1134 unsigned long vsid = get_kernel_vsid(vaddr, mmu_kernel_ssize);
1119 unsigned long va = hpt_va(vaddr, vsid, mmu_kernel_ssize); 1135 unsigned long va = hpt_va(vaddr, vsid, mmu_kernel_ssize);
1120 unsigned long mode = _PAGE_ACCESSED | _PAGE_DIRTY | 1136 unsigned long mode = htab_convert_pte_flags(PAGE_KERNEL);
1121 _PAGE_COHERENT | PP_RWXX | HPTE_R_N;
1122 int ret; 1137 int ret;
1123 1138
1124 hash = hpt_hash(va, PAGE_SHIFT, mmu_kernel_ssize); 1139 hash = hpt_hash(va, PAGE_SHIFT, mmu_kernel_ssize);
diff --git a/arch/powerpc/mm/init_64.c b/arch/powerpc/mm/init_64.c
index 4f7df85129d8..036fe2f10c77 100644
--- a/arch/powerpc/mm/init_64.c
+++ b/arch/powerpc/mm/init_64.c
@@ -206,13 +206,10 @@ static int __meminit vmemmap_populated(unsigned long start, int page_size)
206int __meminit vmemmap_populate(struct page *start_page, 206int __meminit vmemmap_populate(struct page *start_page,
207 unsigned long nr_pages, int node) 207 unsigned long nr_pages, int node)
208{ 208{
209 unsigned long mode_rw;
210 unsigned long start = (unsigned long)start_page; 209 unsigned long start = (unsigned long)start_page;
211 unsigned long end = (unsigned long)(start_page + nr_pages); 210 unsigned long end = (unsigned long)(start_page + nr_pages);
212 unsigned long page_size = 1 << mmu_psize_defs[mmu_vmemmap_psize].shift; 211 unsigned long page_size = 1 << mmu_psize_defs[mmu_vmemmap_psize].shift;
213 212
214 mode_rw = _PAGE_ACCESSED | _PAGE_DIRTY | _PAGE_COHERENT | PP_RWXX;
215
216 /* Align to the page size of the linear mapping. */ 213 /* Align to the page size of the linear mapping. */
217 start = _ALIGN_DOWN(start, page_size); 214 start = _ALIGN_DOWN(start, page_size);
218 215
@@ -230,9 +227,9 @@ int __meminit vmemmap_populate(struct page *start_page,
230 pr_debug("vmemmap %08lx allocated at %p, physical %08lx.\n", 227 pr_debug("vmemmap %08lx allocated at %p, physical %08lx.\n",
231 start, p, __pa(p)); 228 start, p, __pa(p));
232 229
233 mapped = htab_bolt_mapping(start, start + page_size, 230 mapped = htab_bolt_mapping(start, start + page_size, __pa(p),
234 __pa(p), mode_rw, mmu_vmemmap_psize, 231 PAGE_KERNEL, mmu_vmemmap_psize,
235 mmu_kernel_ssize); 232 mmu_kernel_ssize);
236 BUG_ON(mapped < 0); 233 BUG_ON(mapped < 0);
237 } 234 }
238 235
diff --git a/arch/powerpc/platforms/44x/warp-nand.c b/arch/powerpc/platforms/44x/warp-nand.c
index e55746b824b4..89ecd76127d8 100644
--- a/arch/powerpc/platforms/44x/warp-nand.c
+++ b/arch/powerpc/platforms/44x/warp-nand.c
@@ -24,7 +24,7 @@
24 24
25static struct resource warp_ndfc = { 25static struct resource warp_ndfc = {
26 .start = WARP_NAND_FLASH_REG_ADDR, 26 .start = WARP_NAND_FLASH_REG_ADDR,
27 .end = WARP_NAND_FLASH_REG_ADDR + WARP_NAND_FLASH_REG_SIZE, 27 .end = WARP_NAND_FLASH_REG_ADDR + WARP_NAND_FLASH_REG_SIZE - 1,
28 .flags = IORESOURCE_MEM, 28 .flags = IORESOURCE_MEM,
29}; 29};
30 30
diff --git a/arch/powerpc/platforms/44x/warp.c b/arch/powerpc/platforms/44x/warp.c
index 9565995cba7f..960edf89be51 100644
--- a/arch/powerpc/platforms/44x/warp.c
+++ b/arch/powerpc/platforms/44x/warp.c
@@ -30,18 +30,6 @@ static __initdata struct of_device_id warp_of_bus[] = {
30 {}, 30 {},
31}; 31};
32 32
33static __initdata struct i2c_board_info warp_i2c_info[] = {
34 { I2C_BOARD_INFO("ad7414", 0x4a) }
35};
36
37static int __init warp_arch_init(void)
38{
39 /* This should go away once support is moved to the dts. */
40 i2c_register_board_info(0, warp_i2c_info, ARRAY_SIZE(warp_i2c_info));
41 return 0;
42}
43machine_arch_initcall(warp, warp_arch_init);
44
45static int __init warp_device_probe(void) 33static int __init warp_device_probe(void)
46{ 34{
47 of_platform_bus_probe(NULL, warp_of_bus, NULL); 35 of_platform_bus_probe(NULL, warp_of_bus, NULL);
@@ -223,7 +211,7 @@ static void pika_setup_critical_temp(struct i2c_client *client)
223 211
224 /* These registers are in 1 degree increments. */ 212 /* These registers are in 1 degree increments. */
225 i2c_smbus_write_byte_data(client, 2, 65); /* Thigh */ 213 i2c_smbus_write_byte_data(client, 2, 65); /* Thigh */
226 i2c_smbus_write_byte_data(client, 3, 55); /* Tlow */ 214 i2c_smbus_write_byte_data(client, 3, 0); /* Tlow */
227 215
228 np = of_find_compatible_node(NULL, NULL, "adi,ad7414"); 216 np = of_find_compatible_node(NULL, NULL, "adi,ad7414");
229 if (np == NULL) { 217 if (np == NULL) {
@@ -289,8 +277,15 @@ found_it:
289 printk(KERN_INFO "PIKA DTM thread running.\n"); 277 printk(KERN_INFO "PIKA DTM thread running.\n");
290 278
291 while (!kthread_should_stop()) { 279 while (!kthread_should_stop()) {
292 u16 temp = swab16(i2c_smbus_read_word_data(client, 0)); 280 int val;
293 out_be32(fpga + 0x20, temp); 281
282 val = i2c_smbus_read_word_data(client, 0);
283 if (val < 0)
284 dev_dbg(&client->dev, "DTM read temp failed.\n");
285 else {
286 s16 temp = swab16(val);
287 out_be32(fpga + 0x20, temp);
288 }
294 289
295 pika_dtm_check_fan(fpga); 290 pika_dtm_check_fan(fpga);
296 291
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 3d0f2b6a5a16..ac2fb0641a04 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -22,7 +22,6 @@ config X86
22 select HAVE_IDE 22 select HAVE_IDE
23 select HAVE_OPROFILE 23 select HAVE_OPROFILE
24 select HAVE_IOREMAP_PROT 24 select HAVE_IOREMAP_PROT
25 select HAVE_GET_USER_PAGES_FAST
26 select HAVE_KPROBES 25 select HAVE_KPROBES
27 select ARCH_WANT_OPTIONAL_GPIOLIB 26 select ARCH_WANT_OPTIONAL_GPIOLIB
28 select HAVE_KRETPROBES 27 select HAVE_KRETPROBES
diff --git a/arch/x86/kernel/apic_32.c b/arch/x86/kernel/apic_32.c
index d6c898358371..039a8d4aaf62 100644
--- a/arch/x86/kernel/apic_32.c
+++ b/arch/x86/kernel/apic_32.c
@@ -1720,15 +1720,19 @@ static int __init parse_lapic_timer_c2_ok(char *arg)
1720} 1720}
1721early_param("lapic_timer_c2_ok", parse_lapic_timer_c2_ok); 1721early_param("lapic_timer_c2_ok", parse_lapic_timer_c2_ok);
1722 1722
1723static int __init apic_set_verbosity(char *str) 1723static int __init apic_set_verbosity(char *arg)
1724{ 1724{
1725 if (strcmp("debug", str) == 0) 1725 if (!arg)
1726 return -EINVAL;
1727
1728 if (strcmp(arg, "debug") == 0)
1726 apic_verbosity = APIC_DEBUG; 1729 apic_verbosity = APIC_DEBUG;
1727 else if (strcmp("verbose", str) == 0) 1730 else if (strcmp(arg, "verbose") == 0)
1728 apic_verbosity = APIC_VERBOSE; 1731 apic_verbosity = APIC_VERBOSE;
1729 return 1; 1732
1733 return 0;
1730} 1734}
1731__setup("apic=", apic_set_verbosity); 1735early_param("apic", apic_set_verbosity);
1732 1736
1733static int __init lapic_insert_resource(void) 1737static int __init lapic_insert_resource(void)
1734{ 1738{
diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c
index c9b58a806e85..c8e315f1aa83 100644
--- a/arch/x86/kernel/cpu/bugs.c
+++ b/arch/x86/kernel/cpu/bugs.c
@@ -50,6 +50,8 @@ static double __initdata y = 3145727.0;
50 */ 50 */
51static void __init check_fpu(void) 51static void __init check_fpu(void)
52{ 52{
53 s32 fdiv_bug;
54
53 if (!boot_cpu_data.hard_math) { 55 if (!boot_cpu_data.hard_math) {
54#ifndef CONFIG_MATH_EMULATION 56#ifndef CONFIG_MATH_EMULATION
55 printk(KERN_EMERG "No coprocessor found and no math emulation present.\n"); 57 printk(KERN_EMERG "No coprocessor found and no math emulation present.\n");
@@ -74,8 +76,10 @@ static void __init check_fpu(void)
74 "fistpl %0\n\t" 76 "fistpl %0\n\t"
75 "fwait\n\t" 77 "fwait\n\t"
76 "fninit" 78 "fninit"
77 : "=m" (*&boot_cpu_data.fdiv_bug) 79 : "=m" (*&fdiv_bug)
78 : "m" (*&x), "m" (*&y)); 80 : "m" (*&x), "m" (*&y));
81
82 boot_cpu_data.fdiv_bug = fdiv_bug;
79 if (boot_cpu_data.fdiv_bug) 83 if (boot_cpu_data.fdiv_bug)
80 printk("Hmm, FPU with FDIV bug.\n"); 84 printk("Hmm, FPU with FDIV bug.\n");
81} 85}
diff --git a/arch/x86/kernel/cpu/cpufreq/Kconfig b/arch/x86/kernel/cpu/cpufreq/Kconfig
index cb7a5715596d..efae3b22a0ff 100644
--- a/arch/x86/kernel/cpu/cpufreq/Kconfig
+++ b/arch/x86/kernel/cpu/cpufreq/Kconfig
@@ -235,9 +235,9 @@ config X86_LONGHAUL
235 If in doubt, say N. 235 If in doubt, say N.
236 236
237config X86_E_POWERSAVER 237config X86_E_POWERSAVER
238 tristate "VIA C7 Enhanced PowerSaver (EXPERIMENTAL)" 238 tristate "VIA C7 Enhanced PowerSaver"
239 select CPU_FREQ_TABLE 239 select CPU_FREQ_TABLE
240 depends on X86_32 && EXPERIMENTAL 240 depends on X86_32
241 help 241 help
242 This adds the CPUFreq driver for VIA C7 processors. 242 This adds the CPUFreq driver for VIA C7 processors.
243 243
diff --git a/arch/x86/kernel/cpu/cpufreq/elanfreq.c b/arch/x86/kernel/cpu/cpufreq/elanfreq.c
index 94619c22f563..e4a4bf870e94 100644
--- a/arch/x86/kernel/cpu/cpufreq/elanfreq.c
+++ b/arch/x86/kernel/cpu/cpufreq/elanfreq.c
@@ -44,7 +44,7 @@ struct s_elan_multiplier {
44 * It is important that the frequencies 44 * It is important that the frequencies
45 * are listed in ascending order here! 45 * are listed in ascending order here!
46 */ 46 */
47struct s_elan_multiplier elan_multiplier[] = { 47static struct s_elan_multiplier elan_multiplier[] = {
48 {1000, 0x02, 0x18}, 48 {1000, 0x02, 0x18},
49 {2000, 0x02, 0x10}, 49 {2000, 0x02, 0x10},
50 {4000, 0x02, 0x08}, 50 {4000, 0x02, 0x08},
diff --git a/arch/x86/kernel/cpu/cpufreq/powernow-k8.c b/arch/x86/kernel/cpu/cpufreq/powernow-k8.c
index c45ca6d4dce1..4e7271999a74 100644
--- a/arch/x86/kernel/cpu/cpufreq/powernow-k8.c
+++ b/arch/x86/kernel/cpu/cpufreq/powernow-k8.c
@@ -66,7 +66,6 @@ static u32 find_freq_from_fid(u32 fid)
66 return 800 + (fid * 100); 66 return 800 + (fid * 100);
67} 67}
68 68
69
70/* Return a frequency in KHz, given an input fid */ 69/* Return a frequency in KHz, given an input fid */
71static u32 find_khz_freq_from_fid(u32 fid) 70static u32 find_khz_freq_from_fid(u32 fid)
72{ 71{
@@ -78,7 +77,6 @@ static u32 find_khz_freq_from_pstate(struct cpufreq_frequency_table *data, u32 p
78 return data[pstate].frequency; 77 return data[pstate].frequency;
79} 78}
80 79
81
82/* Return the vco fid for an input fid 80/* Return the vco fid for an input fid
83 * 81 *
84 * Each "low" fid has corresponding "high" fid, and you can get to "low" fids 82 * Each "low" fid has corresponding "high" fid, and you can get to "low" fids
@@ -166,7 +164,6 @@ static void fidvid_msr_init(void)
166 wrmsr(MSR_FIDVID_CTL, lo, hi); 164 wrmsr(MSR_FIDVID_CTL, lo, hi);
167} 165}
168 166
169
170/* write the new fid value along with the other control fields to the msr */ 167/* write the new fid value along with the other control fields to the msr */
171static int write_new_fid(struct powernow_k8_data *data, u32 fid) 168static int write_new_fid(struct powernow_k8_data *data, u32 fid)
172{ 169{
@@ -740,44 +737,63 @@ static int find_psb_table(struct powernow_k8_data *data)
740#ifdef CONFIG_X86_POWERNOW_K8_ACPI 737#ifdef CONFIG_X86_POWERNOW_K8_ACPI
741static void powernow_k8_acpi_pst_values(struct powernow_k8_data *data, unsigned int index) 738static void powernow_k8_acpi_pst_values(struct powernow_k8_data *data, unsigned int index)
742{ 739{
743 if (!data->acpi_data.state_count || (cpu_family == CPU_HW_PSTATE)) 740 if (!data->acpi_data->state_count || (cpu_family == CPU_HW_PSTATE))
744 return; 741 return;
745 742
746 data->irt = (data->acpi_data.states[index].control >> IRT_SHIFT) & IRT_MASK; 743 data->irt = (data->acpi_data->states[index].control >> IRT_SHIFT) & IRT_MASK;
747 data->rvo = (data->acpi_data.states[index].control >> RVO_SHIFT) & RVO_MASK; 744 data->rvo = (data->acpi_data->states[index].control >> RVO_SHIFT) & RVO_MASK;
748 data->exttype = (data->acpi_data.states[index].control >> EXT_TYPE_SHIFT) & EXT_TYPE_MASK; 745 data->exttype = (data->acpi_data->states[index].control >> EXT_TYPE_SHIFT) & EXT_TYPE_MASK;
749 data->plllock = (data->acpi_data.states[index].control >> PLL_L_SHIFT) & PLL_L_MASK; 746 data->plllock = (data->acpi_data->states[index].control >> PLL_L_SHIFT) & PLL_L_MASK;
750 data->vidmvs = 1 << ((data->acpi_data.states[index].control >> MVS_SHIFT) & MVS_MASK); 747 data->vidmvs = 1 << ((data->acpi_data->states[index].control >> MVS_SHIFT) & MVS_MASK);
751 data->vstable = (data->acpi_data.states[index].control >> VST_SHIFT) & VST_MASK; 748 data->vstable = (data->acpi_data->states[index].control >> VST_SHIFT) & VST_MASK;
749}
750
751
752static struct acpi_processor_performance *acpi_perf_data;
753static int preregister_valid;
754
755static int powernow_k8_cpu_preinit_acpi(void)
756{
757 acpi_perf_data = alloc_percpu(struct acpi_processor_performance);
758 if (!acpi_perf_data)
759 return -ENODEV;
760
761 if (acpi_processor_preregister_performance(acpi_perf_data))
762 return -ENODEV;
763 else
764 preregister_valid = 1;
765 return 0;
752} 766}
753 767
754static int powernow_k8_cpu_init_acpi(struct powernow_k8_data *data) 768static int powernow_k8_cpu_init_acpi(struct powernow_k8_data *data)
755{ 769{
756 struct cpufreq_frequency_table *powernow_table; 770 struct cpufreq_frequency_table *powernow_table;
757 int ret_val; 771 int ret_val;
772 int cpu = 0;
758 773
759 if (acpi_processor_register_performance(&data->acpi_data, data->cpu)) { 774 data->acpi_data = percpu_ptr(acpi_perf_data, cpu);
775 if (acpi_processor_register_performance(data->acpi_data, data->cpu)) {
760 dprintk("register performance failed: bad ACPI data\n"); 776 dprintk("register performance failed: bad ACPI data\n");
761 return -EIO; 777 return -EIO;
762 } 778 }
763 779
764 /* verify the data contained in the ACPI structures */ 780 /* verify the data contained in the ACPI structures */
765 if (data->acpi_data.state_count <= 1) { 781 if (data->acpi_data->state_count <= 1) {
766 dprintk("No ACPI P-States\n"); 782 dprintk("No ACPI P-States\n");
767 goto err_out; 783 goto err_out;
768 } 784 }
769 785
770 if ((data->acpi_data.control_register.space_id != ACPI_ADR_SPACE_FIXED_HARDWARE) || 786 if ((data->acpi_data->control_register.space_id != ACPI_ADR_SPACE_FIXED_HARDWARE) ||
771 (data->acpi_data.status_register.space_id != ACPI_ADR_SPACE_FIXED_HARDWARE)) { 787 (data->acpi_data->status_register.space_id != ACPI_ADR_SPACE_FIXED_HARDWARE)) {
772 dprintk("Invalid control/status registers (%x - %x)\n", 788 dprintk("Invalid control/status registers (%x - %x)\n",
773 data->acpi_data.control_register.space_id, 789 data->acpi_data->control_register.space_id,
774 data->acpi_data.status_register.space_id); 790 data->acpi_data->status_register.space_id);
775 goto err_out; 791 goto err_out;
776 } 792 }
777 793
778 /* fill in data->powernow_table */ 794 /* fill in data->powernow_table */
779 powernow_table = kmalloc((sizeof(struct cpufreq_frequency_table) 795 powernow_table = kmalloc((sizeof(struct cpufreq_frequency_table)
780 * (data->acpi_data.state_count + 1)), GFP_KERNEL); 796 * (data->acpi_data->state_count + 1)), GFP_KERNEL);
781 if (!powernow_table) { 797 if (!powernow_table) {
782 dprintk("powernow_table memory alloc failure\n"); 798 dprintk("powernow_table memory alloc failure\n");
783 goto err_out; 799 goto err_out;
@@ -790,12 +806,12 @@ static int powernow_k8_cpu_init_acpi(struct powernow_k8_data *data)
790 if (ret_val) 806 if (ret_val)
791 goto err_out_mem; 807 goto err_out_mem;
792 808
793 powernow_table[data->acpi_data.state_count].frequency = CPUFREQ_TABLE_END; 809 powernow_table[data->acpi_data->state_count].frequency = CPUFREQ_TABLE_END;
794 powernow_table[data->acpi_data.state_count].index = 0; 810 powernow_table[data->acpi_data->state_count].index = 0;
795 data->powernow_table = powernow_table; 811 data->powernow_table = powernow_table;
796 812
797 /* fill in data */ 813 /* fill in data */
798 data->numps = data->acpi_data.state_count; 814 data->numps = data->acpi_data->state_count;
799 if (first_cpu(per_cpu(cpu_core_map, data->cpu)) == data->cpu) 815 if (first_cpu(per_cpu(cpu_core_map, data->cpu)) == data->cpu)
800 print_basics(data); 816 print_basics(data);
801 powernow_k8_acpi_pst_values(data, 0); 817 powernow_k8_acpi_pst_values(data, 0);
@@ -803,16 +819,31 @@ static int powernow_k8_cpu_init_acpi(struct powernow_k8_data *data)
803 /* notify BIOS that we exist */ 819 /* notify BIOS that we exist */
804 acpi_processor_notify_smm(THIS_MODULE); 820 acpi_processor_notify_smm(THIS_MODULE);
805 821
822 /* determine affinity, from ACPI if available */
823 if (preregister_valid) {
824 if ((data->acpi_data->shared_type == CPUFREQ_SHARED_TYPE_ALL) ||
825 (data->acpi_data->shared_type == CPUFREQ_SHARED_TYPE_ANY))
826 data->starting_core_affinity = data->acpi_data->shared_cpu_map;
827 else
828 data->starting_core_affinity = cpumask_of_cpu(data->cpu);
829 } else {
830 /* best guess from family if not */
831 if (cpu_family == CPU_HW_PSTATE)
832 data->starting_core_affinity = cpumask_of_cpu(data->cpu);
833 else
834 data->starting_core_affinity = per_cpu(cpu_core_map, data->cpu);
835 }
836
806 return 0; 837 return 0;
807 838
808err_out_mem: 839err_out_mem:
809 kfree(powernow_table); 840 kfree(powernow_table);
810 841
811err_out: 842err_out:
812 acpi_processor_unregister_performance(&data->acpi_data, data->cpu); 843 acpi_processor_unregister_performance(data->acpi_data, data->cpu);
813 844
814 /* data->acpi_data.state_count informs us at ->exit() whether ACPI was used */ 845 /* data->acpi_data.state_count informs us at ->exit() whether ACPI was used */
815 data->acpi_data.state_count = 0; 846 data->acpi_data->state_count = 0;
816 847
817 return -ENODEV; 848 return -ENODEV;
818} 849}
@@ -824,10 +855,10 @@ static int fill_powernow_table_pstate(struct powernow_k8_data *data, struct cpuf
824 rdmsr(MSR_PSTATE_CUR_LIMIT, hi, lo); 855 rdmsr(MSR_PSTATE_CUR_LIMIT, hi, lo);
825 data->max_hw_pstate = (hi & HW_PSTATE_MAX_MASK) >> HW_PSTATE_MAX_SHIFT; 856 data->max_hw_pstate = (hi & HW_PSTATE_MAX_MASK) >> HW_PSTATE_MAX_SHIFT;
826 857
827 for (i = 0; i < data->acpi_data.state_count; i++) { 858 for (i = 0; i < data->acpi_data->state_count; i++) {
828 u32 index; 859 u32 index;
829 860
830 index = data->acpi_data.states[i].control & HW_PSTATE_MASK; 861 index = data->acpi_data->states[i].control & HW_PSTATE_MASK;
831 if (index > data->max_hw_pstate) { 862 if (index > data->max_hw_pstate) {
832 printk(KERN_ERR PFX "invalid pstate %d - bad value %d.\n", i, index); 863 printk(KERN_ERR PFX "invalid pstate %d - bad value %d.\n", i, index);
833 printk(KERN_ERR PFX "Please report to BIOS manufacturer\n"); 864 printk(KERN_ERR PFX "Please report to BIOS manufacturer\n");
@@ -843,7 +874,7 @@ static int fill_powernow_table_pstate(struct powernow_k8_data *data, struct cpuf
843 874
844 powernow_table[i].index = index; 875 powernow_table[i].index = index;
845 876
846 powernow_table[i].frequency = data->acpi_data.states[i].core_frequency * 1000; 877 powernow_table[i].frequency = data->acpi_data->states[i].core_frequency * 1000;
847 } 878 }
848 return 0; 879 return 0;
849} 880}
@@ -852,16 +883,16 @@ static int fill_powernow_table_fidvid(struct powernow_k8_data *data, struct cpuf
852{ 883{
853 int i; 884 int i;
854 int cntlofreq = 0; 885 int cntlofreq = 0;
855 for (i = 0; i < data->acpi_data.state_count; i++) { 886 for (i = 0; i < data->acpi_data->state_count; i++) {
856 u32 fid; 887 u32 fid;
857 u32 vid; 888 u32 vid;
858 889
859 if (data->exttype) { 890 if (data->exttype) {
860 fid = data->acpi_data.states[i].status & EXT_FID_MASK; 891 fid = data->acpi_data->states[i].status & EXT_FID_MASK;
861 vid = (data->acpi_data.states[i].status >> VID_SHIFT) & EXT_VID_MASK; 892 vid = (data->acpi_data->states[i].status >> VID_SHIFT) & EXT_VID_MASK;
862 } else { 893 } else {
863 fid = data->acpi_data.states[i].control & FID_MASK; 894 fid = data->acpi_data->states[i].control & FID_MASK;
864 vid = (data->acpi_data.states[i].control >> VID_SHIFT) & VID_MASK; 895 vid = (data->acpi_data->states[i].control >> VID_SHIFT) & VID_MASK;
865 } 896 }
866 897
867 dprintk(" %d : fid 0x%x, vid 0x%x\n", i, fid, vid); 898 dprintk(" %d : fid 0x%x, vid 0x%x\n", i, fid, vid);
@@ -902,10 +933,10 @@ static int fill_powernow_table_fidvid(struct powernow_k8_data *data, struct cpuf
902 cntlofreq = i; 933 cntlofreq = i;
903 } 934 }
904 935
905 if (powernow_table[i].frequency != (data->acpi_data.states[i].core_frequency * 1000)) { 936 if (powernow_table[i].frequency != (data->acpi_data->states[i].core_frequency * 1000)) {
906 printk(KERN_INFO PFX "invalid freq entries %u kHz vs. %u kHz\n", 937 printk(KERN_INFO PFX "invalid freq entries %u kHz vs. %u kHz\n",
907 powernow_table[i].frequency, 938 powernow_table[i].frequency,
908 (unsigned int) (data->acpi_data.states[i].core_frequency * 1000)); 939 (unsigned int) (data->acpi_data->states[i].core_frequency * 1000));
909 powernow_table[i].frequency = CPUFREQ_ENTRY_INVALID; 940 powernow_table[i].frequency = CPUFREQ_ENTRY_INVALID;
910 continue; 941 continue;
911 } 942 }
@@ -915,11 +946,12 @@ static int fill_powernow_table_fidvid(struct powernow_k8_data *data, struct cpuf
915 946
916static void powernow_k8_cpu_exit_acpi(struct powernow_k8_data *data) 947static void powernow_k8_cpu_exit_acpi(struct powernow_k8_data *data)
917{ 948{
918 if (data->acpi_data.state_count) 949 if (data->acpi_data->state_count)
919 acpi_processor_unregister_performance(&data->acpi_data, data->cpu); 950 acpi_processor_unregister_performance(data->acpi_data, data->cpu);
920} 951}
921 952
922#else 953#else
954static int powernow_k8_cpu_preinit_acpi(void) { return -ENODEV; }
923static int powernow_k8_cpu_init_acpi(struct powernow_k8_data *data) { return -ENODEV; } 955static int powernow_k8_cpu_init_acpi(struct powernow_k8_data *data) { return -ENODEV; }
924static void powernow_k8_cpu_exit_acpi(struct powernow_k8_data *data) { return; } 956static void powernow_k8_cpu_exit_acpi(struct powernow_k8_data *data) { return; }
925static void powernow_k8_acpi_pst_values(struct powernow_k8_data *data, unsigned int index) { return; } 957static void powernow_k8_acpi_pst_values(struct powernow_k8_data *data, unsigned int index) { return; }
@@ -1104,7 +1136,7 @@ static int powernowk8_verify(struct cpufreq_policy *pol)
1104static int __cpuinit powernowk8_cpu_init(struct cpufreq_policy *pol) 1136static int __cpuinit powernowk8_cpu_init(struct cpufreq_policy *pol)
1105{ 1137{
1106 struct powernow_k8_data *data; 1138 struct powernow_k8_data *data;
1107 cpumask_t oldmask; 1139 cpumask_t oldmask = CPU_MASK_ALL;
1108 int rc; 1140 int rc;
1109 1141
1110 if (!cpu_online(pol->cpu)) 1142 if (!cpu_online(pol->cpu))
@@ -1177,10 +1209,7 @@ static int __cpuinit powernowk8_cpu_init(struct cpufreq_policy *pol)
1177 /* run on any CPU again */ 1209 /* run on any CPU again */
1178 set_cpus_allowed_ptr(current, &oldmask); 1210 set_cpus_allowed_ptr(current, &oldmask);
1179 1211
1180 if (cpu_family == CPU_HW_PSTATE) 1212 pol->cpus = data->starting_core_affinity;
1181 pol->cpus = cpumask_of_cpu(pol->cpu);
1182 else
1183 pol->cpus = per_cpu(cpu_core_map, pol->cpu);
1184 data->available_cores = &(pol->cpus); 1213 data->available_cores = &(pol->cpus);
1185 1214
1186 /* Take a crude guess here. 1215 /* Take a crude guess here.
@@ -1303,6 +1332,7 @@ static int __cpuinit powernowk8_init(void)
1303 } 1332 }
1304 1333
1305 if (supported_cpus == num_online_cpus()) { 1334 if (supported_cpus == num_online_cpus()) {
1335 powernow_k8_cpu_preinit_acpi();
1306 printk(KERN_INFO PFX "Found %d %s " 1336 printk(KERN_INFO PFX "Found %d %s "
1307 "processors (%d cpu cores) (" VERSION ")\n", 1337 "processors (%d cpu cores) (" VERSION ")\n",
1308 num_online_nodes(), 1338 num_online_nodes(),
@@ -1319,6 +1349,10 @@ static void __exit powernowk8_exit(void)
1319 dprintk("exit\n"); 1349 dprintk("exit\n");
1320 1350
1321 cpufreq_unregister_driver(&cpufreq_amd64_driver); 1351 cpufreq_unregister_driver(&cpufreq_amd64_driver);
1352
1353#ifdef CONFIG_X86_POWERNOW_K8_ACPI
1354 free_percpu(acpi_perf_data);
1355#endif
1322} 1356}
1323 1357
1324MODULE_AUTHOR("Paul Devriendt <paul.devriendt@amd.com> and Mark Langsdorf <mark.langsdorf@amd.com>"); 1358MODULE_AUTHOR("Paul Devriendt <paul.devriendt@amd.com> and Mark Langsdorf <mark.langsdorf@amd.com>");
diff --git a/arch/x86/kernel/cpu/cpufreq/powernow-k8.h b/arch/x86/kernel/cpu/cpufreq/powernow-k8.h
index ab48cfed4d96..a62612cd4be8 100644
--- a/arch/x86/kernel/cpu/cpufreq/powernow-k8.h
+++ b/arch/x86/kernel/cpu/cpufreq/powernow-k8.h
@@ -33,12 +33,13 @@ struct powernow_k8_data {
33#ifdef CONFIG_X86_POWERNOW_K8_ACPI 33#ifdef CONFIG_X86_POWERNOW_K8_ACPI
34 /* the acpi table needs to be kept. it's only available if ACPI was 34 /* the acpi table needs to be kept. it's only available if ACPI was
35 * used to determine valid frequency/vid/fid states */ 35 * used to determine valid frequency/vid/fid states */
36 struct acpi_processor_performance acpi_data; 36 struct acpi_processor_performance *acpi_data;
37#endif 37#endif
38 /* we need to keep track of associated cores, but let cpufreq 38 /* we need to keep track of associated cores, but let cpufreq
39 * handle hotplug events - so just point at cpufreq pol->cpus 39 * handle hotplug events - so just point at cpufreq pol->cpus
40 * structure */ 40 * structure */
41 cpumask_t *available_cores; 41 cpumask_t *available_cores;
42 cpumask_t starting_core_affinity;
42}; 43};
43 44
44 45
diff --git a/arch/x86/kernel/io_apic_32.c b/arch/x86/kernel/io_apic_32.c
index de9aa0e3a9c5..09cddb57bec4 100644
--- a/arch/x86/kernel/io_apic_32.c
+++ b/arch/x86/kernel/io_apic_32.c
@@ -57,7 +57,7 @@ atomic_t irq_mis_count;
57static struct { int pin, apic; } ioapic_i8259 = { -1, -1 }; 57static struct { int pin, apic; } ioapic_i8259 = { -1, -1 };
58 58
59static DEFINE_SPINLOCK(ioapic_lock); 59static DEFINE_SPINLOCK(ioapic_lock);
60static DEFINE_SPINLOCK(vector_lock); 60DEFINE_SPINLOCK(vector_lock);
61 61
62int timer_through_8259 __initdata; 62int timer_through_8259 __initdata;
63 63
@@ -1209,10 +1209,6 @@ static int assign_irq_vector(int irq)
1209 return vector; 1209 return vector;
1210} 1210}
1211 1211
1212void setup_vector_irq(int cpu)
1213{
1214}
1215
1216static struct irq_chip ioapic_chip; 1212static struct irq_chip ioapic_chip;
1217 1213
1218#define IOAPIC_AUTO -1 1214#define IOAPIC_AUTO -1
diff --git a/arch/x86/kernel/io_apic_64.c b/arch/x86/kernel/io_apic_64.c
index 8269434d1707..61a83b70c18f 100644
--- a/arch/x86/kernel/io_apic_64.c
+++ b/arch/x86/kernel/io_apic_64.c
@@ -101,7 +101,7 @@ int timer_through_8259 __initdata;
101static struct { int pin, apic; } ioapic_i8259 = { -1, -1 }; 101static struct { int pin, apic; } ioapic_i8259 = { -1, -1 };
102 102
103static DEFINE_SPINLOCK(ioapic_lock); 103static DEFINE_SPINLOCK(ioapic_lock);
104DEFINE_SPINLOCK(vector_lock); 104static DEFINE_SPINLOCK(vector_lock);
105 105
106/* 106/*
107 * # of IRQ routing registers 107 * # of IRQ routing registers
@@ -697,6 +697,19 @@ static int pin_2_irq(int idx, int apic, int pin)
697 return irq; 697 return irq;
698} 698}
699 699
700void lock_vector_lock(void)
701{
702 /* Used to the online set of cpus does not change
703 * during assign_irq_vector.
704 */
705 spin_lock(&vector_lock);
706}
707
708void unlock_vector_lock(void)
709{
710 spin_unlock(&vector_lock);
711}
712
700static int __assign_irq_vector(int irq, cpumask_t mask) 713static int __assign_irq_vector(int irq, cpumask_t mask)
701{ 714{
702 /* 715 /*
@@ -802,7 +815,7 @@ static void __clear_irq_vector(int irq)
802 cpus_clear(cfg->domain); 815 cpus_clear(cfg->domain);
803} 816}
804 817
805static void __setup_vector_irq(int cpu) 818void __setup_vector_irq(int cpu)
806{ 819{
807 /* Initialize vector_irq on a new cpu */ 820 /* Initialize vector_irq on a new cpu */
808 /* This function must be called with vector_lock held */ 821 /* This function must be called with vector_lock held */
@@ -825,14 +838,6 @@ static void __setup_vector_irq(int cpu)
825 } 838 }
826} 839}
827 840
828void setup_vector_irq(int cpu)
829{
830 spin_lock(&vector_lock);
831 __setup_vector_irq(smp_processor_id());
832 spin_unlock(&vector_lock);
833}
834
835
836static struct irq_chip ioapic_chip; 841static struct irq_chip ioapic_chip;
837 842
838static void ioapic_register_intr(int irq, unsigned long trigger) 843static void ioapic_register_intr(int irq, unsigned long trigger)
diff --git a/arch/x86/kernel/mpparse.c b/arch/x86/kernel/mpparse.c
index 6ae005ccaed8..678090508a62 100644
--- a/arch/x86/kernel/mpparse.c
+++ b/arch/x86/kernel/mpparse.c
@@ -83,7 +83,7 @@ static void __init MP_bus_info(struct mpc_config_bus *m)
83 if (x86_quirks->mpc_oem_bus_info) 83 if (x86_quirks->mpc_oem_bus_info)
84 x86_quirks->mpc_oem_bus_info(m, str); 84 x86_quirks->mpc_oem_bus_info(m, str);
85 else 85 else
86 printk(KERN_INFO "Bus #%d is %s\n", m->mpc_busid, str); 86 apic_printk(APIC_VERBOSE, "Bus #%d is %s\n", m->mpc_busid, str);
87 87
88#if MAX_MP_BUSSES < 256 88#if MAX_MP_BUSSES < 256
89 if (m->mpc_busid >= MAX_MP_BUSSES) { 89 if (m->mpc_busid >= MAX_MP_BUSSES) {
@@ -154,7 +154,7 @@ static void __init MP_ioapic_info(struct mpc_config_ioapic *m)
154 154
155static void print_MP_intsrc_info(struct mpc_config_intsrc *m) 155static void print_MP_intsrc_info(struct mpc_config_intsrc *m)
156{ 156{
157 printk(KERN_CONT "Int: type %d, pol %d, trig %d, bus %02x," 157 apic_printk(APIC_VERBOSE, "Int: type %d, pol %d, trig %d, bus %02x,"
158 " IRQ %02x, APIC ID %x, APIC INT %02x\n", 158 " IRQ %02x, APIC ID %x, APIC INT %02x\n",
159 m->mpc_irqtype, m->mpc_irqflag & 3, 159 m->mpc_irqtype, m->mpc_irqflag & 3,
160 (m->mpc_irqflag >> 2) & 3, m->mpc_srcbus, 160 (m->mpc_irqflag >> 2) & 3, m->mpc_srcbus,
@@ -163,7 +163,7 @@ static void print_MP_intsrc_info(struct mpc_config_intsrc *m)
163 163
164static void __init print_mp_irq_info(struct mp_config_intsrc *mp_irq) 164static void __init print_mp_irq_info(struct mp_config_intsrc *mp_irq)
165{ 165{
166 printk(KERN_CONT "Int: type %d, pol %d, trig %d, bus %02x," 166 apic_printk(APIC_VERBOSE, "Int: type %d, pol %d, trig %d, bus %02x,"
167 " IRQ %02x, APIC ID %x, APIC INT %02x\n", 167 " IRQ %02x, APIC ID %x, APIC INT %02x\n",
168 mp_irq->mp_irqtype, mp_irq->mp_irqflag & 3, 168 mp_irq->mp_irqtype, mp_irq->mp_irqflag & 3,
169 (mp_irq->mp_irqflag >> 2) & 3, mp_irq->mp_srcbus, 169 (mp_irq->mp_irqflag >> 2) & 3, mp_irq->mp_srcbus,
@@ -235,7 +235,7 @@ static void __init MP_intsrc_info(struct mpc_config_intsrc *m)
235 235
236static void __init MP_lintsrc_info(struct mpc_config_lintsrc *m) 236static void __init MP_lintsrc_info(struct mpc_config_lintsrc *m)
237{ 237{
238 printk(KERN_INFO "Lint: type %d, pol %d, trig %d, bus %02x," 238 apic_printk(APIC_VERBOSE, "Lint: type %d, pol %d, trig %d, bus %02x,"
239 " IRQ %02x, APIC ID %x, APIC LINT %02x\n", 239 " IRQ %02x, APIC ID %x, APIC LINT %02x\n",
240 m->mpc_irqtype, m->mpc_irqflag & 3, 240 m->mpc_irqtype, m->mpc_irqflag & 3,
241 (m->mpc_irqflag >> 2) & 3, m->mpc_srcbusid, 241 (m->mpc_irqflag >> 2) & 3, m->mpc_srcbusid,
@@ -695,7 +695,8 @@ static int __init smp_scan_config(unsigned long base, unsigned long length,
695 unsigned int *bp = phys_to_virt(base); 695 unsigned int *bp = phys_to_virt(base);
696 struct intel_mp_floating *mpf; 696 struct intel_mp_floating *mpf;
697 697
698 printk(KERN_DEBUG "Scan SMP from %p for %ld bytes.\n", bp, length); 698 apic_printk(APIC_VERBOSE, "Scan SMP from %p for %ld bytes.\n",
699 bp, length);
699 BUILD_BUG_ON(sizeof(*mpf) != 16); 700 BUILD_BUG_ON(sizeof(*mpf) != 16);
700 701
701 while (length > 0) { 702 while (length > 0) {
diff --git a/arch/x86/kernel/pci-calgary_64.c b/arch/x86/kernel/pci-calgary_64.c
index b67a4b1d4eae..02d19328525d 100644
--- a/arch/x86/kernel/pci-calgary_64.c
+++ b/arch/x86/kernel/pci-calgary_64.c
@@ -1350,7 +1350,7 @@ static void calgary_init_bitmap_from_tce_table(struct iommu_table *tbl)
1350 * Function for kdump case. Get the tce tables from first kernel 1350 * Function for kdump case. Get the tce tables from first kernel
1351 * by reading the contents of the base adress register of calgary iommu 1351 * by reading the contents of the base adress register of calgary iommu
1352 */ 1352 */
1353static void get_tce_space_from_tar() 1353static void get_tce_space_from_tar(void)
1354{ 1354{
1355 int bus; 1355 int bus;
1356 void __iomem *target; 1356 void __iomem *target;
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index 2d888586385d..68b48e3fbcbd 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -604,6 +604,14 @@ void __init setup_arch(char **cmdline_p)
604 early_cpu_init(); 604 early_cpu_init();
605 early_ioremap_init(); 605 early_ioremap_init();
606 606
607#if defined(CONFIG_VMI) && defined(CONFIG_X86_32)
608 /*
609 * Must be before kernel pagetables are setup
610 * or fixmap area is touched.
611 */
612 vmi_init();
613#endif
614
607 ROOT_DEV = old_decode_dev(boot_params.hdr.root_dev); 615 ROOT_DEV = old_decode_dev(boot_params.hdr.root_dev);
608 screen_info = boot_params.screen_info; 616 screen_info = boot_params.screen_info;
609 edid_info = boot_params.edid_info; 617 edid_info = boot_params.edid_info;
@@ -817,14 +825,6 @@ void __init setup_arch(char **cmdline_p)
817 kvmclock_init(); 825 kvmclock_init();
818#endif 826#endif
819 827
820#if defined(CONFIG_VMI) && defined(CONFIG_X86_32)
821 /*
822 * Must be after max_low_pfn is determined, and before kernel
823 * pagetables are setup.
824 */
825 vmi_init();
826#endif
827
828 paravirt_pagetable_setup_start(swapper_pg_dir); 828 paravirt_pagetable_setup_start(swapper_pg_dir);
829 paging_init(); 829 paging_init();
830 paravirt_pagetable_setup_done(swapper_pg_dir); 830 paravirt_pagetable_setup_done(swapper_pg_dir);
@@ -861,12 +861,6 @@ void __init setup_arch(char **cmdline_p)
861 init_apic_mappings(); 861 init_apic_mappings();
862 ioapic_init_mappings(); 862 ioapic_init_mappings();
863 863
864#if defined(CONFIG_SMP) && defined(CONFIG_X86_PC) && defined(CONFIG_X86_32)
865 if (def_to_bigsmp)
866 printk(KERN_WARNING "More than 8 CPUs detected and "
867 "CONFIG_X86_PC cannot handle it.\nUse "
868 "CONFIG_X86_GENERICARCH or CONFIG_X86_BIGSMP.\n");
869#endif
870 kvm_guest_init(); 864 kvm_guest_init();
871 865
872 e820_reserve_resources(); 866 e820_reserve_resources();
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index 332512767f4f..91055d7fc1b0 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -326,12 +326,16 @@ static void __cpuinit start_secondary(void *unused)
326 * for which cpus receive the IPI. Holding this 326 * for which cpus receive the IPI. Holding this
327 * lock helps us to not include this cpu in a currently in progress 327 * lock helps us to not include this cpu in a currently in progress
328 * smp_call_function(). 328 * smp_call_function().
329 *
330 * We need to hold vector_lock so there the set of online cpus
331 * does not change while we are assigning vectors to cpus. Holding
332 * this lock ensures we don't half assign or remove an irq from a cpu.
329 */ 333 */
330 ipi_call_lock_irq(); 334 ipi_call_lock_irq();
331#ifdef CONFIG_X86_IO_APIC 335 lock_vector_lock();
332 setup_vector_irq(smp_processor_id()); 336 __setup_vector_irq(smp_processor_id());
333#endif
334 cpu_set(smp_processor_id(), cpu_online_map); 337 cpu_set(smp_processor_id(), cpu_online_map);
338 unlock_vector_lock();
335 ipi_call_unlock_irq(); 339 ipi_call_unlock_irq();
336 per_cpu(cpu_state, smp_processor_id()) = CPU_ONLINE; 340 per_cpu(cpu_state, smp_processor_id()) = CPU_ONLINE;
337 341
@@ -990,7 +994,17 @@ int __cpuinit native_cpu_up(unsigned int cpu)
990 flush_tlb_all(); 994 flush_tlb_all();
991 low_mappings = 1; 995 low_mappings = 1;
992 996
997#ifdef CONFIG_X86_PC
998 if (def_to_bigsmp && apicid > 8) {
999 printk(KERN_WARNING
1000 "More than 8 CPUs detected - skipping them.\n"
1001 "Use CONFIG_X86_GENERICARCH and CONFIG_X86_BIGSMP.\n");
1002 err = -1;
1003 } else
1004 err = do_boot_cpu(apicid, cpu);
1005#else
993 err = do_boot_cpu(apicid, cpu); 1006 err = do_boot_cpu(apicid, cpu);
1007#endif
994 1008
995 zap_low_mappings(); 1009 zap_low_mappings();
996 low_mappings = 0; 1010 low_mappings = 0;
@@ -1336,7 +1350,9 @@ int __cpu_disable(void)
1336 remove_siblinginfo(cpu); 1350 remove_siblinginfo(cpu);
1337 1351
1338 /* It's now safe to remove this processor from the online map */ 1352 /* It's now safe to remove this processor from the online map */
1353 lock_vector_lock();
1339 remove_cpu_from_maps(cpu); 1354 remove_cpu_from_maps(cpu);
1355 unlock_vector_lock();
1340 fixup_irqs(cpu_online_map); 1356 fixup_irqs(cpu_online_map);
1341 return 0; 1357 return 0;
1342} 1358}
diff --git a/arch/x86/kernel/vmi_32.c b/arch/x86/kernel/vmi_32.c
index 0a1b1a9d922d..6ca515d6db54 100644
--- a/arch/x86/kernel/vmi_32.c
+++ b/arch/x86/kernel/vmi_32.c
@@ -37,6 +37,7 @@
37#include <asm/timer.h> 37#include <asm/timer.h>
38#include <asm/vmi_time.h> 38#include <asm/vmi_time.h>
39#include <asm/kmap_types.h> 39#include <asm/kmap_types.h>
40#include <asm/setup.h>
40 41
41/* Convenient for calling VMI functions indirectly in the ROM */ 42/* Convenient for calling VMI functions indirectly in the ROM */
42typedef u32 __attribute__((regparm(1))) (VROMFUNC)(void); 43typedef u32 __attribute__((regparm(1))) (VROMFUNC)(void);
@@ -683,7 +684,7 @@ void vmi_bringup(void)
683{ 684{
684 /* We must establish the lowmem mapping for MMU ops to work */ 685 /* We must establish the lowmem mapping for MMU ops to work */
685 if (vmi_ops.set_linear_mapping) 686 if (vmi_ops.set_linear_mapping)
686 vmi_ops.set_linear_mapping(0, (void *)__PAGE_OFFSET, max_low_pfn, 0); 687 vmi_ops.set_linear_mapping(0, (void *)__PAGE_OFFSET, MAXMEM_PFN, 0);
687} 688}
688 689
689/* 690/*
diff --git a/arch/x86/mm/Makefile b/arch/x86/mm/Makefile
index 2977ea37791f..dfb932dcf136 100644
--- a/arch/x86/mm/Makefile
+++ b/arch/x86/mm/Makefile
@@ -1,7 +1,6 @@
1obj-y := init_$(BITS).o fault.o ioremap.o extable.o pageattr.o mmap.o \ 1obj-y := init_$(BITS).o fault.o ioremap.o extable.o pageattr.o mmap.o \
2 pat.o pgtable.o 2 pat.o pgtable.o gup.o
3 3
4obj-$(CONFIG_HAVE_GET_USER_PAGES_FAST) += gup.o
5obj-$(CONFIG_X86_32) += pgtable_32.o 4obj-$(CONFIG_X86_32) += pgtable_32.o
6 5
7obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o 6obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o
diff --git a/arch/x86/mm/pgtable.c b/arch/x86/mm/pgtable.c
index 557b2abceef8..d50302774fe2 100644
--- a/arch/x86/mm/pgtable.c
+++ b/arch/x86/mm/pgtable.c
@@ -207,6 +207,9 @@ static void pgd_prepopulate_pmd(struct mm_struct *mm, pgd_t *pgd, pmd_t *pmds[])
207 unsigned long addr; 207 unsigned long addr;
208 int i; 208 int i;
209 209
210 if (PREALLOCATED_PMDS == 0) /* Work around gcc-3.4.x bug */
211 return;
212
210 pud = pud_offset(pgd, 0); 213 pud = pud_offset(pgd, 0);
211 214
212 for (addr = i = 0; i < PREALLOCATED_PMDS; 215 for (addr = i = 0; i < PREALLOCATED_PMDS;
diff --git a/drivers/ata/pata_at32.c b/drivers/ata/pata_at32.c
index 82fb6e273169..ab61095093b9 100644
--- a/drivers/ata/pata_at32.c
+++ b/drivers/ata/pata_at32.c
@@ -24,8 +24,8 @@
24#include <linux/err.h> 24#include <linux/err.h>
25#include <linux/io.h> 25#include <linux/io.h>
26 26
27#include <asm/arch/board.h> 27#include <mach/board.h>
28#include <asm/arch/smc.h> 28#include <mach/smc.h>
29 29
30#define DRV_NAME "pata_at32" 30#define DRV_NAME "pata_at32"
31#define DRV_VERSION "0.0.3" 31#define DRV_VERSION "0.0.3"
diff --git a/drivers/char/agp/agp.h b/drivers/char/agp/agp.h
index 81e14bea54bd..4bada0e8b812 100644
--- a/drivers/char/agp/agp.h
+++ b/drivers/char/agp/agp.h
@@ -148,6 +148,9 @@ struct agp_bridge_data {
148 char minor_version; 148 char minor_version;
149 struct list_head list; 149 struct list_head list;
150 u32 apbase_config; 150 u32 apbase_config;
151 /* list of agp_memory mapped to the aperture */
152 struct list_head mapped_list;
153 spinlock_t mapped_lock;
151}; 154};
152 155
153#define KB(x) ((x) * 1024) 156#define KB(x) ((x) * 1024)
diff --git a/drivers/char/agp/ali-agp.c b/drivers/char/agp/ali-agp.c
index 1ffb381130c3..31dcd9142d54 100644
--- a/drivers/char/agp/ali-agp.c
+++ b/drivers/char/agp/ali-agp.c
@@ -110,7 +110,8 @@ static int ali_configure(void)
110 110
111 nlvm_addr+= agp_bridge->gart_bus_addr; 111 nlvm_addr+= agp_bridge->gart_bus_addr;
112 nlvm_addr|=(agp_bridge->gart_bus_addr>>12); 112 nlvm_addr|=(agp_bridge->gart_bus_addr>>12);
113 printk(KERN_INFO PFX "nlvm top &base = %8x\n",nlvm_addr); 113 dev_info(&agp_bridge->dev->dev, "nlvm top &base = %8x\n",
114 nlvm_addr);
114 } 115 }
115#endif 116#endif
116 117
@@ -315,8 +316,8 @@ static int __devinit agp_ali_probe(struct pci_dev *pdev,
315 goto found; 316 goto found;
316 } 317 }
317 318
318 printk(KERN_ERR PFX "Unsupported ALi chipset (device id: %04x)\n", 319 dev_err(&pdev->dev, "unsupported ALi chipset [%04x/%04x])\n",
319 pdev->device); 320 pdev->vendor, pdev->device);
320 return -ENODEV; 321 return -ENODEV;
321 322
322 323
@@ -361,8 +362,7 @@ found:
361 bridge->driver = &ali_generic_bridge; 362 bridge->driver = &ali_generic_bridge;
362 } 363 }
363 364
364 printk(KERN_INFO PFX "Detected ALi %s chipset\n", 365 dev_info(&pdev->dev, "ALi %s chipset\n", devs[j].chipset_name);
365 devs[j].chipset_name);
366 366
367 /* Fill in the mode register */ 367 /* Fill in the mode register */
368 pci_read_config_dword(pdev, 368 pci_read_config_dword(pdev,
diff --git a/drivers/char/agp/amd-k7-agp.c b/drivers/char/agp/amd-k7-agp.c
index 39a0718bc616..e280531843be 100644
--- a/drivers/char/agp/amd-k7-agp.c
+++ b/drivers/char/agp/amd-k7-agp.c
@@ -419,8 +419,8 @@ static int __devinit agp_amdk7_probe(struct pci_dev *pdev,
419 return -ENODEV; 419 return -ENODEV;
420 420
421 j = ent - agp_amdk7_pci_table; 421 j = ent - agp_amdk7_pci_table;
422 printk(KERN_INFO PFX "Detected AMD %s chipset\n", 422 dev_info(&pdev->dev, "AMD %s chipset\n",
423 amd_agp_device_ids[j].chipset_name); 423 amd_agp_device_ids[j].chipset_name);
424 424
425 bridge = agp_alloc_bridge(); 425 bridge = agp_alloc_bridge();
426 if (!bridge) 426 if (!bridge)
@@ -442,7 +442,7 @@ static int __devinit agp_amdk7_probe(struct pci_dev *pdev,
442 while (!cap_ptr) { 442 while (!cap_ptr) {
443 gfxcard = pci_get_class(PCI_CLASS_DISPLAY_VGA<<8, gfxcard); 443 gfxcard = pci_get_class(PCI_CLASS_DISPLAY_VGA<<8, gfxcard);
444 if (!gfxcard) { 444 if (!gfxcard) {
445 printk (KERN_INFO PFX "Couldn't find an AGP VGA controller.\n"); 445 dev_info(&pdev->dev, "no AGP VGA controller\n");
446 return -ENODEV; 446 return -ENODEV;
447 } 447 }
448 cap_ptr = pci_find_capability(gfxcard, PCI_CAP_ID_AGP); 448 cap_ptr = pci_find_capability(gfxcard, PCI_CAP_ID_AGP);
@@ -453,7 +453,7 @@ static int __devinit agp_amdk7_probe(struct pci_dev *pdev,
453 (if necessary at all). */ 453 (if necessary at all). */
454 if (gfxcard->vendor == PCI_VENDOR_ID_NVIDIA) { 454 if (gfxcard->vendor == PCI_VENDOR_ID_NVIDIA) {
455 agp_bridge->flags |= AGP_ERRATA_1X; 455 agp_bridge->flags |= AGP_ERRATA_1X;
456 printk (KERN_INFO PFX "AMD 751 chipset with NVidia GeForce detected. Forcing to 1X due to errata.\n"); 456 dev_info(&pdev->dev, "AMD 751 chipset with NVidia GeForce; forcing 1X due to errata\n");
457 } 457 }
458 pci_dev_put(gfxcard); 458 pci_dev_put(gfxcard);
459 } 459 }
@@ -469,7 +469,7 @@ static int __devinit agp_amdk7_probe(struct pci_dev *pdev,
469 agp_bridge->flags = AGP_ERRATA_FASTWRITES; 469 agp_bridge->flags = AGP_ERRATA_FASTWRITES;
470 agp_bridge->flags |= AGP_ERRATA_SBA; 470 agp_bridge->flags |= AGP_ERRATA_SBA;
471 agp_bridge->flags |= AGP_ERRATA_1X; 471 agp_bridge->flags |= AGP_ERRATA_1X;
472 printk (KERN_INFO PFX "AMD 761 chipset with errata detected - disabling AGP fast writes & SBA and forcing to 1X.\n"); 472 dev_info(&pdev->dev, "AMD 761 chipset with errata; disabling AGP fast writes & SBA and forcing to 1X\n");
473 } 473 }
474 } 474 }
475 475
diff --git a/drivers/char/agp/amd64-agp.c b/drivers/char/agp/amd64-agp.c
index 481ffe87c716..7495c522d8e4 100644
--- a/drivers/char/agp/amd64-agp.c
+++ b/drivers/char/agp/amd64-agp.c
@@ -34,6 +34,7 @@
34 34
35static struct resource *aperture_resource; 35static struct resource *aperture_resource;
36static int __initdata agp_try_unsupported = 1; 36static int __initdata agp_try_unsupported = 1;
37static int agp_bridges_found;
37 38
38static void amd64_tlbflush(struct agp_memory *temp) 39static void amd64_tlbflush(struct agp_memory *temp)
39{ 40{
@@ -293,12 +294,13 @@ static __devinit int fix_northbridge(struct pci_dev *nb, struct pci_dev *agp,
293 * so let double check that order, and lets trust the AMD NB settings 294 * so let double check that order, and lets trust the AMD NB settings
294 */ 295 */
295 if (order >=0 && aper + (32ULL<<(20 + order)) > 0x100000000ULL) { 296 if (order >=0 && aper + (32ULL<<(20 + order)) > 0x100000000ULL) {
296 printk(KERN_INFO "Aperture size %u MB is not right, using settings from NB\n", 297 dev_info(&agp->dev, "aperture size %u MB is not right, using settings from NB\n",
297 32 << order); 298 32 << order);
298 order = nb_order; 299 order = nb_order;
299 } 300 }
300 301
301 printk(KERN_INFO PFX "Aperture from AGP @ %Lx size %u MB\n", aper, 32 << order); 302 dev_info(&agp->dev, "aperture from AGP @ %Lx size %u MB\n",
303 aper, 32 << order);
302 if (order < 0 || !agp_aperture_valid(aper, (32*1024*1024)<<order)) 304 if (order < 0 || !agp_aperture_valid(aper, (32*1024*1024)<<order))
303 return -1; 305 return -1;
304 306
@@ -319,10 +321,10 @@ static __devinit int cache_nbs (struct pci_dev *pdev, u32 cap_ptr)
319 for (i = 0; i < num_k8_northbridges; i++) { 321 for (i = 0; i < num_k8_northbridges; i++) {
320 struct pci_dev *dev = k8_northbridges[i]; 322 struct pci_dev *dev = k8_northbridges[i];
321 if (fix_northbridge(dev, pdev, cap_ptr) < 0) { 323 if (fix_northbridge(dev, pdev, cap_ptr) < 0) {
322 printk(KERN_ERR PFX "No usable aperture found.\n"); 324 dev_err(&dev->dev, "no usable aperture found\n");
323#ifdef __x86_64__ 325#ifdef __x86_64__
324 /* should port this to i386 */ 326 /* should port this to i386 */
325 printk(KERN_ERR PFX "Consider rebooting with iommu=memaper=2 to get a good aperture.\n"); 327 dev_err(&dev->dev, "consider rebooting with iommu=memaper=2 to get a good aperture\n");
326#endif 328#endif
327 return -1; 329 return -1;
328 } 330 }
@@ -345,14 +347,14 @@ static void __devinit amd8151_init(struct pci_dev *pdev, struct agp_bridge_data
345 default: revstring="??"; break; 347 default: revstring="??"; break;
346 } 348 }
347 349
348 printk (KERN_INFO PFX "Detected AMD 8151 AGP Bridge rev %s\n", revstring); 350 dev_info(&pdev->dev, "AMD 8151 AGP Bridge rev %s\n", revstring);
349 351
350 /* 352 /*
351 * Work around errata. 353 * Work around errata.
352 * Chips before B2 stepping incorrectly reporting v3.5 354 * Chips before B2 stepping incorrectly reporting v3.5
353 */ 355 */
354 if (pdev->revision < 0x13) { 356 if (pdev->revision < 0x13) {
355 printk (KERN_INFO PFX "Correcting AGP revision (reports 3.5, is really 3.0)\n"); 357 dev_info(&pdev->dev, "correcting AGP revision (reports 3.5, is really 3.0)\n");
356 bridge->major_version = 3; 358 bridge->major_version = 3;
357 bridge->minor_version = 0; 359 bridge->minor_version = 0;
358 } 360 }
@@ -375,11 +377,11 @@ static int __devinit uli_agp_init(struct pci_dev *pdev)
375 struct pci_dev *dev1; 377 struct pci_dev *dev1;
376 int i; 378 int i;
377 unsigned size = amd64_fetch_size(); 379 unsigned size = amd64_fetch_size();
378 printk(KERN_INFO "Setting up ULi AGP.\n"); 380
381 dev_info(&pdev->dev, "setting up ULi AGP\n");
379 dev1 = pci_get_slot (pdev->bus,PCI_DEVFN(0,0)); 382 dev1 = pci_get_slot (pdev->bus,PCI_DEVFN(0,0));
380 if (dev1 == NULL) { 383 if (dev1 == NULL) {
381 printk(KERN_INFO PFX "Detected a ULi chipset, " 384 dev_info(&pdev->dev, "can't find ULi secondary device\n");
382 "but could not fine the secondary device.\n");
383 return -ENODEV; 385 return -ENODEV;
384 } 386 }
385 387
@@ -388,7 +390,7 @@ static int __devinit uli_agp_init(struct pci_dev *pdev)
388 break; 390 break;
389 391
390 if (i == ARRAY_SIZE(uli_sizes)) { 392 if (i == ARRAY_SIZE(uli_sizes)) {
391 printk(KERN_INFO PFX "No ULi size found for %d\n", size); 393 dev_info(&pdev->dev, "no ULi size found for %d\n", size);
392 return -ENODEV; 394 return -ENODEV;
393 } 395 }
394 396
@@ -433,13 +435,11 @@ static int nforce3_agp_init(struct pci_dev *pdev)
433 int i; 435 int i;
434 unsigned size = amd64_fetch_size(); 436 unsigned size = amd64_fetch_size();
435 437
436 printk(KERN_INFO PFX "Setting up Nforce3 AGP.\n"); 438 dev_info(&pdev->dev, "setting up Nforce3 AGP\n");
437 439
438 dev1 = pci_get_slot(pdev->bus, PCI_DEVFN(11, 0)); 440 dev1 = pci_get_slot(pdev->bus, PCI_DEVFN(11, 0));
439 if (dev1 == NULL) { 441 if (dev1 == NULL) {
440 printk(KERN_INFO PFX "agpgart: Detected an NVIDIA " 442 dev_info(&pdev->dev, "can't find Nforce3 secondary device\n");
441 "nForce3 chipset, but could not find "
442 "the secondary device.\n");
443 return -ENODEV; 443 return -ENODEV;
444 } 444 }
445 445
@@ -448,7 +448,7 @@ static int nforce3_agp_init(struct pci_dev *pdev)
448 break; 448 break;
449 449
450 if (i == ARRAY_SIZE(nforce3_sizes)) { 450 if (i == ARRAY_SIZE(nforce3_sizes)) {
451 printk(KERN_INFO PFX "No NForce3 size found for %d\n", size); 451 dev_info(&pdev->dev, "no NForce3 size found for %d\n", size);
452 return -ENODEV; 452 return -ENODEV;
453 } 453 }
454 454
@@ -462,7 +462,7 @@ static int nforce3_agp_init(struct pci_dev *pdev)
462 462
463 /* if x86-64 aperture base is beyond 4G, exit here */ 463 /* if x86-64 aperture base is beyond 4G, exit here */
464 if ( (apbase & 0x7fff) >> (32 - 25) ) { 464 if ( (apbase & 0x7fff) >> (32 - 25) ) {
465 printk(KERN_INFO PFX "aperture base > 4G\n"); 465 dev_info(&pdev->dev, "aperture base > 4G\n");
466 return -ENODEV; 466 return -ENODEV;
467 } 467 }
468 468
@@ -489,6 +489,7 @@ static int __devinit agp_amd64_probe(struct pci_dev *pdev,
489{ 489{
490 struct agp_bridge_data *bridge; 490 struct agp_bridge_data *bridge;
491 u8 cap_ptr; 491 u8 cap_ptr;
492 int err;
492 493
493 cap_ptr = pci_find_capability(pdev, PCI_CAP_ID_AGP); 494 cap_ptr = pci_find_capability(pdev, PCI_CAP_ID_AGP);
494 if (!cap_ptr) 495 if (!cap_ptr)
@@ -504,7 +505,8 @@ static int __devinit agp_amd64_probe(struct pci_dev *pdev,
504 pdev->device == PCI_DEVICE_ID_AMD_8151_0) { 505 pdev->device == PCI_DEVICE_ID_AMD_8151_0) {
505 amd8151_init(pdev, bridge); 506 amd8151_init(pdev, bridge);
506 } else { 507 } else {
507 printk(KERN_INFO PFX "Detected AGP bridge %x\n", pdev->devfn); 508 dev_info(&pdev->dev, "AGP bridge [%04x/%04x]\n",
509 pdev->vendor, pdev->device);
508 } 510 }
509 511
510 bridge->driver = &amd_8151_driver; 512 bridge->driver = &amd_8151_driver;
@@ -536,7 +538,12 @@ static int __devinit agp_amd64_probe(struct pci_dev *pdev,
536 } 538 }
537 539
538 pci_set_drvdata(pdev, bridge); 540 pci_set_drvdata(pdev, bridge);
539 return agp_add_bridge(bridge); 541 err = agp_add_bridge(bridge);
542 if (err < 0)
543 return err;
544
545 agp_bridges_found++;
546 return 0;
540} 547}
541 548
542static void __devexit agp_amd64_remove(struct pci_dev *pdev) 549static void __devexit agp_amd64_remove(struct pci_dev *pdev)
@@ -713,7 +720,11 @@ int __init agp_amd64_init(void)
713 720
714 if (agp_off) 721 if (agp_off)
715 return -EINVAL; 722 return -EINVAL;
716 if (pci_register_driver(&agp_amd64_pci_driver) < 0) { 723 err = pci_register_driver(&agp_amd64_pci_driver);
724 if (err < 0)
725 return err;
726
727 if (agp_bridges_found == 0) {
717 struct pci_dev *dev; 728 struct pci_dev *dev;
718 if (!agp_try_unsupported && !agp_try_unsupported_boot) { 729 if (!agp_try_unsupported && !agp_try_unsupported_boot) {
719 printk(KERN_INFO PFX "No supported AGP bridge found.\n"); 730 printk(KERN_INFO PFX "No supported AGP bridge found.\n");
diff --git a/drivers/char/agp/ati-agp.c b/drivers/char/agp/ati-agp.c
index 3a4566c0d84f..6ecbcafb34b1 100644
--- a/drivers/char/agp/ati-agp.c
+++ b/drivers/char/agp/ati-agp.c
@@ -486,8 +486,8 @@ static int __devinit agp_ati_probe(struct pci_dev *pdev,
486 goto found; 486 goto found;
487 } 487 }
488 488
489 printk(KERN_ERR PFX 489 dev_err(&pdev->dev, "unsupported Ati chipset [%04x/%04x])\n",
490 "Unsupported Ati chipset (device id: %04x)\n", pdev->device); 490 pdev->vendor, pdev->device);
491 return -ENODEV; 491 return -ENODEV;
492 492
493found: 493found:
@@ -500,8 +500,7 @@ found:
500 500
501 bridge->driver = &ati_generic_bridge; 501 bridge->driver = &ati_generic_bridge;
502 502
503 printk(KERN_INFO PFX "Detected Ati %s chipset\n", 503 dev_info(&pdev->dev, "Ati %s chipset\n", devs[j].chipset_name);
504 devs[j].chipset_name);
505 504
506 /* Fill in the mode register */ 505 /* Fill in the mode register */
507 pci_read_config_dword(pdev, 506 pci_read_config_dword(pdev,
diff --git a/drivers/char/agp/backend.c b/drivers/char/agp/backend.c
index 1ec87104e68c..3a3cc03d401c 100644
--- a/drivers/char/agp/backend.c
+++ b/drivers/char/agp/backend.c
@@ -144,7 +144,8 @@ static int agp_backend_initialize(struct agp_bridge_data *bridge)
144 void *addr = bridge->driver->agp_alloc_page(bridge); 144 void *addr = bridge->driver->agp_alloc_page(bridge);
145 145
146 if (!addr) { 146 if (!addr) {
147 printk(KERN_ERR PFX "unable to get memory for scratch page.\n"); 147 dev_err(&bridge->dev->dev,
148 "can't get memory for scratch page\n");
148 return -ENOMEM; 149 return -ENOMEM;
149 } 150 }
150 151
@@ -155,13 +156,13 @@ static int agp_backend_initialize(struct agp_bridge_data *bridge)
155 156
156 size_value = bridge->driver->fetch_size(); 157 size_value = bridge->driver->fetch_size();
157 if (size_value == 0) { 158 if (size_value == 0) {
158 printk(KERN_ERR PFX "unable to determine aperture size.\n"); 159 dev_err(&bridge->dev->dev, "can't determine aperture size\n");
159 rc = -EINVAL; 160 rc = -EINVAL;
160 goto err_out; 161 goto err_out;
161 } 162 }
162 if (bridge->driver->create_gatt_table(bridge)) { 163 if (bridge->driver->create_gatt_table(bridge)) {
163 printk(KERN_ERR PFX 164 dev_err(&bridge->dev->dev,
164 "unable to get memory for graphics translation table.\n"); 165 "can't get memory for graphics translation table\n");
165 rc = -ENOMEM; 166 rc = -ENOMEM;
166 goto err_out; 167 goto err_out;
167 } 168 }
@@ -169,7 +170,8 @@ static int agp_backend_initialize(struct agp_bridge_data *bridge)
169 170
170 bridge->key_list = vmalloc(PAGE_SIZE * 4); 171 bridge->key_list = vmalloc(PAGE_SIZE * 4);
171 if (bridge->key_list == NULL) { 172 if (bridge->key_list == NULL) {
172 printk(KERN_ERR PFX "error allocating memory for key lists.\n"); 173 dev_err(&bridge->dev->dev,
174 "can't allocate memory for key lists\n");
173 rc = -ENOMEM; 175 rc = -ENOMEM;
174 goto err_out; 176 goto err_out;
175 } 177 }
@@ -179,10 +181,12 @@ static int agp_backend_initialize(struct agp_bridge_data *bridge)
179 memset(bridge->key_list, 0, PAGE_SIZE * 4); 181 memset(bridge->key_list, 0, PAGE_SIZE * 4);
180 182
181 if (bridge->driver->configure()) { 183 if (bridge->driver->configure()) {
182 printk(KERN_ERR PFX "error configuring host chipset.\n"); 184 dev_err(&bridge->dev->dev, "error configuring host chipset\n");
183 rc = -EINVAL; 185 rc = -EINVAL;
184 goto err_out; 186 goto err_out;
185 } 187 }
188 INIT_LIST_HEAD(&bridge->mapped_list);
189 spin_lock_init(&bridge->mapped_lock);
186 190
187 return 0; 191 return 0;
188 192
@@ -269,25 +273,27 @@ int agp_add_bridge(struct agp_bridge_data *bridge)
269 273
270 /* Grab reference on the chipset driver. */ 274 /* Grab reference on the chipset driver. */
271 if (!try_module_get(bridge->driver->owner)) { 275 if (!try_module_get(bridge->driver->owner)) {
272 printk (KERN_INFO PFX "Couldn't lock chipset driver.\n"); 276 dev_info(&bridge->dev->dev, "can't lock chipset driver\n");
273 return -EINVAL; 277 return -EINVAL;
274 } 278 }
275 279
276 error = agp_backend_initialize(bridge); 280 error = agp_backend_initialize(bridge);
277 if (error) { 281 if (error) {
278 printk (KERN_INFO PFX "agp_backend_initialize() failed.\n"); 282 dev_info(&bridge->dev->dev,
283 "agp_backend_initialize() failed\n");
279 goto err_out; 284 goto err_out;
280 } 285 }
281 286
282 if (list_empty(&agp_bridges)) { 287 if (list_empty(&agp_bridges)) {
283 error = agp_frontend_initialize(); 288 error = agp_frontend_initialize();
284 if (error) { 289 if (error) {
285 printk (KERN_INFO PFX "agp_frontend_initialize() failed.\n"); 290 dev_info(&bridge->dev->dev,
291 "agp_frontend_initialize() failed\n");
286 goto frontend_err; 292 goto frontend_err;
287 } 293 }
288 294
289 printk(KERN_INFO PFX "AGP aperture is %dM @ 0x%lx\n", 295 dev_info(&bridge->dev->dev, "AGP aperture is %dM @ 0x%lx\n",
290 bridge->driver->fetch_size(), bridge->gart_bus_addr); 296 bridge->driver->fetch_size(), bridge->gart_bus_addr);
291 297
292 } 298 }
293 299
diff --git a/drivers/char/agp/generic.c b/drivers/char/agp/generic.c
index eaa1a355bb32..118dbde25dc7 100644
--- a/drivers/char/agp/generic.c
+++ b/drivers/char/agp/generic.c
@@ -429,6 +429,10 @@ int agp_bind_memory(struct agp_memory *curr, off_t pg_start)
429 429
430 curr->is_bound = true; 430 curr->is_bound = true;
431 curr->pg_start = pg_start; 431 curr->pg_start = pg_start;
432 spin_lock(&agp_bridge->mapped_lock);
433 list_add(&curr->mapped_list, &agp_bridge->mapped_list);
434 spin_unlock(&agp_bridge->mapped_lock);
435
432 return 0; 436 return 0;
433} 437}
434EXPORT_SYMBOL(agp_bind_memory); 438EXPORT_SYMBOL(agp_bind_memory);
@@ -461,10 +465,34 @@ int agp_unbind_memory(struct agp_memory *curr)
461 465
462 curr->is_bound = false; 466 curr->is_bound = false;
463 curr->pg_start = 0; 467 curr->pg_start = 0;
468 spin_lock(&curr->bridge->mapped_lock);
469 list_del(&curr->mapped_list);
470 spin_unlock(&curr->bridge->mapped_lock);
464 return 0; 471 return 0;
465} 472}
466EXPORT_SYMBOL(agp_unbind_memory); 473EXPORT_SYMBOL(agp_unbind_memory);
467 474
475/**
476 * agp_rebind_emmory - Rewrite the entire GATT, useful on resume
477 */
478int agp_rebind_memory(void)
479{
480 struct agp_memory *curr;
481 int ret_val = 0;
482
483 spin_lock(&agp_bridge->mapped_lock);
484 list_for_each_entry(curr, &agp_bridge->mapped_list, mapped_list) {
485 ret_val = curr->bridge->driver->insert_memory(curr,
486 curr->pg_start,
487 curr->type);
488 if (ret_val != 0)
489 break;
490 }
491 spin_unlock(&agp_bridge->mapped_lock);
492 return ret_val;
493}
494EXPORT_SYMBOL(agp_rebind_memory);
495
468/* End - Routines for handling swapping of agp_memory into the GATT */ 496/* End - Routines for handling swapping of agp_memory into the GATT */
469 497
470 498
@@ -771,8 +799,8 @@ void agp_device_command(u32 bridge_agpstat, bool agp_v3)
771 if (!agp) 799 if (!agp)
772 continue; 800 continue;
773 801
774 printk(KERN_INFO PFX "Putting AGP V%d device at %s into %dx mode\n", 802 dev_info(&device->dev, "putting AGP V%d device into %dx mode\n",
775 agp_v3 ? 3 : 2, pci_name(device), mode); 803 agp_v3 ? 3 : 2, mode);
776 pci_write_config_dword(device, agp + PCI_AGP_COMMAND, bridge_agpstat); 804 pci_write_config_dword(device, agp + PCI_AGP_COMMAND, bridge_agpstat);
777 } 805 }
778} 806}
@@ -800,10 +828,8 @@ void agp_generic_enable(struct agp_bridge_data *bridge, u32 requested_mode)
800 828
801 get_agp_version(agp_bridge); 829 get_agp_version(agp_bridge);
802 830
803 printk(KERN_INFO PFX "Found an AGP %d.%d compliant device at %s.\n", 831 dev_info(&agp_bridge->dev->dev, "AGP %d.%d bridge\n",
804 agp_bridge->major_version, 832 agp_bridge->major_version, agp_bridge->minor_version);
805 agp_bridge->minor_version,
806 pci_name(agp_bridge->dev));
807 833
808 pci_read_config_dword(agp_bridge->dev, 834 pci_read_config_dword(agp_bridge->dev,
809 agp_bridge->capndx + PCI_AGP_STATUS, &bridge_agpstat); 835 agp_bridge->capndx + PCI_AGP_STATUS, &bridge_agpstat);
@@ -832,8 +858,7 @@ void agp_generic_enable(struct agp_bridge_data *bridge, u32 requested_mode)
832 pci_write_config_dword(bridge->dev, 858 pci_write_config_dword(bridge->dev,
833 bridge->capndx+AGPCTRL, temp); 859 bridge->capndx+AGPCTRL, temp);
834 860
835 printk(KERN_INFO PFX "Device is in legacy mode," 861 dev_info(&bridge->dev->dev, "bridge is in legacy mode, falling back to 2.x\n");
836 " falling back to 2.x\n");
837 } 862 }
838 } 863 }
839 864
diff --git a/drivers/char/agp/intel-agp.c b/drivers/char/agp/intel-agp.c
index df702642ab8f..016fdf0623a4 100644
--- a/drivers/char/agp/intel-agp.c
+++ b/drivers/char/agp/intel-agp.c
@@ -32,8 +32,8 @@
32#define PCI_DEVICE_ID_INTEL_Q35_IG 0x29B2 32#define PCI_DEVICE_ID_INTEL_Q35_IG 0x29B2
33#define PCI_DEVICE_ID_INTEL_Q33_HB 0x29D0 33#define PCI_DEVICE_ID_INTEL_Q33_HB 0x29D0
34#define PCI_DEVICE_ID_INTEL_Q33_IG 0x29D2 34#define PCI_DEVICE_ID_INTEL_Q33_IG 0x29D2
35#define PCI_DEVICE_ID_INTEL_IGD_HB 0x2A40 35#define PCI_DEVICE_ID_INTEL_GM45_HB 0x2A40
36#define PCI_DEVICE_ID_INTEL_IGD_IG 0x2A42 36#define PCI_DEVICE_ID_INTEL_GM45_IG 0x2A42
37#define PCI_DEVICE_ID_INTEL_IGD_E_HB 0x2E00 37#define PCI_DEVICE_ID_INTEL_IGD_E_HB 0x2E00
38#define PCI_DEVICE_ID_INTEL_IGD_E_IG 0x2E02 38#define PCI_DEVICE_ID_INTEL_IGD_E_IG 0x2E02
39#define PCI_DEVICE_ID_INTEL_Q45_HB 0x2E10 39#define PCI_DEVICE_ID_INTEL_Q45_HB 0x2E10
@@ -55,7 +55,7 @@
55 agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82965G_HB || \ 55 agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82965G_HB || \
56 agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82965GM_HB || \ 56 agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82965GM_HB || \
57 agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82965GME_HB || \ 57 agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82965GME_HB || \
58 agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_IGD_HB) 58 agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_GM45_HB)
59 59
60#define IS_G33 (agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_G33_HB || \ 60#define IS_G33 (agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_G33_HB || \
61 agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_Q35_HB || \ 61 agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_Q35_HB || \
@@ -161,7 +161,7 @@ static int intel_i810_fetch_size(void)
161 values = A_SIZE_FIX(agp_bridge->driver->aperture_sizes); 161 values = A_SIZE_FIX(agp_bridge->driver->aperture_sizes);
162 162
163 if ((smram_miscc & I810_GMS) == I810_GMS_DISABLE) { 163 if ((smram_miscc & I810_GMS) == I810_GMS_DISABLE) {
164 printk(KERN_WARNING PFX "i810 is disabled\n"); 164 dev_warn(&agp_bridge->dev->dev, "i810 is disabled\n");
165 return 0; 165 return 0;
166 } 166 }
167 if ((smram_miscc & I810_GFX_MEM_WIN_SIZE) == I810_GFX_MEM_WIN_32M) { 167 if ((smram_miscc & I810_GFX_MEM_WIN_SIZE) == I810_GFX_MEM_WIN_32M) {
@@ -193,7 +193,8 @@ static int intel_i810_configure(void)
193 193
194 intel_private.registers = ioremap(temp, 128 * 4096); 194 intel_private.registers = ioremap(temp, 128 * 4096);
195 if (!intel_private.registers) { 195 if (!intel_private.registers) {
196 printk(KERN_ERR PFX "Unable to remap memory.\n"); 196 dev_err(&intel_private.pcidev->dev,
197 "can't remap memory\n");
197 return -ENOMEM; 198 return -ENOMEM;
198 } 199 }
199 } 200 }
@@ -201,7 +202,8 @@ static int intel_i810_configure(void)
201 if ((readl(intel_private.registers+I810_DRAM_CTL) 202 if ((readl(intel_private.registers+I810_DRAM_CTL)
202 & I810_DRAM_ROW_0) == I810_DRAM_ROW_0_SDRAM) { 203 & I810_DRAM_ROW_0) == I810_DRAM_ROW_0_SDRAM) {
203 /* This will need to be dynamically assigned */ 204 /* This will need to be dynamically assigned */
204 printk(KERN_INFO PFX "detected 4MB dedicated video ram.\n"); 205 dev_info(&intel_private.pcidev->dev,
206 "detected 4MB dedicated video ram\n");
205 intel_private.num_dcache_entries = 1024; 207 intel_private.num_dcache_entries = 1024;
206 } 208 }
207 pci_read_config_dword(intel_private.pcidev, I810_GMADDR, &temp); 209 pci_read_config_dword(intel_private.pcidev, I810_GMADDR, &temp);
@@ -500,8 +502,8 @@ static void intel_i830_init_gtt_entries(void)
500 size = 1024 + 512; 502 size = 1024 + 512;
501 break; 503 break;
502 default: 504 default:
503 printk(KERN_INFO PFX "Unknown page table size, " 505 dev_info(&intel_private.pcidev->dev,
504 "assuming 512KB\n"); 506 "unknown page table size, assuming 512KB\n");
505 size = 512; 507 size = 512;
506 } 508 }
507 size += 4; /* add in BIOS popup space */ 509 size += 4; /* add in BIOS popup space */
@@ -515,8 +517,8 @@ static void intel_i830_init_gtt_entries(void)
515 size = 2048; 517 size = 2048;
516 break; 518 break;
517 default: 519 default:
518 printk(KERN_INFO PFX "Unknown page table size 0x%x, " 520 dev_info(&agp_bridge->dev->dev,
519 "assuming 512KB\n", 521 "unknown page table size 0x%x, assuming 512KB\n",
520 (gmch_ctrl & G33_PGETBL_SIZE_MASK)); 522 (gmch_ctrl & G33_PGETBL_SIZE_MASK));
521 size = 512; 523 size = 512;
522 } 524 }
@@ -627,11 +629,11 @@ static void intel_i830_init_gtt_entries(void)
627 } 629 }
628 } 630 }
629 if (gtt_entries > 0) 631 if (gtt_entries > 0)
630 printk(KERN_INFO PFX "Detected %dK %s memory.\n", 632 dev_info(&agp_bridge->dev->dev, "detected %dK %s memory\n",
631 gtt_entries / KB(1), local ? "local" : "stolen"); 633 gtt_entries / KB(1), local ? "local" : "stolen");
632 else 634 else
633 printk(KERN_INFO PFX 635 dev_info(&agp_bridge->dev->dev,
634 "No pre-allocated video memory detected.\n"); 636 "no pre-allocated video memory detected\n");
635 gtt_entries /= KB(4); 637 gtt_entries /= KB(4);
636 638
637 intel_private.gtt_entries = gtt_entries; 639 intel_private.gtt_entries = gtt_entries;
@@ -801,10 +803,12 @@ static int intel_i830_insert_entries(struct agp_memory *mem, off_t pg_start,
801 num_entries = A_SIZE_FIX(temp)->num_entries; 803 num_entries = A_SIZE_FIX(temp)->num_entries;
802 804
803 if (pg_start < intel_private.gtt_entries) { 805 if (pg_start < intel_private.gtt_entries) {
804 printk(KERN_DEBUG PFX "pg_start == 0x%.8lx,intel_private.gtt_entries == 0x%.8x\n", 806 dev_printk(KERN_DEBUG, &intel_private.pcidev->dev,
805 pg_start, intel_private.gtt_entries); 807 "pg_start == 0x%.8lx, intel_private.gtt_entries == 0x%.8x\n",
808 pg_start, intel_private.gtt_entries);
806 809
807 printk(KERN_INFO PFX "Trying to insert into local/stolen memory\n"); 810 dev_info(&intel_private.pcidev->dev,
811 "trying to insert into local/stolen memory\n");
808 goto out_err; 812 goto out_err;
809 } 813 }
810 814
@@ -851,7 +855,8 @@ static int intel_i830_remove_entries(struct agp_memory *mem, off_t pg_start,
851 return 0; 855 return 0;
852 856
853 if (pg_start < intel_private.gtt_entries) { 857 if (pg_start < intel_private.gtt_entries) {
854 printk(KERN_INFO PFX "Trying to disable local/stolen memory\n"); 858 dev_info(&intel_private.pcidev->dev,
859 "trying to disable local/stolen memory\n");
855 return -EINVAL; 860 return -EINVAL;
856 } 861 }
857 862
@@ -957,7 +962,7 @@ static void intel_i9xx_setup_flush(void)
957 if (intel_private.ifp_resource.start) { 962 if (intel_private.ifp_resource.start) {
958 intel_private.i9xx_flush_page = ioremap_nocache(intel_private.ifp_resource.start, PAGE_SIZE); 963 intel_private.i9xx_flush_page = ioremap_nocache(intel_private.ifp_resource.start, PAGE_SIZE);
959 if (!intel_private.i9xx_flush_page) 964 if (!intel_private.i9xx_flush_page)
960 printk(KERN_INFO "unable to ioremap flush page - no chipset flushing"); 965 dev_info(&intel_private.pcidev->dev, "can't ioremap flush page - no chipset flushing");
961 } 966 }
962} 967}
963 968
@@ -1028,10 +1033,12 @@ static int intel_i915_insert_entries(struct agp_memory *mem, off_t pg_start,
1028 num_entries = A_SIZE_FIX(temp)->num_entries; 1033 num_entries = A_SIZE_FIX(temp)->num_entries;
1029 1034
1030 if (pg_start < intel_private.gtt_entries) { 1035 if (pg_start < intel_private.gtt_entries) {
1031 printk(KERN_DEBUG PFX "pg_start == 0x%.8lx,intel_private.gtt_entries == 0x%.8x\n", 1036 dev_printk(KERN_DEBUG, &intel_private.pcidev->dev,
1032 pg_start, intel_private.gtt_entries); 1037 "pg_start == 0x%.8lx, intel_private.gtt_entries == 0x%.8x\n",
1038 pg_start, intel_private.gtt_entries);
1033 1039
1034 printk(KERN_INFO PFX "Trying to insert into local/stolen memory\n"); 1040 dev_info(&intel_private.pcidev->dev,
1041 "trying to insert into local/stolen memory\n");
1035 goto out_err; 1042 goto out_err;
1036 } 1043 }
1037 1044
@@ -1078,7 +1085,8 @@ static int intel_i915_remove_entries(struct agp_memory *mem, off_t pg_start,
1078 return 0; 1085 return 0;
1079 1086
1080 if (pg_start < intel_private.gtt_entries) { 1087 if (pg_start < intel_private.gtt_entries) {
1081 printk(KERN_INFO PFX "Trying to disable local/stolen memory\n"); 1088 dev_info(&intel_private.pcidev->dev,
1089 "trying to disable local/stolen memory\n");
1082 return -EINVAL; 1090 return -EINVAL;
1083 } 1091 }
1084 1092
@@ -1182,7 +1190,7 @@ static unsigned long intel_i965_mask_memory(struct agp_bridge_data *bridge,
1182static void intel_i965_get_gtt_range(int *gtt_offset, int *gtt_size) 1190static void intel_i965_get_gtt_range(int *gtt_offset, int *gtt_size)
1183{ 1191{
1184 switch (agp_bridge->dev->device) { 1192 switch (agp_bridge->dev->device) {
1185 case PCI_DEVICE_ID_INTEL_IGD_HB: 1193 case PCI_DEVICE_ID_INTEL_GM45_HB:
1186 case PCI_DEVICE_ID_INTEL_IGD_E_HB: 1194 case PCI_DEVICE_ID_INTEL_IGD_E_HB:
1187 case PCI_DEVICE_ID_INTEL_Q45_HB: 1195 case PCI_DEVICE_ID_INTEL_Q45_HB:
1188 case PCI_DEVICE_ID_INTEL_G45_HB: 1196 case PCI_DEVICE_ID_INTEL_G45_HB:
@@ -1379,7 +1387,7 @@ static int intel_815_configure(void)
1379 /* the Intel 815 chipset spec. says that bits 29-31 in the 1387 /* the Intel 815 chipset spec. says that bits 29-31 in the
1380 * ATTBASE register are reserved -> try not to write them */ 1388 * ATTBASE register are reserved -> try not to write them */
1381 if (agp_bridge->gatt_bus_addr & INTEL_815_ATTBASE_MASK) { 1389 if (agp_bridge->gatt_bus_addr & INTEL_815_ATTBASE_MASK) {
1382 printk(KERN_EMERG PFX "gatt bus addr too high"); 1390 dev_emerg(&agp_bridge->dev->dev, "gatt bus addr too high");
1383 return -EINVAL; 1391 return -EINVAL;
1384 } 1392 }
1385 1393
@@ -2117,8 +2125,8 @@ static const struct intel_driver_description {
2117 NULL, &intel_g33_driver }, 2125 NULL, &intel_g33_driver },
2118 { PCI_DEVICE_ID_INTEL_Q33_HB, PCI_DEVICE_ID_INTEL_Q33_IG, 0, "Q33", 2126 { PCI_DEVICE_ID_INTEL_Q33_HB, PCI_DEVICE_ID_INTEL_Q33_IG, 0, "Q33",
2119 NULL, &intel_g33_driver }, 2127 NULL, &intel_g33_driver },
2120 { PCI_DEVICE_ID_INTEL_IGD_HB, PCI_DEVICE_ID_INTEL_IGD_IG, 0, 2128 { PCI_DEVICE_ID_INTEL_GM45_HB, PCI_DEVICE_ID_INTEL_GM45_IG, 0,
2121 "Intel Integrated Graphics Device", NULL, &intel_i965_driver }, 2129 "Mobile Intel? GM45 Express", NULL, &intel_i965_driver },
2122 { PCI_DEVICE_ID_INTEL_IGD_E_HB, PCI_DEVICE_ID_INTEL_IGD_E_IG, 0, 2130 { PCI_DEVICE_ID_INTEL_IGD_E_HB, PCI_DEVICE_ID_INTEL_IGD_E_IG, 0,
2123 "Intel Integrated Graphics Device", NULL, &intel_i965_driver }, 2131 "Intel Integrated Graphics Device", NULL, &intel_i965_driver },
2124 { PCI_DEVICE_ID_INTEL_Q45_HB, PCI_DEVICE_ID_INTEL_Q45_IG, 0, 2132 { PCI_DEVICE_ID_INTEL_Q45_HB, PCI_DEVICE_ID_INTEL_Q45_IG, 0,
@@ -2163,8 +2171,8 @@ static int __devinit agp_intel_probe(struct pci_dev *pdev,
2163 2171
2164 if (intel_agp_chipsets[i].name == NULL) { 2172 if (intel_agp_chipsets[i].name == NULL) {
2165 if (cap_ptr) 2173 if (cap_ptr)
2166 printk(KERN_WARNING PFX "Unsupported Intel chipset" 2174 dev_warn(&pdev->dev, "unsupported Intel chipset [%04x/%04x]\n",
2167 "(device id: %04x)\n", pdev->device); 2175 pdev->vendor, pdev->device);
2168 agp_put_bridge(bridge); 2176 agp_put_bridge(bridge);
2169 return -ENODEV; 2177 return -ENODEV;
2170 } 2178 }
@@ -2172,9 +2180,8 @@ static int __devinit agp_intel_probe(struct pci_dev *pdev,
2172 if (bridge->driver == NULL) { 2180 if (bridge->driver == NULL) {
2173 /* bridge has no AGP and no IGD detected */ 2181 /* bridge has no AGP and no IGD detected */
2174 if (cap_ptr) 2182 if (cap_ptr)
2175 printk(KERN_WARNING PFX "Failed to find bridge device " 2183 dev_warn(&pdev->dev, "can't find bridge device (chip_id: %04x)\n",
2176 "(chip_id: %04x)\n", 2184 intel_agp_chipsets[i].gmch_chip_id);
2177 intel_agp_chipsets[i].gmch_chip_id);
2178 agp_put_bridge(bridge); 2185 agp_put_bridge(bridge);
2179 return -ENODEV; 2186 return -ENODEV;
2180 } 2187 }
@@ -2183,8 +2190,7 @@ static int __devinit agp_intel_probe(struct pci_dev *pdev,
2183 bridge->capndx = cap_ptr; 2190 bridge->capndx = cap_ptr;
2184 bridge->dev_private_data = &intel_private; 2191 bridge->dev_private_data = &intel_private;
2185 2192
2186 printk(KERN_INFO PFX "Detected an Intel %s Chipset.\n", 2193 dev_info(&pdev->dev, "Intel %s Chipset\n", intel_agp_chipsets[i].name);
2187 intel_agp_chipsets[i].name);
2188 2194
2189 /* 2195 /*
2190 * The following fixes the case where the BIOS has "forgotten" to 2196 * The following fixes the case where the BIOS has "forgotten" to
@@ -2194,7 +2200,7 @@ static int __devinit agp_intel_probe(struct pci_dev *pdev,
2194 r = &pdev->resource[0]; 2200 r = &pdev->resource[0];
2195 if (!r->start && r->end) { 2201 if (!r->start && r->end) {
2196 if (pci_assign_resource(pdev, 0)) { 2202 if (pci_assign_resource(pdev, 0)) {
2197 printk(KERN_ERR PFX "could not assign resource 0\n"); 2203 dev_err(&pdev->dev, "can't assign resource 0\n");
2198 agp_put_bridge(bridge); 2204 agp_put_bridge(bridge);
2199 return -ENODEV; 2205 return -ENODEV;
2200 } 2206 }
@@ -2206,7 +2212,7 @@ static int __devinit agp_intel_probe(struct pci_dev *pdev,
2206 * 20030610 - hamish@zot.org 2212 * 20030610 - hamish@zot.org
2207 */ 2213 */
2208 if (pci_enable_device(pdev)) { 2214 if (pci_enable_device(pdev)) {
2209 printk(KERN_ERR PFX "Unable to Enable PCI device\n"); 2215 dev_err(&pdev->dev, "can't enable PCI device\n");
2210 agp_put_bridge(bridge); 2216 agp_put_bridge(bridge);
2211 return -ENODEV; 2217 return -ENODEV;
2212 } 2218 }
@@ -2238,6 +2244,7 @@ static void __devexit agp_intel_remove(struct pci_dev *pdev)
2238static int agp_intel_resume(struct pci_dev *pdev) 2244static int agp_intel_resume(struct pci_dev *pdev)
2239{ 2245{
2240 struct agp_bridge_data *bridge = pci_get_drvdata(pdev); 2246 struct agp_bridge_data *bridge = pci_get_drvdata(pdev);
2247 int ret_val;
2241 2248
2242 pci_restore_state(pdev); 2249 pci_restore_state(pdev);
2243 2250
@@ -2265,6 +2272,10 @@ static int agp_intel_resume(struct pci_dev *pdev)
2265 else if (bridge->driver == &intel_i965_driver) 2272 else if (bridge->driver == &intel_i965_driver)
2266 intel_i915_configure(); 2273 intel_i915_configure();
2267 2274
2275 ret_val = agp_rebind_memory();
2276 if (ret_val != 0)
2277 return ret_val;
2278
2268 return 0; 2279 return 0;
2269} 2280}
2270#endif 2281#endif
@@ -2315,7 +2326,7 @@ static struct pci_device_id agp_intel_pci_table[] = {
2315 ID(PCI_DEVICE_ID_INTEL_G33_HB), 2326 ID(PCI_DEVICE_ID_INTEL_G33_HB),
2316 ID(PCI_DEVICE_ID_INTEL_Q35_HB), 2327 ID(PCI_DEVICE_ID_INTEL_Q35_HB),
2317 ID(PCI_DEVICE_ID_INTEL_Q33_HB), 2328 ID(PCI_DEVICE_ID_INTEL_Q33_HB),
2318 ID(PCI_DEVICE_ID_INTEL_IGD_HB), 2329 ID(PCI_DEVICE_ID_INTEL_GM45_HB),
2319 ID(PCI_DEVICE_ID_INTEL_IGD_E_HB), 2330 ID(PCI_DEVICE_ID_INTEL_IGD_E_HB),
2320 ID(PCI_DEVICE_ID_INTEL_Q45_HB), 2331 ID(PCI_DEVICE_ID_INTEL_Q45_HB),
2321 ID(PCI_DEVICE_ID_INTEL_G45_HB), 2332 ID(PCI_DEVICE_ID_INTEL_G45_HB),
diff --git a/drivers/char/agp/isoch.c b/drivers/char/agp/isoch.c
index 3f9ccde62377..c73385cc4b8a 100644
--- a/drivers/char/agp/isoch.c
+++ b/drivers/char/agp/isoch.c
@@ -153,7 +153,7 @@ static int agp_3_5_isochronous_node_enable(struct agp_bridge_data *bridge,
153 153
154 /* Check if this configuration has any chance of working */ 154 /* Check if this configuration has any chance of working */
155 if (tot_bw > target.maxbw) { 155 if (tot_bw > target.maxbw) {
156 printk(KERN_ERR PFX "isochronous bandwidth required " 156 dev_err(&td->dev, "isochronous bandwidth required "
157 "by AGP 3.0 devices exceeds that which is supported by " 157 "by AGP 3.0 devices exceeds that which is supported by "
158 "the AGP 3.0 bridge!\n"); 158 "the AGP 3.0 bridge!\n");
159 ret = -ENODEV; 159 ret = -ENODEV;
@@ -188,7 +188,7 @@ static int agp_3_5_isochronous_node_enable(struct agp_bridge_data *bridge,
188 /* Exit if the minimal ISOCH_N allocation among the masters is more 188 /* Exit if the minimal ISOCH_N allocation among the masters is more
189 * than the target can handle. */ 189 * than the target can handle. */
190 if (tot_n > target.n) { 190 if (tot_n > target.n) {
191 printk(KERN_ERR PFX "number of isochronous " 191 dev_err(&td->dev, "number of isochronous "
192 "transactions per period required by AGP 3.0 devices " 192 "transactions per period required by AGP 3.0 devices "
193 "exceeds that which is supported by the AGP 3.0 " 193 "exceeds that which is supported by the AGP 3.0 "
194 "bridge!\n"); 194 "bridge!\n");
@@ -229,7 +229,7 @@ static int agp_3_5_isochronous_node_enable(struct agp_bridge_data *bridge,
229 /* Exit if the minimal RQ needs of the masters exceeds what the target 229 /* Exit if the minimal RQ needs of the masters exceeds what the target
230 * can provide. */ 230 * can provide. */
231 if (tot_rq > rq_isoch) { 231 if (tot_rq > rq_isoch) {
232 printk(KERN_ERR PFX "number of request queue slots " 232 dev_err(&td->dev, "number of request queue slots "
233 "required by the isochronous bandwidth requested by " 233 "required by the isochronous bandwidth requested by "
234 "AGP 3.0 devices exceeds the number provided by the " 234 "AGP 3.0 devices exceeds the number provided by the "
235 "AGP 3.0 bridge!\n"); 235 "AGP 3.0 bridge!\n");
@@ -359,8 +359,9 @@ int agp_3_5_enable(struct agp_bridge_data *bridge)
359 case 0x0001: /* Unclassified device */ 359 case 0x0001: /* Unclassified device */
360 /* Don't know what this is, but log it for investigation. */ 360 /* Don't know what this is, but log it for investigation. */
361 if (mcapndx != 0) { 361 if (mcapndx != 0) {
362 printk (KERN_INFO PFX "Wacky, found unclassified AGP device. %x:%x\n", 362 dev_info(&td->dev, "wacky, found unclassified AGP device %s [%04x/%04x]\n",
363 dev->vendor, dev->device); 363 pci_name(dev),
364 dev->vendor, dev->device);
364 } 365 }
365 continue; 366 continue;
366 367
@@ -407,17 +408,18 @@ int agp_3_5_enable(struct agp_bridge_data *bridge)
407 } 408 }
408 409
409 if (mcapndx == 0) { 410 if (mcapndx == 0) {
410 printk(KERN_ERR PFX "woah! Non-AGP device " 411 dev_err(&td->dev, "woah! Non-AGP device %s on "
411 "found on the secondary bus of an AGP 3.5 bridge!\n"); 412 "secondary bus of AGP 3.5 bridge!\n",
413 pci_name(dev));
412 ret = -ENODEV; 414 ret = -ENODEV;
413 goto free_and_exit; 415 goto free_and_exit;
414 } 416 }
415 417
416 mmajor = (ncapid >> AGP_MAJOR_VERSION_SHIFT) & 0xf; 418 mmajor = (ncapid >> AGP_MAJOR_VERSION_SHIFT) & 0xf;
417 if (mmajor < 3) { 419 if (mmajor < 3) {
418 printk(KERN_ERR PFX "woah! AGP 2.0 device " 420 dev_err(&td->dev, "woah! AGP 2.0 device %s on "
419 "found on the secondary bus of an AGP 3.5 " 421 "secondary bus of AGP 3.5 bridge operating "
420 "bridge operating with AGP 3.0 electricals!\n"); 422 "with AGP 3.0 electricals!\n", pci_name(dev));
421 ret = -ENODEV; 423 ret = -ENODEV;
422 goto free_and_exit; 424 goto free_and_exit;
423 } 425 }
@@ -427,10 +429,10 @@ int agp_3_5_enable(struct agp_bridge_data *bridge)
427 pci_read_config_dword(dev, cur->capndx+AGPSTAT, &mstatus); 429 pci_read_config_dword(dev, cur->capndx+AGPSTAT, &mstatus);
428 430
429 if (((mstatus >> 3) & 0x1) == 0) { 431 if (((mstatus >> 3) & 0x1) == 0) {
430 printk(KERN_ERR PFX "woah! AGP 3.x device " 432 dev_err(&td->dev, "woah! AGP 3.x device %s not "
431 "not operating in AGP 3.x mode found on the " 433 "operating in AGP 3.x mode on secondary bus "
432 "secondary bus of an AGP 3.5 bridge operating " 434 "of AGP 3.5 bridge operating with AGP 3.0 "
433 "with AGP 3.0 electricals!\n"); 435 "electricals!\n", pci_name(dev));
434 ret = -ENODEV; 436 ret = -ENODEV;
435 goto free_and_exit; 437 goto free_and_exit;
436 } 438 }
@@ -444,9 +446,9 @@ int agp_3_5_enable(struct agp_bridge_data *bridge)
444 if (isoch) { 446 if (isoch) {
445 ret = agp_3_5_isochronous_node_enable(bridge, dev_list, ndevs); 447 ret = agp_3_5_isochronous_node_enable(bridge, dev_list, ndevs);
446 if (ret) { 448 if (ret) {
447 printk(KERN_INFO PFX "Something bad happened setting " 449 dev_info(&td->dev, "something bad happened setting "
448 "up isochronous xfers. Falling back to " 450 "up isochronous xfers; falling back to "
449 "non-isochronous xfer mode.\n"); 451 "non-isochronous xfer mode\n");
450 } else { 452 } else {
451 goto free_and_exit; 453 goto free_and_exit;
452 } 454 }
@@ -466,4 +468,3 @@ free_and_exit:
466get_out: 468get_out:
467 return ret; 469 return ret;
468} 470}
469
diff --git a/drivers/char/agp/sis-agp.c b/drivers/char/agp/sis-agp.c
index b6791846809f..2587ef96a960 100644
--- a/drivers/char/agp/sis-agp.c
+++ b/drivers/char/agp/sis-agp.c
@@ -79,10 +79,8 @@ static void sis_delayed_enable(struct agp_bridge_data *bridge, u32 mode)
79 u32 command; 79 u32 command;
80 int rate; 80 int rate;
81 81
82 printk(KERN_INFO PFX "Found an AGP %d.%d compliant device at %s.\n", 82 dev_info(&agp_bridge->dev->dev, "AGP %d.%d bridge\n",
83 agp_bridge->major_version, 83 agp_bridge->major_version, agp_bridge->minor_version);
84 agp_bridge->minor_version,
85 pci_name(agp_bridge->dev));
86 84
87 pci_read_config_dword(agp_bridge->dev, agp_bridge->capndx + PCI_AGP_STATUS, &command); 85 pci_read_config_dword(agp_bridge->dev, agp_bridge->capndx + PCI_AGP_STATUS, &command);
88 command = agp_collect_device_status(bridge, mode, command); 86 command = agp_collect_device_status(bridge, mode, command);
@@ -94,8 +92,8 @@ static void sis_delayed_enable(struct agp_bridge_data *bridge, u32 mode)
94 if (!agp) 92 if (!agp)
95 continue; 93 continue;
96 94
97 printk(KERN_INFO PFX "Putting AGP V3 device at %s into %dx mode\n", 95 dev_info(&agp_bridge->dev->dev, "putting AGP V3 device at %s into %dx mode\n",
98 pci_name(device), rate); 96 pci_name(device), rate);
99 97
100 pci_write_config_dword(device, agp + PCI_AGP_COMMAND, command); 98 pci_write_config_dword(device, agp + PCI_AGP_COMMAND, command);
101 99
@@ -105,7 +103,7 @@ static void sis_delayed_enable(struct agp_bridge_data *bridge, u32 mode)
105 * cannot be configured 103 * cannot be configured
106 */ 104 */
107 if (device->device == bridge->dev->device) { 105 if (device->device == bridge->dev->device) {
108 printk(KERN_INFO PFX "SiS delay workaround: giving bridge time to recover.\n"); 106 dev_info(&agp_bridge->dev->dev, "SiS delay workaround: giving bridge time to recover\n");
109 msleep(10); 107 msleep(10);
110 } 108 }
111 } 109 }
@@ -190,7 +188,8 @@ static int __devinit agp_sis_probe(struct pci_dev *pdev,
190 return -ENODEV; 188 return -ENODEV;
191 189
192 190
193 printk(KERN_INFO PFX "Detected SiS chipset - id:%i\n", pdev->device); 191 dev_info(&pdev->dev, "SiS chipset [%04x/%04x]\n",
192 pdev->vendor, pdev->device);
194 bridge = agp_alloc_bridge(); 193 bridge = agp_alloc_bridge();
195 if (!bridge) 194 if (!bridge)
196 return -ENOMEM; 195 return -ENOMEM;
@@ -242,7 +241,7 @@ static struct pci_device_id agp_sis_pci_table[] = {
242 .class = (PCI_CLASS_BRIDGE_HOST << 8), 241 .class = (PCI_CLASS_BRIDGE_HOST << 8),
243 .class_mask = ~0, 242 .class_mask = ~0,
244 .vendor = PCI_VENDOR_ID_SI, 243 .vendor = PCI_VENDOR_ID_SI,
245 .device = PCI_DEVICE_ID_SI_5591_AGP, 244 .device = PCI_DEVICE_ID_SI_5591,
246 .subvendor = PCI_ANY_ID, 245 .subvendor = PCI_ANY_ID,
247 .subdevice = PCI_ANY_ID, 246 .subdevice = PCI_ANY_ID,
248 }, 247 },
diff --git a/drivers/char/agp/sworks-agp.c b/drivers/char/agp/sworks-agp.c
index 0e054c134490..2fb27fe4c10c 100644
--- a/drivers/char/agp/sworks-agp.c
+++ b/drivers/char/agp/sworks-agp.c
@@ -241,7 +241,8 @@ static void serverworks_tlbflush(struct agp_memory *temp)
241 while (readb(serverworks_private.registers+SVWRKS_POSTFLUSH) == 1) { 241 while (readb(serverworks_private.registers+SVWRKS_POSTFLUSH) == 1) {
242 cpu_relax(); 242 cpu_relax();
243 if (time_after(jiffies, timeout)) { 243 if (time_after(jiffies, timeout)) {
244 printk(KERN_ERR PFX "TLB post flush took more than 3 seconds\n"); 244 dev_err(&serverworks_private.svrwrks_dev->dev,
245 "TLB post flush took more than 3 seconds\n");
245 break; 246 break;
246 } 247 }
247 } 248 }
@@ -251,7 +252,8 @@ static void serverworks_tlbflush(struct agp_memory *temp)
251 while (readl(serverworks_private.registers+SVWRKS_DIRFLUSH) == 1) { 252 while (readl(serverworks_private.registers+SVWRKS_DIRFLUSH) == 1) {
252 cpu_relax(); 253 cpu_relax();
253 if (time_after(jiffies, timeout)) { 254 if (time_after(jiffies, timeout)) {
254 printk(KERN_ERR PFX "TLB Dir flush took more than 3 seconds\n"); 255 dev_err(&serverworks_private.svrwrks_dev->dev,
256 "TLB Dir flush took more than 3 seconds\n");
255 break; 257 break;
256 } 258 }
257 } 259 }
@@ -271,7 +273,7 @@ static int serverworks_configure(void)
271 temp = (temp & PCI_BASE_ADDRESS_MEM_MASK); 273 temp = (temp & PCI_BASE_ADDRESS_MEM_MASK);
272 serverworks_private.registers = (volatile u8 __iomem *) ioremap(temp, 4096); 274 serverworks_private.registers = (volatile u8 __iomem *) ioremap(temp, 4096);
273 if (!serverworks_private.registers) { 275 if (!serverworks_private.registers) {
274 printk (KERN_ERR PFX "Unable to ioremap() memory.\n"); 276 dev_err(&agp_bridge->dev->dev, "can't ioremap(%#x)\n", temp);
275 return -ENOMEM; 277 return -ENOMEM;
276 } 278 }
277 279
@@ -451,7 +453,7 @@ static int __devinit agp_serverworks_probe(struct pci_dev *pdev,
451 453
452 switch (pdev->device) { 454 switch (pdev->device) {
453 case 0x0006: 455 case 0x0006:
454 printk (KERN_ERR PFX "ServerWorks CNB20HE is unsupported due to lack of documentation.\n"); 456 dev_err(&pdev->dev, "ServerWorks CNB20HE is unsupported due to lack of documentation\n");
455 return -ENODEV; 457 return -ENODEV;
456 458
457 case PCI_DEVICE_ID_SERVERWORKS_HE: 459 case PCI_DEVICE_ID_SERVERWORKS_HE:
@@ -461,8 +463,8 @@ static int __devinit agp_serverworks_probe(struct pci_dev *pdev,
461 463
462 default: 464 default:
463 if (cap_ptr) 465 if (cap_ptr)
464 printk(KERN_ERR PFX "Unsupported Serverworks chipset " 466 dev_err(&pdev->dev, "unsupported Serverworks chipset "
465 "(device id: %04x)\n", pdev->device); 467 "[%04x/%04x]\n", pdev->vendor, pdev->device);
466 return -ENODEV; 468 return -ENODEV;
467 } 469 }
468 470
@@ -470,8 +472,7 @@ static int __devinit agp_serverworks_probe(struct pci_dev *pdev,
470 bridge_dev = pci_get_bus_and_slot((unsigned int)pdev->bus->number, 472 bridge_dev = pci_get_bus_and_slot((unsigned int)pdev->bus->number,
471 PCI_DEVFN(0, 1)); 473 PCI_DEVFN(0, 1));
472 if (!bridge_dev) { 474 if (!bridge_dev) {
473 printk(KERN_INFO PFX "Detected a Serverworks chipset " 475 dev_info(&pdev->dev, "can't find secondary device\n");
474 "but could not find the secondary device.\n");
475 return -ENODEV; 476 return -ENODEV;
476 } 477 }
477 478
@@ -482,8 +483,8 @@ static int __devinit agp_serverworks_probe(struct pci_dev *pdev,
482 if (temp & PCI_BASE_ADDRESS_MEM_TYPE_64) { 483 if (temp & PCI_BASE_ADDRESS_MEM_TYPE_64) {
483 pci_read_config_dword(pdev, SVWRKS_APSIZE + 4, &temp2); 484 pci_read_config_dword(pdev, SVWRKS_APSIZE + 4, &temp2);
484 if (temp2 != 0) { 485 if (temp2 != 0) {
485 printk(KERN_INFO PFX "Detected 64 bit aperture address, " 486 dev_info(&pdev->dev, "64 bit aperture address, "
486 "but top bits are not zero. Disabling agp\n"); 487 "but top bits are not zero; disabling AGP\n");
487 return -ENODEV; 488 return -ENODEV;
488 } 489 }
489 serverworks_private.mm_addr_ofs = 0x18; 490 serverworks_private.mm_addr_ofs = 0x18;
@@ -495,8 +496,8 @@ static int __devinit agp_serverworks_probe(struct pci_dev *pdev,
495 pci_read_config_dword(pdev, 496 pci_read_config_dword(pdev,
496 serverworks_private.mm_addr_ofs + 4, &temp2); 497 serverworks_private.mm_addr_ofs + 4, &temp2);
497 if (temp2 != 0) { 498 if (temp2 != 0) {
498 printk(KERN_INFO PFX "Detected 64 bit MMIO address, " 499 dev_info(&pdev->dev, "64 bit MMIO address, but top "
499 "but top bits are not zero. Disabling agp\n"); 500 "bits are not zero; disabling AGP\n");
500 return -ENODEV; 501 return -ENODEV;
501 } 502 }
502 } 503 }
diff --git a/drivers/char/agp/uninorth-agp.c b/drivers/char/agp/uninorth-agp.c
index d2fa3cfca02a..eef72709ec53 100644
--- a/drivers/char/agp/uninorth-agp.c
+++ b/drivers/char/agp/uninorth-agp.c
@@ -46,8 +46,8 @@ static int uninorth_fetch_size(void)
46 break; 46 break;
47 47
48 if (i == agp_bridge->driver->num_aperture_sizes) { 48 if (i == agp_bridge->driver->num_aperture_sizes) {
49 printk(KERN_ERR PFX "Invalid aperture size, using" 49 dev_err(&agp_bridge->dev->dev, "invalid aperture size, "
50 " default\n"); 50 "using default\n");
51 size = 0; 51 size = 0;
52 aperture = NULL; 52 aperture = NULL;
53 } 53 }
@@ -108,8 +108,8 @@ static int uninorth_configure(void)
108 108
109 current_size = A_SIZE_32(agp_bridge->current_size); 109 current_size = A_SIZE_32(agp_bridge->current_size);
110 110
111 printk(KERN_INFO PFX "configuring for size idx: %d\n", 111 dev_info(&agp_bridge->dev->dev, "configuring for size idx: %d\n",
112 current_size->size_value); 112 current_size->size_value);
113 113
114 /* aperture size and gatt addr */ 114 /* aperture size and gatt addr */
115 pci_write_config_dword(agp_bridge->dev, 115 pci_write_config_dword(agp_bridge->dev,
@@ -197,8 +197,9 @@ static int u3_insert_memory(struct agp_memory *mem, off_t pg_start, int type)
197 gp = (u32 *) &agp_bridge->gatt_table[pg_start]; 197 gp = (u32 *) &agp_bridge->gatt_table[pg_start];
198 for (i = 0; i < mem->page_count; ++i) { 198 for (i = 0; i < mem->page_count; ++i) {
199 if (gp[i]) { 199 if (gp[i]) {
200 printk("u3_insert_memory: entry 0x%x occupied (%x)\n", 200 dev_info(&agp_bridge->dev->dev,
201 i, gp[i]); 201 "u3_insert_memory: entry 0x%x occupied (%x)\n",
202 i, gp[i]);
202 return -EBUSY; 203 return -EBUSY;
203 } 204 }
204 } 205 }
@@ -276,8 +277,8 @@ static void uninorth_agp_enable(struct agp_bridge_data *bridge, u32 mode)
276 &scratch); 277 &scratch);
277 } while ((scratch & PCI_AGP_COMMAND_AGP) == 0 && ++timeout < 1000); 278 } while ((scratch & PCI_AGP_COMMAND_AGP) == 0 && ++timeout < 1000);
278 if ((scratch & PCI_AGP_COMMAND_AGP) == 0) 279 if ((scratch & PCI_AGP_COMMAND_AGP) == 0)
279 printk(KERN_ERR PFX "failed to write UniNorth AGP" 280 dev_err(&bridge->dev->dev, "can't write UniNorth AGP "
280 " command register\n"); 281 "command register\n");
281 282
282 if (uninorth_rev >= 0x30) { 283 if (uninorth_rev >= 0x30) {
283 /* This is an AGP V3 */ 284 /* This is an AGP V3 */
@@ -330,8 +331,8 @@ static int agp_uninorth_suspend(struct pci_dev *pdev)
330 pci_read_config_dword(device, agp + PCI_AGP_COMMAND, &cmd); 331 pci_read_config_dword(device, agp + PCI_AGP_COMMAND, &cmd);
331 if (!(cmd & PCI_AGP_COMMAND_AGP)) 332 if (!(cmd & PCI_AGP_COMMAND_AGP))
332 continue; 333 continue;
333 printk("uninorth-agp: disabling AGP on device %s\n", 334 dev_info(&pdev->dev, "disabling AGP on device %s\n",
334 pci_name(device)); 335 pci_name(device));
335 cmd &= ~PCI_AGP_COMMAND_AGP; 336 cmd &= ~PCI_AGP_COMMAND_AGP;
336 pci_write_config_dword(device, agp + PCI_AGP_COMMAND, cmd); 337 pci_write_config_dword(device, agp + PCI_AGP_COMMAND, cmd);
337 } 338 }
@@ -341,8 +342,7 @@ static int agp_uninorth_suspend(struct pci_dev *pdev)
341 pci_read_config_dword(pdev, agp + PCI_AGP_COMMAND, &cmd); 342 pci_read_config_dword(pdev, agp + PCI_AGP_COMMAND, &cmd);
342 bridge->dev_private_data = (void *)(long)cmd; 343 bridge->dev_private_data = (void *)(long)cmd;
343 if (cmd & PCI_AGP_COMMAND_AGP) { 344 if (cmd & PCI_AGP_COMMAND_AGP) {
344 printk("uninorth-agp: disabling AGP on bridge %s\n", 345 dev_info(&pdev->dev, "disabling AGP on bridge\n");
345 pci_name(pdev));
346 cmd &= ~PCI_AGP_COMMAND_AGP; 346 cmd &= ~PCI_AGP_COMMAND_AGP;
347 pci_write_config_dword(pdev, agp + PCI_AGP_COMMAND, cmd); 347 pci_write_config_dword(pdev, agp + PCI_AGP_COMMAND, cmd);
348 } 348 }
@@ -591,14 +591,14 @@ static int __devinit agp_uninorth_probe(struct pci_dev *pdev,
591 /* probe for known chipsets */ 591 /* probe for known chipsets */
592 for (j = 0; devs[j].chipset_name != NULL; ++j) { 592 for (j = 0; devs[j].chipset_name != NULL; ++j) {
593 if (pdev->device == devs[j].device_id) { 593 if (pdev->device == devs[j].device_id) {
594 printk(KERN_INFO PFX "Detected Apple %s chipset\n", 594 dev_info(&pdev->dev, "Apple %s chipset\n",
595 devs[j].chipset_name); 595 devs[j].chipset_name);
596 goto found; 596 goto found;
597 } 597 }
598 } 598 }
599 599
600 printk(KERN_ERR PFX "Unsupported Apple chipset (device id: %04x).\n", 600 dev_err(&pdev->dev, "unsupported Apple chipset [%04x/%04x]\n",
601 pdev->device); 601 pdev->vendor, pdev->device);
602 return -ENODEV; 602 return -ENODEV;
603 603
604 found: 604 found:
diff --git a/drivers/char/ds1620.c b/drivers/char/ds1620.c
index 34275c6f1da2..74e9cd81b5b2 100644
--- a/drivers/char/ds1620.c
+++ b/drivers/char/ds1620.c
@@ -10,7 +10,7 @@
10#include <linux/init.h> 10#include <linux/init.h>
11#include <linux/smp_lock.h> 11#include <linux/smp_lock.h>
12 12
13#include <asm/hardware.h> 13#include <mach/hardware.h>
14#include <asm/mach-types.h> 14#include <asm/mach-types.h>
15#include <asm/uaccess.h> 15#include <asm/uaccess.h>
16#include <asm/therm.h> 16#include <asm/therm.h>
diff --git a/drivers/char/hvc_console.c b/drivers/char/hvc_console.c
index 02aac104842d..fd64137b1ab9 100644
--- a/drivers/char/hvc_console.c
+++ b/drivers/char/hvc_console.c
@@ -322,11 +322,10 @@ static int hvc_open(struct tty_struct *tty, struct file * filp)
322 322
323 hp->tty = tty; 323 hp->tty = tty;
324 324
325 if (hp->ops->notifier_add)
326 rc = hp->ops->notifier_add(hp, hp->data);
327
328 spin_unlock_irqrestore(&hp->lock, flags); 325 spin_unlock_irqrestore(&hp->lock, flags);
329 326
327 if (hp->ops->notifier_add)
328 rc = hp->ops->notifier_add(hp, hp->data);
330 329
331 /* 330 /*
332 * If the notifier fails we return an error. The tty layer 331 * If the notifier fails we return an error. The tty layer
diff --git a/drivers/char/hw_random/ixp4xx-rng.c b/drivers/char/hw_random/ixp4xx-rng.c
index bab43ca32ac1..263567f5f392 100644
--- a/drivers/char/hw_random/ixp4xx-rng.c
+++ b/drivers/char/hw_random/ixp4xx-rng.c
@@ -23,7 +23,7 @@
23#include <linux/hw_random.h> 23#include <linux/hw_random.h>
24 24
25#include <asm/io.h> 25#include <asm/io.h>
26#include <asm/hardware.h> 26#include <mach/hardware.h>
27 27
28 28
29static int ixp4xx_rng_data_read(struct hwrng *rng, u32 *buffer) 29static int ixp4xx_rng_data_read(struct hwrng *rng, u32 *buffer)
diff --git a/drivers/char/rtc.c b/drivers/char/rtc.c
index d9799e2bcfbf..f53d4d00faf0 100644
--- a/drivers/char/rtc.c
+++ b/drivers/char/rtc.c
@@ -78,7 +78,6 @@
78#include <linux/wait.h> 78#include <linux/wait.h>
79#include <linux/bcd.h> 79#include <linux/bcd.h>
80#include <linux/delay.h> 80#include <linux/delay.h>
81#include <linux/smp_lock.h>
82#include <linux/uaccess.h> 81#include <linux/uaccess.h>
83 82
84#include <asm/current.h> 83#include <asm/current.h>
diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c
index e1b46bc7e43c..0e6866fe0f96 100644
--- a/drivers/char/tty_io.c
+++ b/drivers/char/tty_io.c
@@ -1161,8 +1161,8 @@ void disassociate_ctty(int on_exit)
1161 tty = get_current_tty(); 1161 tty = get_current_tty();
1162 if (tty) { 1162 if (tty) {
1163 tty_pgrp = get_pid(tty->pgrp); 1163 tty_pgrp = get_pid(tty->pgrp);
1164 mutex_unlock(&tty_mutex);
1165 lock_kernel(); 1164 lock_kernel();
1165 mutex_unlock(&tty_mutex);
1166 /* XXX: here we race, there is nothing protecting tty */ 1166 /* XXX: here we race, there is nothing protecting tty */
1167 if (on_exit && tty->driver->type != TTY_DRIVER_TYPE_PTY) 1167 if (on_exit && tty->driver->type != TTY_DRIVER_TYPE_PTY)
1168 tty_vhangup(tty); 1168 tty_vhangup(tty);
diff --git a/drivers/cpufreq/cpufreq_conservative.c b/drivers/cpufreq/cpufreq_conservative.c
index fe565ee43757..ac0bbf2d234f 100644
--- a/drivers/cpufreq/cpufreq_conservative.c
+++ b/drivers/cpufreq/cpufreq_conservative.c
@@ -333,7 +333,7 @@ static void dbs_check_cpu(int cpu)
333{ 333{
334 unsigned int idle_ticks, up_idle_ticks, down_idle_ticks; 334 unsigned int idle_ticks, up_idle_ticks, down_idle_ticks;
335 unsigned int tmp_idle_ticks, total_idle_ticks; 335 unsigned int tmp_idle_ticks, total_idle_ticks;
336 unsigned int freq_step; 336 unsigned int freq_target;
337 unsigned int freq_down_sampling_rate; 337 unsigned int freq_down_sampling_rate;
338 struct cpu_dbs_info_s *this_dbs_info = &per_cpu(cpu_dbs_info, cpu); 338 struct cpu_dbs_info_s *this_dbs_info = &per_cpu(cpu_dbs_info, cpu);
339 struct cpufreq_policy *policy; 339 struct cpufreq_policy *policy;
@@ -383,13 +383,13 @@ static void dbs_check_cpu(int cpu)
383 if (this_dbs_info->requested_freq == policy->max) 383 if (this_dbs_info->requested_freq == policy->max)
384 return; 384 return;
385 385
386 freq_step = (dbs_tuners_ins.freq_step * policy->max) / 100; 386 freq_target = (dbs_tuners_ins.freq_step * policy->max) / 100;
387 387
388 /* max freq cannot be less than 100. But who knows.... */ 388 /* max freq cannot be less than 100. But who knows.... */
389 if (unlikely(freq_step == 0)) 389 if (unlikely(freq_target == 0))
390 freq_step = 5; 390 freq_target = 5;
391 391
392 this_dbs_info->requested_freq += freq_step; 392 this_dbs_info->requested_freq += freq_target;
393 if (this_dbs_info->requested_freq > policy->max) 393 if (this_dbs_info->requested_freq > policy->max)
394 this_dbs_info->requested_freq = policy->max; 394 this_dbs_info->requested_freq = policy->max;
395 395
@@ -425,19 +425,19 @@ static void dbs_check_cpu(int cpu)
425 /* 425 /*
426 * if we are already at the lowest speed then break out early 426 * if we are already at the lowest speed then break out early
427 * or if we 'cannot' reduce the speed as the user might want 427 * or if we 'cannot' reduce the speed as the user might want
428 * freq_step to be zero 428 * freq_target to be zero
429 */ 429 */
430 if (this_dbs_info->requested_freq == policy->min 430 if (this_dbs_info->requested_freq == policy->min
431 || dbs_tuners_ins.freq_step == 0) 431 || dbs_tuners_ins.freq_step == 0)
432 return; 432 return;
433 433
434 freq_step = (dbs_tuners_ins.freq_step * policy->max) / 100; 434 freq_target = (dbs_tuners_ins.freq_step * policy->max) / 100;
435 435
436 /* max freq cannot be less than 100. But who knows.... */ 436 /* max freq cannot be less than 100. But who knows.... */
437 if (unlikely(freq_step == 0)) 437 if (unlikely(freq_target == 0))
438 freq_step = 5; 438 freq_target = 5;
439 439
440 this_dbs_info->requested_freq -= freq_step; 440 this_dbs_info->requested_freq -= freq_target;
441 if (this_dbs_info->requested_freq < policy->min) 441 if (this_dbs_info->requested_freq < policy->min)
442 this_dbs_info->requested_freq = policy->min; 442 this_dbs_info->requested_freq = policy->min;
443 443
diff --git a/drivers/cpuidle/sysfs.c b/drivers/cpuidle/sysfs.c
index 31a0e0b455b6..97b003839fb6 100644
--- a/drivers/cpuidle/sysfs.c
+++ b/drivers/cpuidle/sysfs.c
@@ -21,8 +21,8 @@ static int __init cpuidle_sysfs_setup(char *unused)
21} 21}
22__setup("cpuidle_sysfs_switch", cpuidle_sysfs_setup); 22__setup("cpuidle_sysfs_switch", cpuidle_sysfs_setup);
23 23
24static ssize_t show_available_governors(struct sys_device *dev, 24static ssize_t show_available_governors(struct sysdev_class *class,
25 struct sysdev_attribute *attr, char *buf) 25 char *buf)
26{ 26{
27 ssize_t i = 0; 27 ssize_t i = 0;
28 struct cpuidle_governor *tmp; 28 struct cpuidle_governor *tmp;
@@ -40,8 +40,8 @@ out:
40 return i; 40 return i;
41} 41}
42 42
43static ssize_t show_current_driver(struct sys_device *dev, 43static ssize_t show_current_driver(struct sysdev_class *class,
44 struct sysdev_attribute *attr, char *buf) 44 char *buf)
45{ 45{
46 ssize_t ret; 46 ssize_t ret;
47 47
@@ -55,8 +55,8 @@ static ssize_t show_current_driver(struct sys_device *dev,
55 return ret; 55 return ret;
56} 56}
57 57
58static ssize_t show_current_governor(struct sys_device *dev, 58static ssize_t show_current_governor(struct sysdev_class *class,
59 struct sysdev_attribute *attr, char *buf) 59 char *buf)
60{ 60{
61 ssize_t ret; 61 ssize_t ret;
62 62
@@ -70,9 +70,8 @@ static ssize_t show_current_governor(struct sys_device *dev,
70 return ret; 70 return ret;
71} 71}
72 72
73static ssize_t store_current_governor(struct sys_device *dev, 73static ssize_t store_current_governor(struct sysdev_class *class,
74 struct sysdev_attribute *attr, 74 const char *buf, size_t count)
75 const char *buf, size_t count)
76{ 75{
77 char gov_name[CPUIDLE_NAME_LEN]; 76 char gov_name[CPUIDLE_NAME_LEN];
78 int ret = -EINVAL; 77 int ret = -EINVAL;
@@ -104,8 +103,9 @@ static ssize_t store_current_governor(struct sys_device *dev,
104 return count; 103 return count;
105} 104}
106 105
107static SYSDEV_ATTR(current_driver, 0444, show_current_driver, NULL); 106static SYSDEV_CLASS_ATTR(current_driver, 0444, show_current_driver, NULL);
108static SYSDEV_ATTR(current_governor_ro, 0444, show_current_governor, NULL); 107static SYSDEV_CLASS_ATTR(current_governor_ro, 0444, show_current_governor,
108 NULL);
109 109
110static struct attribute *cpuclass_default_attrs[] = { 110static struct attribute *cpuclass_default_attrs[] = {
111 &attr_current_driver.attr, 111 &attr_current_driver.attr,
@@ -113,9 +113,10 @@ static struct attribute *cpuclass_default_attrs[] = {
113 NULL 113 NULL
114}; 114};
115 115
116static SYSDEV_ATTR(available_governors, 0444, show_available_governors, NULL); 116static SYSDEV_CLASS_ATTR(available_governors, 0444, show_available_governors,
117static SYSDEV_ATTR(current_governor, 0644, show_current_governor, 117 NULL);
118 store_current_governor); 118static SYSDEV_CLASS_ATTR(current_governor, 0644, show_current_governor,
119 store_current_governor);
119 120
120static struct attribute *cpuclass_switch_attrs[] = { 121static struct attribute *cpuclass_switch_attrs[] = {
121 &attr_available_governors.attr, 122 &attr_available_governors.attr,
diff --git a/drivers/crypto/ixp4xx_crypto.c b/drivers/crypto/ixp4xx_crypto.c
index 42a107fe9233..2d637e0fbc03 100644
--- a/drivers/crypto/ixp4xx_crypto.c
+++ b/drivers/crypto/ixp4xx_crypto.c
@@ -27,8 +27,8 @@
27#include <crypto/authenc.h> 27#include <crypto/authenc.h>
28#include <crypto/scatterwalk.h> 28#include <crypto/scatterwalk.h>
29 29
30#include <asm/arch/npe.h> 30#include <mach/npe.h>
31#include <asm/arch/qmgr.h> 31#include <mach/qmgr.h>
32 32
33#define MAX_KEYLEN 32 33#define MAX_KEYLEN 32
34 34
diff --git a/drivers/dma/iop-adma.c b/drivers/dma/iop-adma.c
index 85bfeba4d85e..71fba82462cb 100644
--- a/drivers/dma/iop-adma.c
+++ b/drivers/dma/iop-adma.c
@@ -33,7 +33,7 @@
33#include <linux/memory.h> 33#include <linux/memory.h>
34#include <linux/ioport.h> 34#include <linux/ioport.h>
35 35
36#include <asm/arch/adma.h> 36#include <mach/adma.h>
37 37
38#define to_iop_adma_chan(chan) container_of(chan, struct iop_adma_chan, common) 38#define to_iop_adma_chan(chan) container_of(chan, struct iop_adma_chan, common)
39#define to_iop_adma_device(dev) \ 39#define to_iop_adma_device(dev) \
diff --git a/drivers/firmware/memmap.c b/drivers/firmware/memmap.c
index 001622eb86f9..3bf8ee120d42 100644
--- a/drivers/firmware/memmap.c
+++ b/drivers/firmware/memmap.c
@@ -84,20 +84,23 @@ static struct kobj_type memmap_ktype = {
84 */ 84 */
85 85
86/* 86/*
87 * Firmware memory map entries 87 * Firmware memory map entries. No locking is needed because the
88 * firmware_map_add() and firmware_map_add_early() functions are called
89 * in firmware initialisation code in one single thread of execution.
88 */ 90 */
89static LIST_HEAD(map_entries); 91static LIST_HEAD(map_entries);
90 92
91/** 93/**
92 * Common implementation of firmware_map_add() and firmware_map_add_early() 94 * firmware_map_add_entry() - Does the real work to add a firmware memmap entry.
93 * which expects a pre-allocated struct firmware_map_entry.
94 *
95 * @start: Start of the memory range. 95 * @start: Start of the memory range.
96 * @end: End of the memory range (inclusive). 96 * @end: End of the memory range (inclusive).
97 * @type: Type of the memory range. 97 * @type: Type of the memory range.
98 * @entry: Pre-allocated (either kmalloc() or bootmem allocator), uninitialised 98 * @entry: Pre-allocated (either kmalloc() or bootmem allocator), uninitialised
99 * entry. 99 * entry.
100 */ 100 *
101 * Common implementation of firmware_map_add() and firmware_map_add_early()
102 * which expects a pre-allocated struct firmware_map_entry.
103 **/
101static int firmware_map_add_entry(resource_size_t start, resource_size_t end, 104static int firmware_map_add_entry(resource_size_t start, resource_size_t end,
102 const char *type, 105 const char *type,
103 struct firmware_map_entry *entry) 106 struct firmware_map_entry *entry)
@@ -115,33 +118,52 @@ static int firmware_map_add_entry(resource_size_t start, resource_size_t end,
115 return 0; 118 return 0;
116} 119}
117 120
118/* 121/**
119 * See <linux/firmware-map.h> for documentation. 122 * firmware_map_add() - Adds a firmware mapping entry.
120 */ 123 * @start: Start of the memory range.
124 * @end: End of the memory range (inclusive).
125 * @type: Type of the memory range.
126 *
127 * This function uses kmalloc() for memory
128 * allocation. Use firmware_map_add_early() if you want to use the bootmem
129 * allocator.
130 *
131 * That function must be called before late_initcall.
132 *
133 * Returns 0 on success, or -ENOMEM if no memory could be allocated.
134 **/
121int firmware_map_add(resource_size_t start, resource_size_t end, 135int firmware_map_add(resource_size_t start, resource_size_t end,
122 const char *type) 136 const char *type)
123{ 137{
124 struct firmware_map_entry *entry; 138 struct firmware_map_entry *entry;
125 139
126 entry = kmalloc(sizeof(struct firmware_map_entry), GFP_ATOMIC); 140 entry = kmalloc(sizeof(struct firmware_map_entry), GFP_ATOMIC);
127 WARN_ON(!entry);
128 if (!entry) 141 if (!entry)
129 return -ENOMEM; 142 return -ENOMEM;
130 143
131 return firmware_map_add_entry(start, end, type, entry); 144 return firmware_map_add_entry(start, end, type, entry);
132} 145}
133 146
134/* 147/**
135 * See <linux/firmware-map.h> for documentation. 148 * firmware_map_add_early() - Adds a firmware mapping entry.
136 */ 149 * @start: Start of the memory range.
150 * @end: End of the memory range (inclusive).
151 * @type: Type of the memory range.
152 *
153 * Adds a firmware mapping entry. This function uses the bootmem allocator
154 * for memory allocation. Use firmware_map_add() if you want to use kmalloc().
155 *
156 * That function must be called before late_initcall.
157 *
158 * Returns 0 on success, or -ENOMEM if no memory could be allocated.
159 **/
137int __init firmware_map_add_early(resource_size_t start, resource_size_t end, 160int __init firmware_map_add_early(resource_size_t start, resource_size_t end,
138 const char *type) 161 const char *type)
139{ 162{
140 struct firmware_map_entry *entry; 163 struct firmware_map_entry *entry;
141 164
142 entry = alloc_bootmem_low(sizeof(struct firmware_map_entry)); 165 entry = alloc_bootmem_low(sizeof(struct firmware_map_entry));
143 WARN_ON(!entry); 166 if (WARN_ON(!entry))
144 if (!entry)
145 return -ENOMEM; 167 return -ENOMEM;
146 168
147 return firmware_map_add_entry(start, end, type, entry); 169 return firmware_map_add_entry(start, end, type, entry);
@@ -183,7 +205,10 @@ static ssize_t memmap_attr_show(struct kobject *kobj,
183/* 205/*
184 * Initialises stuff and adds the entries in the map_entries list to 206 * Initialises stuff and adds the entries in the map_entries list to
185 * sysfs. Important is that firmware_map_add() and firmware_map_add_early() 207 * sysfs. Important is that firmware_map_add() and firmware_map_add_early()
186 * must be called before late_initcall. 208 * must be called before late_initcall. That's just because that function
209 * is called as late_initcall() function, which means that if you call
210 * firmware_map_add() or firmware_map_add_early() afterwards, the entries
211 * are not added to sysfs.
187 */ 212 */
188static int __init memmap_init(void) 213static int __init memmap_init(void)
189{ 214{
@@ -192,13 +217,13 @@ static int __init memmap_init(void)
192 struct kset *memmap_kset; 217 struct kset *memmap_kset;
193 218
194 memmap_kset = kset_create_and_add("memmap", NULL, firmware_kobj); 219 memmap_kset = kset_create_and_add("memmap", NULL, firmware_kobj);
195 WARN_ON(!memmap_kset); 220 if (WARN_ON(!memmap_kset))
196 if (!memmap_kset)
197 return -ENOMEM; 221 return -ENOMEM;
198 222
199 list_for_each_entry(entry, &map_entries, list) { 223 list_for_each_entry(entry, &map_entries, list) {
200 entry->kobj.kset = memmap_kset; 224 entry->kobj.kset = memmap_kset;
201 kobject_add(&entry->kobj, NULL, "%d", i++); 225 if (kobject_add(&entry->kobj, NULL, "%d", i++))
226 kobject_put(&entry->kobj);
202 } 227 }
203 228
204 return 0; 229 return 0;
diff --git a/drivers/hwmon/lm75.c b/drivers/hwmon/lm75.c
index 7880c273c2c5..8f9595f2fb53 100644
--- a/drivers/hwmon/lm75.c
+++ b/drivers/hwmon/lm75.c
@@ -54,11 +54,11 @@ enum lm75_type { /* keep sorted in alphabetical order */
54 tmp75, 54 tmp75,
55}; 55};
56 56
57/* Addresses scanned by legacy style driver binding */ 57/* Addresses scanned */
58static const unsigned short normal_i2c[] = { 0x48, 0x49, 0x4a, 0x4b, 0x4c, 58static const unsigned short normal_i2c[] = { 0x48, 0x49, 0x4a, 0x4b, 0x4c,
59 0x4d, 0x4e, 0x4f, I2C_CLIENT_END }; 59 0x4d, 0x4e, 0x4f, I2C_CLIENT_END };
60 60
61/* Insmod parameters (only for legacy style driver binding) */ 61/* Insmod parameters */
62I2C_CLIENT_INSMOD_1(lm75); 62I2C_CLIENT_INSMOD_1(lm75);
63 63
64 64
@@ -72,7 +72,6 @@ static const u8 LM75_REG_TEMP[3] = {
72 72
73/* Each client has this additional data */ 73/* Each client has this additional data */
74struct lm75_data { 74struct lm75_data {
75 struct i2c_client *client;
76 struct device *hwmon_dev; 75 struct device *hwmon_dev;
77 struct mutex update_lock; 76 struct mutex update_lock;
78 u8 orig_conf; 77 u8 orig_conf;
@@ -138,7 +137,7 @@ static const struct attribute_group lm75_group = {
138 137
139/*-----------------------------------------------------------------------*/ 138/*-----------------------------------------------------------------------*/
140 139
141/* "New style" I2C driver binding -- following the driver model */ 140/* device probe and removal */
142 141
143static int 142static int
144lm75_probe(struct i2c_client *client, const struct i2c_device_id *id) 143lm75_probe(struct i2c_client *client, const struct i2c_device_id *id)
@@ -157,8 +156,6 @@ lm75_probe(struct i2c_client *client, const struct i2c_device_id *id)
157 return -ENOMEM; 156 return -ENOMEM;
158 157
159 i2c_set_clientdata(client, data); 158 i2c_set_clientdata(client, data);
160
161 data->client = client;
162 mutex_init(&data->update_lock); 159 mutex_init(&data->update_lock);
163 160
164 /* Set to LM75 resolution (9 bits, 1/2 degree C) and range. 161 /* Set to LM75 resolution (9 bits, 1/2 degree C) and range.
@@ -236,45 +233,16 @@ static const struct i2c_device_id lm75_ids[] = {
236}; 233};
237MODULE_DEVICE_TABLE(i2c, lm75_ids); 234MODULE_DEVICE_TABLE(i2c, lm75_ids);
238 235
239static struct i2c_driver lm75_driver = { 236/* Return 0 if detection is successful, -ENODEV otherwise */
240 .driver = { 237static int lm75_detect(struct i2c_client *new_client, int kind,
241 .name = "lm75", 238 struct i2c_board_info *info)
242 },
243 .probe = lm75_probe,
244 .remove = lm75_remove,
245 .id_table = lm75_ids,
246};
247
248/*-----------------------------------------------------------------------*/
249
250/* "Legacy" I2C driver binding */
251
252static struct i2c_driver lm75_legacy_driver;
253
254/* This function is called by i2c_probe */
255static int lm75_detect(struct i2c_adapter *adapter, int address, int kind)
256{ 239{
240 struct i2c_adapter *adapter = new_client->adapter;
257 int i; 241 int i;
258 struct i2c_client *new_client;
259 int err = 0;
260 242
261 if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA | 243 if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA |
262 I2C_FUNC_SMBUS_WORD_DATA)) 244 I2C_FUNC_SMBUS_WORD_DATA))
263 goto exit; 245 return -ENODEV;
264
265 /* OK. For now, we presume we have a valid address. We create the
266 client structure, even though there may be no sensor present.
267 But it allows us to use i2c_smbus_read_*_data() calls. */
268 new_client = kzalloc(sizeof *new_client, GFP_KERNEL);
269 if (!new_client) {
270 err = -ENOMEM;
271 goto exit;
272 }
273
274 new_client->addr = address;
275 new_client->adapter = adapter;
276 new_client->driver = &lm75_legacy_driver;
277 new_client->flags = 0;
278 246
279 /* Now, we do the remaining detection. There is no identification- 247 /* Now, we do the remaining detection. There is no identification-
280 dedicated register so we have to rely on several tricks: 248 dedicated register so we have to rely on several tricks:
@@ -294,71 +262,44 @@ static int lm75_detect(struct i2c_adapter *adapter, int address, int kind)
294 || i2c_smbus_read_word_data(new_client, 5) != hyst 262 || i2c_smbus_read_word_data(new_client, 5) != hyst
295 || i2c_smbus_read_word_data(new_client, 6) != hyst 263 || i2c_smbus_read_word_data(new_client, 6) != hyst
296 || i2c_smbus_read_word_data(new_client, 7) != hyst) 264 || i2c_smbus_read_word_data(new_client, 7) != hyst)
297 goto exit_free; 265 return -ENODEV;
298 os = i2c_smbus_read_word_data(new_client, 3); 266 os = i2c_smbus_read_word_data(new_client, 3);
299 if (i2c_smbus_read_word_data(new_client, 4) != os 267 if (i2c_smbus_read_word_data(new_client, 4) != os
300 || i2c_smbus_read_word_data(new_client, 5) != os 268 || i2c_smbus_read_word_data(new_client, 5) != os
301 || i2c_smbus_read_word_data(new_client, 6) != os 269 || i2c_smbus_read_word_data(new_client, 6) != os
302 || i2c_smbus_read_word_data(new_client, 7) != os) 270 || i2c_smbus_read_word_data(new_client, 7) != os)
303 goto exit_free; 271 return -ENODEV;
304 272
305 /* Unused bits */ 273 /* Unused bits */
306 if (conf & 0xe0) 274 if (conf & 0xe0)
307 goto exit_free; 275 return -ENODEV;
308 276
309 /* Addresses cycling */ 277 /* Addresses cycling */
310 for (i = 8; i < 0xff; i += 8) 278 for (i = 8; i < 0xff; i += 8)
311 if (i2c_smbus_read_byte_data(new_client, i + 1) != conf 279 if (i2c_smbus_read_byte_data(new_client, i + 1) != conf
312 || i2c_smbus_read_word_data(new_client, i + 2) != hyst 280 || i2c_smbus_read_word_data(new_client, i + 2) != hyst
313 || i2c_smbus_read_word_data(new_client, i + 3) != os) 281 || i2c_smbus_read_word_data(new_client, i + 3) != os)
314 goto exit_free; 282 return -ENODEV;
315 } 283 }
316 284
317 /* NOTE: we treat "force=..." and "force_lm75=..." the same. 285 /* NOTE: we treat "force=..." and "force_lm75=..." the same.
318 * Only new-style driver binding distinguishes chip types. 286 * Only new-style driver binding distinguishes chip types.
319 */ 287 */
320 strlcpy(new_client->name, "lm75", I2C_NAME_SIZE); 288 strlcpy(info->type, "lm75", I2C_NAME_SIZE);
321
322 /* Tell the I2C layer a new client has arrived */
323 err = i2c_attach_client(new_client);
324 if (err)
325 goto exit_free;
326
327 err = lm75_probe(new_client, NULL);
328 if (err < 0)
329 goto exit_detach;
330 289
331 return 0; 290 return 0;
332
333exit_detach:
334 i2c_detach_client(new_client);
335exit_free:
336 kfree(new_client);
337exit:
338 return err;
339}
340
341static int lm75_attach_adapter(struct i2c_adapter *adapter)
342{
343 if (!(adapter->class & I2C_CLASS_HWMON))
344 return 0;
345 return i2c_probe(adapter, &addr_data, lm75_detect);
346} 291}
347 292
348static int lm75_detach_client(struct i2c_client *client) 293static struct i2c_driver lm75_driver = {
349{ 294 .class = I2C_CLASS_HWMON,
350 lm75_remove(client);
351 i2c_detach_client(client);
352 kfree(client);
353 return 0;
354}
355
356static struct i2c_driver lm75_legacy_driver = {
357 .driver = { 295 .driver = {
358 .name = "lm75_legacy", 296 .name = "lm75",
359 }, 297 },
360 .attach_adapter = lm75_attach_adapter, 298 .probe = lm75_probe,
361 .detach_client = lm75_detach_client, 299 .remove = lm75_remove,
300 .id_table = lm75_ids,
301 .detect = lm75_detect,
302 .address_data = &addr_data,
362}; 303};
363 304
364/*-----------------------------------------------------------------------*/ 305/*-----------------------------------------------------------------------*/
@@ -424,22 +365,11 @@ static struct lm75_data *lm75_update_device(struct device *dev)
424 365
425static int __init sensors_lm75_init(void) 366static int __init sensors_lm75_init(void)
426{ 367{
427 int status; 368 return i2c_add_driver(&lm75_driver);
428
429 status = i2c_add_driver(&lm75_driver);
430 if (status < 0)
431 return status;
432
433 status = i2c_add_driver(&lm75_legacy_driver);
434 if (status < 0)
435 i2c_del_driver(&lm75_driver);
436
437 return status;
438} 369}
439 370
440static void __exit sensors_lm75_exit(void) 371static void __exit sensors_lm75_exit(void)
441{ 372{
442 i2c_del_driver(&lm75_legacy_driver);
443 i2c_del_driver(&lm75_driver); 373 i2c_del_driver(&lm75_driver);
444} 374}
445 375
diff --git a/drivers/i2c/Kconfig b/drivers/i2c/Kconfig
index 96867347bcbf..711ca08ab776 100644
--- a/drivers/i2c/Kconfig
+++ b/drivers/i2c/Kconfig
@@ -38,6 +38,20 @@ config I2C_CHARDEV
38 This support is also available as a module. If so, the module 38 This support is also available as a module. If so, the module
39 will be called i2c-dev. 39 will be called i2c-dev.
40 40
41config I2C_HELPER_AUTO
42 bool "Autoselect pertinent helper modules"
43 default y
44 help
45 Some I2C bus drivers require so-called "I2C algorithm" modules
46 to work. These are basically software-only abstractions of generic
47 I2C interfaces. This option will autoselect them so that you don't
48 have to care.
49
50 Unselect this only if you need to enable additional helper
51 modules, for example for use with external I2C bus drivers.
52
53 In doubt, say Y.
54
41source drivers/i2c/algos/Kconfig 55source drivers/i2c/algos/Kconfig
42source drivers/i2c/busses/Kconfig 56source drivers/i2c/busses/Kconfig
43source drivers/i2c/chips/Kconfig 57source drivers/i2c/chips/Kconfig
diff --git a/drivers/i2c/algos/Kconfig b/drivers/i2c/algos/Kconfig
index 7137a17402fe..b788579b8227 100644
--- a/drivers/i2c/algos/Kconfig
+++ b/drivers/i2c/algos/Kconfig
@@ -2,15 +2,20 @@
2# I2C algorithm drivers configuration 2# I2C algorithm drivers configuration
3# 3#
4 4
5menu "I2C Algorithms"
6 depends on !I2C_HELPER_AUTO
7
5config I2C_ALGOBIT 8config I2C_ALGOBIT
6 tristate 9 tristate "I2C bit-banging interfaces"
7 10
8config I2C_ALGOPCF 11config I2C_ALGOPCF
9 tristate 12 tristate "I2C PCF 8584 interfaces"
10 13
11config I2C_ALGOPCA 14config I2C_ALGOPCA
12 tristate 15 tristate "I2C PCA 9564 interfaces"
13 16
14config I2C_ALGO_SGI 17config I2C_ALGO_SGI
15 tristate 18 tristate
16 depends on SGI_IP22 || SGI_IP32 || X86_VISWS 19 depends on SGI_IP22 || SGI_IP32 || X86_VISWS
20
21endmenu
diff --git a/drivers/i2c/busses/i2c-acorn.c b/drivers/i2c/busses/i2c-acorn.c
index 7c2be3558a24..75089febbc13 100644
--- a/drivers/i2c/busses/i2c-acorn.c
+++ b/drivers/i2c/busses/i2c-acorn.c
@@ -16,7 +16,7 @@
16#include <linux/i2c.h> 16#include <linux/i2c.h>
17#include <linux/i2c-algo-bit.h> 17#include <linux/i2c-algo-bit.h>
18 18
19#include <asm/hardware.h> 19#include <mach/hardware.h>
20#include <asm/io.h> 20#include <asm/io.h>
21#include <asm/hardware/ioc.h> 21#include <asm/hardware/ioc.h>
22#include <asm/system.h> 22#include <asm/system.h>
diff --git a/drivers/i2c/busses/i2c-amd756-s4882.c b/drivers/i2c/busses/i2c-amd756-s4882.c
index 72872d1e63ef..8ba2bcf727d3 100644
--- a/drivers/i2c/busses/i2c-amd756-s4882.c
+++ b/drivers/i2c/busses/i2c-amd756-s4882.c
@@ -155,6 +155,9 @@ static int __init amd756_s4882_init(void)
155 int i, error; 155 int i, error;
156 union i2c_smbus_data ioconfig; 156 union i2c_smbus_data ioconfig;
157 157
158 if (!amd756_smbus.dev.parent)
159 return -ENODEV;
160
158 /* Configure the PCA9556 multiplexer */ 161 /* Configure the PCA9556 multiplexer */
159 ioconfig.byte = 0x00; /* All I/O to output mode */ 162 ioconfig.byte = 0x00; /* All I/O to output mode */
160 error = i2c_smbus_xfer(&amd756_smbus, 0x18, 0, I2C_SMBUS_WRITE, 0x03, 163 error = i2c_smbus_xfer(&amd756_smbus, 0x18, 0, I2C_SMBUS_WRITE, 0x03,
@@ -168,11 +171,7 @@ static int __init amd756_s4882_init(void)
168 /* Unregister physical bus */ 171 /* Unregister physical bus */
169 error = i2c_del_adapter(&amd756_smbus); 172 error = i2c_del_adapter(&amd756_smbus);
170 if (error) { 173 if (error) {
171 if (error == -EINVAL) 174 dev_err(&amd756_smbus.dev, "Physical bus removal failed\n");
172 error = -ENODEV;
173 else
174 dev_err(&amd756_smbus.dev, "Physical bus removal "
175 "failed\n");
176 goto ERROR0; 175 goto ERROR0;
177 } 176 }
178 177
diff --git a/drivers/i2c/busses/i2c-at91.c b/drivers/i2c/busses/i2c-at91.c
index 73d61946a534..c1adcdbf7979 100644
--- a/drivers/i2c/busses/i2c-at91.c
+++ b/drivers/i2c/busses/i2c-at91.c
@@ -27,9 +27,9 @@
27 27
28#include <asm/io.h> 28#include <asm/io.h>
29 29
30#include <asm/arch/at91_twi.h> 30#include <mach/at91_twi.h>
31#include <asm/arch/board.h> 31#include <mach/board.h>
32#include <asm/arch/cpu.h> 32#include <mach/cpu.h>
33 33
34#define TWI_CLOCK 100000 /* Hz. max 400 Kbits/sec */ 34#define TWI_CLOCK 100000 /* Hz. max 400 Kbits/sec */
35 35
diff --git a/drivers/i2c/busses/i2c-davinci.c b/drivers/i2c/busses/i2c-davinci.c
index af3846eda985..5d7789834b95 100644
--- a/drivers/i2c/busses/i2c-davinci.c
+++ b/drivers/i2c/busses/i2c-davinci.c
@@ -36,10 +36,9 @@
36#include <linux/platform_device.h> 36#include <linux/platform_device.h>
37#include <linux/io.h> 37#include <linux/io.h>
38 38
39#include <asm/hardware.h> 39#include <mach/hardware.h>
40#include <asm/mach-types.h>
41 40
42#include <asm/arch/i2c.h> 41#include <mach/i2c.h>
43 42
44/* ----- global defines ----------------------------------------------- */ 43/* ----- global defines ----------------------------------------------- */
45 44
diff --git a/drivers/i2c/busses/i2c-ixp2000.c b/drivers/i2c/busses/i2c-ixp2000.c
index 5af9e6521e6c..05d72e981353 100644
--- a/drivers/i2c/busses/i2c-ixp2000.c
+++ b/drivers/i2c/busses/i2c-ixp2000.c
@@ -33,8 +33,8 @@
33#include <linux/i2c.h> 33#include <linux/i2c.h>
34#include <linux/i2c-algo-bit.h> 34#include <linux/i2c-algo-bit.h>
35 35
36#include <asm/hardware.h> /* Pick up IXP2000-specific bits */ 36#include <mach/hardware.h> /* Pick up IXP2000-specific bits */
37#include <asm/arch/gpio.h> 37#include <mach/gpio.h>
38 38
39static inline int ixp2000_scl_pin(void *data) 39static inline int ixp2000_scl_pin(void *data)
40{ 40{
diff --git a/drivers/i2c/busses/i2c-nforce2-s4985.c b/drivers/i2c/busses/i2c-nforce2-s4985.c
index d1a4cbcf2aa4..29015eb9ca46 100644
--- a/drivers/i2c/busses/i2c-nforce2-s4985.c
+++ b/drivers/i2c/busses/i2c-nforce2-s4985.c
@@ -150,6 +150,9 @@ static int __init nforce2_s4985_init(void)
150 int i, error; 150 int i, error;
151 union i2c_smbus_data ioconfig; 151 union i2c_smbus_data ioconfig;
152 152
153 if (!nforce2_smbus)
154 return -ENODEV;
155
153 /* Configure the PCA9556 multiplexer */ 156 /* Configure the PCA9556 multiplexer */
154 ioconfig.byte = 0x00; /* All I/O to output mode */ 157 ioconfig.byte = 0x00; /* All I/O to output mode */
155 error = i2c_smbus_xfer(nforce2_smbus, 0x18, 0, I2C_SMBUS_WRITE, 0x03, 158 error = i2c_smbus_xfer(nforce2_smbus, 0x18, 0, I2C_SMBUS_WRITE, 0x03,
@@ -161,8 +164,6 @@ static int __init nforce2_s4985_init(void)
161 } 164 }
162 165
163 /* Unregister physical bus */ 166 /* Unregister physical bus */
164 if (!nforce2_smbus)
165 return -ENODEV;
166 error = i2c_del_adapter(nforce2_smbus); 167 error = i2c_del_adapter(nforce2_smbus);
167 if (error) { 168 if (error) {
168 dev_err(&nforce2_smbus->dev, "Physical bus removal failed\n"); 169 dev_err(&nforce2_smbus->dev, "Physical bus removal failed\n");
diff --git a/drivers/i2c/busses/i2c-pnx.c b/drivers/i2c/busses/i2c-pnx.c
index 1ca21084ffcf..ec15cff556b9 100644
--- a/drivers/i2c/busses/i2c-pnx.c
+++ b/drivers/i2c/busses/i2c-pnx.c
@@ -19,7 +19,7 @@
19#include <linux/completion.h> 19#include <linux/completion.h>
20#include <linux/platform_device.h> 20#include <linux/platform_device.h>
21#include <linux/i2c-pnx.h> 21#include <linux/i2c-pnx.h>
22#include <asm/hardware.h> 22#include <mach/hardware.h>
23#include <asm/irq.h> 23#include <asm/irq.h>
24#include <asm/uaccess.h> 24#include <asm/uaccess.h>
25 25
diff --git a/drivers/i2c/busses/i2c-pxa.c b/drivers/i2c/busses/i2c-pxa.c
index af9e6034d7fb..44d838410f15 100644
--- a/drivers/i2c/busses/i2c-pxa.c
+++ b/drivers/i2c/busses/i2c-pxa.c
@@ -34,11 +34,11 @@
34#include <linux/err.h> 34#include <linux/err.h>
35#include <linux/clk.h> 35#include <linux/clk.h>
36 36
37#include <asm/hardware.h> 37#include <mach/hardware.h>
38#include <asm/irq.h> 38#include <asm/irq.h>
39#include <asm/io.h> 39#include <asm/io.h>
40#include <asm/arch/i2c.h> 40#include <mach/i2c.h>
41#include <asm/arch/pxa-regs.h> 41#include <mach/pxa-regs.h>
42 42
43struct pxa_i2c { 43struct pxa_i2c {
44 spinlock_t lock; 44 spinlock_t lock;
diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c
index 4864723c7425..c772e02c2803 100644
--- a/drivers/i2c/busses/i2c-s3c2410.c
+++ b/drivers/i2c/busses/i2c-s3c2410.c
@@ -35,11 +35,11 @@
35#include <linux/clk.h> 35#include <linux/clk.h>
36#include <linux/cpufreq.h> 36#include <linux/cpufreq.h>
37 37
38#include <asm/hardware.h> 38#include <mach/hardware.h>
39#include <asm/irq.h> 39#include <asm/irq.h>
40#include <asm/io.h> 40#include <asm/io.h>
41 41
42#include <asm/arch/regs-gpio.h> 42#include <mach/regs-gpio.h>
43#include <asm/plat-s3c/regs-iic.h> 43#include <asm/plat-s3c/regs-iic.h>
44#include <asm/plat-s3c/iic.h> 44#include <asm/plat-s3c/iic.h>
45 45
diff --git a/drivers/i2c/chips/at24.c b/drivers/i2c/chips/at24.c
index e764c94f3e3d..2a4acb269569 100644
--- a/drivers/i2c/chips/at24.c
+++ b/drivers/i2c/chips/at24.c
@@ -188,7 +188,7 @@ static ssize_t at24_eeprom_read(struct at24_data *at24, char *buf,
188 count = I2C_SMBUS_BLOCK_MAX; 188 count = I2C_SMBUS_BLOCK_MAX;
189 status = i2c_smbus_read_i2c_block_data(client, offset, 189 status = i2c_smbus_read_i2c_block_data(client, offset,
190 count, buf); 190 count, buf);
191 dev_dbg(&client->dev, "smbus read %zd@%d --> %d\n", 191 dev_dbg(&client->dev, "smbus read %zu@%d --> %d\n",
192 count, offset, status); 192 count, offset, status);
193 return (status < 0) ? -EIO : status; 193 return (status < 0) ? -EIO : status;
194 } 194 }
@@ -214,7 +214,7 @@ static ssize_t at24_eeprom_read(struct at24_data *at24, char *buf,
214 msg[1].len = count; 214 msg[1].len = count;
215 215
216 status = i2c_transfer(client->adapter, msg, 2); 216 status = i2c_transfer(client->adapter, msg, 2);
217 dev_dbg(&client->dev, "i2c read %zd@%d --> %d\n", 217 dev_dbg(&client->dev, "i2c read %zu@%d --> %d\n",
218 count, offset, status); 218 count, offset, status);
219 219
220 if (status == 2) 220 if (status == 2)
@@ -334,7 +334,7 @@ static ssize_t at24_eeprom_write(struct at24_data *at24, char *buf,
334 if (status == 1) 334 if (status == 1)
335 status = count; 335 status = count;
336 } 336 }
337 dev_dbg(&client->dev, "write %zd@%d --> %zd (%ld)\n", 337 dev_dbg(&client->dev, "write %zu@%d --> %zd (%ld)\n",
338 count, offset, status, jiffies); 338 count, offset, status, jiffies);
339 339
340 if (status == count) 340 if (status == count)
@@ -512,7 +512,7 @@ static int at24_probe(struct i2c_client *client, const struct i2c_device_id *id)
512 512
513 i2c_set_clientdata(client, at24); 513 i2c_set_clientdata(client, at24);
514 514
515 dev_info(&client->dev, "%Zd byte %s EEPROM %s\n", 515 dev_info(&client->dev, "%zu byte %s EEPROM %s\n",
516 at24->bin.size, client->name, 516 at24->bin.size, client->name,
517 writable ? "(writable)" : "(read-only)"); 517 writable ? "(writable)" : "(read-only)");
518 dev_dbg(&client->dev, 518 dev_dbg(&client->dev,
diff --git a/drivers/i2c/chips/isp1301_omap.c b/drivers/i2c/chips/isp1301_omap.c
index 03a33f1b9cd3..18355ae2155d 100644
--- a/drivers/i2c/chips/isp1301_omap.c
+++ b/drivers/i2c/chips/isp1301_omap.c
@@ -33,7 +33,7 @@
33#include <linux/workqueue.h> 33#include <linux/workqueue.h>
34 34
35#include <asm/irq.h> 35#include <asm/irq.h>
36#include <asm/arch/usb.h> 36#include <mach/usb.h>
37 37
38 38
39#ifndef DEBUG 39#ifndef DEBUG
@@ -94,7 +94,7 @@ struct isp1301 {
94/* board-specific PM hooks */ 94/* board-specific PM hooks */
95 95
96#include <asm/gpio.h> 96#include <asm/gpio.h>
97#include <asm/arch/mux.h> 97#include <mach/mux.h>
98#include <asm/mach-types.h> 98#include <asm/mach-types.h>
99 99
100 100
diff --git a/drivers/i2c/chips/menelaus.c b/drivers/i2c/chips/menelaus.c
index b36db1797c11..176126d3a01d 100644
--- a/drivers/i2c/chips/menelaus.c
+++ b/drivers/i2c/chips/menelaus.c
@@ -41,11 +41,10 @@
41#include <linux/rtc.h> 41#include <linux/rtc.h>
42#include <linux/bcd.h> 42#include <linux/bcd.h>
43 43
44#include <asm/mach-types.h>
45#include <asm/mach/irq.h> 44#include <asm/mach/irq.h>
46 45
47#include <asm/arch/gpio.h> 46#include <mach/gpio.h>
48#include <asm/arch/menelaus.h> 47#include <mach/menelaus.h>
49 48
50#define DRIVER_NAME "menelaus" 49#define DRIVER_NAME "menelaus"
51 50
diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c
index 7bf38c418086..550853f79ae8 100644
--- a/drivers/i2c/i2c-core.c
+++ b/drivers/i2c/i2c-core.c
@@ -813,7 +813,12 @@ static int i2c_check_addr(struct i2c_adapter *adapter, int addr)
813int i2c_attach_client(struct i2c_client *client) 813int i2c_attach_client(struct i2c_client *client)
814{ 814{
815 struct i2c_adapter *adapter = client->adapter; 815 struct i2c_adapter *adapter = client->adapter;
816 int res = 0; 816 int res;
817
818 /* Check for address business */
819 res = i2c_check_addr(adapter, client->addr);
820 if (res)
821 return res;
817 822
818 client->dev.parent = &client->adapter->dev; 823 client->dev.parent = &client->adapter->dev;
819 client->dev.bus = &i2c_bus_type; 824 client->dev.bus = &i2c_bus_type;
@@ -1451,9 +1456,11 @@ i2c_new_probed_device(struct i2c_adapter *adap,
1451 if ((addr_list[i] & ~0x07) == 0x30 1456 if ((addr_list[i] & ~0x07) == 0x30
1452 || (addr_list[i] & ~0x0f) == 0x50 1457 || (addr_list[i] & ~0x0f) == 0x50
1453 || !i2c_check_functionality(adap, I2C_FUNC_SMBUS_QUICK)) { 1458 || !i2c_check_functionality(adap, I2C_FUNC_SMBUS_QUICK)) {
1459 union i2c_smbus_data data;
1460
1454 if (i2c_smbus_xfer(adap, addr_list[i], 0, 1461 if (i2c_smbus_xfer(adap, addr_list[i], 0,
1455 I2C_SMBUS_READ, 0, 1462 I2C_SMBUS_READ, 0,
1456 I2C_SMBUS_BYTE, NULL) >= 0) 1463 I2C_SMBUS_BYTE, &data) >= 0)
1457 break; 1464 break;
1458 } else { 1465 } else {
1459 if (i2c_smbus_xfer(adap, addr_list[i], 0, 1466 if (i2c_smbus_xfer(adap, addr_list[i], 0,
diff --git a/drivers/i2c/i2c-dev.c b/drivers/i2c/i2c-dev.c
index 9d55c6383b23..af4491fa7e34 100644
--- a/drivers/i2c/i2c-dev.c
+++ b/drivers/i2c/i2c-dev.c
@@ -147,7 +147,7 @@ static ssize_t i2cdev_read (struct file *file, char __user *buf, size_t count,
147 if (tmp==NULL) 147 if (tmp==NULL)
148 return -ENOMEM; 148 return -ENOMEM;
149 149
150 pr_debug("i2c-dev: i2c-%d reading %zd bytes.\n", 150 pr_debug("i2c-dev: i2c-%d reading %zu bytes.\n",
151 iminor(file->f_path.dentry->d_inode), count); 151 iminor(file->f_path.dentry->d_inode), count);
152 152
153 ret = i2c_master_recv(client,tmp,count); 153 ret = i2c_master_recv(client,tmp,count);
@@ -175,7 +175,7 @@ static ssize_t i2cdev_write (struct file *file, const char __user *buf, size_t c
175 return -EFAULT; 175 return -EFAULT;
176 } 176 }
177 177
178 pr_debug("i2c-dev: i2c-%d writing %zd bytes.\n", 178 pr_debug("i2c-dev: i2c-%d writing %zu bytes.\n",
179 iminor(file->f_path.dentry->d_inode), count); 179 iminor(file->f_path.dentry->d_inode), count);
180 180
181 ret = i2c_master_send(client,tmp,count); 181 ret = i2c_master_send(client,tmp,count);
diff --git a/drivers/ide/arm/ide_arm.c b/drivers/ide/arm/ide_arm.c
index 176532ffae0e..f728f2927b5a 100644
--- a/drivers/ide/arm/ide_arm.c
+++ b/drivers/ide/arm/ide_arm.c
@@ -11,13 +11,12 @@
11#include <linux/init.h> 11#include <linux/init.h>
12#include <linux/ide.h> 12#include <linux/ide.h>
13 13
14#include <asm/mach-types.h>
15#include <asm/irq.h> 14#include <asm/irq.h>
16 15
17#define DRV_NAME "ide_arm" 16#define DRV_NAME "ide_arm"
18 17
19#ifdef CONFIG_ARCH_CLPS7500 18#ifdef CONFIG_ARCH_CLPS7500
20# include <asm/arch/hardware.h> 19# include <mach/hardware.h>
21# 20#
22# define IDE_ARM_IO (ISASLOT_IO + 0x1f0) 21# define IDE_ARM_IO (ISASLOT_IO + 0x1f0)
23# define IDE_ARM_IRQ IRQ_ISA_14 22# define IDE_ARM_IRQ IRQ_ISA_14
diff --git a/drivers/input/keyboard/aaed2000_kbd.c b/drivers/input/keyboard/aaed2000_kbd.c
index 8a77bfcd05bc..18222a689a03 100644
--- a/drivers/input/keyboard/aaed2000_kbd.c
+++ b/drivers/input/keyboard/aaed2000_kbd.c
@@ -20,8 +20,8 @@
20#include <linux/module.h> 20#include <linux/module.h>
21#include <linux/slab.h> 21#include <linux/slab.h>
22 22
23#include <asm/arch/hardware.h> 23#include <mach/hardware.h>
24#include <asm/arch/aaed2000.h> 24#include <mach/aaed2000.h>
25 25
26#define KB_ROWS 12 26#define KB_ROWS 12
27#define KB_COLS 8 27#define KB_COLS 8
diff --git a/drivers/input/keyboard/corgikbd.c b/drivers/input/keyboard/corgikbd.c
index 1aa46ae12630..134e67bf6a90 100644
--- a/drivers/input/keyboard/corgikbd.c
+++ b/drivers/input/keyboard/corgikbd.c
@@ -20,10 +20,10 @@
20#include <linux/module.h> 20#include <linux/module.h>
21#include <linux/slab.h> 21#include <linux/slab.h>
22 22
23#include <asm/arch/corgi.h> 23#include <mach/corgi.h>
24#include <asm/arch/hardware.h> 24#include <mach/hardware.h>
25#include <asm/arch/pxa-regs.h> 25#include <mach/pxa-regs.h>
26#include <asm/arch/pxa2xx-gpio.h> 26#include <mach/pxa2xx-gpio.h>
27#include <asm/hardware/scoop.h> 27#include <asm/hardware/scoop.h>
28 28
29#define KB_ROWS 8 29#define KB_ROWS 8
diff --git a/drivers/input/keyboard/jornada720_kbd.c b/drivers/input/keyboard/jornada720_kbd.c
index ce650af6d649..4e016d823069 100644
--- a/drivers/input/keyboard/jornada720_kbd.c
+++ b/drivers/input/keyboard/jornada720_kbd.c
@@ -24,8 +24,8 @@
24#include <linux/module.h> 24#include <linux/module.h>
25#include <linux/platform_device.h> 25#include <linux/platform_device.h>
26 26
27#include <asm/arch/jornada720.h> 27#include <mach/jornada720.h>
28#include <asm/hardware.h> 28#include <mach/hardware.h>
29 29
30MODULE_AUTHOR("Kristoffer Ericson <Kristoffer.Ericson@gmail.com>"); 30MODULE_AUTHOR("Kristoffer Ericson <Kristoffer.Ericson@gmail.com>");
31MODULE_DESCRIPTION("HP Jornada 710/720/728 keyboard driver"); 31MODULE_DESCRIPTION("HP Jornada 710/720/728 keyboard driver");
diff --git a/drivers/input/keyboard/omap-keypad.c b/drivers/input/keyboard/omap-keypad.c
index 10afd2068068..dcea87a0bc56 100644
--- a/drivers/input/keyboard/omap-keypad.c
+++ b/drivers/input/keyboard/omap-keypad.c
@@ -34,14 +34,13 @@
34#include <linux/platform_device.h> 34#include <linux/platform_device.h>
35#include <linux/mutex.h> 35#include <linux/mutex.h>
36#include <linux/errno.h> 36#include <linux/errno.h>
37#include <asm/arch/gpio.h> 37#include <mach/gpio.h>
38#include <asm/arch/keypad.h> 38#include <mach/keypad.h>
39#include <asm/arch/menelaus.h> 39#include <mach/menelaus.h>
40#include <asm/irq.h> 40#include <asm/irq.h>
41#include <asm/hardware.h> 41#include <mach/hardware.h>
42#include <asm/io.h> 42#include <asm/io.h>
43#include <asm/mach-types.h> 43#include <mach/mux.h>
44#include <asm/arch/mux.h>
45 44
46#undef NEW_BOARD_LEARNING_MODE 45#undef NEW_BOARD_LEARNING_MODE
47 46
diff --git a/drivers/input/keyboard/pxa27x_keypad.c b/drivers/input/keyboard/pxa27x_keypad.c
index 6f1516f50750..6d30c6d334c3 100644
--- a/drivers/input/keyboard/pxa27x_keypad.c
+++ b/drivers/input/keyboard/pxa27x_keypad.c
@@ -26,12 +26,11 @@
26#include <linux/clk.h> 26#include <linux/clk.h>
27#include <linux/err.h> 27#include <linux/err.h>
28 28
29#include <asm/mach-types.h>
30#include <asm/mach/arch.h> 29#include <asm/mach/arch.h>
31#include <asm/mach/map.h> 30#include <asm/mach/map.h>
32 31
33#include <asm/arch/hardware.h> 32#include <mach/hardware.h>
34#include <asm/arch/pxa27x_keypad.h> 33#include <mach/pxa27x_keypad.h>
35 34
36/* 35/*
37 * Keypad Controller registers 36 * Keypad Controller registers
diff --git a/drivers/input/keyboard/spitzkbd.c b/drivers/input/keyboard/spitzkbd.c
index 1aa37181c40f..de67b8e0a799 100644
--- a/drivers/input/keyboard/spitzkbd.c
+++ b/drivers/input/keyboard/spitzkbd.c
@@ -20,10 +20,10 @@
20#include <linux/module.h> 20#include <linux/module.h>
21#include <linux/slab.h> 21#include <linux/slab.h>
22 22
23#include <asm/arch/spitz.h> 23#include <mach/spitz.h>
24#include <asm/arch/hardware.h> 24#include <mach/hardware.h>
25#include <asm/arch/pxa-regs.h> 25#include <mach/pxa-regs.h>
26#include <asm/arch/pxa2xx-gpio.h> 26#include <mach/pxa2xx-gpio.h>
27 27
28#define KB_ROWS 7 28#define KB_ROWS 7
29#define KB_COLS 11 29#define KB_COLS 11
diff --git a/drivers/input/keyboard/tosakbd.c b/drivers/input/keyboard/tosakbd.c
index b12b7ee4b6aa..44cb50af3ce9 100644
--- a/drivers/input/keyboard/tosakbd.c
+++ b/drivers/input/keyboard/tosakbd.c
@@ -19,8 +19,8 @@
19#include <linux/delay.h> 19#include <linux/delay.h>
20#include <linux/interrupt.h> 20#include <linux/interrupt.h>
21 21
22#include <asm/arch/gpio.h> 22#include <mach/gpio.h>
23#include <asm/arch/tosa.h> 23#include <mach/tosa.h>
24 24
25#define KB_ROWMASK(r) (1 << (r)) 25#define KB_ROWMASK(r) (1 << (r))
26#define SCANCODE(r, c) (((r)<<4) + (c) + 1) 26#define SCANCODE(r, c) (((r)<<4) + (c) + 1)
diff --git a/drivers/input/misc/ixp4xx-beeper.c b/drivers/input/misc/ixp4xx-beeper.c
index 798d84c44d03..9946d73624b9 100644
--- a/drivers/input/misc/ixp4xx-beeper.c
+++ b/drivers/input/misc/ixp4xx-beeper.c
@@ -20,7 +20,7 @@
20#include <linux/delay.h> 20#include <linux/delay.h>
21#include <linux/platform_device.h> 21#include <linux/platform_device.h>
22#include <linux/interrupt.h> 22#include <linux/interrupt.h>
23#include <asm/hardware.h> 23#include <mach/hardware.h>
24 24
25MODULE_AUTHOR("Alessandro Zummo <a.zummo@towertech.it>"); 25MODULE_AUTHOR("Alessandro Zummo <a.zummo@towertech.it>");
26MODULE_DESCRIPTION("ixp4xx beeper driver"); 26MODULE_DESCRIPTION("ixp4xx beeper driver");
diff --git a/drivers/input/mouse/rpcmouse.c b/drivers/input/mouse/rpcmouse.c
index 18a48636ba4a..56c079ef5018 100644
--- a/drivers/input/mouse/rpcmouse.c
+++ b/drivers/input/mouse/rpcmouse.c
@@ -23,7 +23,7 @@
23#include <linux/init.h> 23#include <linux/init.h>
24#include <linux/input.h> 24#include <linux/input.h>
25 25
26#include <asm/hardware.h> 26#include <mach/hardware.h>
27#include <asm/irq.h> 27#include <asm/irq.h>
28#include <asm/io.h> 28#include <asm/io.h>
29#include <asm/hardware/iomd.h> 29#include <asm/hardware/iomd.h>
diff --git a/drivers/input/serio/rpckbd.c b/drivers/input/serio/rpckbd.c
index 1567b7782478..7f36edd34f8b 100644
--- a/drivers/input/serio/rpckbd.c
+++ b/drivers/input/serio/rpckbd.c
@@ -35,7 +35,7 @@
35#include <linux/platform_device.h> 35#include <linux/platform_device.h>
36 36
37#include <asm/irq.h> 37#include <asm/irq.h>
38#include <asm/hardware.h> 38#include <mach/hardware.h>
39#include <asm/io.h> 39#include <asm/io.h>
40#include <asm/hardware/iomd.h> 40#include <asm/hardware/iomd.h>
41#include <asm/system.h> 41#include <asm/system.h>
diff --git a/drivers/input/touchscreen/corgi_ts.c b/drivers/input/touchscreen/corgi_ts.c
index d0e13fc4a88c..65202c9f63ff 100644
--- a/drivers/input/touchscreen/corgi_ts.c
+++ b/drivers/input/touchscreen/corgi_ts.c
@@ -19,10 +19,10 @@
19#include <linux/slab.h> 19#include <linux/slab.h>
20#include <linux/irq.h> 20#include <linux/irq.h>
21 21
22#include <asm/arch/sharpsl.h> 22#include <mach/sharpsl.h>
23#include <asm/arch/hardware.h> 23#include <mach/hardware.h>
24#include <asm/arch/pxa-regs.h> 24#include <mach/pxa-regs.h>
25#include <asm/arch/pxa2xx-gpio.h> 25#include <mach/pxa2xx-gpio.h>
26 26
27 27
28#define PWR_MODE_ACTIVE 0 28#define PWR_MODE_ACTIVE 0
diff --git a/drivers/input/touchscreen/h3600_ts_input.c b/drivers/input/touchscreen/h3600_ts_input.c
index 4f86081dc7fc..4d3139e2099d 100644
--- a/drivers/input/touchscreen/h3600_ts_input.c
+++ b/drivers/input/touchscreen/h3600_ts_input.c
@@ -39,8 +39,8 @@
39#include <linux/delay.h> 39#include <linux/delay.h>
40 40
41/* SA1100 serial defines */ 41/* SA1100 serial defines */
42#include <asm/arch/hardware.h> 42#include <mach/hardware.h>
43#include <asm/arch/irqs.h> 43#include <mach/irqs.h>
44 44
45#define DRIVER_DESC "H3600 touchscreen driver" 45#define DRIVER_DESC "H3600 touchscreen driver"
46 46
diff --git a/drivers/input/touchscreen/jornada720_ts.c b/drivers/input/touchscreen/jornada720_ts.c
index 1aca108b1031..bf44f9d68342 100644
--- a/drivers/input/touchscreen/jornada720_ts.c
+++ b/drivers/input/touchscreen/jornada720_ts.c
@@ -19,8 +19,8 @@
19#include <linux/interrupt.h> 19#include <linux/interrupt.h>
20#include <linux/module.h> 20#include <linux/module.h>
21 21
22#include <asm/hardware.h> 22#include <mach/hardware.h>
23#include <asm/arch/jornada720.h> 23#include <mach/jornada720.h>
24 24
25MODULE_AUTHOR("Kristoffer Ericson <kristoffer.ericson@gmail.com>"); 25MODULE_AUTHOR("Kristoffer Ericson <kristoffer.ericson@gmail.com>");
26MODULE_DESCRIPTION("HP Jornada 710/720/728 touchscreen driver"); 26MODULE_DESCRIPTION("HP Jornada 710/720/728 touchscreen driver");
diff --git a/drivers/input/touchscreen/mainstone-wm97xx.c b/drivers/input/touchscreen/mainstone-wm97xx.c
index 590a1379aa32..283f93a0cee2 100644
--- a/drivers/input/touchscreen/mainstone-wm97xx.c
+++ b/drivers/input/touchscreen/mainstone-wm97xx.c
@@ -33,7 +33,7 @@
33#include <linux/interrupt.h> 33#include <linux/interrupt.h>
34#include <linux/wm97xx.h> 34#include <linux/wm97xx.h>
35#include <linux/io.h> 35#include <linux/io.h>
36#include <asm/arch/pxa-regs.h> 36#include <mach/pxa-regs.h>
37 37
38#define VERSION "0.13" 38#define VERSION "0.13"
39 39
diff --git a/drivers/leds/leds-ams-delta.c b/drivers/leds/leds-ams-delta.c
index c37bb0d5a0c5..32c98b2efa3f 100644
--- a/drivers/leds/leds-ams-delta.c
+++ b/drivers/leds/leds-ams-delta.c
@@ -12,7 +12,7 @@
12#include <linux/init.h> 12#include <linux/init.h>
13#include <linux/platform_device.h> 13#include <linux/platform_device.h>
14#include <linux/leds.h> 14#include <linux/leds.h>
15#include <asm/arch/board-ams-delta.h> 15#include <mach/board-ams-delta.h>
16 16
17/* 17/*
18 * Our context 18 * Our context
diff --git a/drivers/leds/leds-cm-x270.c b/drivers/leds/leds-cm-x270.c
index accc7eddb788..836a43d776e6 100644
--- a/drivers/leds/leds-cm-x270.c
+++ b/drivers/leds/leds-cm-x270.c
@@ -18,8 +18,8 @@
18#include <linux/platform_device.h> 18#include <linux/platform_device.h>
19#include <linux/leds.h> 19#include <linux/leds.h>
20 20
21#include <asm/arch/hardware.h> 21#include <mach/hardware.h>
22#include <asm/arch/pxa-regs.h> 22#include <mach/pxa-regs.h>
23 23
24#define GPIO_RED_LED (93) 24#define GPIO_RED_LED (93)
25#define GPIO_GREEN_LED (94) 25#define GPIO_GREEN_LED (94)
diff --git a/drivers/leds/leds-corgi.c b/drivers/leds/leds-corgi.c
index a709704b9f93..bc2dcd89f635 100644
--- a/drivers/leds/leds-corgi.c
+++ b/drivers/leds/leds-corgi.c
@@ -15,10 +15,9 @@
15#include <linux/init.h> 15#include <linux/init.h>
16#include <linux/platform_device.h> 16#include <linux/platform_device.h>
17#include <linux/leds.h> 17#include <linux/leds.h>
18#include <asm/mach-types.h> 18#include <mach/corgi.h>
19#include <asm/arch/corgi.h> 19#include <mach/hardware.h>
20#include <asm/arch/hardware.h> 20#include <mach/pxa-regs.h>
21#include <asm/arch/pxa-regs.h>
22#include <asm/hardware/scoop.h> 21#include <asm/hardware/scoop.h>
23 22
24static void corgiled_amber_set(struct led_classdev *led_cdev, 23static void corgiled_amber_set(struct led_classdev *led_cdev,
diff --git a/drivers/leds/leds-fsg.c b/drivers/leds/leds-fsg.c
index a7421b8c47d8..be0e12144b8b 100644
--- a/drivers/leds/leds-fsg.c
+++ b/drivers/leds/leds-fsg.c
@@ -19,7 +19,7 @@
19#include <linux/init.h> 19#include <linux/init.h>
20#include <linux/platform_device.h> 20#include <linux/platform_device.h>
21#include <linux/leds.h> 21#include <linux/leds.h>
22#include <asm/arch/hardware.h> 22#include <mach/hardware.h>
23#include <asm/io.h> 23#include <asm/io.h>
24 24
25static short __iomem *latch_address; 25static short __iomem *latch_address;
diff --git a/drivers/leds/leds-h1940.c b/drivers/leds/leds-h1940.c
index 73c705021686..11b77a70bbcb 100644
--- a/drivers/leds/leds-h1940.c
+++ b/drivers/leds/leds-h1940.c
@@ -16,9 +16,9 @@
16#include <linux/string.h> 16#include <linux/string.h>
17#include <linux/ctype.h> 17#include <linux/ctype.h>
18#include <linux/leds.h> 18#include <linux/leds.h>
19#include <asm/arch/regs-gpio.h> 19#include <mach/regs-gpio.h>
20#include <asm/hardware.h> 20#include <mach/hardware.h>
21#include <asm/arch/h1940-latch.h> 21#include <mach/h1940-latch.h>
22 22
23/* 23/*
24 * Green led. 24 * Green led.
diff --git a/drivers/leds/leds-locomo.c b/drivers/leds/leds-locomo.c
index 7295f7f52185..5d91362e3066 100644
--- a/drivers/leds/leds-locomo.c
+++ b/drivers/leds/leds-locomo.c
@@ -13,7 +13,7 @@
13#include <linux/device.h> 13#include <linux/device.h>
14#include <linux/leds.h> 14#include <linux/leds.h>
15 15
16#include <asm/hardware.h> 16#include <mach/hardware.h>
17#include <asm/hardware/locomo.h> 17#include <asm/hardware/locomo.h>
18 18
19static void locomoled_brightness_set(struct led_classdev *led_cdev, 19static void locomoled_brightness_set(struct led_classdev *led_cdev,
diff --git a/drivers/leds/leds-s3c24xx.c b/drivers/leds/leds-s3c24xx.c
index d4f5021dccbf..25a07f2643ad 100644
--- a/drivers/leds/leds-s3c24xx.c
+++ b/drivers/leds/leds-s3c24xx.c
@@ -16,9 +16,9 @@
16#include <linux/platform_device.h> 16#include <linux/platform_device.h>
17#include <linux/leds.h> 17#include <linux/leds.h>
18 18
19#include <asm/hardware.h> 19#include <mach/hardware.h>
20#include <asm/arch/regs-gpio.h> 20#include <mach/regs-gpio.h>
21#include <asm/arch/leds-gpio.h> 21#include <mach/leds-gpio.h>
22 22
23/* our context */ 23/* our context */
24 24
diff --git a/drivers/leds/leds-spitz.c b/drivers/leds/leds-spitz.c
index e75e8543bc5a..178831c64bfb 100644
--- a/drivers/leds/leds-spitz.c
+++ b/drivers/leds/leds-spitz.c
@@ -17,9 +17,9 @@
17#include <linux/leds.h> 17#include <linux/leds.h>
18#include <asm/hardware/scoop.h> 18#include <asm/hardware/scoop.h>
19#include <asm/mach-types.h> 19#include <asm/mach-types.h>
20#include <asm/arch/hardware.h> 20#include <mach/hardware.h>
21#include <asm/arch/pxa-regs.h> 21#include <mach/pxa-regs.h>
22#include <asm/arch/spitz.h> 22#include <mach/spitz.h>
23 23
24static void spitzled_amber_set(struct led_classdev *led_cdev, 24static void spitzled_amber_set(struct led_classdev *led_cdev,
25 enum led_brightness value) 25 enum led_brightness value)
diff --git a/drivers/lguest/page_tables.c b/drivers/lguest/page_tables.c
index d93500f24fbb..81d0c6053447 100644
--- a/drivers/lguest/page_tables.c
+++ b/drivers/lguest/page_tables.c
@@ -108,9 +108,8 @@ static unsigned long gpte_addr(pgd_t gpgd, unsigned long vaddr)
108} 108}
109/*:*/ 109/*:*/
110 110
111/*M:014 get_pfn is slow; it takes the mmap sem and calls get_user_pages. We 111/*M:014 get_pfn is slow: we could probably try to grab batches of pages here as
112 * could probably try to grab batches of pages here as an optimization 112 * an optimization (ie. pre-faulting). :*/
113 * (ie. pre-faulting). :*/
114 113
115/*H:350 This routine takes a page number given by the Guest and converts it to 114/*H:350 This routine takes a page number given by the Guest and converts it to
116 * an actual, physical page number. It can fail for several reasons: the 115 * an actual, physical page number. It can fail for several reasons: the
@@ -123,19 +122,13 @@ static unsigned long gpte_addr(pgd_t gpgd, unsigned long vaddr)
123static unsigned long get_pfn(unsigned long virtpfn, int write) 122static unsigned long get_pfn(unsigned long virtpfn, int write)
124{ 123{
125 struct page *page; 124 struct page *page;
126 /* This value indicates failure. */
127 unsigned long ret = -1UL;
128 125
129 /* get_user_pages() is a complex interface: it gets the "struct 126 /* gup me one page at this address please! */
130 * vm_area_struct" and "struct page" assocated with a range of pages. 127 if (get_user_pages_fast(virtpfn << PAGE_SHIFT, 1, write, &page) == 1)
131 * It also needs the task's mmap_sem held, and is not very quick. 128 return page_to_pfn(page);
132 * It returns the number of pages it got. */ 129
133 down_read(&current->mm->mmap_sem); 130 /* This value indicates failure. */
134 if (get_user_pages(current, current->mm, virtpfn << PAGE_SHIFT, 131 return -1UL;
135 1, write, 1, &page, NULL) == 1)
136 ret = page_to_pfn(page);
137 up_read(&current->mm->mmap_sem);
138 return ret;
139} 132}
140 133
141/*H:340 Converting a Guest page table entry to a shadow (ie. real) page table 134/*H:340 Converting a Guest page table entry to a shadow (ie. real) page table
@@ -174,7 +167,7 @@ static pte_t gpte_to_spte(struct lg_cpu *cpu, pte_t gpte, int write)
174/*H:460 And to complete the chain, release_pte() looks like this: */ 167/*H:460 And to complete the chain, release_pte() looks like this: */
175static void release_pte(pte_t pte) 168static void release_pte(pte_t pte)
176{ 169{
177 /* Remember that get_user_pages() took a reference to the page, in 170 /* Remember that get_user_pages_fast() took a reference to the page, in
178 * get_pfn()? We have to put it back now. */ 171 * get_pfn()? We have to put it back now. */
179 if (pte_flags(pte) & _PAGE_PRESENT) 172 if (pte_flags(pte) & _PAGE_PRESENT)
180 put_page(pfn_to_page(pte_pfn(pte))); 173 put_page(pfn_to_page(pte_pfn(pte)));
diff --git a/drivers/media/video/pxa_camera.c b/drivers/media/video/pxa_camera.c
index ead87ddaf7fb..388cf94055d3 100644
--- a/drivers/media/video/pxa_camera.c
+++ b/drivers/media/video/pxa_camera.c
@@ -36,8 +36,8 @@
36#include <linux/videodev2.h> 36#include <linux/videodev2.h>
37 37
38#include <asm/dma.h> 38#include <asm/dma.h>
39#include <asm/arch/pxa-regs.h> 39#include <mach/pxa-regs.h>
40#include <asm/arch/camera.h> 40#include <mach/camera.h>
41 41
42#define PXA_CAM_VERSION_CODE KERNEL_VERSION(0, 0, 5) 42#define PXA_CAM_VERSION_CODE KERNEL_VERSION(0, 0, 5)
43#define PXA_CAM_DRV_NAME "pxa27x-camera" 43#define PXA_CAM_DRV_NAME "pxa27x-camera"
diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
index 883e7ea31de2..10c44d3fe01a 100644
--- a/drivers/mfd/Kconfig
+++ b/drivers/mfd/Kconfig
@@ -50,10 +50,31 @@ config HTC_PASIC3
50 HTC Magician devices, respectively. Actual functionality is 50 HTC Magician devices, respectively. Actual functionality is
51 handled by the leds-pasic3 and ds1wm drivers. 51 handled by the leds-pasic3 and ds1wm drivers.
52 52
53config MFD_TMIO
54 bool
55 default n
56
57config MFD_T7L66XB
58 bool "Support Toshiba T7L66XB"
59 depends on ARM
60 select MFD_CORE
61 select MFD_TMIO
62 help
63 Support for Toshiba Mobile IO Controller T7L66XB
64
65config MFD_TC6387XB
66 bool "Support Toshiba TC6387XB"
67 depends on ARM
68 select MFD_CORE
69 select MFD_TMIO
70 help
71 Support for Toshiba Mobile IO Controller TC6387XB
72
53config MFD_TC6393XB 73config MFD_TC6393XB
54 bool "Support Toshiba TC6393XB" 74 bool "Support Toshiba TC6393XB"
55 depends on GPIOLIB && ARM 75 depends on GPIOLIB && ARM
56 select MFD_CORE 76 select MFD_CORE
77 select MFD_TMIO
57 help 78 help
58 Support for Toshiba Mobile IO Controller TC6393XB 79 Support for Toshiba Mobile IO Controller TC6393XB
59 80
diff --git a/drivers/mfd/Makefile b/drivers/mfd/Makefile
index 33daa2f45dd8..03ad239ecef0 100644
--- a/drivers/mfd/Makefile
+++ b/drivers/mfd/Makefile
@@ -8,6 +8,8 @@ obj-$(CONFIG_MFD_ASIC3) += asic3.o
8obj-$(CONFIG_HTC_EGPIO) += htc-egpio.o 8obj-$(CONFIG_HTC_EGPIO) += htc-egpio.o
9obj-$(CONFIG_HTC_PASIC3) += htc-pasic3.o 9obj-$(CONFIG_HTC_PASIC3) += htc-pasic3.o
10 10
11obj-$(CONFIG_MFD_T7L66XB) += t7l66xb.o
12obj-$(CONFIG_MFD_TC6387XB) += tc6387xb.o
11obj-$(CONFIG_MFD_TC6393XB) += tc6393xb.o 13obj-$(CONFIG_MFD_TC6393XB) += tc6393xb.o
12 14
13obj-$(CONFIG_MFD_CORE) += mfd-core.o 15obj-$(CONFIG_MFD_CORE) += mfd-core.o
diff --git a/drivers/mfd/mcp-sa11x0.c b/drivers/mfd/mcp-sa11x0.c
index b5272b5ce3fa..28380b20bc70 100644
--- a/drivers/mfd/mcp-sa11x0.c
+++ b/drivers/mfd/mcp-sa11x0.c
@@ -21,12 +21,12 @@
21#include <linux/platform_device.h> 21#include <linux/platform_device.h>
22 22
23#include <asm/dma.h> 23#include <asm/dma.h>
24#include <asm/hardware.h> 24#include <mach/hardware.h>
25#include <asm/mach-types.h> 25#include <asm/mach-types.h>
26#include <asm/system.h> 26#include <asm/system.h>
27#include <asm/arch/mcp.h> 27#include <mach/mcp.h>
28 28
29#include <asm/arch/assabet.h> 29#include <mach/assabet.h>
30 30
31#include "mcp.h" 31#include "mcp.h"
32 32
diff --git a/drivers/mfd/t7l66xb.c b/drivers/mfd/t7l66xb.c
new file mode 100644
index 000000000000..49a0fffc02af
--- /dev/null
+++ b/drivers/mfd/t7l66xb.c
@@ -0,0 +1,419 @@
1/*
2 *
3 * Toshiba T7L66XB core mfd support
4 *
5 * Copyright (c) 2005, 2007, 2008 Ian Molton
6 * Copyright (c) 2008 Dmitry Baryshkov
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 *
12 * T7L66 features:
13 *
14 * Supported in this driver:
15 * SD/MMC
16 * SM/NAND flash controller
17 *
18 * As yet not supported
19 * GPIO interface (on NAND pins)
20 * Serial interface
21 * TFT 'interface converter'
22 * PCMCIA interface logic
23 */
24
25#include <linux/kernel.h>
26#include <linux/module.h>
27#include <linux/io.h>
28#include <linux/irq.h>
29#include <linux/platform_device.h>
30#include <linux/mfd/core.h>
31#include <linux/mfd/tmio.h>
32#include <linux/mfd/t7l66xb.h>
33
34enum {
35 T7L66XB_CELL_NAND,
36 T7L66XB_CELL_MMC,
37};
38
39#define SCR_REVID 0x08 /* b Revision ID */
40#define SCR_IMR 0x42 /* b Interrupt Mask */
41#define SCR_DEV_CTL 0xe0 /* b Device control */
42#define SCR_ISR 0xe1 /* b Interrupt Status */
43#define SCR_GPO_OC 0xf0 /* b GPO output control */
44#define SCR_GPO_OS 0xf1 /* b GPO output enable */
45#define SCR_GPI_S 0xf2 /* w GPI status */
46#define SCR_APDC 0xf8 /* b Active pullup down ctrl */
47
48#define SCR_DEV_CTL_USB BIT(0) /* USB enable */
49#define SCR_DEV_CTL_MMC BIT(1) /* MMC enable */
50
51/*--------------------------------------------------------------------------*/
52
53struct t7l66xb {
54 void __iomem *scr;
55 /* Lock to protect registers requiring read/modify/write ops. */
56 spinlock_t lock;
57
58 struct resource rscr;
59 int irq;
60 int irq_base;
61};
62
63/*--------------------------------------------------------------------------*/
64
65static int t7l66xb_mmc_enable(struct platform_device *mmc)
66{
67 struct platform_device *dev = to_platform_device(mmc->dev.parent);
68 struct t7l66xb_platform_data *pdata = dev->dev.platform_data;
69 struct t7l66xb *t7l66xb = platform_get_drvdata(dev);
70 unsigned long flags;
71 u8 dev_ctl;
72
73 if (pdata->enable_clk32k)
74 pdata->enable_clk32k(dev);
75
76 spin_lock_irqsave(&t7l66xb->lock, flags);
77
78 dev_ctl = tmio_ioread8(t7l66xb->scr + SCR_DEV_CTL);
79 dev_ctl |= SCR_DEV_CTL_MMC;
80 tmio_iowrite8(dev_ctl, t7l66xb->scr + SCR_DEV_CTL);
81
82 spin_unlock_irqrestore(&t7l66xb->lock, flags);
83
84 return 0;
85}
86
87static int t7l66xb_mmc_disable(struct platform_device *mmc)
88{
89 struct platform_device *dev = to_platform_device(mmc->dev.parent);
90 struct t7l66xb_platform_data *pdata = dev->dev.platform_data;
91 struct t7l66xb *t7l66xb = platform_get_drvdata(dev);
92 unsigned long flags;
93 u8 dev_ctl;
94
95 spin_lock_irqsave(&t7l66xb->lock, flags);
96
97 dev_ctl = tmio_ioread8(t7l66xb->scr + SCR_DEV_CTL);
98 dev_ctl &= ~SCR_DEV_CTL_MMC;
99 tmio_iowrite8(dev_ctl, t7l66xb->scr + SCR_DEV_CTL);
100
101 spin_unlock_irqrestore(&t7l66xb->lock, flags);
102
103 if (pdata->disable_clk32k)
104 pdata->disable_clk32k(dev);
105
106 return 0;
107}
108
109/*--------------------------------------------------------------------------*/
110
111const static struct resource t7l66xb_mmc_resources[] = {
112 {
113 .start = 0x800,
114 .end = 0x9ff,
115 .flags = IORESOURCE_MEM,
116 },
117 {
118 .start = 0x200,
119 .end = 0x2ff,
120 .flags = IORESOURCE_MEM,
121 },
122 {
123 .start = IRQ_T7L66XB_MMC,
124 .end = IRQ_T7L66XB_MMC,
125 .flags = IORESOURCE_IRQ,
126 },
127};
128
129const static struct resource t7l66xb_nand_resources[] = {
130 {
131 .start = 0xc00,
132 .end = 0xc07,
133 .flags = IORESOURCE_MEM,
134 },
135 {
136 .start = 0x0100,
137 .end = 0x01ff,
138 .flags = IORESOURCE_MEM,
139 },
140 {
141 .start = IRQ_T7L66XB_NAND,
142 .end = IRQ_T7L66XB_NAND,
143 .flags = IORESOURCE_IRQ,
144 },
145};
146
147static struct mfd_cell t7l66xb_cells[] = {
148 [T7L66XB_CELL_MMC] = {
149 .name = "tmio-mmc",
150 .enable = t7l66xb_mmc_enable,
151 .disable = t7l66xb_mmc_disable,
152 .num_resources = ARRAY_SIZE(t7l66xb_mmc_resources),
153 .resources = t7l66xb_mmc_resources,
154 },
155 [T7L66XB_CELL_NAND] = {
156 .name = "tmio-nand",
157 .num_resources = ARRAY_SIZE(t7l66xb_nand_resources),
158 .resources = t7l66xb_nand_resources,
159 },
160};
161
162/*--------------------------------------------------------------------------*/
163
164/* Handle the T7L66XB interrupt mux */
165static void t7l66xb_irq(unsigned int irq, struct irq_desc *desc)
166{
167 struct t7l66xb *t7l66xb = get_irq_data(irq);
168 unsigned int isr;
169 unsigned int i, irq_base;
170
171 irq_base = t7l66xb->irq_base;
172
173 while ((isr = tmio_ioread8(t7l66xb->scr + SCR_ISR) &
174 ~tmio_ioread8(t7l66xb->scr + SCR_IMR)))
175 for (i = 0; i < T7L66XB_NR_IRQS; i++)
176 if (isr & (1 << i))
177 generic_handle_irq(irq_base + i);
178}
179
180static void t7l66xb_irq_mask(unsigned int irq)
181{
182 struct t7l66xb *t7l66xb = get_irq_chip_data(irq);
183 unsigned long flags;
184 u8 imr;
185
186 spin_lock_irqsave(&t7l66xb->lock, flags);
187 imr = tmio_ioread8(t7l66xb->scr + SCR_IMR);
188 imr |= 1 << (irq - t7l66xb->irq_base);
189 tmio_iowrite8(imr, t7l66xb->scr + SCR_IMR);
190 spin_unlock_irqrestore(&t7l66xb->lock, flags);
191}
192
193static void t7l66xb_irq_unmask(unsigned int irq)
194{
195 struct t7l66xb *t7l66xb = get_irq_chip_data(irq);
196 unsigned long flags;
197 u8 imr;
198
199 spin_lock_irqsave(&t7l66xb->lock, flags);
200 imr = tmio_ioread8(t7l66xb->scr + SCR_IMR);
201 imr &= ~(1 << (irq - t7l66xb->irq_base));
202 tmio_iowrite8(imr, t7l66xb->scr + SCR_IMR);
203 spin_unlock_irqrestore(&t7l66xb->lock, flags);
204}
205
206static struct irq_chip t7l66xb_chip = {
207 .name = "t7l66xb",
208 .ack = t7l66xb_irq_mask,
209 .mask = t7l66xb_irq_mask,
210 .unmask = t7l66xb_irq_unmask,
211};
212
213/*--------------------------------------------------------------------------*/
214
215/* Install the IRQ handler */
216static void t7l66xb_attach_irq(struct platform_device *dev)
217{
218 struct t7l66xb *t7l66xb = platform_get_drvdata(dev);
219 unsigned int irq, irq_base;
220
221 irq_base = t7l66xb->irq_base;
222
223 for (irq = irq_base; irq < irq_base + T7L66XB_NR_IRQS; irq++) {
224 set_irq_chip(irq, &t7l66xb_chip);
225 set_irq_chip_data(irq, t7l66xb);
226 set_irq_handler(irq, handle_level_irq);
227#ifdef CONFIG_ARM
228 set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
229#endif
230 }
231
232 set_irq_type(t7l66xb->irq, IRQ_TYPE_EDGE_FALLING);
233 set_irq_data(t7l66xb->irq, t7l66xb);
234 set_irq_chained_handler(t7l66xb->irq, t7l66xb_irq);
235}
236
237static void t7l66xb_detach_irq(struct platform_device *dev)
238{
239 struct t7l66xb *t7l66xb = platform_get_drvdata(dev);
240 unsigned int irq, irq_base;
241
242 irq_base = t7l66xb->irq_base;
243
244 set_irq_chained_handler(t7l66xb->irq, NULL);
245 set_irq_data(t7l66xb->irq, NULL);
246
247 for (irq = irq_base; irq < irq_base + T7L66XB_NR_IRQS; irq++) {
248#ifdef CONFIG_ARM
249 set_irq_flags(irq, 0);
250#endif
251 set_irq_chip(irq, NULL);
252 set_irq_chip_data(irq, NULL);
253 }
254}
255
256/*--------------------------------------------------------------------------*/
257
258#ifdef CONFIG_PM
259static int t7l66xb_suspend(struct platform_device *dev, pm_message_t state)
260{
261 struct t7l66xb_platform_data *pdata = dev->dev.platform_data;
262
263 if (pdata && pdata->suspend)
264 pdata->suspend(dev);
265
266 return 0;
267}
268
269static int t7l66xb_resume(struct platform_device *dev)
270{
271 struct t7l66xb_platform_data *pdata = dev->dev.platform_data;
272
273 if (pdata && pdata->resume)
274 pdata->resume(dev);
275
276 return 0;
277}
278#else
279#define t7l66xb_suspend NULL
280#define t7l66xb_resume NULL
281#endif
282
283/*--------------------------------------------------------------------------*/
284
285static int t7l66xb_probe(struct platform_device *dev)
286{
287 struct t7l66xb_platform_data *pdata = dev->dev.platform_data;
288 struct t7l66xb *t7l66xb;
289 struct resource *iomem, *rscr;
290 int ret;
291
292 iomem = platform_get_resource(dev, IORESOURCE_MEM, 0);
293 if (!iomem)
294 return -EINVAL;
295
296 t7l66xb = kzalloc(sizeof *t7l66xb, GFP_KERNEL);
297 if (!t7l66xb)
298 return -ENOMEM;
299
300 spin_lock_init(&t7l66xb->lock);
301
302 platform_set_drvdata(dev, t7l66xb);
303
304 ret = platform_get_irq(dev, 0);
305 if (ret >= 0)
306 t7l66xb->irq = ret;
307 else
308 goto err_noirq;
309
310 t7l66xb->irq_base = pdata->irq_base;
311
312 rscr = &t7l66xb->rscr;
313 rscr->name = "t7l66xb-core";
314 rscr->start = iomem->start;
315 rscr->end = iomem->start + 0xff;
316 rscr->flags = IORESOURCE_MEM;
317
318 ret = request_resource(iomem, rscr);
319 if (ret)
320 goto err_request_scr;
321
322 t7l66xb->scr = ioremap(rscr->start, rscr->end - rscr->start + 1);
323 if (!t7l66xb->scr) {
324 ret = -ENOMEM;
325 goto err_ioremap;
326 }
327
328 if (pdata && pdata->enable)
329 pdata->enable(dev);
330
331 /* Mask all interrupts */
332 tmio_iowrite8(0xbf, t7l66xb->scr + SCR_IMR);
333
334 printk(KERN_INFO "%s rev %d @ 0x%08lx, irq %d\n",
335 dev->name, tmio_ioread8(t7l66xb->scr + SCR_REVID),
336 (unsigned long)iomem->start, t7l66xb->irq);
337
338 t7l66xb_attach_irq(dev);
339
340 t7l66xb_cells[T7L66XB_CELL_NAND].driver_data = pdata->nand_data;
341 t7l66xb_cells[T7L66XB_CELL_NAND].platform_data =
342 &t7l66xb_cells[T7L66XB_CELL_NAND];
343 t7l66xb_cells[T7L66XB_CELL_NAND].data_size =
344 sizeof(t7l66xb_cells[T7L66XB_CELL_NAND]);
345
346 t7l66xb_cells[T7L66XB_CELL_MMC].platform_data =
347 &t7l66xb_cells[T7L66XB_CELL_MMC];
348 t7l66xb_cells[T7L66XB_CELL_MMC].data_size =
349 sizeof(t7l66xb_cells[T7L66XB_CELL_MMC]);
350
351 ret = mfd_add_devices(&dev->dev, dev->id,
352 t7l66xb_cells, ARRAY_SIZE(t7l66xb_cells),
353 iomem, t7l66xb->irq_base);
354
355 if (!ret)
356 return 0;
357
358 t7l66xb_detach_irq(dev);
359 iounmap(t7l66xb->scr);
360err_ioremap:
361 release_resource(&t7l66xb->rscr);
362err_noirq:
363err_request_scr:
364 kfree(t7l66xb);
365 return ret;
366}
367
368static int t7l66xb_remove(struct platform_device *dev)
369{
370 struct t7l66xb_platform_data *pdata = dev->dev.platform_data;
371 struct t7l66xb *t7l66xb = platform_get_drvdata(dev);
372 int ret;
373
374 ret = pdata->disable(dev);
375
376 t7l66xb_detach_irq(dev);
377 iounmap(t7l66xb->scr);
378 release_resource(&t7l66xb->rscr);
379 mfd_remove_devices(&dev->dev);
380 platform_set_drvdata(dev, NULL);
381 kfree(t7l66xb);
382
383 return ret;
384
385}
386
387static struct platform_driver t7l66xb_platform_driver = {
388 .driver = {
389 .name = "t7l66xb",
390 .owner = THIS_MODULE,
391 },
392 .suspend = t7l66xb_suspend,
393 .resume = t7l66xb_resume,
394 .probe = t7l66xb_probe,
395 .remove = t7l66xb_remove,
396};
397
398/*--------------------------------------------------------------------------*/
399
400static int __init t7l66xb_init(void)
401{
402 int retval = 0;
403
404 retval = platform_driver_register(&t7l66xb_platform_driver);
405 return retval;
406}
407
408static void __exit t7l66xb_exit(void)
409{
410 platform_driver_unregister(&t7l66xb_platform_driver);
411}
412
413module_init(t7l66xb_init);
414module_exit(t7l66xb_exit);
415
416MODULE_DESCRIPTION("Toshiba T7L66XB core driver");
417MODULE_LICENSE("GPL v2");
418MODULE_AUTHOR("Ian Molton");
419MODULE_ALIAS("platform:t7l66xb");
diff --git a/drivers/mfd/tc6387xb.c b/drivers/mfd/tc6387xb.c
new file mode 100644
index 000000000000..a22b21ac6cf8
--- /dev/null
+++ b/drivers/mfd/tc6387xb.c
@@ -0,0 +1,181 @@
1/*
2 * Toshiba TC6387XB support
3 * Copyright (c) 2005 Ian Molton
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
8 *
9 * This file contains TC6387XB base support.
10 *
11 */
12
13#include <linux/module.h>
14#include <linux/platform_device.h>
15#include <linux/err.h>
16#include <linux/mfd/core.h>
17#include <linux/mfd/tmio.h>
18#include <linux/mfd/tc6387xb.h>
19
20enum {
21 TC6387XB_CELL_MMC,
22};
23
24#ifdef CONFIG_PM
25static int tc6387xb_suspend(struct platform_device *dev, pm_message_t state)
26{
27 struct tc6387xb_platform_data *pdata = platform_get_drvdata(dev);
28
29 if (pdata && pdata->suspend)
30 pdata->suspend(dev);
31
32 return 0;
33}
34
35static int tc6387xb_resume(struct platform_device *dev)
36{
37 struct tc6387xb_platform_data *pdata = platform_get_drvdata(dev);
38
39 if (pdata && pdata->resume)
40 pdata->resume(dev);
41
42 return 0;
43}
44#else
45#define tc6387xb_suspend NULL
46#define tc6387xb_resume NULL
47#endif
48
49/*--------------------------------------------------------------------------*/
50
51static int tc6387xb_mmc_enable(struct platform_device *mmc)
52{
53 struct platform_device *dev = to_platform_device(mmc->dev.parent);
54 struct tc6387xb_platform_data *tc6387xb = dev->dev.platform_data;
55
56 if (tc6387xb->enable_clk32k)
57 tc6387xb->enable_clk32k(dev);
58
59 return 0;
60}
61
62static int tc6387xb_mmc_disable(struct platform_device *mmc)
63{
64 struct platform_device *dev = to_platform_device(mmc->dev.parent);
65 struct tc6387xb_platform_data *tc6387xb = dev->dev.platform_data;
66
67 if (tc6387xb->disable_clk32k)
68 tc6387xb->disable_clk32k(dev);
69
70 return 0;
71}
72
73/*--------------------------------------------------------------------------*/
74
75static struct resource tc6387xb_mmc_resources[] = {
76 {
77 .start = 0x800,
78 .end = 0x9ff,
79 .flags = IORESOURCE_MEM,
80 },
81 {
82 .start = 0x200,
83 .end = 0x2ff,
84 .flags = IORESOURCE_MEM,
85 },
86 {
87 .start = 0,
88 .end = 0,
89 .flags = IORESOURCE_IRQ,
90 },
91};
92
93static struct mfd_cell tc6387xb_cells[] = {
94 [TC6387XB_CELL_MMC] = {
95 .name = "tmio-mmc",
96 .enable = tc6387xb_mmc_enable,
97 .disable = tc6387xb_mmc_disable,
98 .num_resources = ARRAY_SIZE(tc6387xb_mmc_resources),
99 .resources = tc6387xb_mmc_resources,
100 },
101};
102
103static int tc6387xb_probe(struct platform_device *dev)
104{
105 struct tc6387xb_platform_data *data = platform_get_drvdata(dev);
106 struct resource *iomem;
107 int irq, ret;
108
109 iomem = platform_get_resource(dev, IORESOURCE_MEM, 0);
110 if (!iomem) {
111 ret = -EINVAL;
112 goto err_resource;
113 }
114
115 ret = platform_get_irq(dev, 0);
116 if (ret >= 0)
117 irq = ret;
118 else
119 goto err_resource;
120
121 if (data && data->enable)
122 data->enable(dev);
123
124 printk(KERN_INFO "Toshiba tc6387xb initialised\n");
125
126 tc6387xb_cells[TC6387XB_CELL_MMC].platform_data =
127 &tc6387xb_cells[TC6387XB_CELL_MMC];
128 tc6387xb_cells[TC6387XB_CELL_MMC].data_size =
129 sizeof(tc6387xb_cells[TC6387XB_CELL_MMC]);
130
131 ret = mfd_add_devices(&dev->dev, dev->id, tc6387xb_cells,
132 ARRAY_SIZE(tc6387xb_cells), iomem, irq);
133
134 if (!ret)
135 return 0;
136
137err_resource:
138 return ret;
139}
140
141static int tc6387xb_remove(struct platform_device *dev)
142{
143 struct tc6387xb_platform_data *data = platform_get_drvdata(dev);
144
145 if (data && data->disable)
146 data->disable(dev);
147
148 /* FIXME - free the resources! */
149
150 return 0;
151}
152
153
154static struct platform_driver tc6387xb_platform_driver = {
155 .driver = {
156 .name = "tc6387xb",
157 },
158 .probe = tc6387xb_probe,
159 .remove = tc6387xb_remove,
160 .suspend = tc6387xb_suspend,
161 .resume = tc6387xb_resume,
162};
163
164
165static int __init tc6387xb_init(void)
166{
167 return platform_driver_register(&tc6387xb_platform_driver);
168}
169
170static void __exit tc6387xb_exit(void)
171{
172 platform_driver_unregister(&tc6387xb_platform_driver);
173}
174
175module_init(tc6387xb_init);
176module_exit(tc6387xb_exit);
177
178MODULE_DESCRIPTION("Toshiba TC6387XB core driver");
179MODULE_LICENSE("GPL v2");
180MODULE_AUTHOR("Ian Molton");
181MODULE_ALIAS("platform:tc6387xb");
diff --git a/drivers/mfd/tc6393xb.c b/drivers/mfd/tc6393xb.c
index f4fd797c1590..e4c1c788b5f8 100644
--- a/drivers/mfd/tc6393xb.c
+++ b/drivers/mfd/tc6393xb.c
@@ -19,8 +19,8 @@
19#include <linux/io.h> 19#include <linux/io.h>
20#include <linux/irq.h> 20#include <linux/irq.h>
21#include <linux/platform_device.h> 21#include <linux/platform_device.h>
22#include <linux/fb.h>
23#include <linux/clk.h> 22#include <linux/clk.h>
23#include <linux/err.h>
24#include <linux/mfd/core.h> 24#include <linux/mfd/core.h>
25#include <linux/mfd/tmio.h> 25#include <linux/mfd/tmio.h>
26#include <linux/mfd/tc6393xb.h> 26#include <linux/mfd/tc6393xb.h>
@@ -112,6 +112,7 @@ struct tc6393xb {
112 112
113enum { 113enum {
114 TC6393XB_CELL_NAND, 114 TC6393XB_CELL_NAND,
115 TC6393XB_CELL_MMC,
115}; 116};
116 117
117/*--------------------------------------------------------------------------*/ 118/*--------------------------------------------------------------------------*/
@@ -126,7 +127,7 @@ static int tc6393xb_nand_enable(struct platform_device *nand)
126 127
127 /* SMD buffer on */ 128 /* SMD buffer on */
128 dev_dbg(&dev->dev, "SMD buffer on\n"); 129 dev_dbg(&dev->dev, "SMD buffer on\n");
129 iowrite8(0xff, tc6393xb->scr + SCR_GPI_BCR(1)); 130 tmio_iowrite8(0xff, tc6393xb->scr + SCR_GPI_BCR(1));
130 131
131 spin_unlock_irqrestore(&tc6393xb->lock, flags); 132 spin_unlock_irqrestore(&tc6393xb->lock, flags);
132 133
@@ -135,25 +136,40 @@ static int tc6393xb_nand_enable(struct platform_device *nand)
135 136
136static struct resource __devinitdata tc6393xb_nand_resources[] = { 137static struct resource __devinitdata tc6393xb_nand_resources[] = {
137 { 138 {
138 .name = TMIO_NAND_CONFIG, 139 .start = 0x1000,
139 .start = 0x0100, 140 .end = 0x1007,
140 .end = 0x01ff,
141 .flags = IORESOURCE_MEM, 141 .flags = IORESOURCE_MEM,
142 }, 142 },
143 { 143 {
144 .name = TMIO_NAND_CONTROL, 144 .start = 0x0100,
145 .start = 0x1000, 145 .end = 0x01ff,
146 .end = 0x1007,
147 .flags = IORESOURCE_MEM, 146 .flags = IORESOURCE_MEM,
148 }, 147 },
149 { 148 {
150 .name = TMIO_NAND_IRQ,
151 .start = IRQ_TC6393_NAND, 149 .start = IRQ_TC6393_NAND,
152 .end = IRQ_TC6393_NAND, 150 .end = IRQ_TC6393_NAND,
153 .flags = IORESOURCE_IRQ, 151 .flags = IORESOURCE_IRQ,
154 }, 152 },
155}; 153};
156 154
155static struct resource __devinitdata tc6393xb_mmc_resources[] = {
156 {
157 .start = 0x800,
158 .end = 0x9ff,
159 .flags = IORESOURCE_MEM,
160 },
161 {
162 .start = 0x200,
163 .end = 0x2ff,
164 .flags = IORESOURCE_MEM,
165 },
166 {
167 .start = IRQ_TC6393_MMC,
168 .end = IRQ_TC6393_MMC,
169 .flags = IORESOURCE_IRQ,
170 },
171};
172
157static struct mfd_cell __devinitdata tc6393xb_cells[] = { 173static struct mfd_cell __devinitdata tc6393xb_cells[] = {
158 [TC6393XB_CELL_NAND] = { 174 [TC6393XB_CELL_NAND] = {
159 .name = "tmio-nand", 175 .name = "tmio-nand",
@@ -161,6 +177,11 @@ static struct mfd_cell __devinitdata tc6393xb_cells[] = {
161 .num_resources = ARRAY_SIZE(tc6393xb_nand_resources), 177 .num_resources = ARRAY_SIZE(tc6393xb_nand_resources),
162 .resources = tc6393xb_nand_resources, 178 .resources = tc6393xb_nand_resources,
163 }, 179 },
180 [TC6393XB_CELL_MMC] = {
181 .name = "tmio-mmc",
182 .num_resources = ARRAY_SIZE(tc6393xb_mmc_resources),
183 .resources = tc6393xb_mmc_resources,
184 },
164}; 185};
165 186
166/*--------------------------------------------------------------------------*/ 187/*--------------------------------------------------------------------------*/
@@ -171,7 +192,7 @@ static int tc6393xb_gpio_get(struct gpio_chip *chip,
171 struct tc6393xb *tc6393xb = container_of(chip, struct tc6393xb, gpio); 192 struct tc6393xb *tc6393xb = container_of(chip, struct tc6393xb, gpio);
172 193
173 /* XXX: does dsr also represent inputs? */ 194 /* XXX: does dsr also represent inputs? */
174 return ioread8(tc6393xb->scr + SCR_GPO_DSR(offset / 8)) 195 return tmio_ioread8(tc6393xb->scr + SCR_GPO_DSR(offset / 8))
175 & TC_GPIO_BIT(offset); 196 & TC_GPIO_BIT(offset);
176} 197}
177 198
@@ -181,13 +202,13 @@ static void __tc6393xb_gpio_set(struct gpio_chip *chip,
181 struct tc6393xb *tc6393xb = container_of(chip, struct tc6393xb, gpio); 202 struct tc6393xb *tc6393xb = container_of(chip, struct tc6393xb, gpio);
182 u8 dsr; 203 u8 dsr;
183 204
184 dsr = ioread8(tc6393xb->scr + SCR_GPO_DSR(offset / 8)); 205 dsr = tmio_ioread8(tc6393xb->scr + SCR_GPO_DSR(offset / 8));
185 if (value) 206 if (value)
186 dsr |= TC_GPIO_BIT(offset); 207 dsr |= TC_GPIO_BIT(offset);
187 else 208 else
188 dsr &= ~TC_GPIO_BIT(offset); 209 dsr &= ~TC_GPIO_BIT(offset);
189 210
190 iowrite8(dsr, tc6393xb->scr + SCR_GPO_DSR(offset / 8)); 211 tmio_iowrite8(dsr, tc6393xb->scr + SCR_GPO_DSR(offset / 8));
191} 212}
192 213
193static void tc6393xb_gpio_set(struct gpio_chip *chip, 214static void tc6393xb_gpio_set(struct gpio_chip *chip,
@@ -212,9 +233,9 @@ static int tc6393xb_gpio_direction_input(struct gpio_chip *chip,
212 233
213 spin_lock_irqsave(&tc6393xb->lock, flags); 234 spin_lock_irqsave(&tc6393xb->lock, flags);
214 235
215 doecr = ioread8(tc6393xb->scr + SCR_GPO_DOECR(offset / 8)); 236 doecr = tmio_ioread8(tc6393xb->scr + SCR_GPO_DOECR(offset / 8));
216 doecr &= ~TC_GPIO_BIT(offset); 237 doecr &= ~TC_GPIO_BIT(offset);
217 iowrite8(doecr, tc6393xb->scr + SCR_GPO_DOECR(offset / 8)); 238 tmio_iowrite8(doecr, tc6393xb->scr + SCR_GPO_DOECR(offset / 8));
218 239
219 spin_unlock_irqrestore(&tc6393xb->lock, flags); 240 spin_unlock_irqrestore(&tc6393xb->lock, flags);
220 241
@@ -232,9 +253,9 @@ static int tc6393xb_gpio_direction_output(struct gpio_chip *chip,
232 253
233 __tc6393xb_gpio_set(chip, offset, value); 254 __tc6393xb_gpio_set(chip, offset, value);
234 255
235 doecr = ioread8(tc6393xb->scr + SCR_GPO_DOECR(offset / 8)); 256 doecr = tmio_ioread8(tc6393xb->scr + SCR_GPO_DOECR(offset / 8));
236 doecr |= TC_GPIO_BIT(offset); 257 doecr |= TC_GPIO_BIT(offset);
237 iowrite8(doecr, tc6393xb->scr + SCR_GPO_DOECR(offset / 8)); 258 tmio_iowrite8(doecr, tc6393xb->scr + SCR_GPO_DOECR(offset / 8));
238 259
239 spin_unlock_irqrestore(&tc6393xb->lock, flags); 260 spin_unlock_irqrestore(&tc6393xb->lock, flags);
240 261
@@ -265,8 +286,8 @@ tc6393xb_irq(unsigned int irq, struct irq_desc *desc)
265 286
266 irq_base = tc6393xb->irq_base; 287 irq_base = tc6393xb->irq_base;
267 288
268 while ((isr = ioread8(tc6393xb->scr + SCR_ISR) & 289 while ((isr = tmio_ioread8(tc6393xb->scr + SCR_ISR) &
269 ~ioread8(tc6393xb->scr + SCR_IMR))) 290 ~tmio_ioread8(tc6393xb->scr + SCR_IMR)))
270 for (i = 0; i < TC6393XB_NR_IRQS; i++) { 291 for (i = 0; i < TC6393XB_NR_IRQS; i++) {
271 if (isr & (1 << i)) 292 if (isr & (1 << i))
272 generic_handle_irq(irq_base + i); 293 generic_handle_irq(irq_base + i);
@@ -284,9 +305,9 @@ static void tc6393xb_irq_mask(unsigned int irq)
284 u8 imr; 305 u8 imr;
285 306
286 spin_lock_irqsave(&tc6393xb->lock, flags); 307 spin_lock_irqsave(&tc6393xb->lock, flags);
287 imr = ioread8(tc6393xb->scr + SCR_IMR); 308 imr = tmio_ioread8(tc6393xb->scr + SCR_IMR);
288 imr |= 1 << (irq - tc6393xb->irq_base); 309 imr |= 1 << (irq - tc6393xb->irq_base);
289 iowrite8(imr, tc6393xb->scr + SCR_IMR); 310 tmio_iowrite8(imr, tc6393xb->scr + SCR_IMR);
290 spin_unlock_irqrestore(&tc6393xb->lock, flags); 311 spin_unlock_irqrestore(&tc6393xb->lock, flags);
291} 312}
292 313
@@ -297,9 +318,9 @@ static void tc6393xb_irq_unmask(unsigned int irq)
297 u8 imr; 318 u8 imr;
298 319
299 spin_lock_irqsave(&tc6393xb->lock, flags); 320 spin_lock_irqsave(&tc6393xb->lock, flags);
300 imr = ioread8(tc6393xb->scr + SCR_IMR); 321 imr = tmio_ioread8(tc6393xb->scr + SCR_IMR);
301 imr &= ~(1 << (irq - tc6393xb->irq_base)); 322 imr &= ~(1 << (irq - tc6393xb->irq_base));
302 iowrite8(imr, tc6393xb->scr + SCR_IMR); 323 tmio_iowrite8(imr, tc6393xb->scr + SCR_IMR);
303 spin_unlock_irqrestore(&tc6393xb->lock, flags); 324 spin_unlock_irqrestore(&tc6393xb->lock, flags);
304} 325}
305 326
@@ -380,9 +401,8 @@ static int __devinit tc6393xb_probe(struct platform_device *dev)
380{ 401{
381 struct tc6393xb_platform_data *tcpd = dev->dev.platform_data; 402 struct tc6393xb_platform_data *tcpd = dev->dev.platform_data;
382 struct tc6393xb *tc6393xb; 403 struct tc6393xb *tc6393xb;
383 struct resource *iomem; 404 struct resource *iomem, *rscr;
384 struct resource *rscr; 405 int ret, temp;
385 int retval, temp;
386 int i; 406 int i;
387 407
388 iomem = platform_get_resource(dev, IORESOURCE_MEM, 0); 408 iomem = platform_get_resource(dev, IORESOURCE_MEM, 0);
@@ -391,20 +411,26 @@ static int __devinit tc6393xb_probe(struct platform_device *dev)
391 411
392 tc6393xb = kzalloc(sizeof *tc6393xb, GFP_KERNEL); 412 tc6393xb = kzalloc(sizeof *tc6393xb, GFP_KERNEL);
393 if (!tc6393xb) { 413 if (!tc6393xb) {
394 retval = -ENOMEM; 414 ret = -ENOMEM;
395 goto err_kzalloc; 415 goto err_kzalloc;
396 } 416 }
397 417
398 spin_lock_init(&tc6393xb->lock); 418 spin_lock_init(&tc6393xb->lock);
399 419
400 platform_set_drvdata(dev, tc6393xb); 420 platform_set_drvdata(dev, tc6393xb);
421
422 ret = platform_get_irq(dev, 0);
423 if (ret >= 0)
424 tc6393xb->irq = ret;
425 else
426 goto err_noirq;
427
401 tc6393xb->iomem = iomem; 428 tc6393xb->iomem = iomem;
402 tc6393xb->irq = platform_get_irq(dev, 0);
403 tc6393xb->irq_base = tcpd->irq_base; 429 tc6393xb->irq_base = tcpd->irq_base;
404 430
405 tc6393xb->clk = clk_get(&dev->dev, "GPIO27_CLK" /* "CK3P6MI" */); 431 tc6393xb->clk = clk_get(&dev->dev, "CLK_CK3P6MI");
406 if (IS_ERR(tc6393xb->clk)) { 432 if (IS_ERR(tc6393xb->clk)) {
407 retval = PTR_ERR(tc6393xb->clk); 433 ret = PTR_ERR(tc6393xb->clk);
408 goto err_clk_get; 434 goto err_clk_get;
409 } 435 }
410 436
@@ -414,71 +440,73 @@ static int __devinit tc6393xb_probe(struct platform_device *dev)
414 rscr->end = iomem->start + 0xff; 440 rscr->end = iomem->start + 0xff;
415 rscr->flags = IORESOURCE_MEM; 441 rscr->flags = IORESOURCE_MEM;
416 442
417 retval = request_resource(iomem, rscr); 443 ret = request_resource(iomem, rscr);
418 if (retval) 444 if (ret)
419 goto err_request_scr; 445 goto err_request_scr;
420 446
421 tc6393xb->scr = ioremap(rscr->start, rscr->end - rscr->start + 1); 447 tc6393xb->scr = ioremap(rscr->start, rscr->end - rscr->start + 1);
422 if (!tc6393xb->scr) { 448 if (!tc6393xb->scr) {
423 retval = -ENOMEM; 449 ret = -ENOMEM;
424 goto err_ioremap; 450 goto err_ioremap;
425 } 451 }
426 452
427 retval = clk_enable(tc6393xb->clk); 453 ret = clk_enable(tc6393xb->clk);
428 if (retval) 454 if (ret)
429 goto err_clk_enable; 455 goto err_clk_enable;
430 456
431 retval = tcpd->enable(dev); 457 ret = tcpd->enable(dev);
432 if (retval) 458 if (ret)
433 goto err_enable; 459 goto err_enable;
434 460
435 tc6393xb->suspend_state.fer = 0; 461 tc6393xb->suspend_state.fer = 0;
462
436 for (i = 0; i < 3; i++) { 463 for (i = 0; i < 3; i++) {
437 tc6393xb->suspend_state.gpo_dsr[i] = 464 tc6393xb->suspend_state.gpo_dsr[i] =
438 (tcpd->scr_gpo_dsr >> (8 * i)) & 0xff; 465 (tcpd->scr_gpo_dsr >> (8 * i)) & 0xff;
439 tc6393xb->suspend_state.gpo_doecr[i] = 466 tc6393xb->suspend_state.gpo_doecr[i] =
440 (tcpd->scr_gpo_doecr >> (8 * i)) & 0xff; 467 (tcpd->scr_gpo_doecr >> (8 * i)) & 0xff;
441 } 468 }
442 /* 469
443 * It may be necessary to change this back to
444 * platform-dependant code
445 */
446 tc6393xb->suspend_state.ccr = SCR_CCR_UNK1 | 470 tc6393xb->suspend_state.ccr = SCR_CCR_UNK1 |
447 SCR_CCR_HCLK_48; 471 SCR_CCR_HCLK_48;
448 472
449 retval = tc6393xb_hw_init(dev); 473 ret = tc6393xb_hw_init(dev);
450 if (retval) 474 if (ret)
451 goto err_hw_init; 475 goto err_hw_init;
452 476
453 printk(KERN_INFO "Toshiba tc6393xb revision %d at 0x%08lx, irq %d\n", 477 printk(KERN_INFO "Toshiba tc6393xb revision %d at 0x%08lx, irq %d\n",
454 ioread8(tc6393xb->scr + SCR_REVID), 478 tmio_ioread8(tc6393xb->scr + SCR_REVID),
455 (unsigned long) iomem->start, tc6393xb->irq); 479 (unsigned long) iomem->start, tc6393xb->irq);
456 480
457 tc6393xb->gpio.base = -1; 481 tc6393xb->gpio.base = -1;
458 482
459 if (tcpd->gpio_base >= 0) { 483 if (tcpd->gpio_base >= 0) {
460 retval = tc6393xb_register_gpio(tc6393xb, tcpd->gpio_base); 484 ret = tc6393xb_register_gpio(tc6393xb, tcpd->gpio_base);
461 if (retval) 485 if (ret)
462 goto err_gpio_add; 486 goto err_gpio_add;
463 } 487 }
464 488
465 if (tc6393xb->irq) 489 tc6393xb_attach_irq(dev);
466 tc6393xb_attach_irq(dev);
467 490
468 tc6393xb_cells[TC6393XB_CELL_NAND].driver_data = tcpd->nand_data; 491 tc6393xb_cells[TC6393XB_CELL_NAND].driver_data = tcpd->nand_data;
469 tc6393xb_cells[TC6393XB_CELL_NAND].platform_data = 492 tc6393xb_cells[TC6393XB_CELL_NAND].platform_data =
470 &tc6393xb_cells[TC6393XB_CELL_NAND]; 493 &tc6393xb_cells[TC6393XB_CELL_NAND];
471 tc6393xb_cells[TC6393XB_CELL_NAND].data_size = 494 tc6393xb_cells[TC6393XB_CELL_NAND].data_size =
472 sizeof(tc6393xb_cells[TC6393XB_CELL_NAND]); 495 sizeof(tc6393xb_cells[TC6393XB_CELL_NAND]);
496 tc6393xb_cells[TC6393XB_CELL_MMC].platform_data =
497 &tc6393xb_cells[TC6393XB_CELL_MMC];
498 tc6393xb_cells[TC6393XB_CELL_MMC].data_size =
499 sizeof(tc6393xb_cells[TC6393XB_CELL_MMC]);
500
473 501
474 retval = mfd_add_devices(&dev->dev, dev->id, 502 ret = mfd_add_devices(&dev->dev, dev->id,
475 tc6393xb_cells, ARRAY_SIZE(tc6393xb_cells), 503 tc6393xb_cells, ARRAY_SIZE(tc6393xb_cells),
476 iomem, tcpd->irq_base); 504 iomem, tcpd->irq_base);
477 505
478 return 0; 506 if (!ret)
507 return 0;
479 508
480 if (tc6393xb->irq) 509 tc6393xb_detach_irq(dev);
481 tc6393xb_detach_irq(dev);
482 510
483err_gpio_add: 511err_gpio_add:
484 if (tc6393xb->gpio.base != -1) 512 if (tc6393xb->gpio.base != -1)
@@ -493,10 +521,11 @@ err_ioremap:
493 release_resource(&tc6393xb->rscr); 521 release_resource(&tc6393xb->rscr);
494err_request_scr: 522err_request_scr:
495 clk_put(tc6393xb->clk); 523 clk_put(tc6393xb->clk);
524err_noirq:
496err_clk_get: 525err_clk_get:
497 kfree(tc6393xb); 526 kfree(tc6393xb);
498err_kzalloc: 527err_kzalloc:
499 return retval; 528 return ret;
500} 529}
501 530
502static int __devexit tc6393xb_remove(struct platform_device *dev) 531static int __devexit tc6393xb_remove(struct platform_device *dev)
@@ -506,9 +535,7 @@ static int __devexit tc6393xb_remove(struct platform_device *dev)
506 int ret; 535 int ret;
507 536
508 mfd_remove_devices(&dev->dev); 537 mfd_remove_devices(&dev->dev);
509 538 tc6393xb_detach_irq(dev);
510 if (tc6393xb->irq)
511 tc6393xb_detach_irq(dev);
512 539
513 if (tc6393xb->gpio.base != -1) { 540 if (tc6393xb->gpio.base != -1) {
514 ret = gpiochip_remove(&tc6393xb->gpio); 541 ret = gpiochip_remove(&tc6393xb->gpio);
@@ -519,17 +546,11 @@ static int __devexit tc6393xb_remove(struct platform_device *dev)
519 } 546 }
520 547
521 ret = tcpd->disable(dev); 548 ret = tcpd->disable(dev);
522
523 clk_disable(tc6393xb->clk); 549 clk_disable(tc6393xb->clk);
524
525 iounmap(tc6393xb->scr); 550 iounmap(tc6393xb->scr);
526
527 release_resource(&tc6393xb->rscr); 551 release_resource(&tc6393xb->rscr);
528
529 platform_set_drvdata(dev, NULL); 552 platform_set_drvdata(dev, NULL);
530
531 clk_put(tc6393xb->clk); 553 clk_put(tc6393xb->clk);
532
533 kfree(tc6393xb); 554 kfree(tc6393xb);
534 555
535 return ret; 556 return ret;
@@ -540,8 +561,7 @@ static int tc6393xb_suspend(struct platform_device *dev, pm_message_t state)
540{ 561{
541 struct tc6393xb_platform_data *tcpd = dev->dev.platform_data; 562 struct tc6393xb_platform_data *tcpd = dev->dev.platform_data;
542 struct tc6393xb *tc6393xb = platform_get_drvdata(dev); 563 struct tc6393xb *tc6393xb = platform_get_drvdata(dev);
543 int i; 564 int i, ret;
544
545 565
546 tc6393xb->suspend_state.ccr = ioread16(tc6393xb->scr + SCR_CCR); 566 tc6393xb->suspend_state.ccr = ioread16(tc6393xb->scr + SCR_CCR);
547 tc6393xb->suspend_state.fer = ioread8(tc6393xb->scr + SCR_FER); 567 tc6393xb->suspend_state.fer = ioread8(tc6393xb->scr + SCR_FER);
@@ -554,14 +574,21 @@ static int tc6393xb_suspend(struct platform_device *dev, pm_message_t state)
554 tc6393xb->suspend_state.gpi_bcr[i] = 574 tc6393xb->suspend_state.gpi_bcr[i] =
555 ioread8(tc6393xb->scr + SCR_GPI_BCR(i)); 575 ioread8(tc6393xb->scr + SCR_GPI_BCR(i));
556 } 576 }
577 ret = tcpd->suspend(dev);
578 clk_disable(tc6393xb->clk);
557 579
558 return tcpd->suspend(dev); 580 return ret;
559} 581}
560 582
561static int tc6393xb_resume(struct platform_device *dev) 583static int tc6393xb_resume(struct platform_device *dev)
562{ 584{
563 struct tc6393xb_platform_data *tcpd = dev->dev.platform_data; 585 struct tc6393xb_platform_data *tcpd = dev->dev.platform_data;
564 int ret = tcpd->resume(dev); 586 struct tc6393xb *tc6393xb = platform_get_drvdata(dev);
587 int ret;
588
589 clk_enable(tc6393xb->clk);
590
591 ret = tcpd->resume(dev);
565 592
566 if (ret) 593 if (ret)
567 return ret; 594 return ret;
@@ -598,7 +625,7 @@ static void __exit tc6393xb_exit(void)
598subsys_initcall(tc6393xb_init); 625subsys_initcall(tc6393xb_init);
599module_exit(tc6393xb_exit); 626module_exit(tc6393xb_exit);
600 627
601MODULE_LICENSE("GPL"); 628MODULE_LICENSE("GPL v2");
602MODULE_AUTHOR("Ian Molton, Dmitry Baryshkov and Dirk Opfer"); 629MODULE_AUTHOR("Ian Molton, Dmitry Baryshkov and Dirk Opfer");
603MODULE_DESCRIPTION("tc6393xb Toshiba Mobile IO Controller"); 630MODULE_DESCRIPTION("tc6393xb Toshiba Mobile IO Controller");
604MODULE_ALIAS("platform:tc6393xb"); 631MODULE_ALIAS("platform:tc6393xb");
diff --git a/drivers/mfd/ucb1x00-core.c b/drivers/mfd/ucb1x00-core.c
index f6b10dda31fd..a316f1b75933 100644
--- a/drivers/mfd/ucb1x00-core.c
+++ b/drivers/mfd/ucb1x00-core.c
@@ -26,7 +26,7 @@
26#include <linux/mutex.h> 26#include <linux/mutex.h>
27 27
28#include <asm/dma.h> 28#include <asm/dma.h>
29#include <asm/hardware.h> 29#include <mach/hardware.h>
30 30
31#include "ucb1x00.h" 31#include "ucb1x00.h"
32 32
diff --git a/drivers/mfd/ucb1x00-ts.c b/drivers/mfd/ucb1x00-ts.c
index ad34e2d22524..44762ca86a8d 100644
--- a/drivers/mfd/ucb1x00-ts.c
+++ b/drivers/mfd/ucb1x00-ts.c
@@ -32,7 +32,7 @@
32#include <linux/kthread.h> 32#include <linux/kthread.h>
33 33
34#include <asm/dma.h> 34#include <asm/dma.h>
35#include <asm/arch/collie.h> 35#include <mach/collie.h>
36#include <asm/mach-types.h> 36#include <asm/mach-types.h>
37 37
38#include "ucb1x00.h" 38#include "ucb1x00.h"
diff --git a/drivers/misc/sgi-gru/grutables.h b/drivers/misc/sgi-gru/grutables.h
index 4251018f70ff..a78f70deeb59 100644
--- a/drivers/misc/sgi-gru/grutables.h
+++ b/drivers/misc/sgi-gru/grutables.h
@@ -279,7 +279,7 @@ struct gru_stats_s {
279#if defined CONFIG_IA64 279#if defined CONFIG_IA64
280#define VADDR_HI_BIT 64 280#define VADDR_HI_BIT 64
281#define GRUREGION(addr) ((addr) >> (VADDR_HI_BIT - 3) & 3) 281#define GRUREGION(addr) ((addr) >> (VADDR_HI_BIT - 3) & 3)
282#elif defined __x86_64 282#elif defined CONFIG_X86_64
283#define VADDR_HI_BIT 48 283#define VADDR_HI_BIT 48
284#define GRUREGION(addr) (0) /* ZZZ could do better */ 284#define GRUREGION(addr) (0) /* ZZZ could do better */
285#else 285#else
diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig
index dc6f2579f85c..ea8d7a3490d9 100644
--- a/drivers/mmc/host/Kconfig
+++ b/drivers/mmc/host/Kconfig
@@ -174,3 +174,9 @@ config MMC_SDRICOH_CS
174 To compile this driver as a module, choose M here: the 174 To compile this driver as a module, choose M here: the
175 module will be called sdricoh_cs. 175 module will be called sdricoh_cs.
176 176
177config MMC_TMIO
178 tristate "Toshiba Mobile IO Controller (TMIO) MMC/SD function support"
179 depends on MFD_TMIO
180 help
181 This provides support for the SD/MMC cell found in TC6393XB,
182 T7L66XB and also ipaq ASIC3
diff --git a/drivers/mmc/host/Makefile b/drivers/mmc/host/Makefile
index db52eebfb50e..c794cc5ce442 100644
--- a/drivers/mmc/host/Makefile
+++ b/drivers/mmc/host/Makefile
@@ -21,4 +21,5 @@ obj-$(CONFIG_MMC_TIFM_SD) += tifm_sd.o
21obj-$(CONFIG_MMC_SPI) += mmc_spi.o 21obj-$(CONFIG_MMC_SPI) += mmc_spi.o
22obj-$(CONFIG_MMC_S3C) += s3cmci.o 22obj-$(CONFIG_MMC_S3C) += s3cmci.o
23obj-$(CONFIG_MMC_SDRICOH_CS) += sdricoh_cs.o 23obj-$(CONFIG_MMC_SDRICOH_CS) += sdricoh_cs.o
24obj-$(CONFIG_MMC_TMIO) += tmio_mmc.o
24 25
diff --git a/drivers/mmc/host/at91_mci.c b/drivers/mmc/host/at91_mci.c
index f15e2064305c..6915f40ac8ab 100644
--- a/drivers/mmc/host/at91_mci.c
+++ b/drivers/mmc/host/at91_mci.c
@@ -73,9 +73,9 @@
73#include <asm/gpio.h> 73#include <asm/gpio.h>
74 74
75#include <asm/mach/mmc.h> 75#include <asm/mach/mmc.h>
76#include <asm/arch/board.h> 76#include <mach/board.h>
77#include <asm/arch/cpu.h> 77#include <mach/cpu.h>
78#include <asm/arch/at91_mci.h> 78#include <mach/at91_mci.h>
79 79
80#define DRIVER_NAME "at91_mci" 80#define DRIVER_NAME "at91_mci"
81 81
diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c
index 992b4beb757c..0bd06f5bd62f 100644
--- a/drivers/mmc/host/atmel-mci.c
+++ b/drivers/mmc/host/atmel-mci.c
@@ -28,7 +28,7 @@
28#include <asm/io.h> 28#include <asm/io.h>
29#include <asm/unaligned.h> 29#include <asm/unaligned.h>
30 30
31#include <asm/arch/board.h> 31#include <mach/board.h>
32 32
33#include "atmel-mci-regs.h" 33#include "atmel-mci-regs.h"
34 34
diff --git a/drivers/mmc/host/imxmmc.c b/drivers/mmc/host/imxmmc.c
index f61406da65d2..2f0fcdb869b7 100644
--- a/drivers/mmc/host/imxmmc.c
+++ b/drivers/mmc/host/imxmmc.c
@@ -42,8 +42,8 @@
42#include <asm/io.h> 42#include <asm/io.h>
43#include <asm/irq.h> 43#include <asm/irq.h>
44#include <asm/sizes.h> 44#include <asm/sizes.h>
45#include <asm/arch/mmc.h> 45#include <mach/mmc.h>
46#include <asm/arch/imx-dma.h> 46#include <mach/imx-dma.h>
47 47
48#include "imxmmc.h" 48#include "imxmmc.h"
49 49
diff --git a/drivers/mmc/host/omap.c b/drivers/mmc/host/omap.c
index dbc26eb6a89e..c16028872bbb 100644
--- a/drivers/mmc/host/omap.c
+++ b/drivers/mmc/host/omap.c
@@ -29,14 +29,13 @@
29 29
30#include <asm/io.h> 30#include <asm/io.h>
31#include <asm/irq.h> 31#include <asm/irq.h>
32#include <asm/mach-types.h> 32
33 33#include <mach/board.h>
34#include <asm/arch/board.h> 34#include <mach/mmc.h>
35#include <asm/arch/mmc.h> 35#include <mach/gpio.h>
36#include <asm/arch/gpio.h> 36#include <mach/dma.h>
37#include <asm/arch/dma.h> 37#include <mach/mux.h>
38#include <asm/arch/mux.h> 38#include <mach/fpga.h>
39#include <asm/arch/fpga.h>
40 39
41#define OMAP_MMC_REG_CMD 0x00 40#define OMAP_MMC_REG_CMD 0x00
42#define OMAP_MMC_REG_ARGL 0x04 41#define OMAP_MMC_REG_ARGL 0x04
diff --git a/drivers/mmc/host/pxamci.c b/drivers/mmc/host/pxamci.c
index a8e18fe53077..55093ad132ca 100644
--- a/drivers/mmc/host/pxamci.c
+++ b/drivers/mmc/host/pxamci.c
@@ -31,8 +31,8 @@
31#include <asm/io.h> 31#include <asm/io.h>
32#include <asm/sizes.h> 32#include <asm/sizes.h>
33 33
34#include <asm/arch/pxa-regs.h> 34#include <mach/pxa-regs.h>
35#include <asm/arch/mmc.h> 35#include <mach/mmc.h>
36 36
37#include "pxamci.h" 37#include "pxamci.h"
38 38
diff --git a/drivers/mmc/host/s3cmci.c b/drivers/mmc/host/s3cmci.c
index be550c26da68..7c994e1ae276 100644
--- a/drivers/mmc/host/s3cmci.c
+++ b/drivers/mmc/host/s3cmci.c
@@ -18,8 +18,8 @@
18 18
19#include <asm/dma.h> 19#include <asm/dma.h>
20 20
21#include <asm/arch/regs-sdi.h> 21#include <mach/regs-sdi.h>
22#include <asm/arch/regs-gpio.h> 22#include <mach/regs-gpio.h>
23 23
24#include <asm/plat-s3c24xx/mci.h> 24#include <asm/plat-s3c24xx/mci.h>
25 25
diff --git a/drivers/mmc/host/tmio_mmc.c b/drivers/mmc/host/tmio_mmc.c
new file mode 100644
index 000000000000..95430b81ec11
--- /dev/null
+++ b/drivers/mmc/host/tmio_mmc.c
@@ -0,0 +1,691 @@
1/*
2 * linux/drivers/mmc/tmio_mmc.c
3 *
4 * Copyright (C) 2004 Ian Molton
5 * Copyright (C) 2007 Ian Molton
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 *
11 * Driver for the MMC / SD / SDIO cell found in:
12 *
13 * TC6393XB TC6391XB TC6387XB T7L66XB
14 *
15 * This driver draws mainly on scattered spec sheets, Reverse engineering
16 * of the toshiba e800 SD driver and some parts of the 2.4 ASIC3 driver (4 bit
17 * support). (Further 4 bit support from a later datasheet).
18 *
19 * TODO:
20 * Investigate using a workqueue for PIO transfers
21 * Eliminate FIXMEs
22 * SDIO support
23 * Better Power management
24 * Handle MMC errors better
25 * double buffer support
26 *
27 */
28#include <linux/module.h>
29#include <linux/irq.h>
30#include <linux/device.h>
31#include <linux/delay.h>
32#include <linux/mmc/host.h>
33#include <linux/mfd/core.h>
34#include <linux/mfd/tmio.h>
35
36#include "tmio_mmc.h"
37
38/*
39 * Fixme - documentation conflicts on what the clock values are for the
40 * various dividers.
41 * One document I have says that its a divisor of a 24MHz clock, another 33.
42 * This probably depends on HCLK for a given platform, so we may need to
43 * require HCLK be passed to us from the MFD core.
44 *
45 */
46
47static void tmio_mmc_set_clock(struct tmio_mmc_host *host, int new_clock)
48{
49 void __iomem *cnf = host->cnf;
50 void __iomem *ctl = host->ctl;
51 u32 clk = 0, clock;
52
53 if (new_clock) {
54 for (clock = 46875, clk = 0x100; new_clock >= (clock<<1); ) {
55 clock <<= 1;
56 clk >>= 1;
57 }
58 if (clk & 0x1)
59 clk = 0x20000;
60
61 clk >>= 2;
62 tmio_iowrite8((clk & 0x8000) ? 0 : 1, cnf + CNF_SD_CLK_MODE);
63 clk |= 0x100;
64 }
65
66 tmio_iowrite16(clk, ctl + CTL_SD_CARD_CLK_CTL);
67}
68
69static void tmio_mmc_clk_stop(struct tmio_mmc_host *host)
70{
71 void __iomem *ctl = host->ctl;
72
73 tmio_iowrite16(0x0000, ctl + CTL_CLK_AND_WAIT_CTL);
74 msleep(10);
75 tmio_iowrite16(tmio_ioread16(ctl + CTL_SD_CARD_CLK_CTL) & ~0x0100,
76 ctl + CTL_SD_CARD_CLK_CTL);
77 msleep(10);
78}
79
80static void tmio_mmc_clk_start(struct tmio_mmc_host *host)
81{
82 void __iomem *ctl = host->ctl;
83
84 tmio_iowrite16(tmio_ioread16(ctl + CTL_SD_CARD_CLK_CTL) | 0x0100,
85 ctl + CTL_SD_CARD_CLK_CTL);
86 msleep(10);
87 tmio_iowrite16(0x0100, ctl + CTL_CLK_AND_WAIT_CTL);
88 msleep(10);
89}
90
91static void reset(struct tmio_mmc_host *host)
92{
93 void __iomem *ctl = host->ctl;
94
95 /* FIXME - should we set stop clock reg here */
96 tmio_iowrite16(0x0000, ctl + CTL_RESET_SD);
97 tmio_iowrite16(0x0000, ctl + CTL_RESET_SDIO);
98 msleep(10);
99 tmio_iowrite16(0x0001, ctl + CTL_RESET_SD);
100 tmio_iowrite16(0x0001, ctl + CTL_RESET_SDIO);
101 msleep(10);
102}
103
104static void
105tmio_mmc_finish_request(struct tmio_mmc_host *host)
106{
107 struct mmc_request *mrq = host->mrq;
108
109 host->mrq = NULL;
110 host->cmd = NULL;
111 host->data = NULL;
112
113 mmc_request_done(host->mmc, mrq);
114}
115
116/* These are the bitmasks the tmio chip requires to implement the MMC response
117 * types. Note that R1 and R6 are the same in this scheme. */
118#define APP_CMD 0x0040
119#define RESP_NONE 0x0300
120#define RESP_R1 0x0400
121#define RESP_R1B 0x0500
122#define RESP_R2 0x0600
123#define RESP_R3 0x0700
124#define DATA_PRESENT 0x0800
125#define TRANSFER_READ 0x1000
126#define TRANSFER_MULTI 0x2000
127#define SECURITY_CMD 0x4000
128
129static int
130tmio_mmc_start_command(struct tmio_mmc_host *host, struct mmc_command *cmd)
131{
132 void __iomem *ctl = host->ctl;
133 struct mmc_data *data = host->data;
134 int c = cmd->opcode;
135
136 /* Command 12 is handled by hardware */
137 if (cmd->opcode == 12 && !cmd->arg) {
138 tmio_iowrite16(0x001, ctl + CTL_STOP_INTERNAL_ACTION);
139 return 0;
140 }
141
142 switch (mmc_resp_type(cmd)) {
143 case MMC_RSP_NONE: c |= RESP_NONE; break;
144 case MMC_RSP_R1: c |= RESP_R1; break;
145 case MMC_RSP_R1B: c |= RESP_R1B; break;
146 case MMC_RSP_R2: c |= RESP_R2; break;
147 case MMC_RSP_R3: c |= RESP_R3; break;
148 default:
149 pr_debug("Unknown response type %d\n", mmc_resp_type(cmd));
150 return -EINVAL;
151 }
152
153 host->cmd = cmd;
154
155/* FIXME - this seems to be ok comented out but the spec suggest this bit should
156 * be set when issuing app commands.
157 * if(cmd->flags & MMC_FLAG_ACMD)
158 * c |= APP_CMD;
159 */
160 if (data) {
161 c |= DATA_PRESENT;
162 if (data->blocks > 1) {
163 tmio_iowrite16(0x100, ctl + CTL_STOP_INTERNAL_ACTION);
164 c |= TRANSFER_MULTI;
165 }
166 if (data->flags & MMC_DATA_READ)
167 c |= TRANSFER_READ;
168 }
169
170 enable_mmc_irqs(ctl, TMIO_MASK_CMD);
171
172 /* Fire off the command */
173 tmio_iowrite32(cmd->arg, ctl + CTL_ARG_REG);
174 tmio_iowrite16(c, ctl + CTL_SD_CMD);
175
176 return 0;
177}
178
179/* This chip always returns (at least?) as much data as you ask for.
180 * I'm unsure what happens if you ask for less than a block. This should be
181 * looked into to ensure that a funny length read doesnt hose the controller.
182 *
183 */
184static inline void tmio_mmc_pio_irq(struct tmio_mmc_host *host)
185{
186 void __iomem *ctl = host->ctl;
187 struct mmc_data *data = host->data;
188 unsigned short *buf;
189 unsigned int count;
190 unsigned long flags;
191
192 if (!data) {
193 pr_debug("Spurious PIO IRQ\n");
194 return;
195 }
196
197 buf = (unsigned short *)(tmio_mmc_kmap_atomic(host, &flags) +
198 host->sg_off);
199
200 count = host->sg_ptr->length - host->sg_off;
201 if (count > data->blksz)
202 count = data->blksz;
203
204 pr_debug("count: %08x offset: %08x flags %08x\n",
205 count, host->sg_off, data->flags);
206
207 /* Transfer the data */
208 if (data->flags & MMC_DATA_READ)
209 tmio_ioread16_rep(ctl + CTL_SD_DATA_PORT, buf, count >> 1);
210 else
211 tmio_iowrite16_rep(ctl + CTL_SD_DATA_PORT, buf, count >> 1);
212
213 host->sg_off += count;
214
215 tmio_mmc_kunmap_atomic(host, &flags);
216
217 if (host->sg_off == host->sg_ptr->length)
218 tmio_mmc_next_sg(host);
219
220 return;
221}
222
223static inline void tmio_mmc_data_irq(struct tmio_mmc_host *host)
224{
225 void __iomem *ctl = host->ctl;
226 struct mmc_data *data = host->data;
227 struct mmc_command *stop = data->stop;
228
229 host->data = NULL;
230
231 if (!data) {
232 pr_debug("Spurious data end IRQ\n");
233 return;
234 }
235
236 /* FIXME - return correct transfer count on errors */
237 if (!data->error)
238 data->bytes_xfered = data->blocks * data->blksz;
239 else
240 data->bytes_xfered = 0;
241
242 pr_debug("Completed data request\n");
243
244 /*FIXME - other drivers allow an optional stop command of any given type
245 * which we dont do, as the chip can auto generate them.
246 * Perhaps we can be smarter about when to use auto CMD12 and
247 * only issue the auto request when we know this is the desired
248 * stop command, allowing fallback to the stop command the
249 * upper layers expect. For now, we do what works.
250 */
251
252 if (data->flags & MMC_DATA_READ)
253 disable_mmc_irqs(ctl, TMIO_MASK_READOP);
254 else
255 disable_mmc_irqs(ctl, TMIO_MASK_WRITEOP);
256
257 if (stop) {
258 if (stop->opcode == 12 && !stop->arg)
259 tmio_iowrite16(0x000, ctl + CTL_STOP_INTERNAL_ACTION);
260 else
261 BUG();
262 }
263
264 tmio_mmc_finish_request(host);
265}
266
267static inline void tmio_mmc_cmd_irq(struct tmio_mmc_host *host,
268 unsigned int stat)
269{
270 void __iomem *ctl = host->ctl, *addr;
271 struct mmc_command *cmd = host->cmd;
272 int i;
273
274 if (!host->cmd) {
275 pr_debug("Spurious CMD irq\n");
276 return;
277 }
278
279 host->cmd = NULL;
280
281 /* This controller is sicker than the PXA one. Not only do we need to
282 * drop the top 8 bits of the first response word, we also need to
283 * modify the order of the response for short response command types.
284 */
285
286 for (i = 3, addr = ctl + CTL_RESPONSE ; i >= 0 ; i--, addr += 4)
287 cmd->resp[i] = tmio_ioread32(addr);
288
289 if (cmd->flags & MMC_RSP_136) {
290 cmd->resp[0] = (cmd->resp[0] << 8) | (cmd->resp[1] >> 24);
291 cmd->resp[1] = (cmd->resp[1] << 8) | (cmd->resp[2] >> 24);
292 cmd->resp[2] = (cmd->resp[2] << 8) | (cmd->resp[3] >> 24);
293 cmd->resp[3] <<= 8;
294 } else if (cmd->flags & MMC_RSP_R3) {
295 cmd->resp[0] = cmd->resp[3];
296 }
297
298 if (stat & TMIO_STAT_CMDTIMEOUT)
299 cmd->error = -ETIMEDOUT;
300 else if (stat & TMIO_STAT_CRCFAIL && cmd->flags & MMC_RSP_CRC)
301 cmd->error = -EILSEQ;
302
303 /* If there is data to handle we enable data IRQs here, and
304 * we will ultimatley finish the request in the data_end handler.
305 * If theres no data or we encountered an error, finish now.
306 */
307 if (host->data && !cmd->error) {
308 if (host->data->flags & MMC_DATA_READ)
309 enable_mmc_irqs(ctl, TMIO_MASK_READOP);
310 else
311 enable_mmc_irqs(ctl, TMIO_MASK_WRITEOP);
312 } else {
313 tmio_mmc_finish_request(host);
314 }
315
316 return;
317}
318
319
320static irqreturn_t tmio_mmc_irq(int irq, void *devid)
321{
322 struct tmio_mmc_host *host = devid;
323 void __iomem *ctl = host->ctl;
324 unsigned int ireg, irq_mask, status;
325
326 pr_debug("MMC IRQ begin\n");
327
328 status = tmio_ioread32(ctl + CTL_STATUS);
329 irq_mask = tmio_ioread32(ctl + CTL_IRQ_MASK);
330 ireg = status & TMIO_MASK_IRQ & ~irq_mask;
331
332 pr_debug_status(status);
333 pr_debug_status(ireg);
334
335 if (!ireg) {
336 disable_mmc_irqs(ctl, status & ~irq_mask);
337
338 pr_debug("tmio_mmc: Spurious irq, disabling! "
339 "0x%08x 0x%08x 0x%08x\n", status, irq_mask, ireg);
340 pr_debug_status(status);
341
342 goto out;
343 }
344
345 while (ireg) {
346 /* Card insert / remove attempts */
347 if (ireg & (TMIO_STAT_CARD_INSERT | TMIO_STAT_CARD_REMOVE)) {
348 ack_mmc_irqs(ctl, TMIO_STAT_CARD_INSERT |
349 TMIO_STAT_CARD_REMOVE);
350 mmc_detect_change(host->mmc, 0);
351 }
352
353 /* CRC and other errors */
354/* if (ireg & TMIO_STAT_ERR_IRQ)
355 * handled |= tmio_error_irq(host, irq, stat);
356 */
357
358 /* Command completion */
359 if (ireg & TMIO_MASK_CMD) {
360 ack_mmc_irqs(ctl, TMIO_MASK_CMD);
361 tmio_mmc_cmd_irq(host, status);
362 }
363
364 /* Data transfer */
365 if (ireg & (TMIO_STAT_RXRDY | TMIO_STAT_TXRQ)) {
366 ack_mmc_irqs(ctl, TMIO_STAT_RXRDY | TMIO_STAT_TXRQ);
367 tmio_mmc_pio_irq(host);
368 }
369
370 /* Data transfer completion */
371 if (ireg & TMIO_STAT_DATAEND) {
372 ack_mmc_irqs(ctl, TMIO_STAT_DATAEND);
373 tmio_mmc_data_irq(host);
374 }
375
376 /* Check status - keep going until we've handled it all */
377 status = tmio_ioread32(ctl + CTL_STATUS);
378 irq_mask = tmio_ioread32(ctl + CTL_IRQ_MASK);
379 ireg = status & TMIO_MASK_IRQ & ~irq_mask;
380
381 pr_debug("Status at end of loop: %08x\n", status);
382 pr_debug_status(status);
383 }
384 pr_debug("MMC IRQ end\n");
385
386out:
387 return IRQ_HANDLED;
388}
389
390static int tmio_mmc_start_data(struct tmio_mmc_host *host,
391 struct mmc_data *data)
392{
393 void __iomem *ctl = host->ctl;
394
395 pr_debug("setup data transfer: blocksize %08x nr_blocks %d\n",
396 data->blksz, data->blocks);
397
398 /* Hardware cannot perform 1 and 2 byte requests in 4 bit mode */
399 if (data->blksz < 4 && host->mmc->ios.bus_width == MMC_BUS_WIDTH_4) {
400 printk(KERN_ERR "%s: %d byte block unsupported in 4 bit mode\n",
401 mmc_hostname(host->mmc), data->blksz);
402 return -EINVAL;
403 }
404
405 tmio_mmc_init_sg(host, data);
406 host->data = data;
407
408 /* Set transfer length / blocksize */
409 tmio_iowrite16(data->blksz, ctl + CTL_SD_XFER_LEN);
410 tmio_iowrite16(data->blocks, ctl + CTL_XFER_BLK_COUNT);
411
412 return 0;
413}
414
415/* Process requests from the MMC layer */
416static void tmio_mmc_request(struct mmc_host *mmc, struct mmc_request *mrq)
417{
418 struct tmio_mmc_host *host = mmc_priv(mmc);
419 int ret;
420
421 if (host->mrq)
422 pr_debug("request not null\n");
423
424 host->mrq = mrq;
425
426 if (mrq->data) {
427 ret = tmio_mmc_start_data(host, mrq->data);
428 if (ret)
429 goto fail;
430 }
431
432 ret = tmio_mmc_start_command(host, mrq->cmd);
433
434 if (!ret)
435 return;
436
437fail:
438 mrq->cmd->error = ret;
439 mmc_request_done(mmc, mrq);
440}
441
442/* Set MMC clock / power.
443 * Note: This controller uses a simple divider scheme therefore it cannot
444 * run a MMC card at full speed (20MHz). The max clock is 24MHz on SD, but as
445 * MMC wont run that fast, it has to be clocked at 12MHz which is the next
446 * slowest setting.
447 */
448static void tmio_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
449{
450 struct tmio_mmc_host *host = mmc_priv(mmc);
451 void __iomem *cnf = host->cnf;
452 void __iomem *ctl = host->ctl;
453
454 if (ios->clock)
455 tmio_mmc_set_clock(host, ios->clock);
456
457 /* Power sequence - OFF -> ON -> UP */
458 switch (ios->power_mode) {
459 case MMC_POWER_OFF: /* power down SD bus */
460 tmio_iowrite8(0x00, cnf + CNF_PWR_CTL_2);
461 tmio_mmc_clk_stop(host);
462 break;
463 case MMC_POWER_ON: /* power up SD bus */
464
465 tmio_iowrite8(0x02, cnf + CNF_PWR_CTL_2);
466 break;
467 case MMC_POWER_UP: /* start bus clock */
468 tmio_mmc_clk_start(host);
469 break;
470 }
471
472 switch (ios->bus_width) {
473 case MMC_BUS_WIDTH_1:
474 tmio_iowrite16(0x80e0, ctl + CTL_SD_MEM_CARD_OPT);
475 break;
476 case MMC_BUS_WIDTH_4:
477 tmio_iowrite16(0x00e0, ctl + CTL_SD_MEM_CARD_OPT);
478 break;
479 }
480
481 /* Let things settle. delay taken from winCE driver */
482 udelay(140);
483}
484
485static int tmio_mmc_get_ro(struct mmc_host *mmc)
486{
487 struct tmio_mmc_host *host = mmc_priv(mmc);
488 void __iomem *ctl = host->ctl;
489
490 return (tmio_ioread16(ctl + CTL_STATUS) & TMIO_STAT_WRPROTECT) ? 0 : 1;
491}
492
493static struct mmc_host_ops tmio_mmc_ops = {
494 .request = tmio_mmc_request,
495 .set_ios = tmio_mmc_set_ios,
496 .get_ro = tmio_mmc_get_ro,
497};
498
499#ifdef CONFIG_PM
500static int tmio_mmc_suspend(struct platform_device *dev, pm_message_t state)
501{
502 struct mfd_cell *cell = (struct mfd_cell *)dev->dev.platform_data;
503 struct mmc_host *mmc = platform_get_drvdata(dev);
504 int ret;
505
506 ret = mmc_suspend_host(mmc, state);
507
508 /* Tell MFD core it can disable us now.*/
509 if (!ret && cell->disable)
510 cell->disable(dev);
511
512 return ret;
513}
514
515static int tmio_mmc_resume(struct platform_device *dev)
516{
517 struct mfd_cell *cell = (struct mfd_cell *)dev->dev.platform_data;
518 struct mmc_host *mmc = platform_get_drvdata(dev);
519 struct tmio_mmc_host *host = mmc_priv(mmc);
520 void __iomem *cnf = host->cnf;
521 int ret = 0;
522
523 /* Enable the MMC/SD Control registers */
524 tmio_iowrite16(SDCREN, cnf + CNF_CMD);
525 tmio_iowrite32(dev->resource[0].start & 0xfffe, cnf + CNF_CTL_BASE);
526
527 /* Tell the MFD core we are ready to be enabled */
528 if (cell->enable) {
529 ret = cell->enable(dev);
530 if (ret)
531 goto out;
532 }
533
534 mmc_resume_host(mmc);
535
536out:
537 return ret;
538}
539#else
540#define tmio_mmc_suspend NULL
541#define tmio_mmc_resume NULL
542#endif
543
544static int __devinit tmio_mmc_probe(struct platform_device *dev)
545{
546 struct mfd_cell *cell = (struct mfd_cell *)dev->dev.platform_data;
547 struct resource *res_ctl, *res_cnf;
548 struct tmio_mmc_host *host;
549 struct mmc_host *mmc;
550 int ret = -ENOMEM;
551
552 if (dev->num_resources != 3)
553 goto out;
554
555 res_ctl = platform_get_resource(dev, IORESOURCE_MEM, 0);
556 res_cnf = platform_get_resource(dev, IORESOURCE_MEM, 1);
557 if (!res_ctl || !res_cnf) {
558 ret = -EINVAL;
559 goto out;
560 }
561
562 mmc = mmc_alloc_host(sizeof(struct tmio_mmc_host), &dev->dev);
563 if (!mmc)
564 goto out;
565
566 host = mmc_priv(mmc);
567 host->mmc = mmc;
568 platform_set_drvdata(dev, mmc);
569
570 host->ctl = ioremap(res_ctl->start, res_ctl->end - res_ctl->start);
571 if (!host->ctl)
572 goto host_free;
573
574 host->cnf = ioremap(res_cnf->start, res_cnf->end - res_cnf->start);
575 if (!host->cnf)
576 goto unmap_ctl;
577
578 mmc->ops = &tmio_mmc_ops;
579 mmc->caps = MMC_CAP_4_BIT_DATA;
580 mmc->f_min = 46875; /* 24000000 / 512 */
581 mmc->f_max = 24000000;
582 mmc->ocr_avail = MMC_VDD_32_33 | MMC_VDD_33_34;
583
584 /* Enable the MMC/SD Control registers */
585 tmio_iowrite16(SDCREN, host->cnf + CNF_CMD);
586 tmio_iowrite32(dev->resource[0].start & 0xfffe,
587 host->cnf + CNF_CTL_BASE);
588
589 /* Tell the MFD core we are ready to be enabled */
590 if (cell->enable) {
591 ret = cell->enable(dev);
592 if (ret)
593 goto unmap_cnf;
594 }
595
596 /* Disable SD power during suspend */
597 tmio_iowrite8(0x01, host->cnf + CNF_PWR_CTL_3);
598
599 /* The below is required but why? FIXME */
600 tmio_iowrite8(0x1f, host->cnf + CNF_STOP_CLK_CTL);
601
602 /* Power down SD bus*/
603 tmio_iowrite8(0x0, host->cnf + CNF_PWR_CTL_2);
604
605 tmio_mmc_clk_stop(host);
606 reset(host);
607
608 ret = platform_get_irq(dev, 0);
609 if (ret >= 0)
610 host->irq = ret;
611 else
612 goto unmap_cnf;
613
614 disable_mmc_irqs(host->ctl, TMIO_MASK_ALL);
615
616 ret = request_irq(host->irq, tmio_mmc_irq, IRQF_DISABLED, "tmio-mmc",
617 host);
618 if (ret)
619 goto unmap_cnf;
620
621 set_irq_type(host->irq, IRQ_TYPE_EDGE_FALLING);
622
623 mmc_add_host(mmc);
624
625 printk(KERN_INFO "%s at 0x%08lx irq %d\n", mmc_hostname(host->mmc),
626 (unsigned long)host->ctl, host->irq);
627
628 /* Unmask the IRQs we want to know about */
629 enable_mmc_irqs(host->ctl, TMIO_MASK_IRQ);
630
631 return 0;
632
633unmap_cnf:
634 iounmap(host->cnf);
635unmap_ctl:
636 iounmap(host->ctl);
637host_free:
638 mmc_free_host(mmc);
639out:
640 return ret;
641}
642
643static int __devexit tmio_mmc_remove(struct platform_device *dev)
644{
645 struct mmc_host *mmc = platform_get_drvdata(dev);
646
647 platform_set_drvdata(dev, NULL);
648
649 if (mmc) {
650 struct tmio_mmc_host *host = mmc_priv(mmc);
651 mmc_remove_host(mmc);
652 mmc_free_host(mmc);
653 free_irq(host->irq, host);
654 iounmap(host->ctl);
655 iounmap(host->cnf);
656 }
657
658 return 0;
659}
660
661/* ------------------- device registration ----------------------- */
662
663static struct platform_driver tmio_mmc_driver = {
664 .driver = {
665 .name = "tmio-mmc",
666 .owner = THIS_MODULE,
667 },
668 .probe = tmio_mmc_probe,
669 .remove = __devexit_p(tmio_mmc_remove),
670 .suspend = tmio_mmc_suspend,
671 .resume = tmio_mmc_resume,
672};
673
674
675static int __init tmio_mmc_init(void)
676{
677 return platform_driver_register(&tmio_mmc_driver);
678}
679
680static void __exit tmio_mmc_exit(void)
681{
682 platform_driver_unregister(&tmio_mmc_driver);
683}
684
685module_init(tmio_mmc_init);
686module_exit(tmio_mmc_exit);
687
688MODULE_DESCRIPTION("Toshiba TMIO SD/MMC driver");
689MODULE_AUTHOR("Ian Molton <spyro@f2s.com>");
690MODULE_LICENSE("GPL v2");
691MODULE_ALIAS("platform:tmio-mmc");
diff --git a/drivers/mmc/host/tmio_mmc.h b/drivers/mmc/host/tmio_mmc.h
new file mode 100644
index 000000000000..9e647a06054f
--- /dev/null
+++ b/drivers/mmc/host/tmio_mmc.h
@@ -0,0 +1,194 @@
1/* Definitons for use with the tmio_mmc.c
2 *
3 * (c) 2004 Ian Molton <spyro@f2s.com>
4 * (c) 2007 Ian Molton <spyro@f2s.com>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 */
11#define CNF_CMD 0x04
12#define CNF_CTL_BASE 0x10
13#define CNF_INT_PIN 0x3d
14#define CNF_STOP_CLK_CTL 0x40
15#define CNF_GCLK_CTL 0x41
16#define CNF_SD_CLK_MODE 0x42
17#define CNF_PIN_STATUS 0x44
18#define CNF_PWR_CTL_1 0x48
19#define CNF_PWR_CTL_2 0x49
20#define CNF_PWR_CTL_3 0x4a
21#define CNF_CARD_DETECT_MODE 0x4c
22#define CNF_SD_SLOT 0x50
23#define CNF_EXT_GCLK_CTL_1 0xf0
24#define CNF_EXT_GCLK_CTL_2 0xf1
25#define CNF_EXT_GCLK_CTL_3 0xf9
26#define CNF_SD_LED_EN_1 0xfa
27#define CNF_SD_LED_EN_2 0xfe
28
29#define SDCREN 0x2 /* Enable access to MMC CTL regs. (flag in COMMAND_REG)*/
30
31#define CTL_SD_CMD 0x00
32#define CTL_ARG_REG 0x04
33#define CTL_STOP_INTERNAL_ACTION 0x08
34#define CTL_XFER_BLK_COUNT 0xa
35#define CTL_RESPONSE 0x0c
36#define CTL_STATUS 0x1c
37#define CTL_IRQ_MASK 0x20
38#define CTL_SD_CARD_CLK_CTL 0x24
39#define CTL_SD_XFER_LEN 0x26
40#define CTL_SD_MEM_CARD_OPT 0x28
41#define CTL_SD_ERROR_DETAIL_STATUS 0x2c
42#define CTL_SD_DATA_PORT 0x30
43#define CTL_TRANSACTION_CTL 0x34
44#define CTL_RESET_SD 0xe0
45#define CTL_SDIO_REGS 0x100
46#define CTL_CLK_AND_WAIT_CTL 0x138
47#define CTL_RESET_SDIO 0x1e0
48
49/* Definitions for values the CTRL_STATUS register can take. */
50#define TMIO_STAT_CMDRESPEND 0x00000001
51#define TMIO_STAT_DATAEND 0x00000004
52#define TMIO_STAT_CARD_REMOVE 0x00000008
53#define TMIO_STAT_CARD_INSERT 0x00000010
54#define TMIO_STAT_SIGSTATE 0x00000020
55#define TMIO_STAT_WRPROTECT 0x00000080
56#define TMIO_STAT_CARD_REMOVE_A 0x00000100
57#define TMIO_STAT_CARD_INSERT_A 0x00000200
58#define TMIO_STAT_SIGSTATE_A 0x00000400
59#define TMIO_STAT_CMD_IDX_ERR 0x00010000
60#define TMIO_STAT_CRCFAIL 0x00020000
61#define TMIO_STAT_STOPBIT_ERR 0x00040000
62#define TMIO_STAT_DATATIMEOUT 0x00080000
63#define TMIO_STAT_RXOVERFLOW 0x00100000
64#define TMIO_STAT_TXUNDERRUN 0x00200000
65#define TMIO_STAT_CMDTIMEOUT 0x00400000
66#define TMIO_STAT_RXRDY 0x01000000
67#define TMIO_STAT_TXRQ 0x02000000
68#define TMIO_STAT_ILL_FUNC 0x20000000
69#define TMIO_STAT_CMD_BUSY 0x40000000
70#define TMIO_STAT_ILL_ACCESS 0x80000000
71
72/* Define some IRQ masks */
73/* This is the mask used at reset by the chip */
74#define TMIO_MASK_ALL 0x837f031d
75#define TMIO_MASK_READOP (TMIO_STAT_RXRDY | TMIO_STAT_DATAEND | \
76 TMIO_STAT_CARD_REMOVE | TMIO_STAT_CARD_INSERT)
77#define TMIO_MASK_WRITEOP (TMIO_STAT_TXRQ | TMIO_STAT_DATAEND | \
78 TMIO_STAT_CARD_REMOVE | TMIO_STAT_CARD_INSERT)
79#define TMIO_MASK_CMD (TMIO_STAT_CMDRESPEND | TMIO_STAT_CMDTIMEOUT | \
80 TMIO_STAT_CARD_REMOVE | TMIO_STAT_CARD_INSERT)
81#define TMIO_MASK_IRQ (TMIO_MASK_READOP | TMIO_MASK_WRITEOP | TMIO_MASK_CMD)
82
83#define enable_mmc_irqs(ctl, i) \
84 do { \
85 u32 mask;\
86 mask = tmio_ioread32((ctl) + CTL_IRQ_MASK); \
87 mask &= ~((i) & TMIO_MASK_IRQ); \
88 tmio_iowrite32(mask, (ctl) + CTL_IRQ_MASK); \
89 } while (0)
90
91#define disable_mmc_irqs(ctl, i) \
92 do { \
93 u32 mask;\
94 mask = tmio_ioread32((ctl) + CTL_IRQ_MASK); \
95 mask |= ((i) & TMIO_MASK_IRQ); \
96 tmio_iowrite32(mask, (ctl) + CTL_IRQ_MASK); \
97 } while (0)
98
99#define ack_mmc_irqs(ctl, i) \
100 do { \
101 u32 mask;\
102 mask = tmio_ioread32((ctl) + CTL_STATUS); \
103 mask &= ~((i) & TMIO_MASK_IRQ); \
104 tmio_iowrite32(mask, (ctl) + CTL_STATUS); \
105 } while (0)
106
107
108struct tmio_mmc_host {
109 void __iomem *cnf;
110 void __iomem *ctl;
111 struct mmc_command *cmd;
112 struct mmc_request *mrq;
113 struct mmc_data *data;
114 struct mmc_host *mmc;
115 int irq;
116
117 /* pio related stuff */
118 struct scatterlist *sg_ptr;
119 unsigned int sg_len;
120 unsigned int sg_off;
121};
122
123#include <linux/scatterlist.h>
124#include <linux/blkdev.h>
125
126static inline void tmio_mmc_init_sg(struct tmio_mmc_host *host,
127 struct mmc_data *data)
128{
129 host->sg_len = data->sg_len;
130 host->sg_ptr = data->sg;
131 host->sg_off = 0;
132}
133
134static inline int tmio_mmc_next_sg(struct tmio_mmc_host *host)
135{
136 host->sg_ptr = sg_next(host->sg_ptr);
137 host->sg_off = 0;
138 return --host->sg_len;
139}
140
141static inline char *tmio_mmc_kmap_atomic(struct tmio_mmc_host *host,
142 unsigned long *flags)
143{
144 struct scatterlist *sg = host->sg_ptr;
145
146 local_irq_save(*flags);
147 return kmap_atomic(sg_page(sg), KM_BIO_SRC_IRQ) + sg->offset;
148}
149
150static inline void tmio_mmc_kunmap_atomic(struct tmio_mmc_host *host,
151 unsigned long *flags)
152{
153 kunmap_atomic(sg_page(host->sg_ptr), KM_BIO_SRC_IRQ);
154 local_irq_restore(*flags);
155}
156
157#ifdef CONFIG_MMC_DEBUG
158
159#define STATUS_TO_TEXT(a) \
160 do { \
161 if (status & TMIO_STAT_##a) \
162 printf(#a); \
163 } while (0)
164
165void debug_status(u32 status)
166{
167 printk(KERN_DEBUG "status: %08x = ", status);
168 STATUS_TO_TEXT(CARD_REMOVE);
169 STATUS_TO_TEXT(CARD_INSERT);
170 STATUS_TO_TEXT(SIGSTATE);
171 STATUS_TO_TEXT(WRPROTECT);
172 STATUS_TO_TEXT(CARD_REMOVE_A);
173 STATUS_TO_TEXT(CARD_INSERT_A);
174 STATUS_TO_TEXT(SIGSTATE_A);
175 STATUS_TO_TEXT(CMD_IDX_ERR);
176 STATUS_TO_TEXT(STOPBIT_ERR);
177 STATUS_TO_TEXT(ILL_FUNC);
178 STATUS_TO_TEXT(CMD_BUSY);
179 STATUS_TO_TEXT(CMDRESPEND);
180 STATUS_TO_TEXT(DATAEND);
181 STATUS_TO_TEXT(CRCFAIL);
182 STATUS_TO_TEXT(DATATIMEOUT);
183 STATUS_TO_TEXT(CMDTIMEOUT);
184 STATUS_TO_TEXT(RXOVERFLOW);
185 STATUS_TO_TEXT(TXUNDERRUN);
186 STATUS_TO_TEXT(RXRDY);
187 STATUS_TO_TEXT(TXRQ);
188 STATUS_TO_TEXT(ILL_ACCESS);
189 printk("\n");
190}
191
192#else
193#define pr_debug_status(s) do { } while (0)
194#endif
diff --git a/drivers/mtd/maps/autcpu12-nvram.c b/drivers/mtd/maps/autcpu12-nvram.c
index cf32267263df..53664188fc47 100644
--- a/drivers/mtd/maps/autcpu12-nvram.c
+++ b/drivers/mtd/maps/autcpu12-nvram.c
@@ -25,8 +25,8 @@
25#include <linux/init.h> 25#include <linux/init.h>
26#include <asm/io.h> 26#include <asm/io.h>
27#include <asm/sizes.h> 27#include <asm/sizes.h>
28#include <asm/hardware.h> 28#include <mach/hardware.h>
29#include <asm/arch/autcpu12.h> 29#include <mach/autcpu12.h>
30#include <linux/mtd/mtd.h> 30#include <linux/mtd/mtd.h>
31#include <linux/mtd/map.h> 31#include <linux/mtd/map.h>
32#include <linux/mtd/partitions.h> 32#include <linux/mtd/partitions.h>
diff --git a/drivers/mtd/maps/cdb89712.c b/drivers/mtd/maps/cdb89712.c
index cb507da0a87d..e5059aa3c724 100644
--- a/drivers/mtd/maps/cdb89712.c
+++ b/drivers/mtd/maps/cdb89712.c
@@ -9,7 +9,7 @@
9#include <linux/ioport.h> 9#include <linux/ioport.h>
10#include <linux/init.h> 10#include <linux/init.h>
11#include <asm/io.h> 11#include <asm/io.h>
12#include <asm/arch/hardware.h> 12#include <mach/hardware.h>
13#include <linux/mtd/mtd.h> 13#include <linux/mtd/mtd.h>
14#include <linux/mtd/map.h> 14#include <linux/mtd/map.h>
15#include <linux/mtd/partitions.h> 15#include <linux/mtd/partitions.h>
diff --git a/drivers/mtd/maps/ceiva.c b/drivers/mtd/maps/ceiva.c
index 6464d487eb1a..60e68bde0fea 100644
--- a/drivers/mtd/maps/ceiva.c
+++ b/drivers/mtd/maps/ceiva.c
@@ -25,7 +25,7 @@
25#include <linux/mtd/partitions.h> 25#include <linux/mtd/partitions.h>
26#include <linux/mtd/concat.h> 26#include <linux/mtd/concat.h>
27 27
28#include <asm/hardware.h> 28#include <mach/hardware.h>
29#include <asm/mach-types.h> 29#include <asm/mach-types.h>
30#include <asm/io.h> 30#include <asm/io.h>
31#include <asm/sizes.h> 31#include <asm/sizes.h>
diff --git a/drivers/mtd/maps/h720x-flash.c b/drivers/mtd/maps/h720x-flash.c
index ef8915474462..35fef655ccc4 100644
--- a/drivers/mtd/maps/h720x-flash.c
+++ b/drivers/mtd/maps/h720x-flash.c
@@ -16,7 +16,7 @@
16#include <linux/mtd/mtd.h> 16#include <linux/mtd/mtd.h>
17#include <linux/mtd/map.h> 17#include <linux/mtd/map.h>
18#include <linux/mtd/partitions.h> 18#include <linux/mtd/partitions.h>
19#include <asm/hardware.h> 19#include <mach/hardware.h>
20#include <asm/io.h> 20#include <asm/io.h>
21 21
22static struct mtd_info *mymtd; 22static struct mtd_info *mymtd;
diff --git a/drivers/mtd/maps/integrator-flash.c b/drivers/mtd/maps/integrator-flash.c
index ee361aaadb1e..7100ee3c7b01 100644
--- a/drivers/mtd/maps/integrator-flash.c
+++ b/drivers/mtd/maps/integrator-flash.c
@@ -37,7 +37,7 @@
37#include <linux/mtd/partitions.h> 37#include <linux/mtd/partitions.h>
38 38
39#include <asm/mach/flash.h> 39#include <asm/mach/flash.h>
40#include <asm/hardware.h> 40#include <mach/hardware.h>
41#include <asm/io.h> 41#include <asm/io.h>
42#include <asm/system.h> 42#include <asm/system.h>
43 43
diff --git a/drivers/mtd/maps/ipaq-flash.c b/drivers/mtd/maps/ipaq-flash.c
index 113b1062020d..ed58f6a77bd9 100644
--- a/drivers/mtd/maps/ipaq-flash.c
+++ b/drivers/mtd/maps/ipaq-flash.c
@@ -24,8 +24,8 @@
24#include <linux/mtd/concat.h> 24#include <linux/mtd/concat.h>
25#endif 25#endif
26 26
27#include <asm/hardware.h> 27#include <mach/hardware.h>
28#include <asm/arch/h3600.h> 28#include <mach/h3600.h>
29#include <asm/io.h> 29#include <asm/io.h>
30 30
31 31
diff --git a/drivers/mtd/maps/ixp2000.c b/drivers/mtd/maps/ixp2000.c
index c2264792a20b..dcdb1f17577d 100644
--- a/drivers/mtd/maps/ixp2000.c
+++ b/drivers/mtd/maps/ixp2000.c
@@ -30,7 +30,7 @@
30#include <linux/mtd/partitions.h> 30#include <linux/mtd/partitions.h>
31 31
32#include <asm/io.h> 32#include <asm/io.h>
33#include <asm/hardware.h> 33#include <mach/hardware.h>
34#include <asm/mach/flash.h> 34#include <asm/mach/flash.h>
35 35
36#include <linux/reboot.h> 36#include <linux/reboot.h>
diff --git a/drivers/mtd/maps/omap_nor.c b/drivers/mtd/maps/omap_nor.c
index 68eec6c6c517..05f276af15da 100644
--- a/drivers/mtd/maps/omap_nor.c
+++ b/drivers/mtd/maps/omap_nor.c
@@ -43,9 +43,9 @@
43#include <linux/mtd/partitions.h> 43#include <linux/mtd/partitions.h>
44 44
45#include <asm/io.h> 45#include <asm/io.h>
46#include <asm/hardware.h> 46#include <mach/hardware.h>
47#include <asm/mach/flash.h> 47#include <asm/mach/flash.h>
48#include <asm/arch/tc.h> 48#include <mach/tc.h>
49 49
50#ifdef CONFIG_MTD_PARTITIONS 50#ifdef CONFIG_MTD_PARTITIONS
51static const char *part_probes[] = { /* "RedBoot", */ "cmdlinepart", NULL }; 51static const char *part_probes[] = { /* "RedBoot", */ "cmdlinepart", NULL };
diff --git a/drivers/mtd/maps/pxa2xx-flash.c b/drivers/mtd/maps/pxa2xx-flash.c
index 82113295c266..771139c5bf87 100644
--- a/drivers/mtd/maps/pxa2xx-flash.c
+++ b/drivers/mtd/maps/pxa2xx-flash.c
@@ -19,7 +19,7 @@
19#include <linux/mtd/partitions.h> 19#include <linux/mtd/partitions.h>
20 20
21#include <asm/io.h> 21#include <asm/io.h>
22#include <asm/hardware.h> 22#include <mach/hardware.h>
23#include <asm/cacheflush.h> 23#include <asm/cacheflush.h>
24 24
25#include <asm/mach/flash.h> 25#include <asm/mach/flash.h>
diff --git a/drivers/mtd/maps/sa1100-flash.c b/drivers/mtd/maps/sa1100-flash.c
index e177a43dfff0..7df6bbf0e4d9 100644
--- a/drivers/mtd/maps/sa1100-flash.c
+++ b/drivers/mtd/maps/sa1100-flash.c
@@ -18,7 +18,7 @@
18#include <linux/mtd/partitions.h> 18#include <linux/mtd/partitions.h>
19#include <linux/mtd/concat.h> 19#include <linux/mtd/concat.h>
20 20
21#include <asm/hardware.h> 21#include <mach/hardware.h>
22#include <asm/io.h> 22#include <asm/io.h>
23#include <asm/sizes.h> 23#include <asm/sizes.h>
24#include <asm/mach/flash.h> 24#include <asm/mach/flash.h>
diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig
index 02f9cc30d77b..41f361c49b32 100644
--- a/drivers/mtd/nand/Kconfig
+++ b/drivers/mtd/nand/Kconfig
@@ -351,6 +351,13 @@ config MTD_NAND_PASEMI
351 Enables support for NAND Flash interface on PA Semi PWRficient 351 Enables support for NAND Flash interface on PA Semi PWRficient
352 based boards 352 based boards
353 353
354config MTD_NAND_TMIO
355 tristate "NAND Flash device on Toshiba Mobile IO Controller"
356 depends on MTD_NAND && MFD_TMIO
357 help
358 Support for NAND flash connected to a Toshiba Mobile IO
359 Controller in some PDAs, including the Sharp SL6000x.
360
354config MTD_NAND_NANDSIM 361config MTD_NAND_NANDSIM
355 tristate "Support for NAND Flash Simulator" 362 tristate "Support for NAND Flash Simulator"
356 depends on MTD_PARTITIONS 363 depends on MTD_PARTITIONS
diff --git a/drivers/mtd/nand/Makefile b/drivers/mtd/nand/Makefile
index d772581de573..b786c5da82da 100644
--- a/drivers/mtd/nand/Makefile
+++ b/drivers/mtd/nand/Makefile
@@ -27,6 +27,7 @@ obj-$(CONFIG_MTD_NAND_ATMEL) += atmel_nand.o
27obj-$(CONFIG_MTD_NAND_CM_X270) += cmx270_nand.o 27obj-$(CONFIG_MTD_NAND_CM_X270) += cmx270_nand.o
28obj-$(CONFIG_MTD_NAND_BASLER_EXCITE) += excite_nandflash.o 28obj-$(CONFIG_MTD_NAND_BASLER_EXCITE) += excite_nandflash.o
29obj-$(CONFIG_MTD_NAND_PXA3xx) += pxa3xx_nand.o 29obj-$(CONFIG_MTD_NAND_PXA3xx) += pxa3xx_nand.o
30obj-$(CONFIG_MTD_NAND_TMIO) += tmio_nand.o
30obj-$(CONFIG_MTD_NAND_PLATFORM) += plat_nand.o 31obj-$(CONFIG_MTD_NAND_PLATFORM) += plat_nand.o
31obj-$(CONFIG_MTD_ALAUDA) += alauda.o 32obj-$(CONFIG_MTD_ALAUDA) += alauda.o
32obj-$(CONFIG_MTD_NAND_PASEMI) += pasemi_nand.o 33obj-$(CONFIG_MTD_NAND_PASEMI) += pasemi_nand.o
diff --git a/drivers/mtd/nand/ams-delta.c b/drivers/mtd/nand/ams-delta.c
index a0ba07c36ee9..26d42987971f 100644
--- a/drivers/mtd/nand/ams-delta.c
+++ b/drivers/mtd/nand/ams-delta.c
@@ -22,10 +22,10 @@
22#include <linux/mtd/nand.h> 22#include <linux/mtd/nand.h>
23#include <linux/mtd/partitions.h> 23#include <linux/mtd/partitions.h>
24#include <asm/io.h> 24#include <asm/io.h>
25#include <asm/arch/hardware.h> 25#include <mach/hardware.h>
26#include <asm/sizes.h> 26#include <asm/sizes.h>
27#include <asm/arch/gpio.h> 27#include <mach/gpio.h>
28#include <asm/arch/board-ams-delta.h> 28#include <mach/board-ams-delta.h>
29 29
30/* 30/*
31 * MTD structure for E3 (Delta) 31 * MTD structure for E3 (Delta)
diff --git a/drivers/mtd/nand/atmel_nand.c b/drivers/mtd/nand/atmel_nand.c
index 99aec46e2145..3387e0d5076b 100644
--- a/drivers/mtd/nand/atmel_nand.c
+++ b/drivers/mtd/nand/atmel_nand.c
@@ -32,8 +32,8 @@
32#include <linux/gpio.h> 32#include <linux/gpio.h>
33#include <linux/io.h> 33#include <linux/io.h>
34 34
35#include <asm/arch/board.h> 35#include <mach/board.h>
36#include <asm/arch/cpu.h> 36#include <mach/cpu.h>
37 37
38#ifdef CONFIG_MTD_NAND_ATMEL_ECC_HW 38#ifdef CONFIG_MTD_NAND_ATMEL_ECC_HW
39#define hard_ecc 1 39#define hard_ecc 1
diff --git a/drivers/mtd/nand/autcpu12.c b/drivers/mtd/nand/autcpu12.c
index 553dd7e9b41c..7c95da1f612c 100644
--- a/drivers/mtd/nand/autcpu12.c
+++ b/drivers/mtd/nand/autcpu12.c
@@ -32,9 +32,9 @@
32#include <linux/mtd/nand.h> 32#include <linux/mtd/nand.h>
33#include <linux/mtd/partitions.h> 33#include <linux/mtd/partitions.h>
34#include <asm/io.h> 34#include <asm/io.h>
35#include <asm/arch/hardware.h> 35#include <mach/hardware.h>
36#include <asm/sizes.h> 36#include <asm/sizes.h>
37#include <asm/arch/autcpu12.h> 37#include <mach/autcpu12.h>
38 38
39/* 39/*
40 * MTD structure for AUTCPU12 board 40 * MTD structure for AUTCPU12 board
diff --git a/drivers/mtd/nand/cmx270_nand.c b/drivers/mtd/nand/cmx270_nand.c
index fc8529bedfdf..9eba3f04783a 100644
--- a/drivers/mtd/nand/cmx270_nand.c
+++ b/drivers/mtd/nand/cmx270_nand.c
@@ -26,8 +26,8 @@
26#include <asm/irq.h> 26#include <asm/irq.h>
27#include <asm/mach-types.h> 27#include <asm/mach-types.h>
28 28
29#include <asm/arch/hardware.h> 29#include <mach/hardware.h>
30#include <asm/arch/pxa-regs.h> 30#include <mach/pxa-regs.h>
31 31
32#define GPIO_NAND_CS (11) 32#define GPIO_NAND_CS (11)
33#define GPIO_NAND_RB (89) 33#define GPIO_NAND_RB (89)
diff --git a/drivers/mtd/nand/edb7312.c b/drivers/mtd/nand/edb7312.c
index 387e4352903e..86366bfba9f8 100644
--- a/drivers/mtd/nand/edb7312.c
+++ b/drivers/mtd/nand/edb7312.c
@@ -23,7 +23,7 @@
23#include <linux/mtd/nand.h> 23#include <linux/mtd/nand.h>
24#include <linux/mtd/partitions.h> 24#include <linux/mtd/partitions.h>
25#include <asm/io.h> 25#include <asm/io.h>
26#include <asm/arch/hardware.h> /* for CLPS7111_VIRT_BASE */ 26#include <mach/hardware.h> /* for CLPS7111_VIRT_BASE */
27#include <asm/sizes.h> 27#include <asm/sizes.h>
28#include <asm/hardware/clps7111.h> 28#include <asm/hardware/clps7111.h>
29 29
diff --git a/drivers/mtd/nand/h1910.c b/drivers/mtd/nand/h1910.c
index 9e59de501c2e..f8ce79b446ed 100644
--- a/drivers/mtd/nand/h1910.c
+++ b/drivers/mtd/nand/h1910.c
@@ -24,10 +24,10 @@
24#include <linux/mtd/nand.h> 24#include <linux/mtd/nand.h>
25#include <linux/mtd/partitions.h> 25#include <linux/mtd/partitions.h>
26#include <asm/io.h> 26#include <asm/io.h>
27#include <asm/arch/hardware.h> /* for CLPS7111_VIRT_BASE */ 27#include <mach/hardware.h> /* for CLPS7111_VIRT_BASE */
28#include <asm/sizes.h> 28#include <asm/sizes.h>
29#include <asm/arch/h1900-gpio.h> 29#include <mach/h1900-gpio.h>
30#include <asm/arch/ipaq.h> 30#include <mach/ipaq.h>
31 31
32/* 32/*
33 * MTD structure for EDB7312 board 33 * MTD structure for EDB7312 board
diff --git a/drivers/mtd/nand/orion_nand.c b/drivers/mtd/nand/orion_nand.c
index ee2ac3948cd8..64002488c6ee 100644
--- a/drivers/mtd/nand/orion_nand.c
+++ b/drivers/mtd/nand/orion_nand.c
@@ -18,7 +18,7 @@
18#include <linux/mtd/partitions.h> 18#include <linux/mtd/partitions.h>
19#include <asm/io.h> 19#include <asm/io.h>
20#include <asm/sizes.h> 20#include <asm/sizes.h>
21#include <asm/arch/hardware.h> 21#include <mach/hardware.h>
22#include <asm/plat-orion/orion_nand.h> 22#include <asm/plat-orion/orion_nand.h>
23 23
24#ifdef CONFIG_MTD_CMDLINE_PARTS 24#ifdef CONFIG_MTD_CMDLINE_PARTS
diff --git a/drivers/mtd/nand/pxa3xx_nand.c b/drivers/mtd/nand/pxa3xx_nand.c
index fe2bc7e42119..a64ad15b8fdd 100644
--- a/drivers/mtd/nand/pxa3xx_nand.c
+++ b/drivers/mtd/nand/pxa3xx_nand.c
@@ -22,8 +22,8 @@
22#include <linux/irq.h> 22#include <linux/irq.h>
23#include <asm/dma.h> 23#include <asm/dma.h>
24 24
25#include <asm/arch/pxa-regs.h> 25#include <mach/pxa-regs.h>
26#include <asm/arch/pxa3xx_nand.h> 26#include <mach/pxa3xx_nand.h>
27 27
28#define CHIP_DELAY_TIMEOUT (2 * HZ/10) 28#define CHIP_DELAY_TIMEOUT (2 * HZ/10)
29 29
diff --git a/drivers/mtd/nand/sharpsl.c b/drivers/mtd/nand/sharpsl.c
index 6dba2fb66ae5..30a518e211bd 100644
--- a/drivers/mtd/nand/sharpsl.c
+++ b/drivers/mtd/nand/sharpsl.c
@@ -21,7 +21,7 @@
21#include <linux/mtd/partitions.h> 21#include <linux/mtd/partitions.h>
22#include <linux/interrupt.h> 22#include <linux/interrupt.h>
23#include <asm/io.h> 23#include <asm/io.h>
24#include <asm/hardware.h> 24#include <mach/hardware.h>
25#include <asm/mach-types.h> 25#include <asm/mach-types.h>
26 26
27static void __iomem *sharpsl_io_base; 27static void __iomem *sharpsl_io_base;
diff --git a/drivers/mtd/nand/tmio_nand.c b/drivers/mtd/nand/tmio_nand.c
new file mode 100644
index 000000000000..cbab654b03c8
--- /dev/null
+++ b/drivers/mtd/nand/tmio_nand.c
@@ -0,0 +1,556 @@
1/*
2 * Toshiba TMIO NAND flash controller driver
3 *
4 * Slightly murky pre-git history of the driver:
5 *
6 * Copyright (c) Ian Molton 2004, 2005, 2008
7 * Original work, independant of sharps code. Included hardware ECC support.
8 * Hard ECC did not work for writes in the early revisions.
9 * Copyright (c) Dirk Opfer 2005.
10 * Modifications developed from sharps code but
11 * NOT containing any, ported onto Ians base.
12 * Copyright (c) Chris Humbert 2005
13 * Copyright (c) Dmitry Baryshkov 2008
14 * Minor fixes
15 *
16 * Parts copyright Sebastian Carlier
17 *
18 * This file is licensed under
19 * the terms of the GNU General Public License version 2. This program
20 * is licensed "as is" without any warranty of any kind, whether express
21 * or implied.
22 *
23 */
24
25
26#include <linux/kernel.h>
27#include <linux/module.h>
28#include <linux/platform_device.h>
29#include <linux/mfd/core.h>
30#include <linux/mfd/tmio.h>
31#include <linux/delay.h>
32#include <linux/io.h>
33#include <linux/irq.h>
34#include <linux/interrupt.h>
35#include <linux/ioport.h>
36#include <linux/mtd/mtd.h>
37#include <linux/mtd/nand.h>
38#include <linux/mtd/nand_ecc.h>
39#include <linux/mtd/partitions.h>
40
41/*--------------------------------------------------------------------------*/
42
43/*
44 * NAND Flash Host Controller Configuration Register
45 */
46#define CCR_COMMAND 0x04 /* w Command */
47#define CCR_BASE 0x10 /* l NAND Flash Control Reg Base Addr */
48#define CCR_INTP 0x3d /* b Interrupt Pin */
49#define CCR_INTE 0x48 /* b Interrupt Enable */
50#define CCR_EC 0x4a /* b Event Control */
51#define CCR_ICC 0x4c /* b Internal Clock Control */
52#define CCR_ECCC 0x5b /* b ECC Control */
53#define CCR_NFTC 0x60 /* b NAND Flash Transaction Control */
54#define CCR_NFM 0x61 /* b NAND Flash Monitor */
55#define CCR_NFPSC 0x62 /* b NAND Flash Power Supply Control */
56#define CCR_NFDC 0x63 /* b NAND Flash Detect Control */
57
58/*
59 * NAND Flash Control Register
60 */
61#define FCR_DATA 0x00 /* bwl Data Register */
62#define FCR_MODE 0x04 /* b Mode Register */
63#define FCR_STATUS 0x05 /* b Status Register */
64#define FCR_ISR 0x06 /* b Interrupt Status Register */
65#define FCR_IMR 0x07 /* b Interrupt Mask Register */
66
67/* FCR_MODE Register Command List */
68#define FCR_MODE_DATA 0x94 /* Data Data_Mode */
69#define FCR_MODE_COMMAND 0x95 /* Data Command_Mode */
70#define FCR_MODE_ADDRESS 0x96 /* Data Address_Mode */
71
72#define FCR_MODE_HWECC_CALC 0xB4 /* HW-ECC Data */
73#define FCR_MODE_HWECC_RESULT 0xD4 /* HW-ECC Calc result Read_Mode */
74#define FCR_MODE_HWECC_RESET 0xF4 /* HW-ECC Reset */
75
76#define FCR_MODE_POWER_ON 0x0C /* Power Supply ON to SSFDC card */
77#define FCR_MODE_POWER_OFF 0x08 /* Power Supply OFF to SSFDC card */
78
79#define FCR_MODE_LED_OFF 0x00 /* LED OFF */
80#define FCR_MODE_LED_ON 0x04 /* LED ON */
81
82#define FCR_MODE_EJECT_ON 0x68 /* Ejection events active */
83#define FCR_MODE_EJECT_OFF 0x08 /* Ejection events ignored */
84
85#define FCR_MODE_LOCK 0x6C /* Lock_Mode. Eject Switch Invalid */
86#define FCR_MODE_UNLOCK 0x0C /* UnLock_Mode. Eject Switch is valid */
87
88#define FCR_MODE_CONTROLLER_ID 0x40 /* Controller ID Read */
89#define FCR_MODE_STANDBY 0x00 /* SSFDC card Changes Standby State */
90
91#define FCR_MODE_WE 0x80
92#define FCR_MODE_ECC1 0x40
93#define FCR_MODE_ECC0 0x20
94#define FCR_MODE_CE 0x10
95#define FCR_MODE_PCNT1 0x08
96#define FCR_MODE_PCNT0 0x04
97#define FCR_MODE_ALE 0x02
98#define FCR_MODE_CLE 0x01
99
100#define FCR_STATUS_BUSY 0x80
101
102/*--------------------------------------------------------------------------*/
103
104struct tmio_nand {
105 struct mtd_info mtd;
106 struct nand_chip chip;
107
108 struct platform_device *dev;
109
110 void __iomem *ccr;
111 void __iomem *fcr;
112 unsigned long fcr_phys;
113
114 unsigned int irq;
115
116 /* for tmio_nand_read_byte */
117 u8 read;
118 unsigned read_good:1;
119};
120
121#define mtd_to_tmio(m) container_of(m, struct tmio_nand, mtd)
122
123#ifdef CONFIG_MTD_CMDLINE_PARTS
124static const char *part_probes[] = { "cmdlinepart", NULL };
125#endif
126
127/*--------------------------------------------------------------------------*/
128
129static void tmio_nand_hwcontrol(struct mtd_info *mtd, int cmd,
130 unsigned int ctrl)
131{
132 struct tmio_nand *tmio = mtd_to_tmio(mtd);
133 struct nand_chip *chip = mtd->priv;
134
135 if (ctrl & NAND_CTRL_CHANGE) {
136 u8 mode;
137
138 if (ctrl & NAND_NCE) {
139 mode = FCR_MODE_DATA;
140
141 if (ctrl & NAND_CLE)
142 mode |= FCR_MODE_CLE;
143 else
144 mode &= ~FCR_MODE_CLE;
145
146 if (ctrl & NAND_ALE)
147 mode |= FCR_MODE_ALE;
148 else
149 mode &= ~FCR_MODE_ALE;
150 } else {
151 mode = FCR_MODE_STANDBY;
152 }
153
154 tmio_iowrite8(mode, tmio->fcr + FCR_MODE);
155 tmio->read_good = 0;
156 }
157
158 if (cmd != NAND_CMD_NONE)
159 tmio_iowrite8(cmd, chip->IO_ADDR_W);
160}
161
162static int tmio_nand_dev_ready(struct mtd_info *mtd)
163{
164 struct tmio_nand *tmio = mtd_to_tmio(mtd);
165
166 return !(tmio_ioread8(tmio->fcr + FCR_STATUS) & FCR_STATUS_BUSY);
167}
168
169static irqreturn_t tmio_irq(int irq, void *__tmio)
170{
171 struct tmio_nand *tmio = __tmio;
172 struct nand_chip *nand_chip = &tmio->chip;
173
174 /* disable RDYREQ interrupt */
175 tmio_iowrite8(0x00, tmio->fcr + FCR_IMR);
176
177 if (unlikely(!waitqueue_active(&nand_chip->controller->wq)))
178 dev_warn(&tmio->dev->dev, "spurious interrupt\n");
179
180 wake_up(&nand_chip->controller->wq);
181 return IRQ_HANDLED;
182}
183
184/*
185 *The TMIO core has a RDYREQ interrupt on the posedge of #SMRB.
186 *This interrupt is normally disabled, but for long operations like
187 *erase and write, we enable it to wake us up. The irq handler
188 *disables the interrupt.
189 */
190static int
191tmio_nand_wait(struct mtd_info *mtd, struct nand_chip *nand_chip)
192{
193 struct tmio_nand *tmio = mtd_to_tmio(mtd);
194 long timeout;
195
196 /* enable RDYREQ interrupt */
197 tmio_iowrite8(0x0f, tmio->fcr + FCR_ISR);
198 tmio_iowrite8(0x81, tmio->fcr + FCR_IMR);
199
200 timeout = wait_event_timeout(nand_chip->controller->wq,
201 tmio_nand_dev_ready(mtd),
202 msecs_to_jiffies(nand_chip->state == FL_ERASING ? 400 : 20));
203
204 if (unlikely(!tmio_nand_dev_ready(mtd))) {
205 tmio_iowrite8(0x00, tmio->fcr + FCR_IMR);
206 dev_warn(&tmio->dev->dev, "still busy with %s after %d ms\n",
207 nand_chip->state == FL_ERASING ? "erase" : "program",
208 nand_chip->state == FL_ERASING ? 400 : 20);
209
210 } else if (unlikely(!timeout)) {
211 tmio_iowrite8(0x00, tmio->fcr + FCR_IMR);
212 dev_warn(&tmio->dev->dev, "timeout waiting for interrupt\n");
213 }
214
215 nand_chip->cmdfunc(mtd, NAND_CMD_STATUS, -1, -1);
216 return nand_chip->read_byte(mtd);
217}
218
219/*
220 *The TMIO controller combines two 8-bit data bytes into one 16-bit
221 *word. This function separates them so nand_base.c works as expected,
222 *especially its NAND_CMD_READID routines.
223 *
224 *To prevent stale data from being read, tmio_nand_hwcontrol() clears
225 *tmio->read_good.
226 */
227static u_char tmio_nand_read_byte(struct mtd_info *mtd)
228{
229 struct tmio_nand *tmio = mtd_to_tmio(mtd);
230 unsigned int data;
231
232 if (tmio->read_good--)
233 return tmio->read;
234
235 data = tmio_ioread16(tmio->fcr + FCR_DATA);
236 tmio->read = data >> 8;
237 return data;
238}
239
240/*
241 *The TMIO controller converts an 8-bit NAND interface to a 16-bit
242 *bus interface, so all data reads and writes must be 16-bit wide.
243 *Thus, we implement 16-bit versions of the read, write, and verify
244 *buffer functions.
245 */
246static void
247tmio_nand_write_buf(struct mtd_info *mtd, const u_char *buf, int len)
248{
249 struct tmio_nand *tmio = mtd_to_tmio(mtd);
250
251 tmio_iowrite16_rep(tmio->fcr + FCR_DATA, buf, len >> 1);
252}
253
254static void tmio_nand_read_buf(struct mtd_info *mtd, u_char *buf, int len)
255{
256 struct tmio_nand *tmio = mtd_to_tmio(mtd);
257
258 tmio_ioread16_rep(tmio->fcr + FCR_DATA, buf, len >> 1);
259}
260
261static int
262tmio_nand_verify_buf(struct mtd_info *mtd, const u_char *buf, int len)
263{
264 struct tmio_nand *tmio = mtd_to_tmio(mtd);
265 u16 *p = (u16 *) buf;
266
267 for (len >>= 1; len; len--)
268 if (*(p++) != tmio_ioread16(tmio->fcr + FCR_DATA))
269 return -EFAULT;
270 return 0;
271}
272
273static void tmio_nand_enable_hwecc(struct mtd_info *mtd, int mode)
274{
275 struct tmio_nand *tmio = mtd_to_tmio(mtd);
276
277 tmio_iowrite8(FCR_MODE_HWECC_RESET, tmio->fcr + FCR_MODE);
278 tmio_ioread8(tmio->fcr + FCR_DATA); /* dummy read */
279 tmio_iowrite8(FCR_MODE_HWECC_CALC, tmio->fcr + FCR_MODE);
280}
281
282static int tmio_nand_calculate_ecc(struct mtd_info *mtd, const u_char *dat,
283 u_char *ecc_code)
284{
285 struct tmio_nand *tmio = mtd_to_tmio(mtd);
286 unsigned int ecc;
287
288 tmio_iowrite8(FCR_MODE_HWECC_RESULT, tmio->fcr + FCR_MODE);
289
290 ecc = tmio_ioread16(tmio->fcr + FCR_DATA);
291 ecc_code[1] = ecc; /* 000-255 LP7-0 */
292 ecc_code[0] = ecc >> 8; /* 000-255 LP15-8 */
293 ecc = tmio_ioread16(tmio->fcr + FCR_DATA);
294 ecc_code[2] = ecc; /* 000-255 CP5-0,11b */
295 ecc_code[4] = ecc >> 8; /* 256-511 LP7-0 */
296 ecc = tmio_ioread16(tmio->fcr + FCR_DATA);
297 ecc_code[3] = ecc; /* 256-511 LP15-8 */
298 ecc_code[5] = ecc >> 8; /* 256-511 CP5-0,11b */
299
300 tmio_iowrite8(FCR_MODE_DATA, tmio->fcr + FCR_MODE);
301 return 0;
302}
303
304static int tmio_hw_init(struct platform_device *dev, struct tmio_nand *tmio)
305{
306 struct mfd_cell *cell = (struct mfd_cell *)dev->dev.platform_data;
307 int ret;
308
309 if (cell->enable) {
310 ret = cell->enable(dev);
311 if (ret)
312 return ret;
313 }
314
315 /* (4Ch) CLKRUN Enable 1st spcrunc */
316 tmio_iowrite8(0x81, tmio->ccr + CCR_ICC);
317
318 /* (10h)BaseAddress 0x1000 spba.spba2 */
319 tmio_iowrite16(tmio->fcr_phys, tmio->ccr + CCR_BASE);
320 tmio_iowrite16(tmio->fcr_phys >> 16, tmio->ccr + CCR_BASE + 16);
321
322 /* (04h)Command Register I/O spcmd */
323 tmio_iowrite8(0x02, tmio->ccr + CCR_COMMAND);
324
325 /* (62h) Power Supply Control ssmpwc */
326 /* HardPowerOFF - SuspendOFF - PowerSupplyWait_4MS */
327 tmio_iowrite8(0x02, tmio->ccr + CCR_NFPSC);
328
329 /* (63h) Detect Control ssmdtc */
330 tmio_iowrite8(0x02, tmio->ccr + CCR_NFDC);
331
332 /* Interrupt status register clear sintst */
333 tmio_iowrite8(0x0f, tmio->fcr + FCR_ISR);
334
335 /* After power supply, Media are reset smode */
336 tmio_iowrite8(FCR_MODE_POWER_ON, tmio->fcr + FCR_MODE);
337 tmio_iowrite8(FCR_MODE_COMMAND, tmio->fcr + FCR_MODE);
338 tmio_iowrite8(NAND_CMD_RESET, tmio->fcr + FCR_DATA);
339
340 /* Standby Mode smode */
341 tmio_iowrite8(FCR_MODE_STANDBY, tmio->fcr + FCR_MODE);
342
343 mdelay(5);
344
345 return 0;
346}
347
348static void tmio_hw_stop(struct platform_device *dev, struct tmio_nand *tmio)
349{
350 struct mfd_cell *cell = (struct mfd_cell *)dev->dev.platform_data;
351
352 tmio_iowrite8(FCR_MODE_POWER_OFF, tmio->fcr + FCR_MODE);
353 if (cell->disable)
354 cell->disable(dev);
355}
356
357static int tmio_probe(struct platform_device *dev)
358{
359 struct mfd_cell *cell = (struct mfd_cell *)dev->dev.platform_data;
360 struct tmio_nand_data *data = cell->driver_data;
361 struct resource *fcr = platform_get_resource(dev,
362 IORESOURCE_MEM, 0);
363 struct resource *ccr = platform_get_resource(dev,
364 IORESOURCE_MEM, 1);
365 int irq = platform_get_irq(dev, 0);
366 struct tmio_nand *tmio;
367 struct mtd_info *mtd;
368 struct nand_chip *nand_chip;
369#ifdef CONFIG_MTD_PARTITIONS
370 struct mtd_partition *parts;
371 int nbparts = 0;
372#endif
373 int retval;
374
375 if (data == NULL)
376 dev_warn(&dev->dev, "NULL platform data!\n");
377
378 tmio = kzalloc(sizeof *tmio, GFP_KERNEL);
379 if (!tmio) {
380 retval = -ENOMEM;
381 goto err_kzalloc;
382 }
383
384 tmio->dev = dev;
385
386 platform_set_drvdata(dev, tmio);
387 mtd = &tmio->mtd;
388 nand_chip = &tmio->chip;
389 mtd->priv = nand_chip;
390 mtd->name = "tmio-nand";
391
392 tmio->ccr = ioremap(ccr->start, ccr->end - ccr->start + 1);
393 if (!tmio->ccr) {
394 retval = -EIO;
395 goto err_iomap_ccr;
396 }
397
398 tmio->fcr_phys = (unsigned long)fcr->start;
399 tmio->fcr = ioremap(fcr->start, fcr->end - fcr->start + 1);
400 if (!tmio->fcr) {
401 retval = -EIO;
402 goto err_iomap_fcr;
403 }
404
405 retval = tmio_hw_init(dev, tmio);
406 if (retval)
407 goto err_hwinit;
408
409 /* Set address of NAND IO lines */
410 nand_chip->IO_ADDR_R = tmio->fcr;
411 nand_chip->IO_ADDR_W = tmio->fcr;
412
413 /* Set address of hardware control function */
414 nand_chip->cmd_ctrl = tmio_nand_hwcontrol;
415 nand_chip->dev_ready = tmio_nand_dev_ready;
416 nand_chip->read_byte = tmio_nand_read_byte;
417 nand_chip->write_buf = tmio_nand_write_buf;
418 nand_chip->read_buf = tmio_nand_read_buf;
419 nand_chip->verify_buf = tmio_nand_verify_buf;
420
421 /* set eccmode using hardware ECC */
422 nand_chip->ecc.mode = NAND_ECC_HW;
423 nand_chip->ecc.size = 512;
424 nand_chip->ecc.bytes = 6;
425 nand_chip->ecc.hwctl = tmio_nand_enable_hwecc;
426 nand_chip->ecc.calculate = tmio_nand_calculate_ecc;
427 nand_chip->ecc.correct = nand_correct_data;
428
429 if (data)
430 nand_chip->badblock_pattern = data->badblock_pattern;
431
432 /* 15 us command delay time */
433 nand_chip->chip_delay = 15;
434
435 retval = request_irq(irq, &tmio_irq,
436 IRQF_DISABLED, dev->dev.bus_id, tmio);
437 if (retval) {
438 dev_err(&dev->dev, "request_irq error %d\n", retval);
439 goto err_irq;
440 }
441
442 tmio->irq = irq;
443 nand_chip->waitfunc = tmio_nand_wait;
444
445 /* Scan to find existence of the device */
446 if (nand_scan(mtd, 1)) {
447 retval = -ENODEV;
448 goto err_scan;
449 }
450 /* Register the partitions */
451#ifdef CONFIG_MTD_PARTITIONS
452#ifdef CONFIG_MTD_CMDLINE_PARTS
453 nbparts = parse_mtd_partitions(mtd, part_probes, &parts, 0);
454#endif
455 if (nbparts <= 0 && data) {
456 parts = data->partition;
457 nbparts = data->num_partitions;
458 }
459
460 if (nbparts)
461 retval = add_mtd_partitions(mtd, parts, nbparts);
462 else
463#endif
464 retval = add_mtd_device(mtd);
465
466 if (!retval)
467 return retval;
468
469 nand_release(mtd);
470
471err_scan:
472 if (tmio->irq)
473 free_irq(tmio->irq, tmio);
474err_irq:
475 tmio_hw_stop(dev, tmio);
476err_hwinit:
477 iounmap(tmio->fcr);
478err_iomap_fcr:
479 iounmap(tmio->ccr);
480err_iomap_ccr:
481 kfree(tmio);
482err_kzalloc:
483 return retval;
484}
485
486static int tmio_remove(struct platform_device *dev)
487{
488 struct tmio_nand *tmio = platform_get_drvdata(dev);
489
490 nand_release(&tmio->mtd);
491 if (tmio->irq)
492 free_irq(tmio->irq, tmio);
493 tmio_hw_stop(dev, tmio);
494 iounmap(tmio->fcr);
495 iounmap(tmio->ccr);
496 kfree(tmio);
497 return 0;
498}
499
500#ifdef CONFIG_PM
501static int tmio_suspend(struct platform_device *dev, pm_message_t state)
502{
503 struct mfd_cell *cell = (struct mfd_cell *)dev->dev.platform_data;
504
505 if (cell->suspend)
506 cell->suspend(dev);
507
508 tmio_hw_stop(dev, platform_get_drvdata(dev));
509 return 0;
510}
511
512static int tmio_resume(struct platform_device *dev)
513{
514 struct mfd_cell *cell = (struct mfd_cell *)dev->dev.platform_data;
515
516 /* FIXME - is this required or merely another attack of the broken
517 * SHARP platform? Looks suspicious.
518 */
519 tmio_hw_init(dev, platform_get_drvdata(dev));
520
521 if (cell->resume)
522 cell->resume(dev);
523
524 return 0;
525}
526#else
527#define tmio_suspend NULL
528#define tmio_resume NULL
529#endif
530
531static struct platform_driver tmio_driver = {
532 .driver.name = "tmio-nand",
533 .driver.owner = THIS_MODULE,
534 .probe = tmio_probe,
535 .remove = tmio_remove,
536 .suspend = tmio_suspend,
537 .resume = tmio_resume,
538};
539
540static int __init tmio_init(void)
541{
542 return platform_driver_register(&tmio_driver);
543}
544
545static void __exit tmio_exit(void)
546{
547 platform_driver_unregister(&tmio_driver);
548}
549
550module_init(tmio_init);
551module_exit(tmio_exit);
552
553MODULE_LICENSE("GPL v2");
554MODULE_AUTHOR("Ian Molton, Dirk Opfer, Chris Humbert, Dmitry Baryshkov");
555MODULE_DESCRIPTION("NAND flash driver on Toshiba Mobile IO controller");
556MODULE_ALIAS("platform:tmio-nand");
diff --git a/drivers/mtd/nand/ts7250.c b/drivers/mtd/nand/ts7250.c
index 807a72752eeb..2c410a011317 100644
--- a/drivers/mtd/nand/ts7250.c
+++ b/drivers/mtd/nand/ts7250.c
@@ -25,7 +25,7 @@
25#include <linux/mtd/nand.h> 25#include <linux/mtd/nand.h>
26#include <linux/mtd/partitions.h> 26#include <linux/mtd/partitions.h>
27#include <asm/io.h> 27#include <asm/io.h>
28#include <asm/arch/hardware.h> 28#include <mach/hardware.h>
29#include <asm/sizes.h> 29#include <asm/sizes.h>
30#include <asm/mach-types.h> 30#include <asm/mach-types.h>
31 31
diff --git a/drivers/net/arm/am79c961a.c b/drivers/net/arm/am79c961a.c
index a637910b02dd..aa4a5246be53 100644
--- a/drivers/net/arm/am79c961a.c
+++ b/drivers/net/arm/am79c961a.c
@@ -28,7 +28,7 @@
28#include <linux/bitops.h> 28#include <linux/bitops.h>
29#include <linux/platform_device.h> 29#include <linux/platform_device.h>
30 30
31#include <asm/hardware.h> 31#include <mach/hardware.h>
32#include <asm/io.h> 32#include <asm/io.h>
33#include <asm/system.h> 33#include <asm/system.h>
34 34
diff --git a/drivers/net/arm/at91_ether.c b/drivers/net/arm/at91_ether.c
index ffae266e2d7f..0fa53464efb2 100644
--- a/drivers/net/arm/at91_ether.c
+++ b/drivers/net/arm/at91_ether.c
@@ -32,9 +32,9 @@
32#include <asm/uaccess.h> 32#include <asm/uaccess.h>
33#include <asm/mach-types.h> 33#include <asm/mach-types.h>
34 34
35#include <asm/arch/at91rm9200_emac.h> 35#include <mach/at91rm9200_emac.h>
36#include <asm/arch/gpio.h> 36#include <mach/gpio.h>
37#include <asm/arch/board.h> 37#include <mach/board.h>
38 38
39#include "at91_ether.h" 39#include "at91_ether.h"
40 40
diff --git a/drivers/net/arm/ep93xx_eth.c b/drivers/net/arm/ep93xx_eth.c
index 18d3eeb7eab2..1267444d79da 100644
--- a/drivers/net/arm/ep93xx_eth.c
+++ b/drivers/net/arm/ep93xx_eth.c
@@ -20,8 +20,8 @@
20#include <linux/moduleparam.h> 20#include <linux/moduleparam.h>
21#include <linux/platform_device.h> 21#include <linux/platform_device.h>
22#include <linux/delay.h> 22#include <linux/delay.h>
23#include <asm/arch/ep93xx-regs.h> 23#include <mach/ep93xx-regs.h>
24#include <asm/arch/platform.h> 24#include <mach/platform.h>
25#include <asm/io.h> 25#include <asm/io.h>
26 26
27#define DRV_MODULE_NAME "ep93xx-eth" 27#define DRV_MODULE_NAME "ep93xx-eth"
diff --git a/drivers/net/arm/ixp4xx_eth.c b/drivers/net/arm/ixp4xx_eth.c
index 9b777d9433cd..020771bfb603 100644
--- a/drivers/net/arm/ixp4xx_eth.c
+++ b/drivers/net/arm/ixp4xx_eth.c
@@ -32,8 +32,8 @@
32#include <linux/kernel.h> 32#include <linux/kernel.h>
33#include <linux/mii.h> 33#include <linux/mii.h>
34#include <linux/platform_device.h> 34#include <linux/platform_device.h>
35#include <asm/arch/npe.h> 35#include <mach/npe.h>
36#include <asm/arch/qmgr.h> 36#include <mach/qmgr.h>
37 37
38#define DEBUG_QUEUES 0 38#define DEBUG_QUEUES 0
39#define DEBUG_DESC 0 39#define DEBUG_DESC 0
diff --git a/drivers/net/atl1e/atl1e_main.c b/drivers/net/atl1e/atl1e_main.c
index 35264c244cfd..82d7be1655d3 100644
--- a/drivers/net/atl1e/atl1e_main.c
+++ b/drivers/net/atl1e/atl1e_main.c
@@ -47,7 +47,7 @@ MODULE_DESCRIPTION("Atheros 1000M Ethernet Network Driver");
47MODULE_LICENSE("GPL"); 47MODULE_LICENSE("GPL");
48MODULE_VERSION(DRV_VERSION); 48MODULE_VERSION(DRV_VERSION);
49 49
50static inline void atl1e_setup_mac_ctrl(struct atl1e_adapter *adapter); 50static void atl1e_setup_mac_ctrl(struct atl1e_adapter *adapter);
51 51
52static const u16 52static const u16
53atl1e_rx_page_vld_regs[AT_MAX_RECEIVE_QUEUE][AT_PAGE_NUM_PER_QUEUE] = 53atl1e_rx_page_vld_regs[AT_MAX_RECEIVE_QUEUE][AT_PAGE_NUM_PER_QUEUE] =
@@ -1037,7 +1037,7 @@ static inline void atl1e_configure_dma(struct atl1e_adapter *adapter)
1037 return; 1037 return;
1038} 1038}
1039 1039
1040static inline void atl1e_setup_mac_ctrl(struct atl1e_adapter *adapter) 1040static void atl1e_setup_mac_ctrl(struct atl1e_adapter *adapter)
1041{ 1041{
1042 u32 value; 1042 u32 value;
1043 struct atl1e_hw *hw = &adapter->hw; 1043 struct atl1e_hw *hw = &adapter->hw;
diff --git a/drivers/net/cs89x0.c b/drivers/net/cs89x0.c
index fba87abe78ee..ea6144a9565e 100644
--- a/drivers/net/cs89x0.c
+++ b/drivers/net/cs89x0.c
@@ -189,7 +189,7 @@ static unsigned int netcard_portlist[] __used __initdata = {IXDP2X01_CS8900_VIRT
189static unsigned int cs8900_irq_map[] = {IRQ_IXDP2X01_CS8900, 0, 0, 0}; 189static unsigned int cs8900_irq_map[] = {IRQ_IXDP2X01_CS8900, 0, 0, 0};
190#elif defined(CONFIG_ARCH_PNX010X) 190#elif defined(CONFIG_ARCH_PNX010X)
191#include <asm/irq.h> 191#include <asm/irq.h>
192#include <asm/arch/gpio.h> 192#include <mach/gpio.h>
193#define CIRRUS_DEFAULT_BASE IO_ADDRESS(EXT_STATIC2_s0_BASE + 0x200000) /* = Physical address 0x48200000 */ 193#define CIRRUS_DEFAULT_BASE IO_ADDRESS(EXT_STATIC2_s0_BASE + 0x200000) /* = Physical address 0x48200000 */
194#define CIRRUS_DEFAULT_IRQ VH_INTC_INT_NUM_CASCADED_INTERRUPT_1 /* Event inputs bank 1 - ID 35/bit 3 */ 194#define CIRRUS_DEFAULT_IRQ VH_INTC_INT_NUM_CASCADED_INTERRUPT_1 /* Event inputs bank 1 - ID 35/bit 3 */
195static unsigned int netcard_portlist[] __used __initdata = {CIRRUS_DEFAULT_BASE, 0}; 195static unsigned int netcard_portlist[] __used __initdata = {CIRRUS_DEFAULT_BASE, 0};
diff --git a/drivers/net/irda/ep7211-sir.c b/drivers/net/irda/ep7211-sir.c
index 831572429bb9..f83c5b881d2d 100644
--- a/drivers/net/irda/ep7211-sir.c
+++ b/drivers/net/irda/ep7211-sir.c
@@ -14,7 +14,7 @@
14#include <net/irda/irda_device.h> 14#include <net/irda/irda_device.h>
15 15
16#include <asm/io.h> 16#include <asm/io.h>
17#include <asm/hardware.h> 17#include <mach/hardware.h>
18 18
19#include "sir-dev.h" 19#include "sir-dev.h"
20 20
diff --git a/drivers/net/irda/pxaficp_ir.c b/drivers/net/irda/pxaficp_ir.c
index f76b0b6c277d..4aa61a1a3d55 100644
--- a/drivers/net/irda/pxaficp_ir.c
+++ b/drivers/net/irda/pxaficp_ir.c
@@ -23,8 +23,8 @@
23#include <net/irda/irda_device.h> 23#include <net/irda/irda_device.h>
24 24
25#include <asm/dma.h> 25#include <asm/dma.h>
26#include <asm/arch/irda.h> 26#include <mach/irda.h>
27#include <asm/arch/pxa-regs.h> 27#include <mach/pxa-regs.h>
28 28
29#define IrSR_RXPL_NEG_IS_ZERO (1<<4) 29#define IrSR_RXPL_NEG_IS_ZERO (1<<4)
30#define IrSR_RXPL_POS_IS_ZERO 0x0 30#define IrSR_RXPL_POS_IS_ZERO 0x0
diff --git a/drivers/net/irda/sa1100_ir.c b/drivers/net/irda/sa1100_ir.c
index 1bc8518f9197..a95188948de7 100644
--- a/drivers/net/irda/sa1100_ir.c
+++ b/drivers/net/irda/sa1100_ir.c
@@ -37,7 +37,7 @@
37 37
38#include <asm/irq.h> 38#include <asm/irq.h>
39#include <asm/dma.h> 39#include <asm/dma.h>
40#include <asm/hardware.h> 40#include <mach/hardware.h>
41#include <asm/mach/irda.h> 41#include <asm/mach/irda.h>
42 42
43static int power_level = 3; 43static int power_level = 3;
diff --git a/drivers/net/ixp2000/ixp2400-msf.c b/drivers/net/ixp2000/ixp2400-msf.c
index 9ec38eebfb56..f5ffd7e05d26 100644
--- a/drivers/net/ixp2000/ixp2400-msf.c
+++ b/drivers/net/ixp2000/ixp2400-msf.c
@@ -13,8 +13,8 @@
13 13
14#include <linux/kernel.h> 14#include <linux/kernel.h>
15#include <linux/init.h> 15#include <linux/init.h>
16#include <asm/hardware.h> 16#include <mach/hardware.h>
17#include <asm/arch/ixp2000-regs.h> 17#include <mach/ixp2000-regs.h>
18#include <asm/delay.h> 18#include <asm/delay.h>
19#include <asm/io.h> 19#include <asm/io.h>
20#include "ixp2400-msf.h" 20#include "ixp2400-msf.h"
diff --git a/drivers/net/ixp2000/ixpdev.c b/drivers/net/ixp2000/ixpdev.c
index 7111c65f0b30..7b70c66504a0 100644
--- a/drivers/net/ixp2000/ixpdev.c
+++ b/drivers/net/ixp2000/ixpdev.c
@@ -16,7 +16,6 @@
16#include <linux/init.h> 16#include <linux/init.h>
17#include <linux/moduleparam.h> 17#include <linux/moduleparam.h>
18#include <asm/hardware/uengine.h> 18#include <asm/hardware/uengine.h>
19#include <asm/mach-types.h>
20#include <asm/io.h> 19#include <asm/io.h>
21#include "ixp2400_rx.ucode" 20#include "ixp2400_rx.ucode"
22#include "ixp2400_tx.ucode" 21#include "ixp2400_tx.ucode"
diff --git a/drivers/net/macb.c b/drivers/net/macb.c
index daba82bbcb56..84c77f1f9a5c 100644
--- a/drivers/net/macb.c
+++ b/drivers/net/macb.c
@@ -21,8 +21,8 @@
21#include <linux/platform_device.h> 21#include <linux/platform_device.h>
22#include <linux/phy.h> 22#include <linux/phy.h>
23 23
24#include <asm/arch/board.h> 24#include <mach/board.h>
25#include <asm/arch/cpu.h> 25#include <mach/cpu.h>
26 26
27#include "macb.h" 27#include "macb.h"
28 28
diff --git a/drivers/net/netx-eth.c b/drivers/net/netx-eth.c
index dc442e370850..3f9af759cb90 100644
--- a/drivers/net/netx-eth.c
+++ b/drivers/net/netx-eth.c
@@ -29,12 +29,11 @@
29#include <linux/mii.h> 29#include <linux/mii.h>
30 30
31#include <asm/io.h> 31#include <asm/io.h>
32#include <asm/hardware.h> 32#include <mach/hardware.h>
33#include <asm/arch/hardware.h> 33#include <mach/netx-regs.h>
34#include <asm/arch/netx-regs.h> 34#include <mach/pfifo.h>
35#include <asm/arch/pfifo.h> 35#include <mach/xc.h>
36#include <asm/arch/xc.h> 36#include <mach/eth.h>
37#include <asm/arch/eth.h>
38 37
39/* XC Fifo Offsets */ 38/* XC Fifo Offsets */
40#define EMPTY_PTR_FIFO(xcno) (0 + ((xcno) << 3)) /* Index of the empty pointer FIFO */ 39#define EMPTY_PTR_FIFO(xcno) (0 + ((xcno) << 3)) /* Index of the empty pointer FIFO */
diff --git a/drivers/net/smc911x.h b/drivers/net/smc911x.h
index 76c17c28fab4..2abfc2845198 100644
--- a/drivers/net/smc911x.h
+++ b/drivers/net/smc911x.h
@@ -222,7 +222,7 @@ static inline void SMC_outsl(struct smc911x_local *lp, int reg,
222 */ 222 */
223#include <linux/dma-mapping.h> 223#include <linux/dma-mapping.h>
224#include <asm/dma.h> 224#include <asm/dma.h>
225#include <asm/arch/pxa-regs.h> 225#include <mach/pxa-regs.h>
226 226
227static dma_addr_t rx_dmabuf, tx_dmabuf; 227static dma_addr_t rx_dmabuf, tx_dmabuf;
228static int rx_dmalen, tx_dmalen; 228static int rx_dmalen, tx_dmalen;
diff --git a/drivers/net/smc91x.h b/drivers/net/smc91x.h
index 22209b6f1405..997e7f1d5c6e 100644
--- a/drivers/net/smc91x.h
+++ b/drivers/net/smc91x.h
@@ -187,7 +187,7 @@ static inline void SMC_outw(u16 val, void __iomem *ioaddr, int reg)
187 187
188#elif defined(CONFIG_SA1100_ASSABET) 188#elif defined(CONFIG_SA1100_ASSABET)
189 189
190#include <asm/arch/neponset.h> 190#include <mach/neponset.h>
191 191
192/* We can only do 8-bit reads and writes in the static memory space. */ 192/* We can only do 8-bit reads and writes in the static memory space. */
193#define SMC_CAN_USE_8BIT 1 193#define SMC_CAN_USE_8BIT 1
@@ -339,7 +339,7 @@ SMC_outw(u16 val, void __iomem *ioaddr, int reg)
339 * IOBARRIER on entry to their ISR. 339 * IOBARRIER on entry to their ISR.
340 */ 340 */
341 341
342#include <asm/arch/constants.h> /* IOBARRIER_VIRT */ 342#include <mach/constants.h> /* IOBARRIER_VIRT */
343 343
344#define SMC_CAN_USE_8BIT 0 344#define SMC_CAN_USE_8BIT 0
345#define SMC_CAN_USE_16BIT 1 345#define SMC_CAN_USE_16BIT 1
@@ -525,7 +525,7 @@ struct smc_local {
525 */ 525 */
526#include <linux/dma-mapping.h> 526#include <linux/dma-mapping.h>
527#include <asm/dma.h> 527#include <asm/dma.h>
528#include <asm/arch/pxa-regs.h> 528#include <mach/pxa-regs.h>
529 529
530#ifdef SMC_insl 530#ifdef SMC_insl
531#undef SMC_insl 531#undef SMC_insl
diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
index 18354817173c..4a10b5624f72 100644
--- a/drivers/pci/msi.c
+++ b/drivers/pci/msi.c
@@ -308,9 +308,8 @@ static void __pci_restore_msi_state(struct pci_dev *dev)
308 entry->msi_attrib.masked); 308 entry->msi_attrib.masked);
309 309
310 pci_read_config_word(dev, pos + PCI_MSI_FLAGS, &control); 310 pci_read_config_word(dev, pos + PCI_MSI_FLAGS, &control);
311 control &= ~(PCI_MSI_FLAGS_QSIZE | PCI_MSI_FLAGS_ENABLE); 311 control &= ~PCI_MSI_FLAGS_QSIZE;
312 if (entry->msi_attrib.maskbit || !entry->msi_attrib.masked) 312 control |= PCI_MSI_FLAGS_ENABLE;
313 control |= PCI_MSI_FLAGS_ENABLE;
314 pci_write_config_word(dev, pos + PCI_MSI_FLAGS, control); 313 pci_write_config_word(dev, pos + PCI_MSI_FLAGS, control);
315} 314}
316 315
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 0a3d856833fc..c9884bba22de 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -1060,7 +1060,7 @@ bool pci_pme_capable(struct pci_dev *dev, pci_power_t state)
1060 * The caller must verify that the device is capable of generating PME# before 1060 * The caller must verify that the device is capable of generating PME# before
1061 * calling this function with @enable equal to 'true'. 1061 * calling this function with @enable equal to 'true'.
1062 */ 1062 */
1063static void pci_pme_active(struct pci_dev *dev, bool enable) 1063void pci_pme_active(struct pci_dev *dev, bool enable)
1064{ 1064{
1065 u16 pmcsr; 1065 u16 pmcsr;
1066 1066
@@ -1941,6 +1941,7 @@ EXPORT_SYMBOL(pci_set_power_state);
1941EXPORT_SYMBOL(pci_save_state); 1941EXPORT_SYMBOL(pci_save_state);
1942EXPORT_SYMBOL(pci_restore_state); 1942EXPORT_SYMBOL(pci_restore_state);
1943EXPORT_SYMBOL(pci_pme_capable); 1943EXPORT_SYMBOL(pci_pme_capable);
1944EXPORT_SYMBOL(pci_pme_active);
1944EXPORT_SYMBOL(pci_enable_wake); 1945EXPORT_SYMBOL(pci_enable_wake);
1945EXPORT_SYMBOL(pci_target_state); 1946EXPORT_SYMBOL(pci_target_state);
1946EXPORT_SYMBOL(pci_prepare_to_sleep); 1947EXPORT_SYMBOL(pci_prepare_to_sleep);
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index 7098dfb07449..a04498d390c8 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -52,27 +52,49 @@ EXPORT_SYMBOL(no_pci_devices);
52 * Some platforms allow access to legacy I/O port and ISA memory space on 52 * Some platforms allow access to legacy I/O port and ISA memory space on
53 * a per-bus basis. This routine creates the files and ties them into 53 * a per-bus basis. This routine creates the files and ties them into
54 * their associated read, write and mmap files from pci-sysfs.c 54 * their associated read, write and mmap files from pci-sysfs.c
55 *
56 * On error unwind, but don't propogate the error to the caller
57 * as it is ok to set up the PCI bus without these files.
55 */ 58 */
56static void pci_create_legacy_files(struct pci_bus *b) 59static void pci_create_legacy_files(struct pci_bus *b)
57{ 60{
61 int error;
62
58 b->legacy_io = kzalloc(sizeof(struct bin_attribute) * 2, 63 b->legacy_io = kzalloc(sizeof(struct bin_attribute) * 2,
59 GFP_ATOMIC); 64 GFP_ATOMIC);
60 if (b->legacy_io) { 65 if (!b->legacy_io)
61 b->legacy_io->attr.name = "legacy_io"; 66 goto kzalloc_err;
62 b->legacy_io->size = 0xffff; 67
63 b->legacy_io->attr.mode = S_IRUSR | S_IWUSR; 68 b->legacy_io->attr.name = "legacy_io";
64 b->legacy_io->read = pci_read_legacy_io; 69 b->legacy_io->size = 0xffff;
65 b->legacy_io->write = pci_write_legacy_io; 70 b->legacy_io->attr.mode = S_IRUSR | S_IWUSR;
66 device_create_bin_file(&b->dev, b->legacy_io); 71 b->legacy_io->read = pci_read_legacy_io;
67 72 b->legacy_io->write = pci_write_legacy_io;
68 /* Allocated above after the legacy_io struct */ 73 error = device_create_bin_file(&b->dev, b->legacy_io);
69 b->legacy_mem = b->legacy_io + 1; 74 if (error)
70 b->legacy_mem->attr.name = "legacy_mem"; 75 goto legacy_io_err;
71 b->legacy_mem->size = 1024*1024; 76
72 b->legacy_mem->attr.mode = S_IRUSR | S_IWUSR; 77 /* Allocated above after the legacy_io struct */
73 b->legacy_mem->mmap = pci_mmap_legacy_mem; 78 b->legacy_mem = b->legacy_io + 1;
74 device_create_bin_file(&b->dev, b->legacy_mem); 79 b->legacy_mem->attr.name = "legacy_mem";
75 } 80 b->legacy_mem->size = 1024*1024;
81 b->legacy_mem->attr.mode = S_IRUSR | S_IWUSR;
82 b->legacy_mem->mmap = pci_mmap_legacy_mem;
83 error = device_create_bin_file(&b->dev, b->legacy_mem);
84 if (error)
85 goto legacy_mem_err;
86
87 return;
88
89legacy_mem_err:
90 device_remove_bin_file(&b->dev, b->legacy_io);
91legacy_io_err:
92 kfree(b->legacy_io);
93 b->legacy_io = NULL;
94kzalloc_err:
95 printk(KERN_WARNING "pci: warning: could not create legacy I/O port "
96 "and ISA memory resources to sysfs\n");
97 return;
76} 98}
77 99
78void pci_remove_legacy_files(struct pci_bus *b) 100void pci_remove_legacy_files(struct pci_bus *b)
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index 0fb365074288..9236e7f869c8 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -1756,9 +1756,14 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_VIA, 0x324e, quirk_via_cx700_pci_parking_c
1756 */ 1756 */
1757static void __devinit quirk_brcm_570x_limit_vpd(struct pci_dev *dev) 1757static void __devinit quirk_brcm_570x_limit_vpd(struct pci_dev *dev)
1758{ 1758{
1759 /* Only disable the VPD capability for 5706, 5708, and 5709 rev. A */ 1759 /*
1760 * Only disable the VPD capability for 5706, 5706S, 5708,
1761 * 5708S and 5709 rev. A
1762 */
1760 if ((dev->device == PCI_DEVICE_ID_NX2_5706) || 1763 if ((dev->device == PCI_DEVICE_ID_NX2_5706) ||
1764 (dev->device == PCI_DEVICE_ID_NX2_5706S) ||
1761 (dev->device == PCI_DEVICE_ID_NX2_5708) || 1765 (dev->device == PCI_DEVICE_ID_NX2_5708) ||
1766 (dev->device == PCI_DEVICE_ID_NX2_5708S) ||
1762 ((dev->device == PCI_DEVICE_ID_NX2_5709) && 1767 ((dev->device == PCI_DEVICE_ID_NX2_5709) &&
1763 (dev->revision & 0xf0) == 0x0)) { 1768 (dev->revision & 0xf0) == 0x0)) {
1764 if (dev->vpd) 1769 if (dev->vpd)
diff --git a/drivers/pcmcia/at91_cf.c b/drivers/pcmcia/at91_cf.c
index 684968558c19..a0ffb8ebfe00 100644
--- a/drivers/pcmcia/at91_cf.c
+++ b/drivers/pcmcia/at91_cf.c
@@ -18,13 +18,13 @@
18 18
19#include <pcmcia/ss.h> 19#include <pcmcia/ss.h>
20 20
21#include <asm/hardware.h> 21#include <mach/hardware.h>
22#include <asm/io.h> 22#include <asm/io.h>
23#include <asm/sizes.h> 23#include <asm/sizes.h>
24#include <asm/gpio.h> 24#include <asm/gpio.h>
25 25
26#include <asm/arch/board.h> 26#include <mach/board.h>
27#include <asm/arch/at91rm9200_mc.h> 27#include <mach/at91rm9200_mc.h>
28 28
29 29
30/* 30/*
diff --git a/drivers/pcmcia/omap_cf.c b/drivers/pcmcia/omap_cf.c
index 569b746b5731..f3736398900e 100644
--- a/drivers/pcmcia/omap_cf.c
+++ b/drivers/pcmcia/omap_cf.c
@@ -19,12 +19,12 @@
19 19
20#include <pcmcia/ss.h> 20#include <pcmcia/ss.h>
21 21
22#include <asm/hardware.h> 22#include <mach/hardware.h>
23#include <asm/io.h> 23#include <asm/io.h>
24#include <asm/sizes.h> 24#include <asm/sizes.h>
25 25
26#include <asm/arch/mux.h> 26#include <mach/mux.h>
27#include <asm/arch/tc.h> 27#include <mach/tc.h>
28 28
29 29
30/* NOTE: don't expect this to support many I/O cards. The 16xx chips have 30/* NOTE: don't expect this to support many I/O cards. The 16xx chips have
diff --git a/drivers/pcmcia/pxa2xx_base.c b/drivers/pcmcia/pxa2xx_base.c
index ccfdf1969a7f..1b07af5a2ed3 100644
--- a/drivers/pcmcia/pxa2xx_base.c
+++ b/drivers/pcmcia/pxa2xx_base.c
@@ -24,12 +24,12 @@
24#include <linux/spinlock.h> 24#include <linux/spinlock.h>
25#include <linux/platform_device.h> 25#include <linux/platform_device.h>
26 26
27#include <asm/hardware.h> 27#include <mach/hardware.h>
28#include <asm/io.h> 28#include <asm/io.h>
29#include <asm/irq.h> 29#include <asm/irq.h>
30#include <asm/system.h> 30#include <asm/system.h>
31#include <asm/arch/pxa-regs.h> 31#include <mach/pxa-regs.h>
32#include <asm/arch/pxa2xx-regs.h> 32#include <mach/pxa2xx-regs.h>
33 33
34#include <pcmcia/cs_types.h> 34#include <pcmcia/cs_types.h>
35#include <pcmcia/ss.h> 35#include <pcmcia/ss.h>
diff --git a/drivers/pcmcia/pxa2xx_cm_x270.c b/drivers/pcmcia/pxa2xx_cm_x270.c
index bb95db7d2b76..bcff5cfed051 100644
--- a/drivers/pcmcia/pxa2xx_cm_x270.c
+++ b/drivers/pcmcia/pxa2xx_cm_x270.c
@@ -16,7 +16,7 @@
16#include <linux/gpio.h> 16#include <linux/gpio.h>
17 17
18#include <asm/mach-types.h> 18#include <asm/mach-types.h>
19#include <asm/arch/pxa-regs.h> 19#include <mach/pxa-regs.h>
20 20
21#include "soc_common.h" 21#include "soc_common.h"
22 22
diff --git a/drivers/pcmcia/pxa2xx_lubbock.c b/drivers/pcmcia/pxa2xx_lubbock.c
index 881ec8a8e389..37ec55df086e 100644
--- a/drivers/pcmcia/pxa2xx_lubbock.c
+++ b/drivers/pcmcia/pxa2xx_lubbock.c
@@ -21,11 +21,11 @@
21#include <linux/init.h> 21#include <linux/init.h>
22#include <linux/delay.h> 22#include <linux/delay.h>
23 23
24#include <asm/hardware.h> 24#include <mach/hardware.h>
25#include <asm/hardware/sa1111.h> 25#include <asm/hardware/sa1111.h>
26#include <asm/mach-types.h> 26#include <asm/mach-types.h>
27#include <asm/arch/pxa-regs.h> 27#include <mach/pxa-regs.h>
28#include <asm/arch/lubbock.h> 28#include <mach/lubbock.h>
29 29
30#include "sa1111_generic.h" 30#include "sa1111_generic.h"
31 31
diff --git a/drivers/pcmcia/pxa2xx_mainstone.c b/drivers/pcmcia/pxa2xx_mainstone.c
index 92d1cc33808c..877001db4916 100644
--- a/drivers/pcmcia/pxa2xx_mainstone.c
+++ b/drivers/pcmcia/pxa2xx_mainstone.c
@@ -21,12 +21,12 @@
21 21
22#include <pcmcia/ss.h> 22#include <pcmcia/ss.h>
23 23
24#include <asm/hardware.h> 24#include <mach/hardware.h>
25#include <asm/mach-types.h> 25#include <asm/mach-types.h>
26#include <asm/irq.h> 26#include <asm/irq.h>
27 27
28#include <asm/arch/pxa-regs.h> 28#include <mach/pxa-regs.h>
29#include <asm/arch/mainstone.h> 29#include <mach/mainstone.h>
30 30
31#include "soc_common.h" 31#include "soc_common.h"
32 32
diff --git a/drivers/pcmcia/pxa2xx_palmtx.c b/drivers/pcmcia/pxa2xx_palmtx.c
index 4abde190c1f5..a8771ffc61e8 100644
--- a/drivers/pcmcia/pxa2xx_palmtx.c
+++ b/drivers/pcmcia/pxa2xx_palmtx.c
@@ -16,8 +16,8 @@
16 16
17#include <asm/mach-types.h> 17#include <asm/mach-types.h>
18 18
19#include <asm/arch/gpio.h> 19#include <mach/gpio.h>
20#include <asm/arch/palmtx.h> 20#include <mach/palmtx.h>
21 21
22#include "soc_common.h" 22#include "soc_common.h"
23 23
diff --git a/drivers/pcmcia/pxa2xx_sharpsl.c b/drivers/pcmcia/pxa2xx_sharpsl.c
index d71f93d45833..1cd02f5a23a0 100644
--- a/drivers/pcmcia/pxa2xx_sharpsl.c
+++ b/drivers/pcmcia/pxa2xx_sharpsl.c
@@ -19,7 +19,7 @@
19#include <linux/platform_device.h> 19#include <linux/platform_device.h>
20 20
21#include <asm/mach-types.h> 21#include <asm/mach-types.h>
22#include <asm/hardware.h> 22#include <mach/hardware.h>
23#include <asm/irq.h> 23#include <asm/irq.h>
24#include <asm/hardware/scoop.h> 24#include <asm/hardware/scoop.h>
25 25
diff --git a/drivers/pcmcia/sa1100_assabet.c b/drivers/pcmcia/sa1100_assabet.c
index ce133ce81c10..f424146a2bc9 100644
--- a/drivers/pcmcia/sa1100_assabet.c
+++ b/drivers/pcmcia/sa1100_assabet.c
@@ -11,11 +11,11 @@
11#include <linux/device.h> 11#include <linux/device.h>
12#include <linux/init.h> 12#include <linux/init.h>
13 13
14#include <asm/hardware.h> 14#include <mach/hardware.h>
15#include <asm/mach-types.h> 15#include <asm/mach-types.h>
16#include <asm/irq.h> 16#include <asm/irq.h>
17#include <asm/signal.h> 17#include <asm/signal.h>
18#include <asm/arch/assabet.h> 18#include <mach/assabet.h>
19 19
20#include "sa1100_generic.h" 20#include "sa1100_generic.h"
21 21
diff --git a/drivers/pcmcia/sa1100_badge4.c b/drivers/pcmcia/sa1100_badge4.c
index 607c3f326eca..1ca9737ea79e 100644
--- a/drivers/pcmcia/sa1100_badge4.c
+++ b/drivers/pcmcia/sa1100_badge4.c
@@ -18,9 +18,9 @@
18#include <linux/errno.h> 18#include <linux/errno.h>
19#include <linux/init.h> 19#include <linux/init.h>
20 20
21#include <asm/hardware.h> 21#include <mach/hardware.h>
22#include <asm/mach-types.h> 22#include <asm/mach-types.h>
23#include <asm/arch/badge4.h> 23#include <mach/badge4.h>
24#include <asm/hardware/sa1111.h> 24#include <asm/hardware/sa1111.h>
25 25
26#include "sa1111_generic.h" 26#include "sa1111_generic.h"
diff --git a/drivers/pcmcia/sa1100_cerf.c b/drivers/pcmcia/sa1100_cerf.c
index 7c3951a2675d..63e6bc431a0d 100644
--- a/drivers/pcmcia/sa1100_cerf.c
+++ b/drivers/pcmcia/sa1100_cerf.c
@@ -11,10 +11,10 @@
11#include <linux/init.h> 11#include <linux/init.h>
12#include <linux/delay.h> 12#include <linux/delay.h>
13 13
14#include <asm/hardware.h> 14#include <mach/hardware.h>
15#include <asm/mach-types.h> 15#include <asm/mach-types.h>
16#include <asm/irq.h> 16#include <asm/irq.h>
17#include <asm/arch/cerf.h> 17#include <mach/cerf.h>
18#include "sa1100_generic.h" 18#include "sa1100_generic.h"
19 19
20#define CERF_SOCKET 1 20#define CERF_SOCKET 1
diff --git a/drivers/pcmcia/sa1100_h3600.c b/drivers/pcmcia/sa1100_h3600.c
index e5491879acd9..6de4e1b41d60 100644
--- a/drivers/pcmcia/sa1100_h3600.c
+++ b/drivers/pcmcia/sa1100_h3600.c
@@ -11,10 +11,10 @@
11#include <linux/init.h> 11#include <linux/init.h>
12#include <linux/delay.h> 12#include <linux/delay.h>
13 13
14#include <asm/hardware.h> 14#include <mach/hardware.h>
15#include <asm/irq.h> 15#include <asm/irq.h>
16#include <asm/mach-types.h> 16#include <asm/mach-types.h>
17#include <asm/arch/h3600.h> 17#include <mach/h3600.h>
18 18
19#include "sa1100_generic.h" 19#include "sa1100_generic.h"
20 20
diff --git a/drivers/pcmcia/sa1100_jornada720.c b/drivers/pcmcia/sa1100_jornada720.c
index 2167e6714d2d..57ca085473d5 100644
--- a/drivers/pcmcia/sa1100_jornada720.c
+++ b/drivers/pcmcia/sa1100_jornada720.c
@@ -10,7 +10,7 @@
10#include <linux/errno.h> 10#include <linux/errno.h>
11#include <linux/init.h> 11#include <linux/init.h>
12 12
13#include <asm/hardware.h> 13#include <mach/hardware.h>
14#include <asm/hardware/sa1111.h> 14#include <asm/hardware/sa1111.h>
15#include <asm/mach-types.h> 15#include <asm/mach-types.h>
16 16
diff --git a/drivers/pcmcia/sa1100_neponset.c b/drivers/pcmcia/sa1100_neponset.c
index 687492fcd5b4..4c41e86ccff9 100644
--- a/drivers/pcmcia/sa1100_neponset.c
+++ b/drivers/pcmcia/sa1100_neponset.c
@@ -9,9 +9,9 @@
9#include <linux/errno.h> 9#include <linux/errno.h>
10#include <linux/init.h> 10#include <linux/init.h>
11 11
12#include <asm/hardware.h> 12#include <mach/hardware.h>
13#include <asm/mach-types.h> 13#include <asm/mach-types.h>
14#include <asm/arch/neponset.h> 14#include <mach/neponset.h>
15#include <asm/hardware/sa1111.h> 15#include <asm/hardware/sa1111.h>
16 16
17#include "sa1111_generic.h" 17#include "sa1111_generic.h"
diff --git a/drivers/pcmcia/sa1100_shannon.c b/drivers/pcmcia/sa1100_shannon.c
index 494912fccc0d..46d8c1977c2a 100644
--- a/drivers/pcmcia/sa1100_shannon.c
+++ b/drivers/pcmcia/sa1100_shannon.c
@@ -9,9 +9,9 @@
9#include <linux/device.h> 9#include <linux/device.h>
10#include <linux/init.h> 10#include <linux/init.h>
11 11
12#include <asm/hardware.h> 12#include <mach/hardware.h>
13#include <asm/mach-types.h> 13#include <asm/mach-types.h>
14#include <asm/arch/shannon.h> 14#include <mach/shannon.h>
15#include <asm/irq.h> 15#include <asm/irq.h>
16#include "sa1100_generic.h" 16#include "sa1100_generic.h"
17 17
diff --git a/drivers/pcmcia/sa1100_simpad.c b/drivers/pcmcia/sa1100_simpad.c
index 42567de894b9..33a08ae09fdf 100644
--- a/drivers/pcmcia/sa1100_simpad.c
+++ b/drivers/pcmcia/sa1100_simpad.c
@@ -9,10 +9,10 @@
9#include <linux/device.h> 9#include <linux/device.h>
10#include <linux/init.h> 10#include <linux/init.h>
11 11
12#include <asm/hardware.h> 12#include <mach/hardware.h>
13#include <asm/mach-types.h> 13#include <asm/mach-types.h>
14#include <asm/irq.h> 14#include <asm/irq.h>
15#include <asm/arch/simpad.h> 15#include <mach/simpad.h>
16#include "sa1100_generic.h" 16#include "sa1100_generic.h"
17 17
18extern long get_cs3_shadow(void); 18extern long get_cs3_shadow(void);
diff --git a/drivers/pcmcia/sa1111_generic.c b/drivers/pcmcia/sa1111_generic.c
index 658cddfbcf29..6924d0ea8d32 100644
--- a/drivers/pcmcia/sa1111_generic.c
+++ b/drivers/pcmcia/sa1111_generic.c
@@ -14,7 +14,7 @@
14 14
15#include <pcmcia/ss.h> 15#include <pcmcia/ss.h>
16 16
17#include <asm/hardware.h> 17#include <mach/hardware.h>
18#include <asm/hardware/sa1111.h> 18#include <asm/hardware/sa1111.h>
19#include <asm/io.h> 19#include <asm/io.h>
20#include <asm/irq.h> 20#include <asm/irq.h>
diff --git a/drivers/pcmcia/sa11xx_base.c b/drivers/pcmcia/sa11xx_base.c
index 31a7abc55b23..7cb1273202cc 100644
--- a/drivers/pcmcia/sa11xx_base.c
+++ b/drivers/pcmcia/sa11xx_base.c
@@ -37,7 +37,7 @@
37#include <linux/kernel.h> 37#include <linux/kernel.h>
38#include <linux/spinlock.h> 38#include <linux/spinlock.h>
39 39
40#include <asm/hardware.h> 40#include <mach/hardware.h>
41#include <asm/io.h> 41#include <asm/io.h>
42#include <asm/irq.h> 42#include <asm/irq.h>
43#include <asm/system.h> 43#include <asm/system.h>
diff --git a/drivers/pcmcia/soc_common.c b/drivers/pcmcia/soc_common.c
index 8c21446996f2..c48f3f69bdaf 100644
--- a/drivers/pcmcia/soc_common.c
+++ b/drivers/pcmcia/soc_common.c
@@ -43,7 +43,7 @@
43#include <linux/spinlock.h> 43#include <linux/spinlock.h>
44#include <linux/cpufreq.h> 44#include <linux/cpufreq.h>
45 45
46#include <asm/hardware.h> 46#include <mach/hardware.h>
47#include <asm/io.h> 47#include <asm/io.h>
48#include <asm/system.h> 48#include <asm/system.h>
49 49
@@ -51,7 +51,7 @@
51 51
52/* FIXME: platform dependent resource declaration has to move out of this file */ 52/* FIXME: platform dependent resource declaration has to move out of this file */
53#ifdef CONFIG_ARCH_PXA 53#ifdef CONFIG_ARCH_PXA
54#include <asm/arch/pxa-regs.h> 54#include <mach/pxa-regs.h>
55#endif 55#endif
56 56
57#ifdef DEBUG 57#ifdef DEBUG
diff --git a/drivers/power/palmtx_battery.c b/drivers/power/palmtx_battery.c
index 244bb273a637..7035bfa41c62 100644
--- a/drivers/power/palmtx_battery.c
+++ b/drivers/power/palmtx_battery.c
@@ -22,7 +22,7 @@
22#include <linux/gpio.h> 22#include <linux/gpio.h>
23 23
24#include <asm/mach-types.h> 24#include <asm/mach-types.h>
25#include <asm/arch/palmtx.h> 25#include <mach/palmtx.h>
26 26
27static DEFINE_MUTEX(bat_lock); 27static DEFINE_MUTEX(bat_lock);
28static struct work_struct bat_work; 28static struct work_struct bat_work;
diff --git a/drivers/power/tosa_battery.c b/drivers/power/tosa_battery.c
index bf664fbd6610..2eab35aab311 100644
--- a/drivers/power/tosa_battery.c
+++ b/drivers/power/tosa_battery.c
@@ -19,7 +19,7 @@
19#include <linux/gpio.h> 19#include <linux/gpio.h>
20 20
21#include <asm/mach-types.h> 21#include <asm/mach-types.h>
22#include <asm/arch/tosa.h> 22#include <mach/tosa.h>
23 23
24static DEFINE_MUTEX(bat_lock); /* protects gpio pins */ 24static DEFINE_MUTEX(bat_lock); /* protects gpio pins */
25static struct work_struct bat_work; 25static struct work_struct bat_work;
diff --git a/drivers/rtc/rtc-at91rm9200.c b/drivers/rtc/rtc-at91rm9200.c
index cd32d05db773..4e888cc8be5b 100644
--- a/drivers/rtc/rtc-at91rm9200.c
+++ b/drivers/rtc/rtc-at91rm9200.c
@@ -29,7 +29,7 @@
29#include <linux/completion.h> 29#include <linux/completion.h>
30 30
31#include <asm/uaccess.h> 31#include <asm/uaccess.h>
32#include <asm/arch/at91_rtc.h> 32#include <mach/at91_rtc.h>
33 33
34 34
35#define AT91_RTC_FREQ 1 35#define AT91_RTC_FREQ 1
diff --git a/drivers/rtc/rtc-at91sam9.c b/drivers/rtc/rtc-at91sam9.c
index f0246ef413a4..2133f37906f2 100644
--- a/drivers/rtc/rtc-at91sam9.c
+++ b/drivers/rtc/rtc-at91sam9.c
@@ -19,8 +19,8 @@
19#include <linux/interrupt.h> 19#include <linux/interrupt.h>
20#include <linux/ioctl.h> 20#include <linux/ioctl.h>
21 21
22#include <asm/arch/board.h> 22#include <mach/board.h>
23#include <asm/arch/at91_rtt.h> 23#include <mach/at91_rtt.h>
24 24
25 25
26/* 26/*
diff --git a/drivers/rtc/rtc-dev.c b/drivers/rtc/rtc-dev.c
index 856cc1af40df..35dcc06eb3e2 100644
--- a/drivers/rtc/rtc-dev.c
+++ b/drivers/rtc/rtc-dev.c
@@ -13,7 +13,6 @@
13 13
14#include <linux/module.h> 14#include <linux/module.h>
15#include <linux/rtc.h> 15#include <linux/rtc.h>
16#include <linux/smp_lock.h>
17#include "rtc-core.h" 16#include "rtc-core.h"
18 17
19static dev_t rtc_devt; 18static dev_t rtc_devt;
@@ -27,11 +26,8 @@ static int rtc_dev_open(struct inode *inode, struct file *file)
27 struct rtc_device, char_dev); 26 struct rtc_device, char_dev);
28 const struct rtc_class_ops *ops = rtc->ops; 27 const struct rtc_class_ops *ops = rtc->ops;
29 28
30 lock_kernel(); 29 if (test_and_set_bit_lock(RTC_DEV_BUSY, &rtc->flags))
31 if (test_and_set_bit_lock(RTC_DEV_BUSY, &rtc->flags)) { 30 return -EBUSY;
32 err = -EBUSY;
33 goto out;
34 }
35 31
36 file->private_data = rtc; 32 file->private_data = rtc;
37 33
@@ -41,13 +37,11 @@ static int rtc_dev_open(struct inode *inode, struct file *file)
41 rtc->irq_data = 0; 37 rtc->irq_data = 0;
42 spin_unlock_irq(&rtc->irq_lock); 38 spin_unlock_irq(&rtc->irq_lock);
43 39
44 goto out; 40 return 0;
45 } 41 }
46 42
47 /* something has gone wrong */ 43 /* something has gone wrong */
48 clear_bit_unlock(RTC_DEV_BUSY, &rtc->flags); 44 clear_bit_unlock(RTC_DEV_BUSY, &rtc->flags);
49out:
50 unlock_kernel();
51 return err; 45 return err;
52} 46}
53 47
diff --git a/drivers/rtc/rtc-ep93xx.c b/drivers/rtc/rtc-ep93xx.c
index 1e99325270df..36e4ac0bd69c 100644
--- a/drivers/rtc/rtc-ep93xx.c
+++ b/drivers/rtc/rtc-ep93xx.c
@@ -12,7 +12,7 @@
12#include <linux/module.h> 12#include <linux/module.h>
13#include <linux/rtc.h> 13#include <linux/rtc.h>
14#include <linux/platform_device.h> 14#include <linux/platform_device.h>
15#include <asm/hardware.h> 15#include <mach/hardware.h>
16 16
17#define EP93XX_RTC_REG(x) (EP93XX_RTC_BASE + (x)) 17#define EP93XX_RTC_REG(x) (EP93XX_RTC_BASE + (x))
18#define EP93XX_RTC_DATA EP93XX_RTC_REG(0x0000) 18#define EP93XX_RTC_DATA EP93XX_RTC_REG(0x0000)
diff --git a/drivers/rtc/rtc-isl1208.c b/drivers/rtc/rtc-isl1208.c
index fbb90b1e4098..a81adab6e515 100644
--- a/drivers/rtc/rtc-isl1208.c
+++ b/drivers/rtc/rtc-isl1208.c
@@ -482,7 +482,7 @@ isl1208_sysfs_register(struct device *dev)
482static int 482static int
483isl1208_sysfs_unregister(struct device *dev) 483isl1208_sysfs_unregister(struct device *dev)
484{ 484{
485 device_remove_file(dev, &dev_attr_atrim); 485 device_remove_file(dev, &dev_attr_dtrim);
486 device_remove_file(dev, &dev_attr_atrim); 486 device_remove_file(dev, &dev_attr_atrim);
487 device_remove_file(dev, &dev_attr_usr); 487 device_remove_file(dev, &dev_attr_usr);
488 488
diff --git a/drivers/rtc/rtc-s3c.c b/drivers/rtc/rtc-s3c.c
index 54b1ebb01502..e7d19b6c265a 100644
--- a/drivers/rtc/rtc-s3c.c
+++ b/drivers/rtc/rtc-s3c.c
@@ -22,7 +22,7 @@
22#include <linux/clk.h> 22#include <linux/clk.h>
23#include <linux/log2.h> 23#include <linux/log2.h>
24 24
25#include <asm/hardware.h> 25#include <mach/hardware.h>
26#include <asm/uaccess.h> 26#include <asm/uaccess.h>
27#include <asm/io.h> 27#include <asm/io.h>
28#include <asm/irq.h> 28#include <asm/irq.h>
diff --git a/drivers/rtc/rtc-sa1100.c b/drivers/rtc/rtc-sa1100.c
index f47294c60148..66a9bb85bbe8 100644
--- a/drivers/rtc/rtc-sa1100.c
+++ b/drivers/rtc/rtc-sa1100.c
@@ -31,11 +31,11 @@
31#include <linux/pm.h> 31#include <linux/pm.h>
32#include <linux/bitops.h> 32#include <linux/bitops.h>
33 33
34#include <asm/hardware.h> 34#include <mach/hardware.h>
35#include <asm/irq.h> 35#include <asm/irq.h>
36 36
37#ifdef CONFIG_ARCH_PXA 37#ifdef CONFIG_ARCH_PXA
38#include <asm/arch/pxa-regs.h> 38#include <mach/pxa-regs.h>
39#endif 39#endif
40 40
41#define TIMER_FREQ CLOCK_TICK_RATE 41#define TIMER_FREQ CLOCK_TICK_RATE
diff --git a/drivers/scsi/arm/acornscsi-io.S b/drivers/scsi/arm/acornscsi-io.S
index 5cebe3105260..22171b2110a8 100644
--- a/drivers/scsi/arm/acornscsi-io.S
+++ b/drivers/scsi/arm/acornscsi-io.S
@@ -8,7 +8,7 @@
8#include <linux/linkage.h> 8#include <linux/linkage.h>
9 9
10#include <asm/assembler.h> 10#include <asm/assembler.h>
11#include <asm/hardware.h> 11#include <mach/hardware.h>
12 12
13#if defined(__APCS_32__) 13#if defined(__APCS_32__)
14#define LOADREGS(t,r,l...) ldm##t r, l 14#define LOADREGS(t,r,l...) ldm##t r, l
diff --git a/drivers/scsi/device_handler/scsi_dh_alua.c b/drivers/scsi/device_handler/scsi_dh_alua.c
index fcdd73f25625..994da56fffed 100644
--- a/drivers/scsi/device_handler/scsi_dh_alua.c
+++ b/drivers/scsi/device_handler/scsi_dh_alua.c
@@ -680,7 +680,7 @@ static int alua_prep_fn(struct scsi_device *sdev, struct request *req)
680 680
681} 681}
682 682
683const struct scsi_dh_devlist alua_dev_list[] = { 683static const struct scsi_dh_devlist alua_dev_list[] = {
684 {"HP", "MSA VOLUME" }, 684 {"HP", "MSA VOLUME" },
685 {"HP", "HSV101" }, 685 {"HP", "HSV101" },
686 {"HP", "HSV111" }, 686 {"HP", "HSV111" },
diff --git a/drivers/scsi/device_handler/scsi_dh_emc.c b/drivers/scsi/device_handler/scsi_dh_emc.c
index aa46b131b20e..b9d23e9e9a44 100644
--- a/drivers/scsi/device_handler/scsi_dh_emc.c
+++ b/drivers/scsi/device_handler/scsi_dh_emc.c
@@ -562,7 +562,7 @@ done:
562 return result; 562 return result;
563} 563}
564 564
565const struct scsi_dh_devlist clariion_dev_list[] = { 565static const struct scsi_dh_devlist clariion_dev_list[] = {
566 {"DGC", "RAID"}, 566 {"DGC", "RAID"},
567 {"DGC", "DISK"}, 567 {"DGC", "DISK"},
568 {"DGC", "VRAID"}, 568 {"DGC", "VRAID"},
diff --git a/drivers/scsi/device_handler/scsi_dh_hp_sw.c b/drivers/scsi/device_handler/scsi_dh_hp_sw.c
index 9c7a1f8ebb72..a6a4ef3ad51c 100644
--- a/drivers/scsi/device_handler/scsi_dh_hp_sw.c
+++ b/drivers/scsi/device_handler/scsi_dh_hp_sw.c
@@ -282,7 +282,7 @@ static int hp_sw_activate(struct scsi_device *sdev)
282 return ret; 282 return ret;
283} 283}
284 284
285const struct scsi_dh_devlist hp_sw_dh_data_list[] = { 285static const struct scsi_dh_devlist hp_sw_dh_data_list[] = {
286 {"COMPAQ", "MSA1000 VOLUME"}, 286 {"COMPAQ", "MSA1000 VOLUME"},
287 {"COMPAQ", "HSV110"}, 287 {"COMPAQ", "HSV110"},
288 {"HP", "HSV100"}, 288 {"HP", "HSV100"},
diff --git a/drivers/scsi/device_handler/scsi_dh_rdac.c b/drivers/scsi/device_handler/scsi_dh_rdac.c
index b093a501f8ae..e7c7b4ebc1fe 100644
--- a/drivers/scsi/device_handler/scsi_dh_rdac.c
+++ b/drivers/scsi/device_handler/scsi_dh_rdac.c
@@ -574,7 +574,7 @@ static int rdac_check_sense(struct scsi_device *sdev,
574 return SCSI_RETURN_NOT_HANDLED; 574 return SCSI_RETURN_NOT_HANDLED;
575} 575}
576 576
577const struct scsi_dh_devlist rdac_dev_list[] = { 577static const struct scsi_dh_devlist rdac_dev_list[] = {
578 {"IBM", "1722"}, 578 {"IBM", "1722"},
579 {"IBM", "1724"}, 579 {"IBM", "1724"},
580 {"IBM", "1726"}, 580 {"IBM", "1726"},
diff --git a/drivers/serial/21285.c b/drivers/serial/21285.c
index 6558a4037806..f31c6698419c 100644
--- a/drivers/serial/21285.c
+++ b/drivers/serial/21285.c
@@ -19,7 +19,7 @@
19#include <asm/irq.h> 19#include <asm/irq.h>
20#include <asm/mach-types.h> 20#include <asm/mach-types.h>
21#include <asm/hardware/dec21285.h> 21#include <asm/hardware/dec21285.h>
22#include <asm/hardware.h> 22#include <mach/hardware.h>
23 23
24#define BAUD_BASE (mem_fclk_21285/64) 24#define BAUD_BASE (mem_fclk_21285/64)
25 25
diff --git a/drivers/serial/atmel_serial.c b/drivers/serial/atmel_serial.c
index 1fee12c1f4f8..3a6da80b081c 100644
--- a/drivers/serial/atmel_serial.c
+++ b/drivers/serial/atmel_serial.c
@@ -42,11 +42,11 @@
42#include <asm/io.h> 42#include <asm/io.h>
43 43
44#include <asm/mach/serial_at91.h> 44#include <asm/mach/serial_at91.h>
45#include <asm/arch/board.h> 45#include <mach/board.h>
46 46
47#ifdef CONFIG_ARM 47#ifdef CONFIG_ARM
48#include <asm/arch/cpu.h> 48#include <mach/cpu.h>
49#include <asm/arch/gpio.h> 49#include <mach/gpio.h>
50#endif 50#endif
51 51
52#define PDC_BUFFER_SIZE 512 52#define PDC_BUFFER_SIZE 512
diff --git a/drivers/serial/clps711x.c b/drivers/serial/clps711x.c
index fc1fa9267c59..459f3420a429 100644
--- a/drivers/serial/clps711x.c
+++ b/drivers/serial/clps711x.c
@@ -39,7 +39,7 @@
39#include <linux/serial_core.h> 39#include <linux/serial_core.h>
40#include <linux/serial.h> 40#include <linux/serial.h>
41 41
42#include <asm/hardware.h> 42#include <mach/hardware.h>
43#include <asm/io.h> 43#include <asm/io.h>
44#include <asm/irq.h> 44#include <asm/irq.h>
45#include <asm/hardware/clps7111.h> 45#include <asm/hardware/clps7111.h>
diff --git a/drivers/serial/imx.c b/drivers/serial/imx.c
index e0da4dc7bbf6..6a29f9330a73 100644
--- a/drivers/serial/imx.c
+++ b/drivers/serial/imx.c
@@ -44,8 +44,8 @@
44 44
45#include <asm/io.h> 45#include <asm/io.h>
46#include <asm/irq.h> 46#include <asm/irq.h>
47#include <asm/hardware.h> 47#include <mach/hardware.h>
48#include <asm/arch/imx-uart.h> 48#include <mach/imx-uart.h>
49 49
50/* Register definitions */ 50/* Register definitions */
51#define URXD0 0x0 /* Receiver Register */ 51#define URXD0 0x0 /* Receiver Register */
diff --git a/drivers/serial/netx-serial.c b/drivers/serial/netx-serial.c
index 9f8ccb735c19..3f489329e8d3 100644
--- a/drivers/serial/netx-serial.c
+++ b/drivers/serial/netx-serial.c
@@ -35,8 +35,8 @@
35 35
36#include <asm/io.h> 36#include <asm/io.h>
37#include <asm/irq.h> 37#include <asm/irq.h>
38#include <asm/hardware.h> 38#include <mach/hardware.h>
39#include <asm/arch/netx-regs.h> 39#include <mach/netx-regs.h>
40 40
41/* We've been assigned a range on the "Low-density serial ports" major */ 41/* We've been assigned a range on the "Low-density serial ports" major */
42#define SERIAL_NX_MAJOR 204 42#define SERIAL_NX_MAJOR 204
diff --git a/drivers/serial/pxa.c b/drivers/serial/pxa.c
index b9a93f326fb8..f7a0d37c4221 100644
--- a/drivers/serial/pxa.c
+++ b/drivers/serial/pxa.c
@@ -45,9 +45,9 @@
45#include <linux/clk.h> 45#include <linux/clk.h>
46 46
47#include <asm/io.h> 47#include <asm/io.h>
48#include <asm/hardware.h> 48#include <mach/hardware.h>
49#include <asm/irq.h> 49#include <asm/irq.h>
50#include <asm/arch/pxa-regs.h> 50#include <mach/pxa-regs.h>
51 51
52 52
53struct uart_pxa_port { 53struct uart_pxa_port {
diff --git a/drivers/serial/s3c2400.c b/drivers/serial/s3c2400.c
index a1102053e553..c8b4266ac35f 100644
--- a/drivers/serial/s3c2400.c
+++ b/drivers/serial/s3c2400.c
@@ -17,10 +17,10 @@
17 17
18#include <asm/irq.h> 18#include <asm/irq.h>
19 19
20#include <asm/hardware.h> 20#include <mach/hardware.h>
21 21
22#include <asm/plat-s3c/regs-serial.h> 22#include <asm/plat-s3c/regs-serial.h>
23#include <asm/arch/regs-gpio.h> 23#include <mach/regs-gpio.h>
24 24
25#include "samsung.h" 25#include "samsung.h"
26 26
diff --git a/drivers/serial/s3c2410.c b/drivers/serial/s3c2410.c
index c5f03f41686f..40a2531b5541 100644
--- a/drivers/serial/s3c2410.c
+++ b/drivers/serial/s3c2410.c
@@ -19,10 +19,10 @@
19#include <linux/serial.h> 19#include <linux/serial.h>
20 20
21#include <asm/irq.h> 21#include <asm/irq.h>
22#include <asm/hardware.h> 22#include <mach/hardware.h>
23 23
24#include <asm/plat-s3c/regs-serial.h> 24#include <asm/plat-s3c/regs-serial.h>
25#include <asm/arch/regs-gpio.h> 25#include <mach/regs-gpio.h>
26 26
27#include "samsung.h" 27#include "samsung.h"
28 28
diff --git a/drivers/serial/s3c2412.c b/drivers/serial/s3c2412.c
index ce0c220e3e92..d0170319c729 100644
--- a/drivers/serial/s3c2412.c
+++ b/drivers/serial/s3c2412.c
@@ -19,10 +19,10 @@
19#include <linux/serial.h> 19#include <linux/serial.h>
20 20
21#include <asm/irq.h> 21#include <asm/irq.h>
22#include <asm/hardware.h> 22#include <mach/hardware.h>
23 23
24#include <asm/plat-s3c/regs-serial.h> 24#include <asm/plat-s3c/regs-serial.h>
25#include <asm/arch/regs-gpio.h> 25#include <mach/regs-gpio.h>
26 26
27#include "samsung.h" 27#include "samsung.h"
28 28
diff --git a/drivers/serial/s3c2440.c b/drivers/serial/s3c2440.c
index 38f954bd39c6..d4a2b17b2498 100644
--- a/drivers/serial/s3c2440.c
+++ b/drivers/serial/s3c2440.c
@@ -19,10 +19,10 @@
19#include <linux/serial.h> 19#include <linux/serial.h>
20 20
21#include <asm/irq.h> 21#include <asm/irq.h>
22#include <asm/hardware.h> 22#include <mach/hardware.h>
23 23
24#include <asm/plat-s3c/regs-serial.h> 24#include <asm/plat-s3c/regs-serial.h>
25#include <asm/arch/regs-gpio.h> 25#include <mach/regs-gpio.h>
26 26
27#include "samsung.h" 27#include "samsung.h"
28 28
diff --git a/drivers/serial/sa1100.c b/drivers/serial/sa1100.c
index a5e76cc18073..b24a25ea6bc5 100644
--- a/drivers/serial/sa1100.c
+++ b/drivers/serial/sa1100.c
@@ -39,7 +39,7 @@
39 39
40#include <asm/io.h> 40#include <asm/io.h>
41#include <asm/irq.h> 41#include <asm/irq.h>
42#include <asm/hardware.h> 42#include <mach/hardware.h>
43#include <asm/mach/serial_sa1100.h> 43#include <asm/mach/serial_sa1100.h>
44 44
45/* We've been assigned a range on the "Low-density serial ports" major */ 45/* We've been assigned a range on the "Low-density serial ports" major */
diff --git a/drivers/serial/samsung.c b/drivers/serial/samsung.c
index d852f83f8900..5a88b3f9fe9b 100644
--- a/drivers/serial/samsung.c
+++ b/drivers/serial/samsung.c
@@ -45,10 +45,10 @@
45 45
46#include <asm/irq.h> 46#include <asm/irq.h>
47 47
48#include <asm/hardware.h> 48#include <mach/hardware.h>
49 49
50#include <asm/plat-s3c/regs-serial.h> 50#include <asm/plat-s3c/regs-serial.h>
51#include <asm/arch/regs-gpio.h> 51#include <mach/regs-gpio.h>
52 52
53#include "samsung.h" 53#include "samsung.h"
54 54
diff --git a/drivers/serial/serial_ks8695.c b/drivers/serial/serial_ks8695.c
index 0edbc5dd378b..b9cbfc87f616 100644
--- a/drivers/serial/serial_ks8695.c
+++ b/drivers/serial/serial_ks8695.c
@@ -26,8 +26,8 @@
26#include <asm/irq.h> 26#include <asm/irq.h>
27#include <asm/mach/irq.h> 27#include <asm/mach/irq.h>
28 28
29#include <asm/arch/regs-uart.h> 29#include <mach/regs-uart.h>
30#include <asm/arch/regs-irq.h> 30#include <mach/regs-irq.h>
31 31
32#if defined(CONFIG_SERIAL_KS8695_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) 32#if defined(CONFIG_SERIAL_KS8695_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ)
33#define SUPPORT_SYSRQ 33#define SUPPORT_SYSRQ
diff --git a/drivers/spi/atmel_spi.c b/drivers/spi/atmel_spi.c
index 95190c619c10..02f9320f3efc 100644
--- a/drivers/spi/atmel_spi.c
+++ b/drivers/spi/atmel_spi.c
@@ -20,9 +20,9 @@
20#include <linux/spi/spi.h> 20#include <linux/spi/spi.h>
21 21
22#include <asm/io.h> 22#include <asm/io.h>
23#include <asm/arch/board.h> 23#include <mach/board.h>
24#include <asm/arch/gpio.h> 24#include <mach/gpio.h>
25#include <asm/arch/cpu.h> 25#include <mach/cpu.h>
26 26
27#include "atmel_spi.h" 27#include "atmel_spi.h"
28 28
diff --git a/drivers/spi/omap2_mcspi.c b/drivers/spi/omap2_mcspi.c
index f6f987bb71ca..9d2186fd74aa 100644
--- a/drivers/spi/omap2_mcspi.c
+++ b/drivers/spi/omap2_mcspi.c
@@ -35,8 +35,8 @@
35 35
36#include <linux/spi/spi.h> 36#include <linux/spi/spi.h>
37 37
38#include <asm/arch/dma.h> 38#include <mach/dma.h>
39#include <asm/arch/clock.h> 39#include <mach/clock.h>
40 40
41 41
42#define OMAP2_MCSPI_MAX_FREQ 48000000 42#define OMAP2_MCSPI_MAX_FREQ 48000000
diff --git a/drivers/spi/omap_uwire.c b/drivers/spi/omap_uwire.c
index d9ae111c27ae..5515eb97d7c5 100644
--- a/drivers/spi/omap_uwire.c
+++ b/drivers/spi/omap_uwire.c
@@ -47,12 +47,12 @@
47 47
48#include <asm/system.h> 48#include <asm/system.h>
49#include <asm/irq.h> 49#include <asm/irq.h>
50#include <asm/hardware.h> 50#include <mach/hardware.h>
51#include <asm/io.h> 51#include <asm/io.h>
52#include <asm/mach-types.h> 52#include <asm/mach-types.h>
53 53
54#include <asm/arch/mux.h> 54#include <mach/mux.h>
55#include <asm/arch/omap730.h> /* OMAP730_IO_CONF registers */ 55#include <mach/omap730.h> /* OMAP730_IO_CONF registers */
56 56
57 57
58/* FIXME address is now a platform device resource, 58/* FIXME address is now a platform device resource,
diff --git a/drivers/spi/pxa2xx_spi.c b/drivers/spi/pxa2xx_spi.c
index 067299d6d192..34c7c9875681 100644
--- a/drivers/spi/pxa2xx_spi.c
+++ b/drivers/spi/pxa2xx_spi.c
@@ -31,15 +31,14 @@
31 31
32#include <asm/io.h> 32#include <asm/io.h>
33#include <asm/irq.h> 33#include <asm/irq.h>
34#include <asm/hardware.h>
35#include <asm/delay.h> 34#include <asm/delay.h>
36#include <asm/dma.h> 35#include <asm/dma.h>
37 36
38#include <asm/arch/hardware.h> 37#include <mach/hardware.h>
39#include <asm/arch/pxa-regs.h> 38#include <mach/pxa-regs.h>
40#include <asm/arch/regs-ssp.h> 39#include <mach/regs-ssp.h>
41#include <asm/arch/ssp.h> 40#include <mach/ssp.h>
42#include <asm/arch/pxa2xx_spi.h> 41#include <mach/pxa2xx_spi.h>
43 42
44MODULE_AUTHOR("Stephen Street"); 43MODULE_AUTHOR("Stephen Street");
45MODULE_DESCRIPTION("PXA2xx SSP SPI Controller"); 44MODULE_DESCRIPTION("PXA2xx SSP SPI Controller");
diff --git a/drivers/spi/spi_imx.c b/drivers/spi/spi_imx.c
index 6fb77fcc4971..61ba147e384d 100644
--- a/drivers/spi/spi_imx.c
+++ b/drivers/spi/spi_imx.c
@@ -33,12 +33,11 @@
33 33
34#include <asm/io.h> 34#include <asm/io.h>
35#include <asm/irq.h> 35#include <asm/irq.h>
36#include <asm/hardware.h>
37#include <asm/delay.h> 36#include <asm/delay.h>
38 37
39#include <asm/arch/hardware.h> 38#include <mach/hardware.h>
40#include <asm/arch/imx-dma.h> 39#include <mach/imx-dma.h>
41#include <asm/arch/spi_imx.h> 40#include <mach/spi_imx.h>
42 41
43/*-------------------------------------------------------------------------*/ 42/*-------------------------------------------------------------------------*/
44/* SPI Registers offsets from peripheral base address */ 43/* SPI Registers offsets from peripheral base address */
diff --git a/drivers/spi/spi_s3c24xx.c b/drivers/spi/spi_s3c24xx.c
index 21661c7959c8..98abc73c1a1d 100644
--- a/drivers/spi/spi_s3c24xx.c
+++ b/drivers/spi/spi_s3c24xx.c
@@ -25,11 +25,11 @@
25 25
26#include <asm/io.h> 26#include <asm/io.h>
27#include <asm/dma.h> 27#include <asm/dma.h>
28#include <asm/hardware.h> 28#include <mach/hardware.h>
29 29
30#include <asm/arch/regs-gpio.h> 30#include <mach/regs-gpio.h>
31#include <asm/plat-s3c24xx/regs-spi.h> 31#include <asm/plat-s3c24xx/regs-spi.h>
32#include <asm/arch/spi.h> 32#include <mach/spi.h>
33 33
34struct s3c24xx_spi { 34struct s3c24xx_spi {
35 /* bitbang has to be first */ 35 /* bitbang has to be first */
diff --git a/drivers/spi/spi_s3c24xx_gpio.c b/drivers/spi/spi_s3c24xx_gpio.c
index e33f6145c560..cc1f647f579b 100644
--- a/drivers/spi/spi_s3c24xx_gpio.c
+++ b/drivers/spi/spi_s3c24xx_gpio.c
@@ -21,9 +21,9 @@
21#include <linux/spi/spi.h> 21#include <linux/spi/spi.h>
22#include <linux/spi/spi_bitbang.h> 22#include <linux/spi/spi_bitbang.h>
23 23
24#include <asm/arch/regs-gpio.h> 24#include <mach/regs-gpio.h>
25#include <asm/arch/spi-gpio.h> 25#include <mach/spi-gpio.h>
26#include <asm/hardware.h> 26#include <mach/hardware.h>
27 27
28struct s3c2410_spigpio { 28struct s3c2410_spigpio {
29 struct spi_bitbang bitbang; 29 struct spi_bitbang bitbang;
diff --git a/drivers/usb/gadget/at91_udc.c b/drivers/usb/gadget/at91_udc.c
index e2d8a5d86c40..a8a1de413321 100644
--- a/drivers/usb/gadget/at91_udc.c
+++ b/drivers/usb/gadget/at91_udc.c
@@ -40,16 +40,15 @@
40#include <linux/usb/gadget.h> 40#include <linux/usb/gadget.h>
41 41
42#include <asm/byteorder.h> 42#include <asm/byteorder.h>
43#include <asm/hardware.h> 43#include <mach/hardware.h>
44#include <asm/io.h> 44#include <asm/io.h>
45#include <asm/irq.h> 45#include <asm/irq.h>
46#include <asm/system.h> 46#include <asm/system.h>
47#include <asm/mach-types.h>
48#include <asm/gpio.h> 47#include <asm/gpio.h>
49 48
50#include <asm/arch/board.h> 49#include <mach/board.h>
51#include <asm/arch/cpu.h> 50#include <mach/cpu.h>
52#include <asm/arch/at91sam9261_matrix.h> 51#include <mach/at91sam9261_matrix.h>
53 52
54#include "at91_udc.h" 53#include "at91_udc.h"
55 54
diff --git a/drivers/usb/gadget/atmel_usba_udc.c b/drivers/usb/gadget/atmel_usba_udc.c
index 07e5a0b5dcda..ae30ab1d264f 100644
--- a/drivers/usb/gadget/atmel_usba_udc.c
+++ b/drivers/usb/gadget/atmel_usba_udc.c
@@ -22,7 +22,7 @@
22#include <linux/delay.h> 22#include <linux/delay.h>
23 23
24#include <asm/gpio.h> 24#include <asm/gpio.h>
25#include <asm/arch/board.h> 25#include <mach/board.h>
26 26
27#include "atmel_usba_udc.h" 27#include "atmel_usba_udc.h"
28 28
@@ -334,7 +334,7 @@ static void toggle_bias(int is_on)
334 334
335#elif defined(CONFIG_ARCH_AT91) 335#elif defined(CONFIG_ARCH_AT91)
336 336
337#include <asm/arch/at91_pmc.h> 337#include <mach/at91_pmc.h>
338 338
339static void toggle_bias(int is_on) 339static void toggle_bias(int is_on)
340{ 340{
diff --git a/drivers/usb/gadget/lh7a40x_udc.h b/drivers/usb/gadget/lh7a40x_udc.h
index 1ecfd6366b9a..ca861203a301 100644
--- a/drivers/usb/gadget/lh7a40x_udc.h
+++ b/drivers/usb/gadget/lh7a40x_udc.h
@@ -47,7 +47,7 @@
47#include <asm/irq.h> 47#include <asm/irq.h>
48#include <asm/system.h> 48#include <asm/system.h>
49#include <asm/unaligned.h> 49#include <asm/unaligned.h>
50#include <asm/hardware.h> 50#include <mach/hardware.h>
51 51
52#include <linux/usb/ch9.h> 52#include <linux/usb/ch9.h>
53#include <linux/usb/gadget.h> 53#include <linux/usb/gadget.h>
diff --git a/drivers/usb/gadget/omap_udc.c b/drivers/usb/gadget/omap_udc.c
index 395bd1844482..376e80c07530 100644
--- a/drivers/usb/gadget/omap_udc.c
+++ b/drivers/usb/gadget/omap_udc.c
@@ -52,8 +52,8 @@
52#include <asm/unaligned.h> 52#include <asm/unaligned.h>
53#include <asm/mach-types.h> 53#include <asm/mach-types.h>
54 54
55#include <asm/arch/dma.h> 55#include <mach/dma.h>
56#include <asm/arch/usb.h> 56#include <mach/usb.h>
57 57
58#include "omap_udc.h" 58#include "omap_udc.h"
59 59
diff --git a/drivers/usb/gadget/pxa25x_udc.c b/drivers/usb/gadget/pxa25x_udc.c
index 7e6725d89976..da6e93c201d2 100644
--- a/drivers/usb/gadget/pxa25x_udc.c
+++ b/drivers/usb/gadget/pxa25x_udc.c
@@ -61,7 +61,7 @@
61 * This driver is PXA25x only. Grab the right register definitions. 61 * This driver is PXA25x only. Grab the right register definitions.
62 */ 62 */
63#ifdef CONFIG_ARCH_PXA 63#ifdef CONFIG_ARCH_PXA
64#include <asm/arch/pxa25x-udc.h> 64#include <mach/pxa25x-udc.h>
65#endif 65#endif
66 66
67#include <asm/mach/udc_pxa2xx.h> 67#include <asm/mach/udc_pxa2xx.h>
diff --git a/drivers/usb/gadget/pxa25x_udc.h b/drivers/usb/gadget/pxa25x_udc.h
index c8a13215e02c..1d51aa21e6eb 100644
--- a/drivers/usb/gadget/pxa25x_udc.h
+++ b/drivers/usb/gadget/pxa25x_udc.h
@@ -139,7 +139,7 @@ struct pxa25x_udc {
139/*-------------------------------------------------------------------------*/ 139/*-------------------------------------------------------------------------*/
140 140
141#ifdef CONFIG_ARCH_LUBBOCK 141#ifdef CONFIG_ARCH_LUBBOCK
142#include <asm/arch/lubbock.h> 142#include <mach/lubbock.h>
143/* lubbock can also report usb connect/disconnect irqs */ 143/* lubbock can also report usb connect/disconnect irqs */
144#endif 144#endif
145 145
diff --git a/drivers/usb/gadget/pxa27x_udc.c b/drivers/usb/gadget/pxa27x_udc.c
index 9d447d8cfc0c..a28513ecbe5b 100644
--- a/drivers/usb/gadget/pxa27x_udc.c
+++ b/drivers/usb/gadget/pxa27x_udc.c
@@ -33,13 +33,13 @@
33#include <linux/irq.h> 33#include <linux/irq.h>
34 34
35#include <asm/byteorder.h> 35#include <asm/byteorder.h>
36#include <asm/hardware.h> 36#include <mach/hardware.h>
37 37
38#include <linux/usb.h> 38#include <linux/usb.h>
39#include <linux/usb/ch9.h> 39#include <linux/usb/ch9.h>
40#include <linux/usb/gadget.h> 40#include <linux/usb/gadget.h>
41#include <asm/arch/pxa2xx-regs.h> /* FIXME: for PSSR */ 41#include <mach/pxa2xx-regs.h> /* FIXME: for PSSR */
42#include <asm/arch/udc.h> 42#include <mach/udc.h>
43 43
44#include "pxa27x_udc.h" 44#include "pxa27x_udc.h"
45 45
diff --git a/drivers/usb/gadget/s3c2410_udc.c b/drivers/usb/gadget/s3c2410_udc.c
index 6b1ef488043b..538807384592 100644
--- a/drivers/usb/gadget/s3c2410_udc.c
+++ b/drivers/usb/gadget/s3c2410_udc.c
@@ -49,15 +49,14 @@
49#include <asm/irq.h> 49#include <asm/irq.h>
50#include <asm/system.h> 50#include <asm/system.h>
51#include <asm/unaligned.h> 51#include <asm/unaligned.h>
52#include <asm/arch/irqs.h> 52#include <mach/irqs.h>
53 53
54#include <asm/arch/hardware.h> 54#include <mach/hardware.h>
55#include <asm/arch/regs-gpio.h> 55#include <mach/regs-gpio.h>
56 56
57#include <asm/plat-s3c24xx/regs-udc.h> 57#include <asm/plat-s3c24xx/regs-udc.h>
58#include <asm/plat-s3c24xx/udc.h> 58#include <asm/plat-s3c24xx/udc.h>
59 59
60#include <asm/mach-types.h>
61 60
62#include "s3c2410_udc.h" 61#include "s3c2410_udc.h"
63 62
@@ -888,7 +887,7 @@ static void s3c2410_udc_handle_ep(struct s3c2410_ep *ep)
888 } 887 }
889} 888}
890 889
891#include <asm/arch/regs-irq.h> 890#include <mach/regs-irq.h>
892 891
893/* 892/*
894 * s3c2410_udc_irq - interrupt handler 893 * s3c2410_udc_irq - interrupt handler
diff --git a/drivers/usb/host/ohci-at91.c b/drivers/usb/host/ohci-at91.c
index a5d8e550d897..6db7a2889e66 100644
--- a/drivers/usb/host/ohci-at91.c
+++ b/drivers/usb/host/ohci-at91.c
@@ -15,12 +15,11 @@
15#include <linux/clk.h> 15#include <linux/clk.h>
16#include <linux/platform_device.h> 16#include <linux/platform_device.h>
17 17
18#include <asm/mach-types.h> 18#include <mach/hardware.h>
19#include <asm/hardware.h>
20#include <asm/gpio.h> 19#include <asm/gpio.h>
21 20
22#include <asm/arch/board.h> 21#include <mach/board.h>
23#include <asm/arch/cpu.h> 22#include <mach/cpu.h>
24 23
25#ifndef CONFIG_ARCH_AT91 24#ifndef CONFIG_ARCH_AT91
26#error "CONFIG_ARCH_AT91 must be defined." 25#error "CONFIG_ARCH_AT91 must be defined."
diff --git a/drivers/usb/host/ohci-ep93xx.c b/drivers/usb/host/ohci-ep93xx.c
index 5adaf36e47d0..cb0b506f8259 100644
--- a/drivers/usb/host/ohci-ep93xx.c
+++ b/drivers/usb/host/ohci-ep93xx.c
@@ -28,8 +28,7 @@
28#include <linux/signal.h> 28#include <linux/signal.h>
29#include <linux/platform_device.h> 29#include <linux/platform_device.h>
30 30
31#include <asm/mach-types.h> 31#include <mach/hardware.h>
32#include <asm/hardware.h>
33 32
34static struct clk *usb_host_clock; 33static struct clk *usb_host_clock;
35 34
diff --git a/drivers/usb/host/ohci-lh7a404.c b/drivers/usb/host/ohci-lh7a404.c
index 1ef5d482c145..9e31d440d115 100644
--- a/drivers/usb/host/ohci-lh7a404.c
+++ b/drivers/usb/host/ohci-lh7a404.c
@@ -19,7 +19,7 @@
19#include <linux/platform_device.h> 19#include <linux/platform_device.h>
20#include <linux/signal.h> 20#include <linux/signal.h>
21 21
22#include <asm/hardware.h> 22#include <mach/hardware.h>
23 23
24 24
25extern int usb_disabled(void); 25extern int usb_disabled(void);
diff --git a/drivers/usb/host/ohci-omap.c b/drivers/usb/host/ohci-omap.c
index 6e5e5f81ac90..94dfca02f7e1 100644
--- a/drivers/usb/host/ohci-omap.c
+++ b/drivers/usb/host/ohci-omap.c
@@ -19,15 +19,15 @@
19#include <linux/platform_device.h> 19#include <linux/platform_device.h>
20#include <linux/clk.h> 20#include <linux/clk.h>
21 21
22#include <asm/hardware.h> 22#include <mach/hardware.h>
23#include <asm/io.h> 23#include <asm/io.h>
24#include <asm/mach-types.h> 24#include <asm/mach-types.h>
25 25
26#include <asm/arch/mux.h> 26#include <mach/mux.h>
27#include <asm/arch/irqs.h> 27#include <mach/irqs.h>
28#include <asm/arch/gpio.h> 28#include <mach/gpio.h>
29#include <asm/arch/fpga.h> 29#include <mach/fpga.h>
30#include <asm/arch/usb.h> 30#include <mach/usb.h>
31 31
32 32
33/* OMAP-1510 OHCI has its own MMU for DMA */ 33/* OMAP-1510 OHCI has its own MMU for DMA */
diff --git a/drivers/usb/host/ohci-pnx4008.c b/drivers/usb/host/ohci-pnx4008.c
index 6ad8f2fc57b9..b02cd0761977 100644
--- a/drivers/usb/host/ohci-pnx4008.c
+++ b/drivers/usb/host/ohci-pnx4008.c
@@ -21,13 +21,12 @@
21#include <linux/platform_device.h> 21#include <linux/platform_device.h>
22#include <linux/i2c.h> 22#include <linux/i2c.h>
23 23
24#include <asm/hardware.h> 24#include <mach/hardware.h>
25#include <asm/io.h> 25#include <asm/io.h>
26#include <asm/mach-types.h>
27 26
28#include <asm/arch/platform.h> 27#include <mach/platform.h>
29#include <asm/arch/irqs.h> 28#include <mach/irqs.h>
30#include <asm/arch/gpio.h> 29#include <mach/gpio.h>
31 30
32#define USB_CTRL IO_ADDRESS(PNX4008_PWRMAN_BASE + 0x64) 31#define USB_CTRL IO_ADDRESS(PNX4008_PWRMAN_BASE + 0x64)
33 32
diff --git a/drivers/usb/host/ohci-pxa27x.c b/drivers/usb/host/ohci-pxa27x.c
index 127b15799024..8c9c4849db6e 100644
--- a/drivers/usb/host/ohci-pxa27x.c
+++ b/drivers/usb/host/ohci-pxa27x.c
@@ -24,11 +24,10 @@
24#include <linux/platform_device.h> 24#include <linux/platform_device.h>
25#include <linux/clk.h> 25#include <linux/clk.h>
26 26
27#include <asm/mach-types.h> 27#include <mach/hardware.h>
28#include <asm/hardware.h> 28#include <mach/pxa-regs.h>
29#include <asm/arch/pxa-regs.h> 29#include <mach/pxa2xx-regs.h> /* FIXME: for PSSR */
30#include <asm/arch/pxa2xx-regs.h> /* FIXME: for PSSR */ 30#include <mach/ohci.h>
31#include <asm/arch/ohci.h>
32 31
33#define PXA_UHC_MAX_PORTNUM 3 32#define PXA_UHC_MAX_PORTNUM 3
34 33
diff --git a/drivers/usb/host/ohci-s3c2410.c b/drivers/usb/host/ohci-s3c2410.c
index 3c7a740cfe0c..9e3dc4069e8b 100644
--- a/drivers/usb/host/ohci-s3c2410.c
+++ b/drivers/usb/host/ohci-s3c2410.c
@@ -22,8 +22,8 @@
22#include <linux/platform_device.h> 22#include <linux/platform_device.h>
23#include <linux/clk.h> 23#include <linux/clk.h>
24 24
25#include <asm/hardware.h> 25#include <mach/hardware.h>
26#include <asm/arch/usb-control.h> 26#include <mach/usb-control.h>
27 27
28#define valid_port(idx) ((idx) == 1 || (idx) == 2) 28#define valid_port(idx) ((idx) == 1 || (idx) == 2)
29 29
diff --git a/drivers/usb/host/ohci-sa1111.c b/drivers/usb/host/ohci-sa1111.c
index 2e9dceb9bb99..4626b002e670 100644
--- a/drivers/usb/host/ohci-sa1111.c
+++ b/drivers/usb/host/ohci-sa1111.c
@@ -13,10 +13,10 @@
13 * This file is licenced under the GPL. 13 * This file is licenced under the GPL.
14 */ 14 */
15 15
16#include <asm/hardware.h> 16#include <mach/hardware.h>
17#include <asm/mach-types.h> 17#include <asm/mach-types.h>
18#include <asm/arch/assabet.h> 18#include <mach/assabet.h>
19#include <asm/arch/badge4.h> 19#include <mach/badge4.h>
20#include <asm/hardware/sa1111.h> 20#include <asm/hardware/sa1111.h>
21 21
22#ifndef CONFIG_SA1111 22#ifndef CONFIG_SA1111
diff --git a/drivers/usb/misc/isight_firmware.c b/drivers/usb/misc/isight_firmware.c
index d94aa7387608..b897f6554ecd 100644
--- a/drivers/usb/misc/isight_firmware.c
+++ b/drivers/usb/misc/isight_firmware.c
@@ -48,7 +48,8 @@ static int isight_firmware_load(struct usb_interface *intf,
48 48
49 if (request_firmware(&firmware, "isight.fw", &dev->dev) != 0) { 49 if (request_firmware(&firmware, "isight.fw", &dev->dev) != 0) {
50 printk(KERN_ERR "Unable to load isight firmware\n"); 50 printk(KERN_ERR "Unable to load isight firmware\n");
51 return -ENODEV; 51 ret = -ENODEV;
52 goto out;
52 } 53 }
53 54
54 ptr = firmware->data; 55 ptr = firmware->data;
@@ -91,7 +92,6 @@ static int isight_firmware_load(struct usb_interface *intf,
91 buf, llen, 300) != llen) { 92 buf, llen, 300) != llen) {
92 printk(KERN_ERR 93 printk(KERN_ERR
93 "Failed to load isight firmware\n"); 94 "Failed to load isight firmware\n");
94 kfree(buf);
95 ret = -ENODEV; 95 ret = -ENODEV;
96 goto out; 96 goto out;
97 } 97 }
diff --git a/drivers/video/acornfb.c b/drivers/video/acornfb.c
index 017233d0c481..61c3d3f40fd1 100644
--- a/drivers/video/acornfb.c
+++ b/drivers/video/acornfb.c
@@ -29,7 +29,7 @@
29#include <linux/platform_device.h> 29#include <linux/platform_device.h>
30#include <linux/dma-mapping.h> 30#include <linux/dma-mapping.h>
31 31
32#include <asm/hardware.h> 32#include <mach/hardware.h>
33#include <asm/io.h> 33#include <asm/io.h>
34#include <asm/irq.h> 34#include <asm/irq.h>
35#include <asm/mach-types.h> 35#include <asm/mach-types.h>
@@ -339,7 +339,7 @@ acornfb_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
339#endif 339#endif
340 340
341#ifdef HAS_VIDC20 341#ifdef HAS_VIDC20
342#include <asm/arch/acornfb.h> 342#include <mach/acornfb.h>
343 343
344#define MAX_SIZE 2*1024*1024 344#define MAX_SIZE 2*1024*1024
345 345
diff --git a/drivers/video/am200epd.c b/drivers/video/am200epd.c
index 32dd85126931..0c35b8b0160e 100644
--- a/drivers/video/am200epd.c
+++ b/drivers/video/am200epd.c
@@ -33,7 +33,7 @@
33 33
34#include <video/metronomefb.h> 34#include <video/metronomefb.h>
35 35
36#include <asm/arch/pxa-regs.h> 36#include <mach/pxa-regs.h>
37 37
38/* register offsets for gpio control */ 38/* register offsets for gpio control */
39#define LED_GPIO_PIN 51 39#define LED_GPIO_PIN 51
diff --git a/drivers/video/atmel_lcdfb.c b/drivers/video/atmel_lcdfb.c
index 5b3a15dffb5f..9c5925927ece 100644
--- a/drivers/video/atmel_lcdfb.c
+++ b/drivers/video/atmel_lcdfb.c
@@ -18,9 +18,9 @@
18#include <linux/delay.h> 18#include <linux/delay.h>
19#include <linux/backlight.h> 19#include <linux/backlight.h>
20 20
21#include <asm/arch/board.h> 21#include <mach/board.h>
22#include <asm/arch/cpu.h> 22#include <mach/cpu.h>
23#include <asm/arch/gpio.h> 23#include <mach/gpio.h>
24 24
25#include <video/atmel_lcdc.h> 25#include <video/atmel_lcdc.h>
26 26
@@ -39,7 +39,9 @@
39#endif 39#endif
40 40
41#if defined(CONFIG_ARCH_AT91) 41#if defined(CONFIG_ARCH_AT91)
42#define ATMEL_LCDFB_FBINFO_DEFAULT FBINFO_DEFAULT 42#define ATMEL_LCDFB_FBINFO_DEFAULT (FBINFO_DEFAULT \
43 | FBINFO_PARTIAL_PAN_OK \
44 | FBINFO_HWACCEL_YPAN)
43 45
44static inline void atmel_lcdfb_update_dma2d(struct atmel_lcdfb_info *sinfo, 46static inline void atmel_lcdfb_update_dma2d(struct atmel_lcdfb_info *sinfo,
45 struct fb_var_screeninfo *var) 47 struct fb_var_screeninfo *var)
@@ -177,7 +179,7 @@ static struct fb_fix_screeninfo atmel_lcdfb_fix __initdata = {
177 .type = FB_TYPE_PACKED_PIXELS, 179 .type = FB_TYPE_PACKED_PIXELS,
178 .visual = FB_VISUAL_TRUECOLOR, 180 .visual = FB_VISUAL_TRUECOLOR,
179 .xpanstep = 0, 181 .xpanstep = 0,
180 .ypanstep = 0, 182 .ypanstep = 1,
181 .ywrapstep = 0, 183 .ywrapstep = 0,
182 .accel = FB_ACCEL_NONE, 184 .accel = FB_ACCEL_NONE,
183}; 185};
@@ -240,9 +242,11 @@ static int atmel_lcdfb_alloc_video_memory(struct atmel_lcdfb_info *sinfo)
240{ 242{
241 struct fb_info *info = sinfo->info; 243 struct fb_info *info = sinfo->info;
242 struct fb_var_screeninfo *var = &info->var; 244 struct fb_var_screeninfo *var = &info->var;
245 unsigned int smem_len;
243 246
244 info->fix.smem_len = (var->xres_virtual * var->yres_virtual 247 smem_len = (var->xres_virtual * var->yres_virtual
245 * ((var->bits_per_pixel + 7) / 8)); 248 * ((var->bits_per_pixel + 7) / 8));
249 info->fix.smem_len = max(smem_len, sinfo->smem_len);
246 250
247 info->screen_base = dma_alloc_writecombine(info->device, info->fix.smem_len, 251 info->screen_base = dma_alloc_writecombine(info->device, info->fix.smem_len,
248 (dma_addr_t *)&info->fix.smem_start, GFP_KERNEL); 252 (dma_addr_t *)&info->fix.smem_start, GFP_KERNEL);
@@ -794,6 +798,7 @@ static int __init atmel_lcdfb_probe(struct platform_device *pdev)
794 sinfo->default_monspecs = pdata_sinfo->default_monspecs; 798 sinfo->default_monspecs = pdata_sinfo->default_monspecs;
795 sinfo->atmel_lcdfb_power_control = pdata_sinfo->atmel_lcdfb_power_control; 799 sinfo->atmel_lcdfb_power_control = pdata_sinfo->atmel_lcdfb_power_control;
796 sinfo->guard_time = pdata_sinfo->guard_time; 800 sinfo->guard_time = pdata_sinfo->guard_time;
801 sinfo->smem_len = pdata_sinfo->smem_len;
797 sinfo->lcdcon_is_backlight = pdata_sinfo->lcdcon_is_backlight; 802 sinfo->lcdcon_is_backlight = pdata_sinfo->lcdcon_is_backlight;
798 sinfo->lcd_wiring_mode = pdata_sinfo->lcd_wiring_mode; 803 sinfo->lcd_wiring_mode = pdata_sinfo->lcd_wiring_mode;
799 } else { 804 } else {
diff --git a/drivers/video/aty/radeon_accel.c b/drivers/video/aty/radeon_accel.c
index 4d13f68436e6..aa95f8350242 100644
--- a/drivers/video/aty/radeon_accel.c
+++ b/drivers/video/aty/radeon_accel.c
@@ -55,6 +55,10 @@ static void radeonfb_prim_fillrect(struct radeonfb_info *rinfo,
55 OUTREG(DP_WRITE_MSK, 0xffffffff); 55 OUTREG(DP_WRITE_MSK, 0xffffffff);
56 OUTREG(DP_CNTL, (DST_X_LEFT_TO_RIGHT | DST_Y_TOP_TO_BOTTOM)); 56 OUTREG(DP_CNTL, (DST_X_LEFT_TO_RIGHT | DST_Y_TOP_TO_BOTTOM));
57 57
58 radeon_fifo_wait(2);
59 OUTREG(DSTCACHE_CTLSTAT, RB2D_DC_FLUSH_ALL);
60 OUTREG(WAIT_UNTIL, (WAIT_2D_IDLECLEAN | WAIT_DMA_GUI_IDLE));
61
58 radeon_fifo_wait(2); 62 radeon_fifo_wait(2);
59 OUTREG(DST_Y_X, (region->dy << 16) | region->dx); 63 OUTREG(DST_Y_X, (region->dy << 16) | region->dx);
60 OUTREG(DST_WIDTH_HEIGHT, (region->width << 16) | region->height); 64 OUTREG(DST_WIDTH_HEIGHT, (region->width << 16) | region->height);
@@ -116,6 +120,10 @@ static void radeonfb_prim_copyarea(struct radeonfb_info *rinfo,
116 OUTREG(DP_CNTL, (xdir>=0 ? DST_X_LEFT_TO_RIGHT : 0) 120 OUTREG(DP_CNTL, (xdir>=0 ? DST_X_LEFT_TO_RIGHT : 0)
117 | (ydir>=0 ? DST_Y_TOP_TO_BOTTOM : 0)); 121 | (ydir>=0 ? DST_Y_TOP_TO_BOTTOM : 0));
118 122
123 radeon_fifo_wait(2);
124 OUTREG(DSTCACHE_CTLSTAT, RB2D_DC_FLUSH_ALL);
125 OUTREG(WAIT_UNTIL, (WAIT_2D_IDLECLEAN | WAIT_DMA_GUI_IDLE));
126
119 radeon_fifo_wait(3); 127 radeon_fifo_wait(3);
120 OUTREG(SRC_Y_X, (sy << 16) | sx); 128 OUTREG(SRC_Y_X, (sy << 16) | sx);
121 OUTREG(DST_Y_X, (dy << 16) | dx); 129 OUTREG(DST_Y_X, (dy << 16) | dx);
diff --git a/drivers/video/backlight/omap1_bl.c b/drivers/video/backlight/omap1_bl.c
index 891875d53a49..cbad67e89826 100644
--- a/drivers/video/backlight/omap1_bl.c
+++ b/drivers/video/backlight/omap1_bl.c
@@ -25,9 +25,9 @@
25#include <linux/fb.h> 25#include <linux/fb.h>
26#include <linux/backlight.h> 26#include <linux/backlight.h>
27 27
28#include <asm/arch/hardware.h> 28#include <mach/hardware.h>
29#include <asm/arch/board.h> 29#include <mach/board.h>
30#include <asm/arch/mux.h> 30#include <mach/mux.h>
31 31
32#define OMAPBL_MAX_INTENSITY 0xff 32#define OMAPBL_MAX_INTENSITY 0xff
33 33
diff --git a/drivers/video/clps711xfb.c b/drivers/video/clps711xfb.c
index 9f8a389dc7ae..16f5db471ab5 100644
--- a/drivers/video/clps711xfb.c
+++ b/drivers/video/clps711xfb.c
@@ -27,12 +27,12 @@
27#include <linux/proc_fs.h> 27#include <linux/proc_fs.h>
28#include <linux/delay.h> 28#include <linux/delay.h>
29 29
30#include <asm/hardware.h> 30#include <mach/hardware.h>
31#include <asm/mach-types.h> 31#include <asm/mach-types.h>
32#include <linux/uaccess.h> 32#include <linux/uaccess.h>
33 33
34#include <asm/hardware/clps7111.h> 34#include <asm/hardware/clps7111.h>
35#include <asm/arch/syspld.h> 35#include <mach/syspld.h>
36 36
37struct fb_info *cfb; 37struct fb_info *cfb;
38 38
diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c
index 33859934a8e4..c6299e8a041d 100644
--- a/drivers/video/console/fbcon.c
+++ b/drivers/video/console/fbcon.c
@@ -2518,7 +2518,7 @@ static int fbcon_do_set_font(struct vc_data *vc, int w, int h,
2518 c = vc->vc_video_erase_char; 2518 c = vc->vc_video_erase_char;
2519 vc->vc_video_erase_char = 2519 vc->vc_video_erase_char =
2520 ((c & 0xfe00) >> 1) | (c & 0xff); 2520 ((c & 0xfe00) >> 1) | (c & 0xff);
2521 c = vc->vc_def_color; 2521 c = vc->vc_scrl_erase_char;
2522 vc->vc_scrl_erase_char = 2522 vc->vc_scrl_erase_char =
2523 ((c & 0xFE00) >> 1) | (c & 0xFF); 2523 ((c & 0xFE00) >> 1) | (c & 0xFF);
2524 vc->vc_attr >>= 1; 2524 vc->vc_attr >>= 1;
@@ -2551,7 +2551,7 @@ static int fbcon_do_set_font(struct vc_data *vc, int w, int h,
2551 if (vc->vc_can_do_color) { 2551 if (vc->vc_can_do_color) {
2552 vc->vc_video_erase_char = 2552 vc->vc_video_erase_char =
2553 ((c & 0xff00) << 1) | (c & 0xff); 2553 ((c & 0xff00) << 1) | (c & 0xff);
2554 c = vc->vc_def_color; 2554 c = vc->vc_scrl_erase_char;
2555 vc->vc_scrl_erase_char = 2555 vc->vc_scrl_erase_char =
2556 ((c & 0xFF00) << 1) | (c & 0xFF); 2556 ((c & 0xFF00) << 1) | (c & 0xFF);
2557 vc->vc_attr <<= 1; 2557 vc->vc_attr <<= 1;
diff --git a/drivers/video/console/fbcon.h b/drivers/video/console/fbcon.h
index de1b1365279b..a6e38e9ea73f 100644
--- a/drivers/video/console/fbcon.h
+++ b/drivers/video/console/fbcon.h
@@ -92,7 +92,7 @@ struct fbcon_ops {
92#define attr_fgcol(fgshift,s) \ 92#define attr_fgcol(fgshift,s) \
93 (((s) >> (fgshift)) & 0x0f) 93 (((s) >> (fgshift)) & 0x0f)
94#define attr_bgcol(bgshift,s) \ 94#define attr_bgcol(bgshift,s) \
95 (((s) >> (bgshift)) & 0x07) 95 (((s) >> (bgshift)) & 0x0f)
96 96
97/* Monochrome */ 97/* Monochrome */
98#define attr_bold(s) \ 98#define attr_bold(s) \
diff --git a/drivers/video/cyber2000fb.c b/drivers/video/cyber2000fb.c
index d0e4cb618269..41d62632dcdb 100644
--- a/drivers/video/cyber2000fb.c
+++ b/drivers/video/cyber2000fb.c
@@ -1425,7 +1425,7 @@ static void cyberpro_common_resume(struct cfb_info *cfb)
1425 1425
1426#ifdef CONFIG_ARCH_SHARK 1426#ifdef CONFIG_ARCH_SHARK
1427 1427
1428#include <asm/arch/hardware.h> 1428#include <mach/hardware.h>
1429 1429
1430static int __devinit cyberpro_vl_probe(void) 1430static int __devinit cyberpro_vl_probe(void)
1431{ 1431{
diff --git a/drivers/video/epson1355fb.c b/drivers/video/epson1355fb.c
index cc2810ef5de5..2735b79e52a1 100644
--- a/drivers/video/epson1355fb.c
+++ b/drivers/video/epson1355fb.c
@@ -71,7 +71,7 @@ struct epson1355_par {
71#if defined(CONFIG_ARM) 71#if defined(CONFIG_ARM)
72 72
73# ifdef CONFIG_ARCH_CEIVA 73# ifdef CONFIG_ARCH_CEIVA
74# include <asm/arch/hardware.h> 74# include <mach/hardware.h>
75# define EPSON1355FB_BASE_PHYS (CEIVA_PHYS_SED1355) 75# define EPSON1355FB_BASE_PHYS (CEIVA_PHYS_SED1355)
76# endif 76# endif
77 77
diff --git a/drivers/video/imxfb.c b/drivers/video/imxfb.c
index 0c5a475c1cae..ccd986140c95 100644
--- a/drivers/video/imxfb.c
+++ b/drivers/video/imxfb.c
@@ -33,9 +33,9 @@
33#include <linux/platform_device.h> 33#include <linux/platform_device.h>
34#include <linux/dma-mapping.h> 34#include <linux/dma-mapping.h>
35 35
36#include <asm/hardware.h> 36#include <mach/hardware.h>
37#include <asm/io.h> 37#include <asm/io.h>
38#include <asm/arch/imxfb.h> 38#include <mach/imxfb.h>
39 39
40/* 40/*
41 * Complain if VAR is out of range. 41 * Complain if VAR is out of range.
diff --git a/drivers/video/matrox/i2c-matroxfb.c b/drivers/video/matrox/i2c-matroxfb.c
index 75ee5a12e549..c14e3e2212b3 100644
--- a/drivers/video/matrox/i2c-matroxfb.c
+++ b/drivers/video/matrox/i2c-matroxfb.c
@@ -87,13 +87,7 @@ static int matroxfb_gpio_getscl(void* data) {
87 return (matroxfb_read_gpio(b->minfo) & b->mask.clock) ? 1 : 0; 87 return (matroxfb_read_gpio(b->minfo) & b->mask.clock) ? 1 : 0;
88} 88}
89 89
90static struct i2c_adapter matrox_i2c_adapter_template = 90static const struct i2c_algo_bit_data matrox_i2c_algo_template =
91{
92 .owner = THIS_MODULE,
93 .id = I2C_HW_B_G400,
94};
95
96static struct i2c_algo_bit_data matrox_i2c_algo_template =
97{ 91{
98 .setsda = matroxfb_gpio_setsda, 92 .setsda = matroxfb_gpio_setsda,
99 .setscl = matroxfb_gpio_setscl, 93 .setscl = matroxfb_gpio_setscl,
@@ -112,7 +106,7 @@ static int i2c_bus_reg(struct i2c_bit_adapter* b, struct matrox_fb_info* minfo,
112 b->minfo = minfo; 106 b->minfo = minfo;
113 b->mask.data = data; 107 b->mask.data = data;
114 b->mask.clock = clock; 108 b->mask.clock = clock;
115 b->adapter = matrox_i2c_adapter_template; 109 b->adapter.owner = THIS_MODULE;
116 snprintf(b->adapter.name, sizeof(b->adapter.name), name, 110 snprintf(b->adapter.name, sizeof(b->adapter.name), name,
117 minfo->fbcon.node); 111 minfo->fbcon.node);
118 i2c_set_adapdata(&b->adapter, b); 112 i2c_set_adapdata(&b->adapter, b);
@@ -187,6 +181,17 @@ static void* i2c_matroxfb_probe(struct matrox_fb_info* minfo) {
187 MAT_DATA, MAT_CLK, "MAVEN:fb%u", 0); 181 MAT_DATA, MAT_CLK, "MAVEN:fb%u", 0);
188 if (err) 182 if (err)
189 printk(KERN_INFO "i2c-matroxfb: Could not register Maven i2c bus. Continuing anyway.\n"); 183 printk(KERN_INFO "i2c-matroxfb: Could not register Maven i2c bus. Continuing anyway.\n");
184 else {
185 struct i2c_board_info maven_info = {
186 I2C_BOARD_INFO("maven", 0x1b),
187 };
188 unsigned short const addr_list[2] = {
189 0x1b, I2C_CLIENT_END
190 };
191
192 i2c_new_probed_device(&m2info->maven.adapter,
193 &maven_info, addr_list);
194 }
190 } 195 }
191 return m2info; 196 return m2info;
192fail_ddc1:; 197fail_ddc1:;
diff --git a/drivers/video/matrox/matroxfb_maven.c b/drivers/video/matrox/matroxfb_maven.c
index 89da27bd5c49..042408a8c631 100644
--- a/drivers/video/matrox/matroxfb_maven.c
+++ b/drivers/video/matrox/matroxfb_maven.c
@@ -19,8 +19,6 @@
19#include <linux/matroxfb.h> 19#include <linux/matroxfb.h>
20#include <asm/div64.h> 20#include <asm/div64.h>
21 21
22#define MAVEN_I2CID (0x1B)
23
24#define MGATVO_B 1 22#define MGATVO_B 1
25#define MGATVO_C 2 23#define MGATVO_C 2
26 24
@@ -128,7 +126,7 @@ static int get_ctrl_id(__u32 v4l2_id) {
128 126
129struct maven_data { 127struct maven_data {
130 struct matrox_fb_info* primary_head; 128 struct matrox_fb_info* primary_head;
131 struct i2c_client client; 129 struct i2c_client *client;
132 int version; 130 int version;
133}; 131};
134 132
@@ -974,7 +972,7 @@ static inline int maven_compute_timming(struct maven_data* md,
974 972
975static int maven_program_timming(struct maven_data* md, 973static int maven_program_timming(struct maven_data* md,
976 const struct mavenregs* m) { 974 const struct mavenregs* m) {
977 struct i2c_client* c = &md->client; 975 struct i2c_client *c = md->client;
978 976
979 if (m->mode == MATROXFB_OUTPUT_MODE_MONITOR) { 977 if (m->mode == MATROXFB_OUTPUT_MODE_MONITOR) {
980 LR(0x80); 978 LR(0x80);
@@ -1011,7 +1009,7 @@ static int maven_program_timming(struct maven_data* md,
1011} 1009}
1012 1010
1013static inline int maven_resync(struct maven_data* md) { 1011static inline int maven_resync(struct maven_data* md) {
1014 struct i2c_client* c = &md->client; 1012 struct i2c_client *c = md->client;
1015 maven_set_reg(c, 0x95, 0x20); /* start whole thing */ 1013 maven_set_reg(c, 0x95, 0x20); /* start whole thing */
1016 return 0; 1014 return 0;
1017} 1015}
@@ -1069,48 +1067,48 @@ static int maven_set_control (struct maven_data* md,
1069 maven_compute_bwlevel(md, &blacklevel, &whitelevel); 1067 maven_compute_bwlevel(md, &blacklevel, &whitelevel);
1070 blacklevel = (blacklevel >> 2) | ((blacklevel & 3) << 8); 1068 blacklevel = (blacklevel >> 2) | ((blacklevel & 3) << 8);
1071 whitelevel = (whitelevel >> 2) | ((whitelevel & 3) << 8); 1069 whitelevel = (whitelevel >> 2) | ((whitelevel & 3) << 8);
1072 maven_set_reg_pair(&md->client, 0x0e, blacklevel); 1070 maven_set_reg_pair(md->client, 0x0e, blacklevel);
1073 maven_set_reg_pair(&md->client, 0x1e, whitelevel); 1071 maven_set_reg_pair(md->client, 0x1e, whitelevel);
1074 } 1072 }
1075 break; 1073 break;
1076 case V4L2_CID_SATURATION: 1074 case V4L2_CID_SATURATION:
1077 { 1075 {
1078 maven_set_reg(&md->client, 0x20, p->value); 1076 maven_set_reg(md->client, 0x20, p->value);
1079 maven_set_reg(&md->client, 0x22, p->value); 1077 maven_set_reg(md->client, 0x22, p->value);
1080 } 1078 }
1081 break; 1079 break;
1082 case V4L2_CID_HUE: 1080 case V4L2_CID_HUE:
1083 { 1081 {
1084 maven_set_reg(&md->client, 0x25, p->value); 1082 maven_set_reg(md->client, 0x25, p->value);
1085 } 1083 }
1086 break; 1084 break;
1087 case V4L2_CID_GAMMA: 1085 case V4L2_CID_GAMMA:
1088 { 1086 {
1089 const struct maven_gamma* g; 1087 const struct maven_gamma* g;
1090 g = maven_compute_gamma(md); 1088 g = maven_compute_gamma(md);
1091 maven_set_reg(&md->client, 0x83, g->reg83); 1089 maven_set_reg(md->client, 0x83, g->reg83);
1092 maven_set_reg(&md->client, 0x84, g->reg84); 1090 maven_set_reg(md->client, 0x84, g->reg84);
1093 maven_set_reg(&md->client, 0x85, g->reg85); 1091 maven_set_reg(md->client, 0x85, g->reg85);
1094 maven_set_reg(&md->client, 0x86, g->reg86); 1092 maven_set_reg(md->client, 0x86, g->reg86);
1095 maven_set_reg(&md->client, 0x87, g->reg87); 1093 maven_set_reg(md->client, 0x87, g->reg87);
1096 maven_set_reg(&md->client, 0x88, g->reg88); 1094 maven_set_reg(md->client, 0x88, g->reg88);
1097 maven_set_reg(&md->client, 0x89, g->reg89); 1095 maven_set_reg(md->client, 0x89, g->reg89);
1098 maven_set_reg(&md->client, 0x8a, g->reg8a); 1096 maven_set_reg(md->client, 0x8a, g->reg8a);
1099 maven_set_reg(&md->client, 0x8b, g->reg8b); 1097 maven_set_reg(md->client, 0x8b, g->reg8b);
1100 } 1098 }
1101 break; 1099 break;
1102 case MATROXFB_CID_TESTOUT: 1100 case MATROXFB_CID_TESTOUT:
1103 { 1101 {
1104 unsigned char val 1102 unsigned char val
1105 = maven_get_reg(&md->client,0x8d); 1103 = maven_get_reg(md->client, 0x8d);
1106 if (p->value) val |= 0x10; 1104 if (p->value) val |= 0x10;
1107 else val &= ~0x10; 1105 else val &= ~0x10;
1108 maven_set_reg(&md->client, 0x8d, val); 1106 maven_set_reg(md->client, 0x8d, val);
1109 } 1107 }
1110 break; 1108 break;
1111 case MATROXFB_CID_DEFLICKER: 1109 case MATROXFB_CID_DEFLICKER:
1112 { 1110 {
1113 maven_set_reg(&md->client, 0x93, maven_compute_deflicker(md)); 1111 maven_set_reg(md->client, 0x93, maven_compute_deflicker(md));
1114 } 1112 }
1115 break; 1113 break;
1116 } 1114 }
@@ -1189,6 +1187,7 @@ static int maven_init_client(struct i2c_client* clnt) {
1189 MINFO_FROM(container_of(clnt->adapter, struct i2c_bit_adapter, adapter)->minfo); 1187 MINFO_FROM(container_of(clnt->adapter, struct i2c_bit_adapter, adapter)->minfo);
1190 1188
1191 md->primary_head = MINFO; 1189 md->primary_head = MINFO;
1190 md->client = clnt;
1192 down_write(&ACCESS_FBINFO(altout.lock)); 1191 down_write(&ACCESS_FBINFO(altout.lock));
1193 ACCESS_FBINFO(outputs[1]).output = &maven_altout; 1192 ACCESS_FBINFO(outputs[1]).output = &maven_altout;
1194 ACCESS_FBINFO(outputs[1]).src = ACCESS_FBINFO(outputs[1]).default_src; 1193 ACCESS_FBINFO(outputs[1]).src = ACCESS_FBINFO(outputs[1]).default_src;
@@ -1232,14 +1231,11 @@ static int maven_shutdown_client(struct i2c_client* clnt) {
1232 return 0; 1231 return 0;
1233} 1232}
1234 1233
1235static const unsigned short normal_i2c[] = { MAVEN_I2CID, I2C_CLIENT_END }; 1234static int maven_probe(struct i2c_client *client,
1236I2C_CLIENT_INSMOD; 1235 const struct i2c_device_id *id)
1237 1236{
1238static struct i2c_driver maven_driver; 1237 struct i2c_adapter *adapter = client->adapter;
1239 1238 int err = -ENODEV;
1240static int maven_detect_client(struct i2c_adapter* adapter, int address, int kind) {
1241 int err = 0;
1242 struct i2c_client* new_client;
1243 struct maven_data* data; 1239 struct maven_data* data;
1244 1240
1245 if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_WRITE_WORD_DATA | 1241 if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_WRITE_WORD_DATA |
@@ -1250,50 +1246,37 @@ static int maven_detect_client(struct i2c_adapter* adapter, int address, int kin
1250 err = -ENOMEM; 1246 err = -ENOMEM;
1251 goto ERROR0; 1247 goto ERROR0;
1252 } 1248 }
1253 new_client = &data->client; 1249 i2c_set_clientdata(client, data);
1254 i2c_set_clientdata(new_client, data); 1250 err = maven_init_client(client);
1255 new_client->addr = address;
1256 new_client->adapter = adapter;
1257 new_client->driver = &maven_driver;
1258 new_client->flags = 0;
1259 strlcpy(new_client->name, "maven", I2C_NAME_SIZE);
1260 if ((err = i2c_attach_client(new_client)))
1261 goto ERROR3;
1262 err = maven_init_client(new_client);
1263 if (err) 1251 if (err)
1264 goto ERROR4; 1252 goto ERROR4;
1265 return 0; 1253 return 0;
1266ERROR4:; 1254ERROR4:;
1267 i2c_detach_client(new_client); 1255 kfree(data);
1268ERROR3:;
1269 kfree(new_client);
1270ERROR0:; 1256ERROR0:;
1271 return err; 1257 return err;
1272} 1258}
1273 1259
1274static int maven_attach_adapter(struct i2c_adapter* adapter) { 1260static int maven_remove(struct i2c_client *client)
1275 if (adapter->id == I2C_HW_B_G400) 1261{
1276 return i2c_probe(adapter, &addr_data, &maven_detect_client);
1277 return 0;
1278}
1279
1280static int maven_detach_client(struct i2c_client* client) {
1281 int err;
1282
1283 if ((err = i2c_detach_client(client)))
1284 return err;
1285 maven_shutdown_client(client); 1262 maven_shutdown_client(client);
1286 kfree(i2c_get_clientdata(client)); 1263 kfree(i2c_get_clientdata(client));
1287 return 0; 1264 return 0;
1288} 1265}
1289 1266
1267static const struct i2c_device_id maven_id[] = {
1268 { "maven", 0 },
1269 { }
1270};
1271MODULE_DEVICE_TABLE(i2c, maven_id);
1272
1290static struct i2c_driver maven_driver={ 1273static struct i2c_driver maven_driver={
1291 .driver = { 1274 .driver = {
1292 .name = "maven", 1275 .name = "maven",
1293 }, 1276 },
1294 .id = I2C_DRIVERID_MGATVO, 1277 .probe = maven_probe,
1295 .attach_adapter = maven_attach_adapter, 1278 .remove = maven_remove,
1296 .detach_client = maven_detach_client, 1279 .id_table = maven_id,
1297}; 1280};
1298 1281
1299static int __init matroxfb_maven_init(void) 1282static int __init matroxfb_maven_init(void)
diff --git a/drivers/video/omap/blizzard.c b/drivers/video/omap/blizzard.c
index 4d8ad9cd0e19..9dfcf39d3367 100644
--- a/drivers/video/omap/blizzard.c
+++ b/drivers/video/omap/blizzard.c
@@ -26,9 +26,9 @@
26#include <linux/delay.h> 26#include <linux/delay.h>
27#include <linux/clk.h> 27#include <linux/clk.h>
28 28
29#include <asm/arch/dma.h> 29#include <mach/dma.h>
30#include <asm/arch/omapfb.h> 30#include <mach/omapfb.h>
31#include <asm/arch/blizzard.h> 31#include <mach/blizzard.h>
32 32
33#include "dispc.h" 33#include "dispc.h"
34 34
diff --git a/drivers/video/omap/dispc.c b/drivers/video/omap/dispc.c
index ab77c51fe9d6..6efcf89e7fbe 100644
--- a/drivers/video/omap/dispc.c
+++ b/drivers/video/omap/dispc.c
@@ -25,9 +25,9 @@
25#include <linux/clk.h> 25#include <linux/clk.h>
26#include <linux/io.h> 26#include <linux/io.h>
27 27
28#include <asm/arch/sram.h> 28#include <mach/sram.h>
29#include <asm/arch/omapfb.h> 29#include <mach/omapfb.h>
30#include <asm/arch/board.h> 30#include <mach/board.h>
31 31
32#include "dispc.h" 32#include "dispc.h"
33 33
diff --git a/drivers/video/omap/hwa742.c b/drivers/video/omap/hwa742.c
index 1e642b7a20fe..f24df0b54e1c 100644
--- a/drivers/video/omap/hwa742.c
+++ b/drivers/video/omap/hwa742.c
@@ -26,9 +26,9 @@
26#include <linux/delay.h> 26#include <linux/delay.h>
27#include <linux/clk.h> 27#include <linux/clk.h>
28 28
29#include <asm/arch/dma.h> 29#include <mach/dma.h>
30#include <asm/arch/omapfb.h> 30#include <mach/omapfb.h>
31#include <asm/arch/hwa742.h> 31#include <mach/hwa742.h>
32 32
33#define HWA742_REV_CODE_REG 0x0 33#define HWA742_REV_CODE_REG 0x0
34#define HWA742_CONFIG_REG 0x2 34#define HWA742_CONFIG_REG 0x2
diff --git a/drivers/video/omap/lcd_h3.c b/drivers/video/omap/lcd_h3.c
index 31e978349a80..2486237ebba5 100644
--- a/drivers/video/omap/lcd_h3.c
+++ b/drivers/video/omap/lcd_h3.c
@@ -23,8 +23,8 @@
23#include <linux/platform_device.h> 23#include <linux/platform_device.h>
24#include <linux/i2c/tps65010.h> 24#include <linux/i2c/tps65010.h>
25 25
26#include <asm/arch/gpio.h> 26#include <mach/gpio.h>
27#include <asm/arch/omapfb.h> 27#include <mach/omapfb.h>
28 28
29#define MODULE_NAME "omapfb-lcd_h3" 29#define MODULE_NAME "omapfb-lcd_h3"
30 30
diff --git a/drivers/video/omap/lcd_h4.c b/drivers/video/omap/lcd_h4.c
index fd6f0eb16de1..88c19d424ef7 100644
--- a/drivers/video/omap/lcd_h4.c
+++ b/drivers/video/omap/lcd_h4.c
@@ -22,7 +22,7 @@
22#include <linux/module.h> 22#include <linux/module.h>
23#include <linux/platform_device.h> 23#include <linux/platform_device.h>
24 24
25#include <asm/arch/omapfb.h> 25#include <mach/omapfb.h>
26 26
27static int h4_panel_init(struct lcd_panel *panel, struct omapfb_device *fbdev) 27static int h4_panel_init(struct lcd_panel *panel, struct omapfb_device *fbdev)
28{ 28{
diff --git a/drivers/video/omap/lcd_inn1510.c b/drivers/video/omap/lcd_inn1510.c
index 551f385861d1..6953ed4b5820 100644
--- a/drivers/video/omap/lcd_inn1510.c
+++ b/drivers/video/omap/lcd_inn1510.c
@@ -23,8 +23,8 @@
23#include <linux/platform_device.h> 23#include <linux/platform_device.h>
24#include <linux/io.h> 24#include <linux/io.h>
25 25
26#include <asm/arch/fpga.h> 26#include <mach/fpga.h>
27#include <asm/arch/omapfb.h> 27#include <mach/omapfb.h>
28 28
29static int innovator1510_panel_init(struct lcd_panel *panel, 29static int innovator1510_panel_init(struct lcd_panel *panel,
30 struct omapfb_device *fbdev) 30 struct omapfb_device *fbdev)
diff --git a/drivers/video/omap/lcd_inn1610.c b/drivers/video/omap/lcd_inn1610.c
index 5ef119c813e0..6a42c6a0cd99 100644
--- a/drivers/video/omap/lcd_inn1610.c
+++ b/drivers/video/omap/lcd_inn1610.c
@@ -22,8 +22,8 @@
22#include <linux/module.h> 22#include <linux/module.h>
23#include <linux/platform_device.h> 23#include <linux/platform_device.h>
24 24
25#include <asm/arch/gpio.h> 25#include <mach/gpio.h>
26#include <asm/arch/omapfb.h> 26#include <mach/omapfb.h>
27 27
28#define MODULE_NAME "omapfb-lcd_h3" 28#define MODULE_NAME "omapfb-lcd_h3"
29 29
diff --git a/drivers/video/omap/lcd_osk.c b/drivers/video/omap/lcd_osk.c
index a38038840fd6..a4a725f427a4 100644
--- a/drivers/video/omap/lcd_osk.c
+++ b/drivers/video/omap/lcd_osk.c
@@ -23,9 +23,9 @@
23#include <linux/module.h> 23#include <linux/module.h>
24#include <linux/platform_device.h> 24#include <linux/platform_device.h>
25 25
26#include <asm/arch/gpio.h> 26#include <mach/gpio.h>
27#include <asm/arch/mux.h> 27#include <mach/mux.h>
28#include <asm/arch/omapfb.h> 28#include <mach/omapfb.h>
29 29
30static int osk_panel_init(struct lcd_panel *panel, struct omapfb_device *fbdev) 30static int osk_panel_init(struct lcd_panel *panel, struct omapfb_device *fbdev)
31{ 31{
diff --git a/drivers/video/omap/lcd_palmte.c b/drivers/video/omap/lcd_palmte.c
index 52bdfdac42c9..218317366e6e 100644
--- a/drivers/video/omap/lcd_palmte.c
+++ b/drivers/video/omap/lcd_palmte.c
@@ -23,8 +23,8 @@
23#include <linux/platform_device.h> 23#include <linux/platform_device.h>
24#include <linux/io.h> 24#include <linux/io.h>
25 25
26#include <asm/arch/fpga.h> 26#include <mach/fpga.h>
27#include <asm/arch/omapfb.h> 27#include <mach/omapfb.h>
28 28
29static int palmte_panel_init(struct lcd_panel *panel, 29static int palmte_panel_init(struct lcd_panel *panel,
30 struct omapfb_device *fbdev) 30 struct omapfb_device *fbdev)
diff --git a/drivers/video/omap/lcd_palmtt.c b/drivers/video/omap/lcd_palmtt.c
index 4bb349f54356..57b0f6cf6a5a 100644
--- a/drivers/video/omap/lcd_palmtt.c
+++ b/drivers/video/omap/lcd_palmtt.c
@@ -29,8 +29,8 @@ GPIO13 - screen blanking
29#include <linux/module.h> 29#include <linux/module.h>
30#include <linux/io.h> 30#include <linux/io.h>
31 31
32#include <asm/arch/gpio.h> 32#include <mach/gpio.h>
33#include <asm/arch/omapfb.h> 33#include <mach/omapfb.h>
34 34
35static int palmtt_panel_init(struct lcd_panel *panel, 35static int palmtt_panel_init(struct lcd_panel *panel,
36 struct omapfb_device *fbdev) 36 struct omapfb_device *fbdev)
diff --git a/drivers/video/omap/lcd_palmz71.c b/drivers/video/omap/lcd_palmz71.c
index ea6170ddff35..d33d78b11723 100644
--- a/drivers/video/omap/lcd_palmz71.c
+++ b/drivers/video/omap/lcd_palmz71.c
@@ -24,7 +24,7 @@
24#include <linux/platform_device.h> 24#include <linux/platform_device.h>
25#include <linux/io.h> 25#include <linux/io.h>
26 26
27#include <asm/arch/omapfb.h> 27#include <mach/omapfb.h>
28 28
29static int palmz71_panel_init(struct lcd_panel *panel, 29static int palmz71_panel_init(struct lcd_panel *panel,
30 struct omapfb_device *fbdev) 30 struct omapfb_device *fbdev)
diff --git a/drivers/video/omap/lcd_sx1.c b/drivers/video/omap/lcd_sx1.c
index c4f306a4e5c9..caa6a896cb8b 100644
--- a/drivers/video/omap/lcd_sx1.c
+++ b/drivers/video/omap/lcd_sx1.c
@@ -23,10 +23,10 @@
23#include <linux/delay.h> 23#include <linux/delay.h>
24#include <linux/io.h> 24#include <linux/io.h>
25 25
26#include <asm/arch/gpio.h> 26#include <mach/gpio.h>
27#include <asm/arch/omapfb.h> 27#include <mach/omapfb.h>
28#include <asm/arch/mcbsp.h> 28#include <mach/mcbsp.h>
29#include <asm/arch/mux.h> 29#include <mach/mux.h>
30 30
31/* 31/*
32 * OMAP310 GPIO registers 32 * OMAP310 GPIO registers
diff --git a/drivers/video/omap/lcdc.c b/drivers/video/omap/lcdc.c
index fb19ed4992db..83514f066712 100644
--- a/drivers/video/omap/lcdc.c
+++ b/drivers/video/omap/lcdc.c
@@ -29,8 +29,8 @@
29#include <linux/vmalloc.h> 29#include <linux/vmalloc.h>
30#include <linux/clk.h> 30#include <linux/clk.h>
31 31
32#include <asm/arch/dma.h> 32#include <mach/dma.h>
33#include <asm/arch/omapfb.h> 33#include <mach/omapfb.h>
34 34
35#include <asm/mach-types.h> 35#include <asm/mach-types.h>
36 36
diff --git a/drivers/video/omap/omapfb_main.c b/drivers/video/omap/omapfb_main.c
index f85af5c4fa68..51a138bd113c 100644
--- a/drivers/video/omap/omapfb_main.c
+++ b/drivers/video/omap/omapfb_main.c
@@ -28,9 +28,8 @@
28#include <linux/mm.h> 28#include <linux/mm.h>
29#include <linux/uaccess.h> 29#include <linux/uaccess.h>
30 30
31#include <asm/mach-types.h> 31#include <mach/dma.h>
32#include <asm/arch/dma.h> 32#include <mach/omapfb.h>
33#include <asm/arch/omapfb.h>
34 33
35#define MODULE_NAME "omapfb" 34#define MODULE_NAME "omapfb"
36 35
diff --git a/drivers/video/omap/rfbi.c b/drivers/video/omap/rfbi.c
index 789cfd23c36b..4a6f13d3facf 100644
--- a/drivers/video/omap/rfbi.c
+++ b/drivers/video/omap/rfbi.c
@@ -27,7 +27,7 @@
27#include <linux/clk.h> 27#include <linux/clk.h>
28#include <linux/io.h> 28#include <linux/io.h>
29 29
30#include <asm/arch/omapfb.h> 30#include <mach/omapfb.h>
31 31
32#include "dispc.h" 32#include "dispc.h"
33 33
diff --git a/drivers/video/omap/sossi.c b/drivers/video/omap/sossi.c
index fafd0f26b90f..6359353c2c67 100644
--- a/drivers/video/omap/sossi.c
+++ b/drivers/video/omap/sossi.c
@@ -24,8 +24,8 @@
24#include <linux/irq.h> 24#include <linux/irq.h>
25#include <linux/io.h> 25#include <linux/io.h>
26 26
27#include <asm/arch/dma.h> 27#include <mach/dma.h>
28#include <asm/arch/omapfb.h> 28#include <mach/omapfb.h>
29 29
30#include "lcdc.h" 30#include "lcdc.h"
31 31
diff --git a/drivers/video/pnx4008/dum.h b/drivers/video/pnx4008/dum.h
index d80a614d89ed..1234d4375d92 100644
--- a/drivers/video/pnx4008/dum.h
+++ b/drivers/video/pnx4008/dum.h
@@ -12,7 +12,7 @@
12#ifndef __PNX008_DUM_H__ 12#ifndef __PNX008_DUM_H__
13#define __PNX008_DUM_H__ 13#define __PNX008_DUM_H__
14 14
15#include <asm/arch/platform.h> 15#include <mach/platform.h>
16 16
17#define PNX4008_DUMCONF_VA_BASE IO_ADDRESS(PNX4008_DUMCONF_BASE) 17#define PNX4008_DUMCONF_VA_BASE IO_ADDRESS(PNX4008_DUMCONF_BASE)
18#define PNX4008_DUM_MAIN_VA_BASE IO_ADDRESS(PNX4008_DUM_MAINCFG_BASE) 18#define PNX4008_DUM_MAIN_VA_BASE IO_ADDRESS(PNX4008_DUM_MAINCFG_BASE)
diff --git a/drivers/video/pnx4008/sdum.c b/drivers/video/pnx4008/sdum.c
index d23bf0d659b6..2aa09bce3944 100644
--- a/drivers/video/pnx4008/sdum.c
+++ b/drivers/video/pnx4008/sdum.c
@@ -30,7 +30,7 @@
30#include <linux/dma-mapping.h> 30#include <linux/dma-mapping.h>
31#include <linux/clk.h> 31#include <linux/clk.h>
32#include <asm/uaccess.h> 32#include <asm/uaccess.h>
33#include <asm/arch/gpio.h> 33#include <mach/gpio.h>
34 34
35#include "sdum.h" 35#include "sdum.h"
36#include "fbcommon.h" 36#include "fbcommon.h"
diff --git a/drivers/video/pxafb.c b/drivers/video/pxafb.c
index 69de2fed6c58..e7aa7ae8fca8 100644
--- a/drivers/video/pxafb.c
+++ b/drivers/video/pxafb.c
@@ -45,14 +45,14 @@
45#include <linux/kthread.h> 45#include <linux/kthread.h>
46#include <linux/freezer.h> 46#include <linux/freezer.h>
47 47
48#include <asm/hardware.h> 48#include <mach/hardware.h>
49#include <asm/io.h> 49#include <asm/io.h>
50#include <asm/irq.h> 50#include <asm/irq.h>
51#include <asm/div64.h> 51#include <asm/div64.h>
52#include <asm/arch/pxa-regs.h> 52#include <mach/pxa-regs.h>
53#include <asm/arch/pxa2xx-gpio.h> 53#include <mach/pxa2xx-gpio.h>
54#include <asm/arch/bitfield.h> 54#include <mach/bitfield.h>
55#include <asm/arch/pxafb.h> 55#include <mach/pxafb.h>
56 56
57/* 57/*
58 * Complain if VAR is out of range. 58 * Complain if VAR is out of range.
diff --git a/drivers/video/s3c2410fb.c b/drivers/video/s3c2410fb.c
index f0598961c6b0..79cf0b1976aa 100644
--- a/drivers/video/s3c2410fb.c
+++ b/drivers/video/s3c2410fb.c
@@ -29,9 +29,9 @@
29#include <asm/div64.h> 29#include <asm/div64.h>
30 30
31#include <asm/mach/map.h> 31#include <asm/mach/map.h>
32#include <asm/arch/regs-lcd.h> 32#include <mach/regs-lcd.h>
33#include <asm/arch/regs-gpio.h> 33#include <mach/regs-gpio.h>
34#include <asm/arch/fb.h> 34#include <mach/fb.h>
35 35
36#ifdef CONFIG_PM 36#ifdef CONFIG_PM
37#include <linux/pm.h> 37#include <linux/pm.h>
diff --git a/drivers/video/sa1100fb.c b/drivers/video/sa1100fb.c
index 78bcdbc3f484..c052bd4c0b06 100644
--- a/drivers/video/sa1100fb.c
+++ b/drivers/video/sa1100fb.c
@@ -177,11 +177,11 @@
177#include <linux/dma-mapping.h> 177#include <linux/dma-mapping.h>
178#include <linux/mutex.h> 178#include <linux/mutex.h>
179 179
180#include <asm/hardware.h> 180#include <mach/hardware.h>
181#include <asm/io.h> 181#include <asm/io.h>
182#include <asm/mach-types.h> 182#include <asm/mach-types.h>
183#include <asm/arch/assabet.h> 183#include <mach/assabet.h>
184#include <asm/arch/shannon.h> 184#include <mach/shannon.h>
185 185
186/* 186/*
187 * debugging? 187 * debugging?
diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
index 32b9fe153641..db20542796bf 100644
--- a/drivers/watchdog/Kconfig
+++ b/drivers/watchdog/Kconfig
@@ -285,10 +285,11 @@ config ALIM1535_WDT
285 285
286config ALIM7101_WDT 286config ALIM7101_WDT
287 tristate "ALi M7101 PMU Computer Watchdog" 287 tristate "ALi M7101 PMU Computer Watchdog"
288 depends on X86 && PCI 288 depends on PCI
289 help 289 help
290 This is the driver for the hardware watchdog on the ALi M7101 PMU 290 This is the driver for the hardware watchdog on the ALi M7101 PMU
291 as used in the x86 Cobalt servers. 291 as used in the x86 Cobalt servers and also found in some
292 SPARC Netra servers too.
292 293
293 To compile this driver as a module, choose M here: the 294 To compile this driver as a module, choose M here: the
294 module will be called alim7101_wdt. 295 module will be called alim7101_wdt.
diff --git a/drivers/watchdog/Makefile b/drivers/watchdog/Makefile
index 049c91895699..ca3dc043d786 100644
--- a/drivers/watchdog/Makefile
+++ b/drivers/watchdog/Makefile
@@ -66,7 +66,10 @@ obj-$(CONFIG_IB700_WDT) += ib700wdt.o
66obj-$(CONFIG_IBMASR) += ibmasr.o 66obj-$(CONFIG_IBMASR) += ibmasr.o
67obj-$(CONFIG_WAFER_WDT) += wafer5823wdt.o 67obj-$(CONFIG_WAFER_WDT) += wafer5823wdt.o
68obj-$(CONFIG_I6300ESB_WDT) += i6300esb.o 68obj-$(CONFIG_I6300ESB_WDT) += i6300esb.o
69obj-$(CONFIG_ITCO_WDT) += iTCO_wdt.o iTCO_vendor_support.o 69obj-$(CONFIG_ITCO_WDT) += iTCO_wdt.o
70ifeq ($(CONFIG_ITCO_VENDOR_SUPPORT),y)
71obj-$(CONFIG_ITCO_WDT) += iTCO_vendor_support.o
72endif
70obj-$(CONFIG_IT8712F_WDT) += it8712f_wdt.o 73obj-$(CONFIG_IT8712F_WDT) += it8712f_wdt.o
71obj-$(CONFIG_HP_WATCHDOG) += hpwdt.o 74obj-$(CONFIG_HP_WATCHDOG) += hpwdt.o
72obj-$(CONFIG_SC1200_WDT) += sc1200wdt.o 75obj-$(CONFIG_SC1200_WDT) += sc1200wdt.o
diff --git a/drivers/watchdog/at91rm9200_wdt.c b/drivers/watchdog/at91rm9200_wdt.c
index 2313f44144f8..d061f0ad2d20 100644
--- a/drivers/watchdog/at91rm9200_wdt.c
+++ b/drivers/watchdog/at91rm9200_wdt.c
@@ -21,8 +21,7 @@
21#include <linux/types.h> 21#include <linux/types.h>
22#include <linux/watchdog.h> 22#include <linux/watchdog.h>
23#include <linux/uaccess.h> 23#include <linux/uaccess.h>
24#include <asm/arch/at91_st.h> 24#include <mach/at91_st.h>
25
26 25
27#define WDT_DEFAULT_TIME 5 /* seconds */ 26#define WDT_DEFAULT_TIME 5 /* seconds */
28#define WDT_MAX_TIME 256 /* seconds */ 27#define WDT_MAX_TIME 256 /* seconds */
@@ -129,7 +128,7 @@ static struct watchdog_info at91_wdt_info = {
129/* 128/*
130 * Handle commands from user-space. 129 * Handle commands from user-space.
131 */ 130 */
132static long at91_wdt_ioct(struct file *file, 131static long at91_wdt_ioctl(struct file *file,
133 unsigned int cmd, unsigned long arg) 132 unsigned int cmd, unsigned long arg)
134{ 133{
135 void __user *argp = (void __user *)arg; 134 void __user *argp = (void __user *)arg;
diff --git a/drivers/watchdog/davinci_wdt.c b/drivers/watchdog/davinci_wdt.c
index 802aeba347a0..2e1360286732 100644
--- a/drivers/watchdog/davinci_wdt.c
+++ b/drivers/watchdog/davinci_wdt.c
@@ -24,8 +24,7 @@
24#include <linux/spinlock.h> 24#include <linux/spinlock.h>
25#include <linux/uaccess.h> 25#include <linux/uaccess.h>
26#include <linux/io.h> 26#include <linux/io.h>
27 27#include <mach/hardware.h>
28#include <asm/hardware.h>
29 28
30#define MODULE_NAME "DAVINCI-WDT: " 29#define MODULE_NAME "DAVINCI-WDT: "
31 30
diff --git a/drivers/watchdog/ep93xx_wdt.c b/drivers/watchdog/ep93xx_wdt.c
index 07b74a768922..e9f950ff86ea 100644
--- a/drivers/watchdog/ep93xx_wdt.c
+++ b/drivers/watchdog/ep93xx_wdt.c
@@ -29,8 +29,7 @@
29#include <linux/watchdog.h> 29#include <linux/watchdog.h>
30#include <linux/timer.h> 30#include <linux/timer.h>
31#include <linux/uaccess.h> 31#include <linux/uaccess.h>
32 32#include <mach/hardware.h>
33#include <asm/hardware.h>
34 33
35#define WDT_VERSION "0.3" 34#define WDT_VERSION "0.3"
36#define PFX "ep93xx_wdt: " 35#define PFX "ep93xx_wdt: "
diff --git a/drivers/watchdog/iop_wdt.c b/drivers/watchdog/iop_wdt.c
index 8278b13f77c7..96eb2cbe5874 100644
--- a/drivers/watchdog/iop_wdt.c
+++ b/drivers/watchdog/iop_wdt.c
@@ -32,7 +32,7 @@
32#include <linux/miscdevice.h> 32#include <linux/miscdevice.h>
33#include <linux/watchdog.h> 33#include <linux/watchdog.h>
34#include <linux/uaccess.h> 34#include <linux/uaccess.h>
35#include <asm/hardware.h> 35#include <mach/hardware.h>
36 36
37static int nowayout = WATCHDOG_NOWAYOUT; 37static int nowayout = WATCHDOG_NOWAYOUT;
38static unsigned long wdt_status; 38static unsigned long wdt_status;
diff --git a/drivers/watchdog/ixp2000_wdt.c b/drivers/watchdog/ixp2000_wdt.c
index a77f69d52877..4f4b35a20d84 100644
--- a/drivers/watchdog/ixp2000_wdt.c
+++ b/drivers/watchdog/ixp2000_wdt.c
@@ -26,8 +26,7 @@
26#include <linux/init.h> 26#include <linux/init.h>
27#include <linux/bitops.h> 27#include <linux/bitops.h>
28#include <linux/uaccess.h> 28#include <linux/uaccess.h>
29 29#include <mach/hardware.h>
30#include <asm/hardware.h>
31 30
32static int nowayout = WATCHDOG_NOWAYOUT; 31static int nowayout = WATCHDOG_NOWAYOUT;
33static unsigned int heartbeat = 60; /* (secs) Default is 1 minute */ 32static unsigned int heartbeat = 60; /* (secs) Default is 1 minute */
diff --git a/drivers/watchdog/ixp4xx_wdt.c b/drivers/watchdog/ixp4xx_wdt.c
index ef3157dc9ac1..8302ef005be7 100644
--- a/drivers/watchdog/ixp4xx_wdt.c
+++ b/drivers/watchdog/ixp4xx_wdt.c
@@ -23,14 +23,13 @@
23#include <linux/init.h> 23#include <linux/init.h>
24#include <linux/bitops.h> 24#include <linux/bitops.h>
25#include <linux/uaccess.h> 25#include <linux/uaccess.h>
26 26#include <mach/hardware.h>
27#include <asm/hardware.h>
28 27
29static int nowayout = WATCHDOG_NOWAYOUT; 28static int nowayout = WATCHDOG_NOWAYOUT;
30static int heartbeat = 60; /* (secs) Default is 1 minute */ 29static int heartbeat = 60; /* (secs) Default is 1 minute */
31static unsigned long wdt_status; 30static unsigned long wdt_status;
32static unsigned long boot_status; 31static unsigned long boot_status;
33static spin_lock_t wdt_lock; 32static DEFINE_SPINLOCK(wdt_lock);
34 33
35#define WDT_TICK_RATE (IXP4XX_PERIPHERAL_BUS_CLOCK * 1000000UL) 34#define WDT_TICK_RATE (IXP4XX_PERIPHERAL_BUS_CLOCK * 1000000UL)
36 35
diff --git a/drivers/watchdog/ks8695_wdt.c b/drivers/watchdog/ks8695_wdt.c
index f8566d5c62fe..0b798fdaa378 100644
--- a/drivers/watchdog/ks8695_wdt.c
+++ b/drivers/watchdog/ks8695_wdt.c
@@ -21,8 +21,7 @@
21#include <linux/watchdog.h> 21#include <linux/watchdog.h>
22#include <linux/io.h> 22#include <linux/io.h>
23#include <linux/uaccess.h> 23#include <linux/uaccess.h>
24#include <asm/arch/regs-timer.h> 24#include <mach/regs-timer.h>
25
26 25
27#define WDT_DEFAULT_TIME 5 /* seconds */ 26#define WDT_DEFAULT_TIME 5 /* seconds */
28#define WDT_MAX_TIME 171 /* seconds */ 27#define WDT_MAX_TIME 171 /* seconds */
diff --git a/drivers/watchdog/omap_wdt.c b/drivers/watchdog/omap_wdt.c
index 6f5420f478a9..3a11dadfd8e7 100644
--- a/drivers/watchdog/omap_wdt.c
+++ b/drivers/watchdog/omap_wdt.c
@@ -42,9 +42,8 @@
42#include <linux/bitops.h> 42#include <linux/bitops.h>
43#include <linux/io.h> 43#include <linux/io.h>
44#include <linux/uaccess.h> 44#include <linux/uaccess.h>
45#include <linux/hardware.h> 45#include <mach/hardware.h>
46 46#include <mach/prcm.h>
47#include <asm/arch/prcm.h>
48 47
49#include "omap_wdt.h" 48#include "omap_wdt.h"
50 49
diff --git a/drivers/watchdog/pcwd.c b/drivers/watchdog/pcwd.c
index 3b0ddc7fcf3f..9e1331a3b215 100644
--- a/drivers/watchdog/pcwd.c
+++ b/drivers/watchdog/pcwd.c
@@ -168,7 +168,7 @@ static const int heartbeat_tbl[] = {
168static int cards_found; 168static int cards_found;
169 169
170/* internal variables */ 170/* internal variables */
171static atomic_t open_allowed = ATOMIC_INIT(1); 171static unsigned long open_allowed;
172static char expect_close; 172static char expect_close;
173static int temp_panic; 173static int temp_panic;
174 174
diff --git a/drivers/watchdog/pnx4008_wdt.c b/drivers/watchdog/pnx4008_wdt.c
index 6eadf5ebb9b3..0ed84162437b 100644
--- a/drivers/watchdog/pnx4008_wdt.c
+++ b/drivers/watchdog/pnx4008_wdt.c
@@ -30,8 +30,7 @@
30#include <linux/spinlock.h> 30#include <linux/spinlock.h>
31#include <linux/uaccess.h> 31#include <linux/uaccess.h>
32#include <linux/io.h> 32#include <linux/io.h>
33 33#include <mach/hardware.h>
34#include <asm/hardware.h>
35 34
36#define MODULE_NAME "PNX4008-WDT: " 35#define MODULE_NAME "PNX4008-WDT: "
37 36
diff --git a/drivers/watchdog/s3c2410_wdt.c b/drivers/watchdog/s3c2410_wdt.c
index c417fb5e913f..3da2b90d2fe6 100644
--- a/drivers/watchdog/s3c2410_wdt.c
+++ b/drivers/watchdog/s3c2410_wdt.c
@@ -49,7 +49,7 @@
49#include <linux/uaccess.h> 49#include <linux/uaccess.h>
50#include <linux/io.h> 50#include <linux/io.h>
51 51
52#include <asm/arch/map.h> 52#include <mach/map.h>
53 53
54#undef S3C_VA_WATCHDOG 54#undef S3C_VA_WATCHDOG
55#define S3C_VA_WATCHDOG (0) 55#define S3C_VA_WATCHDOG (0)
diff --git a/drivers/watchdog/sa1100_wdt.c b/drivers/watchdog/sa1100_wdt.c
index 27d6898a7c98..31a48437dc3d 100644
--- a/drivers/watchdog/sa1100_wdt.c
+++ b/drivers/watchdog/sa1100_wdt.c
@@ -29,10 +29,11 @@
29#include <linux/uaccess.h> 29#include <linux/uaccess.h>
30 30
31#ifdef CONFIG_ARCH_PXA 31#ifdef CONFIG_ARCH_PXA
32#include <asm/arch/pxa-regs.h> 32#include <mach/pxa-regs.h>
33#endif 33#endif
34 34
35#include <asm/hardware.h> 35#include <mach/reset.h>
36#include <mach/hardware.h>
36 37
37#define OSCR_FREQ CLOCK_TICK_RATE 38#define OSCR_FREQ CLOCK_TICK_RATE
38 39
@@ -159,7 +160,8 @@ static int __init sa1100dog_init(void)
159 * we suspend, RCSR will be cleared, and the watchdog 160 * we suspend, RCSR will be cleared, and the watchdog
160 * reset reason will be lost. 161 * reset reason will be lost.
161 */ 162 */
162 boot_status = (RCSR & RCSR_WDR) ? WDIOF_CARDRESET : 0; 163 boot_status = (reset_status & RESET_STATUS_WATCHDOG) ?
164 WDIOF_CARDRESET : 0;
163 pre_margin = OSCR_FREQ * margin; 165 pre_margin = OSCR_FREQ * margin;
164 166
165 ret = misc_register(&sa1100dog_miscdev); 167 ret = misc_register(&sa1100dog_miscdev);
diff --git a/drivers/watchdog/shwdt.c b/drivers/watchdog/shwdt.c
index 824125adf90a..cdc7138be301 100644
--- a/drivers/watchdog/shwdt.c
+++ b/drivers/watchdog/shwdt.c
@@ -30,7 +30,7 @@
30#include <linux/mm.h> 30#include <linux/mm.h>
31#include <linux/io.h> 31#include <linux/io.h>
32#include <linux/uaccess.h> 32#include <linux/uaccess.h>
33#include <linux/watchdog.h> 33#include <asm/watchdog.h>
34 34
35#define PFX "shwdt: " 35#define PFX "shwdt: "
36 36
@@ -68,7 +68,7 @@ static int clock_division_ratio = WTCSR_CKS_4096;
68static void sh_wdt_ping(unsigned long data); 68static void sh_wdt_ping(unsigned long data);
69 69
70static unsigned long shwdt_is_open; 70static unsigned long shwdt_is_open;
71static struct watchdog_info sh_wdt_info; 71static const struct watchdog_info sh_wdt_info;
72static char shwdt_expect_close; 72static char shwdt_expect_close;
73static DEFINE_TIMER(timer, sh_wdt_ping, 0, 0); 73static DEFINE_TIMER(timer, sh_wdt_ping, 0, 0);
74static unsigned long next_heartbeat; 74static unsigned long next_heartbeat;
@@ -89,7 +89,7 @@ static void sh_wdt_start(void)
89 __u8 csr; 89 __u8 csr;
90 unsigned long flags; 90 unsigned long flags;
91 91
92 spin_lock_irqsave(&wdt_lock, flags); 92 spin_lock_irqsave(&shwdt_lock, flags);
93 93
94 next_heartbeat = jiffies + (heartbeat * HZ); 94 next_heartbeat = jiffies + (heartbeat * HZ);
95 mod_timer(&timer, next_ping_period(clock_division_ratio)); 95 mod_timer(&timer, next_ping_period(clock_division_ratio));
@@ -127,7 +127,7 @@ static void sh_wdt_start(void)
127 csr &= ~RSTCSR_RSTS; 127 csr &= ~RSTCSR_RSTS;
128 sh_wdt_write_rstcsr(csr); 128 sh_wdt_write_rstcsr(csr);
129#endif 129#endif
130 spin_unlock_irqrestore(&wdt_lock, flags); 130 spin_unlock_irqrestore(&shwdt_lock, flags);
131} 131}
132 132
133/** 133/**
@@ -139,14 +139,14 @@ static void sh_wdt_stop(void)
139 __u8 csr; 139 __u8 csr;
140 unsigned long flags; 140 unsigned long flags;
141 141
142 spin_lock_irqsave(&wdt_lock, flags); 142 spin_lock_irqsave(&shwdt_lock, flags);
143 143
144 del_timer(&timer); 144 del_timer(&timer);
145 145
146 csr = sh_wdt_read_csr(); 146 csr = sh_wdt_read_csr();
147 csr &= ~WTCSR_TME; 147 csr &= ~WTCSR_TME;
148 sh_wdt_write_csr(csr); 148 sh_wdt_write_csr(csr);
149 spin_unlock_irqrestore(&wdt_lock, flags); 149 spin_unlock_irqrestore(&shwdt_lock, flags);
150} 150}
151 151
152/** 152/**
@@ -157,9 +157,9 @@ static inline void sh_wdt_keepalive(void)
157{ 157{
158 unsigned long flags; 158 unsigned long flags;
159 159
160 spin_lock_irqsave(&wdt_lock, flags); 160 spin_lock_irqsave(&shwdt_lock, flags);
161 next_heartbeat = jiffies + (heartbeat * HZ); 161 next_heartbeat = jiffies + (heartbeat * HZ);
162 spin_unlock_irqrestore(&wdt_lock, flags); 162 spin_unlock_irqrestore(&shwdt_lock, flags);
163} 163}
164 164
165/** 165/**
@@ -173,9 +173,9 @@ static int sh_wdt_set_heartbeat(int t)
173 if (unlikely(t < 1 || t > 3600)) /* arbitrary upper limit */ 173 if (unlikely(t < 1 || t > 3600)) /* arbitrary upper limit */
174 return -EINVAL; 174 return -EINVAL;
175 175
176 spin_lock_irqsave(&wdt_lock, flags); 176 spin_lock_irqsave(&shwdt_lock, flags);
177 heartbeat = t; 177 heartbeat = t;
178 spin_unlock_irqrestore(&wdt_lock, flags); 178 spin_unlock_irqrestore(&shwdt_lock, flags);
179 return 0; 179 return 0;
180} 180}
181 181
@@ -189,7 +189,7 @@ static void sh_wdt_ping(unsigned long data)
189{ 189{
190 unsigned long flags; 190 unsigned long flags;
191 191
192 spin_lock_irqsave(&wdt_lock, flags); 192 spin_lock_irqsave(&shwdt_lock, flags);
193 if (time_before(jiffies, next_heartbeat)) { 193 if (time_before(jiffies, next_heartbeat)) {
194 __u8 csr; 194 __u8 csr;
195 195
@@ -203,7 +203,7 @@ static void sh_wdt_ping(unsigned long data)
203 } else 203 } else
204 printk(KERN_WARNING PFX "Heartbeat lost! Will not ping " 204 printk(KERN_WARNING PFX "Heartbeat lost! Will not ping "
205 "the watchdog\n"); 205 "the watchdog\n");
206 spin_unlock_irqrestore(&wdt_lock, flags); 206 spin_unlock_irqrestore(&shwdt_lock, flags);
207} 207}
208 208
209/** 209/**
diff --git a/drivers/watchdog/txx9wdt.c b/drivers/watchdog/txx9wdt.c
index dbbc018a5f46..6adab77fbbb0 100644
--- a/drivers/watchdog/txx9wdt.c
+++ b/drivers/watchdog/txx9wdt.c
@@ -45,7 +45,7 @@ static unsigned long txx9wdt_alive;
45static int expect_close; 45static int expect_close;
46static struct txx9_tmr_reg __iomem *txx9wdt_reg; 46static struct txx9_tmr_reg __iomem *txx9wdt_reg;
47static struct clk *txx9_imclk; 47static struct clk *txx9_imclk;
48static DECLARE_LOCK(txx9_lock); 48static DEFINE_SPINLOCK(txx9_lock);
49 49
50static void txx9wdt_ping(void) 50static void txx9wdt_ping(void)
51{ 51{
diff --git a/drivers/watchdog/wdt285.c b/drivers/watchdog/wdt285.c
index fea398a4ca32..db362c34958b 100644
--- a/drivers/watchdog/wdt285.c
+++ b/drivers/watchdog/wdt285.c
@@ -28,8 +28,8 @@
28#include <linux/interrupt.h> 28#include <linux/interrupt.h>
29#include <linux/uaccess.h> 29#include <linux/uaccess.h>
30#include <linux/irq.h> 30#include <linux/irq.h>
31#include <mach/hardware.h>
31 32
32#include <asm/hardware.h>
33#include <asm/mach-types.h> 33#include <asm/mach-types.h>
34#include <asm/hardware/dec21285.h> 34#include <asm/hardware/dec21285.h>
35 35
@@ -208,7 +208,7 @@ static int __init footbridge_watchdog_init(void)
208 soft_margin); 208 soft_margin);
209 209
210 if (machine_is_cats()) 210 if (machine_is_cats())
211 printk(KERN_WARN 211 printk(KERN_WARNING
212 "Warning: Watchdog reset may not work on this machine.\n"); 212 "Warning: Watchdog reset may not work on this machine.\n");
213 return 0; 213 return 0;
214} 214}
diff --git a/fs/cifs/CHANGES b/fs/cifs/CHANGES
index 1f3465201fdf..f5d0083e09fa 100644
--- a/fs/cifs/CHANGES
+++ b/fs/cifs/CHANGES
@@ -1,3 +1,11 @@
1Version 1.54
2------------
3Fix premature write failure on congested networks (we would give up
4on EAGAIN from the socket too quickly on large writes).
5Cifs_mkdir and cifs_create now respect the setgid bit on parent dir.
6Fix endian problems in acl (mode from/to cifs acl) on bigendian
7architectures.
8
1Version 1.53 9Version 1.53
2------------ 10------------
3DFS support added (Microsoft Distributed File System client support needed 11DFS support added (Microsoft Distributed File System client support needed
diff --git a/fs/cifs/asn1.c b/fs/cifs/asn1.c
index 6bb440b257b0..5fabd2caf93c 100644
--- a/fs/cifs/asn1.c
+++ b/fs/cifs/asn1.c
@@ -483,6 +483,7 @@ decode_negTokenInit(unsigned char *security_blob, int length,
483 483
484 asn1_open(&ctx, security_blob, length); 484 asn1_open(&ctx, security_blob, length);
485 485
486 /* GSSAPI header */
486 if (asn1_header_decode(&ctx, &end, &cls, &con, &tag) == 0) { 487 if (asn1_header_decode(&ctx, &end, &cls, &con, &tag) == 0) {
487 cFYI(1, ("Error decoding negTokenInit header")); 488 cFYI(1, ("Error decoding negTokenInit header"));
488 return 0; 489 return 0;
@@ -490,153 +491,142 @@ decode_negTokenInit(unsigned char *security_blob, int length,
490 || (tag != ASN1_EOC)) { 491 || (tag != ASN1_EOC)) {
491 cFYI(1, ("cls = %d con = %d tag = %d", cls, con, tag)); 492 cFYI(1, ("cls = %d con = %d tag = %d", cls, con, tag));
492 return 0; 493 return 0;
493 } else { 494 }
494 /* remember to free obj->oid */
495 rc = asn1_header_decode(&ctx, &end, &cls, &con, &tag);
496 if (rc) {
497 if ((tag == ASN1_OJI) && (con == ASN1_PRI)) {
498 rc = asn1_oid_decode(&ctx, end, &oid, &oidlen);
499 if (rc) {
500 rc = compare_oid(oid, oidlen,
501 SPNEGO_OID,
502 SPNEGO_OID_LEN);
503 kfree(oid);
504 }
505 } else
506 rc = 0;
507 }
508 495
509 if (!rc) { 496 /* Check for SPNEGO OID -- remember to free obj->oid */
510 cFYI(1, ("Error decoding negTokenInit header")); 497 rc = asn1_header_decode(&ctx, &end, &cls, &con, &tag);
511 return 0; 498 if (rc) {
512 } 499 if ((tag == ASN1_OJI) && (con == ASN1_PRI) &&
500 (cls == ASN1_UNI)) {
501 rc = asn1_oid_decode(&ctx, end, &oid, &oidlen);
502 if (rc) {
503 rc = compare_oid(oid, oidlen, SPNEGO_OID,
504 SPNEGO_OID_LEN);
505 kfree(oid);
506 }
507 } else
508 rc = 0;
509 }
513 510
514 if (asn1_header_decode(&ctx, &end, &cls, &con, &tag) == 0) { 511 /* SPNEGO OID not present or garbled -- bail out */
515 cFYI(1, ("Error decoding negTokenInit")); 512 if (!rc) {
516 return 0; 513 cFYI(1, ("Error decoding negTokenInit header"));
517 } else if ((cls != ASN1_CTX) || (con != ASN1_CON) 514 return 0;
518 || (tag != ASN1_EOC)) { 515 }
519 cFYI(1,
520 ("cls = %d con = %d tag = %d end = %p (%d) exit 0",
521 cls, con, tag, end, *end));
522 return 0;
523 }
524 516
525 if (asn1_header_decode(&ctx, &end, &cls, &con, &tag) == 0) { 517 if (asn1_header_decode(&ctx, &end, &cls, &con, &tag) == 0) {
526 cFYI(1, ("Error decoding negTokenInit")); 518 cFYI(1, ("Error decoding negTokenInit"));
527 return 0; 519 return 0;
528 } else if ((cls != ASN1_UNI) || (con != ASN1_CON) 520 } else if ((cls != ASN1_CTX) || (con != ASN1_CON)
529 || (tag != ASN1_SEQ)) { 521 || (tag != ASN1_EOC)) {
530 cFYI(1, 522 cFYI(1,
531 ("cls = %d con = %d tag = %d end = %p (%d) exit 1", 523 ("cls = %d con = %d tag = %d end = %p (%d) exit 0",
532 cls, con, tag, end, *end)); 524 cls, con, tag, end, *end));
533 return 0; 525 return 0;
534 } 526 }
535 527
536 if (asn1_header_decode(&ctx, &end, &cls, &con, &tag) == 0) { 528 if (asn1_header_decode(&ctx, &end, &cls, &con, &tag) == 0) {
537 cFYI(1, ("Error decoding 2nd part of negTokenInit")); 529 cFYI(1, ("Error decoding negTokenInit"));
538 return 0; 530 return 0;
539 } else if ((cls != ASN1_CTX) || (con != ASN1_CON) 531 } else if ((cls != ASN1_UNI) || (con != ASN1_CON)
540 || (tag != ASN1_EOC)) { 532 || (tag != ASN1_SEQ)) {
541 cFYI(1, 533 cFYI(1,
542 ("cls = %d con = %d tag = %d end = %p (%d) exit 0", 534 ("cls = %d con = %d tag = %d end = %p (%d) exit 1",
543 cls, con, tag, end, *end)); 535 cls, con, tag, end, *end));
544 return 0; 536 return 0;
545 } 537 }
546 538
547 if (asn1_header_decode 539 if (asn1_header_decode(&ctx, &end, &cls, &con, &tag) == 0) {
548 (&ctx, &sequence_end, &cls, &con, &tag) == 0) { 540 cFYI(1, ("Error decoding 2nd part of negTokenInit"));
549 cFYI(1, ("Error decoding 2nd part of negTokenInit")); 541 return 0;
550 return 0; 542 } else if ((cls != ASN1_CTX) || (con != ASN1_CON)
551 } else if ((cls != ASN1_UNI) || (con != ASN1_CON) 543 || (tag != ASN1_EOC)) {
552 || (tag != ASN1_SEQ)) { 544 cFYI(1,
553 cFYI(1, 545 ("cls = %d con = %d tag = %d end = %p (%d) exit 0",
554 ("cls = %d con = %d tag = %d end = %p (%d) exit 1", 546 cls, con, tag, end, *end));
555 cls, con, tag, end, *end)); 547 return 0;
556 return 0; 548 }
557 }
558 549
559 while (!asn1_eoc_decode(&ctx, sequence_end)) { 550 if (asn1_header_decode
560 rc = asn1_header_decode(&ctx, &end, &cls, &con, &tag); 551 (&ctx, &sequence_end, &cls, &con, &tag) == 0) {
561 if (!rc) { 552 cFYI(1, ("Error decoding 2nd part of negTokenInit"));
562 cFYI(1, 553 return 0;
563 ("Error decoding negTokenInit hdr exit2")); 554 } else if ((cls != ASN1_UNI) || (con != ASN1_CON)
564 return 0; 555 || (tag != ASN1_SEQ)) {
565 } 556 cFYI(1,
566 if ((tag == ASN1_OJI) && (con == ASN1_PRI)) { 557 ("cls = %d con = %d tag = %d end = %p (%d) exit 1",
567 if (asn1_oid_decode(&ctx, end, &oid, &oidlen)) { 558 cls, con, tag, end, *end));
568 559 return 0;
569 cFYI(1, 560 }
570 ("OID len = %d oid = 0x%lx 0x%lx "
571 "0x%lx 0x%lx",
572 oidlen, *oid, *(oid + 1),
573 *(oid + 2), *(oid + 3)));
574
575 if (compare_oid(oid, oidlen,
576 MSKRB5_OID,
577 MSKRB5_OID_LEN))
578 use_kerberos = true;
579 else if (compare_oid(oid, oidlen,
580 KRB5_OID,
581 KRB5_OID_LEN))
582 use_kerberos = true;
583 else if (compare_oid(oid, oidlen,
584 NTLMSSP_OID,
585 NTLMSSP_OID_LEN))
586 use_ntlmssp = true;
587
588 kfree(oid);
589 }
590 } else {
591 cFYI(1, ("Should be an oid what is going on?"));
592 }
593 }
594 561
595 if (asn1_header_decode(&ctx, &end, &cls, &con, &tag) == 0) { 562 while (!asn1_eoc_decode(&ctx, sequence_end)) {
596 cFYI(1, 563 rc = asn1_header_decode(&ctx, &end, &cls, &con, &tag);
597 ("Error decoding last part negTokenInit exit3")); 564 if (!rc) {
598 return 0;
599 } else if ((cls != ASN1_CTX) || (con != ASN1_CON)) {
600 /* tag = 3 indicating mechListMIC */
601 cFYI(1, 565 cFYI(1,
602 ("Exit 4 cls = %d con = %d tag = %d end = %p (%d)", 566 ("Error decoding negTokenInit hdr exit2"));
603 cls, con, tag, end, *end));
604 return 0; 567 return 0;
605 } 568 }
606 if (asn1_header_decode(&ctx, &end, &cls, &con, &tag) == 0) { 569 if ((tag == ASN1_OJI) && (con == ASN1_PRI)) {
607 cFYI(1, 570 if (asn1_oid_decode(&ctx, end, &oid, &oidlen)) {
608 ("Error decoding last part negTokenInit exit5")); 571
609 return 0; 572 cFYI(1, ("OID len = %d oid = 0x%lx 0x%lx "
610 } else if ((cls != ASN1_UNI) || (con != ASN1_CON) 573 "0x%lx 0x%lx", oidlen, *oid,
611 || (tag != ASN1_SEQ)) { 574 *(oid + 1), *(oid + 2), *(oid + 3)));
612 cFYI(1, ("cls = %d con = %d tag = %d end = %p (%d)", 575
613 cls, con, tag, end, *end)); 576 if (compare_oid(oid, oidlen, MSKRB5_OID,
577 MSKRB5_OID_LEN))
578 use_kerberos = true;
579 else if (compare_oid(oid, oidlen, KRB5_OID,
580 KRB5_OID_LEN))
581 use_kerberos = true;
582 else if (compare_oid(oid, oidlen, NTLMSSP_OID,
583 NTLMSSP_OID_LEN))
584 use_ntlmssp = true;
585
586 kfree(oid);
587 }
588 } else {
589 cFYI(1, ("Should be an oid what is going on?"));
614 } 590 }
591 }
615 592
616 if (asn1_header_decode(&ctx, &end, &cls, &con, &tag) == 0) { 593 if (asn1_header_decode(&ctx, &end, &cls, &con, &tag) == 0) {
617 cFYI(1, 594 cFYI(1, ("Error decoding last part negTokenInit exit3"));
618 ("Error decoding last part negTokenInit exit 7")); 595 return 0;
619 return 0; 596 } else if ((cls != ASN1_CTX) || (con != ASN1_CON)) {
620 } else if ((cls != ASN1_CTX) || (con != ASN1_CON)) { 597 /* tag = 3 indicating mechListMIC */
621 cFYI(1, 598 cFYI(1, ("Exit 4 cls = %d con = %d tag = %d end = %p (%d)",
622 ("Exit 8 cls = %d con = %d tag = %d end = %p (%d)", 599 cls, con, tag, end, *end));
623 cls, con, tag, end, *end)); 600 return 0;
624 return 0; 601 }
625 } 602 if (asn1_header_decode(&ctx, &end, &cls, &con, &tag) == 0) {
626 if (asn1_header_decode(&ctx, &end, &cls, &con, &tag) == 0) { 603 cFYI(1, ("Error decoding last part negTokenInit exit5"));
627 cFYI(1, 604 return 0;
628 ("Error decoding last part negTokenInit exit9")); 605 } else if ((cls != ASN1_UNI) || (con != ASN1_CON)
629 return 0; 606 || (tag != ASN1_SEQ)) {
630 } else if ((cls != ASN1_UNI) || (con != ASN1_PRI) 607 cFYI(1, ("cls = %d con = %d tag = %d end = %p (%d)",
631 || (tag != ASN1_GENSTR)) { 608 cls, con, tag, end, *end));
632 cFYI(1, 609 }
633 ("Exit10 cls = %d con = %d tag = %d end = %p (%d)", 610
634 cls, con, tag, end, *end)); 611 if (asn1_header_decode(&ctx, &end, &cls, &con, &tag) == 0) {
635 return 0; 612 cFYI(1, ("Error decoding last part negTokenInit exit 7"));
636 } 613 return 0;
637 cFYI(1, ("Need to call asn1_octets_decode() function for %s", 614 } else if ((cls != ASN1_CTX) || (con != ASN1_CON)) {
638 ctx.pointer)); /* is this UTF-8 or ASCII? */ 615 cFYI(1, ("Exit 8 cls = %d con = %d tag = %d end = %p (%d)",
616 cls, con, tag, end, *end));
617 return 0;
618 }
619 if (asn1_header_decode(&ctx, &end, &cls, &con, &tag) == 0) {
620 cFYI(1, ("Error decoding last part negTokenInit exit9"));
621 return 0;
622 } else if ((cls != ASN1_UNI) || (con != ASN1_PRI)
623 || (tag != ASN1_GENSTR)) {
624 cFYI(1, ("Exit10 cls = %d con = %d tag = %d end = %p (%d)",
625 cls, con, tag, end, *end));
626 return 0;
639 } 627 }
628 cFYI(1, ("Need to call asn1_octets_decode() function for %s",
629 ctx.pointer)); /* is this UTF-8 or ASCII? */
640 630
641 if (use_kerberos) 631 if (use_kerberos)
642 *secType = Kerberos; 632 *secType = Kerberos;
diff --git a/fs/cifs/cifs_debug.c b/fs/cifs/cifs_debug.c
index 688a2d42153f..69a12aae91d3 100644
--- a/fs/cifs/cifs_debug.c
+++ b/fs/cifs/cifs_debug.c
@@ -79,27 +79,25 @@ void cifs_dump_mids(struct TCP_Server_Info *server)
79 spin_lock(&GlobalMid_Lock); 79 spin_lock(&GlobalMid_Lock);
80 list_for_each(tmp, &server->pending_mid_q) { 80 list_for_each(tmp, &server->pending_mid_q) {
81 mid_entry = list_entry(tmp, struct mid_q_entry, qhead); 81 mid_entry = list_entry(tmp, struct mid_q_entry, qhead);
82 if (mid_entry) { 82 cERROR(1, ("State: %d Cmd: %d Pid: %d Tsk: %p Mid %d",
83 cERROR(1, ("State: %d Cmd: %d Pid: %d Tsk: %p Mid %d", 83 mid_entry->midState,
84 mid_entry->midState, 84 (int)mid_entry->command,
85 (int)mid_entry->command, 85 mid_entry->pid,
86 mid_entry->pid, 86 mid_entry->tsk,
87 mid_entry->tsk, 87 mid_entry->mid));
88 mid_entry->mid));
89#ifdef CONFIG_CIFS_STATS2 88#ifdef CONFIG_CIFS_STATS2
90 cERROR(1, ("IsLarge: %d buf: %p time rcv: %ld now: %ld", 89 cERROR(1, ("IsLarge: %d buf: %p time rcv: %ld now: %ld",
91 mid_entry->largeBuf, 90 mid_entry->largeBuf,
92 mid_entry->resp_buf, 91 mid_entry->resp_buf,
93 mid_entry->when_received, 92 mid_entry->when_received,
94 jiffies)); 93 jiffies));
95#endif /* STATS2 */ 94#endif /* STATS2 */
96 cERROR(1, ("IsMult: %d IsEnd: %d", mid_entry->multiRsp, 95 cERROR(1, ("IsMult: %d IsEnd: %d", mid_entry->multiRsp,
97 mid_entry->multiEnd)); 96 mid_entry->multiEnd));
98 if (mid_entry->resp_buf) { 97 if (mid_entry->resp_buf) {
99 cifs_dump_detail(mid_entry->resp_buf); 98 cifs_dump_detail(mid_entry->resp_buf);
100 cifs_dump_mem("existing buf: ", 99 cifs_dump_mem("existing buf: ",
101 mid_entry->resp_buf, 62); 100 mid_entry->resp_buf, 62);
102 }
103 } 101 }
104 } 102 }
105 spin_unlock(&GlobalMid_Lock); 103 spin_unlock(&GlobalMid_Lock);
@@ -163,16 +161,13 @@ static int cifs_debug_data_proc_show(struct seq_file *m, void *v)
163 mid_entry = list_entry(tmp1, struct 161 mid_entry = list_entry(tmp1, struct
164 mid_q_entry, 162 mid_q_entry,
165 qhead); 163 qhead);
166 if (mid_entry) { 164 seq_printf(m, "State: %d com: %d pid:"
167 seq_printf(m, 165 " %d tsk: %p mid %d\n",
168 "State: %d com: %d pid:" 166 mid_entry->midState,
169 " %d tsk: %p mid %d\n", 167 (int)mid_entry->command,
170 mid_entry->midState, 168 mid_entry->pid,
171 (int)mid_entry->command, 169 mid_entry->tsk,
172 mid_entry->pid, 170 mid_entry->mid);
173 mid_entry->tsk,
174 mid_entry->mid);
175 }
176 } 171 }
177 spin_unlock(&GlobalMid_Lock); 172 spin_unlock(&GlobalMid_Lock);
178 } 173 }
diff --git a/fs/cifs/cifs_spnego.c b/fs/cifs/cifs_spnego.c
index 7013aaff6aed..2434ab0e8791 100644
--- a/fs/cifs/cifs_spnego.c
+++ b/fs/cifs/cifs_spnego.c
@@ -66,8 +66,8 @@ struct key_type cifs_spnego_key_type = {
66 .describe = user_describe, 66 .describe = user_describe,
67}; 67};
68 68
69#define MAX_VER_STR_LEN 9 /* length of longest version string e.g. 69#define MAX_VER_STR_LEN 8 /* length of longest version string e.g.
70 strlen(";ver=0xFF") */ 70 strlen("ver=0xFF") */
71#define MAX_MECH_STR_LEN 13 /* length of longest security mechanism name, eg 71#define MAX_MECH_STR_LEN 13 /* length of longest security mechanism name, eg
72 in future could have strlen(";sec=ntlmsspi") */ 72 in future could have strlen(";sec=ntlmsspi") */
73#define MAX_IPV6_ADDR_LEN 42 /* eg FEDC:BA98:7654:3210:FEDC:BA98:7654:3210/60 */ 73#define MAX_IPV6_ADDR_LEN 42 /* eg FEDC:BA98:7654:3210:FEDC:BA98:7654:3210/60 */
@@ -81,11 +81,15 @@ cifs_get_spnego_key(struct cifsSesInfo *sesInfo)
81 struct key *spnego_key; 81 struct key *spnego_key;
82 const char *hostname = server->hostname; 82 const char *hostname = server->hostname;
83 83
84 /* BB: come up with better scheme for determining length */ 84 /* length of fields (with semicolons): ver=0xyz ip4=ipaddress
85 /* length of fields (with semicolons): ver=0xyz ipv4= ipaddress host= 85 host=hostname sec=mechanism uid=0xFF user=username */
86 hostname sec=mechanism uid=0x uid */ 86 desc_len = MAX_VER_STR_LEN +
87 desc_len = MAX_VER_STR_LEN + 5 + MAX_IPV6_ADDR_LEN + 1 + 6 + 87 6 /* len of "host=" */ + strlen(hostname) +
88 strlen(hostname) + MAX_MECH_STR_LEN + 8 + (sizeof(uid_t) * 2); 88 5 /* len of ";ipv4=" */ + MAX_IPV6_ADDR_LEN +
89 MAX_MECH_STR_LEN +
90 7 /* len of ";uid=0x" */ + (sizeof(uid_t) * 2) +
91 6 /* len of ";user=" */ + strlen(sesInfo->userName) + 1;
92
89 spnego_key = ERR_PTR(-ENOMEM); 93 spnego_key = ERR_PTR(-ENOMEM);
90 description = kzalloc(desc_len, GFP_KERNEL); 94 description = kzalloc(desc_len, GFP_KERNEL);
91 if (description == NULL) 95 if (description == NULL)
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
index 1ec7076f7b24..e8da4ee761b5 100644
--- a/fs/cifs/cifsfs.c
+++ b/fs/cifs/cifsfs.c
@@ -930,36 +930,34 @@ static int cifs_oplock_thread(void *dummyarg)
930 schedule_timeout(39*HZ); 930 schedule_timeout(39*HZ);
931 } else { 931 } else {
932 oplock_item = list_entry(GlobalOplock_Q.next, 932 oplock_item = list_entry(GlobalOplock_Q.next,
933 struct oplock_q_entry, qhead); 933 struct oplock_q_entry, qhead);
934 if (oplock_item) { 934 cFYI(1, ("found oplock item to write out"));
935 cFYI(1, ("found oplock item to write out")); 935 pTcon = oplock_item->tcon;
936 pTcon = oplock_item->tcon; 936 inode = oplock_item->pinode;
937 inode = oplock_item->pinode; 937 netfid = oplock_item->netfid;
938 netfid = oplock_item->netfid; 938 spin_unlock(&GlobalMid_Lock);
939 spin_unlock(&GlobalMid_Lock); 939 DeleteOplockQEntry(oplock_item);
940 DeleteOplockQEntry(oplock_item); 940 /* can not grab inode sem here since it would
941 /* can not grab inode sem here since it would
942 deadlock when oplock received on delete 941 deadlock when oplock received on delete
943 since vfs_unlink holds the i_mutex across 942 since vfs_unlink holds the i_mutex across
944 the call */ 943 the call */
945 /* mutex_lock(&inode->i_mutex);*/ 944 /* mutex_lock(&inode->i_mutex);*/
946 if (S_ISREG(inode->i_mode)) { 945 if (S_ISREG(inode->i_mode)) {
947 rc = 946 rc = filemap_fdatawrite(inode->i_mapping);
948 filemap_fdatawrite(inode->i_mapping); 947 if (CIFS_I(inode)->clientCanCacheRead == 0) {
949 if (CIFS_I(inode)->clientCanCacheRead 948 waitrc = filemap_fdatawait(
950 == 0) { 949 inode->i_mapping);
951 waitrc = filemap_fdatawait(inode->i_mapping); 950 invalidate_remote_inode(inode);
952 invalidate_remote_inode(inode); 951 }
953 } 952 if (rc == 0)
954 if (rc == 0) 953 rc = waitrc;
955 rc = waitrc; 954 } else
956 } else 955 rc = 0;
957 rc = 0; 956 /* mutex_unlock(&inode->i_mutex);*/
958 /* mutex_unlock(&inode->i_mutex);*/ 957 if (rc)
959 if (rc) 958 CIFS_I(inode)->write_behind_rc = rc;
960 CIFS_I(inode)->write_behind_rc = rc; 959 cFYI(1, ("Oplock flush inode %p rc %d",
961 cFYI(1, ("Oplock flush inode %p rc %d", 960 inode, rc));
962 inode, rc));
963 961
964 /* releasing stale oplock after recent reconnect 962 /* releasing stale oplock after recent reconnect
965 of smb session using a now incorrect file 963 of smb session using a now incorrect file
@@ -967,15 +965,13 @@ static int cifs_oplock_thread(void *dummyarg)
967 not bother sending an oplock release if session 965 not bother sending an oplock release if session
968 to server still is disconnected since oplock 966 to server still is disconnected since oplock
969 already released by the server in that case */ 967 already released by the server in that case */
970 if (pTcon->tidStatus != CifsNeedReconnect) { 968 if (pTcon->tidStatus != CifsNeedReconnect) {
971 rc = CIFSSMBLock(0, pTcon, netfid, 969 rc = CIFSSMBLock(0, pTcon, netfid,
972 0 /* len */ , 0 /* offset */, 0, 970 0 /* len */ , 0 /* offset */, 0,
973 0, LOCKING_ANDX_OPLOCK_RELEASE, 971 0, LOCKING_ANDX_OPLOCK_RELEASE,
974 false /* wait flag */); 972 false /* wait flag */);
975 cFYI(1, ("Oplock release rc = %d", rc)); 973 cFYI(1, ("Oplock release rc = %d", rc));
976 } 974 }
977 } else
978 spin_unlock(&GlobalMid_Lock);
979 set_current_state(TASK_INTERRUPTIBLE); 975 set_current_state(TASK_INTERRUPTIBLE);
980 schedule_timeout(1); /* yield in case q were corrupt */ 976 schedule_timeout(1); /* yield in case q were corrupt */
981 } 977 }
@@ -1001,8 +997,7 @@ static int cifs_dnotify_thread(void *dummyarg)
1001 list_for_each(tmp, &GlobalSMBSessionList) { 997 list_for_each(tmp, &GlobalSMBSessionList) {
1002 ses = list_entry(tmp, struct cifsSesInfo, 998 ses = list_entry(tmp, struct cifsSesInfo,
1003 cifsSessionList); 999 cifsSessionList);
1004 if (ses && ses->server && 1000 if (ses->server && atomic_read(&ses->server->inFlight))
1005 atomic_read(&ses->server->inFlight))
1006 wake_up_all(&ses->server->response_q); 1001 wake_up_all(&ses->server->response_q);
1007 } 1002 }
1008 read_unlock(&GlobalSMBSeslock); 1003 read_unlock(&GlobalSMBSeslock);
diff --git a/fs/cifs/cifsfs.h b/fs/cifs/cifsfs.h
index 25a6cbd15529..135c965c4137 100644
--- a/fs/cifs/cifsfs.h
+++ b/fs/cifs/cifsfs.h
@@ -101,5 +101,5 @@ extern long cifs_ioctl(struct file *filep, unsigned int cmd, unsigned long arg);
101extern const struct export_operations cifs_export_ops; 101extern const struct export_operations cifs_export_ops;
102#endif /* EXPERIMENTAL */ 102#endif /* EXPERIMENTAL */
103 103
104#define CIFS_VERSION "1.53" 104#define CIFS_VERSION "1.54"
105#endif /* _CIFSFS_H */ 105#endif /* _CIFSFS_H */
diff --git a/fs/cifs/cifspdu.h b/fs/cifs/cifspdu.h
index 409abce12732..d2a073edd1b8 100644
--- a/fs/cifs/cifspdu.h
+++ b/fs/cifs/cifspdu.h
@@ -262,7 +262,7 @@
262 */ 262 */
263#define CIFS_NO_HANDLE 0xFFFF 263#define CIFS_NO_HANDLE 0xFFFF
264 264
265#define NO_CHANGE_64 cpu_to_le64(0xFFFFFFFFFFFFFFFFULL) 265#define NO_CHANGE_64 0xFFFFFFFFFFFFFFFFULL
266#define NO_CHANGE_32 0xFFFFFFFFUL 266#define NO_CHANGE_32 0xFFFFFFFFUL
267 267
268/* IPC$ in ASCII */ 268/* IPC$ in ASCII */
diff --git a/fs/cifs/cifsproto.h b/fs/cifs/cifsproto.h
index b9f5e935f821..a729d083e6f4 100644
--- a/fs/cifs/cifsproto.h
+++ b/fs/cifs/cifsproto.h
@@ -172,12 +172,13 @@ extern int CIFSSMBQFSUnixInfo(const int xid, struct cifsTconInfo *tcon);
172extern int CIFSSMBQFSPosixInfo(const int xid, struct cifsTconInfo *tcon, 172extern int CIFSSMBQFSPosixInfo(const int xid, struct cifsTconInfo *tcon,
173 struct kstatfs *FSData); 173 struct kstatfs *FSData);
174 174
175extern int CIFSSMBSetTimes(const int xid, struct cifsTconInfo *tcon, 175extern int CIFSSMBSetPathInfo(const int xid, struct cifsTconInfo *tcon,
176 const char *fileName, const FILE_BASIC_INFO *data, 176 const char *fileName, const FILE_BASIC_INFO *data,
177 const struct nls_table *nls_codepage, 177 const struct nls_table *nls_codepage,
178 int remap_special_chars); 178 int remap_special_chars);
179extern int CIFSSMBSetFileTimes(const int xid, struct cifsTconInfo *tcon, 179extern int CIFSSMBSetFileInfo(const int xid, struct cifsTconInfo *tcon,
180 const FILE_BASIC_INFO *data, __u16 fid); 180 const FILE_BASIC_INFO *data, __u16 fid,
181 __u32 pid_of_opener);
181#if 0 182#if 0
182extern int CIFSSMBSetAttrLegacy(int xid, struct cifsTconInfo *tcon, 183extern int CIFSSMBSetAttrLegacy(int xid, struct cifsTconInfo *tcon,
183 char *fileName, __u16 dos_attributes, 184 char *fileName, __u16 dos_attributes,
@@ -191,9 +192,20 @@ extern int CIFSSMBSetEOF(const int xid, struct cifsTconInfo *tcon,
191extern int CIFSSMBSetFileSize(const int xid, struct cifsTconInfo *tcon, 192extern int CIFSSMBSetFileSize(const int xid, struct cifsTconInfo *tcon,
192 __u64 size, __u16 fileHandle, __u32 opener_pid, 193 __u64 size, __u16 fileHandle, __u32 opener_pid,
193 bool AllocSizeFlag); 194 bool AllocSizeFlag);
194extern int CIFSSMBUnixSetPerms(const int xid, struct cifsTconInfo *pTcon, 195
195 char *full_path, __u64 mode, __u64 uid, 196struct cifs_unix_set_info_args {
196 __u64 gid, dev_t dev, 197 __u64 ctime;
198 __u64 atime;
199 __u64 mtime;
200 __u64 mode;
201 __u64 uid;
202 __u64 gid;
203 dev_t device;
204};
205
206extern int CIFSSMBUnixSetInfo(const int xid, struct cifsTconInfo *pTcon,
207 char *fileName,
208 const struct cifs_unix_set_info_args *args,
197 const struct nls_table *nls_codepage, 209 const struct nls_table *nls_codepage,
198 int remap_special_chars); 210 int remap_special_chars);
199 211
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
index c621ffa2ca90..994de7c90474 100644
--- a/fs/cifs/cifssmb.c
+++ b/fs/cifs/cifssmb.c
@@ -128,8 +128,7 @@ static void mark_open_files_invalid(struct cifsTconInfo *pTcon)
128 write_lock(&GlobalSMBSeslock); 128 write_lock(&GlobalSMBSeslock);
129 list_for_each_safe(tmp, tmp1, &pTcon->openFileList) { 129 list_for_each_safe(tmp, tmp1, &pTcon->openFileList) {
130 open_file = list_entry(tmp, struct cifsFileInfo, tlist); 130 open_file = list_entry(tmp, struct cifsFileInfo, tlist);
131 if (open_file) 131 open_file->invalidHandle = true;
132 open_file->invalidHandle = true;
133 } 132 }
134 write_unlock(&GlobalSMBSeslock); 133 write_unlock(&GlobalSMBSeslock);
135 /* BB Add call to invalidate_inodes(sb) for all superblocks mounted 134 /* BB Add call to invalidate_inodes(sb) for all superblocks mounted
@@ -4816,8 +4815,8 @@ CIFSSMBSetFileSize(const int xid, struct cifsTconInfo *tcon, __u64 size,
4816 time and resort to the original setpathinfo level which takes the ancient 4815 time and resort to the original setpathinfo level which takes the ancient
4817 DOS time format with 2 second granularity */ 4816 DOS time format with 2 second granularity */
4818int 4817int
4819CIFSSMBSetFileTimes(const int xid, struct cifsTconInfo *tcon, 4818CIFSSMBSetFileInfo(const int xid, struct cifsTconInfo *tcon,
4820 const FILE_BASIC_INFO *data, __u16 fid) 4819 const FILE_BASIC_INFO *data, __u16 fid, __u32 pid_of_opener)
4821{ 4820{
4822 struct smb_com_transaction2_sfi_req *pSMB = NULL; 4821 struct smb_com_transaction2_sfi_req *pSMB = NULL;
4823 char *data_offset; 4822 char *data_offset;
@@ -4830,11 +4829,8 @@ CIFSSMBSetFileTimes(const int xid, struct cifsTconInfo *tcon,
4830 if (rc) 4829 if (rc)
4831 return rc; 4830 return rc;
4832 4831
4833 /* At this point there is no need to override the current pid 4832 pSMB->hdr.Pid = cpu_to_le16((__u16)pid_of_opener);
4834 with the pid of the opener, but that could change if we someday 4833 pSMB->hdr.PidHigh = cpu_to_le16((__u16)(pid_of_opener >> 16));
4835 use an existing handle (rather than opening one on the fly) */
4836 /* pSMB->hdr.Pid = cpu_to_le16((__u16)pid_of_opener);
4837 pSMB->hdr.PidHigh = cpu_to_le16((__u16)(pid_of_opener >> 16));*/
4838 4834
4839 params = 6; 4835 params = 6;
4840 pSMB->MaxSetupCount = 0; 4836 pSMB->MaxSetupCount = 0;
@@ -4882,9 +4878,9 @@ CIFSSMBSetFileTimes(const int xid, struct cifsTconInfo *tcon,
4882 4878
4883 4879
4884int 4880int
4885CIFSSMBSetTimes(const int xid, struct cifsTconInfo *tcon, const char *fileName, 4881CIFSSMBSetPathInfo(const int xid, struct cifsTconInfo *tcon,
4886 const FILE_BASIC_INFO *data, 4882 const char *fileName, const FILE_BASIC_INFO *data,
4887 const struct nls_table *nls_codepage, int remap) 4883 const struct nls_table *nls_codepage, int remap)
4888{ 4884{
4889 TRANSACTION2_SPI_REQ *pSMB = NULL; 4885 TRANSACTION2_SPI_REQ *pSMB = NULL;
4890 TRANSACTION2_SPI_RSP *pSMBr = NULL; 4886 TRANSACTION2_SPI_RSP *pSMBr = NULL;
@@ -5013,10 +5009,9 @@ SetAttrLgcyRetry:
5013#endif /* temporarily unneeded SetAttr legacy function */ 5009#endif /* temporarily unneeded SetAttr legacy function */
5014 5010
5015int 5011int
5016CIFSSMBUnixSetPerms(const int xid, struct cifsTconInfo *tcon, 5012CIFSSMBUnixSetInfo(const int xid, struct cifsTconInfo *tcon, char *fileName,
5017 char *fileName, __u64 mode, __u64 uid, __u64 gid, 5013 const struct cifs_unix_set_info_args *args,
5018 dev_t device, const struct nls_table *nls_codepage, 5014 const struct nls_table *nls_codepage, int remap)
5019 int remap)
5020{ 5015{
5021 TRANSACTION2_SPI_REQ *pSMB = NULL; 5016 TRANSACTION2_SPI_REQ *pSMB = NULL;
5022 TRANSACTION2_SPI_RSP *pSMBr = NULL; 5017 TRANSACTION2_SPI_RSP *pSMBr = NULL;
@@ -5025,6 +5020,7 @@ CIFSSMBUnixSetPerms(const int xid, struct cifsTconInfo *tcon,
5025 int bytes_returned = 0; 5020 int bytes_returned = 0;
5026 FILE_UNIX_BASIC_INFO *data_offset; 5021 FILE_UNIX_BASIC_INFO *data_offset;
5027 __u16 params, param_offset, offset, count, byte_count; 5022 __u16 params, param_offset, offset, count, byte_count;
5023 __u64 mode = args->mode;
5028 5024
5029 cFYI(1, ("In SetUID/GID/Mode")); 5025 cFYI(1, ("In SetUID/GID/Mode"));
5030setPermsRetry: 5026setPermsRetry:
@@ -5080,16 +5076,16 @@ setPermsRetry:
5080 set file size and do not want to truncate file size to zero 5076 set file size and do not want to truncate file size to zero
5081 accidently as happened on one Samba server beta by putting 5077 accidently as happened on one Samba server beta by putting
5082 zero instead of -1 here */ 5078 zero instead of -1 here */
5083 data_offset->EndOfFile = NO_CHANGE_64; 5079 data_offset->EndOfFile = cpu_to_le64(NO_CHANGE_64);
5084 data_offset->NumOfBytes = NO_CHANGE_64; 5080 data_offset->NumOfBytes = cpu_to_le64(NO_CHANGE_64);
5085 data_offset->LastStatusChange = NO_CHANGE_64; 5081 data_offset->LastStatusChange = cpu_to_le64(args->ctime);
5086 data_offset->LastAccessTime = NO_CHANGE_64; 5082 data_offset->LastAccessTime = cpu_to_le64(args->atime);
5087 data_offset->LastModificationTime = NO_CHANGE_64; 5083 data_offset->LastModificationTime = cpu_to_le64(args->mtime);
5088 data_offset->Uid = cpu_to_le64(uid); 5084 data_offset->Uid = cpu_to_le64(args->uid);
5089 data_offset->Gid = cpu_to_le64(gid); 5085 data_offset->Gid = cpu_to_le64(args->gid);
5090 /* better to leave device as zero when it is */ 5086 /* better to leave device as zero when it is */
5091 data_offset->DevMajor = cpu_to_le64(MAJOR(device)); 5087 data_offset->DevMajor = cpu_to_le64(MAJOR(args->device));
5092 data_offset->DevMinor = cpu_to_le64(MINOR(device)); 5088 data_offset->DevMinor = cpu_to_le64(MINOR(args->device));
5093 data_offset->Permissions = cpu_to_le64(mode); 5089 data_offset->Permissions = cpu_to_le64(mode);
5094 5090
5095 if (S_ISREG(mode)) 5091 if (S_ISREG(mode))
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index b51d5777cde6..0711db65afe8 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -151,7 +151,7 @@ cifs_reconnect(struct TCP_Server_Info *server)
151 } 151 }
152 list_for_each(tmp, &GlobalTreeConnectionList) { 152 list_for_each(tmp, &GlobalTreeConnectionList) {
153 tcon = list_entry(tmp, struct cifsTconInfo, cifsConnectionList); 153 tcon = list_entry(tmp, struct cifsTconInfo, cifsConnectionList);
154 if ((tcon) && (tcon->ses) && (tcon->ses->server == server)) 154 if ((tcon->ses) && (tcon->ses->server == server))
155 tcon->tidStatus = CifsNeedReconnect; 155 tcon->tidStatus = CifsNeedReconnect;
156 } 156 }
157 read_unlock(&GlobalSMBSeslock); 157 read_unlock(&GlobalSMBSeslock);
@@ -173,14 +173,12 @@ cifs_reconnect(struct TCP_Server_Info *server)
173 mid_entry = list_entry(tmp, struct 173 mid_entry = list_entry(tmp, struct
174 mid_q_entry, 174 mid_q_entry,
175 qhead); 175 qhead);
176 if (mid_entry) { 176 if (mid_entry->midState == MID_REQUEST_SUBMITTED) {
177 if (mid_entry->midState == MID_REQUEST_SUBMITTED) {
178 /* Mark other intransit requests as needing 177 /* Mark other intransit requests as needing
179 retry so we do not immediately mark the 178 retry so we do not immediately mark the
180 session bad again (ie after we reconnect 179 session bad again (ie after we reconnect
181 below) as they timeout too */ 180 below) as they timeout too */
182 mid_entry->midState = MID_RETRY_NEEDED; 181 mid_entry->midState = MID_RETRY_NEEDED;
183 }
184 } 182 }
185 } 183 }
186 spin_unlock(&GlobalMid_Lock); 184 spin_unlock(&GlobalMid_Lock);
@@ -351,11 +349,9 @@ cifs_demultiplex_thread(struct TCP_Server_Info *server)
351 349
352 current->flags |= PF_MEMALLOC; 350 current->flags |= PF_MEMALLOC;
353 cFYI(1, ("Demultiplex PID: %d", task_pid_nr(current))); 351 cFYI(1, ("Demultiplex PID: %d", task_pid_nr(current)));
354 write_lock(&GlobalSMBSeslock); 352
355 atomic_inc(&tcpSesAllocCount); 353 length = atomic_inc_return(&tcpSesAllocCount);
356 length = tcpSesAllocCount.counter; 354 if (length > 1)
357 write_unlock(&GlobalSMBSeslock);
358 if (length > 1)
359 mempool_resize(cifs_req_poolp, length + cifs_min_rcv, 355 mempool_resize(cifs_req_poolp, length + cifs_min_rcv,
360 GFP_KERNEL); 356 GFP_KERNEL);
361 357
@@ -745,14 +741,11 @@ multi_t2_fnd:
745 coming home not much else we can do but free the memory */ 741 coming home not much else we can do but free the memory */
746 } 742 }
747 743
748 write_lock(&GlobalSMBSeslock);
749 atomic_dec(&tcpSesAllocCount);
750 length = tcpSesAllocCount.counter;
751
752 /* last chance to mark ses pointers invalid 744 /* last chance to mark ses pointers invalid
753 if there are any pointing to this (e.g 745 if there are any pointing to this (e.g
754 if a crazy root user tried to kill cifsd 746 if a crazy root user tried to kill cifsd
755 kernel thread explicitly this might happen) */ 747 kernel thread explicitly this might happen) */
748 write_lock(&GlobalSMBSeslock);
756 list_for_each(tmp, &GlobalSMBSessionList) { 749 list_for_each(tmp, &GlobalSMBSessionList) {
757 ses = list_entry(tmp, struct cifsSesInfo, 750 ses = list_entry(tmp, struct cifsSesInfo,
758 cifsSessionList); 751 cifsSessionList);
@@ -763,6 +756,8 @@ multi_t2_fnd:
763 756
764 kfree(server->hostname); 757 kfree(server->hostname);
765 kfree(server); 758 kfree(server);
759
760 length = atomic_dec_return(&tcpSesAllocCount);
766 if (length > 0) 761 if (length > 0)
767 mempool_resize(cifs_req_poolp, length + cifs_min_rcv, 762 mempool_resize(cifs_req_poolp, length + cifs_min_rcv,
768 GFP_KERNEL); 763 GFP_KERNEL);
@@ -3623,97 +3618,91 @@ int cifs_setup_session(unsigned int xid, struct cifsSesInfo *pSesInfo,
3623 } 3618 }
3624 first_time = 1; 3619 first_time = 1;
3625 } 3620 }
3626 if (!rc) { 3621
3627 pSesInfo->flags = 0; 3622 if (rc)
3628 pSesInfo->capabilities = pSesInfo->server->capabilities; 3623 goto ss_err_exit;
3629 if (linuxExtEnabled == 0) 3624
3630 pSesInfo->capabilities &= (~CAP_UNIX); 3625 pSesInfo->flags = 0;
3626 pSesInfo->capabilities = pSesInfo->server->capabilities;
3627 if (linuxExtEnabled == 0)
3628 pSesInfo->capabilities &= (~CAP_UNIX);
3631 /* pSesInfo->sequence_number = 0;*/ 3629 /* pSesInfo->sequence_number = 0;*/
3632 cFYI(1, 3630 cFYI(1, ("Security Mode: 0x%x Capabilities: 0x%x TimeAdjust: %d",
3633 ("Security Mode: 0x%x Capabilities: 0x%x TimeAdjust: %d", 3631 pSesInfo->server->secMode,
3634 pSesInfo->server->secMode, 3632 pSesInfo->server->capabilities,
3635 pSesInfo->server->capabilities, 3633 pSesInfo->server->timeAdj));
3636 pSesInfo->server->timeAdj)); 3634 if (experimEnabled < 2)
3637 if (experimEnabled < 2) 3635 rc = CIFS_SessSetup(xid, pSesInfo, first_time, nls_info);
3638 rc = CIFS_SessSetup(xid, pSesInfo, 3636 else if (extended_security
3639 first_time, nls_info); 3637 && (pSesInfo->capabilities & CAP_EXTENDED_SECURITY)
3640 else if (extended_security 3638 && (pSesInfo->server->secType == NTLMSSP)) {
3641 && (pSesInfo->capabilities 3639 rc = -EOPNOTSUPP;
3642 & CAP_EXTENDED_SECURITY) 3640 } else if (extended_security
3643 && (pSesInfo->server->secType == NTLMSSP)) { 3641 && (pSesInfo->capabilities & CAP_EXTENDED_SECURITY)
3644 rc = -EOPNOTSUPP; 3642 && (pSesInfo->server->secType == RawNTLMSSP)) {
3645 } else if (extended_security 3643 cFYI(1, ("NTLMSSP sesssetup"));
3646 && (pSesInfo->capabilities & CAP_EXTENDED_SECURITY) 3644 rc = CIFSNTLMSSPNegotiateSessSetup(xid, pSesInfo, &ntlmv2_flag,
3647 && (pSesInfo->server->secType == RawNTLMSSP)) { 3645 nls_info);
3648 cFYI(1, ("NTLMSSP sesssetup")); 3646 if (!rc) {
3649 rc = CIFSNTLMSSPNegotiateSessSetup(xid, 3647 if (ntlmv2_flag) {
3650 pSesInfo, 3648 char *v2_response;
3651 &ntlmv2_flag, 3649 cFYI(1, ("more secure NTLM ver2 hash"));
3652 nls_info); 3650 if (CalcNTLMv2_partial_mac_key(pSesInfo,
3653 if (!rc) { 3651 nls_info)) {
3654 if (ntlmv2_flag) { 3652 rc = -ENOMEM;
3655 char *v2_response; 3653 goto ss_err_exit;
3656 cFYI(1, ("more secure NTLM ver2 hash")); 3654 } else
3657 if (CalcNTLMv2_partial_mac_key(pSesInfo, 3655 v2_response = kmalloc(16 + 64 /* blob*/,
3658 nls_info)) { 3656 GFP_KERNEL);
3659 rc = -ENOMEM; 3657 if (v2_response) {
3660 goto ss_err_exit; 3658 CalcNTLMv2_response(pSesInfo,
3661 } else 3659 v2_response);
3662 v2_response = kmalloc(16 + 64 /* blob */, GFP_KERNEL); 3660 /* if (first_time)
3663 if (v2_response) { 3661 cifs_calculate_ntlmv2_mac_key */
3664 CalcNTLMv2_response(pSesInfo, 3662 kfree(v2_response);
3665 v2_response);
3666 /* if (first_time)
3667 cifs_calculate_ntlmv2_mac_key(
3668 pSesInfo->server->mac_signing_key,
3669 response, ntlm_session_key,*/
3670 kfree(v2_response);
3671 /* BB Put dummy sig in SessSetup PDU? */ 3663 /* BB Put dummy sig in SessSetup PDU? */
3672 } else {
3673 rc = -ENOMEM;
3674 goto ss_err_exit;
3675 }
3676
3677 } else { 3664 } else {
3678 SMBNTencrypt(pSesInfo->password, 3665 rc = -ENOMEM;
3679 pSesInfo->server->cryptKey, 3666 goto ss_err_exit;
3680 ntlm_session_key);
3681
3682 if (first_time)
3683 cifs_calculate_mac_key(
3684 &pSesInfo->server->mac_signing_key,
3685 ntlm_session_key,
3686 pSesInfo->password);
3687 } 3667 }
3668
3669 } else {
3670 SMBNTencrypt(pSesInfo->password,
3671 pSesInfo->server->cryptKey,
3672 ntlm_session_key);
3673
3674 if (first_time)
3675 cifs_calculate_mac_key(
3676 &pSesInfo->server->mac_signing_key,
3677 ntlm_session_key,
3678 pSesInfo->password);
3679 }
3688 /* for better security the weaker lanman hash not sent 3680 /* for better security the weaker lanman hash not sent
3689 in AuthSessSetup so we no longer calculate it */ 3681 in AuthSessSetup so we no longer calculate it */
3690 3682
3691 rc = CIFSNTLMSSPAuthSessSetup(xid, 3683 rc = CIFSNTLMSSPAuthSessSetup(xid, pSesInfo,
3692 pSesInfo, 3684 ntlm_session_key,
3693 ntlm_session_key, 3685 ntlmv2_flag,
3694 ntlmv2_flag, 3686 nls_info);
3695 nls_info); 3687 }
3696 } 3688 } else { /* old style NTLM 0.12 session setup */
3697 } else { /* old style NTLM 0.12 session setup */ 3689 SMBNTencrypt(pSesInfo->password, pSesInfo->server->cryptKey,
3698 SMBNTencrypt(pSesInfo->password, 3690 ntlm_session_key);
3699 pSesInfo->server->cryptKey,
3700 ntlm_session_key);
3701 3691
3702 if (first_time) 3692 if (first_time)
3703 cifs_calculate_mac_key( 3693 cifs_calculate_mac_key(
3704 &pSesInfo->server->mac_signing_key, 3694 &pSesInfo->server->mac_signing_key,
3705 ntlm_session_key, pSesInfo->password); 3695 ntlm_session_key, pSesInfo->password);
3706 3696
3707 rc = CIFSSessSetup(xid, pSesInfo, 3697 rc = CIFSSessSetup(xid, pSesInfo, ntlm_session_key, nls_info);
3708 ntlm_session_key, nls_info); 3698 }
3709 } 3699 if (rc) {
3710 if (rc) { 3700 cERROR(1, ("Send error in SessSetup = %d", rc));
3711 cERROR(1, ("Send error in SessSetup = %d", rc)); 3701 } else {
3712 } else { 3702 cFYI(1, ("CIFS Session Established successfully"));
3713 cFYI(1, ("CIFS Session Established successfully"));
3714 pSesInfo->status = CifsGood; 3703 pSesInfo->status = CifsGood;
3715 }
3716 } 3704 }
3705
3717ss_err_exit: 3706ss_err_exit:
3718 return rc; 3707 return rc;
3719} 3708}
diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c
index fb69c1fa85c9..e962e75e6f7b 100644
--- a/fs/cifs/dir.c
+++ b/fs/cifs/dir.c
@@ -226,23 +226,28 @@ cifs_create(struct inode *inode, struct dentry *direntry, int mode,
226 /* If Open reported that we actually created a file 226 /* If Open reported that we actually created a file
227 then we now have to set the mode if possible */ 227 then we now have to set the mode if possible */
228 if ((pTcon->unix_ext) && (oplock & CIFS_CREATE_ACTION)) { 228 if ((pTcon->unix_ext) && (oplock & CIFS_CREATE_ACTION)) {
229 struct cifs_unix_set_info_args args = {
230 .mode = mode,
231 .ctime = NO_CHANGE_64,
232 .atime = NO_CHANGE_64,
233 .mtime = NO_CHANGE_64,
234 .device = 0,
235 };
236
229 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SET_UID) { 237 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SET_UID) {
230 CIFSSMBUnixSetPerms(xid, pTcon, full_path, mode, 238 args.uid = (__u64) current->fsuid;
231 (__u64)current->fsuid, 239 if (inode->i_mode & S_ISGID)
232 (__u64)current->fsgid, 240 args.gid = (__u64) inode->i_gid;
233 0 /* dev */, 241 else
234 cifs_sb->local_nls, 242 args.gid = (__u64) current->fsgid;
235 cifs_sb->mnt_cifs_flags &
236 CIFS_MOUNT_MAP_SPECIAL_CHR);
237 } else { 243 } else {
238 CIFSSMBUnixSetPerms(xid, pTcon, full_path, mode, 244 args.uid = NO_CHANGE_64;
239 (__u64)-1, 245 args.gid = NO_CHANGE_64;
240 (__u64)-1,
241 0 /* dev */,
242 cifs_sb->local_nls,
243 cifs_sb->mnt_cifs_flags &
244 CIFS_MOUNT_MAP_SPECIAL_CHR);
245 } 246 }
247 CIFSSMBUnixSetInfo(xid, pTcon, full_path, &args,
248 cifs_sb->local_nls,
249 cifs_sb->mnt_cifs_flags &
250 CIFS_MOUNT_MAP_SPECIAL_CHR);
246 } else { 251 } else {
247 /* BB implement mode setting via Windows security 252 /* BB implement mode setting via Windows security
248 descriptors e.g. */ 253 descriptors e.g. */
@@ -267,7 +272,12 @@ cifs_create(struct inode *inode, struct dentry *direntry, int mode,
267 (cifs_sb->mnt_cifs_flags & 272 (cifs_sb->mnt_cifs_flags &
268 CIFS_MOUNT_SET_UID)) { 273 CIFS_MOUNT_SET_UID)) {
269 newinode->i_uid = current->fsuid; 274 newinode->i_uid = current->fsuid;
270 newinode->i_gid = current->fsgid; 275 if (inode->i_mode & S_ISGID)
276 newinode->i_gid =
277 inode->i_gid;
278 else
279 newinode->i_gid =
280 current->fsgid;
271 } 281 }
272 } 282 }
273 } 283 }
@@ -357,21 +367,24 @@ int cifs_mknod(struct inode *inode, struct dentry *direntry, int mode,
357 if (full_path == NULL) 367 if (full_path == NULL)
358 rc = -ENOMEM; 368 rc = -ENOMEM;
359 else if (pTcon->unix_ext) { 369 else if (pTcon->unix_ext) {
360 mode &= ~current->fs->umask; 370 struct cifs_unix_set_info_args args = {
371 .mode = mode & ~current->fs->umask,
372 .ctime = NO_CHANGE_64,
373 .atime = NO_CHANGE_64,
374 .mtime = NO_CHANGE_64,
375 .device = device_number,
376 };
361 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SET_UID) { 377 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SET_UID) {
362 rc = CIFSSMBUnixSetPerms(xid, pTcon, full_path, 378 args.uid = (__u64) current->fsuid;
363 mode, (__u64)current->fsuid, 379 args.gid = (__u64) current->fsgid;
364 (__u64)current->fsgid,
365 device_number, cifs_sb->local_nls,
366 cifs_sb->mnt_cifs_flags &
367 CIFS_MOUNT_MAP_SPECIAL_CHR);
368 } else { 380 } else {
369 rc = CIFSSMBUnixSetPerms(xid, pTcon, 381 args.uid = NO_CHANGE_64;
370 full_path, mode, (__u64)-1, (__u64)-1, 382 args.gid = NO_CHANGE_64;
371 device_number, cifs_sb->local_nls,
372 cifs_sb->mnt_cifs_flags &
373 CIFS_MOUNT_MAP_SPECIAL_CHR);
374 } 383 }
384 rc = CIFSSMBUnixSetInfo(xid, pTcon, full_path,
385 &args, cifs_sb->local_nls,
386 cifs_sb->mnt_cifs_flags &
387 CIFS_MOUNT_MAP_SPECIAL_CHR);
375 388
376 if (!rc) { 389 if (!rc) {
377 rc = cifs_get_inode_info_unix(&newinode, full_path, 390 rc = cifs_get_inode_info_unix(&newinode, full_path,
diff --git a/fs/cifs/file.c b/fs/cifs/file.c
index e692c42f24b5..ff14d14903a0 100644
--- a/fs/cifs/file.c
+++ b/fs/cifs/file.c
@@ -310,18 +310,19 @@ int cifs_open(struct inode *inode, struct file *file)
310 /* time to set mode which we can not set earlier due to 310 /* time to set mode which we can not set earlier due to
311 problems creating new read-only files */ 311 problems creating new read-only files */
312 if (pTcon->unix_ext) { 312 if (pTcon->unix_ext) {
313 CIFSSMBUnixSetPerms(xid, pTcon, full_path, 313 struct cifs_unix_set_info_args args = {
314 inode->i_mode, 314 .mode = inode->i_mode,
315 (__u64)-1, (__u64)-1, 0 /* dev */, 315 .uid = NO_CHANGE_64,
316 .gid = NO_CHANGE_64,
317 .ctime = NO_CHANGE_64,
318 .atime = NO_CHANGE_64,
319 .mtime = NO_CHANGE_64,
320 .device = 0,
321 };
322 CIFSSMBUnixSetInfo(xid, pTcon, full_path, &args,
316 cifs_sb->local_nls, 323 cifs_sb->local_nls,
317 cifs_sb->mnt_cifs_flags & 324 cifs_sb->mnt_cifs_flags &
318 CIFS_MOUNT_MAP_SPECIAL_CHR); 325 CIFS_MOUNT_MAP_SPECIAL_CHR);
319 } else {
320 /* BB implement via Windows security descriptors eg
321 CIFSSMBWinSetPerms(xid, pTcon, full_path, mode,
322 -1, -1, local_nls);
323 in the meantime could set r/o dos attribute when
324 perms are eg: mode & 0222 == 0 */
325 } 326 }
326 } 327 }
327 328
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c
index 46e54d39461d..28a22092d450 100644
--- a/fs/cifs/inode.c
+++ b/fs/cifs/inode.c
@@ -737,7 +737,7 @@ psx_del_no_retry:
737 /* ATTRS set to normal clears r/o bit */ 737 /* ATTRS set to normal clears r/o bit */
738 pinfo_buf->Attributes = cpu_to_le32(ATTR_NORMAL); 738 pinfo_buf->Attributes = cpu_to_le32(ATTR_NORMAL);
739 if (!(pTcon->ses->flags & CIFS_SES_NT4)) 739 if (!(pTcon->ses->flags & CIFS_SES_NT4))
740 rc = CIFSSMBSetTimes(xid, pTcon, full_path, 740 rc = CIFSSMBSetPathInfo(xid, pTcon, full_path,
741 pinfo_buf, 741 pinfo_buf,
742 cifs_sb->local_nls, 742 cifs_sb->local_nls,
743 cifs_sb->mnt_cifs_flags & 743 cifs_sb->mnt_cifs_flags &
@@ -767,9 +767,10 @@ psx_del_no_retry:
767 cifs_sb->mnt_cifs_flags & 767 cifs_sb->mnt_cifs_flags &
768 CIFS_MOUNT_MAP_SPECIAL_CHR); 768 CIFS_MOUNT_MAP_SPECIAL_CHR);
769 if (rc == 0) { 769 if (rc == 0) {
770 rc = CIFSSMBSetFileTimes(xid, pTcon, 770 rc = CIFSSMBSetFileInfo(xid, pTcon,
771 pinfo_buf, 771 pinfo_buf,
772 netfid); 772 netfid,
773 current->tgid);
773 CIFSSMBClose(xid, pTcon, netfid); 774 CIFSSMBClose(xid, pTcon, netfid);
774 } 775 }
775 } 776 }
@@ -984,32 +985,41 @@ mkdir_get_info:
984 * failed to get it from the server or was set bogus */ 985 * failed to get it from the server or was set bogus */
985 if ((direntry->d_inode) && (direntry->d_inode->i_nlink < 2)) 986 if ((direntry->d_inode) && (direntry->d_inode->i_nlink < 2))
986 direntry->d_inode->i_nlink = 2; 987 direntry->d_inode->i_nlink = 2;
988
987 mode &= ~current->fs->umask; 989 mode &= ~current->fs->umask;
990 /* must turn on setgid bit if parent dir has it */
991 if (inode->i_mode & S_ISGID)
992 mode |= S_ISGID;
993
988 if (pTcon->unix_ext) { 994 if (pTcon->unix_ext) {
995 struct cifs_unix_set_info_args args = {
996 .mode = mode,
997 .ctime = NO_CHANGE_64,
998 .atime = NO_CHANGE_64,
999 .mtime = NO_CHANGE_64,
1000 .device = 0,
1001 };
989 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SET_UID) { 1002 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SET_UID) {
990 CIFSSMBUnixSetPerms(xid, pTcon, full_path, 1003 args.uid = (__u64)current->fsuid;
991 mode, 1004 if (inode->i_mode & S_ISGID)
992 (__u64)current->fsuid, 1005 args.gid = (__u64)inode->i_gid;
993 (__u64)current->fsgid, 1006 else
994 0 /* dev_t */, 1007 args.gid = (__u64)current->fsgid;
995 cifs_sb->local_nls,
996 cifs_sb->mnt_cifs_flags &
997 CIFS_MOUNT_MAP_SPECIAL_CHR);
998 } else { 1008 } else {
999 CIFSSMBUnixSetPerms(xid, pTcon, full_path, 1009 args.uid = NO_CHANGE_64;
1000 mode, (__u64)-1, 1010 args.gid = NO_CHANGE_64;
1001 (__u64)-1, 0 /* dev_t */,
1002 cifs_sb->local_nls,
1003 cifs_sb->mnt_cifs_flags &
1004 CIFS_MOUNT_MAP_SPECIAL_CHR);
1005 } 1011 }
1012 CIFSSMBUnixSetInfo(xid, pTcon, full_path, &args,
1013 cifs_sb->local_nls,
1014 cifs_sb->mnt_cifs_flags &
1015 CIFS_MOUNT_MAP_SPECIAL_CHR);
1006 } else { 1016 } else {
1007 if (!(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_CIFS_ACL) && 1017 if (!(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_CIFS_ACL) &&
1008 (mode & S_IWUGO) == 0) { 1018 (mode & S_IWUGO) == 0) {
1009 FILE_BASIC_INFO pInfo; 1019 FILE_BASIC_INFO pInfo;
1010 memset(&pInfo, 0, sizeof(pInfo)); 1020 memset(&pInfo, 0, sizeof(pInfo));
1011 pInfo.Attributes = cpu_to_le32(ATTR_READONLY); 1021 pInfo.Attributes = cpu_to_le32(ATTR_READONLY);
1012 CIFSSMBSetTimes(xid, pTcon, full_path, 1022 CIFSSMBSetPathInfo(xid, pTcon, full_path,
1013 &pInfo, cifs_sb->local_nls, 1023 &pInfo, cifs_sb->local_nls,
1014 cifs_sb->mnt_cifs_flags & 1024 cifs_sb->mnt_cifs_flags &
1015 CIFS_MOUNT_MAP_SPECIAL_CHR); 1025 CIFS_MOUNT_MAP_SPECIAL_CHR);
@@ -1024,8 +1034,12 @@ mkdir_get_info:
1024 CIFS_MOUNT_SET_UID) { 1034 CIFS_MOUNT_SET_UID) {
1025 direntry->d_inode->i_uid = 1035 direntry->d_inode->i_uid =
1026 current->fsuid; 1036 current->fsuid;
1027 direntry->d_inode->i_gid = 1037 if (inode->i_mode & S_ISGID)
1028 current->fsgid; 1038 direntry->d_inode->i_gid =
1039 inode->i_gid;
1040 else
1041 direntry->d_inode->i_gid =
1042 current->fsgid;
1029 } 1043 }
1030 } 1044 }
1031 } 1045 }
@@ -1310,10 +1324,11 @@ int cifs_revalidate(struct dentry *direntry)
1310/* if (S_ISDIR(direntry->d_inode->i_mode)) 1324/* if (S_ISDIR(direntry->d_inode->i_mode))
1311 shrink_dcache_parent(direntry); */ 1325 shrink_dcache_parent(direntry); */
1312 if (S_ISREG(direntry->d_inode->i_mode)) { 1326 if (S_ISREG(direntry->d_inode->i_mode)) {
1313 if (direntry->d_inode->i_mapping) 1327 if (direntry->d_inode->i_mapping) {
1314 wbrc = filemap_fdatawait(direntry->d_inode->i_mapping); 1328 wbrc = filemap_fdatawait(direntry->d_inode->i_mapping);
1315 if (wbrc) 1329 if (wbrc)
1316 CIFS_I(direntry->d_inode)->write_behind_rc = wbrc; 1330 CIFS_I(direntry->d_inode)->write_behind_rc = wbrc;
1331 }
1317 /* may eventually have to do this for open files too */ 1332 /* may eventually have to do this for open files too */
1318 if (list_empty(&(cifsInode->openFileList))) { 1333 if (list_empty(&(cifsInode->openFileList))) {
1319 /* changed on server - flush read ahead pages */ 1334 /* changed on server - flush read ahead pages */
@@ -1489,30 +1504,228 @@ cifs_set_file_size(struct inode *inode, struct iattr *attrs,
1489 return rc; 1504 return rc;
1490} 1505}
1491 1506
1492int cifs_setattr(struct dentry *direntry, struct iattr *attrs) 1507static int
1508cifs_set_file_info(struct inode *inode, struct iattr *attrs, int xid,
1509 char *full_path, __u32 dosattr)
1510{
1511 int rc;
1512 int oplock = 0;
1513 __u16 netfid;
1514 __u32 netpid;
1515 bool set_time = false;
1516 struct cifsFileInfo *open_file;
1517 struct cifsInodeInfo *cifsInode = CIFS_I(inode);
1518 struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb);
1519 struct cifsTconInfo *pTcon = cifs_sb->tcon;
1520 FILE_BASIC_INFO info_buf;
1521
1522 if (attrs->ia_valid & ATTR_ATIME) {
1523 set_time = true;
1524 info_buf.LastAccessTime =
1525 cpu_to_le64(cifs_UnixTimeToNT(attrs->ia_atime));
1526 } else
1527 info_buf.LastAccessTime = 0;
1528
1529 if (attrs->ia_valid & ATTR_MTIME) {
1530 set_time = true;
1531 info_buf.LastWriteTime =
1532 cpu_to_le64(cifs_UnixTimeToNT(attrs->ia_mtime));
1533 } else
1534 info_buf.LastWriteTime = 0;
1535
1536 /*
1537 * Samba throws this field away, but windows may actually use it.
1538 * Do not set ctime unless other time stamps are changed explicitly
1539 * (i.e. by utimes()) since we would then have a mix of client and
1540 * server times.
1541 */
1542 if (set_time && (attrs->ia_valid & ATTR_CTIME)) {
1543 cFYI(1, ("CIFS - CTIME changed"));
1544 info_buf.ChangeTime =
1545 cpu_to_le64(cifs_UnixTimeToNT(attrs->ia_ctime));
1546 } else
1547 info_buf.ChangeTime = 0;
1548
1549 info_buf.CreationTime = 0; /* don't change */
1550 info_buf.Attributes = cpu_to_le32(dosattr);
1551
1552 /*
1553 * If the file is already open for write, just use that fileid
1554 */
1555 open_file = find_writable_file(cifsInode);
1556 if (open_file) {
1557 netfid = open_file->netfid;
1558 netpid = open_file->pid;
1559 goto set_via_filehandle;
1560 }
1561
1562 /*
1563 * NT4 apparently returns success on this call, but it doesn't
1564 * really work.
1565 */
1566 if (!(pTcon->ses->flags & CIFS_SES_NT4)) {
1567 rc = CIFSSMBSetPathInfo(xid, pTcon, full_path,
1568 &info_buf, cifs_sb->local_nls,
1569 cifs_sb->mnt_cifs_flags &
1570 CIFS_MOUNT_MAP_SPECIAL_CHR);
1571 if (rc != -EOPNOTSUPP && rc != -EINVAL)
1572 goto out;
1573 }
1574
1575 cFYI(1, ("calling SetFileInfo since SetPathInfo for "
1576 "times not supported by this server"));
1577 rc = CIFSSMBOpen(xid, pTcon, full_path, FILE_OPEN,
1578 SYNCHRONIZE | FILE_WRITE_ATTRIBUTES,
1579 CREATE_NOT_DIR, &netfid, &oplock,
1580 NULL, cifs_sb->local_nls,
1581 cifs_sb->mnt_cifs_flags &
1582 CIFS_MOUNT_MAP_SPECIAL_CHR);
1583
1584 if (rc != 0) {
1585 if (rc == -EIO)
1586 rc = -EINVAL;
1587 goto out;
1588 }
1589
1590 netpid = current->tgid;
1591
1592set_via_filehandle:
1593 rc = CIFSSMBSetFileInfo(xid, pTcon, &info_buf, netfid, netpid);
1594 if (open_file == NULL)
1595 CIFSSMBClose(xid, pTcon, netfid);
1596 else
1597 atomic_dec(&open_file->wrtPending);
1598out:
1599 return rc;
1600}
1601
1602static int
1603cifs_setattr_unix(struct dentry *direntry, struct iattr *attrs)
1493{ 1604{
1605 int rc;
1494 int xid; 1606 int xid;
1495 struct cifs_sb_info *cifs_sb;
1496 struct cifsTconInfo *pTcon;
1497 char *full_path = NULL; 1607 char *full_path = NULL;
1498 int rc = -EACCES;
1499 FILE_BASIC_INFO time_buf;
1500 bool set_time = false;
1501 bool set_dosattr = false;
1502 __u64 mode = 0xFFFFFFFFFFFFFFFFULL;
1503 __u64 uid = 0xFFFFFFFFFFFFFFFFULL;
1504 __u64 gid = 0xFFFFFFFFFFFFFFFFULL;
1505 struct cifsInodeInfo *cifsInode;
1506 struct inode *inode = direntry->d_inode; 1608 struct inode *inode = direntry->d_inode;
1609 struct cifsInodeInfo *cifsInode = CIFS_I(inode);
1610 struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb);
1611 struct cifsTconInfo *pTcon = cifs_sb->tcon;
1612 struct cifs_unix_set_info_args *args = NULL;
1613
1614 cFYI(1, ("setattr_unix on file %s attrs->ia_valid=0x%x",
1615 direntry->d_name.name, attrs->ia_valid));
1616
1617 xid = GetXid();
1618
1619 if ((cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_PERM) == 0) {
1620 /* check if we have permission to change attrs */
1621 rc = inode_change_ok(inode, attrs);
1622 if (rc < 0)
1623 goto out;
1624 else
1625 rc = 0;
1626 }
1627
1628 full_path = build_path_from_dentry(direntry);
1629 if (full_path == NULL) {
1630 rc = -ENOMEM;
1631 goto out;
1632 }
1633
1634 if ((attrs->ia_valid & ATTR_MTIME) || (attrs->ia_valid & ATTR_SIZE)) {
1635 /*
1636 Flush data before changing file size or changing the last
1637 write time of the file on the server. If the
1638 flush returns error, store it to report later and continue.
1639 BB: This should be smarter. Why bother flushing pages that
1640 will be truncated anyway? Also, should we error out here if
1641 the flush returns error?
1642 */
1643 rc = filemap_write_and_wait(inode->i_mapping);
1644 if (rc != 0) {
1645 cifsInode->write_behind_rc = rc;
1646 rc = 0;
1647 }
1648 }
1649
1650 if (attrs->ia_valid & ATTR_SIZE) {
1651 rc = cifs_set_file_size(inode, attrs, xid, full_path);
1652 if (rc != 0)
1653 goto out;
1654 }
1655
1656 /* skip mode change if it's just for clearing setuid/setgid */
1657 if (attrs->ia_valid & (ATTR_KILL_SUID|ATTR_KILL_SGID))
1658 attrs->ia_valid &= ~ATTR_MODE;
1659
1660 args = kmalloc(sizeof(*args), GFP_KERNEL);
1661 if (args == NULL) {
1662 rc = -ENOMEM;
1663 goto out;
1664 }
1665
1666 /* set up the struct */
1667 if (attrs->ia_valid & ATTR_MODE)
1668 args->mode = attrs->ia_mode;
1669 else
1670 args->mode = NO_CHANGE_64;
1671
1672 if (attrs->ia_valid & ATTR_UID)
1673 args->uid = attrs->ia_uid;
1674 else
1675 args->uid = NO_CHANGE_64;
1676
1677 if (attrs->ia_valid & ATTR_GID)
1678 args->gid = attrs->ia_gid;
1679 else
1680 args->gid = NO_CHANGE_64;
1681
1682 if (attrs->ia_valid & ATTR_ATIME)
1683 args->atime = cifs_UnixTimeToNT(attrs->ia_atime);
1684 else
1685 args->atime = NO_CHANGE_64;
1686
1687 if (attrs->ia_valid & ATTR_MTIME)
1688 args->mtime = cifs_UnixTimeToNT(attrs->ia_mtime);
1689 else
1690 args->mtime = NO_CHANGE_64;
1691
1692 if (attrs->ia_valid & ATTR_CTIME)
1693 args->ctime = cifs_UnixTimeToNT(attrs->ia_ctime);
1694 else
1695 args->ctime = NO_CHANGE_64;
1696
1697 args->device = 0;
1698 rc = CIFSSMBUnixSetInfo(xid, pTcon, full_path, args,
1699 cifs_sb->local_nls,
1700 cifs_sb->mnt_cifs_flags &
1701 CIFS_MOUNT_MAP_SPECIAL_CHR);
1702
1703 if (!rc)
1704 rc = inode_setattr(inode, attrs);
1705out:
1706 kfree(args);
1707 kfree(full_path);
1708 FreeXid(xid);
1709 return rc;
1710}
1711
1712static int
1713cifs_setattr_nounix(struct dentry *direntry, struct iattr *attrs)
1714{
1715 int xid;
1716 struct inode *inode = direntry->d_inode;
1717 struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb);
1718 struct cifsInodeInfo *cifsInode = CIFS_I(inode);
1719 char *full_path = NULL;
1720 int rc = -EACCES;
1721 __u32 dosattr = 0;
1722 __u64 mode = NO_CHANGE_64;
1507 1723
1508 xid = GetXid(); 1724 xid = GetXid();
1509 1725
1510 cFYI(1, ("setattr on file %s attrs->iavalid 0x%x", 1726 cFYI(1, ("setattr on file %s attrs->iavalid 0x%x",
1511 direntry->d_name.name, attrs->ia_valid)); 1727 direntry->d_name.name, attrs->ia_valid));
1512 1728
1513 cifs_sb = CIFS_SB(inode->i_sb);
1514 pTcon = cifs_sb->tcon;
1515
1516 if ((cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_PERM) == 0) { 1729 if ((cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_PERM) == 0) {
1517 /* check if we have permission to change attrs */ 1730 /* check if we have permission to change attrs */
1518 rc = inode_change_ok(inode, attrs); 1731 rc = inode_change_ok(inode, attrs);
@@ -1528,7 +1741,6 @@ int cifs_setattr(struct dentry *direntry, struct iattr *attrs)
1528 FreeXid(xid); 1741 FreeXid(xid);
1529 return -ENOMEM; 1742 return -ENOMEM;
1530 } 1743 }
1531 cifsInode = CIFS_I(inode);
1532 1744
1533 if ((attrs->ia_valid & ATTR_MTIME) || (attrs->ia_valid & ATTR_SIZE)) { 1745 if ((attrs->ia_valid & ATTR_MTIME) || (attrs->ia_valid & ATTR_SIZE)) {
1534 /* 1746 /*
@@ -1559,21 +1771,8 @@ int cifs_setattr(struct dentry *direntry, struct iattr *attrs)
1559 * CIFSACL support + proper Windows to Unix idmapping, we may be 1771 * CIFSACL support + proper Windows to Unix idmapping, we may be
1560 * able to support this in the future. 1772 * able to support this in the future.
1561 */ 1773 */
1562 if (!pTcon->unix_ext && 1774 if (!(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SET_UID))
1563 !(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SET_UID)) {
1564 attrs->ia_valid &= ~(ATTR_UID | ATTR_GID); 1775 attrs->ia_valid &= ~(ATTR_UID | ATTR_GID);
1565 } else {
1566 if (attrs->ia_valid & ATTR_UID) {
1567 cFYI(1, ("UID changed to %d", attrs->ia_uid));
1568 uid = attrs->ia_uid;
1569 }
1570 if (attrs->ia_valid & ATTR_GID) {
1571 cFYI(1, ("GID changed to %d", attrs->ia_gid));
1572 gid = attrs->ia_gid;
1573 }
1574 }
1575
1576 time_buf.Attributes = 0;
1577 1776
1578 /* skip mode change if it's just for clearing setuid/setgid */ 1777 /* skip mode change if it's just for clearing setuid/setgid */
1579 if (attrs->ia_valid & (ATTR_KILL_SUID|ATTR_KILL_SGID)) 1778 if (attrs->ia_valid & (ATTR_KILL_SUID|ATTR_KILL_SGID))
@@ -1584,13 +1783,7 @@ int cifs_setattr(struct dentry *direntry, struct iattr *attrs)
1584 mode = attrs->ia_mode; 1783 mode = attrs->ia_mode;
1585 } 1784 }
1586 1785
1587 if ((pTcon->unix_ext) 1786 if (attrs->ia_valid & ATTR_MODE) {
1588 && (attrs->ia_valid & (ATTR_MODE | ATTR_GID | ATTR_UID)))
1589 rc = CIFSSMBUnixSetPerms(xid, pTcon, full_path, mode, uid, gid,
1590 0 /* dev_t */, cifs_sb->local_nls,
1591 cifs_sb->mnt_cifs_flags &
1592 CIFS_MOUNT_MAP_SPECIAL_CHR);
1593 else if (attrs->ia_valid & ATTR_MODE) {
1594 rc = 0; 1787 rc = 0;
1595#ifdef CONFIG_CIFS_EXPERIMENTAL 1788#ifdef CONFIG_CIFS_EXPERIMENTAL
1596 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_CIFS_ACL) 1789 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_CIFS_ACL)
@@ -1599,24 +1792,19 @@ int cifs_setattr(struct dentry *direntry, struct iattr *attrs)
1599#endif 1792#endif
1600 if (((mode & S_IWUGO) == 0) && 1793 if (((mode & S_IWUGO) == 0) &&
1601 (cifsInode->cifsAttrs & ATTR_READONLY) == 0) { 1794 (cifsInode->cifsAttrs & ATTR_READONLY) == 0) {
1602 set_dosattr = true; 1795
1603 time_buf.Attributes = cpu_to_le32(cifsInode->cifsAttrs | 1796 dosattr = cifsInode->cifsAttrs | ATTR_READONLY;
1604 ATTR_READONLY); 1797
1605 /* fix up mode if we're not using dynperm */ 1798 /* fix up mode if we're not using dynperm */
1606 if ((cifs_sb->mnt_cifs_flags & CIFS_MOUNT_DYNPERM) == 0) 1799 if ((cifs_sb->mnt_cifs_flags & CIFS_MOUNT_DYNPERM) == 0)
1607 attrs->ia_mode = inode->i_mode & ~S_IWUGO; 1800 attrs->ia_mode = inode->i_mode & ~S_IWUGO;
1608 } else if ((mode & S_IWUGO) && 1801 } else if ((mode & S_IWUGO) &&
1609 (cifsInode->cifsAttrs & ATTR_READONLY)) { 1802 (cifsInode->cifsAttrs & ATTR_READONLY)) {
1610 /* If file is readonly on server, we would 1803
1611 not be able to write to it - so if any write 1804 dosattr = cifsInode->cifsAttrs & ~ATTR_READONLY;
1612 bit is enabled for user or group or other we 1805 /* Attributes of 0 are ignored */
1613 need to at least try to remove r/o dos attr */ 1806 if (dosattr == 0)
1614 set_dosattr = true; 1807 dosattr |= ATTR_NORMAL;
1615 time_buf.Attributes = cpu_to_le32(cifsInode->cifsAttrs &
1616 (~ATTR_READONLY));
1617 /* Windows ignores set to zero */
1618 if (time_buf.Attributes == 0)
1619 time_buf.Attributes |= cpu_to_le32(ATTR_NORMAL);
1620 1808
1621 /* reset local inode permissions to normal */ 1809 /* reset local inode permissions to normal */
1622 if (!(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_DYNPERM)) { 1810 if (!(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_DYNPERM)) {
@@ -1634,82 +1822,18 @@ int cifs_setattr(struct dentry *direntry, struct iattr *attrs)
1634 } 1822 }
1635 } 1823 }
1636 1824
1637 if (attrs->ia_valid & ATTR_ATIME) { 1825 if (attrs->ia_valid & (ATTR_MTIME|ATTR_ATIME|ATTR_CTIME) ||
1638 set_time = true; 1826 ((attrs->ia_valid & ATTR_MODE) && dosattr)) {
1639 time_buf.LastAccessTime = 1827 rc = cifs_set_file_info(inode, attrs, xid, full_path, dosattr);
1640 cpu_to_le64(cifs_UnixTimeToNT(attrs->ia_atime)); 1828 /* BB: check for rc = -EOPNOTSUPP and switch to legacy mode */
1641 } else
1642 time_buf.LastAccessTime = 0;
1643
1644 if (attrs->ia_valid & ATTR_MTIME) {
1645 set_time = true;
1646 time_buf.LastWriteTime =
1647 cpu_to_le64(cifs_UnixTimeToNT(attrs->ia_mtime));
1648 } else
1649 time_buf.LastWriteTime = 0;
1650 /* Do not set ctime explicitly unless other time
1651 stamps are changed explicitly (i.e. by utime()
1652 since we would then have a mix of client and
1653 server times */
1654 1829
1655 if (set_time && (attrs->ia_valid & ATTR_CTIME)) {
1656 set_time = true;
1657 /* Although Samba throws this field away
1658 it may be useful to Windows - but we do
1659 not want to set ctime unless some other
1660 timestamp is changing */
1661 cFYI(1, ("CIFS - CTIME changed"));
1662 time_buf.ChangeTime =
1663 cpu_to_le64(cifs_UnixTimeToNT(attrs->ia_ctime));
1664 } else
1665 time_buf.ChangeTime = 0;
1666
1667 if (set_time || set_dosattr) {
1668 time_buf.CreationTime = 0; /* do not change */
1669 /* In the future we should experiment - try setting timestamps
1670 via Handle (SetFileInfo) instead of by path */
1671 if (!(pTcon->ses->flags & CIFS_SES_NT4))
1672 rc = CIFSSMBSetTimes(xid, pTcon, full_path, &time_buf,
1673 cifs_sb->local_nls,
1674 cifs_sb->mnt_cifs_flags &
1675 CIFS_MOUNT_MAP_SPECIAL_CHR);
1676 else
1677 rc = -EOPNOTSUPP;
1678
1679 if (rc == -EOPNOTSUPP) {
1680 int oplock = 0;
1681 __u16 netfid;
1682
1683 cFYI(1, ("calling SetFileInfo since SetPathInfo for "
1684 "times not supported by this server"));
1685 /* BB we could scan to see if we already have it open
1686 and pass in pid of opener to function */
1687 rc = CIFSSMBOpen(xid, pTcon, full_path, FILE_OPEN,
1688 SYNCHRONIZE | FILE_WRITE_ATTRIBUTES,
1689 CREATE_NOT_DIR, &netfid, &oplock,
1690 NULL, cifs_sb->local_nls,
1691 cifs_sb->mnt_cifs_flags &
1692 CIFS_MOUNT_MAP_SPECIAL_CHR);
1693 if (rc == 0) {
1694 rc = CIFSSMBSetFileTimes(xid, pTcon, &time_buf,
1695 netfid);
1696 CIFSSMBClose(xid, pTcon, netfid);
1697 } else {
1698 /* BB For even older servers we could convert time_buf
1699 into old DOS style which uses two second
1700 granularity */
1701
1702 /* rc = CIFSSMBSetTimesLegacy(xid, pTcon, full_path,
1703 &time_buf, cifs_sb->local_nls); */
1704 }
1705 }
1706 /* Even if error on time set, no sense failing the call if 1830 /* Even if error on time set, no sense failing the call if
1707 the server would set the time to a reasonable value anyway, 1831 the server would set the time to a reasonable value anyway,
1708 and this check ensures that we are not being called from 1832 and this check ensures that we are not being called from
1709 sys_utimes in which case we ought to fail the call back to 1833 sys_utimes in which case we ought to fail the call back to
1710 the user when the server rejects the call */ 1834 the user when the server rejects the call */
1711 if ((rc) && (attrs->ia_valid & 1835 if ((rc) && (attrs->ia_valid &
1712 (ATTR_MODE | ATTR_GID | ATTR_UID | ATTR_SIZE))) 1836 (ATTR_MODE | ATTR_GID | ATTR_UID | ATTR_SIZE)))
1713 rc = 0; 1837 rc = 0;
1714 } 1838 }
1715 1839
@@ -1723,6 +1847,21 @@ cifs_setattr_exit:
1723 return rc; 1847 return rc;
1724} 1848}
1725 1849
1850int
1851cifs_setattr(struct dentry *direntry, struct iattr *attrs)
1852{
1853 struct inode *inode = direntry->d_inode;
1854 struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb);
1855 struct cifsTconInfo *pTcon = cifs_sb->tcon;
1856
1857 if (pTcon->unix_ext)
1858 return cifs_setattr_unix(direntry, attrs);
1859
1860 return cifs_setattr_nounix(direntry, attrs);
1861
1862 /* BB: add cifs_setattr_legacy for really old servers */
1863}
1864
1726#if 0 1865#if 0
1727void cifs_delete_inode(struct inode *inode) 1866void cifs_delete_inode(struct inode *inode)
1728{ 1867{
diff --git a/fs/cifs/transport.c b/fs/cifs/transport.c
index 000ac509c98a..e286db9f5ee2 100644
--- a/fs/cifs/transport.c
+++ b/fs/cifs/transport.c
@@ -265,6 +265,7 @@ smb_send2(struct socket *ssocket, struct kvec *iov, int n_vec,
265 cFYI(1, ("Sending smb: total_len %d", total_len)); 265 cFYI(1, ("Sending smb: total_len %d", total_len));
266 dump_smb(smb_buffer, len); 266 dump_smb(smb_buffer, len);
267 267
268 i = 0;
268 while (total_len) { 269 while (total_len) {
269 rc = kernel_sendmsg(ssocket, &smb_msg, &iov[first_vec], 270 rc = kernel_sendmsg(ssocket, &smb_msg, &iov[first_vec],
270 n_vec - first_vec, total_len); 271 n_vec - first_vec, total_len);
diff --git a/fs/eventpoll.c b/fs/eventpoll.c
index 0c87474f7917..7cc0eb756b55 100644
--- a/fs/eventpoll.c
+++ b/fs/eventpoll.c
@@ -1041,10 +1041,7 @@ retry:
1041} 1041}
1042 1042
1043/* 1043/*
1044 * It opens an eventpoll file descriptor. The "size" parameter is there 1044 * Open an eventpoll file descriptor.
1045 * for historical reasons, when epoll was using an hash instead of an
1046 * RB tree. With the current implementation, the "size" parameter is ignored
1047 * (besides sanity checks).
1048 */ 1045 */
1049asmlinkage long sys_epoll_create1(int flags) 1046asmlinkage long sys_epoll_create1(int flags)
1050{ 1047{
diff --git a/fs/jbd/transaction.c b/fs/jbd/transaction.c
index 8dee32007500..0540ca27a446 100644
--- a/fs/jbd/transaction.c
+++ b/fs/jbd/transaction.c
@@ -291,7 +291,7 @@ handle_t *journal_start(journal_t *journal, int nblocks)
291 goto out; 291 goto out;
292 } 292 }
293 293
294 lock_acquire(&handle->h_lockdep_map, 0, 0, 0, 2, _THIS_IP_); 294 lock_map_acquire(&handle->h_lockdep_map);
295 295
296out: 296out:
297 return handle; 297 return handle;
@@ -1448,7 +1448,7 @@ int journal_stop(handle_t *handle)
1448 spin_unlock(&journal->j_state_lock); 1448 spin_unlock(&journal->j_state_lock);
1449 } 1449 }
1450 1450
1451 lock_release(&handle->h_lockdep_map, 1, _THIS_IP_); 1451 lock_map_release(&handle->h_lockdep_map);
1452 1452
1453 jbd_free_handle(handle); 1453 jbd_free_handle(handle);
1454 return err; 1454 return err;
diff --git a/fs/jbd2/transaction.c b/fs/jbd2/transaction.c
index 4f7cadbb19fa..e5d540588fa9 100644
--- a/fs/jbd2/transaction.c
+++ b/fs/jbd2/transaction.c
@@ -301,7 +301,7 @@ handle_t *jbd2_journal_start(journal_t *journal, int nblocks)
301 goto out; 301 goto out;
302 } 302 }
303 303
304 lock_acquire(&handle->h_lockdep_map, 0, 0, 0, 2, _THIS_IP_); 304 lock_map_acquire(&handle->h_lockdep_map);
305out: 305out:
306 return handle; 306 return handle;
307} 307}
@@ -1279,7 +1279,7 @@ int jbd2_journal_stop(handle_t *handle)
1279 spin_unlock(&journal->j_state_lock); 1279 spin_unlock(&journal->j_state_lock);
1280 } 1280 }
1281 1281
1282 lock_release(&handle->h_lockdep_map, 1, _THIS_IP_); 1282 lock_map_release(&handle->h_lockdep_map);
1283 1283
1284 jbd2_free_handle(handle); 1284 jbd2_free_handle(handle);
1285 return err; 1285 return err;
diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c
index eef1629806f5..2e51adac65de 100644
--- a/fs/nfsd/nfs4proc.c
+++ b/fs/nfsd/nfs4proc.c
@@ -851,7 +851,7 @@ struct nfsd4_operation {
851 851
852static struct nfsd4_operation nfsd4_ops[]; 852static struct nfsd4_operation nfsd4_ops[];
853 853
854static inline char *nfsd4_op_name(unsigned opnum); 854static const char *nfsd4_op_name(unsigned opnum);
855 855
856/* 856/*
857 * COMPOUND call. 857 * COMPOUND call.
@@ -1116,8 +1116,7 @@ static struct nfsd4_operation nfsd4_ops[OP_RELEASE_LOCKOWNER+1] = {
1116 }, 1116 },
1117}; 1117};
1118 1118
1119static inline char * 1119static const char *nfsd4_op_name(unsigned opnum)
1120nfsd4_op_name(unsigned opnum)
1121{ 1120{
1122 if (opnum < ARRAY_SIZE(nfsd4_ops)) 1121 if (opnum < ARRAY_SIZE(nfsd4_ops))
1123 return nfsd4_ops[opnum].op_name; 1122 return nfsd4_ops[opnum].op_name;
diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c
index 282a13596c70..d318c7e663fa 100644
--- a/fs/reiserfs/super.c
+++ b/fs/reiserfs/super.c
@@ -27,7 +27,6 @@
27#include <linux/mnt_namespace.h> 27#include <linux/mnt_namespace.h>
28#include <linux/mount.h> 28#include <linux/mount.h>
29#include <linux/namei.h> 29#include <linux/namei.h>
30#include <linux/quotaops.h>
31 30
32struct file_system_type reiserfs_fs_type; 31struct file_system_type reiserfs_fs_type;
33 32
diff --git a/fs/seq_file.c b/fs/seq_file.c
index 3f54dbd6c49b..5d54205e486b 100644
--- a/fs/seq_file.c
+++ b/fs/seq_file.c
@@ -443,6 +443,20 @@ int seq_dentry(struct seq_file *m, struct dentry *dentry, char *esc)
443 return -1; 443 return -1;
444} 444}
445 445
446int seq_bitmap(struct seq_file *m, unsigned long *bits, unsigned int nr_bits)
447{
448 size_t len = bitmap_scnprintf_len(nr_bits);
449
450 if (m->count + len < m->size) {
451 bitmap_scnprintf(m->buf + m->count, m->size - m->count,
452 bits, nr_bits);
453 m->count += len;
454 return 0;
455 }
456 m->count = m->size;
457 return -1;
458}
459
446static void *single_start(struct seq_file *p, loff_t *pos) 460static void *single_start(struct seq_file *p, loff_t *pos)
447{ 461{
448 return NULL + (*pos == 0); 462 return NULL + (*pos == 0);
diff --git a/include/asm-arm/arch-aaec2000/aaec2000.h b/include/asm-arm/arch-aaec2000/aaec2000.h
deleted file mode 100644
index a6d1ee0980f2..000000000000
--- a/include/asm-arm/arch-aaec2000/aaec2000.h
+++ /dev/null
@@ -1,207 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-aaec2000/aaec2000.h
3 *
4 * AAEC-2000 registers definition
5 *
6 * Copyright (c) 2005 Nicolas Bellido Y Ortega
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 */
12
13#ifndef __ASM_ARCH_AAEC2000_H
14#define __ASM_ARCH_AAEC2000_H
15
16#ifndef __ASM_ARCH_HARDWARE_H
17#error You must include hardware.h not this file
18#endif /* __ASM_ARCH_HARDWARE_H */
19
20/* Chip selects */
21#define AAEC_CS0 0x00000000
22#define AAEC_CS1 0x10000000
23#define AAEC_CS2 0x20000000
24#define AAEC_CS3 0x30000000
25
26/* Flash */
27#define AAEC_FLASH_BASE AAEC_CS0
28#define AAEC_FLASH_SIZE SZ_64M
29
30/* Interrupt controller */
31#define IRQ_BASE __REG(0x80000500)
32#define IRQ_INTSR __REG(0x80000500) /* Int Status Register */
33#define IRQ_INTRSR __REG(0x80000504) /* Int Raw (unmasked) Status */
34#define IRQ_INTENS __REG(0x80000508) /* Int Enable Set */
35#define IRQ_INTENC __REG(0x8000050c) /* Int Enable Clear */
36
37/* UART 1 */
38#define UART1_BASE __REG(0x80000600)
39#define UART1_DR __REG(0x80000600) /* Data/FIFO Register */
40#define UART1_LCR __REG(0x80000604) /* Link Control Register */
41#define UART1_BRCR __REG(0x80000608) /* Baud Rate Control Register */
42#define UART1_CR __REG(0x8000060c) /* Control Register */
43#define UART1_SR __REG(0x80000610) /* Status Register */
44#define UART1_INT __REG(0x80000614) /* Interrupt Status Register */
45#define UART1_INTM __REG(0x80000618) /* Interrupt Mask Register */
46#define UART1_INTRES __REG(0x8000061c) /* Int Result (masked status) Register */
47
48/* UART 2 */
49#define UART2_BASE __REG(0x80000700)
50#define UART2_DR __REG(0x80000700) /* Data/FIFO Register */
51#define UART2_LCR __REG(0x80000704) /* Link Control Register */
52#define UART2_BRCR __REG(0x80000708) /* Baud Rate Control Register */
53#define UART2_CR __REG(0x8000070c) /* Control Register */
54#define UART2_SR __REG(0x80000710) /* Status Register */
55#define UART2_INT __REG(0x80000714) /* Interrupt Status Register */
56#define UART2_INTM __REG(0x80000718) /* Interrupt Mask Register */
57#define UART2_INTRES __REG(0x8000071c) /* Int Result (masked status) Register */
58
59/* UART 3 */
60#define UART3_BASE __REG(0x80000800)
61#define UART3_DR __REG(0x80000800) /* Data/FIFO Register */
62#define UART3_LCR __REG(0x80000804) /* Link Control Register */
63#define UART3_BRCR __REG(0x80000808) /* Baud Rate Control Register */
64#define UART3_CR __REG(0x8000080c) /* Control Register */
65#define UART3_SR __REG(0x80000810) /* Status Register */
66#define UART3_INT __REG(0x80000814) /* Interrupt Status Register */
67#define UART3_INTM __REG(0x80000818) /* Interrupt Mask Register */
68#define UART3_INTRES __REG(0x8000081c) /* Int Result (masked status) Register */
69
70/* These are used in some places */
71#define _UART1_BASE __PREG(UART1_BASE)
72#define _UART2_BASE __PREG(UART2_BASE)
73#define _UART3_BASE __PREG(UART3_BASE)
74
75/* UART Registers Offsets */
76#define UART_DR 0x00
77#define UART_LCR 0x04
78#define UART_BRCR 0x08
79#define UART_CR 0x0c
80#define UART_SR 0x10
81#define UART_INT 0x14
82#define UART_INTM 0x18
83#define UART_INTRES 0x1c
84
85/* UART_LCR Bitmask */
86#define UART_LCR_BRK (1 << 0) /* Send Break */
87#define UART_LCR_PEN (1 << 1) /* Parity Enable */
88#define UART_LCR_EP (1 << 2) /* Even/Odd Parity */
89#define UART_LCR_S2 (1 << 3) /* One/Two Stop bits */
90#define UART_LCR_FIFO (1 << 4) /* FIFO Enable */
91#define UART_LCR_WL5 (0 << 5) /* Word Length - 5 bits */
92#define UART_LCR_WL6 (1 << 5) /* Word Length - 6 bits */
93#define UART_LCR_WL7 (1 << 6) /* Word Length - 7 bits */
94#define UART_LCR_WL8 (1 << 7) /* Word Length - 8 bits */
95
96/* UART_CR Bitmask */
97#define UART_CR_EN (1 << 0) /* UART Enable */
98#define UART_CR_SIR (1 << 1) /* IrDA SIR Enable */
99#define UART_CR_SIRLP (1 << 2) /* Low Power IrDA Enable */
100#define UART_CR_RXP (1 << 3) /* Receive Pin Polarity */
101#define UART_CR_TXP (1 << 4) /* Transmit Pin Polarity */
102#define UART_CR_MXP (1 << 5) /* Modem Pin Polarity */
103#define UART_CR_LOOP (1 << 6) /* Loopback Mode */
104
105/* UART_SR Bitmask */
106#define UART_SR_CTS (1 << 0) /* Clear To Send Status */
107#define UART_SR_DSR (1 << 1) /* Data Set Ready Status */
108#define UART_SR_DCD (1 << 2) /* Data Carrier Detect Status */
109#define UART_SR_TxBSY (1 << 3) /* Transmitter Busy Status */
110#define UART_SR_RxFE (1 << 4) /* Receive FIFO Empty Status */
111#define UART_SR_TxFF (1 << 5) /* Transmit FIFO Full Status */
112#define UART_SR_RxFF (1 << 6) /* Receive FIFO Full Status */
113#define UART_SR_TxFE (1 << 7) /* Transmit FIFO Empty Status */
114
115/* UART_INT Bitmask */
116#define UART_INT_RIS (1 << 0) /* Rx Interrupt */
117#define UART_INT_TIS (1 << 1) /* Tx Interrupt */
118#define UART_INT_MIS (1 << 2) /* Modem Interrupt */
119#define UART_INT_RTIS (1 << 3) /* Receive Timeout Interrupt */
120
121/* Timer 1 */
122#define TIMER1_BASE __REG(0x80000c00)
123#define TIMER1_LOAD __REG(0x80000c00) /* Timer 1 Load Register */
124#define TIMER1_VAL __REG(0x80000c04) /* Timer 1 Value Register */
125#define TIMER1_CTRL __REG(0x80000c08) /* Timer 1 Control Register */
126#define TIMER1_CLEAR __REG(0x80000c0c) /* Timer 1 Clear Register */
127
128/* Timer 2 */
129#define TIMER2_BASE __REG(0x80000d00)
130#define TIMER2_LOAD __REG(0x80000d00) /* Timer 2 Load Register */
131#define TIMER2_VAL __REG(0x80000d04) /* Timer 2 Value Register */
132#define TIMER2_CTRL __REG(0x80000d08) /* Timer 2 Control Register */
133#define TIMER2_CLEAR __REG(0x80000d0c) /* Timer 2 Clear Register */
134
135/* Timer 3 */
136#define TIMER3_BASE __REG(0x80000e00)
137#define TIMER3_LOAD __REG(0x80000e00) /* Timer 3 Load Register */
138#define TIMER3_VAL __REG(0x80000e04) /* Timer 3 Value Register */
139#define TIMER3_CTRL __REG(0x80000e08) /* Timer 3 Control Register */
140#define TIMER3_CLEAR __REG(0x80000e0c) /* Timer 3 Clear Register */
141
142/* Timer Control register bits */
143#define TIMER_CTRL_ENABLE (1 << 7) /* Enable (Start Timer) */
144#define TIMER_CTRL_PERIODIC (1 << 6) /* Periodic Running Mode */
145#define TIMER_CTRL_FREE_RUNNING (0 << 6) /* Normal Running Mode */
146#define TIMER_CTRL_CLKSEL_508K (1 << 3) /* 508KHz Clock select (Timer 1, 2) */
147#define TIMER_CTRL_CLKSEL_2K (0 << 3) /* 2KHz Clock Select (Timer 1, 2) */
148
149/* Power and State Control */
150#define POWER_BASE __REG(0x80000400)
151#define POWER_PWRSR __REG(0x80000400) /* Power Status Register */
152#define POWER_PWRCNT __REG(0x80000404) /* Power/Clock control */
153#define POWER_HALT __REG(0x80000408) /* Power Idle Mode */
154#define POWER_STDBY __REG(0x8000040c) /* Power Standby Mode */
155#define POWER_BLEOI __REG(0x80000410) /* Battery Low End of Interrupt */
156#define POWER_MCEOI __REG(0x80000414) /* Media Changed EoI */
157#define POWER_TEOI __REG(0x80000418) /* Tick EoI */
158#define POWER_STFCLR __REG(0x8000041c) /* NbFlg, RSTFlg, PFFlg, CLDFlg Clear */
159#define POWER_CLKSET __REG(0x80000420) /* Clock Speed Control */
160
161/* GPIO Registers */
162#define AAEC_GPIO_PHYS 0x80000e00
163
164#define AAEC_GPIO_PADR __REG(AAEC_GPIO_PHYS + 0x00)
165#define AAEC_GPIO_PBDR __REG(AAEC_GPIO_PHYS + 0x04)
166#define AAEC_GPIO_PCDR __REG(AAEC_GPIO_PHYS + 0x08)
167#define AAEC_GPIO_PDDR __REG(AAEC_GPIO_PHYS + 0x0c)
168#define AAEC_GPIO_PADDR __REG(AAEC_GPIO_PHYS + 0x10)
169#define AAEC_GPIO_PBDDR __REG(AAEC_GPIO_PHYS + 0x14)
170#define AAEC_GPIO_PCDDR __REG(AAEC_GPIO_PHYS + 0x18)
171#define AAEC_GPIO_PDDDR __REG(AAEC_GPIO_PHYS + 0x1c)
172#define AAEC_GPIO_PEDR __REG(AAEC_GPIO_PHYS + 0x20)
173#define AAEC_GPIO_PEDDR __REG(AAEC_GPIO_PHYS + 0x24)
174#define AAEC_GPIO_KSCAN __REG(AAEC_GPIO_PHYS + 0x28)
175#define AAEC_GPIO_PINMUX __REG(AAEC_GPIO_PHYS + 0x2c)
176#define AAEC_GPIO_PFDR __REG(AAEC_GPIO_PHYS + 0x30)
177#define AAEC_GPIO_PFDDR __REG(AAEC_GPIO_PHYS + 0x34)
178#define AAEC_GPIO_PGDR __REG(AAEC_GPIO_PHYS + 0x38)
179#define AAEC_GPIO_PGDDR __REG(AAEC_GPIO_PHYS + 0x3c)
180#define AAEC_GPIO_PHDR __REG(AAEC_GPIO_PHYS + 0x40)
181#define AAEC_GPIO_PHDDR __REG(AAEC_GPIO_PHYS + 0x44)
182#define AAEC_GPIO_RAZ __REG(AAEC_GPIO_PHYS + 0x48)
183#define AAEC_GPIO_INTTYPE1 __REG(AAEC_GPIO_PHYS + 0x4c)
184#define AAEC_GPIO_INTTYPE2 __REG(AAEC_GPIO_PHYS + 0x50)
185#define AAEC_GPIO_FEOI __REG(AAEC_GPIO_PHYS + 0x54)
186#define AAEC_GPIO_INTEN __REG(AAEC_GPIO_PHYS + 0x58)
187#define AAEC_GPIO_INTSTATUS __REG(AAEC_GPIO_PHYS + 0x5c)
188#define AAEC_GPIO_RAWINTSTATUS __REG(AAEC_GPIO_PHYS + 0x60)
189#define AAEC_GPIO_DB __REG(AAEC_GPIO_PHYS + 0x64)
190#define AAEC_GPIO_PAPINDR __REG(AAEC_GPIO_PHYS + 0x68)
191#define AAEC_GPIO_PBPINDR __REG(AAEC_GPIO_PHYS + 0x6c)
192#define AAEC_GPIO_PCPINDR __REG(AAEC_GPIO_PHYS + 0x70)
193#define AAEC_GPIO_PDPINDR __REG(AAEC_GPIO_PHYS + 0x74)
194#define AAEC_GPIO_PEPINDR __REG(AAEC_GPIO_PHYS + 0x78)
195#define AAEC_GPIO_PFPINDR __REG(AAEC_GPIO_PHYS + 0x7c)
196#define AAEC_GPIO_PGPINDR __REG(AAEC_GPIO_PHYS + 0x80)
197#define AAEC_GPIO_PHPINDR __REG(AAEC_GPIO_PHYS + 0x84)
198
199#define AAEC_GPIO_PINMUX_PE0CON (1 << 0)
200#define AAEC_GPIO_PINMUX_PD0CON (1 << 1)
201#define AAEC_GPIO_PINMUX_CODECON (1 << 2)
202#define AAEC_GPIO_PINMUX_UART3CON (1 << 3)
203
204/* LCD Controller */
205#define AAEC_CLCD_PHYS 0x80003000
206
207#endif /* __ARM_ARCH_AAEC2000_H */
diff --git a/include/asm-arm/arch-aaec2000/aaed2000.h b/include/asm-arm/arch-aaec2000/aaed2000.h
deleted file mode 100644
index bc76d2badb91..000000000000
--- a/include/asm-arm/arch-aaec2000/aaed2000.h
+++ /dev/null
@@ -1,40 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-aaec2000/aaed2000.h
3 *
4 * AAED-2000 specific bits definition
5 *
6 * Copyright (c) 2005 Nicolas Bellido Y Ortega
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 */
12
13#ifndef __ASM_ARCH_AAED2000_H
14#define __ASM_ARCH_AAED2000_H
15
16/* External GPIOs. */
17
18#define EXT_GPIO_PBASE AAEC_CS3
19#define EXT_GPIO_VBASE 0xf8100000
20#define EXT_GPIO_LENGTH 0x00001000
21
22#define __ext_gpio_p2v(x) ((x) - EXT_GPIO_PBASE + EXT_GPIO_VBASE)
23#define __ext_gpio_v2p(x) ((x) + EXT_GPIO_PBASE - EXT_GPIO_VBASE)
24
25#define __EXT_GPIO_REG(x) (*((volatile u32 *)__ext_gpio_p2v(x)))
26#define __EXT_GPIO_PREG(x) (__ext_gpio_v2p((u32)&(x)))
27
28#define AAED_EXT_GPIO __EXT_GPIO_REG(EXT_GPIO_PBASE)
29
30#define AAED_EGPIO_KBD_SCAN 0x00003fff /* Keyboard scan data */
31#define AAED_EGPIO_PWR_INT 0x00008fff /* Smart battery charger interrupt */
32#define AAED_EGPIO_SWITCHED 0x000f0000 /* DIP Switches */
33#define AAED_EGPIO_USB_VBUS 0x00400000 /* USB Vbus sense */
34#define AAED_EGPIO_LCD_PWR_EN 0x02000000 /* LCD and backlight PWR enable */
35#define AAED_EGPIO_nLED0 0x20000000 /* LED 0 */
36#define AAED_EGPIO_nLED1 0x20000000 /* LED 1 */
37#define AAED_EGPIO_nLED2 0x20000000 /* LED 2 */
38
39
40#endif /* __ARM_ARCH_AAED2000_H */
diff --git a/include/asm-arm/arch-aaec2000/debug-macro.S b/include/asm-arm/arch-aaec2000/debug-macro.S
deleted file mode 100644
index 7b1fce021d8a..000000000000
--- a/include/asm-arm/arch-aaec2000/debug-macro.S
+++ /dev/null
@@ -1,37 +0,0 @@
1/* linux/include/asm-arm/arch-aaec2000/debug-macro.S
2 *
3 * Debugging macro include header
4 *
5 * Copyright (c) 2005 Nicolas Bellido Y Ortega
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 */
11
12#include "hardware.h"
13 .macro addruart,rx
14 mrc p15, 0, \rx, c1, c0
15 tst \rx, #1 @ MMU enabled?
16 moveq \rx, #0x80000000 @ physical
17 movne \rx, #io_p2v(0x80000000) @ virtual
18 orr \rx, \rx, #0x00000800
19 .endm
20
21 .macro senduart,rd,rx
22 str \rd, [\rx, #0]
23 .endm
24
25 .macro busyuart,rd,rx
261002: ldr \rd, [\rx, #0x10]
27 tst \rd, #(1 << 7)
28 beq 1002b
29 .endm
30
31 .macro waituart,rd,rx
32#if 0
331001: ldr \rd, [\rx, #0x10]
34 tst \rd, #(1 << 5)
35 beq 1001b
36#endif
37 .endm
diff --git a/include/asm-arm/arch-aaec2000/dma.h b/include/asm-arm/arch-aaec2000/dma.h
deleted file mode 100644
index e100b1e526fe..000000000000
--- a/include/asm-arm/arch-aaec2000/dma.h
+++ /dev/null
@@ -1,9 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-aaec2000/dma.h
3 *
4 * Copyright (c) 2005 Nicolas Bellido Y Ortega
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
diff --git a/include/asm-arm/arch-aaec2000/entry-macro.S b/include/asm-arm/arch-aaec2000/entry-macro.S
deleted file mode 100644
index 83fdf68f6b7c..000000000000
--- a/include/asm-arm/arch-aaec2000/entry-macro.S
+++ /dev/null
@@ -1,40 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-aaec2000/entry-macro.S
3 *
4 * Low-level IRQ helper for aaec-2000 based platforms
5 *
6 * Copyright (c) 2005 Nicolas Bellido Y Ortega
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 *
12 */
13#include <asm/arch/irqs.h>
14
15 .macro disable_fiq
16 .endm
17
18 .macro get_irqnr_preamble, base, tmp
19 .endm
20
21 .macro arch_ret_to_user, tmp1, tmp2
22 .endm
23
24 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
25 mov r4, #0xf8000000
26 add r4, r4, #0x00000500
27 mov \base, r4
28 ldr \irqstat, [\base, #0]
29 cmp \irqstat, #0
30 bne 1001f
31 ldr \irqnr, =NR_IRQS+1
32 b 1003f
331001: mov \irqnr, #0
341002: ands \tmp, \irqstat, #1
35 mov \irqstat, \irqstat, LSR #1
36 add \irqnr, \irqnr, #1
37 beq 1002b
38 sub \irqnr, \irqnr, #1
391003:
40 .endm
diff --git a/include/asm-arm/arch-aaec2000/hardware.h b/include/asm-arm/arch-aaec2000/hardware.h
deleted file mode 100644
index 153506fd06ed..000000000000
--- a/include/asm-arm/arch-aaec2000/hardware.h
+++ /dev/null
@@ -1,50 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-aaec2000/hardware.h
3 *
4 * Copyright (c) 2005 Nicolas Bellido Y Ortega
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10
11#ifndef __ASM_ARCH_HARDWARE_H
12#define __ASM_ARCH_HARDWARE_H
13
14#include <asm/sizes.h>
15#include <asm/arch/aaec2000.h>
16
17/* The kernel is loaded at physical address 0xf8000000.
18 * We map the IO space a bit after
19 */
20#define PIO_APB_BASE 0x80000000
21#define VIO_APB_BASE 0xf8000000
22#define IO_APB_LENGTH 0x2000
23#define PIO_AHB_BASE 0x80002000
24#define VIO_AHB_BASE 0xf8002000
25#define IO_AHB_LENGTH 0x2000
26
27#define VIO_BASE VIO_APB_BASE
28#define PIO_BASE PIO_APB_BASE
29
30#define io_p2v(x) ( (x) - PIO_BASE + VIO_BASE )
31#define io_v2p(x) ( (x) + PIO_BASE - VIO_BASE )
32
33#ifndef __ASSEMBLY__
34
35#include <asm/types.h>
36
37/* FIXME: Is it needed to optimize this a la pxa ?? */
38#define __REG(x) (*((volatile u32 *)io_p2v(x)))
39#define __PREG(x) (io_v2p((u32)&(x)))
40
41#else /* __ASSEMBLY__ */
42
43#define __REG(x) io_p2v(x)
44#define __PREG(x) io_v2p(x)
45
46#endif
47
48#include "aaec2000.h"
49
50#endif /* __ASM_ARCH_HARDWARE_H */
diff --git a/include/asm-arm/arch-aaec2000/io.h b/include/asm-arm/arch-aaec2000/io.h
deleted file mode 100644
index d710204ac747..000000000000
--- a/include/asm-arm/arch-aaec2000/io.h
+++ /dev/null
@@ -1,20 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-aaec2000/io.h
3 *
4 * Copied from asm/arch/sa1100/io.h
5 */
6#ifndef __ASM_ARM_ARCH_IO_H
7#define __ASM_ARM_ARCH_IO_H
8
9#include <asm/hardware.h>
10
11#define IO_SPACE_LIMIT 0xffffffff
12
13/*
14 * We don't actually have real ISA nor PCI buses, but there is so many
15 * drivers out there that might just work if we fake them...
16 */
17#define __io(a) ((void __iomem *)(a))
18#define __mem_pci(a) (a)
19
20#endif
diff --git a/include/asm-arm/arch-aaec2000/irqs.h b/include/asm-arm/arch-aaec2000/irqs.h
deleted file mode 100644
index de252220e806..000000000000
--- a/include/asm-arm/arch-aaec2000/irqs.h
+++ /dev/null
@@ -1,46 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-aaec2000/irqs.h
3 *
4 * Copyright (c) 2005 Nicolas Bellido Y Ortega
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10
11#ifndef __ASM_ARCH_IRQS_H
12#define __ASM_ARCH_IRQS_H
13
14
15#define INT_GPIOF0_FIQ 0 /* External GPIO Port F O Fast Interrupt Input */
16#define INT_BL_FIQ 1 /* Battery Low Fast Interrupt */
17#define INT_WE_FIQ 2 /* Watchdog Expired Fast Interrupt */
18#define INT_MV_FIQ 3 /* Media Changed Interrupt */
19#define INT_SC 4 /* Sound Codec Interrupt */
20#define INT_GPIO1 5 /* GPIO Port F Configurable Int 1 */
21#define INT_GPIO2 6 /* GPIO Port F Configurable Int 2 */
22#define INT_GPIO3 7 /* GPIO Port F Configurable Int 3 */
23#define INT_TMR1_OFL 8 /* Timer 1 Overflow Interrupt */
24#define INT_TMR2_OFL 9 /* Timer 2 Overflow Interrupt */
25#define INT_RTC_CM 10 /* RTC Compare Match Interrupt */
26#define INT_TICK 11 /* 64Hz Tick Interrupt */
27#define INT_UART1 12 /* UART1 Interrupt */
28#define INT_UART2 13 /* UART2 & Modem State Changed Interrupt */
29#define INT_LCD 14 /* LCD Interrupt */
30#define INT_SSI 15 /* SSI End of Transfer Interrupt */
31#define INT_UART3 16 /* UART3 Interrupt */
32#define INT_SCI 17 /* SCI Interrupt */
33#define INT_AAC 18 /* Advanced Audio Codec Interrupt */
34#define INT_MMC 19 /* MMC Interrupt */
35#define INT_USB 20 /* USB Interrupt */
36#define INT_DMA 21 /* DMA Interrupt */
37#define INT_TMR3_UOFL 22 /* Timer 3 Underflow Interrupt */
38#define INT_GPIO4 23 /* GPIO Port F Configurable Int 4 */
39#define INT_GPIO5 24 /* GPIO Port F Configurable Int 4 */
40#define INT_GPIO6 25 /* GPIO Port F Configurable Int 4 */
41#define INT_GPIO7 26 /* GPIO Port F Configurable Int 4 */
42#define INT_BMI 27 /* BMI Interrupt */
43
44#define NR_IRQS (INT_BMI + 1)
45
46#endif /* __ASM_ARCH_IRQS_H */
diff --git a/include/asm-arm/arch-aaec2000/memory.h b/include/asm-arm/arch-aaec2000/memory.h
deleted file mode 100644
index 9eceb4148922..000000000000
--- a/include/asm-arm/arch-aaec2000/memory.h
+++ /dev/null
@@ -1,30 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-aaec2000/memory.h
3 *
4 * Copyright (c) 2005 Nicolas Bellido Y Ortega
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10
11#ifndef __ASM_ARCH_MEMORY_H
12#define __ASM_ARCH_MEMORY_H
13
14
15#define PHYS_OFFSET UL(0xf0000000)
16
17#define __virt_to_bus(x) __virt_to_phys(x)
18#define __bus_to_virt(x) __phys_to_virt(x)
19
20/*
21 * The nodes are the followings:
22 *
23 * node 0: 0xf000.0000 - 0xf3ff.ffff
24 * node 1: 0xf400.0000 - 0xf7ff.ffff
25 * node 2: 0xf800.0000 - 0xfbff.ffff
26 * node 3: 0xfc00.0000 - 0xffff.ffff
27 */
28#define NODE_MEM_SIZE_BITS 26
29
30#endif /* __ASM_ARCH_MEMORY_H */
diff --git a/include/asm-arm/arch-aaec2000/system.h b/include/asm-arm/arch-aaec2000/system.h
deleted file mode 100644
index 08de97b407a8..000000000000
--- a/include/asm-arm/arch-aaec2000/system.h
+++ /dev/null
@@ -1,24 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-aaed2000/system.h
3 *
4 * Copyright (c) 2005 Nicolas Bellido Y Ortega
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10
11#ifndef __ASM_ARCH_SYSTEM_H
12#define __ASM_ARCH_SYSTEM_H
13
14static inline void arch_idle(void)
15{
16 cpu_do_idle();
17}
18
19static inline void arch_reset(char mode)
20{
21 cpu_reset(0);
22}
23
24#endif /* __ASM_ARCH_SYSTEM_H */
diff --git a/include/asm-arm/arch-aaec2000/timex.h b/include/asm-arm/arch-aaec2000/timex.h
deleted file mode 100644
index f5708b38fb7f..000000000000
--- a/include/asm-arm/arch-aaec2000/timex.h
+++ /dev/null
@@ -1,18 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-aaec2000/timex.h
3 *
4 * AAEC-2000 Architecture timex specification
5 *
6 * Copyright (c) 2005 Nicolas Bellido Y Ortega
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 */
12
13#ifndef __ASM_ARCH_TIMEX_H
14#define __ASM_ARCH_TIMEX_H
15
16#define CLOCK_TICK_RATE 508000
17
18#endif /* __ASM_ARCH_TIMEX_H */
diff --git a/include/asm-arm/arch-aaec2000/uncompress.h b/include/asm-arm/arch-aaec2000/uncompress.h
deleted file mode 100644
index 300f4bf3bc74..000000000000
--- a/include/asm-arm/arch-aaec2000/uncompress.h
+++ /dev/null
@@ -1,46 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-aaec2000/uncompress.h
3 *
4 * Copyright (c) 2005 Nicolas Bellido Y Ortega
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10
11#ifndef __ASM_ARCH_UNCOMPRESS_H
12#define __ASM_ARCH_UNCOMPRESS_H
13
14#include "hardware.h"
15
16#define UART(x) (*(volatile unsigned long *)(serial_port + (x)))
17
18static void putc(int c)
19{
20 unsigned long serial_port;
21 do {
22 serial_port = _UART3_BASE;
23 if (UART(UART_CR) & UART_CR_EN) break;
24 serial_port = _UART1_BASE;
25 if (UART(UART_CR) & UART_CR_EN) break;
26 serial_port = _UART2_BASE;
27 if (UART(UART_CR) & UART_CR_EN) break;
28 return;
29 } while (0);
30
31 /* wait for space in the UART's transmitter */
32 while ((UART(UART_SR) & UART_SR_TxFF))
33 barrier();
34
35 /* send the character out. */
36 UART(UART_DR) = c;
37}
38
39static inline void flush(void)
40{
41}
42
43#define arch_decomp_setup()
44#define arch_decomp_wdog()
45
46#endif /* __ASM_ARCH_UNCOMPRESS_H */
diff --git a/include/asm-arm/arch-aaec2000/vmalloc.h b/include/asm-arm/arch-aaec2000/vmalloc.h
deleted file mode 100644
index ecb991e2e4ff..000000000000
--- a/include/asm-arm/arch-aaec2000/vmalloc.h
+++ /dev/null
@@ -1,16 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-aaec2000/vmalloc.h
3 *
4 * Copyright (c) 2005 Nicolas Bellido Y Ortega
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10
11#ifndef __ASM_ARCH_VMALLOC_H
12#define __ASM_ARCH_VMALLOC_H
13
14#define VMALLOC_END (PAGE_OFFSET + 0x10000000)
15
16#endif /* __ASM_ARCH_VMALLOC_H */
diff --git a/include/asm-arm/arch-at91/at91_adc.h b/include/asm-arm/arch-at91/at91_adc.h
deleted file mode 100644
index 6d71ea2637b1..000000000000
--- a/include/asm-arm/arch-at91/at91_adc.h
+++ /dev/null
@@ -1,61 +0,0 @@
1/*
2 * include/asm-arm/arch-at91/at91_adc.h
3 *
4 * Copyright (C) SAN People
5 *
6 * Analog-to-Digital Converter (ADC) registers.
7 * Based on AT91SAM9260 datasheet revision D.
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 */
14
15#ifndef AT91_ADC_H
16#define AT91_ADC_H
17
18#define AT91_ADC_CR 0x00 /* Control Register */
19#define AT91_ADC_SWRST (1 << 0) /* Software Reset */
20#define AT91_ADC_START (1 << 1) /* Start Conversion */
21
22#define AT91_ADC_MR 0x04 /* Mode Register */
23#define AT91_ADC_TRGEN (1 << 0) /* Trigger Enable */
24#define AT91_ADC_TRGSEL (7 << 1) /* Trigger Selection */
25#define AT91_ADC_TRGSEL_TC0 (0 << 1)
26#define AT91_ADC_TRGSEL_TC1 (1 << 1)
27#define AT91_ADC_TRGSEL_TC2 (2 << 1)
28#define AT91_ADC_TRGSEL_EXTERNAL (6 << 1)
29#define AT91_ADC_LOWRES (1 << 4) /* Low Resolution */
30#define AT91_ADC_SLEEP (1 << 5) /* Sleep Mode */
31#define AT91_ADC_PRESCAL (0x3f << 8) /* Prescalar Rate Selection */
32#define AT91_ADC_PRESCAL_(x) ((x) << 8)
33#define AT91_ADC_STARTUP (0x1f << 16) /* Startup Up Time */
34#define AT91_ADC_STARTUP_(x) ((x) << 16)
35#define AT91_ADC_SHTIM (0xf << 24) /* Sample & Hold Time */
36#define AT91_ADC_SHTIM_(x) ((x) << 24)
37
38#define AT91_ADC_CHER 0x10 /* Channel Enable Register */
39#define AT91_ADC_CHDR 0x14 /* Channel Disable Register */
40#define AT91_ADC_CHSR 0x18 /* Channel Status Register */
41#define AT91_ADC_CH(n) (1 << (n)) /* Channel Number */
42
43#define AT91_ADC_SR 0x1C /* Status Register */
44#define AT91_ADC_EOC(n) (1 << (n)) /* End of Conversion on Channel N */
45#define AT91_ADC_OVRE(n) (1 << ((n) + 8))/* Overrun Error on Channel N */
46#define AT91_ADC_DRDY (1 << 16) /* Data Ready */
47#define AT91_ADC_GOVRE (1 << 17) /* General Overrun Error */
48#define AT91_ADC_ENDRX (1 << 18) /* End of RX Buffer */
49#define AT91_ADC_RXFUFF (1 << 19) /* RX Buffer Full */
50
51#define AT91_ADC_LCDR 0x20 /* Last Converted Data Register */
52#define AT91_ADC_LDATA (0x3ff)
53
54#define AT91_ADC_IER 0x24 /* Interrupt Enable Register */
55#define AT91_ADC_IDR 0x28 /* Interrupt Disable Register */
56#define AT91_ADC_IMR 0x2C /* Interrupt Mask Register */
57
58#define AT91_ADC_CHR(n) (0x30 + ((n) * 4)) /* Channel Data Register N */
59#define AT91_ADC_DATA (0x3ff)
60
61#endif
diff --git a/include/asm-arm/arch-at91/at91_aic.h b/include/asm-arm/arch-at91/at91_aic.h
deleted file mode 100644
index df44c12a12d4..000000000000
--- a/include/asm-arm/arch-at91/at91_aic.h
+++ /dev/null
@@ -1,53 +0,0 @@
1/*
2 * include/asm-arm/arch-at91/at91_aic.h
3 *
4 * Copyright (C) 2005 Ivan Kokshaysky
5 * Copyright (C) SAN People
6 *
7 * Advanced Interrupt Controller (AIC) - System peripherals registers.
8 * Based on AT91RM9200 datasheet revision E.
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 */
15
16#ifndef AT91_AIC_H
17#define AT91_AIC_H
18
19#define AT91_AIC_SMR(n) (AT91_AIC + ((n) * 4)) /* Source Mode Registers 0-31 */
20#define AT91_AIC_PRIOR (7 << 0) /* Priority Level */
21#define AT91_AIC_SRCTYPE (3 << 5) /* Interrupt Source Type */
22#define AT91_AIC_SRCTYPE_LOW (0 << 5)
23#define AT91_AIC_SRCTYPE_FALLING (1 << 5)
24#define AT91_AIC_SRCTYPE_HIGH (2 << 5)
25#define AT91_AIC_SRCTYPE_RISING (3 << 5)
26
27#define AT91_AIC_SVR(n) (AT91_AIC + 0x80 + ((n) * 4)) /* Source Vector Registers 0-31 */
28#define AT91_AIC_IVR (AT91_AIC + 0x100) /* Interrupt Vector Register */
29#define AT91_AIC_FVR (AT91_AIC + 0x104) /* Fast Interrupt Vector Register */
30#define AT91_AIC_ISR (AT91_AIC + 0x108) /* Interrupt Status Register */
31#define AT91_AIC_IRQID (0x1f << 0) /* Current Interrupt Identifier */
32
33#define AT91_AIC_IPR (AT91_AIC + 0x10c) /* Interrupt Pending Register */
34#define AT91_AIC_IMR (AT91_AIC + 0x110) /* Interrupt Mask Register */
35#define AT91_AIC_CISR (AT91_AIC + 0x114) /* Core Interrupt Status Register */
36#define AT91_AIC_NFIQ (1 << 0) /* nFIQ Status */
37#define AT91_AIC_NIRQ (1 << 1) /* nIRQ Status */
38
39#define AT91_AIC_IECR (AT91_AIC + 0x120) /* Interrupt Enable Command Register */
40#define AT91_AIC_IDCR (AT91_AIC + 0x124) /* Interrupt Disable Command Register */
41#define AT91_AIC_ICCR (AT91_AIC + 0x128) /* Interrupt Clear Command Register */
42#define AT91_AIC_ISCR (AT91_AIC + 0x12c) /* Interrupt Set Command Register */
43#define AT91_AIC_EOICR (AT91_AIC + 0x130) /* End of Interrupt Command Register */
44#define AT91_AIC_SPU (AT91_AIC + 0x134) /* Spurious Interrupt Vector Register */
45#define AT91_AIC_DCR (AT91_AIC + 0x138) /* Debug Control Register */
46#define AT91_AIC_DCR_PROT (1 << 0) /* Protection Mode */
47#define AT91_AIC_DCR_GMSK (1 << 1) /* General Mask */
48
49#define AT91_AIC_FFER (AT91_AIC + 0x140) /* Fast Forcing Enable Register [SAM9 only] */
50#define AT91_AIC_FFDR (AT91_AIC + 0x144) /* Fast Forcing Disable Register [SAM9 only] */
51#define AT91_AIC_FFSR (AT91_AIC + 0x148) /* Fast Forcing Status Register [SAM9 only] */
52
53#endif
diff --git a/include/asm-arm/arch-at91/at91_dbgu.h b/include/asm-arm/arch-at91/at91_dbgu.h
deleted file mode 100644
index 8019ffd0ad3b..000000000000
--- a/include/asm-arm/arch-at91/at91_dbgu.h
+++ /dev/null
@@ -1,66 +0,0 @@
1/*
2 * include/asm-arm/arch-at91/at91_dbgu.h
3 *
4 * Copyright (C) 2005 Ivan Kokshaysky
5 * Copyright (C) SAN People
6 *
7 * Debug Unit (DBGU) - System peripherals registers.
8 * Based on AT91RM9200 datasheet revision E.
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 */
15
16#ifndef AT91_DBGU_H
17#define AT91_DBGU_H
18
19#ifdef AT91_DBGU
20#define AT91_DBGU_CR (AT91_DBGU + 0x00) /* Control Register */
21#define AT91_DBGU_MR (AT91_DBGU + 0x04) /* Mode Register */
22#define AT91_DBGU_IER (AT91_DBGU + 0x08) /* Interrupt Enable Register */
23#define AT91_DBGU_TXRDY (1 << 1) /* Transmitter Ready */
24#define AT91_DBGU_TXEMPTY (1 << 9) /* Transmitter Empty */
25#define AT91_DBGU_IDR (AT91_DBGU + 0x0c) /* Interrupt Disable Register */
26#define AT91_DBGU_IMR (AT91_DBGU + 0x10) /* Interrupt Mask Register */
27#define AT91_DBGU_SR (AT91_DBGU + 0x14) /* Status Register */
28#define AT91_DBGU_RHR (AT91_DBGU + 0x18) /* Receiver Holding Register */
29#define AT91_DBGU_THR (AT91_DBGU + 0x1c) /* Transmitter Holding Register */
30#define AT91_DBGU_BRGR (AT91_DBGU + 0x20) /* Baud Rate Generator Register */
31
32#define AT91_DBGU_CIDR (AT91_DBGU + 0x40) /* Chip ID Register */
33#define AT91_DBGU_EXID (AT91_DBGU + 0x44) /* Chip ID Extension Register */
34#define AT91_DBGU_FNR (AT91_DBGU + 0x48) /* Force NTRST Register [SAM9 only] */
35#define AT91_DBGU_FNTRST (1 << 0) /* Force NTRST */
36
37#endif /* AT91_DBGU */
38
39/*
40 * Some AT91 parts that don't have full DEBUG units still support the ID
41 * and extensions register.
42 */
43#define AT91_CIDR_VERSION (0x1f << 0) /* Version of the Device */
44#define AT91_CIDR_EPROC (7 << 5) /* Embedded Processor */
45#define AT91_CIDR_NVPSIZ (0xf << 8) /* Nonvolatile Program Memory Size */
46#define AT91_CIDR_NVPSIZ2 (0xf << 12) /* Second Nonvolatile Program Memory Size */
47#define AT91_CIDR_SRAMSIZ (0xf << 16) /* Internal SRAM Size */
48#define AT91_CIDR_SRAMSIZ_1K (1 << 16)
49#define AT91_CIDR_SRAMSIZ_2K (2 << 16)
50#define AT91_CIDR_SRAMSIZ_112K (4 << 16)
51#define AT91_CIDR_SRAMSIZ_4K (5 << 16)
52#define AT91_CIDR_SRAMSIZ_80K (6 << 16)
53#define AT91_CIDR_SRAMSIZ_160K (7 << 16)
54#define AT91_CIDR_SRAMSIZ_8K (8 << 16)
55#define AT91_CIDR_SRAMSIZ_16K (9 << 16)
56#define AT91_CIDR_SRAMSIZ_32K (10 << 16)
57#define AT91_CIDR_SRAMSIZ_64K (11 << 16)
58#define AT91_CIDR_SRAMSIZ_128K (12 << 16)
59#define AT91_CIDR_SRAMSIZ_256K (13 << 16)
60#define AT91_CIDR_SRAMSIZ_96K (14 << 16)
61#define AT91_CIDR_SRAMSIZ_512K (15 << 16)
62#define AT91_CIDR_ARCH (0xff << 20) /* Architecture Identifier */
63#define AT91_CIDR_NVPTYP (7 << 28) /* Nonvolatile Program Memory Type */
64#define AT91_CIDR_EXT (1 << 31) /* Extension Flag */
65
66#endif
diff --git a/include/asm-arm/arch-at91/at91_mci.h b/include/asm-arm/arch-at91/at91_mci.h
deleted file mode 100644
index 400ec10014b4..000000000000
--- a/include/asm-arm/arch-at91/at91_mci.h
+++ /dev/null
@@ -1,113 +0,0 @@
1/*
2 * include/asm-arm/arch-at91/at91_mci.h
3 *
4 * Copyright (C) 2005 Ivan Kokshaysky
5 * Copyright (C) SAN People
6 *
7 * MultiMedia Card Interface (MCI) registers.
8 * Based on AT91RM9200 datasheet revision F.
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 */
15
16#ifndef AT91_MCI_H
17#define AT91_MCI_H
18
19#define AT91_MCI_CR 0x00 /* Control Register */
20#define AT91_MCI_MCIEN (1 << 0) /* Multi-Media Interface Enable */
21#define AT91_MCI_MCIDIS (1 << 1) /* Multi-Media Interface Disable */
22#define AT91_MCI_PWSEN (1 << 2) /* Power Save Mode Enable */
23#define AT91_MCI_PWSDIS (1 << 3) /* Power Save Mode Disable */
24#define AT91_MCI_SWRST (1 << 7) /* Software Reset */
25
26#define AT91_MCI_MR 0x04 /* Mode Register */
27#define AT91_MCI_CLKDIV (0xff << 0) /* Clock Divider */
28#define AT91_MCI_PWSDIV (7 << 8) /* Power Saving Divider */
29#define AT91_MCI_RDPROOF (1 << 11) /* Read Proof Enable [SAM926[03] only] */
30#define AT91_MCI_WRPROOF (1 << 12) /* Write Proof Enable [SAM926[03] only] */
31#define AT91_MCI_PDCFBYTE (1 << 13) /* PDC Force Byte Transfer [SAM926[03] only] */
32#define AT91_MCI_PDCPADV (1 << 14) /* PDC Padding Value */
33#define AT91_MCI_PDCMODE (1 << 15) /* PDC-orientated Mode */
34#define AT91_MCI_BLKLEN (0xfff << 18) /* Data Block Length */
35
36#define AT91_MCI_DTOR 0x08 /* Data Timeout Register */
37#define AT91_MCI_DTOCYC (0xf << 0) /* Data Timeout Cycle Number */
38#define AT91_MCI_DTOMUL (7 << 4) /* Data Timeout Multiplier */
39#define AT91_MCI_DTOMUL_1 (0 << 4)
40#define AT91_MCI_DTOMUL_16 (1 << 4)
41#define AT91_MCI_DTOMUL_128 (2 << 4)
42#define AT91_MCI_DTOMUL_256 (3 << 4)
43#define AT91_MCI_DTOMUL_1K (4 << 4)
44#define AT91_MCI_DTOMUL_4K (5 << 4)
45#define AT91_MCI_DTOMUL_64K (6 << 4)
46#define AT91_MCI_DTOMUL_1M (7 << 4)
47
48#define AT91_MCI_SDCR 0x0c /* SD Card Register */
49#define AT91_MCI_SDCSEL (3 << 0) /* SD Card Selector */
50#define AT91_MCI_SDCBUS (1 << 7) /* 1-bit or 4-bit bus */
51
52#define AT91_MCI_ARGR 0x10 /* Argument Register */
53
54#define AT91_MCI_CMDR 0x14 /* Command Register */
55#define AT91_MCI_CMDNB (0x3f << 0) /* Command Number */
56#define AT91_MCI_RSPTYP (3 << 6) /* Response Type */
57#define AT91_MCI_RSPTYP_NONE (0 << 6)
58#define AT91_MCI_RSPTYP_48 (1 << 6)
59#define AT91_MCI_RSPTYP_136 (2 << 6)
60#define AT91_MCI_SPCMD (7 << 8) /* Special Command */
61#define AT91_MCI_SPCMD_NONE (0 << 8)
62#define AT91_MCI_SPCMD_INIT (1 << 8)
63#define AT91_MCI_SPCMD_SYNC (2 << 8)
64#define AT91_MCI_SPCMD_ICMD (4 << 8)
65#define AT91_MCI_SPCMD_IRESP (5 << 8)
66#define AT91_MCI_OPDCMD (1 << 11) /* Open Drain Command */
67#define AT91_MCI_MAXLAT (1 << 12) /* Max Latency for Command to Response */
68#define AT91_MCI_TRCMD (3 << 16) /* Transfer Command */
69#define AT91_MCI_TRCMD_NONE (0 << 16)
70#define AT91_MCI_TRCMD_START (1 << 16)
71#define AT91_MCI_TRCMD_STOP (2 << 16)
72#define AT91_MCI_TRDIR (1 << 18) /* Transfer Direction */
73#define AT91_MCI_TRTYP (3 << 19) /* Transfer Type */
74#define AT91_MCI_TRTYP_BLOCK (0 << 19)
75#define AT91_MCI_TRTYP_MULTIPLE (1 << 19)
76#define AT91_MCI_TRTYP_STREAM (2 << 19)
77
78#define AT91_MCI_BLKR 0x18 /* Block Register */
79#define AT91_MCI_BLKR_BCNT(n) ((0xffff & (n)) << 0) /* Block count */
80#define AT91_MCI_BLKR_BLKLEN(n) ((0xffff & (n)) << 16) /* Block lenght */
81
82#define AT91_MCI_RSPR(n) (0x20 + ((n) * 4)) /* Response Registers 0-3 */
83#define AT91_MCR_RDR 0x30 /* Receive Data Register */
84#define AT91_MCR_TDR 0x34 /* Transmit Data Register */
85
86#define AT91_MCI_SR 0x40 /* Status Register */
87#define AT91_MCI_CMDRDY (1 << 0) /* Command Ready */
88#define AT91_MCI_RXRDY (1 << 1) /* Receiver Ready */
89#define AT91_MCI_TXRDY (1 << 2) /* Transmit Ready */
90#define AT91_MCI_BLKE (1 << 3) /* Data Block Ended */
91#define AT91_MCI_DTIP (1 << 4) /* Data Transfer in Progress */
92#define AT91_MCI_NOTBUSY (1 << 5) /* Data Not Busy */
93#define AT91_MCI_ENDRX (1 << 6) /* End of RX Buffer */
94#define AT91_MCI_ENDTX (1 << 7) /* End fo TX Buffer */
95#define AT91_MCI_SDIOIRQA (1 << 8) /* SDIO Interrupt for Slot A */
96#define AT91_MCI_SDIOIRQB (1 << 9) /* SDIO Interrupt for Slot B */
97#define AT91_MCI_RXBUFF (1 << 14) /* RX Buffer Full */
98#define AT91_MCI_TXBUFE (1 << 15) /* TX Buffer Empty */
99#define AT91_MCI_RINDE (1 << 16) /* Response Index Error */
100#define AT91_MCI_RDIRE (1 << 17) /* Response Direction Error */
101#define AT91_MCI_RCRCE (1 << 18) /* Response CRC Error */
102#define AT91_MCI_RENDE (1 << 19) /* Response End Bit Error */
103#define AT91_MCI_RTOE (1 << 20) /* Reponse Time-out Error */
104#define AT91_MCI_DCRCE (1 << 21) /* Data CRC Error */
105#define AT91_MCI_DTOE (1 << 22) /* Data Time-out Error */
106#define AT91_MCI_OVRE (1 << 30) /* Overrun */
107#define AT91_MCI_UNRE (1 << 31) /* Underrun */
108
109#define AT91_MCI_IER 0x44 /* Interrupt Enable Register */
110#define AT91_MCI_IDR 0x48 /* Interrupt Disable Register */
111#define AT91_MCI_IMR 0x4c /* Interrupt Mask Register */
112
113#endif
diff --git a/include/asm-arm/arch-at91/at91_pio.h b/include/asm-arm/arch-at91/at91_pio.h
deleted file mode 100644
index 84c3866d309f..000000000000
--- a/include/asm-arm/arch-at91/at91_pio.h
+++ /dev/null
@@ -1,49 +0,0 @@
1/*
2 * include/asm-arm/arch-at91/at91_pio.h
3 *
4 * Copyright (C) 2005 Ivan Kokshaysky
5 * Copyright (C) SAN People
6 *
7 * Parallel I/O Controller (PIO) - System peripherals registers.
8 * Based on AT91RM9200 datasheet revision E.
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 */
15
16#ifndef AT91_PIO_H
17#define AT91_PIO_H
18
19#define PIO_PER 0x00 /* Enable Register */
20#define PIO_PDR 0x04 /* Disable Register */
21#define PIO_PSR 0x08 /* Status Register */
22#define PIO_OER 0x10 /* Output Enable Register */
23#define PIO_ODR 0x14 /* Output Disable Register */
24#define PIO_OSR 0x18 /* Output Status Register */
25#define PIO_IFER 0x20 /* Glitch Input Filter Enable */
26#define PIO_IFDR 0x24 /* Glitch Input Filter Disable */
27#define PIO_IFSR 0x28 /* Glitch Input Filter Status */
28#define PIO_SODR 0x30 /* Set Output Data Register */
29#define PIO_CODR 0x34 /* Clear Output Data Register */
30#define PIO_ODSR 0x38 /* Output Data Status Register */
31#define PIO_PDSR 0x3c /* Pin Data Status Register */
32#define PIO_IER 0x40 /* Interrupt Enable Register */
33#define PIO_IDR 0x44 /* Interrupt Disable Register */
34#define PIO_IMR 0x48 /* Interrupt Mask Register */
35#define PIO_ISR 0x4c /* Interrupt Status Register */
36#define PIO_MDER 0x50 /* Multi-driver Enable Register */
37#define PIO_MDDR 0x54 /* Multi-driver Disable Register */
38#define PIO_MDSR 0x58 /* Multi-driver Status Register */
39#define PIO_PUDR 0x60 /* Pull-up Disable Register */
40#define PIO_PUER 0x64 /* Pull-up Enable Register */
41#define PIO_PUSR 0x68 /* Pull-up Status Register */
42#define PIO_ASR 0x70 /* Peripheral A Select Register */
43#define PIO_BSR 0x74 /* Peripheral B Select Register */
44#define PIO_ABSR 0x78 /* AB Status Register */
45#define PIO_OWER 0xa0 /* Output Write Enable Register */
46#define PIO_OWDR 0xa4 /* Output Write Disable Register */
47#define PIO_OWSR 0xa8 /* Output Write Status Register */
48
49#endif
diff --git a/include/asm-arm/arch-at91/at91_pit.h b/include/asm-arm/arch-at91/at91_pit.h
deleted file mode 100644
index 5026325a5ae4..000000000000
--- a/include/asm-arm/arch-at91/at91_pit.h
+++ /dev/null
@@ -1,29 +0,0 @@
1/*
2 * include/asm-arm/arch-at91/at91_pit.h
3 *
4 * Periodic Interval Timer (PIT) - System peripherals regsters.
5 * Based on AT91SAM9261 datasheet revision D.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 */
12
13#ifndef AT91_PIT_H
14#define AT91_PIT_H
15
16#define AT91_PIT_MR (AT91_PIT + 0x00) /* Mode Register */
17#define AT91_PIT_PITIEN (1 << 25) /* Timer Interrupt Enable */
18#define AT91_PIT_PITEN (1 << 24) /* Timer Enabled */
19#define AT91_PIT_PIV (0xfffff) /* Periodic Interval Value */
20
21#define AT91_PIT_SR (AT91_PIT + 0x04) /* Status Register */
22#define AT91_PIT_PITS (1 << 0) /* Timer Status */
23
24#define AT91_PIT_PIVR (AT91_PIT + 0x08) /* Periodic Interval Value Register */
25#define AT91_PIT_PIIR (AT91_PIT + 0x0c) /* Periodic Interval Image Register */
26#define AT91_PIT_PICNT (0xfff << 20) /* Interval Counter */
27#define AT91_PIT_CPIV (0xfffff) /* Inverval Value */
28
29#endif
diff --git a/include/asm-arm/arch-at91/at91_pmc.h b/include/asm-arm/arch-at91/at91_pmc.h
deleted file mode 100644
index 2001e81f2267..000000000000
--- a/include/asm-arm/arch-at91/at91_pmc.h
+++ /dev/null
@@ -1,111 +0,0 @@
1/*
2 * include/asm-arm/arch-at91/at91_pmc.h
3 *
4 * Copyright (C) 2005 Ivan Kokshaysky
5 * Copyright (C) SAN People
6 *
7 * Power Management Controller (PMC) - System peripherals registers.
8 * Based on AT91RM9200 datasheet revision E.
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 */
15
16#ifndef AT91_PMC_H
17#define AT91_PMC_H
18
19#define AT91_PMC_SCER (AT91_PMC + 0x00) /* System Clock Enable Register */
20#define AT91_PMC_SCDR (AT91_PMC + 0x04) /* System Clock Disable Register */
21
22#define AT91_PMC_SCSR (AT91_PMC + 0x08) /* System Clock Status Register */
23#define AT91_PMC_PCK (1 << 0) /* Processor Clock */
24#define AT91RM9200_PMC_UDP (1 << 1) /* USB Devcice Port Clock [AT91RM9200 only] */
25#define AT91RM9200_PMC_MCKUDP (1 << 2) /* USB Device Port Master Clock Automatic Disable on Suspend [AT91RM9200 only] */
26#define AT91RM9200_PMC_UHP (1 << 4) /* USB Host Port Clock [AT91RM9200 only] */
27#define AT91SAM926x_PMC_UHP (1 << 6) /* USB Host Port Clock [AT91SAM926x only] */
28#define AT91CAP9_PMC_UHP (1 << 6) /* USB Host Port Clock [AT91CAP9 only] */
29#define AT91SAM926x_PMC_UDP (1 << 7) /* USB Devcice Port Clock [AT91SAM926x only] */
30#define AT91_PMC_PCK0 (1 << 8) /* Programmable Clock 0 */
31#define AT91_PMC_PCK1 (1 << 9) /* Programmable Clock 1 */
32#define AT91_PMC_PCK2 (1 << 10) /* Programmable Clock 2 */
33#define AT91_PMC_PCK3 (1 << 11) /* Programmable Clock 3 */
34#define AT91_PMC_HCK0 (1 << 16) /* AHB Clock (USB host) [AT91SAM9261 only] */
35#define AT91_PMC_HCK1 (1 << 17) /* AHB Clock (LCD) [AT91SAM9261 only] */
36
37#define AT91_PMC_PCER (AT91_PMC + 0x10) /* Peripheral Clock Enable Register */
38#define AT91_PMC_PCDR (AT91_PMC + 0x14) /* Peripheral Clock Disable Register */
39#define AT91_PMC_PCSR (AT91_PMC + 0x18) /* Peripheral Clock Status Register */
40
41#define AT91_CKGR_UCKR (AT91_PMC + 0x1C) /* UTMI Clock Register [SAM9RL, CAP9] */
42#define AT91_PMC_UPLLEN (1 << 16) /* UTMI PLL Enable */
43#define AT91_PMC_UPLLCOUNT (0xf << 20) /* UTMI PLL Start-up Time */
44#define AT91_PMC_BIASEN (1 << 24) /* UTMI BIAS Enable */
45#define AT91_PMC_BIASCOUNT (0xf << 28) /* UTMI PLL Start-up Time */
46
47#define AT91_CKGR_MOR (AT91_PMC + 0x20) /* Main Oscillator Register [not on SAM9RL] */
48#define AT91_PMC_MOSCEN (1 << 0) /* Main Oscillator Enable */
49#define AT91_PMC_OSCBYPASS (1 << 1) /* Oscillator Bypass [SAM9x, CAP9] */
50#define AT91_PMC_OSCOUNT (0xff << 8) /* Main Oscillator Start-up Time */
51
52#define AT91_CKGR_MCFR (AT91_PMC + 0x24) /* Main Clock Frequency Register */
53#define AT91_PMC_MAINF (0xffff << 0) /* Main Clock Frequency */
54#define AT91_PMC_MAINRDY (1 << 16) /* Main Clock Ready */
55
56#define AT91_CKGR_PLLAR (AT91_PMC + 0x28) /* PLL A Register */
57#define AT91_CKGR_PLLBR (AT91_PMC + 0x2c) /* PLL B Register */
58#define AT91_PMC_DIV (0xff << 0) /* Divider */
59#define AT91_PMC_PLLCOUNT (0x3f << 8) /* PLL Counter */
60#define AT91_PMC_OUT (3 << 14) /* PLL Clock Frequency Range */
61#define AT91_PMC_MUL (0x7ff << 16) /* PLL Multiplier */
62#define AT91_PMC_USBDIV (3 << 28) /* USB Divisor (PLLB only) */
63#define AT91_PMC_USBDIV_1 (0 << 28)
64#define AT91_PMC_USBDIV_2 (1 << 28)
65#define AT91_PMC_USBDIV_4 (2 << 28)
66#define AT91_PMC_USB96M (1 << 28) /* Divider by 2 Enable (PLLB only) */
67
68#define AT91_PMC_MCKR (AT91_PMC + 0x30) /* Master Clock Register */
69#define AT91_PMC_CSS (3 << 0) /* Master Clock Selection */
70#define AT91_PMC_CSS_SLOW (0 << 0)
71#define AT91_PMC_CSS_MAIN (1 << 0)
72#define AT91_PMC_CSS_PLLA (2 << 0)
73#define AT91_PMC_CSS_PLLB (3 << 0)
74#define AT91_PMC_PRES (7 << 2) /* Master Clock Prescaler */
75#define AT91_PMC_PRES_1 (0 << 2)
76#define AT91_PMC_PRES_2 (1 << 2)
77#define AT91_PMC_PRES_4 (2 << 2)
78#define AT91_PMC_PRES_8 (3 << 2)
79#define AT91_PMC_PRES_16 (4 << 2)
80#define AT91_PMC_PRES_32 (5 << 2)
81#define AT91_PMC_PRES_64 (6 << 2)
82#define AT91_PMC_MDIV (3 << 8) /* Master Clock Division */
83#define AT91RM9200_PMC_MDIV_1 (0 << 8) /* [AT91RM9200 only] */
84#define AT91RM9200_PMC_MDIV_2 (1 << 8)
85#define AT91RM9200_PMC_MDIV_3 (2 << 8)
86#define AT91RM9200_PMC_MDIV_4 (3 << 8)
87#define AT91SAM9_PMC_MDIV_1 (0 << 8) /* [SAM9,CAP9 only] */
88#define AT91SAM9_PMC_MDIV_2 (1 << 8)
89#define AT91SAM9_PMC_MDIV_4 (2 << 8)
90#define AT91SAM9_PMC_MDIV_6 (3 << 8)
91#define AT91_PMC_PDIV (1 << 12) /* Processor Clock Division [some SAM9 only] */
92#define AT91_PMC_PDIV_1 (0 << 12)
93#define AT91_PMC_PDIV_2 (1 << 12)
94
95#define AT91_PMC_PCKR(n) (AT91_PMC + 0x40 + ((n) * 4)) /* Programmable Clock 0-3 Registers */
96
97#define AT91_PMC_IER (AT91_PMC + 0x60) /* Interrupt Enable Register */
98#define AT91_PMC_IDR (AT91_PMC + 0x64) /* Interrupt Disable Register */
99#define AT91_PMC_SR (AT91_PMC + 0x68) /* Status Register */
100#define AT91_PMC_MOSCS (1 << 0) /* MOSCS Flag */
101#define AT91_PMC_LOCKA (1 << 1) /* PLLA Lock */
102#define AT91_PMC_LOCKB (1 << 2) /* PLLB Lock */
103#define AT91_PMC_MCKRDY (1 << 3) /* Master Clock */
104#define AT91_PMC_LOCKU (1 << 6) /* UPLL Lock [AT91CAP9 only] */
105#define AT91_PMC_PCK0RDY (1 << 8) /* Programmable Clock 0 */
106#define AT91_PMC_PCK1RDY (1 << 9) /* Programmable Clock 1 */
107#define AT91_PMC_PCK2RDY (1 << 10) /* Programmable Clock 2 */
108#define AT91_PMC_PCK3RDY (1 << 11) /* Programmable Clock 3 */
109#define AT91_PMC_IMR (AT91_PMC + 0x6c) /* Interrupt Mask Register */
110
111#endif
diff --git a/include/asm-arm/arch-at91/at91_rstc.h b/include/asm-arm/arch-at91/at91_rstc.h
deleted file mode 100644
index fb8d1618a231..000000000000
--- a/include/asm-arm/arch-at91/at91_rstc.h
+++ /dev/null
@@ -1,38 +0,0 @@
1/*
2 * include/asm-arm/arch-at91/at91_rstc.h
3 *
4 * Reset Controller (RSTC) - System peripherals regsters.
5 * Based on AT91SAM9261 datasheet revision D.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 */
12
13#ifndef AT91_RSTC_H
14#define AT91_RSTC_H
15
16#define AT91_RSTC_CR (AT91_RSTC + 0x00) /* Reset Controller Control Register */
17#define AT91_RSTC_PROCRST (1 << 0) /* Processor Reset */
18#define AT91_RSTC_PERRST (1 << 2) /* Peripheral Reset */
19#define AT91_RSTC_EXTRST (1 << 3) /* External Reset */
20#define AT91_RSTC_KEY (0xa5 << 24) /* KEY Password */
21
22#define AT91_RSTC_SR (AT91_RSTC + 0x04) /* Reset Controller Status Register */
23#define AT91_RSTC_URSTS (1 << 0) /* User Reset Status */
24#define AT91_RSTC_RSTTYP (7 << 8) /* Reset Type */
25#define AT91_RSTC_RSTTYP_GENERAL (0 << 8)
26#define AT91_RSTC_RSTTYP_WAKEUP (1 << 8)
27#define AT91_RSTC_RSTTYP_WATCHDOG (2 << 8)
28#define AT91_RSTC_RSTTYP_SOFTWARE (3 << 8)
29#define AT91_RSTC_RSTTYP_USER (4 << 8)
30#define AT91_RSTC_NRSTL (1 << 16) /* NRST Pin Level */
31#define AT91_RSTC_SRCMP (1 << 17) /* Software Reset Command in Progress */
32
33#define AT91_RSTC_MR (AT91_RSTC + 0x08) /* Reset Controller Mode Register */
34#define AT91_RSTC_URSTEN (1 << 0) /* User Reset Enable */
35#define AT91_RSTC_URSTIEN (1 << 4) /* User Reset Interrupt Enable */
36#define AT91_RSTC_ERSTL (0xf << 8) /* External Reset Length */
37
38#endif
diff --git a/include/asm-arm/arch-at91/at91_rtc.h b/include/asm-arm/arch-at91/at91_rtc.h
deleted file mode 100644
index af9bd28174c0..000000000000
--- a/include/asm-arm/arch-at91/at91_rtc.h
+++ /dev/null
@@ -1,75 +0,0 @@
1/*
2 * include/asm-arm/arch-at91/at91_rtc.h
3 *
4 * Copyright (C) 2005 Ivan Kokshaysky
5 * Copyright (C) SAN People
6 *
7 * Real Time Clock (RTC) - System peripheral registers.
8 * Based on AT91RM9200 datasheet revision E.
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 */
15
16#ifndef AT91_RTC_H
17#define AT91_RTC_H
18
19#define AT91_RTC_CR (AT91_RTC + 0x00) /* Control Register */
20#define AT91_RTC_UPDTIM (1 << 0) /* Update Request Time Register */
21#define AT91_RTC_UPDCAL (1 << 1) /* Update Request Calendar Register */
22#define AT91_RTC_TIMEVSEL (3 << 8) /* Time Event Selection */
23#define AT91_RTC_TIMEVSEL_MINUTE (0 << 8)
24#define AT91_RTC_TIMEVSEL_HOUR (1 << 8)
25#define AT91_RTC_TIMEVSEL_DAY24 (2 << 8)
26#define AT91_RTC_TIMEVSEL_DAY12 (3 << 8)
27#define AT91_RTC_CALEVSEL (3 << 16) /* Calendar Event Selection */
28#define AT91_RTC_CALEVSEL_WEEK (0 << 16)
29#define AT91_RTC_CALEVSEL_MONTH (1 << 16)
30#define AT91_RTC_CALEVSEL_YEAR (2 << 16)
31
32#define AT91_RTC_MR (AT91_RTC + 0x04) /* Mode Register */
33#define AT91_RTC_HRMOD (1 << 0) /* 12/24 Hour Mode */
34
35#define AT91_RTC_TIMR (AT91_RTC + 0x08) /* Time Register */
36#define AT91_RTC_SEC (0x7f << 0) /* Current Second */
37#define AT91_RTC_MIN (0x7f << 8) /* Current Minute */
38#define AT91_RTC_HOUR (0x3f << 16) /* Current Hour */
39#define AT91_RTC_AMPM (1 << 22) /* Ante Meridiem Post Meridiem Indicator */
40
41#define AT91_RTC_CALR (AT91_RTC + 0x0c) /* Calendar Register */
42#define AT91_RTC_CENT (0x7f << 0) /* Current Century */
43#define AT91_RTC_YEAR (0xff << 8) /* Current Year */
44#define AT91_RTC_MONTH (0x1f << 16) /* Current Month */
45#define AT91_RTC_DAY (7 << 21) /* Current Day */
46#define AT91_RTC_DATE (0x3f << 24) /* Current Date */
47
48#define AT91_RTC_TIMALR (AT91_RTC + 0x10) /* Time Alarm Register */
49#define AT91_RTC_SECEN (1 << 7) /* Second Alarm Enable */
50#define AT91_RTC_MINEN (1 << 15) /* Minute Alarm Enable */
51#define AT91_RTC_HOUREN (1 << 23) /* Hour Alarm Enable */
52
53#define AT91_RTC_CALALR (AT91_RTC + 0x14) /* Calendar Alarm Register */
54#define AT91_RTC_MTHEN (1 << 23) /* Month Alarm Enable */
55#define AT91_RTC_DATEEN (1 << 31) /* Date Alarm Enable */
56
57#define AT91_RTC_SR (AT91_RTC + 0x18) /* Status Register */
58#define AT91_RTC_ACKUPD (1 << 0) /* Acknowledge for Update */
59#define AT91_RTC_ALARM (1 << 1) /* Alarm Flag */
60#define AT91_RTC_SECEV (1 << 2) /* Second Event */
61#define AT91_RTC_TIMEV (1 << 3) /* Time Event */
62#define AT91_RTC_CALEV (1 << 4) /* Calendar Event */
63
64#define AT91_RTC_SCCR (AT91_RTC + 0x1c) /* Status Clear Command Register */
65#define AT91_RTC_IER (AT91_RTC + 0x20) /* Interrupt Enable Register */
66#define AT91_RTC_IDR (AT91_RTC + 0x24) /* Interrupt Disable Register */
67#define AT91_RTC_IMR (AT91_RTC + 0x28) /* Interrupt Mask Register */
68
69#define AT91_RTC_VER (AT91_RTC + 0x2c) /* Valid Entry Register */
70#define AT91_RTC_NVTIM (1 << 0) /* Non valid Time */
71#define AT91_RTC_NVCAL (1 << 1) /* Non valid Calendar */
72#define AT91_RTC_NVTIMALR (1 << 2) /* Non valid Time Alarm */
73#define AT91_RTC_NVCALALR (1 << 3) /* Non valid Calendar Alarm */
74
75#endif
diff --git a/include/asm-arm/arch-at91/at91_rtt.h b/include/asm-arm/arch-at91/at91_rtt.h
deleted file mode 100644
index 39a32633b275..000000000000
--- a/include/asm-arm/arch-at91/at91_rtt.h
+++ /dev/null
@@ -1,32 +0,0 @@
1/*
2 * include/asm-arm/arch-at91/at91_rtt.h
3 *
4 * Real-time Timer (RTT) - System peripherals regsters.
5 * Based on AT91SAM9261 datasheet revision D.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 */
12
13#ifndef AT91_RTT_H
14#define AT91_RTT_H
15
16#define AT91_RTT_MR 0x00 /* Real-time Mode Register */
17#define AT91_RTT_RTPRES (0xffff << 0) /* Real-time Timer Prescaler Value */
18#define AT91_RTT_ALMIEN (1 << 16) /* Alarm Interrupt Enable */
19#define AT91_RTT_RTTINCIEN (1 << 17) /* Real Time Timer Increment Interrupt Enable */
20#define AT91_RTT_RTTRST (1 << 18) /* Real Time Timer Restart */
21
22#define AT91_RTT_AR 0x04 /* Real-time Alarm Register */
23#define AT91_RTT_ALMV (0xffffffff) /* Alarm Value */
24
25#define AT91_RTT_VR 0x08 /* Real-time Value Register */
26#define AT91_RTT_CRTV (0xffffffff) /* Current Real-time Value */
27
28#define AT91_RTT_SR 0x0c /* Real-time Status Register */
29#define AT91_RTT_ALMS (1 << 0) /* Real-time Alarm Status */
30#define AT91_RTT_RTTINC (1 << 1) /* Real-time Timer Increment */
31
32#endif
diff --git a/include/asm-arm/arch-at91/at91_shdwc.h b/include/asm-arm/arch-at91/at91_shdwc.h
deleted file mode 100644
index 581fa41d90e8..000000000000
--- a/include/asm-arm/arch-at91/at91_shdwc.h
+++ /dev/null
@@ -1,35 +0,0 @@
1/*
2 * include/asm-arm/arch-at91/at91_shdwc.h
3 *
4 * Shutdown Controller (SHDWC) - System peripherals regsters.
5 * Based on AT91SAM9261 datasheet revision D.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 */
12
13#ifndef AT91_SHDWC_H
14#define AT91_SHDWC_H
15
16#define AT91_SHDW_CR (AT91_SHDWC + 0x00) /* Shut Down Control Register */
17#define AT91_SHDW_SHDW (1 << 0) /* Shut Down command */
18#define AT91_SHDW_KEY (0xa5 << 24) /* KEY Password */
19
20#define AT91_SHDW_MR (AT91_SHDWC + 0x04) /* Shut Down Mode Register */
21#define AT91_SHDW_WKMODE0 (3 << 0) /* Wake-up 0 Mode Selection */
22#define AT91_SHDW_WKMODE0_NONE 0
23#define AT91_SHDW_WKMODE0_HIGH 1
24#define AT91_SHDW_WKMODE0_LOW 2
25#define AT91_SHDW_WKMODE0_ANYLEVEL 3
26#define AT91_SHDW_CPTWK0 (0xf << 4) /* Counter On Wake Up 0 */
27#define AT91_SHDW_CPTWK0_(x) ((x) << 4)
28#define AT91_SHDW_RTTWKEN (1 << 16) /* Real Time Timer Wake-up Enable */
29
30#define AT91_SHDW_SR (AT91_SHDWC + 0x08) /* Shut Down Status Register */
31#define AT91_SHDW_WAKEUP0 (1 << 0) /* Wake-up 0 Status */
32#define AT91_SHDW_RTTWK (1 << 16) /* Real-time Timer Wake-up */
33#define AT91_SHDW_RTCWK (1 << 17) /* Real-time Clock Wake-up [SAM9RL] */
34
35#endif
diff --git a/include/asm-arm/arch-at91/at91_spi.h b/include/asm-arm/arch-at91/at91_spi.h
deleted file mode 100644
index f9b9a8464997..000000000000
--- a/include/asm-arm/arch-at91/at91_spi.h
+++ /dev/null
@@ -1,81 +0,0 @@
1/*
2 * include/asm-arm/arch-at91/at91_spi.h
3 *
4 * Copyright (C) 2005 Ivan Kokshaysky
5 * Copyright (C) SAN People
6 *
7 * Serial Peripheral Interface (SPI) registers.
8 * Based on AT91RM9200 datasheet revision E.
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 */
15
16#ifndef AT91_SPI_H
17#define AT91_SPI_H
18
19#define AT91_SPI_CR 0x00 /* Control Register */
20#define AT91_SPI_SPIEN (1 << 0) /* SPI Enable */
21#define AT91_SPI_SPIDIS (1 << 1) /* SPI Disable */
22#define AT91_SPI_SWRST (1 << 7) /* SPI Software Reset */
23#define AT91_SPI_LASTXFER (1 << 24) /* Last Transfer [SAM9261 only] */
24
25#define AT91_SPI_MR 0x04 /* Mode Register */
26#define AT91_SPI_MSTR (1 << 0) /* Master/Slave Mode */
27#define AT91_SPI_PS (1 << 1) /* Peripheral Select */
28#define AT91_SPI_PS_FIXED (0 << 1)
29#define AT91_SPI_PS_VARIABLE (1 << 1)
30#define AT91_SPI_PCSDEC (1 << 2) /* Chip Select Decode */
31#define AT91_SPI_DIV32 (1 << 3) /* Clock Selection [AT91RM9200 only] */
32#define AT91_SPI_MODFDIS (1 << 4) /* Mode Fault Detection */
33#define AT91_SPI_LLB (1 << 7) /* Local Loopback Enable */
34#define AT91_SPI_PCS (0xf << 16) /* Peripheral Chip Select */
35#define AT91_SPI_DLYBCS (0xff << 24) /* Delay Between Chip Selects */
36
37#define AT91_SPI_RDR 0x08 /* Receive Data Register */
38#define AT91_SPI_RD (0xffff << 0) /* Receive Data */
39#define AT91_SPI_PCS (0xf << 16) /* Peripheral Chip Select */
40
41#define AT91_SPI_TDR 0x0c /* Transmit Data Register */
42#define AT91_SPI_TD (0xffff << 0) /* Transmit Data */
43#define AT91_SPI_PCS (0xf << 16) /* Peripheral Chip Select */
44#define AT91_SPI_LASTXFER (1 << 24) /* Last Transfer [SAM9261 only] */
45
46#define AT91_SPI_SR 0x10 /* Status Register */
47#define AT91_SPI_RDRF (1 << 0) /* Receive Data Register Full */
48#define AT91_SPI_TDRE (1 << 1) /* Transmit Data Register Full */
49#define AT91_SPI_MODF (1 << 2) /* Mode Fault Error */
50#define AT91_SPI_OVRES (1 << 3) /* Overrun Error Status */
51#define AT91_SPI_ENDRX (1 << 4) /* End of RX buffer */
52#define AT91_SPI_ENDTX (1 << 5) /* End of TX buffer */
53#define AT91_SPI_RXBUFF (1 << 6) /* RX Buffer Full */
54#define AT91_SPI_TXBUFE (1 << 7) /* TX Buffer Empty */
55#define AT91_SPI_NSSR (1 << 8) /* NSS Rising [SAM9261 only] */
56#define AT91_SPI_TXEMPTY (1 << 9) /* Transmission Register Empty [SAM9261 only] */
57#define AT91_SPI_SPIENS (1 << 16) /* SPI Enable Status */
58
59#define AT91_SPI_IER 0x14 /* Interrupt Enable Register */
60#define AT91_SPI_IDR 0x18 /* Interrupt Disable Register */
61#define AT91_SPI_IMR 0x1c /* Interrupt Mask Register */
62
63#define AT91_SPI_CSR(n) (0x30 + ((n) * 4)) /* Chip Select Registers 0-3 */
64#define AT91_SPI_CPOL (1 << 0) /* Clock Polarity */
65#define AT91_SPI_NCPHA (1 << 1) /* Clock Phase */
66#define AT91_SPI_CSAAT (1 << 3) /* Chip Select Active After Transfer [SAM9261 only] */
67#define AT91_SPI_BITS (0xf << 4) /* Bits Per Transfer */
68#define AT91_SPI_BITS_8 (0 << 4)
69#define AT91_SPI_BITS_9 (1 << 4)
70#define AT91_SPI_BITS_10 (2 << 4)
71#define AT91_SPI_BITS_11 (3 << 4)
72#define AT91_SPI_BITS_12 (4 << 4)
73#define AT91_SPI_BITS_13 (5 << 4)
74#define AT91_SPI_BITS_14 (6 << 4)
75#define AT91_SPI_BITS_15 (7 << 4)
76#define AT91_SPI_BITS_16 (8 << 4)
77#define AT91_SPI_SCBR (0xff << 8) /* Serial Clock Baud Rate */
78#define AT91_SPI_DLYBS (0xff << 16) /* Delay before SPCK */
79#define AT91_SPI_DLYBCT (0xff << 24) /* Delay between Consecutive Transfers */
80
81#endif
diff --git a/include/asm-arm/arch-at91/at91_ssc.h b/include/asm-arm/arch-at91/at91_ssc.h
deleted file mode 100644
index 0ecc73460b50..000000000000
--- a/include/asm-arm/arch-at91/at91_ssc.h
+++ /dev/null
@@ -1,106 +0,0 @@
1/*
2 * include/asm-arm/arch-at91/at91_ssc.h
3 *
4 * Copyright (C) SAN People
5 *
6 * Serial Synchronous Controller (SSC) registers.
7 * Based on AT91RM9200 datasheet revision E.
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 */
14
15#ifndef AT91_SSC_H
16#define AT91_SSC_H
17
18#define AT91_SSC_CR 0x00 /* Control Register */
19#define AT91_SSC_RXEN (1 << 0) /* Receive Enable */
20#define AT91_SSC_RXDIS (1 << 1) /* Receive Disable */
21#define AT91_SSC_TXEN (1 << 8) /* Transmit Enable */
22#define AT91_SSC_TXDIS (1 << 9) /* Transmit Disable */
23#define AT91_SSC_SWRST (1 << 15) /* Software Reset */
24
25#define AT91_SSC_CMR 0x04 /* Clock Mode Register */
26#define AT91_SSC_CMR_DIV (0xfff << 0) /* Clock Divider */
27
28#define AT91_SSC_RCMR 0x10 /* Receive Clock Mode Register */
29#define AT91_SSC_CKS (3 << 0) /* Clock Selection */
30#define AT91_SSC_CKS_DIV (0 << 0)
31#define AT91_SSC_CKS_CLOCK (1 << 0)
32#define AT91_SSC_CKS_PIN (2 << 0)
33#define AT91_SSC_CKO (7 << 2) /* Clock Output Mode Selection */
34#define AT91_SSC_CKO_NONE (0 << 2)
35#define AT91_SSC_CKO_CONTINUOUS (1 << 2)
36#define AT91_SSC_CKI (1 << 5) /* Clock Inversion */
37#define AT91_SSC_CKI_FALLING (0 << 5)
38#define AT91_SSC_CK_RISING (1 << 5)
39#define AT91_SSC_CKG (1 << 6) /* Receive Clock Gating Selection [AT91SAM9261 only] */
40#define AT91_SSC_CKG_NONE (0 << 6)
41#define AT91_SSC_CKG_RFLOW (1 << 6)
42#define AT91_SSC_CKG_RFHIGH (2 << 6)
43#define AT91_SSC_START (0xf << 8) /* Start Selection */
44#define AT91_SSC_START_CONTINUOUS (0 << 8)
45#define AT91_SSC_START_TX_RX (1 << 8)
46#define AT91_SSC_START_LOW_RF (2 << 8)
47#define AT91_SSC_START_HIGH_RF (3 << 8)
48#define AT91_SSC_START_FALLING_RF (4 << 8)
49#define AT91_SSC_START_RISING_RF (5 << 8)
50#define AT91_SSC_START_LEVEL_RF (6 << 8)
51#define AT91_SSC_START_EDGE_RF (7 << 8)
52#define AT91_SSC_STOP (1 << 12) /* Receive Stop Selection [AT91SAM9261 only] */
53#define AT91_SSC_STTDLY (0xff << 16) /* Start Delay */
54#define AT91_SSC_PERIOD (0xff << 24) /* Period Divider Selection */
55
56#define AT91_SSC_RFMR 0x14 /* Receive Frame Mode Register */
57#define AT91_SSC_DATALEN (0x1f << 0) /* Data Length */
58#define AT91_SSC_LOOP (1 << 5) /* Loop Mode */
59#define AT91_SSC_MSBF (1 << 7) /* Most Significant Bit First */
60#define AT91_SSC_DATNB (0xf << 8) /* Data Number per Frame */
61#define AT91_SSC_FSLEN (0xf << 16) /* Frame Sync Length */
62#define AT91_SSC_FSOS (7 << 20) /* Frame Sync Output Selection */
63#define AT91_SSC_FSOS_NONE (0 << 20)
64#define AT91_SSC_FSOS_NEGATIVE (1 << 20)
65#define AT91_SSC_FSOS_POSITIVE (2 << 20)
66#define AT91_SSC_FSOS_LOW (3 << 20)
67#define AT91_SSC_FSOS_HIGH (4 << 20)
68#define AT91_SSC_FSOS_TOGGLE (5 << 20)
69#define AT91_SSC_FSEDGE (1 << 24) /* Frame Sync Edge Detection */
70#define AT91_SSC_FSEDGE_POSITIVE (0 << 24)
71#define AT91_SSC_FSEDGE_NEGATIVE (1 << 24)
72
73#define AT91_SSC_TCMR 0x18 /* Transmit Clock Mode Register */
74#define AT91_SSC_TFMR 0x1c /* Transmit Fram Mode Register */
75#define AT91_SSC_DATDEF (1 << 5) /* Data Default Value */
76#define AT91_SSC_FSDEN (1 << 23) /* Frame Sync Data Enable */
77
78#define AT91_SSC_RHR 0x20 /* Receive Holding Register */
79#define AT91_SSC_THR 0x24 /* Transmit Holding Register */
80#define AT91_SSC_RSHR 0x30 /* Receive Sync Holding Register */
81#define AT91_SSC_TSHR 0x34 /* Transmit Sync Holding Register */
82
83#define AT91_SSC_RC0R 0x38 /* Receive Compare 0 Register [AT91SAM9261 only] */
84#define AT91_SSC_RC1R 0x3c /* Receive Compare 1 Register [AT91SAM9261 only] */
85
86#define AT91_SSC_SR 0x40 /* Status Register */
87#define AT91_SSC_TXRDY (1 << 0) /* Transmit Ready */
88#define AT91_SSC_TXEMPTY (1 << 1) /* Transmit Empty */
89#define AT91_SSC_ENDTX (1 << 2) /* End of Transmission */
90#define AT91_SSC_TXBUFE (1 << 3) /* Transmit Buffer Empty */
91#define AT91_SSC_RXRDY (1 << 4) /* Receive Ready */
92#define AT91_SSC_OVRUN (1 << 5) /* Receive Overrun */
93#define AT91_SSC_ENDRX (1 << 6) /* End of Reception */
94#define AT91_SSC_RXBUFF (1 << 7) /* Receive Buffer Full */
95#define AT91_SSC_CP0 (1 << 8) /* Compare 0 [AT91SAM9261 only] */
96#define AT91_SSC_CP1 (1 << 9) /* Compare 1 [AT91SAM9261 only] */
97#define AT91_SSC_TXSYN (1 << 10) /* Transmit Sync */
98#define AT91_SSC_RXSYN (1 << 11) /* Receive Sync */
99#define AT91_SSC_TXENA (1 << 16) /* Transmit Enable */
100#define AT91_SSC_RXENA (1 << 17) /* Receive Enable */
101
102#define AT91_SSC_IER 0x44 /* Interrupt Enable Register */
103#define AT91_SSC_IDR 0x48 /* Interrupt Disable Register */
104#define AT91_SSC_IMR 0x4c /* Interrupt Mask Register */
105
106#endif
diff --git a/include/asm-arm/arch-at91/at91_st.h b/include/asm-arm/arch-at91/at91_st.h
deleted file mode 100644
index 30446e2ea772..000000000000
--- a/include/asm-arm/arch-at91/at91_st.h
+++ /dev/null
@@ -1,49 +0,0 @@
1/*
2 * include/asm-arm/arch-at91/at91_st.h
3 *
4 * Copyright (C) 2005 Ivan Kokshaysky
5 * Copyright (C) SAN People
6 *
7 * System Timer (ST) - System peripherals registers.
8 * Based on AT91RM9200 datasheet revision E.
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 */
15
16#ifndef AT91_ST_H
17#define AT91_ST_H
18
19#define AT91_ST_CR (AT91_ST + 0x00) /* Control Register */
20#define AT91_ST_WDRST (1 << 0) /* Watchdog Timer Restart */
21
22#define AT91_ST_PIMR (AT91_ST + 0x04) /* Period Interval Mode Register */
23#define AT91_ST_PIV (0xffff << 0) /* Period Interval Value */
24
25#define AT91_ST_WDMR (AT91_ST + 0x08) /* Watchdog Mode Register */
26#define AT91_ST_WDV (0xffff << 0) /* Watchdog Counter Value */
27#define AT91_ST_RSTEN (1 << 16) /* Reset Enable */
28#define AT91_ST_EXTEN (1 << 17) /* External Signal Assertion Enable */
29
30#define AT91_ST_RTMR (AT91_ST + 0x0c) /* Real-time Mode Register */
31#define AT91_ST_RTPRES (0xffff << 0) /* Real-time Prescalar Value */
32
33#define AT91_ST_SR (AT91_ST + 0x10) /* Status Register */
34#define AT91_ST_PITS (1 << 0) /* Period Interval Timer Status */
35#define AT91_ST_WDOVF (1 << 1) /* Watchdog Overflow */
36#define AT91_ST_RTTINC (1 << 2) /* Real-time Timer Increment */
37#define AT91_ST_ALMS (1 << 3) /* Alarm Status */
38
39#define AT91_ST_IER (AT91_ST + 0x14) /* Interrupt Enable Register */
40#define AT91_ST_IDR (AT91_ST + 0x18) /* Interrupt Disable Register */
41#define AT91_ST_IMR (AT91_ST + 0x1c) /* Interrupt Mask Register */
42
43#define AT91_ST_RTAR (AT91_ST + 0x20) /* Real-time Alarm Register */
44#define AT91_ST_ALMV (0xfffff << 0) /* Alarm Value */
45
46#define AT91_ST_CRTR (AT91_ST + 0x24) /* Current Real-time Register */
47#define AT91_ST_CRTV (0xfffff << 0) /* Current Real-Time Value */
48
49#endif
diff --git a/include/asm-arm/arch-at91/at91_tc.h b/include/asm-arm/arch-at91/at91_tc.h
deleted file mode 100644
index b85d3faeef5c..000000000000
--- a/include/asm-arm/arch-at91/at91_tc.h
+++ /dev/null
@@ -1,146 +0,0 @@
1/*
2 * include/asm-arm/arch-at91/at91_tc.h
3 *
4 * Copyright (C) SAN People
5 *
6 * Timer/Counter Unit (TC) registers.
7 * Based on AT91RM9200 datasheet revision E.
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 */
14
15#ifndef AT91_TC_H
16#define AT91_TC_H
17
18#define AT91_TC_BCR 0xc0 /* TC Block Control Register */
19#define AT91_TC_SYNC (1 << 0) /* Synchro Command */
20
21#define AT91_TC_BMR 0xc4 /* TC Block Mode Register */
22#define AT91_TC_TC0XC0S (3 << 0) /* External Clock Signal 0 Selection */
23#define AT91_TC_TC0XC0S_TCLK0 (0 << 0)
24#define AT91_TC_TC0XC0S_NONE (1 << 0)
25#define AT91_TC_TC0XC0S_TIOA1 (2 << 0)
26#define AT91_TC_TC0XC0S_TIOA2 (3 << 0)
27#define AT91_TC_TC1XC1S (3 << 2) /* External Clock Signal 1 Selection */
28#define AT91_TC_TC1XC1S_TCLK1 (0 << 2)
29#define AT91_TC_TC1XC1S_NONE (1 << 2)
30#define AT91_TC_TC1XC1S_TIOA0 (2 << 2)
31#define AT91_TC_TC1XC1S_TIOA2 (3 << 2)
32#define AT91_TC_TC2XC2S (3 << 4) /* External Clock Signal 2 Selection */
33#define AT91_TC_TC2XC2S_TCLK2 (0 << 4)
34#define AT91_TC_TC2XC2S_NONE (1 << 4)
35#define AT91_TC_TC2XC2S_TIOA0 (2 << 4)
36#define AT91_TC_TC2XC2S_TIOA1 (3 << 4)
37
38
39#define AT91_TC_CCR 0x00 /* Channel Control Register */
40#define AT91_TC_CLKEN (1 << 0) /* Counter Clock Enable Command */
41#define AT91_TC_CLKDIS (1 << 1) /* Counter CLock Disable Command */
42#define AT91_TC_SWTRG (1 << 2) /* Software Trigger Command */
43
44#define AT91_TC_CMR 0x04 /* Channel Mode Register */
45#define AT91_TC_TCCLKS (7 << 0) /* Capture/Waveform Mode: Clock Selection */
46#define AT91_TC_TIMER_CLOCK1 (0 << 0)
47#define AT91_TC_TIMER_CLOCK2 (1 << 0)
48#define AT91_TC_TIMER_CLOCK3 (2 << 0)
49#define AT91_TC_TIMER_CLOCK4 (3 << 0)
50#define AT91_TC_TIMER_CLOCK5 (4 << 0)
51#define AT91_TC_XC0 (5 << 0)
52#define AT91_TC_XC1 (6 << 0)
53#define AT91_TC_XC2 (7 << 0)
54#define AT91_TC_CLKI (1 << 3) /* Capture/Waveform Mode: Clock Invert */
55#define AT91_TC_BURST (3 << 4) /* Capture/Waveform Mode: Burst Signal Selection */
56#define AT91_TC_LDBSTOP (1 << 6) /* Capture Mode: Counter Clock Stopped with TB Loading */
57#define AT91_TC_LDBDIS (1 << 7) /* Capture Mode: Counter Clock Disable with RB Loading */
58#define AT91_TC_ETRGEDG (3 << 8) /* Capture Mode: External Trigger Edge Selection */
59#define AT91_TC_ABETRG (1 << 10) /* Capture Mode: TIOA or TIOB External Trigger Selection */
60#define AT91_TC_CPCTRG (1 << 14) /* Capture Mode: RC Compare Trigger Enable */
61#define AT91_TC_WAVE (1 << 15) /* Capture/Waveform mode */
62#define AT91_TC_LDRA (3 << 16) /* Capture Mode: RA Loading Selection */
63#define AT91_TC_LDRB (3 << 18) /* Capture Mode: RB Loading Selection */
64
65#define AT91_TC_CPCSTOP (1 << 6) /* Waveform Mode: Counter Clock Stopped with RC Compare */
66#define AT91_TC_CPCDIS (1 << 7) /* Waveform Mode: Counter Clock Disable with RC Compare */
67#define AT91_TC_EEVTEDG (3 << 8) /* Waveform Mode: External Event Edge Selection */
68#define AT91_TC_EEVTEDG_NONE (0 << 8)
69#define AT91_TC_EEVTEDG_RISING (1 << 8)
70#define AT91_TC_EEVTEDG_FALLING (2 << 8)
71#define AT91_TC_EEVTEDG_BOTH (3 << 8)
72#define AT91_TC_EEVT (3 << 10) /* Waveform Mode: External Event Selection */
73#define AT91_TC_EEVT_TIOB (0 << 10)
74#define AT91_TC_EEVT_XC0 (1 << 10)
75#define AT91_TC_EEVT_XC1 (2 << 10)
76#define AT91_TC_EEVT_XC2 (3 << 10)
77#define AT91_TC_ENETRG (1 << 12) /* Waveform Mode: External Event Trigger Enable */
78#define AT91_TC_WAVESEL (3 << 13) /* Waveform Mode: Waveform Selection */
79#define AT91_TC_WAVESEL_UP (0 << 13)
80#define AT91_TC_WAVESEL_UP_AUTO (2 << 13)
81#define AT91_TC_WAVESEL_UPDOWN (1 << 13)
82#define AT91_TC_WAVESEL_UPDOWN_AUTO (3 << 13)
83#define AT91_TC_ACPA (3 << 16) /* Waveform Mode: RA Compare Effect on TIOA */
84#define AT91_TC_ACPA_NONE (0 << 16)
85#define AT91_TC_ACPA_SET (1 << 16)
86#define AT91_TC_ACPA_CLEAR (2 << 16)
87#define AT91_TC_ACPA_TOGGLE (3 << 16)
88#define AT91_TC_ACPC (3 << 18) /* Waveform Mode: RC Compre Effect on TIOA */
89#define AT91_TC_ACPC_NONE (0 << 18)
90#define AT91_TC_ACPC_SET (1 << 18)
91#define AT91_TC_ACPC_CLEAR (2 << 18)
92#define AT91_TC_ACPC_TOGGLE (3 << 18)
93#define AT91_TC_AEEVT (3 << 20) /* Waveform Mode: External Event Effect on TIOA */
94#define AT91_TC_AEEVT_NONE (0 << 20)
95#define AT91_TC_AEEVT_SET (1 << 20)
96#define AT91_TC_AEEVT_CLEAR (2 << 20)
97#define AT91_TC_AEEVT_TOGGLE (3 << 20)
98#define AT91_TC_ASWTRG (3 << 22) /* Waveform Mode: Software Trigger Effect on TIOA */
99#define AT91_TC_ASWTRG_NONE (0 << 22)
100#define AT91_TC_ASWTRG_SET (1 << 22)
101#define AT91_TC_ASWTRG_CLEAR (2 << 22)
102#define AT91_TC_ASWTRG_TOGGLE (3 << 22)
103#define AT91_TC_BCPB (3 << 24) /* Waveform Mode: RB Compare Effect on TIOB */
104#define AT91_TC_BCPB_NONE (0 << 24)
105#define AT91_TC_BCPB_SET (1 << 24)
106#define AT91_TC_BCPB_CLEAR (2 << 24)
107#define AT91_TC_BCPB_TOGGLE (3 << 24)
108#define AT91_TC_BCPC (3 << 26) /* Waveform Mode: RC Compare Effect on TIOB */
109#define AT91_TC_BCPC_NONE (0 << 26)
110#define AT91_TC_BCPC_SET (1 << 26)
111#define AT91_TC_BCPC_CLEAR (2 << 26)
112#define AT91_TC_BCPC_TOGGLE (3 << 26)
113#define AT91_TC_BEEVT (3 << 28) /* Waveform Mode: External Event Effect on TIOB */
114#define AT91_TC_BEEVT_NONE (0 << 28)
115#define AT91_TC_BEEVT_SET (1 << 28)
116#define AT91_TC_BEEVT_CLEAR (2 << 28)
117#define AT91_TC_BEEVT_TOGGLE (3 << 28)
118#define AT91_TC_BSWTRG (3 << 30) /* Waveform Mode: Software Trigger Effect on TIOB */
119#define AT91_TC_BSWTRG_NONE (0 << 30)
120#define AT91_TC_BSWTRG_SET (1 << 30)
121#define AT91_TC_BSWTRG_CLEAR (2 << 30)
122#define AT91_TC_BSWTRG_TOGGLE (3 << 30)
123
124#define AT91_TC_CV 0x10 /* Counter Value */
125#define AT91_TC_RA 0x14 /* Register A */
126#define AT91_TC_RB 0x18 /* Register B */
127#define AT91_TC_RC 0x1c /* Register C */
128
129#define AT91_TC_SR 0x20 /* Status Register */
130#define AT91_TC_COVFS (1 << 0) /* Counter Overflow Status */
131#define AT91_TC_LOVRS (1 << 1) /* Load Overrun Status */
132#define AT91_TC_CPAS (1 << 2) /* RA Compare Status */
133#define AT91_TC_CPBS (1 << 3) /* RB Compare Status */
134#define AT91_TC_CPCS (1 << 4) /* RC Compare Status */
135#define AT91_TC_LDRAS (1 << 5) /* RA Loading Status */
136#define AT91_TC_LDRBS (1 << 6) /* RB Loading Status */
137#define AT91_TC_ETRGS (1 << 7) /* External Trigger Status */
138#define AT91_TC_CLKSTA (1 << 16) /* Clock Enabling Status */
139#define AT91_TC_MTIOA (1 << 17) /* TIOA Mirror */
140#define AT91_TC_MTIOB (1 << 18) /* TIOB Mirror */
141
142#define AT91_TC_IER 0x24 /* Interrupt Enable Register */
143#define AT91_TC_IDR 0x28 /* Interrupt Disable Register */
144#define AT91_TC_IMR 0x2c /* Interrupt Mask Register */
145
146#endif
diff --git a/include/asm-arm/arch-at91/at91_twi.h b/include/asm-arm/arch-at91/at91_twi.h
deleted file mode 100644
index f9f2e3cd95c5..000000000000
--- a/include/asm-arm/arch-at91/at91_twi.h
+++ /dev/null
@@ -1,68 +0,0 @@
1/*
2 * include/asm-arm/arch-at91/at91_twi.h
3 *
4 * Copyright (C) 2005 Ivan Kokshaysky
5 * Copyright (C) SAN People
6 *
7 * Two-wire Interface (TWI) registers.
8 * Based on AT91RM9200 datasheet revision E.
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 */
15
16#ifndef AT91_TWI_H
17#define AT91_TWI_H
18
19#define AT91_TWI_CR 0x00 /* Control Register */
20#define AT91_TWI_START (1 << 0) /* Send a Start Condition */
21#define AT91_TWI_STOP (1 << 1) /* Send a Stop Condition */
22#define AT91_TWI_MSEN (1 << 2) /* Master Transfer Enable */
23#define AT91_TWI_MSDIS (1 << 3) /* Master Transfer Disable */
24#define AT91_TWI_SVEN (1 << 4) /* Slave Transfer Enable [SAM9260 only] */
25#define AT91_TWI_SVDIS (1 << 5) /* Slave Transfer Disable [SAM9260 only] */
26#define AT91_TWI_SWRST (1 << 7) /* Software Reset */
27
28#define AT91_TWI_MMR 0x04 /* Master Mode Register */
29#define AT91_TWI_IADRSZ (3 << 8) /* Internal Device Address Size */
30#define AT91_TWI_IADRSZ_NO (0 << 8)
31#define AT91_TWI_IADRSZ_1 (1 << 8)
32#define AT91_TWI_IADRSZ_2 (2 << 8)
33#define AT91_TWI_IADRSZ_3 (3 << 8)
34#define AT91_TWI_MREAD (1 << 12) /* Master Read Direction */
35#define AT91_TWI_DADR (0x7f << 16) /* Device Address */
36
37#define AT91_TWI_SMR 0x08 /* Slave Mode Register [SAM9260 only] */
38#define AT91_TWI_SADR (0x7f << 16) /* Slave Address */
39
40#define AT91_TWI_IADR 0x0c /* Internal Address Register */
41
42#define AT91_TWI_CWGR 0x10 /* Clock Waveform Generator Register */
43#define AT91_TWI_CLDIV (0xff << 0) /* Clock Low Divisor */
44#define AT91_TWI_CHDIV (0xff << 8) /* Clock High Divisor */
45#define AT91_TWI_CKDIV (7 << 16) /* Clock Divider */
46
47#define AT91_TWI_SR 0x20 /* Status Register */
48#define AT91_TWI_TXCOMP (1 << 0) /* Transmission Complete */
49#define AT91_TWI_RXRDY (1 << 1) /* Receive Holding Register Ready */
50#define AT91_TWI_TXRDY (1 << 2) /* Transmit Holding Register Ready */
51#define AT91_TWI_SVREAD (1 << 3) /* Slave Read [SAM9260 only] */
52#define AT91_TWI_SVACC (1 << 4) /* Slave Access [SAM9260 only] */
53#define AT91_TWI_GACC (1 << 5) /* General Call Access [SAM9260 only] */
54#define AT91_TWI_OVRE (1 << 6) /* Overrun Error [AT91RM9200 only] */
55#define AT91_TWI_UNRE (1 << 7) /* Underrun Error [AT91RM9200 only] */
56#define AT91_TWI_NACK (1 << 8) /* Not Acknowledged */
57#define AT91_TWI_ARBLST (1 << 9) /* Arbitration Lost [SAM9260 only] */
58#define AT91_TWI_SCLWS (1 << 10) /* Clock Wait State [SAM9260 only] */
59#define AT91_TWI_EOSACC (1 << 11) /* End of Slave Address [SAM9260 only] */
60
61#define AT91_TWI_IER 0x24 /* Interrupt Enable Register */
62#define AT91_TWI_IDR 0x28 /* Interrupt Disable Register */
63#define AT91_TWI_IMR 0x2c /* Interrupt Mask Register */
64#define AT91_TWI_RHR 0x30 /* Receive Holding Register */
65#define AT91_TWI_THR 0x34 /* Transmit Holding Register */
66
67#endif
68
diff --git a/include/asm-arm/arch-at91/at91_wdt.h b/include/asm-arm/arch-at91/at91_wdt.h
deleted file mode 100644
index 1014e9bf181f..000000000000
--- a/include/asm-arm/arch-at91/at91_wdt.h
+++ /dev/null
@@ -1,34 +0,0 @@
1/*
2 * include/asm-arm/arch-at91/at91_wdt.h
3 *
4 * Watchdog Timer (WDT) - System peripherals regsters.
5 * Based on AT91SAM9261 datasheet revision D.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 */
12
13#ifndef AT91_WDT_H
14#define AT91_WDT_H
15
16#define AT91_WDT_CR (AT91_WDT + 0x00) /* Watchdog Control Register */
17#define AT91_WDT_WDRSTT (1 << 0) /* Restart */
18#define AT91_WDT_KEY (0xa5 << 24) /* KEY Password */
19
20#define AT91_WDT_MR (AT91_WDT + 0x04) /* Watchdog Mode Register */
21#define AT91_WDT_WDV (0xfff << 0) /* Counter Value */
22#define AT91_WDT_WDFIEN (1 << 12) /* Fault Interrupt Enable */
23#define AT91_WDT_WDRSTEN (1 << 13) /* Reset Processor */
24#define AT91_WDT_WDRPROC (1 << 14) /* Timer Restart */
25#define AT91_WDT_WDDIS (1 << 15) /* Watchdog Disable */
26#define AT91_WDT_WDD (0xfff << 16) /* Delta Value */
27#define AT91_WDT_WDDBGHLT (1 << 28) /* Debug Halt */
28#define AT91_WDT_WDIDLEHLT (1 << 29) /* Idle Halt */
29
30#define AT91_WDT_SR (AT91_WDT + 0x08) /* Watchdog Status Register */
31#define AT91_WDT_WDUNF (1 << 0) /* Watchdog Underflow */
32#define AT91_WDT_WDERR (1 << 1) /* Watchdog Error */
33
34#endif
diff --git a/include/asm-arm/arch-at91/at91cap9.h b/include/asm-arm/arch-at91/at91cap9.h
deleted file mode 100644
index 6f14d9053ac7..000000000000
--- a/include/asm-arm/arch-at91/at91cap9.h
+++ /dev/null
@@ -1,126 +0,0 @@
1/*
2 * include/asm-arm/arch-at91/at91cap9.h
3 *
4 * Copyright (C) 2007 Stelian Pop <stelian.pop@leadtechdesign.com>
5 * Copyright (C) 2007 Lead Tech Design <www.leadtechdesign.com>
6 * Copyright (C) 2007 Atmel Corporation.
7 *
8 * Common definitions.
9 * Based on AT91CAP9 datasheet revision B (Preliminary).
10 *
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
15 */
16
17#ifndef AT91CAP9_H
18#define AT91CAP9_H
19
20/*
21 * Peripheral identifiers/interrupts.
22 */
23#define AT91_ID_FIQ 0 /* Advanced Interrupt Controller (FIQ) */
24#define AT91_ID_SYS 1 /* System Peripherals */
25#define AT91CAP9_ID_PIOABCD 2 /* Parallel IO Controller A, B, C and D */
26#define AT91CAP9_ID_MPB0 3 /* MP Block Peripheral 0 */
27#define AT91CAP9_ID_MPB1 4 /* MP Block Peripheral 1 */
28#define AT91CAP9_ID_MPB2 5 /* MP Block Peripheral 2 */
29#define AT91CAP9_ID_MPB3 6 /* MP Block Peripheral 3 */
30#define AT91CAP9_ID_MPB4 7 /* MP Block Peripheral 4 */
31#define AT91CAP9_ID_US0 8 /* USART 0 */
32#define AT91CAP9_ID_US1 9 /* USART 1 */
33#define AT91CAP9_ID_US2 10 /* USART 2 */
34#define AT91CAP9_ID_MCI0 11 /* Multimedia Card Interface 0 */
35#define AT91CAP9_ID_MCI1 12 /* Multimedia Card Interface 1 */
36#define AT91CAP9_ID_CAN 13 /* CAN */
37#define AT91CAP9_ID_TWI 14 /* Two-Wire Interface */
38#define AT91CAP9_ID_SPI0 15 /* Serial Peripheral Interface 0 */
39#define AT91CAP9_ID_SPI1 16 /* Serial Peripheral Interface 0 */
40#define AT91CAP9_ID_SSC0 17 /* Serial Synchronous Controller 0 */
41#define AT91CAP9_ID_SSC1 18 /* Serial Synchronous Controller 1 */
42#define AT91CAP9_ID_AC97C 19 /* AC97 Controller */
43#define AT91CAP9_ID_TCB 20 /* Timer Counter 0, 1 and 2 */
44#define AT91CAP9_ID_PWMC 21 /* Pulse Width Modulation Controller */
45#define AT91CAP9_ID_EMAC 22 /* Ethernet */
46#define AT91CAP9_ID_AESTDES 23 /* Advanced Encryption Standard, Triple DES */
47#define AT91CAP9_ID_ADC 24 /* Analog-to-Digital Converter */
48#define AT91CAP9_ID_ISI 25 /* Image Sensor Interface */
49#define AT91CAP9_ID_LCDC 26 /* LCD Controller */
50#define AT91CAP9_ID_DMA 27 /* DMA Controller */
51#define AT91CAP9_ID_UDPHS 28 /* USB High Speed Device Port */
52#define AT91CAP9_ID_UHP 29 /* USB Host Port */
53#define AT91CAP9_ID_IRQ0 30 /* Advanced Interrupt Controller (IRQ0) */
54#define AT91CAP9_ID_IRQ1 31 /* Advanced Interrupt Controller (IRQ1) */
55
56/*
57 * User Peripheral physical base addresses.
58 */
59#define AT91CAP9_BASE_UDPHS 0xfff78000
60#define AT91CAP9_BASE_TCB0 0xfff7c000
61#define AT91CAP9_BASE_TC0 0xfff7c000
62#define AT91CAP9_BASE_TC1 0xfff7c040
63#define AT91CAP9_BASE_TC2 0xfff7c080
64#define AT91CAP9_BASE_MCI0 0xfff80000
65#define AT91CAP9_BASE_MCI1 0xfff84000
66#define AT91CAP9_BASE_TWI 0xfff88000
67#define AT91CAP9_BASE_US0 0xfff8c000
68#define AT91CAP9_BASE_US1 0xfff90000
69#define AT91CAP9_BASE_US2 0xfff94000
70#define AT91CAP9_BASE_SSC0 0xfff98000
71#define AT91CAP9_BASE_SSC1 0xfff9c000
72#define AT91CAP9_BASE_AC97C 0xfffa0000
73#define AT91CAP9_BASE_SPI0 0xfffa4000
74#define AT91CAP9_BASE_SPI1 0xfffa8000
75#define AT91CAP9_BASE_CAN 0xfffac000
76#define AT91CAP9_BASE_PWMC 0xfffb8000
77#define AT91CAP9_BASE_EMAC 0xfffbc000
78#define AT91CAP9_BASE_ADC 0xfffc0000
79#define AT91CAP9_BASE_ISI 0xfffc4000
80#define AT91_BASE_SYS 0xffffe200
81
82/*
83 * System Peripherals (offset from AT91_BASE_SYS)
84 */
85#define AT91_ECC (0xffffe200 - AT91_BASE_SYS)
86#define AT91_BCRAMC (0xffffe400 - AT91_BASE_SYS)
87#define AT91_DDRSDRC (0xffffe600 - AT91_BASE_SYS)
88#define AT91_SMC (0xffffe800 - AT91_BASE_SYS)
89#define AT91_MATRIX (0xffffea00 - AT91_BASE_SYS)
90#define AT91_CCFG (0xffffeb10 - AT91_BASE_SYS)
91#define AT91_DMA (0xffffec00 - AT91_BASE_SYS)
92#define AT91_DBGU (0xffffee00 - AT91_BASE_SYS)
93#define AT91_AIC (0xfffff000 - AT91_BASE_SYS)
94#define AT91_PIOA (0xfffff200 - AT91_BASE_SYS)
95#define AT91_PIOB (0xfffff400 - AT91_BASE_SYS)
96#define AT91_PIOC (0xfffff600 - AT91_BASE_SYS)
97#define AT91_PIOD (0xfffff800 - AT91_BASE_SYS)
98#define AT91_PMC (0xfffffc00 - AT91_BASE_SYS)
99#define AT91_RSTC (0xfffffd00 - AT91_BASE_SYS)
100#define AT91_SHDWC (0xfffffd10 - AT91_BASE_SYS)
101#define AT91_RTT (0xfffffd20 - AT91_BASE_SYS)
102#define AT91_PIT (0xfffffd30 - AT91_BASE_SYS)
103#define AT91_WDT (0xfffffd40 - AT91_BASE_SYS)
104#define AT91_GPBR (0xfffffd50 - AT91_BASE_SYS)
105
106#define AT91_USART0 AT91CAP9_BASE_US0
107#define AT91_USART1 AT91CAP9_BASE_US1
108#define AT91_USART2 AT91CAP9_BASE_US2
109
110
111/*
112 * Internal Memory.
113 */
114#define AT91CAP9_SRAM_BASE 0x00100000 /* Internal SRAM base address */
115#define AT91CAP9_SRAM_SIZE (32 * SZ_1K) /* Internal SRAM size (32Kb) */
116
117#define AT91CAP9_ROM_BASE 0x00400000 /* Internal ROM base address */
118#define AT91CAP9_ROM_SIZE (32 * SZ_1K) /* Internal ROM size (32Kb) */
119
120#define AT91CAP9_LCDC_BASE 0x00500000 /* LCD Controller */
121#define AT91CAP9_UDPHS_FIFO 0x00600000 /* USB High Speed Device Port */
122#define AT91CAP9_UHP_BASE 0x00700000 /* USB Host controller */
123
124#define CONFIG_DRAM_BASE AT91_CHIPSELECT_6
125
126#endif
diff --git a/include/asm-arm/arch-at91/at91cap9_ddrsdr.h b/include/asm-arm/arch-at91/at91cap9_ddrsdr.h
deleted file mode 100644
index efdb23af1ee4..000000000000
--- a/include/asm-arm/arch-at91/at91cap9_ddrsdr.h
+++ /dev/null
@@ -1,100 +0,0 @@
1/*
2 * include/asm-arm/arch-at91/at91cap9_ddrsdr.h
3 *
4 * DDR/SDR Controller (DDRSDRC) - System peripherals registers.
5 * Based on AT91CAP9 datasheet revision B.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 */
12
13#ifndef AT91CAP9_DDRSDR_H
14#define AT91CAP9_DDRSDR_H
15
16#define AT91_DDRSDRC_MR (AT91_DDRSDRC + 0x00) /* Mode Register */
17#define AT91_DDRSDRC_MODE (0xf << 0) /* Command Mode */
18#define AT91_DDRSDRC_MODE_NORMAL 0
19#define AT91_DDRSDRC_MODE_NOP 1
20#define AT91_DDRSDRC_MODE_PRECHARGE 2
21#define AT91_DDRSDRC_MODE_LMR 3
22#define AT91_DDRSDRC_MODE_REFRESH 4
23#define AT91_DDRSDRC_MODE_EXT_LMR 5
24#define AT91_DDRSDRC_MODE_DEEP 6
25
26#define AT91_DDRSDRC_RTR (AT91_DDRSDRC + 0x04) /* Refresh Timer Register */
27#define AT91_DDRSDRC_COUNT (0xfff << 0) /* Refresh Timer Counter */
28
29#define AT91_DDRSDRC_CR (AT91_DDRSDRC + 0x08) /* Configuration Register */
30#define AT91_DDRSDRC_NC (3 << 0) /* Number of Column Bits */
31#define AT91_DDRSDRC_NC_SDR8 (0 << 0)
32#define AT91_DDRSDRC_NC_SDR9 (1 << 0)
33#define AT91_DDRSDRC_NC_SDR10 (2 << 0)
34#define AT91_DDRSDRC_NC_SDR11 (3 << 0)
35#define AT91_DDRSDRC_NC_DDR9 (0 << 0)
36#define AT91_DDRSDRC_NC_DDR10 (1 << 0)
37#define AT91_DDRSDRC_NC_DDR11 (2 << 0)
38#define AT91_DDRSDRC_NC_DDR12 (3 << 0)
39#define AT91_DDRSDRC_NR (3 << 2) /* Number of Row Bits */
40#define AT91_DDRSDRC_NR_11 (0 << 2)
41#define AT91_DDRSDRC_NR_12 (1 << 2)
42#define AT91_DDRSDRC_NR_13 (2 << 2)
43#define AT91_DDRSDRC_CAS (7 << 4) /* CAS Latency */
44#define AT91_DDRSDRC_CAS_2 (2 << 4)
45#define AT91_DDRSDRC_CAS_3 (3 << 4)
46#define AT91_DDRSDRC_CAS_25 (6 << 4)
47#define AT91_DDRSDRC_DLL (1 << 7) /* Reset DLL */
48#define AT91_DDRSDRC_DICDS (1 << 8) /* Output impedance control */
49
50#define AT91_DDRSDRC_T0PR (AT91_DDRSDRC + 0x0C) /* Timing 0 Register */
51#define AT91_DDRSDRC_TRAS (0xf << 0) /* Active to Precharge delay */
52#define AT91_DDRSDRC_TRCD (0xf << 4) /* Row to Column delay */
53#define AT91_DDRSDRC_TWR (0xf << 8) /* Write recovery delay */
54#define AT91_DDRSDRC_TRC (0xf << 12) /* Row cycle delay */
55#define AT91_DDRSDRC_TRP (0xf << 16) /* Row precharge delay */
56#define AT91_DDRSDRC_TRRD (0xf << 20) /* Active BankA to BankB */
57#define AT91_DDRSDRC_TWTR (1 << 24) /* Internal Write to Read delay */
58#define AT91_DDRSDRC_TMRD (0xf << 28) /* Load mode to active/refresh delay */
59
60#define AT91_DDRSDRC_T1PR (AT91_DDRSDRC + 0x10) /* Timing 1 Register */
61#define AT91_DDRSDRC_TRFC (0x1f << 0) /* Row Cycle Delay */
62#define AT91_DDRSDRC_TXSNR (0xff << 8) /* Exit self-refresh to non-read */
63#define AT91_DDRSDRC_TXSRD (0xff << 16) /* Exit self-refresh to read */
64#define AT91_DDRSDRC_TXP (0xf << 24) /* Exit power-down delay */
65
66#define AT91_DDRSDRC_LPR (AT91_DDRSDRC + 0x18) /* Low Power Register */
67#define AT91_DDRSDRC_LPCB (3 << 0) /* Low-power Configurations */
68#define AT91_DDRSDRC_LPCB_DISABLE 0
69#define AT91_DDRSDRC_LPCB_SELF_REFRESH 1
70#define AT91_DDRSDRC_LPCB_POWER_DOWN 2
71#define AT91_DDRSDRC_LPCB_DEEP_POWER_DOWN 3
72#define AT91_DDRSDRC_CLKFR (1 << 2) /* Clock Frozen */
73#define AT91_DDRSDRC_PASR (7 << 4) /* Partial Array Self Refresh */
74#define AT91_DDRSDRC_TCSR (3 << 8) /* Temperature Compensated Self Refresh */
75#define AT91_DDRSDRC_DS (3 << 10) /* Drive Strength */
76#define AT91_DDRSDRC_TIMEOUT (3 << 12) /* Time to define when Low Power Mode is enabled */
77#define AT91_DDRSDRC_TIMEOUT_0_CLK_CYCLES (0 << 12)
78#define AT91_DDRSDRC_TIMEOUT_64_CLK_CYCLES (1 << 12)
79#define AT91_DDRSDRC_TIMEOUT_128_CLK_CYCLES (2 << 12)
80
81#define AT91_DDRSDRC_MDR (AT91_DDRSDRC + 0x1C) /* Memory Device Register */
82#define AT91_DDRSDRC_MD (3 << 0) /* Memory Device Type */
83#define AT91_DDRSDRC_MD_SDR 0
84#define AT91_DDRSDRC_MD_LOW_POWER_SDR 1
85#define AT91_DDRSDRC_MD_DDR 2
86#define AT91_DDRSDRC_MD_LOW_POWER_DDR 3
87
88#define AT91_DDRSDRC_DLLR (AT91_DDRSDRC + 0x20) /* DLL Information Register */
89#define AT91_DDRSDRC_MDINC (1 << 0) /* Master Delay increment */
90#define AT91_DDRSDRC_MDDEC (1 << 1) /* Master Delay decrement */
91#define AT91_DDRSDRC_MDOVF (1 << 2) /* Master Delay Overflow */
92#define AT91_DDRSDRC_SDCOVF (1 << 3) /* Slave Delay Correction Overflow */
93#define AT91_DDRSDRC_SDCUDF (1 << 4) /* Slave Delay Correction Underflow */
94#define AT91_DDRSDRC_SDERF (1 << 5) /* Slave Delay Correction error */
95#define AT91_DDRSDRC_MDVAL (0xff << 8) /* Master Delay value */
96#define AT91_DDRSDRC_SDVAL (0xff << 16) /* Slave Delay value */
97#define AT91_DDRSDRC_SDCVAL (0xff << 24) /* Slave Delay Correction value */
98
99
100#endif
diff --git a/include/asm-arm/arch-at91/at91cap9_matrix.h b/include/asm-arm/arch-at91/at91cap9_matrix.h
deleted file mode 100644
index ddbd4873c842..000000000000
--- a/include/asm-arm/arch-at91/at91cap9_matrix.h
+++ /dev/null
@@ -1,137 +0,0 @@
1/*
2 * include/asm-arm/arch-at91/at91cap9_matrix.h
3 *
4 * Copyright (C) 2007 Stelian Pop <stelian.pop@leadtechdesign.com>
5 * Copyright (C) 2007 Lead Tech Design <www.leadtechdesign.com>
6 * Copyright (C) 2006 Atmel Corporation.
7 *
8 * Memory Controllers (MATRIX, EBI) - System peripherals registers.
9 * Based on AT91CAP9 datasheet revision B (Preliminary).
10 *
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
15 */
16
17#ifndef AT91CAP9_MATRIX_H
18#define AT91CAP9_MATRIX_H
19
20#define AT91_MATRIX_MCFG0 (AT91_MATRIX + 0x00) /* Master Configuration Register 0 */
21#define AT91_MATRIX_MCFG1 (AT91_MATRIX + 0x04) /* Master Configuration Register 1 */
22#define AT91_MATRIX_MCFG2 (AT91_MATRIX + 0x08) /* Master Configuration Register 2 */
23#define AT91_MATRIX_MCFG3 (AT91_MATRIX + 0x0C) /* Master Configuration Register 3 */
24#define AT91_MATRIX_MCFG4 (AT91_MATRIX + 0x10) /* Master Configuration Register 4 */
25#define AT91_MATRIX_MCFG5 (AT91_MATRIX + 0x14) /* Master Configuration Register 5 */
26#define AT91_MATRIX_MCFG6 (AT91_MATRIX + 0x18) /* Master Configuration Register 6 */
27#define AT91_MATRIX_MCFG7 (AT91_MATRIX + 0x1C) /* Master Configuration Register 7 */
28#define AT91_MATRIX_MCFG8 (AT91_MATRIX + 0x20) /* Master Configuration Register 8 */
29#define AT91_MATRIX_MCFG9 (AT91_MATRIX + 0x24) /* Master Configuration Register 9 */
30#define AT91_MATRIX_MCFG10 (AT91_MATRIX + 0x28) /* Master Configuration Register 10 */
31#define AT91_MATRIX_MCFG11 (AT91_MATRIX + 0x2C) /* Master Configuration Register 11 */
32#define AT91_MATRIX_ULBT (7 << 0) /* Undefined Length Burst Type */
33#define AT91_MATRIX_ULBT_INFINITE (0 << 0)
34#define AT91_MATRIX_ULBT_SINGLE (1 << 0)
35#define AT91_MATRIX_ULBT_FOUR (2 << 0)
36#define AT91_MATRIX_ULBT_EIGHT (3 << 0)
37#define AT91_MATRIX_ULBT_SIXTEEN (4 << 0)
38
39#define AT91_MATRIX_SCFG0 (AT91_MATRIX + 0x40) /* Slave Configuration Register 0 */
40#define AT91_MATRIX_SCFG1 (AT91_MATRIX + 0x44) /* Slave Configuration Register 1 */
41#define AT91_MATRIX_SCFG2 (AT91_MATRIX + 0x48) /* Slave Configuration Register 2 */
42#define AT91_MATRIX_SCFG3 (AT91_MATRIX + 0x4C) /* Slave Configuration Register 3 */
43#define AT91_MATRIX_SCFG4 (AT91_MATRIX + 0x50) /* Slave Configuration Register 4 */
44#define AT91_MATRIX_SCFG5 (AT91_MATRIX + 0x54) /* Slave Configuration Register 5 */
45#define AT91_MATRIX_SCFG6 (AT91_MATRIX + 0x58) /* Slave Configuration Register 6 */
46#define AT91_MATRIX_SCFG7 (AT91_MATRIX + 0x5C) /* Slave Configuration Register 7 */
47#define AT91_MATRIX_SCFG8 (AT91_MATRIX + 0x60) /* Slave Configuration Register 8 */
48#define AT91_MATRIX_SCFG9 (AT91_MATRIX + 0x64) /* Slave Configuration Register 9 */
49#define AT91_MATRIX_SLOT_CYCLE (0xff << 0) /* Maximum Number of Allowed Cycles for a Burst */
50#define AT91_MATRIX_DEFMSTR_TYPE (3 << 16) /* Default Master Type */
51#define AT91_MATRIX_DEFMSTR_TYPE_NONE (0 << 16)
52#define AT91_MATRIX_DEFMSTR_TYPE_LAST (1 << 16)
53#define AT91_MATRIX_DEFMSTR_TYPE_FIXED (2 << 16)
54#define AT91_MATRIX_FIXED_DEFMSTR (0xf << 18) /* Fixed Index of Default Master */
55#define AT91_MATRIX_ARBT (3 << 24) /* Arbitration Type */
56#define AT91_MATRIX_ARBT_ROUND_ROBIN (0 << 24)
57#define AT91_MATRIX_ARBT_FIXED_PRIORITY (1 << 24)
58
59#define AT91_MATRIX_PRAS0 (AT91_MATRIX + 0x80) /* Priority Register A for Slave 0 */
60#define AT91_MATRIX_PRBS0 (AT91_MATRIX + 0x84) /* Priority Register B for Slave 0 */
61#define AT91_MATRIX_PRAS1 (AT91_MATRIX + 0x88) /* Priority Register A for Slave 1 */
62#define AT91_MATRIX_PRBS1 (AT91_MATRIX + 0x8C) /* Priority Register B for Slave 1 */
63#define AT91_MATRIX_PRAS2 (AT91_MATRIX + 0x90) /* Priority Register A for Slave 2 */
64#define AT91_MATRIX_PRBS2 (AT91_MATRIX + 0x94) /* Priority Register B for Slave 2 */
65#define AT91_MATRIX_PRAS3 (AT91_MATRIX + 0x98) /* Priority Register A for Slave 3 */
66#define AT91_MATRIX_PRBS3 (AT91_MATRIX + 0x9C) /* Priority Register B for Slave 3 */
67#define AT91_MATRIX_PRAS4 (AT91_MATRIX + 0xA0) /* Priority Register A for Slave 4 */
68#define AT91_MATRIX_PRBS4 (AT91_MATRIX + 0xA4) /* Priority Register B for Slave 4 */
69#define AT91_MATRIX_PRAS5 (AT91_MATRIX + 0xA8) /* Priority Register A for Slave 5 */
70#define AT91_MATRIX_PRBS5 (AT91_MATRIX + 0xAC) /* Priority Register B for Slave 5 */
71#define AT91_MATRIX_PRAS6 (AT91_MATRIX + 0xB0) /* Priority Register A for Slave 6 */
72#define AT91_MATRIX_PRBS6 (AT91_MATRIX + 0xB4) /* Priority Register B for Slave 6 */
73#define AT91_MATRIX_PRAS7 (AT91_MATRIX + 0xB8) /* Priority Register A for Slave 7 */
74#define AT91_MATRIX_PRBS7 (AT91_MATRIX + 0xBC) /* Priority Register B for Slave 7 */
75#define AT91_MATRIX_PRAS8 (AT91_MATRIX + 0xC0) /* Priority Register A for Slave 8 */
76#define AT91_MATRIX_PRBS8 (AT91_MATRIX + 0xC4) /* Priority Register B for Slave 8 */
77#define AT91_MATRIX_PRAS9 (AT91_MATRIX + 0xC8) /* Priority Register A for Slave 9 */
78#define AT91_MATRIX_PRBS9 (AT91_MATRIX + 0xCC) /* Priority Register B for Slave 9 */
79#define AT91_MATRIX_M0PR (3 << 0) /* Master 0 Priority */
80#define AT91_MATRIX_M1PR (3 << 4) /* Master 1 Priority */
81#define AT91_MATRIX_M2PR (3 << 8) /* Master 2 Priority */
82#define AT91_MATRIX_M3PR (3 << 12) /* Master 3 Priority */
83#define AT91_MATRIX_M4PR (3 << 16) /* Master 4 Priority */
84#define AT91_MATRIX_M5PR (3 << 20) /* Master 5 Priority */
85#define AT91_MATRIX_M6PR (3 << 24) /* Master 6 Priority */
86#define AT91_MATRIX_M7PR (3 << 28) /* Master 7 Priority */
87#define AT91_MATRIX_M8PR (3 << 0) /* Master 8 Priority (in Register B) */
88#define AT91_MATRIX_M9PR (3 << 4) /* Master 9 Priority (in Register B) */
89#define AT91_MATRIX_M10PR (3 << 8) /* Master 10 Priority (in Register B) */
90#define AT91_MATRIX_M11PR (3 << 12) /* Master 11 Priority (in Register B) */
91
92#define AT91_MATRIX_MRCR (AT91_MATRIX + 0x100) /* Master Remap Control Register */
93#define AT91_MATRIX_RCB0 (1 << 0) /* Remap Command for AHB Master 0 (ARM926EJ-S Instruction Master) */
94#define AT91_MATRIX_RCB1 (1 << 1) /* Remap Command for AHB Master 1 (ARM926EJ-S Data Master) */
95#define AT91_MATRIX_RCB2 (1 << 2)
96#define AT91_MATRIX_RCB3 (1 << 3)
97#define AT91_MATRIX_RCB4 (1 << 4)
98#define AT91_MATRIX_RCB5 (1 << 5)
99#define AT91_MATRIX_RCB6 (1 << 6)
100#define AT91_MATRIX_RCB7 (1 << 7)
101#define AT91_MATRIX_RCB8 (1 << 8)
102#define AT91_MATRIX_RCB9 (1 << 9)
103#define AT91_MATRIX_RCB10 (1 << 10)
104#define AT91_MATRIX_RCB11 (1 << 11)
105
106#define AT91_MPBS0_SFR (AT91_MATRIX + 0x114) /* MPBlock Slave 0 Special Function Register */
107#define AT91_MPBS1_SFR (AT91_MATRIX + 0x11C) /* MPBlock Slave 1 Special Function Register */
108
109#define AT91_MATRIX_UDPHS (AT91_MATRIX + 0x118) /* USBHS Special Function Register [AT91CAP9 only] */
110#define AT91_MATRIX_SELECT_UDPHS (0 << 31) /* select High Speed UDP */
111#define AT91_MATRIX_SELECT_UDP (1 << 31) /* select standard UDP */
112#define AT91_MATRIX_UDPHS_BYPASS_LOCK (1 << 30) /* bypass lock bit */
113
114#define AT91_MATRIX_EBICSA (AT91_MATRIX + 0x120) /* EBI Chip Select Assignment Register */
115#define AT91_MATRIX_EBI_CS1A (1 << 1) /* Chip Select 1 Assignment */
116#define AT91_MATRIX_EBI_CS1A_SMC (0 << 1)
117#define AT91_MATRIX_EBI_CS1A_BCRAMC (1 << 1)
118#define AT91_MATRIX_EBI_CS3A (1 << 3) /* Chip Select 3 Assignment */
119#define AT91_MATRIX_EBI_CS3A_SMC (0 << 3)
120#define AT91_MATRIX_EBI_CS3A_SMC_SMARTMEDIA (1 << 3)
121#define AT91_MATRIX_EBI_CS4A (1 << 4) /* Chip Select 4 Assignment */
122#define AT91_MATRIX_EBI_CS4A_SMC (0 << 4)
123#define AT91_MATRIX_EBI_CS4A_SMC_CF1 (1 << 4)
124#define AT91_MATRIX_EBI_CS5A (1 << 5) /* Chip Select 5 Assignment */
125#define AT91_MATRIX_EBI_CS5A_SMC (0 << 5)
126#define AT91_MATRIX_EBI_CS5A_SMC_CF2 (1 << 5)
127#define AT91_MATRIX_EBI_DBPUC (1 << 8) /* Data Bus Pull-up Configuration */
128#define AT91_MATRIX_EBI_DQSPDC (1 << 9) /* Data Qualifier Strobe Pull-Down Configuration */
129#define AT91_MATRIX_EBI_VDDIOMSEL (1 << 16) /* Memory voltage selection */
130#define AT91_MATRIX_EBI_VDDIOMSEL_1_8V (0 << 16)
131#define AT91_MATRIX_EBI_VDDIOMSEL_3_3V (1 << 16)
132
133#define AT91_MPBS2_SFR (AT91_MATRIX + 0x12C) /* MPBlock Slave 2 Special Function Register */
134#define AT91_MPBS3_SFR (AT91_MATRIX + 0x130) /* MPBlock Slave 3 Special Function Register */
135#define AT91_APB_SFR (AT91_MATRIX + 0x134) /* APB Bridge Special Function Register */
136
137#endif
diff --git a/include/asm-arm/arch-at91/at91rm9200.h b/include/asm-arm/arch-at91/at91rm9200.h
deleted file mode 100644
index e8fc0b1c33f4..000000000000
--- a/include/asm-arm/arch-at91/at91rm9200.h
+++ /dev/null
@@ -1,115 +0,0 @@
1/*
2 * include/asm-arm/arch-at91/at91rm9200.h
3 *
4 * Copyright (C) 2005 Ivan Kokshaysky
5 * Copyright (C) SAN People
6 *
7 * Common definitions.
8 * Based on AT91RM9200 datasheet revision E.
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 */
15
16#ifndef AT91RM9200_H
17#define AT91RM9200_H
18
19/*
20 * Peripheral identifiers/interrupts.
21 */
22#define AT91_ID_FIQ 0 /* Advanced Interrupt Controller (FIQ) */
23#define AT91_ID_SYS 1 /* System Peripheral */
24#define AT91RM9200_ID_PIOA 2 /* Parallel IO Controller A */
25#define AT91RM9200_ID_PIOB 3 /* Parallel IO Controller B */
26#define AT91RM9200_ID_PIOC 4 /* Parallel IO Controller C */
27#define AT91RM9200_ID_PIOD 5 /* Parallel IO Controller D */
28#define AT91RM9200_ID_US0 6 /* USART 0 */
29#define AT91RM9200_ID_US1 7 /* USART 1 */
30#define AT91RM9200_ID_US2 8 /* USART 2 */
31#define AT91RM9200_ID_US3 9 /* USART 3 */
32#define AT91RM9200_ID_MCI 10 /* Multimedia Card Interface */
33#define AT91RM9200_ID_UDP 11 /* USB Device Port */
34#define AT91RM9200_ID_TWI 12 /* Two-Wire Interface */
35#define AT91RM9200_ID_SPI 13 /* Serial Peripheral Interface */
36#define AT91RM9200_ID_SSC0 14 /* Serial Synchronous Controller 0 */
37#define AT91RM9200_ID_SSC1 15 /* Serial Synchronous Controller 1 */
38#define AT91RM9200_ID_SSC2 16 /* Serial Synchronous Controller 2 */
39#define AT91RM9200_ID_TC0 17 /* Timer Counter 0 */
40#define AT91RM9200_ID_TC1 18 /* Timer Counter 1 */
41#define AT91RM9200_ID_TC2 19 /* Timer Counter 2 */
42#define AT91RM9200_ID_TC3 20 /* Timer Counter 3 */
43#define AT91RM9200_ID_TC4 21 /* Timer Counter 4 */
44#define AT91RM9200_ID_TC5 22 /* Timer Counter 5 */
45#define AT91RM9200_ID_UHP 23 /* USB Host port */
46#define AT91RM9200_ID_EMAC 24 /* Ethernet MAC */
47#define AT91RM9200_ID_IRQ0 25 /* Advanced Interrupt Controller (IRQ0) */
48#define AT91RM9200_ID_IRQ1 26 /* Advanced Interrupt Controller (IRQ1) */
49#define AT91RM9200_ID_IRQ2 27 /* Advanced Interrupt Controller (IRQ2) */
50#define AT91RM9200_ID_IRQ3 28 /* Advanced Interrupt Controller (IRQ3) */
51#define AT91RM9200_ID_IRQ4 29 /* Advanced Interrupt Controller (IRQ4) */
52#define AT91RM9200_ID_IRQ5 30 /* Advanced Interrupt Controller (IRQ5) */
53#define AT91RM9200_ID_IRQ6 31 /* Advanced Interrupt Controller (IRQ6) */
54
55
56/*
57 * Peripheral physical base addresses.
58 */
59#define AT91RM9200_BASE_TCB0 0xfffa0000
60#define AT91RM9200_BASE_TC0 0xfffa0000
61#define AT91RM9200_BASE_TC1 0xfffa0040
62#define AT91RM9200_BASE_TC2 0xfffa0080
63#define AT91RM9200_BASE_TCB1 0xfffa4000
64#define AT91RM9200_BASE_TC3 0xfffa4000
65#define AT91RM9200_BASE_TC4 0xfffa4040
66#define AT91RM9200_BASE_TC5 0xfffa4080
67#define AT91RM9200_BASE_UDP 0xfffb0000
68#define AT91RM9200_BASE_MCI 0xfffb4000
69#define AT91RM9200_BASE_TWI 0xfffb8000
70#define AT91RM9200_BASE_EMAC 0xfffbc000
71#define AT91RM9200_BASE_US0 0xfffc0000
72#define AT91RM9200_BASE_US1 0xfffc4000
73#define AT91RM9200_BASE_US2 0xfffc8000
74#define AT91RM9200_BASE_US3 0xfffcc000
75#define AT91RM9200_BASE_SSC0 0xfffd0000
76#define AT91RM9200_BASE_SSC1 0xfffd4000
77#define AT91RM9200_BASE_SSC2 0xfffd8000
78#define AT91RM9200_BASE_SPI 0xfffe0000
79#define AT91_BASE_SYS 0xfffff000
80
81
82/*
83 * System Peripherals (offset from AT91_BASE_SYS)
84 */
85#define AT91_AIC (0xfffff000 - AT91_BASE_SYS) /* Advanced Interrupt Controller */
86#define AT91_DBGU (0xfffff200 - AT91_BASE_SYS) /* Debug Unit */
87#define AT91_PIOA (0xfffff400 - AT91_BASE_SYS) /* PIO Controller A */
88#define AT91_PIOB (0xfffff600 - AT91_BASE_SYS) /* PIO Controller B */
89#define AT91_PIOC (0xfffff800 - AT91_BASE_SYS) /* PIO Controller C */
90#define AT91_PIOD (0xfffffa00 - AT91_BASE_SYS) /* PIO Controller D */
91#define AT91_PMC (0xfffffc00 - AT91_BASE_SYS) /* Power Management Controller */
92#define AT91_ST (0xfffffd00 - AT91_BASE_SYS) /* System Timer */
93#define AT91_RTC (0xfffffe00 - AT91_BASE_SYS) /* Real-Time Clock */
94#define AT91_MC (0xffffff00 - AT91_BASE_SYS) /* Memory Controllers */
95
96#define AT91_USART0 AT91RM9200_BASE_US0
97#define AT91_USART1 AT91RM9200_BASE_US1
98#define AT91_USART2 AT91RM9200_BASE_US2
99#define AT91_USART3 AT91RM9200_BASE_US3
100
101#define AT91_MATRIX 0 /* not supported */
102
103/*
104 * Internal Memory.
105 */
106#define AT91RM9200_ROM_BASE 0x00100000 /* Internal ROM base address */
107#define AT91RM9200_ROM_SIZE SZ_128K /* Internal ROM size (128Kb) */
108
109#define AT91RM9200_SRAM_BASE 0x00200000 /* Internal SRAM base address */
110#define AT91RM9200_SRAM_SIZE SZ_16K /* Internal SRAM size (16Kb) */
111
112#define AT91RM9200_UHP_BASE 0x00300000 /* USB Host controller */
113
114
115#endif
diff --git a/include/asm-arm/arch-at91/at91rm9200_emac.h b/include/asm-arm/arch-at91/at91rm9200_emac.h
deleted file mode 100644
index 0c417af5fe7f..000000000000
--- a/include/asm-arm/arch-at91/at91rm9200_emac.h
+++ /dev/null
@@ -1,138 +0,0 @@
1/*
2 * include/asm-arm/arch-at91/at91rm9200_emac.h
3 *
4 * Copyright (C) 2005 Ivan Kokshaysky
5 * Copyright (C) SAN People
6 *
7 * Ethernet MAC registers.
8 * Based on AT91RM9200 datasheet revision E.
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 */
15
16#ifndef AT91RM9200_EMAC_H
17#define AT91RM9200_EMAC_H
18
19#define AT91_EMAC_CTL 0x00 /* Control Register */
20#define AT91_EMAC_LB (1 << 0) /* Loopback */
21#define AT91_EMAC_LBL (1 << 1) /* Loopback Local */
22#define AT91_EMAC_RE (1 << 2) /* Receive Enable */
23#define AT91_EMAC_TE (1 << 3) /* Transmit Enable */
24#define AT91_EMAC_MPE (1 << 4) /* Management Port Enable */
25#define AT91_EMAC_CSR (1 << 5) /* Clear Statistics Registers */
26#define AT91_EMAC_INCSTAT (1 << 6) /* Increment Statistics Registers */
27#define AT91_EMAC_WES (1 << 7) /* Write Enable for Statistics Registers */
28#define AT91_EMAC_BP (1 << 8) /* Back Pressure */
29
30#define AT91_EMAC_CFG 0x04 /* Configuration Register */
31#define AT91_EMAC_SPD (1 << 0) /* Speed */
32#define AT91_EMAC_FD (1 << 1) /* Full Duplex */
33#define AT91_EMAC_BR (1 << 2) /* Bit Rate */
34#define AT91_EMAC_CAF (1 << 4) /* Copy All Frames */
35#define AT91_EMAC_NBC (1 << 5) /* No Broadcast */
36#define AT91_EMAC_MTI (1 << 6) /* Multicast Hash Enable */
37#define AT91_EMAC_UNI (1 << 7) /* Unicast Hash Enable */
38#define AT91_EMAC_BIG (1 << 8) /* Receive 1522 Bytes */
39#define AT91_EMAC_EAE (1 << 9) /* External Address Match Enable */
40#define AT91_EMAC_CLK (3 << 10) /* MDC Clock Divisor */
41#define AT91_EMAC_CLK_DIV8 (0 << 10)
42#define AT91_EMAC_CLK_DIV16 (1 << 10)
43#define AT91_EMAC_CLK_DIV32 (2 << 10)
44#define AT91_EMAC_CLK_DIV64 (3 << 10)
45#define AT91_EMAC_RTY (1 << 12) /* Retry Test */
46#define AT91_EMAC_RMII (1 << 13) /* Reduce MII (RMII) */
47
48#define AT91_EMAC_SR 0x08 /* Status Register */
49#define AT91_EMAC_SR_LINK (1 << 0) /* Link */
50#define AT91_EMAC_SR_MDIO (1 << 1) /* MDIO pin */
51#define AT91_EMAC_SR_IDLE (1 << 2) /* PHY idle */
52
53#define AT91_EMAC_TAR 0x0c /* Transmit Address Register */
54
55#define AT91_EMAC_TCR 0x10 /* Transmit Control Register */
56#define AT91_EMAC_LEN (0x7ff << 0) /* Transmit Frame Length */
57#define AT91_EMAC_NCRC (1 << 15) /* No CRC */
58
59#define AT91_EMAC_TSR 0x14 /* Transmit Status Register */
60#define AT91_EMAC_TSR_OVR (1 << 0) /* Transmit Buffer Overrun */
61#define AT91_EMAC_TSR_COL (1 << 1) /* Collision Occurred */
62#define AT91_EMAC_TSR_RLE (1 << 2) /* Retry Limit Exceeded */
63#define AT91_EMAC_TSR_IDLE (1 << 3) /* Transmitter Idle */
64#define AT91_EMAC_TSR_BNQ (1 << 4) /* Transmit Buffer not Queued */
65#define AT91_EMAC_TSR_COMP (1 << 5) /* Transmit Complete */
66#define AT91_EMAC_TSR_UND (1 << 6) /* Transmit Underrun */
67
68#define AT91_EMAC_RBQP 0x18 /* Receive Buffer Queue Pointer */
69
70#define AT91_EMAC_RSR 0x20 /* Receive Status Register */
71#define AT91_EMAC_RSR_BNA (1 << 0) /* Buffer Not Available */
72#define AT91_EMAC_RSR_REC (1 << 1) /* Frame Received */
73#define AT91_EMAC_RSR_OVR (1 << 2) /* RX Overrun */
74
75#define AT91_EMAC_ISR 0x24 /* Interrupt Status Register */
76#define AT91_EMAC_DONE (1 << 0) /* Management Done */
77#define AT91_EMAC_RCOM (1 << 1) /* Receive Complete */
78#define AT91_EMAC_RBNA (1 << 2) /* Receive Buffer Not Available */
79#define AT91_EMAC_TOVR (1 << 3) /* Transmit Buffer Overrun */
80#define AT91_EMAC_TUND (1 << 4) /* Transmit Buffer Underrun */
81#define AT91_EMAC_RTRY (1 << 5) /* Retry Limit */
82#define AT91_EMAC_TBRE (1 << 6) /* Transmit Buffer Register Empty */
83#define AT91_EMAC_TCOM (1 << 7) /* Transmit Complete */
84#define AT91_EMAC_TIDLE (1 << 8) /* Transmit Idle */
85#define AT91_EMAC_LINK (1 << 9) /* Link */
86#define AT91_EMAC_ROVR (1 << 10) /* RX Overrun */
87#define AT91_EMAC_ABT (1 << 11) /* Abort */
88
89#define AT91_EMAC_IER 0x28 /* Interrupt Enable Register */
90#define AT91_EMAC_IDR 0x2c /* Interrupt Disable Register */
91#define AT91_EMAC_IMR 0x30 /* Interrupt Mask Register */
92
93#define AT91_EMAC_MAN 0x34 /* PHY Maintenance Register */
94#define AT91_EMAC_DATA (0xffff << 0) /* MDIO Data */
95#define AT91_EMAC_REGA (0x1f << 18) /* MDIO Register */
96#define AT91_EMAC_PHYA (0x1f << 23) /* MDIO PHY Address */
97#define AT91_EMAC_RW (3 << 28) /* Read/Write operation */
98#define AT91_EMAC_RW_W (1 << 28)
99#define AT91_EMAC_RW_R (2 << 28)
100#define AT91_EMAC_MAN_802_3 0x40020000 /* IEEE 802.3 value */
101
102/*
103 * Statistics Registers.
104 */
105#define AT91_EMAC_FRA 0x40 /* Frames Transmitted OK */
106#define AT91_EMAC_SCOL 0x44 /* Single Collision Frame */
107#define AT91_EMAC_MCOL 0x48 /* Multiple Collision Frame */
108#define AT91_EMAC_OK 0x4c /* Frames Received OK */
109#define AT91_EMAC_SEQE 0x50 /* Frame Check Sequence Error */
110#define AT91_EMAC_ALE 0x54 /* Alignmemt Error */
111#define AT91_EMAC_DTE 0x58 /* Deffered Transmission Frame */
112#define AT91_EMAC_LCOL 0x5c /* Late Collision */
113#define AT91_EMAC_ECOL 0x60 /* Excessive Collision */
114#define AT91_EMAC_TUE 0x64 /* Transmit Underrun Error */
115#define AT91_EMAC_CSE 0x68 /* Carrier Sense Error */
116#define AT91_EMAC_DRFC 0x6c /* Discard RX Frame */
117#define AT91_EMAC_ROV 0x70 /* Receive Overrun */
118#define AT91_EMAC_CDE 0x74 /* Code Error */
119#define AT91_EMAC_ELR 0x78 /* Excessive Length Error */
120#define AT91_EMAC_RJB 0x7c /* Receive Jabber */
121#define AT91_EMAC_USF 0x80 /* Undersize Frame */
122#define AT91_EMAC_SQEE 0x84 /* SQE Test Error */
123
124/*
125 * Address Registers.
126 */
127#define AT91_EMAC_HSL 0x90 /* Hash Address Low [31:0] */
128#define AT91_EMAC_HSH 0x94 /* Hash Address High [63:32] */
129#define AT91_EMAC_SA1L 0x98 /* Specific Address 1 Low, bytes 0-3 */
130#define AT91_EMAC_SA1H 0x9c /* Specific Address 1 High, bytes 4-5 */
131#define AT91_EMAC_SA2L 0xa0 /* Specific Address 2 Low, bytes 0-3 */
132#define AT91_EMAC_SA2H 0xa4 /* Specific Address 2 High, bytes 4-5 */
133#define AT91_EMAC_SA3L 0xa8 /* Specific Address 3 Low, bytes 0-3 */
134#define AT91_EMAC_SA3H 0xac /* Specific Address 3 High, bytes 4-5 */
135#define AT91_EMAC_SA4L 0xb0 /* Specific Address 4 Low, bytes 0-3 */
136#define AT91_EMAC_SA4H 0xb4 /* Specific Address 4 High, bytes 4-5 */
137
138#endif
diff --git a/include/asm-arm/arch-at91/at91rm9200_mc.h b/include/asm-arm/arch-at91/at91rm9200_mc.h
deleted file mode 100644
index 24d012939cc4..000000000000
--- a/include/asm-arm/arch-at91/at91rm9200_mc.h
+++ /dev/null
@@ -1,160 +0,0 @@
1/*
2 * include/asm-arm/arch-at91/at91rm9200_mc.h
3 *
4 * Copyright (C) 2005 Ivan Kokshaysky
5 * Copyright (C) SAN People
6 *
7 * Memory Controllers (MC, EBI, SMC, SDRAMC, BFC) - System peripherals registers.
8 * Based on AT91RM9200 datasheet revision E.
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 */
15
16#ifndef AT91RM9200_MC_H
17#define AT91RM9200_MC_H
18
19/* Memory Controller */
20#define AT91_MC_RCR (AT91_MC + 0x00) /* MC Remap Control Register */
21#define AT91_MC_RCB (1 << 0) /* Remap Command Bit */
22
23#define AT91_MC_ASR (AT91_MC + 0x04) /* MC Abort Status Register */
24#define AT91_MC_UNADD (1 << 0) /* Undefined Address Abort Status */
25#define AT91_MC_MISADD (1 << 1) /* Misaligned Address Abort Status */
26#define AT91_MC_ABTSZ (3 << 8) /* Abort Size Status */
27#define AT91_MC_ABTSZ_BYTE (0 << 8)
28#define AT91_MC_ABTSZ_HALFWORD (1 << 8)
29#define AT91_MC_ABTSZ_WORD (2 << 8)
30#define AT91_MC_ABTTYP (3 << 10) /* Abort Type Status */
31#define AT91_MC_ABTTYP_DATAREAD (0 << 10)
32#define AT91_MC_ABTTYP_DATAWRITE (1 << 10)
33#define AT91_MC_ABTTYP_FETCH (2 << 10)
34#define AT91_MC_MST0 (1 << 16) /* ARM920T Abort Source */
35#define AT91_MC_MST1 (1 << 17) /* PDC Abort Source */
36#define AT91_MC_MST2 (1 << 18) /* UHP Abort Source */
37#define AT91_MC_MST3 (1 << 19) /* EMAC Abort Source */
38#define AT91_MC_SVMST0 (1 << 24) /* Saved ARM920T Abort Source */
39#define AT91_MC_SVMST1 (1 << 25) /* Saved PDC Abort Source */
40#define AT91_MC_SVMST2 (1 << 26) /* Saved UHP Abort Source */
41#define AT91_MC_SVMST3 (1 << 27) /* Saved EMAC Abort Source */
42
43#define AT91_MC_AASR (AT91_MC + 0x08) /* MC Abort Address Status Register */
44
45#define AT91_MC_MPR (AT91_MC + 0x0c) /* MC Master Priority Register */
46#define AT91_MPR_MSTP0 (7 << 0) /* ARM920T Priority */
47#define AT91_MPR_MSTP1 (7 << 4) /* PDC Priority */
48#define AT91_MPR_MSTP2 (7 << 8) /* UHP Priority */
49#define AT91_MPR_MSTP3 (7 << 12) /* EMAC Priority */
50
51/* External Bus Interface (EBI) registers */
52#define AT91_EBI_CSA (AT91_MC + 0x60) /* Chip Select Assignment Register */
53#define AT91_EBI_CS0A (1 << 0) /* Chip Select 0 Assignment */
54#define AT91_EBI_CS0A_SMC (0 << 0)
55#define AT91_EBI_CS0A_BFC (1 << 0)
56#define AT91_EBI_CS1A (1 << 1) /* Chip Select 1 Assignment */
57#define AT91_EBI_CS1A_SMC (0 << 1)
58#define AT91_EBI_CS1A_SDRAMC (1 << 1)
59#define AT91_EBI_CS3A (1 << 3) /* Chip Select 2 Assignment */
60#define AT91_EBI_CS3A_SMC (0 << 3)
61#define AT91_EBI_CS3A_SMC_SMARTMEDIA (1 << 3)
62#define AT91_EBI_CS4A (1 << 4) /* Chip Select 3 Assignment */
63#define AT91_EBI_CS4A_SMC (0 << 4)
64#define AT91_EBI_CS4A_SMC_COMPACTFLASH (1 << 4)
65#define AT91_EBI_CFGR (AT91_MC + 0x64) /* Configuration Register */
66#define AT91_EBI_DBPUC (1 << 0) /* Data Bus Pull-Up Configuration */
67
68/* Static Memory Controller (SMC) registers */
69#define AT91_SMC_CSR(n) (AT91_MC + 0x70 + ((n) * 4))/* SMC Chip Select Register */
70#define AT91_SMC_NWS (0x7f << 0) /* Number of Wait States */
71#define AT91_SMC_NWS_(x) ((x) << 0)
72#define AT91_SMC_WSEN (1 << 7) /* Wait State Enable */
73#define AT91_SMC_TDF (0xf << 8) /* Data Float Time */
74#define AT91_SMC_TDF_(x) ((x) << 8)
75#define AT91_SMC_BAT (1 << 12) /* Byte Access Type */
76#define AT91_SMC_DBW (3 << 13) /* Data Bus Width */
77#define AT91_SMC_DBW_16 (1 << 13)
78#define AT91_SMC_DBW_8 (2 << 13)
79#define AT91_SMC_DPR (1 << 15) /* Data Read Protocol */
80#define AT91_SMC_ACSS (3 << 16) /* Address to Chip Select Setup */
81#define AT91_SMC_ACSS_STD (0 << 16)
82#define AT91_SMC_ACSS_1 (1 << 16)
83#define AT91_SMC_ACSS_2 (2 << 16)
84#define AT91_SMC_ACSS_3 (3 << 16)
85#define AT91_SMC_RWSETUP (7 << 24) /* Read & Write Signal Time Setup */
86#define AT91_SMC_RWSETUP_(x) ((x) << 24)
87#define AT91_SMC_RWHOLD (7 << 28) /* Read & Write Signal Hold Time */
88#define AT91_SMC_RWHOLD_(x) ((x) << 28)
89
90/* SDRAM Controller registers */
91#define AT91_SDRAMC_MR (AT91_MC + 0x90) /* Mode Register */
92#define AT91_SDRAMC_MODE (0xf << 0) /* Command Mode */
93#define AT91_SDRAMC_MODE_NORMAL (0 << 0)
94#define AT91_SDRAMC_MODE_NOP (1 << 0)
95#define AT91_SDRAMC_MODE_PRECHARGE (2 << 0)
96#define AT91_SDRAMC_MODE_LMR (3 << 0)
97#define AT91_SDRAMC_MODE_REFRESH (4 << 0)
98#define AT91_SDRAMC_DBW (1 << 4) /* Data Bus Width */
99#define AT91_SDRAMC_DBW_32 (0 << 4)
100#define AT91_SDRAMC_DBW_16 (1 << 4)
101
102#define AT91_SDRAMC_TR (AT91_MC + 0x94) /* Refresh Timer Register */
103#define AT91_SDRAMC_COUNT (0xfff << 0) /* Refresh Timer Count */
104
105#define AT91_SDRAMC_CR (AT91_MC + 0x98) /* Configuration Register */
106#define AT91_SDRAMC_NC (3 << 0) /* Number of Column Bits */
107#define AT91_SDRAMC_NC_8 (0 << 0)
108#define AT91_SDRAMC_NC_9 (1 << 0)
109#define AT91_SDRAMC_NC_10 (2 << 0)
110#define AT91_SDRAMC_NC_11 (3 << 0)
111#define AT91_SDRAMC_NR (3 << 2) /* Number of Row Bits */
112#define AT91_SDRAMC_NR_11 (0 << 2)
113#define AT91_SDRAMC_NR_12 (1 << 2)
114#define AT91_SDRAMC_NR_13 (2 << 2)
115#define AT91_SDRAMC_NB (1 << 4) /* Number of Banks */
116#define AT91_SDRAMC_NB_2 (0 << 4)
117#define AT91_SDRAMC_NB_4 (1 << 4)
118#define AT91_SDRAMC_CAS (3 << 5) /* CAS Latency */
119#define AT91_SDRAMC_CAS_2 (2 << 5)
120#define AT91_SDRAMC_TWR (0xf << 7) /* Write Recovery Delay */
121#define AT91_SDRAMC_TRC (0xf << 11) /* Row Cycle Delay */
122#define AT91_SDRAMC_TRP (0xf << 15) /* Row Precharge Delay */
123#define AT91_SDRAMC_TRCD (0xf << 19) /* Row to Column Delay */
124#define AT91_SDRAMC_TRAS (0xf << 23) /* Active to Precharge Delay */
125#define AT91_SDRAMC_TXSR (0xf << 27) /* Exit Self Refresh to Active Delay */
126
127#define AT91_SDRAMC_SRR (AT91_MC + 0x9c) /* Self Refresh Register */
128#define AT91_SDRAMC_LPR (AT91_MC + 0xa0) /* Low Power Register */
129#define AT91_SDRAMC_IER (AT91_MC + 0xa4) /* Interrupt Enable Register */
130#define AT91_SDRAMC_IDR (AT91_MC + 0xa8) /* Interrupt Disable Register */
131#define AT91_SDRAMC_IMR (AT91_MC + 0xac) /* Interrupt Mask Register */
132#define AT91_SDRAMC_ISR (AT91_MC + 0xb0) /* Interrupt Status Register */
133
134/* Burst Flash Controller register */
135#define AT91_BFC_MR (AT91_MC + 0xc0) /* Mode Register */
136#define AT91_BFC_BFCOM (3 << 0) /* Burst Flash Controller Operating Mode */
137#define AT91_BFC_BFCOM_DISABLED (0 << 0)
138#define AT91_BFC_BFCOM_ASYNC (1 << 0)
139#define AT91_BFC_BFCOM_BURST (2 << 0)
140#define AT91_BFC_BFCC (3 << 2) /* Burst Flash Controller Clock */
141#define AT91_BFC_BFCC_MCK (1 << 2)
142#define AT91_BFC_BFCC_DIV2 (2 << 2)
143#define AT91_BFC_BFCC_DIV4 (3 << 2)
144#define AT91_BFC_AVL (0xf << 4) /* Address Valid Latency */
145#define AT91_BFC_PAGES (7 << 8) /* Page Size */
146#define AT91_BFC_PAGES_NO_PAGE (0 << 8)
147#define AT91_BFC_PAGES_16 (1 << 8)
148#define AT91_BFC_PAGES_32 (2 << 8)
149#define AT91_BFC_PAGES_64 (3 << 8)
150#define AT91_BFC_PAGES_128 (4 << 8)
151#define AT91_BFC_PAGES_256 (5 << 8)
152#define AT91_BFC_PAGES_512 (6 << 8)
153#define AT91_BFC_PAGES_1024 (7 << 8)
154#define AT91_BFC_OEL (3 << 12) /* Output Enable Latency */
155#define AT91_BFC_BAAEN (1 << 16) /* Burst Address Advance Enable */
156#define AT91_BFC_BFOEH (1 << 17) /* Burst Flash Output Enable Handling */
157#define AT91_BFC_MUXEN (1 << 18) /* Multiplexed Bus Enable */
158#define AT91_BFC_RDYEN (1 << 19) /* Ready Enable Mode */
159
160#endif
diff --git a/include/asm-arm/arch-at91/at91sam9260.h b/include/asm-arm/arch-at91/at91sam9260.h
deleted file mode 100644
index 889872a3f2a9..000000000000
--- a/include/asm-arm/arch-at91/at91sam9260.h
+++ /dev/null
@@ -1,138 +0,0 @@
1/*
2 * include/asm-arm/arch-at91/at91sam9260.h
3 *
4 * (C) 2006 Andrew Victor
5 *
6 * Common definitions.
7 * Based on AT91SAM9260 datasheet revision A (Preliminary).
8 *
9 * Includes also definitions for AT91SAM9XE and AT91SAM9G families
10 *
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
15 */
16
17#ifndef AT91SAM9260_H
18#define AT91SAM9260_H
19
20/*
21 * Peripheral identifiers/interrupts.
22 */
23#define AT91_ID_FIQ 0 /* Advanced Interrupt Controller (FIQ) */
24#define AT91_ID_SYS 1 /* System Peripherals */
25#define AT91SAM9260_ID_PIOA 2 /* Parallel IO Controller A */
26#define AT91SAM9260_ID_PIOB 3 /* Parallel IO Controller B */
27#define AT91SAM9260_ID_PIOC 4 /* Parallel IO Controller C */
28#define AT91SAM9260_ID_ADC 5 /* Analog-to-Digital Converter */
29#define AT91SAM9260_ID_US0 6 /* USART 0 */
30#define AT91SAM9260_ID_US1 7 /* USART 1 */
31#define AT91SAM9260_ID_US2 8 /* USART 2 */
32#define AT91SAM9260_ID_MCI 9 /* Multimedia Card Interface */
33#define AT91SAM9260_ID_UDP 10 /* USB Device Port */
34#define AT91SAM9260_ID_TWI 11 /* Two-Wire Interface */
35#define AT91SAM9260_ID_SPI0 12 /* Serial Peripheral Interface 0 */
36#define AT91SAM9260_ID_SPI1 13 /* Serial Peripheral Interface 1 */
37#define AT91SAM9260_ID_SSC 14 /* Serial Synchronous Controller */
38#define AT91SAM9260_ID_TC0 17 /* Timer Counter 0 */
39#define AT91SAM9260_ID_TC1 18 /* Timer Counter 1 */
40#define AT91SAM9260_ID_TC2 19 /* Timer Counter 2 */
41#define AT91SAM9260_ID_UHP 20 /* USB Host port */
42#define AT91SAM9260_ID_EMAC 21 /* Ethernet */
43#define AT91SAM9260_ID_ISI 22 /* Image Sensor Interface */
44#define AT91SAM9260_ID_US3 23 /* USART 3 */
45#define AT91SAM9260_ID_US4 24 /* USART 4 */
46#define AT91SAM9260_ID_US5 25 /* USART 5 */
47#define AT91SAM9260_ID_TC3 26 /* Timer Counter 3 */
48#define AT91SAM9260_ID_TC4 27 /* Timer Counter 4 */
49#define AT91SAM9260_ID_TC5 28 /* Timer Counter 5 */
50#define AT91SAM9260_ID_IRQ0 29 /* Advanced Interrupt Controller (IRQ0) */
51#define AT91SAM9260_ID_IRQ1 30 /* Advanced Interrupt Controller (IRQ1) */
52#define AT91SAM9260_ID_IRQ2 31 /* Advanced Interrupt Controller (IRQ2) */
53
54
55/*
56 * User Peripheral physical base addresses.
57 */
58#define AT91SAM9260_BASE_TCB0 0xfffa0000
59#define AT91SAM9260_BASE_TC0 0xfffa0000
60#define AT91SAM9260_BASE_TC1 0xfffa0040
61#define AT91SAM9260_BASE_TC2 0xfffa0080
62#define AT91SAM9260_BASE_UDP 0xfffa4000
63#define AT91SAM9260_BASE_MCI 0xfffa8000
64#define AT91SAM9260_BASE_TWI 0xfffac000
65#define AT91SAM9260_BASE_US0 0xfffb0000
66#define AT91SAM9260_BASE_US1 0xfffb4000
67#define AT91SAM9260_BASE_US2 0xfffb8000
68#define AT91SAM9260_BASE_SSC 0xfffbc000
69#define AT91SAM9260_BASE_ISI 0xfffc0000
70#define AT91SAM9260_BASE_EMAC 0xfffc4000
71#define AT91SAM9260_BASE_SPI0 0xfffc8000
72#define AT91SAM9260_BASE_SPI1 0xfffcc000
73#define AT91SAM9260_BASE_US3 0xfffd0000
74#define AT91SAM9260_BASE_US4 0xfffd4000
75#define AT91SAM9260_BASE_US5 0xfffd8000
76#define AT91SAM9260_BASE_TCB1 0xfffdc000
77#define AT91SAM9260_BASE_TC3 0xfffdc000
78#define AT91SAM9260_BASE_TC4 0xfffdc040
79#define AT91SAM9260_BASE_TC5 0xfffdc080
80#define AT91SAM9260_BASE_ADC 0xfffe0000
81#define AT91_BASE_SYS 0xffffe800
82
83/*
84 * System Peripherals (offset from AT91_BASE_SYS)
85 */
86#define AT91_ECC (0xffffe800 - AT91_BASE_SYS)
87#define AT91_SDRAMC (0xffffea00 - AT91_BASE_SYS)
88#define AT91_SMC (0xffffec00 - AT91_BASE_SYS)
89#define AT91_MATRIX (0xffffee00 - AT91_BASE_SYS)
90#define AT91_CCFG (0xffffef10 - AT91_BASE_SYS)
91#define AT91_AIC (0xfffff000 - AT91_BASE_SYS)
92#define AT91_DBGU (0xfffff200 - AT91_BASE_SYS)
93#define AT91_PIOA (0xfffff400 - AT91_BASE_SYS)
94#define AT91_PIOB (0xfffff600 - AT91_BASE_SYS)
95#define AT91_PIOC (0xfffff800 - AT91_BASE_SYS)
96#define AT91_PMC (0xfffffc00 - AT91_BASE_SYS)
97#define AT91_RSTC (0xfffffd00 - AT91_BASE_SYS)
98#define AT91_SHDWC (0xfffffd10 - AT91_BASE_SYS)
99#define AT91_RTT (0xfffffd20 - AT91_BASE_SYS)
100#define AT91_PIT (0xfffffd30 - AT91_BASE_SYS)
101#define AT91_WDT (0xfffffd40 - AT91_BASE_SYS)
102#define AT91_GPBR (0xfffffd50 - AT91_BASE_SYS)
103
104#define AT91_USART0 AT91SAM9260_BASE_US0
105#define AT91_USART1 AT91SAM9260_BASE_US1
106#define AT91_USART2 AT91SAM9260_BASE_US2
107#define AT91_USART3 AT91SAM9260_BASE_US3
108#define AT91_USART4 AT91SAM9260_BASE_US4
109#define AT91_USART5 AT91SAM9260_BASE_US5
110
111
112/*
113 * Internal Memory.
114 */
115#define AT91SAM9260_ROM_BASE 0x00100000 /* Internal ROM base address */
116#define AT91SAM9260_ROM_SIZE SZ_32K /* Internal ROM size (32Kb) */
117
118#define AT91SAM9260_SRAM0_BASE 0x00200000 /* Internal SRAM 0 base address */
119#define AT91SAM9260_SRAM0_SIZE SZ_4K /* Internal SRAM 0 size (4Kb) */
120#define AT91SAM9260_SRAM1_BASE 0x00300000 /* Internal SRAM 1 base address */
121#define AT91SAM9260_SRAM1_SIZE SZ_4K /* Internal SRAM 1 size (4Kb) */
122
123#define AT91SAM9260_UHP_BASE 0x00500000 /* USB Host controller */
124
125#define AT91SAM9XE_FLASH_BASE 0x00200000 /* Internal FLASH base address */
126#define AT91SAM9XE_SRAM_BASE 0x00300000 /* Internal SRAM base address */
127
128#define AT91SAM9G20_ROM_BASE 0x00100000 /* Internal ROM base address */
129#define AT91SAM9G20_ROM_SIZE SZ_32K /* Internal ROM size (32Kb) */
130
131#define AT91SAM9G20_SRAM0_BASE 0x00200000 /* Internal SRAM 0 base address */
132#define AT91SAM9G20_SRAM0_SIZE SZ_16K /* Internal SRAM 0 size (16Kb) */
133#define AT91SAM9G20_SRAM1_BASE 0x00300000 /* Internal SRAM 1 base address */
134#define AT91SAM9G20_SRAM1_SIZE SZ_16K /* Internal SRAM 1 size (16Kb) */
135
136#define AT91SAM9G20_UHP_BASE 0x00500000 /* USB Host controller */
137
138#endif
diff --git a/include/asm-arm/arch-at91/at91sam9260_matrix.h b/include/asm-arm/arch-at91/at91sam9260_matrix.h
deleted file mode 100644
index a8e9fec6c735..000000000000
--- a/include/asm-arm/arch-at91/at91sam9260_matrix.h
+++ /dev/null
@@ -1,78 +0,0 @@
1/*
2 * include/asm-arm/arch-at91/at91sam9260_matrix.h
3 *
4 * Memory Controllers (MATRIX, EBI) - System peripherals registers.
5 * Based on AT91SAM9260 datasheet revision B.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 */
12
13#ifndef AT91SAM9260_MATRIX_H
14#define AT91SAM9260_MATRIX_H
15
16#define AT91_MATRIX_MCFG0 (AT91_MATRIX + 0x00) /* Master Configuration Register 0 */
17#define AT91_MATRIX_MCFG1 (AT91_MATRIX + 0x04) /* Master Configuration Register 1 */
18#define AT91_MATRIX_MCFG2 (AT91_MATRIX + 0x08) /* Master Configuration Register 2 */
19#define AT91_MATRIX_MCFG3 (AT91_MATRIX + 0x0C) /* Master Configuration Register 3 */
20#define AT91_MATRIX_MCFG4 (AT91_MATRIX + 0x10) /* Master Configuration Register 4 */
21#define AT91_MATRIX_MCFG5 (AT91_MATRIX + 0x14) /* Master Configuration Register 5 */
22#define AT91_MATRIX_ULBT (7 << 0) /* Undefined Length Burst Type */
23#define AT91_MATRIX_ULBT_INFINITE (0 << 0)
24#define AT91_MATRIX_ULBT_SINGLE (1 << 0)
25#define AT91_MATRIX_ULBT_FOUR (2 << 0)
26#define AT91_MATRIX_ULBT_EIGHT (3 << 0)
27#define AT91_MATRIX_ULBT_SIXTEEN (4 << 0)
28
29#define AT91_MATRIX_SCFG0 (AT91_MATRIX + 0x40) /* Slave Configuration Register 0 */
30#define AT91_MATRIX_SCFG1 (AT91_MATRIX + 0x44) /* Slave Configuration Register 1 */
31#define AT91_MATRIX_SCFG2 (AT91_MATRIX + 0x48) /* Slave Configuration Register 2 */
32#define AT91_MATRIX_SCFG3 (AT91_MATRIX + 0x4C) /* Slave Configuration Register 3 */
33#define AT91_MATRIX_SCFG4 (AT91_MATRIX + 0x50) /* Slave Configuration Register 4 */
34#define AT91_MATRIX_SLOT_CYCLE (0xff << 0) /* Maximum Number of Allowed Cycles for a Burst */
35#define AT91_MATRIX_DEFMSTR_TYPE (3 << 16) /* Default Master Type */
36#define AT91_MATRIX_DEFMSTR_TYPE_NONE (0 << 16)
37#define AT91_MATRIX_DEFMSTR_TYPE_LAST (1 << 16)
38#define AT91_MATRIX_DEFMSTR_TYPE_FIXED (2 << 16)
39#define AT91_MATRIX_FIXED_DEFMSTR (7 << 18) /* Fixed Index of Default Master */
40#define AT91_MATRIX_ARBT (3 << 24) /* Arbitration Type */
41#define AT91_MATRIX_ARBT_ROUND_ROBIN (0 << 24)
42#define AT91_MATRIX_ARBT_FIXED_PRIORITY (1 << 24)
43
44#define AT91_MATRIX_PRAS0 (AT91_MATRIX + 0x80) /* Priority Register A for Slave 0 */
45#define AT91_MATRIX_PRAS1 (AT91_MATRIX + 0x88) /* Priority Register A for Slave 1 */
46#define AT91_MATRIX_PRAS2 (AT91_MATRIX + 0x90) /* Priority Register A for Slave 2 */
47#define AT91_MATRIX_PRAS3 (AT91_MATRIX + 0x98) /* Priority Register A for Slave 3 */
48#define AT91_MATRIX_PRAS4 (AT91_MATRIX + 0xA0) /* Priority Register A for Slave 4 */
49#define AT91_MATRIX_M0PR (3 << 0) /* Master 0 Priority */
50#define AT91_MATRIX_M1PR (3 << 4) /* Master 1 Priority */
51#define AT91_MATRIX_M2PR (3 << 8) /* Master 2 Priority */
52#define AT91_MATRIX_M3PR (3 << 12) /* Master 3 Priority */
53#define AT91_MATRIX_M4PR (3 << 16) /* Master 4 Priority */
54#define AT91_MATRIX_M5PR (3 << 20) /* Master 5 Priority */
55
56#define AT91_MATRIX_MRCR (AT91_MATRIX + 0x100) /* Master Remap Control Register */
57#define AT91_MATRIX_RCB0 (1 << 0) /* Remap Command for AHB Master 0 (ARM926EJ-S Instruction Master) */
58#define AT91_MATRIX_RCB1 (1 << 1) /* Remap Command for AHB Master 1 (ARM926EJ-S Data Master) */
59
60#define AT91_MATRIX_EBICSA (AT91_MATRIX + 0x11C) /* EBI Chip Select Assignment Register */
61#define AT91_MATRIX_CS1A (1 << 1) /* Chip Select 1 Assignment */
62#define AT91_MATRIX_CS1A_SMC (0 << 1)
63#define AT91_MATRIX_CS1A_SDRAMC (1 << 1)
64#define AT91_MATRIX_CS3A (1 << 3) /* Chip Select 3 Assignment */
65#define AT91_MATRIX_CS3A_SMC (0 << 3)
66#define AT91_MATRIX_CS3A_SMC_SMARTMEDIA (1 << 3)
67#define AT91_MATRIX_CS4A (1 << 4) /* Chip Select 4 Assignment */
68#define AT91_MATRIX_CS4A_SMC (0 << 4)
69#define AT91_MATRIX_CS4A_SMC_CF1 (1 << 4)
70#define AT91_MATRIX_CS5A (1 << 5) /* Chip Select 5 Assignment */
71#define AT91_MATRIX_CS5A_SMC (0 << 5)
72#define AT91_MATRIX_CS5A_SMC_CF2 (1 << 5)
73#define AT91_MATRIX_DBPUC (1 << 8) /* Data Bus Pull-up Configuration */
74#define AT91_MATRIX_VDDIOMSEL (1 << 16) /* Memory voltage selection */
75#define AT91_MATRIX_VDDIOMSEL_1_8V (0 << 16)
76#define AT91_MATRIX_VDDIOMSEL_3_3V (1 << 16)
77
78#endif
diff --git a/include/asm-arm/arch-at91/at91sam9261.h b/include/asm-arm/arch-at91/at91sam9261.h
deleted file mode 100644
index c7c4778dac49..000000000000
--- a/include/asm-arm/arch-at91/at91sam9261.h
+++ /dev/null
@@ -1,105 +0,0 @@
1/*
2 * include/asm-arm/arch-at91/at91sam9261.h
3 *
4 * Copyright (C) SAN People
5 *
6 * Common definitions.
7 * Based on AT91SAM9261 datasheet revision E. (Preliminary)
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 */
14
15#ifndef AT91SAM9261_H
16#define AT91SAM9261_H
17
18/*
19 * Peripheral identifiers/interrupts.
20 */
21#define AT91_ID_FIQ 0 /* Advanced Interrupt Controller (FIQ) */
22#define AT91_ID_SYS 1 /* System Peripherals */
23#define AT91SAM9261_ID_PIOA 2 /* Parallel IO Controller A */
24#define AT91SAM9261_ID_PIOB 3 /* Parallel IO Controller B */
25#define AT91SAM9261_ID_PIOC 4 /* Parallel IO Controller C */
26#define AT91SAM9261_ID_US0 6 /* USART 0 */
27#define AT91SAM9261_ID_US1 7 /* USART 1 */
28#define AT91SAM9261_ID_US2 8 /* USART 2 */
29#define AT91SAM9261_ID_MCI 9 /* Multimedia Card Interface */
30#define AT91SAM9261_ID_UDP 10 /* USB Device Port */
31#define AT91SAM9261_ID_TWI 11 /* Two-Wire Interface */
32#define AT91SAM9261_ID_SPI0 12 /* Serial Peripheral Interface 0 */
33#define AT91SAM9261_ID_SPI1 13 /* Serial Peripheral Interface 1 */
34#define AT91SAM9261_ID_SSC0 14 /* Serial Synchronous Controller 0 */
35#define AT91SAM9261_ID_SSC1 15 /* Serial Synchronous Controller 1 */
36#define AT91SAM9261_ID_SSC2 16 /* Serial Synchronous Controller 2 */
37#define AT91SAM9261_ID_TC0 17 /* Timer Counter 0 */
38#define AT91SAM9261_ID_TC1 18 /* Timer Counter 1 */
39#define AT91SAM9261_ID_TC2 19 /* Timer Counter 2 */
40#define AT91SAM9261_ID_UHP 20 /* USB Host port */
41#define AT91SAM9261_ID_LCDC 21 /* LDC Controller */
42#define AT91SAM9261_ID_IRQ0 29 /* Advanced Interrupt Controller (IRQ0) */
43#define AT91SAM9261_ID_IRQ1 30 /* Advanced Interrupt Controller (IRQ1) */
44#define AT91SAM9261_ID_IRQ2 31 /* Advanced Interrupt Controller (IRQ2) */
45
46
47/*
48 * User Peripheral physical base addresses.
49 */
50#define AT91SAM9261_BASE_TCB0 0xfffa0000
51#define AT91SAM9261_BASE_TC0 0xfffa0000
52#define AT91SAM9261_BASE_TC1 0xfffa0040
53#define AT91SAM9261_BASE_TC2 0xfffa0080
54#define AT91SAM9261_BASE_UDP 0xfffa4000
55#define AT91SAM9261_BASE_MCI 0xfffa8000
56#define AT91SAM9261_BASE_TWI 0xfffac000
57#define AT91SAM9261_BASE_US0 0xfffb0000
58#define AT91SAM9261_BASE_US1 0xfffb4000
59#define AT91SAM9261_BASE_US2 0xfffb8000
60#define AT91SAM9261_BASE_SSC0 0xfffbc000
61#define AT91SAM9261_BASE_SSC1 0xfffc0000
62#define AT91SAM9261_BASE_SSC2 0xfffc4000
63#define AT91SAM9261_BASE_SPI0 0xfffc8000
64#define AT91SAM9261_BASE_SPI1 0xfffcc000
65#define AT91_BASE_SYS 0xffffea00
66
67
68/*
69 * System Peripherals (offset from AT91_BASE_SYS)
70 */
71#define AT91_SDRAMC (0xffffea00 - AT91_BASE_SYS)
72#define AT91_SMC (0xffffec00 - AT91_BASE_SYS)
73#define AT91_MATRIX (0xffffee00 - AT91_BASE_SYS)
74#define AT91_AIC (0xfffff000 - AT91_BASE_SYS)
75#define AT91_DBGU (0xfffff200 - AT91_BASE_SYS)
76#define AT91_PIOA (0xfffff400 - AT91_BASE_SYS)
77#define AT91_PIOB (0xfffff600 - AT91_BASE_SYS)
78#define AT91_PIOC (0xfffff800 - AT91_BASE_SYS)
79#define AT91_PMC (0xfffffc00 - AT91_BASE_SYS)
80#define AT91_RSTC (0xfffffd00 - AT91_BASE_SYS)
81#define AT91_SHDWC (0xfffffd10 - AT91_BASE_SYS)
82#define AT91_RTT (0xfffffd20 - AT91_BASE_SYS)
83#define AT91_PIT (0xfffffd30 - AT91_BASE_SYS)
84#define AT91_WDT (0xfffffd40 - AT91_BASE_SYS)
85#define AT91_GPBR (0xfffffd50 - AT91_BASE_SYS)
86
87#define AT91_USART0 AT91SAM9261_BASE_US0
88#define AT91_USART1 AT91SAM9261_BASE_US1
89#define AT91_USART2 AT91SAM9261_BASE_US2
90
91
92/*
93 * Internal Memory.
94 */
95#define AT91SAM9261_SRAM_BASE 0x00300000 /* Internal SRAM base address */
96#define AT91SAM9261_SRAM_SIZE 0x00028000 /* Internal SRAM size (160Kb) */
97
98#define AT91SAM9261_ROM_BASE 0x00400000 /* Internal ROM base address */
99#define AT91SAM9261_ROM_SIZE SZ_32K /* Internal ROM size (32Kb) */
100
101#define AT91SAM9261_UHP_BASE 0x00500000 /* USB Host controller */
102#define AT91SAM9261_LCDC_BASE 0x00600000 /* LDC controller */
103
104
105#endif
diff --git a/include/asm-arm/arch-at91/at91sam9261_matrix.h b/include/asm-arm/arch-at91/at91sam9261_matrix.h
deleted file mode 100644
index 6f072421be5b..000000000000
--- a/include/asm-arm/arch-at91/at91sam9261_matrix.h
+++ /dev/null
@@ -1,62 +0,0 @@
1/*
2 * include/asm-arm/arch-at91/at91sam9261_matrix.h
3 *
4 * Memory Controllers (MATRIX, EBI) - System peripherals registers.
5 * Based on AT91SAM9261 datasheet revision D.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 */
12
13#ifndef AT91SAM9261_MATRIX_H
14#define AT91SAM9261_MATRIX_H
15
16#define AT91_MATRIX_MCFG (AT91_MATRIX + 0x00) /* Master Configuration Register */
17#define AT91_MATRIX_RCB0 (1 << 0) /* Remap Command for AHB Master 0 (ARM926EJ-S Instruction Master) */
18#define AT91_MATRIX_RCB1 (1 << 1) /* Remap Command for AHB Master 1 (ARM926EJ-S Data Master) */
19
20#define AT91_MATRIX_SCFG0 (AT91_MATRIX + 0x04) /* Slave Configuration Register 0 */
21#define AT91_MATRIX_SCFG1 (AT91_MATRIX + 0x08) /* Slave Configuration Register 1 */
22#define AT91_MATRIX_SCFG2 (AT91_MATRIX + 0x0C) /* Slave Configuration Register 2 */
23#define AT91_MATRIX_SCFG3 (AT91_MATRIX + 0x10) /* Slave Configuration Register 3 */
24#define AT91_MATRIX_SCFG4 (AT91_MATRIX + 0x14) /* Slave Configuration Register 4 */
25#define AT91_MATRIX_SLOT_CYCLE (0xff << 0) /* Maximum Number of Allowed Cycles for a Burst */
26#define AT91_MATRIX_DEFMSTR_TYPE (3 << 16) /* Default Master Type */
27#define AT91_MATRIX_DEFMSTR_TYPE_NONE (0 << 16)
28#define AT91_MATRIX_DEFMSTR_TYPE_LAST (1 << 16)
29#define AT91_MATRIX_DEFMSTR_TYPE_FIXED (2 << 16)
30#define AT91_MATRIX_FIXED_DEFMSTR (7 << 18) /* Fixed Index of Default Master */
31
32#define AT91_MATRIX_TCR (AT91_MATRIX + 0x24) /* TCM Configuration Register */
33#define AT91_MATRIX_ITCM_SIZE (0xf << 0) /* Size of ITCM enabled memory block */
34#define AT91_MATRIX_ITCM_0 (0 << 0)
35#define AT91_MATRIX_ITCM_16 (5 << 0)
36#define AT91_MATRIX_ITCM_32 (6 << 0)
37#define AT91_MATRIX_ITCM_64 (7 << 0)
38#define AT91_MATRIX_DTCM_SIZE (0xf << 4) /* Size of DTCM enabled memory block */
39#define AT91_MATRIX_DTCM_0 (0 << 4)
40#define AT91_MATRIX_DTCM_16 (5 << 4)
41#define AT91_MATRIX_DTCM_32 (6 << 4)
42#define AT91_MATRIX_DTCM_64 (7 << 4)
43
44#define AT91_MATRIX_EBICSA (AT91_MATRIX + 0x30) /* EBI Chip Select Assignment Register */
45#define AT91_MATRIX_CS1A (1 << 1) /* Chip Select 1 Assignment */
46#define AT91_MATRIX_CS1A_SMC (0 << 1)
47#define AT91_MATRIX_CS1A_SDRAMC (1 << 1)
48#define AT91_MATRIX_CS3A (1 << 3) /* Chip Select 3 Assignment */
49#define AT91_MATRIX_CS3A_SMC (0 << 3)
50#define AT91_MATRIX_CS3A_SMC_SMARTMEDIA (1 << 3)
51#define AT91_MATRIX_CS4A (1 << 4) /* Chip Select 4 Assignment */
52#define AT91_MATRIX_CS4A_SMC (0 << 4)
53#define AT91_MATRIX_CS4A_SMC_CF1 (1 << 4)
54#define AT91_MATRIX_CS5A (1 << 5) /* Chip Select 5 Assignment */
55#define AT91_MATRIX_CS5A_SMC (0 << 5)
56#define AT91_MATRIX_CS5A_SMC_CF2 (1 << 5)
57#define AT91_MATRIX_DBPUC (1 << 8) /* Data Bus Pull-up Configuration */
58
59#define AT91_MATRIX_USBPUCR (AT91_MATRIX + 0x34) /* USB Pad Pull-Up Control Register */
60#define AT91_MATRIX_USBPUCR_PUON (1 << 30) /* USB Device PAD Pull-up Enable */
61
62#endif
diff --git a/include/asm-arm/arch-at91/at91sam9263.h b/include/asm-arm/arch-at91/at91sam9263.h
deleted file mode 100644
index 018a647311da..000000000000
--- a/include/asm-arm/arch-at91/at91sam9263.h
+++ /dev/null
@@ -1,127 +0,0 @@
1/*
2 * include/asm-arm/arch-at91/at91sam9263.h
3 *
4 * (C) 2007 Atmel Corporation.
5 *
6 * Common definitions.
7 * Based on AT91SAM9263 datasheet revision B (Preliminary).
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 */
14
15#ifndef AT91SAM9263_H
16#define AT91SAM9263_H
17
18/*
19 * Peripheral identifiers/interrupts.
20 */
21#define AT91_ID_FIQ 0 /* Advanced Interrupt Controller (FIQ) */
22#define AT91_ID_SYS 1 /* System Peripherals */
23#define AT91SAM9263_ID_PIOA 2 /* Parallel IO Controller A */
24#define AT91SAM9263_ID_PIOB 3 /* Parallel IO Controller B */
25#define AT91SAM9263_ID_PIOCDE 4 /* Parallel IO Controller C, D and E */
26#define AT91SAM9263_ID_US0 7 /* USART 0 */
27#define AT91SAM9263_ID_US1 8 /* USART 1 */
28#define AT91SAM9263_ID_US2 9 /* USART 2 */
29#define AT91SAM9263_ID_MCI0 10 /* Multimedia Card Interface 0 */
30#define AT91SAM9263_ID_MCI1 11 /* Multimedia Card Interface 1 */
31#define AT91SAM9263_ID_CAN 12 /* CAN */
32#define AT91SAM9263_ID_TWI 13 /* Two-Wire Interface */
33#define AT91SAM9263_ID_SPI0 14 /* Serial Peripheral Interface 0 */
34#define AT91SAM9263_ID_SPI1 15 /* Serial Peripheral Interface 1 */
35#define AT91SAM9263_ID_SSC0 16 /* Serial Synchronous Controller 0 */
36#define AT91SAM9263_ID_SSC1 17 /* Serial Synchronous Controller 1 */
37#define AT91SAM9263_ID_AC97C 18 /* AC97 Controller */
38#define AT91SAM9263_ID_TCB 19 /* Timer Counter 0, 1 and 2 */
39#define AT91SAM9263_ID_PWMC 20 /* Pulse Width Modulation Controller */
40#define AT91SAM9263_ID_EMAC 21 /* Ethernet */
41#define AT91SAM9263_ID_2DGE 23 /* 2D Graphic Engine */
42#define AT91SAM9263_ID_UDP 24 /* USB Device Port */
43#define AT91SAM9263_ID_ISI 25 /* Image Sensor Interface */
44#define AT91SAM9263_ID_LCDC 26 /* LCD Controller */
45#define AT91SAM9263_ID_DMA 27 /* DMA Controller */
46#define AT91SAM9263_ID_UHP 29 /* USB Host port */
47#define AT91SAM9263_ID_IRQ0 30 /* Advanced Interrupt Controller (IRQ0) */
48#define AT91SAM9263_ID_IRQ1 31 /* Advanced Interrupt Controller (IRQ1) */
49
50
51/*
52 * User Peripheral physical base addresses.
53 */
54#define AT91SAM9263_BASE_UDP 0xfff78000
55#define AT91SAM9263_BASE_TCB0 0xfff7c000
56#define AT91SAM9263_BASE_TC0 0xfff7c000
57#define AT91SAM9263_BASE_TC1 0xfff7c040
58#define AT91SAM9263_BASE_TC2 0xfff7c080
59#define AT91SAM9263_BASE_MCI0 0xfff80000
60#define AT91SAM9263_BASE_MCI1 0xfff84000
61#define AT91SAM9263_BASE_TWI 0xfff88000
62#define AT91SAM9263_BASE_US0 0xfff8c000
63#define AT91SAM9263_BASE_US1 0xfff90000
64#define AT91SAM9263_BASE_US2 0xfff94000
65#define AT91SAM9263_BASE_SSC0 0xfff98000
66#define AT91SAM9263_BASE_SSC1 0xfff9c000
67#define AT91SAM9263_BASE_AC97C 0xfffa0000
68#define AT91SAM9263_BASE_SPI0 0xfffa4000
69#define AT91SAM9263_BASE_SPI1 0xfffa8000
70#define AT91SAM9263_BASE_CAN 0xfffac000
71#define AT91SAM9263_BASE_PWMC 0xfffb8000
72#define AT91SAM9263_BASE_EMAC 0xfffbc000
73#define AT91SAM9263_BASE_ISI 0xfffc4000
74#define AT91SAM9263_BASE_2DGE 0xfffc8000
75#define AT91_BASE_SYS 0xffffe000
76
77/*
78 * System Peripherals (offset from AT91_BASE_SYS)
79 */
80#define AT91_ECC0 (0xffffe000 - AT91_BASE_SYS)
81#define AT91_SDRAMC0 (0xffffe200 - AT91_BASE_SYS)
82#define AT91_SMC0 (0xffffe400 - AT91_BASE_SYS)
83#define AT91_ECC1 (0xffffe600 - AT91_BASE_SYS)
84#define AT91_SDRAMC1 (0xffffe800 - AT91_BASE_SYS)
85#define AT91_SMC1 (0xffffea00 - AT91_BASE_SYS)
86#define AT91_MATRIX (0xffffec00 - AT91_BASE_SYS)
87#define AT91_CCFG (0xffffed10 - AT91_BASE_SYS)
88#define AT91_DBGU (0xffffee00 - AT91_BASE_SYS)
89#define AT91_AIC (0xfffff000 - AT91_BASE_SYS)
90#define AT91_PIOA (0xfffff200 - AT91_BASE_SYS)
91#define AT91_PIOB (0xfffff400 - AT91_BASE_SYS)
92#define AT91_PIOC (0xfffff600 - AT91_BASE_SYS)
93#define AT91_PIOD (0xfffff800 - AT91_BASE_SYS)
94#define AT91_PIOE (0xfffffa00 - AT91_BASE_SYS)
95#define AT91_PMC (0xfffffc00 - AT91_BASE_SYS)
96#define AT91_RSTC (0xfffffd00 - AT91_BASE_SYS)
97#define AT91_SHDWC (0xfffffd10 - AT91_BASE_SYS)
98#define AT91_RTT0 (0xfffffd20 - AT91_BASE_SYS)
99#define AT91_PIT (0xfffffd30 - AT91_BASE_SYS)
100#define AT91_WDT (0xfffffd40 - AT91_BASE_SYS)
101#define AT91_RTT1 (0xfffffd50 - AT91_BASE_SYS)
102#define AT91_GPBR (0xfffffd60 - AT91_BASE_SYS)
103
104#define AT91_USART0 AT91SAM9263_BASE_US0
105#define AT91_USART1 AT91SAM9263_BASE_US1
106#define AT91_USART2 AT91SAM9263_BASE_US2
107
108#define AT91_SMC AT91_SMC0
109
110/*
111 * Internal Memory.
112 */
113#define AT91SAM9263_SRAM0_BASE 0x00300000 /* Internal SRAM 0 base address */
114#define AT91SAM9263_SRAM0_SIZE (80 * SZ_1K) /* Internal SRAM 0 size (80Kb) */
115
116#define AT91SAM9263_ROM_BASE 0x00400000 /* Internal ROM base address */
117#define AT91SAM9263_ROM_SIZE SZ_128K /* Internal ROM size (128Kb) */
118
119#define AT91SAM9263_SRAM1_BASE 0x00500000 /* Internal SRAM 1 base address */
120#define AT91SAM9263_SRAM1_SIZE SZ_16K /* Internal SRAM 1 size (16Kb) */
121
122#define AT91SAM9263_LCDC_BASE 0x00700000 /* LCD Controller */
123#define AT91SAM9263_DMAC_BASE 0x00800000 /* DMA Controller */
124#define AT91SAM9263_UHP_BASE 0x00a00000 /* USB Host controller */
125
126
127#endif
diff --git a/include/asm-arm/arch-at91/at91sam9263_matrix.h b/include/asm-arm/arch-at91/at91sam9263_matrix.h
deleted file mode 100644
index 72f6e668e414..000000000000
--- a/include/asm-arm/arch-at91/at91sam9263_matrix.h
+++ /dev/null
@@ -1,129 +0,0 @@
1/*
2 * include/asm-arm/arch-at91/at91sam9263_matrix.h
3 *
4 * Copyright (C) 2006 Atmel Corporation.
5 *
6 * Memory Controllers (MATRIX, EBI) - System peripherals registers.
7 * Based on AT91SAM9263 datasheet revision B (Preliminary).
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 */
14
15#ifndef AT91SAM9263_MATRIX_H
16#define AT91SAM9263_MATRIX_H
17
18#define AT91_MATRIX_MCFG0 (AT91_MATRIX + 0x00) /* Master Configuration Register 0 */
19#define AT91_MATRIX_MCFG1 (AT91_MATRIX + 0x04) /* Master Configuration Register 1 */
20#define AT91_MATRIX_MCFG2 (AT91_MATRIX + 0x08) /* Master Configuration Register 2 */
21#define AT91_MATRIX_MCFG3 (AT91_MATRIX + 0x0C) /* Master Configuration Register 3 */
22#define AT91_MATRIX_MCFG4 (AT91_MATRIX + 0x10) /* Master Configuration Register 4 */
23#define AT91_MATRIX_MCFG5 (AT91_MATRIX + 0x14) /* Master Configuration Register 5 */
24#define AT91_MATRIX_MCFG6 (AT91_MATRIX + 0x18) /* Master Configuration Register 6 */
25#define AT91_MATRIX_MCFG7 (AT91_MATRIX + 0x1C) /* Master Configuration Register 7 */
26#define AT91_MATRIX_MCFG8 (AT91_MATRIX + 0x20) /* Master Configuration Register 8 */
27#define AT91_MATRIX_ULBT (7 << 0) /* Undefined Length Burst Type */
28#define AT91_MATRIX_ULBT_INFINITE (0 << 0)
29#define AT91_MATRIX_ULBT_SINGLE (1 << 0)
30#define AT91_MATRIX_ULBT_FOUR (2 << 0)
31#define AT91_MATRIX_ULBT_EIGHT (3 << 0)
32#define AT91_MATRIX_ULBT_SIXTEEN (4 << 0)
33
34#define AT91_MATRIX_SCFG0 (AT91_MATRIX + 0x40) /* Slave Configuration Register 0 */
35#define AT91_MATRIX_SCFG1 (AT91_MATRIX + 0x44) /* Slave Configuration Register 1 */
36#define AT91_MATRIX_SCFG2 (AT91_MATRIX + 0x48) /* Slave Configuration Register 2 */
37#define AT91_MATRIX_SCFG3 (AT91_MATRIX + 0x4C) /* Slave Configuration Register 3 */
38#define AT91_MATRIX_SCFG4 (AT91_MATRIX + 0x50) /* Slave Configuration Register 4 */
39#define AT91_MATRIX_SCFG5 (AT91_MATRIX + 0x54) /* Slave Configuration Register 5 */
40#define AT91_MATRIX_SCFG6 (AT91_MATRIX + 0x58) /* Slave Configuration Register 6 */
41#define AT91_MATRIX_SCFG7 (AT91_MATRIX + 0x5C) /* Slave Configuration Register 7 */
42#define AT91_MATRIX_SLOT_CYCLE (0xff << 0) /* Maximum Number of Allowed Cycles for a Burst */
43#define AT91_MATRIX_DEFMSTR_TYPE (3 << 16) /* Default Master Type */
44#define AT91_MATRIX_DEFMSTR_TYPE_NONE (0 << 16)
45#define AT91_MATRIX_DEFMSTR_TYPE_LAST (1 << 16)
46#define AT91_MATRIX_DEFMSTR_TYPE_FIXED (2 << 16)
47#define AT91_MATRIX_FIXED_DEFMSTR (0xf << 18) /* Fixed Index of Default Master */
48#define AT91_MATRIX_ARBT (3 << 24) /* Arbitration Type */
49#define AT91_MATRIX_ARBT_ROUND_ROBIN (0 << 24)
50#define AT91_MATRIX_ARBT_FIXED_PRIORITY (1 << 24)
51
52#define AT91_MATRIX_PRAS0 (AT91_MATRIX + 0x80) /* Priority Register A for Slave 0 */
53#define AT91_MATRIX_PRBS0 (AT91_MATRIX + 0x84) /* Priority Register B for Slave 0 */
54#define AT91_MATRIX_PRAS1 (AT91_MATRIX + 0x88) /* Priority Register A for Slave 1 */
55#define AT91_MATRIX_PRBS1 (AT91_MATRIX + 0x8C) /* Priority Register B for Slave 1 */
56#define AT91_MATRIX_PRAS2 (AT91_MATRIX + 0x90) /* Priority Register A for Slave 2 */
57#define AT91_MATRIX_PRBS2 (AT91_MATRIX + 0x94) /* Priority Register B for Slave 2 */
58#define AT91_MATRIX_PRAS3 (AT91_MATRIX + 0x98) /* Priority Register A for Slave 3 */
59#define AT91_MATRIX_PRBS3 (AT91_MATRIX + 0x9C) /* Priority Register B for Slave 3 */
60#define AT91_MATRIX_PRAS4 (AT91_MATRIX + 0xA0) /* Priority Register A for Slave 4 */
61#define AT91_MATRIX_PRBS4 (AT91_MATRIX + 0xA4) /* Priority Register B for Slave 4 */
62#define AT91_MATRIX_PRAS5 (AT91_MATRIX + 0xA8) /* Priority Register A for Slave 5 */
63#define AT91_MATRIX_PRBS5 (AT91_MATRIX + 0xAC) /* Priority Register B for Slave 5 */
64#define AT91_MATRIX_PRAS6 (AT91_MATRIX + 0xB0) /* Priority Register A for Slave 6 */
65#define AT91_MATRIX_PRBS6 (AT91_MATRIX + 0xB4) /* Priority Register B for Slave 6 */
66#define AT91_MATRIX_PRAS7 (AT91_MATRIX + 0xB8) /* Priority Register A for Slave 7 */
67#define AT91_MATRIX_PRBS7 (AT91_MATRIX + 0xBC) /* Priority Register B for Slave 7 */
68#define AT91_MATRIX_M0PR (3 << 0) /* Master 0 Priority */
69#define AT91_MATRIX_M1PR (3 << 4) /* Master 1 Priority */
70#define AT91_MATRIX_M2PR (3 << 8) /* Master 2 Priority */
71#define AT91_MATRIX_M3PR (3 << 12) /* Master 3 Priority */
72#define AT91_MATRIX_M4PR (3 << 16) /* Master 4 Priority */
73#define AT91_MATRIX_M5PR (3 << 20) /* Master 5 Priority */
74#define AT91_MATRIX_M6PR (3 << 24) /* Master 6 Priority */
75#define AT91_MATRIX_M7PR (3 << 28) /* Master 7 Priority */
76#define AT91_MATRIX_M8PR (3 << 0) /* Master 8 Priority (in Register B) */
77
78#define AT91_MATRIX_MRCR (AT91_MATRIX + 0x100) /* Master Remap Control Register */
79#define AT91_MATRIX_RCB0 (1 << 0) /* Remap Command for AHB Master 0 (ARM926EJ-S Instruction Master) */
80#define AT91_MATRIX_RCB1 (1 << 1) /* Remap Command for AHB Master 1 (ARM926EJ-S Data Master) */
81#define AT91_MATRIX_RCB2 (1 << 2)
82#define AT91_MATRIX_RCB3 (1 << 3)
83#define AT91_MATRIX_RCB4 (1 << 4)
84#define AT91_MATRIX_RCB5 (1 << 5)
85#define AT91_MATRIX_RCB6 (1 << 6)
86#define AT91_MATRIX_RCB7 (1 << 7)
87#define AT91_MATRIX_RCB8 (1 << 8)
88
89#define AT91_MATRIX_TCMR (AT91_MATRIX + 0x114) /* TCM Configuration Register */
90#define AT91_MATRIX_ITCM_SIZE (0xf << 0) /* Size of ITCM enabled memory block */
91#define AT91_MATRIX_ITCM_0 (0 << 0)
92#define AT91_MATRIX_ITCM_16 (5 << 0)
93#define AT91_MATRIX_ITCM_32 (6 << 0)
94#define AT91_MATRIX_DTCM_SIZE (0xf << 4) /* Size of DTCM enabled memory block */
95#define AT91_MATRIX_DTCM_0 (0 << 4)
96#define AT91_MATRIX_DTCM_16 (5 << 4)
97#define AT91_MATRIX_DTCM_32 (6 << 4)
98
99#define AT91_MATRIX_EBI0CSA (AT91_MATRIX + 0x120) /* EBI0 Chip Select Assignment Register */
100#define AT91_MATRIX_EBI0_CS1A (1 << 1) /* Chip Select 1 Assignment */
101#define AT91_MATRIX_EBI0_CS1A_SMC (0 << 1)
102#define AT91_MATRIX_EBI0_CS1A_SDRAMC (1 << 1)
103#define AT91_MATRIX_EBI0_CS3A (1 << 3) /* Chip Select 3 Assignment */
104#define AT91_MATRIX_EBI0_CS3A_SMC (0 << 3)
105#define AT91_MATRIX_EBI0_CS3A_SMC_SMARTMEDIA (1 << 3)
106#define AT91_MATRIX_EBI0_CS4A (1 << 4) /* Chip Select 4 Assignment */
107#define AT91_MATRIX_EBI0_CS4A_SMC (0 << 4)
108#define AT91_MATRIX_EBI0_CS4A_SMC_CF1 (1 << 4)
109#define AT91_MATRIX_EBI0_CS5A (1 << 5) /* Chip Select 5 Assignment */
110#define AT91_MATRIX_EBI0_CS5A_SMC (0 << 5)
111#define AT91_MATRIX_EBI0_CS5A_SMC_CF2 (1 << 5)
112#define AT91_MATRIX_EBI0_DBPUC (1 << 8) /* Data Bus Pull-up Configuration */
113#define AT91_MATRIX_EBI0_VDDIOMSEL (1 << 16) /* Memory voltage selection */
114#define AT91_MATRIX_EBI0_VDDIOMSEL_1_8V (0 << 16)
115#define AT91_MATRIX_EBI0_VDDIOMSEL_3_3V (1 << 16)
116
117#define AT91_MATRIX_EBI1CSA (AT91_MATRIX + 0x124) /* EBI1 Chip Select Assignment Register */
118#define AT91_MATRIX_EBI1_CS1A (1 << 1) /* Chip Select 1 Assignment */
119#define AT91_MATRIX_EBI1_CS1A_SMC (0 << 1)
120#define AT91_MATRIX_EBI1_CS1A_SDRAMC (1 << 1)
121#define AT91_MATRIX_EBI1_CS2A (1 << 3) /* Chip Select 3 Assignment */
122#define AT91_MATRIX_EBI1_CS2A_SMC (0 << 3)
123#define AT91_MATRIX_EBI1_CS2A_SMC_SMARTMEDIA (1 << 3)
124#define AT91_MATRIX_EBI1_DBPUC (1 << 8) /* Data Bus Pull-up Configuration */
125#define AT91_MATRIX_EBI1_VDDIOMSEL (1 << 16) /* Memory voltage selection */
126#define AT91_MATRIX_EBI1_VDDIOMSEL_1_8V (0 << 16)
127#define AT91_MATRIX_EBI1_VDDIOMSEL_3_3V (1 << 16)
128
129#endif
diff --git a/include/asm-arm/arch-at91/at91sam9_sdramc.h b/include/asm-arm/arch-at91/at91sam9_sdramc.h
deleted file mode 100644
index d3b8b3da6b4d..000000000000
--- a/include/asm-arm/arch-at91/at91sam9_sdramc.h
+++ /dev/null
@@ -1,83 +0,0 @@
1/*
2 * include/asm-arm/arch-at91/at91sam9_sdramc.h
3 *
4 * SDRAM Controllers (SDRAMC) - System peripherals registers.
5 * Based on AT91SAM9261 datasheet revision D.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 */
12
13#ifndef AT91SAM9_SDRAMC_H
14#define AT91SAM9_SDRAMC_H
15
16/* SDRAM Controller (SDRAMC) registers */
17#define AT91_SDRAMC_MR (AT91_SDRAMC + 0x00) /* SDRAM Controller Mode Register */
18#define AT91_SDRAMC_MODE (0xf << 0) /* Command Mode */
19#define AT91_SDRAMC_MODE_NORMAL 0
20#define AT91_SDRAMC_MODE_NOP 1
21#define AT91_SDRAMC_MODE_PRECHARGE 2
22#define AT91_SDRAMC_MODE_LMR 3
23#define AT91_SDRAMC_MODE_REFRESH 4
24#define AT91_SDRAMC_MODE_EXT_LMR 5
25#define AT91_SDRAMC_MODE_DEEP 6
26
27#define AT91_SDRAMC_TR (AT91_SDRAMC + 0x04) /* SDRAM Controller Refresh Timer Register */
28#define AT91_SDRAMC_COUNT (0xfff << 0) /* Refresh Timer Counter */
29
30#define AT91_SDRAMC_CR (AT91_SDRAMC + 0x08) /* SDRAM Controller Configuration Register */
31#define AT91_SDRAMC_NC (3 << 0) /* Number of Column Bits */
32#define AT91_SDRAMC_NC_8 (0 << 0)
33#define AT91_SDRAMC_NC_9 (1 << 0)
34#define AT91_SDRAMC_NC_10 (2 << 0)
35#define AT91_SDRAMC_NC_11 (3 << 0)
36#define AT91_SDRAMC_NR (3 << 2) /* Number of Row Bits */
37#define AT91_SDRAMC_NR_11 (0 << 2)
38#define AT91_SDRAMC_NR_12 (1 << 2)
39#define AT91_SDRAMC_NR_13 (2 << 2)
40#define AT91_SDRAMC_NB (1 << 4) /* Number of Banks */
41#define AT91_SDRAMC_NB_2 (0 << 4)
42#define AT91_SDRAMC_NB_4 (1 << 4)
43#define AT91_SDRAMC_CAS (3 << 5) /* CAS Latency */
44#define AT91_SDRAMC_CAS_1 (1 << 5)
45#define AT91_SDRAMC_CAS_2 (2 << 5)
46#define AT91_SDRAMC_CAS_3 (3 << 5)
47#define AT91_SDRAMC_DBW (1 << 7) /* Data Bus Width */
48#define AT91_SDRAMC_DBW_32 (0 << 7)
49#define AT91_SDRAMC_DBW_16 (1 << 7)
50#define AT91_SDRAMC_TWR (0xf << 8) /* Write Recovery Delay */
51#define AT91_SDRAMC_TRC (0xf << 12) /* Row Cycle Delay */
52#define AT91_SDRAMC_TRP (0xf << 16) /* Row Precharge Delay */
53#define AT91_SDRAMC_TRCD (0xf << 20) /* Row to Column Delay */
54#define AT91_SDRAMC_TRAS (0xf << 24) /* Active to Precharge Delay */
55#define AT91_SDRAMC_TXSR (0xf << 28) /* Exit Self Refresh to Active Delay */
56
57#define AT91_SDRAMC_LPR (AT91_SDRAMC + 0x10) /* SDRAM Controller Low Power Register */
58#define AT91_SDRAMC_LPCB (3 << 0) /* Low-power Configurations */
59#define AT91_SDRAMC_LPCB_DISABLE 0
60#define AT91_SDRAMC_LPCB_SELF_REFRESH 1
61#define AT91_SDRAMC_LPCB_POWER_DOWN 2
62#define AT91_SDRAMC_LPCB_DEEP_POWER_DOWN 3
63#define AT91_SDRAMC_PASR (7 << 4) /* Partial Array Self Refresh */
64#define AT91_SDRAMC_TCSR (3 << 8) /* Temperature Compensated Self Refresh */
65#define AT91_SDRAMC_DS (3 << 10) /* Drive Strength */
66#define AT91_SDRAMC_TIMEOUT (3 << 12) /* Time to define when Low Power Mode is enabled */
67#define AT91_SDRAMC_TIMEOUT_0_CLK_CYCLES (0 << 12)
68#define AT91_SDRAMC_TIMEOUT_64_CLK_CYCLES (1 << 12)
69#define AT91_SDRAMC_TIMEOUT_128_CLK_CYCLES (2 << 12)
70
71#define AT91_SDRAMC_IER (AT91_SDRAMC + 0x14) /* SDRAM Controller Interrupt Enable Register */
72#define AT91_SDRAMC_IDR (AT91_SDRAMC + 0x18) /* SDRAM Controller Interrupt Disable Register */
73#define AT91_SDRAMC_IMR (AT91_SDRAMC + 0x1C) /* SDRAM Controller Interrupt Mask Register */
74#define AT91_SDRAMC_ISR (AT91_SDRAMC + 0x20) /* SDRAM Controller Interrupt Status Register */
75#define AT91_SDRAMC_RES (1 << 0) /* Refresh Error Status */
76
77#define AT91_SDRAMC_MDR (AT91_SDRAMC + 0x24) /* SDRAM Memory Device Register */
78#define AT91_SDRAMC_MD (3 << 0) /* Memory Device Type */
79#define AT91_SDRAMC_MD_SDRAM 0
80#define AT91_SDRAMC_MD_LOW_POWER_SDRAM 1
81
82
83#endif
diff --git a/include/asm-arm/arch-at91/at91sam9_smc.h b/include/asm-arm/arch-at91/at91sam9_smc.h
deleted file mode 100644
index 9e49eed31e50..000000000000
--- a/include/asm-arm/arch-at91/at91sam9_smc.h
+++ /dev/null
@@ -1,73 +0,0 @@
1/*
2 * include/asm-arm/arch-at91/at91sam9_smc.h
3 *
4 * Static Memory Controllers (SMC) - System peripherals registers.
5 * Based on AT91SAM9261 datasheet revision D.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 */
12
13#ifndef AT91SAM9_SMC_H
14#define AT91SAM9_SMC_H
15
16#define AT91_SMC_SETUP(n) (AT91_SMC + 0x00 + ((n)*0x10)) /* Setup Register for CS n */
17#define AT91_SMC_NWESETUP (0x3f << 0) /* NWE Setup Length */
18#define AT91_SMC_NWESETUP_(x) ((x) << 0)
19#define AT91_SMC_NCS_WRSETUP (0x3f << 8) /* NCS Setup Length in Write Access */
20#define AT91_SMC_NCS_WRSETUP_(x) ((x) << 8)
21#define AT91_SMC_NRDSETUP (0x3f << 16) /* NRD Setup Length */
22#define AT91_SMC_NRDSETUP_(x) ((x) << 16)
23#define AT91_SMC_NCS_RDSETUP (0x3f << 24) /* NCS Setup Length in Read Access */
24#define AT91_SMC_NCS_RDSETUP_(x) ((x) << 24)
25
26#define AT91_SMC_PULSE(n) (AT91_SMC + 0x04 + ((n)*0x10)) /* Pulse Register for CS n */
27#define AT91_SMC_NWEPULSE (0x7f << 0) /* NWE Pulse Length */
28#define AT91_SMC_NWEPULSE_(x) ((x) << 0)
29#define AT91_SMC_NCS_WRPULSE (0x7f << 8) /* NCS Pulse Length in Write Access */
30#define AT91_SMC_NCS_WRPULSE_(x)((x) << 8)
31#define AT91_SMC_NRDPULSE (0x7f << 16) /* NRD Pulse Length */
32#define AT91_SMC_NRDPULSE_(x) ((x) << 16)
33#define AT91_SMC_NCS_RDPULSE (0x7f << 24) /* NCS Pulse Length in Read Access */
34#define AT91_SMC_NCS_RDPULSE_(x)((x) << 24)
35
36#define AT91_SMC_CYCLE(n) (AT91_SMC + 0x08 + ((n)*0x10)) /* Cycle Register for CS n */
37#define AT91_SMC_NWECYCLE (0x1ff << 0 ) /* Total Write Cycle Length */
38#define AT91_SMC_NWECYCLE_(x) ((x) << 0)
39#define AT91_SMC_NRDCYCLE (0x1ff << 16) /* Total Read Cycle Length */
40#define AT91_SMC_NRDCYCLE_(x) ((x) << 16)
41
42#define AT91_SMC_MODE(n) (AT91_SMC + 0x0c + ((n)*0x10)) /* Mode Register for CS n */
43#define AT91_SMC_READMODE (1 << 0) /* Read Mode */
44#define AT91_SMC_WRITEMODE (1 << 1) /* Write Mode */
45#define AT91_SMC_EXNWMODE (3 << 4) /* NWAIT Mode */
46#define AT91_SMC_EXNWMODE_DISABLE (0 << 4)
47#define AT91_SMC_EXNWMODE_FROZEN (2 << 4)
48#define AT91_SMC_EXNWMODE_READY (3 << 4)
49#define AT91_SMC_BAT (1 << 8) /* Byte Access Type */
50#define AT91_SMC_BAT_SELECT (0 << 8)
51#define AT91_SMC_BAT_WRITE (1 << 8)
52#define AT91_SMC_DBW (3 << 12) /* Data Bus Width */
53#define AT91_SMC_DBW_8 (0 << 12)
54#define AT91_SMC_DBW_16 (1 << 12)
55#define AT91_SMC_DBW_32 (2 << 12)
56#define AT91_SMC_TDF (0xf << 16) /* Data Float Time. */
57#define AT91_SMC_TDF_(x) ((x) << 16)
58#define AT91_SMC_TDFMODE (1 << 20) /* TDF Optimization - Enabled */
59#define AT91_SMC_PMEN (1 << 24) /* Page Mode Enabled */
60#define AT91_SMC_PS (3 << 28) /* Page Size */
61#define AT91_SMC_PS_4 (0 << 28)
62#define AT91_SMC_PS_8 (1 << 28)
63#define AT91_SMC_PS_16 (2 << 28)
64#define AT91_SMC_PS_32 (3 << 28)
65
66#if defined(AT91_SMC1) /* The AT91SAM9263 has 2 Static Memory contollers */
67#define AT91_SMC1_SETUP(n) (AT91_SMC1 + 0x00 + ((n)*0x10)) /* Setup Register for CS n */
68#define AT91_SMC1_PULSE(n) (AT91_SMC1 + 0x04 + ((n)*0x10)) /* Pulse Register for CS n */
69#define AT91_SMC1_CYCLE(n) (AT91_SMC1 + 0x08 + ((n)*0x10)) /* Cycle Register for CS n */
70#define AT91_SMC1_MODE(n) (AT91_SMC1 + 0x0c + ((n)*0x10)) /* Mode Register for CS n */
71#endif
72
73#endif
diff --git a/include/asm-arm/arch-at91/at91sam9rl.h b/include/asm-arm/arch-at91/at91sam9rl.h
deleted file mode 100644
index 622e56f81d42..000000000000
--- a/include/asm-arm/arch-at91/at91sam9rl.h
+++ /dev/null
@@ -1,115 +0,0 @@
1/*
2 * include/asm-arm/arch-at91/at91sam9260.h
3 *
4 * Copyright (C) 2007 Atmel Corporation
5 *
6 * Common definitions.
7 * Based on AT91SAM9RL datasheet revision A. (Preliminary)
8 *
9 * This file is subject to the terms and conditions of the GNU General Public
10 * License. See the file COPYING in the main directory of this archive for
11 * more details.
12 */
13
14#ifndef AT91SAM9RL_H
15#define AT91SAM9RL_H
16
17/*
18 * Peripheral identifiers/interrupts.
19 */
20#define AT91_ID_FIQ 0 /* Advanced Interrupt Controller (FIQ) */
21#define AT91_ID_SYS 1 /* System Controller */
22#define AT91SAM9RL_ID_PIOA 2 /* Parallel IO Controller A */
23#define AT91SAM9RL_ID_PIOB 3 /* Parallel IO Controller B */
24#define AT91SAM9RL_ID_PIOC 4 /* Parallel IO Controller C */
25#define AT91SAM9RL_ID_PIOD 5 /* Parallel IO Controller D */
26#define AT91SAM9RL_ID_US0 6 /* USART 0 */
27#define AT91SAM9RL_ID_US1 7 /* USART 1 */
28#define AT91SAM9RL_ID_US2 8 /* USART 2 */
29#define AT91SAM9RL_ID_US3 9 /* USART 3 */
30#define AT91SAM9RL_ID_MCI 10 /* Multimedia Card Interface */
31#define AT91SAM9RL_ID_TWI0 11 /* TWI 0 */
32#define AT91SAM9RL_ID_TWI1 12 /* TWI 1 */
33#define AT91SAM9RL_ID_SPI 13 /* Serial Peripheral Interface */
34#define AT91SAM9RL_ID_SSC0 14 /* Serial Synchronous Controller 0 */
35#define AT91SAM9RL_ID_SSC1 15 /* Serial Synchronous Controller 1 */
36#define AT91SAM9RL_ID_TC0 16 /* Timer Counter 0 */
37#define AT91SAM9RL_ID_TC1 17 /* Timer Counter 1 */
38#define AT91SAM9RL_ID_TC2 18 /* Timer Counter 2 */
39#define AT91SAM9RL_ID_PWMC 19 /* Pulse Width Modulation Controller */
40#define AT91SAM9RL_ID_TSC 20 /* Touch Screen Controller */
41#define AT91SAM9RL_ID_DMA 21 /* DMA Controller */
42#define AT91SAM9RL_ID_UDPHS 22 /* USB Device HS */
43#define AT91SAM9RL_ID_LCDC 23 /* LCD Controller */
44#define AT91SAM9RL_ID_AC97C 24 /* AC97 Controller */
45#define AT91SAM9RL_ID_IRQ0 31 /* Advanced Interrupt Controller (IRQ0) */
46
47
48/*
49 * User Peripheral physical base addresses.
50 */
51#define AT91SAM9RL_BASE_TCB0 0xfffa0000
52#define AT91SAM9RL_BASE_TC0 0xfffa0000
53#define AT91SAM9RL_BASE_TC1 0xfffa0040
54#define AT91SAM9RL_BASE_TC2 0xfffa0080
55#define AT91SAM9RL_BASE_MCI 0xfffa4000
56#define AT91SAM9RL_BASE_TWI0 0xfffa8000
57#define AT91SAM9RL_BASE_TWI1 0xfffac000
58#define AT91SAM9RL_BASE_US0 0xfffb0000
59#define AT91SAM9RL_BASE_US1 0xfffb4000
60#define AT91SAM9RL_BASE_US2 0xfffb8000
61#define AT91SAM9RL_BASE_US3 0xfffbc000
62#define AT91SAM9RL_BASE_SSC0 0xfffc0000
63#define AT91SAM9RL_BASE_SSC1 0xfffc4000
64#define AT91SAM9RL_BASE_PWMC 0xfffc8000
65#define AT91SAM9RL_BASE_SPI 0xfffcc000
66#define AT91SAM9RL_BASE_TSC 0xfffd0000
67#define AT91SAM9RL_BASE_UDPHS 0xfffd4000
68#define AT91SAM9RL_BASE_AC97C 0xfffd8000
69#define AT91_BASE_SYS 0xffffc000
70
71
72/*
73 * System Peripherals (offset from AT91_BASE_SYS)
74 */
75#define AT91_DMA (0xffffe600 - AT91_BASE_SYS)
76#define AT91_ECC (0xffffe800 - AT91_BASE_SYS)
77#define AT91_SDRAMC (0xffffea00 - AT91_BASE_SYS)
78#define AT91_SMC (0xffffec00 - AT91_BASE_SYS)
79#define AT91_MATRIX (0xffffee00 - AT91_BASE_SYS)
80#define AT91_CCFG (0xffffef10 - AT91_BASE_SYS)
81#define AT91_AIC (0xfffff000 - AT91_BASE_SYS)
82#define AT91_DBGU (0xfffff200 - AT91_BASE_SYS)
83#define AT91_PIOA (0xfffff400 - AT91_BASE_SYS)
84#define AT91_PIOB (0xfffff600 - AT91_BASE_SYS)
85#define AT91_PIOC (0xfffff800 - AT91_BASE_SYS)
86#define AT91_PIOD (0xfffffa00 - AT91_BASE_SYS)
87#define AT91_PMC (0xfffffc00 - AT91_BASE_SYS)
88#define AT91_RSTC (0xfffffd00 - AT91_BASE_SYS)
89#define AT91_SHDWC (0xfffffd10 - AT91_BASE_SYS)
90#define AT91_RTT (0xfffffd20 - AT91_BASE_SYS)
91#define AT91_PIT (0xfffffd30 - AT91_BASE_SYS)
92#define AT91_WDT (0xfffffd40 - AT91_BASE_SYS)
93#define AT91_SCKCR (0xfffffd50 - AT91_BASE_SYS)
94#define AT91_GPBR (0xfffffd60 - AT91_BASE_SYS)
95#define AT91_RTC (0xfffffe00 - AT91_BASE_SYS)
96
97#define AT91_USART0 AT91SAM9RL_BASE_US0
98#define AT91_USART1 AT91SAM9RL_BASE_US1
99#define AT91_USART2 AT91SAM9RL_BASE_US2
100#define AT91_USART3 AT91SAM9RL_BASE_US3
101
102
103/*
104 * Internal Memory.
105 */
106#define AT91SAM9RL_SRAM_BASE 0x00300000 /* Internal SRAM base address */
107#define AT91SAM9RL_SRAM_SIZE SZ_16K /* Internal SRAM size (16Kb) */
108
109#define AT91SAM9RL_ROM_BASE 0x00400000 /* Internal ROM base address */
110#define AT91SAM9RL_ROM_SIZE (2 * SZ_16K) /* Internal ROM size (32Kb) */
111
112#define AT91SAM9RL_LCDC_BASE 0x00500000 /* LCD Controller */
113#define AT91SAM9RL_UDPHS_FIFO 0x00600000 /* USB Device HS controller */
114
115#endif
diff --git a/include/asm-arm/arch-at91/at91sam9rl_matrix.h b/include/asm-arm/arch-at91/at91sam9rl_matrix.h
deleted file mode 100644
index 84224174e6a1..000000000000
--- a/include/asm-arm/arch-at91/at91sam9rl_matrix.h
+++ /dev/null
@@ -1,96 +0,0 @@
1/*
2 * include/asm-arm/arch-at91/at91sam9rl_matrix.h
3 *
4 * Copyright (C) 2007 Atmel Corporation
5 *
6 * Memory Controllers (MATRIX, EBI) - System peripherals registers.
7 * Based on AT91SAM9RL datasheet revision A. (Preliminary)
8 *
9 * This file is subject to the terms and conditions of the GNU General Public
10 * License. See the file COPYING in the main directory of this archive for
11 * more details.
12 */
13
14#ifndef AT91SAM9RL_MATRIX_H
15#define AT91SAM9RL_MATRIX_H
16
17#define AT91_MATRIX_MCFG0 (AT91_MATRIX + 0x00) /* Master Configuration Register 0 */
18#define AT91_MATRIX_MCFG1 (AT91_MATRIX + 0x04) /* Master Configuration Register 1 */
19#define AT91_MATRIX_MCFG2 (AT91_MATRIX + 0x08) /* Master Configuration Register 2 */
20#define AT91_MATRIX_MCFG3 (AT91_MATRIX + 0x0C) /* Master Configuration Register 3 */
21#define AT91_MATRIX_MCFG4 (AT91_MATRIX + 0x10) /* Master Configuration Register 4 */
22#define AT91_MATRIX_MCFG5 (AT91_MATRIX + 0x14) /* Master Configuration Register 5 */
23#define AT91_MATRIX_ULBT (7 << 0) /* Undefined Length Burst Type */
24#define AT91_MATRIX_ULBT_INFINITE (0 << 0)
25#define AT91_MATRIX_ULBT_SINGLE (1 << 0)
26#define AT91_MATRIX_ULBT_FOUR (2 << 0)
27#define AT91_MATRIX_ULBT_EIGHT (3 << 0)
28#define AT91_MATRIX_ULBT_SIXTEEN (4 << 0)
29
30#define AT91_MATRIX_SCFG0 (AT91_MATRIX + 0x40) /* Slave Configuration Register 0 */
31#define AT91_MATRIX_SCFG1 (AT91_MATRIX + 0x44) /* Slave Configuration Register 1 */
32#define AT91_MATRIX_SCFG2 (AT91_MATRIX + 0x48) /* Slave Configuration Register 2 */
33#define AT91_MATRIX_SCFG3 (AT91_MATRIX + 0x4C) /* Slave Configuration Register 3 */
34#define AT91_MATRIX_SCFG4 (AT91_MATRIX + 0x50) /* Slave Configuration Register 4 */
35#define AT91_MATRIX_SCFG5 (AT91_MATRIX + 0x54) /* Slave Configuration Register 5 */
36#define AT91_MATRIX_SLOT_CYCLE (0xff << 0) /* Maximum Number of Allowed Cycles for a Burst */
37#define AT91_MATRIX_DEFMSTR_TYPE (3 << 16) /* Default Master Type */
38#define AT91_MATRIX_DEFMSTR_TYPE_NONE (0 << 16)
39#define AT91_MATRIX_DEFMSTR_TYPE_LAST (1 << 16)
40#define AT91_MATRIX_DEFMSTR_TYPE_FIXED (2 << 16)
41#define AT91_MATRIX_FIXED_DEFMSTR (0xf << 18) /* Fixed Index of Default Master */
42#define AT91_MATRIX_ARBT (3 << 24) /* Arbitration Type */
43#define AT91_MATRIX_ARBT_ROUND_ROBIN (0 << 24)
44#define AT91_MATRIX_ARBT_FIXED_PRIORITY (1 << 24)
45
46#define AT91_MATRIX_PRAS0 (AT91_MATRIX + 0x80) /* Priority Register A for Slave 0 */
47#define AT91_MATRIX_PRAS1 (AT91_MATRIX + 0x88) /* Priority Register A for Slave 1 */
48#define AT91_MATRIX_PRAS2 (AT91_MATRIX + 0x90) /* Priority Register A for Slave 2 */
49#define AT91_MATRIX_PRAS3 (AT91_MATRIX + 0x98) /* Priority Register A for Slave 3 */
50#define AT91_MATRIX_PRAS4 (AT91_MATRIX + 0xA0) /* Priority Register A for Slave 4 */
51#define AT91_MATRIX_PRAS5 (AT91_MATRIX + 0xA8) /* Priority Register A for Slave 5 */
52#define AT91_MATRIX_M0PR (3 << 0) /* Master 0 Priority */
53#define AT91_MATRIX_M1PR (3 << 4) /* Master 1 Priority */
54#define AT91_MATRIX_M2PR (3 << 8) /* Master 2 Priority */
55#define AT91_MATRIX_M3PR (3 << 12) /* Master 3 Priority */
56#define AT91_MATRIX_M4PR (3 << 16) /* Master 4 Priority */
57#define AT91_MATRIX_M5PR (3 << 20) /* Master 5 Priority */
58
59#define AT91_MATRIX_MRCR (AT91_MATRIX + 0x100) /* Master Remap Control Register */
60#define AT91_MATRIX_RCB0 (1 << 0) /* Remap Command for AHB Master 0 (ARM926EJ-S Instruction Master) */
61#define AT91_MATRIX_RCB1 (1 << 1) /* Remap Command for AHB Master 1 (ARM926EJ-S Data Master) */
62#define AT91_MATRIX_RCB2 (1 << 2)
63#define AT91_MATRIX_RCB3 (1 << 3)
64#define AT91_MATRIX_RCB4 (1 << 4)
65#define AT91_MATRIX_RCB5 (1 << 5)
66
67#define AT91_MATRIX_TCMR (AT91_MATRIX + 0x114) /* TCM Configuration Register */
68#define AT91_MATRIX_ITCM_SIZE (0xf << 0) /* Size of ITCM enabled memory block */
69#define AT91_MATRIX_ITCM_0 (0 << 0)
70#define AT91_MATRIX_ITCM_16 (5 << 0)
71#define AT91_MATRIX_ITCM_32 (6 << 0)
72#define AT91_MATRIX_DTCM_SIZE (0xf << 4) /* Size of DTCM enabled memory block */
73#define AT91_MATRIX_DTCM_0 (0 << 4)
74#define AT91_MATRIX_DTCM_16 (5 << 4)
75#define AT91_MATRIX_DTCM_32 (6 << 4)
76
77#define AT91_MATRIX_EBICSA (AT91_MATRIX + 0x120) /* EBI0 Chip Select Assignment Register */
78#define AT91_MATRIX_CS1A (1 << 1) /* Chip Select 1 Assignment */
79#define AT91_MATRIX_CS1A_SMC (0 << 1)
80#define AT91_MATRIX_CS1A_SDRAMC (1 << 1)
81#define AT91_MATRIX_CS3A (1 << 3) /* Chip Select 3 Assignment */
82#define AT91_MATRIX_CS3A_SMC (0 << 3)
83#define AT91_MATRIX_CS3A_SMC_SMARTMEDIA (1 << 3)
84#define AT91_MATRIX_CS4A (1 << 4) /* Chip Select 4 Assignment */
85#define AT91_MATRIX_CS4A_SMC (0 << 4)
86#define AT91_MATRIX_CS4A_SMC_CF1 (1 << 4)
87#define AT91_MATRIX_CS5A (1 << 5) /* Chip Select 5 Assignment */
88#define AT91_MATRIX_CS5A_SMC (0 << 5)
89#define AT91_MATRIX_CS5A_SMC_CF2 (1 << 5)
90#define AT91_MATRIX_DBPUC (1 << 8) /* Data Bus Pull-up Configuration */
91#define AT91_MATRIX_VDDIOMSEL (1 << 16) /* Memory voltage selection */
92#define AT91_MATRIX_VDDIOMSEL_1_8V (0 << 16)
93#define AT91_MATRIX_VDDIOMSEL_3_3V (1 << 16)
94
95
96#endif
diff --git a/include/asm-arm/arch-at91/at91x40.h b/include/asm-arm/arch-at91/at91x40.h
deleted file mode 100644
index 612203e0177f..000000000000
--- a/include/asm-arm/arch-at91/at91x40.h
+++ /dev/null
@@ -1,55 +0,0 @@
1/*
2 * include/asm-arm/arch-at91/at91x40.h
3 *
4 * (C) Copyright 2007, Greg Ungerer <gerg@snapgear.com>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 */
11
12#ifndef AT91X40_H
13#define AT91X40_H
14
15/*
16 * IRQ list.
17 */
18#define AT91_ID_FIQ 0 /* FIQ */
19#define AT91_ID_SYS 1 /* System Peripheral */
20#define AT91X40_ID_USART0 2 /* USART port 0 */
21#define AT91X40_ID_USART1 3 /* USART port 1 */
22#define AT91X40_ID_TC0 4 /* Timer/Counter 0 */
23#define AT91X40_ID_TC1 5 /* Timer/Counter 1*/
24#define AT91X40_ID_TC2 6 /* Timer/Counter 2*/
25#define AT91X40_ID_WD 7 /* Watchdog? */
26#define AT91X40_ID_PIOA 8 /* Parallel IO Controller A */
27
28#define AT91X40_ID_IRQ0 16 /* External IRQ 0 */
29#define AT91X40_ID_IRQ1 17 /* External IRQ 1 */
30#define AT91X40_ID_IRQ2 18 /* External IRQ 2 */
31
32/*
33 * System Peripherals (offset from AT91_BASE_SYS)
34 */
35#define AT91_BASE_SYS 0xffc00000
36
37#define AT91_EBI (0xffe00000 - AT91_BASE_SYS) /* External Bus Interface */
38#define AT91_SF (0xfff00000 - AT91_BASE_SYS) /* Special Function */
39#define AT91_USART1 (0xfffcc000 - AT91_BASE_SYS) /* USART 1 */
40#define AT91_USART0 (0xfffd0000 - AT91_BASE_SYS) /* USART 0 */
41#define AT91_TC (0xfffe0000 - AT91_BASE_SYS) /* Timer Counter */
42#define AT91_PIOA (0xffff0000 - AT91_BASE_SYS) /* PIO Controller A */
43#define AT91_PS (0xffff4000 - AT91_BASE_SYS) /* Power Save */
44#define AT91_WD (0xffff8000 - AT91_BASE_SYS) /* Watchdog Timer */
45#define AT91_AIC (0xfffff000 - AT91_BASE_SYS) /* Advanced Interrupt Controller */
46
47/*
48 * The AT91x40 series doesn't have a debug unit like the other AT91 parts.
49 * But it does have a chip identify register and extension ID, so define at
50 * least these here.
51 */
52#define AT91_DBGU_CIDR (AT91_SF + 0) /* CIDR in PS segment */
53#define AT91_DBGU_EXID (AT91_SF + 4) /* EXID in PS segment */
54
55#endif /* AT91X40_H */
diff --git a/include/asm-arm/arch-at91/board.h b/include/asm-arm/arch-at91/board.h
deleted file mode 100644
index 48bbd854f57d..000000000000
--- a/include/asm-arm/arch-at91/board.h
+++ /dev/null
@@ -1,172 +0,0 @@
1/*
2 * include/asm-arm/arch-at91/board.h
3 *
4 * Copyright (C) 2005 HP Labs
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20
21/*
22 * These are data structures found in platform_device.dev.platform_data,
23 * and describing board-specific data needed by drivers. For example,
24 * which pin is used for a given GPIO role.
25 *
26 * In 2.6, drivers should strongly avoid board-specific knowledge so
27 * that supporting new boards normally won't require driver patches.
28 * Most board-specific knowledge should be in arch/.../board-*.c files.
29 */
30
31#ifndef __ASM_ARCH_BOARD_H
32#define __ASM_ARCH_BOARD_H
33
34#include <linux/mtd/partitions.h>
35#include <linux/device.h>
36#include <linux/i2c.h>
37#include <linux/leds.h>
38#include <linux/spi/spi.h>
39#include <linux/usb/atmel_usba_udc.h>
40
41 /* USB Device */
42struct at91_udc_data {
43 u8 vbus_pin; /* high == host powering us */
44 u8 pullup_pin; /* active == D+ pulled up */
45 u8 pullup_active_low; /* true == pullup_pin is active low */
46};
47extern void __init at91_add_device_udc(struct at91_udc_data *data);
48
49 /* USB High Speed Device */
50extern void __init at91_add_device_usba(struct usba_platform_data *data);
51
52 /* Compact Flash */
53struct at91_cf_data {
54 u8 irq_pin; /* I/O IRQ */
55 u8 det_pin; /* Card detect */
56 u8 vcc_pin; /* power switching */
57 u8 rst_pin; /* card reset */
58 u8 chipselect; /* EBI Chip Select number */
59};
60extern void __init at91_add_device_cf(struct at91_cf_data *data);
61
62 /* MMC / SD */
63struct at91_mmc_data {
64 u8 det_pin; /* card detect IRQ */
65 unsigned slot_b:1; /* uses Slot B */
66 unsigned wire4:1; /* (SD) supports DAT0..DAT3 */
67 u8 wp_pin; /* (SD) writeprotect detect */
68 u8 vcc_pin; /* power switching (high == on) */
69};
70extern void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data);
71
72 /* Ethernet (EMAC & MACB) */
73struct at91_eth_data {
74 u32 phy_mask;
75 u8 phy_irq_pin; /* PHY IRQ */
76 u8 is_rmii; /* using RMII interface? */
77};
78extern void __init at91_add_device_eth(struct at91_eth_data *data);
79
80#if defined(CONFIG_ARCH_AT91SAM9260) || defined(CONFIG_ARCH_AT91SAM9263) || defined(CONFIG_ARCH_AT91SAM9G20) || defined(CONFIG_ARCH_AT91CAP9)
81#define eth_platform_data at91_eth_data
82#endif
83
84 /* USB Host */
85struct at91_usbh_data {
86 u8 ports; /* number of ports on root hub */
87 u8 vbus_pin[]; /* port power-control pin */
88};
89extern void __init at91_add_device_usbh(struct at91_usbh_data *data);
90
91 /* NAND / SmartMedia */
92struct atmel_nand_data {
93 u8 enable_pin; /* chip enable */
94 u8 det_pin; /* card detect */
95 u8 rdy_pin; /* ready/busy */
96 u8 ale; /* address line number connected to ALE */
97 u8 cle; /* address line number connected to CLE */
98 u8 bus_width_16; /* buswidth is 16 bit */
99 struct mtd_partition* (*partition_info)(int, int*);
100};
101extern void __init at91_add_device_nand(struct atmel_nand_data *data);
102
103 /* I2C*/
104extern void __init at91_add_device_i2c(struct i2c_board_info *devices, int nr_devices);
105
106 /* SPI */
107extern void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices);
108
109 /* Serial */
110#define ATMEL_UART_CTS 0x01
111#define ATMEL_UART_RTS 0x02
112#define ATMEL_UART_DSR 0x04
113#define ATMEL_UART_DTR 0x08
114#define ATMEL_UART_DCD 0x10
115#define ATMEL_UART_RI 0x20
116
117extern void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins);
118extern void __init at91_set_serial_console(unsigned portnr);
119
120struct at91_uart_config {
121 unsigned short console_tty; /* tty number of serial console */
122 unsigned short nr_tty; /* number of serial tty's */
123 short tty_map[]; /* map UART to tty number */
124};
125extern struct platform_device *atmel_default_console_device;
126extern void __init __deprecated at91_init_serial(struct at91_uart_config *config);
127
128struct atmel_uart_data {
129 short use_dma_tx; /* use transmit DMA? */
130 short use_dma_rx; /* use receive DMA? */
131 void __iomem *regs; /* virtual base address, if any */
132};
133extern void __init at91_add_device_serial(void);
134
135/*
136 * SSC -- accessed through ssc_request(id). Drivers don't bind to SSC
137 * platform devices. Their SSC ID is part of their configuration data,
138 * along with information about which SSC signals they should use.
139 */
140#define ATMEL_SSC_TK 0x01
141#define ATMEL_SSC_TF 0x02
142#define ATMEL_SSC_TD 0x04
143#define ATMEL_SSC_TX (ATMEL_SSC_TK | ATMEL_SSC_TF | ATMEL_SSC_TD)
144
145#define ATMEL_SSC_RK 0x10
146#define ATMEL_SSC_RF 0x20
147#define ATMEL_SSC_RD 0x40
148#define ATMEL_SSC_RX (ATMEL_SSC_RK | ATMEL_SSC_RF | ATMEL_SSC_RD)
149
150extern void __init at91_add_device_ssc(unsigned id, unsigned pins);
151
152 /* LCD Controller */
153struct atmel_lcdfb_info;
154extern void __init at91_add_device_lcdc(struct atmel_lcdfb_info *data);
155
156 /* AC97 */
157struct atmel_ac97_data {
158 u8 reset_pin; /* reset */
159};
160extern void __init at91_add_device_ac97(struct atmel_ac97_data *data);
161
162 /* ISI */
163extern void __init at91_add_device_isi(void);
164
165 /* LEDs */
166extern void __init at91_init_leds(u8 cpu_led, u8 timer_led);
167extern void __init at91_gpio_leds(struct gpio_led *leds, int nr);
168
169/* FIXME: this needs a better location, but gets stuff building again */
170extern int at91_suspend_entering_slow_clock(void);
171
172#endif
diff --git a/include/asm-arm/arch-at91/cpu.h b/include/asm-arm/arch-at91/cpu.h
deleted file mode 100644
index 52df794205cb..000000000000
--- a/include/asm-arm/arch-at91/cpu.h
+++ /dev/null
@@ -1,103 +0,0 @@
1/*
2 * include/asm-arm/arch-at91/cpu.h
3 *
4 * Copyright (C) 2006 SAN People
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 */
12
13#ifndef __ASM_ARCH_CPU_H
14#define __ASM_ARCH_CPU_H
15
16#include <asm/hardware.h>
17#include <asm/arch/at91_dbgu.h>
18
19
20#define ARCH_ID_AT91RM9200 0x09290780
21#define ARCH_ID_AT91SAM9260 0x019803a0
22#define ARCH_ID_AT91SAM9261 0x019703a0
23#define ARCH_ID_AT91SAM9263 0x019607a0
24#define ARCH_ID_AT91SAM9G20 0x019905a0
25#define ARCH_ID_AT91SAM9RL64 0x019b03a0
26#define ARCH_ID_AT91CAP9 0x039A03A0
27
28#define ARCH_ID_AT91SAM9XE128 0x329973a0
29#define ARCH_ID_AT91SAM9XE256 0x329a93a0
30#define ARCH_ID_AT91SAM9XE512 0x329aa3a0
31
32#define ARCH_ID_AT91M40800 0x14080044
33#define ARCH_ID_AT91R40807 0x44080746
34#define ARCH_ID_AT91M40807 0x14080745
35#define ARCH_ID_AT91R40008 0x44000840
36
37static inline unsigned long at91_cpu_identify(void)
38{
39 return (at91_sys_read(AT91_DBGU_CIDR) & ~AT91_CIDR_VERSION);
40}
41
42
43#define ARCH_FAMILY_AT91X92 0x09200000
44#define ARCH_FAMILY_AT91SAM9 0x01900000
45#define ARCH_FAMILY_AT91SAM9XE 0x02900000
46
47static inline unsigned long at91_arch_identify(void)
48{
49 return (at91_sys_read(AT91_DBGU_CIDR) & AT91_CIDR_ARCH);
50}
51
52
53#ifdef CONFIG_ARCH_AT91RM9200
54#define cpu_is_at91rm9200() (at91_cpu_identify() == ARCH_ID_AT91RM9200)
55#else
56#define cpu_is_at91rm9200() (0)
57#endif
58
59#ifdef CONFIG_ARCH_AT91SAM9260
60#define cpu_is_at91sam9xe() (at91_arch_identify() == ARCH_FAMILY_AT91SAM9XE)
61#define cpu_is_at91sam9260() ((at91_cpu_identify() == ARCH_ID_AT91SAM9260) || cpu_is_at91sam9xe())
62#else
63#define cpu_is_at91sam9xe() (0)
64#define cpu_is_at91sam9260() (0)
65#endif
66
67#ifdef CONFIG_ARCH_AT91SAM9G20
68#define cpu_is_at91sam9g20() (at91_cpu_identify() == ARCH_ID_AT91SAM9G20)
69#else
70#define cpu_is_at91sam9g20() (0)
71#endif
72
73#ifdef CONFIG_ARCH_AT91SAM9261
74#define cpu_is_at91sam9261() (at91_cpu_identify() == ARCH_ID_AT91SAM9261)
75#else
76#define cpu_is_at91sam9261() (0)
77#endif
78
79#ifdef CONFIG_ARCH_AT91SAM9263
80#define cpu_is_at91sam9263() (at91_cpu_identify() == ARCH_ID_AT91SAM9263)
81#else
82#define cpu_is_at91sam9263() (0)
83#endif
84
85#ifdef CONFIG_ARCH_AT91SAM9RL
86#define cpu_is_at91sam9rl() (at91_cpu_identify() == ARCH_ID_AT91SAM9RL64)
87#else
88#define cpu_is_at91sam9rl() (0)
89#endif
90
91#ifdef CONFIG_ARCH_AT91CAP9
92#define cpu_is_at91cap9() (at91_cpu_identify() == ARCH_ID_AT91CAP9)
93#else
94#define cpu_is_at91cap9() (0)
95#endif
96
97/*
98 * Since this is ARM, we will never run on any AVR32 CPU. But these
99 * definitions may reduce clutter in common drivers.
100 */
101#define cpu_is_at32ap7000() (0)
102
103#endif
diff --git a/include/asm-arm/arch-at91/debug-macro.S b/include/asm-arm/arch-at91/debug-macro.S
deleted file mode 100644
index 13e9f5e1d4ff..000000000000
--- a/include/asm-arm/arch-at91/debug-macro.S
+++ /dev/null
@@ -1,39 +0,0 @@
1/*
2 * include/asm-arm/arch-at91/debug-macro.S
3 *
4 * Copyright (C) 2003-2005 SAN People
5 *
6 * Debugging macro include header
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 *
12*/
13
14#include <asm/hardware.h>
15#include <asm/arch/at91_dbgu.h>
16
17 .macro addruart,rx
18 mrc p15, 0, \rx, c1, c0
19 tst \rx, #1 @ MMU enabled?
20 ldreq \rx, =(AT91_BASE_SYS + AT91_DBGU) @ System peripherals (phys address)
21 ldrne \rx, =(AT91_VA_BASE_SYS + AT91_DBGU) @ System peripherals (virt address)
22 .endm
23
24 .macro senduart,rd,rx
25 strb \rd, [\rx, #(AT91_DBGU_THR - AT91_DBGU)] @ Write to Transmitter Holding Register
26 .endm
27
28 .macro waituart,rd,rx
291001: ldr \rd, [\rx, #(AT91_DBGU_SR - AT91_DBGU)] @ Read Status Register
30 tst \rd, #AT91_DBGU_TXRDY @ DBGU_TXRDY = 1 when ready to transmit
31 beq 1001b
32 .endm
33
34 .macro busyuart,rd,rx
351001: ldr \rd, [\rx, #(AT91_DBGU_SR - AT91_DBGU)] @ Read Status Register
36 tst \rd, #AT91_DBGU_TXEMPTY @ DBGU_TXEMPTY = 1 when transmission complete
37 beq 1001b
38 .endm
39
diff --git a/include/asm-arm/arch-at91/dma.h b/include/asm-arm/arch-at91/dma.h
deleted file mode 100644
index 774565412beb..000000000000
--- a/include/asm-arm/arch-at91/dma.h
+++ /dev/null
@@ -1,19 +0,0 @@
1/*
2 * include/asm-arm/arch-at91/dma.h
3 *
4 * Copyright (C) 2003 SAN People
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
diff --git a/include/asm-arm/arch-at91/entry-macro.S b/include/asm-arm/arch-at91/entry-macro.S
deleted file mode 100644
index 1005eee6219b..000000000000
--- a/include/asm-arm/arch-at91/entry-macro.S
+++ /dev/null
@@ -1,32 +0,0 @@
1/*
2 * include/asm-arm/arch-at91/entry-macro.S
3 *
4 * Copyright (C) 2003-2005 SAN People
5 *
6 * Low-level IRQ helper macros for AT91RM9200 platforms
7 *
8 * This file is licensed under the terms of the GNU General Public
9 * License version 2. This program is licensed "as is" without any
10 * warranty of any kind, whether express or implied.
11 */
12
13#include <asm/hardware.h>
14#include <asm/arch/at91_aic.h>
15
16 .macro disable_fiq
17 .endm
18
19 .macro get_irqnr_preamble, base, tmp
20 ldr \base, =(AT91_VA_BASE_SYS + AT91_AIC) @ base virtual address of AIC peripheral
21 .endm
22
23 .macro arch_ret_to_user, tmp1, tmp2
24 .endm
25
26 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
27 ldr \irqnr, [\base, #(AT91_AIC_IVR - AT91_AIC)] @ read IRQ vector register: de-asserts nIRQ to processor (and clears interrupt)
28 ldr \irqstat, [\base, #(AT91_AIC_ISR - AT91_AIC)] @ read interrupt source number
29 teq \irqstat, #0 @ ISR is 0 when no current interrupt, or spurious interrupt
30 streq \tmp, [\base, #(AT91_AIC_EOICR - AT91_AIC)] @ not going to be handled further, then ACK it now.
31 .endm
32
diff --git a/include/asm-arm/arch-at91/gpio.h b/include/asm-arm/arch-at91/gpio.h
deleted file mode 100644
index 0a241e2fb672..000000000000
--- a/include/asm-arm/arch-at91/gpio.h
+++ /dev/null
@@ -1,252 +0,0 @@
1/*
2 * include/asm-arm/arch-at91/gpio.h
3 *
4 * Copyright (C) 2005 HP Labs
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 */
12
13#ifndef __ASM_ARCH_AT91RM9200_GPIO_H
14#define __ASM_ARCH_AT91RM9200_GPIO_H
15
16#include <asm/irq.h>
17
18#define PIN_BASE NR_AIC_IRQS
19
20#define MAX_GPIO_BANKS 5
21
22/* these pin numbers double as IRQ numbers, like AT91xxx_ID_* values */
23
24#define AT91_PIN_PA0 (PIN_BASE + 0x00 + 0)
25#define AT91_PIN_PA1 (PIN_BASE + 0x00 + 1)
26#define AT91_PIN_PA2 (PIN_BASE + 0x00 + 2)
27#define AT91_PIN_PA3 (PIN_BASE + 0x00 + 3)
28#define AT91_PIN_PA4 (PIN_BASE + 0x00 + 4)
29#define AT91_PIN_PA5 (PIN_BASE + 0x00 + 5)
30#define AT91_PIN_PA6 (PIN_BASE + 0x00 + 6)
31#define AT91_PIN_PA7 (PIN_BASE + 0x00 + 7)
32#define AT91_PIN_PA8 (PIN_BASE + 0x00 + 8)
33#define AT91_PIN_PA9 (PIN_BASE + 0x00 + 9)
34#define AT91_PIN_PA10 (PIN_BASE + 0x00 + 10)
35#define AT91_PIN_PA11 (PIN_BASE + 0x00 + 11)
36#define AT91_PIN_PA12 (PIN_BASE + 0x00 + 12)
37#define AT91_PIN_PA13 (PIN_BASE + 0x00 + 13)
38#define AT91_PIN_PA14 (PIN_BASE + 0x00 + 14)
39#define AT91_PIN_PA15 (PIN_BASE + 0x00 + 15)
40#define AT91_PIN_PA16 (PIN_BASE + 0x00 + 16)
41#define AT91_PIN_PA17 (PIN_BASE + 0x00 + 17)
42#define AT91_PIN_PA18 (PIN_BASE + 0x00 + 18)
43#define AT91_PIN_PA19 (PIN_BASE + 0x00 + 19)
44#define AT91_PIN_PA20 (PIN_BASE + 0x00 + 20)
45#define AT91_PIN_PA21 (PIN_BASE + 0x00 + 21)
46#define AT91_PIN_PA22 (PIN_BASE + 0x00 + 22)
47#define AT91_PIN_PA23 (PIN_BASE + 0x00 + 23)
48#define AT91_PIN_PA24 (PIN_BASE + 0x00 + 24)
49#define AT91_PIN_PA25 (PIN_BASE + 0x00 + 25)
50#define AT91_PIN_PA26 (PIN_BASE + 0x00 + 26)
51#define AT91_PIN_PA27 (PIN_BASE + 0x00 + 27)
52#define AT91_PIN_PA28 (PIN_BASE + 0x00 + 28)
53#define AT91_PIN_PA29 (PIN_BASE + 0x00 + 29)
54#define AT91_PIN_PA30 (PIN_BASE + 0x00 + 30)
55#define AT91_PIN_PA31 (PIN_BASE + 0x00 + 31)
56
57#define AT91_PIN_PB0 (PIN_BASE + 0x20 + 0)
58#define AT91_PIN_PB1 (PIN_BASE + 0x20 + 1)
59#define AT91_PIN_PB2 (PIN_BASE + 0x20 + 2)
60#define AT91_PIN_PB3 (PIN_BASE + 0x20 + 3)
61#define AT91_PIN_PB4 (PIN_BASE + 0x20 + 4)
62#define AT91_PIN_PB5 (PIN_BASE + 0x20 + 5)
63#define AT91_PIN_PB6 (PIN_BASE + 0x20 + 6)
64#define AT91_PIN_PB7 (PIN_BASE + 0x20 + 7)
65#define AT91_PIN_PB8 (PIN_BASE + 0x20 + 8)
66#define AT91_PIN_PB9 (PIN_BASE + 0x20 + 9)
67#define AT91_PIN_PB10 (PIN_BASE + 0x20 + 10)
68#define AT91_PIN_PB11 (PIN_BASE + 0x20 + 11)
69#define AT91_PIN_PB12 (PIN_BASE + 0x20 + 12)
70#define AT91_PIN_PB13 (PIN_BASE + 0x20 + 13)
71#define AT91_PIN_PB14 (PIN_BASE + 0x20 + 14)
72#define AT91_PIN_PB15 (PIN_BASE + 0x20 + 15)
73#define AT91_PIN_PB16 (PIN_BASE + 0x20 + 16)
74#define AT91_PIN_PB17 (PIN_BASE + 0x20 + 17)
75#define AT91_PIN_PB18 (PIN_BASE + 0x20 + 18)
76#define AT91_PIN_PB19 (PIN_BASE + 0x20 + 19)
77#define AT91_PIN_PB20 (PIN_BASE + 0x20 + 20)
78#define AT91_PIN_PB21 (PIN_BASE + 0x20 + 21)
79#define AT91_PIN_PB22 (PIN_BASE + 0x20 + 22)
80#define AT91_PIN_PB23 (PIN_BASE + 0x20 + 23)
81#define AT91_PIN_PB24 (PIN_BASE + 0x20 + 24)
82#define AT91_PIN_PB25 (PIN_BASE + 0x20 + 25)
83#define AT91_PIN_PB26 (PIN_BASE + 0x20 + 26)
84#define AT91_PIN_PB27 (PIN_BASE + 0x20 + 27)
85#define AT91_PIN_PB28 (PIN_BASE + 0x20 + 28)
86#define AT91_PIN_PB29 (PIN_BASE + 0x20 + 29)
87#define AT91_PIN_PB30 (PIN_BASE + 0x20 + 30)
88#define AT91_PIN_PB31 (PIN_BASE + 0x20 + 31)
89
90#define AT91_PIN_PC0 (PIN_BASE + 0x40 + 0)
91#define AT91_PIN_PC1 (PIN_BASE + 0x40 + 1)
92#define AT91_PIN_PC2 (PIN_BASE + 0x40 + 2)
93#define AT91_PIN_PC3 (PIN_BASE + 0x40 + 3)
94#define AT91_PIN_PC4 (PIN_BASE + 0x40 + 4)
95#define AT91_PIN_PC5 (PIN_BASE + 0x40 + 5)
96#define AT91_PIN_PC6 (PIN_BASE + 0x40 + 6)
97#define AT91_PIN_PC7 (PIN_BASE + 0x40 + 7)
98#define AT91_PIN_PC8 (PIN_BASE + 0x40 + 8)
99#define AT91_PIN_PC9 (PIN_BASE + 0x40 + 9)
100#define AT91_PIN_PC10 (PIN_BASE + 0x40 + 10)
101#define AT91_PIN_PC11 (PIN_BASE + 0x40 + 11)
102#define AT91_PIN_PC12 (PIN_BASE + 0x40 + 12)
103#define AT91_PIN_PC13 (PIN_BASE + 0x40 + 13)
104#define AT91_PIN_PC14 (PIN_BASE + 0x40 + 14)
105#define AT91_PIN_PC15 (PIN_BASE + 0x40 + 15)
106#define AT91_PIN_PC16 (PIN_BASE + 0x40 + 16)
107#define AT91_PIN_PC17 (PIN_BASE + 0x40 + 17)
108#define AT91_PIN_PC18 (PIN_BASE + 0x40 + 18)
109#define AT91_PIN_PC19 (PIN_BASE + 0x40 + 19)
110#define AT91_PIN_PC20 (PIN_BASE + 0x40 + 20)
111#define AT91_PIN_PC21 (PIN_BASE + 0x40 + 21)
112#define AT91_PIN_PC22 (PIN_BASE + 0x40 + 22)
113#define AT91_PIN_PC23 (PIN_BASE + 0x40 + 23)
114#define AT91_PIN_PC24 (PIN_BASE + 0x40 + 24)
115#define AT91_PIN_PC25 (PIN_BASE + 0x40 + 25)
116#define AT91_PIN_PC26 (PIN_BASE + 0x40 + 26)
117#define AT91_PIN_PC27 (PIN_BASE + 0x40 + 27)
118#define AT91_PIN_PC28 (PIN_BASE + 0x40 + 28)
119#define AT91_PIN_PC29 (PIN_BASE + 0x40 + 29)
120#define AT91_PIN_PC30 (PIN_BASE + 0x40 + 30)
121#define AT91_PIN_PC31 (PIN_BASE + 0x40 + 31)
122
123#define AT91_PIN_PD0 (PIN_BASE + 0x60 + 0)
124#define AT91_PIN_PD1 (PIN_BASE + 0x60 + 1)
125#define AT91_PIN_PD2 (PIN_BASE + 0x60 + 2)
126#define AT91_PIN_PD3 (PIN_BASE + 0x60 + 3)
127#define AT91_PIN_PD4 (PIN_BASE + 0x60 + 4)
128#define AT91_PIN_PD5 (PIN_BASE + 0x60 + 5)
129#define AT91_PIN_PD6 (PIN_BASE + 0x60 + 6)
130#define AT91_PIN_PD7 (PIN_BASE + 0x60 + 7)
131#define AT91_PIN_PD8 (PIN_BASE + 0x60 + 8)
132#define AT91_PIN_PD9 (PIN_BASE + 0x60 + 9)
133#define AT91_PIN_PD10 (PIN_BASE + 0x60 + 10)
134#define AT91_PIN_PD11 (PIN_BASE + 0x60 + 11)
135#define AT91_PIN_PD12 (PIN_BASE + 0x60 + 12)
136#define AT91_PIN_PD13 (PIN_BASE + 0x60 + 13)
137#define AT91_PIN_PD14 (PIN_BASE + 0x60 + 14)
138#define AT91_PIN_PD15 (PIN_BASE + 0x60 + 15)
139#define AT91_PIN_PD16 (PIN_BASE + 0x60 + 16)
140#define AT91_PIN_PD17 (PIN_BASE + 0x60 + 17)
141#define AT91_PIN_PD18 (PIN_BASE + 0x60 + 18)
142#define AT91_PIN_PD19 (PIN_BASE + 0x60 + 19)
143#define AT91_PIN_PD20 (PIN_BASE + 0x60 + 20)
144#define AT91_PIN_PD21 (PIN_BASE + 0x60 + 21)
145#define AT91_PIN_PD22 (PIN_BASE + 0x60 + 22)
146#define AT91_PIN_PD23 (PIN_BASE + 0x60 + 23)
147#define AT91_PIN_PD24 (PIN_BASE + 0x60 + 24)
148#define AT91_PIN_PD25 (PIN_BASE + 0x60 + 25)
149#define AT91_PIN_PD26 (PIN_BASE + 0x60 + 26)
150#define AT91_PIN_PD27 (PIN_BASE + 0x60 + 27)
151#define AT91_PIN_PD28 (PIN_BASE + 0x60 + 28)
152#define AT91_PIN_PD29 (PIN_BASE + 0x60 + 29)
153#define AT91_PIN_PD30 (PIN_BASE + 0x60 + 30)
154#define AT91_PIN_PD31 (PIN_BASE + 0x60 + 31)
155
156#define AT91_PIN_PE0 (PIN_BASE + 0x80 + 0)
157#define AT91_PIN_PE1 (PIN_BASE + 0x80 + 1)
158#define AT91_PIN_PE2 (PIN_BASE + 0x80 + 2)
159#define AT91_PIN_PE3 (PIN_BASE + 0x80 + 3)
160#define AT91_PIN_PE4 (PIN_BASE + 0x80 + 4)
161#define AT91_PIN_PE5 (PIN_BASE + 0x80 + 5)
162#define AT91_PIN_PE6 (PIN_BASE + 0x80 + 6)
163#define AT91_PIN_PE7 (PIN_BASE + 0x80 + 7)
164#define AT91_PIN_PE8 (PIN_BASE + 0x80 + 8)
165#define AT91_PIN_PE9 (PIN_BASE + 0x80 + 9)
166#define AT91_PIN_PE10 (PIN_BASE + 0x80 + 10)
167#define AT91_PIN_PE11 (PIN_BASE + 0x80 + 11)
168#define AT91_PIN_PE12 (PIN_BASE + 0x80 + 12)
169#define AT91_PIN_PE13 (PIN_BASE + 0x80 + 13)
170#define AT91_PIN_PE14 (PIN_BASE + 0x80 + 14)
171#define AT91_PIN_PE15 (PIN_BASE + 0x80 + 15)
172#define AT91_PIN_PE16 (PIN_BASE + 0x80 + 16)
173#define AT91_PIN_PE17 (PIN_BASE + 0x80 + 17)
174#define AT91_PIN_PE18 (PIN_BASE + 0x80 + 18)
175#define AT91_PIN_PE19 (PIN_BASE + 0x80 + 19)
176#define AT91_PIN_PE20 (PIN_BASE + 0x80 + 20)
177#define AT91_PIN_PE21 (PIN_BASE + 0x80 + 21)
178#define AT91_PIN_PE22 (PIN_BASE + 0x80 + 22)
179#define AT91_PIN_PE23 (PIN_BASE + 0x80 + 23)
180#define AT91_PIN_PE24 (PIN_BASE + 0x80 + 24)
181#define AT91_PIN_PE25 (PIN_BASE + 0x80 + 25)
182#define AT91_PIN_PE26 (PIN_BASE + 0x80 + 26)
183#define AT91_PIN_PE27 (PIN_BASE + 0x80 + 27)
184#define AT91_PIN_PE28 (PIN_BASE + 0x80 + 28)
185#define AT91_PIN_PE29 (PIN_BASE + 0x80 + 29)
186#define AT91_PIN_PE30 (PIN_BASE + 0x80 + 30)
187#define AT91_PIN_PE31 (PIN_BASE + 0x80 + 31)
188
189#ifndef __ASSEMBLY__
190/* setup setup routines, called from board init or driver probe() */
191extern int __init_or_module at91_set_GPIO_periph(unsigned pin, int use_pullup);
192extern int __init_or_module at91_set_A_periph(unsigned pin, int use_pullup);
193extern int __init_or_module at91_set_B_periph(unsigned pin, int use_pullup);
194extern int __init_or_module at91_set_gpio_input(unsigned pin, int use_pullup);
195extern int __init_or_module at91_set_gpio_output(unsigned pin, int value);
196extern int __init_or_module at91_set_deglitch(unsigned pin, int is_on);
197extern int __init_or_module at91_set_multi_drive(unsigned pin, int is_on);
198
199/* callable at any time */
200extern int at91_set_gpio_value(unsigned pin, int value);
201extern int at91_get_gpio_value(unsigned pin);
202
203/* callable only from core power-management code */
204extern void at91_gpio_suspend(void);
205extern void at91_gpio_resume(void);
206
207/*-------------------------------------------------------------------------*/
208
209/* wrappers for "new style" GPIO calls. the old AT91-specfic ones should
210 * eventually be removed (along with this errno.h inclusion), and the
211 * gpio request/free calls should probably be implemented.
212 */
213
214#include <asm/errno.h>
215
216static inline int gpio_request(unsigned gpio, const char *label)
217{
218 return 0;
219}
220
221static inline void gpio_free(unsigned gpio)
222{
223}
224
225extern int gpio_direction_input(unsigned gpio);
226extern int gpio_direction_output(unsigned gpio, int value);
227
228static inline int gpio_get_value(unsigned gpio)
229{
230 return at91_get_gpio_value(gpio);
231}
232
233static inline void gpio_set_value(unsigned gpio, int value)
234{
235 at91_set_gpio_value(gpio, value);
236}
237
238#include <asm-generic/gpio.h> /* cansleep wrappers */
239
240static inline int gpio_to_irq(unsigned gpio)
241{
242 return gpio;
243}
244
245static inline int irq_to_gpio(unsigned irq)
246{
247 return irq;
248}
249
250#endif /* __ASSEMBLY__ */
251
252#endif
diff --git a/include/asm-arm/arch-at91/hardware.h b/include/asm-arm/arch-at91/hardware.h
deleted file mode 100644
index 016a3a3f6633..000000000000
--- a/include/asm-arm/arch-at91/hardware.h
+++ /dev/null
@@ -1,92 +0,0 @@
1/*
2 * include/asm-arm/arch-at91/hardware.h
3 *
4 * Copyright (C) 2003 SAN People
5 * Copyright (C) 2003 ATMEL
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 */
13
14#ifndef __ASM_ARCH_HARDWARE_H
15#define __ASM_ARCH_HARDWARE_H
16
17#include <asm/sizes.h>
18
19#if defined(CONFIG_ARCH_AT91RM9200)
20#include <asm/arch/at91rm9200.h>
21#elif defined(CONFIG_ARCH_AT91SAM9260) || defined(CONFIG_ARCH_AT91SAM9G20)
22#include <asm/arch/at91sam9260.h>
23#elif defined(CONFIG_ARCH_AT91SAM9261)
24#include <asm/arch/at91sam9261.h>
25#elif defined(CONFIG_ARCH_AT91SAM9263)
26#include <asm/arch/at91sam9263.h>
27#elif defined(CONFIG_ARCH_AT91SAM9RL)
28#include <asm/arch/at91sam9rl.h>
29#elif defined(CONFIG_ARCH_AT91CAP9)
30#include <asm/arch/at91cap9.h>
31#elif defined(CONFIG_ARCH_AT91X40)
32#include <asm/arch/at91x40.h>
33#else
34#error "Unsupported AT91 processor"
35#endif
36
37
38#ifdef CONFIG_MMU
39/*
40 * Remap the peripherals from address 0xFFF78000 .. 0xFFFFFFFF
41 * to 0xFEF78000 .. 0xFF000000. (544Kb)
42 */
43#define AT91_IO_PHYS_BASE 0xFFF78000
44#define AT91_IO_VIRT_BASE (0xFF000000 - AT91_IO_SIZE)
45#else
46/*
47 * Identity mapping for the non MMU case.
48 */
49#define AT91_IO_PHYS_BASE AT91_BASE_SYS
50#define AT91_IO_VIRT_BASE AT91_IO_PHYS_BASE
51#endif
52
53#define AT91_IO_SIZE (0xFFFFFFFF - AT91_IO_PHYS_BASE + 1)
54
55 /* Convert a physical IO address to virtual IO address */
56#define AT91_IO_P2V(x) ((x) - AT91_IO_PHYS_BASE + AT91_IO_VIRT_BASE)
57
58/*
59 * Virtual to Physical Address mapping for IO devices.
60 */
61#define AT91_VA_BASE_SYS AT91_IO_P2V(AT91_BASE_SYS)
62#define AT91_VA_BASE_EMAC AT91_IO_P2V(AT91RM9200_BASE_EMAC)
63
64 /* Internal SRAM is mapped below the IO devices */
65#define AT91_SRAM_MAX SZ_1M
66#define AT91_VIRT_BASE (AT91_IO_VIRT_BASE - AT91_SRAM_MAX)
67
68/* Serial ports */
69#define ATMEL_MAX_UART 7 /* 6 USART3's and one DBGU port (SAM9260) */
70
71/* External Memory Map */
72#define AT91_CHIPSELECT_0 0x10000000
73#define AT91_CHIPSELECT_1 0x20000000
74#define AT91_CHIPSELECT_2 0x30000000
75#define AT91_CHIPSELECT_3 0x40000000
76#define AT91_CHIPSELECT_4 0x50000000
77#define AT91_CHIPSELECT_5 0x60000000
78#define AT91_CHIPSELECT_6 0x70000000
79#define AT91_CHIPSELECT_7 0x80000000
80
81/* SDRAM */
82#ifdef CONFIG_DRAM_BASE
83#define AT91_SDRAM_BASE CONFIG_DRAM_BASE
84#else
85#define AT91_SDRAM_BASE AT91_CHIPSELECT_1
86#endif
87
88/* Clocks */
89#define AT91_SLOW_CLOCK 32768 /* slow clock */
90
91
92#endif
diff --git a/include/asm-arm/arch-at91/io.h b/include/asm-arm/arch-at91/io.h
deleted file mode 100644
index f8beaa228467..000000000000
--- a/include/asm-arm/arch-at91/io.h
+++ /dev/null
@@ -1,48 +0,0 @@
1/*
2 * include/asm-arm/arch-at91/io.h
3 *
4 * Copyright (C) 2003 SAN People
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20
21#ifndef __ASM_ARCH_IO_H
22#define __ASM_ARCH_IO_H
23
24#define IO_SPACE_LIMIT 0xFFFFFFFF
25
26#define __io(a) ((void __iomem *)(a))
27#define __mem_pci(a) (a)
28
29
30#ifndef __ASSEMBLY__
31
32static inline unsigned int at91_sys_read(unsigned int reg_offset)
33{
34 void __iomem *addr = (void __iomem *)AT91_VA_BASE_SYS;
35
36 return __raw_readl(addr + reg_offset);
37}
38
39static inline void at91_sys_write(unsigned int reg_offset, unsigned long value)
40{
41 void __iomem *addr = (void __iomem *)AT91_VA_BASE_SYS;
42
43 __raw_writel(value, addr + reg_offset);
44}
45
46#endif
47
48#endif
diff --git a/include/asm-arm/arch-at91/irqs.h b/include/asm-arm/arch-at91/irqs.h
deleted file mode 100644
index 70b1216dce5d..000000000000
--- a/include/asm-arm/arch-at91/irqs.h
+++ /dev/null
@@ -1,48 +0,0 @@
1/*
2 * include/asm-arm/arch-at91/irqs.h
3 *
4 * Copyright (C) 2004 SAN People
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20
21#ifndef __ASM_ARCH_IRQS_H
22#define __ASM_ARCH_IRQS_H
23
24#include <asm/io.h>
25#include <asm/arch/at91_aic.h>
26
27#define NR_AIC_IRQS 32
28
29
30/*
31 * Acknowledge interrupt with AIC after interrupt has been handled.
32 * (by kernel/irq.c)
33 */
34#define irq_finish(irq) do { at91_sys_write(AT91_AIC_EOICR, 0); } while (0)
35
36
37/*
38 * IRQ interrupt symbols are the AT91xxx_ID_* symbols
39 * for IRQs handled directly through the AIC, or else the AT91_PIN_*
40 * symbols in gpio.h for ones handled indirectly as GPIOs.
41 * We make provision for 5 banks of GPIO.
42 */
43#define NR_IRQS (NR_AIC_IRQS + (5 * 32))
44
45/* FIQ is AIC source 0. */
46#define FIQ_START AT91_ID_FIQ
47
48#endif
diff --git a/include/asm-arm/arch-at91/memory.h b/include/asm-arm/arch-at91/memory.h
deleted file mode 100644
index 4835d6784509..000000000000
--- a/include/asm-arm/arch-at91/memory.h
+++ /dev/null
@@ -1,39 +0,0 @@
1/*
2 * include/asm-arm/arch-at91/memory.h
3 *
4 * Copyright (C) 2004 SAN People
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20
21#ifndef __ASM_ARCH_MEMORY_H
22#define __ASM_ARCH_MEMORY_H
23
24#include <asm/hardware.h>
25
26#define PHYS_OFFSET (AT91_SDRAM_BASE)
27
28
29/*
30 * Virtual view <-> DMA view memory address translations
31 * virt_to_bus: Used to translate the virtual address to an
32 * address suitable to be passed to set_dma_addr
33 * bus_to_virt: Used to convert an address for DMA operations
34 * to an address that the kernel can use.
35 */
36#define __virt_to_bus(x) __virt_to_phys(x)
37#define __bus_to_virt(x) __phys_to_virt(x)
38
39#endif
diff --git a/include/asm-arm/arch-at91/system.h b/include/asm-arm/arch-at91/system.h
deleted file mode 100644
index 6bf846098ea9..000000000000
--- a/include/asm-arm/arch-at91/system.h
+++ /dev/null
@@ -1,53 +0,0 @@
1/*
2 * include/asm-arm/arch-at91/system.h
3 *
4 * Copyright (C) 2003 SAN People
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20
21#ifndef __ASM_ARCH_SYSTEM_H
22#define __ASM_ARCH_SYSTEM_H
23
24#include <asm/hardware.h>
25#include <asm/arch/at91_st.h>
26#include <asm/arch/at91_dbgu.h>
27
28static inline void arch_idle(void)
29{
30 /*
31 * Disable the processor clock. The processor will be automatically
32 * re-enabled by an interrupt or by a reset.
33 */
34// at91_sys_write(AT91_PMC_SCDR, AT91_PMC_PCK);
35
36 /*
37 * Set the processor (CP15) into 'Wait for Interrupt' mode.
38 * Unlike disabling the processor clock via the PMC (above)
39 * this allows the processor to be woken via JTAG.
40 */
41 cpu_do_idle();
42}
43
44void (*at91_arch_reset)(void);
45
46static inline void arch_reset(char mode)
47{
48 /* call the CPU-specific reset function */
49 if (at91_arch_reset)
50 (at91_arch_reset)();
51}
52
53#endif
diff --git a/include/asm-arm/arch-at91/timex.h b/include/asm-arm/arch-at91/timex.h
deleted file mode 100644
index 298d8313cdac..000000000000
--- a/include/asm-arm/arch-at91/timex.h
+++ /dev/null
@@ -1,77 +0,0 @@
1/*
2 * include/asm-arm/arch-at91/timex.h
3 *
4 * Copyright (C) 2003 SAN People
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20
21#ifndef __ASM_ARCH_TIMEX_H
22#define __ASM_ARCH_TIMEX_H
23
24#include <asm/hardware.h>
25
26#if defined(CONFIG_ARCH_AT91RM9200)
27
28#define CLOCK_TICK_RATE (AT91_SLOW_CLOCK)
29
30#elif defined(CONFIG_ARCH_AT91SAM9260)
31
32#if defined(CONFIG_MACH_USB_A9260) || defined(CONFIG_MACH_QIL_A9260)
33#define AT91SAM9_MASTER_CLOCK 90000000
34#else
35#define AT91SAM9_MASTER_CLOCK 99300000
36#endif
37
38#define CLOCK_TICK_RATE (AT91SAM9_MASTER_CLOCK/16)
39
40#elif defined(CONFIG_ARCH_AT91SAM9261)
41
42#define AT91SAM9_MASTER_CLOCK 99300000
43#define CLOCK_TICK_RATE (AT91SAM9_MASTER_CLOCK/16)
44
45#elif defined(CONFIG_ARCH_AT91SAM9263)
46
47#if defined(CONFIG_MACH_USB_A9263)
48#define AT91SAM9_MASTER_CLOCK 90000000
49#else
50#define AT91SAM9_MASTER_CLOCK 99959500
51#endif
52
53#define CLOCK_TICK_RATE (AT91SAM9_MASTER_CLOCK/16)
54
55#elif defined(CONFIG_ARCH_AT91SAM9RL)
56
57#define AT91SAM9_MASTER_CLOCK 100000000
58#define CLOCK_TICK_RATE (AT91SAM9_MASTER_CLOCK/16)
59
60#elif defined(CONFIG_ARCH_AT91SAM9G20)
61
62#define AT91SAM9_MASTER_CLOCK 132096000
63#define CLOCK_TICK_RATE (AT91SAM9_MASTER_CLOCK/16)
64
65#elif defined(CONFIG_ARCH_AT91CAP9)
66
67#define AT91CAP9_MASTER_CLOCK 100000000
68#define CLOCK_TICK_RATE (AT91CAP9_MASTER_CLOCK/16)
69
70#elif defined(CONFIG_ARCH_AT91X40)
71
72#define AT91X40_MASTER_CLOCK 40000000
73#define CLOCK_TICK_RATE (AT91X40_MASTER_CLOCK)
74
75#endif
76
77#endif
diff --git a/include/asm-arm/arch-at91/uncompress.h b/include/asm-arm/arch-at91/uncompress.h
deleted file mode 100644
index f5636a8f6132..000000000000
--- a/include/asm-arm/arch-at91/uncompress.h
+++ /dev/null
@@ -1,76 +0,0 @@
1/*
2 * include/asm-arm/arch-at91/uncompress.h
3 *
4 * Copyright (C) 2003 SAN People
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20
21#ifndef __ASM_ARCH_UNCOMPRESS_H
22#define __ASM_ARCH_UNCOMPRESS_H
23
24#include <asm/io.h>
25#include <linux/atmel_serial.h>
26
27#if defined(CONFIG_AT91_EARLY_DBGU)
28#define UART_OFFSET (AT91_DBGU + AT91_BASE_SYS)
29#elif defined(CONFIG_AT91_EARLY_USART0)
30#define UART_OFFSET AT91_USART0
31#elif defined(CONFIG_AT91_EARLY_USART1)
32#define UART_OFFSET AT91_USART1
33#elif defined(CONFIG_AT91_EARLY_USART2)
34#define UART_OFFSET AT91_USART2
35#elif defined(CONFIG_AT91_EARLY_USART3)
36#define UART_OFFSET AT91_USART3
37#elif defined(CONFIG_AT91_EARLY_USART4)
38#define UART_OFFSET AT91_USART4
39#elif defined(CONFIG_AT91_EARLY_USART5)
40#define UART_OFFSET AT91_USART5
41#endif
42
43/*
44 * The following code assumes the serial port has already been
45 * initialized by the bootloader. If you didn't setup a port in
46 * your bootloader then nothing will appear (which might be desired).
47 *
48 * This does not append a newline
49 */
50static void putc(int c)
51{
52#ifdef UART_OFFSET
53 void __iomem *sys = (void __iomem *) UART_OFFSET; /* physical address */
54
55 while (!(__raw_readl(sys + ATMEL_US_CSR) & ATMEL_US_TXRDY))
56 barrier();
57 __raw_writel(c, sys + ATMEL_US_THR);
58#endif
59}
60
61static inline void flush(void)
62{
63#ifdef UART_OFFSET
64 void __iomem *sys = (void __iomem *) UART_OFFSET; /* physical address */
65
66 /* wait for transmission to complete */
67 while (!(__raw_readl(sys + ATMEL_US_CSR) & ATMEL_US_TXEMPTY))
68 barrier();
69#endif
70}
71
72#define arch_decomp_setup()
73
74#define arch_decomp_wdog()
75
76#endif
diff --git a/include/asm-arm/arch-at91/vmalloc.h b/include/asm-arm/arch-at91/vmalloc.h
deleted file mode 100644
index bb05e70e932a..000000000000
--- a/include/asm-arm/arch-at91/vmalloc.h
+++ /dev/null
@@ -1,26 +0,0 @@
1/*
2 * include/asm-arm/arch-at91/vmalloc.h
3 *
4 * Copyright (C) 2003 SAN People
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20
21#ifndef __ASM_ARCH_VMALLOC_H
22#define __ASM_ARCH_VMALLOC_H
23
24#define VMALLOC_END (AT91_VIRT_BASE & PGDIR_MASK)
25
26#endif
diff --git a/include/asm-arm/arch-cl7500/debug-macro.S b/include/asm-arm/arch-cl7500/debug-macro.S
deleted file mode 100644
index 9a2b67d24098..000000000000
--- a/include/asm-arm/arch-cl7500/debug-macro.S
+++ /dev/null
@@ -1,21 +0,0 @@
1/* linux/include/asm-arm/arch-cl7500/debug-macro.S
2 *
3 * Debugging macro include header
4 *
5 * Copyright (C) 1994-1999 Russell King
6 * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 *
12*/
13
14 .macro addruart,rx
15 mov \rx, #0xe0000000
16 orr \rx, \rx, #0x00010000
17 orr \rx, \rx, #0x00000be0
18 .endm
19
20#define UART_SHIFT 2
21#include <asm/hardware/debug-8250.S>
diff --git a/include/asm-arm/arch-cl7500/dma.h b/include/asm-arm/arch-cl7500/dma.h
deleted file mode 100644
index 591ed2551892..000000000000
--- a/include/asm-arm/arch-cl7500/dma.h
+++ /dev/null
@@ -1,21 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-cl7500/dma.h
3 *
4 * Copyright (C) 1999 Nexus Electronics Ltd.
5 */
6
7#ifndef __ASM_ARCH_DMA_H
8#define __ASM_ARCH_DMA_H
9
10/* DMA is not yet implemented! It should be the same as acorn, copy over.. */
11
12/*
13 * This is the maximum DMA address that can be DMAd to.
14 * There should not be more than (0xd0000000 - 0xc0000000)
15 * bytes of RAM.
16 */
17#define MAX_DMA_ADDRESS 0xd0000000
18
19#define DMA_S0 0
20
21#endif /* _ASM_ARCH_DMA_H */
diff --git a/include/asm-arm/arch-cl7500/entry-macro.S b/include/asm-arm/arch-cl7500/entry-macro.S
deleted file mode 100644
index 038b761fdadc..000000000000
--- a/include/asm-arm/arch-cl7500/entry-macro.S
+++ /dev/null
@@ -1,16 +0,0 @@
1#include <asm/hardware.h>
2#include <asm/hardware/entry-macro-iomd.S>
3
4 .equ ioc_base_high, IOC_BASE & 0xff000000
5 .equ ioc_base_low, IOC_BASE & 0x00ff0000
6
7 .macro get_irqnr_preamble, base, tmp
8 mov \base, #ioc_base_high @ point at IOC
9 .if ioc_base_low
10 orr \base, \base, #ioc_base_low
11 .endif
12 .endm
13
14 .macro arch_ret_to_user, tmp1, tmp2
15 .endm
16
diff --git a/include/asm-arm/arch-cl7500/hardware.h b/include/asm-arm/arch-cl7500/hardware.h
deleted file mode 100644
index 1adfd18e6154..000000000000
--- a/include/asm-arm/arch-cl7500/hardware.h
+++ /dev/null
@@ -1,67 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-cl7500/hardware.h
3 *
4 * Copyright (C) 1996-1999 Russell King.
5 * Copyright (C) 1999 Nexus Electronics Ltd.
6 *
7 * This file contains the hardware definitions of the
8 * CL7500 evaluation board.
9 */
10#ifndef __ASM_ARCH_HARDWARE_H
11#define __ASM_ARCH_HARDWARE_H
12
13#include <asm/arch/memory.h>
14#include <asm/hardware/iomd.h>
15
16#ifdef __ASSEMBLY__
17#define IOMEM(x) x
18#else
19#define IOMEM(x) ((void __iomem *)(x))
20#endif
21
22/*
23 * What hardware must be present
24 */
25#define HAS_IOMD
26#define HAS_VIDC20
27
28/* Hardware addresses of major areas.
29 * *_START is the physical address
30 * *_SIZE is the size of the region
31 * *_BASE is the virtual address
32 */
33
34#define IO_START 0x03000000 /* I/O */
35#define IO_SIZE 0x01000000
36#define IO_BASE IOMEM(0xe0000000)
37
38#define ISA_START 0x0c000000 /* ISA */
39#define ISA_SIZE 0x00010000
40#define ISA_BASE 0xe1000000
41
42#define FLASH_START 0x01000000 /* XXX */
43#define FLASH_SIZE 0x01000000
44#define FLASH_BASE 0xe2000000
45
46#define LED_START 0x0302B000
47#define LED_SIZE 0x00001000
48#define LED_BASE 0xe3000000
49#define LED_ADDRESS (LED_BASE + 0xa00)
50
51/* Let's define SCREEN_START for CL7500, even though it's a lie. */
52#define SCREEN_START 0x02000000 /* VRAM */
53#define SCREEN_END 0xdfc00000
54#define SCREEN_BASE 0xdf800000
55
56#define VIDC_BASE (void __iomem *)0xe0400000
57#define IOMD_BASE IOMEM(0xe0200000)
58#define IOC_BASE IOMEM(0xe0200000)
59#define FLOPPYDMA_BASE IOMEM(0xe002a000)
60#define PCIO_BASE IOMEM(0xe0010000)
61
62#define vidc_writel(val) __raw_writel(val, VIDC_BASE)
63
64/* in/out bias for the ISA slot region */
65#define ISASLOT_IO 0x80400000
66
67#endif
diff --git a/include/asm-arm/arch-cl7500/io.h b/include/asm-arm/arch-cl7500/io.h
deleted file mode 100644
index 89a33287f4fe..000000000000
--- a/include/asm-arm/arch-cl7500/io.h
+++ /dev/null
@@ -1,255 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-cl7500/io.h
3 * from linux/include/asm-arm/arch-rpc/io.h
4 *
5 * Copyright (C) 1997 Russell King
6 *
7 * Modifications:
8 * 06-Dec-1997 RMK Created.
9 */
10#ifndef __ASM_ARM_ARCH_IO_H
11#define __ASM_ARM_ARCH_IO_H
12
13#include <asm/hardware.h>
14
15#define IO_SPACE_LIMIT 0xffffffff
16
17/*
18 * GCC is totally crap at loading/storing data. We try to persuade it
19 * to do the right thing by using these whereever possible instead of
20 * the above.
21 */
22#define __arch_base_getb(b,o) \
23 ({ \
24 unsigned int v, r = (b); \
25 __asm__ __volatile__( \
26 "ldrb %0, [%1, %2]" \
27 : "=r" (v) \
28 : "r" (r), "Ir" (o)); \
29 v; \
30 })
31
32#define __arch_base_getl(b,o) \
33 ({ \
34 unsigned int v, r = (b); \
35 __asm__ __volatile__( \
36 "ldr %0, [%1, %2]" \
37 : "=r" (v) \
38 : "r" (r), "Ir" (o)); \
39 v; \
40 })
41
42#define __arch_base_putb(v,b,o) \
43 ({ \
44 unsigned int r = (b); \
45 __asm__ __volatile__( \
46 "strb %0, [%1, %2]" \
47 : \
48 : "r" (v), "r" (r), "Ir" (o)); \
49 })
50
51#define __arch_base_putl(v,b,o) \
52 ({ \
53 unsigned int r = (b); \
54 __asm__ __volatile__( \
55 "str %0, [%1, %2]" \
56 : \
57 : "r" (v), "r" (r), "Ir" (o)); \
58 })
59
60/*
61 * We use two different types of addressing - PC style addresses, and ARM
62 * addresses. PC style accesses the PC hardware with the normal PC IO
63 * addresses, eg 0x3f8 for serial#1. ARM addresses are 0x80000000+
64 * and are translated to the start of IO. Note that all addresses are
65 * shifted left!
66 */
67#define __PORT_PCIO(x) (!((x) & 0x80000000))
68
69/*
70 * Dynamic IO functions - let the compiler
71 * optimize the expressions
72 */
73static inline void __outb (unsigned int value, unsigned int port)
74{
75 unsigned long temp;
76 __asm__ __volatile__(
77 "tst %2, #0x80000000\n\t"
78 "mov %0, %4\n\t"
79 "addeq %0, %0, %3\n\t"
80 "strb %1, [%0, %2, lsl #2] @ outb"
81 : "=&r" (temp)
82 : "r" (value), "r" (port), "Ir" (PCIO_BASE - IO_BASE), "Ir" (IO_BASE)
83 : "cc");
84}
85
86static inline void __outw (unsigned int value, unsigned int port)
87{
88 unsigned long temp;
89 __asm__ __volatile__(
90 "tst %2, #0x80000000\n\t"
91 "mov %0, %4\n\t"
92 "addeq %0, %0, %3\n\t"
93 "str %1, [%0, %2, lsl #2] @ outw"
94 : "=&r" (temp)
95 : "r" (value|value<<16), "r" (port), "Ir" (PCIO_BASE - IO_BASE), "Ir" (IO_BASE)
96 : "cc");
97}
98
99static inline void __outl (unsigned int value, unsigned int port)
100{
101 unsigned long temp;
102 __asm__ __volatile__(
103 "tst %2, #0x80000000\n\t"
104 "mov %0, %4\n\t"
105 "addeq %0, %0, %3\n\t"
106 "str %1, [%0, %2, lsl #2] @ outl"
107 : "=&r" (temp)
108 : "r" (value), "r" (port), "Ir" (PCIO_BASE - IO_BASE), "Ir" (IO_BASE)
109 : "cc");
110}
111
112#define DECLARE_DYN_IN(sz,fnsuffix,instr) \
113static inline unsigned sz __in##fnsuffix (unsigned int port) \
114{ \
115 unsigned long temp, value; \
116 __asm__ __volatile__( \
117 "tst %2, #0x80000000\n\t" \
118 "mov %0, %4\n\t" \
119 "addeq %0, %0, %3\n\t" \
120 "ldr" instr " %1, [%0, %2, lsl #2] @ in" #fnsuffix \
121 : "=&r" (temp), "=r" (value) \
122 : "r" (port), "Ir" (PCIO_BASE - IO_BASE), "Ir" (IO_BASE) \
123 : "cc"); \
124 return (unsigned sz)value; \
125}
126
127static inline unsigned int __ioaddr (unsigned int port) \
128{ \
129 if (__PORT_PCIO(port)) \
130 return (unsigned int)(PCIO_BASE + (port << 2)); \
131 else \
132 return (unsigned int)(IO_BASE + (port << 2)); \
133}
134
135#define DECLARE_IO(sz,fnsuffix,instr) \
136 DECLARE_DYN_IN(sz,fnsuffix,instr)
137
138DECLARE_IO(char,b,"b")
139DECLARE_IO(short,w,"")
140DECLARE_IO(int,l,"")
141
142#undef DECLARE_IO
143#undef DECLARE_DYN_IN
144
145/*
146 * Constant address IO functions
147 *
148 * These have to be macros for the 'J' constraint to work -
149 * +/-4096 immediate operand.
150 */
151#define __outbc(value,port) \
152({ \
153 if (__PORT_PCIO((port))) \
154 __asm__ __volatile__( \
155 "strb %0, [%1, %2] @ outbc" \
156 : : "r" (value), "r" (PCIO_BASE), "Jr" ((port) << 2)); \
157 else \
158 __asm__ __volatile__( \
159 "strb %0, [%1, %2] @ outbc" \
160 : : "r" (value), "r" (IO_BASE), "r" ((port) << 2)); \
161})
162
163#define __inbc(port) \
164({ \
165 unsigned char result; \
166 if (__PORT_PCIO((port))) \
167 __asm__ __volatile__( \
168 "ldrb %0, [%1, %2] @ inbc" \
169 : "=r" (result) : "r" (PCIO_BASE), "Jr" ((port) << 2)); \
170 else \
171 __asm__ __volatile__( \
172 "ldrb %0, [%1, %2] @ inbc" \
173 : "=r" (result) : "r" (IO_BASE), "r" ((port) << 2)); \
174 result; \
175})
176
177#define __outwc(value,port) \
178({ \
179 unsigned long v = value; \
180 if (__PORT_PCIO((port))) \
181 __asm__ __volatile__( \
182 "str %0, [%1, %2] @ outwc" \
183 : : "r" (v|v<<16), "r" (PCIO_BASE), "Jr" ((port) << 2)); \
184 else \
185 __asm__ __volatile__( \
186 "str %0, [%1, %2] @ outwc" \
187 : : "r" (v|v<<16), "r" (IO_BASE), "r" ((port) << 2)); \
188})
189
190#define __inwc(port) \
191({ \
192 unsigned short result; \
193 if (__PORT_PCIO((port))) \
194 __asm__ __volatile__( \
195 "ldr %0, [%1, %2] @ inwc" \
196 : "=r" (result) : "r" (PCIO_BASE), "Jr" ((port) << 2)); \
197 else \
198 __asm__ __volatile__( \
199 "ldr %0, [%1, %2] @ inwc" \
200 : "=r" (result) : "r" (IO_BASE), "r" ((port) << 2)); \
201 result & 0xffff; \
202})
203
204#define __outlc(value,port) \
205({ \
206 unsigned long v = value; \
207 if (__PORT_PCIO((port))) \
208 __asm__ __volatile__( \
209 "str %0, [%1, %2] @ outlc" \
210 : : "r" (v), "r" (PCIO_BASE), "Jr" ((port) << 2)); \
211 else \
212 __asm__ __volatile__( \
213 "str %0, [%1, %2] @ outlc" \
214 : : "r" (v), "r" (IO_BASE), "r" ((port) << 2)); \
215})
216
217#define __inlc(port) \
218({ \
219 unsigned long result; \
220 if (__PORT_PCIO((port))) \
221 __asm__ __volatile__( \
222 "ldr %0, [%1, %2] @ inlc" \
223 : "=r" (result) : "r" (PCIO_BASE), "Jr" ((port) << 2)); \
224 else \
225 __asm__ __volatile__( \
226 "ldr %0, [%1, %2] @ inlc" \
227 : "=r" (result) : "r" (IO_BASE), "r" ((port) << 2)); \
228 result; \
229})
230
231#define __ioaddrc(port) \
232 (__PORT_PCIO((port)) ? PCIO_BASE + ((port) << 2) : IO_BASE + ((port) << 2))
233
234#define inb(p) (__builtin_constant_p((p)) ? __inbc(p) : __inb(p))
235#define inw(p) (__builtin_constant_p((p)) ? __inwc(p) : __inw(p))
236#define inl(p) (__builtin_constant_p((p)) ? __inlc(p) : __inl(p))
237#define outb(v,p) (__builtin_constant_p((p)) ? __outbc(v,p) : __outb(v,p))
238#define outw(v,p) (__builtin_constant_p((p)) ? __outwc(v,p) : __outw(v,p))
239#define outl(v,p) (__builtin_constant_p((p)) ? __outlc(v,p) : __outl(v,p))
240#define __ioaddr(p) (__builtin_constant_p((p)) ? __ioaddr(p) : __ioaddrc(p))
241/* the following macro is deprecated */
242#define ioaddr(port) __ioaddr((port))
243
244#define insb(p,d,l) __raw_readsb(__ioaddr(p),d,l)
245#define insw(p,d,l) __raw_readsw(__ioaddr(p),d,l)
246
247#define outsb(p,d,l) __raw_writesb(__ioaddr(p),d,l)
248#define outsw(p,d,l) __raw_writesw(__ioaddr(p),d,l)
249
250/*
251 * 1:1 mapping for ioremapped regions.
252 */
253#define __mem_pci(x) (x)
254
255#endif
diff --git a/include/asm-arm/arch-cl7500/irq.h b/include/asm-arm/arch-cl7500/irq.h
deleted file mode 100644
index 4b286331f3f8..000000000000
--- a/include/asm-arm/arch-cl7500/irq.h
+++ /dev/null
@@ -1,32 +0,0 @@
1/*
2 * include/asm-arm/arch-cl7500/irq.h
3 *
4 * Copyright (C) 1996 Russell King
5 * Copyright (C) 1999, 2001 Nexus Electronics Ltd.
6 *
7 * Changelog:
8 * 10-10-1996 RMK Brought up to date with arch-sa110eval
9 * 22-08-1998 RMK Restructured IRQ routines
10 * 11-08-1999 PJB Created ARM7500 version, derived from RiscPC code
11 */
12
13#include <asm/hardware/iomd.h>
14#include <asm/io.h>
15
16static inline int fixup_irq(unsigned int irq)
17{
18 if (irq == IRQ_ISA) {
19 int isabits = *((volatile unsigned int *)0xe002b700);
20 if (isabits == 0) {
21 printk("Spurious ISA IRQ!\n");
22 return irq;
23 }
24 irq = IRQ_ISA_BASE;
25 while (!(isabits & 1)) {
26 irq++;
27 isabits >>= 1;
28 }
29 }
30
31 return irq;
32}
diff --git a/include/asm-arm/arch-cl7500/irqs.h b/include/asm-arm/arch-cl7500/irqs.h
deleted file mode 100644
index f20996eadf19..000000000000
--- a/include/asm-arm/arch-cl7500/irqs.h
+++ /dev/null
@@ -1,66 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-cl7500/irqs.h
3 *
4 * Copyright (C) 1999 Nexus Electronics Ltd
5 */
6
7#define IRQ_INT2 0
8#define IRQ_INT1 2
9#define IRQ_VSYNCPULSE 3
10#define IRQ_POWERON 4
11#define IRQ_TIMER0 5
12#define IRQ_TIMER1 6
13#define IRQ_FORCE 7
14#define IRQ_INT8 8
15#define IRQ_ISA 9
16#define IRQ_INT6 10
17#define IRQ_INT5 11
18#define IRQ_INT4 12
19#define IRQ_INT3 13
20#define IRQ_KEYBOARDTX 14
21#define IRQ_KEYBOARDRX 15
22
23#define IRQ_DMA0 16
24#define IRQ_DMA1 17
25#define IRQ_DMA2 18
26#define IRQ_DMA3 19
27#define IRQ_DMAS0 20
28#define IRQ_DMAS1 21
29
30#define IRQ_IOP0 24
31#define IRQ_IOP1 25
32#define IRQ_IOP2 26
33#define IRQ_IOP3 27
34#define IRQ_IOP4 28
35#define IRQ_IOP5 29
36#define IRQ_IOP6 30
37#define IRQ_IOP7 31
38
39#define IRQ_MOUSERX 40
40#define IRQ_MOUSETX 41
41#define IRQ_ADC 42
42#define IRQ_EVENT1 43
43#define IRQ_EVENT2 44
44
45#define IRQ_ISA_BASE 48
46#define IRQ_ISA_3 48
47#define IRQ_ISA_4 49
48#define IRQ_ISA_5 50
49#define IRQ_ISA_7 51
50#define IRQ_ISA_9 52
51#define IRQ_ISA_10 53
52#define IRQ_ISA_11 54
53#define IRQ_ISA_14 55
54
55#define FIQ_INT9 0
56#define FIQ_INT5 1
57#define FIQ_INT6 4
58#define FIQ_INT8 6
59#define FIQ_FORCE 7
60
61/*
62 * This is the offset of the FIQ "IRQ" numbers
63 */
64#define FIQ_START 64
65
66#define IRQ_TIMER IRQ_TIMER0
diff --git a/include/asm-arm/arch-cl7500/memory.h b/include/asm-arm/arch-cl7500/memory.h
deleted file mode 100644
index 3178140e24ca..000000000000
--- a/include/asm-arm/arch-cl7500/memory.h
+++ /dev/null
@@ -1,35 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-cl7500/memory.h
3 *
4 * Copyright (c) 1996,1997,1998 Russell King.
5 *
6 * Changelog:
7 * 20-Oct-1996 RMK Created
8 * 31-Dec-1997 RMK Fixed definitions to reduce warnings
9 * 11-Jan-1998 RMK Uninlined to reduce hits on cache
10 * 08-Feb-1998 RMK Added __virt_to_bus and __bus_to_virt
11 * 21-Mar-1999 RMK Renamed to memory.h
12 * RMK Added TASK_SIZE and PAGE_OFFSET
13 */
14#ifndef __ASM_ARCH_MEMORY_H
15#define __ASM_ARCH_MEMORY_H
16
17/*
18 * Physical DRAM offset.
19 */
20#define PHYS_OFFSET UL(0x10000000)
21
22/*
23 * These are exactly the same on the RiscPC as the
24 * physical memory view.
25 */
26#define __virt_to_bus(x) __virt_to_phys(x)
27#define __bus_to_virt(x) __phys_to_virt(x)
28
29/*
30 * Cache flushing area - ROM
31 */
32#define FLUSH_BASE_PHYS 0x00000000
33#define FLUSH_BASE 0xdf000000
34
35#endif
diff --git a/include/asm-arm/arch-cl7500/system.h b/include/asm-arm/arch-cl7500/system.h
deleted file mode 100644
index a9505d6a74d7..000000000000
--- a/include/asm-arm/arch-cl7500/system.h
+++ /dev/null
@@ -1,23 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-cl7500/system.h
3 *
4 * Copyright (c) 1999 Nexus Electronics Ltd.
5 */
6#ifndef __ASM_ARCH_SYSTEM_H
7#define __ASM_ARCH_SYSTEM_H
8
9#include <asm/hardware/iomd.h>
10#include <asm/io.h>
11
12static inline void arch_idle(void)
13{
14 iomd_writeb(0, IOMD_SUSMODE);
15}
16
17#define arch_reset(mode) \
18 do { \
19 iomd_writeb(0, IOMD_ROMCR0); \
20 cpu_reset(0); \
21 } while (0)
22
23#endif
diff --git a/include/asm-arm/arch-cl7500/timex.h b/include/asm-arm/arch-cl7500/timex.h
deleted file mode 100644
index 8a4175fc0106..000000000000
--- a/include/asm-arm/arch-cl7500/timex.h
+++ /dev/null
@@ -1,13 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-cl7500/timex.h
3 *
4 * CL7500 architecture timex specifications
5 *
6 * Copyright (C) 1999 Nexus Electronics Ltd
7 */
8
9/*
10 * On the ARM7500, the clock ticks at 2MHz.
11 */
12#define CLOCK_TICK_RATE 2000000
13
diff --git a/include/asm-arm/arch-cl7500/uncompress.h b/include/asm-arm/arch-cl7500/uncompress.h
deleted file mode 100644
index c437e0c88c3f..000000000000
--- a/include/asm-arm/arch-cl7500/uncompress.h
+++ /dev/null
@@ -1,35 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-cl7500/uncompress.h
3 *
4 * Copyright (C) 1999, 2000 Nexus Electronics Ltd.
5 */
6#define BASE 0x03010000
7#define SERBASE (BASE + (0x2f8 << 2))
8
9static inline void putc(char c)
10{
11 while (!(*((volatile unsigned int *)(SERBASE + 0x14)) & 0x20))
12 barrier();
13
14 *((volatile unsigned int *)(SERBASE)) = c;
15}
16
17static inline void flush(void)
18{
19}
20
21static __inline__ void arch_decomp_setup(void)
22{
23 int baud = 3686400 / (9600 * 32);
24
25 *((volatile unsigned int *)(SERBASE + 0xC)) = 0x80;
26 *((volatile unsigned int *)(SERBASE + 0x0)) = baud & 0xff;
27 *((volatile unsigned int *)(SERBASE + 0x4)) = (baud & 0xff00) >> 8;
28 *((volatile unsigned int *)(SERBASE + 0xC)) = 3; /* 8 bits */
29 *((volatile unsigned int *)(SERBASE + 0x10)) = 3; /* DTR, RTS */
30}
31
32/*
33 * nothing to do
34 */
35#define arch_decomp_wdog()
diff --git a/include/asm-arm/arch-cl7500/vmalloc.h b/include/asm-arm/arch-cl7500/vmalloc.h
deleted file mode 100644
index ba8d7a84456a..000000000000
--- a/include/asm-arm/arch-cl7500/vmalloc.h
+++ /dev/null
@@ -1,4 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-cl7500/vmalloc.h
3 */
4#define VMALLOC_END (PAGE_OFFSET + 0x1c000000)
diff --git a/include/asm-arm/arch-clps711x/debug-macro.S b/include/asm-arm/arch-clps711x/debug-macro.S
deleted file mode 100644
index bc0a5760722b..000000000000
--- a/include/asm-arm/arch-clps711x/debug-macro.S
+++ /dev/null
@@ -1,46 +0,0 @@
1/* linux/include/asm-arm/arch-clps711x/debug-macro.S
2 *
3 * Debugging macro include header
4 *
5 * Copyright (C) 1994-1999 Russell King
6 * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 *
12*/
13
14#include <asm/hardware/clps7111.h>
15
16 .macro addruart,rx
17 mrc p15, 0, \rx, c1, c0
18 tst \rx, #1 @ MMU enabled?
19 moveq \rx, #CLPS7111_PHYS_BASE
20 movne \rx, #CLPS7111_VIRT_BASE
21#ifndef CONFIG_DEBUG_CLPS711X_UART2
22 add \rx, \rx, #0x0000 @ UART1
23#else
24 add \rx, \rx, #0x1000 @ UART2
25#endif
26 .endm
27
28 .macro senduart,rd,rx
29 str \rd, [\rx, #0x0480] @ UARTDR
30 .endm
31
32 .macro waituart,rd,rx
331001: ldr \rd, [\rx, #0x0140] @ SYSFLGx
34 tst \rd, #1 << 11 @ UBUSYx
35 bne 1001b
36 .endm
37
38 .macro busyuart,rd,rx
39 tst \rx, #0x1000 @ UART2 does not have CTS here
40 bne 1002f
411001: ldr \rd, [\rx, #0x0140] @ SYSFLGx
42 tst \rd, #1 << 8 @ CTS
43 bne 1001b
441002:
45 .endm
46
diff --git a/include/asm-arm/arch-clps711x/dma.h b/include/asm-arm/arch-clps711x/dma.h
deleted file mode 100644
index 610997938423..000000000000
--- a/include/asm-arm/arch-clps711x/dma.h
+++ /dev/null
@@ -1,19 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-clps711x/dma.h
3 *
4 * Copyright (C) 1997,1998 Russell King
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
diff --git a/include/asm-arm/arch-clps711x/entry-macro.S b/include/asm-arm/arch-clps711x/entry-macro.S
deleted file mode 100644
index cd8c5a0bc7bc..000000000000
--- a/include/asm-arm/arch-clps711x/entry-macro.S
+++ /dev/null
@@ -1,58 +0,0 @@
1/*
2 * include/asm-arm/arch-clps711x/entry-macro.S
3 *
4 * Low-level IRQ helper macros for CLPS711X-based platforms
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10#include <asm/hardware.h>
11#include <asm/hardware/clps7111.h>
12
13 .macro disable_fiq
14 .endm
15
16 .macro get_irqnr_preamble, base, tmp
17 .endm
18
19 .macro arch_ret_to_user, tmp1, tmp2
20 .endm
21
22#if (INTSR2 - INTSR1) != (INTMR2 - INTMR1)
23#error INTSR stride != INTMR stride
24#endif
25
26 .macro get_irqnr_and_base, irqnr, stat, base, mask
27 mov \base, #CLPS7111_BASE
28 ldr \stat, [\base, #INTSR1]
29 ldr \mask, [\base, #INTMR1]
30 mov \irqnr, #4
31 mov \mask, \mask, lsl #16
32 and \stat, \stat, \mask, lsr #16
33 movs \stat, \stat, lsr #4
34 bne 1001f
35
36 add \base, \base, #INTSR2 - INTSR1
37 ldr \stat, [\base, #INTSR1]
38 ldr \mask, [\base, #INTMR1]
39 mov \irqnr, #16
40 mov \mask, \mask, lsl #16
41 and \stat, \stat, \mask, lsr #16
42
431001: tst \stat, #255
44 addeq \irqnr, \irqnr, #8
45 moveq \stat, \stat, lsr #8
46 tst \stat, #15
47 addeq \irqnr, \irqnr, #4
48 moveq \stat, \stat, lsr #4
49 tst \stat, #3
50 addeq \irqnr, \irqnr, #2
51 moveq \stat, \stat, lsr #2
52 tst \stat, #1
53 addeq \irqnr, \irqnr, #1
54 moveq \stat, \stat, lsr #1
55 tst \stat, #1 @ bit 0 should be set
56 .endm
57
58
diff --git a/include/asm-arm/arch-clps711x/hardware.h b/include/asm-arm/arch-clps711x/hardware.h
deleted file mode 100644
index 0fdbe72fff2a..000000000000
--- a/include/asm-arm/arch-clps711x/hardware.h
+++ /dev/null
@@ -1,237 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-clps711x/hardware.h
3 *
4 * This file contains the hardware definitions of the Prospector P720T.
5 *
6 * Copyright (C) 2000 Deep Blue Solutions Ltd.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 */
22#ifndef __ASM_ARCH_HARDWARE_H
23#define __ASM_ARCH_HARDWARE_H
24
25
26#define CLPS7111_VIRT_BASE 0xff000000
27#define CLPS7111_BASE CLPS7111_VIRT_BASE
28
29/*
30 * The physical addresses that the external chip select signals map to is
31 * dependent on the setting of the nMEDCHG signal on EP7211 and EP7212
32 * processors. CONFIG_EP72XX_BOOT_ROM is only available if these
33 * processors are in use.
34 */
35#ifndef CONFIG_EP72XX_ROM_BOOT
36#define CS0_PHYS_BASE (0x00000000)
37#define CS1_PHYS_BASE (0x10000000)
38#define CS2_PHYS_BASE (0x20000000)
39#define CS3_PHYS_BASE (0x30000000)
40#define CS4_PHYS_BASE (0x40000000)
41#define CS5_PHYS_BASE (0x50000000)
42#define CS6_PHYS_BASE (0x60000000)
43#define CS7_PHYS_BASE (0x70000000)
44#else
45#define CS0_PHYS_BASE (0x70000000)
46#define CS1_PHYS_BASE (0x60000000)
47#define CS2_PHYS_BASE (0x50000000)
48#define CS3_PHYS_BASE (0x40000000)
49#define CS4_PHYS_BASE (0x30000000)
50#define CS5_PHYS_BASE (0x20000000)
51#define CS6_PHYS_BASE (0x10000000)
52#define CS7_PHYS_BASE (0x00000000)
53#endif
54
55#if defined (CONFIG_ARCH_EP7211)
56
57#define EP7211_VIRT_BASE CLPS7111_VIRT_BASE
58#define EP7211_BASE CLPS7111_VIRT_BASE
59#include <asm/hardware/ep7211.h>
60
61#elif defined (CONFIG_ARCH_EP7212)
62
63#define EP7212_VIRT_BASE CLPS7111_VIRT_BASE
64#define EP7212_BASE CLPS7111_VIRT_BASE
65#include <asm/hardware/ep7212.h>
66
67#endif
68
69#define SYSPLD_VIRT_BASE 0xfe000000
70#define SYSPLD_BASE SYSPLD_VIRT_BASE
71
72#ifndef __ASSEMBLER__
73
74#define PCIO_BASE IO_BASE
75
76#endif
77
78
79#if defined (CONFIG_ARCH_AUTCPU12)
80
81#define CS89712_VIRT_BASE CLPS7111_VIRT_BASE
82#define CS89712_BASE CLPS7111_VIRT_BASE
83
84#include <asm/hardware/clps7111.h>
85#include <asm/hardware/ep7212.h>
86#include <asm/hardware/cs89712.h>
87
88#endif
89
90
91#if defined (CONFIG_ARCH_CDB89712)
92
93#include <asm/hardware/clps7111.h>
94#include <asm/hardware/ep7212.h>
95#include <asm/hardware/cs89712.h>
96
97/* dynamic ioremap() areas */
98#define FLASH_START 0x00000000
99#define FLASH_SIZE 0x800000
100#define FLASH_WIDTH 4
101
102#define SRAM_START 0x60000000
103#define SRAM_SIZE 0xc000
104#define SRAM_WIDTH 4
105
106#define BOOTROM_START 0x70000000
107#define BOOTROM_SIZE 0x80
108#define BOOTROM_WIDTH 4
109
110
111/* static cdb89712_map_io() areas */
112#define REGISTER_START 0x80000000
113#define REGISTER_SIZE 0x4000
114#define REGISTER_BASE 0xff000000
115
116#define ETHER_START 0x20000000
117#define ETHER_SIZE 0x1000
118#define ETHER_BASE 0xfe000000
119
120#endif
121
122
123#if defined (CONFIG_ARCH_EDB7211)
124
125/*
126 * The extra 8 lines of the keyboard matrix are wired to chip select 3 (nCS3)
127 * and repeat across it. This is the mapping for it.
128 *
129 * In jumpered boot mode, nCS3 is mapped to 0x4000000, not 0x3000000. This
130 * was cause for much consternation and headscratching. This should probably
131 * be made a compile/run time kernel option.
132 */
133#define EP7211_PHYS_EXTKBD CS3_PHYS_BASE /* physical */
134
135#define EP7211_VIRT_EXTKBD (0xfd000000) /* virtual */
136
137
138/*
139 * The CS8900A ethernet chip has its I/O registers wired to chip select 2
140 * (nCS2). This is the mapping for it.
141 *
142 * In jumpered boot mode, nCS2 is mapped to 0x5000000, not 0x2000000. This
143 * was cause for much consternation and headscratching. This should probably
144 * be made a compile/run time kernel option.
145 */
146#define EP7211_PHYS_CS8900A CS2_PHYS_BASE /* physical */
147
148#define EP7211_VIRT_CS8900A (0xfc000000) /* virtual */
149
150
151/*
152 * The two flash banks are wired to chip selects 0 and 1. This is the mapping
153 * for them.
154 *
155 * nCS0 and nCS1 are at 0x70000000 and 0x60000000, respectively, when running
156 * in jumpered boot mode.
157 */
158#define EP7211_PHYS_FLASH1 CS0_PHYS_BASE /* physical */
159#define EP7211_PHYS_FLASH2 CS1_PHYS_BASE /* physical */
160
161#define EP7211_VIRT_FLASH1 (0xfa000000) /* virtual */
162#define EP7211_VIRT_FLASH2 (0xfb000000) /* virtual */
163
164#endif /* CONFIG_ARCH_EDB7211 */
165
166
167/*
168 * Relevant bits in port D, which controls power to the various parts of
169 * the LCD on the EDB7211.
170 */
171#define EDB_PD1_LCD_DC_DC_EN (1<<1)
172#define EDB_PD2_LCDEN (1<<2)
173#define EDB_PD3_LCDBL (1<<3)
174
175
176#if defined (CONFIG_ARCH_CEIVA)
177
178#define CEIVA_VIRT_BASE CLPS7111_VIRT_BASE
179#define CEIVA_BASE CLPS7111_VIRT_BASE
180
181#include <asm/hardware/clps7111.h>
182#include <asm/hardware/ep7212.h>
183
184
185/*
186 * The two flash banks are wired to chip selects 0 and 1. This is the mapping
187 * for them.
188 *
189 * nCS0 and nCS1 are at 0x70000000 and 0x60000000, respectively, when running
190 * in jumpered boot mode.
191 */
192#define CEIVA_PHYS_FLASH1 CS0_PHYS_BASE /* physical */
193#define CEIVA_PHYS_FLASH2 CS1_PHYS_BASE /* physical */
194
195#define CEIVA_VIRT_FLASH1 (0xfa000000) /* virtual */
196#define CEIVA_VIRT_FLASH2 (0xfb000000) /* virtual */
197
198#define CEIVA_FLASH_SIZE 0x100000
199#define CEIVA_FLASH_WIDTH 2
200
201#define SRAM_START 0x60000000
202#define SRAM_SIZE 0xc000
203#define SRAM_WIDTH 4
204
205#define BOOTROM_START 0x70000000
206#define BOOTROM_SIZE 0x80
207#define BOOTROM_WIDTH 4
208
209/*
210 * SED1355 LCD controller
211 */
212#define CEIVA_PHYS_SED1355 CS2_PHYS_BASE
213#define CEIVA_VIRT_SED1355 (0xfc000000)
214
215/*
216 * Relevant bits in port D, which controls power to the various parts of
217 * the LCD on the Ceiva Photo Max, and reset to the LCD controller.
218 */
219
220// Reset line to SED1355 (must be high to operate)
221#define CEIVA_PD1_LCDRST (1<<1)
222// LCD panel enable (set to one, to enable LCD)
223#define CEIVA_PD4_LCDEN (1<<4)
224// Backlight (set to one, to turn on backlight
225#define CEIVA_PD5_LCDBL (1<<5)
226
227/*
228 * Relevant bits in port B, which report the status of the buttons.
229 */
230
231// White button
232#define CEIVA_PB4_WHT_BTN (1<<4)
233// Black button
234#define CEIVA_PB0_BLK_BTN (1<<0)
235#endif // #if defined (CONFIG_ARCH_CEIVA)
236
237#endif
diff --git a/include/asm-arm/arch-clps711x/io.h b/include/asm-arm/arch-clps711x/io.h
deleted file mode 100644
index 53d790202c19..000000000000
--- a/include/asm-arm/arch-clps711x/io.h
+++ /dev/null
@@ -1,38 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-clps711x/io.h
3 *
4 * Copyright (C) 1999 ARM Limited
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20#ifndef __ASM_ARM_ARCH_IO_H
21#define __ASM_ARM_ARCH_IO_H
22
23#include <asm/hardware.h>
24
25#define IO_SPACE_LIMIT 0xffffffff
26
27#define __io(a) ((void __iomem *)(a))
28#define __mem_pci(a) (a)
29
30/*
31 * We don't support ins[lb]/outs[lb]. Make them fault.
32 */
33#define __raw_readsb(p,d,l) do { *(int *)0 = 0; } while (0)
34#define __raw_readsl(p,d,l) do { *(int *)0 = 0; } while (0)
35#define __raw_writesb(p,d,l) do { *(int *)0 = 0; } while (0)
36#define __raw_writesl(p,d,l) do { *(int *)0 = 0; } while (0)
37
38#endif
diff --git a/include/asm-arm/arch-clps711x/irqs.h b/include/asm-arm/arch-clps711x/irqs.h
deleted file mode 100644
index 76025dc87637..000000000000
--- a/include/asm-arm/arch-clps711x/irqs.h
+++ /dev/null
@@ -1,53 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-clps711x/irqs.h
3 *
4 * Copyright (C) 2000 Deep Blue Solutions Ltd.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20
21/*
22 * Interrupts from INTSR1
23 */
24#define IRQ_CSINT 4
25#define IRQ_EINT1 5
26#define IRQ_EINT2 6
27#define IRQ_EINT3 7
28#define IRQ_TC1OI 8
29#define IRQ_TC2OI 9
30#define IRQ_RTCMI 10
31#define IRQ_TINT 11
32#define IRQ_UTXINT1 12
33#define IRQ_URXINT1 13
34#define IRQ_UMSINT 14
35#define IRQ_SSEOTI 15
36
37#define INT1_IRQS (0x0000fff0)
38#define INT1_ACK_IRQS (0x00004f10)
39
40/*
41 * Interrupts from INTSR2
42 */
43#define IRQ_KBDINT (16+0) /* bit 0 */
44#define IRQ_SS2RX (16+1) /* bit 1 */
45#define IRQ_SS2TX (16+2) /* bit 2 */
46#define IRQ_UTXINT2 (16+12) /* bit 12 */
47#define IRQ_URXINT2 (16+13) /* bit 13 */
48
49#define INT2_IRQS (0x30070000)
50#define INT2_ACK_IRQS (0x00010000)
51
52#define NR_IRQS 30
53
diff --git a/include/asm-arm/arch-clps711x/memory.h b/include/asm-arm/arch-clps711x/memory.h
deleted file mode 100644
index 42768cc8bfb4..000000000000
--- a/include/asm-arm/arch-clps711x/memory.h
+++ /dev/null
@@ -1,94 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-clps711x/memory.h
3 *
4 * Copyright (C) 1999 ARM Limited
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20#ifndef __ASM_ARCH_MEMORY_H
21#define __ASM_ARCH_MEMORY_H
22
23
24/*
25 * Physical DRAM offset.
26 */
27#define PHYS_OFFSET UL(0xc0000000)
28
29/*
30 * Virtual view <-> DMA view memory address translations
31 * virt_to_bus: Used to translate the virtual address to an
32 * address suitable to be passed to set_dma_addr
33 * bus_to_virt: Used to convert an address for DMA operations
34 * to an address that the kernel can use.
35 */
36
37#if defined(CONFIG_ARCH_CDB89712)
38
39#define __virt_to_bus(x) (x)
40#define __bus_to_virt(x) (x)
41
42#elif defined (CONFIG_ARCH_AUTCPU12)
43
44#define __virt_to_bus(x) (x)
45#define __bus_to_virt(x) (x)
46
47#else
48
49#define __virt_to_bus(x) ((x) - PAGE_OFFSET)
50#define __bus_to_virt(x) ((x) + PAGE_OFFSET)
51
52#endif
53
54
55/*
56 * Like the SA1100, the EDB7211 has a large gap between physical RAM
57 * banks. In 2.2, the Psion (CL-PS7110) port added custom support for
58 * discontiguous physical memory. In 2.4, we can use the standard
59 * Linux NUMA support.
60 *
61 * This is not necessary for EP7211 implementations with only one used
62 * memory bank. For those systems, simply undefine CONFIG_DISCONTIGMEM.
63 */
64
65/*
66 * The PS7211 allows up to 256MB max per DRAM bank, but the EDB7211
67 * uses only one of the two banks (bank #1). However, even within
68 * bank #1, memory is discontiguous.
69 *
70 * The EDB7211 has two 8MB DRAM areas with 8MB of empty space between
71 * them, so we use 24 for the node max shift to get 16MB node sizes.
72 */
73
74/*
75 * Because of the wide memory address space between physical RAM banks on the
76 * SA1100, it's much more convenient to use Linux's NUMA support to implement
77 * our memory map representation. Assuming all memory nodes have equal access
78 * characteristics, we then have generic discontiguous memory support.
79 *
80 * Of course, all this isn't mandatory for SA1100 implementations with only
81 * one used memory bank. For those, simply undefine CONFIG_DISCONTIGMEM.
82 *
83 * The nodes are matched with the physical memory bank addresses which are
84 * incidentally the same as virtual addresses.
85 *
86 * node 0: 0xc0000000 - 0xc7ffffff
87 * node 1: 0xc8000000 - 0xcfffffff
88 * node 2: 0xd0000000 - 0xd7ffffff
89 * node 3: 0xd8000000 - 0xdfffffff
90 */
91#define NODE_MEM_SIZE_BITS 24
92
93#endif
94
diff --git a/include/asm-arm/arch-clps711x/syspld.h b/include/asm-arm/arch-clps711x/syspld.h
deleted file mode 100644
index 960578a22a8e..000000000000
--- a/include/asm-arm/arch-clps711x/syspld.h
+++ /dev/null
@@ -1,121 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-clps711x/syspld.h
3 *
4 * System Control PLD register definitions.
5 *
6 * Copyright (C) 2000 Deep Blue Solutions Ltd.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 */
22#ifndef __ASM_ARCH_SYSPLD_H
23#define __ASM_ARCH_SYSPLD_H
24
25#define SYSPLD_PHYS_BASE (0x10000000)
26
27#ifndef __ASSEMBLY__
28#include <asm/types.h>
29
30#define SYSPLD_REG(type,off) (*(volatile type *)(SYSPLD_BASE + off))
31#else
32#define SYSPLD_REG(type,off) (off)
33#endif
34
35#define PLD_INT SYSPLD_REG(u32, 0x000000)
36#define PLD_INT_PENIRQ (1 << 5)
37#define PLD_INT_UCB_IRQ (1 << 1)
38#define PLD_INT_KBD_ATN (1 << 0) /* EINT1 */
39
40#define PLD_PWR SYSPLD_REG(u32, 0x000004)
41#define PLD_PWR_EXT (1 << 5)
42#define PLD_PWR_MODE (1 << 4) /* 1 = PWM, 0 = PFM */
43#define PLD_S4_ON (1 << 3) /* LCD bias voltage enable */
44#define PLD_S3_ON (1 << 2) /* LCD backlight enable */
45#define PLD_S2_ON (1 << 1) /* LCD 3V3 supply enable */
46#define PLD_S1_ON (1 << 0) /* LCD 3V supply enable */
47
48#define PLD_KBD SYSPLD_REG(u32, 0x000008)
49#define PLD_KBD_WAKE (1 << 1)
50#define PLD_KBD_EN (1 << 0)
51
52#define PLD_SPI SYSPLD_REG(u32, 0x00000c)
53#define PLD_SPI_EN (1 << 0)
54
55#define PLD_IO SYSPLD_REG(u32, 0x000010)
56#define PLD_IO_BOOTSEL (1 << 6) /* boot sel switch */
57#define PLD_IO_USER (1 << 5) /* user defined switch */
58#define PLD_IO_LED3 (1 << 4)
59#define PLD_IO_LED2 (1 << 3)
60#define PLD_IO_LED1 (1 << 2)
61#define PLD_IO_LED0 (1 << 1)
62#define PLD_IO_LEDEN (1 << 0)
63
64#define PLD_IRDA SYSPLD_REG(u32, 0x000014)
65#define PLD_IRDA_EN (1 << 0)
66
67#define PLD_COM2 SYSPLD_REG(u32, 0x000018)
68#define PLD_COM2_EN (1 << 0)
69
70#define PLD_COM1 SYSPLD_REG(u32, 0x00001c)
71#define PLD_COM1_EN (1 << 0)
72
73#define PLD_AUD SYSPLD_REG(u32, 0x000020)
74#define PLD_AUD_DIV1 (1 << 6)
75#define PLD_AUD_DIV0 (1 << 5)
76#define PLD_AUD_CLK_SEL1 (1 << 4)
77#define PLD_AUD_CLK_SEL0 (1 << 3)
78#define PLD_AUD_MIC_PWR (1 << 2)
79#define PLD_AUD_MIC_GAIN (1 << 1)
80#define PLD_AUD_CODEC_EN (1 << 0)
81
82#define PLD_CF SYSPLD_REG(u32, 0x000024)
83#define PLD_CF2_SLEEP (1 << 5)
84#define PLD_CF1_SLEEP (1 << 4)
85#define PLD_CF2_nPDREQ (1 << 3)
86#define PLD_CF1_nPDREQ (1 << 2)
87#define PLD_CF2_nIRQ (1 << 1)
88#define PLD_CF1_nIRQ (1 << 0)
89
90#define PLD_SDC SYSPLD_REG(u32, 0x000028)
91#define PLD_SDC_INT_EN (1 << 2)
92#define PLD_SDC_WP (1 << 1)
93#define PLD_SDC_CD (1 << 0)
94
95#define PLD_FPGA SYSPLD_REG(u32, 0x00002c)
96
97#define PLD_CODEC SYSPLD_REG(u32, 0x400000)
98#define PLD_CODEC_IRQ3 (1 << 4)
99#define PLD_CODEC_IRQ2 (1 << 3)
100#define PLD_CODEC_IRQ1 (1 << 2)
101#define PLD_CODEC_EN (1 << 0)
102
103#define PLD_BRITE SYSPLD_REG(u32, 0x400004)
104#define PLD_BRITE_UP (1 << 1)
105#define PLD_BRITE_DN (1 << 0)
106
107#define PLD_LCDEN SYSPLD_REG(u32, 0x400008)
108#define PLD_LCDEN_EN (1 << 0)
109
110#define PLD_ID SYSPLD_REG(u32, 0x40000c)
111
112#define PLD_TCH SYSPLD_REG(u32, 0x400010)
113#define PLD_TCH_PENIRQ (1 << 1)
114#define PLD_TCH_EN (1 << 0)
115
116#define PLD_GPIO SYSPLD_REG(u32, 0x400014)
117#define PLD_GPIO2 (1 << 2)
118#define PLD_GPIO1 (1 << 1)
119#define PLD_GPIO0 (1 << 0)
120
121#endif
diff --git a/include/asm-arm/arch-clps711x/system.h b/include/asm-arm/arch-clps711x/system.h
deleted file mode 100644
index 11e1491535a8..000000000000
--- a/include/asm-arm/arch-clps711x/system.h
+++ /dev/null
@@ -1,40 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-clps711x/system.h
3 *
4 * Copyright (C) 2000 Deep Blue Solutions Ltd
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20#ifndef __ASM_ARCH_SYSTEM_H
21#define __ASM_ARCH_SYSTEM_H
22
23#include <asm/hardware.h>
24#include <asm/hardware/clps7111.h>
25#include <asm/io.h>
26
27static inline void arch_idle(void)
28{
29 clps_writel(1, HALT);
30 __asm__ __volatile__(
31 "mov r0, r0\n\
32 mov r0, r0");
33}
34
35static inline void arch_reset(char mode)
36{
37 cpu_reset(0);
38}
39
40#endif
diff --git a/include/asm-arm/arch-clps711x/time.h b/include/asm-arm/arch-clps711x/time.h
deleted file mode 100644
index 5edaae1c61d3..000000000000
--- a/include/asm-arm/arch-clps711x/time.h
+++ /dev/null
@@ -1,49 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-clps711x/time.h
3 *
4 * Copyright (C) 2000 Deep Blue Solutions Ltd.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20#include <asm/leds.h>
21#include <asm/hardware/clps7111.h>
22
23extern void clps711x_setup_timer(void);
24
25/*
26 * IRQ handler for the timer
27 */
28static irqreturn_t
29p720t_timer_interrupt(int irq, void *dev_id)
30{
31 struct pt_regs *regs = get_irq_regs();
32 do_leds();
33 do_timer(1);
34#ifndef CONFIG_SMP
35 update_process_times(user_mode(regs));
36#endif
37 do_profile(regs);
38 return IRQ_HANDLED;
39}
40
41/*
42 * Set up timer interrupt, and return the current time in seconds.
43 */
44void __init time_init(void)
45{
46 clps711x_setup_timer();
47 timer_irq.handler = p720t_timer_interrupt;
48 setup_irq(IRQ_TC2OI, &timer_irq);
49}
diff --git a/include/asm-arm/arch-clps711x/timex.h b/include/asm-arm/arch-clps711x/timex.h
deleted file mode 100644
index dcbb381da3dd..000000000000
--- a/include/asm-arm/arch-clps711x/timex.h
+++ /dev/null
@@ -1,23 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-clps711x/timex.h
3 *
4 * Prospector 720T architecture timex specifications
5 *
6 * Copyright (C) 2000 Deep Blue Solutions Ltd.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 */
22
23#define CLOCK_TICK_RATE 512000
diff --git a/include/asm-arm/arch-clps711x/uncompress.h b/include/asm-arm/arch-clps711x/uncompress.h
deleted file mode 100644
index 03d233ae87ce..000000000000
--- a/include/asm-arm/arch-clps711x/uncompress.h
+++ /dev/null
@@ -1,59 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-clps711x/uncompress.h
3 *
4 * Copyright (C) 2000 Deep Blue Solutions Ltd
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20#include <asm/arch/io.h>
21#include <asm/hardware.h>
22#include <asm/hardware/clps7111.h>
23
24#undef CLPS7111_BASE
25#define CLPS7111_BASE CLPS7111_PHYS_BASE
26
27#define __raw_readl(p) (*(unsigned long *)(p))
28#define __raw_writel(v,p) (*(unsigned long *)(p) = (v))
29
30#ifdef CONFIG_DEBUG_CLPS711X_UART2
31#define SYSFLGx SYSFLG2
32#define UARTDRx UARTDR2
33#else
34#define SYSFLGx SYSFLG1
35#define UARTDRx UARTDR1
36#endif
37
38/*
39 * This does not append a newline
40 */
41static inline void putc(int c)
42{
43 while (clps_readl(SYSFLGx) & SYSFLG_UTXFF)
44 barrier();
45 clps_writel(c, UARTDRx);
46}
47
48static inline void flush(void)
49{
50 while (clps_readl(SYSFLGx) & SYSFLG_UBUSY)
51 barrier();
52}
53
54/*
55 * nothing to do
56 */
57#define arch_decomp_setup()
58
59#define arch_decomp_wdog()
diff --git a/include/asm-arm/arch-clps711x/vmalloc.h b/include/asm-arm/arch-clps711x/vmalloc.h
deleted file mode 100644
index a5dfe96abc96..000000000000
--- a/include/asm-arm/arch-clps711x/vmalloc.h
+++ /dev/null
@@ -1,20 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-clps711x/vmalloc.h
3 *
4 * Copyright (C) 2000 Deep Blue Solutions Ltd.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20#define VMALLOC_END (PAGE_OFFSET + 0x10000000)
diff --git a/include/asm-arm/arch-davinci/clock.h b/include/asm-arm/arch-davinci/clock.h
deleted file mode 100644
index cc168b7a14f2..000000000000
--- a/include/asm-arm/arch-davinci/clock.h
+++ /dev/null
@@ -1,22 +0,0 @@
1/*
2 * include/asm-arm/arch-davinci/clock.h
3 *
4 * Clock control driver for DaVinci - header file
5 *
6 * Authors: Vladimir Barinov <source@mvista.com>
7 *
8 * 2007 (c) MontaVista Software, Inc. This file is licensed under
9 * the terms of the GNU General Public License version 2. This program
10 * is licensed "as is" without any warranty of any kind, whether express
11 * or implied.
12 */
13#ifndef __ASM_ARCH_DAVINCI_CLOCK_H
14#define __ASM_ARCH_DAVINCI_CLOCK_H
15
16struct clk;
17
18extern int clk_register(struct clk *clk);
19extern void clk_unregister(struct clk *clk);
20extern int davinci_clk_init(void);
21
22#endif
diff --git a/include/asm-arm/arch-davinci/entry-macro.S b/include/asm-arm/arch-davinci/entry-macro.S
deleted file mode 100644
index 3ebfcc5cb58e..000000000000
--- a/include/asm-arm/arch-davinci/entry-macro.S
+++ /dev/null
@@ -1,32 +0,0 @@
1/*
2 * Low-level IRQ helper macros for TI DaVinci-based platforms
3 *
4 * Author: Kevin Hilman, MontaVista Software, Inc. <source@mvista.com>
5 *
6 * 2007 (c) MontaVista Software, Inc. This file is licensed under
7 * the terms of the GNU General Public License version 2. This program
8 * is licensed "as is" without any warranty of any kind, whether express
9 * or implied.
10 */
11#include <asm/arch/io.h>
12#include <asm/arch/irqs.h>
13
14 .macro disable_fiq
15 .endm
16
17 .macro get_irqnr_preamble, base, tmp
18 ldr \base, =IO_ADDRESS(DAVINCI_ARM_INTC_BASE)
19 .endm
20
21 .macro arch_ret_to_user, tmp1, tmp2
22 .endm
23
24 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
25 ldr \tmp, [\base, #0x14]
26 mov \tmp, \tmp, lsr #2
27 sub \irqnr, \tmp, #1
28 cmp \tmp, #0
29 .endm
30
31 .macro irq_prio_table
32 .endm
diff --git a/include/asm-arm/arch-davinci/gpio.h b/include/asm-arm/arch-davinci/gpio.h
deleted file mode 100644
index ff8de30b2fb3..000000000000
--- a/include/asm-arm/arch-davinci/gpio.h
+++ /dev/null
@@ -1,159 +0,0 @@
1/*
2 * TI DaVinci GPIO Support
3 *
4 * Copyright (c) 2006 David Brownell
5 * Copyright (c) 2007, MontaVista Software, Inc. <source@mvista.com>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 */
12
13#ifndef __DAVINCI_GPIO_H
14#define __DAVINCI_GPIO_H
15
16#include <linux/io.h>
17#include <asm/hardware.h>
18
19/*
20 * basic gpio routines
21 *
22 * board-specific init should be done by arch/.../.../board-XXX.c (maybe
23 * initializing banks together) rather than boot loaders; kexec() won't
24 * go through boot loaders.
25 *
26 * the gpio clock will be turned on when gpios are used, and you may also
27 * need to pay attention to PINMUX0 and PINMUX1 to be sure those pins are
28 * used as gpios, not with other peripherals.
29 *
30 * GPIOs are numbered 0..(DAVINCI_N_GPIO-1). For documentation, and maybe
31 * for later updates, code should write GPIO(N) or:
32 * - GPIOV18(N) for 1.8V pins, N in 0..53; same as GPIO(0)..GPIO(53)
33 * - GPIOV33(N) for 3.3V pins, N in 0..17; same as GPIO(54)..GPIO(70)
34 *
35 * For GPIO IRQs use gpio_to_irq(GPIO(N)) or gpio_to_irq(GPIOV33(N)) etc
36 * for now, that's != GPIO(N)
37 */
38#define GPIO(X) (X) /* 0 <= X <= 70 */
39#define GPIOV18(X) (X) /* 1.8V i/o; 0 <= X <= 53 */
40#define GPIOV33(X) ((X)+54) /* 3.3V i/o; 0 <= X <= 17 */
41
42struct gpio_controller {
43 u32 dir;
44 u32 out_data;
45 u32 set_data;
46 u32 clr_data;
47 u32 in_data;
48 u32 set_rising;
49 u32 clr_rising;
50 u32 set_falling;
51 u32 clr_falling;
52 u32 intstat;
53};
54
55/* The __gpio_to_controller() and __gpio_mask() functions inline to constants
56 * with constant parameters; or in outlined code they execute at runtime.
57 *
58 * You'd access the controller directly when reading or writing more than
59 * one gpio value at a time, and to support wired logic where the value
60 * being driven by the cpu need not match the value read back.
61 *
62 * These are NOT part of the cross-platform GPIO interface
63 */
64static inline struct gpio_controller *__iomem
65__gpio_to_controller(unsigned gpio)
66{
67 void *__iomem ptr;
68
69 if (gpio < 32)
70 ptr = (void *__iomem)IO_ADDRESS(DAVINCI_GPIO_BASE + 0x10);
71 else if (gpio < 64)
72 ptr = (void *__iomem)IO_ADDRESS(DAVINCI_GPIO_BASE + 0x38);
73 else if (gpio < DAVINCI_N_GPIO)
74 ptr = (void *__iomem)IO_ADDRESS(DAVINCI_GPIO_BASE + 0x60);
75 else
76 ptr = NULL;
77 return ptr;
78}
79
80static inline u32 __gpio_mask(unsigned gpio)
81{
82 return 1 << (gpio % 32);
83}
84
85/* The get/set/clear functions will inline when called with constant
86 * parameters, for low-overhead bitbanging. Illegal constant parameters
87 * cause link-time errors.
88 *
89 * Otherwise, calls with variable parameters use outlined functions.
90 */
91extern int __error_inval_gpio(void);
92
93extern void __gpio_set(unsigned gpio, int value);
94extern int __gpio_get(unsigned gpio);
95
96static inline void gpio_set_value(unsigned gpio, int value)
97{
98 if (__builtin_constant_p(value)) {
99 struct gpio_controller *__iomem g;
100 u32 mask;
101
102 if (gpio >= DAVINCI_N_GPIO)
103 __error_inval_gpio();
104
105 g = __gpio_to_controller(gpio);
106 mask = __gpio_mask(gpio);
107 if (value)
108 __raw_writel(mask, &g->set_data);
109 else
110 __raw_writel(mask, &g->clr_data);
111 return;
112 }
113
114 __gpio_set(gpio, value);
115}
116
117/* Returns zero or nonzero; works for gpios configured as inputs OR
118 * as outputs.
119 *
120 * NOTE: changes in reported values are synchronized to the GPIO clock.
121 * This is most easily seen after calling gpio_set_value() and then immediatly
122 * gpio_get_value(), where the gpio_get_value() would return the old value
123 * until the GPIO clock ticks and the new value gets latched.
124 */
125
126static inline int gpio_get_value(unsigned gpio)
127{
128 struct gpio_controller *__iomem g;
129
130 if (!__builtin_constant_p(gpio))
131 return __gpio_get(gpio);
132
133 if (gpio >= DAVINCI_N_GPIO)
134 return __error_inval_gpio();
135
136 g = __gpio_to_controller(gpio);
137 return !!(__gpio_mask(gpio) & __raw_readl(&g->in_data));
138}
139
140/* powerup default direction is IN */
141extern int gpio_direction_input(unsigned gpio);
142extern int gpio_direction_output(unsigned gpio, int value);
143
144#include <asm-generic/gpio.h> /* cansleep wrappers */
145
146extern int gpio_request(unsigned gpio, const char *tag);
147extern void gpio_free(unsigned gpio);
148
149static inline int gpio_to_irq(unsigned gpio)
150{
151 return DAVINCI_N_AINTC_IRQ + gpio;
152}
153
154static inline int irq_to_gpio(unsigned irq)
155{
156 return irq - DAVINCI_N_AINTC_IRQ;
157}
158
159#endif /* __DAVINCI_GPIO_H */
diff --git a/include/asm-arm/arch-davinci/serial.h b/include/asm-arm/arch-davinci/serial.h
deleted file mode 100644
index ed418ef76805..000000000000
--- a/include/asm-arm/arch-davinci/serial.h
+++ /dev/null
@@ -1,20 +0,0 @@
1/*
2 * DaVinci serial device definitions
3 *
4 * Author: Kevin Hilman, MontaVista Software, Inc. <source@mvista.com>
5 *
6 * 2007 (c) MontaVista Software, Inc. This file is licensed under
7 * the terms of the GNU General Public License version 2. This program
8 * is licensed "as is" without any warranty of any kind, whether express
9 * or implied.
10 */
11#ifndef __ASM_ARCH_SERIAL_H
12#define __ASM_ARCH_SERIAL_H
13
14#include <asm/arch/io.h>
15
16#define DAVINCI_UART0_BASE (IO_PHYS + 0x20000)
17#define DAVINCI_UART1_BASE (IO_PHYS + 0x20400)
18#define DAVINCI_UART2_BASE (IO_PHYS + 0x20800)
19
20#endif /* __ASM_ARCH_SERIAL_H */
diff --git a/include/asm-arm/arch-davinci/system.h b/include/asm-arm/arch-davinci/system.h
deleted file mode 100644
index 440ac515804b..000000000000
--- a/include/asm-arm/arch-davinci/system.h
+++ /dev/null
@@ -1,29 +0,0 @@
1/*
2 * DaVinci system defines
3 *
4 * Author: Kevin Hilman, MontaVista Software, Inc. <source@mvista.com>
5 *
6 * 2007 (c) MontaVista Software, Inc. This file is licensed under
7 * the terms of the GNU General Public License version 2. This program
8 * is licensed "as is" without any warranty of any kind, whether express
9 * or implied.
10 */
11#ifndef __ASM_ARCH_SYSTEM_H
12#define __ASM_ARCH_SYSTEM_H
13
14#include <asm/io.h>
15#include <asm/hardware.h>
16
17extern void davinci_watchdog_reset(void);
18
19static void arch_idle(void)
20{
21 cpu_do_idle();
22}
23
24static void arch_reset(char mode)
25{
26 davinci_watchdog_reset();
27}
28
29#endif /* __ASM_ARCH_SYSTEM_H */
diff --git a/include/asm-arm/arch-davinci/uncompress.h b/include/asm-arm/arch-davinci/uncompress.h
deleted file mode 100644
index f6d1570f7206..000000000000
--- a/include/asm-arm/arch-davinci/uncompress.h
+++ /dev/null
@@ -1,35 +0,0 @@
1/*
2 * Serial port stubs for kernel decompress status messages
3 *
4 * Author: Anant Gole
5 * (C) Copyright (C) 2006, Texas Instruments, Inc
6 *
7 * This file is licensed under the terms of the GNU General Public License
8 * version 2. This program is licensed "as is" without any warranty of any
9 * kind, whether express or implied.
10 */
11
12#include <linux/types.h>
13#include <linux/serial_reg.h>
14#include <asm/arch/serial.h>
15
16/* PORT_16C550A, in polled non-fifo mode */
17
18static void putc(char c)
19{
20 volatile u32 *uart = (volatile void *) DAVINCI_UART0_BASE;
21
22 while (!(uart[UART_LSR] & UART_LSR_THRE))
23 barrier();
24 uart[UART_TX] = c;
25}
26
27static inline void flush(void)
28{
29 volatile u32 *uart = (volatile void *) DAVINCI_UART0_BASE;
30 while (!(uart[UART_LSR] & UART_LSR_THRE))
31 barrier();
32}
33
34#define arch_decomp_setup()
35#define arch_decomp_wdog()
diff --git a/include/asm-arm/arch-davinci/vmalloc.h b/include/asm-arm/arch-davinci/vmalloc.h
deleted file mode 100644
index 9b47fa89b333..000000000000
--- a/include/asm-arm/arch-davinci/vmalloc.h
+++ /dev/null
@@ -1,15 +0,0 @@
1/*
2 * DaVinci vmalloc definitions
3 *
4 * Author: Kevin Hilman, MontaVista Software, Inc. <source@mvista.com>
5 *
6 * 2007 (c) MontaVista Software, Inc. This file is licensed under
7 * the terms of the GNU General Public License version 2. This program
8 * is licensed "as is" without any warranty of any kind, whether express
9 * or implied.
10 */
11#include <asm/memory.h>
12#include <asm/arch/io.h>
13
14/* Allow vmalloc range until the IO virtual range minus a 2M "hole" */
15#define VMALLOC_END (IO_VIRT - (2<<20))
diff --git a/include/asm-arm/arch-ebsa110/debug-macro.S b/include/asm-arm/arch-ebsa110/debug-macro.S
deleted file mode 100644
index 9213bfe4831d..000000000000
--- a/include/asm-arm/arch-ebsa110/debug-macro.S
+++ /dev/null
@@ -1,21 +0,0 @@
1/* linux/include/asm-arm/arch-ebsa110/debug-macro.S
2 *
3 * Debugging macro include header
4 *
5 * Copyright (C) 1994-1999 Russell King
6 * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 *
12**/
13
14 .macro addruart,rx
15 mov \rx, #0xf0000000
16 orr \rx, \rx, #0x00000be0
17 .endm
18
19#define UART_SHIFT 2
20#define FLOW_CONTROL
21#include <asm/hardware/debug-8250.S>
diff --git a/include/asm-arm/arch-ebsa110/dma.h b/include/asm-arm/arch-ebsa110/dma.h
deleted file mode 100644
index c52f9e2ab0bb..000000000000
--- a/include/asm-arm/arch-ebsa110/dma.h
+++ /dev/null
@@ -1,11 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-ebsa110/dma.h
3 *
4 * Copyright (C) 1997,1998 Russell King
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * EBSA110 DMA definitions
11 */
diff --git a/include/asm-arm/arch-ebsa110/entry-macro.S b/include/asm-arm/arch-ebsa110/entry-macro.S
deleted file mode 100644
index f242be5c49ba..000000000000
--- a/include/asm-arm/arch-ebsa110/entry-macro.S
+++ /dev/null
@@ -1,39 +0,0 @@
1/*
2 * include/asm-arm/arch-ebsa110/entry-macro.S
3 *
4 * Low-level IRQ helper macros for ebsa110 platform.
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10
11
12
13#define IRQ_STAT 0xff000000 /* read */
14
15 .macro disable_fiq
16 .endm
17
18 .macro get_irqnr_preamble, base, tmp
19 mov \base, #IRQ_STAT
20 .endm
21
22 .macro arch_ret_to_user, tmp1, tmp2
23 .endm
24
25 .macro get_irqnr_and_base, irqnr, stat, base, tmp
26 ldrb \stat, [\base] @ get interrupts
27 mov \irqnr, #0
28 tst \stat, #15
29 addeq \irqnr, \irqnr, #4
30 moveq \stat, \stat, lsr #4
31 tst \stat, #3
32 addeq \irqnr, \irqnr, #2
33 moveq \stat, \stat, lsr #2
34 tst \stat, #1
35 addeq \irqnr, \irqnr, #1
36 moveq \stat, \stat, lsr #1
37 tst \stat, #1 @ bit 0 should be set
38 .endm
39
diff --git a/include/asm-arm/arch-ebsa110/hardware.h b/include/asm-arm/arch-ebsa110/hardware.h
deleted file mode 100644
index 3ce864def41e..000000000000
--- a/include/asm-arm/arch-ebsa110/hardware.h
+++ /dev/null
@@ -1,63 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-ebsa110/hardware.h
3 *
4 * Copyright (C) 1996-2000 Russell King.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * This file contains the hardware definitions of the EBSA-110.
11 */
12#ifndef __ASM_ARCH_HARDWARE_H
13#define __ASM_ARCH_HARDWARE_H
14
15/*
16 * The EBSA110 has a weird "ISA IO" region:
17 *
18 * Region 0 (addr = 0xf0000000 + io << 2)
19 * --------------------------------------------------------
20 * Physical region IO region
21 * f0000fe0 - f0000ffc 3f8 - 3ff ttyS0
22 * f0000e60 - f0000e64 398 - 399
23 * f0000de0 - f0000dfc 378 - 37f lp0
24 * f0000be0 - f0000bfc 2f8 - 2ff ttyS1
25 *
26 * Region 1 (addr = 0xf0000000 + (io & ~1) << 1 + (io & 1))
27 * --------------------------------------------------------
28 * Physical region IO region
29 * f00014f1 a79 pnp write data
30 * f00007c0 - f00007c1 3e0 - 3e1 pcmcia
31 * f00004f1 279 pnp address
32 * f0000440 - f000046c 220 - 236 eth0
33 * f0000405 203 pnp read data
34 */
35
36#define ISAMEM_PHYS 0xe0000000
37#define ISAMEM_SIZE 0x10000000
38
39#define ISAIO_PHYS 0xf0000000
40#define ISAIO_SIZE PGDIR_SIZE
41
42#define TRICK0_PHYS 0xf2000000
43#define TRICK1_PHYS 0xf2400000
44#define TRICK2_PHYS 0xf2800000
45#define TRICK3_PHYS 0xf2c00000
46#define TRICK4_PHYS 0xf3000000
47#define TRICK5_PHYS 0xf3400000
48#define TRICK6_PHYS 0xf3800000
49#define TRICK7_PHYS 0xf3c00000
50
51#define ISAMEM_BASE 0xe0000000
52#define ISAIO_BASE 0xf0000000
53
54#define PIT_BASE 0xfc000000
55#define SOFT_BASE 0xfd000000
56
57/*
58 * RAM definitions
59 */
60#define UNCACHEABLE_ADDR 0xff000000 /* IRQ_STAT */
61
62#endif
63
diff --git a/include/asm-arm/arch-ebsa110/io.h b/include/asm-arm/arch-ebsa110/io.h
deleted file mode 100644
index 44a4001de807..000000000000
--- a/include/asm-arm/arch-ebsa110/io.h
+++ /dev/null
@@ -1,92 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-ebsa110/io.h
3 *
4 * Copyright (C) 1997,1998 Russell King
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * Modifications:
11 * 06-Dec-1997 RMK Created.
12 */
13#ifndef __ASM_ARM_ARCH_IO_H
14#define __ASM_ARM_ARCH_IO_H
15
16#define IO_SPACE_LIMIT 0xffff
17
18u8 __inb8(unsigned int port);
19void __outb8(u8 val, unsigned int port);
20
21u8 __inb16(unsigned int port);
22void __outb16(u8 val, unsigned int port);
23
24u16 __inw(unsigned int port);
25void __outw(u16 val, unsigned int port);
26
27u32 __inl(unsigned int port);
28void __outl(u32 val, unsigned int port);
29
30u8 __readb(const volatile void __iomem *addr);
31u16 __readw(const volatile void __iomem *addr);
32u32 __readl(const volatile void __iomem *addr);
33
34void __writeb(u8 val, void __iomem *addr);
35void __writew(u16 val, void __iomem *addr);
36void __writel(u32 val, void __iomem *addr);
37
38/*
39 * Argh, someone forgot the IOCS16 line. We therefore have to handle
40 * the byte stearing by selecting the correct byte IO functions here.
41 */
42#ifdef ISA_SIXTEEN_BIT_PERIPHERAL
43#define inb(p) __inb16(p)
44#define outb(v,p) __outb16(v,p)
45#else
46#define inb(p) __inb8(p)
47#define outb(v,p) __outb8(v,p)
48#endif
49
50#define inw(p) __inw(p)
51#define outw(v,p) __outw(v,p)
52
53#define inl(p) __inl(p)
54#define outl(v,p) __outl(v,p)
55
56#define readb(b) __readb(b)
57#define readw(b) __readw(b)
58#define readl(b) __readl(b)
59#define readb_relaxed(addr) readb(addr)
60#define readw_relaxed(addr) readw(addr)
61#define readl_relaxed(addr) readl(addr)
62
63#define writeb(v,b) __writeb(v,b)
64#define writew(v,b) __writew(v,b)
65#define writel(v,b) __writel(v,b)
66
67static inline void __iomem *__arch_ioremap(unsigned long cookie, size_t size,
68 unsigned int flags)
69{
70 return (void __iomem *)cookie;
71}
72
73#define __arch_ioremap __arch_ioremap
74#define __arch_iounmap(cookie) do { } while (0)
75
76extern void insb(unsigned int port, void *buf, int sz);
77extern void insw(unsigned int port, void *buf, int sz);
78extern void insl(unsigned int port, void *buf, int sz);
79
80extern void outsb(unsigned int port, const void *buf, int sz);
81extern void outsw(unsigned int port, const void *buf, int sz);
82extern void outsl(unsigned int port, const void *buf, int sz);
83
84/* can't support writesb atm */
85extern void writesw(void __iomem *addr, const void *data, int wordlen);
86extern void writesl(void __iomem *addr, const void *data, int longlen);
87
88/* can't support readsb atm */
89extern void readsw(const void __iomem *addr, void *data, int wordlen);
90extern void readsl(const void __iomem *addr, void *data, int longlen);
91
92#endif
diff --git a/include/asm-arm/arch-ebsa110/irqs.h b/include/asm-arm/arch-ebsa110/irqs.h
deleted file mode 100644
index ded9bd9d7b8b..000000000000
--- a/include/asm-arm/arch-ebsa110/irqs.h
+++ /dev/null
@@ -1,20 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-ebsa110/irqs.h
3 *
4 * Copyright (C) 1996 Russell King
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10
11#define NR_IRQS 8
12
13#define IRQ_EBSA110_PRINTER 0
14#define IRQ_EBSA110_COM1 1
15#define IRQ_EBSA110_COM2 2
16#define IRQ_EBSA110_ETHERNET 3
17#define IRQ_EBSA110_TIMER0 4
18#define IRQ_EBSA110_TIMER1 5
19#define IRQ_EBSA110_PCMCIA 6
20#define IRQ_EBSA110_IMMEDIATE 7
diff --git a/include/asm-arm/arch-ebsa110/memory.h b/include/asm-arm/arch-ebsa110/memory.h
deleted file mode 100644
index c7c500e176d0..000000000000
--- a/include/asm-arm/arch-ebsa110/memory.h
+++ /dev/null
@@ -1,37 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-ebsa110/memory.h
3 *
4 * Copyright (C) 1996-1999 Russell King.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * Changelog:
11 * 20-Oct-1996 RMK Created
12 * 31-Dec-1997 RMK Fixed definitions to reduce warnings
13 * 21-Mar-1999 RMK Renamed to memory.h
14 * RMK Moved TASK_SIZE and PAGE_OFFSET here
15 */
16#ifndef __ASM_ARCH_MEMORY_H
17#define __ASM_ARCH_MEMORY_H
18
19/*
20 * Physical DRAM offset.
21 */
22#define PHYS_OFFSET UL(0x00000000)
23
24/*
25 * We keep this 1:1 so that we don't interfere
26 * with the PCMCIA memory regions
27 */
28#define __virt_to_bus(x) (x)
29#define __bus_to_virt(x) (x)
30
31/*
32 * Cache flushing area - SRAM
33 */
34#define FLUSH_BASE_PHYS 0x40000000
35#define FLUSH_BASE 0xdf000000
36
37#endif
diff --git a/include/asm-arm/arch-ebsa110/system.h b/include/asm-arm/arch-ebsa110/system.h
deleted file mode 100644
index d7c8fece0bc5..000000000000
--- a/include/asm-arm/arch-ebsa110/system.h
+++ /dev/null
@@ -1,39 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-ebsa110/system.h
3 *
4 * Copyright (C) 1996-2000 Russell King.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10#ifndef __ASM_ARCH_SYSTEM_H
11#define __ASM_ARCH_SYSTEM_H
12
13/*
14 * EBSA110 idling methodology:
15 *
16 * We can not execute the "wait for interrupt" instruction since that
17 * will stop our MCLK signal (which provides the clock for the glue
18 * logic, and therefore the timer interrupt).
19 *
20 * Instead, we spin, polling the IRQ_STAT register for the occurrence
21 * of any interrupt with core clock down to the memory clock.
22 */
23static inline void arch_idle(void)
24{
25 const char *irq_stat = (char *)0xff000000;
26
27 /* disable clock switching */
28 asm volatile ("mcr p15, 0, ip, c15, c2, 2" : : : "cc");
29
30 /* wait for an interrupt to occur */
31 while (!*irq_stat);
32
33 /* enable clock switching */
34 asm volatile ("mcr p15, 0, ip, c15, c1, 2" : : : "cc");
35}
36
37#define arch_reset(mode) cpu_reset(0x80000000)
38
39#endif
diff --git a/include/asm-arm/arch-ebsa110/timex.h b/include/asm-arm/arch-ebsa110/timex.h
deleted file mode 100644
index 1e9ef045092b..000000000000
--- a/include/asm-arm/arch-ebsa110/timex.h
+++ /dev/null
@@ -1,19 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-ebsa110/timex.h
3 *
4 * Copyright (C) 1997, 1998 Russell King
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * EBSA110 architecture timex specifications
11 */
12
13/*
14 * On the EBSA, the clock ticks at weird rates.
15 * This is therefore not used to calculate the
16 * divisor.
17 */
18#define CLOCK_TICK_RATE 47894000
19
diff --git a/include/asm-arm/arch-ebsa110/uncompress.h b/include/asm-arm/arch-ebsa110/uncompress.h
deleted file mode 100644
index ae5b775eb0b7..000000000000
--- a/include/asm-arm/arch-ebsa110/uncompress.h
+++ /dev/null
@@ -1,45 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-ebsa110/uncompress.h
3 *
4 * Copyright (C) 1996,1997,1998 Russell King
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10
11#include <linux/serial_reg.h>
12
13#define SERIAL_BASE ((unsigned char *)0xf0000be0)
14
15/*
16 * This does not append a newline
17 */
18static inline void putc(int c)
19{
20 unsigned char v, *base = SERIAL_BASE;
21
22 do {
23 v = base[UART_LSR << 2];
24 barrier();
25 } while (!(v & UART_LSR_THRE));
26
27 base[UART_TX << 2] = c;
28}
29
30static inline void flush(void)
31{
32 unsigned char v, *base = SERIAL_BASE;
33
34 do {
35 v = base[UART_LSR << 2];
36 barrier();
37 } while ((v & (UART_LSR_TEMT|UART_LSR_THRE)) !=
38 (UART_LSR_TEMT|UART_LSR_THRE));
39}
40
41/*
42 * nothing to do
43 */
44#define arch_decomp_setup()
45#define arch_decomp_wdog()
diff --git a/include/asm-arm/arch-ebsa110/vmalloc.h b/include/asm-arm/arch-ebsa110/vmalloc.h
deleted file mode 100644
index 26674ba4683c..000000000000
--- a/include/asm-arm/arch-ebsa110/vmalloc.h
+++ /dev/null
@@ -1,10 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-ebsa110/vmalloc.h
3 *
4 * Copyright (C) 1998 Russell King
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10#define VMALLOC_END (PAGE_OFFSET + 0x1f000000)
diff --git a/include/asm-arm/arch-ebsa285/debug-macro.S b/include/asm-arm/arch-ebsa285/debug-macro.S
deleted file mode 100644
index b48cec4a0c45..000000000000
--- a/include/asm-arm/arch-ebsa285/debug-macro.S
+++ /dev/null
@@ -1,57 +0,0 @@
1/* linux/include/asm-arm/arch-ebsa285/debug-macro.S
2 *
3 * Debugging macro include header
4 *
5 * Copyright (C) 1994-1999 Russell King
6 * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 *
12*/
13
14#include <asm/hardware/dec21285.h>
15
16#ifndef CONFIG_DEBUG_DC21285_PORT
17 /* For NetWinder debugging */
18 .macro addruart,rx
19 mrc p15, 0, \rx, c1, c0
20 tst \rx, #1 @ MMU enabled?
21 moveq \rx, #0x7c000000 @ physical
22 movne \rx, #0xff000000 @ virtual
23 orr \rx, \rx, #0x000003f8
24 .endm
25
26#define UART_SHIFT 0
27#define FLOW_CONTROL
28#include <asm/hardware/debug-8250.S>
29
30#else
31 /* For EBSA285 debugging */
32 .equ dc21285_high, ARMCSR_BASE & 0xff000000
33 .equ dc21285_low, ARMCSR_BASE & 0x00ffffff
34
35 .macro addruart,rx
36 mrc p15, 0, \rx, c1, c0
37 tst \rx, #1 @ MMU enabled?
38 moveq \rx, #0x42000000
39 movne \rx, #dc21285_high
40 .if dc21285_low
41 orrne \rx, \rx, #dc21285_low
42 .endif
43 .endm
44
45 .macro senduart,rd,rx
46 str \rd, [\rx, #0x160] @ UARTDR
47 .endm
48
49 .macro busyuart,rd,rx
501001: ldr \rd, [\rx, #0x178] @ UARTFLG
51 tst \rd, #1 << 3
52 bne 1001b
53 .endm
54
55 .macro waituart,rd,rx
56 .endm
57#endif
diff --git a/include/asm-arm/arch-ebsa285/dma.h b/include/asm-arm/arch-ebsa285/dma.h
deleted file mode 100644
index 0259ad45d33c..000000000000
--- a/include/asm-arm/arch-ebsa285/dma.h
+++ /dev/null
@@ -1,25 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-ebsa285/dma.h
3 *
4 * Architecture DMA routines
5 *
6 * Copyright (C) 1998,1999 Russell King
7 * Copyright (C) 1998,1999 Philip Blundell
8 */
9#ifndef __ASM_ARCH_DMA_H
10#define __ASM_ARCH_DMA_H
11
12/*
13 * The 21285 has two internal DMA channels; we call these 8 and 9.
14 * On CATS hardware we have an additional eight ISA dma channels
15 * numbered 0..7.
16 */
17#define _ISA_DMA(x) (0+(x))
18#define _DC21285_DMA(x) (8+(x))
19
20#define MAX_DMA_CHANNELS 10
21
22#define DMA_FLOPPY _ISA_DMA(2)
23#define DMA_ISA_CASCADE _ISA_DMA(4)
24
25#endif /* _ASM_ARCH_DMA_H */
diff --git a/include/asm-arm/arch-ebsa285/entry-macro.S b/include/asm-arm/arch-ebsa285/entry-macro.S
deleted file mode 100644
index e63064edb734..000000000000
--- a/include/asm-arm/arch-ebsa285/entry-macro.S
+++ /dev/null
@@ -1,113 +0,0 @@
1/*
2 * include/asm-arm/arch-ebsa285/entry-macro.S
3 *
4 * Low-level IRQ helper macros for footbridge-based platforms
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10#include <asm/hardware.h>
11#include <asm/arch/irqs.h>
12#include <asm/hardware/dec21285.h>
13
14 .equ dc21285_high, ARMCSR_BASE & 0xff000000
15 .equ dc21285_low, ARMCSR_BASE & 0x00ffffff
16
17 .macro disable_fiq
18 .endm
19
20 .macro get_irqnr_preamble, base, tmp
21 mov \base, #dc21285_high
22 .if dc21285_low
23 orr \base, \base, #dc21285_low
24 .endif
25 .endm
26
27 .macro arch_ret_to_user, tmp1, tmp2
28 .endm
29
30 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
31 ldr \irqstat, [\base, #0x180] @ get interrupts
32
33 mov \irqnr, #IRQ_SDRAMPARITY
34 tst \irqstat, #IRQ_MASK_SDRAMPARITY
35 bne 1001f
36
37 tst \irqstat, #IRQ_MASK_UART_RX
38 movne \irqnr, #IRQ_CONRX
39 bne 1001f
40
41 tst \irqstat, #IRQ_MASK_DMA1
42 movne \irqnr, #IRQ_DMA1
43 bne 1001f
44
45 tst \irqstat, #IRQ_MASK_DMA2
46 movne \irqnr, #IRQ_DMA2
47 bne 1001f
48
49 tst \irqstat, #IRQ_MASK_IN0
50 movne \irqnr, #IRQ_IN0
51 bne 1001f
52
53 tst \irqstat, #IRQ_MASK_IN1
54 movne \irqnr, #IRQ_IN1
55 bne 1001f
56
57 tst \irqstat, #IRQ_MASK_IN2
58 movne \irqnr, #IRQ_IN2
59 bne 1001f
60
61 tst \irqstat, #IRQ_MASK_IN3
62 movne \irqnr, #IRQ_IN3
63 bne 1001f
64
65 tst \irqstat, #IRQ_MASK_PCI
66 movne \irqnr, #IRQ_PCI
67 bne 1001f
68
69 tst \irqstat, #IRQ_MASK_DOORBELLHOST
70 movne \irqnr, #IRQ_DOORBELLHOST
71 bne 1001f
72
73 tst \irqstat, #IRQ_MASK_I2OINPOST
74 movne \irqnr, #IRQ_I2OINPOST
75 bne 1001f
76
77 tst \irqstat, #IRQ_MASK_TIMER1
78 movne \irqnr, #IRQ_TIMER1
79 bne 1001f
80
81 tst \irqstat, #IRQ_MASK_TIMER2
82 movne \irqnr, #IRQ_TIMER2
83 bne 1001f
84
85 tst \irqstat, #IRQ_MASK_TIMER3
86 movne \irqnr, #IRQ_TIMER3
87 bne 1001f
88
89 tst \irqstat, #IRQ_MASK_UART_TX
90 movne \irqnr, #IRQ_CONTX
91 bne 1001f
92
93 tst \irqstat, #IRQ_MASK_PCI_ABORT
94 movne \irqnr, #IRQ_PCI_ABORT
95 bne 1001f
96
97 tst \irqstat, #IRQ_MASK_PCI_SERR
98 movne \irqnr, #IRQ_PCI_SERR
99 bne 1001f
100
101 tst \irqstat, #IRQ_MASK_DISCARD_TIMER
102 movne \irqnr, #IRQ_DISCARD_TIMER
103 bne 1001f
104
105 tst \irqstat, #IRQ_MASK_PCI_DPERR
106 movne \irqnr, #IRQ_PCI_DPERR
107 bne 1001f
108
109 tst \irqstat, #IRQ_MASK_PCI_PERR
110 movne \irqnr, #IRQ_PCI_PERR
1111001:
112 .endm
113
diff --git a/include/asm-arm/arch-ebsa285/hardware.h b/include/asm-arm/arch-ebsa285/hardware.h
deleted file mode 100644
index 74610c2c63d4..000000000000
--- a/include/asm-arm/arch-ebsa285/hardware.h
+++ /dev/null
@@ -1,105 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-ebsa285/hardware.h
3 *
4 * Copyright (C) 1998-1999 Russell King.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * This file contains the hardware definitions of the EBSA-285.
11 */
12#ifndef __ASM_ARCH_HARDWARE_H
13#define __ASM_ARCH_HARDWARE_H
14
15#include <asm/arch/memory.h>
16
17/* Virtual Physical Size
18 * 0xff800000 0x40000000 1MB X-Bus
19 * 0xff000000 0x7c000000 1MB PCI I/O space
20 * 0xfe000000 0x42000000 1MB CSR
21 * 0xfd000000 0x78000000 1MB Outbound write flush (not supported)
22 * 0xfc000000 0x79000000 1MB PCI IACK/special space
23 * 0xfb000000 0x7a000000 16MB PCI Config type 1
24 * 0xfa000000 0x7b000000 16MB PCI Config type 0
25 * 0xf9000000 0x50000000 1MB Cache flush
26 * 0xf0000000 0x80000000 16MB ISA memory
27 */
28#define XBUS_SIZE 0x00100000
29#define XBUS_BASE 0xff800000
30
31#define PCIO_SIZE 0x00100000
32#define PCIO_BASE 0xff000000
33
34#define ARMCSR_SIZE 0x00100000
35#define ARMCSR_BASE 0xfe000000
36
37#define WFLUSH_SIZE 0x00100000
38#define WFLUSH_BASE 0xfd000000
39
40#define PCIIACK_SIZE 0x00100000
41#define PCIIACK_BASE 0xfc000000
42
43#define PCICFG1_SIZE 0x01000000
44#define PCICFG1_BASE 0xfb000000
45
46#define PCICFG0_SIZE 0x01000000
47#define PCICFG0_BASE 0xfa000000
48
49#define PCIMEM_SIZE 0x01000000
50#define PCIMEM_BASE 0xf0000000
51
52#define XBUS_LEDS ((volatile unsigned char *)(XBUS_BASE + 0x12000))
53#define XBUS_LED_AMBER (1 << 0)
54#define XBUS_LED_GREEN (1 << 1)
55#define XBUS_LED_RED (1 << 2)
56#define XBUS_LED_TOGGLE (1 << 8)
57
58#define XBUS_SWITCH ((volatile unsigned char *)(XBUS_BASE + 0x12000))
59#define XBUS_SWITCH_SWITCH ((*XBUS_SWITCH) & 15)
60#define XBUS_SWITCH_J17_13 ((*XBUS_SWITCH) & (1 << 4))
61#define XBUS_SWITCH_J17_11 ((*XBUS_SWITCH) & (1 << 5))
62#define XBUS_SWITCH_J17_9 ((*XBUS_SWITCH) & (1 << 6))
63
64#define UNCACHEABLE_ADDR (ARMCSR_BASE + 0x108)
65
66
67/* PIC irq control */
68#define PIC_LO 0x20
69#define PIC_MASK_LO 0x21
70#define PIC_HI 0xA0
71#define PIC_MASK_HI 0xA1
72
73/* GPIO pins */
74#define GPIO_CCLK 0x800
75#define GPIO_DSCLK 0x400
76#define GPIO_E2CLK 0x200
77#define GPIO_IOLOAD 0x100
78#define GPIO_RED_LED 0x080
79#define GPIO_WDTIMER 0x040
80#define GPIO_DATA 0x020
81#define GPIO_IOCLK 0x010
82#define GPIO_DONE 0x008
83#define GPIO_FAN 0x004
84#define GPIO_GREEN_LED 0x002
85#define GPIO_RESET 0x001
86
87/* CPLD pins */
88#define CPLD_DS_ENABLE 8
89#define CPLD_7111_DISABLE 4
90#define CPLD_UNMUTE 2
91#define CPLD_FLASH_WR_ENABLE 1
92
93#ifndef __ASSEMBLY__
94extern void gpio_modify_op(int mask, int set);
95extern void gpio_modify_io(int mask, int in);
96extern int gpio_read(void);
97extern void cpld_modify(int mask, int set);
98#endif
99
100#define pcibios_assign_all_busses() 1
101
102#define PCIBIOS_MIN_IO 0x1000
103#define PCIBIOS_MIN_MEM 0x81000000
104
105#endif
diff --git a/include/asm-arm/arch-ebsa285/io.h b/include/asm-arm/arch-ebsa285/io.h
deleted file mode 100644
index f9c729141860..000000000000
--- a/include/asm-arm/arch-ebsa285/io.h
+++ /dev/null
@@ -1,39 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-ebsa285/io.h
3 *
4 * Copyright (C) 1997-1999 Russell King
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * Modifications:
11 * 06-12-1997 RMK Created.
12 * 07-04-1999 RMK Major cleanup
13 */
14#ifndef __ASM_ARM_ARCH_IO_H
15#define __ASM_ARM_ARCH_IO_H
16
17#include <asm/hardware.h>
18
19#define IO_SPACE_LIMIT 0xffff
20
21/*
22 * Translation of various region addresses to virtual addresses
23 */
24#define __io(a) ((void __iomem *)(PCIO_BASE + (a)))
25#if 1
26#define __mem_pci(a) (a)
27#else
28
29static inline void __iomem *___mem_pci(void __iomem *p)
30{
31 unsigned long a = (unsigned long)p;
32 BUG_ON(a <= 0xc0000000 || a >= 0xe0000000);
33 return p;
34}
35
36#define __mem_pci(a) ___mem_pci(a)
37#endif
38
39#endif
diff --git a/include/asm-arm/arch-ebsa285/irqs.h b/include/asm-arm/arch-ebsa285/irqs.h
deleted file mode 100644
index 3e766f1cecf1..000000000000
--- a/include/asm-arm/arch-ebsa285/irqs.h
+++ /dev/null
@@ -1,98 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-ebsa285/irqs.h
3 *
4 * Copyright (C) 1998 Russell King
5 * Copyright (C) 1998 Phil Blundell
6 *
7 * Changelog:
8 * 20-Jan-1998 RMK Started merge of EBSA286, CATS and NetWinder
9 * 01-Feb-1999 PJB ISA IRQs start at 0 not 16
10 */
11#include <asm/mach-types.h>
12
13#define NR_IRQS 36
14#define NR_DC21285_IRQS 16
15
16#define _ISA_IRQ(x) (0 + (x))
17#define _ISA_INR(x) ((x) - 0)
18#define _DC21285_IRQ(x) (16 + (x))
19#define _DC21285_INR(x) ((x) - 16)
20
21/*
22 * This is a list of all interrupts that the 21285
23 * can generate and we handle.
24 */
25#define IRQ_CONRX _DC21285_IRQ(0)
26#define IRQ_CONTX _DC21285_IRQ(1)
27#define IRQ_TIMER1 _DC21285_IRQ(2)
28#define IRQ_TIMER2 _DC21285_IRQ(3)
29#define IRQ_TIMER3 _DC21285_IRQ(4)
30#define IRQ_IN0 _DC21285_IRQ(5)
31#define IRQ_IN1 _DC21285_IRQ(6)
32#define IRQ_IN2 _DC21285_IRQ(7)
33#define IRQ_IN3 _DC21285_IRQ(8)
34#define IRQ_DOORBELLHOST _DC21285_IRQ(9)
35#define IRQ_DMA1 _DC21285_IRQ(10)
36#define IRQ_DMA2 _DC21285_IRQ(11)
37#define IRQ_PCI _DC21285_IRQ(12)
38#define IRQ_SDRAMPARITY _DC21285_IRQ(13)
39#define IRQ_I2OINPOST _DC21285_IRQ(14)
40#define IRQ_PCI_ABORT _DC21285_IRQ(15)
41#define IRQ_PCI_SERR _DC21285_IRQ(16)
42#define IRQ_DISCARD_TIMER _DC21285_IRQ(17)
43#define IRQ_PCI_DPERR _DC21285_IRQ(18)
44#define IRQ_PCI_PERR _DC21285_IRQ(19)
45
46#define IRQ_ISA_TIMER _ISA_IRQ(0)
47#define IRQ_ISA_KEYBOARD _ISA_IRQ(1)
48#define IRQ_ISA_CASCADE _ISA_IRQ(2)
49#define IRQ_ISA_UART2 _ISA_IRQ(3)
50#define IRQ_ISA_UART _ISA_IRQ(4)
51#define IRQ_ISA_FLOPPY _ISA_IRQ(6)
52#define IRQ_ISA_PRINTER _ISA_IRQ(7)
53#define IRQ_ISA_RTC_ALARM _ISA_IRQ(8)
54#define IRQ_ISA_2 _ISA_IRQ(9)
55#define IRQ_ISA_PS2MOUSE _ISA_IRQ(12)
56#define IRQ_ISA_HARDDISK1 _ISA_IRQ(14)
57#define IRQ_ISA_HARDDISK2 _ISA_IRQ(15)
58
59#define IRQ_MASK_UART_RX (1 << 2)
60#define IRQ_MASK_UART_TX (1 << 3)
61#define IRQ_MASK_TIMER1 (1 << 4)
62#define IRQ_MASK_TIMER2 (1 << 5)
63#define IRQ_MASK_TIMER3 (1 << 6)
64#define IRQ_MASK_IN0 (1 << 8)
65#define IRQ_MASK_IN1 (1 << 9)
66#define IRQ_MASK_IN2 (1 << 10)
67#define IRQ_MASK_IN3 (1 << 11)
68#define IRQ_MASK_DOORBELLHOST (1 << 15)
69#define IRQ_MASK_DMA1 (1 << 16)
70#define IRQ_MASK_DMA2 (1 << 17)
71#define IRQ_MASK_PCI (1 << 18)
72#define IRQ_MASK_SDRAMPARITY (1 << 24)
73#define IRQ_MASK_I2OINPOST (1 << 25)
74#define IRQ_MASK_PCI_ABORT ((1 << 29) | (1 << 30))
75#define IRQ_MASK_PCI_SERR (1 << 23)
76#define IRQ_MASK_DISCARD_TIMER (1 << 27)
77#define IRQ_MASK_PCI_DPERR (1 << 28)
78#define IRQ_MASK_PCI_PERR (1 << 31)
79
80/*
81 * Netwinder interrupt allocations
82 */
83#define IRQ_NETWINDER_ETHER10 IRQ_IN0
84#define IRQ_NETWINDER_ETHER100 IRQ_IN1
85#define IRQ_NETWINDER_VIDCOMP IRQ_IN2
86#define IRQ_NETWINDER_PS2MOUSE _ISA_IRQ(5)
87#define IRQ_NETWINDER_IR _ISA_IRQ(6)
88#define IRQ_NETWINDER_BUTTON _ISA_IRQ(10)
89#define IRQ_NETWINDER_VGA _ISA_IRQ(11)
90#define IRQ_NETWINDER_SOUND _ISA_IRQ(12)
91
92#undef RTC_IRQ
93#define RTC_IRQ IRQ_ISA_RTC_ALARM
94#define I8042_KBD_IRQ IRQ_ISA_KEYBOARD
95#define I8042_AUX_IRQ (machine_is_netwinder() ? IRQ_NETWINDER_PS2MOUSE : IRQ_ISA_PS2MOUSE)
96#define IRQ_FLOPPYDISK IRQ_ISA_FLOPPY
97
98#define irq_canonicalize(_i) (((_i) == IRQ_ISA_CASCADE) ? IRQ_ISA_2 : _i)
diff --git a/include/asm-arm/arch-ebsa285/memory.h b/include/asm-arm/arch-ebsa285/memory.h
deleted file mode 100644
index 9019a3bf5ab9..000000000000
--- a/include/asm-arm/arch-ebsa285/memory.h
+++ /dev/null
@@ -1,67 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-ebsa285/memory.h
3 *
4 * Copyright (C) 1996-1999 Russell King.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * Changelog:
11 * 20-Oct-1996 RMK Created
12 * 31-Dec-1997 RMK Fixed definitions to reduce warnings.
13 * 17-May-1998 DAG Added __virt_to_bus and __bus_to_virt functions.
14 * 21-Nov-1998 RMK Changed __virt_to_bus and __bus_to_virt to macros.
15 * 21-Mar-1999 RMK Added PAGE_OFFSET for co285 architecture.
16 * Renamed to memory.h
17 * Moved PAGE_OFFSET and TASK_SIZE here
18 */
19#ifndef __ASM_ARCH_MEMORY_H
20#define __ASM_ARCH_MEMORY_H
21
22
23#if defined(CONFIG_FOOTBRIDGE_ADDIN)
24/*
25 * If we may be using add-in footbridge mode, then we must
26 * use the out-of-line translation that makes use of the
27 * PCI BAR
28 */
29#ifndef __ASSEMBLY__
30extern unsigned long __virt_to_bus(unsigned long);
31extern unsigned long __bus_to_virt(unsigned long);
32#endif
33
34#elif defined(CONFIG_FOOTBRIDGE_HOST)
35
36#define __virt_to_bus(x) ((x) - 0xe0000000)
37#define __bus_to_virt(x) ((x) + 0xe0000000)
38
39#else
40
41#error "Undefined footbridge mode"
42
43#endif
44
45/* Task size and page offset at 3GB */
46#define TASK_SIZE UL(0xbf000000)
47#define PAGE_OFFSET UL(0xc0000000)
48
49/*
50 * Cache flushing area.
51 */
52#define FLUSH_BASE 0xf9000000
53
54/*
55 * Physical DRAM offset.
56 */
57#define PHYS_OFFSET UL(0x00000000)
58
59/*
60 * This decides where the kernel will search for a free chunk of vm
61 * space during mmap's.
62 */
63#define TASK_UNMAPPED_BASE ((TASK_SIZE + 0x01000000) / 3)
64
65#define FLUSH_BASE_PHYS 0x50000000
66
67#endif
diff --git a/include/asm-arm/arch-ebsa285/system.h b/include/asm-arm/arch-ebsa285/system.h
deleted file mode 100644
index bf91c695c4b5..000000000000
--- a/include/asm-arm/arch-ebsa285/system.h
+++ /dev/null
@@ -1,69 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-ebsa285/system.h
3 *
4 * Copyright (C) 1996-1999 Russell King.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10#include <asm/hardware/dec21285.h>
11#include <asm/io.h>
12#include <asm/hardware.h>
13#include <asm/leds.h>
14#include <asm/mach-types.h>
15
16static inline void arch_idle(void)
17{
18 cpu_do_idle();
19}
20
21static inline void arch_reset(char mode)
22{
23 if (mode == 's') {
24 /*
25 * Jump into the ROM
26 */
27 cpu_reset(0x41000000);
28 } else {
29 if (machine_is_netwinder()) {
30 /* open up the SuperIO chip
31 */
32 outb(0x87, 0x370);
33 outb(0x87, 0x370);
34
35 /* aux function group 1 (logical device 7)
36 */
37 outb(0x07, 0x370);
38 outb(0x07, 0x371);
39
40 /* set GP16 for WD-TIMER output
41 */
42 outb(0xe6, 0x370);
43 outb(0x00, 0x371);
44
45 /* set a RED LED and toggle WD_TIMER for rebooting
46 */
47 outb(0xc4, 0x338);
48 } else {
49 /*
50 * Force the watchdog to do a CPU reset.
51 *
52 * After making sure that the watchdog is disabled
53 * (so we can change the timer registers) we first
54 * enable the timer to autoreload itself. Next, the
55 * timer interval is set really short and any
56 * current interrupt request is cleared (so we can
57 * see an edge transition). Finally, TIMER4 is
58 * enabled as the watchdog.
59 */
60 *CSR_SA110_CNTL &= ~(1 << 13);
61 *CSR_TIMER4_CNTL = TIMER_CNTL_ENABLE |
62 TIMER_CNTL_AUTORELOAD |
63 TIMER_CNTL_DIV16;
64 *CSR_TIMER4_LOAD = 0x2;
65 *CSR_TIMER4_CLR = 0;
66 *CSR_SA110_CNTL |= (1 << 13);
67 }
68 }
69}
diff --git a/include/asm-arm/arch-ebsa285/timex.h b/include/asm-arm/arch-ebsa285/timex.h
deleted file mode 100644
index df60b3812d96..000000000000
--- a/include/asm-arm/arch-ebsa285/timex.h
+++ /dev/null
@@ -1,18 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-ebsa285/timex.h
3 *
4 * Copyright (C) 1998 Russell King
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * EBSA285 architecture timex specifications
11 */
12
13/*
14 * We assume a constant here; this satisfies the maths in linux/timex.h
15 * and linux/time.h. CLOCK_TICK_RATE is actually system dependent, but
16 * this must be a constant.
17 */
18#define CLOCK_TICK_RATE (50000000/16)
diff --git a/include/asm-arm/arch-ebsa285/uncompress.h b/include/asm-arm/arch-ebsa285/uncompress.h
deleted file mode 100644
index 86142c882b3a..000000000000
--- a/include/asm-arm/arch-ebsa285/uncompress.h
+++ /dev/null
@@ -1,38 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-ebsa285/uncompress.h
3 *
4 * Copyright (C) 1996-1999 Russell King
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10#include <asm/mach-types.h>
11
12/*
13 * Note! This could cause problems on the NetWinder
14 */
15#define DC21285_BASE ((volatile unsigned int *)0x42000160)
16#define SER0_BASE ((volatile unsigned char *)0x7c0003f8)
17
18static inline void putc(char c)
19{
20 if (machine_is_netwinder()) {
21 while ((SER0_BASE[5] & 0x60) != 0x60)
22 barrier();
23 SER0_BASE[0] = c;
24 } else {
25 while (DC21285_BASE[6] & 8);
26 DC21285_BASE[0] = c;
27 }
28}
29
30static inline void flush(void)
31{
32}
33
34/*
35 * nothing to do
36 */
37#define arch_decomp_setup()
38#define arch_decomp_wdog()
diff --git a/include/asm-arm/arch-ebsa285/vmalloc.h b/include/asm-arm/arch-ebsa285/vmalloc.h
deleted file mode 100644
index e487d7e8c8a6..000000000000
--- a/include/asm-arm/arch-ebsa285/vmalloc.h
+++ /dev/null
@@ -1,10 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-ebsa285/vmalloc.h
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 */
8
9
10#define VMALLOC_END (PAGE_OFFSET + 0x30000000)
diff --git a/include/asm-arm/arch-ep93xx/debug-macro.S b/include/asm-arm/arch-ep93xx/debug-macro.S
deleted file mode 100644
index 397565a0c671..000000000000
--- a/include/asm-arm/arch-ep93xx/debug-macro.S
+++ /dev/null
@@ -1,22 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-ep93xx/debug-macro.S
3 * Debugging macro include header
4 *
5 * Copyright (C) 2006 Lennert Buytenhek <buytenh@wantstofly.org>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or (at
10 * your option) any later version.
11 */
12#include <asm/arch/ep93xx-regs.h>
13
14 .macro addruart,rx
15 mrc p15, 0, \rx, c1, c0
16 tst \rx, #1 @ MMU enabled?
17 ldreq \rx, =EP93XX_APB_PHYS_BASE @ Physical base
18 ldrne \rx, =EP93XX_APB_VIRT_BASE @ virtual base
19 orr \rx, \rx, #0x000c0000
20 .endm
21
22#include <asm/hardware/debug-pl01x.S>
diff --git a/include/asm-arm/arch-ep93xx/dma.h b/include/asm-arm/arch-ep93xx/dma.h
deleted file mode 100644
index 898b3ab7fd46..000000000000
--- a/include/asm-arm/arch-ep93xx/dma.h
+++ /dev/null
@@ -1,3 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-ep93xx/dma.h
3 */
diff --git a/include/asm-arm/arch-ep93xx/entry-macro.S b/include/asm-arm/arch-ep93xx/entry-macro.S
deleted file mode 100644
index 241ec221a047..000000000000
--- a/include/asm-arm/arch-ep93xx/entry-macro.S
+++ /dev/null
@@ -1,59 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-ep93xx/entry-macro.S
3 * IRQ demultiplexing for EP93xx
4 *
5 * Copyright (C) 2006 Lennert Buytenhek <buytenh@wantstofly.org>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or (at
10 * your option) any later version.
11 */
12#include <asm/arch/ep93xx-regs.h>
13
14 .macro disable_fiq
15 .endm
16
17 .macro get_irqnr_preamble, base, tmp
18 .endm
19
20 .macro arch_ret_to_user, tmp1, tmp2
21 .endm
22
23 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
24 ldr \base, =(EP93XX_AHB_VIRT_BASE)
25 orr \base, \base, #0x000b0000
26 mov \irqnr, #0
27 ldr \irqstat, [\base] @ lower 32 interrupts
28 cmp \irqstat, #0
29 bne 1001f
30
31 eor \base, \base, #0x00070000
32 ldr \irqstat, [\base] @ upper 32 interrupts
33 cmp \irqstat, #0
34 beq 1002f
35 mov \irqnr, #0x20
36
371001:
38 movs \tmp, \irqstat, lsl #16
39 movne \irqstat, \tmp
40 addeq \irqnr, \irqnr, #16
41
42 movs \tmp, \irqstat, lsl #8
43 movne \irqstat, \tmp
44 addeq \irqnr, \irqnr, #8
45
46 movs \tmp, \irqstat, lsl #4
47 movne \irqstat, \tmp
48 addeq \irqnr, \irqnr, #4
49
50 movs \tmp, \irqstat, lsl #2
51 movne \irqstat, \tmp
52 addeq \irqnr, \irqnr, #2
53
54 movs \tmp, \irqstat, lsl #1
55 addeq \irqnr, \irqnr, #1
56 orrs \base, \base, #1
57
581002:
59 .endm
diff --git a/include/asm-arm/arch-ep93xx/ep93xx-regs.h b/include/asm-arm/arch-ep93xx/ep93xx-regs.h
deleted file mode 100644
index 625c6f0abc03..000000000000
--- a/include/asm-arm/arch-ep93xx/ep93xx-regs.h
+++ /dev/null
@@ -1,133 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-ep93xx/ep93xx-regs.h
3 */
4
5#ifndef __ASM_ARCH_EP93XX_REGS_H
6#define __ASM_ARCH_EP93XX_REGS_H
7
8/*
9 * EP93xx linux memory map:
10 *
11 * virt phys size
12 * fe800000 5M per-platform mappings
13 * fed00000 80800000 2M APB
14 * fef00000 80000000 1M AHB
15 */
16
17#define EP93XX_AHB_PHYS_BASE 0x80000000
18#define EP93XX_AHB_VIRT_BASE 0xfef00000
19#define EP93XX_AHB_SIZE 0x00100000
20
21#define EP93XX_APB_PHYS_BASE 0x80800000
22#define EP93XX_APB_VIRT_BASE 0xfed00000
23#define EP93XX_APB_SIZE 0x00200000
24
25
26/* AHB peripherals */
27#define EP93XX_DMA_BASE (EP93XX_AHB_VIRT_BASE + 0x00000000)
28
29#define EP93XX_ETHERNET_BASE (EP93XX_AHB_VIRT_BASE + 0x00010000)
30#define EP93XX_ETHERNET_PHYS_BASE (EP93XX_AHB_PHYS_BASE + 0x00010000)
31
32#define EP93XX_USB_BASE (EP93XX_AHB_VIRT_BASE + 0x00020000)
33#define EP93XX_USB_PHYS_BASE (EP93XX_AHB_PHYS_BASE + 0x00020000)
34
35#define EP93XX_RASTER_BASE (EP93XX_AHB_VIRT_BASE + 0x00030000)
36
37#define EP93XX_GRAPHICS_ACCEL_BASE (EP93XX_AHB_VIRT_BASE + 0x00040000)
38
39#define EP93XX_SDRAM_CONTROLLER_BASE (EP93XX_AHB_VIRT_BASE + 0x00060000)
40
41#define EP93XX_PCMCIA_CONTROLLER_BASE (EP93XX_AHB_VIRT_BASE + 0x00080000)
42
43#define EP93XX_BOOT_ROM_BASE (EP93XX_AHB_VIRT_BASE + 0x00090000)
44
45#define EP93XX_IDE_BASE (EP93XX_AHB_VIRT_BASE + 0x000a0000)
46
47#define EP93XX_VIC1_BASE (EP93XX_AHB_VIRT_BASE + 0x000b0000)
48
49#define EP93XX_VIC2_BASE (EP93XX_AHB_VIRT_BASE + 0x000c0000)
50
51
52/* APB peripherals */
53#define EP93XX_TIMER_BASE (EP93XX_APB_VIRT_BASE + 0x00010000)
54#define EP93XX_TIMER_REG(x) (EP93XX_TIMER_BASE + (x))
55#define EP93XX_TIMER1_LOAD EP93XX_TIMER_REG(0x00)
56#define EP93XX_TIMER1_VALUE EP93XX_TIMER_REG(0x04)
57#define EP93XX_TIMER1_CONTROL EP93XX_TIMER_REG(0x08)
58#define EP93XX_TIMER1_CLEAR EP93XX_TIMER_REG(0x0c)
59#define EP93XX_TIMER2_LOAD EP93XX_TIMER_REG(0x20)
60#define EP93XX_TIMER2_VALUE EP93XX_TIMER_REG(0x24)
61#define EP93XX_TIMER2_CONTROL EP93XX_TIMER_REG(0x28)
62#define EP93XX_TIMER2_CLEAR EP93XX_TIMER_REG(0x2c)
63#define EP93XX_TIMER4_VALUE_LOW EP93XX_TIMER_REG(0x60)
64#define EP93XX_TIMER4_VALUE_HIGH EP93XX_TIMER_REG(0x64)
65#define EP93XX_TIMER3_LOAD EP93XX_TIMER_REG(0x80)
66#define EP93XX_TIMER3_VALUE EP93XX_TIMER_REG(0x84)
67#define EP93XX_TIMER3_CONTROL EP93XX_TIMER_REG(0x88)
68#define EP93XX_TIMER3_CLEAR EP93XX_TIMER_REG(0x8c)
69
70#define EP93XX_I2S_BASE (EP93XX_APB_VIRT_BASE + 0x00020000)
71
72#define EP93XX_SECURITY_BASE (EP93XX_APB_VIRT_BASE + 0x00030000)
73
74#define EP93XX_GPIO_BASE (EP93XX_APB_VIRT_BASE + 0x00040000)
75#define EP93XX_GPIO_REG(x) (EP93XX_GPIO_BASE + (x))
76#define EP93XX_GPIO_F_INT_TYPE1 EP93XX_GPIO_REG(0x4c)
77#define EP93XX_GPIO_F_INT_TYPE2 EP93XX_GPIO_REG(0x50)
78#define EP93XX_GPIO_F_INT_ACK EP93XX_GPIO_REG(0x54)
79#define EP93XX_GPIO_F_INT_ENABLE EP93XX_GPIO_REG(0x58)
80#define EP93XX_GPIO_F_INT_STATUS EP93XX_GPIO_REG(0x5c)
81#define EP93XX_GPIO_A_INT_TYPE1 EP93XX_GPIO_REG(0x90)
82#define EP93XX_GPIO_A_INT_TYPE2 EP93XX_GPIO_REG(0x94)
83#define EP93XX_GPIO_A_INT_ACK EP93XX_GPIO_REG(0x98)
84#define EP93XX_GPIO_A_INT_ENABLE EP93XX_GPIO_REG(0x9c)
85#define EP93XX_GPIO_A_INT_STATUS EP93XX_GPIO_REG(0xa0)
86#define EP93XX_GPIO_B_INT_TYPE1 EP93XX_GPIO_REG(0xac)
87#define EP93XX_GPIO_B_INT_TYPE2 EP93XX_GPIO_REG(0xb0)
88#define EP93XX_GPIO_B_INT_ACK EP93XX_GPIO_REG(0xb4)
89#define EP93XX_GPIO_B_INT_ENABLE EP93XX_GPIO_REG(0xb8)
90#define EP93XX_GPIO_B_INT_STATUS EP93XX_GPIO_REG(0xbc)
91
92#define EP93XX_AAC_BASE (EP93XX_APB_VIRT_BASE + 0x00080000)
93
94#define EP93XX_SPI_BASE (EP93XX_APB_VIRT_BASE + 0x000a0000)
95
96#define EP93XX_IRDA_BASE (EP93XX_APB_VIRT_BASE + 0x000b0000)
97
98#define EP93XX_UART1_BASE (EP93XX_APB_VIRT_BASE + 0x000c0000)
99#define EP93XX_UART1_PHYS_BASE (EP93XX_APB_PHYS_BASE + 0x000c0000)
100
101#define EP93XX_UART2_BASE (EP93XX_APB_VIRT_BASE + 0x000d0000)
102#define EP93XX_UART2_PHYS_BASE (EP93XX_APB_PHYS_BASE + 0x000d0000)
103
104#define EP93XX_UART3_BASE (EP93XX_APB_VIRT_BASE + 0x000e0000)
105#define EP93XX_UART3_PHYS_BASE (EP93XX_APB_PHYS_BASE + 0x000e0000)
106
107#define EP93XX_KEY_MATRIX_BASE (EP93XX_APB_VIRT_BASE + 0x000f0000)
108
109#define EP93XX_ADC_BASE (EP93XX_APB_VIRT_BASE + 0x00100000)
110#define EP93XX_TOUCHSCREEN_BASE (EP93XX_APB_VIRT_BASE + 0x00100000)
111
112#define EP93XX_PWM_BASE (EP93XX_APB_VIRT_BASE + 0x00110000)
113
114#define EP93XX_RTC_BASE (EP93XX_APB_VIRT_BASE + 0x00120000)
115
116#define EP93XX_SYSCON_BASE (EP93XX_APB_VIRT_BASE + 0x00130000)
117#define EP93XX_SYSCON_REG(x) (EP93XX_SYSCON_BASE + (x))
118#define EP93XX_SYSCON_POWER_STATE EP93XX_SYSCON_REG(0x00)
119#define EP93XX_SYSCON_CLOCK_CONTROL EP93XX_SYSCON_REG(0x04)
120#define EP93XX_SYSCON_CLOCK_UARTBAUD 0x20000000
121#define EP93XX_SYSCON_CLOCK_USH_EN 0x10000000
122#define EP93XX_SYSCON_HALT EP93XX_SYSCON_REG(0x08)
123#define EP93XX_SYSCON_STANDBY EP93XX_SYSCON_REG(0x0c)
124#define EP93XX_SYSCON_CLOCK_SET1 EP93XX_SYSCON_REG(0x20)
125#define EP93XX_SYSCON_CLOCK_SET2 EP93XX_SYSCON_REG(0x24)
126#define EP93XX_SYSCON_DEVICE_CONFIG EP93XX_SYSCON_REG(0x80)
127#define EP93XX_SYSCON_DEVICE_CONFIG_CRUNCH_ENABLE 0x00800000
128#define EP93XX_SYSCON_SWLOCK EP93XX_SYSCON_REG(0xc0)
129
130#define EP93XX_WATCHDOG_BASE (EP93XX_APB_VIRT_BASE + 0x00140000)
131
132
133#endif
diff --git a/include/asm-arm/arch-ep93xx/gesbc9312.h b/include/asm-arm/arch-ep93xx/gesbc9312.h
deleted file mode 100644
index 4d0b3023bff7..000000000000
--- a/include/asm-arm/arch-ep93xx/gesbc9312.h
+++ /dev/null
@@ -1,3 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-ep93xx/gesbc9312.h
3 */
diff --git a/include/asm-arm/arch-ep93xx/gpio.h b/include/asm-arm/arch-ep93xx/gpio.h
deleted file mode 100644
index 186e7c715f8a..000000000000
--- a/include/asm-arm/arch-ep93xx/gpio.h
+++ /dev/null
@@ -1,128 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-ep93xx/gpio.h
3 */
4
5#ifndef __ASM_ARCH_GPIO_H
6#define __ASM_ARCH_GPIO_H
7
8/* GPIO port A. */
9#define EP93XX_GPIO_LINE_A(x) ((x) + 0)
10#define EP93XX_GPIO_LINE_EGPIO0 EP93XX_GPIO_LINE_A(0)
11#define EP93XX_GPIO_LINE_EGPIO1 EP93XX_GPIO_LINE_A(1)
12#define EP93XX_GPIO_LINE_EGPIO2 EP93XX_GPIO_LINE_A(2)
13#define EP93XX_GPIO_LINE_EGPIO3 EP93XX_GPIO_LINE_A(3)
14#define EP93XX_GPIO_LINE_EGPIO4 EP93XX_GPIO_LINE_A(4)
15#define EP93XX_GPIO_LINE_EGPIO5 EP93XX_GPIO_LINE_A(5)
16#define EP93XX_GPIO_LINE_EGPIO6 EP93XX_GPIO_LINE_A(6)
17#define EP93XX_GPIO_LINE_EGPIO7 EP93XX_GPIO_LINE_A(7)
18
19/* GPIO port B. */
20#define EP93XX_GPIO_LINE_B(x) ((x) + 8)
21#define EP93XX_GPIO_LINE_EGPIO8 EP93XX_GPIO_LINE_B(0)
22#define EP93XX_GPIO_LINE_EGPIO9 EP93XX_GPIO_LINE_B(1)
23#define EP93XX_GPIO_LINE_EGPIO10 EP93XX_GPIO_LINE_B(2)
24#define EP93XX_GPIO_LINE_EGPIO11 EP93XX_GPIO_LINE_B(3)
25#define EP93XX_GPIO_LINE_EGPIO12 EP93XX_GPIO_LINE_B(4)
26#define EP93XX_GPIO_LINE_EGPIO13 EP93XX_GPIO_LINE_B(5)
27#define EP93XX_GPIO_LINE_EGPIO14 EP93XX_GPIO_LINE_B(6)
28#define EP93XX_GPIO_LINE_EGPIO15 EP93XX_GPIO_LINE_B(7)
29
30/* GPIO port C. */
31#define EP93XX_GPIO_LINE_C(x) ((x) + 40)
32#define EP93XX_GPIO_LINE_ROW0 EP93XX_GPIO_LINE_C(0)
33#define EP93XX_GPIO_LINE_ROW1 EP93XX_GPIO_LINE_C(1)
34#define EP93XX_GPIO_LINE_ROW2 EP93XX_GPIO_LINE_C(2)
35#define EP93XX_GPIO_LINE_ROW3 EP93XX_GPIO_LINE_C(3)
36#define EP93XX_GPIO_LINE_ROW4 EP93XX_GPIO_LINE_C(4)
37#define EP93XX_GPIO_LINE_ROW5 EP93XX_GPIO_LINE_C(5)
38#define EP93XX_GPIO_LINE_ROW6 EP93XX_GPIO_LINE_C(6)
39#define EP93XX_GPIO_LINE_ROW7 EP93XX_GPIO_LINE_C(7)
40
41/* GPIO port D. */
42#define EP93XX_GPIO_LINE_D(x) ((x) + 24)
43#define EP93XX_GPIO_LINE_COL0 EP93XX_GPIO_LINE_D(0)
44#define EP93XX_GPIO_LINE_COL1 EP93XX_GPIO_LINE_D(1)
45#define EP93XX_GPIO_LINE_COL2 EP93XX_GPIO_LINE_D(2)
46#define EP93XX_GPIO_LINE_COL3 EP93XX_GPIO_LINE_D(3)
47#define EP93XX_GPIO_LINE_COL4 EP93XX_GPIO_LINE_D(4)
48#define EP93XX_GPIO_LINE_COL5 EP93XX_GPIO_LINE_D(5)
49#define EP93XX_GPIO_LINE_COL6 EP93XX_GPIO_LINE_D(6)
50#define EP93XX_GPIO_LINE_COL7 EP93XX_GPIO_LINE_D(7)
51
52/* GPIO port E. */
53#define EP93XX_GPIO_LINE_E(x) ((x) + 32)
54#define EP93XX_GPIO_LINE_GRLED EP93XX_GPIO_LINE_E(0)
55#define EP93XX_GPIO_LINE_RDLED EP93XX_GPIO_LINE_E(1)
56#define EP93XX_GPIO_LINE_DIORn EP93XX_GPIO_LINE_E(2)
57#define EP93XX_GPIO_LINE_IDECS1n EP93XX_GPIO_LINE_E(3)
58#define EP93XX_GPIO_LINE_IDECS2n EP93XX_GPIO_LINE_E(4)
59#define EP93XX_GPIO_LINE_IDEDA0 EP93XX_GPIO_LINE_E(5)
60#define EP93XX_GPIO_LINE_IDEDA1 EP93XX_GPIO_LINE_E(6)
61#define EP93XX_GPIO_LINE_IDEDA2 EP93XX_GPIO_LINE_E(7)
62
63/* GPIO port F. */
64#define EP93XX_GPIO_LINE_F(x) ((x) + 16)
65#define EP93XX_GPIO_LINE_WP EP93XX_GPIO_LINE_F(0)
66#define EP93XX_GPIO_LINE_MCCD1 EP93XX_GPIO_LINE_F(1)
67#define EP93XX_GPIO_LINE_MCCD2 EP93XX_GPIO_LINE_F(2)
68#define EP93XX_GPIO_LINE_MCBVD1 EP93XX_GPIO_LINE_F(3)
69#define EP93XX_GPIO_LINE_MCBVD2 EP93XX_GPIO_LINE_F(4)
70#define EP93XX_GPIO_LINE_VS1 EP93XX_GPIO_LINE_F(5)
71#define EP93XX_GPIO_LINE_READY EP93XX_GPIO_LINE_F(6)
72#define EP93XX_GPIO_LINE_VS2 EP93XX_GPIO_LINE_F(7)
73
74/* GPIO port G. */
75#define EP93XX_GPIO_LINE_G(x) ((x) + 48)
76#define EP93XX_GPIO_LINE_EECLK EP93XX_GPIO_LINE_G(0)
77#define EP93XX_GPIO_LINE_EEDAT EP93XX_GPIO_LINE_G(1)
78#define EP93XX_GPIO_LINE_SLA0 EP93XX_GPIO_LINE_G(2)
79#define EP93XX_GPIO_LINE_SLA1 EP93XX_GPIO_LINE_G(3)
80#define EP93XX_GPIO_LINE_DD12 EP93XX_GPIO_LINE_G(4)
81#define EP93XX_GPIO_LINE_DD13 EP93XX_GPIO_LINE_G(5)
82#define EP93XX_GPIO_LINE_DD14 EP93XX_GPIO_LINE_G(6)
83#define EP93XX_GPIO_LINE_DD15 EP93XX_GPIO_LINE_G(7)
84
85/* GPIO port H. */
86#define EP93XX_GPIO_LINE_H(x) ((x) + 56)
87#define EP93XX_GPIO_LINE_DD0 EP93XX_GPIO_LINE_H(0)
88#define EP93XX_GPIO_LINE_DD1 EP93XX_GPIO_LINE_H(1)
89#define EP93XX_GPIO_LINE_DD2 EP93XX_GPIO_LINE_H(2)
90#define EP93XX_GPIO_LINE_DD3 EP93XX_GPIO_LINE_H(3)
91#define EP93XX_GPIO_LINE_DD4 EP93XX_GPIO_LINE_H(4)
92#define EP93XX_GPIO_LINE_DD5 EP93XX_GPIO_LINE_H(5)
93#define EP93XX_GPIO_LINE_DD6 EP93XX_GPIO_LINE_H(6)
94#define EP93XX_GPIO_LINE_DD7 EP93XX_GPIO_LINE_H(7)
95
96/* maximum value for gpio line identifiers */
97#define EP93XX_GPIO_LINE_MAX EP93XX_GPIO_LINE_H(7)
98
99/* maximum value for irq capable line identifiers */
100#define EP93XX_GPIO_LINE_MAX_IRQ EP93XX_GPIO_LINE_F(7)
101
102/* new generic GPIO API - see Documentation/gpio.txt */
103
104#include <asm-generic/gpio.h>
105
106#define gpio_get_value __gpio_get_value
107#define gpio_set_value __gpio_set_value
108#define gpio_cansleep __gpio_cansleep
109
110/*
111 * Map GPIO A0..A7 (0..7) to irq 64..71,
112 * B0..B7 (7..15) to irq 72..79, and
113 * F0..F7 (16..24) to irq 80..87.
114 */
115static inline int gpio_to_irq(unsigned gpio)
116{
117 if (gpio <= EP93XX_GPIO_LINE_MAX_IRQ)
118 return 64 + gpio;
119
120 return -EINVAL;
121}
122
123static inline int irq_to_gpio(unsigned irq)
124{
125 return irq - gpio_to_irq(0);
126}
127
128#endif
diff --git a/include/asm-arm/arch-ep93xx/hardware.h b/include/asm-arm/arch-ep93xx/hardware.h
deleted file mode 100644
index 9b69f454065d..000000000000
--- a/include/asm-arm/arch-ep93xx/hardware.h
+++ /dev/null
@@ -1,12 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-ep93xx/hardware.h
3 */
4
5#include "ep93xx-regs.h"
6
7#define pcibios_assign_all_busses() 0
8
9#include "platform.h"
10
11#include "gesbc9312.h"
12#include "ts72xx.h"
diff --git a/include/asm-arm/arch-ep93xx/io.h b/include/asm-arm/arch-ep93xx/io.h
deleted file mode 100644
index 7b4d25e29060..000000000000
--- a/include/asm-arm/arch-ep93xx/io.h
+++ /dev/null
@@ -1,8 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-ep93xx/io.h
3 */
4
5#define IO_SPACE_LIMIT 0xffffffff
6
7#define __io(p) ((void __iomem *)(p))
8#define __mem_pci(p) (p)
diff --git a/include/asm-arm/arch-ep93xx/irqs.h b/include/asm-arm/arch-ep93xx/irqs.h
deleted file mode 100644
index 53d4a68bfc88..000000000000
--- a/include/asm-arm/arch-ep93xx/irqs.h
+++ /dev/null
@@ -1,78 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-ep93xx/irqs.h
3 */
4
5#ifndef __ASM_ARCH_IRQS_H
6#define __ASM_ARCH_IRQS_H
7
8#define IRQ_EP93XX_COMMRX 2
9#define IRQ_EP93XX_COMMTX 3
10#define IRQ_EP93XX_TIMER1 4
11#define IRQ_EP93XX_TIMER2 5
12#define IRQ_EP93XX_AACINTR 6
13#define IRQ_EP93XX_DMAM2P0 7
14#define IRQ_EP93XX_DMAM2P1 8
15#define IRQ_EP93XX_DMAM2P2 9
16#define IRQ_EP93XX_DMAM2P3 10
17#define IRQ_EP93XX_DMAM2P4 11
18#define IRQ_EP93XX_DMAM2P5 12
19#define IRQ_EP93XX_DMAM2P6 13
20#define IRQ_EP93XX_DMAM2P7 14
21#define IRQ_EP93XX_DMAM2P8 15
22#define IRQ_EP93XX_DMAM2P9 16
23#define IRQ_EP93XX_DMAM2M0 17
24#define IRQ_EP93XX_DMAM2M1 18
25#define IRQ_EP93XX_GPIO0MUX 19
26#define IRQ_EP93XX_GPIO1MUX 20
27#define IRQ_EP93XX_GPIO2MUX 21
28#define IRQ_EP93XX_GPIO3MUX 22
29#define IRQ_EP93XX_UART1RX 23
30#define IRQ_EP93XX_UART1TX 24
31#define IRQ_EP93XX_UART2RX 25
32#define IRQ_EP93XX_UART2TX 26
33#define IRQ_EP93XX_UART3RX 27
34#define IRQ_EP93XX_UART3TX 28
35#define IRQ_EP93XX_KEY 29
36#define IRQ_EP93XX_TOUCH 30
37#define EP93XX_VIC1_VALID_IRQ_MASK 0x7ffffffc
38
39#define IRQ_EP93XX_EXT0 32
40#define IRQ_EP93XX_EXT1 33
41#define IRQ_EP93XX_EXT2 34
42#define IRQ_EP93XX_64HZ 35
43#define IRQ_EP93XX_WATCHDOG 36
44#define IRQ_EP93XX_RTC 37
45#define IRQ_EP93XX_IRDA 38
46#define IRQ_EP93XX_ETHERNET 39
47#define IRQ_EP93XX_EXT3 40
48#define IRQ_EP93XX_PROG 41
49#define IRQ_EP93XX_1HZ 42
50#define IRQ_EP93XX_VSYNC 43
51#define IRQ_EP93XX_VIDEO_FIFO 44
52#define IRQ_EP93XX_SSP1RX 45
53#define IRQ_EP93XX_SSP1TX 46
54#define IRQ_EP93XX_GPIO4MUX 47
55#define IRQ_EP93XX_GPIO5MUX 48
56#define IRQ_EP93XX_GPIO6MUX 49
57#define IRQ_EP93XX_GPIO7MUX 50
58#define IRQ_EP93XX_TIMER3 51
59#define IRQ_EP93XX_UART1 52
60#define IRQ_EP93XX_SSP 53
61#define IRQ_EP93XX_UART2 54
62#define IRQ_EP93XX_UART3 55
63#define IRQ_EP93XX_USB 56
64#define IRQ_EP93XX_ETHERNET_PME 57
65#define IRQ_EP93XX_DSP 58
66#define IRQ_EP93XX_GPIO_AB 59
67#define IRQ_EP93XX_SAI 60
68#define EP93XX_VIC2_VALID_IRQ_MASK 0x1fffffff
69
70#define NR_EP93XX_IRQS (64 + 24)
71
72#define EP93XX_BOARD_IRQ(x) (NR_EP93XX_IRQS + (x))
73#define EP93XX_BOARD_IRQS 32
74
75#define NR_IRQS (NR_EP93XX_IRQS + EP93XX_BOARD_IRQS)
76
77
78#endif
diff --git a/include/asm-arm/arch-ep93xx/memory.h b/include/asm-arm/arch-ep93xx/memory.h
deleted file mode 100644
index 4b1a5c7c8363..000000000000
--- a/include/asm-arm/arch-ep93xx/memory.h
+++ /dev/null
@@ -1,14 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-ep93xx/memory.h
3 */
4
5#ifndef __ASM_ARCH_MEMORY_H
6#define __ASM_ARCH_MEMORY_H
7
8#define PHYS_OFFSET UL(0x00000000)
9
10#define __bus_to_virt(x) __phys_to_virt(x)
11#define __virt_to_bus(x) __virt_to_phys(x)
12
13
14#endif
diff --git a/include/asm-arm/arch-ep93xx/platform.h b/include/asm-arm/arch-ep93xx/platform.h
deleted file mode 100644
index 44eccec2cba4..000000000000
--- a/include/asm-arm/arch-ep93xx/platform.h
+++ /dev/null
@@ -1,20 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-ep93xx/platform.h
3 */
4
5#ifndef __ASSEMBLY__
6
7void ep93xx_map_io(void);
8void ep93xx_init_irq(void);
9void ep93xx_init_time(unsigned long);
10void ep93xx_init_devices(void);
11extern struct sys_timer ep93xx_timer;
12
13struct ep93xx_eth_data
14{
15 unsigned char dev_addr[6];
16 unsigned char phy_id;
17};
18
19
20#endif
diff --git a/include/asm-arm/arch-ep93xx/system.h b/include/asm-arm/arch-ep93xx/system.h
deleted file mode 100644
index 79b718586746..000000000000
--- a/include/asm-arm/arch-ep93xx/system.h
+++ /dev/null
@@ -1,26 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-ep93xx/system.h
3 */
4
5#include <asm/hardware.h>
6
7static inline void arch_idle(void)
8{
9 cpu_do_idle();
10}
11
12static inline void arch_reset(char mode)
13{
14 u32 devicecfg;
15
16 local_irq_disable();
17
18 devicecfg = __raw_readl(EP93XX_SYSCON_DEVICE_CONFIG);
19 __raw_writel(0xaa, EP93XX_SYSCON_SWLOCK);
20 __raw_writel(devicecfg | 0x80000000, EP93XX_SYSCON_DEVICE_CONFIG);
21 __raw_writel(0xaa, EP93XX_SYSCON_SWLOCK);
22 __raw_writel(devicecfg & ~0x80000000, EP93XX_SYSCON_DEVICE_CONFIG);
23
24 while (1)
25 ;
26}
diff --git a/include/asm-arm/arch-ep93xx/timex.h b/include/asm-arm/arch-ep93xx/timex.h
deleted file mode 100644
index 4140bddc97e2..000000000000
--- a/include/asm-arm/arch-ep93xx/timex.h
+++ /dev/null
@@ -1,5 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-ep93xx/timex.h
3 */
4
5#define CLOCK_TICK_RATE 983040
diff --git a/include/asm-arm/arch-ep93xx/ts72xx.h b/include/asm-arm/arch-ep93xx/ts72xx.h
deleted file mode 100644
index a94f63ff0535..000000000000
--- a/include/asm-arm/arch-ep93xx/ts72xx.h
+++ /dev/null
@@ -1,101 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-ep93xx/ts72xx.h
3 */
4
5/*
6 * TS72xx memory map:
7 *
8 * virt phys size
9 * febff000 22000000 4K model number register
10 * febfe000 22400000 4K options register
11 * febfd000 22800000 4K options register #2
12 * febfc000 [67]0000000 4K NAND data register
13 * febfb000 [67]0400000 4K NAND control register
14 * febfa000 [67]0800000 4K NAND busy register
15 * febf9000 10800000 4K TS-5620 RTC index register
16 * febf8000 11700000 4K TS-5620 RTC data register
17 */
18
19#define TS72XX_MODEL_PHYS_BASE 0x22000000
20#define TS72XX_MODEL_VIRT_BASE 0xfebff000
21#define TS72XX_MODEL_SIZE 0x00001000
22
23#define TS72XX_MODEL_TS7200 0x00
24#define TS72XX_MODEL_TS7250 0x01
25#define TS72XX_MODEL_TS7260 0x02
26
27
28#define TS72XX_OPTIONS_PHYS_BASE 0x22400000
29#define TS72XX_OPTIONS_VIRT_BASE 0xfebfe000
30#define TS72XX_OPTIONS_SIZE 0x00001000
31
32#define TS72XX_OPTIONS_COM2_RS485 0x02
33#define TS72XX_OPTIONS_MAX197 0x01
34
35
36#define TS72XX_OPTIONS2_PHYS_BASE 0x22800000
37#define TS72XX_OPTIONS2_VIRT_BASE 0xfebfd000
38#define TS72XX_OPTIONS2_SIZE 0x00001000
39
40#define TS72XX_OPTIONS2_TS9420 0x04
41#define TS72XX_OPTIONS2_TS9420_BOOT 0x02
42
43
44#define TS72XX_NOR_PHYS_BASE 0x60000000
45#define TS72XX_NOR2_PHYS_BASE 0x62000000
46
47#define TS72XX_NAND1_DATA_PHYS_BASE 0x60000000
48#define TS72XX_NAND2_DATA_PHYS_BASE 0x70000000
49#define TS72XX_NAND_DATA_VIRT_BASE 0xfebfc000
50#define TS72XX_NAND_DATA_SIZE 0x00001000
51
52#define TS72XX_NAND1_CONTROL_PHYS_BASE 0x60400000
53#define TS72XX_NAND2_CONTROL_PHYS_BASE 0x70400000
54#define TS72XX_NAND_CONTROL_VIRT_BASE 0xfebfb000
55#define TS72XX_NAND_CONTROL_SIZE 0x00001000
56
57#define TS72XX_NAND1_BUSY_PHYS_BASE 0x60800000
58#define TS72XX_NAND2_BUSY_PHYS_BASE 0x70800000
59#define TS72XX_NAND_BUSY_VIRT_BASE 0xfebfa000
60#define TS72XX_NAND_BUSY_SIZE 0x00001000
61
62
63#define TS72XX_RTC_INDEX_VIRT_BASE 0xfebf9000
64#define TS72XX_RTC_INDEX_PHYS_BASE 0x10800000
65#define TS72XX_RTC_INDEX_SIZE 0x00001000
66
67#define TS72XX_RTC_DATA_VIRT_BASE 0xfebf8000
68#define TS72XX_RTC_DATA_PHYS_BASE 0x11700000
69#define TS72XX_RTC_DATA_SIZE 0x00001000
70
71
72#ifndef __ASSEMBLY__
73#include <asm/io.h>
74
75static inline int board_is_ts7200(void)
76{
77 return __raw_readb(TS72XX_MODEL_VIRT_BASE) == TS72XX_MODEL_TS7200;
78}
79
80static inline int board_is_ts7250(void)
81{
82 return __raw_readb(TS72XX_MODEL_VIRT_BASE) == TS72XX_MODEL_TS7250;
83}
84
85static inline int board_is_ts7260(void)
86{
87 return __raw_readb(TS72XX_MODEL_VIRT_BASE) == TS72XX_MODEL_TS7260;
88}
89
90static inline int is_max197_installed(void)
91{
92 return !!(__raw_readb(TS72XX_OPTIONS_VIRT_BASE) &
93 TS72XX_OPTIONS_MAX197);
94}
95
96static inline int is_ts9420_installed(void)
97{
98 return !!(__raw_readb(TS72XX_OPTIONS2_VIRT_BASE) &
99 TS72XX_OPTIONS2_TS9420);
100}
101#endif
diff --git a/include/asm-arm/arch-ep93xx/uncompress.h b/include/asm-arm/arch-ep93xx/uncompress.h
deleted file mode 100644
index c15274c85d5d..000000000000
--- a/include/asm-arm/arch-ep93xx/uncompress.h
+++ /dev/null
@@ -1,85 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-ep93xx/uncompress.h
3 *
4 * Copyright (C) 2006 Lennert Buytenhek <buytenh@wantstofly.org>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or (at
9 * your option) any later version.
10 */
11
12#include <asm/arch/ep93xx-regs.h>
13
14static unsigned char __raw_readb(unsigned int ptr)
15{
16 return *((volatile unsigned char *)ptr);
17}
18
19static unsigned int __raw_readl(unsigned int ptr)
20{
21 return *((volatile unsigned int *)ptr);
22}
23
24static void __raw_writeb(unsigned char value, unsigned int ptr)
25{
26 *((volatile unsigned char *)ptr) = value;
27}
28
29static void __raw_writel(unsigned int value, unsigned int ptr)
30{
31 *((volatile unsigned int *)ptr) = value;
32}
33
34
35#define PHYS_UART1_DATA 0x808c0000
36#define PHYS_UART1_FLAG 0x808c0018
37#define UART1_FLAG_TXFF 0x20
38
39static inline void putc(int c)
40{
41 int i;
42
43 for (i = 0; i < 1000; i++) {
44 /* Transmit fifo not full? */
45 if (!(__raw_readb(PHYS_UART1_FLAG) & UART1_FLAG_TXFF))
46 break;
47 }
48
49 __raw_writeb(c, PHYS_UART1_DATA);
50}
51
52static inline void flush(void)
53{
54}
55
56
57/*
58 * Some bootloaders don't turn off DMA from the ethernet MAC before
59 * jumping to linux, which means that we might end up with bits of RX
60 * status and packet data scribbled over the uncompressed kernel image.
61 * Work around this by resetting the ethernet MAC before we uncompress.
62 */
63#define PHYS_ETH_SELF_CTL 0x80010020
64#define ETH_SELF_CTL_RESET 0x00000001
65
66static void ethernet_reset(void)
67{
68 unsigned int v;
69
70 /* Reset the ethernet MAC. */
71 v = __raw_readl(PHYS_ETH_SELF_CTL);
72 __raw_writel(v | ETH_SELF_CTL_RESET, PHYS_ETH_SELF_CTL);
73
74 /* Wait for reset to finish. */
75 while (__raw_readl(PHYS_ETH_SELF_CTL) & ETH_SELF_CTL_RESET)
76 ;
77}
78
79
80static void arch_decomp_setup(void)
81{
82 ethernet_reset();
83}
84
85#define arch_decomp_wdog()
diff --git a/include/asm-arm/arch-ep93xx/vmalloc.h b/include/asm-arm/arch-ep93xx/vmalloc.h
deleted file mode 100644
index 205ea6b1cf5e..000000000000
--- a/include/asm-arm/arch-ep93xx/vmalloc.h
+++ /dev/null
@@ -1,5 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-ep93xx/vmalloc.h
3 */
4
5#define VMALLOC_END 0xfe800000
diff --git a/include/asm-arm/arch-h720x/boards.h b/include/asm-arm/arch-h720x/boards.h
deleted file mode 100644
index 8021f81f0742..000000000000
--- a/include/asm-arm/arch-h720x/boards.h
+++ /dev/null
@@ -1,53 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-h720x/boards.h
3 *
4 * Copyright (C) 2003 Thomas Gleixner <tglx@linutronix.de>
5 * (C) 2003 Robert Schwebel <r.schwebel@pengutronix.de>
6 *
7 * This file contains the board specific defines for various devices
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12 */
13
14#ifndef __ASM_ARCH_HARDWARE_INCMACH_H
15#error Do not include this file directly. Include asm/hardware.h instead !
16#endif
17
18/* Hynix H7202 developer board specific device defines */
19#ifdef CONFIG_ARCH_H7202
20
21/* FLASH */
22#define FLASH_VIRT 0xd0000000
23#define FLASH_PHYS 0x00000000
24#define FLASH_SIZE 0x02000000
25
26/* onboard LAN controller */
27# define ETH0_PHYS 0x08000000
28
29/* Touch screen defines */
30/* GPIO Port */
31#define PEN_GPIO GPIO_B_VIRT
32/* Bitmask for pen down interrupt */
33#define PEN_INT_BIT (1<<7)
34/* Bitmask for pen up interrupt */
35#define PEN_ENA_BIT (1<<6)
36/* pen up interrupt */
37#define IRQ_PEN IRQ_MUX_GPIOB(7)
38
39#endif
40
41/* Hynix H7201 developer board specific device defines */
42#if defined (CONFIG_ARCH_H7201)
43/* ROM DISK SPACE */
44#define ROM_DISK_BASE 0xc1800000
45#define ROM_DISK_START 0x41800000
46#define ROM_DISK_SIZE 0x00700000
47
48/* SRAM DISK SPACE */
49#define SRAM_DISK_BASE 0xf1000000
50#define SRAM_DISK_START 0x04000000
51#define SRAM_DISK_SIZE 0x00400000
52#endif
53
diff --git a/include/asm-arm/arch-h720x/debug-macro.S b/include/asm-arm/arch-h720x/debug-macro.S
deleted file mode 100644
index 82822d362733..000000000000
--- a/include/asm-arm/arch-h720x/debug-macro.S
+++ /dev/null
@@ -1,40 +0,0 @@
1/* linux/include/asm-arm/arch-h720x/debug-macro.S
2 *
3 * Debugging macro include header
4 *
5 * Copyright (C) 1994-1999 Russell King
6 * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 *
12*/
13
14 .equ io_virt, IO_BASE
15 .equ io_phys, IO_START
16
17 .macro addruart,rx
18 mrc p15, 0, \rx, c1, c0
19 tst \rx, #1 @ MMU enabled?
20 moveq \rx, #io_phys @ physical base address
21 movne \rx, #io_virt @ virtual address
22 add \rx, \rx, #0x00020000 @ UART1
23 .endm
24
25 .macro senduart,rd,rx
26 str \rd, [\rx, #0x0] @ UARTDR
27
28 .endm
29
30 .macro waituart,rd,rx
311001: ldr \rd, [\rx, #0x18] @ UARTFLG
32 tst \rd, #1 << 5 @ UARTFLGUTXFF - 1 when full
33 bne 1001b
34 .endm
35
36 .macro busyuart,rd,rx
371001: ldr \rd, [\rx, #0x18] @ UARTFLG
38 tst \rd, #1 << 3 @ UARTFLGUBUSY - 1 when busy
39 bne 1001b
40 .endm
diff --git a/include/asm-arm/arch-h720x/dma.h b/include/asm-arm/arch-h720x/dma.h
deleted file mode 100644
index bfc6636679f7..000000000000
--- a/include/asm-arm/arch-h720x/dma.h
+++ /dev/null
@@ -1,26 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-h720x/dma.h
3 *
4 * Architecture DMA routes
5 *
6 * Copyright (C) 1997.1998 Russell King
7 */
8#ifndef __ASM_ARCH_DMA_H
9#define __ASM_ARCH_DMA_H
10
11/*
12 * This is the maximum DMA address that can be DMAd to.
13 * There should not be more than (0xd0000000 - 0xc0000000)
14 * bytes of RAM.
15 */
16#define MAX_DMA_ADDRESS 0xd0000000
17
18#if defined (CONFIG_CPU_H7201)
19#define MAX_DMA_CHANNELS 3
20#elif defined (CONFIG_CPU_H7202)
21#define MAX_DMA_CHANNELS 4
22#else
23#error processor definition missmatch
24#endif
25
26#endif /* __ASM_ARCH_DMA_H */
diff --git a/include/asm-arm/arch-h720x/entry-macro.S b/include/asm-arm/arch-h720x/entry-macro.S
deleted file mode 100644
index 38dd63ae104e..000000000000
--- a/include/asm-arm/arch-h720x/entry-macro.S
+++ /dev/null
@@ -1,66 +0,0 @@
1/*
2 * include/asm-arm/arch-h720x/entry-macro.S
3 *
4 * Low-level IRQ helper macros for Hynix HMS720x based platforms
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10
11 .macro disable_fiq
12 .endm
13
14 .macro get_irqnr_preamble, base, tmp
15 .endm
16
17 .macro arch_ret_to_user, tmp1, tmp2
18 .endm
19
20 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
21#if defined (CONFIG_CPU_H7201) || defined (CONFIG_CPU_H7202)
22 @ we could use the id register on H7202, but this is not
23 @ properly updated when we come back from asm_do_irq
24 @ without a previous return from interrupt
25 @ (see loops below in irq_svc, irq_usr)
26 @ We see unmasked pending ints only, as the masked pending ints
27 @ are not visible here
28
29 mov \base, #0xf0000000 @ base register
30 orr \base, \base, #0x24000 @ irqbase
31 ldr \irqstat, [\base, #0x04] @ get interrupt status
32#if defined (CONFIG_CPU_H7201)
33 ldr \tmp, =0x001fffff
34#else
35 mvn \tmp, #0xc0000000
36#endif
37 and \irqstat, \irqstat, \tmp @ mask out unused ints
38 mov \irqnr, #0
39
40 mov \tmp, #0xff00
41 orr \tmp, \tmp, #0xff
42 tst \irqstat, \tmp
43 addeq \irqnr, \irqnr, #16
44 moveq \irqstat, \irqstat, lsr #16
45 tst \irqstat, #255
46 addeq \irqnr, \irqnr, #8
47 moveq \irqstat, \irqstat, lsr #8
48 tst \irqstat, #15
49 addeq \irqnr, \irqnr, #4
50 moveq \irqstat, \irqstat, lsr #4
51 tst \irqstat, #3
52 addeq \irqnr, \irqnr, #2
53 moveq \irqstat, \irqstat, lsr #2
54 tst \irqstat, #1
55 addeq \irqnr, \irqnr, #1
56 moveq \irqstat, \irqstat, lsr #1
57 tst \irqstat, #1 @ bit 0 should be set
58 .endm
59
60 .macro irq_prio_table
61 .endm
62
63#else
64#error hynix processor selection missmatch
65#endif
66
diff --git a/include/asm-arm/arch-h720x/h7201-regs.h b/include/asm-arm/arch-h720x/h7201-regs.h
deleted file mode 100644
index 49d4f6bd3080..000000000000
--- a/include/asm-arm/arch-h720x/h7201-regs.h
+++ /dev/null
@@ -1,67 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-h720x/h7201-regs.h
3 *
4 * Copyright (C) 2000 Jungjun Kim, Hynix Semiconductor Inc.
5 * (C) 2003 Thomas Gleixner <tglx@linutronix.de>
6 * (C) 2003 Robert Schwebel <r.schwebel@pengutronix.de>
7 * (C) 2004 Sascha Hauer <s.hauer@pengutronix.de>
8 *
9 * This file contains the hardware definitions of the h720x processors
10 *
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License version 2 as
13 * published by the Free Software Foundation.
14 *
15 * Do not add implementations specific defines here. This files contains
16 * only defines of the onchip peripherals. Add those defines to boards.h,
17 * which is included by this file.
18 */
19
20#define SERIAL2_VIRT (IO_VIRT + 0x50100)
21#define SERIAL3_VIRT (IO_VIRT + 0x50200)
22
23/*
24 * PCMCIA
25 */
26#define PCMCIA0_ATT_BASE 0xe5000000
27#define PCMCIA0_ATT_SIZE 0x00200000
28#define PCMCIA0_ATT_START 0x20000000
29#define PCMCIA0_MEM_BASE 0xe5200000
30#define PCMCIA0_MEM_SIZE 0x00200000
31#define PCMCIA0_MEM_START 0x24000000
32#define PCMCIA0_IO_BASE 0xe5400000
33#define PCMCIA0_IO_SIZE 0x00200000
34#define PCMCIA0_IO_START 0x28000000
35
36#define PCMCIA1_ATT_BASE 0xe5600000
37#define PCMCIA1_ATT_SIZE 0x00200000
38#define PCMCIA1_ATT_START 0x30000000
39#define PCMCIA1_MEM_BASE 0xe5800000
40#define PCMCIA1_MEM_SIZE 0x00200000
41#define PCMCIA1_MEM_START 0x34000000
42#define PCMCIA1_IO_BASE 0xe5a00000
43#define PCMCIA1_IO_SIZE 0x00200000
44#define PCMCIA1_IO_START 0x38000000
45
46#define PRIME3C_BASE 0xf0050000
47#define PRIME3C_SIZE 0x00001000
48#define PRIME3C_START 0x10000000
49
50/* VGA Controller */
51#define VGA_RAMBASE 0x50
52#define VGA_TIMING0 0x60
53#define VGA_TIMING1 0x64
54#define VGA_TIMING2 0x68
55#define VGA_TIMING3 0x6c
56
57#define LCD_CTRL_VGA_ENABLE 0x00000100
58#define LCD_CTRL_VGA_BPP_MASK 0x00000600
59#define LCD_CTRL_VGA_4BPP 0x00000000
60#define LCD_CTRL_VGA_8BPP 0x00000200
61#define LCD_CTRL_VGA_16BPP 0x00000300
62#define LCD_CTRL_SHARE_DMA 0x00000800
63#define LCD_CTRL_VDE 0x00100000
64#define LCD_CTRL_LPE 0x00400000 /* LCD Power enable */
65#define LCD_CTRL_BLE 0x00800000 /* LCD backlight enable */
66
67#define VGA_PALETTE_BASE (IO_VIRT + 0x10800)
diff --git a/include/asm-arm/arch-h720x/h7202-regs.h b/include/asm-arm/arch-h720x/h7202-regs.h
deleted file mode 100644
index 43d8ba8a6013..000000000000
--- a/include/asm-arm/arch-h720x/h7202-regs.h
+++ /dev/null
@@ -1,155 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-h720x/h7202-regs.h
3 *
4 * Copyright (C) 2000 Jungjun Kim, Hynix Semiconductor Inc.
5 * (C) 2003 Thomas Gleixner <tglx@linutronix.de>
6 * (C) 2003 Robert Schwebel <r.schwebel@pengutronix.de>
7 * (C) 2004 Sascha Hauer <s.hauer@pengutronix.de>
8 *
9 * This file contains the hardware definitions of the h720x processors
10 *
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License version 2 as
13 * published by the Free Software Foundation.
14 *
15 * Do not add implementations specific defines here. This files contains
16 * only defines of the onchip peripherals. Add those defines to boards.h,
17 * which is included by this file.
18 */
19
20#define SERIAL2_OFS 0x2d000
21#define SERIAL2_BASE (IO_PHYS + SERIAL2_OFS)
22#define SERIAL2_VIRT (IO_VIRT + SERIAL2_OFS)
23#define SERIAL3_OFS 0x2e000
24#define SERIAL3_BASE (IO_PHYS + SERIAL3_OFS)
25#define SERIAL3_VIRT (IO_VIRT + SERIAL3_OFS)
26
27/* Matrix Keyboard Controller */
28#define KBD_VIRT (IO_VIRT + 0x22000)
29#define KBD_KBCR 0x00
30#define KBD_KBSC 0x04
31#define KBD_KBTR 0x08
32#define KBD_KBVR0 0x0C
33#define KBD_KBVR1 0x10
34#define KBD_KBSR 0x18
35
36#define KBD_KBCR_SCANENABLE (1 << 7)
37#define KBD_KBCR_NPOWERDOWN (1 << 2)
38#define KBD_KBCR_CLKSEL_MASK (3)
39#define KBD_KBCR_CLKSEL_PCLK2 0x0
40#define KBD_KBCR_CLKSEL_PCLK128 0x1
41#define KBD_KBCR_CLKSEL_PCLK256 0x2
42#define KBD_KBCR_CLKSEL_PCLK512 0x3
43
44#define KBD_KBSR_INTR (1 << 0)
45#define KBD_KBSR_WAKEUP (1 << 1)
46
47/* USB device controller */
48
49#define USBD_BASE (IO_VIRT + 0x12000)
50#define USBD_LENGTH 0x3C
51
52#define USBD_GCTRL 0x00
53#define USBD_EPCTRL 0x04
54#define USBD_INTMASK 0x08
55#define USBD_INTSTAT 0x0C
56#define USBD_PWR 0x10
57#define USBD_DMARXTX 0x14
58#define USBD_DEVID 0x18
59#define USBD_DEVCLASS 0x1C
60#define USBD_INTCLASS 0x20
61#define USBD_SETUP0 0x24
62#define USBD_SETUP1 0x28
63#define USBD_ENDP0RD 0x2C
64#define USBD_ENDP0WT 0x30
65#define USBD_ENDP1RD 0x34
66#define USBD_ENDP2WT 0x38
67
68/* PS/2 port */
69#define PSDATA 0x00
70#define PSSTAT 0x04
71#define PSSTAT_TXEMPTY (1<<0)
72#define PSSTAT_TXBUSY (1<<1)
73#define PSSTAT_RXFULL (1<<2)
74#define PSSTAT_RXBUSY (1<<3)
75#define PSSTAT_CLKIN (1<<4)
76#define PSSTAT_DATAIN (1<<5)
77#define PSSTAT_PARITY (1<<6)
78
79#define PSCONF 0x08
80#define PSCONF_ENABLE (1<<0)
81#define PSCONF_TXINTEN (1<<2)
82#define PSCONF_RXINTEN (1<<3)
83#define PSCONF_FORCECLKLOW (1<<4)
84#define PSCONF_FORCEDATLOW (1<<5)
85#define PSCONF_LCE (1<<6)
86
87#define PSINTR 0x0C
88#define PSINTR_TXINT (1<<0)
89#define PSINTR_RXINT (1<<1)
90#define PSINTR_PAR (1<<2)
91#define PSINTR_RXTO (1<<3)
92#define PSINTR_TXTO (1<<4)
93
94#define PSTDLO 0x10 /* clk low before start transmission */
95#define PSTPRI 0x14 /* PRI clock */
96#define PSTXMT 0x18 /* maximum transmission time */
97#define PSTREC 0x20 /* maximum receive time */
98#define PSPWDN 0x3c
99
100/* ADC converter */
101#define ADC_BASE (IO_VIRT + 0x29000)
102#define ADC_CR 0x00
103#define ADC_TSCTRL 0x04
104#define ADC_BT_CTRL 0x08
105#define ADC_MC_CTRL 0x0C
106#define ADC_STATUS 0x10
107
108/* ADC control register bits */
109#define ADC_CR_PW_CTRL 0x80
110#define ADC_CR_DIRECTC 0x04
111#define ADC_CR_CONTIME_NO 0x00
112#define ADC_CR_CONTIME_2 0x04
113#define ADC_CR_CONTIME_4 0x08
114#define ADC_CR_CONTIME_ADE 0x0c
115#define ADC_CR_LONGCALTIME 0x01
116
117/* ADC touch panel register bits */
118#define ADC_TSCTRL_ENABLE 0x80
119#define ADC_TSCTRL_INTR 0x40
120#define ADC_TSCTRL_SWBYPSS 0x20
121#define ADC_TSCTRL_SWINVT 0x10
122#define ADC_TSCTRL_S400 0x03
123#define ADC_TSCTRL_S200 0x02
124#define ADC_TSCTRL_S100 0x01
125#define ADC_TSCTRL_S50 0x00
126
127/* ADC Interrupt Status Register bits */
128#define ADC_STATUS_TS_BIT 0x80
129#define ADC_STATUS_MBT_BIT 0x40
130#define ADC_STATUS_BBT_BIT 0x20
131#define ADC_STATUS_MIC_BIT 0x10
132
133/* Touch data registers */
134#define ADC_TS_X0X1 0x30
135#define ADC_TS_X2X3 0x34
136#define ADC_TS_Y0Y1 0x38
137#define ADC_TS_Y2Y3 0x3c
138#define ADC_TS_X4X5 0x40
139#define ADC_TS_X6X7 0x44
140#define ADC_TS_Y4Y5 0x48
141#define ADC_TS_Y6Y7 0x50
142
143/* battery data */
144#define ADC_MB_DATA 0x54
145#define ADC_BB_DATA 0x58
146
147/* Sound data register */
148#define ADC_SD_DAT0 0x60
149#define ADC_SD_DAT1 0x64
150#define ADC_SD_DAT2 0x68
151#define ADC_SD_DAT3 0x6c
152#define ADC_SD_DAT4 0x70
153#define ADC_SD_DAT5 0x74
154#define ADC_SD_DAT6 0x78
155#define ADC_SD_DAT7 0x7c
diff --git a/include/asm-arm/arch-h720x/hardware.h b/include/asm-arm/arch-h720x/hardware.h
deleted file mode 100644
index dfb778906a9f..000000000000
--- a/include/asm-arm/arch-h720x/hardware.h
+++ /dev/null
@@ -1,192 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-h720x/hardware.h
3 *
4 * Copyright (C) 2000 Jungjun Kim, Hynix Semiconductor Inc.
5 * (C) 2003 Thomas Gleixner <tglx@linutronix.de>
6 * (C) 2003 Robert Schwebel <r.schwebel@pengutronix.de>
7 *
8 * This file contains the hardware definitions of the h720x processors
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
13 *
14 * Do not add implementations specific defines here. This files contains
15 * only defines of the onchip peripherals. Add those defines to boards.h,
16 * which is included by this file.
17 */
18
19#ifndef __ASM_ARCH_HARDWARE_H
20#define __ASM_ARCH_HARDWARE_H
21
22#define IOCLK (3686400L)
23
24/* Onchip peripherals */
25
26#define IO_VIRT 0xf0000000 /* IO peripherals */
27#define IO_PHYS 0x80000000
28#define IO_SIZE 0x00050000
29
30#ifdef CONFIG_CPU_H7202
31#include "h7202-regs.h"
32#elif defined CONFIG_CPU_H7201
33#include "h7201-regs.h"
34#else
35#error machine definition mismatch
36#endif
37
38/* Macro to access the CPU IO */
39#define CPU_IO(x) (*(volatile u32*)(x))
40
41/* Macro to access general purpose regs (base, offset) */
42#define CPU_REG(x,y) CPU_IO(x+y)
43
44/* Macro to access irq related regs */
45#define IRQ_REG(x) CPU_REG(IRQC_VIRT,x)
46
47/* CPU registers */
48/* general purpose I/O */
49#define GPIO_VIRT(x) (IO_VIRT + 0x23000 + ((x)<<5))
50#define GPIO_A_VIRT (GPIO_VIRT(0))
51#define GPIO_B_VIRT (GPIO_VIRT(1))
52#define GPIO_C_VIRT (GPIO_VIRT(2))
53#define GPIO_D_VIRT (GPIO_VIRT(3))
54#define GPIO_E_VIRT (GPIO_VIRT(4))
55#define GPIO_AMULSEL (GPIO_VIRT(0) + 0xA4)
56
57#define AMULSEL_USIN2 (1<<5)
58#define AMULSEL_USOUT2 (1<<6)
59#define AMULSEL_USIN3 (1<<13)
60#define AMULSEL_USOUT3 (1<<14)
61#define AMULSEL_IRDIN (1<<15)
62#define AMULSEL_IRDOUT (1<<7)
63
64/* Register offsets general purpose I/O */
65#define GPIO_DATA 0x00
66#define GPIO_DIR 0x04
67#define GPIO_MASK 0x08
68#define GPIO_STAT 0x0C
69#define GPIO_EDGE 0x10
70#define GPIO_CLR 0x14
71#define GPIO_POL 0x18
72#define GPIO_EN 0x1C
73
74/*interrupt controller */
75#define IRQC_VIRT (IO_VIRT + 0x24000)
76/* register offset interrupt controller */
77#define IRQC_IER 0x00
78#define IRQC_ISR 0x04
79
80/* timer unit */
81#define TIMER_VIRT (IO_VIRT + 0x25000)
82/* Register offsets timer unit */
83#define TM0_PERIOD 0x00
84#define TM0_COUNT 0x08
85#define TM0_CTRL 0x10
86#define TM1_PERIOD 0x20
87#define TM1_COUNT 0x28
88#define TM1_CTRL 0x30
89#define TM2_PERIOD 0x40
90#define TM2_COUNT 0x48
91#define TM2_CTRL 0x50
92#define TIMER_TOPCTRL 0x60
93#define TIMER_TOPSTAT 0x64
94#define T64_COUNTL 0x80
95#define T64_COUNTH 0x84
96#define T64_CTRL 0x88
97#define T64_BASEL 0x94
98#define T64_BASEH 0x98
99/* Bitmaks timer unit TOPSTAT reg */
100#define TSTAT_T0INT 0x1
101#define TSTAT_T1INT 0x2
102#define TSTAT_T2INT 0x4
103#define TSTAT_T3INT 0x8
104/* Bit description of TMx_CTRL register */
105#define TM_START 0x1
106#define TM_REPEAT 0x2
107#define TM_RESET 0x4
108/* Bit description of TIMER_CTRL register */
109#define ENABLE_TM0_INTR 0x1
110#define ENABLE_TM1_INTR 0x2
111#define ENABLE_TM2_INTR 0x4
112#define TIMER_ENABLE_BIT 0x8
113#define ENABLE_TIMER64 0x10
114#define ENABLE_TIMER64_INT 0x20
115
116/* PMU & PLL */
117#define PMU_BASE (IO_VIRT + 0x1000)
118#define PMU_MODE 0x00
119#define PMU_STAT 0x20
120#define PMU_PLL_CTRL 0x28
121
122/* PMU Mode bits */
123#define PMU_MODE_SLOW 0x00
124#define PMU_MODE_RUN 0x01
125#define PMU_MODE_IDLE 0x02
126#define PMU_MODE_SLEEP 0x03
127#define PMU_MODE_INIT 0x04
128#define PMU_MODE_DEEPSLEEP 0x07
129#define PMU_MODE_WAKEUP 0x08
130
131/* PMU ... */
132#define PLL_2_EN 0x8000
133#define PLL_1_EN 0x4000
134#define PLL_3_MUTE 0x0080
135
136/* Control bits for PMU/ PLL */
137#define PMU_WARMRESET 0x00010000
138#define PLL_CTRL_MASK23 0x000080ff
139
140/* LCD Controller */
141#define LCD_BASE (IO_VIRT + 0x10000)
142#define LCD_CTRL 0x00
143#define LCD_STATUS 0x04
144#define LCD_STATUS_M 0x08
145#define LCD_INTERRUPT 0x0C
146#define LCD_DBAR 0x10
147#define LCD_DCAR 0x14
148#define LCD_TIMING0 0x20
149#define LCD_TIMING1 0x24
150#define LCD_TIMING2 0x28
151#define LCD_TEST 0x40
152
153/* LCD Control Bits */
154#define LCD_CTRL_LCD_ENABLE 0x00000001
155/* Bits per pixel */
156#define LCD_CTRL_LCD_BPP_MASK 0x00000006
157#define LCD_CTRL_LCD_4BPP 0x00000000
158#define LCD_CTRL_LCD_8BPP 0x00000002
159#define LCD_CTRL_LCD_16BPP 0x00000004
160#define LCD_CTRL_LCD_BW 0x00000008
161#define LCD_CTRL_LCD_TFT 0x00000010
162#define LCD_CTRL_BGR 0x00001000
163#define LCD_CTRL_LCD_VCOMP 0x00080000
164#define LCD_CTRL_LCD_MONO8 0x00200000
165#define LCD_CTRL_LCD_PWR 0x00400000
166#define LCD_CTRL_LCD_BLE 0x00800000
167#define LCD_CTRL_LDBUSEN 0x01000000
168
169/* Palette */
170#define LCD_PALETTE_BASE (IO_VIRT + 0x10400)
171
172/* Serial ports */
173#define SERIAL0_OFS 0x20000
174#define SERIAL0_VIRT (IO_VIRT + SERIAL0_OFS)
175#define SERIAL0_BASE (IO_PHYS + SERIAL0_OFS)
176
177#define SERIAL1_OFS 0x21000
178#define SERIAL1_VIRT (IO_VIRT + SERIAL1_OFS)
179#define SERIAL1_BASE (IO_PHYS + SERIAL1_OFS)
180
181#define SERIAL_ENABLE 0x30
182#define SERIAL_ENABLE_EN (1<<0)
183
184/* General defines to pacify gcc */
185#define PCIO_BASE (0) /* for inb, outb and friends */
186#define PCIO_VIRT PCIO_BASE
187
188#define __ASM_ARCH_HARDWARE_INCMACH_H
189#include "boards.h"
190#undef __ASM_ARCH_HARDWARE_INCMACH_H
191
192#endif /* __ASM_ARCH_HARDWARE_H */
diff --git a/include/asm-arm/arch-h720x/io.h b/include/asm-arm/arch-h720x/io.h
deleted file mode 100644
index d3ccfd8172b7..000000000000
--- a/include/asm-arm/arch-h720x/io.h
+++ /dev/null
@@ -1,24 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-h720x/io.h
3 *
4 * Copyright (C) 2000 Steve Hill (sjhill@cotw.com)
5 *
6 * Changelog:
7 *
8 * 09-19-2001 JJKIM
9 * Created from linux/include/asm-arm/arch-l7200/io.h
10 *
11 * 03-27-2003 Robert Schwebel <r.schwebel@pengutronix.de>:
12 * re-unified header files for h720x
13 */
14#ifndef __ASM_ARM_ARCH_IO_H
15#define __ASM_ARM_ARCH_IO_H
16
17#include <asm/hardware.h>
18
19#define IO_SPACE_LIMIT 0xffffffff
20
21#define __io(a) ((void __iomem *)(a))
22#define __mem_pci(a) (a)
23
24#endif
diff --git a/include/asm-arm/arch-h720x/irqs.h b/include/asm-arm/arch-h720x/irqs.h
deleted file mode 100644
index 8244413988be..000000000000
--- a/include/asm-arm/arch-h720x/irqs.h
+++ /dev/null
@@ -1,116 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-h720x/irqs.h
3 *
4 * Copyright (C) 2000 Jungjun Kim
5 * (C) 2003 Robert Schwebel <r.schwebel@pengutronix.de>
6 * (C) 2003 Thomas Gleixner <tglx@linutronix.de>
7 *
8 */
9
10#ifndef __ASM_ARCH_IRQS_H
11#define __ASM_ARCH_IRQS_H
12
13#if defined (CONFIG_CPU_H7201)
14
15#define IRQ_PMU 0 /* 0x000001 */
16#define IRQ_DMA 1 /* 0x000002 */
17#define IRQ_LCD 2 /* 0x000004 */
18#define IRQ_VGA 3 /* 0x000008 */
19#define IRQ_PCMCIA1 4 /* 0x000010 */
20#define IRQ_PCMCIA2 5 /* 0x000020 */
21#define IRQ_AFE 6 /* 0x000040 */
22#define IRQ_AIC 7 /* 0x000080 */
23#define IRQ_KEYBOARD 8 /* 0x000100 */
24#define IRQ_TIMER0 9 /* 0x000200 */
25#define IRQ_RTC 10 /* 0x000400 */
26#define IRQ_SOUND 11 /* 0x000800 */
27#define IRQ_USB 12 /* 0x001000 */
28#define IRQ_IrDA 13 /* 0x002000 */
29#define IRQ_UART0 14 /* 0x004000 */
30#define IRQ_UART1 15 /* 0x008000 */
31#define IRQ_SPI 16 /* 0x010000 */
32#define IRQ_GPIOA 17 /* 0x020000 */
33#define IRQ_GPIOB 18 /* 0x040000 */
34#define IRQ_GPIOC 19 /* 0x080000 */
35#define IRQ_GPIOD 20 /* 0x100000 */
36#define IRQ_CommRX 21 /* 0x200000 */
37#define IRQ_CommTX 22 /* 0x400000 */
38#define IRQ_Soft 23 /* 0x800000 */
39
40#define NR_GLBL_IRQS 24
41
42#define IRQ_CHAINED_GPIOA(x) (NR_GLBL_IRQS + x)
43#define IRQ_CHAINED_GPIOB(x) (IRQ_CHAINED_GPIOA(32) + x)
44#define IRQ_CHAINED_GPIOC(x) (IRQ_CHAINED_GPIOB(32) + x)
45#define IRQ_CHAINED_GPIOD(x) (IRQ_CHAINED_GPIOC(32) + x)
46#define NR_IRQS IRQ_CHAINED_GPIOD(32)
47
48/* Enable mask for multiplexed interrupts */
49#define IRQ_ENA_MUX (1<<IRQ_GPIOA) | (1<<IRQ_GPIOB) \
50 | (1<<IRQ_GPIOC) | (1<<IRQ_GPIOD)
51
52
53#elif defined (CONFIG_CPU_H7202)
54
55#define IRQ_PMU 0 /* 0x00000001 */
56#define IRQ_DMA 1 /* 0x00000002 */
57#define IRQ_LCD 2 /* 0x00000004 */
58#define IRQ_SOUND 3 /* 0x00000008 */
59#define IRQ_I2S 4 /* 0x00000010 */
60#define IRQ_USB 5 /* 0x00000020 */
61#define IRQ_MMC 6 /* 0x00000040 */
62#define IRQ_RTC 7 /* 0x00000080 */
63#define IRQ_UART0 8 /* 0x00000100 */
64#define IRQ_UART1 9 /* 0x00000200 */
65#define IRQ_UART2 10 /* 0x00000400 */
66#define IRQ_UART3 11 /* 0x00000800 */
67#define IRQ_KBD 12 /* 0x00001000 */
68#define IRQ_PS2 13 /* 0x00002000 */
69#define IRQ_AIC 14 /* 0x00004000 */
70#define IRQ_TIMER0 15 /* 0x00008000 */
71#define IRQ_TIMERX 16 /* 0x00010000 */
72#define IRQ_WDT 17 /* 0x00020000 */
73#define IRQ_CAN0 18 /* 0x00040000 */
74#define IRQ_CAN1 19 /* 0x00080000 */
75#define IRQ_EXT0 20 /* 0x00100000 */
76#define IRQ_EXT1 21 /* 0x00200000 */
77#define IRQ_GPIOA 22 /* 0x00400000 */
78#define IRQ_GPIOB 23 /* 0x00800000 */
79#define IRQ_GPIOC 24 /* 0x01000000 */
80#define IRQ_GPIOD 25 /* 0x02000000 */
81#define IRQ_GPIOE 26 /* 0x04000000 */
82#define IRQ_COMMRX 27 /* 0x08000000 */
83#define IRQ_COMMTX 28 /* 0x10000000 */
84#define IRQ_SMC 29 /* 0x20000000 */
85#define IRQ_Soft 30 /* 0x40000000 */
86#define IRQ_RESERVED1 31 /* 0x80000000 */
87#define NR_GLBL_IRQS 32
88
89#define NR_TIMERX_IRQS 3
90
91#define IRQ_CHAINED_GPIOA(x) (NR_GLBL_IRQS + x)
92#define IRQ_CHAINED_GPIOB(x) (IRQ_CHAINED_GPIOA(32) + x)
93#define IRQ_CHAINED_GPIOC(x) (IRQ_CHAINED_GPIOB(32) + x)
94#define IRQ_CHAINED_GPIOD(x) (IRQ_CHAINED_GPIOC(32) + x)
95#define IRQ_CHAINED_GPIOE(x) (IRQ_CHAINED_GPIOD(32) + x)
96#define IRQ_CHAINED_TIMERX(x) (IRQ_CHAINED_GPIOE(32) + x)
97#define IRQ_TIMER1 (IRQ_CHAINED_TIMERX(0))
98#define IRQ_TIMER2 (IRQ_CHAINED_TIMERX(1))
99#define IRQ_TIMER64B (IRQ_CHAINED_TIMERX(2))
100
101#define NR_IRQS (IRQ_CHAINED_TIMERX(NR_TIMERX_IRQS))
102
103/* Enable mask for multiplexed interrupts */
104#define IRQ_ENA_MUX (1<<IRQ_TIMERX) | (1<<IRQ_GPIOA) | (1<<IRQ_GPIOB) | \
105 (1<<IRQ_GPIOC) | (1<<IRQ_GPIOD) | (1<<IRQ_GPIOE) | \
106 (1<<IRQ_TIMERX)
107
108#else
109#error cpu definition mismatch
110#endif
111
112/* decode irq number to register number */
113#define IRQ_TO_REGNO(irq) ((irq - NR_GLBL_IRQS) >> 5)
114#define IRQ_TO_BIT(irq) (1 << ((irq - NR_GLBL_IRQS) % 32))
115
116#endif
diff --git a/include/asm-arm/arch-h720x/memory.h b/include/asm-arm/arch-h720x/memory.h
deleted file mode 100644
index 53e923dba76e..000000000000
--- a/include/asm-arm/arch-h720x/memory.h
+++ /dev/null
@@ -1,29 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-h720x/memory.h
3 *
4 * Copyright (c) 2000 Jungjun Kim
5 *
6 */
7#ifndef __ASM_ARCH_MEMORY_H
8#define __ASM_ARCH_MEMORY_H
9
10/*
11 * Page offset:
12 * ( 0xc0000000UL )
13 */
14#define PHYS_OFFSET UL(0x40000000)
15
16/*
17 * Virtual view <-> DMA view memory address translations
18 * virt_to_bus: Used to translate the virtual address to an
19 * address suitable to be passed to set_dma_addr
20 * bus_to_virt: Used to convert an address for DMA operations
21 * to an address that the kernel can use.
22 *
23 * There is something to do here later !, Mar 2000, Jungjun Kim
24 */
25
26#define __virt_to_bus(x) __virt_to_phys(x)
27#define __bus_to_virt(x) __phys_to_virt(x)
28
29#endif
diff --git a/include/asm-arm/arch-h720x/system.h b/include/asm-arm/arch-h720x/system.h
deleted file mode 100644
index 8dc1460b2305..000000000000
--- a/include/asm-arm/arch-h720x/system.h
+++ /dev/null
@@ -1,33 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-h720x/system.h
3 *
4 * Copyright (C) 2001-2002 Jungjun Kim, Hynix Semiconductor Inc.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 * linux/include/asm-arm/arch-h720x/system.h
10 *
11 */
12
13#ifndef __ASM_ARCH_SYSTEM_H
14#define __ASM_ARCH_SYSTEM_H
15#include <asm/hardware.h>
16
17static void arch_idle(void)
18{
19 CPU_REG (PMU_BASE, PMU_MODE) = PMU_MODE_IDLE;
20 nop();
21 nop();
22 CPU_REG (PMU_BASE, PMU_MODE) = PMU_MODE_RUN;
23 nop();
24 nop();
25}
26
27
28static __inline__ void arch_reset(char mode)
29{
30 CPU_REG (PMU_BASE, PMU_STAT) |= PMU_WARMRESET;
31}
32
33#endif
diff --git a/include/asm-arm/arch-h720x/timex.h b/include/asm-arm/arch-h720x/timex.h
deleted file mode 100644
index 48a391c4080f..000000000000
--- a/include/asm-arm/arch-h720x/timex.h
+++ /dev/null
@@ -1,15 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-h720x/timex.h
3 * Copyright (C) 2000 Jungjun Kim, Hynix Semiconductor Inc.
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
8 */
9
10#ifndef __ASM_ARCH_TIMEX
11#define __ASM_ARCH_TIMEX
12
13#define CLOCK_TICK_RATE 3686400
14
15#endif
diff --git a/include/asm-arm/arch-h720x/uncompress.h b/include/asm-arm/arch-h720x/uncompress.h
deleted file mode 100644
index 18c69e0f3585..000000000000
--- a/include/asm-arm/arch-h720x/uncompress.h
+++ /dev/null
@@ -1,37 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-h720x/uncompress.h
3 *
4 * Copyright (C) 2001-2002 Jungjun Kim
5 */
6
7#ifndef __ASM_ARCH_UNCOMPRESS_H
8#define __ASM_ARCH_UNCOMPRESS_H
9
10#include <asm/hardware.h>
11
12#define LSR 0x14
13#define TEMPTY 0x40
14
15static inline void putc(int c)
16{
17 volatile unsigned char *p = (volatile unsigned char *)(IO_PHYS+0x20000);
18
19 /* wait until transmit buffer is empty */
20 while((p[LSR] & TEMPTY) == 0x0)
21 barrier();
22
23 /* write next character */
24 *p = c;
25}
26
27static inline void flush(void)
28{
29}
30
31/*
32 * nothing to do
33 */
34#define arch_decomp_setup()
35#define arch_decomp_wdog()
36
37#endif
diff --git a/include/asm-arm/arch-h720x/vmalloc.h b/include/asm-arm/arch-h720x/vmalloc.h
deleted file mode 100644
index b4693cb821ef..000000000000
--- a/include/asm-arm/arch-h720x/vmalloc.h
+++ /dev/null
@@ -1,10 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-h720x/vmalloc.h
3 */
4
5#ifndef __ARCH_ARM_VMALLOC_H
6#define __ARCH_ARM_VMALLOC_H
7
8#define VMALLOC_END (PAGE_OFFSET + 0x10000000)
9
10#endif
diff --git a/include/asm-arm/arch-imx/debug-macro.S b/include/asm-arm/arch-imx/debug-macro.S
deleted file mode 100644
index c611871643a2..000000000000
--- a/include/asm-arm/arch-imx/debug-macro.S
+++ /dev/null
@@ -1,34 +0,0 @@
1/* linux/include/asm-arm/arch-imx/debug-macro.S
2 *
3 * Debugging macro include header
4 *
5 * Copyright (C) 1994-1999 Russell King
6 * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 *
12*/
13
14 .macro addruart,rx
15 mrc p15, 0, \rx, c1, c0
16 tst \rx, #1 @ MMU enabled?
17 moveq \rx, #0x00000000 @ physical
18 movne \rx, #0xe0000000 @ virtual
19 orreq \rx, \rx, #0x00200000 @ physical
20 orr \rx, \rx, #0x00006000 @ UART1 offset
21 .endm
22
23 .macro senduart,rd,rx
24 str \rd, [\rx, #0x40] @ TXDATA
25 .endm
26
27 .macro waituart,rd,rx
28 .endm
29
30 .macro busyuart,rd,rx
311002: ldr \rd, [\rx, #0x98] @ SR2
32 tst \rd, #1 << 3 @ TXDC
33 beq 1002b @ wait until transmit done
34 .endm
diff --git a/include/asm-arm/arch-imx/entry-macro.S b/include/asm-arm/arch-imx/entry-macro.S
deleted file mode 100644
index 0b84e81031c3..000000000000
--- a/include/asm-arm/arch-imx/entry-macro.S
+++ /dev/null
@@ -1,32 +0,0 @@
1/*
2 * include/asm-arm/arch-imx/entry-macro.S
3 *
4 * Low-level IRQ helper macros for iMX-based platforms
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10#include <asm/hardware.h>
11
12 .macro disable_fiq
13 .endm
14
15 .macro get_irqnr_preamble, base, tmp
16 .endm
17
18 .macro arch_ret_to_user, tmp1, tmp2
19 .endm
20
21#define AITC_NIVECSR 0x40
22 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
23 ldr \base, =IO_ADDRESS(IMX_AITC_BASE)
24 @ Load offset & priority of the highest priority
25 @ interrupt pending.
26 ldr \irqstat, [\base, #AITC_NIVECSR]
27 @ Shift off the priority leaving the offset or
28 @ "interrupt number", use arithmetic shift to
29 @ transform illegal source (0xffff) as -1
30 mov \irqnr, \irqstat, asr #16
31 adds \tmp, \irqnr, #1
32 .endm
diff --git a/include/asm-arm/arch-imx/gpio.h b/include/asm-arm/arch-imx/gpio.h
deleted file mode 100644
index 486023263f32..000000000000
--- a/include/asm-arm/arch-imx/gpio.h
+++ /dev/null
@@ -1,102 +0,0 @@
1#ifndef _IMX_GPIO_H
2
3#include <asm/arch/imx-regs.h>
4
5#define IMX_GPIO_ALLOC_MODE_NORMAL 0
6#define IMX_GPIO_ALLOC_MODE_NO_ALLOC 1
7#define IMX_GPIO_ALLOC_MODE_TRY_ALLOC 2
8#define IMX_GPIO_ALLOC_MODE_ALLOC_ONLY 4
9#define IMX_GPIO_ALLOC_MODE_RELEASE 8
10
11extern int imx_gpio_request(unsigned gpio, const char *label);
12
13extern void imx_gpio_free(unsigned gpio);
14
15extern int imx_gpio_setup_multiple_pins(const int *pin_list, unsigned count,
16 int alloc_mode, const char *label);
17
18extern int imx_gpio_direction_input(unsigned gpio);
19
20extern int imx_gpio_direction_output(unsigned gpio, int value);
21
22extern void __imx_gpio_set_value(unsigned gpio, int value);
23
24static inline int imx_gpio_get_value(unsigned gpio)
25{
26 return SSR(gpio >> GPIO_PORT_SHIFT) & (1 << (gpio & GPIO_PIN_MASK));
27}
28
29static inline void imx_gpio_set_value_inline(unsigned gpio, int value)
30{
31 unsigned long flags;
32
33 raw_local_irq_save(flags);
34 if(value)
35 DR(gpio >> GPIO_PORT_SHIFT) |= (1 << (gpio & GPIO_PIN_MASK));
36 else
37 DR(gpio >> GPIO_PORT_SHIFT) &= ~(1 << (gpio & GPIO_PIN_MASK));
38 raw_local_irq_restore(flags);
39}
40
41static inline void imx_gpio_set_value(unsigned gpio, int value)
42{
43 if(__builtin_constant_p(gpio))
44 imx_gpio_set_value_inline(gpio, value);
45 else
46 __imx_gpio_set_value(gpio, value);
47}
48
49extern int imx_gpio_to_irq(unsigned gpio);
50
51extern int imx_irq_to_gpio(unsigned irq);
52
53/*-------------------------------------------------------------------------*/
54
55/* Wrappers for "new style" GPIO calls. These calls i.MX specific versions
56 * to allow future extension of GPIO logic.
57 */
58
59static inline int gpio_request(unsigned gpio, const char *label)
60{
61 return imx_gpio_request(gpio, label);
62}
63
64static inline void gpio_free(unsigned gpio)
65{
66 imx_gpio_free(gpio);
67}
68
69static inline int gpio_direction_input(unsigned gpio)
70{
71 return imx_gpio_direction_input(gpio);
72}
73
74static inline int gpio_direction_output(unsigned gpio, int value)
75{
76 return imx_gpio_direction_output(gpio, value);
77}
78
79static inline int gpio_get_value(unsigned gpio)
80{
81 return imx_gpio_get_value(gpio);
82}
83
84static inline void gpio_set_value(unsigned gpio, int value)
85{
86 imx_gpio_set_value(gpio, value);
87}
88
89#include <asm-generic/gpio.h> /* cansleep wrappers */
90
91static inline int gpio_to_irq(unsigned gpio)
92{
93 return imx_gpio_to_irq(gpio);
94}
95
96static inline int irq_to_gpio(unsigned irq)
97{
98 return imx_irq_to_gpio(irq);
99}
100
101
102#endif
diff --git a/include/asm-arm/arch-imx/hardware.h b/include/asm-arm/arch-imx/hardware.h
deleted file mode 100644
index 6542ca5e8c33..000000000000
--- a/include/asm-arm/arch-imx/hardware.h
+++ /dev/null
@@ -1,91 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-imx/hardware.h
3 *
4 * Copyright (C) 1999 ARM Limited.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20#ifndef __ASM_ARCH_HARDWARE_H
21#define __ASM_ARCH_HARDWARE_H
22
23#include <asm/sizes.h>
24#include "imx-regs.h"
25
26#ifndef __ASSEMBLY__
27# define __REG(x) (*((volatile u32 *)IO_ADDRESS(x)))
28
29# define __REG2(x,y) (*(volatile u32 *)((u32)&__REG(x) + (y)))
30#endif
31
32/*
33 * Memory map
34 */
35
36#define IMX_IO_PHYS 0x00200000
37#define IMX_IO_SIZE 0x00100000
38#define IMX_IO_BASE 0xe0000000
39
40#define IMX_CS0_PHYS 0x10000000
41#define IMX_CS0_SIZE 0x02000000
42#define IMX_CS0_VIRT 0xe8000000
43
44#define IMX_CS1_PHYS 0x12000000
45#define IMX_CS1_SIZE 0x01000000
46#define IMX_CS1_VIRT 0xea000000
47
48#define IMX_CS2_PHYS 0x13000000
49#define IMX_CS2_SIZE 0x01000000
50#define IMX_CS2_VIRT 0xeb000000
51
52#define IMX_CS3_PHYS 0x14000000
53#define IMX_CS3_SIZE 0x01000000
54#define IMX_CS3_VIRT 0xec000000
55
56#define IMX_CS4_PHYS 0x15000000
57#define IMX_CS4_SIZE 0x01000000
58#define IMX_CS4_VIRT 0xed000000
59
60#define IMX_CS5_PHYS 0x16000000
61#define IMX_CS5_SIZE 0x01000000
62#define IMX_CS5_VIRT 0xee000000
63
64#define IMX_FB_VIRT 0xF1000000
65#define IMX_FB_SIZE (256*1024)
66
67/* macro to get at IO space when running virtually */
68#define IO_ADDRESS(x) ((x) | IMX_IO_BASE)
69
70#ifndef __ASSEMBLY__
71/*
72 * Handy routine to set GPIO functions
73 */
74extern void imx_gpio_mode( int gpio_mode );
75
76#endif
77
78#define MAXIRQNUM 62
79#define MAXFIQNUM 62
80#define MAXSWINUM 62
81
82/*
83 * Use SDRAM for memory
84 */
85#define MEM_SIZE 0x01000000
86
87#ifdef CONFIG_ARCH_MX1ADS
88#include "mx1ads.h"
89#endif
90
91#endif
diff --git a/include/asm-arm/arch-imx/io.h b/include/asm-arm/arch-imx/io.h
deleted file mode 100644
index b191cdd05576..000000000000
--- a/include/asm-arm/arch-imx/io.h
+++ /dev/null
@@ -1,30 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-imxads/io.h
3 *
4 * Copyright (C) 1999 ARM Limited
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20#ifndef __ASM_ARM_ARCH_IO_H
21#define __ASM_ARM_ARCH_IO_H
22
23#include <asm/hardware.h>
24
25#define IO_SPACE_LIMIT 0xffffffff
26
27#define __io(a) ((void __iomem *)(a))
28#define __mem_pci(a) (a)
29
30#endif
diff --git a/include/asm-arm/arch-imx/irqs.h b/include/asm-arm/arch-imx/irqs.h
deleted file mode 100644
index f195542898e0..000000000000
--- a/include/asm-arm/arch-imx/irqs.h
+++ /dev/null
@@ -1,116 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-imxads/irqs.h
3 *
4 * Copyright (C) 1999 ARM Limited
5 * Copyright (C) 2000 Deep Blue Solutions Ltd.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
21
22#ifndef __ARM_IRQS_H__
23#define __ARM_IRQS_H__
24
25/* Use the imx definitions */
26#include <asm/hardware.h>
27
28/*
29 * IMX Interrupt numbers
30 *
31 */
32#define INT_SOFTINT 0
33#define CSI_INT 6
34#define DSPA_MAC_INT 7
35#define DSPA_INT 8
36#define COMP_INT 9
37#define MSHC_XINT 10
38#define GPIO_INT_PORTA 11
39#define GPIO_INT_PORTB 12
40#define GPIO_INT_PORTC 13
41#define LCDC_INT 14
42#define SIM_INT 15
43#define SIM_DATA_INT 16
44#define RTC_INT 17
45#define RTC_SAMINT 18
46#define UART2_MINT_PFERR 19
47#define UART2_MINT_RTS 20
48#define UART2_MINT_DTR 21
49#define UART2_MINT_UARTC 22
50#define UART2_MINT_TX 23
51#define UART2_MINT_RX 24
52#define UART1_MINT_PFERR 25
53#define UART1_MINT_RTS 26
54#define UART1_MINT_DTR 27
55#define UART1_MINT_UARTC 28
56#define UART1_MINT_TX 29
57#define UART1_MINT_RX 30
58#define VOICE_DAC_INT 31
59#define VOICE_ADC_INT 32
60#define PEN_DATA_INT 33
61#define PWM_INT 34
62#define SDHC_INT 35
63#define I2C_INT 39
64#define CSPI_INT 41
65#define SSI_TX_INT 42
66#define SSI_TX_ERR_INT 43
67#define SSI_RX_INT 44
68#define SSI_RX_ERR_INT 45
69#define TOUCH_INT 46
70#define USBD_INT0 47
71#define USBD_INT1 48
72#define USBD_INT2 49
73#define USBD_INT3 50
74#define USBD_INT4 51
75#define USBD_INT5 52
76#define USBD_INT6 53
77#define BTSYS_INT 55
78#define BTTIM_INT 56
79#define BTWUI_INT 57
80#define TIM2_INT 58
81#define TIM1_INT 59
82#define DMA_ERR 60
83#define DMA_INT 61
84#define GPIO_INT_PORTD 62
85
86#define IMX_IRQS (64)
87
88/* note: the IMX has four gpio ports (A-D), but only
89 * the following pins are connected to the outside
90 * world:
91 *
92 * PORT A: bits 0-31
93 * PORT B: bits 8-31
94 * PORT C: bits 3-17
95 * PORT D: bits 6-31
96 *
97 * We map these interrupts straight on. As a result we have
98 * several holes in the interrupt mapping. We do this for two
99 * reasons:
100 * - mapping the interrupts without holes would get
101 * far more complicated
102 * - Motorola could well decide to bring some processor
103 * with more pins connected
104 */
105
106#define IRQ_GPIOA(x) (IMX_IRQS + x)
107#define IRQ_GPIOB(x) (IRQ_GPIOA(32) + x)
108#define IRQ_GPIOC(x) (IRQ_GPIOB(32) + x)
109#define IRQ_GPIOD(x) (IRQ_GPIOC(32) + x)
110
111/* decode irq number to use with IMR(x), ISR(x) and friends */
112#define IRQ_TO_REG(irq) ((irq - IMX_IRQS) >> 5)
113
114#define NR_IRQS (IRQ_GPIOD(32) + 1)
115#define IRQ_GPIO(x)
116#endif
diff --git a/include/asm-arm/arch-imx/memory.h b/include/asm-arm/arch-imx/memory.h
deleted file mode 100644
index 5ad90127915f..000000000000
--- a/include/asm-arm/arch-imx/memory.h
+++ /dev/null
@@ -1,36 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-imx/memory.h
3 *
4 * Copyright (C) 1999 ARM Limited
5 * Copyright (C) 2002 Shane Nay (shane@minirl.com)
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
21#ifndef __ASM_ARCH_MMU_H
22#define __ASM_ARCH_MMU_H
23
24#define PHYS_OFFSET UL(0x08000000)
25
26/*
27 * Virtual view <-> DMA view memory address translations
28 * virt_to_bus: Used to translate the virtual address to an
29 * address suitable to be passed to set_dma_addr
30 * bus_to_virt: Used to convert an address for DMA operations
31 * to an address that the kernel can use.
32 */
33#define __virt_to_bus(x) (x - PAGE_OFFSET + PHYS_OFFSET)
34#define __bus_to_virt(x) (x - PHYS_OFFSET + PAGE_OFFSET)
35
36#endif
diff --git a/include/asm-arm/arch-imx/mx1ads.h b/include/asm-arm/arch-imx/mx1ads.h
deleted file mode 100644
index d90fa4b49ce1..000000000000
--- a/include/asm-arm/arch-imx/mx1ads.h
+++ /dev/null
@@ -1,36 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-imx/mx1ads.h
3 *
4 * Copyright (C) 2004 Robert Schwebel, Pengutronix
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 *
20 */
21
22#ifndef __ASM_ARCH_MX1ADS_H
23#define __ASM_ARCH_MX1ADS_H
24
25/* ------------------------------------------------------------------------ */
26/* Memory Map for the M9328MX1ADS (MX1ADS) Board */
27/* ------------------------------------------------------------------------ */
28
29#define MX1ADS_FLASH_PHYS 0x10000000
30#define MX1ADS_FLASH_SIZE (16*1024*1024)
31
32#define IMX_FB_PHYS (0x0C000000 - 0x40000)
33
34#define CLK32 32000
35
36#endif /* __ASM_ARCH_MX1ADS_H */
diff --git a/include/asm-arm/arch-imx/spi_imx.h b/include/asm-arm/arch-imx/spi_imx.h
deleted file mode 100644
index 2165449e976e..000000000000
--- a/include/asm-arm/arch-imx/spi_imx.h
+++ /dev/null
@@ -1,72 +0,0 @@
1/*
2 * include/asm-arm/arch-imx/spi_imx.h
3 *
4 * Copyright (C) 2006 SWAPP
5 * Andrea Paterniani <a.paterniani@swapp-eng.it>
6 *
7 * Initial version inspired by:
8 * linux-2.6.17-rc3-mm1/include/asm-arm/arch-pxa/pxa2xx_spi.h
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23 */
24
25#ifndef SPI_IMX_H_
26#define SPI_IMX_H_
27
28
29/*-------------------------------------------------------------------------*/
30/**
31 * struct spi_imx_master - device.platform_data for SPI controller devices.
32 * @num_chipselect: chipselects are used to distinguish individual
33 * SPI slaves, and are numbered from zero to num_chipselects - 1.
34 * each slave has a chipselect signal, but it's common that not
35 * every chipselect is connected to a slave.
36 * @enable_dma: if true enables DMA driven transfers.
37*/
38struct spi_imx_master {
39 u8 num_chipselect;
40 u8 enable_dma:1;
41};
42/*-------------------------------------------------------------------------*/
43
44
45/*-------------------------------------------------------------------------*/
46/**
47 * struct spi_imx_chip - spi_board_info.controller_data for SPI
48 * slave devices, copied to spi_device.controller_data.
49 * @enable_loopback : used for test purpouse to internally connect RX and TX
50 * sections.
51 * @enable_dma : enables dma transfer (provided that controller driver has
52 * dma enabled too).
53 * @ins_ss_pulse : enable /SS pulse insertion between SPI burst.
54 * @bclk_wait : number of bclk waits between each bits_per_word SPI burst.
55 * @cs_control : function pointer to board-specific function to assert/deassert
56 * I/O port to control HW generation of devices chip-select.
57*/
58struct spi_imx_chip {
59 u8 enable_loopback:1;
60 u8 enable_dma:1;
61 u8 ins_ss_pulse:1;
62 u16 bclk_wait:15;
63 void (*cs_control)(u32 control);
64};
65
66/* Chip-select state */
67#define SPI_CS_ASSERT (1 << 0)
68#define SPI_CS_DEASSERT (1 << 1)
69/*-------------------------------------------------------------------------*/
70
71
72#endif /* SPI_IMX_H_*/
diff --git a/include/asm-arm/arch-imx/system.h b/include/asm-arm/arch-imx/system.h
deleted file mode 100644
index c645fe9afb9d..000000000000
--- a/include/asm-arm/arch-imx/system.h
+++ /dev/null
@@ -1,40 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-imxads/system.h
3 *
4 * Copyright (C) 1999 ARM Limited
5 * Copyright (C) 2000 Deep Blue Solutions Ltd
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
21#ifndef __ASM_ARCH_SYSTEM_H
22#define __ASM_ARCH_SYSTEM_H
23
24static void
25arch_idle(void)
26{
27 /*
28 * This should do all the clock switching
29 * and wait for interrupt tricks
30 */
31 cpu_do_idle();
32}
33
34static inline void
35arch_reset(char mode)
36{
37 cpu_reset(0);
38}
39
40#endif
diff --git a/include/asm-arm/arch-imx/uncompress.h b/include/asm-arm/arch-imx/uncompress.h
deleted file mode 100644
index da333f69136f..000000000000
--- a/include/asm-arm/arch-imx/uncompress.h
+++ /dev/null
@@ -1,71 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-imxads/uncompress.h
3 *
4 *
5 *
6 * Copyright (C) 1999 ARM Limited
7 * Copyright (C) Shane Nay (shane@minirl.com)
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 */
23
24#define UART(x) (*(volatile unsigned long *)(serial_port + (x)))
25
26#define UART1_BASE 0x206000
27#define UART2_BASE 0x207000
28#define USR2 0x98
29#define USR2_TXFE (1<<14)
30#define TXR 0x40
31#define UCR1 0x80
32#define UCR1_UARTEN 1
33
34/*
35 * The following code assumes the serial port has already been
36 * initialized by the bootloader. We search for the first enabled
37 * port in the most probable order. If you didn't setup a port in
38 * your bootloader then nothing will appear (which might be desired).
39 *
40 * This does not append a newline
41 */
42static void putc(int c)
43{
44 unsigned long serial_port;
45
46 do {
47 serial_port = UART1_BASE;
48 if ( UART(UCR1) & UCR1_UARTEN )
49 break;
50 serial_port = UART2_BASE;
51 if ( UART(UCR1) & UCR1_UARTEN )
52 break;
53 return;
54 } while(0);
55
56 while (!(UART(USR2) & USR2_TXFE))
57 barrier();
58
59 UART(TXR) = c;
60}
61
62static inline void flush(void)
63{
64}
65
66/*
67 * nothing to do
68 */
69#define arch_decomp_setup()
70
71#define arch_decomp_wdog()
diff --git a/include/asm-arm/arch-imx/vmalloc.h b/include/asm-arm/arch-imx/vmalloc.h
deleted file mode 100644
index cb6169127068..000000000000
--- a/include/asm-arm/arch-imx/vmalloc.h
+++ /dev/null
@@ -1,20 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-imx/vmalloc.h
3 *
4 * Copyright (C) 2000 Russell King.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20#define VMALLOC_END (PAGE_OFFSET + 0x10000000)
diff --git a/include/asm-arm/arch-integrator/debug-macro.S b/include/asm-arm/arch-integrator/debug-macro.S
deleted file mode 100644
index 85b327c352df..000000000000
--- a/include/asm-arm/arch-integrator/debug-macro.S
+++ /dev/null
@@ -1,22 +0,0 @@
1/* linux/include/asm-arm/arch-integrator/debug-macro.S
2 *
3 * Debugging macro include header
4 *
5 * Copyright (C) 1994-1999 Russell King
6 * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 *
12*/
13
14 .macro addruart,rx
15 mrc p15, 0, \rx, c1, c0
16 tst \rx, #1 @ MMU enabled?
17 moveq \rx, #0x16000000 @ physical base address
18 movne \rx, #0xf0000000 @ virtual base
19 addne \rx, \rx, #0x16000000 >> 4
20 .endm
21
22#include <asm/hardware/debug-pl01x.S>
diff --git a/include/asm-arm/arch-integrator/dma.h b/include/asm-arm/arch-integrator/dma.h
deleted file mode 100644
index 83fd6bbaf9d3..000000000000
--- a/include/asm-arm/arch-integrator/dma.h
+++ /dev/null
@@ -1,19 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-integrator/dma.h
3 *
4 * Copyright (C) 1997,1998 Russell King
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
diff --git a/include/asm-arm/arch-integrator/entry-macro.S b/include/asm-arm/arch-integrator/entry-macro.S
deleted file mode 100644
index 491af1a23de5..000000000000
--- a/include/asm-arm/arch-integrator/entry-macro.S
+++ /dev/null
@@ -1,44 +0,0 @@
1/*
2 * include/asm-arm/arch-integrator/entry-macro.S
3 *
4 * Low-level IRQ helper macros for Integrator platforms
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10#include <asm/hardware.h>
11#include <asm/arch/irqs.h>
12
13 .macro disable_fiq
14 .endm
15
16 .macro get_irqnr_preamble, base, tmp
17 .endm
18
19 .macro arch_ret_to_user, tmp1, tmp2
20 .endm
21
22 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
23/* FIXME: should not be using soo many LDRs here */
24 ldr \base, =IO_ADDRESS(INTEGRATOR_IC_BASE)
25 mov \irqnr, #IRQ_PIC_START
26 ldr \irqstat, [\base, #IRQ_STATUS] @ get masked status
27 ldr \base, =IO_ADDRESS(INTEGRATOR_HDR_BASE)
28 teq \irqstat, #0
29 ldreq \irqstat, [\base, #(INTEGRATOR_HDR_IC_OFFSET+IRQ_STATUS)]
30 moveq \irqnr, #IRQ_CIC_START
31
321001: tst \irqstat, #15
33 bne 1002f
34 add \irqnr, \irqnr, #4
35 movs \irqstat, \irqstat, lsr #4
36 bne 1001b
371002: tst \irqstat, #1
38 bne 1003f
39 add \irqnr, \irqnr, #1
40 movs \irqstat, \irqstat, lsr #1
41 bne 1002b
421003: /* EQ will be set if no irqs pending */
43 .endm
44
diff --git a/include/asm-arm/arch-integrator/hardware.h b/include/asm-arm/arch-integrator/hardware.h
deleted file mode 100644
index 6f0947bc500d..000000000000
--- a/include/asm-arm/arch-integrator/hardware.h
+++ /dev/null
@@ -1,48 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-integrator/hardware.h
3 *
4 * This file contains the hardware definitions of the Integrator.
5 *
6 * Copyright (C) 1999 ARM Limited.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 */
22#ifndef __ASM_ARCH_HARDWARE_H
23#define __ASM_ARCH_HARDWARE_H
24
25#include <asm/sizes.h>
26#include <asm/arch/platform.h>
27
28/*
29 * Where in virtual memory the IO devices (timers, system controllers
30 * and so on)
31 */
32#define IO_BASE 0xF0000000 // VA of IO
33#define IO_SIZE 0x0B000000 // How much?
34#define IO_START INTEGRATOR_HDR_BASE // PA of IO
35
36#define PCIO_BASE PCI_IO_VADDR
37#define PCIMEM_BASE PCI_MEMORY_VADDR
38
39/* macro to get at IO space when running virtually */
40#define IO_ADDRESS(x) (((x) >> 4) + IO_BASE)
41
42#define pcibios_assign_all_busses() 1
43
44#define PCIBIOS_MIN_IO 0x6000
45#define PCIBIOS_MIN_MEM 0x00100000
46
47#endif
48
diff --git a/include/asm-arm/arch-integrator/io.h b/include/asm-arm/arch-integrator/io.h
deleted file mode 100644
index c8f2175948bd..000000000000
--- a/include/asm-arm/arch-integrator/io.h
+++ /dev/null
@@ -1,36 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-integrator/io.h
3 *
4 * Copyright (C) 1999 ARM Limited
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20#ifndef __ASM_ARM_ARCH_IO_H
21#define __ASM_ARM_ARCH_IO_H
22
23#define IO_SPACE_LIMIT 0xffff
24
25/*
26 * WARNING: this has to mirror definitions in platform.h
27 */
28#define PCI_MEMORY_VADDR 0xe8000000
29#define PCI_CONFIG_VADDR 0xec000000
30#define PCI_V3_VADDR 0xed000000
31#define PCI_IO_VADDR 0xee000000
32
33#define __io(a) ((void __iomem *)(PCI_IO_VADDR + (a)))
34#define __mem_pci(a) (a)
35
36#endif
diff --git a/include/asm-arm/arch-integrator/irqs.h b/include/asm-arm/arch-integrator/irqs.h
deleted file mode 100644
index ba7b3afee445..000000000000
--- a/include/asm-arm/arch-integrator/irqs.h
+++ /dev/null
@@ -1,82 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-integrator/irqs.h
3 *
4 * Copyright (C) 1999 ARM Limited
5 * Copyright (C) 2000 Deep Blue Solutions Ltd.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
21
22/*
23 * Interrupt numbers
24 */
25#define IRQ_PIC_START 0
26#define IRQ_SOFTINT 0
27#define IRQ_UARTINT0 1
28#define IRQ_UARTINT1 2
29#define IRQ_KMIINT0 3
30#define IRQ_KMIINT1 4
31#define IRQ_TIMERINT0 5
32#define IRQ_TIMERINT1 6
33#define IRQ_TIMERINT2 7
34#define IRQ_RTCINT 8
35#define IRQ_AP_EXPINT0 9
36#define IRQ_AP_EXPINT1 10
37#define IRQ_AP_EXPINT2 11
38#define IRQ_AP_EXPINT3 12
39#define IRQ_AP_PCIINT0 13
40#define IRQ_AP_PCIINT1 14
41#define IRQ_AP_PCIINT2 15
42#define IRQ_AP_PCIINT3 16
43#define IRQ_AP_V3INT 17
44#define IRQ_AP_CPINT0 18
45#define IRQ_AP_CPINT1 19
46#define IRQ_AP_LBUSTIMEOUT 20
47#define IRQ_AP_APCINT 21
48#define IRQ_CP_CLCDCINT 22
49#define IRQ_CP_MMCIINT0 23
50#define IRQ_CP_MMCIINT1 24
51#define IRQ_CP_AACIINT 25
52#define IRQ_CP_CPPLDINT 26
53#define IRQ_CP_ETHINT 27
54#define IRQ_CP_TSPENINT 28
55#define IRQ_PIC_END 31
56
57#define IRQ_CIC_START 32
58#define IRQ_CM_SOFTINT 32
59#define IRQ_CM_COMMRX 33
60#define IRQ_CM_COMMTX 34
61#define IRQ_CIC_END 34
62
63/*
64 * IntegratorCP only
65 */
66#define IRQ_SIC_START 35
67#define IRQ_SIC_CP_SOFTINT 35
68#define IRQ_SIC_CP_RI0 36
69#define IRQ_SIC_CP_RI1 37
70#define IRQ_SIC_CP_CARDIN 38
71#define IRQ_SIC_CP_LMINT0 39
72#define IRQ_SIC_CP_LMINT1 40
73#define IRQ_SIC_CP_LMINT2 41
74#define IRQ_SIC_CP_LMINT3 42
75#define IRQ_SIC_CP_LMINT4 43
76#define IRQ_SIC_CP_LMINT5 44
77#define IRQ_SIC_CP_LMINT6 45
78#define IRQ_SIC_CP_LMINT7 46
79#define IRQ_SIC_END 46
80
81#define NR_IRQS 47
82
diff --git a/include/asm-arm/arch-integrator/memory.h b/include/asm-arm/arch-integrator/memory.h
deleted file mode 100644
index 1ab56d783e7c..000000000000
--- a/include/asm-arm/arch-integrator/memory.h
+++ /dev/null
@@ -1,39 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-integrator/memory.h
3 *
4 * Copyright (C) 1999 ARM Limited
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20#ifndef __ASM_ARCH_MEMORY_H
21#define __ASM_ARCH_MEMORY_H
22
23/*
24 * Physical DRAM offset.
25 */
26#define PHYS_OFFSET UL(0x00000000)
27#define BUS_OFFSET UL(0x80000000)
28
29/*
30 * Virtual view <-> DMA view memory address translations
31 * virt_to_bus: Used to translate the virtual address to an
32 * address suitable to be passed to set_dma_addr
33 * bus_to_virt: Used to convert an address for DMA operations
34 * to an address that the kernel can use.
35 */
36#define __virt_to_bus(x) (x - PAGE_OFFSET + BUS_OFFSET)
37#define __bus_to_virt(x) (x - BUS_OFFSET + PAGE_OFFSET)
38
39#endif
diff --git a/include/asm-arm/arch-integrator/system.h b/include/asm-arm/arch-integrator/system.h
deleted file mode 100644
index 8ea442237d20..000000000000
--- a/include/asm-arm/arch-integrator/system.h
+++ /dev/null
@@ -1,44 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-integrator/system.h
3 *
4 * Copyright (C) 1999 ARM Limited
5 * Copyright (C) 2000 Deep Blue Solutions Ltd
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
21#ifndef __ASM_ARCH_SYSTEM_H
22#define __ASM_ARCH_SYSTEM_H
23
24#include <asm/arch/cm.h>
25
26static inline void arch_idle(void)
27{
28 /*
29 * This should do all the clock switching
30 * and wait for interrupt tricks
31 */
32 cpu_do_idle();
33}
34
35static inline void arch_reset(char mode)
36{
37 /*
38 * To reset, we hit the on-board reset register
39 * in the system FPGA
40 */
41 cm_control(CM_CTRL_RESET, CM_CTRL_RESET);
42}
43
44#endif
diff --git a/include/asm-arm/arch-integrator/timex.h b/include/asm-arm/arch-integrator/timex.h
deleted file mode 100644
index 87a762818ba2..000000000000
--- a/include/asm-arm/arch-integrator/timex.h
+++ /dev/null
@@ -1,26 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-integrator/timex.h
3 *
4 * Integrator architecture timex specifications
5 *
6 * Copyright (C) 1999 ARM Limited
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 */
22
23/*
24 * ??
25 */
26#define CLOCK_TICK_RATE (50000000 / 16)
diff --git a/include/asm-arm/arch-integrator/uncompress.h b/include/asm-arm/arch-integrator/uncompress.h
deleted file mode 100644
index f61825c4d901..000000000000
--- a/include/asm-arm/arch-integrator/uncompress.h
+++ /dev/null
@@ -1,50 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-integrator/uncompress.h
3 *
4 * Copyright (C) 1999 ARM Limited
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20
21#define AMBA_UART_DR (*(volatile unsigned char *)0x16000000)
22#define AMBA_UART_LCRH (*(volatile unsigned char *)0x16000008)
23#define AMBA_UART_LCRM (*(volatile unsigned char *)0x1600000c)
24#define AMBA_UART_LCRL (*(volatile unsigned char *)0x16000010)
25#define AMBA_UART_CR (*(volatile unsigned char *)0x16000014)
26#define AMBA_UART_FR (*(volatile unsigned char *)0x16000018)
27
28/*
29 * This does not append a newline
30 */
31static void putc(int c)
32{
33 while (AMBA_UART_FR & (1 << 5))
34 barrier();
35
36 AMBA_UART_DR = c;
37}
38
39static inline void flush(void)
40{
41 while (AMBA_UART_FR & (1 << 3))
42 barrier();
43}
44
45/*
46 * nothing to do
47 */
48#define arch_decomp_setup()
49
50#define arch_decomp_wdog()
diff --git a/include/asm-arm/arch-integrator/vmalloc.h b/include/asm-arm/arch-integrator/vmalloc.h
deleted file mode 100644
index 170cccece523..000000000000
--- a/include/asm-arm/arch-integrator/vmalloc.h
+++ /dev/null
@@ -1,20 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-integrator/vmalloc.h
3 *
4 * Copyright (C) 2000 Russell King.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20#define VMALLOC_END (PAGE_OFFSET + 0x10000000)
diff --git a/include/asm-arm/arch-iop13xx/adma.h b/include/asm-arm/arch-iop13xx/adma.h
deleted file mode 100644
index ef4f5da2029f..000000000000
--- a/include/asm-arm/arch-iop13xx/adma.h
+++ /dev/null
@@ -1,537 +0,0 @@
1/*
2 * Copyright(c) 2006, Intel Corporation.
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms and conditions of the GNU General Public License,
6 * version 2, as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
11 * more details.
12 *
13 * You should have received a copy of the GNU General Public License along with
14 * this program; if not, write to the Free Software Foundation, Inc.,
15 * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
16 *
17 */
18#ifndef _ADMA_H
19#define _ADMA_H
20#include <linux/types.h>
21#include <linux/io.h>
22#include <asm/hardware.h>
23#include <asm/hardware/iop_adma.h>
24
25#define ADMA_ACCR(chan) (chan->mmr_base + 0x0)
26#define ADMA_ACSR(chan) (chan->mmr_base + 0x4)
27#define ADMA_ADAR(chan) (chan->mmr_base + 0x8)
28#define ADMA_IIPCR(chan) (chan->mmr_base + 0x18)
29#define ADMA_IIPAR(chan) (chan->mmr_base + 0x1c)
30#define ADMA_IIPUAR(chan) (chan->mmr_base + 0x20)
31#define ADMA_ANDAR(chan) (chan->mmr_base + 0x24)
32#define ADMA_ADCR(chan) (chan->mmr_base + 0x28)
33#define ADMA_CARMD(chan) (chan->mmr_base + 0x2c)
34#define ADMA_ABCR(chan) (chan->mmr_base + 0x30)
35#define ADMA_DLADR(chan) (chan->mmr_base + 0x34)
36#define ADMA_DUADR(chan) (chan->mmr_base + 0x38)
37#define ADMA_SLAR(src, chan) (chan->mmr_base + (0x3c + (src << 3)))
38#define ADMA_SUAR(src, chan) (chan->mmr_base + (0x40 + (src << 3)))
39
40struct iop13xx_adma_src {
41 u32 src_addr;
42 union {
43 u32 upper_src_addr;
44 struct {
45 unsigned int pq_upper_src_addr:24;
46 unsigned int pq_dmlt:8;
47 };
48 };
49};
50
51struct iop13xx_adma_desc_ctrl {
52 unsigned int int_en:1;
53 unsigned int xfer_dir:2;
54 unsigned int src_select:4;
55 unsigned int zero_result:1;
56 unsigned int block_fill_en:1;
57 unsigned int crc_gen_en:1;
58 unsigned int crc_xfer_dis:1;
59 unsigned int crc_seed_fetch_dis:1;
60 unsigned int status_write_back_en:1;
61 unsigned int endian_swap_en:1;
62 unsigned int reserved0:2;
63 unsigned int pq_update_xfer_en:1;
64 unsigned int dual_xor_en:1;
65 unsigned int pq_xfer_en:1;
66 unsigned int p_xfer_dis:1;
67 unsigned int reserved1:10;
68 unsigned int relax_order_en:1;
69 unsigned int no_snoop_en:1;
70};
71
72struct iop13xx_adma_byte_count {
73 unsigned int byte_count:24;
74 unsigned int host_if:3;
75 unsigned int reserved:2;
76 unsigned int zero_result_err_q:1;
77 unsigned int zero_result_err:1;
78 unsigned int tx_complete:1;
79};
80
81struct iop13xx_adma_desc_hw {
82 u32 next_desc;
83 union {
84 u32 desc_ctrl;
85 struct iop13xx_adma_desc_ctrl desc_ctrl_field;
86 };
87 union {
88 u32 crc_addr;
89 u32 block_fill_data;
90 u32 q_dest_addr;
91 };
92 union {
93 u32 byte_count;
94 struct iop13xx_adma_byte_count byte_count_field;
95 };
96 union {
97 u32 dest_addr;
98 u32 p_dest_addr;
99 };
100 union {
101 u32 upper_dest_addr;
102 u32 pq_upper_dest_addr;
103 };
104 struct iop13xx_adma_src src[1];
105};
106
107struct iop13xx_adma_desc_dual_xor {
108 u32 next_desc;
109 u32 desc_ctrl;
110 u32 reserved;
111 u32 byte_count;
112 u32 h_dest_addr;
113 u32 h_upper_dest_addr;
114 u32 src0_addr;
115 u32 upper_src0_addr;
116 u32 src1_addr;
117 u32 upper_src1_addr;
118 u32 h_src_addr;
119 u32 h_upper_src_addr;
120 u32 d_src_addr;
121 u32 d_upper_src_addr;
122 u32 d_dest_addr;
123 u32 d_upper_dest_addr;
124};
125
126struct iop13xx_adma_desc_pq_update {
127 u32 next_desc;
128 u32 desc_ctrl;
129 u32 reserved;
130 u32 byte_count;
131 u32 p_dest_addr;
132 u32 p_upper_dest_addr;
133 u32 src0_addr;
134 u32 upper_src0_addr;
135 u32 src1_addr;
136 u32 upper_src1_addr;
137 u32 p_src_addr;
138 u32 p_upper_src_addr;
139 u32 q_src_addr;
140 struct {
141 unsigned int q_upper_src_addr:24;
142 unsigned int q_dmlt:8;
143 };
144 u32 q_dest_addr;
145 u32 q_upper_dest_addr;
146};
147
148static inline int iop_adma_get_max_xor(void)
149{
150 return 16;
151}
152
153static inline u32 iop_chan_get_current_descriptor(struct iop_adma_chan *chan)
154{
155 return __raw_readl(ADMA_ADAR(chan));
156}
157
158static inline void iop_chan_set_next_descriptor(struct iop_adma_chan *chan,
159 u32 next_desc_addr)
160{
161 __raw_writel(next_desc_addr, ADMA_ANDAR(chan));
162}
163
164#define ADMA_STATUS_BUSY (1 << 13)
165
166static inline char iop_chan_is_busy(struct iop_adma_chan *chan)
167{
168 if (__raw_readl(ADMA_ACSR(chan)) &
169 ADMA_STATUS_BUSY)
170 return 1;
171 else
172 return 0;
173}
174
175static inline int
176iop_chan_get_desc_align(struct iop_adma_chan *chan, int num_slots)
177{
178 return 1;
179}
180#define iop_desc_is_aligned(x, y) 1
181
182static inline int
183iop_chan_memcpy_slot_count(size_t len, int *slots_per_op)
184{
185 *slots_per_op = 1;
186 return 1;
187}
188
189#define iop_chan_interrupt_slot_count(s, c) iop_chan_memcpy_slot_count(0, s)
190
191static inline int
192iop_chan_memset_slot_count(size_t len, int *slots_per_op)
193{
194 *slots_per_op = 1;
195 return 1;
196}
197
198static inline int
199iop_chan_xor_slot_count(size_t len, int src_cnt, int *slots_per_op)
200{
201 static const char slot_count_table[] = { 1, 2, 2, 2,
202 2, 3, 3, 3,
203 3, 4, 4, 4,
204 4, 5, 5, 5,
205 };
206 *slots_per_op = slot_count_table[src_cnt - 1];
207 return *slots_per_op;
208}
209
210#define ADMA_MAX_BYTE_COUNT (16 * 1024 * 1024)
211#define IOP_ADMA_MAX_BYTE_COUNT ADMA_MAX_BYTE_COUNT
212#define IOP_ADMA_ZERO_SUM_MAX_BYTE_COUNT ADMA_MAX_BYTE_COUNT
213#define IOP_ADMA_XOR_MAX_BYTE_COUNT ADMA_MAX_BYTE_COUNT
214#define iop_chan_zero_sum_slot_count(l, s, o) iop_chan_xor_slot_count(l, s, o)
215
216static inline u32 iop_desc_get_dest_addr(struct iop_adma_desc_slot *desc,
217 struct iop_adma_chan *chan)
218{
219 struct iop13xx_adma_desc_hw *hw_desc = desc->hw_desc;
220 return hw_desc->dest_addr;
221}
222
223static inline u32 iop_desc_get_byte_count(struct iop_adma_desc_slot *desc,
224 struct iop_adma_chan *chan)
225{
226 struct iop13xx_adma_desc_hw *hw_desc = desc->hw_desc;
227 return hw_desc->byte_count_field.byte_count;
228}
229
230static inline u32 iop_desc_get_src_addr(struct iop_adma_desc_slot *desc,
231 struct iop_adma_chan *chan,
232 int src_idx)
233{
234 struct iop13xx_adma_desc_hw *hw_desc = desc->hw_desc;
235 return hw_desc->src[src_idx].src_addr;
236}
237
238static inline u32 iop_desc_get_src_count(struct iop_adma_desc_slot *desc,
239 struct iop_adma_chan *chan)
240{
241 struct iop13xx_adma_desc_hw *hw_desc = desc->hw_desc;
242 return hw_desc->desc_ctrl_field.src_select + 1;
243}
244
245static inline void
246iop_desc_init_memcpy(struct iop_adma_desc_slot *desc, unsigned long flags)
247{
248 struct iop13xx_adma_desc_hw *hw_desc = desc->hw_desc;
249 union {
250 u32 value;
251 struct iop13xx_adma_desc_ctrl field;
252 } u_desc_ctrl;
253
254 u_desc_ctrl.value = 0;
255 u_desc_ctrl.field.xfer_dir = 3; /* local to internal bus */
256 u_desc_ctrl.field.int_en = flags & DMA_PREP_INTERRUPT;
257 hw_desc->desc_ctrl = u_desc_ctrl.value;
258 hw_desc->crc_addr = 0;
259}
260
261static inline void
262iop_desc_init_memset(struct iop_adma_desc_slot *desc, unsigned long flags)
263{
264 struct iop13xx_adma_desc_hw *hw_desc = desc->hw_desc;
265 union {
266 u32 value;
267 struct iop13xx_adma_desc_ctrl field;
268 } u_desc_ctrl;
269
270 u_desc_ctrl.value = 0;
271 u_desc_ctrl.field.xfer_dir = 3; /* local to internal bus */
272 u_desc_ctrl.field.block_fill_en = 1;
273 u_desc_ctrl.field.int_en = flags & DMA_PREP_INTERRUPT;
274 hw_desc->desc_ctrl = u_desc_ctrl.value;
275 hw_desc->crc_addr = 0;
276}
277
278/* to do: support buffers larger than ADMA_MAX_BYTE_COUNT */
279static inline void
280iop_desc_init_xor(struct iop_adma_desc_slot *desc, int src_cnt,
281 unsigned long flags)
282{
283 struct iop13xx_adma_desc_hw *hw_desc = desc->hw_desc;
284 union {
285 u32 value;
286 struct iop13xx_adma_desc_ctrl field;
287 } u_desc_ctrl;
288
289 u_desc_ctrl.value = 0;
290 u_desc_ctrl.field.src_select = src_cnt - 1;
291 u_desc_ctrl.field.xfer_dir = 3; /* local to internal bus */
292 u_desc_ctrl.field.int_en = flags & DMA_PREP_INTERRUPT;
293 hw_desc->desc_ctrl = u_desc_ctrl.value;
294 hw_desc->crc_addr = 0;
295
296}
297#define iop_desc_init_null_xor(d, s, i) iop_desc_init_xor(d, s, i)
298
299/* to do: support buffers larger than ADMA_MAX_BYTE_COUNT */
300static inline int
301iop_desc_init_zero_sum(struct iop_adma_desc_slot *desc, int src_cnt,
302 unsigned long flags)
303{
304 struct iop13xx_adma_desc_hw *hw_desc = desc->hw_desc;
305 union {
306 u32 value;
307 struct iop13xx_adma_desc_ctrl field;
308 } u_desc_ctrl;
309
310 u_desc_ctrl.value = 0;
311 u_desc_ctrl.field.src_select = src_cnt - 1;
312 u_desc_ctrl.field.xfer_dir = 3; /* local to internal bus */
313 u_desc_ctrl.field.zero_result = 1;
314 u_desc_ctrl.field.status_write_back_en = 1;
315 u_desc_ctrl.field.int_en = flags & DMA_PREP_INTERRUPT;
316 hw_desc->desc_ctrl = u_desc_ctrl.value;
317 hw_desc->crc_addr = 0;
318
319 return 1;
320}
321
322static inline void iop_desc_set_byte_count(struct iop_adma_desc_slot *desc,
323 struct iop_adma_chan *chan,
324 u32 byte_count)
325{
326 struct iop13xx_adma_desc_hw *hw_desc = desc->hw_desc;
327 hw_desc->byte_count = byte_count;
328}
329
330static inline void
331iop_desc_set_zero_sum_byte_count(struct iop_adma_desc_slot *desc, u32 len)
332{
333 int slots_per_op = desc->slots_per_op;
334 struct iop13xx_adma_desc_hw *hw_desc = desc->hw_desc, *iter;
335 int i = 0;
336
337 if (len <= IOP_ADMA_ZERO_SUM_MAX_BYTE_COUNT) {
338 hw_desc->byte_count = len;
339 } else {
340 do {
341 iter = iop_hw_desc_slot_idx(hw_desc, i);
342 iter->byte_count = IOP_ADMA_ZERO_SUM_MAX_BYTE_COUNT;
343 len -= IOP_ADMA_ZERO_SUM_MAX_BYTE_COUNT;
344 i += slots_per_op;
345 } while (len > IOP_ADMA_ZERO_SUM_MAX_BYTE_COUNT);
346
347 if (len) {
348 iter = iop_hw_desc_slot_idx(hw_desc, i);
349 iter->byte_count = len;
350 }
351 }
352}
353
354
355static inline void iop_desc_set_dest_addr(struct iop_adma_desc_slot *desc,
356 struct iop_adma_chan *chan,
357 dma_addr_t addr)
358{
359 struct iop13xx_adma_desc_hw *hw_desc = desc->hw_desc;
360 hw_desc->dest_addr = addr;
361 hw_desc->upper_dest_addr = 0;
362}
363
364static inline void iop_desc_set_memcpy_src_addr(struct iop_adma_desc_slot *desc,
365 dma_addr_t addr)
366{
367 struct iop13xx_adma_desc_hw *hw_desc = desc->hw_desc;
368 hw_desc->src[0].src_addr = addr;
369 hw_desc->src[0].upper_src_addr = 0;
370}
371
372static inline void iop_desc_set_xor_src_addr(struct iop_adma_desc_slot *desc,
373 int src_idx, dma_addr_t addr)
374{
375 int slot_cnt = desc->slot_cnt, slots_per_op = desc->slots_per_op;
376 struct iop13xx_adma_desc_hw *hw_desc = desc->hw_desc, *iter;
377 int i = 0;
378
379 do {
380 iter = iop_hw_desc_slot_idx(hw_desc, i);
381 iter->src[src_idx].src_addr = addr;
382 iter->src[src_idx].upper_src_addr = 0;
383 slot_cnt -= slots_per_op;
384 if (slot_cnt) {
385 i += slots_per_op;
386 addr += IOP_ADMA_XOR_MAX_BYTE_COUNT;
387 }
388 } while (slot_cnt);
389}
390
391static inline void
392iop_desc_init_interrupt(struct iop_adma_desc_slot *desc,
393 struct iop_adma_chan *chan)
394{
395 iop_desc_init_memcpy(desc, 1);
396 iop_desc_set_byte_count(desc, chan, 0);
397 iop_desc_set_dest_addr(desc, chan, 0);
398 iop_desc_set_memcpy_src_addr(desc, 0);
399}
400
401#define iop_desc_set_zero_sum_src_addr iop_desc_set_xor_src_addr
402
403static inline void iop_desc_set_next_desc(struct iop_adma_desc_slot *desc,
404 u32 next_desc_addr)
405{
406 struct iop13xx_adma_desc_hw *hw_desc = desc->hw_desc;
407 BUG_ON(hw_desc->next_desc);
408 hw_desc->next_desc = next_desc_addr;
409}
410
411static inline u32 iop_desc_get_next_desc(struct iop_adma_desc_slot *desc)
412{
413 struct iop13xx_adma_desc_hw *hw_desc = desc->hw_desc;
414 return hw_desc->next_desc;
415}
416
417static inline void iop_desc_clear_next_desc(struct iop_adma_desc_slot *desc)
418{
419 struct iop13xx_adma_desc_hw *hw_desc = desc->hw_desc;
420 hw_desc->next_desc = 0;
421}
422
423static inline void iop_desc_set_block_fill_val(struct iop_adma_desc_slot *desc,
424 u32 val)
425{
426 struct iop13xx_adma_desc_hw *hw_desc = desc->hw_desc;
427 hw_desc->block_fill_data = val;
428}
429
430static inline int iop_desc_get_zero_result(struct iop_adma_desc_slot *desc)
431{
432 struct iop13xx_adma_desc_hw *hw_desc = desc->hw_desc;
433 struct iop13xx_adma_desc_ctrl desc_ctrl = hw_desc->desc_ctrl_field;
434 struct iop13xx_adma_byte_count byte_count = hw_desc->byte_count_field;
435
436 BUG_ON(!(byte_count.tx_complete && desc_ctrl.zero_result));
437
438 if (desc_ctrl.pq_xfer_en)
439 return byte_count.zero_result_err_q;
440 else
441 return byte_count.zero_result_err;
442}
443
444static inline void iop_chan_append(struct iop_adma_chan *chan)
445{
446 u32 adma_accr;
447
448 adma_accr = __raw_readl(ADMA_ACCR(chan));
449 adma_accr |= 0x2;
450 __raw_writel(adma_accr, ADMA_ACCR(chan));
451}
452
453static inline u32 iop_chan_get_status(struct iop_adma_chan *chan)
454{
455 return __raw_readl(ADMA_ACSR(chan));
456}
457
458static inline void iop_chan_disable(struct iop_adma_chan *chan)
459{
460 u32 adma_chan_ctrl = __raw_readl(ADMA_ACCR(chan));
461 adma_chan_ctrl &= ~0x1;
462 __raw_writel(adma_chan_ctrl, ADMA_ACCR(chan));
463}
464
465static inline void iop_chan_enable(struct iop_adma_chan *chan)
466{
467 u32 adma_chan_ctrl;
468
469 adma_chan_ctrl = __raw_readl(ADMA_ACCR(chan));
470 adma_chan_ctrl |= 0x1;
471 __raw_writel(adma_chan_ctrl, ADMA_ACCR(chan));
472}
473
474static inline void iop_adma_device_clear_eot_status(struct iop_adma_chan *chan)
475{
476 u32 status = __raw_readl(ADMA_ACSR(chan));
477 status &= (1 << 12);
478 __raw_writel(status, ADMA_ACSR(chan));
479}
480
481static inline void iop_adma_device_clear_eoc_status(struct iop_adma_chan *chan)
482{
483 u32 status = __raw_readl(ADMA_ACSR(chan));
484 status &= (1 << 11);
485 __raw_writel(status, ADMA_ACSR(chan));
486}
487
488static inline void iop_adma_device_clear_err_status(struct iop_adma_chan *chan)
489{
490 u32 status = __raw_readl(ADMA_ACSR(chan));
491 status &= (1 << 9) | (1 << 5) | (1 << 4) | (1 << 3);
492 __raw_writel(status, ADMA_ACSR(chan));
493}
494
495static inline int
496iop_is_err_int_parity(unsigned long status, struct iop_adma_chan *chan)
497{
498 return test_bit(9, &status);
499}
500
501static inline int
502iop_is_err_mcu_abort(unsigned long status, struct iop_adma_chan *chan)
503{
504 return test_bit(5, &status);
505}
506
507static inline int
508iop_is_err_int_tabort(unsigned long status, struct iop_adma_chan *chan)
509{
510 return test_bit(4, &status);
511}
512
513static inline int
514iop_is_err_int_mabort(unsigned long status, struct iop_adma_chan *chan)
515{
516 return test_bit(3, &status);
517}
518
519static inline int
520iop_is_err_pci_tabort(unsigned long status, struct iop_adma_chan *chan)
521{
522 return 0;
523}
524
525static inline int
526iop_is_err_pci_mabort(unsigned long status, struct iop_adma_chan *chan)
527{
528 return 0;
529}
530
531static inline int
532iop_is_err_split_tx(unsigned long status, struct iop_adma_chan *chan)
533{
534 return 0;
535}
536
537#endif /* _ADMA_H */
diff --git a/include/asm-arm/arch-iop13xx/debug-macro.S b/include/asm-arm/arch-iop13xx/debug-macro.S
deleted file mode 100644
index 788b4e386c16..000000000000
--- a/include/asm-arm/arch-iop13xx/debug-macro.S
+++ /dev/null
@@ -1,26 +0,0 @@
1/*
2 * include/asm-arm/arch-iop13xx/debug-macro.S
3 *
4 * Debugging macro include header
5 *
6 * Copyright (C) 1994-1999 Russell King
7 * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12 */
13
14 .macro addruart, rx
15 mrc p15, 0, \rx, c1, c0
16 tst \rx, #1 @ mmu enabled?
17 moveq \rx, #0xff000000 @ physical
18 orreq \rx, \rx, #0x00d80000
19 movne \rx, #0xfe000000 @ virtual
20 orrne \rx, \rx, #0x00e80000
21 orr \rx, \rx, #0x00002300
22 orr \rx, \rx, #0x00000040
23 .endm
24
25#define UART_SHIFT 2
26#include <asm/hardware/debug-8250.S>
diff --git a/include/asm-arm/arch-iop13xx/memory.h b/include/asm-arm/arch-iop13xx/memory.h
deleted file mode 100644
index 031a0fa78eff..000000000000
--- a/include/asm-arm/arch-iop13xx/memory.h
+++ /dev/null
@@ -1,64 +0,0 @@
1#ifndef __ASM_ARCH_MEMORY_H
2#define __ASM_ARCH_MEMORY_H
3
4#include <asm/arch/hardware.h>
5
6/*
7 * Physical DRAM offset.
8 */
9#define PHYS_OFFSET UL(0x00000000)
10#define TASK_SIZE UL(0x3f000000)
11#define PAGE_OFFSET UL(0x40000000)
12#define TASK_UNMAPPED_BASE ((TASK_SIZE + 0x01000000) / 3)
13
14#ifndef __ASSEMBLY__
15
16#if defined(CONFIG_ARCH_IOP13XX)
17#define IOP13XX_PMMR_V_START (IOP13XX_PMMR_VIRT_MEM_BASE)
18#define IOP13XX_PMMR_V_END (IOP13XX_PMMR_VIRT_MEM_BASE + IOP13XX_PMMR_SIZE)
19#define IOP13XX_PMMR_P_START (IOP13XX_PMMR_PHYS_MEM_BASE)
20#define IOP13XX_PMMR_P_END (IOP13XX_PMMR_PHYS_MEM_BASE + IOP13XX_PMMR_SIZE)
21
22/*
23 * Virtual view <-> PCI DMA view memory address translations
24 * virt_to_bus: Used to translate the virtual address to an
25 * address suitable to be passed to set_dma_addr
26 * bus_to_virt: Used to convert an address for DMA operations
27 * to an address that the kernel can use.
28 */
29
30/* RAM has 1:1 mapping on the PCIe/x Busses */
31#define __virt_to_bus(x) (__virt_to_phys(x))
32#define __bus_to_virt(x) (__phys_to_virt(x))
33
34#define virt_to_lbus(x) \
35(( ((void*)(x) >= (void*)IOP13XX_PMMR_V_START) && \
36((void*)(x) < (void*)IOP13XX_PMMR_V_END) ) ? \
37((x) - IOP13XX_PMMR_VIRT_MEM_BASE + IOP13XX_PMMR_PHYS_MEM_BASE) : \
38((x) - PAGE_OFFSET + PHYS_OFFSET))
39
40#define lbus_to_virt(x) \
41(( ((x) >= IOP13XX_PMMR_P_START) && ((x) < IOP13XX_PMMR_P_END) ) ? \
42((x) - IOP13XX_PMMR_PHYS_MEM_BASE + IOP13XX_PMMR_VIRT_MEM_BASE ) : \
43((x) - PHYS_OFFSET + PAGE_OFFSET))
44
45/* Device is an lbus device if it is on the platform bus of the IOP13XX */
46#define is_lbus_device(dev) (dev &&\
47 (strncmp(dev->bus->name, "platform", 8) == 0))
48
49#define __arch_page_to_dma(dev, page) \
50({is_lbus_device(dev) ? (dma_addr_t)virt_to_lbus(page_address(page)) : \
51(dma_addr_t)__virt_to_bus(page_address(page));})
52
53#define __arch_dma_to_virt(dev, addr) \
54({is_lbus_device(dev) ? lbus_to_virt(addr) : __bus_to_virt(addr);})
55
56#define __arch_virt_to_dma(dev, addr) \
57({is_lbus_device(dev) ? virt_to_lbus(addr) : __virt_to_bus(addr);})
58
59#endif /* CONFIG_ARCH_IOP13XX */
60#endif /* !ASSEMBLY */
61
62#define PFN_TO_NID(addr) (0)
63
64#endif
diff --git a/include/asm-arm/arch-iop13xx/pci.h b/include/asm-arm/arch-iop13xx/pci.h
deleted file mode 100644
index 4041f30d4cd3..000000000000
--- a/include/asm-arm/arch-iop13xx/pci.h
+++ /dev/null
@@ -1,57 +0,0 @@
1#ifndef _IOP13XX_PCI_H_
2#define _IOP13XX_PCI_H_
3#include <asm/arch/irqs.h>
4#include <asm/io.h>
5
6struct pci_sys_data;
7struct hw_pci;
8int iop13xx_pci_setup(int nr, struct pci_sys_data *sys);
9struct pci_bus *iop13xx_scan_bus(int nr, struct pci_sys_data *);
10void iop13xx_atu_select(struct hw_pci *plat_pci);
11void iop13xx_pci_init(void);
12void iop13xx_map_pci_memory(void);
13
14#define IOP_PCI_STATUS_ERROR (PCI_STATUS_PARITY | \
15 PCI_STATUS_SIG_TARGET_ABORT | \
16 PCI_STATUS_REC_TARGET_ABORT | \
17 PCI_STATUS_REC_TARGET_ABORT | \
18 PCI_STATUS_REC_MASTER_ABORT | \
19 PCI_STATUS_SIG_SYSTEM_ERROR | \
20 PCI_STATUS_DETECTED_PARITY)
21
22#define IOP13XX_ATUE_ATUISR_ERROR (IOP13XX_ATUE_STAT_HALT_ON_ERROR | \
23 IOP13XX_ATUE_STAT_ROOT_SYS_ERR | \
24 IOP13XX_ATUE_STAT_PCI_IFACE_ERR | \
25 IOP13XX_ATUE_STAT_ERR_COR | \
26 IOP13XX_ATUE_STAT_ERR_UNCOR | \
27 IOP13XX_ATUE_STAT_CRS | \
28 IOP13XX_ATUE_STAT_DET_PAR_ERR | \
29 IOP13XX_ATUE_STAT_EXT_REC_MABORT | \
30 IOP13XX_ATUE_STAT_SIG_TABORT | \
31 IOP13XX_ATUE_STAT_EXT_REC_TABORT | \
32 IOP13XX_ATUE_STAT_MASTER_DATA_PAR)
33
34#define IOP13XX_ATUX_ATUISR_ERROR (IOP13XX_ATUX_STAT_TX_SCEM | \
35 IOP13XX_ATUX_STAT_REC_SCEM | \
36 IOP13XX_ATUX_STAT_TX_SERR | \
37 IOP13XX_ATUX_STAT_DET_PAR_ERR | \
38 IOP13XX_ATUX_STAT_INT_REC_MABORT | \
39 IOP13XX_ATUX_STAT_REC_SERR | \
40 IOP13XX_ATUX_STAT_EXT_REC_MABORT | \
41 IOP13XX_ATUX_STAT_EXT_REC_TABORT | \
42 IOP13XX_ATUX_STAT_EXT_SIG_TABORT | \
43 IOP13XX_ATUX_STAT_MASTER_DATA_PAR)
44
45/* PCI interrupts
46 */
47#define ATUX_INTA IRQ_IOP13XX_XINT0
48#define ATUX_INTB IRQ_IOP13XX_XINT1
49#define ATUX_INTC IRQ_IOP13XX_XINT2
50#define ATUX_INTD IRQ_IOP13XX_XINT3
51
52#define ATUE_INTA IRQ_IOP13XX_ATUE_IMA
53#define ATUE_INTB IRQ_IOP13XX_ATUE_IMB
54#define ATUE_INTC IRQ_IOP13XX_ATUE_IMC
55#define ATUE_INTD IRQ_IOP13XX_ATUE_IMD
56
57#endif /* _IOP13XX_PCI_H_ */
diff --git a/include/asm-arm/arch-iop13xx/system.h b/include/asm-arm/arch-iop13xx/system.h
deleted file mode 100644
index 8575af8db78c..000000000000
--- a/include/asm-arm/arch-iop13xx/system.h
+++ /dev/null
@@ -1,27 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-iop13xx/system.h
3 *
4 * Copyright (C) 2004 Intel Corp.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10#include <asm/arch/iop13xx.h>
11static inline void arch_idle(void)
12{
13 cpu_do_idle();
14}
15
16static inline void arch_reset(char mode)
17{
18 /*
19 * Reset the internal bus (warning both cores are reset)
20 */
21 write_wdtcr(IOP_WDTCR_EN_ARM);
22 write_wdtcr(IOP_WDTCR_EN);
23 write_wdtsr(IOP13XX_WDTSR_WRITE_EN | IOP13XX_WDTCR_IB_RESET);
24 write_wdtcr(0x1000);
25
26 for(;;);
27}
diff --git a/include/asm-arm/arch-iop13xx/timex.h b/include/asm-arm/arch-iop13xx/timex.h
deleted file mode 100644
index f0c51dd97ed8..000000000000
--- a/include/asm-arm/arch-iop13xx/timex.h
+++ /dev/null
@@ -1,3 +0,0 @@
1#include <asm/hardware.h>
2
3#define CLOCK_TICK_RATE (100 * HZ)
diff --git a/include/asm-arm/arch-iop13xx/uncompress.h b/include/asm-arm/arch-iop13xx/uncompress.h
deleted file mode 100644
index dd9c2934190e..000000000000
--- a/include/asm-arm/arch-iop13xx/uncompress.h
+++ /dev/null
@@ -1,23 +0,0 @@
1#include <asm/types.h>
2#include <linux/serial_reg.h>
3#include <asm/hardware.h>
4
5#define UART_BASE ((volatile u32 *)IOP13XX_UART1_PHYS)
6#define TX_DONE (UART_LSR_TEMT | UART_LSR_THRE)
7
8static inline void putc(char c)
9{
10 while ((UART_BASE[UART_LSR] & TX_DONE) != TX_DONE)
11 barrier();
12 UART_BASE[UART_TX] = c;
13}
14
15static inline void flush(void)
16{
17}
18
19/*
20 * nothing to do
21 */
22#define arch_decomp_setup()
23#define arch_decomp_wdog()
diff --git a/include/asm-arm/arch-iop32x/debug-macro.S b/include/asm-arm/arch-iop32x/debug-macro.S
deleted file mode 100644
index 9022b6849e23..000000000000
--- a/include/asm-arm/arch-iop32x/debug-macro.S
+++ /dev/null
@@ -1,20 +0,0 @@
1/*
2 * include/asm-arm/arch-iop32x/debug-macro.S
3 *
4 * Debugging macro include header
5 *
6 * Copyright (C) 1994-1999 Russell King
7 * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12 */
13
14 .macro addruart, rx
15 mov \rx, #0xfe000000 @ physical as well as virtual
16 orr \rx, \rx, #0x00800000 @ location of the UART
17 .endm
18
19#define UART_SHIFT 0
20#include <asm/hardware/debug-8250.S>
diff --git a/include/asm-arm/arch-iop32x/dma.h b/include/asm-arm/arch-iop32x/dma.h
deleted file mode 100644
index e977a9ef3160..000000000000
--- a/include/asm-arm/arch-iop32x/dma.h
+++ /dev/null
@@ -1,9 +0,0 @@
1/*
2 * include/asm-arm/arch-iop32x/dma.h
3 *
4 * Copyright (C) 2004 Intel Corp.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
diff --git a/include/asm-arm/arch-iop32x/entry-macro.S b/include/asm-arm/arch-iop32x/entry-macro.S
deleted file mode 100644
index 207db99dfbd2..000000000000
--- a/include/asm-arm/arch-iop32x/entry-macro.S
+++ /dev/null
@@ -1,36 +0,0 @@
1/*
2 * include/asm-arm/arch-iop32x/entry-macro.S
3 *
4 * Low-level IRQ helper macros for IOP32x-based platforms
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10#include <asm/arch/iop32x.h>
11
12 .macro disable_fiq
13 .endm
14
15 .macro get_irqnr_preamble, base, tmp
16 mrc p15, 0, \tmp, c15, c1, 0
17 orr \tmp, \tmp, #(1 << 6)
18 mcr p15, 0, \tmp, c15, c1, 0 @ Enable cp6 access
19 mrc p15, 0, \tmp, c15, c1, 0
20 mov \tmp, \tmp
21 sub pc, pc, #4 @ cp_wait
22 .endm
23
24 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
25 mrc p6, 0, \irqstat, c8, c0, 0 @ Read IINTSRC
26 cmp \irqstat, #0
27 clzne \irqnr, \irqstat
28 rsbne \irqnr, \irqnr, #31
29 .endm
30
31 .macro arch_ret_to_user, tmp1, tmp2
32 mrc p15, 0, \tmp1, c15, c1, 0
33 ands \tmp2, \tmp1, #(1 << 6)
34 bicne \tmp1, \tmp1, #(1 << 6)
35 mcrne p15, 0, \tmp1, c15, c1, 0 @ Disable cp6 access
36 .endm
diff --git a/include/asm-arm/arch-iop32x/glantank.h b/include/asm-arm/arch-iop32x/glantank.h
deleted file mode 100644
index bf0665acc1c1..000000000000
--- a/include/asm-arm/arch-iop32x/glantank.h
+++ /dev/null
@@ -1,13 +0,0 @@
1/*
2 * include/asm-arm/arch-iop32x/glantank.h
3 *
4 * IO-Data GLAN Tank board registers
5 */
6
7#ifndef __GLANTANK_H
8#define __GLANTANK_H
9
10#define GLANTANK_UART 0xfe800000 /* UART */
11
12
13#endif
diff --git a/include/asm-arm/arch-iop32x/hardware.h b/include/asm-arm/arch-iop32x/hardware.h
deleted file mode 100644
index 6556ed5eee31..000000000000
--- a/include/asm-arm/arch-iop32x/hardware.h
+++ /dev/null
@@ -1,44 +0,0 @@
1/*
2 * include/asm-arm/arch-iop32x/hardware.h
3 */
4
5#ifndef __HARDWARE_H
6#define __HARDWARE_H
7
8#include <asm/types.h>
9
10/*
11 * Note about PCI IO space mappings
12 *
13 * To make IO space accesses efficient, we store virtual addresses in
14 * the IO resources.
15 *
16 * The PCI IO space is located at virtual 0xfe000000 from physical
17 * 0x90000000. The PCI BARs must be programmed with physical addresses,
18 * but when we read them, we convert them to virtual addresses. See
19 * arch/arm/plat-iop/pci.c.
20 */
21#define pcibios_assign_all_busses() 1
22#define PCIBIOS_MIN_IO 0x00000000
23#define PCIBIOS_MIN_MEM 0x00000000
24
25#ifndef __ASSEMBLY__
26void iop32x_init_irq(void);
27#endif
28
29
30/*
31 * Generic chipset bits
32 */
33#include "iop32x.h"
34
35/*
36 * Board specific bits
37 */
38#include "glantank.h"
39#include "iq80321.h"
40#include "iq31244.h"
41#include "n2100.h"
42
43
44#endif
diff --git a/include/asm-arm/arch-iop32x/io.h b/include/asm-arm/arch-iop32x/io.h
deleted file mode 100644
index 958af751a484..000000000000
--- a/include/asm-arm/arch-iop32x/io.h
+++ /dev/null
@@ -1,27 +0,0 @@
1/*
2 * include/asm-arm/arch-iop32x/io.h
3 *
4 * Copyright (C) 2001 MontaVista Software, Inc.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10
11#ifndef __IO_H
12#define __IO_H
13
14#include <asm/hardware.h>
15
16extern void __iomem *__iop3xx_ioremap(unsigned long cookie, size_t size,
17 unsigned int mtype);
18extern void __iop3xx_iounmap(void __iomem *addr);
19
20#define IO_SPACE_LIMIT 0xffffffff
21#define __io(p) ((void __iomem *)IOP3XX_PCI_IO_PHYS_TO_VIRT(p))
22#define __mem_pci(a) (a)
23
24#define __arch_ioremap(a, s, f) __iop3xx_ioremap(a, s, f)
25#define __arch_iounmap(a) __iop3xx_iounmap(a)
26
27#endif
diff --git a/include/asm-arm/arch-iop32x/iop32x.h b/include/asm-arm/arch-iop32x/iop32x.h
deleted file mode 100644
index 0d8af57221a1..000000000000
--- a/include/asm-arm/arch-iop32x/iop32x.h
+++ /dev/null
@@ -1,37 +0,0 @@
1/*
2 * include/asm-arm/arch-iop32x/iop32x.h
3 *
4 * Intel IOP32X Chip definitions
5 *
6 * Author: Rory Bolt <rorybolt@pacbell.net>
7 * Copyright (C) 2002 Rory Bolt
8 * Copyright (C) 2004 Intel Corp.
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
13 */
14
15#ifndef __IOP32X_H
16#define __IOP32X_H
17
18/*
19 * Peripherals that are shared between the iop32x and iop33x but
20 * located at different addresses.
21 */
22#define IOP3XX_GPIO_REG(reg) (IOP3XX_PERIPHERAL_VIRT_BASE + 0x07c4 + (reg))
23#define IOP3XX_TIMER_REG(reg) (IOP3XX_PERIPHERAL_VIRT_BASE + 0x07e0 + (reg))
24
25#include <asm/hardware/iop3xx.h>
26
27/* ATU Parameters
28 * set up a 1:1 bus to physical ram relationship
29 * w/ physical ram on top of pci in the memory map
30 */
31#define IOP32X_MAX_RAM_SIZE 0x40000000UL
32#define IOP3XX_MAX_RAM_SIZE IOP32X_MAX_RAM_SIZE
33#define IOP3XX_PCI_LOWER_MEM_BA 0x80000000
34#define IOP32X_PCI_MEM_WINDOW_SIZE 0x04000000
35#define IOP3XX_PCI_MEM_WINDOW_SIZE IOP32X_PCI_MEM_WINDOW_SIZE
36
37#endif
diff --git a/include/asm-arm/arch-iop32x/iq31244.h b/include/asm-arm/arch-iop32x/iq31244.h
deleted file mode 100644
index fff4eafa1f6b..000000000000
--- a/include/asm-arm/arch-iop32x/iq31244.h
+++ /dev/null
@@ -1,17 +0,0 @@
1/*
2 * include/asm-arm/arch-iop32x/iq31244.h
3 *
4 * Intel IQ31244 evaluation board registers
5 */
6
7#ifndef __IQ31244_H
8#define __IQ31244_H
9
10#define IQ31244_UART 0xfe800000 /* UART #1 */
11#define IQ31244_7SEG_1 0xfe840000 /* 7-Segment MSB */
12#define IQ31244_7SEG_0 0xfe850000 /* 7-Segment LSB (WO) */
13#define IQ31244_ROTARY_SW 0xfe8d0000 /* Rotary Switch */
14#define IQ31244_BATT_STAT 0xfe8f0000 /* Battery Status */
15
16
17#endif
diff --git a/include/asm-arm/arch-iop32x/iq80321.h b/include/asm-arm/arch-iop32x/iq80321.h
deleted file mode 100644
index eb69db9b9a06..000000000000
--- a/include/asm-arm/arch-iop32x/iq80321.h
+++ /dev/null
@@ -1,17 +0,0 @@
1/*
2 * include/asm-arm/arch-iop32x/iq80321.h
3 *
4 * Intel IQ80321 evaluation board registers
5 */
6
7#ifndef __IQ80321_H
8#define __IQ80321_H
9
10#define IQ80321_UART 0xfe800000 /* UART #1 */
11#define IQ80321_7SEG_1 0xfe840000 /* 7-Segment MSB */
12#define IQ80321_7SEG_0 0xfe850000 /* 7-Segment LSB (WO) */
13#define IQ80321_ROTARY_SW 0xfe8d0000 /* Rotary Switch */
14#define IQ80321_BATT_STAT 0xfe8f0000 /* Battery Status */
15
16
17#endif
diff --git a/include/asm-arm/arch-iop32x/irqs.h b/include/asm-arm/arch-iop32x/irqs.h
deleted file mode 100644
index bbaef873afce..000000000000
--- a/include/asm-arm/arch-iop32x/irqs.h
+++ /dev/null
@@ -1,50 +0,0 @@
1/*
2 * include/asm-arm/arch-iop32x/irqs.h
3 *
4 * Author: Rory Bolt <rorybolt@pacbell.net>
5 * Copyright: (C) 2002 Rory Bolt
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 */
11
12#ifndef __IRQS_H
13#define __IRQS_H
14
15/*
16 * IOP80321 chipset interrupts
17 */
18#define IRQ_IOP32X_DMA0_EOT 0
19#define IRQ_IOP32X_DMA0_EOC 1
20#define IRQ_IOP32X_DMA1_EOT 2
21#define IRQ_IOP32X_DMA1_EOC 3
22#define IRQ_IOP32X_AA_EOT 6
23#define IRQ_IOP32X_AA_EOC 7
24#define IRQ_IOP32X_CORE_PMON 8
25#define IRQ_IOP32X_TIMER0 9
26#define IRQ_IOP32X_TIMER1 10
27#define IRQ_IOP32X_I2C_0 11
28#define IRQ_IOP32X_I2C_1 12
29#define IRQ_IOP32X_MESSAGING 13
30#define IRQ_IOP32X_ATU_BIST 14
31#define IRQ_IOP32X_PERFMON 15
32#define IRQ_IOP32X_CORE_PMU 16
33#define IRQ_IOP32X_BIU_ERR 17
34#define IRQ_IOP32X_ATU_ERR 18
35#define IRQ_IOP32X_MCU_ERR 19
36#define IRQ_IOP32X_DMA0_ERR 20
37#define IRQ_IOP32X_DMA1_ERR 21
38#define IRQ_IOP32X_AA_ERR 23
39#define IRQ_IOP32X_MSG_ERR 24
40#define IRQ_IOP32X_SSP 25
41#define IRQ_IOP32X_XINT0 27
42#define IRQ_IOP32X_XINT1 28
43#define IRQ_IOP32X_XINT2 29
44#define IRQ_IOP32X_XINT3 30
45#define IRQ_IOP32X_HPI 31
46
47#define NR_IRQS 32
48
49
50#endif
diff --git a/include/asm-arm/arch-iop32x/memory.h b/include/asm-arm/arch-iop32x/memory.h
deleted file mode 100644
index c51072af214e..000000000000
--- a/include/asm-arm/arch-iop32x/memory.h
+++ /dev/null
@@ -1,26 +0,0 @@
1/*
2 * include/asm-arm/arch-iop32x/memory.h
3 */
4
5#ifndef __MEMORY_H
6#define __MEMORY_H
7
8#include <asm/hardware.h>
9
10/*
11 * Physical DRAM offset.
12 */
13#define PHYS_OFFSET UL(0xa0000000)
14
15/*
16 * Virtual view <-> PCI DMA view memory address translations
17 * virt_to_bus: Used to translate the virtual address to an
18 * address suitable to be passed to set_dma_addr
19 * bus_to_virt: Used to convert an address for DMA operations
20 * to an address that the kernel can use.
21 */
22#define __virt_to_bus(x) (__virt_to_phys(x))
23#define __bus_to_virt(x) (__phys_to_virt(x))
24
25
26#endif
diff --git a/include/asm-arm/arch-iop32x/n2100.h b/include/asm-arm/arch-iop32x/n2100.h
deleted file mode 100644
index 77a8af476629..000000000000
--- a/include/asm-arm/arch-iop32x/n2100.h
+++ /dev/null
@@ -1,19 +0,0 @@
1/*
2 * include/asm-arm/arch-iop32x/n2100.h
3 *
4 * Thecus N2100 board registers
5 */
6
7#ifndef __N2100_H
8#define __N2100_H
9
10#define N2100_UART 0xfe800000 /* UART */
11
12#define N2100_COPY_BUTTON IOP3XX_GPIO_LINE(0)
13#define N2100_PCA9532_RESET IOP3XX_GPIO_LINE(2)
14#define N2100_RESET_BUTTON IOP3XX_GPIO_LINE(3)
15#define N2100_HARDWARE_RESET IOP3XX_GPIO_LINE(4)
16#define N2100_POWER_BUTTON IOP3XX_GPIO_LINE(5)
17
18
19#endif
diff --git a/include/asm-arm/arch-iop32x/system.h b/include/asm-arm/arch-iop32x/system.h
deleted file mode 100644
index 17b7eb7e9c0d..000000000000
--- a/include/asm-arm/arch-iop32x/system.h
+++ /dev/null
@@ -1,33 +0,0 @@
1/*
2 * include/asm-arm/arch-iop32x/system.h
3 *
4 * Copyright (C) 2001 MontaVista Software, Inc.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10
11#include <asm/mach-types.h>
12
13static inline void arch_idle(void)
14{
15 cpu_do_idle();
16}
17
18static inline void arch_reset(char mode)
19{
20 local_irq_disable();
21
22 if (machine_is_n2100()) {
23 gpio_line_set(N2100_HARDWARE_RESET, GPIO_LOW);
24 gpio_line_config(N2100_HARDWARE_RESET, GPIO_OUT);
25 while (1)
26 ;
27 }
28
29 *IOP3XX_PCSR = 0x30;
30
31 /* Jump into ROM at address 0 */
32 cpu_reset(0);
33}
diff --git a/include/asm-arm/arch-iop32x/timex.h b/include/asm-arm/arch-iop32x/timex.h
deleted file mode 100644
index 9934b087311b..000000000000
--- a/include/asm-arm/arch-iop32x/timex.h
+++ /dev/null
@@ -1,9 +0,0 @@
1/*
2 * include/asm-arm/arch-iop32x/timex.h
3 *
4 * IOP32x architecture timex specifications
5 */
6
7#include <asm/hardware.h>
8
9#define CLOCK_TICK_RATE (100 * HZ)
diff --git a/include/asm-arm/arch-iop32x/uncompress.h b/include/asm-arm/arch-iop32x/uncompress.h
deleted file mode 100644
index 070f15818fe7..000000000000
--- a/include/asm-arm/arch-iop32x/uncompress.h
+++ /dev/null
@@ -1,39 +0,0 @@
1/*
2 * include/asm-arm/arch-iop32x/uncompress.h
3 */
4
5#include <asm/types.h>
6#include <asm/mach-types.h>
7#include <linux/serial_reg.h>
8#include <asm/hardware.h>
9
10static volatile u8 *uart_base;
11
12#define TX_DONE (UART_LSR_TEMT | UART_LSR_THRE)
13
14static inline void putc(char c)
15{
16 while ((uart_base[UART_LSR] & TX_DONE) != TX_DONE)
17 barrier();
18 uart_base[UART_TX] = c;
19}
20
21static inline void flush(void)
22{
23}
24
25static __inline__ void __arch_decomp_setup(unsigned long arch_id)
26{
27 if (machine_is_iq80321())
28 uart_base = (volatile u8 *)IQ80321_UART;
29 else if (machine_is_iq31244() || machine_is_em7210())
30 uart_base = (volatile u8 *)IQ31244_UART;
31 else
32 uart_base = (volatile u8 *)0xfe800000;
33}
34
35/*
36 * nothing to do
37 */
38#define arch_decomp_setup() __arch_decomp_setup(arch_id)
39#define arch_decomp_wdog()
diff --git a/include/asm-arm/arch-iop32x/vmalloc.h b/include/asm-arm/arch-iop32x/vmalloc.h
deleted file mode 100644
index 0a70baa19517..000000000000
--- a/include/asm-arm/arch-iop32x/vmalloc.h
+++ /dev/null
@@ -1,5 +0,0 @@
1/*
2 * include/asm-arm/arch-iop32x/vmalloc.h
3 */
4
5#define VMALLOC_END 0xfe000000
diff --git a/include/asm-arm/arch-iop33x/debug-macro.S b/include/asm-arm/arch-iop33x/debug-macro.S
deleted file mode 100644
index 9e7132ebe6a7..000000000000
--- a/include/asm-arm/arch-iop33x/debug-macro.S
+++ /dev/null
@@ -1,24 +0,0 @@
1/*
2 * include/asm-arm/arch-iop33x/debug-macro.S
3 *
4 * Debugging macro include header
5 *
6 * Copyright (C) 1994-1999 Russell King
7 * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12 */
13
14 .macro addruart, rx
15 mrc p15, 0, \rx, c1, c0
16 tst \rx, #1 @ mmu enabled?
17 moveq \rx, #0xff000000 @ physical
18 movne \rx, #0xfe000000 @ virtual
19 orr \rx, \rx, #0x00ff0000
20 orr \rx, \rx, #0x0000f700
21 .endm
22
23#define UART_SHIFT 2
24#include <asm/hardware/debug-8250.S>
diff --git a/include/asm-arm/arch-iop33x/dma.h b/include/asm-arm/arch-iop33x/dma.h
deleted file mode 100644
index b7775fdc5ad3..000000000000
--- a/include/asm-arm/arch-iop33x/dma.h
+++ /dev/null
@@ -1,9 +0,0 @@
1/*
2 * include/asm-arm/arch-iop33x/dma.h
3 *
4 * Copyright (C) 2004 Intel Corp.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
diff --git a/include/asm-arm/arch-iop33x/entry-macro.S b/include/asm-arm/arch-iop33x/entry-macro.S
deleted file mode 100644
index b8e3d449e882..000000000000
--- a/include/asm-arm/arch-iop33x/entry-macro.S
+++ /dev/null
@@ -1,37 +0,0 @@
1/*
2 * include/asm-arm/arch-iop33x/entry-macro.S
3 *
4 * Low-level IRQ helper macros for IOP33x-based platforms
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10#include <asm/arch/iop33x.h>
11
12 .macro disable_fiq
13 .endm
14
15 .macro get_irqnr_preamble, base, tmp
16 mrc p15, 0, \tmp, c15, c1, 0
17 orr \tmp, \tmp, #(1 << 6)
18 mcr p15, 0, \tmp, c15, c1, 0 @ Enable cp6 access
19 mrc p15, 0, \tmp, c15, c1, 0
20 mov \tmp, \tmp
21 sub pc, pc, #4 @ cp_wait
22 .endm
23
24 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
25 mrc p6, 0, \irqstat, c14, c0, 0 @ Read IINTVEC
26 cmp \irqstat, #0
27 mrceq p6, 0, \irqstat, c14, c0, 0 @ erratum 63 workaround
28 adds \irqnr, \irqstat, #1
29 movne \irqnr, \irqstat, lsr #2
30 .endm
31
32 .macro arch_ret_to_user, tmp1, tmp2
33 mrc p15, 0, \tmp1, c15, c1, 0
34 ands \tmp2, \tmp1, #(1 << 6)
35 bicne \tmp1, \tmp1, #(1 << 6)
36 mcrne p15, 0, \tmp1, c15, c1, 0 @ Disable cp6 access
37 .endm
diff --git a/include/asm-arm/arch-iop33x/hardware.h b/include/asm-arm/arch-iop33x/hardware.h
deleted file mode 100644
index 0659cf94d040..000000000000
--- a/include/asm-arm/arch-iop33x/hardware.h
+++ /dev/null
@@ -1,46 +0,0 @@
1/*
2 * include/asm-arm/arch-iop33x/hardware.h
3 */
4
5#ifndef __HARDWARE_H
6#define __HARDWARE_H
7
8#include <asm/types.h>
9
10/*
11 * Note about PCI IO space mappings
12 *
13 * To make IO space accesses efficient, we store virtual addresses in
14 * the IO resources.
15 *
16 * The PCI IO space is located at virtual 0xfe000000 from physical
17 * 0x90000000. The PCI BARs must be programmed with physical addresses,
18 * but when we read them, we convert them to virtual addresses. See
19 * arch/arm/mach-iop3xx/iop3xx-pci.c
20 */
21#define pcibios_assign_all_busses() 1
22#define PCIBIOS_MIN_IO 0x00000000
23#define PCIBIOS_MIN_MEM 0x00000000
24
25#ifndef __ASSEMBLY__
26void iop33x_init_irq(void);
27
28extern struct platform_device iop33x_uart0_device;
29extern struct platform_device iop33x_uart1_device;
30#endif
31
32
33/*
34 * Generic chipset bits
35 *
36 */
37#include "iop33x.h"
38
39/*
40 * Board specific bits
41 */
42#include "iq80331.h"
43#include "iq80332.h"
44
45
46#endif
diff --git a/include/asm-arm/arch-iop33x/io.h b/include/asm-arm/arch-iop33x/io.h
deleted file mode 100644
index fec9c53e2b10..000000000000
--- a/include/asm-arm/arch-iop33x/io.h
+++ /dev/null
@@ -1,27 +0,0 @@
1/*
2 * include/asm-arm/arch-iop33x/io.h
3 *
4 * Copyright (C) 2001 MontaVista Software, Inc.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10
11#ifndef __IO_H
12#define __IO_H
13
14#include <asm/hardware.h>
15
16extern void __iomem *__iop3xx_ioremap(unsigned long cookie, size_t size,
17 unsigned int mtype);
18extern void __iop3xx_iounmap(void __iomem *addr);
19
20#define IO_SPACE_LIMIT 0xffffffff
21#define __io(p) ((void __iomem *)IOP3XX_PCI_IO_PHYS_TO_VIRT(p))
22#define __mem_pci(a) (a)
23
24#define __arch_ioremap(a, s, f) __iop3xx_ioremap(a, s, f)
25#define __arch_iounmap(a) __iop3xx_iounmap(a)
26
27#endif
diff --git a/include/asm-arm/arch-iop33x/iop33x.h b/include/asm-arm/arch-iop33x/iop33x.h
deleted file mode 100644
index 766985b9a723..000000000000
--- a/include/asm-arm/arch-iop33x/iop33x.h
+++ /dev/null
@@ -1,43 +0,0 @@
1/*
2 * include/asm-arm/arch-iop33x/iop33x.h
3 *
4 * Intel IOP33X Chip definitions
5 *
6 * Author: Dave Jiang (dave.jiang@intel.com)
7 * Copyright (C) 2003, 2004 Intel Corp.
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12 */
13
14#ifndef __IOP33X_H
15#define __IOP33X_H
16
17/*
18 * Peripherals that are shared between the iop32x and iop33x but
19 * located at different addresses.
20 */
21#define IOP3XX_GPIO_REG(reg) (IOP3XX_PERIPHERAL_VIRT_BASE + 0x1780 + (reg))
22#define IOP3XX_TIMER_REG(reg) (IOP3XX_PERIPHERAL_VIRT_BASE + 0x07d0 + (reg))
23
24#include <asm/hardware/iop3xx.h>
25
26/* UARTs */
27#define IOP33X_UART0_PHYS (IOP3XX_PERIPHERAL_PHYS_BASE + 0x1700)
28#define IOP33X_UART0_VIRT (IOP3XX_PERIPHERAL_VIRT_BASE + 0x1700)
29#define IOP33X_UART1_PHYS (IOP3XX_PERIPHERAL_PHYS_BASE + 0x1740)
30#define IOP33X_UART1_VIRT (IOP3XX_PERIPHERAL_VIRT_BASE + 0x1740)
31
32/* ATU Parameters
33 * set up a 1:1 bus to physical ram relationship
34 * w/ pci on top of physical ram in memory map
35 */
36#define IOP33X_MAX_RAM_SIZE 0x80000000UL
37#define IOP3XX_MAX_RAM_SIZE IOP33X_MAX_RAM_SIZE
38#define IOP3XX_PCI_LOWER_MEM_BA (PHYS_OFFSET + IOP33X_MAX_RAM_SIZE)
39#define IOP33X_PCI_MEM_WINDOW_SIZE 0x08000000
40#define IOP3XX_PCI_MEM_WINDOW_SIZE IOP33X_PCI_MEM_WINDOW_SIZE
41
42
43#endif
diff --git a/include/asm-arm/arch-iop33x/iq80331.h b/include/asm-arm/arch-iop33x/iq80331.h
deleted file mode 100644
index 79b9302017ea..000000000000
--- a/include/asm-arm/arch-iop33x/iq80331.h
+++ /dev/null
@@ -1,16 +0,0 @@
1/*
2 * include/asm-arm/arch-iop33x/iq80331.h
3 *
4 * Intel IQ80331 evaluation board registers
5 */
6
7#ifndef __IQ80331_H
8#define __IQ80331_H
9
10#define IQ80331_7SEG_1 0xce840000 /* 7-Segment MSB */
11#define IQ80331_7SEG_0 0xce850000 /* 7-Segment LSB (WO) */
12#define IQ80331_ROTARY_SW 0xce8d0000 /* Rotary Switch */
13#define IQ80331_BATT_STAT 0xce8f0000 /* Battery Status */
14
15
16#endif
diff --git a/include/asm-arm/arch-iop33x/iq80332.h b/include/asm-arm/arch-iop33x/iq80332.h
deleted file mode 100644
index 053165629492..000000000000
--- a/include/asm-arm/arch-iop33x/iq80332.h
+++ /dev/null
@@ -1,16 +0,0 @@
1/*
2 * include/asm-arm/arch-iop33x/iq80332.h
3 *
4 * Intel IQ80332 evaluation board registers
5 */
6
7#ifndef __IQ80332_H
8#define __IQ80332_H
9
10#define IQ80332_7SEG_1 0xce840000 /* 7-Segment MSB */
11#define IQ80332_7SEG_0 0xce850000 /* 7-Segment LSB (WO) */
12#define IQ80332_ROTARY_SW 0xce8d0000 /* Rotary Switch */
13#define IQ80332_BATT_STAT 0xce8f0000 /* Battery Status */
14
15
16#endif
diff --git a/include/asm-arm/arch-iop33x/irqs.h b/include/asm-arm/arch-iop33x/irqs.h
deleted file mode 100644
index d045f8403396..000000000000
--- a/include/asm-arm/arch-iop33x/irqs.h
+++ /dev/null
@@ -1,60 +0,0 @@
1/*
2 * include/asm-arm/arch-iop33x/irqs.h
3 *
4 * Author: Dave Jiang (dave.jiang@intel.com)
5 * Copyright: (C) 2003 Intel Corp.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 */
11
12#ifndef __IRQS_H
13#define __IRQS_H
14
15/*
16 * IOP80331 chipset interrupts
17 */
18#define IRQ_IOP33X_DMA0_EOT 0
19#define IRQ_IOP33X_DMA0_EOC 1
20#define IRQ_IOP33X_DMA1_EOT 2
21#define IRQ_IOP33X_DMA1_EOC 3
22#define IRQ_IOP33X_AA_EOT 6
23#define IRQ_IOP33X_AA_EOC 7
24#define IRQ_IOP33X_TIMER0 8
25#define IRQ_IOP33X_TIMER1 9
26#define IRQ_IOP33X_I2C_0 10
27#define IRQ_IOP33X_I2C_1 11
28#define IRQ_IOP33X_MSG 12
29#define IRQ_IOP33X_MSGIBQ 13
30#define IRQ_IOP33X_ATU_BIST 14
31#define IRQ_IOP33X_PERFMON 15
32#define IRQ_IOP33X_CORE_PMU 16
33#define IRQ_IOP33X_XINT0 24
34#define IRQ_IOP33X_XINT1 25
35#define IRQ_IOP33X_XINT2 26
36#define IRQ_IOP33X_XINT3 27
37#define IRQ_IOP33X_XINT8 32
38#define IRQ_IOP33X_XINT9 33
39#define IRQ_IOP33X_XINT10 34
40#define IRQ_IOP33X_XINT11 35
41#define IRQ_IOP33X_XINT12 36
42#define IRQ_IOP33X_XINT13 37
43#define IRQ_IOP33X_XINT14 38
44#define IRQ_IOP33X_XINT15 39
45#define IRQ_IOP33X_UART0 51
46#define IRQ_IOP33X_UART1 52
47#define IRQ_IOP33X_PBIE 53
48#define IRQ_IOP33X_ATU_CRW 54
49#define IRQ_IOP33X_ATU_ERR 55
50#define IRQ_IOP33X_MCU_ERR 56
51#define IRQ_IOP33X_DMA0_ERR 57
52#define IRQ_IOP33X_DMA1_ERR 58
53#define IRQ_IOP33X_AA_ERR 60
54#define IRQ_IOP33X_MSG_ERR 62
55#define IRQ_IOP33X_HPI 63
56
57#define NR_IRQS 64
58
59
60#endif
diff --git a/include/asm-arm/arch-iop33x/memory.h b/include/asm-arm/arch-iop33x/memory.h
deleted file mode 100644
index c8749127d6ab..000000000000
--- a/include/asm-arm/arch-iop33x/memory.h
+++ /dev/null
@@ -1,26 +0,0 @@
1/*
2 * include/asm-arm/arch-iop33x/memory.h
3 */
4
5#ifndef __MEMORY_H
6#define __MEMORY_H
7
8#include <asm/hardware.h>
9
10/*
11 * Physical DRAM offset.
12 */
13#define PHYS_OFFSET UL(0x00000000)
14
15/*
16 * Virtual view <-> PCI DMA view memory address translations
17 * virt_to_bus: Used to translate the virtual address to an
18 * address suitable to be passed to set_dma_addr
19 * bus_to_virt: Used to convert an address for DMA operations
20 * to an address that the kernel can use.
21 */
22#define __virt_to_bus(x) (__virt_to_phys(x))
23#define __bus_to_virt(x) (__phys_to_virt(x))
24
25
26#endif
diff --git a/include/asm-arm/arch-iop33x/system.h b/include/asm-arm/arch-iop33x/system.h
deleted file mode 100644
index 00dd07ece262..000000000000
--- a/include/asm-arm/arch-iop33x/system.h
+++ /dev/null
@@ -1,22 +0,0 @@
1/*
2 * include/asm-arm/arch-iop33x/system.h
3 *
4 * Copyright (C) 2001 MontaVista Software, Inc.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10
11static inline void arch_idle(void)
12{
13 cpu_do_idle();
14}
15
16static inline void arch_reset(char mode)
17{
18 *IOP3XX_PCSR = 0x30;
19
20 /* Jump into ROM at address 0 */
21 cpu_reset(0);
22}
diff --git a/include/asm-arm/arch-iop33x/timex.h b/include/asm-arm/arch-iop33x/timex.h
deleted file mode 100644
index fe3e1e369ff9..000000000000
--- a/include/asm-arm/arch-iop33x/timex.h
+++ /dev/null
@@ -1,9 +0,0 @@
1/*
2 * include/asm-arm/arch-iop33x/timex.h
3 *
4 * IOP3xx architecture timex specifications
5 */
6
7#include <asm/hardware.h>
8
9#define CLOCK_TICK_RATE (100 * HZ)
diff --git a/include/asm-arm/arch-iop33x/uncompress.h b/include/asm-arm/arch-iop33x/uncompress.h
deleted file mode 100644
index e17fbc05877b..000000000000
--- a/include/asm-arm/arch-iop33x/uncompress.h
+++ /dev/null
@@ -1,37 +0,0 @@
1/*
2 * include/asm-arm/arch-iop33x/uncompress.h
3 */
4
5#include <asm/types.h>
6#include <asm/mach-types.h>
7#include <linux/serial_reg.h>
8#include <asm/hardware.h>
9
10static volatile u32 *uart_base;
11
12#define TX_DONE (UART_LSR_TEMT | UART_LSR_THRE)
13
14static inline void putc(char c)
15{
16 while ((uart_base[UART_LSR] & TX_DONE) != TX_DONE)
17 barrier();
18 uart_base[UART_TX] = c;
19}
20
21static inline void flush(void)
22{
23}
24
25static __inline__ void __arch_decomp_setup(unsigned long arch_id)
26{
27 if (machine_is_iq80331() || machine_is_iq80332())
28 uart_base = (volatile u32 *)IOP33X_UART0_PHYS;
29 else
30 uart_base = (volatile u32 *)0xfe800000;
31}
32
33/*
34 * nothing to do
35 */
36#define arch_decomp_setup() __arch_decomp_setup(arch_id)
37#define arch_decomp_wdog()
diff --git a/include/asm-arm/arch-iop33x/vmalloc.h b/include/asm-arm/arch-iop33x/vmalloc.h
deleted file mode 100644
index 66f545a7f4fc..000000000000
--- a/include/asm-arm/arch-iop33x/vmalloc.h
+++ /dev/null
@@ -1,5 +0,0 @@
1/*
2 * include/asm-arm/arch-iop33x/vmalloc.h
3 */
4
5#define VMALLOC_END 0xfe000000
diff --git a/include/asm-arm/arch-ixp2000/debug-macro.S b/include/asm-arm/arch-ixp2000/debug-macro.S
deleted file mode 100644
index bc8b39654793..000000000000
--- a/include/asm-arm/arch-ixp2000/debug-macro.S
+++ /dev/null
@@ -1,27 +0,0 @@
1/* linux/include/asm-arm/arch-ixp2000/debug-macro.S
2 *
3 * Debugging macro include header
4 *
5 * Copyright (C) 1994-1999 Russell King
6 * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 *
12*/
13
14 .macro addruart,rx
15 mrc p15, 0, \rx, c1, c0
16 tst \rx, #1 @ MMU enabled?
17 moveq \rx, #0xc0000000 @ Physical base
18 movne \rx, #0xfe000000 @ virtual base
19 orrne \rx, \rx, #0x00f00000
20 orr \rx, \rx, #0x00030000
21#ifdef __ARMEB__
22 orr \rx, \rx, #0x00000003
23#endif
24 .endm
25
26#define UART_SHIFT 2
27#include <asm/hardware/debug-8250.S>
diff --git a/include/asm-arm/arch-ixp2000/dma.h b/include/asm-arm/arch-ixp2000/dma.h
deleted file mode 100644
index 548d8dc507eb..000000000000
--- a/include/asm-arm/arch-ixp2000/dma.h
+++ /dev/null
@@ -1,9 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-ixp2000/dma.h
3 *
4 * Copyright (C) 2002 Intel Corp.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
diff --git a/include/asm-arm/arch-ixp2000/enp2611.h b/include/asm-arm/arch-ixp2000/enp2611.h
deleted file mode 100644
index 42f3c28dc5c4..000000000000
--- a/include/asm-arm/arch-ixp2000/enp2611.h
+++ /dev/null
@@ -1,46 +0,0 @@
1/*
2 * include/asm-arm/arch-ixp2000/enp2611.h
3 *
4 * Register and other defines for Radisys ENP-2611
5 *
6 * Created 2004 by Lennert Buytenhek from the ixdp2x01 code. The
7 * original version carries the following notices:
8 *
9 * Original Author: Naeem Afzal <naeem.m.afzal@intel.com>
10 * Maintainer: Deepak Saxena <dsaxena@plexity.net>
11 *
12 * Copyright (C) 2002 Intel Corp.
13 * Copyright (C) 2003-2004 MontaVista Software, Inc.
14 *
15 * This program is free software; you can redistribute it and/or modify it
16 * under the terms of the GNU General Public License as published by the
17 * Free Software Foundation; either version 2 of the License, or (at your
18 * option) any later version.
19 */
20
21#ifndef __ENP2611_H
22#define __ENP2611_H
23
24#define ENP2611_CALEB_PHYS_BASE 0xc5000000
25#define ENP2611_CALEB_VIRT_BASE 0xfe000000
26#define ENP2611_CALEB_SIZE 0x00100000
27
28#define ENP2611_PM3386_0_PHYS_BASE 0xc6000000
29#define ENP2611_PM3386_0_VIRT_BASE 0xfe100000
30#define ENP2611_PM3386_0_SIZE 0x00100000
31
32#define ENP2611_PM3386_1_PHYS_BASE 0xc6400000
33#define ENP2611_PM3386_1_VIRT_BASE 0xfe200000
34#define ENP2611_PM3386_1_SIZE 0x00100000
35
36#define ENP2611_GPIO_SCL 7
37#define ENP2611_GPIO_SDA 6
38
39#define IRQ_ENP2611_THERMAL IRQ_IXP2000_GPIO4
40#define IRQ_ENP2611_OPTION_BOARD IRQ_IXP2000_GPIO3
41#define IRQ_ENP2611_CALEB IRQ_IXP2000_GPIO2
42#define IRQ_ENP2611_PM3386_1 IRQ_IXP2000_GPIO1
43#define IRQ_ENP2611_PM3386_0 IRQ_IXP2000_GPIO0
44
45
46#endif
diff --git a/include/asm-arm/arch-ixp2000/entry-macro.S b/include/asm-arm/arch-ixp2000/entry-macro.S
deleted file mode 100644
index 11d512ad5945..000000000000
--- a/include/asm-arm/arch-ixp2000/entry-macro.S
+++ /dev/null
@@ -1,60 +0,0 @@
1/*
2 * include/asm-arm/arch-ixp2000/entry-macro.S
3 *
4 * Low-level IRQ helper macros for IXP2000-based platforms
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10#include <asm/arch/irqs.h>
11
12 .macro disable_fiq
13 .endm
14
15 .macro get_irqnr_preamble, base, tmp
16 .endm
17
18 .macro arch_ret_to_user, tmp1, tmp2
19 .endm
20
21 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
22
23 mov \irqnr, #0x0 @clear out irqnr as default
24 mov \base, #0xfe000000
25 orr \base, \base, #0x00e00000
26 orr \base, \base, #0x08
27 ldr \irqstat, [\base] @ get interrupts
28
29 cmp \irqstat, #0
30 beq 1001f
31
32 clz \irqnr, \irqstat
33 mov \base, #31
34 subs \irqnr, \base, \irqnr
35
36 /*
37 * We handle PCIA and PCIB here so we don't have an
38 * extra layer of code just to check these two bits.
39 */
40 cmp \irqnr, #IRQ_IXP2000_PCI
41 bne 1001f
42
43 mov \base, #0xfe000000
44 orr \base, \base, #0x00c00000
45 orr \base, \base, #0x00000100
46 orr \base, \base, #0x00000058
47 ldr \irqstat, [\base]
48
49 mov \tmp, #(1<<26)
50 tst \irqstat, \tmp
51 movne \irqnr, #IRQ_IXP2000_PCIA
52 bne 1001f
53
54 mov \tmp, #(1<<27)
55 tst \irqstat, \tmp
56 movne \irqnr, #IRQ_IXP2000_PCIB
57
581001:
59 .endm
60
diff --git a/include/asm-arm/arch-ixp2000/gpio.h b/include/asm-arm/arch-ixp2000/gpio.h
deleted file mode 100644
index 03cbbe1fd9d8..000000000000
--- a/include/asm-arm/arch-ixp2000/gpio.h
+++ /dev/null
@@ -1,48 +0,0 @@
1/*
2 * include/asm-arm/arch-ixp2000/gpio.h
3 *
4 * Copyright (C) 2002 Intel Corporation.
5 *
6 * This program is free software, you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10
11/*
12 * IXP2000 GPIO in/out, edge/level detection for IRQs:
13 * IRQs are generated on Falling-edge, Rising-Edge, Level-low, Level-High
14 * or both Falling-edge and Rising-edge.
15 * This must be called *before* the corresponding IRQ is registerd.
16 * Use this instead of directly setting the GPIO registers.
17 * GPIOs may also be used as GPIOs (e.g. for emulating i2c/smb)
18 */
19#ifndef __ASM_ARCH_GPIO_H
20#define __ASM_ARCH_GPIO_H
21
22#ifndef __ASSEMBLY__
23
24#define GPIO_IN 0
25#define GPIO_OUT 1
26
27#define IXP2000_GPIO_LOW 0
28#define IXP2000_GPIO_HIGH 1
29
30extern void gpio_line_config(int line, int direction);
31
32static inline int gpio_line_get(int line)
33{
34 return (((*IXP2000_GPIO_PLR) >> line) & 1);
35}
36
37static inline void gpio_line_set(int line, int value)
38{
39 if (value == IXP2000_GPIO_HIGH) {
40 ixp2000_reg_write(IXP2000_GPIO_POSR, 1 << line);
41 } else if (value == IXP2000_GPIO_LOW) {
42 ixp2000_reg_write(IXP2000_GPIO_POCR, 1 << line);
43 }
44}
45
46#endif /* !__ASSEMBLY__ */
47
48#endif /* ASM_ARCH_IXP2000_GPIO_H_ */
diff --git a/include/asm-arm/arch-ixp2000/hardware.h b/include/asm-arm/arch-ixp2000/hardware.h
deleted file mode 100644
index e7ea781c48aa..000000000000
--- a/include/asm-arm/arch-ixp2000/hardware.h
+++ /dev/null
@@ -1,44 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-ixp2000/hardware.h
3 *
4 * Hardware definitions for IXP2400/2800 based systems
5 *
6 * Original Author: Naeem M Afzal <naeem.m.afzal@intel.com>
7 *
8 * Maintainer: Deepak Saxena <dsaxena@mvista.com>
9 *
10 * Copyright (C) 2001-2002 Intel Corp.
11 * Copyright (C) 2003-2004 MontaVista Software, Inc.
12 *
13 * This program is free software; you can redistribute it and/or modify it
14 * under the terms of the GNU General Public License as published by the
15 * Free Software Foundation; either version 2 of the License, or (at your
16 * option) any later version.
17 */
18
19#ifndef __ASM_ARCH_HARDWARE_H__
20#define __ASM_ARCH_HARDWARE_H__
21
22/*
23 * This needs to be platform-specific?
24 */
25#define PCIBIOS_MIN_IO 0x00000000
26#define PCIBIOS_MIN_MEM 0x00000000
27
28#include "ixp2000-regs.h" /* Chipset Registers */
29
30#define pcibios_assign_all_busses() 0
31
32/*
33 * Platform helper functions
34 */
35#include "platform.h"
36
37/*
38 * Platform-specific bits
39 */
40#include "enp2611.h" /* ENP-2611 */
41#include "ixdp2x00.h" /* IXDP2400/2800 */
42#include "ixdp2x01.h" /* IXDP2401/2801 */
43
44#endif /* _ASM_ARCH_HARDWARE_H__ */
diff --git a/include/asm-arm/arch-ixp2000/io.h b/include/asm-arm/arch-ixp2000/io.h
deleted file mode 100644
index c0ff2c6c66e7..000000000000
--- a/include/asm-arm/arch-ixp2000/io.h
+++ /dev/null
@@ -1,134 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-ixp2000/io.h
3 *
4 * Original Author: Naeem M Afzal <naeem.m.afzal@intel.com>
5 * Maintainer: Deepak Saxena <dsaxena@plexity.net>
6 *
7 * Copyright (C) 2002 Intel Corp.
8 * Copyrgiht (C) 2003-2004 MontaVista Software, Inc.
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
13 */
14
15#ifndef __ASM_ARM_ARCH_IO_H
16#define __ASM_ARM_ARCH_IO_H
17
18#include <asm/hardware.h>
19
20#define IO_SPACE_LIMIT 0xffffffff
21#define __mem_pci(a) (a)
22
23/*
24 * The A? revisions of the IXP2000s assert byte lanes for PCI I/O
25 * transactions the other way round (MEM transactions don't have this
26 * issue), so if we want to support those models, we need to override
27 * the standard I/O functions.
28 *
29 * B0 and later have a bit that can be set to 1 to get the proper
30 * behavior for I/O transactions, which then allows us to use the
31 * standard I/O functions. This is what we do if the user does not
32 * explicitly ask for support for pre-B0.
33 */
34#ifdef CONFIG_IXP2000_SUPPORT_BROKEN_PCI_IO
35#define ___io(p) ((void __iomem *)((p)+IXP2000_PCI_IO_VIRT_BASE))
36
37#define alignb(addr) (void __iomem *)((unsigned long)(addr) ^ 3)
38#define alignw(addr) (void __iomem *)((unsigned long)(addr) ^ 2)
39
40#define outb(v,p) __raw_writeb((v),alignb(___io(p)))
41#define outw(v,p) __raw_writew((v),alignw(___io(p)))
42#define outl(v,p) __raw_writel((v),___io(p))
43
44#define inb(p) ({ unsigned int __v = __raw_readb(alignb(___io(p))); __v; })
45#define inw(p) \
46 ({ unsigned int __v = (__raw_readw(alignw(___io(p)))); __v; })
47#define inl(p) \
48 ({ unsigned int __v = (__raw_readl(___io(p))); __v; })
49
50#define outsb(p,d,l) __raw_writesb(alignb(___io(p)),d,l)
51#define outsw(p,d,l) __raw_writesw(alignw(___io(p)),d,l)
52#define outsl(p,d,l) __raw_writesl(___io(p),d,l)
53
54#define insb(p,d,l) __raw_readsb(alignb(___io(p)),d,l)
55#define insw(p,d,l) __raw_readsw(alignw(___io(p)),d,l)
56#define insl(p,d,l) __raw_readsl(___io(p),d,l)
57
58#define __is_io_address(p) ((((unsigned long)(p)) & ~(IXP2000_PCI_IO_SIZE - 1)) == IXP2000_PCI_IO_VIRT_BASE)
59
60#define ioread8(p) \
61 ({ \
62 unsigned int __v; \
63 \
64 if (__is_io_address(p)) { \
65 __v = __raw_readb(alignb(p)); \
66 } else { \
67 __v = __raw_readb(p); \
68 } \
69 \
70 __v; \
71 }) \
72
73#define ioread16(p) \
74 ({ \
75 unsigned int __v; \
76 \
77 if (__is_io_address(p)) { \
78 __v = __raw_readw(alignw(p)); \
79 } else { \
80 __v = le16_to_cpu(__raw_readw(p)); \
81 } \
82 \
83 __v; \
84 })
85
86#define ioread32(p) \
87 ({ \
88 unsigned int __v; \
89 \
90 if (__is_io_address(p)) { \
91 __v = __raw_readl(p); \
92 } else { \
93 __v = le32_to_cpu(__raw_readl(p)); \
94 } \
95 \
96 __v; \
97 })
98
99#define iowrite8(v,p) \
100 ({ \
101 if (__is_io_address(p)) { \
102 __raw_writeb((v), alignb(p)); \
103 } else { \
104 __raw_writeb((v), p); \
105 } \
106 })
107
108#define iowrite16(v,p) \
109 ({ \
110 if (__is_io_address(p)) { \
111 __raw_writew((v), alignw(p)); \
112 } else { \
113 __raw_writew(cpu_to_le16(v), p); \
114 } \
115 })
116
117#define iowrite32(v,p) \
118 ({ \
119 if (__is_io_address(p)) { \
120 __raw_writel((v), p); \
121 } else { \
122 __raw_writel(cpu_to_le32(v), p); \
123 } \
124 })
125
126#define ioport_map(port, nr) ___io(port)
127
128#define ioport_unmap(addr)
129#else
130#define __io(p) ((void __iomem *)((p)+IXP2000_PCI_IO_VIRT_BASE))
131#endif
132
133
134#endif
diff --git a/include/asm-arm/arch-ixp2000/irqs.h b/include/asm-arm/arch-ixp2000/irqs.h
deleted file mode 100644
index 62f09c7ff420..000000000000
--- a/include/asm-arm/arch-ixp2000/irqs.h
+++ /dev/null
@@ -1,207 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-ixp2000/irqs.h
3 *
4 * Original Author: Naeem Afzal <naeem.m.afzal@intel.com>
5 * Maintainer: Deepak Saxena <dsaxena@plexity.net>
6 *
7 * Copyright (C) 2002 Intel Corp.
8 * Copyright (C) 2003-2004 MontaVista Software, Inc.
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
13 */
14
15#ifndef _IRQS_H
16#define _IRQS_H
17
18/*
19 * Do NOT add #ifdef MACHINE_FOO in here.
20 * Simpy add your machine IRQs here and increase NR_IRQS if needed to
21 * hold your machine's IRQ table.
22 */
23
24/*
25 * Some interrupt numbers go unused b/c the IRQ mask/ummask/status
26 * register has those bit reserved. We just mark those interrupts
27 * as invalid and this allows us to do mask/unmask with a single
28 * shift operation instead of having to map the IRQ number to
29 * a HW IRQ number.
30 */
31#define IRQ_IXP2000_SOFT_INT 0 /* soft interrupt */
32#define IRQ_IXP2000_ERRSUM 1 /* OR of all bits in ErrorStatus reg*/
33#define IRQ_IXP2000_UART 2
34#define IRQ_IXP2000_GPIO 3
35#define IRQ_IXP2000_TIMER1 4
36#define IRQ_IXP2000_TIMER2 5
37#define IRQ_IXP2000_TIMER3 6
38#define IRQ_IXP2000_TIMER4 7
39#define IRQ_IXP2000_PMU 8
40#define IRQ_IXP2000_SPF 9 /* Slow port framer IRQ */
41#define IRQ_IXP2000_DMA1 10
42#define IRQ_IXP2000_DMA2 11
43#define IRQ_IXP2000_DMA3 12
44#define IRQ_IXP2000_PCI_DOORBELL 13
45#define IRQ_IXP2000_ME_ATTN 14
46#define IRQ_IXP2000_PCI 15 /* PCI INTA or INTB */
47#define IRQ_IXP2000_THDA0 16 /* thread 0-31A */
48#define IRQ_IXP2000_THDA1 17 /* thread 32-63A, IXP2800 only */
49#define IRQ_IXP2000_THDA2 18 /* thread 64-95A */
50#define IRQ_IXP2000_THDA3 19 /* thread 96-127A, IXP2800 only */
51#define IRQ_IXP2000_THDB0 24 /* thread 0-31B */
52#define IRQ_IXP2000_THDB1 25 /* thread 32-63B, IXP2800 only */
53#define IRQ_IXP2000_THDB2 26 /* thread 64-95B */
54#define IRQ_IXP2000_THDB3 27 /* thread 96-127B, IXP2800 only */
55
56/* define generic GPIOs */
57#define IRQ_IXP2000_GPIO0 32
58#define IRQ_IXP2000_GPIO1 33
59#define IRQ_IXP2000_GPIO2 34
60#define IRQ_IXP2000_GPIO3 35
61#define IRQ_IXP2000_GPIO4 36
62#define IRQ_IXP2000_GPIO5 37
63#define IRQ_IXP2000_GPIO6 38
64#define IRQ_IXP2000_GPIO7 39
65
66/* split off the 2 PCI sources */
67#define IRQ_IXP2000_PCIA 40
68#define IRQ_IXP2000_PCIB 41
69
70/* Int sources from IRQ_ERROR_STATUS */
71#define IRQ_IXP2000_DRAM0_MIN_ERR 42
72#define IRQ_IXP2000_DRAM0_MAJ_ERR 43
73#define IRQ_IXP2000_DRAM1_MIN_ERR 44
74#define IRQ_IXP2000_DRAM1_MAJ_ERR 45
75#define IRQ_IXP2000_DRAM2_MIN_ERR 46
76#define IRQ_IXP2000_DRAM2_MAJ_ERR 47
77/* 48-57 reserved */
78#define IRQ_IXP2000_SRAM0_ERR 58
79#define IRQ_IXP2000_SRAM1_ERR 59
80#define IRQ_IXP2000_SRAM2_ERR 60
81#define IRQ_IXP2000_SRAM3_ERR 61
82/* 62-65 reserved */
83#define IRQ_IXP2000_MEDIA_ERR 66
84#define IRQ_IXP2000_PCI_ERR 67
85#define IRQ_IXP2000_SP_INT 68
86
87#define NR_IXP2000_IRQS 69
88
89#define IXP2000_BOARD_IRQ(x) (NR_IXP2000_IRQS + (x))
90
91#define IXP2000_BOARD_IRQ_MASK(irq) (1 << (irq - NR_IXP2000_IRQS))
92
93#define IXP2000_ERR_IRQ_MASK(irq) ( 1 << (irq - IRQ_IXP2000_DRAM0_MIN_ERR))
94#define IXP2000_VALID_ERR_IRQ_MASK (\
95 IXP2000_ERR_IRQ_MASK(IRQ_IXP2000_DRAM0_MIN_ERR) | \
96 IXP2000_ERR_IRQ_MASK(IRQ_IXP2000_DRAM0_MAJ_ERR) | \
97 IXP2000_ERR_IRQ_MASK(IRQ_IXP2000_DRAM1_MIN_ERR) | \
98 IXP2000_ERR_IRQ_MASK(IRQ_IXP2000_DRAM1_MAJ_ERR) | \
99 IXP2000_ERR_IRQ_MASK(IRQ_IXP2000_DRAM2_MIN_ERR) | \
100 IXP2000_ERR_IRQ_MASK(IRQ_IXP2000_DRAM2_MAJ_ERR) | \
101 IXP2000_ERR_IRQ_MASK(IRQ_IXP2000_SRAM0_ERR) | \
102 IXP2000_ERR_IRQ_MASK(IRQ_IXP2000_SRAM1_ERR) | \
103 IXP2000_ERR_IRQ_MASK(IRQ_IXP2000_SRAM2_ERR) | \
104 IXP2000_ERR_IRQ_MASK(IRQ_IXP2000_SRAM3_ERR) | \
105 IXP2000_ERR_IRQ_MASK(IRQ_IXP2000_MEDIA_ERR) | \
106 IXP2000_ERR_IRQ_MASK(IRQ_IXP2000_PCI_ERR) | \
107 IXP2000_ERR_IRQ_MASK(IRQ_IXP2000_SP_INT) )
108
109/*
110 * This allows for all the on-chip sources plus up to 32 CPLD based
111 * IRQs. Should be more than enough.
112 */
113#define IXP2000_BOARD_IRQS 32
114#define NR_IRQS (NR_IXP2000_IRQS + IXP2000_BOARD_IRQS)
115
116
117/*
118 * IXDP2400 specific IRQs
119 */
120#define IRQ_IXDP2400_INGRESS_NPU IXP2000_BOARD_IRQ(0)
121#define IRQ_IXDP2400_ENET IXP2000_BOARD_IRQ(1)
122#define IRQ_IXDP2400_MEDIA_PCI IXP2000_BOARD_IRQ(2)
123#define IRQ_IXDP2400_MEDIA_SP IXP2000_BOARD_IRQ(3)
124#define IRQ_IXDP2400_SF_PCI IXP2000_BOARD_IRQ(4)
125#define IRQ_IXDP2400_SF_SP IXP2000_BOARD_IRQ(5)
126#define IRQ_IXDP2400_PMC IXP2000_BOARD_IRQ(6)
127#define IRQ_IXDP2400_TVM IXP2000_BOARD_IRQ(7)
128
129#define NR_IXDP2400_IRQS ((IRQ_IXDP2400_TVM)+1)
130#define IXDP2400_NR_IRQS NR_IXDP2400_IRQS - NR_IXP2000_IRQS
131
132/* IXDP2800 specific IRQs */
133#define IRQ_IXDP2800_EGRESS_ENET IXP2000_BOARD_IRQ(0)
134#define IRQ_IXDP2800_INGRESS_NPU IXP2000_BOARD_IRQ(1)
135#define IRQ_IXDP2800_PMC IXP2000_BOARD_IRQ(2)
136#define IRQ_IXDP2800_FABRIC_PCI IXP2000_BOARD_IRQ(3)
137#define IRQ_IXDP2800_FABRIC IXP2000_BOARD_IRQ(4)
138#define IRQ_IXDP2800_MEDIA IXP2000_BOARD_IRQ(5)
139
140#define NR_IXDP2800_IRQS ((IRQ_IXDP2800_MEDIA)+1)
141#define IXDP2800_NR_IRQS NR_IXDP2800_IRQS - NR_IXP2000_IRQS
142
143/*
144 * IRQs on both IXDP2x01 boards
145 */
146#define IRQ_IXDP2X01_SPCI_DB_0 IXP2000_BOARD_IRQ(2)
147#define IRQ_IXDP2X01_SPCI_DB_1 IXP2000_BOARD_IRQ(3)
148#define IRQ_IXDP2X01_SPCI_PMC_INTA IXP2000_BOARD_IRQ(4)
149#define IRQ_IXDP2X01_SPCI_PMC_INTB IXP2000_BOARD_IRQ(5)
150#define IRQ_IXDP2X01_SPCI_PMC_INTC IXP2000_BOARD_IRQ(6)
151#define IRQ_IXDP2X01_SPCI_PMC_INTD IXP2000_BOARD_IRQ(7)
152#define IRQ_IXDP2X01_SPCI_FIC_INT IXP2000_BOARD_IRQ(8)
153#define IRQ_IXDP2X01_IPMI_FROM IXP2000_BOARD_IRQ(16)
154#define IRQ_IXDP2X01_125US IXP2000_BOARD_IRQ(17)
155#define IRQ_IXDP2X01_DB_0_ADD IXP2000_BOARD_IRQ(18)
156#define IRQ_IXDP2X01_DB_1_ADD IXP2000_BOARD_IRQ(19)
157#define IRQ_IXDP2X01_UART1 IXP2000_BOARD_IRQ(21)
158#define IRQ_IXDP2X01_UART2 IXP2000_BOARD_IRQ(22)
159#define IRQ_IXDP2X01_FIC_ADD_INT IXP2000_BOARD_IRQ(24)
160#define IRQ_IXDP2X01_CS8900 IXP2000_BOARD_IRQ(25)
161#define IRQ_IXDP2X01_BBSRAM IXP2000_BOARD_IRQ(26)
162
163#define IXDP2X01_VALID_IRQ_MASK ( \
164 IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_SPCI_DB_0) | \
165 IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_SPCI_DB_1) | \
166 IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_SPCI_PMC_INTA) | \
167 IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_SPCI_PMC_INTB) | \
168 IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_SPCI_PMC_INTC) | \
169 IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_SPCI_PMC_INTD) | \
170 IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_SPCI_FIC_INT) | \
171 IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_IPMI_FROM) | \
172 IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_125US) | \
173 IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_DB_0_ADD) | \
174 IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_DB_1_ADD) | \
175 IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_UART1) | \
176 IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_UART2) | \
177 IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_FIC_ADD_INT) | \
178 IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_CS8900) | \
179 IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2X01_BBSRAM) )
180
181/*
182 * IXDP2401 specific IRQs
183 */
184#define IRQ_IXDP2401_INTA_82546 IXP2000_BOARD_IRQ(0)
185#define IRQ_IXDP2401_INTB_82546 IXP2000_BOARD_IRQ(1)
186
187#define IXDP2401_VALID_IRQ_MASK ( \
188 IXDP2X01_VALID_IRQ_MASK | \
189 IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2401_INTA_82546) |\
190 IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2401_INTB_82546))
191
192/*
193 * IXDP2801-specific IRQs
194 */
195#define IRQ_IXDP2801_RIV IXP2000_BOARD_IRQ(0)
196#define IRQ_IXDP2801_CNFG_MEDIA IXP2000_BOARD_IRQ(27)
197#define IRQ_IXDP2801_CLOCK_REF IXP2000_BOARD_IRQ(28)
198
199#define IXDP2801_VALID_IRQ_MASK ( \
200 IXDP2X01_VALID_IRQ_MASK | \
201 IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2801_RIV) |\
202 IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2801_CNFG_MEDIA) |\
203 IXP2000_BOARD_IRQ_MASK(IRQ_IXDP2801_CLOCK_REF))
204
205#define NR_IXDP2X01_IRQS ((IRQ_IXDP2801_CLOCK_REF) + 1)
206
207#endif /*_IRQS_H*/
diff --git a/include/asm-arm/arch-ixp2000/ixdp2x00.h b/include/asm-arm/arch-ixp2000/ixdp2x00.h
deleted file mode 100644
index 546e2e8e27b8..000000000000
--- a/include/asm-arm/arch-ixp2000/ixdp2x00.h
+++ /dev/null
@@ -1,92 +0,0 @@
1/*
2 * include/asm-arm/arch-ixp2000/ixdp2x00.h
3 *
4 * Register and other defines for IXDP2[48]00 platforms
5 *
6 * Original Author: Naeem Afzal <naeem.m.afzal@intel.com>
7 * Maintainer: Deepak Saxena <dsaxena@plexity.net>
8 *
9 * Copyright (C) 2002 Intel Corp.
10 * Copyright (C) 2003-2004 MontaVista Software, Inc.
11 *
12 * This program is free software; you can redistribute it and/or modify it
13 * under the terms of the GNU General Public License as published by the
14 * Free Software Foundation; either version 2 of the License, or (at your
15 * option) any later version.
16 */
17#ifndef _IXDP2X00_H_
18#define _IXDP2X00_H_
19
20/*
21 * On board CPLD memory map
22 */
23#define IXDP2X00_PHYS_CPLD_BASE 0xc7000000
24#define IXDP2X00_VIRT_CPLD_BASE 0xfe000000
25#define IXDP2X00_CPLD_SIZE 0x00100000
26
27
28#define IXDP2X00_CPLD_REG(x) \
29 (volatile unsigned long *)(IXDP2X00_VIRT_CPLD_BASE | x)
30
31/*
32 * IXDP2400 CPLD registers
33 */
34#define IXDP2400_CPLD_SYSLED IXDP2X00_CPLD_REG(0x0)
35#define IXDP2400_CPLD_DISP_DATA IXDP2X00_CPLD_REG(0x4)
36#define IXDP2400_CPLD_CLOCK_SPEED IXDP2X00_CPLD_REG(0x8)
37#define IXDP2400_CPLD_INT_STAT IXDP2X00_CPLD_REG(0xc)
38#define IXDP2400_CPLD_REV IXDP2X00_CPLD_REG(0x10)
39#define IXDP2400_CPLD_SYS_CLK_M IXDP2X00_CPLD_REG(0x14)
40#define IXDP2400_CPLD_SYS_CLK_N IXDP2X00_CPLD_REG(0x18)
41#define IXDP2400_CPLD_INT_MASK IXDP2X00_CPLD_REG(0x48)
42
43/*
44 * IXDP2800 CPLD registers
45 */
46#define IXDP2800_CPLD_INT_STAT IXDP2X00_CPLD_REG(0x0)
47#define IXDP2800_CPLD_INT_MASK IXDP2X00_CPLD_REG(0x140)
48
49
50#define IXDP2X00_GPIO_I2C_ENABLE 0x02
51#define IXDP2X00_GPIO_SCL 0x07
52#define IXDP2X00_GPIO_SDA 0x06
53
54/*
55 * PCI devfns for on-board devices. We need these to be able to
56 * properly translate IRQs and for device removal.
57 */
58#define IXDP2400_SLAVE_ENET_DEVFN 0x18 /* Bus 1 */
59#define IXDP2400_MASTER_ENET_DEVFN 0x20 /* Bus 1 */
60#define IXDP2400_MEDIA_DEVFN 0x28 /* Bus 1 */
61#define IXDP2400_SWITCH_FABRIC_DEVFN 0x30 /* Bus 1 */
62
63#define IXDP2800_SLAVE_ENET_DEVFN 0x20 /* Bus 1 */
64#define IXDP2800_MASTER_ENET_DEVFN 0x18 /* Bus 1 */
65#define IXDP2800_SWITCH_FABRIC_DEVFN 0x30 /* Bus 1 */
66
67#define IXDP2X00_P2P_DEVFN 0x20 /* Bus 0 */
68#define IXDP2X00_21555_DEVFN 0x30 /* Bus 0 */
69#define IXDP2X00_SLAVE_NPU_DEVFN 0x28 /* Bus 1 */
70#define IXDP2X00_PMC_DEVFN 0x38 /* Bus 1 */
71#define IXDP2X00_MASTER_NPU_DEVFN 0x38 /* Bus 1 */
72
73#ifndef __ASSEMBLY__
74/*
75 * The master NPU is always PCI master.
76 */
77static inline unsigned int ixdp2x00_master_npu(void)
78{
79 return !!ixp2000_is_pcimaster();
80}
81
82/*
83 * Helper functions used by ixdp2400 and ixdp2800 specific code
84 */
85void ixdp2x00_init_irq(volatile unsigned long*, volatile unsigned long *, unsigned long);
86void ixdp2x00_slave_pci_postinit(void);
87void ixdp2x00_init_machine(void);
88void ixdp2x00_map_io(void);
89
90#endif
91
92#endif /*_IXDP2X00_H_ */
diff --git a/include/asm-arm/arch-ixp2000/ixdp2x01.h b/include/asm-arm/arch-ixp2000/ixdp2x01.h
deleted file mode 100644
index c6d51426e98f..000000000000
--- a/include/asm-arm/arch-ixp2000/ixdp2x01.h
+++ /dev/null
@@ -1,57 +0,0 @@
1/*
2 * include/asm-arm/arch-ixp2000/ixdp2x01.h
3 *
4 * Platform definitions for IXDP2X01 && IXDP2801 systems
5 *
6 * Author: Deepak Saxena <dsaxena@plexity.net>
7 *
8 * Copyright 2004 (c) MontaVista Software, Inc.
9 *
10 * Based on original code Copyright (c) 2002-2003 Intel Corporation
11 *
12 * This file is licensed under the terms of the GNU General Public
13 * License version 2. This program is licensed "as is" without any
14 * warranty of any kind, whether express or implied.
15 */
16
17#ifndef __IXDP2X01_H__
18#define __IXDP2X01_H__
19
20#define IXDP2X01_PHYS_CPLD_BASE 0xc6024000
21#define IXDP2X01_VIRT_CPLD_BASE 0xfe000000
22#define IXDP2X01_CPLD_REGION_SIZE 0x00100000
23
24#define IXDP2X01_CPLD_VIRT_REG(reg) (volatile unsigned long*)(IXDP2X01_VIRT_CPLD_BASE | reg)
25#define IXDP2X01_CPLD_PHYS_REG(reg) (IXDP2X01_PHYS_CPLD_BASE | reg)
26
27#define IXDP2X01_UART1_VIRT_BASE IXDP2X01_CPLD_VIRT_REG(0x40)
28#define IXDP2X01_UART1_PHYS_BASE IXDP2X01_CPLD_PHYS_REG(0x40)
29
30#define IXDP2X01_UART2_VIRT_BASE IXDP2X01_CPLD_VIRT_REG(0x60)
31#define IXDP2X01_UART2_PHYS_BASE IXDP2X01_CPLD_PHYS_REG(0x60)
32
33#define IXDP2X01_CS8900_VIRT_BASE IXDP2X01_CPLD_VIRT_REG(0x80)
34#define IXDP2X01_CS8900_VIRT_END (IXDP2X01_CS8900_VIRT_BASE + 16)
35
36#define IXDP2X01_CPLD_RESET_REG IXDP2X01_CPLD_VIRT_REG(0x00)
37#define IXDP2X01_INT_MASK_SET_REG IXDP2X01_CPLD_VIRT_REG(0x08)
38#define IXDP2X01_INT_STAT_REG IXDP2X01_CPLD_VIRT_REG(0x0C)
39#define IXDP2X01_INT_RAW_REG IXDP2X01_CPLD_VIRT_REG(0x10)
40#define IXDP2X01_INT_MASK_CLR_REG IXDP2X01_INT_RAW_REG
41#define IXDP2X01_INT_SIM_REG IXDP2X01_CPLD_VIRT_REG(0x14)
42
43#define IXDP2X01_CPLD_FLASH_REG IXDP2X01_CPLD_VIRT_REG(0x20)
44
45#define IXDP2X01_CPLD_FLASH_INTERN 0x8000
46#define IXDP2X01_CPLD_FLASH_BANK_MASK 0xF
47#define IXDP2X01_FLASH_WINDOW_BITS 25
48#define IXDP2X01_FLASH_WINDOW_SIZE (1 << IXDP2X01_FLASH_WINDOW_BITS)
49#define IXDP2X01_FLASH_WINDOW_MASK (IXDP2X01_FLASH_WINDOW_SIZE - 1)
50
51#define IXDP2X01_UART_CLK 1843200
52
53#define IXDP2X01_GPIO_I2C_ENABLE 0x02
54#define IXDP2X01_GPIO_SCL 0x07
55#define IXDP2X01_GPIO_SDA 0x06
56
57#endif /* __IXDP2x01_H__ */
diff --git a/include/asm-arm/arch-ixp2000/ixp2000-regs.h b/include/asm-arm/arch-ixp2000/ixp2000-regs.h
deleted file mode 100644
index ccae4bec92c5..000000000000
--- a/include/asm-arm/arch-ixp2000/ixp2000-regs.h
+++ /dev/null
@@ -1,457 +0,0 @@
1/*
2 * include/asm-arm/arch-ixp2000/ixp2000-regs.h
3 *
4 * Chipset register definitions for IXP2400/2800 based systems.
5 *
6 * Original Author: Naeem Afzal <naeem.m.afzal@intel.com>
7 *
8 * Maintainer: Deepak Saxena <dsaxena@plexity.net>
9 *
10 * Copyright (C) 2002 Intel Corp.
11 * Copyright (C) 2003-2004 MontaVista Software, Inc.
12 *
13 * This program is free software; you can redistribute it and/or modify it
14 * under the terms of the GNU General Public License as published by the
15 * Free Software Foundation; either version 2 of the License, or (at your
16 * option) any later version.
17 */
18#ifndef _IXP2000_REGS_H_
19#define _IXP2000_REGS_H_
20
21/*
22 * IXP2000 linux memory map:
23 *
24 * virt phys size
25 * fb000000 db000000 16M PCI CFG1
26 * fc000000 da000000 16M PCI CFG0
27 * fd000000 d8000000 16M PCI I/O
28 * fe[0-7]00000 8M per-platform mappings
29 * fe900000 80000000 1M SRAM #0 (first MB)
30 * fea00000 cb400000 1M SCRATCH ring get/put
31 * feb00000 c8000000 1M MSF
32 * fec00000 df000000 1M PCI CSRs
33 * fed00000 de000000 1M PCI CREG
34 * fee00000 d6000000 1M INTCTL
35 * fef00000 c0000000 1M CAP
36 */
37
38/*
39 * Static I/O regions.
40 *
41 * Most of the registers are clumped in 4K regions spread throughout
42 * the 0xc0000000 -> 0xc0100000 address range, but we just map in
43 * the whole range using a single 1 MB section instead of small
44 * 4K pages. This has two advantages for us:
45 *
46 * 1) We use only one TLB entry for large number of on-chip I/O devices.
47 *
48 * 2) We can easily set the Section attributes to XCB=101 on the IXP2400
49 * as required per erratum #66. We accomplish this by using a
50 * new MT_IXP2000_DEVICE memory type with the bits set as required.
51 *
52 * CAP stands for CSR Access Proxy.
53 *
54 * If you change the virtual address of this mapping, please propagate
55 * the change to arch/arm/kernel/debug.S, which hardcodes the virtual
56 * address of the UART located in this region.
57 */
58
59#define IXP2000_CAP_PHYS_BASE 0xc0000000
60#define IXP2000_CAP_VIRT_BASE 0xfef00000
61#define IXP2000_CAP_SIZE 0x00100000
62
63/*
64 * Addresses for specific on-chip peripherals.
65 */
66#define IXP2000_SLOWPORT_CSR_VIRT_BASE 0xfef80000
67#define IXP2000_GLOBAL_REG_VIRT_BASE 0xfef04000
68#define IXP2000_UART_PHYS_BASE 0xc0030000
69#define IXP2000_UART_VIRT_BASE 0xfef30000
70#define IXP2000_TIMER_VIRT_BASE 0xfef20000
71#define IXP2000_UENGINE_CSR_VIRT_BASE 0xfef18000
72#define IXP2000_GPIO_VIRT_BASE 0xfef10000
73
74/*
75 * Devices outside of the 0xc0000000 -> 0xc0100000 range. The virtual
76 * addresses of the INTCTL and PCI_CSR mappings are hardcoded in
77 * entry-macro.S, so if you ever change these please propagate
78 * the change.
79 */
80#define IXP2000_INTCTL_PHYS_BASE 0xd6000000
81#define IXP2000_INTCTL_VIRT_BASE 0xfee00000
82#define IXP2000_INTCTL_SIZE 0x00100000
83
84#define IXP2000_PCI_CREG_PHYS_BASE 0xde000000
85#define IXP2000_PCI_CREG_VIRT_BASE 0xfed00000
86#define IXP2000_PCI_CREG_SIZE 0x00100000
87
88#define IXP2000_PCI_CSR_PHYS_BASE 0xdf000000
89#define IXP2000_PCI_CSR_VIRT_BASE 0xfec00000
90#define IXP2000_PCI_CSR_SIZE 0x00100000
91
92#define IXP2000_MSF_PHYS_BASE 0xc8000000
93#define IXP2000_MSF_VIRT_BASE 0xfeb00000
94#define IXP2000_MSF_SIZE 0x00100000
95
96#define IXP2000_SCRATCH_RING_PHYS_BASE 0xcb400000
97#define IXP2000_SCRATCH_RING_VIRT_BASE 0xfea00000
98#define IXP2000_SCRATCH_RING_SIZE 0x00100000
99
100#define IXP2000_SRAM0_PHYS_BASE 0x80000000
101#define IXP2000_SRAM0_VIRT_BASE 0xfe900000
102#define IXP2000_SRAM0_SIZE 0x00100000
103
104#define IXP2000_PCI_IO_PHYS_BASE 0xd8000000
105#define IXP2000_PCI_IO_VIRT_BASE 0xfd000000
106#define IXP2000_PCI_IO_SIZE 0x01000000
107
108#define IXP2000_PCI_CFG0_PHYS_BASE 0xda000000
109#define IXP2000_PCI_CFG0_VIRT_BASE 0xfc000000
110#define IXP2000_PCI_CFG0_SIZE 0x01000000
111
112#define IXP2000_PCI_CFG1_PHYS_BASE 0xdb000000
113#define IXP2000_PCI_CFG1_VIRT_BASE 0xfb000000
114#define IXP2000_PCI_CFG1_SIZE 0x01000000
115
116/*
117 * Timers
118 */
119#define IXP2000_TIMER_REG(x) ((volatile unsigned long*)(IXP2000_TIMER_VIRT_BASE | (x)))
120/* Timer control */
121#define IXP2000_T1_CTL IXP2000_TIMER_REG(0x00)
122#define IXP2000_T2_CTL IXP2000_TIMER_REG(0x04)
123#define IXP2000_T3_CTL IXP2000_TIMER_REG(0x08)
124#define IXP2000_T4_CTL IXP2000_TIMER_REG(0x0c)
125/* Store initial value */
126#define IXP2000_T1_CLD IXP2000_TIMER_REG(0x10)
127#define IXP2000_T2_CLD IXP2000_TIMER_REG(0x14)
128#define IXP2000_T3_CLD IXP2000_TIMER_REG(0x18)
129#define IXP2000_T4_CLD IXP2000_TIMER_REG(0x1c)
130/* Read current value */
131#define IXP2000_T1_CSR IXP2000_TIMER_REG(0x20)
132#define IXP2000_T2_CSR IXP2000_TIMER_REG(0x24)
133#define IXP2000_T3_CSR IXP2000_TIMER_REG(0x28)
134#define IXP2000_T4_CSR IXP2000_TIMER_REG(0x2c)
135/* Clear associated timer interrupt */
136#define IXP2000_T1_CLR IXP2000_TIMER_REG(0x30)
137#define IXP2000_T2_CLR IXP2000_TIMER_REG(0x34)
138#define IXP2000_T3_CLR IXP2000_TIMER_REG(0x38)
139#define IXP2000_T4_CLR IXP2000_TIMER_REG(0x3c)
140/* Timer watchdog enable for T4 */
141#define IXP2000_TWDE IXP2000_TIMER_REG(0x40)
142
143#define WDT_ENABLE 0x00000001
144#define TIMER_DIVIDER_256 0x00000008
145#define TIMER_ENABLE 0x00000080
146#define IRQ_MASK_TIMER1 (1 << 4)
147
148/*
149 * Interrupt controller registers
150 */
151#define IXP2000_INTCTL_REG(x) (volatile unsigned long*)(IXP2000_INTCTL_VIRT_BASE | (x))
152#define IXP2000_IRQ_STATUS IXP2000_INTCTL_REG(0x08)
153#define IXP2000_IRQ_ENABLE IXP2000_INTCTL_REG(0x10)
154#define IXP2000_IRQ_ENABLE_SET IXP2000_INTCTL_REG(0x10)
155#define IXP2000_IRQ_ENABLE_CLR IXP2000_INTCTL_REG(0x18)
156#define IXP2000_FIQ_ENABLE_CLR IXP2000_INTCTL_REG(0x14)
157#define IXP2000_IRQ_ERR_STATUS IXP2000_INTCTL_REG(0x24)
158#define IXP2000_IRQ_ERR_ENABLE_SET IXP2000_INTCTL_REG(0x2c)
159#define IXP2000_FIQ_ERR_ENABLE_CLR IXP2000_INTCTL_REG(0x30)
160#define IXP2000_IRQ_ERR_ENABLE_CLR IXP2000_INTCTL_REG(0x34)
161#define IXP2000_IRQ_THD_RAW_STATUS_A_0 IXP2000_INTCTL_REG(0x60)
162#define IXP2000_IRQ_THD_RAW_STATUS_A_1 IXP2000_INTCTL_REG(0x64)
163#define IXP2000_IRQ_THD_RAW_STATUS_A_2 IXP2000_INTCTL_REG(0x68)
164#define IXP2000_IRQ_THD_RAW_STATUS_A_3 IXP2000_INTCTL_REG(0x6c)
165#define IXP2000_IRQ_THD_RAW_STATUS_B_0 IXP2000_INTCTL_REG(0x80)
166#define IXP2000_IRQ_THD_RAW_STATUS_B_1 IXP2000_INTCTL_REG(0x84)
167#define IXP2000_IRQ_THD_RAW_STATUS_B_2 IXP2000_INTCTL_REG(0x88)
168#define IXP2000_IRQ_THD_RAW_STATUS_B_3 IXP2000_INTCTL_REG(0x8c)
169#define IXP2000_IRQ_THD_STATUS_A_0 IXP2000_INTCTL_REG(0xe0)
170#define IXP2000_IRQ_THD_STATUS_A_1 IXP2000_INTCTL_REG(0xe4)
171#define IXP2000_IRQ_THD_STATUS_A_2 IXP2000_INTCTL_REG(0xe8)
172#define IXP2000_IRQ_THD_STATUS_A_3 IXP2000_INTCTL_REG(0xec)
173#define IXP2000_IRQ_THD_STATUS_B_0 IXP2000_INTCTL_REG(0x100)
174#define IXP2000_IRQ_THD_STATUS_B_1 IXP2000_INTCTL_REG(0x104)
175#define IXP2000_IRQ_THD_STATUS_B_2 IXP2000_INTCTL_REG(0x108)
176#define IXP2000_IRQ_THD_STATUS_B_3 IXP2000_INTCTL_REG(0x10c)
177#define IXP2000_IRQ_THD_ENABLE_SET_A_0 IXP2000_INTCTL_REG(0x160)
178#define IXP2000_IRQ_THD_ENABLE_SET_A_1 IXP2000_INTCTL_REG(0x164)
179#define IXP2000_IRQ_THD_ENABLE_SET_A_2 IXP2000_INTCTL_REG(0x168)
180#define IXP2000_IRQ_THD_ENABLE_SET_A_3 IXP2000_INTCTL_REG(0x16c)
181#define IXP2000_IRQ_THD_ENABLE_SET_B_0 IXP2000_INTCTL_REG(0x180)
182#define IXP2000_IRQ_THD_ENABLE_SET_B_1 IXP2000_INTCTL_REG(0x184)
183#define IXP2000_IRQ_THD_ENABLE_SET_B_2 IXP2000_INTCTL_REG(0x188)
184#define IXP2000_IRQ_THD_ENABLE_SET_B_3 IXP2000_INTCTL_REG(0x18c)
185#define IXP2000_IRQ_THD_ENABLE_CLEAR_A_0 IXP2000_INTCTL_REG(0x1e0)
186#define IXP2000_IRQ_THD_ENABLE_CLEAR_A_1 IXP2000_INTCTL_REG(0x1e4)
187#define IXP2000_IRQ_THD_ENABLE_CLEAR_A_2 IXP2000_INTCTL_REG(0x1e8)
188#define IXP2000_IRQ_THD_ENABLE_CLEAR_A_3 IXP2000_INTCTL_REG(0x1ec)
189#define IXP2000_IRQ_THD_ENABLE_CLEAR_B_0 IXP2000_INTCTL_REG(0x200)
190#define IXP2000_IRQ_THD_ENABLE_CLEAR_B_1 IXP2000_INTCTL_REG(0x204)
191#define IXP2000_IRQ_THD_ENABLE_CLEAR_B_2 IXP2000_INTCTL_REG(0x208)
192#define IXP2000_IRQ_THD_ENABLE_CLEAR_B_3 IXP2000_INTCTL_REG(0x20c)
193
194/*
195 * Mask of valid IRQs in the 32-bit IRQ register. We use
196 * this to mark certain IRQs as being invalid.
197 */
198#define IXP2000_VALID_IRQ_MASK 0x0f0fffff
199
200/*
201 * PCI config register access from core
202 */
203#define IXP2000_PCI_CREG(x) (volatile unsigned long*)(IXP2000_PCI_CREG_VIRT_BASE | (x))
204#define IXP2000_PCI_CMDSTAT IXP2000_PCI_CREG(0x04)
205#define IXP2000_PCI_CSR_BAR IXP2000_PCI_CREG(0x10)
206#define IXP2000_PCI_SRAM_BAR IXP2000_PCI_CREG(0x14)
207#define IXP2000_PCI_SDRAM_BAR IXP2000_PCI_CREG(0x18)
208
209/*
210 * PCI CSRs
211 */
212#define IXP2000_PCI_CSR(x) (volatile unsigned long*)(IXP2000_PCI_CSR_VIRT_BASE | (x))
213
214/*
215 * PCI outbound interrupts
216 */
217#define IXP2000_PCI_OUT_INT_STATUS IXP2000_PCI_CSR(0x30)
218#define IXP2000_PCI_OUT_INT_MASK IXP2000_PCI_CSR(0x34)
219/*
220 * PCI communications
221 */
222#define IXP2000_PCI_MAILBOX0 IXP2000_PCI_CSR(0x50)
223#define IXP2000_PCI_MAILBOX1 IXP2000_PCI_CSR(0x54)
224#define IXP2000_PCI_MAILBOX2 IXP2000_PCI_CSR(0x58)
225#define IXP2000_PCI_MAILBOX3 IXP2000_PCI_CSR(0x5C)
226#define IXP2000_XSCALE_DOORBELL IXP2000_PCI_CSR(0x60)
227#define IXP2000_XSCALE_DOORBELL_SETUP IXP2000_PCI_CSR(0x64)
228#define IXP2000_PCI_DOORBELL IXP2000_PCI_CSR(0x70)
229#define IXP2000_PCI_DOORBELL_SETUP IXP2000_PCI_CSR(0x74)
230
231/*
232 * DMA engines
233 */
234#define IXP2000_PCI_CH1_BYTE_CNT IXP2000_PCI_CSR(0x80)
235#define IXP2000_PCI_CH1_ADDR IXP2000_PCI_CSR(0x84)
236#define IXP2000_PCI_CH1_DRAM_ADDR IXP2000_PCI_CSR(0x88)
237#define IXP2000_PCI_CH1_DESC_PTR IXP2000_PCI_CSR(0x8C)
238#define IXP2000_PCI_CH1_CNTRL IXP2000_PCI_CSR(0x90)
239#define IXP2000_PCI_CH1_ME_PARAM IXP2000_PCI_CSR(0x94)
240#define IXP2000_PCI_CH2_BYTE_CNT IXP2000_PCI_CSR(0xA0)
241#define IXP2000_PCI_CH2_ADDR IXP2000_PCI_CSR(0xA4)
242#define IXP2000_PCI_CH2_DRAM_ADDR IXP2000_PCI_CSR(0xA8)
243#define IXP2000_PCI_CH2_DESC_PTR IXP2000_PCI_CSR(0xAC)
244#define IXP2000_PCI_CH2_CNTRL IXP2000_PCI_CSR(0xB0)
245#define IXP2000_PCI_CH2_ME_PARAM IXP2000_PCI_CSR(0xB4)
246#define IXP2000_PCI_CH3_BYTE_CNT IXP2000_PCI_CSR(0xC0)
247#define IXP2000_PCI_CH3_ADDR IXP2000_PCI_CSR(0xC4)
248#define IXP2000_PCI_CH3_DRAM_ADDR IXP2000_PCI_CSR(0xC8)
249#define IXP2000_PCI_CH3_DESC_PTR IXP2000_PCI_CSR(0xCC)
250#define IXP2000_PCI_CH3_CNTRL IXP2000_PCI_CSR(0xD0)
251#define IXP2000_PCI_CH3_ME_PARAM IXP2000_PCI_CSR(0xD4)
252#define IXP2000_DMA_INF_MODE IXP2000_PCI_CSR(0xE0)
253/*
254 * Size masks for BARs
255 */
256#define IXP2000_PCI_SRAM_BASE_ADDR_MASK IXP2000_PCI_CSR(0xFC)
257#define IXP2000_PCI_DRAM_BASE_ADDR_MASK IXP2000_PCI_CSR(0x100)
258/*
259 * Control and uEngine related
260 */
261#define IXP2000_PCI_CONTROL IXP2000_PCI_CSR(0x13C)
262#define IXP2000_PCI_ADDR_EXT IXP2000_PCI_CSR(0x140)
263#define IXP2000_PCI_ME_PUSH_STATUS IXP2000_PCI_CSR(0x148)
264#define IXP2000_PCI_ME_PUSH_EN IXP2000_PCI_CSR(0x14C)
265#define IXP2000_PCI_ERR_STATUS IXP2000_PCI_CSR(0x150)
266#define IXP2000_PCI_ERR_ENABLE IXP2000_PCI_CSR(0x154)
267/*
268 * Inbound PCI interrupt control
269 */
270#define IXP2000_PCI_XSCALE_INT_STATUS IXP2000_PCI_CSR(0x158)
271#define IXP2000_PCI_XSCALE_INT_ENABLE IXP2000_PCI_CSR(0x15C)
272
273#define IXP2000_PCICNTL_PNR (1<<17) /* PCI not Reset bit of PCI_CONTROL */
274#define IXP2000_PCICNTL_PCF (1<<28) /* PCI Central function bit */
275#define IXP2000_XSCALE_INT (1<<1) /* Interrupt from XScale to PCI */
276
277/* These are from the IRQ register in the PCI ISR register */
278#define PCI_CONTROL_BE_DEO (1 << 22) /* Big Endian Data Enable Out */
279#define PCI_CONTROL_BE_DEI (1 << 21) /* Big Endian Data Enable In */
280#define PCI_CONTROL_BE_BEO (1 << 20) /* Big Endian Byte Enable Out */
281#define PCI_CONTROL_BE_BEI (1 << 19) /* Big Endian Byte Enable In */
282#define PCI_CONTROL_IEE (1 << 17) /* I/O cycle Endian swap Enable */
283
284#define IXP2000_PCI_RST_REL (1 << 2)
285#define CFG_RST_DIR (*IXP2000_PCI_CONTROL & IXP2000_PCICNTL_PCF)
286#define CFG_PCI_BOOT_HOST (1 << 2)
287#define CFG_BOOT_PROM (1 << 1)
288
289/*
290 * SlowPort CSRs
291 *
292 * The slowport is used to access things like flash, SONET framer control
293 * ports, slave microprocessors, CPLDs, and others of chip memory mapped
294 * peripherals.
295 */
296#define SLOWPORT_CSR(x) (volatile unsigned long*)(IXP2000_SLOWPORT_CSR_VIRT_BASE | (x))
297
298#define IXP2000_SLOWPORT_CCR SLOWPORT_CSR(0x00)
299#define IXP2000_SLOWPORT_WTC1 SLOWPORT_CSR(0x04)
300#define IXP2000_SLOWPORT_WTC2 SLOWPORT_CSR(0x08)
301#define IXP2000_SLOWPORT_RTC1 SLOWPORT_CSR(0x0c)
302#define IXP2000_SLOWPORT_RTC2 SLOWPORT_CSR(0x10)
303#define IXP2000_SLOWPORT_FSR SLOWPORT_CSR(0x14)
304#define IXP2000_SLOWPORT_PCR SLOWPORT_CSR(0x18)
305#define IXP2000_SLOWPORT_ADC SLOWPORT_CSR(0x1C)
306#define IXP2000_SLOWPORT_FAC SLOWPORT_CSR(0x20)
307#define IXP2000_SLOWPORT_FRM SLOWPORT_CSR(0x24)
308#define IXP2000_SLOWPORT_FIN SLOWPORT_CSR(0x28)
309
310/*
311 * CCR values.
312 * The CCR configures the clock division for the slowport interface.
313 */
314#define SLOWPORT_CCR_DIV_1 0x00
315#define SLOWPORT_CCR_DIV_2 0x01
316#define SLOWPORT_CCR_DIV_4 0x02
317#define SLOWPORT_CCR_DIV_6 0x03
318#define SLOWPORT_CCR_DIV_8 0x04
319#define SLOWPORT_CCR_DIV_10 0x05
320#define SLOWPORT_CCR_DIV_12 0x06
321#define SLOWPORT_CCR_DIV_14 0x07
322#define SLOWPORT_CCR_DIV_16 0x08
323#define SLOWPORT_CCR_DIV_18 0x09
324#define SLOWPORT_CCR_DIV_20 0x0a
325#define SLOWPORT_CCR_DIV_22 0x0b
326#define SLOWPORT_CCR_DIV_24 0x0c
327#define SLOWPORT_CCR_DIV_26 0x0d
328#define SLOWPORT_CCR_DIV_28 0x0e
329#define SLOWPORT_CCR_DIV_30 0x0f
330
331/*
332 * PCR values. PCR configure the mode of the interface.
333 */
334#define SLOWPORT_MODE_FLASH 0x00
335#define SLOWPORT_MODE_LUCENT 0x01
336#define SLOWPORT_MODE_PMC_SIERRA 0x02
337#define SLOWPORT_MODE_INTEL_UP 0x03
338#define SLOWPORT_MODE_MOTOROLA_UP 0x04
339
340/*
341 * ADC values. Defines data and address bus widths.
342 */
343#define SLOWPORT_ADDR_WIDTH_8 0x00
344#define SLOWPORT_ADDR_WIDTH_16 0x01
345#define SLOWPORT_ADDR_WIDTH_24 0x02
346#define SLOWPORT_ADDR_WIDTH_32 0x03
347#define SLOWPORT_DATA_WIDTH_8 0x00
348#define SLOWPORT_DATA_WIDTH_16 0x10
349#define SLOWPORT_DATA_WIDTH_24 0x20
350#define SLOWPORT_DATA_WIDTH_32 0x30
351
352/*
353 * Masks and shifts for various fields in the WTC and RTC registers.
354 */
355#define SLOWPORT_WRTC_MASK_HD 0x0003
356#define SLOWPORT_WRTC_MASK_PW 0x003c
357#define SLOWPORT_WRTC_MASK_SU 0x03c0
358
359#define SLOWPORT_WRTC_SHIFT_HD 0x00
360#define SLOWPORT_WRTC_SHIFT_SU 0x02
361#define SLOWPORT_WRTC_SHFIT_PW 0x06
362
363
364/*
365 * GPIO registers & GPIO interface.
366 */
367#define IXP2000_GPIO_REG(x) ((volatile unsigned long*)(IXP2000_GPIO_VIRT_BASE+(x)))
368#define IXP2000_GPIO_PLR IXP2000_GPIO_REG(0x00)
369#define IXP2000_GPIO_PDPR IXP2000_GPIO_REG(0x04)
370#define IXP2000_GPIO_PDSR IXP2000_GPIO_REG(0x08)
371#define IXP2000_GPIO_PDCR IXP2000_GPIO_REG(0x0c)
372#define IXP2000_GPIO_POPR IXP2000_GPIO_REG(0x10)
373#define IXP2000_GPIO_POSR IXP2000_GPIO_REG(0x14)
374#define IXP2000_GPIO_POCR IXP2000_GPIO_REG(0x18)
375#define IXP2000_GPIO_REDR IXP2000_GPIO_REG(0x1c)
376#define IXP2000_GPIO_FEDR IXP2000_GPIO_REG(0x20)
377#define IXP2000_GPIO_EDSR IXP2000_GPIO_REG(0x24)
378#define IXP2000_GPIO_LSHR IXP2000_GPIO_REG(0x28)
379#define IXP2000_GPIO_LSLR IXP2000_GPIO_REG(0x2c)
380#define IXP2000_GPIO_LDSR IXP2000_GPIO_REG(0x30)
381#define IXP2000_GPIO_INER IXP2000_GPIO_REG(0x34)
382#define IXP2000_GPIO_INSR IXP2000_GPIO_REG(0x38)
383#define IXP2000_GPIO_INCR IXP2000_GPIO_REG(0x3c)
384#define IXP2000_GPIO_INST IXP2000_GPIO_REG(0x40)
385
386/*
387 * "Global" registers...whatever that's supposed to mean.
388 */
389#define GLOBAL_REG_BASE (IXP2000_GLOBAL_REG_VIRT_BASE + 0x0a00)
390#define GLOBAL_REG(x) (volatile unsigned long*)(GLOBAL_REG_BASE | (x))
391
392#define IXP2000_MAJ_PROD_TYPE_MASK 0x001F0000
393#define IXP2000_MAJ_PROD_TYPE_IXP2000 0x00000000
394#define IXP2000_MIN_PROD_TYPE_MASK 0x0000FF00
395#define IXP2000_MIN_PROD_TYPE_IXP2400 0x00000200
396#define IXP2000_MIN_PROD_TYPE_IXP2850 0x00000100
397#define IXP2000_MIN_PROD_TYPE_IXP2800 0x00000000
398#define IXP2000_MAJ_REV_MASK 0x000000F0
399#define IXP2000_MIN_REV_MASK 0x0000000F
400#define IXP2000_PROD_ID_MASK 0xFFFFFFFF
401
402#define IXP2000_PRODUCT_ID GLOBAL_REG(0x00)
403#define IXP2000_MISC_CONTROL GLOBAL_REG(0x04)
404#define IXP2000_MSF_CLK_CNTRL GLOBAL_REG(0x08)
405#define IXP2000_RESET0 GLOBAL_REG(0x0c)
406#define IXP2000_RESET1 GLOBAL_REG(0x10)
407#define IXP2000_CCR GLOBAL_REG(0x14)
408#define IXP2000_STRAP_OPTIONS GLOBAL_REG(0x18)
409
410#define RSTALL (1 << 16)
411#define WDT_RESET_ENABLE 0x01000000
412
413
414/*
415 * MSF registers. The IXP2400 and IXP2800 have somewhat different MSF
416 * units, but the registers that differ between the two don't overlap,
417 * so we can have one register list for both.
418 */
419#define IXP2000_MSF_REG(x) ((volatile unsigned long*)(IXP2000_MSF_VIRT_BASE + (x)))
420#define IXP2000_MSF_RX_CONTROL IXP2000_MSF_REG(0x0000)
421#define IXP2000_MSF_TX_CONTROL IXP2000_MSF_REG(0x0004)
422#define IXP2000_MSF_INTERRUPT_STATUS IXP2000_MSF_REG(0x0008)
423#define IXP2000_MSF_INTERRUPT_ENABLE IXP2000_MSF_REG(0x000c)
424#define IXP2000_MSF_CSIX_TYPE_MAP IXP2000_MSF_REG(0x0010)
425#define IXP2000_MSF_FC_EGRESS_STATUS IXP2000_MSF_REG(0x0014)
426#define IXP2000_MSF_FC_INGRESS_STATUS IXP2000_MSF_REG(0x0018)
427#define IXP2000_MSF_HWM_CONTROL IXP2000_MSF_REG(0x0024)
428#define IXP2000_MSF_FC_STATUS_OVERRIDE IXP2000_MSF_REG(0x0028)
429#define IXP2000_MSF_CLOCK_CONTROL IXP2000_MSF_REG(0x002c)
430#define IXP2000_MSF_RX_PORT_MAP IXP2000_MSF_REG(0x0040)
431#define IXP2000_MSF_RBUF_ELEMENT_DONE IXP2000_MSF_REG(0x0044)
432#define IXP2000_MSF_RX_MPHY_POLL_LIMIT IXP2000_MSF_REG(0x0048)
433#define IXP2000_MSF_RX_CALENDAR_LENGTH IXP2000_MSF_REG(0x0048)
434#define IXP2000_MSF_RX_THREAD_FREELIST_TIMEOUT_0 IXP2000_MSF_REG(0x0050)
435#define IXP2000_MSF_RX_THREAD_FREELIST_TIMEOUT_1 IXP2000_MSF_REG(0x0054)
436#define IXP2000_MSF_RX_THREAD_FREELIST_TIMEOUT_2 IXP2000_MSF_REG(0x0058)
437#define IXP2000_MSF_TX_SEQUENCE_0 IXP2000_MSF_REG(0x0060)
438#define IXP2000_MSF_TX_SEQUENCE_1 IXP2000_MSF_REG(0x0064)
439#define IXP2000_MSF_TX_SEQUENCE_2 IXP2000_MSF_REG(0x0068)
440#define IXP2000_MSF_TX_MPHY_POLL_LIMIT IXP2000_MSF_REG(0x0070)
441#define IXP2000_MSF_TX_CALENDAR_LENGTH IXP2000_MSF_REG(0x0070)
442#define IXP2000_MSF_RX_UP_CONTROL_0 IXP2000_MSF_REG(0x0080)
443#define IXP2000_MSF_RX_UP_CONTROL_1 IXP2000_MSF_REG(0x0084)
444#define IXP2000_MSF_RX_UP_CONTROL_2 IXP2000_MSF_REG(0x0088)
445#define IXP2000_MSF_RX_UP_CONTROL_3 IXP2000_MSF_REG(0x008c)
446#define IXP2000_MSF_TX_UP_CONTROL_0 IXP2000_MSF_REG(0x0090)
447#define IXP2000_MSF_TX_UP_CONTROL_1 IXP2000_MSF_REG(0x0094)
448#define IXP2000_MSF_TX_UP_CONTROL_2 IXP2000_MSF_REG(0x0098)
449#define IXP2000_MSF_TX_UP_CONTROL_3 IXP2000_MSF_REG(0x009c)
450#define IXP2000_MSF_TRAIN_DATA IXP2000_MSF_REG(0x00a0)
451#define IXP2000_MSF_TRAIN_CALENDAR IXP2000_MSF_REG(0x00a4)
452#define IXP2000_MSF_TRAIN_FLOW_CONTROL IXP2000_MSF_REG(0x00a8)
453#define IXP2000_MSF_TX_CALENDAR_0 IXP2000_MSF_REG(0x1000)
454#define IXP2000_MSF_RX_PORT_CALENDAR_STATUS IXP2000_MSF_REG(0x1400)
455
456
457#endif /* _IXP2000_H_ */
diff --git a/include/asm-arm/arch-ixp2000/memory.h b/include/asm-arm/arch-ixp2000/memory.h
deleted file mode 100644
index 21e1de51e3f6..000000000000
--- a/include/asm-arm/arch-ixp2000/memory.h
+++ /dev/null
@@ -1,34 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-ixp2000/memory.h
3 *
4 * Copyright (c) 2002 Intel Corp.
5 * Copyright (c) 2003-2004 MontaVista Software, Inc.
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; either version 2 of the License, or (at your
10 * option) any later version.
11 */
12
13#ifndef __ASM_ARCH_MEMORY_H
14#define __ASM_ARCH_MEMORY_H
15
16#define PHYS_OFFSET UL(0x00000000)
17
18/*
19 * Virtual view <-> DMA view memory address translations
20 * virt_to_bus: Used to translate the virtual address to an
21 * address suitable to be passed to set_dma_addr
22 * bus_to_virt: Used to convert an address for DMA operations
23 * to an address that the kernel can use.
24 */
25#include <asm/arch/ixp2000-regs.h>
26
27#define __virt_to_bus(v) \
28 (((__virt_to_phys(v) - 0x0) + (*IXP2000_PCI_SDRAM_BAR & 0xfffffff0)))
29
30#define __bus_to_virt(b) \
31 __phys_to_virt((((b - (*IXP2000_PCI_SDRAM_BAR & 0xfffffff0)) + 0x0)))
32
33#endif
34
diff --git a/include/asm-arm/arch-ixp2000/platform.h b/include/asm-arm/arch-ixp2000/platform.h
deleted file mode 100644
index a66317ab2071..000000000000
--- a/include/asm-arm/arch-ixp2000/platform.h
+++ /dev/null
@@ -1,152 +0,0 @@
1/*
2 * include/asm-arm/arch-ixp2000/platform.h
3 *
4 * Various bits of code used by platform-level code.
5 *
6 * Author: Deepak Saxena <dsaxena@plexity.net>
7 *
8 * Copyright 2004 (c) MontaVista Software, Inc.
9 *
10 * This file is licensed under the terms of the GNU General Public
11 * License version 2. This program is licensed "as is" without any
12 * warranty of any kind, whether express or implied.
13 */
14
15
16#ifndef __ASSEMBLY__
17
18static inline unsigned long ixp2000_reg_read(volatile void *reg)
19{
20 return *((volatile unsigned long *)reg);
21}
22
23static inline void ixp2000_reg_write(volatile void *reg, unsigned long val)
24{
25 *((volatile unsigned long *)reg) = val;
26}
27
28/*
29 * On the IXP2400, we can't use XCB=000 due to chip bugs. We use
30 * XCB=101 instead, but that makes all I/O accesses bufferable. This
31 * is not a problem in general, but we do have to be slightly more
32 * careful because I/O writes are no longer automatically flushed out
33 * of the write buffer.
34 *
35 * In cases where we want to make sure that a write has been flushed
36 * out of the write buffer before we proceed, for example when masking
37 * a device interrupt before re-enabling IRQs in CPSR, we can use this
38 * function, ixp2000_reg_wrb, which performs a write, a readback, and
39 * issues a dummy instruction dependent on the value of the readback
40 * (mov rX, rX) to make sure that the readback has completed before we
41 * continue.
42 */
43static inline void ixp2000_reg_wrb(volatile void *reg, unsigned long val)
44{
45 unsigned long dummy;
46
47 *((volatile unsigned long *)reg) = val;
48
49 dummy = *((volatile unsigned long *)reg);
50 __asm__ __volatile__("mov %0, %0" : "+r" (dummy));
51}
52
53/*
54 * Boards may multiplex different devices on the 2nd channel of
55 * the slowport interface that each need different configuration
56 * settings. For example, the IXDP2400 uses channel 2 on the interface
57 * to access the CPLD, the switch fabric card, and the media card. Each
58 * one needs a different mode so drivers must save/restore the mode
59 * before and after each operation.
60 *
61 * acquire_slowport(&your_config);
62 * ...
63 * do slowport operations
64 * ...
65 * release_slowport();
66 *
67 * Note that while you have the slowport, you are holding a spinlock,
68 * so your code should be written as if you explicitly acquired a lock.
69 *
70 * The configuration only affects device 2 on the slowport, so the
71 * MTD map driver does not acquire/release the slowport.
72 */
73struct slowport_cfg {
74 unsigned long CCR; /* Clock divide */
75 unsigned long WTC; /* Write Timing Control */
76 unsigned long RTC; /* Read Timing Control */
77 unsigned long PCR; /* Protocol Control Register */
78 unsigned long ADC; /* Address/Data Width Control */
79};
80
81
82void ixp2000_acquire_slowport(struct slowport_cfg *, struct slowport_cfg *);
83void ixp2000_release_slowport(struct slowport_cfg *);
84
85/*
86 * IXP2400 A0/A1 and IXP2800 A0/A1/A2 have broken slowport that requires
87 * tweaking of addresses in the MTD driver.
88 */
89static inline unsigned ixp2000_has_broken_slowport(void)
90{
91 unsigned long id = *IXP2000_PRODUCT_ID;
92 unsigned long id_prod = id & (IXP2000_MAJ_PROD_TYPE_MASK |
93 IXP2000_MIN_PROD_TYPE_MASK);
94 return (((id_prod ==
95 /* fixed in IXP2400-B0 */
96 (IXP2000_MAJ_PROD_TYPE_IXP2000 |
97 IXP2000_MIN_PROD_TYPE_IXP2400)) &&
98 ((id & IXP2000_MAJ_REV_MASK) == 0)) ||
99 ((id_prod ==
100 /* fixed in IXP2800-B0 */
101 (IXP2000_MAJ_PROD_TYPE_IXP2000 |
102 IXP2000_MIN_PROD_TYPE_IXP2800)) &&
103 ((id & IXP2000_MAJ_REV_MASK) == 0)) ||
104 ((id_prod ==
105 /* fixed in IXP2850-B0 */
106 (IXP2000_MAJ_PROD_TYPE_IXP2000 |
107 IXP2000_MIN_PROD_TYPE_IXP2850)) &&
108 ((id & IXP2000_MAJ_REV_MASK) == 0)));
109}
110
111static inline unsigned int ixp2000_has_flash(void)
112{
113 return ((*IXP2000_STRAP_OPTIONS) & (CFG_BOOT_PROM));
114}
115
116static inline unsigned int ixp2000_is_pcimaster(void)
117{
118 return ((*IXP2000_STRAP_OPTIONS) & (CFG_PCI_BOOT_HOST));
119}
120
121void ixp2000_map_io(void);
122void ixp2000_uart_init(void);
123void ixp2000_init_irq(void);
124void ixp2000_init_time(unsigned long);
125unsigned long ixp2000_gettimeoffset(void);
126
127struct pci_sys_data;
128
129u32 *ixp2000_pci_config_addr(unsigned int bus, unsigned int devfn, int where);
130void ixp2000_pci_preinit(void);
131int ixp2000_pci_setup(int, struct pci_sys_data*);
132struct pci_bus* ixp2000_pci_scan_bus(int, struct pci_sys_data*);
133int ixp2000_pci_read_config(struct pci_bus*, unsigned int, int, int, u32 *);
134int ixp2000_pci_write_config(struct pci_bus*, unsigned int, int, int, u32);
135
136/*
137 * Several of the IXP2000 systems have banked flash so we need to extend the
138 * flash_platform_data structure with some private pointers
139 */
140struct ixp2000_flash_data {
141 struct flash_platform_data *platform_data;
142 int nr_banks;
143 unsigned long (*bank_setup)(unsigned long);
144};
145
146struct ixp2000_i2c_pins {
147 unsigned long sda_pin;
148 unsigned long scl_pin;
149};
150
151
152#endif /* !__ASSEMBLY__ */
diff --git a/include/asm-arm/arch-ixp2000/system.h b/include/asm-arm/arch-ixp2000/system.h
deleted file mode 100644
index 3cc9a04f68cb..000000000000
--- a/include/asm-arm/arch-ixp2000/system.h
+++ /dev/null
@@ -1,49 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-ixp2000/system.h
3 *
4 * Copyright (C) 2002 Intel Corp.
5 * Copyricht (C) 2003-2005 MontaVista Software, Inc.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 */
11
12#include <asm/hardware.h>
13#include <asm/mach-types.h>
14
15static inline void arch_idle(void)
16{
17 cpu_do_idle();
18}
19
20static inline void arch_reset(char mode)
21{
22 local_irq_disable();
23
24 /*
25 * Reset flash banking register so that we are pointing at
26 * RedBoot bank.
27 */
28 if (machine_is_ixdp2401()) {
29 ixp2000_reg_write(IXDP2X01_CPLD_FLASH_REG,
30 ((0 >> IXDP2X01_FLASH_WINDOW_BITS)
31 | IXDP2X01_CPLD_FLASH_INTERN));
32 ixp2000_reg_wrb(IXDP2X01_CPLD_RESET_REG, 0xffffffff);
33 }
34
35 /*
36 * On IXDP2801 we need to write this magic sequence to the CPLD
37 * to cause a complete reset of the CPU and all external devices
38 * and move the flash bank register back to 0.
39 */
40 if (machine_is_ixdp2801() || machine_is_ixdp28x5()) {
41 unsigned long reset_reg = *IXDP2X01_CPLD_RESET_REG;
42
43 reset_reg = 0x55AA0000 | (reset_reg & 0x0000FFFF);
44 ixp2000_reg_write(IXDP2X01_CPLD_RESET_REG, reset_reg);
45 ixp2000_reg_wrb(IXDP2X01_CPLD_RESET_REG, 0x80000000);
46 }
47
48 ixp2000_reg_wrb(IXP2000_RESET0, RSTALL);
49}
diff --git a/include/asm-arm/arch-ixp2000/timex.h b/include/asm-arm/arch-ixp2000/timex.h
deleted file mode 100644
index b78a183d4698..000000000000
--- a/include/asm-arm/arch-ixp2000/timex.h
+++ /dev/null
@@ -1,13 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-ixp2000/timex.h
3 *
4 * IXP2000 architecture timex specifications
5 */
6
7
8/*
9 * Default clock is 50MHz APB, but platform code can override this
10 */
11#define CLOCK_TICK_RATE 50000000
12
13
diff --git a/include/asm-arm/arch-ixp2000/uncompress.h b/include/asm-arm/arch-ixp2000/uncompress.h
deleted file mode 100644
index f66b408f363e..000000000000
--- a/include/asm-arm/arch-ixp2000/uncompress.h
+++ /dev/null
@@ -1,47 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-ixp2000/uncompress.h
3 *
4 *
5 * Original Author: Naeem Afzal <naeem.m.afzal@intel.com>
6 * Maintainer: Deepak Saxena <dsaxena@plexity.net>
7 *
8 * Copyright 2002 Intel Corp.
9 *
10 * This program is free software; you can redistribute it and/or modify it
11 * under the terms of the GNU General Public License as published by the
12 * Free Software Foundation; either version 2 of the License, or (at your
13 * option) any later version.
14 *
15 */
16
17#include <linux/serial_reg.h>
18
19#define UART_BASE 0xc0030000
20
21#define PHYS(x) ((volatile unsigned long *)(UART_BASE + x))
22
23#define UARTDR PHYS(0x00) /* Transmit reg dlab=0 */
24#define UARTDLL PHYS(0x00) /* Divisor Latch reg dlab=1*/
25#define UARTDLM PHYS(0x04) /* Divisor Latch reg dlab=1*/
26#define UARTIER PHYS(0x04) /* Interrupt enable reg */
27#define UARTFCR PHYS(0x08) /* FIFO control reg dlab =0*/
28#define UARTLCR PHYS(0x0c) /* Control reg */
29#define UARTSR PHYS(0x14) /* Status reg */
30
31
32static inline void putc(int c)
33{
34 int j = 0x1000;
35
36 while (--j && !(*UARTSR & UART_LSR_THRE))
37 barrier();
38
39 *UARTDR = c;
40}
41
42static inline void flush(void)
43{
44}
45
46#define arch_decomp_setup()
47#define arch_decomp_wdog()
diff --git a/include/asm-arm/arch-ixp2000/vmalloc.h b/include/asm-arm/arch-ixp2000/vmalloc.h
deleted file mode 100644
index 275136963a0c..000000000000
--- a/include/asm-arm/arch-ixp2000/vmalloc.h
+++ /dev/null
@@ -1,20 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-ixp2000/vmalloc.h
3 *
4 * Author: Naeem Afzal <naeem.m.afzal@intel.com>
5 *
6 * Copyright 2002 Intel Corp.
7 *
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License as published by the
10 * Free Software Foundation; either version 2 of the License, or (at your
11 * option) any later version.
12 *
13 * Just any arbitrary offset to the start of the vmalloc VM area: the
14 * current 8MB value just means that there will be a 8MB "hole" after the
15 * physical memory until the kernel virtual memory starts. That means that
16 * any out-of-bounds memory accesses will hopefully be caught.
17 * The vmalloc() routines leaves a hole of 4kB between each vmalloced
18 * area for the same reason. ;)
19 */
20#define VMALLOC_END 0xfb000000
diff --git a/include/asm-arm/arch-ixp23xx/debug-macro.S b/include/asm-arm/arch-ixp23xx/debug-macro.S
deleted file mode 100644
index 2b25e640247d..000000000000
--- a/include/asm-arm/arch-ixp23xx/debug-macro.S
+++ /dev/null
@@ -1,26 +0,0 @@
1/*
2 * include/asm-arm/arch-ixp23xx/debug-macro.S
3 *
4 * Debugging macro include header
5 *
6 * Copyright (C) 1994-1999 Russell King
7 * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12 */
13#include <asm/arch/ixp23xx.h>
14
15 .macro addruart,rx
16 mrc p15, 0, \rx, c1, c0
17 tst \rx, #1 @ mmu enabled?
18 ldreq \rx, =IXP23XX_PERIPHERAL_PHYS @ physical
19 ldrne \rx, =IXP23XX_PERIPHERAL_VIRT @ virtual
20#ifdef __ARMEB__
21 orr \rx, \rx, #0x00000003
22#endif
23 .endm
24
25#define UART_SHIFT 2
26#include <asm/hardware/debug-8250.S>
diff --git a/include/asm-arm/arch-ixp23xx/dma.h b/include/asm-arm/arch-ixp23xx/dma.h
deleted file mode 100644
index 2f4335e3b836..000000000000
--- a/include/asm-arm/arch-ixp23xx/dma.h
+++ /dev/null
@@ -1,3 +0,0 @@
1/*
2 * include/asm-arm/arch-ixp23xx/dma.h
3 */
diff --git a/include/asm-arm/arch-ixp23xx/entry-macro.S b/include/asm-arm/arch-ixp23xx/entry-macro.S
deleted file mode 100644
index ec9dd6fc2d0f..000000000000
--- a/include/asm-arm/arch-ixp23xx/entry-macro.S
+++ /dev/null
@@ -1,37 +0,0 @@
1/*
2 * include/asm-arm/arch-ixp23xx/entry-macro.S
3 */
4
5 .macro disable_fiq
6 .endm
7
8 .macro get_irqnr_preamble, base, tmp
9 .endm
10
11 .macro arch_ret_to_user, tmp1, tmp2
12 .endm
13
14 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
15 ldr \irqnr, =(IXP23XX_INTC_VIRT + IXP23XX_INTR_IRQ_ENC_ST_OFFSET)
16 ldr \irqnr, [\irqnr] @ get interrupt number
17 cmp \irqnr, #0x0 @ spurious interrupt ?
18 movne \irqnr, \irqnr, lsr #2 @ skip unwanted low order bits
19 subne \irqnr, \irqnr, #1 @ convert to 0 based
20
21#if 0
22 cmp \irqnr, #IRQ_IXP23XX_PCI_INT_RPH
23 bne 1001f
24 mov \irqnr, #IRQ_IXP23XX_INTA
25
26 ldr \irqnr, =0xf5000030
27
28 mov \tmp, #(1<<26)
29 tst \irqnr, \tmp
30 movne \irqnr, #IRQ_IXP23XX_INTB
31
32 mov \tmp, #(1<<27)
33 tst \irqnr, \tmp
34 movne \irqnr, #IRQ_IXP23XX_INTA
351001:
36#endif
37 .endm
diff --git a/include/asm-arm/arch-ixp23xx/hardware.h b/include/asm-arm/arch-ixp23xx/hardware.h
deleted file mode 100644
index c0010d21a684..000000000000
--- a/include/asm-arm/arch-ixp23xx/hardware.h
+++ /dev/null
@@ -1,37 +0,0 @@
1/*
2 * include/asm-arm/arch-ixp23xx/hardware.h
3 *
4 * Copyright (C) 2002-2004 Intel Corporation.
5 * Copyricht (C) 2005 MontaVista Software, Inc.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 *
11 * Hardware definitions for IXP23XX based systems
12 */
13
14#ifndef __ASM_ARCH_HARDWARE_H
15#define __ASM_ARCH_HARDWARE_H
16
17/* PCI IO info */
18#define PCIO_BASE IXP23XX_PCI_IO_VIRT
19#define PCIBIOS_MIN_IO 0x00000000
20#define PCIBIOS_MIN_MEM 0xe0000000
21
22#include "ixp23xx.h"
23
24#define pcibios_assign_all_busses() 0
25
26/*
27 * Platform helper functions
28 */
29#include "platform.h"
30
31/*
32 * Platform-specific headers
33 */
34#include "ixdp2351.h"
35
36
37#endif
diff --git a/include/asm-arm/arch-ixp23xx/io.h b/include/asm-arm/arch-ixp23xx/io.h
deleted file mode 100644
index 66f5bafc315c..000000000000
--- a/include/asm-arm/arch-ixp23xx/io.h
+++ /dev/null
@@ -1,54 +0,0 @@
1/*
2 * include/asm-arm/arch-ixp23xx/io.h
3 *
4 * Original Author: Naeem M Afzal <naeem.m.afzal@intel.com>
5 * Maintainer: Deepak Saxena <dsaxena@plexity.net>
6 *
7 * Copyright (C) 2003-2005 Intel Corp.
8 * Copyright (C) 2005 MontaVista Software, Inc
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
13 */
14
15#ifndef __ASM_ARCH_IO_H
16#define __ASM_ARCH_IO_H
17
18#define IO_SPACE_LIMIT 0xffffffff
19
20#define __io(p) ((void __iomem*)((p) + IXP23XX_PCI_IO_VIRT))
21#define __mem_pci(a) (a)
22
23#include <linux/kernel.h> /* For BUG */
24
25static inline void __iomem *
26ixp23xx_ioremap(unsigned long addr, unsigned long size, unsigned int mtype)
27{
28 if (addr >= IXP23XX_PCI_MEM_START &&
29 addr <= IXP23XX_PCI_MEM_START + IXP23XX_PCI_MEM_SIZE) {
30 if (addr + size > IXP23XX_PCI_MEM_START + IXP23XX_PCI_MEM_SIZE)
31 return NULL;
32
33 return (void __iomem *)
34 ((addr - IXP23XX_PCI_MEM_START) + IXP23XX_PCI_MEM_VIRT);
35 }
36
37 return __arm_ioremap(addr, size, mtype);
38}
39
40static inline void
41ixp23xx_iounmap(void __iomem *addr)
42{
43 if ((((u32)addr) >= IXP23XX_PCI_MEM_VIRT) &&
44 (((u32)addr) < IXP23XX_PCI_MEM_VIRT + IXP23XX_PCI_MEM_SIZE))
45 return;
46
47 __iounmap(addr);
48}
49
50#define __arch_ioremap(a,s,f) ixp23xx_ioremap(a,s,f)
51#define __arch_iounmap(a) ixp23xx_iounmap(a)
52
53
54#endif
diff --git a/include/asm-arm/arch-ixp23xx/irqs.h b/include/asm-arm/arch-ixp23xx/irqs.h
deleted file mode 100644
index 27c580898958..000000000000
--- a/include/asm-arm/arch-ixp23xx/irqs.h
+++ /dev/null
@@ -1,223 +0,0 @@
1/*
2 * include/asm-arm/arch-ixp23xx/irqs.h
3 *
4 * IRQ definitions for IXP23XX based systems
5 *
6 * Author: Naeem Afzal <naeem.m.afzal@intel.com>
7 *
8 * Copyright (C) 2003-2004 Intel Corporation.
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
13 */
14
15#ifndef __ASM_ARCH_IRQS_H
16#define __ASM_ARCH_IRQS_H
17
18#define NR_IXP23XX_IRQS IRQ_IXP23XX_INTB+1
19#define IRQ_IXP23XX_EXTIRQS NR_IXP23XX_IRQS
20
21
22#define IRQ_IXP23XX_DBG0 0 /* Debug/Execution/MBox */
23#define IRQ_IXP23XX_DBG1 1 /* Debug/Execution/MBox */
24#define IRQ_IXP23XX_NPE_TRG 2 /* npe_trigger */
25#define IRQ_IXP23XX_TIMER1 3 /* Timer[0] */
26#define IRQ_IXP23XX_TIMER2 4 /* Timer[1] */
27#define IRQ_IXP23XX_TIMESTAMP 5 /* Timer[2], Time-stamp */
28#define IRQ_IXP23XX_WDOG 6 /* Time[3], Watchdog Timer */
29#define IRQ_IXP23XX_PCI_DBELL 7 /* PCI Doorbell */
30#define IRQ_IXP23XX_PCI_DMA1 8 /* PCI DMA Channel 1 */
31#define IRQ_IXP23XX_PCI_DMA2 9 /* PCI DMA Channel 2 */
32#define IRQ_IXP23XX_PCI_DMA3 10 /* PCI DMA Channel 3 */
33#define IRQ_IXP23XX_PCI_INT_RPH 11 /* pcxg_pci_int_rph */
34#define IRQ_IXP23XX_CPP_PMU 12 /* xpxg_pm_int_rpl */
35#define IRQ_IXP23XX_SWINT0 13 /* S/W Interrupt0 */
36#define IRQ_IXP23XX_SWINT1 14 /* S/W Interrupt1 */
37#define IRQ_IXP23XX_UART2 15 /* UART1 Interrupt */
38#define IRQ_IXP23XX_UART1 16 /* UART0 Interrupt */
39#define IRQ_IXP23XX_XSI_PMU_ROLLOVER 17 /* AHB Performance M. Unit counter rollover */
40#define IRQ_IXP23XX_XSI_AHB_PM0 18 /* intr_pm_o */
41#define IRQ_IXP23XX_XSI_AHB_ECE0 19 /* intr_ece_o */
42#define IRQ_IXP23XX_XSI_AHB_GASKET 20 /* gas_intr_o */
43#define IRQ_IXP23XX_XSI_CPP 21 /* xsi2cpp_int */
44#define IRQ_IXP23XX_CPP_XSI 22 /* cpp2xsi_int */
45#define IRQ_IXP23XX_ME_ATTN0 23 /* ME_ATTN */
46#define IRQ_IXP23XX_ME_ATTN1 24 /* ME_ATTN */
47#define IRQ_IXP23XX_ME_ATTN2 25 /* ME_ATTN */
48#define IRQ_IXP23XX_ME_ATTN3 26 /* ME_ATTN */
49#define IRQ_IXP23XX_PCI_ERR_RPH 27 /* PCXG_PCI_ERR_RPH */
50#define IRQ_IXP23XX_D0XG_ECC_CORR 28 /* D0XG_DRAM_ECC_CORR */
51#define IRQ_IXP23XX_D0XG_ECC_UNCORR 29 /* D0XG_DRAM_ECC_UNCORR */
52#define IRQ_IXP23XX_SRAM_ERR1 30 /* SRAM1_ERR */
53#define IRQ_IXP23XX_SRAM_ERR0 31 /* SRAM0_ERR */
54#define IRQ_IXP23XX_MEDIA_ERR 32 /* MEDIA_ERR */
55#define IRQ_IXP23XX_STH_DRAM_ECC_MAJ 33 /* STH_DRAM0_ECC_MAJ */
56#define IRQ_IXP23XX_GPIO6 34 /* GPIO0 interrupts */
57#define IRQ_IXP23XX_GPIO7 35 /* GPIO1 interrupts */
58#define IRQ_IXP23XX_GPIO8 36 /* GPIO2 interrupts */
59#define IRQ_IXP23XX_GPIO9 37 /* GPIO3 interrupts */
60#define IRQ_IXP23XX_GPIO10 38 /* GPIO4 interrupts */
61#define IRQ_IXP23XX_GPIO11 39 /* GPIO5 interrupts */
62#define IRQ_IXP23XX_GPIO12 40 /* GPIO6 interrupts */
63#define IRQ_IXP23XX_GPIO13 41 /* GPIO7 interrupts */
64#define IRQ_IXP23XX_GPIO14 42 /* GPIO8 interrupts */
65#define IRQ_IXP23XX_GPIO15 43 /* GPIO9 interrupts */
66#define IRQ_IXP23XX_SHAC_RING0 44 /* SHAC Ring Full */
67#define IRQ_IXP23XX_SHAC_RING1 45 /* SHAC Ring Full */
68#define IRQ_IXP23XX_SHAC_RING2 46 /* SHAC Ring Full */
69#define IRQ_IXP23XX_SHAC_RING3 47 /* SHAC Ring Full */
70#define IRQ_IXP23XX_SHAC_RING4 48 /* SHAC Ring Full */
71#define IRQ_IXP23XX_SHAC_RING5 49 /* SHAC Ring Full */
72#define IRQ_IXP23XX_SHAC_RING6 50 /* SHAC RING Full */
73#define IRQ_IXP23XX_SHAC_RING7 51 /* SHAC Ring Full */
74#define IRQ_IXP23XX_SHAC_RING8 52 /* SHAC Ring Full */
75#define IRQ_IXP23XX_SHAC_RING9 53 /* SHAC Ring Full */
76#define IRQ_IXP23XX_SHAC_RING10 54 /* SHAC Ring Full */
77#define IRQ_IXP23XX_SHAC_RING11 55 /* SHAC Ring Full */
78#define IRQ_IXP23XX_ME_THREAD_A0_ME0 56 /* ME_THREAD_A */
79#define IRQ_IXP23XX_ME_THREAD_A1_ME0 57 /* ME_THREAD_A */
80#define IRQ_IXP23XX_ME_THREAD_A2_ME0 58 /* ME_THREAD_A */
81#define IRQ_IXP23XX_ME_THREAD_A3_ME0 59 /* ME_THREAD_A */
82#define IRQ_IXP23XX_ME_THREAD_A4_ME0 60 /* ME_THREAD_A */
83#define IRQ_IXP23XX_ME_THREAD_A5_ME0 61 /* ME_THREAD_A */
84#define IRQ_IXP23XX_ME_THREAD_A6_ME0 62 /* ME_THREAD_A */
85#define IRQ_IXP23XX_ME_THREAD_A7_ME0 63 /* ME_THREAD_A */
86#define IRQ_IXP23XX_ME_THREAD_A8_ME1 64 /* ME_THREAD_A */
87#define IRQ_IXP23XX_ME_THREAD_A9_ME1 65 /* ME_THREAD_A */
88#define IRQ_IXP23XX_ME_THREAD_A10_ME1 66 /* ME_THREAD_A */
89#define IRQ_IXP23XX_ME_THREAD_A11_ME1 67 /* ME_THREAD_A */
90#define IRQ_IXP23XX_ME_THREAD_A12_ME1 68 /* ME_THREAD_A */
91#define IRQ_IXP23XX_ME_THREAD_A13_ME1 69 /* ME_THREAD_A */
92#define IRQ_IXP23XX_ME_THREAD_A14_ME1 70 /* ME_THREAD_A */
93#define IRQ_IXP23XX_ME_THREAD_A15_ME1 71 /* ME_THREAD_A */
94#define IRQ_IXP23XX_ME_THREAD_A16_ME2 72 /* ME_THREAD_A */
95#define IRQ_IXP23XX_ME_THREAD_A17_ME2 73 /* ME_THREAD_A */
96#define IRQ_IXP23XX_ME_THREAD_A18_ME2 74 /* ME_THREAD_A */
97#define IRQ_IXP23XX_ME_THREAD_A19_ME2 75 /* ME_THREAD_A */
98#define IRQ_IXP23XX_ME_THREAD_A20_ME2 76 /* ME_THREAD_A */
99#define IRQ_IXP23XX_ME_THREAD_A21_ME2 77 /* ME_THREAD_A */
100#define IRQ_IXP23XX_ME_THREAD_A22_ME2 78 /* ME_THREAD_A */
101#define IRQ_IXP23XX_ME_THREAD_A23_ME2 79 /* ME_THREAD_A */
102#define IRQ_IXP23XX_ME_THREAD_A24_ME3 80 /* ME_THREAD_A */
103#define IRQ_IXP23XX_ME_THREAD_A25_ME3 81 /* ME_THREAD_A */
104#define IRQ_IXP23XX_ME_THREAD_A26_ME3 82 /* ME_THREAD_A */
105#define IRQ_IXP23XX_ME_THREAD_A27_ME3 83 /* ME_THREAD_A */
106#define IRQ_IXP23XX_ME_THREAD_A28_ME3 84 /* ME_THREAD_A */
107#define IRQ_IXP23XX_ME_THREAD_A29_ME3 85 /* ME_THREAD_A */
108#define IRQ_IXP23XX_ME_THREAD_A30_ME3 86 /* ME_THREAD_A */
109#define IRQ_IXP23XX_ME_THREAD_A31_ME3 87 /* ME_THREAD_A */
110#define IRQ_IXP23XX_ME_THREAD_B0_ME0 88 /* ME_THREAD_B */
111#define IRQ_IXP23XX_ME_THREAD_B1_ME0 89 /* ME_THREAD_B */
112#define IRQ_IXP23XX_ME_THREAD_B2_ME0 90 /* ME_THREAD_B */
113#define IRQ_IXP23XX_ME_THREAD_B3_ME0 91 /* ME_THREAD_B */
114#define IRQ_IXP23XX_ME_THREAD_B4_ME0 92 /* ME_THREAD_B */
115#define IRQ_IXP23XX_ME_THREAD_B5_ME0 93 /* ME_THREAD_B */
116#define IRQ_IXP23XX_ME_THREAD_B6_ME0 94 /* ME_THREAD_B */
117#define IRQ_IXP23XX_ME_THREAD_B7_ME0 95 /* ME_THREAD_B */
118#define IRQ_IXP23XX_ME_THREAD_B8_ME1 96 /* ME_THREAD_B */
119#define IRQ_IXP23XX_ME_THREAD_B9_ME1 97 /* ME_THREAD_B */
120#define IRQ_IXP23XX_ME_THREAD_B10_ME1 98 /* ME_THREAD_B */
121#define IRQ_IXP23XX_ME_THREAD_B11_ME1 99 /* ME_THREAD_B */
122#define IRQ_IXP23XX_ME_THREAD_B12_ME1 100 /* ME_THREAD_B */
123#define IRQ_IXP23XX_ME_THREAD_B13_ME1 101 /* ME_THREAD_B */
124#define IRQ_IXP23XX_ME_THREAD_B14_ME1 102 /* ME_THREAD_B */
125#define IRQ_IXP23XX_ME_THREAD_B15_ME1 103 /* ME_THREAD_B */
126#define IRQ_IXP23XX_ME_THREAD_B16_ME2 104 /* ME_THREAD_B */
127#define IRQ_IXP23XX_ME_THREAD_B17_ME2 105 /* ME_THREAD_B */
128#define IRQ_IXP23XX_ME_THREAD_B18_ME2 106 /* ME_THREAD_B */
129#define IRQ_IXP23XX_ME_THREAD_B19_ME2 107 /* ME_THREAD_B */
130#define IRQ_IXP23XX_ME_THREAD_B20_ME2 108 /* ME_THREAD_B */
131#define IRQ_IXP23XX_ME_THREAD_B21_ME2 109 /* ME_THREAD_B */
132#define IRQ_IXP23XX_ME_THREAD_B22_ME2 110 /* ME_THREAD_B */
133#define IRQ_IXP23XX_ME_THREAD_B23_ME2 111 /* ME_THREAD_B */
134#define IRQ_IXP23XX_ME_THREAD_B24_ME3 112 /* ME_THREAD_B */
135#define IRQ_IXP23XX_ME_THREAD_B25_ME3 113 /* ME_THREAD_B */
136#define IRQ_IXP23XX_ME_THREAD_B26_ME3 114 /* ME_THREAD_B */
137#define IRQ_IXP23XX_ME_THREAD_B27_ME3 115 /* ME_THREAD_B */
138#define IRQ_IXP23XX_ME_THREAD_B28_ME3 116 /* ME_THREAD_B */
139#define IRQ_IXP23XX_ME_THREAD_B29_ME3 117 /* ME_THREAD_B */
140#define IRQ_IXP23XX_ME_THREAD_B30_ME3 118 /* ME_THREAD_B */
141#define IRQ_IXP23XX_ME_THREAD_B31_ME3 119 /* ME_THREAD_B */
142
143#define NUM_IXP23XX_RAW_IRQS 120
144
145#define IRQ_IXP23XX_INTA 120 /* Indirect pcxg_pci_int_rph */
146#define IRQ_IXP23XX_INTB 121 /* Indirect pcxg_pci_int_rph */
147
148#define NR_IXP23XX_IRQ (IRQ_IXP23XX_INTB + 1)
149
150/*
151 * We default to 32 per-board IRQs. Increase this number if you need
152 * more, but keep it realistic.
153 */
154#define NR_IXP23XX_MACH_IRQS 32
155
156#define NR_IRQS (NR_IXP23XX_IRQS + NR_IXP23XX_MACH_IRQS)
157
158#define IXP23XX_MACH_IRQ(irq) (NR_IXP23XX_IRQ + (irq))
159
160
161/*
162 * IXDP2351-specific interrupts
163 */
164
165/*
166 * External PCI interrupts signaled through INTB
167 *
168 */
169#define IXDP2351_INTB_IRQ_BASE 0
170#define IRQ_IXDP2351_INTA_82546 IXP23XX_MACH_IRQ(0)
171#define IRQ_IXDP2351_INTB_82546 IXP23XX_MACH_IRQ(1)
172#define IRQ_IXDP2351_SPCI_DB_0 IXP23XX_MACH_IRQ(2)
173#define IRQ_IXDP2351_SPCI_DB_1 IXP23XX_MACH_IRQ(3)
174#define IRQ_IXDP2351_SPCI_PMC_INTA IXP23XX_MACH_IRQ(4)
175#define IRQ_IXDP2351_SPCI_PMC_INTB IXP23XX_MACH_IRQ(5)
176#define IRQ_IXDP2351_SPCI_PMC_INTC IXP23XX_MACH_IRQ(6)
177#define IRQ_IXDP2351_SPCI_PMC_INTD IXP23XX_MACH_IRQ(7)
178#define IRQ_IXDP2351_SPCI_FIC IXP23XX_MACH_IRQ(8)
179
180#define IXDP2351_INTB_IRQ_BIT(irq) (irq - IXP23XX_MACH_IRQ(0))
181#define IXDP2351_INTB_IRQ_MASK(irq) (1 << IXDP2351_INTB_IRQ_BIT(irq))
182#define IXDP2351_INTB_IRQ_VALID 0x01FF
183#define IXDP2351_INTB_IRQ_NUM 16
184
185/*
186 * Other external interrupts signaled through INTA
187 */
188#define IXDP2351_INTA_IRQ_BASE 16
189#define IRQ_IXDP2351_IPMI_FROM IXP23XX_MACH_IRQ(16)
190#define IRQ_IXDP2351_125US IXP23XX_MACH_IRQ(17)
191#define IRQ_IXDP2351_DB_0_ADD IXP23XX_MACH_IRQ(18)
192#define IRQ_IXDP2351_DB_1_ADD IXP23XX_MACH_IRQ(19)
193#define IRQ_IXDP2351_DEBUG1 IXP23XX_MACH_IRQ(20)
194#define IRQ_IXDP2351_ADD_UART IXP23XX_MACH_IRQ(21)
195#define IRQ_IXDP2351_FIC_ADD IXP23XX_MACH_IRQ(24)
196#define IRQ_IXDP2351_CS8900 IXP23XX_MACH_IRQ(25)
197#define IRQ_IXDP2351_BBSRAM IXP23XX_MACH_IRQ(26)
198#define IRQ_IXDP2351_CONFIG_MEDIA IXP23XX_MACH_IRQ(27)
199#define IRQ_IXDP2351_CLOCK_REF IXP23XX_MACH_IRQ(28)
200#define IRQ_IXDP2351_A10_NP IXP23XX_MACH_IRQ(29)
201#define IRQ_IXDP2351_A11_NP IXP23XX_MACH_IRQ(30)
202#define IRQ_IXDP2351_DEBUG_NP IXP23XX_MACH_IRQ(31)
203
204#define IXDP2351_INTA_IRQ_BIT(irq) (irq - IXP23XX_MACH_IRQ(16))
205#define IXDP2351_INTA_IRQ_MASK(irq) (1 << IXDP2351_INTA_IRQ_BIT(irq))
206#define IXDP2351_INTA_IRQ_VALID 0xFF3F
207#define IXDP2351_INTA_IRQ_NUM 16
208
209
210/*
211 * ADI RoadRunner IRQs
212 */
213#define IRQ_ROADRUNNER_PCI_INTA IRQ_IXP23XX_INTA
214#define IRQ_ROADRUNNER_PCI_INTB IRQ_IXP23XX_INTB
215#define IRQ_ROADRUNNER_PCI_INTC IRQ_IXP23XX_GPIO11
216#define IRQ_ROADRUNNER_PCI_INTD IRQ_IXP23XX_GPIO12
217
218/*
219 * Put new board definitions here
220 */
221
222
223#endif
diff --git a/include/asm-arm/arch-ixp23xx/ixdp2351.h b/include/asm-arm/arch-ixp23xx/ixdp2351.h
deleted file mode 100644
index d5e8a43d7bbd..000000000000
--- a/include/asm-arm/arch-ixp23xx/ixdp2351.h
+++ /dev/null
@@ -1,89 +0,0 @@
1/*
2 * include/asm-arm/arch-ixp23xx/ixdp2351.h
3 *
4 * Register and other defines for IXDP2351
5 *
6 * Copyright (c) 2002-2004 Intel Corp.
7 * Copytight (c) 2005 MontaVista Software, Inc.
8 *
9 * This program is free software; you can redistribute it and/or modify it
10 * under the terms of the GNU General Public License as published by the
11 * Free Software Foundation; either version 2 of the License, or (at your
12 * option) any later version.
13 */
14
15#ifndef __ASM_ARCH_IXDP2351_H
16#define __ASM_ARCH_IXDP2351_H
17
18/*
19 * NP module memory map
20 */
21#define IXDP2351_NP_PHYS_BASE (IXP23XX_EXP_BUS_CS4_BASE)
22#define IXDP2351_NP_PHYS_SIZE 0x00100000
23#define IXDP2351_NP_VIRT_BASE 0xeff00000
24
25#define IXDP2351_VIRT_CS8900_BASE (IXDP2351_NP_VIRT_BASE)
26#define IXDP2351_VIRT_CS8900_END (IXDP2351_VIRT_CS8900_BASE + 16)
27
28#define IXDP2351_VIRT_NP_CPLD_BASE (IXP23XX_EXP_BUS_CS4_BASE_VIRT + 0x00010000)
29
30#define IXDP2351_NP_CPLD_REG(reg) ((volatile u16 *)(IXDP2351_VIRT_NP_CPLD_BASE + reg))
31
32#define IXDP2351_NP_CPLD_RESET1_REG IXDP2351_NP_CPLD_REG(0x00)
33#define IXDP2351_NP_CPLD_LED_REG IXDP2351_NP_CPLD_REG(0x02)
34#define IXDP2351_NP_CPLD_VERSION_REG IXDP2351_NP_CPLD_REG(0x04)
35
36/*
37 * Base board module memory map
38 */
39
40#define IXDP2351_BB_BASE_PHYS (IXP23XX_EXP_BUS_CS5_BASE)
41#define IXDP2351_BB_SIZE 0x01000000
42#define IXDP2351_BB_BASE_VIRT (0xee000000)
43
44#define IXDP2351_BB_AREA_BASE(offset) (IXDP2351_BB_BASE_VIRT + offset)
45
46#define IXDP2351_VIRT_NVRAM_BASE IXDP2351_BB_AREA_BASE(0x0)
47#define IXDP2351_NVRAM_SIZE (0x20000)
48
49#define IXDP2351_VIRT_MB_IXF1104_BASE IXDP2351_BB_AREA_BASE(0x00020000)
50#define IXDP2351_VIRT_ADD_UART_BASE IXDP2351_BB_AREA_BASE(0x000240C0)
51#define IXDP2351_VIRT_FIC_BASE IXDP2351_BB_AREA_BASE(0x00200000)
52#define IXDP2351_VIRT_DB0_BASE IXDP2351_BB_AREA_BASE(0x00400000)
53#define IXDP2351_VIRT_DB1_BASE IXDP2351_BB_AREA_BASE(0x00600000)
54#define IXDP2351_VIRT_CPLD_BASE IXDP2351_BB_AREA_BASE(0x00024000)
55
56/*
57 * On board CPLD registers
58 */
59#define IXDP2351_CPLD_BB_REG(reg) ((volatile u16 *)(IXDP2351_VIRT_CPLD_BASE + reg))
60
61#define IXDP2351_CPLD_RESET0_REG IXDP2351_CPLD_BB_REG(0x00)
62#define IXDP2351_CPLD_RESET1_REG IXDP2351_CPLD_BB_REG(0x04)
63
64#define IXDP2351_CPLD_RESET1_MAGIC 0x55AA
65#define IXDP2351_CPLD_RESET1_ENABLE 0x8000
66
67#define IXDP2351_CPLD_FPGA_CONFIG_REG IXDP2351_CPLD_BB_REG(0x08)
68#define IXDP2351_CPLD_INTB_MASK_SET_REG IXDP2351_CPLD_BB_REG(0x10)
69#define IXDP2351_CPLD_INTA_MASK_SET_REG IXDP2351_CPLD_BB_REG(0x14)
70#define IXDP2351_CPLD_INTB_STAT_REG IXDP2351_CPLD_BB_REG(0x18)
71#define IXDP2351_CPLD_INTA_STAT_REG IXDP2351_CPLD_BB_REG(0x1C)
72#define IXDP2351_CPLD_INTB_RAW_REG IXDP2351_CPLD_BB_REG(0x20) /* read */
73#define IXDP2351_CPLD_INTA_RAW_REG IXDP2351_CPLD_BB_REG(0x24) /* read */
74#define IXDP2351_CPLD_INTB_MASK_CLR_REG IXDP2351_CPLD_INTB_RAW_REG /* write */
75#define IXDP2351_CPLD_INTA_MASK_CLR_REG IXDP2351_CPLD_INTA_RAW_REG /* write */
76#define IXDP2351_CPLD_INTB_SIM_REG IXDP2351_CPLD_BB_REG(0x28)
77#define IXDP2351_CPLD_INTA_SIM_REG IXDP2351_CPLD_BB_REG(0x2C)
78 /* Interrupt bits are defined in irqs.h */
79#define IXDP2351_CPLD_BB_GBE0_REG IXDP2351_CPLD_BB_REG(0x30)
80#define IXDP2351_CPLD_BB_GBE1_REG IXDP2351_CPLD_BB_REG(0x34)
81
82/* #define IXDP2351_CPLD_BB_MISC_REG IXDP2351_CPLD_REG(0x1C) */
83/* #define IXDP2351_CPLD_BB_MISC_REV_MASK 0xFF */
84/* #define IXDP2351_CPLD_BB_GDXCS0_REG IXDP2351_CPLD_REG(0x24) */
85/* #define IXDP2351_CPLD_BB_GDXCS1_REG IXDP2351_CPLD_REG(0x28) */
86/* #define IXDP2351_CPLD_BB_CLOCK_REG IXDP2351_CPLD_REG(0x04) */
87
88
89#endif
diff --git a/include/asm-arm/arch-ixp23xx/ixp23xx.h b/include/asm-arm/arch-ixp23xx/ixp23xx.h
deleted file mode 100644
index 3927b1d61b17..000000000000
--- a/include/asm-arm/arch-ixp23xx/ixp23xx.h
+++ /dev/null
@@ -1,298 +0,0 @@
1/*
2 * include/asm-arm/arch-ixp23xx/ixp23xx.h
3 *
4 * Register definitions for IXP23XX
5 *
6 * Copyright (C) 2003-2005 Intel Corporation.
7 * Copyright (C) 2005 MontaVista Software, Inc.
8 *
9 * Maintainer: Deepak Saxena <dsaxena@plexity.net>
10 *
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License version 2 as
13 * published by the Free Software Foundation.
14 */
15
16#ifndef __ASM_ARCH_IXP23XX_H
17#define __ASM_ARCH_IXP23XX_H
18
19/*
20 * IXP2300 linux memory map:
21 *
22 * virt phys size
23 * fffd0000 a0000000 64K XSI2CPP_CSR
24 * fffc0000 c4000000 4K EXP_CFG
25 * fff00000 c8000000 64K PERIPHERAL
26 * fe000000 1c0000000 16M CAP_CSR
27 * fd000000 1c8000000 16M MSF_CSR
28 * fb000000 16M ---
29 * fa000000 1d8000000 32M PCI_IO
30 * f8000000 1da000000 32M PCI_CFG
31 * f6000000 1de000000 32M PCI_CREG
32 * f4000000 32M ---
33 * f0000000 1e0000000 64M PCI_MEM
34 * e[c-f]000000 per-platform mappings
35 */
36
37
38/****************************************************************************
39 * Static mappings.
40 ****************************************************************************/
41#define IXP23XX_XSI2CPP_CSR_PHYS 0xa0000000
42#define IXP23XX_XSI2CPP_CSR_VIRT 0xfffd0000
43#define IXP23XX_XSI2CPP_CSR_SIZE 0x00010000
44
45#define IXP23XX_EXP_CFG_PHYS 0xc4000000
46#define IXP23XX_EXP_CFG_VIRT 0xfffc0000
47#define IXP23XX_EXP_CFG_SIZE 0x00001000
48
49#define IXP23XX_PERIPHERAL_PHYS 0xc8000000
50#define IXP23XX_PERIPHERAL_VIRT 0xfff00000
51#define IXP23XX_PERIPHERAL_SIZE 0x00010000
52
53#define IXP23XX_CAP_CSR_PHYS 0x1c0000000ULL
54#define IXP23XX_CAP_CSR_VIRT 0xfe000000
55#define IXP23XX_CAP_CSR_SIZE 0x01000000
56
57#define IXP23XX_MSF_CSR_PHYS 0x1c8000000ULL
58#define IXP23XX_MSF_CSR_VIRT 0xfd000000
59#define IXP23XX_MSF_CSR_SIZE 0x01000000
60
61#define IXP23XX_PCI_IO_PHYS 0x1d8000000ULL
62#define IXP23XX_PCI_IO_VIRT 0xfa000000
63#define IXP23XX_PCI_IO_SIZE 0x02000000
64
65#define IXP23XX_PCI_CFG_PHYS 0x1da000000ULL
66#define IXP23XX_PCI_CFG_VIRT 0xf8000000
67#define IXP23XX_PCI_CFG_SIZE 0x02000000
68#define IXP23XX_PCI_CFG0_VIRT IXP23XX_PCI_CFG_VIRT
69#define IXP23XX_PCI_CFG1_VIRT (IXP23XX_PCI_CFG_VIRT + 0x01000000)
70
71#define IXP23XX_PCI_CREG_PHYS 0x1de000000ULL
72#define IXP23XX_PCI_CREG_VIRT 0xf6000000
73#define IXP23XX_PCI_CREG_SIZE 0x02000000
74#define IXP23XX_PCI_CSR_VIRT (IXP23XX_PCI_CREG_VIRT + 0x01000000)
75
76#define IXP23XX_PCI_MEM_START 0xe0000000
77#define IXP23XX_PCI_MEM_PHYS 0x1e0000000ULL
78#define IXP23XX_PCI_MEM_VIRT 0xf0000000
79#define IXP23XX_PCI_MEM_SIZE 0x04000000
80
81
82/****************************************************************************
83 * XSI2CPP CSRs.
84 ****************************************************************************/
85#define IXP23XX_XSI2CPP_REG(x) ((volatile unsigned long *)(IXP23XX_XSI2CPP_CSR_VIRT + (x)))
86#define IXP23XX_CPP2XSI_CURR_XFER_REG3 IXP23XX_XSI2CPP_REG(0xf8)
87#define IXP23XX_CPP2XSI_ADDR_31 (1 << 19)
88#define IXP23XX_CPP2XSI_PSH_OFF (1 << 20)
89#define IXP23XX_CPP2XSI_COH_OFF (1 << 21)
90
91
92/****************************************************************************
93 * Expansion Bus Config.
94 ****************************************************************************/
95#define IXP23XX_EXP_CFG_REG(x) ((volatile unsigned long *)(IXP23XX_EXP_CFG_VIRT + (x)))
96#define IXP23XX_EXP_CS0 IXP23XX_EXP_CFG_REG(0x00)
97#define IXP23XX_EXP_CS1 IXP23XX_EXP_CFG_REG(0x04)
98#define IXP23XX_EXP_CS2 IXP23XX_EXP_CFG_REG(0x08)
99#define IXP23XX_EXP_CS3 IXP23XX_EXP_CFG_REG(0x0c)
100#define IXP23XX_EXP_CS4 IXP23XX_EXP_CFG_REG(0x10)
101#define IXP23XX_EXP_CS5 IXP23XX_EXP_CFG_REG(0x14)
102#define IXP23XX_EXP_CS6 IXP23XX_EXP_CFG_REG(0x18)
103#define IXP23XX_EXP_CS7 IXP23XX_EXP_CFG_REG(0x1c)
104#define IXP23XX_FLASH_WRITABLE (0x2)
105#define IXP23XX_FLASH_BUS8 (0x1)
106
107#define IXP23XX_EXP_CFG0 IXP23XX_EXP_CFG_REG(0x20)
108#define IXP23XX_EXP_CFG1 IXP23XX_EXP_CFG_REG(0x24)
109#define IXP23XX_EXP_CFG0_MEM_MAP (1 << 31)
110#define IXP23XX_EXP_CFG0_XSCALE_SPEED_SEL (3 << 22)
111#define IXP23XX_EXP_CFG0_XSCALE_SPEED_EN (1 << 21)
112#define IXP23XX_EXP_CFG0_CPP_SPEED_SEL (3 << 19)
113#define IXP23XX_EXP_CFG0_CPP_SPEED_EN (1 << 18)
114#define IXP23XX_EXP_CFG0_PCI_SWIN (3 << 16)
115#define IXP23XX_EXP_CFG0_PCI_DWIN (3 << 14)
116#define IXP23XX_EXP_CFG0_PCI33_MODE (1 << 13)
117#define IXP23XX_EXP_CFG0_QDR_SPEED_SEL (1 << 12)
118#define IXP23XX_EXP_CFG0_CPP_DIV_SEL (1 << 5)
119#define IXP23XX_EXP_CFG0_XSI_NOT_PRES (1 << 4)
120#define IXP23XX_EXP_CFG0_PROM_BOOT (1 << 3)
121#define IXP23XX_EXP_CFG0_PCI_ARB (1 << 2)
122#define IXP23XX_EXP_CFG0_PCI_HOST (1 << 1)
123#define IXP23XX_EXP_CFG0_FLASH_WIDTH (1 << 0)
124
125#define IXP23XX_EXP_UNIT_FUSE IXP23XX_EXP_CFG_REG(0x28)
126#define IXP23XX_EXP_MSF_MUX IXP23XX_EXP_CFG_REG(0x30)
127#define IXP23XX_EXP_CFG_FUSE IXP23XX_EXP_CFG_REG(0x34)
128
129#define IXP23XX_EXP_BUS_PHYS 0x90000000
130#define IXP23XX_EXP_BUS_WINDOW_SIZE 0x01000000
131
132#define IXP23XX_EXP_BUS_CS0_BASE (IXP23XX_EXP_BUS_PHYS + 0x00000000)
133#define IXP23XX_EXP_BUS_CS1_BASE (IXP23XX_EXP_BUS_PHYS + 0x01000000)
134#define IXP23XX_EXP_BUS_CS2_BASE (IXP23XX_EXP_BUS_PHYS + 0x02000000)
135#define IXP23XX_EXP_BUS_CS3_BASE (IXP23XX_EXP_BUS_PHYS + 0x03000000)
136#define IXP23XX_EXP_BUS_CS4_BASE (IXP23XX_EXP_BUS_PHYS + 0x04000000)
137#define IXP23XX_EXP_BUS_CS5_BASE (IXP23XX_EXP_BUS_PHYS + 0x05000000)
138#define IXP23XX_EXP_BUS_CS6_BASE (IXP23XX_EXP_BUS_PHYS + 0x06000000)
139#define IXP23XX_EXP_BUS_CS7_BASE (IXP23XX_EXP_BUS_PHYS + 0x07000000)
140
141
142/****************************************************************************
143 * Peripherals.
144 ****************************************************************************/
145#define IXP23XX_UART1_VIRT (IXP23XX_PERIPHERAL_VIRT + 0x0000)
146#define IXP23XX_UART2_VIRT (IXP23XX_PERIPHERAL_VIRT + 0x1000)
147#define IXP23XX_PMU_VIRT (IXP23XX_PERIPHERAL_VIRT + 0x2000)
148#define IXP23XX_INTC_VIRT (IXP23XX_PERIPHERAL_VIRT + 0x3000)
149#define IXP23XX_GPIO_VIRT (IXP23XX_PERIPHERAL_VIRT + 0x4000)
150#define IXP23XX_TIMER_VIRT (IXP23XX_PERIPHERAL_VIRT + 0x5000)
151#define IXP23XX_NPE0_VIRT (IXP23XX_PERIPHERAL_VIRT + 0x6000)
152#define IXP23XX_DSR_VIRT (IXP23XX_PERIPHERAL_VIRT + 0x7000)
153#define IXP23XX_NPE1_VIRT (IXP23XX_PERIPHERAL_VIRT + 0x8000)
154#define IXP23XX_ETH0_VIRT (IXP23XX_PERIPHERAL_VIRT + 0x9000)
155#define IXP23XX_ETH1_VIRT (IXP23XX_PERIPHERAL_VIRT + 0xA000)
156#define IXP23XX_GIG0_VIRT (IXP23XX_PERIPHERAL_VIRT + 0xB000)
157#define IXP23XX_GIG1_VIRT (IXP23XX_PERIPHERAL_VIRT + 0xC000)
158#define IXP23XX_DDRS_VIRT (IXP23XX_PERIPHERAL_VIRT + 0xD000)
159
160#define IXP23XX_UART1_PHYS (IXP23XX_PERIPHERAL_PHYS + 0x0000)
161#define IXP23XX_UART2_PHYS (IXP23XX_PERIPHERAL_PHYS + 0x1000)
162#define IXP23XX_PMU_PHYS (IXP23XX_PERIPHERAL_PHYS + 0x2000)
163#define IXP23XX_INTC_PHYS (IXP23XX_PERIPHERAL_PHYS + 0x3000)
164#define IXP23XX_GPIO_PHYS (IXP23XX_PERIPHERAL_PHYS + 0x4000)
165#define IXP23XX_TIMER_PHYS (IXP23XX_PERIPHERAL_PHYS + 0x5000)
166#define IXP23XX_NPE0_PHYS (IXP23XX_PERIPHERAL_PHYS + 0x6000)
167#define IXP23XX_DSR_PHYS (IXP23XX_PERIPHERAL_PHYS + 0x7000)
168#define IXP23XX_NPE1_PHYS (IXP23XX_PERIPHERAL_PHYS + 0x8000)
169#define IXP23XX_ETH0_PHYS (IXP23XX_PERIPHERAL_PHYS + 0x9000)
170#define IXP23XX_ETH1_PHYS (IXP23XX_PERIPHERAL_PHYS + 0xA000)
171#define IXP23XX_GIG0_PHYS (IXP23XX_PERIPHERAL_PHYS + 0xB000)
172#define IXP23XX_GIG1_PHYS (IXP23XX_PERIPHERAL_PHYS + 0xC000)
173#define IXP23XX_DDRS_PHYS (IXP23XX_PERIPHERAL_PHYS + 0xD000)
174
175
176/****************************************************************************
177 * Interrupt controller.
178 ****************************************************************************/
179#define IXP23XX_INTC_REG(x) ((volatile unsigned long *)(IXP23XX_INTC_VIRT + (x)))
180#define IXP23XX_INTR_ST1 IXP23XX_INTC_REG(0x00)
181#define IXP23XX_INTR_ST2 IXP23XX_INTC_REG(0x04)
182#define IXP23XX_INTR_ST3 IXP23XX_INTC_REG(0x08)
183#define IXP23XX_INTR_ST4 IXP23XX_INTC_REG(0x0c)
184#define IXP23XX_INTR_EN1 IXP23XX_INTC_REG(0x10)
185#define IXP23XX_INTR_EN2 IXP23XX_INTC_REG(0x14)
186#define IXP23XX_INTR_EN3 IXP23XX_INTC_REG(0x18)
187#define IXP23XX_INTR_EN4 IXP23XX_INTC_REG(0x1c)
188#define IXP23XX_INTR_SEL1 IXP23XX_INTC_REG(0x20)
189#define IXP23XX_INTR_SEL2 IXP23XX_INTC_REG(0x24)
190#define IXP23XX_INTR_SEL3 IXP23XX_INTC_REG(0x28)
191#define IXP23XX_INTR_SEL4 IXP23XX_INTC_REG(0x2c)
192#define IXP23XX_INTR_IRQ_ST1 IXP23XX_INTC_REG(0x30)
193#define IXP23XX_INTR_IRQ_ST2 IXP23XX_INTC_REG(0x34)
194#define IXP23XX_INTR_IRQ_ST3 IXP23XX_INTC_REG(0x38)
195#define IXP23XX_INTR_IRQ_ST4 IXP23XX_INTC_REG(0x3c)
196#define IXP23XX_INTR_IRQ_ENC_ST_OFFSET 0x54
197
198
199/****************************************************************************
200 * GPIO.
201 ****************************************************************************/
202#define IXP23XX_GPIO_REG(x) ((volatile unsigned long *)(IXP23XX_GPIO_VIRT + (x)))
203#define IXP23XX_GPIO_GPOUTR IXP23XX_GPIO_REG(0x00)
204#define IXP23XX_GPIO_GPOER IXP23XX_GPIO_REG(0x04)
205#define IXP23XX_GPIO_GPINR IXP23XX_GPIO_REG(0x08)
206#define IXP23XX_GPIO_GPISR IXP23XX_GPIO_REG(0x0c)
207#define IXP23XX_GPIO_GPIT1R IXP23XX_GPIO_REG(0x10)
208#define IXP23XX_GPIO_GPIT2R IXP23XX_GPIO_REG(0x14)
209#define IXP23XX_GPIO_GPCLKR IXP23XX_GPIO_REG(0x18)
210#define IXP23XX_GPIO_GPDBSELR IXP23XX_GPIO_REG(0x1c)
211
212#define IXP23XX_GPIO_STYLE_MASK 0x7
213#define IXP23XX_GPIO_STYLE_ACTIVE_HIGH 0x0
214#define IXP23XX_GPIO_STYLE_ACTIVE_LOW 0x1
215#define IXP23XX_GPIO_STYLE_RISING_EDGE 0x2
216#define IXP23XX_GPIO_STYLE_FALLING_EDGE 0x3
217#define IXP23XX_GPIO_STYLE_TRANSITIONAL 0x4
218
219#define IXP23XX_GPIO_STYLE_SIZE 3
220
221
222/****************************************************************************
223 * Timer.
224 ****************************************************************************/
225#define IXP23XX_TIMER_REG(x) ((volatile unsigned long *)(IXP23XX_TIMER_VIRT + (x)))
226#define IXP23XX_TIMER_CONT IXP23XX_TIMER_REG(0x00)
227#define IXP23XX_TIMER1_TIMESTAMP IXP23XX_TIMER_REG(0x04)
228#define IXP23XX_TIMER1_RELOAD IXP23XX_TIMER_REG(0x08)
229#define IXP23XX_TIMER2_TIMESTAMP IXP23XX_TIMER_REG(0x0c)
230#define IXP23XX_TIMER2_RELOAD IXP23XX_TIMER_REG(0x10)
231#define IXP23XX_TIMER_WDOG IXP23XX_TIMER_REG(0x14)
232#define IXP23XX_TIMER_WDOG_EN IXP23XX_TIMER_REG(0x18)
233#define IXP23XX_TIMER_WDOG_KEY IXP23XX_TIMER_REG(0x1c)
234#define IXP23XX_TIMER_WDOG_KEY_MAGIC 0x482e
235#define IXP23XX_TIMER_STATUS IXP23XX_TIMER_REG(0x20)
236#define IXP23XX_TIMER_SOFT_RESET IXP23XX_TIMER_REG(0x24)
237#define IXP23XX_TIMER_SOFT_RESET_EN IXP23XX_TIMER_REG(0x28)
238
239#define IXP23XX_TIMER_ENABLE (1 << 0)
240#define IXP23XX_TIMER_ONE_SHOT (1 << 1)
241/* Low order bits of reload value ignored */
242#define IXP23XX_TIMER_RELOAD_MASK (0x3)
243#define IXP23XX_TIMER_DISABLED (0x0)
244#define IXP23XX_TIMER1_INT_PEND (1 << 0)
245#define IXP23XX_TIMER2_INT_PEND (1 << 1)
246#define IXP23XX_TIMER_STATUS_TS_PEND (1 << 2)
247#define IXP23XX_TIMER_STATUS_WDOG_PEND (1 << 3)
248#define IXP23XX_TIMER_STATUS_WARM_RESET (1 << 4)
249
250
251/****************************************************************************
252 * CAP CSRs.
253 ****************************************************************************/
254#define IXP23XX_GLOBAL_REG(x) ((volatile unsigned long *)(IXP23XX_CAP_CSR_VIRT + 0x4a00 + (x)))
255#define IXP23XX_PRODUCT_ID IXP23XX_GLOBAL_REG(0x00)
256#define IXP23XX_MISC_CONTROL IXP23XX_GLOBAL_REG(0x04)
257#define IXP23XX_MSF_CLK_CNTRL IXP23XX_GLOBAL_REG(0x08)
258#define IXP23XX_RESET0 IXP23XX_GLOBAL_REG(0x0c)
259#define IXP23XX_RESET1 IXP23XX_GLOBAL_REG(0x10)
260#define IXP23XX_STRAP_OPTIONS IXP23XX_GLOBAL_REG(0x18)
261
262#define IXP23XX_ENABLE_WATCHDOG (1 << 24)
263#define IXP23XX_SHPC_INIT_COMP (1 << 21)
264#define IXP23XX_RST_ALL (1 << 16)
265#define IXP23XX_RESET_PCI (1 << 2)
266#define IXP23XX_PCI_UNIT_RESET (1 << 1)
267#define IXP23XX_XSCALE_RESET (1 << 0)
268
269#define IXP23XX_UENGINE_CSR_VIRT_BASE (IXP23XX_CAP_CSR_VIRT + 0x18000)
270
271
272/****************************************************************************
273 * PCI CSRs.
274 ****************************************************************************/
275#define IXP23XX_PCI_CREG(x) ((volatile unsigned long *)(IXP23XX_PCI_CREG_VIRT + (x)))
276#define IXP23XX_PCI_CMDSTAT IXP23XX_PCI_CREG(0x04)
277#define IXP23XX_PCI_SRAM_BAR IXP23XX_PCI_CREG(0x14)
278#define IXP23XX_PCI_SDRAM_BAR IXP23XX_PCI_CREG(0x18)
279
280
281#define IXP23XX_PCI_CSR(x) ((volatile unsigned long *)(IXP23XX_PCI_CREG_VIRT + 0x01000000 + (x)))
282#define IXP23XX_PCI_OUT_INT_STATUS IXP23XX_PCI_CSR(0x0030)
283#define IXP23XX_PCI_OUT_INT_MASK IXP23XX_PCI_CSR(0x0034)
284#define IXP23XX_PCI_SRAM_BASE_ADDR_MASK IXP23XX_PCI_CSR(0x00fc)
285#define IXP23XX_PCI_DRAM_BASE_ADDR_MASK IXP23XX_PCI_CSR(0x0100)
286#define IXP23XX_PCI_CONTROL IXP23XX_PCI_CSR(0x013c)
287#define IXP23XX_PCI_ADDR_EXT IXP23XX_PCI_CSR(0x0140)
288#define IXP23XX_PCI_ME_PUSH_STATUS IXP23XX_PCI_CSR(0x0148)
289#define IXP23XX_PCI_ME_PUSH_EN IXP23XX_PCI_CSR(0x014c)
290#define IXP23XX_PCI_ERR_STATUS IXP23XX_PCI_CSR(0x0150)
291#define IXP23XX_PCI_ERROR_STATUS IXP23XX_PCI_CSR(0x0150)
292#define IXP23XX_PCI_ERR_ENABLE IXP23XX_PCI_CSR(0x0154)
293#define IXP23XX_PCI_XSCALE_INT_STATUS IXP23XX_PCI_CSR(0x0158)
294#define IXP23XX_PCI_XSCALE_INT_ENABLE IXP23XX_PCI_CSR(0x015c)
295#define IXP23XX_PCI_CPP_ADDR_BITS IXP23XX_PCI_CSR(0x0160)
296
297
298#endif
diff --git a/include/asm-arm/arch-ixp23xx/memory.h b/include/asm-arm/arch-ixp23xx/memory.h
deleted file mode 100644
index 6d859d742d7f..000000000000
--- a/include/asm-arm/arch-ixp23xx/memory.h
+++ /dev/null
@@ -1,49 +0,0 @@
1/*
2 * include/asm-arm/arch-ixp23xx/memory.h
3 *
4 * Copyright (c) 2003-2004 Intel Corp.
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2 of the License, or (at your
9 * option) any later version.
10 */
11
12#ifndef __ASM_ARCH_MEMORY_H
13#define __ASM_ARCH_MEMORY_H
14
15#include <asm/hardware.h>
16
17/*
18 * Physical DRAM offset.
19 */
20#define PHYS_OFFSET (0x00000000)
21
22
23/*
24 * Virtual view <-> DMA view memory address translations
25 * virt_to_bus: Used to translate the virtual address to an
26 * address suitable to be passed to set_dma_addr
27 * bus_to_virt: Used to convert an address for DMA operations
28 * to an address that the kernel can use.
29 */
30#ifndef __ASSEMBLY__
31#include <asm/mach-types.h>
32
33#define __virt_to_bus(v) \
34 ({ unsigned int ret; \
35 ret = ((__virt_to_phys(v) - 0x00000000) + \
36 (*((volatile int *)IXP23XX_PCI_SDRAM_BAR) & 0xfffffff0)); \
37 ret; })
38
39#define __bus_to_virt(b) \
40 ({ unsigned int data; \
41 data = *((volatile int *)IXP23XX_PCI_SDRAM_BAR); \
42 __phys_to_virt((((b - (data & 0xfffffff0)) + 0x00000000))); })
43
44#define arch_is_coherent() 1
45
46#endif
47
48
49#endif
diff --git a/include/asm-arm/arch-ixp23xx/platform.h b/include/asm-arm/arch-ixp23xx/platform.h
deleted file mode 100644
index db8aa304c93d..000000000000
--- a/include/asm-arm/arch-ixp23xx/platform.h
+++ /dev/null
@@ -1,57 +0,0 @@
1/*
2 * include/asm-arm/arch-ixp23xx/platform.h
3 *
4 * Various bits of code used by platform-level code.
5 *
6 * Author: Deepak Saxena <dsaxena@plexity.net>
7 *
8 * Copyright 2005 (c) MontaVista Software, Inc.
9 *
10 * This file is licensed under the terms of the GNU General Public
11 * License version 2. This program is licensed "as is" without any
12 * warranty of any kind, whether express or implied.
13 */
14
15#ifndef __ASSEMBLY__
16
17static inline unsigned long ixp2000_reg_read(volatile void *reg)
18{
19 return *((volatile unsigned long *)reg);
20}
21
22static inline void ixp2000_reg_write(volatile void *reg, unsigned long val)
23{
24 *((volatile unsigned long *)reg) = val;
25}
26
27static inline void ixp2000_reg_wrb(volatile void *reg, unsigned long val)
28{
29 *((volatile unsigned long *)reg) = val;
30}
31
32struct pci_sys_data;
33
34void ixp23xx_map_io(void);
35void ixp23xx_init_irq(void);
36void ixp23xx_sys_init(void);
37int ixp23xx_pci_setup(int, struct pci_sys_data *);
38void ixp23xx_pci_preinit(void);
39struct pci_bus *ixp23xx_pci_scan_bus(int, struct pci_sys_data*);
40void ixp23xx_pci_slave_init(void);
41
42extern struct sys_timer ixp23xx_timer;
43
44#define IXP23XX_UART_XTAL 14745600
45
46#ifndef __ASSEMBLY__
47/*
48 * Is system memory on the XSI or CPP bus?
49 */
50static inline unsigned ixp23xx_cpp_boot(void)
51{
52 return (*IXP23XX_EXP_CFG0 & IXP23XX_EXP_CFG0_XSI_NOT_PRES);
53}
54#endif
55
56
57#endif
diff --git a/include/asm-arm/arch-ixp23xx/system.h b/include/asm-arm/arch-ixp23xx/system.h
deleted file mode 100644
index 925e6b0c338b..000000000000
--- a/include/asm-arm/arch-ixp23xx/system.h
+++ /dev/null
@@ -1,33 +0,0 @@
1/*
2 * include/asm-arm/arch-ixp23xx/system.h
3 *
4 * Copyright (C) 2003 Intel Corporation.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10
11#include <asm/hardware.h>
12#include <asm/mach-types.h>
13
14static inline void arch_idle(void)
15{
16#if 0
17 if (!hlt_counter)
18 cpu_do_idle();
19#endif
20}
21
22static inline void arch_reset(char mode)
23{
24 /* First try machine specific support */
25 if (machine_is_ixdp2351()) {
26 *IXDP2351_CPLD_RESET1_REG = IXDP2351_CPLD_RESET1_MAGIC;
27 (void) *IXDP2351_CPLD_RESET1_REG;
28 *IXDP2351_CPLD_RESET1_REG = IXDP2351_CPLD_RESET1_ENABLE;
29 }
30
31 /* Use on-chip reset capability */
32 *IXP23XX_RESET0 |= IXP23XX_RST_ALL;
33}
diff --git a/include/asm-arm/arch-ixp23xx/time.h b/include/asm-arm/arch-ixp23xx/time.h
deleted file mode 100644
index f6828fdd2883..000000000000
--- a/include/asm-arm/arch-ixp23xx/time.h
+++ /dev/null
@@ -1,3 +0,0 @@
1/*
2 * include/asm-arm/arch-ixp23xx/time.h
3 */
diff --git a/include/asm-arm/arch-ixp23xx/timex.h b/include/asm-arm/arch-ixp23xx/timex.h
deleted file mode 100644
index 516f72fe6082..000000000000
--- a/include/asm-arm/arch-ixp23xx/timex.h
+++ /dev/null
@@ -1,7 +0,0 @@
1/*
2 * include/asm-arm/arch-ixp23xx/timex.h
3 *
4 * XScale architecture timex specifications
5 */
6
7#define CLOCK_TICK_RATE 75000000
diff --git a/include/asm-arm/arch-ixp23xx/uncompress.h b/include/asm-arm/arch-ixp23xx/uncompress.h
deleted file mode 100644
index 16c1110f2304..000000000000
--- a/include/asm-arm/arch-ixp23xx/uncompress.h
+++ /dev/null
@@ -1,40 +0,0 @@
1/*
2 * include/asm-arm/arch-ixp23xx/uncompress.h
3 *
4 * Copyright (C) 2002-2004 Intel Corporation.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10
11#ifndef __ASM_ARCH_UNCOMPRESS_H
12#define __ASM_ARCH_UNCOMPRESS_H
13
14#include <asm/arch/ixp23xx.h>
15#include <linux/serial_reg.h>
16
17#define UART_BASE ((volatile u32 *)IXP23XX_UART1_PHYS)
18
19static inline void putc(char c)
20{
21 int j;
22
23 for (j = 0; j < 0x1000; j++) {
24 if (UART_BASE[UART_LSR] & UART_LSR_THRE)
25 break;
26 barrier();
27 }
28
29 UART_BASE[UART_TX] = c;
30}
31
32static inline void flush(void)
33{
34}
35
36#define arch_decomp_setup()
37#define arch_decomp_wdog()
38
39
40#endif
diff --git a/include/asm-arm/arch-ixp23xx/vmalloc.h b/include/asm-arm/arch-ixp23xx/vmalloc.h
deleted file mode 100644
index 9f2566658541..000000000000
--- a/include/asm-arm/arch-ixp23xx/vmalloc.h
+++ /dev/null
@@ -1,10 +0,0 @@
1/*
2 * include/asm-arm/arch-ixp23xx/vmalloc.h
3 *
4 * Copyright (c) 2005 MontaVista Software, Inc.
5 *
6 * NPU mappings end at 0xf0000000 and we allocate 64MB for board
7 * specific static I/O.
8 */
9
10#define VMALLOC_END (0xec000000)
diff --git a/include/asm-arm/arch-ixp4xx/avila.h b/include/asm-arm/arch-ixp4xx/avila.h
deleted file mode 100644
index 0dfea0ccd6ba..000000000000
--- a/include/asm-arm/arch-ixp4xx/avila.h
+++ /dev/null
@@ -1,39 +0,0 @@
1/*
2 * include/asm-arm/arch-ixp4xx/avila.h
3 *
4 * Gateworks Avila platform specific definitions
5 *
6 * Author: Michael-Luke Jones <mlj28@cam.ac.uk>
7 *
8 * Based on ixdp425.h
9 * Author: Deepak Saxena <dsaxena@plexity.net>
10 *
11 * Copyright 2004 (c) MontaVista, Software, Inc.
12 *
13 * This file is licensed under the terms of the GNU General Public
14 * License version 2. This program is licensed "as is" without any
15 * warranty of any kind, whether express or implied.
16 */
17
18#ifndef __ASM_ARCH_HARDWARE_H__
19#error "Do not include this directly, instead #include <asm/hardware.h>"
20#endif
21
22#define AVILA_SDA_PIN 7
23#define AVILA_SCL_PIN 6
24
25/*
26 * AVILA PCI IRQs
27 */
28#define AVILA_PCI_MAX_DEV 4
29#define LOFT_PCI_MAX_DEV 6
30#define AVILA_PCI_IRQ_LINES 4
31
32
33/* PCI controller GPIO to IRQ pin mappings */
34#define AVILA_PCI_INTA_PIN 11
35#define AVILA_PCI_INTB_PIN 10
36#define AVILA_PCI_INTC_PIN 9
37#define AVILA_PCI_INTD_PIN 8
38
39
diff --git a/include/asm-arm/arch-ixp4xx/coyote.h b/include/asm-arm/arch-ixp4xx/coyote.h
deleted file mode 100644
index 7ac9ba2c035c..000000000000
--- a/include/asm-arm/arch-ixp4xx/coyote.h
+++ /dev/null
@@ -1,33 +0,0 @@
1/*
2 * include/asm-arm/arch-ixp4xx/coyote.h
3 *
4 * ADI Engineering platform specific definitions
5 *
6 * Author: Deepak Saxena <dsaxena@plexity.net>
7 *
8 * Copyright 2004 (c) MontaVista, Software, Inc.
9 *
10 * This file is licensed under the terms of the GNU General Public
11 * License version 2. This program is licensed "as is" without any
12 * warranty of any kind, whether express or implied.
13 */
14
15#ifndef __ASM_ARCH_HARDWARE_H__
16#error "Do not include this directly, instead #include <asm/hardware.h>"
17#endif
18
19/* PCI controller GPIO to IRQ pin mappings */
20#define COYOTE_PCI_SLOT0_PIN 6
21#define COYOTE_PCI_SLOT1_PIN 11
22
23#define COYOTE_PCI_SLOT0_DEVID 14
24#define COYOTE_PCI_SLOT1_DEVID 15
25
26#define COYOTE_IDE_BASE_PHYS IXP4XX_EXP_BUS_BASE(3)
27#define COYOTE_IDE_BASE_VIRT 0xFFFE1000
28#define COYOTE_IDE_REGION_SIZE 0x1000
29
30#define COYOTE_IDE_DATA_PORT 0xFFFE10E0
31#define COYOTE_IDE_CTRL_PORT 0xFFFE10FC
32#define COYOTE_IDE_ERROR_PORT 0xFFFE10E2
33
diff --git a/include/asm-arm/arch-ixp4xx/cpu.h b/include/asm-arm/arch-ixp4xx/cpu.h
deleted file mode 100644
index 2fa3d6b8dbb8..000000000000
--- a/include/asm-arm/arch-ixp4xx/cpu.h
+++ /dev/null
@@ -1,46 +0,0 @@
1/*
2 * include/asm-arm/arch-ixp4xx/cpu.h
3 *
4 * IXP4XX cpu type detection
5 *
6 * Copyright (C) 2007 MontaVista Software, Inc.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 *
12 */
13
14#ifndef __ASM_ARCH_CPU_H__
15#define __ASM_ARCH_CPU_H__
16
17extern unsigned int processor_id;
18/* Processor id value in CP15 Register 0 */
19#define IXP425_PROCESSOR_ID_VALUE 0x690541c0
20#define IXP435_PROCESSOR_ID_VALUE 0x69054040
21#define IXP465_PROCESSOR_ID_VALUE 0x69054200
22#define IXP4XX_PROCESSOR_ID_MASK 0xfffffff0
23
24#define cpu_is_ixp42x() ((processor_id & IXP4XX_PROCESSOR_ID_MASK) == \
25 IXP425_PROCESSOR_ID_VALUE)
26#define cpu_is_ixp43x() ((processor_id & IXP4XX_PROCESSOR_ID_MASK) == \
27 IXP435_PROCESSOR_ID_VALUE)
28#define cpu_is_ixp46x() ((processor_id & IXP4XX_PROCESSOR_ID_MASK) == \
29 IXP465_PROCESSOR_ID_VALUE)
30
31static inline u32 ixp4xx_read_feature_bits(void)
32{
33 unsigned int val = ~*IXP4XX_EXP_CFG2;
34 val &= ~IXP4XX_FEATURE_RESERVED;
35 if (!cpu_is_ixp46x())
36 val &= ~IXP4XX_FEATURE_IXP46X_ONLY;
37
38 return val;
39}
40
41static inline void ixp4xx_write_feature_bits(u32 value)
42{
43 *IXP4XX_EXP_CFG2 = ~value;
44}
45
46#endif /* _ASM_ARCH_CPU_H */
diff --git a/include/asm-arm/arch-ixp4xx/debug-macro.S b/include/asm-arm/arch-ixp4xx/debug-macro.S
deleted file mode 100644
index 37bc8ef23e67..000000000000
--- a/include/asm-arm/arch-ixp4xx/debug-macro.S
+++ /dev/null
@@ -1,24 +0,0 @@
1/* linux/include/asm-arm/arch-ixp4xx/debug-macro.S
2 *
3 * Debugging macro include header
4 *
5 * Copyright (C) 1994-1999 Russell King
6 * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11*/
12
13 .macro addruart,rx
14 mrc p15, 0, \rx, c1, c0
15 tst \rx, #1 @ MMU enabled?
16 moveq \rx, #0xc8000000
17 movne \rx, #0xff000000
18 orrne \rx, \rx, #0x00b00000
19 add \rx,\rx,#3 @ Uart regs are at off set of 3 if
20 @ byte writes used - Big Endian.
21 .endm
22
23#define UART_SHIFT 2
24#include <asm/hardware/debug-8250.S>
diff --git a/include/asm-arm/arch-ixp4xx/dma.h b/include/asm-arm/arch-ixp4xx/dma.h
deleted file mode 100644
index 2c7f5327d80f..000000000000
--- a/include/asm-arm/arch-ixp4xx/dma.h
+++ /dev/null
@@ -1,21 +0,0 @@
1/*
2 * include/asm-arm/arch-ixp4xx/dma.h
3 *
4 * Copyright (C) 2001-2004 MontaVista Software, Inc.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 */
11#ifndef __ASM_ARCH_DMA_H
12#define __ASM_ARCH_DMA_H
13
14#include <linux/device.h>
15#include <asm/page.h>
16#include <asm/sizes.h>
17#include <asm/hardware.h>
18
19#define MAX_DMA_ADDRESS (PAGE_OFFSET + SZ_64M)
20
21#endif /* _ASM_ARCH_DMA_H */
diff --git a/include/asm-arm/arch-ixp4xx/dsmg600.h b/include/asm-arm/arch-ixp4xx/dsmg600.h
deleted file mode 100644
index b7673e171abe..000000000000
--- a/include/asm-arm/arch-ixp4xx/dsmg600.h
+++ /dev/null
@@ -1,52 +0,0 @@
1/*
2 * DSM-G600 platform specific definitions
3 *
4 * Copyright (C) 2006 Tower Technologies
5 * Author: Alessandro Zummo <a.zummo@towertech.it>
6 *
7 * based on ixdp425.h:
8 * Copyright 2004 (C) MontaVista, Software, Inc.
9 *
10 * This file is licensed under the terms of the GNU General Public
11 * License version 2. This program is licensed "as is" without any
12 * warranty of any kind, whether express or implied.
13 */
14
15#ifndef __ASM_ARCH_HARDWARE_H__
16#error "Do not include this directly, instead #include <asm/hardware.h>"
17#endif
18
19#define DSMG600_SDA_PIN 5
20#define DSMG600_SCL_PIN 4
21
22/*
23 * DSMG600 PCI IRQs
24 */
25#define DSMG600_PCI_MAX_DEV 4
26#define DSMG600_PCI_IRQ_LINES 3
27
28
29/* PCI controller GPIO to IRQ pin mappings */
30#define DSMG600_PCI_INTA_PIN 11
31#define DSMG600_PCI_INTB_PIN 10
32#define DSMG600_PCI_INTC_PIN 9
33#define DSMG600_PCI_INTD_PIN 8
34#define DSMG600_PCI_INTE_PIN 7
35#define DSMG600_PCI_INTF_PIN 6
36
37/* DSM-G600 Timer Setting */
38#define DSMG600_FREQ 66000000
39
40/* Buttons */
41
42#define DSMG600_PB_GPIO 15 /* power button */
43#define DSMG600_RB_GPIO 3 /* reset button */
44
45/* Power control */
46
47#define DSMG600_PO_GPIO 2 /* power off */
48
49/* LEDs */
50
51#define DSMG600_LED_PWR_GPIO 0
52#define DSMG600_LED_WLAN_GPIO 14
diff --git a/include/asm-arm/arch-ixp4xx/entry-macro.S b/include/asm-arm/arch-ixp4xx/entry-macro.S
deleted file mode 100644
index f144a005ed95..000000000000
--- a/include/asm-arm/arch-ixp4xx/entry-macro.S
+++ /dev/null
@@ -1,47 +0,0 @@
1/*
2 * include/asm-arm/arch-ixp4xx/entry-macro.S
3 *
4 * Low-level IRQ helper macros for IXP4xx-based platforms
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10#include <asm/hardware.h>
11
12 .macro disable_fiq
13 .endm
14
15 .macro get_irqnr_preamble, base, tmp
16 .endm
17
18 .macro arch_ret_to_user, tmp1, tmp2
19 .endm
20
21 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
22 ldr \irqstat, =(IXP4XX_INTC_BASE_VIRT+IXP4XX_ICIP_OFFSET)
23 ldr \irqstat, [\irqstat] @ get interrupts
24 cmp \irqstat, #0
25 beq 1001f @ upper IRQ?
26 clz \irqnr, \irqstat
27 mov \base, #31
28 sub \irqnr, \base, \irqnr
29 b 1002f @ lower IRQ being
30 @ handled
31
321001:
33 /*
34 * IXP465/IXP435 has an upper IRQ status register
35 */
36#if defined(CONFIG_CPU_IXP46X) || defined(CONFIG_CPU_IXP43X)
37 ldr \irqstat, =(IXP4XX_INTC_BASE_VIRT+IXP4XX_ICIP2_OFFSET)
38 ldr \irqstat, [\irqstat] @ get upper interrupts
39 mov \irqnr, #63
40 clz \irqstat, \irqstat
41 cmp \irqstat, #32
42 subne \irqnr, \irqnr, \irqstat
43#endif
441002:
45 .endm
46
47
diff --git a/include/asm-arm/arch-ixp4xx/fsg.h b/include/asm-arm/arch-ixp4xx/fsg.h
deleted file mode 100644
index c0100cc7981c..000000000000
--- a/include/asm-arm/arch-ixp4xx/fsg.h
+++ /dev/null
@@ -1,50 +0,0 @@
1/*
2 * include/asm-arm/arch-ixp4xx/fsg.h
3 *
4 * Freecom FSG-3 platform specific definitions
5 *
6 * Author: Rod Whitby <rod@whitby.id.au>
7 * Author: Tomasz Chmielewski <mangoo@wpkg.org>
8 * Maintainers: http://www.nslu2-linux.org
9 *
10 * Based on coyote.h by
11 * Copyright 2004 (c) MontaVista, Software, Inc.
12 *
13 * This file is licensed under the terms of the GNU General Public
14 * License version 2. This program is licensed "as is" without any
15 * warranty of any kind, whether express or implied.
16 */
17
18#ifndef __ASM_ARCH_HARDWARE_H__
19#error "Do not include this directly, instead #include <asm/hardware.h>"
20#endif
21
22#define FSG_SDA_PIN 12
23#define FSG_SCL_PIN 13
24
25/*
26 * FSG PCI IRQs
27 */
28#define FSG_PCI_MAX_DEV 3
29#define FSG_PCI_IRQ_LINES 3
30
31
32/* PCI controller GPIO to IRQ pin mappings */
33#define FSG_PCI_INTA_PIN 6
34#define FSG_PCI_INTB_PIN 7
35#define FSG_PCI_INTC_PIN 5
36
37/* Buttons */
38
39#define FSG_SB_GPIO 4 /* sync button */
40#define FSG_RB_GPIO 9 /* reset button */
41#define FSG_UB_GPIO 10 /* usb button */
42
43/* LEDs */
44
45#define FSG_LED_WLAN_BIT 0
46#define FSG_LED_WAN_BIT 1
47#define FSG_LED_SATA_BIT 2
48#define FSG_LED_USB_BIT 4
49#define FSG_LED_RING_BIT 5
50#define FSG_LED_SYNC_BIT 7
diff --git a/include/asm-arm/arch-ixp4xx/gpio.h b/include/asm-arm/arch-ixp4xx/gpio.h
deleted file mode 100644
index 3a4c5b8ae9e1..000000000000
--- a/include/asm-arm/arch-ixp4xx/gpio.h
+++ /dev/null
@@ -1,73 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-ixp4xx/gpio.h
3 *
4 * IXP4XX GPIO wrappers for arch-neutral GPIO calls
5 *
6 * Written by Milan Svoboda <msvoboda@ra.rockwell.com>
7 * Based on PXA implementation by Philipp Zabel <philipp.zabel@gmail.com>
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 *
23 */
24
25#ifndef __ASM_ARCH_IXP4XX_GPIO_H
26#define __ASM_ARCH_IXP4XX_GPIO_H
27
28#include <asm/hardware.h>
29
30static inline int gpio_request(unsigned gpio, const char *label)
31{
32 return 0;
33}
34
35static inline void gpio_free(unsigned gpio)
36{
37 return;
38}
39
40static inline int gpio_direction_input(unsigned gpio)
41{
42 gpio_line_config(gpio, IXP4XX_GPIO_IN);
43 return 0;
44}
45
46static inline int gpio_direction_output(unsigned gpio, int level)
47{
48 gpio_line_set(gpio, level);
49 gpio_line_config(gpio, IXP4XX_GPIO_OUT);
50 return 0;
51}
52
53static inline int gpio_get_value(unsigned gpio)
54{
55 int value;
56
57 gpio_line_get(gpio, &value);
58
59 return value;
60}
61
62static inline void gpio_set_value(unsigned gpio, int value)
63{
64 gpio_line_set(gpio, value);
65}
66
67#include <asm-generic/gpio.h> /* cansleep wrappers */
68
69extern int gpio_to_irq(int gpio);
70extern int irq_to_gpio(int gpio);
71
72#endif
73
diff --git a/include/asm-arm/arch-ixp4xx/gtwx5715.h b/include/asm-arm/arch-ixp4xx/gtwx5715.h
deleted file mode 100644
index c3069d67c00e..000000000000
--- a/include/asm-arm/arch-ixp4xx/gtwx5715.h
+++ /dev/null
@@ -1,116 +0,0 @@
1/*
2 * include/asm-arm/arch-ixp4xx/gtwx5715.h
3 *
4 * Gemtek GTWX5715 Gateway (Linksys WRV54G)
5 *
6 * Copyright 2004 (c) George T. Joseph
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21 */
22
23#ifndef __ASM_ARCH_HARDWARE_H__
24#error "Do not include this directly, instead #include <asm/hardware.h>"
25#endif
26#include "irqs.h"
27
28#define GTWX5715_GPIO0 0
29#define GTWX5715_GPIO1 1
30#define GTWX5715_GPIO2 2
31#define GTWX5715_GPIO3 3
32#define GTWX5715_GPIO4 4
33#define GTWX5715_GPIO5 5
34#define GTWX5715_GPIO6 6
35#define GTWX5715_GPIO7 7
36#define GTWX5715_GPIO8 8
37#define GTWX5715_GPIO9 9
38#define GTWX5715_GPIO10 10
39#define GTWX5715_GPIO11 11
40#define GTWX5715_GPIO12 12
41#define GTWX5715_GPIO13 13
42#define GTWX5715_GPIO14 14
43
44#define GTWX5715_GPIO0_IRQ IRQ_IXP4XX_GPIO0
45#define GTWX5715_GPIO1_IRQ IRQ_IXP4XX_GPIO1
46#define GTWX5715_GPIO2_IRQ IRQ_IXP4XX_GPIO2
47#define GTWX5715_GPIO3_IRQ IRQ_IXP4XX_GPIO3
48#define GTWX5715_GPIO4_IRQ IRQ_IXP4XX_GPIO4
49#define GTWX5715_GPIO5_IRQ IRQ_IXP4XX_GPIO5
50#define GTWX5715_GPIO6_IRQ IRQ_IXP4XX_GPIO6
51#define GTWX5715_GPIO7_IRQ IRQ_IXP4XX_GPIO7
52#define GTWX5715_GPIO8_IRQ IRQ_IXP4XX_GPIO8
53#define GTWX5715_GPIO9_IRQ IRQ_IXP4XX_GPIO9
54#define GTWX5715_GPIO10_IRQ IRQ_IXP4XX_GPIO10
55#define GTWX5715_GPIO11_IRQ IRQ_IXP4XX_GPIO11
56#define GTWX5715_GPIO12_IRQ IRQ_IXP4XX_GPIO12
57#define GTWX5715_GPIO13_IRQ IRQ_IXP4XX_SW_INT1
58#define GTWX5715_GPIO14_IRQ IRQ_IXP4XX_SW_INT2
59
60/* PCI controller GPIO to IRQ pin mappings
61
62 INTA INTB
63SLOT 0 10 11
64SLOT 1 11 10
65
66*/
67
68#define GTWX5715_PCI_SLOT0_DEVID 0
69#define GTWX5715_PCI_SLOT0_INTA_GPIO GTWX5715_GPIO10
70#define GTWX5715_PCI_SLOT0_INTB_GPIO GTWX5715_GPIO11
71#define GTWX5715_PCI_SLOT0_INTA_IRQ GTWX5715_GPIO10_IRQ
72#define GTWX5715_PCI_SLOT0_INTB_IRQ GTWX5715_GPIO11_IRQ
73
74#define GTWX5715_PCI_SLOT1_DEVID 1
75#define GTWX5715_PCI_SLOT1_INTA_GPIO GTWX5715_GPIO11
76#define GTWX5715_PCI_SLOT1_INTB_GPIO GTWX5715_GPIO10
77#define GTWX5715_PCI_SLOT1_INTA_IRQ GTWX5715_GPIO11_IRQ
78#define GTWX5715_PCI_SLOT1_INTB_IRQ GTWX5715_GPIO10_IRQ
79
80#define GTWX5715_PCI_SLOT_COUNT 2
81#define GTWX5715_PCI_INT_PIN_COUNT 2
82
83/*
84 * GPIO 5,6,7 and12 are hard wired to the Kendin KS8995M Switch
85 * and operate as an SPI type interface. The details of the interface
86 * are available on Kendin/Micrel's web site.
87 */
88
89#define GTWX5715_KSSPI_SELECT GTWX5715_GPIO5
90#define GTWX5715_KSSPI_TXD GTWX5715_GPIO6
91#define GTWX5715_KSSPI_CLOCK GTWX5715_GPIO7
92#define GTWX5715_KSSPI_RXD GTWX5715_GPIO12
93
94/*
95 * The "reset" button is wired to GPIO 3.
96 * The GPIO is brought "low" when the button is pushed.
97 */
98
99#define GTWX5715_BUTTON_GPIO GTWX5715_GPIO3
100#define GTWX5715_BUTTON_IRQ GTWX5715_GPIO3_IRQ
101
102/*
103 * Board Label Front Label
104 * LED1 Power
105 * LED2 Wireless-G
106 * LED3 not populated but could be
107 * LED4 Internet
108 * LED5 - LED8 Controlled by KS8995M Switch
109 * LED9 DMZ
110 */
111
112#define GTWX5715_LED1_GPIO GTWX5715_GPIO2
113#define GTWX5715_LED2_GPIO GTWX5715_GPIO9
114#define GTWX5715_LED3_GPIO GTWX5715_GPIO8
115#define GTWX5715_LED4_GPIO GTWX5715_GPIO1
116#define GTWX5715_LED9_GPIO GTWX5715_GPIO4
diff --git a/include/asm-arm/arch-ixp4xx/hardware.h b/include/asm-arm/arch-ixp4xx/hardware.h
deleted file mode 100644
index fa723a627854..000000000000
--- a/include/asm-arm/arch-ixp4xx/hardware.h
+++ /dev/null
@@ -1,50 +0,0 @@
1/*
2 * include/asm-arm/arch-ixp4xx/hardware.h
3 *
4 * Copyright (C) 2002 Intel Corporation.
5 * Copyright (C) 2003-2004 MontaVista Software, Inc.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 *
11 */
12
13/*
14 * Hardware definitions for IXP4xx based systems
15 */
16
17#ifndef __ASM_ARCH_HARDWARE_H__
18#define __ASM_ARCH_HARDWARE_H__
19
20#define PCIBIOS_MIN_IO 0x00001000
21#define PCIBIOS_MIN_MEM (cpu_is_ixp43x() ? 0x40000000 : 0x48000000)
22
23/*
24 * We override the standard dma-mask routines for bouncing.
25 */
26#define HAVE_ARCH_PCI_SET_DMA_MASK
27
28#define pcibios_assign_all_busses() 1
29
30/* Register locations and bits */
31#include "ixp4xx-regs.h"
32
33#ifndef __ASSEMBLER__
34#include <asm/arch/cpu.h>
35#endif
36
37/* Platform helper functions and definitions */
38#include "platform.h"
39
40/* Platform specific details */
41#include "ixdp425.h"
42#include "avila.h"
43#include "coyote.h"
44#include "prpmc1100.h"
45#include "nslu2.h"
46#include "nas100d.h"
47#include "dsmg600.h"
48#include "fsg.h"
49
50#endif /* _ASM_ARCH_HARDWARE_H */
diff --git a/include/asm-arm/arch-ixp4xx/io.h b/include/asm-arm/arch-ixp4xx/io.h
deleted file mode 100644
index de181ce958db..000000000000
--- a/include/asm-arm/arch-ixp4xx/io.h
+++ /dev/null
@@ -1,569 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-ixp4xx/io.h
3 *
4 * Author: Deepak Saxena <dsaxena@plexity.net>
5 *
6 * Copyright (C) 2002-2005 MontaVista Software, Inc.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 */
12
13#ifndef __ASM_ARM_ARCH_IO_H
14#define __ASM_ARM_ARCH_IO_H
15
16#include <linux/bitops.h>
17
18#include <asm/hardware.h>
19
20#define IO_SPACE_LIMIT 0xffff0000
21
22extern int (*ixp4xx_pci_read)(u32 addr, u32 cmd, u32* data);
23extern int ixp4xx_pci_write(u32 addr, u32 cmd, u32 data);
24
25
26/*
27 * IXP4xx provides two methods of accessing PCI memory space:
28 *
29 * 1) A direct mapped window from 0x48000000 to 0x4bffffff (64MB).
30 * To access PCI via this space, we simply ioremap() the BAR
31 * into the kernel and we can use the standard read[bwl]/write[bwl]
32 * macros. This is the preffered method due to speed but it
33 * limits the system to just 64MB of PCI memory. This can be
34 * problamatic if using video cards and other memory-heavy
35 * targets.
36 *
37 * 2) If > 64MB of memory space is required, the IXP4xx can be configured
38 * to use indirect registers to access PCI (as we do below for I/O
39 * transactions). This allows for up to 128MB (0x48000000 to 0x4fffffff)
40 * of memory on the bus. The disadvantage of this is that every
41 * PCI access requires three local register accesses plus a spinlock,
42 * but in some cases the performance hit is acceptable. In addition,
43 * you cannot mmap() PCI devices in this case.
44 *
45 */
46#ifndef CONFIG_IXP4XX_INDIRECT_PCI
47
48#define __mem_pci(a) (a)
49
50#else
51
52#include <linux/mm.h>
53
54/*
55 * In the case of using indirect PCI, we simply return the actual PCI
56 * address and our read/write implementation use that to drive the
57 * access registers. If something outside of PCI is ioremap'd, we
58 * fallback to the default.
59 */
60static inline void __iomem *
61__ixp4xx_ioremap(unsigned long addr, size_t size, unsigned int mtype)
62{
63 if((addr < PCIBIOS_MIN_MEM) || (addr > 0x4fffffff))
64 return __arm_ioremap(addr, size, mtype);
65
66 return (void __iomem *)addr;
67}
68
69static inline void
70__ixp4xx_iounmap(void __iomem *addr)
71{
72 if ((__force u32)addr >= VMALLOC_START)
73 __iounmap(addr);
74}
75
76#define __arch_ioremap(a, s, f) __ixp4xx_ioremap(a, s, f)
77#define __arch_iounmap(a) __ixp4xx_iounmap(a)
78
79#define writeb(v, p) __ixp4xx_writeb(v, p)
80#define writew(v, p) __ixp4xx_writew(v, p)
81#define writel(v, p) __ixp4xx_writel(v, p)
82
83#define writesb(p, v, l) __ixp4xx_writesb(p, v, l)
84#define writesw(p, v, l) __ixp4xx_writesw(p, v, l)
85#define writesl(p, v, l) __ixp4xx_writesl(p, v, l)
86
87#define readb(p) __ixp4xx_readb(p)
88#define readw(p) __ixp4xx_readw(p)
89#define readl(p) __ixp4xx_readl(p)
90
91#define readsb(p, v, l) __ixp4xx_readsb(p, v, l)
92#define readsw(p, v, l) __ixp4xx_readsw(p, v, l)
93#define readsl(p, v, l) __ixp4xx_readsl(p, v, l)
94
95static inline void
96__ixp4xx_writeb(u8 value, volatile void __iomem *p)
97{
98 u32 addr = (u32)p;
99 u32 n, byte_enables, data;
100
101 if (addr >= VMALLOC_START) {
102 __raw_writeb(value, addr);
103 return;
104 }
105
106 n = addr % 4;
107 byte_enables = (0xf & ~BIT(n)) << IXP4XX_PCI_NP_CBE_BESL;
108 data = value << (8*n);
109 ixp4xx_pci_write(addr, byte_enables | NP_CMD_MEMWRITE, data);
110}
111
112static inline void
113__ixp4xx_writesb(volatile void __iomem *bus_addr, const u8 *vaddr, int count)
114{
115 while (count--)
116 writeb(*vaddr++, bus_addr);
117}
118
119static inline void
120__ixp4xx_writew(u16 value, volatile void __iomem *p)
121{
122 u32 addr = (u32)p;
123 u32 n, byte_enables, data;
124
125 if (addr >= VMALLOC_START) {
126 __raw_writew(value, addr);
127 return;
128 }
129
130 n = addr % 4;
131 byte_enables = (0xf & ~(BIT(n) | BIT(n+1))) << IXP4XX_PCI_NP_CBE_BESL;
132 data = value << (8*n);
133 ixp4xx_pci_write(addr, byte_enables | NP_CMD_MEMWRITE, data);
134}
135
136static inline void
137__ixp4xx_writesw(volatile void __iomem *bus_addr, const u16 *vaddr, int count)
138{
139 while (count--)
140 writew(*vaddr++, bus_addr);
141}
142
143static inline void
144__ixp4xx_writel(u32 value, volatile void __iomem *p)
145{
146 u32 addr = (__force u32)p;
147 if (addr >= VMALLOC_START) {
148 __raw_writel(value, p);
149 return;
150 }
151
152 ixp4xx_pci_write(addr, NP_CMD_MEMWRITE, value);
153}
154
155static inline void
156__ixp4xx_writesl(volatile void __iomem *bus_addr, const u32 *vaddr, int count)
157{
158 while (count--)
159 writel(*vaddr++, bus_addr);
160}
161
162static inline unsigned char
163__ixp4xx_readb(const volatile void __iomem *p)
164{
165 u32 addr = (u32)p;
166 u32 n, byte_enables, data;
167
168 if (addr >= VMALLOC_START)
169 return __raw_readb(addr);
170
171 n = addr % 4;
172 byte_enables = (0xf & ~BIT(n)) << IXP4XX_PCI_NP_CBE_BESL;
173 if (ixp4xx_pci_read(addr, byte_enables | NP_CMD_MEMREAD, &data))
174 return 0xff;
175
176 return data >> (8*n);
177}
178
179static inline void
180__ixp4xx_readsb(const volatile void __iomem *bus_addr, u8 *vaddr, u32 count)
181{
182 while (count--)
183 *vaddr++ = readb(bus_addr);
184}
185
186static inline unsigned short
187__ixp4xx_readw(const volatile void __iomem *p)
188{
189 u32 addr = (u32)p;
190 u32 n, byte_enables, data;
191
192 if (addr >= VMALLOC_START)
193 return __raw_readw(addr);
194
195 n = addr % 4;
196 byte_enables = (0xf & ~(BIT(n) | BIT(n+1))) << IXP4XX_PCI_NP_CBE_BESL;
197 if (ixp4xx_pci_read(addr, byte_enables | NP_CMD_MEMREAD, &data))
198 return 0xffff;
199
200 return data>>(8*n);
201}
202
203static inline void
204__ixp4xx_readsw(const volatile void __iomem *bus_addr, u16 *vaddr, u32 count)
205{
206 while (count--)
207 *vaddr++ = readw(bus_addr);
208}
209
210static inline unsigned long
211__ixp4xx_readl(const volatile void __iomem *p)
212{
213 u32 addr = (__force u32)p;
214 u32 data;
215
216 if (addr >= VMALLOC_START)
217 return __raw_readl(p);
218
219 if (ixp4xx_pci_read(addr, NP_CMD_MEMREAD, &data))
220 return 0xffffffff;
221
222 return data;
223}
224
225static inline void
226__ixp4xx_readsl(const volatile void __iomem *bus_addr, u32 *vaddr, u32 count)
227{
228 while (count--)
229 *vaddr++ = readl(bus_addr);
230}
231
232
233/*
234 * We can use the built-in functions b/c they end up calling writeb/readb
235 */
236#define memset_io(c,v,l) _memset_io((c),(v),(l))
237#define memcpy_fromio(a,c,l) _memcpy_fromio((a),(c),(l))
238#define memcpy_toio(c,a,l) _memcpy_toio((c),(a),(l))
239
240#endif
241
242#ifndef CONFIG_PCI
243
244#define __io(v) v
245
246#else
247
248/*
249 * IXP4xx does not have a transparent cpu -> PCI I/O translation
250 * window. Instead, it has a set of registers that must be tweaked
251 * with the proper byte lanes, command types, and address for the
252 * transaction. This means that we need to override the default
253 * I/O functions.
254 */
255#define outb(p, v) __ixp4xx_outb(p, v)
256#define outw(p, v) __ixp4xx_outw(p, v)
257#define outl(p, v) __ixp4xx_outl(p, v)
258
259#define outsb(p, v, l) __ixp4xx_outsb(p, v, l)
260#define outsw(p, v, l) __ixp4xx_outsw(p, v, l)
261#define outsl(p, v, l) __ixp4xx_outsl(p, v, l)
262
263#define inb(p) __ixp4xx_inb(p)
264#define inw(p) __ixp4xx_inw(p)
265#define inl(p) __ixp4xx_inl(p)
266
267#define insb(p, v, l) __ixp4xx_insb(p, v, l)
268#define insw(p, v, l) __ixp4xx_insw(p, v, l)
269#define insl(p, v, l) __ixp4xx_insl(p, v, l)
270
271
272static inline void
273__ixp4xx_outb(u8 value, u32 addr)
274{
275 u32 n, byte_enables, data;
276 n = addr % 4;
277 byte_enables = (0xf & ~BIT(n)) << IXP4XX_PCI_NP_CBE_BESL;
278 data = value << (8*n);
279 ixp4xx_pci_write(addr, byte_enables | NP_CMD_IOWRITE, data);
280}
281
282static inline void
283__ixp4xx_outsb(u32 io_addr, const u8 *vaddr, u32 count)
284{
285 while (count--)
286 outb(*vaddr++, io_addr);
287}
288
289static inline void
290__ixp4xx_outw(u16 value, u32 addr)
291{
292 u32 n, byte_enables, data;
293 n = addr % 4;
294 byte_enables = (0xf & ~(BIT(n) | BIT(n+1))) << IXP4XX_PCI_NP_CBE_BESL;
295 data = value << (8*n);
296 ixp4xx_pci_write(addr, byte_enables | NP_CMD_IOWRITE, data);
297}
298
299static inline void
300__ixp4xx_outsw(u32 io_addr, const u16 *vaddr, u32 count)
301{
302 while (count--)
303 outw(cpu_to_le16(*vaddr++), io_addr);
304}
305
306static inline void
307__ixp4xx_outl(u32 value, u32 addr)
308{
309 ixp4xx_pci_write(addr, NP_CMD_IOWRITE, value);
310}
311
312static inline void
313__ixp4xx_outsl(u32 io_addr, const u32 *vaddr, u32 count)
314{
315 while (count--)
316 outl(*vaddr++, io_addr);
317}
318
319static inline u8
320__ixp4xx_inb(u32 addr)
321{
322 u32 n, byte_enables, data;
323 n = addr % 4;
324 byte_enables = (0xf & ~BIT(n)) << IXP4XX_PCI_NP_CBE_BESL;
325 if (ixp4xx_pci_read(addr, byte_enables | NP_CMD_IOREAD, &data))
326 return 0xff;
327
328 return data >> (8*n);
329}
330
331static inline void
332__ixp4xx_insb(u32 io_addr, u8 *vaddr, u32 count)
333{
334 while (count--)
335 *vaddr++ = inb(io_addr);
336}
337
338static inline u16
339__ixp4xx_inw(u32 addr)
340{
341 u32 n, byte_enables, data;
342 n = addr % 4;
343 byte_enables = (0xf & ~(BIT(n) | BIT(n+1))) << IXP4XX_PCI_NP_CBE_BESL;
344 if (ixp4xx_pci_read(addr, byte_enables | NP_CMD_IOREAD, &data))
345 return 0xffff;
346
347 return data>>(8*n);
348}
349
350static inline void
351__ixp4xx_insw(u32 io_addr, u16 *vaddr, u32 count)
352{
353 while (count--)
354 *vaddr++ = le16_to_cpu(inw(io_addr));
355}
356
357static inline u32
358__ixp4xx_inl(u32 addr)
359{
360 u32 data;
361 if (ixp4xx_pci_read(addr, NP_CMD_IOREAD, &data))
362 return 0xffffffff;
363
364 return data;
365}
366
367static inline void
368__ixp4xx_insl(u32 io_addr, u32 *vaddr, u32 count)
369{
370 while (count--)
371 *vaddr++ = inl(io_addr);
372}
373
374#define PIO_OFFSET 0x10000UL
375#define PIO_MASK 0x0ffffUL
376
377#define __is_io_address(p) (((unsigned long)p >= PIO_OFFSET) && \
378 ((unsigned long)p <= (PIO_MASK + PIO_OFFSET)))
379static inline unsigned int
380__ixp4xx_ioread8(const void __iomem *addr)
381{
382 unsigned long port = (unsigned long __force)addr;
383 if (__is_io_address(port))
384 return (unsigned int)__ixp4xx_inb(port & PIO_MASK);
385 else
386#ifndef CONFIG_IXP4XX_INDIRECT_PCI
387 return (unsigned int)__raw_readb(port);
388#else
389 return (unsigned int)__ixp4xx_readb(addr);
390#endif
391}
392
393static inline void
394__ixp4xx_ioread8_rep(const void __iomem *addr, void *vaddr, u32 count)
395{
396 unsigned long port = (unsigned long __force)addr;
397 if (__is_io_address(port))
398 __ixp4xx_insb(port & PIO_MASK, vaddr, count);
399 else
400#ifndef CONFIG_IXP4XX_INDIRECT_PCI
401 __raw_readsb(addr, vaddr, count);
402#else
403 __ixp4xx_readsb(addr, vaddr, count);
404#endif
405}
406
407static inline unsigned int
408__ixp4xx_ioread16(const void __iomem *addr)
409{
410 unsigned long port = (unsigned long __force)addr;
411 if (__is_io_address(port))
412 return (unsigned int)__ixp4xx_inw(port & PIO_MASK);
413 else
414#ifndef CONFIG_IXP4XX_INDIRECT_PCI
415 return le16_to_cpu(__raw_readw((u32)port));
416#else
417 return (unsigned int)__ixp4xx_readw(addr);
418#endif
419}
420
421static inline void
422__ixp4xx_ioread16_rep(const void __iomem *addr, void *vaddr, u32 count)
423{
424 unsigned long port = (unsigned long __force)addr;
425 if (__is_io_address(port))
426 __ixp4xx_insw(port & PIO_MASK, vaddr, count);
427 else
428#ifndef CONFIG_IXP4XX_INDIRECT_PCI
429 __raw_readsw(addr, vaddr, count);
430#else
431 __ixp4xx_readsw(addr, vaddr, count);
432#endif
433}
434
435static inline unsigned int
436__ixp4xx_ioread32(const void __iomem *addr)
437{
438 unsigned long port = (unsigned long __force)addr;
439 if (__is_io_address(port))
440 return (unsigned int)__ixp4xx_inl(port & PIO_MASK);
441 else {
442#ifndef CONFIG_IXP4XX_INDIRECT_PCI
443 return le32_to_cpu((__force __le32)__raw_readl(addr));
444#else
445 return (unsigned int)__ixp4xx_readl(addr);
446#endif
447 }
448}
449
450static inline void
451__ixp4xx_ioread32_rep(const void __iomem *addr, void *vaddr, u32 count)
452{
453 unsigned long port = (unsigned long __force)addr;
454 if (__is_io_address(port))
455 __ixp4xx_insl(port & PIO_MASK, vaddr, count);
456 else
457#ifndef CONFIG_IXP4XX_INDIRECT_PCI
458 __raw_readsl(addr, vaddr, count);
459#else
460 __ixp4xx_readsl(addr, vaddr, count);
461#endif
462}
463
464static inline void
465__ixp4xx_iowrite8(u8 value, void __iomem *addr)
466{
467 unsigned long port = (unsigned long __force)addr;
468 if (__is_io_address(port))
469 __ixp4xx_outb(value, port & PIO_MASK);
470 else
471#ifndef CONFIG_IXP4XX_INDIRECT_PCI
472 __raw_writeb(value, port);
473#else
474 __ixp4xx_writeb(value, addr);
475#endif
476}
477
478static inline void
479__ixp4xx_iowrite8_rep(void __iomem *addr, const void *vaddr, u32 count)
480{
481 unsigned long port = (unsigned long __force)addr;
482 if (__is_io_address(port))
483 __ixp4xx_outsb(port & PIO_MASK, vaddr, count);
484 else
485#ifndef CONFIG_IXP4XX_INDIRECT_PCI
486 __raw_writesb(addr, vaddr, count);
487#else
488 __ixp4xx_writesb(addr, vaddr, count);
489#endif
490}
491
492static inline void
493__ixp4xx_iowrite16(u16 value, void __iomem *addr)
494{
495 unsigned long port = (unsigned long __force)addr;
496 if (__is_io_address(port))
497 __ixp4xx_outw(value, port & PIO_MASK);
498 else
499#ifndef CONFIG_IXP4XX_INDIRECT_PCI
500 __raw_writew(cpu_to_le16(value), addr);
501#else
502 __ixp4xx_writew(value, addr);
503#endif
504}
505
506static inline void
507__ixp4xx_iowrite16_rep(void __iomem *addr, const void *vaddr, u32 count)
508{
509 unsigned long port = (unsigned long __force)addr;
510 if (__is_io_address(port))
511 __ixp4xx_outsw(port & PIO_MASK, vaddr, count);
512 else
513#ifndef CONFIG_IXP4XX_INDIRECT_PCI
514 __raw_writesw(addr, vaddr, count);
515#else
516 __ixp4xx_writesw(addr, vaddr, count);
517#endif
518}
519
520static inline void
521__ixp4xx_iowrite32(u32 value, void __iomem *addr)
522{
523 unsigned long port = (unsigned long __force)addr;
524 if (__is_io_address(port))
525 __ixp4xx_outl(value, port & PIO_MASK);
526 else
527#ifndef CONFIG_IXP4XX_INDIRECT_PCI
528 __raw_writel((u32 __force)cpu_to_le32(value), addr);
529#else
530 __ixp4xx_writel(value, addr);
531#endif
532}
533
534static inline void
535__ixp4xx_iowrite32_rep(void __iomem *addr, const void *vaddr, u32 count)
536{
537 unsigned long port = (unsigned long __force)addr;
538 if (__is_io_address(port))
539 __ixp4xx_outsl(port & PIO_MASK, vaddr, count);
540 else
541#ifndef CONFIG_IXP4XX_INDIRECT_PCI
542 __raw_writesl(addr, vaddr, count);
543#else
544 __ixp4xx_writesl(addr, vaddr, count);
545#endif
546}
547
548#define ioread8(p) __ixp4xx_ioread8(p)
549#define ioread16(p) __ixp4xx_ioread16(p)
550#define ioread32(p) __ixp4xx_ioread32(p)
551
552#define ioread8_rep(p, v, c) __ixp4xx_ioread8_rep(p, v, c)
553#define ioread16_rep(p, v, c) __ixp4xx_ioread16_rep(p, v, c)
554#define ioread32_rep(p, v, c) __ixp4xx_ioread32_rep(p, v, c)
555
556#define iowrite8(v,p) __ixp4xx_iowrite8(v,p)
557#define iowrite16(v,p) __ixp4xx_iowrite16(v,p)
558#define iowrite32(v,p) __ixp4xx_iowrite32(v,p)
559
560#define iowrite8_rep(p, v, c) __ixp4xx_iowrite8_rep(p, v, c)
561#define iowrite16_rep(p, v, c) __ixp4xx_iowrite16_rep(p, v, c)
562#define iowrite32_rep(p, v, c) __ixp4xx_iowrite32_rep(p, v, c)
563
564#define ioport_map(port, nr) ((void __iomem*)(port + PIO_OFFSET))
565#define ioport_unmap(addr)
566#endif // !CONFIG_PCI
567
568#endif // __ASM_ARM_ARCH_IO_H
569
diff --git a/include/asm-arm/arch-ixp4xx/irqs.h b/include/asm-arm/arch-ixp4xx/irqs.h
deleted file mode 100644
index 674af4a84147..000000000000
--- a/include/asm-arm/arch-ixp4xx/irqs.h
+++ /dev/null
@@ -1,138 +0,0 @@
1/*
2 * include/asm-arm/arch-ixp4xx/irqs.h
3 *
4 * IRQ definitions for IXP4XX based systems
5 *
6 * Copyright (C) 2002 Intel Corporation.
7 * Copyright (C) 2003 MontaVista Software, Inc.
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12 *
13 */
14
15#ifndef _ARCH_IXP4XX_IRQS_H_
16#define _ARCH_IXP4XX_IRQS_H_
17
18
19#define IRQ_IXP4XX_NPEA 0
20#define IRQ_IXP4XX_NPEB 1
21#define IRQ_IXP4XX_NPEC 2
22#define IRQ_IXP4XX_QM1 3
23#define IRQ_IXP4XX_QM2 4
24#define IRQ_IXP4XX_TIMER1 5
25#define IRQ_IXP4XX_GPIO0 6
26#define IRQ_IXP4XX_GPIO1 7
27#define IRQ_IXP4XX_PCI_INT 8
28#define IRQ_IXP4XX_PCI_DMA1 9
29#define IRQ_IXP4XX_PCI_DMA2 10
30#define IRQ_IXP4XX_TIMER2 11
31#define IRQ_IXP4XX_USB 12
32#define IRQ_IXP4XX_UART2 13
33#define IRQ_IXP4XX_TIMESTAMP 14
34#define IRQ_IXP4XX_UART1 15
35#define IRQ_IXP4XX_WDOG 16
36#define IRQ_IXP4XX_AHB_PMU 17
37#define IRQ_IXP4XX_XSCALE_PMU 18
38#define IRQ_IXP4XX_GPIO2 19
39#define IRQ_IXP4XX_GPIO3 20
40#define IRQ_IXP4XX_GPIO4 21
41#define IRQ_IXP4XX_GPIO5 22
42#define IRQ_IXP4XX_GPIO6 23
43#define IRQ_IXP4XX_GPIO7 24
44#define IRQ_IXP4XX_GPIO8 25
45#define IRQ_IXP4XX_GPIO9 26
46#define IRQ_IXP4XX_GPIO10 27
47#define IRQ_IXP4XX_GPIO11 28
48#define IRQ_IXP4XX_GPIO12 29
49#define IRQ_IXP4XX_SW_INT1 30
50#define IRQ_IXP4XX_SW_INT2 31
51#define IRQ_IXP4XX_USB_HOST 32
52#define IRQ_IXP4XX_I2C 33
53#define IRQ_IXP4XX_SSP 34
54#define IRQ_IXP4XX_TSYNC 35
55#define IRQ_IXP4XX_EAU_DONE 36
56#define IRQ_IXP4XX_SHA_DONE 37
57#define IRQ_IXP4XX_SWCP_PE 58
58#define IRQ_IXP4XX_QM_PE 60
59#define IRQ_IXP4XX_MCU_ECC 61
60#define IRQ_IXP4XX_EXP_PE 62
61
62/*
63 * Only first 32 sources are valid if running on IXP42x systems
64 */
65#if defined(CONFIG_CPU_IXP46X) || defined(CONFIG_CPU_IXP43X)
66#define NR_IRQS 64
67#else
68#define NR_IRQS 32
69#endif
70
71#define XSCALE_PMU_IRQ (IRQ_IXP4XX_XSCALE_PMU)
72
73/*
74 * IXDP425 board IRQs
75 */
76#define IRQ_IXDP425_PCI_INTA IRQ_IXP4XX_GPIO11
77#define IRQ_IXDP425_PCI_INTB IRQ_IXP4XX_GPIO10
78#define IRQ_IXDP425_PCI_INTC IRQ_IXP4XX_GPIO9
79#define IRQ_IXDP425_PCI_INTD IRQ_IXP4XX_GPIO8
80
81/*
82 * Gateworks Avila board IRQs
83 */
84#define IRQ_AVILA_PCI_INTA IRQ_IXP4XX_GPIO11
85#define IRQ_AVILA_PCI_INTB IRQ_IXP4XX_GPIO10
86#define IRQ_AVILA_PCI_INTC IRQ_IXP4XX_GPIO9
87#define IRQ_AVILA_PCI_INTD IRQ_IXP4XX_GPIO8
88
89
90/*
91 * PrPMC1100 Board IRQs
92 */
93#define IRQ_PRPMC1100_PCI_INTA IRQ_IXP4XX_GPIO11
94#define IRQ_PRPMC1100_PCI_INTB IRQ_IXP4XX_GPIO10
95#define IRQ_PRPMC1100_PCI_INTC IRQ_IXP4XX_GPIO9
96#define IRQ_PRPMC1100_PCI_INTD IRQ_IXP4XX_GPIO8
97
98/*
99 * ADI Coyote Board IRQs
100 */
101#define IRQ_COYOTE_PCI_SLOT0 IRQ_IXP4XX_GPIO6
102#define IRQ_COYOTE_PCI_SLOT1 IRQ_IXP4XX_GPIO11
103#define IRQ_COYOTE_IDE IRQ_IXP4XX_GPIO5
104
105/*
106 * NSLU2 board IRQs
107 */
108#define IRQ_NSLU2_PCI_INTA IRQ_IXP4XX_GPIO11
109#define IRQ_NSLU2_PCI_INTB IRQ_IXP4XX_GPIO10
110#define IRQ_NSLU2_PCI_INTC IRQ_IXP4XX_GPIO9
111
112/*
113 * NAS100D board IRQs
114 */
115#define IRQ_NAS100D_PCI_INTA IRQ_IXP4XX_GPIO11
116#define IRQ_NAS100D_PCI_INTB IRQ_IXP4XX_GPIO10
117#define IRQ_NAS100D_PCI_INTC IRQ_IXP4XX_GPIO9
118#define IRQ_NAS100D_PCI_INTD IRQ_IXP4XX_GPIO8
119#define IRQ_NAS100D_PCI_INTE IRQ_IXP4XX_GPIO7
120
121/*
122 * D-Link DSM-G600 RevA board IRQs
123 */
124#define IRQ_DSMG600_PCI_INTA IRQ_IXP4XX_GPIO11
125#define IRQ_DSMG600_PCI_INTB IRQ_IXP4XX_GPIO10
126#define IRQ_DSMG600_PCI_INTC IRQ_IXP4XX_GPIO9
127#define IRQ_DSMG600_PCI_INTD IRQ_IXP4XX_GPIO8
128#define IRQ_DSMG600_PCI_INTE IRQ_IXP4XX_GPIO7
129#define IRQ_DSMG600_PCI_INTF IRQ_IXP4XX_GPIO6
130
131/*
132 * Freecom FSG-3 Board IRQs
133 */
134#define IRQ_FSG_PCI_INTA IRQ_IXP4XX_GPIO6
135#define IRQ_FSG_PCI_INTB IRQ_IXP4XX_GPIO7
136#define IRQ_FSG_PCI_INTC IRQ_IXP4XX_GPIO5
137
138#endif
diff --git a/include/asm-arm/arch-ixp4xx/ixdp425.h b/include/asm-arm/arch-ixp4xx/ixdp425.h
deleted file mode 100644
index e0791af3bfea..000000000000
--- a/include/asm-arm/arch-ixp4xx/ixdp425.h
+++ /dev/null
@@ -1,39 +0,0 @@
1/*
2 * include/asm-arm/arch-ixp4xx/ixdp425.h
3 *
4 * IXDP425 platform specific definitions
5 *
6 * Author: Deepak Saxena <dsaxena@plexity.net>
7 *
8 * Copyright 2004 (c) MontaVista, Software, Inc.
9 *
10 * This file is licensed under the terms of the GNU General Public
11 * License version 2. This program is licensed "as is" without any
12 * warranty of any kind, whether express or implied.
13 */
14
15#ifndef __ASM_ARCH_HARDWARE_H__
16#error "Do not include this directly, instead #include <asm/hardware.h>"
17#endif
18
19#define IXDP425_SDA_PIN 7
20#define IXDP425_SCL_PIN 6
21
22/*
23 * IXDP425 PCI IRQs
24 */
25#define IXDP425_PCI_MAX_DEV 4
26#define IXDP425_PCI_IRQ_LINES 4
27
28
29/* PCI controller GPIO to IRQ pin mappings */
30#define IXDP425_PCI_INTA_PIN 11
31#define IXDP425_PCI_INTB_PIN 10
32#define IXDP425_PCI_INTC_PIN 9
33#define IXDP425_PCI_INTD_PIN 8
34
35/* NAND Flash pins */
36#define IXDP425_NAND_NCE_PIN 12
37
38#define IXDP425_NAND_CMD_BYTE 0x01
39#define IXDP425_NAND_ADDR_BYTE 0x02
diff --git a/include/asm-arm/arch-ixp4xx/ixp4xx-regs.h b/include/asm-arm/arch-ixp4xx/ixp4xx-regs.h
deleted file mode 100644
index 68aca8554f5a..000000000000
--- a/include/asm-arm/arch-ixp4xx/ixp4xx-regs.h
+++ /dev/null
@@ -1,638 +0,0 @@
1/*
2 * include/asm-arm/arch-ixp4xx/ixp4xx-regs.h
3 *
4 * Register definitions for IXP4xx chipset. This file contains
5 * register location and bit definitions only. Platform specific
6 * definitions and helper function declarations are in platform.h
7 * and machine-name.h.
8 *
9 * Copyright (C) 2002 Intel Corporation.
10 * Copyright (C) 2003-2004 MontaVista Software, Inc.
11 *
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License version 2 as
14 * published by the Free Software Foundation.
15 *
16 */
17
18#ifndef _ASM_ARM_IXP4XX_H_
19#define _ASM_ARM_IXP4XX_H_
20
21/*
22 * IXP4xx Linux Memory Map:
23 *
24 * Phy Size Virt Description
25 * =========================================================================
26 *
27 * 0x00000000 0x10000000(max) PAGE_OFFSET System RAM
28 *
29 * 0x48000000 0x04000000 ioremap'd PCI Memory Space
30 *
31 * 0x50000000 0x10000000 ioremap'd EXP BUS
32 *
33 * 0x6000000 0x00004000 ioremap'd QMgr
34 *
35 * 0xC0000000 0x00001000 0xffbff000 PCI CFG
36 *
37 * 0xC4000000 0x00001000 0xffbfe000 EXP CFG
38 *
39 * 0xC8000000 0x00013000 0xffbeb000 On-Chip Peripherals
40 */
41
42/*
43 * Queue Manager
44 */
45#define IXP4XX_QMGR_BASE_PHYS (0x60000000)
46#define IXP4XX_QMGR_REGION_SIZE (0x00004000)
47
48/*
49 * Expansion BUS Configuration registers
50 */
51#define IXP4XX_EXP_CFG_BASE_PHYS (0xC4000000)
52#define IXP4XX_EXP_CFG_BASE_VIRT (0xFFBFE000)
53#define IXP4XX_EXP_CFG_REGION_SIZE (0x00001000)
54
55/*
56 * PCI Config registers
57 */
58#define IXP4XX_PCI_CFG_BASE_PHYS (0xC0000000)
59#define IXP4XX_PCI_CFG_BASE_VIRT (0xFFBFF000)
60#define IXP4XX_PCI_CFG_REGION_SIZE (0x00001000)
61
62/*
63 * Peripheral space
64 */
65#define IXP4XX_PERIPHERAL_BASE_PHYS (0xC8000000)
66#define IXP4XX_PERIPHERAL_BASE_VIRT (0xFFBEB000)
67#define IXP4XX_PERIPHERAL_REGION_SIZE (0x00013000)
68
69/*
70 * Debug UART
71 *
72 * This is basically a remap of UART1 into a region that is section
73 * aligned so that it * can be used with the low-level debug code.
74 */
75#define IXP4XX_DEBUG_UART_BASE_PHYS (0xC8000000)
76#define IXP4XX_DEBUG_UART_BASE_VIRT (0xffb00000)
77#define IXP4XX_DEBUG_UART_REGION_SIZE (0x00001000)
78
79#define IXP4XX_EXP_CS0_OFFSET 0x00
80#define IXP4XX_EXP_CS1_OFFSET 0x04
81#define IXP4XX_EXP_CS2_OFFSET 0x08
82#define IXP4XX_EXP_CS3_OFFSET 0x0C
83#define IXP4XX_EXP_CS4_OFFSET 0x10
84#define IXP4XX_EXP_CS5_OFFSET 0x14
85#define IXP4XX_EXP_CS6_OFFSET 0x18
86#define IXP4XX_EXP_CS7_OFFSET 0x1C
87#define IXP4XX_EXP_CFG0_OFFSET 0x20
88#define IXP4XX_EXP_CFG1_OFFSET 0x24
89#define IXP4XX_EXP_CFG2_OFFSET 0x28
90#define IXP4XX_EXP_CFG3_OFFSET 0x2C
91
92/*
93 * Expansion Bus Controller registers.
94 */
95#define IXP4XX_EXP_REG(x) ((volatile u32 *)(IXP4XX_EXP_CFG_BASE_VIRT+(x)))
96
97#define IXP4XX_EXP_CS0 IXP4XX_EXP_REG(IXP4XX_EXP_CS0_OFFSET)
98#define IXP4XX_EXP_CS1 IXP4XX_EXP_REG(IXP4XX_EXP_CS1_OFFSET)
99#define IXP4XX_EXP_CS2 IXP4XX_EXP_REG(IXP4XX_EXP_CS2_OFFSET)
100#define IXP4XX_EXP_CS3 IXP4XX_EXP_REG(IXP4XX_EXP_CS3_OFFSET)
101#define IXP4XX_EXP_CS4 IXP4XX_EXP_REG(IXP4XX_EXP_CS4_OFFSET)
102#define IXP4XX_EXP_CS5 IXP4XX_EXP_REG(IXP4XX_EXP_CS5_OFFSET)
103#define IXP4XX_EXP_CS6 IXP4XX_EXP_REG(IXP4XX_EXP_CS6_OFFSET)
104#define IXP4XX_EXP_CS7 IXP4XX_EXP_REG(IXP4XX_EXP_CS7_OFFSET)
105
106#define IXP4XX_EXP_CFG0 IXP4XX_EXP_REG(IXP4XX_EXP_CFG0_OFFSET)
107#define IXP4XX_EXP_CFG1 IXP4XX_EXP_REG(IXP4XX_EXP_CFG1_OFFSET)
108#define IXP4XX_EXP_CFG2 IXP4XX_EXP_REG(IXP4XX_EXP_CFG2_OFFSET)
109#define IXP4XX_EXP_CFG3 IXP4XX_EXP_REG(IXP4XX_EXP_CFG3_OFFSET)
110
111
112/*
113 * Peripheral Space Register Region Base Addresses
114 */
115#define IXP4XX_UART1_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0x0000)
116#define IXP4XX_UART2_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0x1000)
117#define IXP4XX_PMU_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0x2000)
118#define IXP4XX_INTC_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0x3000)
119#define IXP4XX_GPIO_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0x4000)
120#define IXP4XX_TIMER_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0x5000)
121#define IXP4XX_NPEA_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0x6000)
122#define IXP4XX_NPEB_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0x7000)
123#define IXP4XX_NPEC_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0x8000)
124#define IXP4XX_EthB_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0x9000)
125#define IXP4XX_EthC_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0xA000)
126#define IXP4XX_USB_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0xB000)
127/* ixp46X only */
128#define IXP4XX_EthA_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0xC000)
129#define IXP4XX_EthB1_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0xD000)
130#define IXP4XX_EthB2_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0xE000)
131#define IXP4XX_EthB3_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0xF000)
132#define IXP4XX_TIMESYNC_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0x10000)
133#define IXP4XX_I2C_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0x11000)
134#define IXP4XX_SSP_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0x12000)
135
136
137#define IXP4XX_UART1_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x0000)
138#define IXP4XX_UART2_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x1000)
139#define IXP4XX_PMU_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x2000)
140#define IXP4XX_INTC_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x3000)
141#define IXP4XX_GPIO_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x4000)
142#define IXP4XX_TIMER_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x5000)
143#define IXP4XX_NPEA_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x6000)
144#define IXP4XX_NPEB_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x7000)
145#define IXP4XX_NPEC_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x8000)
146#define IXP4XX_EthB_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x9000)
147#define IXP4XX_EthC_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0xA000)
148#define IXP4XX_USB_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0xB000)
149/* ixp46X only */
150#define IXP4XX_EthA_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0xC000)
151#define IXP4XX_EthB1_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0xD000)
152#define IXP4XX_EthB2_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0xE000)
153#define IXP4XX_EthB3_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0xF000)
154#define IXP4XX_TIMESYNC_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x10000)
155#define IXP4XX_I2C_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x11000)
156#define IXP4XX_SSP_BASE_VIRT (IXP4XX_PERIPHERAL_BASE_VIRT + 0x12000)
157
158/*
159 * Constants to make it easy to access Interrupt Controller registers
160 */
161#define IXP4XX_ICPR_OFFSET 0x00 /* Interrupt Status */
162#define IXP4XX_ICMR_OFFSET 0x04 /* Interrupt Enable */
163#define IXP4XX_ICLR_OFFSET 0x08 /* Interrupt IRQ/FIQ Select */
164#define IXP4XX_ICIP_OFFSET 0x0C /* IRQ Status */
165#define IXP4XX_ICFP_OFFSET 0x10 /* FIQ Status */
166#define IXP4XX_ICHR_OFFSET 0x14 /* Interrupt Priority */
167#define IXP4XX_ICIH_OFFSET 0x18 /* IRQ Highest Pri Int */
168#define IXP4XX_ICFH_OFFSET 0x1C /* FIQ Highest Pri Int */
169
170/*
171 * IXP465-only
172 */
173#define IXP4XX_ICPR2_OFFSET 0x20 /* Interrupt Status 2 */
174#define IXP4XX_ICMR2_OFFSET 0x24 /* Interrupt Enable 2 */
175#define IXP4XX_ICLR2_OFFSET 0x28 /* Interrupt IRQ/FIQ Select 2 */
176#define IXP4XX_ICIP2_OFFSET 0x2C /* IRQ Status */
177#define IXP4XX_ICFP2_OFFSET 0x30 /* FIQ Status */
178#define IXP4XX_ICEEN_OFFSET 0x34 /* Error High Pri Enable */
179
180
181/*
182 * Interrupt Controller Register Definitions.
183 */
184
185#define IXP4XX_INTC_REG(x) ((volatile u32 *)(IXP4XX_INTC_BASE_VIRT+(x)))
186
187#define IXP4XX_ICPR IXP4XX_INTC_REG(IXP4XX_ICPR_OFFSET)
188#define IXP4XX_ICMR IXP4XX_INTC_REG(IXP4XX_ICMR_OFFSET)
189#define IXP4XX_ICLR IXP4XX_INTC_REG(IXP4XX_ICLR_OFFSET)
190#define IXP4XX_ICIP IXP4XX_INTC_REG(IXP4XX_ICIP_OFFSET)
191#define IXP4XX_ICFP IXP4XX_INTC_REG(IXP4XX_ICFP_OFFSET)
192#define IXP4XX_ICHR IXP4XX_INTC_REG(IXP4XX_ICHR_OFFSET)
193#define IXP4XX_ICIH IXP4XX_INTC_REG(IXP4XX_ICIH_OFFSET)
194#define IXP4XX_ICFH IXP4XX_INTC_REG(IXP4XX_ICFH_OFFSET)
195#define IXP4XX_ICPR2 IXP4XX_INTC_REG(IXP4XX_ICPR2_OFFSET)
196#define IXP4XX_ICMR2 IXP4XX_INTC_REG(IXP4XX_ICMR2_OFFSET)
197#define IXP4XX_ICLR2 IXP4XX_INTC_REG(IXP4XX_ICLR2_OFFSET)
198#define IXP4XX_ICIP2 IXP4XX_INTC_REG(IXP4XX_ICIP2_OFFSET)
199#define IXP4XX_ICFP2 IXP4XX_INTC_REG(IXP4XX_ICFP2_OFFSET)
200#define IXP4XX_ICEEN IXP4XX_INTC_REG(IXP4XX_ICEEN_OFFSET)
201
202/*
203 * Constants to make it easy to access GPIO registers
204 */
205#define IXP4XX_GPIO_GPOUTR_OFFSET 0x00
206#define IXP4XX_GPIO_GPOER_OFFSET 0x04
207#define IXP4XX_GPIO_GPINR_OFFSET 0x08
208#define IXP4XX_GPIO_GPISR_OFFSET 0x0C
209#define IXP4XX_GPIO_GPIT1R_OFFSET 0x10
210#define IXP4XX_GPIO_GPIT2R_OFFSET 0x14
211#define IXP4XX_GPIO_GPCLKR_OFFSET 0x18
212#define IXP4XX_GPIO_GPDBSELR_OFFSET 0x1C
213
214/*
215 * GPIO Register Definitions.
216 * [Only perform 32bit reads/writes]
217 */
218#define IXP4XX_GPIO_REG(x) ((volatile u32 *)(IXP4XX_GPIO_BASE_VIRT+(x)))
219
220#define IXP4XX_GPIO_GPOUTR IXP4XX_GPIO_REG(IXP4XX_GPIO_GPOUTR_OFFSET)
221#define IXP4XX_GPIO_GPOER IXP4XX_GPIO_REG(IXP4XX_GPIO_GPOER_OFFSET)
222#define IXP4XX_GPIO_GPINR IXP4XX_GPIO_REG(IXP4XX_GPIO_GPINR_OFFSET)
223#define IXP4XX_GPIO_GPISR IXP4XX_GPIO_REG(IXP4XX_GPIO_GPISR_OFFSET)
224#define IXP4XX_GPIO_GPIT1R IXP4XX_GPIO_REG(IXP4XX_GPIO_GPIT1R_OFFSET)
225#define IXP4XX_GPIO_GPIT2R IXP4XX_GPIO_REG(IXP4XX_GPIO_GPIT2R_OFFSET)
226#define IXP4XX_GPIO_GPCLKR IXP4XX_GPIO_REG(IXP4XX_GPIO_GPCLKR_OFFSET)
227#define IXP4XX_GPIO_GPDBSELR IXP4XX_GPIO_REG(IXP4XX_GPIO_GPDBSELR_OFFSET)
228
229/*
230 * GPIO register bit definitions
231 */
232
233/* Interrupt styles
234 */
235#define IXP4XX_GPIO_STYLE_ACTIVE_HIGH 0x0
236#define IXP4XX_GPIO_STYLE_ACTIVE_LOW 0x1
237#define IXP4XX_GPIO_STYLE_RISING_EDGE 0x2
238#define IXP4XX_GPIO_STYLE_FALLING_EDGE 0x3
239#define IXP4XX_GPIO_STYLE_TRANSITIONAL 0x4
240
241/*
242 * Mask used to clear interrupt styles
243 */
244#define IXP4XX_GPIO_STYLE_CLEAR 0x7
245#define IXP4XX_GPIO_STYLE_SIZE 3
246
247/*
248 * Constants to make it easy to access Timer Control/Status registers
249 */
250#define IXP4XX_OSTS_OFFSET 0x00 /* Continious TimeStamp */
251#define IXP4XX_OST1_OFFSET 0x04 /* Timer 1 Timestamp */
252#define IXP4XX_OSRT1_OFFSET 0x08 /* Timer 1 Reload */
253#define IXP4XX_OST2_OFFSET 0x0C /* Timer 2 Timestamp */
254#define IXP4XX_OSRT2_OFFSET 0x10 /* Timer 2 Reload */
255#define IXP4XX_OSWT_OFFSET 0x14 /* Watchdog Timer */
256#define IXP4XX_OSWE_OFFSET 0x18 /* Watchdog Enable */
257#define IXP4XX_OSWK_OFFSET 0x1C /* Watchdog Key */
258#define IXP4XX_OSST_OFFSET 0x20 /* Timer Status */
259
260/*
261 * Operating System Timer Register Definitions.
262 */
263
264#define IXP4XX_TIMER_REG(x) ((volatile u32 *)(IXP4XX_TIMER_BASE_VIRT+(x)))
265
266#define IXP4XX_OSTS IXP4XX_TIMER_REG(IXP4XX_OSTS_OFFSET)
267#define IXP4XX_OST1 IXP4XX_TIMER_REG(IXP4XX_OST1_OFFSET)
268#define IXP4XX_OSRT1 IXP4XX_TIMER_REG(IXP4XX_OSRT1_OFFSET)
269#define IXP4XX_OST2 IXP4XX_TIMER_REG(IXP4XX_OST2_OFFSET)
270#define IXP4XX_OSRT2 IXP4XX_TIMER_REG(IXP4XX_OSRT2_OFFSET)
271#define IXP4XX_OSWT IXP4XX_TIMER_REG(IXP4XX_OSWT_OFFSET)
272#define IXP4XX_OSWE IXP4XX_TIMER_REG(IXP4XX_OSWE_OFFSET)
273#define IXP4XX_OSWK IXP4XX_TIMER_REG(IXP4XX_OSWK_OFFSET)
274#define IXP4XX_OSST IXP4XX_TIMER_REG(IXP4XX_OSST_OFFSET)
275
276/*
277 * Timer register values and bit definitions
278 */
279#define IXP4XX_OST_ENABLE 0x00000001
280#define IXP4XX_OST_ONE_SHOT 0x00000002
281/* Low order bits of reload value ignored */
282#define IXP4XX_OST_RELOAD_MASK 0x00000003
283#define IXP4XX_OST_DISABLED 0x00000000
284#define IXP4XX_OSST_TIMER_1_PEND 0x00000001
285#define IXP4XX_OSST_TIMER_2_PEND 0x00000002
286#define IXP4XX_OSST_TIMER_TS_PEND 0x00000004
287#define IXP4XX_OSST_TIMER_WDOG_PEND 0x00000008
288#define IXP4XX_OSST_TIMER_WARM_RESET 0x00000010
289
290#define IXP4XX_WDT_KEY 0x0000482E
291
292#define IXP4XX_WDT_RESET_ENABLE 0x00000001
293#define IXP4XX_WDT_IRQ_ENABLE 0x00000002
294#define IXP4XX_WDT_COUNT_ENABLE 0x00000004
295
296
297/*
298 * Constants to make it easy to access PCI Control/Status registers
299 */
300#define PCI_NP_AD_OFFSET 0x00
301#define PCI_NP_CBE_OFFSET 0x04
302#define PCI_NP_WDATA_OFFSET 0x08
303#define PCI_NP_RDATA_OFFSET 0x0c
304#define PCI_CRP_AD_CBE_OFFSET 0x10
305#define PCI_CRP_WDATA_OFFSET 0x14
306#define PCI_CRP_RDATA_OFFSET 0x18
307#define PCI_CSR_OFFSET 0x1c
308#define PCI_ISR_OFFSET 0x20
309#define PCI_INTEN_OFFSET 0x24
310#define PCI_DMACTRL_OFFSET 0x28
311#define PCI_AHBMEMBASE_OFFSET 0x2c
312#define PCI_AHBIOBASE_OFFSET 0x30
313#define PCI_PCIMEMBASE_OFFSET 0x34
314#define PCI_AHBDOORBELL_OFFSET 0x38
315#define PCI_PCIDOORBELL_OFFSET 0x3C
316#define PCI_ATPDMA0_AHBADDR_OFFSET 0x40
317#define PCI_ATPDMA0_PCIADDR_OFFSET 0x44
318#define PCI_ATPDMA0_LENADDR_OFFSET 0x48
319#define PCI_ATPDMA1_AHBADDR_OFFSET 0x4C
320#define PCI_ATPDMA1_PCIADDR_OFFSET 0x50
321#define PCI_ATPDMA1_LENADDR_OFFSET 0x54
322
323/*
324 * PCI Control/Status Registers
325 */
326#define IXP4XX_PCI_CSR(x) ((volatile u32 *)(IXP4XX_PCI_CFG_BASE_VIRT+(x)))
327
328#define PCI_NP_AD IXP4XX_PCI_CSR(PCI_NP_AD_OFFSET)
329#define PCI_NP_CBE IXP4XX_PCI_CSR(PCI_NP_CBE_OFFSET)
330#define PCI_NP_WDATA IXP4XX_PCI_CSR(PCI_NP_WDATA_OFFSET)
331#define PCI_NP_RDATA IXP4XX_PCI_CSR(PCI_NP_RDATA_OFFSET)
332#define PCI_CRP_AD_CBE IXP4XX_PCI_CSR(PCI_CRP_AD_CBE_OFFSET)
333#define PCI_CRP_WDATA IXP4XX_PCI_CSR(PCI_CRP_WDATA_OFFSET)
334#define PCI_CRP_RDATA IXP4XX_PCI_CSR(PCI_CRP_RDATA_OFFSET)
335#define PCI_CSR IXP4XX_PCI_CSR(PCI_CSR_OFFSET)
336#define PCI_ISR IXP4XX_PCI_CSR(PCI_ISR_OFFSET)
337#define PCI_INTEN IXP4XX_PCI_CSR(PCI_INTEN_OFFSET)
338#define PCI_DMACTRL IXP4XX_PCI_CSR(PCI_DMACTRL_OFFSET)
339#define PCI_AHBMEMBASE IXP4XX_PCI_CSR(PCI_AHBMEMBASE_OFFSET)
340#define PCI_AHBIOBASE IXP4XX_PCI_CSR(PCI_AHBIOBASE_OFFSET)
341#define PCI_PCIMEMBASE IXP4XX_PCI_CSR(PCI_PCIMEMBASE_OFFSET)
342#define PCI_AHBDOORBELL IXP4XX_PCI_CSR(PCI_AHBDOORBELL_OFFSET)
343#define PCI_PCIDOORBELL IXP4XX_PCI_CSR(PCI_PCIDOORBELL_OFFSET)
344#define PCI_ATPDMA0_AHBADDR IXP4XX_PCI_CSR(PCI_ATPDMA0_AHBADDR_OFFSET)
345#define PCI_ATPDMA0_PCIADDR IXP4XX_PCI_CSR(PCI_ATPDMA0_PCIADDR_OFFSET)
346#define PCI_ATPDMA0_LENADDR IXP4XX_PCI_CSR(PCI_ATPDMA0_LENADDR_OFFSET)
347#define PCI_ATPDMA1_AHBADDR IXP4XX_PCI_CSR(PCI_ATPDMA1_AHBADDR_OFFSET)
348#define PCI_ATPDMA1_PCIADDR IXP4XX_PCI_CSR(PCI_ATPDMA1_PCIADDR_OFFSET)
349#define PCI_ATPDMA1_LENADDR IXP4XX_PCI_CSR(PCI_ATPDMA1_LENADDR_OFFSET)
350
351/*
352 * PCI register values and bit definitions
353 */
354
355/* CSR bit definitions */
356#define PCI_CSR_HOST 0x00000001
357#define PCI_CSR_ARBEN 0x00000002
358#define PCI_CSR_ADS 0x00000004
359#define PCI_CSR_PDS 0x00000008
360#define PCI_CSR_ABE 0x00000010
361#define PCI_CSR_DBT 0x00000020
362#define PCI_CSR_ASE 0x00000100
363#define PCI_CSR_IC 0x00008000
364
365/* ISR (Interrupt status) Register bit definitions */
366#define PCI_ISR_PSE 0x00000001
367#define PCI_ISR_PFE 0x00000002
368#define PCI_ISR_PPE 0x00000004
369#define PCI_ISR_AHBE 0x00000008
370#define PCI_ISR_APDC 0x00000010
371#define PCI_ISR_PADC 0x00000020
372#define PCI_ISR_ADB 0x00000040
373#define PCI_ISR_PDB 0x00000080
374
375/* INTEN (Interrupt Enable) Register bit definitions */
376#define PCI_INTEN_PSE 0x00000001
377#define PCI_INTEN_PFE 0x00000002
378#define PCI_INTEN_PPE 0x00000004
379#define PCI_INTEN_AHBE 0x00000008
380#define PCI_INTEN_APDC 0x00000010
381#define PCI_INTEN_PADC 0x00000020
382#define PCI_INTEN_ADB 0x00000040
383#define PCI_INTEN_PDB 0x00000080
384
385/*
386 * Shift value for byte enable on NP cmd/byte enable register
387 */
388#define IXP4XX_PCI_NP_CBE_BESL 4
389
390/*
391 * PCI commands supported by NP access unit
392 */
393#define NP_CMD_IOREAD 0x2
394#define NP_CMD_IOWRITE 0x3
395#define NP_CMD_CONFIGREAD 0xa
396#define NP_CMD_CONFIGWRITE 0xb
397#define NP_CMD_MEMREAD 0x6
398#define NP_CMD_MEMWRITE 0x7
399
400/*
401 * Constants for CRP access into local config space
402 */
403#define CRP_AD_CBE_BESL 20
404#define CRP_AD_CBE_WRITE 0x00010000
405
406
407/*
408 * USB Device Controller
409 *
410 * These are used by the USB gadget driver, so they don't follow the
411 * IXP4XX_ naming convetions.
412 *
413 */
414# define IXP4XX_USB_REG(x) (*((volatile u32 *)(x)))
415
416/* UDC Undocumented - Reserved1 */
417#define UDC_RES1 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0004)
418/* UDC Undocumented - Reserved2 */
419#define UDC_RES2 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0008)
420/* UDC Undocumented - Reserved3 */
421#define UDC_RES3 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x000C)
422/* UDC Control Register */
423#define UDCCR IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0000)
424/* UDC Endpoint 0 Control/Status Register */
425#define UDCCS0 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0010)
426/* UDC Endpoint 1 (IN) Control/Status Register */
427#define UDCCS1 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0014)
428/* UDC Endpoint 2 (OUT) Control/Status Register */
429#define UDCCS2 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0018)
430/* UDC Endpoint 3 (IN) Control/Status Register */
431#define UDCCS3 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x001C)
432/* UDC Endpoint 4 (OUT) Control/Status Register */
433#define UDCCS4 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0020)
434/* UDC Endpoint 5 (Interrupt) Control/Status Register */
435#define UDCCS5 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0024)
436/* UDC Endpoint 6 (IN) Control/Status Register */
437#define UDCCS6 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0028)
438/* UDC Endpoint 7 (OUT) Control/Status Register */
439#define UDCCS7 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x002C)
440/* UDC Endpoint 8 (IN) Control/Status Register */
441#define UDCCS8 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0030)
442/* UDC Endpoint 9 (OUT) Control/Status Register */
443#define UDCCS9 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0034)
444/* UDC Endpoint 10 (Interrupt) Control/Status Register */
445#define UDCCS10 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0038)
446/* UDC Endpoint 11 (IN) Control/Status Register */
447#define UDCCS11 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x003C)
448/* UDC Endpoint 12 (OUT) Control/Status Register */
449#define UDCCS12 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0040)
450/* UDC Endpoint 13 (IN) Control/Status Register */
451#define UDCCS13 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0044)
452/* UDC Endpoint 14 (OUT) Control/Status Register */
453#define UDCCS14 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0048)
454/* UDC Endpoint 15 (Interrupt) Control/Status Register */
455#define UDCCS15 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x004C)
456/* UDC Frame Number Register High */
457#define UFNRH IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0060)
458/* UDC Frame Number Register Low */
459#define UFNRL IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0064)
460/* UDC Byte Count Reg 2 */
461#define UBCR2 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0068)
462/* UDC Byte Count Reg 4 */
463#define UBCR4 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x006c)
464/* UDC Byte Count Reg 7 */
465#define UBCR7 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0070)
466/* UDC Byte Count Reg 9 */
467#define UBCR9 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0074)
468/* UDC Byte Count Reg 12 */
469#define UBCR12 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0078)
470/* UDC Byte Count Reg 14 */
471#define UBCR14 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x007c)
472/* UDC Endpoint 0 Data Register */
473#define UDDR0 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0080)
474/* UDC Endpoint 1 Data Register */
475#define UDDR1 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0100)
476/* UDC Endpoint 2 Data Register */
477#define UDDR2 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0180)
478/* UDC Endpoint 3 Data Register */
479#define UDDR3 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0200)
480/* UDC Endpoint 4 Data Register */
481#define UDDR4 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0400)
482/* UDC Endpoint 5 Data Register */
483#define UDDR5 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x00A0)
484/* UDC Endpoint 6 Data Register */
485#define UDDR6 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0600)
486/* UDC Endpoint 7 Data Register */
487#define UDDR7 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0680)
488/* UDC Endpoint 8 Data Register */
489#define UDDR8 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0700)
490/* UDC Endpoint 9 Data Register */
491#define UDDR9 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0900)
492/* UDC Endpoint 10 Data Register */
493#define UDDR10 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x00C0)
494/* UDC Endpoint 11 Data Register */
495#define UDDR11 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0B00)
496/* UDC Endpoint 12 Data Register */
497#define UDDR12 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0B80)
498/* UDC Endpoint 13 Data Register */
499#define UDDR13 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0C00)
500/* UDC Endpoint 14 Data Register */
501#define UDDR14 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0E00)
502/* UDC Endpoint 15 Data Register */
503#define UDDR15 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x00E0)
504/* UDC Interrupt Control Register 0 */
505#define UICR0 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0050)
506/* UDC Interrupt Control Register 1 */
507#define UICR1 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0054)
508/* UDC Status Interrupt Register 0 */
509#define USIR0 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x0058)
510/* UDC Status Interrupt Register 1 */
511#define USIR1 IXP4XX_USB_REG(IXP4XX_USB_BASE_VIRT+0x005C)
512
513#define UDCCR_UDE (1 << 0) /* UDC enable */
514#define UDCCR_UDA (1 << 1) /* UDC active */
515#define UDCCR_RSM (1 << 2) /* Device resume */
516#define UDCCR_RESIR (1 << 3) /* Resume interrupt request */
517#define UDCCR_SUSIR (1 << 4) /* Suspend interrupt request */
518#define UDCCR_SRM (1 << 5) /* Suspend/resume interrupt mask */
519#define UDCCR_RSTIR (1 << 6) /* Reset interrupt request */
520#define UDCCR_REM (1 << 7) /* Reset interrupt mask */
521
522#define UDCCS0_OPR (1 << 0) /* OUT packet ready */
523#define UDCCS0_IPR (1 << 1) /* IN packet ready */
524#define UDCCS0_FTF (1 << 2) /* Flush Tx FIFO */
525#define UDCCS0_DRWF (1 << 3) /* Device remote wakeup feature */
526#define UDCCS0_SST (1 << 4) /* Sent stall */
527#define UDCCS0_FST (1 << 5) /* Force stall */
528#define UDCCS0_RNE (1 << 6) /* Receive FIFO no empty */
529#define UDCCS0_SA (1 << 7) /* Setup active */
530
531#define UDCCS_BI_TFS (1 << 0) /* Transmit FIFO service */
532#define UDCCS_BI_TPC (1 << 1) /* Transmit packet complete */
533#define UDCCS_BI_FTF (1 << 2) /* Flush Tx FIFO */
534#define UDCCS_BI_TUR (1 << 3) /* Transmit FIFO underrun */
535#define UDCCS_BI_SST (1 << 4) /* Sent stall */
536#define UDCCS_BI_FST (1 << 5) /* Force stall */
537#define UDCCS_BI_TSP (1 << 7) /* Transmit short packet */
538
539#define UDCCS_BO_RFS (1 << 0) /* Receive FIFO service */
540#define UDCCS_BO_RPC (1 << 1) /* Receive packet complete */
541#define UDCCS_BO_DME (1 << 3) /* DMA enable */
542#define UDCCS_BO_SST (1 << 4) /* Sent stall */
543#define UDCCS_BO_FST (1 << 5) /* Force stall */
544#define UDCCS_BO_RNE (1 << 6) /* Receive FIFO not empty */
545#define UDCCS_BO_RSP (1 << 7) /* Receive short packet */
546
547#define UDCCS_II_TFS (1 << 0) /* Transmit FIFO service */
548#define UDCCS_II_TPC (1 << 1) /* Transmit packet complete */
549#define UDCCS_II_FTF (1 << 2) /* Flush Tx FIFO */
550#define UDCCS_II_TUR (1 << 3) /* Transmit FIFO underrun */
551#define UDCCS_II_TSP (1 << 7) /* Transmit short packet */
552
553#define UDCCS_IO_RFS (1 << 0) /* Receive FIFO service */
554#define UDCCS_IO_RPC (1 << 1) /* Receive packet complete */
555#define UDCCS_IO_ROF (1 << 3) /* Receive overflow */
556#define UDCCS_IO_DME (1 << 3) /* DMA enable */
557#define UDCCS_IO_RNE (1 << 6) /* Receive FIFO not empty */
558#define UDCCS_IO_RSP (1 << 7) /* Receive short packet */
559
560#define UDCCS_INT_TFS (1 << 0) /* Transmit FIFO service */
561#define UDCCS_INT_TPC (1 << 1) /* Transmit packet complete */
562#define UDCCS_INT_FTF (1 << 2) /* Flush Tx FIFO */
563#define UDCCS_INT_TUR (1 << 3) /* Transmit FIFO underrun */
564#define UDCCS_INT_SST (1 << 4) /* Sent stall */
565#define UDCCS_INT_FST (1 << 5) /* Force stall */
566#define UDCCS_INT_TSP (1 << 7) /* Transmit short packet */
567
568#define UICR0_IM0 (1 << 0) /* Interrupt mask ep 0 */
569#define UICR0_IM1 (1 << 1) /* Interrupt mask ep 1 */
570#define UICR0_IM2 (1 << 2) /* Interrupt mask ep 2 */
571#define UICR0_IM3 (1 << 3) /* Interrupt mask ep 3 */
572#define UICR0_IM4 (1 << 4) /* Interrupt mask ep 4 */
573#define UICR0_IM5 (1 << 5) /* Interrupt mask ep 5 */
574#define UICR0_IM6 (1 << 6) /* Interrupt mask ep 6 */
575#define UICR0_IM7 (1 << 7) /* Interrupt mask ep 7 */
576
577#define UICR1_IM8 (1 << 0) /* Interrupt mask ep 8 */
578#define UICR1_IM9 (1 << 1) /* Interrupt mask ep 9 */
579#define UICR1_IM10 (1 << 2) /* Interrupt mask ep 10 */
580#define UICR1_IM11 (1 << 3) /* Interrupt mask ep 11 */
581#define UICR1_IM12 (1 << 4) /* Interrupt mask ep 12 */
582#define UICR1_IM13 (1 << 5) /* Interrupt mask ep 13 */
583#define UICR1_IM14 (1 << 6) /* Interrupt mask ep 14 */
584#define UICR1_IM15 (1 << 7) /* Interrupt mask ep 15 */
585
586#define USIR0_IR0 (1 << 0) /* Interrupt request ep 0 */
587#define USIR0_IR1 (1 << 1) /* Interrupt request ep 1 */
588#define USIR0_IR2 (1 << 2) /* Interrupt request ep 2 */
589#define USIR0_IR3 (1 << 3) /* Interrupt request ep 3 */
590#define USIR0_IR4 (1 << 4) /* Interrupt request ep 4 */
591#define USIR0_IR5 (1 << 5) /* Interrupt request ep 5 */
592#define USIR0_IR6 (1 << 6) /* Interrupt request ep 6 */
593#define USIR0_IR7 (1 << 7) /* Interrupt request ep 7 */
594
595#define USIR1_IR8 (1 << 0) /* Interrupt request ep 8 */
596#define USIR1_IR9 (1 << 1) /* Interrupt request ep 9 */
597#define USIR1_IR10 (1 << 2) /* Interrupt request ep 10 */
598#define USIR1_IR11 (1 << 3) /* Interrupt request ep 11 */
599#define USIR1_IR12 (1 << 4) /* Interrupt request ep 12 */
600#define USIR1_IR13 (1 << 5) /* Interrupt request ep 13 */
601#define USIR1_IR14 (1 << 6) /* Interrupt request ep 14 */
602#define USIR1_IR15 (1 << 7) /* Interrupt request ep 15 */
603
604#define DCMD_LENGTH 0x01fff /* length mask (max = 8K - 1) */
605
606/* "fuse" bits of IXP_EXP_CFG2 */
607#define IXP4XX_FEATURE_RCOMP (1 << 0)
608#define IXP4XX_FEATURE_USB_DEVICE (1 << 1)
609#define IXP4XX_FEATURE_HASH (1 << 2)
610#define IXP4XX_FEATURE_AES (1 << 3)
611#define IXP4XX_FEATURE_DES (1 << 4)
612#define IXP4XX_FEATURE_HDLC (1 << 5)
613#define IXP4XX_FEATURE_AAL (1 << 6)
614#define IXP4XX_FEATURE_HSS (1 << 7)
615#define IXP4XX_FEATURE_UTOPIA (1 << 8)
616#define IXP4XX_FEATURE_NPEB_ETH0 (1 << 9)
617#define IXP4XX_FEATURE_NPEC_ETH (1 << 10)
618#define IXP4XX_FEATURE_RESET_NPEA (1 << 11)
619#define IXP4XX_FEATURE_RESET_NPEB (1 << 12)
620#define IXP4XX_FEATURE_RESET_NPEC (1 << 13)
621#define IXP4XX_FEATURE_PCI (1 << 14)
622#define IXP4XX_FEATURE_ECC_TIMESYNC (1 << 15)
623#define IXP4XX_FEATURE_UTOPIA_PHY_LIMIT (3 << 16)
624#define IXP4XX_FEATURE_USB_HOST (1 << 18)
625#define IXP4XX_FEATURE_NPEA_ETH (1 << 19)
626#define IXP4XX_FEATURE_NPEB_ETH_1_TO_3 (1 << 20)
627#define IXP4XX_FEATURE_RSA (1 << 21)
628#define IXP4XX_FEATURE_XSCALE_MAX_FREQ (3 << 22)
629#define IXP4XX_FEATURE_RESERVED (0xFF << 24)
630
631#define IXP4XX_FEATURE_IXP46X_ONLY (IXP4XX_FEATURE_ECC_TIMESYNC | \
632 IXP4XX_FEATURE_USB_HOST | \
633 IXP4XX_FEATURE_NPEA_ETH | \
634 IXP4XX_FEATURE_NPEB_ETH_1_TO_3 | \
635 IXP4XX_FEATURE_RSA | \
636 IXP4XX_FEATURE_XSCALE_MAX_FREQ)
637
638#endif
diff --git a/include/asm-arm/arch-ixp4xx/memory.h b/include/asm-arm/arch-ixp4xx/memory.h
deleted file mode 100644
index af9667b57ab3..000000000000
--- a/include/asm-arm/arch-ixp4xx/memory.h
+++ /dev/null
@@ -1,40 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-ixp4xx/memory.h
3 *
4 * Copyright (c) 2001-2004 MontaVista Software, Inc.
5 */
6
7#ifndef __ASM_ARCH_MEMORY_H
8#define __ASM_ARCH_MEMORY_H
9
10#include <asm/sizes.h>
11
12/*
13 * Physical DRAM offset.
14 */
15#define PHYS_OFFSET UL(0x00000000)
16
17#if !defined(__ASSEMBLY__) && defined(CONFIG_PCI)
18
19void ixp4xx_adjust_zones(int node, unsigned long *size, unsigned long *holes);
20
21#define arch_adjust_zones(node, size, holes) \
22 ixp4xx_adjust_zones(node, size, holes)
23
24#define ISA_DMA_THRESHOLD (SZ_64M - 1)
25
26#endif
27
28/*
29 * Virtual view <-> DMA view memory address translations
30 * virt_to_bus: Used to translate the virtual address to an
31 * address suitable to be passed to set_dma_addr
32 * bus_to_virt: Used to convert an address for DMA operations
33 * to an address that the kernel can use.
34 *
35 * These are dummies for now.
36 */
37#define __virt_to_bus(x) __virt_to_phys(x)
38#define __bus_to_virt(x) __phys_to_virt(x)
39
40#endif
diff --git a/include/asm-arm/arch-ixp4xx/nas100d.h b/include/asm-arm/arch-ixp4xx/nas100d.h
deleted file mode 100644
index 98d937897bce..000000000000
--- a/include/asm-arm/arch-ixp4xx/nas100d.h
+++ /dev/null
@@ -1,52 +0,0 @@
1/*
2 * include/asm-arm/arch-ixp4xx/nas100d.h
3 *
4 * NAS100D platform specific definitions
5 *
6 * Copyright (c) 2005 Tower Technologies
7 *
8 * Author: Alessandro Zummo <a.zummo@towertech.it>
9 *
10 * based on ixdp425.h:
11 * Copyright 2004 (c) MontaVista, Software, Inc.
12 *
13 * This file is licensed under the terms of the GNU General Public
14 * License version 2. This program is licensed "as is" without any
15 * warranty of any kind, whether express or implied.
16 */
17
18#ifndef __ASM_ARCH_HARDWARE_H__
19#error "Do not include this directly, instead #include <asm/hardware.h>"
20#endif
21
22#define NAS100D_SDA_PIN 5
23#define NAS100D_SCL_PIN 6
24
25/*
26 * NAS100D PCI IRQs
27 */
28#define NAS100D_PCI_MAX_DEV 3
29#define NAS100D_PCI_IRQ_LINES 3
30
31
32/* PCI controller GPIO to IRQ pin mappings */
33#define NAS100D_PCI_INTA_PIN 11
34#define NAS100D_PCI_INTB_PIN 10
35#define NAS100D_PCI_INTC_PIN 9
36#define NAS100D_PCI_INTD_PIN 8
37#define NAS100D_PCI_INTE_PIN 7
38
39/* Buttons */
40
41#define NAS100D_PB_GPIO 14 /* power button */
42#define NAS100D_RB_GPIO 4 /* reset button */
43
44/* Power control */
45
46#define NAS100D_PO_GPIO 12 /* power off */
47
48/* LEDs */
49
50#define NAS100D_LED_WLAN_GPIO 0
51#define NAS100D_LED_DISK_GPIO 3
52#define NAS100D_LED_PWR_GPIO 15
diff --git a/include/asm-arm/arch-ixp4xx/nslu2.h b/include/asm-arm/arch-ixp4xx/nslu2.h
deleted file mode 100644
index 714bbc65126a..000000000000
--- a/include/asm-arm/arch-ixp4xx/nslu2.h
+++ /dev/null
@@ -1,55 +0,0 @@
1/*
2 * include/asm-arm/arch-ixp4xx/nslu2.h
3 *
4 * NSLU2 platform specific definitions
5 *
6 * Author: Mark Rakes <mrakes AT mac.com>
7 * Maintainers: http://www.nslu2-linux.org
8 *
9 * based on ixdp425.h:
10 * Copyright 2004 (c) MontaVista, Software, Inc.
11 *
12 * This file is licensed under the terms of the GNU General Public
13 * License version 2. This program is licensed "as is" without any
14 * warranty of any kind, whether express or implied.
15 */
16
17#ifndef __ASM_ARCH_HARDWARE_H__
18#error "Do not include this directly, instead #include <asm/hardware.h>"
19#endif
20
21#define NSLU2_SDA_PIN 7
22#define NSLU2_SCL_PIN 6
23
24/*
25 * NSLU2 PCI IRQs
26 */
27#define NSLU2_PCI_MAX_DEV 3
28#define NSLU2_PCI_IRQ_LINES 3
29
30
31/* PCI controller GPIO to IRQ pin mappings */
32#define NSLU2_PCI_INTA_PIN 11
33#define NSLU2_PCI_INTB_PIN 10
34#define NSLU2_PCI_INTC_PIN 9
35#define NSLU2_PCI_INTD_PIN 8
36
37/* NSLU2 Timer */
38#define NSLU2_FREQ 66000000
39
40/* Buttons */
41
42#define NSLU2_PB_GPIO 5 /* power button */
43#define NSLU2_PO_GPIO 8 /* power off */
44#define NSLU2_RB_GPIO 12 /* reset button */
45
46/* Buzzer */
47
48#define NSLU2_GPIO_BUZZ 4
49
50/* LEDs */
51
52#define NSLU2_LED_RED_GPIO 0
53#define NSLU2_LED_GRN_GPIO 1
54#define NSLU2_LED_DISK1_GPIO 3
55#define NSLU2_LED_DISK2_GPIO 2
diff --git a/include/asm-arm/arch-ixp4xx/platform.h b/include/asm-arm/arch-ixp4xx/platform.h
deleted file mode 100644
index a1f2b5404db1..000000000000
--- a/include/asm-arm/arch-ixp4xx/platform.h
+++ /dev/null
@@ -1,173 +0,0 @@
1/*
2 * include/asm-arm/arch-ixp4xx/platform.h
3 *
4 * Constants and functions that are useful to IXP4xx platform-specific code
5 * and device drivers.
6 *
7 * Copyright (C) 2004 MontaVista Software, Inc.
8 */
9
10#ifndef __ASM_ARCH_HARDWARE_H__
11#error "Do not include this directly, instead #include <asm/hardware.h>"
12#endif
13
14#ifndef __ASSEMBLY__
15
16#include <asm/types.h>
17
18#ifndef __ARMEB__
19#define REG_OFFSET 0
20#else
21#define REG_OFFSET 3
22#endif
23
24/*
25 * Expansion bus memory regions
26 */
27#define IXP4XX_EXP_BUS_BASE_PHYS (0x50000000)
28
29/*
30 * The expansion bus on the IXP4xx can be configured for either 16 or
31 * 32MB windows and the CS offset for each region changes based on the
32 * current configuration. This means that we cannot simply hardcode
33 * each offset. ixp4xx_sys_init() looks at the expansion bus configuration
34 * as setup by the bootloader to determine our window size.
35 */
36extern unsigned long ixp4xx_exp_bus_size;
37
38#define IXP4XX_EXP_BUS_BASE(region)\
39 (IXP4XX_EXP_BUS_BASE_PHYS + ((region) * ixp4xx_exp_bus_size))
40
41#define IXP4XX_EXP_BUS_END(region)\
42 (IXP4XX_EXP_BUS_BASE(region) + ixp4xx_exp_bus_size - 1)
43
44/* Those macros can be used to adjust timing and configure
45 * other features for each region.
46 */
47
48#define IXP4XX_EXP_BUS_RECOVERY_T(x) (((x) & 0x0f) << 16)
49#define IXP4XX_EXP_BUS_HOLD_T(x) (((x) & 0x03) << 20)
50#define IXP4XX_EXP_BUS_STROBE_T(x) (((x) & 0x0f) << 22)
51#define IXP4XX_EXP_BUS_SETUP_T(x) (((x) & 0x03) << 26)
52#define IXP4XX_EXP_BUS_ADDR_T(x) (((x) & 0x03) << 28)
53#define IXP4XX_EXP_BUS_SIZE(x) (((x) & 0x0f) << 10)
54#define IXP4XX_EXP_BUS_CYCLES(x) (((x) & 0x03) << 14)
55
56#define IXP4XX_EXP_BUS_CS_EN (1L << 31)
57#define IXP4XX_EXP_BUS_BYTE_RD16 (1L << 6)
58#define IXP4XX_EXP_BUS_HRDY_POL (1L << 5)
59#define IXP4XX_EXP_BUS_MUX_EN (1L << 4)
60#define IXP4XX_EXP_BUS_SPLT_EN (1L << 3)
61#define IXP4XX_EXP_BUS_WR_EN (1L << 1)
62#define IXP4XX_EXP_BUS_BYTE_EN (1L << 0)
63
64#define IXP4XX_EXP_BUS_CYCLES_INTEL 0x00
65#define IXP4XX_EXP_BUS_CYCLES_MOTOROLA 0x01
66#define IXP4XX_EXP_BUS_CYCLES_HPI 0x02
67
68#define IXP4XX_FLASH_WRITABLE (0x2)
69#define IXP4XX_FLASH_DEFAULT (0xbcd23c40)
70#define IXP4XX_FLASH_WRITE (0xbcd23c42)
71
72/*
73 * Clock Speed Definitions.
74 */
75#define IXP4XX_PERIPHERAL_BUS_CLOCK (66) /* 66Mhzi APB BUS */
76#define IXP4XX_UART_XTAL 14745600
77
78/*
79 * This structure provide a means for the board setup code
80 * to give information to th pata_ixp4xx driver. It is
81 * passed as platform_data.
82 */
83struct ixp4xx_pata_data {
84 volatile u32 *cs0_cfg;
85 volatile u32 *cs1_cfg;
86 unsigned long cs0_bits;
87 unsigned long cs1_bits;
88 void __iomem *cs0;
89 void __iomem *cs1;
90};
91
92struct sys_timer;
93
94#define IXP4XX_ETH_NPEA 0x00
95#define IXP4XX_ETH_NPEB 0x10
96#define IXP4XX_ETH_NPEC 0x20
97
98/* Information about built-in Ethernet MAC interfaces */
99struct eth_plat_info {
100 u8 phy; /* MII PHY ID, 0 - 31 */
101 u8 rxq; /* configurable, currently 0 - 31 only */
102 u8 txreadyq;
103 u8 hwaddr[6];
104};
105
106/* Information about built-in HSS (synchronous serial) interfaces */
107struct hss_plat_info {
108 int (*set_clock)(int port, unsigned int clock_type);
109 int (*open)(int port, void *pdev,
110 void (*set_carrier_cb)(void *pdev, int carrier));
111 void (*close)(int port, void *pdev);
112 u8 txreadyq;
113};
114
115/*
116 * Frequency of clock used for primary clocksource
117 */
118extern unsigned long ixp4xx_timer_freq;
119
120/*
121 * Functions used by platform-level setup code
122 */
123extern void ixp4xx_map_io(void);
124extern void ixp4xx_init_irq(void);
125extern void ixp4xx_sys_init(void);
126extern void ixp4xx_timer_init(void);
127extern struct sys_timer ixp4xx_timer;
128extern void ixp4xx_pci_preinit(void);
129struct pci_sys_data;
130extern int ixp4xx_setup(int nr, struct pci_sys_data *sys);
131extern struct pci_bus *ixp4xx_scan_bus(int nr, struct pci_sys_data *sys);
132
133/*
134 * GPIO-functions
135 */
136/*
137 * The following converted to the real HW bits the gpio_line_config
138 */
139/* GPIO pin types */
140#define IXP4XX_GPIO_OUT 0x1
141#define IXP4XX_GPIO_IN 0x2
142
143/* GPIO signal types */
144#define IXP4XX_GPIO_LOW 0
145#define IXP4XX_GPIO_HIGH 1
146
147/* GPIO Clocks */
148#define IXP4XX_GPIO_CLK_0 14
149#define IXP4XX_GPIO_CLK_1 15
150
151static inline void gpio_line_config(u8 line, u32 direction)
152{
153 if (direction == IXP4XX_GPIO_IN)
154 *IXP4XX_GPIO_GPOER |= (1 << line);
155 else
156 *IXP4XX_GPIO_GPOER &= ~(1 << line);
157}
158
159static inline void gpio_line_get(u8 line, int *value)
160{
161 *value = (*IXP4XX_GPIO_GPINR >> line) & 0x1;
162}
163
164static inline void gpio_line_set(u8 line, int value)
165{
166 if (value == IXP4XX_GPIO_HIGH)
167 *IXP4XX_GPIO_GPOUTR |= (1 << line);
168 else if (value == IXP4XX_GPIO_LOW)
169 *IXP4XX_GPIO_GPOUTR &= ~(1 << line);
170}
171
172#endif // __ASSEMBLY__
173
diff --git a/include/asm-arm/arch-ixp4xx/prpmc1100.h b/include/asm-arm/arch-ixp4xx/prpmc1100.h
deleted file mode 100644
index e2532ab7f48f..000000000000
--- a/include/asm-arm/arch-ixp4xx/prpmc1100.h
+++ /dev/null
@@ -1,33 +0,0 @@
1/*
2 * include/asm-arm/arch-ixp4xx/prpmc1100.h
3 *
4 * Motorolla PrPMC1100 platform specific definitions
5 *
6 * Author: Deepak Saxena <dsaxena@plexity.net>
7 *
8 * Copyright 2004 (c) MontaVista, Software, Inc.
9 *
10 * This file is licensed under the terms of the GNU General Public
11 * License version 2. This program is licensed "as is" without any
12 * warranty of any kind, whether express or implied.
13 */
14
15#ifndef __ASM_ARCH_HARDWARE_H__
16#error "Do not include this directly, instead #include <asm/hardware.h>"
17#endif
18
19#define PRPMC1100_FLASH_BASE IXP4XX_EXP_BUS_CS0_BASE_PHYS
20#define PRPMC1100_FLASH_SIZE IXP4XX_EXP_BUS_CSX_REGION_SIZE
21
22#define PRPMC1100_PCI_MIN_DEVID 10
23#define PRPMC1100_PCI_MAX_DEVID 16
24#define PRPMC1100_PCI_IRQ_LINES 4
25
26
27/* PCI controller GPIO to IRQ pin mappings */
28#define PRPMC1100_PCI_INTA_PIN 11
29#define PRPMC1100_PCI_INTB_PIN 10
30#define PRPMC1100_PCI_INTC_PIN 9
31#define PRPMC1100_PCI_INTD_PIN 8
32
33
diff --git a/include/asm-arm/arch-ixp4xx/system.h b/include/asm-arm/arch-ixp4xx/system.h
deleted file mode 100644
index 8e1db423b1cc..000000000000
--- a/include/asm-arm/arch-ixp4xx/system.h
+++ /dev/null
@@ -1,42 +0,0 @@
1/*
2 * include/asm-arm/arch-ixp4xx/system.h
3 *
4 * Copyright (C) 2002 Intel Corporation.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 */
11
12#include <asm/hardware.h>
13
14static inline void arch_idle(void)
15{
16#if 0
17 if (!hlt_counter)
18 cpu_do_idle(0);
19#endif
20}
21
22
23static inline void arch_reset(char mode)
24{
25 if ( 1 && mode == 's') {
26 /* Jump into ROM at address 0 */
27 cpu_reset(0);
28 } else {
29 /* Use on-chip reset capability */
30
31 /* set the "key" register to enable access to
32 * "timer" and "enable" registers
33 */
34 *IXP4XX_OSWK = IXP4XX_WDT_KEY;
35
36 /* write 0 to the timer register for an immediate reset */
37 *IXP4XX_OSWT = 0;
38
39 *IXP4XX_OSWE = IXP4XX_WDT_RESET_ENABLE | IXP4XX_WDT_COUNT_ENABLE;
40 }
41}
42
diff --git a/include/asm-arm/arch-ixp4xx/timex.h b/include/asm-arm/arch-ixp4xx/timex.h
deleted file mode 100644
index 3745e35cc030..000000000000
--- a/include/asm-arm/arch-ixp4xx/timex.h
+++ /dev/null
@@ -1,15 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-ixp4xx/timex.h
3 *
4 */
5
6#include <asm/hardware.h>
7
8/*
9 * We use IXP425 General purpose timer for our timer needs, it runs at
10 * 66.66... MHz. We do a convulted calculation of CLOCK_TICK_RATE b/c the
11 * timer register ignores the bottom 2 bits of the LATCH value.
12 */
13#define FREQ 66666666
14#define CLOCK_TICK_RATE (((FREQ / HZ & ~IXP4XX_OST_RELOAD_MASK) + 1) * HZ)
15
diff --git a/include/asm-arm/arch-ixp4xx/udc.h b/include/asm-arm/arch-ixp4xx/udc.h
deleted file mode 100644
index dbdec36ff0d1..000000000000
--- a/include/asm-arm/arch-ixp4xx/udc.h
+++ /dev/null
@@ -1,8 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-ixp4xx/udc.h
3 *
4 */
5#include <asm/mach/udc_pxa2xx.h>
6
7extern void ixp4xx_set_udc_info(struct pxa2xx_udc_mach_info *info);
8
diff --git a/include/asm-arm/arch-ixp4xx/uncompress.h b/include/asm-arm/arch-ixp4xx/uncompress.h
deleted file mode 100644
index 34ef48fe327e..000000000000
--- a/include/asm-arm/arch-ixp4xx/uncompress.h
+++ /dev/null
@@ -1,57 +0,0 @@
1/*
2 * include/asm-arm/arch-ixp4xx/uncompress.h
3 *
4 * Copyright (C) 2002 Intel Corporation.
5 * Copyright (C) 2003-2004 MontaVista Software, Inc.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 *
11 */
12
13#ifndef _ARCH_UNCOMPRESS_H_
14#define _ARCH_UNCOMPRESS_H_
15
16#include "ixp4xx-regs.h"
17#include <asm/mach-types.h>
18#include <linux/serial_reg.h>
19
20#define TX_DONE (UART_LSR_TEMT|UART_LSR_THRE)
21
22static volatile u32* uart_base;
23
24static inline void putc(int c)
25{
26 /* Check THRE and TEMT bits before we transmit the character.
27 */
28 while ((uart_base[UART_LSR] & TX_DONE) != TX_DONE)
29 barrier();
30
31 *uart_base = c;
32}
33
34static void flush(void)
35{
36}
37
38static __inline__ void __arch_decomp_setup(unsigned long arch_id)
39{
40 /*
41 * Some boards are using UART2 as console
42 */
43 if (machine_is_adi_coyote() || machine_is_gtwx5715() ||
44 machine_is_gateway7001() || machine_is_wg302v2())
45 uart_base = (volatile u32*) IXP4XX_UART2_BASE_PHYS;
46 else
47 uart_base = (volatile u32*) IXP4XX_UART1_BASE_PHYS;
48}
49
50/*
51 * arch_id is a variable in decompress_kernel()
52 */
53#define arch_decomp_setup() __arch_decomp_setup(arch_id)
54
55#define arch_decomp_wdog()
56
57#endif
diff --git a/include/asm-arm/arch-ixp4xx/vmalloc.h b/include/asm-arm/arch-ixp4xx/vmalloc.h
deleted file mode 100644
index 050d46e6b126..000000000000
--- a/include/asm-arm/arch-ixp4xx/vmalloc.h
+++ /dev/null
@@ -1,5 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-ixp4xx/vmalloc.h
3 */
4#define VMALLOC_END (0xFF000000)
5
diff --git a/include/asm-arm/arch-kirkwood/debug-macro.S b/include/asm-arm/arch-kirkwood/debug-macro.S
deleted file mode 100644
index f55fb8ad9ee4..000000000000
--- a/include/asm-arm/arch-kirkwood/debug-macro.S
+++ /dev/null
@@ -1,20 +0,0 @@
1/*
2 * include/asm-arm/arch-kirkwood/debug-macro.S
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7*/
8
9#include <asm/arch/kirkwood.h>
10
11 .macro addruart,rx
12 mrc p15, 0, \rx, c1, c0
13 tst \rx, #1 @ MMU enabled?
14 ldreq \rx, =KIRKWOOD_REGS_PHYS_BASE
15 ldrne \rx, =KIRKWOOD_REGS_VIRT_BASE
16 orr \rx, \rx, #0x00012000
17 .endm
18
19#define UART_SHIFT 2
20#include <asm/hardware/debug-8250.S>
diff --git a/include/asm-arm/arch-kirkwood/entry-macro.S b/include/asm-arm/arch-kirkwood/entry-macro.S
deleted file mode 100644
index fc6a43d9355c..000000000000
--- a/include/asm-arm/arch-kirkwood/entry-macro.S
+++ /dev/null
@@ -1,40 +0,0 @@
1/*
2 * include/asm-arm/arch-kirkwood/entry-macro.S
3 *
4 * Low-level IRQ helper macros for Marvell Kirkwood platforms
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10
11#include <asm/arch/kirkwood.h>
12
13 .macro disable_fiq
14 .endm
15
16 .macro arch_ret_to_user, tmp1, tmp2
17 .endm
18
19 .macro get_irqnr_preamble, base, tmp
20 ldr \base, =IRQ_VIRT_BASE
21 .endm
22
23 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
24 @ check low interrupts
25 ldr \irqstat, [\base, #IRQ_CAUSE_LOW_OFF]
26 ldr \tmp, [\base, #IRQ_MASK_LOW_OFF]
27 mov \irqnr, #31
28 ands \irqstat, \irqstat, \tmp
29 bne 1001f
30
31 @ if no low interrupts set, check high interrupts
32 ldr \irqstat, [\base, #IRQ_CAUSE_HIGH_OFF]
33 ldr \tmp, [\base, #IRQ_MASK_HIGH_OFF]
34 mov \irqnr, #63
35 ands \irqstat, \irqstat, \tmp
36
37 @ find first active interrupt source
381001: clzne \irqstat, \irqstat
39 subne \irqnr, \irqnr, \irqstat
40 .endm
diff --git a/include/asm-arm/arch-kirkwood/hardware.h b/include/asm-arm/arch-kirkwood/hardware.h
deleted file mode 100644
index e695719771a5..000000000000
--- a/include/asm-arm/arch-kirkwood/hardware.h
+++ /dev/null
@@ -1,21 +0,0 @@
1/*
2 * include/asm-arm/arch-kirkwood/hardware.h
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 */
8
9#ifndef __ASM_ARCH_HARDWARE_H
10#define __ASM_ARCH_HARDWARE_H
11
12#include "kirkwood.h"
13
14#define pcibios_assign_all_busses() 1
15
16#define PCIBIOS_MIN_IO 0x00001000
17#define PCIBIOS_MIN_MEM 0x01000000
18#define PCIMEM_BASE KIRKWOOD_PCIE_MEM_PHYS_BASE /* mem base for VGA */
19
20
21#endif
diff --git a/include/asm-arm/arch-kirkwood/io.h b/include/asm-arm/arch-kirkwood/io.h
deleted file mode 100644
index 0ef6e95f5d5b..000000000000
--- a/include/asm-arm/arch-kirkwood/io.h
+++ /dev/null
@@ -1,26 +0,0 @@
1/*
2 * include/asm-arm/arch-kirkwood/io.h
3 *
4 * This file is licensed under the terms of the GNU General Public
5 * License version 2. This program is licensed "as is" without any
6 * warranty of any kind, whether express or implied.
7 */
8
9#ifndef __ASM_ARCH_IO_H
10#define __ASM_ARCH_IO_H
11
12#include "kirkwood.h"
13
14#define IO_SPACE_LIMIT 0xffffffff
15
16static inline void __iomem *__io(unsigned long addr)
17{
18 return (void __iomem *)((addr - KIRKWOOD_PCIE_IO_PHYS_BASE)
19 + KIRKWOOD_PCIE_IO_VIRT_BASE);
20}
21
22#define __io(a) __io(a)
23#define __mem_pci(a) (a)
24
25
26#endif
diff --git a/include/asm-arm/arch-kirkwood/irqs.h b/include/asm-arm/arch-kirkwood/irqs.h
deleted file mode 100644
index 2e7b5da6335c..000000000000
--- a/include/asm-arm/arch-kirkwood/irqs.h
+++ /dev/null
@@ -1,63 +0,0 @@
1/*
2 * include/asm-arm/arch-kirkwood/irqs.h
3 *
4 * IRQ definitions for Marvell Kirkwood SoCs
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10
11#ifndef __ASM_ARCH_IRQS_H
12#define __ASM_ARCH_IRQS_H
13
14#include "kirkwood.h" /* need GPIO_MAX */
15
16/*
17 * Low Interrupt Controller
18 */
19#define IRQ_KIRKWOOD_HIGH_SUM 0
20#define IRQ_KIRKWOOD_BRIDGE 1
21#define IRQ_KIRKWOOD_HOST2CPU 2
22#define IRQ_KIRKWOOD_CPU2HOST 3
23#define IRQ_KIRKWOOD_XOR_00 5
24#define IRQ_KIRKWOOD_XOR_01 6
25#define IRQ_KIRKWOOD_XOR_10 7
26#define IRQ_KIRKWOOD_XOR_11 8
27#define IRQ_KIRKWOOD_PCIE 9
28#define IRQ_KIRKWOOD_GE00_SUM 11
29#define IRQ_KIRKWOOD_GE01_SUM 15
30#define IRQ_KIRKWOOD_USB 19
31#define IRQ_KIRKWOOD_SATA 21
32#define IRQ_KIRKWOOD_CRYPTO 22
33#define IRQ_KIRKWOOD_SPI 23
34#define IRQ_KIRKWOOD_I2S 24
35#define IRQ_KIRKWOOD_TS_0 26
36#define IRQ_KIRKWOOD_SDIO 28
37#define IRQ_KIRKWOOD_TWSI 29
38#define IRQ_KIRKWOOD_AVB 30
39#define IRQ_KIRKWOOD_TDMI 31
40
41/*
42 * High Interrupt Controller
43 */
44#define IRQ_KIRKWOOD_UART_0 33
45#define IRQ_KIRKWOOD_UART_1 34
46#define IRQ_KIRKWOOD_GPIO_LOW_0_7 35
47#define IRQ_KIRKWOOD_GPIO_LOW_8_15 36
48#define IRQ_KIRKWOOD_GPIO_LOW_16_23 37
49#define IRQ_KIRKWOOD_GPIO_LOW_24_31 38
50#define IRQ_KIRKWOOD_GPIO_HIGH_0_7 39
51#define IRQ_KIRKWOOD_GPIO_HIGH_8_15 40
52#define IRQ_KIRKWOOD_GPIO_HIGH_16_23 41
53
54/*
55 * KIRKWOOD General Purpose Pins
56 */
57#define IRQ_KIRKWOOD_GPIO_START 64
58#define NR_GPIO_IRQS GPIO_MAX
59
60#define NR_IRQS (IRQ_KIRKWOOD_GPIO_START + NR_GPIO_IRQS)
61
62
63#endif
diff --git a/include/asm-arm/arch-kirkwood/kirkwood.h b/include/asm-arm/arch-kirkwood/kirkwood.h
deleted file mode 100644
index bb31b315c350..000000000000
--- a/include/asm-arm/arch-kirkwood/kirkwood.h
+++ /dev/null
@@ -1,100 +0,0 @@
1/*
2 * include/asm-arm/arch-kirkwood/kirkwood.h
3 *
4 * Generic definitions for Marvell Kirkwood SoC flavors:
5 * 88F6180, 88F6192 and 88F6281.
6 *
7 * This file is licensed under the terms of the GNU General Public
8 * License version 2. This program is licensed "as is" without any
9 * warranty of any kind, whether express or implied.
10 */
11
12#ifndef __ASM_ARCH_KIRKWOOD_H
13#define __ASM_ARCH_KIRKWOOD_H
14
15/*
16 * Marvell Kirkwood address maps.
17 *
18 * phys
19 * e0000000 PCIe Memory space
20 * f1000000 on-chip peripheral registers
21 * f2000000 PCIe I/O space
22 * f3000000 NAND controller address window
23 *
24 * virt phys size
25 * fee00000 f1000000 1M on-chip peripheral registers
26 * fef00000 f2000000 1M PCIe I/O space
27 */
28
29#define KIRKWOOD_NAND_MEM_PHYS_BASE 0xf3000000
30#define KIRKWOOD_NAND_MEM_SIZE SZ_64K /* 1K is sufficient, but 64K
31 * is the minimal window size
32 */
33
34#define KIRKWOOD_PCIE_IO_PHYS_BASE 0xf2000000
35#define KIRKWOOD_PCIE_IO_VIRT_BASE 0xfef00000
36#define KIRKWOOD_PCIE_IO_BUS_BASE 0x00000000
37#define KIRKWOOD_PCIE_IO_SIZE SZ_1M
38
39#define KIRKWOOD_REGS_PHYS_BASE 0xf1000000
40#define KIRKWOOD_REGS_VIRT_BASE 0xfee00000
41#define KIRKWOOD_REGS_SIZE SZ_1M
42
43#define KIRKWOOD_PCIE_MEM_PHYS_BASE 0xe0000000
44#define KIRKWOOD_PCIE_MEM_SIZE SZ_128M
45
46/*
47 * MBUS bridge registers.
48 */
49#define BRIDGE_VIRT_BASE (KIRKWOOD_REGS_VIRT_BASE | 0x20000)
50#define CPU_CONTROL (BRIDGE_VIRT_BASE | 0x0104)
51#define CPU_RESET 0x00000002
52#define RSTOUTn_MASK (BRIDGE_VIRT_BASE | 0x0108)
53#define SOFT_RESET_OUT_EN 0x00000004
54#define SYSTEM_SOFT_RESET (BRIDGE_VIRT_BASE | 0x010c)
55#define SOFT_RESET 0x00000001
56#define BRIDGE_CAUSE (BRIDGE_VIRT_BASE | 0x0110)
57#define BRIDGE_MASK (BRIDGE_VIRT_BASE | 0x0114)
58#define BRIDGE_INT_TIMER0 0x0002
59#define BRIDGE_INT_TIMER1 0x0004
60#define BRIDGE_INT_TIMER1_CLR (~0x0004)
61#define IRQ_VIRT_BASE (BRIDGE_VIRT_BASE | 0x0200)
62#define IRQ_CAUSE_LOW_OFF 0x0000
63#define IRQ_MASK_LOW_OFF 0x0004
64#define IRQ_CAUSE_HIGH_OFF 0x0010
65#define IRQ_MASK_HIGH_OFF 0x0014
66#define TIMER_VIRT_BASE (BRIDGE_VIRT_BASE | 0x0300)
67#define L2_CONFIG_REG (BRIDGE_VIRT_BASE | 0x0128)
68#define L2_WRITETHROUGH 0x00000010
69
70/*
71 * Register Map
72 */
73#define DDR_VIRT_BASE (KIRKWOOD_REGS_VIRT_BASE | 0x00000)
74#define DDR_WINDOW_CPU_BASE (DDR_VIRT_BASE | 0x1500)
75
76#define DEV_BUS_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE | 0x10000)
77#define DEV_BUS_VIRT_BASE (KIRKWOOD_REGS_VIRT_BASE | 0x10000)
78#define SAMPLE_AT_RESET (DEV_BUS_VIRT_BASE | 0x0030)
79#define DEVICE_ID (DEV_BUS_VIRT_BASE | 0x0034)
80#define RTC_PHYS_BASE (DEV_BUS_PHYS_BASE | 0x0300)
81#define SPI_PHYS_BASE (DEV_BUS_PHYS_BASE | 0x0600)
82#define UART0_PHYS_BASE (DEV_BUS_PHYS_BASE | 0x2000)
83#define UART0_VIRT_BASE (DEV_BUS_VIRT_BASE | 0x2000)
84#define UART1_PHYS_BASE (DEV_BUS_PHYS_BASE | 0x2100)
85#define UART1_VIRT_BASE (DEV_BUS_VIRT_BASE | 0x2100)
86
87#define PCIE_VIRT_BASE (KIRKWOOD_REGS_VIRT_BASE | 0x40000)
88
89#define USB_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE | 0x50000)
90
91#define GE00_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE | 0x70000)
92#define GE01_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE | 0x74000)
93
94#define SATA_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE | 0x80000)
95
96
97#define GPIO_MAX 50
98
99
100#endif
diff --git a/include/asm-arm/arch-kirkwood/memory.h b/include/asm-arm/arch-kirkwood/memory.h
deleted file mode 100644
index e5108f408ce6..000000000000
--- a/include/asm-arm/arch-kirkwood/memory.h
+++ /dev/null
@@ -1,14 +0,0 @@
1/*
2 * include/asm-arm/arch-kirkwood/memory.h
3 */
4
5#ifndef __ASM_ARCH_MEMORY_H
6#define __ASM_ARCH_MEMORY_H
7
8#define PHYS_OFFSET UL(0x00000000)
9
10#define __virt_to_bus(x) __virt_to_phys(x)
11#define __bus_to_virt(x) __phys_to_virt(x)
12
13
14#endif
diff --git a/include/asm-arm/arch-kirkwood/system.h b/include/asm-arm/arch-kirkwood/system.h
deleted file mode 100644
index 8dde7e379855..000000000000
--- a/include/asm-arm/arch-kirkwood/system.h
+++ /dev/null
@@ -1,37 +0,0 @@
1/*
2 * include/asm-arm/arch-kirkwood/system.h
3 *
4 * This file is licensed under the terms of the GNU General Public
5 * License version 2. This program is licensed "as is" without any
6 * warranty of any kind, whether express or implied.
7 */
8
9#ifndef __ASM_ARCH_SYSTEM_H
10#define __ASM_ARCH_SYSTEM_H
11
12#include <asm/arch/hardware.h>
13#include <asm/arch/kirkwood.h>
14
15static inline void arch_idle(void)
16{
17 cpu_do_idle();
18}
19
20static inline void arch_reset(char mode)
21{
22 /*
23 * Enable soft reset to assert RSTOUTn.
24 */
25 writel(SOFT_RESET_OUT_EN, RSTOUTn_MASK);
26
27 /*
28 * Assert soft reset.
29 */
30 writel(SOFT_RESET, SYSTEM_SOFT_RESET);
31
32 while (1)
33 ;
34}
35
36
37#endif
diff --git a/include/asm-arm/arch-kirkwood/timex.h b/include/asm-arm/arch-kirkwood/timex.h
deleted file mode 100644
index 82122e134e3c..000000000000
--- a/include/asm-arm/arch-kirkwood/timex.h
+++ /dev/null
@@ -1,11 +0,0 @@
1/*
2 * include/asm-arm/arch-kirkwood/timex.h
3 *
4 * This file is licensed under the terms of the GNU General Public
5 * License version 2. This program is licensed "as is" without any
6 * warranty of any kind, whether express or implied.
7 */
8
9#define CLOCK_TICK_RATE (100 * HZ)
10
11#define KIRKWOOD_TCLK 166666667
diff --git a/include/asm-arm/arch-kirkwood/uncompress.h b/include/asm-arm/arch-kirkwood/uncompress.h
deleted file mode 100644
index a9062b6d7680..000000000000
--- a/include/asm-arm/arch-kirkwood/uncompress.h
+++ /dev/null
@@ -1,47 +0,0 @@
1/*
2 * include/asm-arm/arch-kirkwood/uncompress.h
3 *
4 * This file is licensed under the terms of the GNU General Public
5 * License version 2. This program is licensed "as is" without any
6 * warranty of any kind, whether express or implied.
7 */
8
9#include <linux/serial_reg.h>
10#include <asm/arch/kirkwood.h>
11
12#define SERIAL_BASE ((unsigned char *)UART0_PHYS_BASE)
13
14static void putc(const char c)
15{
16 unsigned char *base = SERIAL_BASE;
17 int i;
18
19 for (i = 0; i < 0x1000; i++) {
20 if (base[UART_LSR << 2] & UART_LSR_THRE)
21 break;
22 barrier();
23 }
24
25 base[UART_TX << 2] = c;
26}
27
28static void flush(void)
29{
30 unsigned char *base = SERIAL_BASE;
31 unsigned char mask;
32 int i;
33
34 mask = UART_LSR_TEMT | UART_LSR_THRE;
35
36 for (i = 0; i < 0x1000; i++) {
37 if ((base[UART_LSR << 2] & mask) == mask)
38 break;
39 barrier();
40 }
41}
42
43/*
44 * nothing to do
45 */
46#define arch_decomp_setup()
47#define arch_decomp_wdog()
diff --git a/include/asm-arm/arch-kirkwood/vmalloc.h b/include/asm-arm/arch-kirkwood/vmalloc.h
deleted file mode 100644
index 41852c6e77f3..000000000000
--- a/include/asm-arm/arch-kirkwood/vmalloc.h
+++ /dev/null
@@ -1,5 +0,0 @@
1/*
2 * include/asm-arm/arch-kirkwood/vmalloc.h
3 */
4
5#define VMALLOC_END 0xfe800000
diff --git a/include/asm-arm/arch-ks8695/debug-macro.S b/include/asm-arm/arch-ks8695/debug-macro.S
deleted file mode 100644
index cd5f2fb1f06e..000000000000
--- a/include/asm-arm/arch-ks8695/debug-macro.S
+++ /dev/null
@@ -1,38 +0,0 @@
1/*
2 * include/asm-arm/arch-ks8695/debug-macro.S
3 *
4 * Copyright (C) 2006 Ben Dooks <ben@simtec.co.uk>
5 * Copyright (C) 2006 Simtec Electronics
6 *
7 * KS8695 - Debug macros
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12 */
13
14#include <asm/hardware.h>
15#include <asm/arch/regs-uart.h>
16
17 .macro addruart, rx
18 mrc p15, 0, \rx, c1, c0
19 tst \rx, #1 @ MMU enabled?
20 ldreq \rx, =KS8695_UART_PA @ physical base address
21 ldrne \rx, =KS8695_UART_VA @ virtual base address
22 .endm
23
24 .macro senduart, rd, rx
25 str \rd, [\rx, #KS8695_URTH] @ Write to Transmit Holding Register
26 .endm
27
28 .macro busyuart, rd, rx
291001: ldr \rd, [\rx, #KS8695_URLS] @ Read Line Status Register
30 tst \rd, #URLS_URTE @ Holding & Shift registers empty?
31 beq 1001b
32 .endm
33
34 .macro waituart, rd, rx
351001: ldr \rd, [\rx, #KS8695_URLS] @ Read Line Status Register
36 tst \rd, #URLS_URTHRE @ Holding Register empty?
37 beq 1001b
38 .endm
diff --git a/include/asm-arm/arch-ks8695/devices.h b/include/asm-arm/arch-ks8695/devices.h
deleted file mode 100644
index 7ad2c656e162..000000000000
--- a/include/asm-arm/arch-ks8695/devices.h
+++ /dev/null
@@ -1,37 +0,0 @@
1/*
2 * include/asm-arm/arch-ks8695/devices.h
3 *
4 * Copyright (C) 2006 Andrew Victor
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10
11#ifndef __ASM_ARCH_DEVICES_H
12#define __ASM_ARCH_DEVICES_H
13
14#include <linux/pci.h>
15
16 /* Ethernet */
17extern void __init ks8695_add_device_wan(void);
18extern void __init ks8695_add_device_lan(void);
19extern void __init ks8695_add_device_hpna(void);
20
21 /* LEDs */
22extern short ks8695_leds_cpu;
23extern short ks8695_leds_timer;
24extern void __init ks8695_init_leds(u8 cpu_led, u8 timer_led);
25
26 /* PCI */
27#define KS8695_MODE_PCI 0
28#define KS8695_MODE_MINIPCI 1
29#define KS8695_MODE_CARDBUS 2
30
31struct ks8695_pci_cfg {
32 short mode;
33 int (*map_irq)(struct pci_dev *, u8, u8);
34};
35extern __init void ks8695_init_pci(struct ks8695_pci_cfg *);
36
37#endif
diff --git a/include/asm-arm/arch-ks8695/dma.h b/include/asm-arm/arch-ks8695/dma.h
deleted file mode 100644
index e5159ed42a4b..000000000000
--- a/include/asm-arm/arch-ks8695/dma.h
+++ /dev/null
@@ -1,17 +0,0 @@
1/*
2 * include/asm-arm/arch-ks8695/dma.h
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 */
diff --git a/include/asm-arm/arch-ks8695/entry-macro.S b/include/asm-arm/arch-ks8695/entry-macro.S
deleted file mode 100644
index e34bdf85920e..000000000000
--- a/include/asm-arm/arch-ks8695/entry-macro.S
+++ /dev/null
@@ -1,53 +0,0 @@
1/*
2 * include/asm-arm/arch-ks8695/entry-macro.S
3 *
4 * Copyright (C) 2006 Ben Dooks <ben@simtec.co.uk>
5 * Copyright (C) 2006 Simtec Electronics
6 *
7 * Low-level IRQ helper macros for KS8695
8 *
9 * This file is licensed under the terms of the GNU General Public
10 * License version 2. This program is licensed "as is" without any
11 * warranty of any kind, whether express or implied.
12*/
13
14#include <asm/hardware.h>
15#include <asm/arch/regs-irq.h>
16
17 .macro disable_fiq
18 .endm
19
20 .macro get_irqnr_preamble, base, tmp
21 ldr \base, =KS8695_IRQ_VA @ Base address of interrupt controller
22 .endm
23
24 .macro arch_ret_to_user, tmp1, tmp2
25 .endm
26
27 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
28 ldr \irqstat, [\base, #KS8695_INTMS] @ Mask Status register
29
30 teq \irqstat, #0
31 beq 1001f
32
33 mov \irqnr, #0
34
35 tst \irqstat, #0xff
36 moveq \irqstat, \irqstat, lsr #8
37 addeq \irqnr, \irqnr, #8
38 tsteq \irqstat, #0xff
39 moveq \irqstat, \irqstat, lsr #8
40 addeq \irqnr, \irqnr, #8
41 tsteq \irqstat, #0xff
42 moveq \irqstat, \irqstat, lsr #8
43 addeq \irqnr, \irqnr, #8
44 tst \irqstat, #0x0f
45 moveq \irqstat, \irqstat, lsr #4
46 addeq \irqnr, \irqnr, #4
47 tst \irqstat, #0x03
48 moveq \irqstat, \irqstat, lsr #2
49 addeq \irqnr, \irqnr, #2
50 tst \irqstat, #0x01
51 addeqs \irqnr, \irqnr, #1
521001:
53 .endm
diff --git a/include/asm-arm/arch-ks8695/gpio.h b/include/asm-arm/arch-ks8695/gpio.h
deleted file mode 100644
index 65ceea28607b..000000000000
--- a/include/asm-arm/arch-ks8695/gpio.h
+++ /dev/null
@@ -1,79 +0,0 @@
1/*
2 * include/asm-arm/arch-ks8695/gpio.h
3 *
4 * Copyright (C) 2006 Andrew Victor
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10
11#ifndef __ASM_ARCH_GPIO_H_
12#define __ASM_ARCH_GPIO_H_
13
14#define KS8695_GPIO_0 0
15#define KS8695_GPIO_1 1
16#define KS8695_GPIO_2 2
17#define KS8695_GPIO_3 3
18#define KS8695_GPIO_4 4
19#define KS8695_GPIO_5 5
20#define KS8695_GPIO_6 6
21#define KS8695_GPIO_7 7
22#define KS8695_GPIO_8 8
23#define KS8695_GPIO_9 9
24#define KS8695_GPIO_10 10
25#define KS8695_GPIO_11 11
26#define KS8695_GPIO_12 12
27#define KS8695_GPIO_13 13
28#define KS8695_GPIO_14 14
29#define KS8695_GPIO_15 15
30
31
32/*
33 * Configure GPIO pin as external interrupt source.
34 */
35int __init_or_module ks8695_gpio_interrupt(unsigned int pin, unsigned int type);
36
37/*
38 * Configure the GPIO line as an input.
39 */
40int __init_or_module gpio_direction_input(unsigned int pin);
41
42/*
43 * Configure the GPIO line as an output, with default state.
44 */
45int __init_or_module gpio_direction_output(unsigned int pin, unsigned int state);
46
47/*
48 * Set the state of an output GPIO line.
49 */
50void gpio_set_value(unsigned int pin, unsigned int state);
51
52/*
53 * Read the state of a GPIO line.
54 */
55int gpio_get_value(unsigned int pin);
56
57/*
58 * Map GPIO line to IRQ number.
59 */
60int gpio_to_irq(unsigned int pin);
61
62/*
63 * Map IRQ number to GPIO line.
64 */
65int irq_to_gpio(unsigned int irq);
66
67
68#include <asm-generic/gpio.h>
69
70static inline int gpio_request(unsigned int pin, const char *label)
71{
72 return 0;
73}
74
75static inline void gpio_free(unsigned int pin)
76{
77}
78
79#endif
diff --git a/include/asm-arm/arch-ks8695/hardware.h b/include/asm-arm/arch-ks8695/hardware.h
deleted file mode 100644
index cb732bff3288..000000000000
--- a/include/asm-arm/arch-ks8695/hardware.h
+++ /dev/null
@@ -1,49 +0,0 @@
1/*
2 * include/asm-arm/arch-ks8695/hardware.h
3 *
4 * Copyright (C) 2006 Ben Dooks <ben@simtec.co.uk>
5 * Copyright (C) 2006 Simtec Electronics
6 *
7 * KS8695 - Memory Map definitions
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12*/
13
14#ifndef __ASM_ARCH_HARDWARE_H
15#define __ASM_ARCH_HARDWARE_H
16
17#include <asm/sizes.h>
18
19/*
20 * Physical RAM address.
21 */
22#define KS8695_SDRAM_PA 0x00000000
23
24
25/*
26 * We map an entire MiB with the System Configuration Registers in even
27 * though only 64KiB is needed. This makes it easier for use with the
28 * head debug code as the initial MMU setup only deals in L1 sections.
29 */
30#define KS8695_IO_PA 0x03F00000
31#define KS8695_IO_VA 0xF0000000
32#define KS8695_IO_SIZE SZ_1M
33
34#define KS8695_PCIMEM_PA 0x60000000
35#define KS8695_PCIMEM_SIZE SZ_512M
36
37#define KS8695_PCIIO_PA 0x80000000
38#define KS8695_PCIIO_SIZE SZ_64K
39
40
41/*
42 * PCI support
43 */
44#define pcibios_assign_all_busses() 1
45
46#define PCIBIOS_MIN_IO 0
47#define PCIBIOS_MIN_MEM 0
48
49#endif
diff --git a/include/asm-arm/arch-ks8695/io.h b/include/asm-arm/arch-ks8695/io.h
deleted file mode 100644
index 8edc4bd6aadf..000000000000
--- a/include/asm-arm/arch-ks8695/io.h
+++ /dev/null
@@ -1,19 +0,0 @@
1/*
2 * include/asm-arm/arch-ks8695/io.h
3 *
4 * Copyright (C) 2006 Andrew Victor
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10
11#ifndef __ASM_ARCH_IO_H
12#define __ASM_ARCH_IO_H
13
14#define IO_SPACE_LIMIT 0xffffffff
15
16#define __io(a) ((void __iomem *)(a))
17#define __mem_pci(a) (a)
18
19#endif
diff --git a/include/asm-arm/arch-ks8695/irqs.h b/include/asm-arm/arch-ks8695/irqs.h
deleted file mode 100644
index 8b1c4fe96a81..000000000000
--- a/include/asm-arm/arch-ks8695/irqs.h
+++ /dev/null
@@ -1,54 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-ks8695/irqs.h
3 *
4 * Copyright (C) 2006 Simtec Electronics
5 * Ben Dooks <ben@simtec.co.uk>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 */
11
12#ifndef __ASM_ARCH_IRQS_H
13#define __ASM_ARCH_IRQS_H
14
15
16#define NR_IRQS 32
17
18/*
19 * IRQ definitions
20 */
21#define KS8695_IRQ_COMM_RX 0
22#define KS8695_IRQ_COMM_TX 1
23#define KS8695_IRQ_EXTERN0 2
24#define KS8695_IRQ_EXTERN1 3
25#define KS8695_IRQ_EXTERN2 4
26#define KS8695_IRQ_EXTERN3 5
27#define KS8695_IRQ_TIMER0 6
28#define KS8695_IRQ_TIMER1 7
29#define KS8695_IRQ_UART_TX 8
30#define KS8695_IRQ_UART_RX 9
31#define KS8695_IRQ_UART_LINE_STATUS 10
32#define KS8695_IRQ_UART_MODEM_STATUS 11
33#define KS8695_IRQ_LAN_RX_STOP 12
34#define KS8695_IRQ_LAN_TX_STOP 13
35#define KS8695_IRQ_LAN_RX_BUF 14
36#define KS8695_IRQ_LAN_TX_BUF 15
37#define KS8695_IRQ_LAN_RX_STATUS 16
38#define KS8695_IRQ_LAN_TX_STATUS 17
39#define KS8695_IRQ_HPNA_RX_STOP 18
40#define KS8695_IRQ_HPNA_TX_STOP 19
41#define KS8695_IRQ_HPNA_RX_BUF 20
42#define KS8695_IRQ_HPNA_TX_BUF 21
43#define KS8695_IRQ_HPNA_RX_STATUS 22
44#define KS8695_IRQ_HPNA_TX_STATUS 23
45#define KS8695_IRQ_BUS_ERROR 24
46#define KS8695_IRQ_WAN_RX_STOP 25
47#define KS8695_IRQ_WAN_TX_STOP 26
48#define KS8695_IRQ_WAN_RX_BUF 27
49#define KS8695_IRQ_WAN_TX_BUF 28
50#define KS8695_IRQ_WAN_RX_STATUS 29
51#define KS8695_IRQ_WAN_TX_STATUS 30
52#define KS8695_IRQ_WAN_LINK 31
53
54#endif
diff --git a/include/asm-arm/arch-ks8695/memory.h b/include/asm-arm/arch-ks8695/memory.h
deleted file mode 100644
index 24f6a6e4a302..000000000000
--- a/include/asm-arm/arch-ks8695/memory.h
+++ /dev/null
@@ -1,49 +0,0 @@
1/*
2 * include/asm-arm/arch-ks8695/memory.h
3 *
4 * Copyright (C) 2006 Andrew Victor
5 *
6 * KS8695 Memory definitions
7 *
8 * This file is licensed under the terms of the GNU General Public
9 * License version 2. This program is licensed "as is" without any
10 * warranty of any kind, whether express or implied.
11 */
12
13#ifndef __ASM_ARCH_MEMORY_H
14#define __ASM_ARCH_MEMORY_H
15
16#include <asm/hardware.h>
17
18/*
19 * Physical SRAM offset.
20 */
21#define PHYS_OFFSET KS8695_SDRAM_PA
22
23#ifndef __ASSEMBLY__
24
25#ifdef CONFIG_PCI
26
27/* PCI mappings */
28#define __virt_to_bus(x) ((x) - PAGE_OFFSET + KS8695_PCIMEM_PA)
29#define __bus_to_virt(x) ((x) - KS8695_PCIMEM_PA + PAGE_OFFSET)
30
31/* Platform-bus mapping */
32extern struct bus_type platform_bus_type;
33#define is_lbus_device(dev) (dev && dev->bus == &platform_bus_type)
34#define __arch_dma_to_virt(dev, x) ({ is_lbus_device(dev) ? \
35 __phys_to_virt(x) : __bus_to_virt(x); })
36#define __arch_virt_to_dma(dev, x) ({ is_lbus_device(dev) ? \
37 (dma_addr_t)__virt_to_phys(x) : (dma_addr_t)__virt_to_bus(x); })
38#define __arch_page_to_dma(dev, x) __arch_virt_to_dma(dev, page_address(x))
39
40#else
41
42#define __virt_to_bus(x) __virt_to_phys(x)
43#define __bus_to_virt(x) __phys_to_virt(x)
44
45#endif
46
47#endif
48
49#endif
diff --git a/include/asm-arm/arch-ks8695/regs-gpio.h b/include/asm-arm/arch-ks8695/regs-gpio.h
deleted file mode 100644
index 6b95d77aea19..000000000000
--- a/include/asm-arm/arch-ks8695/regs-gpio.h
+++ /dev/null
@@ -1,55 +0,0 @@
1/*
2 * include/asm-arm/arch-ks8695/regs-gpio.h
3 *
4 * Copyright (C) 2007 Andrew Victor
5 *
6 * KS8695 - GPIO control registers and bit definitions.
7 *
8 * This file is licensed under the terms of the GNU General Public
9 * License version 2. This program is licensed "as is" without any
10 * warranty of any kind, whether express or implied.
11 */
12
13#ifndef KS8695_GPIO_H
14#define KS8695_GPIO_H
15
16#define KS8695_GPIO_OFFSET (0xF0000 + 0xE600)
17#define KS8695_GPIO_VA (KS8695_IO_VA + KS8695_GPIO_OFFSET)
18#define KS8695_GPIO_PA (KS8695_IO_PA + KS8695_GPIO_OFFSET)
19
20
21#define KS8695_IOPM (0x00) /* I/O Port Mode Register */
22#define KS8695_IOPC (0x04) /* I/O Port Control Register */
23#define KS8695_IOPD (0x08) /* I/O Port Data Register */
24
25
26/* Port Mode Register */
27#define IOPM_(x) (1 << (x)) /* Mode for GPIO Pin x */
28
29/* Port Control Register */
30#define IOPC_IOTIM1EN (1 << 17) /* GPIO Pin for Timer1 Enable */
31#define IOPC_IOTIM0EN (1 << 16) /* GPIO Pin for Timer0 Enable */
32#define IOPC_IOEINT3EN (1 << 15) /* GPIO Pin for External/Soft Interrupt 3 Enable */
33#define IOPC_IOEINT3TM (7 << 12) /* GPIO Pin for External/Soft Interrupt 3 Trigger Mode */
34#define IOPC_IOEINT3_MODE(x) ((x) << 12)
35#define IOPC_IOEINT2EN (1 << 11) /* GPIO Pin for External/Soft Interrupt 2 Enable */
36#define IOPC_IOEINT2TM (7 << 8) /* GPIO Pin for External/Soft Interrupt 2 Trigger Mode */
37#define IOPC_IOEINT2_MODE(x) ((x) << 8)
38#define IOPC_IOEINT1EN (1 << 7) /* GPIO Pin for External/Soft Interrupt 1 Enable */
39#define IOPC_IOEINT1TM (7 << 4) /* GPIO Pin for External/Soft Interrupt 1 Trigger Mode */
40#define IOPC_IOEINT1_MODE(x) ((x) << 4)
41#define IOPC_IOEINT0EN (1 << 3) /* GPIO Pin for External/Soft Interrupt 0 Enable */
42#define IOPC_IOEINT0TM (7 << 0) /* GPIO Pin for External/Soft Interrupt 0 Trigger Mode */
43#define IOPC_IOEINT0_MODE(x) ((x) << 0)
44
45 /* Trigger Modes */
46#define IOPC_TM_LOW (0) /* Level Detection (Active Low) */
47#define IOPC_TM_HIGH (1) /* Level Detection (Active High) */
48#define IOPC_TM_RISING (2) /* Rising Edge Detection */
49#define IOPC_TM_FALLING (4) /* Falling Edge Detection */
50#define IOPC_TM_EDGE (6) /* Both Edge Detection */
51
52/* Port Data Register */
53#define IOPD_(x) (1 << (x)) /* Signal Level of GPIO Pin x */
54
55#endif
diff --git a/include/asm-arm/arch-ks8695/regs-hpna.h b/include/asm-arm/arch-ks8695/regs-hpna.h
deleted file mode 100644
index 14091cdec103..000000000000
--- a/include/asm-arm/arch-ks8695/regs-hpna.h
+++ /dev/null
@@ -1,25 +0,0 @@
1/*
2 * include/asm-arm/arch-ks8695/regs-wan.h
3 *
4 * Copyright (C) 2006 Andrew Victor
5 *
6 * KS8695 - HPNA Registers and bit definitions.
7 *
8 * This file is licensed under the terms of the GNU General Public
9 * License version 2. This program is licensed "as is" without any
10 * warranty of any kind, whether express or implied.
11 */
12
13#ifndef KS8695_HPNA_H
14#define KS8695_HPNA_H
15
16#define KS8695_HPNA_OFFSET (0xF0000 + 0xA000)
17#define KS8695_HPNA_VA (KS8695_IO_VA + KS8695_HPNA_OFFSET)
18#define KS8695_HPNA_PA (KS8695_IO_PA + KS8695_HPNA_OFFSET)
19
20
21/*
22 * HPNA registers
23 */
24
25#endif
diff --git a/include/asm-arm/arch-ks8695/regs-irq.h b/include/asm-arm/arch-ks8695/regs-irq.h
deleted file mode 100644
index 70b193f6b756..000000000000
--- a/include/asm-arm/arch-ks8695/regs-irq.h
+++ /dev/null
@@ -1,41 +0,0 @@
1/*
2 * include/asm-arm/arch-ks8695/regs-irq.h
3 *
4 * Copyright (C) 2006 Ben Dooks <ben@simtec.co.uk>
5 * Copyright (C) 2006 Simtec Electronics
6 *
7 * KS8695 - IRQ registers and bit definitions
8 *
9 * This file is licensed under the terms of the GNU General Public
10 * License version 2. This program is licensed "as is" without any
11 * warranty of any kind, whether express or implied.
12 */
13
14#ifndef KS8695_IRQ_H
15#define KS8695_IRQ_H
16
17#define KS8695_IRQ_OFFSET (0xF0000 + 0xE200)
18#define KS8695_IRQ_VA (KS8695_IO_VA + KS8695_IRQ_OFFSET)
19#define KS8695_IRQ_PA (KS8695_IO_PA + KS8695_IRQ_OFFSET)
20
21
22/*
23 * Interrupt Controller registers
24 */
25#define KS8695_INTMC (0x00) /* Mode Control Register */
26#define KS8695_INTEN (0x04) /* Interrupt Enable Register */
27#define KS8695_INTST (0x08) /* Interrupt Status Register */
28#define KS8695_INTPW (0x0c) /* Interrupt Priority (WAN MAC) */
29#define KS8695_INTPH (0x10) /* Interrupt Priority (HPNA) [KS8695 only] */
30#define KS8695_INTPL (0x14) /* Interrupt Priority (LAN MAC) */
31#define KS8695_INTPT (0x18) /* Interrupt Priority (Timer) */
32#define KS8695_INTPU (0x1c) /* Interrupt Priority (UART) */
33#define KS8695_INTPE (0x20) /* Interrupt Priority (External Interrupt) */
34#define KS8695_INTPC (0x24) /* Interrupt Priority (Communications Channel) */
35#define KS8695_INTPBE (0x28) /* Interrupt Priority (Bus Error Response) */
36#define KS8695_INTMS (0x2c) /* Interrupt Mask Status Register */
37#define KS8695_INTHPF (0x30) /* Interrupt Pending Highest Priority (FIQ) */
38#define KS8695_INTHPI (0x34) /* Interrupt Pending Highest Priority (IRQ) */
39
40
41#endif
diff --git a/include/asm-arm/arch-ks8695/regs-lan.h b/include/asm-arm/arch-ks8695/regs-lan.h
deleted file mode 100644
index a63bd61c64ed..000000000000
--- a/include/asm-arm/arch-ks8695/regs-lan.h
+++ /dev/null
@@ -1,65 +0,0 @@
1/*
2 * include/asm-arm/arch-ks8695/regs-lan.h
3 *
4 * Copyright (C) 2006 Andrew Victor
5 *
6 * KS8695 - LAN Registers and bit definitions.
7 *
8 * This file is licensed under the terms of the GNU General Public
9 * License version 2. This program is licensed "as is" without any
10 * warranty of any kind, whether express or implied.
11 */
12
13#ifndef KS8695_LAN_H
14#define KS8695_LAN_H
15
16#define KS8695_LAN_OFFSET (0xF0000 + 0x8000)
17#define KS8695_LAN_VA (KS8695_IO_VA + KS8695_LAN_OFFSET)
18#define KS8695_LAN_PA (KS8695_IO_PA + KS8695_LAN_OFFSET)
19
20
21/*
22 * LAN registers
23 */
24#define KS8695_LMDTXC (0x00) /* DMA Transmit Control */
25#define KS8695_LMDRXC (0x04) /* DMA Receive Control */
26#define KS8695_LMDTSC (0x08) /* DMA Transmit Start Command */
27#define KS8695_LMDRSC (0x0c) /* DMA Receive Start Command */
28#define KS8695_LTDLB (0x10) /* Transmit Descriptor List Base Address */
29#define KS8695_LRDLB (0x14) /* Receive Descriptor List Base Address */
30#define KS8695_LMAL (0x18) /* MAC Station Address Low */
31#define KS8695_LMAH (0x1c) /* MAC Station Address High */
32#define KS8695_LMAAL_(n) (0x80 + ((n)*8)) /* MAC Additional Station Address (0..15) Low */
33#define KS8695_LMAAH_(n) (0x84 + ((n)*8)) /* MAC Additional Station Address (0..15) High */
34
35
36/* DMA Transmit Control Register */
37#define LMDTXC_LMTRST (1 << 31) /* Soft Reset */
38#define LMDTXC_LMTBS (0x3f << 24) /* Transmit Burst Size */
39#define LMDTXC_LMTUCG (1 << 18) /* Transmit UDP Checksum Generate */
40#define LMDTXC_LMTTCG (1 << 17) /* Transmit TCP Checksum Generate */
41#define LMDTXC_LMTICG (1 << 16) /* Transmit IP Checksum Generate */
42#define LMDTXC_LMTFCE (1 << 9) /* Transmit Flow Control Enable */
43#define LMDTXC_LMTLB (1 << 8) /* Loopback mode */
44#define LMDTXC_LMTEP (1 << 2) /* Transmit Enable Padding */
45#define LMDTXC_LMTAC (1 << 1) /* Transmit Add CRC */
46#define LMDTXC_LMTE (1 << 0) /* TX Enable */
47
48/* DMA Receive Control Register */
49#define LMDRXC_LMRBS (0x3f << 24) /* Receive Burst Size */
50#define LMDRXC_LMRUCC (1 << 18) /* Receive UDP Checksum check */
51#define LMDRXC_LMRTCG (1 << 17) /* Receive TCP Checksum check */
52#define LMDRXC_LMRICG (1 << 16) /* Receive IP Checksum check */
53#define LMDRXC_LMRFCE (1 << 9) /* Receive Flow Control Enable */
54#define LMDRXC_LMRB (1 << 6) /* Receive Broadcast */
55#define LMDRXC_LMRM (1 << 5) /* Receive Multicast */
56#define LMDRXC_LMRU (1 << 4) /* Receive Unicast */
57#define LMDRXC_LMRERR (1 << 3) /* Receive Error Frame */
58#define LMDRXC_LMRA (1 << 2) /* Receive All */
59#define LMDRXC_LMRE (1 << 1) /* RX Enable */
60
61/* Additional Station Address High */
62#define LMAAH_E (1 << 31) /* Address Enabled */
63
64
65#endif
diff --git a/include/asm-arm/arch-ks8695/regs-mem.h b/include/asm-arm/arch-ks8695/regs-mem.h
deleted file mode 100644
index 76b38e0862e6..000000000000
--- a/include/asm-arm/arch-ks8695/regs-mem.h
+++ /dev/null
@@ -1,89 +0,0 @@
1/*
2 * include/asm-arm/arch-ks8695/regs-mem.h
3 *
4 * Copyright (C) 2006 Andrew Victor
5 *
6 * KS8695 - Memory Controller registers and bit definitions
7 *
8 * This file is licensed under the terms of the GNU General Public
9 * License version 2. This program is licensed "as is" without any
10 * warranty of any kind, whether express or implied.
11 */
12
13#ifndef KS8695_MEM_H
14#define KS8695_MEM_H
15
16#define KS8695_MEM_OFFSET (0xF0000 + 0x4000)
17#define KS8695_MEM_VA (KS8695_IO_VA + KS8695_MEM_OFFSET)
18#define KS8695_MEM_PA (KS8695_IO_PA + KS8695_MEM_OFFSET)
19
20
21/*
22 * Memory Controller Registers
23 */
24#define KS8695_EXTACON0 (0x00) /* External I/O 0 Access Control */
25#define KS8695_EXTACON1 (0x04) /* External I/O 1 Access Control */
26#define KS8695_EXTACON2 (0x08) /* External I/O 2 Access Control */
27#define KS8695_ROMCON0 (0x10) /* ROM/SRAM/Flash 1 Control Register */
28#define KS8695_ROMCON1 (0x14) /* ROM/SRAM/Flash 2 Control Register */
29#define KS8695_ERGCON (0x20) /* External I/O and ROM/SRAM/Flash General Register */
30#define KS8695_SDCON0 (0x30) /* SDRAM Control Register 0 */
31#define KS8695_SDCON1 (0x34) /* SDRAM Control Register 1 */
32#define KS8695_SDGCON (0x38) /* SDRAM General Control */
33#define KS8695_SDBCON (0x3c) /* SDRAM Buffer Control */
34#define KS8695_REFTIM (0x40) /* SDRAM Refresh Timer */
35
36
37/* External I/O Access Control Registers */
38#define EXTACON_EBNPTR (0x3ff << 22) /* Last Address Pointer */
39#define EXTACON_EBBPTR (0x3ff << 12) /* Base Pointer */
40#define EXTACON_EBTACT (7 << 9) /* Write Enable/Output Enable Active Time */
41#define EXTACON_EBTCOH (7 << 6) /* Chip Select Hold Time */
42#define EXTACON_EBTACS (7 << 3) /* Address Setup Time before ECSN */
43#define EXTACON_EBTCOS (7 << 0) /* Chip Select Time before OEN */
44
45/* ROM/SRAM/Flash Control Register */
46#define ROMCON_RBNPTR (0x3ff << 22) /* Next Pointer */
47#define ROMCON_RBBPTR (0x3ff << 12) /* Base Pointer */
48#define ROMCON_RBTACC (7 << 4) /* Access Cycle Time */
49#define ROMCON_RBTPA (3 << 2) /* Page Address Access Time */
50#define ROMCON_PMC (3 << 0) /* Page Mode Configuration */
51#define PMC_NORMAL (0 << 0)
52#define PMC_4WORD (1 << 0)
53#define PMC_8WORD (2 << 0)
54#define PMC_16WORD (3 << 0)
55
56/* External I/O and ROM/SRAM/Flash General Register */
57#define ERGCON_TMULT (3 << 28) /* Time Multiplier */
58#define ERGCON_DSX2 (3 << 20) /* Data Width (External I/O Bank 2) */
59#define ERGCON_DSX1 (3 << 18) /* Data Width (External I/O Bank 1) */
60#define ERGCON_DSX0 (3 << 16) /* Data Width (External I/O Bank 0) */
61#define ERGCON_DSR1 (3 << 2) /* Data Width (ROM/SRAM/Flash Bank 1) */
62#define ERGCON_DSR0 (3 << 0) /* Data Width (ROM/SRAM/Flash Bank 0) */
63
64/* SDRAM Control Register */
65#define SDCON_DBNPTR (0x3ff << 22) /* Last Address Pointer */
66#define SDCON_DBBPTR (0x3ff << 12) /* Base Pointer */
67#define SDCON_DBCAB (3 << 8) /* Column Address Bits */
68#define SDCON_DBBNUM (1 << 3) /* Number of Banks */
69#define SDCON_DBDBW (3 << 1) /* Data Bus Width */
70
71/* SDRAM General Control Register */
72#define SDGCON_SDTRC (3 << 2) /* RAS to CAS latency */
73#define SDGCON_SDCAS (3 << 0) /* CAS latency */
74
75/* SDRAM Buffer Control Register */
76#define SDBCON_SDESTA (1 << 31) /* SDRAM Engine Status */
77#define SDBCON_RBUFBDIS (1 << 24) /* Read Buffer Burst Enable */
78#define SDBCON_WFIFOEN (1 << 23) /* Write FIFO Enable */
79#define SDBCON_RBUFEN (1 << 22) /* Read Buffer Enable */
80#define SDBCON_FLUSHWFIFO (1 << 21) /* Flush Write FIFO */
81#define SDBCON_RBUFINV (1 << 20) /* Read Buffer Invalidate */
82#define SDBCON_SDINI (3 << 16) /* SDRAM Initialization Control */
83#define SDBCON_SDMODE (0x3fff << 0) /* SDRAM Mode Register Value Program */
84
85/* SDRAM Refresh Timer Register */
86#define REFTIM_REFTIM (0xffff << 0) /* Refresh Timer Value */
87
88
89#endif
diff --git a/include/asm-arm/arch-ks8695/regs-misc.h b/include/asm-arm/arch-ks8695/regs-misc.h
deleted file mode 100644
index 632ca6601a94..000000000000
--- a/include/asm-arm/arch-ks8695/regs-misc.h
+++ /dev/null
@@ -1,97 +0,0 @@
1/*
2 * include/asm-arm/arch-ks8695/regs-misc.h
3 *
4 * Copyright (C) 2006 Andrew Victor
5 *
6 * KS8695 - Miscellaneous Registers
7 *
8 * This file is licensed under the terms of the GNU General Public
9 * License version 2. This program is licensed "as is" without any
10 * warranty of any kind, whether express or implied.
11 */
12
13#ifndef KS8695_MISC_H
14#define KS8695_MISC_H
15
16#define KS8695_MISC_OFFSET (0xF0000 + 0xEA00)
17#define KS8695_MISC_VA (KS8695_IO_VA + KS8695_MISC_OFFSET)
18#define KS8695_MISC_PA (KS8695_IO_PA + KS8695_MISC_OFFSET)
19
20
21/*
22 * Miscellaneous registers
23 */
24#define KS8695_DID (0x00) /* Device ID */
25#define KS8695_RID (0x04) /* Revision ID */
26#define KS8695_HMC (0x08) /* HPNA Miscellaneous Control [KS8695 only] */
27#define KS8695_WMC (0x0c) /* WAN Miscellaneous Control */
28#define KS8695_WPPM (0x10) /* WAN PHY Power Management */
29#define KS8695_PPS (0x1c) /* PHY PowerSave */
30
31/* Device ID Register */
32#define DID_ID (0xffff << 0) /* Device ID */
33
34/* Revision ID Register */
35#define RID_SUBID (0xf << 4) /* Sub-Device ID */
36#define RID_REVISION (0xf << 0) /* Revision ID */
37
38/* HPNA Miscellaneous Control Register */
39#define HMC_HSS (1 << 1) /* Speed */
40#define HMC_HDS (1 << 0) /* Duplex */
41
42/* WAN Miscellaneous Control Register */
43#define WMC_WANC (1 << 30) /* Auto-negotiation complete */
44#define WMC_WANR (1 << 29) /* Auto-negotiation restart */
45#define WMC_WANAP (1 << 28) /* Advertise Pause */
46#define WMC_WANA100F (1 << 27) /* Advertise 100 FDX */
47#define WMC_WANA100H (1 << 26) /* Advertise 100 HDX */
48#define WMC_WANA10F (1 << 25) /* Advertise 10 FDX */
49#define WMC_WANA10H (1 << 24) /* Advertise 10 HDX */
50#define WMC_WLS (1 << 23) /* Link status */
51#define WMC_WDS (1 << 22) /* Duplex status */
52#define WMC_WSS (1 << 21) /* Speed status */
53#define WMC_WLPP (1 << 20) /* Link Partner Pause */
54#define WMC_WLP100F (1 << 19) /* Link Partner 100 FDX */
55#define WMC_WLP100H (1 << 18) /* Link Partner 100 HDX */
56#define WMC_WLP10F (1 << 17) /* Link Partner 10 FDX */
57#define WMC_WLP10H (1 << 16) /* Link Partner 10 HDX */
58#define WMC_WAND (1 << 15) /* Auto-negotiation disable */
59#define WMC_WANF100 (1 << 14) /* Force 100 */
60#define WMC_WANFF (1 << 13) /* Force FDX */
61#define WMC_WLED1S (7 << 4) /* LED1 Select */
62#define WLED1S_SPEED (0 << 4)
63#define WLED1S_LINK (1 << 4)
64#define WLED1S_DUPLEX (2 << 4)
65#define WLED1S_COLLISION (3 << 4)
66#define WLED1S_ACTIVITY (4 << 4)
67#define WLED1S_FDX_COLLISION (5 << 4)
68#define WLED1S_LINK_ACTIVITY (6 << 4)
69#define WMC_WLED0S (7 << 0) /* LED0 Select */
70#define WLED0S_SPEED (0 << 0)
71#define WLED0S_LINK (1 << 0)
72#define WLED0S_DUPLEX (2 << 0)
73#define WLED0S_COLLISION (3 << 0)
74#define WLED0S_ACTIVITY (4 << 0)
75#define WLED0S_FDX_COLLISION (5 << 0)
76#define WLED0S_LINK_ACTIVITY (6 << 0)
77
78/* WAN PHY Power Management Register */
79#define WPPM_WLPBK (1 << 14) /* Local Loopback */
80#define WPPM_WRLPKB (1 << 13) /* Remove Loopback */
81#define WPPM_WPI (1 << 12) /* PHY isolate */
82#define WPPM_WFL (1 << 10) /* Force link */
83#define WPPM_MDIXS (1 << 9) /* MDIX Status */
84#define WPPM_FEF (1 << 8) /* Far End Fault */
85#define WPPM_AMDIXP (1 << 7) /* Auto MDIX Parameter */
86#define WPPM_TXDIS (1 << 6) /* Disable transmitter */
87#define WPPM_DFEF (1 << 5) /* Disable Far End Fault */
88#define WPPM_PD (1 << 4) /* Power Down */
89#define WPPM_DMDX (1 << 3) /* Disable Auto MDI/MDIX */
90#define WPPM_FMDX (1 << 2) /* Force MDIX */
91#define WPPM_LPBK (1 << 1) /* MAX Loopback */
92
93/* PHY Power Save Register */
94#define PPS_PPSM (1 << 0) /* PHY Power Save Mode */
95
96
97#endif
diff --git a/include/asm-arm/arch-ks8695/regs-pci.h b/include/asm-arm/arch-ks8695/regs-pci.h
deleted file mode 100644
index 286d6d488df8..000000000000
--- a/include/asm-arm/arch-ks8695/regs-pci.h
+++ /dev/null
@@ -1,53 +0,0 @@
1/*
2 * include/asm-arm/arch-ks8695/regs-pci.h
3 *
4 * Copyright (C) 2006 Ben Dooks <ben@simtec.co.uk>
5 * Copyright (C) 2006 Simtec Electronics
6 *
7 * KS8695 - PCI bridge registers and bit definitions.
8 *
9 * This file is licensed under the terms of the GNU General Public
10 * License version 2. This program is licensed "as is" without any
11 * warranty of any kind, whether express or implied.
12 */
13
14#define KS8695_PCI_OFFSET (0xF0000 + 0x2000)
15#define KS8695_PCI_VA (KS8695_IO_VA + KS8695_PCI_OFFSET)
16#define KS8695_PCI_PA (KS8695_IO_PA + KS8695_PCI_OFFSET)
17
18
19#define KS8695_CRCFID (0x000) /* Configuration: Identification */
20#define KS8695_CRCFCS (0x004) /* Configuration: Command and Status */
21#define KS8695_CRCFRV (0x008) /* Configuration: Revision */
22#define KS8695_CRCFLT (0x00C) /* Configuration: Latency Timer */
23#define KS8695_CRCBMA (0x010) /* Configuration: Base Memory Address */
24#define KS8695_CRCSID (0x02C) /* Configuration: Subsystem ID */
25#define KS8695_CRCFIT (0x03C) /* Configuration: Interrupt */
26#define KS8695_PBCA (0x100) /* Bridge Configuration Address */
27#define KS8695_PBCD (0x104) /* Bridge Configuration Data */
28#define KS8695_PBM (0x200) /* Bridge Mode */
29#define KS8695_PBCS (0x204) /* Bridge Control and Status */
30#define KS8695_PMBA (0x208) /* Bridge Memory Base Address */
31#define KS8695_PMBAC (0x20C) /* Bridge Memory Base Address Control */
32#define KS8695_PMBAM (0x210) /* Bridge Memory Base Address Mask */
33#define KS8695_PMBAT (0x214) /* Bridge Memory Base Address Translation */
34#define KS8695_PIOBA (0x218) /* Bridge I/O Base Address */
35#define KS8695_PIOBAC (0x21C) /* Bridge I/O Base Address Control */
36#define KS8695_PIOBAM (0x220) /* Bridge I/O Base Address Mask */
37#define KS8695_PIOBAT (0x224) /* Bridge I/O Base Address Translation */
38
39
40/* Configuration: Identification */
41
42/* Configuration: Command and Status */
43
44/* Configuration: Revision */
45
46
47
48#define CFRV_GUEST (1 << 23)
49
50#define PBCA_TYPE1 (1)
51#define PBCA_ENABLE (1 << 31)
52
53
diff --git a/include/asm-arm/arch-ks8695/regs-switch.h b/include/asm-arm/arch-ks8695/regs-switch.h
deleted file mode 100644
index 5f37be3f2f60..000000000000
--- a/include/asm-arm/arch-ks8695/regs-switch.h
+++ /dev/null
@@ -1,66 +0,0 @@
1/*
2 * include/asm-arm/arch-ks8695/regs-switch.h
3 *
4 * Copyright (C) 2006 Andrew Victor
5 *
6 * KS8695 - Switch Registers and bit definitions.
7 *
8 * This file is licensed under the terms of the GNU General Public
9 * License version 2. This program is licensed "as is" without any
10 * warranty of any kind, whether express or implied.
11 */
12
13#ifndef KS8695_SWITCH_H
14#define KS8695_SWITCH_H
15
16#define KS8695_SWITCH_OFFSET (0xF0000 + 0xe800)
17#define KS8695_SWITCH_VA (KS8695_IO_VA + KS8695_SWITCH_OFFSET)
18#define KS8695_SWITCH_PA (KS8695_IO_PA + KS8695_SWITCH_OFFSET)
19
20
21/*
22 * Switch registers
23 */
24#define KS8695_SEC0 (0x00) /* Switch Engine Control 0 */
25#define KS8695_SEC1 (0x04) /* Switch Engine Control 1 */
26#define KS8695_SEC2 (0x08) /* Switch Engine Control 2 */
27
28#define KS8695_P(x)_C(z) (0xc0 + (((x)-1)*3 + ((z)-1))*4) /* Port Configuration Registers */
29
30#define KS8695_SEP12AN (0x48) /* Port 1 & 2 Auto-Negotiation */
31#define KS8695_SEP34AN (0x4c) /* Port 3 & 4 Auto-Negotiation */
32#define KS8695_SEIAC (0x50) /* Indirect Access Control */
33#define KS8695_SEIADH2 (0x54) /* Indirect Access Data High 2 */
34#define KS8695_SEIADH1 (0x58) /* Indirect Access Data High 1 */
35#define KS8695_SEIADL (0x5c) /* Indirect Access Data Low */
36#define KS8695_SEAFC (0x60) /* Advance Feature Control */
37#define KS8695_SEDSCPH (0x64) /* TOS Priority High */
38#define KS8695_SEDSCPL (0x68) /* TOS Priority Low */
39#define KS8695_SEMAH (0x6c) /* Switch Engine MAC Address High */
40#define KS8695_SEMAL (0x70) /* Switch Engine MAC Address Low */
41#define KS8695_LPPM12 (0x74) /* Port 1 & 2 PHY Power Management */
42#define KS8695_LPPM34 (0x78) /* Port 3 & 4 PHY Power Management */
43
44
45/* Switch Engine Control 0 */
46#define SEC0_LLED1S (7 << 25) /* LED1 Select */
47#define LLED1S_SPEED (0 << 25)
48#define LLED1S_LINK (1 << 25)
49#define LLED1S_DUPLEX (2 << 25)
50#define LLED1S_COLLISION (3 << 25)
51#define LLED1S_ACTIVITY (4 << 25)
52#define LLED1S_FDX_COLLISION (5 << 25)
53#define LLED1S_LINK_ACTIVITY (6 << 25)
54#define SEC0_LLED0S (7 << 22) /* LED0 Select */
55#define LLED0S_SPEED (0 << 22)
56#define LLED0S_LINK (1 << 22)
57#define LLED0S_DUPLEX (2 << 22)
58#define LLED0S_COLLISION (3 << 22)
59#define LLED0S_ACTIVITY (4 << 22)
60#define LLED0S_FDX_COLLISION (5 << 22)
61#define LLED0S_LINK_ACTIVITY (6 << 22)
62#define SEC0_ENABLE (1 << 0) /* Enable Switch */
63
64
65
66#endif
diff --git a/include/asm-arm/arch-ks8695/regs-sys.h b/include/asm-arm/arch-ks8695/regs-sys.h
deleted file mode 100644
index f3179815b8ee..000000000000
--- a/include/asm-arm/arch-ks8695/regs-sys.h
+++ /dev/null
@@ -1,34 +0,0 @@
1/*
2 * include/asm-arm/arch-ks8695/regs-sys.h
3 *
4 * Copyright (C) 2006 Ben Dooks <ben@simtec.co.uk>
5 * Copyright (C) 2006 Simtec Electronics
6 *
7 * KS8695 - System control registers and bit definitions
8 *
9 * This file is licensed under the terms of the GNU General Public
10 * License version 2. This program is licensed "as is" without any
11 * warranty of any kind, whether express or implied.
12 */
13
14#ifndef KS8695_SYS_H
15#define KS8695_SYS_H
16
17#define KS8695_SYS_OFFSET (0xF0000 + 0x0000)
18#define KS8695_SYS_VA (KS8695_IO_VA + KS8695_SYS_OFFSET)
19#define KS8695_SYS_PA (KS8695_IO_PA + KS8695_SYS_OFFSET)
20
21
22#define KS8695_SYSCFG (0x00) /* System Configuration Register */
23#define KS8695_CLKCON (0x04) /* System Clock and Bus Control Register */
24
25
26/* System Configuration Register */
27#define SYSCFG_SPRBP (0x3ff << 16) /* Register Bank Base Pointer */
28
29/* System Clock and Bus Control Register */
30#define CLKCON_SFMODE (1 << 8) /* System Fast Mode for Simulation */
31#define CLKCON_SCDC (7 << 0) /* System Clock Divider Select */
32
33
34#endif
diff --git a/include/asm-arm/arch-ks8695/regs-timer.h b/include/asm-arm/arch-ks8695/regs-timer.h
deleted file mode 100644
index 0a9f7f99ec52..000000000000
--- a/include/asm-arm/arch-ks8695/regs-timer.h
+++ /dev/null
@@ -1,40 +0,0 @@
1/*
2 * include/asm-arm/arch-ks8695/regs-timer.h
3 *
4 * Copyright (C) 2006 Ben Dooks <ben@simtec.co.uk>
5 * Copyright (C) 2006 Simtec Electronics
6 *
7 * KS8695 - Timer registers and bit definitions.
8 *
9 * This file is licensed under the terms of the GNU General Public
10 * License version 2. This program is licensed "as is" without any
11 * warranty of any kind, whether express or implied.
12 */
13
14#ifndef KS8695_TIMER_H
15#define KS8695_TIMER_H
16
17#define KS8695_TMR_OFFSET (0xF0000 + 0xE400)
18#define KS8695_TMR_VA (KS8695_IO_VA + KS8695_TMR_OFFSET)
19#define KS8695_TMR_PA (KS8695_IO_PA + KS8695_TMR_OFFSET)
20
21
22/*
23 * Timer registers
24 */
25#define KS8695_TMCON (0x00) /* Timer Control Register */
26#define KS8695_T1TC (0x04) /* Timer 1 Timeout Count Register */
27#define KS8695_T0TC (0x08) /* Timer 0 Timeout Count Register */
28#define KS8695_T1PD (0x0C) /* Timer 1 Pulse Count Register */
29#define KS8695_T0PD (0x10) /* Timer 0 Pulse Count Register */
30
31
32/* Timer Control Register */
33#define TMCON_T1EN (1 << 1) /* Timer 1 Enable */
34#define TMCON_T0EN (1 << 0) /* Timer 0 Enable */
35
36/* Timer0 Timeout Counter Register */
37#define T0TC_WATCHDOG (0xff) /* Enable watchdog mode */
38
39
40#endif
diff --git a/include/asm-arm/arch-ks8695/regs-uart.h b/include/asm-arm/arch-ks8695/regs-uart.h
deleted file mode 100644
index a27cb20502a3..000000000000
--- a/include/asm-arm/arch-ks8695/regs-uart.h
+++ /dev/null
@@ -1,92 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-ks8695/regs-uart.h
3 *
4 * Copyright (C) 2006 Ben Dooks <ben@simtec.co.uk>
5 * Copyright (C) 2006 Simtec Electronics
6 *
7 * KS8695 - UART register and bit definitions.
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12 */
13
14#ifndef KS8695_UART_H
15#define KS8695_UART_H
16
17#define KS8695_UART_OFFSET (0xF0000 + 0xE000)
18#define KS8695_UART_VA (KS8695_IO_VA + KS8695_UART_OFFSET)
19#define KS8695_UART_PA (KS8695_IO_PA + KS8695_UART_OFFSET)
20
21
22/*
23 * UART registers
24 */
25#define KS8695_URRB (0x00) /* Receive Buffer Register */
26#define KS8695_URTH (0x04) /* Transmit Holding Register */
27#define KS8695_URFC (0x08) /* FIFO Control Register */
28#define KS8695_URLC (0x0C) /* Line Control Register */
29#define KS8695_URMC (0x10) /* Modem Control Register */
30#define KS8695_URLS (0x14) /* Line Status Register */
31#define KS8695_URMS (0x18) /* Modem Status Register */
32#define KS8695_URBD (0x1C) /* Baud Rate Divisor Register */
33#define KS8695_USR (0x20) /* Status Register */
34
35
36/* FIFO Control Register */
37#define URFC_URFRT (3 << 6) /* Receive FIFO Trigger Level */
38#define URFC_URFRT_1 (0 << 6)
39#define URFC_URFRT_4 (1 << 6)
40#define URFC_URFRT_8 (2 << 6)
41#define URFC_URFRT_14 (3 << 6)
42#define URFC_URTFR (1 << 2) /* Transmit FIFO Reset */
43#define URFC_URRFR (1 << 1) /* Receive FIFO Reset */
44#define URFC_URFE (1 << 0) /* FIFO Enable */
45
46/* Line Control Register */
47#define URLC_URSBC (1 << 6) /* Set Break Condition */
48#define URLC_PARITY (7 << 3) /* Parity */
49#define URPE_NONE (0 << 3)
50#define URPE_ODD (1 << 3)
51#define URPE_EVEN (3 << 3)
52#define URPE_MARK (5 << 3)
53#define URPE_SPACE (7 << 3)
54#define URLC_URSB (1 << 2) /* Stop Bits */
55#define URLC_URCL (3 << 0) /* Character Length */
56#define URCL_5 (0 << 0)
57#define URCL_6 (1 << 0)
58#define URCL_7 (2 << 0)
59#define URCL_8 (3 << 0)
60
61/* Modem Control Register */
62#define URMC_URLB (1 << 4) /* Loop-back mode */
63#define URMC_UROUT2 (1 << 3) /* OUT2 signal */
64#define URMC_UROUT1 (1 << 2) /* OUT1 signal */
65#define URMC_URRTS (1 << 1) /* Request to Send */
66#define URMC_URDTR (1 << 0) /* Data Terminal Ready */
67
68/* Line Status Register */
69#define URLS_URRFE (1 << 7) /* Receive FIFO Error */
70#define URLS_URTE (1 << 6) /* Transmit Empty */
71#define URLS_URTHRE (1 << 5) /* Transmit Holding Register Empty */
72#define URLS_URBI (1 << 4) /* Break Interrupt */
73#define URLS_URFE (1 << 3) /* Framing Error */
74#define URLS_URPE (1 << 2) /* Parity Error */
75#define URLS_URROE (1 << 1) /* Receive Overrun Error */
76#define URLS_URDR (1 << 0) /* Receive Data Ready */
77
78/* Modem Status Register */
79#define URMS_URDCD (1 << 7) /* Data Carrier Detect */
80#define URMS_URRI (1 << 6) /* Ring Indicator */
81#define URMS_URDSR (1 << 5) /* Data Set Ready */
82#define URMS_URCTS (1 << 4) /* Clear to Send */
83#define URMS_URDDCD (1 << 3) /* Delta Data Carrier Detect */
84#define URMS_URTERI (1 << 2) /* Trailing Edge Ring Indicator */
85#define URMS_URDDST (1 << 1) /* Delta Data Set Ready */
86#define URMS_URDCTS (1 << 0) /* Delta Clear to Send */
87
88/* Status Register */
89#define USR_UTI (1 << 0) /* Timeout Indication */
90
91
92#endif
diff --git a/include/asm-arm/arch-ks8695/regs-wan.h b/include/asm-arm/arch-ks8695/regs-wan.h
deleted file mode 100644
index 52e35b0d65e4..000000000000
--- a/include/asm-arm/arch-ks8695/regs-wan.h
+++ /dev/null
@@ -1,65 +0,0 @@
1/*
2 * include/asm-arm/arch-ks8695/regs-wan.h
3 *
4 * Copyright (C) 2006 Andrew Victor
5 *
6 * KS8695 - WAN Registers and bit definitions.
7 *
8 * This file is licensed under the terms of the GNU General Public
9 * License version 2. This program is licensed "as is" without any
10 * warranty of any kind, whether express or implied.
11 */
12
13#ifndef KS8695_WAN_H
14#define KS8695_WAN_H
15
16#define KS8695_WAN_OFFSET (0xF0000 + 0x6000)
17#define KS8695_WAN_VA (KS8695_IO_VA + KS8695_WAN_OFFSET)
18#define KS8695_WAN_PA (KS8695_IO_PA + KS8695_WAN_OFFSET)
19
20
21/*
22 * WAN registers
23 */
24#define KS8695_WMDTXC (0x00) /* DMA Transmit Control */
25#define KS8695_WMDRXC (0x04) /* DMA Receive Control */
26#define KS8695_WMDTSC (0x08) /* DMA Transmit Start Command */
27#define KS8695_WMDRSC (0x0c) /* DMA Receive Start Command */
28#define KS8695_WTDLB (0x10) /* Transmit Descriptor List Base Address */
29#define KS8695_WRDLB (0x14) /* Receive Descriptor List Base Address */
30#define KS8695_WMAL (0x18) /* MAC Station Address Low */
31#define KS8695_WMAH (0x1c) /* MAC Station Address High */
32#define KS8695_WMAAL_(n) (0x80 + ((n)*8)) /* MAC Additional Station Address (0..15) Low */
33#define KS8695_WMAAH_(n) (0x84 + ((n)*8)) /* MAC Additional Station Address (0..15) High */
34
35
36/* DMA Transmit Control Register */
37#define WMDTXC_WMTRST (1 << 31) /* Soft Reset */
38#define WMDTXC_WMTBS (0x3f << 24) /* Transmit Burst Size */
39#define WMDTXC_WMTUCG (1 << 18) /* Transmit UDP Checksum Generate */
40#define WMDTXC_WMTTCG (1 << 17) /* Transmit TCP Checksum Generate */
41#define WMDTXC_WMTICG (1 << 16) /* Transmit IP Checksum Generate */
42#define WMDTXC_WMTFCE (1 << 9) /* Transmit Flow Control Enable */
43#define WMDTXC_WMTLB (1 << 8) /* Loopback mode */
44#define WMDTXC_WMTEP (1 << 2) /* Transmit Enable Padding */
45#define WMDTXC_WMTAC (1 << 1) /* Transmit Add CRC */
46#define WMDTXC_WMTE (1 << 0) /* TX Enable */
47
48/* DMA Receive Control Register */
49#define WMDRXC_WMRBS (0x3f << 24) /* Receive Burst Size */
50#define WMDRXC_WMRUCC (1 << 18) /* Receive UDP Checksum check */
51#define WMDRXC_WMRTCG (1 << 17) /* Receive TCP Checksum check */
52#define WMDRXC_WMRICG (1 << 16) /* Receive IP Checksum check */
53#define WMDRXC_WMRFCE (1 << 9) /* Receive Flow Control Enable */
54#define WMDRXC_WMRB (1 << 6) /* Receive Broadcast */
55#define WMDRXC_WMRM (1 << 5) /* Receive Multicast */
56#define WMDRXC_WMRU (1 << 4) /* Receive Unicast */
57#define WMDRXC_WMRERR (1 << 3) /* Receive Error Frame */
58#define WMDRXC_WMRA (1 << 2) /* Receive All */
59#define WMDRXC_WMRE (1 << 0) /* RX Enable */
60
61/* Additional Station Address High */
62#define WMAAH_E (1 << 31) /* Address Enabled */
63
64
65#endif
diff --git a/include/asm-arm/arch-ks8695/system.h b/include/asm-arm/arch-ks8695/system.h
deleted file mode 100644
index 3bc28106d937..000000000000
--- a/include/asm-arm/arch-ks8695/system.h
+++ /dev/null
@@ -1,48 +0,0 @@
1/*
2 * include/asm-arm/arch-s3c2410/system.h
3 *
4 * Copyright (C) 2006 Simtec Electronics
5 * Ben Dooks <ben@simtec.co.uk>
6 *
7 * KS8695 - System function defines and includes
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12 */
13
14#ifndef __ASM_ARCH_SYSTEM_H
15#define __ASM_ARCH_SYSTEM_H
16
17#include <asm/io.h>
18#include <asm/arch/regs-timer.h>
19
20static void arch_idle(void)
21{
22 /*
23 * This should do all the clock switching
24 * and wait for interrupt tricks,
25 */
26 cpu_do_idle();
27
28}
29
30static void arch_reset(char mode)
31{
32 unsigned int reg;
33
34 if (mode == 's')
35 cpu_reset(0);
36
37 /* disable timer0 */
38 reg = __raw_readl(KS8695_TMR_VA + KS8695_TMCON);
39 __raw_writel(reg & ~TMCON_T0EN, KS8695_TMR_VA + KS8695_TMCON);
40
41 /* enable watchdog mode */
42 __raw_writel((10 << 8) | T0TC_WATCHDOG, KS8695_TMR_VA + KS8695_T0TC);
43
44 /* re-enable timer0 */
45 __raw_writel(reg | TMCON_T0EN, KS8695_TMR_VA + KS8695_TMCON);
46}
47
48#endif
diff --git a/include/asm-arm/arch-ks8695/timex.h b/include/asm-arm/arch-ks8695/timex.h
deleted file mode 100644
index 8320d528b903..000000000000
--- a/include/asm-arm/arch-ks8695/timex.h
+++ /dev/null
@@ -1,20 +0,0 @@
1/*
2 * include/asm-arm/arch-ks8695/timex.h
3 *
4 * Copyright (C) 2006 Simtec Electronics
5 * Ben Dooks <ben@simtec.co.uk>
6 *
7 * KS8695 - Time Parameters
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12 */
13
14#ifndef __ASM_ARCH_TIMEX_H
15#define __ASM_ARCH_TIMEX_H
16
17/* timers are derived from MCLK, which is 25MHz */
18#define CLOCK_TICK_RATE 25000000
19
20#endif
diff --git a/include/asm-arm/arch-ks8695/uncompress.h b/include/asm-arm/arch-ks8695/uncompress.h
deleted file mode 100644
index 733a50855b5d..000000000000
--- a/include/asm-arm/arch-ks8695/uncompress.h
+++ /dev/null
@@ -1,37 +0,0 @@
1/*
2 * include/asm-arm/arch-ks8695/uncompress.h
3 *
4 * Copyright (C) 2006 Ben Dooks <ben@simtec.co.uk>
5 * Copyright (C) 2006 Simtec Electronics
6 *
7 * KS8695 - Kernel uncompressor
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12 */
13
14#ifndef __ASM_ARCH_UNCOMPRESS_H
15#define __ASM_ARCH_UNCOMPRESS_H
16
17#include <asm/io.h>
18#include <asm/arch/regs-uart.h>
19
20static void putc(char c)
21{
22 while (!(__raw_readl(KS8695_UART_PA + KS8695_URLS) & URLS_URTHRE))
23 barrier();
24
25 __raw_writel(c, KS8695_UART_PA + KS8695_URTH);
26}
27
28static inline void flush(void)
29{
30 while (!(__raw_readl(KS8695_UART_PA + KS8695_URLS) & URLS_URTE))
31 barrier();
32}
33
34#define arch_decomp_setup()
35#define arch_decomp_wdog()
36
37#endif
diff --git a/include/asm-arm/arch-ks8695/vmalloc.h b/include/asm-arm/arch-ks8695/vmalloc.h
deleted file mode 100644
index d1d88e58117d..000000000000
--- a/include/asm-arm/arch-ks8695/vmalloc.h
+++ /dev/null
@@ -1,19 +0,0 @@
1/*
2 * include/asm-arm/arch-ks8695/vmalloc.h
3 *
4 * Copyright (C) 2006 Ben Dooks
5 * Copyright (C) 2006 Simtec Electronics <linux@simtec.co.uk>
6 *
7 * KS8695 vmalloc definition
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12 */
13
14#ifndef __ASM_ARCH_VMALLOC_H
15#define __ASM_ARCH_VMALLOC_H
16
17#define VMALLOC_END (KS8695_IO_VA & PGDIR_MASK)
18
19#endif
diff --git a/include/asm-arm/arch-l7200/aux_reg.h b/include/asm-arm/arch-l7200/aux_reg.h
deleted file mode 100644
index 5b4396de16a0..000000000000
--- a/include/asm-arm/arch-l7200/aux_reg.h
+++ /dev/null
@@ -1,28 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-l7200/aux_reg.h
3 *
4 * Copyright (C) 2000 Steve Hill (sjhill@cotw.com)
5 *
6 * Changelog:
7 * 08-02-2000 SJH Created file
8 */
9#ifndef _ASM_ARCH_AUXREG_H
10#define _ASM_ARCH_AUXREG_H
11
12#include <asm/hardware.h>
13
14#define l7200aux_reg *((volatile unsigned int *) (AUX_BASE))
15
16/*
17 * Auxillary register values
18 */
19#define AUX_CLEAR 0x00000000
20#define AUX_DIAG_LED_ON 0x00000002
21#define AUX_RTS_UART1 0x00000004
22#define AUX_DTR_UART1 0x00000008
23#define AUX_KBD_COLUMN_12_HIGH 0x00000010
24#define AUX_KBD_COLUMN_12_OFF 0x00000020
25#define AUX_KBD_COLUMN_13_HIGH 0x00000040
26#define AUX_KBD_COLUMN_13_OFF 0x00000080
27
28#endif
diff --git a/include/asm-arm/arch-l7200/debug-macro.S b/include/asm-arm/arch-l7200/debug-macro.S
deleted file mode 100644
index 846473318e8b..000000000000
--- a/include/asm-arm/arch-l7200/debug-macro.S
+++ /dev/null
@@ -1,40 +0,0 @@
1/* linux/include/asm-arm/arch-l7200/debug-macro.S
2 *
3 * Debugging macro include header
4 *
5 * Copyright (C) 1994-1999 Russell King
6 * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 *
12*/
13
14 .equ io_virt, IO_BASE
15 .equ io_phys, IO_START
16
17 .macro addruart,rx
18 mrc p15, 0, \rx, c1, c0
19 tst \rx, #1 @ MMU enabled?
20 moveq \rx, #io_phys @ physical base address
21 movne \rx, #io_virt @ virtual address
22 add \rx, \rx, #0x00044000 @ UART1
23@ add \rx, \rx, #0x00045000 @ UART2
24 .endm
25
26 .macro senduart,rd,rx
27 str \rd, [\rx, #0x0] @ UARTDR
28 .endm
29
30 .macro waituart,rd,rx
311001: ldr \rd, [\rx, #0x18] @ UARTFLG
32 tst \rd, #1 << 5 @ UARTFLGUTXFF - 1 when full
33 bne 1001b
34 .endm
35
36 .macro busyuart,rd,rx
371001: ldr \rd, [\rx, #0x18] @ UARTFLG
38 tst \rd, #1 << 3 @ UARTFLGUBUSY - 1 when busy
39 bne 1001b
40 .endm
diff --git a/include/asm-arm/arch-l7200/dma.h b/include/asm-arm/arch-l7200/dma.h
deleted file mode 100644
index 4c7eca63f035..000000000000
--- a/include/asm-arm/arch-l7200/dma.h
+++ /dev/null
@@ -1,23 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-l7200/dma.h
3 *
4 * Copyright (C) 2000 Steve Hill (sjhill@cotw.com)
5 *
6 * Changelog:
7 * 08-29-2000 SJH Created
8 */
9#ifndef __ASM_ARCH_DMA_H
10#define __ASM_ARCH_DMA_H
11
12/* DMA is not yet implemented! It should be the same as acorn, copy over.. */
13
14/*
15 * This is the maximum DMA address that can be DMAd to.
16 * There should not be more than (0xd0000000 - 0xc0000000)
17 * bytes of RAM.
18 */
19#define MAX_DMA_ADDRESS 0xd0000000
20
21#define DMA_S0 0
22
23#endif /* _ASM_ARCH_DMA_H */
diff --git a/include/asm-arm/arch-l7200/entry-macro.S b/include/asm-arm/arch-l7200/entry-macro.S
deleted file mode 100644
index 63411d3e9df4..000000000000
--- a/include/asm-arm/arch-l7200/entry-macro.S
+++ /dev/null
@@ -1,35 +0,0 @@
1/*
2 * include/asm-arm/arch-l7200/entry-macro.S
3 *
4 * Low-level IRQ helper macros for L7200-based platforms
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10#include <asm/hardware.h>
11
12 .equ irq_base_addr, IO_BASE_2
13
14 .macro disable_fiq
15 .endm
16
17 .macro get_irqnr_preamble, base, tmp
18 .endm
19
20 .macro arch_ret_to_user, tmp1, tmp2
21 .endm
22
23 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
24 mov \irqstat, #irq_base_addr @ Virt addr IRQ regs
25 add \irqstat, \irqstat, #0x00001000 @ Status reg
26 ldr \irqstat, [\irqstat, #0] @ get interrupts
27 mov \irqnr, #0
281001: tst \irqstat, #1
29 addeq \irqnr, \irqnr, #1
30 moveq \irqstat, \irqstat, lsr #1
31 tsteq \irqnr, #32
32 beq 1001b
33 teq \irqnr, #32
34 .endm
35
diff --git a/include/asm-arm/arch-l7200/gp_timers.h b/include/asm-arm/arch-l7200/gp_timers.h
deleted file mode 100644
index 9c4804d13578..000000000000
--- a/include/asm-arm/arch-l7200/gp_timers.h
+++ /dev/null
@@ -1,42 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-l7200/gp_timers.h
3 *
4 * Copyright (C) 2000 Steve Hill (sjhill@cotw.com)
5 *
6 * Changelog:
7 * 07-28-2000 SJH Created file
8 * 08-02-2000 SJH Used structure for registers
9 */
10#ifndef _ASM_ARCH_GPTIMERS_H
11#define _ASM_ARCH_GPTIMERS_H
12
13#include <asm/hardware.h>
14
15/*
16 * Layout of L7200 general purpose timer registers
17 */
18struct GPT_Regs {
19 unsigned int TIMERLOAD;
20 unsigned int TIMERVALUE;
21 unsigned int TIMERCONTROL;
22 unsigned int TIMERCLEAR;
23};
24
25#define GPT_BASE (IO_BASE_2 + 0x3000)
26#define l7200_timer1_regs ((volatile struct GPT_Regs *) (GPT_BASE))
27#define l7200_timer2_regs ((volatile struct GPT_Regs *) (GPT_BASE + 0x20))
28
29/*
30 * General register values
31 */
32#define GPT_PRESCALE_1 0x00000000
33#define GPT_PRESCALE_16 0x00000004
34#define GPT_PRESCALE_256 0x00000008
35#define GPT_MODE_FREERUN 0x00000000
36#define GPT_MODE_PERIODIC 0x00000040
37#define GPT_ENABLE 0x00000080
38#define GPT_BZTOG 0x00000100
39#define GPT_BZMOD 0x00000200
40#define GPT_LOAD_MASK 0x0000ffff
41
42#endif
diff --git a/include/asm-arm/arch-l7200/gpio.h b/include/asm-arm/arch-l7200/gpio.h
deleted file mode 100644
index 0b63e4239bdd..000000000000
--- a/include/asm-arm/arch-l7200/gpio.h
+++ /dev/null
@@ -1,105 +0,0 @@
1/****************************************************************************/
2/*
3 * linux/include/asm-arm/arch-l7200/gpio.h
4 *
5 * Registers and helper functions for the L7200 Link-Up Systems
6 * GPIO.
7 *
8 * (C) Copyright 2000, S A McConnell (samcconn@cotw.com)
9 *
10 * This file is subject to the terms and conditions of the GNU General Public
11 * License. See the file COPYING in the main directory of this archive for
12 * more details.
13 */
14
15/****************************************************************************/
16
17#define GPIO_OFF 0x00005000 /* Offset from IO_START to the GPIO reg's. */
18
19/* IO_START and IO_BASE are defined in hardware.h */
20
21#define GPIO_START (IO_START_2 + GPIO_OFF) /* Physical addr of the GPIO reg. */
22#define GPIO_BASE (IO_BASE_2 + GPIO_OFF) /* Virtual addr of the GPIO reg. */
23
24/* Offsets from the start of the GPIO for all the registers. */
25#define PADR_OFF 0x000
26#define PADDR_OFF 0x004
27#define PASBSR_OFF 0x008
28#define PAEENR_OFF 0x00c
29#define PAESNR_OFF 0x010
30#define PAESTR_OFF 0x014
31#define PAIMR_OFF 0x018
32#define PAINT_OFF 0x01c
33
34#define PBDR_OFF 0x020
35#define PBDDR_OFF 0x024
36#define PBSBSR_OFF 0x028
37#define PBIMR_OFF 0x038
38#define PBINT_OFF 0x03c
39
40#define PCDR_OFF 0x040
41#define PCDDR_OFF 0x044
42#define PCSBSR_OFF 0x048
43#define PCIMR_OFF 0x058
44#define PCINT_OFF 0x05c
45
46#define PDDR_OFF 0x060
47#define PDDDR_OFF 0x064
48#define PDSBSR_OFF 0x068
49#define PDEENR_OFF 0x06c
50#define PDESNR_OFF 0x070
51#define PDESTR_OFF 0x074
52#define PDIMR_OFF 0x078
53#define PDINT_OFF 0x07c
54
55#define PEDR_OFF 0x080
56#define PEDDR_OFF 0x084
57#define PESBSR_OFF 0x088
58#define PEEENR_OFF 0x08c
59#define PEESNR_OFF 0x090
60#define PEESTR_OFF 0x094
61#define PEIMR_OFF 0x098
62#define PEINT_OFF 0x09c
63
64/* Define the GPIO registers for use by device drivers and the kernel. */
65#define PADR (*(volatile unsigned long *)(GPIO_BASE+PADR_OFF))
66#define PADDR (*(volatile unsigned long *)(GPIO_BASE+PADDR_OFF))
67#define PASBSR (*(volatile unsigned long *)(GPIO_BASE+PASBSR_OFF))
68#define PAEENR (*(volatile unsigned long *)(GPIO_BASE+PAEENR_OFF))
69#define PAESNR (*(volatile unsigned long *)(GPIO_BASE+PAESNR_OFF))
70#define PAESTR (*(volatile unsigned long *)(GPIO_BASE+PAESTR_OFF))
71#define PAIMR (*(volatile unsigned long *)(GPIO_BASE+PAIMR_OFF))
72#define PAINT (*(volatile unsigned long *)(GPIO_BASE+PAINT_OFF))
73
74#define PBDR (*(volatile unsigned long *)(GPIO_BASE+PBDR_OFF))
75#define PBDDR (*(volatile unsigned long *)(GPIO_BASE+PBDDR_OFF))
76#define PBSBSR (*(volatile unsigned long *)(GPIO_BASE+PBSBSR_OFF))
77#define PBIMR (*(volatile unsigned long *)(GPIO_BASE+PBIMR_OFF))
78#define PBINT (*(volatile unsigned long *)(GPIO_BASE+PBINT_OFF))
79
80#define PCDR (*(volatile unsigned long *)(GPIO_BASE+PCDR_OFF))
81#define PCDDR (*(volatile unsigned long *)(GPIO_BASE+PCDDR_OFF))
82#define PCSBSR (*(volatile unsigned long *)(GPIO_BASE+PCSBSR_OFF))
83#define PCIMR (*(volatile unsigned long *)(GPIO_BASE+PCIMR_OFF))
84#define PCINT (*(volatile unsigned long *)(GPIO_BASE+PCINT_OFF))
85
86#define PDDR (*(volatile unsigned long *)(GPIO_BASE+PDDR_OFF))
87#define PDDDR (*(volatile unsigned long *)(GPIO_BASE+PDDDR_OFF))
88#define PDSBSR (*(volatile unsigned long *)(GPIO_BASE+PDSBSR_OFF))
89#define PDEENR (*(volatile unsigned long *)(GPIO_BASE+PDEENR_OFF))
90#define PDESNR (*(volatile unsigned long *)(GPIO_BASE+PDESNR_OFF))
91#define PDESTR (*(volatile unsigned long *)(GPIO_BASE+PDESTR_OFF))
92#define PDIMR (*(volatile unsigned long *)(GPIO_BASE+PDIMR_OFF))
93#define PDINT (*(volatile unsigned long *)(GPIO_BASE+PDINT_OFF))
94
95#define PEDR (*(volatile unsigned long *)(GPIO_BASE+PEDR_OFF))
96#define PEDDR (*(volatile unsigned long *)(GPIO_BASE+PEDDR_OFF))
97#define PESBSR (*(volatile unsigned long *)(GPIO_BASE+PESBSR_OFF))
98#define PEEENR (*(volatile unsigned long *)(GPIO_BASE+PEEENR_OFF))
99#define PEESNR (*(volatile unsigned long *)(GPIO_BASE+PEESNR_OFF))
100#define PEESTR (*(volatile unsigned long *)(GPIO_BASE+PEESTR_OFF))
101#define PEIMR (*(volatile unsigned long *)(GPIO_BASE+PEIMR_OFF))
102#define PEINT (*(volatile unsigned long *)(GPIO_BASE+PEINT_OFF))
103
104#define VEE_EN 0x02
105#define BACKLIGHT_EN 0x04
diff --git a/include/asm-arm/arch-l7200/hardware.h b/include/asm-arm/arch-l7200/hardware.h
deleted file mode 100644
index 2ab43f3a4a8d..000000000000
--- a/include/asm-arm/arch-l7200/hardware.h
+++ /dev/null
@@ -1,57 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-l7200/hardware.h
3 *
4 * Copyright (C) 2000 Rob Scott (rscott@mtrob.fdns.net)
5 * Steve Hill (sjhill@cotw.com)
6 *
7 * This file contains the hardware definitions for the
8 * LinkUp Systems L7200 SOC development board.
9 *
10 * Changelog:
11 * 02-01-2000 RS Created L7200 version, derived from rpc code
12 * 03-21-2000 SJH Cleaned up file
13 * 04-21-2000 RS Changed mapping of I/O in virtual space
14 * 04-25-2000 SJH Removed unused symbols and such
15 * 05-05-2000 SJH Complete rewrite
16 * 07-31-2000 SJH Added undocumented debug auxillary port to
17 * get at last two columns for keyboard driver
18 */
19#ifndef __ASM_ARCH_HARDWARE_H
20#define __ASM_ARCH_HARDWARE_H
21
22/* Hardware addresses of major areas.
23 * *_START is the physical address
24 * *_SIZE is the size of the region
25 * *_BASE is the virtual address
26 */
27#define RAM_START 0xf0000000
28#define RAM_SIZE 0x02000000
29#define RAM_BASE 0xc0000000
30
31#define IO_START 0x80000000 /* I/O */
32#define IO_SIZE 0x01000000
33#define IO_BASE 0xd0000000
34
35#define IO_START_2 0x90000000 /* I/O */
36#define IO_SIZE_2 0x01000000
37#define IO_BASE_2 0xd1000000
38
39#define AUX_START 0x1a000000 /* AUX PORT */
40#define AUX_SIZE 0x01000000
41#define AUX_BASE 0xd2000000
42
43#define FLASH1_START 0x00000000 /* FLASH BANK 1 */
44#define FLASH1_SIZE 0x01000000
45#define FLASH1_BASE 0xd3000000
46
47#define FLASH2_START 0x10000000 /* FLASH BANK 2 */
48#define FLASH2_SIZE 0x01000000
49#define FLASH2_BASE 0xd4000000
50
51#define ISA_START 0x20000000 /* ISA */
52#define ISA_SIZE 0x20000000
53#define ISA_BASE 0xe0000000
54
55#define PCIO_BASE IO_BASE
56
57#endif
diff --git a/include/asm-arm/arch-l7200/io.h b/include/asm-arm/arch-l7200/io.h
deleted file mode 100644
index 645dbdfb3908..000000000000
--- a/include/asm-arm/arch-l7200/io.h
+++ /dev/null
@@ -1,27 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-l7200/io.h
3 *
4 * Copyright (C) 2000 Steve Hill (sjhill@cotw.com)
5 *
6 * Changelog:
7 * 03-21-2000 SJH Created from linux/include/asm-arm/arch-nexuspci/io.h
8 * 08-31-2000 SJH Added in IO functions necessary for new drivers
9 */
10#ifndef __ASM_ARM_ARCH_IO_H
11#define __ASM_ARM_ARCH_IO_H
12
13#include <asm/hardware.h>
14
15#define IO_SPACE_LIMIT 0xffffffff
16
17/*
18 * There are not real ISA nor PCI buses, so we fake it.
19 */
20static inline void __iomem *__io(unsigned long addr)
21{
22 return (void __iomem *)addr;
23}
24#define __io(a) __io(a)
25#define __mem_pci(a) (a)
26
27#endif
diff --git a/include/asm-arm/arch-l7200/irqs.h b/include/asm-arm/arch-l7200/irqs.h
deleted file mode 100644
index 7120c016e29e..000000000000
--- a/include/asm-arm/arch-l7200/irqs.h
+++ /dev/null
@@ -1,56 +0,0 @@
1/*
2 * include/asm-arm/arch-l7200/irqs.h
3 *
4 * Copyright (C) 2000 Rob Scott (rscott@mtrob.fdns.net)
5 * Steve Hill (sjhill@cotw.com)
6 *
7 * Changelog:
8 * 01-02-2000 RS Create l7200 version
9 * 03-28-2000 SJH Removed unused interrupt
10 * 07-28-2000 SJH Added pseudo-keyboard interrupt
11 */
12
13/*
14 * NOTE: The second timer (Timer 2) is used as the keyboard
15 * interrupt when the keyboard driver is enabled.
16 */
17
18#define NR_IRQS 32
19
20#define IRQ_STWDOG 0 /* Watchdog timer */
21#define IRQ_PROG 1 /* Programmable interrupt */
22#define IRQ_DEBUG_RX 2 /* Comm Rx debug */
23#define IRQ_DEBUG_TX 3 /* Comm Tx debug */
24#define IRQ_GCTC1 4 /* Timer 1 */
25#define IRQ_GCTC2 5 /* Timer 2 / Keyboard */
26#define IRQ_DMA 6 /* DMA controller */
27#define IRQ_CLCD 7 /* Color LCD controller */
28#define IRQ_SM_RX 8 /* Smart card */
29#define IRQ_SM_TX 9 /* Smart cart */
30#define IRQ_SM_RST 10 /* Smart card */
31#define IRQ_SIB 11 /* Serial Interface Bus */
32#define IRQ_MMC 12 /* MultiMediaCard */
33#define IRQ_SSP1 13 /* Synchronous Serial Port 1 */
34#define IRQ_SSP2 14 /* Synchronous Serial Port 1 */
35#define IRQ_SPI 15 /* SPI slave */
36#define IRQ_UART_1 16 /* UART 1 */
37#define IRQ_UART_2 17 /* UART 2 */
38#define IRQ_IRDA 18 /* IRDA */
39#define IRQ_RTC_TICK 19 /* Real Time Clock tick */
40#define IRQ_RTC_ALARM 20 /* Real Time Clock alarm */
41#define IRQ_GPIO 21 /* General Purpose IO */
42#define IRQ_GPIO_DMA 22 /* General Purpose IO, DMA */
43#define IRQ_M2M 23 /* Memory to memory DMA */
44#define IRQ_RESERVED 24 /* RESERVED, don't use */
45#define IRQ_INTF 25 /* External active low interrupt */
46#define IRQ_INT0 26 /* External active low interrupt */
47#define IRQ_INT1 27 /* External active low interrupt */
48#define IRQ_INT2 28 /* External active low interrupt */
49#define IRQ_UCB1200 29 /* Interrupt generated by UCB1200*/
50#define IRQ_BAT_LO 30 /* Low batery or external power */
51#define IRQ_MEDIA_CHG 31 /* Media change interrupt */
52
53/*
54 * This is the offset of the FIQ "IRQ" numbers
55 */
56#define FIQ_START 64
diff --git a/include/asm-arm/arch-l7200/memory.h b/include/asm-arm/arch-l7200/memory.h
deleted file mode 100644
index 402df637e740..000000000000
--- a/include/asm-arm/arch-l7200/memory.h
+++ /dev/null
@@ -1,29 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-l7200/memory.h
3 *
4 * Copyright (c) 2000 Steve Hill (sjhill@cotw.com)
5 * Copyright (c) 2000 Rob Scott (rscott@mtrob.fdns.net)
6 *
7 * Changelog:
8 * 03-13-2000 SJH Created
9 * 04-13-2000 RS Changed bus macros for new addr
10 * 05-03-2000 SJH Removed bus macros and fixed virt_to_phys macro
11 */
12#ifndef __ASM_ARCH_MEMORY_H
13#define __ASM_ARCH_MEMORY_H
14
15/*
16 * Physical DRAM offset on the L7200 SDB.
17 */
18#define PHYS_OFFSET UL(0xf0000000)
19
20#define __virt_to_bus(x) __virt_to_phys(x)
21#define __bus_to_virt(x) __phys_to_virt(x)
22
23/*
24 * Cache flushing area - ROM
25 */
26#define FLUSH_BASE_PHYS 0x40000000
27#define FLUSH_BASE 0xdf000000
28
29#endif
diff --git a/include/asm-arm/arch-l7200/pmpcon.h b/include/asm-arm/arch-l7200/pmpcon.h
deleted file mode 100644
index 730056c194be..000000000000
--- a/include/asm-arm/arch-l7200/pmpcon.h
+++ /dev/null
@@ -1,46 +0,0 @@
1/****************************************************************************/
2/*
3 * linux/include/asm-arm/arch-l7200/pmpcon.h
4 *
5 * Registers and helper functions for the L7200 Link-Up Systems
6 * DC/DC converter register.
7 *
8 * (C) Copyright 2000, S A McConnell (samcconn@cotw.com)
9 *
10 * This file is subject to the terms and conditions of the GNU General Public
11 * License. See the file COPYING in the main directory of this archive for
12 * more details.
13 */
14
15/****************************************************************************/
16
17#define PMPCON_OFF 0x00006000 /* Offset from IO_START_2. */
18
19/* IO_START_2 and IO_BASE_2 are defined in hardware.h */
20
21#define PMPCON_START (IO_START_2 + PMPCON_OFF) /* Physical address of reg. */
22#define PMPCON_BASE (IO_BASE_2 + PMPCON_OFF) /* Virtual address of reg. */
23
24
25#define PMPCON (*(volatile unsigned int *)(PMPCON_BASE))
26
27#define PWM2_50CYCLE 0x800
28#define CONTRAST 0x9
29
30#define PWM1H (CONTRAST)
31#define PWM1L (CONTRAST << 4)
32
33#define PMPCON_VALUE (PWM2_50CYCLE | PWM1L | PWM1H)
34
35/* PMPCON = 0x811; // too light and fuzzy
36 * PMPCON = 0x844;
37 * PMPCON = 0x866; // better color poor depth
38 * PMPCON = 0x888; // Darker but better depth
39 * PMPCON = 0x899; // Darker even better depth
40 * PMPCON = 0x8aa; // too dark even better depth
41 * PMPCON = 0X8cc; // Way too dark
42 */
43
44/* As CONTRAST value increases the greater the depth perception and
45 * the darker the colors.
46 */
diff --git a/include/asm-arm/arch-l7200/pmu.h b/include/asm-arm/arch-l7200/pmu.h
deleted file mode 100644
index 57faea76d1b3..000000000000
--- a/include/asm-arm/arch-l7200/pmu.h
+++ /dev/null
@@ -1,125 +0,0 @@
1/****************************************************************************/
2/*
3 * linux/include/asm-arm/arch-l7200/pmu.h
4 *
5 * Registers and helper functions for the L7200 Link-Up Systems
6 * Power Management Unit (PMU).
7 *
8 * (C) Copyright 2000, S A McConnell (samcconn@cotw.com)
9 *
10 * This file is subject to the terms and conditions of the GNU General Public
11 * License. See the file COPYING in the main directory of this archive for
12 * more details.
13 */
14
15/****************************************************************************/
16
17#define PMU_OFF 0x00050000 /* Offset from IO_START to the PMU registers. */
18
19/* IO_START and IO_BASE are defined in hardware.h */
20
21#define PMU_START (IO_START + PMU_OFF) /* Physical addr. of the PMU reg. */
22#define PMU_BASE (IO_BASE + PMU_OFF) /* Virtual addr. of the PMU reg. */
23
24
25/* Define the PMU registers for use by device drivers and the kernel. */
26
27typedef struct {
28 unsigned int CURRENT; /* Current configuration register */
29 unsigned int NEXT; /* Next configuration register */
30 unsigned int reserved;
31 unsigned int RUN; /* Run configuration register */
32 unsigned int COMM; /* Configuration command register */
33 unsigned int SDRAM; /* SDRAM configuration bypass register */
34} pmu_interface;
35
36#define PMU ((volatile pmu_interface *)(PMU_BASE))
37
38
39/* Macro's for reading the common register fields. */
40
41#define GET_TRANSOP(reg) ((reg >> 25) & 0x03) /* Bits 26-25 */
42#define GET_OSCEN(reg) ((reg >> 16) & 0x01)
43#define GET_OSCMUX(reg) ((reg >> 15) & 0x01)
44#define GET_PLLMUL(reg) ((reg >> 9) & 0x3f) /* Bits 14-9 */
45#define GET_PLLEN(reg) ((reg >> 8) & 0x01)
46#define GET_PLLMUX(reg) ((reg >> 7) & 0x01)
47#define GET_BCLK_DIV(reg) ((reg >> 3) & 0x03) /* Bits 4-3 */
48#define GET_SDRB_SEL(reg) ((reg >> 2) & 0x01)
49#define GET_SDRF_SEL(reg) ((reg >> 1) & 0x01)
50#define GET_FASTBUS(reg) (reg & 0x1)
51
52/* CFG_NEXT register */
53
54#define CFG_NEXT_CLOCKRECOVERY ((PMU->NEXT >> 18) & 0x7f) /* Bits 24-18 */
55#define CFG_NEXT_INTRET ((PMU->NEXT >> 17) & 0x01)
56#define CFG_NEXT_SDR_STOP ((PMU->NEXT >> 6) & 0x01)
57#define CFG_NEXT_SYSCLKEN ((PMU->NEXT >> 5) & 0x01)
58
59/* Useful field values that can be used to construct the
60 * CFG_NEXT and CFG_RUN registers.
61 */
62
63#define TRANSOP_NOP 0<<25 /* NOCHANGE_NOSTALL */
64#define NOCHANGE_STALL 1<<25
65#define CHANGE_NOSTALL 2<<25
66#define CHANGE_STALL 3<<25
67
68#define INTRET 1<<17
69#define OSCEN 1<<16
70#define OSCMUX 1<<15
71
72/* PLL frequencies */
73
74#define PLLMUL_0 0<<9 /* 3.6864 MHz */
75#define PLLMUL_1 1<<9 /* ?????? MHz */
76#define PLLMUL_5 5<<9 /* 18.432 MHz */
77#define PLLMUL_10 10<<9 /* 36.864 MHz */
78#define PLLMUL_18 18<<9 /* ?????? MHz */
79#define PLLMUL_20 20<<9 /* 73.728 MHz */
80#define PLLMUL_32 32<<9 /* ?????? MHz */
81#define PLLMUL_35 35<<9 /* 129.024 MHz */
82#define PLLMUL_36 36<<9 /* ?????? MHz */
83#define PLLMUL_39 39<<9 /* ?????? MHz */
84#define PLLMUL_40 40<<9 /* 147.456 MHz */
85
86/* Clock recovery times */
87
88#define CRCLOCK_1 1<<18
89#define CRCLOCK_2 2<<18
90#define CRCLOCK_4 4<<18
91#define CRCLOCK_8 8<<18
92#define CRCLOCK_16 16<<18
93#define CRCLOCK_32 32<<18
94#define CRCLOCK_63 63<<18
95#define CRCLOCK_127 127<<18
96
97#define PLLEN 1<<8
98#define PLLMUX 1<<7
99#define SDR_STOP 1<<6
100#define SYSCLKEN 1<<5
101
102#define BCLK_DIV_4 2<<3
103#define BCLK_DIV_2 1<<3
104#define BCLK_DIV_1 0<<3
105
106#define SDRB_SEL 1<<2
107#define SDRF_SEL 1<<1
108#define FASTBUS 1<<0
109
110
111/* CFG_SDRAM */
112
113#define SDRREFFQ 1<<0 /* Only if SDRSTOPRQ is not set. */
114#define SDRREFACK 1<<1 /* Read-only */
115#define SDRSTOPRQ 1<<2 /* Only if SDRREFFQ is not set. */
116#define SDRSTOPACK 1<<3 /* Read-only */
117#define PICEN 1<<4 /* Enable Co-procesor */
118#define PICTEST 1<<5
119
120#define GET_SDRREFFQ ((PMU->SDRAM >> 0) & 0x01)
121#define GET_SDRREFACK ((PMU->SDRAM >> 1) & 0x01) /* Read-only */
122#define GET_SDRSTOPRQ ((PMU->SDRAM >> 2) & 0x01)
123#define GET_SDRSTOPACK ((PMU->SDRAM >> 3) & 0x01) /* Read-only */
124#define GET_PICEN ((PMU->SDRAM >> 4) & 0x01)
125#define GET_PICTEST ((PMU->SDRAM >> 5) & 0x01)
diff --git a/include/asm-arm/arch-l7200/serial.h b/include/asm-arm/arch-l7200/serial.h
deleted file mode 100644
index defb8b7fca73..000000000000
--- a/include/asm-arm/arch-l7200/serial.h
+++ /dev/null
@@ -1,37 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-l7200/serial.h
3 *
4 * Copyright (c) 2000 Rob Scott (rscott@mtrob.fdns.net)
5 * Steve Hill (sjhill@cotw.com)
6 *
7 * Changelog:
8 * 03-20-2000 SJH Created
9 * 03-26-2000 SJH Added flags for serial ports
10 * 03-27-2000 SJH Corrected BASE_BAUD value
11 * 04-14-2000 RS Made register addr dependent on IO_BASE
12 * 05-03-2000 SJH Complete rewrite
13 * 05-09-2000 SJH Stripped out architecture specific serial stuff
14 * and placed it in a separate file
15 * 07-28-2000 SJH Moved base baud rate variable
16 */
17#ifndef __ASM_ARCH_SERIAL_H
18#define __ASM_ARCH_SERIAL_H
19
20/*
21 * This assumes you have a 3.6864 MHz clock for your UART.
22 */
23#define BASE_BAUD 3686400
24
25/*
26 * Standard COM flags
27 */
28#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST)
29
30#define STD_SERIAL_PORT_DEFNS \
31 /* MAGIC UART CLK PORT IRQ FLAGS */ \
32 { 0, BASE_BAUD, UART1_BASE, IRQ_UART_1, STD_COM_FLAGS }, /* ttyLU0 */ \
33 { 0, BASE_BAUD, UART2_BASE, IRQ_UART_2, STD_COM_FLAGS }, /* ttyLU1 */ \
34
35#define EXTRA_SERIAL_PORT_DEFNS
36
37#endif
diff --git a/include/asm-arm/arch-l7200/serial_l7200.h b/include/asm-arm/arch-l7200/serial_l7200.h
deleted file mode 100644
index b1008a9d23e5..000000000000
--- a/include/asm-arm/arch-l7200/serial_l7200.h
+++ /dev/null
@@ -1,101 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-l7200/serial_l7200.h
3 *
4 * Copyright (c) 2000 Steven Hill (sjhill@cotw.com)
5 *
6 * Changelog:
7 * 05-09-2000 SJH Created
8 */
9#ifndef __ASM_ARCH_SERIAL_L7200_H
10#define __ASM_ARCH_SERIAL_L7200_H
11
12#include <asm/arch/memory.h>
13
14/*
15 * This assumes you have a 3.6864 MHz clock for your UART.
16 */
17#define BASE_BAUD 3686400
18
19/*
20 * UART base register addresses
21 */
22#define UART1_BASE (IO_BASE + 0x00044000)
23#define UART2_BASE (IO_BASE + 0x00045000)
24
25/*
26 * UART register offsets
27 */
28#define UARTDR 0x00 /* Tx/Rx data */
29#define RXSTAT 0x04 /* Rx status */
30#define H_UBRLCR 0x08 /* mode register high */
31#define M_UBRLCR 0x0C /* mode reg mid (MSB of baud)*/
32#define L_UBRLCR 0x10 /* mode reg low (LSB of baud)*/
33#define UARTCON 0x14 /* control register */
34#define UARTFLG 0x18 /* flag register */
35#define UARTINTSTAT 0x1C /* FIFO IRQ status register */
36#define UARTINTMASK 0x20 /* FIFO IRQ mask register */
37
38/*
39 * UART baud rate register values
40 */
41#define BR_110 0x827
42#define BR_1200 0x06e
43#define BR_2400 0x05f
44#define BR_4800 0x02f
45#define BR_9600 0x017
46#define BR_14400 0x00f
47#define BR_19200 0x00b
48#define BR_38400 0x005
49#define BR_57600 0x003
50#define BR_76800 0x002
51#define BR_115200 0x001
52
53/*
54 * Receiver status register (RXSTAT) mask values
55 */
56#define RXSTAT_NO_ERR 0x00 /* No error */
57#define RXSTAT_FRM_ERR 0x01 /* Framing error */
58#define RXSTAT_PAR_ERR 0x02 /* Parity error */
59#define RXSTAT_OVR_ERR 0x04 /* Overrun error */
60
61/*
62 * High byte of UART bit rate and line control register (H_UBRLCR) values
63 */
64#define UBRLCR_BRK 0x01 /* generate break on tx */
65#define UBRLCR_PEN 0x02 /* enable parity */
66#define UBRLCR_PDIS 0x00 /* disable parity */
67#define UBRLCR_EVEN 0x04 /* 1= even parity,0 = odd parity */
68#define UBRLCR_STP2 0x08 /* transmit 2 stop bits */
69#define UBRLCR_FIFO 0x10 /* enable FIFO */
70#define UBRLCR_LEN5 0x60 /* word length5 */
71#define UBRLCR_LEN6 0x40 /* word length6 */
72#define UBRLCR_LEN7 0x20 /* word length7 */
73#define UBRLCR_LEN8 0x00 /* word length8 */
74
75/*
76 * UART control register (UARTCON) values
77 */
78#define UARTCON_UARTEN 0x01 /* Enable UART */
79#define UARTCON_DMAONERR 0x08 /* Mask RxDmaRq when errors occur */
80
81/*
82 * UART flag register (UARTFLG) mask values
83 */
84#define UARTFLG_UTXFF 0x20 /* Transmit FIFO full */
85#define UARTFLG_URXFE 0x10 /* Receiver FIFO empty */
86#define UARTFLG_UBUSY 0x08 /* Transmitter busy */
87#define UARTFLG_DCD 0x04 /* Data carrier detect */
88#define UARTFLG_DSR 0x02 /* Data set ready */
89#define UARTFLG_CTS 0x01 /* Clear to send */
90
91/*
92 * UART interrupt status/clear registers (UARTINTSTAT/CLR) values
93 */
94#define UART_TXINT 0x01 /* TX interrupt */
95#define UART_RXINT 0x02 /* RX interrupt */
96#define UART_RXERRINT 0x04 /* RX error interrupt */
97#define UART_MSINT 0x08 /* Modem Status interrupt */
98#define UART_UDINT 0x10 /* UART Disabled interrupt */
99#define UART_ALLIRQS 0x1f /* All interrupts */
100
101#endif
diff --git a/include/asm-arm/arch-l7200/sib.h b/include/asm-arm/arch-l7200/sib.h
deleted file mode 100644
index bf4364ee2535..000000000000
--- a/include/asm-arm/arch-l7200/sib.h
+++ /dev/null
@@ -1,119 +0,0 @@
1/****************************************************************************/
2/*
3 * linux/include/asm-arm/arch-l7200/sib.h
4 *
5 * Registers and helper functions for the Serial Interface Bus.
6 *
7 * (C) Copyright 2000, S A McConnell (samcconn@cotw.com)
8 *
9 * This file is subject to the terms and conditions of the GNU General Public
10 * License. See the file COPYING in the main directory of this archive for
11 * more details.
12 */
13
14/****************************************************************************/
15
16#define SIB_OFF 0x00040000 /* Offset from IO_START to the SIB reg's. */
17
18/* IO_START and IO_BASE are defined in hardware.h */
19
20#define SIB_START (IO_START + SIB_OFF) /* Physical addr of the SIB reg. */
21#define SIB_BASE (IO_BASE + SIB_OFF) /* Virtual addr of the SIB reg. */
22
23/* Offsets from the start of the SIB for all the registers. */
24
25/* Define the SIB registers for use by device drivers and the kernel. */
26
27typedef struct
28{
29 unsigned int MCCR; /* SIB Control Register Offset: 0x00 */
30 unsigned int RES1; /* Reserved Offset: 0x04 */
31 unsigned int MCDR0; /* SIB Data Register 0 Offset: 0x08 */
32 unsigned int MCDR1; /* SIB Data Register 1 Offset: 0x0c */
33 unsigned int MCDR2; /* SIB Data Register 2 (UCB1x00) Offset: 0x10 */
34 unsigned int RES2; /* Reserved Offset: 0x14 */
35 unsigned int MCSR; /* SIB Status Register Offset: 0x18 */
36} SIB_Interface;
37
38#define SIB ((volatile SIB_Interface *) (SIB_BASE))
39
40/* MCCR */
41
42#define INTERNAL_FREQ 9216000 /* Hertz */
43#define AUDIO_FREQ 5000 /* Hertz */
44#define TELECOM_FREQ 5000 /* Hertz */
45
46#define AUDIO_DIVIDE (INTERNAL_FREQ / (32 * AUDIO_FREQ))
47#define TELECOM_DIVIDE (INTERNAL_FREQ / (32 * TELECOM_FREQ))
48
49#define MCCR_ASD57 AUDIO_DIVIDE
50#define MCCR_TSD57 (TELECOM_DIVIDE << 8)
51#define MCCR_MCE (1 << 16) /* SIB enable */
52#define MCCR_ECS (1 << 17) /* External Clock Select */
53#define MCCR_ADM (1 << 18) /* A/D Data Sampling */
54#define MCCR_PMC (1 << 26) /* PIN Multiplexer Control */
55
56
57#define GET_ASD ((SIB->MCCR >> 0) & 0x3f) /* Audio Sample Rate Div. */
58#define GET_TSD ((SIB->MCCR >> 8) & 0x3f) /* Telcom Sample Rate Div. */
59#define GET_MCE ((SIB->MCCR >> 16) & 0x01) /* SIB Enable */
60#define GET_ECS ((SIB->MCCR >> 17) & 0x01) /* External Clock Select */
61#define GET_ADM ((SIB->MCCR >> 18) & 0x01) /* A/D Data Sampling Mode */
62#define GET_TTM ((SIB->MCCR >> 19) & 0x01) /* Telco Trans. FIFO I mask */
63#define GET_TRM ((SIB->MCCR >> 20) & 0x01) /* Telco Recv. FIFO I mask */
64#define GET_ATM ((SIB->MCCR >> 21) & 0x01) /* Audio Trans. FIFO I mask */
65#define GET_ARM ((SIB->MCCR >> 22) & 0x01) /* Audio Recv. FIFO I mask */
66#define GET_LBM ((SIB->MCCR >> 23) & 0x01) /* Loop Back Mode */
67#define GET_ECP ((SIB->MCCR >> 24) & 0x03) /* Extern. Clck Prescale sel */
68#define GET_PMC ((SIB->MCCR >> 26) & 0x01) /* PIN Multiplexer Control */
69#define GET_ERI ((SIB->MCCR >> 27) & 0x01) /* External Read Interrupt */
70#define GET_EWI ((SIB->MCCR >> 28) & 0x01) /* External Write Interrupt */
71
72/* MCDR0 */
73
74#define AUDIO_RECV ((SIB->MCDR0 >> 4) & 0xfff)
75#define AUDIO_WRITE(v) ((SIB->MCDR0 = (v & 0xfff) << 4))
76
77/* MCDR1 */
78
79#define TELECOM_RECV ((SIB->MCDR1 >> 2) & 032fff)
80#define TELECOM_WRITE(v) ((SIB->MCDR1 = (v & 0x3fff) << 2))
81
82
83/* MCSR */
84
85#define MCSR_ATU (1 << 4) /* Audio Transmit FIFO Underrun */
86#define MCSR_ARO (1 << 5) /* Audio Receive FIFO Underrun */
87#define MCSR_TTU (1 << 6) /* TELECOM Transmit FIFO Underrun */
88#define MCSR_TRO (1 << 7) /* TELECOM Receive FIFO Underrun */
89
90#define MCSR_CLEAR_UNDERUN_BITS (MCSR_ATU | MCSR_ARO | MCSR_TTU | MCSR_TRO)
91
92
93#define GET_ATS ((SIB->MCSR >> 0) & 0x01) /* Audio Transmit FIFO Service Req*/
94#define GET_ARS ((SIB->MCSR >> 1) & 0x01) /* Audio Recv FIFO Service Request*/
95#define GET_TTS ((SIB->MCSR >> 2) & 0x01) /* TELECOM Transmit FIFO Flag */
96#define GET_TRS ((SIB->MCSR >> 3) & 0x01) /* TELECOM Recv FIFO Service Req. */
97#define GET_ATU ((SIB->MCSR >> 4) & 0x01) /* Audio Transmit FIFO Underrun */
98#define GET_ARO ((SIB->MCSR >> 5) & 0x01) /* Audio Receive FIFO Underrun */
99#define GET_TTU ((SIB->MCSR >> 6) & 0x01) /* TELECOM Transmit FIFO Underrun */
100#define GET_TRO ((SIB->MCSR >> 7) & 0x01) /* TELECOM Receive FIFO Underrun */
101#define GET_ANF ((SIB->MCSR >> 8) & 0x01) /* Audio Transmit FIFO not full */
102#define GET_ANE ((SIB->MCSR >> 9) & 0x01) /* Audio Receive FIFO not empty */
103#define GET_TNF ((SIB->MCSR >> 10) & 0x01) /* Telecom Transmit FIFO not full */
104#define GET_TNE ((SIB->MCSR >> 11) & 0x01) /* Telecom Receive FIFO not empty */
105#define GET_CWC ((SIB->MCSR >> 12) & 0x01) /* Codec Write Complete */
106#define GET_CRC ((SIB->MCSR >> 13) & 0x01) /* Codec Read Complete */
107#define GET_ACE ((SIB->MCSR >> 14) & 0x01) /* Audio Codec Enabled */
108#define GET_TCE ((SIB->MCSR >> 15) & 0x01) /* Telecom Codec Enabled */
109
110/* MCDR2 */
111
112#define MCDR2_rW (1 << 16)
113
114#define WRITE_MCDR2(reg, data) (SIB->MCDR2 =((reg<<17)|MCDR2_rW|(data&0xffff)))
115#define MCDR2_WRITE_COMPLETE GET_CWC
116
117#define INITIATE_MCDR2_READ(reg) (SIB->MCDR2 = (reg << 17))
118#define MCDR2_READ_COMPLETE GET_CRC
119#define MCDR2_READ (SIB->MCDR2 & 0xffff)
diff --git a/include/asm-arm/arch-l7200/sys-clock.h b/include/asm-arm/arch-l7200/sys-clock.h
deleted file mode 100644
index 771c774f4815..000000000000
--- a/include/asm-arm/arch-l7200/sys-clock.h
+++ /dev/null
@@ -1,67 +0,0 @@
1/****************************************************************************/
2/*
3 * linux/include/asm-arm/arch-l7200/sys-clock.h
4 *
5 * Registers and helper functions for the L7200 Link-Up Systems
6 * System clocks.
7 *
8 * (C) Copyright 2000, S A McConnell (samcconn@cotw.com)
9 *
10 * This file is subject to the terms and conditions of the GNU General Public
11 * License. See the file COPYING in the main directory of this archive for
12 * more details.
13 */
14
15/****************************************************************************/
16
17#define SYS_CLOCK_OFF 0x00050030 /* Offset from IO_START. */
18
19/* IO_START and IO_BASE are defined in hardware.h */
20
21#define SYS_CLOCK_START (IO_START + SYS_CLCOK_OFF) /* Physical address */
22#define SYS_CLOCK_BASE (IO_BASE + SYS_CLOCK_OFF) /* Virtual address */
23
24/* Define the interface to the SYS_CLOCK */
25
26typedef struct
27{
28 unsigned int ENABLE;
29 unsigned int ESYNC;
30 unsigned int SELECT;
31} sys_clock_interface;
32
33#define SYS_CLOCK ((volatile sys_clock_interface *)(SYS_CLOCK_BASE))
34
35//#define CLOCK_EN (*(volatile unsigned long *)(PMU_BASE+CLOCK_EN_OFF))
36//#define CLOCK_ESYNC (*(volatile unsigned long *)(PMU_BASE+CLOCK_ESYNC_OFF))
37//#define CLOCK_SEL (*(volatile unsigned long *)(PMU_BASE+CLOCK_SEL_OFF))
38
39/* SYS_CLOCK -> ENABLE */
40
41#define SYN_EN 1<<0
42#define B18M_EN 1<<1
43#define CLK3M6_EN 1<<2
44#define BUART_EN 1<<3
45#define CLK18MU_EN 1<<4
46#define FIR_EN 1<<5
47#define MIRN_EN 1<<6
48#define UARTM_EN 1<<7
49#define SIBADC_EN 1<<8
50#define ALTD_EN 1<<9
51#define CLCLK_EN 1<<10
52
53/* SYS_CLOCK -> SELECT */
54
55#define CLK18M_DIV 1<<0
56#define MIR_SEL 1<<1
57#define SSP_SEL 1<<4
58#define MM_DIV 1<<5
59#define MM_SEL 1<<6
60#define ADC_SEL_2 0<<7
61#define ADC_SEL_4 1<<7
62#define ADC_SEL_8 3<<7
63#define ADC_SEL_16 7<<7
64#define ADC_SEL_32 0x0f<<7
65#define ADC_SEL_64 0x1f<<7
66#define ADC_SEL_128 0x3f<<7
67#define ALTD_SEL 1<<13
diff --git a/include/asm-arm/arch-l7200/system.h b/include/asm-arm/arch-l7200/system.h
deleted file mode 100644
index 18825cf071ba..000000000000
--- a/include/asm-arm/arch-l7200/system.h
+++ /dev/null
@@ -1,29 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-l7200/system.h
3 *
4 * Copyright (c) 2000 Steve Hill (sjhill@cotw.com)
5 *
6 * Changelog
7 * 03-21-2000 SJH Created
8 * 04-26-2000 SJH Fixed functions
9 * 05-03-2000 SJH Removed usage of obsolete 'iomd.h'
10 * 05-31-2000 SJH Properly implemented 'arch_idle'
11 */
12#ifndef __ASM_ARCH_SYSTEM_H
13#define __ASM_ARCH_SYSTEM_H
14
15#include <asm/hardware.h>
16
17static inline void arch_idle(void)
18{
19 *(unsigned long *)(IO_BASE + 0x50004) = 1; /* idle mode */
20}
21
22static inline void arch_reset(char mode)
23{
24 if (mode == 's') {
25 cpu_reset(0);
26 }
27}
28
29#endif
diff --git a/include/asm-arm/arch-l7200/time.h b/include/asm-arm/arch-l7200/time.h
deleted file mode 100644
index ea22f7fff9cd..000000000000
--- a/include/asm-arm/arch-l7200/time.h
+++ /dev/null
@@ -1,73 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-l7200/time.h
3 *
4 * Copyright (C) 2000 Rob Scott (rscott@mtrob.fdns.net)
5 * Steve Hill (sjhill@cotw.com)
6 *
7 * Changelog:
8 * 01-02-2000 RS Created l7200 version, derived from rpc code
9 * 05-03-2000 SJH Complete rewrite
10 */
11#ifndef _ASM_ARCH_TIME_H
12#define _ASM_ARCH_TIME_H
13
14#include <asm/arch/irqs.h>
15
16/*
17 * RTC base register address
18 */
19#define RTC_BASE (IO_BASE_2 + 0x2000)
20
21/*
22 * RTC registers
23 */
24#define RTC_RTCDR (*(volatile unsigned char *) (RTC_BASE + 0x000))
25#define RTC_RTCMR (*(volatile unsigned char *) (RTC_BASE + 0x004))
26#define RTC_RTCS (*(volatile unsigned char *) (RTC_BASE + 0x008))
27#define RTC_RTCC (*(volatile unsigned char *) (RTC_BASE + 0x008))
28#define RTC_RTCDV (*(volatile unsigned char *) (RTC_BASE + 0x00c))
29#define RTC_RTCCR (*(volatile unsigned char *) (RTC_BASE + 0x010))
30
31/*
32 * RTCCR register values
33 */
34#define RTC_RATE_32 0x00 /* 32 Hz tick */
35#define RTC_RATE_64 0x10 /* 64 Hz tick */
36#define RTC_RATE_128 0x20 /* 128 Hz tick */
37#define RTC_RATE_256 0x30 /* 256 Hz tick */
38#define RTC_EN_ALARM 0x01 /* Enable alarm */
39#define RTC_EN_TIC 0x04 /* Enable counter */
40#define RTC_EN_STWDOG 0x08 /* Enable watchdog */
41
42/*
43 * Handler for RTC timer interrupt
44 */
45static irqreturn_t
46timer_interrupt(int irq, void *dev_id)
47{
48 struct pt_regs *regs = get_irq_regs();
49 do_timer(1);
50#ifndef CONFIG_SMP
51 update_process_times(user_mode(regs));
52#endif
53 do_profile(regs);
54 RTC_RTCC = 0; /* Clear interrupt */
55
56 return IRQ_HANDLED;
57}
58
59/*
60 * Set up RTC timer interrupt, and return the current time in seconds.
61 */
62void __init time_init(void)
63{
64 RTC_RTCC = 0; /* Clear interrupt */
65
66 timer_irq.handler = timer_interrupt;
67
68 setup_irq(IRQ_RTC_TICK, &timer_irq);
69
70 RTC_RTCCR = RTC_RATE_128 | RTC_EN_TIC; /* Set rate and enable timer */
71}
72
73#endif
diff --git a/include/asm-arm/arch-l7200/timex.h b/include/asm-arm/arch-l7200/timex.h
deleted file mode 100644
index 3c3202620f00..000000000000
--- a/include/asm-arm/arch-l7200/timex.h
+++ /dev/null
@@ -1,20 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-l7200/timex.h
3 *
4 * Copyright (C) 2000 Rob Scott (rscott@mtrob.fdns.net)
5 * Steve Hill (sjhill@cotw.com)
6 *
7 * 04-21-2000 RS Created file
8 * 05-03-2000 SJH Tick rate was wrong
9 *
10 */
11
12/*
13 * On the ARM720T, clock ticks are set to 128 Hz.
14 *
15 * NOTE: The actual RTC value is set in 'time.h' which
16 * must be changed when choosing a different tick
17 * rate. The value of HZ in 'param.h' must also
18 * be changed to match below.
19 */
20#define CLOCK_TICK_RATE 128
diff --git a/include/asm-arm/arch-l7200/uncompress.h b/include/asm-arm/arch-l7200/uncompress.h
deleted file mode 100644
index 04be2a088639..000000000000
--- a/include/asm-arm/arch-l7200/uncompress.h
+++ /dev/null
@@ -1,39 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-l7200/uncompress.h
3 *
4 * Copyright (C) 2000 Steve Hill (sjhill@cotw.com)
5 *
6 * Changelog:
7 * 05-01-2000 SJH Created
8 * 05-13-2000 SJH Filled in function bodies
9 * 07-26-2000 SJH Removed hard coded baud rate
10 */
11
12#include <asm/hardware.h>
13
14#define IO_UART IO_START + 0x00044000
15
16#define __raw_writeb(v,p) (*(volatile unsigned char *)(p) = (v))
17#define __raw_readb(p) (*(volatile unsigned char *)(p))
18
19static inline void putc(int c)
20{
21 while(__raw_readb(IO_UART + 0x18) & 0x20 ||
22 __raw_readb(IO_UART + 0x18) & 0x08)
23 barrier();
24
25 __raw_writeb(c, IO_UART + 0x00);
26}
27
28static inline void flush(void)
29{
30}
31
32static __inline__ void arch_decomp_setup(void)
33{
34 __raw_writeb(0x00, IO_UART + 0x08); /* Set HSB */
35 __raw_writeb(0x00, IO_UART + 0x20); /* Disable IRQs */
36 __raw_writeb(0x01, IO_UART + 0x14); /* Enable UART */
37}
38
39#define arch_decomp_wdog()
diff --git a/include/asm-arm/arch-l7200/vmalloc.h b/include/asm-arm/arch-l7200/vmalloc.h
deleted file mode 100644
index 816231eedaac..000000000000
--- a/include/asm-arm/arch-l7200/vmalloc.h
+++ /dev/null
@@ -1,4 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-l7200/vmalloc.h
3 */
4#define VMALLOC_END (PAGE_OFFSET + 0x10000000)
diff --git a/include/asm-arm/arch-lh7a40x/clocks.h b/include/asm-arm/arch-lh7a40x/clocks.h
deleted file mode 100644
index 7d0ba18ad578..000000000000
--- a/include/asm-arm/arch-lh7a40x/clocks.h
+++ /dev/null
@@ -1,18 +0,0 @@
1/* include/asm-arm/arch-lh7a40x/clocks.h
2 *
3 * Copyright (C) 2004 Marc Singer
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * version 2 as published by the Free Software Foundation.
8 *
9 */
10
11#ifndef __ASM_ARCH_CLOCKS_H
12#define __ASM_ARCH_CLOCKS_H
13
14unsigned int fclkfreq_get (void);
15unsigned int hclkfreq_get (void);
16unsigned int pclkfreq_get (void);
17
18#endif /* _ASM_ARCH_CLOCKS_H */
diff --git a/include/asm-arm/arch-lh7a40x/constants.h b/include/asm-arm/arch-lh7a40x/constants.h
deleted file mode 100644
index 51de96e87faf..000000000000
--- a/include/asm-arm/arch-lh7a40x/constants.h
+++ /dev/null
@@ -1,91 +0,0 @@
1/* include/asm-arm/arch-lh7a40x/constants.h
2 *
3 * Copyright (C) 2004 Coastal Environmental Systems
4 * Copyright (C) 2004 Logic Product Development
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * version 2 as published by the Free Software Foundation.
9 *
10 */
11
12#ifndef __ASM_ARCH_CONSTANTS_H
13#define __ASM_ARCH_CONSTANTS_H
14
15
16/* Addressing constants */
17
18 /* SoC CPU IO addressing */
19#define IO_PHYS (0x80000000)
20#define IO_VIRT (0xf8000000)
21#define IO_SIZE (0x0000B000)
22
23#ifdef CONFIG_MACH_KEV7A400
24# define CPLD_PHYS (0x20000000)
25# define CPLD_VIRT (0xf2000000)
26# define CPLD_SIZE PAGE_SIZE
27#endif
28
29#if defined (CONFIG_MACH_LPD7A400) || defined (CONFIG_MACH_LPD7A404)
30
31# define IOBARRIER_PHYS 0x10000000 /* Second bank, fastest timing */
32# define IOBARRIER_VIRT 0xf0000000
33# define IOBARRIER_SIZE PAGE_SIZE
34
35# define CF_PHYS 0x60200000
36# define CF_VIRT 0xf6020000
37# define CF_SIZE (8*1024)
38
39 /* The IO mappings for the LPD CPLD are, unfortunately, sparse. */
40# define CPLDX_PHYS(x) (0x70000000 | ((x) << 20))
41# define CPLDX_VIRT(x) (0xf7000000 | ((x) << 16))
42# define CPLD00_PHYS CPLDX_PHYS (0x00) /* Wired LAN */
43# define CPLD00_VIRT CPLDX_VIRT (0x00)
44# define CPLD00_SIZE PAGE_SIZE
45# define CPLD02_PHYS CPLDX_PHYS (0x02)
46# define CPLD02_VIRT CPLDX_VIRT (0x02)
47# define CPLD02_SIZE PAGE_SIZE
48# define CPLD06_PHYS CPLDX_PHYS (0x06)
49# define CPLD06_VIRT CPLDX_VIRT (0x06)
50# define CPLD06_SIZE PAGE_SIZE
51# define CPLD08_PHYS CPLDX_PHYS (0x08)
52# define CPLD08_VIRT CPLDX_VIRT (0x08)
53# define CPLD08_SIZE PAGE_SIZE
54# define CPLD0A_PHYS CPLDX_PHYS (0x0a)
55# define CPLD0A_VIRT CPLDX_VIRT (0x0a)
56# define CPLD0A_SIZE PAGE_SIZE
57# define CPLD0C_PHYS CPLDX_PHYS (0x0c)
58# define CPLD0C_VIRT CPLDX_VIRT (0x0c)
59# define CPLD0C_SIZE PAGE_SIZE
60# define CPLD0E_PHYS CPLDX_PHYS (0x0e)
61# define CPLD0E_VIRT CPLDX_VIRT (0x0e)
62# define CPLD0E_SIZE PAGE_SIZE
63# define CPLD10_PHYS CPLDX_PHYS (0x10)
64# define CPLD10_VIRT CPLDX_VIRT (0x10)
65# define CPLD10_SIZE PAGE_SIZE
66# define CPLD12_PHYS CPLDX_PHYS (0x12)
67# define CPLD12_VIRT CPLDX_VIRT (0x12)
68# define CPLD12_SIZE PAGE_SIZE
69# define CPLD14_PHYS CPLDX_PHYS (0x14)
70# define CPLD14_VIRT CPLDX_VIRT (0x14)
71# define CPLD14_SIZE PAGE_SIZE
72# define CPLD16_PHYS CPLDX_PHYS (0x16)
73# define CPLD16_VIRT CPLDX_VIRT (0x16)
74# define CPLD16_SIZE PAGE_SIZE
75# define CPLD18_PHYS CPLDX_PHYS (0x18)
76# define CPLD18_VIRT CPLDX_VIRT (0x18)
77# define CPLD18_SIZE PAGE_SIZE
78# define CPLD1A_PHYS CPLDX_PHYS (0x1a)
79# define CPLD1A_VIRT CPLDX_VIRT (0x1a)
80# define CPLD1A_SIZE PAGE_SIZE
81#endif
82
83 /* Timing constants */
84
85#define XTAL_IN 14745600 /* 14.7456 MHz crystal */
86#define PLL_CLOCK (XTAL_IN * 21) /* 309 MHz PLL clock */
87#define MAX_HCLK_KHZ 100000 /* HCLK max limit ~100MHz */
88#define HCLK (99993600)
89//#define HCLK (119808000)
90
91#endif /* __ASM_ARCH_CONSTANTS_H */
diff --git a/include/asm-arm/arch-lh7a40x/debug-macro.S b/include/asm-arm/arch-lh7a40x/debug-macro.S
deleted file mode 100644
index 421dcd6a8506..000000000000
--- a/include/asm-arm/arch-lh7a40x/debug-macro.S
+++ /dev/null
@@ -1,39 +0,0 @@
1/* linux/include/asm-arm/arch-lh7a40x/debug-macro.S
2 *
3 * Debugging macro include header
4 *
5 * Copyright (C) 1994-1999 Russell King
6 * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 *
12*/
13
14 @ It is not known if this will be appropriate for every 40x
15 @ board.
16
17 .macro addruart,rx
18 mrc p15, 0, \rx, c1, c0
19 tst \rx, #1 @ MMU enabled?
20 mov \rx, #0x00000700 @ offset from base
21 orreq \rx, \rx, #0x80000000 @ physical base
22 orrne \rx, \rx, #0xf8000000 @ virtual base
23 .endm
24
25 .macro senduart,rd,rx
26 strb \rd, [\rx] @ DATA
27 .endm
28
29 .macro busyuart,rd,rx @ spin while busy
301001: ldr \rd, [\rx, #0x10] @ STATUS
31 tst \rd, #1 << 3 @ BUSY (TX FIFO not empty)
32 bne 1001b @ yes, spin
33 .endm
34
35 .macro waituart,rd,rx @ wait for Tx FIFO room
361001: ldrb \rd, [\rx, #0x10] @ STATUS
37 tst \rd, #1 << 5 @ TXFF (TX FIFO full)
38 bne 1001b @ yes, spin
39 .endm
diff --git a/include/asm-arm/arch-lh7a40x/dma.h b/include/asm-arm/arch-lh7a40x/dma.h
deleted file mode 100644
index a8cbd14bbf9d..000000000000
--- a/include/asm-arm/arch-lh7a40x/dma.h
+++ /dev/null
@@ -1,86 +0,0 @@
1/* include/asm-arm/arch-lh7a40x/dma.h
2 *
3 * Copyright (C) 2005 Marc Singer
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * version 2 as published by the Free Software Foundation.
8 *
9 */
10
11typedef enum {
12 DMA_M2M0 = 0,
13 DMA_M2M1 = 1,
14 DMA_M2P0 = 2, /* Tx */
15 DMA_M2P1 = 3, /* Rx */
16 DMA_M2P2 = 4, /* Tx */
17 DMA_M2P3 = 5, /* Rx */
18 DMA_M2P4 = 6, /* Tx - AC97 */
19 DMA_M2P5 = 7, /* Rx - AC97 */
20 DMA_M2P6 = 8, /* Tx */
21 DMA_M2P7 = 9, /* Rx */
22} dma_device_t;
23
24#define DMA_LENGTH_MAX ((64*1024) - 4) /* bytes */
25
26#define DMAC_GCA __REG(DMAC_PHYS + 0x2b80)
27#define DMAC_GIR __REG(DMAC_PHYS + 0x2bc0)
28
29#define DMAC_GIR_MMI1 (1<<11)
30#define DMAC_GIR_MMI0 (1<<10)
31#define DMAC_GIR_MPI8 (1<<9)
32#define DMAC_GIR_MPI9 (1<<8)
33#define DMAC_GIR_MPI6 (1<<7)
34#define DMAC_GIR_MPI7 (1<<6)
35#define DMAC_GIR_MPI4 (1<<5)
36#define DMAC_GIR_MPI5 (1<<4)
37#define DMAC_GIR_MPI2 (1<<3)
38#define DMAC_GIR_MPI3 (1<<2)
39#define DMAC_GIR_MPI0 (1<<1)
40#define DMAC_GIR_MPI1 (1<<0)
41
42#define DMAC_M2P0 0x0000
43#define DMAC_M2P1 0x0040
44#define DMAC_M2P2 0x0080
45#define DMAC_M2P3 0x00c0
46#define DMAC_M2P4 0x0240
47#define DMAC_M2P5 0x0200
48#define DMAC_M2P6 0x02c0
49#define DMAC_M2P7 0x0280
50#define DMAC_M2P8 0x0340
51#define DMAC_M2P9 0x0300
52#define DMAC_M2M0 0x0100
53#define DMAC_M2M1 0x0140
54
55#define DMAC_P_PCONTROL(c) __REG(DMAC_PHYS + (c) + 0x00)
56#define DMAC_P_PINTERRUPT(c) __REG(DMAC_PHYS + (c) + 0x04)
57#define DMAC_P_PPALLOC(c) __REG(DMAC_PHYS + (c) + 0x08)
58#define DMAC_P_PSTATUS(c) __REG(DMAC_PHYS + (c) + 0x0c)
59#define DMAC_P_REMAIN(c) __REG(DMAC_PHYS + (c) + 0x14)
60#define DMAC_P_MAXCNT0(c) __REG(DMAC_PHYS + (c) + 0x20)
61#define DMAC_P_BASE0(c) __REG(DMAC_PHYS + (c) + 0x24)
62#define DMAC_P_CURRENT0(c) __REG(DMAC_PHYS + (c) + 0x28)
63#define DMAC_P_MAXCNT1(c) __REG(DMAC_PHYS + (c) + 0x30)
64#define DMAC_P_BASE1(c) __REG(DMAC_PHYS + (c) + 0x34)
65#define DMAC_P_CURRENT1(c) __REG(DMAC_PHYS + (c) + 0x38)
66
67#define DMAC_PCONTROL_ENABLE (1<<4)
68
69#define DMAC_PORT_USB 0
70#define DMAC_PORT_SDMMC 1
71#define DMAC_PORT_AC97_1 2
72#define DMAC_PORT_AC97_2 3
73#define DMAC_PORT_AC97_3 4
74#define DMAC_PORT_UART1 6
75#define DMAC_PORT_UART2 7
76#define DMAC_PORT_UART3 8
77
78#define DMAC_PSTATUS_CURRSTATE_SHIFT 4
79#define DMAC_PSTATUS_CURRSTATE_MASK 0x3
80
81#define DMAC_PSTATUS_NEXTBUF (1<<6)
82#define DMAC_PSTATUS_STALLRINT (1<<0)
83
84#define DMAC_INT_CHE (1<<3)
85#define DMAC_INT_NFB (1<<1)
86#define DMAC_INT_STALL (1<<0)
diff --git a/include/asm-arm/arch-lh7a40x/entry-macro.S b/include/asm-arm/arch-lh7a40x/entry-macro.S
deleted file mode 100644
index ffe397250f0c..000000000000
--- a/include/asm-arm/arch-lh7a40x/entry-macro.S
+++ /dev/null
@@ -1,149 +0,0 @@
1/*
2 * include/asm-arm/arch-lh7a40x/entry-macro.S
3 *
4 * Low-level IRQ helper macros for LH7A40x platforms
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10#include <asm/hardware.h>
11#include <asm/arch/irqs.h>
12
13/* In order to allow there to be support for both of the processor
14 classes at the same time, we make a hack here that isn't very
15 pretty. At startup, the link pointed to with the
16 branch_irq_lh7a400 symbol is replaced with a NOP when the CPU is
17 detected as a lh7a404.
18
19 *** FIXME: we should clean this up so that there is only one
20 implementation for each CPU's design.
21
22*/
23
24#if defined (CONFIG_ARCH_LH7A400) && defined (CONFIG_ARCH_LH7A404)
25
26 .macro disable_fiq
27 .endm
28
29 .macro get_irqnr_preamble, base, tmp
30 .endm
31
32 .macro arch_ret_to_user, tmp1, tmp2
33 .endm
34
35 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
36
37branch_irq_lh7a400: b 1000f
38
39@ Implementation of the LH7A404 get_irqnr_and_base.
40
41 mov \irqnr, #0 @ VIC1 irq base
42 mov \base, #io_p2v(0x80000000) @ APB registers
43 add \base, \base, #0x8000
44 ldr \tmp, [\base, #0x0030] @ VIC1_VECTADDR
45 tst \tmp, #VA_VECTORED @ Direct vectored
46 bne 1002f
47 tst \tmp, #VA_VIC1DEFAULT @ Default vectored VIC1
48 ldrne \irqstat, [\base, #0] @ VIC1_IRQSTATUS
49 bne 1001f
50 add \base, \base, #(0xa000 - 0x8000)
51 ldr \tmp, [\base, #0x0030] @ VIC2_VECTADDR
52 tst \tmp, #VA_VECTORED @ Direct vectored
53 bne 1002f
54 ldr \irqstat, [\base, #0] @ VIC2_IRQSTATUS
55 mov \irqnr, #32 @ VIC2 irq base
56
571001: movs \irqstat, \irqstat, lsr #1 @ Shift into carry
58 bcs 1008f @ Bit set; irq found
59 add \irqnr, \irqnr, #1
60 bne 1001b @ Until no bits
61 b 1009f @ Nothing? Hmm.
621002: and \irqnr, \tmp, #0x3f @ Mask for valid bits
631008: movs \irqstat, #1 @ Force !Z
64 str \tmp, [\base, #0x0030] @ Clear vector
65 b 1009f
66
67@ Implementation of the LH7A400 get_irqnr_and_base.
68
691000: mov \irqnr, #0
70 mov \base, #io_p2v(0x80000000) @ APB registers
71 ldr \irqstat, [\base, #0x500] @ PIC INTSR
72
731001: movs \irqstat, \irqstat, lsr #1 @ Shift into carry
74 bcs 1008f @ Bit set; irq found
75 add \irqnr, \irqnr, #1
76 bne 1001b @ Until no bits
77 b 1009f @ Nothing? Hmm.
781008: movs \irqstat, #1 @ Force !Z
79
801009:
81 .endm
82
83
84
85#elif defined (CONFIG_ARCH_LH7A400)
86 .macro disable_fiq
87 .endm
88
89 .macro get_irqnr_preamble, base, tmp
90 .endm
91
92 .macro arch_ret_to_user, tmp1, tmp2
93 .endm
94
95 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
96 mov \irqnr, #0
97 mov \base, #io_p2v(0x80000000) @ APB registers
98 ldr \irqstat, [\base, #0x500] @ PIC INTSR
99
1001001: movs \irqstat, \irqstat, lsr #1 @ Shift into carry
101 bcs 1008f @ Bit set; irq found
102 add \irqnr, \irqnr, #1
103 bne 1001b @ Until no bits
104 b 1009f @ Nothing? Hmm.
1051008: movs \irqstat, #1 @ Force !Z
1061009:
107 .endm
108
109#elif defined(CONFIG_ARCH_LH7A404)
110
111 .macro disable_fiq
112 .endm
113
114 .macro get_irqnr_preamble, base, tmp
115 .endm
116
117 .macro arch_ret_to_user, tmp1, tmp2
118 .endm
119
120 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
121 mov \irqnr, #0 @ VIC1 irq base
122 mov \base, #io_p2v(0x80000000) @ APB registers
123 add \base, \base, #0x8000
124 ldr \tmp, [\base, #0x0030] @ VIC1_VECTADDR
125 tst \tmp, #VA_VECTORED @ Direct vectored
126 bne 1002f
127 tst \tmp, #VA_VIC1DEFAULT @ Default vectored VIC1
128 ldrne \irqstat, [\base, #0] @ VIC1_IRQSTATUS
129 bne 1001f
130 add \base, \base, #(0xa000 - 0x8000)
131 ldr \tmp, [\base, #0x0030] @ VIC2_VECTADDR
132 tst \tmp, #VA_VECTORED @ Direct vectored
133 bne 1002f
134 ldr \irqstat, [\base, #0] @ VIC2_IRQSTATUS
135 mov \irqnr, #32 @ VIC2 irq base
136
1371001: movs \irqstat, \irqstat, lsr #1 @ Shift into carry
138 bcs 1008f @ Bit set; irq found
139 add \irqnr, \irqnr, #1
140 bne 1001b @ Until no bits
141 b 1009f @ Nothing? Hmm.
1421002: and \irqnr, \tmp, #0x3f @ Mask for valid bits
1431008: movs \irqstat, #1 @ Force !Z
144 str \tmp, [\base, #0x0030] @ Clear vector
1451009:
146 .endm
147#endif
148
149
diff --git a/include/asm-arm/arch-lh7a40x/hardware.h b/include/asm-arm/arch-lh7a40x/hardware.h
deleted file mode 100644
index e9ff74fd7939..000000000000
--- a/include/asm-arm/arch-lh7a40x/hardware.h
+++ /dev/null
@@ -1,62 +0,0 @@
1/* include/asm-arm/arch-lh7a40x/hardware.h
2 *
3 * Copyright (C) 2004 Coastal Environmental Systems
4 *
5 * [ Substantially cribbed from include/asm-arm/arch-pxa/hardware.h ]
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * version 2 as published by the Free Software Foundation.
10 *
11 */
12
13#ifndef __ASM_ARCH_HARDWARE_H
14#define __ASM_ARCH_HARDWARE_H
15
16#include <asm/sizes.h> /* Added for the sake of amba-clcd driver */
17
18#define io_p2v(x) (0xf0000000 | (((x) & 0xfff00000) >> 4) | ((x) & 0x0000ffff))
19#define io_v2p(x) ( (((x) & 0x0fff0000) << 4) | ((x) & 0x0000ffff))
20
21#ifdef __ASSEMBLY__
22
23# define __REG(x) io_p2v(x)
24# define __PREG(x) io_v2p(x)
25
26#else
27
28# if 0
29# define __REG(x) (*((volatile u32 *)io_p2v(x)))
30# else
31/*
32 * This __REG() version gives the same results as the one above, except
33 * that we are fooling gcc somehow so it generates far better and smaller
34 * assembly code for access to contigous registers. It's a shame that gcc
35 * doesn't guess this by itself.
36 */
37#include <asm/types.h>
38typedef struct { volatile u32 offset[4096]; } __regbase;
39# define __REGP(x) ((__regbase *)((x)&~4095))->offset[((x)&4095)>>2]
40# define __REG(x) __REGP(io_p2v(x))
41typedef struct { volatile u16 offset[4096]; } __regbase16;
42# define __REGP16(x) ((__regbase16 *)((x)&~4095))->offset[((x)&4095)>>1]
43# define __REG16(x) __REGP16(io_p2v(x))
44typedef struct { volatile u8 offset[4096]; } __regbase8;
45# define __REGP8(x) ((__regbase8 *)((x)&~4095))->offset[(x)&4095]
46# define __REG8(x) __REGP8(io_p2v(x))
47#endif
48
49/* Let's kick gcc's ass again... */
50# define __REG2(x,y) \
51 ( __builtin_constant_p(y) ? (__REG((x) + (y))) \
52 : (*(volatile u32 *)((u32)&__REG(x) + (y))) )
53
54# define __PREG(x) (io_v2p((u32)&(x)))
55
56#endif
57
58#define MASK_AND_SET(v,m,s) (v) = ((v)&~(m))|(s)
59
60#include "registers.h"
61
62#endif /* _ASM_ARCH_HARDWARE_H */
diff --git a/include/asm-arm/arch-lh7a40x/io.h b/include/asm-arm/arch-lh7a40x/io.h
deleted file mode 100644
index 17bc94097481..000000000000
--- a/include/asm-arm/arch-lh7a40x/io.h
+++ /dev/null
@@ -1,22 +0,0 @@
1/* include/asm-arm/arch-lh7a40x/io.h
2 *
3 * Copyright (C) 2004 Coastal Environmental Systems
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * version 2 as published by the Free Software Foundation.
8 *
9 */
10
11#ifndef __ASM_ARCH_IO_H
12#define __ASM_ARCH_IO_H
13
14#include <asm/hardware.h>
15
16#define IO_SPACE_LIMIT 0xffffffff
17
18/* No ISA or PCI bus on this machine. */
19#define __io(a) ((void __iomem *)(a))
20#define __mem_pci(a) (a)
21
22#endif /* __ASM_ARCH_IO_H */
diff --git a/include/asm-arm/arch-lh7a40x/irqs.h b/include/asm-arm/arch-lh7a40x/irqs.h
deleted file mode 100644
index afe8c7cbad6a..000000000000
--- a/include/asm-arm/arch-lh7a40x/irqs.h
+++ /dev/null
@@ -1,200 +0,0 @@
1/* include/asm-arm/arch-lh7a40x/irqs.h
2 *
3 * Copyright (C) 2004 Coastal Environmental Systems
4 * Copyright (C) 2004 Logic Product Development
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * version 2 as published by the Free Software Foundation.
9 *
10 */
11
12/* It is to be seen whether or not we can build a kernel for more than
13 * one board. For the time being, these macros assume that we cannot.
14 * Thus, it is OK to ifdef machine/board specific IRQ assignments.
15 */
16
17
18#ifndef __ASM_ARCH_IRQS_H
19#define __ASM_ARCH_IRQS_H
20
21
22#define FIQ_START 80
23
24#if defined (CONFIG_ARCH_LH7A400)
25
26 /* FIQs */
27
28# define IRQ_GPIO0FIQ 0 /* GPIO External FIQ Interrupt on F0 */
29# define IRQ_BLINT 1 /* Battery Low */
30# define IRQ_WEINT 2 /* Watchdog Timer, WDT overflow */
31# define IRQ_MCINT 3 /* Media Change, MEDCHG pin rising */
32
33 /* IRQs */
34
35# define IRQ_CSINT 4 /* Audio Codec (ACI) */
36# define IRQ_GPIO1INTR 5 /* GPIO External IRQ Interrupt on F1 */
37# define IRQ_GPIO2INTR 6 /* GPIO External IRQ Interrupt on F2 */
38# define IRQ_GPIO3INTR 7 /* GPIO External IRQ Interrupt on F3 */
39# define IRQ_T1UI 8 /* Timer 1 underflow */
40# define IRQ_T2UI 9 /* Timer 2 underflow */
41# define IRQ_RTCMI 10
42# define IRQ_TINTR 11 /* Clock State Controller 64 Hz tick (CSC) */
43# define IRQ_UART1INTR 12
44# define IRQ_UART2INTR 13
45# define IRQ_LCDINTR 14
46# define IRQ_SSIEOT 15 /* Synchronous Serial Interface (SSI) */
47# define IRQ_UART3INTR 16
48# define IRQ_SCIINTR 17 /* Smart Card Interface (SCI) */
49# define IRQ_AACINTR 18 /* Advanced Audio Codec (AAC) */
50# define IRQ_MMCINTR 19 /* Multimedia Card (MMC) */
51# define IRQ_USBINTR 20
52# define IRQ_DMAINTR 21
53# define IRQ_T3UI 22 /* Timer 3 underflow */
54# define IRQ_GPIO4INTR 23 /* GPIO External IRQ Interrupt on F4 */
55# define IRQ_GPIO5INTR 24 /* GPIO External IRQ Interrupt on F5 */
56# define IRQ_GPIO6INTR 25 /* GPIO External IRQ Interrupt on F6 */
57# define IRQ_GPIO7INTR 26 /* GPIO External IRQ Interrupt on F7 */
58# define IRQ_BMIINTR 27 /* Battery Monitor Interface (BMI) */
59
60# define NR_IRQ_CPU 28 /* IRQs directly recognized by CPU */
61
62 /* Given IRQ, return GPIO interrupt number 0-7 */
63# define IRQ_TO_GPIO(i) ((i) \
64 - (((i) > IRQ_GPIO3INTR) ? IRQ_GPIO4INTR - IRQ_GPIO3INTR - 1 : 0)\
65 - (((i) > IRQ_GPIO0INTR) ? IRQ_GPIO1INTR - IRQ_GPIO0INTR - 1 : 0))
66
67#endif
68
69#if defined (CONFIG_ARCH_LH7A404)
70
71# define IRQ_BROWN 0 /* Brownout */
72# define IRQ_WDTINTR 1 /* Watchdog Timer */
73# define IRQ_COMMRX 2 /* ARM Comm Rx for Debug */
74# define IRQ_COMMTX 3 /* ARM Comm Tx for Debug */
75# define IRQ_T1UI 4 /* Timer 1 underflow */
76# define IRQ_T2UI 5 /* Timer 2 underflow */
77# define IRQ_CSINT 6 /* Codec Interrupt (shared by AAC on 404) */
78# define IRQ_DMAM2P0 7 /* -- DMA Memory to Peripheral */
79# define IRQ_DMAM2P1 8
80# define IRQ_DMAM2P2 9
81# define IRQ_DMAM2P3 10
82# define IRQ_DMAM2P4 11
83# define IRQ_DMAM2P5 12
84# define IRQ_DMAM2P6 13
85# define IRQ_DMAM2P7 14
86# define IRQ_DMAM2P8 15
87# define IRQ_DMAM2P9 16
88# define IRQ_DMAM2M0 17 /* -- DMA Memory to Memory */
89# define IRQ_DMAM2M1 18
90# define IRQ_GPIO0INTR 19 /* -- GPIOF Interrupt */
91# define IRQ_GPIO1INTR 20
92# define IRQ_GPIO2INTR 21
93# define IRQ_GPIO3INTR 22
94# define IRQ_SOFT_V1_23 23 /* -- Unassigned */
95# define IRQ_SOFT_V1_24 24
96# define IRQ_SOFT_V1_25 25
97# define IRQ_SOFT_V1_26 26
98# define IRQ_SOFT_V1_27 27
99# define IRQ_SOFT_V1_28 28
100# define IRQ_SOFT_V1_29 29
101# define IRQ_SOFT_V1_30 30
102# define IRQ_SOFT_V1_31 31
103
104# define IRQ_BLINT 32 /* Battery Low */
105# define IRQ_BMIINTR 33 /* Battery Monitor */
106# define IRQ_MCINTR 34 /* Media Change */
107# define IRQ_TINTR 35 /* 64Hz Tick */
108# define IRQ_WEINT 36 /* Watchdog Expired */
109# define IRQ_RTCMI 37 /* Real-time Clock Match */
110# define IRQ_UART1INTR 38 /* UART1 Interrupt (including error) */
111# define IRQ_UART1ERR 39 /* UART1 Error */
112# define IRQ_UART2INTR 40 /* UART2 Interrupt (including error) */
113# define IRQ_UART2ERR 41 /* UART2 Error */
114# define IRQ_UART3INTR 42 /* UART3 Interrupt (including error) */
115# define IRQ_UART3ERR 43 /* UART3 Error */
116# define IRQ_SCIINTR 44 /* Smart Card */
117# define IRQ_TSCINTR 45 /* Touchscreen */
118# define IRQ_KMIINTR 46 /* Keyboard/Mouse (PS/2) */
119# define IRQ_GPIO4INTR 47 /* -- GPIOF Interrupt */
120# define IRQ_GPIO5INTR 48
121# define IRQ_GPIO6INTR 49
122# define IRQ_GPIO7INTR 50
123# define IRQ_T3UI 51 /* Timer 3 underflow */
124# define IRQ_LCDINTR 52 /* LCD Controller */
125# define IRQ_SSPINTR 53 /* Synchronous Serial Port */
126# define IRQ_SDINTR 54 /* Secure Digital Port (MMC) */
127# define IRQ_USBINTR 55 /* USB Device Port */
128# define IRQ_USHINTR 56 /* USB Host Port */
129# define IRQ_SOFT_V2_25 57 /* -- Unassigned */
130# define IRQ_SOFT_V2_26 58
131# define IRQ_SOFT_V2_27 59
132# define IRQ_SOFT_V2_28 60
133# define IRQ_SOFT_V2_29 61
134# define IRQ_SOFT_V2_30 62
135# define IRQ_SOFT_V2_31 63
136
137# define NR_IRQ_CPU 64 /* IRQs directly recognized by CPU */
138
139 /* Given IRQ, return GPIO interrupt number 0-7 */
140# define IRQ_TO_GPIO(i) ((i) \
141 - (((i) > IRQ_GPIO3INTR) ? IRQ_GPIO4INTR - IRQ_GPIO3INTR - 1 : 0)\
142 - IRQ_GPIO0INTR)
143
144 /* Vector Address constants */
145# define VA_VECTORED 0x100 /* Set for vectored interrupt */
146# define VA_VIC1DEFAULT 0x200 /* Set as default VECTADDR for VIC1 */
147# define VA_VIC2DEFAULT 0x400 /* Set as default VECTADDR for VIC2 */
148
149#endif
150
151 /* IRQ aliases */
152
153#if !defined (IRQ_GPIO0INTR)
154# define IRQ_GPIO0INTR IRQ_GPIO0FIQ
155#endif
156#define IRQ_TICK IRQ_TINTR
157#define IRQ_PCC1_RDY IRQ_GPIO6INTR /* PCCard 1 ready */
158#define IRQ_PCC2_RDY IRQ_GPIO7INTR /* PCCard 2 ready */
159#define IRQ_USB IRQ_USBINTR /* USB device */
160
161#ifdef CONFIG_MACH_KEV7A400
162# define IRQ_TS IRQ_GPIOFIQ /* Touchscreen */
163# define IRQ_CPLD IRQ_GPIO1INTR /* CPLD cascade */
164# define IRQ_PCC1_CD IRQ_GPIO_F2 /* PCCard 1 card detect */
165# define IRQ_PCC2_CD IRQ_GPIO_F3 /* PCCard 2 card detect */
166#endif
167
168#if defined (CONFIG_MACH_LPD7A400) || defined (CONFIG_MACH_LPD7A404)
169# define IRQ_CPLD_V28 IRQ_GPIO7INTR /* CPLD cascade through GPIO_PF7 */
170# define IRQ_CPLD_V34 IRQ_GPIO3INTR /* CPLD cascade through GPIO_PF3 */
171#endif
172
173 /* System specific IRQs */
174
175#define IRQ_BOARD_START NR_IRQ_CPU
176
177#ifdef CONFIG_MACH_KEV7A400
178# define IRQ_KEV7A400_CPLD IRQ_BOARD_START
179# define NR_IRQ_BOARD 5
180# define IRQ_KEV7A400_MMC_CD IRQ_KEV7A400_CPLD + 0 /* MMC Card Detect */
181# define IRQ_KEV7A400_RI2 IRQ_KEV7A400_CPLD + 1 /* Ring Indicator 2 */
182# define IRQ_KEV7A400_IDE_CF IRQ_KEV7A400_CPLD + 2 /* Compact Flash (?) */
183# define IRQ_KEV7A400_ETH_INT IRQ_KEV7A400_CPLD + 3 /* Ethernet chip */
184# define IRQ_KEV7A400_INT IRQ_KEV7A400_CPLD + 4
185#endif
186
187#if defined (CONFIG_MACH_LPD7A400) || defined (CONFIG_MACH_LPD7A404)
188# define IRQ_LPD7A40X_CPLD IRQ_BOARD_START
189# define NR_IRQ_BOARD 2
190# define IRQ_LPD7A40X_ETH_INT IRQ_LPD7A40X_CPLD + 0 /* Ethernet chip */
191# define IRQ_LPD7A400_TS IRQ_LPD7A40X_CPLD + 1 /* Touch screen */
192#endif
193
194#if defined (CONFIG_MACH_LPD7A400)
195# define IRQ_TOUCH IRQ_LPD7A400_TS
196#endif
197
198#define NR_IRQS (NR_IRQ_CPU + NR_IRQ_BOARD)
199
200#endif
diff --git a/include/asm-arm/arch-lh7a40x/memory.h b/include/asm-arm/arch-lh7a40x/memory.h
deleted file mode 100644
index 9b0c8012e713..000000000000
--- a/include/asm-arm/arch-lh7a40x/memory.h
+++ /dev/null
@@ -1,76 +0,0 @@
1/* include/asm-arm/arch-lh7a40x/memory.h
2 *
3 * Copyright (C) 2004 Coastal Environmental Systems
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * version 2 as published by the Free Software Foundation.
8 *
9 *
10 * Refer to <file:Documentation/arm/Sharp-LH/SDRAM> for more information.
11 *
12 */
13
14#ifndef __ASM_ARCH_MEMORY_H
15#define __ASM_ARCH_MEMORY_H
16
17/*
18 * Physical DRAM offset.
19 */
20#define PHYS_OFFSET UL(0xc0000000)
21
22/*
23 * Virtual view <-> DMA view memory address translations
24 * virt_to_bus: Used to translate the virtual address to an
25 * address suitable to be passed to set_dma_addr
26 * bus_to_virt: Used to convert an address for DMA operations
27 * to an address that the kernel can use.
28 */
29#define __virt_to_bus(x) __virt_to_phys(x)
30#define __bus_to_virt(x) __phys_to_virt(x)
31
32#ifdef CONFIG_DISCONTIGMEM
33
34/*
35 * Given a kernel address, find the home node of the underlying memory.
36 */
37
38# ifdef CONFIG_LH7A40X_ONE_BANK_PER_NODE
39# define KVADDR_TO_NID(addr) \
40 ( ((((unsigned long) (addr) - PAGE_OFFSET) >> 24) & 1)\
41 | ((((unsigned long) (addr) - PAGE_OFFSET) >> 25) & ~1))
42# else /* 2 banks per node */
43# define KVADDR_TO_NID(addr) \
44 (((unsigned long) (addr) - PAGE_OFFSET) >> 26)
45# endif
46
47/*
48 * Given a page frame number, convert it to a node id.
49 */
50
51# ifdef CONFIG_LH7A40X_ONE_BANK_PER_NODE
52# define PFN_TO_NID(pfn) \
53 (((((pfn) - PHYS_PFN_OFFSET) >> (24 - PAGE_SHIFT)) & 1)\
54 | ((((pfn) - PHYS_PFN_OFFSET) >> (25 - PAGE_SHIFT)) & ~1))
55# else /* 2 banks per node */
56# define PFN_TO_NID(pfn) \
57 (((pfn) - PHYS_PFN_OFFSET) >> (26 - PAGE_SHIFT))
58#endif
59
60/*
61 * Given a kaddr, LOCAL_MEM_MAP finds the owning node of the memory
62 * and returns the index corresponding to the appropriate page in the
63 * node's mem_map.
64 */
65
66# ifdef CONFIG_LH7A40X_ONE_BANK_PER_NODE
67# define LOCAL_MAP_NR(addr) \
68 (((unsigned long)(addr) & 0x003fffff) >> PAGE_SHIFT)
69# else /* 2 banks per node */
70# define LOCAL_MAP_NR(addr) \
71 (((unsigned long)(addr) & 0x01ffffff) >> PAGE_SHIFT)
72# endif
73
74#endif
75
76#endif
diff --git a/include/asm-arm/arch-lh7a40x/registers.h b/include/asm-arm/arch-lh7a40x/registers.h
deleted file mode 100644
index b4f09b3e2d03..000000000000
--- a/include/asm-arm/arch-lh7a40x/registers.h
+++ /dev/null
@@ -1,224 +0,0 @@
1/* include/asm-arm/arch-lh7a40x/registers.h
2 *
3 * Copyright (C) 2004 Coastal Environmental Systems
4 * Copyright (C) 2004 Logic Product Development
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * version 2 as published by the Free Software Foundation.
9 *
10 */
11
12#include <asm/arch/constants.h>
13
14#ifndef __ASM_ARCH_REGISTERS_H
15#define __ASM_ARCH_REGISTERS_H
16
17
18 /* Physical register base addresses */
19
20#define AC97C_PHYS (0x80000000) /* AC97 Controller */
21#define MMC_PHYS (0x80000100) /* Multimedia Card Controller */
22#define USB_PHYS (0x80000200) /* USB Client */
23#define SCI_PHYS (0x80000300) /* Secure Card Interface */
24#define CSC_PHYS (0x80000400) /* Clock/State Controller */
25#define INTC_PHYS (0x80000500) /* Interrupt Controller */
26#define UART1_PHYS (0x80000600) /* UART1 Controller */
27#define SIR_PHYS (0x80000600) /* IR Controller, same are UART1 */
28#define UART2_PHYS (0x80000700) /* UART2 Controller */
29#define UART3_PHYS (0x80000800) /* UART3 Controller */
30#define DCDC_PHYS (0x80000900) /* DC to DC Controller */
31#define ACI_PHYS (0x80000a00) /* Audio Codec Interface */
32#define SSP_PHYS (0x80000b00) /* Synchronous ... */
33#define TIMER_PHYS (0x80000c00) /* Timer Controller */
34#define RTC_PHYS (0x80000d00) /* Real-time Clock */
35#define GPIO_PHYS (0x80000e00) /* General Purpose IO */
36#define BMI_PHYS (0x80000f00) /* Battery Monitor Interface */
37#define HRTFTC_PHYS (0x80001000) /* High-res TFT Controller (LH7A400) */
38#define ALI_PHYS (0x80001000) /* Advanced LCD Interface (LH7A404) */
39#define WDT_PHYS (0x80001400) /* Watchdog Timer */
40#define SMC_PHYS (0x80002000) /* Static Memory Controller */
41#define SDRC_PHYS (0x80002400) /* SDRAM Controller */
42#define DMAC_PHYS (0x80002800) /* DMA Controller */
43#define CLCDC_PHYS (0x80003000) /* Color LCD Controller */
44
45 /* Physical registers of the LH7A404 */
46
47#define ADC_PHYS (0x80001300) /* A/D & Touchscreen Controller */
48#define VIC1_PHYS (0x80008000) /* Vectored Interrupt Controller 1 */
49#define USBH_PHYS (0x80009000) /* USB OHCI host controller */
50#define VIC2_PHYS (0x8000a000) /* Vectored Interrupt Controller 2 */
51
52/*#define KBD_PHYS (0x80000e00) */
53/*#define LCDICP_PHYS (0x80001000) */
54
55
56 /* Clock/State Controller register */
57
58#define CSC_PWRSR __REG(CSC_PHYS + 0x00) /* Reset register & ID */
59#define CSC_PWRCNT __REG(CSC_PHYS + 0x04) /* Power control */
60#define CSC_CLKSET __REG(CSC_PHYS + 0x20) /* Clock speed control */
61#define CSC_USBDRESET __REG(CSC_PHYS + 0x4c) /* USB Device resets */
62
63#define CSC_PWRCNT_USBH_EN (1<<28) /* USB Host power enable */
64#define CSC_PWRCNT_DMAC_M2M1_EN (1<<27)
65#define CSC_PWRCNT_DMAC_M2M0_EN (1<<26)
66#define CSC_PWRCNT_DMAC_M2P8_EN (1<<25)
67#define CSC_PWRCNT_DMAC_M2P9_EN (1<<24)
68#define CSC_PWRCNT_DMAC_M2P6_EN (1<<23)
69#define CSC_PWRCNT_DMAC_M2P7_EN (1<<22)
70#define CSC_PWRCNT_DMAC_M2P4_EN (1<<21)
71#define CSC_PWRCNT_DMAC_M2P5_EN (1<<20)
72#define CSC_PWRCNT_DMAC_M2P2_EN (1<<19)
73#define CSC_PWRCNT_DMAC_M2P3_EN (1<<18)
74#define CSC_PWRCNT_DMAC_M2P0_EN (1<<17)
75#define CSC_PWRCNT_DMAC_M2P1_EN (1<<16)
76
77#define CSC_PWRSR_CHIPMAN_SHIFT (24)
78#define CSC_PWRSR_CHIPMAN_MASK (0xff)
79#define CSC_PWRSR_CHIPID_SHIFT (16)
80#define CSC_PWRSR_CHIPID_MASK (0xff)
81
82#define CSC_USBDRESET_APBRESETREG (1<<1)
83#define CSC_USBDRESET_IORESETREG (1<<0)
84
85 /* Interrupt Controller registers */
86
87#define INTC_INTSR __REG(INTC_PHYS + 0x00) /* Status */
88#define INTC_INTRSR __REG(INTC_PHYS + 0x04) /* Raw Status */
89#define INTC_INTENS __REG(INTC_PHYS + 0x08) /* Enable Set */
90#define INTC_INTENC __REG(INTC_PHYS + 0x0c) /* Enable Clear */
91
92
93 /* Vectored Interrupted Controller registers */
94
95#define VIC1_IRQSTATUS __REG(VIC1_PHYS + 0x00)
96#define VIC1_FIQSTATUS __REG(VIC1_PHYS + 0x04)
97#define VIC1_RAWINTR __REG(VIC1_PHYS + 0x08)
98#define VIC1_INTSEL __REG(VIC1_PHYS + 0x0c)
99#define VIC1_INTEN __REG(VIC1_PHYS + 0x10)
100#define VIC1_INTENCLR __REG(VIC1_PHYS + 0x14)
101#define VIC1_SOFTINT __REG(VIC1_PHYS + 0x18)
102#define VIC1_SOFTINTCLR __REG(VIC1_PHYS + 0x1c)
103#define VIC1_PROTECT __REG(VIC1_PHYS + 0x20)
104#define VIC1_VECTADDR __REG(VIC1_PHYS + 0x30)
105#define VIC1_NVADDR __REG(VIC1_PHYS + 0x34)
106#define VIC1_VAD0 __REG(VIC1_PHYS + 0x100)
107#define VIC1_VECTCNTL0 __REG(VIC1_PHYS + 0x200)
108#define VIC2_IRQSTATUS __REG(VIC2_PHYS + 0x00)
109#define VIC2_FIQSTATUS __REG(VIC2_PHYS + 0x04)
110#define VIC2_RAWINTR __REG(VIC2_PHYS + 0x08)
111#define VIC2_INTSEL __REG(VIC2_PHYS + 0x0c)
112#define VIC2_INTEN __REG(VIC2_PHYS + 0x10)
113#define VIC2_INTENCLR __REG(VIC2_PHYS + 0x14)
114#define VIC2_SOFTINT __REG(VIC2_PHYS + 0x18)
115#define VIC2_SOFTINTCLR __REG(VIC2_PHYS + 0x1c)
116#define VIC2_PROTECT __REG(VIC2_PHYS + 0x20)
117#define VIC2_VECTADDR __REG(VIC2_PHYS + 0x30)
118#define VIC2_NVADDR __REG(VIC2_PHYS + 0x34)
119#define VIC2_VAD0 __REG(VIC2_PHYS + 0x100)
120#define VIC2_VECTCNTL0 __REG(VIC2_PHYS + 0x200)
121
122#define VIC_CNTL_ENABLE (0x20)
123
124 /* USB Host registers (Open HCI compatible) */
125
126#define USBH_CMDSTATUS __REG(USBH_PHYS + 0x08)
127
128
129 /* GPIO registers */
130
131#define GPIO_INTTYPE1 __REG(GPIO_PHYS + 0x4c) /* Interrupt Type 1 (Edge) */
132#define GPIO_INTTYPE2 __REG(GPIO_PHYS + 0x50) /* Interrupt Type 2 */
133#define GPIO_GPIOFEOI __REG(GPIO_PHYS + 0x54) /* GPIO End-of-Interrupt */
134#define GPIO_GPIOINTEN __REG(GPIO_PHYS + 0x58) /* GPIO Interrupt Enable */
135#define GPIO_INTSTATUS __REG(GPIO_PHYS + 0x5c) /* GPIO Interrupt Status */
136#define GPIO_PINMUX __REG(GPIO_PHYS + 0x2c)
137#define GPIO_PADD __REG(GPIO_PHYS + 0x10)
138#define GPIO_PAD __REG(GPIO_PHYS + 0x00)
139#define GPIO_PCD __REG(GPIO_PHYS + 0x08)
140#define GPIO_PCDD __REG(GPIO_PHYS + 0x18)
141#define GPIO_PEDD __REG(GPIO_PHYS + 0x24)
142#define GPIO_PED __REG(GPIO_PHYS + 0x20)
143
144
145 /* Static Memory Controller registers */
146
147#define SMC_BCR0 __REG(SMC_PHYS + 0x00) /* Bank 0 Configuration */
148#define SMC_BCR1 __REG(SMC_PHYS + 0x04) /* Bank 1 Configuration */
149#define SMC_BCR2 __REG(SMC_PHYS + 0x08) /* Bank 2 Configuration */
150#define SMC_BCR3 __REG(SMC_PHYS + 0x0C) /* Bank 3 Configuration */
151#define SMC_BCR6 __REG(SMC_PHYS + 0x18) /* Bank 6 Configuration */
152#define SMC_BCR7 __REG(SMC_PHYS + 0x1c) /* Bank 7 Configuration */
153
154
155#ifdef CONFIG_MACH_KEV7A400
156# define CPLD_RD_OPT_DIP_SW __REG16(CPLD_PHYS + 0x00) /* Read Option SW */
157# define CPLD_WR_IO_BRD_CTL __REG16(CPLD_PHYS + 0x00) /* Write Control */
158# define CPLD_RD_PB_KEYS __REG16(CPLD_PHYS + 0x02) /* Read Btn Keys */
159# define CPLD_LATCHED_INTS __REG16(CPLD_PHYS + 0x04) /* Read INTR stat. */
160# define CPLD_CL_INT __REG16(CPLD_PHYS + 0x04) /* Clear INTR stat */
161# define CPLD_BOOT_MMC_STATUS __REG16(CPLD_PHYS + 0x06) /* R/O */
162# define CPLD_RD_KPD_ROW_SENSE __REG16(CPLD_PHYS + 0x08)
163# define CPLD_WR_PB_INT_MASK __REG16(CPLD_PHYS + 0x08)
164# define CPLD_RD_BRD_DISP_SW __REG16(CPLD_PHYS + 0x0a)
165# define CPLD_WR_EXT_INT_MASK __REG16(CPLD_PHYS + 0x0a)
166# define CPLD_LCD_PWR_CNTL __REG16(CPLD_PHYS + 0x0c)
167# define CPLD_SEVEN_SEG __REG16(CPLD_PHYS + 0x0e) /* 7 seg. LED mask */
168
169#endif
170
171#if defined (CONFIG_MACH_LPD7A400) || defined (CONFIG_MACH_LPD7A404)
172
173# define CPLD_CONTROL __REG16(CPLD02_PHYS)
174# define CPLD_SPI_DATA __REG16(CPLD06_PHYS)
175# define CPLD_SPI_CONTROL __REG16(CPLD08_PHYS)
176# define CPLD_SPI_EEPROM __REG16(CPLD0A_PHYS)
177# define CPLD_INTERRUPTS __REG16(CPLD0C_PHYS) /* IRQ mask/status */
178# define CPLD_BOOT_MODE __REG16(CPLD0E_PHYS)
179# define CPLD_FLASH __REG16(CPLD10_PHYS)
180# define CPLD_POWER_MGMT __REG16(CPLD12_PHYS)
181# define CPLD_REVISION __REG16(CPLD14_PHYS)
182# define CPLD_GPIO_EXT __REG16(CPLD16_PHYS)
183# define CPLD_GPIO_DATA __REG16(CPLD18_PHYS)
184# define CPLD_GPIO_DIR __REG16(CPLD1A_PHYS)
185
186#endif
187
188 /* Timer registers */
189
190#define TIMER_LOAD1 __REG(TIMER_PHYS + 0x00) /* Timer 1 initial value */
191#define TIMER_VALUE1 __REG(TIMER_PHYS + 0x04) /* Timer 1 current value */
192#define TIMER_CONTROL1 __REG(TIMER_PHYS + 0x08) /* Timer 1 control word */
193#define TIMER_EOI1 __REG(TIMER_PHYS + 0x0c) /* Timer 1 interrupt clear */
194
195#define TIMER_LOAD2 __REG(TIMER_PHYS + 0x20) /* Timer 2 initial value */
196#define TIMER_VALUE2 __REG(TIMER_PHYS + 0x24) /* Timer 2 current value */
197#define TIMER_CONTROL2 __REG(TIMER_PHYS + 0x28) /* Timer 2 control word */
198#define TIMER_EOI2 __REG(TIMER_PHYS + 0x2c) /* Timer 2 interrupt clear */
199
200#define TIMER_BUZZCON __REG(TIMER_PHYS + 0x40) /* Buzzer configuration */
201
202#define TIMER_LOAD3 __REG(TIMER_PHYS + 0x80) /* Timer 3 initial value */
203#define TIMER_VALUE3 __REG(TIMER_PHYS + 0x84) /* Timer 3 current value */
204#define TIMER_CONTROL3 __REG(TIMER_PHYS + 0x88) /* Timer 3 control word */
205#define TIMER_EOI3 __REG(TIMER_PHYS + 0x8c) /* Timer 3 interrupt clear */
206
207#define TIMER_C_ENABLE (1<<7)
208#define TIMER_C_PERIODIC (1<<6)
209#define TIMER_C_FREERUNNING (0)
210#define TIMER_C_2KHZ (0x00) /* 1.986 kHz */
211#define TIMER_C_508KHZ (0x08)
212
213 /* GPIO registers */
214
215#define GPIO_PFDD __REG(GPIO_PHYS + 0x34) /* PF direction */
216#define GPIO_INTTYPE1 __REG(GPIO_PHYS + 0x4c) /* IRQ edge or lvl */
217#define GPIO_INTTYPE2 __REG(GPIO_PHYS + 0x50) /* IRQ activ hi/lo */
218#define GPIO_GPIOFEOI __REG(GPIO_PHYS + 0x54) /* GPIOF end of IRQ */
219#define GPIO_GPIOFINTEN __REG(GPIO_PHYS + 0x58) /* GPIOF IRQ enable */
220#define GPIO_INTSTATUS __REG(GPIO_PHYS + 0x5c) /* GPIOF IRQ latch */
221#define GPIO_RAWINTSTATUS __REG(GPIO_PHYS + 0x60) /* GPIOF IRQ raw */
222
223
224#endif /* _ASM_ARCH_REGISTERS_H */
diff --git a/include/asm-arm/arch-lh7a40x/system.h b/include/asm-arm/arch-lh7a40x/system.h
deleted file mode 100644
index e1df8aa460f2..000000000000
--- a/include/asm-arm/arch-lh7a40x/system.h
+++ /dev/null
@@ -1,19 +0,0 @@
1/* include/asm-arm/arch-lh7a40x/system.h
2 *
3 * Copyright (C) 2004 Coastal Environmental Systems
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * version 2 as published by the Free Software Foundation.
8 *
9 */
10
11static inline void arch_idle(void)
12{
13 cpu_do_idle ();
14}
15
16static inline void arch_reset(char mode)
17{
18 cpu_reset (0);
19}
diff --git a/include/asm-arm/arch-lh7a40x/timex.h b/include/asm-arm/arch-lh7a40x/timex.h
deleted file mode 100644
index fa726b670829..000000000000
--- a/include/asm-arm/arch-lh7a40x/timex.h
+++ /dev/null
@@ -1,17 +0,0 @@
1/* include/asm-arm/arch-lh7a40x/timex.h
2 *
3 * Copyright (C) 2004 Coastal Environmental Systems
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * version 2 as published by the Free Software Foundation.
8 *
9 */
10
11#include <asm/arch/constants.h>
12
13#define CLOCK_TICK_RATE (PLL_CLOCK/6/16)
14
15/*
16#define CLOCK_TICK_RATE 3686400
17*/
diff --git a/include/asm-arm/arch-lh7a40x/uncompress.h b/include/asm-arm/arch-lh7a40x/uncompress.h
deleted file mode 100644
index 3d1ce0426a33..000000000000
--- a/include/asm-arm/arch-lh7a40x/uncompress.h
+++ /dev/null
@@ -1,38 +0,0 @@
1/* include/asm-arm/arch-lh7a40x/uncompress.h
2 *
3 * Copyright (C) 2004 Coastal Environmental Systems
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * version 2 as published by the Free Software Foundation.
8 *
9 */
10
11#include <asm/arch/registers.h>
12
13#ifndef UART_R_DATA
14# define UART_R_DATA (0x00)
15#endif
16#ifndef UART_R_STATUS
17# define UART_R_STATUS (0x10)
18#endif
19#define nTxRdy (0x20) /* Not TxReady (literally Tx FIFO full) */
20
21 /* Access UART with physical addresses before MMU is setup */
22#define UART_STATUS (*(volatile unsigned long*) (UART2_PHYS + UART_R_STATUS))
23#define UART_DATA (*(volatile unsigned long*) (UART2_PHYS + UART_R_DATA))
24
25static inline void putc(int ch)
26{
27 while (UART_STATUS & nTxRdy)
28 barrier();
29 UART_DATA = ch;
30}
31
32static inline void flush(void)
33{
34}
35
36 /* NULL functions; we don't presently need them */
37#define arch_decomp_setup()
38#define arch_decomp_wdog()
diff --git a/include/asm-arm/arch-lh7a40x/vmalloc.h b/include/asm-arm/arch-lh7a40x/vmalloc.h
deleted file mode 100644
index 8163e45109b9..000000000000
--- a/include/asm-arm/arch-lh7a40x/vmalloc.h
+++ /dev/null
@@ -1,10 +0,0 @@
1/* include/asm-arm/arch-lh7a40x/vmalloc.h
2 *
3 * Copyright (C) 2004 Coastal Environmental Systems
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * version 2 as published by the Free Software Foundation.
8 *
9 */
10#define VMALLOC_END (0xe8000000)
diff --git a/include/asm-arm/arch-loki/debug-macro.S b/include/asm-arm/arch-loki/debug-macro.S
deleted file mode 100644
index 585502e96513..000000000000
--- a/include/asm-arm/arch-loki/debug-macro.S
+++ /dev/null
@@ -1,20 +0,0 @@
1/*
2 * include/asm-arm/arch-loki/debug-macro.S
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7*/
8
9#include <asm/arch/loki.h>
10
11 .macro addruart,rx
12 mrc p15, 0, \rx, c1, c0
13 tst \rx, #1 @ MMU enabled?
14 ldreq \rx, =LOKI_REGS_PHYS_BASE
15 ldrne \rx, =LOKI_REGS_VIRT_BASE
16 orr \rx, \rx, #0x00012000
17 .endm
18
19#define UART_SHIFT 2
20#include <asm/hardware/debug-8250.S>
diff --git a/include/asm-arm/arch-loki/entry-macro.S b/include/asm-arm/arch-loki/entry-macro.S
deleted file mode 100644
index 693257cdbeb8..000000000000
--- a/include/asm-arm/arch-loki/entry-macro.S
+++ /dev/null
@@ -1,30 +0,0 @@
1/*
2 * include/asm-arm/arch-loki/entry-macro.S
3 *
4 * Low-level IRQ helper macros for Marvell Loki (88RC8480) platforms
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10
11#include <asm/arch/loki.h>
12
13 .macro disable_fiq
14 .endm
15
16 .macro arch_ret_to_user, tmp1, tmp2
17 .endm
18
19 .macro get_irqnr_preamble, base, tmp
20 ldr \base, =IRQ_VIRT_BASE
21 .endm
22
23 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
24 ldr \irqstat, [\base, #IRQ_CAUSE_OFF]
25 ldr \tmp, [\base, #IRQ_MASK_OFF]
26 mov \irqnr, #0
27 ands \irqstat, \irqstat, \tmp
28 clzne \irqnr, \irqstat
29 rsbne \irqnr, \irqnr, #31
30 .endm
diff --git a/include/asm-arm/arch-loki/hardware.h b/include/asm-arm/arch-loki/hardware.h
deleted file mode 100644
index f65b01c733b6..000000000000
--- a/include/asm-arm/arch-loki/hardware.h
+++ /dev/null
@@ -1,15 +0,0 @@
1/*
2 * include/asm-arm/arch-loki/hardware.h
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 */
8
9#ifndef __ASM_ARCH_HARDWARE_H
10#define __ASM_ARCH_HARDWARE_H
11
12#include "loki.h"
13
14
15#endif
diff --git a/include/asm-arm/arch-loki/io.h b/include/asm-arm/arch-loki/io.h
deleted file mode 100644
index e7418a915e75..000000000000
--- a/include/asm-arm/arch-loki/io.h
+++ /dev/null
@@ -1,26 +0,0 @@
1/*
2 * include/asm-arm/arch-loki/io.h
3 *
4 * This file is licensed under the terms of the GNU General Public
5 * License version 2. This program is licensed "as is" without any
6 * warranty of any kind, whether express or implied.
7 */
8
9#ifndef __ASM_ARCH_IO_H
10#define __ASM_ARCH_IO_H
11
12#include "loki.h"
13
14#define IO_SPACE_LIMIT 0xffffffff
15
16static inline void __iomem *__io(unsigned long addr)
17{
18 return (void __iomem *)((addr - LOKI_PCIE0_IO_PHYS_BASE)
19 + LOKI_PCIE0_IO_VIRT_BASE);
20}
21
22#define __io(a) __io(a)
23#define __mem_pci(a) (a)
24
25
26#endif
diff --git a/include/asm-arm/arch-loki/irqs.h b/include/asm-arm/arch-loki/irqs.h
deleted file mode 100644
index 7e4971438072..000000000000
--- a/include/asm-arm/arch-loki/irqs.h
+++ /dev/null
@@ -1,58 +0,0 @@
1/*
2 * include/asm-arm/arch-loki/irqs.h
3 *
4 * IRQ definitions for Marvell Loki (88RC8480) SoCs
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10
11#ifndef __ASM_ARCH_IRQS_H
12#define __ASM_ARCH_IRQS_H
13
14#include "loki.h" /* need GPIO_MAX */
15
16/*
17 * Interrupt Controller
18 */
19#define IRQ_LOKI_PCIE_A_CPU_DRBL 0
20#define IRQ_LOKI_CPU_PCIE_A_DRBL 1
21#define IRQ_LOKI_PCIE_B_CPU_DRBL 2
22#define IRQ_LOKI_CPU_PCIE_B_DRBL 3
23#define IRQ_LOKI_COM_A_ERR 6
24#define IRQ_LOKI_COM_A_IN 7
25#define IRQ_LOKI_COM_A_OUT 8
26#define IRQ_LOKI_COM_B_ERR 9
27#define IRQ_LOKI_COM_B_IN 10
28#define IRQ_LOKI_COM_B_OUT 11
29#define IRQ_LOKI_DMA_A 12
30#define IRQ_LOKI_DMA_B 13
31#define IRQ_LOKI_SAS_A 14
32#define IRQ_LOKI_SAS_B 15
33#define IRQ_LOKI_DDR 16
34#define IRQ_LOKI_XOR 17
35#define IRQ_LOKI_BRIDGE 18
36#define IRQ_LOKI_PCIE_A_ERR 20
37#define IRQ_LOKI_PCIE_A_INT 21
38#define IRQ_LOKI_PCIE_B_ERR 22
39#define IRQ_LOKI_PCIE_B_INT 23
40#define IRQ_LOKI_GBE_A_INT 24
41#define IRQ_LOKI_GBE_B_INT 25
42#define IRQ_LOKI_DEV_ERR 26
43#define IRQ_LOKI_UART0 27
44#define IRQ_LOKI_UART1 28
45#define IRQ_LOKI_TWSI 29
46#define IRQ_LOKI_GPIO_23_0 30
47#define IRQ_LOKI_GPIO_25_24 31
48
49/*
50 * Loki General Purpose Pins
51 */
52#define IRQ_LOKI_GPIO_START 32
53#define NR_GPIO_IRQS GPIO_MAX
54
55#define NR_IRQS (IRQ_LOKI_GPIO_START + NR_GPIO_IRQS)
56
57
58#endif
diff --git a/include/asm-arm/arch-loki/loki.h b/include/asm-arm/arch-loki/loki.h
deleted file mode 100644
index 5dd05ee0a4e6..000000000000
--- a/include/asm-arm/arch-loki/loki.h
+++ /dev/null
@@ -1,97 +0,0 @@
1/*
2 * include/asm-arm/arch-loki/loki.h
3 *
4 * Generic definitions for Marvell Loki (88RC8480) SoC flavors
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10
11#ifndef __ASM_ARCH_LOKI_H
12#define __ASM_ARCH_LOKI_H
13
14/*
15 * Marvell Loki (88RC8480) address maps.
16 *
17 * phys
18 * d0000000 on-chip peripheral registers
19 * e0000000 PCIe 0 Memory space
20 * e8000000 PCIe 1 Memory space
21 * f0000000 PCIe 0 I/O space
22 * f0100000 PCIe 1 I/O space
23 *
24 * virt phys size
25 * fed00000 d0000000 1M on-chip peripheral registers
26 * fee00000 f0000000 64K PCIe 0 I/O space
27 * fef00000 f0100000 64K PCIe 1 I/O space
28 */
29
30#define LOKI_REGS_PHYS_BASE 0xd0000000
31#define LOKI_REGS_VIRT_BASE 0xfed00000
32#define LOKI_REGS_SIZE SZ_1M
33
34#define LOKI_PCIE0_IO_PHYS_BASE 0xf0000000
35#define LOKI_PCIE0_IO_VIRT_BASE 0xfee00000
36#define LOKI_PCIE0_IO_BUS_BASE 0x00000000
37#define LOKI_PCIE0_IO_SIZE SZ_64K
38
39#define LOKI_PCIE1_IO_PHYS_BASE 0xf0100000
40#define LOKI_PCIE1_IO_VIRT_BASE 0xfef00000
41#define LOKI_PCIE1_IO_BUS_BASE 0x00000000
42#define LOKI_PCIE1_IO_SIZE SZ_64K
43
44#define LOKI_PCIE0_MEM_PHYS_BASE 0xe0000000
45#define LOKI_PCIE0_MEM_SIZE SZ_128M
46
47#define LOKI_PCIE1_MEM_PHYS_BASE 0xe8000000
48#define LOKI_PCIE1_MEM_SIZE SZ_128M
49
50/*
51 * Register Map
52 */
53#define DEV_BUS_PHYS_BASE (LOKI_REGS_PHYS_BASE | 0x10000)
54#define DEV_BUS_VIRT_BASE (LOKI_REGS_VIRT_BASE | 0x10000)
55#define UART0_PHYS_BASE (DEV_BUS_PHYS_BASE | 0x2000)
56#define UART0_VIRT_BASE (DEV_BUS_VIRT_BASE | 0x2000)
57#define UART1_PHYS_BASE (DEV_BUS_PHYS_BASE | 0x2100)
58#define UART1_VIRT_BASE (DEV_BUS_VIRT_BASE | 0x2100)
59
60#define BRIDGE_VIRT_BASE (LOKI_REGS_VIRT_BASE | 0x20000)
61#define BRIDGE_REG(x) (BRIDGE_VIRT_BASE | (x))
62#define RSTOUTn_MASK (BRIDGE_VIRT_BASE | 0x0108)
63#define SOFT_RESET_OUT_EN 0x00000004
64#define SYSTEM_SOFT_RESET (BRIDGE_VIRT_BASE | 0x010c)
65#define SOFT_RESET 0x00000001
66#define BRIDGE_CAUSE (BRIDGE_VIRT_BASE | 0x0110)
67#define BRIDGE_MASK (BRIDGE_VIRT_BASE | 0x0114)
68#define BRIDGE_INT_TIMER0 0x0002
69#define BRIDGE_INT_TIMER1 0x0004
70#define BRIDGE_INT_TIMER1_CLR 0x0004
71#define IRQ_VIRT_BASE (BRIDGE_VIRT_BASE | 0x0200)
72#define IRQ_CAUSE_OFF 0x0000
73#define IRQ_MASK_OFF 0x0004
74#define TIMER_VIRT_BASE (BRIDGE_VIRT_BASE | 0x0300)
75
76#define PCIE0_VIRT_BASE (LOKI_REGS_VIRT_BASE | 0x30000)
77
78#define PCIE1_VIRT_BASE (LOKI_REGS_VIRT_BASE | 0x40000)
79
80#define SAS0_PHYS_BASE (LOKI_REGS_PHYS_BASE | 0x80000)
81
82#define SAS1_PHYS_BASE (LOKI_REGS_PHYS_BASE | 0x90000)
83
84#define GE0_PHYS_BASE (LOKI_REGS_PHYS_BASE | 0xa0000)
85#define GE0_VIRT_BASE (LOKI_REGS_VIRT_BASE | 0xa0000)
86
87#define GE1_PHYS_BASE (LOKI_REGS_PHYS_BASE | 0xb0000)
88#define GE1_VIRT_BASE (LOKI_REGS_VIRT_BASE | 0xb0000)
89
90#define DDR_VIRT_BASE (LOKI_REGS_VIRT_BASE | 0xf0000)
91#define DDR_REG(x) (DDR_VIRT_BASE | (x))
92
93
94#define GPIO_MAX 8
95
96
97#endif
diff --git a/include/asm-arm/arch-loki/memory.h b/include/asm-arm/arch-loki/memory.h
deleted file mode 100644
index 835101e49875..000000000000
--- a/include/asm-arm/arch-loki/memory.h
+++ /dev/null
@@ -1,14 +0,0 @@
1/*
2 * include/asm-arm/arch-loki/memory.h
3 */
4
5#ifndef __ASM_ARCH_MEMORY_H
6#define __ASM_ARCH_MEMORY_H
7
8#define PHYS_OFFSET UL(0x00000000)
9
10#define __virt_to_bus(x) __virt_to_phys(x)
11#define __bus_to_virt(x) __phys_to_virt(x)
12
13
14#endif
diff --git a/include/asm-arm/arch-loki/system.h b/include/asm-arm/arch-loki/system.h
deleted file mode 100644
index a3568ac8ec35..000000000000
--- a/include/asm-arm/arch-loki/system.h
+++ /dev/null
@@ -1,37 +0,0 @@
1/*
2 * include/asm-arm/arch-loki/system.h
3 *
4 * This file is licensed under the terms of the GNU General Public
5 * License version 2. This program is licensed "as is" without any
6 * warranty of any kind, whether express or implied.
7 */
8
9#ifndef __ASM_ARCH_SYSTEM_H
10#define __ASM_ARCH_SYSTEM_H
11
12#include <asm/arch/hardware.h>
13#include <asm/arch/loki.h>
14
15static inline void arch_idle(void)
16{
17 cpu_do_idle();
18}
19
20static inline void arch_reset(char mode)
21{
22 /*
23 * Enable soft reset to assert RSTOUTn.
24 */
25 writel(SOFT_RESET_OUT_EN, RSTOUTn_MASK);
26
27 /*
28 * Assert soft reset.
29 */
30 writel(SOFT_RESET, SYSTEM_SOFT_RESET);
31
32 while (1)
33 ;
34}
35
36
37#endif
diff --git a/include/asm-arm/arch-loki/timex.h b/include/asm-arm/arch-loki/timex.h
deleted file mode 100644
index 940014f97cae..000000000000
--- a/include/asm-arm/arch-loki/timex.h
+++ /dev/null
@@ -1,11 +0,0 @@
1/*
2 * include/asm-arm/arch-loki/timex.h
3 *
4 * This file is licensed under the terms of the GNU General Public
5 * License version 2. This program is licensed "as is" without any
6 * warranty of any kind, whether express or implied.
7 */
8
9#define CLOCK_TICK_RATE (100 * HZ)
10
11#define LOKI_TCLK 180000000
diff --git a/include/asm-arm/arch-loki/uncompress.h b/include/asm-arm/arch-loki/uncompress.h
deleted file mode 100644
index 89a0cf88d3a5..000000000000
--- a/include/asm-arm/arch-loki/uncompress.h
+++ /dev/null
@@ -1,47 +0,0 @@
1/*
2 * include/asm-arm/arch-loki/uncompress.h
3 *
4 * This file is licensed under the terms of the GNU General Public
5 * License version 2. This program is licensed "as is" without any
6 * warranty of any kind, whether express or implied.
7 */
8
9#include <linux/serial_reg.h>
10#include <asm/arch/loki.h>
11
12#define SERIAL_BASE ((unsigned char *)UART0_PHYS_BASE)
13
14static void putc(const char c)
15{
16 unsigned char *base = SERIAL_BASE;
17 int i;
18
19 for (i = 0; i < 0x1000; i++) {
20 if (base[UART_LSR << 2] & UART_LSR_THRE)
21 break;
22 barrier();
23 }
24
25 base[UART_TX << 2] = c;
26}
27
28static void flush(void)
29{
30 unsigned char *base = SERIAL_BASE;
31 unsigned char mask;
32 int i;
33
34 mask = UART_LSR_TEMT | UART_LSR_THRE;
35
36 for (i = 0; i < 0x1000; i++) {
37 if ((base[UART_LSR << 2] & mask) == mask)
38 break;
39 barrier();
40 }
41}
42
43/*
44 * nothing to do
45 */
46#define arch_decomp_setup()
47#define arch_decomp_wdog()
diff --git a/include/asm-arm/arch-loki/vmalloc.h b/include/asm-arm/arch-loki/vmalloc.h
deleted file mode 100644
index f5be06220491..000000000000
--- a/include/asm-arm/arch-loki/vmalloc.h
+++ /dev/null
@@ -1,5 +0,0 @@
1/*
2 * include/asm-arm/arch-loki/vmalloc.h
3 */
4
5#define VMALLOC_END 0xfe800000
diff --git a/include/asm-arm/arch-msm/board.h b/include/asm-arm/arch-msm/board.h
deleted file mode 100644
index 763051f8ba14..000000000000
--- a/include/asm-arm/arch-msm/board.h
+++ /dev/null
@@ -1,37 +0,0 @@
1/* linux/include/asm-arm/arch-msm/board.h
2 *
3 * Copyright (C) 2007 Google, Inc.
4 * Author: Brian Swetland <swetland@google.com>
5 *
6 * This software is licensed under the terms of the GNU General Public
7 * License version 2, as published by the Free Software Foundation, and
8 * may be copied, distributed, and modified under those terms.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 */
16
17#ifndef __ASM_ARCH_MSM_BOARD_H
18#define __ASM_ARCH_MSM_BOARD_H
19
20#include <linux/types.h>
21
22/* platform device data structures */
23
24struct msm_mddi_platform_data
25{
26 void (*panel_power)(int on);
27 unsigned has_vsync_irq:1;
28};
29
30/* common init routines for use by arch/arm/mach-msm/board-*.c */
31
32void __init msm_add_devices(void);
33void __init msm_map_common_io(void);
34void __init msm_init_irq(void);
35void __init msm_init_gpio(void);
36
37#endif
diff --git a/include/asm-arm/arch-msm/debug-macro.S b/include/asm-arm/arch-msm/debug-macro.S
deleted file mode 100644
index 393d5272e506..000000000000
--- a/include/asm-arm/arch-msm/debug-macro.S
+++ /dev/null
@@ -1,40 +0,0 @@
1/* include/asm-arm/arch-msm7200/debug-macro.S
2 *
3 * Copyright (C) 2007 Google, Inc.
4 * Author: Brian Swetland <swetland@google.com>
5 *
6 * This software is licensed under the terms of the GNU General Public
7 * License version 2, as published by the Free Software Foundation, and
8 * may be copied, distributed, and modified under those terms.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 */
16
17#include <asm/hardware.h>
18#include <asm/arch/msm_iomap.h>
19
20 .macro addruart,rx
21 @ see if the MMU is enabled and select appropriate base address
22 mrc p15, 0, \rx, c1, c0
23 tst \rx, #1
24 ldreq \rx, =MSM_UART1_PHYS
25 ldrne \rx, =MSM_UART1_BASE
26 .endm
27
28 .macro senduart,rd,rx
29 str \rd, [\rx, #0x0C]
30 .endm
31
32 .macro waituart,rd,rx
33 @ wait for TX_READY
341: ldr \rd, [\rx, #0x08]
35 tst \rd, #0x04
36 beq 1b
37 .endm
38
39 .macro busyuart,rd,rx
40 .endm
diff --git a/include/asm-arm/arch-msm/dma.h b/include/asm-arm/arch-msm/dma.h
deleted file mode 100644
index e4b565b27b35..000000000000
--- a/include/asm-arm/arch-msm/dma.h
+++ /dev/null
@@ -1,151 +0,0 @@
1/* linux/include/asm-arm/arch-msm/dma.h
2 *
3 * Copyright (C) 2007 Google, Inc.
4 *
5 * This software is licensed under the terms of the GNU General Public
6 * License version 2, as published by the Free Software Foundation, and
7 * may be copied, distributed, and modified under those terms.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 */
15
16#ifndef __ASM_ARCH_MSM_DMA_H
17
18#include <linux/list.h>
19#include <asm/arch/msm_iomap.h>
20
21struct msm_dmov_cmd {
22 struct list_head list;
23 unsigned int cmdptr;
24 void (*complete_func)(struct msm_dmov_cmd *cmd, unsigned int result);
25/* void (*user_result_func)(struct msm_dmov_cmd *cmd); */
26};
27
28void msm_dmov_enqueue_cmd(unsigned id, struct msm_dmov_cmd *cmd);
29void msm_dmov_stop_cmd(unsigned id, struct msm_dmov_cmd *cmd);
30int msm_dmov_exec_cmd(unsigned id, unsigned int cmdptr);
31/* int msm_dmov_exec_cmd_etc(unsigned id, unsigned int cmdptr, int timeout, int interruptible); */
32
33
34
35#define DMOV_SD0(off, ch) (MSM_DMOV_BASE + 0x0000 + (off) + ((ch) << 2))
36#define DMOV_SD1(off, ch) (MSM_DMOV_BASE + 0x0400 + (off) + ((ch) << 2))
37#define DMOV_SD2(off, ch) (MSM_DMOV_BASE + 0x0800 + (off) + ((ch) << 2))
38#define DMOV_SD3(off, ch) (MSM_DMOV_BASE + 0x0C00 + (off) + ((ch) << 2))
39
40/* only security domain 3 is available to the ARM11
41 * SD0 -> mARM trusted, SD1 -> mARM nontrusted, SD2 -> aDSP, SD3 -> aARM
42 */
43
44#define DMOV_CMD_PTR(ch) DMOV_SD3(0x000, ch)
45#define DMOV_CMD_LIST (0 << 29) /* does not work */
46#define DMOV_CMD_PTR_LIST (1 << 29) /* works */
47#define DMOV_CMD_INPUT_CFG (2 << 29) /* untested */
48#define DMOV_CMD_OUTPUT_CFG (3 << 29) /* untested */
49#define DMOV_CMD_ADDR(addr) ((addr) >> 3)
50
51#define DMOV_RSLT(ch) DMOV_SD3(0x040, ch)
52#define DMOV_RSLT_VALID (1 << 31) /* 0 == host has empties result fifo */
53#define DMOV_RSLT_ERROR (1 << 3)
54#define DMOV_RSLT_FLUSH (1 << 2)
55#define DMOV_RSLT_DONE (1 << 1) /* top pointer done */
56#define DMOV_RSLT_USER (1 << 0) /* command with FR force result */
57
58#define DMOV_FLUSH0(ch) DMOV_SD3(0x080, ch)
59#define DMOV_FLUSH1(ch) DMOV_SD3(0x0C0, ch)
60#define DMOV_FLUSH2(ch) DMOV_SD3(0x100, ch)
61#define DMOV_FLUSH3(ch) DMOV_SD3(0x140, ch)
62#define DMOV_FLUSH4(ch) DMOV_SD3(0x180, ch)
63#define DMOV_FLUSH5(ch) DMOV_SD3(0x1C0, ch)
64
65#define DMOV_STATUS(ch) DMOV_SD3(0x200, ch)
66#define DMOV_STATUS_RSLT_COUNT(n) (((n) >> 29))
67#define DMOV_STATUS_CMD_COUNT(n) (((n) >> 27) & 3)
68#define DMOV_STATUS_RSLT_VALID (1 << 1)
69#define DMOV_STATUS_CMD_PTR_RDY (1 << 0)
70
71#define DMOV_ISR DMOV_SD3(0x380, 0)
72
73#define DMOV_CONFIG(ch) DMOV_SD3(0x300, ch)
74#define DMOV_CONFIG_FORCE_TOP_PTR_RSLT (1 << 2)
75#define DMOV_CONFIG_FORCE_FLUSH_RSLT (1 << 1)
76#define DMOV_CONFIG_IRQ_EN (1 << 0)
77
78/* channel assignments */
79
80#define DMOV_NAND_CHAN 7
81#define DMOV_NAND_CRCI_CMD 5
82#define DMOV_NAND_CRCI_DATA 4
83
84#define DMOV_SDC1_CHAN 8
85#define DMOV_SDC1_CRCI 6
86
87#define DMOV_SDC2_CHAN 8
88#define DMOV_SDC2_CRCI 7
89
90#define DMOV_TSIF_CHAN 10
91#define DMOV_TSIF_CRCI 10
92
93#define DMOV_USB_CHAN 11
94
95/* no client rate control ifc (eg, ram) */
96#define DMOV_NONE_CRCI 0
97
98
99/* If the CMD_PTR register has CMD_PTR_LIST selected, the data mover
100 * is going to walk a list of 32bit pointers as described below. Each
101 * pointer points to a *array* of dmov_s, etc structs. The last pointer
102 * in the list is marked with CMD_PTR_LP. The last struct in each array
103 * is marked with CMD_LC (see below).
104 */
105#define CMD_PTR_ADDR(addr) ((addr) >> 3)
106#define CMD_PTR_LP (1 << 31) /* last pointer */
107#define CMD_PTR_PT (3 << 29) /* ? */
108
109/* Single Item Mode */
110typedef struct {
111 unsigned cmd;
112 unsigned src;
113 unsigned dst;
114 unsigned len;
115} dmov_s;
116
117/* Scatter/Gather Mode */
118typedef struct {
119 unsigned cmd;
120 unsigned src_dscr;
121 unsigned dst_dscr;
122 unsigned _reserved;
123} dmov_sg;
124
125/* bits for the cmd field of the above structures */
126
127#define CMD_LC (1 << 31) /* last command */
128#define CMD_FR (1 << 22) /* force result -- does not work? */
129#define CMD_OCU (1 << 21) /* other channel unblock */
130#define CMD_OCB (1 << 20) /* other channel block */
131#define CMD_TCB (1 << 19) /* ? */
132#define CMD_DAH (1 << 18) /* destination address hold -- does not work?*/
133#define CMD_SAH (1 << 17) /* source address hold -- does not work? */
134
135#define CMD_MODE_SINGLE (0 << 0) /* dmov_s structure used */
136#define CMD_MODE_SG (1 << 0) /* untested */
137#define CMD_MODE_IND_SG (2 << 0) /* untested */
138#define CMD_MODE_BOX (3 << 0) /* untested */
139
140#define CMD_DST_SWAP_BYTES (1 << 14) /* exchange each byte n with byte n+1 */
141#define CMD_DST_SWAP_SHORTS (1 << 15) /* exchange each short n with short n+1 */
142#define CMD_DST_SWAP_WORDS (1 << 16) /* exchange each word n with word n+1 */
143
144#define CMD_SRC_SWAP_BYTES (1 << 11) /* exchange each byte n with byte n+1 */
145#define CMD_SRC_SWAP_SHORTS (1 << 12) /* exchange each short n with short n+1 */
146#define CMD_SRC_SWAP_WORDS (1 << 13) /* exchange each word n with word n+1 */
147
148#define CMD_DST_CRCI(n) (((n) & 15) << 7)
149#define CMD_SRC_CRCI(n) (((n) & 15) << 3)
150
151#endif
diff --git a/include/asm-arm/arch-msm/entry-macro.S b/include/asm-arm/arch-msm/entry-macro.S
deleted file mode 100644
index ee24aece4cb0..000000000000
--- a/include/asm-arm/arch-msm/entry-macro.S
+++ /dev/null
@@ -1,38 +0,0 @@
1/* include/asm-arm/arch-msm7200/entry-macro.S
2 *
3 * Copyright (C) 2007 Google, Inc.
4 * Author: Brian Swetland <swetland@google.com>
5 *
6 * This software is licensed under the terms of the GNU General Public
7 * License version 2, as published by the Free Software Foundation, and
8 * may be copied, distributed, and modified under those terms.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 */
16
17#include <asm/arch/msm_iomap.h>
18
19 .macro disable_fiq
20 .endm
21
22 .macro get_irqnr_preamble, base, tmp
23 @ enable imprecise aborts
24 cpsie a
25 mov \base, #MSM_VIC_BASE
26 .endm
27
28 .macro arch_ret_to_user, tmp1, tmp2
29 .endm
30
31 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
32 @ 0xD0 has irq# or old irq# if the irq has been handled
33 @ 0xD4 has irq# or -1 if none pending *but* if you just
34 @ read 0xD4 you never get the first irq for some reason
35 ldr \irqnr, [\base, #0xD0]
36 ldr \irqnr, [\base, #0xD4]
37 cmp \irqnr, #0xffffffff
38 .endm
diff --git a/include/asm-arm/arch-msm/hardware.h b/include/asm-arm/arch-msm/hardware.h
deleted file mode 100644
index 89af2b70182f..000000000000
--- a/include/asm-arm/arch-msm/hardware.h
+++ /dev/null
@@ -1,18 +0,0 @@
1/* linux/include/asm-arm/arch-msm/hardware.h
2 *
3 * Copyright (C) 2007 Google, Inc.
4 *
5 * This software is licensed under the terms of the GNU General Public
6 * License version 2, as published by the Free Software Foundation, and
7 * may be copied, distributed, and modified under those terms.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 */
15
16#ifndef __ASM_ARCH_MSM_HARDWARE_H
17
18#endif
diff --git a/include/asm-arm/arch-msm/io.h b/include/asm-arm/arch-msm/io.h
deleted file mode 100644
index 4645ae26b62a..000000000000
--- a/include/asm-arm/arch-msm/io.h
+++ /dev/null
@@ -1,33 +0,0 @@
1/* include/asm-arm/arch-msm/io.h
2 *
3 * Copyright (C) 2007 Google, Inc.
4 *
5 * This software is licensed under the terms of the GNU General Public
6 * License version 2, as published by the Free Software Foundation, and
7 * may be copied, distributed, and modified under those terms.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 */
15
16#ifndef __ASM_ARM_ARCH_IO_H
17#define __ASM_ARM_ARCH_IO_H
18
19#define IO_SPACE_LIMIT 0xffffffff
20
21#define __arch_ioremap __msm_ioremap
22#define __arch_iounmap __iounmap
23
24void __iomem *__msm_ioremap(unsigned long phys_addr, size_t size, unsigned int mtype);
25
26static inline void __iomem *__io(unsigned long addr)
27{
28 return (void __iomem *)addr;
29}
30#define __io(a) __io(a)
31#define __mem_pci(a) (a)
32
33#endif
diff --git a/include/asm-arm/arch-msm/irqs.h b/include/asm-arm/arch-msm/irqs.h
deleted file mode 100644
index e62a108b1857..000000000000
--- a/include/asm-arm/arch-msm/irqs.h
+++ /dev/null
@@ -1,90 +0,0 @@
1/* linux/include/asm-arm/arch-msm/irqs.h
2 *
3 * Copyright (C) 2007 Google, Inc.
4 * Author: Brian Swetland <swetland@google.com>
5 *
6 * This software is licensed under the terms of the GNU General Public
7 * License version 2, as published by the Free Software Foundation, and
8 * may be copied, distributed, and modified under those terms.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 */
16
17#ifndef __ASM_ARCH_MSM_IRQS_H
18#define __ASM_ARCH_MSM_IRQS_H
19
20/* MSM ARM11 Interrupt Numbers */
21/* See 80-VE113-1 A, pp219-221 */
22
23#define INT_A9_M2A_0 0
24#define INT_A9_M2A_1 1
25#define INT_A9_M2A_2 2
26#define INT_A9_M2A_3 3
27#define INT_A9_M2A_4 4
28#define INT_A9_M2A_5 5
29#define INT_A9_M2A_6 6
30#define INT_GP_TIMER_EXP 7
31#define INT_DEBUG_TIMER_EXP 8
32#define INT_UART1 9
33#define INT_UART2 10
34#define INT_UART3 11
35#define INT_UART1_RX 12
36#define INT_UART2_RX 13
37#define INT_UART3_RX 14
38#define INT_USB_OTG 15
39#define INT_MDDI_PRI 16
40#define INT_MDDI_EXT 17
41#define INT_MDDI_CLIENT 18
42#define INT_MDP 19
43#define INT_GRAPHICS 20
44#define INT_ADM_AARM 21
45#define INT_ADSP_A11 22
46#define INT_ADSP_A9_A11 23
47#define INT_SDC1_0 24
48#define INT_SDC1_1 25
49#define INT_SDC2_0 26
50#define INT_SDC2_1 27
51#define INT_KEYSENSE 28
52#define INT_TCHSCRN_SSBI 29
53#define INT_TCHSCRN1 30
54#define INT_TCHSCRN2 31
55
56#define INT_GPIO_GROUP1 (32 + 0)
57#define INT_GPIO_GROUP2 (32 + 1)
58#define INT_PWB_I2C (32 + 2)
59#define INT_SOFTRESET (32 + 3)
60#define INT_NAND_WR_ER_DONE (32 + 4)
61#define INT_NAND_OP_DONE (32 + 5)
62#define INT_PBUS_ARM11 (32 + 6)
63#define INT_AXI_MPU_SMI (32 + 7)
64#define INT_AXI_MPU_EBI1 (32 + 8)
65#define INT_AD_HSSD (32 + 9)
66#define INT_ARM11_PMU (32 + 10)
67#define INT_ARM11_DMA (32 + 11)
68#define INT_TSIF_IRQ (32 + 12)
69#define INT_UART1DM_IRQ (32 + 13)
70#define INT_UART1DM_RX (32 + 14)
71#define INT_USB_HS (32 + 15)
72#define INT_SDC3_0 (32 + 16)
73#define INT_SDC3_1 (32 + 17)
74#define INT_SDC4_0 (32 + 18)
75#define INT_SDC4_1 (32 + 19)
76#define INT_UART2DM_RX (32 + 20)
77#define INT_UART2DM_IRQ (32 + 21)
78
79/* 22-31 are reserved */
80
81#define MSM_IRQ_BIT(irq) (1 << ((irq) & 31))
82
83#define NR_MSM_IRQS 64
84#define NR_GPIO_IRQS 122
85#define NR_BOARD_IRQS 64
86#define NR_IRQS (NR_MSM_IRQS + NR_GPIO_IRQS + NR_BOARD_IRQS)
87
88#define MSM_GPIO_TO_INT(n) (NR_MSM_IRQS + (n))
89
90#endif
diff --git a/include/asm-arm/arch-msm/memory.h b/include/asm-arm/arch-msm/memory.h
deleted file mode 100644
index b5ce0e9ac86d..000000000000
--- a/include/asm-arm/arch-msm/memory.h
+++ /dev/null
@@ -1,27 +0,0 @@
1/* linux/include/asm-arm/arch-msm/memory.h
2 *
3 * Copyright (C) 2007 Google, Inc.
4 *
5 * This software is licensed under the terms of the GNU General Public
6 * License version 2, as published by the Free Software Foundation, and
7 * may be copied, distributed, and modified under those terms.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 */
15
16#ifndef __ASM_ARCH_MEMORY_H
17#define __ASM_ARCH_MEMORY_H
18
19/* physical offset of RAM */
20#define PHYS_OFFSET UL(0x10000000)
21
22/* bus address and physical addresses are identical */
23#define __virt_to_bus(x) __virt_to_phys(x)
24#define __bus_to_virt(x) __phys_to_virt(x)
25
26#endif
27
diff --git a/include/asm-arm/arch-msm/msm_iomap.h b/include/asm-arm/arch-msm/msm_iomap.h
deleted file mode 100644
index b8955cc26fec..000000000000
--- a/include/asm-arm/arch-msm/msm_iomap.h
+++ /dev/null
@@ -1,104 +0,0 @@
1/* linux/include/asm-arm/arch-msm/msm_iomap.h
2 *
3 * Copyright (C) 2007 Google, Inc.
4 * Author: Brian Swetland <swetland@google.com>
5 *
6 * This software is licensed under the terms of the GNU General Public
7 * License version 2, as published by the Free Software Foundation, and
8 * may be copied, distributed, and modified under those terms.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 *
16 * The MSM peripherals are spread all over across 768MB of physical
17 * space, which makes just having a simple IO_ADDRESS macro to slide
18 * them into the right virtual location rough. Instead, we will
19 * provide a master phys->virt mapping for peripherals here.
20 *
21 */
22
23#ifndef __ASM_ARCH_MSM_IOMAP_H
24#define __ASM_ARCH_MSM_IOMAP_H
25
26#include <asm/sizes.h>
27
28/* Physical base address and size of peripherals.
29 * Ordered by the virtual base addresses they will be mapped at.
30 *
31 * MSM_VIC_BASE must be an value that can be loaded via a "mov"
32 * instruction, otherwise entry-macro.S will not compile.
33 *
34 * If you add or remove entries here, you'll want to edit the
35 * msm_io_desc array in arch/arm/mach-msm/io.c to reflect your
36 * changes.
37 *
38 */
39
40#define MSM_VIC_BASE 0xE0000000
41#define MSM_VIC_PHYS 0xC0000000
42#define MSM_VIC_SIZE SZ_4K
43
44#define MSM_CSR_BASE 0xE0001000
45#define MSM_CSR_PHYS 0xC0100000
46#define MSM_CSR_SIZE SZ_4K
47
48#define MSM_GPT_PHYS MSM_CSR_PHYS
49#define MSM_GPT_BASE MSM_CSR_BASE
50#define MSM_GPT_SIZE SZ_4K
51
52#define MSM_DMOV_BASE 0xE0002000
53#define MSM_DMOV_PHYS 0xA9700000
54#define MSM_DMOV_SIZE SZ_4K
55
56#define MSM_UART1_BASE 0xE0003000
57#define MSM_UART1_PHYS 0xA9A00000
58#define MSM_UART1_SIZE SZ_4K
59
60#define MSM_UART2_BASE 0xE0004000
61#define MSM_UART2_PHYS 0xA9B00000
62#define MSM_UART2_SIZE SZ_4K
63
64#define MSM_UART3_BASE 0xE0005000
65#define MSM_UART3_PHYS 0xA9C00000
66#define MSM_UART3_SIZE SZ_4K
67
68#define MSM_I2C_BASE 0xE0006000
69#define MSM_I2C_PHYS 0xA9900000
70#define MSM_I2C_SIZE SZ_4K
71
72#define MSM_GPIO1_BASE 0xE0007000
73#define MSM_GPIO1_PHYS 0xA9200000
74#define MSM_GPIO1_SIZE SZ_4K
75
76#define MSM_GPIO2_BASE 0xE0008000
77#define MSM_GPIO2_PHYS 0xA9300000
78#define MSM_GPIO2_SIZE SZ_4K
79
80#define MSM_HSUSB_BASE 0xE0009000
81#define MSM_HSUSB_PHYS 0xA0800000
82#define MSM_HSUSB_SIZE SZ_4K
83
84#define MSM_CLK_CTL_BASE 0xE000A000
85#define MSM_CLK_CTL_PHYS 0xA8600000
86#define MSM_CLK_CTL_SIZE SZ_4K
87
88#define MSM_PMDH_BASE 0xE000B000
89#define MSM_PMDH_PHYS 0xAA600000
90#define MSM_PMDH_SIZE SZ_4K
91
92#define MSM_EMDH_BASE 0xE000C000
93#define MSM_EMDH_PHYS 0xAA700000
94#define MSM_EMDH_SIZE SZ_4K
95
96#define MSM_MDP_BASE 0xE0010000
97#define MSM_MDP_PHYS 0xAA200000
98#define MSM_MDP_SIZE 0x000F0000
99
100#define MSM_SHARED_RAM_BASE 0xE0100000
101#define MSM_SHARED_RAM_PHYS 0x01F00000
102#define MSM_SHARED_RAM_SIZE SZ_1M
103
104#endif
diff --git a/include/asm-arm/arch-msm/system.h b/include/asm-arm/arch-msm/system.h
deleted file mode 100644
index 7c5544bdd0c7..000000000000
--- a/include/asm-arm/arch-msm/system.h
+++ /dev/null
@@ -1,23 +0,0 @@
1/* linux/include/asm-arm/arch-msm/system.h
2 *
3 * Copyright (C) 2007 Google, Inc.
4 *
5 * This software is licensed under the terms of the GNU General Public
6 * License version 2, as published by the Free Software Foundation, and
7 * may be copied, distributed, and modified under those terms.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 */
15
16#include <asm/hardware.h>
17
18void arch_idle(void);
19
20static inline void arch_reset(char mode)
21{
22 for (;;) ; /* depends on IPC w/ other core */
23}
diff --git a/include/asm-arm/arch-msm/timex.h b/include/asm-arm/arch-msm/timex.h
deleted file mode 100644
index 8724487ab4c9..000000000000
--- a/include/asm-arm/arch-msm/timex.h
+++ /dev/null
@@ -1,21 +0,0 @@
1/* linux/include/asm-arm/arch-msm/timex.h
2 *
3 * Copyright (C) 2007 Google, Inc.
4 *
5 * This software is licensed under the terms of the GNU General Public
6 * License version 2, as published by the Free Software Foundation, and
7 * may be copied, distributed, and modified under those terms.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 */
15
16#ifndef __ASM_ARCH_MSM_TIMEX_H
17#define __ASM_ARCH_MSM_TIMEX_H
18
19#define CLOCK_TICK_RATE 1000000
20
21#endif
diff --git a/include/asm-arm/arch-msm/uncompress.h b/include/asm-arm/arch-msm/uncompress.h
deleted file mode 100644
index e91ed786ffec..000000000000
--- a/include/asm-arm/arch-msm/uncompress.h
+++ /dev/null
@@ -1,36 +0,0 @@
1/* linux/include/asm-arm/arch-msm/uncompress.h
2 *
3 * Copyright (C) 2007 Google, Inc.
4 *
5 * This software is licensed under the terms of the GNU General Public
6 * License version 2, as published by the Free Software Foundation, and
7 * may be copied, distributed, and modified under those terms.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 */
15
16#ifndef __ASM_ARCH_MSM_UNCOMPRESS_H
17
18#include "hardware.h"
19
20static void putc(int c)
21{
22}
23
24static inline void flush(void)
25{
26}
27
28static inline void arch_decomp_setup(void)
29{
30}
31
32static inline void arch_decomp_wdog(void)
33{
34}
35
36#endif
diff --git a/include/asm-arm/arch-msm/vmalloc.h b/include/asm-arm/arch-msm/vmalloc.h
deleted file mode 100644
index 60f8d910e825..000000000000
--- a/include/asm-arm/arch-msm/vmalloc.h
+++ /dev/null
@@ -1,22 +0,0 @@
1/* linux/include/asm-arm/arch-msm/vmalloc.h
2 *
3 * Copyright (C) 2007 Google, Inc.
4 *
5 * This software is licensed under the terms of the GNU General Public
6 * License version 2, as published by the Free Software Foundation, and
7 * may be copied, distributed, and modified under those terms.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 */
15
16#ifndef __ASM_ARCH_MSM_VMALLOC_H
17#define __ASM_ARCH_MSM_VMALLOC_H
18
19#define VMALLOC_END (PAGE_OFFSET + 0x10000000)
20
21#endif
22
diff --git a/include/asm-arm/arch-mv78xx0/debug-macro.S b/include/asm-arm/arch-mv78xx0/debug-macro.S
deleted file mode 100644
index d0595bd645e5..000000000000
--- a/include/asm-arm/arch-mv78xx0/debug-macro.S
+++ /dev/null
@@ -1,20 +0,0 @@
1/*
2 * include/asm-arm/arch-mv78xx0/debug-macro.S
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7*/
8
9#include <asm/arch/mv78xx0.h>
10
11 .macro addruart,rx
12 mrc p15, 0, \rx, c1, c0
13 tst \rx, #1 @ MMU enabled?
14 ldreq \rx, =MV78XX0_REGS_PHYS_BASE
15 ldrne \rx, =MV78XX0_REGS_VIRT_BASE
16 orr \rx, \rx, #0x00012000
17 .endm
18
19#define UART_SHIFT 2
20#include <asm/hardware/debug-8250.S>
diff --git a/include/asm-arm/arch-mv78xx0/entry-macro.S b/include/asm-arm/arch-mv78xx0/entry-macro.S
deleted file mode 100644
index e9a606b12669..000000000000
--- a/include/asm-arm/arch-mv78xx0/entry-macro.S
+++ /dev/null
@@ -1,39 +0,0 @@
1/*
2 * include/asm-arm/arch-mv78xx0/entry-macro.S
3 *
4 * Low-level IRQ helper macros for Marvell MV78xx0 platforms
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10
11#include <asm/arch/mv78xx0.h>
12
13 .macro disable_fiq
14 .endm
15
16 .macro arch_ret_to_user, tmp1, tmp2
17 .endm
18
19 .macro get_irqnr_preamble, base, tmp
20 ldr \base, =IRQ_VIRT_BASE
21 .endm
22
23 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
24 @ check low interrupts
25 ldr \irqstat, [\base, #IRQ_CAUSE_LOW_OFF]
26 ldr \tmp, [\base, #IRQ_MASK_LOW_OFF]
27 mov \irqnr, #31
28 ands \irqstat, \irqstat, \tmp
29
30 @ if no low interrupts set, check high interrupts
31 ldreq \irqstat, [\base, #IRQ_CAUSE_HIGH_OFF]
32 ldreq \tmp, [\base, #IRQ_MASK_HIGH_OFF]
33 moveq \irqnr, #63
34 andeqs \irqstat, \irqstat, \tmp
35
36 @ find first active interrupt source
37 clzne \irqstat, \irqstat
38 subne \irqnr, \irqnr, \irqstat
39 .endm
diff --git a/include/asm-arm/arch-mv78xx0/hardware.h b/include/asm-arm/arch-mv78xx0/hardware.h
deleted file mode 100644
index 8e17926086c6..000000000000
--- a/include/asm-arm/arch-mv78xx0/hardware.h
+++ /dev/null
@@ -1,21 +0,0 @@
1/*
2 * include/asm-arm/arch-mv78xx0/hardware.h
3 *
4 * This file is licensed under the terms of the GNU General Public
5 * License version 2. This program is licensed "as is" without any
6 * warranty of any kind, whether express or implied.
7 */
8
9#ifndef __ASM_ARCH_HARDWARE_H
10#define __ASM_ARCH_HARDWARE_H
11
12#include "mv78xx0.h"
13
14#define pcibios_assign_all_busses() 1
15
16#define PCIBIOS_MIN_IO 0x00001000
17#define PCIBIOS_MIN_MEM 0x01000000
18#define PCIMEM_BASE MV78XX0_PCIE_MEM_PHYS_BASE /* mem base for VGA */
19
20
21#endif
diff --git a/include/asm-arm/arch-mv78xx0/io.h b/include/asm-arm/arch-mv78xx0/io.h
deleted file mode 100644
index 415d4c98e3d1..000000000000
--- a/include/asm-arm/arch-mv78xx0/io.h
+++ /dev/null
@@ -1,26 +0,0 @@
1/*
2 * include/asm-arm/arch-mv78xx0/io.h
3 *
4 * This file is licensed under the terms of the GNU General Public
5 * License version 2. This program is licensed "as is" without any
6 * warranty of any kind, whether express or implied.
7 */
8
9#ifndef __ASM_ARCH_IO_H
10#define __ASM_ARCH_IO_H
11
12#include "mv78xx0.h"
13
14#define IO_SPACE_LIMIT 0xffffffff
15
16static inline void __iomem *__io(unsigned long addr)
17{
18 return (void __iomem *)((addr - MV78XX0_PCIE_IO_PHYS_BASE(0))
19 + MV78XX0_PCIE_IO_VIRT_BASE(0));
20}
21
22#define __io(a) __io(a)
23#define __mem_pci(a) (a)
24
25
26#endif
diff --git a/include/asm-arm/arch-mv78xx0/irqs.h b/include/asm-arm/arch-mv78xx0/irqs.h
deleted file mode 100644
index 75930450cd65..000000000000
--- a/include/asm-arm/arch-mv78xx0/irqs.h
+++ /dev/null
@@ -1,91 +0,0 @@
1/*
2 * include/asm-arm/arch-mv78xx0/irqs.h
3 *
4 * IRQ definitions for Marvell MV78xx0 SoCs
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10
11#ifndef __ASM_ARCH_IRQS_H
12#define __ASM_ARCH_IRQS_H
13
14#include "mv78xx0.h" /* need GPIO_MAX */
15
16/*
17 * MV78xx0 Low Interrupt Controller
18 */
19#define IRQ_MV78XX0_ERR 0
20#define IRQ_MV78XX0_SPI 1
21#define IRQ_MV78XX0_I2C_0 2
22#define IRQ_MV78XX0_I2C_1 3
23#define IRQ_MV78XX0_IDMA_0 4
24#define IRQ_MV78XX0_IDMA_1 5
25#define IRQ_MV78XX0_IDMA_2 6
26#define IRQ_MV78XX0_IDMA_3 7
27#define IRQ_MV78XX0_TIMER_0 8
28#define IRQ_MV78XX0_TIMER_1 9
29#define IRQ_MV78XX0_TIMER_2 10
30#define IRQ_MV78XX0_TIMER_3 11
31#define IRQ_MV78XX0_UART_0 12
32#define IRQ_MV78XX0_UART_1 13
33#define IRQ_MV78XX0_UART_2 14
34#define IRQ_MV78XX0_UART_3 15
35#define IRQ_MV78XX0_USB_0 16
36#define IRQ_MV78XX0_USB_1 17
37#define IRQ_MV78XX0_USB_2 18
38#define IRQ_MV78XX0_CRYPTO 19
39#define IRQ_MV78XX0_SDIO_0 20
40#define IRQ_MV78XX0_SDIO_1 21
41#define IRQ_MV78XX0_XOR_0 22
42#define IRQ_MV78XX0_XOR_1 23
43#define IRQ_MV78XX0_I2S_0 24
44#define IRQ_MV78XX0_I2S_1 25
45#define IRQ_MV78XX0_SATA 26
46#define IRQ_MV78XX0_TDMI 27
47
48/*
49 * MV78xx0 High Interrupt Controller
50 */
51#define IRQ_MV78XX0_PCIE_00 32
52#define IRQ_MV78XX0_PCIE_01 33
53#define IRQ_MV78XX0_PCIE_02 34
54#define IRQ_MV78XX0_PCIE_03 35
55#define IRQ_MV78XX0_PCIE_10 36
56#define IRQ_MV78XX0_PCIE_11 37
57#define IRQ_MV78XX0_PCIE_12 38
58#define IRQ_MV78XX0_PCIE_13 39
59#define IRQ_MV78XX0_GE00_SUM 40
60#define IRQ_MV78XX0_GE00_RX 41
61#define IRQ_MV78XX0_GE00_TX 42
62#define IRQ_MV78XX0_GE00_MISC 43
63#define IRQ_MV78XX0_GE01_SUM 44
64#define IRQ_MV78XX0_GE01_RX 45
65#define IRQ_MV78XX0_GE01_TX 46
66#define IRQ_MV78XX0_GE01_MISC 47
67#define IRQ_MV78XX0_GE10_SUM 48
68#define IRQ_MV78XX0_GE10_RX 49
69#define IRQ_MV78XX0_GE10_TX 50
70#define IRQ_MV78XX0_GE10_MISC 51
71#define IRQ_MV78XX0_GE11_SUM 52
72#define IRQ_MV78XX0_GE11_RX 53
73#define IRQ_MV78XX0_GE11_TX 54
74#define IRQ_MV78XX0_GE11_MISC 55
75#define IRQ_MV78XX0_GPIO_0_7 56
76#define IRQ_MV78XX0_GPIO_8_15 57
77#define IRQ_MV78XX0_GPIO_16_23 58
78#define IRQ_MV78XX0_GPIO_24_31 59
79#define IRQ_MV78XX0_DB_IN 60
80#define IRQ_MV78XX0_DB_OUT 61
81
82/*
83 * MV78XX0 General Purpose Pins
84 */
85#define IRQ_MV78XX0_GPIO_START 64
86#define NR_GPIO_IRQS GPIO_MAX
87
88#define NR_IRQS (IRQ_MV78XX0_GPIO_START + NR_GPIO_IRQS)
89
90
91#endif
diff --git a/include/asm-arm/arch-mv78xx0/memory.h b/include/asm-arm/arch-mv78xx0/memory.h
deleted file mode 100644
index 721a6b185b91..000000000000
--- a/include/asm-arm/arch-mv78xx0/memory.h
+++ /dev/null
@@ -1,14 +0,0 @@
1/*
2 * include/asm-arm/arch-mv78xx0/memory.h
3 */
4
5#ifndef __ASM_ARCH_MEMORY_H
6#define __ASM_ARCH_MEMORY_H
7
8#define PHYS_OFFSET UL(0x00000000)
9
10#define __virt_to_bus(x) __virt_to_phys(x)
11#define __bus_to_virt(x) __phys_to_virt(x)
12
13
14#endif
diff --git a/include/asm-arm/arch-mv78xx0/mv78xx0.h b/include/asm-arm/arch-mv78xx0/mv78xx0.h
deleted file mode 100644
index 9f5d83c73faa..000000000000
--- a/include/asm-arm/arch-mv78xx0/mv78xx0.h
+++ /dev/null
@@ -1,126 +0,0 @@
1/*
2 * include/asm-arm/arch-mv78xx0/mv78xx0.h
3 *
4 * Generic definitions for Marvell MV78xx0 SoC flavors:
5 * MV781x0 and MV782x0.
6 *
7 * This file is licensed under the terms of the GNU General Public
8 * License version 2. This program is licensed "as is" without any
9 * warranty of any kind, whether express or implied.
10 */
11
12#ifndef __ASM_ARCH_MV78XX0_H
13#define __ASM_ARCH_MV78XX0_H
14
15/*
16 * Marvell MV78xx0 address maps.
17 *
18 * phys
19 * c0000000 PCIe Memory space
20 * f0800000 PCIe #0 I/O space
21 * f0900000 PCIe #1 I/O space
22 * f0a00000 PCIe #2 I/O space
23 * f0b00000 PCIe #3 I/O space
24 * f0c00000 PCIe #4 I/O space
25 * f0d00000 PCIe #5 I/O space
26 * f0e00000 PCIe #6 I/O space
27 * f0f00000 PCIe #7 I/O space
28 * f1000000 on-chip peripheral registers
29 *
30 * virt phys size
31 * fe400000 f102x000 16K core-specific peripheral registers
32 * fe700000 f0800000 1M PCIe #0 I/O space
33 * fe800000 f0900000 1M PCIe #1 I/O space
34 * fe900000 f0a00000 1M PCIe #2 I/O space
35 * fea00000 f0b00000 1M PCIe #3 I/O space
36 * feb00000 f0c00000 1M PCIe #4 I/O space
37 * fec00000 f0d00000 1M PCIe #5 I/O space
38 * fed00000 f0e00000 1M PCIe #6 I/O space
39 * fee00000 f0f00000 1M PCIe #7 I/O space
40 * fef00000 f1000000 1M on-chip peripheral registers
41 */
42#define MV78XX0_CORE0_REGS_PHYS_BASE 0xf1020000
43#define MV78XX0_CORE1_REGS_PHYS_BASE 0xf1024000
44#define MV78XX0_CORE_REGS_VIRT_BASE 0xfe400000
45#define MV78XX0_CORE_REGS_SIZE SZ_16K
46
47#define MV78XX0_PCIE_IO_PHYS_BASE(i) (0xf0800000 + ((i) << 20))
48#define MV78XX0_PCIE_IO_VIRT_BASE(i) (0xfe700000 + ((i) << 20))
49#define MV78XX0_PCIE_IO_SIZE SZ_1M
50
51#define MV78XX0_REGS_PHYS_BASE 0xf1000000
52#define MV78XX0_REGS_VIRT_BASE 0xfef00000
53#define MV78XX0_REGS_SIZE SZ_1M
54
55#define MV78XX0_PCIE_MEM_PHYS_BASE 0xc0000000
56#define MV78XX0_PCIE_MEM_SIZE 0x30000000
57
58/*
59 * Core-specific peripheral registers.
60 */
61#define BRIDGE_VIRT_BASE (MV78XX0_CORE_REGS_VIRT_BASE)
62#define CPU_CONTROL (BRIDGE_VIRT_BASE | 0x0104)
63#define L2_WRITETHROUGH 0x00020000
64#define RSTOUTn_MASK (BRIDGE_VIRT_BASE | 0x0108)
65#define SOFT_RESET_OUT_EN 0x00000004
66#define SYSTEM_SOFT_RESET (BRIDGE_VIRT_BASE | 0x010c)
67#define SOFT_RESET 0x00000001
68#define BRIDGE_CAUSE (BRIDGE_VIRT_BASE | 0x0110)
69#define BRIDGE_MASK (BRIDGE_VIRT_BASE | 0x0114)
70#define BRIDGE_INT_TIMER0 0x0002
71#define BRIDGE_INT_TIMER1 0x0004
72#define BRIDGE_INT_TIMER1_CLR (~0x0004)
73#define IRQ_VIRT_BASE (BRIDGE_VIRT_BASE | 0x0200)
74#define IRQ_CAUSE_LOW_OFF 0x0004
75#define IRQ_CAUSE_HIGH_OFF 0x0008
76#define IRQ_MASK_LOW_OFF 0x0010
77#define IRQ_MASK_HIGH_OFF 0x0014
78#define TIMER_VIRT_BASE (BRIDGE_VIRT_BASE | 0x0300)
79
80/*
81 * Register Map
82 */
83#define DDR_VIRT_BASE (MV78XX0_REGS_VIRT_BASE | 0x00000)
84#define DDR_WINDOW_CPU0_BASE (DDR_VIRT_BASE | 0x1500)
85#define DDR_WINDOW_CPU1_BASE (DDR_VIRT_BASE | 0x1700)
86
87#define DEV_BUS_PHYS_BASE (MV78XX0_REGS_PHYS_BASE | 0x10000)
88#define DEV_BUS_VIRT_BASE (MV78XX0_REGS_VIRT_BASE | 0x10000)
89#define SAMPLE_AT_RESET_LOW (DEV_BUS_VIRT_BASE | 0x0030)
90#define SAMPLE_AT_RESET_HIGH (DEV_BUS_VIRT_BASE | 0x0034)
91#define UART0_PHYS_BASE (DEV_BUS_PHYS_BASE | 0x2000)
92#define UART0_VIRT_BASE (DEV_BUS_VIRT_BASE | 0x2000)
93#define UART1_PHYS_BASE (DEV_BUS_PHYS_BASE | 0x2100)
94#define UART1_VIRT_BASE (DEV_BUS_VIRT_BASE | 0x2100)
95#define UART2_PHYS_BASE (DEV_BUS_PHYS_BASE | 0x2200)
96#define UART2_VIRT_BASE (DEV_BUS_VIRT_BASE | 0x2200)
97#define UART3_PHYS_BASE (DEV_BUS_PHYS_BASE | 0x2300)
98#define UART3_VIRT_BASE (DEV_BUS_VIRT_BASE | 0x2300)
99
100#define GE10_PHYS_BASE (MV78XX0_REGS_PHYS_BASE | 0x30000)
101#define GE11_PHYS_BASE (MV78XX0_REGS_PHYS_BASE | 0x34000)
102
103#define PCIE00_VIRT_BASE (MV78XX0_REGS_VIRT_BASE | 0x40000)
104#define PCIE01_VIRT_BASE (MV78XX0_REGS_VIRT_BASE | 0x44000)
105#define PCIE02_VIRT_BASE (MV78XX0_REGS_VIRT_BASE | 0x48000)
106#define PCIE03_VIRT_BASE (MV78XX0_REGS_VIRT_BASE | 0x4c000)
107
108#define USB0_PHYS_BASE (MV78XX0_REGS_PHYS_BASE | 0x50000)
109#define USB1_PHYS_BASE (MV78XX0_REGS_PHYS_BASE | 0x51000)
110#define USB2_PHYS_BASE (MV78XX0_REGS_PHYS_BASE | 0x52000)
111
112#define GE00_PHYS_BASE (MV78XX0_REGS_PHYS_BASE | 0x70000)
113#define GE01_PHYS_BASE (MV78XX0_REGS_PHYS_BASE | 0x74000)
114
115#define PCIE10_VIRT_BASE (MV78XX0_REGS_VIRT_BASE | 0x80000)
116#define PCIE11_VIRT_BASE (MV78XX0_REGS_VIRT_BASE | 0x84000)
117#define PCIE12_VIRT_BASE (MV78XX0_REGS_VIRT_BASE | 0x88000)
118#define PCIE13_VIRT_BASE (MV78XX0_REGS_VIRT_BASE | 0x8c000)
119
120#define SATA_PHYS_BASE (MV78XX0_REGS_PHYS_BASE | 0xa0000)
121
122
123#define GPIO_MAX 32
124
125
126#endif
diff --git a/include/asm-arm/arch-mv78xx0/system.h b/include/asm-arm/arch-mv78xx0/system.h
deleted file mode 100644
index 7eb47d376db9..000000000000
--- a/include/asm-arm/arch-mv78xx0/system.h
+++ /dev/null
@@ -1,37 +0,0 @@
1/*
2 * include/asm-arm/arch-mv78xx0/system.h
3 *
4 * This file is licensed under the terms of the GNU General Public
5 * License version 2. This program is licensed "as is" without any
6 * warranty of any kind, whether express or implied.
7 */
8
9#ifndef __ASM_ARCH_SYSTEM_H
10#define __ASM_ARCH_SYSTEM_H
11
12#include <asm/arch/hardware.h>
13#include <asm/arch/mv78xx0.h>
14
15static inline void arch_idle(void)
16{
17 cpu_do_idle();
18}
19
20static inline void arch_reset(char mode)
21{
22 /*
23 * Enable soft reset to assert RSTOUTn.
24 */
25 writel(SOFT_RESET_OUT_EN, RSTOUTn_MASK);
26
27 /*
28 * Assert soft reset.
29 */
30 writel(SOFT_RESET, SYSTEM_SOFT_RESET);
31
32 while (1)
33 ;
34}
35
36
37#endif
diff --git a/include/asm-arm/arch-mv78xx0/timex.h b/include/asm-arm/arch-mv78xx0/timex.h
deleted file mode 100644
index a854b1ccbd01..000000000000
--- a/include/asm-arm/arch-mv78xx0/timex.h
+++ /dev/null
@@ -1,9 +0,0 @@
1/*
2 * include/asm-arm/arch-mv78xx0/timex.h
3 *
4 * This file is licensed under the terms of the GNU General Public
5 * License version 2. This program is licensed "as is" without any
6 * warranty of any kind, whether express or implied.
7 */
8
9#define CLOCK_TICK_RATE (100 * HZ)
diff --git a/include/asm-arm/arch-mv78xx0/uncompress.h b/include/asm-arm/arch-mv78xx0/uncompress.h
deleted file mode 100644
index 3bfe0a293ef7..000000000000
--- a/include/asm-arm/arch-mv78xx0/uncompress.h
+++ /dev/null
@@ -1,47 +0,0 @@
1/*
2 * include/asm-arm/arch-mv78xx0/uncompress.h
3 *
4 * This file is licensed under the terms of the GNU General Public
5 * License version 2. This program is licensed "as is" without any
6 * warranty of any kind, whether express or implied.
7 */
8
9#include <linux/serial_reg.h>
10#include <asm/arch/mv78xx0.h>
11
12#define SERIAL_BASE ((unsigned char *)UART0_PHYS_BASE)
13
14static void putc(const char c)
15{
16 unsigned char *base = SERIAL_BASE;
17 int i;
18
19 for (i = 0; i < 0x1000; i++) {
20 if (base[UART_LSR << 2] & UART_LSR_THRE)
21 break;
22 barrier();
23 }
24
25 base[UART_TX << 2] = c;
26}
27
28static void flush(void)
29{
30 unsigned char *base = SERIAL_BASE;
31 unsigned char mask;
32 int i;
33
34 mask = UART_LSR_TEMT | UART_LSR_THRE;
35
36 for (i = 0; i < 0x1000; i++) {
37 if ((base[UART_LSR << 2] & mask) == mask)
38 break;
39 barrier();
40 }
41}
42
43/*
44 * nothing to do
45 */
46#define arch_decomp_setup()
47#define arch_decomp_wdog()
diff --git a/include/asm-arm/arch-mv78xx0/vmalloc.h b/include/asm-arm/arch-mv78xx0/vmalloc.h
deleted file mode 100644
index f2c512197579..000000000000
--- a/include/asm-arm/arch-mv78xx0/vmalloc.h
+++ /dev/null
@@ -1,5 +0,0 @@
1/*
2 * include/asm-arm/arch-mv78xx0/vmalloc.h
3 */
4
5#define VMALLOC_END 0xfe000000
diff --git a/include/asm-arm/arch-mxc/debug-macro.S b/include/asm-arm/arch-mxc/debug-macro.S
deleted file mode 100644
index 575087f8561a..000000000000
--- a/include/asm-arm/arch-mxc/debug-macro.S
+++ /dev/null
@@ -1,49 +0,0 @@
1/* linux/include/asm-arm/arch-imx/debug-macro.S
2 *
3 * Debugging macro include header
4 *
5 * Copyright (C) 1994-1999 Russell King
6 * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 *
12 */
13
14#include <asm/arch/hardware.h>
15
16#ifdef CONFIG_MACH_MX31ADS
17#include <asm/arch/board-mx31ads.h>
18#endif
19#ifdef CONFIG_MACH_PCM037
20#include <asm/arch/board-pcm037.h>
21#endif
22#ifdef CONFIG_MACH_MX31LITE
23#include <asm/arch/board-mx31lite.h>
24#endif
25#ifdef CONFIG_MACH_MX27ADS
26#include <asm/arch/board-mx27ads.h>
27#endif
28#ifdef CONFIG_MACH_PCM038
29#include <asm/arch/board-pcm038.h>
30#endif
31 .macro addruart,rx
32 mrc p15, 0, \rx, c1, c0
33 tst \rx, #1 @ MMU enabled?
34 ldreq \rx, =MXC_LL_UART_PADDR @ physical
35 ldrne \rx, =MXC_LL_UART_VADDR @ virtual
36 .endm
37
38 .macro senduart,rd,rx
39 str \rd, [\rx, #0x40] @ TXDATA
40 .endm
41
42 .macro waituart,rd,rx
43 .endm
44
45 .macro busyuart,rd,rx
461002: ldr \rd, [\rx, #0x98] @ SR2
47 tst \rd, #1 << 3 @ TXDC
48 beq 1002b @ wait until transmit done
49 .endm
diff --git a/include/asm-arm/arch-mxc/gpio.h b/include/asm-arm/arch-mxc/gpio.h
deleted file mode 100644
index d393e15f5a6b..000000000000
--- a/include/asm-arm/arch-mxc/gpio.h
+++ /dev/null
@@ -1,42 +0,0 @@
1/*
2 * Copyright 2007 Freescale Semiconductor, Inc. All Rights Reserved.
3 * Copyright 2008 Juergen Beisert, kernel@pengutronix.de
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version 2
8 * of the License, or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 */
18
19#ifndef __ASM_ARCH_MXC_GPIO_H__
20#define __ASM_ARCH_MXC_GPIO_H__
21
22#include <asm/hardware.h>
23#include <asm-generic/gpio.h>
24
25/* use gpiolib dispatchers */
26#define gpio_get_value __gpio_get_value
27#define gpio_set_value __gpio_set_value
28#define gpio_cansleep __gpio_cansleep
29
30#define gpio_to_irq(gpio) (MXC_MAX_INT_LINES + (gpio))
31#define irq_to_gpio(irq) ((irq) - MXC_MAX_INT_LINES)
32
33struct mxc_gpio_port {
34 void __iomem *base;
35 int irq;
36 int virtual_irq_start;
37 struct gpio_chip chip;
38};
39
40int mxc_gpio_init(struct mxc_gpio_port*, int);
41
42#endif
diff --git a/include/asm-arm/arch-mxc/hardware.h b/include/asm-arm/arch-mxc/hardware.h
deleted file mode 100644
index 37cddbaaade7..000000000000
--- a/include/asm-arm/arch-mxc/hardware.h
+++ /dev/null
@@ -1,37 +0,0 @@
1/*
2 * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved.
3 * Copyright 2008 Juergen Beisert, kernel@pengutronix.de
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version 2
8 * of the License, or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
17 * MA 02110-1301, USA.
18 */
19
20#ifndef __ASM_ARCH_MXC_HARDWARE_H__
21#define __ASM_ARCH_MXC_HARDWARE_H__
22
23#include <asm/sizes.h>
24
25#ifdef CONFIG_ARCH_MX3
26# include <asm/arch/mx31.h>
27#endif
28
29#ifdef CONFIG_ARCH_MX2
30# ifdef CONFIG_MACH_MX27
31# include <asm/arch/mx27.h>
32# endif
33#endif
34
35#include <asm/arch/mxc.h>
36
37#endif /* __ASM_ARCH_MXC_HARDWARE_H__ */
diff --git a/include/asm-arm/arch-mxc/irqs.h b/include/asm-arm/arch-mxc/irqs.h
deleted file mode 100644
index f416130718cf..000000000000
--- a/include/asm-arm/arch-mxc/irqs.h
+++ /dev/null
@@ -1,16 +0,0 @@
1/*
2 * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved.
3 */
4
5/*
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10
11#ifndef __ASM_ARCH_MXC_IRQS_H__
12#define __ASM_ARCH_MXC_IRQS_H__
13
14#include <asm/hardware.h>
15
16#endif /* __ASM_ARCH_MXC_IRQS_H__ */
diff --git a/include/asm-arm/arch-mxc/memory.h b/include/asm-arm/arch-mxc/memory.h
deleted file mode 100644
index 059f83023a10..000000000000
--- a/include/asm-arm/arch-mxc/memory.h
+++ /dev/null
@@ -1,29 +0,0 @@
1/*
2 * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved.
3 */
4
5/*
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10
11#ifndef __ASM_ARCH_MXC_MEMORY_H__
12#define __ASM_ARCH_MXC_MEMORY_H__
13
14#include <asm/hardware.h>
15
16/*
17 * Virtual view <-> DMA view memory address translations
18 * This macro is used to translate the virtual address to an address
19 * suitable to be passed to set_dma_addr()
20 */
21#define __virt_to_bus(a) __virt_to_phys(a)
22
23/*
24 * Used to convert an address for DMA operations to an address that the
25 * kernel can use.
26 */
27#define __bus_to_virt(a) __phys_to_virt(a)
28
29#endif /* __ASM_ARCH_MXC_MEMORY_H__ */
diff --git a/include/asm-arm/arch-mxc/mxc_timer.h b/include/asm-arm/arch-mxc/mxc_timer.h
deleted file mode 100644
index 6cb11f4f1a06..000000000000
--- a/include/asm-arm/arch-mxc/mxc_timer.h
+++ /dev/null
@@ -1,158 +0,0 @@
1/*
2 * mxc_timer.h
3 *
4 * Copyright (C) 2008 Juergen Beisert (kernel@pengutronix.de)
5 *
6 * Platform independent (i.MX1, i.MX2, i.MX3) definition for timer handling.
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor,
20 * Boston, MA 02110-1301, USA.
21 */
22
23#ifndef __PLAT_MXC_TIMER_H
24#define __PLAT_MXC_TIMER_H
25
26#include <linux/clk.h>
27#include <asm/hardware.h>
28
29#ifdef CONFIG_ARCH_IMX
30#define TIMER_BASE IO_ADDRESS(TIM1_BASE_ADDR)
31#define TIMER_INTERRUPT TIM1_INT
32
33#define TCTL_VAL TCTL_CLK_PCLK1
34#define TCTL_IRQEN (1<<4)
35#define TCTL_FRR (1<<8)
36#define TCTL_CLK_PCLK1 (1<<1)
37#define TCTL_CLK_PCLK1_4 (2<<1)
38#define TCTL_CLK_TIN (3<<1)
39#define TCTL_CLK_32 (4<<1)
40
41#define MXC_TCTL 0x00
42#define MXC_TPRER 0x04
43#define MXC_TCMP 0x08
44#define MXC_TCR 0x0c
45#define MXC_TCN 0x10
46#define MXC_TSTAT 0x14
47#define TSTAT_CAPT (1<<1)
48#define TSTAT_COMP (1<<0)
49
50static inline void gpt_irq_disable(void)
51{
52 unsigned int tmp;
53
54 tmp = __raw_readl(TIMER_BASE + MXC_TCTL);
55 __raw_writel(tmp & ~TCTL_IRQEN, TIMER_BASE + MXC_TCTL);
56}
57
58static inline void gpt_irq_enable(void)
59{
60 __raw_writel(__raw_readl(TIMER_BASE + MXC_TCTL) | TCTL_IRQEN,
61 TIMER_BASE + MXC_TCTL);
62}
63
64static void gpt_irq_acknowledge(void)
65{
66 __raw_writel(0, TIMER_BASE + MXC_TSTAT);
67}
68#endif /* CONFIG_ARCH_IMX */
69
70#ifdef CONFIG_ARCH_MX2
71#define TIMER_BASE IO_ADDRESS(GPT1_BASE_ADDR)
72#define TIMER_INTERRUPT MXC_INT_GPT1
73
74#define MXC_TCTL 0x00
75#define TCTL_VAL TCTL_CLK_PCLK1
76#define TCTL_CLK_PCLK1 (1<<1)
77#define TCTL_CLK_PCLK1_4 (2<<1)
78#define TCTL_IRQEN (1<<4)
79#define TCTL_FRR (1<<8)
80#define MXC_TPRER 0x04
81#define MXC_TCMP 0x08
82#define MXC_TCR 0x0c
83#define MXC_TCN 0x10
84#define MXC_TSTAT 0x14
85#define TSTAT_CAPT (1<<1)
86#define TSTAT_COMP (1<<0)
87
88static inline void gpt_irq_disable(void)
89{
90 unsigned int tmp;
91
92 tmp = __raw_readl(TIMER_BASE + MXC_TCTL);
93 __raw_writel(tmp & ~TCTL_IRQEN, TIMER_BASE + MXC_TCTL);
94}
95
96static inline void gpt_irq_enable(void)
97{
98 __raw_writel(__raw_readl(TIMER_BASE + MXC_TCTL) | TCTL_IRQEN,
99 TIMER_BASE + MXC_TCTL);
100}
101
102static void gpt_irq_acknowledge(void)
103{
104 __raw_writel(TSTAT_CAPT | TSTAT_COMP, TIMER_BASE + MXC_TSTAT);
105}
106#endif /* CONFIG_ARCH_MX2 */
107
108#ifdef CONFIG_ARCH_MX3
109#define TIMER_BASE IO_ADDRESS(GPT1_BASE_ADDR)
110#define TIMER_INTERRUPT MXC_INT_GPT
111
112#define MXC_TCTL 0x00
113#define TCTL_VAL (TCTL_CLK_IPG | TCTL_WAITEN)
114#define TCTL_CLK_IPG (1<<6)
115#define TCTL_FRR (1<<9)
116#define TCTL_WAITEN (1<<3)
117
118#define MXC_TPRER 0x04
119#define MXC_TSTAT 0x08
120#define TSTAT_OF1 (1<<0)
121#define TSTAT_OF2 (1<<1)
122#define TSTAT_OF3 (1<<2)
123#define TSTAT_IF1 (1<<3)
124#define TSTAT_IF2 (1<<4)
125#define TSTAT_ROV (1<<5)
126#define MXC_IR 0x0c
127#define MXC_TCMP 0x10
128#define MXC_TCMP2 0x14
129#define MXC_TCMP3 0x18
130#define MXC_TCR 0x1c
131#define MXC_TCN 0x24
132
133static inline void gpt_irq_disable(void)
134{
135 __raw_writel(0, TIMER_BASE + MXC_IR);
136}
137
138static inline void gpt_irq_enable(void)
139{
140 __raw_writel(1<<0, TIMER_BASE + MXC_IR);
141}
142
143static inline void gpt_irq_acknowledge(void)
144{
145 __raw_writel(TSTAT_OF1, TIMER_BASE + MXC_TSTAT);
146}
147#endif /* CONFIG_ARCH_MX3 */
148
149#define TCTL_SWR (1<<15)
150#define TCTL_CC (1<<10)
151#define TCTL_OM (1<<9)
152#define TCTL_CAP_RIS (1<<6)
153#define TCTL_CAP_FAL (2<<6)
154#define TCTL_CAP_RIS_FAL (3<<6)
155#define TCTL_CAP_ENA (1<<5)
156#define TCTL_TEN (1<<0)
157
158#endif
diff --git a/include/asm-arm/arch-mxc/timex.h b/include/asm-arm/arch-mxc/timex.h
deleted file mode 100644
index 59019fa58f82..000000000000
--- a/include/asm-arm/arch-mxc/timex.h
+++ /dev/null
@@ -1,25 +0,0 @@
1/*
2 * Copyright (C) 1999 ARM Limited
3 * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved.
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */
19
20#ifndef __ASM_ARCH_MXC_TIMEX_H__
21#define __ASM_ARCH_MXC_TIMEX_H__
22
23#include <asm/hardware.h> /* for CLOCK_TICK_RATE */
24
25#endif /* __ASM_ARCH_MXC_TIMEX_H__ */
diff --git a/include/asm-arm/arch-mxc/uncompress.h b/include/asm-arm/arch-mxc/uncompress.h
deleted file mode 100644
index 42cc0cb3fefd..000000000000
--- a/include/asm-arm/arch-mxc/uncompress.h
+++ /dev/null
@@ -1,78 +0,0 @@
1/*
2 * include/asm-arm/arch-mxc/uncompress.h
3 *
4 *
5 *
6 * Copyright (C) 1999 ARM Limited
7 * Copyright (C) Shane Nay (shane@minirl.com)
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 */
23#ifndef __ASM_ARCH_MXC_UNCOMPRESS_H__
24#define __ASM_ARCH_MXC_UNCOMPRESS_H__
25
26#define __MXC_BOOT_UNCOMPRESS
27
28#include <asm/hardware.h>
29
30#define UART(x) (*(volatile unsigned long *)(serial_port + (x)))
31
32#define USR2 0x98
33#define USR2_TXFE (1<<14)
34#define TXR 0x40
35#define UCR1 0x80
36#define UCR1_UARTEN 1
37
38/*
39 * The following code assumes the serial port has already been
40 * initialized by the bootloader. We search for the first enabled
41 * port in the most probable order. If you didn't setup a port in
42 * your bootloader then nothing will appear (which might be desired).
43 *
44 * This does not append a newline
45 */
46
47static void putc(int ch)
48{
49 static unsigned long serial_port = 0;
50
51 if (unlikely(serial_port == 0)) {
52 do {
53 serial_port = UART1_BASE_ADDR;
54 if (UART(UCR1) & UCR1_UARTEN)
55 break;
56 serial_port = UART2_BASE_ADDR;
57 if (UART(UCR1) & UCR1_UARTEN)
58 break;
59 return;
60 } while (0);
61 }
62
63 while (!(UART(USR2) & USR2_TXFE))
64 barrier();
65
66 UART(TXR) = ch;
67}
68
69#define flush() do { } while (0)
70
71/*
72 * nothing to do
73 */
74#define arch_decomp_setup()
75
76#define arch_decomp_wdog()
77
78#endif /* __ASM_ARCH_MXC_UNCOMPRESS_H__ */
diff --git a/include/asm-arm/arch-netx/debug-macro.S b/include/asm-arm/arch-netx/debug-macro.S
deleted file mode 100644
index a940d0e80cb2..000000000000
--- a/include/asm-arm/arch-netx/debug-macro.S
+++ /dev/null
@@ -1,38 +0,0 @@
1/* linux/include/asm-arm/arch-netx/debug-macro.S
2 *
3 * Debugging macro include header
4 *
5 * Copyright (C) 1994-1999 Russell King
6 * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 *
12*/
13
14#include "hardware.h"
15
16 .macro addruart,rx
17 mrc p15, 0, \rx, c1, c0
18 tst \rx, #1 @ MMU enabled?
19 moveq \rx, #0x00100000 @ physical
20 movne \rx, #io_p2v(0x00100000) @ virtual
21 orr \rx, \rx, #0x00000a00
22 .endm
23
24 .macro senduart,rd,rx
25 str \rd, [\rx, #0]
26 .endm
27
28 .macro busyuart,rd,rx
291002: ldr \rd, [\rx, #0x18]
30 tst \rd, #(1 << 3)
31 bne 1002b
32 .endm
33
34 .macro waituart,rd,rx
351001: ldr \rd, [\rx, #0x18]
36 tst \rd, #(1 << 3)
37 bne 1001b
38 .endm
diff --git a/include/asm-arm/arch-netx/dma.h b/include/asm-arm/arch-netx/dma.h
deleted file mode 100644
index 4eda5feed81c..000000000000
--- a/include/asm-arm/arch-netx/dma.h
+++ /dev/null
@@ -1,21 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-netx/dma.h
3 *
4 * Copyright (C) 2005 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2
8 * as published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */
19
20#define MAX_DMA_CHANNELS 0
21#define MAX_DMA_ADDRESS ~0
diff --git a/include/asm-arm/arch-netx/entry-macro.S b/include/asm-arm/arch-netx/entry-macro.S
deleted file mode 100644
index 83ad188a0847..000000000000
--- a/include/asm-arm/arch-netx/entry-macro.S
+++ /dev/null
@@ -1,41 +0,0 @@
1/*
2 * include/asm-arm/arch-netx/entry-macro.S
3 *
4 * Low-level IRQ helper macros for Hilscher netX based platforms
5 *
6 * Copyright (C) 2005 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2
10 * as published by the Free Software Foundation.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
21#include <asm/hardware.h>
22
23 .macro disable_fiq
24 .endm
25
26 .macro get_irqnr_preamble, base, tmp
27 .endm
28
29 .macro arch_ret_to_user, tmp1, tmp2
30 .endm
31
32 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
33 mov \base, #io_p2v(0x00100000)
34 add \base, \base, #0x000ff000
35
36 ldr \irqstat, [\base, #0]
37 clz \irqnr, \irqstat
38 rsb \irqnr, \irqnr, #31
39 cmp \irqstat, #0
40 .endm
41
diff --git a/include/asm-arm/arch-netx/eth.h b/include/asm-arm/arch-netx/eth.h
deleted file mode 100644
index 643c90ef8b72..000000000000
--- a/include/asm-arm/arch-netx/eth.h
+++ /dev/null
@@ -1,27 +0,0 @@
1/*
2 * include/asm-arm/arch-netx/eth.h
3 *
4 * Copyright (c) 2005 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2
8 * as published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */
19
20#ifndef ASMARM_ARCH_ETH_H
21#define ASMARM_ARCH_ETH_H
22
23struct netxeth_platform_data {
24 unsigned int xcno; /* number of xmac/xpec engine this eth uses */
25};
26
27#endif
diff --git a/include/asm-arm/arch-netx/hardware.h b/include/asm-arm/arch-netx/hardware.h
deleted file mode 100644
index 7786c45455cd..000000000000
--- a/include/asm-arm/arch-netx/hardware.h
+++ /dev/null
@@ -1,39 +0,0 @@
1/*
2 * include/asm-arm/arch-netx/hardware.h
3 *
4 * Copyright (C) 2005 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2
8 * as published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */
19#ifndef __ASM_ARCH_HARDWARE_H
20#define __ASM_ARCH_HARDWARE_H
21
22#define NETX_IO_PHYS 0x00100000
23#define NETX_IO_VIRT 0xe0000000
24#define NETX_IO_SIZE 0x00100000
25
26#define SRAM_INTERNAL_PHYS_0 0x00000
27#define SRAM_INTERNAL_PHYS_1 0x08000
28#define SRAM_INTERNAL_PHYS_2 0x10000
29#define SRAM_INTERNAL_PHYS_3 0x18000
30#define SRAM_INTERNAL_PHYS(no) ((no) * 0x8000)
31
32#define XPEC_MEM_SIZE 0x4000
33#define XMAC_MEM_SIZE 0x1000
34#define SRAM_MEM_SIZE 0x8000
35
36#define io_p2v(x) ((x) - NETX_IO_PHYS + NETX_IO_VIRT)
37#define io_v2p(x) ((x) - NETX_IO_VIRT + NETX_IO_PHYS)
38
39#endif
diff --git a/include/asm-arm/arch-netx/io.h b/include/asm-arm/arch-netx/io.h
deleted file mode 100644
index a7a53f80165d..000000000000
--- a/include/asm-arm/arch-netx/io.h
+++ /dev/null
@@ -1,28 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-netx/io.h
3 *
4 * Copyright (C) 2005 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2
8 * as published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */
19
20#ifndef __ASM_ARM_ARCH_IO_H
21#define __ASM_ARM_ARCH_IO_H
22
23#define IO_SPACE_LIMIT 0xffffffff
24
25#define __io(a) ((void __iomem *)(a))
26#define __mem_pci(a) (a)
27
28#endif
diff --git a/include/asm-arm/arch-netx/irqs.h b/include/asm-arm/arch-netx/irqs.h
deleted file mode 100644
index a487dc6e2661..000000000000
--- a/include/asm-arm/arch-netx/irqs.h
+++ /dev/null
@@ -1,70 +0,0 @@
1/*
2 * include/asm-arm/arch-netx/irqs.h
3 *
4 * Copyright (C) 2005 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2
8 * as published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */
19
20#define NETX_IRQ_VIC_START 0
21#define NETX_IRQ_SOFTINT 0
22#define NETX_IRQ_TIMER0 1
23#define NETX_IRQ_TIMER1 2
24#define NETX_IRQ_TIMER2 3
25#define NETX_IRQ_SYSTIME_NS 4
26#define NETX_IRQ_SYSTIME_S 5
27#define NETX_IRQ_GPIO_15 6
28#define NETX_IRQ_WATCHDOG 7
29#define NETX_IRQ_UART0 8
30#define NETX_IRQ_UART1 9
31#define NETX_IRQ_UART2 10
32#define NETX_IRQ_USB 11
33#define NETX_IRQ_SPI 12
34#define NETX_IRQ_I2C 13
35#define NETX_IRQ_LCD 14
36#define NETX_IRQ_HIF 15
37#define NETX_IRQ_GPIO_0_14 16
38#define NETX_IRQ_XPEC0 17
39#define NETX_IRQ_XPEC1 18
40#define NETX_IRQ_XPEC2 19
41#define NETX_IRQ_XPEC3 20
42#define NETX_IRQ_XPEC(no) (17 + (no))
43#define NETX_IRQ_MSYNC0 21
44#define NETX_IRQ_MSYNC1 22
45#define NETX_IRQ_MSYNC2 23
46#define NETX_IRQ_MSYNC3 24
47#define NETX_IRQ_IRQ_PHY 25
48#define NETX_IRQ_ISO_AREA 26
49/* int 27 is reserved */
50/* int 28 is reserved */
51#define NETX_IRQ_TIMER3 29
52#define NETX_IRQ_TIMER4 30
53/* int 31 is reserved */
54
55#define NETX_IRQS 32
56
57/* for multiplexed irqs on gpio 0..14 */
58#define NETX_IRQ_GPIO(x) (NETX_IRQS + (x))
59#define NETX_IRQ_GPIO_LAST NETX_IRQ_GPIO(14)
60
61/* Host interface interrupts */
62#define NETX_IRQ_HIF_CHAINED(x) (NETX_IRQ_GPIO_LAST + 1 + (x))
63#define NETX_IRQ_HIF_PIO35 NETX_IRQ_HIF_CHAINED(0)
64#define NETX_IRQ_HIF_PIO36 NETX_IRQ_HIF_CHAINED(1)
65#define NETX_IRQ_HIF_PIO40 NETX_IRQ_HIF_CHAINED(2)
66#define NETX_IRQ_HIF_PIO47 NETX_IRQ_HIF_CHAINED(3)
67#define NETX_IRQ_HIF_PIO72 NETX_IRQ_HIF_CHAINED(4)
68#define NETX_IRQ_HIF_LAST NETX_IRQ_HIF_CHAINED(4)
69
70#define NR_IRQS (NETX_IRQ_HIF_LAST + 1)
diff --git a/include/asm-arm/arch-netx/memory.h b/include/asm-arm/arch-netx/memory.h
deleted file mode 100644
index 6d8d2df3e99d..000000000000
--- a/include/asm-arm/arch-netx/memory.h
+++ /dev/null
@@ -1,36 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-netx/memory.h
3 *
4 * Copyright (C) 2005 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2
8 * as published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */
19
20#ifndef __ASM_ARCH_MEMORY_H
21#define __ASM_ARCH_MEMORY_H
22
23#define PHYS_OFFSET UL(0x80000000)
24
25/*
26 * Virtual view <-> DMA view memory address translations
27 * virt_to_bus: Used to translate the virtual address to an
28 * address suitable to be passed to set_dma_addr
29 * bus_to_virt: Used to convert an address for DMA operations
30 * to an address that the kernel can use.
31 */
32#define __virt_to_bus(x) __virt_to_phys(x)
33#define __bus_to_virt(x) __phys_to_virt(x)
34
35#endif
36
diff --git a/include/asm-arm/arch-netx/netx-regs.h b/include/asm-arm/arch-netx/netx-regs.h
deleted file mode 100644
index fc9aa21f360c..000000000000
--- a/include/asm-arm/arch-netx/netx-regs.h
+++ /dev/null
@@ -1,410 +0,0 @@
1/*
2 * include/asm-arm/arch-netx/netx-regs.h
3 *
4 * Copyright (c) 2005 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2
8 * as published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */
19
20#ifndef __ASM_ARCH_NETX_REGS_H
21#define __ASM_ARCH_NETX_REGS_H
22
23/* offsets relative to the beginning of the io space */
24#define NETX_OFS_SYSTEM 0x00000
25#define NETX_OFS_MEMCR 0x00100
26#define NETX_OFS_DPMAS 0x03000
27#define NETX_OFS_GPIO 0x00800
28#define NETX_OFS_PIO 0x00900
29#define NETX_OFS_UART0 0x00a00
30#define NETX_OFS_UART1 0x00a40
31#define NETX_OFS_UART2 0x00a80
32#define NETX_OF_MIIMU 0x00b00
33#define NETX_OFS_SPI 0x00c00
34#define NETX_OFS_I2C 0x00d00
35#define NETX_OFS_SYSTIME 0x01100
36#define NETX_OFS_RTC 0x01200
37#define NETX_OFS_EXTBUS 0x03600
38#define NETX_OFS_LCD 0x04000
39#define NETX_OFS_USB 0x20000
40#define NETX_OFS_XMAC0 0x60000
41#define NETX_OFS_XMAC1 0x61000
42#define NETX_OFS_XMAC2 0x62000
43#define NETX_OFS_XMAC3 0x63000
44#define NETX_OFS_XMAC(no) (0x60000 + (no) * 0x1000)
45#define NETX_OFS_PFIFO 0x64000
46#define NETX_OFS_XPEC0 0x70000
47#define NETX_OFS_XPEC1 0x74000
48#define NETX_OFS_XPEC2 0x78000
49#define NETX_OFS_XPEC3 0x7c000
50#define NETX_OFS_XPEC(no) (0x70000 + (no) * 0x4000)
51#define NETX_OFS_VIC 0xff000
52
53/* physical addresses */
54#define NETX_PA_SYSTEM (NETX_IO_PHYS + NETX_OFS_SYSTEM)
55#define NETX_PA_MEMCR (NETX_IO_PHYS + NETX_OFS_MEMCR)
56#define NETX_PA_DPMAS (NETX_IO_PHYS + NETX_OFS_DPMAS)
57#define NETX_PA_GPIO (NETX_IO_PHYS + NETX_OFS_GPIO)
58#define NETX_PA_PIO (NETX_IO_PHYS + NETX_OFS_PIO)
59#define NETX_PA_UART0 (NETX_IO_PHYS + NETX_OFS_UART0)
60#define NETX_PA_UART1 (NETX_IO_PHYS + NETX_OFS_UART1)
61#define NETX_PA_UART2 (NETX_IO_PHYS + NETX_OFS_UART2)
62#define NETX_PA_MIIMU (NETX_IO_PHYS + NETX_OF_MIIMU)
63#define NETX_PA_SPI (NETX_IO_PHYS + NETX_OFS_SPI)
64#define NETX_PA_I2C (NETX_IO_PHYS + NETX_OFS_I2C)
65#define NETX_PA_SYSTIME (NETX_IO_PHYS + NETX_OFS_SYSTIME)
66#define NETX_PA_RTC (NETX_IO_PHYS + NETX_OFS_RTC)
67#define NETX_PA_EXTBUS (NETX_IO_PHYS + NETX_OFS_EXTBUS)
68#define NETX_PA_LCD (NETX_IO_PHYS + NETX_OFS_LCD)
69#define NETX_PA_USB (NETX_IO_PHYS + NETX_OFS_USB)
70#define NETX_PA_XMAC0 (NETX_IO_PHYS + NETX_OFS_XMAC0)
71#define NETX_PA_XMAC1 (NETX_IO_PHYS + NETX_OFS_XMAC1)
72#define NETX_PA_XMAC2 (NETX_IO_PHYS + NETX_OFS_XMAC2)
73#define NETX_PA_XMAC3 (NETX_IO_PHYS + NETX_OFS_XMAC3)
74#define NETX_PA_XMAC(no) (NETX_IO_PHYS + NETX_OFS_XMAC(no))
75#define NETX_PA_PFIFO (NETX_IO_PHYS + NETX_OFS_PFIFO)
76#define NETX_PA_XPEC0 (NETX_IO_PHYS + NETX_OFS_XPEC0)
77#define NETX_PA_XPEC1 (NETX_IO_PHYS + NETX_OFS_XPEC1)
78#define NETX_PA_XPEC2 (NETX_IO_PHYS + NETX_OFS_XPEC2)
79#define NETX_PA_XPEC3 (NETX_IO_PHYS + NETX_OFS_XPEC3)
80#define NETX_PA_XPEC(no) (NETX_IO_PHYS + NETX_OFS_XPEC(no))
81#define NETX_PA_VIC (NETX_IO_PHYS + NETX_OFS_VIC)
82
83/* virual addresses */
84#define NETX_VA_SYSTEM (NETX_IO_VIRT + NETX_OFS_SYSTEM)
85#define NETX_VA_MEMCR (NETX_IO_VIRT + NETX_OFS_MEMCR)
86#define NETX_VA_DPMAS (NETX_IO_VIRT + NETX_OFS_DPMAS)
87#define NETX_VA_GPIO (NETX_IO_VIRT + NETX_OFS_GPIO)
88#define NETX_VA_PIO (NETX_IO_VIRT + NETX_OFS_PIO)
89#define NETX_VA_UART0 (NETX_IO_VIRT + NETX_OFS_UART0)
90#define NETX_VA_UART1 (NETX_IO_VIRT + NETX_OFS_UART1)
91#define NETX_VA_UART2 (NETX_IO_VIRT + NETX_OFS_UART2)
92#define NETX_VA_MIIMU (NETX_IO_VIRT + NETX_OF_MIIMU)
93#define NETX_VA_SPI (NETX_IO_VIRT + NETX_OFS_SPI)
94#define NETX_VA_I2C (NETX_IO_VIRT + NETX_OFS_I2C)
95#define NETX_VA_SYSTIME (NETX_IO_VIRT + NETX_OFS_SYSTIME)
96#define NETX_VA_RTC (NETX_IO_VIRT + NETX_OFS_RTC)
97#define NETX_VA_EXTBUS (NETX_IO_VIRT + NETX_OFS_EXTBUS)
98#define NETX_VA_LCD (NETX_IO_VIRT + NETX_OFS_LCD)
99#define NETX_VA_USB (NETX_IO_VIRT + NETX_OFS_USB)
100#define NETX_VA_XMAC0 (NETX_IO_VIRT + NETX_OFS_XMAC0)
101#define NETX_VA_XMAC1 (NETX_IO_VIRT + NETX_OFS_XMAC1)
102#define NETX_VA_XMAC2 (NETX_IO_VIRT + NETX_OFS_XMAC2)
103#define NETX_VA_XMAC3 (NETX_IO_VIRT + NETX_OFS_XMAC3)
104#define NETX_VA_XMAC(no) (NETX_IO_VIRT + NETX_OFS_XMAC(no))
105#define NETX_VA_PFIFO (NETX_IO_VIRT + NETX_OFS_PFIFO)
106#define NETX_VA_XPEC0 (NETX_IO_VIRT + NETX_OFS_XPEC0)
107#define NETX_VA_XPEC1 (NETX_IO_VIRT + NETX_OFS_XPEC1)
108#define NETX_VA_XPEC2 (NETX_IO_VIRT + NETX_OFS_XPEC2)
109#define NETX_VA_XPEC3 (NETX_IO_VIRT + NETX_OFS_XPEC3)
110#define NETX_VA_XPEC(no) (NETX_IO_VIRT + NETX_OFS_XPEC(no))
111#define NETX_VA_VIC (NETX_IO_VIRT + NETX_OFS_VIC)
112
113/*********************************
114 * System functions *
115 *********************************/
116
117/* Registers */
118#define NETX_SYSTEM_REG(ofs) __io(NETX_VA_SYSTEM + (ofs))
119#define NETX_SYSTEM_BOO_SR NETX_SYSTEM_REG(0x00)
120#define NETX_SYSTEM_IOC_CR NETX_SYSTEM_REG(0x04)
121#define NETX_SYSTEM_IOC_MR NETX_SYSTEM_REG(0x08)
122
123/* FIXME: Docs are not consistent */
124/* #define NETX_SYSTEM_RES_CR NETX_SYSTEM_REG(0x08) */
125#define NETX_SYSTEM_RES_CR NETX_SYSTEM_REG(0x0c)
126
127#define NETX_SYSTEM_PHY_CONTROL NETX_SYSTEM_REG(0x10)
128#define NETX_SYSTEM_REV NETX_SYSTEM_REG(0x34)
129#define NETX_SYSTEM_IOC_ACCESS_KEY NETX_SYSTEM_REG(0x70)
130#define NETX_SYSTEM_WDG_TR NETX_SYSTEM_REG(0x200)
131#define NETX_SYSTEM_WDG_CTR NETX_SYSTEM_REG(0x204)
132#define NETX_SYSTEM_WDG_IRQ_TIMEOUT NETX_SYSTEM_REG(0x208)
133#define NETX_SYSTEM_WDG_RES_TIMEOUT NETX_SYSTEM_REG(0x20c)
134
135/* Bits */
136#define NETX_SYSTEM_RES_CR_RSTIN (1<<0)
137#define NETX_SYSTEM_RES_CR_WDG_RES (1<<1)
138#define NETX_SYSTEM_RES_CR_HOST_RES (1<<2)
139#define NETX_SYSTEM_RES_CR_FIRMW_RES (1<<3)
140#define NETX_SYSTEM_RES_CR_XPEC0_RES (1<<4)
141#define NETX_SYSTEM_RES_CR_XPEC1_RES (1<<5)
142#define NETX_SYSTEM_RES_CR_XPEC2_RES (1<<6)
143#define NETX_SYSTEM_RES_CR_XPEC3_RES (1<<7)
144#define NETX_SYSTEM_RES_CR_DIS_XPEC0_RES (1<<16)
145#define NETX_SYSTEM_RES_CR_DIS_XPEC1_RES (1<<17)
146#define NETX_SYSTEM_RES_CR_DIS_XPEC2_RES (1<<18)
147#define NETX_SYSTEM_RES_CR_DIS_XPEC3_RES (1<<19)
148#define NETX_SYSTEM_RES_CR_FIRMW_FLG0 (1<<20)
149#define NETX_SYSTEM_RES_CR_FIRMW_FLG1 (1<<21)
150#define NETX_SYSTEM_RES_CR_FIRMW_FLG2 (1<<22)
151#define NETX_SYSTEM_RES_CR_FIRMW_FLG3 (1<<23)
152#define NETX_SYSTEM_RES_CR_FIRMW_RES_EN (1<<24)
153#define NETX_SYSTEM_RES_CR_RSTOUT (1<<25)
154#define NETX_SYSTEM_RES_CR_EN_RSTOUT (1<<26)
155
156#define PHY_CONTROL_RESET (1<<31)
157#define PHY_CONTROL_SIM_BYP (1<<30)
158#define PHY_CONTROL_CLK_XLATIN (1<<29)
159#define PHY_CONTROL_PHY1_EN (1<<21)
160#define PHY_CONTROL_PHY1_NP_MSG_CODE
161#define PHY_CONTROL_PHY1_AUTOMDIX (1<<17)
162#define PHY_CONTROL_PHY1_FIXMODE (1<<16)
163#define PHY_CONTROL_PHY1_MODE(mode) (((mode) & 0x7) << 13)
164#define PHY_CONTROL_PHY0_EN (1<<12)
165#define PHY_CONTROL_PHY0_NP_MSG_CODE
166#define PHY_CONTROL_PHY0_AUTOMDIX (1<<8)
167#define PHY_CONTROL_PHY0_FIXMODE (1<<7)
168#define PHY_CONTROL_PHY0_MODE(mode) (((mode) & 0x7) << 4)
169#define PHY_CONTROL_PHY_ADDRESS(adr) ((adr) & 0xf)
170
171#define PHY_MODE_10BASE_T_HALF 0
172#define PHY_MODE_10BASE_T_FULL 1
173#define PHY_MODE_100BASE_TX_FX_FULL 2
174#define PHY_MODE_100BASE_TX_FX_HALF 3
175#define PHY_MODE_100BASE_TX_HALF 4
176#define PHY_MODE_REPEATER 5
177#define PHY_MODE_POWER_DOWN 6
178#define PHY_MODE_ALL 7
179
180/* Bits */
181#define VECT_CNTL_ENABLE (1 << 5)
182
183/*******************************
184 * GPIO and timer module *
185 *******************************/
186
187/* Registers */
188#define NETX_GPIO_REG(ofs) __io(NETX_VA_GPIO + (ofs))
189#define NETX_GPIO_CFG(gpio) NETX_GPIO_REG(0x0 + ((gpio)<<2))
190#define NETX_GPIO_THRESHOLD_CAPTURE(gpio) NETX_GPIO_REG(0x40 + ((gpio)<<2))
191#define NETX_GPIO_COUNTER_CTRL(counter) NETX_GPIO_REG(0x80 + ((counter)<<2))
192#define NETX_GPIO_COUNTER_MAX(counter) NETX_GPIO_REG(0x94 + ((counter)<<2))
193#define NETX_GPIO_COUNTER_CURRENT(counter) NETX_GPIO_REG(0xa8 + ((counter)<<2))
194#define NETX_GPIO_IRQ_ENABLE NETX_GPIO_REG(0xbc)
195#define NETX_GPIO_IRQ_DISABLE NETX_GPIO_REG(0xc0)
196#define NETX_GPIO_SYSTIME_NS_CMP NETX_GPIO_REG(0xc4)
197#define NETX_GPIO_LINE NETX_GPIO_REG(0xc8)
198#define NETX_GPIO_IRQ NETX_GPIO_REG(0xd0)
199
200/* Bits */
201#define NETX_GPIO_CFG_IOCFG_GP_INPUT (0x0)
202#define NETX_GPIO_CFG_IOCFG_GP_OUTPUT (0x1)
203#define NETX_GPIO_CFG_IOCFG_GP_UART (0x2)
204#define NETX_GPIO_CFG_INV (1<<2)
205#define NETX_GPIO_CFG_MODE_INPUT_READ (0<<3)
206#define NETX_GPIO_CFG_MODE_INPUT_CAPTURE_CONT_RISING (1<<3)
207#define NETX_GPIO_CFG_MODE_INPUT_CAPTURE_ONCE_RISING (2<<3)
208#define NETX_GPIO_CFG_MODE_INPUT_CAPTURE_HIGH_LEVEL (3<<3)
209#define NETX_GPIO_CFG_COUNT_REF_COUNTER0 (0<<5)
210#define NETX_GPIO_CFG_COUNT_REF_COUNTER1 (1<<5)
211#define NETX_GPIO_CFG_COUNT_REF_COUNTER2 (2<<5)
212#define NETX_GPIO_CFG_COUNT_REF_COUNTER3 (3<<5)
213#define NETX_GPIO_CFG_COUNT_REF_COUNTER4 (4<<5)
214#define NETX_GPIO_CFG_COUNT_REF_SYSTIME (7<<5)
215
216#define NETX_GPIO_COUNTER_CTRL_RUN (1<<0)
217#define NETX_GPIO_COUNTER_CTRL_SYM (1<<1)
218#define NETX_GPIO_COUNTER_CTRL_ONCE (1<<2)
219#define NETX_GPIO_COUNTER_CTRL_IRQ_EN (1<<3)
220#define NETX_GPIO_COUNTER_CTRL_CNT_EVENT (1<<4)
221#define NETX_GPIO_COUNTER_CTRL_RST_EN (1<<5)
222#define NETX_GPIO_COUNTER_CTRL_SEL_EVENT (1<<6)
223#define NETX_GPIO_COUNTER_CTRL_GPIO_REF /* FIXME */
224
225#define GPIO_BIT(gpio) (1<<(gpio))
226#define COUNTER_BIT(counter) ((1<<16)<<(counter))
227
228/*******************************
229 * PIO *
230 *******************************/
231
232/* Registers */
233#define NETX_PIO_REG(ofs) __io(NETX_VA_PIO + (ofs))
234#define NETX_PIO_INPIO NETX_PIO_REG(0x0)
235#define NETX_PIO_OUTPIO NETX_PIO_REG(0x4)
236#define NETX_PIO_OEPIO NETX_PIO_REG(0x8)
237
238/*******************************
239 * MII Unit *
240 *******************************/
241
242/* Registers */
243#define NETX_MIIMU __io(NETX_VA_MIIMU)
244
245/* Bits */
246#define MIIMU_SNRDY (1<<0)
247#define MIIMU_PREAMBLE (1<<1)
248#define MIIMU_OPMODE_WRITE (1<<2)
249#define MIIMU_MDC_PERIOD (1<<3)
250#define MIIMU_PHY_NRES (1<<4)
251#define MIIMU_RTA (1<<5)
252#define MIIMU_REGADDR(adr) (((adr) & 0x1f) << 6)
253#define MIIMU_PHYADDR(adr) (((adr) & 0x1f) << 11)
254#define MIIMU_DATA(data) (((data) & 0xffff) << 16)
255
256/*******************************
257 * xmac / xpec *
258 *******************************/
259
260/* XPEC register offsets relative to NETX_VA_XPEC(no) */
261#define NETX_XPEC_R0_OFS 0x00
262#define NETX_XPEC_R1_OFS 0x04
263#define NETX_XPEC_R2_OFS 0x08
264#define NETX_XPEC_R3_OFS 0x0c
265#define NETX_XPEC_R4_OFS 0x10
266#define NETX_XPEC_R5_OFS 0x14
267#define NETX_XPEC_R6_OFS 0x18
268#define NETX_XPEC_R7_OFS 0x1c
269#define NETX_XPEC_RANGE01_OFS 0x20
270#define NETX_XPEC_RANGE23_OFS 0x24
271#define NETX_XPEC_RANGE45_OFS 0x28
272#define NETX_XPEC_RANGE67_OFS 0x2c
273#define NETX_XPEC_PC_OFS 0x48
274#define NETX_XPEC_TIMER_OFS(timer) (0x30 + ((timer)<<2))
275#define NETX_XPEC_IRQ_OFS 0x8c
276#define NETX_XPEC_SYSTIME_NS_OFS 0x90
277#define NETX_XPEC_FIFO_DATA_OFS 0x94
278#define NETX_XPEC_SYSTIME_S_OFS 0x98
279#define NETX_XPEC_ADC_OFS 0x9c
280#define NETX_XPEC_URX_COUNT_OFS 0x40
281#define NETX_XPEC_UTX_COUNT_OFS 0x44
282#define NETX_XPEC_PC_OFS 0x48
283#define NETX_XPEC_ZERO_OFS 0x4c
284#define NETX_XPEC_STATCFG_OFS 0x50
285#define NETX_XPEC_EC_MASKA_OFS 0x54
286#define NETX_XPEC_EC_MASKB_OFS 0x58
287#define NETX_XPEC_EC_MASK0_OFS 0x5c
288#define NETX_XPEC_EC_MASK8_OFS 0x7c
289#define NETX_XPEC_EC_MASK9_OFS 0x80
290#define NETX_XPEC_XPU_HOLD_PC_OFS 0x100
291#define NETX_XPEC_RAM_START_OFS 0x2000
292
293/* Bits */
294#define XPU_HOLD_PC (1<<0)
295
296/* XMAC register offsets relative to NETX_VA_XMAC(no) */
297#define NETX_XMAC_RPU_PROGRAM_START_OFS 0x000
298#define NETX_XMAC_RPU_PROGRAM_END_OFS 0x3ff
299#define NETX_XMAC_TPU_PROGRAM_START_OFS 0x400
300#define NETX_XMAC_TPU_PROGRAM_END_OFS 0x7ff
301#define NETX_XMAC_RPU_HOLD_PC_OFS 0xa00
302#define NETX_XMAC_TPU_HOLD_PC_OFS 0xa04
303#define NETX_XMAC_STATUS_SHARED0_OFS 0x840
304#define NETX_XMAC_CONFIG_SHARED0_OFS 0x844
305#define NETX_XMAC_STATUS_SHARED1_OFS 0x848
306#define NETX_XMAC_CONFIG_SHARED1_OFS 0x84c
307#define NETX_XMAC_STATUS_SHARED2_OFS 0x850
308#define NETX_XMAC_CONFIG_SHARED2_OFS 0x854
309#define NETX_XMAC_STATUS_SHARED3_OFS 0x858
310#define NETX_XMAC_CONFIG_SHARED3_OFS 0x85c
311
312#define RPU_HOLD_PC (1<<15)
313#define TPU_HOLD_PC (1<<15)
314
315/*******************************
316 * Pointer FIFO *
317 *******************************/
318
319/* Registers */
320#define NETX_PFIFO_REG(ofs) __io(NETX_VA_PFIFO + (ofs))
321#define NETX_PFIFO_BASE(pfifo) NETX_PFIFO_REG(0x00 + ((pfifo)<<2))
322#define NETX_PFIFO_BORDER_BASE(pfifo) NETX_PFIFO_REG(0x80 + ((pfifo)<<2))
323#define NETX_PFIFO_RESET NETX_PFIFO_REG(0x100)
324#define NETX_PFIFO_FULL NETX_PFIFO_REG(0x104)
325#define NETX_PFIFO_EMPTY NETX_PFIFO_REG(0x108)
326#define NETX_PFIFO_OVEFLOW NETX_PFIFO_REG(0x10c)
327#define NETX_PFIFO_UNDERRUN NETX_PFIFO_REG(0x110)
328#define NETX_PFIFO_FILL_LEVEL(pfifo) NETX_PFIFO_REG(0x180 + ((pfifo)<<2))
329#define NETX_PFIFO_XPEC_ISR(xpec) NETX_PFIFO_REG(0x400 + ((xpec) << 2))
330
331/*******************************
332 * Dual Port Memory *
333 *******************************/
334
335/* Registers */
336#define NETX_DPMAS_REG(ofs) __io(NETX_VA_DPMAS + (ofs))
337#define NETX_DPMAS_SYS_STAT NETX_DPMAS_REG(0x4d8)
338#define NETX_DPMAS_INT_STAT NETX_DPMAS_REG(0x4e0)
339#define NETX_DPMAS_INT_EN NETX_DPMAS_REG(0x4f0)
340#define NETX_DPMAS_IF_CONF0 NETX_DPMAS_REG(0x608)
341#define NETX_DPMAS_IF_CONF1 NETX_DPMAS_REG(0x60c)
342#define NETX_DPMAS_EXT_CONFIG(cs) NETX_DPMAS_REG(0x610 + 4 * (cs))
343#define NETX_DPMAS_IO_MODE0 NETX_DPMAS_REG(0x620) /* I/O 32..63 */
344#define NETX_DPMAS_DRV_EN0 NETX_DPMAS_REG(0x624)
345#define NETX_DPMAS_DATA0 NETX_DPMAS_REG(0x628)
346#define NETX_DPMAS_IO_MODE1 NETX_DPMAS_REG(0x630) /* I/O 64..84 */
347#define NETX_DPMAS_DRV_EN1 NETX_DPMAS_REG(0x634)
348#define NETX_DPMAS_DATA1 NETX_DPMAS_REG(0x638)
349
350/* Bits */
351#define NETX_DPMAS_INT_EN_GLB_EN (1<<31)
352#define NETX_DPMAS_INT_EN_MEM_LCK (1<<30)
353#define NETX_DPMAS_INT_EN_WDG (1<<29)
354#define NETX_DPMAS_INT_EN_PIO72 (1<<28)
355#define NETX_DPMAS_INT_EN_PIO47 (1<<27)
356#define NETX_DPMAS_INT_EN_PIO40 (1<<26)
357#define NETX_DPMAS_INT_EN_PIO36 (1<<25)
358#define NETX_DPMAS_INT_EN_PIO35 (1<<24)
359
360#define NETX_DPMAS_IF_CONF0_HIF_DISABLED (0<<28)
361#define NETX_DPMAS_IF_CONF0_HIF_EXT_BUS (1<<28)
362#define NETX_DPMAS_IF_CONF0_HIF_UP_8BIT (2<<28)
363#define NETX_DPMAS_IF_CONF0_HIF_UP_16BIT (3<<28)
364#define NETX_DPMAS_IF_CONF0_HIF_IO (4<<28)
365#define NETX_DPMAS_IF_CONF0_WAIT_DRV_PP (1<<14)
366#define NETX_DPMAS_IF_CONF0_WAIT_DRV_OD (2<<14)
367#define NETX_DPMAS_IF_CONF0_WAIT_DRV_TRI (3<<14)
368
369#define NETX_DPMAS_IF_CONF1_IRQ_POL_PIO35 (1<<26)
370#define NETX_DPMAS_IF_CONF1_IRQ_POL_PIO36 (1<<27)
371#define NETX_DPMAS_IF_CONF1_IRQ_POL_PIO40 (1<<28)
372#define NETX_DPMAS_IF_CONF1_IRQ_POL_PIO47 (1<<29)
373#define NETX_DPMAS_IF_CONF1_IRQ_POL_PIO72 (1<<30)
374
375#define NETX_EXT_CONFIG_TALEWIDTH(x) (((x) & 0x7) << 29)
376#define NETX_EXT_CONFIG_TADRHOLD(x) (((x) & 0x7) << 26)
377#define NETX_EXT_CONFIG_TCSON(x) (((x) & 0x7) << 23)
378#define NETX_EXT_CONFIG_TRDON(x) (((x) & 0x7) << 20)
379#define NETX_EXT_CONFIG_TWRON(x) (((x) & 0x7) << 17)
380#define NETX_EXT_CONFIG_TWROFF(x) (((x) & 0x1f) << 12)
381#define NETX_EXT_CONFIG_TRDWRCYC(x) (((x) & 0x1f) << 7)
382#define NETX_EXT_CONFIG_WAIT_POL (1<<6)
383#define NETX_EXT_CONFIG_WAIT_EN (1<<5)
384#define NETX_EXT_CONFIG_NRD_MODE (1<<4)
385#define NETX_EXT_CONFIG_DS_MODE (1<<3)
386#define NETX_EXT_CONFIG_NWR_MODE (1<<2)
387#define NETX_EXT_CONFIG_16BIT (1<<1)
388#define NETX_EXT_CONFIG_CS_ENABLE (1<<0)
389
390#define NETX_DPMAS_IO_MODE0_WRL (1<<13)
391#define NETX_DPMAS_IO_MODE0_WAIT (1<<14)
392#define NETX_DPMAS_IO_MODE0_READY (1<<15)
393#define NETX_DPMAS_IO_MODE0_CS0 (1<<19)
394#define NETX_DPMAS_IO_MODE0_EXTRD (1<<20)
395
396#define NETX_DPMAS_IO_MODE1_CS2 (1<<15)
397#define NETX_DPMAS_IO_MODE1_CS1 (1<<16)
398#define NETX_DPMAS_IO_MODE1_SAMPLE_NPOR (0<<30)
399#define NETX_DPMAS_IO_MODE1_SAMPLE_100MHZ (1<<30)
400#define NETX_DPMAS_IO_MODE1_SAMPLE_NPIO36 (2<<30)
401#define NETX_DPMAS_IO_MODE1_SAMPLE_PIO36 (3<<30)
402
403/*******************************
404 * I2C *
405 *******************************/
406#define NETX_I2C_REG(ofs) __io(NETX_VA_I2C, (ofs))
407#define NETX_I2C_CTRL NETX_I2C_REG(0x0)
408#define NETX_I2C_DATA NETX_I2C_REG(0x4)
409
410#endif /* __ASM_ARCH_NETX_REGS_H */
diff --git a/include/asm-arm/arch-netx/param.h b/include/asm-arm/arch-netx/param.h
deleted file mode 100644
index 7a80c26178a8..000000000000
--- a/include/asm-arm/arch-netx/param.h
+++ /dev/null
@@ -1,18 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-netx/param.h
3 *
4 * Copyright (C) 2005 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2
8 * as published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */
diff --git a/include/asm-arm/arch-netx/pfifo.h b/include/asm-arm/arch-netx/pfifo.h
deleted file mode 100644
index 4af2ee4a32c1..000000000000
--- a/include/asm-arm/arch-netx/pfifo.h
+++ /dev/null
@@ -1,54 +0,0 @@
1/*
2 * include/asm-arm/arch-netx/pfifo.h
3 *
4 * Copyright (c) 2005 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2
8 * as published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */
19
20
21#ifndef ASM_ARCH_PFIFO_H
22#define ASM_ARCH_PFIFO_H
23
24static inline int pfifo_push(int no, unsigned int pointer)
25{
26 writel(pointer, NETX_PFIFO_BASE(no));
27 return 0;
28}
29
30static inline unsigned int pfifo_pop(int no)
31{
32 return readl(NETX_PFIFO_BASE(no));
33}
34
35static inline int pfifo_fill_level(int no)
36{
37
38 return readl(NETX_PFIFO_FILL_LEVEL(no));
39}
40
41static inline int pfifo_full(int no)
42{
43 return readl(NETX_PFIFO_FULL) & (1<<no) ? 1 : 0;
44}
45
46static inline int pfifo_empty(int no)
47{
48 return readl(NETX_PFIFO_EMPTY) & (1<<no) ? 1 : 0;
49}
50
51int pfifo_request(unsigned int pfifo_mask);
52void pfifo_free(unsigned int pfifo_mask);
53
54#endif /* ASM_ARCH_PFIFO_H */
diff --git a/include/asm-arm/arch-netx/system.h b/include/asm-arm/arch-netx/system.h
deleted file mode 100644
index 52adf368d765..000000000000
--- a/include/asm-arm/arch-netx/system.h
+++ /dev/null
@@ -1,38 +0,0 @@
1/*
2 * include/asm-arm/arch-netx/system.h
3 *
4 * Copyright (C) 2005 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2
8 * as published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */
19#ifndef __ASM_ARCH_SYSTEM_H
20#define __ASM_ARCH_SYSTEM_H
21
22#include <asm/io.h>
23#include <asm/hardware.h>
24#include "netx-regs.h"
25
26static inline void arch_idle(void)
27{
28 cpu_do_idle();
29}
30
31static inline void arch_reset(char mode)
32{
33 writel(NETX_SYSTEM_RES_CR_FIRMW_RES_EN | NETX_SYSTEM_RES_CR_FIRMW_RES,
34 NETX_SYSTEM_RES_CR);
35}
36
37#endif
38
diff --git a/include/asm-arm/arch-netx/timex.h b/include/asm-arm/arch-netx/timex.h
deleted file mode 100644
index 7fdb42da0b40..000000000000
--- a/include/asm-arm/arch-netx/timex.h
+++ /dev/null
@@ -1,20 +0,0 @@
1/*
2 * include/asm-arm/arch-netx/timex.h
3 *
4 * Copyright (C) 2005 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2
8 * as published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */
19
20#define CLOCK_TICK_RATE 100000000
diff --git a/include/asm-arm/arch-netx/uncompress.h b/include/asm-arm/arch-netx/uncompress.h
deleted file mode 100644
index f89434547102..000000000000
--- a/include/asm-arm/arch-netx/uncompress.h
+++ /dev/null
@@ -1,76 +0,0 @@
1/*
2 * include/asm-arm/arch-netx/uncompress.h
3 *
4 * Copyright (C) 2005 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2
8 * as published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */
19
20/*
21 * The following code assumes the serial port has already been
22 * initialized by the bootloader. We search for the first enabled
23 * port in the most probable order. If you didn't setup a port in
24 * your bootloader then nothing will appear (which might be desired).
25 *
26 * This does not append a newline
27 */
28
29#define REG(x) (*(volatile unsigned long *)(x))
30
31#define UART1_BASE 0x100a00
32#define UART2_BASE 0x100a80
33
34#define UART_DR 0x0
35
36#define UART_CR 0x14
37#define CR_UART_EN (1<<0)
38
39#define UART_FR 0x18
40#define FR_BUSY (1<<3)
41#define FR_TXFF (1<<5)
42
43static void putc(char c)
44{
45 unsigned long base;
46
47 if (REG(UART1_BASE + UART_CR) & CR_UART_EN)
48 base = UART1_BASE;
49 else if (REG(UART2_BASE + UART_CR) & CR_UART_EN)
50 base = UART2_BASE;
51 else
52 return;
53
54 while (REG(base + UART_FR) & FR_TXFF);
55 REG(base + UART_DR) = c;
56}
57
58static inline void flush(void)
59{
60 unsigned long base;
61
62 if (REG(UART1_BASE + UART_CR) & CR_UART_EN)
63 base = UART1_BASE;
64 else if (REG(UART2_BASE + UART_CR) & CR_UART_EN)
65 base = UART2_BASE;
66 else
67 return;
68
69 while (REG(base + UART_FR) & FR_BUSY);
70}
71
72/*
73 * nothing to do
74 */
75#define arch_decomp_setup()
76#define arch_decomp_wdog()
diff --git a/include/asm-arm/arch-netx/vmalloc.h b/include/asm-arm/arch-netx/vmalloc.h
deleted file mode 100644
index da2da5a595da..000000000000
--- a/include/asm-arm/arch-netx/vmalloc.h
+++ /dev/null
@@ -1,19 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-netx/vmalloc.h
3 *
4 * Copyright (C) 2005 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2
8 * as published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */
19#define VMALLOC_END (PAGE_OFFSET + 0x10000000)
diff --git a/include/asm-arm/arch-netx/xc.h b/include/asm-arm/arch-netx/xc.h
deleted file mode 100644
index 659af19512a9..000000000000
--- a/include/asm-arm/arch-netx/xc.h
+++ /dev/null
@@ -1,42 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-netx/xc.h
3 *
4 * Copyright (C) 2005 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2
8 * as published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */
19
20#ifndef __ASM_ARCH_XC_H
21#define __ASM_ARCH_XC_H
22
23struct xc {
24 int no;
25 unsigned int type;
26 unsigned int version;
27 void __iomem *xpec_base;
28 void __iomem *xmac_base;
29 void __iomem *sram_base;
30 int irq;
31 struct device *dev;
32};
33
34int xc_reset(struct xc *x);
35int xc_stop(struct xc* x);
36int xc_start(struct xc *x);
37int xc_running(struct xc *x);
38int xc_request_firmware(struct xc* x);
39struct xc* request_xc(int xcno, struct device *dev);
40void free_xc(struct xc *x);
41
42#endif /* __ASM_ARCH_XC_H */
diff --git a/include/asm-arm/arch-ns9xxx/board.h b/include/asm-arm/arch-ns9xxx/board.h
deleted file mode 100644
index e57443bdbbd9..000000000000
--- a/include/asm-arm/arch-ns9xxx/board.h
+++ /dev/null
@@ -1,42 +0,0 @@
1/*
2 * include/asm-arm/arch-ns9xxx/board.h
3 *
4 * Copyright (C) 2006,2007 by Digi International Inc.
5 * All rights reserved.
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License version 2 as published by
9 * the Free Software Foundation.
10 */
11#ifndef __ASM_ARCH_BOARD_H
12#define __ASM_ARCH_BOARD_H
13
14#include <asm/mach-types.h>
15
16#define board_is_a9m9750dev() (0 \
17 || machine_is_cc9p9360dev() \
18 || machine_is_cc9p9750dev() \
19 )
20
21#define board_is_a9mvali() (0 \
22 || machine_is_cc9p9360val() \
23 || machine_is_cc9p9750val() \
24 )
25
26#define board_is_jscc9p9210() (0 \
27 || machine_is_cc9p9210js() \
28 )
29
30#define board_is_jscc9p9215() (0 \
31 || machine_is_cc9p9215js() \
32 )
33
34#define board_is_jscc9p9360() (0 \
35 || machine_is_cc9p9360js() \
36 )
37
38#define board_is_uncbas() (0 \
39 || machine_is_cc7ucamry() \
40 )
41
42#endif /* ifndef __ASM_ARCH_BOARD_H */
diff --git a/include/asm-arm/arch-ns9xxx/debug-macro.S b/include/asm-arm/arch-ns9xxx/debug-macro.S
deleted file mode 100644
index 94680950ee67..000000000000
--- a/include/asm-arm/arch-ns9xxx/debug-macro.S
+++ /dev/null
@@ -1,22 +0,0 @@
1/*
2 * include/asm-arm/arch-ns9xxx/debug-macro.S
3 * Copyright (C) 2006 by Digi International Inc.
4 * All rights reserved.
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License version 2 as published by
8 * the Free Software Foundation.
9 */
10#include <asm/hardware.h>
11
12#include <asm/arch/regs-board-a9m9750dev.h>
13
14 .macro addruart,rx
15 mrc p15, 0, \rx, c1, c0
16 tst \rx, #1
17 ldreq \rx, =NS9XXX_CSxSTAT_PHYS(0)
18 ldrne \rx, =io_p2v(NS9XXX_CSxSTAT_PHYS(0))
19 .endm
20
21#define UART_SHIFT 2
22#include <asm/hardware/debug-8250.S>
diff --git a/include/asm-arm/arch-ns9xxx/dma.h b/include/asm-arm/arch-ns9xxx/dma.h
deleted file mode 100644
index a67cbbe009c4..000000000000
--- a/include/asm-arm/arch-ns9xxx/dma.h
+++ /dev/null
@@ -1,14 +0,0 @@
1/*
2 * include/asm-arm/arch-ns9xxx/dma.h
3 *
4 * Copyright (C) 2006 by Digi International Inc.
5 * All rights reserved.
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License version 2 as published by
9 * the Free Software Foundation.
10 */
11#ifndef __ASM_ARCH_DMA_H
12#define __ASM_ARCH_DMA_H
13
14#endif /* ifndef __ASM_ARCH_DMA_H */
diff --git a/include/asm-arm/arch-ns9xxx/entry-macro.S b/include/asm-arm/arch-ns9xxx/entry-macro.S
deleted file mode 100644
index 2f6c89ddf958..000000000000
--- a/include/asm-arm/arch-ns9xxx/entry-macro.S
+++ /dev/null
@@ -1,28 +0,0 @@
1/*
2 * include/asm-arm/arch-ns9xxx/entry-macro.S
3 *
4 * Copyright (C) 2006,2007 by Digi International Inc.
5 * All rights reserved.
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License version 2 as published by
9 * the Free Software Foundation.
10 */
11#include <asm/hardware.h>
12#include <asm/arch/regs-sys-common.h>
13
14 .macro get_irqnr_preamble, base, tmp
15 ldr \base, =SYS_ISRADDR
16 .endm
17
18 .macro arch_ret_to_user, tmp1, tmp2
19 .endm
20
21 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
22 ldr \irqstat, [\base, #(SYS_ISA - SYS_ISRADDR)]
23 cmp \irqstat, #0
24 ldrne \irqnr, [\base]
25 .endm
26
27 .macro disable_fiq
28 .endm
diff --git a/include/asm-arm/arch-ns9xxx/gpio.h b/include/asm-arm/arch-ns9xxx/gpio.h
deleted file mode 100644
index adbca08583c0..000000000000
--- a/include/asm-arm/arch-ns9xxx/gpio.h
+++ /dev/null
@@ -1,47 +0,0 @@
1/*
2 * include/asm-arm/arch-ns9xxx/gpio.h
3 *
4 * Copyright (C) 2007 by Digi International Inc.
5 * All rights reserved.
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License version 2 as published by
9 * the Free Software Foundation.
10*/
11#ifndef __ASM_ARCH_GPIO_H
12#define __ASM_ARCH_GPIO_H
13
14#include <asm/errno.h>
15
16int gpio_request(unsigned gpio, const char *label);
17
18void gpio_free(unsigned gpio);
19
20int ns9xxx_gpio_configure(unsigned gpio, int inv, int func);
21
22int gpio_direction_input(unsigned gpio);
23
24int gpio_direction_output(unsigned gpio, int value);
25
26int gpio_get_value(unsigned gpio);
27
28void gpio_set_value(unsigned gpio, int value);
29
30/*
31 * ns9xxx can use gpio pins to trigger an irq, but it's not generic
32 * enough to be supported by the gpio_to_irq/irq_to_gpio interface
33 */
34static inline int gpio_to_irq(unsigned gpio)
35{
36 return -EINVAL;
37}
38
39static inline int irq_to_gpio(unsigned irq)
40{
41 return -EINVAL;
42}
43
44/* get the cansleep() stubs */
45#include <asm-generic/gpio.h>
46
47#endif /* ifndef __ASM_ARCH_GPIO_H */
diff --git a/include/asm-arm/arch-ns9xxx/hardware.h b/include/asm-arm/arch-ns9xxx/hardware.h
deleted file mode 100644
index 0dca11ce21fc..000000000000
--- a/include/asm-arm/arch-ns9xxx/hardware.h
+++ /dev/null
@@ -1,79 +0,0 @@
1/*
2 * include/asm-arm/arch-ns9xxx/hardware.h
3 *
4 * Copyright (C) 2006 by Digi International Inc.
5 * All rights reserved.
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License version 2 as published by
9 * the Free Software Foundation.
10 */
11#ifndef __ASM_ARCH_HARDWARE_H
12#define __ASM_ARCH_HARDWARE_H
13
14#include <asm/memory.h>
15
16/*
17 * NetSilicon NS9xxx internal mapping:
18 *
19 * physical <--> virtual
20 * 0x90000000 - 0x906fffff <--> 0xf9000000 - 0xf96fffff
21 * 0xa0100000 - 0xa0afffff <--> 0xfa100000 - 0xfaafffff
22 */
23#define io_p2v(x) (0xf0000000 \
24 + (((x) & 0xf0000000) >> 4) \
25 + ((x) & 0x00ffffff))
26
27#define io_v2p(x) ((((x) & 0x0f000000) << 4) \
28 + ((x) & 0x00ffffff))
29
30#define __REGSHIFT(mask) ((mask) & (-(mask)))
31
32#define __REGBIT(bit) ((u32)1 << (bit))
33#define __REGBITS(hbit, lbit) ((((u32)1 << ((hbit) - (lbit) + 1)) - 1) << (lbit))
34#define __REGVAL(mask, value) (((value) * __REGSHIFT(mask)) & (mask))
35
36#ifndef __ASSEMBLY__
37
38# define __REG(x) ((void __iomem __force *)io_p2v((x)))
39# define __REG2(x, y) ((void __iomem __force *)(io_p2v((x)) + 4 * (y)))
40
41# define __REGSET(var, field, value) \
42 ((var) = (((var) & ~((field) & ~(value))) | (value)))
43
44# define REGSET(var, reg, field, value) \
45 __REGSET(var, reg ## _ ## field, reg ## _ ## field ## _ ## value)
46
47# define REGSET_IDX(var, reg, field, idx, value) \
48 __REGSET(var, reg ## _ ## field((idx)), reg ## _ ## field ## _ ## value((idx)))
49
50# define REGSETIM(var, reg, field, value) \
51 __REGSET(var, reg ## _ ## field, __REGVAL(reg ## _ ## field, (value)))
52
53# define REGSETIM_IDX(var, reg, field, idx, value) \
54 __REGSET(var, reg ## _ ## field((idx)), __REGVAL(reg ## _ ## field((idx)), (value)))
55
56# define __REGGET(var, field) \
57 (((var) & (field)))
58
59# define REGGET(var, reg, field) \
60 __REGGET(var, reg ## _ ## field)
61
62# define REGGET_IDX(var, reg, field, idx) \
63 __REGGET(var, reg ## _ ## field((idx)))
64
65# define REGGETIM(var, reg, field) \
66 __REGGET(var, reg ## _ ## field) / __REGSHIFT(reg ## _ ## field)
67
68# define REGGETIM_IDX(var, reg, field, idx) \
69 __REGGET(var, reg ## _ ## field((idx))) / \
70 __REGSHIFT(reg ## _ ## field((idx)))
71
72#else
73
74# define __REG(x) io_p2v(x)
75# define __REG2(x, y) io_p2v((x) + 4 * (y))
76
77#endif
78
79#endif /* ifndef __ASM_ARCH_HARDWARE_H */
diff --git a/include/asm-arm/arch-ns9xxx/io.h b/include/asm-arm/arch-ns9xxx/io.h
deleted file mode 100644
index 6f82d28af120..000000000000
--- a/include/asm-arm/arch-ns9xxx/io.h
+++ /dev/null
@@ -1,20 +0,0 @@
1/*
2 * include/asm-arm/arch-ns9xxx/io.h
3 *
4 * Copyright (C) 2006 by Digi International Inc.
5 * All rights reserved.
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License version 2 as published by
9 * the Free Software Foundation.
10 */
11#ifndef __ASM_ARCH_IO_H
12#define __ASM_ARCH_IO_H
13
14#define IO_SPACE_LIMIT 0xffffffff /* XXX */
15
16#define __io(a) ((void __iomem *)(a))
17#define __mem_pci(a) (a)
18#define __mem_isa(a) (IO_BASE + (a))
19
20#endif /* ifndef __ASM_ARCH_IO_H */
diff --git a/include/asm-arm/arch-ns9xxx/irqs.h b/include/asm-arm/arch-ns9xxx/irqs.h
deleted file mode 100644
index e83d48ec42c9..000000000000
--- a/include/asm-arm/arch-ns9xxx/irqs.h
+++ /dev/null
@@ -1,86 +0,0 @@
1/*
2 * include/asm-arm/arch-ns9xxx/irqs.h
3 *
4 * Copyright (C) 2006,2007 by Digi International Inc.
5 * All rights reserved.
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License version 2 as published by
9 * the Free Software Foundation.
10 */
11#ifndef __ASM_ARCH_IRQS_H
12#define __ASM_ARCH_IRQS_H
13
14/* NetSilicon 9360 */
15#define IRQ_NS9XXX_WATCHDOG 0
16#define IRQ_NS9XXX_AHBBUSERR 1
17#define IRQ_NS9360_BBUSAGG 2
18/* irq 3 is reserved for NS9360 */
19#define IRQ_NS9XXX_ETHRX 4
20#define IRQ_NS9XXX_ETHTX 5
21#define IRQ_NS9XXX_ETHPHY 6
22#define IRQ_NS9360_LCD 7
23#define IRQ_NS9360_SERBRX 8
24#define IRQ_NS9360_SERBTX 9
25#define IRQ_NS9360_SERARX 10
26#define IRQ_NS9360_SERATX 11
27#define IRQ_NS9360_SERCRX 12
28#define IRQ_NS9360_SERCTX 13
29#define IRQ_NS9360_I2C 14
30#define IRQ_NS9360_BBUSDMA 15
31#define IRQ_NS9360_TIMER0 16
32#define IRQ_NS9360_TIMER1 17
33#define IRQ_NS9360_TIMER2 18
34#define IRQ_NS9360_TIMER3 19
35#define IRQ_NS9360_TIMER4 20
36#define IRQ_NS9360_TIMER5 21
37#define IRQ_NS9360_TIMER6 22
38#define IRQ_NS9360_TIMER7 23
39#define IRQ_NS9360_RTC 24
40#define IRQ_NS9360_USBHOST 25
41#define IRQ_NS9360_USBDEVICE 26
42#define IRQ_NS9360_IEEE1284 27
43#define IRQ_NS9XXX_EXT0 28
44#define IRQ_NS9XXX_EXT1 29
45#define IRQ_NS9XXX_EXT2 30
46#define IRQ_NS9XXX_EXT3 31
47
48#define BBUS_IRQ(irq) (32 + irq)
49
50#define IRQ_BBUS_DMA BBUS_IRQ(0)
51#define IRQ_BBUS_SERBRX BBUS_IRQ(2)
52#define IRQ_BBUS_SERBTX BBUS_IRQ(3)
53#define IRQ_BBUS_SERARX BBUS_IRQ(4)
54#define IRQ_BBUS_SERATX BBUS_IRQ(5)
55#define IRQ_BBUS_SERCRX BBUS_IRQ(6)
56#define IRQ_BBUS_SERCTX BBUS_IRQ(7)
57#define IRQ_BBUS_SERDRX BBUS_IRQ(8)
58#define IRQ_BBUS_SERDTX BBUS_IRQ(9)
59#define IRQ_BBUS_I2C BBUS_IRQ(10)
60#define IRQ_BBUS_1284 BBUS_IRQ(11)
61#define IRQ_BBUS_UTIL BBUS_IRQ(12)
62#define IRQ_BBUS_RTC BBUS_IRQ(13)
63#define IRQ_BBUS_USBHST BBUS_IRQ(14)
64#define IRQ_BBUS_USBDEV BBUS_IRQ(15)
65#define IRQ_BBUS_AHBDMA1 BBUS_IRQ(24)
66#define IRQ_BBUS_AHBDMA2 BBUS_IRQ(25)
67
68/*
69 * these Interrupts are specific for the a9m9750dev board.
70 * They are generated by an FPGA that interrupts the CPU on
71 * IRQ_NS9360_EXT2
72 */
73#define FPGA_IRQ(irq) (64 + irq)
74
75#define IRQ_FPGA_UARTA FPGA_IRQ(0)
76#define IRQ_FPGA_UARTB FPGA_IRQ(1)
77#define IRQ_FPGA_UARTC FPGA_IRQ(2)
78#define IRQ_FPGA_UARTD FPGA_IRQ(3)
79#define IRQ_FPGA_TOUCH FPGA_IRQ(4)
80#define IRQ_FPGA_CF FPGA_IRQ(5)
81#define IRQ_FPGA_CAN0 FPGA_IRQ(6)
82#define IRQ_FPGA_CAN1 FPGA_IRQ(7)
83
84#define NR_IRQS 72
85
86#endif /* __ASM_ARCH_IRQS_H */
diff --git a/include/asm-arm/arch-ns9xxx/memory.h b/include/asm-arm/arch-ns9xxx/memory.h
deleted file mode 100644
index ce1343e593e1..000000000000
--- a/include/asm-arm/arch-ns9xxx/memory.h
+++ /dev/null
@@ -1,27 +0,0 @@
1/*
2 * include/asm-arm/arch-ns9xxx/memory.h
3 *
4 * Copyright (C) 2006 by Digi International Inc.
5 * All rights reserved.
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License version 2 as published by
9 * the Free Software Foundation.
10*/
11#ifndef __ASM_ARCH_MEMORY_H
12#define __ASM_ARCH_MEMORY_H
13
14/* x in [0..3] */
15#define NS9XXX_CSxSTAT_PHYS(x) UL(((x) + 4) << 28)
16
17#define NS9XXX_CS0STAT_LENGTH UL(0x1000)
18#define NS9XXX_CS1STAT_LENGTH UL(0x1000)
19#define NS9XXX_CS2STAT_LENGTH UL(0x1000)
20#define NS9XXX_CS3STAT_LENGTH UL(0x1000)
21
22#define PHYS_OFFSET UL(0x00000000)
23
24#define __virt_to_bus(x) __virt_to_phys(x)
25#define __bus_to_virt(x) __phys_to_virt(x)
26
27#endif
diff --git a/include/asm-arm/arch-ns9xxx/module.h b/include/asm-arm/arch-ns9xxx/module.h
deleted file mode 100644
index ac08a31111e4..000000000000
--- a/include/asm-arm/arch-ns9xxx/module.h
+++ /dev/null
@@ -1,60 +0,0 @@
1/*
2 * include/asm-arm/arch-ns9xxx/module.h
3 *
4 * Copyright (C) 2007 by Digi International Inc.
5 * All rights reserved.
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License version 2 as published by
9 * the Free Software Foundation.
10 */
11#ifndef __ASM_ARCH_MODULE_H
12#define __ASM_ARCH_MODULE_H
13
14#include <asm/mach-types.h>
15
16#define module_is_cc7ucamry() (0 \
17 || machine_is_cc7ucamry() \
18 )
19
20#define module_is_cc9c() (0 \
21 || machine_is_cc9c() \
22 )
23
24#define module_is_cc9p9210() (0 \
25 || machine_is_cc9p9210() \
26 || machine_is_cc9p9210js() \
27 )
28
29#define module_is_cc9p9215() (0 \
30 || machine_is_cc9p9215() \
31 || machine_is_cc9p9215js() \
32 )
33
34#define module_is_cc9p9360() (0 \
35 || machine_is_a9m9360() \
36 || machine_is_cc9p9360dev() \
37 || machine_is_cc9p9360js() \
38 || machine_is_cc9p9360val() \
39 )
40
41#define module_is_cc9p9750() (0 \
42 || machine_is_a9m9750() \
43 || machine_is_cc9p9750dev() \
44 || machine_is_cc9p9750js() \
45 || machine_is_cc9p9750val() \
46 )
47
48#define module_is_ccw9c() (0 \
49 || machine_is_ccw9c() \
50 )
51
52#define module_is_inc20otter() (0 \
53 || machine_is_inc20otter() \
54 )
55
56#define module_is_otter() (0 \
57 || machine_is_otter() \
58 )
59
60#endif /* ifndef __ASM_ARCH_MODULE_H */
diff --git a/include/asm-arm/arch-ns9xxx/processor-ns9360.h b/include/asm-arm/arch-ns9xxx/processor-ns9360.h
deleted file mode 100644
index f3aa6c50dbe5..000000000000
--- a/include/asm-arm/arch-ns9xxx/processor-ns9360.h
+++ /dev/null
@@ -1,32 +0,0 @@
1/*
2 * include/asm-arm/arch-ns9xxx/processor-ns9360.h
3 *
4 * Copyright (C) 2007 by Digi International Inc.
5 * All rights reserved.
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License version 2 as published by
9 * the Free Software Foundation.
10 */
11#ifndef __ASM_ARCH_PROCESSORNS9360_H
12#define __ASM_ARCH_PROCESSORNS9360_H
13
14#include <linux/init.h>
15
16void ns9360_reset(char mode);
17
18unsigned long ns9360_systemclock(void) __attribute__((const));
19
20static inline unsigned long ns9360_cpuclock(void) __attribute__((const));
21static inline unsigned long ns9360_cpuclock(void)
22{
23 return ns9360_systemclock() / 2;
24}
25
26void __init ns9360_map_io(void);
27
28extern struct sys_timer ns9360_timer;
29
30int ns9360_gpio_configure(unsigned gpio, int inv, int func);
31
32#endif /* ifndef __ASM_ARCH_PROCESSORNS9360_H */
diff --git a/include/asm-arm/arch-ns9xxx/processor.h b/include/asm-arm/arch-ns9xxx/processor.h
deleted file mode 100644
index 3137e5ba01a9..000000000000
--- a/include/asm-arm/arch-ns9xxx/processor.h
+++ /dev/null
@@ -1,42 +0,0 @@
1/*
2 * include/asm-arm/arch-ns9xxx/processor.h
3 *
4 * Copyright (C) 2006,2007 by Digi International Inc.
5 * All rights reserved.
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License version 2 as published by
9 * the Free Software Foundation.
10 */
11#ifndef __ASM_ARCH_PROCESSOR_H
12#define __ASM_ARCH_PROCESSOR_H
13
14#include <asm/arch/module.h>
15
16#define processor_is_ns9210() (0 \
17 || module_is_cc7ucamry() \
18 || module_is_cc9p9210() \
19 || module_is_inc20otter() \
20 || module_is_otter() \
21 )
22
23#define processor_is_ns9215() (0 \
24 || module_is_cc9p9215() \
25 )
26
27#define processor_is_ns9360() (0 \
28 || module_is_cc9p9360() \
29 || module_is_cc9c() \
30 || module_is_ccw9c() \
31 )
32
33#define processor_is_ns9750() (0 \
34 || module_is_cc9p9750() \
35 )
36
37#define processor_is_ns921x() (0 \
38 || processor_is_ns9210() \
39 || processor_is_ns9215() \
40 )
41
42#endif /* ifndef __ASM_ARCH_PROCESSOR_H */
diff --git a/include/asm-arm/arch-ns9xxx/regs-bbu.h b/include/asm-arm/arch-ns9xxx/regs-bbu.h
deleted file mode 100644
index 7ee194dc6354..000000000000
--- a/include/asm-arm/arch-ns9xxx/regs-bbu.h
+++ /dev/null
@@ -1,45 +0,0 @@
1/*
2 * include/asm-arm/arch-ns9xxx/regs-bbu.h
3 *
4 * Copyright (C) 2006 by Digi International Inc.
5 * All rights reserved.
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License version 2 as published by
9 * the Free Software Foundation.
10 */
11#ifndef __ASM_ARCH_REGSBBU_H
12#define __ASM_ARCH_REGSBBU_H
13
14#include <asm/hardware.h>
15
16/* BBus Utility */
17
18/* GPIO Configuration Registers block 1 */
19/* NOTE: the HRM starts counting at 1 for the GPIO registers, here the start is
20 * at 0 for each block. That is, BBU_GCONFb1(0) is GPIO Configuration Register
21 * #1, BBU_GCONFb2(0) is GPIO Configuration Register #8. */
22#define BBU_GCONFb1(x) __REG2(0x90600010, (x))
23#define BBU_GCONFb2(x) __REG2(0x90600100, (x))
24
25#define BBU_GCONFx_DIR(m) __REGBIT(3 + (((m) & 7) << 2))
26#define BBU_GCONFx_DIR_INPUT(m) __REGVAL(BBU_GCONFx_DIR(m), 0)
27#define BBU_GCONFx_DIR_OUTPUT(m) __REGVAL(BBU_GCONFx_DIR(m), 1)
28#define BBU_GCONFx_INV(m) __REGBIT(2 + (((m) & 7) << 2))
29#define BBU_GCONFx_INV_NO(m) __REGVAL(BBU_GCONFx_INV(m), 0)
30#define BBU_GCONFx_INV_YES(m) __REGVAL(BBU_GCONFx_INV(m), 1)
31#define BBU_GCONFx_FUNC(m) __REGBITS(1 + (((m) & 7) << 2), ((m) & 7) << 2)
32#define BBU_GCONFx_FUNC_0(m) __REGVAL(BBU_GCONFx_FUNC(m), 0)
33#define BBU_GCONFx_FUNC_1(m) __REGVAL(BBU_GCONFx_FUNC(m), 1)
34#define BBU_GCONFx_FUNC_2(m) __REGVAL(BBU_GCONFx_FUNC(m), 2)
35#define BBU_GCONFx_FUNC_3(m) __REGVAL(BBU_GCONFx_FUNC(m), 3)
36
37#define BBU_GCTRL1 __REG(0x90600030)
38#define BBU_GCTRL2 __REG(0x90600034)
39#define BBU_GCTRL3 __REG(0x90600120)
40
41#define BBU_GSTAT1 __REG(0x90600040)
42#define BBU_GSTAT2 __REG(0x90600044)
43#define BBU_GSTAT3 __REG(0x90600130)
44
45#endif /* ifndef __ASM_ARCH_REGSBBU_H */
diff --git a/include/asm-arm/arch-ns9xxx/regs-board-a9m9750dev.h b/include/asm-arm/arch-ns9xxx/regs-board-a9m9750dev.h
deleted file mode 100644
index afa3a9db3e1d..000000000000
--- a/include/asm-arm/arch-ns9xxx/regs-board-a9m9750dev.h
+++ /dev/null
@@ -1,24 +0,0 @@
1/*
2 * include/asm-arm/arch-ns9xxx/regs-board-a9m9750dev.h
3 *
4 * Copyright (C) 2006 by Digi International Inc.
5 * All rights reserved.
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License version 2 as published by
9 * the Free Software Foundation.
10 */
11#ifndef __ASM_ARCH_REGSBOARDA9M9750_H
12#define __ASM_ARCH_REGSBOARDA9M9750_H
13
14#include <asm/hardware.h>
15
16#define FPGA_UARTA_BASE io_p2v(NS9XXX_CSxSTAT_PHYS(0))
17#define FPGA_UARTB_BASE io_p2v(NS9XXX_CSxSTAT_PHYS(0) + 0x08)
18#define FPGA_UARTC_BASE io_p2v(NS9XXX_CSxSTAT_PHYS(0) + 0x10)
19#define FPGA_UARTD_BASE io_p2v(NS9XXX_CSxSTAT_PHYS(0) + 0x18)
20
21#define FPGA_IER __REG(NS9XXX_CSxSTAT_PHYS(0) + 0x50)
22#define FPGA_ISR __REG(NS9XXX_CSxSTAT_PHYS(0) + 0x60)
23
24#endif /* ifndef __ASM_ARCH_REGSBOARDA9M9750_H */
diff --git a/include/asm-arm/arch-ns9xxx/regs-mem.h b/include/asm-arm/arch-ns9xxx/regs-mem.h
deleted file mode 100644
index fb455a0ed845..000000000000
--- a/include/asm-arm/arch-ns9xxx/regs-mem.h
+++ /dev/null
@@ -1,135 +0,0 @@
1/*
2 * include/asm-arm/arch-ns9xxx/regs-mem.h
3 *
4 * Copyright (C) 2006 by Digi International Inc.
5 * All rights reserved.
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License version 2 as published by
9 * the Free Software Foundation.
10 */
11#ifndef __ASM_ARCH_REGSMEM_H
12#define __ASM_ARCH_REGSMEM_H
13
14#include <asm/hardware.h>
15
16/* Memory Module */
17
18/* Control register */
19#define MEM_CTRL __REG(0xa0700000)
20
21/* Status register */
22#define MEM_STAT __REG(0xa0700004)
23
24/* Configuration register */
25#define MEM_CONF __REG(0xa0700008)
26
27/* Dynamic Memory Control register */
28#define MEM_DMCTRL __REG(0xa0700020)
29
30/* Dynamic Memory Refresh Timer */
31#define MEM_DMRT __REG(0xa0700024)
32
33/* Dynamic Memory Read Configuration register */
34#define MEM_DMRC __REG(0xa0700028)
35
36/* Dynamic Memory Precharge Command Period (tRP) */
37#define MEM_DMPCP __REG(0xa0700030)
38
39/* Dynamic Memory Active to Precharge Command Period (tRAS) */
40#define MEM_DMAPCP __REG(0xa0700034)
41
42/* Dynamic Memory Self-Refresh Exit Time (tSREX) */
43#define MEM_DMSRET __REG(0xa0700038)
44
45/* Dynamic Memory Last Data Out to Active Time (tAPR) */
46#define MEM_DMLDOAT __REG(0xa070003c)
47
48/* Dynamic Memory Data-in to Active Command Time (tDAL or TAPW) */
49#define MEM_DMDIACT __REG(0xa0700040)
50
51/* Dynamic Memory Write Recovery Time (tWR, tDPL, tRWL, tRDL) */
52#define MEM_DMWRT __REG(0xa0700044)
53
54/* Dynamic Memory Active to Active Command Period (tRC) */
55#define MEM_DMAACP __REG(0xa0700048)
56
57/* Dynamic Memory Auto Refresh Period, and Auto Refresh to Active Command Period (tRFC) */
58#define MEM_DMARP __REG(0xa070004c)
59
60/* Dynamic Memory Exit Self-Refresh to Active Command (tXSR) */
61#define MEM_DMESRAC __REG(0xa0700050)
62
63/* Dynamic Memory Active Bank A to Active B Time (tRRD) */
64#define MEM_DMABAABT __REG(0xa0700054)
65
66/* Dynamic Memory Load Mode register to Active Command Time (tMRD) */
67#define MEM_DMLMACT __REG(0xa0700058)
68
69/* Static Memory Extended Wait */
70#define MEM_SMEW __REG(0xa0700080)
71
72/* Dynamic Memory Configuration Register x */
73#define MEM_DMCONF(x) __REG2(0xa0700100, (x) << 3)
74
75/* Dynamic Memory RAS and CAS Delay x */
76#define MEM_DMRCD(x) __REG2(0xa0700104, (x) << 3)
77
78/* Static Memory Configuration Register x */
79#define MEM_SMC(x) __REG2(0xa0700200, (x) << 3)
80
81/* Static Memory Configuration Register x: Write protect */
82#define MEM_SMC_PSMC __REGBIT(20)
83#define MEM_SMC_PSMC_OFF __REGVAL(MEM_SMC_PSMC, 0)
84#define MEM_SMC_PSMC_ON __REGVAL(MEM_SMC_PSMC, 1)
85
86/* Static Memory Configuration Register x: Buffer enable */
87#define MEM_SMC_BSMC __REGBIT(19)
88#define MEM_SMC_BSMC_OFF __REGVAL(MEM_SMC_BSMC, 0)
89#define MEM_SMC_BSMC_ON __REGVAL(MEM_SMC_BSMC, 1)
90
91/* Static Memory Configuration Register x: Extended Wait */
92#define MEM_SMC_EW __REGBIT(8)
93#define MEM_SMC_EW_OFF __REGVAL(MEM_SMC_EW, 0)
94#define MEM_SMC_EW_ON __REGVAL(MEM_SMC_EW, 1)
95
96/* Static Memory Configuration Register x: Byte lane state */
97#define MEM_SMC_PB __REGBIT(7)
98#define MEM_SMC_PB_0 __REGVAL(MEM_SMC_PB, 0)
99#define MEM_SMC_PB_1 __REGVAL(MEM_SMC_PB, 1)
100
101/* Static Memory Configuration Register x: Chip select polarity */
102#define MEM_SMC_PC __REGBIT(6)
103#define MEM_SMC_PC_AL __REGVAL(MEM_SMC_PC, 0)
104#define MEM_SMC_PC_AH __REGVAL(MEM_SMC_PC, 1)
105
106/* static memory configuration register x: page mode*/
107#define MEM_SMC_PM __REGBIT(3)
108#define MEM_SMC_PM_DIS __REGVAL(MEM_SMC_PM, 0)
109#define MEM_SMC_PM_ASYNC __REGVAL(MEM_SMC_PM, 1)
110
111/* static memory configuration register x: Memory width */
112#define MEM_SMC_MW __REGBITS(1, 0)
113#define MEM_SMC_MW_8 __REGVAL(MEM_SMC_MW, 0)
114#define MEM_SMC_MW_16 __REGVAL(MEM_SMC_MW, 1)
115#define MEM_SMC_MW_32 __REGVAL(MEM_SMC_MW, 2)
116
117/* Static Memory Write Enable Delay x */
118#define MEM_SMWED(x) __REG2(0xa0700204, (x) << 3)
119
120/* Static Memory Output Enable Delay x */
121#define MEM_SMOED(x) __REG2(0xa0700208, (x) << 3)
122
123/* Static Memory Read Delay x */
124#define MEM_SMRD(x) __REG2(0xa070020c, (x) << 3)
125
126/* Static Memory Page Mode Read Delay 0 */
127#define MEM_SMPMRD(x) __REG2(0xa0700210, (x) << 3)
128
129/* Static Memory Write Delay */
130#define MEM_SMWD(x) __REG2(0xa0700214, (x) << 3)
131
132/* Static Memory Turn Round Delay x */
133#define MEM_SWT(x) __REG2(0xa0700218, (x) << 3)
134
135#endif /* ifndef __ASM_ARCH_REGSMEM_H */
diff --git a/include/asm-arm/arch-ns9xxx/regs-sys-common.h b/include/asm-arm/arch-ns9xxx/regs-sys-common.h
deleted file mode 100644
index 956c57cb781f..000000000000
--- a/include/asm-arm/arch-ns9xxx/regs-sys-common.h
+++ /dev/null
@@ -1,31 +0,0 @@
1/*
2 * include/asm-arm/arch-ns9xxx/regs-sys-common.h
3 *
4 * Copyright (C) 2007 by Digi International Inc.
5 * All rights reserved.
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License version 2 as published by
9 * the Free Software Foundation.
10 */
11
12#ifndef __ASM_ARCH_REGSSYSCOMMON_H
13#define __ASM_ARCH_REGSSYSCOMMON_H
14#include <asm/hardware.h>
15
16/* Interrupt Vector Address Register Level x */
17#define SYS_IVA(x) __REG2(0xa09000c4, (x))
18
19/* Interrupt Configuration registers */
20#define SYS_IC(x) __REG2(0xa0900144, (x))
21
22/* ISRADDR */
23#define SYS_ISRADDR __REG(0xa0900164)
24
25/* Interrupt Status Active */
26#define SYS_ISA __REG(0xa0900168)
27
28/* Interrupt Status Raw */
29#define SYS_ISR __REG(0xa090016c)
30
31#endif /* ifndef __ASM_ARCH_REGSSYSCOMMON_H */
diff --git a/include/asm-arm/arch-ns9xxx/regs-sys-ns9360.h b/include/asm-arm/arch-ns9xxx/regs-sys-ns9360.h
deleted file mode 100644
index 318b6945afb6..000000000000
--- a/include/asm-arm/arch-ns9xxx/regs-sys-ns9360.h
+++ /dev/null
@@ -1,148 +0,0 @@
1/*
2 * include/asm-arm/arch-ns9xxx/regs-sys-ns9360.h
3 *
4 * Copyright (C) 2006,2007 by Digi International Inc.
5 * All rights reserved.
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License version 2 as published by
9 * the Free Software Foundation.
10 */
11#ifndef __ASM_ARCH_REGSSYSNS9360_H
12#define __ASM_ARCH_REGSSYSNS9360_H
13
14#include <asm/hardware.h>
15
16/* System Control Module */
17
18/* AHB Arbiter Gen Configuration */
19#define SYS_AHBAGENCONF __REG(0xa0900000)
20
21/* BRC */
22#define SYS_BRC(x) __REG2(0xa0900004, (x))
23
24/* Timer x Reload Count register */
25#define SYS_TRC(x) __REG2(0xa0900044, (x))
26
27/* Timer x Read register */
28#define SYS_TR(x) __REG2(0xa0900084, (x))
29
30/* Timer Interrupt Status register */
31#define SYS_TIS __REG(0xa0900170)
32
33/* PLL Configuration register */
34#define SYS_PLL __REG(0xa0900188)
35
36/* PLL FS status */
37#define SYS_PLL_FS __REGBITS(24, 23)
38
39/* PLL ND status */
40#define SYS_PLL_ND __REGBITS(20, 16)
41
42/* PLL Configuration register: PLL SW change */
43#define SYS_PLL_SWC __REGBIT(15)
44#define SYS_PLL_SWC_NO __REGVAL(SYS_PLL_SWC, 0)
45#define SYS_PLL_SWC_YES __REGVAL(SYS_PLL_SWC, 1)
46
47/* Timer x Control register */
48#define SYS_TC(x) __REG2(0xa0900190, (x))
49
50/* Timer x Control register: Timer enable */
51#define SYS_TCx_TEN __REGBIT(15)
52#define SYS_TCx_TEN_DIS __REGVAL(SYS_TCx_TEN, 0)
53#define SYS_TCx_TEN_EN __REGVAL(SYS_TCx_TEN, 1)
54
55/* Timer x Control register: CPU debug mode */
56#define SYS_TCx_TDBG __REGBIT(10)
57#define SYS_TCx_TDBG_CONT __REGVAL(SYS_TCx_TDBG, 0)
58#define SYS_TCx_TDBG_STOP __REGVAL(SYS_TCx_TDBG, 1)
59
60/* Timer x Control register: Interrupt clear */
61#define SYS_TCx_INTC __REGBIT(9)
62#define SYS_TCx_INTC_UNSET __REGVAL(SYS_TCx_INTC, 0)
63#define SYS_TCx_INTC_SET __REGVAL(SYS_TCx_INTC, 1)
64
65/* Timer x Control register: Timer clock select */
66#define SYS_TCx_TLCS __REGBITS(8, 6)
67#define SYS_TCx_TLCS_CPU __REGVAL(SYS_TCx_TLCS, 0) /* CPU clock */
68#define SYS_TCx_TLCS_DIV2 __REGVAL(SYS_TCx_TLCS, 1) /* CPU clock / 2 */
69#define SYS_TCx_TLCS_DIV4 __REGVAL(SYS_TCx_TLCS, 2) /* CPU clock / 4 */
70#define SYS_TCx_TLCS_DIV8 __REGVAL(SYS_TCx_TLCS, 3) /* CPU clock / 8 */
71#define SYS_TCx_TLCS_DIV16 __REGVAL(SYS_TCx_TLCS, 4) /* CPU clock / 16 */
72#define SYS_TCx_TLCS_DIV32 __REGVAL(SYS_TCx_TLCS, 5) /* CPU clock / 32 */
73#define SYS_TCx_TLCS_DIV64 __REGVAL(SYS_TCx_TLCS, 6) /* CPU clock / 64 */
74#define SYS_TCx_TLCS_EXT __REGVAL(SYS_TCx_TLCS, 7)
75
76/* Timer x Control register: Timer mode */
77#define SYS_TCx_TM __REGBITS(5, 4)
78#define SYS_TCx_TM_IEE __REGVAL(SYS_TCx_TM, 0) /* Internal timer or external event */
79#define SYS_TCx_TM_ELL __REGVAL(SYS_TCx_TM, 1) /* External low-level, gated timer */
80#define SYS_TCx_TM_EHL __REGVAL(SYS_TCx_TM, 2) /* External high-level, gated timer */
81#define SYS_TCx_TM_CONCAT __REGVAL(SYS_TCx_TM, 3) /* Concatenate the lower timer. */
82
83/* Timer x Control register: Interrupt select */
84#define SYS_TCx_INTS __REGBIT(3)
85#define SYS_TCx_INTS_DIS __REGVAL(SYS_TCx_INTS, 0)
86#define SYS_TCx_INTS_EN __REGVAL(SYS_TCx_INTS, 1)
87
88/* Timer x Control register: Up/down select */
89#define SYS_TCx_UDS __REGBIT(2)
90#define SYS_TCx_UDS_UP __REGVAL(SYS_TCx_UDS, 0)
91#define SYS_TCx_UDS_DOWN __REGVAL(SYS_TCx_UDS, 1)
92
93/* Timer x Control register: 32- or 16-bit timer */
94#define SYS_TCx_TSZ __REGBIT(1)
95#define SYS_TCx_TSZ_16 __REGVAL(SYS_TCx_TSZ, 0)
96#define SYS_TCx_TSZ_32 __REGVAL(SYS_TCx_TSZ, 1)
97
98/* Timer x Control register: Reload enable */
99#define SYS_TCx_REN __REGBIT(0)
100#define SYS_TCx_REN_DIS __REGVAL(SYS_TCx_REN, 0)
101#define SYS_TCx_REN_EN __REGVAL(SYS_TCx_REN, 1)
102
103/* System Memory Chip Select x Dynamic Memory Base */
104#define SYS_SMCSDMB(x) __REG2(0xa09001d0, (x) << 1)
105
106/* System Memory Chip Select x Dynamic Memory Mask */
107#define SYS_SMCSDMM(x) __REG2(0xa09001d4, (x) << 1)
108
109/* System Memory Chip Select x Static Memory Base */
110#define SYS_SMCSSMB(x) __REG2(0xa09001f0, (x) << 1)
111
112/* System Memory Chip Select x Static Memory Base: Chip select x base */
113#define SYS_SMCSSMB_CSxB __REGBITS(31, 12)
114
115/* System Memory Chip Select x Static Memory Mask */
116#define SYS_SMCSSMM(x) __REG2(0xa09001f4, (x) << 1)
117
118/* System Memory Chip Select x Static Memory Mask: Chip select x mask */
119#define SYS_SMCSSMM_CSxM __REGBITS(31, 12)
120
121/* System Memory Chip Select x Static Memory Mask: Chip select x enable */
122#define SYS_SMCSSMM_CSEx __REGBIT(0)
123#define SYS_SMCSSMM_CSEx_DIS __REGVAL(SYS_SMCSSMM_CSEx, 0)
124#define SYS_SMCSSMM_CSEx_EN __REGVAL(SYS_SMCSSMM_CSEx, 1)
125
126/* General purpose, user-defined ID register */
127#define SYS_GENID __REG(0xa0900210)
128
129/* External Interrupt x Control register */
130#define SYS_EIC(x) __REG2(0xa0900214, (x))
131
132/* External Interrupt x Control register: Status */
133#define SYS_EIC_STS __REGBIT(3)
134
135/* External Interrupt x Control register: Clear */
136#define SYS_EIC_CLR __REGBIT(2)
137
138/* External Interrupt x Control register: Polarity */
139#define SYS_EIC_PLTY __REGBIT(1)
140#define SYS_EIC_PLTY_AH __REGVAL(SYS_EIC_PLTY, 0)
141#define SYS_EIC_PLTY_AL __REGVAL(SYS_EIC_PLTY, 1)
142
143/* External Interrupt x Control register: Level edge */
144#define SYS_EIC_LVEDG __REGBIT(0)
145#define SYS_EIC_LVEDG_LEVEL __REGVAL(SYS_EIC_LVEDG, 0)
146#define SYS_EIC_LVEDG_EDGE __REGVAL(SYS_EIC_LVEDG, 1)
147
148#endif /* ifndef __ASM_ARCH_REGSSYSNS9360_H */
diff --git a/include/asm-arm/arch-ns9xxx/system.h b/include/asm-arm/arch-ns9xxx/system.h
deleted file mode 100644
index c2941684d667..000000000000
--- a/include/asm-arm/arch-ns9xxx/system.h
+++ /dev/null
@@ -1,35 +0,0 @@
1/*
2 * include/asm-arm/arch-ns9xxx/system.h
3 *
4 * Copyright (C) 2006,2007 by Digi International Inc.
5 * All rights reserved.
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License version 2 as published by
9 * the Free Software Foundation.
10 */
11#ifndef __ASM_ARCH_SYSTEM_H
12#define __ASM_ARCH_SYSTEM_H
13
14#include <asm/proc-fns.h>
15#include <asm/arch/processor.h>
16#include <asm/arch/processor-ns9360.h>
17
18static inline void arch_idle(void)
19{
20 cpu_do_idle();
21}
22
23static inline void arch_reset(char mode)
24{
25#ifdef CONFIG_PROCESSOR_NS9360
26 if (processor_is_ns9360())
27 ns9360_reset(mode);
28 else
29#endif
30 BUG();
31
32 BUG();
33}
34
35#endif /* ifndef __ASM_ARCH_SYSTEM_H */
diff --git a/include/asm-arm/arch-ns9xxx/timex.h b/include/asm-arm/arch-ns9xxx/timex.h
deleted file mode 100644
index f776cbd2622d..000000000000
--- a/include/asm-arm/arch-ns9xxx/timex.h
+++ /dev/null
@@ -1,20 +0,0 @@
1/*
2 * include/asm-arm/arch-ns9xxx/timex.h
3 *
4 * Copyright (C) 2005-2006 by Digi International Inc.
5 * All rights reserved.
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License version 2 as published by
9 * the Free Software Foundation.
10 */
11#ifndef __ASM_ARCH_TIMEX_H
12#define __ASM_ARCH_TIMEX_H
13
14/*
15 * value for CLOCK_TICK_RATE stolen from include/asm-arm/arch-s3c2410/timex.h.
16 * See there for an explanation.
17 */
18#define CLOCK_TICK_RATE 12000000
19
20#endif /* ifndef __ASM_ARCH_TIMEX_H */
diff --git a/include/asm-arm/arch-ns9xxx/uncompress.h b/include/asm-arm/arch-ns9xxx/uncompress.h
deleted file mode 100644
index 71066baceab7..000000000000
--- a/include/asm-arm/arch-ns9xxx/uncompress.h
+++ /dev/null
@@ -1,164 +0,0 @@
1/*
2 * include/asm-arm/arch-ns9xxx/uncompress.h
3 *
4 * Copyright (C) 2006 by Digi International Inc.
5 * All rights reserved.
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License version 2 as published by
9 * the Free Software Foundation.
10 */
11#ifndef __ASM_ARCH_UNCOMPRESS_H
12#define __ASM_ARCH_UNCOMPRESS_H
13
14#include <asm/io.h>
15
16#define __REG(x) ((void __iomem __force *)(x))
17
18static void putc_dummy(char c, void __iomem *base)
19{
20 /* nothing */
21}
22
23static void putc_ns9360(char c, void __iomem *base)
24{
25 static int t = 0x10000;
26 do {
27 if (t)
28 --t;
29
30 if (__raw_readl(base + 8) & (1 << 3)) {
31 __raw_writeb(c, base + 16);
32 t = 0x10000;
33 break;
34 }
35 } while (t);
36}
37
38static void putc_a9m9750dev(char c, void __iomem *base)
39{
40 static int t = 0x10000;
41 do {
42 if (t)
43 --t;
44
45 if (__raw_readb(base + 5) & (1 << 5)) {
46 __raw_writeb(c, base);
47 t = 0x10000;
48 break;
49 }
50 } while (t);
51
52}
53
54static void putc_ns921x(char c, void __iomem *base)
55{
56 static int t = 0x10000;
57 do {
58 if (t)
59 --t;
60
61 if (!(__raw_readl(base) & (1 << 11))) {
62 __raw_writeb(c, base + 0x0028);
63 t = 0x10000;
64 break;
65 }
66 } while (t);
67}
68
69#define MSCS __REG(0xA0900184)
70
71#define NS9360_UARTA __REG(0x90200040)
72#define NS9360_UARTB __REG(0x90200000)
73#define NS9360_UARTC __REG(0x90300000)
74#define NS9360_UARTD __REG(0x90300040)
75
76#define NS9360_UART_ENABLED(base) \
77 (__raw_readl(NS9360_UARTA) & (1 << 31))
78
79#define A9M9750DEV_UARTA __REG(0x40000000)
80
81#define NS921XSYS_CLOCK __REG(0xa090017c)
82#define NS921X_UARTA __REG(0x90010000)
83#define NS921X_UARTB __REG(0x90018000)
84#define NS921X_UARTC __REG(0x90020000)
85#define NS921X_UARTD __REG(0x90028000)
86
87#define NS921X_UART_ENABLED(base) \
88 (__raw_readl((base) + 0x1000) & (1 << 29))
89
90static void autodetect(void (**putc)(char, void __iomem *), void __iomem **base)
91{
92 if (((__raw_readl(MSCS) >> 16) & 0xfe) == 0x00) {
93 /* ns9360 or ns9750 */
94 if (NS9360_UART_ENABLED(NS9360_UARTA)) {
95 *putc = putc_ns9360;
96 *base = NS9360_UARTA;
97 return;
98 } else if (NS9360_UART_ENABLED(NS9360_UARTB)) {
99 *putc = putc_ns9360;
100 *base = NS9360_UARTB;
101 return;
102 } else if (NS9360_UART_ENABLED(NS9360_UARTC)) {
103 *putc = putc_ns9360;
104 *base = NS9360_UARTC;
105 return;
106 } else if (NS9360_UART_ENABLED(NS9360_UARTD)) {
107 *putc = putc_ns9360;
108 *base = NS9360_UARTD;
109 return;
110 } else if (__raw_readl(__REG(0xa09001f4)) == 0xfffff001) {
111 *putc = putc_a9m9750dev;
112 *base = A9M9750DEV_UARTA;
113 return;
114 }
115 } else if (((__raw_readl(MSCS) >> 16) & 0xfe) == 0x02) {
116 /* ns921x */
117 u32 clock = __raw_readl(NS921XSYS_CLOCK);
118
119 if ((clock & (1 << 1)) &&
120 NS921X_UART_ENABLED(NS921X_UARTA)) {
121 *putc = putc_ns921x;
122 *base = NS921X_UARTA;
123 return;
124 } else if ((clock & (1 << 2)) &&
125 NS921X_UART_ENABLED(NS921X_UARTB)) {
126 *putc = putc_ns921x;
127 *base = NS921X_UARTB;
128 return;
129 } else if ((clock & (1 << 3)) &&
130 NS921X_UART_ENABLED(NS921X_UARTC)) {
131 *putc = putc_ns921x;
132 *base = NS921X_UARTC;
133 return;
134 } else if ((clock & (1 << 4)) &&
135 NS921X_UART_ENABLED(NS921X_UARTD)) {
136 *putc = putc_ns921x;
137 *base = NS921X_UARTD;
138 return;
139 }
140 }
141
142 *putc = putc_dummy;
143}
144
145void (*myputc)(char, void __iomem *);
146void __iomem *base;
147
148static void putc(char c)
149{
150 myputc(c, base);
151}
152
153static void arch_decomp_setup(void)
154{
155 autodetect(&myputc, &base);
156}
157#define arch_decomp_wdog()
158
159static void flush(void)
160{
161 /* nothing */
162}
163
164#endif /* ifndef __ASM_ARCH_UNCOMPRESS_H */
diff --git a/include/asm-arm/arch-ns9xxx/vmalloc.h b/include/asm-arm/arch-ns9xxx/vmalloc.h
deleted file mode 100644
index 2f3cb6f6be24..000000000000
--- a/include/asm-arm/arch-ns9xxx/vmalloc.h
+++ /dev/null
@@ -1,16 +0,0 @@
1/*
2 * include/asm-arm/arch-ns9xxx/vmalloc.h
3 *
4 * Copyright (C) 2006 by Digi International Inc.
5 * All rights reserved.
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License version 2 as published by
9 * the Free Software Foundation.
10 */
11#ifndef __ASM_ARCH_VMALLOC_H
12#define __ASM_ARCH_VMALLOC_H
13
14#define VMALLOC_END (0xf0000000)
15
16#endif /* ifndef __ASM_ARCH_VMALLOC_H */
diff --git a/include/asm-arm/arch-omap/aic23.h b/include/asm-arm/arch-omap/aic23.h
deleted file mode 100644
index aec2d6563622..000000000000
--- a/include/asm-arm/arch-omap/aic23.h
+++ /dev/null
@@ -1,116 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-omap/aic23.h
3 *
4 * Hardware definitions for TI TLV320AIC23 audio codec
5 *
6 * Copyright (C) 2002 RidgeRun, Inc.
7 * Author: Steve Johnson
8 *
9 * This program is free software; you can redistribute it and/or modify it
10 * under the terms of the GNU General Public License as published by the
11 * Free Software Foundation; either version 2 of the License, or (at your
12 * option) any later version.
13 *
14 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
15 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
16 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
17 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
18 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
19 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
20 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
21 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 *
25 * You should have received a copy of the GNU General Public License along
26 * with this program; if not, write to the Free Software Foundation, Inc.,
27 * 675 Mass Ave, Cambridge, MA 02139, USA.
28 */
29
30#ifndef __ASM_ARCH_AIC23_H
31#define __ASM_ARCH_AIC23_H
32
33// Codec TLV320AIC23
34#define LEFT_LINE_VOLUME_ADDR 0x00
35#define RIGHT_LINE_VOLUME_ADDR 0x01
36#define LEFT_CHANNEL_VOLUME_ADDR 0x02
37#define RIGHT_CHANNEL_VOLUME_ADDR 0x03
38#define ANALOG_AUDIO_CONTROL_ADDR 0x04
39#define DIGITAL_AUDIO_CONTROL_ADDR 0x05
40#define POWER_DOWN_CONTROL_ADDR 0x06
41#define DIGITAL_AUDIO_FORMAT_ADDR 0x07
42#define SAMPLE_RATE_CONTROL_ADDR 0x08
43#define DIGITAL_INTERFACE_ACT_ADDR 0x09
44#define RESET_CONTROL_ADDR 0x0F
45
46// Left (right) line input volume control register
47#define LRS_ENABLED 0x0100
48#define LIM_MUTED 0x0080
49#define LIV_DEFAULT 0x0017
50#define LIV_MAX 0x001f
51#define LIV_MIN 0x0000
52
53// Left (right) channel headphone volume control register
54#define LZC_ON 0x0080
55#define LHV_DEFAULT 0x0079
56#define LHV_MAX 0x007f
57#define LHV_MIN 0x0000
58
59// Analog audio path control register
60#define STA_REG(x) ((x)<<6)
61#define STE_ENABLED 0x0020
62#define DAC_SELECTED 0x0010
63#define BYPASS_ON 0x0008
64#define INSEL_MIC 0x0004
65#define MICM_MUTED 0x0002
66#define MICB_20DB 0x0001
67
68// Digital audio path control register
69#define DACM_MUTE 0x0008
70#define DEEMP_32K 0x0002
71#define DEEMP_44K 0x0004
72#define DEEMP_48K 0x0006
73#define ADCHP_ON 0x0001
74
75// Power control down register
76#define DEVICE_POWER_OFF 0x0080
77#define CLK_OFF 0x0040
78#define OSC_OFF 0x0020
79#define OUT_OFF 0x0010
80#define DAC_OFF 0x0008
81#define ADC_OFF 0x0004
82#define MIC_OFF 0x0002
83#define LINE_OFF 0x0001
84
85// Digital audio interface register
86#define MS_MASTER 0x0040
87#define LRSWAP_ON 0x0020
88#define LRP_ON 0x0010
89#define IWL_16 0x0000
90#define IWL_20 0x0004
91#define IWL_24 0x0008
92#define IWL_32 0x000C
93#define FOR_I2S 0x0002
94#define FOR_DSP 0x0003
95
96// Sample rate control register
97#define CLKOUT_HALF 0x0080
98#define CLKIN_HALF 0x0040
99#define BOSR_384fs 0x0002 // BOSR_272fs when in USB mode
100#define USB_CLK_ON 0x0001
101#define SR_MASK 0xf
102#define CLKOUT_SHIFT 7
103#define CLKIN_SHIFT 6
104#define SR_SHIFT 2
105#define BOSR_SHIFT 1
106
107// Digital interface register
108#define ACT_ON 0x0001
109
110#define TLV320AIC23ID1 (0x1a) // cs low
111#define TLV320AIC23ID2 (0x1b) // cs high
112
113void aic23_power_up(void);
114void aic23_power_down(void);
115
116#endif /* __ASM_ARCH_AIC23_H */
diff --git a/include/asm-arm/arch-omap/board-2430sdp.h b/include/asm-arm/arch-omap/board-2430sdp.h
deleted file mode 100644
index c7db9004ec31..000000000000
--- a/include/asm-arm/arch-omap/board-2430sdp.h
+++ /dev/null
@@ -1,39 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-omap/board-2430sdp.h
3 *
4 * Hardware definitions for TI OMAP2430 SDP board.
5 *
6 * Based on board-h4.h by Dirk Behme <dirk.behme@de.bosch.com>
7 *
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License as published by the
10 * Free Software Foundation; either version 2 of the License, or (at your
11 * option) any later version.
12 *
13 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
14 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
15 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
16 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
17 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
18 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
19 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
20 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23 *
24 * You should have received a copy of the GNU General Public License along
25 * with this program; if not, write to the Free Software Foundation, Inc.,
26 * 675 Mass Ave, Cambridge, MA 02139, USA.
27 */
28
29#ifndef __ASM_ARCH_OMAP_2430SDP_H
30#define __ASM_ARCH_OMAP_2430SDP_H
31
32/* Placeholder for 2430SDP specific defines */
33#define OMAP24XX_ETHR_START 0x08000300
34#define OMAP24XX_ETHR_GPIO_IRQ 149
35#define SDP2430_CS0_BASE 0x04000000
36
37#define TWL4030_IRQNUM INT_24XX_SYS_NIRQ
38
39#endif /* __ASM_ARCH_OMAP_2430SDP_H */
diff --git a/include/asm-arm/arch-omap/board-ams-delta.h b/include/asm-arm/arch-omap/board-ams-delta.h
deleted file mode 100644
index 9aee15d97145..000000000000
--- a/include/asm-arm/arch-omap/board-ams-delta.h
+++ /dev/null
@@ -1,76 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-omap/board-ams-delta.h
3 *
4 * Copyright (C) 2006 Jonathan McDowell <noodles@earth.li>
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2 of the License, or (at your
9 * option) any later version.
10 *
11 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
12 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
13 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
14 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
15 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
16 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
17 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
18 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
19 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
20 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
21 *
22 * You should have received a copy of the GNU General Public License along
23 * with this program; if not, write to the Free Software Foundation, Inc.,
24 * 675 Mass Ave, Cambridge, MA 02139, USA.
25 */
26#ifndef __ASM_ARCH_OMAP_AMS_DELTA_H
27#define __ASM_ARCH_OMAP_AMS_DELTA_H
28
29#if defined (CONFIG_MACH_AMS_DELTA)
30
31#define AMS_DELTA_LATCH1_PHYS 0x01000000
32#define AMS_DELTA_LATCH1_VIRT 0xEA000000
33#define AMS_DELTA_MODEM_PHYS 0x04000000
34#define AMS_DELTA_MODEM_VIRT 0xEB000000
35#define AMS_DELTA_LATCH2_PHYS 0x08000000
36#define AMS_DELTA_LATCH2_VIRT 0xEC000000
37
38#define AMS_DELTA_LATCH1_LED_CAMERA 0x01
39#define AMS_DELTA_LATCH1_LED_ADVERT 0x02
40#define AMS_DELTA_LATCH1_LED_EMAIL 0x04
41#define AMS_DELTA_LATCH1_LED_HANDSFREE 0x08
42#define AMS_DELTA_LATCH1_LED_VOICEMAIL 0x10
43#define AMS_DELTA_LATCH1_LED_VOICE 0x20
44
45#define AMS_DELTA_LATCH2_LCD_VBLEN 0x0001
46#define AMS_DELTA_LATCH2_LCD_NDISP 0x0002
47#define AMS_DELTA_LATCH2_NAND_NCE 0x0004
48#define AMS_DELTA_LATCH2_NAND_NRE 0x0008
49#define AMS_DELTA_LATCH2_NAND_NWP 0x0010
50#define AMS_DELTA_LATCH2_NAND_NWE 0x0020
51#define AMS_DELTA_LATCH2_NAND_ALE 0x0040
52#define AMS_DELTA_LATCH2_NAND_CLE 0x0080
53#define AMD_DELTA_LATCH2_KEYBRD_PWR 0x0100
54#define AMD_DELTA_LATCH2_KEYBRD_DATA 0x0200
55#define AMD_DELTA_LATCH2_SCARD_RSTIN 0x0400
56#define AMD_DELTA_LATCH2_SCARD_CMDVCC 0x0800
57#define AMS_DELTA_LATCH2_MODEM_NRESET 0x1000
58#define AMS_DELTA_LATCH2_MODEM_CODEC 0x2000
59
60#define AMS_DELTA_GPIO_PIN_KEYBRD_DATA 0
61#define AMS_DELTA_GPIO_PIN_KEYBRD_CLK 1
62#define AMS_DELTA_GPIO_PIN_MODEM_IRQ 2
63#define AMS_DELTA_GPIO_PIN_HOOK_SWITCH 4
64#define AMS_DELTA_GPIO_PIN_SCARD_NOFF 6
65#define AMS_DELTA_GPIO_PIN_SCARD_IO 7
66#define AMS_DELTA_GPIO_PIN_CONFIG 11
67#define AMS_DELTA_GPIO_PIN_NAND_RB 12
68
69#ifndef __ASSEMBLY__
70void ams_delta_latch1_write(u8 mask, u8 value);
71void ams_delta_latch2_write(u16 mask, u16 value);
72#endif
73
74#endif /* CONFIG_MACH_AMS_DELTA */
75
76#endif /* __ASM_ARCH_OMAP_AMS_DELTA_H */
diff --git a/include/asm-arm/arch-omap/board-apollon.h b/include/asm-arm/arch-omap/board-apollon.h
deleted file mode 100644
index 547125a4695e..000000000000
--- a/include/asm-arm/arch-omap/board-apollon.h
+++ /dev/null
@@ -1,38 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-omap/board-apollon.h
3 *
4 * Hardware definitions for Samsung OMAP24XX Apollon board.
5 *
6 * Initial creation by Kyungmin Park <kyungmin.park@samsung.com>
7 *
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License as published by the
10 * Free Software Foundation; either version 2 of the License, or (at your
11 * option) any later version.
12 *
13 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
14 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
15 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
16 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
17 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
18 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
19 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
20 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23 *
24 * You should have received a copy of the GNU General Public License along
25 * with this program; if not, write to the Free Software Foundation, Inc.,
26 * 675 Mass Ave, Cambridge, MA 02139, USA.
27 */
28
29#ifndef __ASM_ARCH_OMAP_APOLLON_H
30#define __ASM_ARCH_OMAP_APOLLON_H
31
32extern void apollon_mmc_init(void);
33
34/* Placeholder for APOLLON specific defines */
35#define APOLLON_ETHR_GPIO_IRQ 74
36
37#endif /* __ASM_ARCH_OMAP_APOLLON_H */
38
diff --git a/include/asm-arm/arch-omap/board-fsample.h b/include/asm-arm/arch-omap/board-fsample.h
deleted file mode 100644
index 89a1e529fb6f..000000000000
--- a/include/asm-arm/arch-omap/board-fsample.h
+++ /dev/null
@@ -1,51 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-omap/board-fsample.h
3 *
4 * Board-specific goodies for TI F-Sample.
5 *
6 * Copyright (C) 2006 Google, Inc.
7 * Author: Brian Swetland <swetland@google.com>
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12 */
13
14#ifndef __ASM_ARCH_OMAP_FSAMPLE_H
15#define __ASM_ARCH_OMAP_FSAMPLE_H
16
17/* fsample is pretty close to p2-sample */
18#include <asm/arch/board-perseus2.h>
19
20#define fsample_cpld_read(reg) __raw_readb(reg)
21#define fsample_cpld_write(val, reg) __raw_writeb(val, reg)
22
23#define FSAMPLE_CPLD_BASE 0xE8100000
24#define FSAMPLE_CPLD_SIZE SZ_4K
25#define FSAMPLE_CPLD_START 0x05080000
26
27#define FSAMPLE_CPLD_REG_A (FSAMPLE_CPLD_BASE + 0x00)
28#define FSAMPLE_CPLD_SWITCH (FSAMPLE_CPLD_BASE + 0x02)
29#define FSAMPLE_CPLD_UART (FSAMPLE_CPLD_BASE + 0x02)
30#define FSAMPLE_CPLD_REG_B (FSAMPLE_CPLD_BASE + 0x04)
31#define FSAMPLE_CPLD_VERSION (FSAMPLE_CPLD_BASE + 0x06)
32#define FSAMPLE_CPLD_SET_CLR (FSAMPLE_CPLD_BASE + 0x06)
33
34#define FSAMPLE_CPLD_BIT_BT_RESET 0
35#define FSAMPLE_CPLD_BIT_LCD_RESET 1
36#define FSAMPLE_CPLD_BIT_CAM_PWDN 2
37#define FSAMPLE_CPLD_BIT_CHARGER_ENABLE 3
38#define FSAMPLE_CPLD_BIT_SD_MMC_EN 4
39#define FSAMPLE_CPLD_BIT_aGPS_PWREN 5
40#define FSAMPLE_CPLD_BIT_BACKLIGHT 6
41#define FSAMPLE_CPLD_BIT_aGPS_EN_RESET 7
42#define FSAMPLE_CPLD_BIT_aGPS_SLEEPx_N 8
43#define FSAMPLE_CPLD_BIT_OTG_RESET 9
44
45#define fsample_cpld_set(bit) \
46 fsample_cpld_write((((bit) & 15) << 4) | 0x0f, FSAMPLE_CPLD_SET_CLR)
47
48#define fsample_cpld_clear(bit) \
49 fsample_cpld_write(0xf0 | ((bit) & 15), FSAMPLE_CPLD_SET_CLR)
50
51#endif
diff --git a/include/asm-arm/arch-omap/board-h2.h b/include/asm-arm/arch-omap/board-h2.h
deleted file mode 100644
index c322796d0d26..000000000000
--- a/include/asm-arm/arch-omap/board-h2.h
+++ /dev/null
@@ -1,41 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-omap/board-h2.h
3 *
4 * Hardware definitions for TI OMAP1610 H2 board.
5 *
6 * Cleanup for Linux-2.6 by Dirk Behme <dirk.behme@de.bosch.com>
7 *
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License as published by the
10 * Free Software Foundation; either version 2 of the License, or (at your
11 * option) any later version.
12 *
13 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
14 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
15 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
16 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
17 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
18 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
19 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
20 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23 *
24 * You should have received a copy of the GNU General Public License along
25 * with this program; if not, write to the Free Software Foundation, Inc.,
26 * 675 Mass Ave, Cambridge, MA 02139, USA.
27 */
28
29#ifndef __ASM_ARCH_OMAP_H2_H
30#define __ASM_ARCH_OMAP_H2_H
31
32/* Placeholder for H2 specific defines */
33
34/* At OMAP1610 Innovator the Ethernet is directly connected to CS1 */
35#define OMAP1610_ETHR_START 0x04000300
36
37extern void h2_mmc_init(void);
38extern void h2_mmc_slot_cover_handler(void *arg, int state);
39
40#endif /* __ASM_ARCH_OMAP_H2_H */
41
diff --git a/include/asm-arm/arch-omap/board-h3.h b/include/asm-arm/arch-omap/board-h3.h
deleted file mode 100644
index c5d0f32a40ac..000000000000
--- a/include/asm-arm/arch-omap/board-h3.h
+++ /dev/null
@@ -1,36 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-omap/board-h3.h
3 *
4 * Copyright (C) 2001 RidgeRun, Inc.
5 * Copyright (C) 2004 Texas Instruments, Inc.
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; either version 2 of the License, or (at your
10 * option) any later version.
11 *
12 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
13 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
14 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
15 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
16 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
17 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
18 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
19 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
20 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
21 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
22 *
23 * You should have received a copy of the GNU General Public License along
24 * with this program; if not, write to the Free Software Foundation, Inc.,
25 * 675 Mass Ave, Cambridge, MA 02139, USA.
26 */
27#ifndef __ASM_ARCH_OMAP_H3_H
28#define __ASM_ARCH_OMAP_H3_H
29
30/* In OMAP1710 H3 the Ethernet is directly connected to CS1 */
31#define OMAP1710_ETHR_START 0x04000300
32
33extern void h3_mmc_init(void);
34extern void h3_mmc_slot_cover_handler(void *arg, int state);
35
36#endif /* __ASM_ARCH_OMAP_H3_H */
diff --git a/include/asm-arm/arch-omap/board-h4.h b/include/asm-arm/arch-omap/board-h4.h
deleted file mode 100644
index 7e0efef4bb65..000000000000
--- a/include/asm-arm/arch-omap/board-h4.h
+++ /dev/null
@@ -1,35 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-omap/board-h4.h
3 *
4 * Hardware definitions for TI OMAP1610 H4 board.
5 *
6 * Initial creation by Dirk Behme <dirk.behme@de.bosch.com>
7 *
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License as published by the
10 * Free Software Foundation; either version 2 of the License, or (at your
11 * option) any later version.
12 *
13 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
14 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
15 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
16 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
17 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
18 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
19 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
20 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23 *
24 * You should have received a copy of the GNU General Public License along
25 * with this program; if not, write to the Free Software Foundation, Inc.,
26 * 675 Mass Ave, Cambridge, MA 02139, USA.
27 */
28
29#ifndef __ASM_ARCH_OMAP_H4_H
30#define __ASM_ARCH_OMAP_H4_H
31
32/* Placeholder for H4 specific defines */
33#define OMAP24XX_ETHR_GPIO_IRQ 92
34#endif /* __ASM_ARCH_OMAP_H4_H */
35
diff --git a/include/asm-arm/arch-omap/board-innovator.h b/include/asm-arm/arch-omap/board-innovator.h
deleted file mode 100644
index 9ca03dec9d36..000000000000
--- a/include/asm-arm/arch-omap/board-innovator.h
+++ /dev/null
@@ -1,52 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-omap/board-innovator.h
3 *
4 * Copyright (C) 2001 RidgeRun, Inc.
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2 of the License, or (at your
9 * option) any later version.
10 *
11 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
12 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
13 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
14 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
15 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
16 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
17 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
18 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
19 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
20 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
21 *
22 * You should have received a copy of the GNU General Public License along
23 * with this program; if not, write to the Free Software Foundation, Inc.,
24 * 675 Mass Ave, Cambridge, MA 02139, USA.
25 */
26#ifndef __ASM_ARCH_OMAP_INNOVATOR_H
27#define __ASM_ARCH_OMAP_INNOVATOR_H
28
29#if defined (CONFIG_ARCH_OMAP15XX)
30
31#ifndef OMAP_SDRAM_DEVICE
32#define OMAP_SDRAM_DEVICE D256M_1X16_4B
33#endif
34
35#define OMAP1510P1_IMIF_PRI_VALUE 0x00
36#define OMAP1510P1_EMIFS_PRI_VALUE 0x00
37#define OMAP1510P1_EMIFF_PRI_VALUE 0x00
38
39#ifndef __ASSEMBLY__
40void fpga_write(unsigned char val, int reg);
41unsigned char fpga_read(int reg);
42#endif
43
44#endif /* CONFIG_ARCH_OMAP15XX */
45
46#if defined (CONFIG_ARCH_OMAP16XX)
47
48/* At OMAP1610 Innovator the Ethernet is directly connected to CS1 */
49#define INNOVATOR1610_ETHR_START 0x04000300
50
51#endif /* CONFIG_ARCH_OMAP1610 */
52#endif /* __ASM_ARCH_OMAP_INNOVATOR_H */
diff --git a/include/asm-arm/arch-omap/board-nokia.h b/include/asm-arm/arch-omap/board-nokia.h
deleted file mode 100644
index 72deea203493..000000000000
--- a/include/asm-arm/arch-omap/board-nokia.h
+++ /dev/null
@@ -1,54 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-omap/board-nokia.h
3 *
4 * Information structures for Nokia-specific board config data
5 *
6 * Copyright (C) 2005 Nokia Corporation
7 */
8
9#ifndef _OMAP_BOARD_NOKIA_H
10#define _OMAP_BOARD_NOKIA_H
11
12#include <linux/types.h>
13
14#define OMAP_TAG_NOKIA_BT 0x4e01
15#define OMAP_TAG_WLAN_CX3110X 0x4e02
16#define OMAP_TAG_CBUS 0x4e03
17#define OMAP_TAG_EM_ASIC_BB5 0x4e04
18
19
20#define BT_CHIP_CSR 1
21#define BT_CHIP_TI 2
22
23#define BT_SYSCLK_12 1
24#define BT_SYSCLK_38_4 2
25
26struct omap_bluetooth_config {
27 u8 chip_type;
28 u8 bt_wakeup_gpio;
29 u8 host_wakeup_gpio;
30 u8 reset_gpio;
31 u8 bt_uart;
32 u8 bd_addr[6];
33 u8 bt_sysclk;
34};
35
36struct omap_wlan_cx3110x_config {
37 u8 chip_type;
38 s16 power_gpio;
39 s16 irq_gpio;
40 s16 spi_cs_gpio;
41};
42
43struct omap_cbus_config {
44 s16 clk_gpio;
45 s16 dat_gpio;
46 s16 sel_gpio;
47};
48
49struct omap_em_asic_bb5_config {
50 s16 retu_irq_gpio;
51 s16 tahvo_irq_gpio;
52};
53
54#endif
diff --git a/include/asm-arm/arch-omap/board-osk.h b/include/asm-arm/arch-omap/board-osk.h
deleted file mode 100644
index 94926090e475..000000000000
--- a/include/asm-arm/arch-omap/board-osk.h
+++ /dev/null
@@ -1,47 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-omap/board-osk.h
3 *
4 * Hardware definitions for TI OMAP5912 OSK board.
5 *
6 * Written by Dirk Behme <dirk.behme@de.bosch.com>
7 *
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License as published by the
10 * Free Software Foundation; either version 2 of the License, or (at your
11 * option) any later version.
12 *
13 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
14 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
15 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
16 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
17 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
18 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
19 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
20 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23 *
24 * You should have received a copy of the GNU General Public License along
25 * with this program; if not, write to the Free Software Foundation, Inc.,
26 * 675 Mass Ave, Cambridge, MA 02139, USA.
27 */
28
29#ifndef __ASM_ARCH_OMAP_OSK_H
30#define __ASM_ARCH_OMAP_OSK_H
31
32/* At OMAP5912 OSK the Ethernet is directly connected to CS1 */
33#define OMAP_OSK_ETHR_START 0x04800300
34
35/* TPS65010 has four GPIOs. nPG and LED2 can be treated like GPIOs with
36 * alternate pin configurations for hardware-controlled blinking.
37 */
38#define OSK_TPS_GPIO_BASE (OMAP_MAX_GPIO_LINES + 16 /* MPUIO */)
39# define OSK_TPS_GPIO_USB_PWR_EN (OSK_TPS_GPIO_BASE + 0)
40# define OSK_TPS_GPIO_LED_D3 (OSK_TPS_GPIO_BASE + 1)
41# define OSK_TPS_GPIO_LAN_RESET (OSK_TPS_GPIO_BASE + 2)
42# define OSK_TPS_GPIO_DSP_PWR_EN (OSK_TPS_GPIO_BASE + 3)
43# define OSK_TPS_GPIO_LED_D9 (OSK_TPS_GPIO_BASE + 4)
44# define OSK_TPS_GPIO_LED_D2 (OSK_TPS_GPIO_BASE + 5)
45
46#endif /* __ASM_ARCH_OMAP_OSK_H */
47
diff --git a/include/asm-arm/arch-omap/board-palmte.h b/include/asm-arm/arch-omap/board-palmte.h
deleted file mode 100644
index 6fac2c8935be..000000000000
--- a/include/asm-arm/arch-omap/board-palmte.h
+++ /dev/null
@@ -1,32 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-omap/board-palmte.h
3 *
4 * Hardware definitions for the Palm Tungsten E device.
5 *
6 * Maintainters : http://palmtelinux.sf.net
7 * palmtelinux-developpers@lists.sf.net
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12 */
13
14#ifndef __OMAP_BOARD_PALMTE_H
15#define __OMAP_BOARD_PALMTE_H
16
17#define PALMTE_USBDETECT_GPIO 0
18#define PALMTE_USB_OR_DC_GPIO 1
19#define PALMTE_TSC_GPIO 4
20#define PALMTE_PINTDAV_GPIO 6
21#define PALMTE_MMC_WP_GPIO 8
22#define PALMTE_MMC_POWER_GPIO 9
23#define PALMTE_HDQ_GPIO 11
24#define PALMTE_HEADPHONES_GPIO 14
25#define PALMTE_SPEAKER_GPIO 15
26#define PALMTE_DC_GPIO OMAP_MPUIO(2)
27#define PALMTE_MMC_SWITCH_GPIO OMAP_MPUIO(4)
28#define PALMTE_MMC1_GPIO OMAP_MPUIO(6)
29#define PALMTE_MMC2_GPIO OMAP_MPUIO(7)
30#define PALMTE_MMC3_GPIO OMAP_MPUIO(11)
31
32#endif /* __OMAP_BOARD_PALMTE_H */
diff --git a/include/asm-arm/arch-omap/board-palmtt.h b/include/asm-arm/arch-omap/board-palmtt.h
deleted file mode 100644
index d9590b0ec90e..000000000000
--- a/include/asm-arm/arch-omap/board-palmtt.h
+++ /dev/null
@@ -1,23 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-omap/board-palmte.h
3 *
4 * Hardware definitions for the Palm Tungsten|T device.
5 *
6 * Maintainters : Marek Vasut <marek.vasut@gmail.com>
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 */
12
13#ifndef __OMAP_BOARD_PALMTT_H
14#define __OMAP_BOARD_PALMTT_H
15
16#define PALMTT_USBDETECT_GPIO 0
17#define PALMTT_CABLE_GPIO 1
18#define PALMTT_LED_GPIO 3
19#define PALMTT_PENIRQ_GPIO 6
20#define PALMTT_MMC_WP_GPIO 8
21#define PALMTT_HDQ_GPIO 11
22
23#endif /* __OMAP_BOARD_PALMTT_H */
diff --git a/include/asm-arm/arch-omap/board-palmz71.h b/include/asm-arm/arch-omap/board-palmz71.h
deleted file mode 100644
index 1252a859787d..000000000000
--- a/include/asm-arm/arch-omap/board-palmz71.h
+++ /dev/null
@@ -1,26 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-omap/board-palmz71.h
3 *
4 * Hardware definitions for the Palm Zire71 device.
5 *
6 * Maintainters : Marek Vasut <marek.vasut@gmail.com>
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 */
12
13#ifndef __OMAP_BOARD_PALMZ71_H
14#define __OMAP_BOARD_PALMZ71_H
15
16#define PALMZ71_USBDETECT_GPIO 0
17#define PALMZ71_PENIRQ_GPIO 6
18#define PALMZ71_MMC_WP_GPIO 8
19#define PALMZ71_HDQ_GPIO 11
20
21#define PALMZ71_HOTSYNC_GPIO OMAP_MPUIO(1)
22#define PALMZ71_CABLE_GPIO OMAP_MPUIO(2)
23#define PALMZ71_SLIDER_GPIO OMAP_MPUIO(3)
24#define PALMZ71_MMC_IN_GPIO OMAP_MPUIO(4)
25
26#endif /* __OMAP_BOARD_PALMZ71_H */
diff --git a/include/asm-arm/arch-omap/board-perseus2.h b/include/asm-arm/arch-omap/board-perseus2.h
deleted file mode 100644
index d7429cb0f726..000000000000
--- a/include/asm-arm/arch-omap/board-perseus2.h
+++ /dev/null
@@ -1,39 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-omap/board-perseus2.h
3 *
4 * Copyright 2003 by Texas Instruments Incorporated
5 * OMAP730 / Perseus2 support by Jean Pihet
6 *
7 * Copyright (C) 2001 RidgeRun, Inc. (http://www.ridgerun.com)
8 * Author: RidgeRun, Inc.
9 *
10 * This program is free software; you can redistribute it and/or modify it
11 * under the terms of the GNU General Public License as published by the
12 * Free Software Foundation; either version 2 of the License, or (at your
13 * option) any later version.
14 *
15 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
16 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
17 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
18 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
21 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
22 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 *
26 * You should have received a copy of the GNU General Public License along
27 * with this program; if not, write to the Free Software Foundation, Inc.,
28 * 675 Mass Ave, Cambridge, MA 02139, USA.
29 */
30#ifndef __ASM_ARCH_OMAP_PERSEUS2_H
31#define __ASM_ARCH_OMAP_PERSEUS2_H
32
33#include <asm/arch/fpga.h>
34
35#ifndef OMAP_SDRAM_DEVICE
36#define OMAP_SDRAM_DEVICE D256M_1X16_4B
37#endif
38
39#endif
diff --git a/include/asm-arm/arch-omap/board.h b/include/asm-arm/arch-omap/board.h
deleted file mode 100644
index 99564c70f128..000000000000
--- a/include/asm-arm/arch-omap/board.h
+++ /dev/null
@@ -1,186 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-omap/board.h
3 *
4 * Information structures for board-specific data
5 *
6 * Copyright (C) 2004 Nokia Corporation
7 * Written by Juha Yrjölä <juha.yrjola@nokia.com>
8 */
9
10#ifndef _OMAP_BOARD_H
11#define _OMAP_BOARD_H
12
13#include <linux/types.h>
14
15#include <asm/arch/gpio-switch.h>
16
17/* Different peripheral ids */
18#define OMAP_TAG_CLOCK 0x4f01
19#define OMAP_TAG_MMC 0x4f02
20#define OMAP_TAG_SERIAL_CONSOLE 0x4f03
21#define OMAP_TAG_USB 0x4f04
22#define OMAP_TAG_LCD 0x4f05
23#define OMAP_TAG_GPIO_SWITCH 0x4f06
24#define OMAP_TAG_UART 0x4f07
25#define OMAP_TAG_FBMEM 0x4f08
26#define OMAP_TAG_STI_CONSOLE 0x4f09
27#define OMAP_TAG_CAMERA_SENSOR 0x4f0a
28
29#define OMAP_TAG_BOOT_REASON 0x4f80
30#define OMAP_TAG_FLASH_PART 0x4f81
31#define OMAP_TAG_VERSION_STR 0x4f82
32
33struct omap_clock_config {
34 /* 0 for 12 MHz, 1 for 13 MHz and 2 for 19.2 MHz */
35 u8 system_clock_type;
36};
37
38struct omap_mmc_conf {
39 unsigned enabled:1;
40 /* nomux means "standard" muxing is wrong on this board, and that
41 * board-specific code handled it before common init logic.
42 */
43 unsigned nomux:1;
44 /* switch pin can be for card detect (default) or card cover */
45 unsigned cover:1;
46 /* 4 wire signaling is optional, and is only used for SD/SDIO */
47 unsigned wire4:1;
48 s16 power_pin;
49 s16 switch_pin;
50 s16 wp_pin;
51};
52
53struct omap_mmc_config {
54 struct omap_mmc_conf mmc[2];
55};
56
57struct omap_serial_console_config {
58 u8 console_uart;
59 u32 console_speed;
60};
61
62struct omap_sti_console_config {
63 unsigned enable:1;
64 u8 channel;
65};
66
67struct omap_camera_sensor_config {
68 u16 reset_gpio;
69 int (*power_on)(void * data);
70 int (*power_off)(void * data);
71};
72
73struct omap_usb_config {
74 /* Configure drivers according to the connectors on your board:
75 * - "A" connector (rectagular)
76 * ... for host/OHCI use, set "register_host".
77 * - "B" connector (squarish) or "Mini-B"
78 * ... for device/gadget use, set "register_dev".
79 * - "Mini-AB" connector (very similar to Mini-B)
80 * ... for OTG use as device OR host, initialize "otg"
81 */
82 unsigned register_host:1;
83 unsigned register_dev:1;
84 u8 otg; /* port number, 1-based: usb1 == 2 */
85
86 u8 hmc_mode;
87
88 /* implicitly true if otg: host supports remote wakeup? */
89 u8 rwc;
90
91 /* signaling pins used to talk to transceiver on usbN:
92 * 0 == usbN unused
93 * 2 == usb0-only, using internal transceiver
94 * 3 == 3 wire bidirectional
95 * 4 == 4 wire bidirectional
96 * 6 == 6 wire unidirectional (or TLL)
97 */
98 u8 pins[3];
99};
100
101struct omap_lcd_config {
102 char panel_name[16];
103 char ctrl_name[16];
104 s16 nreset_gpio;
105 u8 data_lines;
106};
107
108struct device;
109struct fb_info;
110struct omap_backlight_config {
111 int default_intensity;
112 int (*set_power)(struct device *dev, int state);
113 int (*check_fb)(struct fb_info *fb);
114};
115
116struct omap_fbmem_config {
117 u32 start;
118 u32 size;
119};
120
121struct omap_pwm_led_platform_data {
122 const char *name;
123 int intensity_timer;
124 int blink_timer;
125 void (*set_power)(struct omap_pwm_led_platform_data *self, int on_off);
126};
127
128/* See include/asm-arm/arch-omap/gpio-switch.h for definitions */
129struct omap_gpio_switch_config {
130 char name[12];
131 u16 gpio;
132 int flags:4;
133 int type:4;
134 int key_code:24; /* Linux key code */
135};
136
137struct omap_uart_config {
138 /* Bit field of UARTs present; bit 0 --> UART1 */
139 unsigned int enabled_uarts;
140};
141
142
143struct omap_flash_part_config {
144 char part_table[0];
145};
146
147struct omap_boot_reason_config {
148 char reason_str[12];
149};
150
151struct omap_version_config {
152 char component[12];
153 char version[12];
154};
155
156
157#include <asm/arch/board-nokia.h>
158
159struct omap_board_config_entry {
160 u16 tag;
161 u16 len;
162 u8 data[0];
163};
164
165struct omap_board_config_kernel {
166 u16 tag;
167 const void *data;
168};
169
170extern const void *__omap_get_config(u16 tag, size_t len, int nr);
171
172#define omap_get_config(tag, type) \
173 ((const type *) __omap_get_config((tag), sizeof(type), 0))
174#define omap_get_nr_config(tag, type, nr) \
175 ((const type *) __omap_get_config((tag), sizeof(type), (nr)))
176
177extern const void *omap_get_var_config(u16 tag, size_t *len);
178
179extern struct omap_board_config_kernel *omap_board_config;
180extern int omap_board_config_size;
181
182
183/* for TI reference platforms sharing the same debug card */
184extern int debug_card_init(u32 addr, unsigned gpio);
185
186#endif
diff --git a/include/asm-arm/arch-omap/clock.h b/include/asm-arm/arch-omap/clock.h
deleted file mode 100644
index 4c7b3514f71a..000000000000
--- a/include/asm-arm/arch-omap/clock.h
+++ /dev/null
@@ -1,162 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-omap/clock.h
3 *
4 * Copyright (C) 2004 - 2005 Nokia corporation
5 * Written by Tuukka Tikkanen <tuukka.tikkanen@elektrobit.com>
6 * Based on clocks.h by Tony Lindgren, Gordon McNutt and RidgeRun, Inc
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 */
12
13#ifndef __ARCH_ARM_OMAP_CLOCK_H
14#define __ARCH_ARM_OMAP_CLOCK_H
15
16struct module;
17struct clk;
18
19#if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3)
20
21struct clksel_rate {
22 u8 div;
23 u32 val;
24 u8 flags;
25};
26
27struct clksel {
28 struct clk *parent;
29 const struct clksel_rate *rates;
30};
31
32struct dpll_data {
33 void __iomem *mult_div1_reg;
34 u32 mult_mask;
35 u32 div1_mask;
36 u16 last_rounded_m;
37 u8 last_rounded_n;
38 unsigned long last_rounded_rate;
39 unsigned int rate_tolerance;
40 u16 max_multiplier;
41 u8 max_divider;
42 u32 max_tolerance;
43# if defined(CONFIG_ARCH_OMAP3)
44 u8 modes;
45 void __iomem *control_reg;
46 u32 enable_mask;
47 u8 auto_recal_bit;
48 u8 recal_en_bit;
49 u8 recal_st_bit;
50 void __iomem *autoidle_reg;
51 u32 autoidle_mask;
52 void __iomem *idlest_reg;
53 u8 idlest_bit;
54# endif
55};
56
57#endif
58
59struct clk {
60 struct list_head node;
61 struct module *owner;
62 const char *name;
63 int id;
64 struct clk *parent;
65 unsigned long rate;
66 __u32 flags;
67 void __iomem *enable_reg;
68 __u8 enable_bit;
69 __s8 usecount;
70 void (*recalc)(struct clk *);
71 int (*set_rate)(struct clk *, unsigned long);
72 long (*round_rate)(struct clk *, unsigned long);
73 void (*init)(struct clk *);
74 int (*enable)(struct clk *);
75 void (*disable)(struct clk *);
76#if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3)
77 u8 fixed_div;
78 void __iomem *clksel_reg;
79 u32 clksel_mask;
80 const struct clksel *clksel;
81 struct dpll_data *dpll_data;
82#else
83 __u8 rate_offset;
84 __u8 src_offset;
85#endif
86#if defined(CONFIG_PM_DEBUG) && defined(CONFIG_DEBUG_FS)
87 struct dentry *dent; /* For visible tree hierarchy */
88#endif
89};
90
91struct cpufreq_frequency_table;
92
93struct clk_functions {
94 int (*clk_enable)(struct clk *clk);
95 void (*clk_disable)(struct clk *clk);
96 long (*clk_round_rate)(struct clk *clk, unsigned long rate);
97 int (*clk_set_rate)(struct clk *clk, unsigned long rate);
98 int (*clk_set_parent)(struct clk *clk, struct clk *parent);
99 struct clk * (*clk_get_parent)(struct clk *clk);
100 void (*clk_allow_idle)(struct clk *clk);
101 void (*clk_deny_idle)(struct clk *clk);
102 void (*clk_disable_unused)(struct clk *clk);
103#ifdef CONFIG_CPU_FREQ
104 void (*clk_init_cpufreq_table)(struct cpufreq_frequency_table **);
105#endif
106};
107
108extern unsigned int mpurate;
109
110extern int clk_init(struct clk_functions * custom_clocks);
111extern int clk_register(struct clk *clk);
112extern void clk_unregister(struct clk *clk);
113extern void propagate_rate(struct clk *clk);
114extern void recalculate_root_clocks(void);
115extern void followparent_recalc(struct clk * clk);
116extern void clk_allow_idle(struct clk *clk);
117extern void clk_deny_idle(struct clk *clk);
118extern int clk_get_usecount(struct clk *clk);
119extern void clk_enable_init_clocks(void);
120
121/* Clock flags */
122#define RATE_CKCTL (1 << 0) /* Main fixed ratio clocks */
123#define RATE_FIXED (1 << 1) /* Fixed clock rate */
124#define RATE_PROPAGATES (1 << 2) /* Program children too */
125#define VIRTUAL_CLOCK (1 << 3) /* Composite clock from table */
126#define ALWAYS_ENABLED (1 << 4) /* Clock cannot be disabled */
127#define ENABLE_REG_32BIT (1 << 5) /* Use 32-bit access */
128#define VIRTUAL_IO_ADDRESS (1 << 6) /* Clock in virtual address */
129#define CLOCK_IDLE_CONTROL (1 << 7)
130#define CLOCK_NO_IDLE_PARENT (1 << 8)
131#define DELAYED_APP (1 << 9) /* Delay application of clock */
132#define CONFIG_PARTICIPANT (1 << 10) /* Fundamental clock */
133#define ENABLE_ON_INIT (1 << 11) /* Enable upon framework init */
134#define INVERT_ENABLE (1 << 12) /* 0 enables, 1 disables */
135/* bits 13-20 are currently free */
136#define CLOCK_IN_OMAP310 (1 << 21)
137#define CLOCK_IN_OMAP730 (1 << 22)
138#define CLOCK_IN_OMAP1510 (1 << 23)
139#define CLOCK_IN_OMAP16XX (1 << 24)
140#define CLOCK_IN_OMAP242X (1 << 25)
141#define CLOCK_IN_OMAP243X (1 << 26)
142#define CLOCK_IN_OMAP343X (1 << 27) /* clocks common to all 343X */
143#define PARENT_CONTROLS_CLOCK (1 << 28)
144#define CLOCK_IN_OMAP3430ES1 (1 << 29) /* 3430ES1 clocks only */
145#define CLOCK_IN_OMAP3430ES2 (1 << 30) /* 3430ES2 clocks only */
146
147/* Clksel_rate flags */
148#define DEFAULT_RATE (1 << 0)
149#define RATE_IN_242X (1 << 1)
150#define RATE_IN_243X (1 << 2)
151#define RATE_IN_343X (1 << 3) /* rates common to all 343X */
152#define RATE_IN_3430ES2 (1 << 4) /* 3430ES2 rates only */
153
154#define RATE_IN_24XX (RATE_IN_242X | RATE_IN_243X)
155
156
157/* CM_CLKSEL2_PLL.CORE_CLK_SRC options (24XX) */
158#define CORE_CLK_SRC_32K 0
159#define CORE_CLK_SRC_DPLL 1
160#define CORE_CLK_SRC_DPLL_X2 2
161
162#endif
diff --git a/include/asm-arm/arch-omap/common.h b/include/asm-arm/arch-omap/common.h
deleted file mode 100644
index 8ac03071f60c..000000000000
--- a/include/asm-arm/arch-omap/common.h
+++ /dev/null
@@ -1,69 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-omap/common.h
3 *
4 * Header for code common to all OMAP machines.
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2 of the License, or (at your
9 * option) any later version.
10 *
11 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
12 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
13 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
14 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
15 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
16 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
17 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
18 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
19 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
20 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
21 *
22 * You should have received a copy of the GNU General Public License along
23 * with this program; if not, write to the Free Software Foundation, Inc.,
24 * 675 Mass Ave, Cambridge, MA 02139, USA.
25 */
26
27#ifndef __ARCH_ARM_MACH_OMAP_COMMON_H
28#define __ARCH_ARM_MACH_OMAP_COMMON_H
29
30#include <linux/i2c.h>
31
32struct sys_timer;
33
34extern void omap_map_common_io(void);
35extern struct sys_timer omap_timer;
36extern void omap_serial_init(void);
37#ifdef CONFIG_I2C_OMAP
38extern int omap_register_i2c_bus(int bus_id, u32 clkrate,
39 struct i2c_board_info const *info,
40 unsigned len);
41#else
42static inline int omap_register_i2c_bus(int bus_id, u32 clkrate,
43 struct i2c_board_info const *info,
44 unsigned len)
45{
46 return 0;
47}
48#endif
49
50/* IO bases for various OMAP processors */
51struct omap_globals {
52 void __iomem *tap; /* Control module ID code */
53 void __iomem *sdrc; /* SDRAM Controller */
54 void __iomem *sms; /* SDRAM Memory Scheduler */
55 void __iomem *ctrl; /* System Control Module */
56 void __iomem *prm; /* Power and Reset Management */
57 void __iomem *cm; /* Clock Management */
58};
59
60void omap2_set_globals_242x(void);
61void omap2_set_globals_243x(void);
62void omap2_set_globals_343x(void);
63
64/* These get called from omap2_set_globals_xxxx(), do not call these */
65void omap2_set_globals_memory(struct omap_globals *);
66void omap2_set_globals_control(struct omap_globals *);
67void omap2_set_globals_prcm(struct omap_globals *);
68
69#endif /* __ARCH_ARM_MACH_OMAP_COMMON_H */
diff --git a/include/asm-arm/arch-omap/control.h b/include/asm-arm/arch-omap/control.h
deleted file mode 100644
index 987553e3eeb9..000000000000
--- a/include/asm-arm/arch-omap/control.h
+++ /dev/null
@@ -1,189 +0,0 @@
1#ifndef __ASM_ARCH_CONTROL_H
2#define __ASM_ARCH_CONTROL_H
3
4/*
5 * include/asm-arm/arch-omap/control.h
6 *
7 * OMAP2/3 System Control Module definitions
8 *
9 * Copyright (C) 2007 Texas Instruments, Inc.
10 * Copyright (C) 2007 Nokia Corporation
11 *
12 * Written by Paul Walmsley
13 *
14 * This program is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation.
17 */
18
19#include <asm/arch/io.h>
20
21#define OMAP242X_CTRL_REGADDR(reg) \
22 (void __iomem *)IO_ADDRESS(OMAP242X_CTRL_BASE + (reg))
23#define OMAP243X_CTRL_REGADDR(reg) \
24 (void __iomem *)IO_ADDRESS(OMAP243X_CTRL_BASE + (reg))
25#define OMAP343X_CTRL_REGADDR(reg) \
26 (void __iomem *)IO_ADDRESS(OMAP343X_CTRL_BASE + (reg))
27
28/*
29 * As elsewhere, the "OMAP2_" prefix indicates that the macro is valid for
30 * OMAP24XX and OMAP34XX.
31 */
32
33/* Control submodule offsets */
34
35#define OMAP2_CONTROL_INTERFACE 0x000
36#define OMAP2_CONTROL_PADCONFS 0x030
37#define OMAP2_CONTROL_GENERAL 0x270
38#define OMAP343X_CONTROL_MEM_WKUP 0x600
39#define OMAP343X_CONTROL_PADCONFS_WKUP 0xa00
40#define OMAP343X_CONTROL_GENERAL_WKUP 0xa60
41
42/* Control register offsets - read/write with omap_ctrl_{read,write}{bwl}() */
43
44#define OMAP2_CONTROL_SYSCONFIG (OMAP2_CONTROL_INTERFACE + 0x10)
45
46/* CONTROL_GENERAL register offsets common to OMAP2 & 3 */
47#define OMAP2_CONTROL_DEVCONF0 (OMAP2_CONTROL_GENERAL + 0x0004)
48#define OMAP2_CONTROL_MSUSPENDMUX_0 (OMAP2_CONTROL_GENERAL + 0x0020)
49#define OMAP2_CONTROL_MSUSPENDMUX_1 (OMAP2_CONTROL_GENERAL + 0x0024)
50#define OMAP2_CONTROL_MSUSPENDMUX_2 (OMAP2_CONTROL_GENERAL + 0x0028)
51#define OMAP2_CONTROL_MSUSPENDMUX_3 (OMAP2_CONTROL_GENERAL + 0x002c)
52#define OMAP2_CONTROL_MSUSPENDMUX_4 (OMAP2_CONTROL_GENERAL + 0x0030)
53#define OMAP2_CONTROL_MSUSPENDMUX_5 (OMAP2_CONTROL_GENERAL + 0x0034)
54#define OMAP2_CONTROL_SEC_CTRL (OMAP2_CONTROL_GENERAL + 0x0040)
55#define OMAP2_CONTROL_RPUB_KEY_H_0 (OMAP2_CONTROL_GENERAL + 0x0090)
56#define OMAP2_CONTROL_RPUB_KEY_H_1 (OMAP2_CONTROL_GENERAL + 0x0094)
57#define OMAP2_CONTROL_RPUB_KEY_H_2 (OMAP2_CONTROL_GENERAL + 0x0098)
58#define OMAP2_CONTROL_RPUB_KEY_H_3 (OMAP2_CONTROL_GENERAL + 0x009c)
59
60/* 242x-only CONTROL_GENERAL register offsets */
61#define OMAP242X_CONTROL_DEVCONF OMAP2_CONTROL_DEVCONF0 /* match TRM */
62#define OMAP242X_CONTROL_OCM_RAM_PERM (OMAP2_CONTROL_GENERAL + 0x0068)
63
64/* 243x-only CONTROL_GENERAL register offsets */
65/* CONTROL_IVA2_BOOT{ADDR,MOD} are at the same place on 343x - noted below */
66#define OMAP243X_CONTROL_DEVCONF1 (OMAP2_CONTROL_GENERAL + 0x0078)
67#define OMAP243X_CONTROL_CSIRXFE (OMAP2_CONTROL_GENERAL + 0x007c)
68#define OMAP243X_CONTROL_IVA2_BOOTADDR (OMAP2_CONTROL_GENERAL + 0x0190)
69#define OMAP243X_CONTROL_IVA2_BOOTMOD (OMAP2_CONTROL_GENERAL + 0x0194)
70#define OMAP243X_CONTROL_IVA2_GEMCFG (OMAP2_CONTROL_GENERAL + 0x0198)
71
72/* 24xx-only CONTROL_GENERAL register offsets */
73#define OMAP24XX_CONTROL_DEBOBS (OMAP2_CONTROL_GENERAL + 0x0000)
74#define OMAP24XX_CONTROL_EMU_SUPPORT (OMAP2_CONTROL_GENERAL + 0x0008)
75#define OMAP24XX_CONTROL_SEC_TEST (OMAP2_CONTROL_GENERAL + 0x0044)
76#define OMAP24XX_CONTROL_PSA_CTRL (OMAP2_CONTROL_GENERAL + 0x0048)
77#define OMAP24XX_CONTROL_PSA_CMD (OMAP2_CONTROL_GENERAL + 0x004c)
78#define OMAP24XX_CONTROL_PSA_VALUE (OMAP2_CONTROL_GENERAL + 0x0050)
79#define OMAP24XX_CONTROL_SEC_EMU (OMAP2_CONTROL_GENERAL + 0x0060)
80#define OMAP24XX_CONTROL_SEC_TAP (OMAP2_CONTROL_GENERAL + 0x0064)
81#define OMAP24XX_CONTROL_OCM_PUB_RAM_ADD (OMAP2_CONTROL_GENERAL + 0x006c)
82#define OMAP24XX_CONTROL_EXT_SEC_RAM_START_ADD (OMAP2_CONTROL_GENERAL + 0x0070)
83#define OMAP24XX_CONTROL_EXT_SEC_RAM_STOP_ADD (OMAP2_CONTROL_GENERAL + 0x0074)
84#define OMAP24XX_CONTROL_SEC_STATUS (OMAP2_CONTROL_GENERAL + 0x0080)
85#define OMAP24XX_CONTROL_SEC_ERR_STATUS (OMAP2_CONTROL_GENERAL + 0x0084)
86#define OMAP24XX_CONTROL_STATUS (OMAP2_CONTROL_GENERAL + 0x0088)
87#define OMAP24XX_CONTROL_GENERAL_PURPOSE_STATUS (OMAP2_CONTROL_GENERAL + 0x008c)
88#define OMAP24XX_CONTROL_RAND_KEY_0 (OMAP2_CONTROL_GENERAL + 0x00a0)
89#define OMAP24XX_CONTROL_RAND_KEY_1 (OMAP2_CONTROL_GENERAL + 0x00a4)
90#define OMAP24XX_CONTROL_RAND_KEY_2 (OMAP2_CONTROL_GENERAL + 0x00a8)
91#define OMAP24XX_CONTROL_RAND_KEY_3 (OMAP2_CONTROL_GENERAL + 0x00ac)
92#define OMAP24XX_CONTROL_CUST_KEY_0 (OMAP2_CONTROL_GENERAL + 0x00b0)
93#define OMAP24XX_CONTROL_CUST_KEY_1 (OMAP2_CONTROL_GENERAL + 0x00b4)
94#define OMAP24XX_CONTROL_TEST_KEY_0 (OMAP2_CONTROL_GENERAL + 0x00c0)
95#define OMAP24XX_CONTROL_TEST_KEY_1 (OMAP2_CONTROL_GENERAL + 0x00c4)
96#define OMAP24XX_CONTROL_TEST_KEY_2 (OMAP2_CONTROL_GENERAL + 0x00c8)
97#define OMAP24XX_CONTROL_TEST_KEY_3 (OMAP2_CONTROL_GENERAL + 0x00cc)
98#define OMAP24XX_CONTROL_TEST_KEY_4 (OMAP2_CONTROL_GENERAL + 0x00d0)
99#define OMAP24XX_CONTROL_TEST_KEY_5 (OMAP2_CONTROL_GENERAL + 0x00d4)
100#define OMAP24XX_CONTROL_TEST_KEY_6 (OMAP2_CONTROL_GENERAL + 0x00d8)
101#define OMAP24XX_CONTROL_TEST_KEY_7 (OMAP2_CONTROL_GENERAL + 0x00dc)
102#define OMAP24XX_CONTROL_TEST_KEY_8 (OMAP2_CONTROL_GENERAL + 0x00e0)
103#define OMAP24XX_CONTROL_TEST_KEY_9 (OMAP2_CONTROL_GENERAL + 0x00e4)
104
105/* 34xx-only CONTROL_GENERAL register offsets */
106#define OMAP343X_CONTROL_PADCONF_OFF (OMAP2_CONTROL_GENERAL + 0x0000)
107#define OMAP343X_CONTROL_MEM_DFTRW0 (OMAP2_CONTROL_GENERAL + 0x0008)
108#define OMAP343X_CONTROL_MEM_DFTRW1 (OMAP2_CONTROL_GENERAL + 0x000c)
109#define OMAP343X_CONTROL_DEVCONF1 (OMAP2_CONTROL_GENERAL + 0x0068)
110#define OMAP343X_CONTROL_CSIRXFE (OMAP2_CONTROL_GENERAL + 0x006c)
111#define OMAP343X_CONTROL_SEC_STATUS (OMAP2_CONTROL_GENERAL + 0x0070)
112#define OMAP343X_CONTROL_SEC_ERR_STATUS (OMAP2_CONTROL_GENERAL + 0x0074)
113#define OMAP343X_CONTROL_SEC_ERR_STATUS_DEBUG (OMAP2_CONTROL_GENERAL + 0x0078)
114#define OMAP343X_CONTROL_STATUS (OMAP2_CONTROL_GENERAL + 0x0080)
115#define OMAP343X_CONTROL_GENERAL_PURPOSE_STATUS (OMAP2_CONTROL_GENERAL + 0x0084)
116#define OMAP343X_CONTROL_RPUB_KEY_H_4 (OMAP2_CONTROL_GENERAL + 0x00a0)
117#define OMAP343X_CONTROL_RAND_KEY_0 (OMAP2_CONTROL_GENERAL + 0x00a8)
118#define OMAP343X_CONTROL_RAND_KEY_1 (OMAP2_CONTROL_GENERAL + 0x00ac)
119#define OMAP343X_CONTROL_RAND_KEY_2 (OMAP2_CONTROL_GENERAL + 0x00b0)
120#define OMAP343X_CONTROL_RAND_KEY_3 (OMAP2_CONTROL_GENERAL + 0x00b4)
121#define OMAP343X_CONTROL_TEST_KEY_0 (OMAP2_CONTROL_GENERAL + 0x00c8)
122#define OMAP343X_CONTROL_TEST_KEY_1 (OMAP2_CONTROL_GENERAL + 0x00cc)
123#define OMAP343X_CONTROL_TEST_KEY_2 (OMAP2_CONTROL_GENERAL + 0x00d0)
124#define OMAP343X_CONTROL_TEST_KEY_3 (OMAP2_CONTROL_GENERAL + 0x00d4)
125#define OMAP343X_CONTROL_TEST_KEY_4 (OMAP2_CONTROL_GENERAL + 0x00d8)
126#define OMAP343X_CONTROL_TEST_KEY_5 (OMAP2_CONTROL_GENERAL + 0x00dc)
127#define OMAP343X_CONTROL_TEST_KEY_6 (OMAP2_CONTROL_GENERAL + 0x00e0)
128#define OMAP343X_CONTROL_TEST_KEY_7 (OMAP2_CONTROL_GENERAL + 0x00e4)
129#define OMAP343X_CONTROL_TEST_KEY_8 (OMAP2_CONTROL_GENERAL + 0x00e8)
130#define OMAP343X_CONTROL_TEST_KEY_9 (OMAP2_CONTROL_GENERAL + 0x00ec)
131#define OMAP343X_CONTROL_TEST_KEY_10 (OMAP2_CONTROL_GENERAL + 0x00f0)
132#define OMAP343X_CONTROL_TEST_KEY_11 (OMAP2_CONTROL_GENERAL + 0x00f4)
133#define OMAP343X_CONTROL_TEST_KEY_12 (OMAP2_CONTROL_GENERAL + 0x00f8)
134#define OMAP343X_CONTROL_TEST_KEY_13 (OMAP2_CONTROL_GENERAL + 0x00fc)
135#define OMAP343X_CONTROL_IVA2_BOOTADDR (OMAP2_CONTROL_GENERAL + 0x0190)
136#define OMAP343X_CONTROL_IVA2_BOOTMOD (OMAP2_CONTROL_GENERAL + 0x0194)
137
138/*
139 * REVISIT: This list of registers is not comprehensive - there are more
140 * that should be added.
141 */
142
143/*
144 * Control module register bit defines - these should eventually go into
145 * their own regbits file. Some of these will be complicated, depending
146 * on the device type (general-purpose, emulator, test, secure, bad, other)
147 * and the security mode (secure, non-secure, don't care)
148 */
149/* CONTROL_DEVCONF0 bits */
150#define OMAP24XX_USBSTANDBYCTRL (1 << 15)
151#define OMAP2_MCBSP2_CLKS_MASK (1 << 6)
152#define OMAP2_MCBSP1_CLKS_MASK (1 << 2)
153
154/* CONTROL_DEVCONF1 bits */
155#define OMAP2_MCBSP5_CLKS_MASK (1 << 4) /* > 242x */
156#define OMAP2_MCBSP4_CLKS_MASK (1 << 2) /* > 242x */
157#define OMAP2_MCBSP3_CLKS_MASK (1 << 0) /* > 242x */
158
159/* CONTROL_STATUS bits */
160#define OMAP2_DEVICETYPE_MASK (0x7 << 8)
161#define OMAP2_SYSBOOT_5_MASK (1 << 5)
162#define OMAP2_SYSBOOT_4_MASK (1 << 4)
163#define OMAP2_SYSBOOT_3_MASK (1 << 3)
164#define OMAP2_SYSBOOT_2_MASK (1 << 2)
165#define OMAP2_SYSBOOT_1_MASK (1 << 1)
166#define OMAP2_SYSBOOT_0_MASK (1 << 0)
167
168#ifndef __ASSEMBLY__
169#if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3)
170extern void __iomem *omap_ctrl_base_get(void);
171extern u8 omap_ctrl_readb(u16 offset);
172extern u16 omap_ctrl_readw(u16 offset);
173extern u32 omap_ctrl_readl(u16 offset);
174extern void omap_ctrl_writeb(u8 val, u16 offset);
175extern void omap_ctrl_writew(u16 val, u16 offset);
176extern void omap_ctrl_writel(u32 val, u16 offset);
177#else
178#define omap_ctrl_base_get() 0
179#define omap_ctrl_readb(x) 0
180#define omap_ctrl_readw(x) 0
181#define omap_ctrl_readl(x) 0
182#define omap_ctrl_writeb(x, y) WARN_ON(1)
183#define omap_ctrl_writew(x, y) WARN_ON(1)
184#define omap_ctrl_writel(x, y) WARN_ON(1)
185#endif
186#endif /* __ASSEMBLY__ */
187
188#endif /* __ASM_ARCH_CONTROL_H */
189
diff --git a/include/asm-arm/arch-omap/cpu.h b/include/asm-arm/arch-omap/cpu.h
deleted file mode 100644
index 52db09f83281..000000000000
--- a/include/asm-arm/arch-omap/cpu.h
+++ /dev/null
@@ -1,402 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-omap/cpu.h
3 *
4 * OMAP cpu type detection
5 *
6 * Copyright (C) 2004, 2008 Nokia Corporation
7 *
8 * Written by Tony Lindgren <tony.lindgren@nokia.com>
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 *
24 */
25
26#ifndef __ASM_ARCH_OMAP_CPU_H
27#define __ASM_ARCH_OMAP_CPU_H
28
29struct omap_chip_id {
30 u8 oc;
31};
32
33#define OMAP_CHIP_INIT(x) { .oc = x }
34
35extern unsigned int system_rev;
36
37#define omap2_cpu_rev() ((system_rev >> 12) & 0x0f)
38
39/*
40 * Test if multicore OMAP support is needed
41 */
42#undef MULTI_OMAP1
43#undef MULTI_OMAP2
44#undef OMAP_NAME
45
46#ifdef CONFIG_ARCH_OMAP730
47# ifdef OMAP_NAME
48# undef MULTI_OMAP1
49# define MULTI_OMAP1
50# else
51# define OMAP_NAME omap730
52# endif
53#endif
54#ifdef CONFIG_ARCH_OMAP15XX
55# ifdef OMAP_NAME
56# undef MULTI_OMAP1
57# define MULTI_OMAP1
58# else
59# define OMAP_NAME omap1510
60# endif
61#endif
62#ifdef CONFIG_ARCH_OMAP16XX
63# ifdef OMAP_NAME
64# undef MULTI_OMAP1
65# define MULTI_OMAP1
66# else
67# define OMAP_NAME omap16xx
68# endif
69#endif
70#if (defined(CONFIG_ARCH_OMAP24XX) || defined(CONFIG_ARCH_OMAP34XX))
71# if (defined(OMAP_NAME) || defined(MULTI_OMAP1))
72# error "OMAP1 and OMAP2 can't be selected at the same time"
73# endif
74#endif
75#ifdef CONFIG_ARCH_OMAP2420
76# ifdef OMAP_NAME
77# undef MULTI_OMAP2
78# define MULTI_OMAP2
79# else
80# define OMAP_NAME omap2420
81# endif
82#endif
83#ifdef CONFIG_ARCH_OMAP2430
84# ifdef OMAP_NAME
85# undef MULTI_OMAP2
86# define MULTI_OMAP2
87# else
88# define OMAP_NAME omap2430
89# endif
90#endif
91#ifdef CONFIG_ARCH_OMAP3430
92# ifdef OMAP_NAME
93# undef MULTI_OMAP2
94# define MULTI_OMAP2
95# else
96# define OMAP_NAME omap3430
97# endif
98#endif
99
100/*
101 * Macros to group OMAP into cpu classes.
102 * These can be used in most places.
103 * cpu_is_omap7xx(): True for OMAP730
104 * cpu_is_omap15xx(): True for OMAP1510, OMAP5910 and OMAP310
105 * cpu_is_omap16xx(): True for OMAP1610, OMAP5912 and OMAP1710
106 * cpu_is_omap24xx(): True for OMAP2420, OMAP2422, OMAP2423, OMAP2430
107 * cpu_is_omap242x(): True for OMAP2420, OMAP2422, OMAP2423
108 * cpu_is_omap243x(): True for OMAP2430
109 * cpu_is_omap343x(): True for OMAP3430
110 */
111#define GET_OMAP_CLASS ((system_rev >> 24) & 0xff)
112
113#define IS_OMAP_CLASS(class, id) \
114static inline int is_omap ##class (void) \
115{ \
116 return (GET_OMAP_CLASS == (id)) ? 1 : 0; \
117}
118
119#define GET_OMAP_SUBCLASS ((system_rev >> 20) & 0x0fff)
120
121#define IS_OMAP_SUBCLASS(subclass, id) \
122static inline int is_omap ##subclass (void) \
123{ \
124 return (GET_OMAP_SUBCLASS == (id)) ? 1 : 0; \
125}
126
127IS_OMAP_CLASS(7xx, 0x07)
128IS_OMAP_CLASS(15xx, 0x15)
129IS_OMAP_CLASS(16xx, 0x16)
130IS_OMAP_CLASS(24xx, 0x24)
131IS_OMAP_CLASS(34xx, 0x34)
132
133IS_OMAP_SUBCLASS(242x, 0x242)
134IS_OMAP_SUBCLASS(243x, 0x243)
135IS_OMAP_SUBCLASS(343x, 0x343)
136
137#define cpu_is_omap7xx() 0
138#define cpu_is_omap15xx() 0
139#define cpu_is_omap16xx() 0
140#define cpu_is_omap24xx() 0
141#define cpu_is_omap242x() 0
142#define cpu_is_omap243x() 0
143#define cpu_is_omap34xx() 0
144#define cpu_is_omap343x() 0
145
146#if defined(MULTI_OMAP1)
147# if defined(CONFIG_ARCH_OMAP730)
148# undef cpu_is_omap7xx
149# define cpu_is_omap7xx() is_omap7xx()
150# endif
151# if defined(CONFIG_ARCH_OMAP15XX)
152# undef cpu_is_omap15xx
153# define cpu_is_omap15xx() is_omap15xx()
154# endif
155# if defined(CONFIG_ARCH_OMAP16XX)
156# undef cpu_is_omap16xx
157# define cpu_is_omap16xx() is_omap16xx()
158# endif
159#else
160# if defined(CONFIG_ARCH_OMAP730)
161# undef cpu_is_omap7xx
162# define cpu_is_omap7xx() 1
163# endif
164# if defined(CONFIG_ARCH_OMAP15XX)
165# undef cpu_is_omap15xx
166# define cpu_is_omap15xx() 1
167# endif
168# if defined(CONFIG_ARCH_OMAP16XX)
169# undef cpu_is_omap16xx
170# define cpu_is_omap16xx() 1
171# endif
172#endif
173
174#if defined(MULTI_OMAP2)
175# if defined(CONFIG_ARCH_OMAP24XX)
176# undef cpu_is_omap24xx
177# undef cpu_is_omap242x
178# undef cpu_is_omap243x
179# define cpu_is_omap24xx() is_omap24xx()
180# define cpu_is_omap242x() is_omap242x()
181# define cpu_is_omap243x() is_omap243x()
182# endif
183# if defined(CONFIG_ARCH_OMAP34XX)
184# undef cpu_is_omap34xx
185# undef cpu_is_omap343x
186# define cpu_is_omap34xx() is_omap34xx()
187# define cpu_is_omap343x() is_omap343x()
188# endif
189#else
190# if defined(CONFIG_ARCH_OMAP24XX)
191# undef cpu_is_omap24xx
192# define cpu_is_omap24xx() 1
193# endif
194# if defined(CONFIG_ARCH_OMAP2420)
195# undef cpu_is_omap242x
196# define cpu_is_omap242x() 1
197# endif
198# if defined(CONFIG_ARCH_OMAP2430)
199# undef cpu_is_omap243x
200# define cpu_is_omap243x() 1
201# endif
202# if defined(CONFIG_ARCH_OMAP34XX)
203# undef cpu_is_omap34xx
204# define cpu_is_omap34xx() 1
205# endif
206# if defined(CONFIG_ARCH_OMAP3430)
207# undef cpu_is_omap343x
208# define cpu_is_omap343x() 1
209# endif
210#endif
211
212/*
213 * Macros to detect individual cpu types.
214 * These are only rarely needed.
215 * cpu_is_omap330(): True for OMAP330
216 * cpu_is_omap730(): True for OMAP730
217 * cpu_is_omap1510(): True for OMAP1510
218 * cpu_is_omap1610(): True for OMAP1610
219 * cpu_is_omap1611(): True for OMAP1611
220 * cpu_is_omap5912(): True for OMAP5912
221 * cpu_is_omap1621(): True for OMAP1621
222 * cpu_is_omap1710(): True for OMAP1710
223 * cpu_is_omap2420(): True for OMAP2420
224 * cpu_is_omap2422(): True for OMAP2422
225 * cpu_is_omap2423(): True for OMAP2423
226 * cpu_is_omap2430(): True for OMAP2430
227 * cpu_is_omap3430(): True for OMAP3430
228 */
229#define GET_OMAP_TYPE ((system_rev >> 16) & 0xffff)
230
231#define IS_OMAP_TYPE(type, id) \
232static inline int is_omap ##type (void) \
233{ \
234 return (GET_OMAP_TYPE == (id)) ? 1 : 0; \
235}
236
237IS_OMAP_TYPE(310, 0x0310)
238IS_OMAP_TYPE(730, 0x0730)
239IS_OMAP_TYPE(1510, 0x1510)
240IS_OMAP_TYPE(1610, 0x1610)
241IS_OMAP_TYPE(1611, 0x1611)
242IS_OMAP_TYPE(5912, 0x1611)
243IS_OMAP_TYPE(1621, 0x1621)
244IS_OMAP_TYPE(1710, 0x1710)
245IS_OMAP_TYPE(2420, 0x2420)
246IS_OMAP_TYPE(2422, 0x2422)
247IS_OMAP_TYPE(2423, 0x2423)
248IS_OMAP_TYPE(2430, 0x2430)
249IS_OMAP_TYPE(3430, 0x3430)
250
251#define cpu_is_omap310() 0
252#define cpu_is_omap730() 0
253#define cpu_is_omap1510() 0
254#define cpu_is_omap1610() 0
255#define cpu_is_omap5912() 0
256#define cpu_is_omap1611() 0
257#define cpu_is_omap1621() 0
258#define cpu_is_omap1710() 0
259#define cpu_is_omap2420() 0
260#define cpu_is_omap2422() 0
261#define cpu_is_omap2423() 0
262#define cpu_is_omap2430() 0
263#define cpu_is_omap3430() 0
264
265#if defined(MULTI_OMAP1)
266# if defined(CONFIG_ARCH_OMAP730)
267# undef cpu_is_omap730
268# define cpu_is_omap730() is_omap730()
269# endif
270#else
271# if defined(CONFIG_ARCH_OMAP730)
272# undef cpu_is_omap730
273# define cpu_is_omap730() 1
274# endif
275#endif
276
277/*
278 * Whether we have MULTI_OMAP1 or not, we still need to distinguish
279 * between 330 vs. 1510 and 1611B/5912 vs. 1710.
280 */
281#if defined(CONFIG_ARCH_OMAP15XX)
282# undef cpu_is_omap310
283# undef cpu_is_omap1510
284# define cpu_is_omap310() is_omap310()
285# define cpu_is_omap1510() is_omap1510()
286#endif
287
288#if defined(CONFIG_ARCH_OMAP16XX)
289# undef cpu_is_omap1610
290# undef cpu_is_omap1611
291# undef cpu_is_omap5912
292# undef cpu_is_omap1621
293# undef cpu_is_omap1710
294# define cpu_is_omap1610() is_omap1610()
295# define cpu_is_omap1611() is_omap1611()
296# define cpu_is_omap5912() is_omap5912()
297# define cpu_is_omap1621() is_omap1621()
298# define cpu_is_omap1710() is_omap1710()
299#endif
300
301#if defined(CONFIG_ARCH_OMAP24XX)
302# undef cpu_is_omap2420
303# undef cpu_is_omap2422
304# undef cpu_is_omap2423
305# undef cpu_is_omap2430
306# define cpu_is_omap2420() is_omap2420()
307# define cpu_is_omap2422() is_omap2422()
308# define cpu_is_omap2423() is_omap2423()
309# define cpu_is_omap2430() is_omap2430()
310#endif
311
312#if defined(CONFIG_ARCH_OMAP34XX)
313# undef cpu_is_omap3430
314# define cpu_is_omap3430() is_omap3430()
315#endif
316
317/* Macros to detect if we have OMAP1 or OMAP2 */
318#define cpu_class_is_omap1() (cpu_is_omap730() || cpu_is_omap15xx() || \
319 cpu_is_omap16xx())
320#define cpu_class_is_omap2() (cpu_is_omap24xx() || cpu_is_omap34xx())
321
322#if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3)
323/*
324 * Macros to detect silicon revision of OMAP2/3 processors.
325 * is_sil_rev_greater_than: true if passed cpu type & its rev is greater.
326 * is_sil_rev_lesser_than: true if passed cpu type & its rev is lesser.
327 * is_sil_rev_equal_to: true if passed cpu type & its rev is equal.
328 * get_sil_rev: return the silicon rev value.
329 */
330#define get_sil_omap_type(rev) ((rev & 0xffff0000) >> 16)
331#define get_sil_revision(rev) ((rev & 0x0000f000) >> 12)
332
333#define is_sil_rev_greater_than(rev) \
334 ((get_sil_omap_type(system_rev) == get_sil_omap_type(rev)) && \
335 (get_sil_revision(system_rev) > get_sil_revision(rev)))
336
337#define is_sil_rev_less_than(rev) \
338 ((get_sil_omap_type(system_rev) == get_sil_omap_type(rev)) && \
339 (get_sil_revision(system_rev) < get_sil_revision(rev)))
340
341#define is_sil_rev_equal_to(rev) \
342 ((get_sil_omap_type(system_rev) == get_sil_omap_type(rev)) && \
343 (get_sil_revision(system_rev) == get_sil_revision(rev)))
344
345#define get_sil_rev() \
346 get_sil_revision(system_rev)
347
348/* Various silicon macros defined here */
349#define OMAP2420_REV_ES1_0 0x24200000
350#define OMAP2420_REV_ES2_0 0x24201000
351#define OMAP2430_REV_ES1_0 0x24300000
352#define OMAP3430_REV_ES1_0 0x34300000
353#define OMAP3430_REV_ES2_0 0x34301000
354#define OMAP3430_REV_ES2_1 0x34302000
355#define OMAP3430_REV_ES2_2 0x34303000
356
357/*
358 * omap_chip bits
359 *
360 * CHIP_IS_OMAP{2420,2430,3430} indicate that a particular structure is
361 * valid on all chips of that type. CHIP_IS_OMAP3430ES{1,2} indicates
362 * something that is only valid on that particular ES revision.
363 *
364 * These bits may be ORed together to indicate structures that are
365 * available on multiple chip types.
366 *
367 * To test whether a particular structure matches the current OMAP chip type,
368 * use omap_chip_is().
369 *
370 */
371#define CHIP_IS_OMAP2420 (1 << 0)
372#define CHIP_IS_OMAP2430 (1 << 1)
373#define CHIP_IS_OMAP3430 (1 << 2)
374#define CHIP_IS_OMAP3430ES1 (1 << 3)
375#define CHIP_IS_OMAP3430ES2 (1 << 4)
376
377#define CHIP_IS_OMAP24XX (CHIP_IS_OMAP2420 | CHIP_IS_OMAP2430)
378
379int omap_chip_is(struct omap_chip_id oci);
380
381
382/*
383 * Macro to detect device type i.e. EMU/HS/TST/GP/BAD
384 */
385#define DEVICE_TYPE_TEST 0
386#define DEVICE_TYPE_EMU 1
387#define DEVICE_TYPE_SEC 2
388#define DEVICE_TYPE_GP 3
389#define DEVICE_TYPE_BAD 4
390
391#define get_device_type() ((system_rev & 0x700) >> 8)
392#define is_device_type_test() (get_device_type() == DEVICE_TYPE_TEST)
393#define is_device_type_emu() (get_device_type() == DEVICE_TYPE_EMU)
394#define is_device_type_sec() (get_device_type() == DEVICE_TYPE_SEC)
395#define is_device_type_gp() (get_device_type() == DEVICE_TYPE_GP)
396#define is_device_type_bad() (get_device_type() == DEVICE_TYPE_BAD)
397
398void omap2_check_revision(void);
399
400#endif /* defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3) */
401
402#endif
diff --git a/include/asm-arm/arch-omap/debug-macro.S b/include/asm-arm/arch-omap/debug-macro.S
deleted file mode 100644
index ca4f577f9675..000000000000
--- a/include/asm-arm/arch-omap/debug-macro.S
+++ /dev/null
@@ -1,58 +0,0 @@
1/* linux/include/asm-arm/arch-omap/debug-macro.S
2 *
3 * Debugging macro include header
4 *
5 * Copyright (C) 1994-1999 Russell King
6 * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 *
12*/
13
14 .macro addruart,rx
15 mrc p15, 0, \rx, c1, c0
16 tst \rx, #1 @ MMU enabled?
17#ifdef CONFIG_ARCH_OMAP1
18 moveq \rx, #0xff000000 @ physical base address
19 movne \rx, #0xfe000000 @ virtual base
20 orr \rx, \rx, #0x00fb0000
21#ifdef CONFIG_OMAP_LL_DEBUG_UART3
22 orr \rx, \rx, #0x00009000 @ UART 3
23#endif
24#if defined(CONFIG_OMAP_LL_DEBUG_UART2) || defined(CONFIG_OMAP_LL_DEBUG_UART3)
25 orr \rx, \rx, #0x00000800 @ UART 2 & 3
26#endif
27
28#elif CONFIG_ARCH_OMAP2
29 moveq \rx, #0x48000000 @ physical base address
30 movne \rx, #0xd8000000 @ virtual base
31 orr \rx, \rx, #0x0006a000
32#ifdef CONFIG_OMAP_LL_DEBUG_UART2
33 add \rx, \rx, #0x00002000 @ UART 2
34#endif
35#ifdef CONFIG_OMAP_LL_DEBUG_UART3
36 add \rx, \rx, #0x00004000 @ UART 3
37#endif
38#endif
39 .endm
40
41 .macro senduart,rd,rx
42 strb \rd, [\rx]
43 .endm
44
45 .macro busyuart,rd,rx
461001: ldrb \rd, [\rx, #(0x5 << 2)] @ OMAP-1510 and friends
47 and \rd, \rd, #0x60
48 teq \rd, #0x60
49 beq 1002f
50 ldrb \rd, [\rx, #(0x5 << 0)] @ OMAP-730 only
51 and \rd, \rd, #0x60
52 teq \rd, #0x60
53 bne 1001b
541002:
55 .endm
56
57 .macro waituart,rd,rx
58 .endm
diff --git a/include/asm-arm/arch-omap/dma.h b/include/asm-arm/arch-omap/dma.h
deleted file mode 100644
index f4dcb9587869..000000000000
--- a/include/asm-arm/arch-omap/dma.h
+++ /dev/null
@@ -1,570 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-omap/dma.h
3 *
4 * Copyright (C) 2003 Nokia Corporation
5 * Author: Juha Yrjölä <juha.yrjola@nokia.com>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
21#ifndef __ASM_ARCH_DMA_H
22#define __ASM_ARCH_DMA_H
23
24/* Hardware registers for omap1 */
25#define OMAP1_DMA_BASE (0xfffed800)
26
27#define OMAP1_DMA_GCR 0x400
28#define OMAP1_DMA_GSCR 0x404
29#define OMAP1_DMA_GRST 0x408
30#define OMAP1_DMA_HW_ID 0x442
31#define OMAP1_DMA_PCH2_ID 0x444
32#define OMAP1_DMA_PCH0_ID 0x446
33#define OMAP1_DMA_PCH1_ID 0x448
34#define OMAP1_DMA_PCHG_ID 0x44a
35#define OMAP1_DMA_PCHD_ID 0x44c
36#define OMAP1_DMA_CAPS_0_U 0x44e
37#define OMAP1_DMA_CAPS_0_L 0x450
38#define OMAP1_DMA_CAPS_1_U 0x452
39#define OMAP1_DMA_CAPS_1_L 0x454
40#define OMAP1_DMA_CAPS_2 0x456
41#define OMAP1_DMA_CAPS_3 0x458
42#define OMAP1_DMA_CAPS_4 0x45a
43#define OMAP1_DMA_PCH2_SR 0x460
44#define OMAP1_DMA_PCH0_SR 0x480
45#define OMAP1_DMA_PCH1_SR 0x482
46#define OMAP1_DMA_PCHD_SR 0x4c0
47
48/* Hardware registers for omap2 and omap3 */
49#define OMAP24XX_DMA4_BASE (L4_24XX_BASE + 0x56000)
50#define OMAP34XX_DMA4_BASE (L4_34XX_BASE + 0x56000)
51
52#define OMAP_DMA4_REVISION 0x00
53#define OMAP_DMA4_GCR 0x78
54#define OMAP_DMA4_IRQSTATUS_L0 0x08
55#define OMAP_DMA4_IRQSTATUS_L1 0x0c
56#define OMAP_DMA4_IRQSTATUS_L2 0x10
57#define OMAP_DMA4_IRQSTATUS_L3 0x14
58#define OMAP_DMA4_IRQENABLE_L0 0x18
59#define OMAP_DMA4_IRQENABLE_L1 0x1c
60#define OMAP_DMA4_IRQENABLE_L2 0x20
61#define OMAP_DMA4_IRQENABLE_L3 0x24
62#define OMAP_DMA4_SYSSTATUS 0x28
63#define OMAP_DMA4_OCP_SYSCONFIG 0x2c
64#define OMAP_DMA4_CAPS_0 0x64
65#define OMAP_DMA4_CAPS_2 0x6c
66#define OMAP_DMA4_CAPS_3 0x70
67#define OMAP_DMA4_CAPS_4 0x74
68
69#define OMAP1_LOGICAL_DMA_CH_COUNT 17
70#define OMAP_DMA4_LOGICAL_DMA_CH_COUNT 32 /* REVISIT: Is this 32 + 2? */
71
72/* Common channel specific registers for omap1 */
73#define OMAP1_DMA_CH_BASE(n) (0x40 * (n) + 0x00)
74#define OMAP1_DMA_CSDP(n) (0x40 * (n) + 0x00)
75#define OMAP1_DMA_CCR(n) (0x40 * (n) + 0x02)
76#define OMAP1_DMA_CICR(n) (0x40 * (n) + 0x04)
77#define OMAP1_DMA_CSR(n) (0x40 * (n) + 0x06)
78#define OMAP1_DMA_CEN(n) (0x40 * (n) + 0x10)
79#define OMAP1_DMA_CFN(n) (0x40 * (n) + 0x12)
80#define OMAP1_DMA_CSFI(n) (0x40 * (n) + 0x14)
81#define OMAP1_DMA_CSEI(n) (0x40 * (n) + 0x16)
82#define OMAP1_DMA_CPC(n) (0x40 * (n) + 0x18) /* 15xx only */
83#define OMAP1_DMA_CSAC(n) (0x40 * (n) + 0x18)
84#define OMAP1_DMA_CDAC(n) (0x40 * (n) + 0x1a)
85#define OMAP1_DMA_CDEI(n) (0x40 * (n) + 0x1c)
86#define OMAP1_DMA_CDFI(n) (0x40 * (n) + 0x1e)
87#define OMAP1_DMA_CLNK_CTRL(n) (0x40 * (n) + 0x28)
88
89/* Common channel specific registers for omap2 */
90#define OMAP_DMA4_CH_BASE(n) (0x60 * (n) + 0x80)
91#define OMAP_DMA4_CCR(n) (0x60 * (n) + 0x80)
92#define OMAP_DMA4_CLNK_CTRL(n) (0x60 * (n) + 0x84)
93#define OMAP_DMA4_CICR(n) (0x60 * (n) + 0x88)
94#define OMAP_DMA4_CSR(n) (0x60 * (n) + 0x8c)
95#define OMAP_DMA4_CSDP(n) (0x60 * (n) + 0x90)
96#define OMAP_DMA4_CEN(n) (0x60 * (n) + 0x94)
97#define OMAP_DMA4_CFN(n) (0x60 * (n) + 0x98)
98#define OMAP_DMA4_CSEI(n) (0x60 * (n) + 0xa4)
99#define OMAP_DMA4_CSFI(n) (0x60 * (n) + 0xa8)
100#define OMAP_DMA4_CDEI(n) (0x60 * (n) + 0xac)
101#define OMAP_DMA4_CDFI(n) (0x60 * (n) + 0xb0)
102#define OMAP_DMA4_CSAC(n) (0x60 * (n) + 0xb4)
103#define OMAP_DMA4_CDAC(n) (0x60 * (n) + 0xb8)
104
105/* Channel specific registers only on omap1 */
106#define OMAP1_DMA_CSSA_L(n) (0x40 * (n) + 0x08)
107#define OMAP1_DMA_CSSA_U(n) (0x40 * (n) + 0x0a)
108#define OMAP1_DMA_CDSA_L(n) (0x40 * (n) + 0x0c)
109#define OMAP1_DMA_CDSA_U(n) (0x40 * (n) + 0x0e)
110#define OMAP1_DMA_COLOR_L(n) (0x40 * (n) + 0x20)
111#define OMAP1_DMA_COLOR_U(n) (0x40 * (n) + 0x22)
112#define OMAP1_DMA_CCR2(n) (0x40 * (n) + 0x24)
113#define OMAP1_DMA_LCH_CTRL(n) (0x40 * (n) + 0x2a) /* not on 15xx */
114#define OMAP1_DMA_CCEN(n) 0
115#define OMAP1_DMA_CCFN(n) 0
116
117/* Channel specific registers only on omap2 */
118#define OMAP_DMA4_CSSA(n) (0x60 * (n) + 0x9c)
119#define OMAP_DMA4_CDSA(n) (0x60 * (n) + 0xa0)
120#define OMAP_DMA4_CCEN(n) (0x60 * (n) + 0xbc)
121#define OMAP_DMA4_CCFN(n) (0x60 * (n) + 0xc0)
122#define OMAP_DMA4_COLOR(n) (0x60 * (n) + 0xc4)
123
124/* Dummy defines to keep multi-omap compiles happy */
125#define OMAP1_DMA_REVISION 0
126#define OMAP1_DMA_IRQSTATUS_L0 0
127#define OMAP1_DMA_IRQENABLE_L0 0
128#define OMAP1_DMA_OCP_SYSCONFIG 0
129#define OMAP_DMA4_HW_ID 0
130#define OMAP_DMA4_CAPS_0_L 0
131#define OMAP_DMA4_CAPS_0_U 0
132#define OMAP_DMA4_CAPS_1_L 0
133#define OMAP_DMA4_CAPS_1_U 0
134#define OMAP_DMA4_GSCR 0
135#define OMAP_DMA4_CPC(n) 0
136
137#define OMAP_DMA4_LCH_CTRL(n) 0
138#define OMAP_DMA4_COLOR_L(n) 0
139#define OMAP_DMA4_COLOR_U(n) 0
140#define OMAP_DMA4_CCR2(n) 0
141#define OMAP1_DMA_CSSA(n) 0
142#define OMAP1_DMA_CDSA(n) 0
143#define OMAP_DMA4_CSSA_L(n) 0
144#define OMAP_DMA4_CSSA_U(n) 0
145#define OMAP_DMA4_CDSA_L(n) 0
146#define OMAP_DMA4_CDSA_U(n) 0
147
148/*----------------------------------------------------------------------------*/
149
150/* DMA channels for omap1 */
151#define OMAP_DMA_NO_DEVICE 0
152#define OMAP_DMA_MCSI1_TX 1
153#define OMAP_DMA_MCSI1_RX 2
154#define OMAP_DMA_I2C_RX 3
155#define OMAP_DMA_I2C_TX 4
156#define OMAP_DMA_EXT_NDMA_REQ 5
157#define OMAP_DMA_EXT_NDMA_REQ2 6
158#define OMAP_DMA_UWIRE_TX 7
159#define OMAP_DMA_MCBSP1_TX 8
160#define OMAP_DMA_MCBSP1_RX 9
161#define OMAP_DMA_MCBSP3_TX 10
162#define OMAP_DMA_MCBSP3_RX 11
163#define OMAP_DMA_UART1_TX 12
164#define OMAP_DMA_UART1_RX 13
165#define OMAP_DMA_UART2_TX 14
166#define OMAP_DMA_UART2_RX 15
167#define OMAP_DMA_MCBSP2_TX 16
168#define OMAP_DMA_MCBSP2_RX 17
169#define OMAP_DMA_UART3_TX 18
170#define OMAP_DMA_UART3_RX 19
171#define OMAP_DMA_CAMERA_IF_RX 20
172#define OMAP_DMA_MMC_TX 21
173#define OMAP_DMA_MMC_RX 22
174#define OMAP_DMA_NAND 23
175#define OMAP_DMA_IRQ_LCD_LINE 24
176#define OMAP_DMA_MEMORY_STICK 25
177#define OMAP_DMA_USB_W2FC_RX0 26
178#define OMAP_DMA_USB_W2FC_RX1 27
179#define OMAP_DMA_USB_W2FC_RX2 28
180#define OMAP_DMA_USB_W2FC_TX0 29
181#define OMAP_DMA_USB_W2FC_TX1 30
182#define OMAP_DMA_USB_W2FC_TX2 31
183
184/* These are only for 1610 */
185#define OMAP_DMA_CRYPTO_DES_IN 32
186#define OMAP_DMA_SPI_TX 33
187#define OMAP_DMA_SPI_RX 34
188#define OMAP_DMA_CRYPTO_HASH 35
189#define OMAP_DMA_CCP_ATTN 36
190#define OMAP_DMA_CCP_FIFO_NOT_EMPTY 37
191#define OMAP_DMA_CMT_APE_TX_CHAN_0 38
192#define OMAP_DMA_CMT_APE_RV_CHAN_0 39
193#define OMAP_DMA_CMT_APE_TX_CHAN_1 40
194#define OMAP_DMA_CMT_APE_RV_CHAN_1 41
195#define OMAP_DMA_CMT_APE_TX_CHAN_2 42
196#define OMAP_DMA_CMT_APE_RV_CHAN_2 43
197#define OMAP_DMA_CMT_APE_TX_CHAN_3 44
198#define OMAP_DMA_CMT_APE_RV_CHAN_3 45
199#define OMAP_DMA_CMT_APE_TX_CHAN_4 46
200#define OMAP_DMA_CMT_APE_RV_CHAN_4 47
201#define OMAP_DMA_CMT_APE_TX_CHAN_5 48
202#define OMAP_DMA_CMT_APE_RV_CHAN_5 49
203#define OMAP_DMA_CMT_APE_TX_CHAN_6 50
204#define OMAP_DMA_CMT_APE_RV_CHAN_6 51
205#define OMAP_DMA_CMT_APE_TX_CHAN_7 52
206#define OMAP_DMA_CMT_APE_RV_CHAN_7 53
207#define OMAP_DMA_MMC2_TX 54
208#define OMAP_DMA_MMC2_RX 55
209#define OMAP_DMA_CRYPTO_DES_OUT 56
210
211/* DMA channels for 24xx */
212#define OMAP24XX_DMA_NO_DEVICE 0
213#define OMAP24XX_DMA_XTI_DMA 1 /* S_DMA_0 */
214#define OMAP24XX_DMA_EXT_DMAREQ0 2 /* S_DMA_1 */
215#define OMAP24XX_DMA_EXT_DMAREQ1 3 /* S_DMA_2 */
216#define OMAP24XX_DMA_GPMC 4 /* S_DMA_3 */
217#define OMAP24XX_DMA_GFX 5 /* S_DMA_4 */
218#define OMAP24XX_DMA_DSS 6 /* S_DMA_5 */
219#define OMAP242X_DMA_VLYNQ_TX 7 /* S_DMA_6 */
220#define OMAP24XX_DMA_EXT_DMAREQ2 7 /* S_DMA_6 */
221#define OMAP24XX_DMA_CWT 8 /* S_DMA_7 */
222#define OMAP24XX_DMA_AES_TX 9 /* S_DMA_8 */
223#define OMAP24XX_DMA_AES_RX 10 /* S_DMA_9 */
224#define OMAP24XX_DMA_DES_TX 11 /* S_DMA_10 */
225#define OMAP24XX_DMA_DES_RX 12 /* S_DMA_11 */
226#define OMAP24XX_DMA_SHA1MD5_RX 13 /* S_DMA_12 */
227#define OMAP34XX_DMA_SHA2MD5_RX 13 /* S_DMA_12 */
228#define OMAP242X_DMA_EXT_DMAREQ2 14 /* S_DMA_13 */
229#define OMAP242X_DMA_EXT_DMAREQ3 15 /* S_DMA_14 */
230#define OMAP242X_DMA_EXT_DMAREQ4 16 /* S_DMA_15 */
231#define OMAP242X_DMA_EAC_AC_RD 17 /* S_DMA_16 */
232#define OMAP242X_DMA_EAC_AC_WR 18 /* S_DMA_17 */
233#define OMAP242X_DMA_EAC_MD_UL_RD 19 /* S_DMA_18 */
234#define OMAP242X_DMA_EAC_MD_UL_WR 20 /* S_DMA_19 */
235#define OMAP242X_DMA_EAC_MD_DL_RD 21 /* S_DMA_20 */
236#define OMAP242X_DMA_EAC_MD_DL_WR 22 /* S_DMA_21 */
237#define OMAP242X_DMA_EAC_BT_UL_RD 23 /* S_DMA_22 */
238#define OMAP242X_DMA_EAC_BT_UL_WR 24 /* S_DMA_23 */
239#define OMAP242X_DMA_EAC_BT_DL_RD 25 /* S_DMA_24 */
240#define OMAP242X_DMA_EAC_BT_DL_WR 26 /* S_DMA_25 */
241#define OMAP243X_DMA_EXT_DMAREQ3 14 /* S_DMA_13 */
242#define OMAP24XX_DMA_SPI3_TX0 15 /* S_DMA_14 */
243#define OMAP24XX_DMA_SPI3_RX0 16 /* S_DMA_15 */
244#define OMAP24XX_DMA_MCBSP3_TX 17 /* S_DMA_16 */
245#define OMAP24XX_DMA_MCBSP3_RX 18 /* S_DMA_17 */
246#define OMAP24XX_DMA_MCBSP4_TX 19 /* S_DMA_18 */
247#define OMAP24XX_DMA_MCBSP4_RX 20 /* S_DMA_19 */
248#define OMAP24XX_DMA_MCBSP5_TX 21 /* S_DMA_20 */
249#define OMAP24XX_DMA_MCBSP5_RX 22 /* S_DMA_21 */
250#define OMAP24XX_DMA_SPI3_TX1 23 /* S_DMA_22 */
251#define OMAP24XX_DMA_SPI3_RX1 24 /* S_DMA_23 */
252#define OMAP243X_DMA_EXT_DMAREQ4 25 /* S_DMA_24 */
253#define OMAP243X_DMA_EXT_DMAREQ5 26 /* S_DMA_25 */
254#define OMAP34XX_DMA_I2C3_TX 25 /* S_DMA_24 */
255#define OMAP34XX_DMA_I2C3_RX 26 /* S_DMA_25 */
256#define OMAP24XX_DMA_I2C1_TX 27 /* S_DMA_26 */
257#define OMAP24XX_DMA_I2C1_RX 28 /* S_DMA_27 */
258#define OMAP24XX_DMA_I2C2_TX 29 /* S_DMA_28 */
259#define OMAP24XX_DMA_I2C2_RX 30 /* S_DMA_29 */
260#define OMAP24XX_DMA_MCBSP1_TX 31 /* S_DMA_30 */
261#define OMAP24XX_DMA_MCBSP1_RX 32 /* S_DMA_31 */
262#define OMAP24XX_DMA_MCBSP2_TX 33 /* S_DMA_32 */
263#define OMAP24XX_DMA_MCBSP2_RX 34 /* S_DMA_33 */
264#define OMAP24XX_DMA_SPI1_TX0 35 /* S_DMA_34 */
265#define OMAP24XX_DMA_SPI1_RX0 36 /* S_DMA_35 */
266#define OMAP24XX_DMA_SPI1_TX1 37 /* S_DMA_36 */
267#define OMAP24XX_DMA_SPI1_RX1 38 /* S_DMA_37 */
268#define OMAP24XX_DMA_SPI1_TX2 39 /* S_DMA_38 */
269#define OMAP24XX_DMA_SPI1_RX2 40 /* S_DMA_39 */
270#define OMAP24XX_DMA_SPI1_TX3 41 /* S_DMA_40 */
271#define OMAP24XX_DMA_SPI1_RX3 42 /* S_DMA_41 */
272#define OMAP24XX_DMA_SPI2_TX0 43 /* S_DMA_42 */
273#define OMAP24XX_DMA_SPI2_RX0 44 /* S_DMA_43 */
274#define OMAP24XX_DMA_SPI2_TX1 45 /* S_DMA_44 */
275#define OMAP24XX_DMA_SPI2_RX1 46 /* S_DMA_45 */
276#define OMAP24XX_DMA_MMC2_TX 47 /* S_DMA_46 */
277#define OMAP24XX_DMA_MMC2_RX 48 /* S_DMA_47 */
278#define OMAP24XX_DMA_UART1_TX 49 /* S_DMA_48 */
279#define OMAP24XX_DMA_UART1_RX 50 /* S_DMA_49 */
280#define OMAP24XX_DMA_UART2_TX 51 /* S_DMA_50 */
281#define OMAP24XX_DMA_UART2_RX 52 /* S_DMA_51 */
282#define OMAP24XX_DMA_UART3_TX 53 /* S_DMA_52 */
283#define OMAP24XX_DMA_UART3_RX 54 /* S_DMA_53 */
284#define OMAP24XX_DMA_USB_W2FC_TX0 55 /* S_DMA_54 */
285#define OMAP24XX_DMA_USB_W2FC_RX0 56 /* S_DMA_55 */
286#define OMAP24XX_DMA_USB_W2FC_TX1 57 /* S_DMA_56 */
287#define OMAP24XX_DMA_USB_W2FC_RX1 58 /* S_DMA_57 */
288#define OMAP24XX_DMA_USB_W2FC_TX2 59 /* S_DMA_58 */
289#define OMAP24XX_DMA_USB_W2FC_RX2 60 /* S_DMA_59 */
290#define OMAP24XX_DMA_MMC1_TX 61 /* S_DMA_60 */
291#define OMAP24XX_DMA_MMC1_RX 62 /* S_DMA_61 */
292#define OMAP24XX_DMA_MS 63 /* S_DMA_62 */
293#define OMAP242X_DMA_EXT_DMAREQ5 64 /* S_DMA_63 */
294#define OMAP243X_DMA_EXT_DMAREQ6 64 /* S_DMA_63 */
295#define OMAP34XX_DMA_EXT_DMAREQ3 64 /* S_DMA_63 */
296#define OMAP34XX_DMA_AES2_TX 65 /* S_DMA_64 */
297#define OMAP34XX_DMA_AES2_RX 66 /* S_DMA_65 */
298#define OMAP34XX_DMA_DES2_TX 67 /* S_DMA_66 */
299#define OMAP34XX_DMA_DES2_RX 68 /* S_DMA_67 */
300#define OMAP34XX_DMA_SHA1MD5_RX 69 /* S_DMA_68 */
301#define OMAP34XX_DMA_SPI4_TX0 70 /* S_DMA_69 */
302#define OMAP34XX_DMA_SPI4_RX0 71 /* S_DMA_70 */
303#define OMAP34XX_DSS_DMA0 72 /* S_DMA_71 */
304#define OMAP34XX_DSS_DMA1 73 /* S_DMA_72 */
305#define OMAP34XX_DSS_DMA2 74 /* S_DMA_73 */
306#define OMAP34XX_DSS_DMA3 75 /* S_DMA_74 */
307#define OMAP34XX_DMA_MMC3_TX 77 /* S_DMA_76 */
308#define OMAP34XX_DMA_MMC3_RX 78 /* S_DMA_77 */
309#define OMAP34XX_DMA_USIM_TX 79 /* S_DMA_78 */
310#define OMAP34XX_DMA_USIM_RX 80 /* S_DMA_79 */
311
312/*----------------------------------------------------------------------------*/
313
314/* Hardware registers for LCD DMA */
315#define OMAP1510_DMA_LCD_BASE (0xfffedb00)
316#define OMAP1510_DMA_LCD_CTRL (OMAP1510_DMA_LCD_BASE + 0x00)
317#define OMAP1510_DMA_LCD_TOP_F1_L (OMAP1510_DMA_LCD_BASE + 0x02)
318#define OMAP1510_DMA_LCD_TOP_F1_U (OMAP1510_DMA_LCD_BASE + 0x04)
319#define OMAP1510_DMA_LCD_BOT_F1_L (OMAP1510_DMA_LCD_BASE + 0x06)
320#define OMAP1510_DMA_LCD_BOT_F1_U (OMAP1510_DMA_LCD_BASE + 0x08)
321
322#define OMAP1610_DMA_LCD_BASE (0xfffee300)
323#define OMAP1610_DMA_LCD_CSDP (OMAP1610_DMA_LCD_BASE + 0xc0)
324#define OMAP1610_DMA_LCD_CCR (OMAP1610_DMA_LCD_BASE + 0xc2)
325#define OMAP1610_DMA_LCD_CTRL (OMAP1610_DMA_LCD_BASE + 0xc4)
326#define OMAP1610_DMA_LCD_TOP_B1_L (OMAP1610_DMA_LCD_BASE + 0xc8)
327#define OMAP1610_DMA_LCD_TOP_B1_U (OMAP1610_DMA_LCD_BASE + 0xca)
328#define OMAP1610_DMA_LCD_BOT_B1_L (OMAP1610_DMA_LCD_BASE + 0xcc)
329#define OMAP1610_DMA_LCD_BOT_B1_U (OMAP1610_DMA_LCD_BASE + 0xce)
330#define OMAP1610_DMA_LCD_TOP_B2_L (OMAP1610_DMA_LCD_BASE + 0xd0)
331#define OMAP1610_DMA_LCD_TOP_B2_U (OMAP1610_DMA_LCD_BASE + 0xd2)
332#define OMAP1610_DMA_LCD_BOT_B2_L (OMAP1610_DMA_LCD_BASE + 0xd4)
333#define OMAP1610_DMA_LCD_BOT_B2_U (OMAP1610_DMA_LCD_BASE + 0xd6)
334#define OMAP1610_DMA_LCD_SRC_EI_B1 (OMAP1610_DMA_LCD_BASE + 0xd8)
335#define OMAP1610_DMA_LCD_SRC_FI_B1_L (OMAP1610_DMA_LCD_BASE + 0xda)
336#define OMAP1610_DMA_LCD_SRC_EN_B1 (OMAP1610_DMA_LCD_BASE + 0xe0)
337#define OMAP1610_DMA_LCD_SRC_FN_B1 (OMAP1610_DMA_LCD_BASE + 0xe4)
338#define OMAP1610_DMA_LCD_LCH_CTRL (OMAP1610_DMA_LCD_BASE + 0xea)
339#define OMAP1610_DMA_LCD_SRC_FI_B1_U (OMAP1610_DMA_LCD_BASE + 0xf4)
340
341#define OMAP1_DMA_TOUT_IRQ (1 << 0)
342#define OMAP_DMA_DROP_IRQ (1 << 1)
343#define OMAP_DMA_HALF_IRQ (1 << 2)
344#define OMAP_DMA_FRAME_IRQ (1 << 3)
345#define OMAP_DMA_LAST_IRQ (1 << 4)
346#define OMAP_DMA_BLOCK_IRQ (1 << 5)
347#define OMAP1_DMA_SYNC_IRQ (1 << 6)
348#define OMAP2_DMA_PKT_IRQ (1 << 7)
349#define OMAP2_DMA_TRANS_ERR_IRQ (1 << 8)
350#define OMAP2_DMA_SECURE_ERR_IRQ (1 << 9)
351#define OMAP2_DMA_SUPERVISOR_ERR_IRQ (1 << 10)
352#define OMAP2_DMA_MISALIGNED_ERR_IRQ (1 << 11)
353
354#define OMAP_DMA_DATA_TYPE_S8 0x00
355#define OMAP_DMA_DATA_TYPE_S16 0x01
356#define OMAP_DMA_DATA_TYPE_S32 0x02
357
358#define OMAP_DMA_SYNC_ELEMENT 0x00
359#define OMAP_DMA_SYNC_FRAME 0x01
360#define OMAP_DMA_SYNC_BLOCK 0x02
361#define OMAP_DMA_SYNC_PACKET 0x03
362
363#define OMAP_DMA_SRC_SYNC 0x01
364#define OMAP_DMA_DST_SYNC 0x00
365
366#define OMAP_DMA_PORT_EMIFF 0x00
367#define OMAP_DMA_PORT_EMIFS 0x01
368#define OMAP_DMA_PORT_OCP_T1 0x02
369#define OMAP_DMA_PORT_TIPB 0x03
370#define OMAP_DMA_PORT_OCP_T2 0x04
371#define OMAP_DMA_PORT_MPUI 0x05
372
373#define OMAP_DMA_AMODE_CONSTANT 0x00
374#define OMAP_DMA_AMODE_POST_INC 0x01
375#define OMAP_DMA_AMODE_SINGLE_IDX 0x02
376#define OMAP_DMA_AMODE_DOUBLE_IDX 0x03
377
378#define DMA_DEFAULT_FIFO_DEPTH 0x10
379#define DMA_DEFAULT_ARB_RATE 0x01
380/* Pass THREAD_RESERVE ORed with THREAD_FIFO for tparams */
381#define DMA_THREAD_RESERVE_NORM (0x00 << 12) /* Def */
382#define DMA_THREAD_RESERVE_ONET (0x01 << 12)
383#define DMA_THREAD_RESERVE_TWOT (0x02 << 12)
384#define DMA_THREAD_RESERVE_THREET (0x03 << 12)
385#define DMA_THREAD_FIFO_NONE (0x00 << 14) /* Def */
386#define DMA_THREAD_FIFO_75 (0x01 << 14)
387#define DMA_THREAD_FIFO_25 (0x02 << 14)
388#define DMA_THREAD_FIFO_50 (0x03 << 14)
389
390/* Chaining modes*/
391#ifndef CONFIG_ARCH_OMAP1
392#define OMAP_DMA_STATIC_CHAIN 0x1
393#define OMAP_DMA_DYNAMIC_CHAIN 0x2
394#define OMAP_DMA_CHAIN_ACTIVE 0x1
395#define OMAP_DMA_CHAIN_INACTIVE 0x0
396#endif
397
398#define DMA_CH_PRIO_HIGH 0x1
399#define DMA_CH_PRIO_LOW 0x0 /* Def */
400
401/* LCD DMA block numbers */
402enum {
403 OMAP_LCD_DMA_B1_TOP,
404 OMAP_LCD_DMA_B1_BOTTOM,
405 OMAP_LCD_DMA_B2_TOP,
406 OMAP_LCD_DMA_B2_BOTTOM
407};
408
409enum omap_dma_burst_mode {
410 OMAP_DMA_DATA_BURST_DIS = 0,
411 OMAP_DMA_DATA_BURST_4,
412 OMAP_DMA_DATA_BURST_8,
413 OMAP_DMA_DATA_BURST_16,
414};
415
416enum end_type {
417 OMAP_DMA_LITTLE_ENDIAN = 0,
418 OMAP_DMA_BIG_ENDIAN
419};
420
421enum omap_dma_color_mode {
422 OMAP_DMA_COLOR_DIS = 0,
423 OMAP_DMA_CONSTANT_FILL,
424 OMAP_DMA_TRANSPARENT_COPY
425};
426
427enum omap_dma_write_mode {
428 OMAP_DMA_WRITE_NON_POSTED = 0,
429 OMAP_DMA_WRITE_POSTED,
430 OMAP_DMA_WRITE_LAST_NON_POSTED
431};
432
433enum omap_dma_channel_mode {
434 OMAP_DMA_LCH_2D = 0,
435 OMAP_DMA_LCH_G,
436 OMAP_DMA_LCH_P,
437 OMAP_DMA_LCH_PD
438};
439
440struct omap_dma_channel_params {
441 int data_type; /* data type 8,16,32 */
442 int elem_count; /* number of elements in a frame */
443 int frame_count; /* number of frames in a element */
444
445 int src_port; /* Only on OMAP1 REVISIT: Is this needed? */
446 int src_amode; /* constant, post increment, indexed,
447 double indexed */
448 unsigned long src_start; /* source address : physical */
449 int src_ei; /* source element index */
450 int src_fi; /* source frame index */
451
452 int dst_port; /* Only on OMAP1 REVISIT: Is this needed? */
453 int dst_amode; /* constant, post increment, indexed,
454 double indexed */
455 unsigned long dst_start; /* source address : physical */
456 int dst_ei; /* source element index */
457 int dst_fi; /* source frame index */
458
459 int trigger; /* trigger attached if the channel is
460 synchronized */
461 int sync_mode; /* sycn on element, frame , block or packet */
462 int src_or_dst_synch; /* source synch(1) or destination synch(0) */
463
464 int ie; /* interrupt enabled */
465
466 unsigned char read_prio;/* read priority */
467 unsigned char write_prio;/* write priority */
468
469#ifndef CONFIG_ARCH_OMAP1
470 enum omap_dma_burst_mode burst_mode; /* Burst mode 4/8/16 words */
471#endif
472};
473
474
475extern void omap_set_dma_priority(int lch, int dst_port, int priority);
476extern int omap_request_dma(int dev_id, const char *dev_name,
477 void (*callback)(int lch, u16 ch_status, void *data),
478 void *data, int *dma_ch);
479extern void omap_enable_dma_irq(int ch, u16 irq_bits);
480extern void omap_disable_dma_irq(int ch, u16 irq_bits);
481extern void omap_free_dma(int ch);
482extern void omap_start_dma(int lch);
483extern void omap_stop_dma(int lch);
484extern void omap_set_dma_transfer_params(int lch, int data_type,
485 int elem_count, int frame_count,
486 int sync_mode,
487 int dma_trigger, int src_or_dst_synch);
488extern void omap_set_dma_color_mode(int lch, enum omap_dma_color_mode mode,
489 u32 color);
490extern void omap_set_dma_write_mode(int lch, enum omap_dma_write_mode mode);
491extern void omap_set_dma_channel_mode(int lch, enum omap_dma_channel_mode mode);
492
493extern void omap_set_dma_src_params(int lch, int src_port, int src_amode,
494 unsigned long src_start,
495 int src_ei, int src_fi);
496extern void omap_set_dma_src_index(int lch, int eidx, int fidx);
497extern void omap_set_dma_src_data_pack(int lch, int enable);
498extern void omap_set_dma_src_burst_mode(int lch,
499 enum omap_dma_burst_mode burst_mode);
500
501extern void omap_set_dma_dest_params(int lch, int dest_port, int dest_amode,
502 unsigned long dest_start,
503 int dst_ei, int dst_fi);
504extern void omap_set_dma_dest_index(int lch, int eidx, int fidx);
505extern void omap_set_dma_dest_data_pack(int lch, int enable);
506extern void omap_set_dma_dest_burst_mode(int lch,
507 enum omap_dma_burst_mode burst_mode);
508
509extern void omap_set_dma_params(int lch,
510 struct omap_dma_channel_params *params);
511
512extern void omap_dma_link_lch(int lch_head, int lch_queue);
513extern void omap_dma_unlink_lch(int lch_head, int lch_queue);
514
515extern int omap_set_dma_callback(int lch,
516 void (*callback)(int lch, u16 ch_status, void *data),
517 void *data);
518extern dma_addr_t omap_get_dma_src_pos(int lch);
519extern dma_addr_t omap_get_dma_dst_pos(int lch);
520extern void omap_clear_dma(int lch);
521extern int omap_get_dma_active_status(int lch);
522extern int omap_dma_running(void);
523extern void omap_dma_set_global_params(int arb_rate, int max_fifo_depth,
524 int tparams);
525extern int omap_dma_set_prio_lch(int lch, unsigned char read_prio,
526 unsigned char write_prio);
527extern void omap_set_dma_dst_endian_type(int lch, enum end_type etype);
528extern void omap_set_dma_src_endian_type(int lch, enum end_type etype);
529extern int omap_get_dma_index(int lch, int *ei, int *fi);
530
531/* Chaining APIs */
532#ifndef CONFIG_ARCH_OMAP1
533extern int omap_request_dma_chain(int dev_id, const char *dev_name,
534 void (*callback) (int chain_id, u16 ch_status,
535 void *data),
536 int *chain_id, int no_of_chans,
537 int chain_mode,
538 struct omap_dma_channel_params params);
539extern int omap_free_dma_chain(int chain_id);
540extern int omap_dma_chain_a_transfer(int chain_id, int src_start,
541 int dest_start, int elem_count,
542 int frame_count, void *callbk_data);
543extern int omap_start_dma_chain_transfers(int chain_id);
544extern int omap_stop_dma_chain_transfers(int chain_id);
545extern int omap_get_dma_chain_index(int chain_id, int *ei, int *fi);
546extern int omap_get_dma_chain_dst_pos(int chain_id);
547extern int omap_get_dma_chain_src_pos(int chain_id);
548
549extern int omap_modify_dma_chain_params(int chain_id,
550 struct omap_dma_channel_params params);
551extern int omap_dma_chain_status(int chain_id);
552#endif
553
554/* LCD DMA functions */
555extern int omap_request_lcd_dma(void (*callback)(u16 status, void *data),
556 void *data);
557extern void omap_free_lcd_dma(void);
558extern void omap_setup_lcd_dma(void);
559extern void omap_enable_lcd_dma(void);
560extern void omap_stop_lcd_dma(void);
561extern void omap_set_lcd_dma_ext_controller(int external);
562extern void omap_set_lcd_dma_single_transfer(int single);
563extern void omap_set_lcd_dma_b1(unsigned long addr, u16 fb_xres, u16 fb_yres,
564 int data_type);
565extern void omap_set_lcd_dma_b1_rotation(int rotate);
566extern void omap_set_lcd_dma_b1_vxres(unsigned long vxres);
567extern void omap_set_lcd_dma_b1_mirror(int mirror);
568extern void omap_set_lcd_dma_b1_scale(unsigned int xscale, unsigned int yscale);
569
570#endif /* __ASM_ARCH_DMA_H */
diff --git a/include/asm-arm/arch-omap/dmtimer.h b/include/asm-arm/arch-omap/dmtimer.h
deleted file mode 100644
index 02b29e8437ae..000000000000
--- a/include/asm-arm/arch-omap/dmtimer.h
+++ /dev/null
@@ -1,84 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-omap/dmtimer.h
3 *
4 * OMAP Dual-Mode Timers
5 *
6 * Copyright (C) 2005 Nokia Corporation
7 * Author: Lauri Leukkunen <lauri.leukkunen@nokia.com>
8 * PWM and clock framwork support by Timo Teras.
9 *
10 * This program is free software; you can redistribute it and/or modify it
11 * under the terms of the GNU General Public License as published by the
12 * Free Software Foundation; either version 2 of the License, or (at your
13 * option) any later version.
14 *
15 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
16 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
17 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
18 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23 *
24 * You should have received a copy of the GNU General Public License along
25 * with this program; if not, write to the Free Software Foundation, Inc.,
26 * 675 Mass Ave, Cambridge, MA 02139, USA.
27 */
28
29#ifndef __ASM_ARCH_DMTIMER_H
30#define __ASM_ARCH_DMTIMER_H
31
32/* clock sources */
33#define OMAP_TIMER_SRC_SYS_CLK 0x00
34#define OMAP_TIMER_SRC_32_KHZ 0x01
35#define OMAP_TIMER_SRC_EXT_CLK 0x02
36
37/* timer interrupt enable bits */
38#define OMAP_TIMER_INT_CAPTURE (1 << 2)
39#define OMAP_TIMER_INT_OVERFLOW (1 << 1)
40#define OMAP_TIMER_INT_MATCH (1 << 0)
41
42/* trigger types */
43#define OMAP_TIMER_TRIGGER_NONE 0x00
44#define OMAP_TIMER_TRIGGER_OVERFLOW 0x01
45#define OMAP_TIMER_TRIGGER_OVERFLOW_AND_COMPARE 0x02
46
47struct omap_dm_timer;
48struct clk;
49
50int omap_dm_timer_init(void);
51
52struct omap_dm_timer *omap_dm_timer_request(void);
53struct omap_dm_timer *omap_dm_timer_request_specific(int timer_id);
54void omap_dm_timer_free(struct omap_dm_timer *timer);
55void omap_dm_timer_enable(struct omap_dm_timer *timer);
56void omap_dm_timer_disable(struct omap_dm_timer *timer);
57
58int omap_dm_timer_get_irq(struct omap_dm_timer *timer);
59
60u32 omap_dm_timer_modify_idlect_mask(u32 inputmask);
61struct clk *omap_dm_timer_get_fclk(struct omap_dm_timer *timer);
62
63void omap_dm_timer_trigger(struct omap_dm_timer *timer);
64void omap_dm_timer_start(struct omap_dm_timer *timer);
65void omap_dm_timer_stop(struct omap_dm_timer *timer);
66
67void omap_dm_timer_set_source(struct omap_dm_timer *timer, int source);
68void omap_dm_timer_set_load(struct omap_dm_timer *timer, int autoreload, unsigned int value);
69void omap_dm_timer_set_load_start(struct omap_dm_timer *timer, int autoreload, unsigned int value);
70void omap_dm_timer_set_match(struct omap_dm_timer *timer, int enable, unsigned int match);
71void omap_dm_timer_set_pwm(struct omap_dm_timer *timer, int def_on, int toggle, int trigger);
72void omap_dm_timer_set_prescaler(struct omap_dm_timer *timer, int prescaler);
73
74void omap_dm_timer_set_int_enable(struct omap_dm_timer *timer, unsigned int value);
75
76unsigned int omap_dm_timer_read_status(struct omap_dm_timer *timer);
77void omap_dm_timer_write_status(struct omap_dm_timer *timer, unsigned int value);
78unsigned int omap_dm_timer_read_counter(struct omap_dm_timer *timer);
79void omap_dm_timer_write_counter(struct omap_dm_timer *timer, unsigned int value);
80
81int omap_dm_timers_active(void);
82
83
84#endif /* __ASM_ARCH_DMTIMER_H */
diff --git a/include/asm-arm/arch-omap/eac.h b/include/asm-arm/arch-omap/eac.h
deleted file mode 100644
index ccee3b0700b3..000000000000
--- a/include/asm-arm/arch-omap/eac.h
+++ /dev/null
@@ -1,100 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-omap2/eac.h
3 *
4 * Defines for Enhanced Audio Controller
5 *
6 * Contact: Jarkko Nikula <jarkko.nikula@nokia.com>
7 *
8 * Copyright (C) 2006 Nokia Corporation
9 * Copyright (C) 2004 Texas Instruments, Inc.
10 *
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License
13 * version 2 as published by the Free Software Foundation.
14 *
15 * This program is distributed in the hope that it will be useful, but
16 * WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
23 * 02110-1301 USA
24 *
25 */
26
27#ifndef __ASM_ARM_ARCH_OMAP2_EAC_H
28#define __ASM_ARM_ARCH_OMAP2_EAC_H
29
30#include <asm/arch/io.h>
31#include <asm/arch/hardware.h>
32#include <asm/irq.h>
33
34#include <sound/core.h>
35
36/* master codec clock source */
37#define EAC_MCLK_EXT_MASK 0x100
38enum eac_mclk_src {
39 EAC_MCLK_INT_11290000, /* internal 96 MHz / 8.5 = 11.29 Mhz */
40 EAC_MCLK_EXT_11289600 = EAC_MCLK_EXT_MASK,
41 EAC_MCLK_EXT_12288000,
42 EAC_MCLK_EXT_2x11289600,
43 EAC_MCLK_EXT_2x12288000,
44};
45
46/* codec port interface mode */
47enum eac_codec_mode {
48 EAC_CODEC_PCM,
49 EAC_CODEC_AC97,
50 EAC_CODEC_I2S_MASTER, /* codec port, I.e. EAC is the master */
51 EAC_CODEC_I2S_SLAVE,
52};
53
54/* configuration structure for I2S mode */
55struct eac_i2s_conf {
56 /* if enabled, then first data slot (left channel) is signaled as
57 * positive level of frame sync EAC.AC_FS */
58 unsigned polarity_changed_mode:1;
59 /* if enabled, then serial data starts one clock cycle after the
60 * of EAC.AC_FS for first audio slot */
61 unsigned sync_delay_enable:1;
62};
63
64/* configuration structure for EAC codec port */
65struct eac_codec {
66 enum eac_mclk_src mclk_src;
67
68 enum eac_codec_mode codec_mode;
69 union {
70 struct eac_i2s_conf i2s;
71 } codec_conf;
72
73 int default_rate; /* audio sampling rate */
74
75 int (* set_power)(void *private_data, int dac, int adc);
76 int (* register_controls)(void *private_data,
77 struct snd_card *card);
78 const char *short_name;
79
80 void *private_data;
81};
82
83/* structure for passing platform dependent data to the EAC driver */
84struct eac_platform_data {
85 int (* init)(struct device *eac_dev);
86 void (* cleanup)(struct device *eac_dev);
87 /* these callbacks are used to configure & control external MCLK
88 * source. NULL if not used */
89 int (* enable_ext_clocks)(struct device *eac_dev);
90 void (* disable_ext_clocks)(struct device *eac_dev);
91};
92
93extern void omap_init_eac(struct eac_platform_data *pdata);
94
95extern int eac_register_codec(struct device *eac_dev, struct eac_codec *codec);
96extern void eac_unregister_codec(struct device *eac_dev);
97
98extern int eac_set_mode(struct device *eac_dev, int play, int rec);
99
100#endif /* __ASM_ARM_ARCH_OMAP2_EAC_H */
diff --git a/include/asm-arm/arch-omap/entry-macro.S b/include/asm-arm/arch-omap/entry-macro.S
deleted file mode 100644
index 369093a45fcf..000000000000
--- a/include/asm-arm/arch-omap/entry-macro.S
+++ /dev/null
@@ -1,89 +0,0 @@
1/*
2 * include/asm-arm/arch-omap/entry-macro.S
3 *
4 * Low-level IRQ helper macros for OMAP-based platforms
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10#include <asm/hardware.h>
11#include <asm/arch/io.h>
12#include <asm/arch/irqs.h>
13
14#if defined(CONFIG_ARCH_OMAP1)
15
16#if defined(CONFIG_ARCH_OMAP730) && \
17 (defined(CONFIG_ARCH_OMAP15XX) || defined(CONFIG_ARCH_OMAP16XX))
18#error "FIXME: OMAP730 doesn't support multiple-OMAP"
19#elif defined(CONFIG_ARCH_OMAP730)
20#define INT_IH2_IRQ INT_730_IH2_IRQ
21#elif defined(CONFIG_ARCH_OMAP15XX)
22#define INT_IH2_IRQ INT_1510_IH2_IRQ
23#elif defined(CONFIG_ARCH_OMAP16XX)
24#define INT_IH2_IRQ INT_1610_IH2_IRQ
25#else
26#warning "IH2 IRQ defaulted"
27#define INT_IH2_IRQ INT_1510_IH2_IRQ
28#endif
29
30 .macro disable_fiq
31 .endm
32
33 .macro get_irqnr_preamble, base, tmp
34 .endm
35
36 .macro arch_ret_to_user, tmp1, tmp2
37 .endm
38
39 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
40 ldr \base, =IO_ADDRESS(OMAP_IH1_BASE)
41 ldr \irqnr, [\base, #IRQ_ITR_REG_OFFSET]
42 ldr \tmp, [\base, #IRQ_MIR_REG_OFFSET]
43 mov \irqstat, #0xffffffff
44 bic \tmp, \irqstat, \tmp
45 tst \irqnr, \tmp
46 beq 1510f
47
48 ldr \irqnr, [\base, #IRQ_SIR_FIQ_REG_OFFSET]
49 cmp \irqnr, #0
50 ldreq \irqnr, [\base, #IRQ_SIR_IRQ_REG_OFFSET]
51 cmpeq \irqnr, #INT_IH2_IRQ
52 ldreq \base, =IO_ADDRESS(OMAP_IH2_BASE)
53 ldreq \irqnr, [\base, #IRQ_SIR_IRQ_REG_OFFSET]
54 addeqs \irqnr, \irqnr, #32
551510:
56 .endm
57
58#elif defined(CONFIG_ARCH_OMAP24XX)
59
60#include <asm/arch/omap24xx.h>
61
62 .macro disable_fiq
63 .endm
64
65 .macro get_irqnr_preamble, base, tmp
66 .endm
67
68 .macro arch_ret_to_user, tmp1, tmp2
69 .endm
70
71 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
72 ldr \base, =OMAP2_VA_IC_BASE
73 ldr \irqnr, [\base, #0x98] /* IRQ pending reg 1 */
74 cmp \irqnr, #0x0
75 bne 2222f
76 ldr \irqnr, [\base, #0xb8] /* IRQ pending reg 2 */
77 cmp \irqnr, #0x0
78 bne 2222f
79 ldr \irqnr, [\base, #0xd8] /* IRQ pending reg 3 */
80 cmp \irqnr, #0x0
812222:
82 ldrne \irqnr, [\base, #IRQ_SIR_IRQ]
83
84 .endm
85
86 .macro irq_prio_table
87 .endm
88
89#endif
diff --git a/include/asm-arm/arch-omap/fpga.h b/include/asm-arm/arch-omap/fpga.h
deleted file mode 100644
index f420881d2a3b..000000000000
--- a/include/asm-arm/arch-omap/fpga.h
+++ /dev/null
@@ -1,197 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-omap/fpga.h
3 *
4 * Interrupt handler for OMAP-1510 FPGA
5 *
6 * Copyright (C) 2001 RidgeRun, Inc.
7 * Author: Greg Lonnon <glonnon@ridgerun.com>
8 *
9 * Copyright (C) 2002 MontaVista Software, Inc.
10 *
11 * Separated FPGA interrupts from innovator1510.c and cleaned up for 2.6
12 * Copyright (C) 2004 Nokia Corporation by Tony Lindrgen <tony@atomide.com>
13 *
14 * This program is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License version 2 as
16 * published by the Free Software Foundation.
17 */
18
19#ifndef __ASM_ARCH_OMAP_FPGA_H
20#define __ASM_ARCH_OMAP_FPGA_H
21
22#if defined(CONFIG_MACH_OMAP_INNOVATOR) && defined(CONFIG_ARCH_OMAP15XX)
23extern void omap1510_fpga_init_irq(void);
24#else
25#define omap1510_fpga_init_irq() (0)
26#endif
27
28#define fpga_read(reg) __raw_readb(reg)
29#define fpga_write(val, reg) __raw_writeb(val, reg)
30
31/*
32 * ---------------------------------------------------------------------------
33 * H2/P2 Debug board FPGA
34 * ---------------------------------------------------------------------------
35 */
36/* maps in the FPGA registers and the ETHR registers */
37#define H2P2_DBG_FPGA_BASE 0xE8000000 /* VA */
38#define H2P2_DBG_FPGA_SIZE SZ_4K /* SIZE */
39#define H2P2_DBG_FPGA_START 0x04000000 /* PA */
40
41#define H2P2_DBG_FPGA_ETHR_START (H2P2_DBG_FPGA_START + 0x300)
42#define H2P2_DBG_FPGA_FPGA_REV (H2P2_DBG_FPGA_BASE + 0x10) /* FPGA Revision */
43#define H2P2_DBG_FPGA_BOARD_REV (H2P2_DBG_FPGA_BASE + 0x12) /* Board Revision */
44#define H2P2_DBG_FPGA_GPIO (H2P2_DBG_FPGA_BASE + 0x14) /* GPIO outputs */
45#define H2P2_DBG_FPGA_LEDS (H2P2_DBG_FPGA_BASE + 0x16) /* LEDs outputs */
46#define H2P2_DBG_FPGA_MISC_INPUTS (H2P2_DBG_FPGA_BASE + 0x18) /* Misc inputs */
47#define H2P2_DBG_FPGA_LAN_STATUS (H2P2_DBG_FPGA_BASE + 0x1A) /* LAN Status line */
48#define H2P2_DBG_FPGA_LAN_RESET (H2P2_DBG_FPGA_BASE + 0x1C) /* LAN Reset line */
49
50/* NOTE: most boards don't have a static mapping for the FPGA ... */
51struct h2p2_dbg_fpga {
52 /* offset 0x00 */
53 u16 smc91x[8];
54 /* offset 0x10 */
55 u16 fpga_rev;
56 u16 board_rev;
57 u16 gpio_outputs;
58 u16 leds;
59 /* offset 0x18 */
60 u16 misc_inputs;
61 u16 lan_status;
62 u16 lan_reset;
63 u16 reserved0;
64 /* offset 0x20 */
65 u16 ps2_data;
66 u16 ps2_ctrl;
67 /* plus also 4 rs232 ports ... */
68};
69
70/* LEDs definition on debug board (16 LEDs, all physically green) */
71#define H2P2_DBG_FPGA_LED_GREEN (1 << 15)
72#define H2P2_DBG_FPGA_LED_AMBER (1 << 14)
73#define H2P2_DBG_FPGA_LED_RED (1 << 13)
74#define H2P2_DBG_FPGA_LED_BLUE (1 << 12)
75/* cpu0 load-meter LEDs */
76#define H2P2_DBG_FPGA_LOAD_METER (1 << 0) // A bit of fun on our board ...
77#define H2P2_DBG_FPGA_LOAD_METER_SIZE 11
78#define H2P2_DBG_FPGA_LOAD_METER_MASK ((1 << H2P2_DBG_FPGA_LOAD_METER_SIZE) - 1)
79
80#define H2P2_DBG_FPGA_P2_LED_TIMER (1 << 0)
81#define H2P2_DBG_FPGA_P2_LED_IDLE (1 << 1)
82
83/*
84 * ---------------------------------------------------------------------------
85 * OMAP-1510 FPGA
86 * ---------------------------------------------------------------------------
87 */
88#define OMAP1510_FPGA_BASE 0xE8000000 /* Virtual */
89#define OMAP1510_FPGA_SIZE SZ_4K
90#define OMAP1510_FPGA_START 0x08000000 /* Physical */
91
92/* Revision */
93#define OMAP1510_FPGA_REV_LOW (OMAP1510_FPGA_BASE + 0x0)
94#define OMAP1510_FPGA_REV_HIGH (OMAP1510_FPGA_BASE + 0x1)
95
96#define OMAP1510_FPGA_LCD_PANEL_CONTROL (OMAP1510_FPGA_BASE + 0x2)
97#define OMAP1510_FPGA_LED_DIGIT (OMAP1510_FPGA_BASE + 0x3)
98#define INNOVATOR_FPGA_HID_SPI (OMAP1510_FPGA_BASE + 0x4)
99#define OMAP1510_FPGA_POWER (OMAP1510_FPGA_BASE + 0x5)
100
101/* Interrupt status */
102#define OMAP1510_FPGA_ISR_LO (OMAP1510_FPGA_BASE + 0x6)
103#define OMAP1510_FPGA_ISR_HI (OMAP1510_FPGA_BASE + 0x7)
104
105/* Interrupt mask */
106#define OMAP1510_FPGA_IMR_LO (OMAP1510_FPGA_BASE + 0x8)
107#define OMAP1510_FPGA_IMR_HI (OMAP1510_FPGA_BASE + 0x9)
108
109/* Reset registers */
110#define OMAP1510_FPGA_HOST_RESET (OMAP1510_FPGA_BASE + 0xa)
111#define OMAP1510_FPGA_RST (OMAP1510_FPGA_BASE + 0xb)
112
113#define OMAP1510_FPGA_AUDIO (OMAP1510_FPGA_BASE + 0xc)
114#define OMAP1510_FPGA_DIP (OMAP1510_FPGA_BASE + 0xe)
115#define OMAP1510_FPGA_FPGA_IO (OMAP1510_FPGA_BASE + 0xf)
116#define OMAP1510_FPGA_UART1 (OMAP1510_FPGA_BASE + 0x14)
117#define OMAP1510_FPGA_UART2 (OMAP1510_FPGA_BASE + 0x15)
118#define OMAP1510_FPGA_OMAP1510_STATUS (OMAP1510_FPGA_BASE + 0x16)
119#define OMAP1510_FPGA_BOARD_REV (OMAP1510_FPGA_BASE + 0x18)
120#define OMAP1510P1_PPT_DATA (OMAP1510_FPGA_BASE + 0x100)
121#define OMAP1510P1_PPT_STATUS (OMAP1510_FPGA_BASE + 0x101)
122#define OMAP1510P1_PPT_CONTROL (OMAP1510_FPGA_BASE + 0x102)
123
124#define OMAP1510_FPGA_TOUCHSCREEN (OMAP1510_FPGA_BASE + 0x204)
125
126#define INNOVATOR_FPGA_INFO (OMAP1510_FPGA_BASE + 0x205)
127#define INNOVATOR_FPGA_LCD_BRIGHT_LO (OMAP1510_FPGA_BASE + 0x206)
128#define INNOVATOR_FPGA_LCD_BRIGHT_HI (OMAP1510_FPGA_BASE + 0x207)
129#define INNOVATOR_FPGA_LED_GRN_LO (OMAP1510_FPGA_BASE + 0x208)
130#define INNOVATOR_FPGA_LED_GRN_HI (OMAP1510_FPGA_BASE + 0x209)
131#define INNOVATOR_FPGA_LED_RED_LO (OMAP1510_FPGA_BASE + 0x20a)
132#define INNOVATOR_FPGA_LED_RED_HI (OMAP1510_FPGA_BASE + 0x20b)
133#define INNOVATOR_FPGA_CAM_USB_CONTROL (OMAP1510_FPGA_BASE + 0x20c)
134#define INNOVATOR_FPGA_EXP_CONTROL (OMAP1510_FPGA_BASE + 0x20d)
135#define INNOVATOR_FPGA_ISR2 (OMAP1510_FPGA_BASE + 0x20e)
136#define INNOVATOR_FPGA_IMR2 (OMAP1510_FPGA_BASE + 0x210)
137
138#define OMAP1510_FPGA_ETHR_START (OMAP1510_FPGA_START + 0x300)
139
140/*
141 * Power up Giga UART driver, turn on HID clock.
142 * Turn off BT power, since we're not using it and it
143 * draws power.
144 */
145#define OMAP1510_FPGA_RESET_VALUE 0x42
146
147#define OMAP1510_FPGA_PCR_IF_PD0 (1 << 7)
148#define OMAP1510_FPGA_PCR_COM2_EN (1 << 6)
149#define OMAP1510_FPGA_PCR_COM1_EN (1 << 5)
150#define OMAP1510_FPGA_PCR_EXP_PD0 (1 << 4)
151#define OMAP1510_FPGA_PCR_EXP_PD1 (1 << 3)
152#define OMAP1510_FPGA_PCR_48MHZ_CLK (1 << 2)
153#define OMAP1510_FPGA_PCR_4MHZ_CLK (1 << 1)
154#define OMAP1510_FPGA_PCR_RSRVD_BIT0 (1 << 0)
155
156/*
157 * Innovator/OMAP1510 FPGA HID register bit definitions
158 */
159#define OMAP1510_FPGA_HID_SCLK (1<<0) /* output */
160#define OMAP1510_FPGA_HID_MOSI (1<<1) /* output */
161#define OMAP1510_FPGA_HID_nSS (1<<2) /* output 0/1 chip idle/select */
162#define OMAP1510_FPGA_HID_nHSUS (1<<3) /* output 0/1 host active/suspended */
163#define OMAP1510_FPGA_HID_MISO (1<<4) /* input */
164#define OMAP1510_FPGA_HID_ATN (1<<5) /* input 0/1 chip idle/ATN */
165#define OMAP1510_FPGA_HID_rsrvd (1<<6)
166#define OMAP1510_FPGA_HID_RESETn (1<<7) /* output - 0/1 USAR reset/run */
167
168/* The FPGA IRQ is cascaded through GPIO_13 */
169#define OMAP1510_INT_FPGA (IH_GPIO_BASE + 13)
170
171/* IRQ Numbers for interrupts muxed through the FPGA */
172#define OMAP1510_INT_FPGA_ATN (OMAP_FPGA_IRQ_BASE + 0)
173#define OMAP1510_INT_FPGA_ACK (OMAP_FPGA_IRQ_BASE + 1)
174#define OMAP1510_INT_FPGA2 (OMAP_FPGA_IRQ_BASE + 2)
175#define OMAP1510_INT_FPGA3 (OMAP_FPGA_IRQ_BASE + 3)
176#define OMAP1510_INT_FPGA4 (OMAP_FPGA_IRQ_BASE + 4)
177#define OMAP1510_INT_FPGA5 (OMAP_FPGA_IRQ_BASE + 5)
178#define OMAP1510_INT_FPGA6 (OMAP_FPGA_IRQ_BASE + 6)
179#define OMAP1510_INT_FPGA7 (OMAP_FPGA_IRQ_BASE + 7)
180#define OMAP1510_INT_FPGA8 (OMAP_FPGA_IRQ_BASE + 8)
181#define OMAP1510_INT_FPGA9 (OMAP_FPGA_IRQ_BASE + 9)
182#define OMAP1510_INT_FPGA10 (OMAP_FPGA_IRQ_BASE + 10)
183#define OMAP1510_INT_FPGA11 (OMAP_FPGA_IRQ_BASE + 11)
184#define OMAP1510_INT_FPGA12 (OMAP_FPGA_IRQ_BASE + 12)
185#define OMAP1510_INT_ETHER (OMAP_FPGA_IRQ_BASE + 13)
186#define OMAP1510_INT_FPGAUART1 (OMAP_FPGA_IRQ_BASE + 14)
187#define OMAP1510_INT_FPGAUART2 (OMAP_FPGA_IRQ_BASE + 15)
188#define OMAP1510_INT_FPGA_TS (OMAP_FPGA_IRQ_BASE + 16)
189#define OMAP1510_INT_FPGA17 (OMAP_FPGA_IRQ_BASE + 17)
190#define OMAP1510_INT_FPGA_CAM (OMAP_FPGA_IRQ_BASE + 18)
191#define OMAP1510_INT_FPGA_RTC_A (OMAP_FPGA_IRQ_BASE + 19)
192#define OMAP1510_INT_FPGA_RTC_B (OMAP_FPGA_IRQ_BASE + 20)
193#define OMAP1510_INT_FPGA_CD (OMAP_FPGA_IRQ_BASE + 21)
194#define OMAP1510_INT_FPGA22 (OMAP_FPGA_IRQ_BASE + 22)
195#define OMAP1510_INT_FPGA23 (OMAP_FPGA_IRQ_BASE + 23)
196
197#endif
diff --git a/include/asm-arm/arch-omap/gpio.h b/include/asm-arm/arch-omap/gpio.h
deleted file mode 100644
index 5ee6a49864c3..000000000000
--- a/include/asm-arm/arch-omap/gpio.h
+++ /dev/null
@@ -1,122 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-omap/gpio.h
3 *
4 * OMAP GPIO handling defines and functions
5 *
6 * Copyright (C) 2003-2005 Nokia Corporation
7 *
8 * Written by Juha Yrjölä <juha.yrjola@nokia.com>
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 *
24 */
25
26#ifndef __ASM_ARCH_OMAP_GPIO_H
27#define __ASM_ARCH_OMAP_GPIO_H
28
29#include <asm/arch/irqs.h>
30#include <asm/io.h>
31
32#define OMAP_MPUIO_BASE (void __iomem *)0xfffb5000
33
34#ifdef CONFIG_ARCH_OMAP730
35#define OMAP_MPUIO_INPUT_LATCH 0x00
36#define OMAP_MPUIO_OUTPUT 0x02
37#define OMAP_MPUIO_IO_CNTL 0x04
38#define OMAP_MPUIO_KBR_LATCH 0x08
39#define OMAP_MPUIO_KBC 0x0a
40#define OMAP_MPUIO_GPIO_EVENT_MODE 0x0c
41#define OMAP_MPUIO_GPIO_INT_EDGE 0x0e
42#define OMAP_MPUIO_KBD_INT 0x10
43#define OMAP_MPUIO_GPIO_INT 0x12
44#define OMAP_MPUIO_KBD_MASKIT 0x14
45#define OMAP_MPUIO_GPIO_MASKIT 0x16
46#define OMAP_MPUIO_GPIO_DEBOUNCING 0x18
47#define OMAP_MPUIO_LATCH 0x1a
48#else
49#define OMAP_MPUIO_INPUT_LATCH 0x00
50#define OMAP_MPUIO_OUTPUT 0x04
51#define OMAP_MPUIO_IO_CNTL 0x08
52#define OMAP_MPUIO_KBR_LATCH 0x10
53#define OMAP_MPUIO_KBC 0x14
54#define OMAP_MPUIO_GPIO_EVENT_MODE 0x18
55#define OMAP_MPUIO_GPIO_INT_EDGE 0x1c
56#define OMAP_MPUIO_KBD_INT 0x20
57#define OMAP_MPUIO_GPIO_INT 0x24
58#define OMAP_MPUIO_KBD_MASKIT 0x28
59#define OMAP_MPUIO_GPIO_MASKIT 0x2c
60#define OMAP_MPUIO_GPIO_DEBOUNCING 0x30
61#define OMAP_MPUIO_LATCH 0x34
62#endif
63
64#define OMAP34XX_NR_GPIOS 6
65
66#define OMAP_MPUIO(nr) (OMAP_MAX_GPIO_LINES + (nr))
67#define OMAP_GPIO_IS_MPUIO(nr) ((nr) >= OMAP_MAX_GPIO_LINES)
68
69#define OMAP_GPIO_IRQ(nr) (OMAP_GPIO_IS_MPUIO(nr) ? \
70 IH_MPUIO_BASE + ((nr) & 0x0f) : \
71 IH_GPIO_BASE + (nr))
72
73extern int omap_gpio_init(void); /* Call from board init only */
74extern int omap_request_gpio(int gpio);
75extern void omap_free_gpio(int gpio);
76extern void omap_set_gpio_direction(int gpio, int is_input);
77extern void omap_set_gpio_dataout(int gpio, int enable);
78extern int omap_get_gpio_datain(int gpio);
79extern void omap_set_gpio_debounce(int gpio, int enable);
80extern void omap_set_gpio_debounce_time(int gpio, int enable);
81
82/*-------------------------------------------------------------------------*/
83
84/* Wrappers for "new style" GPIO calls, using the new infrastructure
85 * which lets us plug in FPGA, I2C, and other implementations.
86 * *
87 * The original OMAP-specfic calls should eventually be removed.
88 */
89
90#include <linux/errno.h>
91#include <asm-generic/gpio.h>
92
93static inline int gpio_get_value(unsigned gpio)
94{
95 return __gpio_get_value(gpio);
96}
97
98static inline void gpio_set_value(unsigned gpio, int value)
99{
100 __gpio_set_value(gpio, value);
101}
102
103static inline int gpio_cansleep(unsigned gpio)
104{
105 return __gpio_cansleep(gpio);
106}
107
108static inline int gpio_to_irq(unsigned gpio)
109{
110 if (gpio < (OMAP_MAX_GPIO_LINES + 16))
111 return OMAP_GPIO_IRQ(gpio);
112 return -EINVAL;
113}
114
115static inline int irq_to_gpio(unsigned irq)
116{
117 if (cpu_class_is_omap1() && (irq < (IH_MPUIO_BASE + 16)))
118 return (irq - IH_MPUIO_BASE) + OMAP_MAX_GPIO_LINES;
119 return irq - IH_GPIO_BASE;
120}
121
122#endif
diff --git a/include/asm-arm/arch-omap/gpioexpander.h b/include/asm-arm/arch-omap/gpioexpander.h
deleted file mode 100644
index 4eed1f80e2fb..000000000000
--- a/include/asm-arm/arch-omap/gpioexpander.h
+++ /dev/null
@@ -1,35 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-omap/gpioexpander.h
3 *
4 *
5 * Copyright (C) 2004 Texas Instruments, Inc.
6 *
7 * This package is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 *
11 * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
12 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
13 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
14 */
15
16#ifndef __ASM_ARCH_OMAP_GPIOEXPANDER_H
17#define __ASM_ARCH_OMAP_GPIOEXPANDER_H
18
19/* Function Prototypes for GPIO Expander functions */
20
21#ifdef CONFIG_GPIOEXPANDER_OMAP
22int read_gpio_expa(u8 *, int);
23int write_gpio_expa(u8 , int);
24#else
25static inline int read_gpio_expa(u8 *val, int addr)
26{
27 return 0;
28}
29static inline int write_gpio_expa(u8 val, int addr)
30{
31 return 0;
32}
33#endif
34
35#endif /* __ASM_ARCH_OMAP_GPIOEXPANDER_H */
diff --git a/include/asm-arm/arch-omap/hardware.h b/include/asm-arm/arch-omap/hardware.h
deleted file mode 100644
index 45fdfccbd5d4..000000000000
--- a/include/asm-arm/arch-omap/hardware.h
+++ /dev/null
@@ -1,355 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-omap/hardware.h
3 *
4 * Hardware definitions for TI OMAP processors and boards
5 *
6 * NOTE: Please put device driver specific defines into a separate header
7 * file for each driver.
8 *
9 * Copyright (C) 2001 RidgeRun, Inc.
10 * Author: RidgeRun, Inc. Greg Lonnon <glonnon@ridgerun.com>
11 *
12 * Reorganized for Linux-2.6 by Tony Lindgren <tony@atomide.com>
13 * and Dirk Behme <dirk.behme@de.bosch.com>
14 *
15 * This program is free software; you can redistribute it and/or modify it
16 * under the terms of the GNU General Public License as published by the
17 * Free Software Foundation; either version 2 of the License, or (at your
18 * option) any later version.
19 *
20 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
21 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
22 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
23 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
24 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
25 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
26 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
27 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
29 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 *
31 * You should have received a copy of the GNU General Public License along
32 * with this program; if not, write to the Free Software Foundation, Inc.,
33 * 675 Mass Ave, Cambridge, MA 02139, USA.
34 */
35
36#ifndef __ASM_ARCH_OMAP_HARDWARE_H
37#define __ASM_ARCH_OMAP_HARDWARE_H
38
39#include <asm/sizes.h>
40#ifndef __ASSEMBLER__
41#include <asm/types.h>
42#include <asm/arch/cpu.h>
43#endif
44#include <asm/arch/serial.h>
45
46/*
47 * ---------------------------------------------------------------------------
48 * Common definitions for all OMAP processors
49 * NOTE: Put all processor or board specific parts to the special header
50 * files.
51 * ---------------------------------------------------------------------------
52 */
53
54/*
55 * ----------------------------------------------------------------------------
56 * Timers
57 * ----------------------------------------------------------------------------
58 */
59#define OMAP_MPU_TIMER1_BASE (0xfffec500)
60#define OMAP_MPU_TIMER2_BASE (0xfffec600)
61#define OMAP_MPU_TIMER3_BASE (0xfffec700)
62#define MPU_TIMER_FREE (1 << 6)
63#define MPU_TIMER_CLOCK_ENABLE (1 << 5)
64#define MPU_TIMER_AR (1 << 1)
65#define MPU_TIMER_ST (1 << 0)
66
67/*
68 * ----------------------------------------------------------------------------
69 * Clocks
70 * ----------------------------------------------------------------------------
71 */
72#define CLKGEN_REG_BASE (0xfffece00)
73#define ARM_CKCTL (CLKGEN_REG_BASE + 0x0)
74#define ARM_IDLECT1 (CLKGEN_REG_BASE + 0x4)
75#define ARM_IDLECT2 (CLKGEN_REG_BASE + 0x8)
76#define ARM_EWUPCT (CLKGEN_REG_BASE + 0xC)
77#define ARM_RSTCT1 (CLKGEN_REG_BASE + 0x10)
78#define ARM_RSTCT2 (CLKGEN_REG_BASE + 0x14)
79#define ARM_SYSST (CLKGEN_REG_BASE + 0x18)
80#define ARM_IDLECT3 (CLKGEN_REG_BASE + 0x24)
81
82#define CK_RATEF 1
83#define CK_IDLEF 2
84#define CK_ENABLEF 4
85#define CK_SELECTF 8
86#define SETARM_IDLE_SHIFT
87
88/* DPLL control registers */
89#define DPLL_CTL (0xfffecf00)
90
91/* DSP clock control. Must use __raw_readw() and __raw_writew() with these */
92#define DSP_CONFIG_REG_BASE (0xe1008000)
93#define DSP_CKCTL (DSP_CONFIG_REG_BASE + 0x0)
94#define DSP_IDLECT1 (DSP_CONFIG_REG_BASE + 0x4)
95#define DSP_IDLECT2 (DSP_CONFIG_REG_BASE + 0x8)
96#define DSP_RSTCT2 (DSP_CONFIG_REG_BASE + 0x14)
97
98/*
99 * ---------------------------------------------------------------------------
100 * UPLD
101 * ---------------------------------------------------------------------------
102 */
103#define ULPD_REG_BASE (0xfffe0800)
104#define ULPD_IT_STATUS (ULPD_REG_BASE + 0x14)
105#define ULPD_SETUP_ANALOG_CELL_3 (ULPD_REG_BASE + 0x24)
106#define ULPD_CLOCK_CTRL (ULPD_REG_BASE + 0x30)
107# define DIS_USB_PVCI_CLK (1 << 5) /* no USB/FAC synch */
108# define USB_MCLK_EN (1 << 4) /* enable W4_USB_CLKO */
109#define ULPD_SOFT_REQ (ULPD_REG_BASE + 0x34)
110# define SOFT_UDC_REQ (1 << 4)
111# define SOFT_USB_CLK_REQ (1 << 3)
112# define SOFT_DPLL_REQ (1 << 0)
113#define ULPD_DPLL_CTRL (ULPD_REG_BASE + 0x3c)
114#define ULPD_STATUS_REQ (ULPD_REG_BASE + 0x40)
115#define ULPD_APLL_CTRL (ULPD_REG_BASE + 0x4c)
116#define ULPD_POWER_CTRL (ULPD_REG_BASE + 0x50)
117#define ULPD_SOFT_DISABLE_REQ_REG (ULPD_REG_BASE + 0x68)
118# define DIS_MMC2_DPLL_REQ (1 << 11)
119# define DIS_MMC1_DPLL_REQ (1 << 10)
120# define DIS_UART3_DPLL_REQ (1 << 9)
121# define DIS_UART2_DPLL_REQ (1 << 8)
122# define DIS_UART1_DPLL_REQ (1 << 7)
123# define DIS_USB_HOST_DPLL_REQ (1 << 6)
124#define ULPD_SDW_CLK_DIV_CTRL_SEL (ULPD_REG_BASE + 0x74)
125#define ULPD_CAM_CLK_CTRL (ULPD_REG_BASE + 0x7c)
126
127/*
128 * ---------------------------------------------------------------------------
129 * Watchdog timer
130 * ---------------------------------------------------------------------------
131 */
132
133/* Watchdog timer within the OMAP3.2 gigacell */
134#define OMAP_MPU_WATCHDOG_BASE (0xfffec800)
135#define OMAP_WDT_TIMER (OMAP_MPU_WATCHDOG_BASE + 0x0)
136#define OMAP_WDT_LOAD_TIM (OMAP_MPU_WATCHDOG_BASE + 0x4)
137#define OMAP_WDT_READ_TIM (OMAP_MPU_WATCHDOG_BASE + 0x4)
138#define OMAP_WDT_TIMER_MODE (OMAP_MPU_WATCHDOG_BASE + 0x8)
139
140/*
141 * ---------------------------------------------------------------------------
142 * Interrupts
143 * ---------------------------------------------------------------------------
144 */
145#ifdef CONFIG_ARCH_OMAP1
146
147/*
148 * XXX: These probably want to be moved to arch/arm/mach-omap/omap1/irq.c
149 * or something similar.. -- PFM.
150 */
151
152#define OMAP_IH1_BASE 0xfffecb00
153#define OMAP_IH2_BASE 0xfffe0000
154
155#define OMAP_IH1_ITR (OMAP_IH1_BASE + 0x00)
156#define OMAP_IH1_MIR (OMAP_IH1_BASE + 0x04)
157#define OMAP_IH1_SIR_IRQ (OMAP_IH1_BASE + 0x10)
158#define OMAP_IH1_SIR_FIQ (OMAP_IH1_BASE + 0x14)
159#define OMAP_IH1_CONTROL (OMAP_IH1_BASE + 0x18)
160#define OMAP_IH1_ILR0 (OMAP_IH1_BASE + 0x1c)
161#define OMAP_IH1_ISR (OMAP_IH1_BASE + 0x9c)
162
163#define OMAP_IH2_ITR (OMAP_IH2_BASE + 0x00)
164#define OMAP_IH2_MIR (OMAP_IH2_BASE + 0x04)
165#define OMAP_IH2_SIR_IRQ (OMAP_IH2_BASE + 0x10)
166#define OMAP_IH2_SIR_FIQ (OMAP_IH2_BASE + 0x14)
167#define OMAP_IH2_CONTROL (OMAP_IH2_BASE + 0x18)
168#define OMAP_IH2_ILR0 (OMAP_IH2_BASE + 0x1c)
169#define OMAP_IH2_ISR (OMAP_IH2_BASE + 0x9c)
170
171#define IRQ_ITR_REG_OFFSET 0x00
172#define IRQ_MIR_REG_OFFSET 0x04
173#define IRQ_SIR_IRQ_REG_OFFSET 0x10
174#define IRQ_SIR_FIQ_REG_OFFSET 0x14
175#define IRQ_CONTROL_REG_OFFSET 0x18
176#define IRQ_ISR_REG_OFFSET 0x9c
177#define IRQ_ILR0_REG_OFFSET 0x1c
178#define IRQ_GMR_REG_OFFSET 0xa0
179
180#endif
181
182/*
183 * ----------------------------------------------------------------------------
184 * System control registers
185 * ----------------------------------------------------------------------------
186 */
187#define MOD_CONF_CTRL_0 0xfffe1080
188#define MOD_CONF_CTRL_1 0xfffe1110
189
190/*
191 * ----------------------------------------------------------------------------
192 * Pin multiplexing registers
193 * ----------------------------------------------------------------------------
194 */
195#define FUNC_MUX_CTRL_0 0xfffe1000
196#define FUNC_MUX_CTRL_1 0xfffe1004
197#define FUNC_MUX_CTRL_2 0xfffe1008
198#define COMP_MODE_CTRL_0 0xfffe100c
199#define FUNC_MUX_CTRL_3 0xfffe1010
200#define FUNC_MUX_CTRL_4 0xfffe1014
201#define FUNC_MUX_CTRL_5 0xfffe1018
202#define FUNC_MUX_CTRL_6 0xfffe101C
203#define FUNC_MUX_CTRL_7 0xfffe1020
204#define FUNC_MUX_CTRL_8 0xfffe1024
205#define FUNC_MUX_CTRL_9 0xfffe1028
206#define FUNC_MUX_CTRL_A 0xfffe102C
207#define FUNC_MUX_CTRL_B 0xfffe1030
208#define FUNC_MUX_CTRL_C 0xfffe1034
209#define FUNC_MUX_CTRL_D 0xfffe1038
210#define PULL_DWN_CTRL_0 0xfffe1040
211#define PULL_DWN_CTRL_1 0xfffe1044
212#define PULL_DWN_CTRL_2 0xfffe1048
213#define PULL_DWN_CTRL_3 0xfffe104c
214#define PULL_DWN_CTRL_4 0xfffe10ac
215
216/* OMAP-1610 specific multiplexing registers */
217#define FUNC_MUX_CTRL_E 0xfffe1090
218#define FUNC_MUX_CTRL_F 0xfffe1094
219#define FUNC_MUX_CTRL_10 0xfffe1098
220#define FUNC_MUX_CTRL_11 0xfffe109c
221#define FUNC_MUX_CTRL_12 0xfffe10a0
222#define PU_PD_SEL_0 0xfffe10b4
223#define PU_PD_SEL_1 0xfffe10b8
224#define PU_PD_SEL_2 0xfffe10bc
225#define PU_PD_SEL_3 0xfffe10c0
226#define PU_PD_SEL_4 0xfffe10c4
227
228/* Timer32K for 1610 and 1710*/
229#define OMAP_TIMER32K_BASE 0xFFFBC400
230
231/*
232 * ---------------------------------------------------------------------------
233 * TIPB bus interface
234 * ---------------------------------------------------------------------------
235 */
236#define TIPB_PUBLIC_CNTL_BASE 0xfffed300
237#define MPU_PUBLIC_TIPB_CNTL (TIPB_PUBLIC_CNTL_BASE + 0x8)
238#define TIPB_PRIVATE_CNTL_BASE 0xfffeca00
239#define MPU_PRIVATE_TIPB_CNTL (TIPB_PRIVATE_CNTL_BASE + 0x8)
240
241/*
242 * ----------------------------------------------------------------------------
243 * MPUI interface
244 * ----------------------------------------------------------------------------
245 */
246#define MPUI_BASE (0xfffec900)
247#define MPUI_CTRL (MPUI_BASE + 0x0)
248#define MPUI_DEBUG_ADDR (MPUI_BASE + 0x4)
249#define MPUI_DEBUG_DATA (MPUI_BASE + 0x8)
250#define MPUI_DEBUG_FLAG (MPUI_BASE + 0xc)
251#define MPUI_STATUS_REG (MPUI_BASE + 0x10)
252#define MPUI_DSP_STATUS (MPUI_BASE + 0x14)
253#define MPUI_DSP_BOOT_CONFIG (MPUI_BASE + 0x18)
254#define MPUI_DSP_API_CONFIG (MPUI_BASE + 0x1c)
255
256/*
257 * ----------------------------------------------------------------------------
258 * LED Pulse Generator
259 * ----------------------------------------------------------------------------
260 */
261#define OMAP_LPG1_BASE 0xfffbd000
262#define OMAP_LPG2_BASE 0xfffbd800
263#define OMAP_LPG1_LCR (OMAP_LPG1_BASE + 0x00)
264#define OMAP_LPG1_PMR (OMAP_LPG1_BASE + 0x04)
265#define OMAP_LPG2_LCR (OMAP_LPG2_BASE + 0x00)
266#define OMAP_LPG2_PMR (OMAP_LPG2_BASE + 0x04)
267
268/*
269 * ----------------------------------------------------------------------------
270 * Pulse-Width Light
271 * ----------------------------------------------------------------------------
272 */
273#define OMAP_PWL_BASE 0xfffb5800
274#define OMAP_PWL_ENABLE (OMAP_PWL_BASE + 0x00)
275#define OMAP_PWL_CLK_ENABLE (OMAP_PWL_BASE + 0x04)
276
277/*
278 * ---------------------------------------------------------------------------
279 * Processor specific defines
280 * ---------------------------------------------------------------------------
281 */
282
283#include "omap730.h"
284#include "omap1510.h"
285#include "omap24xx.h"
286#include "omap16xx.h"
287#include "omap34xx.h"
288
289#ifndef __ASSEMBLER__
290
291/*
292 * ---------------------------------------------------------------------------
293 * Board specific defines
294 * ---------------------------------------------------------------------------
295 */
296
297#ifdef CONFIG_MACH_OMAP_INNOVATOR
298#include "board-innovator.h"
299#endif
300
301#ifdef CONFIG_MACH_OMAP_H2
302#include "board-h2.h"
303#endif
304
305#ifdef CONFIG_MACH_OMAP_PERSEUS2
306#include "board-perseus2.h"
307#endif
308
309#ifdef CONFIG_MACH_OMAP_FSAMPLE
310#include "board-fsample.h"
311#endif
312
313#ifdef CONFIG_MACH_OMAP_H3
314#include "board-h3.h"
315#endif
316
317#ifdef CONFIG_MACH_OMAP_H4
318#include "board-h4.h"
319#endif
320
321#ifdef CONFIG_MACH_OMAP_2430SDP
322#include "board-2430sdp.h"
323#endif
324
325#ifdef CONFIG_MACH_OMAP_APOLLON
326#include "board-apollon.h"
327#endif
328
329#ifdef CONFIG_MACH_OMAP_OSK
330#include "board-osk.h"
331#endif
332
333#ifdef CONFIG_MACH_VOICEBLUE
334#include "board-voiceblue.h"
335#endif
336
337#ifdef CONFIG_MACH_OMAP_PALMTE
338#include "board-palmte.h"
339#endif
340
341#ifdef CONFIG_MACH_OMAP_PALMZ71
342#include "board-palmz71.h"
343#endif
344
345#ifdef CONFIG_MACH_OMAP_PALMTT
346#include "board-palmtt.h"
347#endif
348
349#ifdef CONFIG_MACH_SX1
350#include "board-sx1.h"
351#endif
352
353#endif /* !__ASSEMBLER__ */
354
355#endif /* __ASM_ARCH_OMAP_HARDWARE_H */
diff --git a/include/asm-arm/arch-omap/io.h b/include/asm-arm/arch-omap/io.h
deleted file mode 100644
index 0b13557fd30b..000000000000
--- a/include/asm-arm/arch-omap/io.h
+++ /dev/null
@@ -1,197 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-omap/io.h
3 *
4 * IO definitions for TI OMAP processors and boards
5 *
6 * Copied from linux/include/asm-arm/arch-sa1100/io.h
7 * Copyright (C) 1997-1999 Russell King
8 *
9 * This program is free software; you can redistribute it and/or modify it
10 * under the terms of the GNU General Public License as published by the
11 * Free Software Foundation; either version 2 of the License, or (at your
12 * option) any later version.
13 *
14 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
15 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
16 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
17 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
18 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
19 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
20 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
21 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 *
25 * You should have received a copy of the GNU General Public License along
26 * with this program; if not, write to the Free Software Foundation, Inc.,
27 * 675 Mass Ave, Cambridge, MA 02139, USA.
28 *
29 * Modifications:
30 * 06-12-1997 RMK Created.
31 * 07-04-1999 RMK Major cleanup
32 */
33
34#ifndef __ASM_ARM_ARCH_IO_H
35#define __ASM_ARM_ARCH_IO_H
36
37#include <asm/hardware.h>
38
39#define IO_SPACE_LIMIT 0xffffffff
40
41/*
42 * We don't actually have real ISA nor PCI buses, but there is so many
43 * drivers out there that might just work if we fake them...
44 */
45#define __io(a) ((void __iomem *)(PCIO_BASE + (a)))
46#define __mem_pci(a) (a)
47
48/*
49 * ----------------------------------------------------------------------------
50 * I/O mapping
51 * ----------------------------------------------------------------------------
52 */
53
54#define PCIO_BASE 0
55
56#if defined(CONFIG_ARCH_OMAP1)
57
58#define IO_PHYS 0xFFFB0000
59#define IO_OFFSET 0x01000000 /* Virtual IO = 0xfefb0000 */
60#define IO_SIZE 0x40000
61#define IO_VIRT (IO_PHYS - IO_OFFSET)
62#define IO_ADDRESS(pa) ((pa) - IO_OFFSET)
63#define OMAP1_IO_ADDRESS(pa) ((pa) - IO_OFFSET)
64#define io_p2v(pa) ((pa) - IO_OFFSET)
65#define io_v2p(va) ((va) + IO_OFFSET)
66
67#elif defined(CONFIG_ARCH_OMAP2)
68
69/* We map both L3 and L4 on OMAP2 */
70#define L3_24XX_PHYS L3_24XX_BASE /* 0x68000000 */
71#define L3_24XX_VIRT 0xf8000000
72#define L3_24XX_SIZE SZ_1M /* 44kB of 128MB used, want 1MB sect */
73#define L4_24XX_PHYS L4_24XX_BASE /* 0x48000000 */
74#define L4_24XX_VIRT 0xd8000000
75#define L4_24XX_SIZE SZ_1M /* 1MB of 128MB used, want 1MB sect */
76
77#ifdef CONFIG_ARCH_OMAP2430
78#define L4_WK_243X_PHYS L4_WK_243X_BASE /* 0x49000000 */
79#define L4_WK_243X_VIRT 0xd9000000
80#define L4_WK_243X_SIZE SZ_1M
81#define OMAP243X_GPMC_PHYS OMAP243X_GPMC_BASE /* 0x49000000 */
82#define OMAP243X_GPMC_VIRT 0xFE000000
83#define OMAP243X_GPMC_SIZE SZ_1M
84#define OMAP243X_SDRC_PHYS OMAP243X_SDRC_BASE
85#define OMAP243X_SDRC_VIRT 0xFD000000
86#define OMAP243X_SDRC_SIZE SZ_1M
87#define OMAP243X_SMS_PHYS OMAP243X_SMS_BASE
88#define OMAP243X_SMS_VIRT 0xFC000000
89#define OMAP243X_SMS_SIZE SZ_1M
90
91#endif
92
93#define IO_OFFSET 0x90000000
94#define IO_ADDRESS(pa) ((pa) + IO_OFFSET) /* Works for L3 and L4 */
95#define OMAP2_IO_ADDRESS(pa) ((pa) + IO_OFFSET) /* Works for L3 and L4 */
96#define io_p2v(pa) ((pa) + IO_OFFSET) /* Works for L3 and L4 */
97#define io_v2p(va) ((va) - IO_OFFSET) /* Works for L3 and L4 */
98
99/* DSP */
100#define DSP_MEM_24XX_PHYS OMAP2420_DSP_MEM_BASE /* 0x58000000 */
101#define DSP_MEM_24XX_VIRT 0xe0000000
102#define DSP_MEM_24XX_SIZE 0x28000
103#define DSP_IPI_24XX_PHYS OMAP2420_DSP_IPI_BASE /* 0x59000000 */
104#define DSP_IPI_24XX_VIRT 0xe1000000
105#define DSP_IPI_24XX_SIZE SZ_4K
106#define DSP_MMU_24XX_PHYS OMAP2420_DSP_MMU_BASE /* 0x5a000000 */
107#define DSP_MMU_24XX_VIRT 0xe2000000
108#define DSP_MMU_24XX_SIZE SZ_4K
109
110#elif defined(CONFIG_ARCH_OMAP3)
111
112/* We map both L3 and L4 on OMAP3 */
113#define L3_34XX_PHYS L3_34XX_BASE /* 0x68000000 */
114#define L3_34XX_VIRT 0xf8000000
115#define L3_34XX_SIZE SZ_1M /* 44kB of 128MB used, want 1MB sect */
116
117#define L4_34XX_PHYS L4_34XX_BASE /* 0x48000000 */
118#define L4_34XX_VIRT 0xd8000000
119#define L4_34XX_SIZE SZ_4M /* 1MB of 128MB used, want 1MB sect */
120
121/*
122 * Need to look at the Size 4M for L4.
123 * VPOM3430 was not working for Int controller
124 */
125
126#define L4_WK_34XX_PHYS L4_WK_34XX_BASE /* 0x48300000 */
127#define L4_WK_34XX_VIRT 0xd8300000
128#define L4_WK_34XX_SIZE SZ_1M
129
130#define L4_PER_34XX_PHYS L4_PER_34XX_BASE /* 0x49000000 */
131#define L4_PER_34XX_VIRT 0xd9000000
132#define L4_PER_34XX_SIZE SZ_1M
133
134#define L4_EMU_34XX_PHYS L4_EMU_34XX_BASE /* 0x54000000 */
135#define L4_EMU_34XX_VIRT 0xe4000000
136#define L4_EMU_34XX_SIZE SZ_64M
137
138#define OMAP34XX_GPMC_PHYS OMAP34XX_GPMC_BASE /* 0x6E000000 */
139#define OMAP34XX_GPMC_VIRT 0xFE000000
140#define OMAP34XX_GPMC_SIZE SZ_1M
141
142#define OMAP343X_SMS_PHYS OMAP343X_SMS_BASE /* 0x6C000000 */
143#define OMAP343X_SMS_VIRT 0xFC000000
144#define OMAP343X_SMS_SIZE SZ_1M
145
146#define OMAP343X_SDRC_PHYS OMAP343X_SDRC_BASE /* 0x6D000000 */
147#define OMAP343X_SDRC_VIRT 0xFD000000
148#define OMAP343X_SDRC_SIZE SZ_1M
149
150
151#define IO_OFFSET 0x90000000
152#define IO_ADDRESS(pa) ((pa) + IO_OFFSET)/* Works for L3 and L4 */
153#define OMAP2_IO_ADDRESS(pa) ((pa) + IO_OFFSET)/* Works for L3 and L4 */
154#define io_p2v(pa) ((pa) + IO_OFFSET)/* Works for L3 and L4 */
155#define io_v2p(va) ((va) - IO_OFFSET)/* Works for L3 and L4 */
156
157/* DSP */
158#define DSP_MEM_34XX_PHYS OMAP34XX_DSP_MEM_BASE /* 0x58000000 */
159#define DSP_MEM_34XX_VIRT 0xe0000000
160#define DSP_MEM_34XX_SIZE 0x28000
161#define DSP_IPI_34XX_PHYS OMAP34XX_DSP_IPI_BASE /* 0x59000000 */
162#define DSP_IPI_34XX_VIRT 0xe1000000
163#define DSP_IPI_34XX_SIZE SZ_4K
164#define DSP_MMU_34XX_PHYS OMAP34XX_DSP_MMU_BASE /* 0x5a000000 */
165#define DSP_MMU_34XX_VIRT 0xe2000000
166#define DSP_MMU_34XX_SIZE SZ_4K
167
168#endif
169
170#ifndef __ASSEMBLER__
171
172/*
173 * Functions to access the OMAP IO region
174 *
175 * NOTE: - Use omap_read/write[bwl] for physical register addresses
176 * - Use __raw_read/write[bwl]() for virtual register addresses
177 * - Use IO_ADDRESS(phys_addr) to convert registers to virtual addresses
178 * - DO NOT use hardcoded virtual addresses to allow changing the
179 * IO address space again if needed
180 */
181#define omap_readb(a) (*(volatile unsigned char *)IO_ADDRESS(a))
182#define omap_readw(a) (*(volatile unsigned short *)IO_ADDRESS(a))
183#define omap_readl(a) (*(volatile unsigned int *)IO_ADDRESS(a))
184
185#define omap_writeb(v,a) (*(volatile unsigned char *)IO_ADDRESS(a) = (v))
186#define omap_writew(v,a) (*(volatile unsigned short *)IO_ADDRESS(a) = (v))
187#define omap_writel(v,a) (*(volatile unsigned int *)IO_ADDRESS(a) = (v))
188
189extern void omap1_map_common_io(void);
190extern void omap1_init_common_hw(void);
191
192extern void omap2_map_common_io(void);
193extern void omap2_init_common_hw(void);
194
195#endif
196
197#endif
diff --git a/include/asm-arm/arch-omap/irda.h b/include/asm-arm/arch-omap/irda.h
deleted file mode 100644
index 96bb12fab438..000000000000
--- a/include/asm-arm/arch-omap/irda.h
+++ /dev/null
@@ -1,37 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-omap/irda.h
3 *
4 * Copyright (C) 2005-2006 Komal Shah <komal_shah802003@yahoo.com>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10#ifndef ASMARM_ARCH_IRDA_H
11#define ASMARM_ARCH_IRDA_H
12
13/* board specific transceiver capabilities */
14
15#define IR_SEL 1 /* Selects IrDA */
16#define IR_SIRMODE 2
17#define IR_FIRMODE 4
18#define IR_MIRMODE 8
19
20struct omap_irda_config {
21 int transceiver_cap;
22 int (*transceiver_mode)(struct device *dev, int mode);
23 int (*select_irda)(struct device *dev, int state);
24 /* Very specific to the needs of some platforms (h3,h4)
25 * having calls which can sleep in irda_set_speed.
26 */
27 struct delayed_work gpio_expa;
28 int rx_channel;
29 int tx_channel;
30 unsigned long dest_start;
31 unsigned long src_start;
32 int tx_trigger;
33 int rx_trigger;
34 int mode;
35};
36
37#endif
diff --git a/include/asm-arm/arch-omap/irqs.h b/include/asm-arm/arch-omap/irqs.h
deleted file mode 100644
index 7464c694859b..000000000000
--- a/include/asm-arm/arch-omap/irqs.h
+++ /dev/null
@@ -1,332 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-omap/irqs.h
3 *
4 * Copyright (C) Greg Lonnon 2001
5 * Updated for OMAP-1610 by Tony Lindgren <tony@atomide.com>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 *
21 * NOTE: The interrupt vectors for the OMAP-1509, OMAP-1510, and OMAP-1610
22 * are different.
23 */
24
25#ifndef __ASM_ARCH_OMAP15XX_IRQS_H
26#define __ASM_ARCH_OMAP15XX_IRQS_H
27
28/*
29 * IRQ numbers for interrupt handler 1
30 *
31 * NOTE: See also the OMAP-1510 and 1610 specific IRQ numbers below
32 *
33 */
34#define INT_CAMERA 1
35#define INT_FIQ 3
36#define INT_RTDX 6
37#define INT_DSP_MMU_ABORT 7
38#define INT_HOST 8
39#define INT_ABORT 9
40#define INT_BRIDGE_PRIV 13
41#define INT_GPIO_BANK1 14
42#define INT_UART3 15
43#define INT_TIMER3 16
44#define INT_DMA_CH0_6 19
45#define INT_DMA_CH1_7 20
46#define INT_DMA_CH2_8 21
47#define INT_DMA_CH3 22
48#define INT_DMA_CH4 23
49#define INT_DMA_CH5 24
50#define INT_DMA_LCD 25
51#define INT_TIMER1 26
52#define INT_WD_TIMER 27
53#define INT_BRIDGE_PUB 28
54#define INT_TIMER2 30
55#define INT_LCD_CTRL 31
56
57/*
58 * OMAP-1510 specific IRQ numbers for interrupt handler 1
59 */
60#define INT_1510_IH2_IRQ 0
61#define INT_1510_RES2 2
62#define INT_1510_SPI_TX 4
63#define INT_1510_SPI_RX 5
64#define INT_1510_DSP_MAILBOX1 10
65#define INT_1510_DSP_MAILBOX2 11
66#define INT_1510_RES12 12
67#define INT_1510_LB_MMU 17
68#define INT_1510_RES18 18
69#define INT_1510_LOCAL_BUS 29
70
71/*
72 * OMAP-1610 specific IRQ numbers for interrupt handler 1
73 */
74#define INT_1610_IH2_IRQ 0
75#define INT_1610_IH2_FIQ 2
76#define INT_1610_McBSP2_TX 4
77#define INT_1610_McBSP2_RX 5
78#define INT_1610_DSP_MAILBOX1 10
79#define INT_1610_DSP_MAILBOX2 11
80#define INT_1610_LCD_LINE 12
81#define INT_1610_GPTIMER1 17
82#define INT_1610_GPTIMER2 18
83#define INT_1610_SSR_FIFO_0 29
84
85/*
86 * OMAP-730 specific IRQ numbers for interrupt handler 1
87 */
88#define INT_730_IH2_FIQ 0
89#define INT_730_IH2_IRQ 1
90#define INT_730_USB_NON_ISO 2
91#define INT_730_USB_ISO 3
92#define INT_730_ICR 4
93#define INT_730_EAC 5
94#define INT_730_GPIO_BANK1 6
95#define INT_730_GPIO_BANK2 7
96#define INT_730_GPIO_BANK3 8
97#define INT_730_McBSP2TX 10
98#define INT_730_McBSP2RX 11
99#define INT_730_McBSP2RX_OVF 12
100#define INT_730_LCD_LINE 14
101#define INT_730_GSM_PROTECT 15
102#define INT_730_TIMER3 16
103#define INT_730_GPIO_BANK5 17
104#define INT_730_GPIO_BANK6 18
105#define INT_730_SPGIO_WR 29
106
107/*
108 * IRQ numbers for interrupt handler 2
109 *
110 * NOTE: See also the OMAP-1510 and 1610 specific IRQ numbers below
111 */
112#define IH2_BASE 32
113
114#define INT_KEYBOARD (1 + IH2_BASE)
115#define INT_uWireTX (2 + IH2_BASE)
116#define INT_uWireRX (3 + IH2_BASE)
117#define INT_I2C (4 + IH2_BASE)
118#define INT_MPUIO (5 + IH2_BASE)
119#define INT_USB_HHC_1 (6 + IH2_BASE)
120#define INT_McBSP3TX (10 + IH2_BASE)
121#define INT_McBSP3RX (11 + IH2_BASE)
122#define INT_McBSP1TX (12 + IH2_BASE)
123#define INT_McBSP1RX (13 + IH2_BASE)
124#define INT_UART1 (14 + IH2_BASE)
125#define INT_UART2 (15 + IH2_BASE)
126#define INT_BT_MCSI1TX (16 + IH2_BASE)
127#define INT_BT_MCSI1RX (17 + IH2_BASE)
128#define INT_USB_W2FC (20 + IH2_BASE)
129#define INT_1WIRE (21 + IH2_BASE)
130#define INT_OS_TIMER (22 + IH2_BASE)
131#define INT_MMC (23 + IH2_BASE)
132#define INT_GAUGE_32K (24 + IH2_BASE)
133#define INT_RTC_TIMER (25 + IH2_BASE)
134#define INT_RTC_ALARM (26 + IH2_BASE)
135#define INT_MEM_STICK (27 + IH2_BASE)
136
137/*
138 * OMAP-1510 specific IRQ numbers for interrupt handler 2
139 */
140#define INT_1510_DSP_MMU (28 + IH2_BASE)
141#define INT_1510_COM_SPI_RO (31 + IH2_BASE)
142
143/*
144 * OMAP-1610 specific IRQ numbers for interrupt handler 2
145 */
146#define INT_1610_FAC (0 + IH2_BASE)
147#define INT_1610_USB_HHC_2 (7 + IH2_BASE)
148#define INT_1610_USB_OTG (8 + IH2_BASE)
149#define INT_1610_SoSSI (9 + IH2_BASE)
150#define INT_1610_SoSSI_MATCH (19 + IH2_BASE)
151#define INT_1610_DSP_MMU (28 + IH2_BASE)
152#define INT_1610_McBSP2RX_OF (31 + IH2_BASE)
153#define INT_1610_STI (32 + IH2_BASE)
154#define INT_1610_STI_WAKEUP (33 + IH2_BASE)
155#define INT_1610_GPTIMER3 (34 + IH2_BASE)
156#define INT_1610_GPTIMER4 (35 + IH2_BASE)
157#define INT_1610_GPTIMER5 (36 + IH2_BASE)
158#define INT_1610_GPTIMER6 (37 + IH2_BASE)
159#define INT_1610_GPTIMER7 (38 + IH2_BASE)
160#define INT_1610_GPTIMER8 (39 + IH2_BASE)
161#define INT_1610_GPIO_BANK2 (40 + IH2_BASE)
162#define INT_1610_GPIO_BANK3 (41 + IH2_BASE)
163#define INT_1610_MMC2 (42 + IH2_BASE)
164#define INT_1610_CF (43 + IH2_BASE)
165#define INT_1610_WAKE_UP_REQ (46 + IH2_BASE)
166#define INT_1610_GPIO_BANK4 (48 + IH2_BASE)
167#define INT_1610_SPI (49 + IH2_BASE)
168#define INT_1610_DMA_CH6 (53 + IH2_BASE)
169#define INT_1610_DMA_CH7 (54 + IH2_BASE)
170#define INT_1610_DMA_CH8 (55 + IH2_BASE)
171#define INT_1610_DMA_CH9 (56 + IH2_BASE)
172#define INT_1610_DMA_CH10 (57 + IH2_BASE)
173#define INT_1610_DMA_CH11 (58 + IH2_BASE)
174#define INT_1610_DMA_CH12 (59 + IH2_BASE)
175#define INT_1610_DMA_CH13 (60 + IH2_BASE)
176#define INT_1610_DMA_CH14 (61 + IH2_BASE)
177#define INT_1610_DMA_CH15 (62 + IH2_BASE)
178#define INT_1610_NAND (63 + IH2_BASE)
179
180/*
181 * OMAP-730 specific IRQ numbers for interrupt handler 2
182 */
183#define INT_730_HW_ERRORS (0 + IH2_BASE)
184#define INT_730_NFIQ_PWR_FAIL (1 + IH2_BASE)
185#define INT_730_CFCD (2 + IH2_BASE)
186#define INT_730_CFIREQ (3 + IH2_BASE)
187#define INT_730_I2C (4 + IH2_BASE)
188#define INT_730_PCC (5 + IH2_BASE)
189#define INT_730_MPU_EXT_NIRQ (6 + IH2_BASE)
190#define INT_730_SPI_100K_1 (7 + IH2_BASE)
191#define INT_730_SYREN_SPI (8 + IH2_BASE)
192#define INT_730_VLYNQ (9 + IH2_BASE)
193#define INT_730_GPIO_BANK4 (10 + IH2_BASE)
194#define INT_730_McBSP1TX (11 + IH2_BASE)
195#define INT_730_McBSP1RX (12 + IH2_BASE)
196#define INT_730_McBSP1RX_OF (13 + IH2_BASE)
197#define INT_730_UART_MODEM_IRDA_2 (14 + IH2_BASE)
198#define INT_730_UART_MODEM_1 (15 + IH2_BASE)
199#define INT_730_MCSI (16 + IH2_BASE)
200#define INT_730_uWireTX (17 + IH2_BASE)
201#define INT_730_uWireRX (18 + IH2_BASE)
202#define INT_730_SMC_CD (19 + IH2_BASE)
203#define INT_730_SMC_IREQ (20 + IH2_BASE)
204#define INT_730_HDQ_1WIRE (21 + IH2_BASE)
205#define INT_730_TIMER32K (22 + IH2_BASE)
206#define INT_730_MMC_SDIO (23 + IH2_BASE)
207#define INT_730_UPLD (24 + IH2_BASE)
208#define INT_730_USB_HHC_1 (27 + IH2_BASE)
209#define INT_730_USB_HHC_2 (28 + IH2_BASE)
210#define INT_730_USB_GENI (29 + IH2_BASE)
211#define INT_730_USB_OTG (30 + IH2_BASE)
212#define INT_730_CAMERA_IF (31 + IH2_BASE)
213#define INT_730_RNG (32 + IH2_BASE)
214#define INT_730_DUAL_MODE_TIMER (33 + IH2_BASE)
215#define INT_730_DBB_RF_EN (34 + IH2_BASE)
216#define INT_730_MPUIO_KEYPAD (35 + IH2_BASE)
217#define INT_730_SHA1_MD5 (36 + IH2_BASE)
218#define INT_730_SPI_100K_2 (37 + IH2_BASE)
219#define INT_730_RNG_IDLE (38 + IH2_BASE)
220#define INT_730_MPUIO (39 + IH2_BASE)
221#define INT_730_LLPC_LCD_CTRL_CAN_BE_OFF (40 + IH2_BASE)
222#define INT_730_LLPC_OE_FALLING (41 + IH2_BASE)
223#define INT_730_LLPC_OE_RISING (42 + IH2_BASE)
224#define INT_730_LLPC_VSYNC (43 + IH2_BASE)
225#define INT_730_WAKE_UP_REQ (46 + IH2_BASE)
226#define INT_730_DMA_CH6 (53 + IH2_BASE)
227#define INT_730_DMA_CH7 (54 + IH2_BASE)
228#define INT_730_DMA_CH8 (55 + IH2_BASE)
229#define INT_730_DMA_CH9 (56 + IH2_BASE)
230#define INT_730_DMA_CH10 (57 + IH2_BASE)
231#define INT_730_DMA_CH11 (58 + IH2_BASE)
232#define INT_730_DMA_CH12 (59 + IH2_BASE)
233#define INT_730_DMA_CH13 (60 + IH2_BASE)
234#define INT_730_DMA_CH14 (61 + IH2_BASE)
235#define INT_730_DMA_CH15 (62 + IH2_BASE)
236#define INT_730_NAND (63 + IH2_BASE)
237
238#define INT_24XX_SYS_NIRQ 7
239#define INT_24XX_SDMA_IRQ0 12
240#define INT_24XX_SDMA_IRQ1 13
241#define INT_24XX_SDMA_IRQ2 14
242#define INT_24XX_SDMA_IRQ3 15
243#define INT_24XX_CAM_IRQ 24
244#define INT_24XX_DSS_IRQ 25
245#define INT_24XX_MAIL_U0_MPU 26
246#define INT_24XX_DSP_UMA 27
247#define INT_24XX_DSP_MMU 28
248#define INT_24XX_GPIO_BANK1 29
249#define INT_24XX_GPIO_BANK2 30
250#define INT_24XX_GPIO_BANK3 31
251#define INT_24XX_GPIO_BANK4 32
252#define INT_24XX_GPIO_BANK5 33
253#define INT_24XX_MAIL_U3_MPU 34
254#define INT_24XX_GPTIMER1 37
255#define INT_24XX_GPTIMER2 38
256#define INT_24XX_GPTIMER3 39
257#define INT_24XX_GPTIMER4 40
258#define INT_24XX_GPTIMER5 41
259#define INT_24XX_GPTIMER6 42
260#define INT_24XX_GPTIMER7 43
261#define INT_24XX_GPTIMER8 44
262#define INT_24XX_GPTIMER9 45
263#define INT_24XX_GPTIMER10 46
264#define INT_24XX_GPTIMER11 47
265#define INT_24XX_GPTIMER12 48
266#define INT_24XX_I2C1_IRQ 56
267#define INT_24XX_I2C2_IRQ 57
268#define INT_24XX_MCBSP1_IRQ_TX 59
269#define INT_24XX_MCBSP1_IRQ_RX 60
270#define INT_24XX_MCBSP2_IRQ_TX 62
271#define INT_24XX_MCBSP2_IRQ_RX 63
272#define INT_24XX_UART1_IRQ 72
273#define INT_24XX_UART2_IRQ 73
274#define INT_24XX_UART3_IRQ 74
275#define INT_24XX_USB_IRQ_GEN 75
276#define INT_24XX_USB_IRQ_NISO 76
277#define INT_24XX_USB_IRQ_ISO 77
278#define INT_24XX_USB_IRQ_HGEN 78
279#define INT_24XX_USB_IRQ_HSOF 79
280#define INT_24XX_USB_IRQ_OTG 80
281#define INT_24XX_MMC_IRQ 83
282
283/* Max. 128 level 2 IRQs (OMAP1610), 192 GPIOs (OMAP730) and
284 * 16 MPUIO lines */
285#define OMAP_MAX_GPIO_LINES 192
286#define IH_GPIO_BASE (128 + IH2_BASE)
287#define IH_MPUIO_BASE (OMAP_MAX_GPIO_LINES + IH_GPIO_BASE)
288#define OMAP_IRQ_END (IH_MPUIO_BASE + 16)
289
290/* External FPGA handles interrupts on Innovator boards */
291#define OMAP_FPGA_IRQ_BASE (OMAP_IRQ_END)
292#ifdef CONFIG_MACH_OMAP_INNOVATOR
293#define OMAP_FPGA_NR_IRQS 24
294#else
295#define OMAP_FPGA_NR_IRQS 0
296#endif
297#define OMAP_FPGA_IRQ_END (OMAP_FPGA_IRQ_BASE + OMAP_FPGA_NR_IRQS)
298
299/* External TWL4030 can handle interrupts on 2430 and 34xx boards */
300#define TWL4030_IRQ_BASE (OMAP_FPGA_IRQ_END)
301#ifdef CONFIG_TWL4030_CORE
302#define TWL4030_BASE_NR_IRQS 8
303#define TWL4030_PWR_NR_IRQS 8
304#else
305#define TWL4030_BASE_NR_IRQS 0
306#define TWL4030_PWR_NR_IRQS 0
307#endif
308#define TWL4030_IRQ_END (TWL4030_IRQ_BASE + TWL4030_BASE_NR_IRQS)
309#define TWL4030_PWR_IRQ_BASE TWL4030_IRQ_END
310#define TWL4030_PWR_IRQ_END (TWL4030_PWR_IRQ_BASE + TWL4030_PWR_NR_IRQS)
311
312/* External TWL4030 gpio interrupts are optional */
313#define TWL4030_GPIO_IRQ_BASE TWL4030_PWR_IRQ_END
314#ifdef CONFIG_TWL4030_GPIO
315#define TWL4030_GPIO_NR_IRQS 18
316#else
317#define TWL4030_GPIO_NR_IRQS 0
318#endif
319#define TWL4030_GPIO_IRQ_END (TWL4030_GPIO_IRQ_BASE + TWL4030_GPIO_NR_IRQS)
320
321/* Total number of interrupts depends on the enabled blocks above */
322#define NR_IRQS TWL4030_GPIO_IRQ_END
323
324#define OMAP_IRQ_BIT(irq) (1 << ((irq) % 32))
325
326#ifndef __ASSEMBLY__
327extern void omap_init_irq(void);
328#endif
329
330#include <asm/hardware.h>
331
332#endif
diff --git a/include/asm-arm/arch-omap/keypad.h b/include/asm-arm/arch-omap/keypad.h
deleted file mode 100644
index b7f83075436e..000000000000
--- a/include/asm-arm/arch-omap/keypad.h
+++ /dev/null
@@ -1,39 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-omap/keypad.h
3 *
4 * Copyright (C) 2006 Komal Shah <komal_shah802003@yahoo.com>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10#ifndef ASMARM_ARCH_KEYPAD_H
11#define ASMARM_ARCH_KEYPAD_H
12
13struct omap_kp_platform_data {
14 int rows;
15 int cols;
16 int *keymap;
17 unsigned int keymapsize;
18 unsigned int rep:1;
19 unsigned long delay;
20 unsigned int dbounce:1;
21 /* specific to OMAP242x*/
22 unsigned int *row_gpios;
23 unsigned int *col_gpios;
24};
25
26/* Group (0..3) -- when multiple keys are pressed, only the
27 * keys pressed in the same group are considered as pressed. This is
28 * in order to workaround certain crappy HW designs that produce ghost
29 * keypresses. */
30#define GROUP_0 (0 << 16)
31#define GROUP_1 (1 << 16)
32#define GROUP_2 (2 << 16)
33#define GROUP_3 (3 << 16)
34#define GROUP_MASK GROUP_3
35
36#define KEY(col, row, val) (((col) << 28) | ((row) << 24) | (val))
37
38#endif
39
diff --git a/include/asm-arm/arch-omap/led.h b/include/asm-arm/arch-omap/led.h
deleted file mode 100644
index f3acae28e2da..000000000000
--- a/include/asm-arm/arch-omap/led.h
+++ /dev/null
@@ -1,24 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-omap/led.h
3 *
4 * Copyright (C) 2006 Samsung Electronics
5 * Kyungmin Park <kyungmin.park@samsung.com>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 */
11#ifndef ASMARM_ARCH_LED_H
12#define ASMARM_ARCH_LED_H
13
14struct omap_led_config {
15 struct led_classdev cdev;
16 s16 gpio;
17};
18
19struct omap_led_platform_data {
20 s16 nr_leds;
21 struct omap_led_config *leds;
22};
23
24#endif
diff --git a/include/asm-arm/arch-omap/mcbsp.h b/include/asm-arm/arch-omap/mcbsp.h
deleted file mode 100644
index 26c78f67dc8e..000000000000
--- a/include/asm-arm/arch-omap/mcbsp.h
+++ /dev/null
@@ -1,380 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-omap/mcbsp.h
3 *
4 * Defines for Multi-Channel Buffered Serial Port
5 *
6 * Copyright (C) 2002 RidgeRun, Inc.
7 * Author: Steve Johnson
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 *
23 */
24#ifndef __ASM_ARCH_OMAP_MCBSP_H
25#define __ASM_ARCH_OMAP_MCBSP_H
26
27#include <linux/completion.h>
28#include <linux/spinlock.h>
29
30#include <asm/hardware.h>
31#include <asm/arch/clock.h>
32
33#define OMAP730_MCBSP1_BASE 0xfffb1000
34#define OMAP730_MCBSP2_BASE 0xfffb1800
35
36#define OMAP1510_MCBSP1_BASE 0xe1011800
37#define OMAP1510_MCBSP2_BASE 0xfffb1000
38#define OMAP1510_MCBSP3_BASE 0xe1017000
39
40#define OMAP1610_MCBSP1_BASE 0xe1011800
41#define OMAP1610_MCBSP2_BASE 0xfffb1000
42#define OMAP1610_MCBSP3_BASE 0xe1017000
43
44#define OMAP24XX_MCBSP1_BASE 0x48074000
45#define OMAP24XX_MCBSP2_BASE 0x48076000
46
47#define OMAP34XX_MCBSP1_BASE 0x48074000
48#define OMAP34XX_MCBSP2_BASE 0x49022000
49
50#if defined(CONFIG_ARCH_OMAP15XX) || defined(CONFIG_ARCH_OMAP16XX) || defined(CONFIG_ARCH_OMAP730)
51
52#define OMAP_MCBSP_REG_DRR2 0x00
53#define OMAP_MCBSP_REG_DRR1 0x02
54#define OMAP_MCBSP_REG_DXR2 0x04
55#define OMAP_MCBSP_REG_DXR1 0x06
56#define OMAP_MCBSP_REG_SPCR2 0x08
57#define OMAP_MCBSP_REG_SPCR1 0x0a
58#define OMAP_MCBSP_REG_RCR2 0x0c
59#define OMAP_MCBSP_REG_RCR1 0x0e
60#define OMAP_MCBSP_REG_XCR2 0x10
61#define OMAP_MCBSP_REG_XCR1 0x12
62#define OMAP_MCBSP_REG_SRGR2 0x14
63#define OMAP_MCBSP_REG_SRGR1 0x16
64#define OMAP_MCBSP_REG_MCR2 0x18
65#define OMAP_MCBSP_REG_MCR1 0x1a
66#define OMAP_MCBSP_REG_RCERA 0x1c
67#define OMAP_MCBSP_REG_RCERB 0x1e
68#define OMAP_MCBSP_REG_XCERA 0x20
69#define OMAP_MCBSP_REG_XCERB 0x22
70#define OMAP_MCBSP_REG_PCR0 0x24
71#define OMAP_MCBSP_REG_RCERC 0x26
72#define OMAP_MCBSP_REG_RCERD 0x28
73#define OMAP_MCBSP_REG_XCERC 0x2A
74#define OMAP_MCBSP_REG_XCERD 0x2C
75#define OMAP_MCBSP_REG_RCERE 0x2E
76#define OMAP_MCBSP_REG_RCERF 0x30
77#define OMAP_MCBSP_REG_XCERE 0x32
78#define OMAP_MCBSP_REG_XCERF 0x34
79#define OMAP_MCBSP_REG_RCERG 0x36
80#define OMAP_MCBSP_REG_RCERH 0x38
81#define OMAP_MCBSP_REG_XCERG 0x3A
82#define OMAP_MCBSP_REG_XCERH 0x3C
83
84#define OMAP_MAX_MCBSP_COUNT 3
85#define MAX_MCBSP_CLOCKS 3
86
87#define AUDIO_MCBSP_DATAWRITE (OMAP1510_MCBSP1_BASE + OMAP_MCBSP_REG_DXR1)
88#define AUDIO_MCBSP_DATAREAD (OMAP1510_MCBSP1_BASE + OMAP_MCBSP_REG_DRR1)
89
90#define AUDIO_MCBSP OMAP_MCBSP1
91#define AUDIO_DMA_TX OMAP_DMA_MCBSP1_TX
92#define AUDIO_DMA_RX OMAP_DMA_MCBSP1_RX
93
94#elif defined(CONFIG_ARCH_OMAP24XX)
95
96#define OMAP_MCBSP_REG_DRR2 0x00
97#define OMAP_MCBSP_REG_DRR1 0x04
98#define OMAP_MCBSP_REG_DXR2 0x08
99#define OMAP_MCBSP_REG_DXR1 0x0C
100#define OMAP_MCBSP_REG_SPCR2 0x10
101#define OMAP_MCBSP_REG_SPCR1 0x14
102#define OMAP_MCBSP_REG_RCR2 0x18
103#define OMAP_MCBSP_REG_RCR1 0x1C
104#define OMAP_MCBSP_REG_XCR2 0x20
105#define OMAP_MCBSP_REG_XCR1 0x24
106#define OMAP_MCBSP_REG_SRGR2 0x28
107#define OMAP_MCBSP_REG_SRGR1 0x2C
108#define OMAP_MCBSP_REG_MCR2 0x30
109#define OMAP_MCBSP_REG_MCR1 0x34
110#define OMAP_MCBSP_REG_RCERA 0x38
111#define OMAP_MCBSP_REG_RCERB 0x3C
112#define OMAP_MCBSP_REG_XCERA 0x40
113#define OMAP_MCBSP_REG_XCERB 0x44
114#define OMAP_MCBSP_REG_PCR0 0x48
115#define OMAP_MCBSP_REG_RCERC 0x4C
116#define OMAP_MCBSP_REG_RCERD 0x50
117#define OMAP_MCBSP_REG_XCERC 0x54
118#define OMAP_MCBSP_REG_XCERD 0x58
119#define OMAP_MCBSP_REG_RCERE 0x5C
120#define OMAP_MCBSP_REG_RCERF 0x60
121#define OMAP_MCBSP_REG_XCERE 0x64
122#define OMAP_MCBSP_REG_XCERF 0x68
123#define OMAP_MCBSP_REG_RCERG 0x6C
124#define OMAP_MCBSP_REG_RCERH 0x70
125#define OMAP_MCBSP_REG_XCERG 0x74
126#define OMAP_MCBSP_REG_XCERH 0x78
127
128#define OMAP_MAX_MCBSP_COUNT 2
129#define MAX_MCBSP_CLOCKS 2
130
131#define AUDIO_MCBSP_DATAWRITE (OMAP24XX_MCBSP2_BASE + OMAP_MCBSP_REG_DXR1)
132#define AUDIO_MCBSP_DATAREAD (OMAP24XX_MCBSP2_BASE + OMAP_MCBSP_REG_DRR1)
133
134#define AUDIO_MCBSP OMAP_MCBSP2
135#define AUDIO_DMA_TX OMAP24XX_DMA_MCBSP2_TX
136#define AUDIO_DMA_RX OMAP24XX_DMA_MCBSP2_RX
137
138#endif
139
140#define OMAP_MCBSP_READ(base, reg) __raw_readw((base) + OMAP_MCBSP_REG_##reg)
141#define OMAP_MCBSP_WRITE(base, reg, val) __raw_writew((val), (base) + OMAP_MCBSP_REG_##reg)
142
143
144/************************** McBSP SPCR1 bit definitions ***********************/
145#define RRST 0x0001
146#define RRDY 0x0002
147#define RFULL 0x0004
148#define RSYNC_ERR 0x0008
149#define RINTM(value) ((value)<<4) /* bits 4:5 */
150#define ABIS 0x0040
151#define DXENA 0x0080
152#define CLKSTP(value) ((value)<<11) /* bits 11:12 */
153#define RJUST(value) ((value)<<13) /* bits 13:14 */
154#define DLB 0x8000
155
156/************************** McBSP SPCR2 bit definitions ***********************/
157#define XRST 0x0001
158#define XRDY 0x0002
159#define XEMPTY 0x0004
160#define XSYNC_ERR 0x0008
161#define XINTM(value) ((value)<<4) /* bits 4:5 */
162#define GRST 0x0040
163#define FRST 0x0080
164#define SOFT 0x0100
165#define FREE 0x0200
166
167/************************** McBSP PCR bit definitions *************************/
168#define CLKRP 0x0001
169#define CLKXP 0x0002
170#define FSRP 0x0004
171#define FSXP 0x0008
172#define DR_STAT 0x0010
173#define DX_STAT 0x0020
174#define CLKS_STAT 0x0040
175#define SCLKME 0x0080
176#define CLKRM 0x0100
177#define CLKXM 0x0200
178#define FSRM 0x0400
179#define FSXM 0x0800
180#define RIOEN 0x1000
181#define XIOEN 0x2000
182#define IDLE_EN 0x4000
183
184/************************** McBSP RCR1 bit definitions ************************/
185#define RWDLEN1(value) ((value)<<5) /* Bits 5:7 */
186#define RFRLEN1(value) ((value)<<8) /* Bits 8:14 */
187
188/************************** McBSP XCR1 bit definitions ************************/
189#define XWDLEN1(value) ((value)<<5) /* Bits 5:7 */
190#define XFRLEN1(value) ((value)<<8) /* Bits 8:14 */
191
192/*************************** McBSP RCR2 bit definitions ***********************/
193#define RDATDLY(value) (value) /* Bits 0:1 */
194#define RFIG 0x0004
195#define RCOMPAND(value) ((value)<<3) /* Bits 3:4 */
196#define RWDLEN2(value) ((value)<<5) /* Bits 5:7 */
197#define RFRLEN2(value) ((value)<<8) /* Bits 8:14 */
198#define RPHASE 0x8000
199
200/*************************** McBSP XCR2 bit definitions ***********************/
201#define XDATDLY(value) (value) /* Bits 0:1 */
202#define XFIG 0x0004
203#define XCOMPAND(value) ((value)<<3) /* Bits 3:4 */
204#define XWDLEN2(value) ((value)<<5) /* Bits 5:7 */
205#define XFRLEN2(value) ((value)<<8) /* Bits 8:14 */
206#define XPHASE 0x8000
207
208/************************* McBSP SRGR1 bit definitions ************************/
209#define CLKGDV(value) (value) /* Bits 0:7 */
210#define FWID(value) ((value)<<8) /* Bits 8:15 */
211
212/************************* McBSP SRGR2 bit definitions ************************/
213#define FPER(value) (value) /* Bits 0:11 */
214#define FSGM 0x1000
215#define CLKSM 0x2000
216#define CLKSP 0x4000
217#define GSYNC 0x8000
218
219/************************* McBSP MCR1 bit definitions *************************/
220#define RMCM 0x0001
221#define RCBLK(value) ((value)<<2) /* Bits 2:4 */
222#define RPABLK(value) ((value)<<5) /* Bits 5:6 */
223#define RPBBLK(value) ((value)<<7) /* Bits 7:8 */
224
225/************************* McBSP MCR2 bit definitions *************************/
226#define XMCM(value) (value) /* Bits 0:1 */
227#define XCBLK(value) ((value)<<2) /* Bits 2:4 */
228#define XPABLK(value) ((value)<<5) /* Bits 5:6 */
229#define XPBBLK(value) ((value)<<7) /* Bits 7:8 */
230
231
232/* we don't do multichannel for now */
233struct omap_mcbsp_reg_cfg {
234 u16 spcr2;
235 u16 spcr1;
236 u16 rcr2;
237 u16 rcr1;
238 u16 xcr2;
239 u16 xcr1;
240 u16 srgr2;
241 u16 srgr1;
242 u16 mcr2;
243 u16 mcr1;
244 u16 pcr0;
245 u16 rcerc;
246 u16 rcerd;
247 u16 xcerc;
248 u16 xcerd;
249 u16 rcere;
250 u16 rcerf;
251 u16 xcere;
252 u16 xcerf;
253 u16 rcerg;
254 u16 rcerh;
255 u16 xcerg;
256 u16 xcerh;
257};
258
259typedef enum {
260 OMAP_MCBSP1 = 0,
261 OMAP_MCBSP2,
262 OMAP_MCBSP3,
263} omap_mcbsp_id;
264
265typedef int __bitwise omap_mcbsp_io_type_t;
266#define OMAP_MCBSP_IRQ_IO ((__force omap_mcbsp_io_type_t) 1)
267#define OMAP_MCBSP_POLL_IO ((__force omap_mcbsp_io_type_t) 2)
268
269typedef enum {
270 OMAP_MCBSP_WORD_8 = 0,
271 OMAP_MCBSP_WORD_12,
272 OMAP_MCBSP_WORD_16,
273 OMAP_MCBSP_WORD_20,
274 OMAP_MCBSP_WORD_24,
275 OMAP_MCBSP_WORD_32,
276} omap_mcbsp_word_length;
277
278typedef enum {
279 OMAP_MCBSP_CLK_RISING = 0,
280 OMAP_MCBSP_CLK_FALLING,
281} omap_mcbsp_clk_polarity;
282
283typedef enum {
284 OMAP_MCBSP_FS_ACTIVE_HIGH = 0,
285 OMAP_MCBSP_FS_ACTIVE_LOW,
286} omap_mcbsp_fs_polarity;
287
288typedef enum {
289 OMAP_MCBSP_CLK_STP_MODE_NO_DELAY = 0,
290 OMAP_MCBSP_CLK_STP_MODE_DELAY,
291} omap_mcbsp_clk_stp_mode;
292
293
294/******* SPI specific mode **********/
295typedef enum {
296 OMAP_MCBSP_SPI_MASTER = 0,
297 OMAP_MCBSP_SPI_SLAVE,
298} omap_mcbsp_spi_mode;
299
300struct omap_mcbsp_spi_cfg {
301 omap_mcbsp_spi_mode spi_mode;
302 omap_mcbsp_clk_polarity rx_clock_polarity;
303 omap_mcbsp_clk_polarity tx_clock_polarity;
304 omap_mcbsp_fs_polarity fsx_polarity;
305 u8 clk_div;
306 omap_mcbsp_clk_stp_mode clk_stp_mode;
307 omap_mcbsp_word_length word_length;
308};
309
310/* Platform specific configuration */
311struct omap_mcbsp_ops {
312 void (*request)(unsigned int);
313 void (*free)(unsigned int);
314 int (*check)(unsigned int);
315};
316
317struct omap_mcbsp_platform_data {
318 u32 virt_base;
319 u8 dma_rx_sync, dma_tx_sync;
320 u16 rx_irq, tx_irq;
321 struct omap_mcbsp_ops *ops;
322 char const *clk_name;
323};
324
325struct omap_mcbsp {
326 struct device *dev;
327 u32 io_base;
328 u8 id;
329 u8 free;
330 omap_mcbsp_word_length rx_word_length;
331 omap_mcbsp_word_length tx_word_length;
332
333 omap_mcbsp_io_type_t io_type; /* IRQ or poll */
334 /* IRQ based TX/RX */
335 int rx_irq;
336 int tx_irq;
337
338 /* DMA stuff */
339 u8 dma_rx_sync;
340 short dma_rx_lch;
341 u8 dma_tx_sync;
342 short dma_tx_lch;
343
344 /* Completion queues */
345 struct completion tx_irq_completion;
346 struct completion rx_irq_completion;
347 struct completion tx_dma_completion;
348 struct completion rx_dma_completion;
349
350 /* Protect the field .free, while checking if the mcbsp is in use */
351 spinlock_t lock;
352 struct omap_mcbsp_platform_data *pdata;
353 struct clk *clk;
354};
355
356int omap_mcbsp_init(void);
357void omap_mcbsp_register_board_cfg(struct omap_mcbsp_platform_data *config,
358 int size);
359void omap_mcbsp_config(unsigned int id, const struct omap_mcbsp_reg_cfg * config);
360int omap_mcbsp_request(unsigned int id);
361void omap_mcbsp_free(unsigned int id);
362void omap_mcbsp_start(unsigned int id);
363void omap_mcbsp_stop(unsigned int id);
364void omap_mcbsp_xmit_word(unsigned int id, u32 word);
365u32 omap_mcbsp_recv_word(unsigned int id);
366
367int omap_mcbsp_xmit_buffer(unsigned int id, dma_addr_t buffer, unsigned int length);
368int omap_mcbsp_recv_buffer(unsigned int id, dma_addr_t buffer, unsigned int length);
369int omap_mcbsp_spi_master_xmit_word_poll(unsigned int id, u32 word);
370int omap_mcbsp_spi_master_recv_word_poll(unsigned int id, u32 * word);
371
372
373/* SPI specific API */
374void omap_mcbsp_set_spi_mode(unsigned int id, const struct omap_mcbsp_spi_cfg * spi_cfg);
375
376/* Polled read/write functions */
377int omap_mcbsp_pollread(unsigned int id, u16 * buf);
378int omap_mcbsp_pollwrite(unsigned int id, u16 buf);
379
380#endif
diff --git a/include/asm-arm/arch-omap/memory.h b/include/asm-arm/arch-omap/memory.h
deleted file mode 100644
index 14cba97c18ad..000000000000
--- a/include/asm-arm/arch-omap/memory.h
+++ /dev/null
@@ -1,103 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-omap/memory.h
3 *
4 * Memory map for OMAP-1510 and 1610
5 *
6 * Copyright (C) 2000 RidgeRun, Inc.
7 * Author: Greg Lonnon <glonnon@ridgerun.com>
8 *
9 * This file was derived from linux/include/asm-arm/arch-intergrator/memory.h
10 * Copyright (C) 1999 ARM Limited
11 *
12 * This program is free software; you can redistribute it and/or modify it
13 * under the terms of the GNU General Public License as published by the
14 * Free Software Foundation; either version 2 of the License, or (at your
15 * option) any later version.
16 *
17 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
18 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
19 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
20 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
23 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
24 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 *
28 * You should have received a copy of the GNU General Public License along
29 * with this program; if not, write to the Free Software Foundation, Inc.,
30 * 675 Mass Ave, Cambridge, MA 02139, USA.
31 */
32
33#ifndef __ASM_ARCH_MEMORY_H
34#define __ASM_ARCH_MEMORY_H
35
36/*
37 * Physical DRAM offset.
38 */
39#if defined(CONFIG_ARCH_OMAP1)
40#define PHYS_OFFSET UL(0x10000000)
41#elif defined(CONFIG_ARCH_OMAP2)
42#define PHYS_OFFSET UL(0x80000000)
43#endif
44
45/*
46 * Conversion between SDRAM and fake PCI bus, used by USB
47 * NOTE: Physical address must be converted to Local Bus address
48 * on OMAP-1510 only
49 */
50
51/*
52 * Bus address is physical address, except for OMAP-1510 Local Bus.
53 */
54#define __virt_to_bus(x) __virt_to_phys(x)
55#define __bus_to_virt(x) __phys_to_virt(x)
56
57/*
58 * OMAP-1510 bus address is translated into a Local Bus address if the
59 * OMAP bus type is lbus. We do the address translation based on the
60 * device overriding the defaults used in the dma-mapping API.
61 * Note that the is_lbus_device() test is not very efficient on 1510
62 * because of the strncmp().
63 */
64#ifdef CONFIG_ARCH_OMAP15XX
65
66/*
67 * OMAP-1510 Local Bus address offset
68 */
69#define OMAP1510_LB_OFFSET UL(0x30000000)
70
71#define virt_to_lbus(x) ((x) - PAGE_OFFSET + OMAP1510_LB_OFFSET)
72#define lbus_to_virt(x) ((x) - OMAP1510_LB_OFFSET + PAGE_OFFSET)
73#define is_lbus_device(dev) (cpu_is_omap15xx() && dev && (strncmp(dev->bus_id, "ohci", 4) == 0))
74
75#define __arch_page_to_dma(dev, page) ({is_lbus_device(dev) ? \
76 (dma_addr_t)virt_to_lbus(page_address(page)) : \
77 (dma_addr_t)__virt_to_bus(page_address(page));})
78
79#define __arch_dma_to_virt(dev, addr) ({is_lbus_device(dev) ? \
80 lbus_to_virt(addr) : \
81 __bus_to_virt(addr);})
82
83#define __arch_virt_to_dma(dev, addr) ({is_lbus_device(dev) ? \
84 virt_to_lbus(addr) : \
85 __virt_to_bus(addr);})
86
87#endif /* CONFIG_ARCH_OMAP15XX */
88
89/* Override the ARM default */
90#ifdef CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE
91
92#if (CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE == 0)
93#undef CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE
94#define CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE 2
95#endif
96
97#define CONSISTENT_DMA_SIZE \
98 (((CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE + 1) & ~1) * 1024 * 1024)
99
100#endif
101
102#endif
103
diff --git a/include/asm-arm/arch-omap/menelaus.h b/include/asm-arm/arch-omap/menelaus.h
deleted file mode 100644
index 69ed7ee40179..000000000000
--- a/include/asm-arm/arch-omap/menelaus.h
+++ /dev/null
@@ -1,49 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-omap/menelaus.h
3 *
4 * Functions to access Menelaus power management chip
5 */
6
7#ifndef __ASM_ARCH_MENELAUS_H
8#define __ASM_ARCH_MENELAUS_H
9
10struct device;
11
12struct menelaus_platform_data {
13 int (* late_init)(struct device *dev);
14};
15
16extern int menelaus_register_mmc_callback(void (*callback)(void *data, u8 card_mask),
17 void *data);
18extern void menelaus_unregister_mmc_callback(void);
19extern int menelaus_set_mmc_opendrain(int slot, int enable);
20extern int menelaus_set_mmc_slot(int slot, int enable, int power, int cd_on);
21
22extern int menelaus_set_vmem(unsigned int mV);
23extern int menelaus_set_vio(unsigned int mV);
24extern int menelaus_set_vmmc(unsigned int mV);
25extern int menelaus_set_vaux(unsigned int mV);
26extern int menelaus_set_vdcdc(int dcdc, unsigned int mV);
27extern int menelaus_set_slot_sel(int enable);
28extern int menelaus_get_slot_pin_states(void);
29extern int menelaus_set_vcore_sw(unsigned int mV);
30extern int menelaus_set_vcore_hw(unsigned int roof_mV, unsigned int floor_mV);
31
32#define EN_VPLL_SLEEP (1 << 7)
33#define EN_VMMC_SLEEP (1 << 6)
34#define EN_VAUX_SLEEP (1 << 5)
35#define EN_VIO_SLEEP (1 << 4)
36#define EN_VMEM_SLEEP (1 << 3)
37#define EN_DC3_SLEEP (1 << 2)
38#define EN_DC2_SLEEP (1 << 1)
39#define EN_VC_SLEEP (1 << 0)
40
41extern int menelaus_set_regulator_sleep(int enable, u32 val);
42
43#if defined(CONFIG_ARCH_OMAP24XX) && defined(CONFIG_MENELAUS)
44#define omap_has_menelaus() 1
45#else
46#define omap_has_menelaus() 0
47#endif
48
49#endif
diff --git a/include/asm-arm/arch-omap/mmc.h b/include/asm-arm/arch-omap/mmc.h
deleted file mode 100644
index 7cfc5f258560..000000000000
--- a/include/asm-arm/arch-omap/mmc.h
+++ /dev/null
@@ -1,74 +0,0 @@
1/*
2 * MMC definitions for OMAP2
3 *
4 * Copyright (C) 2006 Nokia Corporation
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10
11#ifndef __OMAP2_MMC_H
12#define __OMAP2_MMC_H
13
14#include <linux/types.h>
15#include <linux/device.h>
16#include <linux/mmc/host.h>
17
18#include <asm/arch/board.h>
19
20#define OMAP_MMC_MAX_SLOTS 2
21
22struct omap_mmc_platform_data {
23 struct omap_mmc_conf conf;
24
25 /* number of slots on board */
26 unsigned nr_slots:2;
27
28 /* set if your board has components or wiring that limits the
29 * maximum frequency on the MMC bus */
30 unsigned int max_freq;
31
32 /* switch the bus to a new slot */
33 int (* switch_slot)(struct device *dev, int slot);
34 /* initialize board-specific MMC functionality, can be NULL if
35 * not supported */
36 int (* init)(struct device *dev);
37 void (* cleanup)(struct device *dev);
38 void (* shutdown)(struct device *dev);
39
40 /* To handle board related suspend/resume functionality for MMC */
41 int (*suspend)(struct device *dev, int slot);
42 int (*resume)(struct device *dev, int slot);
43
44 struct omap_mmc_slot_data {
45 int (* set_bus_mode)(struct device *dev, int slot, int bus_mode);
46 int (* set_power)(struct device *dev, int slot, int power_on, int vdd);
47 int (* get_ro)(struct device *dev, int slot);
48
49 /* return MMC cover switch state, can be NULL if not supported.
50 *
51 * possible return values:
52 * 0 - open
53 * 1 - closed
54 */
55 int (* get_cover_state)(struct device *dev, int slot);
56
57 const char *name;
58 u32 ocr_mask;
59
60 /* Card detection IRQs */
61 int card_detect_irq;
62 int (* card_detect)(int irq);
63
64 unsigned int ban_openended:1;
65
66 } slots[OMAP_MMC_MAX_SLOTS];
67};
68
69extern void omap_set_mmc_info(int host, const struct omap_mmc_platform_data *info);
70
71/* called from board-specific card detection service routine */
72extern void omap_mmc_notify_cover_event(struct device *dev, int slot, int is_closed);
73
74#endif
diff --git a/include/asm-arm/arch-omap/mtd-xip.h b/include/asm-arm/arch-omap/mtd-xip.h
deleted file mode 100644
index a73a28571fee..000000000000
--- a/include/asm-arm/arch-omap/mtd-xip.h
+++ /dev/null
@@ -1,61 +0,0 @@
1/*
2 * MTD primitives for XIP support. Architecture specific functions.
3 *
4 * Do not include this file directly. It's included from linux/mtd/xip.h
5 *
6 * Author: Vladimir Barinov <vbarinov@ru.mvista.com>
7 *
8 * (c) 2005 MontaVista Software, Inc. This file is licensed under the
9 * terms of the GNU General Public License version 2. This program is
10 * licensed "as is" without any warranty of any kind, whether express or
11 * implied.
12 */
13
14#ifndef __ARCH_OMAP_MTD_XIP_H__
15#define __ARCH_OMAP_MTD_XIP_H__
16
17#include <asm/hardware.h>
18#define OMAP_MPU_TIMER_BASE (0xfffec500)
19#define OMAP_MPU_TIMER_OFFSET 0x100
20
21typedef struct {
22 u32 cntl; /* CNTL_TIMER, R/W */
23 u32 load_tim; /* LOAD_TIM, W */
24 u32 read_tim; /* READ_TIM, R */
25} xip_omap_mpu_timer_regs_t;
26
27#define xip_omap_mpu_timer_base(n) \
28((volatile xip_omap_mpu_timer_regs_t*)IO_ADDRESS(OMAP_MPU_TIMER_BASE + \
29 (n)*OMAP_MPU_TIMER_OFFSET))
30
31static inline unsigned long xip_omap_mpu_timer_read(int nr)
32{
33 volatile xip_omap_mpu_timer_regs_t* timer = xip_omap_mpu_timer_base(nr);
34 return timer->read_tim;
35}
36
37#define xip_irqpending() \
38 (omap_readl(OMAP_IH1_ITR) & ~omap_readl(OMAP_IH1_MIR))
39#define xip_currtime() (~xip_omap_mpu_timer_read(0))
40
41/*
42 * It's permitted to do approxmation for xip_elapsed_since macro
43 * (see linux/mtd/xip.h)
44 */
45
46#ifdef CONFIG_MACH_OMAP_PERSEUS2
47#define xip_elapsed_since(x) (signed)((~xip_omap_mpu_timer_read(0) - (x)) / 7)
48#else
49#define xip_elapsed_since(x) (signed)((~xip_omap_mpu_timer_read(0) - (x)) / 6)
50#endif
51
52/*
53 * xip_cpu_idle() is used when waiting for a delay equal or larger than
54 * the system timer tick period. This should put the CPU into idle mode
55 * to save power and to be woken up only when some interrupts are pending.
56 * As above, this should not rely upon standard kernel code.
57 */
58
59#define xip_cpu_idle() asm volatile ("mcr p15, 0, %0, c7, c0, 4" :: "r" (1))
60
61#endif /* __ARCH_OMAP_MTD_XIP_H__ */
diff --git a/include/asm-arm/arch-omap/mux.h b/include/asm-arm/arch-omap/mux.h
deleted file mode 100644
index ff9a5b5575fd..000000000000
--- a/include/asm-arm/arch-omap/mux.h
+++ /dev/null
@@ -1,615 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-omap/mux.h
3 *
4 * Table of the Omap register configurations for the FUNC_MUX and
5 * PULL_DWN combinations.
6 *
7 * Copyright (C) 2004 - 2008 Texas Instruments Inc.
8 * Copyright (C) 2003 - 2008 Nokia Corporation
9 *
10 * Written by Tony Lindgren
11 *
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 2 of the License, or
15 * (at your option) any later version.
16 *
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 *
26 * NOTE: Please use the following naming style for new pin entries.
27 * For example, W8_1610_MMC2_DAT0, where:
28 * - W8 = ball
29 * - 1610 = 1510 or 1610, none if common for both 1510 and 1610
30 * - MMC2_DAT0 = function
31 */
32
33#ifndef __ASM_ARCH_MUX_H
34#define __ASM_ARCH_MUX_H
35
36#define PU_PD_SEL_NA 0 /* No pu_pd reg available */
37#define PULL_DWN_CTRL_NA 0 /* No pull-down control needed */
38
39#ifdef CONFIG_OMAP_MUX_DEBUG
40#define MUX_REG(reg, mode_offset, mode) .mux_reg_name = "FUNC_MUX_CTRL_"#reg, \
41 .mux_reg = FUNC_MUX_CTRL_##reg, \
42 .mask_offset = mode_offset, \
43 .mask = mode,
44
45#define PULL_REG(reg, bit, status) .pull_name = "PULL_DWN_CTRL_"#reg, \
46 .pull_reg = PULL_DWN_CTRL_##reg, \
47 .pull_bit = bit, \
48 .pull_val = status,
49
50#define PU_PD_REG(reg, status) .pu_pd_name = "PU_PD_SEL_"#reg, \
51 .pu_pd_reg = PU_PD_SEL_##reg, \
52 .pu_pd_val = status,
53
54#define MUX_REG_730(reg, mode_offset, mode) .mux_reg_name = "OMAP730_IO_CONF_"#reg, \
55 .mux_reg = OMAP730_IO_CONF_##reg, \
56 .mask_offset = mode_offset, \
57 .mask = mode,
58
59#define PULL_REG_730(reg, bit, status) .pull_name = "OMAP730_IO_CONF_"#reg, \
60 .pull_reg = OMAP730_IO_CONF_##reg, \
61 .pull_bit = bit, \
62 .pull_val = status,
63
64#else
65
66#define MUX_REG(reg, mode_offset, mode) .mux_reg = FUNC_MUX_CTRL_##reg, \
67 .mask_offset = mode_offset, \
68 .mask = mode,
69
70#define PULL_REG(reg, bit, status) .pull_reg = PULL_DWN_CTRL_##reg, \
71 .pull_bit = bit, \
72 .pull_val = status,
73
74#define PU_PD_REG(reg, status) .pu_pd_reg = PU_PD_SEL_##reg, \
75 .pu_pd_val = status,
76
77#define MUX_REG_730(reg, mode_offset, mode) \
78 .mux_reg = OMAP730_IO_CONF_##reg, \
79 .mask_offset = mode_offset, \
80 .mask = mode,
81
82#define PULL_REG_730(reg, bit, status) .pull_reg = OMAP730_IO_CONF_##reg, \
83 .pull_bit = bit, \
84 .pull_val = status,
85
86#endif /* CONFIG_OMAP_MUX_DEBUG */
87
88#define MUX_CFG(desc, mux_reg, mode_offset, mode, \
89 pull_reg, pull_bit, pull_status, \
90 pu_pd_reg, pu_pd_status, debug_status) \
91{ \
92 .name = desc, \
93 .debug = debug_status, \
94 MUX_REG(mux_reg, mode_offset, mode) \
95 PULL_REG(pull_reg, pull_bit, pull_status) \
96 PU_PD_REG(pu_pd_reg, pu_pd_status) \
97},
98
99
100/*
101 * OMAP730 has a slightly different config for the pin mux.
102 * - config regs are the OMAP730_IO_CONF_x regs (see omap730.h) regs and
103 * not the FUNC_MUX_CTRL_x regs from hardware.h
104 * - for pull-up/down, only has one enable bit which is is in the same register
105 * as mux config
106 */
107#define MUX_CFG_730(desc, mux_reg, mode_offset, mode, \
108 pull_bit, pull_status, debug_status)\
109{ \
110 .name = desc, \
111 .debug = debug_status, \
112 MUX_REG_730(mux_reg, mode_offset, mode) \
113 PULL_REG_730(mux_reg, pull_bit, pull_status) \
114 PU_PD_REG(NA, 0) \
115},
116
117#define MUX_CFG_24XX(desc, reg_offset, mode, \
118 pull_en, pull_mode, dbg) \
119{ \
120 .name = desc, \
121 .debug = dbg, \
122 .mux_reg = reg_offset, \
123 .mask = mode, \
124 .pull_val = pull_en, \
125 .pu_pd_val = pull_mode, \
126},
127
128
129#define PULL_DISABLED 0
130#define PULL_ENABLED 1
131
132#define PULL_DOWN 0
133#define PULL_UP 1
134
135struct pin_config {
136 char *name;
137 unsigned char busy;
138 unsigned char debug;
139
140 const char *mux_reg_name;
141 const unsigned int mux_reg;
142 const unsigned char mask_offset;
143 const unsigned char mask;
144
145 const char *pull_name;
146 const unsigned int pull_reg;
147 const unsigned char pull_val;
148 const unsigned char pull_bit;
149
150 const char *pu_pd_name;
151 const unsigned int pu_pd_reg;
152 const unsigned char pu_pd_val;
153};
154
155enum omap730_index {
156 /* OMAP 730 keyboard */
157 E2_730_KBR0,
158 J7_730_KBR1,
159 E1_730_KBR2,
160 F3_730_KBR3,
161 D2_730_KBR4,
162 C2_730_KBC0,
163 D3_730_KBC1,
164 E4_730_KBC2,
165 F4_730_KBC3,
166 E3_730_KBC4,
167
168 /* USB */
169 AA17_730_USB_DM,
170 W16_730_USB_PU_EN,
171 W17_730_USB_VBUSI,
172};
173
174enum omap1xxx_index {
175 /* UART1 (BT_UART_GATING)*/
176 UART1_TX = 0,
177 UART1_RTS,
178
179 /* UART2 (COM_UART_GATING)*/
180 UART2_TX,
181 UART2_RX,
182 UART2_CTS,
183 UART2_RTS,
184
185 /* UART3 (GIGA_UART_GATING) */
186 UART3_TX,
187 UART3_RX,
188 UART3_CTS,
189 UART3_RTS,
190 UART3_CLKREQ,
191 UART3_BCLK, /* 12MHz clock out */
192 Y15_1610_UART3_RTS,
193
194 /* PWT & PWL */
195 PWT,
196 PWL,
197
198 /* USB master generic */
199 R18_USB_VBUS,
200 R18_1510_USB_GPIO0,
201 W4_USB_PUEN,
202 W4_USB_CLKO,
203 W4_USB_HIGHZ,
204 W4_GPIO58,
205
206 /* USB1 master */
207 USB1_SUSP,
208 USB1_SEO,
209 W13_1610_USB1_SE0,
210 USB1_TXEN,
211 USB1_TXD,
212 USB1_VP,
213 USB1_VM,
214 USB1_RCV,
215 USB1_SPEED,
216 R13_1610_USB1_SPEED,
217 R13_1710_USB1_SE0,
218
219 /* USB2 master */
220 USB2_SUSP,
221 USB2_VP,
222 USB2_TXEN,
223 USB2_VM,
224 USB2_RCV,
225 USB2_SEO,
226 USB2_TXD,
227
228 /* OMAP-1510 GPIO */
229 R18_1510_GPIO0,
230 R19_1510_GPIO1,
231 M14_1510_GPIO2,
232
233 /* OMAP1610 GPIO */
234 P18_1610_GPIO3,
235 Y15_1610_GPIO17,
236
237 /* OMAP-1710 GPIO */
238 R18_1710_GPIO0,
239 V2_1710_GPIO10,
240 N21_1710_GPIO14,
241 W15_1710_GPIO40,
242
243 /* MPUIO */
244 MPUIO2,
245 N15_1610_MPUIO2,
246 MPUIO4,
247 MPUIO5,
248 T20_1610_MPUIO5,
249 W11_1610_MPUIO6,
250 V10_1610_MPUIO7,
251 W11_1610_MPUIO9,
252 V10_1610_MPUIO10,
253 W10_1610_MPUIO11,
254 E20_1610_MPUIO13,
255 U20_1610_MPUIO14,
256 E19_1610_MPUIO15,
257
258 /* MCBSP2 */
259 MCBSP2_CLKR,
260 MCBSP2_CLKX,
261 MCBSP2_DR,
262 MCBSP2_DX,
263 MCBSP2_FSR,
264 MCBSP2_FSX,
265
266 /* MCBSP3 */
267 MCBSP3_CLKX,
268
269 /* Misc ballouts */
270 BALLOUT_V8_ARMIO3,
271 N20_HDQ,
272
273 /* OMAP-1610 MMC2 */
274 W8_1610_MMC2_DAT0,
275 V8_1610_MMC2_DAT1,
276 W15_1610_MMC2_DAT2,
277 R10_1610_MMC2_DAT3,
278 Y10_1610_MMC2_CLK,
279 Y8_1610_MMC2_CMD,
280 V9_1610_MMC2_CMDDIR,
281 V5_1610_MMC2_DATDIR0,
282 W19_1610_MMC2_DATDIR1,
283 R18_1610_MMC2_CLKIN,
284
285 /* OMAP-1610 External Trace Interface */
286 M19_1610_ETM_PSTAT0,
287 L15_1610_ETM_PSTAT1,
288 L18_1610_ETM_PSTAT2,
289 L19_1610_ETM_D0,
290 J19_1610_ETM_D6,
291 J18_1610_ETM_D7,
292
293 /* OMAP16XX GPIO */
294 P20_1610_GPIO4,
295 V9_1610_GPIO7,
296 W8_1610_GPIO9,
297 N20_1610_GPIO11,
298 N19_1610_GPIO13,
299 P10_1610_GPIO22,
300 V5_1610_GPIO24,
301 AA20_1610_GPIO_41,
302 W19_1610_GPIO48,
303 M7_1610_GPIO62,
304 V14_16XX_GPIO37,
305 R9_16XX_GPIO18,
306 L14_16XX_GPIO49,
307
308 /* OMAP-1610 uWire */
309 V19_1610_UWIRE_SCLK,
310 U18_1610_UWIRE_SDI,
311 W21_1610_UWIRE_SDO,
312 N14_1610_UWIRE_CS0,
313 P15_1610_UWIRE_CS3,
314 N15_1610_UWIRE_CS1,
315
316 /* OMAP-1610 SPI */
317 U19_1610_SPIF_SCK,
318 U18_1610_SPIF_DIN,
319 P20_1610_SPIF_DIN,
320 W21_1610_SPIF_DOUT,
321 R18_1610_SPIF_DOUT,
322 N14_1610_SPIF_CS0,
323 N15_1610_SPIF_CS1,
324 T19_1610_SPIF_CS2,
325 P15_1610_SPIF_CS3,
326
327 /* OMAP-1610 Flash */
328 L3_1610_FLASH_CS2B_OE,
329 M8_1610_FLASH_CS2B_WE,
330
331 /* First MMC */
332 MMC_CMD,
333 MMC_DAT1,
334 MMC_DAT2,
335 MMC_DAT0,
336 MMC_CLK,
337 MMC_DAT3,
338
339 /* OMAP-1710 MMC CMDDIR and DATDIR0 */
340 M15_1710_MMC_CLKI,
341 P19_1710_MMC_CMDDIR,
342 P20_1710_MMC_DATDIR0,
343
344 /* OMAP-1610 USB0 alternate pin configuration */
345 W9_USB0_TXEN,
346 AA9_USB0_VP,
347 Y5_USB0_RCV,
348 R9_USB0_VM,
349 V6_USB0_TXD,
350 W5_USB0_SE0,
351 V9_USB0_SPEED,
352 V9_USB0_SUSP,
353
354 /* USB2 */
355 W9_USB2_TXEN,
356 AA9_USB2_VP,
357 Y5_USB2_RCV,
358 R9_USB2_VM,
359 V6_USB2_TXD,
360 W5_USB2_SE0,
361
362 /* 16XX UART */
363 R13_1610_UART1_TX,
364 V14_16XX_UART1_RX,
365 R14_1610_UART1_CTS,
366 AA15_1610_UART1_RTS,
367 R9_16XX_UART2_RX,
368 L14_16XX_UART3_RX,
369
370 /* I2C OMAP-1610 */
371 I2C_SCL,
372 I2C_SDA,
373
374 /* Keypad */
375 F18_1610_KBC0,
376 D20_1610_KBC1,
377 D19_1610_KBC2,
378 E18_1610_KBC3,
379 C21_1610_KBC4,
380 G18_1610_KBR0,
381 F19_1610_KBR1,
382 H14_1610_KBR2,
383 E20_1610_KBR3,
384 E19_1610_KBR4,
385 N19_1610_KBR5,
386
387 /* Power management */
388 T20_1610_LOW_PWR,
389
390 /* MCLK Settings */
391 V5_1710_MCLK_ON,
392 V5_1710_MCLK_OFF,
393 R10_1610_MCLK_ON,
394 R10_1610_MCLK_OFF,
395
396 /* CompactFlash controller */
397 P11_1610_CF_CD2,
398 R11_1610_CF_IOIS16,
399 V10_1610_CF_IREQ,
400 W10_1610_CF_RESET,
401 W11_1610_CF_CD1,
402
403 /* parallel camera */
404 J15_1610_CAM_LCLK,
405 J18_1610_CAM_D7,
406 J19_1610_CAM_D6,
407 J14_1610_CAM_D5,
408 K18_1610_CAM_D4,
409 K19_1610_CAM_D3,
410 K15_1610_CAM_D2,
411 K14_1610_CAM_D1,
412 L19_1610_CAM_D0,
413 L18_1610_CAM_VS,
414 L15_1610_CAM_HS,
415 M19_1610_CAM_RSTZ,
416 Y15_1610_CAM_OUTCLK,
417
418 /* serial camera */
419 H19_1610_CAM_EXCLK,
420 Y12_1610_CCP_CLKP,
421 W13_1610_CCP_CLKM,
422 W14_1610_CCP_DATAP,
423 Y14_1610_CCP_DATAM,
424
425};
426
427enum omap24xx_index {
428 /* 24xx I2C */
429 M19_24XX_I2C1_SCL,
430 L15_24XX_I2C1_SDA,
431 J15_24XX_I2C2_SCL,
432 H19_24XX_I2C2_SDA,
433
434 /* 24xx Menelaus interrupt */
435 W19_24XX_SYS_NIRQ,
436
437 /* 24xx clock */
438 W14_24XX_SYS_CLKOUT,
439
440 /* 24xx GPMC chipselects, wait pin monitoring */
441 E2_GPMC_NCS2,
442 L2_GPMC_NCS7,
443 L3_GPMC_WAIT0,
444 N7_GPMC_WAIT1,
445 M1_GPMC_WAIT2,
446 P1_GPMC_WAIT3,
447
448 /* 242X McBSP */
449 Y15_24XX_MCBSP2_CLKX,
450 R14_24XX_MCBSP2_FSX,
451 W15_24XX_MCBSP2_DR,
452 V15_24XX_MCBSP2_DX,
453
454 /* 24xx GPIO */
455 M21_242X_GPIO11,
456 P21_242X_GPIO12,
457 AA10_242X_GPIO13,
458 AA6_242X_GPIO14,
459 AA4_242X_GPIO15,
460 Y11_242X_GPIO16,
461 AA12_242X_GPIO17,
462 AA8_242X_GPIO58,
463 Y20_24XX_GPIO60,
464 W4__24XX_GPIO74,
465 N15_24XX_GPIO85,
466 M15_24XX_GPIO92,
467 P20_24XX_GPIO93,
468 P18_24XX_GPIO95,
469 M18_24XX_GPIO96,
470 L14_24XX_GPIO97,
471 J15_24XX_GPIO99,
472 V14_24XX_GPIO117,
473 P14_24XX_GPIO125,
474
475 /* 242x DBG GPIO */
476 V4_242X_GPIO49,
477 W2_242X_GPIO50,
478 U4_242X_GPIO51,
479 V3_242X_GPIO52,
480 V2_242X_GPIO53,
481 V6_242X_GPIO53,
482 T4_242X_GPIO54,
483 Y4_242X_GPIO54,
484 T3_242X_GPIO55,
485 U2_242X_GPIO56,
486
487 /* 24xx external DMA requests */
488 AA10_242X_DMAREQ0,
489 AA6_242X_DMAREQ1,
490 E4_242X_DMAREQ2,
491 G4_242X_DMAREQ3,
492 D3_242X_DMAREQ4,
493 E3_242X_DMAREQ5,
494
495 /* UART3 */
496 K15_24XX_UART3_TX,
497 K14_24XX_UART3_RX,
498
499 /* MMC/SDIO */
500 G19_24XX_MMC_CLKO,
501 H18_24XX_MMC_CMD,
502 F20_24XX_MMC_DAT0,
503 H14_24XX_MMC_DAT1,
504 E19_24XX_MMC_DAT2,
505 D19_24XX_MMC_DAT3,
506 F19_24XX_MMC_DAT_DIR0,
507 E20_24XX_MMC_DAT_DIR1,
508 F18_24XX_MMC_DAT_DIR2,
509 E18_24XX_MMC_DAT_DIR3,
510 G18_24XX_MMC_CMD_DIR,
511 H15_24XX_MMC_CLKI,
512
513 /* Full speed USB */
514 J20_24XX_USB0_PUEN,
515 J19_24XX_USB0_VP,
516 K20_24XX_USB0_VM,
517 J18_24XX_USB0_RCV,
518 K19_24XX_USB0_TXEN,
519 J14_24XX_USB0_SE0,
520 K18_24XX_USB0_DAT,
521
522 N14_24XX_USB1_SE0,
523 W12_24XX_USB1_SE0,
524 P15_24XX_USB1_DAT,
525 R13_24XX_USB1_DAT,
526 W20_24XX_USB1_TXEN,
527 P13_24XX_USB1_TXEN,
528 V19_24XX_USB1_RCV,
529 V12_24XX_USB1_RCV,
530
531 AA10_24XX_USB2_SE0,
532 Y11_24XX_USB2_DAT,
533 AA12_24XX_USB2_TXEN,
534 AA6_24XX_USB2_RCV,
535 AA4_24XX_USB2_TLLSE0,
536
537 /* Keypad GPIO*/
538 T19_24XX_KBR0,
539 R19_24XX_KBR1,
540 V18_24XX_KBR2,
541 M21_24XX_KBR3,
542 E5__24XX_KBR4,
543 M18_24XX_KBR5,
544 R20_24XX_KBC0,
545 M14_24XX_KBC1,
546 H19_24XX_KBC2,
547 V17_24XX_KBC3,
548 P21_24XX_KBC4,
549 L14_24XX_KBC5,
550 N19_24XX_KBC6,
551
552 /* 24xx Menelaus Keypad GPIO */
553 B3__24XX_KBR5,
554 AA4_24XX_KBC2,
555 B13_24XX_KBC6,
556
557 /* 2430 USB */
558 AD9_2430_USB0_PUEN,
559 Y11_2430_USB0_VP,
560 AD7_2430_USB0_VM,
561 AE7_2430_USB0_RCV,
562 AD4_2430_USB0_TXEN,
563 AF9_2430_USB0_SE0,
564 AE6_2430_USB0_DAT,
565 AD24_2430_USB1_SE0,
566 AB24_2430_USB1_RCV,
567 Y25_2430_USB1_TXEN,
568 AA26_2430_USB1_DAT,
569
570 /* 2430 HS-USB */
571 AD9_2430_USB0HS_DATA3,
572 Y11_2430_USB0HS_DATA4,
573 AD7_2430_USB0HS_DATA5,
574 AE7_2430_USB0HS_DATA6,
575 AD4_2430_USB0HS_DATA2,
576 AF9_2430_USB0HS_DATA0,
577 AE6_2430_USB0HS_DATA1,
578 AE8_2430_USB0HS_CLK,
579 AD8_2430_USB0HS_DIR,
580 AE5_2430_USB0HS_STP,
581 AE9_2430_USB0HS_NXT,
582 AC7_2430_USB0HS_DATA7,
583
584 /* 2430 McBSP */
585 AC10_2430_MCBSP2_FSX,
586 AD16_2430_MCBSP2_CLX,
587 AE13_2430_MCBSP2_DX,
588 AD13_2430_MCBSP2_DR,
589 AC10_2430_MCBSP2_FSX_OFF,
590 AD16_2430_MCBSP2_CLX_OFF,
591 AE13_2430_MCBSP2_DX_OFF,
592 AD13_2430_MCBSP2_DR_OFF,
593
594};
595
596struct omap_mux_cfg {
597 struct pin_config *pins;
598 unsigned long size;
599 int (*cfg_reg)(const struct pin_config *cfg);
600};
601
602#ifdef CONFIG_OMAP_MUX
603/* setup pin muxing in Linux */
604extern int omap1_mux_init(void);
605extern int omap2_mux_init(void);
606extern int omap_mux_register(struct omap_mux_cfg *);
607extern int omap_cfg_reg(unsigned long reg_cfg);
608#else
609/* boot loader does it all (no warnings from CONFIG_OMAP_MUX_WARNINGS) */
610static inline int omap1_mux_init(void) { return 0; }
611static inline int omap2_mux_init(void) { return 0; }
612static inline int omap_cfg_reg(unsigned long reg_cfg) { return 0; }
613#endif
614
615#endif
diff --git a/include/asm-arm/arch-omap/nand.h b/include/asm-arm/arch-omap/nand.h
deleted file mode 100644
index 17ae26e35353..000000000000
--- a/include/asm-arm/arch-omap/nand.h
+++ /dev/null
@@ -1,24 +0,0 @@
1/*
2 * include/asm-arm/arch-omap/nand.h
3 *
4 * Copyright (C) 2006 Micron Technology Inc.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10
11#include <linux/mtd/partitions.h>
12
13struct omap_nand_platform_data {
14 unsigned int options;
15 int cs;
16 int gpio_irq;
17 struct mtd_partition *parts;
18 int nr_parts;
19 int (*nand_setup)(void __iomem *);
20 int (*dev_ready)(struct omap_nand_platform_data *);
21 int dma_channel;
22 void __iomem *gpmc_cs_baseaddr;
23 void __iomem *gpmc_baseaddr;
24};
diff --git a/include/asm-arm/arch-omap/omap-alsa.h b/include/asm-arm/arch-omap/omap-alsa.h
deleted file mode 100644
index faa0ed23d4ba..000000000000
--- a/include/asm-arm/arch-omap/omap-alsa.h
+++ /dev/null
@@ -1,123 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-omap/omap-alsa.h
3 *
4 * Alsa Driver for AIC23 and TSC2101 codecs on OMAP platform boards.
5 *
6 * Copyright (C) 2006 Mika Laitio <lamikr@cc.jyu.fi>
7 *
8 * Copyright (C) 2005 Instituto Nokia de Tecnologia - INdT - Manaus Brazil
9 * Written by Daniel Petrini, David Cohen, Anderson Briglia
10 * {daniel.petrini, david.cohen, anderson.briglia}@indt.org.br
11 *
12 * This program is free software; you can redistribute it and/or modify it
13 * under the terms of the GNU General Public License as published by the
14 * Free Software Foundation; either version 2 of the License, or (at your
15 * option) any later version.
16 *
17 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
18 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
19 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
20 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
23 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
24 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 *
28 * You should have received a copy of the GNU General Public License along
29 * with this program; if not, write to the Free Software Foundation, Inc.,
30 * 675 Mass Ave, Cambridge, MA 02139, USA.
31 *
32 * History
33 * -------
34 *
35 * 2005/07/25 INdT-10LE Kernel Team - Alsa driver for omap osk,
36 * original version based in sa1100 driver
37 * and omap oss driver.
38 */
39
40#ifndef __OMAP_ALSA_H
41#define __OMAP_ALSA_H
42
43#include <asm/arch/dma.h>
44#include <sound/core.h>
45#include <sound/pcm.h>
46#include <asm/arch/mcbsp.h>
47#include <linux/platform_device.h>
48
49#define DMA_BUF_SIZE (1024 * 8)
50
51/*
52 * Buffer management for alsa and dma
53 */
54struct audio_stream {
55 char *id; /* identification string */
56 int stream_id; /* numeric identification */
57 int dma_dev; /* dma number of that device */
58 int *lch; /* Chain of channels this stream is linked to */
59 char started; /* to store if the chain was started or not */
60 int dma_q_head; /* DMA Channel Q Head */
61 int dma_q_tail; /* DMA Channel Q Tail */
62 char dma_q_count; /* DMA Channel Q Count */
63 int active:1; /* we are using this stream for transfer now */
64 int period; /* current transfer period */
65 int periods; /* current count of periods registerd in the DMA engine */
66 spinlock_t dma_lock; /* for locking in DMA operations */
67 struct snd_pcm_substream *stream; /* the pcm stream */
68 unsigned linked:1; /* dma channels linked */
69 int offset; /* store start position of the last period in the alsa buffer */
70 int (*hw_start)(void); /* interface to start HW interface, e.g. McBSP */
71 int (*hw_stop)(void); /* interface to stop HW interface, e.g. McBSP */
72};
73
74/*
75 * Alsa card structure for aic23
76 */
77struct snd_card_omap_codec {
78 struct snd_card *card;
79 struct snd_pcm *pcm;
80 long samplerate;
81 struct audio_stream s[2]; /* playback & capture */
82};
83
84/* Codec specific information and function pointers.
85 * Codec (omap-alsa-aic23.c and omap-alsa-tsc2101.c)
86 * are responsible for defining the function pointers.
87 */
88struct omap_alsa_codec_config {
89 char *name;
90 struct omap_mcbsp_reg_cfg *mcbsp_regs_alsa;
91 struct snd_pcm_hw_constraint_list *hw_constraints_rates;
92 struct snd_pcm_hardware *snd_omap_alsa_playback;
93 struct snd_pcm_hardware *snd_omap_alsa_capture;
94 void (*codec_configure_dev)(void);
95 void (*codec_set_samplerate)(long);
96 void (*codec_clock_setup)(void);
97 int (*codec_clock_on)(void);
98 int (*codec_clock_off)(void);
99 int (*get_default_samplerate)(void);
100};
101
102/*********** Mixer function prototypes *************************/
103int snd_omap_mixer(struct snd_card_omap_codec *);
104void snd_omap_init_mixer(void);
105
106#ifdef CONFIG_PM
107void snd_omap_suspend_mixer(void);
108void snd_omap_resume_mixer(void);
109#endif
110
111int snd_omap_alsa_post_probe(struct platform_device *pdev, struct omap_alsa_codec_config *config);
112int snd_omap_alsa_remove(struct platform_device *pdev);
113#ifdef CONFIG_PM
114int snd_omap_alsa_suspend(struct platform_device *pdev, pm_message_t state);
115int snd_omap_alsa_resume(struct platform_device *pdev);
116#else
117#define snd_omap_alsa_suspend NULL
118#define snd_omap_alsa_resume NULL
119#endif
120
121void callback_omap_alsa_sound_dma(void *);
122
123#endif
diff --git a/include/asm-arm/arch-omap/omap1510.h b/include/asm-arm/arch-omap/omap1510.h
deleted file mode 100644
index c575d354850f..000000000000
--- a/include/asm-arm/arch-omap/omap1510.h
+++ /dev/null
@@ -1,48 +0,0 @@
1/* linux/include/asm-arm/arch-omap/omap1510.h
2 *
3 * Hardware definitions for TI OMAP1510 processor.
4 *
5 * Cleanup for Linux-2.6 by Dirk Behme <dirk.behme@de.bosch.com>
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; either version 2 of the License, or (at your
10 * option) any later version.
11 *
12 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
13 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
14 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
15 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
16 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
17 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
18 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
19 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
20 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
21 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
22 *
23 * You should have received a copy of the GNU General Public License along
24 * with this program; if not, write to the Free Software Foundation, Inc.,
25 * 675 Mass Ave, Cambridge, MA 02139, USA.
26 */
27
28#ifndef __ASM_ARCH_OMAP15XX_H
29#define __ASM_ARCH_OMAP15XX_H
30
31/*
32 * ----------------------------------------------------------------------------
33 * Base addresses
34 * ----------------------------------------------------------------------------
35 */
36
37/* Syntax: XX_BASE = Virtual base address, XX_START = Physical base address */
38
39#define OMAP1510_DSP_BASE 0xE0000000
40#define OMAP1510_DSP_SIZE 0x28000
41#define OMAP1510_DSP_START 0xE0000000
42
43#define OMAP1510_DSPREG_BASE 0xE1000000
44#define OMAP1510_DSPREG_SIZE SZ_128K
45#define OMAP1510_DSPREG_START 0xE1000000
46
47#endif /* __ASM_ARCH_OMAP15XX_H */
48
diff --git a/include/asm-arm/arch-omap/omap16xx.h b/include/asm-arm/arch-omap/omap16xx.h
deleted file mode 100644
index f7f5cdfdccce..000000000000
--- a/include/asm-arm/arch-omap/omap16xx.h
+++ /dev/null
@@ -1,197 +0,0 @@
1/* linux/include/asm-arm/arch-omap/omap16xx.h
2 *
3 * Hardware definitions for TI OMAP1610/5912/1710 processors.
4 *
5 * Cleanup for Linux-2.6 by Dirk Behme <dirk.behme@de.bosch.com>
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; either version 2 of the License, or (at your
10 * option) any later version.
11 *
12 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
13 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
14 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
15 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
16 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
17 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
18 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
19 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
20 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
21 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
22 *
23 * You should have received a copy of the GNU General Public License along
24 * with this program; if not, write to the Free Software Foundation, Inc.,
25 * 675 Mass Ave, Cambridge, MA 02139, USA.
26 */
27
28#ifndef __ASM_ARCH_OMAP16XX_H
29#define __ASM_ARCH_OMAP16XX_H
30
31/*
32 * ----------------------------------------------------------------------------
33 * Base addresses
34 * ----------------------------------------------------------------------------
35 */
36
37/* Syntax: XX_BASE = Virtual base address, XX_START = Physical base address */
38
39#define OMAP16XX_DSP_BASE 0xE0000000
40#define OMAP16XX_DSP_SIZE 0x28000
41#define OMAP16XX_DSP_START 0xE0000000
42
43#define OMAP16XX_DSPREG_BASE 0xE1000000
44#define OMAP16XX_DSPREG_SIZE SZ_128K
45#define OMAP16XX_DSPREG_START 0xE1000000
46
47/*
48 * ---------------------------------------------------------------------------
49 * Interrupts
50 * ---------------------------------------------------------------------------
51 */
52#define OMAP_IH2_0_BASE (0xfffe0000)
53#define OMAP_IH2_1_BASE (0xfffe0100)
54#define OMAP_IH2_2_BASE (0xfffe0200)
55#define OMAP_IH2_3_BASE (0xfffe0300)
56
57#define OMAP_IH2_0_ITR (OMAP_IH2_0_BASE + 0x00)
58#define OMAP_IH2_0_MIR (OMAP_IH2_0_BASE + 0x04)
59#define OMAP_IH2_0_SIR_IRQ (OMAP_IH2_0_BASE + 0x10)
60#define OMAP_IH2_0_SIR_FIQ (OMAP_IH2_0_BASE + 0x14)
61#define OMAP_IH2_0_CONTROL (OMAP_IH2_0_BASE + 0x18)
62#define OMAP_IH2_0_ILR0 (OMAP_IH2_0_BASE + 0x1c)
63#define OMAP_IH2_0_ISR (OMAP_IH2_0_BASE + 0x9c)
64
65#define OMAP_IH2_1_ITR (OMAP_IH2_1_BASE + 0x00)
66#define OMAP_IH2_1_MIR (OMAP_IH2_1_BASE + 0x04)
67#define OMAP_IH2_1_SIR_IRQ (OMAP_IH2_1_BASE + 0x10)
68#define OMAP_IH2_1_SIR_FIQ (OMAP_IH2_1_BASE + 0x14)
69#define OMAP_IH2_1_CONTROL (OMAP_IH2_1_BASE + 0x18)
70#define OMAP_IH2_1_ILR1 (OMAP_IH2_1_BASE + 0x1c)
71#define OMAP_IH2_1_ISR (OMAP_IH2_1_BASE + 0x9c)
72
73#define OMAP_IH2_2_ITR (OMAP_IH2_2_BASE + 0x00)
74#define OMAP_IH2_2_MIR (OMAP_IH2_2_BASE + 0x04)
75#define OMAP_IH2_2_SIR_IRQ (OMAP_IH2_2_BASE + 0x10)
76#define OMAP_IH2_2_SIR_FIQ (OMAP_IH2_2_BASE + 0x14)
77#define OMAP_IH2_2_CONTROL (OMAP_IH2_2_BASE + 0x18)
78#define OMAP_IH2_2_ILR2 (OMAP_IH2_2_BASE + 0x1c)
79#define OMAP_IH2_2_ISR (OMAP_IH2_2_BASE + 0x9c)
80
81#define OMAP_IH2_3_ITR (OMAP_IH2_3_BASE + 0x00)
82#define OMAP_IH2_3_MIR (OMAP_IH2_3_BASE + 0x04)
83#define OMAP_IH2_3_SIR_IRQ (OMAP_IH2_3_BASE + 0x10)
84#define OMAP_IH2_3_SIR_FIQ (OMAP_IH2_3_BASE + 0x14)
85#define OMAP_IH2_3_CONTROL (OMAP_IH2_3_BASE + 0x18)
86#define OMAP_IH2_3_ILR3 (OMAP_IH2_3_BASE + 0x1c)
87#define OMAP_IH2_3_ISR (OMAP_IH2_3_BASE + 0x9c)
88
89/*
90 * ----------------------------------------------------------------------------
91 * Clocks
92 * ----------------------------------------------------------------------------
93 */
94#define OMAP16XX_ARM_IDLECT3 (CLKGEN_REG_BASE + 0x24)
95
96/*
97 * ----------------------------------------------------------------------------
98 * Pin configuration registers
99 * ----------------------------------------------------------------------------
100 */
101#define OMAP16XX_CONF_VOLTAGE_VDDSHV6 (1 << 8)
102#define OMAP16XX_CONF_VOLTAGE_VDDSHV7 (1 << 9)
103#define OMAP16XX_CONF_VOLTAGE_VDDSHV8 (1 << 10)
104#define OMAP16XX_CONF_VOLTAGE_VDDSHV9 (1 << 11)
105#define OMAP16XX_SUBLVDS_CONF_VALID (1 << 13)
106
107/*
108 * ----------------------------------------------------------------------------
109 * System control registers
110 * ----------------------------------------------------------------------------
111 */
112#define OMAP1610_RESET_CONTROL 0xfffe1140
113
114/*
115 * ---------------------------------------------------------------------------
116 * TIPB bus interface
117 * ---------------------------------------------------------------------------
118 */
119#define TIPB_SWITCH_BASE (0xfffbc800)
120#define OMAP16XX_MMCSD2_SSW_MPU_CONF (TIPB_SWITCH_BASE + 0x160)
121
122/* UART3 Registers Maping through MPU bus */
123#define UART3_RHR (OMAP_UART3_BASE + 0)
124#define UART3_THR (OMAP_UART3_BASE + 0)
125#define UART3_DLL (OMAP_UART3_BASE + 0)
126#define UART3_IER (OMAP_UART3_BASE + 4)
127#define UART3_DLH (OMAP_UART3_BASE + 4)
128#define UART3_IIR (OMAP_UART3_BASE + 8)
129#define UART3_FCR (OMAP_UART3_BASE + 8)
130#define UART3_EFR (OMAP_UART3_BASE + 8)
131#define UART3_LCR (OMAP_UART3_BASE + 0x0C)
132#define UART3_MCR (OMAP_UART3_BASE + 0x10)
133#define UART3_XON1_ADDR1 (OMAP_UART3_BASE + 0x10)
134#define UART3_XON2_ADDR2 (OMAP_UART3_BASE + 0x14)
135#define UART3_LSR (OMAP_UART3_BASE + 0x14)
136#define UART3_TCR (OMAP_UART3_BASE + 0x18)
137#define UART3_MSR (OMAP_UART3_BASE + 0x18)
138#define UART3_XOFF1 (OMAP_UART3_BASE + 0x18)
139#define UART3_XOFF2 (OMAP_UART3_BASE + 0x1C)
140#define UART3_SPR (OMAP_UART3_BASE + 0x1C)
141#define UART3_TLR (OMAP_UART3_BASE + 0x1C)
142#define UART3_MDR1 (OMAP_UART3_BASE + 0x20)
143#define UART3_MDR2 (OMAP_UART3_BASE + 0x24)
144#define UART3_SFLSR (OMAP_UART3_BASE + 0x28)
145#define UART3_TXFLL (OMAP_UART3_BASE + 0x28)
146#define UART3_RESUME (OMAP_UART3_BASE + 0x2C)
147#define UART3_TXFLH (OMAP_UART3_BASE + 0x2C)
148#define UART3_SFREGL (OMAP_UART3_BASE + 0x30)
149#define UART3_RXFLL (OMAP_UART3_BASE + 0x30)
150#define UART3_SFREGH (OMAP_UART3_BASE + 0x34)
151#define UART3_RXFLH (OMAP_UART3_BASE + 0x34)
152#define UART3_BLR (OMAP_UART3_BASE + 0x38)
153#define UART3_ACREG (OMAP_UART3_BASE + 0x3C)
154#define UART3_DIV16 (OMAP_UART3_BASE + 0x3C)
155#define UART3_SCR (OMAP_UART3_BASE + 0x40)
156#define UART3_SSR (OMAP_UART3_BASE + 0x44)
157#define UART3_EBLR (OMAP_UART3_BASE + 0x48)
158#define UART3_OSC_12M_SEL (OMAP_UART3_BASE + 0x4C)
159#define UART3_MVR (OMAP_UART3_BASE + 0x50)
160
161/*
162 * ---------------------------------------------------------------------------
163 * Watchdog timer
164 * ---------------------------------------------------------------------------
165 */
166
167/* 32-bit Watchdog timer in OMAP 16XX */
168#define OMAP_16XX_WATCHDOG_BASE (0xfffeb000)
169#define OMAP_16XX_WIDR (OMAP_16XX_WATCHDOG_BASE + 0x00)
170#define OMAP_16XX_WD_SYSCONFIG (OMAP_16XX_WATCHDOG_BASE + 0x10)
171#define OMAP_16XX_WD_SYSSTATUS (OMAP_16XX_WATCHDOG_BASE + 0x14)
172#define OMAP_16XX_WCLR (OMAP_16XX_WATCHDOG_BASE + 0x24)
173#define OMAP_16XX_WCRR (OMAP_16XX_WATCHDOG_BASE + 0x28)
174#define OMAP_16XX_WLDR (OMAP_16XX_WATCHDOG_BASE + 0x2c)
175#define OMAP_16XX_WTGR (OMAP_16XX_WATCHDOG_BASE + 0x30)
176#define OMAP_16XX_WWPS (OMAP_16XX_WATCHDOG_BASE + 0x34)
177#define OMAP_16XX_WSPR (OMAP_16XX_WATCHDOG_BASE + 0x48)
178
179#define WCLR_PRE_SHIFT 5
180#define WCLR_PTV_SHIFT 2
181
182#define WWPS_W_PEND_WSPR (1 << 4)
183#define WWPS_W_PEND_WTGR (1 << 3)
184#define WWPS_W_PEND_WLDR (1 << 2)
185#define WWPS_W_PEND_WCRR (1 << 1)
186#define WWPS_W_PEND_WCLR (1 << 0)
187
188#define WSPR_ENABLE_0 (0x0000bbbb)
189#define WSPR_ENABLE_1 (0x00004444)
190#define WSPR_DISABLE_0 (0x0000aaaa)
191#define WSPR_DISABLE_1 (0x00005555)
192
193/* Mailbox */
194#define OMAP16XX_MAILBOX_BASE (0xfffcf000)
195
196#endif /* __ASM_ARCH_OMAP16XX_H */
197
diff --git a/include/asm-arm/arch-omap/omap24xx.h b/include/asm-arm/arch-omap/omap24xx.h
deleted file mode 100644
index b9fcaae287c8..000000000000
--- a/include/asm-arm/arch-omap/omap24xx.h
+++ /dev/null
@@ -1,107 +0,0 @@
1/*
2 * include/asm-arm/arch-omap/omap24xx.h
3 *
4 * This file contains the processor specific definitions
5 * of the TI OMAP24XX.
6 *
7 * Copyright (C) 2007 Texas Instruments.
8 * Copyright (C) 2007 Nokia Corporation.
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 *
24 */
25
26#ifndef __ASM_ARCH_OMAP24XX_H
27#define __ASM_ARCH_OMAP24XX_H
28
29/*
30 * Please place only base defines here and put the rest in device
31 * specific headers. Note also that some of these defines are needed
32 * for omap1 to compile without adding ifdefs.
33 */
34
35#define L4_24XX_BASE 0x48000000
36#define L4_WK_243X_BASE 0x49000000
37#define L3_24XX_BASE 0x68000000
38
39/* interrupt controller */
40#define OMAP24XX_IC_BASE (L4_24XX_BASE + 0xfe000)
41#define OMAP24XX_IVA_INTC_BASE 0x40000000
42#define IRQ_SIR_IRQ 0x0040
43
44#define OMAP2420_CTRL_BASE L4_24XX_BASE
45#define OMAP2420_32KSYNCT_BASE (L4_24XX_BASE + 0x4000)
46#define OMAP2420_PRCM_BASE (L4_24XX_BASE + 0x8000)
47#define OMAP2420_CM_BASE (L4_24XX_BASE + 0x8000)
48#define OMAP2420_PRM_BASE OMAP2420_CM_BASE
49#define OMAP2420_SDRC_BASE (L3_24XX_BASE + 0x9000)
50#define OMAP2420_SMS_BASE 0x68008000
51
52#define OMAP2430_32KSYNCT_BASE (L4_WK_243X_BASE + 0x20000)
53#define OMAP2430_PRCM_BASE (L4_WK_243X_BASE + 0x6000)
54#define OMAP2430_CM_BASE (L4_WK_243X_BASE + 0x6000)
55#define OMAP2430_PRM_BASE OMAP2430_CM_BASE
56
57#define OMAP243X_SMS_BASE 0x6C000000
58#define OMAP243X_SDRC_BASE 0x6D000000
59#define OMAP243X_GPMC_BASE 0x6E000000
60#define OMAP243X_SCM_BASE (L4_WK_243X_BASE + 0x2000)
61#define OMAP243X_CTRL_BASE OMAP243X_SCM_BASE
62#define OMAP243X_HS_BASE (L4_24XX_BASE + 0x000ac000)
63
64/* DSP SS */
65#define OMAP2420_DSP_BASE 0x58000000
66#define OMAP2420_DSP_MEM_BASE (OMAP2420_DSP_BASE + 0x0)
67#define OMAP2420_DSP_IPI_BASE (OMAP2420_DSP_BASE + 0x1000000)
68#define OMAP2420_DSP_MMU_BASE (OMAP2420_DSP_BASE + 0x2000000)
69
70#define OMAP243X_DSP_BASE 0x5C000000
71#define OMAP243X_DSP_MEM_BASE (OMAP243X_DSP_BASE + 0x0)
72#define OMAP243X_DSP_MMU_BASE (OMAP243X_DSP_BASE + 0x1000000)
73
74/* Mailbox */
75#define OMAP24XX_MAILBOX_BASE (L4_24XX_BASE + 0x94000)
76
77/* Camera */
78#define OMAP24XX_CAMERA_BASE (L4_24XX_BASE + 0x52000)
79
80/* Security */
81#define OMAP24XX_SEC_BASE (L4_24XX_BASE + 0xA0000)
82#define OMAP24XX_SEC_RNG_BASE (OMAP24XX_SEC_BASE + 0x0000)
83#define OMAP24XX_SEC_DES_BASE (OMAP24XX_SEC_BASE + 0x2000)
84#define OMAP24XX_SEC_SHA1MD5_BASE (OMAP24XX_SEC_BASE + 0x4000)
85#define OMAP24XX_SEC_AES_BASE (OMAP24XX_SEC_BASE + 0x6000)
86#define OMAP24XX_SEC_PKA_BASE (OMAP24XX_SEC_BASE + 0x8000)
87
88#if defined(CONFIG_ARCH_OMAP2420)
89
90#define OMAP2_32KSYNCT_BASE OMAP2420_32KSYNCT_BASE
91#define OMAP2_PRCM_BASE OMAP2420_PRCM_BASE
92#define OMAP2_CM_BASE OMAP2420_CM_BASE
93#define OMAP2_PRM_BASE OMAP2420_PRM_BASE
94#define OMAP2_VA_IC_BASE IO_ADDRESS(OMAP24XX_IC_BASE)
95
96#elif defined(CONFIG_ARCH_OMAP2430)
97
98#define OMAP2_32KSYNCT_BASE OMAP2430_32KSYNCT_BASE
99#define OMAP2_PRCM_BASE OMAP2430_PRCM_BASE
100#define OMAP2_CM_BASE OMAP2430_CM_BASE
101#define OMAP2_PRM_BASE OMAP2430_PRM_BASE
102#define OMAP2_VA_IC_BASE IO_ADDRESS(OMAP24XX_IC_BASE)
103
104#endif
105
106#endif /* __ASM_ARCH_OMAP24XX_H */
107
diff --git a/include/asm-arm/arch-omap/omap34xx.h b/include/asm-arm/arch-omap/omap34xx.h
deleted file mode 100644
index aa30c6d10abd..000000000000
--- a/include/asm-arm/arch-omap/omap34xx.h
+++ /dev/null
@@ -1,72 +0,0 @@
1/*
2 * include/asm-arm/arch-omap/omap34xx.h
3 *
4 * This file contains the processor specific definitions of the TI OMAP34XX.
5 *
6 * Copyright (C) 2007 Texas Instruments.
7 * Copyright (C) 2007 Nokia Corporation.
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 */
23
24#ifndef __ASM_ARCH_OMAP34XX_H
25#define __ASM_ARCH_OMAP34XX_H
26
27/*
28 * Please place only base defines here and put the rest in device
29 * specific headers.
30 */
31
32#define L4_34XX_BASE 0x48000000
33#define L4_WK_34XX_BASE 0x48300000
34#define L4_WK_OMAP_BASE L4_WK_34XX_BASE
35#define L4_PER_34XX_BASE 0x49000000
36#define L4_PER_OMAP_BASE L4_PER_34XX_BASE
37#define L4_EMU_34XX_BASE 0x54000000
38#define L4_EMU_BASE L4_EMU_34XX_BASE
39#define L3_34XX_BASE 0x68000000
40#define L3_OMAP_BASE L3_34XX_BASE
41
42#define OMAP3430_32KSYNCT_BASE 0x48320000
43#define OMAP3430_CM_BASE 0x48004800
44#define OMAP3430_PRM_BASE 0x48306800
45#define OMAP343X_SMS_BASE 0x6C000000
46#define OMAP343X_SDRC_BASE 0x6D000000
47#define OMAP34XX_GPMC_BASE 0x6E000000
48#define OMAP343X_SCM_BASE 0x48002000
49#define OMAP343X_CTRL_BASE OMAP343X_SCM_BASE
50
51#define OMAP34XX_IC_BASE 0x48200000
52#define OMAP34XX_IVA_INTC_BASE 0x40000000
53#define OMAP34XX_HSUSB_OTG_BASE (L4_34XX_BASE + 0xAB000)
54#define OMAP34XX_HSUSB_HOST_BASE (L4_34XX_BASE + 0x64000)
55#define OMAP34XX_USBTLL_BASE (L4_34XX_BASE + 0x62000)
56
57
58#if defined(CONFIG_ARCH_OMAP3430)
59
60#define OMAP2_32KSYNCT_BASE OMAP3430_32KSYNCT_BASE
61#define OMAP2_CM_BASE OMAP3430_CM_BASE
62#define OMAP2_PRM_BASE OMAP3430_PRM_BASE
63#define OMAP2_VA_IC_BASE IO_ADDRESS(OMAP34XX_IC_BASE)
64
65#endif
66
67#define OMAP34XX_DSP_BASE 0x58000000
68#define OMAP34XX_DSP_MEM_BASE (OMAP34XX_DSP_BASE + 0x0)
69#define OMAP34XX_DSP_IPI_BASE (OMAP34XX_DSP_BASE + 0x1000000)
70#define OMAP34XX_DSP_MMU_BASE (OMAP34XX_DSP_BASE + 0x2000000)
71#endif /* __ASM_ARCH_OMAP34XX_H */
72
diff --git a/include/asm-arm/arch-omap/omap730.h b/include/asm-arm/arch-omap/omap730.h
deleted file mode 100644
index 755b64c5e9f0..000000000000
--- a/include/asm-arm/arch-omap/omap730.h
+++ /dev/null
@@ -1,102 +0,0 @@
1/* linux/include/asm-arm/arch-omap/omap730.h
2 *
3 * Hardware definitions for TI OMAP730 processor.
4 *
5 * Cleanup for Linux-2.6 by Dirk Behme <dirk.behme@de.bosch.com>
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; either version 2 of the License, or (at your
10 * option) any later version.
11 *
12 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
13 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
14 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
15 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
16 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
17 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
18 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
19 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
20 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
21 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
22 *
23 * You should have received a copy of the GNU General Public License along
24 * with this program; if not, write to the Free Software Foundation, Inc.,
25 * 675 Mass Ave, Cambridge, MA 02139, USA.
26 */
27
28#ifndef __ASM_ARCH_OMAP730_H
29#define __ASM_ARCH_OMAP730_H
30
31/*
32 * ----------------------------------------------------------------------------
33 * Base addresses
34 * ----------------------------------------------------------------------------
35 */
36
37/* Syntax: XX_BASE = Virtual base address, XX_START = Physical base address */
38
39#define OMAP730_DSP_BASE 0xE0000000
40#define OMAP730_DSP_SIZE 0x50000
41#define OMAP730_DSP_START 0xE0000000
42
43#define OMAP730_DSPREG_BASE 0xE1000000
44#define OMAP730_DSPREG_SIZE SZ_128K
45#define OMAP730_DSPREG_START 0xE1000000
46
47/*
48 * ----------------------------------------------------------------------------
49 * OMAP730 specific configuration registers
50 * ----------------------------------------------------------------------------
51 */
52#define OMAP730_CONFIG_BASE 0xfffe1000
53#define OMAP730_IO_CONF_0 0xfffe1070
54#define OMAP730_IO_CONF_1 0xfffe1074
55#define OMAP730_IO_CONF_2 0xfffe1078
56#define OMAP730_IO_CONF_3 0xfffe107c
57#define OMAP730_IO_CONF_4 0xfffe1080
58#define OMAP730_IO_CONF_5 0xfffe1084
59#define OMAP730_IO_CONF_6 0xfffe1088
60#define OMAP730_IO_CONF_7 0xfffe108c
61#define OMAP730_IO_CONF_8 0xfffe1090
62#define OMAP730_IO_CONF_9 0xfffe1094
63#define OMAP730_IO_CONF_10 0xfffe1098
64#define OMAP730_IO_CONF_11 0xfffe109c
65#define OMAP730_IO_CONF_12 0xfffe10a0
66#define OMAP730_IO_CONF_13 0xfffe10a4
67
68#define OMAP730_MODE_1 0xfffe1010
69#define OMAP730_MODE_2 0xfffe1014
70
71/* CSMI specials: in terms of base + offset */
72#define OMAP730_MODE2_OFFSET 0x14
73
74/*
75 * ----------------------------------------------------------------------------
76 * OMAP730 traffic controller configuration registers
77 * ----------------------------------------------------------------------------
78 */
79#define OMAP730_FLASH_CFG_0 0xfffecc10
80#define OMAP730_FLASH_ACFG_0 0xfffecc50
81#define OMAP730_FLASH_CFG_1 0xfffecc14
82#define OMAP730_FLASH_ACFG_1 0xfffecc54
83
84/*
85 * ----------------------------------------------------------------------------
86 * OMAP730 DSP control registers
87 * ----------------------------------------------------------------------------
88 */
89#define OMAP730_ICR_BASE 0xfffbb800
90#define OMAP730_DSP_M_CTL 0xfffbb804
91#define OMAP730_DSP_MMU_BASE 0xfffed200
92
93/*
94 * ----------------------------------------------------------------------------
95 * OMAP730 PCC_UPLD configuration registers
96 * ----------------------------------------------------------------------------
97 */
98#define OMAP730_PCC_UPLD_CTRL_BASE (0xfffe0900)
99#define OMAP730_PCC_UPLD_CTRL (OMAP730_PCC_UPLD_CTRL_BASE + 0x00)
100
101#endif /* __ASM_ARCH_OMAP730_H */
102
diff --git a/include/asm-arm/arch-omap/omapfb.h b/include/asm-arm/arch-omap/omapfb.h
deleted file mode 100644
index 46d7a4f60854..000000000000
--- a/include/asm-arm/arch-omap/omapfb.h
+++ /dev/null
@@ -1,395 +0,0 @@
1/*
2 * File: include/asm-arm/arch-omap/omapfb.h
3 *
4 * Framebuffer driver for TI OMAP boards
5 *
6 * Copyright (C) 2004 Nokia Corporation
7 * Author: Imre Deak <imre.deak@nokia.com>
8 *
9 * This program is free software; you can redistribute it and/or modify it
10 * under the terms of the GNU General Public License as published by the
11 * Free Software Foundation; either version 2 of the License, or (at your
12 * option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful, but
15 * WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License along
20 * with this program; if not, write to the Free Software Foundation, Inc.,
21 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 */
23
24#ifndef __OMAPFB_H
25#define __OMAPFB_H
26
27#include <asm/ioctl.h>
28#include <asm/types.h>
29
30/* IOCTL commands. */
31
32#define OMAP_IOW(num, dtype) _IOW('O', num, dtype)
33#define OMAP_IOR(num, dtype) _IOR('O', num, dtype)
34#define OMAP_IOWR(num, dtype) _IOWR('O', num, dtype)
35#define OMAP_IO(num) _IO('O', num)
36
37#define OMAPFB_MIRROR OMAP_IOW(31, int)
38#define OMAPFB_SYNC_GFX OMAP_IO(37)
39#define OMAPFB_VSYNC OMAP_IO(38)
40#define OMAPFB_SET_UPDATE_MODE OMAP_IOW(40, int)
41#define OMAPFB_GET_CAPS OMAP_IOR(42, struct omapfb_caps)
42#define OMAPFB_GET_UPDATE_MODE OMAP_IOW(43, int)
43#define OMAPFB_LCD_TEST OMAP_IOW(45, int)
44#define OMAPFB_CTRL_TEST OMAP_IOW(46, int)
45#define OMAPFB_UPDATE_WINDOW_OLD OMAP_IOW(47, struct omapfb_update_window_old)
46#define OMAPFB_SET_COLOR_KEY OMAP_IOW(50, struct omapfb_color_key)
47#define OMAPFB_GET_COLOR_KEY OMAP_IOW(51, struct omapfb_color_key)
48#define OMAPFB_SETUP_PLANE OMAP_IOW(52, struct omapfb_plane_info)
49#define OMAPFB_QUERY_PLANE OMAP_IOW(53, struct omapfb_plane_info)
50#define OMAPFB_UPDATE_WINDOW OMAP_IOW(54, struct omapfb_update_window)
51#define OMAPFB_SETUP_MEM OMAP_IOW(55, struct omapfb_mem_info)
52#define OMAPFB_QUERY_MEM OMAP_IOW(56, struct omapfb_mem_info)
53
54#define OMAPFB_CAPS_GENERIC_MASK 0x00000fff
55#define OMAPFB_CAPS_LCDC_MASK 0x00fff000
56#define OMAPFB_CAPS_PANEL_MASK 0xff000000
57
58#define OMAPFB_CAPS_MANUAL_UPDATE 0x00001000
59#define OMAPFB_CAPS_TEARSYNC 0x00002000
60#define OMAPFB_CAPS_PLANE_RELOCATE_MEM 0x00004000
61#define OMAPFB_CAPS_PLANE_SCALE 0x00008000
62#define OMAPFB_CAPS_WINDOW_PIXEL_DOUBLE 0x00010000
63#define OMAPFB_CAPS_WINDOW_SCALE 0x00020000
64#define OMAPFB_CAPS_WINDOW_OVERLAY 0x00040000
65#define OMAPFB_CAPS_SET_BACKLIGHT 0x01000000
66
67/* Values from DSP must map to lower 16-bits */
68#define OMAPFB_FORMAT_MASK 0x00ff
69#define OMAPFB_FORMAT_FLAG_DOUBLE 0x0100
70#define OMAPFB_FORMAT_FLAG_TEARSYNC 0x0200
71#define OMAPFB_FORMAT_FLAG_FORCE_VSYNC 0x0400
72#define OMAPFB_FORMAT_FLAG_ENABLE_OVERLAY 0x0800
73#define OMAPFB_FORMAT_FLAG_DISABLE_OVERLAY 0x1000
74
75#define OMAPFB_EVENT_READY 1
76#define OMAPFB_EVENT_DISABLED 2
77
78#define OMAPFB_MEMTYPE_SDRAM 0
79#define OMAPFB_MEMTYPE_SRAM 1
80#define OMAPFB_MEMTYPE_MAX 1
81
82enum omapfb_color_format {
83 OMAPFB_COLOR_RGB565 = 0,
84 OMAPFB_COLOR_YUV422,
85 OMAPFB_COLOR_YUV420,
86 OMAPFB_COLOR_CLUT_8BPP,
87 OMAPFB_COLOR_CLUT_4BPP,
88 OMAPFB_COLOR_CLUT_2BPP,
89 OMAPFB_COLOR_CLUT_1BPP,
90 OMAPFB_COLOR_RGB444,
91 OMAPFB_COLOR_YUY422,
92};
93
94struct omapfb_update_window {
95 __u32 x, y;
96 __u32 width, height;
97 __u32 format;
98 __u32 out_x, out_y;
99 __u32 out_width, out_height;
100 __u32 reserved[8];
101};
102
103struct omapfb_update_window_old {
104 __u32 x, y;
105 __u32 width, height;
106 __u32 format;
107};
108
109enum omapfb_plane {
110 OMAPFB_PLANE_GFX = 0,
111 OMAPFB_PLANE_VID1,
112 OMAPFB_PLANE_VID2,
113};
114
115enum omapfb_channel_out {
116 OMAPFB_CHANNEL_OUT_LCD = 0,
117 OMAPFB_CHANNEL_OUT_DIGIT,
118};
119
120struct omapfb_plane_info {
121 __u32 pos_x;
122 __u32 pos_y;
123 __u8 enabled;
124 __u8 channel_out;
125 __u8 mirror;
126 __u8 reserved1;
127 __u32 out_width;
128 __u32 out_height;
129 __u32 reserved2[12];
130};
131
132struct omapfb_mem_info {
133 __u32 size;
134 __u8 type;
135 __u8 reserved[3];
136};
137
138struct omapfb_caps {
139 __u32 ctrl;
140 __u32 plane_color;
141 __u32 wnd_color;
142};
143
144enum omapfb_color_key_type {
145 OMAPFB_COLOR_KEY_DISABLED = 0,
146 OMAPFB_COLOR_KEY_GFX_DST,
147 OMAPFB_COLOR_KEY_VID_SRC,
148};
149
150struct omapfb_color_key {
151 __u8 channel_out;
152 __u32 background;
153 __u32 trans_key;
154 __u8 key_type;
155};
156
157enum omapfb_update_mode {
158 OMAPFB_UPDATE_DISABLED = 0,
159 OMAPFB_AUTO_UPDATE,
160 OMAPFB_MANUAL_UPDATE
161};
162
163#ifdef __KERNEL__
164
165#include <linux/completion.h>
166#include <linux/interrupt.h>
167#include <linux/fb.h>
168#include <linux/mutex.h>
169
170#include <asm/arch/board.h>
171
172#define OMAP_LCDC_INV_VSYNC 0x0001
173#define OMAP_LCDC_INV_HSYNC 0x0002
174#define OMAP_LCDC_INV_PIX_CLOCK 0x0004
175#define OMAP_LCDC_INV_OUTPUT_EN 0x0008
176#define OMAP_LCDC_HSVS_RISING_EDGE 0x0010
177#define OMAP_LCDC_HSVS_OPPOSITE 0x0020
178
179#define OMAP_LCDC_SIGNAL_MASK 0x003f
180
181#define OMAP_LCDC_PANEL_TFT 0x0100
182
183#define OMAPFB_PLANE_XRES_MIN 8
184#define OMAPFB_PLANE_YRES_MIN 8
185
186#ifdef CONFIG_ARCH_OMAP1
187#define OMAPFB_PLANE_NUM 1
188#else
189#define OMAPFB_PLANE_NUM 3
190#endif
191
192struct omapfb_device;
193
194struct lcd_panel {
195 const char *name;
196 int config; /* TFT/STN, signal inversion */
197 int bpp; /* Pixel format in fb mem */
198 int data_lines; /* Lines on LCD HW interface */
199
200 int x_res, y_res;
201 int pixel_clock; /* In kHz */
202 int hsw; /* Horizontal synchronization
203 pulse width */
204 int hfp; /* Horizontal front porch */
205 int hbp; /* Horizontal back porch */
206 int vsw; /* Vertical synchronization
207 pulse width */
208 int vfp; /* Vertical front porch */
209 int vbp; /* Vertical back porch */
210 int acb; /* ac-bias pin frequency */
211 int pcd; /* pixel clock divider.
212 Obsolete use pixel_clock instead */
213
214 int (*init) (struct lcd_panel *panel,
215 struct omapfb_device *fbdev);
216 void (*cleanup) (struct lcd_panel *panel);
217 int (*enable) (struct lcd_panel *panel);
218 void (*disable) (struct lcd_panel *panel);
219 unsigned long (*get_caps) (struct lcd_panel *panel);
220 int (*set_bklight_level)(struct lcd_panel *panel,
221 unsigned int level);
222 unsigned int (*get_bklight_level)(struct lcd_panel *panel);
223 unsigned int (*get_bklight_max) (struct lcd_panel *panel);
224 int (*run_test) (struct lcd_panel *panel, int test_num);
225};
226
227struct extif_timings {
228 int cs_on_time;
229 int cs_off_time;
230 int we_on_time;
231 int we_off_time;
232 int re_on_time;
233 int re_off_time;
234 int we_cycle_time;
235 int re_cycle_time;
236 int cs_pulse_width;
237 int access_time;
238
239 int clk_div;
240
241 u32 tim[5]; /* set by extif->convert_timings */
242
243 int converted;
244};
245
246struct lcd_ctrl_extif {
247 int (*init) (struct omapfb_device *fbdev);
248 void (*cleanup) (void);
249 void (*get_clk_info) (u32 *clk_period, u32 *max_clk_div);
250 unsigned long (*get_max_tx_rate)(void);
251 int (*convert_timings) (struct extif_timings *timings);
252 void (*set_timings) (const struct extif_timings *timings);
253 void (*set_bits_per_cycle)(int bpc);
254 void (*write_command) (const void *buf, unsigned int len);
255 void (*read_data) (void *buf, unsigned int len);
256 void (*write_data) (const void *buf, unsigned int len);
257 void (*transfer_area) (int width, int height,
258 void (callback)(void * data), void *data);
259 int (*setup_tearsync) (unsigned pin_cnt,
260 unsigned hs_pulse_time, unsigned vs_pulse_time,
261 int hs_pol_inv, int vs_pol_inv, int div);
262 int (*enable_tearsync) (int enable, unsigned line);
263
264 unsigned long max_transmit_size;
265};
266
267struct omapfb_notifier_block {
268 struct notifier_block nb;
269 void *data;
270 int plane_idx;
271};
272
273typedef int (*omapfb_notifier_callback_t)(struct notifier_block *,
274 unsigned long event,
275 void *fbi);
276
277struct omapfb_mem_region {
278 dma_addr_t paddr;
279 void *vaddr;
280 unsigned long size;
281 u8 type; /* OMAPFB_PLANE_MEM_* */
282 unsigned alloc:1; /* allocated by the driver */
283 unsigned map:1; /* kernel mapped by the driver */
284};
285
286struct omapfb_mem_desc {
287 int region_cnt;
288 struct omapfb_mem_region region[OMAPFB_PLANE_NUM];
289};
290
291struct lcd_ctrl {
292 const char *name;
293 void *data;
294
295 int (*init) (struct omapfb_device *fbdev,
296 int ext_mode,
297 struct omapfb_mem_desc *req_md);
298 void (*cleanup) (void);
299 void (*bind_client) (struct omapfb_notifier_block *nb);
300 void (*get_caps) (int plane, struct omapfb_caps *caps);
301 int (*set_update_mode)(enum omapfb_update_mode mode);
302 enum omapfb_update_mode (*get_update_mode)(void);
303 int (*setup_plane) (int plane, int channel_out,
304 unsigned long offset,
305 int screen_width,
306 int pos_x, int pos_y, int width,
307 int height, int color_mode);
308 int (*setup_mem) (int plane, size_t size,
309 int mem_type, unsigned long *paddr);
310 int (*mmap) (struct fb_info *info,
311 struct vm_area_struct *vma);
312 int (*set_scale) (int plane,
313 int orig_width, int orig_height,
314 int out_width, int out_height);
315 int (*enable_plane) (int plane, int enable);
316 int (*update_window) (struct fb_info *fbi,
317 struct omapfb_update_window *win,
318 void (*callback)(void *),
319 void *callback_data);
320 void (*sync) (void);
321 void (*suspend) (void);
322 void (*resume) (void);
323 int (*run_test) (int test_num);
324 int (*setcolreg) (u_int regno, u16 red, u16 green,
325 u16 blue, u16 transp,
326 int update_hw_mem);
327 int (*set_color_key) (struct omapfb_color_key *ck);
328 int (*get_color_key) (struct omapfb_color_key *ck);
329};
330
331enum omapfb_state {
332 OMAPFB_DISABLED = 0,
333 OMAPFB_SUSPENDED= 99,
334 OMAPFB_ACTIVE = 100
335};
336
337struct omapfb_plane_struct {
338 int idx;
339 struct omapfb_plane_info info;
340 enum omapfb_color_format color_mode;
341 struct omapfb_device *fbdev;
342};
343
344struct omapfb_device {
345 int state;
346 int ext_lcdc; /* Using external
347 LCD controller */
348 struct mutex rqueue_mutex;
349
350 int palette_size;
351 u32 pseudo_palette[17];
352
353 struct lcd_panel *panel; /* LCD panel */
354 struct lcd_ctrl *ctrl; /* LCD controller */
355 struct lcd_ctrl *int_ctrl; /* internal LCD ctrl */
356 struct lcd_ctrl_extif *ext_if; /* LCD ctrl external
357 interface */
358 struct device *dev;
359 struct fb_var_screeninfo new_var; /* for mode changes */
360
361 struct omapfb_mem_desc mem_desc;
362 struct fb_info *fb_info[OMAPFB_PLANE_NUM];
363};
364
365struct omapfb_platform_data {
366 struct omap_lcd_config lcd;
367 struct omapfb_mem_desc mem_desc;
368 void *ctrl_platform_data;
369};
370
371#ifdef CONFIG_ARCH_OMAP1
372extern struct lcd_ctrl omap1_lcd_ctrl;
373#else
374extern struct lcd_ctrl omap2_disp_ctrl;
375#endif
376
377extern void omapfb_register_panel(struct lcd_panel *panel);
378extern void omapfb_write_first_pixel(struct omapfb_device *fbdev, u16 pixval);
379extern void omapfb_notify_clients(struct omapfb_device *fbdev,
380 unsigned long event);
381extern int omapfb_register_client(struct omapfb_notifier_block *nb,
382 omapfb_notifier_callback_t callback,
383 void *callback_data);
384extern int omapfb_unregister_client(struct omapfb_notifier_block *nb);
385extern int omapfb_update_window_async(struct fb_info *fbi,
386 struct omapfb_update_window *win,
387 void (*callback)(void *),
388 void *callback_data);
389
390/* in arch/arm/plat-omap/fb.c */
391extern void omapfb_set_ctrl_platform_data(void *pdata);
392
393#endif /* __KERNEL__ */
394
395#endif /* __OMAPFB_H */
diff --git a/include/asm-arm/arch-omap/onenand.h b/include/asm-arm/arch-omap/onenand.h
deleted file mode 100644
index 6c959d0ce470..000000000000
--- a/include/asm-arm/arch-omap/onenand.h
+++ /dev/null
@@ -1,21 +0,0 @@
1/*
2 * include/asm-arm/arch-omap/onenand.h
3 *
4 * Copyright (C) 2006 Nokia Corporation
5 * Author: Juha Yrjola
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 */
11
12#include <linux/mtd/partitions.h>
13
14struct omap_onenand_platform_data {
15 int cs;
16 int gpio_irq;
17 struct mtd_partition *parts;
18 int nr_parts;
19 int (*onenand_setup)(void __iomem *);
20 int dma_channel;
21};
diff --git a/include/asm-arm/arch-omap/param.h b/include/asm-arm/arch-omap/param.h
deleted file mode 100644
index face9ad41e97..000000000000
--- a/include/asm-arm/arch-omap/param.h
+++ /dev/null
@@ -1,8 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-omap/param.h
3 *
4 */
5
6#ifdef CONFIG_OMAP_32K_TIMER_HZ
7#define HZ CONFIG_OMAP_32K_TIMER_HZ
8#endif
diff --git a/include/asm-arm/arch-omap/pm.h b/include/asm-arm/arch-omap/pm.h
deleted file mode 100644
index 14588059981f..000000000000
--- a/include/asm-arm/arch-omap/pm.h
+++ /dev/null
@@ -1,356 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-omap/pm.h
3 *
4 * Header file for OMAP Power Management Routines
5 *
6 * Author: MontaVista Software, Inc.
7 * support@mvista.com
8 *
9 * Copyright 2002 MontaVista Software Inc.
10 *
11 * Cleanup 2004 for Linux 2.6 by Dirk Behme <dirk.behme@de.bosch.com>
12 *
13 * This program is free software; you can redistribute it and/or modify it
14 * under the terms of the GNU General Public License as published by the
15 * Free Software Foundation; either version 2 of the License, or (at your
16 * option) any later version.
17 *
18 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
19 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
20 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
21 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
22 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
23 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
24 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
25 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 *
29 * You should have received a copy of the GNU General Public License along
30 * with this program; if not, write to the Free Software Foundation, Inc.,
31 * 675 Mass Ave, Cambridge, MA 02139, USA.
32 */
33
34#ifndef __ASM_ARCH_OMAP_PM_H
35#define __ASM_ARCH_OMAP_PM_H
36
37/*
38 * ----------------------------------------------------------------------------
39 * Register and offset definitions to be used in PM assembler code
40 * ----------------------------------------------------------------------------
41 */
42#define CLKGEN_REG_ASM_BASE io_p2v(0xfffece00)
43#define ARM_IDLECT1_ASM_OFFSET 0x04
44#define ARM_IDLECT2_ASM_OFFSET 0x08
45
46#define TCMIF_ASM_BASE io_p2v(0xfffecc00)
47#define EMIFS_CONFIG_ASM_OFFSET 0x0c
48#define EMIFF_SDRAM_CONFIG_ASM_OFFSET 0x20
49
50/*
51 * ----------------------------------------------------------------------------
52 * Power management bitmasks
53 * ----------------------------------------------------------------------------
54 */
55#define IDLE_WAIT_CYCLES 0x00000fff
56#define PERIPHERAL_ENABLE 0x2
57
58#define SELF_REFRESH_MODE 0x0c000001
59#define IDLE_EMIFS_REQUEST 0xc
60#define MODEM_32K_EN 0x1
61#define PER_EN 0x1
62
63#define CPU_SUSPEND_SIZE 200
64#define ULPD_LOW_PWR_EN 0x0001
65#define ULPD_DEEP_SLEEP_TRANSITION_EN 0x0010
66#define ULPD_SETUP_ANALOG_CELL_3_VAL 0
67#define ULPD_POWER_CTRL_REG_VAL 0x0219
68
69#define DSP_IDLE_DELAY 10
70#define DSP_IDLE 0x0040
71#define DSP_RST 0x0004
72#define DSP_ENABLE 0x0002
73#define SUFFICIENT_DSP_RESET_TIME 1000
74#define DEFAULT_MPUI_CONFIG 0x05cf
75#define ENABLE_XORCLK 0x2
76#define DSP_CLOCK_ENABLE 0x2000
77#define DSP_IDLE_MODE 0x2
78#define TC_IDLE_REQUEST (0x0000000c)
79
80#define IRQ_LEVEL2 (1<<0)
81#define IRQ_KEYBOARD (1<<1)
82#define IRQ_UART2 (1<<15)
83
84#define PDE_BIT 0x08
85#define PWD_EN_BIT 0x04
86#define EN_PERCK_BIT 0x04
87
88#define OMAP1510_DEEP_SLEEP_REQUEST 0x0ec7
89#define OMAP1510_BIG_SLEEP_REQUEST 0x0cc5
90#define OMAP1510_IDLE_LOOP_REQUEST 0x0c00
91#define OMAP1510_IDLE_CLOCK_DOMAINS 0x2
92
93/* Both big sleep and deep sleep use same values. Difference is in ULPD. */
94#define OMAP1610_IDLECT1_SLEEP_VAL 0x13c7
95#define OMAP1610_IDLECT2_SLEEP_VAL 0x09c7
96#define OMAP1610_IDLECT3_VAL 0x3f
97#define OMAP1610_IDLECT3_SLEEP_ORMASK 0x2c
98#define OMAP1610_IDLECT3 0xfffece24
99#define OMAP1610_IDLE_LOOP_REQUEST 0x0400
100
101#define OMAP730_IDLECT1_SLEEP_VAL 0x16c7
102#define OMAP730_IDLECT2_SLEEP_VAL 0x09c7
103#define OMAP730_IDLECT3_VAL 0x3f
104#define OMAP730_IDLECT3 0xfffece24
105#define OMAP730_IDLE_LOOP_REQUEST 0x0C00
106
107#if !defined(CONFIG_ARCH_OMAP730) && \
108 !defined(CONFIG_ARCH_OMAP15XX) && \
109 !defined(CONFIG_ARCH_OMAP16XX) && \
110 !defined(CONFIG_ARCH_OMAP24XX)
111#error "Power management for this processor not implemented yet"
112#endif
113
114#ifndef __ASSEMBLER__
115
116#include <linux/clk.h>
117
118extern void prevent_idle_sleep(void);
119extern void allow_idle_sleep(void);
120
121/**
122 * clk_deny_idle - Prevents the clock from being idled during MPU idle
123 * @clk: clock signal handle
124 */
125void clk_deny_idle(struct clk *clk);
126
127/**
128 * clk_allow_idle - Counters previous clk_deny_idle
129 * @clk: clock signal handle
130 */
131void clk_deny_idle(struct clk *clk);
132
133extern void omap_pm_idle(void);
134extern void omap_pm_suspend(void);
135extern void omap730_cpu_suspend(unsigned short, unsigned short);
136extern void omap1510_cpu_suspend(unsigned short, unsigned short);
137extern void omap1610_cpu_suspend(unsigned short, unsigned short);
138extern void omap24xx_cpu_suspend(u32 dll_ctrl, u32 cpu_revision);
139extern void omap730_idle_loop_suspend(void);
140extern void omap1510_idle_loop_suspend(void);
141extern void omap1610_idle_loop_suspend(void);
142extern void omap24xx_idle_loop_suspend(void);
143
144extern unsigned int omap730_cpu_suspend_sz;
145extern unsigned int omap1510_cpu_suspend_sz;
146extern unsigned int omap1610_cpu_suspend_sz;
147extern unsigned int omap24xx_cpu_suspend_sz;
148extern unsigned int omap730_idle_loop_suspend_sz;
149extern unsigned int omap1510_idle_loop_suspend_sz;
150extern unsigned int omap1610_idle_loop_suspend_sz;
151extern unsigned int omap24xx_idle_loop_suspend_sz;
152
153#ifdef CONFIG_OMAP_SERIAL_WAKE
154extern void omap_serial_wake_trigger(int enable);
155#else
156#define omap_serial_wakeup_init() {}
157#define omap_serial_wake_trigger(x) {}
158#endif /* CONFIG_OMAP_SERIAL_WAKE */
159
160#define ARM_SAVE(x) arm_sleep_save[ARM_SLEEP_SAVE_##x] = omap_readl(x)
161#define ARM_RESTORE(x) omap_writel((arm_sleep_save[ARM_SLEEP_SAVE_##x]), (x))
162#define ARM_SHOW(x) arm_sleep_save[ARM_SLEEP_SAVE_##x]
163
164#define DSP_SAVE(x) dsp_sleep_save[DSP_SLEEP_SAVE_##x] = __raw_readw(x)
165#define DSP_RESTORE(x) __raw_writew((dsp_sleep_save[DSP_SLEEP_SAVE_##x]), (x))
166#define DSP_SHOW(x) dsp_sleep_save[DSP_SLEEP_SAVE_##x]
167
168#define ULPD_SAVE(x) ulpd_sleep_save[ULPD_SLEEP_SAVE_##x] = omap_readw(x)
169#define ULPD_RESTORE(x) omap_writew((ulpd_sleep_save[ULPD_SLEEP_SAVE_##x]), (x))
170#define ULPD_SHOW(x) ulpd_sleep_save[ULPD_SLEEP_SAVE_##x]
171
172#define MPUI730_SAVE(x) mpui730_sleep_save[MPUI730_SLEEP_SAVE_##x] = omap_readl(x)
173#define MPUI730_RESTORE(x) omap_writel((mpui730_sleep_save[MPUI730_SLEEP_SAVE_##x]), (x))
174#define MPUI730_SHOW(x) mpui730_sleep_save[MPUI730_SLEEP_SAVE_##x]
175
176#define MPUI1510_SAVE(x) mpui1510_sleep_save[MPUI1510_SLEEP_SAVE_##x] = omap_readl(x)
177#define MPUI1510_RESTORE(x) omap_writel((mpui1510_sleep_save[MPUI1510_SLEEP_SAVE_##x]), (x))
178#define MPUI1510_SHOW(x) mpui1510_sleep_save[MPUI1510_SLEEP_SAVE_##x]
179
180#define MPUI1610_SAVE(x) mpui1610_sleep_save[MPUI1610_SLEEP_SAVE_##x] = omap_readl(x)
181#define MPUI1610_RESTORE(x) omap_writel((mpui1610_sleep_save[MPUI1610_SLEEP_SAVE_##x]), (x))
182#define MPUI1610_SHOW(x) mpui1610_sleep_save[MPUI1610_SLEEP_SAVE_##x]
183
184#define OMAP24XX_SAVE(x) omap24xx_sleep_save[OMAP24XX_SLEEP_SAVE_##x] = x
185#define OMAP24XX_RESTORE(x) x = omap24xx_sleep_save[OMAP24XX_SLEEP_SAVE_##x]
186#define OMAP24XX_SHOW(x) omap24xx_sleep_save[OMAP24XX_SLEEP_SAVE_##x]
187
188/*
189 * List of global OMAP registers to preserve.
190 * More ones like CP and general purpose register values are preserved
191 * with the stack pointer in sleep.S.
192 */
193
194enum arm_save_state {
195 ARM_SLEEP_SAVE_START = 0,
196 /*
197 * MPU control registers 32 bits
198 */
199 ARM_SLEEP_SAVE_ARM_CKCTL,
200 ARM_SLEEP_SAVE_ARM_IDLECT1,
201 ARM_SLEEP_SAVE_ARM_IDLECT2,
202 ARM_SLEEP_SAVE_ARM_IDLECT3,
203 ARM_SLEEP_SAVE_ARM_EWUPCT,
204 ARM_SLEEP_SAVE_ARM_RSTCT1,
205 ARM_SLEEP_SAVE_ARM_RSTCT2,
206 ARM_SLEEP_SAVE_ARM_SYSST,
207 ARM_SLEEP_SAVE_SIZE
208};
209
210enum dsp_save_state {
211 DSP_SLEEP_SAVE_START = 0,
212 /*
213 * DSP registers 16 bits
214 */
215 DSP_SLEEP_SAVE_DSP_IDLECT2,
216 DSP_SLEEP_SAVE_SIZE
217};
218
219enum ulpd_save_state {
220 ULPD_SLEEP_SAVE_START = 0,
221 /*
222 * ULPD registers 16 bits
223 */
224 ULPD_SLEEP_SAVE_ULPD_IT_STATUS,
225 ULPD_SLEEP_SAVE_ULPD_CLOCK_CTRL,
226 ULPD_SLEEP_SAVE_ULPD_SOFT_REQ,
227 ULPD_SLEEP_SAVE_ULPD_STATUS_REQ,
228 ULPD_SLEEP_SAVE_ULPD_DPLL_CTRL,
229 ULPD_SLEEP_SAVE_ULPD_POWER_CTRL,
230 ULPD_SLEEP_SAVE_SIZE
231};
232
233enum mpui1510_save_state {
234 MPUI1510_SLEEP_SAVE_START = 0,
235 /*
236 * MPUI registers 32 bits
237 */
238 MPUI1510_SLEEP_SAVE_MPUI_CTRL,
239 MPUI1510_SLEEP_SAVE_MPUI_DSP_BOOT_CONFIG,
240 MPUI1510_SLEEP_SAVE_MPUI_DSP_API_CONFIG,
241 MPUI1510_SLEEP_SAVE_MPUI_DSP_STATUS,
242 MPUI1510_SLEEP_SAVE_EMIFF_SDRAM_CONFIG,
243 MPUI1510_SLEEP_SAVE_EMIFS_CONFIG,
244 MPUI1510_SLEEP_SAVE_OMAP_IH1_MIR,
245 MPUI1510_SLEEP_SAVE_OMAP_IH2_MIR,
246#if defined(CONFIG_ARCH_OMAP15XX)
247 MPUI1510_SLEEP_SAVE_SIZE
248#else
249 MPUI1510_SLEEP_SAVE_SIZE = 0
250#endif
251};
252
253enum mpui730_save_state {
254 MPUI730_SLEEP_SAVE_START = 0,
255 /*
256 * MPUI registers 32 bits
257 */
258 MPUI730_SLEEP_SAVE_MPUI_CTRL,
259 MPUI730_SLEEP_SAVE_MPUI_DSP_BOOT_CONFIG,
260 MPUI730_SLEEP_SAVE_MPUI_DSP_API_CONFIG,
261 MPUI730_SLEEP_SAVE_MPUI_DSP_STATUS,
262 MPUI730_SLEEP_SAVE_EMIFF_SDRAM_CONFIG,
263 MPUI730_SLEEP_SAVE_EMIFS_CONFIG,
264 MPUI730_SLEEP_SAVE_OMAP_IH1_MIR,
265 MPUI730_SLEEP_SAVE_OMAP_IH2_0_MIR,
266 MPUI730_SLEEP_SAVE_OMAP_IH2_1_MIR,
267#if defined(CONFIG_ARCH_OMAP730)
268 MPUI730_SLEEP_SAVE_SIZE
269#else
270 MPUI730_SLEEP_SAVE_SIZE = 0
271#endif
272};
273
274enum mpui1610_save_state {
275 MPUI1610_SLEEP_SAVE_START = 0,
276 /*
277 * MPUI registers 32 bits
278 */
279 MPUI1610_SLEEP_SAVE_MPUI_CTRL,
280 MPUI1610_SLEEP_SAVE_MPUI_DSP_BOOT_CONFIG,
281 MPUI1610_SLEEP_SAVE_MPUI_DSP_API_CONFIG,
282 MPUI1610_SLEEP_SAVE_MPUI_DSP_STATUS,
283 MPUI1610_SLEEP_SAVE_EMIFF_SDRAM_CONFIG,
284 MPUI1610_SLEEP_SAVE_EMIFS_CONFIG,
285 MPUI1610_SLEEP_SAVE_OMAP_IH1_MIR,
286 MPUI1610_SLEEP_SAVE_OMAP_IH2_0_MIR,
287 MPUI1610_SLEEP_SAVE_OMAP_IH2_1_MIR,
288 MPUI1610_SLEEP_SAVE_OMAP_IH2_2_MIR,
289 MPUI1610_SLEEP_SAVE_OMAP_IH2_3_MIR,
290#if defined(CONFIG_ARCH_OMAP16XX)
291 MPUI1610_SLEEP_SAVE_SIZE
292#else
293 MPUI1610_SLEEP_SAVE_SIZE = 0
294#endif
295};
296
297enum omap24xx_save_state {
298 OMAP24XX_SLEEP_SAVE_START = 0,
299 OMAP24XX_SLEEP_SAVE_INTC_MIR0,
300 OMAP24XX_SLEEP_SAVE_INTC_MIR1,
301 OMAP24XX_SLEEP_SAVE_INTC_MIR2,
302
303 OMAP24XX_SLEEP_SAVE_CM_CLKSTCTRL_MPU,
304 OMAP24XX_SLEEP_SAVE_CM_CLKSTCTRL_CORE,
305 OMAP24XX_SLEEP_SAVE_CM_CLKSTCTRL_GFX,
306 OMAP24XX_SLEEP_SAVE_CM_CLKSTCTRL_DSP,
307 OMAP24XX_SLEEP_SAVE_CM_CLKSTCTRL_MDM,
308
309 OMAP24XX_SLEEP_SAVE_PM_PWSTCTRL_MPU,
310 OMAP24XX_SLEEP_SAVE_PM_PWSTCTRL_CORE,
311 OMAP24XX_SLEEP_SAVE_PM_PWSTCTRL_GFX,
312 OMAP24XX_SLEEP_SAVE_PM_PWSTCTRL_DSP,
313 OMAP24XX_SLEEP_SAVE_PM_PWSTCTRL_MDM,
314
315 OMAP24XX_SLEEP_SAVE_CM_IDLEST1_CORE,
316 OMAP24XX_SLEEP_SAVE_CM_IDLEST2_CORE,
317 OMAP24XX_SLEEP_SAVE_CM_IDLEST3_CORE,
318 OMAP24XX_SLEEP_SAVE_CM_IDLEST4_CORE,
319 OMAP24XX_SLEEP_SAVE_CM_IDLEST_GFX,
320 OMAP24XX_SLEEP_SAVE_CM_IDLEST_WKUP,
321 OMAP24XX_SLEEP_SAVE_CM_IDLEST_CKGEN,
322 OMAP24XX_SLEEP_SAVE_CM_IDLEST_DSP,
323 OMAP24XX_SLEEP_SAVE_CM_IDLEST_MDM,
324
325 OMAP24XX_SLEEP_SAVE_CM_AUTOIDLE1_CORE,
326 OMAP24XX_SLEEP_SAVE_CM_AUTOIDLE2_CORE,
327 OMAP24XX_SLEEP_SAVE_CM_AUTOIDLE3_CORE,
328 OMAP24XX_SLEEP_SAVE_CM_AUTOIDLE4_CORE,
329 OMAP24XX_SLEEP_SAVE_CM_AUTOIDLE_WKUP,
330 OMAP24XX_SLEEP_SAVE_CM_AUTOIDLE_PLL,
331 OMAP24XX_SLEEP_SAVE_CM_AUTOIDLE_DSP,
332 OMAP24XX_SLEEP_SAVE_CM_AUTOIDLE_MDM,
333
334 OMAP24XX_SLEEP_SAVE_CM_FCLKEN1_CORE,
335 OMAP24XX_SLEEP_SAVE_CM_FCLKEN2_CORE,
336 OMAP24XX_SLEEP_SAVE_CM_ICLKEN1_CORE,
337 OMAP24XX_SLEEP_SAVE_CM_ICLKEN2_CORE,
338 OMAP24XX_SLEEP_SAVE_CM_ICLKEN3_CORE,
339 OMAP24XX_SLEEP_SAVE_CM_ICLKEN4_CORE,
340 OMAP24XX_SLEEP_SAVE_GPIO1_IRQENABLE1,
341 OMAP24XX_SLEEP_SAVE_GPIO2_IRQENABLE1,
342 OMAP24XX_SLEEP_SAVE_GPIO3_IRQENABLE1,
343 OMAP24XX_SLEEP_SAVE_GPIO4_IRQENABLE1,
344 OMAP24XX_SLEEP_SAVE_GPIO3_OE,
345 OMAP24XX_SLEEP_SAVE_GPIO4_OE,
346 OMAP24XX_SLEEP_SAVE_GPIO3_RISINGDETECT,
347 OMAP24XX_SLEEP_SAVE_GPIO3_FALLINGDETECT,
348 OMAP24XX_SLEEP_SAVE_CONTROL_PADCONF_SPI1_NCS2,
349 OMAP24XX_SLEEP_SAVE_CONTROL_PADCONF_MCBSP1_DX,
350 OMAP24XX_SLEEP_SAVE_CONTROL_PADCONF_SSI1_FLAG_TX,
351 OMAP24XX_SLEEP_SAVE_CONTROL_PADCONF_SYS_NIRQW0,
352 OMAP24XX_SLEEP_SAVE_SIZE
353};
354
355#endif /* ASSEMBLER */
356#endif /* __ASM_ARCH_OMAP_PM_H */
diff --git a/include/asm-arm/arch-omap/prcm.h b/include/asm-arm/arch-omap/prcm.h
deleted file mode 100644
index 7bcaf94bde9f..000000000000
--- a/include/asm-arm/arch-omap/prcm.h
+++ /dev/null
@@ -1,33 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-omap/prcm.h
3 *
4 * Access definations for use in OMAP24XX clock and power management
5 *
6 * Copyright (C) 2005 Texas Instruments, Inc.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 */
22
23#ifndef __ASM_ARM_ARCH_DPM_PRCM_H
24#define __ASM_ARM_ARCH_DPM_PRCM_H
25
26u32 omap_prcm_get_reset_sources(void);
27
28#endif
29
30
31
32
33
diff --git a/include/asm-arm/arch-omap/sdrc.h b/include/asm-arm/arch-omap/sdrc.h
deleted file mode 100644
index 673b3965befc..000000000000
--- a/include/asm-arm/arch-omap/sdrc.h
+++ /dev/null
@@ -1,75 +0,0 @@
1#ifndef ____ASM_ARCH_SDRC_H
2#define ____ASM_ARCH_SDRC_H
3
4/*
5 * OMAP2/3 SDRC/SMS register definitions
6 *
7 * Copyright (C) 2007 Texas Instruments, Inc.
8 * Copyright (C) 2007 Nokia Corporation
9 *
10 * Written by Paul Walmsley
11 *
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License version 2 as
14 * published by the Free Software Foundation.
15 */
16
17#include <asm/arch/io.h>
18
19/* SDRC register offsets - read/write with sdrc_{read,write}_reg() */
20
21#define SDRC_SYSCONFIG 0x010
22#define SDRC_DLLA_CTRL 0x060
23#define SDRC_DLLA_STATUS 0x064
24#define SDRC_DLLB_CTRL 0x068
25#define SDRC_DLLB_STATUS 0x06C
26#define SDRC_POWER 0x070
27#define SDRC_MR_0 0x084
28#define SDRC_RFR_CTRL_0 0x0a4
29
30/*
31 * These values represent the number of memory clock cycles between
32 * autorefresh initiation. They assume 1 refresh per 64 ms (JEDEC), 8192
33 * rows per device, and include a subtraction of a 50 cycle window in the
34 * event that the autorefresh command is delayed due to other SDRC activity.
35 * The '| 1' sets the ARE field to send one autorefresh when the autorefresh
36 * counter reaches 0.
37 *
38 * These represent optimal values for common parts, it won't work for all.
39 * As long as you scale down, most parameters are still work, they just
40 * become sub-optimal. The RFR value goes in the opposite direction. If you
41 * don't adjust it down as your clock period increases the refresh interval
42 * will not be met. Setting all parameters for complete worst case may work,
43 * but may cut memory performance by 2x. Due to errata the DLLs need to be
44 * unlocked and their value needs run time calibration. A dynamic call is
45 * need for that as no single right value exists acorss production samples.
46 *
47 * Only the FULL speed values are given. Current code is such that rate
48 * changes must be made at DPLLoutx2. The actual value adjustment for low
49 * frequency operation will be handled by omap_set_performance()
50 *
51 * By having the boot loader boot up in the fastest L4 speed available likely
52 * will result in something which you can switch between.
53 */
54#define SDRC_RFR_CTRL_165MHz (0x00044c00 | 1)
55#define SDRC_RFR_CTRL_133MHz (0x0003de00 | 1)
56#define SDRC_RFR_CTRL_100MHz (0x0002da01 | 1)
57#define SDRC_RFR_CTRL_110MHz (0x0002da01 | 1) /* Need to calc */
58#define SDRC_RFR_CTRL_BYPASS (0x00005000 | 1) /* Need to calc */
59
60
61/*
62 * SMS register access
63 */
64
65
66#define OMAP242X_SMS_REGADDR(reg) (void __iomem *)IO_ADDRESS(OMAP2420_SMS_BASE + reg)
67#define OMAP243X_SMS_REGADDR(reg) (void __iomem *)IO_ADDRESS(OMAP243X_SMS_BASE + reg)
68#define OMAP343X_SMS_REGADDR(reg) (void __iomem *)IO_ADDRESS(OMAP343X_SMS_BASE + reg)
69
70/* SMS register offsets - read/write with sms_{read,write}_reg() */
71
72#define SMS_SYSCONFIG 0x010
73/* REVISIT: fill in other SMS registers here */
74
75#endif
diff --git a/include/asm-arm/arch-omap/serial.h b/include/asm-arm/arch-omap/serial.h
deleted file mode 100644
index 79a5297af9fc..000000000000
--- a/include/asm-arm/arch-omap/serial.h
+++ /dev/null
@@ -1,37 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-omap/serial.h
3 *
4 * This program is distributed in the hope that it will be useful,
5 * but WITHOUT ANY WARRANTY; without even the implied warranty of
6 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7 * GNU General Public License for more details.
8 */
9
10#ifndef __ASM_ARCH_SERIAL_H
11#define __ASM_ARCH_SERIAL_H
12
13#if defined(CONFIG_ARCH_OMAP1)
14/* OMAP1 serial ports */
15#define OMAP_UART1_BASE 0xfffb0000
16#define OMAP_UART2_BASE 0xfffb0800
17#define OMAP_UART3_BASE 0xfffb9800
18#elif defined(CONFIG_ARCH_OMAP2)
19/* OMAP2 serial ports */
20#define OMAP_UART1_BASE 0x4806a000
21#define OMAP_UART2_BASE 0x4806c000
22#define OMAP_UART3_BASE 0x4806e000
23#endif
24
25#define OMAP_MAX_NR_PORTS 3
26#define OMAP1510_BASE_BAUD (12000000/16)
27#define OMAP16XX_BASE_BAUD (48000000/16)
28
29#define is_omap_port(p) ({int __ret = 0; \
30 if (p == IO_ADDRESS(OMAP_UART1_BASE) || \
31 p == IO_ADDRESS(OMAP_UART2_BASE) || \
32 p == IO_ADDRESS(OMAP_UART3_BASE)) \
33 __ret = 1; \
34 __ret; \
35 })
36
37#endif
diff --git a/include/asm-arm/arch-omap/sram.h b/include/asm-arm/arch-omap/sram.h
deleted file mode 100644
index be59f4a9828b..000000000000
--- a/include/asm-arm/arch-omap/sram.h
+++ /dev/null
@@ -1,56 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-omap/sram.h
3 *
4 * Interface for functions that need to be run in internal SRAM
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10
11#ifndef __ARCH_ARM_OMAP_SRAM_H
12#define __ARCH_ARM_OMAP_SRAM_H
13
14extern int __init omap_sram_init(void);
15extern void * omap_sram_push(void * start, unsigned long size);
16extern void omap_sram_reprogram_clock(u32 dpllctl, u32 ckctl);
17
18extern void omap2_sram_ddr_init(u32 *slow_dll_ctrl, u32 fast_dll_ctrl,
19 u32 base_cs, u32 force_unlock);
20extern void omap2_sram_reprogram_sdrc(u32 perf_level, u32 dll_val,
21 u32 mem_type);
22extern u32 omap2_set_prcm(u32 dpll_ctrl_val, u32 sdrc_rfr_val, int bypass);
23
24/* Do not use these */
25extern void omap1_sram_reprogram_clock(u32 ckctl, u32 dpllctl);
26extern unsigned long omap1_sram_reprogram_clock_sz;
27
28extern void omap24xx_sram_reprogram_clock(u32 ckctl, u32 dpllctl);
29extern unsigned long omap24xx_sram_reprogram_clock_sz;
30
31extern void omap242x_sram_ddr_init(u32 *slow_dll_ctrl, u32 fast_dll_ctrl,
32 u32 base_cs, u32 force_unlock);
33extern unsigned long omap242x_sram_ddr_init_sz;
34
35extern u32 omap242x_sram_set_prcm(u32 dpll_ctrl_val, u32 sdrc_rfr_val,
36 int bypass);
37extern unsigned long omap242x_sram_set_prcm_sz;
38
39extern void omap242x_sram_reprogram_sdrc(u32 perf_level, u32 dll_val,
40 u32 mem_type);
41extern unsigned long omap242x_sram_reprogram_sdrc_sz;
42
43
44extern void omap243x_sram_ddr_init(u32 *slow_dll_ctrl, u32 fast_dll_ctrl,
45 u32 base_cs, u32 force_unlock);
46extern unsigned long omap243x_sram_ddr_init_sz;
47
48extern u32 omap243x_sram_set_prcm(u32 dpll_ctrl_val, u32 sdrc_rfr_val,
49 int bypass);
50extern unsigned long omap243x_sram_set_prcm_sz;
51
52extern void omap243x_sram_reprogram_sdrc(u32 perf_level, u32 dll_val,
53 u32 mem_type);
54extern unsigned long omap243x_sram_reprogram_sdrc_sz;
55
56#endif
diff --git a/include/asm-arm/arch-omap/system.h b/include/asm-arm/arch-omap/system.h
deleted file mode 100644
index ac2bfa433f06..000000000000
--- a/include/asm-arm/arch-omap/system.h
+++ /dev/null
@@ -1,49 +0,0 @@
1/*
2 * Copied from linux/include/asm-arm/arch-sa1100/system.h
3 * Copyright (c) 1999 Nicolas Pitre <nico@cam.org>
4 */
5#ifndef __ASM_ARCH_SYSTEM_H
6#define __ASM_ARCH_SYSTEM_H
7#include <linux/clk.h>
8
9#include <asm/mach-types.h>
10#include <asm/hardware.h>
11
12#ifndef CONFIG_MACH_VOICEBLUE
13#define voiceblue_reset() do {} while (0)
14#endif
15
16extern void omap_prcm_arch_reset(char mode);
17
18static inline void arch_idle(void)
19{
20 cpu_do_idle();
21}
22
23static inline void omap1_arch_reset(char mode)
24{
25 /*
26 * Workaround for 5912/1611b bug mentioned in sprz209d.pdf p. 28
27 * "Global Software Reset Affects Traffic Controller Frequency".
28 */
29 if (cpu_is_omap5912()) {
30 omap_writew(omap_readw(DPLL_CTL) & ~(1 << 4),
31 DPLL_CTL);
32 omap_writew(0x8, ARM_RSTCT1);
33 }
34
35 if (machine_is_voiceblue())
36 voiceblue_reset();
37 else
38 omap_writew(1, ARM_RSTCT1);
39}
40
41static inline void arch_reset(char mode)
42{
43 if (!cpu_is_omap24xx())
44 omap1_arch_reset(mode);
45 else
46 omap_prcm_arch_reset(mode);
47}
48
49#endif
diff --git a/include/asm-arm/arch-omap/tc.h b/include/asm-arm/arch-omap/tc.h
deleted file mode 100644
index 65a9c82d3bf7..000000000000
--- a/include/asm-arm/arch-omap/tc.h
+++ /dev/null
@@ -1,106 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-omap/tc.h
3 *
4 * OMAP Traffic Controller
5 *
6 * Copyright (C) 2004 Nokia Corporation
7 * Author: Imre Deak <imre.deak@nokia.com>
8 *
9 * This program is free software; you can redistribute it and/or modify it
10 * under the terms of the GNU General Public License as published by the
11 * Free Software Foundation; either version 2 of the License, or (at your
12 * option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful, but
15 * WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License along
20 * with this program; if not, write to the Free Software Foundation, Inc.,
21 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 */
23
24#ifndef __ASM_ARCH_TC_H
25#define __ASM_ARCH_TC_H
26
27#define TCMIF_BASE 0xfffecc00
28#define OMAP_TC_OCPT1_PRIOR (TCMIF_BASE + 0x00)
29#define OMAP_TC_EMIFS_PRIOR (TCMIF_BASE + 0x04)
30#define OMAP_TC_EMIFF_PRIOR (TCMIF_BASE + 0x08)
31#define EMIFS_CONFIG (TCMIF_BASE + 0x0c)
32#define EMIFS_CS0_CONFIG (TCMIF_BASE + 0x10)
33#define EMIFS_CS1_CONFIG (TCMIF_BASE + 0x14)
34#define EMIFS_CS2_CONFIG (TCMIF_BASE + 0x18)
35#define EMIFS_CS3_CONFIG (TCMIF_BASE + 0x1c)
36#define EMIFF_SDRAM_CONFIG (TCMIF_BASE + 0x20)
37#define EMIFF_MRS (TCMIF_BASE + 0x24)
38#define TC_TIMEOUT1 (TCMIF_BASE + 0x28)
39#define TC_TIMEOUT2 (TCMIF_BASE + 0x2c)
40#define TC_TIMEOUT3 (TCMIF_BASE + 0x30)
41#define TC_ENDIANISM (TCMIF_BASE + 0x34)
42#define EMIFF_SDRAM_CONFIG_2 (TCMIF_BASE + 0x3c)
43#define EMIF_CFG_DYNAMIC_WS (TCMIF_BASE + 0x40)
44#define EMIFS_ACS0 (TCMIF_BASE + 0x50)
45#define EMIFS_ACS1 (TCMIF_BASE + 0x54)
46#define EMIFS_ACS2 (TCMIF_BASE + 0x58)
47#define EMIFS_ACS3 (TCMIF_BASE + 0x5c)
48#define OMAP_TC_OCPT2_PRIOR (TCMIF_BASE + 0xd0)
49
50/* external EMIFS chipselect regions */
51#define OMAP_CS0_PHYS 0x00000000
52#define OMAP_CS0_SIZE SZ_64M
53
54#define OMAP_CS1_PHYS 0x04000000
55#define OMAP_CS1_SIZE SZ_64M
56
57#define OMAP_CS1A_PHYS OMAP_CS1_PHYS
58#define OMAP_CS1A_SIZE SZ_32M
59
60#define OMAP_CS1B_PHYS (OMAP_CS1A_PHYS + OMAP_CS1A_SIZE)
61#define OMAP_CS1B_SIZE SZ_32M
62
63#define OMAP_CS2_PHYS 0x08000000
64#define OMAP_CS2_SIZE SZ_64M
65
66#define OMAP_CS2A_PHYS OMAP_CS2_PHYS
67#define OMAP_CS2A_SIZE SZ_32M
68
69#define OMAP_CS2B_PHYS (OMAP_CS2A_PHYS + OMAP_CS2A_SIZE)
70#define OMAP_CS2B_SIZE SZ_32M
71
72#define OMAP_CS3_PHYS 0x0c000000
73#define OMAP_CS3_SIZE SZ_64M
74
75#ifndef __ASSEMBLER__
76
77/* EMIF Slow Interface Configuration Register */
78#define OMAP_EMIFS_CONFIG_FR (1 << 4)
79#define OMAP_EMIFS_CONFIG_PDE (1 << 3)
80#define OMAP_EMIFS_CONFIG_PWD_EN (1 << 2)
81#define OMAP_EMIFS_CONFIG_BM (1 << 1)
82#define OMAP_EMIFS_CONFIG_WP (1 << 0)
83
84#define EMIFS_CCS(n) (EMIFS_CS0_CONFIG + (4 * (n)))
85#define EMIFS_ACS(n) (EMIFS_ACS0 + (4 * (n)))
86
87/* Almost all documentation for chip and board memory maps assumes
88 * BM is clear. Most devel boards have a switch to control booting
89 * from NOR flash (using external chipselect 3) rather than mask ROM,
90 * which uses BM to interchange the physical CS0 and CS3 addresses.
91 */
92static inline u32 omap_cs0_phys(void)
93{
94 return (omap_readl(EMIFS_CONFIG) & OMAP_EMIFS_CONFIG_BM)
95 ? OMAP_CS3_PHYS : 0;
96}
97
98static inline u32 omap_cs3_phys(void)
99{
100 return (omap_readl(EMIFS_CONFIG) & OMAP_EMIFS_CONFIG_BM)
101 ? 0 : OMAP_CS3_PHYS;
102}
103
104#endif /* __ASSEMBLER__ */
105
106#endif /* __ASM_ARCH_TC_H */
diff --git a/include/asm-arm/arch-omap/timex.h b/include/asm-arm/arch-omap/timex.h
deleted file mode 100644
index 21f2e367185a..000000000000
--- a/include/asm-arm/arch-omap/timex.h
+++ /dev/null
@@ -1,41 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-omap/timex.h
3 *
4 * Copyright (C) 2000 RidgeRun, Inc.
5 * Author: Greg Lonnon <glonnon@ridgerun.com>
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; either version 2 of the License, or (at your
10 * option) any later version.
11 *
12 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
13 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
14 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
15 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
16 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
17 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
18 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
19 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
20 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
21 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
22 *
23 * You should have received a copy of the GNU General Public License along
24 * with this program; if not, write to the Free Software Foundation, Inc.,
25 * 675 Mass Ave, Cambridge, MA 02139, USA.
26 */
27
28#if !defined(__ASM_ARCH_OMAP_TIMEX_H)
29#define __ASM_ARCH_OMAP_TIMEX_H
30
31/*
32 * OMAP 32KHz timer updates time one jiffie at a time from a secondary timer,
33 * and that's why the CLOCK_TICK_RATE is not 32768.
34 */
35#ifdef CONFIG_OMAP_32K_TIMER
36#define CLOCK_TICK_RATE (CONFIG_OMAP_32K_TIMER_HZ)
37#else
38#define CLOCK_TICK_RATE (HZ * 100000UL)
39#endif
40
41#endif /* __ASM_ARCH_OMAP_TIMEX_H */
diff --git a/include/asm-arm/arch-omap/uncompress.h b/include/asm-arm/arch-omap/uncompress.h
deleted file mode 100644
index aca0adfef1b8..000000000000
--- a/include/asm-arm/arch-omap/uncompress.h
+++ /dev/null
@@ -1,83 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-omap/uncompress.h
3 *
4 * Serial port stubs for kernel decompress status messages
5 *
6 * Initially based on:
7 * linux-2.4.15-rmk1-dsplinux1.6/include/asm-arm/arch-omap1510/uncompress.h
8 * Copyright (C) 2000 RidgeRun, Inc.
9 * Author: Greg Lonnon <glonnon@ridgerun.com>
10 *
11 * Rewritten by:
12 * Author: <source@mvista.com>
13 * 2004 (c) MontaVista Software, Inc.
14 *
15 * This file is licensed under the terms of the GNU General Public License
16 * version 2. This program is licensed "as is" without any warranty of any
17 * kind, whether express or implied.
18 */
19
20#include <linux/types.h>
21#include <linux/serial_reg.h>
22#include <asm/arch/serial.h>
23
24unsigned int system_rev;
25
26#define UART_OMAP_MDR1 0x08 /* mode definition register */
27#define OMAP_ID_730 0x355F
28#define ID_MASK 0x7fff
29#define check_port(base, shift) ((base[UART_OMAP_MDR1 << shift] & 7) == 0)
30#define omap_get_id() ((*(volatile unsigned int *)(0xfffed404)) >> 12) & ID_MASK
31
32static void putc(int c)
33{
34 volatile u8 * uart = 0;
35 int shift = 2;
36
37#ifdef CONFIG_MACH_OMAP_PALMTE
38 return;
39#endif
40
41#ifdef CONFIG_ARCH_OMAP
42#ifdef CONFIG_OMAP_LL_DEBUG_UART3
43 uart = (volatile u8 *)(OMAP_UART3_BASE);
44#elif defined(CONFIG_OMAP_LL_DEBUG_UART2)
45 uart = (volatile u8 *)(OMAP_UART2_BASE);
46#else
47 uart = (volatile u8 *)(OMAP_UART1_BASE);
48#endif
49
50#ifdef CONFIG_ARCH_OMAP1
51 /* Determine which serial port to use */
52 do {
53 /* MMU is not on, so cpu_is_omapXXXX() won't work here */
54 unsigned int omap_id = omap_get_id();
55
56 if (omap_id == OMAP_ID_730)
57 shift = 0;
58
59 if (check_port(uart, shift))
60 break;
61 /* Silent boot if no serial ports are enabled. */
62 return;
63 } while (0);
64#endif /* CONFIG_ARCH_OMAP1 */
65#endif
66
67 /*
68 * Now, xmit each character
69 */
70 while (!(uart[UART_LSR << shift] & UART_LSR_THRE))
71 barrier();
72 uart[UART_TX << shift] = c;
73}
74
75static inline void flush(void)
76{
77}
78
79/*
80 * nothing to do
81 */
82#define arch_decomp_setup()
83#define arch_decomp_wdog()
diff --git a/include/asm-arm/arch-omap/usb.h b/include/asm-arm/arch-omap/usb.h
deleted file mode 100644
index ddf1861e6df9..000000000000
--- a/include/asm-arm/arch-omap/usb.h
+++ /dev/null
@@ -1,141 +0,0 @@
1// include/asm-arm/mach-omap/usb.h
2
3#ifndef __ASM_ARCH_OMAP_USB_H
4#define __ASM_ARCH_OMAP_USB_H
5
6#include <asm/arch/board.h>
7
8/*-------------------------------------------------------------------------*/
9
10#define OMAP1_OTG_BASE 0xfffb0400
11#define OMAP1_UDC_BASE 0xfffb4000
12#define OMAP1_OHCI_BASE 0xfffba000
13
14#define OMAP2_OHCI_BASE 0x4805e000
15#define OMAP2_UDC_BASE 0x4805e200
16#define OMAP2_OTG_BASE 0x4805e300
17
18#ifdef CONFIG_ARCH_OMAP1
19
20#define OTG_BASE OMAP1_OTG_BASE
21#define UDC_BASE OMAP1_UDC_BASE
22#define OMAP_OHCI_BASE OMAP1_OHCI_BASE
23
24#else
25
26#define OTG_BASE OMAP2_OTG_BASE
27#define UDC_BASE OMAP2_UDC_BASE
28#define OMAP_OHCI_BASE OMAP2_OHCI_BASE
29
30#endif
31
32/*-------------------------------------------------------------------------*/
33
34/*
35 * OTG and transceiver registers, for OMAPs starting with ARM926
36 */
37#define OTG_REV (OTG_BASE + 0x00)
38#define OTG_SYSCON_1 (OTG_BASE + 0x04)
39# define USB2_TRX_MODE(w) (((w)>>24)&0x07)
40# define USB1_TRX_MODE(w) (((w)>>20)&0x07)
41# define USB0_TRX_MODE(w) (((w)>>16)&0x07)
42# define OTG_IDLE_EN (1 << 15)
43# define HST_IDLE_EN (1 << 14)
44# define DEV_IDLE_EN (1 << 13)
45# define OTG_RESET_DONE (1 << 2)
46# define OTG_SOFT_RESET (1 << 1)
47#define OTG_SYSCON_2 (OTG_BASE + 0x08)
48# define OTG_EN (1 << 31)
49# define USBX_SYNCHRO (1 << 30)
50# define OTG_MST16 (1 << 29)
51# define SRP_GPDATA (1 << 28)
52# define SRP_GPDVBUS (1 << 27)
53# define SRP_GPUVBUS(w) (((w)>>24)&0x07)
54# define A_WAIT_VRISE(w) (((w)>>20)&0x07)
55# define B_ASE_BRST(w) (((w)>>16)&0x07)
56# define SRP_DPW (1 << 14)
57# define SRP_DATA (1 << 13)
58# define SRP_VBUS (1 << 12)
59# define OTG_PADEN (1 << 10)
60# define HMC_PADEN (1 << 9)
61# define UHOST_EN (1 << 8)
62# define HMC_TLLSPEED (1 << 7)
63# define HMC_TLLATTACH (1 << 6)
64# define OTG_HMC(w) (((w)>>0)&0x3f)
65#define OTG_CTRL (OTG_BASE + 0x0c)
66# define OTG_USB2_EN (1 << 29)
67# define OTG_USB2_DP (1 << 28)
68# define OTG_USB2_DM (1 << 27)
69# define OTG_USB1_EN (1 << 26)
70# define OTG_USB1_DP (1 << 25)
71# define OTG_USB1_DM (1 << 24)
72# define OTG_USB0_EN (1 << 23)
73# define OTG_USB0_DP (1 << 22)
74# define OTG_USB0_DM (1 << 21)
75# define OTG_ASESSVLD (1 << 20)
76# define OTG_BSESSEND (1 << 19)
77# define OTG_BSESSVLD (1 << 18)
78# define OTG_VBUSVLD (1 << 17)
79# define OTG_ID (1 << 16)
80# define OTG_DRIVER_SEL (1 << 15)
81# define OTG_A_SETB_HNPEN (1 << 12)
82# define OTG_A_BUSREQ (1 << 11)
83# define OTG_B_HNPEN (1 << 9)
84# define OTG_B_BUSREQ (1 << 8)
85# define OTG_BUSDROP (1 << 7)
86# define OTG_PULLDOWN (1 << 5)
87# define OTG_PULLUP (1 << 4)
88# define OTG_DRV_VBUS (1 << 3)
89# define OTG_PD_VBUS (1 << 2)
90# define OTG_PU_VBUS (1 << 1)
91# define OTG_PU_ID (1 << 0)
92#define OTG_IRQ_EN (OTG_BASE + 0x10) /* 16-bit */
93# define DRIVER_SWITCH (1 << 15)
94# define A_VBUS_ERR (1 << 13)
95# define A_REQ_TMROUT (1 << 12)
96# define A_SRP_DETECT (1 << 11)
97# define B_HNP_FAIL (1 << 10)
98# define B_SRP_TMROUT (1 << 9)
99# define B_SRP_DONE (1 << 8)
100# define B_SRP_STARTED (1 << 7)
101# define OPRT_CHG (1 << 0)
102#define OTG_IRQ_SRC (OTG_BASE + 0x14) /* 16-bit */
103 // same bits as in IRQ_EN
104#define OTG_OUTCTRL (OTG_BASE + 0x18) /* 16-bit */
105# define OTGVPD (1 << 14)
106# define OTGVPU (1 << 13)
107# define OTGPUID (1 << 12)
108# define USB2VDR (1 << 10)
109# define USB2PDEN (1 << 9)
110# define USB2PUEN (1 << 8)
111# define USB1VDR (1 << 6)
112# define USB1PDEN (1 << 5)
113# define USB1PUEN (1 << 4)
114# define USB0VDR (1 << 2)
115# define USB0PDEN (1 << 1)
116# define USB0PUEN (1 << 0)
117#define OTG_TEST (OTG_BASE + 0x20) /* 16-bit */
118#define OTG_VENDOR_CODE (OTG_BASE + 0xfc) /* 16-bit */
119
120/*-------------------------------------------------------------------------*/
121
122/* OMAP1 */
123#define USB_TRANSCEIVER_CTRL (0xfffe1000 + 0x0064)
124# define CONF_USB2_UNI_R (1 << 8)
125# define CONF_USB1_UNI_R (1 << 7)
126# define CONF_USB_PORT0_R(x) (((x)>>4)&0x7)
127# define CONF_USB0_ISOLATE_R (1 << 3)
128# define CONF_USB_PWRDN_DM_R (1 << 2)
129# define CONF_USB_PWRDN_DP_R (1 << 1)
130
131/* OMAP2 */
132# define USB_UNIDIR 0x0
133# define USB_UNIDIR_TLL 0x1
134# define USB_BIDIR 0x2
135# define USB_BIDIR_TLL 0x3
136# define USBTXWRMODEI(port, x) ((x) << (22 - (port * 2)))
137# define USBT2TLL5PI (1 << 17)
138# define USB0PUENACTLOI (1 << 16)
139# define USBSTANDBYCTRL (1 << 15)
140
141#endif /* __ASM_ARCH_OMAP_USB_H */
diff --git a/include/asm-arm/arch-omap/vmalloc.h b/include/asm-arm/arch-omap/vmalloc.h
deleted file mode 100644
index 5b8bd8dae8be..000000000000
--- a/include/asm-arm/arch-omap/vmalloc.h
+++ /dev/null
@@ -1,21 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-omap/vmalloc.h
3 *
4 * Copyright (C) 2000 Russell King.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20#define VMALLOC_END (PAGE_OFFSET + 0x10000000)
21
diff --git a/include/asm-arm/arch-orion5x/debug-macro.S b/include/asm-arm/arch-orion5x/debug-macro.S
deleted file mode 100644
index 4f98f3ba2929..000000000000
--- a/include/asm-arm/arch-orion5x/debug-macro.S
+++ /dev/null
@@ -1,22 +0,0 @@
1/*
2 * include/asm-arm/arch-orion5x/debug-macro.S
3 *
4 * Debugging macro include header
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9*/
10
11#include <asm/arch/orion5x.h>
12
13 .macro addruart,rx
14 mrc p15, 0, \rx, c1, c0
15 tst \rx, #1 @ MMU enabled?
16 ldreq \rx, =ORION5X_REGS_PHYS_BASE
17 ldrne \rx, =ORION5X_REGS_VIRT_BASE
18 orr \rx, \rx, #0x00012000
19 .endm
20
21#define UART_SHIFT 2
22#include <asm/hardware/debug-8250.S>
diff --git a/include/asm-arm/arch-orion5x/entry-macro.S b/include/asm-arm/arch-orion5x/entry-macro.S
deleted file mode 100644
index d8ef54c0ee9a..000000000000
--- a/include/asm-arm/arch-orion5x/entry-macro.S
+++ /dev/null
@@ -1,31 +0,0 @@
1/*
2 * include/asm-arm/arch-orion5x/entry-macro.S
3 *
4 * Low-level IRQ helper macros for Orion platforms
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10
11#include <asm/arch/orion5x.h>
12
13 .macro disable_fiq
14 .endm
15
16 .macro arch_ret_to_user, tmp1, tmp2
17 .endm
18
19 .macro get_irqnr_preamble, base, tmp
20 ldr \base, =MAIN_IRQ_CAUSE
21 .endm
22
23 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
24 ldr \irqstat, [\base, #0] @ main cause
25 ldr \tmp, [\base, #(MAIN_IRQ_MASK - MAIN_IRQ_CAUSE)] @ main mask
26 mov \irqnr, #0 @ default irqnr
27 @ find cause bits that are unmasked
28 ands \irqstat, \irqstat, \tmp @ clear Z flag if any
29 clzne \irqnr, \irqstat @ calc irqnr
30 rsbne \irqnr, \irqnr, #31
31 .endm
diff --git a/include/asm-arm/arch-orion5x/gpio.h b/include/asm-arm/arch-orion5x/gpio.h
deleted file mode 100644
index c85e498388b6..000000000000
--- a/include/asm-arm/arch-orion5x/gpio.h
+++ /dev/null
@@ -1,28 +0,0 @@
1/*
2 * include/asm-arm/arch-orion5x/gpio.h
3 *
4 * This file is licensed under the terms of the GNU General Public
5 * License version 2. This program is licensed "as is" without any
6 * warranty of any kind, whether express or implied.
7 */
8
9extern int gpio_request(unsigned pin, const char *label);
10extern void gpio_free(unsigned pin);
11extern int gpio_direction_input(unsigned pin);
12extern int gpio_direction_output(unsigned pin, int value);
13extern int gpio_get_value(unsigned pin);
14extern void gpio_set_value(unsigned pin, int value);
15extern void orion5x_gpio_set_blink(unsigned pin, int blink);
16extern void gpio_display(void); /* debug */
17
18static inline int gpio_to_irq(int pin)
19{
20 return pin + IRQ_ORION5X_GPIO_START;
21}
22
23static inline int irq_to_gpio(int irq)
24{
25 return irq - IRQ_ORION5X_GPIO_START;
26}
27
28#include <asm-generic/gpio.h> /* cansleep wrappers */
diff --git a/include/asm-arm/arch-orion5x/hardware.h b/include/asm-arm/arch-orion5x/hardware.h
deleted file mode 100644
index 5d2d8e0b5630..000000000000
--- a/include/asm-arm/arch-orion5x/hardware.h
+++ /dev/null
@@ -1,21 +0,0 @@
1/*
2 * include/asm-arm/arch-orion5x/hardware.h
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 */
8
9#ifndef __ASM_ARCH_HARDWARE_H
10#define __ASM_ARCH_HARDWARE_H
11
12#include "orion5x.h"
13
14#define pcibios_assign_all_busses() 1
15
16#define PCIBIOS_MIN_IO 0x00001000
17#define PCIBIOS_MIN_MEM 0x01000000
18#define PCIMEM_BASE ORION5X_PCIE_MEM_PHYS_BASE
19
20
21#endif
diff --git a/include/asm-arm/arch-orion5x/io.h b/include/asm-arm/arch-orion5x/io.h
deleted file mode 100644
index 59f1bc96a23b..000000000000
--- a/include/asm-arm/arch-orion5x/io.h
+++ /dev/null
@@ -1,63 +0,0 @@
1/*
2 * include/asm-arm/arch-orion5x/io.h
3 *
4 * Tzachi Perelstein <tzachi@marvell.com>
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10
11#ifndef __ASM_ARCH_IO_H
12#define __ASM_ARCH_IO_H
13
14#include "orion5x.h"
15
16#define IO_SPACE_LIMIT 0xffffffff
17
18static inline void __iomem *
19__arch_ioremap(unsigned long paddr, size_t size, unsigned int mtype)
20{
21 void __iomem *retval;
22 unsigned long offs = paddr - ORION5X_REGS_PHYS_BASE;
23 if (mtype == MT_DEVICE && size && offs < ORION5X_REGS_SIZE &&
24 size <= ORION5X_REGS_SIZE && offs + size <= ORION5X_REGS_SIZE) {
25 retval = (void __iomem *)ORION5X_REGS_VIRT_BASE + offs;
26 } else {
27 retval = __arm_ioremap(paddr, size, mtype);
28 }
29
30 return retval;
31}
32
33static inline void
34__arch_iounmap(void __iomem *addr)
35{
36 if (addr < (void __iomem *)ORION5X_REGS_VIRT_BASE ||
37 addr >= (void __iomem *)(ORION5X_REGS_VIRT_BASE + ORION5X_REGS_SIZE))
38 __iounmap(addr);
39}
40
41static inline void __iomem *__io(unsigned long addr)
42{
43 return (void __iomem *)addr;
44}
45
46#define __arch_ioremap(p, s, m) __arch_ioremap(p, s, m)
47#define __arch_iounmap(a) __arch_iounmap(a)
48#define __io(a) __io(a)
49#define __mem_pci(a) (a)
50
51
52/*****************************************************************************
53 * Helpers to access Orion registers
54 ****************************************************************************/
55/*
56 * These are not preempt-safe. Locks, if needed, must be taken
57 * care of by the caller.
58 */
59#define orion5x_setbits(r, mask) writel(readl(r) | (mask), (r))
60#define orion5x_clrbits(r, mask) writel(readl(r) & ~(mask), (r))
61
62
63#endif
diff --git a/include/asm-arm/arch-orion5x/irqs.h b/include/asm-arm/arch-orion5x/irqs.h
deleted file mode 100644
index abdd61a4833a..000000000000
--- a/include/asm-arm/arch-orion5x/irqs.h
+++ /dev/null
@@ -1,62 +0,0 @@
1/*
2 * include/asm-arm/arch-orion5x/irqs.h
3 *
4 * IRQ definitions for Orion SoC
5 *
6 * Maintainer: Tzachi Perelstein <tzachi@marvell.com>
7 *
8 * This file is licensed under the terms of the GNU General Public
9 * License version 2. This program is licensed "as is" without any
10 * warranty of any kind, whether express or implied.
11 */
12
13#ifndef __ASM_ARCH_IRQS_H
14#define __ASM_ARCH_IRQS_H
15
16#include "orion5x.h" /* need GPIO_MAX */
17
18/*
19 * Orion Main Interrupt Controller
20 */
21#define IRQ_ORION5X_BRIDGE 0
22#define IRQ_ORION5X_DOORBELL_H2C 1
23#define IRQ_ORION5X_DOORBELL_C2H 2
24#define IRQ_ORION5X_UART0 3
25#define IRQ_ORION5X_UART1 4
26#define IRQ_ORION5X_I2C 5
27#define IRQ_ORION5X_GPIO_0_7 6
28#define IRQ_ORION5X_GPIO_8_15 7
29#define IRQ_ORION5X_GPIO_16_23 8
30#define IRQ_ORION5X_GPIO_24_31 9
31#define IRQ_ORION5X_PCIE0_ERR 10
32#define IRQ_ORION5X_PCIE0_INT 11
33#define IRQ_ORION5X_USB1_CTRL 12
34#define IRQ_ORION5X_DEV_BUS_ERR 14
35#define IRQ_ORION5X_PCI_ERR 15
36#define IRQ_ORION5X_USB_BR_ERR 16
37#define IRQ_ORION5X_USB0_CTRL 17
38#define IRQ_ORION5X_ETH_RX 18
39#define IRQ_ORION5X_ETH_TX 19
40#define IRQ_ORION5X_ETH_MISC 20
41#define IRQ_ORION5X_ETH_SUM 21
42#define IRQ_ORION5X_ETH_ERR 22
43#define IRQ_ORION5X_IDMA_ERR 23
44#define IRQ_ORION5X_IDMA_0 24
45#define IRQ_ORION5X_IDMA_1 25
46#define IRQ_ORION5X_IDMA_2 26
47#define IRQ_ORION5X_IDMA_3 27
48#define IRQ_ORION5X_CESA 28
49#define IRQ_ORION5X_SATA 29
50#define IRQ_ORION5X_XOR0 30
51#define IRQ_ORION5X_XOR1 31
52
53/*
54 * Orion General Purpose Pins
55 */
56#define IRQ_ORION5X_GPIO_START 32
57#define NR_GPIO_IRQS GPIO_MAX
58
59#define NR_IRQS (IRQ_ORION5X_GPIO_START + NR_GPIO_IRQS)
60
61
62#endif
diff --git a/include/asm-arm/arch-orion5x/memory.h b/include/asm-arm/arch-orion5x/memory.h
deleted file mode 100644
index 80053a7afc7a..000000000000
--- a/include/asm-arm/arch-orion5x/memory.h
+++ /dev/null
@@ -1,16 +0,0 @@
1/*
2 * include/asm-arm/arch-orion5x/memory.h
3 *
4 * Marvell Orion memory definitions
5 */
6
7#ifndef __ASM_ARCH_MEMORY_H
8#define __ASM_ARCH_MEMORY_H
9
10#define PHYS_OFFSET UL(0x00000000)
11
12#define __virt_to_bus(x) __virt_to_phys(x)
13#define __bus_to_virt(x) __phys_to_virt(x)
14
15
16#endif
diff --git a/include/asm-arm/arch-orion5x/orion5x.h b/include/asm-arm/arch-orion5x/orion5x.h
deleted file mode 100644
index 10257f5c5e9e..000000000000
--- a/include/asm-arm/arch-orion5x/orion5x.h
+++ /dev/null
@@ -1,162 +0,0 @@
1/*
2 * include/asm-arm/arch-orion5x/orion5x.h
3 *
4 * Generic definitions of Orion SoC flavors:
5 * Orion-1, Orion-VoIP, Orion-NAS, and Orion-2.
6 *
7 * Maintainer: Tzachi Perelstein <tzachi@marvell.com>
8 *
9 * This file is licensed under the terms of the GNU General Public
10 * License version 2. This program is licensed "as is" without any
11 * warranty of any kind, whether express or implied.
12 */
13
14#ifndef __ASM_ARCH_ORION5X_H
15#define __ASM_ARCH_ORION5X_H
16
17/*****************************************************************************
18 * Orion Address Maps
19 *
20 * phys
21 * e0000000 PCIe MEM space
22 * e8000000 PCI MEM space
23 * f0000000 PCIe WA space (Orion-1/Orion-NAS only)
24 * f1000000 on-chip peripheral registers
25 * f2000000 PCIe I/O space
26 * f2100000 PCI I/O space
27 * f4000000 device bus mappings (boot)
28 * fa000000 device bus mappings (cs0)
29 * fa800000 device bus mappings (cs2)
30 * fc000000 device bus mappings (cs0/cs1)
31 *
32 * virt phys size
33 * fdd00000 f1000000 1M on-chip peripheral registers
34 * fde00000 f2000000 1M PCIe I/O space
35 * fdf00000 f2100000 1M PCI I/O space
36 * fe000000 f0000000 16M PCIe WA space (Orion-1/Orion-NAS only)
37 ****************************************************************************/
38#define ORION5X_REGS_PHYS_BASE 0xf1000000
39#define ORION5X_REGS_VIRT_BASE 0xfdd00000
40#define ORION5X_REGS_SIZE SZ_1M
41
42#define ORION5X_PCIE_IO_PHYS_BASE 0xf2000000
43#define ORION5X_PCIE_IO_VIRT_BASE 0xfde00000
44#define ORION5X_PCIE_IO_BUS_BASE 0x00000000
45#define ORION5X_PCIE_IO_SIZE SZ_1M
46
47#define ORION5X_PCI_IO_PHYS_BASE 0xf2100000
48#define ORION5X_PCI_IO_VIRT_BASE 0xfdf00000
49#define ORION5X_PCI_IO_BUS_BASE 0x00100000
50#define ORION5X_PCI_IO_SIZE SZ_1M
51
52/* Relevant only for Orion-1/Orion-NAS */
53#define ORION5X_PCIE_WA_PHYS_BASE 0xf0000000
54#define ORION5X_PCIE_WA_VIRT_BASE 0xfe000000
55#define ORION5X_PCIE_WA_SIZE SZ_16M
56
57#define ORION5X_PCIE_MEM_PHYS_BASE 0xe0000000
58#define ORION5X_PCIE_MEM_SIZE SZ_128M
59
60#define ORION5X_PCI_MEM_PHYS_BASE 0xe8000000
61#define ORION5X_PCI_MEM_SIZE SZ_128M
62
63/*******************************************************************************
64 * Supported Devices & Revisions
65 ******************************************************************************/
66/* Orion-1 (88F5181) and Orion-VoIP (88F5181L) */
67#define MV88F5181_DEV_ID 0x5181
68#define MV88F5181_REV_B1 3
69#define MV88F5181L_REV_A0 8
70#define MV88F5181L_REV_A1 9
71/* Orion-NAS (88F5182) */
72#define MV88F5182_DEV_ID 0x5182
73#define MV88F5182_REV_A2 2
74/* Orion-2 (88F5281) */
75#define MV88F5281_DEV_ID 0x5281
76#define MV88F5281_REV_D1 5
77#define MV88F5281_REV_D2 6
78
79/*******************************************************************************
80 * Orion Registers Map
81 ******************************************************************************/
82#define ORION5X_DDR_VIRT_BASE (ORION5X_REGS_VIRT_BASE | 0x00000)
83#define ORION5X_DDR_REG(x) (ORION5X_DDR_VIRT_BASE | (x))
84
85#define ORION5X_DEV_BUS_PHYS_BASE (ORION5X_REGS_PHYS_BASE | 0x10000)
86#define ORION5X_DEV_BUS_VIRT_BASE (ORION5X_REGS_VIRT_BASE | 0x10000)
87#define ORION5X_DEV_BUS_REG(x) (ORION5X_DEV_BUS_VIRT_BASE | (x))
88#define I2C_PHYS_BASE (ORION5X_DEV_BUS_PHYS_BASE | 0x1000)
89#define UART0_PHYS_BASE (ORION5X_DEV_BUS_PHYS_BASE | 0x2000)
90#define UART0_VIRT_BASE (ORION5X_DEV_BUS_VIRT_BASE | 0x2000)
91#define UART1_PHYS_BASE (ORION5X_DEV_BUS_PHYS_BASE | 0x2100)
92#define UART1_VIRT_BASE (ORION5X_DEV_BUS_VIRT_BASE | 0x2100)
93
94#define ORION5X_BRIDGE_VIRT_BASE (ORION5X_REGS_VIRT_BASE | 0x20000)
95#define ORION5X_BRIDGE_REG(x) (ORION5X_BRIDGE_VIRT_BASE | (x))
96#define TIMER_VIRT_BASE (ORION5X_BRIDGE_VIRT_BASE | 0x300)
97
98#define ORION5X_PCI_VIRT_BASE (ORION5X_REGS_VIRT_BASE | 0x30000)
99#define ORION5X_PCI_REG(x) (ORION5X_PCI_VIRT_BASE | (x))
100
101#define ORION5X_PCIE_VIRT_BASE (ORION5X_REGS_VIRT_BASE | 0x40000)
102#define ORION5X_PCIE_REG(x) (ORION5X_PCIE_VIRT_BASE | (x))
103
104#define ORION5X_USB0_PHYS_BASE (ORION5X_REGS_PHYS_BASE | 0x50000)
105#define ORION5X_USB0_VIRT_BASE (ORION5X_REGS_VIRT_BASE | 0x50000)
106#define ORION5X_USB0_REG(x) (ORION5X_USB0_VIRT_BASE | (x))
107
108#define ORION5X_ETH_PHYS_BASE (ORION5X_REGS_PHYS_BASE | 0x70000)
109#define ORION5X_ETH_VIRT_BASE (ORION5X_REGS_VIRT_BASE | 0x70000)
110#define ORION5X_ETH_REG(x) (ORION5X_ETH_VIRT_BASE | (x))
111
112#define ORION5X_SATA_PHYS_BASE (ORION5X_REGS_PHYS_BASE | 0x80000)
113#define ORION5X_SATA_VIRT_BASE (ORION5X_REGS_VIRT_BASE | 0x80000)
114#define ORION5X_SATA_REG(x) (ORION5X_SATA_VIRT_BASE | (x))
115
116#define ORION5X_USB1_PHYS_BASE (ORION5X_REGS_PHYS_BASE | 0xa0000)
117#define ORION5X_USB1_VIRT_BASE (ORION5X_REGS_VIRT_BASE | 0xa0000)
118#define ORION5X_USB1_REG(x) (ORION5X_USB1_VIRT_BASE | (x))
119
120/*******************************************************************************
121 * Device Bus Registers
122 ******************************************************************************/
123#define MPP_0_7_CTRL ORION5X_DEV_BUS_REG(0x000)
124#define MPP_8_15_CTRL ORION5X_DEV_BUS_REG(0x004)
125#define MPP_16_19_CTRL ORION5X_DEV_BUS_REG(0x050)
126#define MPP_DEV_CTRL ORION5X_DEV_BUS_REG(0x008)
127#define MPP_RESET_SAMPLE ORION5X_DEV_BUS_REG(0x010)
128#define GPIO_OUT ORION5X_DEV_BUS_REG(0x100)
129#define GPIO_IO_CONF ORION5X_DEV_BUS_REG(0x104)
130#define GPIO_BLINK_EN ORION5X_DEV_BUS_REG(0x108)
131#define GPIO_IN_POL ORION5X_DEV_BUS_REG(0x10c)
132#define GPIO_DATA_IN ORION5X_DEV_BUS_REG(0x110)
133#define GPIO_EDGE_CAUSE ORION5X_DEV_BUS_REG(0x114)
134#define GPIO_EDGE_MASK ORION5X_DEV_BUS_REG(0x118)
135#define GPIO_LEVEL_MASK ORION5X_DEV_BUS_REG(0x11c)
136#define DEV_BANK_0_PARAM ORION5X_DEV_BUS_REG(0x45c)
137#define DEV_BANK_1_PARAM ORION5X_DEV_BUS_REG(0x460)
138#define DEV_BANK_2_PARAM ORION5X_DEV_BUS_REG(0x464)
139#define DEV_BANK_BOOT_PARAM ORION5X_DEV_BUS_REG(0x46c)
140#define DEV_BUS_CTRL ORION5X_DEV_BUS_REG(0x4c0)
141#define DEV_BUS_INT_CAUSE ORION5X_DEV_BUS_REG(0x4d0)
142#define DEV_BUS_INT_MASK ORION5X_DEV_BUS_REG(0x4d4)
143#define GPIO_MAX 32
144
145/***************************************************************************
146 * Orion CPU Bridge Registers
147 **************************************************************************/
148#define CPU_CONF ORION5X_BRIDGE_REG(0x100)
149#define CPU_CTRL ORION5X_BRIDGE_REG(0x104)
150#define CPU_RESET_MASK ORION5X_BRIDGE_REG(0x108)
151#define CPU_SOFT_RESET ORION5X_BRIDGE_REG(0x10c)
152#define POWER_MNG_CTRL_REG ORION5X_BRIDGE_REG(0x11C)
153#define BRIDGE_CAUSE ORION5X_BRIDGE_REG(0x110)
154#define BRIDGE_MASK ORION5X_BRIDGE_REG(0x114)
155#define BRIDGE_INT_TIMER0 0x0002
156#define BRIDGE_INT_TIMER1 0x0004
157#define BRIDGE_INT_TIMER1_CLR (~0x0004)
158#define MAIN_IRQ_CAUSE ORION5X_BRIDGE_REG(0x200)
159#define MAIN_IRQ_MASK ORION5X_BRIDGE_REG(0x204)
160
161
162#endif
diff --git a/include/asm-arm/arch-orion5x/system.h b/include/asm-arm/arch-orion5x/system.h
deleted file mode 100644
index 3f1d1e2d38f8..000000000000
--- a/include/asm-arm/arch-orion5x/system.h
+++ /dev/null
@@ -1,32 +0,0 @@
1/*
2 * include/asm-arm/arch-orion5x/system.h
3 *
4 * Tzachi Perelstein <tzachi@marvell.com>
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10
11#ifndef __ASM_ARCH_SYSTEM_H
12#define __ASM_ARCH_SYSTEM_H
13
14#include <asm/arch/hardware.h>
15#include <asm/arch/orion5x.h>
16
17static inline void arch_idle(void)
18{
19 cpu_do_idle();
20}
21
22static inline void arch_reset(char mode)
23{
24 /*
25 * Enable and issue soft reset
26 */
27 orion5x_setbits(CPU_RESET_MASK, (1 << 2));
28 orion5x_setbits(CPU_SOFT_RESET, 1);
29}
30
31
32#endif
diff --git a/include/asm-arm/arch-orion5x/timex.h b/include/asm-arm/arch-orion5x/timex.h
deleted file mode 100644
index 31c568e28cc3..000000000000
--- a/include/asm-arm/arch-orion5x/timex.h
+++ /dev/null
@@ -1,13 +0,0 @@
1/*
2 * include/asm-arm/arch-orion5x/timex.h
3 *
4 * Tzachi Perelstein <tzachi@marvell.com>
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10
11#define CLOCK_TICK_RATE (100 * HZ)
12
13#define ORION5X_TCLK 166666667
diff --git a/include/asm-arm/arch-orion5x/uncompress.h b/include/asm-arm/arch-orion5x/uncompress.h
deleted file mode 100644
index 7548cedf2d76..000000000000
--- a/include/asm-arm/arch-orion5x/uncompress.h
+++ /dev/null
@@ -1,49 +0,0 @@
1/*
2 * include/asm-arm/arch-orion5x/uncompress.h
3 *
4 * Tzachi Perelstein <tzachi@marvell.com>
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10
11#include <linux/serial_reg.h>
12#include <asm/arch/orion5x.h>
13
14#define SERIAL_BASE ((unsigned char *)UART0_PHYS_BASE)
15
16static void putc(const char c)
17{
18 unsigned char *base = SERIAL_BASE;
19 int i;
20
21 for (i = 0; i < 0x1000; i++) {
22 if (base[UART_LSR << 2] & UART_LSR_THRE)
23 break;
24 barrier();
25 }
26
27 base[UART_TX << 2] = c;
28}
29
30static void flush(void)
31{
32 unsigned char *base = SERIAL_BASE;
33 unsigned char mask;
34 int i;
35
36 mask = UART_LSR_TEMT | UART_LSR_THRE;
37
38 for (i = 0; i < 0x1000; i++) {
39 if ((base[UART_LSR << 2] & mask) == mask)
40 break;
41 barrier();
42 }
43}
44
45/*
46 * nothing to do
47 */
48#define arch_decomp_setup()
49#define arch_decomp_wdog()
diff --git a/include/asm-arm/arch-orion5x/vmalloc.h b/include/asm-arm/arch-orion5x/vmalloc.h
deleted file mode 100644
index 2b3061e90dc1..000000000000
--- a/include/asm-arm/arch-orion5x/vmalloc.h
+++ /dev/null
@@ -1,5 +0,0 @@
1/*
2 * include/asm-arm/arch-orion5x/vmalloc.h
3 */
4
5#define VMALLOC_END 0xfd800000
diff --git a/include/asm-arm/arch-pnx4008/clock.h b/include/asm-arm/arch-pnx4008/clock.h
deleted file mode 100644
index ce155e161269..000000000000
--- a/include/asm-arm/arch-pnx4008/clock.h
+++ /dev/null
@@ -1,62 +0,0 @@
1/*
2 * include/asm-arm/arch-pnx4008/clock.h
3 *
4 * Clock control driver for PNX4008 - header file
5 *
6 * Authors: Vitaly Wool, Dmitry Chigirev <source@mvista.com>
7 *
8 * 2005 (c) MontaVista Software, Inc. This file is licensed under
9 * the terms of the GNU General Public License version 2. This program
10 * is licensed "as is" without any warranty of any kind, whether express
11 * or implied.
12 */
13#ifndef __PNX4008_CLOCK_H__
14#define __PNX4008_CLOCK_H__
15
16struct module;
17struct clk;
18
19#define PWRMAN_VA_BASE IO_ADDRESS(PNX4008_PWRMAN_BASE)
20#define HCLKDIVCTRL_REG (PWRMAN_VA_BASE + 0x40)
21#define PWRCTRL_REG (PWRMAN_VA_BASE + 0x44)
22#define PLLCTRL_REG (PWRMAN_VA_BASE + 0x48)
23#define OSC13CTRL_REG (PWRMAN_VA_BASE + 0x4c)
24#define SYSCLKCTRL_REG (PWRMAN_VA_BASE + 0x50)
25#define HCLKPLLCTRL_REG (PWRMAN_VA_BASE + 0x58)
26#define USBCTRL_REG (PWRMAN_VA_BASE + 0x64)
27#define SDRAMCLKCTRL_REG (PWRMAN_VA_BASE + 0x68)
28#define MSCTRL_REG (PWRMAN_VA_BASE + 0x80)
29#define BTCLKCTRL (PWRMAN_VA_BASE + 0x84)
30#define DUMCLKCTRL_REG (PWRMAN_VA_BASE + 0x90)
31#define I2CCLKCTRL_REG (PWRMAN_VA_BASE + 0xac)
32#define KEYCLKCTRL_REG (PWRMAN_VA_BASE + 0xb0)
33#define TSCLKCTRL_REG (PWRMAN_VA_BASE + 0xb4)
34#define PWMCLKCTRL_REG (PWRMAN_VA_BASE + 0xb8)
35#define TIMCLKCTRL_REG (PWRMAN_VA_BASE + 0xbc)
36#define SPICTRL_REG (PWRMAN_VA_BASE + 0xc4)
37#define FLASHCLKCTRL_REG (PWRMAN_VA_BASE + 0xc8)
38#define UART3CLK_REG (PWRMAN_VA_BASE + 0xd0)
39#define UARTCLKCTRL_REG (PWRMAN_VA_BASE + 0xe4)
40#define DMACLKCTRL_REG (PWRMAN_VA_BASE + 0xe8)
41#define AUTOCLK_CTRL (PWRMAN_VA_BASE + 0xec)
42#define JPEGCLKCTRL_REG (PWRMAN_VA_BASE + 0xfc)
43
44#define AUDIOCONFIG_VA_BASE IO_ADDRESS(PNX4008_AUDIOCONFIG_BASE)
45#define DSPPLLCTRL_REG (AUDIOCONFIG_VA_BASE + 0x60)
46#define DSPCLKCTRL_REG (AUDIOCONFIG_VA_BASE + 0x64)
47#define AUDIOCLKCTRL_REG (AUDIOCONFIG_VA_BASE + 0x68)
48#define AUDIOPLLCTRL_REG (AUDIOCONFIG_VA_BASE + 0x6C)
49
50#define USB_OTG_CLKCTRL_REG IO_ADDRESS(PNX4008_USB_CONFIG_BASE + 0xff4)
51
52#define VFP9CLKCTRL_REG IO_ADDRESS(PNX4008_DEBUG_BASE)
53
54#define CLK_RATE_13MHZ 13000
55#define CLK_RATE_1MHZ 1000
56#define CLK_RATE_208MHZ 208000
57#define CLK_RATE_48MHZ 48000
58#define CLK_RATE_32KHZ 32
59
60#define PNX4008_UART_CLK CLK_RATE_13MHZ * 1000 /* in MHz */
61
62#endif
diff --git a/include/asm-arm/arch-pnx4008/debug-macro.S b/include/asm-arm/arch-pnx4008/debug-macro.S
deleted file mode 100644
index 67d18a203d23..000000000000
--- a/include/asm-arm/arch-pnx4008/debug-macro.S
+++ /dev/null
@@ -1,23 +0,0 @@
1/* linux/include/asm-arm/arch-pnx4008/debug-macro.S
2 *
3 * Debugging macro include header
4 *
5 * Copyright (C) 1994-1999 Russell King
6 * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 *
12*/
13
14 .macro addruart,rx
15 mrc p15, 0, \rx, c1, c0
16 tst \rx, #1 @ MMU enabled?
17 mov \rx, #0x00090000
18 addeq \rx, \rx, #0x40000000
19 addne \rx, \rx, #0xf4000000
20 .endm
21
22#define UART_SHIFT 2
23#include <asm/hardware/debug-8250.S>
diff --git a/include/asm-arm/arch-pnx4008/dma.h b/include/asm-arm/arch-pnx4008/dma.h
deleted file mode 100644
index 418f15283ff1..000000000000
--- a/include/asm-arm/arch-pnx4008/dma.h
+++ /dev/null
@@ -1,162 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-pnx4008/dma.h
3 *
4 * PNX4008 DMA header file
5 *
6 * Author: Vitaly Wool
7 * Copyright: MontaVista Software Inc. (c) 2005
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12 */
13
14#ifndef __ASM_ARCH_DMA_H
15#define __ASM_ARCH_DMA_H
16
17#include "platform.h"
18
19#define MAX_DMA_ADDRESS 0xffffffff
20
21#define MAX_DMA_CHANNELS 8
22
23#define DMAC_BASE IO_ADDRESS(PNX4008_DMA_CONFIG_BASE)
24#define DMAC_INT_STAT (DMAC_BASE + 0x0000)
25#define DMAC_INT_TC_STAT (DMAC_BASE + 0x0004)
26#define DMAC_INT_TC_CLEAR (DMAC_BASE + 0x0008)
27#define DMAC_INT_ERR_STAT (DMAC_BASE + 0x000c)
28#define DMAC_INT_ERR_CLEAR (DMAC_BASE + 0x0010)
29#define DMAC_SOFT_SREQ (DMAC_BASE + 0x0024)
30#define DMAC_CONFIG (DMAC_BASE + 0x0030)
31#define DMAC_Cx_SRC_ADDR(c) (DMAC_BASE + 0x0100 + (c) * 0x20)
32#define DMAC_Cx_DEST_ADDR(c) (DMAC_BASE + 0x0104 + (c) * 0x20)
33#define DMAC_Cx_LLI(c) (DMAC_BASE + 0x0108 + (c) * 0x20)
34#define DMAC_Cx_CONTROL(c) (DMAC_BASE + 0x010c + (c) * 0x20)
35#define DMAC_Cx_CONFIG(c) (DMAC_BASE + 0x0110 + (c) * 0x20)
36
37enum {
38 WIDTH_BYTE = 0,
39 WIDTH_HWORD,
40 WIDTH_WORD
41};
42
43enum {
44 FC_MEM2MEM_DMA,
45 FC_MEM2PER_DMA,
46 FC_PER2MEM_DMA,
47 FC_PER2PER_DMA,
48 FC_PER2PER_DPER,
49 FC_MEM2PER_PER,
50 FC_PER2MEM_PER,
51 FC_PER2PER_SPER
52};
53
54enum {
55 DMA_INT_UNKNOWN = 0,
56 DMA_ERR_INT = 1,
57 DMA_TC_INT = 2,
58};
59
60enum {
61 DMA_BUFFER_ALLOCATED = 1,
62 DMA_HAS_LL = 2,
63};
64
65enum {
66 PER_CAM_DMA_1 = 0,
67 PER_NDF_FLASH = 1,
68 PER_MBX_SLAVE_FIFO = 2,
69 PER_SPI2_REC_XMIT = 3,
70 PER_MS_SD_RX_XMIT = 4,
71 PER_HS_UART_1_XMIT = 5,
72 PER_HS_UART_1_RX = 6,
73 PER_HS_UART_2_XMIT = 7,
74 PER_HS_UART_2_RX = 8,
75 PER_HS_UART_7_XMIT = 9,
76 PER_HS_UART_7_RX = 10,
77 PER_SPI1_REC_XMIT = 11,
78 PER_MLC_NDF_SREC = 12,
79 PER_CAM_DMA_2 = 13,
80 PER_PRNG_INFIFO = 14,
81 PER_PRNG_OUTFIFO = 15,
82};
83
84struct pnx4008_dma_ch_ctrl {
85 int tc_mask;
86 int cacheable;
87 int bufferable;
88 int priv_mode;
89 int di;
90 int si;
91 int dest_ahb1;
92 int src_ahb1;
93 int dwidth;
94 int swidth;
95 int dbsize;
96 int sbsize;
97 int tr_size;
98};
99
100struct pnx4008_dma_ch_config {
101 int halt;
102 int active;
103 int lock;
104 int itc;
105 int ie;
106 int flow_cntrl;
107 int dest_per;
108 int src_per;
109};
110
111struct pnx4008_dma_ll {
112 unsigned long src_addr;
113 unsigned long dest_addr;
114 u32 next_dma;
115 unsigned long ch_ctrl;
116 struct pnx4008_dma_ll *next;
117 int flags;
118 void *alloc_data;
119 int (*free) (void *);
120};
121
122struct pnx4008_dma_config {
123 int is_ll;
124 unsigned long src_addr;
125 unsigned long dest_addr;
126 unsigned long ch_ctrl;
127 unsigned long ch_cfg;
128 struct pnx4008_dma_ll *ll;
129 u32 ll_dma;
130 int flags;
131 void *alloc_data;
132 int (*free) (void *);
133};
134
135extern struct pnx4008_dma_ll *pnx4008_alloc_ll_entry(dma_addr_t *);
136extern void pnx4008_free_ll_entry(struct pnx4008_dma_ll *, dma_addr_t);
137extern void pnx4008_free_ll(u32 ll_dma, struct pnx4008_dma_ll *);
138
139extern int pnx4008_request_channel(char *, int,
140 void (*)(int, int, void *),
141 void *);
142extern void pnx4008_free_channel(int);
143extern int pnx4008_config_dma(int, int, int);
144extern int pnx4008_dma_pack_control(const struct pnx4008_dma_ch_ctrl *,
145 unsigned long *);
146extern int pnx4008_dma_parse_control(unsigned long,
147 struct pnx4008_dma_ch_ctrl *);
148extern int pnx4008_dma_pack_config(const struct pnx4008_dma_ch_config *,
149 unsigned long *);
150extern int pnx4008_dma_parse_config(unsigned long,
151 struct pnx4008_dma_ch_config *);
152extern int pnx4008_config_channel(int, struct pnx4008_dma_config *);
153extern int pnx4008_channel_get_config(int, struct pnx4008_dma_config *);
154extern int pnx4008_dma_ch_enable(int);
155extern int pnx4008_dma_ch_disable(int);
156extern int pnx4008_dma_ch_enabled(int);
157extern void pnx4008_dma_split_head_entry(struct pnx4008_dma_config *,
158 struct pnx4008_dma_ch_ctrl *);
159extern void pnx4008_dma_split_ll_entry(struct pnx4008_dma_ll *,
160 struct pnx4008_dma_ch_ctrl *);
161
162#endif /* _ASM_ARCH_DMA_H */
diff --git a/include/asm-arm/arch-pnx4008/entry-macro.S b/include/asm-arm/arch-pnx4008/entry-macro.S
deleted file mode 100644
index f11731974e5d..000000000000
--- a/include/asm-arm/arch-pnx4008/entry-macro.S
+++ /dev/null
@@ -1,127 +0,0 @@
1/*
2 * include/asm-arm/arch-pnx4008/entry-macro.S
3 *
4 * Low-level IRQ helper macros for PNX4008-based platforms
5 *
6 * 2005-2006 (c) MontaVista Software, Inc.
7 * Author: Vitaly Wool <vwool@ru.mvista.com>
8 * This file is licensed under the terms of the GNU General Public
9 * License version 2. This program is licensed "as is" without any
10 * warranty of any kind, whether express or implied.
11 */
12
13#include "platform.h"
14
15#define IO_BASE 0xF0000000
16#define IO_ADDRESS(x) (((((x) & 0xff000000) >> 4) | ((x) & 0xfffff)) | IO_BASE)
17
18#define INTRC_MASK 0x00
19#define INTRC_RAW_STAT 0x04
20#define INTRC_STAT 0x08
21#define INTRC_POLAR 0x0C
22#define INTRC_ACT_TYPE 0x10
23#define INTRC_TYPE 0x14
24
25#define SIC1_BASE_INT 32
26#define SIC2_BASE_INT 64
27
28 .macro disable_fiq
29 .endm
30
31 .macro get_irqnr_preamble, base, tmp
32 .endm
33
34 .macro arch_ret_to_user, tmp1, tmp2
35 .endm
36
37 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
38/* decode the MIC interrupt numbers */
39 ldr \base, =IO_ADDRESS(PNX4008_INTCTRLMIC_BASE)
40 ldr \irqstat, [\base, #INTRC_STAT]
41
42 cmp \irqstat,#1<<16
43 movhs \irqnr,#16
44 movlo \irqnr,#0
45 movhs \irqstat,\irqstat,lsr#16
46 cmp \irqstat,#1<<8
47 addhs \irqnr,\irqnr,#8
48 movhs \irqstat,\irqstat,lsr#8
49 cmp \irqstat,#1<<4
50 addhs \irqnr,\irqnr,#4
51 movhs \irqstat,\irqstat,lsr#4
52 cmp \irqstat,#1<<2
53 addhs \irqnr,\irqnr,#2
54 movhs \irqstat,\irqstat,lsr#2
55 cmp \irqstat,#1<<1
56 addhs \irqnr,\irqnr,#1
57
58/* was there an interrupt ? if not then drop out with EQ status */
59 teq \irqstat,#0
60 beq 1003f
61
62/* and now check for extended IRQ reasons */
63 cmp \irqnr,#1
64 bls 1003f
65 cmp \irqnr,#30
66 blo 1002f
67
68/* IRQ 31,30 : High priority cascade IRQ handle */
69/* read the correct SIC */
70/* decoding status after compare : eq is 30 (SIC1) , ne is 31 (SIC2) */
71/* set the base IRQ number */
72 ldreq \base, =IO_ADDRESS(PNX4008_INTCTRLSIC1_BASE)
73 moveq \irqnr,#SIC1_BASE_INT
74 ldrne \base, =IO_ADDRESS(PNX4008_INTCTRLSIC2_BASE)
75 movne \irqnr,#SIC2_BASE_INT
76 ldr \irqstat, [\base, #INTRC_STAT]
77 ldr \tmp, [\base, #INTRC_TYPE]
78/* and with inverted mask : low priority interrupts */
79 and \irqstat,\irqstat,\tmp
80 b 1004f
81
821003:
83/* IRQ 1,0 : Low priority cascade IRQ handle */
84/* read the correct SIC */
85/* decoding status after compare : eq is 1 (SIC2) , ne is 0 (SIC1)*/
86/* read the correct SIC */
87/* set the base IRQ number */
88 ldrne \base, =IO_ADDRESS(PNX4008_INTCTRLSIC1_BASE)
89 movne \irqnr,#SIC1_BASE_INT
90 ldreq \base, =IO_ADDRESS(PNX4008_INTCTRLSIC2_BASE)
91 moveq \irqnr,#SIC2_BASE_INT
92 ldr \irqstat, [\base, #INTRC_STAT]
93 ldr \tmp, [\base, #INTRC_TYPE]
94/* and with inverted mask : low priority interrupts */
95 bic \irqstat,\irqstat,\tmp
96
971004:
98
99 cmp \irqstat,#1<<16
100 addhs \irqnr,\irqnr,#16
101 movhs \irqstat,\irqstat,lsr#16
102 cmp \irqstat,#1<<8
103 addhs \irqnr,\irqnr,#8
104 movhs \irqstat,\irqstat,lsr#8
105 cmp \irqstat,#1<<4
106 addhs \irqnr,\irqnr,#4
107 movhs \irqstat,\irqstat,lsr#4
108 cmp \irqstat,#1<<2
109 addhs \irqnr,\irqnr,#2
110 movhs \irqstat,\irqstat,lsr#2
111 cmp \irqstat,#1<<1
112 addhs \irqnr,\irqnr,#1
113
114
115/* is irqstat not zero */
116
1171002:
118/* we assert that irqstat is not equal to zero and return ne status if true*/
119 teq \irqstat,#0
1201003:
121 .endm
122
123
124 .macro irq_prio_table
125 .endm
126
127
diff --git a/include/asm-arm/arch-pnx4008/gpio.h b/include/asm-arm/arch-pnx4008/gpio.h
deleted file mode 100644
index d01bf83d55c2..000000000000
--- a/include/asm-arm/arch-pnx4008/gpio.h
+++ /dev/null
@@ -1,241 +0,0 @@
1/*
2 * include/asm-arm/arch-pnx4008/gpio.h
3 *
4 * PNX4008 GPIO driver - header file
5 *
6 * Author: Dmitry Chigirev <source@mvista.com>
7 *
8 * Based on reference code by Iwo Mergler and Z.Tabaaloute from Philips:
9 * Copyright (c) 2005 Koninklijke Philips Electronics N.V.
10 *
11 * 2005 (c) MontaVista Software, Inc. This file is licensed under
12 * the terms of the GNU General Public License version 2. This program
13 * is licensed "as is" without any warranty of any kind, whether express
14 * or implied.
15 */
16
17#ifndef _PNX4008_GPIO_H_
18#define _PNX4008_GPIO_H_
19
20
21/* Block numbers */
22#define GPIO_IN (0)
23#define GPIO_OUT (0x100)
24#define GPIO_BID (0x200)
25#define GPIO_RAM (0x300)
26#define GPIO_MUX (0x400)
27
28#define GPIO_TYPE_MASK(K) ((K) & 0x700)
29
30/* INPUT GPIOs */
31/* GPI */
32#define GPI_00 (GPIO_IN | 0)
33#define GPI_01 (GPIO_IN | 1)
34#define GPI_02 (GPIO_IN | 2)
35#define GPI_03 (GPIO_IN | 3)
36#define GPI_04 (GPIO_IN | 4)
37#define GPI_05 (GPIO_IN | 5)
38#define GPI_06 (GPIO_IN | 6)
39#define GPI_07 (GPIO_IN | 7)
40#define GPI_08 (GPIO_IN | 8)
41#define GPI_09 (GPIO_IN | 9)
42#define U1_RX (GPIO_IN | 15)
43#define U2_HTCS (GPIO_IN | 16)
44#define U2_RX (GPIO_IN | 17)
45#define U3_RX (GPIO_IN | 18)
46#define U4_RX (GPIO_IN | 19)
47#define U5_RX (GPIO_IN | 20)
48#define U6_IRRX (GPIO_IN | 21)
49#define U7_HCTS (GPIO_IN | 22)
50#define U7_RX (GPIO_IN | 23)
51/* MISC IN */
52#define SPI1_DATIN (GPIO_IN | 25)
53#define DISP_SYNC (GPIO_IN | 26)
54#define SPI2_DATIN (GPIO_IN | 27)
55#define GPI_11 (GPIO_IN | 28)
56
57#define GPIO_IN_MASK 0x1eff83ff
58
59/* OUTPUT GPIOs */
60/* GPO */
61#define GPO_00 (GPIO_OUT | 0)
62#define GPO_01 (GPIO_OUT | 1)
63#define GPO_02 (GPIO_OUT | 2)
64#define GPO_03 (GPIO_OUT | 3)
65#define GPO_04 (GPIO_OUT | 4)
66#define GPO_05 (GPIO_OUT | 5)
67#define GPO_06 (GPIO_OUT | 6)
68#define GPO_07 (GPIO_OUT | 7)
69#define GPO_08 (GPIO_OUT | 8)
70#define GPO_09 (GPIO_OUT | 9)
71#define GPO_10 (GPIO_OUT | 10)
72#define GPO_11 (GPIO_OUT | 11)
73#define GPO_12 (GPIO_OUT | 12)
74#define GPO_13 (GPIO_OUT | 13)
75#define GPO_14 (GPIO_OUT | 14)
76#define GPO_15 (GPIO_OUT | 15)
77#define GPO_16 (GPIO_OUT | 16)
78#define GPO_17 (GPIO_OUT | 17)
79#define GPO_18 (GPIO_OUT | 18)
80#define GPO_19 (GPIO_OUT | 19)
81#define GPO_20 (GPIO_OUT | 20)
82#define GPO_21 (GPIO_OUT | 21)
83#define GPO_22 (GPIO_OUT | 22)
84#define GPO_23 (GPIO_OUT | 23)
85
86#define GPIO_OUT_MASK 0xffffff
87
88/* BIDIRECTIONAL GPIOs */
89/* RAM pins */
90#define RAM_D19 (GPIO_RAM | 0)
91#define RAM_D20 (GPIO_RAM | 1)
92#define RAM_D21 (GPIO_RAM | 2)
93#define RAM_D22 (GPIO_RAM | 3)
94#define RAM_D23 (GPIO_RAM | 4)
95#define RAM_D24 (GPIO_RAM | 5)
96#define RAM_D25 (GPIO_RAM | 6)
97#define RAM_D26 (GPIO_RAM | 7)
98#define RAM_D27 (GPIO_RAM | 8)
99#define RAM_D28 (GPIO_RAM | 9)
100#define RAM_D29 (GPIO_RAM | 10)
101#define RAM_D30 (GPIO_RAM | 11)
102#define RAM_D31 (GPIO_RAM | 12)
103
104#define GPIO_RAM_MASK 0x1fff
105
106/* I/O pins */
107#define GPIO_00 (GPIO_BID | 25)
108#define GPIO_01 (GPIO_BID | 26)
109#define GPIO_02 (GPIO_BID | 27)
110#define GPIO_03 (GPIO_BID | 28)
111#define GPIO_04 (GPIO_BID | 29)
112#define GPIO_05 (GPIO_BID | 30)
113
114#define GPIO_BID_MASK 0x7e000000
115
116/* Non-GPIO multiplexed PIOs. For multiplexing with GPIO, please use GPIO macros */
117#define GPIO_SDRAM_SEL (GPIO_MUX | 3)
118
119#define GPIO_MUX_MASK 0x8
120
121/* Extraction/assembly macros */
122#define GPIO_BIT_MASK(K) ((K) & 0x1F)
123#define GPIO_BIT(K) (1 << GPIO_BIT_MASK(K))
124#define GPIO_ISMUX(K) ((GPIO_TYPE_MASK(K) == GPIO_MUX) && (GPIO_BIT(K) & GPIO_MUX_MASK))
125#define GPIO_ISRAM(K) ((GPIO_TYPE_MASK(K) == GPIO_RAM) && (GPIO_BIT(K) & GPIO_RAM_MASK))
126#define GPIO_ISBID(K) ((GPIO_TYPE_MASK(K) == GPIO_BID) && (GPIO_BIT(K) & GPIO_BID_MASK))
127#define GPIO_ISOUT(K) ((GPIO_TYPE_MASK(K) == GPIO_OUT) && (GPIO_BIT(K) & GPIO_OUT_MASK))
128#define GPIO_ISIN(K) ((GPIO_TYPE_MASK(K) == GPIO_IN) && (GPIO_BIT(K) & GPIO_IN_MASK))
129
130/* Start Enable Pin Interrupts - table 58 page 66 */
131
132#define SE_PIN_BASE_INT 32
133
134#define SE_U7_RX_INT 63
135#define SE_U7_HCTS_INT 62
136#define SE_BT_CLKREQ_INT 61
137#define SE_U6_IRRX_INT 60
138/*59 unused*/
139#define SE_U5_RX_INT 58
140#define SE_GPI_11_INT 57
141#define SE_U3_RX_INT 56
142#define SE_U2_HCTS_INT 55
143#define SE_U2_RX_INT 54
144#define SE_U1_RX_INT 53
145#define SE_DISP_SYNC_INT 52
146/*51 unused*/
147#define SE_SDIO_INT_N 50
148#define SE_MSDIO_START_INT 49
149#define SE_GPI_06_INT 48
150#define SE_GPI_05_INT 47
151#define SE_GPI_04_INT 46
152#define SE_GPI_03_INT 45
153#define SE_GPI_02_INT 44
154#define SE_GPI_01_INT 43
155#define SE_GPI_00_INT 42
156#define SE_SYSCLKEN_PIN_INT 41
157#define SE_SPI1_DATAIN_INT 40
158#define SE_GPI_07_INT 39
159#define SE_SPI2_DATAIN_INT 38
160#define SE_GPI_10_INT 37
161#define SE_GPI_09_INT 36
162#define SE_GPI_08_INT 35
163/*34-32 unused*/
164
165/* Start Enable Internal Interrupts - table 57 page 65 */
166
167#define SE_INT_BASE_INT 0
168
169#define SE_TS_IRQ 31
170#define SE_TS_P_INT 30
171#define SE_TS_AUX_INT 29
172/*27-28 unused*/
173#define SE_USB_AHB_NEED_CLK_INT 26
174#define SE_MSTIMER_INT 25
175#define SE_RTC_INT 24
176#define SE_USB_NEED_CLK_INT 23
177#define SE_USB_INT 22
178#define SE_USB_I2C_INT 21
179#define SE_USB_OTG_TIMER_INT 20
180#define SE_USB_OTG_ATX_INT_N 19
181/*18 unused*/
182#define SE_DSP_GPIO4_INT 17
183#define SE_KEY_IRQ 16
184#define SE_DSP_SLAVEPORT_INT 15
185#define SE_DSP_GPIO1_INT 14
186#define SE_DSP_GPIO0_INT 13
187#define SE_DSP_AHB_INT 12
188/*11-6 unused*/
189#define SE_GPIO_05_INT 5
190#define SE_GPIO_04_INT 4
191#define SE_GPIO_03_INT 3
192#define SE_GPIO_02_INT 2
193#define SE_GPIO_01_INT 1
194#define SE_GPIO_00_INT 0
195
196#define START_INT_REG_BIT(irq) (1<<((irq)&0x1F))
197
198#define START_INT_ER_REG(irq) IO_ADDRESS((PNX4008_PWRMAN_BASE + 0x20 + (((irq)&(0x1<<5))>>1)))
199#define START_INT_RSR_REG(irq) IO_ADDRESS((PNX4008_PWRMAN_BASE + 0x24 + (((irq)&(0x1<<5))>>1)))
200#define START_INT_SR_REG(irq) IO_ADDRESS((PNX4008_PWRMAN_BASE + 0x28 + (((irq)&(0x1<<5))>>1)))
201#define START_INT_APR_REG(irq) IO_ADDRESS((PNX4008_PWRMAN_BASE + 0x2C + (((irq)&(0x1<<5))>>1)))
202
203extern int pnx4008_gpio_register_pin(unsigned short pin);
204extern int pnx4008_gpio_unregister_pin(unsigned short pin);
205extern unsigned long pnx4008_gpio_read_pin(unsigned short pin);
206extern int pnx4008_gpio_write_pin(unsigned short pin, int output);
207extern int pnx4008_gpio_set_pin_direction(unsigned short pin, int output);
208extern int pnx4008_gpio_read_pin_direction(unsigned short pin);
209extern int pnx4008_gpio_set_pin_mux(unsigned short pin, int output);
210extern int pnx4008_gpio_read_pin_mux(unsigned short pin);
211
212static inline void start_int_umask(u8 irq)
213{
214 __raw_writel(__raw_readl(START_INT_ER_REG(irq)) |
215 START_INT_REG_BIT(irq), START_INT_ER_REG(irq));
216}
217
218static inline void start_int_mask(u8 irq)
219{
220 __raw_writel(__raw_readl(START_INT_ER_REG(irq)) &
221 ~START_INT_REG_BIT(irq), START_INT_ER_REG(irq));
222}
223
224static inline void start_int_ack(u8 irq)
225{
226 __raw_writel(START_INT_REG_BIT(irq), START_INT_RSR_REG(irq));
227}
228
229static inline void start_int_set_falling_edge(u8 irq)
230{
231 __raw_writel(__raw_readl(START_INT_APR_REG(irq)) &
232 ~START_INT_REG_BIT(irq), START_INT_APR_REG(irq));
233}
234
235static inline void start_int_set_rising_edge(u8 irq)
236{
237 __raw_writel(__raw_readl(START_INT_APR_REG(irq)) |
238 START_INT_REG_BIT(irq), START_INT_APR_REG(irq));
239}
240
241#endif /* _PNX4008_GPIO_H_ */
diff --git a/include/asm-arm/arch-pnx4008/hardware.h b/include/asm-arm/arch-pnx4008/hardware.h
deleted file mode 100644
index a4410397a921..000000000000
--- a/include/asm-arm/arch-pnx4008/hardware.h
+++ /dev/null
@@ -1,32 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-pnx4008/hardware.h
3 *
4 * Copyright (c) 2005 MontaVista Software, Inc. <source@mvista.com>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20#ifndef __ASM_ARCH_HARDWARE_H
21#define __ASM_ARCH_HARDWARE_H
22
23#include <asm/sizes.h>
24#include <asm/arch/platform.h>
25
26/* Start of virtual addresses for IO devices */
27#define IO_BASE 0xF0000000
28
29/* This macro relies on fact that for all HW i/o addresses bits 20-23 are 0 */
30#define IO_ADDRESS(x) (((((x) & 0xff000000) >> 4) | ((x) & 0xfffff)) | IO_BASE)
31
32#endif
diff --git a/include/asm-arm/arch-pnx4008/i2c.h b/include/asm-arm/arch-pnx4008/i2c.h
deleted file mode 100644
index 92e8d65006f7..000000000000
--- a/include/asm-arm/arch-pnx4008/i2c.h
+++ /dev/null
@@ -1,67 +0,0 @@
1/*
2 * PNX4008-specific tweaks for I2C IP3204 block
3 *
4 * Author: Vitaly Wool <vwool@ru.mvista.com>
5 *
6 * 2005 (c) MontaVista Software, Inc. This file is licensed under
7 * the terms of the GNU General Public License version 2. This program
8 * is licensed "as is" without any warranty of any kind, whether express
9 * or implied.
10 */
11
12#ifndef __ASM_ARCH_I2C_H__
13#define __ASM_ARCH_I2C_H__
14
15#include <linux/pm.h>
16#include <linux/platform_device.h>
17
18enum {
19 mstatus_tdi = 0x00000001,
20 mstatus_afi = 0x00000002,
21 mstatus_nai = 0x00000004,
22 mstatus_drmi = 0x00000008,
23 mstatus_active = 0x00000020,
24 mstatus_scl = 0x00000040,
25 mstatus_sda = 0x00000080,
26 mstatus_rff = 0x00000100,
27 mstatus_rfe = 0x00000200,
28 mstatus_tff = 0x00000400,
29 mstatus_tfe = 0x00000800,
30};
31
32enum {
33 mcntrl_tdie = 0x00000001,
34 mcntrl_afie = 0x00000002,
35 mcntrl_naie = 0x00000004,
36 mcntrl_drmie = 0x00000008,
37 mcntrl_daie = 0x00000020,
38 mcntrl_rffie = 0x00000040,
39 mcntrl_tffie = 0x00000080,
40 mcntrl_reset = 0x00000100,
41 mcntrl_cdbmode = 0x00000400,
42};
43
44enum {
45 rw_bit = 1 << 0,
46 start_bit = 1 << 8,
47 stop_bit = 1 << 9,
48};
49
50#define I2C_REG_RX(a) ((a)->ioaddr) /* Rx FIFO reg (RO) */
51#define I2C_REG_TX(a) ((a)->ioaddr) /* Tx FIFO reg (WO) */
52#define I2C_REG_STS(a) ((a)->ioaddr + 0x04) /* Status reg (RO) */
53#define I2C_REG_CTL(a) ((a)->ioaddr + 0x08) /* Ctl reg */
54#define I2C_REG_CKL(a) ((a)->ioaddr + 0x0c) /* Clock divider low */
55#define I2C_REG_CKH(a) ((a)->ioaddr + 0x10) /* Clock divider high */
56#define I2C_REG_ADR(a) ((a)->ioaddr + 0x14) /* I2C address */
57#define I2C_REG_RFL(a) ((a)->ioaddr + 0x18) /* Rx FIFO level (RO) */
58#define I2C_REG_TFL(a) ((a)->ioaddr + 0x1c) /* Tx FIFO level (RO) */
59#define I2C_REG_RXB(a) ((a)->ioaddr + 0x20) /* Num of bytes Rx-ed (RO) */
60#define I2C_REG_TXB(a) ((a)->ioaddr + 0x24) /* Num of bytes Tx-ed (RO) */
61#define I2C_REG_TXS(a) ((a)->ioaddr + 0x28) /* Tx slave FIFO (RO) */
62#define I2C_REG_STFL(a) ((a)->ioaddr + 0x2c) /* Tx slave FIFO level (RO) */
63
64#define HCLK_MHZ 13
65#define I2C_CHIP_NAME "PNX4008-I2C"
66
67#endif /* __ASM_ARCH_I2C_H___ */
diff --git a/include/asm-arm/arch-pnx4008/io.h b/include/asm-arm/arch-pnx4008/io.h
deleted file mode 100644
index 29ee43955c52..000000000000
--- a/include/asm-arm/arch-pnx4008/io.h
+++ /dev/null
@@ -1,21 +0,0 @@
1
2/*
3 * include/asm-arm/arch-pnx4008/io.h
4 *
5 * Author: Dmitry Chigirev <chigirev@ru.mvista.com>
6 *
7 * 2005 (c) MontaVista Software, Inc. This file is licensed under
8 * the terms of the GNU General Public License version 2. This program
9 * is licensed "as is" without any warranty of any kind, whether express
10 * or implied.
11 */
12
13#ifndef __ASM_ARM_ARCH_IO_H
14#define __ASM_ARM_ARCH_IO_H
15
16#define IO_SPACE_LIMIT 0xffffffff
17
18#define __io(a) ((void __iomem *)(a))
19#define __mem_pci(a) (a)
20
21#endif
diff --git a/include/asm-arm/arch-pnx4008/irq.h b/include/asm-arm/arch-pnx4008/irq.h
deleted file mode 100644
index fabff5dc337f..000000000000
--- a/include/asm-arm/arch-pnx4008/irq.h
+++ /dev/null
@@ -1,42 +0,0 @@
1/*
2 * include/asm-arm/arch-pnx4008/irq.h
3 *
4 * PNX4008 IRQ controller driver - header file
5 * this one is used in entry-arnv.S as well so it cannot contain C code
6 *
7 * Copyright (c) 2005 Philips Semiconductors
8 * Copyright (c) 2005 MontaVista Software, Inc.
9 *
10 * This program is free software; you can redistribute it and/or modify it
11 * under the terms of the GNU General Public License as published by the
12 * Free Software Foundation; either version 2 of the License, or (at your
13 * option) any later version.
14 */
15#ifndef __PNX4008_IRQ_H__
16#define __PNX4008_IRQ_H__
17
18#define MIC_VA_BASE IO_ADDRESS(PNX4008_INTCTRLMIC_BASE)
19#define SIC1_VA_BASE IO_ADDRESS(PNX4008_INTCTRLSIC1_BASE)
20#define SIC2_VA_BASE IO_ADDRESS(PNX4008_INTCTRLSIC2_BASE)
21
22/* Manual: Chapter 20, page 195 */
23
24#define INTC_BIT(irq) (1<< ((irq) & 0x1F))
25
26#define INTC_ER(irq) IO_ADDRESS((PNX4008_INTCTRLMIC_BASE + 0x0 + (((irq)&(0x3<<5))<<9)))
27#define INTC_RSR(irq) IO_ADDRESS((PNX4008_INTCTRLMIC_BASE + 0x4 + (((irq)&(0x3<<5))<<9)))
28#define INTC_SR(irq) IO_ADDRESS((PNX4008_INTCTRLMIC_BASE + 0x8 + (((irq)&(0x3<<5))<<9)))
29#define INTC_APR(irq) IO_ADDRESS((PNX4008_INTCTRLMIC_BASE + 0xC + (((irq)&(0x3<<5))<<9)))
30#define INTC_ATR(irq) IO_ADDRESS((PNX4008_INTCTRLMIC_BASE + 0x10 + (((irq)&(0x3<<5))<<9)))
31#define INTC_ITR(irq) IO_ADDRESS((PNX4008_INTCTRLMIC_BASE + 0x14 + (((irq)&(0x3<<5))<<9)))
32
33#define START_INT_REG_BIT(irq) (1<<((irq)&0x1F))
34
35#define START_INT_ER_REG(irq) IO_ADDRESS((PNX4008_PWRMAN_BASE + 0x20 + (((irq)&(0x1<<5))>>1)))
36#define START_INT_RSR_REG(irq) IO_ADDRESS((PNX4008_PWRMAN_BASE + 0x24 + (((irq)&(0x1<<5))>>1)))
37#define START_INT_SR_REG(irq) IO_ADDRESS((PNX4008_PWRMAN_BASE + 0x28 + (((irq)&(0x1<<5))>>1)))
38#define START_INT_APR_REG(irq) IO_ADDRESS((PNX4008_PWRMAN_BASE + 0x2C + (((irq)&(0x1<<5))>>1)))
39
40extern void __init pnx4008_init_irq(void);
41
42#endif /* __PNX4008_IRQ_H__ */
diff --git a/include/asm-arm/arch-pnx4008/irqs.h b/include/asm-arm/arch-pnx4008/irqs.h
deleted file mode 100644
index a25d18f2d87a..000000000000
--- a/include/asm-arm/arch-pnx4008/irqs.h
+++ /dev/null
@@ -1,215 +0,0 @@
1/*
2 * include/asm-arm/arch-pnx4008/irqs.h
3 *
4 * PNX4008 IRQ controller driver - header file
5 *
6 * Author: Dmitry Chigirev <source@mvista.com>
7 *
8 * 2005 (c) MontaVista Software, Inc. This file is licensed under
9 * the terms of the GNU General Public License version 2. This program
10 * is licensed "as is" without any warranty of any kind, whether express
11 * or implied.
12 */
13#ifndef __PNX4008_IRQS_h__
14#define __PNX4008_IRQS_h__
15
16#define NR_IRQS 96
17
18/*Manual: table 259, page 199*/
19
20/*SUB2 Interrupt Routing (SIC2)*/
21
22#define SIC2_BASE_INT 64
23
24#define CLK_SWITCH_ARM_INT 95 /*manual: Clkswitch ARM */
25#define CLK_SWITCH_DSP_INT 94 /*manual: ClkSwitch DSP */
26#define CLK_SWITCH_AUD_INT 93 /*manual: Clkswitch AUD */
27#define GPI_06_INT 92
28#define GPI_05_INT 91
29#define GPI_04_INT 90
30#define GPI_03_INT 89
31#define GPI_02_INT 88
32#define GPI_01_INT 87
33#define GPI_00_INT 86
34#define BT_CLKREQ_INT 85
35#define SPI1_DATIN_INT 84
36#define U5_RX_INT 83
37#define SDIO_INT_N 82
38#define CAM_HS_INT 81
39#define CAM_VS_INT 80
40#define GPI_07_INT 79
41#define DISP_SYNC_INT 78
42#define DSP_INT8 77
43#define U7_HCTS_INT 76
44#define GPI_10_INT 75
45#define GPI_09_INT 74
46#define GPI_08_INT 73
47#define DSP_INT7 72
48#define U2_HCTS_INT 71
49#define SPI2_DATIN_INT 70
50#define GPIO_05_INT 69
51#define GPIO_04_INT 68
52#define GPIO_03_INT 67
53#define GPIO_02_INT 66
54#define GPIO_01_INT 65
55#define GPIO_00_INT 64
56
57/*Manual: table 258, page 198*/
58
59/*SUB1 Interrupt Routing (SIC1)*/
60
61#define SIC1_BASE_INT 32
62
63#define USB_I2C_INT 63
64#define USB_DEV_HP_INT 62
65#define USB_DEV_LP_INT 61
66#define USB_DEV_DMA_INT 60
67#define USB_HOST_INT 59
68#define USB_OTG_ATX_INT_N 58
69#define USB_OTG_TIMER_INT 57
70#define SW_INT 56
71#define SPI1_INT 55
72#define KEY_IRQ 54
73#define DSP_M_INT 53
74#define RTC_INT 52
75#define I2C_1_INT 51
76#define I2C_2_INT 50
77#define PLL1_LOCK_INT 49
78#define PLL2_LOCK_INT 48
79#define PLL3_LOCK_INT 47
80#define PLL4_LOCK_INT 46
81#define PLL5_LOCK_INT 45
82#define SPI2_INT 44
83#define DSP_INT1 43
84#define DSP_INT2 42
85#define DSP_TDM_INT2 41
86#define TS_AUX_INT 40
87#define TS_IRQ 39
88#define TS_P_INT 38
89#define UOUT1_TO_PAD_INT 37
90#define GPI_11_INT 36
91#define DSP_INT4 35
92#define JTAG_COMM_RX_INT 34
93#define JTAG_COMM_TX_INT 33
94#define DSP_INT3 32
95
96/*Manual: table 257, page 197*/
97
98/*MAIN Interrupt Routing*/
99
100#define MAIN_BASE_INT 0
101
102#define SUB2_FIQ_N 31 /*active low */
103#define SUB1_FIQ_N 30 /*active low */
104#define JPEG_INT 29
105#define DMA_INT 28
106#define MSTIMER_INT 27
107#define IIR1_INT 26
108#define IIR2_INT 25
109#define IIR7_INT 24
110#define DSP_TDM_INT0 23
111#define DSP_TDM_INT1 22
112#define DSP_P_INT 21
113#define DSP_INT0 20
114#define DUM_INT 19
115#define UOUT0_TO_PAD_INT 18
116#define MP4_ENC_INT 17
117#define MP4_DEC_INT 16
118#define SD0_INT 15
119#define MBX_INT 14
120#define SD1_INT 13
121#define MS_INT_N 12
122#define FLASH_INT 11 /*NAND*/
123#define IIR6_INT 10
124#define IIR5_INT 9
125#define IIR4_INT 8
126#define IIR3_INT 7
127#define WATCH_INT 6
128#define HSTIMER_INT 5
129#define ARCH_TIMER_IRQ HSTIMER_INT
130#define CAM_INT 4
131#define PRNG_INT 3
132#define CRYPTO_INT 2
133#define SUB2_IRQ_N 1 /*active low */
134#define SUB1_IRQ_N 0 /*active low */
135
136#define PNX4008_IRQ_TYPES \
137{ /*IRQ #'s: */ \
138IRQ_TYPE_LEVEL_LOW, IRQ_TYPE_LEVEL_LOW, IRQ_TYPE_LEVEL_LOW, IRQ_TYPE_LEVEL_HIGH, /* 0, 1, 2, 3 */ \
139IRQ_TYPE_LEVEL_LOW, IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, /* 4, 5, 6, 7 */ \
140IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, /* 8, 9,10,11 */ \
141IRQ_TYPE_LEVEL_LOW, IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, /* 12,13,14,15 */ \
142IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, /* 16,17,18,19 */ \
143IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, /* 20,21,22,23 */ \
144IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, /* 24,25,26,27 */ \
145IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_LOW, IRQ_TYPE_LEVEL_LOW, /* 28,29,30,31 */ \
146IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_LOW, IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, /* 32,33,34,35 */ \
147IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_EDGE_FALLING, IRQ_TYPE_LEVEL_HIGH, /* 36,37,38,39 */ \
148IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, /* 40,41,42,43 */ \
149IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, /* 44,45,46,47 */ \
150IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_LOW, IRQ_TYPE_LEVEL_LOW, /* 48,49,50,51 */ \
151IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, /* 52,53,54,55 */ \
152IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_LOW, IRQ_TYPE_LEVEL_HIGH, /* 56,57,58,59 */ \
153IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, /* 60,61,62,63 */ \
154IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, /* 64,65,66,67 */ \
155IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, /* 68,69,70,71 */ \
156IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, /* 72,73,74,75 */ \
157IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, /* 76,77,78,79 */ \
158IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, /* 80,81,82,83 */ \
159IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, /* 84,85,86,87 */ \
160IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, /* 88,89,90,91 */ \
161IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_HIGH, /* 92,93,94,95 */ \
162}
163
164/* Start Enable Pin Interrupts - table 58 page 66 */
165
166#define SE_PIN_BASE_INT 32
167
168#define SE_U7_RX_INT 63
169#define SE_U7_HCTS_INT 62
170#define SE_BT_CLKREQ_INT 61
171#define SE_U6_IRRX_INT 60
172/*59 unused*/
173#define SE_U5_RX_INT 58
174#define SE_GPI_11_INT 57
175#define SE_U3_RX_INT 56
176#define SE_U2_HCTS_INT 55
177#define SE_U2_RX_INT 54
178#define SE_U1_RX_INT 53
179#define SE_DISP_SYNC_INT 52
180/*51 unused*/
181#define SE_SDIO_INT_N 50
182#define SE_MSDIO_START_INT 49
183#define SE_GPI_06_INT 48
184#define SE_GPI_05_INT 47
185#define SE_GPI_04_INT 46
186#define SE_GPI_03_INT 45
187#define SE_GPI_02_INT 44
188#define SE_GPI_01_INT 43
189#define SE_GPI_00_INT 42
190#define SE_SYSCLKEN_PIN_INT 41
191#define SE_SPI1_DATAIN_INT 40
192#define SE_GPI_07_INT 39
193#define SE_SPI2_DATAIN_INT 38
194#define SE_GPI_10_INT 37
195#define SE_GPI_09_INT 36
196#define SE_GPI_08_INT 35
197/*34-32 unused*/
198
199/* Start Enable Internal Interrupts - table 57 page 65 */
200
201#define SE_INT_BASE_INT 0
202
203#define SE_TS_IRQ 31
204#define SE_TS_P_INT 30
205#define SE_TS_AUX_INT 29
206/*27-28 unused*/
207#define SE_USB_AHB_NEED_CLK_INT 26
208#define SE_MSTIMER_INT 25
209#define SE_RTC_INT 24
210#define SE_USB_NEED_CLK_INT 23
211#define SE_USB_INT 22
212#define SE_USB_I2C_INT 21
213#define SE_USB_OTG_TIMER_INT 20
214
215#endif /* __PNX4008_IRQS_h__ */
diff --git a/include/asm-arm/arch-pnx4008/memory.h b/include/asm-arm/arch-pnx4008/memory.h
deleted file mode 100644
index 0d8268a95261..000000000000
--- a/include/asm-arm/arch-pnx4008/memory.h
+++ /dev/null
@@ -1,24 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-pnx4008/memory.h
3 *
4 * Copyright (c) 2005 Philips Semiconductors
5 * Copyright (c) 2005 MontaVista Software, Inc.
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; either version 2 of the License, or (at your
10 * option) any later version.
11 */
12
13#ifndef __ASM_ARCH_MEMORY_H
14#define __ASM_ARCH_MEMORY_H
15
16/*
17 * Physical DRAM offset.
18 */
19#define PHYS_OFFSET (0x80000000)
20
21#define __virt_to_bus(x) ((x) - PAGE_OFFSET + PHYS_OFFSET)
22#define __bus_to_virt(x) ((x) + PAGE_OFFSET - PHYS_OFFSET)
23
24#endif
diff --git a/include/asm-arm/arch-pnx4008/param.h b/include/asm-arm/arch-pnx4008/param.h
deleted file mode 100644
index 95d5f547b416..000000000000
--- a/include/asm-arm/arch-pnx4008/param.h
+++ /dev/null
@@ -1,21 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-pnx4008/param.h
3 *
4 * Copyright (C) 1999 ARM Limited
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20
21#define HZ 100
diff --git a/include/asm-arm/arch-pnx4008/platform.h b/include/asm-arm/arch-pnx4008/platform.h
deleted file mode 100644
index 2613c7c669b1..000000000000
--- a/include/asm-arm/arch-pnx4008/platform.h
+++ /dev/null
@@ -1,69 +0,0 @@
1/*
2 * include/asm-arm/arch-pnx4008/platform.h
3 *
4 * PNX4008 Base addresses - header file
5 *
6 * Author: Dmitry Chigirev <source@mvista.com>
7 *
8 * Based on reference code received from Philips:
9 * Copyright (C) 2003 Philips Semiconductors
10 *
11 * 2005 (c) MontaVista Software, Inc. This file is licensed under
12 * the terms of the GNU General Public License version 2. This program
13 * is licensed "as is" without any warranty of any kind, whether express
14 * or implied.
15 */
16
17
18#ifndef __ASM_ARCH_PLATFORM_H__
19#define __ASM_ARCH_PLATFORM_H__
20
21#define PNX4008_IRAM_BASE 0x08000000
22#define PNX4008_IRAM_SIZE 0x00010000
23#define PNX4008_YUV_SLAVE_BASE 0x10000000
24#define PNX4008_DUM_SLAVE_BASE 0x18000000
25#define PNX4008_NDF_FLASH_BASE 0x20020000
26#define PNX4008_SPI1_BASE 0x20088000
27#define PNX4008_SPI2_BASE 0x20090000
28#define PNX4008_SD_CONFIG_BASE 0x20098000
29#define PNX4008_FLASH_DATA 0x200B0000
30#define PNX4008_MLC_FLASH_BASE 0x200B8000
31#define PNX4008_JPEG_CONFIG_BASE 0x300A0000
32#define PNX4008_DMA_CONFIG_BASE 0x31000000
33#define PNX4008_USB_CONFIG_BASE 0x31020000
34#define PNX4008_SDRAM_CFG_BASE 0x31080000
35#define PNX4008_AHB2FAB_BASE 0x40000000
36#define PNX4008_PWRMAN_BASE 0x40004000
37#define PNX4008_INTCTRLMIC_BASE 0x40008000
38#define PNX4008_INTCTRLSIC1_BASE 0x4000C000
39#define PNX4008_INTCTRLSIC2_BASE 0x40010000
40#define PNX4008_HSUART1_BASE 0x40014000
41#define PNX4008_HSUART2_BASE 0x40018000
42#define PNX4008_HSUART7_BASE 0x4001C000
43#define PNX4008_RTC_BASE 0x40024000
44#define PNX4008_PIO_BASE 0x40028000
45#define PNX4008_MSTIMER_BASE 0x40034000
46#define PNX4008_HSTIMER_BASE 0x40038000
47#define PNX4008_WDOG_BASE 0x4003C000
48#define PNX4008_DEBUG_BASE 0x40040000
49#define PNX4008_TOUCH1_BASE 0x40048000
50#define PNX4008_KEYSCAN_BASE 0x40050000
51#define PNX4008_UARTCTRL_BASE 0x40054000
52#define PNX4008_PWM_BASE 0x4005C000
53#define PNX4008_UART3_BASE 0x40080000
54#define PNX4008_UART4_BASE 0x40088000
55#define PNX4008_UART5_BASE 0x40090000
56#define PNX4008_UART6_BASE 0x40098000
57#define PNX4008_I2C1_BASE 0x400A0000
58#define PNX4008_I2C2_BASE 0x400A8000
59#define PNX4008_MAGICGATE_BASE 0x400B0000
60#define PNX4008_DUMCONF_BASE 0x400B8000
61#define PNX4008_DUM_MAINCFG_BASE 0x400BC000
62#define PNX4008_DSP_BASE 0x400C0000
63#define PNX4008_PROFCOUNTER_BASE 0x400C8000
64#define PNX4008_CRYPTO_BASE 0x400D0000
65#define PNX4008_CAMIFCONF_BASE 0x400D8000
66#define PNX4008_YUV2RGB_BASE 0x400E0000
67#define PNX4008_AUDIOCONFIG_BASE 0x400E8000
68
69#endif
diff --git a/include/asm-arm/arch-pnx4008/pm.h b/include/asm-arm/arch-pnx4008/pm.h
deleted file mode 100644
index bac1634cb3e0..000000000000
--- a/include/asm-arm/arch-pnx4008/pm.h
+++ /dev/null
@@ -1,33 +0,0 @@
1/*
2 * include/asm-arm/arch-pnx4008/pm.h
3 *
4 * PNX4008 Power Management Routiness - header file
5 *
6 * Authors: Vitaly Wool, Dmitry Chigirev <source@mvista.com>
7 *
8 * 2005 (c) MontaVista Software, Inc. This file is licensed under
9 * the terms of the GNU General Public License version 2. This program
10 * is licensed "as is" without any warranty of any kind, whether express
11 * or implied.
12 */
13
14#ifndef __ASM_ARCH_PNX4008_PM_H
15#define __ASM_ARCH_PNX4008_PM_H
16
17#ifndef __ASSEMBLER__
18#include "irq.h"
19#include "irqs.h"
20#include "clock.h"
21
22extern void pnx4008_pm_idle(void);
23extern void pnx4008_pm_suspend(void);
24extern unsigned int pnx4008_cpu_suspend_sz;
25extern void pnx4008_cpu_suspend(void);
26extern unsigned int pnx4008_cpu_standby_sz;
27extern void pnx4008_cpu_standby(void);
28
29extern int pnx4008_startup_pll(struct clk *);
30extern int pnx4008_shutdown_pll(struct clk *);
31
32#endif /* ASSEMBLER */
33#endif /* __ASM_ARCH_PNX4008_PM_H */
diff --git a/include/asm-arm/arch-pnx4008/system.h b/include/asm-arm/arch-pnx4008/system.h
deleted file mode 100644
index 6e3da70ab107..000000000000
--- a/include/asm-arm/arch-pnx4008/system.h
+++ /dev/null
@@ -1,38 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-pnx4008/system.h
3 *
4 * Copyright (C) 2003 Philips Semiconductors
5 * Copyright (C) 2005 MontaVista Software, Inc.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
21#ifndef __ASM_ARCH_SYSTEM_H
22#define __ASM_ARCH_SYSTEM_H
23
24#include <asm/hardware.h>
25#include <asm/io.h>
26#include <asm/arch/platform.h>
27
28static void arch_idle(void)
29{
30 cpu_do_idle();
31}
32
33static inline void arch_reset(char mode)
34{
35 cpu_reset(0);
36}
37
38#endif
diff --git a/include/asm-arm/arch-pnx4008/timex.h b/include/asm-arm/arch-pnx4008/timex.h
deleted file mode 100644
index ee470a39089a..000000000000
--- a/include/asm-arm/arch-pnx4008/timex.h
+++ /dev/null
@@ -1,73 +0,0 @@
1/*
2 * include/asm-arm/arch-pnx4008/timex.h
3 *
4 * PNX4008 timers header file
5 *
6 * Author: Dmitry Chigirev <source@mvista.com>
7 *
8 * 2005 (c) MontaVista Software, Inc. This file is licensed under
9 * the terms of the GNU General Public License version 2. This program
10 * is licensed "as is" without any warranty of any kind, whether express
11 * or implied.
12 */
13
14#ifndef __PNX4008_TIMEX_H
15#define __PNX4008_TIMEX_H
16
17#include <asm/hardware.h>
18#include <asm/io.h>
19
20#define CLOCK_TICK_RATE 1000000
21
22#define TICKS2USECS(x) (x)
23
24/* MilliSecond Timer - Chapter 21 Page 202 */
25
26#define MSTIM_INT IO_ADDRESS((PNX4008_MSTIMER_BASE + 0x0))
27#define MSTIM_CTRL IO_ADDRESS((PNX4008_MSTIMER_BASE + 0x4))
28#define MSTIM_COUNTER IO_ADDRESS((PNX4008_MSTIMER_BASE + 0x8))
29#define MSTIM_MCTRL IO_ADDRESS((PNX4008_MSTIMER_BASE + 0x14))
30#define MSTIM_MATCH0 IO_ADDRESS((PNX4008_MSTIMER_BASE + 0x18))
31#define MSTIM_MATCH1 IO_ADDRESS((PNX4008_MSTIMER_BASE + 0x1c))
32
33/* High Speed Timer - Chpater 22, Page 205 */
34
35#define HSTIM_INT IO_ADDRESS((PNX4008_HSTIMER_BASE + 0x0))
36#define HSTIM_CTRL IO_ADDRESS((PNX4008_HSTIMER_BASE + 0x4))
37#define HSTIM_COUNTER IO_ADDRESS((PNX4008_HSTIMER_BASE + 0x8))
38#define HSTIM_PMATCH IO_ADDRESS((PNX4008_HSTIMER_BASE + 0xC))
39#define HSTIM_PCOUNT IO_ADDRESS((PNX4008_HSTIMER_BASE + 0x10))
40#define HSTIM_MCTRL IO_ADDRESS((PNX4008_HSTIMER_BASE + 0x14))
41#define HSTIM_MATCH0 IO_ADDRESS((PNX4008_HSTIMER_BASE + 0x18))
42#define HSTIM_MATCH1 IO_ADDRESS((PNX4008_HSTIMER_BASE + 0x1c))
43#define HSTIM_MATCH2 IO_ADDRESS((PNX4008_HSTIMER_BASE + 0x20))
44#define HSTIM_CCR IO_ADDRESS((PNX4008_HSTIMER_BASE + 0x28))
45#define HSTIM_CR0 IO_ADDRESS((PNX4008_HSTIMER_BASE + 0x2C))
46#define HSTIM_CR1 IO_ADDRESS((PNX4008_HSTIMER_BASE + 0x30))
47
48/* IMPORTANT: both timers are UPCOUNTING */
49
50/* xSTIM_MCTRL bit definitions */
51#define MR0_INT 1
52#define RESET_COUNT0 (1<<1)
53#define STOP_COUNT0 (1<<2)
54#define MR1_INT (1<<3)
55#define RESET_COUNT1 (1<<4)
56#define STOP_COUNT1 (1<<5)
57#define MR2_INT (1<<6)
58#define RESET_COUNT2 (1<<7)
59#define STOP_COUNT2 (1<<8)
60
61/* xSTIM_CTRL bit definitions */
62#define COUNT_ENAB 1
63#define RESET_COUNT (1<<1)
64#define DEBUG_EN (1<<2)
65
66/* xSTIM_INT bit definitions */
67#define MATCH0_INT 1
68#define MATCH1_INT (1<<1)
69#define MATCH2_INT (1<<2)
70#define RTC_TICK0 (1<<4)
71#define RTC_TICK1 (1<<5)
72
73#endif
diff --git a/include/asm-arm/arch-pnx4008/uncompress.h b/include/asm-arm/arch-pnx4008/uncompress.h
deleted file mode 100644
index 8fa4d24b72b4..000000000000
--- a/include/asm-arm/arch-pnx4008/uncompress.h
+++ /dev/null
@@ -1,46 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-pnx4008/uncompress.h
3 *
4 * Copyright (C) 1999 ARM Limited
5 * Copyright (C) 2006 MontaVista Software, Inc.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
21
22#define UART5_BASE 0x40090000
23
24#define UART5_DR (*(volatile unsigned char *) (UART5_BASE))
25#define UART5_FR (*(volatile unsigned char *) (UART5_BASE + 18))
26
27static __inline__ void putc(char c)
28{
29 while (UART5_FR & (1 << 5))
30 barrier();
31
32 UART5_DR = c;
33}
34
35/*
36 * This does not append a newline
37 */
38static inline void flush(void)
39{
40}
41
42/*
43 * nothing to do
44 */
45#define arch_decomp_setup()
46#define arch_decomp_wdog()
diff --git a/include/asm-arm/arch-pnx4008/vmalloc.h b/include/asm-arm/arch-pnx4008/vmalloc.h
deleted file mode 100644
index 140d925f6f37..000000000000
--- a/include/asm-arm/arch-pnx4008/vmalloc.h
+++ /dev/null
@@ -1,20 +0,0 @@
1/*
2 * include/asm-arm/arch-pnx4008/vmalloc.h
3 *
4 * Author: Vitaly Wool <source@mvista.com>
5 *
6 * 2006 (c) MontaVista Software, Inc. This file is licensed under
7 * the terms of the GNU General Public License version 2. This program
8 * is licensed "as is" without any warranty of any kind, whether express
9 * or implied.
10 */
11
12/*
13 * Just any arbitrary offset to the start of the vmalloc VM area: the
14 * current 8MB value just means that there will be a 8MB "hole" after the
15 * physical memory until the kernel virtual memory starts. That means that
16 * any out-of-bounds memory accesses will hopefully be caught.
17 * The vmalloc() routines leaves a hole of 4kB between each vmalloced
18 * area for the same reason. ;)
19 */
20#define VMALLOC_END (PAGE_OFFSET + 0x10000000)
diff --git a/include/asm-arm/arch-pxa/debug-macro.S b/include/asm-arm/arch-pxa/debug-macro.S
deleted file mode 100644
index 9012cbc0ad8b..000000000000
--- a/include/asm-arm/arch-pxa/debug-macro.S
+++ /dev/null
@@ -1,25 +0,0 @@
1/* linux/include/asm-arm/arch-pxa/debug-macro.S
2 *
3 * Debugging macro include header
4 *
5 * Copyright (C) 1994-1999 Russell King
6 * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 *
12*/
13
14#include "hardware.h"
15
16 .macro addruart,rx
17 mrc p15, 0, \rx, c1, c0
18 tst \rx, #1 @ MMU enabled?
19 moveq \rx, #0x40000000 @ physical
20 movne \rx, #io_p2v(0x40000000) @ virtual
21 orr \rx, \rx, #0x00100000
22 .endm
23
24#define UART_SHIFT 2
25#include <asm/hardware/debug-8250.S>
diff --git a/include/asm-arm/arch-pxa/dma.h b/include/asm-arm/arch-pxa/dma.h
deleted file mode 100644
index dbe110ee2666..000000000000
--- a/include/asm-arm/arch-pxa/dma.h
+++ /dev/null
@@ -1,50 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-pxa/dma.h
3 *
4 * Author: Nicolas Pitre
5 * Created: Jun 15, 2001
6 * Copyright: MontaVista Software, Inc.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 */
12#ifndef __ASM_ARCH_DMA_H
13#define __ASM_ARCH_DMA_H
14
15/*
16 * Descriptor structure for PXA's DMA engine
17 * Note: this structure must always be aligned to a 16-byte boundary.
18 */
19
20typedef struct pxa_dma_desc {
21 volatile u32 ddadr; /* Points to the next descriptor + flags */
22 volatile u32 dsadr; /* DSADR value for the current transfer */
23 volatile u32 dtadr; /* DTADR value for the current transfer */
24 volatile u32 dcmd; /* DCMD value for the current transfer */
25} pxa_dma_desc;
26
27typedef enum {
28 DMA_PRIO_HIGH = 0,
29 DMA_PRIO_MEDIUM = 1,
30 DMA_PRIO_LOW = 2
31} pxa_dma_prio;
32
33#if defined(CONFIG_MACH_ARMCORE) && defined(CONFIG_PCI)
34#define HAVE_ARCH_PCI_SET_DMA_MASK 1
35#endif
36
37/*
38 * DMA registration
39 */
40
41int __init pxa_init_dma(int num_ch);
42
43int pxa_request_dma (char *name,
44 pxa_dma_prio prio,
45 void (*irq_handler)(int, void *),
46 void *data);
47
48void pxa_free_dma (int dma_ch);
49
50#endif /* _ASM_ARCH_DMA_H */
diff --git a/include/asm-arm/arch-pxa/entry-macro.S b/include/asm-arm/arch-pxa/entry-macro.S
deleted file mode 100644
index c145bb01bc8f..000000000000
--- a/include/asm-arm/arch-pxa/entry-macro.S
+++ /dev/null
@@ -1,57 +0,0 @@
1/*
2 * include/asm-arm/arch-pxa/entry-macro.S
3 *
4 * Low-level IRQ helper macros for PXA-based platforms
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10#include <asm/hardware.h>
11#include <asm/arch/irqs.h>
12
13 .macro disable_fiq
14 .endm
15
16 .macro get_irqnr_preamble, base, tmp
17 .endm
18
19 .macro arch_ret_to_user, tmp1, tmp2
20 .endm
21
22 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
23 mrc p15, 0, \tmp, c0, c0, 0 @ CPUID
24 mov \tmp, \tmp, lsr #13
25 and \tmp, \tmp, #0x7 @ Core G
26 cmp \tmp, #1
27 bhi 1004f
28
29 mov \base, #io_p2v(0x40000000) @ IIR Ctl = 0x40d00000
30 add \base, \base, #0x00d00000
31 ldr \irqstat, [\base, #0] @ ICIP
32 ldr \irqnr, [\base, #4] @ ICMR
33 b 1002f
34
351004:
36 mrc p6, 0, \irqstat, c6, c0, 0 @ ICIP2
37 mrc p6, 0, \irqnr, c7, c0, 0 @ ICMR2
38 ands \irqnr, \irqstat, \irqnr
39 beq 1003f
40 rsb \irqstat, \irqnr, #0
41 and \irqstat, \irqstat, \irqnr
42 clz \irqnr, \irqstat
43 rsb \irqnr, \irqnr, #31
44 add \irqnr, \irqnr, #32
45 b 1001f
461003:
47 mrc p6, 0, \irqstat, c0, c0, 0 @ ICIP
48 mrc p6, 0, \irqnr, c1, c0, 0 @ ICMR
491002:
50 ands \irqnr, \irqstat, \irqnr
51 beq 1001f
52 rsb \irqstat, \irqnr, #0
53 and \irqstat, \irqstat, \irqnr
54 clz \irqnr, \irqstat
55 rsb \irqnr, \irqnr, #31
561001:
57 .endm
diff --git a/include/asm-arm/arch-pxa/gpio.h b/include/asm-arm/arch-pxa/gpio.h
deleted file mode 100644
index bdbf5f9ffdd5..000000000000
--- a/include/asm-arm/arch-pxa/gpio.h
+++ /dev/null
@@ -1,65 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-pxa/gpio.h
3 *
4 * PXA GPIO wrappers for arch-neutral GPIO calls
5 *
6 * Written by Philipp Zabel <philipp.zabel@gmail.com>
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 *
22 */
23
24#ifndef __ASM_ARCH_PXA_GPIO_H
25#define __ASM_ARCH_PXA_GPIO_H
26
27#include <asm/arch/pxa-regs.h>
28#include <asm/irq.h>
29#include <asm/hardware.h>
30
31#include <asm-generic/gpio.h>
32
33
34/* NOTE: some PXAs have fewer on-chip GPIOs (like PXA255, with 85).
35 * Those cases currently cause holes in the GPIO number space.
36 */
37#define NR_BUILTIN_GPIO 128
38
39static inline int gpio_get_value(unsigned gpio)
40{
41 if (__builtin_constant_p(gpio) && (gpio < NR_BUILTIN_GPIO))
42 return GPLR(gpio) & GPIO_bit(gpio);
43 else
44 return __gpio_get_value(gpio);
45}
46
47static inline void gpio_set_value(unsigned gpio, int value)
48{
49 if (__builtin_constant_p(gpio) && (gpio < NR_BUILTIN_GPIO)) {
50 if (value)
51 GPSR(gpio) = GPIO_bit(gpio);
52 else
53 GPCR(gpio) = GPIO_bit(gpio);
54 } else {
55 __gpio_set_value(gpio, value);
56 }
57}
58
59#define gpio_cansleep __gpio_cansleep
60
61#define gpio_to_irq(gpio) IRQ_GPIO(gpio)
62#define irq_to_gpio(irq) IRQ_TO_GPIO(irq)
63
64
65#endif
diff --git a/include/asm-arm/arch-pxa/gumstix.h b/include/asm-arm/arch-pxa/gumstix.h
deleted file mode 100644
index 6fa85c4f94f8..000000000000
--- a/include/asm-arm/arch-pxa/gumstix.h
+++ /dev/null
@@ -1,96 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-pxa/gumstix.h
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 */
8
9
10/* BTRESET - Reset line to Bluetooth module, active low signal. */
11#define GPIO_GUMSTIX_BTRESET 7
12#define GPIO_GUMSTIX_BTRESET_MD (GPIO_GUMSTIX_BTRESET | GPIO_OUT)
13
14
15/*
16GPIOn - Input from MAX823 (or equiv), normalizing USB +5V into a clean
17interrupt signal for determining cable presence. On the original gumstix,
18this is GPIO81, and GPIO83 needs to be defined as well. On the gumstix F,
19this moves to GPIO17 and GPIO37. */
20
21/* GPIOx - Connects to USB D+ and used as a pull-up after GPIOn
22has detected a cable insertion; driven low otherwise. */
23
24#ifdef CONFIG_ARCH_GUMSTIX_ORIG
25
26#define GPIO_GUMSTIX_USB_GPIOn 81
27#define GPIO_GUMSTIX_USB_GPIOx 83
28
29#else
30
31#define GPIO_GUMSTIX_USB_GPIOn 35
32#define GPIO_GUMSTIX_USB_GPIOx 41
33
34#endif
35
36/* usb state change */
37#define GUMSTIX_USB_INTR_IRQ IRQ_GPIO(GPIO_GUMSTIX_USB_GPIOn)
38
39#define GPIO_GUMSTIX_USB_GPIOn_MD (GPIO_GUMSTIX_USB_GPIOn | GPIO_IN)
40#define GPIO_GUMSTIX_USB_GPIOx_CON_MD (GPIO_GUMSTIX_USB_GPIOx | GPIO_OUT)
41#define GPIO_GUMSTIX_USB_GPIOx_DIS_MD (GPIO_GUMSTIX_USB_GPIOx | GPIO_IN)
42
43/*
44 * SD/MMC definitions
45 */
46#define GUMSTIX_GPIO_nSD_WP 22 /* SD Write Protect */
47#define GUMSTIX_GPIO_nSD_DETECT 11 /* MMC/SD Card Detect */
48#define GUMSTIX_IRQ_GPIO_nSD_DETECT IRQ_GPIO(GUMSTIX_GPIO_nSD_DETECT)
49
50/*
51 * SMC Ethernet definitions
52 * ETH_RST provides a hardware reset line to the ethernet chip
53 * ETH is the IRQ line in from the ethernet chip to the PXA
54 */
55#define GPIO_GUMSTIX_ETH0_RST 80
56#define GPIO_GUMSTIX_ETH0_RST_MD (GPIO_GUMSTIX_ETH0_RST | GPIO_OUT)
57#define GPIO_GUMSTIX_ETH1_RST 52
58#define GPIO_GUMSTIX_ETH1_RST_MD (GPIO_GUMSTIX_ETH1_RST | GPIO_OUT)
59
60#define GPIO_GUMSTIX_ETH0 36
61#define GPIO_GUMSTIX_ETH0_MD (GPIO_GUMSTIX_ETH0 | GPIO_IN)
62#define GUMSTIX_ETH0_IRQ IRQ_GPIO(GPIO_GUMSTIX_ETH0)
63#define GPIO_GUMSTIX_ETH1 27
64#define GPIO_GUMSTIX_ETH1_MD (GPIO_GUMSTIX_ETH1 | GPIO_IN)
65#define GUMSTIX_ETH1_IRQ IRQ_GPIO(GPIO_GUMSTIX_ETH1)
66
67
68/* CF reset line */
69#define GPIO8_RESET 8
70
71/* CF slot 0 */
72#define GPIO4_nBVD1 4
73#define GPIO4_nSTSCHG GPIO4_nBVD1
74#define GPIO11_nCD 11
75#define GPIO26_PRDY_nBSY 26
76#define GUMSTIX_S0_nSTSCHG_IRQ IRQ_GPIO(GPIO4_nSTSCHG)
77#define GUMSTIX_S0_nCD_IRQ IRQ_GPIO(GPIO11_nCD)
78#define GUMSTIX_S0_PRDY_nBSY_IRQ IRQ_GPIO(GPIO26_PRDY_nBSY)
79
80/* CF slot 1 */
81#define GPIO18_nBVD1 18
82#define GPIO18_nSTSCHG GPIO18_nBVD1
83#define GPIO36_nCD 36
84#define GPIO27_PRDY_nBSY 27
85#define GUMSTIX_S1_nSTSCHG_IRQ IRQ_GPIO(GPIO18_nSTSCHG)
86#define GUMSTIX_S1_nCD_IRQ IRQ_GPIO(GPIO36_nCD)
87#define GUMSTIX_S1_PRDY_nBSY_IRQ IRQ_GPIO(GPIO27_PRDY_nBSY)
88
89/* CF GPIO line modes */
90#define GPIO4_nSTSCHG_MD (GPIO4_nSTSCHG | GPIO_IN)
91#define GPIO8_RESET_MD (GPIO8_RESET | GPIO_OUT)
92#define GPIO11_nCD_MD (GPIO11_nCD | GPIO_IN)
93#define GPIO18_nSTSCHG_MD (GPIO18_nSTSCHG | GPIO_IN)
94#define GPIO26_PRDY_nBSY_MD (GPIO26_PRDY_nBSY | GPIO_IN)
95#define GPIO27_PRDY_nBSY_MD (GPIO27_PRDY_nBSY | GPIO_IN)
96#define GPIO36_nCD_MD (GPIO36_nCD | GPIO_IN)
diff --git a/include/asm-arm/arch-pxa/hardware.h b/include/asm-arm/arch-pxa/hardware.h
deleted file mode 100644
index 979a45695d7d..000000000000
--- a/include/asm-arm/arch-pxa/hardware.h
+++ /dev/null
@@ -1,240 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-pxa/hardware.h
3 *
4 * Author: Nicolas Pitre
5 * Created: Jun 15, 2001
6 * Copyright: MontaVista Software Inc.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 */
12
13#ifndef __ASM_ARCH_HARDWARE_H
14#define __ASM_ARCH_HARDWARE_H
15
16/*
17 * We requires absolute addresses.
18 */
19#define PCIO_BASE 0
20
21/*
22 * Workarounds for at least 2 errata so far require this.
23 * The mapping is set in mach-pxa/generic.c.
24 */
25#define UNCACHED_PHYS_0 0xff000000
26#define UNCACHED_ADDR UNCACHED_PHYS_0
27
28/*
29 * Intel PXA2xx internal register mapping:
30 *
31 * 0x40000000 - 0x41ffffff <--> 0xf2000000 - 0xf3ffffff
32 * 0x44000000 - 0x45ffffff <--> 0xf4000000 - 0xf5ffffff
33 * 0x48000000 - 0x49ffffff <--> 0xf6000000 - 0xf7ffffff
34 * 0x4c000000 - 0x4dffffff <--> 0xf8000000 - 0xf9ffffff
35 * 0x50000000 - 0x51ffffff <--> 0xfa000000 - 0xfbffffff
36 * 0x54000000 - 0x55ffffff <--> 0xfc000000 - 0xfdffffff
37 * 0x58000000 - 0x59ffffff <--> 0xfe000000 - 0xffffffff
38 *
39 * Note that not all PXA2xx chips implement all those addresses, and the
40 * kernel only maps the minimum needed range of this mapping.
41 */
42#define io_p2v(x) (0xf2000000 + ((x) & 0x01ffffff) + (((x) & 0x1c000000) >> 1))
43#define io_v2p(x) (0x3c000000 + ((x) & 0x01ffffff) + (((x) & 0x0e000000) << 1))
44
45#ifndef __ASSEMBLY__
46
47# define __REG(x) (*((volatile u32 *)io_p2v(x)))
48
49/* With indexed regs we don't want to feed the index through io_p2v()
50 especially if it is a variable, otherwise horrible code will result. */
51# define __REG2(x,y) \
52 (*(volatile u32 *)((u32)&__REG(x) + (y)))
53
54# define __PREG(x) (io_v2p((u32)&(x)))
55
56#else
57
58# define __REG(x) io_p2v(x)
59# define __PREG(x) io_v2p(x)
60
61#endif
62
63#ifndef __ASSEMBLY__
64
65#ifdef CONFIG_PXA25x
66#define __cpu_is_pxa21x(id) \
67 ({ \
68 unsigned int _id = (id) >> 4 & 0xf3f; \
69 _id == 0x212; \
70 })
71
72#define __cpu_is_pxa255(id) \
73 ({ \
74 unsigned int _id = (id) >> 4 & 0xfff; \
75 _id == 0x2d0; \
76 })
77
78#define __cpu_is_pxa25x(id) \
79 ({ \
80 unsigned int _id = (id) >> 4 & 0xfff; \
81 _id == 0x2d0 || _id == 0x290; \
82 })
83#else
84#define __cpu_is_pxa21x(id) (0)
85#define __cpu_is_pxa255(id) (0)
86#define __cpu_is_pxa25x(id) (0)
87#endif
88
89#ifdef CONFIG_PXA27x
90#define __cpu_is_pxa27x(id) \
91 ({ \
92 unsigned int _id = (id) >> 4 & 0xfff; \
93 _id == 0x411; \
94 })
95#else
96#define __cpu_is_pxa27x(id) (0)
97#endif
98
99#ifdef CONFIG_CPU_PXA300
100#define __cpu_is_pxa300(id) \
101 ({ \
102 unsigned int _id = (id) >> 4 & 0xfff; \
103 _id == 0x688; \
104 })
105#else
106#define __cpu_is_pxa300(id) (0)
107#endif
108
109#ifdef CONFIG_CPU_PXA310
110#define __cpu_is_pxa310(id) \
111 ({ \
112 unsigned int _id = (id) >> 4 & 0xfff; \
113 _id == 0x689; \
114 })
115#else
116#define __cpu_is_pxa310(id) (0)
117#endif
118
119#ifdef CONFIG_CPU_PXA320
120#define __cpu_is_pxa320(id) \
121 ({ \
122 unsigned int _id = (id) >> 4 & 0xfff; \
123 _id == 0x603 || _id == 0x682; \
124 })
125#else
126#define __cpu_is_pxa320(id) (0)
127#endif
128
129#ifdef CONFIG_CPU_PXA930
130#define __cpu_is_pxa930(id) \
131 ({ \
132 unsigned int _id = (id) >> 4 & 0xfff; \
133 _id == 0x683; \
134 })
135#else
136#define __cpu_is_pxa930(id) (0)
137#endif
138
139#define cpu_is_pxa21x() \
140 ({ \
141 __cpu_is_pxa21x(read_cpuid_id()); \
142 })
143
144#define cpu_is_pxa255() \
145 ({ \
146 __cpu_is_pxa255(read_cpuid_id()); \
147 })
148
149#define cpu_is_pxa25x() \
150 ({ \
151 __cpu_is_pxa25x(read_cpuid_id()); \
152 })
153
154#define cpu_is_pxa27x() \
155 ({ \
156 __cpu_is_pxa27x(read_cpuid_id()); \
157 })
158
159#define cpu_is_pxa300() \
160 ({ \
161 __cpu_is_pxa300(read_cpuid_id()); \
162 })
163
164#define cpu_is_pxa310() \
165 ({ \
166 __cpu_is_pxa310(read_cpuid_id()); \
167 })
168
169#define cpu_is_pxa320() \
170 ({ \
171 __cpu_is_pxa320(read_cpuid_id()); \
172 })
173
174#define cpu_is_pxa930() \
175 ({ \
176 unsigned int id = read_cpuid(CPUID_ID); \
177 __cpu_is_pxa930(id); \
178 })
179
180/*
181 * CPUID Core Generation Bit
182 * <= 0x2 for pxa21x/pxa25x/pxa26x/pxa27x
183 * == 0x3 for pxa300/pxa310/pxa320
184 */
185#define __cpu_is_pxa2xx(id) \
186 ({ \
187 unsigned int _id = (id) >> 13 & 0x7; \
188 _id <= 0x2; \
189 })
190
191#define __cpu_is_pxa3xx(id) \
192 ({ \
193 unsigned int _id = (id) >> 13 & 0x7; \
194 _id == 0x3; \
195 })
196
197#define cpu_is_pxa2xx() \
198 ({ \
199 __cpu_is_pxa2xx(read_cpuid_id()); \
200 })
201
202#define cpu_is_pxa3xx() \
203 ({ \
204 __cpu_is_pxa3xx(read_cpuid_id()); \
205 })
206
207/*
208 * Handy routine to set GPIO alternate functions
209 */
210extern int pxa_gpio_mode( int gpio_mode );
211
212/*
213 * Return GPIO level, nonzero means high, zero is low
214 */
215extern int pxa_gpio_get_value(unsigned gpio);
216
217/*
218 * Set output GPIO level
219 */
220extern void pxa_gpio_set_value(unsigned gpio, int value);
221
222/*
223 * return current memory and LCD clock frequency in units of 10kHz
224 */
225extern unsigned int get_memclk_frequency_10khz(void);
226
227/*
228 * register GPIO as reset generator
229 */
230extern int init_gpio_reset(int gpio);
231
232#endif
233
234#if defined(CONFIG_MACH_ARMCORE) && defined(CONFIG_PCI)
235#define PCIBIOS_MIN_IO 0
236#define PCIBIOS_MIN_MEM 0
237#define pcibios_assign_all_busses() 1
238#endif
239
240#endif /* _ASM_ARCH_HARDWARE_H */
diff --git a/include/asm-arm/arch-pxa/idp.h b/include/asm-arm/arch-pxa/idp.h
deleted file mode 100644
index 21aa8ac35c1c..000000000000
--- a/include/asm-arm/arch-pxa/idp.h
+++ /dev/null
@@ -1,199 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-pxa/idp.h
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 *
8 * Copyright (c) 2001 Cliff Brake, Accelent Systems Inc.
9 *
10 * 2001-09-13: Cliff Brake <cbrake@accelent.com>
11 * Initial code
12 *
13 * 2005-02-15: Cliff Brake <cliff.brake@gmail.com>
14 * <http://www.vibren.com> <http://bec-systems.com>
15 * Changes for 2.6 kernel.
16 */
17
18
19/*
20 * Note: this file must be safe to include in assembly files
21 *
22 * Support for the Vibren PXA255 IDP requires rev04 or later
23 * IDP hardware.
24 */
25
26
27#define IDP_FLASH_PHYS (PXA_CS0_PHYS)
28#define IDP_ALT_FLASH_PHYS (PXA_CS1_PHYS)
29#define IDP_MEDIAQ_PHYS (PXA_CS3_PHYS)
30#define IDP_IDE_PHYS (PXA_CS5_PHYS + 0x03000000)
31#define IDP_ETH_PHYS (PXA_CS5_PHYS + 0x03400000)
32#define IDP_COREVOLT_PHYS (PXA_CS5_PHYS + 0x03800000)
33#define IDP_CPLD_PHYS (PXA_CS5_PHYS + 0x03C00000)
34
35
36/*
37 * virtual memory map
38 */
39
40#define IDP_COREVOLT_VIRT (0xf0000000)
41#define IDP_COREVOLT_SIZE (1*1024*1024)
42
43#define IDP_CPLD_VIRT (IDP_COREVOLT_VIRT + IDP_COREVOLT_SIZE)
44#define IDP_CPLD_SIZE (1*1024*1024)
45
46#if (IDP_CPLD_VIRT + IDP_CPLD_SIZE) > 0xfc000000
47#error Your custom IO space is getting a bit large !!
48#endif
49
50#define CPLD_P2V(x) ((x) - IDP_CPLD_PHYS + IDP_CPLD_VIRT)
51#define CPLD_V2P(x) ((x) - IDP_CPLD_VIRT + IDP_CPLD_PHYS)
52
53#ifndef __ASSEMBLY__
54# define __CPLD_REG(x) (*((volatile unsigned long *)CPLD_P2V(x)))
55#else
56# define __CPLD_REG(x) CPLD_P2V(x)
57#endif
58
59/* board level registers in the CPLD: (offsets from CPLD_VIRT) */
60
61#define _IDP_CPLD_REV (IDP_CPLD_PHYS + 0x00)
62#define _IDP_CPLD_PERIPH_PWR (IDP_CPLD_PHYS + 0x04)
63#define _IDP_CPLD_LED_CONTROL (IDP_CPLD_PHYS + 0x08)
64#define _IDP_CPLD_KB_COL_HIGH (IDP_CPLD_PHYS + 0x0C)
65#define _IDP_CPLD_KB_COL_LOW (IDP_CPLD_PHYS + 0x10)
66#define _IDP_CPLD_PCCARD_EN (IDP_CPLD_PHYS + 0x14)
67#define _IDP_CPLD_GPIOH_DIR (IDP_CPLD_PHYS + 0x18)
68#define _IDP_CPLD_GPIOH_VALUE (IDP_CPLD_PHYS + 0x1C)
69#define _IDP_CPLD_GPIOL_DIR (IDP_CPLD_PHYS + 0x20)
70#define _IDP_CPLD_GPIOL_VALUE (IDP_CPLD_PHYS + 0x24)
71#define _IDP_CPLD_PCCARD_PWR (IDP_CPLD_PHYS + 0x28)
72#define _IDP_CPLD_MISC_CTRL (IDP_CPLD_PHYS + 0x2C)
73#define _IDP_CPLD_LCD (IDP_CPLD_PHYS + 0x30)
74#define _IDP_CPLD_FLASH_WE (IDP_CPLD_PHYS + 0x34)
75
76#define _IDP_CPLD_KB_ROW (IDP_CPLD_PHYS + 0x50)
77#define _IDP_CPLD_PCCARD0_STATUS (IDP_CPLD_PHYS + 0x54)
78#define _IDP_CPLD_PCCARD1_STATUS (IDP_CPLD_PHYS + 0x58)
79#define _IDP_CPLD_MISC_STATUS (IDP_CPLD_PHYS + 0x5C)
80
81/* FPGA register virtual addresses */
82
83#define IDP_CPLD_REV __CPLD_REG(_IDP_CPLD_REV)
84#define IDP_CPLD_PERIPH_PWR __CPLD_REG(_IDP_CPLD_PERIPH_PWR)
85#define IDP_CPLD_LED_CONTROL __CPLD_REG(_IDP_CPLD_LED_CONTROL)
86#define IDP_CPLD_KB_COL_HIGH __CPLD_REG(_IDP_CPLD_KB_COL_HIGH)
87#define IDP_CPLD_KB_COL_LOW __CPLD_REG(_IDP_CPLD_KB_COL_LOW)
88#define IDP_CPLD_PCCARD_EN __CPLD_REG(_IDP_CPLD_PCCARD_EN)
89#define IDP_CPLD_GPIOH_DIR __CPLD_REG(_IDP_CPLD_GPIOH_DIR)
90#define IDP_CPLD_GPIOH_VALUE __CPLD_REG(_IDP_CPLD_GPIOH_VALUE)
91#define IDP_CPLD_GPIOL_DIR __CPLD_REG(_IDP_CPLD_GPIOL_DIR)
92#define IDP_CPLD_GPIOL_VALUE __CPLD_REG(_IDP_CPLD_GPIOL_VALUE)
93#define IDP_CPLD_PCCARD_PWR __CPLD_REG(_IDP_CPLD_PCCARD_PWR)
94#define IDP_CPLD_MISC_CTRL __CPLD_REG(_IDP_CPLD_MISC_CTRL)
95#define IDP_CPLD_LCD __CPLD_REG(_IDP_CPLD_LCD)
96#define IDP_CPLD_FLASH_WE __CPLD_REG(_IDP_CPLD_FLASH_WE)
97
98#define IDP_CPLD_KB_ROW __CPLD_REG(_IDP_CPLD_KB_ROW)
99#define IDP_CPLD_PCCARD0_STATUS __CPLD_REG(_IDP_CPLD_PCCARD0_STATUS)
100#define IDP_CPLD_PCCARD1_STATUS __CPLD_REG(_IDP_CPLD_PCCARD1_STATUS)
101#define IDP_CPLD_MISC_STATUS __CPLD_REG(_IDP_CPLD_MISC_STATUS)
102
103
104/*
105 * Bit masks for various registers
106 */
107
108// IDP_CPLD_PCCARD_PWR
109#define PCC0_PWR0 (1 << 0)
110#define PCC0_PWR1 (1 << 1)
111#define PCC0_PWR2 (1 << 2)
112#define PCC0_PWR3 (1 << 3)
113#define PCC1_PWR0 (1 << 4)
114#define PCC1_PWR1 (1 << 5)
115#define PCC1_PWR2 (1 << 6)
116#define PCC1_PWR3 (1 << 7)
117
118// IDP_CPLD_PCCARD_EN
119#define PCC0_RESET (1 << 6)
120#define PCC1_RESET (1 << 7)
121#define PCC0_ENABLE (1 << 0)
122#define PCC1_ENABLE (1 << 1)
123
124// IDP_CPLD_PCCARDx_STATUS
125#define _PCC_WRPROT (1 << 7) // 7-4 read as low true
126#define _PCC_RESET (1 << 6)
127#define _PCC_IRQ (1 << 5)
128#define _PCC_INPACK (1 << 4)
129#define PCC_BVD2 (1 << 3)
130#define PCC_BVD1 (1 << 2)
131#define PCC_VS2 (1 << 1)
132#define PCC_VS1 (1 << 0)
133
134#define PCC_DETECT(x) (GPLR(7 + (x)) & GPIO_bit(7 + (x)))
135
136/* A listing of interrupts used by external hardware devices */
137
138#define TOUCH_PANEL_IRQ IRQ_GPIO(5)
139#define IDE_IRQ IRQ_GPIO(21)
140
141#define TOUCH_PANEL_IRQ_EDGE IRQ_TYPE_EDGE_FALLING
142
143#define ETHERNET_IRQ IRQ_GPIO(4)
144#define ETHERNET_IRQ_EDGE IRQ_TYPE_EDGE_RISING
145
146#define IDE_IRQ_EDGE IRQ_TYPE_EDGE_RISING
147
148#define PCMCIA_S0_CD_VALID IRQ_GPIO(7)
149#define PCMCIA_S0_CD_VALID_EDGE IRQ_TYPE_EDGE_BOTH
150
151#define PCMCIA_S1_CD_VALID IRQ_GPIO(8)
152#define PCMCIA_S1_CD_VALID_EDGE IRQ_TYPE_EDGE_BOTH
153
154#define PCMCIA_S0_RDYINT IRQ_GPIO(19)
155#define PCMCIA_S1_RDYINT IRQ_GPIO(22)
156
157
158/*
159 * Macros for LED Driver
160 */
161
162/* leds 0 = ON */
163#define IDP_HB_LED (1<<5)
164#define IDP_BUSY_LED (1<<6)
165
166#define IDP_LEDS_MASK (IDP_HB_LED | IDP_BUSY_LED)
167
168/*
169 * macros for MTD driver
170 */
171
172#define FLASH_WRITE_PROTECT_DISABLE() ((IDP_CPLD_FLASH_WE) &= ~(0x1))
173#define FLASH_WRITE_PROTECT_ENABLE() ((IDP_CPLD_FLASH_WE) |= (0x1))
174
175/*
176 * macros for matrix keyboard driver
177 */
178
179#define KEYBD_MATRIX_NUMBER_INPUTS 7
180#define KEYBD_MATRIX_NUMBER_OUTPUTS 14
181
182#define KEYBD_MATRIX_INVERT_OUTPUT_LOGIC FALSE
183#define KEYBD_MATRIX_INVERT_INPUT_LOGIC FALSE
184
185#define KEYBD_MATRIX_SETTLING_TIME_US 100
186#define KEYBD_MATRIX_KEYSTATE_DEBOUNCE_CONSTANT 2
187
188#define KEYBD_MATRIX_SET_OUTPUTS(outputs) \
189{\
190 IDP_CPLD_KB_COL_LOW = outputs;\
191 IDP_CPLD_KB_COL_HIGH = outputs >> 7;\
192}
193
194#define KEYBD_MATRIX_GET_INPUTS(inputs) \
195{\
196 inputs = (IDP_CPLD_KB_ROW & 0x7f);\
197}
198
199
diff --git a/include/asm-arm/arch-pxa/io.h b/include/asm-arm/arch-pxa/io.h
deleted file mode 100644
index 7f8d817b446f..000000000000
--- a/include/asm-arm/arch-pxa/io.h
+++ /dev/null
@@ -1,20 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-pxa/io.h
3 *
4 * Copied from asm/arch/sa1100/io.h
5 */
6#ifndef __ASM_ARM_ARCH_IO_H
7#define __ASM_ARM_ARCH_IO_H
8
9#include <asm/hardware.h>
10
11#define IO_SPACE_LIMIT 0xffffffff
12
13/*
14 * We don't actually have real ISA nor PCI buses, but there is so many
15 * drivers out there that might just work if we fake them...
16 */
17#define __io(a) ((void __iomem *)(a))
18#define __mem_pci(a) (a)
19
20#endif
diff --git a/include/asm-arm/arch-pxa/irqs.h b/include/asm-arm/arch-pxa/irqs.h
deleted file mode 100644
index 9413121b0ed9..000000000000
--- a/include/asm-arm/arch-pxa/irqs.h
+++ /dev/null
@@ -1,264 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-pxa/irqs.h
3 *
4 * Author: Nicolas Pitre
5 * Created: Jun 15, 2001
6 * Copyright: MontaVista Software Inc.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 */
12
13
14#define PXA_IRQ(x) (x)
15
16#if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx)
17#define IRQ_SSP3 PXA_IRQ(0) /* SSP3 service request */
18#define IRQ_MSL PXA_IRQ(1) /* MSL Interface interrupt */
19#define IRQ_USBH2 PXA_IRQ(2) /* USB Host interrupt 1 (OHCI) */
20#define IRQ_USBH1 PXA_IRQ(3) /* USB Host interrupt 2 (non-OHCI) */
21#define IRQ_KEYPAD PXA_IRQ(4) /* Key pad controller */
22#define IRQ_MEMSTK PXA_IRQ(5) /* Memory Stick interrupt */
23#define IRQ_PWRI2C PXA_IRQ(6) /* Power I2C interrupt */
24#endif
25
26#define IRQ_HWUART PXA_IRQ(7) /* HWUART Transmit/Receive/Error (PXA26x) */
27#define IRQ_OST_4_11 PXA_IRQ(7) /* OS timer 4-11 matches (PXA27x) */
28#define IRQ_GPIO0 PXA_IRQ(8) /* GPIO0 Edge Detect */
29#define IRQ_GPIO1 PXA_IRQ(9) /* GPIO1 Edge Detect */
30#define IRQ_GPIO_2_x PXA_IRQ(10) /* GPIO[2-x] Edge Detect */
31#define IRQ_USB PXA_IRQ(11) /* USB Service */
32#define IRQ_PMU PXA_IRQ(12) /* Performance Monitoring Unit */
33#define IRQ_I2S PXA_IRQ(13) /* I2S Interrupt */
34#define IRQ_AC97 PXA_IRQ(14) /* AC97 Interrupt */
35#define IRQ_ASSP PXA_IRQ(15) /* Audio SSP Service Request (PXA25x) */
36#define IRQ_USIM PXA_IRQ(15) /* Smart Card interface interrupt (PXA27x) */
37#define IRQ_NSSP PXA_IRQ(16) /* Network SSP Service Request (PXA25x) */
38#define IRQ_SSP2 PXA_IRQ(16) /* SSP2 interrupt (PXA27x) */
39#define IRQ_LCD PXA_IRQ(17) /* LCD Controller Service Request */
40#define IRQ_I2C PXA_IRQ(18) /* I2C Service Request */
41#define IRQ_ICP PXA_IRQ(19) /* ICP Transmit/Receive/Error */
42#define IRQ_STUART PXA_IRQ(20) /* STUART Transmit/Receive/Error */
43#define IRQ_BTUART PXA_IRQ(21) /* BTUART Transmit/Receive/Error */
44#define IRQ_FFUART PXA_IRQ(22) /* FFUART Transmit/Receive/Error*/
45#define IRQ_MMC PXA_IRQ(23) /* MMC Status/Error Detection */
46#define IRQ_SSP PXA_IRQ(24) /* SSP Service Request */
47#define IRQ_DMA PXA_IRQ(25) /* DMA Channel Service Request */
48#define IRQ_OST0 PXA_IRQ(26) /* OS Timer match 0 */
49#define IRQ_OST1 PXA_IRQ(27) /* OS Timer match 1 */
50#define IRQ_OST2 PXA_IRQ(28) /* OS Timer match 2 */
51#define IRQ_OST3 PXA_IRQ(29) /* OS Timer match 3 */
52#define IRQ_RTC1Hz PXA_IRQ(30) /* RTC HZ Clock Tick */
53#define IRQ_RTCAlrm PXA_IRQ(31) /* RTC Alarm */
54
55#if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx)
56#define IRQ_TPM PXA_IRQ(32) /* TPM interrupt */
57#define IRQ_CAMERA PXA_IRQ(33) /* Camera Interface */
58#endif
59
60#ifdef CONFIG_PXA3xx
61#define IRQ_SSP4 PXA_IRQ(13) /* SSP4 service request */
62#define IRQ_CIR PXA_IRQ(34) /* Consumer IR */
63#define IRQ_TSI PXA_IRQ(36) /* Touch Screen Interface (PXA320) */
64#define IRQ_USIM2 PXA_IRQ(38) /* USIM2 Controller */
65#define IRQ_GRPHICS PXA_IRQ(39) /* Graphics Controller */
66#define IRQ_MMC2 PXA_IRQ(41) /* MMC2 Controller */
67#define IRQ_1WIRE PXA_IRQ(44) /* 1-Wire Controller */
68#define IRQ_NAND PXA_IRQ(45) /* NAND Controller */
69#define IRQ_USB2 PXA_IRQ(46) /* USB 2.0 Device Controller */
70#define IRQ_WAKEUP0 PXA_IRQ(49) /* EXT_WAKEUP0 */
71#define IRQ_WAKEUP1 PXA_IRQ(50) /* EXT_WAKEUP1 */
72#define IRQ_DMEMC PXA_IRQ(51) /* Dynamic Memory Controller */
73#define IRQ_MMC3 PXA_IRQ(55) /* MMC3 Controller (PXA310) */
74#endif
75
76#define PXA_GPIO_IRQ_BASE (64)
77#define PXA_GPIO_IRQ_NUM (128)
78
79#define GPIO_2_x_TO_IRQ(x) (PXA_GPIO_IRQ_BASE + (x))
80#define IRQ_GPIO(x) (((x) < 2) ? (IRQ_GPIO0 + (x)) : GPIO_2_x_TO_IRQ(x))
81
82#define IRQ_TO_GPIO_2_x(i) ((i) - PXA_GPIO_IRQ_BASE)
83#define IRQ_TO_GPIO(i) (((i) < IRQ_GPIO(2)) ? ((i) - IRQ_GPIO0) : IRQ_TO_GPIO_2_x(i))
84
85/*
86 * The next 16 interrupts are for board specific purposes. Since
87 * the kernel can only run on one machine at a time, we can re-use
88 * these. If you need more, increase IRQ_BOARD_END, but keep it
89 * within sensible limits.
90 */
91#define IRQ_BOARD_START (PXA_GPIO_IRQ_BASE + PXA_GPIO_IRQ_NUM)
92#define IRQ_BOARD_END (IRQ_BOARD_START + 16)
93
94#define IRQ_SA1111_START (IRQ_BOARD_END)
95#define IRQ_GPAIN0 (IRQ_BOARD_END + 0)
96#define IRQ_GPAIN1 (IRQ_BOARD_END + 1)
97#define IRQ_GPAIN2 (IRQ_BOARD_END + 2)
98#define IRQ_GPAIN3 (IRQ_BOARD_END + 3)
99#define IRQ_GPBIN0 (IRQ_BOARD_END + 4)
100#define IRQ_GPBIN1 (IRQ_BOARD_END + 5)
101#define IRQ_GPBIN2 (IRQ_BOARD_END + 6)
102#define IRQ_GPBIN3 (IRQ_BOARD_END + 7)
103#define IRQ_GPBIN4 (IRQ_BOARD_END + 8)
104#define IRQ_GPBIN5 (IRQ_BOARD_END + 9)
105#define IRQ_GPCIN0 (IRQ_BOARD_END + 10)
106#define IRQ_GPCIN1 (IRQ_BOARD_END + 11)
107#define IRQ_GPCIN2 (IRQ_BOARD_END + 12)
108#define IRQ_GPCIN3 (IRQ_BOARD_END + 13)
109#define IRQ_GPCIN4 (IRQ_BOARD_END + 14)
110#define IRQ_GPCIN5 (IRQ_BOARD_END + 15)
111#define IRQ_GPCIN6 (IRQ_BOARD_END + 16)
112#define IRQ_GPCIN7 (IRQ_BOARD_END + 17)
113#define IRQ_MSTXINT (IRQ_BOARD_END + 18)
114#define IRQ_MSRXINT (IRQ_BOARD_END + 19)
115#define IRQ_MSSTOPERRINT (IRQ_BOARD_END + 20)
116#define IRQ_TPTXINT (IRQ_BOARD_END + 21)
117#define IRQ_TPRXINT (IRQ_BOARD_END + 22)
118#define IRQ_TPSTOPERRINT (IRQ_BOARD_END + 23)
119#define SSPXMTINT (IRQ_BOARD_END + 24)
120#define SSPRCVINT (IRQ_BOARD_END + 25)
121#define SSPROR (IRQ_BOARD_END + 26)
122#define AUDXMTDMADONEA (IRQ_BOARD_END + 32)
123#define AUDRCVDMADONEA (IRQ_BOARD_END + 33)
124#define AUDXMTDMADONEB (IRQ_BOARD_END + 34)
125#define AUDRCVDMADONEB (IRQ_BOARD_END + 35)
126#define AUDTFSR (IRQ_BOARD_END + 36)
127#define AUDRFSR (IRQ_BOARD_END + 37)
128#define AUDTUR (IRQ_BOARD_END + 38)
129#define AUDROR (IRQ_BOARD_END + 39)
130#define AUDDTS (IRQ_BOARD_END + 40)
131#define AUDRDD (IRQ_BOARD_END + 41)
132#define AUDSTO (IRQ_BOARD_END + 42)
133#define IRQ_USBPWR (IRQ_BOARD_END + 43)
134#define IRQ_HCIM (IRQ_BOARD_END + 44)
135#define IRQ_HCIBUFFACC (IRQ_BOARD_END + 45)
136#define IRQ_HCIRMTWKP (IRQ_BOARD_END + 46)
137#define IRQ_NHCIMFCIR (IRQ_BOARD_END + 47)
138#define IRQ_USB_PORT_RESUME (IRQ_BOARD_END + 48)
139#define IRQ_S0_READY_NINT (IRQ_BOARD_END + 49)
140#define IRQ_S1_READY_NINT (IRQ_BOARD_END + 50)
141#define IRQ_S0_CD_VALID (IRQ_BOARD_END + 51)
142#define IRQ_S1_CD_VALID (IRQ_BOARD_END + 52)
143#define IRQ_S0_BVD1_STSCHG (IRQ_BOARD_END + 53)
144#define IRQ_S1_BVD1_STSCHG (IRQ_BOARD_END + 54)
145
146#define IRQ_LOCOMO_START (IRQ_BOARD_END)
147#define IRQ_LOCOMO_KEY (IRQ_BOARD_END + 0)
148#define IRQ_LOCOMO_GPIO0 (IRQ_BOARD_END + 1)
149#define IRQ_LOCOMO_GPIO1 (IRQ_BOARD_END + 2)
150#define IRQ_LOCOMO_GPIO2 (IRQ_BOARD_END + 3)
151#define IRQ_LOCOMO_GPIO3 (IRQ_BOARD_END + 4)
152#define IRQ_LOCOMO_GPIO4 (IRQ_BOARD_END + 5)
153#define IRQ_LOCOMO_GPIO5 (IRQ_BOARD_END + 6)
154#define IRQ_LOCOMO_GPIO6 (IRQ_BOARD_END + 7)
155#define IRQ_LOCOMO_GPIO7 (IRQ_BOARD_END + 8)
156#define IRQ_LOCOMO_GPIO8 (IRQ_BOARD_END + 9)
157#define IRQ_LOCOMO_GPIO9 (IRQ_BOARD_END + 10)
158#define IRQ_LOCOMO_GPIO10 (IRQ_BOARD_END + 11)
159#define IRQ_LOCOMO_GPIO11 (IRQ_BOARD_END + 12)
160#define IRQ_LOCOMO_GPIO12 (IRQ_BOARD_END + 13)
161#define IRQ_LOCOMO_GPIO13 (IRQ_BOARD_END + 14)
162#define IRQ_LOCOMO_GPIO14 (IRQ_BOARD_END + 15)
163#define IRQ_LOCOMO_GPIO15 (IRQ_BOARD_END + 16)
164#define IRQ_LOCOMO_LT (IRQ_BOARD_END + 17)
165#define IRQ_LOCOMO_SPI_RFR (IRQ_BOARD_END + 18)
166#define IRQ_LOCOMO_SPI_RFW (IRQ_BOARD_END + 19)
167#define IRQ_LOCOMO_SPI_OVRN (IRQ_BOARD_END + 20)
168#define IRQ_LOCOMO_SPI_TEND (IRQ_BOARD_END + 21)
169
170/*
171 * Figure out the MAX IRQ number.
172 *
173 * If we have an SA1111, the max IRQ is S1_BVD1_STSCHG+1.
174 * If we have an LoCoMo, the max IRQ is IRQ_LOCOMO_SPI_TEND+1
175 * Otherwise, we have the standard IRQs only.
176 */
177#ifdef CONFIG_SA1111
178#define NR_IRQS (IRQ_S1_BVD1_STSCHG + 1)
179#elif defined(CONFIG_SHARP_LOCOMO)
180#define NR_IRQS (IRQ_LOCOMO_SPI_TEND + 1)
181#elif defined(CONFIG_ARCH_LUBBOCK) || \
182 defined(CONFIG_MACH_LOGICPD_PXA270) || \
183 defined(CONFIG_MACH_TOSA) || \
184 defined(CONFIG_MACH_MAINSTONE) || \
185 defined(CONFIG_MACH_PCM027) || \
186 defined(CONFIG_MACH_MAGICIAN)
187#define NR_IRQS (IRQ_BOARD_END)
188#elif defined(CONFIG_MACH_ZYLONITE)
189#define NR_IRQS (IRQ_BOARD_START + 32)
190#else
191#define NR_IRQS (IRQ_BOARD_START)
192#endif
193
194/*
195 * Board specific IRQs. Define them here.
196 * Do not surround them with ifdefs.
197 */
198#define LUBBOCK_IRQ(x) (IRQ_BOARD_START + (x))
199#define LUBBOCK_SD_IRQ LUBBOCK_IRQ(0)
200#define LUBBOCK_SA1111_IRQ LUBBOCK_IRQ(1)
201#define LUBBOCK_USB_IRQ LUBBOCK_IRQ(2) /* usb connect */
202#define LUBBOCK_ETH_IRQ LUBBOCK_IRQ(3)
203#define LUBBOCK_UCB1400_IRQ LUBBOCK_IRQ(4)
204#define LUBBOCK_BB_IRQ LUBBOCK_IRQ(5)
205#define LUBBOCK_USB_DISC_IRQ LUBBOCK_IRQ(6) /* usb disconnect */
206#define LUBBOCK_LAST_IRQ LUBBOCK_IRQ(6)
207
208#define LPD270_IRQ(x) (IRQ_BOARD_START + (x))
209#define LPD270_USBC_IRQ LPD270_IRQ(2)
210#define LPD270_ETHERNET_IRQ LPD270_IRQ(3)
211#define LPD270_AC97_IRQ LPD270_IRQ(4)
212
213#define MAINSTONE_IRQ(x) (IRQ_BOARD_START + (x))
214#define MAINSTONE_MMC_IRQ MAINSTONE_IRQ(0)
215#define MAINSTONE_USIM_IRQ MAINSTONE_IRQ(1)
216#define MAINSTONE_USBC_IRQ MAINSTONE_IRQ(2)
217#define MAINSTONE_ETHERNET_IRQ MAINSTONE_IRQ(3)
218#define MAINSTONE_AC97_IRQ MAINSTONE_IRQ(4)
219#define MAINSTONE_PEN_IRQ MAINSTONE_IRQ(5)
220#define MAINSTONE_MSINS_IRQ MAINSTONE_IRQ(6)
221#define MAINSTONE_EXBRD_IRQ MAINSTONE_IRQ(7)
222#define MAINSTONE_S0_CD_IRQ MAINSTONE_IRQ(9)
223#define MAINSTONE_S0_STSCHG_IRQ MAINSTONE_IRQ(10)
224#define MAINSTONE_S0_IRQ MAINSTONE_IRQ(11)
225#define MAINSTONE_S1_CD_IRQ MAINSTONE_IRQ(13)
226#define MAINSTONE_S1_STSCHG_IRQ MAINSTONE_IRQ(14)
227#define MAINSTONE_S1_IRQ MAINSTONE_IRQ(15)
228
229/* LoCoMo Interrupts (CONFIG_SHARP_LOCOMO) */
230#define IRQ_LOCOMO_KEY_BASE (IRQ_BOARD_START + 0)
231#define IRQ_LOCOMO_GPIO_BASE (IRQ_BOARD_START + 1)
232#define IRQ_LOCOMO_LT_BASE (IRQ_BOARD_START + 2)
233#define IRQ_LOCOMO_SPI_BASE (IRQ_BOARD_START + 3)
234
235/* phyCORE-PXA270 (PCM027) Interrupts */
236#define PCM027_IRQ(x) (IRQ_BOARD_START + (x))
237#define PCM027_BTDET_IRQ PCM027_IRQ(0)
238#define PCM027_FF_RI_IRQ PCM027_IRQ(1)
239#define PCM027_MMCDET_IRQ PCM027_IRQ(2)
240#define PCM027_PM_5V_IRQ PCM027_IRQ(3)
241
242/* ITE8152 irqs */
243/* add IT8152 IRQs beyond BOARD_END */
244#ifdef CONFIG_PCI_HOST_ITE8152
245#define IT8152_IRQ(x) (IRQ_BOARD_END + (x))
246
247/* IRQ-sources in 3 groups - local devices, LPC (serial), and external PCI */
248#define IT8152_LD_IRQ_COUNT 9
249#define IT8152_LP_IRQ_COUNT 16
250#define IT8152_PD_IRQ_COUNT 15
251
252/* Priorities: */
253#define IT8152_PD_IRQ(i) IT8152_IRQ(i)
254#define IT8152_LP_IRQ(i) (IT8152_IRQ(i) + IT8152_PD_IRQ_COUNT)
255#define IT8152_LD_IRQ(i) (IT8152_IRQ(i) + IT8152_PD_IRQ_COUNT + IT8152_LP_IRQ_COUNT)
256
257#define IT8152_LAST_IRQ IT8152_LD_IRQ(IT8152_LD_IRQ_COUNT - 1)
258
259#if NR_IRQS < (IT8152_LAST_IRQ+1)
260#undef NR_IRQS
261#define NR_IRQS (IT8152_LAST_IRQ+1)
262#endif
263
264#endif /* CONFIG_PCI_HOST_ITE8152 */
diff --git a/include/asm-arm/arch-pxa/lpd270.h b/include/asm-arm/arch-pxa/lpd270.h
deleted file mode 100644
index 501d240ac120..000000000000
--- a/include/asm-arm/arch-pxa/lpd270.h
+++ /dev/null
@@ -1,38 +0,0 @@
1/*
2 * include/asm-arm/arch-pxa/lpd270.h
3 *
4 * Author: Lennert Buytenhek
5 * Created: Feb 10, 2006
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 */
11
12#ifndef __ASM_ARCH_LPD270_H
13#define __ASM_ARCH_LPD270_H
14
15#define LPD270_CPLD_PHYS PXA_CS2_PHYS
16#define LPD270_CPLD_VIRT 0xf0000000
17#define LPD270_CPLD_SIZE 0x00100000
18
19#define LPD270_ETH_PHYS (PXA_CS2_PHYS + 0x01000000)
20
21/* CPLD registers */
22#define LPD270_CPLD_REG(x) ((unsigned long)(LPD270_CPLD_VIRT + (x)))
23#define LPD270_CONTROL LPD270_CPLD_REG(0x00)
24#define LPD270_PERIPHERAL0 LPD270_CPLD_REG(0x04)
25#define LPD270_PERIPHERAL1 LPD270_CPLD_REG(0x08)
26#define LPD270_CPLD_REVISION LPD270_CPLD_REG(0x14)
27#define LPD270_EEPROM_SPI_ITF LPD270_CPLD_REG(0x20)
28#define LPD270_MODE_PINS LPD270_CPLD_REG(0x24)
29#define LPD270_EGPIO LPD270_CPLD_REG(0x30)
30#define LPD270_INT_MASK LPD270_CPLD_REG(0x40)
31#define LPD270_INT_STATUS LPD270_CPLD_REG(0x50)
32
33#define LPD270_INT_AC97 (1 << 4) /* AC'97 CODEC IRQ */
34#define LPD270_INT_ETHERNET (1 << 3) /* Ethernet controller IRQ */
35#define LPD270_INT_USBC (1 << 2) /* USB client cable detection IRQ */
36
37
38#endif
diff --git a/include/asm-arm/arch-pxa/lubbock.h b/include/asm-arm/arch-pxa/lubbock.h
deleted file mode 100644
index 11ee73593fc3..000000000000
--- a/include/asm-arm/arch-pxa/lubbock.h
+++ /dev/null
@@ -1,40 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-pxa/lubbock.h
3 *
4 * Author: Nicolas Pitre
5 * Created: Jun 15, 2001
6 * Copyright: MontaVista Software Inc.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 */
12
13#define LUBBOCK_ETH_PHYS PXA_CS3_PHYS
14
15#define LUBBOCK_FPGA_PHYS PXA_CS2_PHYS
16#define LUBBOCK_FPGA_VIRT (0xf0000000)
17#define LUB_P2V(x) ((x) - LUBBOCK_FPGA_PHYS + LUBBOCK_FPGA_VIRT)
18#define LUB_V2P(x) ((x) - LUBBOCK_FPGA_VIRT + LUBBOCK_FPGA_PHYS)
19
20#ifndef __ASSEMBLY__
21# define __LUB_REG(x) (*((volatile unsigned long *)LUB_P2V(x)))
22#else
23# define __LUB_REG(x) LUB_P2V(x)
24#endif
25
26/* FPGA register virtual addresses */
27#define LUB_WHOAMI __LUB_REG(LUBBOCK_FPGA_PHYS + 0x000)
28#define LUB_HEXLED __LUB_REG(LUBBOCK_FPGA_PHYS + 0x010)
29#define LUB_DISC_BLNK_LED __LUB_REG(LUBBOCK_FPGA_PHYS + 0x040)
30#define LUB_CONF_SWITCHES __LUB_REG(LUBBOCK_FPGA_PHYS + 0x050)
31#define LUB_USER_SWITCHES __LUB_REG(LUBBOCK_FPGA_PHYS + 0x060)
32#define LUB_MISC_WR __LUB_REG(LUBBOCK_FPGA_PHYS + 0x080)
33#define LUB_MISC_RD __LUB_REG(LUBBOCK_FPGA_PHYS + 0x090)
34#define LUB_IRQ_MASK_EN __LUB_REG(LUBBOCK_FPGA_PHYS + 0x0c0)
35#define LUB_IRQ_SET_CLR __LUB_REG(LUBBOCK_FPGA_PHYS + 0x0d0)
36#define LUB_GP __LUB_REG(LUBBOCK_FPGA_PHYS + 0x100)
37
38#ifndef __ASSEMBLY__
39extern void lubbock_set_misc_wr(unsigned int mask, unsigned int set);
40#endif
diff --git a/include/asm-arm/arch-pxa/magician.h b/include/asm-arm/arch-pxa/magician.h
deleted file mode 100644
index 169b374f9921..000000000000
--- a/include/asm-arm/arch-pxa/magician.h
+++ /dev/null
@@ -1,117 +0,0 @@
1/*
2 * GPIO and IRQ definitions for HTC Magician PDA phones
3 *
4 * Copyright (c) 2007 Philipp Zabel
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 */
11
12#ifndef _MAGICIAN_H_
13#define _MAGICIAN_H_
14
15#include <asm/arch/irqs.h>
16
17/*
18 * PXA GPIOs
19 */
20
21#define GPIO0_MAGICIAN_KEY_POWER 0
22#define GPIO9_MAGICIAN_UNKNOWN 9
23#define GPIO10_MAGICIAN_GSM_IRQ 10
24#define GPIO11_MAGICIAN_GSM_OUT1 11
25#define GPIO13_MAGICIAN_CPLD_IRQ 13
26#define GPIO18_MAGICIAN_UNKNOWN 18
27#define GPIO22_MAGICIAN_VIBRA_EN 22
28#define GPIO26_MAGICIAN_GSM_POWER 26
29#define GPIO27_MAGICIAN_USBC_PUEN 27
30#define GPIO30_MAGICIAN_nCHARGE_EN 30
31#define GPIO37_MAGICIAN_KEY_HANGUP 37
32#define GPIO38_MAGICIAN_KEY_CONTACTS 38
33#define GPIO40_MAGICIAN_GSM_OUT2 40
34#define GPIO48_MAGICIAN_UNKNOWN 48
35#define GPIO56_MAGICIAN_UNKNOWN 56
36#define GPIO57_MAGICIAN_CAM_RESET 57
37#define GPIO75_MAGICIAN_SAMSUNG_POWER 75
38#define GPIO83_MAGICIAN_nIR_EN 83
39#define GPIO86_MAGICIAN_GSM_RESET 86
40#define GPIO87_MAGICIAN_GSM_SELECT 87
41#define GPIO90_MAGICIAN_KEY_CALENDAR 90
42#define GPIO91_MAGICIAN_KEY_CAMERA 91
43#define GPIO93_MAGICIAN_KEY_UP 93
44#define GPIO94_MAGICIAN_KEY_DOWN 94
45#define GPIO95_MAGICIAN_KEY_LEFT 95
46#define GPIO96_MAGICIAN_KEY_RIGHT 96
47#define GPIO97_MAGICIAN_KEY_ENTER 97
48#define GPIO98_MAGICIAN_KEY_RECORD 98
49#define GPIO99_MAGICIAN_HEADPHONE_IN 99
50#define GPIO100_MAGICIAN_KEY_VOL_UP 100
51#define GPIO101_MAGICIAN_KEY_VOL_DOWN 101
52#define GPIO102_MAGICIAN_KEY_PHONE 102
53#define GPIO103_MAGICIAN_LED_KP 103
54#define GPIO104_MAGICIAN_LCD_POWER_1 104
55#define GPIO105_MAGICIAN_LCD_POWER_2 105
56#define GPIO106_MAGICIAN_LCD_POWER_3 106
57#define GPIO107_MAGICIAN_DS1WM_IRQ 107
58#define GPIO108_MAGICIAN_GSM_READY 108
59#define GPIO114_MAGICIAN_UNKNOWN 114
60#define GPIO115_MAGICIAN_nPEN_IRQ 115
61#define GPIO116_MAGICIAN_nCAM_EN 116
62#define GPIO119_MAGICIAN_UNKNOWN 119
63#define GPIO120_MAGICIAN_UNKNOWN 120
64
65/*
66 * CPLD IRQs
67 */
68
69#define IRQ_MAGICIAN_SD (IRQ_BOARD_START + 0)
70#define IRQ_MAGICIAN_EP (IRQ_BOARD_START + 1)
71#define IRQ_MAGICIAN_BT (IRQ_BOARD_START + 2)
72#define IRQ_MAGICIAN_AC (IRQ_BOARD_START + 3)
73
74/*
75 * CPLD EGPIOs
76 */
77
78#define MAGICIAN_EGPIO_BASE 0x80 /* GPIO_BOARD_START */
79#define MAGICIAN_EGPIO(reg,bit) \
80 (MAGICIAN_EGPIO_BASE + 8*reg + bit)
81
82/* output */
83
84#define EGPIO_MAGICIAN_TOPPOLY_POWER MAGICIAN_EGPIO(0, 2)
85#define EGPIO_MAGICIAN_LED_POWER MAGICIAN_EGPIO(0, 5)
86#define EGPIO_MAGICIAN_GSM_RESET MAGICIAN_EGPIO(0, 6)
87#define EGPIO_MAGICIAN_LCD_POWER MAGICIAN_EGPIO(0, 7)
88#define EGPIO_MAGICIAN_SPK_POWER MAGICIAN_EGPIO(1, 0)
89#define EGPIO_MAGICIAN_EP_POWER MAGICIAN_EGPIO(1, 1)
90#define EGPIO_MAGICIAN_IN_SEL0 MAGICIAN_EGPIO(1, 2)
91#define EGPIO_MAGICIAN_IN_SEL1 MAGICIAN_EGPIO(1, 3)
92#define EGPIO_MAGICIAN_MIC_POWER MAGICIAN_EGPIO(1, 4)
93#define EGPIO_MAGICIAN_CODEC_RESET MAGICIAN_EGPIO(1, 5)
94#define EGPIO_MAGICIAN_CODEC_POWER MAGICIAN_EGPIO(1, 6)
95#define EGPIO_MAGICIAN_BL_POWER MAGICIAN_EGPIO(1, 7)
96#define EGPIO_MAGICIAN_SD_POWER MAGICIAN_EGPIO(2, 0)
97#define EGPIO_MAGICIAN_CARKIT_MIC MAGICIAN_EGPIO(2, 1)
98#define EGPIO_MAGICIAN_UNKNOWN_WAVEDEV_DLL MAGICIAN_EGPIO(2, 2)
99#define EGPIO_MAGICIAN_FLASH_VPP MAGICIAN_EGPIO(2, 3)
100#define EGPIO_MAGICIAN_BL_POWER2 MAGICIAN_EGPIO(2, 4)
101#define EGPIO_MAGICIAN_CHARGE_EN MAGICIAN_EGPIO(2, 5)
102#define EGPIO_MAGICIAN_GSM_POWER MAGICIAN_EGPIO(2, 7)
103
104/* input */
105
106#define EGPIO_MAGICIAN_CABLE_STATE_AC MAGICIAN_EGPIO(4, 0)
107#define EGPIO_MAGICIAN_CABLE_STATE_USB MAGICIAN_EGPIO(4, 1)
108
109#define EGPIO_MAGICIAN_BOARD_ID0 MAGICIAN_EGPIO(5, 0)
110#define EGPIO_MAGICIAN_BOARD_ID1 MAGICIAN_EGPIO(5, 1)
111#define EGPIO_MAGICIAN_BOARD_ID2 MAGICIAN_EGPIO(5, 2)
112#define EGPIO_MAGICIAN_LCD_SELECT MAGICIAN_EGPIO(5, 3)
113#define EGPIO_MAGICIAN_nSD_READONLY MAGICIAN_EGPIO(5, 4)
114
115#define EGPIO_MAGICIAN_EP_INSERT MAGICIAN_EGPIO(6, 1)
116
117#endif /* _MAGICIAN_H_ */
diff --git a/include/asm-arm/arch-pxa/mainstone.h b/include/asm-arm/arch-pxa/mainstone.h
deleted file mode 100644
index 14c862adcaa1..000000000000
--- a/include/asm-arm/arch-pxa/mainstone.h
+++ /dev/null
@@ -1,120 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-pxa/mainstone.h
3 *
4 * Author: Nicolas Pitre
5 * Created: Nov 14, 2002
6 * Copyright: MontaVista Software Inc.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 */
12
13#ifndef ASM_ARCH_MAINSTONE_H
14#define ASM_ARCH_MAINSTONE_H
15
16#define MST_ETH_PHYS PXA_CS4_PHYS
17
18#define MST_FPGA_PHYS PXA_CS2_PHYS
19#define MST_FPGA_VIRT (0xf0000000)
20#define MST_P2V(x) ((x) - MST_FPGA_PHYS + MST_FPGA_VIRT)
21#define MST_V2P(x) ((x) - MST_FPGA_VIRT + MST_FPGA_PHYS)
22
23#ifndef __ASSEMBLY__
24# define __MST_REG(x) (*((volatile unsigned long *)MST_P2V(x)))
25#else
26# define __MST_REG(x) MST_P2V(x)
27#endif
28
29/* board level registers in the FPGA */
30
31#define MST_LEDDAT1 __MST_REG(0x08000010)
32#define MST_LEDDAT2 __MST_REG(0x08000014)
33#define MST_LEDCTRL __MST_REG(0x08000040)
34#define MST_GPSWR __MST_REG(0x08000060)
35#define MST_MSCWR1 __MST_REG(0x08000080)
36#define MST_MSCWR2 __MST_REG(0x08000084)
37#define MST_MSCWR3 __MST_REG(0x08000088)
38#define MST_MSCRD __MST_REG(0x08000090)
39#define MST_INTMSKENA __MST_REG(0x080000c0)
40#define MST_INTSETCLR __MST_REG(0x080000d0)
41#define MST_PCMCIA0 __MST_REG(0x080000e0)
42#define MST_PCMCIA1 __MST_REG(0x080000e4)
43
44#define MST_MSCWR1_CAMERA_ON (1 << 15) /* Camera interface power control */
45#define MST_MSCWR1_CAMERA_SEL (1 << 14) /* Camera interface mux control */
46#define MST_MSCWR1_LCD_CTL (1 << 13) /* General-purpose LCD control */
47#define MST_MSCWR1_MS_ON (1 << 12) /* Memory Stick power control */
48#define MST_MSCWR1_MMC_ON (1 << 11) /* MultiMediaCard* power control */
49#define MST_MSCWR1_MS_SEL (1 << 10) /* SD/MS multiplexer control */
50#define MST_MSCWR1_BB_SEL (1 << 9) /* PCMCIA/Baseband multiplexer */
51#define MST_MSCWR1_BT_ON (1 << 8) /* Bluetooth UART transceiver */
52#define MST_MSCWR1_BTDTR (1 << 7) /* Bluetooth UART DTR */
53
54#define MST_MSCWR1_IRDA_MASK (3 << 5) /* IrDA transceiver mode */
55#define MST_MSCWR1_IRDA_FULL (0 << 5) /* full distance power */
56#define MST_MSCWR1_IRDA_OFF (1 << 5) /* shutdown */
57#define MST_MSCWR1_IRDA_MED (2 << 5) /* 2/3 distance power */
58#define MST_MSCWR1_IRDA_LOW (3 << 5) /* 1/3 distance power */
59
60#define MST_MSCWR1_IRDA_FIR (1 << 4) /* IrDA transceiver SIR/FIR */
61#define MST_MSCWR1_GREENLED (1 << 3) /* LED D1 control */
62#define MST_MSCWR1_PDC_CTL (1 << 2) /* reserved */
63#define MST_MSCWR1_MTR_ON (1 << 1) /* Silent alert motor */
64#define MST_MSCWR1_SYSRESET (1 << 0) /* System reset */
65
66#define MST_MSCWR2_USB_OTG_RST (1 << 6) /* USB On The Go reset */
67#define MST_MSCWR2_USB_OTG_SEL (1 << 5) /* USB On The Go control */
68#define MST_MSCWR2_nUSBC_SC (1 << 4) /* USB client soft connect control */
69#define MST_MSCWR2_I2S_SPKROFF (1 << 3) /* I2S CODEC amplifier control */
70#define MST_MSCWR2_AC97_SPKROFF (1 << 2) /* AC97 CODEC amplifier control */
71#define MST_MSCWR2_RADIO_PWR (1 << 1) /* Radio module power control */
72#define MST_MSCWR2_RADIO_WAKE (1 << 0) /* Radio module wake-up signal */
73
74#define MST_MSCWR3_GPIO_RESET_EN (1 << 2) /* Enable GPIO Reset */
75#define MST_MSCWR3_GPIO_RESET (1 << 1) /* Initiate a GPIO Reset */
76#define MST_MSCWR3_COMMS_SW_RESET (1 << 0) /* Communications Processor Reset Control */
77
78#define MST_MSCRD_nPENIRQ (1 << 9) /* ADI7873* nPENIRQ signal */
79#define MST_MSCRD_nMEMSTK_CD (1 << 8) /* Memory Stick detection signal */
80#define MST_MSCRD_nMMC_CD (1 << 7) /* SD/MMC card detection signal */
81#define MST_MSCRD_nUSIM_CD (1 << 6) /* USIM card detection signal */
82#define MST_MSCRD_USB_CBL (1 << 5) /* USB client cable status */
83#define MST_MSCRD_TS_BUSY (1 << 4) /* ADI7873 busy */
84#define MST_MSCRD_BTDSR (1 << 3) /* Bluetooth UART DSR */
85#define MST_MSCRD_BTRI (1 << 2) /* Bluetooth UART Ring Indicator */
86#define MST_MSCRD_BTDCD (1 << 1) /* Bluetooth UART DCD */
87#define MST_MSCRD_nMMC_WP (1 << 0) /* SD/MMC write-protect status */
88
89#define MST_INT_S1_IRQ (1 << 15) /* PCMCIA socket 1 IRQ */
90#define MST_INT_S1_STSCHG (1 << 14) /* PCMCIA socket 1 status changed */
91#define MST_INT_S1_CD (1 << 13) /* PCMCIA socket 1 card detection */
92#define MST_INT_S0_IRQ (1 << 11) /* PCMCIA socket 0 IRQ */
93#define MST_INT_S0_STSCHG (1 << 10) /* PCMCIA socket 0 status changed */
94#define MST_INT_S0_CD (1 << 9) /* PCMCIA socket 0 card detection */
95#define MST_INT_nEXBRD_INT (1 << 7) /* Expansion board IRQ */
96#define MST_INT_MSINS (1 << 6) /* Memory Stick* detection */
97#define MST_INT_PENIRQ (1 << 5) /* ADI7873* touch-screen IRQ */
98#define MST_INT_AC97 (1 << 4) /* AC'97 CODEC IRQ */
99#define MST_INT_ETHERNET (1 << 3) /* Ethernet controller IRQ */
100#define MST_INT_USBC (1 << 2) /* USB client cable detection IRQ */
101#define MST_INT_USIM (1 << 1) /* USIM card detection IRQ */
102#define MST_INT_MMC (1 << 0) /* MMC/SD card detection IRQ */
103
104#define MST_PCMCIA_nIRQ (1 << 10) /* IRQ / ready signal */
105#define MST_PCMCIA_nSPKR_BVD2 (1 << 9) /* VDD sense / digital speaker */
106#define MST_PCMCIA_nSTSCHG_BVD1 (1 << 8) /* VDD sense / card status changed */
107#define MST_PCMCIA_nVS2 (1 << 7) /* VSS voltage sense */
108#define MST_PCMCIA_nVS1 (1 << 6) /* VSS voltage sense */
109#define MST_PCMCIA_nCD (1 << 5) /* Card detection signal */
110#define MST_PCMCIA_RESET (1 << 4) /* Card reset signal */
111#define MST_PCMCIA_PWR_MASK (0x000f) /* MAX1602 power-supply controls */
112
113#define MST_PCMCIA_PWR_VPP_0 0x0 /* voltage VPP = 0V */
114#define MST_PCMCIA_PWR_VPP_120 0x2 /* voltage VPP = 12V*/
115#define MST_PCMCIA_PWR_VPP_VCC 0x1 /* voltage VPP = VCC */
116#define MST_PCMCIA_PWR_VCC_0 0x0 /* voltage VCC = 0V */
117#define MST_PCMCIA_PWR_VCC_33 0x8 /* voltage VCC = 3.3V */
118#define MST_PCMCIA_PWR_VCC_50 0x4 /* voltage VCC = 5.0V */
119
120#endif
diff --git a/include/asm-arm/arch-pxa/memory.h b/include/asm-arm/arch-pxa/memory.h
deleted file mode 100644
index bee81d66c184..000000000000
--- a/include/asm-arm/arch-pxa/memory.h
+++ /dev/null
@@ -1,52 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-pxa/memory.h
3 *
4 * Author: Nicolas Pitre
5 * Copyright: (C) 2001 MontaVista Software Inc.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 */
11
12#ifndef __ASM_ARCH_MEMORY_H
13#define __ASM_ARCH_MEMORY_H
14
15/*
16 * Physical DRAM offset.
17 */
18#define PHYS_OFFSET UL(0xa0000000)
19
20/*
21 * Virtual view <-> DMA view memory address translations
22 * virt_to_bus: Used to translate the virtual address to an
23 * address suitable to be passed to set_dma_addr
24 * bus_to_virt: Used to convert an address for DMA operations
25 * to an address that the kernel can use.
26 */
27#define __virt_to_bus(x) __virt_to_phys(x)
28#define __bus_to_virt(x) __phys_to_virt(x)
29
30/*
31 * The nodes are matched with the physical SDRAM banks as follows:
32 *
33 * node 0: 0xa0000000-0xa3ffffff --> 0xc0000000-0xc3ffffff
34 * node 1: 0xa4000000-0xa7ffffff --> 0xc4000000-0xc7ffffff
35 * node 2: 0xa8000000-0xabffffff --> 0xc8000000-0xcbffffff
36 * node 3: 0xac000000-0xafffffff --> 0xcc000000-0xcfffffff
37 *
38 * This needs a node mem size of 26 bits.
39 */
40#define NODE_MEM_SIZE_BITS 26
41
42#if !defined(__ASSEMBLY__) && defined(CONFIG_MACH_ARMCORE) && defined(CONFIG_PCI)
43void cmx270_pci_adjust_zones(int node, unsigned long *size,
44 unsigned long *holes);
45
46#define arch_adjust_zones(node, size, holes) \
47 cmx270_pci_adjust_zones(node, size, holes)
48
49#define ISA_DMA_THRESHOLD (PHYS_OFFSET + SZ_64M - 1)
50#endif
51
52#endif
diff --git a/include/asm-arm/arch-pxa/mfp-pxa25x.h b/include/asm-arm/arch-pxa/mfp-pxa25x.h
deleted file mode 100644
index 0499323010ba..000000000000
--- a/include/asm-arm/arch-pxa/mfp-pxa25x.h
+++ /dev/null
@@ -1,161 +0,0 @@
1#ifndef __ASM_ARCH_MFP_PXA25X_H
2#define __ASM_ARCH_MFP_PXA25X_H
3
4#include <asm/arch/mfp.h>
5#include <asm/arch/mfp-pxa2xx.h>
6
7/* GPIO */
8#define GPIO2_GPIO MFP_CFG_IN(GPIO2, AF0)
9#define GPIO3_GPIO MFP_CFG_IN(GPIO3, AF0)
10#define GPIO4_GPIO MFP_CFG_IN(GPIO4, AF0)
11#define GPIO5_GPIO MFP_CFG_IN(GPIO5, AF0)
12#define GPIO6_GPIO MFP_CFG_IN(GPIO6, AF0)
13#define GPIO7_GPIO MFP_CFG_IN(GPIO7, AF0)
14#define GPIO8_GPIO MFP_CFG_IN(GPIO8, AF0)
15
16#define GPIO1_RST MFP_CFG_IN(GPIO1, AF1)
17
18/* Crystal and Clock Signals */
19#define GPIO10_RTCCLK MFP_CFG_OUT(GPIO10, AF1, DRIVE_LOW)
20#define GPIO70_RTC_CLK MFP_CFG_OUT(GPIO70, AF1, DRIVE_LOW)
21#define GPIO7_48MHz MFP_CFG_OUT(GPIO7, AF1, DRIVE_LOW)
22#define GPIO11_3_6MHz MFP_CFG_OUT(GPIO11, AF1, DRIVE_LOW)
23#define GPIO71_3_6MHz MFP_CFG_OUT(GPIO71, AF1, DRIVE_LOW)
24#define GPIO12_32KHz MFP_CFG_OUT(GPIO12, AF1, DRIVE_LOW)
25#define GPIO72_32kHz MFP_CFG_OUT(GPIO72, AF1, DRIVE_LOW)
26
27/* SDRAM and Static Memory I/O Signals */
28#define GPIO15_nCS_1 MFP_CFG_OUT(GPIO15, AF2, DRIVE_HIGH)
29#define GPIO78_nCS_2 MFP_CFG_OUT(GPIO78, AF2, DRIVE_HIGH)
30#define GPIO79_nCS_3 MFP_CFG_OUT(GPIO79, AF2, DRIVE_HIGH)
31#define GPIO80_nCS_4 MFP_CFG_OUT(GPIO80, AF2, DRIVE_HIGH)
32#define GPIO33_nCS_5 MFP_CFG_OUT(GPIO33, AF2, DRIVE_HIGH)
33
34/* Miscellaneous I/O and DMA Signals */
35#define GPIO18_RDY MFP_CFG_IN(GPIO18, AF1)
36#define GPIO20_DREQ_0 MFP_CFG_IN(GPIO20, AF1)
37#define GPIO19_DREQ_1 MFP_CFG_IN(GPIO19, AF1)
38
39/* Alternate Bus Master Mode I/O Signals */
40#define GPIO13_MBGNT MFP_CFG_OUT(GPIO13, AF2, DRIVE_LOW)
41#define GPIO73_MBGNT MFP_CFG_OUT(GPIO73, AF1, DRIVE_LOW)
42#define GPIO14_MBREQ MFP_CFG_IN(GPIO14, AF1)
43#define GPIO66_MBREQ MFP_CFG_IN(GPIO66, AF1)
44
45/* PC CARD */
46#define GPIO52_nPCE_1 MFP_CFG_OUT(GPIO52, AF2, DRIVE_HIGH)
47#define GPIO53_nPCE_2 MFP_CFG_OUT(GPIO53, AF2, DRIVE_HIGH)
48#define GPIO55_nPREG MFP_CFG_OUT(GPIO55, AF2, DRIVE_HIGH)
49#define GPIO50_nPIOR MFP_CFG_OUT(GPIO50, AF2, DRIVE_HIGH)
50#define GPIO51_nPIOW MFP_CFG_OUT(GPIO51, AF2, DRIVE_HIGH)
51#define GPIO49_nPWE MFP_CFG_OUT(GPIO49, AF2, DRIVE_HIGH)
52#define GPIO48_nPOE MFP_CFG_OUT(GPIO48, AF2, DRIVE_HIGH)
53#define GPIO57_nIOIS16 MFP_CFG_IN(GPIO57, AF1)
54#define GPIO56_nPWAIT MFP_CFG_IN(GPIO56, AF1)
55#define GPIO54_nPSKTSEL MFP_CFG_OUT(GPIO54, AF2, DRIVE_HIGH)
56
57/* FFUART */
58#define GPIO34_FFUART_RXD MFP_CFG_IN(GPIO34, AF1)
59#define GPIO35_FFUART_CTS MFP_CFG_IN(GPIO35, AF1)
60#define GPIO36_FFUART_DCD MFP_CFG_IN(GPIO36, AF1)
61#define GPIO37_FFUART_DSR MFP_CFG_IN(GPIO37, AF1)
62#define GPIO38_FFUART_RI MFP_CFG_IN(GPIO38, AF1)
63#define GPIO39_FFUART_TXD MFP_CFG_OUT(GPIO39, AF2, DRIVE_HIGH)
64#define GPIO40_FFUART_DTR MFP_CFG_OUT(GPIO40, AF2, DRIVE_HIGH)
65#define GPIO41_FFUART_RTS MFP_CFG_OUT(GPIO41, AF2, DRIVE_HIGH)
66
67/* BTUART */
68#define GPIO42_BTUART_RXD MFP_CFG_IN(GPIO42, AF1)
69#define GPIO43_BTUART_TXD MFP_CFG_OUT(GPIO43, AF2, DRIVE_HIGH)
70#define GPIO44_BTUART_CTS MFP_CFG_IN(GPIO44, AF1)
71#define GPIO45_BTUART_RTS MFP_CFG_OUT(GPIO45, AF2, DRIVE_HIGH)
72
73/* STUART */
74#define GPIO46_STUART_RXD MFP_CFG_IN(GPIO46, AF2)
75#define GPIO47_STUART_TXD MFP_CFG_OUT(GPIO47, AF1, DRIVE_HIGH)
76
77/* HWUART */
78#define GPIO42_HWUART_RXD MFP_CFG_IN(GPIO42, AF3)
79#define GPIO43_HWUART_TXD MFP_CFG_OUT(GPIO43, AF3, DRIVE_HIGH)
80#define GPIO44_HWUART_CTS MFP_CFG_IN(GPIO44, AF3)
81#define GPIO45_HWUART_RTS MFP_CFG_OUT(GPIO45, AF3, DRIVE_HIGH)
82#define GPIO48_HWUART_TXD MFP_CFG_OUT(GPIO48, AF1, DRIVE_HIGH)
83#define GPIO49_HWUART_RXD MFP_CFG_IN(GPIO49, AF1)
84#define GPIO50_HWUART_CTS MFP_CFG_IN(GPIO50, AF1)
85#define GPIO51_HWUART_RTS MFP_CFG_OUT(GPIO51, AF1, DRIVE_HIGH)
86
87/* FICP */
88#define GPIO46_FICP_RXD MFP_CFG_IN(GPIO46, AF1)
89#define GPIO47_FICP_TXD MFP_CFG_OUT(GPIO47, AF2, DRIVE_HIGH)
90
91/* PWM 0/1 */
92#define GPIO16_PWM0_OUT MFP_CFG_OUT(GPIO16, AF2, DRIVE_LOW)
93#define GPIO17_PWM1_OUT MFP_CFG_OUT(GPIO17, AF2, DRIVE_LOW)
94
95/* AC97 */
96#define GPIO28_AC97_BITCLK MFP_CFG_IN(GPIO28, AF1)
97#define GPIO29_AC97_SDATA_IN_0 MFP_CFG_IN(GPIO29, AF1)
98#define GPIO30_AC97_SDATA_OUT MFP_CFG_OUT(GPIO30, AF2, DRIVE_LOW)
99#define GPIO31_AC97_SYNC MFP_CFG_OUT(GPIO31, AF2, DRIVE_LOW)
100#define GPIO32_AC97_SDATA_IN_1 MFP_CFG_IN(GPIO32, AF1)
101
102/* I2S */
103#define GPIO28_I2S_BITCLK_IN MFP_CFG_IN(GPIO28, AF2)
104#define GPIO28_I2S_BITCLK_OUT MFP_CFG_OUT(GPIO28, AF1, DRIVE_LOW)
105#define GPIO29_I2S_SDATA_IN MFP_CFG_IN(GPIO29, AF2)
106#define GPIO30_I2S_SDATA_OUT MFP_CFG_OUT(GPIO30, AF1, DRIVE_LOW)
107#define GPIO31_I2S_SYNC MFP_CFG_OUT(GPIO31, AF1, DRIVE_LOW)
108#define GPIO32_I2S_SYSCLK MFP_CFG_OUT(GPIO32, AF1, DRIVE_LOW)
109
110/* SSP 1 */
111#define GPIO23_SSP1_SCLK MFP_CFG_OUT(GPIO23, AF2, DRIVE_LOW)
112#define GPIO24_SSP1_SFRM MFP_CFG_OUT(GPIO24, AF2, DRIVE_LOW)
113#define GPIO25_SSP1_TXD MFP_CFG_OUT(GPIO25, AF2, DRIVE_LOW)
114#define GPIO26_SSP1_RXD MFP_CFG_IN(GPIO26, AF1)
115#define GPIO27_SSP1_EXTCLK MFP_CFG_IN(GPIO27, AF1)
116
117/* SSP 2 - NSSP */
118#define GPIO81_SSP2_CLK_OUT MFP_CFG_OUT(GPIO81, AF1, DRIVE_LOW)
119#define GPIO81_SSP2_CLK_IN MFP_CFG_IN(GPIO81, AF1)
120#define GPIO82_SSP2_FRM_OUT MFP_CFG_OUT(GPIO82, AF1, DRIVE_LOW)
121#define GPIO82_SSP2_FRM_IN MFP_CFG_IN(GPIO82, AF1)
122#define GPIO83_SSP2_TXD MFP_CFG_OUT(GPIO83, AF1, DRIVE_LOW)
123#define GPIO83_SSP2_RXD MFP_CFG_IN(GPIO83, AF2)
124#define GPIO84_SSP2_TXD MFP_CFG_OUT(GPIO84, AF1, DRIVE_LOW)
125#define GPIO84_SSP2_RXD MFP_CFG_IN(GPIO84, AF2)
126
127/* MMC */
128#define GPIO6_MMC_CLK MFP_CFG_OUT(GPIO6, AF1, DRIVE_LOW)
129#define GPIO8_MMC_CS0 MFP_CFG_OUT(GPIO8, AF1, DRIVE_LOW)
130#define GPIO9_MMC_CS1 MFP_CFG_OUT(GPIO9, AF1, DRIVE_LOW)
131#define GPIO34_MMC_CS0 MFP_CFG_OUT(GPIO34, AF2, DRIVE_LOW)
132#define GPIO39_MMC_CS1 MFP_CFG_OUT(GPIO39, AF1, DRIVE_LOW)
133#define GPIO53_MMC_CLK MFP_CFG_OUT(GPIO53, AF1, DRIVE_LOW)
134#define GPIO54_MMC_CLK MFP_CFG_OUT(GPIO54, AF1, DRIVE_LOW)
135#define GPIO69_MMC_CLK MFP_CFG_OUT(GPIO69, AF1, DRIVE_LOW)
136#define GPIO67_MMC_CS0 MFP_CFG_OUT(GPIO67, AF1, DRIVE_LOW)
137#define GPIO68_MMC_CS1 MFP_CFG_OUT(GPIO68, AF1, DRIVE_LOW)
138
139/* LCD */
140#define GPIO58_LCD_LDD_0 MFP_CFG_OUT(GPIO58, AF2, DRIVE_LOW)
141#define GPIO59_LCD_LDD_1 MFP_CFG_OUT(GPIO59, AF2, DRIVE_LOW)
142#define GPIO60_LCD_LDD_2 MFP_CFG_OUT(GPIO60, AF2, DRIVE_LOW)
143#define GPIO61_LCD_LDD_3 MFP_CFG_OUT(GPIO61, AF2, DRIVE_LOW)
144#define GPIO62_LCD_LDD_4 MFP_CFG_OUT(GPIO62, AF2, DRIVE_LOW)
145#define GPIO63_LCD_LDD_5 MFP_CFG_OUT(GPIO63, AF2, DRIVE_LOW)
146#define GPIO64_LCD_LDD_6 MFP_CFG_OUT(GPIO64, AF2, DRIVE_LOW)
147#define GPIO65_LCD_LDD_7 MFP_CFG_OUT(GPIO65, AF2, DRIVE_LOW)
148#define GPIO66_LCD_LDD_8 MFP_CFG_OUT(GPIO66, AF2, DRIVE_LOW)
149#define GPIO67_LCD_LDD_9 MFP_CFG_OUT(GPIO67, AF2, DRIVE_LOW)
150#define GPIO68_LCD_LDD_10 MFP_CFG_OUT(GPIO68, AF2, DRIVE_LOW)
151#define GPIO69_LCD_LDD_11 MFP_CFG_OUT(GPIO69, AF2, DRIVE_LOW)
152#define GPIO70_LCD_LDD_12 MFP_CFG_OUT(GPIO70, AF2, DRIVE_LOW)
153#define GPIO71_LCD_LDD_13 MFP_CFG_OUT(GPIO71, AF2, DRIVE_LOW)
154#define GPIO72_LCD_LDD_14 MFP_CFG_OUT(GPIO72, AF2, DRIVE_LOW)
155#define GPIO73_LCD_LDD_15 MFP_CFG_OUT(GPIO73, AF2, DRIVE_LOW)
156#define GPIO74_LCD_FCLK MFP_CFG_OUT(GPIO74, AF2, DRIVE_LOW)
157#define GPIO75_LCD_LCLK MFP_CFG_OUT(GPIO75, AF2, DRIVE_LOW)
158#define GPIO76_LCD_PCLK MFP_CFG_OUT(GPIO76, AF2, DRIVE_LOW)
159#define GPIO77_LCD_ACBIAS MFP_CFG_OUT(GPIO77, AF2, DRIVE_LOW)
160
161#endif /* __ASM_ARCH_MFP_PXA25X_H */
diff --git a/include/asm-arm/arch-pxa/mfp-pxa27x.h b/include/asm-arm/arch-pxa/mfp-pxa27x.h
deleted file mode 100644
index bc73ab84167c..000000000000
--- a/include/asm-arm/arch-pxa/mfp-pxa27x.h
+++ /dev/null
@@ -1,433 +0,0 @@
1#ifndef __ASM_ARCH_MFP_PXA27X_H
2#define __ASM_ARCH_MFP_PXA27X_H
3
4/*
5 * NOTE: for those special-function bidirectional GPIOs, as described
6 * in the "PXA27x Developer's Manual" Section 24.4.2.1, only its input
7 * alternative is preserved, the direction is actually selected by the
8 * specific controller, and this should work in most cases.
9 */
10
11#include <asm/arch/mfp.h>
12#include <asm/arch/mfp-pxa2xx.h>
13
14/* GPIO */
15#define GPIO85_GPIO MFP_CFG_IN(GPIO85, AF0)
16#define GPIO86_GPIO MFP_CFG_IN(GPIO86, AF0)
17#define GPIO87_GPIO MFP_CFG_IN(GPIO87, AF0)
18#define GPIO88_GPIO MFP_CFG_IN(GPIO88, AF0)
19#define GPIO89_GPIO MFP_CFG_IN(GPIO89, AF0)
20#define GPIO90_GPIO MFP_CFG_IN(GPIO90, AF0)
21#define GPIO91_GPIO MFP_CFG_IN(GPIO91, AF0)
22#define GPIO92_GPIO MFP_CFG_IN(GPIO92, AF0)
23#define GPIO93_GPIO MFP_CFG_IN(GPIO93, AF0)
24#define GPIO94_GPIO MFP_CFG_IN(GPIO94, AF0)
25#define GPIO95_GPIO MFP_CFG_IN(GPIO95, AF0)
26#define GPIO96_GPIO MFP_CFG_IN(GPIO96, AF0)
27#define GPIO97_GPIO MFP_CFG_IN(GPIO97, AF0)
28#define GPIO98_GPIO MFP_CFG_IN(GPIO98, AF0)
29#define GPIO99_GPIO MFP_CFG_IN(GPIO99, AF0)
30#define GPIO100_GPIO MFP_CFG_IN(GPIO100, AF0)
31#define GPIO101_GPIO MFP_CFG_IN(GPIO101, AF0)
32#define GPIO102_GPIO MFP_CFG_IN(GPIO102, AF0)
33#define GPIO103_GPIO MFP_CFG_IN(GPIO103, AF0)
34#define GPIO104_GPIO MFP_CFG_IN(GPIO104, AF0)
35#define GPIO105_GPIO MFP_CFG_IN(GPIO105, AF0)
36#define GPIO106_GPIO MFP_CFG_IN(GPIO106, AF0)
37#define GPIO107_GPIO MFP_CFG_IN(GPIO107, AF0)
38#define GPIO108_GPIO MFP_CFG_IN(GPIO108, AF0)
39#define GPIO109_GPIO MFP_CFG_IN(GPIO109, AF0)
40#define GPIO110_GPIO MFP_CFG_IN(GPIO110, AF0)
41#define GPIO111_GPIO MFP_CFG_IN(GPIO111, AF0)
42#define GPIO112_GPIO MFP_CFG_IN(GPIO112, AF0)
43#define GPIO113_GPIO MFP_CFG_IN(GPIO113, AF0)
44#define GPIO114_GPIO MFP_CFG_IN(GPIO114, AF0)
45#define GPIO115_GPIO MFP_CFG_IN(GPIO115, AF0)
46#define GPIO116_GPIO MFP_CFG_IN(GPIO116, AF0)
47#define GPIO117_GPIO MFP_CFG_IN(GPIO117, AF0)
48#define GPIO118_GPIO MFP_CFG_IN(GPIO118, AF0)
49#define GPIO119_GPIO MFP_CFG_IN(GPIO119, AF0)
50#define GPIO120_GPIO MFP_CFG_IN(GPIO120, AF0)
51
52/* Crystal and Clock Signals */
53#define GPIO9_HZ_CLK MFP_CFG_OUT(GPIO9, AF1, DRIVE_LOW)
54#define GPIO10_HZ_CLK MFP_CFG_OUT(GPIO10, AF1, DRIVE_LOW)
55#define GPIO11_48_MHz MFP_CFG_OUT(GPIO11, AF3, DRIVE_LOW)
56#define GPIO12_48_MHz MFP_CFG_OUT(GPIO12, AF3, DRIVE_LOW)
57#define GPIO13_CLK_EXT MFP_CFG_IN(GPIO13, AF1)
58
59/* OS Timer Signals */
60#define GPIO11_EXT_SYNC_0 MFP_CFG_IN(GPIO11, AF1)
61#define GPIO12_EXT_SYNC_1 MFP_CFG_IN(GPIO12, AF1)
62#define GPIO9_CHOUT_0 MFP_CFG_OUT(GPIO9, AF3, DRIVE_LOW)
63#define GPIO10_CHOUT_1 MFP_CFG_OUT(GPIO10, AF3, DRIVE_LOW)
64#define GPIO11_CHOUT_0 MFP_CFG_OUT(GPIO11, AF1, DRIVE_LOW)
65#define GPIO12_CHOUT_1 MFP_CFG_OUT(GPIO12, AF1, DRIVE_LOW)
66
67/* SDRAM and Static Memory I/O Signals */
68#define GPIO20_nSDCS_2 MFP_CFG_OUT(GPIO20, AF1, DRIVE_HIGH)
69#define GPIO21_nSDCS_3 MFP_CFG_OUT(GPIO21, AF1, DRIVE_HIGH)
70#define GPIO15_nCS_1 MFP_CFG_OUT(GPIO15, AF2, DRIVE_HIGH)
71#define GPIO78_nCS_2 MFP_CFG_OUT(GPIO78, AF2, DRIVE_HIGH)
72#define GPIO79_nCS_3 MFP_CFG_OUT(GPIO79, AF2, DRIVE_HIGH)
73#define GPIO80_nCS_4 MFP_CFG_OUT(GPIO80, AF2, DRIVE_HIGH)
74#define GPIO33_nCS_5 MFP_CFG_OUT(GPIO33, AF2, DRIVE_HIGH)
75
76/* Miscellaneous I/O and DMA Signals */
77#define GPIO21_DVAL_0 MFP_CFG_OUT(GPIO21, AF2, DRIVE_HIGH)
78#define GPIO116_DVAL_0 MFP_CFG_OUT(GPIO116, AF1, DRIVE_HIGH)
79#define GPIO33_DVAL_1 MFP_CFG_OUT(GPIO33, AF1, DRIVE_HIGH)
80#define GPIO96_DVAL_1 MFP_CFG_OUT(GPIO96, AF2, DRIVE_HIGH)
81#define GPIO18_RDY MFP_CFG_IN(GPIO18, AF1)
82#define GPIO20_DREQ_0 MFP_CFG_IN(GPIO20, AF1)
83#define GPIO115_DREQ_0 MFP_CFG_IN(GPIO115, AF1)
84#define GPIO80_DREQ_1 MFP_CFG_IN(GPIO80, AF1)
85#define GPIO97_DREQ_1 MFP_CFG_IN(GPIO97, AF2)
86#define GPIO85_DREQ_2 MFP_CFG_IN(GPIO85, AF2)
87#define GPIO100_DREQ_2 MFP_CFG_IN(GPIO100, AF2)
88
89/* Alternate Bus Master Mode I/O Signals */
90#define GPIO20_MBREQ MFP_CFG_IN(GPIO20, AF2)
91#define GPIO80_MBREQ MFP_CFG_IN(GPIO80, AF2)
92#define GPIO96_MBREQ MFP_CFG_IN(GPIO96, AF2)
93#define GPIO115_MBREQ MFP_CFG_IN(GPIO115, AF3)
94#define GPIO21_MBGNT MFP_CFG_OUT(GPIO21, AF3, DRIVE_LOW)
95#define GPIO33_MBGNT MFP_CFG_OUT(GPIO33, AF3, DRIVE_LOW)
96#define GPIO97_MBGNT MFP_CFG_OUT(GPIO97, AF2, DRIVE_LOW)
97#define GPIO116_MBGNT MFP_CFG_OUT(GPIO116, AF3, DRIVE_LOW)
98
99/* PC CARD */
100#define GPIO15_nPCE_1 MFP_CFG_OUT(GPIO15, AF1, DRIVE_HIGH)
101#define GPIO85_nPCE_1 MFP_CFG_OUT(GPIO85, AF1, DRIVE_HIGH)
102#define GPIO86_nPCE_1 MFP_CFG_OUT(GPIO86, AF1, DRIVE_HIGH)
103#define GPIO102_nPCE_1 MFP_CFG_OUT(GPIO102, AF1, DRIVE_HIGH)
104#define GPIO54_nPCE_2 MFP_CFG_OUT(GPIO54, AF2, DRIVE_HIGH)
105#define GPIO78_nPCE_2 MFP_CFG_OUT(GPIO78, AF1, DRIVE_HIGH)
106#define GPIO87_nPCE_2 MFP_CFG_IN(GPIO87, AF1)
107#define GPIO55_nPREG MFP_CFG_OUT(GPIO55, AF2, DRIVE_HIGH)
108#define GPIO50_nPIOR MFP_CFG_OUT(GPIO50, AF2, DRIVE_HIGH)
109#define GPIO51_nPIOW MFP_CFG_OUT(GPIO51, AF2, DRIVE_HIGH)
110#define GPIO49_nPWE MFP_CFG_OUT(GPIO49, AF2, DRIVE_HIGH)
111#define GPIO48_nPOE MFP_CFG_OUT(GPIO48, AF2, DRIVE_HIGH)
112#define GPIO57_nIOIS16 MFP_CFG_IN(GPIO57, AF1)
113#define GPIO56_nPWAIT MFP_CFG_IN(GPIO56, AF1)
114#define GPIO79_PSKTSEL MFP_CFG_OUT(GPIO79, AF1, DRIVE_HIGH)
115#define GPIO104_PSKTSEL MFP_CFG_OUT(GPIO104, AF1, DRIVE_HIGH)
116
117/* I2C */
118#define GPIO117_I2C_SCL MFP_CFG_IN(GPIO117, AF1)
119#define GPIO118_I2C_SDA MFP_CFG_IN(GPIO118, AF1)
120
121/* FFUART */
122#define GPIO9_FFUART_CTS MFP_CFG_IN(GPIO9, AF3)
123#define GPIO26_FFUART_CTS MFP_CFG_IN(GPIO26, AF3)
124#define GPIO35_FFUART_CTS MFP_CFG_IN(GPIO35, AF1)
125#define GPIO100_FFUART_CTS MFP_CFG_IN(GPIO100, AF3)
126#define GPIO10_FFUART_DCD MFP_CFG_IN(GPIO10, AF1)
127#define GPIO36_FFUART_DCD MFP_CFG_IN(GPIO36, AF1)
128#define GPIO33_FFUART_DSR MFP_CFG_IN(GPIO33, AF2)
129#define GPIO37_FFUART_DSR MFP_CFG_IN(GPIO37, AF1)
130#define GPIO38_FFUART_RI MFP_CFG_IN(GPIO38, AF1)
131#define GPIO89_FFUART_RI MFP_CFG_IN(GPIO89, AF3)
132#define GPIO19_FFUART_RXD MFP_CFG_IN(GPIO19, AF3)
133#define GPIO33_FFUART_RXD MFP_CFG_IN(GPIO33, AF1)
134#define GPIO34_FFUART_RXD MFP_CFG_IN(GPIO34, AF1)
135#define GPIO41_FFUART_RXD MFP_CFG_IN(GPIO41, AF1)
136#define GPIO53_FFUART_RXD MFP_CFG_IN(GPIO53, AF1)
137#define GPIO85_FFUART_RXD MFP_CFG_IN(GPIO85, AF1)
138#define GPIO96_FFUART_RXD MFP_CFG_IN(GPIO96, AF3)
139#define GPIO102_FFUART_RXD MFP_CFG_IN(GPIO102, AF3)
140#define GPIO16_FFUART_TXD MFP_CFG_OUT(GPIO16, AF3, DRIVE_HIGH)
141#define GPIO37_FFUART_TXD MFP_CFG_OUT(GPIO37, AF3, DRIVE_HIGH)
142#define GPIO39_FFUART_TXD MFP_CFG_OUT(GPIO39, AF2, DRIVE_HIGH)
143#define GPIO83_FFUART_TXD MFP_CFG_OUT(GPIO83, AF2, DRIVE_HIGH)
144#define GPIO99_FFUART_TXD MFP_CFG_OUT(GPIO99, AF3, DRIVE_HIGH)
145#define GPIO27_FFUART_RTS MFP_CFG_OUT(GPIO27, AF3, DRIVE_HIGH)
146#define GPIO41_FFUART_RTS MFP_CFG_OUT(GPIO41, AF2, DRIVE_HIGH)
147#define GPIO83_FFUART_RTS MFP_CFG_OUT(GPIO83, AF3, DRIVE_HIGH)
148#define GPIO98_FFUART_RTS MFP_CFG_OUT(GPIO98, AF3, DRIVE_HIGH)
149#define GPIO40_FFUART_DTR MFP_CFG_OUT(GPIO40, AF2, DRIVE_HIGH)
150#define GPIO82_FFUART_DTR MFP_CFG_OUT(GPIO82, AF3, DRIVE_HIGH)
151
152/* BTUART */
153#define GPIO44_BTUART_CTS MFP_CFG_IN(GPIO44, AF1)
154#define GPIO42_BTUART_RXD MFP_CFG_IN(GPIO42, AF1)
155#define GPIO45_BTUART_RTS MFP_CFG_OUT(GPIO45, AF2, DRIVE_HIGH)
156#define GPIO43_BTUART_TXD MFP_CFG_OUT(GPIO43, AF2, DRIVE_HIGH)
157
158/* STUART */
159#define GPIO46_STUART_RXD MFP_CFG_IN(GPIO46, AF2)
160#define GPIO47_STUART_TXD MFP_CFG_OUT(GPIO47, AF1, DRIVE_HIGH)
161
162/* FICP */
163#define GPIO42_FICP_RXD MFP_CFG_IN(GPIO42, AF2)
164#define GPIO46_FICP_RXD MFP_CFG_IN(GPIO46, AF1)
165#define GPIO43_FICP_TXD MFP_CFG_OUT(GPIO43, AF1, DRIVE_HIGH)
166#define GPIO47_FICP_TXD MFP_CFG_OUT(GPIO47, AF2, DRIVE_HIGH)
167
168/* PWM 0/1/2/3 */
169#define GPIO11_PWM2_OUT MFP_CFG_OUT(GPIO11, AF2, DRIVE_LOW)
170#define GPIO12_PWM3_OUT MFP_CFG_OUT(GPIO12, AF2, DRIVE_LOW)
171#define GPIO16_PWM0_OUT MFP_CFG_OUT(GPIO16, AF2, DRIVE_LOW)
172#define GPIO17_PWM1_OUT MFP_CFG_OUT(GPIO17, AF2, DRIVE_LOW)
173#define GPIO38_PWM1_OUT MFP_CFG_OUT(GPIO38, AF3, DRIVE_LOW)
174#define GPIO46_PWM2_OUT MFP_CFG_OUT(GPIO46, AF2, DRIVE_LOW)
175#define GPIO47_PWM3_OUT MFP_CFG_OUT(GPIO47, AF3, DRIVE_LOW)
176#define GPIO79_PWM2_OUT MFP_CFG_OUT(GPIO79, AF3, DRIVE_LOW)
177#define GPIO80_PWM3_OUT MFP_CFG_OUT(GPIO80, AF3, DRIVE_LOW)
178#define GPIO115_PWM1_OUT MFP_CFG_OUT(GPIO115, AF3, DRIVE_LOW)
179
180/* AC97 */
181#define GPIO31_AC97_SYNC MFP_CFG_OUT(GPIO31, AF2, DRIVE_LOW)
182#define GPIO94_AC97_SYNC MFP_CFG_OUT(GPIO94, AF1, DRIVE_LOW)
183#define GPIO30_AC97_SDATA_OUT MFP_CFG_OUT(GPIO30, AF2, DRIVE_LOW)
184#define GPIO93_AC97_SDATA_OUT MFP_CFG_OUT(GPIO93, AF1, DRIVE_LOW)
185#define GPIO45_AC97_SYSCLK MFP_CFG_OUT(GPIO45, AF1, DRIVE_LOW)
186#define GPIO89_AC97_SYSCLK MFP_CFG_OUT(GPIO89, AF1, DRIVE_LOW)
187#define GPIO98_AC97_SYSCLK MFP_CFG_OUT(GPIO98, AF1, DRIVE_LOW)
188#define GPIO95_AC97_nRESET MFP_CFG_OUT(GPIO95, AF1, DRIVE_LOW)
189#define GPIO113_AC97_nRESET MFP_CFG_OUT(GPIO113, AF2, DRIVE_LOW)
190#define GPIO28_AC97_BITCLK MFP_CFG_IN(GPIO28, AF1)
191#define GPIO29_AC97_SDATA_IN_0 MFP_CFG_IN(GPIO29, AF1)
192#define GPIO116_AC97_SDATA_IN_0 MFP_CFG_IN(GPIO116, AF2)
193#define GPIO99_AC97_SDATA_IN_1 MFP_CFG_IN(GPIO99, AF2)
194
195/* I2S */
196#define GPIO28_I2S_BITCLK_IN MFP_CFG_IN(GPIO28, AF2)
197#define GPIO28_I2S_BITCLK_OUT MFP_CFG_OUT(GPIO28, AF1, DRIVE_LOW)
198#define GPIO29_I2S_SDATA_IN MFP_CFG_IN(GPIO29, AF2)
199#define GPIO30_I2S_SDATA_OUT MFP_CFG_OUT(GPIO30, AF1, DRIVE_LOW)
200#define GPIO31_I2S_SYNC MFP_CFG_OUT(GPIO31, AF1, DRIVE_LOW)
201#define GPIO113_I2S_SYSCLK MFP_CFG_OUT(GPIO113, AF1, DRIVE_LOW)
202
203/* SSP 1 */
204#define GPIO23_SSP1_SCLK MFP_CFG_OUT(GPIO23, AF2, DRIVE_LOW)
205#define GPIO29_SSP1_SCLK MFP_CFG_IN(GPIO29, AF3)
206#define GPIO27_SSP1_SYSCLK MFP_CFG_OUT(GPIO27, AF1, DRIVE_LOW)
207#define GPIO53_SSP1_SYSCLK MFP_CFG_OUT(GPIO53, AF3, DRIVE_LOW)
208#define GPIO24_SSP1_SFRM MFP_CFG_IN(GPIO24, AF2)
209#define GPIO28_SSP1_SFRM MFP_CFG_IN(GPIO28, AF3)
210#define GPIO25_SSP1_TXD MFP_CFG_OUT(GPIO25, AF2, DRIVE_LOW)
211#define GPIO57_SSP1_TXD MFP_CFG_OUT(GPIO57, AF3, DRIVE_LOW)
212#define GPIO26_SSP1_RXD MFP_CFG_IN(GPIO26, AF1)
213#define GPIO27_SSP1_SCLKEN MFP_CFG_IN(GPIO27, AF2)
214
215/* SSP 2 */
216#define GPIO19_SSP2_SCLK MFP_CFG_IN(GPIO19, AF1)
217#define GPIO22_SSP2_SCLK MFP_CFG_IN(GPIO22, AF3)
218#define GPIO29_SSP2_SCLK MFP_CFG_OUT(GPIO29, AF3, DRIVE_LOW)
219#define GPIO36_SSP2_SCLK MFP_CFG_IN(GPIO36, AF2)
220#define GPIO50_SSP2_SCLK MFP_CFG_IN(GPIO50, AF3)
221#define GPIO22_SSP2_SYSCLK MFP_CFG_OUT(GPIO22, AF2, DRIVE_LOW)
222#define GPIO14_SSP2_SFRM MFP_CFG_IN(GPIO14, AF2)
223#define GPIO37_SSP2_SFRM MFP_CFG_IN(GPIO37, AF2)
224#define GPIO87_SSP2_SFRM MFP_CFG_OUT(GPIO87, AF3, DRIVE_LOW)
225#define GPIO88_SSP2_SFRM MFP_CFG_IN(GPIO88, AF3)
226#define GPIO13_SSP2_TXD MFP_CFG_OUT(GPIO13, AF1, DRIVE_LOW)
227#define GPIO38_SSP2_TXD MFP_CFG_OUT(GPIO38, AF2, DRIVE_LOW)
228#define GPIO87_SSP2_TXD MFP_CFG_OUT(GPIO87, AF1, DRIVE_LOW)
229#define GPIO89_SSP2_TXD MFP_CFG_OUT(GPIO89, AF3, DRIVE_LOW)
230#define GPIO11_SSP2_RXD MFP_CFG_IN(GPIO11, AF2)
231#define GPIO29_SSP2_RXD MFP_CFG_OUT(GPIO29, AF1, DRIVE_LOW)
232#define GPIO40_SSP2_RXD MFP_CFG_IN(GPIO40, AF1)
233#define GPIO86_SSP2_RXD MFP_CFG_IN(GPIO86, AF1)
234#define GPIO88_SSP2_RXD MFP_CFG_IN(GPIO88, AF2)
235#define GPIO22_SSP2_EXTCLK MFP_CFG_IN(GPIO22, AF1)
236#define GPIO27_SSP2_EXTCLK MFP_CFG_IN(GPIO27, AF1)
237#define GPIO22_SSP2_SCLKEN MFP_CFG_IN(GPIO22, AF2)
238#define GPIO23_SSP2_SCLKEN MFP_CFG_IN(GPIO23, AF2)
239
240/* SSP 3 */
241#define GPIO34_SSP3_SCLK MFP_CFG_IN(GPIO34, AF3)
242#define GPIO40_SSP3_SCLK MFP_CFG_OUT(GPIO40, AF3, DRIVE_LOW)
243#define GPIO52_SSP3_SCLK MFP_CFG_IN(GPIO52, AF2)
244#define GPIO84_SSP3_SCLK MFP_CFG_IN(GPIO84, AF1)
245#define GPIO45_SSP3_SYSCLK MFP_CFG_OUT(GPIO45, AF3, DRIVE_LOW)
246#define GPIO35_SSP3_SFRM MFP_CFG_IN(GPIO35, AF3)
247#define GPIO39_SSP3_SFRM MFP_CFG_IN(GPIO39, AF3)
248#define GPIO83_SSP3_SFRM MFP_CFG_IN(GPIO83, AF1)
249#define GPIO35_SSP3_TXD MFP_CFG_OUT(GPIO35, AF3, DRIVE_LOW)
250#define GPIO38_SSP3_TXD MFP_CFG_OUT(GPIO38, AF1, DRIVE_LOW)
251#define GPIO81_SSP3_TXD MFP_CFG_OUT(GPIO81, AF1, DRIVE_LOW)
252#define GPIO41_SSP3_RXD MFP_CFG_IN(GPIO41, AF3)
253#define GPIO82_SSP3_RXD MFP_CFG_IN(GPIO82, AF1)
254#define GPIO89_SSP3_RXD MFP_CFG_IN(GPIO89, AF1)
255
256/* MMC */
257#define GPIO32_MMC_CLK MFP_CFG_OUT(GPIO32, AF2, DRIVE_LOW)
258#define GPIO92_MMC_DAT_0 MFP_CFG_IN(GPIO92, AF1)
259#define GPIO109_MMC_DAT_1 MFP_CFG_IN(GPIO109, AF1)
260#define GPIO110_MMC_DAT_2 MFP_CFG_IN(GPIO110, AF1)
261#define GPIO111_MMC_DAT_3 MFP_CFG_IN(GPIO111, AF1)
262#define GPIO112_MMC_CMD MFP_CFG_IN(GPIO112, AF1)
263
264/* LCD */
265#define GPIO58_LCD_LDD_0 MFP_CFG_OUT(GPIO58, AF2, DRIVE_LOW)
266#define GPIO59_LCD_LDD_1 MFP_CFG_OUT(GPIO59, AF2, DRIVE_LOW)
267#define GPIO60_LCD_LDD_2 MFP_CFG_OUT(GPIO60, AF2, DRIVE_LOW)
268#define GPIO61_LCD_LDD_3 MFP_CFG_OUT(GPIO61, AF2, DRIVE_LOW)
269#define GPIO62_LCD_LDD_4 MFP_CFG_OUT(GPIO62, AF2, DRIVE_LOW)
270#define GPIO63_LCD_LDD_5 MFP_CFG_OUT(GPIO63, AF2, DRIVE_LOW)
271#define GPIO64_LCD_LDD_6 MFP_CFG_OUT(GPIO64, AF2, DRIVE_LOW)
272#define GPIO65_LCD_LDD_7 MFP_CFG_OUT(GPIO65, AF2, DRIVE_LOW)
273#define GPIO66_LCD_LDD_8 MFP_CFG_OUT(GPIO66, AF2, DRIVE_LOW)
274#define GPIO67_LCD_LDD_9 MFP_CFG_OUT(GPIO67, AF2, DRIVE_LOW)
275#define GPIO68_LCD_LDD_10 MFP_CFG_OUT(GPIO68, AF2, DRIVE_LOW)
276#define GPIO69_LCD_LDD_11 MFP_CFG_OUT(GPIO69, AF2, DRIVE_LOW)
277#define GPIO70_LCD_LDD_12 MFP_CFG_OUT(GPIO70, AF2, DRIVE_LOW)
278#define GPIO71_LCD_LDD_13 MFP_CFG_OUT(GPIO71, AF2, DRIVE_LOW)
279#define GPIO72_LCD_LDD_14 MFP_CFG_OUT(GPIO72, AF2, DRIVE_LOW)
280#define GPIO73_LCD_LDD_15 MFP_CFG_OUT(GPIO73, AF2, DRIVE_LOW)
281#define GPIO86_LCD_LDD_16 MFP_CFG_OUT(GPIO86, AF2, DRIVE_LOW)
282#define GPIO87_LCD_LDD_17 MFP_CFG_OUT(GPIO87, AF2, DRIVE_LOW)
283#define GPIO74_LCD_FCLK MFP_CFG_OUT(GPIO74, AF2, DRIVE_LOW)
284#define GPIO75_LCD_LCLK MFP_CFG_OUT(GPIO75, AF2, DRIVE_LOW)
285#define GPIO76_LCD_PCLK MFP_CFG_OUT(GPIO76, AF2, DRIVE_LOW)
286#define GPIO77_LCD_BIAS MFP_CFG_OUT(GPIO77, AF2, DRIVE_LOW)
287#define GPIO14_LCD_VSYNC MFP_CFG_IN(GPIO14, AF1)
288#define GPIO19_LCD_CS MFP_CFG_OUT(GPIO19, AF2, DRIVE_LOW)
289
290/* Keypad */
291#define GPIO93_KP_DKIN_0 MFP_CFG_IN(GPIO93, AF1)
292#define GPIO94_KP_DKIN_1 MFP_CFG_IN(GPIO94, AF1)
293#define GPIO95_KP_DKIN_2 MFP_CFG_IN(GPIO95, AF1)
294#define GPIO96_KP_DKIN_3 MFP_CFG_IN(GPIO96, AF1)
295#define GPIO97_KP_DKIN_4 MFP_CFG_IN(GPIO97, AF1)
296#define GPIO98_KP_DKIN_5 MFP_CFG_IN(GPIO98, AF1)
297#define GPIO99_KP_DKIN_6 MFP_CFG_IN(GPIO99, AF1)
298#define GPIO13_KP_KDIN_7 MFP_CFG_IN(GPIO13, AF2)
299#define GPIO100_KP_MKIN_0 MFP_CFG_IN(GPIO100, AF1)
300#define GPIO101_KP_MKIN_1 MFP_CFG_IN(GPIO101, AF1)
301#define GPIO102_KP_MKIN_2 MFP_CFG_IN(GPIO102, AF1)
302#define GPIO34_KP_MKIN_3 MFP_CFG_IN(GPIO34, AF2)
303#define GPIO37_KP_MKIN_3 MFP_CFG_IN(GPIO37, AF3)
304#define GPIO97_KP_MKIN_3 MFP_CFG_IN(GPIO97, AF3)
305#define GPIO98_KP_MKIN_4 MFP_CFG_IN(GPIO98, AF3)
306#define GPIO38_KP_MKIN_4 MFP_CFG_IN(GPIO38, AF2)
307#define GPIO39_KP_MKIN_4 MFP_CFG_IN(GPIO39, AF1)
308#define GPIO16_KP_MKIN_5 MFP_CFG_IN(GPIO16, AF1)
309#define GPIO90_KP_MKIN_5 MFP_CFG_IN(GPIO90, AF1)
310#define GPIO99_KP_MKIN_5 MFP_CFG_IN(GPIO99, AF3)
311#define GPIO17_KP_MKIN_6 MFP_CFG_IN(GPIO17, AF1)
312#define GPIO91_KP_MKIN_6 MFP_CFG_IN(GPIO91, AF1)
313#define GPIO95_KP_MKIN_6 MFP_CFG_IN(GPIO95, AF3)
314#define GPIO13_KP_MKIN_7 MFP_CFG_IN(GPIO13, AF3)
315#define GPIO36_KP_MKIN_7 MFP_CFG_IN(GPIO36, AF3)
316#define GPIO103_KP_MKOUT_0 MFP_CFG_OUT(GPIO103, AF2, DRIVE_HIGH)
317#define GPIO104_KP_MKOUT_1 MFP_CFG_OUT(GPIO104, AF2, DRIVE_HIGH)
318#define GPIO105_KP_MKOUT_2 MFP_CFG_OUT(GPIO105, AF2, DRIVE_HIGH)
319#define GPIO106_KP_MKOUT_3 MFP_CFG_OUT(GPIO106, AF2, DRIVE_HIGH)
320#define GPIO107_KP_MKOUT_4 MFP_CFG_OUT(GPIO107, AF2, DRIVE_HIGH)
321#define GPIO108_KP_MKOUT_5 MFP_CFG_OUT(GPIO108, AF2, DRIVE_HIGH)
322#define GPIO35_KP_MKOUT_6 MFP_CFG_OUT(GPIO35, AF2, DRIVE_HIGH)
323#define GPIO22_KP_MKOUT_7 MFP_CFG_OUT(GPIO22, AF1, DRIVE_HIGH)
324#define GPIO40_KP_MKOUT_6 MFP_CFG_OUT(GPIO40, AF1, DRIVE_HIGH)
325#define GPIO41_KP_MKOUT_7 MFP_CFG_OUT(GPIO41, AF1, DRIVE_HIGH)
326#define GPIO96_KP_MKOUT_6 MFP_CFG_OUT(GPIO96, AF3, DRIVE_HIGH)
327
328/* USB P3 */
329#define GPIO10_USB_P3_5 MFP_CFG_IN(GPIO10, AF3)
330#define GPIO11_USB_P3_1 MFP_CFG_IN(GPIO11, AF3)
331#define GPIO30_USB_P3_2 MFP_CFG_OUT(GPIO30, AF3, DRIVE_LOW)
332#define GPIO31_USB_P3_6 MFP_CFG_OUT(GPIO31, AF3, DRIVE_LOW)
333#define GPIO56_USB_P3_4 MFP_CFG_OUT(GPIO56, AF1, DRIVE_LOW)
334#define GPIO86_USB_P3_5 MFP_CFG_IN(GPIO86, AF3)
335#define GPIO87_USB_P3_1 MFP_CFG_IN(GPIO87, AF3)
336#define GPIO90_USB_P3_5 MFP_CFG_IN(GPIO90, AF2)
337#define GPIO91_USB_P3_1 MFP_CFG_IN(GPIO91, AF2)
338#define GPIO113_USB_P3_3 MFP_CFG_IN(GPIO113, AF3)
339
340/* USB P2 */
341#define GPIO34_USB_P2_2 MFP_CFG_OUT(GPIO34, AF1, DRIVE_LOW)
342#define GPIO35_USB_P2_1 MFP_CFG_IN(GPIO35, AF2)
343#define GPIO36_USB_P2_4 MFP_CFG_OUT(GPIO36, AF1, DRIVE_LOW)
344#define GPIO37_USB_P2_8 MFP_CFG_OUT(GPIO37, AF1, DRIVE_LOW)
345#define GPIO38_USB_P2_3 MFP_CFG_IN(GPIO38, AF3)
346#define GPIO39_USB_P2_6 MFP_CFG_OUT(GPIO39, AF1, DRIVE_LOW)
347#define GPIO40_USB_P2_5 MFP_CFG_IN(GPIO40, AF3)
348#define GPIO41_USB_P2_7 MFP_CFG_IN(GPIO41, AF2)
349#define GPIO53_USB_P2_3 MFP_CFG_IN(GPIO53, AF2)
350
351/* USB Host Port 1/2 */
352#define GPIO88_USBH1_PWR MFP_CFG_IN(GPIO88, AF1)
353#define GPIO89_USBH1_PEN MFP_CFG_OUT(GPIO89, AF2, DRIVE_LOW)
354#define GPIO119_USBH2_PWR MFP_CFG_IN(GPIO119, AF1)
355#define GPIO120_USBH2_PEN MFP_CFG_OUT(GPIO120, AF2, DRIVE_LOW)
356
357/* QCI - default to Master Mode: CIF_FV/CIF_LV Direction In */
358#define GPIO115_CIF_DD_3 MFP_CFG_IN(GPIO115, AF2)
359#define GPIO116_CIF_DD_2 MFP_CFG_IN(GPIO116, AF1)
360#define GPIO12_CIF_DD_7 MFP_CFG_IN(GPIO12, AF2)
361#define GPIO17_CIF_DD_6 MFP_CFG_IN(GPIO17, AF2)
362#define GPIO23_CIF_MCLK MFP_CFG_OUT(GPIO23, AF1, DRIVE_LOW)
363#define GPIO24_CIF_FV MFP_CFG_IN(GPIO24, AF1)
364#define GPIO25_CIF_LV MFP_CFG_IN(GPIO25, AF1)
365#define GPIO26_CIF_PCLK MFP_CFG_IN(GPIO26, AF2)
366#define GPIO27_CIF_DD_0 MFP_CFG_IN(GPIO27, AF3)
367#define GPIO42_CIF_MCLK MFP_CFG_OUT(GPIO42, AF3, DRIVE_LOW)
368#define GPIO43_CIF_FV MFP_CFG_IN(GPIO43, AF3)
369#define GPIO44_CIF_LV MFP_CFG_IN(GPIO44, AF3)
370#define GPIO45_CIF_PCLK MFP_CFG_IN(GPIO45, AF3)
371#define GPIO47_CIF_DD_0 MFP_CFG_IN(GPIO47, AF1)
372#define GPIO48_CIF_DD_5 MFP_CFG_IN(GPIO48, AF1)
373#define GPIO50_CIF_DD_3 MFP_CFG_IN(GPIO50, AF1)
374#define GPIO51_CIF_DD_2 MFP_CFG_IN(GPIO51, AF1)
375#define GPIO52_CIF_DD_4 MFP_CFG_IN(GPIO52, AF1)
376#define GPIO53_CIF_MCLK MFP_CFG_OUT(GPIO53, AF2, DRIVE_LOW)
377#define GPIO54_CIF_PCLK MFP_CFG_IN(GPIO54, AF3)
378#define GPIO55_CIF_DD_1 MFP_CFG_IN(GPIO55, AF1)
379#define GPIO81_CIF_DD_0 MFP_CFG_IN(GPIO81, AF2)
380#define GPIO82_CIF_DD_5 MFP_CFG_IN(GPIO82, AF3)
381#define GPIO83_CIF_DD_4 MFP_CFG_IN(GPIO83, AF3)
382#define GPIO84_CIF_FV MFP_CFG_IN(GPIO84, AF3)
383#define GPIO85_CIF_LV MFP_CFG_IN(GPIO85, AF3)
384#define GPIO90_CIF_DD_4 MFP_CFG_IN(GPIO90, AF3)
385#define GPIO91_CIF_DD_5 MFP_CFG_IN(GPIO91, AF3)
386#define GPIO93_CIF_DD_6 MFP_CFG_IN(GPIO93, AF2)
387#define GPIO94_CIF_DD_5 MFP_CFG_IN(GPIO94, AF2)
388#define GPIO95_CIF_DD_4 MFP_CFG_IN(GPIO95, AF2)
389#define GPIO98_CIF_DD_0 MFP_CFG_IN(GPIO98, AF2)
390#define GPIO103_CIF_DD_3 MFP_CFG_IN(GPIO103, AF1)
391#define GPIO104_CIF_DD_2 MFP_CFG_IN(GPIO104, AF1)
392#define GPIO105_CIF_DD_1 MFP_CFG_IN(GPIO105, AF1)
393#define GPIO106_CIF_DD_9 MFP_CFG_IN(GPIO106, AF1)
394#define GPIO107_CIF_DD_8 MFP_CFG_IN(GPIO107, AF1)
395#define GPIO108_CIF_DD_7 MFP_CFG_IN(GPIO108, AF1)
396#define GPIO114_CIF_DD_1 MFP_CFG_IN(GPIO114, AF1)
397
398/* Universal Subscriber ID Interface */
399#define GPIO114_UVS0 MFP_CFG_OUT(GPIO114, AF2, DRIVE_LOW)
400#define GPIO115_nUVS1 MFP_CFG_OUT(GPIO115, AF2, DRIVE_LOW)
401#define GPIO116_nUVS2 MFP_CFG_OUT(GPIO116, AF2, DRIVE_LOW)
402#define GPIO14_UCLK MFP_CFG_OUT(GPIO14, AF3, DRIVE_LOW)
403#define GPIO91_UCLK MFP_CFG_OUT(GPIO91, AF2, DRIVE_LOW)
404#define GPIO19_nURST MFP_CFG_OUT(GPIO19, AF3, DRIVE_LOW)
405#define GPIO90_nURST MFP_CFG_OUT(GPIO90, AF2, DRIVE_LOW)
406#define GPIO116_UDET MFP_CFG_IN(GPIO116, AF3)
407#define GPIO114_UEN MFP_CFG_OUT(GPIO114, AF1, DRIVE_LOW)
408#define GPIO115_UEN MFP_CFG_OUT(GPIO115, AF1, DRIVE_LOW)
409
410/* Mobile Scalable Link (MSL) Interface */
411#define GPIO81_BB_OB_DAT_0 MFP_CFG_OUT(GPIO81, AF2, DRIVE_LOW)
412#define GPIO48_BB_OB_DAT_1 MFP_CFG_OUT(GPIO48, AF1, DRIVE_LOW)
413#define GPIO50_BB_OB_DAT_2 MFP_CFG_OUT(GPIO50, AF1, DRIVE_LOW)
414#define GPIO51_BB_OB_DAT_3 MFP_CFG_OUT(GPIO51, AF1, DRIVE_LOW)
415#define GPIO52_BB_OB_CLK MFP_CFG_OUT(GPIO52, AF1, DRIVE_LOW)
416#define GPIO53_BB_OB_STB MFP_CFG_OUT(GPIO53, AF1, DRIVE_LOW)
417#define GPIO54_BB_OB_WAIT MFP_CFG_IN(GPIO54, AF2)
418#define GPIO82_BB_IB_DAT_0 MFP_CFG_IN(GPIO82, AF2)
419#define GPIO55_BB_IB_DAT_1 MFP_CFG_IN(GPIO55, AF2)
420#define GPIO56_BB_IB_DAT_2 MFP_CFG_IN(GPIO56, AF2)
421#define GPIO57_BB_IB_DAT_3 MFP_CFG_IN(GPIO57, AF2)
422#define GPIO83_BB_IB_CLK MFP_CFG_IN(GPIO83, AF2)
423#define GPIO84_BB_IB_STB MFP_CFG_IN(GPIO84, AF2)
424#define GPIO85_BB_IB_WAIT MFP_CFG_OUT(GPIO85, AF2, DRIVE_LOW)
425
426/* Memory Stick Host Controller */
427#define GPIO92_MSBS MFP_CFG_OUT(GPIO92, AF2, DRIVE_LOW)
428#define GPIO109_MSSDIO MFP_CFG_IN(GPIO109, AF2)
429#define GPIO112_nMSINS MFP_CFG_IN(GPIO112, AF2)
430#define GPIO32_MSSCLK MFP_CFG_OUT(GPIO32, AF1, DRIVE_LOW)
431
432extern int keypad_set_wake(unsigned int on);
433#endif /* __ASM_ARCH_MFP_PXA27X_H */
diff --git a/include/asm-arm/arch-pxa/mfp-pxa2xx.h b/include/asm-arm/arch-pxa/mfp-pxa2xx.h
deleted file mode 100644
index 8de1c0dae624..000000000000
--- a/include/asm-arm/arch-pxa/mfp-pxa2xx.h
+++ /dev/null
@@ -1,133 +0,0 @@
1#ifndef __ASM_ARCH_MFP_PXA2XX_H
2#define __ASM_ARCH_MFP_PXA2XX_H
3
4#include <asm/arch/mfp.h>
5
6/*
7 * the following MFP_xxx bit definitions in mfp.h are re-used for pxa2xx:
8 *
9 * MFP_PIN(x)
10 * MFP_AFx
11 * MFP_LPM_DRIVE_{LOW, HIGH}
12 * MFP_LPM_EDGE_x
13 *
14 * other MFP_x bit definitions will be ignored
15 *
16 * and adds the below two bits specifically for pxa2xx:
17 *
18 * bit 23 - Input/Output (PXA2xx specific)
19 * bit 24 - Wakeup Enable(PXA2xx specific)
20 */
21
22#define MFP_DIR_IN (0x0 << 23)
23#define MFP_DIR_OUT (0x1 << 23)
24#define MFP_DIR_MASK (0x1 << 23)
25#define MFP_DIR(x) (((x) >> 23) & 0x1)
26
27#define MFP_LPM_CAN_WAKEUP (0x1 << 24)
28#define WAKEUP_ON_EDGE_RISE (MFP_LPM_CAN_WAKEUP | MFP_LPM_EDGE_RISE)
29#define WAKEUP_ON_EDGE_FALL (MFP_LPM_CAN_WAKEUP | MFP_LPM_EDGE_FALL)
30#define WAKEUP_ON_EDGE_BOTH (MFP_LPM_CAN_WAKEUP | MFP_LPM_EDGE_BOTH)
31
32/* specifically for enabling wakeup on keypad GPIOs */
33#define WAKEUP_ON_LEVEL_HIGH (MFP_LPM_CAN_WAKEUP)
34
35#define MFP_CFG_IN(pin, af) \
36 ((MFP_CFG_DEFAULT & ~(MFP_AF_MASK | MFP_DIR_MASK)) |\
37 (MFP_PIN(MFP_PIN_##pin) | MFP_##af | MFP_DIR_IN))
38
39/* NOTE: pins configured as output _must_ provide a low power state,
40 * and this state should help to minimize the power dissipation.
41 */
42#define MFP_CFG_OUT(pin, af, state) \
43 ((MFP_CFG_DEFAULT & ~(MFP_AF_MASK | MFP_DIR_MASK | MFP_LPM_STATE_MASK)) |\
44 (MFP_PIN(MFP_PIN_##pin) | MFP_##af | MFP_DIR_OUT | MFP_LPM_##state))
45
46/* Common configurations for pxa25x and pxa27x
47 *
48 * Note: pins configured as GPIO are always initialized to input
49 * so not to cause any side effect
50 */
51#define GPIO0_GPIO MFP_CFG_IN(GPIO0, AF0)
52#define GPIO1_GPIO MFP_CFG_IN(GPIO1, AF0)
53#define GPIO9_GPIO MFP_CFG_IN(GPIO9, AF0)
54#define GPIO10_GPIO MFP_CFG_IN(GPIO10, AF0)
55#define GPIO11_GPIO MFP_CFG_IN(GPIO11, AF0)
56#define GPIO12_GPIO MFP_CFG_IN(GPIO12, AF0)
57#define GPIO13_GPIO MFP_CFG_IN(GPIO13, AF0)
58#define GPIO14_GPIO MFP_CFG_IN(GPIO14, AF0)
59#define GPIO15_GPIO MFP_CFG_IN(GPIO15, AF0)
60#define GPIO16_GPIO MFP_CFG_IN(GPIO16, AF0)
61#define GPIO17_GPIO MFP_CFG_IN(GPIO17, AF0)
62#define GPIO18_GPIO MFP_CFG_IN(GPIO18, AF0)
63#define GPIO19_GPIO MFP_CFG_IN(GPIO19, AF0)
64#define GPIO20_GPIO MFP_CFG_IN(GPIO20, AF0)
65#define GPIO21_GPIO MFP_CFG_IN(GPIO21, AF0)
66#define GPIO22_GPIO MFP_CFG_IN(GPIO22, AF0)
67#define GPIO23_GPIO MFP_CFG_IN(GPIO23, AF0)
68#define GPIO24_GPIO MFP_CFG_IN(GPIO24, AF0)
69#define GPIO25_GPIO MFP_CFG_IN(GPIO25, AF0)
70#define GPIO26_GPIO MFP_CFG_IN(GPIO26, AF0)
71#define GPIO27_GPIO MFP_CFG_IN(GPIO27, AF0)
72#define GPIO28_GPIO MFP_CFG_IN(GPIO28, AF0)
73#define GPIO29_GPIO MFP_CFG_IN(GPIO29, AF0)
74#define GPIO30_GPIO MFP_CFG_IN(GPIO30, AF0)
75#define GPIO31_GPIO MFP_CFG_IN(GPIO31, AF0)
76#define GPIO32_GPIO MFP_CFG_IN(GPIO32, AF0)
77#define GPIO33_GPIO MFP_CFG_IN(GPIO33, AF0)
78#define GPIO34_GPIO MFP_CFG_IN(GPIO34, AF0)
79#define GPIO35_GPIO MFP_CFG_IN(GPIO35, AF0)
80#define GPIO36_GPIO MFP_CFG_IN(GPIO36, AF0)
81#define GPIO37_GPIO MFP_CFG_IN(GPIO37, AF0)
82#define GPIO38_GPIO MFP_CFG_IN(GPIO38, AF0)
83#define GPIO39_GPIO MFP_CFG_IN(GPIO39, AF0)
84#define GPIO40_GPIO MFP_CFG_IN(GPIO40, AF0)
85#define GPIO41_GPIO MFP_CFG_IN(GPIO41, AF0)
86#define GPIO42_GPIO MFP_CFG_IN(GPIO42, AF0)
87#define GPIO43_GPIO MFP_CFG_IN(GPIO43, AF0)
88#define GPIO44_GPIO MFP_CFG_IN(GPIO44, AF0)
89#define GPIO45_GPIO MFP_CFG_IN(GPIO45, AF0)
90#define GPIO46_GPIO MFP_CFG_IN(GPIO46, AF0)
91#define GPIO47_GPIO MFP_CFG_IN(GPIO47, AF0)
92#define GPIO48_GPIO MFP_CFG_IN(GPIO48, AF0)
93#define GPIO49_GPIO MFP_CFG_IN(GPIO49, AF0)
94#define GPIO50_GPIO MFP_CFG_IN(GPIO50, AF0)
95#define GPIO51_GPIO MFP_CFG_IN(GPIO51, AF0)
96#define GPIO52_GPIO MFP_CFG_IN(GPIO52, AF0)
97#define GPIO53_GPIO MFP_CFG_IN(GPIO53, AF0)
98#define GPIO54_GPIO MFP_CFG_IN(GPIO54, AF0)
99#define GPIO55_GPIO MFP_CFG_IN(GPIO55, AF0)
100#define GPIO56_GPIO MFP_CFG_IN(GPIO56, AF0)
101#define GPIO57_GPIO MFP_CFG_IN(GPIO57, AF0)
102#define GPIO58_GPIO MFP_CFG_IN(GPIO58, AF0)
103#define GPIO59_GPIO MFP_CFG_IN(GPIO59, AF0)
104#define GPIO60_GPIO MFP_CFG_IN(GPIO60, AF0)
105#define GPIO61_GPIO MFP_CFG_IN(GPIO61, AF0)
106#define GPIO62_GPIO MFP_CFG_IN(GPIO62, AF0)
107#define GPIO63_GPIO MFP_CFG_IN(GPIO63, AF0)
108#define GPIO64_GPIO MFP_CFG_IN(GPIO64, AF0)
109#define GPIO65_GPIO MFP_CFG_IN(GPIO65, AF0)
110#define GPIO66_GPIO MFP_CFG_IN(GPIO66, AF0)
111#define GPIO67_GPIO MFP_CFG_IN(GPIO67, AF0)
112#define GPIO68_GPIO MFP_CFG_IN(GPIO68, AF0)
113#define GPIO69_GPIO MFP_CFG_IN(GPIO69, AF0)
114#define GPIO70_GPIO MFP_CFG_IN(GPIO70, AF0)
115#define GPIO71_GPIO MFP_CFG_IN(GPIO71, AF0)
116#define GPIO72_GPIO MFP_CFG_IN(GPIO72, AF0)
117#define GPIO73_GPIO MFP_CFG_IN(GPIO73, AF0)
118#define GPIO74_GPIO MFP_CFG_IN(GPIO74, AF0)
119#define GPIO75_GPIO MFP_CFG_IN(GPIO75, AF0)
120#define GPIO76_GPIO MFP_CFG_IN(GPIO76, AF0)
121#define GPIO77_GPIO MFP_CFG_IN(GPIO77, AF0)
122#define GPIO78_GPIO MFP_CFG_IN(GPIO78, AF0)
123#define GPIO79_GPIO MFP_CFG_IN(GPIO79, AF0)
124#define GPIO80_GPIO MFP_CFG_IN(GPIO80, AF0)
125#define GPIO81_GPIO MFP_CFG_IN(GPIO81, AF0)
126#define GPIO82_GPIO MFP_CFG_IN(GPIO82, AF0)
127#define GPIO83_GPIO MFP_CFG_IN(GPIO83, AF0)
128#define GPIO84_GPIO MFP_CFG_IN(GPIO84, AF0)
129
130extern void pxa2xx_mfp_config(unsigned long *mfp_cfgs, int num);
131extern void pxa2xx_mfp_set_lpm(int mfp, unsigned long lpm);
132extern int gpio_set_wake(unsigned int gpio, unsigned int on);
133#endif /* __ASM_ARCH_MFP_PXA2XX_H */
diff --git a/include/asm-arm/arch-pxa/mfp-pxa300.h b/include/asm-arm/arch-pxa/mfp-pxa300.h
deleted file mode 100644
index bb410313556f..000000000000
--- a/include/asm-arm/arch-pxa/mfp-pxa300.h
+++ /dev/null
@@ -1,575 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-pxa/mfp-pxa300.h
3 *
4 * PXA300/PXA310 specific MFP configuration definitions
5 *
6 * Copyright (C) 2007 Marvell International Ltd.
7 * 2007-08-21: eric miao <eric.miao@marvell.com>
8 * initial version
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
13 */
14
15#ifndef __ASM_ARCH_MFP_PXA300_H
16#define __ASM_ARCH_MFP_PXA300_H
17
18#include <asm/arch/mfp.h>
19#include <asm/arch/mfp-pxa3xx.h>
20
21/* GPIO */
22#define GPIO46_GPIO MFP_CFG(GPIO46, AF1)
23#define GPIO49_GPIO MFP_CFG(GPIO49, AF3)
24#define GPIO50_GPIO MFP_CFG(GPIO50, AF2)
25#define GPIO51_GPIO MFP_CFG(GPIO51, AF3)
26#define GPIO52_GPIO MFP_CFG(GPIO52, AF3)
27#define GPIO56_GPIO MFP_CFG(GPIO56, AF0)
28#define GPIO58_GPIO MFP_CFG(GPIO58, AF0)
29#define GPIO59_GPIO MFP_CFG(GPIO59, AF0)
30#define GPIO60_GPIO MFP_CFG(GPIO60, AF0)
31#define GPIO61_GPIO MFP_CFG(GPIO61, AF0)
32#define GPIO62_GPIO MFP_CFG(GPIO62, AF0)
33
34#ifdef CONFIG_CPU_PXA310
35#define GPIO7_2_GPIO MFP_CFG(GPIO7_2, AF0)
36#define GPIO8_2_GPIO MFP_CFG(GPIO8_2, AF0)
37#define GPIO9_2_GPIO MFP_CFG(GPIO9_2, AF0)
38#define GPIO10_2_GPIO MFP_CFG(GPIO10_2, AF0)
39#define GPIO11_2_GPIO MFP_CFG(GPIO11_2, AF0)
40#define GPIO12_2_GPIO MFP_CFG(GPIO12_2, AF0)
41#endif
42
43/* Chip Select */
44#define GPIO2_nCS3 MFP_CFG(GPIO2, AF1)
45
46/* AC97 */
47#define GPIO23_AC97_nACRESET MFP_CFG(GPIO23, AF1)
48#define GPIO24_AC97_SYSCLK MFP_CFG(GPIO24, AF1)
49#define GPIO29_AC97_BITCLK MFP_CFG(GPIO29, AF1)
50#define GPIO25_AC97_SDATA_IN_0 MFP_CFG(GPIO25, AF1)
51#define GPIO26_AC97_SDATA_IN_1 MFP_CFG(GPIO26, AF1)
52#define GPIO17_AC97_SDATA_IN_2 MFP_CFG(GPIO17, AF3)
53#define GPIO21_AC97_SDATA_IN_2 MFP_CFG(GPIO21, AF2)
54#define GPIO18_AC97_SDATA_IN_3 MFP_CFG(GPIO18, AF3)
55#define GPIO22_AC97_SDATA_IN_3 MFP_CFG(GPIO22, AF2)
56#define GPIO27_AC97_SDATA_OUT MFP_CFG(GPIO27, AF1)
57#define GPIO28_AC97_SYNC MFP_CFG(GPIO28, AF1)
58
59/* I2C */
60#define GPIO21_I2C_SCL MFP_CFG_LPM(GPIO21, AF1, PULL_HIGH)
61#define GPIO22_I2C_SDA MFP_CFG_LPM(GPIO22, AF1, PULL_HIGH)
62
63/* QCI */
64#define GPIO39_CI_DD_0 MFP_CFG_DRV(GPIO39, AF1, DS04X)
65#define GPIO40_CI_DD_1 MFP_CFG_DRV(GPIO40, AF1, DS04X)
66#define GPIO41_CI_DD_2 MFP_CFG_DRV(GPIO41, AF1, DS04X)
67#define GPIO42_CI_DD_3 MFP_CFG_DRV(GPIO42, AF1, DS04X)
68#define GPIO43_CI_DD_4 MFP_CFG_DRV(GPIO43, AF1, DS04X)
69#define GPIO44_CI_DD_5 MFP_CFG_DRV(GPIO44, AF1, DS04X)
70#define GPIO45_CI_DD_6 MFP_CFG_DRV(GPIO45, AF1, DS04X)
71#define GPIO46_CI_DD_7 MFP_CFG_DRV(GPIO46, AF0, DS04X)
72#define GPIO47_CI_DD_8 MFP_CFG_DRV(GPIO47, AF1, DS04X)
73#define GPIO48_CI_DD_9 MFP_CFG_DRV(GPIO48, AF1, DS04X)
74#define GPIO52_CI_HSYNC MFP_CFG_DRV(GPIO52, AF0, DS04X)
75#define GPIO51_CI_VSYNC MFP_CFG_DRV(GPIO51, AF0, DS04X)
76#define GPIO49_CI_MCLK MFP_CFG_DRV(GPIO49, AF0, DS04X)
77#define GPIO50_CI_PCLK MFP_CFG_DRV(GPIO50, AF0, DS04X)
78
79/* KEYPAD */
80#define GPIO3_KP_DKIN_6 MFP_CFG_LPM(GPIO3, AF2, FLOAT)
81#define GPIO4_KP_DKIN_7 MFP_CFG_LPM(GPIO4, AF2, FLOAT)
82#define GPIO16_KP_DKIN_6 MFP_CFG_LPM(GPIO16, AF6, FLOAT)
83#define GPIO83_KP_DKIN_2 MFP_CFG_LPM(GPIO83, AF5, FLOAT)
84#define GPIO84_KP_DKIN_1 MFP_CFG_LPM(GPIO84, AF5, FLOAT)
85#define GPIO85_KP_DKIN_0 MFP_CFG_LPM(GPIO85, AF3, FLOAT)
86#define GPIO86_KP_DKIN_1 MFP_CFG_LPM(GPIO86, AF3, FLOAT)
87#define GPIO87_KP_DKIN_2 MFP_CFG_LPM(GPIO87, AF3, FLOAT)
88#define GPIO88_KP_DKIN_3 MFP_CFG_LPM(GPIO88, AF3, FLOAT)
89#define GPIO89_KP_DKIN_3 MFP_CFG_LPM(GPIO89, AF3, FLOAT)
90#define GPIO107_KP_DKIN_0 MFP_CFG_LPM(GPIO107, AF2, FLOAT)
91#define GPIO108_KP_DKIN_1 MFP_CFG_LPM(GPIO108, AF2, FLOAT)
92#define GPIO109_KP_DKIN_2 MFP_CFG_LPM(GPIO109, AF2, FLOAT)
93#define GPIO110_KP_DKIN_3 MFP_CFG_LPM(GPIO110, AF2, FLOAT)
94#define GPIO111_KP_DKIN_4 MFP_CFG_LPM(GPIO111, AF2, FLOAT)
95#define GPIO112_KP_DKIN_5 MFP_CFG_LPM(GPIO112, AF2, FLOAT)
96#define GPIO113_KP_DKIN_6 MFP_CFG_LPM(GPIO113, AF2, FLOAT)
97#define GPIO114_KP_DKIN_7 MFP_CFG_LPM(GPIO114, AF2, FLOAT)
98#define GPIO115_KP_DKIN_0 MFP_CFG_LPM(GPIO115, AF2, FLOAT)
99#define GPIO116_KP_DKIN_1 MFP_CFG_LPM(GPIO116, AF2, FLOAT)
100#define GPIO117_KP_DKIN_2 MFP_CFG_LPM(GPIO117, AF2, FLOAT)
101#define GPIO118_KP_DKIN_3 MFP_CFG_LPM(GPIO118, AF2, FLOAT)
102#define GPIO119_KP_DKIN_4 MFP_CFG_LPM(GPIO119, AF2, FLOAT)
103#define GPIO120_KP_DKIN_5 MFP_CFG_LPM(GPIO120, AF2, FLOAT)
104#define GPIO121_KP_DKIN_6 MFP_CFG_LPM(GPIO121, AF2, FLOAT)
105#define GPIO122_KP_DKIN_5 MFP_CFG_LPM(GPIO122, AF2, FLOAT)
106#define GPIO123_KP_DKIN_4 MFP_CFG_LPM(GPIO123, AF2, FLOAT)
107#define GPIO124_KP_DKIN_3 MFP_CFG_LPM(GPIO124, AF2, FLOAT)
108#define GPIO127_KP_DKIN_0 MFP_CFG_LPM(GPIO127, AF5, FLOAT)
109#define GPIO0_2_KP_DKIN_0 MFP_CFG_LPM(GPIO0_2, AF2, FLOAT)
110#define GPIO1_2_KP_DKIN_1 MFP_CFG_LPM(GPIO1_2, AF2, FLOAT)
111#define GPIO2_2_KP_DKIN_6 MFP_CFG_LPM(GPIO2_2, AF2, FLOAT)
112#define GPIO3_2_KP_DKIN_7 MFP_CFG_LPM(GPIO3_2, AF2, FLOAT)
113#define GPIO4_2_KP_DKIN_1 MFP_CFG_LPM(GPIO4_2, AF2, FLOAT)
114#define GPIO5_2_KP_DKIN_0 MFP_CFG_LPM(GPIO5_2, AF2, FLOAT)
115
116#define GPIO5_KP_MKIN_0 MFP_CFG_LPM(GPIO5, AF2, FLOAT)
117#define GPIO6_KP_MKIN_1 MFP_CFG_LPM(GPIO6, AF2, FLOAT)
118#define GPIO9_KP_MKIN_6 MFP_CFG_LPM(GPIO9, AF3, FLOAT)
119#define GPIO10_KP_MKIN_7 MFP_CFG_LPM(GPIO10, AF3, FLOAT)
120#define GPIO70_KP_MKIN_6 MFP_CFG_LPM(GPIO70, AF3, FLOAT)
121#define GPIO71_KP_MKIN_7 MFP_CFG_LPM(GPIO71, AF3, FLOAT)
122#define GPIO100_KP_MKIN_6 MFP_CFG_LPM(GPIO100, AF7, FLOAT)
123#define GPIO101_KP_MKIN_7 MFP_CFG_LPM(GPIO101, AF7, FLOAT)
124#define GPIO112_KP_MKIN_6 MFP_CFG_LPM(GPIO112, AF4, FLOAT)
125#define GPIO113_KP_MKIN_7 MFP_CFG_LPM(GPIO113, AF4, FLOAT)
126#define GPIO115_KP_MKIN_0 MFP_CFG_LPM(GPIO115, AF1, FLOAT)
127#define GPIO116_KP_MKIN_1 MFP_CFG_LPM(GPIO116, AF1, FLOAT)
128#define GPIO117_KP_MKIN_2 MFP_CFG_LPM(GPIO117, AF1, FLOAT)
129#define GPIO118_KP_MKIN_3 MFP_CFG_LPM(GPIO118, AF1, FLOAT)
130#define GPIO119_KP_MKIN_4 MFP_CFG_LPM(GPIO119, AF1, FLOAT)
131#define GPIO120_KP_MKIN_5 MFP_CFG_LPM(GPIO120, AF1, FLOAT)
132#define GPIO125_KP_MKIN_2 MFP_CFG_LPM(GPIO125, AF2, FLOAT)
133#define GPIO2_2_KP_MKIN_6 MFP_CFG_LPM(GPIO2_2, AF1, FLOAT)
134#define GPIO3_2_KP_MKIN_7 MFP_CFG_LPM(GPIO3_2, AF1, FLOAT)
135
136#define GPIO7_KP_MKOUT_5 MFP_CFG_LPM(GPIO7, AF1, DRIVE_HIGH)
137#define GPIO11_KP_MKOUT_5 MFP_CFG_LPM(GPIO11, AF3, DRIVE_HIGH)
138#define GPIO12_KP_MKOUT_6 MFP_CFG_LPM(GPIO12, AF3, DRIVE_HIGH)
139#define GPIO13_KP_MKOUT_7 MFP_CFG_LPM(GPIO13, AF3, DRIVE_HIGH)
140#define GPIO19_KP_MKOUT_4 MFP_CFG_LPM(GPIO19, AF3, DRIVE_HIGH)
141#define GPIO20_KP_MKOUT_5 MFP_CFG_LPM(GPIO20, AF3, DRIVE_HIGH)
142#define GPIO38_KP_MKOUT_5 MFP_CFG_LPM(GPIO38, AF5, DRIVE_HIGH)
143#define GPIO53_KP_MKOUT_6 MFP_CFG_LPM(GPIO53, AF5, DRIVE_HIGH)
144#define GPIO78_KP_MKOUT_7 MFP_CFG_LPM(GPIO78, AF5, DRIVE_HIGH)
145#define GPIO85_KP_MKOUT_0 MFP_CFG_LPM(GPIO85, AF2, DRIVE_HIGH)
146#define GPIO86_KP_MKOUT_1 MFP_CFG_LPM(GPIO86, AF2, DRIVE_HIGH)
147#define GPIO87_KP_MKOUT_2 MFP_CFG_LPM(GPIO87, AF2, DRIVE_HIGH)
148#define GPIO88_KP_MKOUT_3 MFP_CFG_LPM(GPIO88, AF2, DRIVE_HIGH)
149#define GPIO104_KP_MKOUT_6 MFP_CFG_LPM(GPIO104, AF5, DRIVE_HIGH)
150#define GPIO105_KP_MKOUT_7 MFP_CFG_LPM(GPIO105, AF5, DRIVE_HIGH)
151#define GPIO121_KP_MKOUT_0 MFP_CFG_LPM(GPIO121, AF1, DRIVE_HIGH)
152#define GPIO122_KP_MKOUT_1 MFP_CFG_LPM(GPIO122, AF1, DRIVE_HIGH)
153#define GPIO123_KP_MKOUT_2 MFP_CFG_LPM(GPIO123, AF1, DRIVE_HIGH)
154#define GPIO124_KP_MKOUT_3 MFP_CFG_LPM(GPIO124, AF1, DRIVE_HIGH)
155#define GPIO125_KP_MKOUT_4 MFP_CFG_LPM(GPIO125, AF1, DRIVE_HIGH)
156#define GPIO126_KP_MKOUT_7 MFP_CFG_LPM(GPIO126, AF4, DRIVE_HIGH)
157#define GPIO5_2_KP_MKOUT_6 MFP_CFG_LPM(GPIO5_2, AF1, DRIVE_HIGH)
158#define GPIO4_2_KP_MKOUT_5 MFP_CFG_LPM(GPIO4_2, AF1, DRIVE_HIGH)
159#define GPIO6_2_KP_MKOUT_7 MFP_CFG_LPM(GPIO6_2, AF1, DRIVE_HIGH)
160
161/* LCD */
162#define GPIO54_LCD_LDD_0 MFP_CFG_DRV(GPIO54, AF1, DS01X)
163#define GPIO55_LCD_LDD_1 MFP_CFG_DRV(GPIO55, AF1, DS01X)
164#define GPIO56_LCD_LDD_2 MFP_CFG_DRV(GPIO56, AF1, DS01X)
165#define GPIO57_LCD_LDD_3 MFP_CFG_DRV(GPIO57, AF1, DS01X)
166#define GPIO58_LCD_LDD_4 MFP_CFG_DRV(GPIO58, AF1, DS01X)
167#define GPIO59_LCD_LDD_5 MFP_CFG_DRV(GPIO59, AF1, DS01X)
168#define GPIO60_LCD_LDD_6 MFP_CFG_DRV(GPIO60, AF1, DS01X)
169#define GPIO61_LCD_LDD_7 MFP_CFG_DRV(GPIO61, AF1, DS01X)
170#define GPIO62_LCD_LDD_8 MFP_CFG_DRV(GPIO62, AF1, DS01X)
171#define GPIO63_LCD_LDD_9 MFP_CFG_DRV(GPIO63, AF1, DS01X)
172#define GPIO64_LCD_LDD_10 MFP_CFG_DRV(GPIO64, AF1, DS01X)
173#define GPIO65_LCD_LDD_11 MFP_CFG_DRV(GPIO65, AF1, DS01X)
174#define GPIO66_LCD_LDD_12 MFP_CFG_DRV(GPIO66, AF1, DS01X)
175#define GPIO67_LCD_LDD_13 MFP_CFG_DRV(GPIO67, AF1, DS01X)
176#define GPIO68_LCD_LDD_14 MFP_CFG_DRV(GPIO68, AF1, DS01X)
177#define GPIO69_LCD_LDD_15 MFP_CFG_DRV(GPIO69, AF1, DS01X)
178#define GPIO70_LCD_LDD_16 MFP_CFG_DRV(GPIO70, AF1, DS01X)
179#define GPIO71_LCD_LDD_17 MFP_CFG_DRV(GPIO71, AF1, DS01X)
180#define GPIO62_LCD_CS_N MFP_CFG_DRV(GPIO62, AF2, DS01X)
181#define GPIO72_LCD_FCLK MFP_CFG_DRV(GPIO72, AF1, DS01X)
182#define GPIO73_LCD_LCLK MFP_CFG_DRV(GPIO73, AF1, DS01X)
183#define GPIO74_LCD_PCLK MFP_CFG_DRV(GPIO74, AF1, DS02X)
184#define GPIO75_LCD_BIAS MFP_CFG_DRV(GPIO75, AF1, DS01X)
185#define GPIO76_LCD_VSYNC MFP_CFG_DRV(GPIO76, AF2, DS01X)
186
187#define GPIO15_LCD_CS_N MFP_CFG_DRV(GPIO15, AF2, DS01X)
188#define GPIO127_LCD_CS_N MFP_CFG_DRV(GPIO127, AF1, DS01X)
189#define GPIO63_LCD_VSYNC MFP_CFG_DRV(GPIO63, AF2, DS01X)
190
191/* Mini-LCD */
192#define GPIO72_MLCD_FCLK MFP_CFG_DRV(GPIO72, AF7, DS08X)
193#define GPIO73_MLCD_LCLK MFP_CFG_DRV(GPIO73, AF7, DS08X)
194#define GPIO54_MLCD_LDD_0 MFP_CFG_DRV(GPIO54, AF7, DS08X)
195#define GPIO55_MLCD_LDD_1 MFP_CFG_DRV(GPIO55, AF7, DS08X)
196#define GPIO56_MLCD_LDD_2 MFP_CFG_DRV(GPIO56, AF7, DS08X)
197#define GPIO57_MLCD_LDD_3 MFP_CFG_DRV(GPIO57, AF7, DS08X)
198#define GPIO58_MLCD_LDD_4 MFP_CFG_DRV(GPIO58, AF7, DS08X)
199#define GPIO59_MLCD_LDD_5 MFP_CFG_DRV(GPIO59, AF7, DS08X)
200#define GPIO60_MLCD_LDD_6 MFP_CFG_DRV(GPIO60, AF7, DS08X)
201#define GPIO61_MLCD_LDD_7 MFP_CFG_DRV(GPIO61, AF7, DS08X)
202#define GPIO62_MLCD_LDD_8 MFP_CFG_DRV(GPIO62, AF7, DS08X)
203#define GPIO63_MLCD_LDD_9 MFP_CFG_DRV(GPIO63, AF7, DS08X)
204#define GPIO64_MLCD_LDD_10 MFP_CFG_DRV(GPIO64, AF7, DS08X)
205#define GPIO65_MLCD_LDD_11 MFP_CFG_DRV(GPIO65, AF7, DS08X)
206#define GPIO66_MLCD_LDD_12 MFP_CFG_DRV(GPIO66, AF7, DS08X)
207#define GPIO67_MLCD_LDD_13 MFP_CFG_DRV(GPIO67, AF7, DS08X)
208#define GPIO68_MLCD_LDD_14 MFP_CFG_DRV(GPIO68, AF7, DS08X)
209#define GPIO69_MLCD_LDD_15 MFP_CFG_DRV(GPIO69, AF7, DS08X)
210#define GPIO74_MLCD_PCLK MFP_CFG_DRV(GPIO74, AF7, DS08X)
211#define GPIO75_MLCD_BIAS MFP_CFG_DRV(GPIO75, AF2, DS08X)
212
213/* MMC1 */
214#define GPIO7_MMC1_CLK MFP_CFG_LPM(GPIO7, AF4, DRIVE_HIGH)
215#define GPIO8_MMC1_CMD MFP_CFG_LPM(GPIO8, AF4, DRIVE_HIGH)
216#define GPIO14_MMC1_CMD MFP_CFG_LPM(GPIO14, AF5, DRIVE_HIGH)
217#define GPIO15_MMC1_CMD MFP_CFG_LPM(GPIO15, AF5, DRIVE_HIGH)
218#define GPIO3_MMC1_DAT0 MFP_CFG_LPM(GPIO3, AF4, DRIVE_HIGH)
219#define GPIO4_MMC1_DAT1 MFP_CFG_LPM(GPIO4, AF4, DRIVE_HIGH)
220#define GPIO5_MMC1_DAT2 MFP_CFG_LPM(GPIO5, AF4, DRIVE_HIGH)
221#define GPIO6_MMC1_DAT3 MFP_CFG_LPM(GPIO6, AF4, DRIVE_HIGH)
222
223/* MMC2 */
224#define GPIO9_MMC2_DAT0 MFP_CFG_LPM(GPIO9, AF4, PULL_HIGH)
225#define GPIO10_MMC2_DAT1 MFP_CFG_LPM(GPIO10, AF4, PULL_HIGH)
226#define GPIO11_MMC2_DAT2 MFP_CFG_LPM(GPIO11, AF4, PULL_HIGH)
227#define GPIO12_MMC2_DAT3 MFP_CFG_LPM(GPIO12, AF4, PULL_HIGH)
228#define GPIO13_MMC2_CLK MFP_CFG_LPM(GPIO13, AF4, PULL_HIGH)
229#define GPIO14_MMC2_CMD MFP_CFG_LPM(GPIO14, AF4, PULL_HIGH)
230#define GPIO77_MMC2_DAT0 MFP_CFG_LPM(GPIO77, AF4, PULL_HIGH)
231#define GPIO78_MMC2_DAT1 MFP_CFG_LPM(GPIO78, AF4, PULL_HIGH)
232#define GPIO79_MMC2_DAT2 MFP_CFG_LPM(GPIO79, AF4, PULL_HIGH)
233#define GPIO80_MMC2_DAT3 MFP_CFG_LPM(GPIO80, AF4, PULL_HIGH)
234#define GPIO81_MMC2_CLK MFP_CFG_LPM(GPIO81, AF4, PULL_HIGH)
235#define GPIO82_MMC2_CMD MFP_CFG_LPM(GPIO82, AF4, PULL_HIGH)
236
237/* SSP1 */
238#define GPIO89_SSP1_EXTCLK MFP_CFG(GPIO89, AF1)
239#define GPIO90_SSP1_SYSCLK MFP_CFG(GPIO90, AF1)
240#define GPIO15_SSP1_SCLK MFP_CFG(GPIO15, AF6)
241#define GPIO16_SSP1_FRM MFP_CFG(GPIO16, AF2)
242#define GPIO33_SSP1_SCLK MFP_CFG(GPIO33, AF5)
243#define GPIO34_SSP1_FRM MFP_CFG(GPIO34, AF5)
244#define GPIO85_SSP1_SCLK MFP_CFG(GPIO85, AF1)
245#define GPIO86_SSP1_FRM MFP_CFG(GPIO86, AF1)
246#define GPIO18_SSP1_TXD MFP_CFG(GPIO18, AF7)
247#define GPIO18_SSP1_RXD MFP_CFG(GPIO18, AF2)
248#define GPIO20_SSP1_TXD MFP_CFG(GPIO20, AF2)
249#define GPIO20_SSP1_RXD MFP_CFG(GPIO20, AF7)
250#define GPIO35_SSP1_TXD MFP_CFG(GPIO35, AF5)
251#define GPIO35_SSP1_RXD MFP_CFG(GPIO35, AF4)
252#define GPIO36_SSP1_TXD MFP_CFG(GPIO36, AF5)
253#define GPIO36_SSP1_RXD MFP_CFG(GPIO36, AF6)
254#define GPIO87_SSP1_TXD MFP_CFG(GPIO87, AF1)
255#define GPIO87_SSP1_RXD MFP_CFG(GPIO87, AF6)
256#define GPIO88_SSP1_TXD MFP_CFG(GPIO88, AF6)
257#define GPIO88_SSP1_RXD MFP_CFG(GPIO88, AF1)
258
259/* SSP2 */
260#define GPIO29_SSP2_EXTCLK MFP_CFG(GPIO29, AF2)
261#define GPIO23_SSP2_SCLK MFP_CFG(GPIO23, AF2)
262#define GPIO17_SSP2_FRM MFP_CFG(GPIO17, AF2)
263#define GPIO25_SSP2_SCLK MFP_CFG(GPIO25, AF2)
264#define GPIO26_SSP2_FRM MFP_CFG(GPIO26, AF2)
265#define GPIO33_SSP2_SCLK MFP_CFG(GPIO33, AF6)
266#define GPIO34_SSP2_FRM MFP_CFG(GPIO34, AF6)
267#define GPIO64_SSP2_SCLK MFP_CFG(GPIO64, AF2)
268#define GPIO65_SSP2_FRM MFP_CFG(GPIO65, AF2)
269#define GPIO19_SSP2_TXD MFP_CFG(GPIO19, AF2)
270#define GPIO19_SSP2_RXD MFP_CFG(GPIO19, AF7)
271#define GPIO24_SSP2_TXD MFP_CFG(GPIO24, AF5)
272#define GPIO24_SSP2_RXD MFP_CFG(GPIO24, AF4)
273#define GPIO27_SSP2_TXD MFP_CFG(GPIO27, AF2)
274#define GPIO27_SSP2_RXD MFP_CFG(GPIO27, AF5)
275#define GPIO28_SSP2_TXD MFP_CFG(GPIO28, AF5)
276#define GPIO28_SSP2_RXD MFP_CFG(GPIO28, AF2)
277#define GPIO35_SSP2_TXD MFP_CFG(GPIO35, AF7)
278#define GPIO35_SSP2_RXD MFP_CFG(GPIO35, AF6)
279#define GPIO66_SSP2_TXD MFP_CFG(GPIO66, AF4)
280#define GPIO66_SSP2_RXD MFP_CFG(GPIO66, AF2)
281#define GPIO67_SSP2_TXD MFP_CFG(GPIO67, AF2)
282#define GPIO67_SSP2_RXD MFP_CFG(GPIO67, AF4)
283#define GPIO36_SSP2_TXD MFP_CFG(GPIO36, AF7)
284
285/* SSP3 */
286#define GPIO69_SSP3_FRM MFP_CFG_X(GPIO69, AF2, DS08X, DRIVE_LOW)
287#define GPIO68_SSP3_SCLK MFP_CFG_X(GPIO68, AF2, DS08X, FLOAT)
288#define GPIO92_SSP3_FRM MFP_CFG_X(GPIO92, AF1, DS08X, DRIVE_LOW)
289#define GPIO91_SSP3_SCLK MFP_CFG_X(GPIO91, AF1, DS08X, FLOAT)
290#define GPIO70_SSP3_TXD MFP_CFG_X(GPIO70, AF2, DS08X, DRIVE_LOW)
291#define GPIO70_SSP3_RXD MFP_CFG_X(GPIO70, AF5, DS08X, FLOAT)
292#define GPIO71_SSP3_TXD MFP_CFG_X(GPIO71, AF5, DS08X, DRIVE_LOW)
293#define GPIO71_SSP3_RXD MFP_CFG_X(GPIO71, AF2, DS08X, FLOAT)
294#define GPIO93_SSP3_TXD MFP_CFG_X(GPIO93, AF1, DS08X, DRIVE_LOW)
295#define GPIO93_SSP3_RXD MFP_CFG_X(GPIO93, AF5, DS08X, FLOAT)
296#define GPIO94_SSP3_TXD MFP_CFG_X(GPIO94, AF5, DS08X, DRIVE_LOW)
297#define GPIO94_SSP3_RXD MFP_CFG_X(GPIO94, AF1, DS08X, FLOAT)
298
299/* SSP4 */
300#define GPIO95_SSP4_SCLK MFP_CFG_LPM(GPIO95, AF1, PULL_HIGH)
301#define GPIO96_SSP4_FRM MFP_CFG_LPM(GPIO96, AF1, PULL_HIGH)
302#define GPIO97_SSP4_TXD MFP_CFG_LPM(GPIO97, AF1, PULL_HIGH)
303#define GPIO97_SSP4_RXD MFP_CFG_LPM(GPIO97, AF5, PULL_HIGH)
304#define GPIO98_SSP4_TXD MFP_CFG_LPM(GPIO98, AF5, PULL_HIGH)
305#define GPIO98_SSP4_RXD MFP_CFG_LPM(GPIO98, AF1, PULL_HIGH)
306
307/* UART1 */
308#define GPIO32_UART1_CTS MFP_CFG_LPM(GPIO32, AF2, FLOAT)
309#define GPIO37_UART1_CTS MFP_CFG_LPM(GPIO37, AF4, FLOAT)
310#define GPIO79_UART1_CTS MFP_CFG_LPM(GPIO79, AF1, FLOAT)
311#define GPIO84_UART1_CTS MFP_CFG_LPM(GPIO84, AF3, FLOAT)
312#define GPIO101_UART1_CTS MFP_CFG_LPM(GPIO101, AF1, FLOAT)
313#define GPIO106_UART1_CTS MFP_CFG_LPM(GPIO106, AF6, FLOAT)
314
315#define GPIO32_UART1_RTS MFP_CFG_LPM(GPIO32, AF4, FLOAT)
316#define GPIO37_UART1_RTS MFP_CFG_LPM(GPIO37, AF2, FLOAT)
317#define GPIO79_UART1_RTS MFP_CFG_LPM(GPIO79, AF3, FLOAT)
318#define GPIO84_UART1_RTS MFP_CFG_LPM(GPIO84, AF1, FLOAT)
319#define GPIO101_UART1_RTS MFP_CFG_LPM(GPIO101, AF6, FLOAT)
320#define GPIO106_UART1_RTS MFP_CFG_LPM(GPIO106, AF1, FLOAT)
321
322#define GPIO34_UART1_DSR MFP_CFG_LPM(GPIO34, AF2, FLOAT)
323#define GPIO36_UART1_DSR MFP_CFG_LPM(GPIO36, AF4, FLOAT)
324#define GPIO81_UART1_DSR MFP_CFG_LPM(GPIO81, AF1, FLOAT)
325#define GPIO83_UART1_DSR MFP_CFG_LPM(GPIO83, AF3, FLOAT)
326#define GPIO103_UART1_DSR MFP_CFG_LPM(GPIO103, AF1, FLOAT)
327#define GPIO105_UART1_DSR MFP_CFG_LPM(GPIO105, AF6, FLOAT)
328
329#define GPIO34_UART1_DTR MFP_CFG_LPM(GPIO34, AF4, FLOAT)
330#define GPIO36_UART1_DTR MFP_CFG_LPM(GPIO36, AF2, FLOAT)
331#define GPIO81_UART1_DTR MFP_CFG_LPM(GPIO81, AF3, FLOAT)
332#define GPIO83_UART1_DTR MFP_CFG_LPM(GPIO83, AF1, FLOAT)
333#define GPIO103_UART1_DTR MFP_CFG_LPM(GPIO103, AF6, FLOAT)
334#define GPIO105_UART1_DTR MFP_CFG_LPM(GPIO105, AF1, FLOAT)
335
336#define GPIO35_UART1_RI MFP_CFG_LPM(GPIO35, AF2, FLOAT)
337#define GPIO82_UART1_RI MFP_CFG_LPM(GPIO82, AF1, FLOAT)
338#define GPIO104_UART1_RI MFP_CFG_LPM(GPIO104, AF1, FLOAT)
339
340#define GPIO33_UART1_DCD MFP_CFG_LPM(GPIO33, AF2, FLOAT)
341#define GPIO80_UART1_DCD MFP_CFG_LPM(GPIO80, AF1, FLOAT)
342#define GPIO102_UART1_DCD MFP_CFG_LPM(GPIO102, AF1, FLOAT)
343
344#define GPIO30_UART1_RXD MFP_CFG_LPM(GPIO30, AF2, FLOAT)
345#define GPIO31_UART1_RXD MFP_CFG_LPM(GPIO31, AF4, FLOAT)
346#define GPIO77_UART1_RXD MFP_CFG_LPM(GPIO77, AF1, FLOAT)
347#define GPIO78_UART1_RXD MFP_CFG_LPM(GPIO78, AF3, FLOAT)
348#define GPIO99_UART1_RXD MFP_CFG_LPM(GPIO99, AF1, FLOAT)
349#define GPIO100_UART1_RXD MFP_CFG_LPM(GPIO100, AF6, FLOAT)
350#define GPIO102_UART1_RXD MFP_CFG_LPM(GPIO102, AF6, FLOAT)
351#define GPIO104_UART1_RXD MFP_CFG_LPM(GPIO104, AF4, FLOAT)
352
353#define GPIO30_UART1_TXD MFP_CFG_LPM(GPIO30, AF4, FLOAT)
354#define GPIO31_UART1_TXD MFP_CFG_LPM(GPIO31, AF2, FLOAT)
355#define GPIO77_UART1_TXD MFP_CFG_LPM(GPIO77, AF3, FLOAT)
356#define GPIO78_UART1_TXD MFP_CFG_LPM(GPIO78, AF1, FLOAT)
357#define GPIO99_UART1_TXD MFP_CFG_LPM(GPIO99, AF6, FLOAT)
358#define GPIO100_UART1_TXD MFP_CFG_LPM(GPIO100, AF1, FLOAT)
359#define GPIO102_UART1_TXD MFP_CFG_LPM(GPIO102, AF4, FLOAT)
360
361/* UART2 */
362#define GPIO15_UART2_CTS MFP_CFG_LPM(GPIO15, AF3, FLOAT)
363#define GPIO16_UART2_CTS MFP_CFG_LPM(GPIO16, AF5, FLOAT)
364#define GPIO111_UART2_CTS MFP_CFG_LPM(GPIO111, AF3, FLOAT)
365#define GPIO114_UART2_CTS MFP_CFG_LPM(GPIO114, AF1, FLOAT)
366
367#define GPIO15_UART2_RTS MFP_CFG_LPM(GPIO15, AF4, FLOAT)
368#define GPIO16_UART2_RTS MFP_CFG_LPM(GPIO16, AF4, FLOAT)
369#define GPIO114_UART2_RTS MFP_CFG_LPM(GPIO114, AF3, FLOAT)
370#define GPIO111_UART2_RTS MFP_CFG_LPM(GPIO111, AF1, FLOAT)
371
372#define GPIO18_UART2_RXD MFP_CFG_LPM(GPIO18, AF5, FLOAT)
373#define GPIO19_UART2_RXD MFP_CFG_LPM(GPIO19, AF4, FLOAT)
374#define GPIO112_UART2_RXD MFP_CFG_LPM(GPIO112, AF1, FLOAT)
375#define GPIO113_UART2_RXD MFP_CFG_LPM(GPIO113, AF3, FLOAT)
376
377#define GPIO18_UART2_TXD MFP_CFG_LPM(GPIO18, AF4, FLOAT)
378#define GPIO19_UART2_TXD MFP_CFG_LPM(GPIO19, AF5, FLOAT)
379#define GPIO112_UART2_TXD MFP_CFG_LPM(GPIO112, AF3, FLOAT)
380#define GPIO113_UART2_TXD MFP_CFG_LPM(GPIO113, AF1, FLOAT)
381
382/* UART3 */
383#define GPIO91_UART3_CTS MFP_CFG_LPM(GPIO91, AF2, FLOAT)
384#define GPIO92_UART3_CTS MFP_CFG_LPM(GPIO92, AF4, FLOAT)
385#define GPIO107_UART3_CTS MFP_CFG_LPM(GPIO107, AF1, FLOAT)
386#define GPIO108_UART3_CTS MFP_CFG_LPM(GPIO108, AF3, FLOAT)
387
388#define GPIO91_UART3_RTS MFP_CFG_LPM(GPIO91, AF4, FLOAT)
389#define GPIO92_UART3_RTS MFP_CFG_LPM(GPIO92, AF2, FLOAT)
390#define GPIO107_UART3_RTS MFP_CFG_LPM(GPIO107, AF3, FLOAT)
391#define GPIO108_UART3_RTS MFP_CFG_LPM(GPIO108, AF1, FLOAT)
392
393#define GPIO7_UART3_RXD MFP_CFG_LPM(GPIO7, AF2, FLOAT)
394#define GPIO8_UART3_RXD MFP_CFG_LPM(GPIO8, AF6, FLOAT)
395#define GPIO93_UART3_RXD MFP_CFG_LPM(GPIO93, AF4, FLOAT)
396#define GPIO94_UART3_RXD MFP_CFG_LPM(GPIO94, AF2, FLOAT)
397#define GPIO109_UART3_RXD MFP_CFG_LPM(GPIO109, AF3, FLOAT)
398#define GPIO110_UART3_RXD MFP_CFG_LPM(GPIO110, AF1, FLOAT)
399
400#define GPIO7_UART3_TXD MFP_CFG_LPM(GPIO7, AF6, FLOAT)
401#define GPIO8_UART3_TXD MFP_CFG_LPM(GPIO8, AF2, FLOAT)
402#define GPIO93_UART3_TXD MFP_CFG_LPM(GPIO93, AF2, FLOAT)
403#define GPIO94_UART3_TXD MFP_CFG_LPM(GPIO94, AF4, FLOAT)
404#define GPIO109_UART3_TXD MFP_CFG_LPM(GPIO109, AF1, FLOAT)
405#define GPIO110_UART3_TXD MFP_CFG_LPM(GPIO110, AF3, FLOAT)
406
407/* USB Host */
408#define GPIO0_2_USBH_PEN MFP_CFG(GPIO0_2, AF1)
409#define GPIO1_2_USBH_PWR MFP_CFG(GPIO1_2, AF1)
410
411/* USB P3 */
412#define GPIO77_USB_P3_1 MFP_CFG(GPIO77, AF2)
413#define GPIO78_USB_P3_2 MFP_CFG(GPIO78, AF2)
414#define GPIO79_USB_P3_3 MFP_CFG(GPIO79, AF2)
415#define GPIO80_USB_P3_4 MFP_CFG(GPIO80, AF2)
416#define GPIO81_USB_P3_5 MFP_CFG(GPIO81, AF2)
417#define GPIO82_USB_P3_6 MFP_CFG(GPIO82, AF2)
418
419/* PWM */
420#define GPIO17_PWM0_OUT MFP_CFG(GPIO17, AF1)
421#define GPIO18_PWM1_OUT MFP_CFG(GPIO18, AF1)
422#define GPIO19_PWM2_OUT MFP_CFG(GPIO19, AF1)
423#define GPIO20_PWM3_OUT MFP_CFG(GPIO20, AF1)
424
425/* CIR */
426#define GPIO8_CIR_OUT MFP_CFG(GPIO8, AF5)
427#define GPIO16_CIR_OUT MFP_CFG(GPIO16, AF3)
428
429#define GPIO20_OW_DQ_IN MFP_CFG(GPIO20, AF5)
430#define GPIO126_OW_DQ MFP_CFG(GPIO126, AF2)
431
432#define GPIO0_DF_RDY MFP_CFG(GPIO0, AF1)
433#define GPIO7_CLK_BYPASS_XSC MFP_CFG(GPIO7, AF7)
434#define GPIO17_EXT_SYNC_MVT_0 MFP_CFG(GPIO17, AF6)
435#define GPIO18_EXT_SYNC_MVT_1 MFP_CFG(GPIO18, AF6)
436#define GPIO19_OST_CHOUT_MVT_0 MFP_CFG(GPIO19, AF6)
437#define GPIO20_OST_CHOUT_MVT_1 MFP_CFG(GPIO20, AF6)
438#define GPIO49_48M_CLK MFP_CFG(GPIO49, AF2)
439#define GPIO126_EXT_CLK MFP_CFG(GPIO126, AF3)
440#define GPIO127_CLK_BYPASS_GB MFP_CFG(GPIO127, AF7)
441#define GPIO71_EXT_MATCH_MVT MFP_CFG(GPIO71, AF6)
442
443#define GPIO3_uIO_IN MFP_CFG(GPIO3, AF1)
444
445#define GPIO4_uSIM_CARD_STATE MFP_CFG(GPIO4, AF1)
446#define GPIO5_uSIM_uCLK MFP_CFG(GPIO5, AF1)
447#define GPIO6_uSIM_uRST MFP_CFG(GPIO6, AF1)
448#define GPIO16_uSIM_UVS_0 MFP_CFG(GPIO16, AF1)
449
450#define GPIO9_SCIO MFP_CFG(GPIO9, AF1)
451#define GPIO20_RTC_MVT MFP_CFG(GPIO20, AF4)
452#define GPIO126_RTC_MVT MFP_CFG(GPIO126, AF1)
453
454/*
455 * PXA300 specific MFP configurations
456 */
457#ifdef CONFIG_CPU_PXA300
458#define GPIO99_USB_P2_2 MFP_CFG(GPIO99, AF2)
459#define GPIO99_USB_P2_5 MFP_CFG(GPIO99, AF3)
460#define GPIO99_USB_P2_6 MFP_CFG(GPIO99, AF4)
461#define GPIO100_USB_P2_2 MFP_CFG(GPIO100, AF4)
462#define GPIO100_USB_P2_5 MFP_CFG(GPIO100, AF5)
463#define GPIO101_USB_P2_1 MFP_CFG(GPIO101, AF2)
464#define GPIO102_USB_P2_4 MFP_CFG(GPIO102, AF2)
465#define GPIO104_USB_P2_3 MFP_CFG(GPIO104, AF2)
466#define GPIO105_USB_P2_5 MFP_CFG(GPIO105, AF2)
467#define GPIO100_USB_P2_6 MFP_CFG(GPIO100, AF2)
468#define GPIO106_USB_P2_7 MFP_CFG(GPIO106, AF2)
469#define GPIO103_USB_P2_8 MFP_CFG(GPIO103, AF2)
470
471/* U2D UTMI */
472#define GPIO38_UTM_CLK MFP_CFG(GPIO38, AF1)
473#define GPIO26_U2D_RXERROR MFP_CFG(GPIO26, AF3)
474#define GPIO50_U2D_RXERROR MFP_CFG(GPIO50, AF1)
475#define GPIO89_U2D_RXERROR MFP_CFG(GPIO89, AF5)
476#define GPIO24_UTM_RXVALID MFP_CFG(GPIO24, AF3)
477#define GPIO48_UTM_RXVALID MFP_CFG(GPIO48, AF2)
478#define GPIO87_UTM_RXVALID MFP_CFG(GPIO87, AF5)
479#define GPIO25_UTM_RXACTIVE MFP_CFG(GPIO25, AF3)
480#define GPIO47_UTM_RXACTIVE MFP_CFG(GPIO47, AF2)
481#define GPIO49_UTM_RXACTIVE MFP_CFG(GPIO49, AF1)
482#define GPIO88_UTM_RXACTIVE MFP_CFG(GPIO88, AF5)
483#define GPIO53_UTM_TXREADY MFP_CFG(GPIO53, AF1)
484#define GPIO67_UTM_LINESTATE_0 MFP_CFG(GPIO67, AF3)
485#define GPIO92_UTM_LINESTATE_0 MFP_CFG(GPIO92, AF3)
486#define GPIO104_UTM_LINESTATE_0 MFP_CFG(GPIO104, AF3)
487#define GPIO109_UTM_LINESTATE_0 MFP_CFG(GPIO109, AF4)
488#define GPIO68_UTM_LINESTATE_1 MFP_CFG(GPIO68, AF3)
489#define GPIO93_UTM_LINESTATE_1 MFP_CFG(GPIO93, AF3)
490#define GPIO105_UTM_LINESTATE_1 MFP_CFG(GPIO105, AF3)
491#define GPIO27_U2D_OPMODE_0 MFP_CFG(GPIO27, AF4)
492#define GPIO51_U2D_OPMODE_0 MFP_CFG(GPIO51, AF2)
493#define GPIO90_U2D_OPMODE_0 MFP_CFG(GPIO90, AF7)
494#define GPIO28_U2D_OPMODE_1 MFP_CFG(GPIO28, AF4)
495#define GPIO52_U2D_OPMODE_1 MFP_CFG(GPIO52, AF2)
496#define GPIO106_U2D_OPMODE_1 MFP_CFG(GPIO106, AF3)
497#define GPIO110_U2D_OPMODE_1 MFP_CFG(GPIO110, AF5)
498#define GPIO76_U2D_RESET MFP_CFG(GPIO76, AF1)
499#define GPIO95_U2D_RESET MFP_CFG(GPIO95, AF2)
500#define GPIO100_U2D_RESET MFP_CFG(GPIO100, AF3)
501#define GPIO66_U2D_SUSPEND MFP_CFG(GPIO66, AF3)
502#define GPIO98_U2D_SUSPEND MFP_CFG(GPIO98, AF2)
503#define GPIO103_U2D_SUSPEND MFP_CFG(GPIO103, AF3)
504#define GPIO65_U2D_TERM_SEL MFP_CFG(GPIO65, AF5)
505#define GPIO97_U2D_TERM_SEL MFP_CFG(GPIO97, AF3)
506#define GPIO102_U2D_TERM_SEL MFP_CFG(GPIO102, AF5)
507#define GPIO29_U2D_TXVALID MFP_CFG(GPIO29, AF3)
508#define GPIO52_U2D_TXVALID MFP_CFG(GPIO52, AF4)
509#define GPIO69_U2D_TXVALID MFP_CFG(GPIO69, AF3)
510#define GPIO85_U2D_TXVALID MFP_CFG(GPIO85, AF7)
511#define GPIO64_U2D_XCVR_SEL MFP_CFG(GPIO64, AF5)
512#define GPIO96_U2D_XCVR_SEL MFP_CFG(GPIO96, AF3)
513#define GPIO101_U2D_XCVR_SEL MFP_CFG(GPIO101, AF5)
514#define GPIO30_UTM_PHYDATA_0 MFP_CFG(GPIO30, AF3)
515#define GPIO31_UTM_PHYDATA_1 MFP_CFG(GPIO31, AF3)
516#define GPIO32_UTM_PHYDATA_2 MFP_CFG(GPIO32, AF3)
517#define GPIO33_UTM_PHYDATA_3 MFP_CFG(GPIO33, AF3)
518#define GPIO34_UTM_PHYDATA_4 MFP_CFG(GPIO34, AF3)
519#define GPIO35_UTM_PHYDATA_5 MFP_CFG(GPIO35, AF3)
520#define GPIO36_UTM_PHYDATA_6 MFP_CFG(GPIO36, AF3)
521#define GPIO37_UTM_PHYDATA_7 MFP_CFG(GPIO37, AF3)
522#define GPIO39_UTM_PHYDATA_0 MFP_CFG(GPIO39, AF3)
523#define GPIO40_UTM_PHYDATA_1 MFP_CFG(GPIO40, AF3)
524#define GPIO41_UTM_PHYDATA_2 MFP_CFG(GPIO41, AF3)
525#define GPIO42_UTM_PHYDATA_3 MFP_CFG(GPIO42, AF3)
526#define GPIO43_UTM_PHYDATA_4 MFP_CFG(GPIO43, AF3)
527#define GPIO44_UTM_PHYDATA_5 MFP_CFG(GPIO44, AF3)
528#define GPIO45_UTM_PHYDATA_6 MFP_CFG(GPIO45, AF3)
529#define GPIO46_UTM_PHYDATA_7 MFP_CFG(GPIO46, AF3)
530#endif /* CONFIG_CPU_PXA300 */
531
532/*
533 * PXA310 specific MFP configurations
534 */
535#ifdef CONFIG_CPU_PXA310
536/* USB P2 */
537#define GPIO36_USB_P2_1 MFP_CFG(GPIO36, AF1)
538#define GPIO30_USB_P2_2 MFP_CFG(GPIO30, AF1)
539#define GPIO35_USB_P2_3 MFP_CFG(GPIO35, AF1)
540#define GPIO32_USB_P2_4 MFP_CFG(GPIO32, AF1)
541#define GPIO34_USB_P2_5 MFP_CFG(GPIO34, AF1)
542#define GPIO31_USB_P2_6 MFP_CFG(GPIO31, AF1)
543
544/* MMC1 */
545#define GPIO24_MMC1_CMD MFP_CFG(GPIO24, AF3)
546#define GPIO29_MMC1_DAT0 MFP_CFG(GPIO29, AF3)
547
548/* MMC3 */
549#define GPIO103_MMC3_CLK MFP_CFG(GPIO103, AF2)
550#define GPIO105_MMC3_CMD MFP_CFG(GPIO105, AF2)
551#define GPIO11_2_MMC3_CLK MFP_CFG(GPIO11_2, AF1)
552#define GPIO12_2_MMC3_CMD MFP_CFG(GPIO12_2, AF1)
553#define GPIO7_2_MMC3_DAT0 MFP_CFG(GPIO7_2, AF1)
554#define GPIO8_2_MMC3_DAT1 MFP_CFG(GPIO8_2, AF1)
555#define GPIO9_2_MMC3_DAT2 MFP_CFG(GPIO9_2, AF1)
556#define GPIO10_2_MMC3_DAT3 MFP_CFG(GPIO10_2, AF1)
557
558/* ULPI */
559#define GPIO38_ULPI_CLK MFP_CFG(GPIO38, AF1)
560#define GPIO30_ULPI_DATA_OUT_0 MFP_CFG(GPIO30, AF3)
561#define GPIO31_ULPI_DATA_OUT_1 MFP_CFG(GPIO31, AF3)
562#define GPIO32_ULPI_DATA_OUT_2 MFP_CFG(GPIO32, AF3)
563#define GPIO33_ULPI_DATA_OUT_3 MFP_CFG(GPIO33, AF3)
564#define GPIO34_ULPI_DATA_OUT_4 MFP_CFG(GPIO34, AF3)
565#define GPIO35_ULPI_DATA_OUT_5 MFP_CFG(GPIO35, AF3)
566#define GPIO36_ULPI_DATA_OUT_6 MFP_CFG(GPIO36, AF3)
567#define GPIO37_ULPI_DATA_OUT_7 MFP_CFG(GPIO37, AF3)
568#define GPIO33_ULPI_OTG_INTR MFP_CFG(GPIO33, AF1)
569
570#define ULPI_DIR MFP_CFG_DRV(ULPI_DIR, MFP_AF0, MFP_DS01X)
571#define ULPI_NXT MFP_CFG_DRV(ULPI_NXT, MFP_AF0, MFP_DS01X)
572#define ULPI_STP MFP_CFG_DRV(ULPI_STP, MFP_AF0, MFP_DS01X)
573#endif /* CONFIG_CPU_PXA310 */
574
575#endif /* __ASM_ARCH_MFP_PXA300_H */
diff --git a/include/asm-arm/arch-pxa/mfp-pxa320.h b/include/asm-arm/arch-pxa/mfp-pxa320.h
deleted file mode 100644
index 576aa46d90fc..000000000000
--- a/include/asm-arm/arch-pxa/mfp-pxa320.h
+++ /dev/null
@@ -1,447 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-pxa/mfp-pxa320.h
3 *
4 * PXA320 specific MFP configuration definitions
5 *
6 * Copyright (C) 2007 Marvell International Ltd.
7 * 2007-08-21: eric miao <eric.miao@marvell.com>
8 * initial version
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
13 */
14
15#ifndef __ASM_ARCH_MFP_PXA320_H
16#define __ASM_ARCH_MFP_PXA320_H
17
18#include <asm/arch/mfp.h>
19#include <asm/arch/mfp-pxa3xx.h>
20
21/* GPIO */
22#define GPIO46_GPIO MFP_CFG(GPIO46, AF0)
23#define GPIO49_GPIO MFP_CFG(GPIO49, AF0)
24#define GPIO50_GPIO MFP_CFG(GPIO50, AF0)
25#define GPIO51_GPIO MFP_CFG(GPIO51, AF0)
26#define GPIO52_GPIO MFP_CFG(GPIO52, AF0)
27
28#define GPIO7_2_GPIO MFP_CFG(GPIO7_2, AF0)
29#define GPIO8_2_GPIO MFP_CFG(GPIO8_2, AF0)
30#define GPIO9_2_GPIO MFP_CFG(GPIO9_2, AF0)
31#define GPIO10_2_GPIO MFP_CFG(GPIO10_2, AF0)
32#define GPIO11_2_GPIO MFP_CFG(GPIO11_2, AF0)
33#define GPIO12_2_GPIO MFP_CFG(GPIO12_2, AF0)
34#define GPIO13_2_GPIO MFP_CFG(GPIO13_2, AF0)
35#define GPIO14_2_GPIO MFP_CFG(GPIO14_2, AF0)
36#define GPIO15_2_GPIO MFP_CFG(GPIO15_2, AF0)
37#define GPIO16_2_GPIO MFP_CFG(GPIO16_2, AF0)
38#define GPIO17_2_GPIO MFP_CFG(GPIO17_2, AF0)
39
40/* Chip Select */
41#define GPIO4_nCS3 MFP_CFG(GPIO4, AF1)
42
43/* AC97 */
44#define GPIO34_AC97_SYSCLK MFP_CFG(GPIO34, AF1)
45#define GPIO39_AC97_BITCLK MFP_CFG(GPIO39, AF1)
46#define GPIO40_AC97_nACRESET MFP_CFG(GPIO40, AF1)
47#define GPIO35_AC97_SDATA_IN_0 MFP_CFG(GPIO35, AF1)
48#define GPIO36_AC97_SDATA_IN_1 MFP_CFG(GPIO36, AF1)
49#define GPIO32_AC97_SDATA_IN_2 MFP_CFG(GPIO32, AF2)
50#define GPIO33_AC97_SDATA_IN_3 MFP_CFG(GPIO33, AF2)
51#define GPIO11_AC97_SDATA_IN_2 MFP_CFG(GPIO11, AF3)
52#define GPIO12_AC97_SDATA_IN_3 MFP_CFG(GPIO12, AF3)
53#define GPIO37_AC97_SDATA_OUT MFP_CFG(GPIO37, AF1)
54#define GPIO38_AC97_SYNC MFP_CFG(GPIO38, AF1)
55
56/* I2C */
57#define GPIO32_I2C_SCL MFP_CFG_LPM(GPIO32, AF1, PULL_HIGH)
58#define GPIO33_I2C_SDA MFP_CFG_LPM(GPIO33, AF1, PULL_HIGH)
59
60/* QCI */
61#define GPIO49_CI_DD_0 MFP_CFG_DRV(GPIO49, AF1, DS04X)
62#define GPIO50_CI_DD_1 MFP_CFG_DRV(GPIO50, AF1, DS04X)
63#define GPIO51_CI_DD_2 MFP_CFG_DRV(GPIO51, AF1, DS04X)
64#define GPIO52_CI_DD_3 MFP_CFG_DRV(GPIO52, AF1, DS04X)
65#define GPIO53_CI_DD_4 MFP_CFG_DRV(GPIO53, AF1, DS04X)
66#define GPIO54_CI_DD_5 MFP_CFG_DRV(GPIO54, AF1, DS04X)
67#define GPIO55_CI_DD_6 MFP_CFG_DRV(GPIO55, AF1, DS04X)
68#define GPIO56_CI_DD_7 MFP_CFG_DRV(GPIO56, AF0, DS04X)
69#define GPIO57_CI_DD_8 MFP_CFG_DRV(GPIO57, AF1, DS04X)
70#define GPIO58_CI_DD_9 MFP_CFG_DRV(GPIO58, AF1, DS04X)
71#define GPIO59_CI_MCLK MFP_CFG_DRV(GPIO59, AF0, DS04X)
72#define GPIO60_CI_PCLK MFP_CFG_DRV(GPIO60, AF0, DS04X)
73#define GPIO61_CI_HSYNC MFP_CFG_DRV(GPIO61, AF0, DS04X)
74#define GPIO62_CI_VSYNC MFP_CFG_DRV(GPIO62, AF0, DS04X)
75
76#define GPIO31_CIR_OUT MFP_CFG(GPIO31, AF5)
77
78#define GPIO0_2_CLK_EXT MFP_CFG(GPIO0_2, AF3)
79#define GPIO0_DRQ MFP_CFG(GPIO0, AF2)
80#define GPIO11_EXT_SYNC0 MFP_CFG(GPIO11, AF5)
81#define GPIO12_EXT_SYNC1 MFP_CFG(GPIO12, AF6)
82#define GPIO0_2_HZ_CLK MFP_CFG(GPIO0_2, AF1)
83#define GPIO14_HZ_CLK MFP_CFG(GPIO14, AF4)
84#define GPIO30_ICP_RXD MFP_CFG(GPIO30, AF1)
85#define GPIO31_ICP_TXD MFP_CFG(GPIO31, AF1)
86
87#define GPIO83_KP_DKIN_0 MFP_CFG_LPM(GPIO83, AF3, FLOAT)
88#define GPIO84_KP_DKIN_1 MFP_CFG_LPM(GPIO84, AF3, FLOAT)
89#define GPIO85_KP_DKIN_2 MFP_CFG_LPM(GPIO85, AF3, FLOAT)
90#define GPIO86_KP_DKIN_3 MFP_CFG_LPM(GPIO86, AF3, FLOAT)
91
92#define GPIO105_KP_DKIN_0 MFP_CFG_LPM(GPIO105, AF2, FLOAT)
93#define GPIO106_KP_DKIN_1 MFP_CFG_LPM(GPIO106, AF2, FLOAT)
94#define GPIO107_KP_DKIN_2 MFP_CFG_LPM(GPIO107, AF2, FLOAT)
95#define GPIO108_KP_DKIN_3 MFP_CFG_LPM(GPIO108, AF2, FLOAT)
96#define GPIO109_KP_DKIN_4 MFP_CFG_LPM(GPIO109, AF2, FLOAT)
97#define GPIO110_KP_DKIN_5 MFP_CFG_LPM(GPIO110, AF2, FLOAT)
98#define GPIO111_KP_DKIN_6 MFP_CFG_LPM(GPIO111, AF2, FLOAT)
99#define GPIO112_KP_DKIN_7 MFP_CFG_LPM(GPIO112, AF2, FLOAT)
100
101#define GPIO113_KP_DKIN_0 MFP_CFG_LPM(GPIO113, AF2, FLOAT)
102#define GPIO114_KP_DKIN_1 MFP_CFG_LPM(GPIO114, AF2, FLOAT)
103#define GPIO115_KP_DKIN_2 MFP_CFG_LPM(GPIO115, AF2, FLOAT)
104#define GPIO116_KP_DKIN_3 MFP_CFG_LPM(GPIO116, AF2, FLOAT)
105#define GPIO117_KP_DKIN_4 MFP_CFG_LPM(GPIO117, AF2, FLOAT)
106#define GPIO118_KP_DKIN_5 MFP_CFG_LPM(GPIO118, AF2, FLOAT)
107#define GPIO119_KP_DKIN_6 MFP_CFG_LPM(GPIO119, AF2, FLOAT)
108#define GPIO120_KP_DKIN_7 MFP_CFG_LPM(GPIO120, AF2, FLOAT)
109
110#define GPIO127_KP_DKIN_0 MFP_CFG_LPM(GPIO127, AF2, FLOAT)
111#define GPIO126_KP_DKIN_1 MFP_CFG_LPM(GPIO126, AF2, FLOAT)
112
113#define GPIO2_2_KP_DKIN_0 MFP_CFG_LPM(GPIO2_2, AF2, FLOAT)
114#define GPIO3_2_KP_DKIN_1 MFP_CFG_LPM(GPIO3_2, AF2, FLOAT)
115#define GPIO125_KP_DKIN_2 MFP_CFG_LPM(GPIO125, AF2, FLOAT)
116#define GPIO124_KP_DKIN_3 MFP_CFG_LPM(GPIO124, AF2, FLOAT)
117#define GPIO123_KP_DKIN_4 MFP_CFG_LPM(GPIO123, AF2, FLOAT)
118#define GPIO122_KP_DKIN_5 MFP_CFG_LPM(GPIO122, AF2, FLOAT)
119#define GPIO121_KP_DKIN_6 MFP_CFG_LPM(GPIO121, AF2, FLOAT)
120#define GPIO4_2_KP_DKIN_7 MFP_CFG_LPM(GPIO4_2, AF2, FLOAT)
121
122#define GPIO113_KP_MKIN_0 MFP_CFG_LPM(GPIO113, AF1, FLOAT)
123#define GPIO114_KP_MKIN_1 MFP_CFG_LPM(GPIO114, AF1, FLOAT)
124#define GPIO115_KP_MKIN_2 MFP_CFG_LPM(GPIO115, AF1, FLOAT)
125#define GPIO116_KP_MKIN_3 MFP_CFG_LPM(GPIO116, AF1, FLOAT)
126#define GPIO117_KP_MKIN_4 MFP_CFG_LPM(GPIO117, AF1, FLOAT)
127#define GPIO118_KP_MKIN_5 MFP_CFG_LPM(GPIO118, AF1, FLOAT)
128#define GPIO119_KP_MKIN_6 MFP_CFG_LPM(GPIO119, AF1, FLOAT)
129#define GPIO120_KP_MKIN_7 MFP_CFG_LPM(GPIO120, AF1, FLOAT)
130
131#define GPIO83_KP_MKOUT_0 MFP_CFG_LPM(GPIO83, AF2, DRIVE_HIGH)
132#define GPIO84_KP_MKOUT_1 MFP_CFG_LPM(GPIO84, AF2, DRIVE_HIGH)
133#define GPIO85_KP_MKOUT_2 MFP_CFG_LPM(GPIO85, AF2, DRIVE_HIGH)
134#define GPIO86_KP_MKOUT_3 MFP_CFG_LPM(GPIO86, AF2, DRIVE_HIGH)
135#define GPIO13_KP_MKOUT_4 MFP_CFG_LPM(GPIO13, AF3, DRIVE_HIGH)
136#define GPIO14_KP_MKOUT_5 MFP_CFG_LPM(GPIO14, AF3, DRIVE_HIGH)
137
138#define GPIO121_KP_MKOUT_0 MFP_CFG_LPM(GPIO121, AF1, DRIVE_HIGH)
139#define GPIO122_KP_MKOUT_1 MFP_CFG_LPM(GPIO122, AF1, DRIVE_HIGH)
140#define GPIO123_KP_MKOUT_2 MFP_CFG_LPM(GPIO123, AF1, DRIVE_HIGH)
141#define GPIO124_KP_MKOUT_3 MFP_CFG_LPM(GPIO124, AF1, DRIVE_HIGH)
142#define GPIO125_KP_MKOUT_4 MFP_CFG_LPM(GPIO125, AF1, DRIVE_HIGH)
143#define GPIO126_KP_MKOUT_5 MFP_CFG_LPM(GPIO126, AF1, DRIVE_HIGH)
144#define GPIO127_KP_MKOUT_6 MFP_CFG_LPM(GPIO127, AF1, DRIVE_HIGH)
145#define GPIO5_2_KP_MKOUT_7 MFP_CFG_LPM(GPIO5_2, AF1, DRIVE_HIGH)
146
147/* LCD */
148#define GPIO6_2_LCD_LDD_0 MFP_CFG_DRV(GPIO6_2, AF1, DS01X)
149#define GPIO7_2_LCD_LDD_1 MFP_CFG_DRV(GPIO7_2, AF1, DS01X)
150#define GPIO8_2_LCD_LDD_2 MFP_CFG_DRV(GPIO8_2, AF1, DS01X)
151#define GPIO9_2_LCD_LDD_3 MFP_CFG_DRV(GPIO9_2, AF1, DS01X)
152#define GPIO10_2_LCD_LDD_4 MFP_CFG_DRV(GPIO10_2, AF1, DS01X)
153#define GPIO11_2_LCD_LDD_5 MFP_CFG_DRV(GPIO11_2, AF1, DS01X)
154#define GPIO12_2_LCD_LDD_6 MFP_CFG_DRV(GPIO12_2, AF1, DS01X)
155#define GPIO13_2_LCD_LDD_7 MFP_CFG_DRV(GPIO13_2, AF1, DS01X)
156#define GPIO63_LCD_LDD_8 MFP_CFG_DRV(GPIO63, AF1, DS01X)
157#define GPIO64_LCD_LDD_9 MFP_CFG_DRV(GPIO64, AF1, DS01X)
158#define GPIO65_LCD_LDD_10 MFP_CFG_DRV(GPIO65, AF1, DS01X)
159#define GPIO66_LCD_LDD_11 MFP_CFG_DRV(GPIO66, AF1, DS01X)
160#define GPIO67_LCD_LDD_12 MFP_CFG_DRV(GPIO67, AF1, DS01X)
161#define GPIO68_LCD_LDD_13 MFP_CFG_DRV(GPIO68, AF1, DS01X)
162#define GPIO69_LCD_LDD_14 MFP_CFG_DRV(GPIO69, AF1, DS01X)
163#define GPIO70_LCD_LDD_15 MFP_CFG_DRV(GPIO70, AF1, DS01X)
164#define GPIO71_LCD_LDD_16 MFP_CFG_DRV(GPIO71, AF1, DS01X)
165#define GPIO72_LCD_LDD_17 MFP_CFG_DRV(GPIO72, AF1, DS01X)
166#define GPIO73_LCD_CS_N MFP_CFG_DRV(GPIO73, AF2, DS01X)
167#define GPIO74_LCD_VSYNC MFP_CFG_DRV(GPIO74, AF2, DS01X)
168#define GPIO14_2_LCD_FCLK MFP_CFG_DRV(GPIO14_2, AF1, DS01X)
169#define GPIO15_2_LCD_LCLK MFP_CFG_DRV(GPIO15_2, AF1, DS01X)
170#define GPIO16_2_LCD_PCLK MFP_CFG_DRV(GPIO16_2, AF1, DS01X)
171#define GPIO17_2_LCD_BIAS MFP_CFG_DRV(GPIO17_2, AF1, DS01X)
172#define GPIO64_LCD_VSYNC MFP_CFG_DRV(GPIO64, AF2, DS01X)
173#define GPIO63_LCD_CS_N MFP_CFG_DRV(GPIO63, AF2, DS01X)
174
175#define GPIO6_2_MLCD_DD_0 MFP_CFG_DRV(GPIO6_2, AF7, DS08X)
176#define GPIO7_2_MLCD_DD_1 MFP_CFG_DRV(GPIO7_2, AF7, DS08X)
177#define GPIO8_2_MLCD_DD_2 MFP_CFG_DRV(GPIO8_2, AF7, DS08X)
178#define GPIO9_2_MLCD_DD_3 MFP_CFG_DRV(GPIO9_2, AF7, DS08X)
179#define GPIO10_2_MLCD_DD_4 MFP_CFG_DRV(GPIO10_2, AF7, DS08X)
180#define GPIO11_2_MLCD_DD_5 MFP_CFG_DRV(GPIO11_2, AF7, DS08X)
181#define GPIO12_2_MLCD_DD_6 MFP_CFG_DRV(GPIO12_2, AF7, DS08X)
182#define GPIO13_2_MLCD_DD_7 MFP_CFG_DRV(GPIO13_2, AF7, DS08X)
183#define GPIO63_MLCD_DD_8 MFP_CFG_DRV(GPIO63, AF7, DS08X)
184#define GPIO64_MLCD_DD_9 MFP_CFG_DRV(GPIO64, AF7, DS08X)
185#define GPIO65_MLCD_DD_10 MFP_CFG_DRV(GPIO65, AF7, DS08X)
186#define GPIO66_MLCD_DD_11 MFP_CFG_DRV(GPIO66, AF7, DS08X)
187#define GPIO67_MLCD_DD_12 MFP_CFG_DRV(GPIO67, AF7, DS08X)
188#define GPIO68_MLCD_DD_13 MFP_CFG_DRV(GPIO68, AF7, DS08X)
189#define GPIO69_MLCD_DD_14 MFP_CFG_DRV(GPIO69, AF7, DS08X)
190#define GPIO70_MLCD_DD_15 MFP_CFG_DRV(GPIO70, AF7, DS08X)
191#define GPIO71_MLCD_DD_16 MFP_CFG_DRV(GPIO71, AF7, DS08X)
192#define GPIO72_MLCD_DD_17 MFP_CFG_DRV(GPIO72, AF7, DS08X)
193#define GPIO73_MLCD_CS MFP_CFG_DRV(GPIO73, AF7, DS08X)
194#define GPIO74_MLCD_VSYNC MFP_CFG_DRV(GPIO74, AF7, DS08X)
195#define GPIO14_2_MLCD_FCLK MFP_CFG_DRV(GPIO14_2, AF7, DS08X)
196#define GPIO15_2_MLCD_LCLK MFP_CFG_DRV(GPIO15_2, AF7, DS08X)
197#define GPIO16_2_MLCD_PCLK MFP_CFG_DRV(GPIO16_2, AF7, DS08X)
198#define GPIO17_2_MLCD_BIAS MFP_CFG_DRV(GPIO17_2, AF7, DS08X)
199
200/* MMC1 */
201#define GPIO9_MMC1_CMD MFP_CFG_LPM(GPIO9, AF4, DRIVE_HIGH)
202#define GPIO22_MMC1_CLK MFP_CFG_LPM(GPIO22, AF4, DRIVE_HIGH)
203#define GPIO23_MMC1_CMD MFP_CFG_LPM(GPIO23, AF4, DRIVE_HIGH)
204#define GPIO30_MMC1_CLK MFP_CFG_LPM(GPIO30, AF4, DRIVE_HIGH)
205#define GPIO31_MMC1_CMD MFP_CFG_LPM(GPIO31, AF4, DRIVE_HIGH)
206#define GPIO5_MMC1_DAT0 MFP_CFG_LPM(GPIO5, AF4, DRIVE_HIGH)
207#define GPIO6_MMC1_DAT1 MFP_CFG_LPM(GPIO6, AF4, DRIVE_HIGH)
208#define GPIO7_MMC1_DAT2 MFP_CFG_LPM(GPIO7, AF4, DRIVE_HIGH)
209#define GPIO8_MMC1_DAT3 MFP_CFG_LPM(GPIO8, AF4, DRIVE_HIGH)
210#define GPIO18_MMC1_DAT0 MFP_CFG_LPM(GPIO18, AF4, DRIVE_HIGH)
211#define GPIO19_MMC1_DAT1 MFP_CFG_LPM(GPIO19, AF4, DRIVE_HIGH)
212#define GPIO20_MMC1_DAT2 MFP_CFG_LPM(GPIO20, AF4, DRIVE_HIGH)
213#define GPIO21_MMC1_DAT3 MFP_CFG_LPM(GPIO21, AF4, DRIVE_HIGH)
214
215#define GPIO28_MMC2_CLK MFP_CFG_LPM(GPIO28, AF4, PULL_HIGH)
216#define GPIO29_MMC2_CMD MFP_CFG_LPM(GPIO29, AF4, PULL_HIGH)
217#define GPIO30_MMC2_CLK MFP_CFG_LPM(GPIO30, AF3, PULL_HIGH)
218#define GPIO31_MMC2_CMD MFP_CFG_LPM(GPIO31, AF3, PULL_HIGH)
219#define GPIO79_MMC2_CLK MFP_CFG_LPM(GPIO79, AF4, PULL_HIGH)
220#define GPIO80_MMC2_CMD MFP_CFG_LPM(GPIO80, AF4, PULL_HIGH)
221
222#define GPIO5_MMC2_DAT0 MFP_CFG_LPM(GPIO5, AF2, PULL_HIGH)
223#define GPIO6_MMC2_DAT1 MFP_CFG_LPM(GPIO6, AF2, PULL_HIGH)
224#define GPIO7_MMC2_DAT2 MFP_CFG_LPM(GPIO7, AF2, PULL_HIGH)
225#define GPIO8_MMC2_DAT3 MFP_CFG_LPM(GPIO8, AF2, PULL_HIGH)
226#define GPIO24_MMC2_DAT0 MFP_CFG_LPM(GPIO24, AF4, PULL_HIGH)
227#define GPIO75_MMC2_DAT0 MFP_CFG_LPM(GPIO75, AF4, PULL_HIGH)
228#define GPIO25_MMC2_DAT1 MFP_CFG_LPM(GPIO25, AF4, PULL_HIGH)
229#define GPIO76_MMC2_DAT1 MFP_CFG_LPM(GPIO76, AF4, PULL_HIGH)
230#define GPIO26_MMC2_DAT2 MFP_CFG_LPM(GPIO26, AF4, PULL_HIGH)
231#define GPIO77_MMC2_DAT2 MFP_CFG_LPM(GPIO77, AF4, PULL_HIGH)
232#define GPIO27_MMC2_DAT3 MFP_CFG_LPM(GPIO27, AF4, PULL_HIGH)
233#define GPIO78_MMC2_DAT3 MFP_CFG_LPM(GPIO78, AF4, PULL_HIGH)
234
235/* 1-Wire */
236#define GPIO14_ONE_WIRE MFP_CFG_LPM(GPIO14, AF5, FLOAT)
237#define GPIO0_2_ONE_WIRE MFP_CFG_LPM(GPIO0_2, AF2, FLOAT)
238
239/* SSP1 */
240#define GPIO87_SSP1_EXTCLK MFP_CFG(GPIO87, AF1)
241#define GPIO88_SSP1_SYSCLK MFP_CFG(GPIO88, AF1)
242#define GPIO83_SSP1_SCLK MFP_CFG(GPIO83, AF1)
243#define GPIO84_SSP1_SFRM MFP_CFG(GPIO84, AF1)
244#define GPIO85_SSP1_RXD MFP_CFG(GPIO85, AF6)
245#define GPIO85_SSP1_TXD MFP_CFG(GPIO85, AF1)
246#define GPIO86_SSP1_RXD MFP_CFG(GPIO86, AF1)
247#define GPIO86_SSP1_TXD MFP_CFG(GPIO86, AF6)
248
249/* SSP2 */
250#define GPIO39_SSP2_EXTCLK MFP_CFG(GPIO39, AF2)
251#define GPIO40_SSP2_SYSCLK MFP_CFG(GPIO40, AF2)
252#define GPIO12_SSP2_SCLK MFP_CFG(GPIO12, AF2)
253#define GPIO35_SSP2_SCLK MFP_CFG(GPIO35, AF2)
254#define GPIO36_SSP2_SFRM MFP_CFG(GPIO36, AF2)
255#define GPIO37_SSP2_RXD MFP_CFG(GPIO37, AF5)
256#define GPIO37_SSP2_TXD MFP_CFG(GPIO37, AF2)
257#define GPIO38_SSP2_RXD MFP_CFG(GPIO38, AF2)
258#define GPIO38_SSP2_TXD MFP_CFG(GPIO38, AF5)
259
260#define GPIO69_SSP3_SCLK MFP_CFG(GPIO69, AF2, DS08X, FLOAT)
261#define GPIO70_SSP3_FRM MFP_CFG(GPIO70, AF2, DS08X, DRIVE_LOW)
262#define GPIO89_SSP3_SCLK MFP_CFG(GPIO89, AF1, DS08X, FLOAT)
263#define GPIO90_SSP3_FRM MFP_CFG(GPIO90, AF1, DS08X, DRIVE_LOW)
264#define GPIO71_SSP3_RXD MFP_CFG_X(GPIO71, AF5, DS08X, FLOAT)
265#define GPIO71_SSP3_TXD MFP_CFG_X(GPIO71, AF2, DS08X, DRIVE_LOW)
266#define GPIO72_SSP3_RXD MFP_CFG_X(GPIO72, AF2, DS08X, FLOAT)
267#define GPIO72_SSP3_TXD MFP_CFG_X(GPIO72, AF5, DS08X, DRIVE_LOW)
268#define GPIO91_SSP3_RXD MFP_CFG_X(GPIO91, AF5, DS08X, FLOAT)
269#define GPIO91_SSP3_TXD MFP_CFG_X(GPIO91, AF1, DS08X, DRIVE_LOW)
270#define GPIO92_SSP3_RXD MFP_CFG_X(GPIO92, AF1, DS08X, FLOAT)
271#define GPIO92_SSP3_TXD MFP_CFG_X(GPIO92, AF5, DS08X, DRIVE_LOW)
272
273#define GPIO93_SSP4_SCLK MFP_CFG_LPM(GPIO93, AF1, PULL_HIGH)
274#define GPIO94_SSP4_FRM MFP_CFG_LPM(GPIO94, AF1, PULL_HIGH)
275#define GPIO94_SSP4_RXD MFP_CFG_LPM(GPIO94, AF5, PULL_HIGH)
276#define GPIO95_SSP4_RXD MFP_CFG_LPM(GPIO95, AF5, PULL_HIGH)
277#define GPIO95_SSP4_TXD MFP_CFG_LPM(GPIO95, AF1, PULL_HIGH)
278#define GPIO96_SSP4_RXD MFP_CFG_LPM(GPIO96, AF1, PULL_HIGH)
279#define GPIO96_SSP4_TXD MFP_CFG_LPM(GPIO96, AF5, PULL_HIGH)
280
281/* UART1 */
282#define GPIO41_UART1_RXD MFP_CFG_LPM(GPIO41, AF2, FLOAT)
283#define GPIO41_UART1_TXD MFP_CFG_LPM(GPIO41, AF4, FLOAT)
284#define GPIO42_UART1_RXD MFP_CFG_LPM(GPIO42, AF4, FLOAT)
285#define GPIO42_UART1_TXD MFP_CFG_LPM(GPIO42, AF2, FLOAT)
286#define GPIO97_UART1_RXD MFP_CFG_LPM(GPIO97, AF1, FLOAT)
287#define GPIO97_UART1_TXD MFP_CFG_LPM(GPIO97, AF6, FLOAT)
288#define GPIO98_UART1_RXD MFP_CFG_LPM(GPIO98, AF6, FLOAT)
289#define GPIO98_UART1_TXD MFP_CFG_LPM(GPIO98, AF1, FLOAT)
290#define GPIO43_UART1_CTS MFP_CFG_LPM(GPIO43, AF2, FLOAT)
291#define GPIO43_UART1_RTS MFP_CFG_LPM(GPIO43, AF4, FLOAT)
292#define GPIO48_UART1_CTS MFP_CFG_LPM(GPIO48, AF4, FLOAT)
293#define GPIO48_UART1_RTS MFP_CFG_LPM(GPIO48, AF2, FLOAT)
294#define GPIO99_UART1_CTS MFP_CFG_LPM(GPIO99, AF1, FLOAT)
295#define GPIO99_UART1_RTS MFP_CFG_LPM(GPIO99, AF6, FLOAT)
296#define GPIO104_UART1_CTS MFP_CFG_LPM(GPIO104, AF6, FLOAT)
297#define GPIO104_UART1_RTS MFP_CFG_LPM(GPIO104, AF1, FLOAT)
298#define GPIO45_UART1_DTR MFP_CFG_LPM(GPIO45, AF4, FLOAT)
299#define GPIO45_UART1_DSR MFP_CFG_LPM(GPIO45, AF2, FLOAT)
300#define GPIO47_UART1_DTR MFP_CFG_LPM(GPIO47, AF2, FLOAT)
301#define GPIO47_UART1_DSR MFP_CFG_LPM(GPIO47, AF4, FLOAT)
302#define GPIO101_UART1_DTR MFP_CFG_LPM(GPIO101, AF6, FLOAT)
303#define GPIO101_UART1_DSR MFP_CFG_LPM(GPIO101, AF1, FLOAT)
304#define GPIO103_UART1_DTR MFP_CFG_LPM(GPIO103, AF1, FLOAT)
305#define GPIO103_UART1_DSR MFP_CFG_LPM(GPIO103, AF6, FLOAT)
306#define GPIO44_UART1_DCD MFP_CFG_LPM(GPIO44, AF2, FLOAT)
307#define GPIO100_UART1_DCD MFP_CFG_LPM(GPIO100, AF1, FLOAT)
308#define GPIO46_UART1_RI MFP_CFG_LPM(GPIO46, AF2, FLOAT)
309#define GPIO102_UART1_RI MFP_CFG_LPM(GPIO102, AF1, FLOAT)
310
311/* UART2 */
312#define GPIO109_UART2_CTS MFP_CFG_LPM(GPIO109, AF3, FLOAT)
313#define GPIO109_UART2_RTS MFP_CFG_LPM(GPIO109, AF1, FLOAT)
314#define GPIO112_UART2_CTS MFP_CFG_LPM(GPIO112, AF1, FLOAT)
315#define GPIO112_UART2_RTS MFP_CFG_LPM(GPIO112, AF3, FLOAT)
316#define GPIO110_UART2_RXD MFP_CFG_LPM(GPIO110, AF1, FLOAT)
317#define GPIO110_UART2_TXD MFP_CFG_LPM(GPIO110, AF3, FLOAT)
318#define GPIO111_UART2_RXD MFP_CFG_LPM(GPIO111, AF3, FLOAT)
319#define GPIO111_UART2_TXD MFP_CFG_LPM(GPIO111, AF1, FLOAT)
320
321/* UART3 */
322#define GPIO89_UART3_CTS MFP_CFG_LPM(GPIO89, AF2, FLOAT)
323#define GPIO89_UART3_RTS MFP_CFG_LPM(GPIO89, AF4, FLOAT)
324#define GPIO90_UART3_CTS MFP_CFG_LPM(GPIO90, AF4, FLOAT)
325#define GPIO90_UART3_RTS MFP_CFG_LPM(GPIO90, AF2, FLOAT)
326#define GPIO105_UART3_CTS MFP_CFG_LPM(GPIO105, AF1, FLOAT)
327#define GPIO105_UART3_RTS MFP_CFG_LPM(GPIO105, AF3, FLOAT)
328#define GPIO106_UART3_CTS MFP_CFG_LPM(GPIO106, AF3, FLOAT)
329#define GPIO106_UART3_RTS MFP_CFG_LPM(GPIO106, AF1, FLOAT)
330#define GPIO30_UART3_RXD MFP_CFG_LPM(GPIO30, AF2, FLOAT)
331#define GPIO30_UART3_TXD MFP_CFG_LPM(GPIO30, AF6, FLOAT)
332#define GPIO31_UART3_RXD MFP_CFG_LPM(GPIO31, AF6, FLOAT)
333#define GPIO31_UART3_TXD MFP_CFG_LPM(GPIO31, AF2, FLOAT)
334#define GPIO91_UART3_RXD MFP_CFG_LPM(GPIO91, AF4, FLOAT)
335#define GPIO91_UART3_TXD MFP_CFG_LPM(GPIO91, AF2, FLOAT)
336#define GPIO92_UART3_RXD MFP_CFG_LPM(GPIO92, AF2, FLOAT)
337#define GPIO92_UART3_TXD MFP_CFG_LPM(GPIO92, AF4, FLOAT)
338#define GPIO107_UART3_RXD MFP_CFG_LPM(GPIO107, AF3, FLOAT)
339#define GPIO107_UART3_TXD MFP_CFG_LPM(GPIO107, AF1, FLOAT)
340#define GPIO108_UART3_RXD MFP_CFG_LPM(GPIO108, AF1, FLOAT)
341#define GPIO108_UART3_TXD MFP_CFG_LPM(GPIO108, AF3, FLOAT)
342
343
344/* USB 2.0 UTMI */
345#define GPIO10_UTM_CLK MFP_CFG(GPIO10, AF1)
346#define GPIO36_U2D_RXERROR MFP_CFG(GPIO36, AF3)
347#define GPIO60_U2D_RXERROR MFP_CFG(GPIO60, AF1)
348#define GPIO87_U2D_RXERROR MFP_CFG(GPIO87, AF5)
349#define GPIO34_UTM_RXVALID MFP_CFG(GPIO34, AF3)
350#define GPIO58_UTM_RXVALID MFP_CFG(GPIO58, AF2)
351#define GPIO85_UTM_RXVALID MFP_CFG(GPIO85, AF5)
352#define GPIO35_UTM_RXACTIVE MFP_CFG(GPIO35, AF3)
353#define GPIO59_UTM_RXACTIVE MFP_CFG(GPIO59, AF1)
354#define GPIO86_UTM_RXACTIVE MFP_CFG(GPIO86, AF5)
355#define GPIO73_UTM_TXREADY MFP_CFG(GPIO73, AF1)
356#define GPIO68_UTM_LINESTATE_0 MFP_CFG(GPIO68, AF3)
357#define GPIO90_UTM_LINESTATE_0 MFP_CFG(GPIO90, AF3)
358#define GPIO102_UTM_LINESTATE_0 MFP_CFG(GPIO102, AF3)
359#define GPIO107_UTM_LINESTATE_0 MFP_CFG(GPIO107, AF4)
360#define GPIO69_UTM_LINESTATE_1 MFP_CFG(GPIO69, AF3)
361#define GPIO91_UTM_LINESTATE_1 MFP_CFG(GPIO91, AF3)
362#define GPIO103_UTM_LINESTATE_1 MFP_CFG(GPIO103, AF3)
363
364#define GPIO41_U2D_PHYDATA_0 MFP_CFG(GPIO41, AF3)
365#define GPIO42_U2D_PHYDATA_1 MFP_CFG(GPIO42, AF3)
366#define GPIO43_U2D_PHYDATA_2 MFP_CFG(GPIO43, AF3)
367#define GPIO44_U2D_PHYDATA_3 MFP_CFG(GPIO44, AF3)
368#define GPIO45_U2D_PHYDATA_4 MFP_CFG(GPIO45, AF3)
369#define GPIO46_U2D_PHYDATA_5 MFP_CFG(GPIO46, AF3)
370#define GPIO47_U2D_PHYDATA_6 MFP_CFG(GPIO47, AF3)
371#define GPIO48_U2D_PHYDATA_7 MFP_CFG(GPIO48, AF3)
372
373#define GPIO49_U2D_PHYDATA_0 MFP_CFG(GPIO49, AF3)
374#define GPIO50_U2D_PHYDATA_1 MFP_CFG(GPIO50, AF3)
375#define GPIO51_U2D_PHYDATA_2 MFP_CFG(GPIO51, AF3)
376#define GPIO52_U2D_PHYDATA_3 MFP_CFG(GPIO52, AF3)
377#define GPIO53_U2D_PHYDATA_4 MFP_CFG(GPIO53, AF3)
378#define GPIO54_U2D_PHYDATA_5 MFP_CFG(GPIO54, AF3)
379#define GPIO55_U2D_PHYDATA_6 MFP_CFG(GPIO55, AF3)
380#define GPIO56_U2D_PHYDATA_7 MFP_CFG(GPIO56, AF3)
381
382#define GPIO37_U2D_OPMODE0 MFP_CFG(GPIO37, AF4)
383#define GPIO61_U2D_OPMODE0 MFP_CFG(GPIO61, AF2)
384#define GPIO88_U2D_OPMODE0 MFP_CFG(GPIO88, AF7)
385
386#define GPIO38_U2D_OPMODE1 MFP_CFG(GPIO38, AF4)
387#define GPIO62_U2D_OPMODE1 MFP_CFG(GPIO62, AF2)
388#define GPIO104_U2D_OPMODE1 MFP_CFG(GPIO104, AF4)
389#define GPIO108_U2D_OPMODE1 MFP_CFG(GPIO108, AF5)
390
391#define GPIO74_U2D_RESET MFP_CFG(GPIO74, AF1)
392#define GPIO93_U2D_RESET MFP_CFG(GPIO93, AF2)
393#define GPIO98_U2D_RESET MFP_CFG(GPIO98, AF3)
394
395#define GPIO67_U2D_SUSPEND MFP_CFG(GPIO67, AF3)
396#define GPIO96_U2D_SUSPEND MFP_CFG(GPIO96, AF2)
397#define GPIO101_U2D_SUSPEND MFP_CFG(GPIO101, AF3)
398
399#define GPIO66_U2D_TERM_SEL MFP_CFG(GPIO66, AF5)
400#define GPIO95_U2D_TERM_SEL MFP_CFG(GPIO95, AF3)
401#define GPIO97_U2D_TERM_SEL MFP_CFG(GPIO97, AF7)
402#define GPIO100_U2D_TERM_SEL MFP_CFG(GPIO100, AF5)
403
404#define GPIO39_U2D_TXVALID MFP_CFG(GPIO39, AF4)
405#define GPIO70_U2D_TXVALID MFP_CFG(GPIO70, AF5)
406#define GPIO83_U2D_TXVALID MFP_CFG(GPIO83, AF7)
407
408#define GPIO65_U2D_XCVR_SEL MFP_CFG(GPIO65, AF5)
409#define GPIO94_U2D_XCVR_SEL MFP_CFG(GPIO94, AF3)
410#define GPIO99_U2D_XCVR_SEL MFP_CFG(GPIO99, AF5)
411
412/* USB Host 1.1 */
413#define GPIO2_2_USBH_PEN MFP_CFG(GPIO2_2, AF1)
414#define GPIO3_2_USBH_PWR MFP_CFG(GPIO3_2, AF1)
415
416/* USB P2 */
417#define GPIO97_USB_P2_2 MFP_CFG(GPIO97, AF2)
418#define GPIO97_USB_P2_6 MFP_CFG(GPIO97, AF4)
419#define GPIO98_USB_P2_2 MFP_CFG(GPIO98, AF4)
420#define GPIO98_USB_P2_6 MFP_CFG(GPIO98, AF2)
421#define GPIO99_USB_P2_1 MFP_CFG(GPIO99, AF2)
422#define GPIO100_USB_P2_4 MFP_CFG(GPIO100, AF2)
423#define GPIO101_USB_P2_8 MFP_CFG(GPIO101, AF2)
424#define GPIO102_USB_P2_3 MFP_CFG(GPIO102, AF2)
425#define GPIO103_USB_P2_5 MFP_CFG(GPIO103, AF2)
426#define GPIO104_USB_P2_7 MFP_CFG(GPIO104, AF2)
427
428/* USB P3 */
429#define GPIO75_USB_P3_1 MFP_CFG(GPIO75, AF2)
430#define GPIO76_USB_P3_2 MFP_CFG(GPIO76, AF2)
431#define GPIO77_USB_P3_3 MFP_CFG(GPIO77, AF2)
432#define GPIO78_USB_P3_4 MFP_CFG(GPIO78, AF2)
433#define GPIO79_USB_P3_5 MFP_CFG(GPIO79, AF2)
434#define GPIO80_USB_P3_6 MFP_CFG(GPIO80, AF2)
435
436#define GPIO13_CHOUT0 MFP_CFG(GPIO13, AF6)
437#define GPIO14_CHOUT1 MFP_CFG(GPIO14, AF6)
438
439#define GPIO2_RDY MFP_CFG(GPIO2, AF1)
440#define GPIO5_NPIOR MFP_CFG(GPIO5, AF3)
441
442#define GPIO11_PWM0_OUT MFP_CFG(GPIO11, AF1)
443#define GPIO12_PWM1_OUT MFP_CFG(GPIO12, AF1)
444#define GPIO13_PWM2_OUT MFP_CFG(GPIO13, AF1)
445#define GPIO14_PWM3_OUT MFP_CFG(GPIO14, AF1)
446
447#endif /* __ASM_ARCH_MFP_PXA320_H */
diff --git a/include/asm-arm/arch-pxa/mfp-pxa930.h b/include/asm-arm/arch-pxa/mfp-pxa930.h
deleted file mode 100644
index c4e945ab1923..000000000000
--- a/include/asm-arm/arch-pxa/mfp-pxa930.h
+++ /dev/null
@@ -1,491 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-pxa/mfp-pxa930.h
3 *
4 * PXA930 specific MFP configuration definitions
5 *
6 * Copyright (C) 2007-2008 Marvell International Ltd.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 */
12
13#ifndef __ASM_ARCH_MFP_PXA9xx_H
14#define __ASM_ARCH_MFP_PXA9xx_H
15
16#include <asm/arch/mfp.h>
17#include <asm/arch/mfp-pxa3xx.h>
18
19/* GPIO */
20#define GPIO46_GPIO MFP_CFG(GPIO46, AF0)
21#define GPIO49_GPIO MFP_CFG(GPIO49, AF0)
22#define GPIO50_GPIO MFP_CFG(GPIO50, AF0)
23#define GPIO51_GPIO MFP_CFG(GPIO51, AF0)
24#define GPIO52_GPIO MFP_CFG(GPIO52, AF0)
25#define GPIO56_GPIO MFP_CFG(GPIO56, AF0)
26#define GPIO58_GPIO MFP_CFG(GPIO58, AF0)
27#define GPIO59_GPIO MFP_CFG(GPIO59, AF0)
28#define GPIO60_GPIO MFP_CFG(GPIO60, AF0)
29#define GPIO61_GPIO MFP_CFG(GPIO61, AF0)
30#define GPIO62_GPIO MFP_CFG(GPIO62, AF0)
31
32#define GSIM_UCLK_GPIO_79 MFP_CFG(GSIM_UCLK, AF0)
33#define GSIM_UIO_GPIO_80 MFP_CFG(GSIM_UIO, AF0)
34#define GSIM_nURST_GPIO_81 MFP_CFG(GSIM_nURST, AF0)
35#define GSIM_UDET_GPIO_82 MFP_CFG(GSIM_UDET, AF0)
36
37#define DF_IO15_GPIO_28 MFP_CFG(DF_IO15, AF0)
38#define DF_IO14_GPIO_29 MFP_CFG(DF_IO14, AF0)
39#define DF_IO13_GPIO_30 MFP_CFG(DF_IO13, AF0)
40#define DF_IO12_GPIO_31 MFP_CFG(DF_IO12, AF0)
41#define DF_IO11_GPIO_32 MFP_CFG(DF_IO11, AF0)
42#define DF_IO10_GPIO_33 MFP_CFG(DF_IO10, AF0)
43#define DF_IO9_GPIO_34 MFP_CFG(DF_IO9, AF0)
44#define DF_IO8_GPIO_35 MFP_CFG(DF_IO8, AF0)
45#define DF_IO7_GPIO_36 MFP_CFG(DF_IO7, AF0)
46#define DF_IO6_GPIO_37 MFP_CFG(DF_IO6, AF0)
47#define DF_IO5_GPIO_38 MFP_CFG(DF_IO5, AF0)
48#define DF_IO4_GPIO_39 MFP_CFG(DF_IO4, AF0)
49#define DF_IO3_GPIO_40 MFP_CFG(DF_IO3, AF0)
50#define DF_IO2_GPIO_41 MFP_CFG(DF_IO2, AF0)
51#define DF_IO1_GPIO_42 MFP_CFG(DF_IO1, AF0)
52#define DF_IO0_GPIO_43 MFP_CFG(DF_IO0, AF0)
53#define DF_nCS0_GPIO_44 MFP_CFG(DF_nCS0, AF0)
54#define DF_nCS1_GPIO_45 MFP_CFG(DF_nCS1, AF0)
55#define DF_nWE_GPIO_46 MFP_CFG(DF_nWE, AF0)
56#define DF_nRE_nOE_GPIO_47 MFP_CFG(DF_nRE_nOE, AF0)
57#define DF_CLE_nOE_GPIO_48 MFP_CFG(DF_CLE_nOE, AF0)
58#define DF_nADV1_ALE_GPIO_49 MFP_CFG(DF_nADV1_ALE, AF0)
59#define DF_nADV2_ALE_GPIO_50 MFP_CFG(DF_nADV2_ALE, AF0)
60#define DF_INT_RnB_GPIO_51 MFP_CFG(DF_INT_RnB, AF0)
61#define DF_SCLK_E_GPIO_52 MFP_CFG(DF_SCLK_E, AF0)
62
63#define DF_ADDR0_GPIO_53 MFP_CFG(DF_ADDR0, AF0)
64#define DF_ADDR1_GPIO_54 MFP_CFG(DF_ADDR1, AF0)
65#define DF_ADDR2_GPIO_55 MFP_CFG(DF_ADDR2, AF0)
66#define DF_ADDR3_GPIO_56 MFP_CFG(DF_ADDR3, AF0)
67#define nXCVREN_GPIO_57 MFP_CFG(nXCVREN, AF0)
68#define nLUA_GPIO_58 MFP_CFG(nLUA, AF0)
69#define nLLA_GPIO_59 MFP_CFG(nLLA, AF0)
70#define nBE0_GPIO_60 MFP_CFG(nBE0, AF0)
71#define nBE1_GPIO_61 MFP_CFG(nBE1, AF0)
72#define RDY_GPIO_62 MFP_CFG(RDY, AF0)
73
74/* Chip Select */
75#define DF_nCS0_nCS2 MFP_CFG_LPM(DF_nCS0, AF3, PULL_HIGH)
76#define DF_nCS1_nCS3 MFP_CFG_LPM(DF_nCS1, AF3, PULL_HIGH)
77
78/* AC97 */
79#define GPIO83_BAC97_SYSCLK MFP_CFG(GPIO83, AF3)
80#define GPIO84_BAC97_SDATA_IN0 MFP_CFG(GPIO84, AF3)
81#define GPIO85_BAC97_BITCLK MFP_CFG(GPIO85, AF3)
82#define GPIO86_BAC97_nRESET MFP_CFG(GPIO86, AF3)
83#define GPIO87_BAC97_SYNC MFP_CFG(GPIO87, AF3)
84#define GPIO88_BAC97_SDATA_OUT MFP_CFG(GPIO88, AF3)
85
86/* I2C */
87#define GPIO39_CI2C_SCL MFP_CFG_LPM(GPIO39, AF3, PULL_HIGH)
88#define GPIO40_CI2C_SDA MFP_CFG_LPM(GPIO40, AF3, PULL_HIGH)
89
90#define GPIO51_CI2C_SCL MFP_CFG_LPM(GPIO51, AF3, PULL_HIGH)
91#define GPIO52_CI2C_SDA MFP_CFG_LPM(GPIO52, AF3, PULL_HIGH)
92
93#define GPIO63_CI2C_SCL MFP_CFG_LPM(GPIO63, AF4, PULL_HIGH)
94#define GPIO64_CI2C_SDA MFP_CFG_LPM(GPIO64, AF4, PULL_HIGH)
95
96#define GPIO77_CI2C_SCL MFP_CFG_LPM(GPIO77, AF2, PULL_HIGH)
97#define GPIO78_CI2C_SDA MFP_CFG_LPM(GPIO78, AF2, PULL_HIGH)
98
99#define GPIO89_CI2C_SCL MFP_CFG_LPM(GPIO89, AF1, PULL_HIGH)
100#define GPIO90_CI2C_SDA MFP_CFG_LPM(GPIO90, AF1, PULL_HIGH)
101
102#define GPIO95_CI2C_SCL MFP_CFG_LPM(GPIO95, AF1, PULL_HIGH)
103#define GPIO96_CI2C_SDA MFP_CFG_LPM(GPIO96, AF1, PULL_HIGH)
104
105#define GPIO97_CI2C_SCL MFP_CFG_LPM(GPIO97, AF3, PULL_HIGH)
106#define GPIO98_CI2C_SDA MFP_CFG_LPM(GPIO98, AF3, PULL_HIGH)
107
108/* QCI */
109#define GPIO63_CI_DD_9 MFP_CFG_LPM(GPIO63, AF1, PULL_LOW)
110#define GPIO64_CI_DD_8 MFP_CFG_LPM(GPIO64, AF1, PULL_LOW)
111#define GPIO65_CI_DD_7 MFP_CFG_LPM(GPIO65, AF1, PULL_LOW)
112#define GPIO66_CI_DD_6 MFP_CFG_LPM(GPIO66, AF1, PULL_LOW)
113#define GPIO67_CI_DD_5 MFP_CFG_LPM(GPIO67, AF1, PULL_LOW)
114#define GPIO68_CI_DD_4 MFP_CFG_LPM(GPIO68, AF1, PULL_LOW)
115#define GPIO69_CI_DD_3 MFP_CFG_LPM(GPIO69, AF1, PULL_LOW)
116#define GPIO70_CI_DD_2 MFP_CFG_LPM(GPIO70, AF1, PULL_LOW)
117#define GPIO71_CI_DD_1 MFP_CFG_LPM(GPIO71, AF1, PULL_LOW)
118#define GPIO72_CI_DD_0 MFP_CFG_LPM(GPIO72, AF1, PULL_LOW)
119#define GPIO73_CI_HSYNC MFP_CFG_LPM(GPIO73, AF1, PULL_LOW)
120#define GPIO74_CI_VSYNC MFP_CFG_LPM(GPIO74, AF1, PULL_LOW)
121#define GPIO75_CI_MCLK MFP_CFG_LPM(GPIO75, AF1, PULL_LOW)
122#define GPIO76_CI_PCLK MFP_CFG_LPM(GPIO76, AF1, PULL_LOW)
123
124/* KEYPAD */
125#define GPIO4_KP_DKIN_4 MFP_CFG_LPM(GPIO4, AF3, FLOAT)
126#define GPIO5_KP_DKIN_5 MFP_CFG_LPM(GPIO5, AF3, FLOAT)
127#define GPIO6_KP_DKIN_6 MFP_CFG_LPM(GPIO6, AF3, FLOAT)
128#define GPIO7_KP_DKIN_7 MFP_CFG_LPM(GPIO7, AF3, FLOAT)
129#define GPIO8_KP_DKIN_4 MFP_CFG_LPM(GPIO8, AF3, FLOAT)
130#define GPIO9_KP_DKIN_5 MFP_CFG_LPM(GPIO9, AF3, FLOAT)
131#define GPIO10_KP_DKIN_6 MFP_CFG_LPM(GPIO10, AF3, FLOAT)
132#define GPIO11_KP_DKIN_7 MFP_CFG_LPM(GPIO11, AF3, FLOAT)
133
134#define GPIO12_KP_DKIN_0 MFP_CFG_LPM(GPIO12, AF2, FLOAT)
135#define GPIO13_KP_DKIN_1 MFP_CFG_LPM(GPIO13, AF2, FLOAT)
136#define GPIO14_KP_DKIN_2 MFP_CFG_LPM(GPIO14, AF2, FLOAT)
137#define GPIO15_KP_DKIN_3 MFP_CFG_LPM(GPIO15, AF2, FLOAT)
138
139#define GPIO41_KP_DKIN_0 MFP_CFG_LPM(GPIO41, AF2, FLOAT)
140#define GPIO42_KP_DKIN_1 MFP_CFG_LPM(GPIO42, AF2, FLOAT)
141#define GPIO43_KP_DKIN_2 MFP_CFG_LPM(GPIO43, AF2, FLOAT)
142#define GPIO44_KP_DKIN_3 MFP_CFG_LPM(GPIO44, AF2, FLOAT)
143#define GPIO41_KP_DKIN_4 MFP_CFG_LPM(GPIO41, AF4, FLOAT)
144#define GPIO42_KP_DKIN_5 MFP_CFG_LPM(GPIO42, AF4, FLOAT)
145
146#define GPIO0_KP_MKIN_0 MFP_CFG_LPM(GPIO0, AF1, FLOAT)
147#define GPIO2_KP_MKIN_1 MFP_CFG_LPM(GPIO2, AF1, FLOAT)
148#define GPIO4_KP_MKIN_2 MFP_CFG_LPM(GPIO4, AF1, FLOAT)
149#define GPIO6_KP_MKIN_3 MFP_CFG_LPM(GPIO6, AF1, FLOAT)
150#define GPIO8_KP_MKIN_4 MFP_CFG_LPM(GPIO8, AF1, FLOAT)
151#define GPIO10_KP_MKIN_5 MFP_CFG_LPM(GPIO10, AF1, FLOAT)
152#define GPIO12_KP_MKIN_6 MFP_CFG_LPM(GPIO12, AF1, FLOAT)
153#define GPIO14_KP_MKIN_7 MFP_CFG(GPIO14, AF1)
154#define GPIO35_KP_MKIN_5 MFP_CFG(GPIO35, AF4)
155
156#define GPIO1_KP_MKOUT_0 MFP_CFG_LPM(GPIO1, AF1, DRIVE_HIGH)
157#define GPIO3_KP_MKOUT_1 MFP_CFG_LPM(GPIO3, AF1, DRIVE_HIGH)
158#define GPIO5_KP_MKOUT_2 MFP_CFG_LPM(GPIO5, AF1, DRIVE_HIGH)
159#define GPIO7_KP_MKOUT_3 MFP_CFG_LPM(GPIO7, AF1, DRIVE_HIGH)
160#define GPIO9_KP_MKOUT_4 MFP_CFG_LPM(GPIO9, AF1, DRIVE_HIGH)
161#define GPIO11_KP_MKOUT_5 MFP_CFG_LPM(GPIO11, AF1, DRIVE_HIGH)
162#define GPIO13_KP_MKOUT_6 MFP_CFG_LPM(GPIO13, AF1, DRIVE_HIGH)
163#define GPIO15_KP_MKOUT_7 MFP_CFG_LPM(GPIO15, AF1, DRIVE_HIGH)
164#define GPIO36_KP_MKOUT_5 MFP_CFG_LPM(GPIO36, AF4, DRIVE_HIGH)
165
166/* LCD */
167#define GPIO17_LCD_FCLK_RD MFP_CFG(GPIO17, AF1)
168#define GPIO18_LCD_LCLK_A0 MFP_CFG(GPIO18, AF1)
169#define GPIO19_LCD_PCLK_WR MFP_CFG(GPIO19, AF1)
170#define GPIO20_LCD_BIAS MFP_CFG(GPIO20, AF1)
171#define GPIO21_LCD_CS MFP_CFG(GPIO21, AF1)
172#define GPIO22_LCD_CS2 MFP_CFG(GPIO22, AF2)
173#define GPIO22_LCD_VSYNC MFP_CFG(GPIO22, AF1)
174#define GPIO23_LCD_DD0 MFP_CFG(GPIO23, AF1)
175#define GPIO24_LCD_DD1 MFP_CFG(GPIO24, AF1)
176#define GPIO25_LCD_DD2 MFP_CFG(GPIO25, AF1)
177#define GPIO26_LCD_DD3 MFP_CFG(GPIO26, AF1)
178#define GPIO27_LCD_DD4 MFP_CFG(GPIO27, AF1)
179#define GPIO28_LCD_DD5 MFP_CFG(GPIO28, AF1)
180#define GPIO29_LCD_DD6 MFP_CFG(GPIO29, AF1)
181#define GPIO30_LCD_DD7 MFP_CFG(GPIO30, AF1)
182#define GPIO31_LCD_DD8 MFP_CFG(GPIO31, AF1)
183#define GPIO32_LCD_DD9 MFP_CFG(GPIO32, AF1)
184#define GPIO33_LCD_DD10 MFP_CFG(GPIO33, AF1)
185#define GPIO34_LCD_DD11 MFP_CFG(GPIO34, AF1)
186#define GPIO35_LCD_DD12 MFP_CFG(GPIO35, AF1)
187#define GPIO36_LCD_DD13 MFP_CFG(GPIO36, AF1)
188#define GPIO37_LCD_DD14 MFP_CFG(GPIO37, AF1)
189#define GPIO38_LCD_DD15 MFP_CFG(GPIO38, AF1)
190#define GPIO39_LCD_DD16 MFP_CFG(GPIO39, AF1)
191#define GPIO40_LCD_DD17 MFP_CFG(GPIO40, AF1)
192#define GPIO41_LCD_CS2 MFP_CFG(GPIO41, AF3)
193#define GPIO42_LCD_VSYNC2 MFP_CFG(GPIO42, AF3)
194#define GPIO44_LCD_DD7 MFP_CFG(GPIO44, AF1)
195
196/* Mini-LCD */
197#define GPIO17_MLCD_FCLK MFP_CFG(GPIO17, AF3)
198#define GPIO18_MLCD_LCLK MFP_CFG(GPIO18, AF3)
199#define GPIO19_MLCD_PCLK MFP_CFG(GPIO19, AF3)
200#define GPIO20_MLCD_BIAS MFP_CFG(GPIO20, AF3)
201#define GPIO23_MLCD_DD0 MFP_CFG(GPIO23, AF3)
202#define GPIO24_MLCD_DD1 MFP_CFG(GPIO24, AF3)
203#define GPIO25_MLCD_DD2 MFP_CFG(GPIO25, AF3)
204#define GPIO26_MLCD_DD3 MFP_CFG(GPIO26, AF3)
205#define GPIO27_MLCD_DD4 MFP_CFG(GPIO27, AF3)
206#define GPIO28_MLCD_DD5 MFP_CFG(GPIO28, AF3)
207#define GPIO29_MLCD_DD6 MFP_CFG(GPIO29, AF3)
208#define GPIO30_MLCD_DD7 MFP_CFG(GPIO30, AF3)
209#define GPIO31_MLCD_DD8 MFP_CFG(GPIO31, AF3)
210#define GPIO32_MLCD_DD9 MFP_CFG(GPIO32, AF3)
211#define GPIO33_MLCD_DD10 MFP_CFG(GPIO33, AF3)
212#define GPIO34_MLCD_DD11 MFP_CFG(GPIO34, AF3)
213#define GPIO35_MLCD_DD12 MFP_CFG(GPIO35, AF3)
214#define GPIO36_MLCD_DD13 MFP_CFG(GPIO36, AF3)
215#define GPIO37_MLCD_DD14 MFP_CFG(GPIO37, AF3)
216#define GPIO38_MLCD_DD15 MFP_CFG(GPIO38, AF3)
217#define GPIO44_MLCD_DD7 MFP_CFG(GPIO44, AF5)
218
219/* MMC1 */
220#define GPIO10_MMC1_DAT3 MFP_CFG(GPIO10, AF4)
221#define GPIO11_MMC1_DAT2 MFP_CFG(GPIO11, AF4)
222#define GPIO12_MMC1_DAT1 MFP_CFG(GPIO12, AF4)
223#define GPIO13_MMC1_DAT0 MFP_CFG(GPIO13, AF4)
224#define GPIO14_MMC1_CMD MFP_CFG(GPIO14, AF4)
225#define GPIO15_MMC1_CLK MFP_CFG(GPIO15, AF4)
226#define GPIO55_MMC1_CMD MFP_CFG(GPIO55, AF3)
227#define GPIO56_MMC1_CLK MFP_CFG(GPIO56, AF3)
228#define GPIO57_MMC1_DAT0 MFP_CFG(GPIO57, AF3)
229#define GPIO58_MMC1_DAT1 MFP_CFG(GPIO58, AF3)
230#define GPIO59_MMC1_DAT2 MFP_CFG(GPIO59, AF3)
231#define GPIO60_MMC1_DAT3 MFP_CFG(GPIO60, AF3)
232
233#define DF_ADDR0_MMC1_CLK MFP_CFG(DF_ADDR0, AF2)
234#define DF_ADDR1_MMC1_CMD MFP_CFG(DF_ADDR1, AF2)
235#define DF_ADDR2_MMC1_DAT0 MFP_CFG(DF_ADDR2, AF2)
236#define DF_ADDR3_MMC1_DAT1 MFP_CFG(DF_ADDR3, AF3)
237#define nXCVREN_MMC1_DAT2 MFP_CFG(nXCVREN, AF2)
238
239/* MMC2 */
240#define GPIO31_MMC2_CMD MFP_CFG(GPIO31, AF7)
241#define GPIO32_MMC2_CLK MFP_CFG(GPIO32, AF7)
242#define GPIO33_MMC2_DAT0 MFP_CFG(GPIO33, AF7)
243#define GPIO34_MMC2_DAT1 MFP_CFG(GPIO34, AF7)
244#define GPIO35_MMC2_DAT2 MFP_CFG(GPIO35, AF7)
245#define GPIO36_MMC2_DAT3 MFP_CFG(GPIO36, AF7)
246
247#define GPIO101_MMC2_DAT3 MFP_CFG(GPIO101, AF1)
248#define GPIO102_MMC2_DAT2 MFP_CFG(GPIO102, AF1)
249#define GPIO103_MMC2_DAT1 MFP_CFG(GPIO103, AF1)
250#define GPIO104_MMC2_DAT0 MFP_CFG(GPIO104, AF1)
251#define GPIO105_MMC2_CMD MFP_CFG(GPIO105, AF1)
252#define GPIO106_MMC2_CLK MFP_CFG(GPIO106, AF1)
253
254#define DF_IO10_MMC2_DAT3 MFP_CFG(DF_IO10, AF3)
255#define DF_IO11_MMC2_DAT2 MFP_CFG(DF_IO11, AF3)
256#define DF_IO12_MMC2_DAT1 MFP_CFG(DF_IO12, AF3)
257#define DF_IO13_MMC2_DAT0 MFP_CFG(DF_IO13, AF3)
258#define DF_IO14_MMC2_CLK MFP_CFG(DF_IO14, AF3)
259#define DF_IO15_MMC2_CMD MFP_CFG(DF_IO15, AF3)
260
261/* BSSP1 */
262#define GPIO12_BSSP1_CLK MFP_CFG(GPIO12, AF3)
263#define GPIO13_BSSP1_FRM MFP_CFG(GPIO13, AF3)
264#define GPIO14_BSSP1_RXD MFP_CFG(GPIO14, AF3)
265#define GPIO15_BSSP1_TXD MFP_CFG(GPIO15, AF3)
266#define GPIO97_BSSP1_CLK MFP_CFG(GPIO97, AF5)
267#define GPIO98_BSSP1_FRM MFP_CFG(GPIO98, AF5)
268
269/* BSSP2 */
270#define GPIO84_BSSP2_SDATA_IN MFP_CFG(GPIO84, AF1)
271#define GPIO85_BSSP2_BITCLK MFP_CFG(GPIO85, AF1)
272#define GPIO86_BSSP2_SYSCLK MFP_CFG(GPIO86, AF1)
273#define GPIO87_BSSP2_SYNC MFP_CFG(GPIO87, AF1)
274#define GPIO88_BSSP2_DATA_OUT MFP_CFG(GPIO88, AF1)
275#define GPIO86_BSSP2_SDATA_IN MFP_CFG(GPIO86, AF4)
276
277/* BSSP3 */
278#define GPIO79_BSSP3_CLK MFP_CFG(GPIO79, AF1)
279#define GPIO80_BSSP3_FRM MFP_CFG(GPIO80, AF1)
280#define GPIO81_BSSP3_TXD MFP_CFG(GPIO81, AF1)
281#define GPIO82_BSSP3_RXD MFP_CFG(GPIO82, AF1)
282#define GPIO83_BSSP3_SYSCLK MFP_CFG(GPIO83, AF1)
283
284/* BSSP4 */
285#define GPIO43_BSSP4_CLK MFP_CFG(GPIO43, AF4)
286#define GPIO44_BSSP4_FRM MFP_CFG(GPIO44, AF4)
287#define GPIO45_BSSP4_TXD MFP_CFG(GPIO45, AF4)
288#define GPIO46_BSSP4_RXD MFP_CFG(GPIO46, AF4)
289
290#define GPIO51_BSSP4_CLK MFP_CFG(GPIO51, AF4)
291#define GPIO52_BSSP4_FRM MFP_CFG(GPIO52, AF4)
292#define GPIO53_BSSP4_TXD MFP_CFG(GPIO53, AF4)
293#define GPIO54_BSSP4_RXD MFP_CFG(GPIO54, AF4)
294
295/* GSSP1 */
296#define GPIO79_GSSP1_CLK MFP_CFG(GPIO79, AF2)
297#define GPIO80_GSSP1_FRM MFP_CFG(GPIO80, AF2)
298#define GPIO81_GSSP1_TXD MFP_CFG(GPIO81, AF2)
299#define GPIO82_GSSP1_RXD MFP_CFG(GPIO82, AF2)
300#define GPIO83_GSSP1_SYSCLK MFP_CFG(GPIO83, AF2)
301
302#define GPIO93_GSSP1_CLK MFP_CFG(GPIO93, AF4)
303#define GPIO94_GSSP1_FRM MFP_CFG(GPIO94, AF4)
304#define GPIO95_GSSP1_TXD MFP_CFG(GPIO95, AF4)
305#define GPIO96_GSSP1_RXD MFP_CFG(GPIO96, AF4)
306
307/* GSSP2 */
308#define GPIO47_GSSP2_CLK MFP_CFG(GPIO47, AF4)
309#define GPIO48_GSSP2_FRM MFP_CFG(GPIO48, AF4)
310#define GPIO49_GSSP2_RXD MFP_CFG(GPIO49, AF4)
311#define GPIO50_GSSP2_TXD MFP_CFG(GPIO50, AF4)
312
313#define GPIO69_GSSP2_CLK MFP_CFG(GPIO69, AF4)
314#define GPIO70_GSSP2_FRM MFP_CFG(GPIO70, AF4)
315#define GPIO71_GSSP2_RXD MFP_CFG(GPIO71, AF4)
316#define GPIO72_GSSP2_TXD MFP_CFG(GPIO72, AF4)
317
318#define GPIO84_GSSP2_RXD MFP_CFG(GPIO84, AF2)
319#define GPIO85_GSSP2_CLK MFP_CFG(GPIO85, AF2)
320#define GPIO86_GSSP2_SYSCLK MFP_CFG(GPIO86, AF2)
321#define GPIO87_GSSP2_FRM MFP_CFG(GPIO87, AF2)
322#define GPIO88_GSSP2_TXD MFP_CFG(GPIO88, AF2)
323#define GPIO86_GSSP2_RXD MFP_CFG(GPIO86, AF5)
324
325#define GPIO103_GSSP2_CLK MFP_CFG(GPIO103, AF2)
326#define GPIO104_GSSP2_FRM MFP_CFG(GPIO104, AF2)
327#define GPIO105_GSSP2_RXD MFP_CFG(GPIO105, AF2)
328#define GPIO106_GSSP2_TXD MFP_CFG(GPIO106, AF2)
329
330/* UART1 - FFUART */
331#define GPIO47_UART1_DSR_N MFP_CFG(GPIO47, AF1)
332#define GPIO48_UART1_DTR_N MFP_CFG(GPIO48, AF1)
333#define GPIO49_UART1_RI MFP_CFG(GPIO49, AF1)
334#define GPIO50_UART1_DCD MFP_CFG(GPIO50, AF1)
335#define GPIO51_UART1_CTS MFP_CFG(GPIO51, AF1)
336#define GPIO52_UART1_RTS MFP_CFG(GPIO52, AF1)
337#define GPIO53_UART1_RXD MFP_CFG(GPIO53, AF1)
338#define GPIO54_UART1_TXD MFP_CFG(GPIO54, AF1)
339
340#define GPIO63_UART1_TXD MFP_CFG(GPIO63, AF2)
341#define GPIO64_UART1_RXD MFP_CFG(GPIO64, AF2)
342#define GPIO65_UART1_DSR MFP_CFG(GPIO65, AF2)
343#define GPIO66_UART1_DTR MFP_CFG(GPIO66, AF2)
344#define GPIO67_UART1_RI MFP_CFG(GPIO67, AF2)
345#define GPIO68_UART1_DCD MFP_CFG(GPIO68, AF2)
346#define GPIO69_UART1_CTS MFP_CFG(GPIO69, AF2)
347#define GPIO70_UART1_RTS MFP_CFG(GPIO70, AF2)
348
349/* UART2 - BTUART */
350#define GPIO91_UART2_RXD MFP_CFG(GPIO91, AF1)
351#define GPIO92_UART2_TXD MFP_CFG(GPIO92, AF1)
352#define GPIO93_UART2_CTS MFP_CFG(GPIO93, AF1)
353#define GPIO94_UART2_RTS MFP_CFG(GPIO94, AF1)
354
355/* UART3 - STUART */
356#define GPIO43_UART3_RTS MFP_CFG(GPIO43, AF3)
357#define GPIO44_UART3_CTS MFP_CFG(GPIO44, AF3)
358#define GPIO45_UART3_RXD MFP_CFG(GPIO45, AF3)
359#define GPIO46_UART3_TXD MFP_CFG(GPIO46, AF3)
360
361#define GPIO75_UART3_RTS MFP_CFG(GPIO75, AF5)
362#define GPIO76_UART3_CTS MFP_CFG(GPIO76, AF5)
363#define GPIO77_UART3_TXD MFP_CFG(GPIO77, AF5)
364#define GPIO78_UART3_RXD MFP_CFG(GPIO78, AF5)
365
366/* DFI */
367#define DF_IO0_DF_IO0 MFP_CFG(DF_IO0, AF2)
368#define DF_IO1_DF_IO1 MFP_CFG(DF_IO1, AF2)
369#define DF_IO2_DF_IO2 MFP_CFG(DF_IO2, AF2)
370#define DF_IO3_DF_IO3 MFP_CFG(DF_IO3, AF2)
371#define DF_IO4_DF_IO4 MFP_CFG(DF_IO4, AF2)
372#define DF_IO5_DF_IO5 MFP_CFG(DF_IO5, AF2)
373#define DF_IO6_DF_IO6 MFP_CFG(DF_IO6, AF2)
374#define DF_IO7_DF_IO7 MFP_CFG(DF_IO7, AF2)
375#define DF_IO8_DF_IO8 MFP_CFG(DF_IO8, AF2)
376#define DF_IO9_DF_IO9 MFP_CFG(DF_IO9, AF2)
377#define DF_IO10_DF_IO10 MFP_CFG(DF_IO10, AF2)
378#define DF_IO11_DF_IO11 MFP_CFG(DF_IO11, AF2)
379#define DF_IO12_DF_IO12 MFP_CFG(DF_IO12, AF2)
380#define DF_IO13_DF_IO13 MFP_CFG(DF_IO13, AF2)
381#define DF_IO14_DF_IO14 MFP_CFG(DF_IO14, AF2)
382#define DF_IO15_DF_IO15 MFP_CFG(DF_IO15, AF2)
383#define DF_nADV1_ALE_DF_nADV1 MFP_CFG(DF_nADV1_ALE, AF2)
384#define DF_nADV2_ALE_DF_nADV2 MFP_CFG(DF_nADV2_ALE, AF2)
385#define DF_nCS0_DF_nCS0 MFP_CFG(DF_nCS0, AF2)
386#define DF_nCS1_DF_nCS1 MFP_CFG(DF_nCS1, AF2)
387#define DF_nRE_nOE_DF_nOE MFP_CFG(DF_nRE_nOE, AF2)
388#define DF_nWE_DF_nWE MFP_CFG(DF_nWE, AF2)
389
390/* DFI - NAND */
391#define DF_CLE_nOE_ND_CLE MFP_CFG_LPM(DF_CLE_nOE, AF1, PULL_HIGH)
392#define DF_INT_RnB_ND_INT_RnB MFP_CFG_LPM(DF_INT_RnB, AF1, PULL_LOW)
393#define DF_IO0_ND_IO0 MFP_CFG_LPM(DF_IO0, AF1, PULL_LOW)
394#define DF_IO1_ND_IO1 MFP_CFG_LPM(DF_IO1, AF1, PULL_LOW)
395#define DF_IO2_ND_IO2 MFP_CFG_LPM(DF_IO2, AF1, PULL_LOW)
396#define DF_IO3_ND_IO3 MFP_CFG_LPM(DF_IO3, AF1, PULL_LOW)
397#define DF_IO4_ND_IO4 MFP_CFG_LPM(DF_IO4, AF1, PULL_LOW)
398#define DF_IO5_ND_IO5 MFP_CFG_LPM(DF_IO5, AF1, PULL_LOW)
399#define DF_IO6_ND_IO6 MFP_CFG_LPM(DF_IO6, AF1, PULL_LOW)
400#define DF_IO7_ND_IO7 MFP_CFG_LPM(DF_IO7, AF1, PULL_LOW)
401#define DF_IO8_ND_IO8 MFP_CFG_LPM(DF_IO8, AF1, PULL_LOW)
402#define DF_IO9_ND_IO9 MFP_CFG_LPM(DF_IO9, AF1, PULL_LOW)
403#define DF_IO10_ND_IO10 MFP_CFG_LPM(DF_IO10, AF1, PULL_LOW)
404#define DF_IO11_ND_IO11 MFP_CFG_LPM(DF_IO11, AF1, PULL_LOW)
405#define DF_IO12_ND_IO12 MFP_CFG_LPM(DF_IO12, AF1, PULL_LOW)
406#define DF_IO13_ND_IO13 MFP_CFG_LPM(DF_IO13, AF1, PULL_LOW)
407#define DF_IO14_ND_IO14 MFP_CFG_LPM(DF_IO14, AF1, PULL_LOW)
408#define DF_IO15_ND_IO15 MFP_CFG_LPM(DF_IO15, AF1, PULL_LOW)
409#define DF_nADV1_ALE_ND_ALE MFP_CFG_LPM(DF_nADV1_ALE, AF1, PULL_HIGH)
410#define DF_nADV2_ALE_ND_ALE MFP_CFG_LPM(DF_nADV2_ALE, AF1, PULL_HIGH)
411#define DF_nADV2_ALE_nCS3 MFP_CFG_LPM(DF_nADV2_ALE, AF3, PULL_HIGH)
412#define DF_nCS0_ND_nCS0 MFP_CFG_LPM(DF_nCS0, AF1, PULL_HIGH)
413#define DF_nCS1_ND_nCS1 MFP_CFG_LPM(DF_nCS1, AF1, PULL_HIGH)
414#define DF_nRE_nOE_ND_nRE MFP_CFG_LPM(DF_nRE_nOE, AF1, PULL_HIGH)
415#define DF_nWE_ND_nWE MFP_CFG_LPM(DF_nWE, AF1, PULL_HIGH)
416
417/* PWM */
418#define GPIO41_PWM0 MFP_CFG_LPM(GPIO41, AF1, PULL_LOW)
419#define GPIO42_PWM1 MFP_CFG_LPM(GPIO42, AF1, PULL_LOW)
420#define GPIO43_PWM3 MFP_CFG_LPM(GPIO43, AF1, PULL_LOW)
421#define GPIO20_PWM0 MFP_CFG_LPM(GPIO20, AF2, PULL_LOW)
422#define GPIO21_PWM2 MFP_CFG_LPM(GPIO21, AF3, PULL_LOW)
423#define GPIO22_PWM3 MFP_CFG_LPM(GPIO22, AF3, PULL_LOW)
424
425/* CIR */
426#define GPIO46_CIR_OUT MFP_CFG(GPIO46, AF1)
427#define GPIO77_CIR_OUT MFP_CFG(GPIO77, AF3)
428
429/* USB P2 */
430#define GPIO0_USB_P2_7 MFP_CFG(GPIO0, AF3)
431#define GPIO15_USB_P2_7 MFP_CFG(GPIO15, AF5)
432#define GPIO16_USB_P2_7 MFP_CFG(GPIO16, AF2)
433#define GPIO48_USB_P2_7 MFP_CFG(GPIO48, AF7)
434#define GPIO49_USB_P2_7 MFP_CFG(GPIO49, AF6)
435#define DF_IO9_USB_P2_7 MFP_CFG(DF_IO9, AF3)
436
437#define GPIO48_USB_P2_8 MFP_CFG(GPIO48, AF2)
438#define GPIO50_USB_P2_7 MFP_CFG_X(GPIO50, AF2, DS02X, FLOAT)
439#define GPIO51_USB_P2_5 MFP_CFG(GPIO51, AF2)
440#define GPIO47_USB_P2_4 MFP_CFG(GPIO47, AF2)
441#define GPIO53_USB_P2_3 MFP_CFG(GPIO53, AF2)
442#define GPIO54_USB_P2_6 MFP_CFG(GPIO54, AF2)
443#define GPIO49_USB_P2_2 MFP_CFG(GPIO49, AF2)
444#define GPIO52_USB_P2_1 MFP_CFG(GPIO52, AF2)
445
446#define GPIO63_USB_P2_8 MFP_CFG(GPIO63, AF3)
447#define GPIO64_USB_P2_7 MFP_CFG(GPIO64, AF3)
448#define GPIO65_USB_P2_6 MFP_CFG(GPIO65, AF3)
449#define GPIO66_USG_P2_5 MFP_CFG(GPIO66, AF3)
450#define GPIO67_USB_P2_4 MFP_CFG(GPIO67, AF3)
451#define GPIO68_USB_P2_3 MFP_CFG(GPIO68, AF3)
452#define GPIO69_USB_P2_2 MFP_CFG(GPIO69, AF3)
453#define GPIO70_USB_P2_1 MFP_CFG(GPIO70, AF3)
454
455/* ULPI */
456#define GPIO31_USB_ULPI_D0 MFP_CFG(GPIO31, AF4)
457#define GPIO30_USB_ULPI_D1 MFP_CFG(GPIO30, AF7)
458#define GPIO33_USB_ULPI_D2 MFP_CFG(GPIO33, AF5)
459#define GPIO34_USB_ULPI_D3 MFP_CFG(GPIO34, AF5)
460#define GPIO35_USB_ULPI_D4 MFP_CFG(GPIO35, AF5)
461#define GPIO36_USB_ULPI_D5 MFP_CFG(GPIO36, AF5)
462#define GPIO41_USB_ULPI_D6 MFP_CFG(GPIO41, AF5)
463#define GPIO42_USB_ULPI_D7 MFP_CFG(GPIO42, AF5)
464#define GPIO37_USB_ULPI_DIR MFP_CFG(GPIO37, AF4)
465#define GPIO38_USB_ULPI_CLK MFP_CFG(GPIO38, AF4)
466#define GPIO39_USB_ULPI_STP MFP_CFG(GPIO39, AF4)
467#define GPIO40_USB_ULPI_NXT MFP_CFG(GPIO40, AF4)
468
469#define GPIO3_CLK26MOUTDMD MFP_CFG(GPIO3, AF3)
470#define GPIO40_CLK26MOUTDMD MFP_CFG(GPIO40, AF7)
471#define GPIO94_CLK26MOUTDMD MFP_CFG(GPIO94, AF5)
472#define GPIO104_CLK26MOUTDMD MFP_CFG(GPIO104, AF4)
473#define DF_ADDR1_CLK26MOUTDMD MFP_CFG(DF_ADDR2, AF3)
474#define DF_ADDR3_CLK26MOUTDMD MFP_CFG(DF_ADDR3, AF3)
475
476#define GPIO14_CLK26MOUT MFP_CFG(GPIO14, AF5)
477#define GPIO38_CLK26MOUT MFP_CFG(GPIO38, AF7)
478#define GPIO92_CLK26MOUT MFP_CFG(GPIO92, AF5)
479#define GPIO105_CLK26MOUT MFP_CFG(GPIO105, AF4)
480
481#define GPIO2_CLK13MOUTDMD MFP_CFG(GPIO2, AF3)
482#define GPIO39_CLK13MOUTDMD MFP_CFG(GPIO39, AF7)
483#define GPIO50_CLK13MOUTDMD MFP_CFG(GPIO50, AF3)
484#define GPIO93_CLK13MOUTDMD MFP_CFG(GPIO93, AF5)
485#define GPIO103_CLK13MOUTDMD MFP_CFG(GPIO103, AF4)
486#define DF_ADDR2_CLK13MOUTDMD MFP_CFG(DF_ADDR2, AF3)
487
488/* 1 wire */
489#define GPIO95_OW_DQ_IN MFP_CFG(GPIO95, AF5)
490
491#endif /* __ASM_ARCH_MFP_PXA9xx_H */
diff --git a/include/asm-arm/arch-pxa/mfp.h b/include/asm-arm/arch-pxa/mfp.h
deleted file mode 100644
index e7d58798da67..000000000000
--- a/include/asm-arm/arch-pxa/mfp.h
+++ /dev/null
@@ -1,319 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-pxa/mfp.h
3 *
4 * Multi-Function Pin Definitions
5 *
6 * Copyright (C) 2007 Marvell International Ltd.
7 *
8 * 2007-8-21: eric miao <eric.miao@marvell.com>
9 * initial version
10 *
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License version 2 as
13 * published by the Free Software Foundation.
14 */
15
16#ifndef __ASM_ARCH_MFP_H
17#define __ASM_ARCH_MFP_H
18
19#define mfp_to_gpio(m) ((m) % 128)
20
21/* list of all the configurable MFP pins */
22enum {
23 MFP_PIN_INVALID = -1,
24
25 MFP_PIN_GPIO0 = 0,
26 MFP_PIN_GPIO1,
27 MFP_PIN_GPIO2,
28 MFP_PIN_GPIO3,
29 MFP_PIN_GPIO4,
30 MFP_PIN_GPIO5,
31 MFP_PIN_GPIO6,
32 MFP_PIN_GPIO7,
33 MFP_PIN_GPIO8,
34 MFP_PIN_GPIO9,
35 MFP_PIN_GPIO10,
36 MFP_PIN_GPIO11,
37 MFP_PIN_GPIO12,
38 MFP_PIN_GPIO13,
39 MFP_PIN_GPIO14,
40 MFP_PIN_GPIO15,
41 MFP_PIN_GPIO16,
42 MFP_PIN_GPIO17,
43 MFP_PIN_GPIO18,
44 MFP_PIN_GPIO19,
45 MFP_PIN_GPIO20,
46 MFP_PIN_GPIO21,
47 MFP_PIN_GPIO22,
48 MFP_PIN_GPIO23,
49 MFP_PIN_GPIO24,
50 MFP_PIN_GPIO25,
51 MFP_PIN_GPIO26,
52 MFP_PIN_GPIO27,
53 MFP_PIN_GPIO28,
54 MFP_PIN_GPIO29,
55 MFP_PIN_GPIO30,
56 MFP_PIN_GPIO31,
57 MFP_PIN_GPIO32,
58 MFP_PIN_GPIO33,
59 MFP_PIN_GPIO34,
60 MFP_PIN_GPIO35,
61 MFP_PIN_GPIO36,
62 MFP_PIN_GPIO37,
63 MFP_PIN_GPIO38,
64 MFP_PIN_GPIO39,
65 MFP_PIN_GPIO40,
66 MFP_PIN_GPIO41,
67 MFP_PIN_GPIO42,
68 MFP_PIN_GPIO43,
69 MFP_PIN_GPIO44,
70 MFP_PIN_GPIO45,
71 MFP_PIN_GPIO46,
72 MFP_PIN_GPIO47,
73 MFP_PIN_GPIO48,
74 MFP_PIN_GPIO49,
75 MFP_PIN_GPIO50,
76 MFP_PIN_GPIO51,
77 MFP_PIN_GPIO52,
78 MFP_PIN_GPIO53,
79 MFP_PIN_GPIO54,
80 MFP_PIN_GPIO55,
81 MFP_PIN_GPIO56,
82 MFP_PIN_GPIO57,
83 MFP_PIN_GPIO58,
84 MFP_PIN_GPIO59,
85 MFP_PIN_GPIO60,
86 MFP_PIN_GPIO61,
87 MFP_PIN_GPIO62,
88 MFP_PIN_GPIO63,
89 MFP_PIN_GPIO64,
90 MFP_PIN_GPIO65,
91 MFP_PIN_GPIO66,
92 MFP_PIN_GPIO67,
93 MFP_PIN_GPIO68,
94 MFP_PIN_GPIO69,
95 MFP_PIN_GPIO70,
96 MFP_PIN_GPIO71,
97 MFP_PIN_GPIO72,
98 MFP_PIN_GPIO73,
99 MFP_PIN_GPIO74,
100 MFP_PIN_GPIO75,
101 MFP_PIN_GPIO76,
102 MFP_PIN_GPIO77,
103 MFP_PIN_GPIO78,
104 MFP_PIN_GPIO79,
105 MFP_PIN_GPIO80,
106 MFP_PIN_GPIO81,
107 MFP_PIN_GPIO82,
108 MFP_PIN_GPIO83,
109 MFP_PIN_GPIO84,
110 MFP_PIN_GPIO85,
111 MFP_PIN_GPIO86,
112 MFP_PIN_GPIO87,
113 MFP_PIN_GPIO88,
114 MFP_PIN_GPIO89,
115 MFP_PIN_GPIO90,
116 MFP_PIN_GPIO91,
117 MFP_PIN_GPIO92,
118 MFP_PIN_GPIO93,
119 MFP_PIN_GPIO94,
120 MFP_PIN_GPIO95,
121 MFP_PIN_GPIO96,
122 MFP_PIN_GPIO97,
123 MFP_PIN_GPIO98,
124 MFP_PIN_GPIO99,
125 MFP_PIN_GPIO100,
126 MFP_PIN_GPIO101,
127 MFP_PIN_GPIO102,
128 MFP_PIN_GPIO103,
129 MFP_PIN_GPIO104,
130 MFP_PIN_GPIO105,
131 MFP_PIN_GPIO106,
132 MFP_PIN_GPIO107,
133 MFP_PIN_GPIO108,
134 MFP_PIN_GPIO109,
135 MFP_PIN_GPIO110,
136 MFP_PIN_GPIO111,
137 MFP_PIN_GPIO112,
138 MFP_PIN_GPIO113,
139 MFP_PIN_GPIO114,
140 MFP_PIN_GPIO115,
141 MFP_PIN_GPIO116,
142 MFP_PIN_GPIO117,
143 MFP_PIN_GPIO118,
144 MFP_PIN_GPIO119,
145 MFP_PIN_GPIO120,
146 MFP_PIN_GPIO121,
147 MFP_PIN_GPIO122,
148 MFP_PIN_GPIO123,
149 MFP_PIN_GPIO124,
150 MFP_PIN_GPIO125,
151 MFP_PIN_GPIO126,
152 MFP_PIN_GPIO127,
153 MFP_PIN_GPIO0_2,
154 MFP_PIN_GPIO1_2,
155 MFP_PIN_GPIO2_2,
156 MFP_PIN_GPIO3_2,
157 MFP_PIN_GPIO4_2,
158 MFP_PIN_GPIO5_2,
159 MFP_PIN_GPIO6_2,
160 MFP_PIN_GPIO7_2,
161 MFP_PIN_GPIO8_2,
162 MFP_PIN_GPIO9_2,
163 MFP_PIN_GPIO10_2,
164 MFP_PIN_GPIO11_2,
165 MFP_PIN_GPIO12_2,
166 MFP_PIN_GPIO13_2,
167 MFP_PIN_GPIO14_2,
168 MFP_PIN_GPIO15_2,
169 MFP_PIN_GPIO16_2,
170 MFP_PIN_GPIO17_2,
171
172 MFP_PIN_ULPI_STP,
173 MFP_PIN_ULPI_NXT,
174 MFP_PIN_ULPI_DIR,
175
176 MFP_PIN_nXCVREN,
177 MFP_PIN_DF_CLE_nOE,
178 MFP_PIN_DF_nADV1_ALE,
179 MFP_PIN_DF_SCLK_E,
180 MFP_PIN_DF_SCLK_S,
181 MFP_PIN_nBE0,
182 MFP_PIN_nBE1,
183 MFP_PIN_DF_nADV2_ALE,
184 MFP_PIN_DF_INT_RnB,
185 MFP_PIN_DF_nCS0,
186 MFP_PIN_DF_nCS1,
187 MFP_PIN_nLUA,
188 MFP_PIN_nLLA,
189 MFP_PIN_DF_nWE,
190 MFP_PIN_DF_ALE_nWE,
191 MFP_PIN_DF_nRE_nOE,
192 MFP_PIN_DF_ADDR0,
193 MFP_PIN_DF_ADDR1,
194 MFP_PIN_DF_ADDR2,
195 MFP_PIN_DF_ADDR3,
196 MFP_PIN_DF_IO0,
197 MFP_PIN_DF_IO1,
198 MFP_PIN_DF_IO2,
199 MFP_PIN_DF_IO3,
200 MFP_PIN_DF_IO4,
201 MFP_PIN_DF_IO5,
202 MFP_PIN_DF_IO6,
203 MFP_PIN_DF_IO7,
204 MFP_PIN_DF_IO8,
205 MFP_PIN_DF_IO9,
206 MFP_PIN_DF_IO10,
207 MFP_PIN_DF_IO11,
208 MFP_PIN_DF_IO12,
209 MFP_PIN_DF_IO13,
210 MFP_PIN_DF_IO14,
211 MFP_PIN_DF_IO15,
212
213 /* additional pins on PXA930 */
214 MFP_PIN_GSIM_UIO,
215 MFP_PIN_GSIM_UCLK,
216 MFP_PIN_GSIM_UDET,
217 MFP_PIN_GSIM_nURST,
218 MFP_PIN_PMIC_INT,
219 MFP_PIN_RDY,
220
221 MFP_PIN_MAX,
222};
223
224/*
225 * a possible MFP configuration is represented by a 32-bit integer
226 *
227 * bit 0.. 9 - MFP Pin Number (1024 Pins Maximum)
228 * bit 10..12 - Alternate Function Selection
229 * bit 13..15 - Drive Strength
230 * bit 16..18 - Low Power Mode State
231 * bit 19..20 - Low Power Mode Edge Detection
232 * bit 21..22 - Run Mode Pull State
233 *
234 * to facilitate the definition, the following macros are provided
235 *
236 * MFP_CFG_DEFAULT - default MFP configuration value, with
237 * alternate function = 0,
238 * drive strength = fast 3mA (MFP_DS03X)
239 * low power mode = default
240 * edge detection = none
241 *
242 * MFP_CFG - default MFPR value with alternate function
243 * MFP_CFG_DRV - default MFPR value with alternate function and
244 * pin drive strength
245 * MFP_CFG_LPM - default MFPR value with alternate function and
246 * low power mode
247 * MFP_CFG_X - default MFPR value with alternate function,
248 * pin drive strength and low power mode
249 */
250
251typedef unsigned long mfp_cfg_t;
252
253#define MFP_PIN(x) ((x) & 0x3ff)
254
255#define MFP_AF0 (0x0 << 10)
256#define MFP_AF1 (0x1 << 10)
257#define MFP_AF2 (0x2 << 10)
258#define MFP_AF3 (0x3 << 10)
259#define MFP_AF4 (0x4 << 10)
260#define MFP_AF5 (0x5 << 10)
261#define MFP_AF6 (0x6 << 10)
262#define MFP_AF7 (0x7 << 10)
263#define MFP_AF_MASK (0x7 << 10)
264#define MFP_AF(x) (((x) >> 10) & 0x7)
265
266#define MFP_DS01X (0x0 << 13)
267#define MFP_DS02X (0x1 << 13)
268#define MFP_DS03X (0x2 << 13)
269#define MFP_DS04X (0x3 << 13)
270#define MFP_DS06X (0x4 << 13)
271#define MFP_DS08X (0x5 << 13)
272#define MFP_DS10X (0x6 << 13)
273#define MFP_DS13X (0x7 << 13)
274#define MFP_DS_MASK (0x7 << 13)
275#define MFP_DS(x) (((x) >> 13) & 0x7)
276
277#define MFP_LPM_INPUT (0x0 << 16)
278#define MFP_LPM_DRIVE_LOW (0x1 << 16)
279#define MFP_LPM_DRIVE_HIGH (0x2 << 16)
280#define MFP_LPM_PULL_LOW (0x3 << 16)
281#define MFP_LPM_PULL_HIGH (0x4 << 16)
282#define MFP_LPM_FLOAT (0x5 << 16)
283#define MFP_LPM_STATE_MASK (0x7 << 16)
284#define MFP_LPM_STATE(x) (((x) >> 16) & 0x7)
285
286#define MFP_LPM_EDGE_NONE (0x0 << 19)
287#define MFP_LPM_EDGE_RISE (0x1 << 19)
288#define MFP_LPM_EDGE_FALL (0x2 << 19)
289#define MFP_LPM_EDGE_BOTH (0x3 << 19)
290#define MFP_LPM_EDGE_MASK (0x3 << 19)
291#define MFP_LPM_EDGE(x) (((x) >> 19) & 0x3)
292
293#define MFP_PULL_NONE (0x0 << 21)
294#define MFP_PULL_LOW (0x1 << 21)
295#define MFP_PULL_HIGH (0x2 << 21)
296#define MFP_PULL_BOTH (0x3 << 21)
297#define MFP_PULL_MASK (0x3 << 21)
298#define MFP_PULL(x) (((x) >> 21) & 0x3)
299
300#define MFP_CFG_DEFAULT (MFP_AF0 | MFP_DS03X | MFP_LPM_INPUT |\
301 MFP_LPM_EDGE_NONE | MFP_PULL_NONE)
302
303#define MFP_CFG(pin, af) \
304 ((MFP_CFG_DEFAULT & ~MFP_AF_MASK) |\
305 (MFP_PIN(MFP_PIN_##pin) | MFP_##af))
306
307#define MFP_CFG_DRV(pin, af, drv) \
308 ((MFP_CFG_DEFAULT & ~(MFP_AF_MASK | MFP_DS_MASK)) |\
309 (MFP_PIN(MFP_PIN_##pin) | MFP_##af | MFP_##drv))
310
311#define MFP_CFG_LPM(pin, af, lpm) \
312 ((MFP_CFG_DEFAULT & ~(MFP_AF_MASK | MFP_LPM_STATE_MASK)) |\
313 (MFP_PIN(MFP_PIN_##pin) | MFP_##af | MFP_LPM_##lpm))
314
315#define MFP_CFG_X(pin, af, drv, lpm) \
316 ((MFP_CFG_DEFAULT & ~(MFP_AF_MASK | MFP_DS_MASK | MFP_LPM_STATE_MASK)) |\
317 (MFP_PIN(MFP_PIN_##pin) | MFP_##af | MFP_##drv | MFP_LPM_##lpm))
318
319#endif /* __ASM_ARCH_MFP_H */
diff --git a/include/asm-arm/arch-pxa/mtd-xip.h b/include/asm-arm/arch-pxa/mtd-xip.h
deleted file mode 100644
index 8704dbceb432..000000000000
--- a/include/asm-arm/arch-pxa/mtd-xip.h
+++ /dev/null
@@ -1,37 +0,0 @@
1/*
2 * MTD primitives for XIP support. Architecture specific functions
3 *
4 * Do not include this file directly. It's included from linux/mtd/xip.h
5 *
6 * Author: Nicolas Pitre
7 * Created: Nov 2, 2004
8 * Copyright: (C) 2004 MontaVista Software, Inc.
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
13 *
14 * $Id: xip.h,v 1.2 2004/12/01 15:49:10 nico Exp $
15 */
16
17#ifndef __ARCH_PXA_MTD_XIP_H__
18#define __ARCH_PXA_MTD_XIP_H__
19
20#include <asm/arch/pxa-regs.h>
21
22#define xip_irqpending() (ICIP & ICMR)
23
24/* we sample OSCR and convert desired delta to usec (1/4 ~= 1000000/3686400) */
25#define xip_currtime() (OSCR)
26#define xip_elapsed_since(x) (signed)((OSCR - (x)) / 4)
27
28/*
29 * xip_cpu_idle() is used when waiting for a delay equal or larger than
30 * the system timer tick period. This should put the CPU into idle mode
31 * to save power and to be woken up only when some interrupts are pending.
32 * As above, this should not rely upon standard kernel code.
33 */
34
35#define xip_cpu_idle() asm volatile ("mcr p14, 0, %0, c7, c0, 0" :: "r" (1))
36
37#endif /* __ARCH_PXA_MTD_XIP_H__ */
diff --git a/include/asm-arm/arch-pxa/pcm027.h b/include/asm-arm/arch-pxa/pcm027.h
deleted file mode 100644
index 7beae1472c3e..000000000000
--- a/include/asm-arm/arch-pxa/pcm027.h
+++ /dev/null
@@ -1,75 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-pxa/pcm027.h
3 *
4 * (c) 2003 Phytec Messtechnik GmbH <armlinux@phytec.de>
5 * (c) 2007 Juergen Beisert <j.beisert@pengutronix.de>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
21
22/*
23 * Definitions of CPU card resources only
24 */
25
26/* I2C RTC */
27#define PCM027_RTC_IRQ_GPIO 0
28#define PCM027_RTC_IRQ IRQ_GPIO(PCM027_RTC_IRQ_GPIO)
29#define PCM027_RTC_IRQ_EDGE IRQ_TYPE_EDGE_FALLING
30#define ADR_PCM027_RTC 0x51 /* I2C address */
31
32/* I2C EEPROM */
33#define ADR_PCM027_EEPROM 0x54 /* I2C address */
34
35/* Ethernet chip (SMSC91C111) */
36#define PCM027_ETH_IRQ_GPIO 52
37#define PCM027_ETH_IRQ IRQ_GPIO(PCM027_ETH_IRQ_GPIO)
38#define PCM027_ETH_IRQ_EDGE IRQ_TYPE_EDGE_RISING
39#define PCM027_ETH_PHYS PXA_CS5_PHYS
40#define PCM027_ETH_SIZE (1*1024*1024)
41
42/* CAN controller SJA1000 (unsupported yet) */
43#define PCM027_CAN_IRQ_GPIO 114
44#define PCM027_CAN_IRQ IRQ_GPIO(PCM027_CAN_IRQ_GPIO)
45#define PCM027_CAN_IRQ_EDGE IRQ_TYPE_EDGE_FALLING
46#define PCM027_CAN_PHYS 0x22000000
47#define PCM027_CAN_SIZE 0x100
48
49/* SPI GPIO expander (unsupported yet) */
50#define PCM027_EGPIO_IRQ_GPIO 27
51#define PCM027_EGPIO_IRQ IRQ_GPIO(PCM027_EGPIO_IRQ_GPIO)
52#define PCM027_EGPIO_IRQ_EDGE IRQ_TYPE_EDGE_FALLING
53#define PCM027_EGPIO_CS 24
54/*
55 * TODO: Switch this pin from dedicated usage to GPIO if
56 * more than the MAX7301 device is connected to this SPI bus
57 */
58#define PCM027_EGPIO_CS_MODE GPIO24_SFRM_MD
59
60/* Flash memory */
61#define PCM027_FLASH_PHYS 0x00000000
62#define PCM027_FLASH_SIZE 0x02000000
63
64/* onboard LEDs connected to GPIO */
65#define PCM027_LED_CPU 90
66#define PCM027_LED_HEARD_BEAT 91
67
68/*
69 * This CPU module needs a baseboard to work. After basic initializing
70 * its own devices, it calls baseboard's init function.
71 * TODO: Add your own basebaord init function and call it from
72 * inside pcm027_init(). This example here is for the developmen board.
73 * Refer pcm990-baseboard.c
74 */
75extern void pcm990_baseboard_init(void);
diff --git a/include/asm-arm/arch-pxa/pcm990_baseboard.h b/include/asm-arm/arch-pxa/pcm990_baseboard.h
deleted file mode 100644
index 2e2013179063..000000000000
--- a/include/asm-arm/arch-pxa/pcm990_baseboard.h
+++ /dev/null
@@ -1,275 +0,0 @@
1/*
2 * include/asm-arm/arch-pxa/pcm990_baseboard.h
3 *
4 * (c) 2003 Phytec Messtechnik GmbH <armlinux@phytec.de>
5 * (c) 2007 Juergen Beisert <j.beisert@pengutronix.de>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
21
22#include <asm/arch/pcm027.h>
23
24/*
25 * definitions relevant only when the PCM-990
26 * development base board is in use
27 */
28
29/* CPLD's interrupt controller is connected to PCM-027 GPIO 9 */
30#define PCM990_CTRL_INT_IRQ_GPIO 9
31#define PCM990_CTRL_INT_IRQ IRQ_GPIO(PCM990_CTRL_INT_IRQ_GPIO)
32#define PCM990_CTRL_INT_IRQ_EDGE IRQ_TYPE_EDGE_RISING
33#define PCM990_CTRL_PHYS PXA_CS1_PHYS /* 16-Bit */
34#define PCM990_CTRL_BASE 0xea000000
35#define PCM990_CTRL_SIZE (1*1024*1024)
36
37#define PCM990_CTRL_PWR_IRQ_GPIO 14
38#define PCM990_CTRL_PWR_IRQ IRQ_GPIO(PCM990_CTRL_PWR_IRQ_GPIO)
39#define PCM990_CTRL_PWR_IRQ_EDGE IRQ_TYPE_EDGE_RISING
40
41/* visible CPLD (U7) registers */
42#define PCM990_CTRL_REG0 0x0000 /* RESET REGISTER */
43#define PCM990_CTRL_SYSRES 0x0001 /* System RESET REGISTER */
44#define PCM990_CTRL_RESOUT 0x0002 /* RESETOUT Enable REGISTER */
45#define PCM990_CTRL_RESGPIO 0x0004 /* RESETGPIO Enable REGISTER */
46
47#define PCM990_CTRL_REG1 0x0002 /* Power REGISTER */
48#define PCM990_CTRL_5VOFF 0x0001 /* Disable 5V Regulators */
49#define PCM990_CTRL_CANPWR 0x0004 /* Enable CANPWR ADUM */
50#define PCM990_CTRL_PM_5V 0x0008 /* Read 5V OK */
51
52#define PCM990_CTRL_REG2 0x0004 /* LED REGISTER */
53#define PCM990_CTRL_LEDPWR 0x0001 /* POWER LED enable */
54#define PCM990_CTRL_LEDBAS 0x0002 /* BASIS LED enable */
55#define PCM990_CTRL_LEDUSR 0x0004 /* USER LED enable */
56
57#define PCM990_CTRL_REG3 0x0006 /* LCD CTRL REGISTER 3 */
58#define PCM990_CTRL_LCDPWR 0x0001 /* RW LCD Power on */
59#define PCM990_CTRL_LCDON 0x0002 /* RW LCD Latch on */
60#define PCM990_CTRL_LCDPOS1 0x0004 /* RW POS 1 */
61#define PCM990_CTRL_LCDPOS2 0x0008 /* RW POS 2 */
62
63#define PCM990_CTRL_REG4 0x0008 /* MMC1 CTRL REGISTER 4 */
64#define PCM990_CTRL_MMC1PWR 0x0001 /* RW MMC1 Power on */
65
66#define PCM990_CTRL_REG5 0x000A /* MMC2 CTRL REGISTER 5 */
67#define PCM990_CTRL_MMC2PWR 0x0001 /* RW MMC2 Power on */
68#define PCM990_CTRL_MMC2LED 0x0002 /* RW MMC2 LED */
69#define PCM990_CTRL_MMC2DE 0x0004 /* R MMC2 Card detect */
70#define PCM990_CTRL_MMC2WP 0x0008 /* R MMC2 Card write protect */
71
72#define PCM990_CTRL_REG6 0x000C /* Interrupt Clear REGISTER */
73#define PCM990_CTRL_INTC0 0x0001 /* Clear Reg BT Detect */
74#define PCM990_CTRL_INTC1 0x0002 /* Clear Reg FR RI */
75#define PCM990_CTRL_INTC2 0x0004 /* Clear Reg MMC1 Detect */
76#define PCM990_CTRL_INTC3 0x0008 /* Clear Reg PM_5V off */
77
78#define PCM990_CTRL_REG7 0x000E /* Interrupt Enable REGISTER */
79#define PCM990_CTRL_ENAINT0 0x0001 /* Enable Int BT Detect */
80#define PCM990_CTRL_ENAINT1 0x0002 /* Enable Int FR RI */
81#define PCM990_CTRL_ENAINT2 0x0004 /* Enable Int MMC1 Detect */
82#define PCM990_CTRL_ENAINT3 0x0008 /* Enable Int PM_5V off */
83
84#define PCM990_CTRL_REG8 0x0014 /* Uart REGISTER */
85#define PCM990_CTRL_FFSD 0x0001 /* BT Uart Enable */
86#define PCM990_CTRL_BTSD 0x0002 /* FF Uart Enable */
87#define PCM990_CTRL_FFRI 0x0004 /* FF Uart RI detect */
88#define PCM990_CTRL_BTRX 0x0008 /* BT Uart Rx detect */
89
90#define PCM990_CTRL_REG9 0x0010 /* AC97 Flash REGISTER */
91#define PCM990_CTRL_FLWP 0x0001 /* pC Flash Write Protect */
92#define PCM990_CTRL_FLDIS 0x0002 /* pC Flash Disable */
93#define PCM990_CTRL_AC97ENA 0x0004 /* Enable AC97 Expansion */
94
95#define PCM990_CTRL_REG10 0x0012 /* GPS-REGISTER */
96#define PCM990_CTRL_GPSPWR 0x0004 /* GPS-Modul Power on */
97#define PCM990_CTRL_GPSENA 0x0008 /* GPS-Modul Enable */
98
99#define PCM990_CTRL_REG11 0x0014 /* Accu REGISTER */
100#define PCM990_CTRL_ACENA 0x0001 /* Charge Enable */
101#define PCM990_CTRL_ACSEL 0x0002 /* Charge Akku -> DC Enable */
102#define PCM990_CTRL_ACPRES 0x0004 /* DC Present */
103#define PCM990_CTRL_ACALARM 0x0008 /* Error Akku */
104
105#define PCM990_CTRL_P2V(x) ((x) - PCM990_CTRL_PHYS + PCM990_CTRL_BASE)
106#define PCM990_CTRL_V2P(x) ((x) - PCM990_CTRL_BASE + PCM990_CTRL_PHYS)
107
108#ifndef __ASSEMBLY__
109# define __PCM990_CTRL_REG(x) \
110 (*((volatile unsigned char *)PCM990_CTRL_P2V(x)))
111#else
112# define __PCM990_CTRL_REG(x) PCM990_CTRL_P2V(x)
113#endif
114
115#define PCM990_INTMSKENA __PCM990_CTRL_REG(PCM990_CTRL_PHYS + PCM990_CTRL_REG7)
116#define PCM990_INTSETCLR __PCM990_CTRL_REG(PCM990_CTRL_PHYS + PCM990_CTRL_REG6)
117#define PCM990_CTRL0 __PCM990_CTRL_REG(PCM990_CTRL_PHYS + PCM990_CTRL_REG0)
118#define PCM990_CTRL1 __PCM990_CTRL_REG(PCM990_CTRL_PHYS + PCM990_CTRL_REG1)
119#define PCM990_CTRL2 __PCM990_CTRL_REG(PCM990_CTRL_PHYS + PCM990_CTRL_REG2)
120#define PCM990_CTRL3 __PCM990_CTRL_REG(PCM990_CTRL_PHYS + PCM990_CTRL_REG3)
121#define PCM990_CTRL4 __PCM990_CTRL_REG(PCM990_CTRL_PHYS + PCM990_CTRL_REG4)
122#define PCM990_CTRL5 __PCM990_CTRL_REG(PCM990_CTRL_PHYS + PCM990_CTRL_REG5)
123#define PCM990_CTRL6 __PCM990_CTRL_REG(PCM990_CTRL_PHYS + PCM990_CTRL_REG6)
124#define PCM990_CTRL7 __PCM990_CTRL_REG(PCM990_CTRL_PHYS + PCM990_CTRL_REG7)
125#define PCM990_CTRL8 __PCM990_CTRL_REG(PCM990_CTRL_PHYS + PCM990_CTRL_REG8)
126#define PCM990_CTRL9 __PCM990_CTRL_REG(PCM990_CTRL_PHYS + PCM990_CTRL_REG9)
127#define PCM990_CTRL10 __PCM990_CTRL_REG(PCM990_CTRL_PHYS + PCM990_CTRL_REG10)
128#define PCM990_CTRL11 __PCM990_CTRL_REG(PCM990_CTRL_PHYS + PCM990_CTRL_REG11)
129
130
131/*
132 * IDE
133 */
134#define PCM990_IDE_IRQ_GPIO 13
135#define PCM990_IDE_IRQ IRQ_GPIO(PCM990_IDE_IRQ_GPIO)
136#define PCM990_IDE_IRQ_EDGE IRQ_TYPE_EDGE_RISING
137#define PCM990_IDE_PLD_PHYS 0x20000000 /* 16 bit wide */
138#define PCM990_IDE_PLD_BASE 0xee000000
139#define PCM990_IDE_PLD_SIZE (1*1024*1024)
140
141/* visible CPLD (U6) registers */
142#define PCM990_IDE_PLD_REG0 0x1000 /* OFFSET IDE REGISTER 0 */
143#define PCM990_IDE_PM5V 0x0004 /* R System VCC_5V */
144#define PCM990_IDE_STBY 0x0008 /* R System StandBy */
145
146#define PCM990_IDE_PLD_REG1 0x1002 /* OFFSET IDE REGISTER 1 */
147#define PCM990_IDE_IDEMODE 0x0001 /* R TrueIDE Mode */
148#define PCM990_IDE_DMAENA 0x0004 /* RW DMA Enable */
149#define PCM990_IDE_DMA1_0 0x0008 /* RW 1=DREQ1 0=DREQ0 */
150
151#define PCM990_IDE_PLD_REG2 0x1004 /* OFFSET IDE REGISTER 2 */
152#define PCM990_IDE_RESENA 0x0001 /* RW IDE Reset Bit enable */
153#define PCM990_IDE_RES 0x0002 /* RW IDE Reset Bit */
154#define PCM990_IDE_RDY 0x0008 /* RDY */
155
156#define PCM990_IDE_PLD_REG3 0x1006 /* OFFSET IDE REGISTER 3 */
157#define PCM990_IDE_IDEOE 0x0001 /* RW Latch on Databus */
158#define PCM990_IDE_IDEON 0x0002 /* RW Latch on Control Address */
159#define PCM990_IDE_IDEIN 0x0004 /* RW Latch on Interrupt usw. */
160
161#define PCM990_IDE_PLD_REG4 0x1008 /* OFFSET IDE REGISTER 4 */
162#define PCM990_IDE_PWRENA 0x0001 /* RW IDE Power enable */
163#define PCM990_IDE_5V 0x0002 /* R IDE Power 5V */
164#define PCM990_IDE_PWG 0x0008 /* R IDE Power is on */
165
166#define PCM990_IDE_PLD_P2V(x) ((x) - PCM990_IDE_PLD_PHYS + PCM990_IDE_PLD_BASE)
167#define PCM990_IDE_PLD_V2P(x) ((x) - PCM990_IDE_PLD_BASE + PCM990_IDE_PLD_PHYS)
168
169#ifndef __ASSEMBLY__
170# define __PCM990_IDE_PLD_REG(x) \
171 (*((volatile unsigned char *)PCM990_IDE_PLD_P2V(x)))
172#else
173# define __PCM990_IDE_PLD_REG(x) PCM990_IDE_PLD_P2V(x)
174#endif
175
176#define PCM990_IDE0 \
177 __PCM990_IDE_PLD_REG(PCM990_IDE_PLD_PHYS + PCM990_IDE_PLD_REG0)
178#define PCM990_IDE1 \
179 __PCM990_IDE_PLD_REG(PCM990_IDE_PLD_PHYS + PCM990_IDE_PLD_REG1)
180#define PCM990_IDE2 \
181 __PCM990_IDE_PLD_REG(PCM990_IDE_PLD_PHYS + PCM990_IDE_PLD_REG2)
182#define PCM990_IDE3 \
183 __PCM990_IDE_PLD_REG(PCM990_IDE_PLD_PHYS + PCM990_IDE_PLD_REG3)
184#define PCM990_IDE4 \
185 __PCM990_IDE_PLD_REG(PCM990_IDE_PLD_PHYS + PCM990_IDE_PLD_REG4)
186
187/*
188 * Compact Flash
189 */
190#define PCM990_CF_IRQ_GPIO 11
191#define PCM990_CF_IRQ IRQ_GPIO(PCM990_CF_IRQ_GPIO)
192#define PCM990_CF_IRQ_EDGE IRQ_TYPE_EDGE_RISING
193
194#define PCM990_CF_CD_GPIO 12
195#define PCM990_CF_CD IRQ_GPIO(PCM990_CF_CD_GPIO)
196#define PCM990_CF_CD_EDGE IRQ_TYPE_EDGE_RISING
197
198#define PCM990_CF_PLD_PHYS 0x30000000 /* 16 bit wide */
199#define PCM990_CF_PLD_BASE 0xef000000
200#define PCM990_CF_PLD_SIZE (1*1024*1024)
201#define PCM990_CF_PLD_P2V(x) ((x) - PCM990_CF_PLD_PHYS + PCM990_CF_PLD_BASE)
202#define PCM990_CF_PLD_V2P(x) ((x) - PCM990_CF_PLD_BASE + PCM990_CF_PLD_PHYS)
203
204/* visible CPLD (U6) registers */
205#define PCM990_CF_PLD_REG0 0x1000 /* OFFSET CF REGISTER 0 */
206#define PCM990_CF_REG0_LED 0x0001 /* RW LED on */
207#define PCM990_CF_REG0_BLK 0x0002 /* RW LED flash when access */
208#define PCM990_CF_REG0_PM5V 0x0004 /* R System VCC_5V enable */
209#define PCM990_CF_REG0_STBY 0x0008 /* R System StandBy */
210
211#define PCM990_CF_PLD_REG1 0x1002 /* OFFSET CF REGISTER 1 */
212#define PCM990_CF_REG1_IDEMODE 0x0001 /* RW CF card run as TrueIDE */
213#define PCM990_CF_REG1_CF0 0x0002 /* RW CF card at ADDR 0x28000000 */
214
215#define PCM990_CF_PLD_REG2 0x1004 /* OFFSET CF REGISTER 2 */
216#define PCM990_CF_REG2_RES 0x0002 /* RW CF RESET BIT */
217#define PCM990_CF_REG2_RDYENA 0x0004 /* RW Enable CF_RDY */
218#define PCM990_CF_REG2_RDY 0x0008 /* R CF_RDY auf PWAIT */
219
220#define PCM990_CF_PLD_REG3 0x1006 /* OFFSET CF REGISTER 3 */
221#define PCM990_CF_REG3_CFOE 0x0001 /* RW Latch on Databus */
222#define PCM990_CF_REG3_CFON 0x0002 /* RW Latch on Control Address */
223#define PCM990_CF_REG3_CFIN 0x0004 /* RW Latch on Interrupt usw. */
224#define PCM990_CF_REG3_CFCD 0x0008 /* RW Latch on CD1/2 VS1/2 usw */
225
226#define PCM990_CF_PLD_REG4 0x1008 /* OFFSET CF REGISTER 4 */
227#define PCM990_CF_REG4_PWRENA 0x0001 /* RW CF Power on (CD1/2 = "00") */
228#define PCM990_CF_REG4_5_3V 0x0002 /* RW 1 = 5V CF_VCC 0 = 3 V CF_VCC */
229#define PCM990_CF_REG4_3B 0x0004 /* RW 3.0V Backup from VCC (5_3V=0) */
230#define PCM990_CF_REG4_PWG 0x0008 /* R CF-Power is on */
231
232#define PCM990_CF_PLD_REG5 0x100A /* OFFSET CF REGISTER 5 */
233#define PCM990_CF_REG5_BVD1 0x0001 /* R CF /BVD1 */
234#define PCM990_CF_REG5_BVD2 0x0002 /* R CF /BVD2 */
235#define PCM990_CF_REG5_VS1 0x0004 /* R CF /VS1 */
236#define PCM990_CF_REG5_VS2 0x0008 /* R CF /VS2 */
237
238#define PCM990_CF_PLD_REG6 0x100C /* OFFSET CF REGISTER 6 */
239#define PCM990_CF_REG6_CD1 0x0001 /* R CF Card_Detect1 */
240#define PCM990_CF_REG6_CD2 0x0002 /* R CF Card_Detect2 */
241
242#ifndef __ASSEMBLY__
243# define __PCM990_CF_PLD_REG(x) \
244 (*((volatile unsigned char *)PCM990_CF_PLD_P2V(x)))
245#else
246# define __PCM990_CF_PLD_REG(x) PCM990_CF_PLD_P2V(x)
247#endif
248
249#define PCM990_CF0 __PCM990_CF_PLD_REG(PCM990_CF_PLD_PHYS + PCM990_CF_PLD_REG0)
250#define PCM990_CF1 __PCM990_CF_PLD_REG(PCM990_CF_PLD_PHYS + PCM990_CF_PLD_REG1)
251#define PCM990_CF2 __PCM990_CF_PLD_REG(PCM990_CF_PLD_PHYS + PCM990_CF_PLD_REG2)
252#define PCM990_CF3 __PCM990_CF_PLD_REG(PCM990_CF_PLD_PHYS + PCM990_CF_PLD_REG3)
253#define PCM990_CF4 __PCM990_CF_PLD_REG(PCM990_CF_PLD_PHYS + PCM990_CF_PLD_REG4)
254#define PCM990_CF5 __PCM990_CF_PLD_REG(PCM990_CF_PLD_PHYS + PCM990_CF_PLD_REG5)
255#define PCM990_CF6 __PCM990_CF_PLD_REG(PCM990_CF_PLD_PHYS + PCM990_CF_PLD_REG6)
256
257/*
258 * Wolfson AC97 Touch
259 */
260#define PCM990_AC97_IRQ_GPIO 10
261#define PCM990_AC97_IRQ IRQ_GPIO(PCM990_AC97_IRQ_GPIO)
262#define PCM990_AC97_IRQ_EDGE IRQ_TYPE_EDGE_RISING
263
264/*
265 * MMC phyCORE
266 */
267#define PCM990_MMC0_IRQ_GPIO 9
268#define PCM990_MMC0_IRQ IRQ_GPIO(PCM990_MMC0_IRQ_GPIO)
269#define PCM990_MMC0_IRQ_EDGE IRQ_TYPE_EDGE_FALLING
270
271/*
272 * USB phyCore
273 */
274#define PCM990_USB_OVERCURRENT (88 | GPIO_ALT_FN_1_IN)
275#define PCM990_USB_PWR_EN (89 | GPIO_ALT_FN_2_OUT)
diff --git a/include/asm-arm/arch-pxa/poodle.h b/include/asm-arm/arch-pxa/poodle.h
deleted file mode 100644
index 4d6a40315764..000000000000
--- a/include/asm-arm/arch-pxa/poodle.h
+++ /dev/null
@@ -1,75 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-pxa/poodle.h
3 *
4 * May be copied or modified under the terms of the GNU General Public
5 * License. See linux/COPYING for more information.
6 *
7 * Based on:
8 * linux/include/asm-arm/arch-sa1100/collie.h
9 *
10 * ChangeLog:
11 * 04-06-2001 Lineo Japan, Inc.
12 * 04-16-2001 SHARP Corporation
13 * Update to 2.6 John Lenz
14 */
15#ifndef __ASM_ARCH_POODLE_H
16#define __ASM_ARCH_POODLE_H 1
17
18/*
19 * GPIOs
20 */
21/* PXA GPIOs */
22#define POODLE_GPIO_ON_KEY (0)
23#define POODLE_GPIO_AC_IN (1)
24#define POODLE_GPIO_CO 16
25#define POODLE_GPIO_TP_INT (5)
26#define POODLE_GPIO_WAKEUP (11) /* change battery */
27#define POODLE_GPIO_GA_INT (10)
28#define POODLE_GPIO_IR_ON (22)
29#define POODLE_GPIO_HP_IN (4)
30#define POODLE_GPIO_CF_IRQ (17)
31#define POODLE_GPIO_CF_CD (14)
32#define POODLE_GPIO_CF_STSCHG (14)
33#define POODLE_GPIO_SD_PWR (33)
34#define POODLE_GPIO_SD_PWR1 (3)
35#define POODLE_GPIO_nSD_CLK (6)
36#define POODLE_GPIO_nSD_WP (7)
37#define POODLE_GPIO_nSD_INT (8)
38#define POODLE_GPIO_nSD_DETECT (9)
39#define POODLE_GPIO_MAIN_BAT_LOW (13)
40#define POODLE_GPIO_BAT_COVER (13)
41#define POODLE_GPIO_USB_PULLUP (20)
42#define POODLE_GPIO_ADC_TEMP_ON (21)
43#define POODLE_GPIO_BYPASS_ON (36)
44#define POODLE_GPIO_CHRG_ON (38)
45#define POODLE_GPIO_CHRG_FULL (16)
46#define POODLE_GPIO_DISCHARGE_ON (42) /* Enable battery discharge */
47
48/* PXA GPIOs */
49#define POODLE_IRQ_GPIO_ON_KEY IRQ_GPIO(0)
50#define POODLE_IRQ_GPIO_AC_IN IRQ_GPIO(1)
51#define POODLE_IRQ_GPIO_HP_IN IRQ_GPIO(4)
52#define POODLE_IRQ_GPIO_CO IRQ_GPIO(16)
53#define POODLE_IRQ_GPIO_TP_INT IRQ_GPIO(5)
54#define POODLE_IRQ_GPIO_WAKEUP IRQ_GPIO(11)
55#define POODLE_IRQ_GPIO_GA_INT IRQ_GPIO(10)
56#define POODLE_IRQ_GPIO_CF_IRQ IRQ_GPIO(17)
57#define POODLE_IRQ_GPIO_CF_CD IRQ_GPIO(14)
58#define POODLE_IRQ_GPIO_nSD_INT IRQ_GPIO(8)
59#define POODLE_IRQ_GPIO_nSD_DETECT IRQ_GPIO(9)
60#define POODLE_IRQ_GPIO_MAIN_BAT_LOW IRQ_GPIO(13)
61
62/* SCOOP GPIOs */
63#define POODLE_SCOOP_CHARGE_ON SCOOP_GPCR_PA11
64#define POODLE_SCOOP_CP401 SCOOP_GPCR_PA13
65#define POODLE_SCOOP_VPEN SCOOP_GPCR_PA18
66#define POODLE_SCOOP_L_PCLK SCOOP_GPCR_PA20
67#define POODLE_SCOOP_L_LCLK SCOOP_GPCR_PA21
68#define POODLE_SCOOP_HS_OUT SCOOP_GPCR_PA22
69
70#define POODLE_SCOOP_IO_DIR ( POODLE_SCOOP_VPEN | POODLE_SCOOP_HS_OUT )
71#define POODLE_SCOOP_IO_OUT ( 0 )
72
73extern struct platform_device poodle_locomo_device;
74
75#endif /* __ASM_ARCH_POODLE_H */
diff --git a/include/asm-arm/arch-pxa/pxa-regs.h b/include/asm-arm/arch-pxa/pxa-regs.h
deleted file mode 100644
index dce9308626b7..000000000000
--- a/include/asm-arm/arch-pxa/pxa-regs.h
+++ /dev/null
@@ -1,1070 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-pxa/pxa-regs.h
3 *
4 * Author: Nicolas Pitre
5 * Created: Jun 15, 2001
6 * Copyright: MontaVista Software Inc.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 */
12
13#ifndef __PXA_REGS_H
14#define __PXA_REGS_H
15
16
17/*
18 * PXA Chip selects
19 */
20
21#define PXA_CS0_PHYS 0x00000000
22#define PXA_CS1_PHYS 0x04000000
23#define PXA_CS2_PHYS 0x08000000
24#define PXA_CS3_PHYS 0x0C000000
25#define PXA_CS4_PHYS 0x10000000
26#define PXA_CS5_PHYS 0x14000000
27
28
29/*
30 * Personal Computer Memory Card International Association (PCMCIA) sockets
31 */
32
33#define PCMCIAPrtSp 0x04000000 /* PCMCIA Partition Space [byte] */
34#define PCMCIASp (4*PCMCIAPrtSp) /* PCMCIA Space [byte] */
35#define PCMCIAIOSp PCMCIAPrtSp /* PCMCIA I/O Space [byte] */
36#define PCMCIAAttrSp PCMCIAPrtSp /* PCMCIA Attribute Space [byte] */
37#define PCMCIAMemSp PCMCIAPrtSp /* PCMCIA Memory Space [byte] */
38
39#define PCMCIA0Sp PCMCIASp /* PCMCIA 0 Space [byte] */
40#define PCMCIA0IOSp PCMCIAIOSp /* PCMCIA 0 I/O Space [byte] */
41#define PCMCIA0AttrSp PCMCIAAttrSp /* PCMCIA 0 Attribute Space [byte] */
42#define PCMCIA0MemSp PCMCIAMemSp /* PCMCIA 0 Memory Space [byte] */
43
44#define PCMCIA1Sp PCMCIASp /* PCMCIA 1 Space [byte] */
45#define PCMCIA1IOSp PCMCIAIOSp /* PCMCIA 1 I/O Space [byte] */
46#define PCMCIA1AttrSp PCMCIAAttrSp /* PCMCIA 1 Attribute Space [byte] */
47#define PCMCIA1MemSp PCMCIAMemSp /* PCMCIA 1 Memory Space [byte] */
48
49#define _PCMCIA(Nb) /* PCMCIA [0..1] */ \
50 (0x20000000 + (Nb)*PCMCIASp)
51#define _PCMCIAIO(Nb) _PCMCIA (Nb) /* PCMCIA I/O [0..1] */
52#define _PCMCIAAttr(Nb) /* PCMCIA Attribute [0..1] */ \
53 (_PCMCIA (Nb) + 2*PCMCIAPrtSp)
54#define _PCMCIAMem(Nb) /* PCMCIA Memory [0..1] */ \
55 (_PCMCIA (Nb) + 3*PCMCIAPrtSp)
56
57#define _PCMCIA0 _PCMCIA (0) /* PCMCIA 0 */
58#define _PCMCIA0IO _PCMCIAIO (0) /* PCMCIA 0 I/O */
59#define _PCMCIA0Attr _PCMCIAAttr (0) /* PCMCIA 0 Attribute */
60#define _PCMCIA0Mem _PCMCIAMem (0) /* PCMCIA 0 Memory */
61
62#define _PCMCIA1 _PCMCIA (1) /* PCMCIA 1 */
63#define _PCMCIA1IO _PCMCIAIO (1) /* PCMCIA 1 I/O */
64#define _PCMCIA1Attr _PCMCIAAttr (1) /* PCMCIA 1 Attribute */
65#define _PCMCIA1Mem _PCMCIAMem (1) /* PCMCIA 1 Memory */
66
67
68
69/*
70 * DMA Controller
71 */
72
73#define DCSR0 __REG(0x40000000) /* DMA Control / Status Register for Channel 0 */
74#define DCSR1 __REG(0x40000004) /* DMA Control / Status Register for Channel 1 */
75#define DCSR2 __REG(0x40000008) /* DMA Control / Status Register for Channel 2 */
76#define DCSR3 __REG(0x4000000c) /* DMA Control / Status Register for Channel 3 */
77#define DCSR4 __REG(0x40000010) /* DMA Control / Status Register for Channel 4 */
78#define DCSR5 __REG(0x40000014) /* DMA Control / Status Register for Channel 5 */
79#define DCSR6 __REG(0x40000018) /* DMA Control / Status Register for Channel 6 */
80#define DCSR7 __REG(0x4000001c) /* DMA Control / Status Register for Channel 7 */
81#define DCSR8 __REG(0x40000020) /* DMA Control / Status Register for Channel 8 */
82#define DCSR9 __REG(0x40000024) /* DMA Control / Status Register for Channel 9 */
83#define DCSR10 __REG(0x40000028) /* DMA Control / Status Register for Channel 10 */
84#define DCSR11 __REG(0x4000002c) /* DMA Control / Status Register for Channel 11 */
85#define DCSR12 __REG(0x40000030) /* DMA Control / Status Register for Channel 12 */
86#define DCSR13 __REG(0x40000034) /* DMA Control / Status Register for Channel 13 */
87#define DCSR14 __REG(0x40000038) /* DMA Control / Status Register for Channel 14 */
88#define DCSR15 __REG(0x4000003c) /* DMA Control / Status Register for Channel 15 */
89
90#define DCSR(x) __REG2(0x40000000, (x) << 2)
91
92#define DCSR_RUN (1 << 31) /* Run Bit (read / write) */
93#define DCSR_NODESC (1 << 30) /* No-Descriptor Fetch (read / write) */
94#define DCSR_STOPIRQEN (1 << 29) /* Stop Interrupt Enable (read / write) */
95#ifdef CONFIG_PXA27x
96#define DCSR_EORIRQEN (1 << 28) /* End of Receive Interrupt Enable (R/W) */
97#define DCSR_EORJMPEN (1 << 27) /* Jump to next descriptor on EOR */
98#define DCSR_EORSTOPEN (1 << 26) /* STOP on an EOR */
99#define DCSR_SETCMPST (1 << 25) /* Set Descriptor Compare Status */
100#define DCSR_CLRCMPST (1 << 24) /* Clear Descriptor Compare Status */
101#define DCSR_CMPST (1 << 10) /* The Descriptor Compare Status */
102#define DCSR_EORINTR (1 << 9) /* The end of Receive */
103#endif
104#define DCSR_REQPEND (1 << 8) /* Request Pending (read-only) */
105#define DCSR_STOPSTATE (1 << 3) /* Stop State (read-only) */
106#define DCSR_ENDINTR (1 << 2) /* End Interrupt (read / write) */
107#define DCSR_STARTINTR (1 << 1) /* Start Interrupt (read / write) */
108#define DCSR_BUSERR (1 << 0) /* Bus Error Interrupt (read / write) */
109
110#define DALGN __REG(0x400000a0) /* DMA Alignment Register */
111#define DINT __REG(0x400000f0) /* DMA Interrupt Register */
112
113#define DRCMR(n) (*(((n) < 64) ? \
114 &__REG2(0x40000100, ((n) & 0x3f) << 2) : \
115 &__REG2(0x40001100, ((n) & 0x3f) << 2)))
116
117#define DRCMR0 __REG(0x40000100) /* Request to Channel Map Register for DREQ 0 */
118#define DRCMR1 __REG(0x40000104) /* Request to Channel Map Register for DREQ 1 */
119#define DRCMR2 __REG(0x40000108) /* Request to Channel Map Register for I2S receive Request */
120#define DRCMR3 __REG(0x4000010c) /* Request to Channel Map Register for I2S transmit Request */
121#define DRCMR4 __REG(0x40000110) /* Request to Channel Map Register for BTUART receive Request */
122#define DRCMR5 __REG(0x40000114) /* Request to Channel Map Register for BTUART transmit Request. */
123#define DRCMR6 __REG(0x40000118) /* Request to Channel Map Register for FFUART receive Request */
124#define DRCMR7 __REG(0x4000011c) /* Request to Channel Map Register for FFUART transmit Request */
125#define DRCMR8 __REG(0x40000120) /* Request to Channel Map Register for AC97 microphone Request */
126#define DRCMR9 __REG(0x40000124) /* Request to Channel Map Register for AC97 modem receive Request */
127#define DRCMR10 __REG(0x40000128) /* Request to Channel Map Register for AC97 modem transmit Request */
128#define DRCMR11 __REG(0x4000012c) /* Request to Channel Map Register for AC97 audio receive Request */
129#define DRCMR12 __REG(0x40000130) /* Request to Channel Map Register for AC97 audio transmit Request */
130#define DRCMR13 __REG(0x40000134) /* Request to Channel Map Register for SSP receive Request */
131#define DRCMR14 __REG(0x40000138) /* Request to Channel Map Register for SSP transmit Request */
132#define DRCMR15 __REG(0x4000013c) /* Request to Channel Map Register for SSP2 receive Request */
133#define DRCMR16 __REG(0x40000140) /* Request to Channel Map Register for SSP2 transmit Request */
134#define DRCMR17 __REG(0x40000144) /* Request to Channel Map Register for ICP receive Request */
135#define DRCMR18 __REG(0x40000148) /* Request to Channel Map Register for ICP transmit Request */
136#define DRCMR19 __REG(0x4000014c) /* Request to Channel Map Register for STUART receive Request */
137#define DRCMR20 __REG(0x40000150) /* Request to Channel Map Register for STUART transmit Request */
138#define DRCMR21 __REG(0x40000154) /* Request to Channel Map Register for MMC receive Request */
139#define DRCMR22 __REG(0x40000158) /* Request to Channel Map Register for MMC transmit Request */
140#define DRCMR23 __REG(0x4000015c) /* Reserved */
141#define DRCMR24 __REG(0x40000160) /* Reserved */
142#define DRCMR25 __REG(0x40000164) /* Request to Channel Map Register for USB endpoint 1 Request */
143#define DRCMR26 __REG(0x40000168) /* Request to Channel Map Register for USB endpoint 2 Request */
144#define DRCMR27 __REG(0x4000016C) /* Request to Channel Map Register for USB endpoint 3 Request */
145#define DRCMR28 __REG(0x40000170) /* Request to Channel Map Register for USB endpoint 4 Request */
146#define DRCMR29 __REG(0x40000174) /* Reserved */
147#define DRCMR30 __REG(0x40000178) /* Request to Channel Map Register for USB endpoint 6 Request */
148#define DRCMR31 __REG(0x4000017C) /* Request to Channel Map Register for USB endpoint 7 Request */
149#define DRCMR32 __REG(0x40000180) /* Request to Channel Map Register for USB endpoint 8 Request */
150#define DRCMR33 __REG(0x40000184) /* Request to Channel Map Register for USB endpoint 9 Request */
151#define DRCMR34 __REG(0x40000188) /* Reserved */
152#define DRCMR35 __REG(0x4000018C) /* Request to Channel Map Register for USB endpoint 11 Request */
153#define DRCMR36 __REG(0x40000190) /* Request to Channel Map Register for USB endpoint 12 Request */
154#define DRCMR37 __REG(0x40000194) /* Request to Channel Map Register for USB endpoint 13 Request */
155#define DRCMR38 __REG(0x40000198) /* Request to Channel Map Register for USB endpoint 14 Request */
156#define DRCMR39 __REG(0x4000019C) /* Reserved */
157#define DRCMR66 __REG(0x40001108) /* Request to Channel Map Register for SSP3 receive Request */
158#define DRCMR67 __REG(0x4000110C) /* Request to Channel Map Register for SSP3 transmit Request */
159#define DRCMR68 __REG(0x40001110) /* Request to Channel Map Register for Camera FIFO 0 Request */
160#define DRCMR69 __REG(0x40001114) /* Request to Channel Map Register for Camera FIFO 1 Request */
161#define DRCMR70 __REG(0x40001118) /* Request to Channel Map Register for Camera FIFO 2 Request */
162
163#define DRCMRRXSADR DRCMR2
164#define DRCMRTXSADR DRCMR3
165#define DRCMRRXBTRBR DRCMR4
166#define DRCMRTXBTTHR DRCMR5
167#define DRCMRRXFFRBR DRCMR6
168#define DRCMRTXFFTHR DRCMR7
169#define DRCMRRXMCDR DRCMR8
170#define DRCMRRXMODR DRCMR9
171#define DRCMRTXMODR DRCMR10
172#define DRCMRRXPCDR DRCMR11
173#define DRCMRTXPCDR DRCMR12
174#define DRCMRRXSSDR DRCMR13
175#define DRCMRTXSSDR DRCMR14
176#define DRCMRRXSS2DR DRCMR15
177#define DRCMRTXSS2DR DRCMR16
178#define DRCMRRXICDR DRCMR17
179#define DRCMRTXICDR DRCMR18
180#define DRCMRRXSTRBR DRCMR19
181#define DRCMRTXSTTHR DRCMR20
182#define DRCMRRXMMC DRCMR21
183#define DRCMRTXMMC DRCMR22
184#define DRCMRRXSS3DR DRCMR66
185#define DRCMRTXSS3DR DRCMR67
186#define DRCMRUDC(x) DRCMR((x) + 24)
187
188#define DRCMR_MAPVLD (1 << 7) /* Map Valid (read / write) */
189#define DRCMR_CHLNUM 0x1f /* mask for Channel Number (read / write) */
190
191#define DDADR0 __REG(0x40000200) /* DMA Descriptor Address Register Channel 0 */
192#define DSADR0 __REG(0x40000204) /* DMA Source Address Register Channel 0 */
193#define DTADR0 __REG(0x40000208) /* DMA Target Address Register Channel 0 */
194#define DCMD0 __REG(0x4000020c) /* DMA Command Address Register Channel 0 */
195#define DDADR1 __REG(0x40000210) /* DMA Descriptor Address Register Channel 1 */
196#define DSADR1 __REG(0x40000214) /* DMA Source Address Register Channel 1 */
197#define DTADR1 __REG(0x40000218) /* DMA Target Address Register Channel 1 */
198#define DCMD1 __REG(0x4000021c) /* DMA Command Address Register Channel 1 */
199#define DDADR2 __REG(0x40000220) /* DMA Descriptor Address Register Channel 2 */
200#define DSADR2 __REG(0x40000224) /* DMA Source Address Register Channel 2 */
201#define DTADR2 __REG(0x40000228) /* DMA Target Address Register Channel 2 */
202#define DCMD2 __REG(0x4000022c) /* DMA Command Address Register Channel 2 */
203#define DDADR3 __REG(0x40000230) /* DMA Descriptor Address Register Channel 3 */
204#define DSADR3 __REG(0x40000234) /* DMA Source Address Register Channel 3 */
205#define DTADR3 __REG(0x40000238) /* DMA Target Address Register Channel 3 */
206#define DCMD3 __REG(0x4000023c) /* DMA Command Address Register Channel 3 */
207#define DDADR4 __REG(0x40000240) /* DMA Descriptor Address Register Channel 4 */
208#define DSADR4 __REG(0x40000244) /* DMA Source Address Register Channel 4 */
209#define DTADR4 __REG(0x40000248) /* DMA Target Address Register Channel 4 */
210#define DCMD4 __REG(0x4000024c) /* DMA Command Address Register Channel 4 */
211#define DDADR5 __REG(0x40000250) /* DMA Descriptor Address Register Channel 5 */
212#define DSADR5 __REG(0x40000254) /* DMA Source Address Register Channel 5 */
213#define DTADR5 __REG(0x40000258) /* DMA Target Address Register Channel 5 */
214#define DCMD5 __REG(0x4000025c) /* DMA Command Address Register Channel 5 */
215#define DDADR6 __REG(0x40000260) /* DMA Descriptor Address Register Channel 6 */
216#define DSADR6 __REG(0x40000264) /* DMA Source Address Register Channel 6 */
217#define DTADR6 __REG(0x40000268) /* DMA Target Address Register Channel 6 */
218#define DCMD6 __REG(0x4000026c) /* DMA Command Address Register Channel 6 */
219#define DDADR7 __REG(0x40000270) /* DMA Descriptor Address Register Channel 7 */
220#define DSADR7 __REG(0x40000274) /* DMA Source Address Register Channel 7 */
221#define DTADR7 __REG(0x40000278) /* DMA Target Address Register Channel 7 */
222#define DCMD7 __REG(0x4000027c) /* DMA Command Address Register Channel 7 */
223#define DDADR8 __REG(0x40000280) /* DMA Descriptor Address Register Channel 8 */
224#define DSADR8 __REG(0x40000284) /* DMA Source Address Register Channel 8 */
225#define DTADR8 __REG(0x40000288) /* DMA Target Address Register Channel 8 */
226#define DCMD8 __REG(0x4000028c) /* DMA Command Address Register Channel 8 */
227#define DDADR9 __REG(0x40000290) /* DMA Descriptor Address Register Channel 9 */
228#define DSADR9 __REG(0x40000294) /* DMA Source Address Register Channel 9 */
229#define DTADR9 __REG(0x40000298) /* DMA Target Address Register Channel 9 */
230#define DCMD9 __REG(0x4000029c) /* DMA Command Address Register Channel 9 */
231#define DDADR10 __REG(0x400002a0) /* DMA Descriptor Address Register Channel 10 */
232#define DSADR10 __REG(0x400002a4) /* DMA Source Address Register Channel 10 */
233#define DTADR10 __REG(0x400002a8) /* DMA Target Address Register Channel 10 */
234#define DCMD10 __REG(0x400002ac) /* DMA Command Address Register Channel 10 */
235#define DDADR11 __REG(0x400002b0) /* DMA Descriptor Address Register Channel 11 */
236#define DSADR11 __REG(0x400002b4) /* DMA Source Address Register Channel 11 */
237#define DTADR11 __REG(0x400002b8) /* DMA Target Address Register Channel 11 */
238#define DCMD11 __REG(0x400002bc) /* DMA Command Address Register Channel 11 */
239#define DDADR12 __REG(0x400002c0) /* DMA Descriptor Address Register Channel 12 */
240#define DSADR12 __REG(0x400002c4) /* DMA Source Address Register Channel 12 */
241#define DTADR12 __REG(0x400002c8) /* DMA Target Address Register Channel 12 */
242#define DCMD12 __REG(0x400002cc) /* DMA Command Address Register Channel 12 */
243#define DDADR13 __REG(0x400002d0) /* DMA Descriptor Address Register Channel 13 */
244#define DSADR13 __REG(0x400002d4) /* DMA Source Address Register Channel 13 */
245#define DTADR13 __REG(0x400002d8) /* DMA Target Address Register Channel 13 */
246#define DCMD13 __REG(0x400002dc) /* DMA Command Address Register Channel 13 */
247#define DDADR14 __REG(0x400002e0) /* DMA Descriptor Address Register Channel 14 */
248#define DSADR14 __REG(0x400002e4) /* DMA Source Address Register Channel 14 */
249#define DTADR14 __REG(0x400002e8) /* DMA Target Address Register Channel 14 */
250#define DCMD14 __REG(0x400002ec) /* DMA Command Address Register Channel 14 */
251#define DDADR15 __REG(0x400002f0) /* DMA Descriptor Address Register Channel 15 */
252#define DSADR15 __REG(0x400002f4) /* DMA Source Address Register Channel 15 */
253#define DTADR15 __REG(0x400002f8) /* DMA Target Address Register Channel 15 */
254#define DCMD15 __REG(0x400002fc) /* DMA Command Address Register Channel 15 */
255
256#define DDADR(x) __REG2(0x40000200, (x) << 4)
257#define DSADR(x) __REG2(0x40000204, (x) << 4)
258#define DTADR(x) __REG2(0x40000208, (x) << 4)
259#define DCMD(x) __REG2(0x4000020c, (x) << 4)
260
261#define DDADR_DESCADDR 0xfffffff0 /* Address of next descriptor (mask) */
262#define DDADR_STOP (1 << 0) /* Stop (read / write) */
263
264#define DCMD_INCSRCADDR (1 << 31) /* Source Address Increment Setting. */
265#define DCMD_INCTRGADDR (1 << 30) /* Target Address Increment Setting. */
266#define DCMD_FLOWSRC (1 << 29) /* Flow Control by the source. */
267#define DCMD_FLOWTRG (1 << 28) /* Flow Control by the target. */
268#define DCMD_STARTIRQEN (1 << 22) /* Start Interrupt Enable */
269#define DCMD_ENDIRQEN (1 << 21) /* End Interrupt Enable */
270#define DCMD_ENDIAN (1 << 18) /* Device Endian-ness. */
271#define DCMD_BURST8 (1 << 16) /* 8 byte burst */
272#define DCMD_BURST16 (2 << 16) /* 16 byte burst */
273#define DCMD_BURST32 (3 << 16) /* 32 byte burst */
274#define DCMD_WIDTH1 (1 << 14) /* 1 byte width */
275#define DCMD_WIDTH2 (2 << 14) /* 2 byte width (HalfWord) */
276#define DCMD_WIDTH4 (3 << 14) /* 4 byte width (Word) */
277#define DCMD_LENGTH 0x01fff /* length mask (max = 8K - 1) */
278
279
280/*
281 * UARTs
282 */
283
284/* Full Function UART (FFUART) */
285#define FFUART FFRBR
286#define FFRBR __REG(0x40100000) /* Receive Buffer Register (read only) */
287#define FFTHR __REG(0x40100000) /* Transmit Holding Register (write only) */
288#define FFIER __REG(0x40100004) /* Interrupt Enable Register (read/write) */
289#define FFIIR __REG(0x40100008) /* Interrupt ID Register (read only) */
290#define FFFCR __REG(0x40100008) /* FIFO Control Register (write only) */
291#define FFLCR __REG(0x4010000C) /* Line Control Register (read/write) */
292#define FFMCR __REG(0x40100010) /* Modem Control Register (read/write) */
293#define FFLSR __REG(0x40100014) /* Line Status Register (read only) */
294#define FFMSR __REG(0x40100018) /* Modem Status Register (read only) */
295#define FFSPR __REG(0x4010001C) /* Scratch Pad Register (read/write) */
296#define FFISR __REG(0x40100020) /* Infrared Selection Register (read/write) */
297#define FFDLL __REG(0x40100000) /* Divisor Latch Low Register (DLAB = 1) (read/write) */
298#define FFDLH __REG(0x40100004) /* Divisor Latch High Register (DLAB = 1) (read/write) */
299
300/* Bluetooth UART (BTUART) */
301#define BTUART BTRBR
302#define BTRBR __REG(0x40200000) /* Receive Buffer Register (read only) */
303#define BTTHR __REG(0x40200000) /* Transmit Holding Register (write only) */
304#define BTIER __REG(0x40200004) /* Interrupt Enable Register (read/write) */
305#define BTIIR __REG(0x40200008) /* Interrupt ID Register (read only) */
306#define BTFCR __REG(0x40200008) /* FIFO Control Register (write only) */
307#define BTLCR __REG(0x4020000C) /* Line Control Register (read/write) */
308#define BTMCR __REG(0x40200010) /* Modem Control Register (read/write) */
309#define BTLSR __REG(0x40200014) /* Line Status Register (read only) */
310#define BTMSR __REG(0x40200018) /* Modem Status Register (read only) */
311#define BTSPR __REG(0x4020001C) /* Scratch Pad Register (read/write) */
312#define BTISR __REG(0x40200020) /* Infrared Selection Register (read/write) */
313#define BTDLL __REG(0x40200000) /* Divisor Latch Low Register (DLAB = 1) (read/write) */
314#define BTDLH __REG(0x40200004) /* Divisor Latch High Register (DLAB = 1) (read/write) */
315
316/* Standard UART (STUART) */
317#define STUART STRBR
318#define STRBR __REG(0x40700000) /* Receive Buffer Register (read only) */
319#define STTHR __REG(0x40700000) /* Transmit Holding Register (write only) */
320#define STIER __REG(0x40700004) /* Interrupt Enable Register (read/write) */
321#define STIIR __REG(0x40700008) /* Interrupt ID Register (read only) */
322#define STFCR __REG(0x40700008) /* FIFO Control Register (write only) */
323#define STLCR __REG(0x4070000C) /* Line Control Register (read/write) */
324#define STMCR __REG(0x40700010) /* Modem Control Register (read/write) */
325#define STLSR __REG(0x40700014) /* Line Status Register (read only) */
326#define STMSR __REG(0x40700018) /* Reserved */
327#define STSPR __REG(0x4070001C) /* Scratch Pad Register (read/write) */
328#define STISR __REG(0x40700020) /* Infrared Selection Register (read/write) */
329#define STDLL __REG(0x40700000) /* Divisor Latch Low Register (DLAB = 1) (read/write) */
330#define STDLH __REG(0x40700004) /* Divisor Latch High Register (DLAB = 1) (read/write) */
331
332/* Hardware UART (HWUART) */
333#define HWUART HWRBR
334#define HWRBR __REG(0x41600000) /* Receive Buffer Register (read only) */
335#define HWTHR __REG(0x41600000) /* Transmit Holding Register (write only) */
336#define HWIER __REG(0x41600004) /* Interrupt Enable Register (read/write) */
337#define HWIIR __REG(0x41600008) /* Interrupt ID Register (read only) */
338#define HWFCR __REG(0x41600008) /* FIFO Control Register (write only) */
339#define HWLCR __REG(0x4160000C) /* Line Control Register (read/write) */
340#define HWMCR __REG(0x41600010) /* Modem Control Register (read/write) */
341#define HWLSR __REG(0x41600014) /* Line Status Register (read only) */
342#define HWMSR __REG(0x41600018) /* Modem Status Register (read only) */
343#define HWSPR __REG(0x4160001C) /* Scratch Pad Register (read/write) */
344#define HWISR __REG(0x41600020) /* Infrared Selection Register (read/write) */
345#define HWFOR __REG(0x41600024) /* Receive FIFO Occupancy Register (read only) */
346#define HWABR __REG(0x41600028) /* Auto-Baud Control Register (read/write) */
347#define HWACR __REG(0x4160002C) /* Auto-Baud Count Register (read only) */
348#define HWDLL __REG(0x41600000) /* Divisor Latch Low Register (DLAB = 1) (read/write) */
349#define HWDLH __REG(0x41600004) /* Divisor Latch High Register (DLAB = 1) (read/write) */
350
351#define IER_DMAE (1 << 7) /* DMA Requests Enable */
352#define IER_UUE (1 << 6) /* UART Unit Enable */
353#define IER_NRZE (1 << 5) /* NRZ coding Enable */
354#define IER_RTIOE (1 << 4) /* Receiver Time Out Interrupt Enable */
355#define IER_MIE (1 << 3) /* Modem Interrupt Enable */
356#define IER_RLSE (1 << 2) /* Receiver Line Status Interrupt Enable */
357#define IER_TIE (1 << 1) /* Transmit Data request Interrupt Enable */
358#define IER_RAVIE (1 << 0) /* Receiver Data Available Interrupt Enable */
359
360#define IIR_FIFOES1 (1 << 7) /* FIFO Mode Enable Status */
361#define IIR_FIFOES0 (1 << 6) /* FIFO Mode Enable Status */
362#define IIR_TOD (1 << 3) /* Time Out Detected */
363#define IIR_IID2 (1 << 2) /* Interrupt Source Encoded */
364#define IIR_IID1 (1 << 1) /* Interrupt Source Encoded */
365#define IIR_IP (1 << 0) /* Interrupt Pending (active low) */
366
367#define FCR_ITL2 (1 << 7) /* Interrupt Trigger Level */
368#define FCR_ITL1 (1 << 6) /* Interrupt Trigger Level */
369#define FCR_RESETTF (1 << 2) /* Reset Transmitter FIFO */
370#define FCR_RESETRF (1 << 1) /* Reset Receiver FIFO */
371#define FCR_TRFIFOE (1 << 0) /* Transmit and Receive FIFO Enable */
372#define FCR_ITL_1 (0)
373#define FCR_ITL_8 (FCR_ITL1)
374#define FCR_ITL_16 (FCR_ITL2)
375#define FCR_ITL_32 (FCR_ITL2|FCR_ITL1)
376
377#define LCR_DLAB (1 << 7) /* Divisor Latch Access Bit */
378#define LCR_SB (1 << 6) /* Set Break */
379#define LCR_STKYP (1 << 5) /* Sticky Parity */
380#define LCR_EPS (1 << 4) /* Even Parity Select */
381#define LCR_PEN (1 << 3) /* Parity Enable */
382#define LCR_STB (1 << 2) /* Stop Bit */
383#define LCR_WLS1 (1 << 1) /* Word Length Select */
384#define LCR_WLS0 (1 << 0) /* Word Length Select */
385
386#define LSR_FIFOE (1 << 7) /* FIFO Error Status */
387#define LSR_TEMT (1 << 6) /* Transmitter Empty */
388#define LSR_TDRQ (1 << 5) /* Transmit Data Request */
389#define LSR_BI (1 << 4) /* Break Interrupt */
390#define LSR_FE (1 << 3) /* Framing Error */
391#define LSR_PE (1 << 2) /* Parity Error */
392#define LSR_OE (1 << 1) /* Overrun Error */
393#define LSR_DR (1 << 0) /* Data Ready */
394
395#define MCR_LOOP (1 << 4)
396#define MCR_OUT2 (1 << 3) /* force MSR_DCD in loopback mode */
397#define MCR_OUT1 (1 << 2) /* force MSR_RI in loopback mode */
398#define MCR_RTS (1 << 1) /* Request to Send */
399#define MCR_DTR (1 << 0) /* Data Terminal Ready */
400
401#define MSR_DCD (1 << 7) /* Data Carrier Detect */
402#define MSR_RI (1 << 6) /* Ring Indicator */
403#define MSR_DSR (1 << 5) /* Data Set Ready */
404#define MSR_CTS (1 << 4) /* Clear To Send */
405#define MSR_DDCD (1 << 3) /* Delta Data Carrier Detect */
406#define MSR_TERI (1 << 2) /* Trailing Edge Ring Indicator */
407#define MSR_DDSR (1 << 1) /* Delta Data Set Ready */
408#define MSR_DCTS (1 << 0) /* Delta Clear To Send */
409
410/*
411 * IrSR (Infrared Selection Register)
412 */
413#define STISR_RXPL (1 << 4) /* Receive Data Polarity */
414#define STISR_TXPL (1 << 3) /* Transmit Data Polarity */
415#define STISR_XMODE (1 << 2) /* Transmit Pulse Width Select */
416#define STISR_RCVEIR (1 << 1) /* Receiver SIR Enable */
417#define STISR_XMITIR (1 << 0) /* Transmitter SIR Enable */
418
419
420/*
421 * I2C registers
422 */
423
424#define IBMR __REG(0x40301680) /* I2C Bus Monitor Register - IBMR */
425#define IDBR __REG(0x40301688) /* I2C Data Buffer Register - IDBR */
426#define ICR __REG(0x40301690) /* I2C Control Register - ICR */
427#define ISR __REG(0x40301698) /* I2C Status Register - ISR */
428#define ISAR __REG(0x403016A0) /* I2C Slave Address Register - ISAR */
429
430#define PWRIBMR __REG(0x40f00180) /* Power I2C Bus Monitor Register-IBMR */
431#define PWRIDBR __REG(0x40f00188) /* Power I2C Data Buffer Register-IDBR */
432#define PWRICR __REG(0x40f00190) /* Power I2C Control Register - ICR */
433#define PWRISR __REG(0x40f00198) /* Power I2C Status Register - ISR */
434#define PWRISAR __REG(0x40f001A0) /*Power I2C Slave Address Register-ISAR */
435
436#define ICR_START (1 << 0) /* start bit */
437#define ICR_STOP (1 << 1) /* stop bit */
438#define ICR_ACKNAK (1 << 2) /* send ACK(0) or NAK(1) */
439#define ICR_TB (1 << 3) /* transfer byte bit */
440#define ICR_MA (1 << 4) /* master abort */
441#define ICR_SCLE (1 << 5) /* master clock enable */
442#define ICR_IUE (1 << 6) /* unit enable */
443#define ICR_GCD (1 << 7) /* general call disable */
444#define ICR_ITEIE (1 << 8) /* enable tx interrupts */
445#define ICR_IRFIE (1 << 9) /* enable rx interrupts */
446#define ICR_BEIE (1 << 10) /* enable bus error ints */
447#define ICR_SSDIE (1 << 11) /* slave STOP detected int enable */
448#define ICR_ALDIE (1 << 12) /* enable arbitration interrupt */
449#define ICR_SADIE (1 << 13) /* slave address detected int enable */
450#define ICR_UR (1 << 14) /* unit reset */
451
452#define ISR_RWM (1 << 0) /* read/write mode */
453#define ISR_ACKNAK (1 << 1) /* ack/nak status */
454#define ISR_UB (1 << 2) /* unit busy */
455#define ISR_IBB (1 << 3) /* bus busy */
456#define ISR_SSD (1 << 4) /* slave stop detected */
457#define ISR_ALD (1 << 5) /* arbitration loss detected */
458#define ISR_ITE (1 << 6) /* tx buffer empty */
459#define ISR_IRF (1 << 7) /* rx buffer full */
460#define ISR_GCAD (1 << 8) /* general call address detected */
461#define ISR_SAD (1 << 9) /* slave address detected */
462#define ISR_BED (1 << 10) /* bus error no ACK/NAK */
463
464
465/*
466 * Serial Audio Controller
467 */
468
469#define SACR0 __REG(0x40400000) /* Global Control Register */
470#define SACR1 __REG(0x40400004) /* Serial Audio I 2 S/MSB-Justified Control Register */
471#define SASR0 __REG(0x4040000C) /* Serial Audio I 2 S/MSB-Justified Interface and FIFO Status Register */
472#define SAIMR __REG(0x40400014) /* Serial Audio Interrupt Mask Register */
473#define SAICR __REG(0x40400018) /* Serial Audio Interrupt Clear Register */
474#define SADIV __REG(0x40400060) /* Audio Clock Divider Register. */
475#define SADR __REG(0x40400080) /* Serial Audio Data Register (TX and RX FIFO access Register). */
476
477#define SACR0_RFTH(x) ((x) << 12) /* Rx FIFO Interrupt or DMA Trigger Threshold */
478#define SACR0_TFTH(x) ((x) << 8) /* Tx FIFO Interrupt or DMA Trigger Threshold */
479#define SACR0_STRF (1 << 5) /* FIFO Select for EFWR Special Function */
480#define SACR0_EFWR (1 << 4) /* Enable EFWR Function */
481#define SACR0_RST (1 << 3) /* FIFO, i2s Register Reset */
482#define SACR0_BCKD (1 << 2) /* Bit Clock Direction */
483#define SACR0_ENB (1 << 0) /* Enable I2S Link */
484#define SACR1_ENLBF (1 << 5) /* Enable Loopback */
485#define SACR1_DRPL (1 << 4) /* Disable Replaying Function */
486#define SACR1_DREC (1 << 3) /* Disable Recording Function */
487#define SACR1_AMSL (1 << 0) /* Specify Alternate Mode */
488
489#define SASR0_I2SOFF (1 << 7) /* Controller Status */
490#define SASR0_ROR (1 << 6) /* Rx FIFO Overrun */
491#define SASR0_TUR (1 << 5) /* Tx FIFO Underrun */
492#define SASR0_RFS (1 << 4) /* Rx FIFO Service Request */
493#define SASR0_TFS (1 << 3) /* Tx FIFO Service Request */
494#define SASR0_BSY (1 << 2) /* I2S Busy */
495#define SASR0_RNE (1 << 1) /* Rx FIFO Not Empty */
496#define SASR0_TNF (1 << 0) /* Tx FIFO Not Empty */
497
498#define SAICR_ROR (1 << 6) /* Clear Rx FIFO Overrun Interrupt */
499#define SAICR_TUR (1 << 5) /* Clear Tx FIFO Underrun Interrupt */
500
501#define SAIMR_ROR (1 << 6) /* Enable Rx FIFO Overrun Condition Interrupt */
502#define SAIMR_TUR (1 << 5) /* Enable Tx FIFO Underrun Condition Interrupt */
503#define SAIMR_RFS (1 << 4) /* Enable Rx FIFO Service Interrupt */
504#define SAIMR_TFS (1 << 3) /* Enable Tx FIFO Service Interrupt */
505
506/*
507 * AC97 Controller registers
508 */
509
510#define POCR __REG(0x40500000) /* PCM Out Control Register */
511#define POCR_FEIE (1 << 3) /* FIFO Error Interrupt Enable */
512#define POCR_FSRIE (1 << 1) /* FIFO Service Request Interrupt Enable */
513
514#define PICR __REG(0x40500004) /* PCM In Control Register */
515#define PICR_FEIE (1 << 3) /* FIFO Error Interrupt Enable */
516#define PICR_FSRIE (1 << 1) /* FIFO Service Request Interrupt Enable */
517
518#define MCCR __REG(0x40500008) /* Mic In Control Register */
519#define MCCR_FEIE (1 << 3) /* FIFO Error Interrupt Enable */
520#define MCCR_FSRIE (1 << 1) /* FIFO Service Request Interrupt Enable */
521
522#define GCR __REG(0x4050000C) /* Global Control Register */
523#ifdef CONFIG_PXA3xx
524#define GCR_CLKBPB (1 << 31) /* Internal clock enable */
525#endif
526#define GCR_nDMAEN (1 << 24) /* non DMA Enable */
527#define GCR_CDONE_IE (1 << 19) /* Command Done Interrupt Enable */
528#define GCR_SDONE_IE (1 << 18) /* Status Done Interrupt Enable */
529#define GCR_SECRDY_IEN (1 << 9) /* Secondary Ready Interrupt Enable */
530#define GCR_PRIRDY_IEN (1 << 8) /* Primary Ready Interrupt Enable */
531#define GCR_SECRES_IEN (1 << 5) /* Secondary Resume Interrupt Enable */
532#define GCR_PRIRES_IEN (1 << 4) /* Primary Resume Interrupt Enable */
533#define GCR_ACLINK_OFF (1 << 3) /* AC-link Shut Off */
534#define GCR_WARM_RST (1 << 2) /* AC97 Warm Reset */
535#define GCR_COLD_RST (1 << 1) /* AC'97 Cold Reset (0 = active) */
536#define GCR_GIE (1 << 0) /* Codec GPI Interrupt Enable */
537
538#define POSR __REG(0x40500010) /* PCM Out Status Register */
539#define POSR_FIFOE (1 << 4) /* FIFO error */
540#define POSR_FSR (1 << 2) /* FIFO Service Request */
541
542#define PISR __REG(0x40500014) /* PCM In Status Register */
543#define PISR_FIFOE (1 << 4) /* FIFO error */
544#define PISR_EOC (1 << 3) /* DMA End-of-Chain (exclusive clear) */
545#define PISR_FSR (1 << 2) /* FIFO Service Request */
546
547#define MCSR __REG(0x40500018) /* Mic In Status Register */
548#define MCSR_FIFOE (1 << 4) /* FIFO error */
549#define MCSR_EOC (1 << 3) /* DMA End-of-Chain (exclusive clear) */
550#define MCSR_FSR (1 << 2) /* FIFO Service Request */
551
552#define GSR __REG(0x4050001C) /* Global Status Register */
553#define GSR_CDONE (1 << 19) /* Command Done */
554#define GSR_SDONE (1 << 18) /* Status Done */
555#define GSR_RDCS (1 << 15) /* Read Completion Status */
556#define GSR_BIT3SLT12 (1 << 14) /* Bit 3 of slot 12 */
557#define GSR_BIT2SLT12 (1 << 13) /* Bit 2 of slot 12 */
558#define GSR_BIT1SLT12 (1 << 12) /* Bit 1 of slot 12 */
559#define GSR_SECRES (1 << 11) /* Secondary Resume Interrupt */
560#define GSR_PRIRES (1 << 10) /* Primary Resume Interrupt */
561#define GSR_SCR (1 << 9) /* Secondary Codec Ready */
562#define GSR_PCR (1 << 8) /* Primary Codec Ready */
563#define GSR_MCINT (1 << 7) /* Mic In Interrupt */
564#define GSR_POINT (1 << 6) /* PCM Out Interrupt */
565#define GSR_PIINT (1 << 5) /* PCM In Interrupt */
566#define GSR_ACOFFD (1 << 3) /* AC-link Shut Off Done */
567#define GSR_MOINT (1 << 2) /* Modem Out Interrupt */
568#define GSR_MIINT (1 << 1) /* Modem In Interrupt */
569#define GSR_GSCI (1 << 0) /* Codec GPI Status Change Interrupt */
570
571#define CAR __REG(0x40500020) /* CODEC Access Register */
572#define CAR_CAIP (1 << 0) /* Codec Access In Progress */
573
574#define PCDR __REG(0x40500040) /* PCM FIFO Data Register */
575#define MCDR __REG(0x40500060) /* Mic-in FIFO Data Register */
576
577#define MOCR __REG(0x40500100) /* Modem Out Control Register */
578#define MOCR_FEIE (1 << 3) /* FIFO Error */
579#define MOCR_FSRIE (1 << 1) /* FIFO Service Request Interrupt Enable */
580
581#define MICR __REG(0x40500108) /* Modem In Control Register */
582#define MICR_FEIE (1 << 3) /* FIFO Error */
583#define MICR_FSRIE (1 << 1) /* FIFO Service Request Interrupt Enable */
584
585#define MOSR __REG(0x40500110) /* Modem Out Status Register */
586#define MOSR_FIFOE (1 << 4) /* FIFO error */
587#define MOSR_FSR (1 << 2) /* FIFO Service Request */
588
589#define MISR __REG(0x40500118) /* Modem In Status Register */
590#define MISR_FIFOE (1 << 4) /* FIFO error */
591#define MISR_EOC (1 << 3) /* DMA End-of-Chain (exclusive clear) */
592#define MISR_FSR (1 << 2) /* FIFO Service Request */
593
594#define MODR __REG(0x40500140) /* Modem FIFO Data Register */
595
596#define PAC_REG_BASE __REG(0x40500200) /* Primary Audio Codec */
597#define SAC_REG_BASE __REG(0x40500300) /* Secondary Audio Codec */
598#define PMC_REG_BASE __REG(0x40500400) /* Primary Modem Codec */
599#define SMC_REG_BASE __REG(0x40500500) /* Secondary Modem Codec */
600
601
602/*
603 * Fast Infrared Communication Port
604 */
605
606#define FICP __REG(0x40800000) /* Start of FICP area */
607#define ICCR0 __REG(0x40800000) /* ICP Control Register 0 */
608#define ICCR1 __REG(0x40800004) /* ICP Control Register 1 */
609#define ICCR2 __REG(0x40800008) /* ICP Control Register 2 */
610#define ICDR __REG(0x4080000c) /* ICP Data Register */
611#define ICSR0 __REG(0x40800014) /* ICP Status Register 0 */
612#define ICSR1 __REG(0x40800018) /* ICP Status Register 1 */
613
614#define ICCR0_AME (1 << 7) /* Address match enable */
615#define ICCR0_TIE (1 << 6) /* Transmit FIFO interrupt enable */
616#define ICCR0_RIE (1 << 5) /* Recieve FIFO interrupt enable */
617#define ICCR0_RXE (1 << 4) /* Receive enable */
618#define ICCR0_TXE (1 << 3) /* Transmit enable */
619#define ICCR0_TUS (1 << 2) /* Transmit FIFO underrun select */
620#define ICCR0_LBM (1 << 1) /* Loopback mode */
621#define ICCR0_ITR (1 << 0) /* IrDA transmission */
622
623#define ICCR2_RXP (1 << 3) /* Receive Pin Polarity select */
624#define ICCR2_TXP (1 << 2) /* Transmit Pin Polarity select */
625#define ICCR2_TRIG (3 << 0) /* Receive FIFO Trigger threshold */
626#define ICCR2_TRIG_8 (0 << 0) /* >= 8 bytes */
627#define ICCR2_TRIG_16 (1 << 0) /* >= 16 bytes */
628#define ICCR2_TRIG_32 (2 << 0) /* >= 32 bytes */
629
630#ifdef CONFIG_PXA27x
631#define ICSR0_EOC (1 << 6) /* DMA End of Descriptor Chain */
632#endif
633#define ICSR0_FRE (1 << 5) /* Framing error */
634#define ICSR0_RFS (1 << 4) /* Receive FIFO service request */
635#define ICSR0_TFS (1 << 3) /* Transnit FIFO service request */
636#define ICSR0_RAB (1 << 2) /* Receiver abort */
637#define ICSR0_TUR (1 << 1) /* Trunsmit FIFO underun */
638#define ICSR0_EIF (1 << 0) /* End/Error in FIFO */
639
640#define ICSR1_ROR (1 << 6) /* Receiver FIFO underrun */
641#define ICSR1_CRE (1 << 5) /* CRC error */
642#define ICSR1_EOF (1 << 4) /* End of frame */
643#define ICSR1_TNF (1 << 3) /* Transmit FIFO not full */
644#define ICSR1_RNE (1 << 2) /* Receive FIFO not empty */
645#define ICSR1_TBY (1 << 1) /* Tramsmiter busy flag */
646#define ICSR1_RSY (1 << 0) /* Recevier synchronized flag */
647
648
649/*
650 * Real Time Clock
651 */
652
653#define RCNR __REG(0x40900000) /* RTC Count Register */
654#define RTAR __REG(0x40900004) /* RTC Alarm Register */
655#define RTSR __REG(0x40900008) /* RTC Status Register */
656#define RTTR __REG(0x4090000C) /* RTC Timer Trim Register */
657#define PIAR __REG(0x40900038) /* Periodic Interrupt Alarm Register */
658
659#define RTSR_PICE (1 << 15) /* Periodic interrupt count enable */
660#define RTSR_PIALE (1 << 14) /* Periodic interrupt Alarm enable */
661#define RTSR_HZE (1 << 3) /* HZ interrupt enable */
662#define RTSR_ALE (1 << 2) /* RTC alarm interrupt enable */
663#define RTSR_HZ (1 << 1) /* HZ rising-edge detected */
664#define RTSR_AL (1 << 0) /* RTC alarm detected */
665
666
667/*
668 * OS Timer & Match Registers
669 */
670
671#define OSMR0 __REG(0x40A00000) /* */
672#define OSMR1 __REG(0x40A00004) /* */
673#define OSMR2 __REG(0x40A00008) /* */
674#define OSMR3 __REG(0x40A0000C) /* */
675#define OSMR4 __REG(0x40A00080) /* */
676#define OSCR __REG(0x40A00010) /* OS Timer Counter Register */
677#define OSCR4 __REG(0x40A00040) /* OS Timer Counter Register */
678#define OMCR4 __REG(0x40A000C0) /* */
679#define OSSR __REG(0x40A00014) /* OS Timer Status Register */
680#define OWER __REG(0x40A00018) /* OS Timer Watchdog Enable Register */
681#define OIER __REG(0x40A0001C) /* OS Timer Interrupt Enable Register */
682
683#define OSSR_M3 (1 << 3) /* Match status channel 3 */
684#define OSSR_M2 (1 << 2) /* Match status channel 2 */
685#define OSSR_M1 (1 << 1) /* Match status channel 1 */
686#define OSSR_M0 (1 << 0) /* Match status channel 0 */
687
688#define OWER_WME (1 << 0) /* Watchdog Match Enable */
689
690#define OIER_E3 (1 << 3) /* Interrupt enable channel 3 */
691#define OIER_E2 (1 << 2) /* Interrupt enable channel 2 */
692#define OIER_E1 (1 << 1) /* Interrupt enable channel 1 */
693#define OIER_E0 (1 << 0) /* Interrupt enable channel 0 */
694
695
696/*
697 * Pulse Width Modulator
698 */
699
700#define PWM_CTRL0 __REG(0x40B00000) /* PWM 0 Control Register */
701#define PWM_PWDUTY0 __REG(0x40B00004) /* PWM 0 Duty Cycle Register */
702#define PWM_PERVAL0 __REG(0x40B00008) /* PWM 0 Period Control Register */
703
704#define PWM_CTRL1 __REG(0x40C00000) /* PWM 1Control Register */
705#define PWM_PWDUTY1 __REG(0x40C00004) /* PWM 1 Duty Cycle Register */
706#define PWM_PERVAL1 __REG(0x40C00008) /* PWM 1 Period Control Register */
707
708
709/*
710 * Interrupt Controller
711 */
712
713#define ICIP __REG(0x40D00000) /* Interrupt Controller IRQ Pending Register */
714#define ICMR __REG(0x40D00004) /* Interrupt Controller Mask Register */
715#define ICLR __REG(0x40D00008) /* Interrupt Controller Level Register */
716#define ICFP __REG(0x40D0000C) /* Interrupt Controller FIQ Pending Register */
717#define ICPR __REG(0x40D00010) /* Interrupt Controller Pending Register */
718#define ICCR __REG(0x40D00014) /* Interrupt Controller Control Register */
719
720#define ICIP2 __REG(0x40D0009C) /* Interrupt Controller IRQ Pending Register 2 */
721#define ICMR2 __REG(0x40D000A0) /* Interrupt Controller Mask Register 2 */
722#define ICLR2 __REG(0x40D000A4) /* Interrupt Controller Level Register 2 */
723#define ICFP2 __REG(0x40D000A8) /* Interrupt Controller FIQ Pending Register 2 */
724#define ICPR2 __REG(0x40D000AC) /* Interrupt Controller Pending Register 2 */
725
726/*
727 * General Purpose I/O
728 */
729
730#define GPIO0_BASE ((void __iomem *)io_p2v(0x40E00000))
731#define GPIO1_BASE ((void __iomem *)io_p2v(0x40E00004))
732#define GPIO2_BASE ((void __iomem *)io_p2v(0x40E00008))
733#define GPIO3_BASE ((void __iomem *)io_p2v(0x40E00100))
734
735#define GPLR_OFFSET 0x00
736#define GPDR_OFFSET 0x0C
737#define GPSR_OFFSET 0x18
738#define GPCR_OFFSET 0x24
739#define GRER_OFFSET 0x30
740#define GFER_OFFSET 0x3C
741#define GEDR_OFFSET 0x48
742
743#define GPLR0 __REG(0x40E00000) /* GPIO Pin-Level Register GPIO<31:0> */
744#define GPLR1 __REG(0x40E00004) /* GPIO Pin-Level Register GPIO<63:32> */
745#define GPLR2 __REG(0x40E00008) /* GPIO Pin-Level Register GPIO<80:64> */
746
747#define GPDR0 __REG(0x40E0000C) /* GPIO Pin Direction Register GPIO<31:0> */
748#define GPDR1 __REG(0x40E00010) /* GPIO Pin Direction Register GPIO<63:32> */
749#define GPDR2 __REG(0x40E00014) /* GPIO Pin Direction Register GPIO<80:64> */
750
751#define GPSR0 __REG(0x40E00018) /* GPIO Pin Output Set Register GPIO<31:0> */
752#define GPSR1 __REG(0x40E0001C) /* GPIO Pin Output Set Register GPIO<63:32> */
753#define GPSR2 __REG(0x40E00020) /* GPIO Pin Output Set Register GPIO<80:64> */
754
755#define GPCR0 __REG(0x40E00024) /* GPIO Pin Output Clear Register GPIO<31:0> */
756#define GPCR1 __REG(0x40E00028) /* GPIO Pin Output Clear Register GPIO <63:32> */
757#define GPCR2 __REG(0x40E0002C) /* GPIO Pin Output Clear Register GPIO <80:64> */
758
759#define GRER0 __REG(0x40E00030) /* GPIO Rising-Edge Detect Register GPIO<31:0> */
760#define GRER1 __REG(0x40E00034) /* GPIO Rising-Edge Detect Register GPIO<63:32> */
761#define GRER2 __REG(0x40E00038) /* GPIO Rising-Edge Detect Register GPIO<80:64> */
762
763#define GFER0 __REG(0x40E0003C) /* GPIO Falling-Edge Detect Register GPIO<31:0> */
764#define GFER1 __REG(0x40E00040) /* GPIO Falling-Edge Detect Register GPIO<63:32> */
765#define GFER2 __REG(0x40E00044) /* GPIO Falling-Edge Detect Register GPIO<80:64> */
766
767#define GEDR0 __REG(0x40E00048) /* GPIO Edge Detect Status Register GPIO<31:0> */
768#define GEDR1 __REG(0x40E0004C) /* GPIO Edge Detect Status Register GPIO<63:32> */
769#define GEDR2 __REG(0x40E00050) /* GPIO Edge Detect Status Register GPIO<80:64> */
770
771#define GAFR0_L __REG(0x40E00054) /* GPIO Alternate Function Select Register GPIO<15:0> */
772#define GAFR0_U __REG(0x40E00058) /* GPIO Alternate Function Select Register GPIO<31:16> */
773#define GAFR1_L __REG(0x40E0005C) /* GPIO Alternate Function Select Register GPIO<47:32> */
774#define GAFR1_U __REG(0x40E00060) /* GPIO Alternate Function Select Register GPIO<63:48> */
775#define GAFR2_L __REG(0x40E00064) /* GPIO Alternate Function Select Register GPIO<79:64> */
776#define GAFR2_U __REG(0x40E00068) /* GPIO Alternate Function Select Register GPIO<95-80> */
777#define GAFR3_L __REG(0x40E0006C) /* GPIO Alternate Function Select Register GPIO<111:96> */
778#define GAFR3_U __REG(0x40E00070) /* GPIO Alternate Function Select Register GPIO<127:112> */
779
780#define GPLR3 __REG(0x40E00100) /* GPIO Pin-Level Register GPIO<127:96> */
781#define GPDR3 __REG(0x40E0010C) /* GPIO Pin Direction Register GPIO<127:96> */
782#define GPSR3 __REG(0x40E00118) /* GPIO Pin Output Set Register GPIO<127:96> */
783#define GPCR3 __REG(0x40E00124) /* GPIO Pin Output Clear Register GPIO<127:96> */
784#define GRER3 __REG(0x40E00130) /* GPIO Rising-Edge Detect Register GPIO<127:96> */
785#define GFER3 __REG(0x40E0013C) /* GPIO Falling-Edge Detect Register GPIO<127:96> */
786#define GEDR3 __REG(0x40E00148) /* GPIO Edge Detect Status Register GPIO<127:96> */
787
788/* More handy macros. The argument is a literal GPIO number. */
789
790#define GPIO_bit(x) (1 << ((x) & 0x1f))
791
792#if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx)
793
794/* Interrupt Controller */
795
796#define _GPLR(x) __REG2(0x40E00000, ((x) & 0x60) >> 3)
797#define _GPDR(x) __REG2(0x40E0000C, ((x) & 0x60) >> 3)
798#define _GPSR(x) __REG2(0x40E00018, ((x) & 0x60) >> 3)
799#define _GPCR(x) __REG2(0x40E00024, ((x) & 0x60) >> 3)
800#define _GRER(x) __REG2(0x40E00030, ((x) & 0x60) >> 3)
801#define _GFER(x) __REG2(0x40E0003C, ((x) & 0x60) >> 3)
802#define _GEDR(x) __REG2(0x40E00048, ((x) & 0x60) >> 3)
803#define _GAFR(x) __REG2(0x40E00054, ((x) & 0x70) >> 2)
804
805#define GPLR(x) (*((((x) & 0x7f) < 96) ? &_GPLR(x) : &GPLR3))
806#define GPDR(x) (*((((x) & 0x7f) < 96) ? &_GPDR(x) : &GPDR3))
807#define GPSR(x) (*((((x) & 0x7f) < 96) ? &_GPSR(x) : &GPSR3))
808#define GPCR(x) (*((((x) & 0x7f) < 96) ? &_GPCR(x) : &GPCR3))
809#define GRER(x) (*((((x) & 0x7f) < 96) ? &_GRER(x) : &GRER3))
810#define GFER(x) (*((((x) & 0x7f) < 96) ? &_GFER(x) : &GFER3))
811#define GEDR(x) (*((((x) & 0x7f) < 96) ? &_GEDR(x) : &GEDR3))
812#define GAFR(x) (*((((x) & 0x7f) < 96) ? &_GAFR(x) : \
813 ((((x) & 0x7f) < 112) ? &GAFR3_L : &GAFR3_U)))
814#else
815
816#define GPLR(x) __REG2(0x40E00000, ((x) & 0x60) >> 3)
817#define GPDR(x) __REG2(0x40E0000C, ((x) & 0x60) >> 3)
818#define GPSR(x) __REG2(0x40E00018, ((x) & 0x60) >> 3)
819#define GPCR(x) __REG2(0x40E00024, ((x) & 0x60) >> 3)
820#define GRER(x) __REG2(0x40E00030, ((x) & 0x60) >> 3)
821#define GFER(x) __REG2(0x40E0003C, ((x) & 0x60) >> 3)
822#define GEDR(x) __REG2(0x40E00048, ((x) & 0x60) >> 3)
823#define GAFR(x) __REG2(0x40E00054, ((x) & 0x70) >> 2)
824
825#endif
826
827/*
828 * Power Manager - see pxa2xx-regs.h
829 */
830
831/*
832 * SSP Serial Port Registers - see include/asm-arm/arch-pxa/regs-ssp.h
833 */
834
835/*
836 * MultiMediaCard (MMC) controller - see drivers/mmc/host/pxamci.h
837 */
838
839/*
840 * Core Clock - see include/asm-arm/arch-pxa/pxa2xx-regs.h
841 */
842
843#ifdef CONFIG_PXA27x
844
845/* Camera Interface */
846#define CICR0 __REG(0x50000000)
847#define CICR1 __REG(0x50000004)
848#define CICR2 __REG(0x50000008)
849#define CICR3 __REG(0x5000000C)
850#define CICR4 __REG(0x50000010)
851#define CISR __REG(0x50000014)
852#define CIFR __REG(0x50000018)
853#define CITOR __REG(0x5000001C)
854#define CIBR0 __REG(0x50000028)
855#define CIBR1 __REG(0x50000030)
856#define CIBR2 __REG(0x50000038)
857
858#define CICR0_DMAEN (1 << 31) /* DMA request enable */
859#define CICR0_PAR_EN (1 << 30) /* Parity enable */
860#define CICR0_SL_CAP_EN (1 << 29) /* Capture enable for slave mode */
861#define CICR0_ENB (1 << 28) /* Camera interface enable */
862#define CICR0_DIS (1 << 27) /* Camera interface disable */
863#define CICR0_SIM (0x7 << 24) /* Sensor interface mode mask */
864#define CICR0_TOM (1 << 9) /* Time-out mask */
865#define CICR0_RDAVM (1 << 8) /* Receive-data-available mask */
866#define CICR0_FEM (1 << 7) /* FIFO-empty mask */
867#define CICR0_EOLM (1 << 6) /* End-of-line mask */
868#define CICR0_PERRM (1 << 5) /* Parity-error mask */
869#define CICR0_QDM (1 << 4) /* Quick-disable mask */
870#define CICR0_CDM (1 << 3) /* Disable-done mask */
871#define CICR0_SOFM (1 << 2) /* Start-of-frame mask */
872#define CICR0_EOFM (1 << 1) /* End-of-frame mask */
873#define CICR0_FOM (1 << 0) /* FIFO-overrun mask */
874
875#define CICR1_TBIT (1 << 31) /* Transparency bit */
876#define CICR1_RGBT_CONV (0x3 << 29) /* RGBT conversion mask */
877#define CICR1_PPL (0x7ff << 15) /* Pixels per line mask */
878#define CICR1_RGB_CONV (0x7 << 12) /* RGB conversion mask */
879#define CICR1_RGB_F (1 << 11) /* RGB format */
880#define CICR1_YCBCR_F (1 << 10) /* YCbCr format */
881#define CICR1_RGB_BPP (0x7 << 7) /* RGB bis per pixel mask */
882#define CICR1_RAW_BPP (0x3 << 5) /* Raw bis per pixel mask */
883#define CICR1_COLOR_SP (0x3 << 3) /* Color space mask */
884#define CICR1_DW (0x7 << 0) /* Data width mask */
885
886#define CICR2_BLW (0xff << 24) /* Beginning-of-line pixel clock
887 wait count mask */
888#define CICR2_ELW (0xff << 16) /* End-of-line pixel clock
889 wait count mask */
890#define CICR2_HSW (0x3f << 10) /* Horizontal sync pulse width mask */
891#define CICR2_BFPW (0x3f << 3) /* Beginning-of-frame pixel clock
892 wait count mask */
893#define CICR2_FSW (0x7 << 0) /* Frame stabilization
894 wait count mask */
895
896#define CICR3_BFW (0xff << 24) /* Beginning-of-frame line clock
897 wait count mask */
898#define CICR3_EFW (0xff << 16) /* End-of-frame line clock
899 wait count mask */
900#define CICR3_VSW (0x3f << 10) /* Vertical sync pulse width mask */
901#define CICR3_BFPW (0x3f << 3) /* Beginning-of-frame pixel clock
902 wait count mask */
903#define CICR3_LPF (0x7ff << 0) /* Lines per frame mask */
904
905#define CICR4_MCLK_DLY (0x3 << 24) /* MCLK Data Capture Delay mask */
906#define CICR4_PCLK_EN (1 << 23) /* Pixel clock enable */
907#define CICR4_PCP (1 << 22) /* Pixel clock polarity */
908#define CICR4_HSP (1 << 21) /* Horizontal sync polarity */
909#define CICR4_VSP (1 << 20) /* Vertical sync polarity */
910#define CICR4_MCLK_EN (1 << 19) /* MCLK enable */
911#define CICR4_FR_RATE (0x7 << 8) /* Frame rate mask */
912#define CICR4_DIV (0xff << 0) /* Clock divisor mask */
913
914#define CISR_FTO (1 << 15) /* FIFO time-out */
915#define CISR_RDAV_2 (1 << 14) /* Channel 2 receive data available */
916#define CISR_RDAV_1 (1 << 13) /* Channel 1 receive data available */
917#define CISR_RDAV_0 (1 << 12) /* Channel 0 receive data available */
918#define CISR_FEMPTY_2 (1 << 11) /* Channel 2 FIFO empty */
919#define CISR_FEMPTY_1 (1 << 10) /* Channel 1 FIFO empty */
920#define CISR_FEMPTY_0 (1 << 9) /* Channel 0 FIFO empty */
921#define CISR_EOL (1 << 8) /* End of line */
922#define CISR_PAR_ERR (1 << 7) /* Parity error */
923#define CISR_CQD (1 << 6) /* Camera interface quick disable */
924#define CISR_CDD (1 << 5) /* Camera interface disable done */
925#define CISR_SOF (1 << 4) /* Start of frame */
926#define CISR_EOF (1 << 3) /* End of frame */
927#define CISR_IFO_2 (1 << 2) /* FIFO overrun for Channel 2 */
928#define CISR_IFO_1 (1 << 1) /* FIFO overrun for Channel 1 */
929#define CISR_IFO_0 (1 << 0) /* FIFO overrun for Channel 0 */
930
931#define CIFR_FLVL2 (0x7f << 23) /* FIFO 2 level mask */
932#define CIFR_FLVL1 (0x7f << 16) /* FIFO 1 level mask */
933#define CIFR_FLVL0 (0xff << 8) /* FIFO 0 level mask */
934#define CIFR_THL_0 (0x3 << 4) /* Threshold Level for Channel 0 FIFO */
935#define CIFR_RESET_F (1 << 3) /* Reset input FIFOs */
936#define CIFR_FEN2 (1 << 2) /* FIFO enable for channel 2 */
937#define CIFR_FEN1 (1 << 1) /* FIFO enable for channel 1 */
938#define CIFR_FEN0 (1 << 0) /* FIFO enable for channel 0 */
939
940#define SRAM_SIZE 0x40000 /* 4x64K */
941
942#define SRAM_MEM_PHYS 0x5C000000
943
944#define IMPMCR __REG(0x58000000) /* IM Power Management Control Reg */
945#define IMPMSR __REG(0x58000008) /* IM Power Management Status Reg */
946
947#define IMPMCR_PC3 (0x3 << 22) /* Bank 3 Power Control */
948#define IMPMCR_PC3_RUN_MODE (0x0 << 22) /* Run mode */
949#define IMPMCR_PC3_STANDBY_MODE (0x1 << 22) /* Standby mode */
950#define IMPMCR_PC3_AUTO_MODE (0x3 << 22) /* Automatically controlled */
951
952#define IMPMCR_PC2 (0x3 << 20) /* Bank 2 Power Control */
953#define IMPMCR_PC2_RUN_MODE (0x0 << 20) /* Run mode */
954#define IMPMCR_PC2_STANDBY_MODE (0x1 << 20) /* Standby mode */
955#define IMPMCR_PC2_AUTO_MODE (0x3 << 20) /* Automatically controlled */
956
957#define IMPMCR_PC1 (0x3 << 18) /* Bank 1 Power Control */
958#define IMPMCR_PC1_RUN_MODE (0x0 << 18) /* Run mode */
959#define IMPMCR_PC1_STANDBY_MODE (0x1 << 18) /* Standby mode */
960#define IMPMCR_PC1_AUTO_MODE (0x3 << 18) /* Automatically controlled */
961
962#define IMPMCR_PC0 (0x3 << 16) /* Bank 0 Power Control */
963#define IMPMCR_PC0_RUN_MODE (0x0 << 16) /* Run mode */
964#define IMPMCR_PC0_STANDBY_MODE (0x1 << 16) /* Standby mode */
965#define IMPMCR_PC0_AUTO_MODE (0x3 << 16) /* Automatically controlled */
966
967#define IMPMCR_AW3 (1 << 11) /* Bank 3 Automatic Wake-up enable */
968#define IMPMCR_AW2 (1 << 10) /* Bank 2 Automatic Wake-up enable */
969#define IMPMCR_AW1 (1 << 9) /* Bank 1 Automatic Wake-up enable */
970#define IMPMCR_AW0 (1 << 8) /* Bank 0 Automatic Wake-up enable */
971
972#define IMPMCR_DST (0xFF << 0) /* Delay Standby Time, ms */
973
974#define IMPMSR_PS3 (0x3 << 6) /* Bank 3 Power Status: */
975#define IMPMSR_PS3_RUN_MODE (0x0 << 6) /* Run mode */
976#define IMPMSR_PS3_STANDBY_MODE (0x1 << 6) /* Standby mode */
977
978#define IMPMSR_PS2 (0x3 << 4) /* Bank 2 Power Status: */
979#define IMPMSR_PS2_RUN_MODE (0x0 << 4) /* Run mode */
980#define IMPMSR_PS2_STANDBY_MODE (0x1 << 4) /* Standby mode */
981
982#define IMPMSR_PS1 (0x3 << 2) /* Bank 1 Power Status: */
983#define IMPMSR_PS1_RUN_MODE (0x0 << 2) /* Run mode */
984#define IMPMSR_PS1_STANDBY_MODE (0x1 << 2) /* Standby mode */
985
986#define IMPMSR_PS0 (0x3 << 0) /* Bank 0 Power Status: */
987#define IMPMSR_PS0_RUN_MODE (0x0 << 0) /* Run mode */
988#define IMPMSR_PS0_STANDBY_MODE (0x1 << 0) /* Standby mode */
989
990#endif
991
992#if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx)
993/*
994 * UHC: USB Host Controller (OHCI-like) register definitions
995 */
996#define UHC_BASE_PHYS (0x4C000000)
997#define UHCREV __REG(0x4C000000) /* UHC HCI Spec Revision */
998#define UHCHCON __REG(0x4C000004) /* UHC Host Control Register */
999#define UHCCOMS __REG(0x4C000008) /* UHC Command Status Register */
1000#define UHCINTS __REG(0x4C00000C) /* UHC Interrupt Status Register */
1001#define UHCINTE __REG(0x4C000010) /* UHC Interrupt Enable */
1002#define UHCINTD __REG(0x4C000014) /* UHC Interrupt Disable */
1003#define UHCHCCA __REG(0x4C000018) /* UHC Host Controller Comm. Area */
1004#define UHCPCED __REG(0x4C00001C) /* UHC Period Current Endpt Descr */
1005#define UHCCHED __REG(0x4C000020) /* UHC Control Head Endpt Descr */
1006#define UHCCCED __REG(0x4C000024) /* UHC Control Current Endpt Descr */
1007#define UHCBHED __REG(0x4C000028) /* UHC Bulk Head Endpt Descr */
1008#define UHCBCED __REG(0x4C00002C) /* UHC Bulk Current Endpt Descr */
1009#define UHCDHEAD __REG(0x4C000030) /* UHC Done Head */
1010#define UHCFMI __REG(0x4C000034) /* UHC Frame Interval */
1011#define UHCFMR __REG(0x4C000038) /* UHC Frame Remaining */
1012#define UHCFMN __REG(0x4C00003C) /* UHC Frame Number */
1013#define UHCPERS __REG(0x4C000040) /* UHC Periodic Start */
1014#define UHCLS __REG(0x4C000044) /* UHC Low Speed Threshold */
1015
1016#define UHCRHDA __REG(0x4C000048) /* UHC Root Hub Descriptor A */
1017#define UHCRHDA_NOCP (1 << 12) /* No over current protection */
1018
1019#define UHCRHDB __REG(0x4C00004C) /* UHC Root Hub Descriptor B */
1020#define UHCRHS __REG(0x4C000050) /* UHC Root Hub Status */
1021#define UHCRHPS1 __REG(0x4C000054) /* UHC Root Hub Port 1 Status */
1022#define UHCRHPS2 __REG(0x4C000058) /* UHC Root Hub Port 2 Status */
1023#define UHCRHPS3 __REG(0x4C00005C) /* UHC Root Hub Port 3 Status */
1024
1025#define UHCSTAT __REG(0x4C000060) /* UHC Status Register */
1026#define UHCSTAT_UPS3 (1 << 16) /* USB Power Sense Port3 */
1027#define UHCSTAT_SBMAI (1 << 15) /* System Bus Master Abort Interrupt*/
1028#define UHCSTAT_SBTAI (1 << 14) /* System Bus Target Abort Interrupt*/
1029#define UHCSTAT_UPRI (1 << 13) /* USB Port Resume Interrupt */
1030#define UHCSTAT_UPS2 (1 << 12) /* USB Power Sense Port 2 */
1031#define UHCSTAT_UPS1 (1 << 11) /* USB Power Sense Port 1 */
1032#define UHCSTAT_HTA (1 << 10) /* HCI Target Abort */
1033#define UHCSTAT_HBA (1 << 8) /* HCI Buffer Active */
1034#define UHCSTAT_RWUE (1 << 7) /* HCI Remote Wake Up Event */
1035
1036#define UHCHR __REG(0x4C000064) /* UHC Reset Register */
1037#define UHCHR_SSEP3 (1 << 11) /* Sleep Standby Enable for Port3 */
1038#define UHCHR_SSEP2 (1 << 10) /* Sleep Standby Enable for Port2 */
1039#define UHCHR_SSEP1 (1 << 9) /* Sleep Standby Enable for Port1 */
1040#define UHCHR_PCPL (1 << 7) /* Power control polarity low */
1041#define UHCHR_PSPL (1 << 6) /* Power sense polarity low */
1042#define UHCHR_SSE (1 << 5) /* Sleep Standby Enable */
1043#define UHCHR_UIT (1 << 4) /* USB Interrupt Test */
1044#define UHCHR_SSDC (1 << 3) /* Simulation Scale Down Clock */
1045#define UHCHR_CGR (1 << 2) /* Clock Generation Reset */
1046#define UHCHR_FHR (1 << 1) /* Force Host Controller Reset */
1047#define UHCHR_FSBIR (1 << 0) /* Force System Bus Iface Reset */
1048
1049#define UHCHIE __REG(0x4C000068) /* UHC Interrupt Enable Register*/
1050#define UHCHIE_UPS3IE (1 << 14) /* Power Sense Port3 IntEn */
1051#define UHCHIE_UPRIE (1 << 13) /* Port Resume IntEn */
1052#define UHCHIE_UPS2IE (1 << 12) /* Power Sense Port2 IntEn */
1053#define UHCHIE_UPS1IE (1 << 11) /* Power Sense Port1 IntEn */
1054#define UHCHIE_TAIE (1 << 10) /* HCI Interface Transfer Abort
1055 Interrupt Enable*/
1056#define UHCHIE_HBAIE (1 << 8) /* HCI Buffer Active IntEn */
1057#define UHCHIE_RWIE (1 << 7) /* Remote Wake-up IntEn */
1058
1059#define UHCHIT __REG(0x4C00006C) /* UHC Interrupt Test register */
1060
1061#endif /* CONFIG_PXA27x || CONFIG_PXA3xx */
1062
1063/* PWRMODE register M field values */
1064
1065#define PWRMODE_IDLE 0x1
1066#define PWRMODE_STANDBY 0x2
1067#define PWRMODE_SLEEP 0x3
1068#define PWRMODE_DEEPSLEEP 0x7
1069
1070#endif
diff --git a/include/asm-arm/arch-pxa/pxa2xx-regs.h b/include/asm-arm/arch-pxa/pxa2xx-regs.h
deleted file mode 100644
index 73e0a329cf7f..000000000000
--- a/include/asm-arm/arch-pxa/pxa2xx-regs.h
+++ /dev/null
@@ -1,246 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-pxa/pxa2xx-regs.h
3 *
4 * Taken from pxa-regs.h by Russell King
5 *
6 * Author: Nicolas Pitre
7 * Copyright: MontaVista Software Inc.
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12 */
13
14#ifndef __PXA2XX_REGS_H
15#define __PXA2XX_REGS_H
16
17/*
18 * Memory controller
19 */
20
21#define MDCNFG __REG(0x48000000) /* SDRAM Configuration Register 0 */
22#define MDREFR __REG(0x48000004) /* SDRAM Refresh Control Register */
23#define MSC0 __REG(0x48000008) /* Static Memory Control Register 0 */
24#define MSC1 __REG(0x4800000C) /* Static Memory Control Register 1 */
25#define MSC2 __REG(0x48000010) /* Static Memory Control Register 2 */
26#define MECR __REG(0x48000014) /* Expansion Memory (PCMCIA/Compact Flash) Bus Configuration */
27#define SXLCR __REG(0x48000018) /* LCR value to be written to SDRAM-Timing Synchronous Flash */
28#define SXCNFG __REG(0x4800001C) /* Synchronous Static Memory Control Register */
29#define SXMRS __REG(0x48000024) /* MRS value to be written to Synchronous Flash or SMROM */
30#define MCMEM0 __REG(0x48000028) /* Card interface Common Memory Space Socket 0 Timing */
31#define MCMEM1 __REG(0x4800002C) /* Card interface Common Memory Space Socket 1 Timing */
32#define MCATT0 __REG(0x48000030) /* Card interface Attribute Space Socket 0 Timing Configuration */
33#define MCATT1 __REG(0x48000034) /* Card interface Attribute Space Socket 1 Timing Configuration */
34#define MCIO0 __REG(0x48000038) /* Card interface I/O Space Socket 0 Timing Configuration */
35#define MCIO1 __REG(0x4800003C) /* Card interface I/O Space Socket 1 Timing Configuration */
36#define MDMRS __REG(0x48000040) /* MRS value to be written to SDRAM */
37#define BOOT_DEF __REG(0x48000044) /* Read-Only Boot-Time Register. Contains BOOT_SEL and PKG_SEL */
38
39/*
40 * More handy macros for PCMCIA
41 *
42 * Arg is socket number
43 */
44#define MCMEM(s) __REG2(0x48000028, (s)<<2 ) /* Card interface Common Memory Space Socket s Timing */
45#define MCATT(s) __REG2(0x48000030, (s)<<2 ) /* Card interface Attribute Space Socket s Timing Configuration */
46#define MCIO(s) __REG2(0x48000038, (s)<<2 ) /* Card interface I/O Space Socket s Timing Configuration */
47
48/* MECR register defines */
49#define MECR_NOS (1 << 0) /* Number Of Sockets: 0 -> 1 sock, 1 -> 2 sock */
50#define MECR_CIT (1 << 1) /* Card Is There: 0 -> no card, 1 -> card inserted */
51
52#define MDREFR_K0DB4 (1 << 29) /* SDCLK0 Divide by 4 Control/Status */
53#define MDREFR_K2FREE (1 << 25) /* SDRAM Free-Running Control */
54#define MDREFR_K1FREE (1 << 24) /* SDRAM Free-Running Control */
55#define MDREFR_K0FREE (1 << 23) /* SDRAM Free-Running Control */
56#define MDREFR_SLFRSH (1 << 22) /* SDRAM Self-Refresh Control/Status */
57#define MDREFR_APD (1 << 20) /* SDRAM/SSRAM Auto-Power-Down Enable */
58#define MDREFR_K2DB2 (1 << 19) /* SDCLK2 Divide by 2 Control/Status */
59#define MDREFR_K2RUN (1 << 18) /* SDCLK2 Run Control/Status */
60#define MDREFR_K1DB2 (1 << 17) /* SDCLK1 Divide by 2 Control/Status */
61#define MDREFR_K1RUN (1 << 16) /* SDCLK1 Run Control/Status */
62#define MDREFR_E1PIN (1 << 15) /* SDCKE1 Level Control/Status */
63#define MDREFR_K0DB2 (1 << 14) /* SDCLK0 Divide by 2 Control/Status */
64#define MDREFR_K0RUN (1 << 13) /* SDCLK0 Run Control/Status */
65#define MDREFR_E0PIN (1 << 12) /* SDCKE0 Level Control/Status */
66
67
68#ifdef CONFIG_PXA27x
69
70#define ARB_CNTRL __REG(0x48000048) /* Arbiter Control Register */
71
72#define ARB_DMA_SLV_PARK (1<<31) /* Be parked with DMA slave when idle */
73#define ARB_CI_PARK (1<<30) /* Be parked with Camera Interface when idle */
74#define ARB_EX_MEM_PARK (1<<29) /* Be parked with external MEMC when idle */
75#define ARB_INT_MEM_PARK (1<<28) /* Be parked with internal MEMC when idle */
76#define ARB_USB_PARK (1<<27) /* Be parked with USB when idle */
77#define ARB_LCD_PARK (1<<26) /* Be parked with LCD when idle */
78#define ARB_DMA_PARK (1<<25) /* Be parked with DMA when idle */
79#define ARB_CORE_PARK (1<<24) /* Be parked with core when idle */
80#define ARB_LOCK_FLAG (1<<23) /* Only Locking masters gain access to the bus */
81
82#endif
83
84
85/*
86 * Power Manager
87 */
88
89#define PMCR __REG(0x40F00000) /* Power Manager Control Register */
90#define PSSR __REG(0x40F00004) /* Power Manager Sleep Status Register */
91#define PSPR __REG(0x40F00008) /* Power Manager Scratch Pad Register */
92#define PWER __REG(0x40F0000C) /* Power Manager Wake-up Enable Register */
93#define PRER __REG(0x40F00010) /* Power Manager GPIO Rising-Edge Detect Enable Register */
94#define PFER __REG(0x40F00014) /* Power Manager GPIO Falling-Edge Detect Enable Register */
95#define PEDR __REG(0x40F00018) /* Power Manager GPIO Edge Detect Status Register */
96#define PCFR __REG(0x40F0001C) /* Power Manager General Configuration Register */
97#define PGSR0 __REG(0x40F00020) /* Power Manager GPIO Sleep State Register for GP[31-0] */
98#define PGSR1 __REG(0x40F00024) /* Power Manager GPIO Sleep State Register for GP[63-32] */
99#define PGSR2 __REG(0x40F00028) /* Power Manager GPIO Sleep State Register for GP[84-64] */
100#define PGSR3 __REG(0x40F0002C) /* Power Manager GPIO Sleep State Register for GP[118-96] */
101#define RCSR __REG(0x40F00030) /* Reset Controller Status Register */
102
103#define PSLR __REG(0x40F00034) /* Power Manager Sleep Config Register */
104#define PSTR __REG(0x40F00038) /* Power Manager Standby Config Register */
105#define PSNR __REG(0x40F0003C) /* Power Manager Sense Config Register */
106#define PVCR __REG(0x40F00040) /* Power Manager VoltageControl Register */
107#define PKWR __REG(0x40F00050) /* Power Manager KB Wake-up Enable Reg */
108#define PKSR __REG(0x40F00054) /* Power Manager KB Level-Detect Register */
109#define PCMD(x) __REG2(0x40F00080, (x)<<2)
110#define PCMD0 __REG(0x40F00080 + 0 * 4)
111#define PCMD1 __REG(0x40F00080 + 1 * 4)
112#define PCMD2 __REG(0x40F00080 + 2 * 4)
113#define PCMD3 __REG(0x40F00080 + 3 * 4)
114#define PCMD4 __REG(0x40F00080 + 4 * 4)
115#define PCMD5 __REG(0x40F00080 + 5 * 4)
116#define PCMD6 __REG(0x40F00080 + 6 * 4)
117#define PCMD7 __REG(0x40F00080 + 7 * 4)
118#define PCMD8 __REG(0x40F00080 + 8 * 4)
119#define PCMD9 __REG(0x40F00080 + 9 * 4)
120#define PCMD10 __REG(0x40F00080 + 10 * 4)
121#define PCMD11 __REG(0x40F00080 + 11 * 4)
122#define PCMD12 __REG(0x40F00080 + 12 * 4)
123#define PCMD13 __REG(0x40F00080 + 13 * 4)
124#define PCMD14 __REG(0x40F00080 + 14 * 4)
125#define PCMD15 __REG(0x40F00080 + 15 * 4)
126#define PCMD16 __REG(0x40F00080 + 16 * 4)
127#define PCMD17 __REG(0x40F00080 + 17 * 4)
128#define PCMD18 __REG(0x40F00080 + 18 * 4)
129#define PCMD19 __REG(0x40F00080 + 19 * 4)
130#define PCMD20 __REG(0x40F00080 + 20 * 4)
131#define PCMD21 __REG(0x40F00080 + 21 * 4)
132#define PCMD22 __REG(0x40F00080 + 22 * 4)
133#define PCMD23 __REG(0x40F00080 + 23 * 4)
134#define PCMD24 __REG(0x40F00080 + 24 * 4)
135#define PCMD25 __REG(0x40F00080 + 25 * 4)
136#define PCMD26 __REG(0x40F00080 + 26 * 4)
137#define PCMD27 __REG(0x40F00080 + 27 * 4)
138#define PCMD28 __REG(0x40F00080 + 28 * 4)
139#define PCMD29 __REG(0x40F00080 + 29 * 4)
140#define PCMD30 __REG(0x40F00080 + 30 * 4)
141#define PCMD31 __REG(0x40F00080 + 31 * 4)
142
143#define PCMD_MBC (1<<12)
144#define PCMD_DCE (1<<11)
145#define PCMD_LC (1<<10)
146/* FIXME: PCMD_SQC need be checked. */
147#define PCMD_SQC (3<<8) /* currently only bit 8 is changeable,
148 bit 9 should be 0 all day. */
149#define PVCR_VCSA (0x1<<14)
150#define PVCR_CommandDelay (0xf80)
151#define PCFR_PI2C_EN (0x1 << 6)
152
153#define PSSR_OTGPH (1 << 6) /* OTG Peripheral control Hold */
154#define PSSR_RDH (1 << 5) /* Read Disable Hold */
155#define PSSR_PH (1 << 4) /* Peripheral Control Hold */
156#define PSSR_STS (1 << 3) /* Standby Mode Status */
157#define PSSR_VFS (1 << 2) /* VDD Fault Status */
158#define PSSR_BFS (1 << 1) /* Battery Fault Status */
159#define PSSR_SSS (1 << 0) /* Software Sleep Status */
160
161#define PSLR_SL_ROD (1 << 20) /* Sleep-Mode/Depp-Sleep Mode nRESET_OUT Disable */
162
163#define PCFR_RO (1 << 15) /* RDH Override */
164#define PCFR_PO (1 << 14) /* PH Override */
165#define PCFR_GPROD (1 << 12) /* GPIO nRESET_OUT Disable */
166#define PCFR_L1_EN (1 << 11) /* Sleep Mode L1 converter Enable */
167#define PCFR_FVC (1 << 10) /* Frequency/Voltage Change */
168#define PCFR_DC_EN (1 << 7) /* Sleep/deep-sleep DC-DC Converter Enable */
169#define PCFR_PI2CEN (1 << 6) /* Enable PI2C controller */
170#define PCFR_GPR_EN (1 << 4) /* nRESET_GPIO Pin Enable */
171#define PCFR_DS (1 << 3) /* Deep Sleep Mode */
172#define PCFR_FS (1 << 2) /* Float Static Chip Selects */
173#define PCFR_FP (1 << 1) /* Float PCMCIA controls */
174#define PCFR_OPDE (1 << 0) /* 3.6864 MHz oscillator power-down enable */
175
176#define RCSR_GPR (1 << 3) /* GPIO Reset */
177#define RCSR_SMR (1 << 2) /* Sleep Mode */
178#define RCSR_WDR (1 << 1) /* Watchdog Reset */
179#define RCSR_HWR (1 << 0) /* Hardware Reset */
180
181#define PWER_GPIO(Nb) (1 << Nb) /* GPIO [0..15] wake-up enable */
182#define PWER_GPIO0 PWER_GPIO (0) /* GPIO [0] wake-up enable */
183#define PWER_GPIO1 PWER_GPIO (1) /* GPIO [1] wake-up enable */
184#define PWER_GPIO2 PWER_GPIO (2) /* GPIO [2] wake-up enable */
185#define PWER_GPIO3 PWER_GPIO (3) /* GPIO [3] wake-up enable */
186#define PWER_GPIO4 PWER_GPIO (4) /* GPIO [4] wake-up enable */
187#define PWER_GPIO5 PWER_GPIO (5) /* GPIO [5] wake-up enable */
188#define PWER_GPIO6 PWER_GPIO (6) /* GPIO [6] wake-up enable */
189#define PWER_GPIO7 PWER_GPIO (7) /* GPIO [7] wake-up enable */
190#define PWER_GPIO8 PWER_GPIO (8) /* GPIO [8] wake-up enable */
191#define PWER_GPIO9 PWER_GPIO (9) /* GPIO [9] wake-up enable */
192#define PWER_GPIO10 PWER_GPIO (10) /* GPIO [10] wake-up enable */
193#define PWER_GPIO11 PWER_GPIO (11) /* GPIO [11] wake-up enable */
194#define PWER_GPIO12 PWER_GPIO (12) /* GPIO [12] wake-up enable */
195#define PWER_GPIO13 PWER_GPIO (13) /* GPIO [13] wake-up enable */
196#define PWER_GPIO14 PWER_GPIO (14) /* GPIO [14] wake-up enable */
197#define PWER_GPIO15 PWER_GPIO (15) /* GPIO [15] wake-up enable */
198#define PWER_RTC 0x80000000 /* RTC alarm wake-up enable */
199
200/*
201 * PXA2xx specific Core clock definitions
202 */
203#define CCCR __REG(0x41300000) /* Core Clock Configuration Register */
204#define CCSR __REG(0x4130000C) /* Core Clock Status Register */
205#define CKEN __REG(0x41300004) /* Clock Enable Register */
206#define OSCC __REG(0x41300008) /* Oscillator Configuration Register */
207
208#define CCCR_N_MASK 0x0380 /* Run Mode Frequency to Turbo Mode Frequency Multiplier */
209#define CCCR_M_MASK 0x0060 /* Memory Frequency to Run Mode Frequency Multiplier */
210#define CCCR_L_MASK 0x001f /* Crystal Frequency to Memory Frequency Multiplier */
211
212#define CKEN_AC97CONF (31) /* AC97 Controller Configuration */
213#define CKEN_CAMERA (24) /* Camera Interface Clock Enable */
214#define CKEN_SSP1 (23) /* SSP1 Unit Clock Enable */
215#define CKEN_MEMC (22) /* Memory Controller Clock Enable */
216#define CKEN_MEMSTK (21) /* Memory Stick Host Controller */
217#define CKEN_IM (20) /* Internal Memory Clock Enable */
218#define CKEN_KEYPAD (19) /* Keypad Interface Clock Enable */
219#define CKEN_USIM (18) /* USIM Unit Clock Enable */
220#define CKEN_MSL (17) /* MSL Unit Clock Enable */
221#define CKEN_LCD (16) /* LCD Unit Clock Enable */
222#define CKEN_PWRI2C (15) /* PWR I2C Unit Clock Enable */
223#define CKEN_I2C (14) /* I2C Unit Clock Enable */
224#define CKEN_FICP (13) /* FICP Unit Clock Enable */
225#define CKEN_MMC (12) /* MMC Unit Clock Enable */
226#define CKEN_USB (11) /* USB Unit Clock Enable */
227#define CKEN_ASSP (10) /* ASSP (SSP3) Clock Enable */
228#define CKEN_USBHOST (10) /* USB Host Unit Clock Enable */
229#define CKEN_OSTIMER (9) /* OS Timer Unit Clock Enable */
230#define CKEN_NSSP (9) /* NSSP (SSP2) Clock Enable */
231#define CKEN_I2S (8) /* I2S Unit Clock Enable */
232#define CKEN_BTUART (7) /* BTUART Unit Clock Enable */
233#define CKEN_FFUART (6) /* FFUART Unit Clock Enable */
234#define CKEN_STUART (5) /* STUART Unit Clock Enable */
235#define CKEN_HWUART (4) /* HWUART Unit Clock Enable */
236#define CKEN_SSP3 (4) /* SSP3 Unit Clock Enable */
237#define CKEN_SSP (3) /* SSP Unit Clock Enable */
238#define CKEN_SSP2 (3) /* SSP2 Unit Clock Enable */
239#define CKEN_AC97 (2) /* AC97 Unit Clock Enable */
240#define CKEN_PWM1 (1) /* PWM1 Clock Enable */
241#define CKEN_PWM0 (0) /* PWM0 Clock Enable */
242
243#define OSCC_OON (1 << 1) /* 32.768kHz OON (write-once only bit) */
244#define OSCC_OOK (1 << 0) /* 32.768kHz OOK (read-only bit) */
245
246#endif
diff --git a/include/asm-arm/arch-pxa/pxa3xx-regs.h b/include/asm-arm/arch-pxa/pxa3xx-regs.h
deleted file mode 100644
index fe9364c83a28..000000000000
--- a/include/asm-arm/arch-pxa/pxa3xx-regs.h
+++ /dev/null
@@ -1,183 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-pxa/pxa3xx-regs.h
3 *
4 * PXA3xx specific register definitions
5 *
6 * Copyright (C) 2007 Marvell International Ltd.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 */
12
13#ifndef __ASM_ARCH_PXA3XX_REGS_H
14#define __ASM_ARCH_PXA3XX_REGS_H
15
16/*
17 * Oscillator Configuration Register (OSCC)
18 */
19#define OSCC __REG(0x41350000) /* Oscillator Configuration Register */
20
21#define OSCC_PEN (1 << 11) /* 13MHz POUT */
22
23
24/*
25 * Service Power Management Unit (MPMU)
26 */
27#define PMCR __REG(0x40F50000) /* Power Manager Control Register */
28#define PSR __REG(0x40F50004) /* Power Manager S2 Status Register */
29#define PSPR __REG(0x40F50008) /* Power Manager Scratch Pad Register */
30#define PCFR __REG(0x40F5000C) /* Power Manager General Configuration Register */
31#define PWER __REG(0x40F50010) /* Power Manager Wake-up Enable Register */
32#define PWSR __REG(0x40F50014) /* Power Manager Wake-up Status Register */
33#define PECR __REG(0x40F50018) /* Power Manager EXT_WAKEUP[1:0] Control Register */
34#define DCDCSR __REG(0x40F50080) /* DC-DC Controller Status Register */
35#define PVCR __REG(0x40F50100) /* Power Manager Voltage Change Control Register */
36#define PCMD(x) __REG(0x40F50110 + ((x) << 2))
37
38/*
39 * Slave Power Managment Unit
40 */
41#define ASCR __REG(0x40f40000) /* Application Subsystem Power Status/Configuration */
42#define ARSR __REG(0x40f40004) /* Application Subsystem Reset Status */
43#define AD3ER __REG(0x40f40008) /* Application Subsystem Wake-Up from D3 Enable */
44#define AD3SR __REG(0x40f4000c) /* Application Subsystem Wake-Up from D3 Status */
45#define AD2D0ER __REG(0x40f40010) /* Application Subsystem Wake-Up from D2 to D0 Enable */
46#define AD2D0SR __REG(0x40f40014) /* Application Subsystem Wake-Up from D2 to D0 Status */
47#define AD2D1ER __REG(0x40f40018) /* Application Subsystem Wake-Up from D2 to D1 Enable */
48#define AD2D1SR __REG(0x40f4001c) /* Application Subsystem Wake-Up from D2 to D1 Status */
49#define AD1D0ER __REG(0x40f40020) /* Application Subsystem Wake-Up from D1 to D0 Enable */
50#define AD1D0SR __REG(0x40f40024) /* Application Subsystem Wake-Up from D1 to D0 Status */
51#define AGENP __REG(0x40f4002c) /* Application Subsystem General Purpose */
52#define AD3R __REG(0x40f40030) /* Application Subsystem D3 Configuration */
53#define AD2R __REG(0x40f40034) /* Application Subsystem D2 Configuration */
54#define AD1R __REG(0x40f40038) /* Application Subsystem D1 Configuration */
55
56/*
57 * Application Subsystem Configuration bits.
58 */
59#define ASCR_RDH (1 << 31)
60#define ASCR_D1S (1 << 2)
61#define ASCR_D2S (1 << 1)
62#define ASCR_D3S (1 << 0)
63
64/*
65 * Application Reset Status bits.
66 */
67#define ARSR_GPR (1 << 3)
68#define ARSR_LPMR (1 << 2)
69#define ARSR_WDT (1 << 1)
70#define ARSR_HWR (1 << 0)
71
72/*
73 * Application Subsystem Wake-Up bits.
74 */
75#define ADXER_WRTC (1 << 31) /* RTC */
76#define ADXER_WOST (1 << 30) /* OS Timer */
77#define ADXER_WTSI (1 << 29) /* Touchscreen */
78#define ADXER_WUSBH (1 << 28) /* USB host */
79#define ADXER_WUSB2 (1 << 26) /* USB client 2.0 */
80#define ADXER_WMSL0 (1 << 24) /* MSL port 0*/
81#define ADXER_WDMUX3 (1 << 23) /* USB EDMUX3 */
82#define ADXER_WDMUX2 (1 << 22) /* USB EDMUX2 */
83#define ADXER_WKP (1 << 21) /* Keypad */
84#define ADXER_WUSIM1 (1 << 20) /* USIM Port 1 */
85#define ADXER_WUSIM0 (1 << 19) /* USIM Port 0 */
86#define ADXER_WOTG (1 << 16) /* USBOTG input */
87#define ADXER_MFP_WFLASH (1 << 15) /* MFP: Data flash busy */
88#define ADXER_MFP_GEN12 (1 << 14) /* MFP: MMC3/GPIO/OST inputs */
89#define ADXER_MFP_WMMC2 (1 << 13) /* MFP: MMC2 */
90#define ADXER_MFP_WMMC1 (1 << 12) /* MFP: MMC1 */
91#define ADXER_MFP_WI2C (1 << 11) /* MFP: I2C */
92#define ADXER_MFP_WSSP4 (1 << 10) /* MFP: SSP4 */
93#define ADXER_MFP_WSSP3 (1 << 9) /* MFP: SSP3 */
94#define ADXER_MFP_WMAXTRIX (1 << 8) /* MFP: matrix keypad */
95#define ADXER_MFP_WUART3 (1 << 7) /* MFP: UART3 */
96#define ADXER_MFP_WUART2 (1 << 6) /* MFP: UART2 */
97#define ADXER_MFP_WUART1 (1 << 5) /* MFP: UART1 */
98#define ADXER_MFP_WSSP2 (1 << 4) /* MFP: SSP2 */
99#define ADXER_MFP_WSSP1 (1 << 3) /* MFP: SSP1 */
100#define ADXER_MFP_WAC97 (1 << 2) /* MFP: AC97 */
101#define ADXER_WEXTWAKE1 (1 << 1) /* External Wake 1 */
102#define ADXER_WEXTWAKE0 (1 << 0) /* External Wake 0 */
103
104/*
105 * AD3R/AD2R/AD1R bits. R2-R5 are only defined for PXA320.
106 */
107#define ADXR_L2 (1 << 8)
108#define ADXR_R5 (1 << 5)
109#define ADXR_R4 (1 << 4)
110#define ADXR_R3 (1 << 3)
111#define ADXR_R2 (1 << 2)
112#define ADXR_R1 (1 << 1)
113#define ADXR_R0 (1 << 0)
114
115/*
116 * Values for PWRMODE CP15 register
117 */
118#define PXA3xx_PM_S3D4C4 0x07 /* aka deep sleep */
119#define PXA3xx_PM_S2D3C4 0x06 /* aka sleep */
120#define PXA3xx_PM_S0D2C2 0x03 /* aka standby */
121#define PXA3xx_PM_S0D1C2 0x02 /* aka LCD refresh */
122#define PXA3xx_PM_S0D0C1 0x01
123
124/*
125 * Application Subsystem Clock
126 */
127#define ACCR __REG(0x41340000) /* Application Subsystem Clock Configuration Register */
128#define ACSR __REG(0x41340004) /* Application Subsystem Clock Status Register */
129#define AICSR __REG(0x41340008) /* Application Subsystem Interrupt Control/Status Register */
130#define CKENA __REG(0x4134000C) /* A Clock Enable Register */
131#define CKENB __REG(0x41340010) /* B Clock Enable Register */
132#define AC97_DIV __REG(0x41340014) /* AC97 clock divisor value register */
133
134/*
135 * Clock Enable Bit
136 */
137#define CKEN_LCD 1 /* < LCD Clock Enable */
138#define CKEN_USBH 2 /* < USB host clock enable */
139#define CKEN_CAMERA 3 /* < Camera interface clock enable */
140#define CKEN_NAND 4 /* < NAND Flash Controller Clock Enable */
141#define CKEN_USB2 6 /* < USB 2.0 client clock enable. */
142#define CKEN_DMC 8 /* < Dynamic Memory Controller clock enable */
143#define CKEN_SMC 9 /* < Static Memory Controller clock enable */
144#define CKEN_ISC 10 /* < Internal SRAM Controller clock enable */
145#define CKEN_BOOT 11 /* < Boot rom clock enable */
146#define CKEN_MMC1 12 /* < MMC1 Clock enable */
147#define CKEN_MMC2 13 /* < MMC2 clock enable */
148#define CKEN_KEYPAD 14 /* < Keypand Controller Clock Enable */
149#define CKEN_CIR 15 /* < Consumer IR Clock Enable */
150#define CKEN_USIM0 17 /* < USIM[0] Clock Enable */
151#define CKEN_USIM1 18 /* < USIM[1] Clock Enable */
152#define CKEN_TPM 19 /* < TPM clock enable */
153#define CKEN_UDC 20 /* < UDC clock enable */
154#define CKEN_BTUART 21 /* < BTUART clock enable */
155#define CKEN_FFUART 22 /* < FFUART clock enable */
156#define CKEN_STUART 23 /* < STUART clock enable */
157#define CKEN_AC97 24 /* < AC97 clock enable */
158#define CKEN_TOUCH 25 /* < Touch screen Interface Clock Enable */
159#define CKEN_SSP1 26 /* < SSP1 clock enable */
160#define CKEN_SSP2 27 /* < SSP2 clock enable */
161#define CKEN_SSP3 28 /* < SSP3 clock enable */
162#define CKEN_SSP4 29 /* < SSP4 clock enable */
163#define CKEN_MSL0 30 /* < MSL0 clock enable */
164#define CKEN_PWM0 32 /* < PWM[0] clock enable */
165#define CKEN_PWM1 33 /* < PWM[1] clock enable */
166#define CKEN_I2C 36 /* < I2C clock enable */
167#define CKEN_INTC 38 /* < Interrupt controller clock enable */
168#define CKEN_GPIO 39 /* < GPIO clock enable */
169#define CKEN_1WIRE 40 /* < 1-wire clock enable */
170#define CKEN_HSIO2 41 /* < HSIO2 clock enable */
171#define CKEN_MINI_IM 48 /* < Mini-IM */
172#define CKEN_MINI_LCD 49 /* < Mini LCD */
173
174#if defined(CONFIG_CPU_PXA310)
175#define CKEN_MMC3 5 /* < MMC3 Clock Enable */
176#define CKEN_MVED 43 /* < MVED clock enable */
177#endif
178
179/* Note: GCU clock enable bit differs on PXA300/PXA310 and PXA320 */
180#define PXA300_CKEN_GRAPHICS 42 /* Graphics controller clock enable */
181#define PXA320_CKEN_GRAPHICS 7 /* Graphics controller clock enable */
182
183#endif /* __ASM_ARCH_PXA3XX_REGS_H */
diff --git a/include/asm-arm/arch-pxa/pxafb.h b/include/asm-arm/arch-pxa/pxafb.h
deleted file mode 100644
index daf018d0c604..000000000000
--- a/include/asm-arm/arch-pxa/pxafb.h
+++ /dev/null
@@ -1,151 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-pxa/pxafb.h
3 *
4 * Support for the xscale frame buffer.
5 *
6 * Author: Jean-Frederic Clere
7 * Created: Sep 22, 2003
8 * Copyright: jfclere@sinix.net
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
13 */
14
15#include <linux/fb.h>
16#include <asm/arch/regs-lcd.h>
17
18/*
19 * Supported LCD connections
20 *
21 * bits 0 - 3: for LCD panel type:
22 *
23 * STN - for passive matrix
24 * DSTN - for dual scan passive matrix
25 * TFT - for active matrix
26 *
27 * bits 4 - 9 : for bus width
28 * bits 10-17 : for AC Bias Pin Frequency
29 * bit 18 : for output enable polarity
30 * bit 19 : for pixel clock edge
31 */
32#define LCD_CONN_TYPE(_x) ((_x) & 0x0f)
33#define LCD_CONN_WIDTH(_x) (((_x) >> 4) & 0x1f)
34
35#define LCD_TYPE_UNKNOWN 0
36#define LCD_TYPE_MONO_STN 1
37#define LCD_TYPE_MONO_DSTN 2
38#define LCD_TYPE_COLOR_STN 3
39#define LCD_TYPE_COLOR_DSTN 4
40#define LCD_TYPE_COLOR_TFT 5
41#define LCD_TYPE_SMART_PANEL 6
42#define LCD_TYPE_MAX 7
43
44#define LCD_MONO_STN_4BPP ((4 << 4) | LCD_TYPE_MONO_STN)
45#define LCD_MONO_STN_8BPP ((8 << 4) | LCD_TYPE_MONO_STN)
46#define LCD_MONO_DSTN_8BPP ((8 << 4) | LCD_TYPE_MONO_DSTN)
47#define LCD_COLOR_STN_8BPP ((8 << 4) | LCD_TYPE_COLOR_STN)
48#define LCD_COLOR_DSTN_16BPP ((16 << 4) | LCD_TYPE_COLOR_DSTN)
49#define LCD_COLOR_TFT_16BPP ((16 << 4) | LCD_TYPE_COLOR_TFT)
50#define LCD_COLOR_TFT_18BPP ((18 << 4) | LCD_TYPE_COLOR_TFT)
51#define LCD_SMART_PANEL_8BPP ((8 << 4) | LCD_TYPE_SMART_PANEL)
52#define LCD_SMART_PANEL_16BPP ((16 << 4) | LCD_TYPE_SMART_PANEL)
53#define LCD_SMART_PANEL_18BPP ((18 << 4) | LCD_TYPE_SMART_PANEL)
54
55#define LCD_AC_BIAS_FREQ(x) (((x) & 0xff) << 10)
56#define LCD_BIAS_ACTIVE_HIGH (0 << 17)
57#define LCD_BIAS_ACTIVE_LOW (1 << 17)
58#define LCD_PCLK_EDGE_RISE (0 << 18)
59#define LCD_PCLK_EDGE_FALL (1 << 18)
60
61/*
62 * This structure describes the machine which we are running on.
63 * It is set in linux/arch/arm/mach-pxa/machine_name.c and used in the probe routine
64 * of linux/drivers/video/pxafb.c
65 */
66struct pxafb_mode_info {
67 u_long pixclock;
68
69 u_short xres;
70 u_short yres;
71
72 u_char bpp;
73 u_int cmap_greyscale:1,
74 depth:8,
75 unused:23;
76
77 /* Parallel Mode Timing */
78 u_char hsync_len;
79 u_char left_margin;
80 u_char right_margin;
81
82 u_char vsync_len;
83 u_char upper_margin;
84 u_char lower_margin;
85 u_char sync;
86
87 /* Smart Panel Mode Timing - see PXA27x DM 7.4.15.0.3 for details
88 * Note:
89 * 1. all parameters in nanosecond (ns)
90 * 2. a0cs{rd,wr}_set_hld are controlled by the same register bits
91 * in pxa27x and pxa3xx, initialize them to the same value or
92 * the larger one will be used
93 * 3. same to {rd,wr}_pulse_width
94 */
95 unsigned a0csrd_set_hld; /* A0 and CS Setup/Hold Time before/after L_FCLK_RD */
96 unsigned a0cswr_set_hld; /* A0 and CS Setup/Hold Time before/after L_PCLK_WR */
97 unsigned wr_pulse_width; /* L_PCLK_WR pulse width */
98 unsigned rd_pulse_width; /* L_FCLK_RD pulse width */
99 unsigned cmd_inh_time; /* Command Inhibit time between two writes */
100 unsigned op_hold_time; /* Output Hold time from L_FCLK_RD negation */
101};
102
103struct pxafb_mach_info {
104 struct pxafb_mode_info *modes;
105 unsigned int num_modes;
106
107 unsigned int lcd_conn;
108
109 u_int fixed_modes:1,
110 cmap_inverse:1,
111 cmap_static:1,
112 unused:29;
113
114 /* The following should be defined in LCCR0
115 * LCCR0_Act or LCCR0_Pas Active or Passive
116 * LCCR0_Sngl or LCCR0_Dual Single/Dual panel
117 * LCCR0_Mono or LCCR0_Color Mono/Color
118 * LCCR0_4PixMono or LCCR0_8PixMono (in mono single mode)
119 * LCCR0_DMADel(Tcpu) (optional) DMA request delay
120 *
121 * The following should not be defined in LCCR0:
122 * LCCR0_OUM, LCCR0_BM, LCCR0_QDM, LCCR0_DIS, LCCR0_EFM
123 * LCCR0_IUM, LCCR0_SFM, LCCR0_LDM, LCCR0_ENB
124 */
125 u_int lccr0;
126 /* The following should be defined in LCCR3
127 * LCCR3_OutEnH or LCCR3_OutEnL Output enable polarity
128 * LCCR3_PixRsEdg or LCCR3_PixFlEdg Pixel clock edge type
129 * LCCR3_Acb(X) AB Bias pin frequency
130 * LCCR3_DPC (optional) Double Pixel Clock mode (untested)
131 *
132 * The following should not be defined in LCCR3
133 * LCCR3_HSP, LCCR3_VSP, LCCR0_Pcd(x), LCCR3_Bpp
134 */
135 u_int lccr3;
136 /* The following should be defined in LCCR4
137 * LCCR4_PAL_FOR_0 or LCCR4_PAL_FOR_1 or LCCR4_PAL_FOR_2
138 *
139 * All other bits in LCCR4 should be left alone.
140 */
141 u_int lccr4;
142 void (*pxafb_backlight_power)(int);
143 void (*pxafb_lcd_power)(int, struct fb_var_screeninfo *);
144 void (*smart_update)(struct fb_info *);
145};
146void set_pxa_fb_info(struct pxafb_mach_info *hard_pxa_fb_info);
147void set_pxa_fb_parent(struct device *parent_dev);
148unsigned long pxafb_get_hsync_time(struct device *dev);
149
150extern int pxafb_smart_queue(struct fb_info *info, uint16_t *cmds, int);
151extern int pxafb_smart_flush(struct fb_info *info);
diff --git a/include/asm-arm/arch-pxa/regs-lcd.h b/include/asm-arm/arch-pxa/regs-lcd.h
deleted file mode 100644
index 820a189684a9..000000000000
--- a/include/asm-arm/arch-pxa/regs-lcd.h
+++ /dev/null
@@ -1,180 +0,0 @@
1#ifndef __ASM_ARCH_REGS_LCD_H
2#define __ASM_ARCH_REGS_LCD_H
3
4#include <asm/arch/bitfield.h>
5
6/*
7 * LCD Controller Registers and Bits Definitions
8 */
9#define LCCR0 (0x000) /* LCD Controller Control Register 0 */
10#define LCCR1 (0x004) /* LCD Controller Control Register 1 */
11#define LCCR2 (0x008) /* LCD Controller Control Register 2 */
12#define LCCR3 (0x00C) /* LCD Controller Control Register 3 */
13#define LCCR4 (0x010) /* LCD Controller Control Register 4 */
14#define LCCR5 (0x014) /* LCD Controller Control Register 5 */
15#define DFBR0 (0x020) /* DMA Channel 0 Frame Branch Register */
16#define DFBR1 (0x024) /* DMA Channel 1 Frame Branch Register */
17#define LCSR (0x038) /* LCD Controller Status Register */
18#define LIIDR (0x03C) /* LCD Controller Interrupt ID Register */
19#define TMEDRGBR (0x040) /* TMED RGB Seed Register */
20#define TMEDCR (0x044) /* TMED Control Register */
21
22#define CMDCR (0x100) /* Command Control Register */
23#define PRSR (0x104) /* Panel Read Status Register */
24
25#define LCCR3_1BPP (0 << 24)
26#define LCCR3_2BPP (1 << 24)
27#define LCCR3_4BPP (2 << 24)
28#define LCCR3_8BPP (3 << 24)
29#define LCCR3_16BPP (4 << 24)
30#define LCCR3_18BPP (5 << 24)
31#define LCCR3_18BPP_P (6 << 24)
32#define LCCR3_19BPP (7 << 24)
33#define LCCR3_19BPP_P (1 << 29)
34#define LCCR3_24BPP ((1 << 29) | (1 << 24))
35#define LCCR3_25BPP ((1 << 29) | (2 << 24))
36
37#define LCCR3_PDFOR_0 (0 << 30)
38#define LCCR3_PDFOR_1 (1 << 30)
39#define LCCR3_PDFOR_2 (2 << 30)
40#define LCCR3_PDFOR_3 (3 << 30)
41
42#define LCCR4_PAL_FOR_0 (0 << 15)
43#define LCCR4_PAL_FOR_1 (1 << 15)
44#define LCCR4_PAL_FOR_2 (2 << 15)
45#define LCCR4_PAL_FOR_MASK (3 << 15)
46
47#define FDADR0 (0x200) /* DMA Channel 0 Frame Descriptor Address Register */
48#define FSADR0 (0x204) /* DMA Channel 0 Frame Source Address Register */
49#define FIDR0 (0x208) /* DMA Channel 0 Frame ID Register */
50#define LDCMD0 (0x20C) /* DMA Channel 0 Command Register */
51#define FDADR1 (0x210) /* DMA Channel 1 Frame Descriptor Address Register */
52#define FSADR1 (0x214) /* DMA Channel 1 Frame Source Address Register */
53#define FIDR1 (0x218) /* DMA Channel 1 Frame ID Register */
54#define LDCMD1 (0x21C) /* DMA Channel 1 Command Register */
55#define FDADR6 (0x260) /* DMA Channel 6 Frame Descriptor Address Register */
56#define FSADR6 (0x264) /* DMA Channel 6 Frame Source Address Register */
57#define FIDR6 (0x268) /* DMA Channel 6 Frame ID Register */
58
59#define LCCR0_ENB (1 << 0) /* LCD Controller enable */
60#define LCCR0_CMS (1 << 1) /* Color/Monochrome Display Select */
61#define LCCR0_Color (LCCR0_CMS*0) /* Color display */
62#define LCCR0_Mono (LCCR0_CMS*1) /* Monochrome display */
63#define LCCR0_SDS (1 << 2) /* Single/Dual Panel Display Select */
64#define LCCR0_Sngl (LCCR0_SDS*0) /* Single panel display */
65#define LCCR0_Dual (LCCR0_SDS*1) /* Dual panel display */
66
67#define LCCR0_LDM (1 << 3) /* LCD Disable Done Mask */
68#define LCCR0_SFM (1 << 4) /* Start of frame mask */
69#define LCCR0_IUM (1 << 5) /* Input FIFO underrun mask */
70#define LCCR0_EFM (1 << 6) /* End of Frame mask */
71#define LCCR0_PAS (1 << 7) /* Passive/Active display Select */
72#define LCCR0_Pas (LCCR0_PAS*0) /* Passive display (STN) */
73#define LCCR0_Act (LCCR0_PAS*1) /* Active display (TFT) */
74#define LCCR0_DPD (1 << 9) /* Double Pixel Data (monochrome) */
75#define LCCR0_4PixMono (LCCR0_DPD*0) /* 4-Pixel/clock Monochrome display */
76#define LCCR0_8PixMono (LCCR0_DPD*1) /* 8-Pixel/clock Monochrome display */
77#define LCCR0_DIS (1 << 10) /* LCD Disable */
78#define LCCR0_QDM (1 << 11) /* LCD Quick Disable mask */
79#define LCCR0_PDD (0xff << 12) /* Palette DMA request delay */
80#define LCCR0_PDD_S 12
81#define LCCR0_BM (1 << 20) /* Branch mask */
82#define LCCR0_OUM (1 << 21) /* Output FIFO underrun mask */
83#define LCCR0_LCDT (1 << 22) /* LCD panel type */
84#define LCCR0_RDSTM (1 << 23) /* Read status interrupt mask */
85#define LCCR0_CMDIM (1 << 24) /* Command interrupt mask */
86#define LCCR0_OUC (1 << 25) /* Overlay Underlay control bit */
87#define LCCR0_LDDALT (1 << 26) /* LDD alternate mapping control */
88
89#define LCCR1_PPL Fld (10, 0) /* Pixels Per Line - 1 */
90#define LCCR1_DisWdth(Pixel) (((Pixel) - 1) << FShft (LCCR1_PPL))
91
92#define LCCR1_HSW Fld (6, 10) /* Horizontal Synchronization */
93#define LCCR1_HorSnchWdth(Tpix) (((Tpix) - 1) << FShft (LCCR1_HSW))
94
95#define LCCR1_ELW Fld (8, 16) /* End-of-Line pixel clock Wait - 1 */
96#define LCCR1_EndLnDel(Tpix) (((Tpix) - 1) << FShft (LCCR1_ELW))
97
98#define LCCR1_BLW Fld (8, 24) /* Beginning-of-Line pixel clock */
99#define LCCR1_BegLnDel(Tpix) (((Tpix) - 1) << FShft (LCCR1_BLW))
100
101#define LCCR2_LPP Fld (10, 0) /* Line Per Panel - 1 */
102#define LCCR2_DisHght(Line) (((Line) - 1) << FShft (LCCR2_LPP))
103
104#define LCCR2_VSW Fld (6, 10) /* Vertical Synchronization pulse - 1 */
105#define LCCR2_VrtSnchWdth(Tln) (((Tln) - 1) << FShft (LCCR2_VSW))
106
107#define LCCR2_EFW Fld (8, 16) /* End-of-Frame line clock Wait */
108#define LCCR2_EndFrmDel(Tln) ((Tln) << FShft (LCCR2_EFW))
109
110#define LCCR2_BFW Fld (8, 24) /* Beginning-of-Frame line clock */
111#define LCCR2_BegFrmDel(Tln) ((Tln) << FShft (LCCR2_BFW))
112
113#define LCCR3_API (0xf << 16) /* AC Bias pin trasitions per interrupt */
114#define LCCR3_API_S 16
115#define LCCR3_VSP (1 << 20) /* vertical sync polarity */
116#define LCCR3_HSP (1 << 21) /* horizontal sync polarity */
117#define LCCR3_PCP (1 << 22) /* Pixel Clock Polarity (L_PCLK) */
118#define LCCR3_PixRsEdg (LCCR3_PCP*0) /* Pixel clock Rising-Edge */
119#define LCCR3_PixFlEdg (LCCR3_PCP*1) /* Pixel clock Falling-Edge */
120
121#define LCCR3_OEP (1 << 23) /* Output Enable Polarity */
122#define LCCR3_OutEnH (LCCR3_OEP*0) /* Output Enable active High */
123#define LCCR3_OutEnL (LCCR3_OEP*1) /* Output Enable active Low */
124
125#define LCCR3_DPC (1 << 27) /* double pixel clock mode */
126#define LCCR3_PCD Fld (8, 0) /* Pixel Clock Divisor */
127#define LCCR3_PixClkDiv(Div) (((Div) << FShft (LCCR3_PCD)))
128
129#define LCCR3_BPP Fld (3, 24) /* Bit Per Pixel */
130#define LCCR3_Bpp(Bpp) (((Bpp) << FShft (LCCR3_BPP)))
131
132#define LCCR3_ACB Fld (8, 8) /* AC Bias */
133#define LCCR3_Acb(Acb) (((Acb) << FShft (LCCR3_ACB)))
134
135#define LCCR3_HorSnchH (LCCR3_HSP*0) /* HSP Active High */
136#define LCCR3_HorSnchL (LCCR3_HSP*1) /* HSP Active Low */
137
138#define LCCR3_VrtSnchH (LCCR3_VSP*0) /* VSP Active High */
139#define LCCR3_VrtSnchL (LCCR3_VSP*1) /* VSP Active Low */
140
141#define LCCR5_IUM(x) (1 << ((x) + 23)) /* input underrun mask */
142#define LCCR5_BSM(x) (1 << ((x) + 15)) /* branch mask */
143#define LCCR5_EOFM(x) (1 << ((x) + 7)) /* end of frame mask */
144#define LCCR5_SOFM(x) (1 << ((x) + 0)) /* start of frame mask */
145
146#define LCSR_LDD (1 << 0) /* LCD Disable Done */
147#define LCSR_SOF (1 << 1) /* Start of frame */
148#define LCSR_BER (1 << 2) /* Bus error */
149#define LCSR_ABC (1 << 3) /* AC Bias count */
150#define LCSR_IUL (1 << 4) /* input FIFO underrun Lower panel */
151#define LCSR_IUU (1 << 5) /* input FIFO underrun Upper panel */
152#define LCSR_OU (1 << 6) /* output FIFO underrun */
153#define LCSR_QD (1 << 7) /* quick disable */
154#define LCSR_EOF (1 << 8) /* end of frame */
155#define LCSR_BS (1 << 9) /* branch status */
156#define LCSR_SINT (1 << 10) /* subsequent interrupt */
157#define LCSR_RD_ST (1 << 11) /* read status */
158#define LCSR_CMD_INT (1 << 12) /* command interrupt */
159
160#define LDCMD_PAL (1 << 26) /* instructs DMA to load palette buffer */
161
162/* smartpanel related */
163#define PRSR_DATA(x) ((x) & 0xff) /* Panel Data */
164#define PRSR_A0 (1 << 8) /* Read Data Source */
165#define PRSR_ST_OK (1 << 9) /* Status OK */
166#define PRSR_CON_NT (1 << 10) /* Continue to Next Command */
167
168#define SMART_CMD_A0 (0x1 << 8)
169#define SMART_CMD_READ_STATUS_REG (0x0 << 9)
170#define SMART_CMD_READ_FRAME_BUFFER ((0x0 << 9) | SMART_CMD_A0)
171#define SMART_CMD_WRITE_COMMAND (0x1 << 9)
172#define SMART_CMD_WRITE_DATA ((0x1 << 9) | SMART_CMD_A0)
173#define SMART_CMD_WRITE_FRAME ((0x2 << 9) | SMART_CMD_A0)
174#define SMART_CMD_WAIT_FOR_VSYNC (0x3 << 9)
175#define SMART_CMD_NOOP (0x4 << 9)
176#define SMART_CMD_INTERRUPT (0x5 << 9)
177
178#define SMART_CMD(x) (SMART_CMD_WRITE_COMMAND | ((x) & 0xff))
179#define SMART_DAT(x) (SMART_CMD_WRITE_DATA | ((x) & 0xff))
180#endif /* __ASM_ARCH_REGS_LCD_H */
diff --git a/include/asm-arm/arch-pxa/system.h b/include/asm-arm/arch-pxa/system.h
deleted file mode 100644
index 6956fc5235f8..000000000000
--- a/include/asm-arm/arch-pxa/system.h
+++ /dev/null
@@ -1,24 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-pxa/system.h
3 *
4 * Author: Nicolas Pitre
5 * Created: Jun 15, 2001
6 * Copyright: MontaVista Software Inc.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 */
12
13#include <asm/proc-fns.h>
14#include "hardware.h"
15#include "pxa2xx-regs.h"
16#include "pxa-regs.h"
17
18static inline void arch_idle(void)
19{
20 cpu_do_idle();
21}
22
23
24void arch_reset(char mode);
diff --git a/include/asm-arm/arch-pxa/timex.h b/include/asm-arm/arch-pxa/timex.h
deleted file mode 100644
index 8d882f0b6a16..000000000000
--- a/include/asm-arm/arch-pxa/timex.h
+++ /dev/null
@@ -1,26 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-pxa/timex.h
3 *
4 * Author: Nicolas Pitre
5 * Created: Jun 15, 2001
6 * Copyright: MontaVista Software Inc.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 */
12
13
14#if defined(CONFIG_PXA25x)
15/* PXA250/210 timer base */
16#define CLOCK_TICK_RATE 3686400
17#elif defined(CONFIG_PXA27x)
18/* PXA27x timer base */
19#ifdef CONFIG_MACH_MAINSTONE
20#define CLOCK_TICK_RATE 3249600
21#else
22#define CLOCK_TICK_RATE 3250000
23#endif
24#else
25#define CLOCK_TICK_RATE 3250000
26#endif
diff --git a/include/asm-arm/arch-pxa/udc.h b/include/asm-arm/arch-pxa/udc.h
deleted file mode 100644
index 27aa3a91012f..000000000000
--- a/include/asm-arm/arch-pxa/udc.h
+++ /dev/null
@@ -1,8 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-pxa/udc.h
3 *
4 */
5#include <asm/mach/udc_pxa2xx.h>
6
7extern void pxa_set_udc_info(struct pxa2xx_udc_mach_info *info);
8
diff --git a/include/asm-arm/arch-pxa/uncompress.h b/include/asm-arm/arch-pxa/uncompress.h
deleted file mode 100644
index f4551269aaf2..000000000000
--- a/include/asm-arm/arch-pxa/uncompress.h
+++ /dev/null
@@ -1,45 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-pxa/uncompress.h
3 *
4 * Author: Nicolas Pitre
5 * Copyright: (C) 2001 MontaVista Software Inc.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 */
11
12#include <linux/serial_reg.h>
13#include <asm/arch/pxa-regs.h>
14#include <asm/mach-types.h>
15
16#define __REG(x) ((volatile unsigned long *)x)
17
18static volatile unsigned long *UART = FFUART;
19
20static inline void putc(char c)
21{
22 if (!(UART[UART_IER] & IER_UUE))
23 return;
24 while (!(UART[UART_LSR] & LSR_TDRQ))
25 barrier();
26 UART[UART_TX] = c;
27}
28
29/*
30 * This does not append a newline
31 */
32static inline void flush(void)
33{
34}
35
36static inline void arch_decomp_setup(void)
37{
38 if (machine_is_littleton())
39 UART = STUART;
40}
41
42/*
43 * nothing to do
44 */
45#define arch_decomp_wdog()
diff --git a/include/asm-arm/arch-pxa/vmalloc.h b/include/asm-arm/arch-pxa/vmalloc.h
deleted file mode 100644
index 5bb450c7aa2c..000000000000
--- a/include/asm-arm/arch-pxa/vmalloc.h
+++ /dev/null
@@ -1,11 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-pxa/vmalloc.h
3 *
4 * Author: Nicolas Pitre
5 * Copyright: (C) 2001 MontaVista Software Inc.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 */
11#define VMALLOC_END (0xe8000000)
diff --git a/include/asm-arm/arch-realview/board-eb.h b/include/asm-arm/arch-realview/board-eb.h
deleted file mode 100644
index 206f7a752882..000000000000
--- a/include/asm-arm/arch-realview/board-eb.h
+++ /dev/null
@@ -1,191 +0,0 @@
1/*
2 * include/asm-arm/arch-realview/board-eb.h
3 *
4 * Copyright (C) 2007 ARM Limited
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
18 * MA 02110-1301, USA.
19 */
20
21#ifndef __ASM_ARCH_BOARD_EB_H
22#define __ASM_ARCH_BOARD_EB_H
23
24#include <asm/arch/platform.h>
25
26/*
27 * RealView EB + ARM11MPCore peripheral addresses
28 */
29#define REALVIEW_EB_UART0_BASE 0x10009000 /* UART 0 */
30#define REALVIEW_EB_UART1_BASE 0x1000A000 /* UART 1 */
31#define REALVIEW_EB_UART2_BASE 0x1000B000 /* UART 2 */
32#define REALVIEW_EB_UART3_BASE 0x1000C000 /* UART 3 */
33#define REALVIEW_EB_SSP_BASE 0x1000D000 /* Synchronous Serial Port */
34#define REALVIEW_EB_WATCHDOG_BASE 0x10010000 /* watchdog interface */
35#define REALVIEW_EB_TIMER0_1_BASE 0x10011000 /* Timer 0 and 1 */
36#define REALVIEW_EB_TIMER2_3_BASE 0x10012000 /* Timer 2 and 3 */
37#define REALVIEW_EB_GPIO0_BASE 0x10013000 /* GPIO port 0 */
38#define REALVIEW_EB_RTC_BASE 0x10017000 /* Real Time Clock */
39#define REALVIEW_EB_CLCD_BASE 0x10020000 /* CLCD */
40#define REALVIEW_EB_GIC_CPU_BASE 0x10040000 /* Generic interrupt controller CPU interface */
41#define REALVIEW_EB_GIC_DIST_BASE 0x10041000 /* Generic interrupt controller distributor */
42#define REALVIEW_EB_SMC_BASE 0x10080000 /* Static memory controller */
43
44#define REALVIEW_EB_FLASH_BASE 0x40000000
45#define REALVIEW_EB_FLASH_SIZE SZ_64M
46#define REALVIEW_EB_ETH_BASE 0x4E000000 /* Ethernet */
47#define REALVIEW_EB_USB_BASE 0x4F000000 /* USB */
48
49#ifdef CONFIG_REALVIEW_EB_ARM11MP_REVB
50#define REALVIEW_EB11MP_SCU_BASE 0x10100000 /* SCU registers */
51#define REALVIEW_EB11MP_GIC_CPU_BASE 0x10100100 /* Generic interrupt controller CPU interface */
52#define REALVIEW_EB11MP_TWD_BASE 0x10100700
53#define REALVIEW_EB11MP_TWD_SIZE 0x00000100
54#define REALVIEW_EB11MP_GIC_DIST_BASE 0x10101000 /* Generic interrupt controller distributor */
55#define REALVIEW_EB11MP_L220_BASE 0x10102000 /* L220 registers */
56#define REALVIEW_EB11MP_SYS_PLD_CTRL1 0xD8 /* Register offset for MPCore sysctl */
57#else
58#define REALVIEW_EB11MP_SCU_BASE 0x1F000000 /* SCU registers */
59#define REALVIEW_EB11MP_GIC_CPU_BASE 0x1F000100 /* Generic interrupt controller CPU interface */
60#define REALVIEW_EB11MP_TWD_BASE 0x1F000700
61#define REALVIEW_EB11MP_TWD_SIZE 0x00000100
62#define REALVIEW_EB11MP_GIC_DIST_BASE 0x1F001000 /* Generic interrupt controller distributor */
63#define REALVIEW_EB11MP_L220_BASE 0x1F002000 /* L220 registers */
64#define REALVIEW_EB11MP_SYS_PLD_CTRL1 0x74 /* Register offset for MPCore sysctl */
65#endif
66
67#define IRQ_EB_GIC_START 32
68
69/*
70 * RealView EB interrupt sources
71 */
72#define IRQ_EB_WDOG (IRQ_EB_GIC_START + 0) /* Watchdog timer */
73#define IRQ_EB_SOFT (IRQ_EB_GIC_START + 1) /* Software interrupt */
74#define IRQ_EB_COMMRx (IRQ_EB_GIC_START + 2) /* Debug Comm Rx interrupt */
75#define IRQ_EB_COMMTx (IRQ_EB_GIC_START + 3) /* Debug Comm Tx interrupt */
76#define IRQ_EB_TIMER0_1 (IRQ_EB_GIC_START + 4) /* Timer 0 and 1 */
77#define IRQ_EB_TIMER2_3 (IRQ_EB_GIC_START + 5) /* Timer 2 and 3 */
78#define IRQ_EB_GPIO0 (IRQ_EB_GIC_START + 6) /* GPIO 0 */
79#define IRQ_EB_GPIO1 (IRQ_EB_GIC_START + 7) /* GPIO 1 */
80#define IRQ_EB_GPIO2 (IRQ_EB_GIC_START + 8) /* GPIO 2 */
81 /* 9 reserved */
82#define IRQ_EB_RTC (IRQ_EB_GIC_START + 10) /* Real Time Clock */
83#define IRQ_EB_SSP (IRQ_EB_GIC_START + 11) /* Synchronous Serial Port */
84#define IRQ_EB_UART0 (IRQ_EB_GIC_START + 12) /* UART 0 on development chip */
85#define IRQ_EB_UART1 (IRQ_EB_GIC_START + 13) /* UART 1 on development chip */
86#define IRQ_EB_UART2 (IRQ_EB_GIC_START + 14) /* UART 2 on development chip */
87#define IRQ_EB_UART3 (IRQ_EB_GIC_START + 15) /* UART 3 on development chip */
88#define IRQ_EB_SCI (IRQ_EB_GIC_START + 16) /* Smart Card Interface */
89#define IRQ_EB_MMCI0A (IRQ_EB_GIC_START + 17) /* Multimedia Card 0A */
90#define IRQ_EB_MMCI0B (IRQ_EB_GIC_START + 18) /* Multimedia Card 0B */
91#define IRQ_EB_AACI (IRQ_EB_GIC_START + 19) /* Audio Codec */
92#define IRQ_EB_KMI0 (IRQ_EB_GIC_START + 20) /* Keyboard/Mouse port 0 */
93#define IRQ_EB_KMI1 (IRQ_EB_GIC_START + 21) /* Keyboard/Mouse port 1 */
94#define IRQ_EB_CHARLCD (IRQ_EB_GIC_START + 22) /* Character LCD */
95#define IRQ_EB_CLCD (IRQ_EB_GIC_START + 23) /* CLCD controller */
96#define IRQ_EB_DMA (IRQ_EB_GIC_START + 24) /* DMA controller */
97#define IRQ_EB_PWRFAIL (IRQ_EB_GIC_START + 25) /* Power failure */
98#define IRQ_EB_PISMO (IRQ_EB_GIC_START + 26) /* PISMO interface */
99#define IRQ_EB_DoC (IRQ_EB_GIC_START + 27) /* Disk on Chip memory controller */
100#define IRQ_EB_ETH (IRQ_EB_GIC_START + 28) /* Ethernet controller */
101#define IRQ_EB_USB (IRQ_EB_GIC_START + 29) /* USB controller */
102#define IRQ_EB_TSPEN (IRQ_EB_GIC_START + 30) /* Touchscreen pen */
103#define IRQ_EB_TSKPAD (IRQ_EB_GIC_START + 31) /* Touchscreen keypad */
104
105/*
106 * RealView EB + ARM11MPCore interrupt sources (primary GIC on the core tile)
107 */
108#define IRQ_EB11MP_AACI (IRQ_EB_GIC_START + 0)
109#define IRQ_EB11MP_TIMER0_1 (IRQ_EB_GIC_START + 1)
110#define IRQ_EB11MP_TIMER2_3 (IRQ_EB_GIC_START + 2)
111#define IRQ_EB11MP_USB (IRQ_EB_GIC_START + 3)
112#define IRQ_EB11MP_UART0 (IRQ_EB_GIC_START + 4)
113#define IRQ_EB11MP_UART1 (IRQ_EB_GIC_START + 5)
114#define IRQ_EB11MP_RTC (IRQ_EB_GIC_START + 6)
115#define IRQ_EB11MP_KMI0 (IRQ_EB_GIC_START + 7)
116#define IRQ_EB11MP_KMI1 (IRQ_EB_GIC_START + 8)
117#define IRQ_EB11MP_ETH (IRQ_EB_GIC_START + 9)
118#define IRQ_EB11MP_EB_IRQ1 (IRQ_EB_GIC_START + 10) /* main GIC */
119#define IRQ_EB11MP_EB_IRQ2 (IRQ_EB_GIC_START + 11) /* tile GIC */
120#define IRQ_EB11MP_EB_FIQ1 (IRQ_EB_GIC_START + 12) /* main GIC */
121#define IRQ_EB11MP_EB_FIQ2 (IRQ_EB_GIC_START + 13) /* tile GIC */
122#define IRQ_EB11MP_MMCI0A (IRQ_EB_GIC_START + 14)
123#define IRQ_EB11MP_MMCI0B (IRQ_EB_GIC_START + 15)
124
125#define IRQ_EB11MP_PMU_CPU0 (IRQ_EB_GIC_START + 17)
126#define IRQ_EB11MP_PMU_CPU1 (IRQ_EB_GIC_START + 18)
127#define IRQ_EB11MP_PMU_CPU2 (IRQ_EB_GIC_START + 19)
128#define IRQ_EB11MP_PMU_CPU3 (IRQ_EB_GIC_START + 20)
129#define IRQ_EB11MP_PMU_SCU0 (IRQ_EB_GIC_START + 21)
130#define IRQ_EB11MP_PMU_SCU1 (IRQ_EB_GIC_START + 22)
131#define IRQ_EB11MP_PMU_SCU2 (IRQ_EB_GIC_START + 23)
132#define IRQ_EB11MP_PMU_SCU3 (IRQ_EB_GIC_START + 24)
133#define IRQ_EB11MP_PMU_SCU4 (IRQ_EB_GIC_START + 25)
134#define IRQ_EB11MP_PMU_SCU5 (IRQ_EB_GIC_START + 26)
135#define IRQ_EB11MP_PMU_SCU6 (IRQ_EB_GIC_START + 27)
136#define IRQ_EB11MP_PMU_SCU7 (IRQ_EB_GIC_START + 28)
137
138#define IRQ_EB11MP_L220_EVENT (IRQ_EB_GIC_START + 29)
139#define IRQ_EB11MP_L220_SLAVE (IRQ_EB_GIC_START + 30)
140#define IRQ_EB11MP_L220_DECODE (IRQ_EB_GIC_START + 31)
141
142#define IRQ_EB11MP_UART2 -1
143#define IRQ_EB11MP_UART3 -1
144#define IRQ_EB11MP_CLCD -1
145#define IRQ_EB11MP_DMA -1
146#define IRQ_EB11MP_WDOG -1
147#define IRQ_EB11MP_GPIO0 -1
148#define IRQ_EB11MP_GPIO1 -1
149#define IRQ_EB11MP_GPIO2 -1
150#define IRQ_EB11MP_SCI -1
151#define IRQ_EB11MP_SSP -1
152
153#define NR_GIC_EB11MP 2
154
155/*
156 * Only define NR_IRQS if less than NR_IRQS_EB
157 */
158#define NR_IRQS_EB (IRQ_EB_GIC_START + 96)
159
160#if defined(CONFIG_MACH_REALVIEW_EB) \
161 && (!defined(NR_IRQS) || (NR_IRQS < NR_IRQS_EB))
162#undef NR_IRQS
163#define NR_IRQS NR_IRQS_EB
164#endif
165
166#if defined(CONFIG_REALVIEW_EB_ARM11MP) \
167 && (!defined(MAX_GIC_NR) || (MAX_GIC_NR < NR_GIC_EB11MP))
168#undef MAX_GIC_NR
169#define MAX_GIC_NR NR_GIC_EB11MP
170#endif
171
172/*
173 * Core tile identification (REALVIEW_SYS_PROCID)
174 */
175#define REALVIEW_EB_PROC_MASK 0xFF000000
176#define REALVIEW_EB_PROC_ARM7TDMI 0x00000000
177#define REALVIEW_EB_PROC_ARM9 0x02000000
178#define REALVIEW_EB_PROC_ARM11 0x04000000
179#define REALVIEW_EB_PROC_ARM11MP 0x06000000
180
181#define check_eb_proc(proc_type) \
182 ((readl(__io_address(REALVIEW_SYS_PROCID)) & REALVIEW_EB_PROC_MASK) \
183 == proc_type)
184
185#ifdef CONFIG_REALVIEW_EB_ARM11MP
186#define core_tile_eb11mp() check_eb_proc(REALVIEW_EB_PROC_ARM11MP)
187#else
188#define core_tile_eb11mp() 0
189#endif
190
191#endif /* __ASM_ARCH_BOARD_EB_H */
diff --git a/include/asm-arm/arch-realview/board-pb1176.h b/include/asm-arm/arch-realview/board-pb1176.h
deleted file mode 100644
index 48ce9c833705..000000000000
--- a/include/asm-arm/arch-realview/board-pb1176.h
+++ /dev/null
@@ -1,152 +0,0 @@
1/*
2 * include/asm-arm/arch-realview/board-pb1176.h
3 *
4 * Copyright (C) 2008 ARM Limited
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
18 * MA 02110-1301, USA.
19 */
20
21#ifndef __ASM_ARCH_BOARD_PB1176_H
22#define __ASM_ARCH_BOARD_PB1176_H
23
24#include <asm/arch/platform.h>
25
26/*
27 * Peripheral addresses
28 */
29#define REALVIEW_PB1176_SCTL_BASE 0x10100000 /* System controller */
30#define REALVIEW_PB1176_SMC_BASE 0x10111000 /* SMC */
31#define REALVIEW_PB1176_DMC_BASE 0x10109000 /* DMC configuration */
32#define REALVIEW_PB1176_SDRAM67_BASE 0x70000000 /* SDRAM banks 6 and 7 */
33#define REALVIEW_PB1176_FLASH_BASE 0x30000000
34#define REALVIEW_PB1176_FLASH_SIZE SZ_64M
35
36#define REALVIEW_PB1176_TIMER0_1_BASE 0x10104000 /* Timer 0 and 1 */
37#define REALVIEW_PB1176_TIMER2_3_BASE 0x10105000 /* Timer 2 and 3 */
38#define REALVIEW_PB1176_TIMER4_5_BASE 0x10106000 /* Timer 4 and 5 */
39#define REALVIEW_PB1176_WATCHDOG_BASE 0x10107000 /* watchdog interface */
40#define REALVIEW_PB1176_RTC_BASE 0x10108000 /* Real Time Clock */
41#define REALVIEW_PB1176_GPIO0_BASE 0x1010A000 /* GPIO port 0 */
42#define REALVIEW_PB1176_SSP_BASE 0x1010B000 /* Synchronous Serial Port */
43#define REALVIEW_PB1176_UART0_BASE 0x1010C000 /* UART 0 */
44#define REALVIEW_PB1176_UART1_BASE 0x1010D000 /* UART 1 */
45#define REALVIEW_PB1176_UART2_BASE 0x1010E000 /* UART 2 */
46#define REALVIEW_PB1176_UART3_BASE 0x1010F000 /* UART 3 */
47#define REALVIEW_PB1176_CLCD_BASE 0x10112000 /* CLCD */
48#define REALVIEW_PB1176_ETH_BASE 0x3A000000 /* Ethernet */
49#define REALVIEW_PB1176_USB_BASE 0x3B000000 /* USB */
50
51/*
52 * PCI regions
53 */
54#define REALVIEW_PB1176_PCI_BASE 0x60000000 /* PCI self config */
55#define REALVIEW_PB1176_PCI_CFG_BASE 0x61000000 /* PCI config */
56#define REALVIEW_PB1176_PCI_IO_BASE0 0x62000000 /* PCI IO region */
57#define REALVIEW_PB1176_PCI_MEM_BASE0 0x63000000 /* Memory region 1 */
58#define REALVIEW_PB1176_PCI_MEM_BASE1 0x64000000 /* Memory region 2 */
59#define REALVIEW_PB1176_PCI_MEM_BASE2 0x68000000 /* Memory region 3 */
60
61#define REALVIEW_PB1176_PCI_BASE_SIZE 0x01000000 /* 16MB */
62#define REALVIEW_PB1176_PCI_CFG_BASE_SIZE 0x01000000 /* 16MB */
63#define REALVIEW_PB1176_PCI_IO_BASE0_SIZE 0x01000000 /* 16MB */
64#define REALVIEW_PB1176_PCI_MEM_BASE0_SIZE 0x01000000 /* 16MB */
65#define REALVIEW_PB1176_PCI_MEM_BASE1_SIZE 0x04000000 /* 64MB */
66#define REALVIEW_PB1176_PCI_MEM_BASE2_SIZE 0x08000000 /* 128MB */
67
68#define REALVIEW_DC1176_GIC_CPU_BASE 0x10120000 /* GIC CPU interface, on devchip */
69#define REALVIEW_DC1176_GIC_DIST_BASE 0x10121000 /* GIC distributor, on devchip */
70#define REALVIEW_PB1176_GIC_CPU_BASE 0x10040000 /* GIC CPU interface, on FPGA */
71#define REALVIEW_PB1176_GIC_DIST_BASE 0x10041000 /* GIC distributor, on FPGA */
72#define REALVIEW_PB1176_L220_BASE 0x10110000 /* L220 registers */
73
74/*
75 * Irqs
76 */
77#define IRQ_DC1176_GIC_START 32
78#define IRQ_PB1176_GIC_START 64
79
80/*
81 * ARM1176 DevChip interrupt sources (primary GIC)
82 */
83#define IRQ_DC1176_WATCHDOG (IRQ_DC1176_GIC_START + 0) /* Watchdog timer */
84#define IRQ_DC1176_SOFTINT (IRQ_DC1176_GIC_START + 1) /* Software interrupt */
85#define IRQ_DC1176_COMMRx (IRQ_DC1176_GIC_START + 2) /* Debug Comm Rx interrupt */
86#define IRQ_DC1176_COMMTx (IRQ_DC1176_GIC_START + 3) /* Debug Comm Tx interrupt */
87#define IRQ_DC1176_TIMER0 (IRQ_DC1176_GIC_START + 8) /* Timer 0 */
88#define IRQ_DC1176_TIMER1 (IRQ_DC1176_GIC_START + 9) /* Timer 1 */
89#define IRQ_DC1176_TIMER2 (IRQ_DC1176_GIC_START + 10) /* Timer 2 */
90#define IRQ_DC1176_APC (IRQ_DC1176_GIC_START + 11)
91#define IRQ_DC1176_IEC (IRQ_DC1176_GIC_START + 12)
92#define IRQ_DC1176_L2CC (IRQ_DC1176_GIC_START + 13)
93#define IRQ_DC1176_RTC (IRQ_DC1176_GIC_START + 14)
94#define IRQ_DC1176_CLCD (IRQ_DC1176_GIC_START + 15) /* CLCD controller */
95#define IRQ_DC1176_UART0 (IRQ_DC1176_GIC_START + 18) /* UART 0 on development chip */
96#define IRQ_DC1176_UART1 (IRQ_DC1176_GIC_START + 19) /* UART 1 on development chip */
97#define IRQ_DC1176_UART2 (IRQ_DC1176_GIC_START + 20) /* UART 2 on development chip */
98#define IRQ_DC1176_UART3 (IRQ_DC1176_GIC_START + 21) /* UART 3 on development chip */
99
100#define IRQ_DC1176_PB_IRQ2 (IRQ_DC1176_GIC_START + 30) /* tile GIC */
101#define IRQ_DC1176_PB_IRQ1 (IRQ_DC1176_GIC_START + 31) /* main GIC */
102
103/*
104 * RealView PB1176 interrupt sources (secondary GIC)
105 */
106#define IRQ_PB1176_MMCI0A (IRQ_PB1176_GIC_START + 1) /* Multimedia Card 0A */
107#define IRQ_PB1176_MMCI0B (IRQ_PB1176_GIC_START + 2) /* Multimedia Card 0A */
108#define IRQ_PB1176_KMI0 (IRQ_PB1176_GIC_START + 3) /* Keyboard/Mouse port 0 */
109#define IRQ_PB1176_KMI1 (IRQ_PB1176_GIC_START + 4) /* Keyboard/Mouse port 1 */
110#define IRQ_PB1176_SCI (IRQ_PB1176_GIC_START + 5)
111#define IRQ_PB1176_UART4 (IRQ_PB1176_GIC_START + 6) /* UART 4 on baseboard */
112#define IRQ_PB1176_CHARLCD (IRQ_PB1176_GIC_START + 7) /* Character LCD */
113#define IRQ_PB1176_GPIO1 (IRQ_PB1176_GIC_START + 8)
114#define IRQ_PB1176_GPIO2 (IRQ_PB1176_GIC_START + 9)
115#define IRQ_PB1176_ETH (IRQ_PB1176_GIC_START + 10) /* Ethernet controller */
116#define IRQ_PB1176_USB (IRQ_PB1176_GIC_START + 11) /* USB controller */
117
118#define IRQ_PB1176_PISMO (IRQ_PB1176_GIC_START + 16)
119
120#define IRQ_PB1176_AACI (IRQ_PB1176_GIC_START + 19) /* Audio Codec */
121
122#define IRQ_PB1176_TIMER0_1 (IRQ_PB1176_GIC_START + 22)
123#define IRQ_PB1176_TIMER2_3 (IRQ_PB1176_GIC_START + 23)
124#define IRQ_PB1176_DMAC (IRQ_PB1176_GIC_START + 24) /* DMA controller */
125#define IRQ_PB1176_RTC (IRQ_PB1176_GIC_START + 25) /* Real Time Clock */
126
127#define IRQ_PB1176_GPIO0 -1
128#define IRQ_PB1176_SSP -1
129#define IRQ_PB1176_SCTL -1
130
131#define NR_GIC_PB1176 2
132
133/*
134 * Only define NR_IRQS if less than NR_IRQS_PB1176
135 */
136#define NR_IRQS_PB1176 (IRQ_DC1176_GIC_START + 96)
137
138#if defined(CONFIG_MACH_REALVIEW_PB1176)
139
140#if !defined(NR_IRQS) || (NR_IRQS < NR_IRQS_PB1176)
141#undef NR_IRQS
142#define NR_IRQS NR_IRQS_PB1176
143#endif
144
145#if !defined(MAX_GIC_NR) || (MAX_GIC_NR < NR_GIC_PB1176)
146#undef MAX_GIC_NR
147#define MAX_GIC_NR NR_GIC_PB1176
148#endif
149
150#endif /* CONFIG_MACH_REALVIEW_PB1176 */
151
152#endif /* __ASM_ARCH_BOARD_PB1176_H */
diff --git a/include/asm-arm/arch-realview/board-pb11mp.h b/include/asm-arm/arch-realview/board-pb11mp.h
deleted file mode 100644
index a1294d915fa8..000000000000
--- a/include/asm-arm/arch-realview/board-pb11mp.h
+++ /dev/null
@@ -1,186 +0,0 @@
1/*
2 * include/asm-arm/arch-realview/board-pb11mp.h
3 *
4 * Copyright (C) 2008 ARM Limited
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
18 * MA 02110-1301, USA.
19 */
20
21#ifndef __ASM_ARCH_BOARD_PB11MP_H
22#define __ASM_ARCH_BOARD_PB11MP_H
23
24#include <asm/arch/platform.h>
25
26/*
27 * Peripheral addresses
28 */
29#define REALVIEW_PB11MP_UART0_BASE 0x10009000 /* UART 0 */
30#define REALVIEW_PB11MP_UART1_BASE 0x1000A000 /* UART 1 */
31#define REALVIEW_PB11MP_UART2_BASE 0x1000B000 /* UART 2 */
32#define REALVIEW_PB11MP_UART3_BASE 0x1000C000 /* UART 3 */
33#define REALVIEW_PB11MP_SSP_BASE 0x1000D000 /* Synchronous Serial Port */
34#define REALVIEW_PB11MP_WATCHDOG0_BASE 0x1000F000 /* Watchdog 0 */
35#define REALVIEW_PB11MP_WATCHDOG_BASE 0x10010000 /* watchdog interface */
36#define REALVIEW_PB11MP_TIMER0_1_BASE 0x10011000 /* Timer 0 and 1 */
37#define REALVIEW_PB11MP_TIMER2_3_BASE 0x10012000 /* Timer 2 and 3 */
38#define REALVIEW_PB11MP_GPIO0_BASE 0x10013000 /* GPIO port 0 */
39#define REALVIEW_PB11MP_RTC_BASE 0x10017000 /* Real Time Clock */
40#define REALVIEW_PB11MP_TIMER4_5_BASE 0x10018000 /* Timer 4/5 */
41#define REALVIEW_PB11MP_TIMER6_7_BASE 0x10019000 /* Timer 6/7 */
42#define REALVIEW_PB11MP_SCTL_BASE 0x1001A000 /* System Controller */
43#define REALVIEW_PB11MP_CLCD_BASE 0x10020000 /* CLCD */
44#define REALVIEW_PB11MP_ONB_SRAM_BASE 0x10060000 /* On-board SRAM */
45#define REALVIEW_PB11MP_DMC_BASE 0x100E0000 /* DMC configuration */
46#define REALVIEW_PB11MP_SMC_BASE 0x100E1000 /* SMC configuration */
47#define REALVIEW_PB11MP_CAN_BASE 0x100E2000 /* CAN bus */
48#define REALVIEW_PB11MP_CF_BASE 0x18000000 /* Compact flash */
49#define REALVIEW_PB11MP_CF_MEM_BASE 0x18003000 /* SMC for Compact flash */
50#define REALVIEW_PB11MP_GIC_CPU_BASE 0x1E000000 /* Generic interrupt controller CPU interface */
51#define REALVIEW_PB11MP_FLASH0_BASE 0x40000000
52#define REALVIEW_PB11MP_FLASH0_SIZE SZ_64M
53#define REALVIEW_PB11MP_FLASH1_BASE 0x44000000
54#define REALVIEW_PB11MP_FLASH1_SIZE SZ_64M
55#define REALVIEW_PB11MP_ETH_BASE 0x4E000000 /* Ethernet */
56#define REALVIEW_PB11MP_USB_BASE 0x4F000000 /* USB */
57#define REALVIEW_PB11MP_GIC_DIST_BASE 0x1E001000 /* Generic interrupt controller distributor */
58#define REALVIEW_PB11MP_LT_BASE 0xC0000000 /* Logic Tile expansion */
59#define REALVIEW_PB11MP_SDRAM6_BASE 0x70000000 /* SDRAM bank 6 256MB */
60#define REALVIEW_PB11MP_SDRAM7_BASE 0x80000000 /* SDRAM bank 7 256MB */
61
62#define REALVIEW_PB11MP_SYS_PLD_CTRL1 0x74
63
64/*
65 * PB11MPCore PCI regions
66 */
67#define REALVIEW_PB11MP_PCI_BASE 0x90040000 /* PCI-X Unit base */
68#define REALVIEW_PB11MP_PCI_IO_BASE 0x90050000 /* IO Region on AHB */
69#define REALVIEW_PB11MP_PCI_MEM_BASE 0xA0000000 /* MEM Region on AHB */
70
71#define REALVIEW_PB11MP_PCI_BASE_SIZE 0x10000 /* 16 Kb */
72#define REALVIEW_PB11MP_PCI_IO_SIZE 0x1000 /* 4 Kb */
73#define REALVIEW_PB11MP_PCI_MEM_SIZE 0x20000000 /* 512 MB */
74
75/*
76 * Testchip peripheral and fpga gic regions
77 */
78#define REALVIEW_TC11MP_SCU_BASE 0x1F000000 /* IRQ, Test chip */
79#define REALVIEW_TC11MP_GIC_CPU_BASE 0x1F000100 /* Test chip interrupt controller CPU interface */
80#define REALVIEW_TC11MP_TWD_BASE 0x1F000700
81#define REALVIEW_TC11MP_TWD_SIZE 0x00000100
82#define REALVIEW_TC11MP_GIC_DIST_BASE 0x1F001000 /* Test chip interrupt controller distributor */
83#define REALVIEW_TC11MP_L220_BASE 0x1F002000 /* L220 registers */
84
85/*
86 * Irqs
87 */
88#define IRQ_TC11MP_GIC_START 32
89#define IRQ_PB11MP_GIC_START 64
90
91/*
92 * ARM11MPCore test chip interrupt sources (primary GIC on the test chip)
93 */
94#define IRQ_TC11MP_AACI (IRQ_TC11MP_GIC_START + 0)
95#define IRQ_TC11MP_TIMER0_1 (IRQ_TC11MP_GIC_START + 1)
96#define IRQ_TC11MP_TIMER2_3 (IRQ_TC11MP_GIC_START + 2)
97#define IRQ_TC11MP_USB (IRQ_TC11MP_GIC_START + 3)
98#define IRQ_TC11MP_UART0 (IRQ_TC11MP_GIC_START + 4)
99#define IRQ_TC11MP_UART1 (IRQ_TC11MP_GIC_START + 5)
100#define IRQ_TC11MP_RTC (IRQ_TC11MP_GIC_START + 6)
101#define IRQ_TC11MP_KMI0 (IRQ_TC11MP_GIC_START + 7)
102#define IRQ_TC11MP_KMI1 (IRQ_TC11MP_GIC_START + 8)
103#define IRQ_TC11MP_ETH (IRQ_TC11MP_GIC_START + 9)
104#define IRQ_TC11MP_PB_IRQ1 (IRQ_TC11MP_GIC_START + 10) /* main GIC */
105#define IRQ_TC11MP_PB_IRQ2 (IRQ_TC11MP_GIC_START + 11) /* tile GIC */
106#define IRQ_TC11MP_PB_FIQ1 (IRQ_TC11MP_GIC_START + 12) /* main GIC */
107#define IRQ_TC11MP_PB_FIQ2 (IRQ_TC11MP_GIC_START + 13) /* tile GIC */
108#define IRQ_TC11MP_MMCI0A (IRQ_TC11MP_GIC_START + 14)
109#define IRQ_TC11MP_MMCI0B (IRQ_TC11MP_GIC_START + 15)
110
111#define IRQ_TC11MP_PMU_CPU0 (IRQ_TC11MP_GIC_START + 17)
112#define IRQ_TC11MP_PMU_CPU1 (IRQ_TC11MP_GIC_START + 18)
113#define IRQ_TC11MP_PMU_CPU2 (IRQ_TC11MP_GIC_START + 19)
114#define IRQ_TC11MP_PMU_CPU3 (IRQ_TC11MP_GIC_START + 20)
115#define IRQ_TC11MP_PMU_SCU0 (IRQ_TC11MP_GIC_START + 21)
116#define IRQ_TC11MP_PMU_SCU1 (IRQ_TC11MP_GIC_START + 22)
117#define IRQ_TC11MP_PMU_SCU2 (IRQ_TC11MP_GIC_START + 23)
118#define IRQ_TC11MP_PMU_SCU3 (IRQ_TC11MP_GIC_START + 24)
119#define IRQ_TC11MP_PMU_SCU4 (IRQ_TC11MP_GIC_START + 25)
120#define IRQ_TC11MP_PMU_SCU5 (IRQ_TC11MP_GIC_START + 26)
121#define IRQ_TC11MP_PMU_SCU6 (IRQ_TC11MP_GIC_START + 27)
122#define IRQ_TC11MP_PMU_SCU7 (IRQ_TC11MP_GIC_START + 28)
123
124#define IRQ_TC11MP_L220_EVENT (IRQ_TC11MP_GIC_START + 29)
125#define IRQ_TC11MP_L220_SLAVE (IRQ_TC11MP_GIC_START + 30)
126#define IRQ_TC11MP_L220_DECODE (IRQ_TC11MP_GIC_START + 31)
127
128/*
129 * RealView PB11MPCore GIC interrupt sources (secondary GIC on the board)
130 */
131#define IRQ_PB11MP_WATCHDOG (IRQ_PB11MP_GIC_START + 0) /* Watchdog timer */
132#define IRQ_PB11MP_SOFT (IRQ_PB11MP_GIC_START + 1) /* Software interrupt */
133#define IRQ_PB11MP_COMMRx (IRQ_PB11MP_GIC_START + 2) /* Debug Comm Rx interrupt */
134#define IRQ_PB11MP_COMMTx (IRQ_PB11MP_GIC_START + 3) /* Debug Comm Tx interrupt */
135#define IRQ_PB11MP_GPIO0 (IRQ_PB11MP_GIC_START + 6) /* GPIO 0 */
136#define IRQ_PB11MP_GPIO1 (IRQ_PB11MP_GIC_START + 7) /* GPIO 1 */
137#define IRQ_PB11MP_GPIO2 (IRQ_PB11MP_GIC_START + 8) /* GPIO 2 */
138 /* 9 reserved */
139#define IRQ_PB11MP_RTC_GIC1 (IRQ_PB11MP_GIC_START + 10) /* Real Time Clock */
140#define IRQ_PB11MP_SSP (IRQ_PB11MP_GIC_START + 11) /* Synchronous Serial Port */
141#define IRQ_PB11MP_UART0_GIC1 (IRQ_PB11MP_GIC_START + 12) /* UART 0 on development chip */
142#define IRQ_PB11MP_UART1_GIC1 (IRQ_PB11MP_GIC_START + 13) /* UART 1 on development chip */
143#define IRQ_PB11MP_UART2 (IRQ_PB11MP_GIC_START + 14) /* UART 2 on development chip */
144#define IRQ_PB11MP_UART3 (IRQ_PB11MP_GIC_START + 15) /* UART 3 on development chip */
145#define IRQ_PB11MP_SCI (IRQ_PB11MP_GIC_START + 16) /* Smart Card Interface */
146#define IRQ_PB11MP_MMCI0A_GIC1 (IRQ_PB11MP_GIC_START + 17) /* Multimedia Card 0A */
147#define IRQ_PB11MP_MMCI0B_GIC1 (IRQ_PB11MP_GIC_START + 18) /* Multimedia Card 0B */
148#define IRQ_PB11MP_AACI_GIC1 (IRQ_PB11MP_GIC_START + 19) /* Audio Codec */
149#define IRQ_PB11MP_KMI0_GIC1 (IRQ_PB11MP_GIC_START + 20) /* Keyboard/Mouse port 0 */
150#define IRQ_PB11MP_KMI1_GIC1 (IRQ_PB11MP_GIC_START + 21) /* Keyboard/Mouse port 1 */
151#define IRQ_PB11MP_CHARLCD (IRQ_PB11MP_GIC_START + 22) /* Character LCD */
152#define IRQ_PB11MP_CLCD (IRQ_PB11MP_GIC_START + 23) /* CLCD controller */
153#define IRQ_PB11MP_DMAC (IRQ_PB11MP_GIC_START + 24) /* DMA controller */
154#define IRQ_PB11MP_PWRFAIL (IRQ_PB11MP_GIC_START + 25) /* Power failure */
155#define IRQ_PB11MP_PISMO (IRQ_PB11MP_GIC_START + 26) /* PISMO interface */
156#define IRQ_PB11MP_DoC (IRQ_PB11MP_GIC_START + 27) /* Disk on Chip memory controller */
157#define IRQ_PB11MP_ETH_GIC1 (IRQ_PB11MP_GIC_START + 28) /* Ethernet controller */
158#define IRQ_PB11MP_USB_GIC1 (IRQ_PB11MP_GIC_START + 29) /* USB controller */
159#define IRQ_PB11MP_TSPEN (IRQ_PB11MP_GIC_START + 30) /* Touchscreen pen */
160#define IRQ_PB11MP_TSKPAD (IRQ_PB11MP_GIC_START + 31) /* Touchscreen keypad */
161
162#define IRQ_PB11MP_SMC -1
163#define IRQ_PB11MP_SCTL -1
164
165#define NR_GIC_PB11MP 2
166
167/*
168 * Only define NR_IRQS if less than NR_IRQS_PB11MP
169 */
170#define NR_IRQS_PB11MP (IRQ_TC11MP_GIC_START + 96)
171
172#if defined(CONFIG_MACH_REALVIEW_PB11MP)
173
174#if !defined(NR_IRQS) || (NR_IRQS < NR_IRQS_PB11MP)
175#undef NR_IRQS
176#define NR_IRQS NR_IRQS_PB11MP
177#endif
178
179#if !defined(MAX_GIC_NR) || (MAX_GIC_NR < NR_GIC_PB11MP)
180#undef MAX_GIC_NR
181#define MAX_GIC_NR NR_GIC_PB11MP
182#endif
183
184#endif /* CONFIG_MACH_REALVIEW_PB11MP */
185
186#endif /* __ASM_ARCH_BOARD_PB11MP_H */
diff --git a/include/asm-arm/arch-realview/debug-macro.S b/include/asm-arm/arch-realview/debug-macro.S
deleted file mode 100644
index c8c860c3c26e..000000000000
--- a/include/asm-arm/arch-realview/debug-macro.S
+++ /dev/null
@@ -1,22 +0,0 @@
1/* linux/include/asm-arm/arch-realview/debug-macro.S
2 *
3 * Debugging macro include header
4 *
5 * Copyright (C) 1994-1999 Russell King
6 * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 *
12*/
13
14 .macro addruart,rx
15 mrc p15, 0, \rx, c1, c0
16 tst \rx, #1 @ MMU enabled?
17 moveq \rx, #0x10000000
18 movne \rx, #0xf0000000 @ virtual base
19 orr \rx, \rx, #0x00009000
20 .endm
21
22#include <asm/hardware/debug-pl01x.S>
diff --git a/include/asm-arm/arch-realview/dma.h b/include/asm-arm/arch-realview/dma.h
deleted file mode 100644
index 8342e3f9d6ec..000000000000
--- a/include/asm-arm/arch-realview/dma.h
+++ /dev/null
@@ -1,20 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-realview/dma.h
3 *
4 * Copyright (C) 2003 ARM Limited.
5 * Copyright (C) 1997,1998 Russell King
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
diff --git a/include/asm-arm/arch-realview/entry-macro.S b/include/asm-arm/arch-realview/entry-macro.S
deleted file mode 100644
index cd26306d8e57..000000000000
--- a/include/asm-arm/arch-realview/entry-macro.S
+++ /dev/null
@@ -1,81 +0,0 @@
1/*
2 * include/asm-arm/arch-realview/entry-macro.S
3 *
4 * Low-level IRQ helper macros for RealView platforms
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10#include <asm/hardware.h>
11#include <asm/hardware/gic.h>
12
13 .macro disable_fiq
14 .endm
15
16 .macro get_irqnr_preamble, base, tmp
17 ldr \base, =gic_cpu_base_addr
18 ldr \base, [\base]
19 .endm
20
21 .macro arch_ret_to_user, tmp1, tmp2
22 .endm
23
24 /*
25 * The interrupt numbering scheme is defined in the
26 * interrupt controller spec. To wit:
27 *
28 * Interrupts 0-15 are IPI
29 * 16-28 are reserved
30 * 29-31 are local. We allow 30 to be used for the watchdog.
31 * 32-1020 are global
32 * 1021-1022 are reserved
33 * 1023 is "spurious" (no interrupt)
34 *
35 * For now, we ignore all local interrupts so only return an interrupt if it's
36 * between 30 and 1020. The test_for_ipi routine below will pick up on IPIs.
37 *
38 * A simple read from the controller will tell us the number of the highest
39 * priority enabled interrupt. We then just need to check whether it is in the
40 * valid range for an IRQ (30-1020 inclusive).
41 */
42
43 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
44
45 ldr \irqstat, [\base, #GIC_CPU_INTACK] /* bits 12-10 = src CPU, 9-0 = int # */
46
47 ldr \tmp, =1021
48
49 bic \irqnr, \irqstat, #0x1c00
50
51 cmp \irqnr, #29
52 cmpcc \irqnr, \irqnr
53 cmpne \irqnr, \tmp
54 cmpcs \irqnr, \irqnr
55
56 .endm
57
58 /* We assume that irqstat (the raw value of the IRQ acknowledge
59 * register) is preserved from the macro above.
60 * If there is an IPI, we immediately signal end of interrupt on the
61 * controller, since this requires the original irqstat value which
62 * we won't easily be able to recreate later.
63 */
64
65 .macro test_for_ipi, irqnr, irqstat, base, tmp
66 bic \irqnr, \irqstat, #0x1c00
67 cmp \irqnr, #16
68 strcc \irqstat, [\base, #GIC_CPU_EOI]
69 cmpcs \irqnr, \irqnr
70 .endm
71
72 /* As above, this assumes that irqstat and base are preserved.. */
73
74 .macro test_for_ltirq, irqnr, irqstat, base, tmp
75 bic \irqnr, \irqstat, #0x1c00
76 mov \tmp, #0
77 cmp \irqnr, #29
78 moveq \tmp, #1
79 streq \irqstat, [\base, #GIC_CPU_EOI]
80 cmp \tmp, #0
81 .endm
diff --git a/include/asm-arm/arch-realview/hardware.h b/include/asm-arm/arch-realview/hardware.h
deleted file mode 100644
index 1ee8313ceb6a..000000000000
--- a/include/asm-arm/arch-realview/hardware.h
+++ /dev/null
@@ -1,31 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-realview/hardware.h
3 *
4 * This file contains the hardware definitions of the RealView boards.
5 *
6 * Copyright (C) 2003 ARM Limited.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 */
22#ifndef __ASM_ARCH_HARDWARE_H
23#define __ASM_ARCH_HARDWARE_H
24
25#include <asm/sizes.h>
26
27/* macro to get at IO space when running virtually */
28#define IO_ADDRESS(x) (((x) & 0x0fffffff) + 0xf0000000)
29#define __io_address(n) __io(IO_ADDRESS(n))
30
31#endif
diff --git a/include/asm-arm/arch-realview/io.h b/include/asm-arm/arch-realview/io.h
deleted file mode 100644
index c70f1dfbe135..000000000000
--- a/include/asm-arm/arch-realview/io.h
+++ /dev/null
@@ -1,33 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-realview/io.h
3 *
4 * Copyright (C) 2003 ARM Limited
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20#ifndef __ASM_ARM_ARCH_IO_H
21#define __ASM_ARM_ARCH_IO_H
22
23#define IO_SPACE_LIMIT 0xffffffff
24
25static inline void __iomem *__io(unsigned long addr)
26{
27 return (void __iomem *)addr;
28}
29
30#define __io(a) __io(a)
31#define __mem_pci(a) (a)
32
33#endif
diff --git a/include/asm-arm/arch-realview/irqs.h b/include/asm-arm/arch-realview/irqs.h
deleted file mode 100644
index ccbac59235c6..000000000000
--- a/include/asm-arm/arch-realview/irqs.h
+++ /dev/null
@@ -1,38 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-realview/irqs.h
3 *
4 * Copyright (C) 2003 ARM Limited
5 * Copyright (C) 2000 Deep Blue Solutions Ltd.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
21
22#ifndef __ASM_ARCH_IRQS_H
23#define __ASM_ARCH_IRQS_H
24
25#include <asm/arch/board-eb.h>
26#include <asm/arch/board-pb11mp.h>
27#include <asm/arch/board-pb1176.h>
28
29#define IRQ_LOCALTIMER 29
30#define IRQ_LOCALWDOG 30
31
32#define IRQ_GIC_START 32
33
34#ifndef NR_IRQS
35#error "NR_IRQS not defined by the board-specific files"
36#endif
37
38#endif
diff --git a/include/asm-arm/arch-realview/memory.h b/include/asm-arm/arch-realview/memory.h
deleted file mode 100644
index ed370abb638f..000000000000
--- a/include/asm-arm/arch-realview/memory.h
+++ /dev/null
@@ -1,38 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-realview/memory.h
3 *
4 * Copyright (C) 2003 ARM Limited
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20#ifndef __ASM_ARCH_MEMORY_H
21#define __ASM_ARCH_MEMORY_H
22
23/*
24 * Physical DRAM offset.
25 */
26#define PHYS_OFFSET UL(0x00000000)
27
28/*
29 * Virtual view <-> DMA view memory address translations
30 * virt_to_bus: Used to translate the virtual address to an
31 * address suitable to be passed to set_dma_addr
32 * bus_to_virt: Used to convert an address for DMA operations
33 * to an address that the kernel can use.
34 */
35#define __virt_to_bus(x) ((x) - PAGE_OFFSET)
36#define __bus_to_virt(x) ((x) + PAGE_OFFSET)
37
38#endif
diff --git a/include/asm-arm/arch-realview/platform.h b/include/asm-arm/arch-realview/platform.h
deleted file mode 100644
index 424c0aaf46a0..000000000000
--- a/include/asm-arm/arch-realview/platform.h
+++ /dev/null
@@ -1,293 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-realview/platform.h
3 *
4 * Copyright (c) ARM Limited 2003. All rights reserved.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20
21#ifndef __ASM_ARCH_PLATFORM_H
22#define __ASM_ARCH_PLATFORM_H
23
24/*
25 * Memory definitions
26 */
27#define REALVIEW_BOOT_ROM_LO 0x30000000 /* DoC Base (64Mb)...*/
28#define REALVIEW_BOOT_ROM_HI 0x30000000
29#define REALVIEW_BOOT_ROM_BASE REALVIEW_BOOT_ROM_HI /* Normal position */
30#define REALVIEW_BOOT_ROM_SIZE SZ_64M
31
32#define REALVIEW_SSRAM_BASE /* REALVIEW_SSMC_BASE ? */
33#define REALVIEW_SSRAM_SIZE SZ_2M
34
35/*
36 * SDRAM
37 */
38#define REALVIEW_SDRAM_BASE 0x00000000
39
40/*
41 * Logic expansion modules
42 *
43 */
44
45
46/* ------------------------------------------------------------------------
47 * RealView Registers
48 * ------------------------------------------------------------------------
49 *
50 */
51#define REALVIEW_SYS_ID_OFFSET 0x00
52#define REALVIEW_SYS_SW_OFFSET 0x04
53#define REALVIEW_SYS_LED_OFFSET 0x08
54#define REALVIEW_SYS_OSC0_OFFSET 0x0C
55
56#define REALVIEW_SYS_OSC1_OFFSET 0x10
57#define REALVIEW_SYS_OSC2_OFFSET 0x14
58#define REALVIEW_SYS_OSC3_OFFSET 0x18
59#define REALVIEW_SYS_OSC4_OFFSET 0x1C /* OSC1 for RealView/AB */
60
61#define REALVIEW_SYS_LOCK_OFFSET 0x20
62#define REALVIEW_SYS_100HZ_OFFSET 0x24
63#define REALVIEW_SYS_CFGDATA1_OFFSET 0x28
64#define REALVIEW_SYS_CFGDATA2_OFFSET 0x2C
65#define REALVIEW_SYS_FLAGS_OFFSET 0x30
66#define REALVIEW_SYS_FLAGSSET_OFFSET 0x30
67#define REALVIEW_SYS_FLAGSCLR_OFFSET 0x34
68#define REALVIEW_SYS_NVFLAGS_OFFSET 0x38
69#define REALVIEW_SYS_NVFLAGSSET_OFFSET 0x38
70#define REALVIEW_SYS_NVFLAGSCLR_OFFSET 0x3C
71#define REALVIEW_SYS_RESETCTL_OFFSET 0x40
72#define REALVIEW_SYS_PCICTL_OFFSET 0x44
73#define REALVIEW_SYS_MCI_OFFSET 0x48
74#define REALVIEW_SYS_FLASH_OFFSET 0x4C
75#define REALVIEW_SYS_CLCD_OFFSET 0x50
76#define REALVIEW_SYS_CLCDSER_OFFSET 0x54
77#define REALVIEW_SYS_BOOTCS_OFFSET 0x58
78#define REALVIEW_SYS_24MHz_OFFSET 0x5C
79#define REALVIEW_SYS_MISC_OFFSET 0x60
80#define REALVIEW_SYS_IOSEL_OFFSET 0x70
81#define REALVIEW_SYS_PROCID_OFFSET 0x84
82#define REALVIEW_SYS_TEST_OSC0_OFFSET 0xC0
83#define REALVIEW_SYS_TEST_OSC1_OFFSET 0xC4
84#define REALVIEW_SYS_TEST_OSC2_OFFSET 0xC8
85#define REALVIEW_SYS_TEST_OSC3_OFFSET 0xCC
86#define REALVIEW_SYS_TEST_OSC4_OFFSET 0xD0
87
88#define REALVIEW_SYS_BASE 0x10000000
89#define REALVIEW_SYS_ID (REALVIEW_SYS_BASE + REALVIEW_SYS_ID_OFFSET)
90#define REALVIEW_SYS_SW (REALVIEW_SYS_BASE + REALVIEW_SYS_SW_OFFSET)
91#define REALVIEW_SYS_LED (REALVIEW_SYS_BASE + REALVIEW_SYS_LED_OFFSET)
92#define REALVIEW_SYS_OSC0 (REALVIEW_SYS_BASE + REALVIEW_SYS_OSC0_OFFSET)
93#define REALVIEW_SYS_OSC1 (REALVIEW_SYS_BASE + REALVIEW_SYS_OSC1_OFFSET)
94
95#define REALVIEW_SYS_LOCK (REALVIEW_SYS_BASE + REALVIEW_SYS_LOCK_OFFSET)
96#define REALVIEW_SYS_100HZ (REALVIEW_SYS_BASE + REALVIEW_SYS_100HZ_OFFSET)
97#define REALVIEW_SYS_CFGDATA1 (REALVIEW_SYS_BASE + REALVIEW_SYS_CFGDATA1_OFFSET)
98#define REALVIEW_SYS_CFGDATA2 (REALVIEW_SYS_BASE + REALVIEW_SYS_CFGDATA2_OFFSET)
99#define REALVIEW_SYS_FLAGS (REALVIEW_SYS_BASE + REALVIEW_SYS_FLAGS_OFFSET)
100#define REALVIEW_SYS_FLAGSSET (REALVIEW_SYS_BASE + REALVIEW_SYS_FLAGSSET_OFFSET)
101#define REALVIEW_SYS_FLAGSCLR (REALVIEW_SYS_BASE + REALVIEW_SYS_FLAGSCLR_OFFSET)
102#define REALVIEW_SYS_NVFLAGS (REALVIEW_SYS_BASE + REALVIEW_SYS_NVFLAGS_OFFSET)
103#define REALVIEW_SYS_NVFLAGSSET (REALVIEW_SYS_BASE + REALVIEW_SYS_NVFLAGSSET_OFFSET)
104#define REALVIEW_SYS_NVFLAGSCLR (REALVIEW_SYS_BASE + REALVIEW_SYS_NVFLAGSCLR_OFFSET)
105#define REALVIEW_SYS_RESETCTL (REALVIEW_SYS_BASE + REALVIEW_SYS_RESETCTL_OFFSET)
106#define REALVIEW_SYS_PCICTL (REALVIEW_SYS_BASE + REALVIEW_SYS_PCICTL_OFFSET)
107#define REALVIEW_SYS_MCI (REALVIEW_SYS_BASE + REALVIEW_SYS_MCI_OFFSET)
108#define REALVIEW_SYS_FLASH (REALVIEW_SYS_BASE + REALVIEW_SYS_FLASH_OFFSET)
109#define REALVIEW_SYS_CLCD (REALVIEW_SYS_BASE + REALVIEW_SYS_CLCD_OFFSET)
110#define REALVIEW_SYS_CLCDSER (REALVIEW_SYS_BASE + REALVIEW_SYS_CLCDSER_OFFSET)
111#define REALVIEW_SYS_BOOTCS (REALVIEW_SYS_BASE + REALVIEW_SYS_BOOTCS_OFFSET)
112#define REALVIEW_SYS_24MHz (REALVIEW_SYS_BASE + REALVIEW_SYS_24MHz_OFFSET)
113#define REALVIEW_SYS_MISC (REALVIEW_SYS_BASE + REALVIEW_SYS_MISC_OFFSET)
114#define REALVIEW_SYS_IOSEL (REALVIEW_SYS_BASE + REALVIEW_SYS_IOSEL_OFFSET)
115#define REALVIEW_SYS_PROCID (REALVIEW_SYS_BASE + REALVIEW_SYS_PROCID_OFFSET)
116#define REALVIEW_SYS_TEST_OSC0 (REALVIEW_SYS_BASE + REALVIEW_SYS_TEST_OSC0_OFFSET)
117#define REALVIEW_SYS_TEST_OSC1 (REALVIEW_SYS_BASE + REALVIEW_SYS_TEST_OSC1_OFFSET)
118#define REALVIEW_SYS_TEST_OSC2 (REALVIEW_SYS_BASE + REALVIEW_SYS_TEST_OSC2_OFFSET)
119#define REALVIEW_SYS_TEST_OSC3 (REALVIEW_SYS_BASE + REALVIEW_SYS_TEST_OSC3_OFFSET)
120#define REALVIEW_SYS_TEST_OSC4 (REALVIEW_SYS_BASE + REALVIEW_SYS_TEST_OSC4_OFFSET)
121
122/*
123 * Values for REALVIEW_SYS_RESET_CTRL
124 */
125#define REALVIEW_SYS_CTRL_RESET_CONFIGCLR 0x01
126#define REALVIEW_SYS_CTRL_RESET_CONFIGINIT 0x02
127#define REALVIEW_SYS_CTRL_RESET_DLLRESET 0x03
128#define REALVIEW_SYS_CTRL_RESET_PLLRESET 0x04
129#define REALVIEW_SYS_CTRL_RESET_POR 0x05
130#define REALVIEW_SYS_CTRL_RESET_DoC 0x06
131
132#define REALVIEW_SYS_CTRL_LED (1 << 0)
133
134
135/* ------------------------------------------------------------------------
136 * RealView control registers
137 * ------------------------------------------------------------------------
138 */
139
140/*
141 * REALVIEW_IDFIELD
142 *
143 * 31:24 = manufacturer (0x41 = ARM)
144 * 23:16 = architecture (0x08 = AHB system bus, ASB processor bus)
145 * 15:12 = FPGA (0x3 = XVC600 or XVC600E)
146 * 11:4 = build value
147 * 3:0 = revision number (0x1 = rev B (AHB))
148 */
149
150/*
151 * REALVIEW_SYS_LOCK
152 * control access to SYS_OSCx, SYS_CFGDATAx, SYS_RESETCTL,
153 * SYS_CLD, SYS_BOOTCS
154 */
155#define REALVIEW_SYS_LOCK_LOCKED (1 << 16)
156#define REALVIEW_SYS_LOCKVAL_MASK 0xFFFF /* write 0xA05F to enable write access */
157
158/*
159 * REALVIEW_SYS_FLASH
160 */
161#define REALVIEW_FLASHPROG_FLVPPEN (1 << 0) /* Enable writing to flash */
162
163/*
164 * REALVIEW_INTREG
165 * - used to acknowledge and control MMCI and UART interrupts
166 */
167#define REALVIEW_INTREG_WPROT 0x00 /* MMC protection status (no interrupt generated) */
168#define REALVIEW_INTREG_RI0 0x01 /* Ring indicator UART0 is asserted, */
169#define REALVIEW_INTREG_CARDIN 0x08 /* MMCI card in detect */
170 /* write 1 to acknowledge and clear */
171#define REALVIEW_INTREG_RI1 0x02 /* Ring indicator UART1 is asserted, */
172#define REALVIEW_INTREG_CARDINSERT 0x03 /* Signal insertion of MMC card */
173
174/*
175 * RealView common peripheral addresses
176 */
177#define REALVIEW_SCTL_BASE 0x10001000 /* System controller */
178#define REALVIEW_I2C_BASE 0x10002000 /* I2C control */
179#define REALVIEW_AACI_BASE 0x10004000 /* Audio */
180#define REALVIEW_MMCI0_BASE 0x10005000 /* MMC interface */
181#define REALVIEW_KMI0_BASE 0x10006000 /* KMI interface */
182#define REALVIEW_KMI1_BASE 0x10007000 /* KMI 2nd interface */
183#define REALVIEW_CHAR_LCD_BASE 0x10008000 /* Character LCD */
184#define REALVIEW_SCI_BASE 0x1000E000 /* Smart card controller */
185#define REALVIEW_GPIO1_BASE 0x10014000 /* GPIO port 1 */
186#define REALVIEW_GPIO2_BASE 0x10015000 /* GPIO port 2 */
187#define REALVIEW_DMC_BASE 0x10018000 /* DMC configuration */
188#define REALVIEW_DMAC_BASE 0x10030000 /* DMA controller */
189
190/* PCI space */
191#define REALVIEW_PCI_BASE 0x41000000 /* PCI Interface */
192#define REALVIEW_PCI_CFG_BASE 0x42000000
193#define REALVIEW_PCI_MEM_BASE0 0x44000000
194#define REALVIEW_PCI_MEM_BASE1 0x50000000
195#define REALVIEW_PCI_MEM_BASE2 0x60000000
196/* Sizes of above maps */
197#define REALVIEW_PCI_BASE_SIZE 0x01000000
198#define REALVIEW_PCI_CFG_BASE_SIZE 0x02000000
199#define REALVIEW_PCI_MEM_BASE0_SIZE 0x0c000000 /* 32Mb */
200#define REALVIEW_PCI_MEM_BASE1_SIZE 0x10000000 /* 256Mb */
201#define REALVIEW_PCI_MEM_BASE2_SIZE 0x10000000 /* 256Mb */
202
203#define REALVIEW_SDRAM67_BASE 0x70000000 /* SDRAM banks 6 and 7 */
204#define REALVIEW_LT_BASE 0x80000000 /* Logic Tile expansion */
205
206/*
207 * Disk on Chip
208 */
209#define REALVIEW_DOC_BASE 0x2C000000
210#define REALVIEW_DOC_SIZE (16 << 20)
211#define REALVIEW_DOC_PAGE_SIZE 512
212#define REALVIEW_DOC_TOTAL_PAGES (DOC_SIZE / PAGE_SIZE)
213
214#define ERASE_UNIT_PAGES 32
215#define START_PAGE 0x80
216
217/*
218 * LED settings, bits [7:0]
219 */
220#define REALVIEW_SYS_LED0 (1 << 0)
221#define REALVIEW_SYS_LED1 (1 << 1)
222#define REALVIEW_SYS_LED2 (1 << 2)
223#define REALVIEW_SYS_LED3 (1 << 3)
224#define REALVIEW_SYS_LED4 (1 << 4)
225#define REALVIEW_SYS_LED5 (1 << 5)
226#define REALVIEW_SYS_LED6 (1 << 6)
227#define REALVIEW_SYS_LED7 (1 << 7)
228
229#define ALL_LEDS 0xFF
230
231#define LED_BANK REALVIEW_SYS_LED
232
233/*
234 * Control registers
235 */
236#define REALVIEW_IDFIELD_OFFSET 0x0 /* RealView build information */
237#define REALVIEW_FLASHPROG_OFFSET 0x4 /* Flash devices */
238#define REALVIEW_INTREG_OFFSET 0x8 /* Interrupt control */
239#define REALVIEW_DECODE_OFFSET 0xC /* Fitted logic modules */
240
241/*
242 * Application Flash
243 *
244 */
245#define FLASH_BASE REALVIEW_FLASH_BASE
246#define FLASH_SIZE REALVIEW_FLASH_SIZE
247#define FLASH_END (FLASH_BASE + FLASH_SIZE - 1)
248#define FLASH_BLOCK_SIZE SZ_128K
249
250/*
251 * Boot Flash
252 *
253 */
254#define EPROM_BASE REALVIEW_BOOT_ROM_HI
255#define EPROM_SIZE REALVIEW_BOOT_ROM_SIZE
256#define EPROM_END (EPROM_BASE + EPROM_SIZE - 1)
257
258/*
259 * Clean base - dummy
260 *
261 */
262#define CLEAN_BASE EPROM_BASE
263
264/*
265 * System controller bit assignment
266 */
267#define REALVIEW_REFCLK 0
268#define REALVIEW_TIMCLK 1
269
270#define REALVIEW_TIMER1_EnSel 15
271#define REALVIEW_TIMER2_EnSel 17
272#define REALVIEW_TIMER3_EnSel 19
273#define REALVIEW_TIMER4_EnSel 21
274
275
276#define MAX_TIMER 2
277#define MAX_PERIOD 699050
278#define TICKS_PER_uSEC 1
279
280/*
281 * These are useconds NOT ticks.
282 *
283 */
284#define mSEC_1 1000
285#define mSEC_5 (mSEC_1 * 5)
286#define mSEC_10 (mSEC_1 * 10)
287#define mSEC_25 (mSEC_1 * 25)
288#define SEC_1 (mSEC_1 * 1000)
289
290#define REALVIEW_CSR_BASE 0x10000000
291#define REALVIEW_CSR_SIZE 0x10000000
292
293#endif /* __ASM_ARCH_PLATFORM_H */
diff --git a/include/asm-arm/arch-realview/system.h b/include/asm-arm/arch-realview/system.h
deleted file mode 100644
index 6f3d0ce0ca1e..000000000000
--- a/include/asm-arm/arch-realview/system.h
+++ /dev/null
@@ -1,51 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-realview/system.h
3 *
4 * Copyright (C) 2003 ARM Limited
5 * Copyright (C) 2000 Deep Blue Solutions Ltd
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
21#ifndef __ASM_ARCH_SYSTEM_H
22#define __ASM_ARCH_SYSTEM_H
23
24#include <asm/hardware.h>
25#include <asm/io.h>
26#include <asm/arch/platform.h>
27
28static inline void arch_idle(void)
29{
30 /*
31 * This should do all the clock switching
32 * and wait for interrupt tricks
33 */
34 cpu_do_idle();
35}
36
37static inline void arch_reset(char mode)
38{
39 void __iomem *hdr_ctrl = __io_address(REALVIEW_SYS_BASE) + REALVIEW_SYS_RESETCTL_OFFSET;
40 unsigned int val;
41
42 /*
43 * To reset, we hit the on-board reset register
44 * in the system FPGA
45 */
46 val = __raw_readl(hdr_ctrl);
47 val |= REALVIEW_SYS_CTRL_RESET_CONFIGCLR;
48 __raw_writel(val, hdr_ctrl);
49}
50
51#endif
diff --git a/include/asm-arm/arch-realview/timex.h b/include/asm-arm/arch-realview/timex.h
deleted file mode 100644
index 5b9d82d0a5e0..000000000000
--- a/include/asm-arm/arch-realview/timex.h
+++ /dev/null
@@ -1,23 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-realview/timex.h
3 *
4 * RealView architecture timex specifications
5 *
6 * Copyright (C) 2003 ARM Limited
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 */
22
23#define CLOCK_TICK_RATE (50000000 / 16)
diff --git a/include/asm-arm/arch-realview/uncompress.h b/include/asm-arm/arch-realview/uncompress.h
deleted file mode 100644
index 4c905d7a13a1..000000000000
--- a/include/asm-arm/arch-realview/uncompress.h
+++ /dev/null
@@ -1,72 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-realview/uncompress.h
3 *
4 * Copyright (C) 2003 ARM Limited
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20#include <asm/hardware.h>
21#include <asm/mach-types.h>
22
23#include <asm/arch/board-eb.h>
24#include <asm/arch/board-pb11mp.h>
25#include <asm/arch/board-pb1176.h>
26
27#define AMBA_UART_DR(base) (*(volatile unsigned char *)((base) + 0x00))
28#define AMBA_UART_LCRH(base) (*(volatile unsigned char *)((base) + 0x2c))
29#define AMBA_UART_CR(base) (*(volatile unsigned char *)((base) + 0x30))
30#define AMBA_UART_FR(base) (*(volatile unsigned char *)((base) + 0x18))
31
32/*
33 * Return the UART base address
34 */
35static inline unsigned long get_uart_base(void)
36{
37 if (machine_is_realview_eb())
38 return REALVIEW_EB_UART0_BASE;
39 else if (machine_is_realview_pb11mp())
40 return REALVIEW_PB11MP_UART0_BASE;
41 else if (machine_is_realview_pb1176())
42 return REALVIEW_PB1176_UART0_BASE;
43 else
44 return 0;
45}
46
47/*
48 * This does not append a newline
49 */
50static inline void putc(int c)
51{
52 unsigned long base = get_uart_base();
53
54 while (AMBA_UART_FR(base) & (1 << 5))
55 barrier();
56
57 AMBA_UART_DR(base) = c;
58}
59
60static inline void flush(void)
61{
62 unsigned long base = get_uart_base();
63
64 while (AMBA_UART_FR(base) & (1 << 3))
65 barrier();
66}
67
68/*
69 * nothing to do
70 */
71#define arch_decomp_setup()
72#define arch_decomp_wdog()
diff --git a/include/asm-arm/arch-realview/vmalloc.h b/include/asm-arm/arch-realview/vmalloc.h
deleted file mode 100644
index 0ad49af186af..000000000000
--- a/include/asm-arm/arch-realview/vmalloc.h
+++ /dev/null
@@ -1,21 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-realview/vmalloc.h
3 *
4 * Copyright (C) 2003 ARM Limited
5 * Copyright (C) 2000 Russell King.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
21#define VMALLOC_END (PAGE_OFFSET + 0x18000000)
diff --git a/include/asm-arm/arch-rpc/acornfb.h b/include/asm-arm/arch-rpc/acornfb.h
deleted file mode 100644
index ecb7733a0949..000000000000
--- a/include/asm-arm/arch-rpc/acornfb.h
+++ /dev/null
@@ -1,140 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-rpc/acornfb.h
3 *
4 * Copyright (C) 1999 Russell King
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * AcornFB architecture specific code
11 */
12
13#define acornfb_bandwidth(var) ((var)->pixclock * 8 / (var)->bits_per_pixel)
14
15static inline int
16acornfb_valid_pixrate(struct fb_var_screeninfo *var)
17{
18 u_long limit;
19
20 if (!var->pixclock)
21 return 0;
22
23 /*
24 * Limits below are taken from RISC OS bandwidthlimit file
25 */
26 if (current_par.using_vram) {
27 if (current_par.vram_half_sam == 2048)
28 limit = 6578;
29 else
30 limit = 13157;
31 } else {
32 limit = 26315;
33 }
34
35 return acornfb_bandwidth(var) >= limit;
36}
37
38/*
39 * Try to find the best PLL parameters for the pixel clock.
40 * This algorithm seems to give best predictable results,
41 * and produces the same values as detailed in the VIDC20
42 * data sheet.
43 */
44static inline u_int
45acornfb_vidc20_find_pll(u_int pixclk)
46{
47 u_int r, best_r = 2, best_v = 2;
48 int best_d = 0x7fffffff;
49
50 for (r = 2; r <= 32; r++) {
51 u_int rr, v, p;
52 int d;
53
54 rr = 41667 * r;
55
56 v = (rr + pixclk / 2) / pixclk;
57
58 if (v > 32 || v < 2)
59 continue;
60
61 p = (rr + v / 2) / v;
62
63 d = pixclk - p;
64
65 if (d < 0)
66 d = -d;
67
68 if (d < best_d) {
69 best_d = d;
70 best_v = v - 1;
71 best_r = r - 1;
72 }
73
74 if (d == 0)
75 break;
76 }
77
78 return best_v << 8 | best_r;
79}
80
81static inline void
82acornfb_vidc20_find_rates(struct vidc_timing *vidc,
83 struct fb_var_screeninfo *var)
84{
85 u_int div;
86
87 /* Select pixel-clock divisor to keep PLL in range */
88 div = var->pixclock / 9090; /*9921*/
89
90 /* Limit divisor */
91 if (div == 0)
92 div = 1;
93 if (div > 8)
94 div = 8;
95
96 /* Encode divisor to VIDC20 setting */
97 switch (div) {
98 case 1: vidc->control |= VIDC20_CTRL_PIX_CK; break;
99 case 2: vidc->control |= VIDC20_CTRL_PIX_CK2; break;
100 case 3: vidc->control |= VIDC20_CTRL_PIX_CK3; break;
101 case 4: vidc->control |= VIDC20_CTRL_PIX_CK4; break;
102 case 5: vidc->control |= VIDC20_CTRL_PIX_CK5; break;
103 case 6: vidc->control |= VIDC20_CTRL_PIX_CK6; break;
104 case 7: vidc->control |= VIDC20_CTRL_PIX_CK7; break;
105 case 8: vidc->control |= VIDC20_CTRL_PIX_CK8; break;
106 }
107
108 /*
109 * With VRAM, the FIFO can be set to the highest possible setting
110 * because there are no latency considerations for other memory
111 * accesses. However, in 64 bit bus mode the FIFO preload value
112 * must not be set to VIDC20_CTRL_FIFO_28 because this will let
113 * the FIFO overflow. See VIDC20 manual page 33 (6.0 Setting the
114 * FIFO preload value).
115 */
116 if (current_par.using_vram) {
117 if (current_par.vram_half_sam == 2048)
118 vidc->control |= VIDC20_CTRL_FIFO_24;
119 else
120 vidc->control |= VIDC20_CTRL_FIFO_28;
121 } else {
122 unsigned long bandwidth = acornfb_bandwidth(var);
123
124 /* Encode bandwidth as VIDC20 setting */
125 if (bandwidth > 33334) /* < 30.0MB/s */
126 vidc->control |= VIDC20_CTRL_FIFO_16;
127 else if (bandwidth > 26666) /* < 37.5MB/s */
128 vidc->control |= VIDC20_CTRL_FIFO_20;
129 else if (bandwidth > 22222) /* < 45.0MB/s */
130 vidc->control |= VIDC20_CTRL_FIFO_24;
131 else /* > 45.0MB/s */
132 vidc->control |= VIDC20_CTRL_FIFO_28;
133 }
134
135 /* Find the PLL values */
136 vidc->pll_ctl = acornfb_vidc20_find_pll(var->pixclock / div);
137}
138
139#define acornfb_default_control() (VIDC20_CTRL_PIX_VCLK)
140#define acornfb_default_econtrol() (VIDC20_ECTL_DAC | VIDC20_ECTL_REG(3))
diff --git a/include/asm-arm/arch-rpc/debug-macro.S b/include/asm-arm/arch-rpc/debug-macro.S
deleted file mode 100644
index c634c8d8f4a1..000000000000
--- a/include/asm-arm/arch-rpc/debug-macro.S
+++ /dev/null
@@ -1,25 +0,0 @@
1/* linux/include/asm-arm/arch-rpc/debug-macro.S
2 *
3 * Debugging macro include header
4 *
5 * Copyright (C) 1994-1999 Russell King
6 * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 *
12*/
13
14 .macro addruart,rx
15 mrc p15, 0, \rx, c1, c0
16 tst \rx, #1 @ MMU enabled?
17 moveq \rx, #0x03000000
18 movne \rx, #0xe0000000
19 orr \rx, \rx, #0x00010000
20 orr \rx, \rx, #0x00000fe0
21 .endm
22
23#define UART_SHIFT 2
24#define FLOW_CONTROL
25#include <asm/hardware/debug-8250.S>
diff --git a/include/asm-arm/arch-rpc/dma.h b/include/asm-arm/arch-rpc/dma.h
deleted file mode 100644
index d24a27e30b93..000000000000
--- a/include/asm-arm/arch-rpc/dma.h
+++ /dev/null
@@ -1,33 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-rpc/dma.h
3 *
4 * Copyright (C) 1997 Russell King
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10#ifndef __ASM_ARCH_DMA_H
11#define __ASM_ARCH_DMA_H
12
13/*
14 * This is the maximum DMA address that can be DMAd to.
15 * There should not be more than (0xd0000000 - 0xc0000000)
16 * bytes of RAM.
17 */
18#define MAX_DMA_ADDRESS 0xd0000000
19#define MAX_DMA_CHANNELS 8
20
21#define DMA_0 0
22#define DMA_1 1
23#define DMA_2 2
24#define DMA_3 3
25#define DMA_S0 4
26#define DMA_S1 5
27#define DMA_VIRTUAL_FLOPPY 6
28#define DMA_VIRTUAL_SOUND 7
29
30#define DMA_FLOPPY DMA_VIRTUAL_FLOPPY
31
32#endif /* _ASM_ARCH_DMA_H */
33
diff --git a/include/asm-arm/arch-rpc/entry-macro.S b/include/asm-arm/arch-rpc/entry-macro.S
deleted file mode 100644
index 038b761fdadc..000000000000
--- a/include/asm-arm/arch-rpc/entry-macro.S
+++ /dev/null
@@ -1,16 +0,0 @@
1#include <asm/hardware.h>
2#include <asm/hardware/entry-macro-iomd.S>
3
4 .equ ioc_base_high, IOC_BASE & 0xff000000
5 .equ ioc_base_low, IOC_BASE & 0x00ff0000
6
7 .macro get_irqnr_preamble, base, tmp
8 mov \base, #ioc_base_high @ point at IOC
9 .if ioc_base_low
10 orr \base, \base, #ioc_base_low
11 .endif
12 .endm
13
14 .macro arch_ret_to_user, tmp1, tmp2
15 .endm
16
diff --git a/include/asm-arm/arch-rpc/hardware.h b/include/asm-arm/arch-rpc/hardware.h
deleted file mode 100644
index 7480f4e8d974..000000000000
--- a/include/asm-arm/arch-rpc/hardware.h
+++ /dev/null
@@ -1,83 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-rpc/hardware.h
3 *
4 * Copyright (C) 1996-1999 Russell King.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * This file contains the hardware definitions of the RiscPC series machines.
11 */
12#ifndef __ASM_ARCH_HARDWARE_H
13#define __ASM_ARCH_HARDWARE_H
14
15#include <asm/arch/memory.h>
16
17#ifndef __ASSEMBLY__
18#define IOMEM(x) ((void __iomem *)(unsigned long)(x))
19#else
20#define IOMEM(x) x
21#endif /* __ASSEMBLY__ */
22
23/*
24 * What hardware must be present
25 */
26#define HAS_IOMD
27#define HAS_VIDC20
28
29/* Hardware addresses of major areas.
30 * *_START is the physical address
31 * *_SIZE is the size of the region
32 * *_BASE is the virtual address
33 */
34#define RAM_SIZE 0x10000000
35#define RAM_START 0x10000000
36
37#define EASI_SIZE 0x08000000 /* EASI I/O */
38#define EASI_START 0x08000000
39#define EASI_BASE 0xe5000000
40
41#define IO_START 0x03000000 /* I/O */
42#define IO_SIZE 0x01000000
43#define IO_BASE IOMEM(0xe0000000)
44
45#define SCREEN_START 0x02000000 /* VRAM */
46#define SCREEN_END 0xdfc00000
47#define SCREEN_BASE 0xdf800000
48
49#define UNCACHEABLE_ADDR 0xdf010000
50
51/*
52 * IO Addresses
53 */
54#define VIDC_BASE IOMEM(0xe0400000)
55#define EXPMASK_BASE 0xe0360000
56#define IOMD_BASE IOMEM(0xe0200000)
57#define IOC_BASE IOMEM(0xe0200000)
58#define PCIO_BASE IOMEM(0xe0010000)
59#define FLOPPYDMA_BASE IOMEM(0xe002a000)
60
61#define vidc_writel(val) __raw_writel(val, VIDC_BASE)
62
63#define IO_EC_EASI_BASE 0x81400000
64#define IO_EC_IOC4_BASE 0x8009c000
65#define IO_EC_IOC_BASE 0x80090000
66#define IO_EC_MEMC8_BASE 0x8000ac00
67#define IO_EC_MEMC_BASE 0x80000000
68
69#define NETSLOT_BASE 0x0302b000
70#define NETSLOT_SIZE 0x00001000
71
72#define PODSLOT_IOC0_BASE 0x03240000
73#define PODSLOT_IOC4_BASE 0x03270000
74#define PODSLOT_IOC_SIZE (1 << 14)
75#define PODSLOT_MEMC_BASE 0x03000000
76#define PODSLOT_MEMC_SIZE (1 << 14)
77#define PODSLOT_EASI_BASE 0x08000000
78#define PODSLOT_EASI_SIZE (1 << 24)
79
80#define EXPMASK_STATUS (EXPMASK_BASE + 0x00)
81#define EXPMASK_ENABLE (EXPMASK_BASE + 0x04)
82
83#endif
diff --git a/include/asm-arm/arch-rpc/io.h b/include/asm-arm/arch-rpc/io.h
deleted file mode 100644
index 6bd2295c0e01..000000000000
--- a/include/asm-arm/arch-rpc/io.h
+++ /dev/null
@@ -1,258 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-rpc/io.h
3 *
4 * Copyright (C) 1997 Russell King
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * Modifications:
11 * 06-Dec-1997 RMK Created.
12 */
13#ifndef __ASM_ARM_ARCH_IO_H
14#define __ASM_ARM_ARCH_IO_H
15
16#include <asm/hardware.h>
17
18#define IO_SPACE_LIMIT 0xffffffff
19
20/*
21 * GCC is totally crap at loading/storing data. We try to persuade it
22 * to do the right thing by using these whereever possible instead of
23 * the above.
24 */
25#define __arch_base_getb(b,o) \
26 ({ \
27 unsigned int __v, __r = (b); \
28 __asm__ __volatile__( \
29 "ldrb %0, [%1, %2]" \
30 : "=r" (__v) \
31 : "r" (__r), "Ir" (o)); \
32 __v; \
33 })
34
35#define __arch_base_getl(b,o) \
36 ({ \
37 unsigned int __v, __r = (b); \
38 __asm__ __volatile__( \
39 "ldr %0, [%1, %2]" \
40 : "=r" (__v) \
41 : "r" (__r), "Ir" (o)); \
42 __v; \
43 })
44
45#define __arch_base_putb(v,b,o) \
46 ({ \
47 unsigned int __r = (b); \
48 __asm__ __volatile__( \
49 "strb %0, [%1, %2]" \
50 : \
51 : "r" (v), "r" (__r), "Ir" (o));\
52 })
53
54#define __arch_base_putl(v,b,o) \
55 ({ \
56 unsigned int __r = (b); \
57 __asm__ __volatile__( \
58 "str %0, [%1, %2]" \
59 : \
60 : "r" (v), "r" (__r), "Ir" (o));\
61 })
62
63/*
64 * We use two different types of addressing - PC style addresses, and ARM
65 * addresses. PC style accesses the PC hardware with the normal PC IO
66 * addresses, eg 0x3f8 for serial#1. ARM addresses are 0x80000000+
67 * and are translated to the start of IO. Note that all addresses are
68 * shifted left!
69 */
70#define __PORT_PCIO(x) (!((x) & 0x80000000))
71
72/*
73 * Dynamic IO functions.
74 */
75static inline void __outb (unsigned int value, unsigned int port)
76{
77 unsigned long temp;
78 __asm__ __volatile__(
79 "tst %2, #0x80000000\n\t"
80 "mov %0, %4\n\t"
81 "addeq %0, %0, %3\n\t"
82 "strb %1, [%0, %2, lsl #2] @ outb"
83 : "=&r" (temp)
84 : "r" (value), "r" (port), "Ir" (PCIO_BASE - IO_BASE), "Ir" (IO_BASE)
85 : "cc");
86}
87
88static inline void __outw (unsigned int value, unsigned int port)
89{
90 unsigned long temp;
91 __asm__ __volatile__(
92 "tst %2, #0x80000000\n\t"
93 "mov %0, %4\n\t"
94 "addeq %0, %0, %3\n\t"
95 "str %1, [%0, %2, lsl #2] @ outw"
96 : "=&r" (temp)
97 : "r" (value|value<<16), "r" (port), "Ir" (PCIO_BASE - IO_BASE), "Ir" (IO_BASE)
98 : "cc");
99}
100
101static inline void __outl (unsigned int value, unsigned int port)
102{
103 unsigned long temp;
104 __asm__ __volatile__(
105 "tst %2, #0x80000000\n\t"
106 "mov %0, %4\n\t"
107 "addeq %0, %0, %3\n\t"
108 "str %1, [%0, %2, lsl #2] @ outl"
109 : "=&r" (temp)
110 : "r" (value), "r" (port), "Ir" (PCIO_BASE - IO_BASE), "Ir" (IO_BASE)
111 : "cc");
112}
113
114#define DECLARE_DYN_IN(sz,fnsuffix,instr) \
115static inline unsigned sz __in##fnsuffix (unsigned int port) \
116{ \
117 unsigned long temp, value; \
118 __asm__ __volatile__( \
119 "tst %2, #0x80000000\n\t" \
120 "mov %0, %4\n\t" \
121 "addeq %0, %0, %3\n\t" \
122 "ldr" instr " %1, [%0, %2, lsl #2] @ in" #fnsuffix \
123 : "=&r" (temp), "=r" (value) \
124 : "r" (port), "Ir" (PCIO_BASE - IO_BASE), "Ir" (IO_BASE) \
125 : "cc"); \
126 return (unsigned sz)value; \
127}
128
129static inline void __iomem *__deprecated __ioaddr(unsigned int port)
130{
131 void __iomem *ret;
132 if (__PORT_PCIO(port))
133 ret = PCIO_BASE;
134 else
135 ret = IO_BASE;
136 return ret + (port << 2);
137}
138
139#define DECLARE_IO(sz,fnsuffix,instr) \
140 DECLARE_DYN_IN(sz,fnsuffix,instr)
141
142DECLARE_IO(char,b,"b")
143DECLARE_IO(short,w,"")
144DECLARE_IO(int,l,"")
145
146#undef DECLARE_IO
147#undef DECLARE_DYN_IN
148
149/*
150 * Constant address IO functions
151 *
152 * These have to be macros for the 'J' constraint to work -
153 * +/-4096 immediate operand.
154 */
155#define __outbc(value,port) \
156({ \
157 if (__PORT_PCIO((port))) \
158 __asm__ __volatile__( \
159 "strb %0, [%1, %2] @ outbc" \
160 : : "r" (value), "r" (PCIO_BASE), "Jr" ((port) << 2)); \
161 else \
162 __asm__ __volatile__( \
163 "strb %0, [%1, %2] @ outbc" \
164 : : "r" (value), "r" (IO_BASE), "r" ((port) << 2)); \
165})
166
167#define __inbc(port) \
168({ \
169 unsigned char result; \
170 if (__PORT_PCIO((port))) \
171 __asm__ __volatile__( \
172 "ldrb %0, [%1, %2] @ inbc" \
173 : "=r" (result) : "r" (PCIO_BASE), "Jr" ((port) << 2)); \
174 else \
175 __asm__ __volatile__( \
176 "ldrb %0, [%1, %2] @ inbc" \
177 : "=r" (result) : "r" (IO_BASE), "r" ((port) << 2)); \
178 result; \
179})
180
181#define __outwc(value,port) \
182({ \
183 unsigned long __v = value; \
184 if (__PORT_PCIO((port))) \
185 __asm__ __volatile__( \
186 "str %0, [%1, %2] @ outwc" \
187 : : "r" (__v|__v<<16), "r" (PCIO_BASE), "Jr" ((port) << 2)); \
188 else \
189 __asm__ __volatile__( \
190 "str %0, [%1, %2] @ outwc" \
191 : : "r" (__v|__v<<16), "r" (IO_BASE), "r" ((port) << 2)); \
192})
193
194#define __inwc(port) \
195({ \
196 unsigned short result; \
197 if (__PORT_PCIO((port))) \
198 __asm__ __volatile__( \
199 "ldr %0, [%1, %2] @ inwc" \
200 : "=r" (result) : "r" (PCIO_BASE), "Jr" ((port) << 2)); \
201 else \
202 __asm__ __volatile__( \
203 "ldr %0, [%1, %2] @ inwc" \
204 : "=r" (result) : "r" (IO_BASE), "r" ((port) << 2)); \
205 result & 0xffff; \
206})
207
208#define __outlc(value,port) \
209({ \
210 unsigned long __v = value; \
211 if (__PORT_PCIO((port))) \
212 __asm__ __volatile__( \
213 "str %0, [%1, %2] @ outlc" \
214 : : "r" (__v), "r" (PCIO_BASE), "Jr" ((port) << 2)); \
215 else \
216 __asm__ __volatile__( \
217 "str %0, [%1, %2] @ outlc" \
218 : : "r" (__v), "r" (IO_BASE), "r" ((port) << 2)); \
219})
220
221#define __inlc(port) \
222({ \
223 unsigned long result; \
224 if (__PORT_PCIO((port))) \
225 __asm__ __volatile__( \
226 "ldr %0, [%1, %2] @ inlc" \
227 : "=r" (result) : "r" (PCIO_BASE), "Jr" ((port) << 2)); \
228 else \
229 __asm__ __volatile__( \
230 "ldr %0, [%1, %2] @ inlc" \
231 : "=r" (result) : "r" (IO_BASE), "r" ((port) << 2)); \
232 result; \
233})
234
235#define __ioaddrc(port) __ioaddr(port)
236
237#define inb(p) (__builtin_constant_p((p)) ? __inbc(p) : __inb(p))
238#define inw(p) (__builtin_constant_p((p)) ? __inwc(p) : __inw(p))
239#define inl(p) (__builtin_constant_p((p)) ? __inlc(p) : __inl(p))
240#define outb(v,p) (__builtin_constant_p((p)) ? __outbc(v,p) : __outb(v,p))
241#define outw(v,p) (__builtin_constant_p((p)) ? __outwc(v,p) : __outw(v,p))
242#define outl(v,p) (__builtin_constant_p((p)) ? __outlc(v,p) : __outl(v,p))
243#define __ioaddr(p) (__builtin_constant_p((p)) ? __ioaddr(p) : __ioaddrc(p))
244/* the following macro is deprecated */
245#define ioaddr(port) ((unsigned long)__ioaddr((port)))
246
247#define insb(p,d,l) __raw_readsb(__ioaddr(p),d,l)
248#define insw(p,d,l) __raw_readsw(__ioaddr(p),d,l)
249
250#define outsb(p,d,l) __raw_writesb(__ioaddr(p),d,l)
251#define outsw(p,d,l) __raw_writesw(__ioaddr(p),d,l)
252
253/*
254 * 1:1 mapping for ioremapped regions.
255 */
256#define __mem_pci(x) (x)
257
258#endif
diff --git a/include/asm-arm/arch-rpc/irqs.h b/include/asm-arm/arch-rpc/irqs.h
deleted file mode 100644
index 27c35b05b27d..000000000000
--- a/include/asm-arm/arch-rpc/irqs.h
+++ /dev/null
@@ -1,46 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-rpc/irqs.h
3 *
4 * Copyright (C) 1996 Russell King
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10
11#define IRQ_PRINTER 0
12#define IRQ_BATLOW 1
13#define IRQ_FLOPPYINDEX 2
14#define IRQ_VSYNCPULSE 3
15#define IRQ_POWERON 4
16#define IRQ_TIMER0 5
17#define IRQ_TIMER1 6
18#define IRQ_IMMEDIATE 7
19#define IRQ_EXPCARDFIQ 8
20#define IRQ_HARDDISK 9
21#define IRQ_SERIALPORT 10
22#define IRQ_FLOPPYDISK 12
23#define IRQ_EXPANSIONCARD 13
24#define IRQ_KEYBOARDTX 14
25#define IRQ_KEYBOARDRX 15
26
27#define IRQ_DMA0 16
28#define IRQ_DMA1 17
29#define IRQ_DMA2 18
30#define IRQ_DMA3 19
31#define IRQ_DMAS0 20
32#define IRQ_DMAS1 21
33
34#define FIQ_FLOPPYDATA 0
35#define FIQ_ECONET 2
36#define FIQ_SERIALPORT 4
37#define FIQ_EXPANSIONCARD 6
38#define FIQ_FORCE 7
39
40/*
41 * This is the offset of the FIQ "IRQ" numbers
42 */
43#define FIQ_START 64
44
45#define IRQ_TIMER IRQ_TIMER0
46
diff --git a/include/asm-arm/arch-rpc/memory.h b/include/asm-arm/arch-rpc/memory.h
deleted file mode 100644
index 303c424ce673..000000000000
--- a/include/asm-arm/arch-rpc/memory.h
+++ /dev/null
@@ -1,39 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-rpc/memory.h
3 *
4 * Copyright (C) 1996,1997,1998 Russell King.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * Changelog:
11 * 20-Oct-1996 RMK Created
12 * 31-Dec-1997 RMK Fixed definitions to reduce warnings
13 * 11-Jan-1998 RMK Uninlined to reduce hits on cache
14 * 08-Feb-1998 RMK Added __virt_to_bus and __bus_to_virt
15 * 21-Mar-1999 RMK Renamed to memory.h
16 * RMK Added TASK_SIZE and PAGE_OFFSET
17 */
18#ifndef __ASM_ARCH_MEMORY_H
19#define __ASM_ARCH_MEMORY_H
20
21/*
22 * Physical DRAM offset.
23 */
24#define PHYS_OFFSET UL(0x10000000)
25
26/*
27 * These are exactly the same on the RiscPC as the
28 * physical memory view.
29 */
30#define __virt_to_bus(x) __virt_to_phys(x)
31#define __bus_to_virt(x) __phys_to_virt(x)
32
33/*
34 * Cache flushing area - ROM
35 */
36#define FLUSH_BASE_PHYS 0x00000000
37#define FLUSH_BASE 0xdf000000
38
39#endif
diff --git a/include/asm-arm/arch-rpc/system.h b/include/asm-arm/arch-rpc/system.h
deleted file mode 100644
index 729c2ae4b513..000000000000
--- a/include/asm-arm/arch-rpc/system.h
+++ /dev/null
@@ -1,27 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-rpc/system.h
3 *
4 * Copyright (C) 1996-1999 Russell King.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10#include <asm/hardware.h>
11#include <asm/hardware/iomd.h>
12#include <asm/io.h>
13
14static inline void arch_idle(void)
15{
16 cpu_do_idle();
17}
18
19static inline void arch_reset(char mode)
20{
21 iomd_writeb(0, IOMD_ROMCR0);
22
23 /*
24 * Jump into the ROM
25 */
26 cpu_reset(0);
27}
diff --git a/include/asm-arm/arch-rpc/timex.h b/include/asm-arm/arch-rpc/timex.h
deleted file mode 100644
index ed7df64d960b..000000000000
--- a/include/asm-arm/arch-rpc/timex.h
+++ /dev/null
@@ -1,17 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-rpc/timex.h
3 *
4 * Copyright (C) 1997, 1998 Russell King
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * RiscPC architecture timex specifications
11 */
12
13/*
14 * On the RiscPC, the clock ticks at 2MHz.
15 */
16#define CLOCK_TICK_RATE 2000000
17
diff --git a/include/asm-arm/arch-rpc/uncompress.h b/include/asm-arm/arch-rpc/uncompress.h
deleted file mode 100644
index b8e29efd8c5b..000000000000
--- a/include/asm-arm/arch-rpc/uncompress.h
+++ /dev/null
@@ -1,198 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-rpc/uncompress.h
3 *
4 * Copyright (C) 1996 Russell King
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10#define VIDMEM ((char *)SCREEN_START)
11
12#include <asm/hardware.h>
13#include <asm/io.h>
14#include <asm/setup.h>
15#include <asm/page.h>
16
17int video_size_row;
18unsigned char bytes_per_char_h;
19extern unsigned long con_charconvtable[256];
20
21struct param_struct {
22 unsigned long page_size;
23 unsigned long nr_pages;
24 unsigned long ramdisk_size;
25 unsigned long mountrootrdonly;
26 unsigned long rootdev;
27 unsigned long video_num_cols;
28 unsigned long video_num_rows;
29 unsigned long video_x;
30 unsigned long video_y;
31 unsigned long memc_control_reg;
32 unsigned char sounddefault;
33 unsigned char adfsdrives;
34 unsigned char bytes_per_char_h;
35 unsigned char bytes_per_char_v;
36 unsigned long unused[256/4-11];
37};
38
39static const unsigned long palette_4[16] = {
40 0x00000000,
41 0x000000cc,
42 0x0000cc00, /* Green */
43 0x0000cccc, /* Yellow */
44 0x00cc0000, /* Blue */
45 0x00cc00cc, /* Magenta */
46 0x00cccc00, /* Cyan */
47 0x00cccccc, /* White */
48 0x00000000,
49 0x000000ff,
50 0x0000ff00,
51 0x0000ffff,
52 0x00ff0000,
53 0x00ff00ff,
54 0x00ffff00,
55 0x00ffffff
56};
57
58#define palette_setpixel(p) *(unsigned long *)(IO_START+0x00400000) = 0x10000000|((p) & 255)
59#define palette_write(v) *(unsigned long *)(IO_START+0x00400000) = 0x00000000|((v) & 0x00ffffff)
60
61/*
62 * params_phys is a linker defined symbol - see
63 * arch/arm/boot/compressed/Makefile
64 */
65extern __attribute__((pure)) struct param_struct *params(void);
66#define params (params())
67
68#ifndef STANDALONE_DEBUG
69static unsigned long video_num_cols;
70static unsigned long video_num_rows;
71static unsigned long video_x;
72static unsigned long video_y;
73static unsigned char bytes_per_char_v;
74static int white;
75
76/*
77 * This does not append a newline
78 */
79static void putc(int c)
80{
81 extern void ll_write_char(char *, char c, char white);
82 int x,y;
83 char *ptr;
84
85 x = video_x;
86 y = video_y;
87
88 if (c == '\n') {
89 if (++y >= video_num_rows)
90 y--;
91 } else if (c == '\r') {
92 x = 0;
93 } else {
94 ptr = VIDMEM + ((y*video_num_cols*bytes_per_char_v+x)*bytes_per_char_h);
95 ll_write_char(ptr, c, white);
96 if (++x >= video_num_cols) {
97 x = 0;
98 if ( ++y >= video_num_rows ) {
99 y--;
100 }
101 }
102 }
103
104 video_x = x;
105 video_y = y;
106}
107
108static inline void flush(void)
109{
110}
111
112static void error(char *x);
113
114/*
115 * Setup for decompression
116 */
117static void arch_decomp_setup(void)
118{
119 int i;
120 struct tag *t = (struct tag *)params;
121 unsigned int nr_pages = 0, page_size = PAGE_SIZE;
122
123 if (t->hdr.tag == ATAG_CORE)
124 {
125 for (; t->hdr.size; t = tag_next(t))
126 {
127 if (t->hdr.tag == ATAG_VIDEOTEXT)
128 {
129 video_num_rows = t->u.videotext.video_lines;
130 video_num_cols = t->u.videotext.video_cols;
131 bytes_per_char_h = t->u.videotext.video_points;
132 bytes_per_char_v = t->u.videotext.video_points;
133 video_x = t->u.videotext.x;
134 video_y = t->u.videotext.y;
135 }
136
137 if (t->hdr.tag == ATAG_MEM)
138 {
139 page_size = PAGE_SIZE;
140 nr_pages += (t->u.mem.size / PAGE_SIZE);
141 }
142 }
143 }
144 else
145 {
146 nr_pages = params->nr_pages;
147 page_size = params->page_size;
148 video_num_rows = params->video_num_rows;
149 video_num_cols = params->video_num_cols;
150 video_x = params->video_x;
151 video_y = params->video_y;
152 bytes_per_char_h = params->bytes_per_char_h;
153 bytes_per_char_v = params->bytes_per_char_v;
154 }
155
156 video_size_row = video_num_cols * bytes_per_char_h;
157
158 if (bytes_per_char_h == 4)
159 for (i = 0; i < 256; i++)
160 con_charconvtable[i] =
161 (i & 128 ? 1 << 0 : 0) |
162 (i & 64 ? 1 << 4 : 0) |
163 (i & 32 ? 1 << 8 : 0) |
164 (i & 16 ? 1 << 12 : 0) |
165 (i & 8 ? 1 << 16 : 0) |
166 (i & 4 ? 1 << 20 : 0) |
167 (i & 2 ? 1 << 24 : 0) |
168 (i & 1 ? 1 << 28 : 0);
169 else
170 for (i = 0; i < 16; i++)
171 con_charconvtable[i] =
172 (i & 8 ? 1 << 0 : 0) |
173 (i & 4 ? 1 << 8 : 0) |
174 (i & 2 ? 1 << 16 : 0) |
175 (i & 1 ? 1 << 24 : 0);
176
177
178 palette_setpixel(0);
179 if (bytes_per_char_h == 1) {
180 palette_write (0);
181 palette_write (0x00ffffff);
182 for (i = 2; i < 256; i++)
183 palette_write (0);
184 white = 1;
185 } else {
186 for (i = 0; i < 256; i++)
187 palette_write (i < 16 ? palette_4[i] : 0);
188 white = 7;
189 }
190
191 if (nr_pages * page_size < 4096*1024) error("<4M of mem\n");
192}
193#endif
194
195/*
196 * nothing to do
197 */
198#define arch_decomp_wdog()
diff --git a/include/asm-arm/arch-rpc/vmalloc.h b/include/asm-arm/arch-rpc/vmalloc.h
deleted file mode 100644
index 077046bb2f36..000000000000
--- a/include/asm-arm/arch-rpc/vmalloc.h
+++ /dev/null
@@ -1,10 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-rpc/vmalloc.h
3 *
4 * Copyright (C) 1997 Russell King
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10#define VMALLOC_END (PAGE_OFFSET + 0x1c000000)
diff --git a/include/asm-arm/arch-s3c2400/map.h b/include/asm-arm/arch-s3c2400/map.h
deleted file mode 100644
index 1184d907b31e..000000000000
--- a/include/asm-arm/arch-s3c2400/map.h
+++ /dev/null
@@ -1,66 +0,0 @@
1/* linux/include/asm-arm/arch-s3c2400/map.h
2 *
3 * Copyright 2003,2007 Simtec Electronics
4 * http://armlinux.simtec.co.uk/
5 * Ben Dooks <ben@simtec.co.uk>
6 *
7 * Copyright 2003, Lucas Correia Villa Real
8 *
9 * S3C2400 - Memory map definitions
10 *
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License version 2 as
13 * published by the Free Software Foundation.
14*/
15
16#define S3C2400_PA_MEMCTRL (0x14000000)
17#define S3C2400_PA_USBHOST (0x14200000)
18#define S3C2400_PA_IRQ (0x14400000)
19#define S3C2400_PA_DMA (0x14600000)
20#define S3C2400_PA_CLKPWR (0x14800000)
21#define S3C2400_PA_LCD (0x14A00000)
22#define S3C2400_PA_UART (0x15000000)
23#define S3C2400_PA_TIMER (0x15100000)
24#define S3C2400_PA_USBDEV (0x15200140)
25#define S3C2400_PA_WATCHDOG (0x15300000)
26#define S3C2400_PA_IIC (0x15400000)
27#define S3C2400_PA_IIS (0x15508000)
28#define S3C2400_PA_GPIO (0x15600000)
29#define S3C2400_PA_RTC (0x15700040)
30#define S3C2400_PA_ADC (0x15800000)
31#define S3C2400_PA_SPI (0x15900000)
32
33#define S3C2400_PA_MMC (0x15A00000)
34#define S3C2400_SZ_MMC SZ_1M
35
36/* physical addresses of all the chip-select areas */
37
38#define S3C2400_CS0 (0x00000000)
39#define S3C2400_CS1 (0x02000000)
40#define S3C2400_CS2 (0x04000000)
41#define S3C2400_CS3 (0x06000000)
42#define S3C2400_CS4 (0x08000000)
43#define S3C2400_CS5 (0x0A000000)
44#define S3C2400_CS6 (0x0C000000)
45#define S3C2400_CS7 (0x0E000000)
46
47#define S3C2400_SDRAM_PA (S3C2400_CS6)
48
49/* Use a single interface for common resources between S3C24XX cpus */
50
51#define S3C24XX_PA_IRQ S3C2400_PA_IRQ
52#define S3C24XX_PA_MEMCTRL S3C2400_PA_MEMCTRL
53#define S3C24XX_PA_USBHOST S3C2400_PA_USBHOST
54#define S3C24XX_PA_DMA S3C2400_PA_DMA
55#define S3C24XX_PA_CLKPWR S3C2400_PA_CLKPWR
56#define S3C24XX_PA_LCD S3C2400_PA_LCD
57#define S3C24XX_PA_UART S3C2400_PA_UART
58#define S3C24XX_PA_TIMER S3C2400_PA_TIMER
59#define S3C24XX_PA_USBDEV S3C2400_PA_USBDEV
60#define S3C24XX_PA_WATCHDOG S3C2400_PA_WATCHDOG
61#define S3C24XX_PA_IIC S3C2400_PA_IIC
62#define S3C24XX_PA_IIS S3C2400_PA_IIS
63#define S3C24XX_PA_GPIO S3C2400_PA_GPIO
64#define S3C24XX_PA_RTC S3C2400_PA_RTC
65#define S3C24XX_PA_ADC S3C2400_PA_ADC
66#define S3C24XX_PA_SPI S3C2400_PA_SPI
diff --git a/include/asm-arm/arch-s3c2400/memory.h b/include/asm-arm/arch-s3c2400/memory.h
deleted file mode 100644
index fb0381dde704..000000000000
--- a/include/asm-arm/arch-s3c2400/memory.h
+++ /dev/null
@@ -1,23 +0,0 @@
1/* linux/include/asm-arm/arch-s3c2400/memory.h
2 * from linux/include/asm-arm/arch-rpc/memory.h
3 *
4 * Copyright 2007 Simtec Electronics
5 * http://armlinux.simtec.co.uk/
6 * Ben Dooks <ben@simtec.co.uk>
7 *
8 * Copyright (C) 1996,1997,1998 Russell King.
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
13*/
14
15#ifndef __ASM_ARCH_MEMORY_H
16#define __ASM_ARCH_MEMORY_H
17
18#define PHYS_OFFSET UL(0x0C000000)
19
20#define __virt_to_bus(x) __virt_to_phys(x)
21#define __bus_to_virt(x) __phys_to_virt(x)
22
23#endif
diff --git a/include/asm-arm/arch-s3c2410/anubis-cpld.h b/include/asm-arm/arch-s3c2410/anubis-cpld.h
deleted file mode 100644
index 168b93fee529..000000000000
--- a/include/asm-arm/arch-s3c2410/anubis-cpld.h
+++ /dev/null
@@ -1,25 +0,0 @@
1/* linux/include/asm-arm/arch-s3c2410/anubis-cpld.h
2 *
3 * Copyright (c) 2005 Simtec Electronics
4 * http://www.simtec.co.uk/products/
5 * Ben Dooks <ben@simtec.co.uk>
6 *
7 * ANUBIS - CPLD control constants
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12*/
13
14#ifndef __ASM_ARCH_ANUBISCPLD_H
15#define __ASM_ARCH_ANUBISCPLD_H
16
17/* CTRL2 - NAND WP control, IDE Reset assert/check */
18
19#define ANUBIS_CTRL1_NANDSEL (0x3)
20
21/* IDREG - revision */
22
23#define ANUBIS_IDREG_REVMASK (0x7)
24
25#endif /* __ASM_ARCH_ANUBISCPLD_H */
diff --git a/include/asm-arm/arch-s3c2410/anubis-irq.h b/include/asm-arm/arch-s3c2410/anubis-irq.h
deleted file mode 100644
index cd77a70d45c0..000000000000
--- a/include/asm-arm/arch-s3c2410/anubis-irq.h
+++ /dev/null
@@ -1,21 +0,0 @@
1/* linux/include/asm-arm/arch-s3c2410/anubis-irq.h
2 *
3 * Copyright (c) 2005 Simtec Electronics
4 * http://www.simtec.co.uk/products/
5 * Ben Dooks <ben@simtec.co.uk>
6 *
7 * ANUBIS - IRQ Number definitions
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12*/
13
14#ifndef __ASM_ARCH_ANUBISIRQ_H
15#define __ASM_ARCH_ANUBISIRQ_H
16
17#define IRQ_IDE0 IRQ_EINT2
18#define IRQ_IDE1 IRQ_EINT3
19#define IRQ_ASIX IRQ_EINT1
20
21#endif /* __ASM_ARCH_ANUBISIRQ_H */
diff --git a/include/asm-arm/arch-s3c2410/anubis-map.h b/include/asm-arm/arch-s3c2410/anubis-map.h
deleted file mode 100644
index 830d114261da..000000000000
--- a/include/asm-arm/arch-s3c2410/anubis-map.h
+++ /dev/null
@@ -1,38 +0,0 @@
1/* linux/include/asm-arm/arch-s3c2410/anubis-map.h
2 *
3 * Copyright (c) 2005 Simtec Electronics
4 * http://www.simtec.co.uk/products/
5 * Ben Dooks <ben@simtec.co.uk>
6 *
7 * ANUBIS - Memory map definitions
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12*/
13
14/* needs arch/map.h including with this */
15
16#ifndef __ASM_ARCH_ANUBISMAP_H
17#define __ASM_ARCH_ANUBISMAP_H
18
19/* start peripherals off after the S3C2410 */
20
21#define ANUBIS_IOADDR(x) (S3C2410_ADDR((x) + 0x01800000))
22
23#define ANUBIS_PA_CPLD (S3C2410_CS1 | (1<<26))
24
25/* we put the CPLD registers next, to get them out of the way */
26
27#define ANUBIS_VA_CTRL1 ANUBIS_IOADDR(0x00000000) /* 0x01800000 */
28#define ANUBIS_PA_CTRL1 (ANUBIS_PA_CPLD)
29
30#define ANUBIS_VA_IDREG ANUBIS_IOADDR(0x00300000) /* 0x01B00000 */
31#define ANUBIS_PA_IDREG (ANUBIS_PA_CPLD + (3<<23))
32
33#define ANUBIS_IDEPRI ANUBIS_IOADDR(0x01000000)
34#define ANUBIS_IDEPRIAUX ANUBIS_IOADDR(0x01100000)
35#define ANUBIS_IDESEC ANUBIS_IOADDR(0x01200000)
36#define ANUBIS_IDESECAUX ANUBIS_IOADDR(0x01300000)
37
38#endif /* __ASM_ARCH_ANUBISMAP_H */
diff --git a/include/asm-arm/arch-s3c2410/audio.h b/include/asm-arm/arch-s3c2410/audio.h
deleted file mode 100644
index 0a6977fb5770..000000000000
--- a/include/asm-arm/arch-s3c2410/audio.h
+++ /dev/null
@@ -1,45 +0,0 @@
1/* linux/include/asm-arm/arch-s3c2410/audio.h
2 *
3 * Copyright (c) 2004-2005 Simtec Electronics
4 * http://www.simtec.co.uk/products/SWLINUX/
5 * Ben Dooks <ben@simtec.co.uk>
6 *
7 * S3C24XX - Audio platfrom_device info
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12*/
13
14#ifndef __ASM_ARCH_AUDIO_H
15#define __ASM_ARCH_AUDIO_H __FILE__
16
17/* struct s3c24xx_iis_ops
18 *
19 * called from the s3c24xx audio core to deal with the architecture
20 * or the codec's setup and control.
21 *
22 * the pointer to itself is passed through in case the caller wants to
23 * embed this in an larger structure for easy reference to it's context.
24*/
25
26struct s3c24xx_iis_ops {
27 struct module *owner;
28
29 int (*startup)(struct s3c24xx_iis_ops *me);
30 void (*shutdown)(struct s3c24xx_iis_ops *me);
31 int (*suspend)(struct s3c24xx_iis_ops *me);
32 int (*resume)(struct s3c24xx_iis_ops *me);
33
34 int (*open)(struct s3c24xx_iis_ops *me, struct snd_pcm_substream *strm);
35 int (*close)(struct s3c24xx_iis_ops *me, struct snd_pcm_substream *strm);
36 int (*prepare)(struct s3c24xx_iis_ops *me, struct snd_pcm_substream *strm, struct snd_pcm_runtime *rt);
37};
38
39struct s3c24xx_platdata_iis {
40 const char *codec_clk;
41 struct s3c24xx_iis_ops *ops;
42 int (*match_dev)(struct device *dev);
43};
44
45#endif /* __ASM_ARCH_AUDIO_H */
diff --git a/include/asm-arm/arch-s3c2410/bast-cpld.h b/include/asm-arm/arch-s3c2410/bast-cpld.h
deleted file mode 100644
index 034d2c5a47c4..000000000000
--- a/include/asm-arm/arch-s3c2410/bast-cpld.h
+++ /dev/null
@@ -1,53 +0,0 @@
1/* linux/include/asm-arm/arch-s3c2410/bast-cpld.h
2 *
3 * Copyright (c) 2003,2004 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * BAST - CPLD control constants
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11*/
12
13#ifndef __ASM_ARCH_BASTCPLD_H
14#define __ASM_ARCH_BASTCPLD_H
15
16/* CTRL1 - Audio LR routing */
17
18#define BAST_CPLD_CTRL1_LRCOFF (0x00)
19#define BAST_CPLD_CTRL1_LRCADC (0x01)
20#define BAST_CPLD_CTRL1_LRCDAC (0x02)
21#define BAST_CPLD_CTRL1_LRCARM (0x03)
22#define BAST_CPLD_CTRL1_LRMASK (0x03)
23
24/* CTRL2 - NAND WP control, IDE Reset assert/check */
25
26#define BAST_CPLD_CTRL2_WNAND (0x04)
27#define BAST_CPLD_CTLR2_IDERST (0x08)
28
29/* CTRL3 - rom write control, CPLD identity */
30
31#define BAST_CPLD_CTRL3_IDMASK (0x0e)
32#define BAST_CPLD_CTRL3_ROMWEN (0x01)
33
34/* CTRL4 - 8bit LCD interface control/status */
35
36#define BAST_CPLD_CTRL4_LLAT (0x01)
37#define BAST_CPLD_CTRL4_LCDRW (0x02)
38#define BAST_CPLD_CTRL4_LCDCMD (0x04)
39#define BAST_CPLD_CTRL4_LCDE2 (0x01)
40
41/* CTRL5 - DMA routing */
42
43#define BAST_CPLD_DMA0_PRIIDE (0<<0)
44#define BAST_CPLD_DMA0_SECIDE (1<<0)
45#define BAST_CPLD_DMA0_ISA15 (2<<0)
46#define BAST_CPLD_DMA0_ISA36 (3<<0)
47
48#define BAST_CPLD_DMA1_PRIIDE (0<<2)
49#define BAST_CPLD_DMA1_SECIDE (1<<2)
50#define BAST_CPLD_DMA1_ISA15 (2<<2)
51#define BAST_CPLD_DMA1_ISA36 (3<<2)
52
53#endif /* __ASM_ARCH_BASTCPLD_H */
diff --git a/include/asm-arm/arch-s3c2410/bast-irq.h b/include/asm-arm/arch-s3c2410/bast-irq.h
deleted file mode 100644
index 726c0466f85a..000000000000
--- a/include/asm-arm/arch-s3c2410/bast-irq.h
+++ /dev/null
@@ -1,29 +0,0 @@
1/* linux/include/asm-arm/arch-s3c2410/bast-irq.h
2 *
3 * Copyright (c) 2003,2004 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * Machine BAST - IRQ Number definitions
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11*/
12
13#ifndef __ASM_ARCH_BASTIRQ_H
14#define __ASM_ARCH_BASTIRQ_H
15
16/* irq numbers to onboard peripherals */
17
18#define IRQ_USBOC IRQ_EINT18
19#define IRQ_IDE0 IRQ_EINT16
20#define IRQ_IDE1 IRQ_EINT17
21#define IRQ_PCSERIAL1 IRQ_EINT15
22#define IRQ_PCSERIAL2 IRQ_EINT14
23#define IRQ_PCPARALLEL IRQ_EINT13
24#define IRQ_ASIX IRQ_EINT11
25#define IRQ_DM9000 IRQ_EINT10
26#define IRQ_ISA IRQ_EINT9
27#define IRQ_SMALERT IRQ_EINT8
28
29#endif /* __ASM_ARCH_BASTIRQ_H */
diff --git a/include/asm-arm/arch-s3c2410/bast-map.h b/include/asm-arm/arch-s3c2410/bast-map.h
deleted file mode 100644
index 86ac1c108db8..000000000000
--- a/include/asm-arm/arch-s3c2410/bast-map.h
+++ /dev/null
@@ -1,146 +0,0 @@
1/* linux/include/asm-arm/arch-s3c2410/bast-map.h
2 *
3 * Copyright (c) 2003,2004 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * Machine BAST - Memory map definitions
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11*/
12
13/* needs arch/map.h including with this */
14
15/* ok, we've used up to 0x13000000, now we need to find space for the
16 * peripherals that live in the nGCS[x] areas, which are quite numerous
17 * in their space. We also have the board's CPLD to find register space
18 * for.
19 */
20
21#ifndef __ASM_ARCH_BASTMAP_H
22#define __ASM_ARCH_BASTMAP_H
23
24#define BAST_IOADDR(x) (S3C2410_ADDR((x) + 0x01300000))
25
26/* we put the CPLD registers next, to get them out of the way */
27
28#define BAST_VA_CTRL1 BAST_IOADDR(0x00000000) /* 0x01300000 */
29#define BAST_PA_CTRL1 (S3C2410_CS5 | 0x7800000)
30
31#define BAST_VA_CTRL2 BAST_IOADDR(0x00100000) /* 0x01400000 */
32#define BAST_PA_CTRL2 (S3C2410_CS1 | 0x6000000)
33
34#define BAST_VA_CTRL3 BAST_IOADDR(0x00200000) /* 0x01500000 */
35#define BAST_PA_CTRL3 (S3C2410_CS1 | 0x6800000)
36
37#define BAST_VA_CTRL4 BAST_IOADDR(0x00300000) /* 0x01600000 */
38#define BAST_PA_CTRL4 (S3C2410_CS1 | 0x7000000)
39
40/* next, we have the PC104 ISA interrupt registers */
41
42#define BAST_PA_PC104_IRQREQ (S3C2410_CS5 | 0x6000000) /* 0x01700000 */
43#define BAST_VA_PC104_IRQREQ BAST_IOADDR(0x00400000)
44
45#define BAST_PA_PC104_IRQRAW (S3C2410_CS5 | 0x6800000) /* 0x01800000 */
46#define BAST_VA_PC104_IRQRAW BAST_IOADDR(0x00500000)
47
48#define BAST_PA_PC104_IRQMASK (S3C2410_CS5 | 0x7000000) /* 0x01900000 */
49#define BAST_VA_PC104_IRQMASK BAST_IOADDR(0x00600000)
50
51#define BAST_PA_LCD_RCMD1 (0x8800000)
52#define BAST_VA_LCD_RCMD1 BAST_IOADDR(0x00700000)
53
54#define BAST_PA_LCD_WCMD1 (0x8000000)
55#define BAST_VA_LCD_WCMD1 BAST_IOADDR(0x00800000)
56
57#define BAST_PA_LCD_RDATA1 (0x9800000)
58#define BAST_VA_LCD_RDATA1 BAST_IOADDR(0x00900000)
59
60#define BAST_PA_LCD_WDATA1 (0x9000000)
61#define BAST_VA_LCD_WDATA1 BAST_IOADDR(0x00A00000)
62
63#define BAST_PA_LCD_RCMD2 (0xA800000)
64#define BAST_VA_LCD_RCMD2 BAST_IOADDR(0x00B00000)
65
66#define BAST_PA_LCD_WCMD2 (0xA000000)
67#define BAST_VA_LCD_WCMD2 BAST_IOADDR(0x00C00000)
68
69#define BAST_PA_LCD_RDATA2 (0xB800000)
70#define BAST_VA_LCD_RDATA2 BAST_IOADDR(0x00D00000)
71
72#define BAST_PA_LCD_WDATA2 (0xB000000)
73#define BAST_VA_LCD_WDATA2 BAST_IOADDR(0x00E00000)
74
75
76/* 0xE0000000 contains the IO space that is split by speed and
77 * wether the access is for 8 or 16bit IO... this ensures that
78 * the correct access is made
79 *
80 * 0x10000000 of space, partitioned as so:
81 *
82 * 0x00000000 to 0x04000000 8bit, slow
83 * 0x04000000 to 0x08000000 16bit, slow
84 * 0x08000000 to 0x0C000000 16bit, net
85 * 0x0C000000 to 0x10000000 16bit, fast
86 *
87 * each of these spaces has the following in:
88 *
89 * 0x00000000 to 0x01000000 16MB ISA IO space
90 * 0x01000000 to 0x02000000 16MB ISA memory space
91 * 0x02000000 to 0x02100000 1MB IDE primary channel
92 * 0x02100000 to 0x02200000 1MB IDE primary channel aux
93 * 0x02200000 to 0x02400000 1MB IDE secondary channel
94 * 0x02300000 to 0x02400000 1MB IDE secondary channel aux
95 * 0x02400000 to 0x02500000 1MB ASIX ethernet controller
96 * 0x02500000 to 0x02600000 1MB Davicom DM9000 ethernet controller
97 * 0x02600000 to 0x02700000 1MB PC SuperIO controller
98 *
99 * the phyiscal layout of the zones are:
100 * nGCS2 - 8bit, slow
101 * nGCS3 - 16bit, slow
102 * nGCS4 - 16bit, net
103 * nGCS5 - 16bit, fast
104 */
105
106#define BAST_VA_MULTISPACE (0xE0000000)
107
108#define BAST_VA_ISAIO (BAST_VA_MULTISPACE + 0x00000000)
109#define BAST_VA_ISAMEM (BAST_VA_MULTISPACE + 0x01000000)
110#define BAST_VA_IDEPRI (BAST_VA_MULTISPACE + 0x02000000)
111#define BAST_VA_IDEPRIAUX (BAST_VA_MULTISPACE + 0x02100000)
112#define BAST_VA_IDESEC (BAST_VA_MULTISPACE + 0x02200000)
113#define BAST_VA_IDESECAUX (BAST_VA_MULTISPACE + 0x02300000)
114#define BAST_VA_ASIXNET (BAST_VA_MULTISPACE + 0x02400000)
115#define BAST_VA_DM9000 (BAST_VA_MULTISPACE + 0x02500000)
116#define BAST_VA_SUPERIO (BAST_VA_MULTISPACE + 0x02600000)
117
118#define BAST_VA_MULTISPACE (0xE0000000)
119
120#define BAST_VAM_CS2 (0x00000000)
121#define BAST_VAM_CS3 (0x04000000)
122#define BAST_VAM_CS4 (0x08000000)
123#define BAST_VAM_CS5 (0x0C000000)
124
125/* physical offset addresses for the peripherals */
126
127#define BAST_PA_ISAIO (0x00000000)
128#define BAST_PA_ASIXNET (0x01000000)
129#define BAST_PA_SUPERIO (0x01800000)
130#define BAST_PA_IDEPRI (0x02000000)
131#define BAST_PA_IDEPRIAUX (0x02800000)
132#define BAST_PA_IDESEC (0x03000000)
133#define BAST_PA_IDESECAUX (0x03800000)
134#define BAST_PA_ISAMEM (0x04000000)
135#define BAST_PA_DM9000 (0x05000000)
136
137/* some configurations for the peripherals */
138
139#define BAST_PCSIO (BAST_VA_SUPERIO + BAST_VAM_CS2)
140/* */
141
142#define BAST_ASIXNET_CS BAST_VAM_CS5
143#define BAST_IDE_CS BAST_VAM_CS5
144#define BAST_DM9000_CS BAST_VAM_CS4
145
146#endif /* __ASM_ARCH_BASTMAP_H */
diff --git a/include/asm-arm/arch-s3c2410/bast-pmu.h b/include/asm-arm/arch-s3c2410/bast-pmu.h
deleted file mode 100644
index 37a11fe54a78..000000000000
--- a/include/asm-arm/arch-s3c2410/bast-pmu.h
+++ /dev/null
@@ -1,40 +0,0 @@
1/* linux/include/asm-arm/arch-s3c2410/bast-pmu.h
2 *
3 * Copyright (c) 2003,2004 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 * Vincent Sanders <vince@simtec.co.uk>
6 *
7 * Machine BAST - Power Management chip
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12*/
13
14#ifndef __ASM_ARCH_BASTPMU_H
15#define __ASM_ARCH_BASTPMU_H "08_OCT_2004"
16
17#define BASTPMU_REG_IDENT (0x00)
18#define BASTPMU_REG_VERSION (0x01)
19#define BASTPMU_REG_DDCCTRL (0x02)
20#define BASTPMU_REG_POWER (0x03)
21#define BASTPMU_REG_RESET (0x04)
22#define BASTPMU_REG_GWO (0x05)
23#define BASTPMU_REG_WOL (0x06)
24#define BASTPMU_REG_WOR (0x07)
25#define BASTPMU_REG_UID (0x09)
26
27#define BASTPMU_EEPROM (0xC0)
28
29#define BASTPMU_EEP_UID (BASTPMU_EEPROM + 0)
30#define BASTPMU_EEP_WOL (BASTPMU_EEPROM + 8)
31#define BASTPMU_EEP_WOR (BASTPMU_EEPROM + 9)
32
33#define BASTPMU_IDENT_0 0x53
34#define BASTPMU_IDENT_1 0x42
35#define BASTPMU_IDENT_2 0x50
36#define BASTPMU_IDENT_3 0x4d
37
38#define BASTPMU_RESET_GUARD (0x55)
39
40#endif /* __ASM_ARCH_BASTPMU_H */
diff --git a/include/asm-arm/arch-s3c2410/debug-macro.S b/include/asm-arm/arch-s3c2410/debug-macro.S
deleted file mode 100644
index 89076c322726..000000000000
--- a/include/asm-arm/arch-s3c2410/debug-macro.S
+++ /dev/null
@@ -1,102 +0,0 @@
1/* linux/include/asm-arm/arch-s3c2410/debug-macro.S
2 *
3 * Debugging macro include header
4 *
5 * Copyright (C) 1994-1999 Russell King
6 * Copyright (C) 2005 Simtec Electronics
7 *
8 * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
13*/
14
15#include <asm/arch/map.h>
16#include <asm/arch/regs-gpio.h>
17#include <asm/plat-s3c/regs-serial.h>
18
19#define S3C2410_UART1_OFF (0x4000)
20#define SHIFT_2440TXF (14-9)
21
22 .macro addruart, rx
23 mrc p15, 0, \rx, c1, c0
24 tst \rx, #1
25 ldreq \rx, = S3C24XX_PA_UART
26 ldrne \rx, = S3C24XX_VA_UART
27#if CONFIG_DEBUG_S3C_UART != 0
28 add \rx, \rx, #(S3C2410_UART1_OFF * CONFIG_DEBUG_S3C_UART)
29#endif
30 .endm
31
32 .macro fifo_full_s3c24xx rd, rx
33 @ check for arm920 vs arm926. currently assume all arm926
34 @ devices have an 64 byte FIFO identical to the s3c2440
35 mrc p15, 0, \rd, c0, c0
36 and \rd, \rd, #0xff0
37 teq \rd, #0x260
38 beq 1004f
39 mrc p15, 0, \rd, c1, c0
40 tst \rd, #1
41 addeq \rd, \rx, #(S3C24XX_PA_GPIO - S3C24XX_PA_UART)
42 addne \rd, \rx, #(S3C24XX_VA_GPIO - S3C24XX_VA_UART)
43 bic \rd, \rd, #0xff000
44 ldr \rd, [ \rd, # S3C2410_GSTATUS1 - S3C2410_GPIOREG(0) ]
45 and \rd, \rd, #0x00ff0000
46 teq \rd, #0x00440000 @ is it 2440?
471004:
48 ldr \rd, [ \rx, # S3C2410_UFSTAT ]
49 moveq \rd, \rd, lsr #SHIFT_2440TXF
50 tst \rd, #S3C2410_UFSTAT_TXFULL
51 .endm
52
53 .macro fifo_full_s3c2410 rd, rx
54 ldr \rd, [ \rx, # S3C2410_UFSTAT ]
55 tst \rd, #S3C2410_UFSTAT_TXFULL
56 .endm
57
58/* fifo level reading */
59
60 .macro fifo_level_s3c24xx rd, rx
61 @ check for arm920 vs arm926. currently assume all arm926
62 @ devices have an 64 byte FIFO identical to the s3c2440
63 mrc p15, 0, \rd, c0, c0
64 and \rd, \rd, #0xff0
65 teq \rd, #0x260
66 beq 10000f
67 mrc p15, 0, \rd, c1, c0
68 tst \rd, #1
69 addeq \rd, \rx, #(S3C24XX_PA_GPIO - S3C24XX_PA_UART)
70 addne \rd, \rx, #(S3C24XX_VA_GPIO - S3C24XX_VA_UART)
71 bic \rd, \rd, #0xff000
72 ldr \rd, [ \rd, # S3C2410_GSTATUS1 - S3C2410_GPIOREG(0) ]
73 and \rd, \rd, #0x00ff0000
74 teq \rd, #0x00440000 @ is it 2440?
75
7610000:
77 ldr \rd, [ \rx, # S3C2410_UFSTAT ]
78 andne \rd, \rd, #S3C2410_UFSTAT_TXMASK
79 andeq \rd, \rd, #S3C2440_UFSTAT_TXMASK
80 .endm
81
82 .macro fifo_level_s3c2410 rd, rx
83 ldr \rd, [ \rx, # S3C2410_UFSTAT ]
84 and \rd, \rd, #S3C2410_UFSTAT_TXMASK
85 .endm
86
87/* Select the correct implementation depending on the configuration. The
88 * S3C2440 will get selected by default, as these are the most widely
89 * used variants of these
90*/
91
92#if defined(CONFIG_CPU_LLSERIAL_S3C2410_ONLY)
93#define fifo_full fifo_full_s3c2410
94#define fifo_level fifo_level_s3c2410
95#elif !defined(CONFIG_CPU_LLSERIAL_S3C2440_ONLY)
96#define fifo_full fifo_full_s3c24xx
97#define fifo_level fifo_level_s3c24xx
98#endif
99
100/* include the reset of the code which will do the work */
101
102#include <asm/plat-s3c/debug-macro.S>
diff --git a/include/asm-arm/arch-s3c2410/dma.h b/include/asm-arm/arch-s3c2410/dma.h
deleted file mode 100644
index 4f291d9b7d93..000000000000
--- a/include/asm-arm/arch-s3c2410/dma.h
+++ /dev/null
@@ -1,453 +0,0 @@
1/* linux/include/asm-arm/arch-s3c2410/dma.h
2 *
3 * Copyright (C) 2003,2004,2006 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * Samsung S3C241XX DMA support
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11*/
12
13#ifndef __ASM_ARCH_DMA_H
14#define __ASM_ARCH_DMA_H __FILE__
15
16#include <linux/sysdev.h>
17#include <asm/hardware.h>
18
19/*
20 * This is the maximum DMA address(physical address) that can be DMAd to.
21 *
22 */
23#define MAX_DMA_ADDRESS 0x40000000
24#define MAX_DMA_TRANSFER_SIZE 0x100000 /* Data Unit is half word */
25
26/* We use `virtual` dma channels to hide the fact we have only a limited
27 * number of DMA channels, and not of all of them (dependant on the device)
28 * can be attached to any DMA source. We therefore let the DMA core handle
29 * the allocation of hardware channels to clients.
30*/
31
32enum dma_ch {
33 DMACH_XD0,
34 DMACH_XD1,
35 DMACH_SDI,
36 DMACH_SPI0,
37 DMACH_SPI1,
38 DMACH_UART0,
39 DMACH_UART1,
40 DMACH_UART2,
41 DMACH_TIMER,
42 DMACH_I2S_IN,
43 DMACH_I2S_OUT,
44 DMACH_PCM_IN,
45 DMACH_PCM_OUT,
46 DMACH_MIC_IN,
47 DMACH_USB_EP1,
48 DMACH_USB_EP2,
49 DMACH_USB_EP3,
50 DMACH_USB_EP4,
51 DMACH_UART0_SRC2, /* s3c2412 second uart sources */
52 DMACH_UART1_SRC2,
53 DMACH_UART2_SRC2,
54 DMACH_UART3, /* s3c2443 has extra uart */
55 DMACH_UART3_SRC2,
56 DMACH_MAX, /* the end entry */
57};
58
59#define DMACH_LOW_LEVEL (1<<28) /* use this to specifiy hardware ch no */
60
61/* we have 4 dma channels */
62#ifndef CONFIG_CPU_S3C2443
63#define S3C2410_DMA_CHANNELS (4)
64#else
65#define S3C2410_DMA_CHANNELS (6)
66#endif
67
68/* types */
69
70enum s3c2410_dma_state {
71 S3C2410_DMA_IDLE,
72 S3C2410_DMA_RUNNING,
73 S3C2410_DMA_PAUSED
74};
75
76
77/* enum s3c2410_dma_loadst
78 *
79 * This represents the state of the DMA engine, wrt to the loaded / running
80 * transfers. Since we don't have any way of knowing exactly the state of
81 * the DMA transfers, we need to know the state to make decisions on wether
82 * we can
83 *
84 * S3C2410_DMA_NONE
85 *
86 * There are no buffers loaded (the channel should be inactive)
87 *
88 * S3C2410_DMA_1LOADED
89 *
90 * There is one buffer loaded, however it has not been confirmed to be
91 * loaded by the DMA engine. This may be because the channel is not
92 * yet running, or the DMA driver decided that it was too costly to
93 * sit and wait for it to happen.
94 *
95 * S3C2410_DMA_1RUNNING
96 *
97 * The buffer has been confirmed running, and not finisged
98 *
99 * S3C2410_DMA_1LOADED_1RUNNING
100 *
101 * There is a buffer waiting to be loaded by the DMA engine, and one
102 * currently running.
103*/
104
105enum s3c2410_dma_loadst {
106 S3C2410_DMALOAD_NONE,
107 S3C2410_DMALOAD_1LOADED,
108 S3C2410_DMALOAD_1RUNNING,
109 S3C2410_DMALOAD_1LOADED_1RUNNING,
110};
111
112enum s3c2410_dma_buffresult {
113 S3C2410_RES_OK,
114 S3C2410_RES_ERR,
115 S3C2410_RES_ABORT
116};
117
118enum s3c2410_dmasrc {
119 S3C2410_DMASRC_HW, /* source is memory */
120 S3C2410_DMASRC_MEM /* source is hardware */
121};
122
123/* enum s3c2410_chan_op
124 *
125 * operation codes passed to the DMA code by the user, and also used
126 * to inform the current channel owner of any changes to the system state
127*/
128
129enum s3c2410_chan_op {
130 S3C2410_DMAOP_START,
131 S3C2410_DMAOP_STOP,
132 S3C2410_DMAOP_PAUSE,
133 S3C2410_DMAOP_RESUME,
134 S3C2410_DMAOP_FLUSH,
135 S3C2410_DMAOP_TIMEOUT, /* internal signal to handler */
136 S3C2410_DMAOP_STARTED, /* indicate channel started */
137};
138
139/* flags */
140
141#define S3C2410_DMAF_SLOW (1<<0) /* slow, so don't worry about
142 * waiting for reloads */
143#define S3C2410_DMAF_AUTOSTART (1<<1) /* auto-start if buffer queued */
144
145/* dma buffer */
146
147struct s3c2410_dma_client {
148 char *name;
149};
150
151/* s3c2410_dma_buf_s
152 *
153 * internally used buffer structure to describe a queued or running
154 * buffer.
155*/
156
157struct s3c2410_dma_buf;
158struct s3c2410_dma_buf {
159 struct s3c2410_dma_buf *next;
160 int magic; /* magic */
161 int size; /* buffer size in bytes */
162 dma_addr_t data; /* start of DMA data */
163 dma_addr_t ptr; /* where the DMA got to [1] */
164 void *id; /* client's id */
165};
166
167/* [1] is this updated for both recv/send modes? */
168
169struct s3c2410_dma_chan;
170
171/* s3c2410_dma_cbfn_t
172 *
173 * buffer callback routine type
174*/
175
176typedef void (*s3c2410_dma_cbfn_t)(struct s3c2410_dma_chan *,
177 void *buf, int size,
178 enum s3c2410_dma_buffresult result);
179
180typedef int (*s3c2410_dma_opfn_t)(struct s3c2410_dma_chan *,
181 enum s3c2410_chan_op );
182
183struct s3c2410_dma_stats {
184 unsigned long loads;
185 unsigned long timeout_longest;
186 unsigned long timeout_shortest;
187 unsigned long timeout_avg;
188 unsigned long timeout_failed;
189};
190
191struct s3c2410_dma_map;
192
193/* struct s3c2410_dma_chan
194 *
195 * full state information for each DMA channel
196*/
197
198struct s3c2410_dma_chan {
199 /* channel state flags and information */
200 unsigned char number; /* number of this dma channel */
201 unsigned char in_use; /* channel allocated */
202 unsigned char irq_claimed; /* irq claimed for channel */
203 unsigned char irq_enabled; /* irq enabled for channel */
204 unsigned char xfer_unit; /* size of an transfer */
205
206 /* channel state */
207
208 enum s3c2410_dma_state state;
209 enum s3c2410_dma_loadst load_state;
210 struct s3c2410_dma_client *client;
211
212 /* channel configuration */
213 enum s3c2410_dmasrc source;
214 unsigned long dev_addr;
215 unsigned long load_timeout;
216 unsigned int flags; /* channel flags */
217 unsigned int hw_cfg; /* last hw config */
218
219 struct s3c24xx_dma_map *map; /* channel hw maps */
220
221 /* channel's hardware position and configuration */
222 void __iomem *regs; /* channels registers */
223 void __iomem *addr_reg; /* data address register */
224 unsigned int irq; /* channel irq */
225 unsigned long dcon; /* default value of DCON */
226
227 /* driver handles */
228 s3c2410_dma_cbfn_t callback_fn; /* buffer done callback */
229 s3c2410_dma_opfn_t op_fn; /* channel op callback */
230
231 /* stats gathering */
232 struct s3c2410_dma_stats *stats;
233 struct s3c2410_dma_stats stats_store;
234
235 /* buffer list and information */
236 struct s3c2410_dma_buf *curr; /* current dma buffer */
237 struct s3c2410_dma_buf *next; /* next buffer to load */
238 struct s3c2410_dma_buf *end; /* end of queue */
239
240 /* system device */
241 struct sys_device dev;
242};
243
244/* the currently allocated channel information */
245extern struct s3c2410_dma_chan s3c2410_chans[];
246
247/* note, we don't really use dma_device_t at the moment */
248typedef unsigned long dma_device_t;
249
250/* functions --------------------------------------------------------------- */
251
252/* s3c2410_dma_request
253 *
254 * request a dma channel exclusivley
255*/
256
257extern int s3c2410_dma_request(dmach_t channel,
258 struct s3c2410_dma_client *, void *dev);
259
260
261/* s3c2410_dma_ctrl
262 *
263 * change the state of the dma channel
264*/
265
266extern int s3c2410_dma_ctrl(dmach_t channel, enum s3c2410_chan_op op);
267
268/* s3c2410_dma_setflags
269 *
270 * set the channel's flags to a given state
271*/
272
273extern int s3c2410_dma_setflags(dmach_t channel,
274 unsigned int flags);
275
276/* s3c2410_dma_free
277 *
278 * free the dma channel (will also abort any outstanding operations)
279*/
280
281extern int s3c2410_dma_free(dmach_t channel, struct s3c2410_dma_client *);
282
283/* s3c2410_dma_enqueue
284 *
285 * place the given buffer onto the queue of operations for the channel.
286 * The buffer must be allocated from dma coherent memory, or the Dcache/WB
287 * drained before the buffer is given to the DMA system.
288*/
289
290extern int s3c2410_dma_enqueue(dmach_t channel, void *id,
291 dma_addr_t data, int size);
292
293/* s3c2410_dma_config
294 *
295 * configure the dma channel
296*/
297
298extern int s3c2410_dma_config(dmach_t channel, int xferunit, int dcon);
299
300/* s3c2410_dma_devconfig
301 *
302 * configure the device we're talking to
303*/
304
305extern int s3c2410_dma_devconfig(int channel, enum s3c2410_dmasrc source,
306 int hwcfg, unsigned long devaddr);
307
308/* s3c2410_dma_getposition
309 *
310 * get the position that the dma transfer is currently at
311*/
312
313extern int s3c2410_dma_getposition(dmach_t channel,
314 dma_addr_t *src, dma_addr_t *dest);
315
316extern int s3c2410_dma_set_opfn(dmach_t, s3c2410_dma_opfn_t rtn);
317extern int s3c2410_dma_set_buffdone_fn(dmach_t, s3c2410_dma_cbfn_t rtn);
318
319/* DMA Register definitions */
320
321#define S3C2410_DMA_DISRC (0x00)
322#define S3C2410_DMA_DISRCC (0x04)
323#define S3C2410_DMA_DIDST (0x08)
324#define S3C2410_DMA_DIDSTC (0x0C)
325#define S3C2410_DMA_DCON (0x10)
326#define S3C2410_DMA_DSTAT (0x14)
327#define S3C2410_DMA_DCSRC (0x18)
328#define S3C2410_DMA_DCDST (0x1C)
329#define S3C2410_DMA_DMASKTRIG (0x20)
330#define S3C2412_DMA_DMAREQSEL (0x24)
331#define S3C2443_DMA_DMAREQSEL (0x24)
332
333#define S3C2410_DISRCC_INC (1<<0)
334#define S3C2410_DISRCC_APB (1<<1)
335
336#define S3C2410_DMASKTRIG_STOP (1<<2)
337#define S3C2410_DMASKTRIG_ON (1<<1)
338#define S3C2410_DMASKTRIG_SWTRIG (1<<0)
339
340#define S3C2410_DCON_DEMAND (0<<31)
341#define S3C2410_DCON_HANDSHAKE (1<<31)
342#define S3C2410_DCON_SYNC_PCLK (0<<30)
343#define S3C2410_DCON_SYNC_HCLK (1<<30)
344
345#define S3C2410_DCON_INTREQ (1<<29)
346
347#define S3C2410_DCON_CH0_XDREQ0 (0<<24)
348#define S3C2410_DCON_CH0_UART0 (1<<24)
349#define S3C2410_DCON_CH0_SDI (2<<24)
350#define S3C2410_DCON_CH0_TIMER (3<<24)
351#define S3C2410_DCON_CH0_USBEP1 (4<<24)
352
353#define S3C2410_DCON_CH1_XDREQ1 (0<<24)
354#define S3C2410_DCON_CH1_UART1 (1<<24)
355#define S3C2410_DCON_CH1_I2SSDI (2<<24)
356#define S3C2410_DCON_CH1_SPI (3<<24)
357#define S3C2410_DCON_CH1_USBEP2 (4<<24)
358
359#define S3C2410_DCON_CH2_I2SSDO (0<<24)
360#define S3C2410_DCON_CH2_I2SSDI (1<<24)
361#define S3C2410_DCON_CH2_SDI (2<<24)
362#define S3C2410_DCON_CH2_TIMER (3<<24)
363#define S3C2410_DCON_CH2_USBEP3 (4<<24)
364
365#define S3C2410_DCON_CH3_UART2 (0<<24)
366#define S3C2410_DCON_CH3_SDI (1<<24)
367#define S3C2410_DCON_CH3_SPI (2<<24)
368#define S3C2410_DCON_CH3_TIMER (3<<24)
369#define S3C2410_DCON_CH3_USBEP4 (4<<24)
370
371#define S3C2410_DCON_SRCSHIFT (24)
372#define S3C2410_DCON_SRCMASK (7<<24)
373
374#define S3C2410_DCON_BYTE (0<<20)
375#define S3C2410_DCON_HALFWORD (1<<20)
376#define S3C2410_DCON_WORD (2<<20)
377
378#define S3C2410_DCON_AUTORELOAD (0<<22)
379#define S3C2410_DCON_NORELOAD (1<<22)
380#define S3C2410_DCON_HWTRIG (1<<23)
381
382#ifdef CONFIG_CPU_S3C2440
383#define S3C2440_DIDSTC_CHKINT (1<<2)
384
385#define S3C2440_DCON_CH0_I2SSDO (5<<24)
386#define S3C2440_DCON_CH0_PCMIN (6<<24)
387
388#define S3C2440_DCON_CH1_PCMOUT (5<<24)
389#define S3C2440_DCON_CH1_SDI (6<<24)
390
391#define S3C2440_DCON_CH2_PCMIN (5<<24)
392#define S3C2440_DCON_CH2_MICIN (6<<24)
393
394#define S3C2440_DCON_CH3_MICIN (5<<24)
395#define S3C2440_DCON_CH3_PCMOUT (6<<24)
396#endif
397
398#ifdef CONFIG_CPU_S3C2412
399
400#define S3C2412_DMAREQSEL_SRC(x) ((x)<<1)
401
402#define S3C2412_DMAREQSEL_HW (1)
403
404#define S3C2412_DMAREQSEL_SPI0TX S3C2412_DMAREQSEL_SRC(0)
405#define S3C2412_DMAREQSEL_SPI0RX S3C2412_DMAREQSEL_SRC(1)
406#define S3C2412_DMAREQSEL_SPI1TX S3C2412_DMAREQSEL_SRC(2)
407#define S3C2412_DMAREQSEL_SPI1RX S3C2412_DMAREQSEL_SRC(3)
408#define S3C2412_DMAREQSEL_I2STX S3C2412_DMAREQSEL_SRC(4)
409#define S3C2412_DMAREQSEL_I2SRX S3C2412_DMAREQSEL_SRC(5)
410#define S3C2412_DMAREQSEL_TIMER S3C2412_DMAREQSEL_SRC(9)
411#define S3C2412_DMAREQSEL_SDI S3C2412_DMAREQSEL_SRC(10)
412#define S3C2412_DMAREQSEL_USBEP1 S3C2412_DMAREQSEL_SRC(13)
413#define S3C2412_DMAREQSEL_USBEP2 S3C2412_DMAREQSEL_SRC(14)
414#define S3C2412_DMAREQSEL_USBEP3 S3C2412_DMAREQSEL_SRC(15)
415#define S3C2412_DMAREQSEL_USBEP4 S3C2412_DMAREQSEL_SRC(16)
416#define S3C2412_DMAREQSEL_XDREQ0 S3C2412_DMAREQSEL_SRC(17)
417#define S3C2412_DMAREQSEL_XDREQ1 S3C2412_DMAREQSEL_SRC(18)
418#define S3C2412_DMAREQSEL_UART0_0 S3C2412_DMAREQSEL_SRC(19)
419#define S3C2412_DMAREQSEL_UART0_1 S3C2412_DMAREQSEL_SRC(20)
420#define S3C2412_DMAREQSEL_UART1_0 S3C2412_DMAREQSEL_SRC(21)
421#define S3C2412_DMAREQSEL_UART1_1 S3C2412_DMAREQSEL_SRC(22)
422#define S3C2412_DMAREQSEL_UART2_0 S3C2412_DMAREQSEL_SRC(23)
423#define S3C2412_DMAREQSEL_UART2_1 S3C2412_DMAREQSEL_SRC(24)
424
425#endif
426
427#define S3C2443_DMAREQSEL_SRC(x) ((x)<<1)
428
429#define S3C2443_DMAREQSEL_HW (1)
430
431#define S3C2443_DMAREQSEL_SPI0TX S3C2443_DMAREQSEL_SRC(0)
432#define S3C2443_DMAREQSEL_SPI0RX S3C2443_DMAREQSEL_SRC(1)
433#define S3C2443_DMAREQSEL_SPI1TX S3C2443_DMAREQSEL_SRC(2)
434#define S3C2443_DMAREQSEL_SPI1RX S3C2443_DMAREQSEL_SRC(3)
435#define S3C2443_DMAREQSEL_I2STX S3C2443_DMAREQSEL_SRC(4)
436#define S3C2443_DMAREQSEL_I2SRX S3C2443_DMAREQSEL_SRC(5)
437#define S3C2443_DMAREQSEL_TIMER S3C2443_DMAREQSEL_SRC(9)
438#define S3C2443_DMAREQSEL_SDI S3C2443_DMAREQSEL_SRC(10)
439#define S3C2443_DMAREQSEL_XDREQ0 S3C2443_DMAREQSEL_SRC(17)
440#define S3C2443_DMAREQSEL_XDREQ1 S3C2443_DMAREQSEL_SRC(18)
441#define S3C2443_DMAREQSEL_UART0_0 S3C2443_DMAREQSEL_SRC(19)
442#define S3C2443_DMAREQSEL_UART0_1 S3C2443_DMAREQSEL_SRC(20)
443#define S3C2443_DMAREQSEL_UART1_0 S3C2443_DMAREQSEL_SRC(21)
444#define S3C2443_DMAREQSEL_UART1_1 S3C2443_DMAREQSEL_SRC(22)
445#define S3C2443_DMAREQSEL_UART2_0 S3C2443_DMAREQSEL_SRC(23)
446#define S3C2443_DMAREQSEL_UART2_1 S3C2443_DMAREQSEL_SRC(24)
447#define S3C2443_DMAREQSEL_UART3_0 S3C2443_DMAREQSEL_SRC(25)
448#define S3C2443_DMAREQSEL_UART3_1 S3C2443_DMAREQSEL_SRC(26)
449#define S3C2443_DMAREQSEL_PCMOUT S3C2443_DMAREQSEL_SRC(27)
450#define S3C2443_DMAREQSEL_PCMIN S3C2443_DMAREQSEL_SRC(28)
451#define S3C2443_DMAREQSEL_MICIN S3C2443_DMAREQSEL_SRC(29)
452
453#endif /* __ASM_ARCH_DMA_H */
diff --git a/include/asm-arm/arch-s3c2410/entry-macro.S b/include/asm-arm/arch-s3c2410/entry-macro.S
deleted file mode 100644
index bbec0a8ff158..000000000000
--- a/include/asm-arm/arch-s3c2410/entry-macro.S
+++ /dev/null
@@ -1,78 +0,0 @@
1/*
2 * include/asm-arm/arch-s3c2410/entry-macro.S
3 *
4 * Low-level IRQ helper macros for S3C2410-based platforms
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9*/
10
11/* We have a problem that the INTOFFSET register does not always
12 * show one interrupt. Occasionally we get two interrupts through
13 * the prioritiser, and this causes the INTOFFSET register to show
14 * what looks like the logical-or of the two interrupt numbers.
15 *
16 * Thanks to Klaus, Shannon, et al for helping to debug this problem
17*/
18
19#define INTPND (0x10)
20#define INTOFFSET (0x14)
21
22#include <asm/hardware.h>
23#include <asm/irq.h>
24
25 .macro get_irqnr_preamble, base, tmp
26 .endm
27
28 .macro arch_ret_to_user, tmp1, tmp2
29 .endm
30
31 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
32
33 mov \base, #S3C24XX_VA_IRQ
34
35 @@ try the interrupt offset register, since it is there
36
37 ldr \irqstat, [ \base, #INTPND ]
38 teq \irqstat, #0
39 beq 1002f
40 ldr \irqnr, [ \base, #INTOFFSET ]
41 mov \tmp, #1
42 tst \irqstat, \tmp, lsl \irqnr
43 bne 1001f
44
45 @@ the number specified is not a valid irq, so try
46 @@ and work it out for ourselves
47
48 mov \irqnr, #0 @@ start here
49
50 @@ work out which irq (if any) we got
51
52 movs \tmp, \irqstat, lsl#16
53 addeq \irqnr, \irqnr, #16
54 moveq \irqstat, \irqstat, lsr#16
55 tst \irqstat, #0xff
56 addeq \irqnr, \irqnr, #8
57 moveq \irqstat, \irqstat, lsr#8
58 tst \irqstat, #0xf
59 addeq \irqnr, \irqnr, #4
60 moveq \irqstat, \irqstat, lsr#4
61 tst \irqstat, #0x3
62 addeq \irqnr, \irqnr, #2
63 moveq \irqstat, \irqstat, lsr#2
64 tst \irqstat, #0x1
65 addeq \irqnr, \irqnr, #1
66
67 @@ we have the value
681001:
69 adds \irqnr, \irqnr, #IRQ_EINT0
701002:
71 @@ exit here, Z flag unset if IRQ
72
73 .endm
74
75 /* currently don't need an disable_fiq macro */
76
77 .macro disable_fiq
78 .endm
diff --git a/include/asm-arm/arch-s3c2410/fb.h b/include/asm-arm/arch-s3c2410/fb.h
deleted file mode 100644
index 5d0262601a7e..000000000000
--- a/include/asm-arm/arch-s3c2410/fb.h
+++ /dev/null
@@ -1,74 +0,0 @@
1/* linux/include/asm-arm/arch-s3c2410/fb.h
2 *
3 * Copyright (c) 2004 Arnaud Patard <arnaud.patard@rtp-net.org>
4 *
5 * Inspired by pxafb.h
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10*/
11
12#ifndef __ASM_ARM_FB_H
13#define __ASM_ARM_FB_H
14
15#include <asm/arch/regs-lcd.h>
16
17struct s3c2410fb_hw {
18 unsigned long lcdcon1;
19 unsigned long lcdcon2;
20 unsigned long lcdcon3;
21 unsigned long lcdcon4;
22 unsigned long lcdcon5;
23};
24
25/* LCD description */
26struct s3c2410fb_display {
27 /* LCD type */
28 unsigned type;
29
30 /* Screen size */
31 unsigned short width;
32 unsigned short height;
33
34 /* Screen info */
35 unsigned short xres;
36 unsigned short yres;
37 unsigned short bpp;
38
39 unsigned pixclock; /* pixclock in picoseconds */
40 unsigned short left_margin; /* value in pixels (TFT) or HCLKs (STN) */
41 unsigned short right_margin; /* value in pixels (TFT) or HCLKs (STN) */
42 unsigned short hsync_len; /* value in pixels (TFT) or HCLKs (STN) */
43 unsigned short upper_margin; /* value in lines (TFT) or 0 (STN) */
44 unsigned short lower_margin; /* value in lines (TFT) or 0 (STN) */
45 unsigned short vsync_len; /* value in lines (TFT) or 0 (STN) */
46
47 /* lcd configuration registers */
48 unsigned long lcdcon5;
49};
50
51struct s3c2410fb_mach_info {
52
53 struct s3c2410fb_display *displays; /* attached diplays info */
54 unsigned num_displays; /* number of defined displays */
55 unsigned default_display;
56
57 /* GPIOs */
58
59 unsigned long gpcup;
60 unsigned long gpcup_mask;
61 unsigned long gpccon;
62 unsigned long gpccon_mask;
63 unsigned long gpdup;
64 unsigned long gpdup_mask;
65 unsigned long gpdcon;
66 unsigned long gpdcon_mask;
67
68 /* lpc3600 control register */
69 unsigned long lpcsel;
70};
71
72extern void __init s3c24xx_fb_set_platdata(struct s3c2410fb_mach_info *);
73
74#endif /* __ASM_ARM_FB_H */
diff --git a/include/asm-arm/arch-s3c2410/gpio.h b/include/asm-arm/arch-s3c2410/gpio.h
deleted file mode 100644
index 18e10d2c35ea..000000000000
--- a/include/asm-arm/arch-s3c2410/gpio.h
+++ /dev/null
@@ -1,18 +0,0 @@
1/* linux/include/asm-arm/arch-s3c2410/gpio.h
2 *
3 * Copyright (c) 2008 Simtec Electronics
4 * http://armlinux.simtec.co.uk/
5 * Ben Dooks <ben@simtec.co.uk>
6 *
7 * S3C2410 - GPIO lib support
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12*/
13
14#define gpio_get_value __gpio_get_value
15#define gpio_set_value __gpio_set_value
16#define gpio_cansleep __gpio_cansleep
17
18#include <asm-generic/gpio.h>
diff --git a/include/asm-arm/arch-s3c2410/h1940-latch.h b/include/asm-arm/arch-s3c2410/h1940-latch.h
deleted file mode 100644
index c3de5ab102eb..000000000000
--- a/include/asm-arm/arch-s3c2410/h1940-latch.h
+++ /dev/null
@@ -1,64 +0,0 @@
1/* linux/include/asm-arm/arch-s3c2410/h1940-latch.h
2 *
3 * Copyright (c) 2005 Simtec Electronics
4 * http://armlinux.simtec.co.uk/
5 * Ben Dooks <ben@simtec.co.uk>
6 *
7 * iPAQ H1940 series - latch definitions
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12*/
13
14#ifndef __ASM_ARCH_H1940_LATCH_H
15#define __ASM_ARCH_H1940_LATCH_H
16
17
18#ifndef __ASSEMBLY__
19#define H1940_LATCH ((void __force __iomem *)0xF8000000)
20#else
21#define H1940_LATCH 0xF8000000
22#endif
23
24#define H1940_PA_LATCH (S3C2410_CS2)
25
26/* SD layer latch */
27
28#define H1940_LATCH_SDQ1 (1<<16)
29#define H1940_LATCH_LCD_P1 (1<<17)
30#define H1940_LATCH_LCD_P2 (1<<18)
31#define H1940_LATCH_LCD_P3 (1<<19)
32#define H1940_LATCH_MAX1698_nSHUTDOWN (1<<20) /* LCD backlight */
33#define H1940_LATCH_LED_RED (1<<21)
34#define H1940_LATCH_SDQ7 (1<<22)
35#define H1940_LATCH_USB_DP (1<<23)
36
37/* CPU layer latch */
38
39#define H1940_LATCH_UDA_POWER (1<<24)
40#define H1940_LATCH_AUDIO_POWER (1<<25)
41#define H1940_LATCH_SM803_ENABLE (1<<26)
42#define H1940_LATCH_LCD_P4 (1<<27)
43#define H1940_LATCH_CPUQ5 (1<<28) /* untraced */
44#define H1940_LATCH_BLUETOOTH_POWER (1<<29) /* active high */
45#define H1940_LATCH_LED_GREEN (1<<30)
46#define H1940_LATCH_LED_FLASH (1<<31)
47
48/* default settings */
49
50#define H1940_LATCH_DEFAULT \
51 H1940_LATCH_LCD_P4 | \
52 H1940_LATCH_SM803_ENABLE | \
53 H1940_LATCH_SDQ1 | \
54 H1940_LATCH_LCD_P1 | \
55 H1940_LATCH_LCD_P2 | \
56 H1940_LATCH_LCD_P3 | \
57 H1940_LATCH_MAX1698_nSHUTDOWN | \
58 H1940_LATCH_CPUQ5
59
60/* control functions */
61
62extern void h1940_latch_control(unsigned int clear, unsigned int set);
63
64#endif /* __ASM_ARCH_H1940_LATCH_H */
diff --git a/include/asm-arm/arch-s3c2410/h1940.h b/include/asm-arm/arch-s3c2410/h1940.h
deleted file mode 100644
index 6135592e60f2..000000000000
--- a/include/asm-arm/arch-s3c2410/h1940.h
+++ /dev/null
@@ -1,21 +0,0 @@
1/* linux/include/asm-arm/arch-s3c2410/h1940.h
2 *
3 * Copyright 2006 Ben Dooks <ben-linux@fluff.org>
4 *
5 * H1940 definitions
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10*/
11
12#ifndef __ASM_ARCH_H1940_H
13#define __ASM_ARCH_H1940_H
14
15#define H1940_SUSPEND_CHECKSUM (0x30003ff8)
16#define H1940_SUSPEND_RESUMEAT (0x30081000)
17#define H1940_SUSPEND_CHECK (0x30080000)
18
19extern void h1940_pm_return(void);
20
21#endif /* __ASM_ARCH_H1940_H */
diff --git a/include/asm-arm/arch-s3c2410/hardware.h b/include/asm-arm/arch-s3c2410/hardware.h
deleted file mode 100644
index 29592c3ebf22..000000000000
--- a/include/asm-arm/arch-s3c2410/hardware.h
+++ /dev/null
@@ -1,141 +0,0 @@
1/* linux/include/asm-arm/arch-s3c2410/hardware.h
2 *
3 * Copyright (c) 2003 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * S3C2410 - hardware
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11*/
12
13#ifndef __ASM_ARCH_HARDWARE_H
14#define __ASM_ARCH_HARDWARE_H
15
16#ifndef __ASM_HARDWARE_H
17#error "Do not include this directly, instead #include <asm/hardware.h>"
18#endif
19
20#ifndef __ASSEMBLY__
21
22/* external functions for GPIO support
23 *
24 * These allow various different clients to access the same GPIO
25 * registers without conflicting. If your driver only owns the entire
26 * GPIO register, then it is safe to ioremap/__raw_{read|write} to it.
27*/
28
29/* s3c2410_gpio_cfgpin
30 *
31 * set the configuration of the given pin to the value passed.
32 *
33 * eg:
34 * s3c2410_gpio_cfgpin(S3C2410_GPA0, S3C2410_GPA0_ADDR0);
35 * s3c2410_gpio_cfgpin(S3C2410_GPE8, S3C2410_GPE8_SDDAT1);
36*/
37
38extern void s3c2410_gpio_cfgpin(unsigned int pin, unsigned int function);
39
40extern unsigned int s3c2410_gpio_getcfg(unsigned int pin);
41
42/* s3c2410_gpio_getirq
43 *
44 * turn the given pin number into the corresponding IRQ number
45 *
46 * returns:
47 * < 0 = no interrupt for this pin
48 * >=0 = interrupt number for the pin
49*/
50
51extern int s3c2410_gpio_getirq(unsigned int pin);
52
53/* s3c2410_gpio_irq2pin
54 *
55 * turn the given irq number into the corresponding GPIO number
56 *
57 * returns:
58 * < 0 = no pin
59 * >=0 = gpio pin number
60*/
61
62extern int s3c2410_gpio_irq2pin(unsigned int irq);
63
64#ifdef CONFIG_CPU_S3C2400
65
66extern int s3c2400_gpio_getirq(unsigned int pin);
67
68#endif /* CONFIG_CPU_S3C2400 */
69
70/* s3c2410_gpio_irqfilter
71 *
72 * set the irq filtering on the given pin
73 *
74 * on = 0 => disable filtering
75 * 1 => enable filtering
76 *
77 * config = S3C2410_EINTFLT_PCLK or S3C2410_EINTFLT_EXTCLK orred with
78 * width of filter (0 through 63)
79 *
80 *
81*/
82
83extern int s3c2410_gpio_irqfilter(unsigned int pin, unsigned int on,
84 unsigned int config);
85
86/* s3c2410_gpio_pullup
87 *
88 * configure the pull-up control on the given pin
89 *
90 * to = 1 => disable the pull-up
91 * 0 => enable the pull-up
92 *
93 * eg;
94 *
95 * s3c2410_gpio_pullup(S3C2410_GPB0, 0);
96 * s3c2410_gpio_pullup(S3C2410_GPE8, 0);
97*/
98
99extern void s3c2410_gpio_pullup(unsigned int pin, unsigned int to);
100
101/* s3c2410_gpio_getpull
102 *
103 * Read the state of the pull-up on a given pin
104 *
105 * return:
106 * < 0 => error code
107 * 0 => enabled
108 * 1 => disabled
109*/
110
111extern int s3c2410_gpio_getpull(unsigned int pin);
112
113extern void s3c2410_gpio_setpin(unsigned int pin, unsigned int to);
114
115extern unsigned int s3c2410_gpio_getpin(unsigned int pin);
116
117extern unsigned int s3c2410_modify_misccr(unsigned int clr, unsigned int chg);
118
119#ifdef CONFIG_CPU_S3C2440
120
121extern int s3c2440_set_dsc(unsigned int pin, unsigned int value);
122
123#endif /* CONFIG_CPU_S3C2440 */
124
125#ifdef CONFIG_CPU_S3C2412
126
127extern int s3c2412_gpio_set_sleepcfg(unsigned int pin, unsigned int state);
128
129#endif /* CONFIG_CPU_S3C2412 */
130
131#endif /* __ASSEMBLY__ */
132
133#include <asm/sizes.h>
134#include <asm/arch/map.h>
135
136/* machine specific hardware definitions should go after this */
137
138/* currently here until moved into config (todo) */
139#define CONFIG_NO_MULTIWORD_IO
140
141#endif /* __ASM_ARCH_HARDWARE_H */
diff --git a/include/asm-arm/arch-s3c2410/idle.h b/include/asm-arm/arch-s3c2410/idle.h
deleted file mode 100644
index eed450608f9c..000000000000
--- a/include/asm-arm/arch-s3c2410/idle.h
+++ /dev/null
@@ -1,24 +0,0 @@
1/* linux/include/asm-arm/arch-s3c2410/idle.h
2 *
3 * Copyright (c) 2004 Simtec Electronics <linux@simtec.co.uk>
4 * http://www.simtec.co.uk/products/SWLINUX/
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * S3C2410 CPU Idle controls
11*/
12
13#ifndef __ASM_ARCH_IDLE_H
14#define __ASM_ARCH_IDLE_H __FILE__
15
16/* This allows the over-ride of the default idle code, in case there
17 * is any other things to be done over idle (like DVS)
18*/
19
20extern void (*s3c24xx_idle)(void);
21
22extern void s3c24xx_default_idle(void);
23
24#endif /* __ASM_ARCH_IDLE_H */
diff --git a/include/asm-arm/arch-s3c2410/io.h b/include/asm-arm/arch-s3c2410/io.h
deleted file mode 100644
index 6b35a4f2630e..000000000000
--- a/include/asm-arm/arch-s3c2410/io.h
+++ /dev/null
@@ -1,218 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-s3c2410/io.h
3 * from linux/include/asm-arm/arch-rpc/io.h
4 *
5 * Copyright (C) 1997 Russell King
6 * (C) 2003 Simtec Electronics
7*/
8
9#ifndef __ASM_ARM_ARCH_IO_H
10#define __ASM_ARM_ARCH_IO_H
11
12#include <asm/hardware.h>
13
14#define IO_SPACE_LIMIT 0xffffffff
15
16/*
17 * We use two different types of addressing - PC style addresses, and ARM
18 * addresses. PC style accesses the PC hardware with the normal PC IO
19 * addresses, eg 0x3f8 for serial#1. ARM addresses are above A28
20 * and are translated to the start of IO. Note that all addresses are
21 * not shifted left!
22 */
23
24#define __PORT_PCIO(x) ((x) < (1<<28))
25
26#define PCIO_BASE (S3C24XX_VA_ISA_WORD)
27#define PCIO_BASE_b (S3C24XX_VA_ISA_BYTE)
28#define PCIO_BASE_w (S3C24XX_VA_ISA_WORD)
29#define PCIO_BASE_l (S3C24XX_VA_ISA_WORD)
30/*
31 * Dynamic IO functions - let the compiler
32 * optimize the expressions
33 */
34
35#define DECLARE_DYN_OUT(sz,fnsuffix,instr) \
36static inline void __out##fnsuffix (unsigned int val, unsigned int port) \
37{ \
38 unsigned long temp; \
39 __asm__ __volatile__( \
40 "cmp %2, #(1<<28)\n\t" \
41 "mov %0, %2\n\t" \
42 "addcc %0, %0, %3\n\t" \
43 "str" instr " %1, [%0, #0 ] @ out" #fnsuffix \
44 : "=&r" (temp) \
45 : "r" (val), "r" (port), "Ir" (PCIO_BASE_##fnsuffix) \
46 : "cc"); \
47}
48
49
50#define DECLARE_DYN_IN(sz,fnsuffix,instr) \
51static inline unsigned sz __in##fnsuffix (unsigned int port) \
52{ \
53 unsigned long temp, value; \
54 __asm__ __volatile__( \
55 "cmp %2, #(1<<28)\n\t" \
56 "mov %0, %2\n\t" \
57 "addcc %0, %0, %3\n\t" \
58 "ldr" instr " %1, [%0, #0 ] @ in" #fnsuffix \
59 : "=&r" (temp), "=r" (value) \
60 : "r" (port), "Ir" (PCIO_BASE_##fnsuffix) \
61 : "cc"); \
62 return (unsigned sz)value; \
63}
64
65static inline void __iomem *__ioaddr (unsigned long port)
66{
67 return __PORT_PCIO(port) ? (PCIO_BASE + port) : (void __iomem *)port;
68}
69
70#define DECLARE_IO(sz,fnsuffix,instr) \
71 DECLARE_DYN_IN(sz,fnsuffix,instr) \
72 DECLARE_DYN_OUT(sz,fnsuffix,instr)
73
74DECLARE_IO(char,b,"b")
75DECLARE_IO(short,w,"h")
76DECLARE_IO(int,l,"")
77
78#undef DECLARE_IO
79#undef DECLARE_DYN_IN
80
81/*
82 * Constant address IO functions
83 *
84 * These have to be macros for the 'J' constraint to work -
85 * +/-4096 immediate operand.
86 */
87#define __outbc(value,port) \
88({ \
89 if (__PORT_PCIO((port))) \
90 __asm__ __volatile__( \
91 "strb %0, [%1, %2] @ outbc" \
92 : : "r" (value), "r" (PCIO_BASE), "Jr" ((port))); \
93 else \
94 __asm__ __volatile__( \
95 "strb %0, [%1, #0] @ outbc" \
96 : : "r" (value), "r" ((port))); \
97})
98
99#define __inbc(port) \
100({ \
101 unsigned char result; \
102 if (__PORT_PCIO((port))) \
103 __asm__ __volatile__( \
104 "ldrb %0, [%1, %2] @ inbc" \
105 : "=r" (result) : "r" (PCIO_BASE), "Jr" ((port))); \
106 else \
107 __asm__ __volatile__( \
108 "ldrb %0, [%1, #0] @ inbc" \
109 : "=r" (result) : "r" ((port))); \
110 result; \
111})
112
113#define __outwc(value,port) \
114({ \
115 unsigned long v = value; \
116 if (__PORT_PCIO((port))) { \
117 if ((port) < 256 && (port) > -256) \
118 __asm__ __volatile__( \
119 "strh %0, [%1, %2] @ outwc" \
120 : : "r" (v), "r" (PCIO_BASE), "Jr" ((port))); \
121 else if ((port) > 0) \
122 __asm__ __volatile__( \
123 "strh %0, [%1, %2] @ outwc" \
124 : : "r" (v), \
125 "r" (PCIO_BASE + ((port) & ~0xff)), \
126 "Jr" (((port) & 0xff))); \
127 else \
128 __asm__ __volatile__( \
129 "strh %0, [%1, #0] @ outwc" \
130 : : "r" (v), \
131 "r" (PCIO_BASE + (port))); \
132 } else \
133 __asm__ __volatile__( \
134 "strh %0, [%1, #0] @ outwc" \
135 : : "r" (v), "r" ((port))); \
136})
137
138#define __inwc(port) \
139({ \
140 unsigned short result; \
141 if (__PORT_PCIO((port))) { \
142 if ((port) < 256 && (port) > -256 ) \
143 __asm__ __volatile__( \
144 "ldrh %0, [%1, %2] @ inwc" \
145 : "=r" (result) \
146 : "r" (PCIO_BASE), \
147 "Jr" ((port))); \
148 else if ((port) > 0) \
149 __asm__ __volatile__( \
150 "ldrh %0, [%1, %2] @ inwc" \
151 : "=r" (result) \
152 : "r" (PCIO_BASE + ((port) & ~0xff)), \
153 "Jr" (((port) & 0xff))); \
154 else \
155 __asm__ __volatile__( \
156 "ldrh %0, [%1, #0] @ inwc" \
157 : "=r" (result) \
158 : "r" (PCIO_BASE + ((port)))); \
159 } else \
160 __asm__ __volatile__( \
161 "ldrh %0, [%1, #0] @ inwc" \
162 : "=r" (result) : "r" ((port))); \
163 result; \
164})
165
166#define __outlc(value,port) \
167({ \
168 unsigned long v = value; \
169 if (__PORT_PCIO((port))) \
170 __asm__ __volatile__( \
171 "str %0, [%1, %2] @ outlc" \
172 : : "r" (v), "r" (PCIO_BASE), "Jr" ((port))); \
173 else \
174 __asm__ __volatile__( \
175 "str %0, [%1, #0] @ outlc" \
176 : : "r" (v), "r" ((port))); \
177})
178
179#define __inlc(port) \
180({ \
181 unsigned long result; \
182 if (__PORT_PCIO((port))) \
183 __asm__ __volatile__( \
184 "ldr %0, [%1, %2] @ inlc" \
185 : "=r" (result) : "r" (PCIO_BASE), "Jr" ((port))); \
186 else \
187 __asm__ __volatile__( \
188 "ldr %0, [%1, #0] @ inlc" \
189 : "=r" (result) : "r" ((port))); \
190 result; \
191})
192
193#define __ioaddrc(port) ((__PORT_PCIO(port) ? PCIO_BASE + (port) : (void __iomem *)(port)))
194
195#define inb(p) (__builtin_constant_p((p)) ? __inbc(p) : __inb(p))
196#define inw(p) (__builtin_constant_p((p)) ? __inwc(p) : __inw(p))
197#define inl(p) (__builtin_constant_p((p)) ? __inlc(p) : __inl(p))
198#define outb(v,p) (__builtin_constant_p((p)) ? __outbc(v,p) : __outb(v,p))
199#define outw(v,p) (__builtin_constant_p((p)) ? __outwc(v,p) : __outw(v,p))
200#define outl(v,p) (__builtin_constant_p((p)) ? __outlc(v,p) : __outl(v,p))
201#define __ioaddr(p) (__builtin_constant_p((p)) ? __ioaddr(p) : __ioaddrc(p))
202/* the following macro is deprecated */
203#define ioaddr(port) __ioaddr((port))
204
205#define insb(p,d,l) __raw_readsb(__ioaddr(p),d,l)
206#define insw(p,d,l) __raw_readsw(__ioaddr(p),d,l)
207#define insl(p,d,l) __raw_readsl(__ioaddr(p),d,l)
208
209#define outsb(p,d,l) __raw_writesb(__ioaddr(p),d,l)
210#define outsw(p,d,l) __raw_writesw(__ioaddr(p),d,l)
211#define outsl(p,d,l) __raw_writesl(__ioaddr(p),d,l)
212
213/*
214 * 1:1 mapping for ioremapped regions.
215 */
216#define __mem_pci(x) (x)
217
218#endif
diff --git a/include/asm-arm/arch-s3c2410/irqs.h b/include/asm-arm/arch-s3c2410/irqs.h
deleted file mode 100644
index f5435d8c3769..000000000000
--- a/include/asm-arm/arch-s3c2410/irqs.h
+++ /dev/null
@@ -1,166 +0,0 @@
1/* linux/include/asm-arm/arch-s3c2410/irqs.h
2 *
3 * Copyright (c) 2003-2005 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9*/
10
11
12#ifndef __ASM_ARCH_IRQS_H
13#define __ASM_ARCH_IRQS_H __FILE__
14
15#ifndef __ASM_ARM_IRQ_H
16#error "Do not include this directly, instead #include <asm/irq.h>"
17#endif
18
19/* we keep the first set of CPU IRQs out of the range of
20 * the ISA space, so that the PC104 has them to itself
21 * and we don't end up having to do horrible things to the
22 * standard ISA drivers....
23 */
24
25#define S3C2410_CPUIRQ_OFFSET (16)
26
27#define S3C2410_IRQ(x) ((x) + S3C2410_CPUIRQ_OFFSET)
28
29/* main cpu interrupts */
30#define IRQ_EINT0 S3C2410_IRQ(0) /* 16 */
31#define IRQ_EINT1 S3C2410_IRQ(1)
32#define IRQ_EINT2 S3C2410_IRQ(2)
33#define IRQ_EINT3 S3C2410_IRQ(3)
34#define IRQ_EINT4t7 S3C2410_IRQ(4) /* 20 */
35#define IRQ_EINT8t23 S3C2410_IRQ(5)
36#define IRQ_RESERVED6 S3C2410_IRQ(6) /* for s3c2410 */
37#define IRQ_CAM S3C2410_IRQ(6) /* for s3c2440,s3c2443 */
38#define IRQ_BATT_FLT S3C2410_IRQ(7)
39#define IRQ_TICK S3C2410_IRQ(8) /* 24 */
40#define IRQ_WDT S3C2410_IRQ(9) /* WDT/AC97 for s3c2443 */
41#define IRQ_TIMER0 S3C2410_IRQ(10)
42#define IRQ_TIMER1 S3C2410_IRQ(11)
43#define IRQ_TIMER2 S3C2410_IRQ(12)
44#define IRQ_TIMER3 S3C2410_IRQ(13)
45#define IRQ_TIMER4 S3C2410_IRQ(14)
46#define IRQ_UART2 S3C2410_IRQ(15)
47#define IRQ_LCD S3C2410_IRQ(16) /* 32 */
48#define IRQ_DMA0 S3C2410_IRQ(17) /* IRQ_DMA for s3c2443 */
49#define IRQ_DMA1 S3C2410_IRQ(18)
50#define IRQ_DMA2 S3C2410_IRQ(19)
51#define IRQ_DMA3 S3C2410_IRQ(20)
52#define IRQ_SDI S3C2410_IRQ(21)
53#define IRQ_SPI0 S3C2410_IRQ(22)
54#define IRQ_UART1 S3C2410_IRQ(23)
55#define IRQ_RESERVED24 S3C2410_IRQ(24) /* 40 */
56#define IRQ_NFCON S3C2410_IRQ(24) /* for s3c2440 */
57#define IRQ_USBD S3C2410_IRQ(25)
58#define IRQ_USBH S3C2410_IRQ(26)
59#define IRQ_IIC S3C2410_IRQ(27)
60#define IRQ_UART0 S3C2410_IRQ(28) /* 44 */
61#define IRQ_SPI1 S3C2410_IRQ(29)
62#define IRQ_RTC S3C2410_IRQ(30)
63#define IRQ_ADCPARENT S3C2410_IRQ(31)
64
65/* interrupts generated from the external interrupts sources */
66#define IRQ_EINT4 S3C2410_IRQ(32) /* 48 */
67#define IRQ_EINT5 S3C2410_IRQ(33)
68#define IRQ_EINT6 S3C2410_IRQ(34)
69#define IRQ_EINT7 S3C2410_IRQ(35)
70#define IRQ_EINT8 S3C2410_IRQ(36)
71#define IRQ_EINT9 S3C2410_IRQ(37)
72#define IRQ_EINT10 S3C2410_IRQ(38)
73#define IRQ_EINT11 S3C2410_IRQ(39)
74#define IRQ_EINT12 S3C2410_IRQ(40)
75#define IRQ_EINT13 S3C2410_IRQ(41)
76#define IRQ_EINT14 S3C2410_IRQ(42)
77#define IRQ_EINT15 S3C2410_IRQ(43)
78#define IRQ_EINT16 S3C2410_IRQ(44)
79#define IRQ_EINT17 S3C2410_IRQ(45)
80#define IRQ_EINT18 S3C2410_IRQ(46)
81#define IRQ_EINT19 S3C2410_IRQ(47)
82#define IRQ_EINT20 S3C2410_IRQ(48) /* 64 */
83#define IRQ_EINT21 S3C2410_IRQ(49)
84#define IRQ_EINT22 S3C2410_IRQ(50)
85#define IRQ_EINT23 S3C2410_IRQ(51)
86
87
88#define IRQ_EINT(x) (((x) >= 4) ? (IRQ_EINT4 + (x) - 4) : (IRQ_EINT0 + (x)))
89
90#define IRQ_LCD_FIFO S3C2410_IRQ(52)
91#define IRQ_LCD_FRAME S3C2410_IRQ(53)
92
93/* IRQs for the interal UARTs, and ADC
94 * these need to be ordered in number of appearance in the
95 * SUBSRC mask register
96*/
97
98#define S3C2410_IRQSUB(x) S3C2410_IRQ((x)+54)
99
100#define IRQ_S3CUART_RX0 S3C2410_IRQSUB(0) /* 70 */
101#define IRQ_S3CUART_TX0 S3C2410_IRQSUB(1)
102#define IRQ_S3CUART_ERR0 S3C2410_IRQSUB(2)
103
104#define IRQ_S3CUART_RX1 S3C2410_IRQSUB(3) /* 73 */
105#define IRQ_S3CUART_TX1 S3C2410_IRQSUB(4)
106#define IRQ_S3CUART_ERR1 S3C2410_IRQSUB(5)
107
108#define IRQ_S3CUART_RX2 S3C2410_IRQSUB(6) /* 76 */
109#define IRQ_S3CUART_TX2 S3C2410_IRQSUB(7)
110#define IRQ_S3CUART_ERR2 S3C2410_IRQSUB(8)
111
112#define IRQ_TC S3C2410_IRQSUB(9)
113#define IRQ_ADC S3C2410_IRQSUB(10)
114
115/* extra irqs for s3c2412 */
116
117#define IRQ_S3C2412_CFSDI S3C2410_IRQ(21)
118
119#define IRQ_S3C2412_SDI S3C2410_IRQSUB(13)
120#define IRQ_S3C2412_CF S3C2410_IRQSUB(14)
121
122/* extra irqs for s3c2440 */
123
124#define IRQ_S3C2440_CAM_C S3C2410_IRQSUB(11) /* S3C2443 too */
125#define IRQ_S3C2440_CAM_P S3C2410_IRQSUB(12) /* S3C2443 too */
126#define IRQ_S3C2440_WDT S3C2410_IRQSUB(13)
127#define IRQ_S3C2440_AC97 S3C2410_IRQSUB(14)
128
129/* irqs for s3c2443 */
130
131#define IRQ_S3C2443_DMA S3C2410_IRQ(17) /* IRQ_DMA1 */
132#define IRQ_S3C2443_UART3 S3C2410_IRQ(18) /* IRQ_DMA2 */
133#define IRQ_S3C2443_CFCON S3C2410_IRQ(19) /* IRQ_DMA3 */
134#define IRQ_S3C2443_HSMMC S3C2410_IRQ(20) /* IRQ_SDI */
135#define IRQ_S3C2443_NAND S3C2410_IRQ(24) /* reserved */
136
137#define IRQ_S3C2443_LCD1 S3C2410_IRQSUB(14)
138#define IRQ_S3C2443_LCD2 S3C2410_IRQSUB(15)
139#define IRQ_S3C2443_LCD3 S3C2410_IRQSUB(16)
140#define IRQ_S3C2443_LCD4 S3C2410_IRQSUB(17)
141
142#define IRQ_S3C2443_DMA0 S3C2410_IRQSUB(18)
143#define IRQ_S3C2443_DMA1 S3C2410_IRQSUB(19)
144#define IRQ_S3C2443_DMA2 S3C2410_IRQSUB(20)
145#define IRQ_S3C2443_DMA3 S3C2410_IRQSUB(21)
146#define IRQ_S3C2443_DMA4 S3C2410_IRQSUB(22)
147#define IRQ_S3C2443_DMA5 S3C2410_IRQSUB(23)
148
149/* UART3 */
150#define IRQ_S3C2443_RX3 S3C2410_IRQSUB(24)
151#define IRQ_S3C2443_TX3 S3C2410_IRQSUB(25)
152#define IRQ_S3C2443_ERR3 S3C2410_IRQSUB(26)
153
154#define IRQ_S3C2443_WDT S3C2410_IRQSUB(27)
155#define IRQ_S3C2443_AC97 S3C2410_IRQSUB(28)
156
157#ifdef CONFIG_CPU_S3C2443
158#define NR_IRQS (IRQ_S3C2443_AC97+1)
159#else
160#define NR_IRQS (IRQ_S3C2440_AC97+1)
161#endif
162
163/* Our FIQs are routable from IRQ_EINT0 to IRQ_ADCPARENT */
164#define FIQ_START IRQ_EINT0
165
166#endif /* __ASM_ARCH_IRQ_H */
diff --git a/include/asm-arm/arch-s3c2410/leds-gpio.h b/include/asm-arm/arch-s3c2410/leds-gpio.h
deleted file mode 100644
index 800846ebddba..000000000000
--- a/include/asm-arm/arch-s3c2410/leds-gpio.h
+++ /dev/null
@@ -1,28 +0,0 @@
1/* linux/include/asm-arm/arch-s3c2410/leds-gpio.h
2 *
3 * Copyright (c) 2006 Simtec Electronics
4 * http://armlinux.simtec.co.uk/
5 * Ben Dooks <ben@simtec.co.uk>
6 *
7 * S3C24XX - LEDs GPIO connector
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12*/
13
14#ifndef __ASM_ARCH_LEDSGPIO_H
15#define __ASM_ARCH_LEDSGPIO_H "leds-gpio.h"
16
17#define S3C24XX_LEDF_ACTLOW (1<<0) /* LED is on when GPIO low */
18#define S3C24XX_LEDF_TRISTATE (1<<1) /* tristate to turn off */
19
20struct s3c24xx_led_platdata {
21 unsigned int gpio;
22 unsigned int flags;
23
24 char *name;
25 char *def_trigger;
26};
27
28#endif /* __ASM_ARCH_LEDSGPIO_H */
diff --git a/include/asm-arm/arch-s3c2410/map.h b/include/asm-arm/arch-s3c2410/map.h
deleted file mode 100644
index b33ed3b05ef5..000000000000
--- a/include/asm-arm/arch-s3c2410/map.h
+++ /dev/null
@@ -1,178 +0,0 @@
1/* linux/include/asm-arm/arch-s3c2410/map.h
2 *
3 * Copyright (c) 2003 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * S3C2410 - Memory map definitions
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11*/
12
13#ifndef __ASM_ARCH_MAP_H
14#define __ASM_ARCH_MAP_H
15
16#include <asm/plat-s3c/map.h>
17
18#define S3C2410_ADDR(x) S3C_ADDR(x)
19
20/* interrupt controller is the first thing we put in, to make
21 * the assembly code for the irq detection easier
22 */
23#define S3C24XX_VA_IRQ S3C_VA_IRQ
24#define S3C2410_PA_IRQ (0x4A000000)
25#define S3C24XX_SZ_IRQ SZ_1M
26
27/* memory controller registers */
28#define S3C24XX_VA_MEMCTRL S3C_VA_MEM
29#define S3C2410_PA_MEMCTRL (0x48000000)
30#define S3C24XX_SZ_MEMCTRL SZ_1M
31
32/* USB host controller */
33#define S3C2410_PA_USBHOST (0x49000000)
34#define S3C24XX_SZ_USBHOST SZ_1M
35
36/* DMA controller */
37#define S3C2410_PA_DMA (0x4B000000)
38#define S3C24XX_SZ_DMA SZ_1M
39
40/* Clock and Power management */
41#define S3C24XX_VA_CLKPWR S3C_VA_SYS
42#define S3C2410_PA_CLKPWR (0x4C000000)
43#define S3C24XX_SZ_CLKPWR SZ_1M
44
45/* LCD controller */
46#define S3C2410_PA_LCD (0x4D000000)
47#define S3C24XX_SZ_LCD SZ_1M
48
49/* NAND flash controller */
50#define S3C2410_PA_NAND (0x4E000000)
51#define S3C24XX_SZ_NAND SZ_1M
52
53/* UARTs */
54#define S3C24XX_VA_UART S3C_VA_UART
55#define S3C2410_PA_UART (0x50000000)
56#define S3C24XX_SZ_UART SZ_1M
57
58/* Timers */
59#define S3C24XX_VA_TIMER S3C_VA_TIMER
60#define S3C2410_PA_TIMER (0x51000000)
61#define S3C24XX_SZ_TIMER SZ_1M
62
63/* USB Device port */
64#define S3C2410_PA_USBDEV (0x52000000)
65#define S3C24XX_SZ_USBDEV SZ_1M
66
67/* Watchdog */
68#define S3C24XX_VA_WATCHDOG S3C_VA_WATCHDOG
69#define S3C2410_PA_WATCHDOG (0x53000000)
70#define S3C24XX_SZ_WATCHDOG SZ_1M
71
72/* IIC hardware controller */
73#define S3C2410_PA_IIC (0x54000000)
74#define S3C24XX_SZ_IIC SZ_1M
75
76/* IIS controller */
77#define S3C2410_PA_IIS (0x55000000)
78#define S3C24XX_SZ_IIS SZ_1M
79
80/* GPIO ports */
81
82/* the calculation for the VA of this must ensure that
83 * it is the same distance apart from the UART in the
84 * phsyical address space, as the initial mapping for the IO
85 * is done as a 1:1 maping. This puts it (currently) at
86 * 0xFA800000, which is not in the way of any current mapping
87 * by the base system.
88*/
89
90#define S3C2410_PA_GPIO (0x56000000)
91#define S3C24XX_VA_GPIO ((S3C2410_PA_GPIO - S3C24XX_PA_UART) + S3C24XX_VA_UART)
92#define S3C24XX_SZ_GPIO SZ_1M
93
94/* RTC */
95#define S3C2410_PA_RTC (0x57000000)
96#define S3C24XX_SZ_RTC SZ_1M
97
98/* ADC */
99#define S3C2410_PA_ADC (0x58000000)
100#define S3C24XX_SZ_ADC SZ_1M
101
102/* SPI */
103#define S3C2410_PA_SPI (0x59000000)
104#define S3C24XX_SZ_SPI SZ_1M
105
106/* SDI */
107#define S3C2410_PA_SDI (0x5A000000)
108#define S3C24XX_SZ_SDI SZ_1M
109
110/* CAMIF */
111#define S3C2440_PA_CAMIF (0x4F000000)
112#define S3C2440_SZ_CAMIF SZ_1M
113
114/* AC97 */
115
116#define S3C2440_PA_AC97 (0x5B000000)
117#define S3C2440_SZ_AC97 SZ_1M
118
119/* S3C2443 High-speed SD/MMC */
120#define S3C2443_PA_HSMMC (0x4A800000)
121#define S3C2443_SZ_HSMMC (256)
122
123/* ISA style IO, for each machine to sort out mappings for, if it
124 * implements it. We reserve two 16M regions for ISA.
125 */
126
127#define S3C24XX_VA_ISA_WORD S3C2410_ADDR(0x02000000)
128#define S3C24XX_VA_ISA_BYTE S3C2410_ADDR(0x03000000)
129
130/* physical addresses of all the chip-select areas */
131
132#define S3C2410_CS0 (0x00000000)
133#define S3C2410_CS1 (0x08000000)
134#define S3C2410_CS2 (0x10000000)
135#define S3C2410_CS3 (0x18000000)
136#define S3C2410_CS4 (0x20000000)
137#define S3C2410_CS5 (0x28000000)
138#define S3C2410_CS6 (0x30000000)
139#define S3C2410_CS7 (0x38000000)
140
141#define S3C2410_SDRAM_PA (S3C2410_CS6)
142
143/* Use a single interface for common resources between S3C24XX cpus */
144
145#define S3C24XX_PA_IRQ S3C2410_PA_IRQ
146#define S3C24XX_PA_MEMCTRL S3C2410_PA_MEMCTRL
147#define S3C24XX_PA_USBHOST S3C2410_PA_USBHOST
148#define S3C24XX_PA_DMA S3C2410_PA_DMA
149#define S3C24XX_PA_CLKPWR S3C2410_PA_CLKPWR
150#define S3C24XX_PA_LCD S3C2410_PA_LCD
151#define S3C24XX_PA_UART S3C2410_PA_UART
152#define S3C24XX_PA_TIMER S3C2410_PA_TIMER
153#define S3C24XX_PA_USBDEV S3C2410_PA_USBDEV
154#define S3C24XX_PA_WATCHDOG S3C2410_PA_WATCHDOG
155#define S3C24XX_PA_IIC S3C2410_PA_IIC
156#define S3C24XX_PA_IIS S3C2410_PA_IIS
157#define S3C24XX_PA_GPIO S3C2410_PA_GPIO
158#define S3C24XX_PA_RTC S3C2410_PA_RTC
159#define S3C24XX_PA_ADC S3C2410_PA_ADC
160#define S3C24XX_PA_SPI S3C2410_PA_SPI
161
162/* deal with the registers that move under the 2412/2413 */
163
164#if defined(CONFIG_CPU_S3C2412) || defined(CONFIG_CPU_S3C2413)
165#ifndef __ASSEMBLY__
166extern void __iomem *s3c24xx_va_gpio2;
167#endif
168#ifdef CONFIG_CPU_S3C2412_ONLY
169#define S3C24XX_VA_GPIO2 (S3C24XX_VA_GPIO + 0x10)
170#else
171#define S3C24XX_VA_GPIO2 s3c24xx_va_gpio2
172#endif
173#else
174#define s3c24xx_va_gpio2 S3C24XX_VA_GPIO
175#define S3C24XX_VA_GPIO2 S3C24XX_VA_GPIO
176#endif
177
178#endif /* __ASM_ARCH_MAP_H */
diff --git a/include/asm-arm/arch-s3c2410/memory.h b/include/asm-arm/arch-s3c2410/memory.h
deleted file mode 100644
index 533e2436e707..000000000000
--- a/include/asm-arm/arch-s3c2410/memory.h
+++ /dev/null
@@ -1,19 +0,0 @@
1/* linux/include/asm-arm/arch-s3c2410/memory.h
2 * from linux/include/asm-arm/arch-rpc/memory.h
3 *
4 * Copyright (C) 1996,1997,1998 Russell King.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9*/
10
11#ifndef __ASM_ARCH_MEMORY_H
12#define __ASM_ARCH_MEMORY_H
13
14#define PHYS_OFFSET UL(0x30000000)
15
16#define __virt_to_bus(x) __virt_to_phys(x)
17#define __bus_to_virt(x) __phys_to_virt(x)
18
19#endif
diff --git a/include/asm-arm/arch-s3c2410/osiris-cpld.h b/include/asm-arm/arch-s3c2410/osiris-cpld.h
deleted file mode 100644
index 229ab2351db6..000000000000
--- a/include/asm-arm/arch-s3c2410/osiris-cpld.h
+++ /dev/null
@@ -1,30 +0,0 @@
1/* linux/include/asm-arm/arch-s3c2410/osiris-cpld.h
2 *
3 * Copyright 2005 Simtec Electronics
4 * http://www.simtec.co.uk/products/
5 * Ben Dooks <ben@simtec.co.uk>
6 *
7 * OSIRIS - CPLD control constants
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12*/
13
14#ifndef __ASM_ARCH_OSIRISCPLD_H
15#define __ASM_ARCH_OSIRISCPLD_H
16
17/* CTRL0 - NAND WP control */
18
19#define OSIRIS_CTRL0_NANDSEL (0x3)
20#define OSIRIS_CTRL0_BOOT_INT (1<<3)
21#define OSIRIS_CTRL0_PCMCIA (1<<4)
22#define OSIRIS_CTRL0_FIX8 (1<<5)
23#define OSIRIS_CTRL0_PCMCIA_nWAIT (1<<6)
24#define OSIRIS_CTRL0_PCMCIA_nIOIS16 (1<<7)
25
26#define OSIRIS_CTRL1_FIX8 (1<<0)
27
28#define OSIRIS_ID_REVMASK (0x7)
29
30#endif /* __ASM_ARCH_OSIRISCPLD_H */
diff --git a/include/asm-arm/arch-s3c2410/osiris-map.h b/include/asm-arm/arch-s3c2410/osiris-map.h
deleted file mode 100644
index b5c74d2b9aaa..000000000000
--- a/include/asm-arm/arch-s3c2410/osiris-map.h
+++ /dev/null
@@ -1,42 +0,0 @@
1/* linux/include/asm-arm/arch-s3c2410/osiris-map.h
2 *
3 * (c) 2005 Simtec Electronics
4 * http://www.simtec.co.uk/products/
5 * Ben Dooks <ben@simtec.co.uk>
6 *
7 * OSIRIS - Memory map definitions
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12*/
13
14/* needs arch/map.h including with this */
15
16#ifndef __ASM_ARCH_OSIRISMAP_H
17#define __ASM_ARCH_OSIRISMAP_H
18
19/* start peripherals off after the S3C2410 */
20
21#define OSIRIS_IOADDR(x) (S3C2410_ADDR((x) + 0x04000000))
22
23#define OSIRIS_PA_CPLD (S3C2410_CS1 | (1<<26))
24
25/* we put the CPLD registers next, to get them out of the way */
26
27#define OSIRIS_VA_CTRL0 OSIRIS_IOADDR(0x00000000)
28#define OSIRIS_PA_CTRL0 (OSIRIS_PA_CPLD)
29
30#define OSIRIS_VA_CTRL1 OSIRIS_IOADDR(0x00100000)
31#define OSIRIS_PA_CTRL1 (OSIRIS_PA_CPLD + (1<<23))
32
33#define OSIRIS_VA_CTRL2 OSIRIS_IOADDR(0x00200000)
34#define OSIRIS_PA_CTRL2 (OSIRIS_PA_CPLD + (2<<23))
35
36#define OSIRIS_VA_CTRL3 OSIRIS_IOADDR(0x00300000)
37#define OSIRIS_PA_CTRL3 (OSIRIS_PA_CPLD + (2<<23))
38
39#define OSIRIS_VA_IDREG OSIRIS_IOADDR(0x00700000)
40#define OSIRIS_PA_IDREG (OSIRIS_PA_CPLD + (7<<23))
41
42#endif /* __ASM_ARCH_OSIRISMAP_H */
diff --git a/include/asm-arm/arch-s3c2410/otom-map.h b/include/asm-arm/arch-s3c2410/otom-map.h
deleted file mode 100644
index e40c93429854..000000000000
--- a/include/asm-arm/arch-s3c2410/otom-map.h
+++ /dev/null
@@ -1,30 +0,0 @@
1/* linux/include/asm-arm/arch-s3c2410/otom-map.h
2 *
3 * (c) 2005 Guillaume GOURAT / NexVision
4 * guillaume.gourat@nexvision.fr
5 *
6 * NexVision OTOM board memory map definitions
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11*/
12
13/* needs arch/map.h including with this */
14
15/* ok, we've used up to 0x01300000, now we need to find space for the
16 * peripherals that live in the nGCS[x] areas, which are quite numerous
17 * in their space.
18 */
19
20#ifndef __ASM_ARCH_OTOMMAP_H
21#define __ASM_ARCH_OTOMMAP_H
22
23#define OTOM_PA_CS8900A_BASE (S3C2410_CS3 + 0x01000000) /* nGCS3 +0x01000000 */
24#define OTOM_VA_CS8900A_BASE S3C2410_ADDR(0x04000000) /* 0xF4000000 */
25
26/* physical offset addresses for the peripherals */
27
28#define OTOM_PA_FLASH0_BASE (S3C2410_CS0) /* Bank 0 */
29
30#endif /* __ASM_ARCH_OTOMMAP_H */
diff --git a/include/asm-arm/arch-s3c2410/regs-clock.h b/include/asm-arm/arch-s3c2410/regs-clock.h
deleted file mode 100644
index 37661358b42b..000000000000
--- a/include/asm-arm/arch-s3c2410/regs-clock.h
+++ /dev/null
@@ -1,197 +0,0 @@
1/* linux/include/asm-arm/arch-s3c2410/regs-clock.h
2 *
3 * Copyright (c) 2003,2004,2005,2006 Simtec Electronics <linux@simtec.co.uk>
4 * http://armlinux.simtec.co.uk/
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * S3C2410 clock register definitions
11*/
12
13#ifndef __ASM_ARM_REGS_CLOCK
14#define __ASM_ARM_REGS_CLOCK "$Id: clock.h,v 1.4 2003/04/30 14:50:51 ben Exp $"
15
16#define S3C2410_CLKREG(x) ((x) + S3C24XX_VA_CLKPWR)
17
18#define S3C2410_PLLVAL(_m,_p,_s) ((_m) << 12 | ((_p) << 4) | ((_s)))
19
20#define S3C2410_LOCKTIME S3C2410_CLKREG(0x00)
21#define S3C2410_MPLLCON S3C2410_CLKREG(0x04)
22#define S3C2410_UPLLCON S3C2410_CLKREG(0x08)
23#define S3C2410_CLKCON S3C2410_CLKREG(0x0C)
24#define S3C2410_CLKSLOW S3C2410_CLKREG(0x10)
25#define S3C2410_CLKDIVN S3C2410_CLKREG(0x14)
26
27#define S3C2410_CLKCON_IDLE (1<<2)
28#define S3C2410_CLKCON_POWER (1<<3)
29#define S3C2410_CLKCON_NAND (1<<4)
30#define S3C2410_CLKCON_LCDC (1<<5)
31#define S3C2410_CLKCON_USBH (1<<6)
32#define S3C2410_CLKCON_USBD (1<<7)
33#define S3C2410_CLKCON_PWMT (1<<8)
34#define S3C2410_CLKCON_SDI (1<<9)
35#define S3C2410_CLKCON_UART0 (1<<10)
36#define S3C2410_CLKCON_UART1 (1<<11)
37#define S3C2410_CLKCON_UART2 (1<<12)
38#define S3C2410_CLKCON_GPIO (1<<13)
39#define S3C2410_CLKCON_RTC (1<<14)
40#define S3C2410_CLKCON_ADC (1<<15)
41#define S3C2410_CLKCON_IIC (1<<16)
42#define S3C2410_CLKCON_IIS (1<<17)
43#define S3C2410_CLKCON_SPI (1<<18)
44
45#define S3C2410_PLLCON_MDIVSHIFT 12
46#define S3C2410_PLLCON_PDIVSHIFT 4
47#define S3C2410_PLLCON_SDIVSHIFT 0
48#define S3C2410_PLLCON_MDIVMASK ((1<<(1+(19-12)))-1)
49#define S3C2410_PLLCON_PDIVMASK ((1<<5)-1)
50#define S3C2410_PLLCON_SDIVMASK 3
51
52/* DCLKCON register addresses in gpio.h */
53
54#define S3C2410_DCLKCON_DCLK0EN (1<<0)
55#define S3C2410_DCLKCON_DCLK0_PCLK (0<<1)
56#define S3C2410_DCLKCON_DCLK0_UCLK (1<<1)
57#define S3C2410_DCLKCON_DCLK0_DIV(x) (((x) - 1 )<<4)
58#define S3C2410_DCLKCON_DCLK0_CMP(x) (((x) - 1 )<<8)
59#define S3C2410_DCLKCON_DCLK0_DIV_MASK ((0xf)<<4)
60#define S3C2410_DCLKCON_DCLK0_CMP_MASK ((0xf)<<8)
61
62#define S3C2410_DCLKCON_DCLK1EN (1<<16)
63#define S3C2410_DCLKCON_DCLK1_PCLK (0<<17)
64#define S3C2410_DCLKCON_DCLK1_UCLK (1<<17)
65#define S3C2410_DCLKCON_DCLK1_DIV(x) (((x) - 1) <<20)
66#define S3C2410_DCLKCON_DCLK1_CMP(x) (((x) - 1) <<24)
67#define S3C2410_DCLKCON_DCLK1_DIV_MASK ((0xf) <<20)
68#define S3C2410_DCLKCON_DCLK1_CMP_MASK ((0xf) <<24)
69
70#define S3C2410_CLKDIVN_PDIVN (1<<0)
71#define S3C2410_CLKDIVN_HDIVN (1<<1)
72
73#define S3C2410_CLKSLOW_UCLK_OFF (1<<7)
74#define S3C2410_CLKSLOW_MPLL_OFF (1<<5)
75#define S3C2410_CLKSLOW_SLOW (1<<4)
76#define S3C2410_CLKSLOW_SLOWVAL(x) (x)
77#define S3C2410_CLKSLOW_GET_SLOWVAL(x) ((x) & 7)
78
79#ifndef __ASSEMBLY__
80
81#include <asm/div64.h>
82
83static inline unsigned int
84s3c2410_get_pll(unsigned int pllval, unsigned int baseclk)
85{
86 unsigned int mdiv, pdiv, sdiv;
87 uint64_t fvco;
88
89 mdiv = pllval >> S3C2410_PLLCON_MDIVSHIFT;
90 pdiv = pllval >> S3C2410_PLLCON_PDIVSHIFT;
91 sdiv = pllval >> S3C2410_PLLCON_SDIVSHIFT;
92
93 mdiv &= S3C2410_PLLCON_MDIVMASK;
94 pdiv &= S3C2410_PLLCON_PDIVMASK;
95 sdiv &= S3C2410_PLLCON_SDIVMASK;
96
97 fvco = (uint64_t)baseclk * (mdiv + 8);
98 do_div(fvco, (pdiv + 2) << sdiv);
99
100 return (unsigned int)fvco;
101}
102
103#endif /* __ASSEMBLY__ */
104
105#if defined(CONFIG_CPU_S3C2440) || defined(CONFIG_CPU_S3C2442)
106
107/* extra registers */
108#define S3C2440_CAMDIVN S3C2410_CLKREG(0x18)
109
110#define S3C2440_CLKCON_CAMERA (1<<19)
111#define S3C2440_CLKCON_AC97 (1<<20)
112
113#define S3C2440_CLKDIVN_PDIVN (1<<0)
114#define S3C2440_CLKDIVN_HDIVN_MASK (3<<1)
115#define S3C2440_CLKDIVN_HDIVN_1 (0<<1)
116#define S3C2440_CLKDIVN_HDIVN_2 (1<<1)
117#define S3C2440_CLKDIVN_HDIVN_4_8 (2<<1)
118#define S3C2440_CLKDIVN_HDIVN_3_6 (3<<1)
119#define S3C2440_CLKDIVN_UCLK (1<<3)
120
121#define S3C2440_CAMDIVN_CAMCLK_MASK (0xf<<0)
122#define S3C2440_CAMDIVN_CAMCLK_SEL (1<<4)
123#define S3C2440_CAMDIVN_HCLK3_HALF (1<<8)
124#define S3C2440_CAMDIVN_HCLK4_HALF (1<<9)
125#define S3C2440_CAMDIVN_DVSEN (1<<12)
126
127#define S3C2442_CAMDIVN_CAMCLK_DIV3 (1<<5)
128
129#endif /* CONFIG_CPU_S3C2440 or CONFIG_CPU_S3C2442 */
130
131#if defined(CONFIG_CPU_S3C2412) || defined(CONFIG_CPU_S3C2413)
132
133#define S3C2412_OSCSET S3C2410_CLKREG(0x18)
134#define S3C2412_CLKSRC S3C2410_CLKREG(0x1C)
135
136#define S3C2412_PLLCON_OFF (1<<20)
137
138#define S3C2412_CLKDIVN_PDIVN (1<<2)
139#define S3C2412_CLKDIVN_HDIVN_MASK (3<<0)
140#define S3C2412_CLKDIVN_ARMDIVN (1<<3)
141#define S3C2412_CLKDIVN_DVSEN (1<<4)
142#define S3C2412_CLKDIVN_HALFHCLK (1<<5)
143#define S3C2412_CLKDIVN_USB48DIV (1<<6)
144#define S3C2412_CLKDIVN_UARTDIV_MASK (15<<8)
145#define S3C2412_CLKDIVN_UARTDIV_SHIFT (8)
146#define S3C2412_CLKDIVN_I2SDIV_MASK (15<<12)
147#define S3C2412_CLKDIVN_I2SDIV_SHIFT (12)
148#define S3C2412_CLKDIVN_CAMDIV_MASK (15<<16)
149#define S3C2412_CLKDIVN_CAMDIV_SHIFT (16)
150
151#define S3C2412_CLKCON_WDT (1<<28)
152#define S3C2412_CLKCON_SPI (1<<27)
153#define S3C2412_CLKCON_IIS (1<<26)
154#define S3C2412_CLKCON_IIC (1<<25)
155#define S3C2412_CLKCON_ADC (1<<24)
156#define S3C2412_CLKCON_RTC (1<<23)
157#define S3C2412_CLKCON_GPIO (1<<22)
158#define S3C2412_CLKCON_UART2 (1<<21)
159#define S3C2412_CLKCON_UART1 (1<<20)
160#define S3C2412_CLKCON_UART0 (1<<19)
161#define S3C2412_CLKCON_SDI (1<<18)
162#define S3C2412_CLKCON_PWMT (1<<17)
163#define S3C2412_CLKCON_USBD (1<<16)
164#define S3C2412_CLKCON_CAMCLK (1<<15)
165#define S3C2412_CLKCON_UARTCLK (1<<14)
166/* missing 13 */
167#define S3C2412_CLKCON_USB_HOST48 (1<<12)
168#define S3C2412_CLKCON_USB_DEV48 (1<<11)
169#define S3C2412_CLKCON_HCLKdiv2 (1<<10)
170#define S3C2412_CLKCON_HCLKx2 (1<<9)
171#define S3C2412_CLKCON_SDRAM (1<<8)
172/* missing 7 */
173#define S3C2412_CLKCON_USBH S3C2410_CLKCON_USBH
174#define S3C2412_CLKCON_LCDC S3C2410_CLKCON_LCDC
175#define S3C2412_CLKCON_NAND S3C2410_CLKCON_NAND
176#define S3C2412_CLKCON_DMA3 (1<<3)
177#define S3C2412_CLKCON_DMA2 (1<<2)
178#define S3C2412_CLKCON_DMA1 (1<<1)
179#define S3C2412_CLKCON_DMA0 (1<<0)
180
181/* clock sourec controls */
182
183#define S3C2412_CLKSRC_EXTCLKDIV_MASK (7 << 0)
184#define S3C2412_CLKSRC_EXTCLKDIV_SHIFT (0)
185#define S3C2412_CLKSRC_MDIVCLK_EXTCLKDIV (1<<3)
186#define S3C2412_CLKSRC_MSYSCLK_MPLL (1<<4)
187#define S3C2412_CLKSRC_USYSCLK_UPLL (1<<5)
188#define S3C2412_CLKSRC_UARTCLK_MPLL (1<<8)
189#define S3C2412_CLKSRC_I2SCLK_MPLL (1<<9)
190#define S3C2412_CLKSRC_USBCLK_HCLK (1<<10)
191#define S3C2412_CLKSRC_CAMCLK_HCLK (1<<11)
192#define S3C2412_CLKSRC_UREFCLK_EXTCLK (1<<12)
193#define S3C2412_CLKSRC_EREFCLK_EXTCLK (1<<14)
194
195#endif /* CONFIG_CPU_S3C2412 | CONFIG_CPU_S3C2413 */
196
197#endif /* __ASM_ARM_REGS_CLOCK */
diff --git a/include/asm-arm/arch-s3c2410/regs-dsc.h b/include/asm-arm/arch-s3c2410/regs-dsc.h
deleted file mode 100644
index 1235df70f34e..000000000000
--- a/include/asm-arm/arch-s3c2410/regs-dsc.h
+++ /dev/null
@@ -1,184 +0,0 @@
1/* linux/include/asm-arm/arch-s3c2410/regs-dsc.h
2 *
3 * Copyright (c) 2004 Simtec Electronics <linux@simtec.co.uk>
4 * http://www.simtec.co.uk/products/SWLINUX/
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * S3C2440/S3C2412 Signal Drive Strength Control
11*/
12
13
14#ifndef __ASM_ARCH_REGS_DSC_H
15#define __ASM_ARCH_REGS_DSC_H "2440-dsc"
16
17#if defined(CONFIG_CPU_S3C2412)
18#define S3C2412_DSC0 S3C2410_GPIOREG(0xdc)
19#define S3C2412_DSC1 S3C2410_GPIOREG(0xe0)
20#endif
21
22#if defined(CONFIG_CPU_S3C244X)
23
24#define S3C2440_DSC0 S3C2410_GPIOREG(0xc4)
25#define S3C2440_DSC1 S3C2410_GPIOREG(0xc8)
26
27#define S3C2440_SELECT_DSC0 (0)
28#define S3C2440_SELECT_DSC1 (1<<31)
29
30#define S3C2440_DSC_GETSHIFT(x) ((x) & 31)
31
32#define S3C2440_DSC0_DISABLE (1<<31)
33
34#define S3C2440_DSC0_ADDR (S3C2440_SELECT_DSC0 | 8)
35#define S3C2440_DSC0_ADDR_12mA (0<<8)
36#define S3C2440_DSC0_ADDR_10mA (1<<8)
37#define S3C2440_DSC0_ADDR_8mA (2<<8)
38#define S3C2440_DSC0_ADDR_6mA (3<<8)
39#define S3C2440_DSC0_ADDR_MASK (3<<8)
40
41/* D24..D31 */
42#define S3C2440_DSC0_DATA3 (S3C2440_SELECT_DSC0 | 6)
43#define S3C2440_DSC0_DATA3_12mA (0<<6)
44#define S3C2440_DSC0_DATA3_10mA (1<<6)
45#define S3C2440_DSC0_DATA3_8mA (2<<6)
46#define S3C2440_DSC0_DATA3_6mA (3<<6)
47#define S3C2440_DSC0_DATA3_MASK (3<<6)
48
49/* D16..D23 */
50#define S3C2440_DSC0_DATA2 (S3C2440_SELECT_DSC0 | 4)
51#define S3C2440_DSC0_DATA2_12mA (0<<4)
52#define S3C2440_DSC0_DATA2_10mA (1<<4)
53#define S3C2440_DSC0_DATA2_8mA (2<<4)
54#define S3C2440_DSC0_DATA2_6mA (3<<4)
55#define S3C2440_DSC0_DATA2_MASK (3<<4)
56
57/* D8..D15 */
58#define S3C2440_DSC0_DATA1 (S3C2440_SELECT_DSC0 | 2)
59#define S3C2440_DSC0_DATA1_12mA (0<<2)
60#define S3C2440_DSC0_DATA1_10mA (1<<2)
61#define S3C2440_DSC0_DATA1_8mA (2<<2)
62#define S3C2440_DSC0_DATA1_6mA (3<<2)
63#define S3C2440_DSC0_DATA1_MASK (3<<2)
64
65/* D0..D7 */
66#define S3C2440_DSC0_DATA0 (S3C2440_SELECT_DSC0 | 0)
67#define S3C2440_DSC0_DATA0_12mA (0<<0)
68#define S3C2440_DSC0_DATA0_10mA (1<<0)
69#define S3C2440_DSC0_DATA0_8mA (2<<0)
70#define S3C2440_DSC0_DATA0_6mA (3<<0)
71#define S3C2440_DSC0_DATA0_MASK (3<<0)
72
73#define S3C2440_DSC1_SCK1 (S3C2440_SELECT_DSC1 | 28)
74#define S3C2440_DSC1_SCK1_12mA (0<<28)
75#define S3C2440_DSC1_SCK1_10mA (1<<28)
76#define S3C2440_DSC1_SCK1_8mA (2<<28)
77#define S3C2440_DSC1_SCK1_6mA (3<<28)
78#define S3C2440_DSC1_SCK1_MASK (3<<28)
79
80#define S3C2440_DSC1_SCK0 (S3C2440_SELECT_DSC1 | 26)
81#define S3C2440_DSC1_SCK0_12mA (0<<26)
82#define S3C2440_DSC1_SCK0_10mA (1<<26)
83#define S3C2440_DSC1_SCK0_8mA (2<<26)
84#define S3C2440_DSC1_SCK0_6mA (3<<26)
85#define S3C2440_DSC1_SCK0_MASK (3<<26)
86
87#define S3C2440_DSC1_SCKE (S3C2440_SELECT_DSC1 | 24)
88#define S3C2440_DSC1_SCKE_10mA (0<<24)
89#define S3C2440_DSC1_SCKE_8mA (1<<24)
90#define S3C2440_DSC1_SCKE_6mA (2<<24)
91#define S3C2440_DSC1_SCKE_4mA (3<<24)
92#define S3C2440_DSC1_SCKE_MASK (3<<24)
93
94/* SDRAM nRAS/nCAS */
95#define S3C2440_DSC1_SDR (S3C2440_SELECT_DSC1 | 22)
96#define S3C2440_DSC1_SDR_10mA (0<<22)
97#define S3C2440_DSC1_SDR_8mA (1<<22)
98#define S3C2440_DSC1_SDR_6mA (2<<22)
99#define S3C2440_DSC1_SDR_4mA (3<<22)
100#define S3C2440_DSC1_SDR_MASK (3<<22)
101
102/* NAND Flash Controller */
103#define S3C2440_DSC1_NFC (S3C2440_SELECT_DSC1 | 20)
104#define S3C2440_DSC1_NFC_10mA (0<<20)
105#define S3C2440_DSC1_NFC_8mA (1<<20)
106#define S3C2440_DSC1_NFC_6mA (2<<20)
107#define S3C2440_DSC1_NFC_4mA (3<<20)
108#define S3C2440_DSC1_NFC_MASK (3<<20)
109
110/* nBE[0..3] */
111#define S3C2440_DSC1_nBE (S3C2440_SELECT_DSC1 | 18)
112#define S3C2440_DSC1_nBE_10mA (0<<18)
113#define S3C2440_DSC1_nBE_8mA (1<<18)
114#define S3C2440_DSC1_nBE_6mA (2<<18)
115#define S3C2440_DSC1_nBE_4mA (3<<18)
116#define S3C2440_DSC1_nBE_MASK (3<<18)
117
118#define S3C2440_DSC1_WOE (S3C2440_SELECT_DSC1 | 16)
119#define S3C2440_DSC1_WOE_10mA (0<<16)
120#define S3C2440_DSC1_WOE_8mA (1<<16)
121#define S3C2440_DSC1_WOE_6mA (2<<16)
122#define S3C2440_DSC1_WOE_4mA (3<<16)
123#define S3C2440_DSC1_WOE_MASK (3<<16)
124
125#define S3C2440_DSC1_CS7 (S3C2440_SELECT_DSC1 | 14)
126#define S3C2440_DSC1_CS7_10mA (0<<14)
127#define S3C2440_DSC1_CS7_8mA (1<<14)
128#define S3C2440_DSC1_CS7_6mA (2<<14)
129#define S3C2440_DSC1_CS7_4mA (3<<14)
130#define S3C2440_DSC1_CS7_MASK (3<<14)
131
132#define S3C2440_DSC1_CS6 (S3C2440_SELECT_DSC1 | 12)
133#define S3C2440_DSC1_CS6_10mA (0<<12)
134#define S3C2440_DSC1_CS6_8mA (1<<12)
135#define S3C2440_DSC1_CS6_6mA (2<<12)
136#define S3C2440_DSC1_CS6_4mA (3<<12)
137#define S3C2440_DSC1_CS6_MASK (3<<12)
138
139#define S3C2440_DSC1_CS5 (S3C2440_SELECT_DSC1 | 10)
140#define S3C2440_DSC1_CS5_10mA (0<<10)
141#define S3C2440_DSC1_CS5_8mA (1<<10)
142#define S3C2440_DSC1_CS5_6mA (2<<10)
143#define S3C2440_DSC1_CS5_4mA (3<<10)
144#define S3C2440_DSC1_CS5_MASK (3<<10)
145
146#define S3C2440_DSC1_CS4 (S3C2440_SELECT_DSC1 | 8)
147#define S3C2440_DSC1_CS4_10mA (0<<8)
148#define S3C2440_DSC1_CS4_8mA (1<<8)
149#define S3C2440_DSC1_CS4_6mA (2<<8)
150#define S3C2440_DSC1_CS4_4mA (3<<8)
151#define S3C2440_DSC1_CS4_MASK (3<<8)
152
153#define S3C2440_DSC1_CS3 (S3C2440_SELECT_DSC1 | 6)
154#define S3C2440_DSC1_CS3_10mA (0<<6)
155#define S3C2440_DSC1_CS3_8mA (1<<6)
156#define S3C2440_DSC1_CS3_6mA (2<<6)
157#define S3C2440_DSC1_CS3_4mA (3<<6)
158#define S3C2440_DSC1_CS3_MASK (3<<6)
159
160#define S3C2440_DSC1_CS2 (S3C2440_SELECT_DSC1 | 4)
161#define S3C2440_DSC1_CS2_10mA (0<<4)
162#define S3C2440_DSC1_CS2_8mA (1<<4)
163#define S3C2440_DSC1_CS2_6mA (2<<4)
164#define S3C2440_DSC1_CS2_4mA (3<<4)
165#define S3C2440_DSC1_CS2_MASK (3<<4)
166
167#define S3C2440_DSC1_CS1 (S3C2440_SELECT_DSC1 | 2)
168#define S3C2440_DSC1_CS1_10mA (0<<2)
169#define S3C2440_DSC1_CS1_8mA (1<<2)
170#define S3C2440_DSC1_CS1_6mA (2<<2)
171#define S3C2440_DSC1_CS1_4mA (3<<2)
172#define S3C2440_DSC1_CS1_MASK (3<<2)
173
174#define S3C2440_DSC1_CS0 (S3C2440_SELECT_DSC1 | 0)
175#define S3C2440_DSC1_CS0_10mA (0<<0)
176#define S3C2440_DSC1_CS0_8mA (1<<0)
177#define S3C2440_DSC1_CS0_6mA (2<<0)
178#define S3C2440_DSC1_CS0_4mA (3<<0)
179#define S3C2440_DSC1_CS0_MASK (3<<0)
180
181#endif /* CONFIG_CPU_S3C2440 */
182
183#endif /* __ASM_ARCH_REGS_DSC_H */
184
diff --git a/include/asm-arm/arch-s3c2410/regs-gpio.h b/include/asm-arm/arch-s3c2410/regs-gpio.h
deleted file mode 100644
index 497dd06e2c99..000000000000
--- a/include/asm-arm/arch-s3c2410/regs-gpio.h
+++ /dev/null
@@ -1,1163 +0,0 @@
1/* linux/include/asm-arm/arch-s3c2410/regs-gpio.h
2 *
3 * Copyright (c) 2003,2004 Simtec Electronics <linux@simtec.co.uk>
4 * http://www.simtec.co.uk/products/SWLINUX/
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * S3C2410 GPIO register definitions
11*/
12
13
14#ifndef __ASM_ARCH_REGS_GPIO_H
15#define __ASM_ARCH_REGS_GPIO_H "$Id: gpio.h,v 1.5 2003/05/19 12:51:08 ben Exp $"
16
17#define S3C2410_GPIONO(bank,offset) ((bank) + (offset))
18
19#define S3C2410_GPIO_BANKA (32*0)
20#define S3C2410_GPIO_BANKB (32*1)
21#define S3C2410_GPIO_BANKC (32*2)
22#define S3C2410_GPIO_BANKD (32*3)
23#define S3C2410_GPIO_BANKE (32*4)
24#define S3C2410_GPIO_BANKF (32*5)
25#define S3C2410_GPIO_BANKG (32*6)
26#define S3C2410_GPIO_BANKH (32*7)
27
28#ifdef CONFIG_CPU_S3C2400
29#define S3C24XX_GPIO_BASE(x) S3C2400_GPIO_BASE(x)
30#define S3C24XX_MISCCR S3C2400_MISCCR
31#else
32#define S3C24XX_GPIO_BASE(x) S3C2410_GPIO_BASE(x)
33#define S3C24XX_MISCCR S3C24XX_GPIOREG2(0x80)
34#endif /* CONFIG_CPU_S3C2400 */
35
36
37/* S3C2400 doesn't have a 1:1 mapping to S3C2410 gpio base pins */
38
39#define S3C2400_BANKNUM(pin) (((pin) & ~31) / 32)
40#define S3C2400_BASEA2B(pin) ((((pin) & ~31) >> 2))
41#define S3C2400_BASEC2H(pin) ((S3C2400_BANKNUM(pin) * 10) + \
42 (2 * (S3C2400_BANKNUM(pin)-2)))
43
44#define S3C2400_GPIO_BASE(pin) (pin < S3C2410_GPIO_BANKC ? \
45 S3C2400_BASEA2B(pin)+S3C24XX_VA_GPIO : \
46 S3C2400_BASEC2H(pin)+S3C24XX_VA_GPIO)
47
48
49#define S3C2410_GPIO_BASE(pin) ((((pin) & ~31) >> 1) + S3C24XX_VA_GPIO)
50#define S3C2410_GPIO_OFFSET(pin) ((pin) & 31)
51
52/* general configuration options */
53
54#define S3C2410_GPIO_LEAVE (0xFFFFFFFF)
55#define S3C2410_GPIO_INPUT (0xFFFFFFF0) /* not available on A */
56#define S3C2410_GPIO_OUTPUT (0xFFFFFFF1)
57#define S3C2410_GPIO_IRQ (0xFFFFFFF2) /* not available for all */
58#define S3C2410_GPIO_SFN2 (0xFFFFFFF2) /* bank A => addr/cs/nand */
59#define S3C2410_GPIO_SFN3 (0xFFFFFFF3) /* not available on A */
60
61/* register address for the GPIO registers.
62 * S3C24XX_GPIOREG2 is for the second set of registers in the
63 * GPIO which move between s3c2410 and s3c2412 type systems */
64
65#define S3C2410_GPIOREG(x) ((x) + S3C24XX_VA_GPIO)
66#define S3C24XX_GPIOREG2(x) ((x) + S3C24XX_VA_GPIO2)
67
68
69/* configure GPIO ports A..G */
70
71/* port A - S3C2410: 22bits, zero in bit X makes pin X output
72 * S3C2400: 18bits, zero in bit X makes pin X output
73 * 1 makes port special function, this is default
74*/
75#define S3C2410_GPACON S3C2410_GPIOREG(0x00)
76#define S3C2410_GPADAT S3C2410_GPIOREG(0x04)
77
78#define S3C2400_GPACON S3C2410_GPIOREG(0x00)
79#define S3C2400_GPADAT S3C2410_GPIOREG(0x04)
80
81#define S3C2410_GPA0 S3C2410_GPIONO(S3C2410_GPIO_BANKA, 0)
82#define S3C2410_GPA0_OUT (0<<0)
83#define S3C2410_GPA0_ADDR0 (1<<0)
84
85#define S3C2410_GPA1 S3C2410_GPIONO(S3C2410_GPIO_BANKA, 1)
86#define S3C2410_GPA1_OUT (0<<1)
87#define S3C2410_GPA1_ADDR16 (1<<1)
88
89#define S3C2410_GPA2 S3C2410_GPIONO(S3C2410_GPIO_BANKA, 2)
90#define S3C2410_GPA2_OUT (0<<2)
91#define S3C2410_GPA2_ADDR17 (1<<2)
92
93#define S3C2410_GPA3 S3C2410_GPIONO(S3C2410_GPIO_BANKA, 3)
94#define S3C2410_GPA3_OUT (0<<3)
95#define S3C2410_GPA3_ADDR18 (1<<3)
96
97#define S3C2410_GPA4 S3C2410_GPIONO(S3C2410_GPIO_BANKA, 4)
98#define S3C2410_GPA4_OUT (0<<4)
99#define S3C2410_GPA4_ADDR19 (1<<4)
100
101#define S3C2410_GPA5 S3C2410_GPIONO(S3C2410_GPIO_BANKA, 5)
102#define S3C2410_GPA5_OUT (0<<5)
103#define S3C2410_GPA5_ADDR20 (1<<5)
104
105#define S3C2410_GPA6 S3C2410_GPIONO(S3C2410_GPIO_BANKA, 6)
106#define S3C2410_GPA6_OUT (0<<6)
107#define S3C2410_GPA6_ADDR21 (1<<6)
108
109#define S3C2410_GPA7 S3C2410_GPIONO(S3C2410_GPIO_BANKA, 7)
110#define S3C2410_GPA7_OUT (0<<7)
111#define S3C2410_GPA7_ADDR22 (1<<7)
112
113#define S3C2410_GPA8 S3C2410_GPIONO(S3C2410_GPIO_BANKA, 8)
114#define S3C2410_GPA8_OUT (0<<8)
115#define S3C2410_GPA8_ADDR23 (1<<8)
116
117#define S3C2410_GPA9 S3C2410_GPIONO(S3C2410_GPIO_BANKA, 9)
118#define S3C2410_GPA9_OUT (0<<9)
119#define S3C2410_GPA9_ADDR24 (1<<9)
120
121#define S3C2410_GPA10 S3C2410_GPIONO(S3C2410_GPIO_BANKA, 10)
122#define S3C2410_GPA10_OUT (0<<10)
123#define S3C2410_GPA10_ADDR25 (1<<10)
124#define S3C2400_GPA10_SCKE (1<<10)
125
126#define S3C2410_GPA11 S3C2410_GPIONO(S3C2410_GPIO_BANKA, 11)
127#define S3C2410_GPA11_OUT (0<<11)
128#define S3C2410_GPA11_ADDR26 (1<<11)
129#define S3C2400_GPA11_nCAS0 (1<<11)
130
131#define S3C2410_GPA12 S3C2410_GPIONO(S3C2410_GPIO_BANKA, 12)
132#define S3C2410_GPA12_OUT (0<<12)
133#define S3C2410_GPA12_nGCS1 (1<<12)
134#define S3C2400_GPA12_nCAS1 (1<<12)
135
136#define S3C2410_GPA13 S3C2410_GPIONO(S3C2410_GPIO_BANKA, 13)
137#define S3C2410_GPA13_OUT (0<<13)
138#define S3C2410_GPA13_nGCS2 (1<<13)
139#define S3C2400_GPA13_nGCS1 (1<<13)
140
141#define S3C2410_GPA14 S3C2410_GPIONO(S3C2410_GPIO_BANKA, 14)
142#define S3C2410_GPA14_OUT (0<<14)
143#define S3C2410_GPA14_nGCS3 (1<<14)
144#define S3C2400_GPA14_nGCS2 (1<<14)
145
146#define S3C2410_GPA15 S3C2410_GPIONO(S3C2410_GPIO_BANKA, 15)
147#define S3C2410_GPA15_OUT (0<<15)
148#define S3C2410_GPA15_nGCS4 (1<<15)
149#define S3C2400_GPA15_nGCS3 (1<<15)
150
151#define S3C2410_GPA16 S3C2410_GPIONO(S3C2410_GPIO_BANKA, 16)
152#define S3C2410_GPA16_OUT (0<<16)
153#define S3C2410_GPA16_nGCS5 (1<<16)
154#define S3C2400_GPA16_nGCS4 (1<<16)
155
156#define S3C2410_GPA17 S3C2410_GPIONO(S3C2410_GPIO_BANKA, 17)
157#define S3C2410_GPA17_OUT (0<<17)
158#define S3C2410_GPA17_CLE (1<<17)
159#define S3C2400_GPA17_nGCS5 (1<<17)
160
161#define S3C2410_GPA18 S3C2410_GPIONO(S3C2410_GPIO_BANKA, 18)
162#define S3C2410_GPA18_OUT (0<<18)
163#define S3C2410_GPA18_ALE (1<<18)
164
165#define S3C2410_GPA19 S3C2410_GPIONO(S3C2410_GPIO_BANKA, 19)
166#define S3C2410_GPA19_OUT (0<<19)
167#define S3C2410_GPA19_nFWE (1<<19)
168
169#define S3C2410_GPA20 S3C2410_GPIONO(S3C2410_GPIO_BANKA, 20)
170#define S3C2410_GPA20_OUT (0<<20)
171#define S3C2410_GPA20_nFRE (1<<20)
172
173#define S3C2410_GPA21 S3C2410_GPIONO(S3C2410_GPIO_BANKA, 21)
174#define S3C2410_GPA21_OUT (0<<21)
175#define S3C2410_GPA21_nRSTOUT (1<<21)
176
177#define S3C2410_GPA22 S3C2410_GPIONO(S3C2410_GPIO_BANKA, 22)
178#define S3C2410_GPA22_OUT (0<<22)
179#define S3C2410_GPA22_nFCE (1<<22)
180
181/* 0x08 and 0x0c are reserved on S3C2410 */
182
183/* S3C2410:
184 * GPB is 10 IO pins, each configured by 2 bits each in GPBCON.
185 * 00 = input, 01 = output, 10=special function, 11=reserved
186
187 * S3C2400:
188 * GPB is 16 IO pins, each configured by 2 bits each in GPBCON.
189 * 00 = input, 01 = output, 10=data, 11=special function
190
191 * bit 0,1 = pin 0, 2,3= pin 1...
192 *
193 * CPBUP = pull up resistor control, 1=disabled, 0=enabled
194*/
195
196#define S3C2410_GPBCON S3C2410_GPIOREG(0x10)
197#define S3C2410_GPBDAT S3C2410_GPIOREG(0x14)
198#define S3C2410_GPBUP S3C2410_GPIOREG(0x18)
199
200#define S3C2400_GPBCON S3C2410_GPIOREG(0x08)
201#define S3C2400_GPBDAT S3C2410_GPIOREG(0x0C)
202#define S3C2400_GPBUP S3C2410_GPIOREG(0x10)
203
204/* no i/o pin in port b can have value 3 (unless it is a s3c2443) ! */
205
206#define S3C2410_GPB0 S3C2410_GPIONO(S3C2410_GPIO_BANKB, 0)
207#define S3C2410_GPB0_INP (0x00 << 0)
208#define S3C2410_GPB0_OUTP (0x01 << 0)
209#define S3C2410_GPB0_TOUT0 (0x02 << 0)
210#define S3C2400_GPB0_DATA16 (0x02 << 0)
211
212#define S3C2410_GPB1 S3C2410_GPIONO(S3C2410_GPIO_BANKB, 1)
213#define S3C2410_GPB1_INP (0x00 << 2)
214#define S3C2410_GPB1_OUTP (0x01 << 2)
215#define S3C2410_GPB1_TOUT1 (0x02 << 2)
216#define S3C2400_GPB1_DATA17 (0x02 << 2)
217
218#define S3C2410_GPB2 S3C2410_GPIONO(S3C2410_GPIO_BANKB, 2)
219#define S3C2410_GPB2_INP (0x00 << 4)
220#define S3C2410_GPB2_OUTP (0x01 << 4)
221#define S3C2410_GPB2_TOUT2 (0x02 << 4)
222#define S3C2400_GPB2_DATA18 (0x02 << 4)
223#define S3C2400_GPB2_TCLK1 (0x03 << 4)
224
225#define S3C2410_GPB3 S3C2410_GPIONO(S3C2410_GPIO_BANKB, 3)
226#define S3C2410_GPB3_INP (0x00 << 6)
227#define S3C2410_GPB3_OUTP (0x01 << 6)
228#define S3C2410_GPB3_TOUT3 (0x02 << 6)
229#define S3C2400_GPB3_DATA19 (0x02 << 6)
230#define S3C2400_GPB3_TXD1 (0x03 << 6)
231
232#define S3C2410_GPB4 S3C2410_GPIONO(S3C2410_GPIO_BANKB, 4)
233#define S3C2410_GPB4_INP (0x00 << 8)
234#define S3C2410_GPB4_OUTP (0x01 << 8)
235#define S3C2410_GPB4_TCLK0 (0x02 << 8)
236#define S3C2400_GPB4_DATA20 (0x02 << 8)
237#define S3C2410_GPB4_MASK (0x03 << 8)
238#define S3C2400_GPB4_RXD1 (0x03 << 8)
239#define S3C2400_GPB4_MASK (0x03 << 8)
240
241#define S3C2410_GPB5 S3C2410_GPIONO(S3C2410_GPIO_BANKB, 5)
242#define S3C2410_GPB5_INP (0x00 << 10)
243#define S3C2410_GPB5_OUTP (0x01 << 10)
244#define S3C2410_GPB5_nXBACK (0x02 << 10)
245#define S3C2443_GPB5_XBACK (0x03 << 10)
246#define S3C2400_GPB5_DATA21 (0x02 << 10)
247#define S3C2400_GPB5_nCTS1 (0x03 << 10)
248
249#define S3C2410_GPB6 S3C2410_GPIONO(S3C2410_GPIO_BANKB, 6)
250#define S3C2410_GPB6_INP (0x00 << 12)
251#define S3C2410_GPB6_OUTP (0x01 << 12)
252#define S3C2410_GPB6_nXBREQ (0x02 << 12)
253#define S3C2443_GPB6_XBREQ (0x03 << 12)
254#define S3C2400_GPB6_DATA22 (0x02 << 12)
255#define S3C2400_GPB6_nRTS1 (0x03 << 12)
256
257#define S3C2410_GPB7 S3C2410_GPIONO(S3C2410_GPIO_BANKB, 7)
258#define S3C2410_GPB7_INP (0x00 << 14)
259#define S3C2410_GPB7_OUTP (0x01 << 14)
260#define S3C2410_GPB7_nXDACK1 (0x02 << 14)
261#define S3C2443_GPB7_XDACK1 (0x03 << 14)
262#define S3C2400_GPB7_DATA23 (0x02 << 14)
263
264#define S3C2410_GPB8 S3C2410_GPIONO(S3C2410_GPIO_BANKB, 8)
265#define S3C2410_GPB8_INP (0x00 << 16)
266#define S3C2410_GPB8_OUTP (0x01 << 16)
267#define S3C2410_GPB8_nXDREQ1 (0x02 << 16)
268#define S3C2400_GPB8_DATA24 (0x02 << 16)
269
270#define S3C2410_GPB9 S3C2410_GPIONO(S3C2410_GPIO_BANKB, 9)
271#define S3C2410_GPB9_INP (0x00 << 18)
272#define S3C2410_GPB9_OUTP (0x01 << 18)
273#define S3C2410_GPB9_nXDACK0 (0x02 << 18)
274#define S3C2443_GPB9_XDACK0 (0x03 << 18)
275#define S3C2400_GPB9_DATA25 (0x02 << 18)
276#define S3C2400_GPB9_I2SSDI (0x03 << 18)
277
278#define S3C2410_GPB10 S3C2410_GPIONO(S3C2410_GPIO_BANKB, 10)
279#define S3C2410_GPB10_INP (0x00 << 20)
280#define S3C2410_GPB10_OUTP (0x01 << 20)
281#define S3C2410_GPB10_nXDRE0 (0x02 << 20)
282#define S3C2443_GPB10_XDREQ0 (0x03 << 20)
283#define S3C2400_GPB10_DATA26 (0x02 << 20)
284#define S3C2400_GPB10_nSS (0x03 << 20)
285
286#define S3C2400_GPB11 S3C2410_GPIONO(S3C2410_GPIO_BANKB, 11)
287#define S3C2400_GPB11_INP (0x00 << 22)
288#define S3C2400_GPB11_OUTP (0x01 << 22)
289#define S3C2400_GPB11_DATA27 (0x02 << 22)
290
291#define S3C2400_GPB12 S3C2410_GPIONO(S3C2410_GPIO_BANKB, 12)
292#define S3C2400_GPB12_INP (0x00 << 24)
293#define S3C2400_GPB12_OUTP (0x01 << 24)
294#define S3C2400_GPB12_DATA28 (0x02 << 24)
295
296#define S3C2400_GPB13 S3C2410_GPIONO(S3C2410_GPIO_BANKB, 13)
297#define S3C2400_GPB13_INP (0x00 << 26)
298#define S3C2400_GPB13_OUTP (0x01 << 26)
299#define S3C2400_GPB13_DATA29 (0x02 << 26)
300
301#define S3C2400_GPB14 S3C2410_GPIONO(S3C2410_GPIO_BANKB, 14)
302#define S3C2400_GPB14_INP (0x00 << 28)
303#define S3C2400_GPB14_OUTP (0x01 << 28)
304#define S3C2400_GPB14_DATA30 (0x02 << 28)
305
306#define S3C2400_GPB15 S3C2410_GPIONO(S3C2410_GPIO_BANKB, 15)
307#define S3C2400_GPB15_INP (0x00 << 30)
308#define S3C2400_GPB15_OUTP (0x01 << 30)
309#define S3C2400_GPB15_DATA31 (0x02 << 30)
310
311#define S3C2410_GPB_PUPDIS(x) (1<<(x))
312
313/* Port C consits of 16 GPIO/Special function
314 *
315 * almost identical setup to port b, but the special functions are mostly
316 * to do with the video system's sync/etc.
317*/
318
319#define S3C2410_GPCCON S3C2410_GPIOREG(0x20)
320#define S3C2410_GPCDAT S3C2410_GPIOREG(0x24)
321#define S3C2410_GPCUP S3C2410_GPIOREG(0x28)
322
323#define S3C2400_GPCCON S3C2410_GPIOREG(0x14)
324#define S3C2400_GPCDAT S3C2410_GPIOREG(0x18)
325#define S3C2400_GPCUP S3C2410_GPIOREG(0x1C)
326
327#define S3C2410_GPC0 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 0)
328#define S3C2410_GPC0_INP (0x00 << 0)
329#define S3C2410_GPC0_OUTP (0x01 << 0)
330#define S3C2410_GPC0_LEND (0x02 << 0)
331#define S3C2400_GPC0_VD0 (0x02 << 0)
332
333#define S3C2410_GPC1 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 1)
334#define S3C2410_GPC1_INP (0x00 << 2)
335#define S3C2410_GPC1_OUTP (0x01 << 2)
336#define S3C2410_GPC1_VCLK (0x02 << 2)
337#define S3C2400_GPC1_VD1 (0x02 << 2)
338
339#define S3C2410_GPC2 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 2)
340#define S3C2410_GPC2_INP (0x00 << 4)
341#define S3C2410_GPC2_OUTP (0x01 << 4)
342#define S3C2410_GPC2_VLINE (0x02 << 4)
343#define S3C2400_GPC2_VD2 (0x02 << 4)
344
345#define S3C2410_GPC3 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 3)
346#define S3C2410_GPC3_INP (0x00 << 6)
347#define S3C2410_GPC3_OUTP (0x01 << 6)
348#define S3C2410_GPC3_VFRAME (0x02 << 6)
349#define S3C2400_GPC3_VD3 (0x02 << 6)
350
351#define S3C2410_GPC4 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 4)
352#define S3C2410_GPC4_INP (0x00 << 8)
353#define S3C2410_GPC4_OUTP (0x01 << 8)
354#define S3C2410_GPC4_VM (0x02 << 8)
355#define S3C2400_GPC4_VD4 (0x02 << 8)
356
357#define S3C2410_GPC5 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 5)
358#define S3C2410_GPC5_INP (0x00 << 10)
359#define S3C2410_GPC5_OUTP (0x01 << 10)
360#define S3C2410_GPC5_LCDVF0 (0x02 << 10)
361#define S3C2400_GPC5_VD5 (0x02 << 10)
362
363#define S3C2410_GPC6 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 6)
364#define S3C2410_GPC6_INP (0x00 << 12)
365#define S3C2410_GPC6_OUTP (0x01 << 12)
366#define S3C2410_GPC6_LCDVF1 (0x02 << 12)
367#define S3C2400_GPC6_VD6 (0x02 << 12)
368
369#define S3C2410_GPC7 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 7)
370#define S3C2410_GPC7_INP (0x00 << 14)
371#define S3C2410_GPC7_OUTP (0x01 << 14)
372#define S3C2410_GPC7_LCDVF2 (0x02 << 14)
373#define S3C2400_GPC7_VD7 (0x02 << 14)
374
375#define S3C2410_GPC8 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 8)
376#define S3C2410_GPC8_INP (0x00 << 16)
377#define S3C2410_GPC8_OUTP (0x01 << 16)
378#define S3C2410_GPC8_VD0 (0x02 << 16)
379#define S3C2400_GPC8_VD8 (0x02 << 16)
380
381#define S3C2410_GPC9 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 9)
382#define S3C2410_GPC9_INP (0x00 << 18)
383#define S3C2410_GPC9_OUTP (0x01 << 18)
384#define S3C2410_GPC9_VD1 (0x02 << 18)
385#define S3C2400_GPC9_VD9 (0x02 << 18)
386
387#define S3C2410_GPC10 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 10)
388#define S3C2410_GPC10_INP (0x00 << 20)
389#define S3C2410_GPC10_OUTP (0x01 << 20)
390#define S3C2410_GPC10_VD2 (0x02 << 20)
391#define S3C2400_GPC10_VD10 (0x02 << 20)
392
393#define S3C2410_GPC11 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 11)
394#define S3C2410_GPC11_INP (0x00 << 22)
395#define S3C2410_GPC11_OUTP (0x01 << 22)
396#define S3C2410_GPC11_VD3 (0x02 << 22)
397#define S3C2400_GPC11_VD11 (0x02 << 22)
398
399#define S3C2410_GPC12 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 12)
400#define S3C2410_GPC12_INP (0x00 << 24)
401#define S3C2410_GPC12_OUTP (0x01 << 24)
402#define S3C2410_GPC12_VD4 (0x02 << 24)
403#define S3C2400_GPC12_VD12 (0x02 << 24)
404
405#define S3C2410_GPC13 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 13)
406#define S3C2410_GPC13_INP (0x00 << 26)
407#define S3C2410_GPC13_OUTP (0x01 << 26)
408#define S3C2410_GPC13_VD5 (0x02 << 26)
409#define S3C2400_GPC13_VD13 (0x02 << 26)
410
411#define S3C2410_GPC14 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 14)
412#define S3C2410_GPC14_INP (0x00 << 28)
413#define S3C2410_GPC14_OUTP (0x01 << 28)
414#define S3C2410_GPC14_VD6 (0x02 << 28)
415#define S3C2400_GPC14_VD14 (0x02 << 28)
416
417#define S3C2410_GPC15 S3C2410_GPIONO(S3C2410_GPIO_BANKC, 15)
418#define S3C2410_GPC15_INP (0x00 << 30)
419#define S3C2410_GPC15_OUTP (0x01 << 30)
420#define S3C2410_GPC15_VD7 (0x02 << 30)
421#define S3C2400_GPC15_VD15 (0x02 << 30)
422
423#define S3C2410_GPC_PUPDIS(x) (1<<(x))
424
425/*
426 * S3C2410: Port D consists of 16 GPIO/Special function
427 *
428 * almost identical setup to port b, but the special functions are mostly
429 * to do with the video system's data.
430 *
431 * S3C2400: Port D consists of 11 GPIO/Special function
432 *
433 * almost identical setup to port c
434*/
435
436#define S3C2410_GPDCON S3C2410_GPIOREG(0x30)
437#define S3C2410_GPDDAT S3C2410_GPIOREG(0x34)
438#define S3C2410_GPDUP S3C2410_GPIOREG(0x38)
439
440#define S3C2400_GPDCON S3C2410_GPIOREG(0x20)
441#define S3C2400_GPDDAT S3C2410_GPIOREG(0x24)
442#define S3C2400_GPDUP S3C2410_GPIOREG(0x28)
443
444#define S3C2410_GPD0 S3C2410_GPIONO(S3C2410_GPIO_BANKD, 0)
445#define S3C2410_GPD0_INP (0x00 << 0)
446#define S3C2410_GPD0_OUTP (0x01 << 0)
447#define S3C2410_GPD0_VD8 (0x02 << 0)
448#define S3C2400_GPD0_VFRAME (0x02 << 0)
449#define S3C2442_GPD0_nSPICS1 (0x03 << 0)
450
451#define S3C2410_GPD1 S3C2410_GPIONO(S3C2410_GPIO_BANKD, 1)
452#define S3C2410_GPD1_INP (0x00 << 2)
453#define S3C2410_GPD1_OUTP (0x01 << 2)
454#define S3C2410_GPD1_VD9 (0x02 << 2)
455#define S3C2400_GPD1_VM (0x02 << 2)
456#define S3C2442_GPD1_SPICLK1 (0x03 << 2)
457
458#define S3C2410_GPD2 S3C2410_GPIONO(S3C2410_GPIO_BANKD, 2)
459#define S3C2410_GPD2_INP (0x00 << 4)
460#define S3C2410_GPD2_OUTP (0x01 << 4)
461#define S3C2410_GPD2_VD10 (0x02 << 4)
462#define S3C2400_GPD2_VLINE (0x02 << 4)
463
464#define S3C2410_GPD3 S3C2410_GPIONO(S3C2410_GPIO_BANKD, 3)
465#define S3C2410_GPD3_INP (0x00 << 6)
466#define S3C2410_GPD3_OUTP (0x01 << 6)
467#define S3C2410_GPD3_VD11 (0x02 << 6)
468#define S3C2400_GPD3_VCLK (0x02 << 6)
469
470#define S3C2410_GPD4 S3C2410_GPIONO(S3C2410_GPIO_BANKD, 4)
471#define S3C2410_GPD4_INP (0x00 << 8)
472#define S3C2410_GPD4_OUTP (0x01 << 8)
473#define S3C2410_GPD4_VD12 (0x02 << 8)
474#define S3C2400_GPD4_LEND (0x02 << 8)
475
476#define S3C2410_GPD5 S3C2410_GPIONO(S3C2410_GPIO_BANKD, 5)
477#define S3C2410_GPD5_INP (0x00 << 10)
478#define S3C2410_GPD5_OUTP (0x01 << 10)
479#define S3C2410_GPD5_VD13 (0x02 << 10)
480#define S3C2400_GPD5_TOUT0 (0x02 << 10)
481
482#define S3C2410_GPD6 S3C2410_GPIONO(S3C2410_GPIO_BANKD, 6)
483#define S3C2410_GPD6_INP (0x00 << 12)
484#define S3C2410_GPD6_OUTP (0x01 << 12)
485#define S3C2410_GPD6_VD14 (0x02 << 12)
486#define S3C2400_GPD6_TOUT1 (0x02 << 12)
487
488#define S3C2410_GPD7 S3C2410_GPIONO(S3C2410_GPIO_BANKD, 7)
489#define S3C2410_GPD7_INP (0x00 << 14)
490#define S3C2410_GPD7_OUTP (0x01 << 14)
491#define S3C2410_GPD7_VD15 (0x02 << 14)
492#define S3C2400_GPD7_TOUT2 (0x02 << 14)
493
494#define S3C2410_GPD8 S3C2410_GPIONO(S3C2410_GPIO_BANKD, 8)
495#define S3C2410_GPD8_INP (0x00 << 16)
496#define S3C2410_GPD8_OUTP (0x01 << 16)
497#define S3C2410_GPD8_VD16 (0x02 << 16)
498#define S3C2400_GPD8_TOUT3 (0x02 << 16)
499
500#define S3C2410_GPD9 S3C2410_GPIONO(S3C2410_GPIO_BANKD, 9)
501#define S3C2410_GPD9_INP (0x00 << 18)
502#define S3C2410_GPD9_OUTP (0x01 << 18)
503#define S3C2410_GPD9_VD17 (0x02 << 18)
504#define S3C2400_GPD9_TCLK0 (0x02 << 18)
505#define S3C2410_GPD9_MASK (0x03 << 18)
506
507#define S3C2410_GPD10 S3C2410_GPIONO(S3C2410_GPIO_BANKD, 10)
508#define S3C2410_GPD10_INP (0x00 << 20)
509#define S3C2410_GPD10_OUTP (0x01 << 20)
510#define S3C2410_GPD10_VD18 (0x02 << 20)
511#define S3C2400_GPD10_nWAIT (0x02 << 20)
512
513#define S3C2410_GPD11 S3C2410_GPIONO(S3C2410_GPIO_BANKD, 11)
514#define S3C2410_GPD11_INP (0x00 << 22)
515#define S3C2410_GPD11_OUTP (0x01 << 22)
516#define S3C2410_GPD11_VD19 (0x02 << 22)
517
518#define S3C2410_GPD12 S3C2410_GPIONO(S3C2410_GPIO_BANKD, 12)
519#define S3C2410_GPD12_INP (0x00 << 24)
520#define S3C2410_GPD12_OUTP (0x01 << 24)
521#define S3C2410_GPD12_VD20 (0x02 << 24)
522
523#define S3C2410_GPD13 S3C2410_GPIONO(S3C2410_GPIO_BANKD, 13)
524#define S3C2410_GPD13_INP (0x00 << 26)
525#define S3C2410_GPD13_OUTP (0x01 << 26)
526#define S3C2410_GPD13_VD21 (0x02 << 26)
527
528#define S3C2410_GPD14 S3C2410_GPIONO(S3C2410_GPIO_BANKD, 14)
529#define S3C2410_GPD14_INP (0x00 << 28)
530#define S3C2410_GPD14_OUTP (0x01 << 28)
531#define S3C2410_GPD14_VD22 (0x02 << 28)
532#define S3C2410_GPD14_nSS1 (0x03 << 28)
533
534#define S3C2410_GPD15 S3C2410_GPIONO(S3C2410_GPIO_BANKD, 15)
535#define S3C2410_GPD15_INP (0x00 << 30)
536#define S3C2410_GPD15_OUTP (0x01 << 30)
537#define S3C2410_GPD15_VD23 (0x02 << 30)
538#define S3C2410_GPD15_nSS0 (0x03 << 30)
539
540#define S3C2410_GPD_PUPDIS(x) (1<<(x))
541
542/* S3C2410:
543 * Port E consists of 16 GPIO/Special function
544 *
545 * again, the same as port B, but dealing with I2S, SDI, and
546 * more miscellaneous functions
547 *
548 * S3C2400:
549 * Port E consists of 12 GPIO/Special function
550 *
551 * GPIO / interrupt inputs
552*/
553
554#define S3C2410_GPECON S3C2410_GPIOREG(0x40)
555#define S3C2410_GPEDAT S3C2410_GPIOREG(0x44)
556#define S3C2410_GPEUP S3C2410_GPIOREG(0x48)
557
558#define S3C2400_GPECON S3C2410_GPIOREG(0x2C)
559#define S3C2400_GPEDAT S3C2410_GPIOREG(0x30)
560#define S3C2400_GPEUP S3C2410_GPIOREG(0x34)
561
562#define S3C2410_GPE0 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 0)
563#define S3C2410_GPE0_INP (0x00 << 0)
564#define S3C2410_GPE0_OUTP (0x01 << 0)
565#define S3C2410_GPE0_I2SLRCK (0x02 << 0)
566#define S3C2443_GPE0_AC_nRESET (0x03 << 0)
567#define S3C2400_GPE0_EINT0 (0x02 << 0)
568#define S3C2410_GPE0_MASK (0x03 << 0)
569
570#define S3C2410_GPE1 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 1)
571#define S3C2410_GPE1_INP (0x00 << 2)
572#define S3C2410_GPE1_OUTP (0x01 << 2)
573#define S3C2410_GPE1_I2SSCLK (0x02 << 2)
574#define S3C2443_GPE1_AC_SYNC (0x03 << 2)
575#define S3C2400_GPE1_EINT1 (0x02 << 2)
576#define S3C2400_GPE1_nSS (0x03 << 2)
577#define S3C2410_GPE1_MASK (0x03 << 2)
578
579#define S3C2410_GPE2 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 2)
580#define S3C2410_GPE2_INP (0x00 << 4)
581#define S3C2410_GPE2_OUTP (0x01 << 4)
582#define S3C2410_GPE2_CDCLK (0x02 << 4)
583#define S3C2443_GPE2_AC_BITCLK (0x03 << 4)
584#define S3C2400_GPE2_EINT2 (0x02 << 4)
585#define S3C2400_GPE2_I2SSDI (0x03 << 4)
586
587#define S3C2410_GPE3 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 3)
588#define S3C2410_GPE3_INP (0x00 << 6)
589#define S3C2410_GPE3_OUTP (0x01 << 6)
590#define S3C2410_GPE3_I2SSDI (0x02 << 6)
591#define S3C2443_GPE3_AC_SDI (0x03 << 6)
592#define S3C2400_GPE3_EINT3 (0x02 << 6)
593#define S3C2400_GPE3_nCTS1 (0x03 << 6)
594#define S3C2410_GPE3_nSS0 (0x03 << 6)
595#define S3C2410_GPE3_MASK (0x03 << 6)
596
597#define S3C2410_GPE4 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 4)
598#define S3C2410_GPE4_INP (0x00 << 8)
599#define S3C2410_GPE4_OUTP (0x01 << 8)
600#define S3C2410_GPE4_I2SSDO (0x02 << 8)
601#define S3C2443_GPE4_AC_SDO (0x03 << 8)
602#define S3C2400_GPE4_EINT4 (0x02 << 8)
603#define S3C2400_GPE4_nRTS1 (0x03 << 8)
604#define S3C2410_GPE4_I2SSDI (0x03 << 8)
605#define S3C2410_GPE4_MASK (0x03 << 8)
606
607#define S3C2410_GPE5 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 5)
608#define S3C2410_GPE5_INP (0x00 << 10)
609#define S3C2410_GPE5_OUTP (0x01 << 10)
610#define S3C2410_GPE5_SDCLK (0x02 << 10)
611#define S3C2443_GPE5_SD1_CLK (0x02 << 10)
612#define S3C2400_GPE5_EINT5 (0x02 << 10)
613#define S3C2400_GPE5_TCLK1 (0x03 << 10)
614
615#define S3C2410_GPE6 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 6)
616#define S3C2410_GPE6_INP (0x00 << 12)
617#define S3C2410_GPE6_OUTP (0x01 << 12)
618#define S3C2410_GPE6_SDCMD (0x02 << 12)
619#define S3C2443_GPE6_SD1_CMD (0x02 << 12)
620#define S3C2443_GPE6_AC_BITCLK (0x03 << 12)
621#define S3C2400_GPE6_EINT6 (0x02 << 12)
622
623#define S3C2410_GPE7 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 7)
624#define S3C2410_GPE7_INP (0x00 << 14)
625#define S3C2410_GPE7_OUTP (0x01 << 14)
626#define S3C2410_GPE7_SDDAT0 (0x02 << 14)
627#define S3C2443_GPE5_SD1_DAT0 (0x02 << 14)
628#define S3C2443_GPE7_AC_SDI (0x03 << 14)
629#define S3C2400_GPE7_EINT7 (0x02 << 14)
630
631#define S3C2410_GPE8 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 8)
632#define S3C2410_GPE8_INP (0x00 << 16)
633#define S3C2410_GPE8_OUTP (0x01 << 16)
634#define S3C2410_GPE8_SDDAT1 (0x02 << 16)
635#define S3C2443_GPE8_SD1_DAT1 (0x02 << 16)
636#define S3C2443_GPE8_AC_SDO (0x03 << 16)
637#define S3C2400_GPE8_nXDACK0 (0x02 << 16)
638
639#define S3C2410_GPE9 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 9)
640#define S3C2410_GPE9_INP (0x00 << 18)
641#define S3C2410_GPE9_OUTP (0x01 << 18)
642#define S3C2410_GPE9_SDDAT2 (0x02 << 18)
643#define S3C2443_GPE9_SD1_DAT2 (0x02 << 18)
644#define S3C2443_GPE9_AC_SYNC (0x03 << 18)
645#define S3C2400_GPE9_nXDACK1 (0x02 << 18)
646#define S3C2400_GPE9_nXBACK (0x03 << 18)
647
648#define S3C2410_GPE10 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 10)
649#define S3C2410_GPE10_INP (0x00 << 20)
650#define S3C2410_GPE10_OUTP (0x01 << 20)
651#define S3C2410_GPE10_SDDAT3 (0x02 << 20)
652#define S3C2443_GPE10_SD1_DAT3 (0x02 << 20)
653#define S3C2443_GPE10_AC_nRESET (0x03 << 20)
654#define S3C2400_GPE10_nXDREQ0 (0x02 << 20)
655
656#define S3C2410_GPE11 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 11)
657#define S3C2410_GPE11_INP (0x00 << 22)
658#define S3C2410_GPE11_OUTP (0x01 << 22)
659#define S3C2410_GPE11_SPIMISO0 (0x02 << 22)
660#define S3C2400_GPE11_nXDREQ1 (0x02 << 22)
661#define S3C2400_GPE11_nXBREQ (0x03 << 22)
662
663#define S3C2410_GPE12 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 12)
664#define S3C2410_GPE12_INP (0x00 << 24)
665#define S3C2410_GPE12_OUTP (0x01 << 24)
666#define S3C2410_GPE12_SPIMOSI0 (0x02 << 24)
667
668#define S3C2410_GPE13 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 13)
669#define S3C2410_GPE13_INP (0x00 << 26)
670#define S3C2410_GPE13_OUTP (0x01 << 26)
671#define S3C2410_GPE13_SPICLK0 (0x02 << 26)
672
673#define S3C2410_GPE14 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 14)
674#define S3C2410_GPE14_INP (0x00 << 28)
675#define S3C2410_GPE14_OUTP (0x01 << 28)
676#define S3C2410_GPE14_IICSCL (0x02 << 28)
677#define S3C2410_GPE14_MASK (0x03 << 28)
678
679#define S3C2410_GPE15 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 15)
680#define S3C2410_GPE15_INP (0x00 << 30)
681#define S3C2410_GPE15_OUTP (0x01 << 30)
682#define S3C2410_GPE15_IICSDA (0x02 << 30)
683#define S3C2410_GPE15_MASK (0x03 << 30)
684
685#define S3C2440_GPE0_ACSYNC (0x03 << 0)
686#define S3C2440_GPE1_ACBITCLK (0x03 << 2)
687#define S3C2440_GPE2_ACRESET (0x03 << 4)
688#define S3C2440_GPE3_ACIN (0x03 << 6)
689#define S3C2440_GPE4_ACOUT (0x03 << 8)
690
691#define S3C2410_GPE_PUPDIS(x) (1<<(x))
692
693/* S3C2410:
694 * Port F consists of 8 GPIO/Special function
695 *
696 * GPIO / interrupt inputs
697 *
698 * GPFCON has 2 bits for each of the input pins on port F
699 * 00 = 0 input, 1 output, 2 interrupt (EINT0..7), 3 undefined
700 *
701 * pull up works like all other ports.
702 *
703 * S3C2400:
704 * Port F consists of 7 GPIO/Special function
705 *
706 * GPIO/serial/misc pins
707*/
708
709#define S3C2410_GPFCON S3C2410_GPIOREG(0x50)
710#define S3C2410_GPFDAT S3C2410_GPIOREG(0x54)
711#define S3C2410_GPFUP S3C2410_GPIOREG(0x58)
712
713#define S3C2400_GPFCON S3C2410_GPIOREG(0x38)
714#define S3C2400_GPFDAT S3C2410_GPIOREG(0x3C)
715#define S3C2400_GPFUP S3C2410_GPIOREG(0x40)
716
717#define S3C2410_GPF0 S3C2410_GPIONO(S3C2410_GPIO_BANKF, 0)
718#define S3C2410_GPF0_INP (0x00 << 0)
719#define S3C2410_GPF0_OUTP (0x01 << 0)
720#define S3C2410_GPF0_EINT0 (0x02 << 0)
721#define S3C2400_GPF0_RXD0 (0x02 << 0)
722
723#define S3C2410_GPF1 S3C2410_GPIONO(S3C2410_GPIO_BANKF, 1)
724#define S3C2410_GPF1_INP (0x00 << 2)
725#define S3C2410_GPF1_OUTP (0x01 << 2)
726#define S3C2410_GPF1_EINT1 (0x02 << 2)
727#define S3C2400_GPF1_RXD1 (0x02 << 2)
728#define S3C2400_GPF1_IICSDA (0x03 << 2)
729
730#define S3C2410_GPF2 S3C2410_GPIONO(S3C2410_GPIO_BANKF, 2)
731#define S3C2410_GPF2_INP (0x00 << 4)
732#define S3C2410_GPF2_OUTP (0x01 << 4)
733#define S3C2410_GPF2_EINT2 (0x02 << 4)
734#define S3C2400_GPF2_TXD0 (0x02 << 4)
735
736#define S3C2410_GPF3 S3C2410_GPIONO(S3C2410_GPIO_BANKF, 3)
737#define S3C2410_GPF3_INP (0x00 << 6)
738#define S3C2410_GPF3_OUTP (0x01 << 6)
739#define S3C2410_GPF3_EINT3 (0x02 << 6)
740#define S3C2400_GPF3_TXD1 (0x02 << 6)
741#define S3C2400_GPF3_IICSCL (0x03 << 6)
742
743#define S3C2410_GPF4 S3C2410_GPIONO(S3C2410_GPIO_BANKF, 4)
744#define S3C2410_GPF4_INP (0x00 << 8)
745#define S3C2410_GPF4_OUTP (0x01 << 8)
746#define S3C2410_GPF4_EINT4 (0x02 << 8)
747#define S3C2400_GPF4_nRTS0 (0x02 << 8)
748#define S3C2400_GPF4_nXBACK (0x03 << 8)
749
750#define S3C2410_GPF5 S3C2410_GPIONO(S3C2410_GPIO_BANKF, 5)
751#define S3C2410_GPF5_INP (0x00 << 10)
752#define S3C2410_GPF5_OUTP (0x01 << 10)
753#define S3C2410_GPF5_EINT5 (0x02 << 10)
754#define S3C2400_GPF5_nCTS0 (0x02 << 10)
755#define S3C2400_GPF5_nXBREQ (0x03 << 10)
756
757#define S3C2410_GPF6 S3C2410_GPIONO(S3C2410_GPIO_BANKF, 6)
758#define S3C2410_GPF6_INP (0x00 << 12)
759#define S3C2410_GPF6_OUTP (0x01 << 12)
760#define S3C2410_GPF6_EINT6 (0x02 << 12)
761#define S3C2400_GPF6_CLKOUT (0x02 << 12)
762
763#define S3C2410_GPF7 S3C2410_GPIONO(S3C2410_GPIO_BANKF, 7)
764#define S3C2410_GPF7_INP (0x00 << 14)
765#define S3C2410_GPF7_OUTP (0x01 << 14)
766#define S3C2410_GPF7_EINT7 (0x02 << 14)
767
768#define S3C2410_GPF_PUPDIS(x) (1<<(x))
769
770/* S3C2410:
771 * Port G consists of 8 GPIO/IRQ/Special function
772 *
773 * GPGCON has 2 bits for each of the input pins on port F
774 * 00 = 0 input, 1 output, 2 interrupt (EINT0..7), 3 special func
775 *
776 * pull up works like all other ports.
777 *
778 * S3C2400:
779 * Port G consists of 10 GPIO/Special function
780*/
781
782#define S3C2410_GPGCON S3C2410_GPIOREG(0x60)
783#define S3C2410_GPGDAT S3C2410_GPIOREG(0x64)
784#define S3C2410_GPGUP S3C2410_GPIOREG(0x68)
785
786#define S3C2400_GPGCON S3C2410_GPIOREG(0x44)
787#define S3C2400_GPGDAT S3C2410_GPIOREG(0x48)
788#define S3C2400_GPGUP S3C2410_GPIOREG(0x4C)
789
790#define S3C2410_GPG0 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 0)
791#define S3C2410_GPG0_INP (0x00 << 0)
792#define S3C2410_GPG0_OUTP (0x01 << 0)
793#define S3C2410_GPG0_EINT8 (0x02 << 0)
794#define S3C2400_GPG0_I2SLRCK (0x02 << 0)
795
796#define S3C2410_GPG1 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 1)
797#define S3C2410_GPG1_INP (0x00 << 2)
798#define S3C2410_GPG1_OUTP (0x01 << 2)
799#define S3C2410_GPG1_EINT9 (0x02 << 2)
800#define S3C2400_GPG1_I2SSCLK (0x02 << 2)
801
802#define S3C2410_GPG2 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 2)
803#define S3C2410_GPG2_INP (0x00 << 4)
804#define S3C2410_GPG2_OUTP (0x01 << 4)
805#define S3C2410_GPG2_EINT10 (0x02 << 4)
806#define S3C2410_GPG2_nSS0 (0x03 << 4)
807#define S3C2400_GPG2_CDCLK (0x02 << 4)
808
809#define S3C2410_GPG3 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 3)
810#define S3C2410_GPG3_INP (0x00 << 6)
811#define S3C2410_GPG3_OUTP (0x01 << 6)
812#define S3C2410_GPG3_EINT11 (0x02 << 6)
813#define S3C2410_GPG3_nSS1 (0x03 << 6)
814#define S3C2400_GPG3_I2SSDO (0x02 << 6)
815#define S3C2400_GPG3_I2SSDI (0x03 << 6)
816
817#define S3C2410_GPG4 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 4)
818#define S3C2410_GPG4_INP (0x00 << 8)
819#define S3C2410_GPG4_OUTP (0x01 << 8)
820#define S3C2410_GPG4_EINT12 (0x02 << 8)
821#define S3C2400_GPG4_MMCCLK (0x02 << 8)
822#define S3C2400_GPG4_I2SSDI (0x03 << 8)
823#define S3C2410_GPG4_LCDPWREN (0x03 << 8)
824#define S3C2443_GPG4_LCDPWRDN (0x03 << 8)
825
826#define S3C2410_GPG5 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 5)
827#define S3C2410_GPG5_INP (0x00 << 10)
828#define S3C2410_GPG5_OUTP (0x01 << 10)
829#define S3C2410_GPG5_EINT13 (0x02 << 10)
830#define S3C2400_GPG5_MMCCMD (0x02 << 10)
831#define S3C2400_GPG5_IICSDA (0x03 << 10)
832#define S3C2410_GPG5_SPIMISO1 (0x03 << 10) /* not s3c2443 */
833
834#define S3C2410_GPG6 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 6)
835#define S3C2410_GPG6_INP (0x00 << 12)
836#define S3C2410_GPG6_OUTP (0x01 << 12)
837#define S3C2410_GPG6_EINT14 (0x02 << 12)
838#define S3C2400_GPG6_MMCDAT (0x02 << 12)
839#define S3C2400_GPG6_IICSCL (0x03 << 12)
840#define S3C2410_GPG6_SPIMOSI1 (0x03 << 12)
841
842#define S3C2410_GPG7 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 7)
843#define S3C2410_GPG7_INP (0x00 << 14)
844#define S3C2410_GPG7_OUTP (0x01 << 14)
845#define S3C2410_GPG7_EINT15 (0x02 << 14)
846#define S3C2410_GPG7_SPICLK1 (0x03 << 14)
847#define S3C2400_GPG7_SPIMISO (0x02 << 14)
848#define S3C2400_GPG7_IICSDA (0x03 << 14)
849
850#define S3C2410_GPG8 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 8)
851#define S3C2410_GPG8_INP (0x00 << 16)
852#define S3C2410_GPG8_OUTP (0x01 << 16)
853#define S3C2410_GPG8_EINT16 (0x02 << 16)
854#define S3C2400_GPG8_SPIMOSI (0x02 << 16)
855#define S3C2400_GPG8_IICSCL (0x03 << 16)
856
857#define S3C2410_GPG9 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 9)
858#define S3C2410_GPG9_INP (0x00 << 18)
859#define S3C2410_GPG9_OUTP (0x01 << 18)
860#define S3C2410_GPG9_EINT17 (0x02 << 18)
861#define S3C2400_GPG9_SPICLK (0x02 << 18)
862#define S3C2400_GPG9_MMCCLK (0x03 << 18)
863
864#define S3C2410_GPG10 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 10)
865#define S3C2410_GPG10_INP (0x00 << 20)
866#define S3C2410_GPG10_OUTP (0x01 << 20)
867#define S3C2410_GPG10_EINT18 (0x02 << 20)
868
869#define S3C2410_GPG11 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 11)
870#define S3C2410_GPG11_INP (0x00 << 22)
871#define S3C2410_GPG11_OUTP (0x01 << 22)
872#define S3C2410_GPG11_EINT19 (0x02 << 22)
873#define S3C2410_GPG11_TCLK1 (0x03 << 22)
874#define S3C2443_GPG11_CF_nIREQ (0x03 << 22)
875
876#define S3C2410_GPG12 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 12)
877#define S3C2410_GPG12_INP (0x00 << 24)
878#define S3C2410_GPG12_OUTP (0x01 << 24)
879#define S3C2410_GPG12_EINT20 (0x02 << 24)
880#define S3C2410_GPG12_XMON (0x03 << 24)
881#define S3C2442_GPG12_nSPICS0 (0x03 << 24)
882#define S3C2443_GPG12_nINPACK (0x03 << 24)
883
884#define S3C2410_GPG13 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 13)
885#define S3C2410_GPG13_INP (0x00 << 26)
886#define S3C2410_GPG13_OUTP (0x01 << 26)
887#define S3C2410_GPG13_EINT21 (0x02 << 26)
888#define S3C2410_GPG13_nXPON (0x03 << 26)
889#define S3C2443_GPG13_CF_nREG (0x03 << 26)
890
891#define S3C2410_GPG14 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 14)
892#define S3C2410_GPG14_INP (0x00 << 28)
893#define S3C2410_GPG14_OUTP (0x01 << 28)
894#define S3C2410_GPG14_EINT22 (0x02 << 28)
895#define S3C2410_GPG14_YMON (0x03 << 28)
896#define S3C2443_GPG14_CF_RESET (0x03 << 28)
897
898#define S3C2410_GPG15 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 15)
899#define S3C2410_GPG15_INP (0x00 << 30)
900#define S3C2410_GPG15_OUTP (0x01 << 30)
901#define S3C2410_GPG15_EINT23 (0x02 << 30)
902#define S3C2410_GPG15_nYPON (0x03 << 30)
903#define S3C2443_GPG15_CF_PWR (0x03 << 30)
904
905#define S3C2410_GPG_PUPDIS(x) (1<<(x))
906
907/* Port H consists of11 GPIO/serial/Misc pins
908 *
909 * GPGCON has 2 bits for each of the input pins on port F
910 * 00 = 0 input, 1 output, 2 interrupt (EINT0..7), 3 special func
911 *
912 * pull up works like all other ports.
913*/
914
915#define S3C2410_GPHCON S3C2410_GPIOREG(0x70)
916#define S3C2410_GPHDAT S3C2410_GPIOREG(0x74)
917#define S3C2410_GPHUP S3C2410_GPIOREG(0x78)
918
919#define S3C2410_GPH0 S3C2410_GPIONO(S3C2410_GPIO_BANKH, 0)
920#define S3C2410_GPH0_INP (0x00 << 0)
921#define S3C2410_GPH0_OUTP (0x01 << 0)
922#define S3C2410_GPH0_nCTS0 (0x02 << 0)
923
924#define S3C2410_GPH1 S3C2410_GPIONO(S3C2410_GPIO_BANKH, 1)
925#define S3C2410_GPH1_INP (0x00 << 2)
926#define S3C2410_GPH1_OUTP (0x01 << 2)
927#define S3C2410_GPH1_nRTS0 (0x02 << 2)
928
929#define S3C2410_GPH2 S3C2410_GPIONO(S3C2410_GPIO_BANKH, 2)
930#define S3C2410_GPH2_INP (0x00 << 4)
931#define S3C2410_GPH2_OUTP (0x01 << 4)
932#define S3C2410_GPH2_TXD0 (0x02 << 4)
933
934#define S3C2410_GPH3 S3C2410_GPIONO(S3C2410_GPIO_BANKH, 3)
935#define S3C2410_GPH3_INP (0x00 << 6)
936#define S3C2410_GPH3_OUTP (0x01 << 6)
937#define S3C2410_GPH3_RXD0 (0x02 << 6)
938
939#define S3C2410_GPH4 S3C2410_GPIONO(S3C2410_GPIO_BANKH, 4)
940#define S3C2410_GPH4_INP (0x00 << 8)
941#define S3C2410_GPH4_OUTP (0x01 << 8)
942#define S3C2410_GPH4_TXD1 (0x02 << 8)
943
944#define S3C2410_GPH5 S3C2410_GPIONO(S3C2410_GPIO_BANKH, 5)
945#define S3C2410_GPH5_INP (0x00 << 10)
946#define S3C2410_GPH5_OUTP (0x01 << 10)
947#define S3C2410_GPH5_RXD1 (0x02 << 10)
948
949#define S3C2410_GPH6 S3C2410_GPIONO(S3C2410_GPIO_BANKH, 6)
950#define S3C2410_GPH6_INP (0x00 << 12)
951#define S3C2410_GPH6_OUTP (0x01 << 12)
952#define S3C2410_GPH6_TXD2 (0x02 << 12)
953#define S3C2410_GPH6_nRTS1 (0x03 << 12)
954
955#define S3C2410_GPH7 S3C2410_GPIONO(S3C2410_GPIO_BANKH, 7)
956#define S3C2410_GPH7_INP (0x00 << 14)
957#define S3C2410_GPH7_OUTP (0x01 << 14)
958#define S3C2410_GPH7_RXD2 (0x02 << 14)
959#define S3C2410_GPH7_nCTS1 (0x03 << 14)
960
961#define S3C2410_GPH8 S3C2410_GPIONO(S3C2410_GPIO_BANKH, 8)
962#define S3C2410_GPH8_INP (0x00 << 16)
963#define S3C2410_GPH8_OUTP (0x01 << 16)
964#define S3C2410_GPH8_UCLK (0x02 << 16)
965
966#define S3C2410_GPH9 S3C2410_GPIONO(S3C2410_GPIO_BANKH, 9)
967#define S3C2410_GPH9_INP (0x00 << 18)
968#define S3C2410_GPH9_OUTP (0x01 << 18)
969#define S3C2410_GPH9_CLKOUT0 (0x02 << 18)
970#define S3C2442_GPH9_nSPICS0 (0x03 << 18)
971
972#define S3C2410_GPH10 S3C2410_GPIONO(S3C2410_GPIO_BANKH, 10)
973#define S3C2410_GPH10_INP (0x00 << 20)
974#define S3C2410_GPH10_OUTP (0x01 << 20)
975#define S3C2410_GPH10_CLKOUT1 (0x02 << 20)
976
977/* The S3C2412 and S3C2413 move the GPJ register set to after
978 * GPH, which means all registers after 0x80 are now offset by 0x10
979 * for the 2412/2413 from the 2410/2440/2442
980*/
981
982/* miscellaneous control */
983#define S3C2400_MISCCR S3C2410_GPIOREG(0x54)
984#define S3C2410_MISCCR S3C2410_GPIOREG(0x80)
985#define S3C2410_DCLKCON S3C2410_GPIOREG(0x84)
986
987#define S3C24XX_DCLKCON S3C24XX_GPIOREG2(0x84)
988
989/* see clock.h for dclk definitions */
990
991/* pullup control on databus */
992#define S3C2410_MISCCR_SPUCR_HEN (0<<0)
993#define S3C2410_MISCCR_SPUCR_HDIS (1<<0)
994#define S3C2410_MISCCR_SPUCR_LEN (0<<1)
995#define S3C2410_MISCCR_SPUCR_LDIS (1<<1)
996
997#define S3C2400_MISCCR_SPUCR_LEN (0<<0)
998#define S3C2400_MISCCR_SPUCR_LDIS (1<<0)
999#define S3C2400_MISCCR_SPUCR_HEN (0<<1)
1000#define S3C2400_MISCCR_SPUCR_HDIS (1<<1)
1001
1002#define S3C2400_MISCCR_HZ_STOPEN (0<<2)
1003#define S3C2400_MISCCR_HZ_STOPPREV (1<<2)
1004
1005#define S3C2410_MISCCR_USBDEV (0<<3)
1006#define S3C2410_MISCCR_USBHOST (1<<3)
1007
1008#define S3C2410_MISCCR_CLK0_MPLL (0<<4)
1009#define S3C2410_MISCCR_CLK0_UPLL (1<<4)
1010#define S3C2410_MISCCR_CLK0_FCLK (2<<4)
1011#define S3C2410_MISCCR_CLK0_HCLK (3<<4)
1012#define S3C2410_MISCCR_CLK0_PCLK (4<<4)
1013#define S3C2410_MISCCR_CLK0_DCLK0 (5<<4)
1014#define S3C2410_MISCCR_CLK0_MASK (7<<4)
1015
1016#define S3C2412_MISCCR_CLK0_RTC (2<<4)
1017
1018#define S3C2410_MISCCR_CLK1_MPLL (0<<8)
1019#define S3C2410_MISCCR_CLK1_UPLL (1<<8)
1020#define S3C2410_MISCCR_CLK1_FCLK (2<<8)
1021#define S3C2410_MISCCR_CLK1_HCLK (3<<8)
1022#define S3C2410_MISCCR_CLK1_PCLK (4<<8)
1023#define S3C2410_MISCCR_CLK1_DCLK1 (5<<8)
1024#define S3C2410_MISCCR_CLK1_MASK (7<<8)
1025
1026#define S3C2412_MISCCR_CLK1_CLKsrc (0<<8)
1027
1028#define S3C2410_MISCCR_USBSUSPND0 (1<<12)
1029#define S3C2410_MISCCR_USBSUSPND1 (1<<13)
1030
1031#define S3C2410_MISCCR_nRSTCON (1<<16)
1032
1033#define S3C2410_MISCCR_nEN_SCLK0 (1<<17)
1034#define S3C2410_MISCCR_nEN_SCLK1 (1<<18)
1035#define S3C2410_MISCCR_nEN_SCLKE (1<<19) /* not 2412 */
1036#define S3C2410_MISCCR_SDSLEEP (7<<17)
1037
1038/* external interrupt control... */
1039/* S3C2410_EXTINT0 -> irq sense control for EINT0..EINT7
1040 * S3C2410_EXTINT1 -> irq sense control for EINT8..EINT15
1041 * S3C2410_EXTINT2 -> irq sense control for EINT16..EINT23
1042 *
1043 * note S3C2410_EXTINT2 has filtering options for EINT16..EINT23
1044 *
1045 * Samsung datasheet p9-25
1046*/
1047#define S3C2400_EXTINT0 S3C2410_GPIOREG(0x58)
1048#define S3C2410_EXTINT0 S3C2410_GPIOREG(0x88)
1049#define S3C2410_EXTINT1 S3C2410_GPIOREG(0x8C)
1050#define S3C2410_EXTINT2 S3C2410_GPIOREG(0x90)
1051
1052#define S3C24XX_EXTINT0 S3C24XX_GPIOREG2(0x88)
1053#define S3C24XX_EXTINT1 S3C24XX_GPIOREG2(0x8C)
1054#define S3C24XX_EXTINT2 S3C24XX_GPIOREG2(0x90)
1055
1056/* values for S3C2410_EXTINT0/1/2 */
1057#define S3C2410_EXTINT_LOWLEV (0x00)
1058#define S3C2410_EXTINT_HILEV (0x01)
1059#define S3C2410_EXTINT_FALLEDGE (0x02)
1060#define S3C2410_EXTINT_RISEEDGE (0x04)
1061#define S3C2410_EXTINT_BOTHEDGE (0x06)
1062
1063/* interrupt filtering conrrol for EINT16..EINT23 */
1064#define S3C2410_EINFLT0 S3C2410_GPIOREG(0x94)
1065#define S3C2410_EINFLT1 S3C2410_GPIOREG(0x98)
1066#define S3C2410_EINFLT2 S3C2410_GPIOREG(0x9C)
1067#define S3C2410_EINFLT3 S3C2410_GPIOREG(0xA0)
1068
1069#define S3C24XX_EINFLT0 S3C24XX_GPIOREG2(0x94)
1070#define S3C24XX_EINFLT1 S3C24XX_GPIOREG2(0x98)
1071#define S3C24XX_EINFLT2 S3C24XX_GPIOREG2(0x9C)
1072#define S3C24XX_EINFLT3 S3C24XX_GPIOREG2(0xA0)
1073
1074/* values for interrupt filtering */
1075#define S3C2410_EINTFLT_PCLK (0x00)
1076#define S3C2410_EINTFLT_EXTCLK (1<<7)
1077#define S3C2410_EINTFLT_WIDTHMSK(x) ((x) & 0x3f)
1078
1079/* removed EINTxxxx defs from here, not meant for this */
1080
1081/* GSTATUS have miscellaneous information in them
1082 *
1083 * These move between s3c2410 and s3c2412 style systems.
1084 */
1085
1086#define S3C2410_GSTATUS0 S3C2410_GPIOREG(0x0AC)
1087#define S3C2410_GSTATUS1 S3C2410_GPIOREG(0x0B0)
1088#define S3C2410_GSTATUS2 S3C2410_GPIOREG(0x0B4)
1089#define S3C2410_GSTATUS3 S3C2410_GPIOREG(0x0B8)
1090#define S3C2410_GSTATUS4 S3C2410_GPIOREG(0x0BC)
1091
1092#define S3C2412_GSTATUS0 S3C2410_GPIOREG(0x0BC)
1093#define S3C2412_GSTATUS1 S3C2410_GPIOREG(0x0C0)
1094#define S3C2412_GSTATUS2 S3C2410_GPIOREG(0x0C4)
1095#define S3C2412_GSTATUS3 S3C2410_GPIOREG(0x0C8)
1096#define S3C2412_GSTATUS4 S3C2410_GPIOREG(0x0CC)
1097
1098#define S3C24XX_GSTATUS0 S3C24XX_GPIOREG2(0x0AC)
1099#define S3C24XX_GSTATUS1 S3C24XX_GPIOREG2(0x0B0)
1100#define S3C24XX_GSTATUS2 S3C24XX_GPIOREG2(0x0B4)
1101#define S3C24XX_GSTATUS3 S3C24XX_GPIOREG2(0x0B8)
1102#define S3C24XX_GSTATUS4 S3C24XX_GPIOREG2(0x0BC)
1103
1104#define S3C2410_GSTATUS0_nWAIT (1<<3)
1105#define S3C2410_GSTATUS0_NCON (1<<2)
1106#define S3C2410_GSTATUS0_RnB (1<<1)
1107#define S3C2410_GSTATUS0_nBATTFLT (1<<0)
1108
1109#define S3C2410_GSTATUS1_IDMASK (0xffff0000)
1110#define S3C2410_GSTATUS1_2410 (0x32410000)
1111#define S3C2410_GSTATUS1_2412 (0x32412001)
1112#define S3C2410_GSTATUS1_2440 (0x32440000)
1113#define S3C2410_GSTATUS1_2442 (0x32440aaa)
1114
1115#define S3C2410_GSTATUS2_WTRESET (1<<2)
1116#define S3C2410_GSTATUS2_OFFRESET (1<<1)
1117#define S3C2410_GSTATUS2_PONRESET (1<<0)
1118
1119/* open drain control register */
1120#define S3C2400_OPENCR S3C2410_GPIOREG(0x50)
1121
1122#define S3C2400_OPENCR_OPC_RXD1DIS (0<<0)
1123#define S3C2400_OPENCR_OPC_RXD1EN (1<<0)
1124#define S3C2400_OPENCR_OPC_TXD1DIS (0<<1)
1125#define S3C2400_OPENCR_OPC_TXD1EN (1<<1)
1126#define S3C2400_OPENCR_OPC_CMDDIS (0<<2)
1127#define S3C2400_OPENCR_OPC_CMDEN (1<<2)
1128#define S3C2400_OPENCR_OPC_DATDIS (0<<3)
1129#define S3C2400_OPENCR_OPC_DATEN (1<<3)
1130#define S3C2400_OPENCR_OPC_MISODIS (0<<4)
1131#define S3C2400_OPENCR_OPC_MISOEN (1<<4)
1132#define S3C2400_OPENCR_OPC_MOSIDIS (0<<5)
1133#define S3C2400_OPENCR_OPC_MOSIEN (1<<5)
1134
1135/* 2412/2413 sleep configuration registers */
1136
1137#define S3C2412_GPBSLPCON S3C2410_GPIOREG(0x1C)
1138#define S3C2412_GPCSLPCON S3C2410_GPIOREG(0x2C)
1139#define S3C2412_GPDSLPCON S3C2410_GPIOREG(0x3C)
1140#define S3C2412_GPFSLPCON S3C2410_GPIOREG(0x5C)
1141#define S3C2412_GPGSLPCON S3C2410_GPIOREG(0x6C)
1142#define S3C2412_GPHSLPCON S3C2410_GPIOREG(0x7C)
1143
1144/* definitions for each pin bit */
1145#define S3C2412_GPIO_SLPCON_LOW ( 0x00 )
1146#define S3C2412_GPIO_SLPCON_HIGH ( 0x01 )
1147#define S3C2412_GPIO_SLPCON_IN ( 0x02 )
1148#define S3C2412_GPIO_SLPCON_PULL ( 0x03 )
1149
1150#define S3C2412_SLPCON_LOW(x) ( 0x00 << ((x) * 2))
1151#define S3C2412_SLPCON_HIGH(x) ( 0x01 << ((x) * 2))
1152#define S3C2412_SLPCON_IN(x) ( 0x02 << ((x) * 2))
1153#define S3C2412_SLPCON_PULL(x) ( 0x03 << ((x) * 2))
1154#define S3C2412_SLPCON_EINT(x) ( 0x02 << ((x) * 2)) /* only IRQ pins */
1155#define S3C2412_SLPCON_MASK(x) ( 0x03 << ((x) * 2))
1156
1157#define S3C2412_SLPCON_ALL_LOW (0x0)
1158#define S3C2412_SLPCON_ALL_HIGH (0x11111111 | 0x44444444)
1159#define S3C2412_SLPCON_ALL_IN (0x22222222 | 0x88888888)
1160#define S3C2412_SLPCON_ALL_PULL (0x33333333)
1161
1162#endif /* __ASM_ARCH_REGS_GPIO_H */
1163
diff --git a/include/asm-arm/arch-s3c2410/regs-gpioj.h b/include/asm-arm/arch-s3c2410/regs-gpioj.h
deleted file mode 100644
index 0362332faaf0..000000000000
--- a/include/asm-arm/arch-s3c2410/regs-gpioj.h
+++ /dev/null
@@ -1,106 +0,0 @@
1/* linux/include/asm-arm/arch-s3c2410/regs-gpioj.h
2 *
3 * Copyright (c) 2004 Simtec Electronics <linux@simtec.co.uk>
4 * http://www.simtec.co.uk/products/SWLINUX/
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * S3C2440 GPIO J register definitions
11*/
12
13
14#ifndef __ASM_ARCH_REGS_GPIOJ_H
15#define __ASM_ARCH_REGS_GPIOJ_H "gpioj"
16
17/* Port J consists of 13 GPIO/Camera pins
18 *
19 * GPJCON has 2 bits for each of the input pins on port F
20 * 00 = 0 input, 1 output, 2 Camera
21 *
22 * pull up works like all other ports.
23*/
24
25#define S3C2440_GPIO_BANKJ (416)
26
27#define S3C2440_GPJCON S3C2410_GPIOREG(0xd0)
28#define S3C2440_GPJDAT S3C2410_GPIOREG(0xd4)
29#define S3C2440_GPJUP S3C2410_GPIOREG(0xd8)
30
31#define S3C2413_GPJCON S3C2410_GPIOREG(0x80)
32#define S3C2413_GPJDAT S3C2410_GPIOREG(0x84)
33#define S3C2413_GPJUP S3C2410_GPIOREG(0x88)
34#define S3C2413_GPJSLPCON S3C2410_GPIOREG(0x8C)
35
36#define S3C2440_GPJ0 S3C2410_GPIONO(S3C2440_GPIO_BANKJ, 0)
37#define S3C2440_GPJ0_INP (0x00 << 0)
38#define S3C2440_GPJ0_OUTP (0x01 << 0)
39#define S3C2440_GPJ0_CAMDATA0 (0x02 << 0)
40
41#define S3C2440_GPJ1 S3C2410_GPIONO(S3C2440_GPIO_BANKJ, 1)
42#define S3C2440_GPJ1_INP (0x00 << 2)
43#define S3C2440_GPJ1_OUTP (0x01 << 2)
44#define S3C2440_GPJ1_CAMDATA1 (0x02 << 2)
45
46#define S3C2440_GPJ2 S3C2410_GPIONO(S3C2440_GPIO_BANKJ, 2)
47#define S3C2440_GPJ2_INP (0x00 << 4)
48#define S3C2440_GPJ2_OUTP (0x01 << 4)
49#define S3C2440_GPJ2_CAMDATA2 (0x02 << 4)
50
51#define S3C2440_GPJ3 S3C2410_GPIONO(S3C2440_GPIO_BANKJ, 3)
52#define S3C2440_GPJ3_INP (0x00 << 6)
53#define S3C2440_GPJ3_OUTP (0x01 << 6)
54#define S3C2440_GPJ3_CAMDATA3 (0x02 << 6)
55
56#define S3C2440_GPJ4 S3C2410_GPIONO(S3C2440_GPIO_BANKJ, 4)
57#define S3C2440_GPJ4_INP (0x00 << 8)
58#define S3C2440_GPJ4_OUTP (0x01 << 8)
59#define S3C2440_GPJ4_CAMDATA4 (0x02 << 8)
60
61#define S3C2440_GPJ5 S3C2410_GPIONO(S3C2440_GPIO_BANKJ, 5)
62#define S3C2440_GPJ5_INP (0x00 << 10)
63#define S3C2440_GPJ5_OUTP (0x01 << 10)
64#define S3C2440_GPJ5_CAMDATA5 (0x02 << 10)
65
66#define S3C2440_GPJ6 S3C2410_GPIONO(S3C2440_GPIO_BANKJ, 6)
67#define S3C2440_GPJ6_INP (0x00 << 12)
68#define S3C2440_GPJ6_OUTP (0x01 << 12)
69#define S3C2440_GPJ6_CAMDATA6 (0x02 << 12)
70
71#define S3C2440_GPJ7 S3C2410_GPIONO(S3C2440_GPIO_BANKJ, 7)
72#define S3C2440_GPJ7_INP (0x00 << 14)
73#define S3C2440_GPJ7_OUTP (0x01 << 14)
74#define S3C2440_GPJ7_CAMDATA7 (0x02 << 14)
75
76#define S3C2440_GPJ8 S3C2410_GPIONO(S3C2440_GPIO_BANKJ, 8)
77#define S3C2440_GPJ8_INP (0x00 << 16)
78#define S3C2440_GPJ8_OUTP (0x01 << 16)
79#define S3C2440_GPJ8_CAMPCLK (0x02 << 16)
80
81#define S3C2440_GPJ9 S3C2410_GPIONO(S3C2440_GPIO_BANKJ, 9)
82#define S3C2440_GPJ9_INP (0x00 << 18)
83#define S3C2440_GPJ9_OUTP (0x01 << 18)
84#define S3C2440_GPJ9_CAMVSYNC (0x02 << 18)
85
86#define S3C2440_GPJ10 S3C2410_GPIONO(S3C2440_GPIO_BANKJ, 10)
87#define S3C2440_GPJ10_INP (0x00 << 20)
88#define S3C2440_GPJ10_OUTP (0x01 << 20)
89#define S3C2440_GPJ10_CAMHREF (0x02 << 20)
90
91#define S3C2440_GPJ11 S3C2410_GPIONO(S3C2440_GPIO_BANKJ, 11)
92#define S3C2440_GPJ11_INP (0x00 << 22)
93#define S3C2440_GPJ11_OUTP (0x01 << 22)
94#define S3C2440_GPJ11_CAMCLKOUT (0x02 << 22)
95
96#define S3C2440_GPJ12 S3C2410_GPIONO(S3C2440_GPIO_BANKJ, 12)
97#define S3C2440_GPJ12_INP (0x00 << 24)
98#define S3C2440_GPJ12_OUTP (0x01 << 24)
99#define S3C2440_GPJ12_CAMRESET (0x02 << 24)
100
101#define S3C2443_GPJ13 S3C2410_GPIONO(S3C2440_GPIO_BANKJ, 13)
102#define S3C2443_GPJ14 S3C2410_GPIONO(S3C2440_GPIO_BANKJ, 14)
103#define S3C2443_GPJ15 S3C2410_GPIONO(S3C2440_GPIO_BANKJ, 15)
104
105#endif /* __ASM_ARCH_REGS_GPIOJ_H */
106
diff --git a/include/asm-arm/arch-s3c2410/regs-irq.h b/include/asm-arm/arch-s3c2410/regs-irq.h
deleted file mode 100644
index 498184cb8adc..000000000000
--- a/include/asm-arm/arch-s3c2410/regs-irq.h
+++ /dev/null
@@ -1,43 +0,0 @@
1/* linux/include/asm-arm/arch-s3c2410/regs-irq.h
2 *
3 * Copyright (c) 2003 Simtec Electronics <linux@simtec.co.uk>
4 * http://www.simtec.co.uk/products/SWLINUX/
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9*/
10
11
12#ifndef ___ASM_ARCH_REGS_IRQ_H
13#define ___ASM_ARCH_REGS_IRQ_H "$Id: irq.h,v 1.3 2003/03/25 21:29:06 ben Exp $"
14
15/* interrupt controller */
16
17#define S3C2410_IRQREG(x) ((x) + S3C24XX_VA_IRQ)
18#define S3C2410_EINTREG(x) ((x) + S3C24XX_VA_GPIO)
19#define S3C24XX_EINTREG(x) ((x) + S3C24XX_VA_GPIO2)
20
21#define S3C2410_SRCPND S3C2410_IRQREG(0x000)
22#define S3C2410_INTMOD S3C2410_IRQREG(0x004)
23#define S3C2410_INTMSK S3C2410_IRQREG(0x008)
24#define S3C2410_PRIORITY S3C2410_IRQREG(0x00C)
25#define S3C2410_INTPND S3C2410_IRQREG(0x010)
26#define S3C2410_INTOFFSET S3C2410_IRQREG(0x014)
27#define S3C2410_SUBSRCPND S3C2410_IRQREG(0x018)
28#define S3C2410_INTSUBMSK S3C2410_IRQREG(0x01C)
29
30/* mask: 0=enable, 1=disable
31 * 1 bit EINT, 4=EINT4, 23=EINT23
32 * EINT0,1,2,3 are not handled here.
33*/
34
35#define S3C2410_EINTMASK S3C2410_EINTREG(0x0A4)
36#define S3C2410_EINTPEND S3C2410_EINTREG(0X0A8)
37#define S3C2412_EINTMASK S3C2410_EINTREG(0x0B4)
38#define S3C2412_EINTPEND S3C2410_EINTREG(0X0B8)
39
40#define S3C24XX_EINTMASK S3C24XX_EINTREG(0x0A4)
41#define S3C24XX_EINTPEND S3C24XX_EINTREG(0X0A8)
42
43#endif /* ___ASM_ARCH_REGS_IRQ_H */
diff --git a/include/asm-arm/arch-s3c2410/regs-lcd.h b/include/asm-arm/arch-s3c2410/regs-lcd.h
deleted file mode 100644
index bd854845697f..000000000000
--- a/include/asm-arm/arch-s3c2410/regs-lcd.h
+++ /dev/null
@@ -1,162 +0,0 @@
1/* linux/include/asm-arm/arch-s3c2410/regs-lcd.h
2 *
3 * Copyright (c) 2003 Simtec Electronics <linux@simtec.co.uk>
4 * http://www.simtec.co.uk/products/SWLINUX/
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9*/
10
11
12#ifndef ___ASM_ARCH_REGS_LCD_H
13#define ___ASM_ARCH_REGS_LCD_H "$Id: lcd.h,v 1.3 2003/06/26 13:25:06 ben Exp $"
14
15#define S3C2410_LCDREG(x) (x)
16
17/* LCD control registers */
18#define S3C2410_LCDCON1 S3C2410_LCDREG(0x00)
19#define S3C2410_LCDCON2 S3C2410_LCDREG(0x04)
20#define S3C2410_LCDCON3 S3C2410_LCDREG(0x08)
21#define S3C2410_LCDCON4 S3C2410_LCDREG(0x0C)
22#define S3C2410_LCDCON5 S3C2410_LCDREG(0x10)
23
24#define S3C2410_LCDCON1_CLKVAL(x) ((x) << 8)
25#define S3C2410_LCDCON1_MMODE (1<<7)
26#define S3C2410_LCDCON1_DSCAN4 (0<<5)
27#define S3C2410_LCDCON1_STN4 (1<<5)
28#define S3C2410_LCDCON1_STN8 (2<<5)
29#define S3C2410_LCDCON1_TFT (3<<5)
30
31#define S3C2410_LCDCON1_STN1BPP (0<<1)
32#define S3C2410_LCDCON1_STN2GREY (1<<1)
33#define S3C2410_LCDCON1_STN4GREY (2<<1)
34#define S3C2410_LCDCON1_STN8BPP (3<<1)
35#define S3C2410_LCDCON1_STN12BPP (4<<1)
36
37#define S3C2410_LCDCON1_TFT1BPP (8<<1)
38#define S3C2410_LCDCON1_TFT2BPP (9<<1)
39#define S3C2410_LCDCON1_TFT4BPP (10<<1)
40#define S3C2410_LCDCON1_TFT8BPP (11<<1)
41#define S3C2410_LCDCON1_TFT16BPP (12<<1)
42#define S3C2410_LCDCON1_TFT24BPP (13<<1)
43
44#define S3C2410_LCDCON1_ENVID (1)
45
46#define S3C2410_LCDCON1_MODEMASK 0x1E
47
48#define S3C2410_LCDCON2_VBPD(x) ((x) << 24)
49#define S3C2410_LCDCON2_LINEVAL(x) ((x) << 14)
50#define S3C2410_LCDCON2_VFPD(x) ((x) << 6)
51#define S3C2410_LCDCON2_VSPW(x) ((x) << 0)
52
53#define S3C2410_LCDCON2_GET_VBPD(x) ( ((x) >> 24) & 0xFF)
54#define S3C2410_LCDCON2_GET_VFPD(x) ( ((x) >> 6) & 0xFF)
55#define S3C2410_LCDCON2_GET_VSPW(x) ( ((x) >> 0) & 0x3F)
56
57#define S3C2410_LCDCON3_HBPD(x) ((x) << 19)
58#define S3C2410_LCDCON3_WDLY(x) ((x) << 19)
59#define S3C2410_LCDCON3_HOZVAL(x) ((x) << 8)
60#define S3C2410_LCDCON3_HFPD(x) ((x) << 0)
61#define S3C2410_LCDCON3_LINEBLANK(x)((x) << 0)
62
63#define S3C2410_LCDCON3_GET_HBPD(x) ( ((x) >> 19) & 0x7F)
64#define S3C2410_LCDCON3_GET_HFPD(x) ( ((x) >> 0) & 0xFF)
65
66/* LDCCON4 changes for STN mode on the S3C2412 */
67
68#define S3C2410_LCDCON4_MVAL(x) ((x) << 8)
69#define S3C2410_LCDCON4_HSPW(x) ((x) << 0)
70#define S3C2410_LCDCON4_WLH(x) ((x) << 0)
71
72#define S3C2410_LCDCON4_GET_HSPW(x) ( ((x) >> 0) & 0xFF)
73
74#define S3C2410_LCDCON5_BPP24BL (1<<12)
75#define S3C2410_LCDCON5_FRM565 (1<<11)
76#define S3C2410_LCDCON5_INVVCLK (1<<10)
77#define S3C2410_LCDCON5_INVVLINE (1<<9)
78#define S3C2410_LCDCON5_INVVFRAME (1<<8)
79#define S3C2410_LCDCON5_INVVD (1<<7)
80#define S3C2410_LCDCON5_INVVDEN (1<<6)
81#define S3C2410_LCDCON5_INVPWREN (1<<5)
82#define S3C2410_LCDCON5_INVLEND (1<<4)
83#define S3C2410_LCDCON5_PWREN (1<<3)
84#define S3C2410_LCDCON5_ENLEND (1<<2)
85#define S3C2410_LCDCON5_BSWP (1<<1)
86#define S3C2410_LCDCON5_HWSWP (1<<0)
87
88/* framebuffer start addressed */
89#define S3C2410_LCDSADDR1 S3C2410_LCDREG(0x14)
90#define S3C2410_LCDSADDR2 S3C2410_LCDREG(0x18)
91#define S3C2410_LCDSADDR3 S3C2410_LCDREG(0x1C)
92
93#define S3C2410_LCDBANK(x) ((x) << 21)
94#define S3C2410_LCDBASEU(x) (x)
95
96#define S3C2410_OFFSIZE(x) ((x) << 11)
97#define S3C2410_PAGEWIDTH(x) (x)
98
99/* colour lookup and miscellaneous controls */
100
101#define S3C2410_REDLUT S3C2410_LCDREG(0x20)
102#define S3C2410_GREENLUT S3C2410_LCDREG(0x24)
103#define S3C2410_BLUELUT S3C2410_LCDREG(0x28)
104
105#define S3C2410_DITHMODE S3C2410_LCDREG(0x4C)
106#define S3C2410_TPAL S3C2410_LCDREG(0x50)
107
108#define S3C2410_TPAL_EN (1<<24)
109
110/* interrupt info */
111#define S3C2410_LCDINTPND S3C2410_LCDREG(0x54)
112#define S3C2410_LCDSRCPND S3C2410_LCDREG(0x58)
113#define S3C2410_LCDINTMSK S3C2410_LCDREG(0x5C)
114#define S3C2410_LCDINT_FIWSEL (1<<2)
115#define S3C2410_LCDINT_FRSYNC (1<<1)
116#define S3C2410_LCDINT_FICNT (1<<0)
117
118/* s3c2442 extra stn registers */
119
120#define S3C2442_REDLUT S3C2410_LCDREG(0x20)
121#define S3C2442_GREENLUT S3C2410_LCDREG(0x24)
122#define S3C2442_BLUELUT S3C2410_LCDREG(0x28)
123#define S3C2442_DITHMODE S3C2410_LCDREG(0x20)
124
125#define S3C2410_LPCSEL S3C2410_LCDREG(0x60)
126
127#define S3C2410_TFTPAL(x) S3C2410_LCDREG((0x400 + (x)*4))
128
129/* S3C2412 registers */
130
131#define S3C2412_TPAL S3C2410_LCDREG(0x20)
132
133#define S3C2412_LCDINTPND S3C2410_LCDREG(0x24)
134#define S3C2412_LCDSRCPND S3C2410_LCDREG(0x28)
135#define S3C2412_LCDINTMSK S3C2410_LCDREG(0x2C)
136
137#define S3C2412_TCONSEL S3C2410_LCDREG(0x30)
138
139#define S3C2412_LCDCON6 S3C2410_LCDREG(0x34)
140#define S3C2412_LCDCON7 S3C2410_LCDREG(0x38)
141#define S3C2412_LCDCON8 S3C2410_LCDREG(0x3C)
142#define S3C2412_LCDCON9 S3C2410_LCDREG(0x40)
143
144#define S3C2412_REDLUT(x) S3C2410_LCDREG(0x44 + ((x)*4))
145#define S3C2412_GREENLUT(x) S3C2410_LCDREG(0x60 + ((x)*4))
146#define S3C2412_BLUELUT(x) S3C2410_LCDREG(0x98 + ((x)*4))
147
148#define S3C2412_FRCPAT(x) S3C2410_LCDREG(0xB4 + ((x)*4))
149
150/* general registers */
151
152/* base of the LCD registers, where INTPND, INTSRC and then INTMSK
153 * are available. */
154
155#define S3C2410_LCDINTBASE S3C2410_LCDREG(0x54)
156#define S3C2412_LCDINTBASE S3C2410_LCDREG(0x24)
157
158#define S3C24XX_LCDINTPND (0x00)
159#define S3C24XX_LCDSRCPND (0x04)
160#define S3C24XX_LCDINTMSK (0x08)
161
162#endif /* ___ASM_ARCH_REGS_LCD_H */
diff --git a/include/asm-arm/arch-s3c2410/regs-mem.h b/include/asm-arm/arch-s3c2410/regs-mem.h
deleted file mode 100644
index 312ff93b63c6..000000000000
--- a/include/asm-arm/arch-s3c2410/regs-mem.h
+++ /dev/null
@@ -1,220 +0,0 @@
1/* linux/include/asm-arm/arch-s3c2410/regs-mem.h
2 *
3 * Copyright (c) 2004 Simtec Electronics <linux@simtec.co.uk>
4 * http://www.simtec.co.uk/products/SWLINUX/
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * S3C2410 Memory Control register definitions
11*/
12
13#ifndef __ASM_ARM_MEMREGS_H
14#define __ASM_ARM_MEMREGS_H "$Id: regs.h,v 1.8 2003/05/01 15:55:41 ben Exp $"
15
16#ifndef S3C2410_MEMREG
17#define S3C2410_MEMREG(x) (S3C24XX_VA_MEMCTRL + (x))
18#endif
19
20/* bus width, and wait state control */
21#define S3C2410_BWSCON S3C2410_MEMREG(0x0000)
22
23/* bank zero config - note, pinstrapped from OM pins! */
24#define S3C2410_BWSCON_DW0_16 (1<<1)
25#define S3C2410_BWSCON_DW0_32 (2<<1)
26
27/* bank one configs */
28#define S3C2410_BWSCON_DW1_8 (0<<4)
29#define S3C2410_BWSCON_DW1_16 (1<<4)
30#define S3C2410_BWSCON_DW1_32 (2<<4)
31#define S3C2410_BWSCON_WS1 (1<<6)
32#define S3C2410_BWSCON_ST1 (1<<7)
33
34/* bank 2 configurations */
35#define S3C2410_BWSCON_DW2_8 (0<<8)
36#define S3C2410_BWSCON_DW2_16 (1<<8)
37#define S3C2410_BWSCON_DW2_32 (2<<8)
38#define S3C2410_BWSCON_WS2 (1<<10)
39#define S3C2410_BWSCON_ST2 (1<<11)
40
41/* bank 3 configurations */
42#define S3C2410_BWSCON_DW3_8 (0<<12)
43#define S3C2410_BWSCON_DW3_16 (1<<12)
44#define S3C2410_BWSCON_DW3_32 (2<<12)
45#define S3C2410_BWSCON_WS3 (1<<14)
46#define S3C2410_BWSCON_ST3 (1<<15)
47
48/* bank 4 configurations */
49#define S3C2410_BWSCON_DW4_8 (0<<16)
50#define S3C2410_BWSCON_DW4_16 (1<<16)
51#define S3C2410_BWSCON_DW4_32 (2<<16)
52#define S3C2410_BWSCON_WS4 (1<<18)
53#define S3C2410_BWSCON_ST4 (1<<19)
54
55/* bank 5 configurations */
56#define S3C2410_BWSCON_DW5_8 (0<<20)
57#define S3C2410_BWSCON_DW5_16 (1<<20)
58#define S3C2410_BWSCON_DW5_32 (2<<20)
59#define S3C2410_BWSCON_WS5 (1<<22)
60#define S3C2410_BWSCON_ST5 (1<<23)
61
62/* bank 6 configurations */
63#define S3C2410_BWSCON_DW6_8 (0<<24)
64#define S3C2410_BWSCON_DW6_16 (1<<24)
65#define S3C2410_BWSCON_DW6_32 (2<<24)
66#define S3C2410_BWSCON_WS6 (1<<26)
67#define S3C2410_BWSCON_ST6 (1<<27)
68
69/* bank 7 configurations */
70#define S3C2410_BWSCON_DW7_8 (0<<28)
71#define S3C2410_BWSCON_DW7_16 (1<<28)
72#define S3C2410_BWSCON_DW7_32 (2<<28)
73#define S3C2410_BWSCON_WS7 (1<<30)
74#define S3C2410_BWSCON_ST7 (1<<31)
75
76/* memory set (rom, ram) */
77#define S3C2410_BANKCON0 S3C2410_MEMREG(0x0004)
78#define S3C2410_BANKCON1 S3C2410_MEMREG(0x0008)
79#define S3C2410_BANKCON2 S3C2410_MEMREG(0x000C)
80#define S3C2410_BANKCON3 S3C2410_MEMREG(0x0010)
81#define S3C2410_BANKCON4 S3C2410_MEMREG(0x0014)
82#define S3C2410_BANKCON5 S3C2410_MEMREG(0x0018)
83#define S3C2410_BANKCON6 S3C2410_MEMREG(0x001C)
84#define S3C2410_BANKCON7 S3C2410_MEMREG(0x0020)
85
86/* bank configuration registers */
87
88#define S3C2410_BANKCON_PMCnorm (0x00)
89#define S3C2410_BANKCON_PMC4 (0x01)
90#define S3C2410_BANKCON_PMC8 (0x02)
91#define S3C2410_BANKCON_PMC16 (0x03)
92
93/* bank configurations for banks 0..7, note banks
94 * 6 and 7 have differnt configurations depending on
95 * the memory type bits */
96
97#define S3C2410_BANKCON_Tacp2 (0x0 << 2)
98#define S3C2410_BANKCON_Tacp3 (0x1 << 2)
99#define S3C2410_BANKCON_Tacp4 (0x2 << 2)
100#define S3C2410_BANKCON_Tacp6 (0x3 << 2)
101#define S3C2410_BANKCON_Tacp_SHIFT (2)
102
103#define S3C2410_BANKCON_Tcah0 (0x0 << 4)
104#define S3C2410_BANKCON_Tcah1 (0x1 << 4)
105#define S3C2410_BANKCON_Tcah2 (0x2 << 4)
106#define S3C2410_BANKCON_Tcah4 (0x3 << 4)
107#define S3C2410_BANKCON_Tcah_SHIFT (4)
108
109#define S3C2410_BANKCON_Tcoh0 (0x0 << 6)
110#define S3C2410_BANKCON_Tcoh1 (0x1 << 6)
111#define S3C2410_BANKCON_Tcoh2 (0x2 << 6)
112#define S3C2410_BANKCON_Tcoh4 (0x3 << 6)
113#define S3C2410_BANKCON_Tcoh_SHIFT (6)
114
115#define S3C2410_BANKCON_Tacc1 (0x0 << 8)
116#define S3C2410_BANKCON_Tacc2 (0x1 << 8)
117#define S3C2410_BANKCON_Tacc3 (0x2 << 8)
118#define S3C2410_BANKCON_Tacc4 (0x3 << 8)
119#define S3C2410_BANKCON_Tacc6 (0x4 << 8)
120#define S3C2410_BANKCON_Tacc8 (0x5 << 8)
121#define S3C2410_BANKCON_Tacc10 (0x6 << 8)
122#define S3C2410_BANKCON_Tacc14 (0x7 << 8)
123#define S3C2410_BANKCON_Tacc_SHIFT (8)
124
125#define S3C2410_BANKCON_Tcos0 (0x0 << 11)
126#define S3C2410_BANKCON_Tcos1 (0x1 << 11)
127#define S3C2410_BANKCON_Tcos2 (0x2 << 11)
128#define S3C2410_BANKCON_Tcos4 (0x3 << 11)
129#define S3C2410_BANKCON_Tcos_SHIFT (11)
130
131#define S3C2410_BANKCON_Tacs0 (0x0 << 13)
132#define S3C2410_BANKCON_Tacs1 (0x1 << 13)
133#define S3C2410_BANKCON_Tacs2 (0x2 << 13)
134#define S3C2410_BANKCON_Tacs4 (0x3 << 13)
135#define S3C2410_BANKCON_Tacs_SHIFT (13)
136
137#define S3C2410_BANKCON_SRAM (0x0 << 15)
138#define S3C2400_BANKCON_EDODRAM (0x2 << 15)
139#define S3C2410_BANKCON_SDRAM (0x3 << 15)
140
141/* next bits only for EDO DRAM in 6,7 */
142#define S3C2400_BANKCON_EDO_Trcd1 (0x00 << 4)
143#define S3C2400_BANKCON_EDO_Trcd2 (0x01 << 4)
144#define S3C2400_BANKCON_EDO_Trcd3 (0x02 << 4)
145#define S3C2400_BANKCON_EDO_Trcd4 (0x03 << 4)
146
147/* CAS pulse width */
148#define S3C2400_BANKCON_EDO_PULSE1 (0x00 << 3)
149#define S3C2400_BANKCON_EDO_PULSE2 (0x01 << 3)
150
151/* CAS pre-charge */
152#define S3C2400_BANKCON_EDO_TCP1 (0x00 << 2)
153#define S3C2400_BANKCON_EDO_TCP2 (0x01 << 2)
154
155/* control column address select */
156#define S3C2400_BANKCON_EDO_SCANb8 (0x00 << 0)
157#define S3C2400_BANKCON_EDO_SCANb9 (0x01 << 0)
158#define S3C2400_BANKCON_EDO_SCANb10 (0x02 << 0)
159#define S3C2400_BANKCON_EDO_SCANb11 (0x03 << 0)
160
161/* next bits only for SDRAM in 6,7 */
162#define S3C2410_BANKCON_Trcd2 (0x00 << 2)
163#define S3C2410_BANKCON_Trcd3 (0x01 << 2)
164#define S3C2410_BANKCON_Trcd4 (0x02 << 2)
165
166/* control column address select */
167#define S3C2410_BANKCON_SCANb8 (0x00 << 0)
168#define S3C2410_BANKCON_SCANb9 (0x01 << 0)
169#define S3C2410_BANKCON_SCANb10 (0x02 << 0)
170
171#define S3C2410_REFRESH S3C2410_MEMREG(0x0024)
172#define S3C2410_BANKSIZE S3C2410_MEMREG(0x0028)
173#define S3C2410_MRSRB6 S3C2410_MEMREG(0x002C)
174#define S3C2410_MRSRB7 S3C2410_MEMREG(0x0030)
175
176/* refresh control */
177
178#define S3C2410_REFRESH_REFEN (1<<23)
179#define S3C2410_REFRESH_SELF (1<<22)
180#define S3C2410_REFRESH_REFCOUNTER ((1<<11)-1)
181
182#define S3C2410_REFRESH_TRP_MASK (3<<20)
183#define S3C2410_REFRESH_TRP_2clk (0<<20)
184#define S3C2410_REFRESH_TRP_3clk (1<<20)
185#define S3C2410_REFRESH_TRP_4clk (2<<20)
186
187#define S3C2400_REFRESH_DRAM_TRP_MASK (3<<20)
188#define S3C2400_REFRESH_DRAM_TRP_1_5clk (0<<20)
189#define S3C2400_REFRESH_DRAM_TRP_2_5clk (1<<20)
190#define S3C2400_REFRESH_DRAM_TRP_3_5clk (2<<20)
191#define S3C2400_REFRESH_DRAM_TRP_4_5clk (3<<20)
192
193#define S3C2410_REFRESH_TSRC_MASK (3<<18)
194#define S3C2410_REFRESH_TSRC_4clk (0<<18)
195#define S3C2410_REFRESH_TSRC_5clk (1<<18)
196#define S3C2410_REFRESH_TSRC_6clk (2<<18)
197#define S3C2410_REFRESH_TSRC_7clk (3<<18)
198
199
200/* mode select register(s) */
201
202#define S3C2410_MRSRB_CL1 (0x00 << 4)
203#define S3C2410_MRSRB_CL2 (0x02 << 4)
204#define S3C2410_MRSRB_CL3 (0x03 << 4)
205
206/* bank size register */
207#define S3C2410_BANKSIZE_128M (0x2 << 0)
208#define S3C2410_BANKSIZE_64M (0x1 << 0)
209#define S3C2410_BANKSIZE_32M (0x0 << 0)
210#define S3C2410_BANKSIZE_16M (0x7 << 0)
211#define S3C2410_BANKSIZE_8M (0x6 << 0)
212#define S3C2410_BANKSIZE_4M (0x5 << 0)
213#define S3C2410_BANKSIZE_2M (0x4 << 0)
214#define S3C2410_BANKSIZE_MASK (0x7 << 0)
215#define S3C2400_BANKSIZE_MASK (0x4 << 0)
216#define S3C2410_BANKSIZE_SCLK_EN (1<<4)
217#define S3C2410_BANKSIZE_SCKE_EN (1<<5)
218#define S3C2410_BANKSIZE_BURST (1<<7)
219
220#endif /* __ASM_ARM_MEMREGS_H */
diff --git a/include/asm-arm/arch-s3c2410/regs-power.h b/include/asm-arm/arch-s3c2410/regs-power.h
deleted file mode 100644
index 13d13b7cfe98..000000000000
--- a/include/asm-arm/arch-s3c2410/regs-power.h
+++ /dev/null
@@ -1,40 +0,0 @@
1/* linux/include/asm-arm/arch-s3c2410/regs-power.h
2 *
3 * Copyright (c) 2003,2004,2005,2006 Simtec Electronics <linux@simtec.co.uk>
4 * http://armlinux.simtec.co.uk/
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * S3C24XX power control register definitions
11*/
12
13#ifndef __ASM_ARM_REGS_PWR
14#define __ASM_ARM_REGS_PWR __FILE__
15
16#define S3C24XX_PWRREG(x) ((x) + S3C24XX_VA_CLKPWR)
17
18#define S3C2412_PWRMODECON S3C24XX_PWRREG(0x20)
19#define S3C2412_PWRCFG S3C24XX_PWRREG(0x24)
20
21#define S3C2412_INFORM0 S3C24XX_PWRREG(0x70)
22#define S3C2412_INFORM1 S3C24XX_PWRREG(0x74)
23#define S3C2412_INFORM2 S3C24XX_PWRREG(0x78)
24#define S3C2412_INFORM3 S3C24XX_PWRREG(0x7C)
25
26#define S3C2412_PWRCFG_BATF_IRQ (1<<0)
27#define S3C2412_PWRCFG_BATF_IGNORE (2<<0)
28#define S3C2412_PWRCFG_BATF_SLEEP (3<<0)
29#define S3C2412_PWRCFG_BATF_MASK (3<<0)
30
31#define S3C2412_PWRCFG_STANDBYWFI_IGNORE (0<<6)
32#define S3C2412_PWRCFG_STANDBYWFI_IDLE (1<<6)
33#define S3C2412_PWRCFG_STANDBYWFI_STOP (2<<6)
34#define S3C2412_PWRCFG_STANDBYWFI_SLEEP (3<<6)
35#define S3C2412_PWRCFG_STANDBYWFI_MASK (3<<6)
36
37#define S3C2412_PWRCFG_RTC_MASKIRQ (1<<8)
38#define S3C2412_PWRCFG_NAND_NORST (1<<9)
39
40#endif /* __ASM_ARM_REGS_PWR */
diff --git a/include/asm-arm/arch-s3c2410/regs-s3c2412-mem.h b/include/asm-arm/arch-s3c2410/regs-s3c2412-mem.h
deleted file mode 100644
index c8c793e78936..000000000000
--- a/include/asm-arm/arch-s3c2410/regs-s3c2412-mem.h
+++ /dev/null
@@ -1,29 +0,0 @@
1/* linux/include/asm-arm/arch-s3c2410/regs-s3c2412-mem.h
2 *
3 * Copyright (c) 2008 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 * http://armlinux.simtec.co.uk/
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 *
11 * S3C2412 memory register definitions
12*/
13
14#ifndef __ASM_ARM_REGS_S3C2412_MEM
15#define __ASM_ARM_REGS_S3C2412_MEM
16
17#ifndef S3C2412_MEMREG
18#define S3C2412_MEMREG(x) (S3C24XX_VA_MEMCTRL + (x))
19#endif
20
21#define S3C2412_BANKCFG S3C2412_MEMREG(0x00)
22#define S3C2412_BANKCON1 S3C2412_MEMREG(0x04)
23#define S3C2412_BANKCON2 S3C2412_MEMREG(0x08)
24#define S3C2412_BANKCON3 S3C2412_MEMREG(0x0C)
25
26#define S3C2412_REFRESH S3C2412_MEMREG(0x10)
27#define S3C2412_TIMEOUT S3C2412_MEMREG(0x14)
28
29#endif /* __ASM_ARM_REGS_S3C2412_MEM */
diff --git a/include/asm-arm/arch-s3c2410/regs-s3c2412.h b/include/asm-arm/arch-s3c2410/regs-s3c2412.h
deleted file mode 100644
index 783b18f5bcea..000000000000
--- a/include/asm-arm/arch-s3c2410/regs-s3c2412.h
+++ /dev/null
@@ -1,23 +0,0 @@
1/* linux/include/asm-arm/arch-s3c2410/regs-s3c2412.h
2 *
3 * Copyright 2007 Simtec Electronics
4 * http://armlinux.simtec.co.uk/
5 * Ben Dooks <ben@simtec.co.uk>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 *
11 * S3C2412 specific register definitions
12*/
13
14#ifndef __ASM_ARCH_REGS_S3C2412_H
15#define __ASM_ARCH_REGS_S3C2412_H "s3c2412"
16
17#define S3C2412_SWRST (S3C24XX_VA_CLKPWR + 0x30)
18#define S3C2412_SWRST_RESET (0x533C2412)
19
20/* see regs-power.h for the other registers in the power block. */
21
22#endif /* __ASM_ARCH_REGS_S3C2412_H */
23
diff --git a/include/asm-arm/arch-s3c2410/regs-s3c2443-clock.h b/include/asm-arm/arch-s3c2410/regs-s3c2443-clock.h
deleted file mode 100644
index c1414658d1c5..000000000000
--- a/include/asm-arm/arch-s3c2410/regs-s3c2443-clock.h
+++ /dev/null
@@ -1,195 +0,0 @@
1/* linux/include/asm-arm/arch-s3c2410/regs-s3c2443-clock.h
2 *
3 * Copyright (c) 2007 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 * http://armlinux.simtec.co.uk/
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 *
11 * S3C2443 clock register definitions
12*/
13
14#ifndef __ASM_ARM_REGS_S3C2443_CLOCK
15#define __ASM_ARM_REGS_S3C2443_CLOCK
16
17#define S3C2443_CLKREG(x) ((x) + S3C24XX_VA_CLKPWR)
18
19#define S3C2443_PLLCON_MDIVSHIFT 16
20#define S3C2443_PLLCON_PDIVSHIFT 8
21#define S3C2443_PLLCON_SDIVSHIFT 0
22#define S3C2443_PLLCON_MDIVMASK ((1<<(1+(23-16)))-1)
23#define S3C2443_PLLCON_PDIVMASK ((1<<(1+(9-8)))-1)
24#define S3C2443_PLLCON_SDIVMASK (3)
25
26#define S3C2443_MPLLCON S3C2443_CLKREG(0x10)
27#define S3C2443_EPLLCON S3C2443_CLKREG(0x18)
28#define S3C2443_CLKSRC S3C2443_CLKREG(0x20)
29#define S3C2443_CLKDIV0 S3C2443_CLKREG(0x24)
30#define S3C2443_CLKDIV1 S3C2443_CLKREG(0x28)
31#define S3C2443_HCLKCON S3C2443_CLKREG(0x30)
32#define S3C2443_PCLKCON S3C2443_CLKREG(0x34)
33#define S3C2443_SCLKCON S3C2443_CLKREG(0x38)
34#define S3C2443_PWRMODE S3C2443_CLKREG(0x40)
35#define S3C2443_SWRST S3C2443_CLKREG(0x44)
36#define S3C2443_BUSPRI0 S3C2443_CLKREG(0x50)
37#define S3C2443_SYSID S3C2443_CLKREG(0x5C)
38#define S3C2443_PWRCFG S3C2443_CLKREG(0x60)
39#define S3C2443_RSTCON S3C2443_CLKREG(0x64)
40
41#define S3C2443_SWRST_RESET (0x533c2443)
42
43#define S3C2443_PLLCON_OFF (1<<24)
44
45#define S3C2443_CLKSRC_I2S_EXT (1<<14)
46#define S3C2443_CLKSRC_I2S_EPLLDIV (0<<14)
47#define S3C2443_CLKSRC_I2S_EPLLREF (2<<14)
48#define S3C2443_CLKSRC_I2S_EPLLREF3 (3<<14)
49#define S3C2443_CLKSRC_I2S_MASK (3<<14)
50
51#define S3C2443_CLKSRC_EPLLREF_XTAL (2<<8)
52#define S3C2443_CLKSRC_EPLLREF_EXTCLK (3<<8)
53#define S3C2443_CLKSRC_EPLLREF_MPLLREF (0<<8)
54#define S3C2443_CLKSRC_EPLLREF_MPLLREF2 (1<<8)
55#define S3C2443_CLKSRC_EPLLREF_MASK (3<<8)
56
57#define S3C2443_CLKSRC_ESYSCLK_EPLL (1<<6)
58#define S3C2443_CLKSRC_MSYSCLK_MPLL (1<<4)
59#define S3C2443_CLKSRC_EXTCLK_DIV (1<<3)
60
61#define S3C2443_CLKDIV0_DVS (1<<13)
62#define S3C2443_CLKDIV0_HALF_HCLK (1<<3)
63#define S3C2443_CLKDIV0_HALF_PCLK (1<<2)
64
65#define S3C2443_CLKDIV0_HCLKDIV_MASK (3<<0)
66
67#define S3C2443_CLKDIV0_EXTDIV_MASK (3<<6)
68#define S3C2443_CLKDIV0_EXTDIV_SHIFT (6)
69
70#define S3C2443_CLKDIV0_PREDIV_MASK (3<<4)
71#define S3C2443_CLKDIV0_PREDIV_SHIFT (4)
72
73#define S3C2443_CLKDIV0_ARMDIV_MASK (15<<9)
74#define S3C2443_CLKDIV0_ARMDIV_SHIFT (9)
75#define S3C2443_CLKDIV0_ARMDIV_1 (0<<9)
76#define S3C2443_CLKDIV0_ARMDIV_2 (8<<9)
77#define S3C2443_CLKDIV0_ARMDIV_3 (2<<9)
78#define S3C2443_CLKDIV0_ARMDIV_4 (9<<9)
79#define S3C2443_CLKDIV0_ARMDIV_6 (10<<9)
80#define S3C2443_CLKDIV0_ARMDIV_8 (11<<9)
81#define S3C2443_CLKDIV0_ARMDIV_12 (13<<9)
82#define S3C2443_CLKDIV0_ARMDIV_16 (15<<9)
83
84/* S3C2443_CLKDIV1 */
85
86#define S3C2443_CLKDIV1_CAMDIV_MASK (15<<26)
87#define S3C2443_CLKDIV1_CAMDIV_SHIFT (26)
88
89#define S3C2443_CLKDIV1_HSSPIDIV_MASK (3<<24)
90#define S3C2443_CLKDIV1_HSSPIDIV_SHIFT (24)
91
92#define S3C2443_CLKDIV1_DISPDIV_MASK (0xff<<16)
93#define S3C2443_CLKDIV1_DISPDIV_SHIFT (16)
94
95#define S3C2443_CLKDIV1_I2SDIV_MASK (15<<12)
96#define S3C2443_CLKDIV1_I2SDIV_SHIFT (12)
97
98#define S3C2443_CLKDIV1_UARTDIV_MASK (15<<8)
99#define S3C2443_CLKDIV1_UARTDIV_SHIFT (8)
100
101#define S3C2443_CLKDIV1_HSMMCDIV_MASK (3<<6)
102#define S3C2443_CLKDIV1_HSMMCDIV_SHIFT (6)
103
104#define S3C2443_CLKDIV1_USBHOSTDIV_MASK (3<<4)
105#define S3C2443_CLKDIV1_USBHOSTDIV_SHIFT (4)
106
107#define S3C2443_CLKCON_NAND
108
109#define S3C2443_HCLKCON_DMA0 (1<<0)
110#define S3C2443_HCLKCON_DMA1 (1<<1)
111#define S3C2443_HCLKCON_DMA2 (1<<2)
112#define S3C2443_HCLKCON_DMA3 (1<<3)
113#define S3C2443_HCLKCON_DMA4 (1<<4)
114#define S3C2443_HCLKCON_DMA5 (1<<5)
115#define S3C2443_HCLKCON_CAMIF (1<<8)
116#define S3C2443_HCLKCON_DISP (1<<9)
117#define S3C2443_HCLKCON_LCDC (1<<10)
118#define S3C2443_HCLKCON_USBH (1<<11)
119#define S3C2443_HCLKCON_USBD (1<<12)
120#define S3C2443_HCLKCON_HSMMC (1<<16)
121#define S3C2443_HCLKCON_CFC (1<<17)
122#define S3C2443_HCLKCON_SSMC (1<<18)
123#define S3C2443_HCLKCON_DRAMC (1<<19)
124
125#define S3C2443_PCLKCON_UART0 (1<<0)
126#define S3C2443_PCLKCON_UART1 (1<<1)
127#define S3C2443_PCLKCON_UART2 (1<<2)
128#define S3C2443_PCLKCON_UART3 (1<<3)
129#define S3C2443_PCLKCON_IIC (1<<4)
130#define S3C2443_PCLKCON_SDI (1<<5)
131#define S3C2443_PCLKCON_ADC (1<<7)
132#define S3C2443_PCLKCON_AC97 (1<<8)
133#define S3C2443_PCLKCON_IIS (1<<9)
134#define S3C2443_PCLKCON_PWMT (1<<10)
135#define S3C2443_PCLKCON_WDT (1<<11)
136#define S3C2443_PCLKCON_RTC (1<<12)
137#define S3C2443_PCLKCON_GPIO (1<<13)
138#define S3C2443_PCLKCON_SPI0 (1<<14)
139#define S3C2443_PCLKCON_SPI1 (1<<15)
140
141#define S3C2443_SCLKCON_DDRCLK (1<<16)
142#define S3C2443_SCLKCON_SSMCCLK (1<<15)
143#define S3C2443_SCLKCON_HSSPICLK (1<<14)
144#define S3C2443_SCLKCON_HSMMCCLK_EXT (1<<13)
145#define S3C2443_SCLKCON_HSMMCCLK_EPLL (1<<12)
146#define S3C2443_SCLKCON_CAMCLK (1<<11)
147#define S3C2443_SCLKCON_DISPCLK (1<<10)
148#define S3C2443_SCLKCON_I2SCLK (1<<9)
149#define S3C2443_SCLKCON_UARTCLK (1<<8)
150#define S3C2443_SCLKCON_USBHOST (1<<1)
151
152#include <asm/div64.h>
153
154static inline unsigned int
155s3c2443_get_mpll(unsigned int pllval, unsigned int baseclk)
156{
157 unsigned int mdiv, pdiv, sdiv;
158 uint64_t fvco;
159
160 mdiv = pllval >> S3C2443_PLLCON_MDIVSHIFT;
161 pdiv = pllval >> S3C2443_PLLCON_PDIVSHIFT;
162 sdiv = pllval >> S3C2443_PLLCON_SDIVSHIFT;
163
164 mdiv &= S3C2443_PLLCON_MDIVMASK;
165 pdiv &= S3C2443_PLLCON_PDIVMASK;
166 sdiv &= S3C2443_PLLCON_SDIVMASK;
167
168 fvco = (uint64_t)baseclk * (2 * (mdiv + 8));
169 do_div(fvco, pdiv << sdiv);
170
171 return (unsigned int)fvco;
172}
173
174static inline unsigned int
175s3c2443_get_epll(unsigned int pllval, unsigned int baseclk)
176{
177 unsigned int mdiv, pdiv, sdiv;
178 uint64_t fvco;
179
180 mdiv = pllval >> S3C2443_PLLCON_MDIVSHIFT;
181 pdiv = pllval >> S3C2443_PLLCON_PDIVSHIFT;
182 sdiv = pllval >> S3C2443_PLLCON_SDIVSHIFT;
183
184 mdiv &= S3C2443_PLLCON_MDIVMASK;
185 pdiv &= S3C2443_PLLCON_PDIVMASK;
186 sdiv &= S3C2443_PLLCON_SDIVMASK;
187
188 fvco = (uint64_t)baseclk * (mdiv + 8);
189 do_div(fvco, (pdiv + 2) << sdiv);
190
191 return (unsigned int)fvco;
192}
193
194#endif /* __ASM_ARM_REGS_S3C2443_CLOCK */
195
diff --git a/include/asm-arm/arch-s3c2410/regs-sdi.h b/include/asm-arm/arch-s3c2410/regs-sdi.h
deleted file mode 100644
index bfb222fa4abb..000000000000
--- a/include/asm-arm/arch-s3c2410/regs-sdi.h
+++ /dev/null
@@ -1,127 +0,0 @@
1/* linux/include/asm-arm/arch-s3c2410/regs-sdi.h
2 *
3 * Copyright (c) 2004 Simtec Electronics <linux@simtec.co.uk>
4 * http://www.simtec.co.uk/products/SWLINUX/
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * S3C2410 MMC/SDIO register definitions
11*/
12
13#ifndef __ASM_ARM_REGS_SDI
14#define __ASM_ARM_REGS_SDI "regs-sdi.h"
15
16#define S3C2410_SDICON (0x00)
17#define S3C2410_SDIPRE (0x04)
18#define S3C2410_SDICMDARG (0x08)
19#define S3C2410_SDICMDCON (0x0C)
20#define S3C2410_SDICMDSTAT (0x10)
21#define S3C2410_SDIRSP0 (0x14)
22#define S3C2410_SDIRSP1 (0x18)
23#define S3C2410_SDIRSP2 (0x1C)
24#define S3C2410_SDIRSP3 (0x20)
25#define S3C2410_SDITIMER (0x24)
26#define S3C2410_SDIBSIZE (0x28)
27#define S3C2410_SDIDCON (0x2C)
28#define S3C2410_SDIDCNT (0x30)
29#define S3C2410_SDIDSTA (0x34)
30#define S3C2410_SDIFSTA (0x38)
31
32#define S3C2410_SDIDATA (0x3C)
33#define S3C2410_SDIIMSK (0x40)
34
35#define S3C2440_SDIDATA (0x40)
36#define S3C2440_SDIIMSK (0x3C)
37
38#define S3C2440_SDICON_SDRESET (1<<8)
39#define S3C2440_SDICON_MMCCLOCK (1<<5)
40#define S3C2410_SDICON_BYTEORDER (1<<4)
41#define S3C2410_SDICON_SDIOIRQ (1<<3)
42#define S3C2410_SDICON_RWAITEN (1<<2)
43#define S3C2410_SDICON_FIFORESET (1<<1)
44#define S3C2410_SDICON_CLOCKTYPE (1<<0)
45
46#define S3C2410_SDICMDCON_ABORT (1<<12)
47#define S3C2410_SDICMDCON_WITHDATA (1<<11)
48#define S3C2410_SDICMDCON_LONGRSP (1<<10)
49#define S3C2410_SDICMDCON_WAITRSP (1<<9)
50#define S3C2410_SDICMDCON_CMDSTART (1<<8)
51#define S3C2410_SDICMDCON_SENDERHOST (1<<6)
52#define S3C2410_SDICMDCON_INDEX (0x3f)
53
54#define S3C2410_SDICMDSTAT_CRCFAIL (1<<12)
55#define S3C2410_SDICMDSTAT_CMDSENT (1<<11)
56#define S3C2410_SDICMDSTAT_CMDTIMEOUT (1<<10)
57#define S3C2410_SDICMDSTAT_RSPFIN (1<<9)
58#define S3C2410_SDICMDSTAT_XFERING (1<<8)
59#define S3C2410_SDICMDSTAT_INDEX (0xff)
60
61#define S3C2440_SDIDCON_DS_BYTE (0<<22)
62#define S3C2440_SDIDCON_DS_HALFWORD (1<<22)
63#define S3C2440_SDIDCON_DS_WORD (2<<22)
64#define S3C2410_SDIDCON_IRQPERIOD (1<<21)
65#define S3C2410_SDIDCON_TXAFTERRESP (1<<20)
66#define S3C2410_SDIDCON_RXAFTERCMD (1<<19)
67#define S3C2410_SDIDCON_BUSYAFTERCMD (1<<18)
68#define S3C2410_SDIDCON_BLOCKMODE (1<<17)
69#define S3C2410_SDIDCON_WIDEBUS (1<<16)
70#define S3C2410_SDIDCON_DMAEN (1<<15)
71#define S3C2410_SDIDCON_STOP (1<<14)
72#define S3C2440_SDIDCON_DATSTART (1<<14)
73#define S3C2410_SDIDCON_DATMODE (3<<12)
74#define S3C2410_SDIDCON_BLKNUM (0x7ff)
75
76/* constants for S3C2410_SDIDCON_DATMODE */
77#define S3C2410_SDIDCON_XFER_READY (0<<12)
78#define S3C2410_SDIDCON_XFER_CHKSTART (1<<12)
79#define S3C2410_SDIDCON_XFER_RXSTART (2<<12)
80#define S3C2410_SDIDCON_XFER_TXSTART (3<<12)
81
82#define S3C2410_SDIDCON_BLKNUM_MASK (0xFFF)
83#define S3C2410_SDIDCNT_BLKNUM_SHIFT (12)
84
85#define S3C2410_SDIDSTA_RDYWAITREQ (1<<10)
86#define S3C2410_SDIDSTA_SDIOIRQDETECT (1<<9)
87#define S3C2410_SDIDSTA_FIFOFAIL (1<<8) /* reserved on 2440 */
88#define S3C2410_SDIDSTA_CRCFAIL (1<<7)
89#define S3C2410_SDIDSTA_RXCRCFAIL (1<<6)
90#define S3C2410_SDIDSTA_DATATIMEOUT (1<<5)
91#define S3C2410_SDIDSTA_XFERFINISH (1<<4)
92#define S3C2410_SDIDSTA_BUSYFINISH (1<<3)
93#define S3C2410_SDIDSTA_SBITERR (1<<2) /* reserved on 2410a/2440 */
94#define S3C2410_SDIDSTA_TXDATAON (1<<1)
95#define S3C2410_SDIDSTA_RXDATAON (1<<0)
96
97#define S3C2440_SDIFSTA_FIFORESET (1<<16)
98#define S3C2440_SDIFSTA_FIFOFAIL (3<<14) /* 3 is correct (2 bits) */
99#define S3C2410_SDIFSTA_TFDET (1<<13)
100#define S3C2410_SDIFSTA_RFDET (1<<12)
101#define S3C2410_SDIFSTA_TFHALF (1<<11)
102#define S3C2410_SDIFSTA_TFEMPTY (1<<10)
103#define S3C2410_SDIFSTA_RFLAST (1<<9)
104#define S3C2410_SDIFSTA_RFFULL (1<<8)
105#define S3C2410_SDIFSTA_RFHALF (1<<7)
106#define S3C2410_SDIFSTA_COUNTMASK (0x7f)
107
108#define S3C2410_SDIIMSK_RESPONSECRC (1<<17)
109#define S3C2410_SDIIMSK_CMDSENT (1<<16)
110#define S3C2410_SDIIMSK_CMDTIMEOUT (1<<15)
111#define S3C2410_SDIIMSK_RESPONSEND (1<<14)
112#define S3C2410_SDIIMSK_READWAIT (1<<13)
113#define S3C2410_SDIIMSK_SDIOIRQ (1<<12)
114#define S3C2410_SDIIMSK_FIFOFAIL (1<<11)
115#define S3C2410_SDIIMSK_CRCSTATUS (1<<10)
116#define S3C2410_SDIIMSK_DATACRC (1<<9)
117#define S3C2410_SDIIMSK_DATATIMEOUT (1<<8)
118#define S3C2410_SDIIMSK_DATAFINISH (1<<7)
119#define S3C2410_SDIIMSK_BUSYFINISH (1<<6)
120#define S3C2410_SDIIMSK_SBITERR (1<<5) /* reserved 2440/2410a */
121#define S3C2410_SDIIMSK_TXFIFOHALF (1<<4)
122#define S3C2410_SDIIMSK_TXFIFOEMPTY (1<<3)
123#define S3C2410_SDIIMSK_RXFIFOLAST (1<<2)
124#define S3C2410_SDIIMSK_RXFIFOFULL (1<<1)
125#define S3C2410_SDIIMSK_RXFIFOHALF (1<<0)
126
127#endif /* __ASM_ARM_REGS_SDI */
diff --git a/include/asm-arm/arch-s3c2410/reset.h b/include/asm-arm/arch-s3c2410/reset.h
deleted file mode 100644
index 4f866cdecab0..000000000000
--- a/include/asm-arm/arch-s3c2410/reset.h
+++ /dev/null
@@ -1,22 +0,0 @@
1/* linux/include/asm-arm/arch-s3c2410/reset.h
2 *
3 * Copyright (c) 2007 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 * http://armlinux.simtec.co.uk/
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 *
11 * S3C2410 CPU reset controls
12*/
13
14#ifndef __ASM_ARCH_RESET_H
15#define __ASM_ARCH_RESET_H __FILE__
16
17/* This allows the over-ride of the default reset code
18*/
19
20extern void (*s3c24xx_reset_hook)(void);
21
22#endif /* __ASM_ARCH_RESET_H */
diff --git a/include/asm-arm/arch-s3c2410/spi-gpio.h b/include/asm-arm/arch-s3c2410/spi-gpio.h
deleted file mode 100644
index 73803731142a..000000000000
--- a/include/asm-arm/arch-s3c2410/spi-gpio.h
+++ /dev/null
@@ -1,27 +0,0 @@
1/* linux/include/asm-arm/arch-s3c2410/spi-gpio.h
2 *
3 * Copyright (c) 2006 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * S3C2410 - SPI Controller platfrom_device info
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11*/
12
13#ifndef __ASM_ARCH_SPIGPIO_H
14#define __ASM_ARCH_SPIGPIO_H __FILE__
15
16struct s3c2410_spigpio_info {
17 unsigned long pin_clk;
18 unsigned long pin_mosi;
19 unsigned long pin_miso;
20
21 int bus_num;
22
23 void (*chip_select)(struct s3c2410_spigpio_info *spi, int cs);
24};
25
26
27#endif /* __ASM_ARCH_SPIGPIO_H */
diff --git a/include/asm-arm/arch-s3c2410/spi.h b/include/asm-arm/arch-s3c2410/spi.h
deleted file mode 100644
index 442169887d3b..000000000000
--- a/include/asm-arm/arch-s3c2410/spi.h
+++ /dev/null
@@ -1,25 +0,0 @@
1/* linux/include/asm-arm/arch-s3c2410/spi.h
2 *
3 * Copyright (c) 2006 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * S3C2410 - SPI Controller platform_device info
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11*/
12
13#ifndef __ASM_ARCH_SPI_H
14#define __ASM_ARCH_SPI_H __FILE__
15
16struct s3c2410_spi_info {
17 unsigned long pin_cs; /* simple gpio cs */
18 unsigned int num_cs; /* total chipselects */
19 int bus_num; /* bus number to use. */
20
21 void (*set_cs)(struct s3c2410_spi_info *spi, int cs, int pol);
22};
23
24
25#endif /* __ASM_ARCH_SPI_H */
diff --git a/include/asm-arm/arch-s3c2410/system-reset.h b/include/asm-arm/arch-s3c2410/system-reset.h
deleted file mode 100644
index 1615bce0c026..000000000000
--- a/include/asm-arm/arch-s3c2410/system-reset.h
+++ /dev/null
@@ -1,64 +0,0 @@
1/* linux/include/asm-arm/arch-s3c2410/system-reset.h
2 *
3 * Copyright (c) 2008 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * S3C2410 - System define for arch_reset() function
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11*/
12
13#include <asm/hardware.h>
14#include <asm/io.h>
15
16#include <asm/plat-s3c/regs-watchdog.h>
17#include <asm/arch/regs-clock.h>
18
19#include <linux/clk.h>
20#include <linux/err.h>
21
22extern void (*s3c24xx_reset_hook)(void);
23
24static void
25arch_reset(char mode)
26{
27 struct clk *wdtclk;
28
29 if (mode == 's') {
30 cpu_reset(0);
31 }
32
33 if (s3c24xx_reset_hook)
34 s3c24xx_reset_hook();
35
36 printk("arch_reset: attempting watchdog reset\n");
37
38 __raw_writel(0, S3C2410_WTCON); /* disable watchdog, to be safe */
39
40 wdtclk = clk_get(NULL, "watchdog");
41 if (!IS_ERR(wdtclk)) {
42 clk_enable(wdtclk);
43 } else
44 printk(KERN_WARNING "%s: warning: cannot get watchdog clock\n", __func__);
45
46 /* put initial values into count and data */
47 __raw_writel(0x80, S3C2410_WTCNT);
48 __raw_writel(0x80, S3C2410_WTDAT);
49
50 /* set the watchdog to go and reset... */
51 __raw_writel(S3C2410_WTCON_ENABLE|S3C2410_WTCON_DIV16|S3C2410_WTCON_RSTEN |
52 S3C2410_WTCON_PRESCALE(0x20), S3C2410_WTCON);
53
54 /* wait for reset to assert... */
55 mdelay(500);
56
57 printk(KERN_ERR "Watchdog reset failed to assert reset\n");
58
59 /* delay to allow the serial port to show the message */
60 mdelay(50);
61
62 /* we'll take a jump through zero as a poor second */
63 cpu_reset(0);
64}
diff --git a/include/asm-arm/arch-s3c2410/system.h b/include/asm-arm/arch-s3c2410/system.h
deleted file mode 100644
index ad258085e53b..000000000000
--- a/include/asm-arm/arch-s3c2410/system.h
+++ /dev/null
@@ -1,58 +0,0 @@
1/* linux/include/asm-arm/arch-s3c2410/system.h
2 *
3 * Copyright (c) 2003 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * S3C2410 - System function defines and includes
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11*/
12
13#include <asm/hardware.h>
14#include <asm/io.h>
15
16#include <asm/arch/map.h>
17#include <asm/arch/idle.h>
18#include <asm/arch/reset.h>
19
20#include <asm/arch/regs-clock.h>
21
22void (*s3c24xx_idle)(void);
23void (*s3c24xx_reset_hook)(void);
24
25void s3c24xx_default_idle(void)
26{
27 unsigned long tmp;
28 int i;
29
30 /* idle the system by using the idle mode which will wait for an
31 * interrupt to happen before restarting the system.
32 */
33
34 /* Warning: going into idle state upsets jtag scanning */
35
36 __raw_writel(__raw_readl(S3C2410_CLKCON) | S3C2410_CLKCON_IDLE,
37 S3C2410_CLKCON);
38
39 /* the samsung port seems to do a loop and then unset idle.. */
40 for (i = 0; i < 50; i++) {
41 tmp += __raw_readl(S3C2410_CLKCON); /* ensure loop not optimised out */
42 }
43
44 /* this bit is not cleared on re-start... */
45
46 __raw_writel(__raw_readl(S3C2410_CLKCON) & ~S3C2410_CLKCON_IDLE,
47 S3C2410_CLKCON);
48}
49
50static void arch_idle(void)
51{
52 if (s3c24xx_idle != NULL)
53 (s3c24xx_idle)();
54 else
55 s3c24xx_default_idle();
56}
57
58#include <asm/arch/system-reset.h>
diff --git a/include/asm-arm/arch-s3c2410/timex.h b/include/asm-arm/arch-s3c2410/timex.h
deleted file mode 100644
index c16a99c5a59a..000000000000
--- a/include/asm-arm/arch-s3c2410/timex.h
+++ /dev/null
@@ -1,26 +0,0 @@
1/* linux/include/asm-arm/arch-s3c2410/timex.h
2 *
3 * Copyright (c) 2003-2005 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * S3C2410 - time parameters
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11*/
12
13#ifndef __ASM_ARCH_TIMEX_H
14#define __ASM_ARCH_TIMEX_H
15
16/* CLOCK_TICK_RATE needs to be evaluatable by the cpp, so making it
17 * a variable is useless. It seems as long as we make our timers an
18 * exact multiple of HZ, any value that makes a 1->1 correspondence
19 * for the time conversion functions to/from jiffies is acceptable.
20*/
21
22
23#define CLOCK_TICK_RATE 12000000
24
25
26#endif /* __ASM_ARCH_TIMEX_H */
diff --git a/include/asm-arm/arch-s3c2410/uncompress.h b/include/asm-arm/arch-s3c2410/uncompress.h
deleted file mode 100644
index 48a5731ee988..000000000000
--- a/include/asm-arm/arch-s3c2410/uncompress.h
+++ /dev/null
@@ -1,52 +0,0 @@
1/* linux/include/asm-arm/arch-s3c2410/uncompress.h
2 *
3 * Copyright (c) 2003, 2007 Simtec Electronics
4 * http://armlinux.simtec.co.uk/
5 * Ben Dooks <ben@simtec.co.uk>
6 *
7 * S3C2410 - uncompress code
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12*/
13
14#ifndef __ASM_ARCH_UNCOMPRESS_H
15#define __ASM_ARCH_UNCOMPRESS_H
16
17#include <asm/arch/regs-gpio.h>
18#include <asm/arch/map.h>
19
20/* working in physical space... */
21#undef S3C2410_GPIOREG
22#define S3C2410_GPIOREG(x) ((S3C24XX_PA_GPIO + (x)))
23
24#include <asm/plat-s3c/uncompress.h>
25
26static inline int is_arm926(void)
27{
28 unsigned int cpuid;
29
30 asm volatile ("mrc p15, 0, %0, c1, c0, 0" : "=r" (cpuid));
31
32 return ((cpuid & 0xff0) == 0x260);
33}
34
35static void arch_detect_cpu(void)
36{
37 unsigned int cpuid;
38
39 cpuid = *((volatile unsigned int *)S3C2410_GSTATUS1);
40 cpuid &= S3C2410_GSTATUS1_IDMASK;
41
42 if (is_arm926() || cpuid == S3C2410_GSTATUS1_2440 ||
43 cpuid == S3C2410_GSTATUS1_2442) {
44 fifo_mask = S3C2440_UFSTAT_TXMASK;
45 fifo_max = 63 << S3C2440_UFSTAT_TXSHIFT;
46 } else {
47 fifo_mask = S3C2410_UFSTAT_TXMASK;
48 fifo_max = 15 << S3C2410_UFSTAT_TXSHIFT;
49 }
50}
51
52#endif /* __ASM_ARCH_UNCOMPRESS_H */
diff --git a/include/asm-arm/arch-s3c2410/usb-control.h b/include/asm-arm/arch-s3c2410/usb-control.h
deleted file mode 100644
index 5bfa376e33dc..000000000000
--- a/include/asm-arm/arch-s3c2410/usb-control.h
+++ /dev/null
@@ -1,41 +0,0 @@
1/* linux/include/asm-arm/arch-s3c2410/usb-control.h
2 *
3 * Copyright (c) 2004 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * S3C2410 - usb port information
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11*/
12
13#ifndef __ASM_ARCH_USBCONTROL_H
14#define __ASM_ARCH_USBCONTROL_H "include/asm-arm/arch-s3c2410/usb-control.h"
15
16#define S3C_HCDFLG_USED (1)
17
18struct s3c2410_hcd_port {
19 unsigned char flags;
20 unsigned char power;
21 unsigned char oc_status;
22 unsigned char oc_changed;
23};
24
25struct s3c2410_hcd_info {
26 struct usb_hcd *hcd;
27 struct s3c2410_hcd_port port[2];
28
29 void (*power_control)(int port, int to);
30 void (*enable_oc)(struct s3c2410_hcd_info *, int on);
31 void (*report_oc)(struct s3c2410_hcd_info *, int ports);
32};
33
34static void inline s3c2410_usb_report_oc(struct s3c2410_hcd_info *info, int ports)
35{
36 if (info->report_oc != NULL) {
37 (info->report_oc)(info, ports);
38 }
39}
40
41#endif /*__ASM_ARCH_USBCONTROL_H */
diff --git a/include/asm-arm/arch-s3c2410/vmalloc.h b/include/asm-arm/arch-s3c2410/vmalloc.h
deleted file mode 100644
index 0ae3bdb7e03b..000000000000
--- a/include/asm-arm/arch-s3c2410/vmalloc.h
+++ /dev/null
@@ -1,20 +0,0 @@
1/* linux/include/asm-arm/arch-s3c2410/vmalloc.h
2 *
3 * from linux/include/asm-arm/arch-iop3xx/vmalloc.h
4 *
5 * Copyright (c) 2003 Simtec Electronics <linux@simtec.co.uk>
6 * http://www.simtec.co.uk/products/SWLINUX/
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 *
12 * S3C2410 vmalloc definition
13*/
14
15#ifndef __ASM_ARCH_VMALLOC_H
16#define __ASM_ARCH_VMALLOC_H
17
18#define VMALLOC_END (0xE0000000)
19
20#endif /* __ASM_ARCH_VMALLOC_H */
diff --git a/include/asm-arm/arch-s3c2410/vr1000-cpld.h b/include/asm-arm/arch-s3c2410/vr1000-cpld.h
deleted file mode 100644
index 0557b0a5ab1d..000000000000
--- a/include/asm-arm/arch-s3c2410/vr1000-cpld.h
+++ /dev/null
@@ -1,18 +0,0 @@
1/* linux/include/asm-arm/arch-s3c2410/vr1000-cpld.h
2 *
3 * Copyright (c) 2003 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * VR1000 - CPLD control constants
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11*/
12
13#ifndef __ASM_ARCH_VR1000CPLD_H
14#define __ASM_ARCH_VR1000CPLD_H
15
16#define VR1000_CPLD_CTRL2_RAMWEN (0x04) /* SRAM Write Enable */
17
18#endif /* __ASM_ARCH_VR1000CPLD_H */
diff --git a/include/asm-arm/arch-s3c2410/vr1000-irq.h b/include/asm-arm/arch-s3c2410/vr1000-irq.h
deleted file mode 100644
index 890937083c61..000000000000
--- a/include/asm-arm/arch-s3c2410/vr1000-irq.h
+++ /dev/null
@@ -1,26 +0,0 @@
1/* linux/include/asm-arm/arch-s3c2410/vr1000-irq.h
2 *
3 * Copyright (c) 2003,2004 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * Machine VR1000 - IRQ Number definitions
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11*/
12
13#ifndef __ASM_ARCH_VR1000IRQ_H
14#define __ASM_ARCH_VR1000IRQ_H
15
16/* irq numbers to onboard peripherals */
17
18#define IRQ_USBOC IRQ_EINT19
19#define IRQ_IDE0 IRQ_EINT16
20#define IRQ_IDE1 IRQ_EINT17
21#define IRQ_VR1000_SERIAL IRQ_EINT12
22#define IRQ_VR1000_DM9000A IRQ_EINT10
23#define IRQ_VR1000_DM9000N IRQ_EINT9
24#define IRQ_SMALERT IRQ_EINT8
25
26#endif /* __ASM_ARCH_VR1000IRQ_H */
diff --git a/include/asm-arm/arch-s3c2410/vr1000-map.h b/include/asm-arm/arch-s3c2410/vr1000-map.h
deleted file mode 100644
index 92a56a724a8c..000000000000
--- a/include/asm-arm/arch-s3c2410/vr1000-map.h
+++ /dev/null
@@ -1,110 +0,0 @@
1/* linux/include/asm-arm/arch-s3c2410/vr1000-map.h
2 *
3 * Copyright (c) 2003-2005 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * Machine VR1000 - Memory map definitions
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11*/
12
13/* needs arch/map.h including with this */
14
15/* ok, we've used up to 0x13000000, now we need to find space for the
16 * peripherals that live in the nGCS[x] areas, which are quite numerous
17 * in their space. We also have the board's CPLD to find register space
18 * for.
19 */
20
21#ifndef __ASM_ARCH_VR1000MAP_H
22#define __ASM_ARCH_VR1000MAP_H
23
24#include <asm/arch/bast-map.h>
25
26#define VR1000_IOADDR(x) BAST_IOADDR(x)
27
28/* we put the CPLD registers next, to get them out of the way */
29
30#define VR1000_VA_CTRL1 VR1000_IOADDR(0x00000000) /* 0x01300000 */
31#define VR1000_PA_CTRL1 (S3C2410_CS5 | 0x7800000)
32
33#define VR1000_VA_CTRL2 VR1000_IOADDR(0x00100000) /* 0x01400000 */
34#define VR1000_PA_CTRL2 (S3C2410_CS1 | 0x6000000)
35
36#define VR1000_VA_CTRL3 VR1000_IOADDR(0x00200000) /* 0x01500000 */
37#define VR1000_PA_CTRL3 (S3C2410_CS1 | 0x6800000)
38
39#define VR1000_VA_CTRL4 VR1000_IOADDR(0x00300000) /* 0x01600000 */
40#define VR1000_PA_CTRL4 (S3C2410_CS1 | 0x7000000)
41
42/* next, we have the PC104 ISA interrupt registers */
43
44#define VR1000_PA_PC104_IRQREQ (S3C2410_CS5 | 0x6000000) /* 0x01700000 */
45#define VR1000_VA_PC104_IRQREQ VR1000_IOADDR(0x00400000)
46
47#define VR1000_PA_PC104_IRQRAW (S3C2410_CS5 | 0x6800000) /* 0x01800000 */
48#define VR1000_VA_PC104_IRQRAW VR1000_IOADDR(0x00500000)
49
50#define VR1000_PA_PC104_IRQMASK (S3C2410_CS5 | 0x7000000) /* 0x01900000 */
51#define VR1000_VA_PC104_IRQMASK VR1000_IOADDR(0x00600000)
52
53/* 0xE0000000 contains the IO space that is split by speed and
54 * wether the access is for 8 or 16bit IO... this ensures that
55 * the correct access is made
56 *
57 * 0x10000000 of space, partitioned as so:
58 *
59 * 0x00000000 to 0x04000000 8bit, slow
60 * 0x04000000 to 0x08000000 16bit, slow
61 * 0x08000000 to 0x0C000000 16bit, net
62 * 0x0C000000 to 0x10000000 16bit, fast
63 *
64 * each of these spaces has the following in:
65 *
66 * 0x02000000 to 0x02100000 1MB IDE primary channel
67 * 0x02100000 to 0x02200000 1MB IDE primary channel aux
68 * 0x02200000 to 0x02400000 1MB IDE secondary channel
69 * 0x02300000 to 0x02400000 1MB IDE secondary channel aux
70 * 0x02500000 to 0x02600000 1MB Davicom DM9000 ethernet controllers
71 * 0x02600000 to 0x02700000 1MB
72 *
73 * the phyiscal layout of the zones are:
74 * nGCS2 - 8bit, slow
75 * nGCS3 - 16bit, slow
76 * nGCS4 - 16bit, net
77 * nGCS5 - 16bit, fast
78 */
79
80#define VR1000_VA_MULTISPACE (0xE0000000)
81
82#define VR1000_VA_ISAIO (VR1000_VA_MULTISPACE + 0x00000000)
83#define VR1000_VA_ISAMEM (VR1000_VA_MULTISPACE + 0x01000000)
84#define VR1000_VA_IDEPRI (VR1000_VA_MULTISPACE + 0x02000000)
85#define VR1000_VA_IDEPRIAUX (VR1000_VA_MULTISPACE + 0x02100000)
86#define VR1000_VA_IDESEC (VR1000_VA_MULTISPACE + 0x02200000)
87#define VR1000_VA_IDESECAUX (VR1000_VA_MULTISPACE + 0x02300000)
88#define VR1000_VA_ASIXNET (VR1000_VA_MULTISPACE + 0x02400000)
89#define VR1000_VA_DM9000 (VR1000_VA_MULTISPACE + 0x02500000)
90#define VR1000_VA_SUPERIO (VR1000_VA_MULTISPACE + 0x02600000)
91
92/* physical offset addresses for the peripherals */
93
94#define VR1000_PA_IDEPRI (0x02000000)
95#define VR1000_PA_IDEPRIAUX (0x02800000)
96#define VR1000_PA_IDESEC (0x03000000)
97#define VR1000_PA_IDESECAUX (0x03800000)
98#define VR1000_PA_DM9000 (0x05000000)
99
100#define VR1000_PA_SERIAL (0x11800000)
101#define VR1000_VA_SERIAL (VR1000_IOADDR(0x00700000))
102
103/* VR1000 ram is in CS1, with A26..A24 = 2_101 */
104#define VR1000_PA_SRAM (S3C2410_CS1 | 0x05000000)
105
106/* some configurations for the peripherals */
107
108#define VR1000_DM9000_CS VR1000_VAM_CS4
109
110#endif /* __ASM_ARCH_VR1000MAP_H */
diff --git a/include/asm-arm/arch-sa1100/SA-1101.h b/include/asm-arm/arch-sa1100/SA-1101.h
deleted file mode 100644
index 65ca8c79e6d2..000000000000
--- a/include/asm-arm/arch-sa1100/SA-1101.h
+++ /dev/null
@@ -1,925 +0,0 @@
1/*
2 * SA-1101.h
3 *
4 * Copyright (c) Peter Danielsson 1999
5 *
6 * Definition of constants related to the sa1101
7 * support chip for the sa1100
8 *
9 */
10
11
12/* Be sure that virtual mapping is defined right */
13#ifndef __ASM_ARCH_HARDWARE_H
14#error You must include hardware.h not SA-1101.h
15#endif
16
17#ifndef SA1101_BASE
18#error You must define SA-1101 physical base address
19#endif
20
21#ifndef LANGUAGE
22# ifdef __ASSEMBLY__
23# define LANGUAGE Assembly
24# else
25# define LANGUAGE C
26# endif
27#endif
28
29/*
30 * We have mapped the sa1101 depending on the value of SA1101_BASE.
31 * It then appears from 0xf4000000.
32 */
33
34#define SA1101_p2v( x ) ((x) - SA1101_BASE + 0xf4000000)
35#define SA1101_v2p( x ) ((x) - 0xf4000000 + SA1101_BASE)
36
37#ifndef SA1101_p2v
38#define SA1101_p2v(PhAdd) (PhAdd)
39#endif
40
41#include <asm/arch/bitfield.h>
42
43#define C 0
44#define Assembly 1
45
46
47/*
48 * Memory map
49 */
50
51#define __SHMEM_CONTROL0 0x00000000
52#define __SYSTEM_CONTROL1 0x00000400
53#define __ARBITER 0x00020000
54#define __SYSTEM_CONTROL2 0x00040000
55#define __SYSTEM_CONTROL3 0x00060000
56#define __PARALLEL_PORT 0x00080000
57#define __VIDMEM_CONTROL 0x00100000
58#define __UPDATE_FIFO 0x00120000
59#define __SHMEM_CONTROL1 0x00140000
60#define __INTERRUPT_CONTROL 0x00160000
61#define __USB_CONTROL 0x00180000
62#define __TRACK_INTERFACE 0x001a0000
63#define __MOUSE_INTERFACE 0x001b0000
64#define __KEYPAD_INTERFACE 0x001c0000
65#define __PCMCIA_INTERFACE 0x001e0000
66#define __VGA_CONTROL 0x00200000
67#define __GPIO_INTERFACE 0x00300000
68
69/*
70 * Macro that calculates real address for registers in the SA-1101
71 */
72
73#define _SA1101( x ) ((x) + SA1101_BASE)
74
75/*
76 * Interface and shared memory controller registers
77 *
78 * Registers
79 * SKCR SA-1101 control register (read/write)
80 * SMCR Shared Memory Controller Register
81 * SNPR Snoop Register
82 */
83
84#define _SKCR _SA1101( 0x00000000 ) /* SA-1101 Control Reg. */
85#define _SMCR _SA1101( 0x00140000 ) /* Shared Mem. Control Reg. */
86#define _SNPR _SA1101( 0x00140400 ) /* Snoop Reg. */
87
88#if LANGUAGE == C
89#define SKCR (*((volatile Word *) SA1101_p2v (_SKCR)))
90#define SMCR (*((volatile Word *) SA1101_p2v (_SMCR)))
91#define SNPR (*((volatile Word *) SA1101_p2v (_SNPR)))
92
93#define SKCR_PLLEn 0x0001 /* Enable On-Chip PLL */
94#define SKCR_BCLKEn 0x0002 /* Enables BCLK */
95#define SKCR_Sleep 0x0004 /* Sleep Mode */
96#define SKCR_IRefEn 0x0008 /* DAC Iref input enable */
97#define SKCR_VCOON 0x0010 /* VCO bias */
98#define SKCR_ScanTestEn 0x0020 /* Enables scan test */
99#define SKCR_ClockTestEn 0x0040 /* Enables clock test */
100
101#define SMCR_DCAC Fld(2,0) /* Number of column address bits */
102#define SMCR_DRAC Fld(2,2) /* Number of row address bits */
103#define SMCR_ArbiterBias 0x0008 /* favor video or USB */
104#define SMCR_TopVidMem Fld(4,5) /* Top 4 bits of vidmem addr. */
105
106#define SMCR_ColAdrBits( x ) /* col. addr bits 8..11 */ \
107 (( (x) - 8 ) << FShft (SMCR_DCAC))
108#define SMCR_RowAdrBits( x ) /* row addr bits 9..12 */\
109 (( (x) - 9 ) << FShft (SMCR_DRAC))
110
111#define SNPR_VFBstart Fld(12,0) /* Video frame buffer addr */
112#define SNPR_VFBsize Fld(11,12) /* Video frame buffer size */
113#define SNPR_WholeBank (1 << 23) /* Whole bank bit */
114#define SNPR_BankSelect Fld(2,27) /* Bank select */
115#define SNPR_SnoopEn (1 << 31) /* Enable snoop operation */
116
117#define SNPR_Set_VFBsize( x ) /* set frame buffer size (in kb) */ \
118 ( (x) << FShft (SNPR_VFBsize))
119#define SNPR_Select_Bank(x) /* select bank 0 or 1 */ \
120 (( (x) + 1 ) << FShft (SNPR_BankSelect ))
121
122#endif /* LANGUAGE == C */
123
124/*
125 * Video Memory Controller
126 *
127 * Registers
128 * VMCCR Configuration register
129 * VMCAR VMC address register
130 * VMCDR VMC data register
131 *
132 */
133
134#define _VMCCR _SA1101( 0x00100000 ) /* Configuration register */
135#define _VMCAR _SA1101( 0x00101000 ) /* VMC address register */
136#define _VMCDR _SA1101( 0x00101400 ) /* VMC data register */
137
138#if LANGUAGE == C
139#define VMCCR (*((volatile Word *) SA1101_p2v (_VMCCR)))
140#define VMCAR (*((volatile Word *) SA1101_p2v (_VMCAR)))
141#define VMCDR (*((volatile Word *) SA1101_p2v (_VMCDR)))
142
143#define VMCCR_RefreshEn 0x0000 /* Enable memory refresh */
144#define VMCCR_Config 0x0001 /* DRAM size */
145#define VMCCR_RefPeriod Fld(2,3) /* Refresh period */
146#define VMCCR_StaleDataWait Fld(4,5) /* Stale FIFO data timeout counter */
147#define VMCCR_SleepState (1<<9) /* State of interface pins in sleep*/
148#define VMCCR_RefTest (1<<10) /* refresh test */
149#define VMCCR_RefLow Fld(6,11) /* refresh low counter */
150#define VMCCR_RefHigh Fld(7,17) /* refresh high counter */
151#define VMCCR_SDTCTest Fld(7,24) /* stale data timeout counter */
152#define VMCCR_ForceSelfRef (1<<31) /* Force self refresh */
153
154#endif LANGUAGE == C
155
156
157/* Update FIFO
158 *
159 * Registers
160 * UFCR Update FIFO Control Register
161 * UFSR Update FIFO Status Register
162 * UFLVLR update FIFO level register
163 * UFDR update FIFO data register
164 */
165
166#define _UFCR _SA1101(0x00120000) /* Update FIFO Control Reg. */
167#define _UFSR _SA1101(0x00120400) /* Update FIFO Status Reg. */
168#define _UFLVLR _SA1101(0x00120800) /* Update FIFO level reg. */
169#define _UFDR _SA1101(0x00120c00) /* Update FIFO data reg. */
170
171#if LANGUAGE == C
172
173#define UFCR (*((volatile Word *) SA1101_p2v (_UFCR)))
174#define UFSR (*((volatile Word *) SA1101_p2v (_UFSR)))
175#define UFLVLR (*((volatile Word *) SA1101_p2v (_UFLVLR)))
176#define UFDR (*((volatile Word *) SA1101_p2v (_UFDR)))
177
178
179#define UFCR_FifoThreshhold Fld(7,0) /* Level for FifoGTn flag */
180
181#define UFSR_FifoGTnFlag 0x01 /* FifoGTn flag */#define UFSR_FifoEmpty 0x80 /* FIFO is empty */
182
183#endif /* LANGUAGE == C */
184
185/* System Controller
186 *
187 * Registers
188 * SKPCR Power Control Register
189 * SKCDR Clock Divider Register
190 * DACDR1 DAC1 Data register
191 * DACDR2 DAC2 Data register
192 */
193
194#define _SKPCR _SA1101(0x00000400)
195#define _SKCDR _SA1101(0x00040000)
196#define _DACDR1 _SA1101(0x00060000)
197#define _DACDR2 _SA1101(0x00060400)
198
199#if LANGUAGE == C
200#define SKPCR (*((volatile Word *) SA1101_p2v (_SKPCR)))
201#define SKCDR (*((volatile Word *) SA1101_p2v (_SKCDR)))
202#define DACDR1 (*((volatile Word *) SA1101_p2v (_DACDR1)))
203#define DACDR2 (*((volatile Word *) SA1101_p2v (_DACDR2)))
204
205#define SKPCR_UCLKEn 0x01 /* USB Enable */
206#define SKPCR_PCLKEn 0x02 /* PS/2 Enable */
207#define SKPCR_ICLKEn 0x04 /* Interrupt Controller Enable */
208#define SKPCR_VCLKEn 0x08 /* Video Controller Enable */
209#define SKPCR_PICLKEn 0x10 /* parallel port Enable */
210#define SKPCR_DCLKEn 0x20 /* DACs Enable */
211#define SKPCR_nKPADEn 0x40 /* Multiplexer */
212
213#define SKCDR_PLLMul Fld(7,0) /* PLL Multiplier */
214#define SKCDR_VCLKEn Fld(2,7) /* Video controller clock divider */
215#define SKDCR_BCLKEn (1<<9) /* BCLK Divider */
216#define SKDCR_UTESTCLKEn (1<<10) /* Route USB clock during test mode */
217#define SKDCR_DivRValue Fld(6,11) /* Input clock divider for PLL */
218#define SKDCR_DivNValue Fld(5,17) /* Output clock divider for PLL */
219#define SKDCR_PLLRSH Fld(3,22) /* PLL bandwidth control */
220#define SKDCR_ChargePump (1<<25) /* Charge pump control */
221#define SKDCR_ClkTestMode (1<<26) /* Clock output test mode */
222#define SKDCR_ClkTestEn (1<<27) /* Test clock generator */
223#define SKDCR_ClkJitterCntl Fld(3,28) /* video clock jitter compensation */
224
225#define DACDR_DACCount Fld(8,0) /* Count value */
226#define DACDR1_DACCount DACDR_DACCount
227#define DACDR2_DACCount DACDR_DACCount
228
229#endif /* LANGUAGE == C */
230
231/*
232 * Parallel Port Interface
233 *
234 * Registers
235 * IEEE_Config IEEE mode selection and programmable attributes
236 * IEEE_Control Controls the states of IEEE port control outputs
237 * IEEE_Data Forward transfer data register
238 * IEEE_Addr Forward transfer address register
239 * IEEE_Status Port IO signal status register
240 * IEEE_IntStatus Port interrupts status register
241 * IEEE_FifoLevels Rx and Tx FIFO interrupt generation levels
242 * IEEE_InitTime Forward timeout counter initial value
243 * IEEE_TimerStatus Forward timeout counter current value
244 * IEEE_FifoReset Reset forward transfer FIFO
245 * IEEE_ReloadValue Counter reload value
246 * IEEE_TestControl Control testmode
247 * IEEE_TestDataIn Test data register
248 * IEEE_TestDataInEn Enable test data
249 * IEEE_TestCtrlIn Test control signals
250 * IEEE_TestCtrlInEn Enable test control signals
251 * IEEE_TestDataStat Current data bus value
252 *
253 */
254
255/*
256 * The control registers are defined as offsets from a base address
257 */
258
259#define _IEEE( x ) _SA1101( (x) + __PARALLEL_PORT )
260
261#define _IEEE_Config _IEEE( 0x0000 )
262#define _IEEE_Control _IEEE( 0x0400 )
263#define _IEEE_Data _IEEE( 0x4000 )
264#define _IEEE_Addr _IEEE( 0x0800 )
265#define _IEEE_Status _IEEE( 0x0c00 )
266#define _IEEE_IntStatus _IEEE( 0x1000 )
267#define _IEEE_FifoLevels _IEEE( 0x1400 )
268#define _IEEE_InitTime _IEEE( 0x1800 )
269#define _IEEE_TimerStatus _IEEE( 0x1c00 )
270#define _IEEE_FifoReset _IEEE( 0x2000 )
271#define _IEEE_ReloadValue _IEEE( 0x3c00 )
272#define _IEEE_TestControl _IEEE( 0x2400 )
273#define _IEEE_TestDataIn _IEEE( 0x2800 )
274#define _IEEE_TestDataInEn _IEEE( 0x2c00 )
275#define _IEEE_TestCtrlIn _IEEE( 0x3000 )
276#define _IEEE_TestCtrlInEn _IEEE( 0x3400 )
277#define _IEEE_TestDataStat _IEEE( 0x3800 )
278
279
280#if LANGUAGE == C
281#define IEEE_Config (*((volatile Word *) SA1101_p2v (_IEEE_Config)))
282#define IEEE_Control (*((volatile Word *) SA1101_p2v (_IEEE_Control)))
283#define IEEE_Data (*((volatile Word *) SA1101_p2v (_IEEE_Data)))
284#define IEEE_Addr (*((volatile Word *) SA1101_p2v (_IEEE_Addr)))
285#define IEEE_Status (*((volatile Word *) SA1101_p2v (_IEEE_Status)))
286#define IEEE_IntStatus (*((volatile Word *) SA1101_p2v (_IEEE_IntStatus)))
287#define IEEE_FifoLevels (*((volatile Word *) SA1101_p2v (_IEEE_FifoLevels)))
288#define IEEE_InitTime (*((volatile Word *) SA1101_p2v (_IEEE_InitTime)))
289#define IEEE_TimerStatus (*((volatile Word *) SA1101_p2v (_IEEE_TimerStatus)))
290#define IEEE_FifoReset (*((volatile Word *) SA1101_p2v (_IEEE_FifoReset)))
291#define IEEE_ReloadValue (*((volatile Word *) SA1101_p2v (_IEEE_ReloadValue)))
292#define IEEE_TestControl (*((volatile Word *) SA1101_p2v (_IEEE_TestControl)))
293#define IEEE_TestDataIn (*((volatile Word *) SA1101_p2v (_IEEE_TestDataIn)))
294#define IEEE_TestDataInEn (*((volatile Word *) SA1101_p2v (_IEEE_TestDataInEn)))
295#define IEEE_TestCtrlIn (*((volatile Word *) SA1101_p2v (_IEEE_TestCtrlIn)))
296#define IEEE_TestCtrlInEn (*((volatile Word *) SA1101_p2v (_IEEE_TestCtrlInEn)))
297#define IEEE_TestDataStat (*((volatile Word *) SA1101_p2v (_IEEE_TestDataStat)))
298
299
300#define IEEE_Config_M Fld(3,0) /* Mode select */
301#define IEEE_Config_D 0x04 /* FIFO access enable */
302#define IEEE_Config_B 0x08 /* 9-bit word enable */
303#define IEEE_Config_T 0x10 /* Data transfer enable */
304#define IEEE_Config_A 0x20 /* Data transfer direction */
305#define IEEE_Config_E 0x40 /* Timer enable */
306#define IEEE_Control_A 0x08 /* AutoFd output */
307#define IEEE_Control_E 0x04 /* Selectin output */
308#define IEEE_Control_T 0x02 /* Strobe output */
309#define IEEE_Control_I 0x01 /* Port init output */
310#define IEEE_Data_C (1<<31) /* Byte count */
311#define IEEE_Data_Db Fld(9,16) /* Data byte 2 */
312#define IEEE_Data_Da Fld(9,0) /* Data byte 1 */
313#define IEEE_Addr_A Fld(8,0) /* forward address transfer byte */
314#define IEEE_Status_A 0x0100 /* nAutoFd port output status */
315#define IEEE_Status_E 0x0080 /* nSelectIn port output status */
316#define IEEE_Status_T 0x0040 /* nStrobe port output status */
317#define IEEE_Status_I 0x0020 /* nInit port output status */
318#define IEEE_Status_B 0x0010 /* Busy port inout status */
319#define IEEE_Status_S 0x0008 /* Select port input status */
320#define IEEE_Status_K 0x0004 /* nAck port input status */
321#define IEEE_Status_F 0x0002 /* nFault port input status */
322#define IEEE_Status_R 0x0001 /* pError port input status */
323
324#define IEEE_IntStatus_IntReqDat 0x0100
325#define IEEE_IntStatus_IntReqEmp 0x0080
326#define IEEE_IntStatus_IntReqInt 0x0040
327#define IEEE_IntStatus_IntReqRav 0x0020
328#define IEEE_IntStatus_IntReqTim 0x0010
329#define IEEE_IntStatus_RevAddrComp 0x0008
330#define IEEE_IntStatus_RevDataComp 0x0004
331#define IEEE_IntStatus_FwdAddrComp 0x0002
332#define IEEE_IntStatus_FwdDataComp 0x0001
333#define IEEE_FifoLevels_RevFifoLevel 2
334#define IEEE_FifoLevels_FwdFifoLevel 1
335#define IEEE_InitTime_TimValInit Fld(22,0)
336#define IEEE_TimerStatus_TimValStat Fld(22,0)
337#define IEEE_ReloadValue_Reload Fld(4,0)
338
339#define IEEE_TestControl_RegClk 0x04
340#define IEEE_TestControl_ClockSelect Fld(2,1)
341#define IEEE_TestControl_TimerTestModeEn 0x01
342#define IEEE_TestCtrlIn_PError 0x10
343#define IEEE_TestCtrlIn_nFault 0x08
344#define IEEE_TestCtrlIn_nAck 0x04
345#define IEEE_TestCtrlIn_PSel 0x02
346#define IEEE_TestCtrlIn_Busy 0x01
347
348#endif /* LANGUAGE == C */
349
350/*
351 * VGA Controller
352 *
353 * Registers
354 * VideoControl Video Control Register
355 * VgaTiming0 VGA Timing Register 0
356 * VgaTiming1 VGA Timing Register 1
357 * VgaTiming2 VGA Timing Register 2
358 * VgaTiming3 VGA Timing Register 3
359 * VgaBorder VGA Border Color Register
360 * VgaDBAR VGADMA Base Address Register
361 * VgaDCAR VGADMA Channel Current Address Register
362 * VgaStatus VGA Status Register
363 * VgaInterruptMask VGA Interrupt Mask Register
364 * VgaPalette VGA Palette Registers
365 * DacControl DAC Control Register
366 * VgaTest VGA Controller Test Register
367 */
368
369#define _VGA( x ) _SA1101( ( x ) + __VGA_CONTROL )
370
371#define _VideoControl _VGA( 0x0000 )
372#define _VgaTiming0 _VGA( 0x0400 )
373#define _VgaTiming1 _VGA( 0x0800 )
374#define _VgaTiming2 _VGA( 0x0c00 )
375#define _VgaTiming3 _VGA( 0x1000 )
376#define _VgaBorder _VGA( 0x1400 )
377#define _VgaDBAR _VGA( 0x1800 )
378#define _VgaDCAR _VGA( 0x1c00 )
379#define _VgaStatus _VGA( 0x2000 )
380#define _VgaInterruptMask _VGA( 0x2400 )
381#define _VgaPalette _VGA( 0x40000 )
382#define _DacControl _VGA( 0x3000 )
383#define _VgaTest _VGA( 0x2c00 )
384
385#if (LANGUAGE == C)
386#define VideoControl (*((volatile Word *) SA1101_p2v (_VideoControl)))
387#define VgaTiming0 (*((volatile Word *) SA1101_p2v (_VgaTiming0)))
388#define VgaTiming1 (*((volatile Word *) SA1101_p2v (_VgaTiming1)))
389#define VgaTiming2 (*((volatile Word *) SA1101_p2v (_VgaTiming2)))
390#define VgaTiming3 (*((volatile Word *) SA1101_p2v (_VgaTiming3)))
391#define VgaBorder (*((volatile Word *) SA1101_p2v (_VgaBorder)))
392#define VgaDBAR (*((volatile Word *) SA1101_p2v (_VgaDBAR)))
393#define VgaDCAR (*((volatile Word *) SA1101_p2v (_VgaDCAR)))
394#define VgaStatus (*((volatile Word *) SA1101_p2v (_VgaStatus)))
395#define VgaInterruptMask (*((volatile Word *) SA1101_p2v (_VgaInterruptMask)))
396#define VgaPalette (*((volatile Word *) SA1101_p2v (_VgaPalette)))
397#define DacControl (*((volatile Word *) SA1101_p2v (_DacControl)))
398#define VgaTest (*((volatile Word *) SA1101_p2v (_VgaTest)))
399
400#define VideoControl_VgaEn 0x00000000
401#define VideoControl_BGR 0x00000001
402#define VideoControl_VCompVal Fld(2,2)
403#define VideoControl_VgaReq Fld(4,4)
404#define VideoControl_VBurstL Fld(4,8)
405#define VideoControl_VMode (1<<12)
406#define VideoControl_PalRead (1<<13)
407
408#define VgaTiming0_PPL Fld(6,2)
409#define VgaTiming0_HSW Fld(8,8)
410#define VgaTiming0_HFP Fld(8,16)
411#define VgaTiming0_HBP Fld(8,24)
412
413#define VgaTiming1_LPS Fld(10,0)
414#define VgaTiming1_VSW Fld(6,10)
415#define VgaTiming1_VFP Fld(8,16)
416#define VgaTiming1_VBP Fld(8,24)
417
418#define VgaTiming2_IVS 0x01
419#define VgaTiming2_IHS 0x02
420#define VgaTiming2_CVS 0x04
421#define VgaTiming2_CHS 0x08
422
423#define VgaTiming3_HBS Fld(8,0)
424#define VgaTiming3_HBE Fld(8,8)
425#define VgaTiming3_VBS Fld(8,16)
426#define VgaTiming3_VBE Fld(8,24)
427
428#define VgaBorder_BCOL Fld(24,0)
429
430#define VgaStatus_VFUF 0x01
431#define VgaStatus_VNext 0x02
432#define VgaStatus_VComp 0x04
433
434#define VgaInterruptMask_VFUFMask 0x00
435#define VgaInterruptMask_VNextMask 0x01
436#define VgaInterruptMask_VCompMask 0x02
437
438#define VgaPalette_R Fld(8,0)
439#define VgaPalette_G Fld(8,8)
440#define VgaPalette_B Fld(8,16)
441
442#define DacControl_DACON 0x0001
443#define DacControl_COMPON 0x0002
444#define DacControl_PEDON 0x0004
445#define DacControl_RTrim Fld(5,4)
446#define DacControl_GTrim Fld(5,9)
447#define DacControl_BTrim Fld(5,14)
448
449#define VgaTest_TDAC 0x00
450#define VgaTest_Datatest Fld(4,1)
451#define VgaTest_DACTESTDAC 0x10
452#define VgaTest_DACTESTOUT Fld(3,5)
453
454#endif /* LANGUAGE == C */
455
456/*
457 * USB Host Interface Controller
458 *
459 * Registers
460 * Revision
461 * Control
462 * CommandStatus
463 * InterruptStatus
464 * InterruptEnable
465 * HCCA
466 * PeriodCurrentED
467 * ControlHeadED
468 * BulkHeadED
469 * BulkCurrentED
470 * DoneHead
471 * FmInterval
472 * FmRemaining
473 * FmNumber
474 * PeriodicStart
475 * LSThreshold
476 * RhDescriptorA
477 * RhDescriptorB
478 * RhStatus
479 * RhPortStatus
480 * USBStatus
481 * USBReset
482 * USTAR
483 * USWER
484 * USRFR
485 * USNFR
486 * USTCSR
487 * USSR
488 *
489 */
490
491#define _USB( x ) _SA1101( ( x ) + __USB_CONTROL )
492
493
494#define _Revision _USB( 0x0000 )
495#define _Control _USB( 0x0888 )
496#define _CommandStatus _USB( 0x0c00 )
497#define _InterruptStatus _USB( 0x1000 )
498#define _InterruptEnable _USB( 0x1400 )
499#define _HCCA _USB( 0x1800 )
500#define _PeriodCurrentED _USB( 0x1c00 )
501#define _ControlHeadED _USB( 0x2000 )
502#define _BulkHeadED _USB( 0x2800 )
503#define _BulkCurrentED _USB( 0x2c00 )
504#define _DoneHead _USB( 0x3000 )
505#define _FmInterval _USB( 0x3400 )
506#define _FmRemaining _USB( 0x3800 )
507#define _FmNumber _USB( 0x3c00 )
508#define _PeriodicStart _USB( 0x4000 )
509#define _LSThreshold _USB( 0x4400 )
510#define _RhDescriptorA _USB( 0x4800 )
511#define _RhDescriptorB _USB( 0x4c00 )
512#define _RhStatus _USB( 0x5000 )
513#define _RhPortStatus _USB( 0x5400 )
514#define _USBStatus _USB( 0x11800 )
515#define _USBReset _USB( 0x11c00 )
516
517#define _USTAR _USB( 0x10400 )
518#define _USWER _USB( 0x10800 )
519#define _USRFR _USB( 0x10c00 )
520#define _USNFR _USB( 0x11000 )
521#define _USTCSR _USB( 0x11400 )
522#define _USSR _USB( 0x11800 )
523
524
525#if (LANGUAGE == C)
526
527#define Revision (*((volatile Word *) SA1101_p2v (_Revision)))
528#define Control (*((volatile Word *) SA1101_p2v (_Control)))
529#define CommandStatus (*((volatile Word *) SA1101_p2v (_CommandStatus)))
530#define InterruptStatus (*((volatile Word *) SA1101_p2v (_InterruptStatus)))
531#define InterruptEnable (*((volatile Word *) SA1101_p2v (_InterruptEnable)))
532#define HCCA (*((volatile Word *) SA1101_p2v (_HCCA)))
533#define PeriodCurrentED (*((volatile Word *) SA1101_p2v (_PeriodCurrentED)))
534#define ControlHeadED (*((volatile Word *) SA1101_p2v (_ControlHeadED)))
535#define BulkHeadED (*((volatile Word *) SA1101_p2v (_BulkHeadED)))
536#define BulkCurrentED (*((volatile Word *) SA1101_p2v (_BulkCurrentED)))
537#define DoneHead (*((volatile Word *) SA1101_p2v (_DoneHead)))
538#define FmInterval (*((volatile Word *) SA1101_p2v (_FmInterval)))
539#define FmRemaining (*((volatile Word *) SA1101_p2v (_FmRemaining)))
540#define FmNumber (*((volatile Word *) SA1101_p2v (_FmNumber)))
541#define PeriodicStart (*((volatile Word *) SA1101_p2v (_PeriodicStart)))
542#define LSThreshold (*((volatile Word *) SA1101_p2v (_LSThreshold)))
543#define RhDescriptorA (*((volatile Word *) SA1101_p2v (_RhDescriptorA)))
544#define RhDescriptorB (*((volatile Word *) SA1101_p2v (_RhDescriptorB)))
545#define RhStatus (*((volatile Word *) SA1101_p2v (_RhStatus)))
546#define RhPortStatus (*((volatile Word *) SA1101_p2v (_RhPortStatus)))
547#define USBStatus (*((volatile Word *) SA1101_p2v (_USBStatus)))
548#define USBReset (*((volatile Word *) SA1101_p2v (_USBReset)))
549#define USTAR (*((volatile Word *) SA1101_p2v (_USTAR)))
550#define USWER (*((volatile Word *) SA1101_p2v (_USWER)))
551#define USRFR (*((volatile Word *) SA1101_p2v (_USRFR)))
552#define USNFR (*((volatile Word *) SA1101_p2v (_USNFR)))
553#define USTCSR (*((volatile Word *) SA1101_p2v (_USTCSR)))
554#define USSR (*((volatile Word *) SA1101_p2v (_USSR)))
555
556
557#define USBStatus_IrqHciRmtWkp (1<<7)
558#define USBStatus_IrqHciBuffAcc (1<<8)
559#define USBStatus_nIrqHciM (1<<9)
560#define USBStatus_nHciMFClr (1<<10)
561
562#define USBReset_ForceIfReset 0x01
563#define USBReset_ForceHcReset 0x02
564#define USBReset_ClkGenReset 0x04
565
566#define USTCR_RdBstCntrl Fld(3,0)
567#define USTCR_ByteEnable Fld(4,3)
568#define USTCR_WriteEn (1<<7)
569#define USTCR_FifoCir (1<<8)
570#define USTCR_TestXferSel (1<<9)
571#define USTCR_FifoCirAtEnd (1<<10)
572#define USTCR_nSimScaleDownClk (1<<11)
573
574#define USSR_nAppMDEmpty 0x01
575#define USSR_nAppMDFirst 0x02
576#define USSR_nAppMDLast 0x04
577#define USSR_nAppMDFull 0x08
578#define USSR_nAppMAFull 0x10
579#define USSR_XferReq 0x20
580#define USSR_XferEnd 0x40
581
582#endif /* LANGUAGE == C */
583
584
585/*
586 * Interrupt Controller
587 *
588 * Registers
589 * INTTEST0 Test register 0
590 * INTTEST1 Test register 1
591 * INTENABLE0 Interrupt Enable register 0
592 * INTENABLE1 Interrupt Enable register 1
593 * INTPOL0 Interrupt Polarity selection 0
594 * INTPOL1 Interrupt Polarity selection 1
595 * INTTSTSEL Interrupt source selection
596 * INTSTATCLR0 Interrupt Status 0
597 * INTSTATCLR1 Interrupt Status 1
598 * INTSET0 Interrupt Set 0
599 * INTSET1 Interrupt Set 1
600 */
601
602#define _INT( x ) _SA1101( ( x ) + __INTERRUPT_CONTROL)
603
604#define _INTTEST0 _INT( 0x1000 )
605#define _INTTEST1 _INT( 0x1400 )
606#define _INTENABLE0 _INT( 0x2000 )
607#define _INTENABLE1 _INT( 0x2400 )
608#define _INTPOL0 _INT( 0x3000 )
609#define _INTPOL1 _INT( 0x3400 )
610#define _INTTSTSEL _INT( 0x5000 )
611#define _INTSTATCLR0 _INT( 0x6000 )
612#define _INTSTATCLR1 _INT( 0x6400 )
613#define _INTSET0 _INT( 0x7000 )
614#define _INTSET1 _INT( 0x7400 )
615
616#if ( LANGUAGE == C )
617#define INTTEST0 (*((volatile Word *) SA1101_p2v (_INTTEST0)))
618#define INTTEST1 (*((volatile Word *) SA1101_p2v (_INTTEST1)))
619#define INTENABLE0 (*((volatile Word *) SA1101_p2v (_INTENABLE0)))
620#define INTENABLE1 (*((volatile Word *) SA1101_p2v (_INTENABLE1)))
621#define INTPOL0 (*((volatile Word *) SA1101_p2v (_INTPOL0)))
622#define INTPOL1 (*((volatile Word *) SA1101_p2v (_INTPOL1)))
623#define INTTSTSEL (*((volatile Word *) SA1101_p2v (_INTTSTSEL)))
624#define INTSTATCLR0 (*((volatile Word *) SA1101_p2v (_INTSTATCLR0)))
625#define INTSTATCLR1 (*((volatile Word *) SA1101_p2v (_INTSTATCLR1)))
626#define INTSET0 (*((volatile Word *) SA1101_p2v (_INTSET0)))
627#define INTSET1 (*((volatile Word *) SA1101_p2v (_INTSET1)))
628
629#endif /* LANGUAGE == C */
630
631/*
632 * PS/2 Trackpad and Mouse Interfaces
633 *
634 * Registers (prefix kbd applies to trackpad interface, mse to mouse)
635 * KBDCR Control Register
636 * KBDSTAT Status Register
637 * KBDDATA Transmit/Receive Data register
638 * KBDCLKDIV Clock Division Register
639 * KBDPRECNT Clock Precount Register
640 * KBDTEST1 Test register 1
641 * KBDTEST2 Test register 2
642 * KBDTEST3 Test register 3
643 * KBDTEST4 Test register 4
644 * MSECR
645 * MSESTAT
646 * MSEDATA
647 * MSECLKDIV
648 * MSEPRECNT
649 * MSETEST1
650 * MSETEST2
651 * MSETEST3
652 * MSETEST4
653 *
654 */
655
656#define _KBD( x ) _SA1101( ( x ) + __TRACK_INTERFACE )
657#define _MSE( x ) _SA1101( ( x ) + __MOUSE_INTERFACE )
658
659#define _KBDCR _KBD( 0x0000 )
660#define _KBDSTAT _KBD( 0x0400 )
661#define _KBDDATA _KBD( 0x0800 )
662#define _KBDCLKDIV _KBD( 0x0c00 )
663#define _KBDPRECNT _KBD( 0x1000 )
664#define _KBDTEST1 _KBD( 0x2000 )
665#define _KBDTEST2 _KBD( 0x2400 )
666#define _KBDTEST3 _KBD( 0x2800 )
667#define _KBDTEST4 _KBD( 0x2c00 )
668#define _MSECR _MSE( 0x0000 )
669#define _MSESTAT _MSE( 0x0400 )
670#define _MSEDATA _MSE( 0x0800 )
671#define _MSECLKDIV _MSE( 0x0c00 )
672#define _MSEPRECNT _MSE( 0x1000 )
673#define _MSETEST1 _MSE( 0x2000 )
674#define _MSETEST2 _MSE( 0x2400 )
675#define _MSETEST3 _MSE( 0x2800 )
676#define _MSETEST4 _MSE( 0x2c00 )
677
678#if ( LANGUAGE == C )
679
680#define KBDCR (*((volatile Word *) SA1101_p2v (_KBDCR)))
681#define KBDSTAT (*((volatile Word *) SA1101_p2v (_KBDSTAT)))
682#define KBDDATA (*((volatile Word *) SA1101_p2v (_KBDDATA)))
683#define KBDCLKDIV (*((volatile Word *) SA1101_p2v (_KBDCLKDIV)))
684#define KBDPRECNT (*((volatile Word *) SA1101_p2v (_KBDPRECNT)))
685#define KBDTEST1 (*((volatile Word *) SA1101_p2v (_KBDTEST1)))
686#define KBDTEST2 (*((volatile Word *) SA1101_p2v (_KBDTEST2)))
687#define KBDTEST3 (*((volatile Word *) SA1101_p2v (_KBDTEST3)))
688#define KBDTEST4 (*((volatile Word *) SA1101_p2v (_KBDTEST4)))
689#define MSECR (*((volatile Word *) SA1101_p2v (_MSECR)))
690#define MSESTAT (*((volatile Word *) SA1101_p2v (_MSESTAT)))
691#define MSEDATA (*((volatile Word *) SA1101_p2v (_MSEDATA)))
692#define MSECLKDIV (*((volatile Word *) SA1101_p2v (_MSECLKDIV)))
693#define MSEPRECNT (*((volatile Word *) SA1101_p2v (_MSEPRECNT)))
694#define MSETEST1 (*((volatile Word *) SA1101_p2v (_MSETEST1)))
695#define MSETEST2 (*((volatile Word *) SA1101_p2v (_MSETEST2)))
696#define MSETEST3 (*((volatile Word *) SA1101_p2v (_MSETEST3)))
697#define MSETEST4 (*((volatile Word *) SA1101_p2v (_MSETEST4)))
698
699
700#define KBDCR_ENA 0x08
701#define KBDCR_FKD 0x02
702#define KBDCR_FKC 0x01
703
704#define KBDSTAT_TXE 0x80
705#define KBDSTAT_TXB 0x40
706#define KBDSTAT_RXF 0x20
707#define KBDSTAT_RXB 0x10
708#define KBDSTAT_ENA 0x08
709#define KBDSTAT_RXP 0x04
710#define KBDSTAT_KBD 0x02
711#define KBDSTAT_KBC 0x01
712
713#define KBDCLKDIV_DivVal Fld(4,0)
714
715#define MSECR_ENA 0x08
716#define MSECR_FKD 0x02
717#define MSECR_FKC 0x01
718
719#define MSESTAT_TXE 0x80
720#define MSESTAT_TXB 0x40
721#define MSESTAT_RXF 0x20
722#define MSESTAT_RXB 0x10
723#define MSESTAT_ENA 0x08
724#define MSESTAT_RXP 0x04
725#define MSESTAT_MSD 0x02
726#define MSESTAT_MSC 0x01
727
728#define MSECLKDIV_DivVal Fld(4,0)
729
730#define KBDTEST1_CD 0x80
731#define KBDTEST1_RC1 0x40
732#define KBDTEST1_MC 0x20
733#define KBDTEST1_C Fld(2,3)
734#define KBDTEST1_T2 0x40
735#define KBDTEST1_T1 0x20
736#define KBDTEST1_T0 0x10
737#define KBDTEST2_TICBnRES 0x08
738#define KBDTEST2_RKC 0x04
739#define KBDTEST2_RKD 0x02
740#define KBDTEST2_SEL 0x01
741#define KBDTEST3_ms_16 0x80
742#define KBDTEST3_us_64 0x40
743#define KBDTEST3_us_16 0x20
744#define KBDTEST3_DIV8 0x10
745#define KBDTEST3_DIn 0x08
746#define KBDTEST3_CIn 0x04
747#define KBDTEST3_KD 0x02
748#define KBDTEST3_KC 0x01
749#define KBDTEST4_BC12 0x80
750#define KBDTEST4_BC11 0x40
751#define KBDTEST4_TRES 0x20
752#define KBDTEST4_CLKOE 0x10
753#define KBDTEST4_CRES 0x08
754#define KBDTEST4_RXB 0x04
755#define KBDTEST4_TXB 0x02
756#define KBDTEST4_SRX 0x01
757
758#define MSETEST1_CD 0x80
759#define MSETEST1_RC1 0x40
760#define MSETEST1_MC 0x20
761#define MSETEST1_C Fld(2,3)
762#define MSETEST1_T2 0x40
763#define MSETEST1_T1 0x20
764#define MSETEST1_T0 0x10
765#define MSETEST2_TICBnRES 0x08
766#define MSETEST2_RKC 0x04
767#define MSETEST2_RKD 0x02
768#define MSETEST2_SEL 0x01
769#define MSETEST3_ms_16 0x80
770#define MSETEST3_us_64 0x40
771#define MSETEST3_us_16 0x20
772#define MSETEST3_DIV8 0x10
773#define MSETEST3_DIn 0x08
774#define MSETEST3_CIn 0x04
775#define MSETEST3_KD 0x02
776#define MSETEST3_KC 0x01
777#define MSETEST4_BC12 0x80
778#define MSETEST4_BC11 0x40
779#define MSETEST4_TRES 0x20
780#define MSETEST4_CLKOE 0x10
781#define MSETEST4_CRES 0x08
782#define MSETEST4_RXB 0x04
783#define MSETEST4_TXB 0x02
784#define MSETEST4_SRX 0x01
785
786#endif /* LANGUAGE == C */
787
788
789/*
790 * General-Purpose I/O Interface
791 *
792 * Registers
793 * PADWR Port A Data Write Register
794 * PBDWR Port B Data Write Register
795 * PADRR Port A Data Read Register
796 * PBDRR Port B Data Read Register
797 * PADDR Port A Data Direction Register
798 * PBDDR Port B Data Direction Register
799 * PASSR Port A Sleep State Register
800 * PBSSR Port B Sleep State Register
801 *
802 */
803
804#define _PIO( x ) _SA1101( ( x ) + __GPIO_INTERFACE )
805
806#define _PADWR _PIO( 0x0000 )
807#define _PBDWR _PIO( 0x0400 )
808#define _PADRR _PIO( 0x0000 )
809#define _PBDRR _PIO( 0x0400 )
810#define _PADDR _PIO( 0x0800 )
811#define _PBDDR _PIO( 0x0c00 )
812#define _PASSR _PIO( 0x1000 )
813#define _PBSSR _PIO( 0x1400 )
814
815
816#if ( LANGUAGE == C )
817
818
819#define PADWR (*((volatile Word *) SA1101_p2v (_PADWR)))
820#define PBDWR (*((volatile Word *) SA1101_p2v (_PBDWR)))
821#define PADRR (*((volatile Word *) SA1101_p2v (_PADRR)))
822#define PBDRR (*((volatile Word *) SA1101_p2v (_PBDRR)))
823#define PADDR (*((volatile Word *) SA1101_p2v (_PADDR)))
824#define PBDDR (*((volatile Word *) SA1101_p2v (_PBDDR)))
825#define PASSR (*((volatile Word *) SA1101_p2v (_PASSR)))
826#define PBSSR (*((volatile Word *) SA1101_p2v (_PBSSR)))
827
828#endif
829
830
831
832/*
833 * Keypad Interface
834 *
835 * Registers
836 * PXDWR
837 * PXDRR
838 * PYDWR
839 * PYDRR
840 *
841 */
842
843#define _KEYPAD( x ) _SA1101( ( x ) + __KEYPAD_INTERFACE )
844
845#define _PXDWR _KEYPAD( 0x0000 )
846#define _PXDRR _KEYPAD( 0x0000 )
847#define _PYDWR _KEYPAD( 0x0400 )
848#define _PYDRR _KEYPAD( 0x0400 )
849
850#if ( LANGUAGE == C )
851
852
853#define PXDWR (*((volatile Word *) SA1101_p2v (_PXDWR)))
854#define PXDRR (*((volatile Word *) SA1101_p2v (_PXDRR)))
855#define PYDWR (*((volatile Word *) SA1101_p2v (_PYDWR)))
856#define PYDRR (*((volatile Word *) SA1101_p2v (_PYDRR)))
857
858#endif
859
860
861
862/*
863 * PCMCIA Interface
864 *
865 * Registers
866 * PCSR Status Register
867 * PCCR Control Register
868 * PCSSR Sleep State Register
869 *
870 */
871
872#define _CARD( x ) _SA1101( ( x ) + __PCMCIA_INTERFACE )
873
874#define _PCSR _CARD( 0x0000 )
875#define _PCCR _CARD( 0x0400 )
876#define _PCSSR _CARD( 0x0800 )
877
878#if ( LANGUAGE == C )
879#define PCSR (*((volatile Word *) SA1101_p2v (_PCSR)))
880#define PCCR (*((volatile Word *) SA1101_p2v (_PCCR)))
881#define PCSSR (*((volatile Word *) SA1101_p2v (_PCSSR)))
882
883#define PCSR_S0_ready 0x0001
884#define PCSR_S1_ready 0x0002
885#define PCSR_S0_detected 0x0004
886#define PCSR_S1_detected 0x0008
887#define PCSR_S0_VS1 0x0010
888#define PCSR_S0_VS2 0x0020
889#define PCSR_S1_VS1 0x0040
890#define PCSR_S1_VS2 0x0080
891#define PCSR_S0_WP 0x0100
892#define PCSR_S1_WP 0x0200
893#define PCSR_S0_BVD1_nSTSCHG 0x0400
894#define PCSR_S0_BVD2_nSPKR 0x0800
895#define PCSR_S1_BVD1_nSTSCHG 0x1000
896#define PCSR_S1_BVD2_nSPKR 0x2000
897
898#define PCCR_S0_VPP0 0x0001
899#define PCCR_S0_VPP1 0x0002
900#define PCCR_S0_VCC0 0x0004
901#define PCCR_S0_VCC1 0x0008
902#define PCCR_S1_VPP0 0x0010
903#define PCCR_S1_VPP1 0x0020
904#define PCCR_S1_VCC0 0x0040
905#define PCCR_S1_VCC1 0x0080
906#define PCCR_S0_reset 0x0100
907#define PCCR_S1_reset 0x0200
908#define PCCR_S0_float 0x0400
909#define PCCR_S1_float 0x0800
910
911#define PCSSR_S0_VCC0 0x0001
912#define PCSSR_S0_VCC1 0x0002
913#define PCSSR_S0_VPP0 0x0004
914#define PCSSR_S0_VPP1 0x0008
915#define PCSSR_S0_control 0x0010
916#define PCSSR_S1_VCC0 0x0020
917#define PCSSR_S1_VCC1 0x0040
918#define PCSSR_S1_VPP0 0x0080
919#define PCSSR_S1_VPP1 0x0100
920#define PCSSR_S1_control 0x0200
921
922#endif
923
924#undef C
925#undef Assembly
diff --git a/include/asm-arm/arch-sa1100/assabet.h b/include/asm-arm/arch-sa1100/assabet.h
deleted file mode 100644
index d6a1bb5b4944..000000000000
--- a/include/asm-arm/arch-sa1100/assabet.h
+++ /dev/null
@@ -1,105 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-sa1100/assabet.h
3 *
4 * Created 2000/06/05 by Nicolas Pitre <nico@cam.org>
5 *
6 * This file contains the hardware specific definitions for Assabet
7 * Only include this file from SA1100-specific files.
8 *
9 * 2000/05/23 John Dorsey <john+@cs.cmu.edu>
10 * Definitions for Neponset added.
11 */
12#ifndef __ASM_ARCH_ASSABET_H
13#define __ASM_ARCH_ASSABET_H
14
15
16/* System Configuration Register flags */
17
18#define ASSABET_SCR_SDRAM_LOW (1<<2) /* SDRAM size (low bit) */
19#define ASSABET_SCR_SDRAM_HIGH (1<<3) /* SDRAM size (high bit) */
20#define ASSABET_SCR_FLASH_LOW (1<<4) /* Flash size (low bit) */
21#define ASSABET_SCR_FLASH_HIGH (1<<5) /* Flash size (high bit) */
22#define ASSABET_SCR_GFX (1<<8) /* Graphics Accelerator (0 = present) */
23#define ASSABET_SCR_SA1111 (1<<9) /* Neponset (0 = present) */
24
25#define ASSABET_SCR_INIT -1
26
27extern unsigned long SCR_value;
28
29#ifdef CONFIG_ASSABET_NEPONSET
30#define machine_has_neponset() ((SCR_value & ASSABET_SCR_SA1111) == 0)
31#else
32#define machine_has_neponset() (0)
33#endif
34
35/* Board Control Register */
36
37#define ASSABET_BCR_BASE 0xf1000000
38#define ASSABET_BCR (*(volatile unsigned int *)(ASSABET_BCR_BASE))
39
40#define ASSABET_BCR_CF_PWR (1<<0) /* Compact Flash Power (1 = 3.3v, 0 = off) */
41#define ASSABET_BCR_CF_RST (1<<1) /* Compact Flash Reset (1 = power up reset) */
42#define ASSABET_BCR_GFX_RST (1<<1) /* Graphics Accelerator Reset (0 = hold reset) */
43#define ASSABET_BCR_CODEC_RST (1<<2) /* 0 = Holds UCB1300, ADI7171, and UDA1341 in reset */
44#define ASSABET_BCR_IRDA_FSEL (1<<3) /* IRDA Frequency select (0 = SIR, 1 = MIR/ FIR) */
45#define ASSABET_BCR_IRDA_MD0 (1<<4) /* Range/Power select */
46#define ASSABET_BCR_IRDA_MD1 (1<<5) /* Range/Power select */
47#define ASSABET_BCR_STEREO_LB (1<<6) /* Stereo Loopback */
48#define ASSABET_BCR_CF_BUS_OFF (1<<7) /* Compact Flash bus (0 = on, 1 = off (float)) */
49#define ASSABET_BCR_AUDIO_ON (1<<8) /* Audio power on */
50#define ASSABET_BCR_LIGHT_ON (1<<9) /* Backlight */
51#define ASSABET_BCR_LCD_12RGB (1<<10) /* 0 = 16RGB, 1 = 12RGB */
52#define ASSABET_BCR_LCD_ON (1<<11) /* LCD power on */
53#define ASSABET_BCR_RS232EN (1<<12) /* RS232 transceiver enable */
54#define ASSABET_BCR_LED_RED (1<<13) /* D9 (0 = on, 1 = off) */
55#define ASSABET_BCR_LED_GREEN (1<<14) /* D8 (0 = on, 1 = off) */
56#define ASSABET_BCR_VIB_ON (1<<15) /* Vibration motor (quiet alert) */
57#define ASSABET_BCR_COM_DTR (1<<16) /* COMport Data Terminal Ready */
58#define ASSABET_BCR_COM_RTS (1<<17) /* COMport Request To Send */
59#define ASSABET_BCR_RAD_WU (1<<18) /* Radio wake up interrupt */
60#define ASSABET_BCR_SMB_EN (1<<19) /* System management bus enable */
61#define ASSABET_BCR_TV_IR_DEC (1<<20) /* TV IR Decode Enable (not implemented) */
62#define ASSABET_BCR_QMUTE (1<<21) /* Quick Mute */
63#define ASSABET_BCR_RAD_ON (1<<22) /* Radio Power On */
64#define ASSABET_BCR_SPK_OFF (1<<23) /* 1 = Speaker amplifier power off */
65
66#ifdef CONFIG_SA1100_ASSABET
67extern void ASSABET_BCR_frob(unsigned int mask, unsigned int set);
68#else
69#define ASSABET_BCR_frob(x,y) do { } while (0)
70#endif
71
72#define ASSABET_BCR_set(x) ASSABET_BCR_frob((x), (x))
73#define ASSABET_BCR_clear(x) ASSABET_BCR_frob((x), 0)
74
75#define ASSABET_BSR_BASE 0xf1000000
76#define ASSABET_BSR (*(volatile unsigned int*)(ASSABET_BSR_BASE))
77
78#define ASSABET_BSR_RS232_VALID (1 << 24)
79#define ASSABET_BSR_COM_DCD (1 << 25)
80#define ASSABET_BSR_COM_CTS (1 << 26)
81#define ASSABET_BSR_COM_DSR (1 << 27)
82#define ASSABET_BSR_RAD_CTS (1 << 28)
83#define ASSABET_BSR_RAD_DSR (1 << 29)
84#define ASSABET_BSR_RAD_DCD (1 << 30)
85#define ASSABET_BSR_RAD_RI (1 << 31)
86
87
88/* GPIOs for which the generic definition doesn't say much */
89#define ASSABET_GPIO_RADIO_IRQ GPIO_GPIO (14) /* Radio interrupt request */
90#define ASSABET_GPIO_PS_MODE_SYNC GPIO_GPIO (16) /* Power supply mode/sync */
91#define ASSABET_GPIO_STEREO_64FS_CLK GPIO_GPIO (19) /* SSP UDA1341 clock input */
92#define ASSABET_GPIO_CF_IRQ GPIO_GPIO (21) /* CF IRQ */
93#define ASSABET_GPIO_CF_CD GPIO_GPIO (22) /* CF CD */
94#define ASSABET_GPIO_CF_BVD2 GPIO_GPIO (24) /* CF BVD */
95#define ASSABET_GPIO_GFX_IRQ GPIO_GPIO (24) /* Graphics IRQ */
96#define ASSABET_GPIO_CF_BVD1 GPIO_GPIO (25) /* CF BVD */
97#define ASSABET_GPIO_BATT_LOW GPIO_GPIO (26) /* Low battery */
98#define ASSABET_GPIO_RCLK GPIO_GPIO (26) /* CCLK/2 */
99
100#define ASSABET_IRQ_GPIO_CF_IRQ IRQ_GPIO21
101#define ASSABET_IRQ_GPIO_CF_CD IRQ_GPIO22
102#define ASSABET_IRQ_GPIO_CF_BVD2 IRQ_GPIO24
103#define ASSABET_IRQ_GPIO_CF_BVD1 IRQ_GPIO25
104
105#endif
diff --git a/include/asm-arm/arch-sa1100/badge4.h b/include/asm-arm/arch-sa1100/badge4.h
deleted file mode 100644
index 8d7a671492db..000000000000
--- a/include/asm-arm/arch-sa1100/badge4.h
+++ /dev/null
@@ -1,75 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-sa1100/badge4.h
3 *
4 * Tim Connors <connors@hpl.hp.com>
5 * Christopher Hoover <ch@hpl.hp.com>
6 *
7 * Copyright (C) 2002 Hewlett-Packard Company
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12 *
13 */
14
15#ifndef __ASM_ARCH_HARDWARE_H
16#error "include <asm/hardware.h> instead"
17#endif
18
19#define BADGE4_SA1111_BASE (0x48000000)
20
21/* GPIOs on the BadgePAD 4 */
22#define BADGE4_GPIO_INT_1111 GPIO_GPIO0 /* SA-1111 IRQ */
23
24#define BADGE4_GPIO_INT_VID GPIO_GPIO1 /* Video expansion */
25#define BADGE4_GPIO_LGP2 GPIO_GPIO2 /* GPIO_LDD8 */
26#define BADGE4_GPIO_LGP3 GPIO_GPIO3 /* GPIO_LDD9 */
27#define BADGE4_GPIO_LGP4 GPIO_GPIO4 /* GPIO_LDD10 */
28#define BADGE4_GPIO_LGP5 GPIO_GPIO5 /* GPIO_LDD11 */
29#define BADGE4_GPIO_LGP6 GPIO_GPIO6 /* GPIO_LDD12 */
30#define BADGE4_GPIO_LGP7 GPIO_GPIO7 /* GPIO_LDD13 */
31#define BADGE4_GPIO_LGP8 GPIO_GPIO8 /* GPIO_LDD14 */
32#define BADGE4_GPIO_LGP9 GPIO_GPIO9 /* GPIO_LDD15 */
33#define BADGE4_GPIO_GPA_VID GPIO_GPIO10 /* Video expansion */
34#define BADGE4_GPIO_GPB_VID GPIO_GPIO11 /* Video expansion */
35#define BADGE4_GPIO_GPC_VID GPIO_GPIO12 /* Video expansion */
36
37#define BADGE4_GPIO_UART_HS1 GPIO_GPIO13
38#define BADGE4_GPIO_UART_HS2 GPIO_GPIO14
39
40#define BADGE4_GPIO_MUXSEL0 GPIO_GPIO15
41#define BADGE4_GPIO_TESTPT_J7 GPIO_GPIO16
42
43#define BADGE4_GPIO_SDSDA GPIO_GPIO17 /* SDRAM SPD Data */
44#define BADGE4_GPIO_SDSCL GPIO_GPIO18 /* SDRAM SPD Clock */
45#define BADGE4_GPIO_SDTYP0 GPIO_GPIO19 /* SDRAM Type Control */
46#define BADGE4_GPIO_SDTYP1 GPIO_GPIO20 /* SDRAM Type Control */
47
48#define BADGE4_GPIO_BGNT_1111 GPIO_GPIO21 /* GPIO_MBGNT */
49#define BADGE4_GPIO_BREQ_1111 GPIO_GPIO22 /* GPIO_TREQA */
50
51#define BADGE4_GPIO_TESTPT_J6 GPIO_GPIO23
52
53#define BADGE4_GPIO_PCMEN5V GPIO_GPIO24 /* 5V power */
54
55#define BADGE4_GPIO_SA1111_NRST GPIO_GPIO25 /* SA-1111 nRESET */
56
57#define BADGE4_GPIO_TESTPT_J5 GPIO_GPIO26
58
59#define BADGE4_GPIO_CLK_1111 GPIO_GPIO27 /* GPIO_32_768kHz */
60
61/* Interrupts on the BadgePAD 4 */
62#define BADGE4_IRQ_GPIO_SA1111 IRQ_GPIO0 /* SA-1111 interrupt */
63
64
65/* PCM5ENV Usage tracking */
66
67#define BADGE4_5V_PCMCIA_SOCK0 (1<<0)
68#define BADGE4_5V_PCMCIA_SOCK1 (1<<1)
69#define BADGE4_5V_PCMCIA_SOCK(n) (1<<(n))
70#define BADGE4_5V_USB (1<<2)
71#define BADGE4_5V_INITIALLY (1<<3)
72
73#ifndef __ASSEMBLY__
74extern void badge4_set_5V(unsigned subsystem, int on);
75#endif
diff --git a/include/asm-arm/arch-sa1100/cerf.h b/include/asm-arm/arch-sa1100/cerf.h
deleted file mode 100644
index 9a19c3d07c1e..000000000000
--- a/include/asm-arm/arch-sa1100/cerf.h
+++ /dev/null
@@ -1,28 +0,0 @@
1/*
2 * include/asm-arm/arch-sa1100/cerf.h
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 *
8 * Apr-2003 : Removed some old PDA crud [FB]
9 */
10#ifndef _INCLUDE_CERF_H_
11#define _INCLUDE_CERF_H_
12
13
14#define CERF_ETH_IO 0xf0000000
15#define CERF_ETH_IRQ IRQ_GPIO26
16
17#define CERF_GPIO_CF_BVD2 GPIO_GPIO (19)
18#define CERF_GPIO_CF_BVD1 GPIO_GPIO (20)
19#define CERF_GPIO_CF_RESET GPIO_GPIO (21)
20#define CERF_GPIO_CF_IRQ GPIO_GPIO (22)
21#define CERF_GPIO_CF_CD GPIO_GPIO (23)
22
23#define CERF_IRQ_GPIO_CF_BVD2 IRQ_GPIO19
24#define CERF_IRQ_GPIO_CF_BVD1 IRQ_GPIO20
25#define CERF_IRQ_GPIO_CF_IRQ IRQ_GPIO22
26#define CERF_IRQ_GPIO_CF_CD IRQ_GPIO23
27
28#endif // _INCLUDE_CERF_H_
diff --git a/include/asm-arm/arch-sa1100/collie.h b/include/asm-arm/arch-sa1100/collie.h
deleted file mode 100644
index 762eba535813..000000000000
--- a/include/asm-arm/arch-sa1100/collie.h
+++ /dev/null
@@ -1,88 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-sa1100/collie.h
3 *
4 * This file contains the hardware specific definitions for Assabet
5 * Only include this file from SA1100-specific files.
6 *
7 * ChangeLog:
8 * 04-06-2001 Lineo Japan, Inc.
9 * 04-16-2001 SHARP Corporation
10 * 07-07-2002 Chris Larson <clarson@digi.com>
11 *
12 */
13#ifndef __ASM_ARCH_COLLIE_H
14#define __ASM_ARCH_COLLIE_H
15
16
17#define COLLIE_SCP_CHARGE_ON SCOOP_GPCR_PA11
18#define COLLIE_SCP_DIAG_BOOT1 SCOOP_GPCR_PA12
19#define COLLIE_SCP_DIAG_BOOT2 SCOOP_GPCR_PA13
20#define COLLIE_SCP_MUTE_L SCOOP_GPCR_PA14
21#define COLLIE_SCP_MUTE_R SCOOP_GPCR_PA15
22#define COLLIE_SCP_5VON SCOOP_GPCR_PA16
23#define COLLIE_SCP_AMP_ON SCOOP_GPCR_PA17
24#define COLLIE_SCP_VPEN SCOOP_GPCR_PA18
25#define COLLIE_SCP_LB_VOL_CHG SCOOP_GPCR_PA19
26
27#define COLLIE_SCOOP_IO_DIR ( COLLIE_SCP_CHARGE_ON | COLLIE_SCP_MUTE_L | COLLIE_SCP_MUTE_R | \
28 COLLIE_SCP_5VON | COLLIE_SCP_AMP_ON | COLLIE_SCP_VPEN | \
29 COLLIE_SCP_LB_VOL_CHG )
30#define COLLIE_SCOOP_IO_OUT ( COLLIE_SCP_MUTE_L | COLLIE_SCP_MUTE_R | COLLIE_SCP_VPEN | \
31 COLLIE_SCP_CHARGE_ON )
32
33/* GPIOs for which the generic definition doesn't say much */
34
35#define COLLIE_GPIO_ON_KEY GPIO_GPIO (0)
36#define COLLIE_GPIO_AC_IN GPIO_GPIO (1)
37#define COLLIE_GPIO_SDIO_INT GPIO_GPIO (11)
38#define COLLIE_GPIO_CF_IRQ GPIO_GPIO (14)
39#define COLLIE_GPIO_nREMOCON_INT GPIO_GPIO (15)
40#define COLLIE_GPIO_UCB1x00_RESET GPIO_GPIO (16)
41#define COLLIE_GPIO_nMIC_ON GPIO_GPIO (17)
42#define COLLIE_GPIO_nREMOCON_ON GPIO_GPIO (18)
43#define COLLIE_GPIO_CO GPIO_GPIO (20)
44#define COLLIE_GPIO_MCP_CLK GPIO_GPIO (21)
45#define COLLIE_GPIO_CF_CD GPIO_GPIO (22)
46#define COLLIE_GPIO_UCB1x00_IRQ GPIO_GPIO (23)
47#define COLLIE_GPIO_WAKEUP GPIO_GPIO (24)
48#define COLLIE_GPIO_GA_INT GPIO_GPIO (25)
49#define COLLIE_GPIO_MAIN_BAT_LOW GPIO_GPIO (26)
50
51/* Interrupts */
52
53#define COLLIE_IRQ_GPIO_ON_KEY IRQ_GPIO0
54#define COLLIE_IRQ_GPIO_AC_IN IRQ_GPIO1
55#define COLLIE_IRQ_GPIO_SDIO_IRQ IRQ_GPIO11
56#define COLLIE_IRQ_GPIO_CF_IRQ IRQ_GPIO14
57#define COLLIE_IRQ_GPIO_nREMOCON_INT IRQ_GPIO15
58#define COLLIE_IRQ_GPIO_CO IRQ_GPIO20
59#define COLLIE_IRQ_GPIO_CF_CD IRQ_GPIO22
60#define COLLIE_IRQ_GPIO_UCB1x00_IRQ IRQ_GPIO23
61#define COLLIE_IRQ_GPIO_WAKEUP IRQ_GPIO24
62#define COLLIE_IRQ_GPIO_GA_INT IRQ_GPIO25
63#define COLLIE_IRQ_GPIO_MAIN_BAT_LOW IRQ_GPIO26
64
65#define COLLIE_LCM_IRQ_GPIO_RTS IRQ_LOCOMO_GPIO0
66#define COLLIE_LCM_IRQ_GPIO_CTS IRQ_LOCOMO_GPIO1
67#define COLLIE_LCM_IRQ_GPIO_DSR IRQ_LOCOMO_GPIO2
68#define COLLIE_LCM_IRQ_GPIO_DTR IRQ_LOCOMO_GPIO3
69#define COLLIE_LCM_IRQ_GPIO_nSD_DETECT IRQ_LOCOMO_GPIO13
70#define COLLIE_LCM_IRQ_GPIO_nSD_WP IRQ_LOCOMO_GPIO14
71
72/* GPIO's on the TC35143AF (Toshiba Analog Frontend) */
73#define COLLIE_TC35143_GPIO_VERSION0 UCB_IO_0 /* GPIO0=Version */
74#define COLLIE_TC35143_GPIO_TBL_CHK UCB_IO_1 /* GPIO1=TBL_CHK */
75#define COLLIE_TC35143_GPIO_VPEN_ON UCB_IO_2 /* GPIO2=VPNE_ON */
76#define COLLIE_TC35143_GPIO_IR_ON UCB_IO_3 /* GPIO3=IR_ON */
77#define COLLIE_TC35143_GPIO_AMP_ON UCB_IO_4 /* GPIO4=AMP_ON */
78#define COLLIE_TC35143_GPIO_VERSION1 UCB_IO_5 /* GPIO5=Version */
79#define COLLIE_TC35143_GPIO_FS8KLPF UCB_IO_5 /* GPIO5=fs 8k LPF */
80#define COLLIE_TC35143_GPIO_BUZZER_BIAS UCB_IO_6 /* GPIO6=BUZZER BIAS */
81#define COLLIE_TC35143_GPIO_MBAT_ON UCB_IO_7 /* GPIO7=MBAT_ON */
82#define COLLIE_TC35143_GPIO_BBAT_ON UCB_IO_8 /* GPIO8=BBAT_ON */
83#define COLLIE_TC35143_GPIO_TMP_ON UCB_IO_9 /* GPIO9=TMP_ON */
84#define COLLIE_TC35143_GPIO_IN ( UCB_IO_0 | UCB_IO_2 | UCB_IO_5 )
85#define COLLIE_TC35143_GPIO_OUT ( UCB_IO_1 | UCB_IO_3 | UCB_IO_4 | UCB_IO_6 | \
86 UCB_IO_7 | UCB_IO_8 | UCB_IO_9 )
87
88#endif
diff --git a/include/asm-arm/arch-sa1100/debug-macro.S b/include/asm-arm/arch-sa1100/debug-macro.S
deleted file mode 100644
index 267c317a7408..000000000000
--- a/include/asm-arm/arch-sa1100/debug-macro.S
+++ /dev/null
@@ -1,58 +0,0 @@
1/* linux/include/asm-arm/arch-sa1100/debug-macro.S
2 *
3 * Debugging macro include header
4 *
5 * Copyright (C) 1994-1999 Russell King
6 * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 *
12*/
13#include <asm/hardware.h>
14
15 .macro addruart,rx
16 mrc p15, 0, \rx, c1, c0
17 tst \rx, #1 @ MMU enabled?
18 moveq \rx, #0x80000000 @ physical base address
19 movne \rx, #0xf8000000 @ virtual address
20
21 @ We probe for the active serial port here, coherently with
22 @ the comment in include/asm-arm/arch-sa1100/uncompress.h.
23 @ We assume r1 can be clobbered.
24
25 @ see if Ser3 is active
26 add \rx, \rx, #0x00050000
27 ldr r1, [\rx, #UTCR3]
28 tst r1, #UTCR3_TXE
29
30 @ if Ser3 is inactive, then try Ser1
31 addeq \rx, \rx, #(0x00010000 - 0x00050000)
32 ldreq r1, [\rx, #UTCR3]
33 tsteq r1, #UTCR3_TXE
34
35 @ if Ser1 is inactive, then try Ser2
36 addeq \rx, \rx, #(0x00030000 - 0x00010000)
37 ldreq r1, [\rx, #UTCR3]
38 tsteq r1, #UTCR3_TXE
39
40 @ if all ports are inactive, then there is nothing we can do
41 moveq pc, lr
42 .endm
43
44 .macro senduart,rd,rx
45 str \rd, [\rx, #UTDR]
46 .endm
47
48 .macro waituart,rd,rx
491001: ldr \rd, [\rx, #UTSR1]
50 tst \rd, #UTSR1_TNF
51 beq 1001b
52 .endm
53
54 .macro busyuart,rd,rx
551001: ldr \rd, [\rx, #UTSR1]
56 tst \rd, #UTSR1_TBY
57 bne 1001b
58 .endm
diff --git a/include/asm-arm/arch-sa1100/dma.h b/include/asm-arm/arch-sa1100/dma.h
deleted file mode 100644
index 6b7917a2e77a..000000000000
--- a/include/asm-arm/arch-sa1100/dma.h
+++ /dev/null
@@ -1,117 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-sa1100/dma.h
3 *
4 * Generic SA1100 DMA support
5 *
6 * Copyright (C) 2000 Nicolas Pitre
7 *
8 */
9
10#ifndef __ASM_ARCH_DMA_H
11#define __ASM_ARCH_DMA_H
12
13#include "hardware.h"
14
15
16/*
17 * The SA1100 has six internal DMA channels.
18 */
19#define SA1100_DMA_CHANNELS 6
20
21/*
22 * Maximum physical DMA buffer size
23 */
24#define MAX_DMA_SIZE 0x1fff
25#define CUT_DMA_SIZE 0x1000
26
27/*
28 * All possible SA1100 devices a DMA channel can be attached to.
29 */
30typedef enum {
31 DMA_Ser0UDCWr = DDAR_Ser0UDCWr, /* Ser. port 0 UDC Write */
32 DMA_Ser0UDCRd = DDAR_Ser0UDCRd, /* Ser. port 0 UDC Read */
33 DMA_Ser1UARTWr = DDAR_Ser1UARTWr, /* Ser. port 1 UART Write */
34 DMA_Ser1UARTRd = DDAR_Ser1UARTRd, /* Ser. port 1 UART Read */
35 DMA_Ser1SDLCWr = DDAR_Ser1SDLCWr, /* Ser. port 1 SDLC Write */
36 DMA_Ser1SDLCRd = DDAR_Ser1SDLCRd, /* Ser. port 1 SDLC Read */
37 DMA_Ser2UARTWr = DDAR_Ser2UARTWr, /* Ser. port 2 UART Write */
38 DMA_Ser2UARTRd = DDAR_Ser2UARTRd, /* Ser. port 2 UART Read */
39 DMA_Ser2HSSPWr = DDAR_Ser2HSSPWr, /* Ser. port 2 HSSP Write */
40 DMA_Ser2HSSPRd = DDAR_Ser2HSSPRd, /* Ser. port 2 HSSP Read */
41 DMA_Ser3UARTWr = DDAR_Ser3UARTWr, /* Ser. port 3 UART Write */
42 DMA_Ser3UARTRd = DDAR_Ser3UARTRd, /* Ser. port 3 UART Read */
43 DMA_Ser4MCP0Wr = DDAR_Ser4MCP0Wr, /* Ser. port 4 MCP 0 Write (audio) */
44 DMA_Ser4MCP0Rd = DDAR_Ser4MCP0Rd, /* Ser. port 4 MCP 0 Read (audio) */
45 DMA_Ser4MCP1Wr = DDAR_Ser4MCP1Wr, /* Ser. port 4 MCP 1 Write */
46 DMA_Ser4MCP1Rd = DDAR_Ser4MCP1Rd, /* Ser. port 4 MCP 1 Read */
47 DMA_Ser4SSPWr = DDAR_Ser4SSPWr, /* Ser. port 4 SSP Write (16 bits) */
48 DMA_Ser4SSPRd = DDAR_Ser4SSPRd /* Ser. port 4 SSP Read (16 bits) */
49} dma_device_t;
50
51typedef struct {
52 volatile u_long DDAR;
53 volatile u_long SetDCSR;
54 volatile u_long ClrDCSR;
55 volatile u_long RdDCSR;
56 volatile dma_addr_t DBSA;
57 volatile u_long DBTA;
58 volatile dma_addr_t DBSB;
59 volatile u_long DBTB;
60} dma_regs_t;
61
62typedef void (*dma_callback_t)(void *data);
63
64/*
65 * DMA function prototypes
66 */
67
68extern int sa1100_request_dma( dma_device_t device, const char *device_id,
69 dma_callback_t callback, void *data,
70 dma_regs_t **regs );
71extern void sa1100_free_dma( dma_regs_t *regs );
72extern int sa1100_start_dma( dma_regs_t *regs, dma_addr_t dma_ptr, u_int size );
73extern dma_addr_t sa1100_get_dma_pos(dma_regs_t *regs);
74extern void sa1100_reset_dma(dma_regs_t *regs);
75
76/**
77 * sa1100_stop_dma - stop DMA in progress
78 * @regs: identifier for the channel to use
79 *
80 * This stops DMA without clearing buffer pointers. Unlike
81 * sa1100_clear_dma() this allows subsequent use of sa1100_resume_dma()
82 * or sa1100_get_dma_pos().
83 *
84 * The @regs identifier is provided by a successful call to
85 * sa1100_request_dma().
86 **/
87
88#define sa1100_stop_dma(regs) ((regs)->ClrDCSR = DCSR_IE|DCSR_RUN)
89
90/**
91 * sa1100_resume_dma - resume DMA on a stopped channel
92 * @regs: identifier for the channel to use
93 *
94 * This resumes DMA on a channel previously stopped with
95 * sa1100_stop_dma().
96 *
97 * The @regs identifier is provided by a successful call to
98 * sa1100_request_dma().
99 **/
100
101#define sa1100_resume_dma(regs) ((regs)->SetDCSR = DCSR_IE|DCSR_RUN)
102
103/**
104 * sa1100_clear_dma - clear DMA pointers
105 * @regs: identifier for the channel to use
106 *
107 * This clear any DMA state so the DMA engine is ready to restart
108 * with new buffers through sa1100_start_dma(). Any buffers in flight
109 * are discarded.
110 *
111 * The @regs identifier is provided by a successful call to
112 * sa1100_request_dma().
113 **/
114
115#define sa1100_clear_dma(regs) ((regs)->ClrDCSR = DCSR_IE|DCSR_RUN|DCSR_STRTA|DCSR_STRTB)
116
117#endif /* _ASM_ARCH_DMA_H */
diff --git a/include/asm-arm/arch-sa1100/entry-macro.S b/include/asm-arm/arch-sa1100/entry-macro.S
deleted file mode 100644
index 127db4aaf4f2..000000000000
--- a/include/asm-arm/arch-sa1100/entry-macro.S
+++ /dev/null
@@ -1,47 +0,0 @@
1/*
2 * include/asm-arm/arch-sa1100/entry-macro.S
3 *
4 * Low-level IRQ helper macros for SA1100-based platforms
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10
11 .macro disable_fiq
12 .endm
13
14 .macro get_irqnr_preamble, base, tmp
15 mov \base, #0xfa000000 @ ICIP = 0xfa050000
16 add \base, \base, #0x00050000
17 .endm
18
19 .macro arch_ret_to_user, tmp1, tmp2
20 .endm
21
22 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
23 ldr \irqstat, [\base] @ get irqs
24 ldr \irqnr, [\base, #4] @ ICMR = 0xfa050004
25 ands \irqstat, \irqstat, \irqnr
26 mov \irqnr, #0
27 beq 1001f
28 tst \irqstat, #0xff
29 moveq \irqstat, \irqstat, lsr #8
30 addeq \irqnr, \irqnr, #8
31 tsteq \irqstat, #0xff
32 moveq \irqstat, \irqstat, lsr #8
33 addeq \irqnr, \irqnr, #8
34 tsteq \irqstat, #0xff
35 moveq \irqstat, \irqstat, lsr #8
36 addeq \irqnr, \irqnr, #8
37 tst \irqstat, #0x0f
38 moveq \irqstat, \irqstat, lsr #4
39 addeq \irqnr, \irqnr, #4
40 tst \irqstat, #0x03
41 moveq \irqstat, \irqstat, lsr #2
42 addeq \irqnr, \irqnr, #2
43 tst \irqstat, #0x01
44 addeqs \irqnr, \irqnr, #1
451001:
46 .endm
47
diff --git a/include/asm-arm/arch-sa1100/gpio.h b/include/asm-arm/arch-sa1100/gpio.h
deleted file mode 100644
index 93d3395b102d..000000000000
--- a/include/asm-arm/arch-sa1100/gpio.h
+++ /dev/null
@@ -1,68 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-sa1100/gpio.h
3 *
4 * SA1100 GPIO wrappers for arch-neutral GPIO calls
5 *
6 * Written by Philipp Zabel <philipp.zabel@gmail.com>
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 *
22 */
23
24#ifndef __ASM_ARCH_SA1100_GPIO_H
25#define __ASM_ARCH_SA1100_GPIO_H
26
27#include <asm/hardware.h>
28#include <asm/irq.h>
29#include <asm-generic/gpio.h>
30
31static inline int gpio_get_value(unsigned gpio)
32{
33 if (__builtin_constant_p(gpio) && (gpio <= GPIO_MAX))
34 return GPLR & GPIO_GPIO(gpio);
35 else
36 return __gpio_get_value(gpio);
37}
38
39static inline void gpio_set_value(unsigned gpio, int value)
40{
41 if (__builtin_constant_p(gpio) && (gpio <= GPIO_MAX))
42 if (value)
43 GPSR = GPIO_GPIO(gpio);
44 else
45 GPCR = GPIO_GPIO(gpio);
46 else
47 __gpio_set_value(gpio, value);
48}
49
50#define gpio_cansleep __gpio_cansleep
51
52static inline unsigned gpio_to_irq(unsigned gpio)
53{
54 if (gpio < 11)
55 return IRQ_GPIO0 + gpio;
56 else
57 return IRQ_GPIO11 - 11 + gpio;
58}
59
60static inline unsigned irq_to_gpio(unsigned irq)
61{
62 if (irq < IRQ_GPIO11_27)
63 return irq - IRQ_GPIO0;
64 else
65 return irq - IRQ_GPIO11 + 11;
66}
67
68#endif
diff --git a/include/asm-arm/arch-sa1100/hardware.h b/include/asm-arm/arch-sa1100/hardware.h
deleted file mode 100644
index 1abd7cfc8bce..000000000000
--- a/include/asm-arm/arch-sa1100/hardware.h
+++ /dev/null
@@ -1,57 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-sa1100/hardware.h
3 *
4 * Copyright (C) 1998 Nicolas Pitre <nico@cam.org>
5 *
6 * This file contains the hardware definitions for SA1100 architecture
7 *
8 * 2000/05/23 John Dorsey <john+@cs.cmu.edu>
9 * Definitions for SA1111 added.
10 */
11
12#ifndef __ASM_ARCH_HARDWARE_H
13#define __ASM_ARCH_HARDWARE_H
14
15
16#define UNCACHEABLE_ADDR 0xfa050000
17
18
19/*
20 * SA1100 internal I/O mappings
21 *
22 * We have the following mapping:
23 * phys virt
24 * 80000000 f8000000
25 * 90000000 fa000000
26 * a0000000 fc000000
27 * b0000000 fe000000
28 */
29
30#define VIO_BASE 0xf8000000 /* virtual start of IO space */
31#define VIO_SHIFT 3 /* x = IO space shrink power */
32#define PIO_START 0x80000000 /* physical start of IO space */
33
34#define io_p2v( x ) \
35 ( (((x)&0x00ffffff) | (((x)&0x30000000)>>VIO_SHIFT)) + VIO_BASE )
36#define io_v2p( x ) \
37 ( (((x)&0x00ffffff) | (((x)&(0x30000000>>VIO_SHIFT))<<VIO_SHIFT)) + PIO_START )
38
39#ifndef __ASSEMBLY__
40
41# define __REG(x) (*((volatile unsigned long *)io_p2v(x)))
42# define __PREG(x) (io_v2p((unsigned long)&(x)))
43
44#else
45
46# define __REG(x) io_p2v(x)
47# define __PREG(x) io_v2p(x)
48
49#endif
50
51#include "SA-1100.h"
52
53#ifdef CONFIG_SA1101
54#include "SA-1101.h"
55#endif
56
57#endif /* _ASM_ARCH_HARDWARE_H */
diff --git a/include/asm-arm/arch-sa1100/ide.h b/include/asm-arm/arch-sa1100/ide.h
deleted file mode 100644
index 193f6c15f4dd..000000000000
--- a/include/asm-arm/arch-sa1100/ide.h
+++ /dev/null
@@ -1,75 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-sa1100/ide.h
3 *
4 * Copyright (c) 1998 Hugo Fiennes & Nicolas Pitre
5 *
6 * 18-aug-2000: Cleanup by Erik Mouw (J.A.K.Mouw@its.tudelft.nl)
7 * Get rid of the special ide_init_hwif_ports() functions
8 * and make a generalised function that can be used by all
9 * architectures.
10 */
11
12#include <asm/irq.h>
13#include <asm/hardware.h>
14#include <asm/mach-types.h>
15
16#error "This code is broken and needs update to match with current ide support"
17
18
19/*
20 * Set up a hw structure for a specified data port, control port and IRQ.
21 * This should follow whatever the default interface uses.
22 */
23static inline void ide_init_hwif_ports(hw_regs_t *hw, unsigned long data_port,
24 unsigned long ctrl_port, int *irq)
25{
26 unsigned long reg = data_port;
27 int i;
28 int regincr = 1;
29
30 /* The Empeg board has the first two address lines unused */
31 if (machine_is_empeg())
32 regincr = 1 << 2;
33
34 /* The LART doesn't use A0 for IDE */
35 if (machine_is_lart())
36 regincr = 1 << 1;
37
38 memset(hw, 0, sizeof(*hw));
39
40 for (i = 0; i <= 7; i++) {
41 hw->io_ports_array[i] = reg;
42 reg += regincr;
43 }
44
45 hw->io_ports.ctl_addr = ctrl_port;
46
47 if (irq)
48 *irq = 0;
49}
50
51/*
52 * This registers the standard ports for this architecture with the IDE
53 * driver.
54 */
55static __inline__ void
56ide_init_default_hwifs(void)
57{
58 if (machine_is_lart()) {
59#ifdef CONFIG_SA1100_LART
60 hw_regs_t hw;
61
62 /* Enable GPIO as interrupt line */
63 GPDR &= ~LART_GPIO_IDE;
64 set_irq_type(LART_IRQ_IDE, IRQ_TYPE_EDGE_RISING);
65
66 /* set PCMCIA interface timing */
67 MECR = 0x00060006;
68
69 /* init the interface */
70 ide_init_hwif_ports(&hw, PCMCIA_IO_0_BASE + 0x0000, PCMCIA_IO_0_BASE + 0x1000, NULL);
71 hw.irq = LART_IRQ_IDE;
72 ide_register_hw(&hw);
73#endif
74 }
75}
diff --git a/include/asm-arm/arch-sa1100/io.h b/include/asm-arm/arch-sa1100/io.h
deleted file mode 100644
index 0756269404b1..000000000000
--- a/include/asm-arm/arch-sa1100/io.h
+++ /dev/null
@@ -1,26 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-sa1100/io.h
3 *
4 * Copyright (C) 1997-1999 Russell King
5 *
6 * Modifications:
7 * 06-12-1997 RMK Created.
8 * 07-04-1999 RMK Major cleanup
9 */
10#ifndef __ASM_ARM_ARCH_IO_H
11#define __ASM_ARM_ARCH_IO_H
12
13#define IO_SPACE_LIMIT 0xffffffff
14
15/*
16 * We don't actually have real ISA nor PCI buses, but there is so many
17 * drivers out there that might just work if we fake them...
18 */
19static inline void __iomem *__io(unsigned long addr)
20{
21 return (void __iomem *)addr;
22}
23#define __io(a) __io(a)
24#define __mem_pci(a) (a)
25
26#endif
diff --git a/include/asm-arm/arch-sa1100/irqs.h b/include/asm-arm/arch-sa1100/irqs.h
deleted file mode 100644
index 7bf80484bb77..000000000000
--- a/include/asm-arm/arch-sa1100/irqs.h
+++ /dev/null
@@ -1,197 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-sa1100/irqs.h
3 *
4 * Copyright (C) 1996 Russell King
5 * Copyright (C) 1998 Deborah Wallach (updates for SA1100/Brutus).
6 * Copyright (C) 1999 Nicolas Pitre (full GPIO irq isolation)
7 *
8 * 2001/11/14 RMK Cleaned up and standardised a lot of the IRQs.
9 */
10
11#define IRQ_GPIO0 0
12#define IRQ_GPIO1 1
13#define IRQ_GPIO2 2
14#define IRQ_GPIO3 3
15#define IRQ_GPIO4 4
16#define IRQ_GPIO5 5
17#define IRQ_GPIO6 6
18#define IRQ_GPIO7 7
19#define IRQ_GPIO8 8
20#define IRQ_GPIO9 9
21#define IRQ_GPIO10 10
22#define IRQ_GPIO11_27 11
23#define IRQ_LCD 12 /* LCD controller */
24#define IRQ_Ser0UDC 13 /* Ser. port 0 UDC */
25#define IRQ_Ser1SDLC 14 /* Ser. port 1 SDLC */
26#define IRQ_Ser1UART 15 /* Ser. port 1 UART */
27#define IRQ_Ser2ICP 16 /* Ser. port 2 ICP */
28#define IRQ_Ser3UART 17 /* Ser. port 3 UART */
29#define IRQ_Ser4MCP 18 /* Ser. port 4 MCP */
30#define IRQ_Ser4SSP 19 /* Ser. port 4 SSP */
31#define IRQ_DMA0 20 /* DMA controller channel 0 */
32#define IRQ_DMA1 21 /* DMA controller channel 1 */
33#define IRQ_DMA2 22 /* DMA controller channel 2 */
34#define IRQ_DMA3 23 /* DMA controller channel 3 */
35#define IRQ_DMA4 24 /* DMA controller channel 4 */
36#define IRQ_DMA5 25 /* DMA controller channel 5 */
37#define IRQ_OST0 26 /* OS Timer match 0 */
38#define IRQ_OST1 27 /* OS Timer match 1 */
39#define IRQ_OST2 28 /* OS Timer match 2 */
40#define IRQ_OST3 29 /* OS Timer match 3 */
41#define IRQ_RTC1Hz 30 /* RTC 1 Hz clock */
42#define IRQ_RTCAlrm 31 /* RTC Alarm */
43
44#define IRQ_GPIO11 32
45#define IRQ_GPIO12 33
46#define IRQ_GPIO13 34
47#define IRQ_GPIO14 35
48#define IRQ_GPIO15 36
49#define IRQ_GPIO16 37
50#define IRQ_GPIO17 38
51#define IRQ_GPIO18 39
52#define IRQ_GPIO19 40
53#define IRQ_GPIO20 41
54#define IRQ_GPIO21 42
55#define IRQ_GPIO22 43
56#define IRQ_GPIO23 44
57#define IRQ_GPIO24 45
58#define IRQ_GPIO25 46
59#define IRQ_GPIO26 47
60#define IRQ_GPIO27 48
61
62/*
63 * The next 16 interrupts are for board specific purposes. Since
64 * the kernel can only run on one machine at a time, we can re-use
65 * these. If you need more, increase IRQ_BOARD_END, but keep it
66 * within sensible limits. IRQs 49 to 64 are available.
67 */
68#define IRQ_BOARD_START 49
69#define IRQ_BOARD_END 65
70
71#define IRQ_SA1111_START (IRQ_BOARD_END)
72#define IRQ_GPAIN0 (IRQ_BOARD_END + 0)
73#define IRQ_GPAIN1 (IRQ_BOARD_END + 1)
74#define IRQ_GPAIN2 (IRQ_BOARD_END + 2)
75#define IRQ_GPAIN3 (IRQ_BOARD_END + 3)
76#define IRQ_GPBIN0 (IRQ_BOARD_END + 4)
77#define IRQ_GPBIN1 (IRQ_BOARD_END + 5)
78#define IRQ_GPBIN2 (IRQ_BOARD_END + 6)
79#define IRQ_GPBIN3 (IRQ_BOARD_END + 7)
80#define IRQ_GPBIN4 (IRQ_BOARD_END + 8)
81#define IRQ_GPBIN5 (IRQ_BOARD_END + 9)
82#define IRQ_GPCIN0 (IRQ_BOARD_END + 10)
83#define IRQ_GPCIN1 (IRQ_BOARD_END + 11)
84#define IRQ_GPCIN2 (IRQ_BOARD_END + 12)
85#define IRQ_GPCIN3 (IRQ_BOARD_END + 13)
86#define IRQ_GPCIN4 (IRQ_BOARD_END + 14)
87#define IRQ_GPCIN5 (IRQ_BOARD_END + 15)
88#define IRQ_GPCIN6 (IRQ_BOARD_END + 16)
89#define IRQ_GPCIN7 (IRQ_BOARD_END + 17)
90#define IRQ_MSTXINT (IRQ_BOARD_END + 18)
91#define IRQ_MSRXINT (IRQ_BOARD_END + 19)
92#define IRQ_MSSTOPERRINT (IRQ_BOARD_END + 20)
93#define IRQ_TPTXINT (IRQ_BOARD_END + 21)
94#define IRQ_TPRXINT (IRQ_BOARD_END + 22)
95#define IRQ_TPSTOPERRINT (IRQ_BOARD_END + 23)
96#define SSPXMTINT (IRQ_BOARD_END + 24)
97#define SSPRCVINT (IRQ_BOARD_END + 25)
98#define SSPROR (IRQ_BOARD_END + 26)
99#define AUDXMTDMADONEA (IRQ_BOARD_END + 32)
100#define AUDRCVDMADONEA (IRQ_BOARD_END + 33)
101#define AUDXMTDMADONEB (IRQ_BOARD_END + 34)
102#define AUDRCVDMADONEB (IRQ_BOARD_END + 35)
103#define AUDTFSR (IRQ_BOARD_END + 36)
104#define AUDRFSR (IRQ_BOARD_END + 37)
105#define AUDTUR (IRQ_BOARD_END + 38)
106#define AUDROR (IRQ_BOARD_END + 39)
107#define AUDDTS (IRQ_BOARD_END + 40)
108#define AUDRDD (IRQ_BOARD_END + 41)
109#define AUDSTO (IRQ_BOARD_END + 42)
110#define IRQ_USBPWR (IRQ_BOARD_END + 43)
111#define IRQ_HCIM (IRQ_BOARD_END + 44)
112#define IRQ_HCIBUFFACC (IRQ_BOARD_END + 45)
113#define IRQ_HCIRMTWKP (IRQ_BOARD_END + 46)
114#define IRQ_NHCIMFCIR (IRQ_BOARD_END + 47)
115#define IRQ_USB_PORT_RESUME (IRQ_BOARD_END + 48)
116#define IRQ_S0_READY_NINT (IRQ_BOARD_END + 49)
117#define IRQ_S1_READY_NINT (IRQ_BOARD_END + 50)
118#define IRQ_S0_CD_VALID (IRQ_BOARD_END + 51)
119#define IRQ_S1_CD_VALID (IRQ_BOARD_END + 52)
120#define IRQ_S0_BVD1_STSCHG (IRQ_BOARD_END + 53)
121#define IRQ_S1_BVD1_STSCHG (IRQ_BOARD_END + 54)
122
123#define IRQ_LOCOMO_START (IRQ_BOARD_END)
124#define IRQ_LOCOMO_KEY (IRQ_BOARD_END + 0)
125#define IRQ_LOCOMO_GPIO0 (IRQ_BOARD_END + 1)
126#define IRQ_LOCOMO_GPIO1 (IRQ_BOARD_END + 2)
127#define IRQ_LOCOMO_GPIO2 (IRQ_BOARD_END + 3)
128#define IRQ_LOCOMO_GPIO3 (IRQ_BOARD_END + 4)
129#define IRQ_LOCOMO_GPIO4 (IRQ_BOARD_END + 5)
130#define IRQ_LOCOMO_GPIO5 (IRQ_BOARD_END + 6)
131#define IRQ_LOCOMO_GPIO6 (IRQ_BOARD_END + 7)
132#define IRQ_LOCOMO_GPIO7 (IRQ_BOARD_END + 8)
133#define IRQ_LOCOMO_GPIO8 (IRQ_BOARD_END + 9)
134#define IRQ_LOCOMO_GPIO9 (IRQ_BOARD_END + 10)
135#define IRQ_LOCOMO_GPIO10 (IRQ_BOARD_END + 11)
136#define IRQ_LOCOMO_GPIO11 (IRQ_BOARD_END + 12)
137#define IRQ_LOCOMO_GPIO12 (IRQ_BOARD_END + 13)
138#define IRQ_LOCOMO_GPIO13 (IRQ_BOARD_END + 14)
139#define IRQ_LOCOMO_GPIO14 (IRQ_BOARD_END + 15)
140#define IRQ_LOCOMO_GPIO15 (IRQ_BOARD_END + 16)
141#define IRQ_LOCOMO_LT (IRQ_BOARD_END + 17)
142#define IRQ_LOCOMO_SPI_RFR (IRQ_BOARD_END + 18)
143#define IRQ_LOCOMO_SPI_RFW (IRQ_BOARD_END + 19)
144#define IRQ_LOCOMO_SPI_REND (IRQ_BOARD_END + 20)
145#define IRQ_LOCOMO_SPI_TEND (IRQ_BOARD_END + 21)
146
147/*
148 * Figure out the MAX IRQ number.
149 *
150 * If we have an SA1111, the max IRQ is S1_BVD1_STSCHG+1.
151 * If we have an LoCoMo, the max IRQ is IRQ_LOCOMO_SPI_TEND+1
152 * Otherwise, we have the standard IRQs only.
153 */
154#ifdef CONFIG_SA1111
155#define NR_IRQS (IRQ_S1_BVD1_STSCHG + 1)
156#elif defined(CONFIG_SA1100_H3800)
157#define NR_IRQS (IRQ_BOARD_END)
158#elif defined(CONFIG_SHARP_LOCOMO)
159#define NR_IRQS (IRQ_LOCOMO_SPI_TEND + 1)
160#else
161#define NR_IRQS (IRQ_BOARD_START)
162#endif
163
164/*
165 * Board specific IRQs. Define them here.
166 * Do not surround them with ifdefs.
167 */
168#define IRQ_NEPONSET_SMC9196 (IRQ_BOARD_START + 0)
169#define IRQ_NEPONSET_USAR (IRQ_BOARD_START + 1)
170#define IRQ_NEPONSET_SA1111 (IRQ_BOARD_START + 2)
171
172/* LoCoMo Interrupts (CONFIG_SHARP_LOCOMO) */
173#define IRQ_LOCOMO_KEY_BASE (IRQ_BOARD_START + 0)
174#define IRQ_LOCOMO_GPIO_BASE (IRQ_BOARD_START + 1)
175#define IRQ_LOCOMO_LT_BASE (IRQ_BOARD_START + 2)
176#define IRQ_LOCOMO_SPI_BASE (IRQ_BOARD_START + 3)
177
178/* H3800-specific IRQs (CONFIG_SA1100_H3800) */
179#define H3800_KPIO_IRQ_START (IRQ_BOARD_START)
180#define IRQ_H3800_KEY (IRQ_BOARD_START + 0)
181#define IRQ_H3800_SPI (IRQ_BOARD_START + 1)
182#define IRQ_H3800_OWM (IRQ_BOARD_START + 2)
183#define IRQ_H3800_ADC (IRQ_BOARD_START + 3)
184#define IRQ_H3800_UART_0 (IRQ_BOARD_START + 4)
185#define IRQ_H3800_UART_1 (IRQ_BOARD_START + 5)
186#define IRQ_H3800_TIMER_0 (IRQ_BOARD_START + 6)
187#define IRQ_H3800_TIMER_1 (IRQ_BOARD_START + 7)
188#define IRQ_H3800_TIMER_2 (IRQ_BOARD_START + 8)
189#define H3800_KPIO_IRQ_COUNT 9
190
191#define H3800_GPIO_IRQ_START (IRQ_BOARD_START + 9)
192#define IRQ_H3800_PEN (IRQ_BOARD_START + 9)
193#define IRQ_H3800_SD_DETECT (IRQ_BOARD_START + 10)
194#define IRQ_H3800_EAR_IN (IRQ_BOARD_START + 11)
195#define IRQ_H3800_USB_DETECT (IRQ_BOARD_START + 12)
196#define IRQ_H3800_SD_CON_SLT (IRQ_BOARD_START + 13)
197#define H3800_GPIO_IRQ_COUNT 5
diff --git a/include/asm-arm/arch-sa1100/jornada720.h b/include/asm-arm/arch-sa1100/jornada720.h
deleted file mode 100644
index 45d2bb59f9d0..000000000000
--- a/include/asm-arm/arch-sa1100/jornada720.h
+++ /dev/null
@@ -1,27 +0,0 @@
1/*
2 * include/asm-arm/arch-sa1100/jornada720.h
3 *
4 * This file contains SSP/MCU communication definitions for HP Jornada 710/720/728
5 *
6 * Copyright (C) 2007 Kristoffer Ericson <Kristoffer.Ericson@gmail.com>
7 * Copyright (C) 2000 John Ankcorn <jca@lcs.mit.edu>
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12 *
13 */
14
15 /* HP Jornada 7xx microprocessor commands */
16#define GETBATTERYDATA 0xc0
17#define GETSCANKEYCODE 0x90
18#define GETTOUCHSAMPLES 0xa0
19#define GETCONTRAST 0xD0
20#define SETCONTRAST 0xD1
21#define GETBRIGHTNESS 0xD2
22#define SETBRIGHTNESS 0xD3
23#define CONTRASTOFF 0xD8
24#define BRIGHTNESSOFF 0xD9
25#define PWMOFF 0xDF
26#define TXDUMMY 0x11
27#define ERRORCODE 0x00
diff --git a/include/asm-arm/arch-sa1100/mcp.h b/include/asm-arm/arch-sa1100/mcp.h
deleted file mode 100644
index f58a22755c61..000000000000
--- a/include/asm-arm/arch-sa1100/mcp.h
+++ /dev/null
@@ -1,21 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-sa1100/mcp.h
3 *
4 * Copyright (C) 2005 Russell King.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10#ifndef __ASM_ARM_ARCH_MCP_H
11#define __ASM_ARM_ARCH_MCP_H
12
13#include <linux/types.h>
14
15struct mcp_plat_data {
16 u32 mccr0;
17 u32 mccr1;
18 unsigned int sclk_rate;
19};
20
21#endif
diff --git a/include/asm-arm/arch-sa1100/memory.h b/include/asm-arm/arch-sa1100/memory.h
deleted file mode 100644
index 0e907fc6d42a..000000000000
--- a/include/asm-arm/arch-sa1100/memory.h
+++ /dev/null
@@ -1,68 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-sa1100/memory.h
3 *
4 * Copyright (C) 1999-2000 Nicolas Pitre <nico@cam.org>
5 */
6
7#ifndef __ASM_ARCH_MEMORY_H
8#define __ASM_ARCH_MEMORY_H
9
10#include <asm/sizes.h>
11
12/*
13 * Physical DRAM offset is 0xc0000000 on the SA1100
14 */
15#define PHYS_OFFSET UL(0xc0000000)
16
17#ifndef __ASSEMBLY__
18
19#ifdef CONFIG_SA1111
20void sa1111_adjust_zones(int node, unsigned long *size, unsigned long *holes);
21
22#define arch_adjust_zones(node, size, holes) \
23 sa1111_adjust_zones(node, size, holes)
24
25#define ISA_DMA_THRESHOLD (PHYS_OFFSET + SZ_1M - 1)
26
27#endif
28#endif
29
30/*
31 * Virtual view <-> DMA view memory address translations
32 * virt_to_bus: Used to translate the virtual address to an
33 * address suitable to be passed to set_dma_addr
34 * bus_to_virt: Used to convert an address for DMA operations
35 * to an address that the kernel can use.
36 *
37 * On the SA1100, bus addresses are equivalent to physical addresses.
38 */
39#define __virt_to_bus(x) __virt_to_phys(x)
40#define __bus_to_virt(x) __phys_to_virt(x)
41
42/*
43 * Because of the wide memory address space between physical RAM banks on the
44 * SA1100, it's much convenient to use Linux's NUMA support to implement our
45 * memory map representation. Assuming all memory nodes have equal access
46 * characteristics, we then have generic discontiguous memory support.
47 *
48 * Of course, all this isn't mandatory for SA1100 implementations with only
49 * one used memory bank. For those, simply undefine CONFIG_DISCONTIGMEM.
50 *
51 * The nodes are matched with the physical memory bank addresses which are
52 * incidentally the same as virtual addresses.
53 *
54 * node 0: 0xc0000000 - 0xc7ffffff
55 * node 1: 0xc8000000 - 0xcfffffff
56 * node 2: 0xd0000000 - 0xd7ffffff
57 * node 3: 0xd8000000 - 0xdfffffff
58 */
59#define NODE_MEM_SIZE_BITS 27
60
61/*
62 * Cache flushing area - SA1100 zero bank
63 */
64#define FLUSH_BASE_PHYS 0xe0000000
65#define FLUSH_BASE 0xf5000000
66#define FLUSH_BASE_MINICACHE 0xf5100000
67
68#endif
diff --git a/include/asm-arm/arch-sa1100/neponset.h b/include/asm-arm/arch-sa1100/neponset.h
deleted file mode 100644
index 09ec9e2bd182..000000000000
--- a/include/asm-arm/arch-sa1100/neponset.h
+++ /dev/null
@@ -1,74 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-sa1100/neponset.h
3 *
4 * Created 2000/06/05 by Nicolas Pitre <nico@cam.org>
5 *
6 * This file contains the hardware specific definitions for Assabet
7 * Only include this file from SA1100-specific files.
8 *
9 * 2000/05/23 John Dorsey <john+@cs.cmu.edu>
10 * Definitions for Neponset added.
11 */
12#ifndef __ASM_ARCH_NEPONSET_H
13#define __ASM_ARCH_NEPONSET_H
14
15/*
16 * Neponset definitions:
17 */
18
19#define NEPONSET_CPLD_BASE (0x10000000)
20#define Nep_p2v( x ) ((x) - NEPONSET_CPLD_BASE + 0xf3000000)
21#define Nep_v2p( x ) ((x) - 0xf3000000 + NEPONSET_CPLD_BASE)
22
23#define _IRR 0x10000024 /* Interrupt Reason Register */
24#define _AUD_CTL 0x100000c0 /* Audio controls (RW) */
25#define _MDM_CTL_0 0x100000b0 /* Modem control 0 (RW) */
26#define _MDM_CTL_1 0x100000b4 /* Modem control 1 (RW) */
27#define _NCR_0 0x100000a0 /* Control Register (RW) */
28#define _KP_X_OUT 0x10000090 /* Keypad row write (RW) */
29#define _KP_Y_IN 0x10000080 /* Keypad column read (RO) */
30#define _SWPK 0x10000020 /* Switch pack (RO) */
31#define _WHOAMI 0x10000000 /* System ID Register (RO) */
32
33#define _LEDS 0x10000010 /* LEDs [31:0] (WO) */
34
35#define IRR (*((volatile u_char *) Nep_p2v(_IRR)))
36#define AUD_CTL (*((volatile u_char *) Nep_p2v(_AUD_CTL)))
37#define MDM_CTL_0 (*((volatile u_char *) Nep_p2v(_MDM_CTL_0)))
38#define MDM_CTL_1 (*((volatile u_char *) Nep_p2v(_MDM_CTL_1)))
39#define NCR_0 (*((volatile u_char *) Nep_p2v(_NCR_0)))
40#define KP_X_OUT (*((volatile u_char *) Nep_p2v(_KP_X_OUT)))
41#define KP_Y_IN (*((volatile u_char *) Nep_p2v(_KP_Y_IN)))
42#define SWPK (*((volatile u_char *) Nep_p2v(_SWPK)))
43#define WHOAMI (*((volatile u_char *) Nep_p2v(_WHOAMI)))
44
45#define LEDS (*((volatile Word *) Nep_p2v(_LEDS)))
46
47#define IRR_ETHERNET (1<<0)
48#define IRR_USAR (1<<1)
49#define IRR_SA1111 (1<<2)
50
51#define AUD_SEL_1341 (1<<0)
52#define AUD_MUTE_1341 (1<<1)
53
54#define MDM_CTL0_RTS1 (1 << 0)
55#define MDM_CTL0_DTR1 (1 << 1)
56#define MDM_CTL0_RTS2 (1 << 2)
57#define MDM_CTL0_DTR2 (1 << 3)
58
59#define MDM_CTL1_CTS1 (1 << 0)
60#define MDM_CTL1_DSR1 (1 << 1)
61#define MDM_CTL1_DCD1 (1 << 2)
62#define MDM_CTL1_CTS2 (1 << 3)
63#define MDM_CTL1_DSR2 (1 << 4)
64#define MDM_CTL1_DCD2 (1 << 5)
65
66#define NCR_GP01_OFF (1<<0)
67#define NCR_TP_PWR_EN (1<<1)
68#define NCR_MS_PWR_EN (1<<2)
69#define NCR_ENET_OSC_EN (1<<3)
70#define NCR_SPI_KB_WK_UP (1<<4)
71#define NCR_A0VPP (1<<5)
72#define NCR_A1VPP (1<<6)
73
74#endif
diff --git a/include/asm-arm/arch-sa1100/simpad.h b/include/asm-arm/arch-sa1100/simpad.h
deleted file mode 100644
index 034301d23f60..000000000000
--- a/include/asm-arm/arch-sa1100/simpad.h
+++ /dev/null
@@ -1,112 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-sa1100/simpad.h
3 *
4 * based of assabet.h same as HUW_Webpanel
5 *
6 * This file contains the hardware specific definitions for SIMpad
7 *
8 * 2001/05/14 Juergen Messerer <juergen.messerer@freesurf.ch>
9 */
10
11#ifndef __ASM_ARCH_SIMPAD_H
12#define __ASM_ARCH_SIMPAD_H
13
14
15#define GPIO_UART1_RTS GPIO_GPIO14
16#define GPIO_UART1_DTR GPIO_GPIO7
17#define GPIO_UART1_CTS GPIO_GPIO8
18#define GPIO_UART1_DCD GPIO_GPIO23
19#define GPIO_UART1_DSR GPIO_GPIO6
20
21#define GPIO_UART3_RTS GPIO_GPIO12
22#define GPIO_UART3_DTR GPIO_GPIO16
23#define GPIO_UART3_CTS GPIO_GPIO13
24#define GPIO_UART3_DCD GPIO_GPIO18
25#define GPIO_UART3_DSR GPIO_GPIO17
26
27#define GPIO_POWER_BUTTON GPIO_GPIO0
28#define GPIO_UCB1300_IRQ GPIO_GPIO22 /* UCB GPIO and touchscreen */
29
30#define IRQ_UART1_CTS IRQ_GPIO15
31#define IRQ_UART1_DCD GPIO_GPIO23
32#define IRQ_UART1_DSR GPIO_GPIO6
33#define IRQ_UART3_CTS GPIO_GPIO13
34#define IRQ_UART3_DCD GPIO_GPIO18
35#define IRQ_UART3_DSR GPIO_GPIO17
36
37#define IRQ_GPIO_UCB1300_IRQ IRQ_GPIO22
38#define IRQ_GPIO_POWER_BUTTON IRQ_GPIO0
39
40
41/*--- PCMCIA ---*/
42#define GPIO_CF_CD GPIO_GPIO24
43#define GPIO_CF_IRQ GPIO_GPIO1
44#define IRQ_GPIO_CF_IRQ IRQ_GPIO1
45#define IRQ_GPIO_CF_CD IRQ_GPIO24
46
47/*--- SmartCard ---*/
48#define GPIO_SMART_CARD GPIO_GPIO10
49#define IRQ_GPIO_SMARD_CARD IRQ_GPIO10
50
51// CS3 Latch is write only, a shadow is necessary
52
53#define CS3BUSTYPE unsigned volatile long
54#define CS3_BASE 0xf1000000
55
56#define VCC_5V_EN 0x0001 // For 5V PCMCIA
57#define VCC_3V_EN 0x0002 // FOR 3.3V PCMCIA
58#define EN1 0x0004 // This is only for EPROM's
59#define EN0 0x0008 // Both should be enable for 3.3V or 5V
60#define DISPLAY_ON 0x0010
61#define PCMCIA_BUFF_DIS 0x0020
62#define MQ_RESET 0x0040
63#define PCMCIA_RESET 0x0080
64#define DECT_POWER_ON 0x0100
65#define IRDA_SD 0x0200 // Shutdown for powersave
66#define RS232_ON 0x0400
67#define SD_MEDIAQ 0x0800 // Shutdown for powersave
68#define LED2_ON 0x1000
69#define IRDA_MODE 0x2000 // Fast/Slow IrDA mode
70#define ENABLE_5V 0x4000 // Enable 5V circuit
71#define RESET_SIMCARD 0x8000
72
73#define RS232_ENABLE 0x0440
74#define PCMCIAMASK 0x402f
75
76
77struct simpad_battery {
78 unsigned char ac_status; /* line connected yes/no */
79 unsigned char status; /* battery loading yes/no */
80 unsigned char percentage; /* percentage loaded */
81 unsigned short life; /* life till empty */
82};
83
84/* These should match the apm_bios.h definitions */
85#define SIMPAD_AC_STATUS_AC_OFFLINE 0x00
86#define SIMPAD_AC_STATUS_AC_ONLINE 0x01
87#define SIMPAD_AC_STATUS_AC_BACKUP 0x02 /* What does this mean? */
88#define SIMPAD_AC_STATUS_AC_UNKNOWN 0xff
89
90/* These bitfields are rarely "or'd" together */
91#define SIMPAD_BATT_STATUS_HIGH 0x01
92#define SIMPAD_BATT_STATUS_LOW 0x02
93#define SIMPAD_BATT_STATUS_CRITICAL 0x04
94#define SIMPAD_BATT_STATUS_CHARGING 0x08
95#define SIMPAD_BATT_STATUS_CHARGE_MAIN 0x10
96#define SIMPAD_BATT_STATUS_DEAD 0x20 /* Battery will not charge */
97#define SIMPAD_BATT_NOT_INSTALLED 0x20 /* For expansion pack batteries */
98#define SIMPAD_BATT_STATUS_FULL 0x40 /* Battery fully charged (and connected to AC) */
99#define SIMPAD_BATT_STATUS_NOBATT 0x80
100#define SIMPAD_BATT_STATUS_UNKNOWN 0xff
101
102extern int simpad_get_battery(struct simpad_battery* );
103
104#endif // __ASM_ARCH_SIMPAD_H
105
106
107
108
109
110
111
112
diff --git a/include/asm-arm/arch-sa1100/system.h b/include/asm-arm/arch-sa1100/system.h
deleted file mode 100644
index aef91e3b63fe..000000000000
--- a/include/asm-arm/arch-sa1100/system.h
+++ /dev/null
@@ -1,22 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-sa1100/system.h
3 *
4 * Copyright (c) 1999 Nicolas Pitre <nico@cam.org>
5 */
6#include <asm/hardware.h>
7
8static inline void arch_idle(void)
9{
10 cpu_do_idle();
11}
12
13static inline void arch_reset(char mode)
14{
15 if (mode == 's') {
16 /* Jump into ROM at address 0 */
17 cpu_reset(0);
18 } else {
19 /* Use on-chip reset capability */
20 RSRR = RSRR_SWR;
21 }
22}
diff --git a/include/asm-arm/arch-sa1100/timex.h b/include/asm-arm/arch-sa1100/timex.h
deleted file mode 100644
index 837be9b797dd..000000000000
--- a/include/asm-arm/arch-sa1100/timex.h
+++ /dev/null
@@ -1,12 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-sa1100/timex.h
3 *
4 * SA1100 architecture timex specifications
5 *
6 * Copyright (C) 1998
7 */
8
9/*
10 * SA1100 timer
11 */
12#define CLOCK_TICK_RATE 3686400
diff --git a/include/asm-arm/arch-sa1100/uncompress.h b/include/asm-arm/arch-sa1100/uncompress.h
deleted file mode 100644
index 17e64d232e7d..000000000000
--- a/include/asm-arm/arch-sa1100/uncompress.h
+++ /dev/null
@@ -1,50 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-sa1100/uncompress.h
3 *
4 * (C) 1999 Nicolas Pitre <nico@cam.org>
5 *
6 * Reorganised to be machine independent.
7 */
8
9#include "hardware.h"
10
11/*
12 * The following code assumes the serial port has already been
13 * initialized by the bootloader. We search for the first enabled
14 * port in the most probable order. If you didn't setup a port in
15 * your bootloader then nothing will appear (which might be desired).
16 */
17
18#define UART(x) (*(volatile unsigned long *)(serial_port + (x)))
19
20static void putc(int c)
21{
22 unsigned long serial_port;
23
24 do {
25 serial_port = _Ser3UTCR0;
26 if (UART(UTCR3) & UTCR3_TXE) break;
27 serial_port = _Ser1UTCR0;
28 if (UART(UTCR3) & UTCR3_TXE) break;
29 serial_port = _Ser2UTCR0;
30 if (UART(UTCR3) & UTCR3_TXE) break;
31 return;
32 } while (0);
33
34 /* wait for space in the UART's transmitter */
35 while (!(UART(UTSR1) & UTSR1_TNF))
36 barrier();
37
38 /* send the character out. */
39 UART(UTDR) = c;
40}
41
42static inline void flush(void)
43{
44}
45
46/*
47 * Nothing to do for these
48 */
49#define arch_decomp_setup()
50#define arch_decomp_wdog()
diff --git a/include/asm-arm/arch-sa1100/vmalloc.h b/include/asm-arm/arch-sa1100/vmalloc.h
deleted file mode 100644
index 2fb1c6f3aa1b..000000000000
--- a/include/asm-arm/arch-sa1100/vmalloc.h
+++ /dev/null
@@ -1,4 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-sa1100/vmalloc.h
3 */
4#define VMALLOC_END (0xe8000000)
diff --git a/include/asm-arm/arch-shark/debug-macro.S b/include/asm-arm/arch-shark/debug-macro.S
deleted file mode 100644
index 7cb37f78825e..000000000000
--- a/include/asm-arm/arch-shark/debug-macro.S
+++ /dev/null
@@ -1,31 +0,0 @@
1/* linux/include/asm-arm/arch-shark/debug-macro.S
2 *
3 * Debugging macro include header
4 *
5 * Copyright (C) 1994-1999 Russell King
6 * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 *
12*/
13
14 .macro addruart,rx
15 mov \rx, #0xe0000000
16 orr \rx, \rx, #0x000003f8
17 .endm
18
19 .macro senduart,rd,rx
20 strb \rd, [\rx]
21 .endm
22
23 .macro busyuart,rd,rx
24 mov \rd, #0
251001: add \rd, \rd, #1
26 teq \rd, #0x10000
27 bne 1001b
28 .endm
29
30 .macro waituart,rd,rx
31 .endm
diff --git a/include/asm-arm/arch-shark/dma.h b/include/asm-arm/arch-shark/dma.h
deleted file mode 100644
index fc985d5e62af..000000000000
--- a/include/asm-arm/arch-shark/dma.h
+++ /dev/null
@@ -1,18 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-shark/dma.h
3 *
4 * by Alexander Schulz
5 */
6#ifndef __ASM_ARCH_DMA_H
7#define __ASM_ARCH_DMA_H
8
9/* Use only the lowest 4MB, nothing else works.
10 * The rest is not DMAable. See dev / .properties
11 * in OpenFirmware.
12 */
13#define MAX_DMA_ADDRESS 0xC0400000
14#define MAX_DMA_CHANNELS 8
15#define DMA_ISA_CASCADE 4
16
17#endif /* _ASM_ARCH_DMA_H */
18
diff --git a/include/asm-arm/arch-shark/entry-macro.S b/include/asm-arm/arch-shark/entry-macro.S
deleted file mode 100644
index 82463f30f3df..000000000000
--- a/include/asm-arm/arch-shark/entry-macro.S
+++ /dev/null
@@ -1,41 +0,0 @@
1/*
2 * include/asm-arm/arch-shark/entry-macro.S
3 *
4 * Low-level IRQ helper macros for Shark platform
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10 .macro disable_fiq
11 .endm
12
13 .macro get_irqnr_preamble, base, tmp
14 .endm
15
16 .macro arch_ret_to_user, tmp1, tmp2
17 .endm
18
19 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
20 mov r4, #0xe0000000
21
22 mov \irqstat, #0x0C
23 strb \irqstat, [r4, #0x20] @outb(0x0C, 0x20) /* Poll command */
24 ldrb \irqnr, [r4, #0x20] @irq = inb(0x20) & 7
25 and \irqstat, \irqnr, #0x80
26 teq \irqstat, #0
27 beq 43f
28 and \irqnr, \irqnr, #7
29 teq \irqnr, #2
30 bne 44f
3143: mov \irqstat, #0x0C
32 strb \irqstat, [r4, #0xa0] @outb(0x0C, 0xA0) /* Poll command */
33 ldrb \irqnr, [r4, #0xa0] @irq = (inb(0xA0) & 7) + 8
34 and \irqstat, \irqnr, #0x80
35 teq \irqstat, #0
36 beq 44f
37 and \irqnr, \irqnr, #7
38 add \irqnr, \irqnr, #8
3944: teq \irqstat, #0
40 .endm
41
diff --git a/include/asm-arm/arch-shark/hardware.h b/include/asm-arm/arch-shark/hardware.h
deleted file mode 100644
index ecba45260898..000000000000
--- a/include/asm-arm/arch-shark/hardware.h
+++ /dev/null
@@ -1,51 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-shark/hardware.h
3 *
4 * by Alexander Schulz
5 *
6 * derived from:
7 * linux/include/asm-arm/arch-ebsa110/hardware.h
8 * Copyright (C) 1996-1999 Russell King.
9 */
10#ifndef __ASM_ARCH_HARDWARE_H
11#define __ASM_ARCH_HARDWARE_H
12
13#ifndef __ASSEMBLY__
14
15/*
16 * Mapping areas
17 */
18#define IO_BASE 0xe0000000
19
20#else
21
22#define IO_BASE 0
23
24#endif
25
26#define IO_SIZE 0x08000000
27#define IO_START 0x40000000
28#define ROMCARD_SIZE 0x08000000
29#define ROMCARD_START 0x10000000
30
31#define PCIO_BASE 0xe0000000
32
33
34/* defines for the Framebuffer */
35#define FB_START 0x06000000
36#define FB_SIZE 0x01000000
37
38#define UNCACHEABLE_ADDR 0xdf010000
39
40#define SEQUOIA_LED_GREEN (1<<6)
41#define SEQUOIA_LED_AMBER (1<<5)
42#define SEQUOIA_LED_BACK (1<<7)
43
44#define pcibios_assign_all_busses() 1
45
46#define PCIBIOS_MIN_IO 0x6000
47#define PCIBIOS_MIN_MEM 0x50000000
48#define PCIMEM_BASE 0xe8000000
49
50#endif
51
diff --git a/include/asm-arm/arch-shark/io.h b/include/asm-arm/arch-shark/io.h
deleted file mode 100644
index 87ffa27f2962..000000000000
--- a/include/asm-arm/arch-shark/io.h
+++ /dev/null
@@ -1,56 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-shark/io.h
3 *
4 * by Alexander Schulz
5 *
6 * derived from:
7 * linux/include/asm-arm/arch-ebsa110/io.h
8 * Copyright (C) 1997,1998 Russell King
9 */
10
11#ifndef __ASM_ARM_ARCH_IO_H
12#define __ASM_ARM_ARCH_IO_H
13
14#include <asm/hardware.h>
15
16#define IO_SPACE_LIMIT 0xffffffff
17
18/*
19 * We use two different types of addressing - PC style addresses, and ARM
20 * addresses. PC style accesses the PC hardware with the normal PC IO
21 * addresses, eg 0x3f8 for serial#1. ARM addresses are 0x80000000+
22 * and are translated to the start of IO.
23 */
24#define __PORT_PCIO(x) (!((x) & 0x80000000))
25
26#define __io(a) ((void __iomem *)(PCIO_BASE + (a)))
27
28
29static inline unsigned int __ioaddr (unsigned int port) \
30{ \
31 if (__PORT_PCIO(port)) \
32 return (unsigned int)(PCIO_BASE + (port)); \
33 else \
34 return (unsigned int)(IO_BASE + (port)); \
35}
36
37#define __mem_pci(addr) (addr)
38
39/*
40 * Translated address IO functions
41 *
42 * IO address has already been translated to a virtual address
43 */
44#define outb_t(v,p) \
45 (*(volatile unsigned char *)(p) = (v))
46
47#define inb_t(p) \
48 (*(volatile unsigned char *)(p))
49
50#define outl_t(v,p) \
51 (*(volatile unsigned long *)(p) = (v))
52
53#define inl_t(p) \
54 (*(volatile unsigned long *)(p))
55
56#endif
diff --git a/include/asm-arm/arch-shark/irqs.h b/include/asm-arm/arch-shark/irqs.h
deleted file mode 100644
index b36cc975b290..000000000000
--- a/include/asm-arm/arch-shark/irqs.h
+++ /dev/null
@@ -1,13 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-shark/irqs.h
3 *
4 * by Alexander Schulz
5 */
6
7#define NR_IRQS 16
8
9#define IRQ_ISA_KEYBOARD 1
10#define RTC_IRQ 8
11#define I8042_KBD_IRQ 1
12#define I8042_AUX_IRQ 12
13#define IRQ_HARDDISK 14
diff --git a/include/asm-arm/arch-shark/memory.h b/include/asm-arm/arch-shark/memory.h
deleted file mode 100644
index 6968d6103ea0..000000000000
--- a/include/asm-arm/arch-shark/memory.h
+++ /dev/null
@@ -1,48 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-shark/memory.h
3 *
4 * by Alexander Schulz
5 *
6 * derived from:
7 * linux/include/asm-arm/arch-ebsa110/memory.h
8 * Copyright (c) 1996-1999 Russell King.
9 */
10#ifndef __ASM_ARCH_MEMORY_H
11#define __ASM_ARCH_MEMORY_H
12
13#include <asm/sizes.h>
14
15/*
16 * Physical DRAM offset.
17 */
18#define PHYS_OFFSET UL(0x08000000)
19
20#ifndef __ASSEMBLY__
21
22static inline void __arch_adjust_zones(int node, unsigned long *zone_size, unsigned long *zhole_size)
23{
24 if (node != 0) return;
25 /* Only the first 4 MB (=1024 Pages) are usable for DMA */
26 zone_size[1] = zone_size[0] - 1024;
27 zone_size[0] = 1024;
28 zhole_size[1] = zhole_size[0];
29 zhole_size[0] = 0;
30}
31
32#define arch_adjust_zones(node, size, holes) \
33 __arch_adjust_zones(node, size, holes)
34
35#define ISA_DMA_THRESHOLD (PHYS_OFFSET + SZ_4M - 1)
36
37#endif
38
39#define __virt_to_bus(x) __virt_to_phys(x)
40#define __bus_to_virt(x) __phys_to_virt(x)
41
42/*
43 * Cache flushing area
44 */
45#define FLUSH_BASE_PHYS 0x80000000
46#define FLUSH_BASE 0xdf000000
47
48#endif
diff --git a/include/asm-arm/arch-shark/system.h b/include/asm-arm/arch-shark/system.h
deleted file mode 100644
index f12d771ab4ce..000000000000
--- a/include/asm-arm/arch-shark/system.h
+++ /dev/null
@@ -1,28 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-shark/system.h
3 *
4 * by Alexander Schulz
5 */
6#ifndef __ASM_ARCH_SYSTEM_H
7#define __ASM_ARCH_SYSTEM_H
8
9#include <asm/io.h>
10
11static void arch_reset(char mode)
12{
13 short temp;
14 local_irq_disable();
15 /* Reset the Machine via pc[3] of the sequoia chipset */
16 outw(0x09,0x24);
17 temp=inw(0x26);
18 temp = temp | (1<<3) | (1<<10);
19 outw(0x09,0x24);
20 outw(temp,0x26);
21
22}
23
24static inline void arch_idle(void)
25{
26}
27
28#endif
diff --git a/include/asm-arm/arch-shark/timex.h b/include/asm-arm/arch-shark/timex.h
deleted file mode 100644
index 0d02d255513b..000000000000
--- a/include/asm-arm/arch-shark/timex.h
+++ /dev/null
@@ -1,7 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-shark/timex.h
3 *
4 * by Alexander Schulz
5 */
6
7#define CLOCK_TICK_RATE 1193180
diff --git a/include/asm-arm/arch-shark/uncompress.h b/include/asm-arm/arch-shark/uncompress.h
deleted file mode 100644
index 7eca6534f1bb..000000000000
--- a/include/asm-arm/arch-shark/uncompress.h
+++ /dev/null
@@ -1,51 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-shark/uncompress.h
3 * by Alexander Schulz
4 *
5 * derived from:
6 * linux/include/asm-arm/arch-ebsa285/uncompress.h
7 * Copyright (C) 1996,1997,1998 Russell King
8 */
9
10#define SERIAL_BASE ((volatile unsigned char *)0x400003f8)
11
12static inline void putc(int c)
13{
14 int t;
15
16 SERIAL_BASE[0] = c;
17 t=0x10000;
18 while (t--);
19}
20
21static inline void flush(void)
22{
23}
24
25#ifdef DEBUG
26static void putn(unsigned long z)
27{
28 int i;
29 char x;
30
31 putc('0');
32 putc('x');
33 for (i=0;i<8;i++) {
34 x='0'+((z>>((7-i)*4))&0xf);
35 if (x>'9') x=x-'0'+'A'-10;
36 putc(x);
37 }
38}
39
40static void putr()
41{
42 putc('\n');
43 putc('\r');
44}
45#endif
46
47/*
48 * nothing to do
49 */
50#define arch_decomp_setup()
51#define arch_decomp_wdog()
diff --git a/include/asm-arm/arch-shark/vmalloc.h b/include/asm-arm/arch-shark/vmalloc.h
deleted file mode 100644
index fac37c636b38..000000000000
--- a/include/asm-arm/arch-shark/vmalloc.h
+++ /dev/null
@@ -1,4 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-shark/vmalloc.h
3 */
4#define VMALLOC_END (PAGE_OFFSET + 0x10000000)
diff --git a/include/asm-arm/arch-versatile/debug-macro.S b/include/asm-arm/arch-versatile/debug-macro.S
deleted file mode 100644
index fe106d184e62..000000000000
--- a/include/asm-arm/arch-versatile/debug-macro.S
+++ /dev/null
@@ -1,23 +0,0 @@
1/* linux/include/asm-arm/arch-versatile/debug-macro.S
2 *
3 * Debugging macro include header
4 *
5 * Copyright (C) 1994-1999 Russell King
6 * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 *
12*/
13
14 .macro addruart,rx
15 mrc p15, 0, \rx, c1, c0
16 tst \rx, #1 @ MMU enabled?
17 moveq \rx, #0x10000000
18 movne \rx, #0xf1000000 @ virtual base
19 orr \rx, \rx, #0x001F0000
20 orr \rx, \rx, #0x00001000
21 .endm
22
23#include <asm/hardware/debug-pl01x.S>
diff --git a/include/asm-arm/arch-versatile/dma.h b/include/asm-arm/arch-versatile/dma.h
deleted file mode 100644
index 642577348623..000000000000
--- a/include/asm-arm/arch-versatile/dma.h
+++ /dev/null
@@ -1,20 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-versatile/dma.h
3 *
4 * Copyright (C) 2003 ARM Limited.
5 * Copyright (C) 1997,1998 Russell King
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
diff --git a/include/asm-arm/arch-versatile/entry-macro.S b/include/asm-arm/arch-versatile/entry-macro.S
deleted file mode 100644
index 924d1a8fe360..000000000000
--- a/include/asm-arm/arch-versatile/entry-macro.S
+++ /dev/null
@@ -1,44 +0,0 @@
1/*
2 * include/asm-arm/arch-versatile/entry-macro.S
3 *
4 * Low-level IRQ helper macros for Versatile platforms
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10#include <asm/hardware.h>
11#include <asm/hardware/vic.h>
12
13 .macro disable_fiq
14 .endm
15
16 .macro get_irqnr_preamble, base, tmp
17 ldr \base, =IO_ADDRESS(VERSATILE_VIC_BASE)
18 .endm
19
20 .macro arch_ret_to_user, tmp1, tmp2
21 .endm
22
23 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
24 ldr \irqstat, [\base, #VIC_IRQ_STATUS] @ get masked status
25 mov \irqnr, #0
26 teq \irqstat, #0
27 beq 1003f
28
291001: tst \irqstat, #15
30 bne 1002f
31 add \irqnr, \irqnr, #4
32 movs \irqstat, \irqstat, lsr #4
33 bne 1001b
341002: tst \irqstat, #1
35 bne 1003f
36 add \irqnr, \irqnr, #1
37 movs \irqstat, \irqstat, lsr #1
38 bne 1002b
391003: /* EQ will be set if no irqs pending */
40
41@ clz \irqnr, \irqstat
42@1003: /* EQ will be set if we reach MAXIRQNUM */
43 .endm
44
diff --git a/include/asm-arm/arch-versatile/hardware.h b/include/asm-arm/arch-versatile/hardware.h
deleted file mode 100644
index edc06598d187..000000000000
--- a/include/asm-arm/arch-versatile/hardware.h
+++ /dev/null
@@ -1,52 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-versatile/hardware.h
3 *
4 * This file contains the hardware definitions of the Versatile boards.
5 *
6 * Copyright (C) 2003 ARM Limited.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 */
22#ifndef __ASM_ARCH_HARDWARE_H
23#define __ASM_ARCH_HARDWARE_H
24
25#include <asm/sizes.h>
26#include <asm/arch/platform.h>
27
28/*
29 * PCI space virtual addresses
30 */
31#define VERSATILE_PCI_VIRT_BASE (void __iomem *)0xe8000000ul
32#define VERSATILE_PCI_CFG_VIRT_BASE (void __iomem *)0xe9000000ul
33
34#if 0
35#define VERSATILE_PCI_VIRT_MEM_BASE0 0xf4000000
36#define VERSATILE_PCI_VIRT_MEM_BASE1 0xf5000000
37#define VERSATILE_PCI_VIRT_MEM_BASE2 0xf6000000
38
39#define PCIO_BASE VERSATILE_PCI_VIRT_MEM_BASE0
40#define PCIMEM_BASE VERSATILE_PCI_VIRT_MEM_BASE1
41#endif
42
43/* CIK guesswork */
44#define PCIBIOS_MIN_IO 0x44000000
45#define PCIBIOS_MIN_MEM 0x50000000
46
47#define pcibios_assign_all_busses() 1
48
49/* macro to get at IO space when running virtually */
50#define IO_ADDRESS(x) (((x) & 0x0fffffff) + (((x) >> 4) & 0x0f000000) + 0xf0000000)
51
52#endif
diff --git a/include/asm-arm/arch-versatile/io.h b/include/asm-arm/arch-versatile/io.h
deleted file mode 100644
index c4d01948e00b..000000000000
--- a/include/asm-arm/arch-versatile/io.h
+++ /dev/null
@@ -1,32 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-versatile/io.h
3 *
4 * Copyright (C) 2003 ARM Limited
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20#ifndef __ASM_ARM_ARCH_IO_H
21#define __ASM_ARM_ARCH_IO_H
22
23#define IO_SPACE_LIMIT 0xffffffff
24
25static inline void __iomem *__io(unsigned long addr)
26{
27 return (void __iomem *)addr;
28}
29#define __io(a) __io(a)
30#define __mem_pci(a) (a)
31
32#endif
diff --git a/include/asm-arm/arch-versatile/irqs.h b/include/asm-arm/arch-versatile/irqs.h
deleted file mode 100644
index f7263b99403b..000000000000
--- a/include/asm-arm/arch-versatile/irqs.h
+++ /dev/null
@@ -1,211 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-versatile/irqs.h
3 *
4 * Copyright (C) 2003 ARM Limited
5 * Copyright (C) 2000 Deep Blue Solutions Ltd.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
21
22#include <asm/arch/platform.h>
23
24/*
25 * IRQ interrupts definitions are the same as the INT definitions
26 * held within platform.h
27 */
28#define IRQ_VIC_START 0
29#define IRQ_WDOGINT (IRQ_VIC_START + INT_WDOGINT)
30#define IRQ_SOFTINT (IRQ_VIC_START + INT_SOFTINT)
31#define IRQ_COMMRx (IRQ_VIC_START + INT_COMMRx)
32#define IRQ_COMMTx (IRQ_VIC_START + INT_COMMTx)
33#define IRQ_TIMERINT0_1 (IRQ_VIC_START + INT_TIMERINT0_1)
34#define IRQ_TIMERINT2_3 (IRQ_VIC_START + INT_TIMERINT2_3)
35#define IRQ_GPIOINT0 (IRQ_VIC_START + INT_GPIOINT0)
36#define IRQ_GPIOINT1 (IRQ_VIC_START + INT_GPIOINT1)
37#define IRQ_GPIOINT2 (IRQ_VIC_START + INT_GPIOINT2)
38#define IRQ_GPIOINT3 (IRQ_VIC_START + INT_GPIOINT3)
39#define IRQ_RTCINT (IRQ_VIC_START + INT_RTCINT)
40#define IRQ_SSPINT (IRQ_VIC_START + INT_SSPINT)
41#define IRQ_UARTINT0 (IRQ_VIC_START + INT_UARTINT0)
42#define IRQ_UARTINT1 (IRQ_VIC_START + INT_UARTINT1)
43#define IRQ_UARTINT2 (IRQ_VIC_START + INT_UARTINT2)
44#define IRQ_SCIINT (IRQ_VIC_START + INT_SCIINT)
45#define IRQ_CLCDINT (IRQ_VIC_START + INT_CLCDINT)
46#define IRQ_DMAINT (IRQ_VIC_START + INT_DMAINT)
47#define IRQ_PWRFAILINT (IRQ_VIC_START + INT_PWRFAILINT)
48#define IRQ_MBXINT (IRQ_VIC_START + INT_MBXINT)
49#define IRQ_GNDINT (IRQ_VIC_START + INT_GNDINT)
50#define IRQ_VICSOURCE21 (IRQ_VIC_START + INT_VICSOURCE21)
51#define IRQ_VICSOURCE22 (IRQ_VIC_START + INT_VICSOURCE22)
52#define IRQ_VICSOURCE23 (IRQ_VIC_START + INT_VICSOURCE23)
53#define IRQ_VICSOURCE24 (IRQ_VIC_START + INT_VICSOURCE24)
54#define IRQ_VICSOURCE25 (IRQ_VIC_START + INT_VICSOURCE25)
55#define IRQ_VICSOURCE26 (IRQ_VIC_START + INT_VICSOURCE26)
56#define IRQ_VICSOURCE27 (IRQ_VIC_START + INT_VICSOURCE27)
57#define IRQ_VICSOURCE28 (IRQ_VIC_START + INT_VICSOURCE28)
58#define IRQ_VICSOURCE29 (IRQ_VIC_START + INT_VICSOURCE29)
59#define IRQ_VICSOURCE30 (IRQ_VIC_START + INT_VICSOURCE30)
60#define IRQ_VICSOURCE31 (IRQ_VIC_START + INT_VICSOURCE31)
61#define IRQ_VIC_END (IRQ_VIC_START + 31)
62
63#define IRQMASK_WDOGINT INTMASK_WDOGINT
64#define IRQMASK_SOFTINT INTMASK_SOFTINT
65#define IRQMASK_COMMRx INTMASK_COMMRx
66#define IRQMASK_COMMTx INTMASK_COMMTx
67#define IRQMASK_TIMERINT0_1 INTMASK_TIMERINT0_1
68#define IRQMASK_TIMERINT2_3 INTMASK_TIMERINT2_3
69#define IRQMASK_GPIOINT0 INTMASK_GPIOINT0
70#define IRQMASK_GPIOINT1 INTMASK_GPIOINT1
71#define IRQMASK_GPIOINT2 INTMASK_GPIOINT2
72#define IRQMASK_GPIOINT3 INTMASK_GPIOINT3
73#define IRQMASK_RTCINT INTMASK_RTCINT
74#define IRQMASK_SSPINT INTMASK_SSPINT
75#define IRQMASK_UARTINT0 INTMASK_UARTINT0
76#define IRQMASK_UARTINT1 INTMASK_UARTINT1
77#define IRQMASK_UARTINT2 INTMASK_UARTINT2
78#define IRQMASK_SCIINT INTMASK_SCIINT
79#define IRQMASK_CLCDINT INTMASK_CLCDINT
80#define IRQMASK_DMAINT INTMASK_DMAINT
81#define IRQMASK_PWRFAILINT INTMASK_PWRFAILINT
82#define IRQMASK_MBXINT INTMASK_MBXINT
83#define IRQMASK_GNDINT INTMASK_GNDINT
84#define IRQMASK_VICSOURCE21 INTMASK_VICSOURCE21
85#define IRQMASK_VICSOURCE22 INTMASK_VICSOURCE22
86#define IRQMASK_VICSOURCE23 INTMASK_VICSOURCE23
87#define IRQMASK_VICSOURCE24 INTMASK_VICSOURCE24
88#define IRQMASK_VICSOURCE25 INTMASK_VICSOURCE25
89#define IRQMASK_VICSOURCE26 INTMASK_VICSOURCE26
90#define IRQMASK_VICSOURCE27 INTMASK_VICSOURCE27
91#define IRQMASK_VICSOURCE28 INTMASK_VICSOURCE28
92#define IRQMASK_VICSOURCE29 INTMASK_VICSOURCE29
93#define IRQMASK_VICSOURCE30 INTMASK_VICSOURCE30
94#define IRQMASK_VICSOURCE31 INTMASK_VICSOURCE31
95
96/*
97 * FIQ interrupts definitions are the same as the INT definitions.
98 */
99#define FIQ_WDOGINT INT_WDOGINT
100#define FIQ_SOFTINT INT_SOFTINT
101#define FIQ_COMMRx INT_COMMRx
102#define FIQ_COMMTx INT_COMMTx
103#define FIQ_TIMERINT0_1 INT_TIMERINT0_1
104#define FIQ_TIMERINT2_3 INT_TIMERINT2_3
105#define FIQ_GPIOINT0 INT_GPIOINT0
106#define FIQ_GPIOINT1 INT_GPIOINT1
107#define FIQ_GPIOINT2 INT_GPIOINT2
108#define FIQ_GPIOINT3 INT_GPIOINT3
109#define FIQ_RTCINT INT_RTCINT
110#define FIQ_SSPINT INT_SSPINT
111#define FIQ_UARTINT0 INT_UARTINT0
112#define FIQ_UARTINT1 INT_UARTINT1
113#define FIQ_UARTINT2 INT_UARTINT2
114#define FIQ_SCIINT INT_SCIINT
115#define FIQ_CLCDINT INT_CLCDINT
116#define FIQ_DMAINT INT_DMAINT
117#define FIQ_PWRFAILINT INT_PWRFAILINT
118#define FIQ_MBXINT INT_MBXINT
119#define FIQ_GNDINT INT_GNDINT
120#define FIQ_VICSOURCE21 INT_VICSOURCE21
121#define FIQ_VICSOURCE22 INT_VICSOURCE22
122#define FIQ_VICSOURCE23 INT_VICSOURCE23
123#define FIQ_VICSOURCE24 INT_VICSOURCE24
124#define FIQ_VICSOURCE25 INT_VICSOURCE25
125#define FIQ_VICSOURCE26 INT_VICSOURCE26
126#define FIQ_VICSOURCE27 INT_VICSOURCE27
127#define FIQ_VICSOURCE28 INT_VICSOURCE28
128#define FIQ_VICSOURCE29 INT_VICSOURCE29
129#define FIQ_VICSOURCE30 INT_VICSOURCE30
130#define FIQ_VICSOURCE31 INT_VICSOURCE31
131
132
133#define FIQMASK_WDOGINT INTMASK_WDOGINT
134#define FIQMASK_SOFTINT INTMASK_SOFTINT
135#define FIQMASK_COMMRx INTMASK_COMMRx
136#define FIQMASK_COMMTx INTMASK_COMMTx
137#define FIQMASK_TIMERINT0_1 INTMASK_TIMERINT0_1
138#define FIQMASK_TIMERINT2_3 INTMASK_TIMERINT2_3
139#define FIQMASK_GPIOINT0 INTMASK_GPIOINT0
140#define FIQMASK_GPIOINT1 INTMASK_GPIOINT1
141#define FIQMASK_GPIOINT2 INTMASK_GPIOINT2
142#define FIQMASK_GPIOINT3 INTMASK_GPIOINT3
143#define FIQMASK_RTCINT INTMASK_RTCINT
144#define FIQMASK_SSPINT INTMASK_SSPINT
145#define FIQMASK_UARTINT0 INTMASK_UARTINT0
146#define FIQMASK_UARTINT1 INTMASK_UARTINT1
147#define FIQMASK_UARTINT2 INTMASK_UARTINT2
148#define FIQMASK_SCIINT INTMASK_SCIINT
149#define FIQMASK_CLCDINT INTMASK_CLCDINT
150#define FIQMASK_DMAINT INTMASK_DMAINT
151#define FIQMASK_PWRFAILINT INTMASK_PWRFAILINT
152#define FIQMASK_MBXINT INTMASK_MBXINT
153#define FIQMASK_GNDINT INTMASK_GNDINT
154#define FIQMASK_VICSOURCE21 INTMASK_VICSOURCE21
155#define FIQMASK_VICSOURCE22 INTMASK_VICSOURCE22
156#define FIQMASK_VICSOURCE23 INTMASK_VICSOURCE23
157#define FIQMASK_VICSOURCE24 INTMASK_VICSOURCE24
158#define FIQMASK_VICSOURCE25 INTMASK_VICSOURCE25
159#define FIQMASK_VICSOURCE26 INTMASK_VICSOURCE26
160#define FIQMASK_VICSOURCE27 INTMASK_VICSOURCE27
161#define FIQMASK_VICSOURCE28 INTMASK_VICSOURCE28
162#define FIQMASK_VICSOURCE29 INTMASK_VICSOURCE29
163#define FIQMASK_VICSOURCE30 INTMASK_VICSOURCE30
164#define FIQMASK_VICSOURCE31 INTMASK_VICSOURCE31
165
166/*
167 * Secondary interrupt controller
168 */
169#define IRQ_SIC_START 32
170#define IRQ_SIC_MMCI0B (IRQ_SIC_START + SIC_INT_MMCI0B)
171#define IRQ_SIC_MMCI1B (IRQ_SIC_START + SIC_INT_MMCI1B)
172#define IRQ_SIC_KMI0 (IRQ_SIC_START + SIC_INT_KMI0)
173#define IRQ_SIC_KMI1 (IRQ_SIC_START + SIC_INT_KMI1)
174#define IRQ_SIC_SCI3 (IRQ_SIC_START + SIC_INT_SCI3)
175#define IRQ_SIC_UART3 (IRQ_SIC_START + SIC_INT_UART3)
176#define IRQ_SIC_CLCD (IRQ_SIC_START + SIC_INT_CLCD)
177#define IRQ_SIC_TOUCH (IRQ_SIC_START + SIC_INT_TOUCH)
178#define IRQ_SIC_KEYPAD (IRQ_SIC_START + SIC_INT_KEYPAD)
179#define IRQ_SIC_DoC (IRQ_SIC_START + SIC_INT_DoC)
180#define IRQ_SIC_MMCI0A (IRQ_SIC_START + SIC_INT_MMCI0A)
181#define IRQ_SIC_MMCI1A (IRQ_SIC_START + SIC_INT_MMCI1A)
182#define IRQ_SIC_AACI (IRQ_SIC_START + SIC_INT_AACI)
183#define IRQ_SIC_ETH (IRQ_SIC_START + SIC_INT_ETH)
184#define IRQ_SIC_USB (IRQ_SIC_START + SIC_INT_USB)
185#define IRQ_SIC_PCI0 (IRQ_SIC_START + SIC_INT_PCI0)
186#define IRQ_SIC_PCI1 (IRQ_SIC_START + SIC_INT_PCI1)
187#define IRQ_SIC_PCI2 (IRQ_SIC_START + SIC_INT_PCI2)
188#define IRQ_SIC_PCI3 (IRQ_SIC_START + SIC_INT_PCI3)
189#define IRQ_SIC_END 63
190
191#define SIC_IRQMASK_MMCI0B SIC_INTMASK_MMCI0B
192#define SIC_IRQMASK_MMCI1B SIC_INTMASK_MMCI1B
193#define SIC_IRQMASK_KMI0 SIC_INTMASK_KMI0
194#define SIC_IRQMASK_KMI1 SIC_INTMASK_KMI1
195#define SIC_IRQMASK_SCI3 SIC_INTMASK_SCI3
196#define SIC_IRQMASK_UART3 SIC_INTMASK_UART3
197#define SIC_IRQMASK_CLCD SIC_INTMASK_CLCD
198#define SIC_IRQMASK_TOUCH SIC_INTMASK_TOUCH
199#define SIC_IRQMASK_KEYPAD SIC_INTMASK_KEYPAD
200#define SIC_IRQMASK_DoC SIC_INTMASK_DoC
201#define SIC_IRQMASK_MMCI0A SIC_INTMASK_MMCI0A
202#define SIC_IRQMASK_MMCI1A SIC_INTMASK_MMCI1A
203#define SIC_IRQMASK_AACI SIC_INTMASK_AACI
204#define SIC_IRQMASK_ETH SIC_INTMASK_ETH
205#define SIC_IRQMASK_USB SIC_INTMASK_USB
206#define SIC_IRQMASK_PCI0 SIC_INTMASK_PCI0
207#define SIC_IRQMASK_PCI1 SIC_INTMASK_PCI1
208#define SIC_IRQMASK_PCI2 SIC_INTMASK_PCI2
209#define SIC_IRQMASK_PCI3 SIC_INTMASK_PCI3
210
211#define NR_IRQS 64
diff --git a/include/asm-arm/arch-versatile/memory.h b/include/asm-arm/arch-versatile/memory.h
deleted file mode 100644
index a9370976cc5e..000000000000
--- a/include/asm-arm/arch-versatile/memory.h
+++ /dev/null
@@ -1,38 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-versatile/memory.h
3 *
4 * Copyright (C) 2003 ARM Limited
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20#ifndef __ASM_ARCH_MEMORY_H
21#define __ASM_ARCH_MEMORY_H
22
23/*
24 * Physical DRAM offset.
25 */
26#define PHYS_OFFSET UL(0x00000000)
27
28/*
29 * Virtual view <-> DMA view memory address translations
30 * virt_to_bus: Used to translate the virtual address to an
31 * address suitable to be passed to set_dma_addr
32 * bus_to_virt: Used to convert an address for DMA operations
33 * to an address that the kernel can use.
34 */
35#define __virt_to_bus(x) ((x) - PAGE_OFFSET)
36#define __bus_to_virt(x) ((x) + PAGE_OFFSET)
37
38#endif
diff --git a/include/asm-arm/arch-versatile/platform.h b/include/asm-arm/arch-versatile/platform.h
deleted file mode 100644
index 2af9d7c9c63c..000000000000
--- a/include/asm-arm/arch-versatile/platform.h
+++ /dev/null
@@ -1,510 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-versatile/platform.h
3 *
4 * Copyright (c) ARM Limited 2003. All rights reserved.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20
21#ifndef __address_h
22#define __address_h 1
23
24/*
25 * Memory definitions
26 */
27#define VERSATILE_BOOT_ROM_LO 0x30000000 /* DoC Base (64Mb)...*/
28#define VERSATILE_BOOT_ROM_HI 0x30000000
29#define VERSATILE_BOOT_ROM_BASE VERSATILE_BOOT_ROM_HI /* Normal position */
30#define VERSATILE_BOOT_ROM_SIZE SZ_64M
31
32#define VERSATILE_SSRAM_BASE /* VERSATILE_SSMC_BASE ? */
33#define VERSATILE_SSRAM_SIZE SZ_2M
34
35#define VERSATILE_FLASH_BASE 0x34000000
36#define VERSATILE_FLASH_SIZE SZ_64M
37
38/*
39 * SDRAM
40 */
41#define VERSATILE_SDRAM_BASE 0x00000000
42
43/*
44 * Logic expansion modules
45 *
46 */
47
48
49/* ------------------------------------------------------------------------
50 * Versatile Registers
51 * ------------------------------------------------------------------------
52 *
53 */
54#define VERSATILE_SYS_ID_OFFSET 0x00
55#define VERSATILE_SYS_SW_OFFSET 0x04
56#define VERSATILE_SYS_LED_OFFSET 0x08
57#define VERSATILE_SYS_OSC0_OFFSET 0x0C
58
59#if defined(CONFIG_ARCH_VERSATILE_PB)
60#define VERSATILE_SYS_OSC1_OFFSET 0x10
61#define VERSATILE_SYS_OSC2_OFFSET 0x14
62#define VERSATILE_SYS_OSC3_OFFSET 0x18
63#define VERSATILE_SYS_OSC4_OFFSET 0x1C
64#elif defined(CONFIG_MACH_VERSATILE_AB)
65#define VERSATILE_SYS_OSC1_OFFSET 0x1C
66#endif
67
68#define VERSATILE_SYS_OSCCLCD_OFFSET 0x1c
69
70#define VERSATILE_SYS_LOCK_OFFSET 0x20
71#define VERSATILE_SYS_100HZ_OFFSET 0x24
72#define VERSATILE_SYS_CFGDATA1_OFFSET 0x28
73#define VERSATILE_SYS_CFGDATA2_OFFSET 0x2C
74#define VERSATILE_SYS_FLAGS_OFFSET 0x30
75#define VERSATILE_SYS_FLAGSSET_OFFSET 0x30
76#define VERSATILE_SYS_FLAGSCLR_OFFSET 0x34
77#define VERSATILE_SYS_NVFLAGS_OFFSET 0x38
78#define VERSATILE_SYS_NVFLAGSSET_OFFSET 0x38
79#define VERSATILE_SYS_NVFLAGSCLR_OFFSET 0x3C
80#define VERSATILE_SYS_RESETCTL_OFFSET 0x40
81#define VERSATILE_SYS_PCICTL_OFFSET 0x44
82#define VERSATILE_SYS_MCI_OFFSET 0x48
83#define VERSATILE_SYS_FLASH_OFFSET 0x4C
84#define VERSATILE_SYS_CLCD_OFFSET 0x50
85#define VERSATILE_SYS_CLCDSER_OFFSET 0x54
86#define VERSATILE_SYS_BOOTCS_OFFSET 0x58
87#define VERSATILE_SYS_24MHz_OFFSET 0x5C
88#define VERSATILE_SYS_MISC_OFFSET 0x60
89#define VERSATILE_SYS_TEST_OSC0_OFFSET 0x80
90#define VERSATILE_SYS_TEST_OSC1_OFFSET 0x84
91#define VERSATILE_SYS_TEST_OSC2_OFFSET 0x88
92#define VERSATILE_SYS_TEST_OSC3_OFFSET 0x8C
93#define VERSATILE_SYS_TEST_OSC4_OFFSET 0x90
94
95#define VERSATILE_SYS_BASE 0x10000000
96#define VERSATILE_SYS_ID (VERSATILE_SYS_BASE + VERSATILE_SYS_ID_OFFSET)
97#define VERSATILE_SYS_SW (VERSATILE_SYS_BASE + VERSATILE_SYS_SW_OFFSET)
98#define VERSATILE_SYS_LED (VERSATILE_SYS_BASE + VERSATILE_SYS_LED_OFFSET)
99#define VERSATILE_SYS_OSC0 (VERSATILE_SYS_BASE + VERSATILE_SYS_OSC0_OFFSET)
100#define VERSATILE_SYS_OSC1 (VERSATILE_SYS_BASE + VERSATILE_SYS_OSC1_OFFSET)
101
102#if defined(CONFIG_ARCH_VERSATILE_PB)
103#define VERSATILE_SYS_OSC2 (VERSATILE_SYS_BASE + VERSATILE_SYS_OSC2_OFFSET)
104#define VERSATILE_SYS_OSC3 (VERSATILE_SYS_BASE + VERSATILE_SYS_OSC3_OFFSET)
105#define VERSATILE_SYS_OSC4 (VERSATILE_SYS_BASE + VERSATILE_SYS_OSC4_OFFSET)
106#endif
107
108#define VERSATILE_SYS_LOCK (VERSATILE_SYS_BASE + VERSATILE_SYS_LOCK_OFFSET)
109#define VERSATILE_SYS_100HZ (VERSATILE_SYS_BASE + VERSATILE_SYS_100HZ_OFFSET)
110#define VERSATILE_SYS_CFGDATA1 (VERSATILE_SYS_BASE + VERSATILE_SYS_CFGDATA1_OFFSET)
111#define VERSATILE_SYS_CFGDATA2 (VERSATILE_SYS_BASE + VERSATILE_SYS_CFGDATA2_OFFSET)
112#define VERSATILE_SYS_FLAGS (VERSATILE_SYS_BASE + VERSATILE_SYS_FLAGS_OFFSET)
113#define VERSATILE_SYS_FLAGSSET (VERSATILE_SYS_BASE + VERSATILE_SYS_FLAGSSET_OFFSET)
114#define VERSATILE_SYS_FLAGSCLR (VERSATILE_SYS_BASE + VERSATILE_SYS_FLAGSCLR_OFFSET)
115#define VERSATILE_SYS_NVFLAGS (VERSATILE_SYS_BASE + VERSATILE_SYS_NVFLAGS_OFFSET)
116#define VERSATILE_SYS_NVFLAGSSET (VERSATILE_SYS_BASE + VERSATILE_SYS_NVFLAGSSET_OFFSET)
117#define VERSATILE_SYS_NVFLAGSCLR (VERSATILE_SYS_BASE + VERSATILE_SYS_NVFLAGSCLR_OFFSET)
118#define VERSATILE_SYS_RESETCTL (VERSATILE_SYS_BASE + VERSATILE_SYS_RESETCTL_OFFSET)
119#define VERSATILE_SYS_PCICTL (VERSATILE_SYS_BASE + VERSATILE_SYS_PCICTL_OFFSET)
120#define VERSATILE_SYS_MCI (VERSATILE_SYS_BASE + VERSATILE_SYS_MCI_OFFSET)
121#define VERSATILE_SYS_FLASH (VERSATILE_SYS_BASE + VERSATILE_SYS_FLASH_OFFSET)
122#define VERSATILE_SYS_CLCD (VERSATILE_SYS_BASE + VERSATILE_SYS_CLCD_OFFSET)
123#define VERSATILE_SYS_CLCDSER (VERSATILE_SYS_BASE + VERSATILE_SYS_CLCDSER_OFFSET)
124#define VERSATILE_SYS_BOOTCS (VERSATILE_SYS_BASE + VERSATILE_SYS_BOOTCS_OFFSET)
125#define VERSATILE_SYS_24MHz (VERSATILE_SYS_BASE + VERSATILE_SYS_24MHz_OFFSET)
126#define VERSATILE_SYS_MISC (VERSATILE_SYS_BASE + VERSATILE_SYS_MISC_OFFSET)
127#define VERSATILE_SYS_TEST_OSC0 (VERSATILE_SYS_BASE + VERSATILE_SYS_TEST_OSC0_OFFSET)
128#define VERSATILE_SYS_TEST_OSC1 (VERSATILE_SYS_BASE + VERSATILE_SYS_TEST_OSC1_OFFSET)
129#define VERSATILE_SYS_TEST_OSC2 (VERSATILE_SYS_BASE + VERSATILE_SYS_TEST_OSC2_OFFSET)
130#define VERSATILE_SYS_TEST_OSC3 (VERSATILE_SYS_BASE + VERSATILE_SYS_TEST_OSC3_OFFSET)
131#define VERSATILE_SYS_TEST_OSC4 (VERSATILE_SYS_BASE + VERSATILE_SYS_TEST_OSC4_OFFSET)
132
133/*
134 * Values for VERSATILE_SYS_RESET_CTRL
135 */
136#define VERSATILE_SYS_CTRL_RESET_CONFIGCLR 0x01
137#define VERSATILE_SYS_CTRL_RESET_CONFIGINIT 0x02
138#define VERSATILE_SYS_CTRL_RESET_DLLRESET 0x03
139#define VERSATILE_SYS_CTRL_RESET_PLLRESET 0x04
140#define VERSATILE_SYS_CTRL_RESET_POR 0x05
141#define VERSATILE_SYS_CTRL_RESET_DoC 0x06
142
143#define VERSATILE_SYS_CTRL_LED (1 << 0)
144
145
146/* ------------------------------------------------------------------------
147 * Versatile control registers
148 * ------------------------------------------------------------------------
149 */
150
151/*
152 * VERSATILE_IDFIELD
153 *
154 * 31:24 = manufacturer (0x41 = ARM)
155 * 23:16 = architecture (0x08 = AHB system bus, ASB processor bus)
156 * 15:12 = FPGA (0x3 = XVC600 or XVC600E)
157 * 11:4 = build value
158 * 3:0 = revision number (0x1 = rev B (AHB))
159 */
160
161/*
162 * VERSATILE_SYS_LOCK
163 * control access to SYS_OSCx, SYS_CFGDATAx, SYS_RESETCTL,
164 * SYS_CLD, SYS_BOOTCS
165 */
166#define VERSATILE_SYS_LOCK_LOCKED (1 << 16)
167#define VERSATILE_SYS_LOCKVAL_MASK 0xFFFF /* write 0xA05F to enable write access */
168
169/*
170 * VERSATILE_SYS_FLASH
171 */
172#define VERSATILE_FLASHPROG_FLVPPEN (1 << 0) /* Enable writing to flash */
173
174/*
175 * VERSATILE_INTREG
176 * - used to acknowledge and control MMCI and UART interrupts
177 */
178#define VERSATILE_INTREG_WPROT 0x00 /* MMC protection status (no interrupt generated) */
179#define VERSATILE_INTREG_RI0 0x01 /* Ring indicator UART0 is asserted, */
180#define VERSATILE_INTREG_CARDIN 0x08 /* MMCI card in detect */
181 /* write 1 to acknowledge and clear */
182#define VERSATILE_INTREG_RI1 0x02 /* Ring indicator UART1 is asserted, */
183#define VERSATILE_INTREG_CARDINSERT 0x03 /* Signal insertion of MMC card */
184
185/*
186 * VERSATILE peripheral addresses
187 */
188#define VERSATILE_PCI_CORE_BASE 0x10001000 /* PCI core control */
189#define VERSATILE_I2C_BASE 0x10002000 /* I2C control */
190#define VERSATILE_SIC_BASE 0x10003000 /* Secondary interrupt controller */
191#define VERSATILE_AACI_BASE 0x10004000 /* Audio */
192#define VERSATILE_MMCI0_BASE 0x10005000 /* MMC interface */
193#define VERSATILE_KMI0_BASE 0x10006000 /* KMI interface */
194#define VERSATILE_KMI1_BASE 0x10007000 /* KMI 2nd interface */
195#define VERSATILE_CHAR_LCD_BASE 0x10008000 /* Character LCD */
196#define VERSATILE_UART3_BASE 0x10009000 /* UART 3 */
197#define VERSATILE_SCI1_BASE 0x1000A000
198#define VERSATILE_MMCI1_BASE 0x1000B000 /* MMC Interface */
199 /* 0x1000C000 - 0x1000CFFF = reserved */
200#define VERSATILE_ETH_BASE 0x10010000 /* Ethernet */
201#define VERSATILE_USB_BASE 0x10020000 /* USB */
202 /* 0x10030000 - 0x100FFFFF = reserved */
203#define VERSATILE_SMC_BASE 0x10100000 /* SMC */
204#define VERSATILE_MPMC_BASE 0x10110000 /* MPMC */
205#define VERSATILE_CLCD_BASE 0x10120000 /* CLCD */
206#define VERSATILE_DMAC_BASE 0x10130000 /* DMA controller */
207#define VERSATILE_VIC_BASE 0x10140000 /* Vectored interrupt controller */
208#define VERSATILE_PERIPH_BASE 0x10150000 /* off-chip peripherals alias from */
209 /* 0x10000000 - 0x100FFFFF */
210#define VERSATILE_AHBM_BASE 0x101D0000 /* AHB monitor */
211#define VERSATILE_SCTL_BASE 0x101E0000 /* System controller */
212#define VERSATILE_WATCHDOG_BASE 0x101E1000 /* Watchdog */
213#define VERSATILE_TIMER0_1_BASE 0x101E2000 /* Timer 0 and 1 */
214#define VERSATILE_TIMER2_3_BASE 0x101E3000 /* Timer 2 and 3 */
215#define VERSATILE_GPIO0_BASE 0x101E4000 /* GPIO port 0 */
216#define VERSATILE_GPIO1_BASE 0x101E5000 /* GPIO port 1 */
217#define VERSATILE_GPIO2_BASE 0x101E6000 /* GPIO port 2 */
218#define VERSATILE_GPIO3_BASE 0x101E7000 /* GPIO port 3 */
219#define VERSATILE_RTC_BASE 0x101E8000 /* Real Time Clock */
220 /* 0x101E9000 - reserved */
221#define VERSATILE_SCI_BASE 0x101F0000 /* Smart card controller */
222#define VERSATILE_UART0_BASE 0x101F1000 /* Uart 0 */
223#define VERSATILE_UART1_BASE 0x101F2000 /* Uart 1 */
224#define VERSATILE_UART2_BASE 0x101F3000 /* Uart 2 */
225#define VERSATILE_SSP_BASE 0x101F4000 /* Synchronous Serial Port */
226
227#define VERSATILE_SSMC_BASE 0x20000000 /* SSMC */
228#define VERSATILE_IB2_BASE 0x24000000 /* IB2 module */
229#define VERSATILE_MBX_BASE 0x40000000 /* MBX */
230
231/* PCI space */
232#define VERSATILE_PCI_BASE 0x41000000 /* PCI Interface */
233#define VERSATILE_PCI_CFG_BASE 0x42000000
234#define VERSATILE_PCI_MEM_BASE0 0x44000000
235#define VERSATILE_PCI_MEM_BASE1 0x50000000
236#define VERSATILE_PCI_MEM_BASE2 0x60000000
237/* Sizes of above maps */
238#define VERSATILE_PCI_BASE_SIZE 0x01000000
239#define VERSATILE_PCI_CFG_BASE_SIZE 0x02000000
240#define VERSATILE_PCI_MEM_BASE0_SIZE 0x0c000000 /* 32Mb */
241#define VERSATILE_PCI_MEM_BASE1_SIZE 0x10000000 /* 256Mb */
242#define VERSATILE_PCI_MEM_BASE2_SIZE 0x10000000 /* 256Mb */
243
244#define VERSATILE_SDRAM67_BASE 0x70000000 /* SDRAM banks 6 and 7 */
245#define VERSATILE_LT_BASE 0x80000000 /* Logic Tile expansion */
246
247/*
248 * Disk on Chip
249 */
250#define VERSATILE_DOC_BASE 0x2C000000
251#define VERSATILE_DOC_SIZE (16 << 20)
252#define VERSATILE_DOC_PAGE_SIZE 512
253#define VERSATILE_DOC_TOTAL_PAGES (DOC_SIZE / PAGE_SIZE)
254
255#define ERASE_UNIT_PAGES 32
256#define START_PAGE 0x80
257
258/*
259 * LED settings, bits [7:0]
260 */
261#define VERSATILE_SYS_LED0 (1 << 0)
262#define VERSATILE_SYS_LED1 (1 << 1)
263#define VERSATILE_SYS_LED2 (1 << 2)
264#define VERSATILE_SYS_LED3 (1 << 3)
265#define VERSATILE_SYS_LED4 (1 << 4)
266#define VERSATILE_SYS_LED5 (1 << 5)
267#define VERSATILE_SYS_LED6 (1 << 6)
268#define VERSATILE_SYS_LED7 (1 << 7)
269
270#define ALL_LEDS 0xFF
271
272#define LED_BANK VERSATILE_SYS_LED
273
274/*
275 * Control registers
276 */
277#define VERSATILE_IDFIELD_OFFSET 0x0 /* Versatile build information */
278#define VERSATILE_FLASHPROG_OFFSET 0x4 /* Flash devices */
279#define VERSATILE_INTREG_OFFSET 0x8 /* Interrupt control */
280#define VERSATILE_DECODE_OFFSET 0xC /* Fitted logic modules */
281
282
283/* ------------------------------------------------------------------------
284 * Versatile Interrupt Controller - control registers
285 * ------------------------------------------------------------------------
286 *
287 * Offsets from interrupt controller base
288 *
289 * System Controller interrupt controller base is
290 *
291 * VERSATILE_IC_BASE
292 *
293 * Core Module interrupt controller base is
294 *
295 * VERSATILE_SYS_IC
296 *
297 */
298/* VIC definitions in include/asm-arm/hardware/vic.h */
299
300#define SIC_IRQ_STATUS 0
301#define SIC_IRQ_RAW_STATUS 0x04
302#define SIC_IRQ_ENABLE 0x08
303#define SIC_IRQ_ENABLE_SET 0x08
304#define SIC_IRQ_ENABLE_CLEAR 0x0C
305#define SIC_INT_SOFT_SET 0x10
306#define SIC_INT_SOFT_CLEAR 0x14
307#define SIC_INT_PIC_ENABLE 0x20 /* read status of pass through mask */
308#define SIC_INT_PIC_ENABLES 0x20 /* set interrupt pass through bits */
309#define SIC_INT_PIC_ENABLEC 0x24 /* Clear interrupt pass through bits */
310
311/* ------------------------------------------------------------------------
312 * Interrupts - bit assignment (primary)
313 * ------------------------------------------------------------------------
314 */
315
316#define INT_WDOGINT 0 /* Watchdog timer */
317#define INT_SOFTINT 1 /* Software interrupt */
318#define INT_COMMRx 2 /* Debug Comm Rx interrupt */
319#define INT_COMMTx 3 /* Debug Comm Tx interrupt */
320#define INT_TIMERINT0_1 4 /* Timer 0 and 1 */
321#define INT_TIMERINT2_3 5 /* Timer 2 and 3 */
322#define INT_GPIOINT0 6 /* GPIO 0 */
323#define INT_GPIOINT1 7 /* GPIO 1 */
324#define INT_GPIOINT2 8 /* GPIO 2 */
325#define INT_GPIOINT3 9 /* GPIO 3 */
326#define INT_RTCINT 10 /* Real Time Clock */
327#define INT_SSPINT 11 /* Synchronous Serial Port */
328#define INT_UARTINT0 12 /* UART 0 on development chip */
329#define INT_UARTINT1 13 /* UART 1 on development chip */
330#define INT_UARTINT2 14 /* UART 2 on development chip */
331#define INT_SCIINT 15 /* Smart Card Interface */
332#define INT_CLCDINT 16 /* CLCD controller */
333#define INT_DMAINT 17 /* DMA controller */
334#define INT_PWRFAILINT 18 /* Power failure */
335#define INT_MBXINT 19 /* Graphics processor */
336#define INT_GNDINT 20 /* Reserved */
337 /* External interrupt signals from logic tiles or secondary controller */
338#define INT_VICSOURCE21 21 /* Disk on Chip */
339#define INT_VICSOURCE22 22 /* MCI0A */
340#define INT_VICSOURCE23 23 /* MCI1A */
341#define INT_VICSOURCE24 24 /* AACI */
342#define INT_VICSOURCE25 25 /* Ethernet */
343#define INT_VICSOURCE26 26 /* USB */
344#define INT_VICSOURCE27 27 /* PCI 0 */
345#define INT_VICSOURCE28 28 /* PCI 1 */
346#define INT_VICSOURCE29 29 /* PCI 2 */
347#define INT_VICSOURCE30 30 /* PCI 3 */
348#define INT_VICSOURCE31 31 /* SIC source */
349
350/*
351 * Interrupt bit positions
352 *
353 */
354#define INTMASK_WDOGINT (1 << INT_WDOGINT)
355#define INTMASK_SOFTINT (1 << INT_SOFTINT)
356#define INTMASK_COMMRx (1 << INT_COMMRx)
357#define INTMASK_COMMTx (1 << INT_COMMTx)
358#define INTMASK_TIMERINT0_1 (1 << INT_TIMERINT0_1)
359#define INTMASK_TIMERINT2_3 (1 << INT_TIMERINT2_3)
360#define INTMASK_GPIOINT0 (1 << INT_GPIOINT0)
361#define INTMASK_GPIOINT1 (1 << INT_GPIOINT1)
362#define INTMASK_GPIOINT2 (1 << INT_GPIOINT2)
363#define INTMASK_GPIOINT3 (1 << INT_GPIOINT3)
364#define INTMASK_RTCINT (1 << INT_RTCINT)
365#define INTMASK_SSPINT (1 << INT_SSPINT)
366#define INTMASK_UARTINT0 (1 << INT_UARTINT0)
367#define INTMASK_UARTINT1 (1 << INT_UARTINT1)
368#define INTMASK_UARTINT2 (1 << INT_UARTINT2)
369#define INTMASK_SCIINT (1 << INT_SCIINT)
370#define INTMASK_CLCDINT (1 << INT_CLCDINT)
371#define INTMASK_DMAINT (1 << INT_DMAINT)
372#define INTMASK_PWRFAILINT (1 << INT_PWRFAILINT)
373#define INTMASK_MBXINT (1 << INT_MBXINT)
374#define INTMASK_GNDINT (1 << INT_GNDINT)
375#define INTMASK_VICSOURCE21 (1 << INT_VICSOURCE21)
376#define INTMASK_VICSOURCE22 (1 << INT_VICSOURCE22)
377#define INTMASK_VICSOURCE23 (1 << INT_VICSOURCE23)
378#define INTMASK_VICSOURCE24 (1 << INT_VICSOURCE24)
379#define INTMASK_VICSOURCE25 (1 << INT_VICSOURCE25)
380#define INTMASK_VICSOURCE26 (1 << INT_VICSOURCE26)
381#define INTMASK_VICSOURCE27 (1 << INT_VICSOURCE27)
382#define INTMASK_VICSOURCE28 (1 << INT_VICSOURCE28)
383#define INTMASK_VICSOURCE29 (1 << INT_VICSOURCE29)
384#define INTMASK_VICSOURCE30 (1 << INT_VICSOURCE30)
385#define INTMASK_VICSOURCE31 (1 << INT_VICSOURCE31)
386
387
388#define VERSATILE_SC_VALID_INT 0x003FFFFF
389
390#define MAXIRQNUM 31
391#define MAXFIQNUM 31
392#define MAXSWINUM 31
393
394/* ------------------------------------------------------------------------
395 * Interrupts - bit assignment (secondary)
396 * ------------------------------------------------------------------------
397 */
398#define SIC_INT_MMCI0B 1 /* Multimedia Card 0B */
399#define SIC_INT_MMCI1B 2 /* Multimedia Card 1B */
400#define SIC_INT_KMI0 3 /* Keyboard/Mouse port 0 */
401#define SIC_INT_KMI1 4 /* Keyboard/Mouse port 1 */
402#define SIC_INT_SCI3 5 /* Smart Card interface */
403#define SIC_INT_UART3 6 /* UART 3 empty or data available */
404#define SIC_INT_CLCD 7 /* Character LCD */
405#define SIC_INT_TOUCH 8 /* Touchscreen */
406#define SIC_INT_KEYPAD 9 /* Key pressed on display keypad */
407 /* 10:20 - reserved */
408#define SIC_INT_DoC 21 /* Disk on Chip memory controller */
409#define SIC_INT_MMCI0A 22 /* MMC 0A */
410#define SIC_INT_MMCI1A 23 /* MMC 1A */
411#define SIC_INT_AACI 24 /* Audio Codec */
412#define SIC_INT_ETH 25 /* Ethernet controller */
413#define SIC_INT_USB 26 /* USB controller */
414#define SIC_INT_PCI0 27
415#define SIC_INT_PCI1 28
416#define SIC_INT_PCI2 29
417#define SIC_INT_PCI3 30
418
419
420#define SIC_INTMASK_MMCI0B (1 << SIC_INT_MMCI0B)
421#define SIC_INTMASK_MMCI1B (1 << SIC_INT_MMCI1B)
422#define SIC_INTMASK_KMI0 (1 << SIC_INT_KMI0)
423#define SIC_INTMASK_KMI1 (1 << SIC_INT_KMI1)
424#define SIC_INTMASK_SCI3 (1 << SIC_INT_SCI3)
425#define SIC_INTMASK_UART3 (1 << SIC_INT_UART3)
426#define SIC_INTMASK_CLCD (1 << SIC_INT_CLCD)
427#define SIC_INTMASK_TOUCH (1 << SIC_INT_TOUCH)
428#define SIC_INTMASK_KEYPAD (1 << SIC_INT_KEYPAD)
429#define SIC_INTMASK_DoC (1 << SIC_INT_DoC)
430#define SIC_INTMASK_MMCI0A (1 << SIC_INT_MMCI0A)
431#define SIC_INTMASK_MMCI1A (1 << SIC_INT_MMCI1A)
432#define SIC_INTMASK_AACI (1 << SIC_INT_AACI)
433#define SIC_INTMASK_ETH (1 << SIC_INT_ETH)
434#define SIC_INTMASK_USB (1 << SIC_INT_USB)
435#define SIC_INTMASK_PCI0 (1 << SIC_INT_PCI0)
436#define SIC_INTMASK_PCI1 (1 << SIC_INT_PCI1)
437#define SIC_INTMASK_PCI2 (1 << SIC_INT_PCI2)
438#define SIC_INTMASK_PCI3 (1 << SIC_INT_PCI3)
439/*
440 * Application Flash
441 *
442 */
443#define FLASH_BASE VERSATILE_FLASH_BASE
444#define FLASH_SIZE VERSATILE_FLASH_SIZE
445#define FLASH_END (FLASH_BASE + FLASH_SIZE - 1)
446#define FLASH_BLOCK_SIZE SZ_128K
447
448/*
449 * Boot Flash
450 *
451 */
452#define EPROM_BASE VERSATILE_BOOT_ROM_HI
453#define EPROM_SIZE VERSATILE_BOOT_ROM_SIZE
454#define EPROM_END (EPROM_BASE + EPROM_SIZE - 1)
455
456/*
457 * Clean base - dummy
458 *
459 */
460#define CLEAN_BASE EPROM_BASE
461
462/*
463 * System controller bit assignment
464 */
465#define VERSATILE_REFCLK 0
466#define VERSATILE_TIMCLK 1
467
468#define VERSATILE_TIMER1_EnSel 15
469#define VERSATILE_TIMER2_EnSel 17
470#define VERSATILE_TIMER3_EnSel 19
471#define VERSATILE_TIMER4_EnSel 21
472
473
474#define MAX_TIMER 2
475#define MAX_PERIOD 699050
476#define TICKS_PER_uSEC 1
477
478/*
479 * These are useconds NOT ticks.
480 *
481 */
482#define mSEC_1 1000
483#define mSEC_5 (mSEC_1 * 5)
484#define mSEC_10 (mSEC_1 * 10)
485#define mSEC_25 (mSEC_1 * 25)
486#define SEC_1 (mSEC_1 * 1000)
487
488#define VERSATILE_CSR_BASE 0x10000000
489#define VERSATILE_CSR_SIZE 0x10000000
490
491#ifdef CONFIG_MACH_VERSATILE_AB
492/*
493 * IB2 Versatile/AB expansion board definitions
494 */
495#define VERSATILE_IB2_CAMERA_BANK VERSATILE_IB2_BASE
496#define VERSATILE_IB2_KBD_DATAREG (VERSATILE_IB2_BASE + 0x01000000)
497
498/* VICINTSOURCE27 */
499#define VERSATILE_IB2_INT_BASE (VERSATILE_IB2_BASE + 0x02000000)
500#define VERSATILE_IB2_IER (VERSATILE_IB2_INT_BASE + 0)
501#define VERSATILE_IB2_ISR (VERSATILE_IB2_INT_BASE + 4)
502
503#define VERSATILE_IB2_CTL_BASE (VERSATILE_IB2_BASE + 0x03000000)
504#define VERSATILE_IB2_CTRL (VERSATILE_IB2_CTL_BASE + 0)
505#define VERSATILE_IB2_STAT (VERSATILE_IB2_CTL_BASE + 4)
506#endif
507
508#endif
509
510/* END */
diff --git a/include/asm-arm/arch-versatile/system.h b/include/asm-arm/arch-versatile/system.h
deleted file mode 100644
index 71c6254c0d9b..000000000000
--- a/include/asm-arm/arch-versatile/system.h
+++ /dev/null
@@ -1,49 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-versatile/system.h
3 *
4 * Copyright (C) 2003 ARM Limited
5 * Copyright (C) 2000 Deep Blue Solutions Ltd
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
21#ifndef __ASM_ARCH_SYSTEM_H
22#define __ASM_ARCH_SYSTEM_H
23
24#include <asm/hardware.h>
25#include <asm/io.h>
26#include <asm/arch/platform.h>
27
28static inline void arch_idle(void)
29{
30 /*
31 * This should do all the clock switching
32 * and wait for interrupt tricks
33 */
34 cpu_do_idle();
35}
36
37static inline void arch_reset(char mode)
38{
39 u32 val;
40
41 val = __raw_readl(IO_ADDRESS(VERSATILE_SYS_RESETCTL)) & ~0x7;
42 val |= 0x105;
43
44 __raw_writel(0xa05f, IO_ADDRESS(VERSATILE_SYS_LOCK));
45 __raw_writel(val, IO_ADDRESS(VERSATILE_SYS_RESETCTL));
46 __raw_writel(0, IO_ADDRESS(VERSATILE_SYS_LOCK));
47}
48
49#endif
diff --git a/include/asm-arm/arch-versatile/timex.h b/include/asm-arm/arch-versatile/timex.h
deleted file mode 100644
index 38fd04fc9141..000000000000
--- a/include/asm-arm/arch-versatile/timex.h
+++ /dev/null
@@ -1,23 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-versatile/timex.h
3 *
4 * Versatile architecture timex specifications
5 *
6 * Copyright (C) 2003 ARM Limited
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 */
22
23#define CLOCK_TICK_RATE (50000000 / 16)
diff --git a/include/asm-arm/arch-versatile/uncompress.h b/include/asm-arm/arch-versatile/uncompress.h
deleted file mode 100644
index 7215133d0514..000000000000
--- a/include/asm-arm/arch-versatile/uncompress.h
+++ /dev/null
@@ -1,46 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-versatile/uncompress.h
3 *
4 * Copyright (C) 2003 ARM Limited
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20#define AMBA_UART_DR (*(volatile unsigned char *)0x101F1000)
21#define AMBA_UART_LCRH (*(volatile unsigned char *)0x101F102C)
22#define AMBA_UART_CR (*(volatile unsigned char *)0x101F1030)
23#define AMBA_UART_FR (*(volatile unsigned char *)0x101F1018)
24
25/*
26 * This does not append a newline
27 */
28static inline void putc(int c)
29{
30 while (AMBA_UART_FR & (1 << 5))
31 barrier();
32
33 AMBA_UART_DR = c;
34}
35
36static inline void flush(void)
37{
38 while (AMBA_UART_FR & (1 << 3))
39 barrier();
40}
41
42/*
43 * nothing to do
44 */
45#define arch_decomp_setup()
46#define arch_decomp_wdog()
diff --git a/include/asm-arm/arch-versatile/vmalloc.h b/include/asm-arm/arch-versatile/vmalloc.h
deleted file mode 100644
index ac780df62156..000000000000
--- a/include/asm-arm/arch-versatile/vmalloc.h
+++ /dev/null
@@ -1,21 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-versatile/vmalloc.h
3 *
4 * Copyright (C) 2003 ARM Limited
5 * Copyright (C) 2000 Russell King.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
21#define VMALLOC_END (PAGE_OFFSET + 0x18000000)
diff --git a/include/asm-arm/plat-s3c/iic.h b/include/asm-arm/plat-s3c/iic.h
index d08a1f2863e4..5106acaa1d0e 100644
--- a/include/asm-arm/plat-s3c/iic.h
+++ b/include/asm-arm/plat-s3c/iic.h
@@ -1,4 +1,4 @@
1/* linux/include/asm-arm/arch-s3c2410/iic.h 1/* arch/arm/mach-s3c2410/include/mach/iic.h
2 * 2 *
3 * Copyright (c) 2004 Simtec Electronics 3 * Copyright (c) 2004 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk> 4 * Ben Dooks <ben@simtec.co.uk>
diff --git a/include/asm-arm/plat-s3c/nand.h b/include/asm-arm/plat-s3c/nand.h
index ad6bbe90616e..f4dcd14af059 100644
--- a/include/asm-arm/plat-s3c/nand.h
+++ b/include/asm-arm/plat-s3c/nand.h
@@ -1,4 +1,4 @@
1/* linux/include/asm-arm/arch-s3c2410/nand.h 1/* arch/arm/mach-s3c2410/include/mach/nand.h
2 * 2 *
3 * Copyright (c) 2004 Simtec Electronics 3 * Copyright (c) 2004 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk> 4 * Ben Dooks <ben@simtec.co.uk>
diff --git a/include/asm-arm/plat-s3c/regs-ac97.h b/include/asm-arm/plat-s3c/regs-ac97.h
index b004dee6bcaf..c3878f7acb83 100644
--- a/include/asm-arm/plat-s3c/regs-ac97.h
+++ b/include/asm-arm/plat-s3c/regs-ac97.h
@@ -1,4 +1,4 @@
1/* linux/include/asm-arm/arch-s3c2410/regs-ac97.h 1/* arch/arm/mach-s3c2410/include/mach/regs-ac97.h
2 * 2 *
3 * Copyright (c) 2006 Simtec Electronics <linux@simtec.co.uk> 3 * Copyright (c) 2006 Simtec Electronics <linux@simtec.co.uk>
4 * http://www.simtec.co.uk/products/SWLINUX/ 4 * http://www.simtec.co.uk/products/SWLINUX/
diff --git a/include/asm-arm/plat-s3c/regs-adc.h b/include/asm-arm/plat-s3c/regs-adc.h
index c7f231963e76..4323cccc86cd 100644
--- a/include/asm-arm/plat-s3c/regs-adc.h
+++ b/include/asm-arm/plat-s3c/regs-adc.h
@@ -1,4 +1,4 @@
1/* linux/include/asm-arm/arch-s3c2410/regs-adc.h 1/* arch/arm/mach-s3c2410/include/mach/regs-adc.h
2 * 2 *
3 * Copyright (c) 2004 Shannon Holland <holland@loser.net> 3 * Copyright (c) 2004 Shannon Holland <holland@loser.net>
4 * 4 *
diff --git a/include/asm-arm/plat-s3c/regs-iic.h b/include/asm-arm/plat-s3c/regs-iic.h
index 2ae29522f253..2f7c17de8ac8 100644
--- a/include/asm-arm/plat-s3c/regs-iic.h
+++ b/include/asm-arm/plat-s3c/regs-iic.h
@@ -1,4 +1,4 @@
1/* linux/include/asm-arm/arch-s3c2410/regs-iic.h 1/* arch/arm/mach-s3c2410/include/mach/regs-iic.h
2 * 2 *
3 * Copyright (c) 2004 Simtec Electronics <linux@simtec.co.uk> 3 * Copyright (c) 2004 Simtec Electronics <linux@simtec.co.uk>
4 * http://www.simtec.co.uk/products/SWLINUX/ 4 * http://www.simtec.co.uk/products/SWLINUX/
diff --git a/include/asm-arm/plat-s3c/regs-nand.h b/include/asm-arm/plat-s3c/regs-nand.h
index d742205ac172..09f0b5503f5b 100644
--- a/include/asm-arm/plat-s3c/regs-nand.h
+++ b/include/asm-arm/plat-s3c/regs-nand.h
@@ -1,4 +1,4 @@
1/* linux/include/asm-arm/arch-s3c2410/regs-nand.h 1/* arch/arm/mach-s3c2410/include/mach/regs-nand.h
2 * 2 *
3 * Copyright (c) 2004,2005 Simtec Electronics <linux@simtec.co.uk> 3 * Copyright (c) 2004,2005 Simtec Electronics <linux@simtec.co.uk>
4 * http://www.simtec.co.uk/products/SWLINUX/ 4 * http://www.simtec.co.uk/products/SWLINUX/
diff --git a/include/asm-arm/plat-s3c/regs-rtc.h b/include/asm-arm/plat-s3c/regs-rtc.h
index 93b03c49710a..d5837cf8e402 100644
--- a/include/asm-arm/plat-s3c/regs-rtc.h
+++ b/include/asm-arm/plat-s3c/regs-rtc.h
@@ -1,4 +1,4 @@
1/* linux/include/asm-arm/arch-s3c2410/regs-rtc.h 1/* arch/arm/mach-s3c2410/include/mach/regs-rtc.h
2 * 2 *
3 * Copyright (c) 2003 Simtec Electronics <linux@simtec.co.uk> 3 * Copyright (c) 2003 Simtec Electronics <linux@simtec.co.uk>
4 * http://www.simtec.co.uk/products/SWLINUX/ 4 * http://www.simtec.co.uk/products/SWLINUX/
diff --git a/include/asm-arm/plat-s3c/regs-serial.h b/include/asm-arm/plat-s3c/regs-serial.h
index 923e114db663..a0daa647b92c 100644
--- a/include/asm-arm/plat-s3c/regs-serial.h
+++ b/include/asm-arm/plat-s3c/regs-serial.h
@@ -1,4 +1,4 @@
1/* linux/include/asm-arm/arch-s3c2410/regs-serial.h 1/* arch/arm/mach-s3c2410/include/mach/regs-serial.h
2 * 2 *
3 * From linux/include/asm-arm/hardware/serial_s3c2410.h 3 * From linux/include/asm-arm/hardware/serial_s3c2410.h
4 * 4 *
diff --git a/include/asm-arm/plat-s3c/regs-timer.h b/include/asm-arm/plat-s3c/regs-timer.h
index b5bc692f3489..b4366ea39677 100644
--- a/include/asm-arm/plat-s3c/regs-timer.h
+++ b/include/asm-arm/plat-s3c/regs-timer.h
@@ -1,4 +1,4 @@
1/* linux/include/asm-arm/arch-s3c2410/regs-timer.h 1/* arch/arm/mach-s3c2410/include/mach/regs-timer.h
2 * 2 *
3 * Copyright (c) 2003 Simtec Electronics <linux@simtec.co.uk> 3 * Copyright (c) 2003 Simtec Electronics <linux@simtec.co.uk>
4 * http://www.simtec.co.uk/products/SWLINUX/ 4 * http://www.simtec.co.uk/products/SWLINUX/
diff --git a/include/asm-arm/plat-s3c/regs-watchdog.h b/include/asm-arm/plat-s3c/regs-watchdog.h
index 56c4193b7a46..1229f076c0a0 100644
--- a/include/asm-arm/plat-s3c/regs-watchdog.h
+++ b/include/asm-arm/plat-s3c/regs-watchdog.h
@@ -1,4 +1,4 @@
1/* linux/include/asm-arm/arch-s3c2410/regs-watchdog.h 1/* arch/arm/mach-s3c2410/include/mach/regs-watchdog.h
2 * 2 *
3 * Copyright (c) 2003 Simtec Electronics <linux@simtec.co.uk> 3 * Copyright (c) 2003 Simtec Electronics <linux@simtec.co.uk>
4 * http://www.simtec.co.uk/products/SWLINUX/ 4 * http://www.simtec.co.uk/products/SWLINUX/
diff --git a/include/asm-arm/plat-s3c24xx/regs-iis.h b/include/asm-arm/plat-s3c24xx/regs-iis.h
index eaf77916a602..a6f1d5df13b4 100644
--- a/include/asm-arm/plat-s3c24xx/regs-iis.h
+++ b/include/asm-arm/plat-s3c24xx/regs-iis.h
@@ -1,4 +1,4 @@
1/* linux/include/asm-arm/arch-s3c2410/regs-iis.h 1/* arch/arm/mach-s3c2410/include/mach/regs-iis.h
2 * 2 *
3 * Copyright (c) 2003 Simtec Electronics <linux@simtec.co.uk> 3 * Copyright (c) 2003 Simtec Electronics <linux@simtec.co.uk>
4 * http://www.simtec.co.uk/products/SWLINUX/ 4 * http://www.simtec.co.uk/products/SWLINUX/
diff --git a/include/asm-arm/plat-s3c24xx/regs-spi.h b/include/asm-arm/plat-s3c24xx/regs-spi.h
index ea565b007d04..2b35479ee35c 100644
--- a/include/asm-arm/plat-s3c24xx/regs-spi.h
+++ b/include/asm-arm/plat-s3c24xx/regs-spi.h
@@ -1,4 +1,4 @@
1/* linux/include/asm-arm/arch-s3c2410/regs-spi.h 1/* arch/arm/mach-s3c2410/include/mach/regs-spi.h
2 * 2 *
3 * Copyright (c) 2004 Fetron GmbH 3 * Copyright (c) 2004 Fetron GmbH
4 * 4 *
diff --git a/include/asm-arm/plat-s3c24xx/regs-udc.h b/include/asm-arm/plat-s3c24xx/regs-udc.h
index e1e9805d2d9a..f0dd4a41b37b 100644
--- a/include/asm-arm/plat-s3c24xx/regs-udc.h
+++ b/include/asm-arm/plat-s3c24xx/regs-udc.h
@@ -1,4 +1,4 @@
1/* linux/include/asm-arm/arch-s3c2410/regs-udc.h 1/* arch/arm/mach-s3c2410/include/mach/regs-udc.h
2 * 2 *
3 * Copyright (C) 2004 Herbert Poetzl <herbert@13thfloor.at> 3 * Copyright (C) 2004 Herbert Poetzl <herbert@13thfloor.at>
4 * 4 *
diff --git a/include/asm-arm/plat-s3c24xx/udc.h b/include/asm-arm/plat-s3c24xx/udc.h
index b8aa6cb69b58..546bb4008f49 100644
--- a/include/asm-arm/plat-s3c24xx/udc.h
+++ b/include/asm-arm/plat-s3c24xx/udc.h
@@ -1,4 +1,4 @@
1/* linux/include/asm-arm/arch-s3c2410/udc.h 1/* arch/arm/mach-s3c2410/include/mach/udc.h
2 * 2 *
3 * Copyright (c) 2005 Arnaud Patard <arnaud.patard@rtp-net.org> 3 * Copyright (c) 2005 Arnaud Patard <arnaud.patard@rtp-net.org>
4 * 4 *
diff --git a/include/asm-avr32/arch-at32ap/at32ap700x.h b/include/asm-avr32/arch-at32ap/at32ap700x.h
deleted file mode 100644
index d18a3053be0d..000000000000
--- a/include/asm-avr32/arch-at32ap/at32ap700x.h
+++ /dev/null
@@ -1,49 +0,0 @@
1/*
2 * Pin definitions for AT32AP7000.
3 *
4 * Copyright (C) 2006 Atmel Corporation
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10#ifndef __ASM_ARCH_AT32AP700X_H__
11#define __ASM_ARCH_AT32AP700X_H__
12
13#define GPIO_PERIPH_A 0
14#define GPIO_PERIPH_B 1
15
16/*
17 * Pin numbers identifying specific GPIO pins on the chip. They can
18 * also be converted to IRQ numbers by passing them through
19 * gpio_to_irq().
20 */
21#define GPIO_PIOA_BASE (0)
22#define GPIO_PIOB_BASE (GPIO_PIOA_BASE + 32)
23#define GPIO_PIOC_BASE (GPIO_PIOB_BASE + 32)
24#define GPIO_PIOD_BASE (GPIO_PIOC_BASE + 32)
25#define GPIO_PIOE_BASE (GPIO_PIOD_BASE + 32)
26
27#define GPIO_PIN_PA(N) (GPIO_PIOA_BASE + (N))
28#define GPIO_PIN_PB(N) (GPIO_PIOB_BASE + (N))
29#define GPIO_PIN_PC(N) (GPIO_PIOC_BASE + (N))
30#define GPIO_PIN_PD(N) (GPIO_PIOD_BASE + (N))
31#define GPIO_PIN_PE(N) (GPIO_PIOE_BASE + (N))
32
33
34/*
35 * DMAC peripheral hardware handshaking interfaces, used with dw_dmac
36 */
37#define DMAC_MCI_RX 0
38#define DMAC_MCI_TX 1
39#define DMAC_DAC_TX 2
40#define DMAC_AC97_A_RX 3
41#define DMAC_AC97_A_TX 4
42#define DMAC_AC97_B_RX 5
43#define DMAC_AC97_B_TX 6
44#define DMAC_DMAREQ_0 7
45#define DMAC_DMAREQ_1 8
46#define DMAC_DMAREQ_2 9
47#define DMAC_DMAREQ_3 10
48
49#endif /* __ASM_ARCH_AT32AP700X_H__ */
diff --git a/include/asm-avr32/gpio.h b/include/asm-avr32/gpio.h
deleted file mode 100644
index 19e8ccc77db3..000000000000
--- a/include/asm-avr32/gpio.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __ASM_AVR32_GPIO_H
2#define __ASM_AVR32_GPIO_H
3
4#include <asm/arch/gpio.h>
5
6#endif /* __ASM_AVR32_GPIO_H */
diff --git a/include/asm-avr32/io.h b/include/asm-avr32/io.h
deleted file mode 100644
index 8be7ea9c9047..000000000000
--- a/include/asm-avr32/io.h
+++ /dev/null
@@ -1,312 +0,0 @@
1#ifndef __ASM_AVR32_IO_H
2#define __ASM_AVR32_IO_H
3
4#include <linux/kernel.h>
5#include <linux/string.h>
6#include <linux/types.h>
7
8#include <asm/addrspace.h>
9#include <asm/byteorder.h>
10
11#include <asm/arch/io.h>
12
13/* virt_to_phys will only work when address is in P1 or P2 */
14static __inline__ unsigned long virt_to_phys(volatile void *address)
15{
16 return PHYSADDR(address);
17}
18
19static __inline__ void * phys_to_virt(unsigned long address)
20{
21 return (void *)P1SEGADDR(address);
22}
23
24#define cached_to_phys(addr) ((unsigned long)PHYSADDR(addr))
25#define uncached_to_phys(addr) ((unsigned long)PHYSADDR(addr))
26#define phys_to_cached(addr) ((void *)P1SEGADDR(addr))
27#define phys_to_uncached(addr) ((void *)P2SEGADDR(addr))
28
29/*
30 * Generic IO read/write. These perform native-endian accesses. Note
31 * that some architectures will want to re-define __raw_{read,write}w.
32 */
33extern void __raw_writesb(void __iomem *addr, const void *data, int bytelen);
34extern void __raw_writesw(void __iomem *addr, const void *data, int wordlen);
35extern void __raw_writesl(void __iomem *addr, const void *data, int longlen);
36
37extern void __raw_readsb(const void __iomem *addr, void *data, int bytelen);
38extern void __raw_readsw(const void __iomem *addr, void *data, int wordlen);
39extern void __raw_readsl(const void __iomem *addr, void *data, int longlen);
40
41static inline void __raw_writeb(u8 v, volatile void __iomem *addr)
42{
43 *(volatile u8 __force *)addr = v;
44}
45static inline void __raw_writew(u16 v, volatile void __iomem *addr)
46{
47 *(volatile u16 __force *)addr = v;
48}
49static inline void __raw_writel(u32 v, volatile void __iomem *addr)
50{
51 *(volatile u32 __force *)addr = v;
52}
53
54static inline u8 __raw_readb(const volatile void __iomem *addr)
55{
56 return *(const volatile u8 __force *)addr;
57}
58static inline u16 __raw_readw(const volatile void __iomem *addr)
59{
60 return *(const volatile u16 __force *)addr;
61}
62static inline u32 __raw_readl(const volatile void __iomem *addr)
63{
64 return *(const volatile u32 __force *)addr;
65}
66
67/* Convert I/O port address to virtual address */
68#ifndef __io
69# define __io(p) ((void *)phys_to_uncached(p))
70#endif
71
72/*
73 * Not really sure about the best way to slow down I/O on
74 * AVR32. Defining it as a no-op until we have an actual test case.
75 */
76#define SLOW_DOWN_IO do { } while (0)
77
78#define __BUILD_MEMORY_SINGLE(pfx, bwl, type) \
79static inline void \
80pfx##write##bwl(type val, volatile void __iomem *addr) \
81{ \
82 volatile type *__addr; \
83 type __val; \
84 \
85 __addr = (void *)__swizzle_addr_##bwl((unsigned long)(addr)); \
86 __val = pfx##ioswab##bwl(__addr, val); \
87 \
88 BUILD_BUG_ON(sizeof(type) > sizeof(unsigned long)); \
89 \
90 *__addr = __val; \
91} \
92 \
93static inline type pfx##read##bwl(const volatile void __iomem *addr) \
94{ \
95 volatile type *__addr; \
96 type __val; \
97 \
98 __addr = (void *)__swizzle_addr_##bwl((unsigned long)(addr)); \
99 \
100 BUILD_BUG_ON(sizeof(type) > sizeof(unsigned long)); \
101 \
102 __val = *__addr; \
103 return pfx##ioswab##bwl(__addr, __val); \
104}
105
106#define __BUILD_IOPORT_SINGLE(pfx, bwl, type, p, slow) \
107static inline void pfx##out##bwl##p(type val, unsigned long port) \
108{ \
109 volatile type *__addr; \
110 type __val; \
111 \
112 __addr = __io(__swizzle_addr_##bwl(port)); \
113 __val = pfx##ioswab##bwl(__addr, val); \
114 \
115 BUILD_BUG_ON(sizeof(type) > sizeof(unsigned long)); \
116 \
117 *__addr = __val; \
118 slow; \
119} \
120 \
121static inline type pfx##in##bwl##p(unsigned long port) \
122{ \
123 volatile type *__addr; \
124 type __val; \
125 \
126 __addr = __io(__swizzle_addr_##bwl(port)); \
127 \
128 BUILD_BUG_ON(sizeof(type) > sizeof(unsigned long)); \
129 \
130 __val = *__addr; \
131 slow; \
132 \
133 return pfx##ioswab##bwl(__addr, __val); \
134}
135
136#define __BUILD_MEMORY_PFX(bus, bwl, type) \
137 __BUILD_MEMORY_SINGLE(bus, bwl, type)
138
139#define BUILDIO_MEM(bwl, type) \
140 __BUILD_MEMORY_PFX(, bwl, type) \
141 __BUILD_MEMORY_PFX(__mem_, bwl, type)
142
143#define __BUILD_IOPORT_PFX(bus, bwl, type) \
144 __BUILD_IOPORT_SINGLE(bus, bwl, type, ,) \
145 __BUILD_IOPORT_SINGLE(bus, bwl, type, _p, SLOW_DOWN_IO)
146
147#define BUILDIO_IOPORT(bwl, type) \
148 __BUILD_IOPORT_PFX(, bwl, type) \
149 __BUILD_IOPORT_PFX(__mem_, bwl, type)
150
151BUILDIO_MEM(b, u8)
152BUILDIO_MEM(w, u16)
153BUILDIO_MEM(l, u32)
154
155BUILDIO_IOPORT(b, u8)
156BUILDIO_IOPORT(w, u16)
157BUILDIO_IOPORT(l, u32)
158
159#define readb_relaxed readb
160#define readw_relaxed readw
161#define readl_relaxed readl
162
163#define __BUILD_MEMORY_STRING(bwl, type) \
164static inline void writes##bwl(volatile void __iomem *addr, \
165 const void *data, unsigned int count) \
166{ \
167 const type *__data = data; \
168 \
169 while (count--) \
170 __mem_write##bwl(*__data++, addr); \
171} \
172 \
173static inline void reads##bwl(const volatile void __iomem *addr, \
174 void *data, unsigned int count) \
175{ \
176 type *__data = data; \
177 \
178 while (count--) \
179 *__data++ = __mem_read##bwl(addr); \
180}
181
182#define __BUILD_IOPORT_STRING(bwl, type) \
183static inline void outs##bwl(unsigned long port, const void *data, \
184 unsigned int count) \
185{ \
186 const type *__data = data; \
187 \
188 while (count--) \
189 __mem_out##bwl(*__data++, port); \
190} \
191 \
192static inline void ins##bwl(unsigned long port, void *data, \
193 unsigned int count) \
194{ \
195 type *__data = data; \
196 \
197 while (count--) \
198 *__data++ = __mem_in##bwl(port); \
199}
200
201#define BUILDSTRING(bwl, type) \
202 __BUILD_MEMORY_STRING(bwl, type) \
203 __BUILD_IOPORT_STRING(bwl, type)
204
205BUILDSTRING(b, u8)
206BUILDSTRING(w, u16)
207BUILDSTRING(l, u32)
208
209/*
210 * io{read,write}{8,16,32} macros in both le (for PCI style consumers) and native be
211 */
212#ifndef ioread8
213
214#define ioread8(p) ((unsigned int)readb(p))
215
216#define ioread16(p) ((unsigned int)readw(p))
217#define ioread16be(p) ((unsigned int)__raw_readw(p))
218
219#define ioread32(p) ((unsigned int)readl(p))
220#define ioread32be(p) ((unsigned int)__raw_readl(p))
221
222#define iowrite8(v,p) writeb(v, p)
223
224#define iowrite16(v,p) writew(v, p)
225#define iowrite16be(v,p) __raw_writew(v, p)
226
227#define iowrite32(v,p) writel(v, p)
228#define iowrite32be(v,p) __raw_writel(v, p)
229
230#define ioread8_rep(p,d,c) readsb(p,d,c)
231#define ioread16_rep(p,d,c) readsw(p,d,c)
232#define ioread32_rep(p,d,c) readsl(p,d,c)
233
234#define iowrite8_rep(p,s,c) writesb(p,s,c)
235#define iowrite16_rep(p,s,c) writesw(p,s,c)
236#define iowrite32_rep(p,s,c) writesl(p,s,c)
237
238#endif
239
240static inline void memcpy_fromio(void * to, const volatile void __iomem *from,
241 unsigned long count)
242{
243 memcpy(to, (const void __force *)from, count);
244}
245
246static inline void memcpy_toio(volatile void __iomem *to, const void * from,
247 unsigned long count)
248{
249 memcpy((void __force *)to, from, count);
250}
251
252static inline void memset_io(volatile void __iomem *addr, unsigned char val,
253 unsigned long count)
254{
255 memset((void __force *)addr, val, count);
256}
257
258#define mmiowb()
259
260#define IO_SPACE_LIMIT 0xffffffff
261
262extern void __iomem *__ioremap(unsigned long offset, size_t size,
263 unsigned long flags);
264extern void __iounmap(void __iomem *addr);
265
266/*
267 * ioremap - map bus memory into CPU space
268 * @offset bus address of the memory
269 * @size size of the resource to map
270 *
271 * ioremap performs a platform specific sequence of operations to make
272 * bus memory CPU accessible via the readb/.../writel functions and
273 * the other mmio helpers. The returned address is not guaranteed to
274 * be usable directly as a virtual address.
275 */
276#define ioremap(offset, size) \
277 __ioremap((offset), (size), 0)
278
279#define ioremap_nocache(offset, size) \
280 __ioremap((offset), (size), 0)
281
282#define iounmap(addr) \
283 __iounmap(addr)
284
285#define cached(addr) P1SEGADDR(addr)
286#define uncached(addr) P2SEGADDR(addr)
287
288#define virt_to_bus virt_to_phys
289#define bus_to_virt phys_to_virt
290#define page_to_bus page_to_phys
291#define bus_to_page phys_to_page
292
293/*
294 * Create a virtual mapping cookie for an IO port range. There exists
295 * no such thing as port-based I/O on AVR32, so a regular ioremap()
296 * should do what we need.
297 */
298#define ioport_map(port, nr) ioremap(port, nr)
299#define ioport_unmap(port) iounmap(port)
300
301/*
302 * Convert a physical pointer to a virtual kernel pointer for /dev/mem
303 * access
304 */
305#define xlate_dev_mem_ptr(p) __va(p)
306
307/*
308 * Convert a virtual cached pointer to an uncached pointer
309 */
310#define xlate_dev_kmem_ptr(p) p
311
312#endif /* __ASM_AVR32_IO_H */
diff --git a/include/asm-avr32/irq.h b/include/asm-avr32/irq.h
deleted file mode 100644
index c563b7720c1a..000000000000
--- a/include/asm-avr32/irq.h
+++ /dev/null
@@ -1,24 +0,0 @@
1#ifndef __ASM_AVR32_IRQ_H
2#define __ASM_AVR32_IRQ_H
3
4#define NR_INTERNAL_IRQS 64
5
6#include <asm/arch/irq.h>
7
8#ifndef NR_IRQS
9#define NR_IRQS (NR_INTERNAL_IRQS)
10#endif
11
12#define irq_canonicalize(i) (i)
13
14#ifndef __ASSEMBLER__
15int nmi_enable(void);
16void nmi_disable(void);
17
18/*
19 * Returns a bitmask of pending interrupts in a group.
20 */
21extern unsigned long intc_get_pending(unsigned int group);
22#endif
23
24#endif /* __ASM_AVR32_IOCTLS_H */
diff --git a/include/asm-generic/ioctl.h b/include/asm-generic/ioctl.h
index 864181385579..15828b2d663c 100644
--- a/include/asm-generic/ioctl.h
+++ b/include/asm-generic/ioctl.h
@@ -68,12 +68,16 @@
68 ((nr) << _IOC_NRSHIFT) | \ 68 ((nr) << _IOC_NRSHIFT) | \
69 ((size) << _IOC_SIZESHIFT)) 69 ((size) << _IOC_SIZESHIFT))
70 70
71#ifdef __KERNEL__
71/* provoke compile error for invalid uses of size argument */ 72/* provoke compile error for invalid uses of size argument */
72extern unsigned int __invalid_size_argument_for_IOC; 73extern unsigned int __invalid_size_argument_for_IOC;
73#define _IOC_TYPECHECK(t) \ 74#define _IOC_TYPECHECK(t) \
74 ((sizeof(t) == sizeof(t[1]) && \ 75 ((sizeof(t) == sizeof(t[1]) && \
75 sizeof(t) < (1 << _IOC_SIZEBITS)) ? \ 76 sizeof(t) < (1 << _IOC_SIZEBITS)) ? \
76 sizeof(t) : __invalid_size_argument_for_IOC) 77 sizeof(t) : __invalid_size_argument_for_IOC)
78#else
79#define _IOC_TYPECHECK(t) (sizeof(t))
80#endif
77 81
78/* used to create numbers */ 82/* used to create numbers */
79#define _IO(type,nr) _IOC(_IOC_NONE,(type),(nr),0) 83#define _IO(type,nr) _IOC(_IOC_NONE,(type),(nr),0)
diff --git a/include/asm-m68k/unistd.h b/include/asm-m68k/unistd.h
index e72ba563f102..965abb8bc7ff 100644
--- a/include/asm-m68k/unistd.h
+++ b/include/asm-m68k/unistd.h
@@ -325,10 +325,16 @@
325#define __NR_fallocate 320 325#define __NR_fallocate 320
326#define __NR_timerfd_settime 321 326#define __NR_timerfd_settime 321
327#define __NR_timerfd_gettime 322 327#define __NR_timerfd_gettime 322
328#define __NR_signalfd4 323
329#define __NR_eventfd2 324
330#define __NR_epoll_create1 325
331#define __NR_dup3 326
332#define __NR_pipe2 327
333#define __NR_inotify_init1 328
328 334
329#ifdef __KERNEL__ 335#ifdef __KERNEL__
330 336
331#define NR_syscalls 323 337#define NR_syscalls 329
332 338
333#define __ARCH_WANT_IPC_PARSE_VERSION 339#define __ARCH_WANT_IPC_PARSE_VERSION
334#define __ARCH_WANT_OLD_READDIR 340#define __ARCH_WANT_OLD_READDIR
diff --git a/include/asm-x86/efi.h b/include/asm-x86/efi.h
index 7ed2bd7a7f51..d4f2b0abe929 100644
--- a/include/asm-x86/efi.h
+++ b/include/asm-x86/efi.h
@@ -86,7 +86,7 @@ extern u64 efi_call6(void *fp, u64 arg1, u64 arg2, u64 arg3,
86 efi_call6((void *)(efi.systab->runtime->f), (u64)(a1), (u64)(a2), \ 86 efi_call6((void *)(efi.systab->runtime->f), (u64)(a1), (u64)(a2), \
87 (u64)(a3), (u64)(a4), (u64)(a5), (u64)(a6)) 87 (u64)(a3), (u64)(a4), (u64)(a5), (u64)(a6))
88 88
89extern void *efi_ioremap(unsigned long addr, unsigned long size); 89extern void __iomem *efi_ioremap(unsigned long addr, unsigned long size);
90 90
91#endif /* CONFIG_X86_32 */ 91#endif /* CONFIG_X86_32 */
92 92
diff --git a/include/asm-x86/hw_irq.h b/include/asm-x86/hw_irq.h
index 77ba51df5668..edd0b95f14d0 100644
--- a/include/asm-x86/hw_irq.h
+++ b/include/asm-x86/hw_irq.h
@@ -98,9 +98,17 @@ extern void (*const interrupt[NR_IRQS])(void);
98#else 98#else
99typedef int vector_irq_t[NR_VECTORS]; 99typedef int vector_irq_t[NR_VECTORS];
100DECLARE_PER_CPU(vector_irq_t, vector_irq); 100DECLARE_PER_CPU(vector_irq_t, vector_irq);
101extern spinlock_t vector_lock;
102#endif 101#endif
103extern void setup_vector_irq(int cpu); 102
103#if defined(CONFIG_X86_IO_APIC) && defined(CONFIG_X86_64)
104extern void lock_vector_lock(void);
105extern void unlock_vector_lock(void);
106extern void __setup_vector_irq(int cpu);
107#else
108static inline void lock_vector_lock(void) {}
109static inline void unlock_vector_lock(void) {}
110static inline void __setup_vector_irq(int cpu) {}
111#endif
104 112
105#endif /* !ASSEMBLY_ */ 113#endif /* !ASSEMBLY_ */
106 114
diff --git a/include/asm-x86/irq_vectors.h b/include/asm-x86/irq_vectors.h
index 90b1d1f12f08..b95d167b7fb2 100644
--- a/include/asm-x86/irq_vectors.h
+++ b/include/asm-x86/irq_vectors.h
@@ -109,7 +109,15 @@
109#define LAST_VM86_IRQ 15 109#define LAST_VM86_IRQ 15
110#define invalid_vm86_irq(irq) ((irq) < 3 || (irq) > 15) 110#define invalid_vm86_irq(irq) ((irq) < 3 || (irq) > 15)
111 111
112#if !defined(CONFIG_X86_VOYAGER) 112#ifdef CONFIG_X86_64
113# if NR_CPUS < MAX_IO_APICS
114# define NR_IRQS (NR_VECTORS + (32 * NR_CPUS))
115# else
116# define NR_IRQS (NR_VECTORS + (32 * MAX_IO_APICS))
117# endif
118# define NR_IRQ_VECTORS NR_IRQS
119
120#elif !defined(CONFIG_X86_VOYAGER)
113 121
114# if defined(CONFIG_X86_IO_APIC) || defined(CONFIG_PARAVIRT) || defined(CONFIG_X86_VISWS) 122# if defined(CONFIG_X86_IO_APIC) || defined(CONFIG_PARAVIRT) || defined(CONFIG_X86_VISWS)
115 123
diff --git a/include/linux/Kbuild b/include/linux/Kbuild
index a26f565e8189..327f60658d94 100644
--- a/include/linux/Kbuild
+++ b/include/linux/Kbuild
@@ -356,6 +356,7 @@ unifdef-y += virtio_balloon.h
356unifdef-y += virtio_console.h 356unifdef-y += virtio_console.h
357unifdef-y += virtio_pci.h 357unifdef-y += virtio_pci.h
358unifdef-y += virtio_ring.h 358unifdef-y += virtio_ring.h
359unifdef-y += virtio_rng.h
359unifdef-y += vt.h 360unifdef-y += vt.h
360unifdef-y += wait.h 361unifdef-y += wait.h
361unifdef-y += wanrouter.h 362unifdef-y += wanrouter.h
diff --git a/include/linux/agp_backend.h b/include/linux/agp_backend.h
index 972b12bcfb36..2b8df8b420fd 100644
--- a/include/linux/agp_backend.h
+++ b/include/linux/agp_backend.h
@@ -30,6 +30,8 @@
30#ifndef _AGP_BACKEND_H 30#ifndef _AGP_BACKEND_H
31#define _AGP_BACKEND_H 1 31#define _AGP_BACKEND_H 1
32 32
33#include <linux/list.h>
34
33enum chipset_type { 35enum chipset_type {
34 NOT_SUPPORTED, 36 NOT_SUPPORTED,
35 SUPPORTED, 37 SUPPORTED,
@@ -78,6 +80,8 @@ struct agp_memory {
78 bool is_bound; 80 bool is_bound;
79 bool is_flushed; 81 bool is_flushed;
80 bool vmalloc_flag; 82 bool vmalloc_flag;
83 /* list of agp_memory mapped to the aperture */
84 struct list_head mapped_list;
81}; 85};
82 86
83#define AGP_NORMAL_MEMORY 0 87#define AGP_NORMAL_MEMORY 0
@@ -96,6 +100,7 @@ extern struct agp_memory *agp_allocate_memory(struct agp_bridge_data *, size_t,
96extern int agp_copy_info(struct agp_bridge_data *, struct agp_kern_info *); 100extern int agp_copy_info(struct agp_bridge_data *, struct agp_kern_info *);
97extern int agp_bind_memory(struct agp_memory *, off_t); 101extern int agp_bind_memory(struct agp_memory *, off_t);
98extern int agp_unbind_memory(struct agp_memory *); 102extern int agp_unbind_memory(struct agp_memory *);
103extern int agp_rebind_memory(void);
99extern void agp_enable(struct agp_bridge_data *, u32); 104extern void agp_enable(struct agp_bridge_data *, u32);
100extern struct agp_bridge_data *agp_backend_acquire(struct pci_dev *); 105extern struct agp_bridge_data *agp_backend_acquire(struct pci_dev *);
101extern void agp_backend_release(struct agp_bridge_data *); 106extern void agp_backend_release(struct agp_bridge_data *);
diff --git a/include/linux/bitmap.h b/include/linux/bitmap.h
index 1abfe664c444..89781fd48859 100644
--- a/include/linux/bitmap.h
+++ b/include/linux/bitmap.h
@@ -110,6 +110,7 @@ extern int __bitmap_weight(const unsigned long *bitmap, int bits);
110 110
111extern int bitmap_scnprintf(char *buf, unsigned int len, 111extern int bitmap_scnprintf(char *buf, unsigned int len,
112 const unsigned long *src, int nbits); 112 const unsigned long *src, int nbits);
113extern int bitmap_scnprintf_len(unsigned int nr_bits);
113extern int __bitmap_parse(const char *buf, unsigned int buflen, int is_user, 114extern int __bitmap_parse(const char *buf, unsigned int buflen, int is_user,
114 unsigned long *dst, int nbits); 115 unsigned long *dst, int nbits);
115extern int bitmap_parse_user(const char __user *ubuf, unsigned int ulen, 116extern int bitmap_parse_user(const char __user *ubuf, unsigned int ulen,
diff --git a/include/linux/bootmem.h b/include/linux/bootmem.h
index 652470b687c9..95837bfb5256 100644
--- a/include/linux/bootmem.h
+++ b/include/linux/bootmem.h
@@ -97,10 +97,14 @@ extern void *__alloc_bootmem_low_node(pg_data_t *pgdat,
97#ifndef CONFIG_HAVE_ARCH_BOOTMEM_NODE 97#ifndef CONFIG_HAVE_ARCH_BOOTMEM_NODE
98#define alloc_bootmem(x) \ 98#define alloc_bootmem(x) \
99 __alloc_bootmem(x, SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS)) 99 __alloc_bootmem(x, SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS))
100#define alloc_bootmem_nopanic(x) \
101 __alloc_bootmem_nopanic(x, SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS))
100#define alloc_bootmem_low(x) \ 102#define alloc_bootmem_low(x) \
101 __alloc_bootmem_low(x, SMP_CACHE_BYTES, 0) 103 __alloc_bootmem_low(x, SMP_CACHE_BYTES, 0)
102#define alloc_bootmem_pages(x) \ 104#define alloc_bootmem_pages(x) \
103 __alloc_bootmem(x, PAGE_SIZE, __pa(MAX_DMA_ADDRESS)) 105 __alloc_bootmem(x, PAGE_SIZE, __pa(MAX_DMA_ADDRESS))
106#define alloc_bootmem_pages_nopanic(x) \
107 __alloc_bootmem_nopanic(x, PAGE_SIZE, __pa(MAX_DMA_ADDRESS))
104#define alloc_bootmem_low_pages(x) \ 108#define alloc_bootmem_low_pages(x) \
105 __alloc_bootmem_low(x, PAGE_SIZE, 0) 109 __alloc_bootmem_low(x, PAGE_SIZE, 0)
106#define alloc_bootmem_node(pgdat, x) \ 110#define alloc_bootmem_node(pgdat, x) \
diff --git a/include/linux/byteorder.h b/include/linux/byteorder.h
new file mode 100644
index 000000000000..29f002d73d98
--- /dev/null
+++ b/include/linux/byteorder.h
@@ -0,0 +1,372 @@
1#ifndef _LINUX_BYTEORDER_H
2#define _LINUX_BYTEORDER_H
3
4#include <linux/types.h>
5#include <linux/swab.h>
6
7#if defined(__LITTLE_ENDIAN) && defined(__BIG_ENDIAN)
8# error Fix asm/byteorder.h to define one endianness
9#endif
10
11#if !defined(__LITTLE_ENDIAN) && !defined(__BIG_ENDIAN)
12# error Fix asm/byteorder.h to define arch endianness
13#endif
14
15#ifdef __LITTLE_ENDIAN
16# undef __LITTLE_ENDIAN
17# define __LITTLE_ENDIAN 1234
18#endif
19
20#ifdef __BIG_ENDIAN
21# undef __BIG_ENDIAN
22# define __BIG_ENDIAN 4321
23#endif
24
25#if defined(__LITTLE_ENDIAN) && !defined(__LITTLE_ENDIAN_BITFIELD)
26# define __LITTLE_ENDIAN_BITFIELD
27#endif
28
29#if defined(__BIG_ENDIAN) && !defined(__BIG_ENDIAN_BITFIELD)
30# define __BIG_ENDIAN_BITFIELD
31#endif
32
33#ifdef __LITTLE_ENDIAN
34# define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
35# define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
36# define __le64_to_cpu(x) ((__force __u64)(__le64)(x))
37# define __cpu_to_le16(x) ((__force __le16)(__u16)(x))
38# define __cpu_to_le32(x) ((__force __le32)(__u32)(x))
39# define __cpu_to_le64(x) ((__force __le64)(__u64)(x))
40
41# define __be16_to_cpu(x) __swab16((__force __u16)(__be16)(x))
42# define __be32_to_cpu(x) __swab32((__force __u32)(__be32)(x))
43# define __be64_to_cpu(x) __swab64((__force __u64)(__be64)(x))
44# define __cpu_to_be16(x) ((__force __be16)__swab16(x))
45# define __cpu_to_be32(x) ((__force __be32)__swab32(x))
46# define __cpu_to_be64(x) ((__force __be64)__swab64(x))
47#endif
48
49#ifdef __BIG_ENDIAN
50# define __be16_to_cpu(x) ((__force __u16)(__be16)(x))
51# define __be32_to_cpu(x) ((__force __u32)(__be32)(x))
52# define __be64_to_cpu(x) ((__force __u64)(__be64)(x))
53# define __cpu_to_be16(x) ((__force __be16)(__u16)(x))
54# define __cpu_to_be32(x) ((__force __be32)(__u32)(x))
55# define __cpu_to_be64(x) ((__force __be64)(__u64)(x))
56
57# define __le16_to_cpu(x) __swab16((__force __u16)(__le16)(x))
58# define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
59# define __le64_to_cpu(x) __swab64((__force __u64)(__le64)(x))
60# define __cpu_to_le16(x) ((__force __le16)__swab16(x))
61# define __cpu_to_le32(x) ((__force __le32)__swab32(x))
62# define __cpu_to_le64(x) ((__force __le64)__swab64(x))
63#endif
64
65/*
66 * These helpers could be phased out over time as the base version
67 * handles constant folding.
68 */
69#define __constant_htonl(x) __cpu_to_be32(x)
70#define __constant_ntohl(x) __be32_to_cpu(x)
71#define __constant_htons(x) __cpu_to_be16(x)
72#define __constant_ntohs(x) __be16_to_cpu(x)
73
74#define __constant_le16_to_cpu(x) __le16_to_cpu(x)
75#define __constant_le32_to_cpu(x) __le32_to_cpu(x)
76#define __constant_le64_to_cpu(x) __le64_to_cpu(x)
77#define __constant_be16_to_cpu(x) __be16_to_cpu(x)
78#define __constant_be32_to_cpu(x) __be32_to_cpu(x)
79#define __constant_be64_to_cpu(x) __be64_to_cpu(x)
80
81#define __constant_cpu_to_le16(x) __cpu_to_le16(x)
82#define __constant_cpu_to_le32(x) __cpu_to_le32(x)
83#define __constant_cpu_to_le64(x) __cpu_to_le64(x)
84#define __constant_cpu_to_be16(x) __cpu_to_be16(x)
85#define __constant_cpu_to_be32(x) __cpu_to_be32(x)
86#define __constant_cpu_to_be64(x) __cpu_to_be64(x)
87
88static inline void __le16_to_cpus(__u16 *p)
89{
90#ifdef __BIG_ENDIAN
91 __swab16s(p);
92#endif
93}
94
95static inline void __cpu_to_le16s(__u16 *p)
96{
97#ifdef __BIG_ENDIAN
98 __swab16s(p);
99#endif
100}
101
102static inline void __le32_to_cpus(__u32 *p)
103{
104#ifdef __BIG_ENDIAN
105 __swab32s(p);
106#endif
107}
108
109static inline void __cpu_to_le32s(__u32 *p)
110{
111#ifdef __BIG_ENDIAN
112 __swab32s(p);
113#endif
114}
115
116static inline void __le64_to_cpus(__u64 *p)
117{
118#ifdef __BIG_ENDIAN
119 __swab64s(p);
120#endif
121}
122
123static inline void __cpu_to_le64s(__u64 *p)
124{
125#ifdef __BIG_ENDIAN
126 __swab64s(p);
127#endif
128}
129
130static inline void __be16_to_cpus(__u16 *p)
131{
132#ifdef __LITTLE_ENDIAN
133 __swab16s(p);
134#endif
135}
136
137static inline void __cpu_to_be16s(__u16 *p)
138{
139#ifdef __LITTLE_ENDIAN
140 __swab16s(p);
141#endif
142}
143
144static inline void __be32_to_cpus(__u32 *p)
145{
146#ifdef __LITTLE_ENDIAN
147 __swab32s(p);
148#endif
149}
150
151static inline void __cpu_to_be32s(__u32 *p)
152{
153#ifdef __LITTLE_ENDIAN
154 __swab32s(p);
155#endif
156}
157
158static inline void __be64_to_cpus(__u64 *p)
159{
160#ifdef __LITTLE_ENDIAN
161 __swab64s(p);
162#endif
163}
164
165static inline void __cpu_to_be64s(__u64 *p)
166{
167#ifdef __LITTLE_ENDIAN
168 __swab64s(p);
169#endif
170}
171
172static inline __u16 __le16_to_cpup(const __le16 *p)
173{
174#ifdef __LITTLE_ENDIAN
175 return (__force __u16)*p;
176#else
177 return __swab16p((__force __u16 *)p);
178#endif
179}
180
181static inline __u32 __le32_to_cpup(const __le32 *p)
182{
183#ifdef __LITTLE_ENDIAN
184 return (__force __u32)*p;
185#else
186 return __swab32p((__force __u32 *)p);
187#endif
188}
189
190static inline __u64 __le64_to_cpup(const __le64 *p)
191{
192#ifdef __LITTLE_ENDIAN
193 return (__force __u64)*p;
194#else
195 return __swab64p((__force __u64 *)p);
196#endif
197}
198
199static inline __le16 __cpu_to_le16p(const __u16 *p)
200{
201#ifdef __LITTLE_ENDIAN
202 return (__force __le16)*p;
203#else
204 return (__force __le16)__swab16p(p);
205#endif
206}
207
208static inline __le32 __cpu_to_le32p(const __u32 *p)
209{
210#ifdef __LITTLE_ENDIAN
211 return (__force __le32)*p;
212#else
213 return (__force __le32)__swab32p(p);
214#endif
215}
216
217static inline __le64 __cpu_to_le64p(const __u64 *p)
218{
219#ifdef __LITTLE_ENDIAN
220 return (__force __le64)*p;
221#else
222 return (__force __le64)__swab64p(p);
223#endif
224}
225
226static inline __u16 __be16_to_cpup(const __be16 *p)
227{
228#ifdef __BIG_ENDIAN
229 return (__force __u16)*p;
230#else
231 return __swab16p((__force __u16 *)p);
232#endif
233}
234
235static inline __u32 __be32_to_cpup(const __be32 *p)
236{
237#ifdef __BIG_ENDIAN
238 return (__force __u32)*p;
239#else
240 return __swab32p((__force __u32 *)p);
241#endif
242}
243
244static inline __u64 __be64_to_cpup(const __be64 *p)
245{
246#ifdef __BIG_ENDIAN
247 return (__force __u64)*p;
248#else
249 return __swab64p((__force __u64 *)p);
250#endif
251}
252
253static inline __be16 __cpu_to_be16p(const __u16 *p)
254{
255#ifdef __BIG_ENDIAN
256 return (__force __be16)*p;
257#else
258 return (__force __be16)__swab16p(p);
259#endif
260}
261
262static inline __be32 __cpu_to_be32p(const __u32 *p)
263{
264#ifdef __BIG_ENDIAN
265 return (__force __be32)*p;
266#else
267 return (__force __be32)__swab32p(p);
268#endif
269}
270
271static inline __be64 __cpu_to_be64p(const __u64 *p)
272{
273#ifdef __BIG_ENDIAN
274 return (__force __be64)*p;
275#else
276 return (__force __be64)__swab64p(p);
277#endif
278}
279
280#ifdef __KERNEL__
281
282# define le16_to_cpu __le16_to_cpu
283# define le32_to_cpu __le32_to_cpu
284# define le64_to_cpu __le64_to_cpu
285# define be16_to_cpu __be16_to_cpu
286# define be32_to_cpu __be32_to_cpu
287# define be64_to_cpu __be64_to_cpu
288# define cpu_to_le16 __cpu_to_le16
289# define cpu_to_le32 __cpu_to_le32
290# define cpu_to_le64 __cpu_to_le64
291# define cpu_to_be16 __cpu_to_be16
292# define cpu_to_be32 __cpu_to_be32
293# define cpu_to_be64 __cpu_to_be64
294
295# define le16_to_cpup __le16_to_cpup
296# define le32_to_cpup __le32_to_cpup
297# define le64_to_cpup __le64_to_cpup
298# define be16_to_cpup __be16_to_cpup
299# define be32_to_cpup __be32_to_cpup
300# define be64_to_cpup __be64_to_cpup
301# define cpu_to_le16p __cpu_to_le16p
302# define cpu_to_le32p __cpu_to_le32p
303# define cpu_to_le64p __cpu_to_le64p
304# define cpu_to_be16p __cpu_to_be16p
305# define cpu_to_be32p __cpu_to_be32p
306# define cpu_to_be64p __cpu_to_be64p
307
308# define le16_to_cpus __le16_to_cpus
309# define le32_to_cpus __le32_to_cpus
310# define le64_to_cpus __le64_to_cpus
311# define be16_to_cpus __be16_to_cpus
312# define be32_to_cpus __be32_to_cpus
313# define be64_to_cpus __be64_to_cpus
314# define cpu_to_le16s __cpu_to_le16s
315# define cpu_to_le32s __cpu_to_le32s
316# define cpu_to_le64s __cpu_to_le64s
317# define cpu_to_be16s __cpu_to_be16s
318# define cpu_to_be32s __cpu_to_be32s
319# define cpu_to_be64s __cpu_to_be64s
320
321/*
322 * They have to be macros in order to do the constant folding
323 * correctly - if the argument passed into a inline function
324 * it is no longer constant according to gcc..
325 */
326# undef ntohl
327# undef ntohs
328# undef htonl
329# undef htons
330
331# define ___htonl(x) __cpu_to_be32(x)
332# define ___htons(x) __cpu_to_be16(x)
333# define ___ntohl(x) __be32_to_cpu(x)
334# define ___ntohs(x) __be16_to_cpu(x)
335
336# define htonl(x) ___htonl(x)
337# define ntohl(x) ___ntohl(x)
338# define htons(x) ___htons(x)
339# define ntohs(x) ___ntohs(x)
340
341static inline void le16_add_cpu(__le16 *var, u16 val)
342{
343 *var = cpu_to_le16(le16_to_cpup(var) + val);
344}
345
346static inline void le32_add_cpu(__le32 *var, u32 val)
347{
348 *var = cpu_to_le32(le32_to_cpup(var) + val);
349}
350
351static inline void le64_add_cpu(__le64 *var, u64 val)
352{
353 *var = cpu_to_le64(le64_to_cpup(var) + val);
354}
355
356static inline void be16_add_cpu(__be16 *var, u16 val)
357{
358 *var = cpu_to_be16(be16_to_cpup(var) + val);
359}
360
361static inline void be32_add_cpu(__be32 *var, u32 val)
362{
363 *var = cpu_to_be32(be32_to_cpup(var) + val);
364}
365
366static inline void be64_add_cpu(__be64 *var, u64 val)
367{
368 *var = cpu_to_be64(be64_to_cpup(var) + val);
369}
370
371#endif /* __KERNEL__ */
372#endif /* _LINUX_BYTEORDER_H */
diff --git a/include/linux/firmware-map.h b/include/linux/firmware-map.h
index acbdbcc16051..6e199c8dfacc 100644
--- a/include/linux/firmware-map.h
+++ b/include/linux/firmware-map.h
@@ -24,34 +24,8 @@
24 */ 24 */
25#ifdef CONFIG_FIRMWARE_MEMMAP 25#ifdef CONFIG_FIRMWARE_MEMMAP
26 26
27/**
28 * Adds a firmware mapping entry. This function uses kmalloc() for memory
29 * allocation. Use firmware_map_add_early() if you want to use the bootmem
30 * allocator.
31 *
32 * That function must be called before late_initcall.
33 *
34 * @start: Start of the memory range.
35 * @end: End of the memory range (inclusive).
36 * @type: Type of the memory range.
37 *
38 * Returns 0 on success, or -ENOMEM if no memory could be allocated.
39 */
40int firmware_map_add(resource_size_t start, resource_size_t end, 27int firmware_map_add(resource_size_t start, resource_size_t end,
41 const char *type); 28 const char *type);
42
43/**
44 * Adds a firmware mapping entry. This function uses the bootmem allocator
45 * for memory allocation. Use firmware_map_add() if you want to use kmalloc().
46 *
47 * That function must be called before late_initcall.
48 *
49 * @start: Start of the memory range.
50 * @end: End of the memory range (inclusive).
51 * @type: Type of the memory range.
52 *
53 * Returns 0 on success, or -ENOMEM if no memory could be allocated.
54 */
55int firmware_map_add_early(resource_size_t start, resource_size_t end, 29int firmware_map_add_early(resource_size_t start, resource_size_t end,
56 const char *type); 30 const char *type);
57 31
diff --git a/include/linux/harrier_defs.h b/include/linux/harrier_defs.h
deleted file mode 100644
index efef11db790f..000000000000
--- a/include/linux/harrier_defs.h
+++ /dev/null
@@ -1,212 +0,0 @@
1/*
2 * include/linux/harrier_defs.h
3 *
4 * Definitions for Motorola MCG Harrier North Bridge & Memory controller
5 *
6 * Author: Dale Farnsworth
7 * dale.farnsworth@mvista.com
8 *
9 * Extracted from asm-ppc/harrier.h by:
10 * Randy Vinson
11 * rvinson@mvista.com
12 *
13 * Copyright 2001-2002 MontaVista Software Inc.
14 *
15 * This program is free software; you can redistribute it and/or modify it
16 * under the terms of the GNU General Public License as published by the
17 * Free Software Foundation; either version 2 of the License, or (at your
18 * option) any later version.
19 */
20
21#ifndef __ASMPPC_HARRIER_DEFS_H
22#define __ASMPPC_HARRIER_DEFS_H
23
24#define HARRIER_DEFAULT_XCSR_BASE 0xfeff0000
25
26#define HARRIER_VEND_DEV_ID 0x1057480b
27
28#define HARRIER_VENI_OFF 0x00
29
30#define HARRIER_REVI_OFF 0x05
31#define HARRIER_UCTL_OFF 0xd0
32#define HARRIER_XTAL64_MASK 0x02
33
34#define HARRIER_MISC_CSR_OFF 0x1c
35#define HARRIER_RSTOUT 0x01000000
36#define HARRIER_SYSCON 0x08000000
37#define HARRIER_EREADY 0x10000000
38#define HARRIER_ERDYS 0x20000000
39
40/* Function exception registers */
41#define HARRIER_FEEN_OFF 0x40 /* enable */
42#define HARRIER_FEST_OFF 0x44 /* status */
43#define HARRIER_FEMA_OFF 0x48 /* mask */
44#define HARRIER_FECL_OFF 0x4c /* clear */
45
46#define HARRIER_FE_DMA 0x80
47#define HARRIER_FE_MIDB 0x40
48#define HARRIER_FE_MIM0 0x20
49#define HARRIER_FE_MIM1 0x10
50#define HARRIER_FE_MIP 0x08
51#define HARRIER_FE_UA0 0x04
52#define HARRIER_FE_UA1 0x02
53#define HARRIER_FE_ABT 0x01
54
55#define HARRIER_SERIAL_0_OFF 0xc0
56
57#define HARRIER_MBAR_OFF 0xe0
58#define HARRIER_MBAR_MSK 0xfffc0000
59#define HARRIER_MPIC_CSR_OFF 0xe4
60#define HARRIER_MPIC_OPI_ENABLE 0x40
61#define HARRIER_MPIC_IFEVP_OFF 0x10200
62#define HARRIER_MPIC_IFEVP_VECT_MSK 0xff
63#define HARRIER_MPIC_IFEDE_OFF 0x10210
64
65/*
66 * Define the Memory Controller register offsets.
67 */
68#define HARRIER_SDBA_OFF 0x110
69#define HARRIER_SDBB_OFF 0x114
70#define HARRIER_SDBC_OFF 0x118
71#define HARRIER_SDBD_OFF 0x11c
72#define HARRIER_SDBE_OFF 0x120
73#define HARRIER_SDBF_OFF 0x124
74#define HARRIER_SDBG_OFF 0x128
75#define HARRIER_SDBH_OFF 0x12c
76
77#define HARRIER_SDB_ENABLE 0x00000100
78#define HARRIER_SDB_SIZE_MASK 0xf
79#define HARRIER_SDB_SIZE_SHIFT 16
80#define HARRIER_SDB_BASE_MASK 0xff
81#define HARRIER_SDB_BASE_SHIFT 24
82
83/*
84 * Define outbound register offsets.
85 */
86#define HARRIER_OTAD0_OFF 0x220
87#define HARRIER_OTOF0_OFF 0x224
88#define HARRIER_OTAD1_OFF 0x228
89#define HARRIER_OTOF1_OFF 0x22c
90#define HARRIER_OTAD2_OFF 0x230
91#define HARRIER_OTOF2_OFF 0x234
92#define HARRIER_OTAD3_OFF 0x238
93#define HARRIER_OTOF3_OFF 0x23c
94
95#define HARRIER_OTADX_START_MSK 0xffff0000UL
96#define HARRIER_OTADX_END_MSK 0x0000ffffUL
97
98#define HARRIER_OTOFX_OFF_MSK 0xffff0000UL
99#define HARRIER_OTOFX_ENA 0x80UL
100#define HARRIER_OTOFX_WPE 0x10UL
101#define HARRIER_OTOFX_SGE 0x08UL
102#define HARRIER_OTOFX_RAE 0x04UL
103#define HARRIER_OTOFX_MEM 0x02UL
104#define HARRIER_OTOFX_IOM 0x01UL
105
106/*
107 * Define generic message passing register offsets
108 */
109/* Mirrored registers (visible from both PowerPC and PCI space) */
110#define HARRIER_XCSR_MP_BASE_OFF 0x290 /* base offset in XCSR space */
111#define HARRIER_PMEP_MP_BASE_OFF 0x100 /* base offset in PMEM space */
112#define HARRIER_MGOM0_OFF 0x00 /* outbound msg 0 */
113#define HARRIER_MGOM1_OFF 0x04 /* outbound msg 1 */
114#define HARRIER_MGOD_OFF 0x08 /* outbound doorbells */
115
116#define HARRIER_MGIM0_OFF 0x10 /* inbound msg 0 */
117#define HARRIER_MGIM1_OFF 0x14 /* inbound msg 1 */
118#define HARRIER_MGID_OFF 0x18 /* inbound doorbells */
119
120/* PowerPC-only registers */
121#define HARRIER_MGIDM_OFF 0x20 /* inbound doorbell mask */
122
123/* PCI-only registers */
124#define HARRIER_PMEP_MGST_OFF 0x20 /* (outbound) interrupt status */
125#define HARRIER_PMEP_MGMS_OFF 0x24 /* (outbound) interrupt mask */
126#define HARRIER_MG_OMI0 (1<<4)
127#define HARRIER_MG_OMI1 (1<<5)
128
129#define HARRIER_PMEP_MGODM_OFF 0x28 /* outbound doorbell mask */
130
131/*
132 * Define PCI configuration space register offsets
133 */
134#define HARRIER_XCSR_TO_PCFS_OFF 0x300
135
136/*
137 * Define message passing attribute register offset
138 */
139#define HARRIER_MPAT_OFF 0x44
140
141/*
142 * Define inbound attribute register offsets.
143 */
144#define HARRIER_ITSZ0_OFF 0x48
145#define HARRIER_ITAT0_OFF 0x4c
146
147#define HARRIER_ITSZ1_OFF 0x50
148#define HARRIER_ITAT1_OFF 0x54
149
150#define HARRIER_ITSZ2_OFF 0x58
151#define HARRIER_ITAT2_OFF 0x5c
152
153#define HARRIER_ITSZ3_OFF 0x60
154#define HARRIER_ITAT3_OFF 0x64
155
156/* inbound translation size constants */
157#define HARRIER_ITSZ_MSK 0xff
158#define HARRIER_ITSZ_4KB 0x00
159#define HARRIER_ITSZ_8KB 0x01
160#define HARRIER_ITSZ_16KB 0x02
161#define HARRIER_ITSZ_32KB 0x03
162#define HARRIER_ITSZ_64KB 0x04
163#define HARRIER_ITSZ_128KB 0x05
164#define HARRIER_ITSZ_256KB 0x06
165#define HARRIER_ITSZ_512KB 0x07
166#define HARRIER_ITSZ_1MB 0x08
167#define HARRIER_ITSZ_2MB 0x09
168#define HARRIER_ITSZ_4MB 0x0A
169#define HARRIER_ITSZ_8MB 0x0B
170#define HARRIER_ITSZ_16MB 0x0C
171#define HARRIER_ITSZ_32MB 0x0D
172#define HARRIER_ITSZ_64MB 0x0E
173#define HARRIER_ITSZ_128MB 0x0F
174#define HARRIER_ITSZ_256MB 0x10
175#define HARRIER_ITSZ_512MB 0x11
176#define HARRIER_ITSZ_1GB 0x12
177#define HARRIER_ITSZ_2GB 0x13
178
179/* inbound translation offset */
180#define HARRIER_ITOF_SHIFT 0x10
181#define HARRIER_ITOF_MSK 0xffff
182
183/* inbound translation atttributes */
184#define HARRIER_ITAT_PRE (1<<3)
185#define HARRIER_ITAT_RAE (1<<4)
186#define HARRIER_ITAT_WPE (1<<5)
187#define HARRIER_ITAT_MEM (1<<6)
188#define HARRIER_ITAT_ENA (1<<7)
189#define HARRIER_ITAT_GBL (1<<16)
190
191#define HARRIER_LBA_OFF 0x80
192#define HARRIER_LBA_MSK (1<<31)
193
194#define HARRIER_XCSR_SIZE 1024
195
196/* macros to calculate message passing register offsets */
197#define HARRIER_MP_XCSR(x) ((u32)HARRIER_XCSR_MP_BASE_OFF + (u32)x)
198
199#define HARRIER_MP_PMEP(x) ((u32)HARRIER_PMEP_MP_BASE_OFF + (u32)x)
200
201/*
202 * Define PCI configuration space register offsets
203 */
204#define HARRIER_MPBAR_OFF PCI_BASE_ADDRESS_0
205#define HARRIER_ITBAR0_OFF PCI_BASE_ADDRESS_1
206#define HARRIER_ITBAR1_OFF PCI_BASE_ADDRESS_2
207#define HARRIER_ITBAR2_OFF PCI_BASE_ADDRESS_3
208#define HARRIER_ITBAR3_OFF PCI_BASE_ADDRESS_4
209
210#define HARRIER_XCSR_CONFIG(x) ((u32)HARRIER_XCSR_TO_PCFS_OFF + (u32)x)
211
212#endif /* __ASMPPC_HARRIER_DEFS_H */
diff --git a/include/linux/i2c-id.h b/include/linux/i2c-id.h
index 4862398e05bf..bf34c5f4c051 100644
--- a/include/linux/i2c-id.h
+++ b/include/linux/i2c-id.h
@@ -39,7 +39,6 @@
39#define I2C_DRIVERID_SAA7111A 8 /* video input processor */ 39#define I2C_DRIVERID_SAA7111A 8 /* video input processor */
40#define I2C_DRIVERID_SAA7185B 13 /* video encoder */ 40#define I2C_DRIVERID_SAA7185B 13 /* video encoder */
41#define I2C_DRIVERID_SAA7110 22 /* video decoder */ 41#define I2C_DRIVERID_SAA7110 22 /* video decoder */
42#define I2C_DRIVERID_MGATVO 23 /* Matrox TVOut */
43#define I2C_DRIVERID_SAA5249 24 /* SAA5249 and compatibles */ 42#define I2C_DRIVERID_SAA5249 24 /* SAA5249 and compatibles */
44#define I2C_DRIVERID_PCF8583 25 /* real time clock */ 43#define I2C_DRIVERID_PCF8583 25 /* real time clock */
45#define I2C_DRIVERID_SAB3036 26 /* SAB3036 tuner */ 44#define I2C_DRIVERID_SAB3036 26 /* SAB3036 tuner */
@@ -95,7 +94,6 @@
95#define I2C_HW_B_BT848 0x010005 /* BT848 video boards */ 94#define I2C_HW_B_BT848 0x010005 /* BT848 video boards */
96#define I2C_HW_B_VIA 0x010007 /* Via vt82c586b */ 95#define I2C_HW_B_VIA 0x010007 /* Via vt82c586b */
97#define I2C_HW_B_HYDRA 0x010008 /* Apple Hydra Mac I/O */ 96#define I2C_HW_B_HYDRA 0x010008 /* Apple Hydra Mac I/O */
98#define I2C_HW_B_G400 0x010009 /* Matrox G400 */
99#define I2C_HW_B_I810 0x01000a /* Intel I810 */ 97#define I2C_HW_B_I810 0x01000a /* Intel I810 */
100#define I2C_HW_B_VOO 0x01000b /* 3dfx Voodoo 3 / Banshee */ 98#define I2C_HW_B_VOO 0x01000b /* 3dfx Voodoo 3 / Banshee */
101#define I2C_HW_B_SCX200 0x01000e /* Nat'l Semi SCx200 I2C */ 99#define I2C_HW_B_SCX200 0x01000e /* Nat'l Semi SCx200 I2C */
diff --git a/include/linux/i2c-pnx.h b/include/linux/i2c-pnx.h
index e6e9c814da61..f13255e06406 100644
--- a/include/linux/i2c-pnx.h
+++ b/include/linux/i2c-pnx.h
@@ -12,7 +12,9 @@
12#ifndef __I2C_PNX_H__ 12#ifndef __I2C_PNX_H__
13#define __I2C_PNX_H__ 13#define __I2C_PNX_H__
14 14
15#include <asm/arch/i2c.h> 15#include <linux/pm.h>
16
17struct platform_device;
16 18
17struct i2c_pnx_mif { 19struct i2c_pnx_mif {
18 int ret; /* Return value */ 20 int ret; /* Return value */
diff --git a/include/linux/init.h b/include/linux/init.h
index 11b84e106053..93538b696e3d 100644
--- a/include/linux/init.h
+++ b/include/linux/init.h
@@ -139,6 +139,7 @@ extern initcall_t __con_initcall_start[], __con_initcall_end[];
139extern initcall_t __security_initcall_start[], __security_initcall_end[]; 139extern initcall_t __security_initcall_start[], __security_initcall_end[];
140 140
141/* Defined in init/main.c */ 141/* Defined in init/main.c */
142extern int do_one_initcall(initcall_t fn);
142extern char __initdata boot_command_line[]; 143extern char __initdata boot_command_line[];
143extern char *saved_command_line; 144extern char *saved_command_line;
144extern unsigned int reset_devices; 145extern unsigned int reset_devices;
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index aaa998f65c7a..2651f805ba6d 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -108,6 +108,13 @@ struct completion;
108struct pt_regs; 108struct pt_regs;
109struct user; 109struct user;
110 110
111#ifdef CONFIG_PREEMPT_VOLUNTARY
112extern int _cond_resched(void);
113# define might_resched() _cond_resched()
114#else
115# define might_resched() do { } while (0)
116#endif
117
111/** 118/**
112 * might_sleep - annotation for functions that can sleep 119 * might_sleep - annotation for functions that can sleep
113 * 120 *
@@ -118,13 +125,6 @@ struct user;
118 * be bitten later when the calling function happens to sleep when it is not 125 * be bitten later when the calling function happens to sleep when it is not
119 * supposed to. 126 * supposed to.
120 */ 127 */
121#ifdef CONFIG_PREEMPT_VOLUNTARY
122extern int _cond_resched(void);
123# define might_resched() _cond_resched()
124#else
125# define might_resched() do { } while (0)
126#endif
127
128#ifdef CONFIG_DEBUG_SPINLOCK_SLEEP 128#ifdef CONFIG_DEBUG_SPINLOCK_SLEEP
129 void __might_sleep(char *file, int line); 129 void __might_sleep(char *file, int line);
130# define might_sleep() \ 130# define might_sleep() \
diff --git a/include/linux/list.h b/include/linux/list.h
index 1d109e2ef0a9..db35ef02e745 100644
--- a/include/linux/list.h
+++ b/include/linux/list.h
@@ -309,11 +309,11 @@ static inline void list_splice_init(struct list_head *list,
309} 309}
310 310
311/** 311/**
312 * list_splice_tail_init - join two lists, each list being a queue, and 312 * list_splice_tail_init - join two lists and reinitialise the emptied list
313 * reinitialise the emptied list.
314 * @list: the new list to add. 313 * @list: the new list to add.
315 * @head: the place to add it in the first list. 314 * @head: the place to add it in the first list.
316 * 315 *
316 * Each of the lists is a queue.
317 * The list at @list is reinitialised 317 * The list at @list is reinitialised
318 */ 318 */
319static inline void list_splice_tail_init(struct list_head *list, 319static inline void list_splice_tail_init(struct list_head *list,
diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h
index 2486eb4edbf1..331e5f1c2d8e 100644
--- a/include/linux/lockdep.h
+++ b/include/linux/lockdep.h
@@ -89,6 +89,7 @@ struct lock_class {
89 89
90 struct lockdep_subclass_key *key; 90 struct lockdep_subclass_key *key;
91 unsigned int subclass; 91 unsigned int subclass;
92 unsigned int dep_gen_id;
92 93
93 /* 94 /*
94 * IRQ/softirq usage tracking bits: 95 * IRQ/softirq usage tracking bits:
@@ -189,6 +190,14 @@ struct lock_chain {
189 u64 chain_key; 190 u64 chain_key;
190}; 191};
191 192
193#define MAX_LOCKDEP_KEYS_BITS 13
194/*
195 * Subtract one because we offset hlock->class_idx by 1 in order
196 * to make 0 mean no class. This avoids overflowing the class_idx
197 * bitfield and hitting the BUG in hlock_class().
198 */
199#define MAX_LOCKDEP_KEYS ((1UL << MAX_LOCKDEP_KEYS_BITS) - 1)
200
192struct held_lock { 201struct held_lock {
193 /* 202 /*
194 * One-way hash of the dependency chain up to this point. We 203 * One-way hash of the dependency chain up to this point. We
@@ -205,14 +214,14 @@ struct held_lock {
205 * with zero), here we store the previous hash value: 214 * with zero), here we store the previous hash value:
206 */ 215 */
207 u64 prev_chain_key; 216 u64 prev_chain_key;
208 struct lock_class *class;
209 unsigned long acquire_ip; 217 unsigned long acquire_ip;
210 struct lockdep_map *instance; 218 struct lockdep_map *instance;
211 219 struct lockdep_map *nest_lock;
212#ifdef CONFIG_LOCK_STAT 220#ifdef CONFIG_LOCK_STAT
213 u64 waittime_stamp; 221 u64 waittime_stamp;
214 u64 holdtime_stamp; 222 u64 holdtime_stamp;
215#endif 223#endif
224 unsigned int class_idx:MAX_LOCKDEP_KEYS_BITS;
216 /* 225 /*
217 * The lock-stack is unified in that the lock chains of interrupt 226 * The lock-stack is unified in that the lock chains of interrupt
218 * contexts nest ontop of process context chains, but we 'separate' 227 * contexts nest ontop of process context chains, but we 'separate'
@@ -226,11 +235,11 @@ struct held_lock {
226 * The following field is used to detect when we cross into an 235 * The following field is used to detect when we cross into an
227 * interrupt context: 236 * interrupt context:
228 */ 237 */
229 int irq_context; 238 unsigned int irq_context:2; /* bit 0 - soft, bit 1 - hard */
230 int trylock; 239 unsigned int trylock:1;
231 int read; 240 unsigned int read:2; /* see lock_acquire() comment */
232 int check; 241 unsigned int check:2; /* see lock_acquire() comment */
233 int hardirqs_off; 242 unsigned int hardirqs_off:1;
234}; 243};
235 244
236/* 245/*
@@ -294,11 +303,15 @@ extern void lockdep_init_map(struct lockdep_map *lock, const char *name,
294 * 2: full validation 303 * 2: full validation
295 */ 304 */
296extern void lock_acquire(struct lockdep_map *lock, unsigned int subclass, 305extern void lock_acquire(struct lockdep_map *lock, unsigned int subclass,
297 int trylock, int read, int check, unsigned long ip); 306 int trylock, int read, int check,
307 struct lockdep_map *nest_lock, unsigned long ip);
298 308
299extern void lock_release(struct lockdep_map *lock, int nested, 309extern void lock_release(struct lockdep_map *lock, int nested,
300 unsigned long ip); 310 unsigned long ip);
301 311
312extern void lock_set_subclass(struct lockdep_map *lock, unsigned int subclass,
313 unsigned long ip);
314
302# define INIT_LOCKDEP .lockdep_recursion = 0, 315# define INIT_LOCKDEP .lockdep_recursion = 0,
303 316
304#define lockdep_depth(tsk) (debug_locks ? (tsk)->lockdep_depth : 0) 317#define lockdep_depth(tsk) (debug_locks ? (tsk)->lockdep_depth : 0)
@@ -313,8 +326,9 @@ static inline void lockdep_on(void)
313{ 326{
314} 327}
315 328
316# define lock_acquire(l, s, t, r, c, i) do { } while (0) 329# define lock_acquire(l, s, t, r, c, n, i) do { } while (0)
317# define lock_release(l, n, i) do { } while (0) 330# define lock_release(l, n, i) do { } while (0)
331# define lock_set_subclass(l, s, i) do { } while (0)
318# define lockdep_init() do { } while (0) 332# define lockdep_init() do { } while (0)
319# define lockdep_info() do { } while (0) 333# define lockdep_info() do { } while (0)
320# define lockdep_init_map(lock, name, key, sub) do { (void)(key); } while (0) 334# define lockdep_init_map(lock, name, key, sub) do { (void)(key); } while (0)
@@ -400,9 +414,11 @@ static inline void print_irqtrace_events(struct task_struct *curr)
400 414
401#ifdef CONFIG_DEBUG_LOCK_ALLOC 415#ifdef CONFIG_DEBUG_LOCK_ALLOC
402# ifdef CONFIG_PROVE_LOCKING 416# ifdef CONFIG_PROVE_LOCKING
403# define spin_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 2, i) 417# define spin_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 2, NULL, i)
418# define spin_acquire_nest(l, s, t, n, i) lock_acquire(l, s, t, 0, 2, n, i)
404# else 419# else
405# define spin_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 1, i) 420# define spin_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 1, NULL, i)
421# define spin_acquire_nest(l, s, t, n, i) lock_acquire(l, s, t, 0, 1, NULL, i)
406# endif 422# endif
407# define spin_release(l, n, i) lock_release(l, n, i) 423# define spin_release(l, n, i) lock_release(l, n, i)
408#else 424#else
@@ -412,11 +428,11 @@ static inline void print_irqtrace_events(struct task_struct *curr)
412 428
413#ifdef CONFIG_DEBUG_LOCK_ALLOC 429#ifdef CONFIG_DEBUG_LOCK_ALLOC
414# ifdef CONFIG_PROVE_LOCKING 430# ifdef CONFIG_PROVE_LOCKING
415# define rwlock_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 2, i) 431# define rwlock_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 2, NULL, i)
416# define rwlock_acquire_read(l, s, t, i) lock_acquire(l, s, t, 2, 2, i) 432# define rwlock_acquire_read(l, s, t, i) lock_acquire(l, s, t, 2, 2, NULL, i)
417# else 433# else
418# define rwlock_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 1, i) 434# define rwlock_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 1, NULL, i)
419# define rwlock_acquire_read(l, s, t, i) lock_acquire(l, s, t, 2, 1, i) 435# define rwlock_acquire_read(l, s, t, i) lock_acquire(l, s, t, 2, 1, NULL, i)
420# endif 436# endif
421# define rwlock_release(l, n, i) lock_release(l, n, i) 437# define rwlock_release(l, n, i) lock_release(l, n, i)
422#else 438#else
@@ -427,9 +443,9 @@ static inline void print_irqtrace_events(struct task_struct *curr)
427 443
428#ifdef CONFIG_DEBUG_LOCK_ALLOC 444#ifdef CONFIG_DEBUG_LOCK_ALLOC
429# ifdef CONFIG_PROVE_LOCKING 445# ifdef CONFIG_PROVE_LOCKING
430# define mutex_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 2, i) 446# define mutex_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 2, NULL, i)
431# else 447# else
432# define mutex_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 1, i) 448# define mutex_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 1, NULL, i)
433# endif 449# endif
434# define mutex_release(l, n, i) lock_release(l, n, i) 450# define mutex_release(l, n, i) lock_release(l, n, i)
435#else 451#else
@@ -439,11 +455,11 @@ static inline void print_irqtrace_events(struct task_struct *curr)
439 455
440#ifdef CONFIG_DEBUG_LOCK_ALLOC 456#ifdef CONFIG_DEBUG_LOCK_ALLOC
441# ifdef CONFIG_PROVE_LOCKING 457# ifdef CONFIG_PROVE_LOCKING
442# define rwsem_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 2, i) 458# define rwsem_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 2, NULL, i)
443# define rwsem_acquire_read(l, s, t, i) lock_acquire(l, s, t, 1, 2, i) 459# define rwsem_acquire_read(l, s, t, i) lock_acquire(l, s, t, 1, 2, NULL, i)
444# else 460# else
445# define rwsem_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 1, i) 461# define rwsem_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 1, NULL, i)
446# define rwsem_acquire_read(l, s, t, i) lock_acquire(l, s, t, 1, 1, i) 462# define rwsem_acquire_read(l, s, t, i) lock_acquire(l, s, t, 1, 1, NULL, i)
447# endif 463# endif
448# define rwsem_release(l, n, i) lock_release(l, n, i) 464# define rwsem_release(l, n, i) lock_release(l, n, i)
449#else 465#else
@@ -452,4 +468,16 @@ static inline void print_irqtrace_events(struct task_struct *curr)
452# define rwsem_release(l, n, i) do { } while (0) 468# define rwsem_release(l, n, i) do { } while (0)
453#endif 469#endif
454 470
471#ifdef CONFIG_DEBUG_LOCK_ALLOC
472# ifdef CONFIG_PROVE_LOCKING
473# define lock_map_acquire(l) lock_acquire(l, 0, 0, 0, 2, NULL, _THIS_IP_)
474# else
475# define lock_map_acquire(l) lock_acquire(l, 0, 0, 0, 1, NULL, _THIS_IP_)
476# endif
477# define lock_map_release(l) lock_release(l, 1, _THIS_IP_)
478#else
479# define lock_map_acquire(l) do { } while (0)
480# define lock_map_release(l) do { } while (0)
481#endif
482
455#endif /* __LINUX_LOCKDEP_H */ 483#endif /* __LINUX_LOCKDEP_H */
diff --git a/include/linux/mfd/t7l66xb.h b/include/linux/mfd/t7l66xb.h
new file mode 100644
index 000000000000..e83c7f2036f9
--- /dev/null
+++ b/include/linux/mfd/t7l66xb.h
@@ -0,0 +1,36 @@
1/*
2 * This file contains the definitions for the T7L66XB
3 *
4 * (C) Copyright 2005 Ian Molton <spyro@f2s.com>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 */
11#ifndef MFD_T7L66XB_H
12#define MFD_T7L66XB_H
13
14#include <linux/mfd/core.h>
15#include <linux/mfd/tmio.h>
16
17struct t7l66xb_platform_data {
18 int (*enable_clk32k)(struct platform_device *dev);
19 void (*disable_clk32k)(struct platform_device *dev);
20 int (*enable)(struct platform_device *dev);
21 int (*disable)(struct platform_device *dev);
22 int (*suspend)(struct platform_device *dev);
23 int (*resume)(struct platform_device *dev);
24
25 int irq_base; /* The base for subdevice irqs */
26
27 struct tmio_nand_data *nand_data;
28};
29
30
31#define IRQ_T7L66XB_MMC (1)
32#define IRQ_T7L66XB_NAND (3)
33
34#define T7L66XB_NR_IRQS 8
35
36#endif
diff --git a/include/linux/mfd/tc6387xb.h b/include/linux/mfd/tc6387xb.h
new file mode 100644
index 000000000000..fa06e0610b8e
--- /dev/null
+++ b/include/linux/mfd/tc6387xb.h
@@ -0,0 +1,23 @@
1/*
2 * This file contains the definitions for the TC6387XB
3 *
4 * (C) Copyright 2005 Ian Molton <spyro@f2s.com>
5 *
6 * May be copied or modified under the terms of the GNU General Public
7 * License. See linux/COPYING for more information.
8 *
9 */
10#ifndef MFD_TC6387XB_H
11#define MFD_TC6387XB_H
12
13struct tc6387xb_platform_data {
14 int (*enable_clk32k)(struct platform_device *dev);
15 void (*disable_clk32k)(struct platform_device *dev);
16
17 int (*enable)(struct platform_device *dev);
18 int (*disable)(struct platform_device *dev);
19 int (*suspend)(struct platform_device *dev);
20 int (*resume)(struct platform_device *dev);
21};
22
23#endif
diff --git a/include/linux/mfd/tc6393xb.h b/include/linux/mfd/tc6393xb.h
index 7cc824a58f7c..fec7b3f7a81f 100644
--- a/include/linux/mfd/tc6393xb.h
+++ b/include/linux/mfd/tc6393xb.h
@@ -14,8 +14,8 @@
14 * published by the Free Software Foundation. 14 * published by the Free Software Foundation.
15 */ 15 */
16 16
17#ifndef TC6393XB_H 17#ifndef MFD_TC6393XB_H
18#define TC6393XB_H 18#define MFD_TC6393XB_H
19 19
20/* Also one should provide the CK3P6MI clock */ 20/* Also one should provide the CK3P6MI clock */
21struct tc6393xb_platform_data { 21struct tc6393xb_platform_data {
@@ -29,7 +29,7 @@ struct tc6393xb_platform_data {
29 int (*suspend)(struct platform_device *dev); 29 int (*suspend)(struct platform_device *dev);
30 int (*resume)(struct platform_device *dev); 30 int (*resume)(struct platform_device *dev);
31 31
32 int irq_base; /* a base for cascaded irq */ 32 int irq_base; /* base for subdevice irqs */
33 int gpio_base; 33 int gpio_base;
34 34
35 struct tmio_nand_data *nand_data; 35 struct tmio_nand_data *nand_data;
@@ -40,9 +40,6 @@ struct tc6393xb_platform_data {
40 */ 40 */
41#define IRQ_TC6393_NAND 0 41#define IRQ_TC6393_NAND 0
42#define IRQ_TC6393_MMC 1 42#define IRQ_TC6393_MMC 1
43#define IRQ_TC6393_OHCI 2
44#define IRQ_TC6393_SERIAL 3
45#define IRQ_TC6393_FB 4
46 43
47#define TC6393XB_NR_IRQS 8 44#define TC6393XB_NR_IRQS 8
48 45
diff --git a/include/linux/mfd/tmio.h b/include/linux/mfd/tmio.h
index 9438d8c9ac1c..ec612e66391c 100644
--- a/include/linux/mfd/tmio.h
+++ b/include/linux/mfd/tmio.h
@@ -1,6 +1,21 @@
1#ifndef MFD_TMIO_H 1#ifndef MFD_TMIO_H
2#define MFD_TMIO_H 2#define MFD_TMIO_H
3 3
4#define tmio_ioread8(addr) readb(addr)
5#define tmio_ioread16(addr) readw(addr)
6#define tmio_ioread16_rep(r, b, l) readsw(r, b, l)
7#define tmio_ioread32(addr) \
8 (((u32) readw((addr))) | (((u32) readw((addr) + 2)) << 16))
9
10#define tmio_iowrite8(val, addr) writeb((val), (addr))
11#define tmio_iowrite16(val, addr) writew((val), (addr))
12#define tmio_iowrite16_rep(r, b, l) writesw(r, b, l)
13#define tmio_iowrite32(val, addr) \
14 do { \
15 writew((val), (addr)); \
16 writew((val) >> 16, (addr) + 2); \
17 } while (0)
18
4/* 19/*
5 * data for the NAND controller 20 * data for the NAND controller
6 */ 21 */
@@ -10,8 +25,4 @@ struct tmio_nand_data {
10 unsigned int num_partitions; 25 unsigned int num_partitions;
11}; 26};
12 27
13#define TMIO_NAND_CONFIG "tmio-nand-config"
14#define TMIO_NAND_CONTROL "tmio-nand-control"
15#define TMIO_NAND_IRQ "tmio-nand"
16
17#endif 28#endif
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 335288bff1b7..fa651609b65d 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -834,7 +834,6 @@ extern int mprotect_fixup(struct vm_area_struct *vma,
834 struct vm_area_struct **pprev, unsigned long start, 834 struct vm_area_struct **pprev, unsigned long start,
835 unsigned long end, unsigned long newflags); 835 unsigned long end, unsigned long newflags);
836 836
837#ifdef CONFIG_HAVE_GET_USER_PAGES_FAST
838/* 837/*
839 * get_user_pages_fast provides equivalent functionality to get_user_pages, 838 * get_user_pages_fast provides equivalent functionality to get_user_pages,
840 * operating on current and current->mm (force=0 and doesn't return any vmas). 839 * operating on current and current->mm (force=0 and doesn't return any vmas).
@@ -848,25 +847,6 @@ extern int mprotect_fixup(struct vm_area_struct *vma,
848int get_user_pages_fast(unsigned long start, int nr_pages, int write, 847int get_user_pages_fast(unsigned long start, int nr_pages, int write,
849 struct page **pages); 848 struct page **pages);
850 849
851#else
852/*
853 * Should probably be moved to asm-generic, and architectures can include it if
854 * they don't implement their own get_user_pages_fast.
855 */
856#define get_user_pages_fast(start, nr_pages, write, pages) \
857({ \
858 struct mm_struct *mm = current->mm; \
859 int ret; \
860 \
861 down_read(&mm->mmap_sem); \
862 ret = get_user_pages(current, mm, start, nr_pages, \
863 write, 0, pages, NULL); \
864 up_read(&mm->mmap_sem); \
865 \
866 ret; \
867})
868#endif
869
870/* 850/*
871 * A callback you can register to apply pressure to ageable caches. 851 * A callback you can register to apply pressure to ageable caches.
872 * 852 *
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 825be3878f68..c0e14008a3c2 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -641,6 +641,7 @@ int pci_restore_state(struct pci_dev *dev);
641int pci_set_power_state(struct pci_dev *dev, pci_power_t state); 641int pci_set_power_state(struct pci_dev *dev, pci_power_t state);
642pci_power_t pci_choose_state(struct pci_dev *dev, pm_message_t state); 642pci_power_t pci_choose_state(struct pci_dev *dev, pm_message_t state);
643bool pci_pme_capable(struct pci_dev *dev, pci_power_t state); 643bool pci_pme_capable(struct pci_dev *dev, pci_power_t state);
644void pci_pme_active(struct pci_dev *dev, bool enable);
644int pci_enable_wake(struct pci_dev *dev, pci_power_t state, int enable); 645int pci_enable_wake(struct pci_dev *dev, pci_power_t state, int enable);
645pci_power_t pci_target_state(struct pci_dev *dev); 646pci_power_t pci_target_state(struct pci_dev *dev);
646int pci_prepare_to_sleep(struct pci_dev *dev); 647int pci_prepare_to_sleep(struct pci_dev *dev);
@@ -680,10 +681,12 @@ void pci_enable_bridges(struct pci_bus *bus);
680/* Proper probing supporting hot-pluggable devices */ 681/* Proper probing supporting hot-pluggable devices */
681int __must_check __pci_register_driver(struct pci_driver *, struct module *, 682int __must_check __pci_register_driver(struct pci_driver *, struct module *,
682 const char *mod_name); 683 const char *mod_name);
683static inline int __must_check pci_register_driver(struct pci_driver *driver) 684
684{ 685/*
685 return __pci_register_driver(driver, THIS_MODULE, KBUILD_MODNAME); 686 * pci_register_driver must be a macro so that KBUILD_MODNAME can be expanded
686} 687 */
688#define pci_register_driver(driver) \
689 __pci_register_driver(driver, THIS_MODULE, KBUILD_MODNAME)
687 690
688void pci_unregister_driver(struct pci_driver *dev); 691void pci_unregister_driver(struct pci_driver *dev);
689void pci_remove_behind_bridge(struct pci_dev *dev); 692void pci_remove_behind_bridge(struct pci_dev *dev);
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index 35a78415accc..9ec2bcce8e83 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -2177,8 +2177,6 @@
2177#define PCI_DEVICE_ID_HERC_WIN 0x5732 2177#define PCI_DEVICE_ID_HERC_WIN 0x5732
2178#define PCI_DEVICE_ID_HERC_UNI 0x5832 2178#define PCI_DEVICE_ID_HERC_UNI 0x5832
2179 2179
2180#define PCI_VENDOR_ID_RDC 0x17f3
2181
2182#define PCI_VENDOR_ID_SITECOM 0x182d 2180#define PCI_VENDOR_ID_SITECOM 0x182d
2183#define PCI_DEVICE_ID_SITECOM_DC105V2 0x3069 2181#define PCI_DEVICE_ID_SITECOM_DC105V2 0x3069
2184 2182
diff --git a/include/linux/rcuclassic.h b/include/linux/rcuclassic.h
index 8c774905dcfe..4ab843622727 100644
--- a/include/linux/rcuclassic.h
+++ b/include/linux/rcuclassic.h
@@ -117,7 +117,7 @@ extern int rcu_needs_cpu(int cpu);
117#ifdef CONFIG_DEBUG_LOCK_ALLOC 117#ifdef CONFIG_DEBUG_LOCK_ALLOC
118extern struct lockdep_map rcu_lock_map; 118extern struct lockdep_map rcu_lock_map;
119# define rcu_read_acquire() \ 119# define rcu_read_acquire() \
120 lock_acquire(&rcu_lock_map, 0, 0, 2, 1, _THIS_IP_) 120 lock_acquire(&rcu_lock_map, 0, 0, 2, 1, NULL, _THIS_IP_)
121# define rcu_read_release() lock_release(&rcu_lock_map, 1, _THIS_IP_) 121# define rcu_read_release() lock_release(&rcu_lock_map, 1, _THIS_IP_)
122#else 122#else
123# define rcu_read_acquire() do { } while (0) 123# define rcu_read_acquire() do { } while (0)
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 5270d449ff9d..5850bfb968a8 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1551,16 +1551,10 @@ static inline int set_cpus_allowed(struct task_struct *p, cpumask_t new_mask)
1551 1551
1552extern unsigned long long sched_clock(void); 1552extern unsigned long long sched_clock(void);
1553 1553
1554#ifndef CONFIG_HAVE_UNSTABLE_SCHED_CLOCK 1554extern void sched_clock_init(void);
1555static inline void sched_clock_init(void) 1555extern u64 sched_clock_cpu(int cpu);
1556{
1557}
1558
1559static inline u64 sched_clock_cpu(int cpu)
1560{
1561 return sched_clock();
1562}
1563 1556
1557#ifndef CONFIG_HAVE_UNSTABLE_SCHED_CLOCK
1564static inline void sched_clock_tick(void) 1558static inline void sched_clock_tick(void)
1565{ 1559{
1566} 1560}
@@ -1572,28 +1566,11 @@ static inline void sched_clock_idle_sleep_event(void)
1572static inline void sched_clock_idle_wakeup_event(u64 delta_ns) 1566static inline void sched_clock_idle_wakeup_event(u64 delta_ns)
1573{ 1567{
1574} 1568}
1575 1569#else
1576#ifdef CONFIG_NO_HZ
1577static inline void sched_clock_tick_stop(int cpu)
1578{
1579}
1580
1581static inline void sched_clock_tick_start(int cpu)
1582{
1583}
1584#endif
1585
1586#else /* CONFIG_HAVE_UNSTABLE_SCHED_CLOCK */
1587extern void sched_clock_init(void);
1588extern u64 sched_clock_cpu(int cpu);
1589extern void sched_clock_tick(void); 1570extern void sched_clock_tick(void);
1590extern void sched_clock_idle_sleep_event(void); 1571extern void sched_clock_idle_sleep_event(void);
1591extern void sched_clock_idle_wakeup_event(u64 delta_ns); 1572extern void sched_clock_idle_wakeup_event(u64 delta_ns);
1592#ifdef CONFIG_NO_HZ
1593extern void sched_clock_tick_stop(int cpu);
1594extern void sched_clock_tick_start(int cpu);
1595#endif 1573#endif
1596#endif /* CONFIG_HAVE_UNSTABLE_SCHED_CLOCK */
1597 1574
1598/* 1575/*
1599 * For kernel-internal use: high-speed (but slightly incorrect) per-cpu 1576 * For kernel-internal use: high-speed (but slightly incorrect) per-cpu
diff --git a/include/linux/seq_file.h b/include/linux/seq_file.h
index a66304a09955..a1783b229ef4 100644
--- a/include/linux/seq_file.h
+++ b/include/linux/seq_file.h
@@ -4,6 +4,8 @@
4#include <linux/types.h> 4#include <linux/types.h>
5#include <linux/string.h> 5#include <linux/string.h>
6#include <linux/mutex.h> 6#include <linux/mutex.h>
7#include <linux/cpumask.h>
8#include <linux/nodemask.h>
7 9
8struct seq_operations; 10struct seq_operations;
9struct file; 11struct file;
@@ -47,6 +49,16 @@ int seq_path(struct seq_file *, struct path *, char *);
47int seq_dentry(struct seq_file *, struct dentry *, char *); 49int seq_dentry(struct seq_file *, struct dentry *, char *);
48int seq_path_root(struct seq_file *m, struct path *path, struct path *root, 50int seq_path_root(struct seq_file *m, struct path *path, struct path *root,
49 char *esc); 51 char *esc);
52int seq_bitmap(struct seq_file *m, unsigned long *bits, unsigned int nr_bits);
53static inline int seq_cpumask(struct seq_file *m, cpumask_t *mask)
54{
55 return seq_bitmap(m, mask->bits, NR_CPUS);
56}
57
58static inline int seq_nodemask(struct seq_file *m, nodemask_t *mask)
59{
60 return seq_bitmap(m, mask->bits, MAX_NUMNODES);
61}
50 62
51int single_open(struct file *, int (*)(struct seq_file *, void *), void *); 63int single_open(struct file *, int (*)(struct seq_file *, void *), void *);
52int single_release(struct inode *, struct file *); 64int single_release(struct inode *, struct file *);
diff --git a/include/linux/slub_def.h b/include/linux/slub_def.h
index 5bad61a93f65..2f5c16b1aacd 100644
--- a/include/linux/slub_def.h
+++ b/include/linux/slub_def.h
@@ -46,6 +46,7 @@ struct kmem_cache_cpu {
46struct kmem_cache_node { 46struct kmem_cache_node {
47 spinlock_t list_lock; /* Protect partial list and nr_partial */ 47 spinlock_t list_lock; /* Protect partial list and nr_partial */
48 unsigned long nr_partial; 48 unsigned long nr_partial;
49 unsigned long min_partial;
49 struct list_head partial; 50 struct list_head partial;
50#ifdef CONFIG_SLUB_DEBUG 51#ifdef CONFIG_SLUB_DEBUG
51 atomic_long_t nr_slabs; 52 atomic_long_t nr_slabs;
diff --git a/include/linux/spinlock.h b/include/linux/spinlock.h
index 61e5610ad165..e0c0fccced46 100644
--- a/include/linux/spinlock.h
+++ b/include/linux/spinlock.h
@@ -183,8 +183,14 @@ do { \
183 183
184#ifdef CONFIG_DEBUG_LOCK_ALLOC 184#ifdef CONFIG_DEBUG_LOCK_ALLOC
185# define spin_lock_nested(lock, subclass) _spin_lock_nested(lock, subclass) 185# define spin_lock_nested(lock, subclass) _spin_lock_nested(lock, subclass)
186# define spin_lock_nest_lock(lock, nest_lock) \
187 do { \
188 typecheck(struct lockdep_map *, &(nest_lock)->dep_map);\
189 _spin_lock_nest_lock(lock, &(nest_lock)->dep_map); \
190 } while (0)
186#else 191#else
187# define spin_lock_nested(lock, subclass) _spin_lock(lock) 192# define spin_lock_nested(lock, subclass) _spin_lock(lock)
193# define spin_lock_nest_lock(lock, nest_lock) _spin_lock(lock)
188#endif 194#endif
189 195
190#define write_lock(lock) _write_lock(lock) 196#define write_lock(lock) _write_lock(lock)
diff --git a/include/linux/spinlock_api_smp.h b/include/linux/spinlock_api_smp.h
index 8a2307ce7296..d79845d034b5 100644
--- a/include/linux/spinlock_api_smp.h
+++ b/include/linux/spinlock_api_smp.h
@@ -22,6 +22,8 @@ int in_lock_functions(unsigned long addr);
22void __lockfunc _spin_lock(spinlock_t *lock) __acquires(lock); 22void __lockfunc _spin_lock(spinlock_t *lock) __acquires(lock);
23void __lockfunc _spin_lock_nested(spinlock_t *lock, int subclass) 23void __lockfunc _spin_lock_nested(spinlock_t *lock, int subclass)
24 __acquires(lock); 24 __acquires(lock);
25void __lockfunc _spin_lock_nest_lock(spinlock_t *lock, struct lockdep_map *map)
26 __acquires(lock);
25void __lockfunc _read_lock(rwlock_t *lock) __acquires(lock); 27void __lockfunc _read_lock(rwlock_t *lock) __acquires(lock);
26void __lockfunc _write_lock(rwlock_t *lock) __acquires(lock); 28void __lockfunc _write_lock(rwlock_t *lock) __acquires(lock);
27void __lockfunc _spin_lock_bh(spinlock_t *lock) __acquires(lock); 29void __lockfunc _spin_lock_bh(spinlock_t *lock) __acquires(lock);
diff --git a/include/linux/swab.h b/include/linux/swab.h
new file mode 100644
index 000000000000..270d5c208a89
--- /dev/null
+++ b/include/linux/swab.h
@@ -0,0 +1,309 @@
1#ifndef _LINUX_SWAB_H
2#define _LINUX_SWAB_H
3
4#include <linux/types.h>
5#include <linux/compiler.h>
6#include <asm/byteorder.h>
7
8/*
9 * casts are necessary for constants, because we never know how for sure
10 * how U/UL/ULL map to __u16, __u32, __u64. At least not in a portable way.
11 */
12#define __const_swab16(x) ((__u16)( \
13 (((__u16)(x) & (__u16)0x00ffU) << 8) | \
14 (((__u16)(x) & (__u16)0xff00U) >> 8)))
15
16#define __const_swab32(x) ((__u32)( \
17 (((__u32)(x) & (__u32)0x000000ffUL) << 24) | \
18 (((__u32)(x) & (__u32)0x0000ff00UL) << 8) | \
19 (((__u32)(x) & (__u32)0x00ff0000UL) >> 8) | \
20 (((__u32)(x) & (__u32)0xff000000UL) >> 24)))
21
22#define __const_swab64(x) ((__u64)( \
23 (((__u64)(x) & (__u64)0x00000000000000ffULL) << 56) | \
24 (((__u64)(x) & (__u64)0x000000000000ff00ULL) << 40) | \
25 (((__u64)(x) & (__u64)0x0000000000ff0000ULL) << 24) | \
26 (((__u64)(x) & (__u64)0x00000000ff000000ULL) << 8) | \
27 (((__u64)(x) & (__u64)0x000000ff00000000ULL) >> 8) | \
28 (((__u64)(x) & (__u64)0x0000ff0000000000ULL) >> 24) | \
29 (((__u64)(x) & (__u64)0x00ff000000000000ULL) >> 40) | \
30 (((__u64)(x) & (__u64)0xff00000000000000ULL) >> 56)))
31
32#define __const_swahw32(x) ((__u32)( \
33 (((__u32)(x) & (__u32)0x0000ffffUL) << 16) | \
34 (((__u32)(x) & (__u32)0xffff0000UL) >> 16)))
35
36#define __const_swahb32(x) ((__u32)( \
37 (((__u32)(x) & (__u32)0x00ff00ffUL) << 8) | \
38 (((__u32)(x) & (__u32)0xff00ff00UL) >> 8)))
39
40/*
41 * Implement the following as inlines, but define the interface using
42 * macros to allow constant folding when possible:
43 * ___swab16, ___swab32, ___swab64, ___swahw32, ___swahb32
44 */
45
46static inline __attribute_const__ __u16 ___swab16(__u16 val)
47{
48#ifdef __arch_swab16
49 return __arch_swab16(val);
50#elif defined(__arch_swab16p)
51 return __arch_swab16p(&val);
52#else
53 return __const_swab16(val);
54#endif
55}
56
57static inline __attribute_const__ __u32 ___swab32(__u32 val)
58{
59#ifdef __arch_swab32
60 return __arch_swab32(val);
61#elif defined(__arch_swab32p)
62 return __arch_swab32p(&val);
63#else
64 return __const_swab32(val);
65#endif
66}
67
68static inline __attribute_const__ __u64 ___swab64(__u64 val)
69{
70#ifdef __arch_swab64
71 return __arch_swab64(val);
72#elif defined(__arch_swab64p)
73 return __arch_swab64p(&val);
74#elif defined(__SWAB_64_THRU_32__)
75 __u32 h = val >> 32;
76 __u32 l = val & ((1ULL << 32) - 1);
77 return (((__u64)___swab32(l)) << 32) | ((__u64)(___swab32(h)));
78#else
79 return __const_swab64(val);
80#endif
81}
82
83static inline __attribute_const__ __u32 ___swahw32(__u32 val)
84{
85#ifdef __arch_swahw32
86 return __arch_swahw32(val);
87#elif defined(__arch_swahw32p)
88 return __arch_swahw32p(&val);
89#else
90 return __const_swahw32(val);
91#endif
92}
93
94static inline __attribute_const__ __u32 ___swahb32(__u32 val)
95{
96#ifdef __arch_swahb32
97 return __arch_swahb32(val);
98#elif defined(__arch_swahb32p)
99 return __arch_swahb32p(&val);
100#else
101 return __const_swahb32(val);
102#endif
103}
104
105/**
106 * __swab16 - return a byteswapped 16-bit value
107 * @x: value to byteswap
108 */
109#define __swab16(x) \
110 (__builtin_constant_p((__u16)(x)) ? \
111 __const_swab16((x)) : \
112 ___swab16((x)))
113
114/**
115 * __swab32 - return a byteswapped 32-bit value
116 * @x: value to byteswap
117 */
118#define __swab32(x) \
119 (__builtin_constant_p((__u32)(x)) ? \
120 __const_swab32((x)) : \
121 ___swab32((x)))
122
123/**
124 * __swab64 - return a byteswapped 64-bit value
125 * @x: value to byteswap
126 */
127#define __swab64(x) \
128 (__builtin_constant_p((__u64)(x)) ? \
129 __const_swab64((x)) : \
130 ___swab64((x)))
131
132/**
133 * __swahw32 - return a word-swapped 32-bit value
134 * @x: value to wordswap
135 *
136 * __swahw32(0x12340000) is 0x00001234
137 */
138#define __swahw32(x) \
139 (__builtin_constant_p((__u32)(x)) ? \
140 __const_swahw32((x)) : \
141 ___swahw32((x)))
142
143/**
144 * __swahb32 - return a high and low byte-swapped 32-bit value
145 * @x: value to byteswap
146 *
147 * __swahb32(0x12345678) is 0x34127856
148 */
149#define __swahb32(x) \
150 (__builtin_constant_p((__u32)(x)) ? \
151 __const_swahb32((x)) : \
152 ___swahb32((x)))
153
154/**
155 * __swab16p - return a byteswapped 16-bit value from a pointer
156 * @p: pointer to a naturally-aligned 16-bit value
157 */
158static inline __u16 __swab16p(const __u16 *p)
159{
160#ifdef __arch_swab16p
161 return __arch_swab16p(p);
162#else
163 return __swab16(*p);
164#endif
165}
166
167/**
168 * __swab32p - return a byteswapped 32-bit value from a pointer
169 * @p: pointer to a naturally-aligned 32-bit value
170 */
171static inline __u32 __swab32p(const __u32 *p)
172{
173#ifdef __arch_swab32p
174 return __arch_swab32p(p);
175#else
176 return __swab32(*p);
177#endif
178}
179
180/**
181 * __swab64p - return a byteswapped 64-bit value from a pointer
182 * @p: pointer to a naturally-aligned 64-bit value
183 */
184static inline __u64 __swab64p(const __u64 *p)
185{
186#ifdef __arch_swab64p
187 return __arch_swab64p(p);
188#else
189 return __swab64(*p);
190#endif
191}
192
193/**
194 * __swahw32p - return a wordswapped 32-bit value from a pointer
195 * @p: pointer to a naturally-aligned 32-bit value
196 *
197 * See __swahw32() for details of wordswapping.
198 */
199static inline __u32 __swahw32p(const __u32 *p)
200{
201#ifdef __arch_swahw32p
202 return __arch_swahw32p(p);
203#else
204 return __swahw32(*p);
205#endif
206}
207
208/**
209 * __swahb32p - return a high and low byteswapped 32-bit value from a pointer
210 * @p: pointer to a naturally-aligned 32-bit value
211 *
212 * See __swahb32() for details of high/low byteswapping.
213 */
214static inline __u32 __swahb32p(const __u32 *p)
215{
216#ifdef __arch_swahb32p
217 return __arch_swahb32p(p);
218#else
219 return __swahb32(*p);
220#endif
221}
222
223/**
224 * __swab16s - byteswap a 16-bit value in-place
225 * @p: pointer to a naturally-aligned 16-bit value
226 */
227static inline void __swab16s(__u16 *p)
228{
229#ifdef __arch_swab16s
230 __arch_swab16s(p);
231#else
232 *p = __swab16p(p);
233#endif
234}
235/**
236 * __swab32s - byteswap a 32-bit value in-place
237 * @p: pointer to a naturally-aligned 32-bit value
238 */
239static inline void __swab32s(__u32 *p)
240{
241#ifdef __arch_swab32s
242 __arch_swab32s(p);
243#else
244 *p = __swab32p(p);
245#endif
246}
247
248/**
249 * __swab64s - byteswap a 64-bit value in-place
250 * @p: pointer to a naturally-aligned 64-bit value
251 */
252static inline void __swab64s(__u64 *p)
253{
254#ifdef __arch_swab64s
255 __arch_swab64s(p);
256#else
257 *p = __swab64p(p);
258#endif
259}
260
261/**
262 * __swahw32s - wordswap a 32-bit value in-place
263 * @p: pointer to a naturally-aligned 32-bit value
264 *
265 * See __swahw32() for details of wordswapping
266 */
267static inline void __swahw32s(__u32 *p)
268{
269#ifdef __arch_swahw32s
270 __arch_swahw32s(p);
271#else
272 *p = __swahw32p(p);
273#endif
274}
275
276/**
277 * __swahb32s - high and low byteswap a 32-bit value in-place
278 * @p: pointer to a naturally-aligned 32-bit value
279 *
280 * See __swahb32() for details of high and low byte swapping
281 */
282static inline void __swahb32s(__u32 *p)
283{
284#ifdef __arch_swahb32s
285 __arch_swahb32s(p);
286#else
287 *p = __swahb32p(p);
288#endif
289}
290
291#ifdef __KERNEL__
292# define swab16 __swab16
293# define swab32 __swab32
294# define swab64 __swab64
295# define swahw32 __swahw32
296# define swahb32 __swahb32
297# define swab16p __swab16p
298# define swab32p __swab32p
299# define swab64p __swab64p
300# define swahw32p __swahw32p
301# define swahb32p __swahb32p
302# define swab16s __swab16s
303# define swab32s __swab32s
304# define swab64s __swab64s
305# define swahw32s __swahw32s
306# define swahb32s __swahb32s
307#endif /* __KERNEL__ */
308
309#endif /* _LINUX_SWAB_H */
diff --git a/include/video/atmel_lcdc.h b/include/video/atmel_lcdc.h
index 613173b5db69..920c4e9cb93d 100644
--- a/include/video/atmel_lcdc.h
+++ b/include/video/atmel_lcdc.h
@@ -41,6 +41,7 @@ struct atmel_lcdfb_info {
41 struct work_struct task; 41 struct work_struct task;
42 42
43 unsigned int guard_time; 43 unsigned int guard_time;
44 unsigned int smem_len;
44 struct platform_device *pdev; 45 struct platform_device *pdev;
45 struct clk *bus_clk; 46 struct clk *bus_clk;
46 struct clk *lcdc_clk; 47 struct clk *lcdc_clk;
diff --git a/include/video/radeon.h b/include/video/radeon.h
index 95a1f2038b1d..099ffa5e5bee 100644
--- a/include/video/radeon.h
+++ b/include/video/radeon.h
@@ -742,6 +742,10 @@
742#define SOFT_RESET_RB (1 << 6) 742#define SOFT_RESET_RB (1 << 6)
743#define SOFT_RESET_HDP (1 << 7) 743#define SOFT_RESET_HDP (1 << 7)
744 744
745/* WAIT_UNTIL bit constants */
746#define WAIT_DMA_GUI_IDLE (1 << 9)
747#define WAIT_2D_IDLECLEAN (1 << 16)
748
745/* SURFACE_CNTL bit consants */ 749/* SURFACE_CNTL bit consants */
746#define SURF_TRANSLATION_DIS (1 << 8) 750#define SURF_TRANSLATION_DIS (1 << 8)
747#define NONSURF_AP0_SWP_16BPP (1 << 20) 751#define NONSURF_AP0_SWP_16BPP (1 << 20)
diff --git a/init/main.c b/init/main.c
index 0bc7e167bf45..f6f7042331dc 100644
--- a/init/main.c
+++ b/init/main.c
@@ -691,7 +691,7 @@ asmlinkage void __init start_kernel(void)
691 rest_init(); 691 rest_init();
692} 692}
693 693
694static int __initdata initcall_debug; 694static int initcall_debug;
695 695
696static int __init initcall_debug_setup(char *str) 696static int __init initcall_debug_setup(char *str)
697{ 697{
@@ -700,7 +700,7 @@ static int __init initcall_debug_setup(char *str)
700} 700}
701__setup("initcall_debug", initcall_debug_setup); 701__setup("initcall_debug", initcall_debug_setup);
702 702
703static void __init do_one_initcall(initcall_t fn) 703int do_one_initcall(initcall_t fn)
704{ 704{
705 int count = preempt_count(); 705 int count = preempt_count();
706 ktime_t t0, t1, delta; 706 ktime_t t0, t1, delta;
@@ -740,6 +740,8 @@ static void __init do_one_initcall(initcall_t fn)
740 print_fn_descriptor_symbol(KERN_WARNING "initcall %s", fn); 740 print_fn_descriptor_symbol(KERN_WARNING "initcall %s", fn);
741 printk(" returned with %s\n", msgbuf); 741 printk(" returned with %s\n", msgbuf);
742 } 742 }
743
744 return result;
743} 745}
744 746
745 747
diff --git a/kernel/Kconfig.hz b/kernel/Kconfig.hz
index 382dd5a8b2d7..94fabd534b03 100644
--- a/kernel/Kconfig.hz
+++ b/kernel/Kconfig.hz
@@ -55,4 +55,4 @@ config HZ
55 default 1000 if HZ_1000 55 default 1000 if HZ_1000
56 56
57config SCHED_HRTICK 57config SCHED_HRTICK
58 def_bool HIGH_RES_TIMERS && USE_GENERIC_SMP_HELPERS 58 def_bool HIGH_RES_TIMERS && (!SMP || USE_GENERIC_SMP_HELPERS)
diff --git a/kernel/cpu.c b/kernel/cpu.c
index e202a68d1cc1..f17e9854c246 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -349,6 +349,8 @@ static int __cpuinit _cpu_up(unsigned int cpu, int tasks_frozen)
349 goto out_notify; 349 goto out_notify;
350 BUG_ON(!cpu_online(cpu)); 350 BUG_ON(!cpu_online(cpu));
351 351
352 cpu_set(cpu, cpu_active_map);
353
352 /* Now call notifier in preparation. */ 354 /* Now call notifier in preparation. */
353 raw_notifier_call_chain(&cpu_chain, CPU_ONLINE | mod, hcpu); 355 raw_notifier_call_chain(&cpu_chain, CPU_ONLINE | mod, hcpu);
354 356
@@ -367,7 +369,7 @@ int __cpuinit cpu_up(unsigned int cpu)
367 if (!cpu_isset(cpu, cpu_possible_map)) { 369 if (!cpu_isset(cpu, cpu_possible_map)) {
368 printk(KERN_ERR "can't online cpu %d because it is not " 370 printk(KERN_ERR "can't online cpu %d because it is not "
369 "configured as may-hotadd at boot time\n", cpu); 371 "configured as may-hotadd at boot time\n", cpu);
370#if defined(CONFIG_IA64) || defined(CONFIG_X86_64) || defined(CONFIG_S390) 372#if defined(CONFIG_IA64) || defined(CONFIG_X86_64)
371 printk(KERN_ERR "please check additional_cpus= boot " 373 printk(KERN_ERR "please check additional_cpus= boot "
372 "parameter\n"); 374 "parameter\n");
373#endif 375#endif
@@ -383,9 +385,6 @@ int __cpuinit cpu_up(unsigned int cpu)
383 385
384 err = _cpu_up(cpu, 0); 386 err = _cpu_up(cpu, 0);
385 387
386 if (cpu_online(cpu))
387 cpu_set(cpu, cpu_active_map);
388
389out: 388out:
390 cpu_maps_update_done(); 389 cpu_maps_update_done();
391 return err; 390 return err;
diff --git a/kernel/dma-coherent.c b/kernel/dma-coherent.c
index 91e96950cd52..c1d4d5b4c61c 100644
--- a/kernel/dma-coherent.c
+++ b/kernel/dma-coherent.c
@@ -92,7 +92,7 @@ void *dma_mark_declared_memory_occupied(struct device *dev,
92EXPORT_SYMBOL(dma_mark_declared_memory_occupied); 92EXPORT_SYMBOL(dma_mark_declared_memory_occupied);
93 93
94/** 94/**
95 * Try to allocate memory from the per-device coherent area. 95 * dma_alloc_from_coherent() - try to allocate memory from the per-device coherent area
96 * 96 *
97 * @dev: device from which we allocate memory 97 * @dev: device from which we allocate memory
98 * @size: size of requested memory area 98 * @size: size of requested memory area
@@ -100,11 +100,11 @@ EXPORT_SYMBOL(dma_mark_declared_memory_occupied);
100 * @ret: This pointer will be filled with the virtual address 100 * @ret: This pointer will be filled with the virtual address
101 * to allocated area. 101 * to allocated area.
102 * 102 *
103 * This function should be only called from per-arch %dma_alloc_coherent() 103 * This function should be only called from per-arch dma_alloc_coherent()
104 * to support allocation from per-device coherent memory pools. 104 * to support allocation from per-device coherent memory pools.
105 * 105 *
106 * Returns 0 if dma_alloc_coherent should continue with allocating from 106 * Returns 0 if dma_alloc_coherent should continue with allocating from
107 * generic memory areas, or !0 if dma_alloc_coherent should return %ret. 107 * generic memory areas, or !0 if dma_alloc_coherent should return @ret.
108 */ 108 */
109int dma_alloc_from_coherent(struct device *dev, ssize_t size, 109int dma_alloc_from_coherent(struct device *dev, ssize_t size,
110 dma_addr_t *dma_handle, void **ret) 110 dma_addr_t *dma_handle, void **ret)
@@ -126,7 +126,7 @@ int dma_alloc_from_coherent(struct device *dev, ssize_t size,
126} 126}
127 127
128/** 128/**
129 * Try to free the memory allocated from per-device coherent memory pool. 129 * dma_release_from_coherent() - try to free the memory allocated from per-device coherent memory pool
130 * @dev: device from which the memory was allocated 130 * @dev: device from which the memory was allocated
131 * @order: the order of pages allocated 131 * @order: the order of pages allocated
132 * @vaddr: virtual address of allocated pages 132 * @vaddr: virtual address of allocated pages
@@ -135,7 +135,7 @@ int dma_alloc_from_coherent(struct device *dev, ssize_t size,
135 * coherent memory pool and if so, releases that memory. 135 * coherent memory pool and if so, releases that memory.
136 * 136 *
137 * Returns 1 if we correctly released the memory, or 0 if 137 * Returns 1 if we correctly released the memory, or 0 if
138 * %dma_release_coherent() should proceed with releasing memory from 138 * dma_release_coherent() should proceed with releasing memory from
139 * generic pools. 139 * generic pools.
140 */ 140 */
141int dma_release_from_coherent(struct device *dev, int order, void *vaddr) 141int dma_release_from_coherent(struct device *dev, int order, void *vaddr)
diff --git a/kernel/irq/proc.c b/kernel/irq/proc.c
index 6c6d35d68ee9..a09dd29c2fd7 100644
--- a/kernel/irq/proc.c
+++ b/kernel/irq/proc.c
@@ -8,6 +8,7 @@
8 8
9#include <linux/irq.h> 9#include <linux/irq.h>
10#include <linux/proc_fs.h> 10#include <linux/proc_fs.h>
11#include <linux/seq_file.h>
11#include <linux/interrupt.h> 12#include <linux/interrupt.h>
12 13
13#include "internals.h" 14#include "internals.h"
@@ -16,23 +17,18 @@ static struct proc_dir_entry *root_irq_dir;
16 17
17#ifdef CONFIG_SMP 18#ifdef CONFIG_SMP
18 19
19static int irq_affinity_read_proc(char *page, char **start, off_t off, 20static int irq_affinity_proc_show(struct seq_file *m, void *v)
20 int count, int *eof, void *data)
21{ 21{
22 struct irq_desc *desc = irq_desc + (long)data; 22 struct irq_desc *desc = irq_desc + (long)m->private;
23 cpumask_t *mask = &desc->affinity; 23 cpumask_t *mask = &desc->affinity;
24 int len;
25 24
26#ifdef CONFIG_GENERIC_PENDING_IRQ 25#ifdef CONFIG_GENERIC_PENDING_IRQ
27 if (desc->status & IRQ_MOVE_PENDING) 26 if (desc->status & IRQ_MOVE_PENDING)
28 mask = &desc->pending_mask; 27 mask = &desc->pending_mask;
29#endif 28#endif
30 len = cpumask_scnprintf(page, count, *mask); 29 seq_cpumask(m, mask);
31 30 seq_putc(m, '\n');
32 if (count - len < 2) 31 return 0;
33 return -EINVAL;
34 len += sprintf(page + len, "\n");
35 return len;
36} 32}
37 33
38#ifndef is_affinity_mask_valid 34#ifndef is_affinity_mask_valid
@@ -40,11 +36,12 @@ static int irq_affinity_read_proc(char *page, char **start, off_t off,
40#endif 36#endif
41 37
42int no_irq_affinity; 38int no_irq_affinity;
43static int irq_affinity_write_proc(struct file *file, const char __user *buffer, 39static ssize_t irq_affinity_proc_write(struct file *file,
44 unsigned long count, void *data) 40 const char __user *buffer, size_t count, loff_t *pos)
45{ 41{
46 unsigned int irq = (int)(long)data, full_count = count, err; 42 unsigned int irq = (int)(long)PDE(file->f_path.dentry->d_inode)->data;
47 cpumask_t new_value; 43 cpumask_t new_value;
44 int err;
48 45
49 if (!irq_desc[irq].chip->set_affinity || no_irq_affinity || 46 if (!irq_desc[irq].chip->set_affinity || no_irq_affinity ||
50 irq_balancing_disabled(irq)) 47 irq_balancing_disabled(irq))
@@ -65,28 +62,38 @@ static int irq_affinity_write_proc(struct file *file, const char __user *buffer,
65 if (!cpus_intersects(new_value, cpu_online_map)) 62 if (!cpus_intersects(new_value, cpu_online_map))
66 /* Special case for empty set - allow the architecture 63 /* Special case for empty set - allow the architecture
67 code to set default SMP affinity. */ 64 code to set default SMP affinity. */
68 return irq_select_affinity(irq) ? -EINVAL : full_count; 65 return irq_select_affinity(irq) ? -EINVAL : count;
69 66
70 irq_set_affinity(irq, new_value); 67 irq_set_affinity(irq, new_value);
71 68
72 return full_count; 69 return count;
73} 70}
74 71
75static int default_affinity_read(char *page, char **start, off_t off, 72static int irq_affinity_proc_open(struct inode *inode, struct file *file)
76 int count, int *eof, void *data)
77{ 73{
78 int len = cpumask_scnprintf(page, count, irq_default_affinity); 74 return single_open(file, irq_affinity_proc_show, PDE(inode)->data);
79 if (count - len < 2)
80 return -EINVAL;
81 len += sprintf(page + len, "\n");
82 return len;
83} 75}
84 76
85static int default_affinity_write(struct file *file, const char __user *buffer, 77static const struct file_operations irq_affinity_proc_fops = {
86 unsigned long count, void *data) 78 .open = irq_affinity_proc_open,
79 .read = seq_read,
80 .llseek = seq_lseek,
81 .release = single_release,
82 .write = irq_affinity_proc_write,
83};
84
85static int default_affinity_show(struct seq_file *m, void *v)
86{
87 seq_cpumask(m, &irq_default_affinity);
88 seq_putc(m, '\n');
89 return 0;
90}
91
92static ssize_t default_affinity_write(struct file *file,
93 const char __user *buffer, size_t count, loff_t *ppos)
87{ 94{
88 unsigned int full_count = count, err;
89 cpumask_t new_value; 95 cpumask_t new_value;
96 int err;
90 97
91 err = cpumask_parse_user(buffer, count, new_value); 98 err = cpumask_parse_user(buffer, count, new_value);
92 if (err) 99 if (err)
@@ -105,8 +112,21 @@ static int default_affinity_write(struct file *file, const char __user *buffer,
105 112
106 irq_default_affinity = new_value; 113 irq_default_affinity = new_value;
107 114
108 return full_count; 115 return count;
109} 116}
117
118static int default_affinity_open(struct inode *inode, struct file *file)
119{
120 return single_open(file, default_affinity_show, NULL);
121}
122
123static const struct file_operations default_affinity_proc_fops = {
124 .open = default_affinity_open,
125 .read = seq_read,
126 .llseek = seq_lseek,
127 .release = single_release,
128 .write = default_affinity_write,
129};
110#endif 130#endif
111 131
112static int irq_spurious_read(char *page, char **start, off_t off, 132static int irq_spurious_read(char *page, char **start, off_t off,
@@ -178,16 +198,9 @@ void register_irq_proc(unsigned int irq)
178 irq_desc[irq].dir = proc_mkdir(name, root_irq_dir); 198 irq_desc[irq].dir = proc_mkdir(name, root_irq_dir);
179 199
180#ifdef CONFIG_SMP 200#ifdef CONFIG_SMP
181 { 201 /* create /proc/irq/<irq>/smp_affinity */
182 /* create /proc/irq/<irq>/smp_affinity */ 202 proc_create_data("smp_affinity", 0600, irq_desc[irq].dir,
183 entry = create_proc_entry("smp_affinity", 0600, irq_desc[irq].dir); 203 &irq_affinity_proc_fops, (void *)(long)irq);
184
185 if (entry) {
186 entry->data = (void *)(long)irq;
187 entry->read_proc = irq_affinity_read_proc;
188 entry->write_proc = irq_affinity_write_proc;
189 }
190 }
191#endif 204#endif
192 205
193 entry = create_proc_entry("spurious", 0444, irq_desc[irq].dir); 206 entry = create_proc_entry("spurious", 0444, irq_desc[irq].dir);
@@ -208,15 +221,8 @@ void unregister_handler_proc(unsigned int irq, struct irqaction *action)
208void register_default_affinity_proc(void) 221void register_default_affinity_proc(void)
209{ 222{
210#ifdef CONFIG_SMP 223#ifdef CONFIG_SMP
211 struct proc_dir_entry *entry; 224 proc_create("irq/default_smp_affinity", 0600, NULL,
212 225 &default_affinity_proc_fops);
213 /* create /proc/irq/default_smp_affinity */
214 entry = create_proc_entry("default_smp_affinity", 0600, root_irq_dir);
215 if (entry) {
216 entry->data = NULL;
217 entry->read_proc = default_affinity_read;
218 entry->write_proc = default_affinity_write;
219 }
220#endif 226#endif
221} 227}
222 228
diff --git a/kernel/lockdep.c b/kernel/lockdep.c
index d38a64362973..1aa91fd6b06e 100644
--- a/kernel/lockdep.c
+++ b/kernel/lockdep.c
@@ -124,6 +124,15 @@ static struct lock_list list_entries[MAX_LOCKDEP_ENTRIES];
124unsigned long nr_lock_classes; 124unsigned long nr_lock_classes;
125static struct lock_class lock_classes[MAX_LOCKDEP_KEYS]; 125static struct lock_class lock_classes[MAX_LOCKDEP_KEYS];
126 126
127static inline struct lock_class *hlock_class(struct held_lock *hlock)
128{
129 if (!hlock->class_idx) {
130 DEBUG_LOCKS_WARN_ON(1);
131 return NULL;
132 }
133 return lock_classes + hlock->class_idx - 1;
134}
135
127#ifdef CONFIG_LOCK_STAT 136#ifdef CONFIG_LOCK_STAT
128static DEFINE_PER_CPU(struct lock_class_stats[MAX_LOCKDEP_KEYS], lock_stats); 137static DEFINE_PER_CPU(struct lock_class_stats[MAX_LOCKDEP_KEYS], lock_stats);
129 138
@@ -222,7 +231,7 @@ static void lock_release_holdtime(struct held_lock *hlock)
222 231
223 holdtime = sched_clock() - hlock->holdtime_stamp; 232 holdtime = sched_clock() - hlock->holdtime_stamp;
224 233
225 stats = get_lock_stats(hlock->class); 234 stats = get_lock_stats(hlock_class(hlock));
226 if (hlock->read) 235 if (hlock->read)
227 lock_time_inc(&stats->read_holdtime, holdtime); 236 lock_time_inc(&stats->read_holdtime, holdtime);
228 else 237 else
@@ -372,6 +381,19 @@ unsigned int nr_process_chains;
372unsigned int max_lockdep_depth; 381unsigned int max_lockdep_depth;
373unsigned int max_recursion_depth; 382unsigned int max_recursion_depth;
374 383
384static unsigned int lockdep_dependency_gen_id;
385
386static bool lockdep_dependency_visit(struct lock_class *source,
387 unsigned int depth)
388{
389 if (!depth)
390 lockdep_dependency_gen_id++;
391 if (source->dep_gen_id == lockdep_dependency_gen_id)
392 return true;
393 source->dep_gen_id = lockdep_dependency_gen_id;
394 return false;
395}
396
375#ifdef CONFIG_DEBUG_LOCKDEP 397#ifdef CONFIG_DEBUG_LOCKDEP
376/* 398/*
377 * We cannot printk in early bootup code. Not even early_printk() 399 * We cannot printk in early bootup code. Not even early_printk()
@@ -505,7 +527,7 @@ static void print_lockdep_cache(struct lockdep_map *lock)
505 527
506static void print_lock(struct held_lock *hlock) 528static void print_lock(struct held_lock *hlock)
507{ 529{
508 print_lock_name(hlock->class); 530 print_lock_name(hlock_class(hlock));
509 printk(", at: "); 531 printk(", at: ");
510 print_ip_sym(hlock->acquire_ip); 532 print_ip_sym(hlock->acquire_ip);
511} 533}
@@ -558,6 +580,9 @@ static void print_lock_dependencies(struct lock_class *class, int depth)
558{ 580{
559 struct lock_list *entry; 581 struct lock_list *entry;
560 582
583 if (lockdep_dependency_visit(class, depth))
584 return;
585
561 if (DEBUG_LOCKS_WARN_ON(depth >= 20)) 586 if (DEBUG_LOCKS_WARN_ON(depth >= 20))
562 return; 587 return;
563 588
@@ -932,7 +957,7 @@ static noinline int print_circular_bug_tail(void)
932 if (debug_locks_silent) 957 if (debug_locks_silent)
933 return 0; 958 return 0;
934 959
935 this.class = check_source->class; 960 this.class = hlock_class(check_source);
936 if (!save_trace(&this.trace)) 961 if (!save_trace(&this.trace))
937 return 0; 962 return 0;
938 963
@@ -959,6 +984,67 @@ static int noinline print_infinite_recursion_bug(void)
959 return 0; 984 return 0;
960} 985}
961 986
987unsigned long __lockdep_count_forward_deps(struct lock_class *class,
988 unsigned int depth)
989{
990 struct lock_list *entry;
991 unsigned long ret = 1;
992
993 if (lockdep_dependency_visit(class, depth))
994 return 0;
995
996 /*
997 * Recurse this class's dependency list:
998 */
999 list_for_each_entry(entry, &class->locks_after, entry)
1000 ret += __lockdep_count_forward_deps(entry->class, depth + 1);
1001
1002 return ret;
1003}
1004
1005unsigned long lockdep_count_forward_deps(struct lock_class *class)
1006{
1007 unsigned long ret, flags;
1008
1009 local_irq_save(flags);
1010 __raw_spin_lock(&lockdep_lock);
1011 ret = __lockdep_count_forward_deps(class, 0);
1012 __raw_spin_unlock(&lockdep_lock);
1013 local_irq_restore(flags);
1014
1015 return ret;
1016}
1017
1018unsigned long __lockdep_count_backward_deps(struct lock_class *class,
1019 unsigned int depth)
1020{
1021 struct lock_list *entry;
1022 unsigned long ret = 1;
1023
1024 if (lockdep_dependency_visit(class, depth))
1025 return 0;
1026 /*
1027 * Recurse this class's dependency list:
1028 */
1029 list_for_each_entry(entry, &class->locks_before, entry)
1030 ret += __lockdep_count_backward_deps(entry->class, depth + 1);
1031
1032 return ret;
1033}
1034
1035unsigned long lockdep_count_backward_deps(struct lock_class *class)
1036{
1037 unsigned long ret, flags;
1038
1039 local_irq_save(flags);
1040 __raw_spin_lock(&lockdep_lock);
1041 ret = __lockdep_count_backward_deps(class, 0);
1042 __raw_spin_unlock(&lockdep_lock);
1043 local_irq_restore(flags);
1044
1045 return ret;
1046}
1047
962/* 1048/*
963 * Prove that the dependency graph starting at <entry> can not 1049 * Prove that the dependency graph starting at <entry> can not
964 * lead to <target>. Print an error and return 0 if it does. 1050 * lead to <target>. Print an error and return 0 if it does.
@@ -968,6 +1054,9 @@ check_noncircular(struct lock_class *source, unsigned int depth)
968{ 1054{
969 struct lock_list *entry; 1055 struct lock_list *entry;
970 1056
1057 if (lockdep_dependency_visit(source, depth))
1058 return 1;
1059
971 debug_atomic_inc(&nr_cyclic_check_recursions); 1060 debug_atomic_inc(&nr_cyclic_check_recursions);
972 if (depth > max_recursion_depth) 1061 if (depth > max_recursion_depth)
973 max_recursion_depth = depth; 1062 max_recursion_depth = depth;
@@ -977,7 +1066,7 @@ check_noncircular(struct lock_class *source, unsigned int depth)
977 * Check this lock's dependency list: 1066 * Check this lock's dependency list:
978 */ 1067 */
979 list_for_each_entry(entry, &source->locks_after, entry) { 1068 list_for_each_entry(entry, &source->locks_after, entry) {
980 if (entry->class == check_target->class) 1069 if (entry->class == hlock_class(check_target))
981 return print_circular_bug_header(entry, depth+1); 1070 return print_circular_bug_header(entry, depth+1);
982 debug_atomic_inc(&nr_cyclic_checks); 1071 debug_atomic_inc(&nr_cyclic_checks);
983 if (!check_noncircular(entry->class, depth+1)) 1072 if (!check_noncircular(entry->class, depth+1))
@@ -1011,6 +1100,9 @@ find_usage_forwards(struct lock_class *source, unsigned int depth)
1011 struct lock_list *entry; 1100 struct lock_list *entry;
1012 int ret; 1101 int ret;
1013 1102
1103 if (lockdep_dependency_visit(source, depth))
1104 return 1;
1105
1014 if (depth > max_recursion_depth) 1106 if (depth > max_recursion_depth)
1015 max_recursion_depth = depth; 1107 max_recursion_depth = depth;
1016 if (depth >= RECURSION_LIMIT) 1108 if (depth >= RECURSION_LIMIT)
@@ -1050,6 +1142,9 @@ find_usage_backwards(struct lock_class *source, unsigned int depth)
1050 struct lock_list *entry; 1142 struct lock_list *entry;
1051 int ret; 1143 int ret;
1052 1144
1145 if (lockdep_dependency_visit(source, depth))
1146 return 1;
1147
1053 if (!__raw_spin_is_locked(&lockdep_lock)) 1148 if (!__raw_spin_is_locked(&lockdep_lock))
1054 return DEBUG_LOCKS_WARN_ON(1); 1149 return DEBUG_LOCKS_WARN_ON(1);
1055 1150
@@ -1064,6 +1159,11 @@ find_usage_backwards(struct lock_class *source, unsigned int depth)
1064 return 2; 1159 return 2;
1065 } 1160 }
1066 1161
1162 if (!source && debug_locks_off_graph_unlock()) {
1163 WARN_ON(1);
1164 return 0;
1165 }
1166
1067 /* 1167 /*
1068 * Check this lock's dependency list: 1168 * Check this lock's dependency list:
1069 */ 1169 */
@@ -1103,9 +1203,9 @@ print_bad_irq_dependency(struct task_struct *curr,
1103 printk("\nand this task is already holding:\n"); 1203 printk("\nand this task is already holding:\n");
1104 print_lock(prev); 1204 print_lock(prev);
1105 printk("which would create a new lock dependency:\n"); 1205 printk("which would create a new lock dependency:\n");
1106 print_lock_name(prev->class); 1206 print_lock_name(hlock_class(prev));
1107 printk(" ->"); 1207 printk(" ->");
1108 print_lock_name(next->class); 1208 print_lock_name(hlock_class(next));
1109 printk("\n"); 1209 printk("\n");
1110 1210
1111 printk("\nbut this new dependency connects a %s-irq-safe lock:\n", 1211 printk("\nbut this new dependency connects a %s-irq-safe lock:\n",
@@ -1146,12 +1246,12 @@ check_usage(struct task_struct *curr, struct held_lock *prev,
1146 1246
1147 find_usage_bit = bit_backwards; 1247 find_usage_bit = bit_backwards;
1148 /* fills in <backwards_match> */ 1248 /* fills in <backwards_match> */
1149 ret = find_usage_backwards(prev->class, 0); 1249 ret = find_usage_backwards(hlock_class(prev), 0);
1150 if (!ret || ret == 1) 1250 if (!ret || ret == 1)
1151 return ret; 1251 return ret;
1152 1252
1153 find_usage_bit = bit_forwards; 1253 find_usage_bit = bit_forwards;
1154 ret = find_usage_forwards(next->class, 0); 1254 ret = find_usage_forwards(hlock_class(next), 0);
1155 if (!ret || ret == 1) 1255 if (!ret || ret == 1)
1156 return ret; 1256 return ret;
1157 /* ret == 2 */ 1257 /* ret == 2 */
@@ -1272,18 +1372,32 @@ check_deadlock(struct task_struct *curr, struct held_lock *next,
1272 struct lockdep_map *next_instance, int read) 1372 struct lockdep_map *next_instance, int read)
1273{ 1373{
1274 struct held_lock *prev; 1374 struct held_lock *prev;
1375 struct held_lock *nest = NULL;
1275 int i; 1376 int i;
1276 1377
1277 for (i = 0; i < curr->lockdep_depth; i++) { 1378 for (i = 0; i < curr->lockdep_depth; i++) {
1278 prev = curr->held_locks + i; 1379 prev = curr->held_locks + i;
1279 if (prev->class != next->class) 1380
1381 if (prev->instance == next->nest_lock)
1382 nest = prev;
1383
1384 if (hlock_class(prev) != hlock_class(next))
1280 continue; 1385 continue;
1386
1281 /* 1387 /*
1282 * Allow read-after-read recursion of the same 1388 * Allow read-after-read recursion of the same
1283 * lock class (i.e. read_lock(lock)+read_lock(lock)): 1389 * lock class (i.e. read_lock(lock)+read_lock(lock)):
1284 */ 1390 */
1285 if ((read == 2) && prev->read) 1391 if ((read == 2) && prev->read)
1286 return 2; 1392 return 2;
1393
1394 /*
1395 * We're holding the nest_lock, which serializes this lock's
1396 * nesting behaviour.
1397 */
1398 if (nest)
1399 return 2;
1400
1287 return print_deadlock_bug(curr, prev, next); 1401 return print_deadlock_bug(curr, prev, next);
1288 } 1402 }
1289 return 1; 1403 return 1;
@@ -1329,7 +1443,7 @@ check_prev_add(struct task_struct *curr, struct held_lock *prev,
1329 */ 1443 */
1330 check_source = next; 1444 check_source = next;
1331 check_target = prev; 1445 check_target = prev;
1332 if (!(check_noncircular(next->class, 0))) 1446 if (!(check_noncircular(hlock_class(next), 0)))
1333 return print_circular_bug_tail(); 1447 return print_circular_bug_tail();
1334 1448
1335 if (!check_prev_add_irq(curr, prev, next)) 1449 if (!check_prev_add_irq(curr, prev, next))
@@ -1353,8 +1467,8 @@ check_prev_add(struct task_struct *curr, struct held_lock *prev,
1353 * chains - the second one will be new, but L1 already has 1467 * chains - the second one will be new, but L1 already has
1354 * L2 added to its dependency list, due to the first chain.) 1468 * L2 added to its dependency list, due to the first chain.)
1355 */ 1469 */
1356 list_for_each_entry(entry, &prev->class->locks_after, entry) { 1470 list_for_each_entry(entry, &hlock_class(prev)->locks_after, entry) {
1357 if (entry->class == next->class) { 1471 if (entry->class == hlock_class(next)) {
1358 if (distance == 1) 1472 if (distance == 1)
1359 entry->distance = 1; 1473 entry->distance = 1;
1360 return 2; 1474 return 2;
@@ -1365,26 +1479,28 @@ check_prev_add(struct task_struct *curr, struct held_lock *prev,
1365 * Ok, all validations passed, add the new lock 1479 * Ok, all validations passed, add the new lock
1366 * to the previous lock's dependency list: 1480 * to the previous lock's dependency list:
1367 */ 1481 */
1368 ret = add_lock_to_list(prev->class, next->class, 1482 ret = add_lock_to_list(hlock_class(prev), hlock_class(next),
1369 &prev->class->locks_after, next->acquire_ip, distance); 1483 &hlock_class(prev)->locks_after,
1484 next->acquire_ip, distance);
1370 1485
1371 if (!ret) 1486 if (!ret)
1372 return 0; 1487 return 0;
1373 1488
1374 ret = add_lock_to_list(next->class, prev->class, 1489 ret = add_lock_to_list(hlock_class(next), hlock_class(prev),
1375 &next->class->locks_before, next->acquire_ip, distance); 1490 &hlock_class(next)->locks_before,
1491 next->acquire_ip, distance);
1376 if (!ret) 1492 if (!ret)
1377 return 0; 1493 return 0;
1378 1494
1379 /* 1495 /*
1380 * Debugging printouts: 1496 * Debugging printouts:
1381 */ 1497 */
1382 if (verbose(prev->class) || verbose(next->class)) { 1498 if (verbose(hlock_class(prev)) || verbose(hlock_class(next))) {
1383 graph_unlock(); 1499 graph_unlock();
1384 printk("\n new dependency: "); 1500 printk("\n new dependency: ");
1385 print_lock_name(prev->class); 1501 print_lock_name(hlock_class(prev));
1386 printk(" => "); 1502 printk(" => ");
1387 print_lock_name(next->class); 1503 print_lock_name(hlock_class(next));
1388 printk("\n"); 1504 printk("\n");
1389 dump_stack(); 1505 dump_stack();
1390 return graph_lock(); 1506 return graph_lock();
@@ -1481,7 +1597,7 @@ static inline int lookup_chain_cache(struct task_struct *curr,
1481 struct held_lock *hlock, 1597 struct held_lock *hlock,
1482 u64 chain_key) 1598 u64 chain_key)
1483{ 1599{
1484 struct lock_class *class = hlock->class; 1600 struct lock_class *class = hlock_class(hlock);
1485 struct list_head *hash_head = chainhashentry(chain_key); 1601 struct list_head *hash_head = chainhashentry(chain_key);
1486 struct lock_chain *chain; 1602 struct lock_chain *chain;
1487 struct held_lock *hlock_curr, *hlock_next; 1603 struct held_lock *hlock_curr, *hlock_next;
@@ -1554,7 +1670,7 @@ cache_hit:
1554 if (likely(cn + chain->depth <= MAX_LOCKDEP_CHAIN_HLOCKS)) { 1670 if (likely(cn + chain->depth <= MAX_LOCKDEP_CHAIN_HLOCKS)) {
1555 chain->base = cn; 1671 chain->base = cn;
1556 for (j = 0; j < chain->depth - 1; j++, i++) { 1672 for (j = 0; j < chain->depth - 1; j++, i++) {
1557 int lock_id = curr->held_locks[i].class - lock_classes; 1673 int lock_id = curr->held_locks[i].class_idx - 1;
1558 chain_hlocks[chain->base + j] = lock_id; 1674 chain_hlocks[chain->base + j] = lock_id;
1559 } 1675 }
1560 chain_hlocks[chain->base + j] = class - lock_classes; 1676 chain_hlocks[chain->base + j] = class - lock_classes;
@@ -1650,7 +1766,7 @@ static void check_chain_key(struct task_struct *curr)
1650 WARN_ON(1); 1766 WARN_ON(1);
1651 return; 1767 return;
1652 } 1768 }
1653 id = hlock->class - lock_classes; 1769 id = hlock->class_idx - 1;
1654 if (DEBUG_LOCKS_WARN_ON(id >= MAX_LOCKDEP_KEYS)) 1770 if (DEBUG_LOCKS_WARN_ON(id >= MAX_LOCKDEP_KEYS))
1655 return; 1771 return;
1656 1772
@@ -1695,7 +1811,7 @@ print_usage_bug(struct task_struct *curr, struct held_lock *this,
1695 print_lock(this); 1811 print_lock(this);
1696 1812
1697 printk("{%s} state was registered at:\n", usage_str[prev_bit]); 1813 printk("{%s} state was registered at:\n", usage_str[prev_bit]);
1698 print_stack_trace(this->class->usage_traces + prev_bit, 1); 1814 print_stack_trace(hlock_class(this)->usage_traces + prev_bit, 1);
1699 1815
1700 print_irqtrace_events(curr); 1816 print_irqtrace_events(curr);
1701 printk("\nother info that might help us debug this:\n"); 1817 printk("\nother info that might help us debug this:\n");
@@ -1714,7 +1830,7 @@ static inline int
1714valid_state(struct task_struct *curr, struct held_lock *this, 1830valid_state(struct task_struct *curr, struct held_lock *this,
1715 enum lock_usage_bit new_bit, enum lock_usage_bit bad_bit) 1831 enum lock_usage_bit new_bit, enum lock_usage_bit bad_bit)
1716{ 1832{
1717 if (unlikely(this->class->usage_mask & (1 << bad_bit))) 1833 if (unlikely(hlock_class(this)->usage_mask & (1 << bad_bit)))
1718 return print_usage_bug(curr, this, bad_bit, new_bit); 1834 return print_usage_bug(curr, this, bad_bit, new_bit);
1719 return 1; 1835 return 1;
1720} 1836}
@@ -1753,7 +1869,7 @@ print_irq_inversion_bug(struct task_struct *curr, struct lock_class *other,
1753 lockdep_print_held_locks(curr); 1869 lockdep_print_held_locks(curr);
1754 1870
1755 printk("\nthe first lock's dependencies:\n"); 1871 printk("\nthe first lock's dependencies:\n");
1756 print_lock_dependencies(this->class, 0); 1872 print_lock_dependencies(hlock_class(this), 0);
1757 1873
1758 printk("\nthe second lock's dependencies:\n"); 1874 printk("\nthe second lock's dependencies:\n");
1759 print_lock_dependencies(other, 0); 1875 print_lock_dependencies(other, 0);
@@ -1776,7 +1892,7 @@ check_usage_forwards(struct task_struct *curr, struct held_lock *this,
1776 1892
1777 find_usage_bit = bit; 1893 find_usage_bit = bit;
1778 /* fills in <forwards_match> */ 1894 /* fills in <forwards_match> */
1779 ret = find_usage_forwards(this->class, 0); 1895 ret = find_usage_forwards(hlock_class(this), 0);
1780 if (!ret || ret == 1) 1896 if (!ret || ret == 1)
1781 return ret; 1897 return ret;
1782 1898
@@ -1795,7 +1911,7 @@ check_usage_backwards(struct task_struct *curr, struct held_lock *this,
1795 1911
1796 find_usage_bit = bit; 1912 find_usage_bit = bit;
1797 /* fills in <backwards_match> */ 1913 /* fills in <backwards_match> */
1798 ret = find_usage_backwards(this->class, 0); 1914 ret = find_usage_backwards(hlock_class(this), 0);
1799 if (!ret || ret == 1) 1915 if (!ret || ret == 1)
1800 return ret; 1916 return ret;
1801 1917
@@ -1861,7 +1977,7 @@ static int mark_lock_irq(struct task_struct *curr, struct held_lock *this,
1861 LOCK_ENABLED_HARDIRQS_READ, "hard-read")) 1977 LOCK_ENABLED_HARDIRQS_READ, "hard-read"))
1862 return 0; 1978 return 0;
1863#endif 1979#endif
1864 if (hardirq_verbose(this->class)) 1980 if (hardirq_verbose(hlock_class(this)))
1865 ret = 2; 1981 ret = 2;
1866 break; 1982 break;
1867 case LOCK_USED_IN_SOFTIRQ: 1983 case LOCK_USED_IN_SOFTIRQ:
@@ -1886,7 +2002,7 @@ static int mark_lock_irq(struct task_struct *curr, struct held_lock *this,
1886 LOCK_ENABLED_SOFTIRQS_READ, "soft-read")) 2002 LOCK_ENABLED_SOFTIRQS_READ, "soft-read"))
1887 return 0; 2003 return 0;
1888#endif 2004#endif
1889 if (softirq_verbose(this->class)) 2005 if (softirq_verbose(hlock_class(this)))
1890 ret = 2; 2006 ret = 2;
1891 break; 2007 break;
1892 case LOCK_USED_IN_HARDIRQ_READ: 2008 case LOCK_USED_IN_HARDIRQ_READ:
@@ -1899,7 +2015,7 @@ static int mark_lock_irq(struct task_struct *curr, struct held_lock *this,
1899 if (!check_usage_forwards(curr, this, 2015 if (!check_usage_forwards(curr, this,
1900 LOCK_ENABLED_HARDIRQS, "hard")) 2016 LOCK_ENABLED_HARDIRQS, "hard"))
1901 return 0; 2017 return 0;
1902 if (hardirq_verbose(this->class)) 2018 if (hardirq_verbose(hlock_class(this)))
1903 ret = 2; 2019 ret = 2;
1904 break; 2020 break;
1905 case LOCK_USED_IN_SOFTIRQ_READ: 2021 case LOCK_USED_IN_SOFTIRQ_READ:
@@ -1912,7 +2028,7 @@ static int mark_lock_irq(struct task_struct *curr, struct held_lock *this,
1912 if (!check_usage_forwards(curr, this, 2028 if (!check_usage_forwards(curr, this,
1913 LOCK_ENABLED_SOFTIRQS, "soft")) 2029 LOCK_ENABLED_SOFTIRQS, "soft"))
1914 return 0; 2030 return 0;
1915 if (softirq_verbose(this->class)) 2031 if (softirq_verbose(hlock_class(this)))
1916 ret = 2; 2032 ret = 2;
1917 break; 2033 break;
1918 case LOCK_ENABLED_HARDIRQS: 2034 case LOCK_ENABLED_HARDIRQS:
@@ -1938,7 +2054,7 @@ static int mark_lock_irq(struct task_struct *curr, struct held_lock *this,
1938 LOCK_USED_IN_HARDIRQ_READ, "hard-read")) 2054 LOCK_USED_IN_HARDIRQ_READ, "hard-read"))
1939 return 0; 2055 return 0;
1940#endif 2056#endif
1941 if (hardirq_verbose(this->class)) 2057 if (hardirq_verbose(hlock_class(this)))
1942 ret = 2; 2058 ret = 2;
1943 break; 2059 break;
1944 case LOCK_ENABLED_SOFTIRQS: 2060 case LOCK_ENABLED_SOFTIRQS:
@@ -1964,7 +2080,7 @@ static int mark_lock_irq(struct task_struct *curr, struct held_lock *this,
1964 LOCK_USED_IN_SOFTIRQ_READ, "soft-read")) 2080 LOCK_USED_IN_SOFTIRQ_READ, "soft-read"))
1965 return 0; 2081 return 0;
1966#endif 2082#endif
1967 if (softirq_verbose(this->class)) 2083 if (softirq_verbose(hlock_class(this)))
1968 ret = 2; 2084 ret = 2;
1969 break; 2085 break;
1970 case LOCK_ENABLED_HARDIRQS_READ: 2086 case LOCK_ENABLED_HARDIRQS_READ:
@@ -1979,7 +2095,7 @@ static int mark_lock_irq(struct task_struct *curr, struct held_lock *this,
1979 LOCK_USED_IN_HARDIRQ, "hard")) 2095 LOCK_USED_IN_HARDIRQ, "hard"))
1980 return 0; 2096 return 0;
1981#endif 2097#endif
1982 if (hardirq_verbose(this->class)) 2098 if (hardirq_verbose(hlock_class(this)))
1983 ret = 2; 2099 ret = 2;
1984 break; 2100 break;
1985 case LOCK_ENABLED_SOFTIRQS_READ: 2101 case LOCK_ENABLED_SOFTIRQS_READ:
@@ -1994,7 +2110,7 @@ static int mark_lock_irq(struct task_struct *curr, struct held_lock *this,
1994 LOCK_USED_IN_SOFTIRQ, "soft")) 2110 LOCK_USED_IN_SOFTIRQ, "soft"))
1995 return 0; 2111 return 0;
1996#endif 2112#endif
1997 if (softirq_verbose(this->class)) 2113 if (softirq_verbose(hlock_class(this)))
1998 ret = 2; 2114 ret = 2;
1999 break; 2115 break;
2000 default: 2116 default:
@@ -2310,7 +2426,7 @@ static int mark_lock(struct task_struct *curr, struct held_lock *this,
2310 * If already set then do not dirty the cacheline, 2426 * If already set then do not dirty the cacheline,
2311 * nor do any checks: 2427 * nor do any checks:
2312 */ 2428 */
2313 if (likely(this->class->usage_mask & new_mask)) 2429 if (likely(hlock_class(this)->usage_mask & new_mask))
2314 return 1; 2430 return 1;
2315 2431
2316 if (!graph_lock()) 2432 if (!graph_lock())
@@ -2318,14 +2434,14 @@ static int mark_lock(struct task_struct *curr, struct held_lock *this,
2318 /* 2434 /*
2319 * Make sure we didnt race: 2435 * Make sure we didnt race:
2320 */ 2436 */
2321 if (unlikely(this->class->usage_mask & new_mask)) { 2437 if (unlikely(hlock_class(this)->usage_mask & new_mask)) {
2322 graph_unlock(); 2438 graph_unlock();
2323 return 1; 2439 return 1;
2324 } 2440 }
2325 2441
2326 this->class->usage_mask |= new_mask; 2442 hlock_class(this)->usage_mask |= new_mask;
2327 2443
2328 if (!save_trace(this->class->usage_traces + new_bit)) 2444 if (!save_trace(hlock_class(this)->usage_traces + new_bit))
2329 return 0; 2445 return 0;
2330 2446
2331 switch (new_bit) { 2447 switch (new_bit) {
@@ -2405,7 +2521,7 @@ EXPORT_SYMBOL_GPL(lockdep_init_map);
2405 */ 2521 */
2406static int __lock_acquire(struct lockdep_map *lock, unsigned int subclass, 2522static int __lock_acquire(struct lockdep_map *lock, unsigned int subclass,
2407 int trylock, int read, int check, int hardirqs_off, 2523 int trylock, int read, int check, int hardirqs_off,
2408 unsigned long ip) 2524 struct lockdep_map *nest_lock, unsigned long ip)
2409{ 2525{
2410 struct task_struct *curr = current; 2526 struct task_struct *curr = current;
2411 struct lock_class *class = NULL; 2527 struct lock_class *class = NULL;
@@ -2459,10 +2575,12 @@ static int __lock_acquire(struct lockdep_map *lock, unsigned int subclass,
2459 return 0; 2575 return 0;
2460 2576
2461 hlock = curr->held_locks + depth; 2577 hlock = curr->held_locks + depth;
2462 2578 if (DEBUG_LOCKS_WARN_ON(!class))
2463 hlock->class = class; 2579 return 0;
2580 hlock->class_idx = class - lock_classes + 1;
2464 hlock->acquire_ip = ip; 2581 hlock->acquire_ip = ip;
2465 hlock->instance = lock; 2582 hlock->instance = lock;
2583 hlock->nest_lock = nest_lock;
2466 hlock->trylock = trylock; 2584 hlock->trylock = trylock;
2467 hlock->read = read; 2585 hlock->read = read;
2468 hlock->check = check; 2586 hlock->check = check;
@@ -2574,6 +2692,55 @@ static int check_unlock(struct task_struct *curr, struct lockdep_map *lock,
2574 return 1; 2692 return 1;
2575} 2693}
2576 2694
2695static int
2696__lock_set_subclass(struct lockdep_map *lock,
2697 unsigned int subclass, unsigned long ip)
2698{
2699 struct task_struct *curr = current;
2700 struct held_lock *hlock, *prev_hlock;
2701 struct lock_class *class;
2702 unsigned int depth;
2703 int i;
2704
2705 depth = curr->lockdep_depth;
2706 if (DEBUG_LOCKS_WARN_ON(!depth))
2707 return 0;
2708
2709 prev_hlock = NULL;
2710 for (i = depth-1; i >= 0; i--) {
2711 hlock = curr->held_locks + i;
2712 /*
2713 * We must not cross into another context:
2714 */
2715 if (prev_hlock && prev_hlock->irq_context != hlock->irq_context)
2716 break;
2717 if (hlock->instance == lock)
2718 goto found_it;
2719 prev_hlock = hlock;
2720 }
2721 return print_unlock_inbalance_bug(curr, lock, ip);
2722
2723found_it:
2724 class = register_lock_class(lock, subclass, 0);
2725 hlock->class_idx = class - lock_classes + 1;
2726
2727 curr->lockdep_depth = i;
2728 curr->curr_chain_key = hlock->prev_chain_key;
2729
2730 for (; i < depth; i++) {
2731 hlock = curr->held_locks + i;
2732 if (!__lock_acquire(hlock->instance,
2733 hlock_class(hlock)->subclass, hlock->trylock,
2734 hlock->read, hlock->check, hlock->hardirqs_off,
2735 hlock->nest_lock, hlock->acquire_ip))
2736 return 0;
2737 }
2738
2739 if (DEBUG_LOCKS_WARN_ON(curr->lockdep_depth != depth))
2740 return 0;
2741 return 1;
2742}
2743
2577/* 2744/*
2578 * Remove the lock to the list of currently held locks in a 2745 * Remove the lock to the list of currently held locks in a
2579 * potentially non-nested (out of order) manner. This is a 2746 * potentially non-nested (out of order) manner. This is a
@@ -2624,9 +2791,9 @@ found_it:
2624 for (i++; i < depth; i++) { 2791 for (i++; i < depth; i++) {
2625 hlock = curr->held_locks + i; 2792 hlock = curr->held_locks + i;
2626 if (!__lock_acquire(hlock->instance, 2793 if (!__lock_acquire(hlock->instance,
2627 hlock->class->subclass, hlock->trylock, 2794 hlock_class(hlock)->subclass, hlock->trylock,
2628 hlock->read, hlock->check, hlock->hardirqs_off, 2795 hlock->read, hlock->check, hlock->hardirqs_off,
2629 hlock->acquire_ip)) 2796 hlock->nest_lock, hlock->acquire_ip))
2630 return 0; 2797 return 0;
2631 } 2798 }
2632 2799
@@ -2669,7 +2836,7 @@ static int lock_release_nested(struct task_struct *curr,
2669 2836
2670#ifdef CONFIG_DEBUG_LOCKDEP 2837#ifdef CONFIG_DEBUG_LOCKDEP
2671 hlock->prev_chain_key = 0; 2838 hlock->prev_chain_key = 0;
2672 hlock->class = NULL; 2839 hlock->class_idx = 0;
2673 hlock->acquire_ip = 0; 2840 hlock->acquire_ip = 0;
2674 hlock->irq_context = 0; 2841 hlock->irq_context = 0;
2675#endif 2842#endif
@@ -2738,18 +2905,36 @@ static void check_flags(unsigned long flags)
2738#endif 2905#endif
2739} 2906}
2740 2907
2908void
2909lock_set_subclass(struct lockdep_map *lock,
2910 unsigned int subclass, unsigned long ip)
2911{
2912 unsigned long flags;
2913
2914 if (unlikely(current->lockdep_recursion))
2915 return;
2916
2917 raw_local_irq_save(flags);
2918 current->lockdep_recursion = 1;
2919 check_flags(flags);
2920 if (__lock_set_subclass(lock, subclass, ip))
2921 check_chain_key(current);
2922 current->lockdep_recursion = 0;
2923 raw_local_irq_restore(flags);
2924}
2925
2926EXPORT_SYMBOL_GPL(lock_set_subclass);
2927
2741/* 2928/*
2742 * We are not always called with irqs disabled - do that here, 2929 * We are not always called with irqs disabled - do that here,
2743 * and also avoid lockdep recursion: 2930 * and also avoid lockdep recursion:
2744 */ 2931 */
2745void lock_acquire(struct lockdep_map *lock, unsigned int subclass, 2932void lock_acquire(struct lockdep_map *lock, unsigned int subclass,
2746 int trylock, int read, int check, unsigned long ip) 2933 int trylock, int read, int check,
2934 struct lockdep_map *nest_lock, unsigned long ip)
2747{ 2935{
2748 unsigned long flags; 2936 unsigned long flags;
2749 2937
2750 if (unlikely(!lock_stat && !prove_locking))
2751 return;
2752
2753 if (unlikely(current->lockdep_recursion)) 2938 if (unlikely(current->lockdep_recursion))
2754 return; 2939 return;
2755 2940
@@ -2758,7 +2943,7 @@ void lock_acquire(struct lockdep_map *lock, unsigned int subclass,
2758 2943
2759 current->lockdep_recursion = 1; 2944 current->lockdep_recursion = 1;
2760 __lock_acquire(lock, subclass, trylock, read, check, 2945 __lock_acquire(lock, subclass, trylock, read, check,
2761 irqs_disabled_flags(flags), ip); 2946 irqs_disabled_flags(flags), nest_lock, ip);
2762 current->lockdep_recursion = 0; 2947 current->lockdep_recursion = 0;
2763 raw_local_irq_restore(flags); 2948 raw_local_irq_restore(flags);
2764} 2949}
@@ -2770,9 +2955,6 @@ void lock_release(struct lockdep_map *lock, int nested,
2770{ 2955{
2771 unsigned long flags; 2956 unsigned long flags;
2772 2957
2773 if (unlikely(!lock_stat && !prove_locking))
2774 return;
2775
2776 if (unlikely(current->lockdep_recursion)) 2958 if (unlikely(current->lockdep_recursion))
2777 return; 2959 return;
2778 2960
@@ -2845,9 +3027,9 @@ __lock_contended(struct lockdep_map *lock, unsigned long ip)
2845found_it: 3027found_it:
2846 hlock->waittime_stamp = sched_clock(); 3028 hlock->waittime_stamp = sched_clock();
2847 3029
2848 point = lock_contention_point(hlock->class, ip); 3030 point = lock_contention_point(hlock_class(hlock), ip);
2849 3031
2850 stats = get_lock_stats(hlock->class); 3032 stats = get_lock_stats(hlock_class(hlock));
2851 if (point < ARRAY_SIZE(stats->contention_point)) 3033 if (point < ARRAY_SIZE(stats->contention_point))
2852 stats->contention_point[i]++; 3034 stats->contention_point[i]++;
2853 if (lock->cpu != smp_processor_id()) 3035 if (lock->cpu != smp_processor_id())
@@ -2893,7 +3075,7 @@ found_it:
2893 hlock->holdtime_stamp = now; 3075 hlock->holdtime_stamp = now;
2894 } 3076 }
2895 3077
2896 stats = get_lock_stats(hlock->class); 3078 stats = get_lock_stats(hlock_class(hlock));
2897 if (waittime) { 3079 if (waittime) {
2898 if (hlock->read) 3080 if (hlock->read)
2899 lock_time_inc(&stats->read_waittime, waittime); 3081 lock_time_inc(&stats->read_waittime, waittime);
@@ -2988,6 +3170,7 @@ static void zap_class(struct lock_class *class)
2988 list_del_rcu(&class->hash_entry); 3170 list_del_rcu(&class->hash_entry);
2989 list_del_rcu(&class->lock_entry); 3171 list_del_rcu(&class->lock_entry);
2990 3172
3173 class->key = NULL;
2991} 3174}
2992 3175
2993static inline int within(const void *addr, void *start, unsigned long size) 3176static inline int within(const void *addr, void *start, unsigned long size)
diff --git a/kernel/lockdep_internals.h b/kernel/lockdep_internals.h
index c3600a091a28..55db193d366d 100644
--- a/kernel/lockdep_internals.h
+++ b/kernel/lockdep_internals.h
@@ -17,9 +17,6 @@
17 */ 17 */
18#define MAX_LOCKDEP_ENTRIES 8192UL 18#define MAX_LOCKDEP_ENTRIES 8192UL
19 19
20#define MAX_LOCKDEP_KEYS_BITS 11
21#define MAX_LOCKDEP_KEYS (1UL << MAX_LOCKDEP_KEYS_BITS)
22
23#define MAX_LOCKDEP_CHAINS_BITS 14 20#define MAX_LOCKDEP_CHAINS_BITS 14
24#define MAX_LOCKDEP_CHAINS (1UL << MAX_LOCKDEP_CHAINS_BITS) 21#define MAX_LOCKDEP_CHAINS (1UL << MAX_LOCKDEP_CHAINS_BITS)
25 22
@@ -53,6 +50,9 @@ extern unsigned int nr_process_chains;
53extern unsigned int max_lockdep_depth; 50extern unsigned int max_lockdep_depth;
54extern unsigned int max_recursion_depth; 51extern unsigned int max_recursion_depth;
55 52
53extern unsigned long lockdep_count_forward_deps(struct lock_class *);
54extern unsigned long lockdep_count_backward_deps(struct lock_class *);
55
56#ifdef CONFIG_DEBUG_LOCKDEP 56#ifdef CONFIG_DEBUG_LOCKDEP
57/* 57/*
58 * Various lockdep statistics: 58 * Various lockdep statistics:
diff --git a/kernel/lockdep_proc.c b/kernel/lockdep_proc.c
index 9b0e940e2545..fa19aee604c2 100644
--- a/kernel/lockdep_proc.c
+++ b/kernel/lockdep_proc.c
@@ -63,34 +63,6 @@ static void l_stop(struct seq_file *m, void *v)
63{ 63{
64} 64}
65 65
66static unsigned long count_forward_deps(struct lock_class *class)
67{
68 struct lock_list *entry;
69 unsigned long ret = 1;
70
71 /*
72 * Recurse this class's dependency list:
73 */
74 list_for_each_entry(entry, &class->locks_after, entry)
75 ret += count_forward_deps(entry->class);
76
77 return ret;
78}
79
80static unsigned long count_backward_deps(struct lock_class *class)
81{
82 struct lock_list *entry;
83 unsigned long ret = 1;
84
85 /*
86 * Recurse this class's dependency list:
87 */
88 list_for_each_entry(entry, &class->locks_before, entry)
89 ret += count_backward_deps(entry->class);
90
91 return ret;
92}
93
94static void print_name(struct seq_file *m, struct lock_class *class) 66static void print_name(struct seq_file *m, struct lock_class *class)
95{ 67{
96 char str[128]; 68 char str[128];
@@ -124,10 +96,10 @@ static int l_show(struct seq_file *m, void *v)
124#ifdef CONFIG_DEBUG_LOCKDEP 96#ifdef CONFIG_DEBUG_LOCKDEP
125 seq_printf(m, " OPS:%8ld", class->ops); 97 seq_printf(m, " OPS:%8ld", class->ops);
126#endif 98#endif
127 nr_forward_deps = count_forward_deps(class); 99 nr_forward_deps = lockdep_count_forward_deps(class);
128 seq_printf(m, " FD:%5ld", nr_forward_deps); 100 seq_printf(m, " FD:%5ld", nr_forward_deps);
129 101
130 nr_backward_deps = count_backward_deps(class); 102 nr_backward_deps = lockdep_count_backward_deps(class);
131 seq_printf(m, " BD:%5ld", nr_backward_deps); 103 seq_printf(m, " BD:%5ld", nr_backward_deps);
132 104
133 get_usage_chars(class, &c1, &c2, &c3, &c4); 105 get_usage_chars(class, &c1, &c2, &c3, &c4);
@@ -229,6 +201,9 @@ static int lc_show(struct seq_file *m, void *v)
229 201
230 for (i = 0; i < chain->depth; i++) { 202 for (i = 0; i < chain->depth; i++) {
231 class = lock_chain_get_class(chain, i); 203 class = lock_chain_get_class(chain, i);
204 if (!class->key)
205 continue;
206
232 seq_printf(m, "[%p] ", class->key); 207 seq_printf(m, "[%p] ", class->key);
233 print_name(m, class); 208 print_name(m, class);
234 seq_puts(m, "\n"); 209 seq_puts(m, "\n");
@@ -350,7 +325,7 @@ static int lockdep_stats_show(struct seq_file *m, void *v)
350 if (class->usage_mask & LOCKF_ENABLED_HARDIRQS_READ) 325 if (class->usage_mask & LOCKF_ENABLED_HARDIRQS_READ)
351 nr_hardirq_read_unsafe++; 326 nr_hardirq_read_unsafe++;
352 327
353 sum_forward_deps += count_forward_deps(class); 328 sum_forward_deps += lockdep_count_forward_deps(class);
354 } 329 }
355#ifdef CONFIG_DEBUG_LOCKDEP 330#ifdef CONFIG_DEBUG_LOCKDEP
356 DEBUG_LOCKS_WARN_ON(debug_atomic_read(&nr_unused_locks) != nr_unused); 331 DEBUG_LOCKS_WARN_ON(debug_atomic_read(&nr_unused_locks) != nr_unused);
diff --git a/kernel/module.c b/kernel/module.c
index 61d212120df4..08864d257eb0 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -2288,7 +2288,7 @@ sys_init_module(void __user *umod,
2288 2288
2289 /* Start the module */ 2289 /* Start the module */
2290 if (mod->init != NULL) 2290 if (mod->init != NULL)
2291 ret = mod->init(); 2291 ret = do_one_initcall(mod->init);
2292 if (ret < 0) { 2292 if (ret < 0) {
2293 /* Init routine failed: abort. Try to protect us from 2293 /* Init routine failed: abort. Try to protect us from
2294 buggy refcounters. */ 2294 buggy refcounters. */
diff --git a/kernel/posix-timers.c b/kernel/posix-timers.c
index 9a21681aa80f..e36d5798cbff 100644
--- a/kernel/posix-timers.c
+++ b/kernel/posix-timers.c
@@ -289,21 +289,29 @@ void do_schedule_next_timer(struct siginfo *info)
289 else 289 else
290 schedule_next_timer(timr); 290 schedule_next_timer(timr);
291 291
292 info->si_overrun = timr->it_overrun_last; 292 info->si_overrun += timr->it_overrun_last;
293 } 293 }
294 294
295 if (timr) 295 if (timr)
296 unlock_timer(timr, flags); 296 unlock_timer(timr, flags);
297} 297}
298 298
299int posix_timer_event(struct k_itimer *timr,int si_private) 299int posix_timer_event(struct k_itimer *timr, int si_private)
300{ 300{
301 memset(&timr->sigq->info, 0, sizeof(siginfo_t)); 301 /*
302 * FIXME: if ->sigq is queued we can race with
303 * dequeue_signal()->do_schedule_next_timer().
304 *
305 * If dequeue_signal() sees the "right" value of
306 * si_sys_private it calls do_schedule_next_timer().
307 * We re-queue ->sigq and drop ->it_lock().
308 * do_schedule_next_timer() locks the timer
309 * and re-schedules it while ->sigq is pending.
310 * Not really bad, but not that we want.
311 */
302 timr->sigq->info.si_sys_private = si_private; 312 timr->sigq->info.si_sys_private = si_private;
303 /* Send signal to the process that owns this timer.*/
304 313
305 timr->sigq->info.si_signo = timr->it_sigev_signo; 314 timr->sigq->info.si_signo = timr->it_sigev_signo;
306 timr->sigq->info.si_errno = 0;
307 timr->sigq->info.si_code = SI_TIMER; 315 timr->sigq->info.si_code = SI_TIMER;
308 timr->sigq->info.si_tid = timr->it_id; 316 timr->sigq->info.si_tid = timr->it_id;
309 timr->sigq->info.si_value = timr->it_sigev_value; 317 timr->sigq->info.si_value = timr->it_sigev_value;
@@ -435,6 +443,7 @@ static struct k_itimer * alloc_posix_timer(void)
435 kmem_cache_free(posix_timers_cache, tmr); 443 kmem_cache_free(posix_timers_cache, tmr);
436 tmr = NULL; 444 tmr = NULL;
437 } 445 }
446 memset(&tmr->sigq->info, 0, sizeof(siginfo_t));
438 return tmr; 447 return tmr;
439} 448}
440 449
diff --git a/kernel/sched.c b/kernel/sched.c
index 04160d277e7a..d601fb0406ca 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -600,7 +600,6 @@ struct rq {
600 /* BKL stats */ 600 /* BKL stats */
601 unsigned int bkl_count; 601 unsigned int bkl_count;
602#endif 602#endif
603 struct lock_class_key rq_lock_key;
604}; 603};
605 604
606static DEFINE_PER_CPU_SHARED_ALIGNED(struct rq, runqueues); 605static DEFINE_PER_CPU_SHARED_ALIGNED(struct rq, runqueues);
@@ -834,7 +833,7 @@ static inline u64 global_rt_period(void)
834 833
835static inline u64 global_rt_runtime(void) 834static inline u64 global_rt_runtime(void)
836{ 835{
837 if (sysctl_sched_rt_period < 0) 836 if (sysctl_sched_rt_runtime < 0)
838 return RUNTIME_INF; 837 return RUNTIME_INF;
839 838
840 return (u64)sysctl_sched_rt_runtime * NSEC_PER_USEC; 839 return (u64)sysctl_sched_rt_runtime * NSEC_PER_USEC;
@@ -2759,10 +2758,10 @@ static void double_rq_lock(struct rq *rq1, struct rq *rq2)
2759 } else { 2758 } else {
2760 if (rq1 < rq2) { 2759 if (rq1 < rq2) {
2761 spin_lock(&rq1->lock); 2760 spin_lock(&rq1->lock);
2762 spin_lock(&rq2->lock); 2761 spin_lock_nested(&rq2->lock, SINGLE_DEPTH_NESTING);
2763 } else { 2762 } else {
2764 spin_lock(&rq2->lock); 2763 spin_lock(&rq2->lock);
2765 spin_lock(&rq1->lock); 2764 spin_lock_nested(&rq1->lock, SINGLE_DEPTH_NESTING);
2766 } 2765 }
2767 } 2766 }
2768 update_rq_clock(rq1); 2767 update_rq_clock(rq1);
@@ -2805,14 +2804,21 @@ static int double_lock_balance(struct rq *this_rq, struct rq *busiest)
2805 if (busiest < this_rq) { 2804 if (busiest < this_rq) {
2806 spin_unlock(&this_rq->lock); 2805 spin_unlock(&this_rq->lock);
2807 spin_lock(&busiest->lock); 2806 spin_lock(&busiest->lock);
2808 spin_lock(&this_rq->lock); 2807 spin_lock_nested(&this_rq->lock, SINGLE_DEPTH_NESTING);
2809 ret = 1; 2808 ret = 1;
2810 } else 2809 } else
2811 spin_lock(&busiest->lock); 2810 spin_lock_nested(&busiest->lock, SINGLE_DEPTH_NESTING);
2812 } 2811 }
2813 return ret; 2812 return ret;
2814} 2813}
2815 2814
2815static void double_unlock_balance(struct rq *this_rq, struct rq *busiest)
2816 __releases(busiest->lock)
2817{
2818 spin_unlock(&busiest->lock);
2819 lock_set_subclass(&this_rq->lock.dep_map, 0, _RET_IP_);
2820}
2821
2816/* 2822/*
2817 * If dest_cpu is allowed for this process, migrate the task to it. 2823 * If dest_cpu is allowed for this process, migrate the task to it.
2818 * This is accomplished by forcing the cpu_allowed mask to only 2824 * This is accomplished by forcing the cpu_allowed mask to only
@@ -3637,7 +3643,7 @@ redo:
3637 ld_moved = move_tasks(this_rq, this_cpu, busiest, 3643 ld_moved = move_tasks(this_rq, this_cpu, busiest,
3638 imbalance, sd, CPU_NEWLY_IDLE, 3644 imbalance, sd, CPU_NEWLY_IDLE,
3639 &all_pinned); 3645 &all_pinned);
3640 spin_unlock(&busiest->lock); 3646 double_unlock_balance(this_rq, busiest);
3641 3647
3642 if (unlikely(all_pinned)) { 3648 if (unlikely(all_pinned)) {
3643 cpu_clear(cpu_of(busiest), *cpus); 3649 cpu_clear(cpu_of(busiest), *cpus);
@@ -3752,7 +3758,7 @@ static void active_load_balance(struct rq *busiest_rq, int busiest_cpu)
3752 else 3758 else
3753 schedstat_inc(sd, alb_failed); 3759 schedstat_inc(sd, alb_failed);
3754 } 3760 }
3755 spin_unlock(&target_rq->lock); 3761 double_unlock_balance(busiest_rq, target_rq);
3756} 3762}
3757 3763
3758#ifdef CONFIG_NO_HZ 3764#ifdef CONFIG_NO_HZ
@@ -8000,7 +8006,6 @@ void __init sched_init(void)
8000 8006
8001 rq = cpu_rq(i); 8007 rq = cpu_rq(i);
8002 spin_lock_init(&rq->lock); 8008 spin_lock_init(&rq->lock);
8003 lockdep_set_class(&rq->lock, &rq->rq_lock_key);
8004 rq->nr_running = 0; 8009 rq->nr_running = 0;
8005 init_cfs_rq(&rq->cfs, rq); 8010 init_cfs_rq(&rq->cfs, rq);
8006 init_rt_rq(&rq->rt, rq); 8011 init_rt_rq(&rq->rt, rq);
diff --git a/kernel/sched_clock.c b/kernel/sched_clock.c
index 22ed55d1167f..204991a0bfa7 100644
--- a/kernel/sched_clock.c
+++ b/kernel/sched_clock.c
@@ -32,13 +32,19 @@
32#include <linux/ktime.h> 32#include <linux/ktime.h>
33#include <linux/module.h> 33#include <linux/module.h>
34 34
35/*
36 * Scheduler clock - returns current time in nanosec units.
37 * This is default implementation.
38 * Architectures and sub-architectures can override this.
39 */
40unsigned long long __attribute__((weak)) sched_clock(void)
41{
42 return (unsigned long long)jiffies * (NSEC_PER_SEC / HZ);
43}
35 44
36#ifdef CONFIG_HAVE_UNSTABLE_SCHED_CLOCK 45static __read_mostly int sched_clock_running;
37 46
38#define MULTI_SHIFT 15 47#ifdef CONFIG_HAVE_UNSTABLE_SCHED_CLOCK
39/* Max is double, Min is 1/2 */
40#define MAX_MULTI (2LL << MULTI_SHIFT)
41#define MIN_MULTI (1LL << (MULTI_SHIFT-1))
42 48
43struct sched_clock_data { 49struct sched_clock_data {
44 /* 50 /*
@@ -49,14 +55,9 @@ struct sched_clock_data {
49 raw_spinlock_t lock; 55 raw_spinlock_t lock;
50 56
51 unsigned long tick_jiffies; 57 unsigned long tick_jiffies;
52 u64 prev_raw;
53 u64 tick_raw; 58 u64 tick_raw;
54 u64 tick_gtod; 59 u64 tick_gtod;
55 u64 clock; 60 u64 clock;
56 s64 multi;
57#ifdef CONFIG_NO_HZ
58 int check_max;
59#endif
60}; 61};
61 62
62static DEFINE_PER_CPU_SHARED_ALIGNED(struct sched_clock_data, sched_clock_data); 63static DEFINE_PER_CPU_SHARED_ALIGNED(struct sched_clock_data, sched_clock_data);
@@ -71,8 +72,6 @@ static inline struct sched_clock_data *cpu_sdc(int cpu)
71 return &per_cpu(sched_clock_data, cpu); 72 return &per_cpu(sched_clock_data, cpu);
72} 73}
73 74
74static __read_mostly int sched_clock_running;
75
76void sched_clock_init(void) 75void sched_clock_init(void)
77{ 76{
78 u64 ktime_now = ktime_to_ns(ktime_get()); 77 u64 ktime_now = ktime_to_ns(ktime_get());
@@ -84,90 +83,39 @@ void sched_clock_init(void)
84 83
85 scd->lock = (raw_spinlock_t)__RAW_SPIN_LOCK_UNLOCKED; 84 scd->lock = (raw_spinlock_t)__RAW_SPIN_LOCK_UNLOCKED;
86 scd->tick_jiffies = now_jiffies; 85 scd->tick_jiffies = now_jiffies;
87 scd->prev_raw = 0;
88 scd->tick_raw = 0; 86 scd->tick_raw = 0;
89 scd->tick_gtod = ktime_now; 87 scd->tick_gtod = ktime_now;
90 scd->clock = ktime_now; 88 scd->clock = ktime_now;
91 scd->multi = 1 << MULTI_SHIFT;
92#ifdef CONFIG_NO_HZ
93 scd->check_max = 1;
94#endif
95 } 89 }
96 90
97 sched_clock_running = 1; 91 sched_clock_running = 1;
98} 92}
99 93
100#ifdef CONFIG_NO_HZ
101/*
102 * The dynamic ticks makes the delta jiffies inaccurate. This
103 * prevents us from checking the maximum time update.
104 * Disable the maximum check during stopped ticks.
105 */
106void sched_clock_tick_stop(int cpu)
107{
108 struct sched_clock_data *scd = cpu_sdc(cpu);
109
110 scd->check_max = 0;
111}
112
113void sched_clock_tick_start(int cpu)
114{
115 struct sched_clock_data *scd = cpu_sdc(cpu);
116
117 scd->check_max = 1;
118}
119
120static int check_max(struct sched_clock_data *scd)
121{
122 return scd->check_max;
123}
124#else
125static int check_max(struct sched_clock_data *scd)
126{
127 return 1;
128}
129#endif /* CONFIG_NO_HZ */
130
131/* 94/*
132 * update the percpu scd from the raw @now value 95 * update the percpu scd from the raw @now value
133 * 96 *
134 * - filter out backward motion 97 * - filter out backward motion
135 * - use jiffies to generate a min,max window to clip the raw values 98 * - use jiffies to generate a min,max window to clip the raw values
136 */ 99 */
137static void __update_sched_clock(struct sched_clock_data *scd, u64 now, u64 *time) 100static u64 __update_sched_clock(struct sched_clock_data *scd, u64 now)
138{ 101{
139 unsigned long now_jiffies = jiffies; 102 unsigned long now_jiffies = jiffies;
140 long delta_jiffies = now_jiffies - scd->tick_jiffies; 103 long delta_jiffies = now_jiffies - scd->tick_jiffies;
141 u64 clock = scd->clock; 104 u64 clock = scd->clock;
142 u64 min_clock, max_clock; 105 u64 min_clock, max_clock;
143 s64 delta = now - scd->prev_raw; 106 s64 delta = now - scd->tick_raw;
144 107
145 WARN_ON_ONCE(!irqs_disabled()); 108 WARN_ON_ONCE(!irqs_disabled());
146 109 min_clock = scd->tick_gtod + delta_jiffies * TICK_NSEC;
147 /*
148 * At schedule tick the clock can be just under the gtod. We don't
149 * want to push it too prematurely.
150 */
151 min_clock = scd->tick_gtod + (delta_jiffies * TICK_NSEC);
152 if (min_clock > TICK_NSEC)
153 min_clock -= TICK_NSEC / 2;
154 110
155 if (unlikely(delta < 0)) { 111 if (unlikely(delta < 0)) {
156 clock++; 112 clock++;
157 goto out; 113 goto out;
158 } 114 }
159 115
160 /* 116 max_clock = min_clock + TICK_NSEC;
161 * The clock must stay within a jiffie of the gtod.
162 * But since we may be at the start of a jiffy or the end of one
163 * we add another jiffy buffer.
164 */
165 max_clock = scd->tick_gtod + (2 + delta_jiffies) * TICK_NSEC;
166
167 delta *= scd->multi;
168 delta >>= MULTI_SHIFT;
169 117
170 if (unlikely(clock + delta > max_clock) && check_max(scd)) { 118 if (unlikely(clock + delta > max_clock)) {
171 if (clock < max_clock) 119 if (clock < max_clock)
172 clock = max_clock; 120 clock = max_clock;
173 else 121 else
@@ -180,12 +128,10 @@ static void __update_sched_clock(struct sched_clock_data *scd, u64 now, u64 *tim
180 if (unlikely(clock < min_clock)) 128 if (unlikely(clock < min_clock))
181 clock = min_clock; 129 clock = min_clock;
182 130
183 if (time) 131 scd->tick_jiffies = now_jiffies;
184 *time = clock; 132 scd->clock = clock;
185 else { 133
186 scd->prev_raw = now; 134 return clock;
187 scd->clock = clock;
188 }
189} 135}
190 136
191static void lock_double_clock(struct sched_clock_data *data1, 137static void lock_double_clock(struct sched_clock_data *data1,
@@ -203,7 +149,7 @@ static void lock_double_clock(struct sched_clock_data *data1,
203u64 sched_clock_cpu(int cpu) 149u64 sched_clock_cpu(int cpu)
204{ 150{
205 struct sched_clock_data *scd = cpu_sdc(cpu); 151 struct sched_clock_data *scd = cpu_sdc(cpu);
206 u64 now, clock; 152 u64 now, clock, this_clock, remote_clock;
207 153
208 if (unlikely(!sched_clock_running)) 154 if (unlikely(!sched_clock_running))
209 return 0ull; 155 return 0ull;
@@ -212,43 +158,44 @@ u64 sched_clock_cpu(int cpu)
212 now = sched_clock(); 158 now = sched_clock();
213 159
214 if (cpu != raw_smp_processor_id()) { 160 if (cpu != raw_smp_processor_id()) {
215 /*
216 * in order to update a remote cpu's clock based on our
217 * unstable raw time rebase it against:
218 * tick_raw (offset between raw counters)
219 * tick_gotd (tick offset between cpus)
220 */
221 struct sched_clock_data *my_scd = this_scd(); 161 struct sched_clock_data *my_scd = this_scd();
222 162
223 lock_double_clock(scd, my_scd); 163 lock_double_clock(scd, my_scd);
224 164
225 now -= my_scd->tick_raw; 165 this_clock = __update_sched_clock(my_scd, now);
226 now += scd->tick_raw; 166 remote_clock = scd->clock;
227 167
228 now += my_scd->tick_gtod; 168 /*
229 now -= scd->tick_gtod; 169 * Use the opportunity that we have both locks
170 * taken to couple the two clocks: we take the
171 * larger time as the latest time for both
172 * runqueues. (this creates monotonic movement)
173 */
174 if (likely(remote_clock < this_clock)) {
175 clock = this_clock;
176 scd->clock = clock;
177 } else {
178 /*
179 * Should be rare, but possible:
180 */
181 clock = remote_clock;
182 my_scd->clock = remote_clock;
183 }
230 184
231 __raw_spin_unlock(&my_scd->lock); 185 __raw_spin_unlock(&my_scd->lock);
232
233 __update_sched_clock(scd, now, &clock);
234
235 __raw_spin_unlock(&scd->lock);
236
237 } else { 186 } else {
238 __raw_spin_lock(&scd->lock); 187 __raw_spin_lock(&scd->lock);
239 __update_sched_clock(scd, now, NULL); 188 clock = __update_sched_clock(scd, now);
240 clock = scd->clock;
241 __raw_spin_unlock(&scd->lock);
242 } 189 }
243 190
191 __raw_spin_unlock(&scd->lock);
192
244 return clock; 193 return clock;
245} 194}
246 195
247void sched_clock_tick(void) 196void sched_clock_tick(void)
248{ 197{
249 struct sched_clock_data *scd = this_scd(); 198 struct sched_clock_data *scd = this_scd();
250 unsigned long now_jiffies = jiffies;
251 s64 mult, delta_gtod, delta_raw;
252 u64 now, now_gtod; 199 u64 now, now_gtod;
253 200
254 if (unlikely(!sched_clock_running)) 201 if (unlikely(!sched_clock_running))
@@ -260,29 +207,14 @@ void sched_clock_tick(void)
260 now = sched_clock(); 207 now = sched_clock();
261 208
262 __raw_spin_lock(&scd->lock); 209 __raw_spin_lock(&scd->lock);
263 __update_sched_clock(scd, now, NULL); 210 __update_sched_clock(scd, now);
264 /* 211 /*
265 * update tick_gtod after __update_sched_clock() because that will 212 * update tick_gtod after __update_sched_clock() because that will
266 * already observe 1 new jiffy; adding a new tick_gtod to that would 213 * already observe 1 new jiffy; adding a new tick_gtod to that would
267 * increase the clock 2 jiffies. 214 * increase the clock 2 jiffies.
268 */ 215 */
269 delta_gtod = now_gtod - scd->tick_gtod;
270 delta_raw = now - scd->tick_raw;
271
272 if ((long)delta_raw > 0) {
273 mult = delta_gtod << MULTI_SHIFT;
274 do_div(mult, delta_raw);
275 scd->multi = mult;
276 if (scd->multi > MAX_MULTI)
277 scd->multi = MAX_MULTI;
278 else if (scd->multi < MIN_MULTI)
279 scd->multi = MIN_MULTI;
280 } else
281 scd->multi = 1 << MULTI_SHIFT;
282
283 scd->tick_raw = now; 216 scd->tick_raw = now;
284 scd->tick_gtod = now_gtod; 217 scd->tick_gtod = now_gtod;
285 scd->tick_jiffies = now_jiffies;
286 __raw_spin_unlock(&scd->lock); 218 __raw_spin_unlock(&scd->lock);
287} 219}
288 220
@@ -301,7 +233,6 @@ EXPORT_SYMBOL_GPL(sched_clock_idle_sleep_event);
301void sched_clock_idle_wakeup_event(u64 delta_ns) 233void sched_clock_idle_wakeup_event(u64 delta_ns)
302{ 234{
303 struct sched_clock_data *scd = this_scd(); 235 struct sched_clock_data *scd = this_scd();
304 u64 now = sched_clock();
305 236
306 /* 237 /*
307 * Override the previous timestamp and ignore all 238 * Override the previous timestamp and ignore all
@@ -310,27 +241,30 @@ void sched_clock_idle_wakeup_event(u64 delta_ns)
310 * rq clock: 241 * rq clock:
311 */ 242 */
312 __raw_spin_lock(&scd->lock); 243 __raw_spin_lock(&scd->lock);
313 scd->prev_raw = now;
314 scd->clock += delta_ns; 244 scd->clock += delta_ns;
315 scd->multi = 1 << MULTI_SHIFT;
316 __raw_spin_unlock(&scd->lock); 245 __raw_spin_unlock(&scd->lock);
317 246
318 touch_softlockup_watchdog(); 247 touch_softlockup_watchdog();
319} 248}
320EXPORT_SYMBOL_GPL(sched_clock_idle_wakeup_event); 249EXPORT_SYMBOL_GPL(sched_clock_idle_wakeup_event);
321 250
322#endif 251#else /* CONFIG_HAVE_UNSTABLE_SCHED_CLOCK */
323 252
324/* 253void sched_clock_init(void)
325 * Scheduler clock - returns current time in nanosec units.
326 * This is default implementation.
327 * Architectures and sub-architectures can override this.
328 */
329unsigned long long __attribute__((weak)) sched_clock(void)
330{ 254{
331 return (unsigned long long)jiffies * (NSEC_PER_SEC / HZ); 255 sched_clock_running = 1;
332} 256}
333 257
258u64 sched_clock_cpu(int cpu)
259{
260 if (unlikely(!sched_clock_running))
261 return 0;
262
263 return sched_clock();
264}
265
266#endif
267
334unsigned long long cpu_clock(int cpu) 268unsigned long long cpu_clock(int cpu)
335{ 269{
336 unsigned long long clock; 270 unsigned long long clock;
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index cf2cd6ce4cb2..fb8994c6d4bb 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -899,7 +899,7 @@ static void hrtick_start_fair(struct rq *rq, struct task_struct *p)
899 * doesn't make sense. Rely on vruntime for fairness. 899 * doesn't make sense. Rely on vruntime for fairness.
900 */ 900 */
901 if (rq->curr != p) 901 if (rq->curr != p)
902 delta = max(10000LL, delta); 902 delta = max_t(s64, 10000LL, delta);
903 903
904 hrtick_start(rq, delta); 904 hrtick_start(rq, delta);
905 } 905 }
@@ -1442,18 +1442,23 @@ __load_balance_iterator(struct cfs_rq *cfs_rq, struct list_head *next)
1442 struct task_struct *p = NULL; 1442 struct task_struct *p = NULL;
1443 struct sched_entity *se; 1443 struct sched_entity *se;
1444 1444
1445 while (next != &cfs_rq->tasks) { 1445 if (next == &cfs_rq->tasks)
1446 return NULL;
1447
1448 /* Skip over entities that are not tasks */
1449 do {
1446 se = list_entry(next, struct sched_entity, group_node); 1450 se = list_entry(next, struct sched_entity, group_node);
1447 next = next->next; 1451 next = next->next;
1452 } while (next != &cfs_rq->tasks && !entity_is_task(se));
1448 1453
1449 /* Skip over entities that are not tasks */ 1454 if (next == &cfs_rq->tasks)
1450 if (entity_is_task(se)) { 1455 return NULL;
1451 p = task_of(se);
1452 break;
1453 }
1454 }
1455 1456
1456 cfs_rq->balance_iterator = next; 1457 cfs_rq->balance_iterator = next;
1458
1459 if (entity_is_task(se))
1460 p = task_of(se);
1461
1457 return p; 1462 return p;
1458} 1463}
1459 1464
diff --git a/kernel/sched_rt.c b/kernel/sched_rt.c
index 908c04f9dad0..6163e4cf885b 100644
--- a/kernel/sched_rt.c
+++ b/kernel/sched_rt.c
@@ -861,6 +861,8 @@ static void put_prev_task_rt(struct rq *rq, struct task_struct *p)
861#define RT_MAX_TRIES 3 861#define RT_MAX_TRIES 3
862 862
863static int double_lock_balance(struct rq *this_rq, struct rq *busiest); 863static int double_lock_balance(struct rq *this_rq, struct rq *busiest);
864static void double_unlock_balance(struct rq *this_rq, struct rq *busiest);
865
864static void deactivate_task(struct rq *rq, struct task_struct *p, int sleep); 866static void deactivate_task(struct rq *rq, struct task_struct *p, int sleep);
865 867
866static int pick_rt_task(struct rq *rq, struct task_struct *p, int cpu) 868static int pick_rt_task(struct rq *rq, struct task_struct *p, int cpu)
@@ -1022,7 +1024,7 @@ static struct rq *find_lock_lowest_rq(struct task_struct *task, struct rq *rq)
1022 break; 1024 break;
1023 1025
1024 /* try again */ 1026 /* try again */
1025 spin_unlock(&lowest_rq->lock); 1027 double_unlock_balance(rq, lowest_rq);
1026 lowest_rq = NULL; 1028 lowest_rq = NULL;
1027 } 1029 }
1028 1030
@@ -1091,7 +1093,7 @@ static int push_rt_task(struct rq *rq)
1091 1093
1092 resched_task(lowest_rq->curr); 1094 resched_task(lowest_rq->curr);
1093 1095
1094 spin_unlock(&lowest_rq->lock); 1096 double_unlock_balance(rq, lowest_rq);
1095 1097
1096 ret = 1; 1098 ret = 1;
1097out: 1099out:
@@ -1197,7 +1199,7 @@ static int pull_rt_task(struct rq *this_rq)
1197 1199
1198 } 1200 }
1199 skip: 1201 skip:
1200 spin_unlock(&src_rq->lock); 1202 double_unlock_balance(this_rq, src_rq);
1201 } 1203 }
1202 1204
1203 return ret; 1205 return ret;
diff --git a/kernel/signal.c b/kernel/signal.c
index 954f77d7e3bc..c539f60c6f41 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -1304,6 +1304,7 @@ int send_sigqueue(struct sigqueue *q, struct task_struct *t, int group)
1304 q->info.si_overrun++; 1304 q->info.si_overrun++;
1305 goto out; 1305 goto out;
1306 } 1306 }
1307 q->info.si_overrun = 0;
1307 1308
1308 signalfd_notify(t, sig); 1309 signalfd_notify(t, sig);
1309 pending = group ? &t->signal->shared_pending : &t->pending; 1310 pending = group ? &t->signal->shared_pending : &t->pending;
diff --git a/kernel/smp.c b/kernel/smp.c
index 96fc7c0edc59..782e2b93e465 100644
--- a/kernel/smp.c
+++ b/kernel/smp.c
@@ -135,7 +135,8 @@ void generic_smp_call_function_interrupt(void)
135 */ 135 */
136 smp_wmb(); 136 smp_wmb();
137 data->csd.flags &= ~CSD_FLAG_WAIT; 137 data->csd.flags &= ~CSD_FLAG_WAIT;
138 } else 138 }
139 if (data->csd.flags & CSD_FLAG_ALLOC)
139 call_rcu(&data->rcu_head, rcu_free_call_data); 140 call_rcu(&data->rcu_head, rcu_free_call_data);
140 } 141 }
141 rcu_read_unlock(); 142 rcu_read_unlock();
@@ -260,6 +261,42 @@ void __smp_call_function_single(int cpu, struct call_single_data *data)
260 generic_exec_single(cpu, data); 261 generic_exec_single(cpu, data);
261} 262}
262 263
264/* Dummy function */
265static void quiesce_dummy(void *unused)
266{
267}
268
269/*
270 * Ensure stack based data used in call function mask is safe to free.
271 *
272 * This is needed by smp_call_function_mask when using on-stack data, because
273 * a single call function queue is shared by all CPUs, and any CPU may pick up
274 * the data item on the queue at any time before it is deleted. So we need to
275 * ensure that all CPUs have transitioned through a quiescent state after
276 * this call.
277 *
278 * This is a very slow function, implemented by sending synchronous IPIs to
279 * all possible CPUs. For this reason, we have to alloc data rather than use
280 * stack based data even in the case of synchronous calls. The stack based
281 * data is then just used for deadlock/oom fallback which will be very rare.
282 *
283 * If a faster scheme can be made, we could go back to preferring stack based
284 * data -- the data allocation/free is non-zero cost.
285 */
286static void smp_call_function_mask_quiesce_stack(cpumask_t mask)
287{
288 struct call_single_data data;
289 int cpu;
290
291 data.func = quiesce_dummy;
292 data.info = NULL;
293
294 for_each_cpu_mask(cpu, mask) {
295 data.flags = CSD_FLAG_WAIT;
296 generic_exec_single(cpu, &data);
297 }
298}
299
263/** 300/**
264 * smp_call_function_mask(): Run a function on a set of other CPUs. 301 * smp_call_function_mask(): Run a function on a set of other CPUs.
265 * @mask: The set of cpus to run on. 302 * @mask: The set of cpus to run on.
@@ -285,6 +322,7 @@ int smp_call_function_mask(cpumask_t mask, void (*func)(void *), void *info,
285 cpumask_t allbutself; 322 cpumask_t allbutself;
286 unsigned long flags; 323 unsigned long flags;
287 int cpu, num_cpus; 324 int cpu, num_cpus;
325 int slowpath = 0;
288 326
289 /* Can deadlock when called with interrupts disabled */ 327 /* Can deadlock when called with interrupts disabled */
290 WARN_ON(irqs_disabled()); 328 WARN_ON(irqs_disabled());
@@ -306,15 +344,16 @@ int smp_call_function_mask(cpumask_t mask, void (*func)(void *), void *info,
306 return smp_call_function_single(cpu, func, info, wait); 344 return smp_call_function_single(cpu, func, info, wait);
307 } 345 }
308 346
309 if (!wait) { 347 data = kmalloc(sizeof(*data), GFP_ATOMIC);
310 data = kmalloc(sizeof(*data), GFP_ATOMIC); 348 if (data) {
311 if (data) 349 data->csd.flags = CSD_FLAG_ALLOC;
312 data->csd.flags = CSD_FLAG_ALLOC; 350 if (wait)
313 } 351 data->csd.flags |= CSD_FLAG_WAIT;
314 if (!data) { 352 } else {
315 data = &d; 353 data = &d;
316 data->csd.flags = CSD_FLAG_WAIT; 354 data->csd.flags = CSD_FLAG_WAIT;
317 wait = 1; 355 wait = 1;
356 slowpath = 1;
318 } 357 }
319 358
320 spin_lock_init(&data->lock); 359 spin_lock_init(&data->lock);
@@ -331,8 +370,11 @@ int smp_call_function_mask(cpumask_t mask, void (*func)(void *), void *info,
331 arch_send_call_function_ipi(mask); 370 arch_send_call_function_ipi(mask);
332 371
333 /* optionally wait for the CPUs to complete */ 372 /* optionally wait for the CPUs to complete */
334 if (wait) 373 if (wait) {
335 csd_flag_wait(&data->csd); 374 csd_flag_wait(&data->csd);
375 if (unlikely(slowpath))
376 smp_call_function_mask_quiesce_stack(mask);
377 }
336 378
337 return 0; 379 return 0;
338} 380}
diff --git a/kernel/spinlock.c b/kernel/spinlock.c
index a1fb54c93cdd..44baeea94ab9 100644
--- a/kernel/spinlock.c
+++ b/kernel/spinlock.c
@@ -292,6 +292,7 @@ void __lockfunc _spin_lock_nested(spinlock_t *lock, int subclass)
292} 292}
293 293
294EXPORT_SYMBOL(_spin_lock_nested); 294EXPORT_SYMBOL(_spin_lock_nested);
295
295unsigned long __lockfunc _spin_lock_irqsave_nested(spinlock_t *lock, int subclass) 296unsigned long __lockfunc _spin_lock_irqsave_nested(spinlock_t *lock, int subclass)
296{ 297{
297 unsigned long flags; 298 unsigned long flags;
@@ -314,6 +315,16 @@ unsigned long __lockfunc _spin_lock_irqsave_nested(spinlock_t *lock, int subclas
314 315
315EXPORT_SYMBOL(_spin_lock_irqsave_nested); 316EXPORT_SYMBOL(_spin_lock_irqsave_nested);
316 317
318void __lockfunc _spin_lock_nest_lock(spinlock_t *lock,
319 struct lockdep_map *nest_lock)
320{
321 preempt_disable();
322 spin_acquire_nest(&lock->dep_map, 0, 0, nest_lock, _RET_IP_);
323 LOCK_CONTENDED(lock, _raw_spin_trylock, _raw_spin_lock);
324}
325
326EXPORT_SYMBOL(_spin_lock_nest_lock);
327
317#endif 328#endif
318 329
319void __lockfunc _spin_unlock(spinlock_t *lock) 330void __lockfunc _spin_unlock(spinlock_t *lock)
diff --git a/kernel/stop_machine.c b/kernel/stop_machine.c
index e446c7c7d6a9..af3c7cea258b 100644
--- a/kernel/stop_machine.c
+++ b/kernel/stop_machine.c
@@ -65,7 +65,6 @@ static void ack_state(void)
65static int stop_cpu(struct stop_machine_data *smdata) 65static int stop_cpu(struct stop_machine_data *smdata)
66{ 66{
67 enum stopmachine_state curstate = STOPMACHINE_NONE; 67 enum stopmachine_state curstate = STOPMACHINE_NONE;
68 int uninitialized_var(ret);
69 68
70 /* Simple state machine */ 69 /* Simple state machine */
71 do { 70 do {
diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
index 825b4c00fe44..f5da526424a9 100644
--- a/kernel/time/tick-sched.c
+++ b/kernel/time/tick-sched.c
@@ -289,7 +289,6 @@ void tick_nohz_stop_sched_tick(int inidle)
289 ts->tick_stopped = 1; 289 ts->tick_stopped = 1;
290 ts->idle_jiffies = last_jiffies; 290 ts->idle_jiffies = last_jiffies;
291 rcu_enter_nohz(); 291 rcu_enter_nohz();
292 sched_clock_tick_stop(cpu);
293 } 292 }
294 293
295 /* 294 /*
@@ -392,7 +391,6 @@ void tick_nohz_restart_sched_tick(void)
392 select_nohz_load_balancer(0); 391 select_nohz_load_balancer(0);
393 now = ktime_get(); 392 now = ktime_get();
394 tick_do_update_jiffies64(now); 393 tick_do_update_jiffies64(now);
395 sched_clock_tick_start(cpu);
396 cpu_clear(cpu, nohz_cpu_mask); 394 cpu_clear(cpu, nohz_cpu_mask);
397 395
398 /* 396 /*
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 4a26a1382df0..4048e92aa04f 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -290,11 +290,11 @@ static void run_workqueue(struct cpu_workqueue_struct *cwq)
290 290
291 BUG_ON(get_wq_data(work) != cwq); 291 BUG_ON(get_wq_data(work) != cwq);
292 work_clear_pending(work); 292 work_clear_pending(work);
293 lock_acquire(&cwq->wq->lockdep_map, 0, 0, 0, 2, _THIS_IP_); 293 lock_map_acquire(&cwq->wq->lockdep_map);
294 lock_acquire(&lockdep_map, 0, 0, 0, 2, _THIS_IP_); 294 lock_map_acquire(&lockdep_map);
295 f(work); 295 f(work);
296 lock_release(&lockdep_map, 1, _THIS_IP_); 296 lock_map_release(&lockdep_map);
297 lock_release(&cwq->wq->lockdep_map, 1, _THIS_IP_); 297 lock_map_release(&cwq->wq->lockdep_map);
298 298
299 if (unlikely(in_atomic() || lockdep_depth(current) > 0)) { 299 if (unlikely(in_atomic() || lockdep_depth(current) > 0)) {
300 printk(KERN_ERR "BUG: workqueue leaked lock or atomic: " 300 printk(KERN_ERR "BUG: workqueue leaked lock or atomic: "
@@ -413,8 +413,8 @@ void flush_workqueue(struct workqueue_struct *wq)
413 int cpu; 413 int cpu;
414 414
415 might_sleep(); 415 might_sleep();
416 lock_acquire(&wq->lockdep_map, 0, 0, 0, 2, _THIS_IP_); 416 lock_map_acquire(&wq->lockdep_map);
417 lock_release(&wq->lockdep_map, 1, _THIS_IP_); 417 lock_map_release(&wq->lockdep_map);
418 for_each_cpu_mask_nr(cpu, *cpu_map) 418 for_each_cpu_mask_nr(cpu, *cpu_map)
419 flush_cpu_workqueue(per_cpu_ptr(wq->cpu_wq, cpu)); 419 flush_cpu_workqueue(per_cpu_ptr(wq->cpu_wq, cpu));
420} 420}
@@ -441,8 +441,8 @@ int flush_work(struct work_struct *work)
441 if (!cwq) 441 if (!cwq)
442 return 0; 442 return 0;
443 443
444 lock_acquire(&cwq->wq->lockdep_map, 0, 0, 0, 2, _THIS_IP_); 444 lock_map_acquire(&cwq->wq->lockdep_map);
445 lock_release(&cwq->wq->lockdep_map, 1, _THIS_IP_); 445 lock_map_release(&cwq->wq->lockdep_map);
446 446
447 prev = NULL; 447 prev = NULL;
448 spin_lock_irq(&cwq->lock); 448 spin_lock_irq(&cwq->lock);
@@ -536,8 +536,8 @@ static void wait_on_work(struct work_struct *work)
536 536
537 might_sleep(); 537 might_sleep();
538 538
539 lock_acquire(&work->lockdep_map, 0, 0, 0, 2, _THIS_IP_); 539 lock_map_acquire(&work->lockdep_map);
540 lock_release(&work->lockdep_map, 1, _THIS_IP_); 540 lock_map_release(&work->lockdep_map);
541 541
542 cwq = get_wq_data(work); 542 cwq = get_wq_data(work);
543 if (!cwq) 543 if (!cwq)
@@ -872,8 +872,8 @@ static void cleanup_workqueue_thread(struct cpu_workqueue_struct *cwq)
872 if (cwq->thread == NULL) 872 if (cwq->thread == NULL)
873 return; 873 return;
874 874
875 lock_acquire(&cwq->wq->lockdep_map, 0, 0, 0, 2, _THIS_IP_); 875 lock_map_acquire(&cwq->wq->lockdep_map);
876 lock_release(&cwq->wq->lockdep_map, 1, _THIS_IP_); 876 lock_map_release(&cwq->wq->lockdep_map);
877 877
878 flush_cpu_workqueue(cwq); 878 flush_cpu_workqueue(cwq);
879 /* 879 /*
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index e1d4764435ed..800ac8485544 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -735,6 +735,15 @@ config FIREWIRE_OHCI_REMOTE_DMA
735 735
736 If unsure, say N. 736 If unsure, say N.
737 737
738menuconfig BUILD_DOCSRC
739 bool "Build targets in Documentation/ tree"
740 depends on HEADERS_CHECK
741 help
742 This option attempts to build objects from the source files in the
743 kernel Documentation/ tree.
744
745 Say N if you are unsure.
746
738source "samples/Kconfig" 747source "samples/Kconfig"
739 748
740source "lib/Kconfig.kgdb" 749source "lib/Kconfig.kgdb"
diff --git a/lib/bitmap.c b/lib/bitmap.c
index 482df94ea21e..06fb57c86de0 100644
--- a/lib/bitmap.c
+++ b/lib/bitmap.c
@@ -316,6 +316,17 @@ int bitmap_scnprintf(char *buf, unsigned int buflen,
316EXPORT_SYMBOL(bitmap_scnprintf); 316EXPORT_SYMBOL(bitmap_scnprintf);
317 317
318/** 318/**
319 * bitmap_scnprintf_len - return buffer length needed to convert
320 * bitmap to an ASCII hex string
321 * @nr_bits: number of bits to be converted
322 */
323int bitmap_scnprintf_len(unsigned int nr_bits)
324{
325 unsigned int nr_nibbles = ALIGN(nr_bits, 4) / 4;
326 return nr_nibbles + ALIGN(nr_nibbles, CHUNKSZ / 4) / (CHUNKSZ / 4) - 1;
327}
328
329/**
319 * __bitmap_parse - convert an ASCII hex string into a bitmap. 330 * __bitmap_parse - convert an ASCII hex string into a bitmap.
320 * @buf: pointer to buffer containing string. 331 * @buf: pointer to buffer containing string.
321 * @buflen: buffer size in bytes. If string is smaller than this 332 * @buflen: buffer size in bytes. If string is smaller than this
diff --git a/lib/debug_locks.c b/lib/debug_locks.c
index 0ef01d14727c..0218b4693dd8 100644
--- a/lib/debug_locks.c
+++ b/lib/debug_locks.c
@@ -8,6 +8,7 @@
8 * 8 *
9 * Copyright (C) 2006 Red Hat, Inc., Ingo Molnar <mingo@redhat.com> 9 * Copyright (C) 2006 Red Hat, Inc., Ingo Molnar <mingo@redhat.com>
10 */ 10 */
11#include <linux/kernel.h>
11#include <linux/rwsem.h> 12#include <linux/rwsem.h>
12#include <linux/mutex.h> 13#include <linux/mutex.h>
13#include <linux/module.h> 14#include <linux/module.h>
@@ -37,6 +38,7 @@ int debug_locks_off(void)
37{ 38{
38 if (xchg(&debug_locks, 0)) { 39 if (xchg(&debug_locks, 0)) {
39 if (!debug_locks_silent) { 40 if (!debug_locks_silent) {
41 oops_in_progress = 1;
40 console_verbose(); 42 console_verbose();
41 return 1; 43 return 1;
42 } 44 }
diff --git a/lib/vsprintf.c b/lib/vsprintf.c
index 1dc2d1d18fa8..d8d1d1142248 100644
--- a/lib/vsprintf.c
+++ b/lib/vsprintf.c
@@ -220,7 +220,7 @@ int strict_strtou##type(const char *cp, unsigned int base, valtype *res)\
220 if (len == 0) \ 220 if (len == 0) \
221 return -EINVAL; \ 221 return -EINVAL; \
222 \ 222 \
223 val = simple_strtoul(cp, &tail, base); \ 223 val = simple_strtou##type(cp, &tail, base); \
224 if ((*tail == '\0') || \ 224 if ((*tail == '\0') || \
225 ((len == (size_t)(tail - cp) + 1) && (*tail == '\n'))) {\ 225 ((len == (size_t)(tail - cp) + 1) && (*tail == '\n'))) {\
226 *res = val; \ 226 *res = val; \
diff --git a/mm/Kconfig b/mm/Kconfig
index 446c6588c753..0bd9c2dbb2a0 100644
--- a/mm/Kconfig
+++ b/mm/Kconfig
@@ -77,9 +77,6 @@ config FLAT_NODE_MEM_MAP
77 def_bool y 77 def_bool y
78 depends on !SPARSEMEM 78 depends on !SPARSEMEM
79 79
80config HAVE_GET_USER_PAGES_FAST
81 bool
82
83# 80#
84# Both the NUMA code and DISCONTIGMEM use arrays of pg_data_t's 81# Both the NUMA code and DISCONTIGMEM use arrays of pg_data_t's
85# to represent different areas of memory. This variable allows 82# to represent different areas of memory. This variable allows
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index 757ca983fd99..67a71191136e 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -565,7 +565,7 @@ static struct page *alloc_fresh_huge_page_node(struct hstate *h, int nid)
565 huge_page_order(h)); 565 huge_page_order(h));
566 if (page) { 566 if (page) {
567 if (arch_prepare_hugepage(page)) { 567 if (arch_prepare_hugepage(page)) {
568 __free_pages(page, HUGETLB_PAGE_ORDER); 568 __free_pages(page, huge_page_order(h));
569 return NULL; 569 return NULL;
570 } 570 }
571 prep_new_huge_page(h, page, nid); 571 prep_new_huge_page(h, page, nid);
@@ -665,6 +665,11 @@ static struct page *alloc_buddy_huge_page(struct hstate *h,
665 __GFP_REPEAT|__GFP_NOWARN, 665 __GFP_REPEAT|__GFP_NOWARN,
666 huge_page_order(h)); 666 huge_page_order(h));
667 667
668 if (page && arch_prepare_hugepage(page)) {
669 __free_pages(page, huge_page_order(h));
670 return NULL;
671 }
672
668 spin_lock(&hugetlb_lock); 673 spin_lock(&hugetlb_lock);
669 if (page) { 674 if (page) {
670 /* 675 /*
@@ -1937,6 +1942,18 @@ retry:
1937 lock_page(page); 1942 lock_page(page);
1938 } 1943 }
1939 1944
1945 /*
1946 * If we are going to COW a private mapping later, we examine the
1947 * pending reservations for this page now. This will ensure that
1948 * any allocations necessary to record that reservation occur outside
1949 * the spinlock.
1950 */
1951 if (write_access && !(vma->vm_flags & VM_SHARED))
1952 if (vma_needs_reservation(h, vma, address) < 0) {
1953 ret = VM_FAULT_OOM;
1954 goto backout_unlocked;
1955 }
1956
1940 spin_lock(&mm->page_table_lock); 1957 spin_lock(&mm->page_table_lock);
1941 size = i_size_read(mapping->host) >> huge_page_shift(h); 1958 size = i_size_read(mapping->host) >> huge_page_shift(h);
1942 if (idx >= size) 1959 if (idx >= size)
@@ -1962,6 +1979,7 @@ out:
1962 1979
1963backout: 1980backout:
1964 spin_unlock(&mm->page_table_lock); 1981 spin_unlock(&mm->page_table_lock);
1982backout_unlocked:
1965 unlock_page(page); 1983 unlock_page(page);
1966 put_page(page); 1984 put_page(page);
1967 goto out; 1985 goto out;
@@ -1973,6 +1991,7 @@ int hugetlb_fault(struct mm_struct *mm, struct vm_area_struct *vma,
1973 pte_t *ptep; 1991 pte_t *ptep;
1974 pte_t entry; 1992 pte_t entry;
1975 int ret; 1993 int ret;
1994 struct page *pagecache_page = NULL;
1976 static DEFINE_MUTEX(hugetlb_instantiation_mutex); 1995 static DEFINE_MUTEX(hugetlb_instantiation_mutex);
1977 struct hstate *h = hstate_vma(vma); 1996 struct hstate *h = hstate_vma(vma);
1978 1997
@@ -1989,25 +2008,44 @@ int hugetlb_fault(struct mm_struct *mm, struct vm_area_struct *vma,
1989 entry = huge_ptep_get(ptep); 2008 entry = huge_ptep_get(ptep);
1990 if (huge_pte_none(entry)) { 2009 if (huge_pte_none(entry)) {
1991 ret = hugetlb_no_page(mm, vma, address, ptep, write_access); 2010 ret = hugetlb_no_page(mm, vma, address, ptep, write_access);
1992 mutex_unlock(&hugetlb_instantiation_mutex); 2011 goto out_unlock;
1993 return ret;
1994 } 2012 }
1995 2013
1996 ret = 0; 2014 ret = 0;
1997 2015
2016 /*
2017 * If we are going to COW the mapping later, we examine the pending
2018 * reservations for this page now. This will ensure that any
2019 * allocations necessary to record that reservation occur outside the
2020 * spinlock. For private mappings, we also lookup the pagecache
2021 * page now as it is used to determine if a reservation has been
2022 * consumed.
2023 */
2024 if (write_access && !pte_write(entry)) {
2025 if (vma_needs_reservation(h, vma, address) < 0) {
2026 ret = VM_FAULT_OOM;
2027 goto out_unlock;
2028 }
2029
2030 if (!(vma->vm_flags & VM_SHARED))
2031 pagecache_page = hugetlbfs_pagecache_page(h,
2032 vma, address);
2033 }
2034
1998 spin_lock(&mm->page_table_lock); 2035 spin_lock(&mm->page_table_lock);
1999 /* Check for a racing update before calling hugetlb_cow */ 2036 /* Check for a racing update before calling hugetlb_cow */
2000 if (likely(pte_same(entry, huge_ptep_get(ptep)))) 2037 if (likely(pte_same(entry, huge_ptep_get(ptep))))
2001 if (write_access && !pte_write(entry)) { 2038 if (write_access && !pte_write(entry))
2002 struct page *page; 2039 ret = hugetlb_cow(mm, vma, address, ptep, entry,
2003 page = hugetlbfs_pagecache_page(h, vma, address); 2040 pagecache_page);
2004 ret = hugetlb_cow(mm, vma, address, ptep, entry, page);
2005 if (page) {
2006 unlock_page(page);
2007 put_page(page);
2008 }
2009 }
2010 spin_unlock(&mm->page_table_lock); 2041 spin_unlock(&mm->page_table_lock);
2042
2043 if (pagecache_page) {
2044 unlock_page(pagecache_page);
2045 put_page(pagecache_page);
2046 }
2047
2048out_unlock:
2011 mutex_unlock(&hugetlb_instantiation_mutex); 2049 mutex_unlock(&hugetlb_instantiation_mutex);
2012 2050
2013 return ret; 2051 return ret;
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 7056c3bdb478..0f1f7a7374ba 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -796,6 +796,8 @@ int mem_cgroup_shrink_usage(struct mm_struct *mm, gfp_t gfp_mask)
796 796
797 if (mem_cgroup_subsys.disabled) 797 if (mem_cgroup_subsys.disabled)
798 return 0; 798 return 0;
799 if (!mm)
800 return 0;
799 801
800 rcu_read_lock(); 802 rcu_read_lock();
801 mem = mem_cgroup_from_task(rcu_dereference(mm->owner)); 803 mem = mem_cgroup_from_task(rcu_dereference(mm->owner));
diff --git a/mm/mempolicy.c b/mm/mempolicy.c
index e550bec20582..83369058ec13 100644
--- a/mm/mempolicy.c
+++ b/mm/mempolicy.c
@@ -803,7 +803,6 @@ static int migrate_to_node(struct mm_struct *mm, int source, int dest,
803int do_migrate_pages(struct mm_struct *mm, 803int do_migrate_pages(struct mm_struct *mm,
804 const nodemask_t *from_nodes, const nodemask_t *to_nodes, int flags) 804 const nodemask_t *from_nodes, const nodemask_t *to_nodes, int flags)
805{ 805{
806 LIST_HEAD(pagelist);
807 int busy = 0; 806 int busy = 0;
808 int err = 0; 807 int err = 0;
809 nodemask_t tmp; 808 nodemask_t tmp;
diff --git a/mm/mmap.c b/mm/mmap.c
index 971d0eda754a..339cf5c4d5d8 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -2273,14 +2273,14 @@ int install_special_mapping(struct mm_struct *mm,
2273 2273
2274static DEFINE_MUTEX(mm_all_locks_mutex); 2274static DEFINE_MUTEX(mm_all_locks_mutex);
2275 2275
2276static void vm_lock_anon_vma(struct anon_vma *anon_vma) 2276static void vm_lock_anon_vma(struct mm_struct *mm, struct anon_vma *anon_vma)
2277{ 2277{
2278 if (!test_bit(0, (unsigned long *) &anon_vma->head.next)) { 2278 if (!test_bit(0, (unsigned long *) &anon_vma->head.next)) {
2279 /* 2279 /*
2280 * The LSB of head.next can't change from under us 2280 * The LSB of head.next can't change from under us
2281 * because we hold the mm_all_locks_mutex. 2281 * because we hold the mm_all_locks_mutex.
2282 */ 2282 */
2283 spin_lock(&anon_vma->lock); 2283 spin_lock_nest_lock(&anon_vma->lock, &mm->mmap_sem);
2284 /* 2284 /*
2285 * We can safely modify head.next after taking the 2285 * We can safely modify head.next after taking the
2286 * anon_vma->lock. If some other vma in this mm shares 2286 * anon_vma->lock. If some other vma in this mm shares
@@ -2296,7 +2296,7 @@ static void vm_lock_anon_vma(struct anon_vma *anon_vma)
2296 } 2296 }
2297} 2297}
2298 2298
2299static void vm_lock_mapping(struct address_space *mapping) 2299static void vm_lock_mapping(struct mm_struct *mm, struct address_space *mapping)
2300{ 2300{
2301 if (!test_bit(AS_MM_ALL_LOCKS, &mapping->flags)) { 2301 if (!test_bit(AS_MM_ALL_LOCKS, &mapping->flags)) {
2302 /* 2302 /*
@@ -2310,7 +2310,7 @@ static void vm_lock_mapping(struct address_space *mapping)
2310 */ 2310 */
2311 if (test_and_set_bit(AS_MM_ALL_LOCKS, &mapping->flags)) 2311 if (test_and_set_bit(AS_MM_ALL_LOCKS, &mapping->flags))
2312 BUG(); 2312 BUG();
2313 spin_lock(&mapping->i_mmap_lock); 2313 spin_lock_nest_lock(&mapping->i_mmap_lock, &mm->mmap_sem);
2314 } 2314 }
2315} 2315}
2316 2316
@@ -2358,11 +2358,17 @@ int mm_take_all_locks(struct mm_struct *mm)
2358 for (vma = mm->mmap; vma; vma = vma->vm_next) { 2358 for (vma = mm->mmap; vma; vma = vma->vm_next) {
2359 if (signal_pending(current)) 2359 if (signal_pending(current))
2360 goto out_unlock; 2360 goto out_unlock;
2361 if (vma->anon_vma)
2362 vm_lock_anon_vma(vma->anon_vma);
2363 if (vma->vm_file && vma->vm_file->f_mapping) 2361 if (vma->vm_file && vma->vm_file->f_mapping)
2364 vm_lock_mapping(vma->vm_file->f_mapping); 2362 vm_lock_mapping(mm, vma->vm_file->f_mapping);
2363 }
2364
2365 for (vma = mm->mmap; vma; vma = vma->vm_next) {
2366 if (signal_pending(current))
2367 goto out_unlock;
2368 if (vma->anon_vma)
2369 vm_lock_anon_vma(mm, vma->anon_vma);
2365 } 2370 }
2371
2366 ret = 0; 2372 ret = 0;
2367 2373
2368out_unlock: 2374out_unlock:
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 401d104d2bb6..af982f7cdb2a 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -4437,7 +4437,7 @@ void *__init alloc_large_system_hash(const char *tablename,
4437 do { 4437 do {
4438 size = bucketsize << log2qty; 4438 size = bucketsize << log2qty;
4439 if (flags & HASH_EARLY) 4439 if (flags & HASH_EARLY)
4440 table = alloc_bootmem(size); 4440 table = alloc_bootmem_nopanic(size);
4441 else if (hashdist) 4441 else if (hashdist)
4442 table = __vmalloc(size, GFP_ATOMIC, PAGE_KERNEL); 4442 table = __vmalloc(size, GFP_ATOMIC, PAGE_KERNEL);
4443 else { 4443 else {
diff --git a/mm/slab.c b/mm/slab.c
index 918f04f7fef1..e76eee466886 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -4472,4 +4472,3 @@ size_t ksize(const void *objp)
4472 4472
4473 return obj_size(virt_to_cache(objp)); 4473 return obj_size(virt_to_cache(objp));
4474} 4474}
4475EXPORT_SYMBOL(ksize);
diff --git a/mm/slob.c b/mm/slob.c
index d8fbd4d1bfa7..4c82dd41f32e 100644
--- a/mm/slob.c
+++ b/mm/slob.c
@@ -519,7 +519,6 @@ size_t ksize(const void *block)
519 else 519 else
520 return sp->page.private; 520 return sp->page.private;
521} 521}
522EXPORT_SYMBOL(ksize);
523 522
524struct kmem_cache { 523struct kmem_cache {
525 unsigned int size, align; 524 unsigned int size, align;
diff --git a/mm/slub.c b/mm/slub.c
index b7e2cd5d82db..4f5b96149458 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -1329,7 +1329,7 @@ static struct page *get_any_partial(struct kmem_cache *s, gfp_t flags)
1329 n = get_node(s, zone_to_nid(zone)); 1329 n = get_node(s, zone_to_nid(zone));
1330 1330
1331 if (n && cpuset_zone_allowed_hardwall(zone, flags) && 1331 if (n && cpuset_zone_allowed_hardwall(zone, flags) &&
1332 n->nr_partial > MIN_PARTIAL) { 1332 n->nr_partial > n->min_partial) {
1333 page = get_partial_node(n); 1333 page = get_partial_node(n);
1334 if (page) 1334 if (page)
1335 return page; 1335 return page;
@@ -1381,7 +1381,7 @@ static void unfreeze_slab(struct kmem_cache *s, struct page *page, int tail)
1381 slab_unlock(page); 1381 slab_unlock(page);
1382 } else { 1382 } else {
1383 stat(c, DEACTIVATE_EMPTY); 1383 stat(c, DEACTIVATE_EMPTY);
1384 if (n->nr_partial < MIN_PARTIAL) { 1384 if (n->nr_partial < n->min_partial) {
1385 /* 1385 /*
1386 * Adding an empty slab to the partial slabs in order 1386 * Adding an empty slab to the partial slabs in order
1387 * to avoid page allocator overhead. This slab needs 1387 * to avoid page allocator overhead. This slab needs
@@ -1913,9 +1913,21 @@ static void init_kmem_cache_cpu(struct kmem_cache *s,
1913#endif 1913#endif
1914} 1914}
1915 1915
1916static void init_kmem_cache_node(struct kmem_cache_node *n) 1916static void
1917init_kmem_cache_node(struct kmem_cache_node *n, struct kmem_cache *s)
1917{ 1918{
1918 n->nr_partial = 0; 1919 n->nr_partial = 0;
1920
1921 /*
1922 * The larger the object size is, the more pages we want on the partial
1923 * list to avoid pounding the page allocator excessively.
1924 */
1925 n->min_partial = ilog2(s->size);
1926 if (n->min_partial < MIN_PARTIAL)
1927 n->min_partial = MIN_PARTIAL;
1928 else if (n->min_partial > MAX_PARTIAL)
1929 n->min_partial = MAX_PARTIAL;
1930
1919 spin_lock_init(&n->list_lock); 1931 spin_lock_init(&n->list_lock);
1920 INIT_LIST_HEAD(&n->partial); 1932 INIT_LIST_HEAD(&n->partial);
1921#ifdef CONFIG_SLUB_DEBUG 1933#ifdef CONFIG_SLUB_DEBUG
@@ -2087,7 +2099,7 @@ static struct kmem_cache_node *early_kmem_cache_node_alloc(gfp_t gfpflags,
2087 init_object(kmalloc_caches, n, 1); 2099 init_object(kmalloc_caches, n, 1);
2088 init_tracking(kmalloc_caches, n); 2100 init_tracking(kmalloc_caches, n);
2089#endif 2101#endif
2090 init_kmem_cache_node(n); 2102 init_kmem_cache_node(n, kmalloc_caches);
2091 inc_slabs_node(kmalloc_caches, node, page->objects); 2103 inc_slabs_node(kmalloc_caches, node, page->objects);
2092 2104
2093 /* 2105 /*
@@ -2144,7 +2156,7 @@ static int init_kmem_cache_nodes(struct kmem_cache *s, gfp_t gfpflags)
2144 2156
2145 } 2157 }
2146 s->node[node] = n; 2158 s->node[node] = n;
2147 init_kmem_cache_node(n); 2159 init_kmem_cache_node(n, s);
2148 } 2160 }
2149 return 1; 2161 return 1;
2150} 2162}
@@ -2155,7 +2167,7 @@ static void free_kmem_cache_nodes(struct kmem_cache *s)
2155 2167
2156static int init_kmem_cache_nodes(struct kmem_cache *s, gfp_t gfpflags) 2168static int init_kmem_cache_nodes(struct kmem_cache *s, gfp_t gfpflags)
2157{ 2169{
2158 init_kmem_cache_node(&s->local_node); 2170 init_kmem_cache_node(&s->local_node, s);
2159 return 1; 2171 return 1;
2160} 2172}
2161#endif 2173#endif
@@ -2715,7 +2727,6 @@ size_t ksize(const void *object)
2715 */ 2727 */
2716 return s->size; 2728 return s->size;
2717} 2729}
2718EXPORT_SYMBOL(ksize);
2719 2730
2720void kfree(const void *x) 2731void kfree(const void *x)
2721{ 2732{
@@ -2890,7 +2901,7 @@ static int slab_mem_going_online_callback(void *arg)
2890 ret = -ENOMEM; 2901 ret = -ENOMEM;
2891 goto out; 2902 goto out;
2892 } 2903 }
2893 init_kmem_cache_node(n); 2904 init_kmem_cache_node(n, s);
2894 s->node[nid] = n; 2905 s->node[nid] = n;
2895 } 2906 }
2896out: 2907out:
diff --git a/mm/sparse.c b/mm/sparse.c
index 5d9dbbb9d39e..39db301b920d 100644
--- a/mm/sparse.c
+++ b/mm/sparse.c
@@ -12,7 +12,6 @@
12#include <asm/dma.h> 12#include <asm/dma.h>
13#include <asm/pgalloc.h> 13#include <asm/pgalloc.h>
14#include <asm/pgtable.h> 14#include <asm/pgtable.h>
15#include "internal.h"
16 15
17/* 16/*
18 * Permanent SPARSEMEM data: 17 * Permanent SPARSEMEM data:
diff --git a/mm/util.c b/mm/util.c
index 9341ca77bd88..cb00b748ce47 100644
--- a/mm/util.c
+++ b/mm/util.c
@@ -171,3 +171,18 @@ void arch_pick_mmap_layout(struct mm_struct *mm)
171 mm->unmap_area = arch_unmap_area; 171 mm->unmap_area = arch_unmap_area;
172} 172}
173#endif 173#endif
174
175int __attribute__((weak)) get_user_pages_fast(unsigned long start,
176 int nr_pages, int write, struct page **pages)
177{
178 struct mm_struct *mm = current->mm;
179 int ret;
180
181 down_read(&mm->mmap_sem);
182 ret = get_user_pages(current, mm, start, nr_pages,
183 write, 0, pages, NULL);
184 up_read(&mm->mmap_sem);
185
186 return ret;
187}
188EXPORT_SYMBOL_GPL(get_user_pages_fast);
diff --git a/sound/arm/pxa2xx-ac97.c b/sound/arm/pxa2xx-ac97.c
index 5b3274b465eb..199cca3366df 100644
--- a/sound/arm/pxa2xx-ac97.c
+++ b/sound/arm/pxa2xx-ac97.c
@@ -26,10 +26,10 @@
26 26
27#include <asm/irq.h> 27#include <asm/irq.h>
28#include <linux/mutex.h> 28#include <linux/mutex.h>
29#include <asm/hardware.h> 29#include <mach/hardware.h>
30#include <asm/arch/pxa-regs.h> 30#include <mach/pxa-regs.h>
31#include <asm/arch/pxa2xx-gpio.h> 31#include <mach/pxa2xx-gpio.h>
32#include <asm/arch/audio.h> 32#include <mach/audio.h>
33 33
34#include "pxa2xx-pcm.h" 34#include "pxa2xx-pcm.h"
35 35
diff --git a/sound/arm/pxa2xx-pcm.c b/sound/arm/pxa2xx-pcm.c
index 0ede9e4656a8..381094aab235 100644
--- a/sound/arm/pxa2xx-pcm.c
+++ b/sound/arm/pxa2xx-pcm.c
@@ -21,8 +21,8 @@
21#include <sound/pcm_params.h> 21#include <sound/pcm_params.h>
22 22
23#include <asm/dma.h> 23#include <asm/dma.h>
24#include <asm/hardware.h> 24#include <mach/hardware.h>
25#include <asm/arch/pxa-regs.h> 25#include <mach/pxa-regs.h>
26 26
27#include "pxa2xx-pcm.h" 27#include "pxa2xx-pcm.h"
28 28
diff --git a/sound/arm/sa11xx-uda1341.c b/sound/arm/sa11xx-uda1341.c
index faeddf3ecedb..b9c51bf8cd71 100644
--- a/sound/arm/sa11xx-uda1341.c
+++ b/sound/arm/sa11xx-uda1341.c
@@ -71,8 +71,8 @@
71#include <linux/pm.h> 71#include <linux/pm.h>
72#endif 72#endif
73 73
74#include <asm/hardware.h> 74#include <mach/hardware.h>
75#include <asm/arch/h3600.h> 75#include <mach/h3600.h>
76#include <asm/mach-types.h> 76#include <asm/mach-types.h>
77#include <asm/dma.h> 77#include <asm/dma.h>
78 78
diff --git a/sound/oss/vidc.c b/sound/oss/vidc.c
index bb4a0969f461..725fef0f59a3 100644
--- a/sound/oss/vidc.c
+++ b/sound/oss/vidc.c
@@ -22,7 +22,7 @@
22#include <linux/kernel.h> 22#include <linux/kernel.h>
23#include <linux/interrupt.h> 23#include <linux/interrupt.h>
24 24
25#include <asm/hardware.h> 25#include <mach/hardware.h>
26#include <asm/dma.h> 26#include <asm/dma.h>
27#include <asm/io.h> 27#include <asm/io.h>
28#include <asm/hardware/iomd.h> 28#include <asm/hardware/iomd.h>
diff --git a/sound/oss/vidc_fill.S b/sound/oss/vidc_fill.S
index 01ccc074cc11..bed34921d176 100644
--- a/sound/oss/vidc_fill.S
+++ b/sound/oss/vidc_fill.S
@@ -11,7 +11,7 @@
11 */ 11 */
12#include <linux/linkage.h> 12#include <linux/linkage.h>
13#include <asm/assembler.h> 13#include <asm/assembler.h>
14#include <asm/hardware.h> 14#include <mach/hardware.h>
15#include <asm/hardware/iomd.h> 15#include <asm/hardware/iomd.h>
16 16
17 .text 17 .text
diff --git a/sound/oss/waveartist.c b/sound/oss/waveartist.c
index 88490418f932..c47842fad657 100644
--- a/sound/oss/waveartist.c
+++ b/sound/oss/waveartist.c
@@ -47,7 +47,7 @@
47#include "waveartist.h" 47#include "waveartist.h"
48 48
49#ifdef CONFIG_ARM 49#ifdef CONFIG_ARM
50#include <asm/hardware.h> 50#include <mach/hardware.h>
51#include <asm/mach-types.h> 51#include <asm/mach-types.h>
52#endif 52#endif
53 53
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index ef9f072b47fc..a73d6ca0a906 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -101,6 +101,7 @@ MODULE_SUPPORTED_DEVICE("{{Intel, ICH6},"
101 "{Intel, ICH8}," 101 "{Intel, ICH8},"
102 "{Intel, ICH9}," 102 "{Intel, ICH9},"
103 "{Intel, ICH10}," 103 "{Intel, ICH10},"
104 "{Intel, PCH},"
104 "{Intel, SCH}," 105 "{Intel, SCH},"
105 "{ATI, SB450}," 106 "{ATI, SB450},"
106 "{ATI, SB600}," 107 "{ATI, SB600},"
@@ -2263,6 +2264,8 @@ static struct pci_device_id azx_ids[] = {
2263 { PCI_DEVICE(0x8086, 0x293f), .driver_data = AZX_DRIVER_ICH }, 2264 { PCI_DEVICE(0x8086, 0x293f), .driver_data = AZX_DRIVER_ICH },
2264 { PCI_DEVICE(0x8086, 0x3a3e), .driver_data = AZX_DRIVER_ICH }, 2265 { PCI_DEVICE(0x8086, 0x3a3e), .driver_data = AZX_DRIVER_ICH },
2265 { PCI_DEVICE(0x8086, 0x3a6e), .driver_data = AZX_DRIVER_ICH }, 2266 { PCI_DEVICE(0x8086, 0x3a6e), .driver_data = AZX_DRIVER_ICH },
2267 /* PCH */
2268 { PCI_DEVICE(0x8086, 0x3b56), .driver_data = AZX_DRIVER_ICH },
2266 /* SCH */ 2269 /* SCH */
2267 { PCI_DEVICE(0x8086, 0x811b), .driver_data = AZX_DRIVER_SCH }, 2270 { PCI_DEVICE(0x8086, 0x811b), .driver_data = AZX_DRIVER_SCH },
2268 /* ATI SB 450/600 */ 2271 /* ATI SB 450/600 */
@@ -2272,6 +2275,7 @@ static struct pci_device_id azx_ids[] = {
2272 { PCI_DEVICE(0x1002, 0x793b), .driver_data = AZX_DRIVER_ATIHDMI }, 2275 { PCI_DEVICE(0x1002, 0x793b), .driver_data = AZX_DRIVER_ATIHDMI },
2273 { PCI_DEVICE(0x1002, 0x7919), .driver_data = AZX_DRIVER_ATIHDMI }, 2276 { PCI_DEVICE(0x1002, 0x7919), .driver_data = AZX_DRIVER_ATIHDMI },
2274 { PCI_DEVICE(0x1002, 0x960f), .driver_data = AZX_DRIVER_ATIHDMI }, 2277 { PCI_DEVICE(0x1002, 0x960f), .driver_data = AZX_DRIVER_ATIHDMI },
2278 { PCI_DEVICE(0x1002, 0x970f), .driver_data = AZX_DRIVER_ATIHDMI },
2275 { PCI_DEVICE(0x1002, 0xaa00), .driver_data = AZX_DRIVER_ATIHDMI }, 2279 { PCI_DEVICE(0x1002, 0xaa00), .driver_data = AZX_DRIVER_ATIHDMI },
2276 { PCI_DEVICE(0x1002, 0xaa08), .driver_data = AZX_DRIVER_ATIHDMI }, 2280 { PCI_DEVICE(0x1002, 0xaa08), .driver_data = AZX_DRIVER_ATIHDMI },
2277 { PCI_DEVICE(0x1002, 0xaa10), .driver_data = AZX_DRIVER_ATIHDMI }, 2281 { PCI_DEVICE(0x1002, 0xaa10), .driver_data = AZX_DRIVER_ATIHDMI },
diff --git a/sound/soc/at32/playpaq_wm8510.c b/sound/soc/at32/playpaq_wm8510.c
index fee5f8e58957..3f326219f1ec 100644
--- a/sound/soc/at32/playpaq_wm8510.c
+++ b/sound/soc/at32/playpaq_wm8510.c
@@ -36,8 +36,8 @@
36#include <sound/soc.h> 36#include <sound/soc.h>
37#include <sound/soc-dapm.h> 37#include <sound/soc-dapm.h>
38 38
39#include <asm/arch/at32ap700x.h> 39#include <mach/at32ap700x.h>
40#include <asm/arch/portmux.h> 40#include <mach/portmux.h>
41 41
42#include "../codecs/wm8510.h" 42#include "../codecs/wm8510.h"
43#include "at32-pcm.h" 43#include "at32-pcm.h"
diff --git a/sound/soc/at91/at91-pcm.c b/sound/soc/at91/at91-pcm.c
index d47492b2b6e5..7ab48bd25e4c 100644
--- a/sound/soc/at91/at91-pcm.c
+++ b/sound/soc/at91/at91-pcm.c
@@ -28,8 +28,8 @@
28#include <sound/pcm_params.h> 28#include <sound/pcm_params.h>
29#include <sound/soc.h> 29#include <sound/soc.h>
30 30
31#include <asm/arch/hardware.h> 31#include <mach/hardware.h>
32#include <asm/arch/at91_ssc.h> 32#include <mach/at91_ssc.h>
33 33
34#include "at91-pcm.h" 34#include "at91-pcm.h"
35 35
diff --git a/sound/soc/at91/at91-pcm.h b/sound/soc/at91/at91-pcm.h
index 58d0f00a07b2..e5aada2cb102 100644
--- a/sound/soc/at91/at91-pcm.h
+++ b/sound/soc/at91/at91-pcm.h
@@ -19,7 +19,7 @@
19#ifndef _AT91_PCM_H 19#ifndef _AT91_PCM_H
20#define _AT91_PCM_H 20#define _AT91_PCM_H
21 21
22#include <asm/arch/hardware.h> 22#include <mach/hardware.h>
23 23
24struct at91_ssc_periph { 24struct at91_ssc_periph {
25 void __iomem *base; 25 void __iomem *base;
diff --git a/sound/soc/at91/at91-ssc.c b/sound/soc/at91/at91-ssc.c
index 090e607f8692..5d44515e62e0 100644
--- a/sound/soc/at91/at91-ssc.c
+++ b/sound/soc/at91/at91-ssc.c
@@ -28,9 +28,9 @@
28#include <sound/initval.h> 28#include <sound/initval.h>
29#include <sound/soc.h> 29#include <sound/soc.h>
30 30
31#include <asm/arch/hardware.h> 31#include <mach/hardware.h>
32#include <asm/arch/at91_pmc.h> 32#include <mach/at91_pmc.h>
33#include <asm/arch/at91_ssc.h> 33#include <mach/at91_ssc.h>
34 34
35#include "at91-pcm.h" 35#include "at91-pcm.h"
36#include "at91-ssc.h" 36#include "at91-ssc.h"
diff --git a/sound/soc/at91/eti_b1_wm8731.c b/sound/soc/at91/eti_b1_wm8731.c
index d532de954241..b081e83766b7 100644
--- a/sound/soc/at91/eti_b1_wm8731.c
+++ b/sound/soc/at91/eti_b1_wm8731.c
@@ -33,8 +33,8 @@
33#include <sound/soc.h> 33#include <sound/soc.h>
34#include <sound/soc-dapm.h> 34#include <sound/soc-dapm.h>
35 35
36#include <asm/hardware.h> 36#include <mach/hardware.h>
37#include <asm/arch/gpio.h> 37#include <mach/gpio.h>
38 38
39#include "../codecs/wm8731.h" 39#include "../codecs/wm8731.h"
40#include "at91-pcm.h" 40#include "at91-pcm.h"
diff --git a/sound/soc/codecs/wm8750.c b/sound/soc/codecs/wm8750.c
index e23cb09f0d14..c6a8edf302ad 100644
--- a/sound/soc/codecs/wm8750.c
+++ b/sound/soc/codecs/wm8750.c
@@ -348,8 +348,9 @@ static const struct snd_soc_dapm_widget wm8750_dapm_widgets[] = {
348 SND_SOC_DAPM_OUTPUT("ROUT1"), 348 SND_SOC_DAPM_OUTPUT("ROUT1"),
349 SND_SOC_DAPM_OUTPUT("LOUT2"), 349 SND_SOC_DAPM_OUTPUT("LOUT2"),
350 SND_SOC_DAPM_OUTPUT("ROUT2"), 350 SND_SOC_DAPM_OUTPUT("ROUT2"),
351 SND_SOC_DAPM_OUTPUT("MONO"), 351 SND_SOC_DAPM_OUTPUT("MONO1"),
352 SND_SOC_DAPM_OUTPUT("OUT3"), 352 SND_SOC_DAPM_OUTPUT("OUT3"),
353 SND_SOC_DAPM_OUTPUT("VREF"),
353 354
354 SND_SOC_DAPM_INPUT("LINPUT1"), 355 SND_SOC_DAPM_INPUT("LINPUT1"),
355 SND_SOC_DAPM_INPUT("LINPUT2"), 356 SND_SOC_DAPM_INPUT("LINPUT2"),
diff --git a/sound/soc/davinci/davinci-evm.c b/sound/soc/davinci/davinci-evm.c
index 5e2c306399ed..65fdbd81a379 100644
--- a/sound/soc/davinci/davinci-evm.c
+++ b/sound/soc/davinci/davinci-evm.c
@@ -19,9 +19,8 @@
19#include <sound/soc.h> 19#include <sound/soc.h>
20#include <sound/soc-dapm.h> 20#include <sound/soc-dapm.h>
21 21
22#include <asm/mach-types.h>
23#include <asm/dma.h> 22#include <asm/dma.h>
24#include <asm/arch/hardware.h> 23#include <mach/hardware.h>
25 24
26#include "../codecs/tlv320aic3x.h" 25#include "../codecs/tlv320aic3x.h"
27#include "davinci-pcm.h" 26#include "davinci-pcm.h"
diff --git a/sound/soc/omap/n810.c b/sound/soc/omap/n810.c
index 02cec96859b8..7694621ec40b 100644
--- a/sound/soc/omap/n810.c
+++ b/sound/soc/omap/n810.c
@@ -29,9 +29,9 @@
29#include <sound/soc-dapm.h> 29#include <sound/soc-dapm.h>
30 30
31#include <asm/mach-types.h> 31#include <asm/mach-types.h>
32#include <asm/arch/hardware.h> 32#include <mach/hardware.h>
33#include <linux/gpio.h> 33#include <linux/gpio.h>
34#include <asm/arch/mcbsp.h> 34#include <mach/mcbsp.h>
35 35
36#include "omap-mcbsp.h" 36#include "omap-mcbsp.h"
37#include "omap-pcm.h" 37#include "omap-pcm.h"
diff --git a/sound/soc/omap/omap-mcbsp.c b/sound/soc/omap/omap-mcbsp.c
index 00b0c9d73cd4..35310e16d7f3 100644
--- a/sound/soc/omap/omap-mcbsp.c
+++ b/sound/soc/omap/omap-mcbsp.c
@@ -30,9 +30,9 @@
30#include <sound/initval.h> 30#include <sound/initval.h>
31#include <sound/soc.h> 31#include <sound/soc.h>
32 32
33#include <asm/arch/control.h> 33#include <mach/control.h>
34#include <asm/arch/dma.h> 34#include <mach/dma.h>
35#include <asm/arch/mcbsp.h> 35#include <mach/mcbsp.h>
36#include "omap-mcbsp.h" 36#include "omap-mcbsp.h"
37#include "omap-pcm.h" 37#include "omap-pcm.h"
38 38
diff --git a/sound/soc/omap/omap-pcm.c b/sound/soc/omap/omap-pcm.c
index e092f3d836d0..690bfeaec4a0 100644
--- a/sound/soc/omap/omap-pcm.c
+++ b/sound/soc/omap/omap-pcm.c
@@ -27,7 +27,7 @@
27#include <sound/pcm_params.h> 27#include <sound/pcm_params.h>
28#include <sound/soc.h> 28#include <sound/soc.h>
29 29
30#include <asm/arch/dma.h> 30#include <mach/dma.h>
31#include "omap-pcm.h" 31#include "omap-pcm.h"
32 32
33static const struct snd_pcm_hardware omap_pcm_hardware = { 33static const struct snd_pcm_hardware omap_pcm_hardware = {
diff --git a/sound/soc/pxa/corgi.c b/sound/soc/pxa/corgi.c
index c0294464a23a..0a53f72077fd 100644
--- a/sound/soc/pxa/corgi.c
+++ b/sound/soc/pxa/corgi.c
@@ -25,10 +25,10 @@
25 25
26#include <asm/mach-types.h> 26#include <asm/mach-types.h>
27#include <asm/hardware/scoop.h> 27#include <asm/hardware/scoop.h>
28#include <asm/arch/pxa-regs.h> 28#include <mach/pxa-regs.h>
29#include <asm/arch/hardware.h> 29#include <mach/hardware.h>
30#include <asm/arch/corgi.h> 30#include <mach/corgi.h>
31#include <asm/arch/audio.h> 31#include <mach/audio.h>
32 32
33#include "../codecs/wm8731.h" 33#include "../codecs/wm8731.h"
34#include "pxa2xx-pcm.h" 34#include "pxa2xx-pcm.h"
diff --git a/sound/soc/pxa/e800_wm9712.c b/sound/soc/pxa/e800_wm9712.c
index 06e8afb25277..6781c5be242f 100644
--- a/sound/soc/pxa/e800_wm9712.c
+++ b/sound/soc/pxa/e800_wm9712.c
@@ -21,9 +21,9 @@
21#include <sound/soc-dapm.h> 21#include <sound/soc-dapm.h>
22 22
23#include <asm/mach-types.h> 23#include <asm/mach-types.h>
24#include <asm/arch/pxa-regs.h> 24#include <mach/pxa-regs.h>
25#include <asm/arch/hardware.h> 25#include <mach/hardware.h>
26#include <asm/arch/audio.h> 26#include <mach/audio.h>
27 27
28#include "../codecs/wm9712.h" 28#include "../codecs/wm9712.h"
29#include "pxa2xx-pcm.h" 29#include "pxa2xx-pcm.h"
diff --git a/sound/soc/pxa/em-x270.c b/sound/soc/pxa/em-x270.c
index 02dcac39cdf6..d9c3f7b28be2 100644
--- a/sound/soc/pxa/em-x270.c
+++ b/sound/soc/pxa/em-x270.c
@@ -30,9 +30,9 @@
30#include <sound/soc-dapm.h> 30#include <sound/soc-dapm.h>
31 31
32#include <asm/mach-types.h> 32#include <asm/mach-types.h>
33#include <asm/arch/pxa-regs.h> 33#include <mach/pxa-regs.h>
34#include <asm/arch/hardware.h> 34#include <mach/hardware.h>
35#include <asm/arch/audio.h> 35#include <mach/audio.h>
36 36
37#include "../codecs/wm9712.h" 37#include "../codecs/wm9712.h"
38#include "pxa2xx-pcm.h" 38#include "pxa2xx-pcm.h"
diff --git a/sound/soc/pxa/poodle.c b/sound/soc/pxa/poodle.c
index d968cf71b569..a4697f7e2921 100644
--- a/sound/soc/pxa/poodle.c
+++ b/sound/soc/pxa/poodle.c
@@ -26,10 +26,10 @@
26 26
27#include <asm/mach-types.h> 27#include <asm/mach-types.h>
28#include <asm/hardware/locomo.h> 28#include <asm/hardware/locomo.h>
29#include <asm/arch/pxa-regs.h> 29#include <mach/pxa-regs.h>
30#include <asm/arch/hardware.h> 30#include <mach/hardware.h>
31#include <asm/arch/poodle.h> 31#include <mach/poodle.h>
32#include <asm/arch/audio.h> 32#include <mach/audio.h>
33 33
34#include "../codecs/wm8731.h" 34#include "../codecs/wm8731.h"
35#include "pxa2xx-pcm.h" 35#include "pxa2xx-pcm.h"
diff --git a/sound/soc/pxa/pxa2xx-ac97.c b/sound/soc/pxa/pxa2xx-ac97.c
index 059af815ea0c..d94a495bd6bd 100644
--- a/sound/soc/pxa/pxa2xx-ac97.c
+++ b/sound/soc/pxa/pxa2xx-ac97.c
@@ -26,10 +26,10 @@
26 26
27#include <asm/irq.h> 27#include <asm/irq.h>
28#include <linux/mutex.h> 28#include <linux/mutex.h>
29#include <asm/hardware.h> 29#include <mach/hardware.h>
30#include <asm/arch/pxa-regs.h> 30#include <mach/pxa-regs.h>
31#include <asm/arch/pxa2xx-gpio.h> 31#include <mach/pxa2xx-gpio.h>
32#include <asm/arch/audio.h> 32#include <mach/audio.h>
33 33
34#include "pxa2xx-pcm.h" 34#include "pxa2xx-pcm.h"
35#include "pxa2xx-ac97.h" 35#include "pxa2xx-ac97.h"
diff --git a/sound/soc/pxa/pxa2xx-i2s.c b/sound/soc/pxa/pxa2xx-i2s.c
index 8f96d87f7b4b..8548818eea08 100644
--- a/sound/soc/pxa/pxa2xx-i2s.c
+++ b/sound/soc/pxa/pxa2xx-i2s.c
@@ -21,10 +21,10 @@
21#include <sound/initval.h> 21#include <sound/initval.h>
22#include <sound/soc.h> 22#include <sound/soc.h>
23 23
24#include <asm/hardware.h> 24#include <mach/hardware.h>
25#include <asm/arch/pxa-regs.h> 25#include <mach/pxa-regs.h>
26#include <asm/arch/pxa2xx-gpio.h> 26#include <mach/pxa2xx-gpio.h>
27#include <asm/arch/audio.h> 27#include <mach/audio.h>
28 28
29#include "pxa2xx-pcm.h" 29#include "pxa2xx-pcm.h"
30#include "pxa2xx-i2s.h" 30#include "pxa2xx-i2s.h"
diff --git a/sound/soc/pxa/pxa2xx-pcm.c b/sound/soc/pxa/pxa2xx-pcm.c
index 2df03ee5819e..4345f387fe41 100644
--- a/sound/soc/pxa/pxa2xx-pcm.c
+++ b/sound/soc/pxa/pxa2xx-pcm.c
@@ -22,9 +22,9 @@
22#include <sound/soc.h> 22#include <sound/soc.h>
23 23
24#include <asm/dma.h> 24#include <asm/dma.h>
25#include <asm/hardware.h> 25#include <mach/hardware.h>
26#include <asm/arch/pxa-regs.h> 26#include <mach/pxa-regs.h>
27#include <asm/arch/audio.h> 27#include <mach/audio.h>
28 28
29#include "pxa2xx-pcm.h" 29#include "pxa2xx-pcm.h"
30 30
diff --git a/sound/soc/pxa/spitz.c b/sound/soc/pxa/spitz.c
index 64385797da5d..37cb768fc933 100644
--- a/sound/soc/pxa/spitz.c
+++ b/sound/soc/pxa/spitz.c
@@ -26,10 +26,10 @@
26 26
27#include <asm/mach-types.h> 27#include <asm/mach-types.h>
28#include <asm/hardware/scoop.h> 28#include <asm/hardware/scoop.h>
29#include <asm/arch/pxa-regs.h> 29#include <mach/pxa-regs.h>
30#include <asm/arch/hardware.h> 30#include <mach/hardware.h>
31#include <asm/arch/akita.h> 31#include <mach/akita.h>
32#include <asm/arch/spitz.h> 32#include <mach/spitz.h>
33#include "../codecs/wm8750.h" 33#include "../codecs/wm8750.h"
34#include "pxa2xx-pcm.h" 34#include "pxa2xx-pcm.h"
35#include "pxa2xx-i2s.h" 35#include "pxa2xx-i2s.h"
@@ -297,7 +297,7 @@ static int spitz_wm8750_init(struct snd_soc_codec *codec)
297 snd_soc_dapm_disable_pin(codec, "LINPUT3"); 297 snd_soc_dapm_disable_pin(codec, "LINPUT3");
298 snd_soc_dapm_disable_pin(codec, "RINPUT3"); 298 snd_soc_dapm_disable_pin(codec, "RINPUT3");
299 snd_soc_dapm_disable_pin(codec, "OUT3"); 299 snd_soc_dapm_disable_pin(codec, "OUT3");
300 snd_soc_dapm_disable_pin(codec, "MONO"); 300 snd_soc_dapm_disable_pin(codec, "MONO1");
301 301
302 /* Add spitz specific controls */ 302 /* Add spitz specific controls */
303 for (i = 0; i < ARRAY_SIZE(wm8750_spitz_controls); i++) { 303 for (i = 0; i < ARRAY_SIZE(wm8750_spitz_controls); i++) {
diff --git a/sound/soc/pxa/tosa.c b/sound/soc/pxa/tosa.c
index 22971a0f040e..2baaa750f123 100644
--- a/sound/soc/pxa/tosa.c
+++ b/sound/soc/pxa/tosa.c
@@ -29,10 +29,10 @@
29#include <sound/soc-dapm.h> 29#include <sound/soc-dapm.h>
30 30
31#include <asm/mach-types.h> 31#include <asm/mach-types.h>
32#include <asm/arch/tosa.h> 32#include <mach/tosa.h>
33#include <asm/arch/pxa-regs.h> 33#include <mach/pxa-regs.h>
34#include <asm/arch/hardware.h> 34#include <mach/hardware.h>
35#include <asm/arch/audio.h> 35#include <mach/audio.h>
36 36
37#include "../codecs/wm9712.h" 37#include "../codecs/wm9712.h"
38#include "pxa2xx-pcm.h" 38#include "pxa2xx-pcm.h"
diff --git a/sound/soc/s3c24xx/neo1973_wm8753.c b/sound/soc/s3c24xx/neo1973_wm8753.c
index 4d7a9aa15f1a..8089f8ee05c0 100644
--- a/sound/soc/s3c24xx/neo1973_wm8753.c
+++ b/sound/soc/s3c24xx/neo1973_wm8753.c
@@ -24,14 +24,13 @@
24#include <sound/soc-dapm.h> 24#include <sound/soc-dapm.h>
25#include <sound/tlv.h> 25#include <sound/tlv.h>
26 26
27#include <asm/mach-types.h>
28#include <asm/hardware/scoop.h> 27#include <asm/hardware/scoop.h>
29#include <asm/arch/regs-clock.h> 28#include <mach/regs-clock.h>
30#include <asm/arch/regs-gpio.h> 29#include <mach/regs-gpio.h>
31#include <asm/hardware.h> 30#include <mach/hardware.h>
32#include <asm/arch/audio.h> 31#include <mach/audio.h>
33#include <linux/io.h> 32#include <linux/io.h>
34#include <asm/arch/spi-gpio.h> 33#include <mach/spi-gpio.h>
35 34
36#include <asm/plat-s3c24xx/regs-iis.h> 35#include <asm/plat-s3c24xx/regs-iis.h>
37 36
diff --git a/sound/soc/s3c24xx/s3c2412-i2s.c b/sound/soc/s3c24xx/s3c2412-i2s.c
index ee4676ed1283..ded7d995a922 100644
--- a/sound/soc/s3c24xx/s3c2412-i2s.c
+++ b/sound/soc/s3c24xx/s3c2412-i2s.c
@@ -28,16 +28,16 @@
28#include <sound/pcm_params.h> 28#include <sound/pcm_params.h>
29#include <sound/initval.h> 29#include <sound/initval.h>
30#include <sound/soc.h> 30#include <sound/soc.h>
31#include <asm/hardware.h> 31#include <mach/hardware.h>
32 32
33#include <linux/io.h> 33#include <linux/io.h>
34#include <asm/dma.h> 34#include <asm/dma.h>
35 35
36#include <asm/plat-s3c24xx/regs-s3c2412-iis.h> 36#include <asm/plat-s3c24xx/regs-s3c2412-iis.h>
37 37
38#include <asm/arch/regs-gpio.h> 38#include <mach/regs-gpio.h>
39#include <asm/arch/audio.h> 39#include <mach/audio.h>
40#include <asm/arch/dma.h> 40#include <mach/dma.h>
41 41
42#include "s3c24xx-pcm.h" 42#include "s3c24xx-pcm.h"
43#include "s3c2412-i2s.h" 43#include "s3c2412-i2s.h"
diff --git a/sound/soc/s3c24xx/s3c2443-ac97.c b/sound/soc/s3c24xx/s3c2443-ac97.c
index 783349b7fede..19c5c3cf5d8c 100644
--- a/sound/soc/s3c24xx/s3c2443-ac97.c
+++ b/sound/soc/s3c24xx/s3c2443-ac97.c
@@ -27,13 +27,13 @@
27#include <sound/initval.h> 27#include <sound/initval.h>
28#include <sound/soc.h> 28#include <sound/soc.h>
29 29
30#include <asm/hardware.h> 30#include <mach/hardware.h>
31#include <asm/plat-s3c/regs-ac97.h> 31#include <asm/plat-s3c/regs-ac97.h>
32#include <asm/arch/regs-gpio.h> 32#include <mach/regs-gpio.h>
33#include <asm/arch/regs-clock.h> 33#include <mach/regs-clock.h>
34#include <asm/arch/audio.h> 34#include <mach/audio.h>
35#include <asm/dma.h> 35#include <asm/dma.h>
36#include <asm/arch/dma.h> 36#include <mach/dma.h>
37 37
38#include "s3c24xx-pcm.h" 38#include "s3c24xx-pcm.h"
39#include "s3c24xx-ac97.h" 39#include "s3c24xx-ac97.h"
diff --git a/sound/soc/s3c24xx/s3c24xx-i2s.c b/sound/soc/s3c24xx/s3c24xx-i2s.c
index 397524282b57..ba4476b55fbc 100644
--- a/sound/soc/s3c24xx/s3c24xx-i2s.c
+++ b/sound/soc/s3c24xx/s3c24xx-i2s.c
@@ -27,12 +27,12 @@
27#include <sound/initval.h> 27#include <sound/initval.h>
28#include <sound/soc.h> 28#include <sound/soc.h>
29 29
30#include <asm/hardware.h> 30#include <mach/hardware.h>
31#include <asm/arch/regs-gpio.h> 31#include <mach/regs-gpio.h>
32#include <asm/arch/regs-clock.h> 32#include <mach/regs-clock.h>
33#include <asm/arch/audio.h> 33#include <mach/audio.h>
34#include <asm/dma.h> 34#include <asm/dma.h>
35#include <asm/arch/dma.h> 35#include <mach/dma.h>
36 36
37#include <asm/plat-s3c24xx/regs-iis.h> 37#include <asm/plat-s3c24xx/regs-iis.h>
38 38
diff --git a/sound/soc/s3c24xx/s3c24xx-pcm.c b/sound/soc/s3c24xx/s3c24xx-pcm.c
index cef79b34dc6f..e13e614bada9 100644
--- a/sound/soc/s3c24xx/s3c24xx-pcm.c
+++ b/sound/soc/s3c24xx/s3c24xx-pcm.c
@@ -27,9 +27,9 @@
27#include <sound/soc.h> 27#include <sound/soc.h>
28 28
29#include <asm/dma.h> 29#include <asm/dma.h>
30#include <asm/hardware.h> 30#include <mach/hardware.h>
31#include <asm/arch/dma.h> 31#include <mach/dma.h>
32#include <asm/arch/audio.h> 32#include <mach/audio.h>
33 33
34#include "s3c24xx-pcm.h" 34#include "s3c24xx-pcm.h"
35 35